summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:58:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:58:13 +0000
commit1c9f89c96d7f1373ecec034fd078f3ab60a77e71 (patch)
treeecb9ca7fa7ef5bfd4d38721c7310d457cedfae5d
parentReleasing progress-linux version 6.5+dfsg1-1~progress7.99u1. (diff)
downloadwordpress-1c9f89c96d7f1373ecec034fd078f3ab60a77e71.tar.xz
wordpress-1c9f89c96d7f1373ecec034fd078f3ab60a77e71.zip
Merging upstream version 6.5.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--wp-admin/about.php31
-rw-r--r--wp-includes/assets/script-loader-packages.min.php2
-rw-r--r--wp-includes/assets/script-loader-packages.php2
-rw-r--r--wp-includes/block-template-utils.php4
-rw-r--r--wp-includes/blocks/avatar.php4
-rw-r--r--wp-includes/blocks/navigation/view.js5
-rw-r--r--wp-includes/blocks/navigation/view.min.js2
-rw-r--r--wp-includes/css/dist/edit-post/style-rtl.css6
-rw-r--r--wp-includes/css/dist/edit-post/style-rtl.min.css2
-rw-r--r--wp-includes/css/dist/edit-post/style.css6
-rw-r--r--wp-includes/css/dist/edit-post/style.min.css2
-rw-r--r--wp-includes/js/dist/block-editor.js97
-rw-r--r--wp-includes/js/dist/block-editor.min.js4
-rw-r--r--wp-includes/js/dist/block-library.js71
-rw-r--r--wp-includes/js/dist/block-library.min.js4
-rw-r--r--wp-includes/js/dist/components.js2
-rw-r--r--wp-includes/js/dist/components.min.js2
-rw-r--r--wp-includes/js/dist/edit-site.js159
-rw-r--r--wp-includes/js/dist/edit-site.min.js6
-rw-r--r--wp-includes/js/dist/editor.js2
-rw-r--r--wp-includes/js/dist/editor.min.js2
-rw-r--r--wp-includes/version.php2
22 files changed, 270 insertions, 147 deletions
diff --git a/wp-admin/about.php b/wp-admin/about.php
index 169f0b6..bed2073 100644
--- a/wp-admin/about.php
+++ b/wp-admin/about.php
@@ -41,6 +41,37 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<a href="contribute.php" class="nav-tab"><?php _e( 'Get Involved' ); ?></a>
</nav>
+ <div class="about__section changelog has-subtle-background-color">
+ <div class="column">
+ <h2><?php _e( 'Maintenance and Security Release' ); ?></h2>
+ <p>
+ <?php
+ printf(
+ /* translators: 1: WordPress version number, 2: Plural number of bugs. */
+ _n(
+ '<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bug.',
+ '<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bugs.',
+ 12
+ ),
+ '6.5.2',
+ '12'
+ );
+ ?>
+ <?php
+ printf(
+ /* translators: %s: HelpHub URL. */
+ __( 'For more information, see <a href="%s">the release notes</a>.' ),
+ sprintf(
+ /* translators: %s: WordPress version. */
+ esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
+ sanitize_title( '6.5.2' )
+ )
+ );
+ ?>
+ </p>
+ </div>
+ </div>
+
<div class="about__section">
<div class="column">
<h2>
diff --git a/wp-includes/assets/script-loader-packages.min.php b/wp-includes/assets/script-loader-packages.min.php
index df7a314..2021c41 100644
--- a/wp-includes/assets/script-loader-packages.min.php
+++ b/wp-includes/assets/script-loader-packages.min.php
@@ -1 +1 @@
-<?php return array('a11y.min.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'd90eebea464f6c09bfd5'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'ffc4fc3374b0ab000805'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '4c185334c5ec26e149cc'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9fb50649848277dd318d'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9113eed771d446f4a556'), 'block-directory.min.js' => array('dependencies' => array('react', '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-private-apis', 'wp-url'), 'version' => '9159053f41b8ec09d91b'), 'block-editor.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '3990a02105ec9d75afb2'), 'block-library.min.js' => array('dependencies' => array('react', '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-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => 'ad737ee06c6f575025a0'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '14d44daebf663d05d330'), 'blocks.min.js' => array('dependencies' => array('react', '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-private-apis', 'wp-rich-text', 'wp-shortcode'), 'version' => '6612d078dfaf28b875b8'), 'commands.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => 'e4060e55811e7824feb9'), 'components.min.js' => array('dependencies' => array('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' => 'c3a06857b0e51f435ccb'), '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' => '1339d3318cd44440dccb'), 'core-commands.min.js' => array('dependencies' => array('react', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => '4ee9c423b71a59459ca6'), 'core-data.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => 'ff4b03fefe97d027b7fd'), 'customize-widgets.min.js' => array('dependencies' => array('react', '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' => '137692724827d41c9fb5'), 'data.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'e6595ba1a7cd34429f66'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => '49f5587e8b90f9e7cc7e'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'aaca6387d1cf924acc51'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => 'e1f84915c5e8ae38964c'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '4ecffbffba91b10c5c7a'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f77871ff7694fffea381'), 'edit-post.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', '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' => '82b743695f8ef1673753'), 'edit-site.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-router', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => '4573a7f1949d2baf9fe3'), 'edit-widgets.min.js' => array('dependencies' => array('react', '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-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '96a3b30b85133de96871'), 'editor.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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-patterns', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => 'd4537187f01a11a554a1'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'cb762d190aebbec25b27'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6561a406d2d232a6fbd2'), 'format-library.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => '66ea4e17a9a3f539c9d5'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2810c76e705dd1a53b18'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2cd3358363e0675638fb'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '5e580eb46a90c2b997e6'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e0f9f1d78d83f5196979'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('react', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '4d239ebc17efd846a168'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '034ff647a54b018581d3'), 'list-reusable-blocks.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'b9d73b532124daefd2c7'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '1cf582d3c080c8694c8c'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '673a68a7ac2f556ed50b'), 'nux.min.js' => array('dependencies' => array('react', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '46c93a71c3e2c2bf37f0'), 'patterns.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => 'ee72aaa0806b06909b48'), 'plugins.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '2d369cbfdcb887111e06'), 'preferences.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => 'e1544c6f06a9639c4c31'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '3f5184d775ed9dfb154f'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'a41bfd5835f583ae838a'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9c21c957c7e50ffdbf48'), 'private-apis.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5e7fdf55d04b8c2aadef'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b14553dce2bee5c0f064'), 'reusable-blocks.min.js' => array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '008366ba172a4f4b92b4'), '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' => 'dd125966cf6cc0394ae0'), 'router.min.js' => array('dependencies' => array('react', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '92fd517f31b92695552a'), 'server-side-render.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '04ce502cc4eef9b49ce7'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b7747eee0efafd2f0c3b'), 'style-engine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03f13c515060de24b556'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '05f8a6df6258f0081718'), 'undo-manager.min.js' => array('dependencies' => array('wp-is-shallow-equal', 'wp-polyfill'), 'version' => 'f0698003cb0f0a7bd794'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '421139b01f33e5b327d8'), 'viewport.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-data', 'wp-polyfill'), 'version' => 'e555fda1d93ecf1fb1e0'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'ed7c8b0940914f4fe44b'), 'widgets.min.js' => array('dependencies' => array('react', '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' => '4c7bfc488be9e26d6488'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '55d8c2bf3dc99e7ea5ec'));
+<?php return array('a11y.min.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'd90eebea464f6c09bfd5'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'ffc4fc3374b0ab000805'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '4c185334c5ec26e149cc'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9fb50649848277dd318d'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9113eed771d446f4a556'), 'block-directory.min.js' => array('dependencies' => array('react', '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-private-apis', 'wp-url'), 'version' => '9159053f41b8ec09d91b'), 'block-editor.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'f192218ec9fd5b103f38'), 'block-library.min.js' => array('dependencies' => array('react', '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-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => 'd124c0efe2b7eb5bf914'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '14d44daebf663d05d330'), 'blocks.min.js' => array('dependencies' => array('react', '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-private-apis', 'wp-rich-text', 'wp-shortcode'), 'version' => '6612d078dfaf28b875b8'), 'commands.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => 'e4060e55811e7824feb9'), 'components.min.js' => array('dependencies' => array('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' => 'c4b2ef1c62202e4e2d1e'), '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' => '1339d3318cd44440dccb'), 'core-commands.min.js' => array('dependencies' => array('react', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => '4ee9c423b71a59459ca6'), 'core-data.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => 'ff4b03fefe97d027b7fd'), 'customize-widgets.min.js' => array('dependencies' => array('react', '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' => '137692724827d41c9fb5'), 'data.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'e6595ba1a7cd34429f66'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => '49f5587e8b90f9e7cc7e'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'aaca6387d1cf924acc51'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => 'e1f84915c5e8ae38964c'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '4ecffbffba91b10c5c7a'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f77871ff7694fffea381'), 'edit-post.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', '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' => '82b743695f8ef1673753'), 'edit-site.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-router', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => 'a49bfdcfb75c295933e9'), 'edit-widgets.min.js' => array('dependencies' => array('react', '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-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '96a3b30b85133de96871'), 'editor.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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-patterns', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '6497dd814badef65e728'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'cb762d190aebbec25b27'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6561a406d2d232a6fbd2'), 'format-library.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => '66ea4e17a9a3f539c9d5'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2810c76e705dd1a53b18'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2cd3358363e0675638fb'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '5e580eb46a90c2b997e6'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e0f9f1d78d83f5196979'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('react', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '4d239ebc17efd846a168'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '034ff647a54b018581d3'), 'list-reusable-blocks.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'b9d73b532124daefd2c7'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '1cf582d3c080c8694c8c'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '673a68a7ac2f556ed50b'), 'nux.min.js' => array('dependencies' => array('react', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '46c93a71c3e2c2bf37f0'), 'patterns.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => 'ee72aaa0806b06909b48'), 'plugins.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '2d369cbfdcb887111e06'), 'preferences.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => 'e1544c6f06a9639c4c31'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '3f5184d775ed9dfb154f'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'a41bfd5835f583ae838a'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9c21c957c7e50ffdbf48'), 'private-apis.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5e7fdf55d04b8c2aadef'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b14553dce2bee5c0f064'), 'reusable-blocks.min.js' => array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '008366ba172a4f4b92b4'), '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' => 'dd125966cf6cc0394ae0'), 'router.min.js' => array('dependencies' => array('react', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '92fd517f31b92695552a'), 'server-side-render.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '04ce502cc4eef9b49ce7'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b7747eee0efafd2f0c3b'), 'style-engine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03f13c515060de24b556'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '05f8a6df6258f0081718'), 'undo-manager.min.js' => array('dependencies' => array('wp-is-shallow-equal', 'wp-polyfill'), 'version' => 'f0698003cb0f0a7bd794'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '421139b01f33e5b327d8'), 'viewport.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-data', 'wp-polyfill'), 'version' => 'e555fda1d93ecf1fb1e0'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'ed7c8b0940914f4fe44b'), 'widgets.min.js' => array('dependencies' => array('react', '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' => '4c7bfc488be9e26d6488'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '55d8c2bf3dc99e7ea5ec'));
diff --git a/wp-includes/assets/script-loader-packages.php b/wp-includes/assets/script-loader-packages.php
index c4537be..ca6c0a5 100644
--- a/wp-includes/assets/script-loader-packages.php
+++ b/wp-includes/assets/script-loader-packages.php
@@ -1 +1 @@
-<?php return array('a11y.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'e4f0f9508f80ce638f3d'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'c136c5f6e2a48de059bb'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'eb5e80d6477f0bc94063'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5f6a2604c6641fff16b1'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '80e277c58e09d6b7e47b'), 'block-directory.js' => array('dependencies' => array('react', '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-private-apis', 'wp-url'), 'version' => '209d97720556b43a7657'), 'block-editor.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '45315f1d2ea51ade7ec7'), 'block-library.js' => array('dependencies' => array('react', '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-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '69377fbf3d334cedb974'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '1d1bef54e84a98f3efb9'), 'blocks.js' => array('dependencies' => array('react', '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-private-apis', 'wp-rich-text', 'wp-shortcode'), 'version' => '1cdc1594170000ce87b5'), 'commands.js' => array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => '27b86e4aeb0b50354c31'), 'components.js' => array('dependencies' => array('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' => '1a32d3af8772c607629d'), 'compose.js' => array('dependencies' => array('react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '26d30733522e03eb136b'), 'core-commands.js' => array('dependencies' => array('react', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => '62e17505b49f6c5f07de'), 'core-data.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => 'a0865df67c20b77269ba'), 'customize-widgets.js' => array('dependencies' => array('react', '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' => 'cbc5b5252cd0e7ed0fe9'), 'data.js' => array('dependencies' => array('react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'f32512eb1197234b3023'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => '06af18ace9a4aeb126e9'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'dd508f9121b7db4da62d'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '1aa7a2722e5853bb3a37'), 'dom.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '0f3d03e15247ad13ae5f'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5b9fa8df0892dc9a7c41'), 'edit-post.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', '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' => '29e6354ff01f57cc7421'), 'edit-site.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-router', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => '36269b024a96f1de734b'), 'edit-widgets.js' => array('dependencies' => array('react', '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-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '23a493f9632cfb0e053f'), 'editor.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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-patterns', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '21c2c781332131807660'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'c577659ff26c570d2a90'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6f9dc571b7e633ab5cbb'), 'format-library.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => 'ebbf484376382a0eeb31'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2e6d63e772894a800ba8'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => '62cf41703df6e2ca5d99'), 'i18n.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '2aff907006e2aa00e26e'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e70dad7478a6d81b381b'), 'keyboard-shortcuts.js' => array('dependencies' => array('react', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '7587027656d32413e40f'), 'keycodes.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => 'bdac64cae9b64d2585cf'), 'list-reusable-blocks.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'ec798cf371656a653e30'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '53965ea93ce50bae2cfe'), 'notices.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => 'bb4dbe982e6a0739f30e'), 'nux.js' => array('dependencies' => array('react', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'dd10494e806aeb6eec56'), 'patterns.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '9690971c7186889b0866'), 'plugins.js' => array('dependencies' => array('react', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '0dd2604d62f853fd21af'), 'preferences.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => 'c7db68394abefb140261'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '83944af7a2948c080ade'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '1ed6f4c180042c213439'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => '0ac29e2c7d9453425a64'), 'private-apis.js' => array('dependencies' => array('wp-polyfill'), 'version' => '29e3213b61725f319df2'), 'redux-routine.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4bdc61ccdb5bc3ee2797'), 'reusable-blocks.js' => array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '63a91ba189f1153db074'), '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' => 'a1ca7da0915d540c4afa'), 'router.js' => array('dependencies' => array('react', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '24ab4c66bbafbf045980'), 'server-side-render.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '6526ab69ac6cf7429453'), 'shortcode.js' => array('dependencies' => array('wp-polyfill'), 'version' => '577c74513f927a05a979'), 'style-engine.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c68ace0b6b90cb4df22b'), 'token-list.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9fb6d95fd24788d0ac39'), 'undo-manager.js' => array('dependencies' => array('wp-is-shallow-equal', 'wp-polyfill'), 'version' => '131d70acce3788278416'), 'url.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f943a48db99be5ac9628'), 'viewport.js' => array('dependencies' => array('react', 'wp-compose', 'wp-data', 'wp-polyfill'), 'version' => 'e311816805c0e934f485'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4ed38eab9265c3cf0e08'), 'widgets.js' => array('dependencies' => array('react', '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' => '8f2a3dc9d192c501ace8'), 'wordcount.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c67f865e3ce4abde9fdb'));
+<?php return array('a11y.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'e4f0f9508f80ce638f3d'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'c136c5f6e2a48de059bb'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'eb5e80d6477f0bc94063'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5f6a2604c6641fff16b1'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '80e277c58e09d6b7e47b'), 'block-directory.js' => array('dependencies' => array('react', '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-private-apis', 'wp-url'), 'version' => '209d97720556b43a7657'), 'block-editor.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '6e5146eb39396f25982a'), 'block-library.js' => array('dependencies' => array('react', '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-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => 'd5a0be9af25610c04444'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '1d1bef54e84a98f3efb9'), 'blocks.js' => array('dependencies' => array('react', '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-private-apis', 'wp-rich-text', 'wp-shortcode'), 'version' => '1cdc1594170000ce87b5'), 'commands.js' => array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => '27b86e4aeb0b50354c31'), 'components.js' => array('dependencies' => array('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' => 'fd3882637f2f48054bd3'), 'compose.js' => array('dependencies' => array('react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '26d30733522e03eb136b'), 'core-commands.js' => array('dependencies' => array('react', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => '62e17505b49f6c5f07de'), 'core-data.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => 'a0865df67c20b77269ba'), 'customize-widgets.js' => array('dependencies' => array('react', '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' => 'cbc5b5252cd0e7ed0fe9'), 'data.js' => array('dependencies' => array('react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'f32512eb1197234b3023'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => '06af18ace9a4aeb126e9'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'dd508f9121b7db4da62d'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '1aa7a2722e5853bb3a37'), 'dom.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '0f3d03e15247ad13ae5f'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5b9fa8df0892dc9a7c41'), 'edit-post.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', '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' => '29e6354ff01f57cc7421'), 'edit-site.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-router', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => '7687c91667ed9257416e'), 'edit-widgets.js' => array('dependencies' => array('react', '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-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '23a493f9632cfb0e053f'), 'editor.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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-patterns', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => 'a49c9bfd0070c49a3a53'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'c577659ff26c570d2a90'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6f9dc571b7e633ab5cbb'), 'format-library.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => 'ebbf484376382a0eeb31'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2e6d63e772894a800ba8'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => '62cf41703df6e2ca5d99'), 'i18n.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '2aff907006e2aa00e26e'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e70dad7478a6d81b381b'), 'keyboard-shortcuts.js' => array('dependencies' => array('react', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '7587027656d32413e40f'), 'keycodes.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => 'bdac64cae9b64d2585cf'), 'list-reusable-blocks.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'ec798cf371656a653e30'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '53965ea93ce50bae2cfe'), 'notices.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => 'bb4dbe982e6a0739f30e'), 'nux.js' => array('dependencies' => array('react', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'dd10494e806aeb6eec56'), 'patterns.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '9690971c7186889b0866'), 'plugins.js' => array('dependencies' => array('react', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '0dd2604d62f853fd21af'), 'preferences.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => 'c7db68394abefb140261'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '83944af7a2948c080ade'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '1ed6f4c180042c213439'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => '0ac29e2c7d9453425a64'), 'private-apis.js' => array('dependencies' => array('wp-polyfill'), 'version' => '29e3213b61725f319df2'), 'redux-routine.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4bdc61ccdb5bc3ee2797'), 'reusable-blocks.js' => array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '63a91ba189f1153db074'), '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' => 'a1ca7da0915d540c4afa'), 'router.js' => array('dependencies' => array('react', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '24ab4c66bbafbf045980'), 'server-side-render.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '6526ab69ac6cf7429453'), 'shortcode.js' => array('dependencies' => array('wp-polyfill'), 'version' => '577c74513f927a05a979'), 'style-engine.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c68ace0b6b90cb4df22b'), 'token-list.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9fb6d95fd24788d0ac39'), 'undo-manager.js' => array('dependencies' => array('wp-is-shallow-equal', 'wp-polyfill'), 'version' => '131d70acce3788278416'), 'url.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f943a48db99be5ac9628'), 'viewport.js' => array('dependencies' => array('react', 'wp-compose', 'wp-data', 'wp-polyfill'), 'version' => 'e311816805c0e934f485'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4ed38eab9265c3cf0e08'), 'widgets.js' => array('dependencies' => array('react', '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' => '8f2a3dc9d192c501ace8'), 'wordcount.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c67f865e3ce4abde9fdb'));
diff --git a/wp-includes/block-template-utils.php b/wp-includes/block-template-utils.php
index cfae702..8ba4874 100644
--- a/wp-includes/block-template-utils.php
+++ b/wp-includes/block-template-utils.php
@@ -229,14 +229,12 @@ function _get_block_templates_paths( $base_directory ) {
return $template_path_list[ $base_directory ];
}
$path_list = array();
- try {
+ if ( is_dir( $base_directory ) ) {
$nested_files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $base_directory ) );
$nested_html_files = new RegexIterator( $nested_files, '/^.+\.html$/i', RecursiveRegexIterator::GET_MATCH );
foreach ( $nested_html_files as $path => $file ) {
$path_list[] = $path;
}
- } catch ( Exception $e ) {
- // Do nothing.
}
$template_path_list[ $base_directory ] = $path_list;
return $path_list;
diff --git a/wp-includes/blocks/avatar.php b/wp-includes/blocks/avatar.php
index d404fb8..ba6a5e0 100644
--- a/wp-includes/blocks/avatar.php
+++ b/wp-includes/blocks/avatar.php
@@ -49,7 +49,7 @@ function render_block_core_avatar( $attributes, $content, $block ) {
$label = '';
if ( '_blank' === $attributes['linkTarget'] ) {
// translators: %s is the Author name.
- $label = 'aria-label="' . sprintf( esc_attr__( '(%s author archive, opens in a new tab)' ), $author_name ) . '"';
+ $label = 'aria-label="' . esc_attr( sprintf( __( '(%s author archive, opens in a new tab)' ), $author_name ) ) . '"';
}
// translators: %1$s: Author archive link. %2$s: Link target. %3$s Aria label. %4$s Avatar image.
$avatar_block = sprintf( '<a href="%1$s" target="%2$s" %3$s class="wp-block-avatar__link">%4$s</a>', esc_url( get_author_posts_url( $author_id ) ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block );
@@ -76,7 +76,7 @@ function render_block_core_avatar( $attributes, $content, $block ) {
$label = '';
if ( '_blank' === $attributes['linkTarget'] ) {
// translators: %s is the Comment Author name.
- $label = 'aria-label="' . sprintf( esc_attr__( '(%s website link, opens in a new tab)' ), $comment->comment_author ) . '"';
+ $label = 'aria-label="' . esc_attr( sprintf( __( '(%s website link, opens in a new tab)' ), $comment->comment_author ) ) . '"';
}
// translators: %1$s: Comment Author website link. %2$s: Link target. %3$s Aria label. %4$s Avatar image.
$avatar_block = sprintf( '<a href="%1$s" target="%2$s" %3$s class="wp-block-avatar__link">%4$s</a>', esc_url( $comment->comment_author_url ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block );
diff --git a/wp-includes/blocks/navigation/view.js b/wp-includes/blocks/navigation/view.js
index 8ed1935..553deda 100644
--- a/wp-includes/blocks/navigation/view.js
+++ b/wp-includes/blocks/navigation/view.js
@@ -151,7 +151,8 @@ const {
},
handleMenuFocusout(event) {
const {
- modal
+ modal,
+ type
} = (0,interactivity_namespaceObject.getContext)();
// If focus is outside modal, and in the document, close menu
// event.target === The element losing focus
@@ -160,7 +161,7 @@ const {
// `window.document.activeElement` doesn't change.
// The event.relatedTarget is null when something outside the navigation menu is clicked. This is only necessary for Safari.
- if (event.relatedTarget === null || !modal?.contains(event.relatedTarget) && event.target !== window.document.activeElement) {
+ if (event.relatedTarget === null || !modal?.contains(event.relatedTarget) && event.target !== window.document.activeElement && type === 'submenu') {
actions.closeMenu('click');
actions.closeMenu('focus');
}
diff --git a/wp-includes/blocks/navigation/view.min.js b/wp-includes/blocks/navigation/view.min.js
index 2487e0d..1de9f7a 100644
--- a/wp-includes/blocks/navigation/view.min.js
+++ b/wp-includes/blocks/navigation/view.min.js
@@ -1 +1 @@
-import*as e from"@wordpress/interactivity";var t={d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const n=(e=>{var n={};return t.d(n,e),n})({getContext:()=>e.getContext,getElement:()=>e.getElement,store:()=>e.store}),o=["a[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","[contenteditable]",'[tabindex]:not([tabindex^="-"])'];document.addEventListener("click",(()=>{}));const{state:l,actions:c}=(0,n.store)("core/navigation",{state:{get roleAttribute(){return"overlay"===(0,n.getContext)().type&&l.isMenuOpen?"dialog":null},get ariaModal(){return"overlay"===(0,n.getContext)().type&&l.isMenuOpen?"true":null},get ariaLabel(){const e=(0,n.getContext)();return"overlay"===e.type&&l.isMenuOpen?e.ariaLabel:null},get isMenuOpen(){return Object.values(l.menuOpenedBy).filter(Boolean).length>0},get menuOpenedBy(){const e=(0,n.getContext)();return"overlay"===e.type?e.overlayOpenedBy:e.submenuOpenedBy}},actions:{openMenuOnHover(){const{type:e,overlayOpenedBy:t}=(0,n.getContext)();"submenu"===e&&0===Object.values(t||{}).filter(Boolean).length&&c.openMenu("hover")},closeMenuOnHover(){const{type:e,overlayOpenedBy:t}=(0,n.getContext)();"submenu"===e&&0===Object.values(t||{}).filter(Boolean).length&&c.closeMenu("hover")},openMenuOnClick(){const e=(0,n.getContext)(),{ref:t}=(0,n.getElement)();e.previousFocus=t,c.openMenu("click")},closeMenuOnClick(){c.closeMenu("click"),c.closeMenu("focus")},openMenuOnFocus(){c.openMenu("focus")},toggleMenuOnClick(){const e=(0,n.getContext)(),{ref:t}=(0,n.getElement)();window.document.activeElement!==t&&t.focus();const{menuOpenedBy:o}=l;o.click||o.focus?(c.closeMenu("click"),c.closeMenu("focus")):(e.previousFocus=t,c.openMenu("click"))},handleMenuKeydown(e){const{type:t,firstFocusableElement:o,lastFocusableElement:u}=(0,n.getContext)();if(l.menuOpenedBy.click){if("Escape"===e?.key)return c.closeMenu("click"),void c.closeMenu("focus");"overlay"===t&&"Tab"===e.key&&(e.shiftKey&&window.document.activeElement===o?(e.preventDefault(),u.focus()):e.shiftKey||window.document.activeElement!==u||(e.preventDefault(),o.focus()))}},handleMenuFocusout(e){const{modal:t}=(0,n.getContext)();(null===e.relatedTarget||!t?.contains(e.relatedTarget)&&e.target!==window.document.activeElement)&&(c.closeMenu("click"),c.closeMenu("focus"))},openMenu(e="click"){const{type:t}=(0,n.getContext)();l.menuOpenedBy[e]=!0,"overlay"===t&&document.documentElement.classList.add("has-modal-open")},closeMenu(e="click"){const t=(0,n.getContext)();l.menuOpenedBy[e]=!1,l.isMenuOpen||(t.modal?.contains(window.document.activeElement)&&t.previousFocus?.focus(),t.modal=null,t.previousFocus=null,"overlay"===t.type&&document.documentElement.classList.remove("has-modal-open"))}},callbacks:{initMenu(){const e=(0,n.getContext)(),{ref:t}=(0,n.getElement)();if(l.isMenuOpen){const n=t.querySelectorAll(o);e.modal=t,e.firstFocusableElement=n[0],e.lastFocusableElement=n[n.length-1]}},focusFirstElement(){const{ref:e}=(0,n.getElement)();if(l.isMenuOpen){const t=e.querySelectorAll(o);t?.[0]?.focus()}}}},{lock:!0}); \ No newline at end of file
+import*as e from"@wordpress/interactivity";var t={d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const n=(e=>{var n={};return t.d(n,e),n})({getContext:()=>e.getContext,getElement:()=>e.getElement,store:()=>e.store}),o=["a[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","[contenteditable]",'[tabindex]:not([tabindex^="-"])'];document.addEventListener("click",(()=>{}));const{state:l,actions:c}=(0,n.store)("core/navigation",{state:{get roleAttribute(){return"overlay"===(0,n.getContext)().type&&l.isMenuOpen?"dialog":null},get ariaModal(){return"overlay"===(0,n.getContext)().type&&l.isMenuOpen?"true":null},get ariaLabel(){const e=(0,n.getContext)();return"overlay"===e.type&&l.isMenuOpen?e.ariaLabel:null},get isMenuOpen(){return Object.values(l.menuOpenedBy).filter(Boolean).length>0},get menuOpenedBy(){const e=(0,n.getContext)();return"overlay"===e.type?e.overlayOpenedBy:e.submenuOpenedBy}},actions:{openMenuOnHover(){const{type:e,overlayOpenedBy:t}=(0,n.getContext)();"submenu"===e&&0===Object.values(t||{}).filter(Boolean).length&&c.openMenu("hover")},closeMenuOnHover(){const{type:e,overlayOpenedBy:t}=(0,n.getContext)();"submenu"===e&&0===Object.values(t||{}).filter(Boolean).length&&c.closeMenu("hover")},openMenuOnClick(){const e=(0,n.getContext)(),{ref:t}=(0,n.getElement)();e.previousFocus=t,c.openMenu("click")},closeMenuOnClick(){c.closeMenu("click"),c.closeMenu("focus")},openMenuOnFocus(){c.openMenu("focus")},toggleMenuOnClick(){const e=(0,n.getContext)(),{ref:t}=(0,n.getElement)();window.document.activeElement!==t&&t.focus();const{menuOpenedBy:o}=l;o.click||o.focus?(c.closeMenu("click"),c.closeMenu("focus")):(e.previousFocus=t,c.openMenu("click"))},handleMenuKeydown(e){const{type:t,firstFocusableElement:o,lastFocusableElement:u}=(0,n.getContext)();if(l.menuOpenedBy.click){if("Escape"===e?.key)return c.closeMenu("click"),void c.closeMenu("focus");"overlay"===t&&"Tab"===e.key&&(e.shiftKey&&window.document.activeElement===o?(e.preventDefault(),u.focus()):e.shiftKey||window.document.activeElement!==u||(e.preventDefault(),o.focus()))}},handleMenuFocusout(e){const{modal:t,type:o}=(0,n.getContext)();(null===e.relatedTarget||!t?.contains(e.relatedTarget)&&e.target!==window.document.activeElement&&"submenu"===o)&&(c.closeMenu("click"),c.closeMenu("focus"))},openMenu(e="click"){const{type:t}=(0,n.getContext)();l.menuOpenedBy[e]=!0,"overlay"===t&&document.documentElement.classList.add("has-modal-open")},closeMenu(e="click"){const t=(0,n.getContext)();l.menuOpenedBy[e]=!1,l.isMenuOpen||(t.modal?.contains(window.document.activeElement)&&t.previousFocus?.focus(),t.modal=null,t.previousFocus=null,"overlay"===t.type&&document.documentElement.classList.remove("has-modal-open"))}},callbacks:{initMenu(){const e=(0,n.getContext)(),{ref:t}=(0,n.getElement)();if(l.isMenuOpen){const n=t.querySelectorAll(o);e.modal=t,e.firstFocusableElement=n[0],e.lastFocusableElement=n[n.length-1]}},focusFirstElement(){const{ref:e}=(0,n.getElement)();if(l.isMenuOpen){const t=e.querySelectorAll(o);t?.[0]?.focus()}}}},{lock:!0}); \ No newline at end of file
diff --git a/wp-includes/css/dist/edit-post/style-rtl.css b/wp-includes/css/dist/edit-post/style-rtl.css
index d6899b1..78aa4bf 100644
--- a/wp-includes/css/dist/edit-post/style-rtl.css
+++ b/wp-includes/css/dist/edit-post/style-rtl.css
@@ -586,9 +586,7 @@ body.is-fullscreen-mode .interface-interface-skeleton{
border-bottom:none;
}
.is-distraction-free .edit-post-header{
- -webkit-backdrop-filter:blur(20px) !important;
- backdrop-filter:blur(20px) !important;
- background-color:#ffffffe6;
+ background-color:#fff;
border-bottom:1px solid #e0e0e0;
position:absolute;
width:100%;
@@ -596,7 +594,7 @@ body.is-fullscreen-mode .interface-interface-skeleton{
.is-distraction-free .edit-post-header>.edit-post-header__settings>.edit-post-header__post-preview-button{
visibility:hidden;
}
-.is-distraction-free .edit-post-header>.edit-post-header__settings>.editor-preview-dropdown,.is-distraction-free .edit-post-header>.edit-post-header__settings>.interface-pinned-items,.is-distraction-free .edit-post-header>.edit-post-header__toolbar .editor-document-tools__document-overview-toggle,.is-distraction-free .edit-post-header>.edit-post-header__toolbar .editor-document-tools__inserter-toggle{
+.is-distraction-free .edit-post-header>.edit-post-header__settings>.editor-preview-dropdown,.is-distraction-free .edit-post-header>.edit-post-header__settings>.interface-pinned-items,.is-distraction-free .edit-post-header>.edit-post-header__toolbar .editor-document-tools__document-overview-toggle{
display:none;
}
.is-distraction-free .interface-interface-skeleton__header:focus-within{
diff --git a/wp-includes/css/dist/edit-post/style-rtl.min.css b/wp-includes/css/dist/edit-post/style-rtl.min.css
index 75c9c85..f50fa56 100644
--- a/wp-includes/css/dist/edit-post/style-rtl.min.css
+++ b/wp-includes/css/dist/edit-post/style-rtl.min.css
@@ -1 +1 @@
-:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,161;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px;--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:#9747ff}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.components-panel__header.interface-complementary-area-header__small{background:#fff;padding-left:4px}.components-panel__header.interface-complementary-area-header__small .interface-complementary-area-header__small-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}@media (min-width:782px){.components-panel__header.interface-complementary-area-header__small{display:none}}.interface-complementary-area-header{background:#fff;padding-left:4px}.interface-complementary-area-header .components-button.has-icon{display:none;margin-right:auto}.interface-complementary-area-header .components-button.has-icon~.components-button{margin-right:0}@media (min-width:782px){.interface-complementary-area-header .components-button.has-icon{display:flex}.components-panel__header+.interface-complementary-area-header{margin-top:0}}.interface-complementary-area{background:#fff;color:#1e1e1e}@media (min-width:600px){.interface-complementary-area{-webkit-overflow-scrolling:touch}}@media (min-width:782px){.interface-complementary-area{width:280px}}.interface-complementary-area .components-panel{border:none;position:relative;z-index:0}.interface-complementary-area .components-panel__header{position:sticky;top:0;z-index:1}.interface-complementary-area .components-panel__header.edit-post-sidebar__panel-tabs{top:48px}@media (min-width:782px){.interface-complementary-area .components-panel__header.edit-post-sidebar__panel-tabs{top:0}}.interface-complementary-area p:not(.components-base-control__help){margin-top:0}.interface-complementary-area h2{color:#1e1e1e;font-size:13px;margin-bottom:1.5em}.interface-complementary-area h3{color:#1e1e1e;font-size:11px;font-weight:500;margin-bottom:1.5em;text-transform:uppercase}.interface-complementary-area hr{border-bottom:1px solid #f0f0f0;border-top:none;margin:1.5em 0}.interface-complementary-area div.components-toolbar,.interface-complementary-area div.components-toolbar-group{box-shadow:none;margin-bottom:1.5em}.interface-complementary-area div.components-toolbar-group:last-child,.interface-complementary-area div.components-toolbar:last-child{margin-bottom:0}.interface-complementary-area .block-editor-skip-to-selected-block:focus{bottom:10px;left:10px;right:auto;top:auto}@media (min-width:782px){body.js.is-fullscreen-mode{height:calc(100% + 32px);margin-top:-32px}body.js.is-fullscreen-mode #adminmenumain,body.js.is-fullscreen-mode #wpadminbar{display:none}body.js.is-fullscreen-mode #wpcontent,body.js.is-fullscreen-mode #wpfooter{margin-right:0}}html.interface-interface-skeleton__html-container{position:fixed;width:100%}@media (min-width:782px){html.interface-interface-skeleton__html-container{position:static;width:auto}}.interface-interface-skeleton{bottom:0;display:flex;flex-direction:row;height:auto;left:0;max-height:100%;position:fixed;top:46px}@media (min-width:783px){.interface-interface-skeleton{top:32px}.is-fullscreen-mode .interface-interface-skeleton{top:0}}.interface-interface-skeleton__editor{display:flex;flex:0 1 100%;flex-direction:column;overflow:hidden}.interface-interface-skeleton{right:0}@media (min-width:783px){.interface-interface-skeleton{right:160px}}@media (min-width:783px){.auto-fold .interface-interface-skeleton{right:36px}}@media (min-width:961px){.auto-fold .interface-interface-skeleton{right:160px}}.folded .interface-interface-skeleton{right:0}@media (min-width:783px){.folded .interface-interface-skeleton{right:36px}}body.is-fullscreen-mode .interface-interface-skeleton{right:0!important}.interface-interface-skeleton__body{display:flex;flex-grow:1;overflow:auto;overscroll-behavior-y:none}@media (min-width:782px){.has-footer .interface-interface-skeleton__body{padding-bottom:25px}}.interface-interface-skeleton__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;z-index:20}@media (min-width:782px){.interface-interface-skeleton__content{z-index:auto}}.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{background:#fff;bottom:0;color:#1e1e1e;flex-shrink:0;left:0;position:absolute;right:0;top:0;z-index:100000}@media (min-width:782px){.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{position:relative!important;width:auto}.is-sidebar-opened .interface-interface-skeleton__secondary-sidebar,.is-sidebar-opened .interface-interface-skeleton__sidebar{z-index:90}}.interface-interface-skeleton__sidebar{overflow:auto}@media (min-width:782px){.interface-interface-skeleton__sidebar{border-right:1px solid #e0e0e0}.interface-interface-skeleton__secondary-sidebar{border-left:1px solid #e0e0e0}}.interface-interface-skeleton__header{border-bottom:1px solid #e0e0e0;color:#1e1e1e;flex-shrink:0;height:auto;z-index:30}.interface-interface-skeleton__footer{background-color:#fff;border-top:1px solid #e0e0e0;bottom:0;color:#1e1e1e;display:none;flex-shrink:0;height:auto;position:absolute;right:0;width:100%;z-index:90}@media (min-width:782px){.interface-interface-skeleton__footer{display:flex}}.interface-interface-skeleton__footer .block-editor-block-breadcrumb{align-items:center;background:#fff;display:flex;font-size:13px;height:24px;padding:0 18px;z-index:30}.interface-interface-skeleton__actions{background:#fff;bottom:auto;color:#1e1e1e;left:0;position:fixed!important;right:auto;top:-9999em;width:100vw;z-index:100000}@media (min-width:782px){.interface-interface-skeleton__actions{width:280px}}.interface-interface-skeleton__actions:focus,.interface-interface-skeleton__actions:focus-within{bottom:0;top:auto}.is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{top:46px}@media (min-width:782px){.is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{border-right:1px solid #ddd;top:32px}.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{top:0}}.interface-more-menu-dropdown{margin-right:-4px}.interface-more-menu-dropdown .components-button{padding:0 2px;width:auto}@media (min-width:600px){.interface-more-menu-dropdown{margin-right:0}.interface-more-menu-dropdown .components-button{padding:0 4px}}.interface-more-menu-dropdown__content .components-popover__content{min-width:300px}@media (min-width:480px){.interface-more-menu-dropdown__content .components-popover__content{max-width:480px}}.interface-more-menu-dropdown__content .components-popover__content .components-dropdown-menu__menu{padding:0}.components-popover.interface-more-menu-dropdown__content{z-index:99998}.interface-pinned-items{display:flex;gap:8px}.interface-pinned-items .components-button{display:none;margin:0}.interface-pinned-items .components-button[aria-controls="edit-post:block"],.interface-pinned-items .components-button[aria-controls="edit-post:document"],.interface-pinned-items .components-button[aria-controls="edit-site:block-inspector"],.interface-pinned-items .components-button[aria-controls="edit-site:global-styles"],.interface-pinned-items .components-button[aria-controls="edit-site:template"]{display:flex}.interface-pinned-items .components-button svg{max-height:24px;max-width:24px}@media (min-width:600px){.interface-pinned-items .components-button{display:flex}}.edit-post-header{align-items:center;background:#fff;display:flex;flex-wrap:wrap;height:60px;justify-content:space-between;max-width:100vw}@media (min-width:280px){.edit-post-header{flex-wrap:nowrap}}.edit-post-header__toolbar{align-items:center;display:flex;flex-grow:3;flex-shrink:8;overflow:hidden;padding:2px 0}.edit-post-header__toolbar .table-of-contents{display:none}@media (min-width:600px){.edit-post-header__toolbar .table-of-contents{display:block}}.edit-post-header__toolbar .selected-block-tools-wrapper{align-items:center;display:flex;height:60px;overflow:hidden}.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-contextual-toolbar{border-bottom:0;height:100%}.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-toolbar{height:100%;padding-top:15px}.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-toolbar .components-button:not(.block-editor-block-mover-button){height:32px}.edit-post-header__toolbar .selected-block-tools-wrapper:after{background-color:#ddd;content:"";height:24px;margin-right:8px;width:1px}.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar,.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar-group{border-left:none}.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar-group:after,.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar:after{background-color:#ddd;content:"";height:24px;margin-right:8px;margin-top:4px;width:1px}.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar .components-toolbar-group.components-toolbar-group:after,.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar-group .components-toolbar-group.components-toolbar-group:after{display:none}.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-mover.is-horizontal .block-editor-block-mover-button{height:32px;overflow:visible}@media (min-width:600px){.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container{position:relative;top:-10px}}.edit-post-header__toolbar .selected-block-tools-wrapper.is-collapsed{display:none}.edit-post-header__block-tools-toggle{margin-right:2px}.edit-post-header__center{display:flex;flex-grow:1;justify-content:center}.edit-post-header__center.is-collapsed{display:none}.edit-post-header__settings{align-items:center;display:inline-flex;flex-wrap:nowrap;gap:8px;padding-left:4px}@media (min-width:600px){.edit-post-header__settings{padding-left:8px}}.edit-post-header__dropdown .components-button.has-icon,.show-icon-labels .edit-post-header .components-button.has-icon,.show-icon-labels.interface-pinned-items .components-button.has-icon{width:auto}.edit-post-header__dropdown .components-button.has-icon svg,.show-icon-labels .edit-post-header .components-button.has-icon svg,.show-icon-labels.interface-pinned-items .components-button.has-icon svg{display:none}.edit-post-header__dropdown .components-button.has-icon:after,.show-icon-labels .edit-post-header .components-button.has-icon:after,.show-icon-labels.interface-pinned-items .components-button.has-icon:after{content:attr(aria-label)}.edit-post-header__dropdown .components-button.has-icon[aria-disabled=true],.show-icon-labels .edit-post-header .components-button.has-icon[aria-disabled=true],.show-icon-labels.interface-pinned-items .components-button.has-icon[aria-disabled=true]{background-color:initial}.edit-post-header__dropdown .is-tertiary:active,.show-icon-labels .edit-post-header .is-tertiary:active,.show-icon-labels.interface-pinned-items .is-tertiary:active{background-color:initial;box-shadow:0 0 0 1.5px var(--wp-admin-theme-color)}.edit-post-header__dropdown .components-button.has-icon.button-toggle svg,.edit-post-header__dropdown .edit-post-fullscreen-mode-close.has-icon svg,.show-icon-labels .edit-post-header .components-button.has-icon.button-toggle svg,.show-icon-labels .edit-post-header .edit-post-fullscreen-mode-close.has-icon svg,.show-icon-labels.interface-pinned-items .components-button.has-icon.button-toggle svg,.show-icon-labels.interface-pinned-items .edit-post-fullscreen-mode-close.has-icon svg{display:block}.edit-post-header__dropdown .components-button.has-icon.button-toggle:after,.edit-post-header__dropdown .edit-post-fullscreen-mode-close.has-icon:after,.show-icon-labels .edit-post-header .components-button.has-icon.button-toggle:after,.show-icon-labels .edit-post-header .edit-post-fullscreen-mode-close.has-icon:after,.show-icon-labels.interface-pinned-items .components-button.has-icon.button-toggle:after,.show-icon-labels.interface-pinned-items .edit-post-fullscreen-mode-close.has-icon:after{content:none}.edit-post-header__dropdown .edit-post-fullscreen-mode-close.has-icon,.show-icon-labels .edit-post-header .edit-post-fullscreen-mode-close.has-icon,.show-icon-labels.interface-pinned-items .edit-post-fullscreen-mode-close.has-icon{width:60px}.edit-post-header__dropdown .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon,.show-icon-labels .edit-post-header .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon,.show-icon-labels.interface-pinned-items .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon{display:block}.edit-post-header__dropdown .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.edit-post-header__dropdown .interface-pinned-items .components-button,.show-icon-labels .edit-post-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels .edit-post-header .interface-pinned-items .components-button,.show-icon-labels.interface-pinned-items .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button{padding-left:8px;padding-right:8px}@media (min-width:600px){.edit-post-header__dropdown .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.edit-post-header__dropdown .interface-pinned-items .components-button,.show-icon-labels .edit-post-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels .edit-post-header .interface-pinned-items .components-button,.show-icon-labels.interface-pinned-items .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button{padding-left:12px;padding-right:12px}}.edit-post-header__dropdown .editor-post-save-draft.editor-post-save-draft:after,.edit-post-header__dropdown .editor-post-saved-state.editor-post-saved-state:after,.show-icon-labels .edit-post-header .editor-post-save-draft.editor-post-save-draft:after,.show-icon-labels .edit-post-header .editor-post-saved-state.editor-post-saved-state:after,.show-icon-labels.interface-pinned-items .editor-post-save-draft.editor-post-save-draft:after,.show-icon-labels.interface-pinned-items .editor-post-saved-state.editor-post-saved-state:after{content:none}.show-icon-labels .edit-post-header__toolbar .block-editor-block-mover{border-right:none}.show-icon-labels .edit-post-header__toolbar .block-editor-block-mover:before{background-color:#ddd;content:"";height:24px;margin-right:8px;margin-top:4px;width:1px}.show-icon-labels .edit-post-header__toolbar .block-editor-block-mover .block-editor-block-mover__move-button-container:before{background:#ddd;right:calc(50% + 1px);width:calc(100% - 24px)}.edit-post-header__dropdown .components-button.block-editor-list-view,.edit-post-header__dropdown .components-button.editor-history__redo,.edit-post-header__dropdown .components-button.editor-history__undo,.edit-post-header__dropdown .components-menu-item__button.components-menu-item__button,.edit-post-header__dropdown .table-of-contents .components-button{justify-content:flex-start;margin:0;padding:6px 40px 6px 6px;text-align:right;width:14.625rem}.show-icon-labels.interface-pinned-items{border-bottom:1px solid #ccc;display:block;margin:0 -12px;padding:6px 12px 12px}.show-icon-labels.interface-pinned-items>.components-button.has-icon{justify-content:flex-start;margin:0;padding:6px 8px 6px 6px;width:14.625rem}.show-icon-labels.interface-pinned-items>.components-button.has-icon[aria-expanded=true] svg{display:block;max-width:24px}.show-icon-labels.interface-pinned-items>.components-button.has-icon[aria-expanded=false]{padding-right:40px}.show-icon-labels.interface-pinned-items>.components-button.has-icon svg{margin-left:8px}@media (min-width:600px){.edit-post-header__post-preview-button{display:none}}.is-distraction-free .interface-interface-skeleton__header{border-bottom:none}.is-distraction-free .edit-post-header{-webkit-backdrop-filter:blur(20px)!important;backdrop-filter:blur(20px)!important;background-color:#ffffffe6;border-bottom:1px solid #e0e0e0;position:absolute;width:100%}.is-distraction-free .edit-post-header>.edit-post-header__settings>.edit-post-header__post-preview-button{visibility:hidden}.is-distraction-free .edit-post-header>.edit-post-header__settings>.editor-preview-dropdown,.is-distraction-free .edit-post-header>.edit-post-header__settings>.interface-pinned-items,.is-distraction-free .edit-post-header>.edit-post-header__toolbar .editor-document-tools__document-overview-toggle,.is-distraction-free .edit-post-header>.edit-post-header__toolbar .editor-document-tools__inserter-toggle{display:none}.is-distraction-free .interface-interface-skeleton__header:focus-within{opacity:1!important}.is-distraction-free .interface-interface-skeleton__header:focus-within div{transform:translateX(0) translateZ(0)!important}.is-distraction-free .components-editor-notices__dismissible{position:absolute;z-index:35}.edit-post-fullscreen-mode-close.components-button{display:none}@media (min-width:782px){.edit-post-fullscreen-mode-close.components-button{align-items:center;align-self:stretch;background:#1e1e1e;border:none;border-radius:0;color:#fff;display:flex;height:61px;margin-bottom:-1px;position:relative;width:60px}.edit-post-fullscreen-mode-close.components-button:active{color:#fff}.edit-post-fullscreen-mode-close.components-button:focus{box-shadow:none}.edit-post-fullscreen-mode-close.components-button:before{border-radius:4px;bottom:10px;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) #1e1e1e;content:"";display:block;left:9px;position:absolute;right:9px;top:9px;transition:box-shadow .1s ease}}@media (min-width:782px) and (prefers-reduced-motion:reduce){.edit-post-fullscreen-mode-close.components-button:before{transition-delay:0s;transition-duration:0s}}@media (min-width:782px){.edit-post-fullscreen-mode-close.components-button:hover:before{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) #757575}.edit-post-fullscreen-mode-close.components-button.has-icon:hover:before{box-shadow:none}.edit-post-fullscreen-mode-close.components-button:focus:before{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) #ffffff1a,inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}}.edit-post-fullscreen-mode-close.components-button .edit-post-fullscreen-mode-close_site-icon{border-radius:2px;height:36px;margin-top:-1px;object-fit:cover;width:36px}.edit-post-keyboard-shortcut-help-modal__section{margin:0 0 2rem}.edit-post-keyboard-shortcut-help-modal__section-title{font-size:.9rem;font-weight:600}.edit-post-keyboard-shortcut-help-modal__shortcut{align-items:baseline;border-top:1px solid #ddd;display:flex;margin-bottom:0;padding:.6rem 0}.edit-post-keyboard-shortcut-help-modal__shortcut:last-child{border-bottom:1px solid #ddd}.edit-post-keyboard-shortcut-help-modal__shortcut:empty{display:none}.edit-post-keyboard-shortcut-help-modal__shortcut-term{font-weight:600;margin:0 1rem 0 0;text-align:left}.edit-post-keyboard-shortcut-help-modal__shortcut-description{flex:1;flex-basis:auto;margin:0}.edit-post-keyboard-shortcut-help-modal__shortcut-key-combination{background:none;display:block;margin:0;padding:0}.edit-post-keyboard-shortcut-help-modal__shortcut-key-combination+.edit-post-keyboard-shortcut-help-modal__shortcut-key-combination{margin-top:10px}.edit-post-keyboard-shortcut-help-modal__shortcut-key{border-radius:8%;margin:0 .2rem;padding:.25rem .5rem}.edit-post-keyboard-shortcut-help-modal__shortcut-key:last-child{margin:0 .2rem 0 0}.edit-post-layout__metaboxes{clear:both;flex-shrink:0}.edit-post-layout .components-editor-notices__snackbar{bottom:40px;left:0;padding-left:16px;padding-right:16px;position:fixed}.is-distraction-free .components-editor-notices__snackbar{bottom:20px}.edit-post-layout .components-editor-notices__snackbar{right:0}@media (min-width:783px){.edit-post-layout .components-editor-notices__snackbar{right:160px}}@media (min-width:783px){.auto-fold .edit-post-layout .components-editor-notices__snackbar{right:36px}}@media (min-width:961px){.auto-fold .edit-post-layout .components-editor-notices__snackbar{right:160px}}.folded .edit-post-layout .components-editor-notices__snackbar{right:0}@media (min-width:783px){.folded .edit-post-layout .components-editor-notices__snackbar{right:36px}}body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar{right:0!important}.edit-post-layout .editor-post-publish-panel{bottom:0;left:0;overflow:auto;position:fixed;right:0;top:46px;z-index:100001}@media (min-width:782px){.edit-post-layout .editor-post-publish-panel{animation:edit-post-post-publish-panel__slide-in-animation .1s forwards;border-right:1px solid #ddd;right:auto;top:32px;transform:translateX(-100%);width:281px;z-index:99998}}@media (min-width:782px) and (prefers-reduced-motion:reduce){.edit-post-layout .editor-post-publish-panel{animation-delay:0s;animation-duration:1ms}}@media (min-width:782px){body.is-fullscreen-mode .edit-post-layout .editor-post-publish-panel{top:0}[role=region]:focus .edit-post-layout .editor-post-publish-panel{transform:translateX(0)}}@keyframes edit-post-post-publish-panel__slide-in-animation{to{transform:translateX(0)}}.edit-post-layout .editor-post-publish-panel__header-publish-button{justify-content:center}.edit-post-layout__toggle-entities-saved-states-panel,.edit-post-layout__toggle-publish-panel,.edit-post-layout__toggle-sidebar-panel{background-color:#fff;border:1px dotted #ddd;bottom:auto;box-sizing:border-box;display:flex;height:auto!important;justify-content:center;left:0;padding:24px;position:fixed!important;right:auto;top:-9999em;width:280px;z-index:100000}.interface-interface-skeleton__actions:focus .edit-post-layout__toggle-entities-saved-states-panel,.interface-interface-skeleton__actions:focus .edit-post-layout__toggle-publish-panel,.interface-interface-skeleton__actions:focus-within .edit-post-layout__toggle-entities-saved-states-panel,.interface-interface-skeleton__actions:focus-within .edit-post-layout__toggle-publish-panel,.interface-interface-skeleton__sidebar:focus .edit-post-layout__toggle-sidebar-panel,.interface-interface-skeleton__sidebar:focus-within .edit-post-layout__toggle-sidebar-panel{bottom:0;top:auto}.edit-post-layout .entities-saved-states__panel-header{height:61px}.edit-post-meta-boxes-area{position:relative}.edit-post-meta-boxes-area .inside,.edit-post-meta-boxes-area__container{box-sizing:initial}.edit-post-meta-boxes-area input,.edit-post-meta-boxes-area textarea{box-sizing:border-box}.edit-post-meta-boxes-area .postbox-header{border-bottom:0;border-top:1px solid #ddd}.edit-post-meta-boxes-area #poststuff{margin:0 auto;min-width:auto;padding-top:0}.edit-post-meta-boxes-area #poststuff .stuffbox>h3,.edit-post-meta-boxes-area #poststuff h2.hndle,.edit-post-meta-boxes-area #poststuff h3.hndle{box-sizing:border-box;color:inherit;font-weight:600;outline:none;padding:0 24px;position:relative;width:100%}.edit-post-meta-boxes-area .postbox{border:0;color:inherit;margin-bottom:0}.edit-post-meta-boxes-area .postbox>.inside{color:inherit;margin:0;padding:0 24px 24px}.edit-post-meta-boxes-area .postbox .handlediv{height:44px;width:44px}.edit-post-meta-boxes-area.is-loading:before{background:#0000;bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:1}.edit-post-meta-boxes-area .components-spinner{left:20px;position:absolute;top:10px;z-index:5}.edit-post-meta-boxes-area .is-hidden{display:none}.edit-post-meta-boxes-area .metabox-location-side .postbox input[type=checkbox]{border:1px solid #757575}.edit-post-meta-boxes-area .metabox-location-side .postbox input[type=checkbox]:checked{background:#fff;border-color:#757575}.edit-post-meta-boxes-area .metabox-location-side .postbox input[type=checkbox]:before{margin:-3px -4px}.edit-post-meta-boxes-area__clear{clear:both}.components-panel__header.edit-post-sidebar__panel-tabs{padding-left:16px;padding-right:0}.components-panel__header.edit-post-sidebar__panel-tabs .components-button.has-icon{height:24px;min-width:24px;padding:0}@media (min-width:782px){.components-panel__header.edit-post-sidebar__panel-tabs .components-button.has-icon{display:flex}}.edit-post-sidebar__panel{margin-top:-1px}.edit-post-post-format,.edit-post-post-slug{align-items:stretch;display:flex;flex-direction:column}.edit-post-post-visibility__dialog .editor-post-visibility{margin:8px;min-width:248px}h2.edit-post-template-summary__title{font-weight:500;line-height:24px;margin:0 0 4px}.edit-post-text-editor{background-color:#fff;flex-grow:1;position:relative;width:100%}.edit-post-text-editor .editor-post-title.is-raw-text textarea,.edit-post-text-editor .editor-post-title:not(.is-raw-text){border:1px solid #949494;border-radius:0;font-family:Menlo,Consolas,monaco,monospace;font-size:2.5em;font-weight:400;line-height:1.4;max-width:none;padding:16px}@media (min-width:600px){.edit-post-text-editor .editor-post-title.is-raw-text textarea,.edit-post-text-editor .editor-post-title:not(.is-raw-text){padding:24px}}.edit-post-text-editor .editor-post-title.is-raw-text textarea:focus,.edit-post-text-editor .editor-post-title:not(.is-raw-text):focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.edit-post-text-editor__body{margin-left:auto;margin-right:auto;max-width:1080px;padding:0 12px 12px;width:100%}@media (min-width:960px){.edit-post-text-editor__body{padding:0 24px 24px}}.edit-post-text-editor__toolbar{background:#fffc;display:flex;left:0;padding:4px 12px;position:sticky;right:0;top:0;z-index:1}@media (min-width:600px){.edit-post-text-editor__toolbar{padding:12px}}@media (min-width:960px){.edit-post-text-editor__toolbar{padding:12px 24px}}.edit-post-text-editor__toolbar h2{color:#1e1e1e;font-size:13px;line-height:36px;margin:0 0 0 auto}.edit-post-visual-editor{background-color:#ddd;display:flex;flex:1 0 auto;flex-flow:column;position:relative}.edit-post-visual-editor:not(.has-inline-canvas){overflow:hidden}.edit-post-visual-editor .components-button{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;padding:6px 12px}.edit-post-visual-editor .components-button.has-icon{padding:6px}.edit-post-visual-editor__content-area{box-sizing:border-box;display:flex;flex-grow:1;height:100%;position:relative;width:100%}.edit-post-welcome-guide,.edit-template-welcome-guide{width:312px}.edit-post-welcome-guide__image,.edit-template-welcome-guide__image{background:#00a0d2;margin:0 0 16px}.edit-post-welcome-guide__image>img,.edit-template-welcome-guide__image>img{display:block;max-width:100%;object-fit:cover}.edit-post-welcome-guide__heading,.edit-template-welcome-guide__heading{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:24px;line-height:1.4;margin:16px 0;padding:0 32px}.edit-post-welcome-guide__text,.edit-template-welcome-guide__text{font-size:13px;line-height:1.4;margin:0 0 24px;padding:0 32px}.edit-post-welcome-guide__inserter-icon,.edit-template-welcome-guide__inserter-icon{margin:0 4px;vertical-align:text-top}.edit-template-welcome-guide .components-button svg{fill:#fff}.edit-post-start-page-options__modal-content .block-editor-block-patterns-list{column-count:2;column-gap:24px}@media (min-width:782px){.edit-post-start-page-options__modal-content .block-editor-block-patterns-list{column-count:3}}@media (min-width:1280px){.edit-post-start-page-options__modal-content .block-editor-block-patterns-list{column-count:4}}.edit-post-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{break-inside:avoid-column;margin-bottom:24px}.edit-post-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-preview__container{min-height:100px}.edit-post-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-preview__content{width:100%}@keyframes edit-post__fade-in-animation{0%{opacity:0}to{opacity:1}}body.js.block-editor-page{background:#fff}body.js.block-editor-page #wpcontent{padding-right:0}body.js.block-editor-page #wpbody-content{padding-bottom:0}body.js.block-editor-page #wpbody-content>div:not(.block-editor):not(#screen-meta),body.js.block-editor-page #wpfooter{display:none}body.js.block-editor-page .a11y-speak-region{right:-1px;top:-1px}body.js.block-editor-page ul#adminmenu a.wp-has-current-submenu:after,body.js.block-editor-page ul#adminmenu>li.current>a.current:after{border-left-color:#fff}body.js.block-editor-page .media-frame select.attachment-filters:last-of-type{max-width:100%;width:auto}.block-editor-page #wpwrap{overflow-y:auto}@media (min-width:782px){.block-editor-page #wpwrap{overflow-y:initial}}.components-modal__frame,.edit-post-header,.edit-post-sidebar,.edit-post-text-editor,.editor-post-publish-panel{box-sizing:border-box}.components-modal__frame *,.components-modal__frame :after,.components-modal__frame :before,.edit-post-header *,.edit-post-header :after,.edit-post-header :before,.edit-post-sidebar *,.edit-post-sidebar :after,.edit-post-sidebar :before,.edit-post-text-editor *,.edit-post-text-editor :after,.edit-post-text-editor :before,.editor-post-publish-panel *,.editor-post-publish-panel :after,.editor-post-publish-panel :before{box-sizing:inherit}@media (min-width:600px){.block-editor__container{bottom:0;left:0;min-height:calc(100vh - 46px);position:absolute;right:0;top:0}}@media (min-width:782px){.block-editor__container{min-height:calc(100vh - 32px)}body.is-fullscreen-mode .block-editor__container{min-height:100vh}}.block-editor__container img{height:auto;max-width:100%}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color--rgb:0,133,186;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-10--rgb:0,115,161;--wp-admin-theme-color-darker-20:#006187;--wp-admin-theme-color-darker-20--rgb:0,97,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-light{--wp-admin-border-width-focus:1.5px}}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color--rgb:56,88,233;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-10--rgb:33,69,230;--wp-admin-theme-color-darker-20:#183ad6;--wp-admin-theme-color-darker-20--rgb:24,58,214;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-modern{--wp-admin-border-width-focus:1.5px}}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color--rgb:9,100,132;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-10--rgb:7,82,108;--wp-admin-theme-color-darker-20:#064054;--wp-admin-theme-color-darker-20--rgb:6,64,84;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-blue{--wp-admin-border-width-focus:1.5px}}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color--rgb:70,64,60;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-10--rgb:56,51,48;--wp-admin-theme-color-darker-20:#2b2724;--wp-admin-theme-color-darker-20--rgb:43,39,36;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-coffee{--wp-admin-border-width-focus:1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color--rgb:82,63,109;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-10--rgb:70,54,93;--wp-admin-theme-color-darker-20:#3a2c4d;--wp-admin-theme-color-darker-20--rgb:58,44,77;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus:1.5px}}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color--rgb:225,77,67;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-10--rgb:221,56,45;--wp-admin-theme-color-darker-20:#d02c21;--wp-admin-theme-color-darker-20--rgb:208,44,33;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-midnight{--wp-admin-border-width-focus:1.5px}}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color--rgb:98,124,131;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-10--rgb:87,110,116;--wp-admin-theme-color-darker-20:#4c6066;--wp-admin-theme-color-darker-20--rgb:76,96,102;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-ocean{--wp-admin-border-width-focus:1.5px}}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color--rgb:221,130,59;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-10--rgb:217,116,38;--wp-admin-theme-color-darker-20:#c36922;--wp-admin-theme-color-darker-20--rgb:195,105,34;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus:1.5px}}.interface-interface-skeleton__sidebar{border-right:none}@media (min-width:782px){.is-sidebar-opened .interface-interface-skeleton__sidebar{border-right:1px solid #e0e0e0;overflow:hidden scroll}} \ No newline at end of file
+:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,161;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px;--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:#9747ff}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.components-panel__header.interface-complementary-area-header__small{background:#fff;padding-left:4px}.components-panel__header.interface-complementary-area-header__small .interface-complementary-area-header__small-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}@media (min-width:782px){.components-panel__header.interface-complementary-area-header__small{display:none}}.interface-complementary-area-header{background:#fff;padding-left:4px}.interface-complementary-area-header .components-button.has-icon{display:none;margin-right:auto}.interface-complementary-area-header .components-button.has-icon~.components-button{margin-right:0}@media (min-width:782px){.interface-complementary-area-header .components-button.has-icon{display:flex}.components-panel__header+.interface-complementary-area-header{margin-top:0}}.interface-complementary-area{background:#fff;color:#1e1e1e}@media (min-width:600px){.interface-complementary-area{-webkit-overflow-scrolling:touch}}@media (min-width:782px){.interface-complementary-area{width:280px}}.interface-complementary-area .components-panel{border:none;position:relative;z-index:0}.interface-complementary-area .components-panel__header{position:sticky;top:0;z-index:1}.interface-complementary-area .components-panel__header.edit-post-sidebar__panel-tabs{top:48px}@media (min-width:782px){.interface-complementary-area .components-panel__header.edit-post-sidebar__panel-tabs{top:0}}.interface-complementary-area p:not(.components-base-control__help){margin-top:0}.interface-complementary-area h2{color:#1e1e1e;font-size:13px;margin-bottom:1.5em}.interface-complementary-area h3{color:#1e1e1e;font-size:11px;font-weight:500;margin-bottom:1.5em;text-transform:uppercase}.interface-complementary-area hr{border-bottom:1px solid #f0f0f0;border-top:none;margin:1.5em 0}.interface-complementary-area div.components-toolbar,.interface-complementary-area div.components-toolbar-group{box-shadow:none;margin-bottom:1.5em}.interface-complementary-area div.components-toolbar-group:last-child,.interface-complementary-area div.components-toolbar:last-child{margin-bottom:0}.interface-complementary-area .block-editor-skip-to-selected-block:focus{bottom:10px;left:10px;right:auto;top:auto}@media (min-width:782px){body.js.is-fullscreen-mode{height:calc(100% + 32px);margin-top:-32px}body.js.is-fullscreen-mode #adminmenumain,body.js.is-fullscreen-mode #wpadminbar{display:none}body.js.is-fullscreen-mode #wpcontent,body.js.is-fullscreen-mode #wpfooter{margin-right:0}}html.interface-interface-skeleton__html-container{position:fixed;width:100%}@media (min-width:782px){html.interface-interface-skeleton__html-container{position:static;width:auto}}.interface-interface-skeleton{bottom:0;display:flex;flex-direction:row;height:auto;left:0;max-height:100%;position:fixed;top:46px}@media (min-width:783px){.interface-interface-skeleton{top:32px}.is-fullscreen-mode .interface-interface-skeleton{top:0}}.interface-interface-skeleton__editor{display:flex;flex:0 1 100%;flex-direction:column;overflow:hidden}.interface-interface-skeleton{right:0}@media (min-width:783px){.interface-interface-skeleton{right:160px}}@media (min-width:783px){.auto-fold .interface-interface-skeleton{right:36px}}@media (min-width:961px){.auto-fold .interface-interface-skeleton{right:160px}}.folded .interface-interface-skeleton{right:0}@media (min-width:783px){.folded .interface-interface-skeleton{right:36px}}body.is-fullscreen-mode .interface-interface-skeleton{right:0!important}.interface-interface-skeleton__body{display:flex;flex-grow:1;overflow:auto;overscroll-behavior-y:none}@media (min-width:782px){.has-footer .interface-interface-skeleton__body{padding-bottom:25px}}.interface-interface-skeleton__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;z-index:20}@media (min-width:782px){.interface-interface-skeleton__content{z-index:auto}}.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{background:#fff;bottom:0;color:#1e1e1e;flex-shrink:0;left:0;position:absolute;right:0;top:0;z-index:100000}@media (min-width:782px){.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{position:relative!important;width:auto}.is-sidebar-opened .interface-interface-skeleton__secondary-sidebar,.is-sidebar-opened .interface-interface-skeleton__sidebar{z-index:90}}.interface-interface-skeleton__sidebar{overflow:auto}@media (min-width:782px){.interface-interface-skeleton__sidebar{border-right:1px solid #e0e0e0}.interface-interface-skeleton__secondary-sidebar{border-left:1px solid #e0e0e0}}.interface-interface-skeleton__header{border-bottom:1px solid #e0e0e0;color:#1e1e1e;flex-shrink:0;height:auto;z-index:30}.interface-interface-skeleton__footer{background-color:#fff;border-top:1px solid #e0e0e0;bottom:0;color:#1e1e1e;display:none;flex-shrink:0;height:auto;position:absolute;right:0;width:100%;z-index:90}@media (min-width:782px){.interface-interface-skeleton__footer{display:flex}}.interface-interface-skeleton__footer .block-editor-block-breadcrumb{align-items:center;background:#fff;display:flex;font-size:13px;height:24px;padding:0 18px;z-index:30}.interface-interface-skeleton__actions{background:#fff;bottom:auto;color:#1e1e1e;left:0;position:fixed!important;right:auto;top:-9999em;width:100vw;z-index:100000}@media (min-width:782px){.interface-interface-skeleton__actions{width:280px}}.interface-interface-skeleton__actions:focus,.interface-interface-skeleton__actions:focus-within{bottom:0;top:auto}.is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{top:46px}@media (min-width:782px){.is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{border-right:1px solid #ddd;top:32px}.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{top:0}}.interface-more-menu-dropdown{margin-right:-4px}.interface-more-menu-dropdown .components-button{padding:0 2px;width:auto}@media (min-width:600px){.interface-more-menu-dropdown{margin-right:0}.interface-more-menu-dropdown .components-button{padding:0 4px}}.interface-more-menu-dropdown__content .components-popover__content{min-width:300px}@media (min-width:480px){.interface-more-menu-dropdown__content .components-popover__content{max-width:480px}}.interface-more-menu-dropdown__content .components-popover__content .components-dropdown-menu__menu{padding:0}.components-popover.interface-more-menu-dropdown__content{z-index:99998}.interface-pinned-items{display:flex;gap:8px}.interface-pinned-items .components-button{display:none;margin:0}.interface-pinned-items .components-button[aria-controls="edit-post:block"],.interface-pinned-items .components-button[aria-controls="edit-post:document"],.interface-pinned-items .components-button[aria-controls="edit-site:block-inspector"],.interface-pinned-items .components-button[aria-controls="edit-site:global-styles"],.interface-pinned-items .components-button[aria-controls="edit-site:template"]{display:flex}.interface-pinned-items .components-button svg{max-height:24px;max-width:24px}@media (min-width:600px){.interface-pinned-items .components-button{display:flex}}.edit-post-header{align-items:center;background:#fff;display:flex;flex-wrap:wrap;height:60px;justify-content:space-between;max-width:100vw}@media (min-width:280px){.edit-post-header{flex-wrap:nowrap}}.edit-post-header__toolbar{align-items:center;display:flex;flex-grow:3;flex-shrink:8;overflow:hidden;padding:2px 0}.edit-post-header__toolbar .table-of-contents{display:none}@media (min-width:600px){.edit-post-header__toolbar .table-of-contents{display:block}}.edit-post-header__toolbar .selected-block-tools-wrapper{align-items:center;display:flex;height:60px;overflow:hidden}.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-contextual-toolbar{border-bottom:0;height:100%}.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-toolbar{height:100%;padding-top:15px}.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-toolbar .components-button:not(.block-editor-block-mover-button){height:32px}.edit-post-header__toolbar .selected-block-tools-wrapper:after{background-color:#ddd;content:"";height:24px;margin-right:8px;width:1px}.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar,.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar-group{border-left:none}.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar-group:after,.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar:after{background-color:#ddd;content:"";height:24px;margin-right:8px;margin-top:4px;width:1px}.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar .components-toolbar-group.components-toolbar-group:after,.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar-group .components-toolbar-group.components-toolbar-group:after{display:none}.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-mover.is-horizontal .block-editor-block-mover-button{height:32px;overflow:visible}@media (min-width:600px){.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container{position:relative;top:-10px}}.edit-post-header__toolbar .selected-block-tools-wrapper.is-collapsed{display:none}.edit-post-header__block-tools-toggle{margin-right:2px}.edit-post-header__center{display:flex;flex-grow:1;justify-content:center}.edit-post-header__center.is-collapsed{display:none}.edit-post-header__settings{align-items:center;display:inline-flex;flex-wrap:nowrap;gap:8px;padding-left:4px}@media (min-width:600px){.edit-post-header__settings{padding-left:8px}}.edit-post-header__dropdown .components-button.has-icon,.show-icon-labels .edit-post-header .components-button.has-icon,.show-icon-labels.interface-pinned-items .components-button.has-icon{width:auto}.edit-post-header__dropdown .components-button.has-icon svg,.show-icon-labels .edit-post-header .components-button.has-icon svg,.show-icon-labels.interface-pinned-items .components-button.has-icon svg{display:none}.edit-post-header__dropdown .components-button.has-icon:after,.show-icon-labels .edit-post-header .components-button.has-icon:after,.show-icon-labels.interface-pinned-items .components-button.has-icon:after{content:attr(aria-label)}.edit-post-header__dropdown .components-button.has-icon[aria-disabled=true],.show-icon-labels .edit-post-header .components-button.has-icon[aria-disabled=true],.show-icon-labels.interface-pinned-items .components-button.has-icon[aria-disabled=true]{background-color:initial}.edit-post-header__dropdown .is-tertiary:active,.show-icon-labels .edit-post-header .is-tertiary:active,.show-icon-labels.interface-pinned-items .is-tertiary:active{background-color:initial;box-shadow:0 0 0 1.5px var(--wp-admin-theme-color)}.edit-post-header__dropdown .components-button.has-icon.button-toggle svg,.edit-post-header__dropdown .edit-post-fullscreen-mode-close.has-icon svg,.show-icon-labels .edit-post-header .components-button.has-icon.button-toggle svg,.show-icon-labels .edit-post-header .edit-post-fullscreen-mode-close.has-icon svg,.show-icon-labels.interface-pinned-items .components-button.has-icon.button-toggle svg,.show-icon-labels.interface-pinned-items .edit-post-fullscreen-mode-close.has-icon svg{display:block}.edit-post-header__dropdown .components-button.has-icon.button-toggle:after,.edit-post-header__dropdown .edit-post-fullscreen-mode-close.has-icon:after,.show-icon-labels .edit-post-header .components-button.has-icon.button-toggle:after,.show-icon-labels .edit-post-header .edit-post-fullscreen-mode-close.has-icon:after,.show-icon-labels.interface-pinned-items .components-button.has-icon.button-toggle:after,.show-icon-labels.interface-pinned-items .edit-post-fullscreen-mode-close.has-icon:after{content:none}.edit-post-header__dropdown .edit-post-fullscreen-mode-close.has-icon,.show-icon-labels .edit-post-header .edit-post-fullscreen-mode-close.has-icon,.show-icon-labels.interface-pinned-items .edit-post-fullscreen-mode-close.has-icon{width:60px}.edit-post-header__dropdown .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon,.show-icon-labels .edit-post-header .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon,.show-icon-labels.interface-pinned-items .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon{display:block}.edit-post-header__dropdown .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.edit-post-header__dropdown .interface-pinned-items .components-button,.show-icon-labels .edit-post-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels .edit-post-header .interface-pinned-items .components-button,.show-icon-labels.interface-pinned-items .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button{padding-left:8px;padding-right:8px}@media (min-width:600px){.edit-post-header__dropdown .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.edit-post-header__dropdown .interface-pinned-items .components-button,.show-icon-labels .edit-post-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels .edit-post-header .interface-pinned-items .components-button,.show-icon-labels.interface-pinned-items .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button{padding-left:12px;padding-right:12px}}.edit-post-header__dropdown .editor-post-save-draft.editor-post-save-draft:after,.edit-post-header__dropdown .editor-post-saved-state.editor-post-saved-state:after,.show-icon-labels .edit-post-header .editor-post-save-draft.editor-post-save-draft:after,.show-icon-labels .edit-post-header .editor-post-saved-state.editor-post-saved-state:after,.show-icon-labels.interface-pinned-items .editor-post-save-draft.editor-post-save-draft:after,.show-icon-labels.interface-pinned-items .editor-post-saved-state.editor-post-saved-state:after{content:none}.show-icon-labels .edit-post-header__toolbar .block-editor-block-mover{border-right:none}.show-icon-labels .edit-post-header__toolbar .block-editor-block-mover:before{background-color:#ddd;content:"";height:24px;margin-right:8px;margin-top:4px;width:1px}.show-icon-labels .edit-post-header__toolbar .block-editor-block-mover .block-editor-block-mover__move-button-container:before{background:#ddd;right:calc(50% + 1px);width:calc(100% - 24px)}.edit-post-header__dropdown .components-button.block-editor-list-view,.edit-post-header__dropdown .components-button.editor-history__redo,.edit-post-header__dropdown .components-button.editor-history__undo,.edit-post-header__dropdown .components-menu-item__button.components-menu-item__button,.edit-post-header__dropdown .table-of-contents .components-button{justify-content:flex-start;margin:0;padding:6px 40px 6px 6px;text-align:right;width:14.625rem}.show-icon-labels.interface-pinned-items{border-bottom:1px solid #ccc;display:block;margin:0 -12px;padding:6px 12px 12px}.show-icon-labels.interface-pinned-items>.components-button.has-icon{justify-content:flex-start;margin:0;padding:6px 8px 6px 6px;width:14.625rem}.show-icon-labels.interface-pinned-items>.components-button.has-icon[aria-expanded=true] svg{display:block;max-width:24px}.show-icon-labels.interface-pinned-items>.components-button.has-icon[aria-expanded=false]{padding-right:40px}.show-icon-labels.interface-pinned-items>.components-button.has-icon svg{margin-left:8px}@media (min-width:600px){.edit-post-header__post-preview-button{display:none}}.is-distraction-free .interface-interface-skeleton__header{border-bottom:none}.is-distraction-free .edit-post-header{background-color:#fff;border-bottom:1px solid #e0e0e0;position:absolute;width:100%}.is-distraction-free .edit-post-header>.edit-post-header__settings>.edit-post-header__post-preview-button{visibility:hidden}.is-distraction-free .edit-post-header>.edit-post-header__settings>.editor-preview-dropdown,.is-distraction-free .edit-post-header>.edit-post-header__settings>.interface-pinned-items,.is-distraction-free .edit-post-header>.edit-post-header__toolbar .editor-document-tools__document-overview-toggle{display:none}.is-distraction-free .interface-interface-skeleton__header:focus-within{opacity:1!important}.is-distraction-free .interface-interface-skeleton__header:focus-within div{transform:translateX(0) translateZ(0)!important}.is-distraction-free .components-editor-notices__dismissible{position:absolute;z-index:35}.edit-post-fullscreen-mode-close.components-button{display:none}@media (min-width:782px){.edit-post-fullscreen-mode-close.components-button{align-items:center;align-self:stretch;background:#1e1e1e;border:none;border-radius:0;color:#fff;display:flex;height:61px;margin-bottom:-1px;position:relative;width:60px}.edit-post-fullscreen-mode-close.components-button:active{color:#fff}.edit-post-fullscreen-mode-close.components-button:focus{box-shadow:none}.edit-post-fullscreen-mode-close.components-button:before{border-radius:4px;bottom:10px;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) #1e1e1e;content:"";display:block;left:9px;position:absolute;right:9px;top:9px;transition:box-shadow .1s ease}}@media (min-width:782px) and (prefers-reduced-motion:reduce){.edit-post-fullscreen-mode-close.components-button:before{transition-delay:0s;transition-duration:0s}}@media (min-width:782px){.edit-post-fullscreen-mode-close.components-button:hover:before{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) #757575}.edit-post-fullscreen-mode-close.components-button.has-icon:hover:before{box-shadow:none}.edit-post-fullscreen-mode-close.components-button:focus:before{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) #ffffff1a,inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}}.edit-post-fullscreen-mode-close.components-button .edit-post-fullscreen-mode-close_site-icon{border-radius:2px;height:36px;margin-top:-1px;object-fit:cover;width:36px}.edit-post-keyboard-shortcut-help-modal__section{margin:0 0 2rem}.edit-post-keyboard-shortcut-help-modal__section-title{font-size:.9rem;font-weight:600}.edit-post-keyboard-shortcut-help-modal__shortcut{align-items:baseline;border-top:1px solid #ddd;display:flex;margin-bottom:0;padding:.6rem 0}.edit-post-keyboard-shortcut-help-modal__shortcut:last-child{border-bottom:1px solid #ddd}.edit-post-keyboard-shortcut-help-modal__shortcut:empty{display:none}.edit-post-keyboard-shortcut-help-modal__shortcut-term{font-weight:600;margin:0 1rem 0 0;text-align:left}.edit-post-keyboard-shortcut-help-modal__shortcut-description{flex:1;flex-basis:auto;margin:0}.edit-post-keyboard-shortcut-help-modal__shortcut-key-combination{background:none;display:block;margin:0;padding:0}.edit-post-keyboard-shortcut-help-modal__shortcut-key-combination+.edit-post-keyboard-shortcut-help-modal__shortcut-key-combination{margin-top:10px}.edit-post-keyboard-shortcut-help-modal__shortcut-key{border-radius:8%;margin:0 .2rem;padding:.25rem .5rem}.edit-post-keyboard-shortcut-help-modal__shortcut-key:last-child{margin:0 .2rem 0 0}.edit-post-layout__metaboxes{clear:both;flex-shrink:0}.edit-post-layout .components-editor-notices__snackbar{bottom:40px;left:0;padding-left:16px;padding-right:16px;position:fixed}.is-distraction-free .components-editor-notices__snackbar{bottom:20px}.edit-post-layout .components-editor-notices__snackbar{right:0}@media (min-width:783px){.edit-post-layout .components-editor-notices__snackbar{right:160px}}@media (min-width:783px){.auto-fold .edit-post-layout .components-editor-notices__snackbar{right:36px}}@media (min-width:961px){.auto-fold .edit-post-layout .components-editor-notices__snackbar{right:160px}}.folded .edit-post-layout .components-editor-notices__snackbar{right:0}@media (min-width:783px){.folded .edit-post-layout .components-editor-notices__snackbar{right:36px}}body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar{right:0!important}.edit-post-layout .editor-post-publish-panel{bottom:0;left:0;overflow:auto;position:fixed;right:0;top:46px;z-index:100001}@media (min-width:782px){.edit-post-layout .editor-post-publish-panel{animation:edit-post-post-publish-panel__slide-in-animation .1s forwards;border-right:1px solid #ddd;right:auto;top:32px;transform:translateX(-100%);width:281px;z-index:99998}}@media (min-width:782px) and (prefers-reduced-motion:reduce){.edit-post-layout .editor-post-publish-panel{animation-delay:0s;animation-duration:1ms}}@media (min-width:782px){body.is-fullscreen-mode .edit-post-layout .editor-post-publish-panel{top:0}[role=region]:focus .edit-post-layout .editor-post-publish-panel{transform:translateX(0)}}@keyframes edit-post-post-publish-panel__slide-in-animation{to{transform:translateX(0)}}.edit-post-layout .editor-post-publish-panel__header-publish-button{justify-content:center}.edit-post-layout__toggle-entities-saved-states-panel,.edit-post-layout__toggle-publish-panel,.edit-post-layout__toggle-sidebar-panel{background-color:#fff;border:1px dotted #ddd;bottom:auto;box-sizing:border-box;display:flex;height:auto!important;justify-content:center;left:0;padding:24px;position:fixed!important;right:auto;top:-9999em;width:280px;z-index:100000}.interface-interface-skeleton__actions:focus .edit-post-layout__toggle-entities-saved-states-panel,.interface-interface-skeleton__actions:focus .edit-post-layout__toggle-publish-panel,.interface-interface-skeleton__actions:focus-within .edit-post-layout__toggle-entities-saved-states-panel,.interface-interface-skeleton__actions:focus-within .edit-post-layout__toggle-publish-panel,.interface-interface-skeleton__sidebar:focus .edit-post-layout__toggle-sidebar-panel,.interface-interface-skeleton__sidebar:focus-within .edit-post-layout__toggle-sidebar-panel{bottom:0;top:auto}.edit-post-layout .entities-saved-states__panel-header{height:61px}.edit-post-meta-boxes-area{position:relative}.edit-post-meta-boxes-area .inside,.edit-post-meta-boxes-area__container{box-sizing:initial}.edit-post-meta-boxes-area input,.edit-post-meta-boxes-area textarea{box-sizing:border-box}.edit-post-meta-boxes-area .postbox-header{border-bottom:0;border-top:1px solid #ddd}.edit-post-meta-boxes-area #poststuff{margin:0 auto;min-width:auto;padding-top:0}.edit-post-meta-boxes-area #poststuff .stuffbox>h3,.edit-post-meta-boxes-area #poststuff h2.hndle,.edit-post-meta-boxes-area #poststuff h3.hndle{box-sizing:border-box;color:inherit;font-weight:600;outline:none;padding:0 24px;position:relative;width:100%}.edit-post-meta-boxes-area .postbox{border:0;color:inherit;margin-bottom:0}.edit-post-meta-boxes-area .postbox>.inside{color:inherit;margin:0;padding:0 24px 24px}.edit-post-meta-boxes-area .postbox .handlediv{height:44px;width:44px}.edit-post-meta-boxes-area.is-loading:before{background:#0000;bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:1}.edit-post-meta-boxes-area .components-spinner{left:20px;position:absolute;top:10px;z-index:5}.edit-post-meta-boxes-area .is-hidden{display:none}.edit-post-meta-boxes-area .metabox-location-side .postbox input[type=checkbox]{border:1px solid #757575}.edit-post-meta-boxes-area .metabox-location-side .postbox input[type=checkbox]:checked{background:#fff;border-color:#757575}.edit-post-meta-boxes-area .metabox-location-side .postbox input[type=checkbox]:before{margin:-3px -4px}.edit-post-meta-boxes-area__clear{clear:both}.components-panel__header.edit-post-sidebar__panel-tabs{padding-left:16px;padding-right:0}.components-panel__header.edit-post-sidebar__panel-tabs .components-button.has-icon{height:24px;min-width:24px;padding:0}@media (min-width:782px){.components-panel__header.edit-post-sidebar__panel-tabs .components-button.has-icon{display:flex}}.edit-post-sidebar__panel{margin-top:-1px}.edit-post-post-format,.edit-post-post-slug{align-items:stretch;display:flex;flex-direction:column}.edit-post-post-visibility__dialog .editor-post-visibility{margin:8px;min-width:248px}h2.edit-post-template-summary__title{font-weight:500;line-height:24px;margin:0 0 4px}.edit-post-text-editor{background-color:#fff;flex-grow:1;position:relative;width:100%}.edit-post-text-editor .editor-post-title.is-raw-text textarea,.edit-post-text-editor .editor-post-title:not(.is-raw-text){border:1px solid #949494;border-radius:0;font-family:Menlo,Consolas,monaco,monospace;font-size:2.5em;font-weight:400;line-height:1.4;max-width:none;padding:16px}@media (min-width:600px){.edit-post-text-editor .editor-post-title.is-raw-text textarea,.edit-post-text-editor .editor-post-title:not(.is-raw-text){padding:24px}}.edit-post-text-editor .editor-post-title.is-raw-text textarea:focus,.edit-post-text-editor .editor-post-title:not(.is-raw-text):focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.edit-post-text-editor__body{margin-left:auto;margin-right:auto;max-width:1080px;padding:0 12px 12px;width:100%}@media (min-width:960px){.edit-post-text-editor__body{padding:0 24px 24px}}.edit-post-text-editor__toolbar{background:#fffc;display:flex;left:0;padding:4px 12px;position:sticky;right:0;top:0;z-index:1}@media (min-width:600px){.edit-post-text-editor__toolbar{padding:12px}}@media (min-width:960px){.edit-post-text-editor__toolbar{padding:12px 24px}}.edit-post-text-editor__toolbar h2{color:#1e1e1e;font-size:13px;line-height:36px;margin:0 0 0 auto}.edit-post-visual-editor{background-color:#ddd;display:flex;flex:1 0 auto;flex-flow:column;position:relative}.edit-post-visual-editor:not(.has-inline-canvas){overflow:hidden}.edit-post-visual-editor .components-button{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;padding:6px 12px}.edit-post-visual-editor .components-button.has-icon{padding:6px}.edit-post-visual-editor__content-area{box-sizing:border-box;display:flex;flex-grow:1;height:100%;position:relative;width:100%}.edit-post-welcome-guide,.edit-template-welcome-guide{width:312px}.edit-post-welcome-guide__image,.edit-template-welcome-guide__image{background:#00a0d2;margin:0 0 16px}.edit-post-welcome-guide__image>img,.edit-template-welcome-guide__image>img{display:block;max-width:100%;object-fit:cover}.edit-post-welcome-guide__heading,.edit-template-welcome-guide__heading{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:24px;line-height:1.4;margin:16px 0;padding:0 32px}.edit-post-welcome-guide__text,.edit-template-welcome-guide__text{font-size:13px;line-height:1.4;margin:0 0 24px;padding:0 32px}.edit-post-welcome-guide__inserter-icon,.edit-template-welcome-guide__inserter-icon{margin:0 4px;vertical-align:text-top}.edit-template-welcome-guide .components-button svg{fill:#fff}.edit-post-start-page-options__modal-content .block-editor-block-patterns-list{column-count:2;column-gap:24px}@media (min-width:782px){.edit-post-start-page-options__modal-content .block-editor-block-patterns-list{column-count:3}}@media (min-width:1280px){.edit-post-start-page-options__modal-content .block-editor-block-patterns-list{column-count:4}}.edit-post-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{break-inside:avoid-column;margin-bottom:24px}.edit-post-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-preview__container{min-height:100px}.edit-post-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-preview__content{width:100%}@keyframes edit-post__fade-in-animation{0%{opacity:0}to{opacity:1}}body.js.block-editor-page{background:#fff}body.js.block-editor-page #wpcontent{padding-right:0}body.js.block-editor-page #wpbody-content{padding-bottom:0}body.js.block-editor-page #wpbody-content>div:not(.block-editor):not(#screen-meta),body.js.block-editor-page #wpfooter{display:none}body.js.block-editor-page .a11y-speak-region{right:-1px;top:-1px}body.js.block-editor-page ul#adminmenu a.wp-has-current-submenu:after,body.js.block-editor-page ul#adminmenu>li.current>a.current:after{border-left-color:#fff}body.js.block-editor-page .media-frame select.attachment-filters:last-of-type{max-width:100%;width:auto}.block-editor-page #wpwrap{overflow-y:auto}@media (min-width:782px){.block-editor-page #wpwrap{overflow-y:initial}}.components-modal__frame,.edit-post-header,.edit-post-sidebar,.edit-post-text-editor,.editor-post-publish-panel{box-sizing:border-box}.components-modal__frame *,.components-modal__frame :after,.components-modal__frame :before,.edit-post-header *,.edit-post-header :after,.edit-post-header :before,.edit-post-sidebar *,.edit-post-sidebar :after,.edit-post-sidebar :before,.edit-post-text-editor *,.edit-post-text-editor :after,.edit-post-text-editor :before,.editor-post-publish-panel *,.editor-post-publish-panel :after,.editor-post-publish-panel :before{box-sizing:inherit}@media (min-width:600px){.block-editor__container{bottom:0;left:0;min-height:calc(100vh - 46px);position:absolute;right:0;top:0}}@media (min-width:782px){.block-editor__container{min-height:calc(100vh - 32px)}body.is-fullscreen-mode .block-editor__container{min-height:100vh}}.block-editor__container img{height:auto;max-width:100%}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color--rgb:0,133,186;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-10--rgb:0,115,161;--wp-admin-theme-color-darker-20:#006187;--wp-admin-theme-color-darker-20--rgb:0,97,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-light{--wp-admin-border-width-focus:1.5px}}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color--rgb:56,88,233;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-10--rgb:33,69,230;--wp-admin-theme-color-darker-20:#183ad6;--wp-admin-theme-color-darker-20--rgb:24,58,214;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-modern{--wp-admin-border-width-focus:1.5px}}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color--rgb:9,100,132;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-10--rgb:7,82,108;--wp-admin-theme-color-darker-20:#064054;--wp-admin-theme-color-darker-20--rgb:6,64,84;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-blue{--wp-admin-border-width-focus:1.5px}}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color--rgb:70,64,60;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-10--rgb:56,51,48;--wp-admin-theme-color-darker-20:#2b2724;--wp-admin-theme-color-darker-20--rgb:43,39,36;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-coffee{--wp-admin-border-width-focus:1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color--rgb:82,63,109;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-10--rgb:70,54,93;--wp-admin-theme-color-darker-20:#3a2c4d;--wp-admin-theme-color-darker-20--rgb:58,44,77;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus:1.5px}}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color--rgb:225,77,67;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-10--rgb:221,56,45;--wp-admin-theme-color-darker-20:#d02c21;--wp-admin-theme-color-darker-20--rgb:208,44,33;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-midnight{--wp-admin-border-width-focus:1.5px}}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color--rgb:98,124,131;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-10--rgb:87,110,116;--wp-admin-theme-color-darker-20:#4c6066;--wp-admin-theme-color-darker-20--rgb:76,96,102;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-ocean{--wp-admin-border-width-focus:1.5px}}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color--rgb:221,130,59;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-10--rgb:217,116,38;--wp-admin-theme-color-darker-20:#c36922;--wp-admin-theme-color-darker-20--rgb:195,105,34;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus:1.5px}}.interface-interface-skeleton__sidebar{border-right:none}@media (min-width:782px){.is-sidebar-opened .interface-interface-skeleton__sidebar{border-right:1px solid #e0e0e0;overflow:hidden scroll}} \ No newline at end of file
diff --git a/wp-includes/css/dist/edit-post/style.css b/wp-includes/css/dist/edit-post/style.css
index fe4060f..0070456 100644
--- a/wp-includes/css/dist/edit-post/style.css
+++ b/wp-includes/css/dist/edit-post/style.css
@@ -586,9 +586,7 @@ body.is-fullscreen-mode .interface-interface-skeleton{
border-bottom:none;
}
.is-distraction-free .edit-post-header{
- -webkit-backdrop-filter:blur(20px) !important;
- backdrop-filter:blur(20px) !important;
- background-color:#ffffffe6;
+ background-color:#fff;
border-bottom:1px solid #e0e0e0;
position:absolute;
width:100%;
@@ -596,7 +594,7 @@ body.is-fullscreen-mode .interface-interface-skeleton{
.is-distraction-free .edit-post-header>.edit-post-header__settings>.edit-post-header__post-preview-button{
visibility:hidden;
}
-.is-distraction-free .edit-post-header>.edit-post-header__settings>.editor-preview-dropdown,.is-distraction-free .edit-post-header>.edit-post-header__settings>.interface-pinned-items,.is-distraction-free .edit-post-header>.edit-post-header__toolbar .editor-document-tools__document-overview-toggle,.is-distraction-free .edit-post-header>.edit-post-header__toolbar .editor-document-tools__inserter-toggle{
+.is-distraction-free .edit-post-header>.edit-post-header__settings>.editor-preview-dropdown,.is-distraction-free .edit-post-header>.edit-post-header__settings>.interface-pinned-items,.is-distraction-free .edit-post-header>.edit-post-header__toolbar .editor-document-tools__document-overview-toggle{
display:none;
}
.is-distraction-free .interface-interface-skeleton__header:focus-within{
diff --git a/wp-includes/css/dist/edit-post/style.min.css b/wp-includes/css/dist/edit-post/style.min.css
index f7c4dd1..324cb7d 100644
--- a/wp-includes/css/dist/edit-post/style.min.css
+++ b/wp-includes/css/dist/edit-post/style.min.css
@@ -1 +1 @@
-:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,161;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px;--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:#9747ff}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.components-panel__header.interface-complementary-area-header__small{background:#fff;padding-right:4px}.components-panel__header.interface-complementary-area-header__small .interface-complementary-area-header__small-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}@media (min-width:782px){.components-panel__header.interface-complementary-area-header__small{display:none}}.interface-complementary-area-header{background:#fff;padding-right:4px}.interface-complementary-area-header .components-button.has-icon{display:none;margin-left:auto}.interface-complementary-area-header .components-button.has-icon~.components-button{margin-left:0}@media (min-width:782px){.interface-complementary-area-header .components-button.has-icon{display:flex}.components-panel__header+.interface-complementary-area-header{margin-top:0}}.interface-complementary-area{background:#fff;color:#1e1e1e}@media (min-width:600px){.interface-complementary-area{-webkit-overflow-scrolling:touch}}@media (min-width:782px){.interface-complementary-area{width:280px}}.interface-complementary-area .components-panel{border:none;position:relative;z-index:0}.interface-complementary-area .components-panel__header{position:sticky;top:0;z-index:1}.interface-complementary-area .components-panel__header.edit-post-sidebar__panel-tabs{top:48px}@media (min-width:782px){.interface-complementary-area .components-panel__header.edit-post-sidebar__panel-tabs{top:0}}.interface-complementary-area p:not(.components-base-control__help){margin-top:0}.interface-complementary-area h2{color:#1e1e1e;font-size:13px;margin-bottom:1.5em}.interface-complementary-area h3{color:#1e1e1e;font-size:11px;font-weight:500;margin-bottom:1.5em;text-transform:uppercase}.interface-complementary-area hr{border-bottom:1px solid #f0f0f0;border-top:none;margin:1.5em 0}.interface-complementary-area div.components-toolbar,.interface-complementary-area div.components-toolbar-group{box-shadow:none;margin-bottom:1.5em}.interface-complementary-area div.components-toolbar-group:last-child,.interface-complementary-area div.components-toolbar:last-child{margin-bottom:0}.interface-complementary-area .block-editor-skip-to-selected-block:focus{bottom:10px;left:auto;right:10px;top:auto}@media (min-width:782px){body.js.is-fullscreen-mode{height:calc(100% + 32px);margin-top:-32px}body.js.is-fullscreen-mode #adminmenumain,body.js.is-fullscreen-mode #wpadminbar{display:none}body.js.is-fullscreen-mode #wpcontent,body.js.is-fullscreen-mode #wpfooter{margin-left:0}}html.interface-interface-skeleton__html-container{position:fixed;width:100%}@media (min-width:782px){html.interface-interface-skeleton__html-container{position:static;width:auto}}.interface-interface-skeleton{bottom:0;display:flex;flex-direction:row;height:auto;max-height:100%;position:fixed;right:0;top:46px}@media (min-width:783px){.interface-interface-skeleton{top:32px}.is-fullscreen-mode .interface-interface-skeleton{top:0}}.interface-interface-skeleton__editor{display:flex;flex:0 1 100%;flex-direction:column;overflow:hidden}.interface-interface-skeleton{left:0}@media (min-width:783px){.interface-interface-skeleton{left:160px}}@media (min-width:783px){.auto-fold .interface-interface-skeleton{left:36px}}@media (min-width:961px){.auto-fold .interface-interface-skeleton{left:160px}}.folded .interface-interface-skeleton{left:0}@media (min-width:783px){.folded .interface-interface-skeleton{left:36px}}body.is-fullscreen-mode .interface-interface-skeleton{left:0!important}.interface-interface-skeleton__body{display:flex;flex-grow:1;overflow:auto;overscroll-behavior-y:none}@media (min-width:782px){.has-footer .interface-interface-skeleton__body{padding-bottom:25px}}.interface-interface-skeleton__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;z-index:20}@media (min-width:782px){.interface-interface-skeleton__content{z-index:auto}}.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{background:#fff;bottom:0;color:#1e1e1e;flex-shrink:0;left:0;position:absolute;right:0;top:0;z-index:100000}@media (min-width:782px){.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{position:relative!important;width:auto}.is-sidebar-opened .interface-interface-skeleton__secondary-sidebar,.is-sidebar-opened .interface-interface-skeleton__sidebar{z-index:90}}.interface-interface-skeleton__sidebar{overflow:auto}@media (min-width:782px){.interface-interface-skeleton__sidebar{border-left:1px solid #e0e0e0}.interface-interface-skeleton__secondary-sidebar{border-right:1px solid #e0e0e0}}.interface-interface-skeleton__header{border-bottom:1px solid #e0e0e0;color:#1e1e1e;flex-shrink:0;height:auto;z-index:30}.interface-interface-skeleton__footer{background-color:#fff;border-top:1px solid #e0e0e0;bottom:0;color:#1e1e1e;display:none;flex-shrink:0;height:auto;left:0;position:absolute;width:100%;z-index:90}@media (min-width:782px){.interface-interface-skeleton__footer{display:flex}}.interface-interface-skeleton__footer .block-editor-block-breadcrumb{align-items:center;background:#fff;display:flex;font-size:13px;height:24px;padding:0 18px;z-index:30}.interface-interface-skeleton__actions{background:#fff;bottom:auto;color:#1e1e1e;left:auto;position:fixed!important;right:0;top:-9999em;width:100vw;z-index:100000}@media (min-width:782px){.interface-interface-skeleton__actions{width:280px}}.interface-interface-skeleton__actions:focus,.interface-interface-skeleton__actions:focus-within{bottom:0;top:auto}.is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{top:46px}@media (min-width:782px){.is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{border-left:1px solid #ddd;top:32px}.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{top:0}}.interface-more-menu-dropdown{margin-left:-4px}.interface-more-menu-dropdown .components-button{padding:0 2px;width:auto}@media (min-width:600px){.interface-more-menu-dropdown{margin-left:0}.interface-more-menu-dropdown .components-button{padding:0 4px}}.interface-more-menu-dropdown__content .components-popover__content{min-width:300px}@media (min-width:480px){.interface-more-menu-dropdown__content .components-popover__content{max-width:480px}}.interface-more-menu-dropdown__content .components-popover__content .components-dropdown-menu__menu{padding:0}.components-popover.interface-more-menu-dropdown__content{z-index:99998}.interface-pinned-items{display:flex;gap:8px}.interface-pinned-items .components-button{display:none;margin:0}.interface-pinned-items .components-button[aria-controls="edit-post:block"],.interface-pinned-items .components-button[aria-controls="edit-post:document"],.interface-pinned-items .components-button[aria-controls="edit-site:block-inspector"],.interface-pinned-items .components-button[aria-controls="edit-site:global-styles"],.interface-pinned-items .components-button[aria-controls="edit-site:template"]{display:flex}.interface-pinned-items .components-button svg{max-height:24px;max-width:24px}@media (min-width:600px){.interface-pinned-items .components-button{display:flex}}.edit-post-header{align-items:center;background:#fff;display:flex;flex-wrap:wrap;height:60px;justify-content:space-between;max-width:100vw}@media (min-width:280px){.edit-post-header{flex-wrap:nowrap}}.edit-post-header__toolbar{align-items:center;display:flex;flex-grow:3;flex-shrink:8;overflow:hidden;padding:2px 0}.edit-post-header__toolbar .table-of-contents{display:none}@media (min-width:600px){.edit-post-header__toolbar .table-of-contents{display:block}}.edit-post-header__toolbar .selected-block-tools-wrapper{align-items:center;display:flex;height:60px;overflow:hidden}.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-contextual-toolbar{border-bottom:0;height:100%}.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-toolbar{height:100%;padding-top:15px}.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-toolbar .components-button:not(.block-editor-block-mover-button){height:32px}.edit-post-header__toolbar .selected-block-tools-wrapper:after{background-color:#ddd;content:"";height:24px;margin-left:8px;width:1px}.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar,.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar-group{border-right:none}.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar-group:after,.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar:after{background-color:#ddd;content:"";height:24px;margin-left:8px;margin-top:4px;width:1px}.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar .components-toolbar-group.components-toolbar-group:after,.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar-group .components-toolbar-group.components-toolbar-group:after{display:none}.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-mover.is-horizontal .block-editor-block-mover-button{height:32px;overflow:visible}@media (min-width:600px){.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container{position:relative;top:-10px}}.edit-post-header__toolbar .selected-block-tools-wrapper.is-collapsed{display:none}.edit-post-header__block-tools-toggle{margin-left:2px}.edit-post-header__center{display:flex;flex-grow:1;justify-content:center}.edit-post-header__center.is-collapsed{display:none}.edit-post-header__settings{align-items:center;display:inline-flex;flex-wrap:nowrap;gap:8px;padding-right:4px}@media (min-width:600px){.edit-post-header__settings{padding-right:8px}}.edit-post-header__dropdown .components-button.has-icon,.show-icon-labels .edit-post-header .components-button.has-icon,.show-icon-labels.interface-pinned-items .components-button.has-icon{width:auto}.edit-post-header__dropdown .components-button.has-icon svg,.show-icon-labels .edit-post-header .components-button.has-icon svg,.show-icon-labels.interface-pinned-items .components-button.has-icon svg{display:none}.edit-post-header__dropdown .components-button.has-icon:after,.show-icon-labels .edit-post-header .components-button.has-icon:after,.show-icon-labels.interface-pinned-items .components-button.has-icon:after{content:attr(aria-label)}.edit-post-header__dropdown .components-button.has-icon[aria-disabled=true],.show-icon-labels .edit-post-header .components-button.has-icon[aria-disabled=true],.show-icon-labels.interface-pinned-items .components-button.has-icon[aria-disabled=true]{background-color:initial}.edit-post-header__dropdown .is-tertiary:active,.show-icon-labels .edit-post-header .is-tertiary:active,.show-icon-labels.interface-pinned-items .is-tertiary:active{background-color:initial;box-shadow:0 0 0 1.5px var(--wp-admin-theme-color)}.edit-post-header__dropdown .components-button.has-icon.button-toggle svg,.edit-post-header__dropdown .edit-post-fullscreen-mode-close.has-icon svg,.show-icon-labels .edit-post-header .components-button.has-icon.button-toggle svg,.show-icon-labels .edit-post-header .edit-post-fullscreen-mode-close.has-icon svg,.show-icon-labels.interface-pinned-items .components-button.has-icon.button-toggle svg,.show-icon-labels.interface-pinned-items .edit-post-fullscreen-mode-close.has-icon svg{display:block}.edit-post-header__dropdown .components-button.has-icon.button-toggle:after,.edit-post-header__dropdown .edit-post-fullscreen-mode-close.has-icon:after,.show-icon-labels .edit-post-header .components-button.has-icon.button-toggle:after,.show-icon-labels .edit-post-header .edit-post-fullscreen-mode-close.has-icon:after,.show-icon-labels.interface-pinned-items .components-button.has-icon.button-toggle:after,.show-icon-labels.interface-pinned-items .edit-post-fullscreen-mode-close.has-icon:after{content:none}.edit-post-header__dropdown .edit-post-fullscreen-mode-close.has-icon,.show-icon-labels .edit-post-header .edit-post-fullscreen-mode-close.has-icon,.show-icon-labels.interface-pinned-items .edit-post-fullscreen-mode-close.has-icon{width:60px}.edit-post-header__dropdown .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon,.show-icon-labels .edit-post-header .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon,.show-icon-labels.interface-pinned-items .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon{display:block}.edit-post-header__dropdown .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.edit-post-header__dropdown .interface-pinned-items .components-button,.show-icon-labels .edit-post-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels .edit-post-header .interface-pinned-items .components-button,.show-icon-labels.interface-pinned-items .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button{padding-left:8px;padding-right:8px}@media (min-width:600px){.edit-post-header__dropdown .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.edit-post-header__dropdown .interface-pinned-items .components-button,.show-icon-labels .edit-post-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels .edit-post-header .interface-pinned-items .components-button,.show-icon-labels.interface-pinned-items .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button{padding-left:12px;padding-right:12px}}.edit-post-header__dropdown .editor-post-save-draft.editor-post-save-draft:after,.edit-post-header__dropdown .editor-post-saved-state.editor-post-saved-state:after,.show-icon-labels .edit-post-header .editor-post-save-draft.editor-post-save-draft:after,.show-icon-labels .edit-post-header .editor-post-saved-state.editor-post-saved-state:after,.show-icon-labels.interface-pinned-items .editor-post-save-draft.editor-post-save-draft:after,.show-icon-labels.interface-pinned-items .editor-post-saved-state.editor-post-saved-state:after{content:none}.show-icon-labels .edit-post-header__toolbar .block-editor-block-mover{border-left:none}.show-icon-labels .edit-post-header__toolbar .block-editor-block-mover:before{background-color:#ddd;content:"";height:24px;margin-left:8px;margin-top:4px;width:1px}.show-icon-labels .edit-post-header__toolbar .block-editor-block-mover .block-editor-block-mover__move-button-container:before{background:#ddd;left:calc(50% + 1px);width:calc(100% - 24px)}.edit-post-header__dropdown .components-button.block-editor-list-view,.edit-post-header__dropdown .components-button.editor-history__redo,.edit-post-header__dropdown .components-button.editor-history__undo,.edit-post-header__dropdown .components-menu-item__button.components-menu-item__button,.edit-post-header__dropdown .table-of-contents .components-button{justify-content:flex-start;margin:0;padding:6px 6px 6px 40px;text-align:left;width:14.625rem}.show-icon-labels.interface-pinned-items{border-bottom:1px solid #ccc;display:block;margin:0 -12px;padding:6px 12px 12px}.show-icon-labels.interface-pinned-items>.components-button.has-icon{justify-content:flex-start;margin:0;padding:6px 6px 6px 8px;width:14.625rem}.show-icon-labels.interface-pinned-items>.components-button.has-icon[aria-expanded=true] svg{display:block;max-width:24px}.show-icon-labels.interface-pinned-items>.components-button.has-icon[aria-expanded=false]{padding-left:40px}.show-icon-labels.interface-pinned-items>.components-button.has-icon svg{margin-right:8px}@media (min-width:600px){.edit-post-header__post-preview-button{display:none}}.is-distraction-free .interface-interface-skeleton__header{border-bottom:none}.is-distraction-free .edit-post-header{-webkit-backdrop-filter:blur(20px)!important;backdrop-filter:blur(20px)!important;background-color:#ffffffe6;border-bottom:1px solid #e0e0e0;position:absolute;width:100%}.is-distraction-free .edit-post-header>.edit-post-header__settings>.edit-post-header__post-preview-button{visibility:hidden}.is-distraction-free .edit-post-header>.edit-post-header__settings>.editor-preview-dropdown,.is-distraction-free .edit-post-header>.edit-post-header__settings>.interface-pinned-items,.is-distraction-free .edit-post-header>.edit-post-header__toolbar .editor-document-tools__document-overview-toggle,.is-distraction-free .edit-post-header>.edit-post-header__toolbar .editor-document-tools__inserter-toggle{display:none}.is-distraction-free .interface-interface-skeleton__header:focus-within{opacity:1!important}.is-distraction-free .interface-interface-skeleton__header:focus-within div{transform:translateX(0) translateZ(0)!important}.is-distraction-free .components-editor-notices__dismissible{position:absolute;z-index:35}.edit-post-fullscreen-mode-close.components-button{display:none}@media (min-width:782px){.edit-post-fullscreen-mode-close.components-button{align-items:center;align-self:stretch;background:#1e1e1e;border:none;border-radius:0;color:#fff;display:flex;height:61px;margin-bottom:-1px;position:relative;width:60px}.edit-post-fullscreen-mode-close.components-button:active{color:#fff}.edit-post-fullscreen-mode-close.components-button:focus{box-shadow:none}.edit-post-fullscreen-mode-close.components-button:before{border-radius:4px;bottom:10px;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) #1e1e1e;content:"";display:block;left:9px;position:absolute;right:9px;top:9px;transition:box-shadow .1s ease}}@media (min-width:782px) and (prefers-reduced-motion:reduce){.edit-post-fullscreen-mode-close.components-button:before{transition-delay:0s;transition-duration:0s}}@media (min-width:782px){.edit-post-fullscreen-mode-close.components-button:hover:before{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) #757575}.edit-post-fullscreen-mode-close.components-button.has-icon:hover:before{box-shadow:none}.edit-post-fullscreen-mode-close.components-button:focus:before{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) #ffffff1a,inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}}.edit-post-fullscreen-mode-close.components-button .edit-post-fullscreen-mode-close_site-icon{border-radius:2px;height:36px;margin-top:-1px;object-fit:cover;width:36px}.edit-post-keyboard-shortcut-help-modal__section{margin:0 0 2rem}.edit-post-keyboard-shortcut-help-modal__section-title{font-size:.9rem;font-weight:600}.edit-post-keyboard-shortcut-help-modal__shortcut{align-items:baseline;border-top:1px solid #ddd;display:flex;margin-bottom:0;padding:.6rem 0}.edit-post-keyboard-shortcut-help-modal__shortcut:last-child{border-bottom:1px solid #ddd}.edit-post-keyboard-shortcut-help-modal__shortcut:empty{display:none}.edit-post-keyboard-shortcut-help-modal__shortcut-term{font-weight:600;margin:0 0 0 1rem;text-align:right}.edit-post-keyboard-shortcut-help-modal__shortcut-description{flex:1;flex-basis:auto;margin:0}.edit-post-keyboard-shortcut-help-modal__shortcut-key-combination{background:none;display:block;margin:0;padding:0}.edit-post-keyboard-shortcut-help-modal__shortcut-key-combination+.edit-post-keyboard-shortcut-help-modal__shortcut-key-combination{margin-top:10px}.edit-post-keyboard-shortcut-help-modal__shortcut-key{border-radius:8%;margin:0 .2rem;padding:.25rem .5rem}.edit-post-keyboard-shortcut-help-modal__shortcut-key:last-child{margin:0 0 0 .2rem}.edit-post-layout__metaboxes{clear:both;flex-shrink:0}.edit-post-layout .components-editor-notices__snackbar{bottom:40px;padding-left:16px;padding-right:16px;position:fixed;right:0}.is-distraction-free .components-editor-notices__snackbar{bottom:20px}.edit-post-layout .components-editor-notices__snackbar{left:0}@media (min-width:783px){.edit-post-layout .components-editor-notices__snackbar{left:160px}}@media (min-width:783px){.auto-fold .edit-post-layout .components-editor-notices__snackbar{left:36px}}@media (min-width:961px){.auto-fold .edit-post-layout .components-editor-notices__snackbar{left:160px}}.folded .edit-post-layout .components-editor-notices__snackbar{left:0}@media (min-width:783px){.folded .edit-post-layout .components-editor-notices__snackbar{left:36px}}body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar{left:0!important}.edit-post-layout .editor-post-publish-panel{bottom:0;left:0;overflow:auto;position:fixed;right:0;top:46px;z-index:100001}@media (min-width:782px){.edit-post-layout .editor-post-publish-panel{animation:edit-post-post-publish-panel__slide-in-animation .1s forwards;border-left:1px solid #ddd;left:auto;top:32px;transform:translateX(100%);width:281px;z-index:99998}}@media (min-width:782px) and (prefers-reduced-motion:reduce){.edit-post-layout .editor-post-publish-panel{animation-delay:0s;animation-duration:1ms}}@media (min-width:782px){body.is-fullscreen-mode .edit-post-layout .editor-post-publish-panel{top:0}[role=region]:focus .edit-post-layout .editor-post-publish-panel{transform:translateX(0)}}@keyframes edit-post-post-publish-panel__slide-in-animation{to{transform:translateX(0)}}.edit-post-layout .editor-post-publish-panel__header-publish-button{justify-content:center}.edit-post-layout__toggle-entities-saved-states-panel,.edit-post-layout__toggle-publish-panel,.edit-post-layout__toggle-sidebar-panel{background-color:#fff;border:1px dotted #ddd;bottom:auto;box-sizing:border-box;display:flex;height:auto!important;justify-content:center;left:auto;padding:24px;position:fixed!important;right:0;top:-9999em;width:280px;z-index:100000}.interface-interface-skeleton__actions:focus .edit-post-layout__toggle-entities-saved-states-panel,.interface-interface-skeleton__actions:focus .edit-post-layout__toggle-publish-panel,.interface-interface-skeleton__actions:focus-within .edit-post-layout__toggle-entities-saved-states-panel,.interface-interface-skeleton__actions:focus-within .edit-post-layout__toggle-publish-panel,.interface-interface-skeleton__sidebar:focus .edit-post-layout__toggle-sidebar-panel,.interface-interface-skeleton__sidebar:focus-within .edit-post-layout__toggle-sidebar-panel{bottom:0;top:auto}.edit-post-layout .entities-saved-states__panel-header{height:61px}.edit-post-meta-boxes-area{position:relative}.edit-post-meta-boxes-area .inside,.edit-post-meta-boxes-area__container{box-sizing:initial}.edit-post-meta-boxes-area input,.edit-post-meta-boxes-area textarea{box-sizing:border-box}.edit-post-meta-boxes-area .postbox-header{border-bottom:0;border-top:1px solid #ddd}.edit-post-meta-boxes-area #poststuff{margin:0 auto;min-width:auto;padding-top:0}.edit-post-meta-boxes-area #poststuff .stuffbox>h3,.edit-post-meta-boxes-area #poststuff h2.hndle,.edit-post-meta-boxes-area #poststuff h3.hndle{box-sizing:border-box;color:inherit;font-weight:600;outline:none;padding:0 24px;position:relative;width:100%}.edit-post-meta-boxes-area .postbox{border:0;color:inherit;margin-bottom:0}.edit-post-meta-boxes-area .postbox>.inside{color:inherit;margin:0;padding:0 24px 24px}.edit-post-meta-boxes-area .postbox .handlediv{height:44px;width:44px}.edit-post-meta-boxes-area.is-loading:before{background:#0000;bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:1}.edit-post-meta-boxes-area .components-spinner{position:absolute;right:20px;top:10px;z-index:5}.edit-post-meta-boxes-area .is-hidden{display:none}.edit-post-meta-boxes-area .metabox-location-side .postbox input[type=checkbox]{border:1px solid #757575}.edit-post-meta-boxes-area .metabox-location-side .postbox input[type=checkbox]:checked{background:#fff;border-color:#757575}.edit-post-meta-boxes-area .metabox-location-side .postbox input[type=checkbox]:before{margin:-3px -4px}.edit-post-meta-boxes-area__clear{clear:both}.components-panel__header.edit-post-sidebar__panel-tabs{padding-left:0;padding-right:16px}.components-panel__header.edit-post-sidebar__panel-tabs .components-button.has-icon{height:24px;min-width:24px;padding:0}@media (min-width:782px){.components-panel__header.edit-post-sidebar__panel-tabs .components-button.has-icon{display:flex}}.edit-post-sidebar__panel{margin-top:-1px}.edit-post-post-format,.edit-post-post-slug{align-items:stretch;display:flex;flex-direction:column}.edit-post-post-visibility__dialog .editor-post-visibility{margin:8px;min-width:248px}h2.edit-post-template-summary__title{font-weight:500;line-height:24px;margin:0 0 4px}.edit-post-text-editor{background-color:#fff;flex-grow:1;position:relative;width:100%}.edit-post-text-editor .editor-post-title.is-raw-text textarea,.edit-post-text-editor .editor-post-title:not(.is-raw-text){border:1px solid #949494;border-radius:0;font-family:Menlo,Consolas,monaco,monospace;font-size:2.5em;font-weight:400;line-height:1.4;max-width:none;padding:16px}@media (min-width:600px){.edit-post-text-editor .editor-post-title.is-raw-text textarea,.edit-post-text-editor .editor-post-title:not(.is-raw-text){padding:24px}}.edit-post-text-editor .editor-post-title.is-raw-text textarea:focus,.edit-post-text-editor .editor-post-title:not(.is-raw-text):focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.edit-post-text-editor__body{margin-left:auto;margin-right:auto;max-width:1080px;padding:0 12px 12px;width:100%}@media (min-width:960px){.edit-post-text-editor__body{padding:0 24px 24px}}.edit-post-text-editor__toolbar{background:#fffc;display:flex;left:0;padding:4px 12px;position:sticky;right:0;top:0;z-index:1}@media (min-width:600px){.edit-post-text-editor__toolbar{padding:12px}}@media (min-width:960px){.edit-post-text-editor__toolbar{padding:12px 24px}}.edit-post-text-editor__toolbar h2{color:#1e1e1e;font-size:13px;line-height:36px;margin:0 auto 0 0}.edit-post-visual-editor{background-color:#ddd;display:flex;flex:1 0 auto;flex-flow:column;position:relative}.edit-post-visual-editor:not(.has-inline-canvas){overflow:hidden}.edit-post-visual-editor .components-button{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;padding:6px 12px}.edit-post-visual-editor .components-button.has-icon{padding:6px}.edit-post-visual-editor__content-area{box-sizing:border-box;display:flex;flex-grow:1;height:100%;position:relative;width:100%}.edit-post-welcome-guide,.edit-template-welcome-guide{width:312px}.edit-post-welcome-guide__image,.edit-template-welcome-guide__image{background:#00a0d2;margin:0 0 16px}.edit-post-welcome-guide__image>img,.edit-template-welcome-guide__image>img{display:block;max-width:100%;object-fit:cover}.edit-post-welcome-guide__heading,.edit-template-welcome-guide__heading{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:24px;line-height:1.4;margin:16px 0;padding:0 32px}.edit-post-welcome-guide__text,.edit-template-welcome-guide__text{font-size:13px;line-height:1.4;margin:0 0 24px;padding:0 32px}.edit-post-welcome-guide__inserter-icon,.edit-template-welcome-guide__inserter-icon{margin:0 4px;vertical-align:text-top}.edit-template-welcome-guide .components-button svg{fill:#fff}.edit-post-start-page-options__modal-content .block-editor-block-patterns-list{column-count:2;column-gap:24px}@media (min-width:782px){.edit-post-start-page-options__modal-content .block-editor-block-patterns-list{column-count:3}}@media (min-width:1280px){.edit-post-start-page-options__modal-content .block-editor-block-patterns-list{column-count:4}}.edit-post-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{break-inside:avoid-column;margin-bottom:24px}.edit-post-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-preview__container{min-height:100px}.edit-post-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-preview__content{width:100%}@keyframes edit-post__fade-in-animation{0%{opacity:0}to{opacity:1}}body.js.block-editor-page{background:#fff}body.js.block-editor-page #wpcontent{padding-left:0}body.js.block-editor-page #wpbody-content{padding-bottom:0}body.js.block-editor-page #wpbody-content>div:not(.block-editor):not(#screen-meta),body.js.block-editor-page #wpfooter{display:none}body.js.block-editor-page .a11y-speak-region{left:-1px;top:-1px}body.js.block-editor-page ul#adminmenu a.wp-has-current-submenu:after,body.js.block-editor-page ul#adminmenu>li.current>a.current:after{border-right-color:#fff}body.js.block-editor-page .media-frame select.attachment-filters:last-of-type{max-width:100%;width:auto}.block-editor-page #wpwrap{overflow-y:auto}@media (min-width:782px){.block-editor-page #wpwrap{overflow-y:initial}}.components-modal__frame,.edit-post-header,.edit-post-sidebar,.edit-post-text-editor,.editor-post-publish-panel{box-sizing:border-box}.components-modal__frame *,.components-modal__frame :after,.components-modal__frame :before,.edit-post-header *,.edit-post-header :after,.edit-post-header :before,.edit-post-sidebar *,.edit-post-sidebar :after,.edit-post-sidebar :before,.edit-post-text-editor *,.edit-post-text-editor :after,.edit-post-text-editor :before,.editor-post-publish-panel *,.editor-post-publish-panel :after,.editor-post-publish-panel :before{box-sizing:inherit}@media (min-width:600px){.block-editor__container{bottom:0;left:0;min-height:calc(100vh - 46px);position:absolute;right:0;top:0}}@media (min-width:782px){.block-editor__container{min-height:calc(100vh - 32px)}body.is-fullscreen-mode .block-editor__container{min-height:100vh}}.block-editor__container img{height:auto;max-width:100%}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color--rgb:0,133,186;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-10--rgb:0,115,161;--wp-admin-theme-color-darker-20:#006187;--wp-admin-theme-color-darker-20--rgb:0,97,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-light{--wp-admin-border-width-focus:1.5px}}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color--rgb:56,88,233;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-10--rgb:33,69,230;--wp-admin-theme-color-darker-20:#183ad6;--wp-admin-theme-color-darker-20--rgb:24,58,214;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-modern{--wp-admin-border-width-focus:1.5px}}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color--rgb:9,100,132;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-10--rgb:7,82,108;--wp-admin-theme-color-darker-20:#064054;--wp-admin-theme-color-darker-20--rgb:6,64,84;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-blue{--wp-admin-border-width-focus:1.5px}}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color--rgb:70,64,60;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-10--rgb:56,51,48;--wp-admin-theme-color-darker-20:#2b2724;--wp-admin-theme-color-darker-20--rgb:43,39,36;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-coffee{--wp-admin-border-width-focus:1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color--rgb:82,63,109;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-10--rgb:70,54,93;--wp-admin-theme-color-darker-20:#3a2c4d;--wp-admin-theme-color-darker-20--rgb:58,44,77;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus:1.5px}}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color--rgb:225,77,67;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-10--rgb:221,56,45;--wp-admin-theme-color-darker-20:#d02c21;--wp-admin-theme-color-darker-20--rgb:208,44,33;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-midnight{--wp-admin-border-width-focus:1.5px}}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color--rgb:98,124,131;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-10--rgb:87,110,116;--wp-admin-theme-color-darker-20:#4c6066;--wp-admin-theme-color-darker-20--rgb:76,96,102;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-ocean{--wp-admin-border-width-focus:1.5px}}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color--rgb:221,130,59;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-10--rgb:217,116,38;--wp-admin-theme-color-darker-20:#c36922;--wp-admin-theme-color-darker-20--rgb:195,105,34;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus:1.5px}}.interface-interface-skeleton__sidebar{border-left:none}@media (min-width:782px){.is-sidebar-opened .interface-interface-skeleton__sidebar{border-left:1px solid #e0e0e0;overflow:hidden scroll}} \ No newline at end of file
+:root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,161;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px;--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:#9747ff}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.components-panel__header.interface-complementary-area-header__small{background:#fff;padding-right:4px}.components-panel__header.interface-complementary-area-header__small .interface-complementary-area-header__small-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}@media (min-width:782px){.components-panel__header.interface-complementary-area-header__small{display:none}}.interface-complementary-area-header{background:#fff;padding-right:4px}.interface-complementary-area-header .components-button.has-icon{display:none;margin-left:auto}.interface-complementary-area-header .components-button.has-icon~.components-button{margin-left:0}@media (min-width:782px){.interface-complementary-area-header .components-button.has-icon{display:flex}.components-panel__header+.interface-complementary-area-header{margin-top:0}}.interface-complementary-area{background:#fff;color:#1e1e1e}@media (min-width:600px){.interface-complementary-area{-webkit-overflow-scrolling:touch}}@media (min-width:782px){.interface-complementary-area{width:280px}}.interface-complementary-area .components-panel{border:none;position:relative;z-index:0}.interface-complementary-area .components-panel__header{position:sticky;top:0;z-index:1}.interface-complementary-area .components-panel__header.edit-post-sidebar__panel-tabs{top:48px}@media (min-width:782px){.interface-complementary-area .components-panel__header.edit-post-sidebar__panel-tabs{top:0}}.interface-complementary-area p:not(.components-base-control__help){margin-top:0}.interface-complementary-area h2{color:#1e1e1e;font-size:13px;margin-bottom:1.5em}.interface-complementary-area h3{color:#1e1e1e;font-size:11px;font-weight:500;margin-bottom:1.5em;text-transform:uppercase}.interface-complementary-area hr{border-bottom:1px solid #f0f0f0;border-top:none;margin:1.5em 0}.interface-complementary-area div.components-toolbar,.interface-complementary-area div.components-toolbar-group{box-shadow:none;margin-bottom:1.5em}.interface-complementary-area div.components-toolbar-group:last-child,.interface-complementary-area div.components-toolbar:last-child{margin-bottom:0}.interface-complementary-area .block-editor-skip-to-selected-block:focus{bottom:10px;left:auto;right:10px;top:auto}@media (min-width:782px){body.js.is-fullscreen-mode{height:calc(100% + 32px);margin-top:-32px}body.js.is-fullscreen-mode #adminmenumain,body.js.is-fullscreen-mode #wpadminbar{display:none}body.js.is-fullscreen-mode #wpcontent,body.js.is-fullscreen-mode #wpfooter{margin-left:0}}html.interface-interface-skeleton__html-container{position:fixed;width:100%}@media (min-width:782px){html.interface-interface-skeleton__html-container{position:static;width:auto}}.interface-interface-skeleton{bottom:0;display:flex;flex-direction:row;height:auto;max-height:100%;position:fixed;right:0;top:46px}@media (min-width:783px){.interface-interface-skeleton{top:32px}.is-fullscreen-mode .interface-interface-skeleton{top:0}}.interface-interface-skeleton__editor{display:flex;flex:0 1 100%;flex-direction:column;overflow:hidden}.interface-interface-skeleton{left:0}@media (min-width:783px){.interface-interface-skeleton{left:160px}}@media (min-width:783px){.auto-fold .interface-interface-skeleton{left:36px}}@media (min-width:961px){.auto-fold .interface-interface-skeleton{left:160px}}.folded .interface-interface-skeleton{left:0}@media (min-width:783px){.folded .interface-interface-skeleton{left:36px}}body.is-fullscreen-mode .interface-interface-skeleton{left:0!important}.interface-interface-skeleton__body{display:flex;flex-grow:1;overflow:auto;overscroll-behavior-y:none}@media (min-width:782px){.has-footer .interface-interface-skeleton__body{padding-bottom:25px}}.interface-interface-skeleton__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;z-index:20}@media (min-width:782px){.interface-interface-skeleton__content{z-index:auto}}.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{background:#fff;bottom:0;color:#1e1e1e;flex-shrink:0;left:0;position:absolute;right:0;top:0;z-index:100000}@media (min-width:782px){.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{position:relative!important;width:auto}.is-sidebar-opened .interface-interface-skeleton__secondary-sidebar,.is-sidebar-opened .interface-interface-skeleton__sidebar{z-index:90}}.interface-interface-skeleton__sidebar{overflow:auto}@media (min-width:782px){.interface-interface-skeleton__sidebar{border-left:1px solid #e0e0e0}.interface-interface-skeleton__secondary-sidebar{border-right:1px solid #e0e0e0}}.interface-interface-skeleton__header{border-bottom:1px solid #e0e0e0;color:#1e1e1e;flex-shrink:0;height:auto;z-index:30}.interface-interface-skeleton__footer{background-color:#fff;border-top:1px solid #e0e0e0;bottom:0;color:#1e1e1e;display:none;flex-shrink:0;height:auto;left:0;position:absolute;width:100%;z-index:90}@media (min-width:782px){.interface-interface-skeleton__footer{display:flex}}.interface-interface-skeleton__footer .block-editor-block-breadcrumb{align-items:center;background:#fff;display:flex;font-size:13px;height:24px;padding:0 18px;z-index:30}.interface-interface-skeleton__actions{background:#fff;bottom:auto;color:#1e1e1e;left:auto;position:fixed!important;right:0;top:-9999em;width:100vw;z-index:100000}@media (min-width:782px){.interface-interface-skeleton__actions{width:280px}}.interface-interface-skeleton__actions:focus,.interface-interface-skeleton__actions:focus-within{bottom:0;top:auto}.is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{top:46px}@media (min-width:782px){.is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{border-left:1px solid #ddd;top:32px}.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{top:0}}.interface-more-menu-dropdown{margin-left:-4px}.interface-more-menu-dropdown .components-button{padding:0 2px;width:auto}@media (min-width:600px){.interface-more-menu-dropdown{margin-left:0}.interface-more-menu-dropdown .components-button{padding:0 4px}}.interface-more-menu-dropdown__content .components-popover__content{min-width:300px}@media (min-width:480px){.interface-more-menu-dropdown__content .components-popover__content{max-width:480px}}.interface-more-menu-dropdown__content .components-popover__content .components-dropdown-menu__menu{padding:0}.components-popover.interface-more-menu-dropdown__content{z-index:99998}.interface-pinned-items{display:flex;gap:8px}.interface-pinned-items .components-button{display:none;margin:0}.interface-pinned-items .components-button[aria-controls="edit-post:block"],.interface-pinned-items .components-button[aria-controls="edit-post:document"],.interface-pinned-items .components-button[aria-controls="edit-site:block-inspector"],.interface-pinned-items .components-button[aria-controls="edit-site:global-styles"],.interface-pinned-items .components-button[aria-controls="edit-site:template"]{display:flex}.interface-pinned-items .components-button svg{max-height:24px;max-width:24px}@media (min-width:600px){.interface-pinned-items .components-button{display:flex}}.edit-post-header{align-items:center;background:#fff;display:flex;flex-wrap:wrap;height:60px;justify-content:space-between;max-width:100vw}@media (min-width:280px){.edit-post-header{flex-wrap:nowrap}}.edit-post-header__toolbar{align-items:center;display:flex;flex-grow:3;flex-shrink:8;overflow:hidden;padding:2px 0}.edit-post-header__toolbar .table-of-contents{display:none}@media (min-width:600px){.edit-post-header__toolbar .table-of-contents{display:block}}.edit-post-header__toolbar .selected-block-tools-wrapper{align-items:center;display:flex;height:60px;overflow:hidden}.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-contextual-toolbar{border-bottom:0;height:100%}.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-toolbar{height:100%;padding-top:15px}.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-toolbar .components-button:not(.block-editor-block-mover-button){height:32px}.edit-post-header__toolbar .selected-block-tools-wrapper:after{background-color:#ddd;content:"";height:24px;margin-left:8px;width:1px}.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar,.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar-group{border-right:none}.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar-group:after,.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar:after{background-color:#ddd;content:"";height:24px;margin-left:8px;margin-top:4px;width:1px}.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar .components-toolbar-group.components-toolbar-group:after,.edit-post-header__toolbar .selected-block-tools-wrapper .components-toolbar-group .components-toolbar-group.components-toolbar-group:after{display:none}.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-mover.is-horizontal .block-editor-block-mover-button{height:32px;overflow:visible}@media (min-width:600px){.edit-post-header__toolbar .selected-block-tools-wrapper .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container{position:relative;top:-10px}}.edit-post-header__toolbar .selected-block-tools-wrapper.is-collapsed{display:none}.edit-post-header__block-tools-toggle{margin-left:2px}.edit-post-header__center{display:flex;flex-grow:1;justify-content:center}.edit-post-header__center.is-collapsed{display:none}.edit-post-header__settings{align-items:center;display:inline-flex;flex-wrap:nowrap;gap:8px;padding-right:4px}@media (min-width:600px){.edit-post-header__settings{padding-right:8px}}.edit-post-header__dropdown .components-button.has-icon,.show-icon-labels .edit-post-header .components-button.has-icon,.show-icon-labels.interface-pinned-items .components-button.has-icon{width:auto}.edit-post-header__dropdown .components-button.has-icon svg,.show-icon-labels .edit-post-header .components-button.has-icon svg,.show-icon-labels.interface-pinned-items .components-button.has-icon svg{display:none}.edit-post-header__dropdown .components-button.has-icon:after,.show-icon-labels .edit-post-header .components-button.has-icon:after,.show-icon-labels.interface-pinned-items .components-button.has-icon:after{content:attr(aria-label)}.edit-post-header__dropdown .components-button.has-icon[aria-disabled=true],.show-icon-labels .edit-post-header .components-button.has-icon[aria-disabled=true],.show-icon-labels.interface-pinned-items .components-button.has-icon[aria-disabled=true]{background-color:initial}.edit-post-header__dropdown .is-tertiary:active,.show-icon-labels .edit-post-header .is-tertiary:active,.show-icon-labels.interface-pinned-items .is-tertiary:active{background-color:initial;box-shadow:0 0 0 1.5px var(--wp-admin-theme-color)}.edit-post-header__dropdown .components-button.has-icon.button-toggle svg,.edit-post-header__dropdown .edit-post-fullscreen-mode-close.has-icon svg,.show-icon-labels .edit-post-header .components-button.has-icon.button-toggle svg,.show-icon-labels .edit-post-header .edit-post-fullscreen-mode-close.has-icon svg,.show-icon-labels.interface-pinned-items .components-button.has-icon.button-toggle svg,.show-icon-labels.interface-pinned-items .edit-post-fullscreen-mode-close.has-icon svg{display:block}.edit-post-header__dropdown .components-button.has-icon.button-toggle:after,.edit-post-header__dropdown .edit-post-fullscreen-mode-close.has-icon:after,.show-icon-labels .edit-post-header .components-button.has-icon.button-toggle:after,.show-icon-labels .edit-post-header .edit-post-fullscreen-mode-close.has-icon:after,.show-icon-labels.interface-pinned-items .components-button.has-icon.button-toggle:after,.show-icon-labels.interface-pinned-items .edit-post-fullscreen-mode-close.has-icon:after{content:none}.edit-post-header__dropdown .edit-post-fullscreen-mode-close.has-icon,.show-icon-labels .edit-post-header .edit-post-fullscreen-mode-close.has-icon,.show-icon-labels.interface-pinned-items .edit-post-fullscreen-mode-close.has-icon{width:60px}.edit-post-header__dropdown .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon,.show-icon-labels .edit-post-header .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon,.show-icon-labels.interface-pinned-items .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon{display:block}.edit-post-header__dropdown .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.edit-post-header__dropdown .interface-pinned-items .components-button,.show-icon-labels .edit-post-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels .edit-post-header .interface-pinned-items .components-button,.show-icon-labels.interface-pinned-items .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button{padding-left:8px;padding-right:8px}@media (min-width:600px){.edit-post-header__dropdown .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.edit-post-header__dropdown .interface-pinned-items .components-button,.show-icon-labels .edit-post-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels .edit-post-header .interface-pinned-items .components-button,.show-icon-labels.interface-pinned-items .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button{padding-left:12px;padding-right:12px}}.edit-post-header__dropdown .editor-post-save-draft.editor-post-save-draft:after,.edit-post-header__dropdown .editor-post-saved-state.editor-post-saved-state:after,.show-icon-labels .edit-post-header .editor-post-save-draft.editor-post-save-draft:after,.show-icon-labels .edit-post-header .editor-post-saved-state.editor-post-saved-state:after,.show-icon-labels.interface-pinned-items .editor-post-save-draft.editor-post-save-draft:after,.show-icon-labels.interface-pinned-items .editor-post-saved-state.editor-post-saved-state:after{content:none}.show-icon-labels .edit-post-header__toolbar .block-editor-block-mover{border-left:none}.show-icon-labels .edit-post-header__toolbar .block-editor-block-mover:before{background-color:#ddd;content:"";height:24px;margin-left:8px;margin-top:4px;width:1px}.show-icon-labels .edit-post-header__toolbar .block-editor-block-mover .block-editor-block-mover__move-button-container:before{background:#ddd;left:calc(50% + 1px);width:calc(100% - 24px)}.edit-post-header__dropdown .components-button.block-editor-list-view,.edit-post-header__dropdown .components-button.editor-history__redo,.edit-post-header__dropdown .components-button.editor-history__undo,.edit-post-header__dropdown .components-menu-item__button.components-menu-item__button,.edit-post-header__dropdown .table-of-contents .components-button{justify-content:flex-start;margin:0;padding:6px 6px 6px 40px;text-align:left;width:14.625rem}.show-icon-labels.interface-pinned-items{border-bottom:1px solid #ccc;display:block;margin:0 -12px;padding:6px 12px 12px}.show-icon-labels.interface-pinned-items>.components-button.has-icon{justify-content:flex-start;margin:0;padding:6px 6px 6px 8px;width:14.625rem}.show-icon-labels.interface-pinned-items>.components-button.has-icon[aria-expanded=true] svg{display:block;max-width:24px}.show-icon-labels.interface-pinned-items>.components-button.has-icon[aria-expanded=false]{padding-left:40px}.show-icon-labels.interface-pinned-items>.components-button.has-icon svg{margin-right:8px}@media (min-width:600px){.edit-post-header__post-preview-button{display:none}}.is-distraction-free .interface-interface-skeleton__header{border-bottom:none}.is-distraction-free .edit-post-header{background-color:#fff;border-bottom:1px solid #e0e0e0;position:absolute;width:100%}.is-distraction-free .edit-post-header>.edit-post-header__settings>.edit-post-header__post-preview-button{visibility:hidden}.is-distraction-free .edit-post-header>.edit-post-header__settings>.editor-preview-dropdown,.is-distraction-free .edit-post-header>.edit-post-header__settings>.interface-pinned-items,.is-distraction-free .edit-post-header>.edit-post-header__toolbar .editor-document-tools__document-overview-toggle{display:none}.is-distraction-free .interface-interface-skeleton__header:focus-within{opacity:1!important}.is-distraction-free .interface-interface-skeleton__header:focus-within div{transform:translateX(0) translateZ(0)!important}.is-distraction-free .components-editor-notices__dismissible{position:absolute;z-index:35}.edit-post-fullscreen-mode-close.components-button{display:none}@media (min-width:782px){.edit-post-fullscreen-mode-close.components-button{align-items:center;align-self:stretch;background:#1e1e1e;border:none;border-radius:0;color:#fff;display:flex;height:61px;margin-bottom:-1px;position:relative;width:60px}.edit-post-fullscreen-mode-close.components-button:active{color:#fff}.edit-post-fullscreen-mode-close.components-button:focus{box-shadow:none}.edit-post-fullscreen-mode-close.components-button:before{border-radius:4px;bottom:10px;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) #1e1e1e;content:"";display:block;left:9px;position:absolute;right:9px;top:9px;transition:box-shadow .1s ease}}@media (min-width:782px) and (prefers-reduced-motion:reduce){.edit-post-fullscreen-mode-close.components-button:before{transition-delay:0s;transition-duration:0s}}@media (min-width:782px){.edit-post-fullscreen-mode-close.components-button:hover:before{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) #757575}.edit-post-fullscreen-mode-close.components-button.has-icon:hover:before{box-shadow:none}.edit-post-fullscreen-mode-close.components-button:focus:before{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) #ffffff1a,inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}}.edit-post-fullscreen-mode-close.components-button .edit-post-fullscreen-mode-close_site-icon{border-radius:2px;height:36px;margin-top:-1px;object-fit:cover;width:36px}.edit-post-keyboard-shortcut-help-modal__section{margin:0 0 2rem}.edit-post-keyboard-shortcut-help-modal__section-title{font-size:.9rem;font-weight:600}.edit-post-keyboard-shortcut-help-modal__shortcut{align-items:baseline;border-top:1px solid #ddd;display:flex;margin-bottom:0;padding:.6rem 0}.edit-post-keyboard-shortcut-help-modal__shortcut:last-child{border-bottom:1px solid #ddd}.edit-post-keyboard-shortcut-help-modal__shortcut:empty{display:none}.edit-post-keyboard-shortcut-help-modal__shortcut-term{font-weight:600;margin:0 0 0 1rem;text-align:right}.edit-post-keyboard-shortcut-help-modal__shortcut-description{flex:1;flex-basis:auto;margin:0}.edit-post-keyboard-shortcut-help-modal__shortcut-key-combination{background:none;display:block;margin:0;padding:0}.edit-post-keyboard-shortcut-help-modal__shortcut-key-combination+.edit-post-keyboard-shortcut-help-modal__shortcut-key-combination{margin-top:10px}.edit-post-keyboard-shortcut-help-modal__shortcut-key{border-radius:8%;margin:0 .2rem;padding:.25rem .5rem}.edit-post-keyboard-shortcut-help-modal__shortcut-key:last-child{margin:0 0 0 .2rem}.edit-post-layout__metaboxes{clear:both;flex-shrink:0}.edit-post-layout .components-editor-notices__snackbar{bottom:40px;padding-left:16px;padding-right:16px;position:fixed;right:0}.is-distraction-free .components-editor-notices__snackbar{bottom:20px}.edit-post-layout .components-editor-notices__snackbar{left:0}@media (min-width:783px){.edit-post-layout .components-editor-notices__snackbar{left:160px}}@media (min-width:783px){.auto-fold .edit-post-layout .components-editor-notices__snackbar{left:36px}}@media (min-width:961px){.auto-fold .edit-post-layout .components-editor-notices__snackbar{left:160px}}.folded .edit-post-layout .components-editor-notices__snackbar{left:0}@media (min-width:783px){.folded .edit-post-layout .components-editor-notices__snackbar{left:36px}}body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar{left:0!important}.edit-post-layout .editor-post-publish-panel{bottom:0;left:0;overflow:auto;position:fixed;right:0;top:46px;z-index:100001}@media (min-width:782px){.edit-post-layout .editor-post-publish-panel{animation:edit-post-post-publish-panel__slide-in-animation .1s forwards;border-left:1px solid #ddd;left:auto;top:32px;transform:translateX(100%);width:281px;z-index:99998}}@media (min-width:782px) and (prefers-reduced-motion:reduce){.edit-post-layout .editor-post-publish-panel{animation-delay:0s;animation-duration:1ms}}@media (min-width:782px){body.is-fullscreen-mode .edit-post-layout .editor-post-publish-panel{top:0}[role=region]:focus .edit-post-layout .editor-post-publish-panel{transform:translateX(0)}}@keyframes edit-post-post-publish-panel__slide-in-animation{to{transform:translateX(0)}}.edit-post-layout .editor-post-publish-panel__header-publish-button{justify-content:center}.edit-post-layout__toggle-entities-saved-states-panel,.edit-post-layout__toggle-publish-panel,.edit-post-layout__toggle-sidebar-panel{background-color:#fff;border:1px dotted #ddd;bottom:auto;box-sizing:border-box;display:flex;height:auto!important;justify-content:center;left:auto;padding:24px;position:fixed!important;right:0;top:-9999em;width:280px;z-index:100000}.interface-interface-skeleton__actions:focus .edit-post-layout__toggle-entities-saved-states-panel,.interface-interface-skeleton__actions:focus .edit-post-layout__toggle-publish-panel,.interface-interface-skeleton__actions:focus-within .edit-post-layout__toggle-entities-saved-states-panel,.interface-interface-skeleton__actions:focus-within .edit-post-layout__toggle-publish-panel,.interface-interface-skeleton__sidebar:focus .edit-post-layout__toggle-sidebar-panel,.interface-interface-skeleton__sidebar:focus-within .edit-post-layout__toggle-sidebar-panel{bottom:0;top:auto}.edit-post-layout .entities-saved-states__panel-header{height:61px}.edit-post-meta-boxes-area{position:relative}.edit-post-meta-boxes-area .inside,.edit-post-meta-boxes-area__container{box-sizing:initial}.edit-post-meta-boxes-area input,.edit-post-meta-boxes-area textarea{box-sizing:border-box}.edit-post-meta-boxes-area .postbox-header{border-bottom:0;border-top:1px solid #ddd}.edit-post-meta-boxes-area #poststuff{margin:0 auto;min-width:auto;padding-top:0}.edit-post-meta-boxes-area #poststuff .stuffbox>h3,.edit-post-meta-boxes-area #poststuff h2.hndle,.edit-post-meta-boxes-area #poststuff h3.hndle{box-sizing:border-box;color:inherit;font-weight:600;outline:none;padding:0 24px;position:relative;width:100%}.edit-post-meta-boxes-area .postbox{border:0;color:inherit;margin-bottom:0}.edit-post-meta-boxes-area .postbox>.inside{color:inherit;margin:0;padding:0 24px 24px}.edit-post-meta-boxes-area .postbox .handlediv{height:44px;width:44px}.edit-post-meta-boxes-area.is-loading:before{background:#0000;bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:1}.edit-post-meta-boxes-area .components-spinner{position:absolute;right:20px;top:10px;z-index:5}.edit-post-meta-boxes-area .is-hidden{display:none}.edit-post-meta-boxes-area .metabox-location-side .postbox input[type=checkbox]{border:1px solid #757575}.edit-post-meta-boxes-area .metabox-location-side .postbox input[type=checkbox]:checked{background:#fff;border-color:#757575}.edit-post-meta-boxes-area .metabox-location-side .postbox input[type=checkbox]:before{margin:-3px -4px}.edit-post-meta-boxes-area__clear{clear:both}.components-panel__header.edit-post-sidebar__panel-tabs{padding-left:0;padding-right:16px}.components-panel__header.edit-post-sidebar__panel-tabs .components-button.has-icon{height:24px;min-width:24px;padding:0}@media (min-width:782px){.components-panel__header.edit-post-sidebar__panel-tabs .components-button.has-icon{display:flex}}.edit-post-sidebar__panel{margin-top:-1px}.edit-post-post-format,.edit-post-post-slug{align-items:stretch;display:flex;flex-direction:column}.edit-post-post-visibility__dialog .editor-post-visibility{margin:8px;min-width:248px}h2.edit-post-template-summary__title{font-weight:500;line-height:24px;margin:0 0 4px}.edit-post-text-editor{background-color:#fff;flex-grow:1;position:relative;width:100%}.edit-post-text-editor .editor-post-title.is-raw-text textarea,.edit-post-text-editor .editor-post-title:not(.is-raw-text){border:1px solid #949494;border-radius:0;font-family:Menlo,Consolas,monaco,monospace;font-size:2.5em;font-weight:400;line-height:1.4;max-width:none;padding:16px}@media (min-width:600px){.edit-post-text-editor .editor-post-title.is-raw-text textarea,.edit-post-text-editor .editor-post-title:not(.is-raw-text){padding:24px}}.edit-post-text-editor .editor-post-title.is-raw-text textarea:focus,.edit-post-text-editor .editor-post-title:not(.is-raw-text):focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.edit-post-text-editor__body{margin-left:auto;margin-right:auto;max-width:1080px;padding:0 12px 12px;width:100%}@media (min-width:960px){.edit-post-text-editor__body{padding:0 24px 24px}}.edit-post-text-editor__toolbar{background:#fffc;display:flex;left:0;padding:4px 12px;position:sticky;right:0;top:0;z-index:1}@media (min-width:600px){.edit-post-text-editor__toolbar{padding:12px}}@media (min-width:960px){.edit-post-text-editor__toolbar{padding:12px 24px}}.edit-post-text-editor__toolbar h2{color:#1e1e1e;font-size:13px;line-height:36px;margin:0 auto 0 0}.edit-post-visual-editor{background-color:#ddd;display:flex;flex:1 0 auto;flex-flow:column;position:relative}.edit-post-visual-editor:not(.has-inline-canvas){overflow:hidden}.edit-post-visual-editor .components-button{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;padding:6px 12px}.edit-post-visual-editor .components-button.has-icon{padding:6px}.edit-post-visual-editor__content-area{box-sizing:border-box;display:flex;flex-grow:1;height:100%;position:relative;width:100%}.edit-post-welcome-guide,.edit-template-welcome-guide{width:312px}.edit-post-welcome-guide__image,.edit-template-welcome-guide__image{background:#00a0d2;margin:0 0 16px}.edit-post-welcome-guide__image>img,.edit-template-welcome-guide__image>img{display:block;max-width:100%;object-fit:cover}.edit-post-welcome-guide__heading,.edit-template-welcome-guide__heading{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:24px;line-height:1.4;margin:16px 0;padding:0 32px}.edit-post-welcome-guide__text,.edit-template-welcome-guide__text{font-size:13px;line-height:1.4;margin:0 0 24px;padding:0 32px}.edit-post-welcome-guide__inserter-icon,.edit-template-welcome-guide__inserter-icon{margin:0 4px;vertical-align:text-top}.edit-template-welcome-guide .components-button svg{fill:#fff}.edit-post-start-page-options__modal-content .block-editor-block-patterns-list{column-count:2;column-gap:24px}@media (min-width:782px){.edit-post-start-page-options__modal-content .block-editor-block-patterns-list{column-count:3}}@media (min-width:1280px){.edit-post-start-page-options__modal-content .block-editor-block-patterns-list{column-count:4}}.edit-post-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{break-inside:avoid-column;margin-bottom:24px}.edit-post-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-preview__container{min-height:100px}.edit-post-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-preview__content{width:100%}@keyframes edit-post__fade-in-animation{0%{opacity:0}to{opacity:1}}body.js.block-editor-page{background:#fff}body.js.block-editor-page #wpcontent{padding-left:0}body.js.block-editor-page #wpbody-content{padding-bottom:0}body.js.block-editor-page #wpbody-content>div:not(.block-editor):not(#screen-meta),body.js.block-editor-page #wpfooter{display:none}body.js.block-editor-page .a11y-speak-region{left:-1px;top:-1px}body.js.block-editor-page ul#adminmenu a.wp-has-current-submenu:after,body.js.block-editor-page ul#adminmenu>li.current>a.current:after{border-right-color:#fff}body.js.block-editor-page .media-frame select.attachment-filters:last-of-type{max-width:100%;width:auto}.block-editor-page #wpwrap{overflow-y:auto}@media (min-width:782px){.block-editor-page #wpwrap{overflow-y:initial}}.components-modal__frame,.edit-post-header,.edit-post-sidebar,.edit-post-text-editor,.editor-post-publish-panel{box-sizing:border-box}.components-modal__frame *,.components-modal__frame :after,.components-modal__frame :before,.edit-post-header *,.edit-post-header :after,.edit-post-header :before,.edit-post-sidebar *,.edit-post-sidebar :after,.edit-post-sidebar :before,.edit-post-text-editor *,.edit-post-text-editor :after,.edit-post-text-editor :before,.editor-post-publish-panel *,.editor-post-publish-panel :after,.editor-post-publish-panel :before{box-sizing:inherit}@media (min-width:600px){.block-editor__container{bottom:0;left:0;min-height:calc(100vh - 46px);position:absolute;right:0;top:0}}@media (min-width:782px){.block-editor__container{min-height:calc(100vh - 32px)}body.is-fullscreen-mode .block-editor__container{min-height:100vh}}.block-editor__container img{height:auto;max-width:100%}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color--rgb:0,133,186;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-10--rgb:0,115,161;--wp-admin-theme-color-darker-20:#006187;--wp-admin-theme-color-darker-20--rgb:0,97,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-light{--wp-admin-border-width-focus:1.5px}}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color--rgb:56,88,233;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-10--rgb:33,69,230;--wp-admin-theme-color-darker-20:#183ad6;--wp-admin-theme-color-darker-20--rgb:24,58,214;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-modern{--wp-admin-border-width-focus:1.5px}}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color--rgb:9,100,132;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-10--rgb:7,82,108;--wp-admin-theme-color-darker-20:#064054;--wp-admin-theme-color-darker-20--rgb:6,64,84;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-blue{--wp-admin-border-width-focus:1.5px}}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color--rgb:70,64,60;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-10--rgb:56,51,48;--wp-admin-theme-color-darker-20:#2b2724;--wp-admin-theme-color-darker-20--rgb:43,39,36;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-coffee{--wp-admin-border-width-focus:1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color--rgb:82,63,109;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-10--rgb:70,54,93;--wp-admin-theme-color-darker-20:#3a2c4d;--wp-admin-theme-color-darker-20--rgb:58,44,77;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus:1.5px}}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color--rgb:225,77,67;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-10--rgb:221,56,45;--wp-admin-theme-color-darker-20:#d02c21;--wp-admin-theme-color-darker-20--rgb:208,44,33;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-midnight{--wp-admin-border-width-focus:1.5px}}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color--rgb:98,124,131;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-10--rgb:87,110,116;--wp-admin-theme-color-darker-20:#4c6066;--wp-admin-theme-color-darker-20--rgb:76,96,102;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-ocean{--wp-admin-border-width-focus:1.5px}}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color--rgb:221,130,59;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-10--rgb:217,116,38;--wp-admin-theme-color-darker-20:#c36922;--wp-admin-theme-color-darker-20--rgb:195,105,34;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus:1.5px}}.interface-interface-skeleton__sidebar{border-left:none}@media (min-width:782px){.is-sidebar-opened .interface-interface-skeleton__sidebar{border-left:1px solid #e0e0e0;overflow:hidden scroll}} \ 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 02b8d85..3adcd41 100644
--- a/wp-includes/js/dist/block-editor.js
+++ b/wp-includes/js/dist/block-editor.js
@@ -42439,11 +42439,13 @@ function PatternsListHeader({
function PatternList({
searchValue,
selectedCategory,
- patternCategories
+ patternCategories,
+ rootClientId
}) {
const container = (0,external_wp_element_namespaceObject.useRef)();
const debouncedSpeak = (0,external_wp_compose_namespaceObject.useDebounce)(external_wp_a11y_namespaceObject.speak, 500);
const [destinationRootClientId, onInsertBlocks] = use_insertion_point({
+ rootClientId,
shouldFocusBlock: true
});
const [patterns,, onClickPattern] = use_patterns_state(onInsertBlocks, destinationRootClientId);
@@ -42589,7 +42591,8 @@ function PatternsExplorer({
searchValue: searchValue,
selectedCategory: selectedCategory,
patternCategories: patternCategories,
- patternSourceFilter: patternSourceFilter
+ patternSourceFilter: patternSourceFilter,
+ rootClientId: rootClientId
}));
}
function PatternsExplorerModal({
@@ -60705,7 +60708,8 @@ const ImageURLInputUI = ({
rel,
showLightboxSetting,
lightboxEnabled,
- onSetLightbox
+ onSetLightbox,
+ resetLightbox
}) => {
const [isOpen, setIsOpen] = (0,external_wp_element_namespaceObject.useState)(false);
// Use internal state instead of a ref to make sure that the component
@@ -60866,8 +60870,52 @@ const ImageURLInputUI = ({
onChange: onSetLinkClass
}));
const linkEditorValue = urlInput !== null ? urlInput : url;
- const showLinkEditor = (!linkEditorValue && !lightboxEnabled) === true;
+ const hideLightboxPanel = !lightboxEnabled || lightboxEnabled && !showLightboxSetting;
+ const showLinkEditor = !linkEditorValue && hideLightboxPanel;
const urlLabel = (getLinkDestinations().find(destination => destination.linkDestination === linkDestination) || {}).title;
+ const PopoverChildren = () => {
+ if (lightboxEnabled && showLightboxSetting && !url && !isEditingLink) {
+ return (0,external_React_.createElement)("div", {
+ className: "block-editor-url-popover__expand-on-click"
+ }, (0,external_React_.createElement)(build_module_icon, {
+ icon: library_fullscreen
+ }), (0,external_React_.createElement)("div", {
+ className: "text"
+ }, (0,external_React_.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('Expand on click')), (0,external_React_.createElement)("p", {
+ className: "description"
+ }, (0,external_wp_i18n_namespaceObject.__)('Scales the image with a lightbox effect'))), (0,external_React_.createElement)(external_wp_components_namespaceObject.Button, {
+ icon: link_off,
+ label: (0,external_wp_i18n_namespaceObject.__)('Disable expand on click'),
+ onClick: () => {
+ onSetLightbox(false);
+ },
+ size: "compact"
+ }));
+ } else if (!url || isEditingLink) {
+ return (0,external_React_.createElement)(url_popover.LinkEditor, {
+ className: "block-editor-format-toolbar__link-container-content",
+ value: linkEditorValue,
+ onChangeInputValue: setUrlInput,
+ onSubmit: onSubmitLinkChange(),
+ autocompleteRef: autocompleteRef
+ });
+ } else if (url && !isEditingLink) {
+ return (0,external_React_.createElement)(external_React_.Fragment, null, (0,external_React_.createElement)(url_popover.LinkViewer, {
+ className: "block-editor-format-toolbar__link-container-content",
+ url: url,
+ onEditLinkClick: startEditLink,
+ urlLabel: urlLabel
+ }), (0,external_React_.createElement)(external_wp_components_namespaceObject.Button, {
+ icon: link_off,
+ label: (0,external_wp_i18n_namespaceObject.__)('Remove link'),
+ onClick: () => {
+ onLinkRemove();
+ resetLightbox();
+ },
+ size: "compact"
+ }));
+ }
+ };
return (0,external_React_.createElement)(external_React_.Fragment, null, (0,external_React_.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
icon: library_link,
className: "components-toolbar__control",
@@ -60875,13 +60923,13 @@ const ImageURLInputUI = ({
"aria-expanded": isOpen,
onClick: openLinkUI,
ref: setPopoverAnchor,
- isActive: !!url || lightboxEnabled
+ isActive: !!url || lightboxEnabled && showLightboxSetting
}), isOpen && (0,external_React_.createElement)(url_popover, {
ref: wrapperRef,
anchor: popoverAnchor,
onFocusOutside: onFocusOutside(),
onClose: closeLinkUI,
- renderSettings: !lightboxEnabled ? () => advancedOptions : null,
+ renderSettings: hideLightboxPanel ? () => advancedOptions : null,
additionalControls: showLinkEditor && (0,external_React_.createElement)(external_wp_components_namespaceObject.NavigableMenu, null, getLinkDestinations().map(link => (0,external_React_.createElement)(external_wp_components_namespaceObject.MenuItem, {
key: link.linkDestination,
icon: link.icon,
@@ -60908,38 +60956,7 @@ const ImageURLInputUI = ({
}
}, (0,external_wp_i18n_namespaceObject.__)('Expand on click'))),
offset: 13
- }, (!url || isEditingLink) && !lightboxEnabled && (0,external_React_.createElement)(external_React_.Fragment, null, (0,external_React_.createElement)(url_popover.LinkEditor, {
- className: "block-editor-format-toolbar__link-container-content",
- value: linkEditorValue,
- onChangeInputValue: setUrlInput,
- onSubmit: onSubmitLinkChange(),
- autocompleteRef: autocompleteRef
- })), url && !isEditingLink && !lightboxEnabled && (0,external_React_.createElement)(external_React_.Fragment, null, (0,external_React_.createElement)(url_popover.LinkViewer, {
- className: "block-editor-format-toolbar__link-container-content",
- url: url,
- onEditLinkClick: startEditLink,
- urlLabel: urlLabel
- }), (0,external_React_.createElement)(external_wp_components_namespaceObject.Button, {
- icon: link_off,
- label: (0,external_wp_i18n_namespaceObject.__)('Remove link'),
- onClick: onLinkRemove,
- size: "compact"
- })), !url && !isEditingLink && lightboxEnabled && (0,external_React_.createElement)("div", {
- className: "block-editor-url-popover__expand-on-click"
- }, (0,external_React_.createElement)(build_module_icon, {
- icon: library_fullscreen
- }), (0,external_React_.createElement)("div", {
- className: "text"
- }, (0,external_React_.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('Expand on click')), (0,external_React_.createElement)("p", {
- className: "description"
- }, (0,external_wp_i18n_namespaceObject.__)('Scales the image with a lightbox effect'))), (0,external_React_.createElement)(external_wp_components_namespaceObject.Button, {
- icon: link_off,
- label: (0,external_wp_i18n_namespaceObject.__)('Disable expand on click'),
- onClick: () => {
- onSetLightbox(false);
- },
- size: "compact"
- }))));
+ }, PopoverChildren()));
};
@@ -62395,12 +62412,12 @@ const DeprecatedExperimentalRecursionProvider = props => {
...props
});
};
-const DeprecatedExperimentalUseHasRecursion = props => {
+const DeprecatedExperimentalUseHasRecursion = (...args) => {
external_wp_deprecated_default()('wp.blockEditor.__experimentalUseHasRecursion', {
since: '6.5',
alternative: 'wp.blockEditor.useHasRecursion'
});
- return useHasRecursion(...props);
+ return useHasRecursion(...args);
};
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
diff --git a/wp-includes/js/dist/block-editor.min.js b/wp-includes/js/dist/block-editor.min.js
index e3800c0..708e1ba 100644
--- a/wp-includes/js/dist/block-editor.min.js
+++ b/wp-includes/js/dist/block-editor.min.js
@@ -23,7 +23,7 @@
* @return {boolean} True if the event is supported.
* @internal
* @license Modernizr 3.0.0pre (Custom Build) | MIT
- */,e.exports=function(e,t){if(!r.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,l=n in document;if(!l){var i=document.createElement("div");i.setAttribute(n,"return;"),l="function"==typeof i[n]}return!l&&o&&"wheel"===e&&(l=document.implementation.hasFeature("Events.wheel","3.0")),l}},7191:(e,t,n)=>{"use strict";var o=n(2213),r=n(1087);function l(e){var t=0,n=0,o=0,r=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),o=10*t,r=10*n,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(o=e.deltaX),(o||r)&&e.deltaMode&&(1==e.deltaMode?(o*=40,r*=40):(o*=800,r*=800)),o&&!t&&(t=o<1?-1:1),r&&!n&&(n=r<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:r}}l.getEventType=function(){return o.firefox()?"DOMMouseScroll":r("wheel")?"wheel":"mousewheel"},e.exports=l},2775:e=>{var t=String,n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};e.exports=n(),e.exports.createColors=n},4465:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8036:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};n(4465);const r=o(n(4529)),l=o(n(3576));e.exports=(0,l.default)(r.default)},5525:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prefixWrapCSSSelector=t.prefixWrapCSSRule=void 0;const o=n(3467);t.prefixWrapCSSRule=(e,n,r,l,i)=>{const s=e.selector.split(",").filter((e=>!(0,o.cssRuleMatchesPrefixSelector)({selector:e},l)));0!==s.length&&(e.selector=s.map((o=>(0,t.prefixWrapCSSSelector)(o,e,n,r,l,i))).filter(o.isValidCSSSelector).join(", "))};t.prefixWrapCSSSelector=(e,t,n,r,l,i)=>{const s=(0,o.cleanSelector)(e);return""===s?null:null!==n&&s.startsWith(n,0)||(0,o.isKeyframes)(t)||r.some((e=>s.match(e)))?s:(0,o.isNotRootTag)(s)?l+" "+s:i?l+" ."+s:s.replace(/^(body|html|:root)/,l)}},3467:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cssRuleMatchesPrefixSelector=t.isNotRootTag=t.isKeyframes=t.cleanSelector=t.isValidCSSSelector=void 0;const n=/(^\s*|\s*$)/g,o=/^(body|html|:root).*$/;t.isValidCSSSelector=e=>null!==e;t.cleanSelector=e=>e.replace(n,"");t.isKeyframes=e=>{const{parent:t}=e,n=t;return void 0!==t&&"atrule"===n.type&&void 0!==n.name&&null!==n.name.match(/keyframes$/)};t.isNotRootTag=e=>!e.match(o);t.cssRuleMatchesPrefixSelector=(e,t)=>{const n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^${n}$`).test(e.selector)}},9411:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldIncludeFilePath=void 0;t.shouldIncludeFilePath=(e,t,n)=>t.length>0?null!=e&&t.some((t=>e.match(t))):!(n.length>0)||!(null!=e&&n.some((t=>e.match(t))))},8061:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.asPostCSSv7PluginGenerator=void 0;const i=l(n(1311));t.asPostCSSv7PluginGenerator=e=>e.plugin(i.PLUGIN_NAME,((e,t)=>new i.default(e,t).prefix()))},2888:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.asPostCSSv8PluginGenerator=t.isPostCSSv8=void 0;const i=l(n(1311));t.isPostCSSv8=e=>void 0!==e.Root;t.asPostCSSv8PluginGenerator=()=>(e,t)=>{const n=new i.default(e,t);return{postcssPlugin:i.PLUGIN_NAME,Once(e){n.prefixRoot(e)}}}},3576:(e,t,n)=>{"use strict";const o=n(2888),r=n(8061);e.exports=e=>(0,o.isPostCSSv8)(e)?(0,o.asPostCSSv8PluginGenerator)():(0,r.asPostCSSv7PluginGenerator)(e)},1311:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PLUGIN_NAME=void 0;const o=n(5525),r=n(9411);t.PLUGIN_NAME="postcss-prefixwrap";t.default=class{blacklist;ignoredSelectors;isPrefixSelector;prefixRootTags;prefixSelector;whitelist;nested;constructor(e,t={}){this.blacklist=t.blacklist??[],this.ignoredSelectors=t.ignoredSelectors??[],this.isPrefixSelector=new RegExp(`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`),this.prefixRootTags=t.prefixRootTags??!1,this.prefixSelector=e,this.whitelist=t.whitelist??[],this.nested=t.nested??null}prefixRoot(e){(0,r.shouldIncludeFilePath)(e.source?.input?.file,this.whitelist,this.blacklist)&&e.walkRules((e=>{(0,o.prefixWrapCSSRule)(e,this.nested,this.ignoredSelectors,this.prefixSelector,this.prefixRootTags)}))}prefix(){return e=>{this.prefixRoot(e)}}}},5404:(e,t,n)=>{const o=n(1544);e.exports=e=>{const t=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(n){const r=o(n.value);let l=!1;r.walk((n=>{if("function"!==n.type||"url"!==n.value)return;const o=n.nodes[0].value,r=new URL(o,e.rootUrl);return r.pathname===o&&t.skipHostRelativeUrls||(n.nodes[0].value=r.toString(),l=!0),!1})),l&&(n.value=o.stringify(r))}}},e.exports.postcss=!0},1544:(e,t,n)=>{var o=n(8491),r=n(3815),l=n(4725);function i(e){return this instanceof i?(this.nodes=o(e),this):new i(e)}i.prototype.toString=function(){return Array.isArray(this.nodes)?l(this.nodes):""},i.prototype.walk=function(e,t){return r(this.nodes,e,t),this},i.unit=n(1524),i.walk=r,i.stringify=l,e.exports=i},8491:e=>{var t="(".charCodeAt(0),n=")".charCodeAt(0),o="'".charCodeAt(0),r='"'.charCodeAt(0),l="\\".charCodeAt(0),i="/".charCodeAt(0),s=",".charCodeAt(0),a=":".charCodeAt(0),c="*".charCodeAt(0),u="u".charCodeAt(0),d="U".charCodeAt(0),p="+".charCodeAt(0),m=/^[a-f0-9?-]+$/i;e.exports=function(e){for(var h,g,f,b,v,k,_,y,E,w=[],S=e,C=0,x=S.charCodeAt(C),B=S.length,I=[{nodes:w}],T=0,M="",P="",R="";C<B;)if(x<=32){h=C;do{h+=1,x=S.charCodeAt(h)}while(x<=32);b=S.slice(C,h),f=w[w.length-1],x===n&&T?R=b:f&&"div"===f.type?(f.after=b,f.sourceEndIndex+=b.length):x===s||x===a||x===i&&S.charCodeAt(h+1)!==c&&(!E||E&&"function"===E.type&&"calc"!==E.value)?P=b:w.push({type:"space",sourceIndex:C,sourceEndIndex:h,value:b}),C=h}else if(x===o||x===r){h=C,b={type:"string",sourceIndex:C,quote:g=x===o?"'":'"'};do{if(v=!1,~(h=S.indexOf(g,h+1)))for(k=h;S.charCodeAt(k-1)===l;)k-=1,v=!v;else h=(S+=g).length-1,b.unclosed=!0}while(v);b.value=S.slice(C+1,h),b.sourceEndIndex=b.unclosed?h:h+1,w.push(b),C=h+1,x=S.charCodeAt(C)}else if(x===i&&S.charCodeAt(C+1)===c)b={type:"comment",sourceIndex:C,sourceEndIndex:(h=S.indexOf("*/",C))+2},-1===h&&(b.unclosed=!0,h=S.length,b.sourceEndIndex=h),b.value=S.slice(C+2,h),w.push(b),C=h+2,x=S.charCodeAt(C);else if(x!==i&&x!==c||!E||"function"!==E.type||"calc"!==E.value)if(x===i||x===s||x===a)b=S[C],w.push({type:"div",sourceIndex:C-P.length,sourceEndIndex:C+b.length,value:b,before:P,after:""}),P="",C+=1,x=S.charCodeAt(C);else if(t===x){h=C;do{h+=1,x=S.charCodeAt(h)}while(x<=32);if(y=C,b={type:"function",sourceIndex:C-M.length,value:M,before:S.slice(y+1,h)},C=h,"url"===M&&x!==o&&x!==r){h-=1;do{if(v=!1,~(h=S.indexOf(")",h+1)))for(k=h;S.charCodeAt(k-1)===l;)k-=1,v=!v;else h=(S+=")").length-1,b.unclosed=!0}while(v);_=h;do{_-=1,x=S.charCodeAt(_)}while(x<=32);y<_?(b.nodes=C!==_+1?[{type:"word",sourceIndex:C,sourceEndIndex:_+1,value:S.slice(C,_+1)}]:[],b.unclosed&&_+1!==h?(b.after="",b.nodes.push({type:"space",sourceIndex:_+1,sourceEndIndex:h,value:S.slice(_+1,h)})):(b.after=S.slice(_+1,h),b.sourceEndIndex=h)):(b.after="",b.nodes=[]),C=h+1,b.sourceEndIndex=b.unclosed?h:C,x=S.charCodeAt(C),w.push(b)}else T+=1,b.after="",b.sourceEndIndex=C+1,w.push(b),I.push(b),w=b.nodes=[],E=b;M=""}else if(n===x&&T)C+=1,x=S.charCodeAt(C),E.after=R,E.sourceEndIndex+=R.length,R="",T-=1,I[I.length-1].sourceEndIndex=C,I.pop(),w=(E=I[T]).nodes;else{h=C;do{x===l&&(h+=1),h+=1,x=S.charCodeAt(h)}while(h<B&&!(x<=32||x===o||x===r||x===s||x===a||x===i||x===t||x===c&&E&&"function"===E.type&&"calc"===E.value||x===i&&"function"===E.type&&"calc"===E.value||x===n&&T));b=S.slice(C,h),t===x?M=b:u!==b.charCodeAt(0)&&d!==b.charCodeAt(0)||p!==b.charCodeAt(1)||!m.test(b.slice(2))?w.push({type:"word",sourceIndex:C,sourceEndIndex:h,value:b}):w.push({type:"unicode-range",sourceIndex:C,sourceEndIndex:h,value:b}),C=h}else b=S[C],w.push({type:"word",sourceIndex:C-P.length,sourceEndIndex:C+b.length,value:b}),C+=1,x=S.charCodeAt(C);for(C=I.length-1;C;C-=1)I[C].unclosed=!0,I[C].sourceEndIndex=S.length;return I[0].nodes}},4725:e=>{function t(e,t){var o,r,l=e.type,i=e.value;return t&&void 0!==(r=t(e))?r:"word"===l||"space"===l?i:"string"===l?(o=e.quote||"")+i+(e.unclosed?"":o):"comment"===l?"/*"+i+(e.unclosed?"":"*/"):"div"===l?(e.before||"")+i+(e.after||""):Array.isArray(e.nodes)?(o=n(e.nodes,t),"function"!==l?o:i+"("+(e.before||"")+o+(e.after||"")+(e.unclosed?"":")")):i}function n(e,n){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=t(e[r],n)+o;return o}return t(e,n)}e.exports=n},1524:e=>{var t="-".charCodeAt(0),n="+".charCodeAt(0),o=".".charCodeAt(0),r="e".charCodeAt(0),l="E".charCodeAt(0);e.exports=function(e){var i,s,a,c=0,u=e.length;if(0===u||!function(e){var r,l=e.charCodeAt(0);if(l===n||l===t){if((r=e.charCodeAt(1))>=48&&r<=57)return!0;var i=e.charCodeAt(2);return r===o&&i>=48&&i<=57}return l===o?(r=e.charCodeAt(1))>=48&&r<=57:l>=48&&l<=57}(e))return!1;for((i=e.charCodeAt(c))!==n&&i!==t||c++;c<u&&!((i=e.charCodeAt(c))<48||i>57);)c+=1;if(i=e.charCodeAt(c),s=e.charCodeAt(c+1),i===o&&s>=48&&s<=57)for(c+=2;c<u&&!((i=e.charCodeAt(c))<48||i>57);)c+=1;if(i=e.charCodeAt(c),s=e.charCodeAt(c+1),a=e.charCodeAt(c+2),(i===r||i===l)&&(s>=48&&s<=57||(s===n||s===t)&&a>=48&&a<=57))for(c+=s===n||s===t?3:2;c<u&&!((i=e.charCodeAt(c))<48||i>57);)c+=1;return{number:e.slice(0,c),unit:e.slice(c)}}},3815:e=>{e.exports=function e(t,n,o){var r,l,i,s;for(r=0,l=t.length;r<l;r+=1)i=t[r],o||(s=n(i,r,t)),!1!==s&&"function"===i.type&&Array.isArray(i.nodes)&&e(i.nodes,n,o),o&&n(i,r,t)}},1326:(e,t,n)=>{"use strict";let o=n(683);class r extends o{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=r,r.default=r,o.registerAtRule(r)},6589:(e,t,n)=>{"use strict";let o=n(7490);class r extends o{constructor(e){super(e),this.type="comment"}}e.exports=r,r.default=r},683:(e,t,n)=>{"use strict";let o,r,l,i,{isClean:s,my:a}=n(1381),c=n(1516),u=n(6589),d=n(7490);function p(e){return e.map((e=>(e.nodes&&(e.nodes=p(e.nodes)),delete e.source,e)))}function m(e){if(e[s]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)m(t)}class h extends d{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,n,o=this.getIterator();for(;this.indexes[o]<this.proxyOf.nodes.length&&(t=this.indexes[o],n=e(this.proxyOf.nodes[t],t),!1!==n);)this.indexes[o]+=1;return delete this.indexes[o],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map((e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e))):"every"===t||"some"===t?n=>e[t](((e,...t)=>n(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n,o=this.index(e),r=this.normalize(t,this.proxyOf.nodes[o]).reverse();o=this.index(e);for(let e of r)this.proxyOf.nodes.splice(o+1,0,e);for(let e in this.indexes)n=this.indexes[e],o<n&&(this.indexes[e]=n+r.length);return this.markDirty(),this}insertBefore(e,t){let n,o=this.index(e),r=0===o&&"prepend",l=this.normalize(t,this.proxyOf.nodes[o],r).reverse();o=this.index(e);for(let e of l)this.proxyOf.nodes.splice(o,0,e);for(let e in this.indexes)n=this.indexes[e],o<=n&&(this.indexes[e]=n+l.length);return this.markDirty(),this}normalize(e,t){if("string"==typeof e)e=p(o(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new c(e)]}else if(e.selector)e=[new r(e)];else if(e.name)e=[new l(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new u(e)]}return e.map((e=>(e[a]||h.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[s]&&m(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls((o=>{t.props&&!t.props.includes(o.prop)||t.fast&&!o.value.includes(t.fast)||(o.value=o.value.replace(e,n))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,n)=>{let o;try{o=e(t,n)}catch(e){throw t.addToError(e)}return!1!==o&&t.walk&&(o=t.walk(e)),o}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("atrule"===n.type&&e.test(n.name))return t(n,o)})):this.walk(((n,o)=>{if("atrule"===n.type&&n.name===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("atrule"===e.type)return t(e,n)})))}walkComments(e){return this.walk(((t,n)=>{if("comment"===t.type)return e(t,n)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("decl"===n.type&&e.test(n.prop))return t(n,o)})):this.walk(((n,o)=>{if("decl"===n.type&&n.prop===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("decl"===e.type)return t(e,n)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("rule"===n.type&&e.test(n.selector))return t(n,o)})):this.walk(((n,o)=>{if("rule"===n.type&&n.selector===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("rule"===e.type)return t(e,n)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}h.registerParse=e=>{o=e},h.registerRule=e=>{r=e},h.registerAtRule=e=>{l=e},h.registerRoot=e=>{i=e},e.exports=h,h.default=h,h.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,l.prototype):"rule"===e.type?Object.setPrototypeOf(e,r.prototype):"decl"===e.type?Object.setPrototypeOf(e,c.prototype):"comment"===e.type?Object.setPrototypeOf(e,u.prototype):"root"===e.type&&Object.setPrototypeOf(e,i.prototype),e[a]=!0,e.nodes&&e.nodes.forEach((e=>{h.rebuild(e)}))}},356:(e,t,n)=>{"use strict";let o=n(2775),r=n(9746);class l extends Error{constructor(e,t,n,o,r,i){super(e),this.name="CssSyntaxError",this.reason=e,r&&(this.file=r),o&&(this.source=o),i&&(this.plugin=i),void 0!==t&&void 0!==n&&("number"==typeof t?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,l)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=o.isColorSupported),r&&e&&(t=r(t));let n,l,i=t.split(/\r?\n/),s=Math.max(this.line-3,0),a=Math.min(this.line+2,i.length),c=String(a).length;if(e){let{bold:e,gray:t,red:r}=o.createColors(!0);n=t=>e(r(t)),l=e=>t(e)}else n=l=e=>e;return i.slice(s,a).map(((e,t)=>{let o=s+1+t,r=" "+(" "+o).slice(-c)+" | ";if(o===this.line){let t=l(r.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+l(r)+e+"\n "+t+n("^")}return" "+l(r)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=l,l.default=l},1516:(e,t,n)=>{"use strict";let o=n(7490);class r extends o{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}e.exports=r,r.default=r},271:(e,t,n)=>{"use strict";let o,r,l=n(683);class i extends l{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new o(new r,this,e).stringify()}}i.registerLazyResult=e=>{o=e},i.registerProcessor=e=>{r=e},e.exports=i,i.default=i},8940:(e,t,n)=>{"use strict";let o=n(1516),r=n(5696),l=n(6589),i=n(1326),s=n(5380),a=n(9434),c=n(4092);function u(e,t){if(Array.isArray(e))return e.map((e=>u(e)));let{inputs:n,...d}=e;if(n){t=[];for(let e of n){let n={...e,__proto__:s.prototype};n.map&&(n.map={...n.map,__proto__:r.prototype}),t.push(n)}}if(d.nodes&&(d.nodes=e.nodes.map((e=>u(e,t)))),d.source){let{inputId:e,...n}=d.source;d.source=n,null!=e&&(d.source.input=t[e])}if("root"===d.type)return new a(d);if("decl"===d.type)return new o(d);if("rule"===d.type)return new c(d);if("comment"===d.type)return new l(d);if("atrule"===d.type)return new i(d);throw new Error("Unknown node type: "+e.type)}e.exports=u,u.default=u},5380:(e,t,n)=>{"use strict";let{SourceMapConsumer:o,SourceMapGenerator:r}=n(1866),{fileURLToPath:l,pathToFileURL:i}=n(2739),{isAbsolute:s,resolve:a}=n(197),{nanoid:c}=n(5042),u=n(9746),d=n(356),p=n(5696),m=Symbol("fromOffsetCache"),h=Boolean(o&&r),g=Boolean(a&&s);class f{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!g||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=a(t.from)),g&&h){let e=new p(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+c(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,o={}){let r,l,s;if(t&&"object"==typeof t){let e=t,o=n;if("number"==typeof e.offset){let o=this.fromOffset(e.offset);t=o.line,n=o.col}else t=e.line,n=e.column;if("number"==typeof o.offset){let e=this.fromOffset(o.offset);l=e.line,s=e.col}else l=o.line,s=o.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let a=this.origin(t,n,l,s);return r=a?new d(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,o.plugin):new d(e,void 0===l?t:{column:n,line:t},void 0===l?n:{column:s,line:l},this.css,this.file,o.plugin),r.input={column:n,endColumn:s,endLine:l,line:t,source:this.css},this.file&&(i&&(r.input.url=i(this.file).toString()),r.input.file=this.file),r}fromOffset(e){let t,n;if(this[m])n=this[m];else{let e=this.css.split("\n");n=new Array(e.length);let t=0;for(let o=0,r=e.length;o<r;o++)n[o]=t,t+=e[o].length+1;this[m]=n}t=n[n.length-1];let o=0;if(e>=t)o=n.length-1;else{let t,r=n.length-2;for(;o<r;)if(t=o+(r-o>>1),e<n[t])r=t-1;else{if(!(e>=n[t+1])){o=t;break}o=t+1}}return{col:e-n[o]+1,line:o+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:a(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,o){if(!this.map)return!1;let r,a,c=this.map.consumer(),u=c.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof n&&(r=c.originalPositionFor({column:o,line:n})),a=s(u.source)?i(u.source):new URL(u.source,this.map.consumer().sourceRoot||i(this.map.mapFile));let d={column:u.column,endColumn:r&&r.column,endLine:r&&r.line,line:u.line,url:a.toString()};if("file:"===a.protocol){if(!l)throw new Error("file: protocol is not available in this PostCSS build");d.file=l(a)}let p=c.sourceContentFor(u.source);return p&&(d.source=p),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}e.exports=f,f.default=f,u&&u.registerInput&&u.registerInput(f)},448:(e,t,n)=>{"use strict";let{isClean:o,my:r}=n(1381),l=n(1670),i=n(633),s=n(683),a=n(271),c=(n(3122),n(9055)),u=n(4295),d=n(9434);const p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},m={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0},g=0;function f(e){return"object"==typeof e&&"function"==typeof e.then}function b(e){let t=!1,n=p[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,g,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,g,n+"Exit"]:[n,n+"Exit"]}function v(e){let t;return t="document"===e.type?["Document",g,"DocumentExit"]:"root"===e.type?["Root",g,"RootExit"]:b(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function k(e){return e[o]=!1,e.nodes&&e.nodes.forEach((e=>k(e))),e}let _={};class y{constructor(e,t,n){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof y||t instanceof c)o=k(t.root),t.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let e=u;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{o=e(t,n)}catch(e){this.processed=!0,this.error=e}o&&!o[r]&&s.rebuild(o)}else o=k(t);this.result=new c(e,o,n),this.helpers={..._,postcss:_,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!m[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!h[n])if("object"==typeof t[n])for(let o in t[n])e(t,"*"===o?n:n+"-"+o.toLowerCase(),t[n][o]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(f(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[o];){e[o]=!0;let t=[v(e)];for(;t.length>0;){let e=this.visitTick(t);if(f(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>n(e,this.helpers)));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=i;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new l(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(f(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[o];)e[o]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,o]of e){let e;this.result.lastPlugin=n;try{e=o(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(f(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:r}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,o]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return o(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==t.iterator){let r,l=t.iterator;for(;r=n.nodes[n.indexes[l]];)if(n.indexes[l]+=1,!r[o])return r[o]=!0,void e.push(v(r));t.iterator=0,delete n.indexes[l]}let l=t.events;for(;t.eventIndex<l.length;){let e=l[t.eventIndex];if(t.eventIndex+=1,e===g)return void(n.nodes&&n.nodes.length&&(n[o]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[o]=!0;let t=b(e);for(let n of t)if(n===g)e.nodes&&e.each((e=>{e[o]||this.walkSync(e)}));else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}y.registerPostcss=e=>{_=e},e.exports=y,y.default=y,d.registerLazyResult(y),a.registerLazyResult(y)},7374:e=>{"use strict";let t={comma:e=>t.split(e,[","],!0),space:e=>t.split(e,[" ","\n","\t"]),split(e,t,n){let o=[],r="",l=!1,i=0,s=!1,a="",c=!1;for(let n of e)c?c=!1:"\\"===n?c=!0:s?n===a&&(s=!1):'"'===n||"'"===n?(s=!0,a=n):"("===n?i+=1:")"===n?i>0&&(i-=1):0===i&&t.includes(n)&&(l=!0),l?(""!==r&&o.push(r.trim()),r="",l=!1):r+=n;return(n||""!==r)&&o.push(r.trim()),o}};e.exports=t,t.default=t},1670:(e,t,n)=>{"use strict";let{SourceMapConsumer:o,SourceMapGenerator:r}=n(1866),{dirname:l,relative:i,resolve:s,sep:a}=n(197),{pathToFileURL:c}=n(2739),u=n(5380),d=Boolean(o&&r),p=Boolean(l&&s&&i&&a);e.exports=class{constructor(e,t,n,o){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=o,this.originalCSS=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),r=e.root||l(e.file);!1===this.mapOpts.sourcesContent?(t=new o(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),p&&d&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=r.fromSourceMap(e)}else this.map=new r({file:this.outputFile()}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new r({file:this.outputFile()});let e,t,n=1,o=1,l="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((r,s,a)=>{if(this.css+=r,s&&"end"!==a&&(i.generated.line=n,i.generated.column=o-1,s.source&&s.source.start?(i.source=this.sourcePath(s),i.original.line=s.source.start.line,i.original.column=s.source.start.column-1,this.map.addMapping(i)):(i.source=l,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=r.match(/\n/g),e?(n+=e.length,t=r.lastIndexOf("\n"),o=r.length-t):o+=r.length,s&&"start"!==a){let e=s.parent||{raws:{}};("decl"===s.type||"atrule"===s.type&&!s.nodes)&&s===e.last&&!e.raws.semicolon||(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=n,i.generated.column=o-2,this.map.addMapping(i)):(i.source=l,i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=o-1,this.map.addMapping(i)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?l(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=l(s(n,this.mapOpts.annotation)));let o=i(n,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new u(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let o=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(o,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(c){let t=c(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===a&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}},7661:(e,t,n)=>{"use strict";let o=n(1670),r=n(633),l=(n(3122),n(4295));const i=n(9055);class s{constructor(e,t,n){let l;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let s=r;this.result=new i(this._processor,l,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get:()=>a.root});let c=new o(s,l,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=l;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}e.exports=s,s.default=s},7490:(e,t,n)=>{"use strict";let{isClean:o,my:r}=n(1381),l=n(356),i=n(346),s=n(633);function a(e,t){let n=new e.constructor;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;if("proxyCache"===o)continue;let r=e[o],l=typeof r;"parent"===o&&"object"===l?t&&(n[o]=t):"source"===o?n[o]=r:Array.isArray(r)?n[o]=r.map((e=>a(e,n))):("object"===l&&null!==r&&(r=a(r)),n[o]=r)}return n}class c{constructor(e={}){this.raws={},this[o]=!1,this[r]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=a(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:o}=this.rangeBy(t);return this.source.input.error(e,{column:o.column,line:o.line},{column:n.column,line:n.line},t)}return new l(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[o]){this[o]=!1;let e=this;for(;e=e.parent;)e[o]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){let o=(t=this.toString()).indexOf(e.word);-1!==o&&(n=this.positionInside(o,t))}return n}positionInside(e,t){let n=t||this.toString(),o=this.source.start.column,r=this.source.start.line;for(let t=0;t<e;t++)"\n"===n[t]?(o=1,r+=1):o+=1;return{column:o,line:r}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let o=this.toString(),r=o.indexOf(e.word);-1!==r&&(t=this.positionInside(r,o),n=this.positionInside(r+e.word.length,o))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return(new i).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let o of e)o===this?n=!0:n?(this.parent.insertAfter(t,o),t=o):this.parent.insertBefore(t,o);n||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let n={},o=null==t;t=t||new Map;let r=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let o=this[e];if(Array.isArray(o))n[e]=o.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof o&&o.toJSON)n[e]=o.toJSON(null,t);else if("source"===e){let l=t.get(o.input);null==l&&(l=r,t.set(o.input,r),r++),n[e]={end:o.end,inputId:l,start:o.start}}else n[e]=o}return o&&(n.inputs=[...t.keys()].map((e=>e.toJSON()))),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=s){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,n){let o={node:this};for(let e in n)o[e]=n[e];return e.warn(t,o)}get proxyOf(){return this}}e.exports=c,c.default=c},4295:(e,t,n)=>{"use strict";let o=n(683),r=n(3937),l=n(5380);function i(e,t){let n=new l(e,t),o=new r(n);try{o.parse()}catch(e){throw e}return o.root}e.exports=i,i.default=i,o.registerParse(i)},3937:(e,t,n)=>{"use strict";let o=n(1516),r=n(2327),l=n(6589),i=n(1326),s=n(9434),a=n(4092);const c={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,n,o,r=new i;r.name=e[1].slice(1),""===r.name&&this.unnamedAtrule(r,e),this.init(r,e[2]);let l=!1,s=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(a.length>0){for(o=a.length-1,n=a[o];n&&"space"===n[0];)n=a[--o];n&&(r.source.end=this.getPosition(n[3]||n[2]),r.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){l=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(r.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(r,"params",a),l&&(e=a[a.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),s&&(r.nodes=[],this.current=r)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,o=0;for(let r=t-1;r>=0&&(n=e[r],"space"===n[0]||(o+=1,2!==o));r--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(e){let t,n,o,r=0;for(let[l,i]of e.entries()){if(t=i,n=t[0],"("===n&&(r+=1),")"===n&&(r-=1),0===r&&":"===n){if(o){if("word"===o[0]&&"progid"===o[1])continue;return l}this.doubleColon(t)}o=t}return!1}comment(e){let t=new l;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=r(this.input)}decl(e,t){let n=new o;this.init(n,e[0][2]);let r,l=e[e.length-1];for(";"===l[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(l[3]||l[2]||function(e){for(let t=e.length-1;t>=0;t--){let n=e[t],o=n[3]||n[2];if(o)return o}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let i,s=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)s.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(r=e[t],"!important"===r[1].toLowerCase()){n.important=!0;let o=this.stringFrom(e,t);o=this.spacesFromEnd(e)+o," !important"!==o&&(n.raws.important=o);break}if("important"===r[1].toLowerCase()){let o=e.slice(0),r="";for(let e=t;e>0;e--){let t=o[e][0];if(0===r.trim().indexOf("!")&&"space"!==t)break;r=o.pop()[1]+r}0===r.trim().indexOf("!")&&(n.important=!0,n.raws.important=r,e=o)}if("space"!==r[0]&&"comment"!==r[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(n.raws.between+=s.map((e=>e[1])).join(""),s=[]),this.raw(n,"value",s.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new a;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,n=null,o=!1,r=null,l=[],i=e[1].startsWith("--"),s=[],a=e;for(;a;){if(n=a[0],s.push(a),"("===n||"["===n)r||(r=a),l.push("("===n?")":"]");else if(i&&o&&"{"===n)r||(r=a),l.push("}");else if(0===l.length){if(";"===n){if(o)return void this.decl(s,i);break}if("{"===n)return void this.rule(s);if("}"===n){this.tokenizer.back(s.pop()),t=!0;break}":"===n&&(o=!0)}else n===l[l.length-1]&&(l.pop(),0===l.length&&(r=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),l.length>0&&this.unclosedBracket(r),t&&o){if(!i)for(;s.length&&(a=s[s.length-1][0],"space"===a||"comment"===a);)this.tokenizer.back(s.pop());this.decl(s,i)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,o){let r,l,i,s,a=n.length,u="",d=!0;for(let e=0;e<a;e+=1)r=n[e],l=r[0],"space"!==l||e!==a-1||o?"comment"===l?(s=n[e-1]?n[e-1][0]:"empty",i=n[e+1]?n[e+1][0]:"empty",c[s]||c[i]||","===u.slice(-1)?d=!1:u+=r[1]):u+=r[1]:d=!1;if(!d){let o=n.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:o,value:u}}e[t]=u}rule(e){e.pop();let t=new a;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let o=t;o<e.length;o++)n+=e[o][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}},4529:(e,t,n)=>{"use strict";let o=n(356),r=n(1516),l=n(448),i=n(683),s=n(9656),a=n(633),c=n(8940),u=n(271),d=n(5776),p=n(6589),m=n(1326),h=n(9055),g=n(5380),f=n(4295),b=n(7374),v=n(4092),k=n(9434),_=n(7490);function y(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new s(e)}y.plugin=function(e,t){let n,o=!1;function r(...n){console&&console.warn&&!o&&(o=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let r=t(...n);return r.postcssPlugin=e,r.postcssVersion=(new s).version,r}return Object.defineProperty(r,"postcss",{get:()=>(n||(n=r()),n)}),r.process=function(e,t,n){return y([r(n)]).process(e,t)},r},y.stringify=a,y.parse=f,y.fromJSON=c,y.list=b,y.comment=e=>new p(e),y.atRule=e=>new m(e),y.decl=e=>new r(e),y.rule=e=>new v(e),y.root=e=>new k(e),y.document=e=>new u(e),y.CssSyntaxError=o,y.Declaration=r,y.Container=i,y.Processor=s,y.Document=u,y.Comment=p,y.Warning=d,y.AtRule=m,y.Result=h,y.Input=g,y.Rule=v,y.Root=k,y.Node=_,l.registerPostcss(y),e.exports=y,y.default=y},5696:(e,t,n)=>{"use strict";let{SourceMapConsumer:o,SourceMapGenerator:r}=n(1866),{existsSync:l,readFileSync:i}=n(9977),{dirname:s,join:a}=n(197);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,o=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new o(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),o=e.indexOf("*/",n);n>-1&&o>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,o)))}loadFile(e){if(this.root=s(e),l(e))return this.mapFile=e,i(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof o)return r.fromSourceMap(t).toString();if(t instanceof r)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=a(s(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=c,c.default=c},9656:(e,t,n)=>{"use strict";let o=n(7661),r=n(448),l=n(271),i=n(9434);class s{constructor(e=[]){this.version="8.4.35",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new r(this,e,t):new o(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=s,s.default=s,i.registerProcessor(s),l.registerProcessor(s)},9055:(e,t,n)=>{"use strict";let o=n(5776);class r{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new o(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}}e.exports=r,r.default=r},9434:(e,t,n)=>{"use strict";let o,r,l=n(683);class i extends l{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let o=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of o)e.raws.before=t.raws.before;return o}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new o(new r,this,e).stringify()}}i.registerLazyResult=e=>{o=e},i.registerProcessor=e=>{r=e},e.exports=i,i.default=i,l.registerRoot(i)},4092:(e,t,n)=>{"use strict";let o=n(683),r=n(7374);class l extends o{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return r.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}e.exports=l,l.default=l,o.registerRule(l)},346:e=>{"use strict";const t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class n{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,o=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:o&&(n+=" "),e.nodes)this.block(e,n+o);else{let r=(e.raws.between||"")+(t?";":"");this.builder(n+o+r,e)}}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let o=e.parent,r=0;for(;o&&"root"!==o.type;)r+=1,o=o.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<r;e++)n+=t}return n}block(e,t){let n,o=this.raw(e,"between","beforeOpen");this.builder(t+o+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let o=0;o<e.nodes.length;o++){let r=e.nodes[o],l=this.raw(r,"before");l&&this.builder(l),this.stringify(r,t!==o||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),o=e.prop+n+this.rawValue(e,"value");e.important&&(o+=e.raws.important||" !important"),t&&(o+=";"),this.builder(o,e)}document(e){this.body(e)}raw(e,n,o){let r;if(o||(o=n),n&&(r=e.raws[n],void 0!==r))return r;let l=e.parent;if("before"===o){if(!l||"root"===l.type&&l.first===e)return"";if(l&&"document"===l.type)return""}if(!l)return t[o];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[o])return i.rawCache[o];if("before"===o||"after"===o)return this.beforeAfter(e,o);{let t="raw"+((s=o)[0].toUpperCase()+s.slice(1));this[t]?r=this[t](i,e):i.walk((e=>{if(r=e.raws[n],void 0!==r)return!1}))}var s;return void 0===r&&(r=t[o]),i.rawCache[o]=r,r}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((n=>{let o=n.parent;if(o&&o!==e&&o.parent&&o.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let n=e[t],o=e.raws[t];return o&&o.value===n?o.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}e.exports=n,n.default=n},633:(e,t,n)=>{"use strict";let o=n(346);function r(e,t){new o(t).stringify(e)}e.exports=r,r.default=r},1381:e=>{"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},2327:e=>{"use strict";const t="'".charCodeAt(0),n='"'.charCodeAt(0),o="\\".charCodeAt(0),r="/".charCodeAt(0),l="\n".charCodeAt(0),i=" ".charCodeAt(0),s="\f".charCodeAt(0),a="\t".charCodeAt(0),c="\r".charCodeAt(0),u="[".charCodeAt(0),d="]".charCodeAt(0),p="(".charCodeAt(0),m=")".charCodeAt(0),h="{".charCodeAt(0),g="}".charCodeAt(0),f=";".charCodeAt(0),b="*".charCodeAt(0),v=":".charCodeAt(0),k="@".charCodeAt(0),_=/[\t\n\f\r "#'()/;[\\\]{}]/g,y=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,E=/.[\r\n"'(/\\]/,w=/[\da-f]/i;e.exports=function(e,S={}){let C,x,B,I,T,M,P,R,N,L,A=e.css.valueOf(),O=S.ignoreErrors,D=A.length,z=0,V=[],F=[];function H(t){throw e.error("Unclosed "+t,z)}return{back:function(e){F.push(e)},endOfFile:function(){return 0===F.length&&z>=D},nextToken:function(e){if(F.length)return F.pop();if(z>=D)return;let S=!!e&&e.ignoreUnclosed;switch(C=A.charCodeAt(z),C){case l:case i:case a:case c:case s:x=z;do{x+=1,C=A.charCodeAt(x)}while(C===i||C===l||C===a||C===c||C===s);L=["space",A.slice(z,x)],z=x-1;break;case u:case d:case h:case g:case v:case f:case m:{let e=String.fromCharCode(C);L=[e,e,z];break}case p:if(R=V.length?V.pop()[1]:"",N=A.charCodeAt(z+1),"url"===R&&N!==t&&N!==n&&N!==i&&N!==l&&N!==a&&N!==s&&N!==c){x=z;do{if(M=!1,x=A.indexOf(")",x+1),-1===x){if(O||S){x=z;break}H("bracket")}for(P=x;A.charCodeAt(P-1)===o;)P-=1,M=!M}while(M);L=["brackets",A.slice(z,x+1),z,x],z=x}else x=A.indexOf(")",z+1),I=A.slice(z,x+1),-1===x||E.test(I)?L=["(","(",z]:(L=["brackets",I,z,x],z=x);break;case t:case n:B=C===t?"'":'"',x=z;do{if(M=!1,x=A.indexOf(B,x+1),-1===x){if(O||S){x=z+1;break}H("string")}for(P=x;A.charCodeAt(P-1)===o;)P-=1,M=!M}while(M);L=["string",A.slice(z,x+1),z,x],z=x;break;case k:_.lastIndex=z+1,_.test(A),x=0===_.lastIndex?A.length-1:_.lastIndex-2,L=["at-word",A.slice(z,x+1),z,x],z=x;break;case o:for(x=z,T=!0;A.charCodeAt(x+1)===o;)x+=1,T=!T;if(C=A.charCodeAt(x+1),T&&C!==r&&C!==i&&C!==l&&C!==a&&C!==c&&C!==s&&(x+=1,w.test(A.charAt(x)))){for(;w.test(A.charAt(x+1));)x+=1;A.charCodeAt(x+1)===i&&(x+=1)}L=["word",A.slice(z,x+1),z,x],z=x;break;default:C===r&&A.charCodeAt(z+1)===b?(x=A.indexOf("*/",z+2)+1,0===x&&(O||S?x=A.length:H("comment")),L=["comment",A.slice(z,x+1),z,x],z=x):(y.lastIndex=z+1,y.test(A),x=0===y.lastIndex?A.length-1:y.lastIndex-2,L=["word",A.slice(z,x+1),z,x],V.push(L),z=x)}return z++,L},position:function(){return z}}}},3122:e=>{"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},5776:e=>{"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},628:(e,t,n)=>{"use strict";var o=n(4067);function r(){}function l(){}l.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,l,i){if(i!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,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:l,resetWarningCache:r};return n.PropTypes=n,n}},5826:(e,t,n)=>{e.exports=n(628)()},4067:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4462:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n};t.__esModule=!0;var s=n(1609),a=n(5826),c=n(4306),u=n(461),d="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return r(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,o=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||o?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),o=(t.onChange,t.style),r=(t.innerRef,t.children),a=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return s.createElement("textarea",l({},a,{onChange:this.onChange,style:u?l({},o,{maxHeight:u}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),r)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:a.number,maxRows:a.number,onResize:a.func,innerRef:a.any,async:a.bool},t}(s.Component);t.TextareaAutosize=s.forwardRef((function(e,t){return s.createElement(p,l({},e,{innerRef:t}))}))},4132:(e,t,n)=>{"use strict";var o=n(4462);t.A=o.TextareaAutosize},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),o=new RegExp(n,"g"),r=new RegExp(n,"");function l(e){return t[e]}var i=function(e){return e.replace(o,l)};e.exports=i,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=i},1609:e=>{"use strict";e.exports=window.React},9746:()=>{},9977:()=>{},197:()=>{},1866:()=>{},2739:()=>{},5042:e=>{e.exports={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let o="",r=n;for(;r--;)o+=e[Math.random()*e.length|0];return o}}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var l=t[o]={exports:{}};return e[o].call(l.exports,l,l.exports,n),l.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{AlignmentControl:()=>Tg,AlignmentToolbar:()=>Mg,Autocomplete:()=>lf,BlockAlignmentControl:()=>es,BlockAlignmentToolbar:()=>ts,BlockBreadcrumb:()=>mf,BlockCanvas:()=>WC,BlockColorsStyleSelector:()=>YC,BlockContextProvider:()=>ff,BlockControls:()=>Bl,BlockEdit:()=>yf,BlockEditorKeyboardShortcuts:()=>D_,BlockEditorProvider:()=>V_,BlockFormatControls:()=>xl,BlockIcon:()=>qh,BlockInspector:()=>XT,BlockList:()=>Xw,BlockMover:()=>bS,BlockNavigationDropdown:()=>Rx,BlockPreview:()=>Ty,BlockSelectionClearer:()=>H_,BlockSettingsMenu:()=>yC,BlockSettingsMenuControls:()=>jh,BlockStyles:()=>Ax,BlockTitle:()=>pf,BlockToolbar:()=>zC,BlockTools:()=>$C,BlockVerticalAlignmentControl:()=>pi,BlockVerticalAlignmentToolbar:()=>mi,ButtonBlockAppender:()=>uw,ButtonBlockerAppender:()=>cw,ColorPalette:()=>aB,ColorPaletteControl:()=>cB,ContrastChecker:()=>pd,CopyHandler:()=>JT,DefaultBlockAppender:()=>sw,FontSizePicker:()=>kg,HeadingLevelDropdown:()=>Fx,HeightControl:()=>Kp,InnerBlocks:()=>Gw,Inserter:()=>lw,InspectorAdvancedControls:()=>xs,InspectorControls:()=>Bs,JustifyContentControl:()=>fi,JustifyToolbar:()=>bi,LineHeightControl:()=>Vd,MediaPlaceholder:()=>cI,MediaReplaceFlow:()=>ec,MediaUpload:()=>Gs,MediaUploadCheck:()=>Us,MultiSelectScrollIntoView:()=>nM,NavigableToolbar:()=>NC,ObserveTyping:()=>Ww,PanelColorSettings:()=>uI,PlainText:()=>YI,RecursionProvider:()=>cM,ReusableBlocksRenameHint:()=>CM,RichText:()=>KI,RichTextShortcut:()=>JI,RichTextToolbarButton:()=>eT,SETTINGS_DEFAULTS:()=>I,SkipToSelectedBlock:()=>bT,ToolSelector:()=>oT,Typewriter:()=>sM,URLInput:()=>ta,URLInputButton:()=>sT,URLPopover:()=>lI,Warning:()=>wf,WritingFlow:()=>sy,__experimentalBlockAlignmentMatrixControl:()=>uf,__experimentalBlockFullHeightAligmentControl:()=>af,__experimentalBlockPatternSetup:()=>nB,__experimentalBlockPatternsList:()=>rE,__experimentalBlockVariationPicker:()=>Gx,__experimentalBlockVariationTransforms:()=>iB,__experimentalBorderRadiusControl:()=>cu,__experimentalColorGradientControl:()=>Xu,__experimentalColorGradientSettingsDropdown:()=>bB,__experimentalDateFormatPicker:()=>pB,__experimentalDuotoneControl:()=>Fm,__experimentalFontAppearanceControl:()=>Dd,__experimentalFontFamilyControl:()=>Nd,__experimentalGetBorderClassesAndStyles:()=>rg,__experimentalGetColorClassesAndStyles:()=>sg,__experimentalGetElementClassName:()=>BM,__experimentalGetGapCSSValue:()=>oi,__experimentalGetGradientClass:()=>Gu,__experimentalGetGradientObjectByGradientValue:()=>$u,__experimentalGetShadowClassesAndStyles:()=>ig,__experimentalGetSpacingClassesAndStyles:()=>cg,__experimentalImageEditor:()=>QB,__experimentalImageSizeControl:()=>tI,__experimentalImageURLInputUI:()=>hT,__experimentalInspectorPopoverHeader:()=>hM,__experimentalLetterSpacingControl:()=>Fd,__experimentalLibrary:()=>tM,__experimentalLinkControl:()=>Xa,__experimentalLinkControlSearchInput:()=>Ra,__experimentalLinkControlSearchItem:()=>ba,__experimentalLinkControlSearchResults:()=>Sa,__experimentalListView:()=>Mx,__experimentalPanelColorGradientSettings:()=>yB,__experimentalPreviewOptions:()=>gT,__experimentalPublishDateTimePicker:()=>gM,__experimentalRecursionProvider:()=>dM,__experimentalResponsiveBlockControl:()=>QI,__experimentalSpacingSizesControl:()=>jp,__experimentalTextDecorationControl:()=>Yd,__experimentalTextTransformControl:()=>Wd,__experimentalUnitControl:()=>rT,__experimentalUseBlockOverlayActive:()=>hf,__experimentalUseBlockPreview:()=>My,__experimentalUseBorderProps:()=>lg,__experimentalUseColorProps:()=>ag,__experimentalUseCustomSides:()=>Bm,__experimentalUseGradient:()=>Wu,__experimentalUseHasRecursion:()=>pM,__experimentalUseMultipleOriginColorsAndGradients:()=>qc,__experimentalUseResizeCanvas:()=>fT,__experimentalWritingModeControl:()=>ep,__unstableBlockNameContext:()=>TC,__unstableBlockSettingsMenuFirstItem:()=>gC,__unstableBlockToolbarLastItem:()=>QS,__unstableEditorStyles:()=>wy,__unstableIframe:()=>py,__unstableInserterMenuExtension:()=>WE,__unstableRichTextInputEvent:()=>tT,__unstableUseBlockSelectionClearer:()=>F_,__unstableUseClipboardHandler:()=>QT,__unstableUseMouseMoveTypingReset:()=>$w,__unstableUseTypewriter:()=>iM,__unstableUseTypingObserver:()=>jw,createCustomColorsHOC:()=>bg,getColorClassName:()=>Zc,getColorObjectByAttributeValues:()=>Wc,getColorObjectByColorValue:()=>Kc,getComputedFluidTypographyValue:()=>Ur,getCustomValueFromPreset:()=>Ql,getFontSize:()=>Ep,getFontSizeClass:()=>Sp,getFontSizeObjectByValue:()=>wp,getGradientSlugByValue:()=>ju,getGradientValueBySlug:()=>Uu,getPxFromCssUnit:()=>IM,getSpacingPresetCssVar:()=>ei,getTypographyClassesAndStyles:()=>ug,isValueSpacingPreset:()=>Xl,privateApis:()=>HR,store:()=>Nr,storeConfig:()=>Rr,transformStyles:()=>yy,useBlockCommands:()=>wM,useBlockDisplayInformation:()=>ih,useBlockEditContext:()=>y,useBlockEditingMode:()=>ns,useBlockProps:()=>y_,useCachedTruthy:()=>dg,useHasRecursion:()=>uM,useInnerBlocksProps:()=>Hw,useSetting:()=>Or,useSettings:()=>Ar,withColorContext:()=>sB,withColors:()=>vg,withFontSizes:()=>Eg});var e={};n.r(e),n.d(e,{__experimentalGetActiveBlockIdByBlockNames:()=>dn,__experimentalGetAllowedBlocks:()=>Ht,__experimentalGetAllowedPatterns:()=>Wt,__experimentalGetBlockListSettingsForBlocks:()=>Jt,__experimentalGetDirectInsertBlock:()=>Ut,__experimentalGetGlobalBlocksByName:()=>ye,__experimentalGetLastBlockAttributeChanges:()=>nn,__experimentalGetParsedPattern:()=>$t,__experimentalGetPatternTransformItems:()=>qt,__experimentalGetPatternsByBlockTypes:()=>Zt,__experimentalGetReusableBlockTitle:()=>en,__unstableGetBlockWithoutInnerBlocks:()=>me,__unstableGetClientIdWithClientIdsTree:()=>ge,__unstableGetClientIdsTree:()=>fe,__unstableGetContentLockingParent:()=>gn,__unstableGetEditorMode:()=>ln,__unstableGetSelectedBlocksWithPartialSelection:()=>nt,__unstableGetTemporarilyEditingAsBlocks:()=>fn,__unstableGetTemporarilyEditingFocusModeToRevert:()=>bn,__unstableGetVisibleBlocks:()=>hn,__unstableHasActiveBlockOverlayActive:()=>vn,__unstableIsFullySelected:()=>Qe,__unstableIsLastBlockChangeIgnored:()=>tn,__unstableIsSelectionCollapsed:()=>Je,__unstableIsSelectionMergeable:()=>tt,__unstableIsWithinBlockOverlay:()=>kn,__unstableSelectionHasUnmergeableBlock:()=>et,areInnerBlocksControlled:()=>un,canEditBlock:()=>Pt,canInsertBlockType:()=>Ct,canInsertBlocks:()=>xt,canLockBlockType:()=>Rt,canMoveBlock:()=>Tt,canMoveBlocks:()=>Mt,canRemoveBlock:()=>Bt,canRemoveBlocks:()=>It,didAutomaticChange:()=>an,getAdjacentBlockClientId:()=>ze,getAllowedBlocks:()=>Ft,getBlock:()=>pe,getBlockAttributes:()=>de,getBlockCount:()=>Se,getBlockEditingMode:()=>_n,getBlockHierarchyRootClientId:()=>Oe,getBlockIndex:()=>rt,getBlockInsertionPoint:()=>kt,getBlockListSettings:()=>Yt,getBlockMode:()=>pt,getBlockName:()=>ce,getBlockNamesByClientId:()=>we,getBlockOrder:()=>ot,getBlockParents:()=>Le,getBlockParentsByBlockName:()=>Ae,getBlockRootClientId:()=>Ne,getBlockSelectionEnd:()=>Ie,getBlockSelectionStart:()=>Be,getBlockTransformItems:()=>zt,getBlocks:()=>he,getBlocksByClientId:()=>Ee,getBlocksByName:()=>_e,getClientIdsOfDescendants:()=>be,getClientIdsWithDescendants:()=>ve,getDirectInsertBlock:()=>Gt,getDraggedBlockClientIds:()=>gt,getFirstMultiSelectedBlockClientId:()=>je,getGlobalBlockCount:()=>ke,getInserterItems:()=>Dt,getLastMultiSelectedBlockClientId:()=>We,getLowestCommonAncestorWithSelectedBlock:()=>De,getMultiSelectedBlockClientIds:()=>Ue,getMultiSelectedBlocks:()=>$e,getMultiSelectedBlocksEndClientId:()=>Xe,getMultiSelectedBlocksStartClientId:()=>Ye,getNextBlockClientId:()=>Fe,getPatternsByBlockTypes:()=>Kt,getPreviousBlockClientId:()=>Ve,getSelectedBlock:()=>Re,getSelectedBlockClientId:()=>Pe,getSelectedBlockClientIds:()=>Ge,getSelectedBlockCount:()=>Te,getSelectedBlocksInitialCaretPosition:()=>He,getSelectionEnd:()=>xe,getSelectionStart:()=>Ce,getSettings:()=>Xt,getTemplate:()=>Et,getTemplateLock:()=>wt,hasBlockMovingClientId:()=>sn,hasDraggedInnerBlock:()=>st,hasInserterItems:()=>Vt,hasMultiSelection:()=>ct,hasSelectedBlock:()=>Me,hasSelectedInnerBlock:()=>it,isAncestorBeingDragged:()=>bt,isAncestorMultiSelected:()=>qe,isBlockBeingDragged:()=>ft,isBlockHighlighted:()=>cn,isBlockInsertionPointVisible:()=>_t,isBlockMultiSelected:()=>Ze,isBlockSelected:()=>lt,isBlockValid:()=>ue,isBlockVisible:()=>mn,isBlockWithinSelection:()=>at,isCaretWithinFormattedText:()=>vt,isDraggingBlocks:()=>ht,isFirstMultiSelectedBlock:()=>Ke,isGroupable:()=>En,isLastBlockChangePersistent:()=>Qt,isMultiSelecting:()=>ut,isNavigationMode:()=>rn,isSelectionEnabled:()=>dt,isTyping:()=>mt,isUngroupable:()=>yn,isValidTemplate:()=>yt,wasBlockJustInserted:()=>pn});var t={};n.r(t),n.d(t,{__experimentalUpdateSettings:()=>Cn,clearBlockRemovalPrompt:()=>Mn,deleteStyleOverride:()=>Ln,ensureDefaultBlock:()=>Tn,hideBlockInterface:()=>xn,privateRemoveBlocks:()=>In,setBlockRemovalRules:()=>Pn,setLastFocus:()=>On,setOpenedBlockSettingsMenu:()=>Rn,setStyleOverride:()=>Nn,showBlockInterface:()=>Bn,startDragging:()=>zn,stopDragging:()=>Vn,stopEditingAsBlocks:()=>Dn,syncDerivedUpdates:()=>An});var r={};n.r(r),n.d(r,{getAllPatterns:()=>go,getBlockRemovalRules:()=>ao,getBlockSettings:()=>eo,getBlockWithoutAttributes:()=>oo,getEnabledBlockParents:()=>io,getEnabledClientIdsTree:()=>lo,getInserterMediaCategories:()=>mo,getLastFocus:()=>fo,getLastInsertedBlocksClientIds:()=>no,getOpenedBlockSettingsMenu:()=>co,getRegisteredInserterMediaCategories:()=>po,getRemovalPromptData:()=>so,getStyleOverrides:()=>uo,hasAllowedPatterns:()=>ho,isBlockInterfaceHidden:()=>to,isBlockSubtreeDisabled:()=>ro,isDragging:()=>bo});var l={};n.r(l),n.d(l,{__unstableDeleteSelection:()=>Yo,__unstableExpandSelection:()=>Qo,__unstableMarkAutomaticChange:()=>br,__unstableMarkLastChangeAsPersistent:()=>gr,__unstableMarkNextChangeAsNotPersistent:()=>fr,__unstableSaveReusableBlock:()=>hr,__unstableSetEditorMode:()=>kr,__unstableSetTemporarilyEditingAsBlocks:()=>Ir,__unstableSplitSelection:()=>Xo,clearSelectedBlock:()=>Lo,duplicateBlocks:()=>yr,enterFormattedText:()=>ar,exitFormattedText:()=>cr,flashBlock:()=>Cr,hideInsertionPoint:()=>Ko,insertAfterBlock:()=>wr,insertBeforeBlock:()=>Er,insertBlock:()=>$o,insertBlocks:()=>jo,insertDefaultBlock:()=>dr,mergeBlocks:()=>Jo,moveBlockToPosition:()=>Uo,moveBlocksDown:()=>Fo,moveBlocksToPosition:()=>Go,moveBlocksUp:()=>Ho,multiSelect:()=>No,receiveBlocks:()=>Co,registerInserterMediaCategory:()=>Tr,removeBlock:()=>tr,removeBlocks:()=>er,replaceBlock:()=>zo,replaceBlocks:()=>Do,replaceInnerBlocks:()=>nr,resetBlocks:()=>Eo,resetSelection:()=>So,selectBlock:()=>Io,selectNextBlock:()=>Mo,selectPreviousBlock:()=>To,selectionChange:()=>ur,setBlockEditingMode:()=>Mr,setBlockMovingClientId:()=>_r,setBlockVisibility:()=>Br,setHasControlledInnerBlocks:()=>xr,setNavigationMode:()=>vr,setTemplateValidity:()=>Zo,showInsertionPoint:()=>Wo,startDraggingBlocks:()=>ir,startMultiSelect:()=>Po,startTyping:()=>rr,stopDraggingBlocks:()=>sr,stopMultiSelect:()=>Ro,stopTyping:()=>lr,synchronizeTemplate:()=>qo,toggleBlockHighlight:()=>Sr,toggleBlockMode:()=>or,toggleSelection:()=>Ao,unsetBlockEditingMode:()=>Pr,updateBlock:()=>Bo,updateBlockAttributes:()=>xo,updateBlockListSettings:()=>pr,updateSettings:()=>mr,validateBlocksToTemplate:()=>wo});var i={};n.r(i),n.d(i,{AdvancedPanel:()=>KM,BorderPanel:()=>Bu,ColorPanel:()=>dd,DimensionsPanel:()=>mm,FiltersPanel:()=>Jm,GlobalStylesContext:()=>ol,ImageSettingsPanel:()=>WM,TypographyPanel:()=>gp,areGlobalStyleConfigsEqual:()=>nl,getBlockCSSSelector:()=>$m,getGlobalStylesChanges:()=>tP,getLayoutStyles:()=>LM,useGlobalSetting:()=>sl,useGlobalStyle:()=>al,useGlobalStylesOutput:()=>$M,useGlobalStylesOutputWithConfig:()=>UM,useGlobalStylesReset:()=>il,useHasBorderPanel:()=>vu,useHasBorderPanelControls:()=>ku,useHasColorPanel:()=>Qu,useHasDimensionsPanel:()=>em,useHasFiltersPanel:()=>Km,useHasImageSettingsPanel:()=>jM,useHasTypographyPanel:()=>op,useSettingsForBlockElement:()=>cl});var s=n(1609),a=n.n(s);const c=window.wp.blocks,u=window.wp.element,d=window.wp.data,p=window.wp.compose,m=window.wp.hooks,h=Symbol("mayDisplayControls"),g=Symbol("mayDisplayParentControls"),f=Symbol("blockEditingMode"),b=Symbol("blockBindings"),v={name:"",isSelected:!1},k=(0,u.createContext)(v),{Provider:_}=k;function y(){return(0,u.useContext)(k)}const E=window.wp.deprecated;var w=n.n(E),S=n(7734),C=n.n(S);const x=window.wp.i18n,B={insertUsage:{}},I={alignWide:!1,supportsLayout:!0,colors:[{name:(0,x.__)("Black"),slug:"black",color:"#000000"},{name:(0,x.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,x.__)("White"),slug:"white",color:"#ffffff"},{name:(0,x.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,x.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,x.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,x.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,x.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,x.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,x.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,x.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,x.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,x._x)("Small","font size name"),size:13,slug:"small"},{name:(0,x._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,x._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,x._x)("Large","font size name"),size:36,slug:"large"},{name:(0,x._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,x.__)("Thumbnail")},{slug:"medium",name:(0,x.__)("Medium")},{slug:"large",name:(0,x.__)("Large")},{slug:"full",name:(0,x.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,enableOpenverseMediaCategory:!0,clearBlockSelection:!0,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__unstableGalleryWithImageBlocks:!1,__unstableIsPreviewMode:!1,blockInspectorAnimation:{animationParent:"core/navigation","core/navigation":{enterDirection:"leftToRight"},"core/navigation-submenu":{enterDirection:"rightToLeft"},"core/navigation-link":{enterDirection:"rightToLeft"},"core/search":{enterDirection:"rightToLeft"},"core/social-links":{enterDirection:"rightToLeft"},"core/page-list":{enterDirection:"rightToLeft"},"core/spacer":{enterDirection:"rightToLeft"},"core/home-link":{enterDirection:"rightToLeft"},"core/site-title":{enterDirection:"rightToLeft"},"core/site-logo":{enterDirection:"rightToLeft"}},generateAnchors:!1,gradients:[{name:(0,x.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,x.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,x.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,x.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,x.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,x.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,x.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,x.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,x.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,x.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,x.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,x.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function T(e,t,n){return[...e.slice(0,n),...Array.isArray(t)?t:[t],...e.slice(n)]}function M(e,t,n,o=1){const r=[...e];return r.splice(t,o),T(r,e.slice(t,t+o),n)}const P=e=>e;function R(e,t=""){const n=new Map,o=[];return n.set(t,o),e.forEach((e=>{const{clientId:t,innerBlocks:r}=e;o.push(t),R(r,t).forEach(((e,t)=>{n.set(t,e)}))})),n}function N(e,t=""){const n=[],o=[[t,e]];for(;o.length;){const[e,t]=o.shift();t.forEach((({innerBlocks:t,...r})=>{n.push([r.clientId,e]),t?.length&&o.push([r.clientId,t])}))}return n}function L(e,t=P){const n=[],o=[...e];for(;o.length;){const{innerBlocks:e,...r}=o.shift();o.push(...e),n.push([r.clientId,t(r)])}return n}function A(e){return L(e,(e=>{const{attributes:t,...n}=e;return n}))}function O(e){return L(e,(e=>e.attributes))}function D(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&C()(e.clientIds,t.clientIds)&&function(e,t){return C()(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function z(e,t){const n=e.tree,o=[...t],r=[...t];for(;o.length;){const e=o.shift();o.push(...e.innerBlocks),r.push(...e.innerBlocks)}for(const e of r)n.set(e.clientId,{});for(const t of r)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 V(e,t,n=!1){const o=e.tree,r=new Set([]),l=new Set;for(const o of t){let t=n?o:e.parents.get(o);do{if(e.controlledInnerBlocks[t]){l.add(t);break}r.add(t),t=e.parents.get(t)}while(void 0!==t)}for(const e of r)o.set(e,{...o.get(e)});for(const t of r)o.get(t).innerBlocks=(e.order.get(t)||[]).map((e=>o.get(e)));for(const t of l)o.set("controlled||"+t,{innerBlocks:(e.order.get(t)||[]).map((e=>o.get(e)))})}const F=(0,p.pipe)(d.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:o}=n;if(e===o)return t;(t={...t}).attributes=new Map(t.attributes),t.attributes.forEach(((n,r)=>{const{name:l}=t.byClientId.get(r);"core/block"===l&&n.ref===e&&t.attributes.set(r,{...n,ref:o})}))}return e(t,n)}),(e=>(t={},n)=>{const o=e(t,n);if(o===t)return t;switch(o.tree=t.tree?t.tree:new Map,n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":o.tree=new Map(o.tree),z(o,n.blocks),V(o,n.rootClientId?[n.rootClientId]:[""],!0);break;case"UPDATE_BLOCK":o.tree=new Map(o.tree),o.tree.set(n.clientId,{...o.tree.get(n.clientId),...o.byClientId.get(n.clientId),attributes:o.attributes.get(n.clientId)}),V(o,[n.clientId],!1);break;case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":o.tree=new Map(o.tree),n.clientIds.forEach((e=>{o.tree.set(e,{...o.tree.get(e),attributes:o.attributes.get(e)})})),V(o,n.clientIds,!1);break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=function(e){const t={},n=[...e];for(;n.length;){const{innerBlocks:e,...o}=n.shift();n.push(...e),t[o.clientId]=!0}return t}(n.blocks);o.tree=new Map(o.tree),n.replacedClientIds.concat(n.replacedClientIds.filter((t=>!e[t])).map((e=>"controlled||"+e))).forEach((e=>{o.tree.delete(e)})),z(o,n.blocks),V(o,n.blocks.map((e=>e.clientId)),!1);const r=[];for(const e of n.clientIds)void 0===t.parents.get(e)||""!==t.parents.get(e)&&!o.byClientId.get(t.parents.get(e))||r.push(t.parents.get(e));V(o,r,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const r of n.clientIds)void 0===t.parents.get(r)||""!==t.parents.get(r)&&!o.byClientId.get(t.parents.get(r))||e.push(t.parents.get(r));o.tree=new Map(o.tree),n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e))).forEach((e=>{o.tree.delete(e)})),V(o,e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId?e.push(n.fromRootClientId):e.push(""),n.toRootClientId&&e.push(n.toRootClientId),o.tree=new Map(o.tree),V(o,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=new Map(o.tree),V(o,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=[];o.attributes.forEach(((t,r)=>{"core/block"===o.byClientId.get(r).name&&t.ref===n.updatedId&&e.push(r)})),o.tree=new Map(o.tree),e.forEach((e=>{o.tree.set(e,{...o.byClientId.get(e),attributes:o.attributes.get(e),innerBlocks:o.tree.get(e).innerBlocks})})),V(o,e,!1)}}return o}),(e=>(t,n)=>{const o=e=>{let o=e;for(let r=0;r<o.length;r++)!t.order.get(o[r])||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[o[r]]||(o===e&&(o=[...o]),o.push(...t.order.get(o[r])));return o};if(t)switch(n.type){case"REMOVE_BLOCKS":n={...n,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:o(n.clientIds)};break;case"REPLACE_BLOCKS":n={...n,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:o(n.clientIds)}}return e(t,n)}),(e=>(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const o={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...r}=e.shift();e.push(...n),t.controlledInnerBlocks[r.clientId]&&(o[r.clientId]=!0)}}let r=t;t.order.get(n.rootClientId)&&(r=e(r,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order.get(n.rootClientId)}));let l=r;if(n.blocks.length){l=e(l,{...n,type:"INSERT_BLOCKS",index:0});const r=new Map(l.order);Object.keys(o).forEach((e=>{t.order.get(e)&&r.set(e,t.order.get(e))})),l.order=r,l.tree=new Map(l.tree),Object.keys(o).forEach((e=>{const n=`controlled||${e}`;t.tree.has(n)&&l.tree.set(n,t.tree.get(n))}))}return l}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:new Map(A(n.blocks)),attributes:new Map(O(n.blocks)),order:R(n.blocks),parents:new Map(N(n.blocks)),controlledInnerBlocks:{}};return e.tree=new Map(t?.tree),z(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,o=!1;return(r,l)=>{let i,s=e(r,l);var a;"SET_EXPLICIT_PERSISTENT"===l.type&&(n=l.isPersistentChange,i=null===(a=r.isPersistentChange)||void 0===a||a);if(void 0!==n)return i=n,i===s.isPersistentChange?s:{...s,isPersistentChange:i};const c="MARK_LAST_CHANGE_AS_PERSISTENT"===l.type||o;var u;return r!==s||c?(s={...s,isPersistentChange:c?!o:!D(l,t)},t=l,o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===l.type,s):(o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===l.type,i=null===(u=r?.isPersistentChange)||void 0===u||u,r.isPersistentChange===i?r:{...s,isPersistentChange:i})}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,o)=>{const r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const o=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(o,n)}return e(t,n)}))({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return A(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"UPDATE_BLOCK":{if(!e.has(t.clientId))return e;const{attributes:n,...o}=t.updates;if(0===Object.values(o).length)return e;const r=new Map(e);return r.set(t.clientId,{...e.get(t.clientId),...o}),r}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),A(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},attributes(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return O(t.blocks).forEach((([e,t])=>{n.set(e,t)})),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"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e.get(t))))return e;let o=!1;const r=new Map(e);for(const l of t.clientIds){var n;const i=Object.entries(t.uniqueByBlock?t.attributes[l]:null!==(n=t.attributes)&&void 0!==n?n:{});if(0===i.length)continue;let s=!1;const a=e.get(l),c={};i.forEach((([e,t])=>{a[e]!==t&&(s=!0,c[e]=t)})),o=o||s,s&&r.set(l,{...a,...c})}return o?r: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)})),O(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},order(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{var n;const o=R(t.blocks),r=new Map(e);return o.forEach(((e,t)=>{""!==t&&r.set(t,e)})),r.set("",(null!==(n=e.get(""))&&void 0!==n?n:[]).concat(o[""])),r}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e.get(n)||[],r=R(t.blocks,n),{index:l=o.length}=t,i=new Map(e);return r.forEach(((e,t)=>{i.set(t,e)})),i.set(n,T(o,r.get(n),l)),i}case"MOVE_BLOCKS_TO_POSITION":{var o;const{fromRootClientId:n="",toRootClientId:r="",clientIds:l}=t,{index:i=e.get(r).length}=t;if(n===r){const t=e.get(r).indexOf(l[0]),n=new Map(e);return n.set(r,M(e.get(r),t,i,l.length)),n}const s=new Map(e);return s.set(n,null!==(o=e.get(n)?.filter((e=>!l.includes(e))))&&void 0!==o?o:[]),s.set(r,T(e.get(r),l,i)),s}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],l=e.get(o);if(!l.length||r===l[0])return e;const i=l.indexOf(r),s=new Map(e);return s.set(o,M(l,i,i-1,n.length)),s}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],l=n[n.length-1],i=e.get(o);if(!i.length||l===i[i.length-1])return e;const s=i.indexOf(r),a=new Map(e);return a.set(o,M(i,s,s+1,n.length)),a}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=R(t.blocks),r=new Map(e);return t.replacedClientIds.forEach((e=>{r.delete(e)})),o.forEach(((e,t)=>{""!==t&&r.set(t,e)})),r.forEach(((e,t)=>{const l=Object.values(e).reduce(((e,t)=>t===n[0]?[...e,...o.get("")]:(-1===n.indexOf(t)&&e.push(t),e)),[]);r.set(t,l)})),r}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n.forEach(((e,o)=>{var r;const l=null!==(r=e?.filter((e=>!t.removedClientIds.includes(e))))&&void 0!==r?r:[];l.length!==e.length&&n.set(o,l)})),n}}return e},parents(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{const n=new Map(e);return N(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"INSERT_BLOCKS":{const n=new Map(e);return N(t.blocks,t.rootClientId||"").forEach((([e,t])=>{n.set(e,t)})),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)})),N(t.blocks,e.get(t.clientIds[0])).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},controlledInnerBlocks:(e={},{type:t,clientId:n,hasControlledInnerBlocks:o})=>"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e});function H(e={},t){switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}const G=(0,d.combineReducers)({blocks:F,isDragging:function(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e},isTyping:function(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isBlockInterfaceHidden:function(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e},draggedBlocks:function(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(e={},t){switch(t.type){case"SELECTION_CHANGE":return t.clientId?{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}}:{selectionStart:t.start||e.selectionStart,selectionEnd:t.end||e.selectionEnd};case"RESET_SELECTION":const{selectionStart:n,selectionEnd:o}=t;return{selectionStart:n,selectionEnd:o};case"MULTI_SELECT":const{start:r,end:l}=t;return r===e.selectionStart?.clientId&&l===e.selectionEnd?.clientId?e:{selectionStart:{clientId:r},selectionEnd:{clientId:l}};case"RESET_BLOCKS":const i=e?.selectionStart?.clientId,s=e?.selectionEnd?.clientId;if(!i&&!s)return e;if(!t.blocks.some((e=>e.clientId===i)))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some((e=>e.clientId===s)))return{...e,selectionEnd:e.selectionStart}}const n=H(e.selectionStart,t),o=H(e.selectionEnd,t);return n===e.selectionStart&&o===e.selectionEnd?e:{selectionStart:n,selectionEnd:o}},isMultiSelecting:function(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(e=!0,t){return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(e=null,t){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(e={},t){if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter((([e])=>!t.clientIds.includes(e))));case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;if(!t.settings){if(e.hasOwnProperty(n)){const{[n]:t,...o}=e;return o}return e}return C()(e[n],t.settings)?e:{...e,[n]:t.settings}}}return e},insertionPoint:function(e=null,t){switch(t.type){case"SHOW_INSERTION_POINT":{const{rootClientId:n,index:o,__unstableWithInserter:r,operation:l,nearestSide:i}=t,s={rootClientId:n,index:o,__unstableWithInserter:r,operation:l,nearestSide:i};return C()(e,s)?e:s}case"HIDE_INSERTION_POINT":return null}return e},template:function(e={isValid:!0},t){return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(e=I,t){return"UPDATE_SETTINGS"===t.type?t.reset?{...I,...t.settings}:{...e,...t.settings}:e},preferences:function(e=B,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:o,name:r}=n;let l=r;const i=(0,d.select)(c.store).getActiveBlockVariation(r,o);return i?.name&&(l+="/"+i.name),"core/block"===r&&(l+="/"+o.ref),{...e,insertUsage:{...e.insertUsage,[l]:{time:t.time,count:e.insertUsage[l]?e.insertUsage[l].count+1:1}}}}),e)}return e},lastBlockAttributesChange:function(e=null,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce(((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return e},lastFocus:function(e=!1,t){return"LAST_FOCUS"===t.type?t.lastFocus:e},editorMode:function(e="edit",t){return"INSERT_BLOCKS"===t.type&&"navigation"===e?"edit":"SET_EDITOR_MODE"===t.type?t.mode:e},hasBlockMovingClientId:function(e=null,t){return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_EDITOR_MODE"===t.type?null:e},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(e={},t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":if(!t.blocks.length)return e;const n=t.blocks.map((e=>e.clientId)),o=t.meta?.source;return{clientIds:n,source:o};case"RESET_BLOCKS":return{}}return e},temporarilyEditingAsBlocks:function(e="",t){return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e},temporarilyEditingFocusModeRevert:function(e="",t){return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.focusModeToRevert:e},blockVisibility:function(e={},t){return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e},blockEditingModes:function(e=new Map,t){switch(t.type){case"SET_BLOCK_EDITING_MODE":return new Map(e).set(t.clientId,t.mode);case"UNSET_BLOCK_EDITING_MODE":{const n=new Map(e);return n.delete(t.clientId),n}case"RESET_BLOCKS":return e.has("")?(new Map).set("",e.get("")):e}return e},styleOverrides:function(e=new Map,t){switch(t.type){case"SET_STYLE_OVERRIDE":return new Map(e).set(t.id,t.style);case"DELETE_STYLE_OVERRIDE":{const n=new Map(e);return n.delete(t.id),n}}return e},removalPromptData:function(e=!1,t){switch(t.type){case"DISPLAY_BLOCK_REMOVAL_PROMPT":const{clientIds:e,selectPrevious:n,blockNamesForPrompt:o,messageType:r}=t;return{clientIds:e,selectPrevious:n,blockNamesForPrompt:o,messageType:r};case"CLEAR_BLOCK_REMOVAL_PROMPT":return!1}return e},blockRemovalRules:function(e=!1,t){return"SET_BLOCK_REMOVAL_RULES"===t.type?t.rules:e},openedBlockSettingsMenu:function(e=null,t){var n;return"SET_OPENED_BLOCK_SETTINGS_MENU"===t.type?null!==(n=t?.clientId)&&void 0!==n?n:null:e},registeredInserterMediaCategories:function(e=[],t){return"REGISTER_INSERTER_MEDIA_CATEGORY"===t.type?[...e,t.category]:e}});const U=function(e){return(t,n)=>{const o=e(t,n);return t?(o.automaticChangeStatus=t.automaticChangeStatus,"MARK_AUTOMATIC_CHANGE"===n.type?{...o,automaticChangeStatus:"pending"}:"MARK_AUTOMATIC_CHANGE_FINAL"===n.type&&"pending"===t.automaticChangeStatus?{...o,automaticChangeStatus:"final"}:o.blocks===t.blocks&&o.selection===t.selection||"final"!==o.automaticChangeStatus&&o.selection!==t.selection?o:{...o,automaticChangeStatus:void 0}):o}}(G);var $={};function j(e){return[e]}function W(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}function K(e,t){var n,o=t||j;function r(){n=new WeakMap}function l(){var t,r,l,i,s,a=arguments.length;for(i=new Array(a),l=0;l<a;l++)i[l]=arguments[l];for(t=function(e){var t,o,r,l,i,s=n,a=!0;for(t=0;t<e.length;t++){if(!(i=o=e[t])||"object"!=typeof i){a=!1;break}s.has(o)?s=s.get(o):(r=new WeakMap,s.set(o,r),s=r)}return s.has($)||((l=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=a,s.set($,l)),s.get($)}(s=o.apply(null,i)),t.isUniqueByDependants||(t.lastDependants&&!W(s,t.lastDependants,0)&&t.clear(),t.lastDependants=s),r=t.head;r;){if(W(r.args,i,1))return r!==t.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=t.head,r.prev=null,t.head.prev=r,t.head=r),r.val;r=r.next}return r={val:e.apply(null,i)},i[0]=null,r.args=i,t.head&&(t.head.prev=r,r.next=t.head),t.head=r,r.val}return l.getDependants=o,l.clear=r,r(),l}const Z=window.wp.primitives,q=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})),Y=window.wp.richText,X=Symbol("selectBlockPatternsKey"),Q=(e,t,n=null)=>"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n,J=(e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){const e=n.shift();if(!Q(t,e.name||e.blockName,!0))return!1;e.innerBlocks?.forEach((e=>{n.push(e)}))}return!0},ee=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[X]?.(e),t.blockPatterns],te=(e,t,n)=>(o,r)=>{let l,i;if("function"==typeof e?(l=e(o),i=e(r)):(l=o[e],i=r[e]),l>i)return"asc"===n?1:-1;if(i>l)return"asc"===n?-1:1;const s=t.findIndex((e=>e===o)),a=t.findIndex((e=>e===r));return s>a?1:a>s?-1:0};function ne(e,t,n="asc"){return e.concat().sort(te(t,e,n))}const oe="core/block-editor",re=window.wp.privateApis,{lock:le,unlock:ie}=(0,re.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/block-editor"),se=[],ae=new Set;function ce(e,t){const n=e.blocks.byClientId.get(t),o="core/social-link";if("web"!==u.Platform.OS&&n?.name===o){const n=e.blocks.attributes.get(t),{service:r}=null!=n?n:{};return r?`${o}-${r}`:o}return n?n.name:null}function ue(e,t){const n=e.blocks.byClientId.get(t);return!!n&&n.isValid}function de(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function pe(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}const me=K(((e,t)=>{const n=e.blocks.byClientId.get(t);return n?{...n,attributes:de(e,t)}:null}),((e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]));function he(e,t){const n=t&&un(e,t)?"controlled||"+t:t||"";return e.blocks.tree.get(n)?.innerBlocks||se}const ge=K(((e,t)=>(w()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:fe(e,t)})),(e=>[e.blocks.order])),fe=K(((e,t="")=>(w()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),ot(e,t).map((t=>ge(e,t))))),(e=>[e.blocks.order])),be=K(((e,t)=>{t=Array.isArray(t)?[...t]:[t];const n=[];for(const o of t){const t=e.blocks.order.get(o);t&&n.push(...t)}let o=0;for(;o<n.length;){const t=n[o],r=e.blocks.order.get(t);r&&n.splice(o+1,0,...r),o++}return n}),(e=>[e.blocks.order])),ve=e=>be(e,""),ke=K(((e,t)=>{const n=ve(e);if(!t)return n.length;let o=0;for(const r of n){e.blocks.byClientId.get(r).name===t&&o++}return o}),(e=>[e.blocks.order,e.blocks.byClientId])),_e=K(((e,t)=>{if(!t)return se;const n=Array.isArray(t)?t:[t],o=ve(e).filter((t=>{const o=e.blocks.byClientId.get(t);return n.includes(o.name)}));return o.length>0?o:se}),(e=>[e.blocks.order,e.blocks.byClientId]));function ye(e,t){return w()("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),_e(e,t)}const Ee=K(((e,t)=>(Array.isArray(t)?t:[t]).map((t=>pe(e,t)))),((e,t)=>(Array.isArray(t)?t:[t]).map((t=>e.blocks.tree.get(t))))),we=K(((e,t)=>Ee(e,t).filter(Boolean).map((e=>e.name))),((e,t)=>Ee(e,t)));function Se(e,t){return ot(e,t).length}function Ce(e){return e.selection.selectionStart}function xe(e){return e.selection.selectionEnd}function Be(e){return e.selection.selectionStart.clientId}function Ie(e){return e.selection.selectionEnd.clientId}function Te(e){const t=Ue(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function Me(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function Pe(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function Re(e){const t=Pe(e);return t?pe(e,t):null}function Ne(e,t){var n;return null!==(n=e.blocks.parents.get(t))&&void 0!==n?n:null}const Le=K(((e,t,n=!1)=>{const o=[];let r=t;for(;r=e.blocks.parents.get(r);)o.push(r);return o.length?n?o:o.reverse():se}),(e=>[e.blocks.parents])),Ae=K(((e,t,n,o=!1)=>{const r=Le(e,t,o),l=Array.isArray(n)?e=>n.includes(e):e=>n===e;return r.filter((t=>l(ce(e,t))))}),(e=>[e.blocks.parents]));function Oe(e,t){let n,o=t;do{n=o,o=e.blocks.parents.get(o)}while(o);return n}function De(e,t){const n=Pe(e),o=[...Le(e,t),t],r=[...Le(e,n),n];let l;const i=Math.min(o.length,r.length);for(let e=0;e<i&&o[e]===r[e];e++)l=o[e];return l}function ze(e,t,n=1){if(void 0===t&&(t=Pe(e)),void 0===t&&(t=n<0?je(e):We(e)),!t)return null;const o=Ne(e,t);if(null===o)return null;const{order:r}=e.blocks,l=r.get(o),i=l.indexOf(t)+1*n;return i<0||i===l.length?null:l[i]}function Ve(e,t){return ze(e,t,-1)}function Fe(e,t){return ze(e,t,1)}function He(e){return e.initialPosition}const Ge=K((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(!t.clientId||!n.clientId)return se;if(t.clientId===n.clientId)return[t.clientId];const o=Ne(e,t.clientId);if(null===o)return se;const r=ot(e,o),l=r.indexOf(t.clientId),i=r.indexOf(n.clientId);return l>i?r.slice(i,l+1):r.slice(l,i+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Ue(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?se:Ge(e)}const $e=K((e=>{const t=Ue(e);return t.length?t.map((t=>pe(e,t))):se}),(e=>[...Ge.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function je(e){return Ue(e)[0]||null}function We(e){const t=Ue(e);return t[t.length-1]||null}function Ke(e,t){return je(e)===t}function Ze(e,t){return-1!==Ue(e).indexOf(t)}const qe=K(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=Ne(e,n),o=Ze(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Ye(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Xe(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Qe(e){const t=Ce(e),n=xe(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function Je(e){const t=Ce(e),n=xe(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function et(e){return Ge(e).some((t=>{const n=ce(e,t);return!(0,c.getBlockType)(n).merge}))}function tt(e,t){const n=Ce(e),o=xe(e);if(n.clientId===o.clientId)return!1;if(!n.attributeKey||!o.attributeKey||void 0===n.offset||void 0===o.offset)return!1;const r=Ne(e,n.clientId);if(r!==Ne(e,o.clientId))return!1;const l=ot(e,r);let i,s;l.indexOf(n.clientId)>l.indexOf(o.clientId)?(i=o,s=n):(i=n,s=o);const a=t?s.clientId:i.clientId,u=t?i.clientId:s.clientId,d=ce(e,a);if(!(0,c.getBlockType)(d).merge)return!1;const p=pe(e,u);if(p.name===d)return!0;const m=(0,c.switchToBlockType)(p,d);return m&&m.length}const nt=e=>{const t=Ce(e),n=xe(e);if(t.clientId===n.clientId)return se;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return se;const o=Ne(e,t.clientId);if(o!==Ne(e,n.clientId))return se;const r=ot(e,o),l=r.indexOf(t.clientId),i=r.indexOf(n.clientId),[s,a]=l>i?[n,t]:[t,n],c=pe(e,s.clientId),u=pe(e,a.clientId),d=c.attributes[s.attributeKey],p=u.attributes[a.attributeKey];let m=(0,Y.create)({html:d}),h=(0,Y.create)({html:p});return m=(0,Y.remove)(m,0,s.offset),h=(0,Y.remove)(h,a.offset,h.text.length),[{...c,attributes:{...c.attributes,[s.attributeKey]:(0,Y.toHTMLString)({value:m})}},{...u,attributes:{...u.attributes,[a.attributeKey]:(0,Y.toHTMLString)({value:h})}}]};function ot(e,t){return e.blocks.order.get(t||"")||se}function rt(e,t){return ot(e,Ne(e,t)).indexOf(t)}function lt(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function it(e,t,n=!1){return ot(e,t).some((t=>lt(e,t)||Ze(e,t)||n&&it(e,t,n)))}function st(e,t,n=!1){return ot(e,t).some((t=>ft(e,t)||n&&st(e,t,n)))}function at(e,t){if(!t)return!1;const n=Ue(e),o=n.indexOf(t);return o>-1&&o<n.length-1}function ct(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function ut(e){return e.isMultiSelecting}function dt(e){return e.isSelectionEnabled}function pt(e,t){return e.blocksMode[t]||"visual"}function mt(e){return e.isTyping}function ht(e){return!!e.draggedBlocks.length}function gt(e){return e.draggedBlocks}function ft(e,t){return e.draggedBlocks.includes(t)}function bt(e,t){if(!ht(e))return!1;return Le(e,t).some((t=>ft(e,t)))}function vt(){return w()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}const kt=K((e=>{let t,n;const{insertionPoint:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:l}=r;return l?(t=Ne(e,l)||void 0,n=rt(e,r.clientId)+1):n=ot(e).length,{rootClientId:t,index:n}}),(e=>[e.insertionPoint,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]));function _t(e){return null!==e.insertionPoint}function yt(e){return e.template.isValid}function Et(e){return e.settings.template}function wt(e,t){var n,o;return t?null!==(n=Yt(e,t)?.templateLock)&&void 0!==n&&n:null!==(o=e.settings.templateLock)&&void 0!==o&&o}const St=(e,t,n=null)=>{let o;if(t&&"object"==typeof t?(o=t,t=o.name):o=(0,c.getBlockType)(t),!o)return!1;const{allowedBlockTypes:r}=Xt(e);if(!Q(r,t,!0))return!1;if(!!wt(e,n))return!1;if("disabled"===_n(e,null!=n?n:""))return!1;const l=Yt(e,n);if(n&&void 0===l)return!1;const i=ce(e,n),s=(0,c.getBlockType)(i),a=s?.allowedBlocks;let u=Q(a,t);if(!1!==u){const e=l?.allowedBlocks,n=Q(e,t);null!==n&&(u=n)}const d=o.parent,p=Q(d,i);let h=!0;const g=o.ancestor;if(g){h=[n,...Le(e,n)].some((t=>Q(g,ce(e,t))))}const f=h&&(null===u&&null===p||!0===u||!0===p);return f?(0,m.applyFilters)("blockEditor.__unstableCanInsertBlockType",f,o,n,{getBlock:pe.bind(null,e),getBlockParentsByBlockName:Ae.bind(null,e)}):f},Ct=K(St,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId.get(n),e.settings.allowedBlockTypes,e.settings.templateLock,e.blockEditingModes]));function xt(e,t,n=null){return t.every((t=>Ct(e,ce(e,t),n)))}function Bt(e,t,n=null){const o=de(e,t);return null===o||(void 0!==o.lock?.remove?!o.lock.remove:!wt(e,n)&&"disabled"!==_n(e,n))}function It(e,t,n=null){return t.every((t=>Bt(e,t,n)))}function Tt(e,t,n=null){const o=de(e,t);return null===o||(void 0!==o.lock?.move?!o.lock.move:"all"!==wt(e,n)&&"disabled"!==_n(e,n))}function Mt(e,t,n=null){return t.every((t=>Tt(e,t,n)))}function Pt(e,t){const n=de(e,t);if(null===n)return!0;const{lock:o}=n;return!o?.edit}function Rt(e,t){return!!(0,c.hasBlockSupport)(t,"lock",!0)&&!!e.settings?.canLockBlocks}function Nt(e,t){var n;return null!==(n=e.preferences.insertUsage?.[t])&&void 0!==n?n:null}const Lt=(e,t,n)=>!!(0,c.hasBlockSupport)(t,"inserter",!0)&&St(e,t.name,n),At=(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}},Ot=(e,{buildScope:t="inserter"})=>n=>{const o=n.name;let r=!1;(0,c.hasBlockSupport)(n.name,"multiple",!0)||(r=Ee(e,ve(e)).some((({name:e})=>e===n.name)));const{time:l,count:i=0}=Nt(e,o)||{},s={id:o,name:n.name,title:n.title,icon:n.icon,isDisabled:r,frecency:At(l,i)};if("transform"===t)return s;const a=(0,c.getBlockVariations)(n.name,"inserter");return{...s,initialAttributes:{},description:n.description,category:n.category,keywords:n.keywords,variations:a,example:n.example,utility:1}},Dt=K(((e,t=null)=>{const n=St(e,"core/block",t)?on(e).map((t=>{const n=t.wp_pattern_sync_status?q:{src:q,foreground:"var(--wp-block-synced-color)"},o=`core/block/${t.id}`,{time:r,count:l=0}=Nt(e,o)||{},i=At(r,l);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title?.raw,icon:n,category:"reusable",keywords:["reusable"],isDisabled:!1,utility:1,frecency:i,content:t.content?.raw,syncStatus:t.wp_pattern_sync_status}})):[],o=Ot(e,{buildScope:"inserter"}),r=(0,c.getBlockTypes)().filter((n=>Lt(e,n,t))).map(o).reduce(((t,n)=>{const{variations:o=[]}=n;if(o.some((({isDefault:e})=>e))||t.push(n),o.length){const r=((e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:l=0}=Nt(e,o)||{};return{...t,id:o,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:At(r,l)}})(e,n);t.push(...o.map(r))}return t}),[]),{core:l,noncore:i}=r.reduce(((e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e}),{core:[],noncore:[]});return[...[...l,...i],...n]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId.get(t),e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,on(e),(0,c.getBlockTypes)()])),zt=K(((e,t,n=null)=>{const o=Array.isArray(t)?t:[t],r=Ot(e,{buildScope:"transform"}),l=(0,c.getBlockTypes)().filter((t=>Lt(e,t,n))).map(r),i=Object.fromEntries(Object.entries(l).map((([,e])=>[e.name,e]))),s=(0,c.getPossibleBlockTransformations)(o).reduce(((e,t)=>(i[t?.name]&&e.push(i[t.name]),e)),[]);return ne(s,(e=>i[e.name].frecency),"desc")}),((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId.get(n),e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,c.getBlockTypes)()])),Vt=K(((e,t=null)=>{if((0,c.getBlockTypes)().some((n=>Lt(e,n,t))))return!0;return St(e,"core/block",t)&&on(e).length>0}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId.get(t),e.settings.allowedBlockTypes,e.settings.templateLock,on(e),(0,c.getBlockTypes)()])),Ft=K(((e,t=null)=>{if(!t)return;const n=(0,c.getBlockTypes)().filter((n=>Lt(e,n,t)));return St(e,"core/block",t)&&on(e).length>0&&n.push("core/block"),n}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId.get(t),e.settings.allowedBlockTypes,e.settings.templateLock,on(e),(0,c.getBlockTypes)()])),Ht=K(((e,t=null)=>(w()('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),Ft(e,t))),((e,t)=>[...Ft.getDependants(e,t)])),Gt=K(((e,t=null)=>{if(!t)return;const n=e.blockListSettings[t]?.defaultBlock,o=e.blockListSettings[t]?.directInsert;return n&&o?"function"==typeof o?o(pe(e,t))?n:null:n:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree.get(t)])),Ut=K(((e,t=null)=>(w()('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),Gt(e,t))),((e,t)=>[e.blockListSettings[t],e.blocks.tree.get(t)])),$t=(0,d.createRegistrySelector)((e=>K(((t,n)=>{const{getAllPatterns:o}=ie(e(oe)),r=o().find((({name:e})=>e===n));return r?{...r,blocks:(0,c.parse)(r.content,{__unstableSkipMigrationLogs:!0})}:null}),ee(e)))),jt=e=>(t,n)=>[...ee(e)(t),t.settings.allowedBlockTypes,t.settings.templateLock,t.blockListSettings[n],t.blocks.byClientId.get(n)],Wt=(0,d.createRegistrySelector)((e=>K(((t,n=null)=>{const{getAllPatterns:o,__experimentalGetParsedPattern:r}=ie(e(oe)),l=o(),{allowedBlockTypes:i}=Xt(t),s=l.filter((({inserter:e=!0})=>!!e)).map((({name:e})=>r(e))),a=s.filter((({blocks:e})=>J(e,i))),c=a.filter((({blocks:e})=>e.every((({name:e})=>Ct(t,e,n)))));return c}),jt(e)))),Kt=(0,d.createRegistrySelector)((e=>K(((t,n,o=null)=>{if(!n)return se;const r=e(oe).__experimentalGetAllowedPatterns(o),l=Array.isArray(n)?n:[n],i=r.filter((e=>e?.blockTypes?.some?.((e=>l.includes(e)))));return 0===i.length?se:i}),((t,n,o)=>jt(e)(t,o))))),Zt=(0,d.createRegistrySelector)((e=>(w()('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(oe).getPatternsByBlockTypes))),qt=(0,d.createRegistrySelector)((e=>K(((t,n,o=null)=>{if(!n)return se;if(n.some((({clientId:e,innerBlocks:n})=>n.length||un(t,e))))return se;const r=Array.from(new Set(n.map((({name:e})=>e))));return e(oe).getPatternsByBlockTypes(r,o)}),((t,n,o)=>jt(e)(t,o)))));function Yt(e,t){return e.blockListSettings[t]}function Xt(e){return e.settings}function Qt(e){return e.blocks.isPersistentChange}const Jt=K(((e,t=[])=>t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})),(e=>[e.blockListSettings])),en=K(((e,t)=>{const n=on(e).find((e=>e.id===t));return n?n.title?.raw:null}),(e=>[on(e)]));function tn(e){return e.blocks.isIgnoredChange}function nn(e){return e.lastBlockAttributesChange}function on(e){var t;return null!==(t=e.settings.__experimentalReusableBlocks)&&void 0!==t?t:se}function rn(e){return"navigation"===e.editorMode}function ln(e){return e.editorMode}function sn(e){return e.hasBlockMovingClientId}function an(e){return!!e.automaticChangeStatus}function cn(e,t){return e.highlightedBlock===t}function un(e,t){return!!e.blocks.controlledInnerBlocks[t]}const dn=K(((e,t)=>{if(!t.length)return null;const n=Pe(e);if(t.includes(ce(e,n)))return n;const o=Ue(e),r=Ae(e,n||o[0],t);return r?r[r.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function pn(e,t,n){const{lastBlockInserted:o}=e;return o.clientIds?.includes(t)&&o.source===n}function mn(e,t){var n;return null===(n=e.blockVisibility?.[t])||void 0===n||n}const hn=K((e=>{const t=new Set(Object.keys(e.blockVisibility).filter((t=>e.blockVisibility[t])));return 0===t.size?ae:t}),(e=>[e.blockVisibility])),gn=K(((e,t)=>{let n,o=t;for(;o=e.blocks.parents.get(o);)"core/block"!==ce(e,o)&&"contentOnly"!==wt(e,o)||(n=o);return n}),(e=>[e.blocks.parents,e.blockListSettings]));function fn(e){return e.temporarilyEditingAsBlocks}function bn(e){return e.temporarilyEditingFocusModeRevert}function vn(e,t){if("default"!==_n(e,t))return!1;if(!Pt(e,t))return!0;const n=ln(e);if("zoom-out"===n&&t&&!Ne(e,t))return!0;const o=(0,c.hasBlockSupport)(ce(e,t),"__experimentalDisableBlockOverlay",!1);return("navigation"===n||!o&&un(e,t))&&!lt(e,t)&&!it(e,t,!0)}function kn(e,t){let n=e.blocks.parents.get(t);for(;n;){if(vn(e,n))return!0;n=e.blocks.parents.get(n)}return!1}const _n=(0,d.createRegistrySelector)((e=>(t,n="")=>{const o=t.blockEditingModes.get(n);if(o)return o;if(!n)return"default";const r=Ne(t,n);if("contentOnly"===wt(t,r)){const o=ce(t,n);return e(c.store).__experimentalHasContentRoleAttribute(o)?"contentOnly":"disabled"}const l=_n(t,r);return"contentOnly"===l?"default":l})),yn=(0,d.createRegistrySelector)((e=>(t,n="")=>{const o=n||Pe(t);if(!o)return!1;const{getGroupingBlockName:r}=e(c.store),l=pe(t,o),i=r();return l&&(l.name===i||(0,c.getBlockType)(l.name)?.transforms?.ungroup)&&!!l.innerBlocks.length&&Bt(t,o)})),En=(0,d.createRegistrySelector)((e=>(t,n=se)=>{const{getGroupingBlockName:o}=e(c.store),r=o(),l=n?.length?n:Ge(t),i=l?.length?Ne(t,l[0]):void 0;return Ct(t,r,i)&&l.length&&It(t,l,i)})),wn=new WeakSet,Sn=["inserterMediaCategories","blockInspectorAnimation"];function Cn(e,{stripExperimentalSettings:t=!1,reset:n=!1}={}){let o=e;if(t&&"web"===u.Platform.OS){o={};for(const t in e)Sn.includes(t)||(o[t]=e[t])}return{type:"UPDATE_SETTINGS",settings:o,reset:n}}function xn(){return{type:"HIDE_BLOCK_INTERFACE"}}function Bn(){return{type:"SHOW_BLOCK_INTERFACE"}}const In=(e,t=!0,n=!1)=>({select:o,dispatch:r,registry:l})=>{if(!e||!e.length)return;var i;i=e,e=Array.isArray(i)?i:[i];const s=o.getBlockRootClientId(e[0]);if(!o.canRemoveBlocks(e,s))return;const a=!n&&o.getBlockRemovalRules();if(a){const n=new Set,l=[...e];let i="templates";for(;l.length;){const e=l.shift(),t=o.getBlockName(e);if(a[t]&&n.add(t),a["bindings/core/pattern-overrides"]){const r=o.getBlockParentsByBlockName(e,"core/block");if(r?.length>0)continue;const l=o.getBlockAttributes(e);l?.metadata?.bindings&&JSON.stringify(l.metadata.bindings).includes("core/pattern-overrides")&&(n.add(t),i="patternOverrides")}const r=o.getBlockOrder(e);l.push(...r)}if(n.size)return void r(function(e,t,n,o){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,blockNamesForPrompt:n,messageType:o}}(e,t,Array.from(n),i))}t&&r.selectPreviousBlock(e[0],t),l.batch((()=>{r({type:"REMOVE_BLOCKS",clientIds:e}),r(Tn())}))},Tn=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;const{__unstableHasCustomAppender:n}=e.getSettings();n||t.insertDefaultBlock()};function Mn(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function Pn(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function Rn(e){return{type:"SET_OPENED_BLOCK_SETTINGS_MENU",clientId:e}}function Nn(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function Ln(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function An(e){return({dispatch:t,select:n,registry:o})=>{o.batch((()=>{t({type:"SET_EXPLICIT_PERSISTENT",isPersistentChange:!1}),e(),t({type:"SET_EXPLICIT_PERSISTENT",isPersistentChange:void 0});const o=n.getBlocks();wn.add(o)}))}}function On(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function Dn(e){return({select:t,dispatch:n})=>{const o=t.__unstableGetTemporarilyEditingFocusModeToRevert();n.__unstableMarkNextChangeAsNotPersistent(),n.updateBlockAttributes(e,{templateLock:"contentOnly"}),n.updateBlockListSettings(e,{...t.getBlockListSettings(e),templateLock:"contentOnly"}),n.updateSettings({focusMode:o}),n.__unstableSetTemporarilyEditingAsBlocks()}}function zn(){return{type:"START_DRAGGING"}}function Vn(){return{type:"STOP_DRAGGING"}}const Fn={user:"user",theme:"theme",directory:"directory"},Hn={full:"fully",unsynced:"unsynced"},Gn={name:"allPatterns",label:(0,x._x)("All","patterns")},Un={name:"myPatterns",label:(0,x.__)("My patterns")};function $n(e,t,n){const o=e.name.startsWith("core/block"),r="core"===e.source||e.source?.startsWith("pattern-directory");return!(t!==Fn.theme||!o&&!r)||(!(t!==Fn.directory||!o&&r)||(t===Fn.user&&e.type!==Fn.user||(n===Hn.full&&""!==e.syncStatus||!(n!==Hn.unsynced||"unsynced"===e.syncStatus||!o))))}function jn(e,t,n){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};const o=t.pop();let r=e;for(const e of t){const t=r[e];r=r[e]=Array.isArray(t)?[...t]:{...t}}return r[o]=n,e}const Wn=(e,t,n)=>{var o;const r=Array.isArray(t)?t:t.split(".");let l=e;return r.forEach((e=>{l=l?.[e]})),null!==(o=l)&&void 0!==o?o:n},Kn=["color","border","dimensions","typography","spacing"],Zn={"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},qn={"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"},Yn=e=>qn[e]||e;const Xn=new WeakMap;function Qn(e){var t,n;return null!==(t=null!==(n=e.custom)&&void 0!==n?n:e.theme)&&void 0!==t?t:e.default}function Jn(e){return["default","theme","custom"].some((t=>e?.[t]?.length))}function eo(e,t,...n){const o=ce(e,t),r=[];if(t){let n=t;do{const t=ce(e,n);(0,c.hasBlockSupport)(t,"__experimentalSettings",!1)&&r.push(n)}while(n=e.blocks.parents.get(n))}return n.map((n=>{if(Kn.includes(n))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let l=(0,m.applyFilters)("blockEditor.useSetting.before",void 0,n,t,o);if(void 0!==l)return l;const i=Yn(n);for(const t of r){var s;const n=de(e,t);if(l=null!==(s=Wn(n.settings?.blocks?.[o],i))&&void 0!==s?s:Wn(n.settings,i),void 0!==l)break}const a=Xt(e);if(void 0===l&&o&&(l=Wn(a.__experimentalFeatures?.blocks?.[o],i)),void 0===l&&(l=Wn(a.__experimentalFeatures,i)),void 0!==l)return c.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[i]?Qn(l):l;const u=Zn[i]?.(a);return void 0!==u?u:"typography.dropCap"===i||void 0}))}function to(e){return e.isBlockInterfaceHidden}function no(e){return e?.lastBlockInserted?.clientIds}function oo(e,t){return e.blocks.byClientId.get(t)}const ro=(e,t)=>{const n=t=>"disabled"===_n(e,t)&&ot(e,t).every(n);return ot(e,t).every(n)};const lo=K((function e(t,n){const o=ot(t,n),r=[];for(const n of o){const o=e(t,n);"disabled"!==_n(t,n)?r.push({clientId:n,innerBlocks:o}):r.push(...o)}return r}),(e=>[e.blocks.order,e.blockEditingModes,e.settings.templateLock,e.blockListSettings])),io=K(((e,t,n=!1)=>Le(e,t,n).filter((t=>"disabled"!==_n(e,t)))),(e=>[e.blocks.parents,e.blockEditingModes,e.settings.templateLock,e.blockListSettings]));function so(e){return e.removalPromptData}function ao(e){return e.blockRemovalRules}function co(e){return e.openedBlockSettingsMenu}function uo(e){return e.styleOverrides}function po(e){return e.registeredInserterMediaCategories}const mo=K((e=>{const{settings:{inserterMediaCategories:t,allowedMimeTypes:n,enableOpenverseMediaCategory:o},registeredInserterMediaCategories:r}=e;if(!t&&!r.length||!n)return;const l=t?.map((({name:e})=>e))||[];return[...t||[],...(r||[]).filter((({name:e})=>!l.includes(e)))].filter((e=>!(!o&&"openverse"===e.name)&&Object.values(n).some((t=>t.startsWith(`${e.mediaType}/`)))))}),(e=>[e.settings.inserterMediaCategories,e.settings.allowedMimeTypes,e.settings.enableOpenverseMediaCategory,e.registeredInserterMediaCategories])),ho=(0,d.createRegistrySelector)((e=>K(((t,n=null)=>{const{getAllPatterns:o,__experimentalGetParsedPattern:r}=ie(e(oe)),l=o(),{allowedBlockTypes:i}=Xt(t);return l.some((({name:e,inserter:o=!0})=>{if(!o)return!1;const{blocks:l}=r(e);return J(l,i)&&l.every((({name:e})=>Ct(t,e,n)))}))}),((t,n)=>[ee(e)(t),t.settings.allowedBlockTypes,t.settings.templateLock,t.blockListSettings[n],t.blocks.byClientId.get(n)])))),go=(0,d.createRegistrySelector)((e=>K((t=>{var n;const{__experimentalBlockPatterns:o=[],__experimentalUserPatternCategories:r=[],__experimentalReusableBlocks:l=[]}=t.settings,i=(null!=l?l:[]).map((e=>({name:`core/block/${e.id}`,id:e.id,type:Fn.user,title:e.title.raw,categories:e.wp_pattern_category.map((e=>{const t=(null!=r?r:[]).find((({id:t})=>t===e));return t?t.slug:e})),content:e.content.raw,syncStatus:e.wp_pattern_sync_status})));return[...i,...o,...null!==(n=t.settings[X]?.(e))&&void 0!==n?n:[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name))))}),ee(e))));function fo(e){return e.lastFocus}function bo(e){return e.isDragging}const vo=window.wp.a11y,ko="†";function _o(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return("string"==typeof n||n instanceof Y.RichTextData)&&-1!==n.toString().indexOf(ko)}))}const yo=e=>Array.isArray(e)?e:[e],Eo=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(wo(e))},wo=e=>({select:t,dispatch:n})=>{const o=t.getTemplate(),r=t.getTemplateLock(),l=!o||"all"!==r||(0,c.doBlocksMatchTemplate)(e,o);if(l!==t.isValidTemplate())return n.setTemplateValidity(l),l};function So(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function Co(e){return w()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function xo(e,t,n=!1){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:yo(e),attributes:t,uniqueByBlock:n}}function Bo(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Io(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const To=(e,t=!1)=>({select:n,dispatch:o})=>{const r=n.getPreviousBlockClientId(e);if(r)o.selectBlock(r,-1);else if(t){const t=n.getBlockRootClientId(e);t&&o.selectBlock(t,-1)}},Mo=e=>({select:t,dispatch:n})=>{const o=t.getNextBlockClientId(e);o&&n.selectBlock(o)};function Po(){return{type:"START_MULTI_SELECT"}}function Ro(){return{type:"STOP_MULTI_SELECT"}}const No=(e,t,n=0)=>({select:o,dispatch:r})=>{if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;r({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const l=o.getSelectedBlockCount();(0,vo.speak)((0,x.sprintf)((0,x._n)("%s block selected.","%s blocks selected.",l),l),"assertive")};function Lo(){return{type:"CLEAR_SELECTED_BLOCK"}}function Ao(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Oo(e,t){var n;const o=null!==(n=t?.__experimentalPreferredStyleVariations?.value)&&void 0!==n?n:{};return e.map((e=>{const t=e.name;if(!(0,c.hasBlockSupport)(t,"defaultStylePicker",!0))return e;if(!o[t])return e;const n=e.attributes?.className;if(n?.includes("is-style-"))return e;const{attributes:r={}}=e,l=o[t];return{...e,attributes:{...r,className:`${n||""} is-style-${l}`.trim()}}}))}const Do=(e,t,n,o=0,r)=>({select:l,dispatch:i,registry:s})=>{e=yo(e),t=Oo(yo(t),l.getSettings());const a=l.getBlockRootClientId(e[0]);for(let e=0;e<t.length;e++){const n=t[e];if(!l.canInsertBlockType(n.name,a))return}s.batch((()=>{i({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r}),i.ensureDefaultBlock()}))};function zo(e,t){return Do(e,t)}const Vo=e=>(t,n)=>({select:o,dispatch:r})=>{o.canMoveBlocks(t,n)&&r({type:e,clientIds:yo(t),rootClientId:n})},Fo=Vo("MOVE_BLOCKS_DOWN"),Ho=Vo("MOVE_BLOCKS_UP"),Go=(e,t="",n="",o)=>({select:r,dispatch:l})=>{if(r.canMoveBlocks(e,t)){if(t!==n){if(!r.canRemoveBlocks(e,t))return;if(!r.canInsertBlocks(e,n))return}l({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o})}};function Uo(e,t="",n="",o){return Go([e],t,n,o)}function $o(e,t,n,o,r){return jo([e],t,n,o,0,r)}const jo=(e,t,n,o=!0,r=0,l)=>({select:i,dispatch:s})=>{null!==r&&"object"==typeof r&&(l=r,r=0,w()("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=Oo(yo(e),i.getSettings());const a=[];for(const t of e){i.canInsertBlockType(t.name,n)&&a.push(t)}a.length&&s({type:"INSERT_BLOCKS",blocks:a,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:l})};function Wo(e,t,n={}){const{__unstableWithInserter:o,operation:r,nearestSide:l}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o,operation:r,nearestSide:l}}const Ko=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function Zo(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const qo=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});const n=e.getBlocks(),o=e.getTemplate(),r=(0,c.synchronizeBlocksWithTemplate)(n,o);t.resetBlocks(r)},Yo=e=>({registry:t,select:n,dispatch:o})=>{const r=n.getSelectionStart(),l=n.getSelectionEnd();if(r.clientId===l.clientId)return;if(!r.attributeKey||!l.attributeKey||void 0===r.offset||void 0===l.offset)return!1;const i=n.getBlockRootClientId(r.clientId);if(i!==n.getBlockRootClientId(l.clientId))return;const s=n.getBlockOrder(i);let a,u;s.indexOf(r.clientId)>s.indexOf(l.clientId)?(a=l,u=r):(a=r,u=l);const d=e?u:a,p=n.getBlock(d.clientId),m=(0,c.getBlockType)(p.name);if(!m.merge)return;const h=a,g=u,f=n.getBlock(h.clientId),b=n.getBlock(g.clientId),v=f.attributes[h.attributeKey],k=b.attributes[g.attributeKey];let _=(0,Y.create)({html:v}),y=(0,Y.create)({html:k});_=(0,Y.remove)(_,h.offset,_.text.length),y=(0,Y.insert)(y,ko,0,g.offset);const E=(0,c.cloneBlock)(f,{[h.attributeKey]:(0,Y.toHTMLString)({value:_})}),w=(0,c.cloneBlock)(b,{[g.attributeKey]:(0,Y.toHTMLString)({value:y})}),S=e?E:w,C=f.name===b.name?[S]:(0,c.switchToBlockType)(S,m.name);if(!C||!C.length)return;let x;if(e){const e=C.pop();x=m.merge(e.attributes,w.attributes)}else{const e=C.shift();x=m.merge(E.attributes,e.attributes)}const B=_o(x),I=x[B],T=(0,Y.create)({html:I}),M=T.text.indexOf(ko),P=(0,Y.remove)(T,M,M+1),R=(0,Y.toHTMLString)({value:P});x[B]=R;const N=n.getSelectedBlockClientIds(),L=[...e?C:[],{...p,attributes:{...p.attributes,...x}},...e?[]:C];t.batch((()=>{o.selectionChange(p.clientId,B,M,M),o.replaceBlocks(N,L,0,n.getSelectedBlocksInitialCaretPosition())}))},Xo=()=>({select:e,dispatch:t})=>{const n=e.getSelectionStart(),o=e.getSelectionEnd();if(n.clientId===o.clientId)return;if(!n.attributeKey||!o.attributeKey||void 0===n.offset||void 0===o.offset)return;const r=e.getBlockRootClientId(n.clientId);if(r!==e.getBlockRootClientId(o.clientId))return;const l=e.getBlockOrder(r);let i,s;l.indexOf(n.clientId)>l.indexOf(o.clientId)?(i=o,s=n):(i=n,s=o);const a=i,c=s,u=e.getBlock(a.clientId),d=e.getBlock(c.clientId),p=u.attributes[a.attributeKey],m=d.attributes[c.attributeKey];let h=(0,Y.create)({html:p}),g=(0,Y.create)({html:m});h=(0,Y.remove)(h,a.offset,h.text.length),g=(0,Y.remove)(g,0,c.offset),t.replaceBlocks(e.getSelectedBlockClientIds(),[{...u,attributes:{...u.attributes,[a.attributeKey]:(0,Y.toHTMLString)({value:h})}},{...d,attributes:{...d.attributes,[c.attributeKey]:(0,Y.toHTMLString)({value:g})}}])},Qo=()=>({select:e,dispatch:t})=>{const n=e.getSelectionStart(),o=e.getSelectionEnd();t.selectionChange({start:{clientId:n.clientId},end:{clientId:o.clientId}})},Jo=(e,t)=>({registry:n,select:o,dispatch:r})=>{const l=[e,t];r({type:"MERGE_BLOCKS",blocks:l});const[i,s]=l,a=o.getBlock(i),u=(0,c.getBlockType)(a.name);if(!u)return;const d=o.getBlock(s);if(!u.merge&&(0,c.getBlockSupport)(a.name,"__experimentalOnMerge")){const e=(0,c.switchToBlockType)(d,u.name);if(1!==e?.length)return void r.selectBlock(a.clientId);const[t]=e;return t.innerBlocks.length<1?void r.selectBlock(a.clientId):void n.batch((()=>{r.insertBlocks(t.innerBlocks,void 0,i),r.removeBlock(s),r.selectBlock(t.innerBlocks[0].clientId);const e=o.getNextBlockClientId(i);if(e&&o.getBlockName(i)===o.getBlockName(e)){const t=o.getBlockAttributes(i),n=o.getBlockAttributes(e);Object.keys(t).every((e=>t[e]===n[e]))&&(r.moveBlocksToPosition(o.getBlockOrder(e),e,i),r.removeBlock(e,!1))}}))}if((0,c.isUnmodifiedDefaultBlock)(a))return void r.removeBlock(i,o.isBlockSelected(i));if((0,c.isUnmodifiedDefaultBlock)(d))return void r.removeBlock(s,o.isBlockSelected(s));if(!u.merge)return void r.selectBlock(a.clientId);const p=(0,c.getBlockType)(d.name),{clientId:m,attributeKey:h,offset:g}=o.getSelectionStart(),f=(m===i?u:p).attributes[h],b=(m===i||m===s)&&void 0!==h&&void 0!==g&&!!f;f||("number"==typeof h?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was "+typeof h):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const v=(0,c.cloneBlock)(a),k=(0,c.cloneBlock)(d);if(b){const e=m===i?v:k,t=e.attributes[h],n=(0,Y.insert)((0,Y.create)({html:t}),ko,g,g);e.attributes[h]=(0,Y.toHTMLString)({value:n})}const _=a.name===d.name?[k]:(0,c.switchToBlockType)(k,a.name);if(!_||!_.length)return;const y=u.merge(v.attributes,_[0].attributes);if(b){const e=_o(y),t=y[e],n=(0,Y.create)({html:t}),o=n.text.indexOf(ko),l=(0,Y.remove)(n,o,o+1),i=(0,Y.toHTMLString)({value:l});y[e]=i,r.selectionChange(a.clientId,e,o,o)}r.replaceBlocks([a.clientId,d.clientId],[{...a,attributes:{...a.attributes,...y}},..._.slice(1)],0)},er=(e,t=!0)=>In(e,t);function tr(e,t){return er([e],t)}function nr(e,t,n=!1,o=0){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function or(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function rr(){return{type:"START_TYPING"}}function lr(){return{type:"STOP_TYPING"}}function ir(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function sr(){return{type:"STOP_DRAGGING_BLOCKS"}}function ar(){return w()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function cr(){return w()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function ur(e,t,n,o){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}:{type:"SELECTION_CHANGE",...e}}const dr=(e,t,n)=>({dispatch:o})=>{const r=(0,c.getDefaultBlockName)();if(!r)return;const l=(0,c.createBlock)(r,e);return o.insertBlock(l,n,t)};function pr(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function mr(e){return Cn(e,{stripExperimentalSettings:!0})}function hr(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function gr(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function fr(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const br=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:t=(e=>setTimeout(e,100))}=window;t((()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},vr=(e=!0)=>({dispatch:t})=>{t.__unstableSetEditorMode(e?"navigation":"edit")},kr=e=>({dispatch:t,select:n})=>{if("zoom-out"===e){const e=n.getBlockSelectionStart();e&&t.selectBlock(n.getBlockHierarchyRootClientId(e))}t({type:"SET_EDITOR_MODE",mode:e}),"navigation"===e?(0,vo.speak)((0,x.__)("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,vo.speak)((0,x.__)("You are currently in edit mode. To return to the navigation mode, press Escape.")):"zoom-out"===e&&(0,vo.speak)((0,x.__)("You are currently in zoom-out mode."))},_r=(e=null)=>({dispatch:t})=>{t({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,vo.speak)((0,x.__)("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=(e,t=!0)=>({select:n,dispatch:o})=>{if(!e||!e.length)return;const r=n.getBlocksByClientId(e);if(r.some((e=>!e)))return;const l=r.map((e=>e.name));if(l.some((e=>!(0,c.hasBlockSupport)(e,"multiple",!0))))return;const i=n.getBlockRootClientId(e[0]),s=yo(e),a=n.getBlockIndex(s[s.length-1]),u=r.map((e=>(0,c.__experimentalCloneSanitizedBlock)(e)));return o.insertBlocks(u,a+1,i,t),u.length>1&&t&&o.multiSelect(u[0].clientId,u[u.length-1].clientId),u.map((e=>e.clientId))},Er=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e),l=o?t.getDirectInsertBlock(o):null;if(!l)return n.insertDefaultBlock({},o,r);const i={};if(l.attributesToCopy){const n=t.getBlockAttributes(e);l.attributesToCopy.forEach((e=>{n[e]&&(i[e]=n[e])}))}const s=(0,c.createBlock)(l.name,{...l.attributes,...i});return n.insertBlock(s,r,o)},wr=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e),l=o?t.getDirectInsertBlock(o):null;if(!l)return n.insertDefaultBlock({},o,r+1);const i={};if(l.attributesToCopy){const n=t.getBlockAttributes(e);l.attributesToCopy.forEach((e=>{n[e]&&(i[e]=n[e])}))}const s=(0,c.createBlock)(l.name,{...l.attributes,...i});return n.insertBlock(s,r+1,o)};function Sr(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const Cr=e=>async({dispatch:t})=>{t(Sr(e,!0)),await new Promise((e=>setTimeout(e,150))),t(Sr(e,!1))};function xr(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function Br(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function Ir(e,t){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e,focusModeToRevert:t}}const Tr=e=>({select:t,dispatch:n})=>{if(!e||"object"!=typeof e)return void console.error("Category should be an `InserterMediaCategory` object.");if(!e.name)return void console.error("Category should have a `name` that should be unique among all media categories.");if(!e.labels?.name)return void console.error("Category should have a `labels.name`.");if(!["image","audio","video"].includes(e.mediaType))return void console.error("Category should have `mediaType` property that is one of `image|audio|video`.");if(!e.fetch||"function"!=typeof e.fetch)return void console.error("Category should have a `fetch` function defined with the following signature `(InserterMediaRequest) => Promise<InserterMediaItem[]>`.");const o=t.getRegisteredInserterMediaCategories();o.some((({name:t})=>t===e.name))?console.error(`A category is already registered with the same name: "${e.name}".`):o.some((({labels:{name:t}={}})=>t===e.labels?.name))?console.error(`A category is already registered with the same labels.name: "${e.labels.name}".`):n({type:"REGISTER_INSERTER_MEDIA_CATEGORY",category:{...e,isExternalResource:!0}})};function Mr(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function Pr(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}const Rr={reducer:U,selectors:e,actions:l},Nr=(0,d.createReduxStore)(oe,{...Rr,persist:["preferences"]}),Lr=(0,d.registerStore)(oe,{...Rr,persist:["preferences"]});function Ar(...e){const{clientId:t=null}=y();return(0,d.useSelect)((n=>ie(n(Nr)).getBlockSettings(t,...e)),[t,...e])}function Or(e){w()("wp.blockEditor.useSetting",{since:"6.5",alternative:"wp.blockEditor.useSettings",note:"The new useSettings function can retrieve multiple settings at once, with better performance."});const[t]=Ar(e);return t}ie(Lr).registerPrivateActions(t),ie(Lr).registerPrivateSelectors(r),ie(Nr).registerPrivateActions(t),ie(Nr).registerPrivateSelectors(r);const Dr="1600px",zr="320px",Vr=1,Fr=.25,Hr=.75,Gr="14px";function Ur({minimumFontSize:e,maximumFontSize:t,fontSize:n,minimumViewportWidth:o=zr,maximumViewportWidth:r=Dr,scaleFactor:l=Vr,minimumFontSizeLimit:i}){if(i=$r(i)?i:Gr,n){const o=$r(n);if(!o?.unit)return null;const r=$r(i,{coerceTo:o.unit});if(r?.value&&!e&&!t&&o?.value<=r?.value)return null;if(t||(t=`${o.value}${o.unit}`),!e){const t="px"===o.unit?o.value:16*o.value,n=Math.min(Math.max(1-.075*Math.log2(t),Fr),Hr),l=jr(o.value*n,3);e=r?.value&&l<r?.value?`${r.value}${r.unit}`:`${l}${o.unit}`}}const s=$r(e),a=s?.unit||"rem",c=$r(t,{coerceTo:a});if(!s||!c)return null;const u=$r(e,{coerceTo:"rem"}),d=$r(r,{coerceTo:a}),p=$r(o,{coerceTo:a});if(!d||!p||!u)return null;const m=d.value-p.value;if(!m)return null;const h=jr(p.value/100,3),g=jr(h,3)+a,f=jr(((c.value-s.value)/m*100||1)*l,3);return`clamp(${e}, ${`${u.value}${u.unit} + ((1vw - ${g}) * ${f})`}, ${t})`}function $r(e,t={}){if("string"!=typeof e&&"number"!=typeof e)return null;isFinite(e)&&(e=`${e}px`);const{coerceTo:n,rootSizeValue:o,acceptableUnits:r}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},l=r?.join("|"),i=new RegExp(`^(\\d*\\.?\\d+)(${l}){1,1}$`),s=e.match(i);if(!s||s.length<3)return null;let[,a,c]=s,u=parseFloat(a);return"px"!==n||"em"!==c&&"rem"!==c||(u*=o,c=n),"px"!==c||"em"!==n&&"rem"!==n||(u/=o,c=n),"em"!==n&&"rem"!==n||"em"!==c&&"rem"!==c||(c=n),{value:jr(u,3),unit:c}}function jr(e,t=3){const n=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*n)/n):void 0}function Wr(e,t){const{size:n}=e;if(!Kr(t))return n;if(!n||"0"===n||!1===e?.fluid)return n;const o="object"==typeof t?.fluid?t?.fluid:{},r=Ur({minimumFontSize:e?.fluid?.min,maximumFontSize:e?.fluid?.max,fontSize:n,minimumFontSizeLimit:o?.minFontSize,maximumViewportWidth:o?.maxViewportWidth,minimumViewportWidth:o?.minViewportWidth});return r||n}function Kr(e){const t=e?.fluid;return!0===t||t&&"object"==typeof t&&Object.keys(t).length>0}function Zr(e){const t=e?.typography,n=e?.layout,o=$r(n?.wideSize)?n?.wideSize:null;return Kr(t)&&o?{fluid:{maxViewportWidth:o,...t.fluid}}:{fluid:t?.fluid}}const qr="body",Yr=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>Wr(e,Zr(t)),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:e})=>e,classes:[]}],Xr={"color.background":"color","color.text":"color","filter.duotone":"duotone","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.caption.color.text":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",shadow:"shadow","typography.fontSize":"font-size","typography.fontFamily":"font-family"},Qr={popoverProps:{placement:"left-start",offset:259}};function Jr(e,t,n,o,r){const l=[Wn(e,["blocks",t,...n]),Wn(e,n)];for(const i of l)if(i){const l=["custom","theme","default"];for(const s of l){const l=i[s];if(l){const i=l.find((e=>e[o]===r));if(i){if("slug"===o)return i;return Jr(e,t,n,"slug",i.slug)[o]===i[o]?i:void 0}}}}}function el(e,t,n){if(!n||"string"!=typeof n){if(!n?.ref||"string"!=typeof n?.ref)return n;{const t=n.ref.split(".");if(!(n=Wn(e,t))||n?.ref)return n}}const o="var:",r="var(--wp--";let l;if(n.startsWith(o))l=n.slice(4).split("|");else{if(!n.startsWith(r)||!n.endsWith(")"))return n;l=n.slice(10,-1).split("--")}const[i,...s]=l;return"preset"===i?function(e,t,n,[o,r]){const l=Yr.find((e=>e.cssVarInfix===o));if(!l)return n;const i=Jr(e.settings,t,l.path,"slug",r);if(i){const{valueKey:n}=l;return el(e,t,i[n])}return n}(e,t,n,s):"custom"===i?function(e,t,n,o){var r;const l=null!==(r=Wn(e.settings,["blocks",t,"custom",...o]))&&void 0!==r?r:Wn(e.settings,["custom",...o]);return l?el(e,t,l):n}(e,t,n,s):n}function tl(e,t){const n=e.split(","),o=t.split(","),r=[];return n.forEach((e=>{o.forEach((t=>{r.push(`${e.trim()} ${t.trim()}`)}))})),r.join(", ")}function nl(e,t){return"object"!=typeof e||"object"!=typeof t?e===t:C()(e?.styles,t?.styles)&&C()(e?.settings,t?.settings)}const ol=(0,u.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}}),rl={settings:{},styles:{}},ll=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","border.color","border.radius","border.style","border.width","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.minHeight","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textColumns","typography.textDecoration","typography.textTransform","typography.writingMode"],il=()=>{const{user:e,setUserConfig:t}=(0,u.useContext)(ol);return[!!e&&!C()(e,rl),(0,u.useCallback)((()=>t((()=>rl))),[t])]};function sl(e,t,n="all"){const{setUserConfig:o,...r}=(0,u.useContext)(ol),l=t?".blocks."+t:"",i=e?"."+e:"",s=`settings${l}${i}`,a=`settings${i}`,c="all"===n?"merged":n;return[(0,u.useMemo)((()=>{const t=r[c];if(!t)throw"Unsupported source";var n;if(e)return null!==(n=Wn(t,s))&&void 0!==n?n:Wn(t,a);let o={};return ll.forEach((e=>{var n;const r=null!==(n=Wn(t,`settings${l}.${e}`))&&void 0!==n?n:Wn(t,`settings.${e}`);void 0!==r&&(o=jn(o,e.split("."),r))})),o}),[r,c,e,s,a,l]),e=>{o((t=>jn(t,s.split("."),e)))}]}function al(e,t,n="all",{shouldDecodeEncode:o=!0}={}){const{merged:r,base:l,user:i,setUserConfig:s}=(0,u.useContext)(ol),a=e?"."+e:"",c=t?`styles.blocks.${t}${a}`:`styles${a}`;let d,p;switch(n){case"all":d=Wn(r,c),p=o?el(r,t,d):d;break;case"user":d=Wn(i,c),p=o?el(r,t,d):d;break;case"base":d=Wn(l,c),p=o?el(l,t,d):d;break;default:throw"Unsupported source"}return[p,n=>{s((l=>jn(l,c.split("."),o?function(e,t,n,o){if(!o)return o;const r=Xr[n],l=Yr.find((e=>e.cssVarInfix===r));if(!l)return o;const{valueKey:i,path:s}=l,a=Jr(e,t,s,i,o);return a?`var:preset|${r}|${a.slug}`:o}(r.settings,t,e,n):n)))}]}function cl(e,t,n){const{supportedStyles:o,supports:r}=(0,d.useSelect)((e=>({supportedStyles:ie(e(c.store)).getSupportedStyles(t,n),supports:e(c.store).getBlockType(t)?.supports})),[t,n]);return(0,u.useMemo)((()=>{const t={...e};return o.includes("fontSize")||(t.typography={...t.typography,fontSizes:{},customFontSize:!1}),o.includes("fontFamily")||(t.typography={...t.typography,fontFamilies:{}}),t.color={...t.color,text:t.color?.text&&o.includes("color"),background:t.color?.background&&(o.includes("background")||o.includes("backgroundColor")),button:t.color?.button&&o.includes("buttonColor"),heading:t.color?.heading&&o.includes("headingColor"),link:t.color?.link&&o.includes("linkColor"),caption:t.color?.caption&&o.includes("captionColor")},o.includes("background")||(t.color.gradients=[],t.color.customGradient=!1),o.includes("filter")||(t.color.defaultDuotone=!1,t.color.customDuotone=!1),["lineHeight","fontStyle","fontWeight","letterSpacing","textTransform","textDecoration","writingMode"].forEach((e=>{o.includes(e)||(t.typography={...t.typography,[e]:!1})})),o.includes("columnCount")||(t.typography={...t.typography,textColumns:!1}),["contentSize","wideSize"].forEach((e=>{o.includes(e)||(t.layout={...t.layout,[e]:!1})})),["padding","margin","blockGap"].forEach((e=>{o.includes(e)||(t.spacing={...t.spacing,[e]:!1});const n=Array.isArray(r?.spacing?.[e])?r?.spacing?.[e]:r?.spacing?.[e]?.sides;n?.length&&t.spacing?.[e]&&(t.spacing={...t.spacing,[e]:{...t.spacing?.[e],sides:n}})})),["aspectRatio","minHeight"].forEach((e=>{o.includes(e)||(t.dimensions={...t.dimensions,[e]:!1})})),["radius","color","style","width"].forEach((e=>{o.includes("border"+e.charAt(0).toUpperCase()+e.slice(1))||(t.border={...t.border,[e]:!1})})),t.shadow=!!o.includes("shadow")&&t.shadow,t}),[e,o,r])}function ul(e){const t=e?.color?.palette?.custom,n=e?.color?.palette?.theme,o=e?.color?.palette?.default,r=e?.color?.defaultPalette;return(0,u.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,x._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,x._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,x._x)("Custom","Indicates this palette is created by the user."),colors:t}),e}),[t,n,o,r])}function dl(e){const t=e?.color?.gradients?.custom,n=e?.color?.gradients?.theme,o=e?.color?.gradients?.default,r=e?.color?.defaultGradients;return(0,u.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,x._x)("Theme","Indicates this palette comes from the theme."),gradients:n}),r&&o&&o.length&&e.push({name:(0,x._x)("Default","Indicates this palette comes from WordPress."),gradients:o}),t&&t.length&&e.push({name:(0,x._x)("Custom","Indicates this palette is created by the user."),gradients:t}),e}),[t,n,o,r])}var pl=n(5755),ml=n.n(pl);const hl=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.entries(e).map((([e,t])=>[e,hl(t)])).filter((([,e])=>void 0!==e));return t.length?Object.fromEntries(t):void 0};function gl(e,t,n,o,r,l){if(Object.values(null!=e?e:{}).every((e=>!e)))return n;if(1===l.length&&n.innerBlocks.length===o.length)return n;let i=o[0]?.attributes;if(l.length>1&&o.length>1){if(!o[r])return n;i=o[r]?.attributes}let s=n;return Object.entries(e).forEach((([e,n])=>{n&&t[e].forEach((e=>{const t=Wn(i,e);t&&(s={...s,attributes:jn(s.attributes,e,t)})}))})),s}function fl(e,t,n){const o=(0,c.getBlockSupport)(e,t),r=o?.__experimentalSkipSerialization;return Array.isArray(r)?r.includes(n):r}function bl({id:e,css:t,assets:n,__unstableType:o}={}){const{setStyleOverride:r,deleteStyleOverride:l}=ie((0,d.useDispatch)(Nr)),i=(0,u.useId)();(0,u.useEffect)((()=>{if(!t&&!n)return;const s=e||i;return r(s,{id:e,css:t,assets:n,__unstableType:o}),()=>{l(s)}}),[e,t,n,o,i,r,l])}function vl(e,t){const[n,o,r,l,i,s,a,c,d,p,m,h,g,f,b,v,k,_,y,E,w,S,C,x,B,I,T,M,P,R,N,L,A,O,D,z,V,F,H,G,U,$,j,W,K,Z,q,Y,X,Q]=Ar("background.backgroundImage","background.backgroundSize","typography.fontFamilies.custom","typography.fontFamilies.default","typography.fontFamilies.theme","typography.fontSizes.custom","typography.fontSizes.default","typography.fontSizes.theme","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textColumns","typography.textDecoration","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.spacingSizes","spacing.units","dimensions.aspectRatio","dimensions.minHeight","layout","border.color","border.radius","border.style","border.width","color.custom","color.palette.custom","color.customDuotone","color.palette.theme","color.palette.default","color.defaultPalette","color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients","color.customGradient","color.background","color.link","color.text","color.heading","color.button","shadow");return cl((0,u.useMemo)((()=>({background:{backgroundImage:n,backgroundSize:o},color:{palette:{custom:N,theme:A,default:O},gradients:{custom:G,theme:U,default:$},duotone:{custom:V,theme:F,default:H},defaultGradients:j,defaultPalette:D,defaultDuotone:z,custom:R,customGradient:W,customDuotone:L,background:K,link:Z,heading:Y,button:X,text:q},typography:{fontFamilies:{custom:r,default:l,theme:i},fontSizes:{custom:s,default:a,theme:c},customFontSize:d,fontStyle:p,fontWeight:m,lineHeight:h,textColumns:g,textDecoration:f,textTransform:v,letterSpacing:k,writingMode:b},spacing:{spacingSizes:{custom:w},padding:_,margin:y,blockGap:E,units:S},border:{color:I,radius:T,style:M,width:P},dimensions:{aspectRatio:C,minHeight:x},layout:B,parentLayout:t,shadow:Q})),[n,o,r,l,i,s,a,c,d,p,m,h,g,f,v,k,b,_,y,E,w,S,C,x,B,t,I,T,M,P,R,N,L,A,O,D,z,V,F,H,G,U,$,j,W,K,Z,q,Y,X,Q]),e)}const kl=(0,u.memo)((function({index:e,useBlockProps:t,setAllWrapperProps:n,...o}){const r=t(o),l=t=>n((n=>{const o=[...n];return o[e]=t,o}));return(0,u.useEffect)((()=>(l(r),()=>{l(void 0)}))),null}));(0,m.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&(0,c.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));const _l=window.wp.components,yl={default:(0,_l.createSlotFill)("BlockControls"),block:(0,_l.createSlotFill)("BlockControlsBlock"),inline:(0,_l.createSlotFill)("BlockFormatControls"),other:(0,_l.createSlotFill)("BlockControlsOther"),parent:(0,_l.createSlotFill)("BlockControlsParent")};function El({group:e="default",controls:t,children:n,__experimentalShareWithChildBlocks:o=!1}){const r=function(e,t){const n=y();return n[h]?yl[e]?.Fill:n[g]&&t?yl.parent.Fill:null}(e,o);if(!r)return null;const l=(0,s.createElement)(s.Fragment,null,"default"===e&&(0,s.createElement)(_l.ToolbarGroup,{controls:t}),n);return(0,s.createElement)(_l.__experimentalStyleProvider,{document},(0,s.createElement)(r,null,(e=>{const{forwardedContext:t=[]}=e;return t.reduce(((e,[t,n])=>(0,s.createElement)(t,{...n},e)),l)})))}window.wp.warning;const{ComponentsContext:wl}=ie(_l.privateApis);function Sl({group:e="default",...t}){const n=(0,u.useContext)(_l.__experimentalToolbarContext),o=(0,u.useContext)(wl),r=(0,u.useMemo)((()=>({forwardedContext:[[_l.__experimentalToolbarContext.Provider,{value:n}],[wl.Provider,{value:o}]]})),[n,o]),l=yl[e]?.Slot,i=(0,_l.__experimentalUseSlotFills)(l?.__unstableName);if(!l)return null;if(!i?.length)return null;const a=(0,s.createElement)(l,{...t,bubblesVirtually:!0,fillProps:r});return"default"===e?a:(0,s.createElement)(_l.ToolbarGroup,null,a)}const Cl=El;Cl.Slot=Sl;const xl=e=>(0,s.createElement)(El,{group:"inline",...e});xl.Slot=e=>(0,s.createElement)(Sl,{group:"inline",...e});const Bl=Cl,Il=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),Tl=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})),Ml=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),Pl=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})),Rl=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})),Nl=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})),Ll=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.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"})),Al={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child:first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child:last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child:first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child:last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > *",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > *",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};function Ol(e,t=""){return e.split(",").map((e=>`.editor-styles-wrapper ${e}${t?` ${t}`:""}`)).join(",")}function Dl(e,t=Al,n,o){let r="";return t?.[n]?.spacingStyles?.length&&o&&t[n].spacingStyles.forEach((t=>{r+=`${Ol(e,t.selector.trim())} { `,r+=Object.entries(t.rules).map((([e,t])=>`${e}: ${t||o}`)).join("; "),r+="; }"})),r}function zl(e){const{contentSize:t,wideSize:n,type:o="default"}=e,r={},l=/^(?!0)\d+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i;return l.test(t)&&"constrained"===o&&(r.none=(0,x.sprintf)((0,x.__)("Max %s wide"),t)),l.test(n)&&(r.wide=(0,x.sprintf)((0,x.__)("Max %s wide"),n)),r}const Vl=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})),Fl=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,s.createElement)(Z.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,s.createElement)(Z.Path,{d:"m18 7.5v9h1.5v-9z"})),Hl=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,s.createElement)(Z.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,s.createElement)(Z.Path,{d:"m7.5 19.5h9v-1.5h-9z"})),Gl=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,s.createElement)(Z.Path,{d:"m16.5 6h-9v-1.5h9z"})),Ul=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,s.createElement)(Z.Path,{d:"m18 16.5v-9h1.5v9z"})),$l=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,s.createElement)(Z.Path,{d:"m16.5 19.5h-9v-1.5h9z",style:{fill:"#1e1e1e"}})),jl=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,s.createElement)(Z.Path,{d:"m4.5 16.5v-9h1.5v9z"})),Wl=["top","right","bottom","left"],Kl={top:void 0,right:void 0,bottom:void 0,left:void 0},Zl={custom:Vl,axial:Vl,horizontal:Fl,vertical:Hl,top:Gl,right:Ul,bottom:$l,left:jl},ql={default:(0,x.__)("Spacing control"),top:(0,x.__)("Top"),bottom:(0,x.__)("Bottom"),left:(0,x.__)("Left"),right:(0,x.__)("Right"),mixed:(0,x.__)("Mixed"),vertical:(0,x.__)("Vertical"),horizontal:(0,x.__)("Horizontal"),axial:(0,x.__)("Horizontal & vertical"),custom:(0,x.__)("Custom")},Yl={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function Xl(e){return!!e?.includes&&("0"===e||e.includes("var:preset|spacing|"))}function Ql(e,t){if(!Xl(e))return e;const n=ti(e),o=t.find((e=>String(e.slug)===n));return o?.size}function Jl(e,t){if(!e||Xl(e)||"0"===e)return e;const n=t.find((t=>String(t.size)===String(e)));return n?.slug?`var:preset|spacing|${n.slug}`:e}function ei(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function ti(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}function ni(e,t){if(!e||!e.length)return!1;const n=e.includes("horizontal")||e.includes("left")&&e.includes("right"),o=e.includes("vertical")||e.includes("top")&&e.includes("bottom");return"horizontal"===t?n:"vertical"===t?o:n||o}function oi(e,t="0"){const n=function(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:e?.top,left:t?e:e?.left}}(e);if(!n)return null;const o=ei(n?.top)||t,r=ei(n?.left)||t;return o===r?o:`${o} ${r}`}const ri=(0,s.createElement)(_l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(_l.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),li=(0,s.createElement)(_l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(_l.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),ii=(0,s.createElement)(_l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(_l.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),si=(0,s.createElement)(_l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(_l.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})),ai=(0,s.createElement)(_l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(_l.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})),ci={top:{icon:ii,title:(0,x._x)("Align top","Block vertical alignment setting")},center:{icon:li,title:(0,x._x)("Align middle","Block vertical alignment setting")},bottom:{icon:ri,title:(0,x._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:si,title:(0,x._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:ai,title:(0,x._x)("Space between","Block vertical alignment setting")}},ui=["top","center","bottom"];const di=function({value:e,onChange:t,controls:n=ui,isCollapsed:o=!0,isToolbar:r}){function l(n){return()=>t(e===n?void 0:n)}const i=ci[e],a=ci.top,c=r?_l.ToolbarGroup:_l.ToolbarDropdownMenu,u=r?{isCollapsed:o}:{};return(0,s.createElement)(c,{icon:i?i.icon:a.icon,label:(0,x._x)("Change vertical alignment","Block vertical alignment setting label"),controls:n.map((t=>({...ci[t],isActive:e===t,role:o?"menuitemradio":void 0,onClick:l(t)}))),...u})},pi=e=>(0,s.createElement)(di,{...e,isToolbar:!1}),mi=e=>(0,s.createElement)(di,{...e,isToolbar:!0}),hi={left:Il,center:Tl,right:Ml,"space-between":Pl,stretch:Rl};const gi=function({allowedControls:e=["left","center","right","space-between"],isCollapsed:t=!0,onChange:n,value:o,popoverProps:r,isToolbar:l}){const i=e=>{n(e===o?void 0:e)},a=o?hi[o]:hi.left,c=[{name:"left",icon:Il,title:(0,x.__)("Justify items left"),isActive:"left"===o,onClick:()=>i("left")},{name:"center",icon:Tl,title:(0,x.__)("Justify items center"),isActive:"center"===o,onClick:()=>i("center")},{name:"right",icon:Ml,title:(0,x.__)("Justify items right"),isActive:"right"===o,onClick:()=>i("right")},{name:"space-between",icon:Pl,title:(0,x.__)("Space between items"),isActive:"space-between"===o,onClick:()=>i("space-between")},{name:"stretch",icon:Rl,title:(0,x.__)("Stretch items"),isActive:"stretch"===o,onClick:()=>i("stretch")}],u=l?_l.ToolbarGroup:_l.ToolbarDropdownMenu,d=l?{isCollapsed:t}:{};return(0,s.createElement)(u,{icon:a,popoverProps:r,label:(0,x.__)("Change items justification"),controls:c.filter((t=>e.includes(t.name))),...d})},fi=e=>(0,s.createElement)(gi,{...e,isToolbar:!1}),bi=e=>(0,s.createElement)(gi,{...e,isToolbar:!0}),vi={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},ki={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},_i={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},yi=["wrap","nowrap"],Ei={name:"flex",label:(0,x.__)("Flex"),inspectorControls:function({layout:e={},onChange:t,layoutBlockSupport:n={}}){const{allowOrientation:o=!0}=n;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.Flex,null,(0,s.createElement)(_l.FlexItem,null,(0,s.createElement)(Ci,{layout:e,onChange:t})),(0,s.createElement)(_l.FlexItem,null,o&&(0,s.createElement)(Bi,{layout:e,onChange:t}))),(0,s.createElement)(xi,{layout:e,onChange:t}))},toolBarControls:function({layout:e={},onChange:t,layoutBlockSupport:n}){if(n?.allowSwitching)return null;const{allowVerticalAlignment:o=!0}=n;return(0,s.createElement)(Bl,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(Ci,{layout:e,onChange:t,isToolbar:!0}),o&&(0,s.createElement)(wi,{layout:e,onChange:t,isToolbar:!0}))},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:l=Al}){const{orientation:i="horizontal"}=t,s=n?.spacing?.blockGap&&!fl(o,"spacing","blockGap")?oi(n?.spacing?.blockGap,"0.5em"):void 0,a=vi[t.justifyContent],c=yi.includes(t.flexWrap)?t.flexWrap:"wrap",u=_i[t.verticalAlignment],d=ki[t.justifyContent]||ki.left;let p="";const m=[];return c&&"wrap"!==c&&m.push(`flex-wrap: ${c}`),"horizontal"===i?(u&&m.push(`align-items: ${u}`),a&&m.push(`justify-content: ${a}`)):(u&&m.push(`justify-content: ${u}`),m.push("flex-direction: column"),m.push(`align-items: ${d}`)),m.length&&(p=`${Ol(e)} {\n\t\t\t\t${m.join("; ")};\n\t\t\t}`),r&&s&&(p+=Dl(e,l,"flex",s)),p},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function wi({layout:e,onChange:t,isToolbar:n=!1}){const{orientation:o="horizontal"}=e,r="horizontal"===o?_i.center:_i.top,{verticalAlignment:l=r}=e,i=n=>{t({...e,verticalAlignment:n})};if(n)return(0,s.createElement)(pi,{onChange:i,value:l,controls:"horizontal"===o?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]});const a=[{value:"flex-start",label:(0,x.__)("Align items top")},{value:"center",label:(0,x.__)("Align items center")},{value:"flex-end",label:(0,x.__)("Align items bottom")}];return(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-vertical-alignment-control"},(0,s.createElement)("legend",null,(0,x.__)("Vertical alignment")),(0,s.createElement)("div",null,a.map(((e,t,n)=>(0,s.createElement)(_l.Button,{key:e,label:n,icon:t,isPressed:l===e,onClick:()=>i(e)})))))}const Si={placement:"bottom-start"};function Ci({layout:e,onChange:t,isToolbar:n=!1}){const{justifyContent:o="left",orientation:r="horizontal"}=e,l=n=>{t({...e,justifyContent:n})},i=["left","center","right"];if("horizontal"===r?i.push("space-between"):i.push("stretch"),n)return(0,s.createElement)(fi,{allowedControls:i,value:o,onChange:l,popoverProps:Si});const a=[{value:"left",icon:Il,label:(0,x.__)("Justify items left")},{value:"center",icon:Tl,label:(0,x.__)("Justify items center")},{value:"right",icon:Ml,label:(0,x.__)("Justify items right")}];return"horizontal"===r?a.push({value:"space-between",icon:Pl,label:(0,x.__)("Space between items")}):a.push({value:"stretch",icon:Rl,label:(0,x.__)("Stretch items")}),(0,s.createElement)(_l.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Justification"),value:o,onChange:l,className:"block-editor-hooks__flex-layout-justification-controls"},a.map((({value:e,icon:t,label:n})=>(0,s.createElement)(_l.__experimentalToggleGroupControlOptionIcon,{key:e,value:e,icon:t,label:n}))))}function xi({layout:e,onChange:t}){const{flexWrap:n="wrap"}=e;return(0,s.createElement)(_l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Allow to wrap to multiple lines"),onChange:n=>{t({...e,flexWrap:n?"wrap":"nowrap"})},checked:"wrap"===n})}function Bi({layout:e,onChange:t}){const{orientation:n="horizontal",verticalAlignment:o,justifyContent:r}=e;return(0,s.createElement)(_l.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,x.__)("Orientation"),value:n,onChange:n=>{let l=o,i=r;return"horizontal"===n?("space-between"===o&&(l="center"),"stretch"===r&&(i="left")):("stretch"===o&&(l="top"),"space-between"===r&&(i="left")),t({...e,orientation:n,verticalAlignment:l,justifyContent:i})}},(0,s.createElement)(_l.__experimentalToggleGroupControlOptionIcon,{icon:Nl,value:"horizontal",label:(0,x.__)("Horizontal")}),(0,s.createElement)(_l.__experimentalToggleGroupControlOptionIcon,{icon:Ll,value:"vertical",label:(0,x.__)("Vertical")}))}const Ii={name:"default",label:(0,x.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,style:t,blockName:n,hasBlockGapSupport:o,layoutDefinitions:r=Al}){const l=oi(t?.spacing?.blockGap);let i="";fl(n,"spacing","blockGap")||(l?.top?i=oi(l?.top):"string"==typeof l&&(i=oi(l)));let s="";return o&&i&&(s+=Dl(e,r,"default",i)),s},getOrientation:()=>"vertical",getAlignments(e,t){const n=zl(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 o=[{name:"left"},{name:"center"},{name:"right"}];if(!t){const{contentSize:t,wideSize:r}=e;t&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:n.wide})}return o.unshift({name:"none",info:n.none}),o}};const Ti=(0,u.forwardRef)((function({icon:e,size:t=24,...n},o){return(0,u.cloneElement)(e,{width:t,height:t,...n,ref:o})})),Mi=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})),Pi=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})),Ri=window.wp.styleEngine,Ni={name:"constrained",label:(0,x.__)("Constrained"),inspectorControls:function({layout:e,onChange:t,layoutBlockSupport:n={}}){const{wideSize:o,contentSize:r,justifyContent:l="center"}=e,{allowJustification:i=!0,allowCustomContentAndWideSize:a=!0}=n,c=[{value:"left",icon:Il,label:(0,x.__)("Justify items left")},{value:"center",icon:Tl,label:(0,x.__)("Justify items center")},{value:"right",icon:Ml,label:(0,x.__)("Justify items right")}],[u]=Ar("spacing.units"),d=(0,_l.__experimentalUseCustomUnits)({availableUnits:u||["%","px","em","rem","vw"]});return(0,s.createElement)(s.Fragment,null,a&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,s.createElement)(_l.__experimentalUnitControl,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,x.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,contentSize:n})},units:d}),(0,s.createElement)(Ti,{icon:Mi})),(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,s.createElement)(_l.__experimentalUnitControl,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,x.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,wideSize:n})},units:d}),(0,s.createElement)(Ti,{icon:Pi}))),(0,s.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,x.__)("Customize the width for all elements that are assigned to the center or wide columns."))),i&&(0,s.createElement)(_l.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Justification"),value:l,onChange:n=>{t({...e,justifyContent:n})}},c.map((({value:e,icon:t,label:n})=>(0,s.createElement)(_l.__experimentalToggleGroupControlOptionIcon,{key:e,value:e,icon:t,label:n})))))},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,layout:t={},style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:l=Al}){const{contentSize:i,wideSize:s,justifyContent:a}=t,c=oi(n?.spacing?.blockGap);let u="";fl(o,"spacing","blockGap")||(c?.top?u=oi(c?.top):"string"==typeof c&&(u=oi(c)));const d="left"===a?"0 !important":"auto !important",p="right"===a?"0 !important":"auto !important";let m=i||s?`\n\t\t\t\t\t${Ol(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=i?i:s};\n\t\t\t\t\t\tmargin-left: ${d};\n\t\t\t\t\t\tmargin-right: ${p};\n\t\t\t\t\t}\n\t\t\t\t\t${Ol(e,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=s?s:i};\n\t\t\t\t\t}\n\t\t\t\t\t${Ol(e,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";if("left"===a?m+=`${Ol(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${d}; }`:"right"===a&&(m+=`${Ol(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${p}; }`),n?.spacing?.padding){(0,Ri.getCSSRules)(n).forEach((t=>{"paddingRight"===t.key?m+=`\n\t\t\t\t\t${Ol(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${t.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`:"paddingLeft"===t.key&&(m+=`\n\t\t\t\t\t${Ol(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${t.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`)}))}return r&&u&&(m+=Dl(e,l,"constrained",u)),m},getOrientation:()=>"vertical",getAlignments(e){const t=zl(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:o}=e,r=[{name:"left"},{name:"center"},{name:"right"}];return n&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:t.wide}),r.unshift({name:"none",info:t.none}),r}},Li={px:600,"%":100,vw:100,vh:100,em:38,rem:38,svw:100,lvw:100,dvw:100,svh:100,lvh:100,dvh:100,vi:100,svi:100,lvi:100,dvi:100,vb:100,svb:100,lvb:100,dvb:100,vmin:100,svmin:100,lvmin:100,dvmin:100,vmax:100,svmax:100,lvmax:100,dvmax:100},Ai={name:"grid",label:(0,x.__)("Grid"),inspectorControls:function({layout:e={},onChange:t}){return e?.columnCount?(0,s.createElement)(Di,{layout:e,onChange:t}):(0,s.createElement)(Oi,{layout:e,onChange:t})},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:l=Al}){const{minimumColumnWidth:i="12rem",columnCount:s=null}=t,a=n?.spacing?.blockGap&&!fl(o,"spacing","blockGap")?oi(n?.spacing?.blockGap,"0.5em"):void 0;let c="";const u=[];return s?u.push(`grid-template-columns: repeat(${s}, minmax(0, 1fr))`):i&&u.push(`grid-template-columns: repeat(auto-fill, minmax(min(${i}, 100%), 1fr))`),u.length&&(c=`${Ol(e)} { ${u.join("; ")}; }`),r&&a&&(c+=Dl(e,l,"grid",a)),c},getOrientation:()=>"horizontal",getAlignments:()=>[]};function Oi({layout:e,onChange:t}){const{minimumColumnWidth:n="12rem"}=e,[o,r]=(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(n);return(0,s.createElement)("fieldset",null,(0,s.createElement)(_l.BaseControl.VisualLabel,{as:"legend"},(0,x.__)("Minimum column width")),(0,s.createElement)(_l.Flex,{gap:4},(0,s.createElement)(_l.FlexItem,{isBlock:!0},(0,s.createElement)(_l.__experimentalUnitControl,{size:"__unstable-large",onChange:n=>{t({...e,minimumColumnWidth:n})},onUnitChange:n=>{let l;["em","rem"].includes(n)&&"px"===r?l=(o/16).toFixed(2)+n:["em","rem"].includes(r)&&"px"===n?l=Math.round(16*o)+n:["vh","vw","%","svw","lvw","dvw","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(n)&&o>100&&(l=100+n),t({...e,minimumColumnWidth:l})},value:n,min:0})),(0,s.createElement)(_l.FlexItem,{isBlock:!0},(0,s.createElement)(_l.RangeControl,{onChange:n=>{t({...e,minimumColumnWidth:[n,r].join("")})},value:o,min:0,max:Li[r]||600,withInputField:!1}))))}function Di({layout:e,onChange:t}){const{columnCount:n=3}=e;return(0,s.createElement)(_l.RangeControl,{label:(0,x.__)("Columns"),value:n,onChange:n=>t({...e,columnCount:n}),min:1,max:6})}const zi=[Ii,Ei,Ni,Ai];function Vi(e="default"){return zi.find((t=>t.name===e))}const Fi={type:"default"},Hi=(0,u.createContext)(Fi),Gi=Hi.Provider;function Ui(){return(0,u.useContext)(Hi)}const $i=[],ji=["none","left","center","right","wide","full"],Wi=["wide","full"];function Ki(e=ji){e.includes("none")||(e=["none",...e]);const t=1===e.length&&"none"===e[0],[n,o,r]=(0,d.useSelect)((e=>{var n;if(t)return[!1,!1,!1];const o=e(Nr).getSettings();return[null!==(n=o.alignWide)&&void 0!==n&&n,o.supportsLayout,o.__unstableIsBlockBasedTheme]}),[t]),l=Ui();if(t)return $i;const i=Vi(l?.type);if(o){const t=i.getAlignments(l,r).filter((t=>e.includes(t.name)));return 1===t.length&&"none"===t[0].name?$i:t}if("default"!==i.name&&"constrained"!==i.name)return $i;const s=e.filter((e=>l.alignments?l.alignments.includes(e):!(!n&&Wi.includes(e))&&ji.includes(e))).map((e=>({name:e})));return 1===s.length&&"none"===s[0].name?$i:s}const Zi=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})),qi=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})),Yi=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})),Xi=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})),Qi={none:{icon:Zi,title:(0,x._x)("None","Alignment option")},left:{icon:qi,title:(0,x.__)("Align left")},center:{icon:Mi,title:(0,x.__)("Align center")},right:{icon:Yi,title:(0,x.__)("Align right")},wide:{icon:Pi,title:(0,x.__)("Wide width")},full:{icon:Xi,title:(0,x.__)("Full width")}};const Ji=function({value:e,onChange:t,controls:n,isToolbar:o,isCollapsed:r=!0}){const l=Ki(n);if(!!!l.length)return null;function i(n){t([e,"none"].includes(n)?void 0:n)}const a=Qi[e],c=Qi.none,u=o?_l.ToolbarGroup:_l.ToolbarDropdownMenu,d={icon:a?a.icon:c.icon,label:(0,x.__)("Align")},p=o?{isCollapsed:r,controls:l.map((({name:t})=>({...Qi[t],isActive:e===t||!e&&"none"===t,role:r?"menuitemradio":void 0,onClick:()=>i(t)})))}:{toggleProps:{describedBy:(0,x.__)("Change alignment")},children:({onClose:t})=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},l.map((({name:n,info:o})=>{const{icon:r,title:l}=Qi[n],a=n===e||!e&&"none"===n;return(0,s.createElement)(_l.MenuItem,{key:n,icon:r,iconPosition:"left",className:ml()("components-dropdown-menu__menu-item",{"is-active":a}),isSelected:a,onClick:()=>{i(n),t()},role:"menuitemradio",info:o},l)}))))};return(0,s.createElement)(u,{...d,...p})},es=e=>(0,s.createElement)(Ji,{...e,isToolbar:!1}),ts=e=>(0,s.createElement)(Ji,{...e,isToolbar:!0});function ns(e){const t=y(),{clientId:n=""}=t,{setBlockEditingMode:o,unsetBlockEditingMode:r}=(0,d.useDispatch)(Nr),l=(0,d.useSelect)((e=>n?null:e(Nr).getBlockEditingMode()),[n]);return(0,u.useEffect)((()=>(e&&o(n,e),()=>{e&&r(n)})),[n,e,o,r]),n?t[f]:l}const os=["left","center","right","wide","full"],rs=["wide","full"];function ls(e,t=!0,n=!0){let o;return o=Array.isArray(e)?os.filter((t=>e.includes(t))):!0===e?[...os]:[],!n||!0===e&&!t?o.filter((e=>!rs.includes(e))):o}const is={shareWithChildBlocks:!0,edit:function({name:e,align:t,setAttributes:n}){const o=Ki(ls((0,c.getBlockSupport)(e,"align"),(0,c.hasBlockSupport)(e,"alignWide",!0))).map((({name:e})=>e)),r=ns();return o.length&&"default"===r?(0,s.createElement)(Bl,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(es,{value:t,onChange:t=>{if(!t){const n=(0,c.getBlockType)(e),o=n?.attributes?.align?.default;o&&(t="")}n({align:t})},controls:o})):null},useBlockProps:function({name:e,align:t}){const n=ls((0,c.getBlockSupport)(e,"align"),(0,c.hasBlockSupport)(e,"alignWide",!0));if(Ki(n).some((e=>e.name===t)))return{"data-align":t};return{}},addSaveProps:function(e,t,n){const{align:o}=n,r=(0,c.getBlockSupport)(t,"align"),l=(0,c.hasBlockSupport)(t,"alignWide",!0),i=ls(r,l).includes(o);i&&(e.className=ml()(`align${o}`,e.className));return e},attributeKeys:["align"],hasSupport:e=>(0,c.hasBlockSupport)(e,"align",!1)};(0,m.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.align)&&void 0!==t?t:{})||(0,c.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...os,""]}}),e})),(0,m.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.lock)&&void 0!==t?t:{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));const ss=(0,_l.createSlotFill)("InspectorControls"),as=(0,_l.createSlotFill)("InspectorAdvancedControls"),cs=(0,_l.createSlotFill)("InspectorControlsBackground"),us=(0,_l.createSlotFill)("InspectorControlsBorder"),ds=(0,_l.createSlotFill)("InspectorControlsColor"),ps=(0,_l.createSlotFill)("InspectorControlsFilter"),ms=(0,_l.createSlotFill)("InspectorControlsDimensions"),hs=(0,_l.createSlotFill)("InspectorControlsPosition"),gs=(0,_l.createSlotFill)("InspectorControlsTypography"),fs=(0,_l.createSlotFill)("InspectorControlsListView"),bs=(0,_l.createSlotFill)("InspectorControlsStyles"),vs={default:ss,advanced:as,background:cs,border:us,color:ds,dimensions:ms,effects:(0,_l.createSlotFill)("InspectorControlsEffects"),filter:ps,list:fs,position:hs,settings:ss,styles:bs,typography:gs};function ks({children:e,group:t="default",__experimentalGroup:n,resetAllFilter:o}){n&&(w()("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=n);const r=y(),l=vs[t]?.Fill;return l&&r[h]?(0,s.createElement)(_l.__experimentalStyleProvider,{document},(0,s.createElement)(l,null,(t=>(0,s.createElement)(ys,{fillProps:t,children:e,resetAllFilter:o})))):null}function _s({resetAllFilter:e,children:t}){const{registerResetAllFilter:n,deregisterResetAllFilter:o}=(0,u.useContext)(_l.__experimentalToolsPanelContext);return(0,u.useEffect)((()=>{if(e&&n&&o)return n(e),()=>{o(e)}}),[e,n,o]),t}function ys({children:e,resetAllFilter:t,fillProps:n}){const{forwardedContext:o=[]}=n,r=(0,s.createElement)(_s,{resetAllFilter:t},e);return o.reduce(((e,[t,n])=>(0,s.createElement)(t,{...n},e)),r)}function Es({children:e,group:t,label:n}){const{updateBlockAttributes:o}=(0,d.useDispatch)(Nr),{getBlockAttributes:r,getMultiSelectedBlockClientIds:l,getSelectedBlockClientId:i,hasMultiSelection:a}=(0,d.useSelect)(Nr),c=i(),p=(0,u.useCallback)(((e=[])=>{const t={},n=a()?l():[c];n.forEach((n=>{const{style:o}=r(n);let l={style:o};e.forEach((e=>{l={...l,...e(l)}})),l={...l,style:hl(l.style)},t[n]=l})),o(n,t,!0)}),[r,l,a,c,o]);return(0,s.createElement)(_l.__experimentalToolsPanel,{className:`${t}-block-support-panel`,label:n,resetAll:p,key:c,panelId:c,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:Qr},e)}function ws({Slot:e,fillProps:t,...n}){const o=(0,u.useContext)(_l.__experimentalToolsPanelContext),r=(0,u.useMemo)((()=>{var e;return{...null!=t?t:{},forwardedContext:[...null!==(e=t?.forwardedContext)&&void 0!==e?e:[],[_l.__experimentalToolsPanelContext.Provider,{value:o}]]}}),[o,t]);return(0,s.createElement)(e,{...n,fillProps:r,bubblesVirtually:!0})}function Ss({__experimentalGroup:e,group:t="default",label:n,fillProps:o,...r}){e&&(w()("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);const l=vs[t]?.Slot,i=(0,_l.__experimentalUseSlotFills)(l?.__unstableName),a=(0,u.useContext)(_l.__unstableMotionContext),c=(0,u.useMemo)((()=>{var e;return{...null!=o?o:{},forwardedContext:[...null!==(e=o?.forwardedContext)&&void 0!==e?e:[],[_l.__unstableMotionContext.Provider,{value:a}]]}}),[a,o]);return l&&i?.length?n?(0,s.createElement)(Es,{group:t,label:n},(0,s.createElement)(ws,{...r,fillProps:c,Slot:l})):(0,s.createElement)(l,{...r,fillProps:c,bubblesVirtually:!0}):null}const Cs=ks;Cs.Slot=Ss;const xs=e=>(0,s.createElement)(ks,{...e,group:"advanced"});xs.Slot=e=>(0,s.createElement)(Ss,{...e,group:"advanced"}),xs.slotName="InspectorAdvancedControls";const Bs=Cs,Is=/[\s#]/g,Ts={type:"string",source:"attribute",attribute:"id",selector:"*"};const Ms={addSaveProps:function(e,t,n){(0,c.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor);return e},edit:function({name:e,anchor:t,setAttributes:n}){const o=ns(),r="web"===u.Platform.OS,l=(0,s.createElement)(_l.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,x.__)("HTML anchor"),help:(0,s.createElement)(s.Fragment,null,(0,x.__)("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."),r&&(0,s.createElement)(_l.ExternalLink,{href:(0,x.__)("https://wordpress.org/documentation/article/page-jumps/")},(0,x.__)("Learn more about anchors"))),value:t||"",placeholder:r?null:(0,x.__)("Add an anchor"),onChange:e=>{e=e.replace(Is,"-"),n({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,s.createElement)(s.Fragment,null,r&&"default"===o&&(0,s.createElement)(Bs,{group:"advanced"},l),!r&&"core/heading"===e&&(0,s.createElement)(Bs,null,(0,s.createElement)(_l.PanelBody,{title:(0,x.__)("Heading settings")},l)))},attributeKeys:["anchor"],hasSupport:e=>(0,c.hasBlockSupport)(e,"anchor")};(0,m.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.anchor)&&void 0!==t?t:{})||(0,c.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:Ts}),e}));const Ps={type:"string",source:"attribute",attribute:"aria-label",selector:"*"};const Rs={addSaveProps:function(e,t,n){return(0,c.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e},attributeKeys:["ariaLabel"],hasSupport:e=>(0,c.hasBlockSupport)(e,"ariaLabel")};(0,m.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){return e?.attributes?.ariaLabel?.type||(0,c.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:Ps}),e}));const Ns={edit:function({className:e,setAttributes:t}){return"default"!==ns()?null:(0,s.createElement)(Bs,{group:"advanced"},(0,s.createElement)(_l.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,x.__)("Additional CSS class(es)"),value:e||"",onChange:e=>{t({className:""!==e?e:void 0})},help:(0,x.__)("Separate multiple classes with spaces.")}))},addSaveProps:function(e,t,n){(0,c.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=ml()(e.className,n.className));return e},attributeKeys:["className"],hasSupport:e=>(0,c.hasBlockSupport)(e,"customClassName",!0)};(0,m.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",(function(e){return(0,c.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,m.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){if(!(0,c.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===o.length&&e.innerBlocks.length===t.length)return e;if(1===o.length&&t.length>1||o.length>1&&1===t.length)return e;if(t[n]){const o=t[n]?.attributes.className;if(o)return{...e,attributes:{...e.attributes,className:o}}}return e})),(0,m.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,c.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,c.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,c.getBlockDefaultClassName)(t.name)),e}));const Ls=window.wp.blob,As=window.wp.dom,Os=window.wp.notices,Ds=window.wp.url,zs=window.wp.keycodes,Vs=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,s.createElement)(Z.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})),Fs=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})),Hs=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"})),Gs=(0,_l.withFilters)("editor.MediaUpload")((()=>null));const Us=function({fallback:e=null,children:t}){const n=(0,d.useSelect)((e=>{const{getSettings:t}=e(Nr);return!!t().mediaUpload}),[]);return n?t:e},$s=window.wp.isShallowEqual;var js=n.n($s);const Ws=window.wp.preferences,Ks=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,s.createElement)(Z.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"})),Zs=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})),qs=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));const Ys=function e({children:t,settingsOpen:n,setSettingsOpen:o}){const r=(0,p.useReducedMotion)(),l=r?u.Fragment:_l.__unstableAnimatePresence,i=r?"div":_l.__unstableMotion.div,a=`link-control-settings-drawer-${(0,p.useInstanceId)(e)}`;return(0,s.createElement)(u.Fragment,null,(0,s.createElement)(_l.Button,{className:"block-editor-link-control__drawer-toggle","aria-expanded":n,onClick:()=>o(!n),icon:(0,x.isRTL)()?Zs:qs,"aria-controls":a},(0,x._x)("Advanced","Additional link settings")),(0,s.createElement)(l,null,n&&(0,s.createElement)(i,{className:"block-editor-link-control__drawer",hidden:!n,id:a,initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{opacity:1,height:"auto"},collapsed:{opacity:0,height:0}},transition:{duration:.1}},(0,s.createElement)("div",{className:"block-editor-link-control__drawer-inner"},t))))};var Xs=n(5428),Qs=n.n(Xs);function Js(e){return"function"==typeof e}class ea extends u.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||(0,u.createRef)(),this.inputRef=(0,u.createRef)(),this.updateSuggestions=(0,p.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.suggestionsRequest=null,this.state={suggestions:[],showSuggestions:!1,suggestionsValue:null,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:o,__experimentalShowInitialSuggestions:r=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,Qs()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value===o||this.props.disableSuggestions||(o?.length?this.updateSuggestions(o):r&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{__experimentalShowInitialSuggestions:e=!1,value:t}=this.props;return e&&!(t&&t.length)}updateSuggestions(e=""){const{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:n}=this.props;if(!t)return;const o=!e?.length;if(e=e.trim(),!o&&(e.length<2||!n&&(0,Ds.isURL)(e)))return this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null,void this.setState({suggestions:[],showSuggestions:!1,suggestionsValue:e,selectedSuggestion:null,loading:!1});this.setState({selectedSuggestion:null,loading:!0});const r=t(e,{isInitialSuggestions:o});r.then((t=>{this.suggestionsRequest===r&&(this.setState({suggestions:t,suggestionsValue:e,loading:!1,showSuggestions:!!t.length}),t.length?this.props.debouncedSpeak((0,x.sprintf)((0,x._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length),"assertive"):this.props.debouncedSpeak((0,x.__)("No results."),"assertive"))})).catch((()=>{this.suggestionsRequest===r&&this.setState({loading:!1})})).finally((()=>{this.suggestionsRequest===r&&(this.suggestionsRequest=null)})),this.suggestionsRequest=r}onChange(e){this.props.onChange(e.target.value)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||e&&e.length||null!==this.suggestionsRequest||this.updateSuggestions(n)}onKeyDown(e){this.props.onKeyDown?.(e);const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case zs.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case zs.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case zs.ENTER:this.props.onSubmit&&(e.preventDefault(),this.props.onSubmit(null,e))}return}const l=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case zs.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case zs.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case zs.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(l),this.props.speak((0,x.__)("Link selected.")));break;case zs.ENTER:e.preventDefault(),null!==this.state.selectedSuggestion?(this.selectLink(l),this.props.onSubmit&&this.props.onSubmit(l,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps({value:e,instanceId:t,disableSuggestions:n,__experimentalShowInitialSuggestions:o=!1},{showSuggestions:r}){let l=r;const i=e&&e.length;return o||i||(l=!1),!0===n&&(l=!1),{showSuggestions:l,suggestionsListboxId:`block-editor-url-input-suggestions-${t}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${t}`}}render(){return(0,s.createElement)(s.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{__nextHasNoMarginBottom:e=!1,label:t=null,className:n,isFullWidth:o,instanceId:r,placeholder:l=(0,x.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:a="",hideLabelFromVision:c=!1}=this.props,{loading:u,showSuggestions:d,selectedSuggestion:p,suggestionsListboxId:m,suggestionOptionIdPrefix:h}=this.state,g=`url-input-control-${r}`,f={id:g,label:t,className:ml()("block-editor-url-input",n,{"is-full-width":o}),hideLabelFromVision:c},b={id:g,value:a,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:l,onKeyDown:this.onKeyDown,role:"combobox","aria-label":t?void 0:(0,x.__)("URL"),"aria-expanded":d,"aria-autocomplete":"list","aria-owns":m,"aria-activedescendant":null!==p?`${h}-${p}`:void 0,ref:this.inputRef};return i?i(f,b,u):(e||w()("Bottom margin styles for wp.blockEditor.URLInput",{since:"6.2",version:"6.5",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"}),(0,s.createElement)(_l.BaseControl,{__nextHasNoMarginBottom:e,...f},(0,s.createElement)("input",{...b}),u&&(0,s.createElement)(_l.Spinner,null)))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:n,suggestions:o,suggestionsValue:r,selectedSuggestion:l,suggestionsListboxId:i,suggestionOptionIdPrefix:a,loading:c}=this.state;if(!n||0===o.length)return null;const u={id:i,ref:this.autocompleteRef,role:"listbox"},d=(e,t)=>({role:"option",tabIndex:"-1",id:`${a}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===l||void 0});return Js(t)?t({suggestions:o,selectedSuggestion:l,suggestionsListProps:u,buildSuggestionItemProps:d,isLoading:c,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!r?.length,currentInputValue:r}):(0,s.createElement)(_l.Popover,{placement:"bottom",focusOnMount:!1},(0,s.createElement)("div",{...u,className:ml()("block-editor-url-input__suggestions",`${e}__suggestions`)},o.map(((e,t)=>(0,s.createElement)(_l.Button,{...d(0,t),key:e.id,className:ml()("block-editor-url-input__suggestion",{"is-selected":t===l}),onClick:()=>this.handleOnClick(e)},e.title)))))}}const ta=(0,p.compose)(p.withSafeTimeout,_l.withSpokenMessages,p.withInstanceId,(0,d.withSelect)(((e,t)=>{if(Js(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(Nr);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(ea),na=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})),oa=({searchTerm:e,onClick:t,itemProps:n,buttonText:o})=>{if(!e)return null;let r;return r=o?"function"==typeof o?o(e):o:(0,u.createInterpolateElement)((0,x.sprintf)((0,x.__)("Create: <mark>%s</mark>"),e),{mark:(0,s.createElement)("mark",null)}),(0,s.createElement)(_l.MenuItem,{...n,iconPosition:"left",icon:na,className:"block-editor-link-control__search-item",onClick:t},r)},ra=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"})),la=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,s.createElement)(Z.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})),ia=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})),sa=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.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"})),aa=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})),ca=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})),ua=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})),da=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})),pa={post:ra,page:la,post_tag:ia,category:sa,attachment:aa};function ma({isURL:e,suggestion:t}){let n=null;return e?n=ca:t.type in pa&&(n=pa[t.type],"page"===t.type&&(t.isFrontPage&&(n=ua),t.isBlogHome&&(n=da))),n?(0,s.createElement)(Ti,{className:"block-editor-link-control__search-item-icon",icon:n}):null}function ha(e){const t=e?.trim();return t?.length?e?.replace(/^\/?/,"/"):e}function ga(e){const t=e?.trim();return t?.length?e?.replace(/\/$/,""):e}function fa(e){return e.isFrontPage?"front page":e.isBlogHome?"blog home":"post_tag"===e.type?"tag":e.type}const ba=({itemProps:e,suggestion:t,searchTerm:n,onClick:o,isURL:r=!1,shouldShowType:l=!1})=>{const i=r?(0,x.__)("Press ENTER to add this link"):(a=t.url)?(0,p.pipe)(Ds.safeDecodeURI,Ds.getPath,(e=>t=>null==t||t!=t?e:t)(""),((e,...t)=>(...n)=>e(...n,...t))(Ds.filterURLForDisplay,24),ga,ha)(a):a;var a;return(0,s.createElement)(_l.MenuItem,{...e,info:i,iconPosition:"left",icon:(0,s.createElement)(ma,{suggestion:t,isURL:r}),onClick:o,shortcut:l&&fa(t),className:"block-editor-link-control__search-item"},(0,s.createElement)(_l.TextHighlight,{text:(0,As.__unstableStripHTML)(t.title),highlight:n}))},va="__CREATE__",ka="link",_a="mailto",ya="internal",Ea=[ka,_a,"tel",ya],wa=[{id:"opensInNewTab",title:(0,x.__)("Open in new tab")}];function Sa({instanceId:e,withCreateSuggestion:t,currentInputValue:n,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:l,suggestions:i,selectedSuggestion:a,isLoading:c,isInitialSuggestions:u,createSuggestionButtonText:d,suggestionsQuery:p}){const m=ml()("block-editor-link-control__search-results",{"is-loading":c}),h=1===i.length&&Ea.includes(i[0].type),g=t&&!h&&!u,f=!p?.type,b=`block-editor-link-control-search-results-label-${e}`,v=u?(0,x.__)("Suggestions"):(0,x.sprintf)((0,x.__)('Search results for "%s"'),n),k=(0,s.createElement)(_l.VisuallyHidden,{id:b},v);return(0,s.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},k,(0,s.createElement)("div",{...r,className:m,"aria-labelledby":b},(0,s.createElement)(_l.MenuGroup,null,i.map(((e,t)=>g&&va===e.type?(0,s.createElement)(oa,{searchTerm:n,buttonText:d,onClick:()=>o(e),key:e.type,itemProps:l(e,t),isSelected:t===a}):va===e.type?null:(0,s.createElement)(ba,{key:`${e.id}-${e.type}`,itemProps:l(e,t),suggestion:e,index:t,onClick:()=>{o(e)},isSelected:t===a,isURL:Ea.includes(e.type),searchTerm:n,shouldShowType:f,isFrontPage:e?.isFrontPage,isBlogHome:e?.isBlogHome}))))))}function Ca(e){if(e.includes(" "))return!1;const t=(0,Ds.getProtocol)(e),n=(0,Ds.isValidProtocol)(t),o=function(e,t=6){const n=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(n)}(e),r=e?.startsWith("www."),l=e?.startsWith("#")&&(0,Ds.isValidFragment)(e);return n||r||l||o}const xa=()=>Promise.resolve([]),Ba=e=>{let t=ka;const n=(0,Ds.getProtocol)(e)||"";return n.includes("mailto")&&(t=_a),n.includes("tel")&&(t="tel"),e?.startsWith("#")&&(t=ya),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,Ds.prependHTTP)(e):e,type:t}])};function Ia(e,t,n){const{fetchSearchSuggestions:o,pageOnFront:r,pageForPosts:l}=(0,d.useSelect)((e=>{const{getSettings:t}=e(Nr);return{pageOnFront:t().pageOnFront,pageForPosts:t().pageForPosts,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),i=t?Ba:xa;return(0,u.useCallback)(((t,{isInitialSuggestions:s})=>Ca(t)?i(t,{isInitialSuggestions:s}):(async(e,t,n,o,r,l)=>{const{isInitialSuggestions:i}=t,s=await n(e,t);return s.map((e=>Number(e.id)===r?(e.isFrontPage=!0,e):Number(e.id)===l?(e.isBlogHome=!0,e):e)),i||Ca(e)||!o?s:s.concat({title:e,url:e,type:va})})(t,{...e,isInitialSuggestions:s},o,n,r,l)),[i,o,r,l,e,n])}const Ta=()=>Promise.resolve([]),Ma=()=>{},Pa=(0,u.forwardRef)((({value:e,children:t,currentLink:n={},className:o=null,placeholder:r=null,withCreateSuggestion:l=!1,onCreateSuggestion:i=Ma,onChange:a=Ma,onSelect:c=Ma,showSuggestions:d=!0,renderSuggestions:m=(e=>(0,s.createElement)(Sa,{...e})),fetchSuggestions:h=null,allowDirectEntry:g=!0,showInitialSuggestions:f=!1,suggestionsQuery:b={},withURLSuggestion:v=!0,createSuggestionButtonText:k,hideLabelFromVision:_=!1},y)=>{const E=Ia(b,g,l),w=d?h||E:Ta,S=(0,p.useInstanceId)(Pa),[C,B]=(0,u.useState)(),I=async e=>{let t=e;if(va!==e.type){if(g||t&&Object.keys(t).length>=1){const{id:e,url:o,...r}=null!=n?n:{};c({...r,...t},t)}}else try{t=await i(e.title),t?.url&&c(t)}catch(e){}};return(0,s.createElement)("div",{className:"block-editor-link-control__search-input-container"},(0,s.createElement)(ta,{disableSuggestions:n?.url===e,__nextHasNoMarginBottom:!0,label:(0,x.__)("Link"),hideLabelFromVision:_,className:o,value:e,onChange:(e,t)=>{a(e),B(t)},placeholder:null!=r?r:(0,x.__)("Search or type url"),__experimentalRenderSuggestions:d?e=>m({...e,instanceId:S,withCreateSuggestion:l,createSuggestionButtonText:k,suggestionsQuery:b,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),I(t)}}):null,__experimentalFetchLinkSuggestions:w,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:f,onSubmit:(t,n)=>{const o=t||C;o||e?.trim()?.length?I(o||{url:e}):n.preventDefault()},ref:y}),t)})),Ra=Pa,Na=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})),La=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})),Aa=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})),Oa=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})),{Slot:Da,Fill:za}=(0,_l.createSlotFill)("BlockEditorLinkControlViewer");function Va(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}const Fa=function(e){const[t,n]=(0,u.useReducer)(Va,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,d.useSelect)((e=>{const{getSettings:t}=e(Nr);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,u.useEffect)((()=>{if(e?.length&&o&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,r=t.signal;return o(e,{signal:r}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{r.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t};function Ha({value:e,onEditClick:t,hasRichPreviews:n=!1,hasUnlinkControl:o=!1,onRemove:r}){const l=(0,d.useSelect)((e=>e(Ws.store).get("core","showIconLabels")),[]),i=n?e?.url:null,{richData:a,isFetching:c}=Fa(i),u=a&&Object.keys(a).length,m=e&&(0,Ds.filterURLForDisplay)((0,Ds.safeDecodeURI)(e.url),24)||"",h=!e?.url?.length,g=!h&&(0,As.__unstableStripHTML)(a?.title||e?.title||m);let f;f=a?.icon?(0,s.createElement)("img",{src:a?.icon,alt:""}):h?(0,s.createElement)(Ti,{icon:Na,size:32}):(0,s.createElement)(Ti,{icon:ca});const{createNotice:b}=(0,d.useDispatch)(Os.store),v=(0,p.useCopyToClipboard)(e.url,(()=>{b("info",(0,x.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,s.createElement)("div",{"aria-label":(0,x.__)("Currently selected"),className:ml()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":u,"is-fetching":!!c,"is-preview":!0,"is-error":h,"is-url-title":g===m})},(0,s.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,s.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,s.createElement)("span",{className:ml()("block-editor-link-control__search-item-icon",{"is-image":a?.icon})},f),(0,s.createElement)("span",{className:"block-editor-link-control__search-item-details"},h?(0,s.createElement)("span",{className:"block-editor-link-control__search-item-error-notice"},(0,x.__)("Link is empty")):(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.ExternalLink,{className:"block-editor-link-control__search-item-title",href:e.url},(0,s.createElement)(_l.__experimentalTruncate,{numberOfLines:1},g)),e?.url&&g!==m&&(0,s.createElement)("span",{className:"block-editor-link-control__search-item-info"},(0,s.createElement)(_l.__experimentalTruncate,{numberOfLines:1},m))))),(0,s.createElement)(_l.Button,{icon:La,label:(0,x.__)("Edit link"),onClick:t,size:"compact"}),o&&(0,s.createElement)(_l.Button,{icon:Aa,label:(0,x.__)("Remove link"),onClick:r,size:"compact"}),(0,s.createElement)(_l.Button,{icon:Oa,label:(0,x.sprintf)((0,x.__)("Copy link%s"),h||l?"":": "+e.url),ref:v,disabled:h,size:"compact"}),(0,s.createElement)(Da,{fillProps:e})))}const Ga=()=>{},Ua=({value:e,onChange:t=Ga,settings:n})=>{if(!n||!n.length)return null;const o=n=>o=>{t({...e,[n.id]:o})},r=n.map((t=>(0,s.createElement)(_l.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-link-control__setting",key:t.id,label:t.title,onChange:o(t),checked:!!e&&!!e[t.id],help:t?.help})));return(0,s.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,s.createElement)(_l.VisuallyHidden,{as:"legend"},(0,x.__)("Currently selected link settings")),r)};const $a=e=>{let t=!1;return{promise:new Promise(((n,o)=>{e.then((e=>t?o({isCanceled:!0}):n(e)),(e=>o(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}};var ja=n(5215),Wa=n.n(ja);const Ka=()=>{},Za="core/block-editor",qa="linkControlSettingsDrawer";function Ya({searchInputPlaceholder:e,value:t,settings:n=wa,onChange:o=Ka,onRemove:r,onCancel:l,noDirectEntry:i=!1,showSuggestions:a=!0,showInitialSuggestions:c,forceIsEditingLink:p,createSuggestion:m,withCreateSuggestion:h,inputValue:g="",suggestionsQuery:f={},noURLSuggestion:b=!1,createSuggestionButtonText:v,hasRichPreviews:k=!1,hasTextControl:_=!1,renderControlBottom:y=null}){void 0===h&&m&&(h=!0);const[E,w]=(0,u.useState)(!1),{advancedSettingsPreference:S}=(0,d.useSelect)((e=>{var t;return{advancedSettingsPreference:null!==(t=e(Ws.store).get(Za,qa))&&void 0!==t&&t}}),[]),{set:C}=(0,d.useDispatch)(Ws.store),B=S||E,I=(0,u.useRef)(!0),T=(0,u.useRef)(),M=(0,u.useRef)(),P=(0,u.useRef)(!1),R=n.map((({id:e})=>e)),[N,L,A,O,D]=function(e){const[t,n]=(0,u.useState)(e||{}),[o,r]=(0,u.useState)(e);return Wa()(e,o)||(r(e),n(e)),[t,n,e=>{n({...t,url:e})},e=>{n({...t,title:e})},e=>o=>{const r=Object.keys(o).reduce(((t,n)=>(e.includes(n)&&(t[n]=o[n]),t)),{});n({...t,...r})}]}(t),z=t&&!(0,$s.isShallowEqualObjects)(N,t),[V,F]=(0,u.useState)(void 0!==p?p:!t||!t.url),{createPage:H,isCreatingPage:G,errorMessage:U}=function(e){const t=(0,u.useRef)(),[n,o]=(0,u.useState)(!1),[r,l]=(0,u.useState)(null);return(0,u.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),l(null);try{return t.current=$a(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw l(e.message||(0,x.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(m);(0,u.useEffect)((()=>{void 0!==p&&F(p)}),[p]),(0,u.useEffect)((()=>{if(I.current)return void(I.current=!1);(As.focus.focusable.find(T.current)[0]||T.current).focus(),P.current=!1}),[V,G]);const $=t?.url?.trim()?.length>0,j=()=>{P.current=!!T.current?.contains(T.current.ownerDocument.activeElement),F(!1)},W=()=>{z&&o({...t,...N,url:K}),j()},K=g||N?.url||"",Z=!K?.trim()?.length,q=r&&t&&!V&&!G,Y=V&&$,X=$&&_,Q=(V||!t)&&!G,J=!z||Z,ee=!!n?.length&&V&&$;return(0,s.createElement)("div",{tabIndex:-1,ref:T,className:"block-editor-link-control"},G&&(0,s.createElement)("div",{className:"block-editor-link-control__loading"},(0,s.createElement)(_l.Spinner,null)," ",(0,x.__)("Creating"),"…"),Q&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:ml()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":X,"has-actions":Y})},X&&(0,s.createElement)(_l.TextControl,{__nextHasNoMarginBottom:!0,ref:M,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,x.__)("Text"),value:N?.title,onChange:O,onKeyDown:e=>{const{keyCode:t}=e;t!==zs.ENTER||Z||(e.preventDefault(),W())},size:"__unstable-large"}),(0,s.createElement)(Ra,{currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:K,withCreateSuggestion:h,onCreateSuggestion:H,onChange:A,onSelect:e=>{const t=Object.keys(e).reduce(((t,n)=>(R.includes(n)||(t[n]=e[n]),t)),{});o({...N,...t,title:N?.title||e?.title}),j()},showInitialSuggestions:c,allowDirectEntry:!i,showSuggestions:a,suggestionsQuery:f,withURLSuggestion:!b,createSuggestionButtonText:v,hideLabelFromVision:!X}),!Y&&(0,s.createElement)("div",{className:"block-editor-link-control__search-enter"},(0,s.createElement)(_l.Button,{onClick:J?Ka:W,label:(0,x.__)("Submit"),icon:Ks,className:"block-editor-link-control__search-submit","aria-disabled":J}))),U&&(0,s.createElement)(_l.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},U)),t&&!V&&!G&&(0,s.createElement)(Ha,{key:t?.url,value:t,onEditClick:()=>F(!0),hasRichPreviews:k,hasUnlinkControl:q,onRemove:()=>{r(),F(!0)}}),ee&&(0,s.createElement)("div",{className:"block-editor-link-control__tools"},!Z&&(0,s.createElement)(Ys,{settingsOpen:B,setSettingsOpen:e=>{C&&C(Za,qa,e),w(e)}},(0,s.createElement)(Ua,{value:N,settings:n,onChange:D(R)}))),Y&&(0,s.createElement)(_l.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions"},(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:e=>{e.preventDefault(),e.stopPropagation(),L(t),$?j():r?.(),l?.()}},(0,x.__)("Cancel")),(0,s.createElement)(_l.Button,{variant:"primary",onClick:J?Ka:W,className:"block-editor-link-control__search-submit","aria-disabled":J},(0,x.__)("Save"))),!G&&y&&y())}Ya.ViewerFill=za,Ya.DEFAULT_LINK_SETTINGS=wa;const Xa=Ya,Qa=()=>{};let Ja=0;const ec=(0,p.compose)([(0,d.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(Os.store);return{createNotice:t,removeNotice:n}})),(0,_l.withFilters)("editor.MediaReplaceFlow")])((({mediaURL:e,mediaId:t,mediaIds:n,allowedTypes:o,accept:r,onError:l,onSelect:i,onSelectURL:a,onToggleFeaturedImage:c,useFeaturedImage:p,onFilesUpload:m=Qa,name:h=(0,x.__)("Replace"),createNotice:g,removeNotice:f,children:b,multiple:v=!1,addToGallery:k,handleUpload:_=!0,popoverProps:y})=>{const E=(0,d.useSelect)((e=>e(Nr).getSettings().mediaUpload),[]),w=!!E,S=(0,u.useRef)(),C="block-editor/media-replace-flow/error-notice/"+ ++Ja,B=e=>{const t=(0,As.__unstableStripHTML)(e);l?l(t):setTimeout((()=>{g("error",t,{speak:!0,id:C,isDismissible:!0})}),1e3)},I=(e,t)=>{p&&c&&c(),t(),i(e),(0,vo.speak)((0,x.__)("The media file has been replaced")),f(C)},T=e=>{e.keyCode===zs.DOWN&&(e.preventDefault(),e.target.click())},M=v&&!(!o||0===o.length)&&o.every((e=>"image"===e||e.startsWith("image/")));return(0,s.createElement)(_l.Dropdown,{popoverProps:y,contentClassName:"block-editor-media-replace-flow__options",renderToggle:({isOpen:e,onToggle:t})=>(0,s.createElement)(_l.ToolbarButton,{ref:S,"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:T},h),renderContent:({onClose:l})=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,s.createElement)(Us,null,(0,s.createElement)(Gs,{gallery:M,addToGallery:k,multiple:v,value:v?n:t,onSelect:e=>I(e,l),allowedTypes:o,render:({open:e})=>(0,s.createElement)(_l.MenuItem,{icon:Vs,onClick:e},(0,x.__)("Open Media Library"))}),(0,s.createElement)(_l.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!_)return t(),i(n);m(n),E({allowedTypes:o,filesList:n,onFileChange:([e])=>{I(e,t)},onError:B})})(e,l)},accept:r,multiple:!!v,render:({openFileDialog:e})=>(0,s.createElement)(_l.MenuItem,{icon:Fs,onClick:()=>{e()}},(0,x.__)("Upload"))})),c&&(0,s.createElement)(_l.MenuItem,{icon:Hs,onClick:c,isPressed:p},(0,x.__)("Use featured image")),b),a&&(0,s.createElement)("form",{className:ml()("block-editor-media-flow__url-input",{"has-siblings":w||c})},(0,s.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},(0,x.__)("Current media URL:")),(0,s.createElement)(Xa,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:e})=>{a(e),S.current.focus()}})))})})),tc="background",nc="image";function oc(e){return!!e?.background?.backgroundImage?.id||!!e?.background?.backgroundImage?.url}function rc(e,t="any"){if("web"!==u.Platform.OS)return!1;const n=(0,c.getBlockSupport)(e,tc);return!0===n||("any"===t?!!n?.backgroundImage||!!n?.backgroundSize||!!n?.backgroundRepeat:!!n?.[t])}function lc(e={},t){t({style:hl({...e,background:{...e?.background,backgroundImage:void 0}})})}function ic(e){return oc(e)?"has-background":""}function sc({label:e,filename:t,url:n}){const o=e||(0,Ds.getFilename)(n);return(0,s.createElement)(_l.__experimentalItemGroup,{as:"span"},(0,s.createElement)(_l.__experimentalHStack,{justify:"flex-start",as:"span"},(0,s.createElement)("span",{className:ml()("block-editor-hooks__background__inspector-image-indicator-wrapper",{"has-image":n}),"aria-hidden":!0},n&&(0,s.createElement)("span",{className:"block-editor-hooks__background__inspector-image-indicator",style:{backgroundImage:`url(${n})`}})),(0,s.createElement)(_l.FlexItem,{as:"span"},(0,s.createElement)(_l.__experimentalTruncate,{numberOfLines:1,className:"block-editor-hooks__background__inspector-media-replace-title"},o),(0,s.createElement)(_l.VisuallyHidden,{as:"span"},t?(0,x.sprintf)((0,x.__)("Selected image: %s"),t):(0,x.__)("No image selected")))))}function ac({clientId:e,isShownByDefault:t,setAttributes:n}){const{style:o,mediaUpload:r}=(0,d.useSelect)((t=>{const{getBlockAttributes:n,getSettings:o}=t(Nr);return{style:n(e)?.style,mediaUpload:o().mediaUpload}}),[e]),{id:l,title:i,url:a}=o?.background?.backgroundImage||{},c=(0,u.useRef)(),{createErrorNotice:p}=(0,d.useDispatch)(Os.store),m=e=>{p(e,{type:"snackbar"})},h=e=>{if(!e||!e.url){const e={...o,background:{...o?.background,backgroundImage:void 0}},t={style:hl(e)};return void n(t)}if((0,Ls.isBlobURL)(e.url))return;if(e.media_type&&e.media_type!==nc||!e.media_type&&e.type&&e.type!==nc)return void m((0,x.__)("Only images can be used as a background image."));const t={...o,background:{...o?.background,backgroundImage:{url:e.url,id:e.id,source:"file",title:e.title||void 0}}},r={style:hl(t)};n(r)},g=(0,u.useCallback)((e=>({...e,style:{...e.style,background:void 0}})),[]),f=oc(o);return(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>f,label:(0,x.__)("Background image"),onDeselect:()=>lc(o,n),isShownByDefault:t,resetAllFilter:g,panelId:e},(0,s.createElement)("div",{className:"block-editor-hooks__background__inspector-media-replace-container",ref:c},(0,s.createElement)(ec,{mediaId:l,mediaURL:a,allowedTypes:[nc],accept:"image/*",onSelect:h,name:(0,s.createElement)(sc,{label:(0,x.__)("Background image"),filename:i,url:a}),variant:"secondary"},f&&(0,s.createElement)(_l.MenuItem,{onClick:()=>{const[e]=As.focus.tabbable.find(c.current);e?.focus(),e?.click(),lc(o,n)}},(0,x.__)("Reset "))),(0,s.createElement)(_l.DropZone,{onFilesDrop:e=>{r({allowedTypes:["image"],filesList:e,onFileChange([e]){(0,Ls.isBlobURL)(e?.url)||h(e)},onError:m})},label:(0,x.__)("Drop to upload")})))}const cc=e=>{if(!e||isNaN(e.x)&&isNaN(e.y))return;return`${100*(isNaN(e.x)?.5:e.x)}% ${100*(isNaN(e.y)?.5:e.y)}%`},uc=e=>{if(!e)return{x:void 0,y:void 0};let[t,n]=e.split(" ").map((e=>parseFloat(e)/100));return t=isNaN(t)?void 0:t,n=isNaN(n)?t:n,{x:t,y:n}};function dc({clientId:e,isShownByDefault:t,setAttributes:n}){const o=(0,d.useSelect)((t=>t(Nr).getBlockAttributes(e)?.style),[e]),r=o?.background?.backgroundSize,l=o?.background?.backgroundRepeat,i=void 0!==r&&"cover"!==r&&"contain"!==r||""===r?"auto":r||"cover",a="no-repeat"!==l&&("cover"!==i||void 0!==l),c=function(e){return void 0!==e?.background?.backgroundPosition||void 0!==e?.background?.backgroundSize}(o),p=(0,u.useCallback)((e=>({...e,style:{...e.style,background:{...e.style?.background,backgroundRepeat:void 0,backgroundSize:void 0}}})),[]),m=e=>{let t=l;"contain"===e&&(t="no-repeat"),"cover"!==i&&"contain"!==i||"auto"!==e||(t=void 0),n({style:hl({...o,background:{...o?.background,backgroundRepeat:t,backgroundSize:e}})})};return(0,s.createElement)(_l.__experimentalVStack,{as:_l.__experimentalToolsPanelItem,spacing:2,className:"single-column",hasValue:()=>c,label:(0,x.__)("Size"),onDeselect:()=>function(e={},t){t({style:hl({...e,background:{...e?.background,backgroundPosition:void 0,backgroundRepeat:void 0,backgroundSize:void 0}})})}(o,n),isShownByDefault:t,resetAllFilter:p,panelId:e},(0,s.createElement)(_l.FocalPointPicker,{__next40pxDefaultSize:!0,label:(0,x.__)("Position"),url:o?.background?.backgroundImage?.url,value:uc(o?.background?.backgroundPosition),onChange:e=>{n({style:hl({...o,background:{...o?.background,backgroundPosition:cc(e)}})})}}),(0,s.createElement)(_l.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,x.__)("Size"),value:i,onChange:m,isBlock:!0,help:(h=r,"cover"===h||void 0===h?(0,x.__)("Image covers the space evenly."):"contain"===h?(0,x.__)("Image is contained without distortion."):(0,x.__)("Specify a fixed width."))},(0,s.createElement)(_l.__experimentalToggleGroupControlOption,{key:"cover",value:"cover",label:(0,x.__)("Cover")}),(0,s.createElement)(_l.__experimentalToggleGroupControlOption,{key:"contain",value:"contain",label:(0,x.__)("Contain")}),(0,s.createElement)(_l.__experimentalToggleGroupControlOption,{key:"fixed",value:"auto",label:(0,x.__)("Fixed")})),void 0!==r&&"cover"!==r&&"contain"!==r?(0,s.createElement)(_l.__experimentalUnitControl,{size:"__unstable-large",onChange:m,value:r}):null,"cover"!==i&&(0,s.createElement)(_l.ToggleControl,{label:(0,x.__)("Repeat"),checked:a,onChange:()=>{n({style:hl({...o,background:{...o?.background,backgroundRepeat:!0===a?"no-repeat":void 0}})})}}));var h}function pc(e){const[t,n]=Ar("background.backgroundImage","background.backgroundSize");if(!t||!rc(e.name,"backgroundImage"))return null;const o=!(!n||!rc(e.name,"backgroundSize")),r=(0,c.getBlockSupport)(e.name,[tc,"__experimentalDefaultControls"]);return(0,s.createElement)(Bs,{group:"background"},(0,s.createElement)(ac,{isShownByDefault:r?.backgroundImage,...e}),o&&(0,s.createElement)(dc,{isShownByDefault:r?.backgroundSize,...e}))}var mc={grad:.9,turn:360,rad:360/(2*Math.PI)},hc=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},gc=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},fc=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},bc=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},vc=function(e){return{r:fc(e.r,0,255),g:fc(e.g,0,255),b:fc(e.b,0,255),a:fc(e.a)}},kc=function(e){return{r:gc(e.r),g:gc(e.g),b:gc(e.b),a:gc(e.a,3)}},_c=/^#([0-9a-f]{3,8})$/i,yc=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Ec=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=Math.max(t,n,o),i=l-Math.min(t,n,o),s=i?l===t?(n-o)/i:l===n?2+(o-t)/i:4+(t-n)/i:0;return{h:60*(s<0?s+6:s),s:l?i/l*100:0,v:l/255*100,a:r}},wc=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var l=Math.floor(t),i=o*(1-n),s=o*(1-(t-l)*n),a=o*(1-(1-t+l)*n),c=l%6;return{r:255*[o,s,i,i,a,o][c],g:255*[a,o,o,s,i,i][c],b:255*[i,i,a,o,o,s][c],a:r}},Sc=function(e){return{h:bc(e.h),s:fc(e.s,0,100),l:fc(e.l,0,100),a:fc(e.a)}},Cc=function(e){return{h:gc(e.h),s:gc(e.s),l:gc(e.l),a:gc(e.a,3)}},xc=function(e){return wc((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},Bc=function(e){return{h:(t=Ec(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},Ic=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Tc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Mc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Pc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Rc={string:[[function(e){var t=_c.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?gc(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?gc(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Mc.exec(e)||Pc.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:vc({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=Ic.exec(e)||Tc.exec(e);if(!t)return null;var n,o,r=Sc({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(mc[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return xc(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=void 0===r?1:r;return hc(t)&&hc(n)&&hc(o)?vc({r:Number(t),g:Number(n),b:Number(o),a:Number(l)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,l=void 0===r?1:r;if(!hc(t)||!hc(n)||!hc(o))return null;var i=Sc({h:Number(t),s:Number(n),l:Number(o),a:Number(l)});return xc(i)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,l=void 0===r?1:r;if(!hc(t)||!hc(n)||!hc(o))return null;var i=function(e){return{h:bc(e.h),s:fc(e.s,0,100),v:fc(e.v,0,100),a:fc(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(l)});return wc(i)},"hsv"]]},Nc=function(e,t){for(var n=0;n<t.length;n++){var o=t[n][0](e);if(o)return[o,t[n][1]]}return[null,void 0]},Lc=function(e){return"string"==typeof e?Nc(e.trim(),Rc.string):"object"==typeof e&&null!==e?Nc(e,Rc.object):[null,void 0]},Ac=function(e,t){var n=Bc(e);return{h:n.h,s:fc(n.s+100*t,0,100),l:n.l,a:n.a}},Oc=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Dc=function(e,t){var n=Bc(e);return{h:n.h,s:n.s,l:fc(n.l+100*t,0,100),a:n.a}},zc=function(){function e(e){this.parsed=Lc(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return gc(Oc(this.rgba),2)},e.prototype.isDark=function(){return Oc(this.rgba)<.5},e.prototype.isLight=function(){return Oc(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=kc(this.rgba)).r,n=e.g,o=e.b,l=(r=e.a)<1?yc(gc(255*r)):"","#"+yc(t)+yc(n)+yc(o)+l;var e,t,n,o,r,l},e.prototype.toRgb=function(){return kc(this.rgba)},e.prototype.toRgbString=function(){return t=(e=kc(this.rgba)).r,n=e.g,o=e.b,(r=e.a)<1?"rgba("+t+", "+n+", "+o+", "+r+")":"rgb("+t+", "+n+", "+o+")";var e,t,n,o,r},e.prototype.toHsl=function(){return Cc(Bc(this.rgba))},e.prototype.toHslString=function(){return t=(e=Cc(Bc(this.rgba))).h,n=e.s,o=e.l,(r=e.a)<1?"hsla("+t+", "+n+"%, "+o+"%, "+r+")":"hsl("+t+", "+n+"%, "+o+"%)";var e,t,n,o,r},e.prototype.toHsv=function(){return e=Ec(this.rgba),{h:gc(e.h),s:gc(e.s),v:gc(e.v),a:gc(e.a,3)};var e},e.prototype.invert=function(){return Vc({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),Vc(Ac(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Vc(Ac(this.rgba,-e))},e.prototype.grayscale=function(){return Vc(Ac(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Vc(Dc(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Vc(Dc(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?Vc({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):gc(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Bc(this.rgba);return"number"==typeof e?Vc({h:e,s:t.s,l:t.l,a:t.a}):gc(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Vc(e).toHex()},e}(),Vc=function(e){return e instanceof zc?e:new zc(e)},Fc=[],Hc=function(e){e.forEach((function(e){Fc.indexOf(e)<0&&(e(zc,Rc),Fc.push(e))}))};function Gc(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var l={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,i,s=o[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var a=this.toRgb(),c=1/0,u="black";if(!l.length)for(var d in n)l[d]=new e(n[d]).toRgb();for(var p in n){var m=(r=a,i=l[p],Math.pow(r.r-i.r,2)+Math.pow(r.g-i.g,2)+Math.pow(r.b-i.b,2));m<c&&(c=m,u=p)}return u}},t.string.push([function(t){var o=t.toLowerCase(),r="transparent"===o?"#0000":n[o];return r?new e(r).toRgb():null},"name"])}var Uc=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},$c=function(e){return.2126*Uc(e.r)+.7152*Uc(e.g)+.0722*Uc(e.b)};function jc(e){e.prototype.luminance=function(){return e=$c(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,o,r,l,i,s,a,c=t instanceof e?t:new e(t);return l=this.rgba,i=c.toRgb(),n=(s=$c(l))>(a=$c(i))?(s+.05)/(a+.05):(a+.05)/(s+.05),void 0===(o=2)&&(o=0),void 0===r&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(l=(n=t).size)?"normal":l,"AAA"===(r=void 0===(o=n.level)?"AA":o)&&"normal"===i?7:"AA"===r&&"large"===i?3:4.5);var n,o,r,l,i}}Hc([Gc,jc]);const Wc=(e,t,n)=>{if(t){const n=e?.find((e=>e.slug===t));if(n)return n}return{color:n}},Kc=(e,t)=>e?.find((e=>e.color===t));function Zc(e,t){if(!e||!t)return;const{kebabCase:n}=ie(_l.privateApis);return`has-${n(t)}-${e}`}function qc(){const[e,t,n,o,r,l,i,s,a,c]=Ar("color.custom","color.palette.custom","color.palette.theme","color.palette.default","color.defaultPalette","color.customGradient","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients"),d={disableCustomColors:!e,disableCustomGradients:!l};return d.colors=(0,u.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,x._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,x._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,x._x)("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[t,n,o,r]),d.gradients=(0,u.useMemo)((()=>{const e=[];return s&&s.length&&e.push({name:(0,x._x)("Theme","Indicates this palette comes from the theme."),gradients:s}),c&&a&&a.length&&e.push({name:(0,x._x)("Default","Indicates this palette comes from WordPress."),gradients:a}),i&&i.length&&e.push({name:(0,x._x)("Custom","Indicates this palette is created by the user."),gradients:i}),e}),[i,s,a,c]),d.hasColorsOrGradients=!!d.colors.length||!!d.gradients.length,d}function Yc(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function Xc(e={}){const{flat:t,...n}=e;return t||Yc(Object.values(n).filter(Boolean))||"px"}function Qc(e={}){if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(e))),n=t.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),o=t.map((e=>e[1])),r=n.every((e=>e===n[0]))?n[0]:"",l=Yc(o);return 0===r||r?`${r}${l}`:void 0}function Jc(e={}){const t=Qc(e);return"string"!=typeof e&&isNaN(parseFloat(t))}function eu(e){if(!e)return!1;if("string"==typeof e)return!0;return!!Object.values(e).filter((e=>!!e||0===e)).length}function tu({onChange:e,selectedUnits:t,setSelectedUnits:n,values:o,...r}){let l=Qc(o);void 0===l&&(l=Xc(t));const i=eu(o)&&Jc(o),a=i?(0,x.__)("Mixed"):null;return(0,s.createElement)(_l.__experimentalUnitControl,{...r,"aria-label":(0,x.__)("Border radius"),disableUnits:i,isOnly:!0,value:l,onChange:t=>{const n=!isNaN(parseFloat(t));e(n?t:void 0)},onUnitChange:e=>{n({topLeft:e,topRight:e,bottomLeft:e,bottomRight:e})},placeholder:a,size:"__unstable-large"})}const nu={topLeft:(0,x.__)("Top left"),topRight:(0,x.__)("Top right"),bottomLeft:(0,x.__)("Bottom left"),bottomRight:(0,x.__)("Bottom right")};function ou({onChange:e,selectedUnits:t,setSelectedUnits:n,values:o,...r}){const l=t=>n=>{if(!e)return;const o=!isNaN(parseFloat(n))?n:void 0;e({...i,[t]:o})},i="string"!=typeof o?o:{topLeft:o,topRight:o,bottomLeft:o,bottomRight:o};return(0,s.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(nu).map((([e,o])=>{const[a,c]=(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(i[e]),u=i[e]?c:t[e]||t.flat;return(0,s.createElement)(_l.Tooltip,{text:o,placement:"top",key:e},(0,s.createElement)("div",{className:"components-border-radius-control__tooltip-wrapper"},(0,s.createElement)(_l.__experimentalUnitControl,{...r,"aria-label":o,value:[a,u].join(""),onChange:l(e),onUnitChange:(d=e,e=>{const o={...t};o[d]=e,n(o)}),size:"__unstable-large"})));var d})))}const ru=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"}));function lu({isLinked:e,...t}){const n=e?(0,x.__)("Unlink radii"):(0,x.__)("Link radii");return(0,s.createElement)(_l.Tooltip,{text:n},(0,s.createElement)(_l.Button,{...t,className:"component-border-radius-control__linked-button",size:"small",icon:e?ru:Aa,iconSize:24,"aria-label":n}))}const iu={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},su=0,au={px:100,em:20,rem:20};function cu({onChange:e,values:t}){const[n,o]=(0,u.useState)(!eu(t)||!Jc(t)),[r,l]=(0,u.useState)({flat:"string"==typeof t?(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[i]=Ar("spacing.units"),a=(0,_l.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"]}),c=Xc(r),d=a&&a.find((e=>e.value===c)),p=d?.step||1,[m]=(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(Qc(t));return(0,s.createElement)("fieldset",{className:"components-border-radius-control"},(0,s.createElement)(_l.BaseControl.VisualLabel,{as:"legend"},(0,x.__)("Radius")),(0,s.createElement)("div",{className:"components-border-radius-control__wrapper"},n?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(tu,{className:"components-border-radius-control__unit-control",values:t,min:su,onChange:e,selectedUnits:r,setSelectedUnits:l,units:a}),(0,s.createElement)(_l.RangeControl,{label:(0,x.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:null!=m?m:"",min:su,max:au[c],initialPosition:0,withInputField:!1,onChange:t=>{e(void 0!==t?`${t}${c}`:void 0)},step:p,__nextHasNoMarginBottom:!0})):(0,s.createElement)(ou,{min:su,onChange:e,selectedUnits:r,setSelectedUnits:l,values:t||iu,units:a}),(0,s.createElement)(lu,{onClick:()=>o(!n),isLinked:n})))}const uu=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),du=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.Path,{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z"})),pu=[];function mu({shadow:e,onShadowChange:t,settings:n}){const o=bu(n);return(0,s.createElement)("div",{className:"block-editor-global-styles__shadow-popover-container"},(0,s.createElement)(_l.__experimentalVStack,{spacing:4},(0,s.createElement)(_l.__experimentalHeading,{level:5},(0,x.__)("Drop shadow")),(0,s.createElement)(hu,{presets:o,activeShadow:e,onSelect:t}),(0,s.createElement)("div",{className:"block-editor-global-styles__clear-shadow"},(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:()=>t(void 0)},(0,x.__)("Clear")))))}function hu({presets:e,activeShadow:t,onSelect:n}){const{CompositeV2:o,useCompositeStoreV2:r}=ie(_l.privateApis),l=r();return e?(0,s.createElement)(o,{store:l,role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,x.__)("Drop shadows")},e.map((({name:e,slug:o,shadow:r})=>(0,s.createElement)(gu,{key:o,label:e,isActive:r===t,type:"unset"===o?"unset":"preset",onSelect:()=>n(r===t?void 0:r),shadow:r})))):null}function gu({type:e,label:t,isActive:n,onSelect:o,shadow:r}){const{CompositeItemV2:l}=ie(_l.privateApis);return(0,s.createElement)(l,{role:"option","aria-label":t,"aria-selected":n,className:ml()("block-editor-global-styles__shadow__item",{"is-active":n}),render:(0,s.createElement)(_l.Button,{className:ml()("block-editor-global-styles__shadow-indicator",{unset:"unset"===e}),onClick:o,label:t,style:{boxShadow:r},showTooltip:!0},n&&(0,s.createElement)(Ti,{icon:uu}))})}function fu({shadow:e,onShadowChange:t,settings:n}){return(0,s.createElement)(_l.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:({onToggle:e,isOpen:t})=>{const n={onClick:e,className:ml()({"is-open":t}),"aria-expanded":t};return(0,s.createElement)(_l.Button,{...n},(0,s.createElement)(_l.__experimentalHStack,{justify:"flex-start"},(0,s.createElement)(Ti,{className:"block-editor-global-styles__toggle-icon",icon:du,size:24}),(0,s.createElement)(_l.FlexItem,null,(0,x.__)("Drop shadow"))))},renderContent:()=>(0,s.createElement)(_l.__experimentalDropdownContentWrapper,{paddingSize:"medium"},(0,s.createElement)(mu,{shadow:e,onShadowChange:t,settings:n}))})}function bu(e){return(0,u.useMemo)((()=>{var t;if(!e?.shadow)return pu;const n=e?.shadow?.defaultPresets,{default:o,theme:r}=null!==(t=e?.shadow?.presets)&&void 0!==t?t:{},l={name:(0,x.__)("Unset"),slug:"unset",shadow:"none"},i=[...n&&o||pu,...r||pu];return i.length&&i.unshift(l),i}),[e])}function vu(e){return Object.values(ku(e)).some(Boolean)}function ku(e){return{hasBorderColor:_u(e),hasBorderRadius:yu(e),hasBorderStyle:Eu(e),hasBorderWidth:wu(e),hasShadow:Su(e)}}function _u(e){return e?.border?.color}function yu(e){return e?.border?.radius}function Eu(e){return e?.border?.style}function wu(e){return e?.border?.width}function Su(e){const t=bu(e);return!!e?.shadow&&t.length>0}function Cu({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r,label:l}){return(0,s.createElement)(_l.__experimentalToolsPanel,{label:l,resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:Qr},r)}const xu={radius:!0,color:!0,width:!0,shadow:!1};function Bu({as:e=Cu,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:l,name:i,defaultControls:a=xu}){var c,d;const p=ul(r),m=(0,u.useCallback)((e=>el({settings:r},"",e)),[r]),h=e=>{const t=p.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},g=(0,u.useMemo)((()=>{if((0,_l.__experimentalHasSplitBorders)(o?.border)){const e={...o?.border};return["top","right","bottom","left"].forEach((t=>{e[t]={...e[t],color:m(e[t]?.color)}})),e}return{...o?.border,color:o?.border?.color?m(o?.border?.color):void 0}}),[o?.border,m]),f=e=>n({...t,border:e}),b=_u(r),v=Eu(r),k=wu(r),_=yu(r),y=m(g?.radius),E=e=>f({...g,radius:e}),w=()=>{const e=t?.border?.radius;return"object"==typeof e?Object.entries(e).some(Boolean):!!e},S=Su(r),C=m(o?.shadow),B=null!==(d=Qn(null!==(c=r?.shadow?.presets)&&void 0!==c?c:{}))&&void 0!==d?d:[],I=e=>{const o=B?.find((({shadow:t})=>t===e))?.slug;n(jn(t,["shadow"],o?`var:preset|shadow|${o}`:e||void 0))},T=(0,u.useCallback)((e=>({...e,border:void 0,shadow:void 0})),[]),M=a?.color||a?.width,P=b||v||k||_,R=zu({blockName:i,hasShadowControl:S,hasBorderControl:P});return(0,s.createElement)(e,{resetAllFilter:T,value:t,onChange:n,panelId:l,label:R},(k||b)&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:()=>(0,_l.__experimentalIsDefinedBorder)(t?.border),label:(0,x.__)("Border"),onDeselect:()=>(()=>{if(w())return f({radius:t?.border?.radius});f(void 0)})(),isShownByDefault:M,panelId:l},(0,s.createElement)(_l.__experimentalBorderBoxControl,{colors:p,enableAlpha:!0,enableStyle:v,onChange:e=>{const t={...e};(0,_l.__experimentalHasSplitBorders)(t)?["top","right","bottom","left"].forEach((e=>{t[e]&&(t[e]={...t[e],color:h(t[e]?.color)})})):t&&(t.color=h(t.color)),f({radius:g?.radius,...t})},popoverOffset:40,popoverPlacement:"left-start",value:g,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!S,label:(0,x.__)("Border")})),_&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:w,label:(0,x.__)("Radius"),onDeselect:()=>E(void 0),isShownByDefault:a.radius,panelId:l},(0,s.createElement)(cu,{values:y,onChange:e=>{E(e||void 0)}})),S&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{label:(0,x.__)("Shadow"),hasValue:()=>!!t?.shadow,onDeselect:()=>I(void 0),isShownByDefault:a.shadow,panelId:l},P?(0,s.createElement)(_l.BaseControl.VisualLabel,{as:"legend"},(0,x.__)("Shadow")):null,(0,s.createElement)(_l.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,s.createElement)(fu,{shadow:C,onShadowChange:I,settings:r}))))}const Iu="__experimentalBorder",Tu="shadow",Mu=(e,t,n)=>{let o;return e.some((e=>e.colors.some((e=>e[t]===n&&(o=e,!0))))),o},Pu=({colors:e,namedColor:t,customColor:n})=>{if(t){const n=Mu(e,"slug",t);if(n)return n}if(!n)return{color:void 0};const o=Mu(e,"color",n);return o||{color:n}};function Ru(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function Nu(e){if((0,_l.__experimentalHasSplitBorders)(e?.border))return{style:e,borderColor:void 0};const t=e?.border?.color,n=t?.startsWith("var:preset|color|")?t.substring(17):void 0,o={...e};return o.border={...o.border,color:n?void 0:t},{style:hl(o),borderColor:n}}function Lu(e){return(0,_l.__experimentalHasSplitBorders)(e.style?.border)?e.style:{...e.style,border:{...e.style?.border,color:e.borderColor?"var:preset|color|"+e.borderColor:e.style?.border?.color}}}function Au({label:e,children:t,resetAllFilter:n}){const o=(0,u.useCallback)((e=>{const t=Lu(e),o=n(t);return{...e,...Nu(o)}}),[n]);return(0,s.createElement)(Bs,{group:"border",resetAllFilter:o,label:e},t)}function Ou({clientId:e,name:t,setAttributes:n,settings:o}){const r=vu(o);const{style:l,borderColor:i}=(0,d.useSelect)((function(t){const{style:n,borderColor:o}=t(Nr).getBlockAttributes(e)||{};return{style:n,borderColor:o}}),[e]),a=(0,u.useMemo)((()=>Lu({style:l,borderColor:i})),[l,i]);if(!r)return null;const p={...(0,c.getBlockSupport)(t,[Iu,"__experimentalDefaultControls"]),...(0,c.getBlockSupport)(t,[Tu,"__experimentalDefaultControls"])};return(0,s.createElement)(Bu,{as:Au,panelId:e,settings:o,value:a,onChange:e=>{n(Nu(e))},defaultControls:p})}function Du(e,t="any"){if("web"!==u.Platform.OS)return!1;const n=(0,c.getBlockSupport)(e,Iu);return!0===n||("any"===t?!!(n?.color||n?.radius||n?.width||n?.style):!!n?.[t])}function zu({blockName:e,hasBorderControl:t,hasShadowControl:n}={}){const o=ku(vl(e));return t||n||!e||(t=o?.hasBorderColor||o?.hasBorderStyle||o?.hasBorderWidth||o?.hasBorderRadius,n=o?.hasShadow),t&&n?(0,x.__)("Border & Shadow"):n?(0,x.__)("Shadow"):(0,x.__)("Border")}function Vu(e,t,n){if(!Du(t,"color")||fl(t,Iu,"color"))return e;const o=Fu(n),r=ml()(e.className,o);return e.className=r||void 0,e}function Fu(e){const{borderColor:t,style:n}=e,o=Zc("border-color",t);return ml()({"has-border-color":t||n?.border?.color,[o]:!!o})}const Hu={useBlockProps:function({name:e,borderColor:t,style:n}){const{colors:o}=qc();if(!Du(e,"color")||fl(e,Iu,"color"))return{};const{color:r}=Pu({colors:o,namedColor:t}),{color:l}=Pu({colors:o,namedColor:Ru(n?.border?.top?.color)}),{color:i}=Pu({colors:o,namedColor:Ru(n?.border?.right?.color)}),{color:s}=Pu({colors:o,namedColor:Ru(n?.border?.bottom?.color)}),{color:a}=Pu({colors:o,namedColor:Ru(n?.border?.left?.color)});return Vu({style:hl({borderTopColor:l||r,borderRightColor:i||r,borderBottomColor:s||r,borderLeftColor:a||r})||{}},e,{borderColor:t,style:n})},addSaveProps:Vu,attributeKeys:["borderColor","style"],hasSupport:e=>Du(e,"color")};function Gu(e){if(e)return`has-${e}-gradient-background`}function Uu(e,t){const n=e?.find((e=>e.slug===t));return n&&n.gradient}function $u(e,t){const n=e?.find((e=>e.gradient===t));return n}function ju(e,t){const n=$u(e,t);return n&&n.slug}function Wu({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){const{clientId:n}=y(),[o,r,l]=Ar("color.gradients.custom","color.gradients.theme","color.gradients.default"),i=(0,u.useMemo)((()=>[...o||[],...r||[],...l||[]]),[o,r,l]),{gradient:s,customGradient:a}=(0,d.useSelect)((o=>{const{getBlockAttributes:r}=o(Nr),l=r(n)||{};return{customGradient:l[t],gradient:l[e]}}),[n,e,t]),{updateBlockAttributes:c}=(0,d.useDispatch)(Nr),p=(0,u.useCallback)((o=>{const r=ju(i,o);c(n,r?{[e]:r,[t]:void 0}:{[e]:void 0,[t]:o})}),[i,n,c]),m=Gu(s);let h;return h=s?Uu(i,s):a,{gradientClass:m,gradientValue:h,setGradient:p}}(0,m.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Du(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e}));const Ku=["colors","disableCustomColors","gradients","disableCustomGradients"],Zu={color:"color",gradient:"gradient"};function qu({colors:e,gradients:t,disableCustomColors:n,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,className:l,label:i,onColorChange:a,onGradientChange:c,colorValue:u,gradientValue:d,clearable:p,showTitle:m=!0,enableAlpha:h,headingLevel:g}){const f=a&&(e&&e.length>0||!n),b=c&&(t&&t.length>0||!o);if(!f&&!b)return null;const v={[Zu.color]:(0,s.createElement)(_l.ColorPalette,{value:u,onChange:b?e=>{a(e),c()}:a,colors:e,disableCustomColors:n,__experimentalIsRenderedInSidebar:r,clearable:p,enableAlpha:h,headingLevel:g}),[Zu.gradient]:(0,s.createElement)(_l.GradientPicker,{value:d,onChange:f?e=>{c(e),a()}:c,gradients:t,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,clearable:p,headingLevel:g})},k=e=>(0,s.createElement)("div",{className:"block-editor-color-gradient-control__panel"},v[e]),{Tabs:_}=ie(_l.privateApis);return(0,s.createElement)(_l.BaseControl,{__nextHasNoMarginBottom:!0,className:ml()("block-editor-color-gradient-control",l)},(0,s.createElement)("fieldset",{className:"block-editor-color-gradient-control__fieldset"},(0,s.createElement)(_l.__experimentalVStack,{spacing:1},m&&(0,s.createElement)("legend",null,(0,s.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,s.createElement)(_l.BaseControl.VisualLabel,null,i))),f&&b&&(0,s.createElement)("div",null,(0,s.createElement)(_,{initialTabId:d?Zu.gradient:!!f&&Zu.color},(0,s.createElement)(_.TabList,null,(0,s.createElement)(_.Tab,{tabId:Zu.color},(0,x.__)("Solid")),(0,s.createElement)(_.Tab,{tabId:Zu.gradient},(0,x.__)("Gradient"))),(0,s.createElement)(_.TabPanel,{tabId:Zu.color,className:"block-editor-color-gradient-control__panel",focusable:!1},v.color),(0,s.createElement)(_.TabPanel,{tabId:Zu.gradient,className:"block-editor-color-gradient-control__panel",focusable:!1},v.gradient))),!b&&k(Zu.color),!f&&k(Zu.gradient))))}function Yu(e){const[t,n,o,r]=Ar("color.palette","color.gradients","color.custom","color.customGradient");return(0,s.createElement)(qu,{colors:t,gradients:n,disableCustomColors:!o,disableCustomGradients:!r,...e})}const Xu=function(e){return Ku.every((t=>e.hasOwnProperty(t)))?(0,s.createElement)(qu,{...e}):(0,s.createElement)(Yu,{...e})};function Qu(e){const t=Ju(e),n=rd(e),o=ed(e),r=nd(e),l=od(e),i=td(e);return t||n||o||r||l||i}function Ju(e){const t=ul(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function ed(e){const t=ul(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function td(e){const t=ul(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function nd(e){const t=ul(e),n=dl(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function od(e){const t=ul(e),n=dl(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function rd(e){const t=ul(e),n=dl(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function ld({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){return(0,s.createElement)(_l.__experimentalToolsPanel,{label:(0,x.__)("Color"),resetAll:()=>{const o=e(n);t(o)},panelId:o,hasInnerWrapper:!0,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:Qr},(0,s.createElement)("div",{className:"color-block-support-panel__inner-wrapper"},r))}const id={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},sd={placement:"left-start",offset:36,shift:!0},ad=({indicators:e,label:t})=>(0,s.createElement)(_l.__experimentalHStack,{justify:"flex-start"},(0,s.createElement)(_l.__experimentalZStack,{isLayered:!1,offset:-8},e.map(((e,t)=>(0,s.createElement)(_l.Flex,{key:t,expanded:!1},(0,s.createElement)(_l.ColorIndicator,{colorValue:e}))))),(0,s.createElement)(_l.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t},t));function cd({isGradient:e,inheritedValue:t,userValue:n,setValue:o,colorGradientControlSettings:r}){return(0,s.createElement)(Xu,{...r,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:e?void 0:t,gradientValue:e?t:void 0,onColorChange:e?void 0:o,onGradientChange:e?o:void 0,clearable:t===n,headingLevel:3})}function ud({label:e,hasValue:t,resetValue:n,isShownByDefault:o,indicators:r,tabs:l,colorGradientControlSettings:i,panelId:a}){const c=l.find((e=>void 0!==e.userValue)),{Tabs:u}=ie(_l.privateApis);return(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"block-editor-tools-panel-color-gradient-settings__item",hasValue:t,label:e,onDeselect:n,isShownByDefault:o,panelId:a},(0,s.createElement)(_l.Dropdown,{popoverProps:sd,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:t,isOpen:n})=>{const o={onClick:t,className:ml()("block-editor-panel-color-gradient-settings__dropdown",{"is-open":n}),"aria-expanded":n,"aria-label":(0,x.sprintf)((0,x.__)("Color %s styles"),e)};return(0,s.createElement)(_l.Button,{...o},(0,s.createElement)(ad,{indicators:r,label:e}))},renderContent:()=>(0,s.createElement)(_l.__experimentalDropdownContentWrapper,{paddingSize:"none"},(0,s.createElement)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content"},1===l.length&&(0,s.createElement)(cd,{...l[0],colorGradientControlSettings:i}),l.length>1&&(0,s.createElement)(u,{initialTabId:c?.key},(0,s.createElement)(u.TabList,null,l.map((e=>(0,s.createElement)(u.Tab,{key:e.key,tabId:e.key},e.label)))),l.map((e=>(0,s.createElement)(u.TabPanel,{key:e.key,tabId:e.key,focusable:!1},(0,s.createElement)(cd,{...e,colorGradientControlSettings:i})))))))}))}function dd({as:e=ld,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:l,defaultControls:i=id,children:a}){const c=ul(r),d=dl(r),p=r?.color?.custom,m=r?.color?.customGradient,h=c.length>0||p,g=d.length>0||m,f=e=>el({settings:r},"",e),b=e=>{const t=c.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},v=e=>{const t=d.flatMap((({gradients:e})=>e)).find((({gradient:t})=>t===e));return t?"var:preset|gradient|"+t.slug:e},k=rd(r),_=f(o?.color?.background),y=f(t?.color?.background),E=f(o?.color?.gradient),w=f(t?.color?.gradient),S=ed(r),C=f(o?.elements?.link?.color?.text),B=f(t?.elements?.link?.color?.text),I=f(o?.elements?.link?.[":hover"]?.color?.text),T=f(t?.elements?.link?.[":hover"]?.color?.text),M=Ju(r),P=f(o?.color?.text),R=f(t?.color?.text),N=e=>{let o=jn(t,["color","text"],b(e));P===C&&(o=jn(o,["elements","link","color","text"],b(e))),n(o)},L=[{name:"caption",label:(0,x.__)("Captions"),showPanel:td(r)},{name:"button",label:(0,x.__)("Button"),showPanel:od(r)},{name:"heading",label:(0,x.__)("Heading"),showPanel:nd(r)},{name:"h1",label:(0,x.__)("H1"),showPanel:nd(r)},{name:"h2",label:(0,x.__)("H2"),showPanel:nd(r)},{name:"h3",label:(0,x.__)("H3"),showPanel:nd(r)},{name:"h4",label:(0,x.__)("H4"),showPanel:nd(r)},{name:"h5",label:(0,x.__)("H5"),showPanel:nd(r)},{name:"h6",label:(0,x.__)("H6"),showPanel:nd(r)}],A=(0,u.useCallback)((e=>({...e,color:void 0,elements:{...e?.elements,link:{...e?.elements?.link,color:void 0,":hover":{color:void 0}},...L.reduce(((t,n)=>({...t,[n.name]:{...e?.elements?.[n.name],color:void 0}})),{})}})),[]),O=[M&&{key:"text",label:(0,x.__)("Text"),hasValue:()=>!!R,resetValue:()=>N(void 0),isShownByDefault:i.text,indicators:[P],tabs:[{key:"text",label:(0,x.__)("Text"),inheritedValue:P,setValue:N,userValue:R}]},k&&{key:"background",label:(0,x.__)("Background"),hasValue:()=>!!y||!!w,resetValue:()=>{const e=jn(t,["color","background"],void 0);e.color.gradient=void 0,n(e)},isShownByDefault:i.background,indicators:[null!=E?E:_],tabs:[h&&{key:"background",label:(0,x.__)("Solid"),inheritedValue:_,setValue:e=>{const o=jn(t,["color","background"],b(e));o.color.gradient=void 0,n(o)},userValue:y},g&&{key:"gradient",label:(0,x.__)("Gradient"),inheritedValue:E,setValue:e=>{const o=jn(t,["color","gradient"],v(e));o.color.background=void 0,n(o)},userValue:w,isGradient:!0}].filter(Boolean)},S&&{key:"link",label:(0,x.__)("Link"),hasValue:()=>!!B||!!T,resetValue:()=>{let e=jn(t,["elements","link",":hover","color","text"],void 0);e=jn(e,["elements","link","color","text"],void 0),n(e)},isShownByDefault:i.link,indicators:[C,I],tabs:[{key:"link",label:(0,x.__)("Default"),inheritedValue:C,setValue:e=>{n(jn(t,["elements","link","color","text"],b(e)))},userValue:B},{key:"hover",label:(0,x.__)("Hover"),inheritedValue:I,setValue:e=>{n(jn(t,["elements","link",":hover","color","text"],b(e)))},userValue:T}]}].filter(Boolean);return L.forEach((({name:e,label:r,showPanel:l})=>{if(!l)return;const s=f(o?.elements?.[e]?.color?.background),a=f(o?.elements?.[e]?.color?.gradient),c=f(o?.elements?.[e]?.color?.text),u=f(t?.elements?.[e]?.color?.background),d=f(t?.elements?.[e]?.color?.gradient),p=f(t?.elements?.[e]?.color?.text),m="caption"!==e;O.push({key:e,label:r,hasValue:()=>!!(p||u||d),resetValue:()=>{const o=jn(t,["elements",e,"color","background"],void 0);o.elements[e].color.gradient=void 0,o.elements[e].color.text=void 0,n(o)},isShownByDefault:i[e],indicators:m?[c,null!=a?a:s]:[c],tabs:[h&&{key:"text",label:(0,x.__)("Text"),inheritedValue:c,setValue:o=>{n(jn(t,["elements",e,"color","text"],b(o)))},userValue:p},h&&m&&{key:"background",label:(0,x.__)("Background"),inheritedValue:s,setValue:o=>{const r=jn(t,["elements",e,"color","background"],b(o));r.elements[e].color.gradient=void 0,n(r)},userValue:u},g&&m&&{key:"gradient",label:(0,x.__)("Gradient"),inheritedValue:a,setValue:o=>{const r=jn(t,["elements",e,"color","gradient"],v(o));r.elements[e].color.background=void 0,n(r)},userValue:d,isGradient:!0}].filter(Boolean)})})),(0,s.createElement)(e,{resetAllFilter:A,value:t,onChange:n,panelId:l},O.map((e=>(0,s.createElement)(ud,{key:e.key,...e,colorGradientControlSettings:{colors:c,disableCustomColors:!p,gradients:d,disableCustomGradients:!m},panelId:l}))),a)}Hc([Gc,jc]);const pd=function({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:n,fallbackLinkColor:o,fontSize:r,isLargeText:l,textColor:i,linkColor:a,enableAlphaChecker:c=!1}){const u=e||t;if(!u)return null;const d=i||n,p=a||o;if(!d&&!p)return null;const m=[{color:d,description:(0,x.__)("text color")},{color:p,description:(0,x.__)("link color")}],h=Vc(u),g=h.alpha()<1,f=h.brightness(),b={level:"AA",size:l||!1!==l&&r>=24?"large":"small"};let v="",k="";for(const e of m){if(!e.color)continue;const t=Vc(e.color),n=t.isReadable(h,b),o=t.alpha()<1;if(!n){if(g||o)continue;v=f<t.brightness()?(0,x.sprintf)((0,x.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),e.description):(0,x.sprintf)((0,x.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."),e.description),k=(0,x.__)("This color combination may be hard for people to read.");break}o&&c&&(v=(0,x.__)("Transparent text may be hard for people to read."),k=(0,x.__)("Transparent text may be hard for people to read."))}return v?((0,vo.speak)(k),(0,s.createElement)("div",{className:"block-editor-contrast-checker"},(0,s.createElement)(_l.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},v))):null},md=(0,u.createContext)({refs:new Map,callbacks:new Map});function hd({children:e}){const t=(0,u.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,s.createElement)(md.Provider,{value:t},e)}function gd(e){const{refs:t,callbacks:n}=(0,u.useContext)(md),o=(0,u.useRef)();return(0,u.useLayoutEffect)((()=>(t.set(o,e),()=>{t.delete(o)})),[e]),(0,p.useRefEffect)((t=>{o.current=t,n.forEach(((n,o)=>{e===n&&o(t)}))}),[e])}function fd(e){const{refs:t}=(0,u.useContext)(md),n=(0,u.useRef)();return n.current=e,(0,u.useMemo)((()=>({get current(){let e=null;for(const[o,r]of t.entries())r===n.current&&o.current&&(e=o.current);return e}})),[])}function bd(e){const{callbacks:t}=(0,u.useContext)(md),n=fd(e),[o,r]=(0,u.useState)(null);return(0,u.useLayoutEffect)((()=>{if(e)return t.set(r,e),()=>{t.delete(r)}}),[e]),n.current||o}function vd(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function kd({clientId:e}){const[t,n]=(0,u.useState)(),[o,r]=(0,u.useState)(),[l,i]=(0,u.useState)(),a=fd(e);return(0,u.useEffect)((()=>{if(!a.current)return;r(vd(a.current).color);const e=a.current?.querySelector("a");e&&e.innerText&&i(vd(e).color);let t=a.current,o=vd(t).backgroundColor;for(;"rgba(0, 0, 0, 0)"===o&&t.parentNode&&t.parentNode.nodeType===t.parentNode.ELEMENT_NODE;)t=t.parentNode,o=vd(t).backgroundColor;n(o)})),(0,s.createElement)(pd,{backgroundColor:t,textColor:o,enableAlphaChecker:!0,linkColor:l})}const _d="color",yd=e=>{const t=(0,c.getBlockSupport)(e,_d);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},Ed=e=>{if("web"!==u.Platform.OS)return!1;const t=(0,c.getBlockSupport)(e,_d);return null!==t&&"object"==typeof t&&!!t.link},wd=e=>{const t=(0,c.getBlockSupport)(e,_d);return null!==t&&"object"==typeof t&&!!t.gradients},Sd=e=>{const t=(0,c.getBlockSupport)(e,_d);return t&&!1!==t.background},Cd=e=>{const t=(0,c.getBlockSupport)(e,_d);return t&&!1!==t.text};function xd(e,t,n){if(!yd(t)||fl(t,_d))return e;const o=wd(t),{backgroundColor:r,textColor:l,gradient:i,style:s}=n,a=e=>!fl(t,_d,e),c=a("text")?Zc("color",l):void 0,u=a("gradients")?Gu(i):void 0,d=a("background")?Zc("background-color",r):void 0,p=a("background")||a("gradients"),m=r||s?.color?.background||o&&(i||s?.color?.gradient),h=ml()(e.className,c,u,{[d]:!(o&&s?.color?.gradient||!d),"has-text-color":a("text")&&(l||s?.color?.text),"has-background":p&&m,"has-link-color":a("link")&&s?.elements?.link?.color});return e.className=h||void 0,e}function Bd(e){const t=e?.color?.text,n=t?.startsWith("var:preset|color|")?t.substring(17):void 0,o=e?.color?.background,r=o?.startsWith("var:preset|color|")?o.substring(17):void 0,l=e?.color?.gradient,i=l?.startsWith("var:preset|gradient|")?l.substring(20):void 0,s={...e};return s.color={...s.color,text:n?void 0:t,background:r?void 0:o,gradient:i?void 0:l},{style:hl(s),textColor:n,backgroundColor:r,gradient:i}}function Id(e){return{...e.style,color:{...e.style?.color,text:e.textColor?"var:preset|color|"+e.textColor:e.style?.color?.text,background:e.backgroundColor?"var:preset|color|"+e.backgroundColor:e.style?.color?.background,gradient:e.gradient?"var:preset|gradient|"+e.gradient:e.style?.color?.gradient}}}function Td({children:e,resetAllFilter:t}){const n=(0,u.useCallback)((e=>{const n=Id(e),o=t(n);return{...e,...Bd(o)}}),[t]);return(0,s.createElement)(Bs,{group:"color",resetAllFilter:n},e)}function Md({clientId:e,name:t,setAttributes:n,settings:o}){const r=Qu(o);const{style:l,textColor:i,backgroundColor:a,gradient:p}=(0,d.useSelect)((function(t){const{style:n,textColor:o,backgroundColor:r,gradient:l}=t(Nr).getBlockAttributes(e)||{};return{style:n,textColor:o,backgroundColor:r,gradient:l}}),[e]),m=(0,u.useMemo)((()=>Id({style:l,textColor:i,backgroundColor:a,gradient:p})),[l,i,a,p]);if(!r)return null;const h=(0,c.getBlockSupport)(t,[_d,"__experimentalDefaultControls"]),g="web"===u.Platform.OS&&!m?.color?.gradient&&(o?.color?.text||o?.color?.link)&&!1!==(0,c.getBlockSupport)(t,[_d,"enableContrastChecker"]);return(0,s.createElement)(dd,{as:Td,panelId:e,settings:o,value:m,onChange:e=>{n(Bd(e))},defaultControls:h,enableContrastChecker:!1!==(0,c.getBlockSupport)(t,[_d,"enableContrastChecker"])},g&&(0,s.createElement)(kd,{clientId:e}))}const Pd={useBlockProps:function({name:e,backgroundColor:t,textColor:n,gradient:o,style:r}){const[l,i,s]=Ar("color.palette.custom","color.palette.theme","color.palette.default"),a=(0,u.useMemo)((()=>[...l||[],...i||[],...s||[]]),[l,i,s]);if(!yd(e)||fl(e,_d))return{};const c={};n&&!fl(e,_d,"text")&&(c.color=Wc(a,n)?.color),t&&!fl(e,_d,"background")&&(c.backgroundColor=Wc(a,t)?.color);const d=xd({style:c},e,{textColor:n,backgroundColor:t,gradient:o,style:r}),p=t||r?.color?.background||o||r?.color?.gradient;return{...d,className:ml()(d.className,!p&&ic(r))}},addSaveProps:xd,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:yd},Rd={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function Nd({value:e="",onChange:t,fontFamilies:n,...o}){const[r]=Ar("typography.fontFamilies");if(n||(n=r),!n||0===n.length)return null;const l=[{value:"",label:(0,x.__)("Default")},...n.map((({fontFamily:e,name:t})=>({value:e,label:t||e})))];return(0,s.createElement)(_l.SelectControl,{label:(0,x.__)("Font"),options:l,value:e,onChange:t,labelPosition:"top",...o})}(0,m.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return yd(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),wd(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,m.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){const r=e.name;return gl({linkColor:Ed(r),textColor:Cd(r),backgroundColor:Sd(r),gradient:wd(r)},Rd,e,t,n,o)}));const Ld=[{name:(0,x._x)("Regular","font style"),value:"normal"},{name:(0,x._x)("Italic","font style"),value:"italic"}],Ad=[{name:(0,x._x)("Thin","font weight"),value:"100"},{name:(0,x._x)("Extra Light","font weight"),value:"200"},{name:(0,x._x)("Light","font weight"),value:"300"},{name:(0,x._x)("Regular","font weight"),value:"400"},{name:(0,x._x)("Medium","font weight"),value:"500"},{name:(0,x._x)("Semi Bold","font weight"),value:"600"},{name:(0,x._x)("Bold","font weight"),value:"700"},{name:(0,x._x)("Extra Bold","font weight"),value:"800"},{name:(0,x._x)("Black","font weight"),value:"900"}],Od=(e,t)=>e?t?(0,x.__)("Appearance"):(0,x.__)("Font style"):(0,x.__)("Font weight");function Dd(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:o=!0,value:{fontStyle:r,fontWeight:l},...i}=e,a=n||o,c=Od(n,o),d={key:"default",name:(0,x.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},p=(0,u.useMemo)((()=>n&&o?(()=>{const e=[d];return Ld.forEach((({name:t,value:n})=>{Ad.forEach((({name:o,value:r})=>{const l="normal"===n?o:(0,x.sprintf)((0,x.__)("%1$s %2$s"),o,t);e.push({key:`${n}-${r}`,name:l,style:{fontStyle:n,fontWeight:r}})}))})),e})():n?(()=>{const e=[d];return Ld.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:n,fontWeight:void 0}})})),e})():(()=>{const e=[d];return Ad.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:void 0,fontWeight:n}})})),e})()),[e.options]),m=p.find((e=>e.style.fontStyle===r&&e.style.fontWeight===l))||p[0];return a&&(0,s.createElement)(_l.CustomSelectControl,{...i,className:"components-font-appearance-control",label:c,describedBy:m?n?o?(0,x.sprintf)((0,x.__)("Currently selected font appearance: %s"),m.name):(0,x.sprintf)((0,x.__)("Currently selected font style: %s"),m.name):(0,x.sprintf)((0,x.__)("Currently selected font weight: %s"),m.name):(0,x.__)("No selected font appearance"),options:p,value:m,onChange:({selectedItem:e})=>t(e.style),__nextUnconstrainedWidth:!0})}const zd=1.5;const Vd=({value:e,onChange:t,__nextHasNoMarginBottom:n=!1,__unstableInputWidth:o="60px",...r})=>{const l=function(e){return void 0!==e&&""!==e}(e),i=(e,t)=>{if(l)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return zd;default:return e}},a=l?e:"";n||w()("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 c=n?void 0:{marginBottom:24};return(0,s.createElement)("div",{className:"block-editor-line-height-control",style:c},(0,s.createElement)(_l.__experimentalNumberControl,{...r,__unstableInputWidth:o,__unstableStateReducer:(e,t)=>{const n=["insertText","insertFromPaste"].includes(t.payload.event.nativeEvent?.inputType),o=i(e.value,n);return{...e,value:o}},onChange:(e,{event:n})=>{""!==e?"click"!==n.type?t(`${e}`):t(i(`${e}`,!1)):t()},label:(0,x.__)("Line height"),placeholder:zd,step:.01,spinFactor:10,value:a,min:0,spinControls:"custom"}))};function Fd({value:e,onChange:t,__unstableInputWidth:n="60px",...o}){const[r]=Ar("spacing.units"),l=(0,_l.__experimentalUseCustomUnits)({availableUnits:r||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return(0,s.createElement)(_l.__experimentalUnitControl,{...o,label:(0,x.__)("Letter spacing"),value:e,__unstableInputWidth:n,units:l,onChange:t})}const Hd=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M7 11.5h10V13H7z"})),Gd=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.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"})),Ud=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.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"})),$d=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.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"})),jd=[{name:(0,x.__)("None"),value:"none",icon:Hd},{name:(0,x.__)("Uppercase"),value:"uppercase",icon:Gd},{name:(0,x.__)("Lowercase"),value:"lowercase",icon:Ud},{name:(0,x.__)("Capitalize"),value:"capitalize",icon:$d}];function Wd({className:e,value:t,onChange:n}){return(0,s.createElement)("fieldset",{className:ml()("block-editor-text-transform-control",e)},(0,s.createElement)(_l.BaseControl.VisualLabel,{as:"legend"},(0,x.__)("Letter case")),(0,s.createElement)("div",{className:"block-editor-text-transform-control__buttons"},jd.map((e=>(0,s.createElement)(_l.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===t,onClick:()=>{n(e.value===t?void 0:e.value)}})))))}const Kd=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.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"})),Zd=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.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"})),qd=[{name:(0,x.__)("None"),value:"none",icon:Hd},{name:(0,x.__)("Underline"),value:"underline",icon:Kd},{name:(0,x.__)("Strikethrough"),value:"line-through",icon:Zd}];function Yd({value:e,onChange:t,className:n}){return(0,s.createElement)("fieldset",{className:ml()("block-editor-text-decoration-control",n)},(0,s.createElement)(_l.BaseControl.VisualLabel,{as:"legend"},(0,x.__)("Decoration")),(0,s.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},qd.map((n=>(0,s.createElement)(_l.Button,{key:n.value,icon:n.icon,label:n.name,isPressed:n.value===e,onClick:()=>{t(n.value===e?void 0:n.value)}})))))}const Xd=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M8.2 14.4h3.9L13 17h1.7L11 6.5H9.3L5.6 17h1.7l.9-2.6zm2-5.5 1.4 4H8.8l1.4-4zm7.4 7.5-1.3.8.8 1.4H5.5V20h14.3l-2.2-3.6z"})),Qd=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M7 5.6v1.7l2.6.9v3.9L7 13v1.7L17.5 11V9.3L7 5.6zm4.2 6V8.8l4 1.4-4 1.4zm-5.7 5.6V5.5H4v14.3l3.6-2.2-.8-1.3-1.3.9z"})),Jd=[{name:(0,x.__)("Horizontal"),value:"horizontal-tb",icon:Xd},{name:(0,x.__)("Vertical"),value:(0,x.isRTL)()?"vertical-lr":"vertical-rl",icon:Qd}];function ep({className:e,value:t,onChange:n}){return(0,s.createElement)("fieldset",{className:ml()("block-editor-writing-mode-control",e)},(0,s.createElement)(_l.BaseControl.VisualLabel,{as:"legend"},(0,x.__)("Orientation")),(0,s.createElement)("div",{className:"block-editor-writing-mode-control__buttons"},Jd.map((e=>(0,s.createElement)(_l.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===t,onClick:()=>{n(e.value===t?void 0:e.value)}})))))}const tp=1,np=6;function op(e){const t=lp(e),n=ip(e),o=sp(e),r=ap(e),l=cp(e),i=up(e),s=dp(e),a=pp(e),c=rp(e);return t||n||o||r||l||c||i||s||a}function rp(e){return Jn(e?.typography?.fontSizes)||e?.typography?.customFontSize}function lp(e){return Jn(e?.typography?.fontFamilies)}function ip(e){return e?.typography?.lineHeight}function sp(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function ap(e){return e?.typography?.letterSpacing}function cp(e){return e?.typography?.textTransform}function up(e){return e?.typography?.textDecoration}function dp(e){return e?.typography?.writingMode}function pp(e){return e?.typography?.textColumns}function mp({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){return(0,s.createElement)(_l.__experimentalToolsPanel,{label:(0,x.__)("Typography"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:Qr},r)}const hp={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textTransform:!0,textDecoration:!0,writingMode:!0,textColumns:!0};function gp({as:e=mp,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:l,defaultControls:i=hp}){var a;const c=e=>el({settings:r},"",e),d=lp(r),p=null!==(a=r?.typography?.fontFamilies)&&void 0!==a?a:{},m=p?function(e){let t=Xn.get(e);return t||(t=["default","theme","custom"].flatMap((t=>{var n;return null!==(n=e[t])&&void 0!==n?n:[]})),Xn.set(e,t)),t}(p):[],h=c(o?.typography?.fontFamily),g=e=>{const o=m?.find((({fontFamily:t})=>t===e))?.slug;n(jn(t,["typography","fontFamily"],o?`var:preset|font-family|${o}`:e||void 0))},f=rp(r),b=!r?.typography?.customFontSize,v=function(e){var t,n;const o=null!==(n=Qn(null!==(t=e?.typography?.fontSizes)&&void 0!==t?t:{}))&&void 0!==n?n:[],r=[];for(const e of o)r.some((({slug:t})=>t===e.slug))||r.push(e);return r}(r),k=c(o?.typography?.fontSize),_=(e,o)=>{n(jn(t,["typography","fontSize"],(o?.slug?`var:preset|font-size|${o?.slug}`:e)||void 0))},y=sp(r),E=function(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,x.__)("Appearance"):(0,x.__)("Font style"):(0,x.__)("Font weight")}(r),w=r?.typography?.fontStyle,S=r?.typography?.fontWeight,C=c(o?.typography?.fontStyle),B=c(o?.typography?.fontWeight),I=({fontStyle:e,fontWeight:o})=>{n({...t,typography:{...t?.typography,fontStyle:e||void 0,fontWeight:o||void 0}})},T=ip(r),M=c(o?.typography?.lineHeight),P=e=>{n(jn(t,["typography","lineHeight"],e||void 0))},R=ap(r),N=c(o?.typography?.letterSpacing),L=e=>{n(jn(t,["typography","letterSpacing"],e||void 0))},A=pp(r),O=c(o?.typography?.textColumns),D=e=>{n(jn(t,["typography","textColumns"],e||void 0))},z=cp(r),V=c(o?.typography?.textTransform),F=e=>{n(jn(t,["typography","textTransform"],e||void 0))},H=up(r),G=c(o?.typography?.textDecoration),U=e=>{n(jn(t,["typography","textDecoration"],e||void 0))},$=dp(r),j=c(o?.typography?.writingMode),W=e=>{n(jn(t,["typography","writingMode"],e||void 0))},K=(0,u.useCallback)((e=>({...e,typography:{}})),[]);return(0,s.createElement)(e,{resetAllFilter:K,value:t,onChange:n,panelId:l},d&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{label:(0,x.__)("Font family"),hasValue:()=>!!t?.typography?.fontFamily,onDeselect:()=>g(void 0),isShownByDefault:i.fontFamily,panelId:l},(0,s.createElement)(Nd,{fontFamilies:m,value:h,onChange:g,size:"__unstable-large",__nextHasNoMarginBottom:!0})),f&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{label:(0,x.__)("Font size"),hasValue:()=>!!t?.typography?.fontSize,onDeselect:()=>_(void 0),isShownByDefault:i.fontSize,panelId:l},(0,s.createElement)(_l.FontSizePicker,{value:k,onChange:_,fontSizes:v,disableCustomFontSizes:b,withReset:!1,withSlider:!0,size:"__unstable-large"})),y&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"single-column",label:E,hasValue:()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,onDeselect:()=>{I({})},isShownByDefault:i.fontAppearance,panelId:l},(0,s.createElement)(Dd,{value:{fontStyle:C,fontWeight:B},onChange:I,hasFontStyles:w,hasFontWeights:S,size:"__unstable-large",__nextHasNoMarginBottom:!0})),T&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Line height"),hasValue:()=>void 0!==t?.typography?.lineHeight,onDeselect:()=>P(void 0),isShownByDefault:i.lineHeight,panelId:l},(0,s.createElement)(Vd,{__nextHasNoMarginBottom:!0,__unstableInputWidth:"auto",value:M,onChange:P,size:"__unstable-large"})),R&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Letter spacing"),hasValue:()=>!!t?.typography?.letterSpacing,onDeselect:()=>L(void 0),isShownByDefault:i.letterSpacing,panelId:l},(0,s.createElement)(Fd,{value:N,onChange:L,size:"__unstable-large",__unstableInputWidth:"auto"})),A&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Text columns"),hasValue:()=>!!t?.typography?.textColumns,onDeselect:()=>D(void 0),isShownByDefault:i.textColumns,panelId:l},(0,s.createElement)(_l.__experimentalNumberControl,{label:(0,x.__)("Text columns"),max:np,min:tp,onChange:D,size:"__unstable-large",spinControls:"custom",value:O,initialPosition:1})),H&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Text decoration"),hasValue:()=>!!t?.typography?.textDecoration,onDeselect:()=>U(void 0),isShownByDefault:i.textDecoration,panelId:l},(0,s.createElement)(Yd,{value:G,onChange:U,size:"__unstable-large",__unstableInputWidth:"auto"})),$&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Text orientation"),hasValue:()=>!!t?.typography?.writingMode,onDeselect:()=>W(void 0),isShownByDefault:i.writingMode,panelId:l},(0,s.createElement)(ep,{value:j,onChange:W,size:"__unstable-large",__nextHasNoMarginBottom:!0})),z&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{label:(0,x.__)("Letter case"),hasValue:()=>!!t?.typography?.textTransform,onDeselect:()=>F(void 0),isShownByDefault:i.textTransform,panelId:l},(0,s.createElement)(Wd,{value:V,onChange:F,showNone:!0,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})))}const fp="typography.lineHeight";const bp=window.wp.tokenList;var vp=n.n(bp);const kp="typography.__experimentalFontFamily";function _p(e,t,n){if(!(0,c.hasBlockSupport)(t,kp))return e;if(fl(t,Mp,"fontFamily"))return e;if(!n?.fontFamily)return e;const o=new(vp())(e.className),{kebabCase:r}=ie(_l.privateApis);o.add(`has-${r(n?.fontFamily)}-font-family`);const l=o.value;return e.className=l||void 0,e}const yp={useBlockProps:function({name:e,fontFamily:t}){return _p({},e,{fontFamily:t})},addSaveProps:_p,attributeKeys:["fontFamily"],hasSupport:e=>(0,c.hasBlockSupport)(e,kp)};(0,m.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,c.hasBlockSupport)(e,kp)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e}));const Ep=(e,t,n)=>{if(t){const n=e?.find((({slug:e})=>e===t));if(n)return n}return{size:n}};function wp(e,t){const n=e?.find((({size:e})=>e===t));return n||{size:t}}function Sp(e){if(!e)return;const{kebabCase:t}=ie(_l.privateApis);return`has-${t(e)}-font-size`}const Cp="typography.fontSize";function xp(e,t,n){if(!(0,c.hasBlockSupport)(t,Cp))return e;if(fl(t,Mp,"fontSize"))return e;const o=new(vp())(e.className);o.add(Sp(n.fontSize));const r=o.value;return e.className=r||void 0,e}const Bp={useBlockProps:function({name:e,fontSize:t,style:n}){const[o,r,l]=Ar("typography.fontSizes","typography.fluid","layout");if(!(0,c.hasBlockSupport)(e,Cp)||fl(e,Mp,"fontSize")||!t&&!n?.typography?.fontSize)return;let i;if(n?.typography?.fontSize){const e=Zr({typography:{fluid:r},layout:l});i={style:{fontSize:Wr({size:n.typography.fontSize},e)}}}return t&&(i={style:{fontSize:Ep(o,t,n?.typography?.fontSize).size}}),i?xp(i,e,{fontSize:t}):void 0},addSaveProps:xp,attributeKeys:["fontSize","style"],hasSupport:e=>(0,c.hasBlockSupport)(e,Cp)},Ip={fontSize:[["fontSize"],["style","typography","fontSize"]]};function Tp(e,t){return Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e))))}(0,m.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,c.hasBlockSupport)(e,Cp)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,m.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,o){const r=e.name;return gl({fontSize:(0,c.hasBlockSupport)(r,Cp)},Ip,e,t,n,o)}));const Mp="typography",Pp=[fp,Cp,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",kp,"typography.textColumns","typography.__experimentalTextDecoration","typography.__experimentalWritingMode","typography.__experimentalTextTransform","typography.__experimentalLetterSpacing"];function Rp(e){const t={...Tp(e,["fontFamily"])},n=e?.typography?.fontSize,o=e?.typography?.fontFamily,r=n?.startsWith("var:preset|font-size|")?n.substring(21):void 0,l=o?.startsWith("var:preset|font-family|")?o.substring(23):void 0;return t.typography={...Tp(t.typography,["fontFamily"]),fontSize:r?void 0:n},{style:hl(t),fontFamily:l,fontSize:r}}function Np(e){return{...e.style,typography:{...e.style?.typography,fontFamily:e.fontFamily?"var:preset|font-family|"+e.fontFamily:void 0,fontSize:e.fontSize?"var:preset|font-size|"+e.fontSize:e.style?.typography?.fontSize}}}function Lp({children:e,resetAllFilter:t}){const n=(0,u.useCallback)((e=>{const n=Np(e),o=t(n);return{...e,...Rp(o)}}),[t]);return(0,s.createElement)(Bs,{group:"typography",resetAllFilter:n},e)}function Ap({clientId:e,name:t,setAttributes:n,settings:o}){const{style:r,fontFamily:l,fontSize:i}=(0,d.useSelect)((function(t){const{style:n,fontFamily:o,fontSize:r}=t(Nr).getBlockAttributes(e)||{};return{style:n,fontFamily:o,fontSize:r}}),[e]),a=op(o),p=(0,u.useMemo)((()=>Np({style:r,fontFamily:l,fontSize:i})),[r,i,l]);if(!a)return null;const m=(0,c.getBlockSupport)(t,[Mp,"__experimentalDefaultControls"]);return(0,s.createElement)(gp,{as:Lp,panelId:e,settings:o,value:p,onChange:e=>{n(Rp(e))},defaultControls:m})}const Op=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,s.createElement)(Z.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})),Dp={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},svw:{max:100,steps:1},lvw:{max:100,steps:1},dvw:{max:100,steps:1},svh:{max:100,steps:1},lvh:{max:100,steps:1},dvh:{max:100,steps:1},vi:{max:100,steps:1},svi:{max:100,steps:1},lvi:{max:100,steps:1},dvi:{max:100,steps:1},vb:{max:100,steps:1},svb:{max:100,steps:1},lvb:{max:100,steps:1},dvb:{max:100,steps:1},vmin:{max:100,steps:1},svmin:{max:100,steps:1},lvmin:{max:100,steps:1},dvmin:{max:100,steps:1},vmax:{max:100,steps:1},svmax:{max:100,steps:1},lvmax:{max:100,steps:1},dvmax:{max:100,steps:1}};function zp({icon:e,isMixed:t=!1,minimumCustomValue:n,onChange:o,onMouseOut:r,onMouseOver:l,showSideInLabel:i=!0,side:a,spacingSizes:c,type:m,value:h}){var g,f;h=Jl(h,c);let b=c;const v=c.length<=8,k=(0,d.useSelect)((e=>{const t=e(Nr).getSettings();return t?.disableCustomSpacingSizes})),[_,y]=(0,u.useState)(!k&&void 0!==h&&!Xl(h)),E=(0,p.usePrevious)(h);h&&E!==h&&!Xl(h)&&!0!==_&&y(!0);const[w]=Ar("spacing.units"),S=(0,_l.__experimentalUseCustomUnits)({availableUnits:w||["px","em","rem"]});let C=null;!v&&!_&&void 0!==h&&(!Xl(h)||Xl(h)&&t)?(b=[...c,{name:t?(0,x.__)("Mixed"):(0,x.sprintf)((0,x.__)("Custom (%s)"),h),slug:"custom",size:h}],C=b.length-1):t||(C=_?Ql(h,c):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":ti(e),o=t.findIndex((e=>String(e.slug)===n));return-1!==o?o:NaN}(h,c));const B=(0,u.useMemo)((()=>(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(C)),[C])[1]||S[0]?.value,I=parseFloat(C,10),T=(e,t)=>{const n=parseInt(e,10);if("selectList"===t){if(0===n)return;if(1===n)return"0"}else if(0===n)return"0";return`var:preset|spacing|${c[e]?.slug}`},M=t?(0,x.__)("Mixed"):null,P=b.map(((e,t)=>({key:t,name:e.name}))),R=c.map(((e,t)=>({value:t,label:void 0}))),N=Wl.includes(a)&&i?ql[a]:"",L=i?m?.toLowerCase():m,A=(0,x.sprintf)((0,x.__)("%1$s %2$s"),N,L).trim();return(0,s.createElement)(_l.__experimentalHStack,{className:"spacing-sizes-control__wrapper"},e&&(0,s.createElement)(_l.Icon,{className:"spacing-sizes-control__icon",icon:e,size:24}),_&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.__experimentalUnitControl,{onMouseOver:l,onMouseOut:r,onFocus:l,onBlur:r,onChange:e=>o((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:C,units:S,min:n,placeholder:M,disableUnits:t,label:A,hideLabelFromVision:!0,className:"spacing-sizes-control__custom-value-input",size:"__unstable-large"}),(0,s.createElement)(_l.RangeControl,{onMouseOver:l,onMouseOut:r,onFocus:l,onBlur:r,value:I,min:0,max:null!==(g=Dp[B]?.max)&&void 0!==g?g:10,step:null!==(f=Dp[B]?.steps)&&void 0!==f?f:.1,withInputField:!1,onChange:e=>{o([e,B].join(""))},className:"spacing-sizes-control__custom-value-range",__nextHasNoMarginBottom:!0})),v&&!_&&(0,s.createElement)(_l.RangeControl,{onMouseOver:l,onMouseOut:r,className:"spacing-sizes-control__range-control",value:C,onChange:e=>o(T(e)),onMouseDown:e=>{e?.nativeEvent?.offsetX<35&&void 0===h&&o("0")},withInputField:!1,"aria-valuenow":C,"aria-valuetext":c[C]?.name,renderTooltipContent:e=>void 0===h?void 0:c[e]?.name,min:0,max:c.length-1,marks:R,label:A,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,onFocus:l,onBlur:r}),!v&&!_&&(0,s.createElement)(_l.CustomSelectControl,{className:"spacing-sizes-control__custom-select-control",value:P.find((e=>e.key===C))||"",onChange:e=>{o(T(e.selectedItem.key,"selectList"))},options:P,label:A,hideLabelFromVision:!0,__nextUnconstrainedWidth:!0,size:"__unstable-large",onMouseOver:l,onMouseOut:r,onFocus:l,onBlur:r}),!k&&(0,s.createElement)(_l.Button,{label:_?(0,x.__)("Use size preset"):(0,x.__)("Set custom size"),icon:Op,onClick:()=>{y(!_)},isPressed:_,size:"small",className:"spacing-sizes-control__custom-toggle",iconSize:24}))}const Vp=["vertical","horizontal"];function Fp({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:l,type:i,values:a}){const c=e=>n=>{if(!t)return;const o={...Object.keys(a).reduce(((e,t)=>(e[t]=Jl(a[t],l),e)),{})};"vertical"===e&&(o.top=n,o.bottom=n),"horizontal"===e&&(o.left=n,o.right=n),t(o)},u=r?.length?Vp.filter((e=>ni(r,e))):Vp;return(0,s.createElement)(s.Fragment,null,u.map((t=>{const r="vertical"===t?a.top:a.left;return(0,s.createElement)(zp,{key:`spacing-sizes-control-${t}`,icon:Zl[t],label:ql[t],minimumCustomValue:e,onChange:c(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:l,type:i,value:r,withInputField:!1})})))}function Hp({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:l,type:i,values:a}){const c=r?.length?Wl.filter((e=>r.includes(e))):Wl,u=e=>n=>{const o={...Object.keys(a).reduce(((e,t)=>(e[t]=Jl(a[t],l),e)),{})};o[e]=n,t(o)};return(0,s.createElement)(s.Fragment,null,c.map((t=>(0,s.createElement)(zp,{key:`spacing-sizes-control-${t}`,icon:Zl[t],label:ql[t],minimumCustomValue:e,onChange:u(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:l,type:i,value:a[t],withInputField:!1}))))}function Gp({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:l,spacingSizes:i,type:a,values:c}){return(0,s.createElement)(zp,{label:ql[l],minimumCustomValue:e,onChange:(u=l,e=>{const n={...Object.keys(c).reduce(((e,t)=>(e[t]=Jl(c[t],i),e)),{})};n[u]=e,t(n)}),onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:l,spacingSizes:i,type:a,value:c[l],withInputField:!1});var u}const Up=(0,s.createElement)(_l.Icon,{icon:uu,size:24});function $p({label:e,onChange:t,sides:n,value:o}){if(!n||!n.length)return;const r=function(e){if(!e||!e.length)return{};const t={},n=ni(e,"horizontal"),o=ni(e,"vertical");n&&o?t.axial={label:ql.axial,icon:Zl.axial}:n?t.axial={label:ql.horizontal,icon:Zl.horizontal}:o&&(t.axial={label:ql.vertical,icon:Zl.vertical});let r=0;return Wl.forEach((n=>{e.includes(n)&&(r+=1,t[n]={label:ql[n],icon:Zl[n]})})),r>1&&(t.custom={label:ql.custom,icon:Zl.custom}),t}(n),l=r[o].icon,{custom:i,...a}=r;return(0,s.createElement)(_l.DropdownMenu,{icon:l,label:e,className:"spacing-sizes-control__dropdown",toggleProps:{isSmall:!0}},(({onClose:e})=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.MenuGroup,null,Object.entries(a).map((([n,{label:r,icon:l}])=>{const i=o===n;return(0,s.createElement)(_l.MenuItem,{key:n,icon:l,iconPosition:"left",isSelected:i,role:"menuitemradio",onClick:()=>{t(n),e()},suffix:i?Up:void 0},r)}))),!!i&&(0,s.createElement)(_l.MenuGroup,null,(0,s.createElement)(_l.MenuItem,{icon:i.icon,iconPosition:"left",isSelected:o===Yl.custom,role:"menuitemradio",onClick:()=>{t(Yl.custom),e()},suffix:o===Yl.custom?Up:void 0},i.label)))))}function jp({inputProps:e,label:t,minimumCustomValue:n=0,onChange:o,onMouseOut:r,onMouseOver:l,showSideInLabel:i=!0,sides:a=Wl,useSelect:c,values:d}){const p=function(){const e=[{name:0,slug:"0",size:0}],[t]=Ar("spacing.spacingSizes");return t&&e.push(...t),e.length>8&&e.unshift({name:(0,x.__)("Default"),slug:"default",size:void 0}),e}(),m=d||Kl,h=1===a?.length,g=a?.includes("horizontal")&&a?.includes("vertical")&&2===a?.length,[f,b]=(0,u.useState)(function(e={},t){const{top:n,right:o,bottom:r,left:l}=e,i=[n,o,r,l].filter(Boolean),s=!(n!==r||l!==o||!n&&!l),a=!i.length&&function(e=[]){const t={top:0,right:0,bottom:0,left:0};return e.forEach((e=>t[e]+=1)),(t.top+t.bottom)%2==0&&(t.left+t.right)%2==0}(t);if(ni(t)&&(s||a))return Yl.axial;if(1===i.length){let t;return Object.entries(e).some((([e,n])=>(t=e,void 0!==n))),t}return 1!==t?.length||i.length?Yl.custom:t[0]}(m,a)),v={...e,minimumCustomValue:n,onChange:e=>{const t={...d,...e};o(t)},onMouseOut:r,onMouseOver:l,sides:a,spacingSizes:p,type:t,useSelect:c,values:m},k=Wl.includes(f)&&i?ql[f]:"",_=(0,x.sprintf)((0,x.__)("%1$s %2$s"),t,k).trim(),y=(0,x.sprintf)((0,x._x)("%s options","Button label to reveal side configuration options"),t);return(0,s.createElement)("fieldset",{className:"spacing-sizes-control"},(0,s.createElement)(_l.__experimentalHStack,{className:"spacing-sizes-control__header"},(0,s.createElement)(_l.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label"},_),!h&&!g&&(0,s.createElement)($p,{label:y,onChange:b,sides:a,value:f})),(0,s.createElement)(_l.__experimentalVStack,{spacing:.5},f===Yl.axial?(0,s.createElement)(Fp,{...v}):f===Yl.custom?(0,s.createElement)(Hp,{...v}):(0,s.createElement)(Gp,{side:f,...v,showSideInLabel:i})))}const Wp={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},svw:{max:100,step:1},lvw:{max:100,step:1},dvw:{max:100,step:1},svh:{max:100,step:1},lvh:{max:100,step:1},dvh:{max:100,step:1},vi:{max:100,step:1},svi:{max:100,step:1},lvi:{max:100,step:1},dvi:{max:100,step:1},vb:{max:100,step:1},svb:{max:100,step:1},lvb:{max:100,step:1},dvb:{max:100,step:1},vmin:{max:100,step:1},svmin:{max:100,step:1},lvmin:{max:100,step:1},dvmin:{max:100,step:1},vmax:{max:100,step:1},svmax:{max:100,step:1},lvmax:{max:100,step:1},dvmax:{max:100,step:1}};function Kp({label:e=(0,x.__)("Height"),onChange:t,value:n}){var o,r;const l=parseFloat(n),[i]=Ar("spacing.units"),a=(0,_l.__experimentalUseCustomUnits)({availableUnits:i||["%","px","em","rem","vh","vw"]}),c=(0,u.useMemo)((()=>(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(n)),[n])[1]||a[0]?.value||"px";return(0,s.createElement)("fieldset",{className:"block-editor-height-control"},(0,s.createElement)(_l.BaseControl.VisualLabel,{as:"legend"},e),(0,s.createElement)(_l.Flex,null,(0,s.createElement)(_l.FlexItem,{isBlock:!0},(0,s.createElement)(_l.__experimentalUnitControl,{value:n,units:a,onChange:t,onUnitChange:e=>{const[o,r]=(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(n);["em","rem"].includes(e)&&"px"===r?t((o/16).toFixed(2)+e):["em","rem"].includes(r)&&"px"===e?t(Math.round(16*o)+e):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(e)&&o>100&&t(100+e)},min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})),(0,s.createElement)(_l.FlexItem,{isBlock:!0},(0,s.createElement)(_l.__experimentalSpacer,{marginX:2,marginBottom:0},(0,s.createElement)(_l.RangeControl,{value:l,min:0,max:null!==(o=Wp[c]?.max)&&void 0!==o?o:100,step:null!==(r=Wp[c]?.step)&&void 0!==r?r:.1,withInputField:!1,onChange:e=>{t([e,c].join(""))},__nextHasNoMarginBottom:!0,label:e,hideLabelFromVision:!0})))))}function Zp(e,t){const{orientation:n="horizontal"}=t;return"fill"===e?(0,x.__)("Stretch to fill available space."):"fixed"===e&&"horizontal"===n?(0,x.__)("Specify a fixed width."):"fixed"===e?(0,x.__)("Specify a fixed height."):(0,x.__)("Fit contents.")}function qp({value:e={},onChange:t,parentLayout:n}){const{selfStretch:o,flexSize:r}=e;return(0,u.useEffect)((()=>{"fixed"!==o||r||t({...e,selfStretch:"fit"})}),[]),(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:Yp(n),value:o||"fit",help:Zp(o,n),onChange:n=>{const o="fixed"!==n?null:r;t({...e,selfStretch:n,flexSize:o})},isBlock:!0},(0,s.createElement)(_l.__experimentalToggleGroupControlOption,{key:"fit",value:"fit",label:(0,x.__)("Fit")}),(0,s.createElement)(_l.__experimentalToggleGroupControlOption,{key:"fill",value:"fill",label:(0,x.__)("Fill")}),(0,s.createElement)(_l.__experimentalToggleGroupControlOption,{key:"fixed",value:"fixed",label:(0,x.__)("Fixed")})),"fixed"===o&&(0,s.createElement)(_l.__experimentalUnitControl,{size:"__unstable-large",onChange:n=>{t({...e,flexSize:n})},value:r}))}function Yp(e){const{orientation:t="horizontal"}=e;return"horizontal"===t?(0,x.__)("Width"):(0,x.__)("Height")}const Xp=[{label:(0,x._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},{label:(0,x._x)("Square - 1:1","Aspect ratio option for dimensions control"),value:"1"},{label:(0,x._x)("Standard - 4:3","Aspect ratio option for dimensions control"),value:"4/3"},{label:(0,x._x)("Portrait - 3:4","Aspect ratio option for dimensions control"),value:"3/4"},{label:(0,x._x)("Classic - 3:2","Aspect ratio option for dimensions control"),value:"3/2"},{label:(0,x._x)("Classic Portrait - 2:3","Aspect ratio option for dimensions control"),value:"2/3"},{label:(0,x._x)("Wide - 16:9","Aspect ratio option for dimensions control"),value:"16/9"},{label:(0,x._x)("Tall - 9:16","Aspect ratio option for dimensions control"),value:"9/16"},{label:(0,x._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];function Qp({panelId:e,value:t,onChange:n=(()=>{}),options:o=Xp,defaultValue:r=Xp[0].value,hasValue:l,isShownByDefault:i=!0}){const a=null!=t?t:"auto";return(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:l||(()=>a!==r),label:(0,x.__)("Aspect ratio"),onDeselect:()=>n(void 0),isShownByDefault:i,panelId:e},(0,s.createElement)(_l.SelectControl,{label:(0,x.__)("Aspect ratio"),value:a,options:o,onChange:n,size:"__unstable-large",__nextHasNoMarginBottom:!0}))}const Jp=["horizontal","vertical"];function em(e){const t=tm(e),n=nm(e),o=om(e),r=rm(e),l=lm(e),i=im(e),s=sm(e),a=am(e);return"web"===u.Platform.OS&&(t||n||o||r||l||i||s||a)}function tm(e){return e?.layout?.contentSize}function nm(e){return e?.layout?.wideSize}function om(e){return e?.spacing?.padding}function rm(e){return e?.spacing?.margin}function lm(e){return e?.spacing?.blockGap}function im(e){return e?.dimensions?.minHeight}function sm(e){return e?.dimensions?.aspectRatio}function am(e){var t;const{type:n="default",default:{type:o="default"}={},allowSizingOnChildren:r=!1}=null!==(t=e?.parentLayout)&&void 0!==t?t:{},l=("flex"===o||"flex"===n)&&r;return!!e?.layout&&l}function cm(e,t){if(!t||!e)return e;const n={};return t.forEach((t=>{"vertical"===t&&(n.top=e.top,n.bottom=e.bottom),"horizontal"===t&&(n.left=e.left,n.right=e.right),n[t]=e?.[t]})),n}function um(e){return e&&"string"==typeof e?{top:e,right:e,bottom:e,left:e}:e}function dm({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){return(0,s.createElement)(_l.__experimentalToolsPanel,{label:(0,x.__)("Dimensions"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:Qr},r)}const pm={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,aspectRatio:!0,childLayout:!0};function mm({as:e=dm,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:l,defaultControls:i=pm,onVisualize:a=(()=>{}),includeLayoutControls:c=!1}){var d,p,m,h,g,f,b,v,k;const{dimensions:_,spacing:y}=r,E=e=>e&&"object"==typeof e?Object.keys(e).reduce(((t,n)=>(t[n]=el({settings:{dimensions:_,spacing:y}},"",e[n]),t)),{}):el({settings:{dimensions:_,spacing:y}},"",e),w=function(e){var t,n;const{custom:o,theme:r,default:l}=e?.spacing?.spacingSizes||{};return(null!==(t=null!==(n=null!=o?o:r)&&void 0!==n?n:l)&&void 0!==t?t:[]).length>0}(r),S=(0,_l.__experimentalUseCustomUnits)({availableUnits:r?.spacing?.units||["%","px","em","rem","vw"]}),C=tm(r)&&c,B=E(o?.layout?.contentSize),I=e=>{n(jn(t,["layout","contentSize"],e||void 0))},T=nm(r)&&c,M=E(o?.layout?.wideSize),P=e=>{n(jn(t,["layout","wideSize"],e||void 0))},R=om(r),N=um(E(o?.spacing?.padding)),L=Array.isArray(r?.spacing?.padding)?r?.spacing?.padding:r?.spacing?.padding?.sides,A=L&&L.some((e=>Jp.includes(e))),O=e=>{const o=cm(e,L);n(jn(t,["spacing","padding"],o))},D=()=>a("padding"),z=rm(r),V=um(E(o?.spacing?.margin)),F=Array.isArray(r?.spacing?.margin)?r?.spacing?.margin:r?.spacing?.margin?.sides,H=F&&F.some((e=>Jp.includes(e))),G=e=>{const o=cm(e,F);n(jn(t,["spacing","margin"],o))},U=()=>a("margin"),$=lm(r),j=E(o?.spacing?.blockGap),W=function(e){return e&&"string"==typeof e?{top:e}:e?{...e,right:e?.left,bottom:e?.top}:e}(j),K=Array.isArray(r?.spacing?.blockGap)?r?.spacing?.blockGap:r?.spacing?.blockGap?.sides,Z=K&&K.some((e=>Jp.includes(e))),q=e=>{n(jn(t,["spacing","blockGap"],e))},Y=e=>{e||q(null),!Z&&e?.hasOwnProperty("top")?q(e.top):q({top:e?.top,left:e?.left})},X=im(r),Q=E(o?.dimensions?.minHeight),J=e=>{const o=jn(t,["dimensions","minHeight"],e);n(jn(o,["dimensions","aspectRatio"],void 0))},ee=sm(r),te=E(o?.dimensions?.aspectRatio),ne=am(r),oe=o?.layout,{orientation:re="horizontal"}=null!==(d=r?.parentLayout)&&void 0!==d?d:{},le="horizontal"===re?(0,x.__)("Width"):(0,x.__)("Height"),ie=e=>{n({...t,layout:{...t?.layout,...e}})},se=(0,u.useCallback)((e=>({...e,layout:hl({...e?.layout,contentSize:void 0,wideSize:void 0,selfStretch:void 0,flexSize:void 0}),spacing:{...e?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...e?.dimensions,minHeight:void 0,aspectRatio:void 0}})),[]),ae=()=>a(!1);return(0,s.createElement)(e,{resetAllFilter:se,value:t,onChange:n,panelId:l},(C||T)&&(0,s.createElement)("span",{className:"span-columns"},(0,x.__)("Set the width of the main content area.")),C&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Content size"),hasValue:()=>!!t?.layout?.contentSize,onDeselect:()=>I(void 0),isShownByDefault:null!==(p=i.contentSize)&&void 0!==p?p:pm.contentSize,panelId:l},(0,s.createElement)(_l.__experimentalHStack,{alignment:"flex-end",justify:"flex-start"},(0,s.createElement)(_l.__experimentalUnitControl,{label:(0,x.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:B||"",onChange:e=>{I(e)},units:S}),(0,s.createElement)(_l.__experimentalView,null,(0,s.createElement)(Ti,{icon:Mi})))),T&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Wide size"),hasValue:()=>!!t?.layout?.wideSize,onDeselect:()=>P(void 0),isShownByDefault:null!==(m=i.wideSize)&&void 0!==m?m:pm.wideSize,panelId:l},(0,s.createElement)(_l.__experimentalHStack,{alignment:"flex-end",justify:"flex-start"},(0,s.createElement)(_l.__experimentalUnitControl,{label:(0,x.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:M||"",onChange:e=>{P(e)},units:S}),(0,s.createElement)(_l.__experimentalView,null,(0,s.createElement)(Ti,{icon:Pi})))),R&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,label:(0,x.__)("Padding"),onDeselect:()=>O(void 0),isShownByDefault:null!==(h=i.padding)&&void 0!==h?h:pm.padding,className:ml()({"tools-panel-item-spacing":w}),panelId:l},!w&&(0,s.createElement)(_l.__experimentalBoxControl,{values:N,onChange:O,label:(0,x.__)("Padding"),sides:L,units:S,allowReset:!1,splitOnAxis:A,onMouseOver:D,onMouseOut:ae}),w&&(0,s.createElement)(jp,{values:N,onChange:O,label:(0,x.__)("Padding"),sides:L,units:S,allowReset:!1,onMouseOver:D,onMouseOut:ae})),z&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,label:(0,x.__)("Margin"),onDeselect:()=>G(void 0),isShownByDefault:null!==(g=i.margin)&&void 0!==g?g:pm.margin,className:ml()({"tools-panel-item-spacing":w}),panelId:l},!w&&(0,s.createElement)(_l.__experimentalBoxControl,{values:V,onChange:G,label:(0,x.__)("Margin"),sides:F,units:S,allowReset:!1,splitOnAxis:H,onMouseOver:U,onMouseOut:ae}),w&&(0,s.createElement)(jp,{values:V,onChange:G,label:(0,x.__)("Margin"),sides:F,units:S,allowReset:!1,onMouseOver:U,onMouseOut:ae})),$&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.blockGap,label:(0,x.__)("Block spacing"),onDeselect:()=>q(void 0),isShownByDefault:null!==(f=i.blockGap)&&void 0!==f?f:pm.blockGap,className:ml()({"tools-panel-item-spacing":w}),panelId:l},!w&&(Z?(0,s.createElement)(_l.__experimentalBoxControl,{label:(0,x.__)("Block spacing"),min:0,onChange:Y,units:S,sides:K,values:W,allowReset:!1,splitOnAxis:Z}):(0,s.createElement)(_l.__experimentalUnitControl,{label:(0,x.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:q,units:S,value:j})),w&&(0,s.createElement)(jp,{label:(0,x.__)("Block spacing"),min:0,onChange:Y,showSideInLabel:!1,sides:Z?K:["top"],values:W,allowReset:!1})),X&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:()=>!!t?.dimensions?.minHeight,label:(0,x.__)("Minimum height"),onDeselect:()=>{J(void 0)},isShownByDefault:null!==(b=i.minHeight)&&void 0!==b?b:pm.minHeight,panelId:l},(0,s.createElement)(Kp,{label:(0,x.__)("Minimum height"),value:Q,onChange:J})),ee&&(0,s.createElement)(Qp,{hasValue:()=>!!t?.dimensions?.aspectRatio,value:te,onChange:e=>{const o=jn(t,["dimensions","aspectRatio"],e);n(jn(o,["dimensions","minHeight"],void 0))},panelId:l,isShownByDefault:null!==(v=i.aspectRatio)&&void 0!==v?v:pm.aspectRatio}),ne&&(0,s.createElement)(_l.__experimentalVStack,{as:_l.__experimentalToolsPanelItem,spacing:2,hasValue:()=>!!t?.layout,label:le,onDeselect:()=>{ie({selfStretch:void 0,flexSize:void 0})},isShownByDefault:null!==(k=i.childLayout)&&void 0!==k?k:pm.childLayout,panelId:l},(0,s.createElement)(qp,{value:oe,onChange:ie,parentLayout:r?.parentLayout})))}const hm=function(e){return(0,p.useRefEffect)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:o}=t;e.current.scrollBy(n,o)}const o={passive:!0};return t.addEventListener("wheel",n,o),()=>{t.removeEventListener("wheel",n,o)}}),[e])},gm=Number.MAX_SAFE_INTEGER;const fm=(0,u.forwardRef)((function({clientId:e,bottomClientId:t,children:n,__unstableRefreshSize:o,__unstableCoverTarget:r=!1,__unstablePopoverSlot:l,__unstableContentRef:i,shift:a=!0,...c},d){const m=bd(e),h=bd(null!=t?t:e),g=(0,p.useMergeRefs)([d,hm(i)]),[f,b]=(0,u.useReducer)((e=>(e+1)%gm),0);(0,u.useLayoutEffect)((()=>{if(!m)return;const e=new window.MutationObserver(b);return e.observe(m,{attributes:!0}),()=>{e.disconnect()}}),[m]);const v=(0,u.useMemo)((()=>f<0||!m||h!==m?{}:{position:"absolute",width:m.offsetWidth,height:m.offsetHeight}),[m,h,o,f]),k=(0,u.useMemo)((()=>{if(!(f<0||!m||t&&!h))return{getBoundingClientRect(){var e,t,n,o;const r=m.getBoundingClientRect(),l=h?.getBoundingClientRect(),i=Math.min(r.left,null!==(e=l?.left)&&void 0!==e?e:1/0),s=Math.min(r.top,null!==(t=l?.top)&&void 0!==t?t:1/0),a=Math.max(r.right,null!==(n=l.right)&&void 0!==n?n:-1/0)-i,c=Math.max(r.bottom,null!==(o=l.bottom)&&void 0!==o?o:-1/0)-s;return new window.DOMRect(i,s,a,c)},contextElement:m}}),[t,h,m,f]);return!m||t&&!h?null:(0,s.createElement)(_l.Popover,{ref:g,animate:!1,focusOnMount:!1,anchor:k,__unstableSlotName:l,inline:!l,placement:"top-start",resize:!1,flip:!1,shift:a,...c,className:ml()("block-editor-block-popover",c.className),variant:"unstyled"},r&&(0,s.createElement)("div",{style:v},n),!r&&n)}));function bm(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function vm({clientId:e,attributes:t,forceShow:n}){const o=bd(e),[r,l]=(0,u.useState)(),i=t?.style?.spacing?.margin;(0,u.useEffect)((()=>{if(!o||null===o.ownerDocument.defaultView)return;const e=bm(o,"margin-top"),t=bm(o,"margin-right"),n=bm(o,"margin-bottom"),r=bm(o,"margin-left");l({borderTopWidth:e,borderRightWidth:t,borderBottomWidth:n,borderLeftWidth:r,top:e?`-${e}`:0,right:t?`-${t}`:0,bottom:n?`-${n}`:0,left:r?`-${r}`:0})}),[o,i]);const[a,c]=(0,u.useState)(!1),d=(0,u.useRef)(i),p=(0,u.useRef)();return(0,u.useEffect)((()=>(js()(i,d.current)||n||(c(!0),d.current=i,p.current=setTimeout((()=>{c(!1)}),400)),()=>{c(!1),p.current&&window.clearTimeout(p.current)})),[i,n]),a||n?(0,s.createElement)(fm,{clientId:e,__unstableCoverTarget:!0,__unstableRefreshSize:i,__unstablePopoverSlot:"block-toolbar",shift:!1},(0,s.createElement)("div",{className:"block-editor__padding-visualizer",style:r})):null}function km(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function _m({clientId:e,value:t,forceShow:n}){const o=bd(e),[r,l]=(0,u.useState)(),i=t?.spacing?.padding;(0,u.useEffect)((()=>{o&&null!==o.ownerDocument.defaultView&&l({borderTopWidth:km(o,"padding-top"),borderRightWidth:km(o,"padding-right"),borderBottomWidth:km(o,"padding-bottom"),borderLeftWidth:km(o,"padding-left")})}),[o,i]);const[a,c]=(0,u.useState)(!1),d=(0,u.useRef)(i),p=(0,u.useRef)();return(0,u.useEffect)((()=>(js()(i,d.current)||n||(c(!0),d.current=i,p.current=setTimeout((()=>{c(!1)}),400)),()=>{c(!1),p.current&&window.clearTimeout(p.current)})),[i,n]),a||n?(0,s.createElement)(fm,{clientId:e,__unstableCoverTarget:!0,__unstableRefreshSize:i,__unstablePopoverSlot:"block-toolbar",shift:!1},(0,s.createElement)("div",{className:"block-editor__padding-visualizer",style:r})):null}const ym="dimensions",Em="spacing";function wm({children:e,resetAllFilter:t}){const n=(0,u.useCallback)((e=>{const n=e.style,o=t(n);return{...e,style:o}}),[t]);return(0,s.createElement)(Bs,{group:"dimensions",resetAllFilter:n},e)}function Sm({clientId:e,name:t,setAttributes:n,settings:o}){const r=em(o),l=(0,d.useSelect)((t=>t(Nr).getBlockAttributes(e)?.style),[e]),[i,a]=function(){const[e,t]=(0,u.useState)(!1),{hideBlockInterface:n,showBlockInterface:o}=ie((0,d.useDispatch)(Nr));return(0,u.useEffect)((()=>{e?n():o()}),[e,o,n]),[e,t]}();if(!r)return null;const p={...(0,c.getBlockSupport)(t,[ym,"__experimentalDefaultControls"]),...(0,c.getBlockSupport)(t,[Em,"__experimentalDefaultControls"])};return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(mm,{as:wm,panelId:e,settings:o,value:l,onChange:e=>{n({style:hl(e)})},defaultControls:p,onVisualize:a}),!!o?.spacing?.padding&&(0,s.createElement)(_m,{forceShow:"padding"===i,clientId:e,value:l}),!!o?.spacing?.margin&&(0,s.createElement)(vm,{forceShow:"margin"===i,clientId:e,value:l}))}function Cm(e,t="any"){if("web"!==u.Platform.OS)return!1;const n=(0,c.getBlockSupport)(e,ym);return!0===n||("any"===t?!(!n?.aspectRatio&&!n?.minHeight):!!n?.[t])}const xm={useBlockProps:function({name:e,minHeight:t,style:n}){if(!Cm(e,"aspectRatio")||fl(e,ym,"aspectRatio"))return{};const o=ml()({"has-aspect-ratio":!!n?.dimensions?.aspectRatio}),r={};n?.dimensions?.aspectRatio?r.minHeight="unset":(t||n?.dimensions?.minHeight)&&(r.aspectRatio="unset");return{className:o,style:r}},attributeKeys:["minHeight","style"],hasSupport:e=>Cm(e,"aspectRatio")};function Bm(){w()("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}const Im=[...Pp,Iu,_d,ym,tc,Em,Tu],Tm=e=>Im.some((t=>(0,c.hasBlockSupport)(e,t)));function Mm(e={}){const t={};return(0,Ri.getCSSRules)(e).forEach((e=>{t[e.key]=e.value})),t}const Pm={[`${Iu}.__experimentalSkipSerialization`]:["border"],[`${_d}.__experimentalSkipSerialization`]:[_d],[`${Mp}.__experimentalSkipSerialization`]:[Mp],[`${ym}.__experimentalSkipSerialization`]:[ym],[`${Em}.__experimentalSkipSerialization`]:[Em],[`${Tu}.__experimentalSkipSerialization`]:[Tu]},Rm={...Pm,[`${ym}.aspectRatio`]:[`${ym}.aspectRatio`],[`${tc}`]:[tc]},Nm={[`${ym}.aspectRatio`]:!0,[`${tc}`]:!0},Lm={gradients:"gradient"};function Am(e,t,n=!1){if(!e)return e;let o=e;return n||(o=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;Am(o[t],[n],!0)}else 1===e.length&&delete o[e[0]]})),o}function Om(e,t,n,o=Rm){if(!Tm(t))return e;let{style:r}=n;return Object.entries(o).forEach((([e,n])=>{const o=Nm[e]||(0,c.getBlockSupport)(t,e);!0===o&&(r=Am(r,n)),Array.isArray(o)&&o.forEach((e=>{const t=Lm[e]||e;r=Am(r,[[...n,t]])}))})),e.style={...Mm(r),...e.style},e}const Dm={edit:function({clientId:e,name:t,setAttributes:n,__unstableParentLayout:o}){const r={clientId:e,name:t,setAttributes:n,settings:vl(t,o)};return"default"!==ns()?null:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Md,{...r}),(0,s.createElement)(pc,{...r}),(0,s.createElement)(Ap,{...r}),(0,s.createElement)(Ou,{...r}),(0,s.createElement)(Sm,{...r}))},hasSupport:Tm,addSaveProps:Om,attributeKeys:["style"],useBlockProps:function e({name:t,style:n}){const o=`wp-elements-${(0,p.useInstanceId)(e)}`,r=`.editor-styles-wrapper .${o}`,l=n?.elements,i=(0,u.useMemo)((()=>{if(!l)return;const e=[];return zm.forEach((({elementType:n,pseudo:o,elements:i})=>{if(fl(t,_d,n))return;const s=l?.[n];if(s){const t=tl(r,c.__EXPERIMENTAL_ELEMENTS[n]);e.push((0,Ri.compileCSS)(s,{selector:t})),o&&o.forEach((t=>{s[t]&&e.push((0,Ri.compileCSS)(s[t],{selector:tl(r,`${c.__EXPERIMENTAL_ELEMENTS[n]}${t}`)}))}))}i&&i.forEach((t=>{l[t]&&e.push((0,Ri.compileCSS)(l[t],{selector:tl(r,c.__EXPERIMENTAL_ELEMENTS[t])}))}))})),e.length>0?e.join(""):void 0}),[r,l,t]);return bl({css:i}),Om({className:o},t,{style:n},Pm)}},zm=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}];(0,m.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Tm(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e}));(0,m.addFilter)("blocks.registerBlockType","core/settings/addAttribute",(function(e){return t=e,(0,c.hasBlockSupport)(t,"__experimentalSettings",!1)?(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e;var t}));const Vm=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"}));const Fm=function e({id:t,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:l,value:i,onChange:a}){let c;c="unset"===i?(0,s.createElement)(_l.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):i?(0,s.createElement)(_l.DuotoneSwatch,{values:i}):(0,s.createElement)(Ti,{icon:Vm});const u=(0,x.__)("Apply duotone filter"),d=`${(0,p.useInstanceId)(e,"duotone-control",t)}__description`;return(0,s.createElement)(_l.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,x.__)("Duotone")},renderToggle:({isOpen:e,onToggle:t})=>(0,s.createElement)(_l.ToolbarButton,{showTooltip:!0,onClick:t,"aria-haspopup":"true","aria-expanded":e,onKeyDown:n=>{e||n.keyCode!==zs.DOWN||(n.preventDefault(),t())},label:u,icon:c}),renderContent:()=>(0,s.createElement)(_l.MenuGroup,{label:(0,x.__)("Duotone")},(0,s.createElement)("p",null,(0,x.__)("Create a two-tone color effect without losing your original image.")),(0,s.createElement)(_l.DuotonePicker,{"aria-label":u,"aria-describedby":d,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:l,value:i,onChange:a}))})};function Hm(e){return`${e}{filter:none}`}function Gm(e,t){return`${e}{filter:url(#${t})}`}function Um(e,t){const n=function(e=[]){const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=Vc(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}(t);return`\n<svg\n\txmlns:xlink="http://www.w3.org/1999/xlink"\n\tviewBox="0 0 0 0"\n\twidth="0"\n\theight="0"\n\tfocusable="false"\n\trole="none"\n\taria-hidden="true"\n\tstyle="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"\n>\n\t<defs>\n\t\t<filter id="${e}">\n\t\t\t\x3c!--\n\t\t\t\tUse sRGB instead of linearRGB so transparency looks correct.\n\t\t\t\tUse perceptual brightness to convert to grayscale.\n\t\t\t--\x3e\n\t\t\t<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>\n\t\t\t\x3c!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. --\x3e\n\t\t\t<feComponentTransfer color-interpolation-filters="sRGB">\n\t\t\t\t<feFuncR type="table" tableValues="${n.r.join(" ")}"></feFuncR>\n\t\t\t\t<feFuncG type="table" tableValues="${n.g.join(" ")}"></feFuncG>\n\t\t\t\t<feFuncB type="table" tableValues="${n.b.join(" ")}"></feFuncB>\n\t\t\t\t<feFuncA type="table" tableValues="${n.a.join(" ")}"></feFuncA>\n\t\t\t</feComponentTransfer>\n\t\t\t\x3c!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. --\x3e\n\t\t\t<feComposite in2="SourceGraphic" operator="in"></feComposite>\n\t\t</filter>\n\t</defs>\n</svg>`}function $m(e,t="root",n={}){if(!t)return null;const{fallback:o=!1}=n,{name:r,selectors:l,supports:i}=e,s=l&&Object.keys(l).length>0,a=Array.isArray(t)?t.join("."):t;let c=null;if(c=s&&l.root?l?.root:i?.__experimentalSelector?i.__experimentalSelector:".wp-block-"+r.replace("core/","").replace("/","-"),"root"===a)return c;const u=Array.isArray(t)?t:t.split(".");if(1===u.length){const e=o?c:null;if(s){return Wn(l,`${a}.root`,null)||Wn(l,a,null)||e}const t=Wn(i,`${a}.__experimentalSelector`,null);return t?tl(c,t):e}let d;return s&&(d=Wn(l,a,null)),d||(o?$m(e,u[0],n):null)}const jm=[];function Wm(e,{presetSetting:t,defaultSetting:n}){const o=!e?.color?.[n],r=e?.color?.[t]?.custom||jm,l=e?.color?.[t]?.theme||jm,i=e?.color?.[t]?.default||jm;return(0,u.useMemo)((()=>[...r,...l,...o?jm:i]),[o,r,l,i])}function Km(e){return Zm(e)}function Zm(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function qm({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){return(0,s.createElement)(_l.__experimentalToolsPanel,{label:(0,x._x)("Filters","Name for applying graphical effects"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:Qr},r)}const Ym={duotone:!0},Xm={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,x.__)("Duotone")},Qm=({indicator:e,label:t})=>(0,s.createElement)(_l.__experimentalHStack,{justify:"flex-start"},(0,s.createElement)(_l.__experimentalZStack,{isLayered:!1,offset:-8},(0,s.createElement)(_l.Flex,{expanded:!1},"unset"!==e&&e?(0,s.createElement)(_l.DuotoneSwatch,{values:e}):(0,s.createElement)(_l.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}))),(0,s.createElement)(_l.FlexItem,{title:t},t));function Jm({as:e=qm,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:l,defaultControls:i=Ym}){const a=Zm(r),c=Wm(r,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),d=Wm(r,{presetSetting:"palette",defaultSetting:"defaultPalette"}),p=(m=o?.filter?.duotone,el({settings:r},"",m));var m;const h=e=>{const o=c.find((({colors:t})=>t===e)),r=o?`var:preset|duotone|${o.slug}`:e;n(jn(t,["filter","duotone"],r))},g=(0,u.useCallback)((e=>({...e,filter:{...e.filter,duotone:void 0}})),[]);return(0,s.createElement)(e,{resetAllFilter:g,value:t,onChange:n,panelId:l},a&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{label:(0,x.__)("Duotone"),hasValue:()=>!!t?.filter?.duotone,onDeselect:()=>h(void 0),isShownByDefault:i.duotone,panelId:l},(0,s.createElement)(_l.Dropdown,{popoverProps:Xm,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:({onToggle:e,isOpen:t})=>{const n={onClick:e,className:ml()({"is-open":t}),"aria-expanded":t};return(0,s.createElement)(_l.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,s.createElement)(_l.Button,{...n},(0,s.createElement)(Qm,{indicator:p,label:(0,x.__)("Duotone")})))},renderContent:()=>(0,s.createElement)(_l.__experimentalDropdownContentWrapper,{paddingSize:"small"},(0,s.createElement)(_l.MenuGroup,{label:(0,x.__)("Duotone")},(0,s.createElement)("p",null,(0,x.__)("Create a two-tone color effect without losing your original image.")),(0,s.createElement)(_l.DuotonePicker,{colorPalette:d,duotonePalette:c,disableCustomColors:!0,disableCustomDuotone:!0,value:p,onChange:h})))})))}const eh=[],th=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");function nh({presetSetting:e,defaultSetting:t}){const[n,o,r,l]=Ar(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,u.useMemo)((()=>[...o||eh,...r||eh,...n&&l||eh]),[n,o,r,l])}function oh(e,t){if(!e)return;const n=t?.find((({slug:t})=>e===`var:preset|duotone|${t}`));return n?n.colors:void 0}Hc([Gc]);const rh={shareWithChildBlocks:!0,edit:function({style:e,setAttributes:t,name:n}){const o=e?.color?.duotone,r=vl(n),l=ns(),i=nh({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=nh({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[c,u]=Ar("color.custom","color.customDuotone"),d=!c,p=!u||0===a?.length&&d;if(0===i?.length&&p)return null;if("default"!==l)return null;const m=Array.isArray(o)?o:oh(o,i);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Bs,{group:"filter"},(0,s.createElement)(Jm,{value:{filter:{duotone:m}},onChange:n=>{const o={...e,color:{...n?.filter}};t({style:o})},settings:r})),(0,s.createElement)(Bl,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(Fm,{duotonePalette:i,colorPalette:a,disableCustomDuotone:p,disableCustomColors:d,value:m,onChange:n=>{const o=function(e,t){if(!e||!Array.isArray(e))return;const n=t?.find((t=>t?.colors?.every(((t,n)=>t===e[n]))));return n?`var:preset|duotone|${n.slug}`:void 0}(n,i),r={...e,color:{...e?.color,duotone:null!=o?o:n}};t({style:r})},settings:r})))},useBlockProps:function e({name:t,style:n}){const o=(0,p.useInstanceId)(e),r=(0,u.useMemo)((()=>{const e=(0,c.getBlockType)(t);if(e){if(!(0,c.getBlockSupport)(e,"filter.duotone",!1))return null;const t=(0,c.getBlockSupport)(e,"color.__experimentalDuotone",!1);if(t){const n=$m(e);return"string"==typeof t?tl(n,t):n}return $m(e,"filter.duotone",{fallback:!0})}}),[t]),l=n?.color?.duotone,i=`wp-duotone-${o}`,s=r&&l;return lh({clientId:o,id:i,selector:r,attribute:l}),{className:s?i:""}},attributeKeys:["style"],hasSupport:e=>(0,c.hasBlockSupport)(e,"filter.duotone")};function lh({clientId:e,id:t,selector:n,attribute:o}){const r=nh({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),l=Array.isArray(o),i=l?void 0:oh(o,r),s="string"==typeof o&&i;let a=null;s?a=i:("string"==typeof o&&!s||l)&&(a=o);const c=n.split(",").map((e=>`.${t}${e.trim()}`)).join(", "),d=Array.isArray(a)||"unset"===a;bl(d?{css:"unset"!==a?Gm(c,t):Hm(c),__unstableType:"presets"}:void 0),bl(d?{assets:"unset"!==a?Um(t,a):"",__unstableType:"svgs"}:void 0);const p=bd(e);(0,u.useEffect)((()=>{if(d&&p&&th){const e=p.style.display;p.style.display="inline-block",p.offsetHeight,p.style.display=e}}),[d,p])}function ih(e){return(0,d.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o,__experimentalGetReusableBlockTitle:r}=t(Nr),{getBlockType:l,getActiveBlockVariation:i}=t(c.store),s=n(e),a=l(s);if(!a)return null;const u=o(e),d=i(s,u),p=(0,c.isReusableBlock)(a),m=(p?r(u.ref):void 0)||a.title,h=p||(0,c.isTemplatePart)(a),g=function(e){const t=e?.style?.position?.type;return"sticky"===t?(0,x.__)("Sticky"):"fixed"===t?(0,x.__)("Fixed"):null}(u),f={isSynced:h,title:m,icon:a.icon,description:a.description,anchor:u?.anchor,positionLabel:g,positionType:u?.style?.position?.type,name:u?.metadata?.name};return d?{isSynced:h,title:d.title||a.title,icon:d.icon||a.icon,description:d.description||a.description,anchor:u?.anchor,positionLabel:g,positionType:u?.style?.position?.type,name:u?.metadata?.name}:f}),[e])}(0,m.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,c.hasBlockSupport)(e,"filter.duotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e}));const{CustomSelectControl:sh}=ie(_l.privateApis),ah="position",ch="block-editor-hooks__position-selection__select-control__option",uh={key:"default",value:"",name:(0,x.__)("Default"),className:ch},dh={key:"sticky",value:"sticky",name:(0,x._x)("Sticky","Name for the value of the CSS position property"),className:ch,__experimentalHint:(0,x.__)("The block will stick to the top of the window instead of scrolling.")},ph={key:"fixed",value:"fixed",name:(0,x._x)("Fixed","Name for the value of the CSS position property"),className:ch,__experimentalHint:(0,x.__)("The block will not move when the page is scrolled.")},mh=["top","right","bottom","left"],hh=["sticky","fixed"];function gh(e){const t=e.style?.position?.type;return"sticky"===t||"fixed"===t}function fh({name:e}={}){const[t,n]=Ar("position.fixed","position.sticky"),o=!t&&!n;return r=e,!(0,c.getBlockSupport)(r,ah)||o;var r}function bh({style:e={},clientId:t,name:n,setAttributes:o}){const r=function(e){const t=(0,c.getBlockSupport)(e,ah);return!(!0!==t&&!t?.fixed)}(n),l=function(e){const t=(0,c.getBlockSupport)(e,ah);return!(!0!==t&&!t?.sticky)}(n),i=e?.position?.type,{firstParentClientId:a}=(0,d.useSelect)((e=>{const{getBlockParents:n}=e(Nr),o=n(t);return{firstParentClientId:o[o.length-1]}}),[t]),p=ih(a),m=l&&i===dh.value&&p?(0,x.sprintf)((0,x.__)("The block will stick to the scrollable area of the parent %s block."),p.title):null,h=(0,u.useMemo)((()=>{const e=[uh];return(l||i===dh.value)&&e.push(dh),(r||i===ph.value)&&e.push(ph),e}),[r,l,i]),g=i&&h.find((e=>e.value===i))||uh;return u.Platform.select({web:h.length>1?(0,s.createElement)(Bs,{group:"position"},(0,s.createElement)(_l.BaseControl,{className:"block-editor-hooks__position-selection",__nextHasNoMarginBottom:!0,help:m},(0,s.createElement)(sh,{__nextUnconstrainedWidth:!0,__next40pxDefaultSize:!0,className:"block-editor-hooks__position-selection__select-control",label:(0,x.__)("Position"),hideLabelFromVision:!0,describedBy:(0,x.sprintf)((0,x.__)("Currently selected position: %s"),g.name),options:h,value:g,__experimentalShowSelectedHint:!0,onChange:({selectedItem:t})=>{(t=>{const n={...e,position:{...e?.position,type:t,top:"sticky"===t||"fixed"===t?"0px":void 0}};o({style:hl(n)})})(t.value)},size:"__unstable-large"}))):null,native:null})}const vh={edit:function(e){return fh(e)?null:(0,s.createElement)(bh,{...e})},useBlockProps:function e({name:t,style:n}){const o=(0,c.hasBlockSupport)(t,ah),r=fh({name:t}),l=o&&!r,i=(0,p.useInstanceId)(e),s=`.wp-container-${i}.wp-container-${i}`;let a;l&&(a=function({selector:e,style:t}){let n="";const{type:o}=t?.position||{};return hh.includes(o)?(n+=`${e} {`,n+=`position: ${o};`,mh.forEach((e=>{void 0!==t?.position?.[e]&&(n+=`${e}: ${t.position[e]};`)})),"sticky"!==o&&"fixed"!==o||(n+="z-index: 10"),n+="}",n):n}({selector:s,style:n})||"");const u=ml()({[`wp-container-${i}`]:l&&!!a,[`is-position-${n?.position?.type}`]:l&&!!a&&!!n?.position?.type});return bl({css:a}),{className:u}},attributeKeys:["style"],hasSupport:e=>(0,c.hasBlockSupport)(e,ah)};const kh="layout";function _h(e){return(0,c.hasBlockSupport)(e,"layout")||(0,c.hasBlockSupport)(e,"__experimentalLayout")}function yh(e={},t=""){const{kebabCase:n}=ie(_l.privateApis),o=(0,d.useSelect)((e=>{const{getSettings:t}=e(Nr);return t().__experimentalFeatures?.useRootPaddingAwareAlignments}),[]),{layout:r}=e,{default:l}=(0,c.getBlockSupport)(t,kh)||{},i=r?.inherit||r?.contentSize||r?.wideSize?{...r,type:"constrained"}:r||l||{},s=[];if(Al[i?.type||"default"]?.className){const e=Al[i?.type||"default"]?.className,n=t.split("/"),o=`wp-block-${"core"===n[0]?n.pop():n.join("-")}-${e}`;s.push(e,o)}return(i?.inherit||i?.contentSize||"constrained"===i?.type)&&o&&s.push("has-global-padding"),i?.orientation&&s.push(`is-${n(i.orientation)}`),i?.justifyContent&&s.push(`is-content-justification-${n(i.justifyContent)}`),i?.flexWrap&&"nowrap"===i.flexWrap&&s.push("is-nowrap"),s}const Eh={shareWithChildBlocks:!0,edit:function({layout:e,setAttributes:t,name:n}){const o=vl(n),{layout:r}=o,[l]=Ar("layout"),{themeSupportsLayout:i}=(0,d.useSelect)((e=>{const{getSettings:t}=e(Nr);return{themeSupportsLayout:t().supportsLayout}}),[]);if("default"!==ns())return null;const a=(0,c.getBlockSupport)(n,kh,{}),u={...r,...a},{allowSwitching:p,allowEditing:m=!0,allowInheriting:h=!0,default:g}=u;if(!m)return null;const f=!(!h||!l||e?.type&&"default"!==e?.type&&"constrained"!==e?.type&&!e?.inherit),b=e||g||{},{inherit:v=!1,type:k="default",contentSize:_=null}=b;if(("default"===k||"constrained"===k)&&!i)return null;const y=Vi(k),E=Vi("constrained"),w=!b.type&&(_||v),S=!!v||!!_,C=e=>t({layout:e});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Bs,null,(0,s.createElement)(_l.PanelBody,{title:(0,x.__)("Layout")},f&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-hooks__toggle-control",label:(0,x.__)("Inner blocks use content width"),checked:"constrained"===y?.name||S,onChange:()=>t({layout:{type:"constrained"===y?.name||S?"default":"constrained"}}),help:"constrained"===y?.name||S?(0,x.__)("Nested blocks use content width with options for full and wide widths."):(0,x.__)("Nested blocks will fill the width of this container. Toggle to constrain.")})),!v&&p&&(0,s.createElement)(wh,{type:k,onChange:e=>t({layout:{type:e}})}),y&&"default"!==y.name&&(0,s.createElement)(y.inspectorControls,{layout:b,onChange:C,layoutBlockSupport:u}),E&&w&&(0,s.createElement)(E.inspectorControls,{layout:b,onChange:C,layoutBlockSupport:u}))),!v&&y&&(0,s.createElement)(y.toolBarControls,{layout:b,onChange:C,layoutBlockSupport:a}))},attributeKeys:["layout"],hasSupport:e=>_h(e)};function wh({type:e,onChange:t}){return(0,s.createElement)(_l.ButtonGroup,null,zi.map((({name:n,label:o})=>(0,s.createElement)(_l.Button,{key:n,isPressed:e===n,onClick:()=>t(n)},o))))}function Sh({block:e,props:t}){const{name:n,attributes:o}=t,r=(0,p.useInstanceId)(e),{layout:l}=o,{default:i}=(0,c.getBlockSupport)(n,kh)||{},a=l?.inherit||l?.contentSize||l?.wideSize?{...l,type:"constrained"}:l||i||{},u=yh(o,n),{kebabCase:d}=ie(_l.privateApis),m=`wp-container-${d(n)}-is-layout-`,h=`.${m}${r}.${m}${r}`,[g]=Ar("spacing.blockGap"),f=null!==g,b=Vi(a?.type||"default"),v=b?.getLayoutStyle?.({blockName:n,selector:h,layout:a,style:o?.style,hasBlockGapSupport:f}),k=ml()({[`${m}${r}`]:!!v},u);return bl({css:v}),(0,s.createElement)(e,{...t,__unstableLayoutClassNames:k})}const Ch=(0,p.createHigherOrderComponent)((e=>t=>{const n=_h(t.name);return(0,d.useSelect)((e=>!!n&&!e(Nr).getSettings().disableLayoutStyles),[n])?(0,s.createElement)(Sh,{block:e,props:t}):(0,s.createElement)(e,{...t})}),"withLayoutStyles");(0,m.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.layout)&&void 0!==t?t:{})||_h(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,m.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",Ch);const xh={useBlockProps:function e({style:t}){var n;const o=(0,d.useSelect)((e=>!e(Nr).getSettings().disableLayoutStyles)),r=null!==(n=t?.layout)&&void 0!==n?n:{},{selfStretch:l,flexSize:i}=r,s=(0,p.useInstanceId)(e),a=`.wp-container-content-${s}`;let c="";if(o&&("fixed"===l&&i?c=`${a} {\n\t\t\t\tflex-basis: ${i};\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}`:"fill"===l&&(c=`${a} {\n\t\t\t\tflex-grow: 1;\n\t\t\t}`)),bl({css:c}),c)return{className:`wp-container-content-${s}`}},attributeKeys:["style"],hasSupport:()=>!0};function Bh(e){return(0,d.useSelect)((t=>{const{getBlocksByClientId:n,getSelectedBlockClientIds:o,isUngroupable:r,isGroupable:l}=t(Nr),{getGroupingBlockName:i,getBlockType:s}=t(c.store),a=e?.length?e:o(),u=n(a),[d]=u,p=1===a.length&&r(a[0]);return{clientIds:a,isGroupable:l(a),isUngroupable:p,blocksSelection:u,groupingBlockName:i(),onUngroup:p&&s(d.name)?.transforms?.ungroup}}),[e])}function Ih({clientIds:e,isGroupable:t,isUngroupable:n,onUngroup:o,blocksSelection:r,groupingBlockName:l,onClose:i=(()=>{})}){const{replaceBlocks:a}=(0,d.useDispatch)(Nr);return t||n?(0,s.createElement)(s.Fragment,null,t&&(0,s.createElement)(_l.MenuItem,{onClick:()=>{(()=>{const t=(0,c.switchToBlockType)(r,l);t&&a(e,t)})(),i()}},(0,x._x)("Group","verb")),n&&(0,s.createElement)(_l.MenuItem,{onClick:()=>{(()=>{let t=r[0].innerBlocks;t.length&&(o&&(t=o(r[0].attributes,r[0].innerBlocks)),a(e,t))})(),i()}},(0,x._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor "))):null}function Th(e){return(0,d.useSelect)((t=>{const{canEditBlock:n,canMoveBlock:o,canRemoveBlock:r,canLockBlockType:l,getBlockName:i,getBlockRootClientId:s,getTemplateLock:a}=t(Nr),c=s(e),u=n(e),d=o(e,c),p=r(e,c);return{canEdit:u,canMove:d,canRemove:p,canLock:l(i(e)),isContentLocked:"contentOnly"===a(e),isLocked:!u||!d||!p}}),[e])}const Mh=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.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"})),Ph=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.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"})),Rh=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.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"})),Nh=["core/block","core/navigation"];function Lh(e){return e.remove&&e.move?"all":!(!e.remove||e.move)&&"insert"}function Ah({clientId:e,onClose:t}){const[n,o]=(0,u.useState)({move:!1,remove:!1}),{canEdit:r,canMove:l,canRemove:i}=Th(e),{allowsEditLocking:a,templateLock:m,hasTemplateLock:h}=(0,d.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(Nr),r=n(e),l=(0,c.getBlockType)(r);return{allowsEditLocking:Nh.includes(r),templateLock:o(e)?.templateLock,hasTemplateLock:!!l?.attributes?.templateLock}}),[e]),[g,f]=(0,u.useState)(!!m),{updateBlockAttributes:b}=(0,d.useDispatch)(Nr),v=ih(e),k=(0,p.useInstanceId)(Ah,"block-editor-block-lock-modal__options-title");(0,u.useEffect)((()=>{o({move:!l,remove:!i,...a?{edit:!r}:{}})}),[r,l,i,a]);const _=Object.values(n).every(Boolean),y=Object.values(n).some(Boolean)&&!_;return(0,s.createElement)(_l.Modal,{title:(0,x.sprintf)((0,x.__)("Lock %s"),v.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t},(0,s.createElement)("p",null,(0,x.__)("Choose specific attributes to restrict or lock all available options.")),(0,s.createElement)("form",{onSubmit:o=>{o.preventDefault(),b([e],{lock:n,templateLock:g?Lh(n):void 0}),t()}},(0,s.createElement)("div",{role:"group","aria-labelledby":k,className:"block-editor-block-lock-modal__options"},(0,s.createElement)(_l.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__options-title",label:(0,s.createElement)("span",{id:k},(0,x.__)("Lock all")),checked:_,indeterminate:y,onChange:e=>o({move:e,remove:e,...a?{edit:e}:{}})}),(0,s.createElement)("ul",{className:"block-editor-block-lock-modal__checklist"},a&&(0,s.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,s.createElement)(_l.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Restrict editing"),checked:!!n.edit,onChange:e=>o((t=>({...t,edit:e})))}),(0,s.createElement)(_l.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.edit?Rh:Mh})),(0,s.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,s.createElement)(_l.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Disable movement"),checked:n.move,onChange:e=>o((t=>({...t,move:e})))}),(0,s.createElement)(_l.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.move?Rh:Mh})),(0,s.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,s.createElement)(_l.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Prevent removal"),checked:n.remove,onChange:e=>o((t=>({...t,remove:e})))}),(0,s.createElement)(_l.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.remove?Rh:Mh}))),h&&(0,s.createElement)(_l.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__template-lock",label:(0,x.__)("Apply to all blocks inside"),checked:g,disabled:n.move&&!n.remove,onChange:()=>f(!g)})),(0,s.createElement)(_l.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,s.createElement)(_l.FlexItem,null,(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:t},(0,x.__)("Cancel"))),(0,s.createElement)(_l.FlexItem,null,(0,s.createElement)(_l.Button,{variant:"primary",type:"submit"},(0,x.__)("Apply"))))))}function Oh({clientId:e}){const{canLock:t,isLocked:n}=Th(e),[o,r]=(0,u.useReducer)((e=>!e),!1);if(!t)return null;const l=n?(0,x.__)("Unlock"):(0,x.__)("Lock");return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.MenuItem,{icon:n?Mh:Ph,onClick:r,"aria-expanded":o,"aria-haspopup":"dialog"},l),o&&(0,s.createElement)(Ah,{clientId:e,onClose:r}))}const Dh=()=>{};const zh=(0,p.compose)([(0,d.withSelect)(((e,{clientId:t})=>{const{getBlock:n,getBlockMode:o,getSettings:r}=e(Nr),l=n(t),i=r().codeEditingEnabled;return{mode:o(t),blockType:l?(0,c.getBlockType)(l.name):null,isCodeEditingEnabled:i}})),(0,d.withDispatch)(((e,{onToggle:t=Dh,clientId:n})=>({onToggleMode(){e(Nr).toggleBlockMode(n),t()}})))])((function({blockType:e,mode:t,onToggleMode:n,small:o=!1,isCodeEditingEnabled:r=!0}){if(!e||!(0,c.hasBlockSupport)(e,"html",!0)||!r)return null;const l="visual"===t?(0,x.__)("Edit as HTML"):(0,x.__)("Edit visually");return(0,s.createElement)(_l.MenuItem,{onClick:n},!o&&l)}));function Vh(e){return 0===e?.trim()?.length}function Fh({blockName:e,originalBlockName:t,onClose:n,onSave:o}){const[r,l]=(0,u.useState)(e),i=r!==e,a=r===t,c=Vh(r),d=i||a,m=(0,p.useInstanceId)(Fh,"block-editor-rename-modal__description");return(0,s.createElement)(_l.Modal,{title:(0,x.__)("Rename"),onRequestClose:n,overlayClassName:"block-editor-block-rename-modal",aria:{describedby:m},focusOnMount:"firstContentElement"},(0,s.createElement)("p",{id:m},(0,x.__)("Enter a custom name for this block.")),(0,s.createElement)("form",{onSubmit:e=>{e.preventDefault(),d&&(()=>{const e=a||c?(0,x.sprintf)((0,x.__)('Block name reset to: "%s".'),r):(0,x.sprintf)((0,x.__)('Block name changed to: "%s".'),r);(0,vo.speak)(e,"assertive"),o(r),n()})()}},(0,s.createElement)(_l.__experimentalVStack,{spacing:"3"},(0,s.createElement)(_l.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:r,label:(0,x.__)("Block name"),hideLabelFromVision:!0,placeholder:t,onChange:l,onFocus:e=>e.target.select()}),(0,s.createElement)(_l.__experimentalHStack,{justify:"right"},(0,s.createElement)(_l.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:n},(0,x.__)("Cancel")),(0,s.createElement)(_l.Button,{__next40pxDefaultSize:!0,"aria-disabled":!d,variant:"primary",type:"submit"},(0,x.__)("Save"))))))}function Hh({clientId:e}){const[t,n]=(0,u.useState)(!1),{metadata:o}=(0,d.useSelect)((t=>{const{getBlockAttributes:n}=t(Nr),o=n(e)?.metadata;return{metadata:o}}),[e]),{updateBlockAttributes:r}=(0,d.useDispatch)(Nr),l=o?.name;const i=ih(e);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.MenuItem,{onClick:()=>{n(!0)},"aria-expanded":t,"aria-haspopup":"dialog"},(0,x.__)("Rename")),t&&(0,s.createElement)(Fh,{blockName:l||"",originalBlockName:i?.title,onClose:()=>n(!1),onSave:t=>{(t===i?.title||Vh(t))&&(t=void 0),function(t){r([e],{metadata:{...o&&o,name:t}})}(t)}}))}const{Fill:Gh,Slot:Uh}=(0,_l.createSlotFill)("BlockSettingsMenuControls");function $h({...e}){return(0,s.createElement)(_l.__experimentalStyleProvider,{document},(0,s.createElement)(Gh,{...e}))}$h.Slot=({fillProps:e,clientIds:t=null,__unstableDisplayLocation:n})=>{const{selectedBlocks:o,selectedClientIds:r}=(0,d.useSelect)((e=>{const{getBlockNamesByClientId:n,getSelectedBlockClientIds:o}=e(Nr),r=null!==t?t:o();return{selectedBlocks:n(r),selectedClientIds:r}}),[t]),{canLock:l}=Th(r[0]),{canRename:i}=(a=o[0],{canRename:(0,c.getBlockSupport)(a,"renaming",!0)});var a;const u=1===r.length&&l,m=1===r.length&&i,h=Bh(r),{isGroupable:g,isUngroupable:f}=h,b=g||f;return(0,s.createElement)(Uh,{fillProps:{...e,__unstableDisplayLocation:n,selectedBlocks:o,selectedClientIds:r}},(t=>!t?.length>0&&!b&&!u?null:(0,s.createElement)(_l.MenuGroup,null,b&&(0,s.createElement)(Ih,{...h,onClose:e?.onClose}),u&&(0,s.createElement)(Oh,{clientId:r[0]}),m&&(0,s.createElement)(Hh,{clientId:r[0]}),t,e?.canMove&&!e?.onlyBlock&&(0,s.createElement)(_l.MenuItem,{onClick:(0,p.pipe)(e?.onClose,e?.onMoveTo)},(0,x.__)("Move to")),1===e?.count&&(0,s.createElement)(zh,{clientId:e?.firstBlockClientId,onToggle:e?.onClose}))))};const jh=$h;const Wh={edit:function({clientId:e,isSelected:t}){const{getBlockListSettings:n,getSettings:o}=(0,d.useSelect)(Nr),{templateLock:r,isLockedByParent:l,isEditingAsBlocks:i}=(0,d.useSelect)((t=>{const{__unstableGetContentLockingParent:n,getTemplateLock:o,__unstableGetTemporarilyEditingAsBlocks:r}=t(Nr);return{templateLock:o(e),isLockedByParent:!!n(e),isEditingAsBlocks:r()===e}}),[e]),{updateSettings:a,updateBlockListSettings:c,__unstableSetTemporarilyEditingAsBlocks:p}=(0,d.useDispatch)(Nr),{stopEditingAsBlocks:m}=ie((0,d.useDispatch)(Nr)),h=!l&&"contentOnly"===r,{__unstableMarkNextChangeAsNotPersistent:g,updateBlockAttributes:f}=(0,d.useDispatch)(Nr),b=(0,u.useCallback)((()=>{m(e)}),[e,m]);if(!h&&!i)return null;const v=i&&!h,k=!i&&h&&t;return(0,s.createElement)(s.Fragment,null,v&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Bl,{group:"other"},(0,s.createElement)(_l.ToolbarButton,{onClick:b},(0,x.__)("Done")))),k&&(0,s.createElement)(jh,null,(({onClose:t})=>(0,s.createElement)(_l.MenuItem,{onClick:()=>{g(),f(e,{templateLock:void 0}),c(e,{...n(e),templateLock:!1});const r=o().focusMode;a({focusMode:!0}),p(e,r),t()}},(0,x.__)("Modify")))))},hasSupport:()=>!0},Kh="metadata";(0,m.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",(function(e){return e?.attributes?.[Kh]?.type||(e.attributes={...e.attributes,[Kh]:{type:"object"}}),e}));const Zh=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.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"}));const qh=(0,u.memo)((function({icon:e,showColors:t=!1,className:n,context:o}){"block-default"===e?.src&&(e={src:Zh});const r=(0,s.createElement)(_l.Icon,{icon:e&&e.src?e.src:e,context:o}),l=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,s.createElement)("span",{style:l,className:ml()("block-editor-block-icon",n,{"has-colors":t})},r)})),Yh={};const Xh={edit:function({name:e,clientId:t,metadata:{ignoredHookedBlocks:n=[]}={}}){const o=(0,d.useSelect)((e=>e(c.store).getBlockTypes()),[]),r=(0,u.useMemo)((()=>o?.filter((({name:t,blockHooks:o})=>o&&e in o||n.includes(t)))),[o,e,n]),{blockIndex:l,rootClientId:i,innerBlocksLength:a}=(0,d.useSelect)((e=>{const{getBlocks:n,getBlockIndex:o,getBlockRootClientId:r}=e(Nr);return{blockIndex:o(t),innerBlocksLength:n(t)?.length,rootClientId:r(t)}}),[t]),p=(0,d.useSelect)((n=>{const{getBlocks:o,getGlobalBlockCount:l}=n(Nr),s=r.reduce(((n,r)=>{if(0===l(r.name))return n;const s=r?.blockHooks?.[e];let a;switch(s){case"before":case"after":a=o(i);break;case"first_child":case"last_child":a=o(t);break;case void 0:a=[...o(i),...o(t)]}const c=a?.find((e=>e.name===r.name));return c?{...n,[r.name]:c.clientId}:n}),{});return Object.values(s).length>0?s:Yh}),[r,e,t,i]),{insertBlock:m,removeBlock:h}=(0,d.useDispatch)(Nr);if(!r.length)return null;const g=r.reduce(((e,t)=>{const[n]=t.name.split("/");return e[n]||(e[n]=[]),e[n].push(t),e}),{});return(0,s.createElement)(Bs,null,(0,s.createElement)(_l.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,x.__)("Plugins"),initialOpen:!0},(0,s.createElement)("p",{className:"block-editor-hooks__block-hooks-helptext"},(0,x.__)("Manage the inclusion of blocks added automatically by plugins.")),Object.keys(g).map((n=>(0,s.createElement)(u.Fragment,{key:n},(0,s.createElement)("h3",null,n),g[n].map((n=>{const o=n.name in p;return(0,s.createElement)(_l.ToggleControl,{checked:o,key:n.title,label:(0,s.createElement)(_l.__experimentalHStack,{justify:"flex-start"},(0,s.createElement)(qh,{icon:n.icon}),(0,s.createElement)("span",null,n.title)),onChange:()=>{if(o)h(p[n.name],!1);else{const o=n.blockHooks[e];((e,n)=>{switch(n){case"before":case"after":m(e,"after"===n?l+1:l,i,!1);break;case"first_child":case"last_child":m(e,"first_child"===n?0:a,t,!1);break;case void 0:m(e,l+1,i,!1)}})((0,c.createBlock)(n.name),o)}}})})))))))},attributeKeys:["metadata"],hasSupport:()=>!0};const Qh={edit:function({metadata:e,setAttributes:t}){return(0,s.createElement)(Bs,{group:"advanced"},(0,s.createElement)(_l.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,x.__)("Block name"),value:e?.name||"",onChange:n=>{t({metadata:{...e,name:n}})}}))},attributeKeys:["metadata"],hasSupport:e=>(0,c.hasBlockSupport)(e,"renaming",!0)};(0,m.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",(function(e){return e.__experimentalLabel||(0,c.hasBlockSupport)(e,"renaming",!0)&&(e.__experimentalLabel=(e,{context:t})=>{const{metadata:n}=e;if("list-view"===t&&n?.name)return n.name}),e}));const Jh={"core/paragraph":["content"],"core/heading":["content"],"core/image":["url","title","alt"],"core/button":["url","text","linkTarget"]};function eg(e){return e in Jh}const tg=({args:e,attrName:t,blockProps:n,source:o,onPropValueChange:r})=>{const{placeholder:l,value:i}=o.useSource(n,e),{name:s}=n,a=n.attributes[t],d=(0,u.useCallback)(((e,n)=>{if(n instanceof Y.RichTextData){if(n.toHTMLString()===e)return;e=Y.RichTextData.fromHTMLString(e)}n!==e&&r({[t]:e})}),[t,r]);return(0,u.useLayoutEffect)((()=>{if(void 0!==i)d(i,a);else if(l){const e=(0,c.getBlockType)(s).attributes[t].attribute;if("src"===e||"href"===e)return void d(null);d(l)}}),[d,i,a,l,s,t]),null};function ng({blockProps:e,bindings:t,onPropValueChange:n}){const o=ie((0,d.useSelect)(c.store)).getAllBlockBindingsSources();return(0,s.createElement)(s.Fragment,null,Object.entries(t).map((([t,r])=>{const l=o[r.source];return l?.useSource?(0,s.createElement)(tg,{key:t,attrName:t,source:l,blockProps:e,args:r.args,onPropValueChange:n}):null})))}const og=(0,p.createHigherOrderComponent)((e=>t=>{const[n,o]=(0,u.useState)({}),r=(0,u.useCallback)((e=>o((t=>({...t,...e})))),[]),l=Object.fromEntries(Object.entries(t.attributes.metadata?.bindings||{}).filter((([e])=>{return n=t.name,o=e,eg(n)&&Jh[n].includes(o);var n,o})));return(0,s.createElement)(s.Fragment,null,Object.keys(l).length>0&&(0,s.createElement)(ng,{blockProps:t,bindings:l,onPropValueChange:r}),(0,s.createElement)(e,{...t,attributes:{...t.attributes,...n}}))}),"withBlockBindingSupport");function rg(e){const t=e.style?.border||{};return{className:Fu(e)||void 0,style:Mm({border:t})}}function lg(e){const{colors:t}=qc(),n=rg(e),{borderColor:o}=e;if(o){const e=Pu({colors:t,namedColor:o});n.style.borderColor=e.color}return n}function ig(e){return{style:Mm({shadow:e.style?.shadow||""})}}function sg(e){const{backgroundColor:t,textColor:n,gradient:o,style:r}=e,l=Zc("background-color",t),i=Zc("color",n),s=Gu(o),a=s||r?.color?.gradient;return{className:ml()(i,s,{[l]:!a&&!!l,"has-text-color":n||r?.color?.text,"has-background":t||r?.color?.background||o||r?.color?.gradient,"has-link-color":r?.elements?.link?.color})||void 0,style:Mm({color:r?.color||{}})}}function ag(e){const{backgroundColor:t,textColor:n,gradient:o}=e,[r,l,i,s,a,c]=Ar("color.palette.custom","color.palette.theme","color.palette.default","color.gradients.custom","color.gradients.theme","color.gradients.default"),d=(0,u.useMemo)((()=>[...r||[],...l||[],...i||[]]),[r,l,i]),p=(0,u.useMemo)((()=>[...s||[],...a||[],...c||[]]),[s,a,c]),m=sg(e);if(t){const e=Wc(d,t);m.style.backgroundColor=e.color}if(o&&(m.style.background=Uu(p,o)),n){const e=Wc(d,n);m.style.color=e.color}return m}function cg(e){const{style:t}=e;return{style:Mm({spacing:t?.spacing||{}})}}function ug(e,t){const{kebabCase:n}=ie(_l.privateApis);let o=e?.style?.typography||{};const r=Zr(t);o={...o,fontSize:Wr({size:e?.style?.typography?.fontSize},r)};const l=Mm({typography:o}),i=e?.fontFamily?`has-${n(e.fontFamily)}-font-family`:"";return{className:ml()(i,Sp(e?.fontSize)),style:l}}function dg(e){const[t,n]=(0,u.useState)(e);return(0,u.useEffect)((()=>{e&&n(e)}),[e]),t}var pg;(0,m.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",(function(e,t){return eg(t)?{...e,edit:og(e.edit)}:e})),function(e){e=e.map((e=>({...e,Edit:(0,u.memo)(e.edit)})));const t=(0,p.createHigherOrderComponent)((t=>n=>{const o=y();return[...e.map(((e,t)=>{const{Edit:r,hasSupport:l,attributeKeys:i=[],shareWithChildBlocks:a}=e;if(!(o[h]||o[g]&&a)||!l(n.name))return null;const c={};for(const e of i)n.attributes[e]&&(c[e]=n.attributes[e]);return(0,s.createElement)(r,{key:t,name:n.name,isSelected:n.isSelected,clientId:n.clientId,setAttributes:n.setAttributes,__unstableParentLayout:n.__unstableParentLayout,...c})})),(0,s.createElement)(t,{key:"edit",...n})]}),"withBlockEditHooks");(0,m.addFilter)("editor.BlockEdit","core/editor/hooks",t)}([is,Ms,Ns,Dm,rh,vh,Eh,Wh,Xh,Qh].filter(Boolean)),function(e){const t=(0,p.createHigherOrderComponent)((t=>n=>{const[o,r]=(0,u.useState)(Array(e.length).fill(void 0));return[...e.map(((e,t)=>{const{hasSupport:o,attributeKeys:l=[],useBlockProps:i}=e,a={};for(const e of l)n.attributes[e]&&(a[e]=n.attributes[e]);return Object.keys(a).length&&o(n.name)?(0,s.createElement)(kl,{key:t,index:t,useBlockProps:i,setAllWrapperProps:r,name:n.name,...a}):null})),(0,s.createElement)(t,{key:"edit",...n,wrapperProps:o.filter(Boolean).reduce(((e,t)=>({...e,...t,className:ml()(e.className,t.className),style:{...e.style,...t.style}})),n.wrapperProps||{})})]}),"withBlockListBlockHooks");(0,m.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}([is,Dm,Pd,xm,rh,yp,Bp,Hu,vh,xh]),pg=[is,Ms,Rs,Ns,Hu,Pd,Dm,yp,Bp],(0,m.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",(function(e,t,n){return pg.reduce(((e,o)=>{const{hasSupport:r,attributeKeys:l=[],addSaveProps:i}=o,s={};for(const e of l)n[e]&&(s[e]=n[e]);return Object.keys(s).length&&r(t)?i(e,t,s):e}),e)}),0),(0,m.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",(e=>(e.hasOwnProperty("className")&&!e.className&&delete e.className,e)));const mg=([e,...t])=>e.toUpperCase()+t.join(""),hg=e=>(0,p.createHigherOrderComponent)((t=>n=>(0,s.createElement)(t,{...n,colors:e})),"withCustomColorPalette"),gg=()=>(0,p.createHigherOrderComponent)((e=>t=>{const[n,o,r]=Ar("color.palette.custom","color.palette.theme","color.palette.default"),l=(0,u.useMemo)((()=>[...n||[],...o||[],...r||[]]),[n,o,r]);return(0,s.createElement)(e,{...t,colors:l})}),"withEditorColorPalette");function fg(e,t){const{kebabCase:n}=ie(_l.privateApis),o=e.reduce(((e,t)=>({...e,..."string"==typeof t?{[t]:n(t)}:t})),{});return(0,p.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=Vc(t),o=({color:e})=>n.contrast(e),r=Math.max(...e.map(o));return e.find((e=>o(e)===r)).color}(t,e)}createSetters(){return Object.keys(o).reduce(((e,t)=>{const n=mg(t),o=`custom${n}`;return e[`set${n}`]=this.createSetColor(t,o),e}),{})}createSetColor(e,t){return n=>{const o=Kc(this.props.colors,n);this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps({attributes:e,colors:t},n){return Object.entries(o).reduce(((o,[r,l])=>{const i=Wc(t,e[r],e[`custom${mg(r)}`]),s=n[r],a=s?.color;return a===i.color&&s?o[r]=s:o[r]={...i,class:Zc(l,i.slug)},o}),{})}render(){return(0,s.createElement)(e,{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils})}}])}function bg(e){return(...t)=>{const n=hg(e);return(0,p.createHigherOrderComponent)(fg(t,n),"withCustomColors")}}function vg(...e){const t=gg();return(0,p.createHigherOrderComponent)(fg(e,t),"withColors")}const kg=function(e){const[t,n]=Ar("typography.fontSizes","typography.customFontSize");return(0,s.createElement)(_l.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!n})},_g=[],yg=([e,...t])=>e.toUpperCase()+t.join(""),Eg=(...e)=>{const t=e.reduce(((e,t)=>(e[t]=`custom${yg(t)}`,e)),{});return(0,p.createHigherOrderComponent)((0,p.compose)([(0,p.createHigherOrderComponent)((e=>t=>{const[n]=Ar("typography.fontSizes");return(0,s.createElement)(e,{...t,fontSizes:n||_g})}),"withFontSizes"),e=>class extends u.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce(((e,[t,n])=>(e[`set${yg(t)}`]=this.createSetFontSize(t,n),e)),{})}createSetFontSize(e,t){return n=>{const o=this.props.fontSizes?.find((({size:e})=>e===Number(n)));this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps({attributes:e,fontSizes:n},o){const r=(t,n)=>!o[n]||(e[n]?e[n]!==o[n].slug:o[n].size!==e[t]);if(!Object.values(t).some(r))return null;const l=Object.entries(t).filter((([e,t])=>r(t,e))).reduce(((t,[o,r])=>{const l=e[o],i=Ep(n,l,e[r]);return t[o]={...i,class:Sp(l)},t}),{});return{...o,...l}}render(){return(0,s.createElement)(e,{...this.props,fontSizes:void 0,...this.state,...this.setters})}}]),"withFontSizes")},wg=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})),Sg=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})),Cg=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})),xg=[{icon:wg,title:(0,x.__)("Align text left"),align:"left"},{icon:Sg,title:(0,x.__)("Align text center"),align:"center"},{icon:Cg,title:(0,x.__)("Align text right"),align:"right"}],Bg={placement:"bottom-start"};const Ig=function({value:e,onChange:t,alignmentControls:n=xg,label:o=(0,x.__)("Align text"),describedBy:r=(0,x.__)("Change text alignment"),isCollapsed:l=!0,isToolbar:i}){function a(n){return()=>t(e===n?void 0:n)}const c=n.find((t=>t.align===e)),u=i?_l.ToolbarGroup:_l.ToolbarDropdownMenu,d=i?{isCollapsed:l}:{toggleProps:{describedBy:r},popoverProps:Bg};return(0,s.createElement)(u,{icon:c?c.icon:(0,x.isRTL)()?Cg:wg,label:o,controls:n.map((t=>{const{align:n}=t,o=e===n;return{...t,isActive:o,role:l?"menuitemradio":void 0,onClick:a(n)}})),...d})},Tg=e=>(0,s.createElement)(Ig,{...e,isToolbar:!1}),Mg=e=>(0,s.createElement)(Ig,{...e,isToolbar:!0});var Pg=n(9681),Rg=n.n(Pg);function Ng(e){return e.toLowerCase()}var Lg=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Ag=/[^A-Z0-9]+/gi;function Og(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}const Dg=e=>e.name||"",zg=e=>e.title,Vg=e=>e.description||"",Fg=e=>e.keywords||[],Hg=e=>e.category,Gg=()=>null;function Ug(e=""){return function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,o=void 0===n?Lg:n,r=t.stripRegexp,l=void 0===r?Ag:r,i=t.transform,s=void 0===i?Ng:i,a=t.delimiter,c=void 0===a?" ":a,u=Og(Og(e,o,"$1\0$2"),l,"\0"),d=0,p=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(p-1);)p--;return u.slice(d,p).split("\0").map(s).join(c)}(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 $g(e=""){return e=(e=(e=Rg()(e)).replace(/^\//,"")).toLowerCase()}const jg=(e="")=>Ug($g(e)),Wg=(e,t,n,o)=>{if(0===jg(o).length)return e;return Kg(e,o,{getCategory:e=>t.find((({slug:t})=>t===e.category))?.title,getCollection:e=>n[e.name.split("/")[0]]?.title})},Kg=(e=[],t="",n={})=>{if(0===jg(t).length)return e;const o=e.map((e=>[e,Zg(e,t,n)])).filter((([,e])=>e>0));return o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))};function Zg(e,t,n={}){const{getName:o=Dg,getTitle:r=zg,getDescription:l=Vg,getKeywords:i=Fg,getCategory:s=Hg,getCollection:a=Gg}=n,c=o(e),u=r(e),d=l(e),p=i(e),m=s(e),h=a(e),g=$g(t),f=$g(u);let b=0;if(g===f)b+=30;else if(f.startsWith(g))b+=20;else{const e=[c,u,d,...p,m,h].join(" ");0===((e,t)=>e.filter((e=>!jg(t).some((t=>t.includes(e))))))(Ug(g),e).length&&(b+=10)}if(0!==b&&c.startsWith("core/")){b+=c!==e.id?1:2}return b}const qg=(e,t)=>{const[n]=(0,d.useSelect)((t=>[t(Nr).getInserterItems(e)]),[e]),[o,r]=(0,d.useSelect)((e=>{const{getCategories:t,getCollections:n}=e(c.store);return[t(),n()]}),[]);return[n,o,r,(0,u.useCallback)((({name:e,initialAttributes:n,innerBlocks:o,syncStatus:r,content:l},i)=>{const s="unsynced"===r?(0,c.parse)(l,{__unstableSkipMigrationLogs:!0}):(0,c.createBlock)(e,n,(0,c.createBlocksFromInnerBlocksTemplate)(o));t(s,void 0,i)}),[t])]},Yg=(e,t)=>t?(e.sort((({id:e},{id:n})=>{let o=t.indexOf(e),r=t.indexOf(n);return o<0&&(o=t.length),r<0&&(r=t.length),o-r})),e):e,Xg=()=>{};const Qg={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n,prioritizedBlocks:o}=(0,d.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockListSettings:o,getBlockRootClientId:r}=e(Nr),l=t(),i=r(l);return{selectedBlockName:l?n(l):null,rootClientId:i,prioritizedBlocks:o(i)?.prioritizedInserterBlocks}}),[]),[r,l,i]=qg(t,Xg),a=(0,u.useMemo)((()=>(e.trim()?Wg(r,l,i,e):Yg(ne(r,"frecency","desc"),o)).filter((e=>e.name!==n)).slice(0,9)),[e,n,r,l,i,o]);return[(0,u.useMemo)((()=>a.map((e=>{const{title:t,icon:n,isDisabled:o}=e;return{key:`block-${e.id}`,value:e,label:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(qh,{key:"icon",icon:n,showColors:!0}),t),isDisabled:o}}))),[a])]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:o,syncStatus:r,content:l}=e;return{action:"replace",value:"unsynced"===r?(0,c.parse)(l,{__unstableSkipMigrationLogs:!0}):(0,c.createBlock)(t,n,(0,c.createBlocksFromInnerBlocksTemplate)(o))}}},Jg=window.wp.apiFetch;var ef=n.n(Jg);const tf=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.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"}));const nf={name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await ef()({path:(0,Ds.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=>[...e.title.split(/\s+/)],getOptionLabel:e=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ti,{key:"icon",icon:"page"===e.subtype?la:tf}),e.title),getOptionCompletion:e=>(0,s.createElement)("a",{href:e.url},e.title)},of=[];function rf({completers:e=of}){const{name:t}=y();return(0,u.useMemo)((()=>{let n=[...e,nf];return(t===(0,c.getDefaultBlockName)()||(0,c.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(n=[...n,Qg]),(0,m.hasFilter)("editor.Autocomplete.completers")&&(n===e&&(n=n.map((e=>({...e})))),n=(0,m.applyFilters)("editor.Autocomplete.completers",n,t)),n}),[e,t])}const lf=function(e){return(0,s.createElement)(_l.Autocomplete,{...e,completers:rf(e)})},sf=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"}));const af=function({isActive:e,label:t=(0,x.__)("Toggle full height"),onToggle:n,isDisabled:o}){return(0,s.createElement)(_l.ToolbarButton,{isActive:e,icon:sf,label:t,onClick:()=>n(!e),disabled:o})},cf=()=>{};const uf=function(e){const{label:t=(0,x.__)("Change matrix alignment"),onChange:n=cf,value:o="center",isDisabled:r}=e,l=(0,s.createElement)(_l.__experimentalAlignmentMatrixControl.Icon,{value:o});return(0,s.createElement)(_l.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:e,isOpen:n})=>(0,s.createElement)(_l.ToolbarButton,{onClick:e,"aria-haspopup":"true","aria-expanded":n,onKeyDown:t=>{n||t.keyCode!==zs.DOWN||(t.preventDefault(),e())},label:t,icon:l,showTooltip:!0,disabled:r}),renderContent:()=>(0,s.createElement)(_l.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:o})})};function df({clientId:e,maximumLength:t,context:n}){const o=(0,d.useSelect)((t=>{if(!e)return null;const{getBlockName:o,getBlockAttributes:r}=t(Nr),{getBlockType:l,getActiveBlockVariation:i}=t(c.store),s=o(e),a=l(s);if(!a)return null;const u=r(e),d=(0,c.__experimentalGetBlockLabel)(a,u,n);if(d!==a.title)return d;const p=i(s,u);return p?.title||a.title}),[e,n]);if(!o)return null;if(t&&t>0&&o.length>t){const e="...";return o.slice(0,t-e.length)+e}return o}function pf({clientId:e,maximumLength:t,context:n}){return df({clientId:e,maximumLength:t,context:n})}const mf=function({rootLabelText:e}){const{selectBlock:t,clearSelectedBlock:n}=(0,d.useDispatch)(Nr),{clientId:o,parents:r,hasSelection:l}=(0,d.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getEnabledBlockParents:o}=ie(e(Nr)),r=n();return{parents:o(r),clientId:r,hasSelection:!!t().clientId}}),[]),i=e||(0,x.__)("Document");return(0,s.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,x.__)("Block breadcrumb")},(0,s.createElement)("li",{className:l?void 0:"block-editor-block-breadcrumb__current","aria-current":l?void 0:"true"},l&&(0,s.createElement)(_l.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:n},i),!l&&i,!!o&&(0,s.createElement)(Ti,{icon:qs,className:"block-editor-block-breadcrumb__separator"})),r.map((e=>(0,s.createElement)("li",{key:e},(0,s.createElement)(_l.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>t(e)},(0,s.createElement)(pf,{clientId:e,maximumLength:35})),(0,s.createElement)(Ti,{icon:qs,className:"block-editor-block-breadcrumb__separator"})))),!!o&&(0,s.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,s.createElement)(pf,{clientId:o,maximumLength:35})))};function hf(e){return(0,d.useSelect)((t=>{const{__unstableHasActiveBlockOverlayActive:n}=t(Nr);return n(e)}),[e])}const gf=(0,u.createContext)({});function ff({value:e,children:t}){const n=(0,u.useContext)(gf),o=(0,u.useMemo)((()=>({...n,...e})),[n,e]);return(0,s.createElement)(gf.Provider,{value:o,children:t})}const bf=gf,vf={},kf=(0,_l.withFilters)("editor.BlockEdit")((e=>{const{name:t}=e,n=(0,c.getBlockType)(t);if(!n)return null;const o=n.edit||n.save;return(0,s.createElement)(o,{...e})})),_f=e=>{const{attributes:t={},name:n}=e,o=(0,c.getBlockType)(n),r=(0,u.useContext)(bf),l=(0,u.useMemo)((()=>o&&o.usesContext?Object.fromEntries(Object.entries(r).filter((([e])=>o.usesContext.includes(e)))):vf),[o,r]);if(!o)return null;if(o.apiVersion>1)return(0,s.createElement)(kf,{...e,context:l});const i=(0,c.hasBlockSupport)(o,"className",!0)?(0,c.getBlockDefaultClassName)(n):null,a=ml()(i,t.className,e.className);return(0,s.createElement)(kf,{...e,context:l,className:a})};function yf({mayDisplayControls:e,mayDisplayParentControls:t,blockEditingMode:n,...o}){const{name:r,isSelected:l,clientId:i,attributes:a={},__unstableLayoutClassNames:d}=o,{layout:p=null,metadata:m={}}=a,{bindings:v}=m,k=(0,c.hasBlockSupport)(r,"layout",!1)||(0,c.hasBlockSupport)(r,"__experimentalLayout",!1);return(0,s.createElement)(_,{value:(0,u.useMemo)((()=>({name:r,isSelected:l,clientId:i,layout:k?p:null,__unstableLayoutClassNames:d,[h]:e,[g]:t,[f]:n,[b]:v})),[r,l,i,k,p,d,e,t,n,v])},(0,s.createElement)(_f,{...o}))}const Ef=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));const wf=function({className:e,actions:t,children:n,secondaryActions:o}){return(0,s.createElement)("div",{style:{display:"contents",all:"initial"}},(0,s.createElement)("div",{className:ml()(e,"block-editor-warning")},(0,s.createElement)("div",{className:"block-editor-warning__contents"},(0,s.createElement)("p",{className:"block-editor-warning__message"},n),(u.Children.count(t)>0||o)&&(0,s.createElement)("div",{className:"block-editor-warning__actions"},u.Children.count(t)>0&&u.Children.map(t,((e,t)=>(0,s.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),o&&(0,s.createElement)(_l.DropdownMenu,{className:"block-editor-warning__secondary",icon:Ef,label:(0,x.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,s.createElement)(_l.MenuGroup,null,o.map(((e,t)=>(0,s.createElement)(_l.MenuItem,{onClick:e.onClick,key:t},e.title))))))))))};var Sf=n(8021);function Cf({title:e,rawContent:t,renderedContent:n,action:o,actionText:r,className:l}){return(0,s.createElement)("div",{className:l},(0,s.createElement)("div",{className:"block-editor-block-compare__content"},(0,s.createElement)("h2",{className:"block-editor-block-compare__heading"},e),(0,s.createElement)("div",{className:"block-editor-block-compare__html"},t),(0,s.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,s.createElement)(u.RawHTML,null,(0,As.safeHTML)(n)))),(0,s.createElement)("div",{className:"block-editor-block-compare__action"},(0,s.createElement)(_l.Button,{variant:"secondary",tabIndex:"0",onClick:o},r)))}const xf=function({block:e,onKeep:t,onConvert:n,convertor:o,convertButtonText:r}){const l=(i=o(e),(Array.isArray(i)?i:[i]).map((e=>(0,c.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var i;const a=(u=e.originalContent,d=l,(0,Sf.JJ)(u,d).map(((e,t)=>{const n=ml()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,s.createElement)("span",{key:t,className:n},e.value)})));var u,d;return(0,s.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,s.createElement)(Cf,{title:(0,x.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,x.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,s.createElement)(Cf,{title:(0,x.__)("After Conversion"),className:"block-editor-block-compare__converted",action:n,actionText:r,rawContent:a,renderedContent:l}))},Bf=e=>(0,c.rawHandler)({HTML:e.originalContent});function If({clientId:e}){const{block:t,canInsertHTMLBlock:n,canInsertClassicBlock:o}=(0,d.useSelect)((t=>{const{canInsertBlockType:n,getBlock:o,getBlockRootClientId:r}=t(Nr),l=r(e);return{block:o(e),canInsertHTMLBlock:n("core/html",l),canInsertClassicBlock:n("core/freeform",l)}}),[e]),{replaceBlock:r}=(0,d.useDispatch)(Nr),[l,i]=(0,u.useState)(!1),a=(0,u.useCallback)((()=>i(!1)),[]),p=(0,u.useMemo)((()=>({toClassic(){const e=(0,c.createBlock)("core/freeform",{content:t.originalContent});return r(t.clientId,e)},toHTML(){const e=(0,c.createBlock)("core/html",{content:t.originalContent});return r(t.clientId,e)},toBlocks(){const e=Bf(t);return r(t.clientId,e)},toRecoveredBlock(){const e=(0,c.createBlock)(t.name,t.attributes,t.innerBlocks);return r(t.clientId,e)}})),[t,r]),m=(0,u.useMemo)((()=>[{title:(0,x._x)("Resolve","imperative verb"),onClick:()=>i(!0)},n&&{title:(0,x.__)("Convert to HTML"),onClick:p.toHTML},o&&{title:(0,x.__)("Convert to Classic Block"),onClick:p.toClassic}].filter(Boolean)),[n,o,p]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(wf,{actions:[(0,s.createElement)(_l.Button,{key:"recover",onClick:p.toRecoveredBlock,variant:"primary"},(0,x.__)("Attempt Block Recovery"))],secondaryActions:m},(0,x.__)("This block contains unexpected or invalid content.")),l&&(0,s.createElement)(_l.Modal,{title:(0,x.__)("Resolve Block"),onRequestClose:a,className:"block-editor-block-compare"},(0,s.createElement)(xf,{block:t,onKeep:p.toHTML,onConvert:p.toBlocks,convertor:Bf,convertButtonText:(0,x.__)("Convert to Blocks")})))}const Tf=(0,s.createElement)(wf,{className:"block-editor-block-list__block-crash-warning"},(0,x.__)("This block has encountered an error and cannot be previewed.")),Mf=()=>Tf;class Pf 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}}const Rf=Pf;var Nf=n(4132);const Lf=function({clientId:e}){const[t,n]=(0,u.useState)(""),o=(0,d.useSelect)((t=>t(Nr).getBlock(e)),[e]),{updateBlock:r}=(0,d.useDispatch)(Nr);return(0,u.useEffect)((()=>{n((0,c.getBlockContent)(o))}),[o]),(0,s.createElement)(Nf.A,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:()=>{const l=(0,c.getBlockType)(o.name);if(!l)return;const i=(0,c.getBlockAttributes)(l,t,o.attributes),s=t||(0,c.getSaveContent)(l,i),[a]=t?(0,c.validateBlock)({...o,attributes:i,originalContent:s}):[!0];r(e,{attributes:i,originalContent:s,isValid:a}),t||n(s)},onChange:e=>n(e.target.value)})};var Af=Xf(),Of=e=>Kf(e,Af),Df=Xf();Of.write=e=>Kf(e,Df);var zf=Xf();Of.onStart=e=>Kf(e,zf);var Vf=Xf();Of.onFrame=e=>Kf(e,Vf);var Ff=Xf();Of.onFinish=e=>Kf(e,Ff);var Hf=[];Of.setTimeout=(e,t)=>{let n=Of.now()+t,o=()=>{let e=Hf.findIndex((e=>e.cancel==o));~e&&Hf.splice(e,1),jf-=~e?1:0},r={time:n,handler:e,cancel:o};return Hf.splice(Gf(n),0,r),jf+=1,Zf(),r};var Gf=e=>~(~Hf.findIndex((t=>t.time>e))||~Hf.length);Of.cancel=e=>{zf.delete(e),Vf.delete(e),Ff.delete(e),Af.delete(e),Df.delete(e)},Of.sync=e=>{Wf=!0,Of.batchedUpdates(e),Wf=!1},Of.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,Of.onStart(n)}return o.handler=e,o.cancel=()=>{zf.delete(n),t=null},o};var Uf=typeof window<"u"?window.requestAnimationFrame:()=>{};Of.use=e=>Uf=e,Of.now=typeof performance<"u"?()=>performance.now():Date.now,Of.batchedUpdates=e=>e(),Of.catch=console.error,Of.frameLoop="always",Of.advance=()=>{"demand"!==Of.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Yf()};var $f=-1,jf=0,Wf=!1;function Kf(e,t){Wf?(t.delete(e),e(0)):(t.add(e),Zf())}function Zf(){$f<0&&($f=0,"demand"!==Of.frameLoop&&Uf(qf))}function qf(){~$f&&(Uf(qf),Of.batchedUpdates(Yf))}function Yf(){let e=$f;$f=Of.now();let t=Gf($f);t&&(Qf(Hf.splice(0,t),(e=>e.handler())),jf-=t),jf?(zf.flush(),Af.flush(e?Math.min(64,$f-e):16.667),Vf.flush(),Df.flush(),Ff.flush()):$f=-1}function Xf(){let e=new Set,t=e;return{add(n){jf+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(jf-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,jf-=t.size,Qf(t,(t=>t(n)&&e.add(t))),jf+=e.size,t=e)}}}function Qf(e,t){e.forEach((e=>{try{t(e)}catch(e){Of.catch(e)}}))}var Jf=Object.defineProperty,eb={};function tb(){}((e,t)=>{for(var n in t)Jf(e,n,{get:t[n],enumerable:!0})})(eb,{assign:()=>gb,colors:()=>pb,createStringInterpolator:()=>ab,skipAnimation:()=>mb,to:()=>cb,willAdvance:()=>hb});var nb={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 ob(e,t){if(nb.arr(e)){if(!nb.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var rb=(e,t)=>e.forEach(t);function lb(e,t,n){if(nb.arr(e))for(let o=0;o<e.length;o++)t.call(n,e[o],`${o}`);else for(let o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o)}var ib=e=>nb.und(e)?[]:nb.arr(e)?e:[e];function sb(e,t){if(e.size){let n=Array.from(e);e.clear(),rb(n,t)}}var ab,cb,ub=(e,...t)=>sb(e,(e=>e(...t))),db=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),pb=null,mb=!1,hb=tb,gb=e=>{e.to&&(cb=e.to),e.now&&(Of.now=e.now),void 0!==e.colors&&(pb=e.colors),null!=e.skipAnimation&&(mb=e.skipAnimation),e.createStringInterpolator&&(ab=e.createStringInterpolator),e.requestAnimationFrame&&Of.use(e.requestAnimationFrame),e.batchedUpdates&&(Of.batchedUpdates=e.batchedUpdates),e.willAdvance&&(hb=e.willAdvance),e.frameLoop&&(Of.frameLoop=e.frameLoop)},fb=new Set,bb=[],vb=[],kb=0,_b={get idle(){return!fb.size&&!bb.length},start(e){kb>e.priority?(fb.add(e),Of.onStart(yb)):(Eb(e),Of(Sb))},advance:Sb,sort(e){if(kb)Of.onFrame((()=>_b.sort(e)));else{let t=bb.indexOf(e);~t&&(bb.splice(t,1),wb(e))}},clear(){bb=[],fb.clear()}};function yb(){fb.forEach(Eb),fb.clear(),Of(Sb)}function Eb(e){bb.includes(e)||wb(e)}function wb(e){bb.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(bb,(t=>t.priority>e.priority)),0,e)}function Sb(e){let t=vb;for(let n=0;n<bb.length;n++){let o=bb[n];kb=o.priority,o.idle||(hb(o),o.advance(e),o.idle||t.push(o))}return kb=0,(vb=bb).length=0,(bb=t).length>0}var Cb="[-+]?\\d*\\.?\\d+",xb=Cb+"%";function Bb(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Ib=new RegExp("rgb"+Bb(Cb,Cb,Cb)),Tb=new RegExp("rgba"+Bb(Cb,Cb,Cb,Cb)),Mb=new RegExp("hsl"+Bb(Cb,xb,xb)),Pb=new RegExp("hsla"+Bb(Cb,xb,xb,Cb)),Rb=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Nb=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Lb=/^#([0-9a-fA-F]{6})$/,Ab=/^#([0-9a-fA-F]{8})$/;function Ob(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 Db(e,t,n){let o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,l=Ob(r,o,e+1/3),i=Ob(r,o,e),s=Ob(r,o,e-1/3);return Math.round(255*l)<<24|Math.round(255*i)<<16|Math.round(255*s)<<8}function zb(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function Vb(e){return(parseFloat(e)%360+360)%360/360}function Fb(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Hb(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function Gb(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Lb.exec(e))?parseInt(t[1]+"ff",16)>>>0:pb&&void 0!==pb[e]?pb[e]:(t=Ib.exec(e))?(zb(t[1])<<24|zb(t[2])<<16|zb(t[3])<<8|255)>>>0:(t=Tb.exec(e))?(zb(t[1])<<24|zb(t[2])<<16|zb(t[3])<<8|Fb(t[4]))>>>0:(t=Rb.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Ab.exec(e))?parseInt(t[1],16)>>>0:(t=Nb.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Mb.exec(e))?(255|Db(Vb(t[1]),Hb(t[2]),Hb(t[3])))>>>0:(t=Pb.exec(e))?(Db(Vb(t[1]),Hb(t[2]),Hb(t[3]))|Fb(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}var Ub=(e,t,n)=>{if(nb.fun(e))return e;if(nb.arr(e))return Ub({range:e,output:t,extrapolate:n});if(nb.str(e.output[0]))return ab(e);let o=e,r=o.output,l=o.range||[0,1],i=o.extrapolateLeft||o.extrapolate||"extend",s=o.extrapolateRight||o.extrapolate||"extend",a=o.easing||(e=>e);return e=>{let t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,l);return function(e,t,n,o,r,l,i,s,a){let c=a?a(e):e;if(c<t){if("identity"===i)return c;"clamp"===i&&(c=t)}if(c>n){if("identity"===s)return c;"clamp"===s&&(c=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=l(c),o===-1/0?c=-c:r===1/0?c+=o:c=c*(r-o)+o,c)}(e,l[t],l[t+1],r[t],r[t+1],a,i,s,o.map)}};var $b=1.70158,jb=1.525*$b,Wb=$b+1,Kb=2*Math.PI/3,Zb=2*Math.PI/4.5,qb=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Yb={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=>Wb*e*e*e-$b*e*e,easeOutBack:e=>1+Wb*Math.pow(e-1,3)+$b*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(jb+1)*e-jb)/2:(Math.pow(2*e-2,2)*((jb+1)*(2*e-2)+jb)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*Kb),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*Kb)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Zb)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Zb)/2+1,easeInBounce:e=>1-qb(1-e),easeOutBounce:qb,easeInOutBounce:e=>e<.5?(1-qb(1-2*e))/2:(1+qb(2*e-1))/2,steps:(e,t="end")=>n=>{let o=(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(o):Math.ceil(o))/e)}},Xb=Symbol.for("FluidValue.get"),Qb=Symbol.for("FluidValue.observers"),Jb=e=>Boolean(e&&e[Xb]),ev=e=>e&&e[Xb]?e[Xb]():e,tv=e=>e[Qb]||null;function nv(e,t){let n=e[Qb];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var ov=class{[Xb];[Qb];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");rv(this,e)}},rv=(e,t)=>av(e,Xb,t);function lv(e,t){if(e[Xb]){let n=e[Qb];n||av(e,Qb,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function iv(e,t){let n=e[Qb];if(n&&n.has(t)){let o=n.size-1;o?n.delete(t):e[Qb]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var sv,av=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),cv=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,uv=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,dv=new RegExp(`(${cv.source})(%|[a-z]+)`,"i"),pv=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,mv=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,hv=e=>{let[t,n]=gv(e);if(!t||db())return e;let o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&mv.test(n)?hv(n):n||e},gv=e=>{let t=mv.exec(e);if(!t)return[,];let[,n,o]=t;return[n,o]},fv=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,bv=e=>{sv||(sv=pb?new RegExp(`(${Object.keys(pb).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>ev(e).replace(mv,hv).replace(uv,Gb).replace(sv,Gb))),n=t.map((e=>e.match(cv).map(Number))),o=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>Ub({...e,output:t})));return e=>{let n=!dv.test(t[0])&&t.find((e=>dv.test(e)))?.replace(cv,""),r=0;return t[0].replace(cv,(()=>`${o[r++](e)}${n||""}`)).replace(pv,fv)}},vv="react-spring: ",kv=e=>{let t=e,n=!1;if("function"!=typeof t)throw new TypeError(`${vv}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},_v=kv(console.warn);kv(console.warn);function yv(e){return nb.str(e)&&("#"==e[0]||/\d/.test(e)||!db()&&mv.test(e)||e in(pb||{}))}new WeakMap;new Set,new WeakMap,new WeakMap,new WeakMap;var Ev=db()?s.useEffect:s.useLayoutEffect;function wv(){let e=(0,s.useState)()[1],t=(()=>{let e=(0,s.useRef)(!1);return Ev((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var Sv=[];var Cv=Symbol.for("Animated:node"),xv=e=>e&&e[Cv],Bv=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,Cv,t),Iv=e=>e&&e[Cv]&&e[Cv].getPayload(),Tv=class{payload;constructor(){Bv(this,this)}getPayload(){return this.payload||[]}},Mv=class extends Tv{constructor(e){super(),this._value=e,nb.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new Mv(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return nb.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(){let{done:e}=this;this.done=!1,nb.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Pv=class extends Mv{_string=null;_toString;constructor(e){super(0),this._toString=Ub({output:[e,e]})}static create(e){return new Pv(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if(nb.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=Ub({output:[this.getValue(),e]})),this._value=0,super.reset()}},Rv={dependencies:null},Nv=class extends Tv{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return lb(this.source,((n,o)=>{(e=>!!e&&e[Cv]===e)(n)?t[o]=n.getValue(e):Jb(n)?t[o]=ev(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&rb(this.payload,(e=>e.reset()))}_makePayload(e){if(e){let t=new Set;return lb(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Rv.dependencies&&Jb(e)&&Rv.dependencies.add(e);let t=Iv(e);t&&rb(t,(e=>this.add(e)))}},Lv=class extends Nv{constructor(e){super(e)}static create(e){return new Lv(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){let t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(Av)),!0)}};function Av(e){return(yv(e)?Pv:Mv).create(e)}function Ov(e){let t=xv(e);return t?t.constructor:nb.arr(e)?Lv:yv(e)?Pv:Mv}var Dv=(e,t)=>{let n=!nb.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,s.forwardRef)(((o,r)=>{let l=(0,s.useRef)(null),i=n&&(0,s.useCallback)((e=>{l.current=function(e,t){return e&&(nb.fun(e)?e(t):e.current=t),t}(r,e)}),[r]),[a,c]=function(e,t){let n=new Set;return Rv.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Nv(e),Rv.dependencies=null,[e,n]}(o,t),u=wv(),d=()=>{let e=l.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,a.getValue(!0)))&&u()},p=new zv(d,c),m=(0,s.useRef)();Ev((()=>(m.current=p,rb(c,(e=>lv(e,p))),()=>{m.current&&(rb(m.current.deps,(e=>iv(e,m.current))),Of.cancel(m.current.update))}))),(0,s.useEffect)(d,[]),(e=>{(0,s.useEffect)(e,Sv)})((()=>()=>{let e=m.current;rb(e.deps,(t=>iv(t,e)))}));let h=t.getComponentProps(a.getValue());return s.createElement(e,{...h,ref:i})}))},zv=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&Of.write(this.update)}};var Vv=Symbol.for("AnimatedComponent"),Fv=e=>nb.str(e)?e:e&&nb.str(e.displayName)?e.displayName:nb.fun(e)&&e.name||null;function Hv(e,...t){return nb.fun(e)?e(...t):e}var Gv=(e,t)=>!0===e||!!(t&&e&&(nb.fun(e)?e(t):ib(e).includes(t))),Uv=(e,t)=>nb.obj(e)?t&&e[t]:e,$v=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,jv=e=>e,Wv=(e,t=jv)=>{let n=Kv;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));let o={};for(let r of n){let n=t(e[r],r);nb.und(n)||(o[r]=n)}return o},Kv=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Zv={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 qv(e){let t=function(e){let t={},n=0;if(lb(e,((e,o)=>{Zv[o]||(t[o]=e,n++)})),n)return t}(e);if(t){let n={to:t};return lb(e,((e,o)=>o in t||(n[o]=e))),n}return{...e}}function Yv(e){return e=ev(e),nb.arr(e)?e.map(Yv):yv(e)?eb.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Xv(e){return nb.fun(e)||nb.arr(e)&&nb.obj(e[0])}var Qv={tension:170,friction:26,mass:1,damping:1,easing:Yb.linear,clamp:!1},Jv=class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,Qv)}};function ek(e,t){if(nb.und(t.decay)){let n=!nb.und(t.tension)||!nb.und(t.friction);(n||!nb.und(t.frequency)||!nb.und(t.damping)||!nb.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var tk=[],nk=class{changed=!1;values=tk;toValues=null;fromValues=tk;to;from;config=new Jv;immediate=!1};function ok(e,{key:t,props:n,defaultProps:o,state:r,actions:l}){return new Promise(((i,s)=>{let a,c,u=Gv(n.cancel??o?.cancel,t);if(u)m();else{nb.und(n.pause)||(r.paused=Gv(n.pause,t));let e=o?.pause;!0!==e&&(e=r.paused||Gv(e,t)),a=Hv(n.delay||0,t),e?(r.resumeQueue.add(p),l.pause()):(l.resume(),p())}function d(){r.resumeQueue.add(p),r.timeouts.delete(c),c.cancel(),a=c.time-Of.now()}function p(){a>0&&!eb.skipAnimation?(r.delayed=!0,c=Of.setTimeout(m,a),r.pauseQueue.add(d),r.timeouts.add(c)):m()}function m(){r.delayed&&(r.delayed=!1),r.pauseQueue.delete(d),r.timeouts.delete(c),e<=(r.cancelId||0)&&(u=!0);try{l.start({...n,callId:e,cancel:u},i)}catch(e){s(e)}}}))}var rk=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?sk(e.get()):t.every((e=>e.noop))?lk(e.get()):ik(e.get(),t.every((e=>e.finished))),lk=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),ik=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),sk=e=>({value:e,cancelled:!0,finished:!1});function ak(e,t,n,o){let{callId:r,parentId:l,onRest:i}=t,{asyncTo:s,promise:a}=n;return l||e!==s||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;let c,u,d,p=Wv(t,((e,t)=>"onRest"===t?void 0:e)),m=new Promise(((e,t)=>(c=e,u=t))),h=e=>{let t=r<=(n.cancelId||0)&&sk(o)||r!==n.asyncId&&ik(o,!1);if(t)throw e.result=t,u(e),e},g=(e,t)=>{let l=new uk,i=new dk;return(async()=>{if(eb.skipAnimation)throw ck(n),i.result=ik(o,!1),u(i),i;h(l);let s=nb.obj(e)?{...e}:{...t,to:e};s.parentId=r,lb(p,((e,t)=>{nb.und(s[t])&&(s[t]=e)}));let a=await o.start(s);return h(l),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),a})()};if(eb.skipAnimation)return ck(n),ik(o,!1);try{let t;t=nb.arr(e)?(async e=>{for(let t of e)await g(t)})(e):Promise.resolve(e(g,o.stop.bind(o))),await Promise.all([t.then(c),m]),d=ik(o.get(),!0,!1)}catch(e){if(e instanceof uk)d=e.result;else{if(!(e instanceof dk))throw e;d=e.result}}finally{r==n.asyncId&&(n.asyncId=l,n.asyncTo=l?s:void 0,n.promise=l?a:void 0)}return nb.fun(i)&&Of.batchedUpdates((()=>{i(d,o,o.item)})),d})():a}function ck(e,t){sb(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var uk=class extends Error{result;constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},dk=class extends Error{result;constructor(){super("SkipAnimationSignal")}},pk=e=>e instanceof hk,mk=1,hk=class extends ov{id=mk++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=xv(this);return e&&e.getValue()}to(...e){return eb.to(this,e)}interpolate(...e){return _v(`${vv}The "interpolate" function is deprecated in v9 (use "to" instead)`),eb.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){nv(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||_b.sort(this),nv(this,{type:"priority",parent:this,priority:e})}},gk=Symbol.for("SpringPhase"),fk=e=>(1&e[gk])>0,bk=e=>(2&e[gk])>0,vk=e=>(4&e[gk])>0,kk=(e,t)=>t?e[gk]|=3:e[gk]&=-3,_k=(e,t)=>t?e[gk]|=4:e[gk]&=-5,yk=class extends hk{key;animation=new nk;queue;defaultProps={};_state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_pendingCalls=new Set;_lastCallId=0;_lastToId=0;_memoizedDuration=0;constructor(e,t){if(super(),!nb.und(e)||!nb.und(t)){let n=nb.obj(e)?{...e}:{...t,from:e};nb.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(bk(this)||this._state.asyncTo)||vk(this)}get goal(){return ev(this.animation.to)}get velocity(){let e=xv(this);return e instanceof Mv?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return fk(this)}get isAnimating(){return bk(this)}get isPaused(){return vk(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,o=this.animation,{config:r,toValues:l}=o,i=Iv(o.to);!i&&Jb(o.to)&&(l=ib(ev(o.to))),o.values.forEach(((s,a)=>{if(s.done)return;let c=s.constructor==Pv?1:i?i[a].lastPosition:l[a],u=o.immediate,d=c;if(!u){if(d=s.lastPosition,r.tension<=0)return void(s.done=!0);let t,n=s.elapsedTime+=e,l=o.fromValues[a],i=null!=s.v0?s.v0:s.v0=nb.arr(r.velocity)?r.velocity[a]:r.velocity,p=r.precision||(l==c?.005:Math.min(1,.001*Math.abs(c-l)));if(nb.und(r.duration))if(r.decay){let e=!0===r.decay?.998:r.decay,o=Math.exp(-(1-e)*n);d=l+i/(1-e)*(1-o),u=Math.abs(s.lastPosition-d)<=p,t=i*o}else{t=null==s.lastVelocity?i:s.lastVelocity;let n,o=r.restVelocity||p/10,a=r.clamp?0:r.bounce,m=!nb.und(a),h=l==c?s.v0>0:l<c,g=!1,f=1,b=Math.ceil(e/f);for(let e=0;e<b&&(n=Math.abs(t)>o,n||(u=Math.abs(c-d)<=p,!u));++e){m&&(g=d==c||d>c==h,g&&(t=-t*a,d=c)),t+=(1e-6*-r.tension*(d-c)+.001*-r.friction*t)/r.mass*f,d+=t*f}}else{let o=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,s.durationProgress>0&&(s.elapsedTime=r.duration*s.durationProgress,n=s.elapsedTime+=e)),o=(r.progress||0)+n/this._memoizedDuration,o=o>1?1:o<0?0:o,s.durationProgress=o),d=l+r.easing(o)*(c-l),t=(d-s.lastPosition)/e,u=1==o}s.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}i&&!i[a].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,r.round)&&(n=!0)}));let s=xv(this),a=s.getValue();if(t){let e=ev(o.to);a===e&&!n||r.decay?n&&r.decay&&this._onChange(a):(s.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(a)}set(e){return Of.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(bk(this)){let{to:e,config:t}=this.animation;Of.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 nb.und(e)?(n=this.queue||[],this.queue=[]):n=[nb.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>rk(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),ck(this._state,e&&this._lastCallId),Of.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){let t=this.key||"",{to:n,from:o}=e;n=nb.obj(n)?n[t]:n,(null==n||Xv(n))&&(n=void 0),o=nb.obj(o)?o[t]:o,null==o&&(o=void 0);let r={to:n,from:o};return fk(this)||(e.reverse&&([n,o]=[o,n]),o=ev(o),nb.und(o)?xv(this)||this._set(n):this._set(o)),r}_update({...e},t){let{key:n,defaultProps:o}=this;e.default&&Object.assign(o,Wv(e,((e,t)=>/^on/.test(t)?Uv(e,n):e))),Bk(this,e,"onProps"),Ik(this,"onProps",e,this);let r=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?");let l=this._state;return ok(++this._lastCallId,{key:n,props:e,defaultProps:o,state:l,actions:{pause:()=>{vk(this)||(_k(this,!0),ub(l.pauseQueue),Ik(this,"onPause",ik(this,Ek(this,this.animation.to)),this))},resume:()=>{vk(this)&&(_k(this,!1),bk(this)&&this._resume(),ub(l.resumeQueue),Ik(this,"onResume",ik(this,Ek(this,this.animation.to)),this))},start:this._merge.bind(this,r)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){let t=wk(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(sk(this));let o=!nb.und(e.to),r=!nb.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n(sk(this));this._lastToId=t.callId}let{key:l,defaultProps:i,animation:s}=this,{to:a,from:c}=s,{to:u=a,from:d=c}=e;r&&!o&&(!t.default||nb.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let p=!ob(d,c);p&&(s.from=d),d=ev(d);let m=!ob(u,a);m&&this._focus(u);let h=Xv(t.to),{config:g}=s,{decay:f,velocity:b}=g;(o||r)&&(g.velocity=0),t.config&&!h&&function(e,t,n){n&&(ek(n={...n},t),t={...n,...t}),ek(e,t),Object.assign(e,t);for(let t in Qv)null==e[t]&&(e[t]=Qv[t]);let{mass:o,frequency:r,damping:l}=e;nb.und(r)||(r<.01&&(r=.01),l<0&&(l=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*l*o/r)}(g,Hv(t.config,l),t.config!==i.config?Hv(i.config,l):void 0);let v=xv(this);if(!v||nb.und(u))return n(ik(this,!0));let k=nb.und(t.reset)?r&&!t.default:!nb.und(d)&&Gv(t.reset,l),_=k?d:this.get(),y=Yv(u),E=nb.num(y)||nb.arr(y)||yv(y),w=!h&&(!E||Gv(i.immediate||t.immediate,l));if(m){let e=Ov(u);if(e!==v.constructor){if(!w)throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`);v=this._set(y)}}let S=v.constructor,C=Jb(u),x=!1;if(!C){let e=k||!fk(this)&&p;(m||e)&&(x=ob(Yv(_),y),C=!x),(!ob(s.immediate,w)&&!w||!ob(g.decay,f)||!ob(g.velocity,b))&&(C=!0)}if(x&&bk(this)&&(s.changed&&!k?C=!0:C||this._stop(a)),!h&&((C||Jb(a))&&(s.values=v.getPayload(),s.toValues=Jb(u)?null:S==Pv?[1]:ib(y)),s.immediate!=w&&(s.immediate=w,!w&&!k&&this._set(a)),C)){let{onRest:e}=s;rb(xk,(e=>Bk(this,t,e)));let o=ik(this,Ek(this,a));ub(this._pendingCalls,o),this._pendingCalls.add(n),s.changed&&Of.batchedUpdates((()=>{s.changed=!k,e?.(o,this),k?Hv(i.onRest,o):s.onStart?.(o,this)}))}k&&this._set(_),h?n(ak(t.to,t,this._state,this)):C?this._start():bk(this)&&!m?this._pendingCalls.add(n):n(lk(_))}_focus(e){let t=this.animation;e!==t.to&&(tv(this)&&this._detach(),t.to=e,tv(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;Jb(t)&&(lv(t,this),pk(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;Jb(e)&&iv(e,this)}_set(e,t=!0){let n=ev(e);if(!nb.und(n)){let e=xv(this);if(!e||!ob(n,e.getValue())){let o=Ov(n);e&&e.constructor==o?e.setValue(n):Bv(this,o.create(n)),e&&Of.batchedUpdates((()=>{this._onChange(n,t)}))}}return xv(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,Ik(this,"onStart",ik(this,Ek(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Hv(this.animation.onChange,e,this)),Hv(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;xv(this).reset(ev(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),bk(this)||(kk(this,!0),vk(this)||this._resume())}_resume(){eb.skipAnimation?this.finish():_b.start(this)}_stop(e,t){if(bk(this)){kk(this,!1);let n=this.animation;rb(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),nv(this,{type:"idle",parent:this});let o=t?sk(this.get()):ik(this.get(),Ek(this,e??n.to));ub(this._pendingCalls,o),n.changed&&(n.changed=!1,Ik(this,"onRest",o,this))}}};function Ek(e,t){let n=Yv(t);return ob(Yv(e.get()),n)}function wk(e,t=e.loop,n=e.to){let o=Hv(t);if(o){let r=!0!==o&&qv(o),l=(r||e).reverse,i=!r||r.reset;return Sk({...e,loop:t,default:!1,pause:void 0,to:!l||Xv(n)?n:void 0,from:i?e.from:void 0,reset:i,...r})}}function Sk(e){let{to:t,from:n}=e=qv(e),o=new Set;return nb.obj(t)&&Ck(t,o),nb.obj(n)&&Ck(n,o),e.keys=o.size?Array.from(o):null,e}function Ck(e,t){lb(e,((e,n)=>null!=e&&t.add(n)))}var xk=["onStart","onRest","onChange","onPause","onResume"];function Bk(e,t,n){e.animation[n]=t[n]!==$v(t,n)?Uv(t[n],e.key):void 0}function Ik(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var Tk=["onStart","onChange","onRest"],Mk=1,Pk=class{id=Mk++;springs={};queue=[];ref;_flush;_initialProps;_lastAsyncId=0;_active=new Set;_changed=new Set;_started=!1;_item;_state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_events={onStart:new Map,onChange:new Map,onRest:new Map};constructor(e,t){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(){let e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(let t in e){let n=e[t];nb.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Sk(e)),this}start(e){let{queue:t}=this;return e?t=ib(e).map(Sk):this.queue=[],this._flush?this._flush(this,t):(Ok(this,t),Rk(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;rb(ib(t),(t=>n[t].stop(!!e)))}else ck(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(nb.und(e))this.start({pause:!0});else{let t=this.springs;rb(ib(e),(e=>t[e].pause()))}return this}resume(e){if(nb.und(e))this.start({pause:!1});else{let t=this.springs;rb(ib(e),(e=>t[e].resume()))}return this}each(e){lb(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,o=this._active.size>0,r=this._changed.size>0;(o&&!this._started||r&&!this._started)&&(this._started=!0,sb(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));let l=!o&&this._started,i=r||l&&n.size?this.get():null;r&&t.size&&sb(t,(([e,t])=>{t.value=i,e(t,this,this._item)})),l&&(this._started=!1,sb(n,(([e,t])=>{t.value=i,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}Of.onFrame(this._onFrame)}};function Rk(e,t){return Promise.all(t.map((t=>Nk(e,t)))).then((t=>rk(e,t)))}async function Nk(e,t,n){let{keys:o,to:r,from:l,loop:i,onRest:s,onResolve:a}=t,c=nb.obj(t.default)&&t.default;i&&(t.loop=!1),!1===r&&(t.to=null),!1===l&&(t.from=null);let u=nb.arr(r)||nb.fun(r)?r:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):rb(Tk,(n=>{let o=t[n];if(nb.fun(o)){let r=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=r.get(o);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):r.set(o,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));let d=e._state;t.pause===!d.paused?(d.paused=t.pause,ub(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let p=(o||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),m=!0===t.cancel||!0===$v(t,"cancel");(u||m&&d.asyncId)&&p.push(ok(++e._lastAsyncId,{props:t,state:d,actions:{pause:tb,resume:tb,start(t,n){m?(ck(d,e._lastAsyncId),n(sk(e))):(t.onRest=s,n(ak(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));let h=rk(e,await Promise.all(p));if(i&&h.finished&&(!n||!h.noop)){let n=wk(t,i,r);if(n)return Ok(e,[n]),Nk(e,n,!0)}return a&&Of.batchedUpdates((()=>a(h,e,e.item))),h}function Lk(e,t){let n=new yk;return n.key=e,t&&lv(n,t),n}function Ak(e,t,n){t.keys&&rb(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}function Ok(e,t){rb(t,(t=>{Ak(e.springs,t,(t=>Lk(t,e)))}))}var Dk=({children:e,...t})=>{let n=(0,s.useContext)(zk),o=t.pause||!!n.pause,r=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,s.useState)((()=>({inputs:t,result:e()}))),o=(0,s.useRef)(),r=o.current,l=r;return l?Boolean(t&&l.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,l.inputs))||(l={inputs:t,result:e()}):l=n,(0,s.useEffect)((()=>{o.current=l,r==n&&(n.inputs=n.result=void 0)}),[l]),l.result}((()=>({pause:o,immediate:r})),[o,r]);let{Provider:l}=zk;return s.createElement(l,{value:t},e)},zk=function(e,t){return Object.assign(e,s.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}(Dk,{});Dk.Provider=zk.Provider,Dk.Consumer=zk.Consumer;var Vk=class extends hk{constructor(e,t){super(),this.source=e,this.calc=Ub(...t);let n=this._get(),o=Ov(n);Bv(this,o.create(n))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get();ob(t,this.get())||(xv(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Hk(this._active)&&Gk(this)}_get(){let e=nb.arr(this.source)?this.source.map(ev):ib(ev(this.source));return this.calc(...e)}_start(){this.idle&&!Hk(this._active)&&(this.idle=!1,rb(Iv(this),(e=>{e.done=!1})),eb.skipAnimation?(Of.batchedUpdates((()=>this.advance())),Gk(this)):_b.start(this))}_attach(){let e=1;rb(ib(this.source),(t=>{Jb(t)&&lv(t,this),pk(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){rb(ib(this.source),(e=>{Jb(e)&&iv(e,this)})),this._active.clear(),Gk(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=ib(this.source).reduce(((e,t)=>Math.max(e,(pk(t)?t.priority:0)+1)),0))}};function Fk(e){return!1!==e.idle}function Hk(e){return!e.size||Array.from(e).every(Fk)}function Gk(e){e.idle||(e.idle=!0,rb(Iv(e),(e=>{e.done=!0})),nv(e,{type:"idle",parent:e}))}eb.assign({createStringInterpolator:bv,to:(e,t)=>new Vk(e,t)});_b.advance;const Uk=window.ReactDOM;var $k=/^--/;function jk(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||$k.test(e)||Kk.hasOwnProperty(e)&&Kk[e]?(""+t).trim():t+"px"}var Wk={};var Kk={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},Zk=["Webkit","Ms","Moz","O"];Kk=Object.keys(Kk).reduce(((e,t)=>(Zk.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Kk);var qk=/^(matrix|translate|scale|rotate|skew)/,Yk=/^(translate)/,Xk=/^(rotate|skew)/,Qk=(e,t)=>nb.num(e)&&0!==e?e+t:e,Jk=(e,t)=>nb.arr(e)?e.every((e=>Jk(e,t))):nb.num(e)?e===t:parseFloat(e)===t,e_=class extends Nv{constructor({x:e,y:t,z:n,...o}){let r=[],l=[];(e||t||n)&&(r.push([e||0,t||0,n||0]),l.push((e=>[`translate3d(${e.map((e=>Qk(e,"px"))).join(",")})`,Jk(e,0)]))),lb(o,((e,t)=>{if("transform"===t)r.push([e||""]),l.push((e=>[e,""===e]));else if(qk.test(t)){if(delete o[t],nb.und(e))return;let n=Yk.test(t)?"px":Xk.test(t)?"deg":"";r.push(ib(e)),l.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${Qk(r,n)})`,Jk(r,0)]:e=>[`${t}(${e.map((e=>Qk(e,n))).join(",")})`,Jk(e,t.startsWith("scale")?1:0)])}})),r.length&&(o.transform=new t_(r,l)),super(o)}},t_=class extends ov{constructor(e,t){super(),this.inputs=e,this.transforms=t}_value=null;get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return rb(this.inputs,((n,o)=>{let r=ev(n[0]),[l,i]=this.transforms[o](nb.arr(r)?r:n.map(ev));e+=" "+l,t=t&&i})),t?"none":e}observerAdded(e){1==e&&rb(this.inputs,(e=>rb(e,(e=>Jb(e)&&lv(e,this)))))}observerRemoved(e){0==e&&rb(this.inputs,(e=>rb(e,(e=>Jb(e)&&iv(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),nv(this,e)}};eb.assign({batchedUpdates:Uk.unstable_batchedUpdates,createStringInterpolator:bv,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 n_=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new Nv(e)),getComponentProps:o=(e=>e)}={})=>{let r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},l=e=>{let t=Fv(e)||"Anonymous";return(e=nb.str(e)?l[e]||(l[e]=Dv(e,r)):e[Vv]||(e[Vv]=Dv(e,r))).displayName=`Animated(${t})`,e};return lb(e,((t,n)=>{nb.arr(e)&&(n=Fv(t)),l[n]=l(t)})),{animated:l}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:o,children:r,scrollTop:l,scrollLeft:i,viewBox:s,...a}=t,c=Object.values(a),u=Object.keys(a).map((t=>n||e.hasAttribute(t)?t:Wk[t]||(Wk[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==r&&(e.textContent=r);for(let t in o)if(o.hasOwnProperty(t)){let n=jk(t,o[t]);$k.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==l&&(e.scrollTop=l),void 0!==i&&(e.scrollLeft=i),void 0!==s&&e.setAttribute("viewBox",s)},createAnimatedStyle:e=>new e_(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),o_=n_.animated;function r_(e){return{top:e.offsetTop,left:e.offsetLeft}}const l_=function({triggerAnimationOnChange:e,clientId:t}){const n=(0,u.useRef)(),{isTyping:o,getGlobalBlockCount:r,isBlockSelected:l,isFirstMultiSelectedBlock:i,isBlockMultiSelected:s,isAncestorMultiSelected:a}=(0,d.useSelect)(Nr),{previous:c,prevRect:p}=(0,u.useMemo)((()=>({previous:n.current&&r_(n.current),prevRect:n.current&&n.current.getBoundingClientRect()})),[e]);return(0,u.useLayoutEffect)((()=>{if(!c||!n.current)return;const e=(0,As.getScrollContainer)(n.current),u=l(t),d=u||i(t);function m(){if(d&&p){const t=n.current.getBoundingClientRect().top-p.top;t&&(e.scrollTop+=t)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||o()||r()>200)return void m();const h=u||s(t)||a(t)?"1":"",g=new Pk({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:e}){if(!n.current)return;let{x:t,y:o}=e;t=Math.round(t),o=Math.round(o);const r=0===t&&0===o;n.current.style.transformOrigin="center center",n.current.style.transform=r?null:`translate3d(${t}px,${o}px,0)`,n.current.style.zIndex=h,m()}});n.current.style.transform=void 0;const f=r_(n.current),b=Math.round(c.left-f.left),v=Math.round(c.top-f.top);return g.start({x:0,y:0,from:{x:b,y:v}}),()=>{g.stop(),g.set({x:0,y:0})}}),[c,p,t,o,r,l,i,s,a]),n},i_=(0,u.createContext)({}),s_=".block-editor-block-list__block",a_=".block-list-appender",c_=".block-editor-button-block-appender";function u_(e,t){return e.closest(s_)===t.closest(s_)}function d_(e,t){return t.closest([s_,a_,c_].join(","))===e}function p_(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(s_);return t?t.id.slice(6):void 0}function m_({clientId:e,initialPosition:t}){const n=(0,u.useRef)(),{isBlockSelected:o,isMultiSelecting:r}=(0,d.useSelect)(Nr);return(0,u.useEffect)((()=>{if(!o(e)||r())return;if(null==t)return;if(!n.current)return;const{ownerDocument:l}=n.current;if(d_(n.current,l.activeElement))return;const i=As.focus.tabbable.find(n.current).filter((e=>(0,As.isTextField)(e))),s=-1===t,a=i[s?i.length-1:0]||n.current;if(d_(n.current,a)){if(!n.current.getAttribute("contenteditable")){const e=As.focus.tabbable.findNext(n.current);if(e&&d_(n.current,e)&&(0,As.isFormElement)(e))return void e.focus()}(0,As.placeCaretAtHorizontalEdge)(a,s)}else n.current.focus()}),[t,e]),n}function h_(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function g_({isEnabled:e}){return(0,p.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",h_),t.addEventListener("mouseover",h_),()=>{t.removeEventListener("mouseout",h_),t.removeEventListener("mouseover",h_),t.classList.remove("is-hovered")}}),[e])}function f_(e){const{isBlockSelected:t}=(0,d.useSelect)(Nr),{selectBlock:n,selectionChange:o}=(0,d.useDispatch)(Nr);return(0,p.useRefEffect)((r=>{function l(l){r.parentElement.closest('[contenteditable="true"]')||(t(e)?l.target.isContentEditable||o(e):d_(r,l.target)&&n(e))}return r.addEventListener("focusin",l),()=>{r.removeEventListener("focusin",l)}}),[t,n])}function b_({clientId:e,isSelected:t}){const{getBlockRootClientId:n,getBlockIndex:o}=(0,d.useSelect)(Nr),{insertAfterBlock:r,removeBlock:l}=(0,d.useDispatch)(Nr);return(0,p.useRefEffect)((n=>{if(t)return n.addEventListener("keydown",o),n.addEventListener("dragstart",i),()=>{n.removeEventListener("keydown",o),n.removeEventListener("dragstart",i)};function o(t){const{keyCode:o,target:i}=t;o!==zs.ENTER&&o!==zs.BACKSPACE&&o!==zs.DELETE||i!==n||(0,As.isTextField)(i)||(t.preventDefault(),o===zs.ENTER?r(e):l(e))}function i(e){e.preventDefault()}}),[e,t,n,o,r,l])}function v_(e){const{isNavigationMode:t,isBlockSelected:n}=(0,d.useSelect)(Nr),{setNavigationMode:o,selectBlock:r}=(0,d.useDispatch)(Nr);return(0,p.useRefEffect)((l=>{function i(l){t()&&!l.defaultPrevented&&(l.preventDefault(),n(e)?o(!1):r(e))}return l.addEventListener("mousedown",i),()=>{l.removeEventListener("mousedown",i)}}),[e,t,n,o])}function k_(){const e=(0,u.useContext)(Kw);return(0,p.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function __({clientId:e="",isEnabled:t=!0}={}){const{getEnabledClientIdsTree:n}=ie((0,d.useSelect)(Nr));return(0,p.useRefEffect)((o=>{if(!t)return;const r=t=>{(t.target===o||t.target.classList.contains("is-root-container"))&&(t.defaultPrevented||(t.preventDefault(),n(e).forEach((({clientId:e})=>{const t=o.querySelector(`[data-block="${e}"]`);t&&(t.classList.remove("has-editable-outline"),t.offsetWidth,t.classList.add("has-editable-outline"))}))))};return o.addEventListener("click",r),()=>o.removeEventListener("click",r)}),[t])}function y_(e={},{__unstableIsHtml:t}={}){const{clientId:n,className:o,wrapperProps:r={},isAligned:l,index:i,mode:s,name:a,blockApiVersion:c,blockTitle:d,isSelected:m,isSubtreeDisabled:h,isOutlineEnabled:g,hasOverlay:f,initialPosition:v,blockEditingMode:k,isHighlighted:_,isMultiSelected:E,isPartiallySelected:w,isReusable:S,isDragging:C,hasChildSelected:B,removeOutline:I,isBlockMovingMode:T,canInsertMovingBlock:M,isEditingDisabled:P,hasEditableOutline:R,isTemporarilyEditingAsBlocks:N,defaultClassName:L,templateLock:A}=(0,u.useContext)(i_),O=(0,x.sprintf)((0,x.__)("Block: %s"),d),D="html"!==s||t?"":"-visual",z=(0,p.useMergeRefs)([e.ref,m_({clientId:n,initialPosition:v}),gd(n),f_(n),b_({clientId:n,isSelected:m}),v_(n),g_({isEnabled:g}),k_(),l_({triggerAnimationOnChange:i,clientId:n}),(0,p.useDisabled)({isDisabled:!f}),__({clientId:n,isEnabled:"core/block"===a||"contentOnly"===A})]),V=y(),F=!!V[b]&&eg(a)?{"--wp-admin-theme-color":"var(--wp-bound-block-color)"}:{};return c<2&&V.clientId,{tabIndex:"disabled"===k?-1:0,...r,...e,ref:z,id:`block-${n}${D}`,role:"document","aria-label":O,"data-block":n,"data-type":a,"data-title":d,inert:h?"true":void 0,className:ml()("block-editor-block-list__block",{"wp-block":!l,"has-block-overlay":f,"is-selected":m,"is-highlighted":_,"is-multi-selected":E,"is-partially-selected":w,"is-reusable":S,"is-dragging":C,"has-child-selected":B,"remove-outline":I,"is-block-moving-mode":T,"can-insert-moving-block":M,"is-editing-disabled":P,"has-editable-outline":R,"is-content-locked-temporarily-editing-as-blocks":N},o,e.className,r.className,L),style:{...r.style,...e.style,...F}}}function E_({children:e,isHtml:t,...n}){return(0,s.createElement)("div",{...y_(n,{__unstableIsHtml:t})},e)}function w_({block:{__unstableBlockSource:e},mode:t,isLocked:n,canRemove:o,clientId:r,isSelected:l,isSelectionEnabled:i,className:a,__unstableLayoutClassNames:p,name:m,isValid:h,attributes:g,wrapperProps:f,setAttributes:b,onReplace:v,onInsertBlocksAfter:k,onMerge:_,toggleSelection:y}){var E;const{mayDisplayControls:w,mayDisplayParentControls:S,themeSupportsLayout:C,...x}=(0,u.useContext)(i_),{removeBlock:B}=(0,d.useDispatch)(Nr),I=(0,u.useCallback)((()=>B(r)),[r]),T=Ui()||{};let M=(0,s.createElement)(yf,{name:m,isSelected:l,attributes:g,setAttributes:b,insertBlocksAfter:n?void 0:k,onReplace:o?v:void 0,onRemove:o?I:void 0,mergeBlocks:o?_:void 0,clientId:r,isSelectionEnabled:i,toggleSelection:y,__unstableLayoutClassNames:p,__unstableParentLayout:Object.keys(T).length?T:void 0,mayDisplayControls:w,mayDisplayParentControls:S,blockEditingMode:x.blockEditingMode});const P=(0,c.getBlockType)(m);P?.getEditWrapperProps&&(f=function(e,t){const n={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(n.className=ml()(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(n.style={...e.style,...t.style}),n}(f,P.getEditWrapperProps(g)));const R=f&&!!f["data-align"]&&!C,N=a?.includes("is-position-sticky");let L;if(R&&(M=(0,s.createElement)("div",{className:ml()("wp-block",N&&a),"data-align":f["data-align"]},M)),h)L="html"===t?(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{style:{display:"none"}},M),(0,s.createElement)(E_,{isHtml:!0},(0,s.createElement)(Lf,{clientId:r}))):P?.apiVersion>1?M:(0,s.createElement)(E_,null,M);else{const t=e?(0,c.serializeRawBlock)(e):(0,c.getSaveContent)(P,g);L=(0,s.createElement)(E_,{className:"has-warning"},(0,s.createElement)(If,{clientId:r}),(0,s.createElement)(u.RawHTML,null,(0,As.safeHTML)(t)))}const{"data-align":A,...O}=null!==(E=f)&&void 0!==E?E:{};return O.className=ml()(O.className,A&&C&&`align${A}`,!(A&&N)&&a),(0,s.createElement)(i_.Provider,{value:{wrapperProps:O,isAligned:R,...x}},(0,s.createElement)(Rf,{fallback:(0,s.createElement)(E_,{className:"has-warning"},(0,s.createElement)(Mf,null))},L))}y_.save=c.__unstableGetBlockProps;const S_=(0,d.withDispatch)(((e,t,n)=>{const{updateBlockAttributes:o,insertBlocks:r,mergeBlocks:l,replaceBlocks:i,toggleSelection:s,__unstableMarkLastChangeAsPersistent:a,moveBlocksToPosition:u,removeBlock:d}=e(Nr);return{setAttributes(e){const{getMultiSelectedBlockClientIds:r}=n.select(Nr),l=r(),{clientId:i}=t,s=l.length?l:[i];o(s,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;r(e,n,o)},onInsertBlocksAfter(e){const{clientId:o,rootClientId:l}=t,{getBlockIndex:i}=n.select(Nr),s=i(o);r(e,s+1,l)},onMerge(e){const{clientId:o,rootClientId:i}=t,{getPreviousBlockClientId:s,getNextBlockClientId:a,getBlock:p,getBlockAttributes:m,getBlockName:h,getBlockOrder:g,getBlockIndex:f,getBlockRootClientId:b,canInsertBlockType:v}=n.select(Nr);function k(e,t=!0){const o=b(e),l=g(e),[i]=l;1===l.length&&(0,c.isUnmodifiedBlock)(p(i))?d(e):n.batch((()=>{if(v(h(i),o))u([i],e,o,f(e));else{const n=(0,c.switchToBlockType)(p(i),(0,c.getDefaultBlockName)());n&&n.length&&(r(n,f(e),o,t),d(i,!1))}!g(e).length&&(0,c.isUnmodifiedBlock)(p(e))&&d(e,!1)}))}if(e){if(i){const e=a(i);if(e){if(h(i)!==h(e))return void l(i,e);{const t=m(i),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{u(g(e),e,i),d(e,!1)}))}}}const e=a(o);if(!e)return;g(e).length?k(e,!1):l(o,e)}else{const e=s(o);if(e)l(e,o);else if(i){const e=s(i);if(e&&h(i)===h(e)){const t=m(i),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{u(g(i),i,e),d(i,!1)}))}k(i)}else d(o)}},onReplace(e,n,o){e.length&&!(0,c.isUnmodifiedDefaultBlock)(e[e.length-1])&&a();const r=1===e?.length&&Array.isArray(e[0])?e[0]:e;i([t.clientId],r,n,o)},toggleSelection(e){s(e)}}}));w_=(0,p.compose)(S_,(0,_l.withFilters)("editor.BlockListBlock"))(w_);const C_=(0,u.memo)((function(e){const{clientId:t,rootClientId:n}=e,o=(0,d.useSelect)((e=>{const{isBlockSelected:o,getBlockMode:r,isSelectionEnabled:l,getTemplateLock:i,getBlockWithoutAttributes:s,getBlockAttributes:a,canRemoveBlock:u,canMoveBlock:d,getSettings:p,__unstableGetTemporarilyEditingAsBlocks:m,getBlockEditingMode:h,getBlockName:g,isFirstMultiSelectedBlock:f,getMultiSelectedBlockClientIds:b,hasSelectedInnerBlock:v,getBlockIndex:k,isTyping:_,isBlockMultiSelected:y,isBlockSubtreeDisabled:E,isBlockHighlighted:w,__unstableIsFullySelected:S,__unstableSelectionHasUnmergeableBlock:C,isBlockBeingDragged:x,isDragging:B,hasBlockMovingClientId:I,canInsertBlockType:T,__unstableHasActiveBlockOverlayActive:M,__unstableGetEditorMode:P,getSelectedBlocksInitialCaretPosition:R}=ie(e(Nr)),N=s(t);if(!N)return;const{hasBlockSupport:L,getActiveBlockVariation:A}=e(c.store),O=o(t),D=u(t,n),z=d(t,n),V=a(t),{name:F,isValid:H}=N,G=(0,c.getBlockType)(F),U=A(F,V),{outlineMode:$,supportsLayout:j}=p(),W=y(t),K=v(t,!0),Z=_(),q=G?.apiVersion>1,Y=I(),X=h(t);return{mode:r(t),isSelectionEnabled:l(),isLocked:!!i(n),templateLock:i(t),canRemove:D,canMove:z,blockWithoutAttributes:N,name:F,attributes:V,isValid:H,isSelected:O,themeSupportsLayout:j,isTemporarilyEditingAsBlocks:m()===t,blockEditingMode:X,mayDisplayControls:O||f(t)&&b().every((e=>g(e)===F)),mayDisplayParentControls:L(g(t),"__experimentalExposeControlsToChildren",!1)&&v(t),index:k(t),blockApiVersion:G?.apiVersion||1,blockTitle:U?.title||G?.title,isSubtreeDisabled:"disabled"===X&&E(t),isOutlineEnabled:$,hasOverlay:M(t)&&!B(),initialPosition:O&&"edit"===P()?R():void 0,isHighlighted:w(t),isMultiSelected:W,isPartiallySelected:W&&!S()&&!C(),isReusable:(0,c.isReusableBlock)(G),isDragging:x(t),hasChildSelected:K,removeOutline:O&&$&&Z,isBlockMovingMode:!!Y,canInsertMovingBlock:Y&&T(g(Y),n),isEditingDisabled:"disabled"===X,hasEditableOutline:"disabled"!==X&&"disabled"===h(n),className:q?V.className:void 0,defaultClassName:q?(0,c.getBlockDefaultClassName)(F):void 0}}),[t,n]),{mode:r,isSelectionEnabled:l,isLocked:i,canRemove:a,canMove:p,blockWithoutAttributes:m,name:h,attributes:g,isValid:f,isSelected:b,themeSupportsLayout:v,isTemporarilyEditingAsBlocks:k,blockEditingMode:_,mayDisplayControls:y,mayDisplayParentControls:E,index:w,blockApiVersion:S,blockTitle:C,isSubtreeDisabled:x,isOutlineEnabled:B,hasOverlay:I,initialPosition:T,isHighlighted:M,isMultiSelected:P,isPartiallySelected:R,isReusable:N,isDragging:L,hasChildSelected:A,removeOutline:O,isBlockMovingMode:D,canInsertMovingBlock:z,templateLock:V,isEditingDisabled:F,hasEditableOutline:H,className:G,defaultClassName:U}=o,$=(0,u.useMemo)((()=>({...m,attributes:g})),[m,g]);if(!o)return null;const j={clientId:t,className:G,index:w,mode:r,name:h,blockApiVersion:S,blockTitle:C,isSelected:b,isSubtreeDisabled:x,isOutlineEnabled:B,hasOverlay:I,initialPosition:T,blockEditingMode:_,isHighlighted:M,isMultiSelected:P,isPartiallySelected:R,isReusable:N,isDragging:L,hasChildSelected:A,removeOutline:O,isBlockMovingMode:D,canInsertMovingBlock:z,templateLock:V,isEditingDisabled:F,hasEditableOutline:H,isTemporarilyEditingAsBlocks:k,defaultClassName:U,mayDisplayControls:y,mayDisplayParentControls:E,themeSupportsLayout:v};return(0,s.createElement)(i_.Provider,{value:j},(0,s.createElement)(w_,{...e,mode:r,isSelectionEnabled:l,isLocked:i,canRemove:a,canMove:p,block:$,name:h,attributes:g,isValid:f,isSelected:b}))})),x_=window.wp.htmlEntities,B_=[(0,u.createInterpolateElement)((0,x.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,s.createElement)("kbd",null)}),(0,u.createInterpolateElement)((0,x.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,u.createInterpolateElement)((0,x.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,x.__)("Drag files into the editor to automatically insert media blocks."),(0,x.__)("Change a block's type by pressing the block icon on the toolbar.")];const I_=function(){const[e]=(0,u.useState)(Math.floor(Math.random()*B_.length));return(0,s.createElement)(_l.Tip,null,B_[e])},T_=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),M_=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));const P_=function({title:e,icon:t,description:n,blockType:o,className:r}){o&&(w()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:e,icon:t,description:n}=o));const{parentNavBlockClientId:l}=(0,d.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockParentsByBlockName:n}=e(Nr);return{parentNavBlockClientId:n(t(),"core/navigation",!0)[0]}}),[]),{selectBlock:i}=(0,d.useDispatch)(Nr);return(0,s.createElement)("div",{className:ml()("block-editor-block-card",r)},l&&(0,s.createElement)(_l.Button,{onClick:()=>i(l),label:(0,x.__)("Go to parent Navigation block"),style:{minWidth:24,padding:0},icon:(0,x.isRTL)()?T_:M_,size:"small"}),(0,s.createElement)(qh,{icon:t,showColors:!0}),(0,s.createElement)("div",{className:"block-editor-block-card__content"},(0,s.createElement)("h2",{className:"block-editor-block-card__title"},e),n&&(0,s.createElement)("span",{className:"block-editor-block-card__description"},n)))},R_=(0,p.createHigherOrderComponent)((e=>(0,d.withRegistry)((({useSubRegistry:t=!0,registry:n,...o})=>{if(!t)return(0,s.createElement)(e,{registry:n,...o});const[r,l]=(0,u.useState)(null);return(0,u.useEffect)((()=>{const e=(0,d.createRegistry)({},n);e.registerStore(oe,Rr),l(e)}),[n]),r?(0,s.createElement)(d.RegistryProvider,{value:r},(0,s.createElement)(e,{registry:r,...o})):null}))),"withRegistryProvider"),N_=()=>{};function L_({clientId:e=null,value:t,selection:n,onChange:o=N_,onInput:r=N_}){const l=(0,d.useRegistry)(),{resetBlocks:i,resetSelection:s,replaceInnerBlocks:a,setHasControlledInnerBlocks:p,__unstableMarkNextChangeAsNotPersistent:m}=l.dispatch(Nr),{getBlockName:h,getBlocks:g,getSelectionStart:f,getSelectionEnd:b}=l.select(Nr),v=(0,d.useSelect)((t=>!e||t(Nr).areInnerBlocksControlled(e)),[e]),k=(0,u.useRef)({incoming:null,outgoing:[]}),_=(0,u.useRef)(!1),y=()=>{t&&(m(),e?l.batch((()=>{p(e,!0);const n=t.map((e=>(0,c.cloneBlock)(e)));_.current&&(k.current.incoming=n),m(),a(e,n)})):(_.current&&(k.current.incoming=t),i(t)))},E=(0,u.useRef)(r),w=(0,u.useRef)(o);(0,u.useEffect)((()=>{E.current=r,w.current=o}),[r,o]),(0,u.useEffect)((()=>{k.current.outgoing.includes(t)?k.current.outgoing[k.current.outgoing.length-1]===t&&(k.current.outgoing=[]):g(e)!==t&&(k.current.outgoing=[],y(),n&&s(n.selectionStart,n.selectionEnd,n.initialPosition))}),[t,e]),(0,u.useEffect)((()=>{v||(k.current.outgoing=[],y())}),[v]),(0,u.useEffect)((()=>{const{getSelectedBlocksInitialCaretPosition:t,isLastBlockChangePersistent:n,__unstableIsLastBlockChangeIgnored:o,areInnerBlocksControlled:r}=l.select(Nr);let i=g(e),s=n(),a=!1;_.current=!0;const c=l.subscribe((()=>{if(null!==e&&null===h(e))return;if(!(!e||r(e)))return;const l=n(),c=g(e),u=c!==i;if(i=c,u&&(k.current.incoming||o()))return k.current.incoming=null,void(s=l);if(u||a&&!u&&l&&!s){s=l,k.current.outgoing.push(i);const e=s?w.current:E.current,n=wn.has(i);n&&wn.delete(i),e(i,{selection:{selectionStart:f(),selectionEnd:b(),initialPosition:t()},undoIgnore:n})}a=u}),Nr);return()=>{_.current=!1,c()}}),[l,e]),(0,u.useEffect)((()=>()=>{m(),e?(p(e,!1),m(),a(e,[])):i([])}),[])}const A_=window.wp.keyboardShortcuts;function O_(){return null}O_.Register=function(){const{registerShortcut:e}=(0,d.useDispatch)(A_.store);return(0,u.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,x.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,x.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,x.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:(0,x.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:(0,x.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,x.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:(0,x.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,x.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,x.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,x.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,x.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};const D_=O_,z_=R_((e=>{const{children:t,settings:n,stripExperimentalSettings:o=!1}=e,{__experimentalUpdateSettings:r}=ie((0,d.useDispatch)(Nr));return(0,u.useEffect)((()=>{r({...n,__internalIsInitialized:!0},{stripExperimentalSettings:o,reset:!0})}),[n,o,r]),L_(e),(0,s.createElement)(_l.SlotFillProvider,{passthrough:!0},!n?.__unstableIsPreviewMode&&(0,s.createElement)(D_.Register,null),(0,s.createElement)(hd,null,t))})),V_=e=>(0,s.createElement)(z_,{...e,stripExperimentalSettings:!0},e.children);function F_(){const{getSettings:e,hasSelectedBlock:t,hasMultiSelection:n}=(0,d.useSelect)(Nr),{clearSelectedBlock:o}=(0,d.useDispatch)(Nr),{clearBlockSelection:r}=e();return(0,p.useRefEffect)((e=>{if(r)return e.addEventListener("mousedown",l),()=>{e.removeEventListener("mousedown",l)};function l(r){(t()||n())&&r.target===e&&o()}}),[t,n,o,r])}function H_(e){return(0,s.createElement)("div",{ref:F_(),...e})}function G_(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r,getSelectedBlocksInitialCaretPosition:l,__unstableIsFullySelected:i}=e(Nr);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r(),initialPosition:l(),isFullSelection:i()}}function U_(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r,isFullSelection:l}=(0,d.useSelect)(G_,[]);return(0,p.useRefEffect)((r=>{const{ownerDocument:i}=r,{defaultView:s}=i;if(null==e)return;if(!o||t)return;const{length:a}=n;a<2||l&&(r.contentEditable=!0,r.focus(),s.getSelection().removeAllRanges())}),[o,t,n,r,e,l])}function $_(e,t,n,o){let r,l=As.focus.focusable.find(n);return t&&l.reverse(),l=l.slice(l.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),l.find((function(e){if(!(e.closest("[inert]")||1===e.children.length&&u_(e,e.firstElementChild)&&"true"===e.firstElementChild.getAttribute("contenteditable"))){if(!As.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(o){const t=e.getBoundingClientRect();if(t.left>=r.right||t.right<=r.left)return!1}return!0}}))}function j_(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:o,__unstableIsFullySelected:r}=(0,d.useSelect)(Nr),{selectBlock:l}=(0,d.useDispatch)(Nr);return(0,p.useRefEffect)((i=>{let s;function a(){s=null}function c(a){if(a.defaultPrevented)return;const{keyCode:c,target:u,shiftKey:d,ctrlKey:p,altKey:m,metaKey:h}=a,g=c===zs.UP,f=c===zs.DOWN,b=c===zs.LEFT,v=c===zs.RIGHT,k=g||b,_=b||v,y=g||f,E=_||y,w=d||p||m||h,S=y?As.isVerticalEdge:As.isHorizontalEdge,{ownerDocument:C}=i,{defaultView:x}=C;if(!E)return;if(o()){if(d)return;if(!r())return;return a.preventDefault(),void(k?l(e()):l(t(),-1))}if(!function(e,t,n){const o=t===zs.UP||t===zs.DOWN,{tagName:r}=e,l=e.getAttribute("type");if(o&&!n)return"INPUT"!==r||!["date","datetime-local","month","number","range","time","week"].includes(l);if("INPUT"===r)return["button","checkbox","number","color","file","image","radio","reset","submit"].includes(l);return"TEXTAREA"!==r}(u,c,w))return;y?s||(s=(0,As.computeCaretRect)(x)):s=null;const B=(0,As.isRTL)(u)?!k:k,{keepCaretInsideBlock:I}=n();if(d)(function(e,t){const n=$_(e,t,i);return n&&p_(n)})(u,k)&&S(u,k)&&(i.contentEditable=!0,i.focus());else if(!y||!(0,As.isVerticalEdge)(u,k)||m&&!(0,As.isHorizontalEdge)(u,B)||I){if(_&&x.getSelection().isCollapsed&&(0,As.isHorizontalEdge)(u,B)&&!I){const e=$_(u,B,i);(0,As.placeCaretAtHorizontalEdge)(e,k),a.preventDefault()}}else{const e=$_(u,k,i,!0);e&&((0,As.placeCaretAtVerticalEdge)(e,m?!k:k,m?void 0:s),a.preventDefault())}}return i.addEventListener("mousedown",a),i.addEventListener("keydown",c),()=>{i.removeEventListener("mousedown",a),i.removeEventListener("keydown",c)}}),[])}function W_(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,d.useSelect)(Nr),{multiSelect:o,selectBlock:r}=(0,d.useDispatch)(Nr),l=(0,A_.__unstableUseShortcutEventMatch)();return(0,p.useRefEffect)((i=>{function s(s){if(!l("core/block-editor/select-all",s))return;const a=t();if(a.length<2&&!(0,As.isEntirelySelected)(s.target))return;s.preventDefault();const[c]=a,u=n(c),d=e(u);a.length!==d.length?o(d[0],d[d.length-1]):u&&(i.ownerDocument.defaultView.getSelection().removeAllRanges(),r(u))}return i.addEventListener("keydown",s),()=>{i.removeEventListener("keydown",s)}}),[])}function K_(e,t){e.contentEditable=t,t&&e.focus()}function Z_(){const{startMultiSelect:e,stopMultiSelect:t}=(0,d.useDispatch)(Nr),{isSelectionEnabled:n,hasSelectedBlock:o,isDraggingBlocks:r,isMultiSelecting:l}=(0,d.useSelect)(Nr);return(0,p.useRefEffect)((i=>{const{ownerDocument:s}=i,{defaultView:a}=s;let c,u;function d(){t(),a.removeEventListener("mouseup",d),u=a.requestAnimationFrame((()=>{if(!o())return;K_(i,!1);const e=a.getSelection();if(e.rangeCount){const t=e.getRangeAt(0),{commonAncestorContainer:n}=t,o=t.cloneRange();c.contains(n)&&(c.focus(),e.removeAllRanges(),e.addRange(o))}}))}function p({buttons:t,target:o,relatedTarget:s}){o.contains(s)||r()||1===t&&(l()||i!==o&&"true"===o.getAttribute("contenteditable")&&n()&&(c=o,e(),a.addEventListener("mouseup",d),K_(i,!0)))}return i.addEventListener("mouseout",p),()=>{i.removeEventListener("mouseout",p),a.removeEventListener("mouseup",d),a.cancelAnimationFrame(u)}}),[e,t,n,o])}function q_(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function Y_(e){const t=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;return t?.closest("[data-wp-block-attribute-key]")}function X_(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,d.useDispatch)(Nr),{getBlockParents:o,getBlockSelectionStart:r,isMultiSelecting:l}=(0,d.useSelect)(Nr);return(0,p.useRefEffect)((i=>{const{ownerDocument:s}=i,{defaultView:a}=s;function c(s){const c=a.getSelection();if(!c.rangeCount)return;const u=function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(c),d=function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:t.childNodes[n]}(c);if(!i.contains(u)||!i.contains(d))return;const p=s.shiftKey&&"mouseup"===s.type;if(c.isCollapsed&&!p){if("true"===i.contentEditable&&!l()){q_(i,!1);let e=u.nodeType===u.ELEMENT_NODE?u:u.parentElement;e=e?.closest("[contenteditable]"),e?.focus()}return}let m=p_(u),h=p_(d);if(p){const e=r(),t=p_(s.target),n=t!==h;(m===h&&c.isCollapsed||!h||n)&&(h=t),m!==e&&(m=e)}if(void 0===m&&void 0===h)return void q_(i,!1);if(m===h)l()?e(m,m):t(m);else{const t=[...o(m),m],r=[...o(h),h],l=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,r);if(t[l]!==m||r[l]!==h)return void e(t[l],r[l]);const i=Y_(u),s=Y_(d);if(i&&s){var g,f;const e=c.getRangeAt(0),t=(0,Y.create)({element:i,range:e,__unstableIsEditableTree:!0}),o=(0,Y.create)({element:s,range:e,__unstableIsEditableTree:!0}),r=null!==(g=t.start)&&void 0!==g?g:t.end,l=null!==(f=o.start)&&void 0!==f?f:o.end;n({start:{clientId:m,attributeKey:i.dataset.wpBlockAttributeKey,offset:r},end:{clientId:h,attributeKey:s.dataset.wpBlockAttributeKey,offset:l}})}else e(m,h)}}return s.addEventListener("selectionchange",c),a.addEventListener("mouseup",c),()=>{s.removeEventListener("selectionchange",c),a.removeEventListener("mouseup",c)}}),[e,t,n,o])}function Q_(){const{selectBlock:e}=(0,d.useDispatch)(Nr),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:o}=(0,d.useSelect)(Nr);return(0,p.useRefEffect)((r=>{function l(l){if(!t()||0!==l.button)return;const i=n(),s=p_(l.target);l.shiftKey?i!==s&&(r.contentEditable=!0,r.focus()):o()&&e(s)}return r.addEventListener("mousedown",l),()=>{r.removeEventListener("mousedown",l)}}),[e,t,n,o])}function J_(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,__unstableIsSelectionMergeable:n,hasMultiSelection:o}=(0,d.useSelect)(Nr),{replaceBlocks:r,__unstableSplitSelection:l,removeBlocks:i,__unstableDeleteSelection:s,__unstableExpandSelection:a}=(0,d.useDispatch)(Nr);return(0,p.useRefEffect)((u=>{function d(e){"true"===u.contentEditable&&e.preventDefault()}function p(d){d.defaultPrevented||o()&&(d.keyCode===zs.ENTER?(u.contentEditable=!1,d.preventDefault(),e()?r(t(),(0,c.createBlock)((0,c.getDefaultBlockName)())):l()):d.keyCode===zs.BACKSPACE||d.keyCode===zs.DELETE?(u.contentEditable=!1,d.preventDefault(),e()?i(t()):n()?s(d.keyCode===zs.DELETE):a()):1!==d.key.length||d.metaKey||d.ctrlKey||(u.contentEditable=!1,n()?s(d.keyCode===zs.DELETE):(d.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges())))}function m(e){o()&&(u.contentEditable=!1,n()?s():(e.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges()))}return u.addEventListener("beforeinput",d),u.addEventListener("keydown",p),u.addEventListener("compositionstart",m),()=>{u.removeEventListener("beforeinput",d),u.removeEventListener("keydown",p),u.removeEventListener("compositionstart",m)}}),[])}function ey(){const{getBlockName:e}=(0,d.useSelect)(Nr),{getBlockType:t}=(0,d.useSelect)(c.store),{createSuccessNotice:n}=(0,d.useDispatch)(Os.store);return(0,u.useCallback)(((o,r)=>{let l="";if(1===r.length){const n=r[0],i=t(e(n))?.title;l="copy"===o?(0,x.sprintf)((0,x.__)('Copied "%s" to clipboard.'),i):(0,x.sprintf)((0,x.__)('Moved "%s" to clipboard.'),i)}else l="copy"===o?(0,x.sprintf)((0,x._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):(0,x.sprintf)((0,x._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(l,{type:"snackbar"})}),[])}function ty({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch(t){try{n=e.getData("Text")}catch(e){return}}n=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;const o=(e=e.substring(n+20)).indexOf("\x3c!--EndFragment--\x3e");return o>-1&&(e=e.substring(0,o)),e}(n),n=function(e){const t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(22):e}(n);const o=(0,As.getFilesFromDataTransfer)(e);return o.length&&!function(e,t){if(t&&1===e?.length&&0===e[0].type.indexOf("image/")){const e=/<\s*img\b/gi;if(1!==t.match(e)?.length)return!0;const n=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(n))return!0}return!1}(o,n)?{files:o}:{html:n,plainText:t,files:[]}}const ny=Symbol("requiresWrapperOnCopy");function oy(e,t,n){let o=t;const[r]=t;if(r){if(n.select(c.store).getBlockType(r.name)[ny]){const{getBlockRootClientId:e,getBlockName:t,getBlockAttributes:l}=n.select(Nr),i=e(r.clientId),s=t(i);s&&(o=(0,c.createBlock)(s,l(i),o))}}const l=(0,c.serialize)(o);e.clipboardData.setData("text/plain",function(e){e=e.replace(/<br>/g,"\n");return(0,As.__unstableStripHTML)(e).trim().replace(/\n\n+/g,"\n\n")}(l)),e.clipboardData.setData("text/html",l)}function ry(e,t){const{plainText:n,html:o,files:r}=ty(e);let l=[];if(r.length){const e=(0,c.getBlockTransforms)("from");l=r.reduce(((t,n)=>{const o=(0,c.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat()}else l=(0,c.pasteHandler)({HTML:o,plainText:n,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return l}function ly(){const e=(0,d.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:n,hasMultiSelection:o,getSettings:r,__unstableIsFullySelected:l,__unstableIsSelectionCollapsed:i,__unstableIsSelectionMergeable:s,__unstableGetSelectedBlocksWithPartialSelection:a,canInsertBlockType:c}=(0,d.useSelect)(Nr),{flashBlock:u,removeBlocks:m,replaceBlocks:h,__unstableDeleteSelection:g,__unstableExpandSelection:f,insertBlocks:b}=(0,d.useDispatch)(Nr),v=ey();return(0,p.useRefEffect)((d=>{function p(p){if(p.defaultPrevented)return;const k=n();if(0===k.length)return;if(!o()){const{target:e}=p,{ownerDocument:t}=e;if("copy"===p.type||"cut"===p.type?(0,As.documentHasUncollapsedSelection)(t):(0,As.documentHasSelection)(t))return}if(!d.contains(p.target.ownerDocument.activeElement))return;p.preventDefault();const _=s(),y=i()||l(),E=!y&&!_;if("copy"===p.type||"cut"===p.type)if(1===k.length&&u(k[0]),E)f();else{let n;if(v(p.type,k),y)n=t(k);else{const[e,o]=a();n=[e,...t(k.slice(1,k.length-1)),o]}oy(p,n,e)}if("cut"===p.type)y&&!E?m(k):(p.target.ownerDocument.activeElement.contentEditable=!1,g());else if("paste"===p.type){const{__experimentalCanUserUseUnfilteredHTML:e}=r(),t=ry(p,e);if(1===k.length){const[e]=k;if(t.every((t=>c(t.name,e))))return void b(t,void 0,e)}h(k,t,t.length-1,-1)}}return d.ownerDocument.addEventListener("copy",p),d.ownerDocument.addEventListener("cut",p),d.ownerDocument.addEventListener("paste",p),()=>{d.ownerDocument.removeEventListener("copy",p),d.ownerDocument.removeEventListener("cut",p),d.ownerDocument.removeEventListener("paste",p)}}),[])}function iy(){const[e,t,n]=function(){const e=(0,u.useRef)(),t=(0,u.useRef)(),n=(0,u.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:r,getBlockCount:l}=(0,d.useSelect)(Nr),{setNavigationMode:i,setLastFocus:a}=ie((0,d.useDispatch)(Nr)),c=(0,d.useSelect)((e=>e(Nr).isNavigationMode()),[]),{getLastFocus:m}=ie((0,d.useSelect)(Nr)),h=c?void 0:"0",g=(0,u.useRef)();function f(t){if(g.current)g.current=null;else if(o())e.current.focus();else if(r())m()?.current.focus();else{i(!0);const n=e.current.ownerDocument===t.target.ownerDocument?e.current:e.current.ownerDocument.defaultView.frameElement,o=t.target.compareDocumentPosition(n)&t.target.DOCUMENT_POSITION_FOLLOWING,r=As.focus.tabbable.find(e.current);r.length&&(o?r[0]:r[r.length-1]).focus()}}const b=(0,s.createElement)("div",{ref:t,tabIndex:h,onFocus:f}),v=(0,s.createElement)("div",{ref:n,tabIndex:h,onFocus:f}),k=(0,p.useRefEffect)((s=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===zs.ESCAPE&&!o())return e.preventDefault(),void i(!0);if(e.keyCode!==zs.TAB)return;const l=e.shiftKey,a=l?"findPrevious":"findNext";if(!o()&&!r())return void(e.target===s&&i(!0));const c=As.focus.tabbable[a](e.target),u=e.target.closest("[data-block]"),d=u&&c&&(u_(u,c)||d_(u,c));if((0,As.isFormElement)(c)&&d)return;const p=l?t:n;g.current=!0,p.current.focus({preventScroll:!0})}function u(e){a({...m(),current:e.target});const{ownerDocument:t}=s;e.relatedTarget||t.activeElement!==t.body||0!==l()||s.focus()}function d(o){if(o.keyCode!==zs.TAB)return;if("region"===o.target?.getAttribute("role"))return;if(e.current===o.target)return;const r=o.shiftKey?"findPrevious":"findNext",l=As.focus.tabbable[r](o.target);l!==t.current&&l!==n.current||(o.preventDefault(),l.focus({preventScroll:!0}))}const{ownerDocument:p}=s,{defaultView:h}=p;return h.addEventListener("keydown",d),s.addEventListener("keydown",c),s.addEventListener("focusout",u),()=>{h.removeEventListener("keydown",d),s.removeEventListener("keydown",c),s.removeEventListener("focusout",u)}}),[]);return[b,(0,p.useMergeRefs)([e,k]),v]}(),o=(0,d.useSelect)((e=>e(Nr).hasMultiSelection()),[]);return[e,(0,p.useMergeRefs)([t,ly(),J_(),Z_(),X_(),Q_(),U_(),W_(),j_(),(0,p.useRefEffect)((e=>{if(e.tabIndex=0,o)return e.classList.add("has-multi-selection"),e.setAttribute("aria-label",(0,x.__)("Multiple selected blocks")),()=>{e.classList.remove("has-multi-selection"),e.removeAttribute("aria-label")}}),[o])]),n]}const sy=(0,u.forwardRef)((function({children:e,...t},n){const[o,r,l]=iy();return(0,s.createElement)(s.Fragment,null,o,(0,s.createElement)("div",{...t,ref:(0,p.useMergeRefs)([r,n]),className:ml()(t.className,"block-editor-writing-flow")},e),l)}));let ay=null;function cy(e,t,n){const o={};for(const t in e)o[t]=e[t];if(e instanceof n.contentDocument.defaultView.MouseEvent){const e=n.getBoundingClientRect();o.clientX+=e.left,o.clientY+=e.top}const r=new t(e.type,o);o.defaultPrevented&&r.preventDefault();!n.dispatchEvent(r)&&e.preventDefault()}function uy(e){return(0,p.useRefEffect)((()=>{const{defaultView:t}=e;if(!t)return;const{frameElement:n}=t,o=e.documentElement,r=["dragover","mousemove"],l={};for(const e of r)l[e]=e=>{const t=Object.getPrototypeOf(e).constructor.name;cy(e,window[t],n)},o.addEventListener(e,l[e]);return()=>{for(const e of r)o.removeEventListener(e,l[e])}}))}function dy({contentRef:e,children:t,tabIndex:n=0,scale:o=1,frameSize:r=0,expand:l=!1,readonly:i,forwardedRef:a,...c}){const{resolvedAssets:m,isPreviewMode:h}=(0,d.useSelect)((e=>{const t=e(Nr).getSettings();return{resolvedAssets:t.__unstableResolvedAssets,isPreviewMode:t.__unstableIsPreviewMode}}),[]),{styles:g="",scripts:f=""}=m,[b,v]=(0,u.useState)(),[k,_]=(0,u.useState)([]),y=F_(),[E,w,S]=iy(),[C,{height:B}]=(0,p.useResizeObserver)(),I=(0,p.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function o(){const{contentDocument:o,ownerDocument:r}=e,{documentElement:l}=o;t=o,y(l),_(Array.from(r.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),o.dir=r.dir;for(const e of ay||(ay=Array.from(document.styleSheets).reduce(((e,t)=>{try{t.cssRules}catch(t){return e}const{ownerNode:n,cssRules:o}=t;if(null===n)return e;if(!o)return e;if("wp-reset-editor-styles-css"===n.id)return e;if(!n.id)return e;if(function e(t){return Array.from(t).find((({selectorText:t,conditionText:n,cssRules:o})=>n?e(o):t&&(t.includes(".editor-styles-wrapper")||t.includes(".wp-block"))))}(o)){const t="STYLE"===n.tagName;if(t){const t=n.id.replace("-inline-css","-css"),o=document.getElementById(t);o&&e.push(o.cloneNode(!0))}if(e.push(n.cloneNode(!0)),!t){const t=n.id.replace("-css","-inline-css"),o=document.getElementById(t);o&&e.push(o.cloneNode(!0))}}return e}),[]),ay))o.getElementById(e.id)||(o.head.appendChild(e.cloneNode(!0)),h||console.warn(`${e.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,e));t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1)}return e._load=()=>{v(e.contentDocument)},e.addEventListener("load",o),()=>{delete e._load,e.removeEventListener("load",o),t?.removeEventListener("dragover",n),t?.removeEventListener("drop",n)}}),[]),T=(0,p.useDisabled)({isDisabled:!i}),M=(0,p.useMergeRefs)([uy(b),e,y,w,T]),P=`<!doctype html>\n<html>\n\t<head>\n\t\t<meta charset="utf-8">\n\t\t<script>window.frameElement._load()<\/script>\n\t\t<style>html{height:auto!important;min-height:100%;}body{margin:0}</style>\n\t\t${g}\n\t\t${f}\n\t</head>\n\t<body>\n\t\t<script>document.currentScript.parentElement.remove()<\/script>\n\t</body>\n</html>`,[R,N]=(0,u.useMemo)((()=>{const e=URL.createObjectURL(new window.Blob([P],{type:"text/html"}));return[e,()=>URL.revokeObjectURL(e)]}),[P]);(0,u.useEffect)((()=>N),[N]);const L=B*(1-o)/2;return(0,s.createElement)(s.Fragment,null,n>=0&&E,(0,s.createElement)("iframe",{...c,style:{border:0,...c.style,height:l?B:c.style?.height,marginTop:1!==o?-L+r:c.style?.marginTop,marginBottom:1!==o?-L+r:c.style?.marginBottom,transform:1!==o?`scale( ${o} )`:c.style?.transform,transition:"all .3s"},ref:(0,p.useMergeRefs)([a,I]),tabIndex:n,src:R,title:(0,x.__)("Editor canvas"),onKeyDown:e=>{c.onKeyDown?c.onKeyDown(e):e.currentTarget.ownerDocument!==e.target.ownerDocument&&(e.stopPropagation(),cy(e,window.KeyboardEvent,e.currentTarget))}},b&&(0,u.createPortal)((0,s.createElement)("body",{ref:M,className:ml()("block-editor-iframe__body","editor-styles-wrapper",...k)},C,(0,s.createElement)(_l.__experimentalStyleProvider,{document:b},t)),b.documentElement)),n>=0&&S)}const py=(0,u.forwardRef)((function(e,t){return(0,d.useSelect)((e=>e(Nr).getSettings().__internalIsInitialized),[])?(0,s.createElement)(dy,{...e,forwardedRef:t}):null}));var my=n(4529);const hy=my,gy=(my.stringify,my.fromJSON,my.plugin,my.parse,my.list,my.document,my.comment,my.atRule,my.rule,my.decl,my.root,my.CssSyntaxError);my.Declaration,my.Container,my.Processor,my.Document,my.Comment,my.Warning,my.AtRule,my.Result,my.Input,my.Rule,my.Root,my.Node;var fy=n(8036),by=n.n(fy),vy=n(5404),ky=n.n(vy);const _y=new WeakMap;const yy=(e,t="")=>e.map((e=>{if(_y.has(e))return _y.get(e);const n=function({css:e,ignoredSelectors:t=[],baseURL:n},o=""){if(!o&&!n)return e;try{return hy([o&&by()(o,{ignoredSelectors:[...t,o]}),n&&ky()({rootUrl:n})].filter(Boolean)).process(e,{}).css}catch(e){return e instanceof gy?console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",e.message+"\n"+e.showSourceCode(!1)):console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",e),null}}(e,t);return _y.set(e,n),n}));function Ey(e,t){return(0,u.useCallback)((e=>{if(!e)return;const{ownerDocument:n}=e,{defaultView:o,body:r}=n,l=t?n.querySelector(t):r;let i;if(l)i=o?.getComputedStyle(l,null).getPropertyValue("background-color");else{const e=n.createElement("div");e.classList.add("editor-styles-wrapper"),r.appendChild(e),i=o?.getComputedStyle(e,null).getPropertyValue("background-color"),r.removeChild(e)}const s=Vc(i);s.luminance()>.5||0===s.alpha()?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}),[e,t])}function wy({styles:e,scope:t}){const n=(0,d.useSelect)((e=>ie(e(Nr)).getStyleOverrides()),[]),[o,r]=(0,u.useMemo)((()=>{const o=Object.values(null!=e?e:[]);for(const[e,t]of n){const n=o.findIndex((({id:t})=>e===t)),r={...t,id:e};-1===n?o.push(r):o[n]=r}return[yy(o.filter((e=>e?.css)),t),o.filter((e=>"svgs"===e.__unstableType)).map((e=>e.assets)).join("")]}),[e,n,t]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("style",{ref:Ey(o,t)}),o.map(((e,t)=>(0,s.createElement)("style",{key:t},e))),(0,s.createElement)(_l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 0 0",width:"0",height:"0",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"},dangerouslySetInnerHTML:{__html:r}}))}let Sy;Hc([Gc,jc]);const Cy=2e3,xy=[];function By({viewportWidth:e,containerWidth:t,minHeight:n,additionalStyles:o=xy}){e||(e=t);const[r,{height:l}]=(0,p.useResizeObserver)(),{styles:i}=(0,d.useSelect)((e=>({styles:e(Nr).getSettings().styles})),[]),a=(0,u.useMemo)((()=>i?[...i,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...o]:i),[i,o]);Sy=Sy||(0,u.memo)(Xw);const c=t/e,m=l?t/(l*c):0;return(0,s.createElement)(_l.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${c})`,aspectRatio:m,maxHeight:l>Cy?Cy*c:void 0,minHeight:n}},(0,s.createElement)(py,{contentRef:(0,p.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:e,height:l,pointerEvents:"none",maxHeight:Cy,minHeight:0!==c&&c<1&&n?n/c:n}},(0,s.createElement)(wy,{styles:a}),r,(0,s.createElement)(Sy,{renderAppender:!1})))}function Iy(e){const[t,{width:n}]=(0,p.useResizeObserver)();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{style:{position:"relative",width:"100%",height:0}},t),(0,s.createElement)("div",{className:"block-editor-block-preview__container"},!!n&&(0,s.createElement)(By,{...e,containerWidth:n})))}const Ty=(0,u.memo)((function({blocks:e,viewportWidth:t=1200,minHeight:n,additionalStyles:o=[],__experimentalMinHeight:r,__experimentalPadding:l}){r&&(n=r,w()("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),l&&(o=[...o,{css:`body { padding: ${l}px; }`}],w()("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));const i=(0,d.useSelect)((e=>e(Nr).getSettings()),[]),a=(0,u.useMemo)((()=>({...i,focusMode:!1,__unstableIsPreviewMode:!0})),[i]),c=(0,u.useMemo)((()=>Array.isArray(e)?e:[e]),[e]);return e&&0!==e.length?(0,s.createElement)(z_,{value:c,settings:a},(0,s.createElement)(Iy,{viewportWidth:t,minHeight:n,additionalStyles:o})):null}));function My({blocks:e,props:t={},layout:n}){const o=(0,d.useSelect)((e=>e(Nr).getSettings()),[]),r=(0,u.useMemo)((()=>({...o,styles:void 0,focusMode:!1,__unstableIsPreviewMode:!0})),[o]),l=(0,p.useDisabled)(),i=(0,p.useMergeRefs)([t.ref,l]),a=(0,u.useMemo)((()=>Array.isArray(e)?e:[e]),[e]),c=(0,s.createElement)(z_,{value:a,settings:r},(0,s.createElement)(wy,null),(0,s.createElement)(Jw,{renderAppender:!1,layout:n}));return{...t,ref:i,className:ml()(t.className,"block-editor-block-preview__live-content","components-disabled"),children:e?.length?c:null}}const Py=function({item:e}){var t;const{name:n,title:o,icon:r,description:l,initialAttributes:i,example:a}=e,d=(0,c.isReusableBlock)(e),p=(0,u.useMemo)((()=>a?(0,c.getBlockFromExample)(n,{attributes:{...a.attributes,...i},innerBlocks:a.innerBlocks}):(0,c.createBlock)(n,i)),[n,a,i]);return(0,s.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,s.createElement)("div",{className:"block-editor-inserter__preview"},d||a?(0,s.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,s.createElement)(Ty,{blocks:p,viewportWidth:null!==(t=a?.viewportWidth)&&void 0!==t?t:500,additionalStyles:[{css:"body { padding: 24px; }"}]})):(0,s.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,x.__)("No preview available."))),!d&&(0,s.createElement)(P_,{title:o,icon:r,description:l}))},{CompositeItemV2:Ry}=ie(_l.privateApis);const Ny=(0,u.forwardRef)((function({isFirst:e,as:t,children:n,...o},r){return(0,s.createElement)(Ry,{ref:r,role:"option",accessibleWhenDisabled:!0,...o,render:o=>{const r={...o,tabIndex:e?0:o.tabIndex};return t?(0,s.createElement)(t,{...r},n):"function"==typeof n?n(r):(0,s.createElement)(_l.Button,{...r},n)}})})),Ly=(0,s.createElement)(Z.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"}));function Ay({count:e,icon:t,isPattern:n,fadeWhenDisabled:o}){const r=n&&(0,x.__)("Pattern");return(0,s.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,s.createElement)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip"},(0,s.createElement)(_l.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,s.createElement)(_l.FlexItem,null,t?(0,s.createElement)(qh,{icon:t}):r||(0,x.sprintf)((0,x._n)("%d block","%d blocks",e),e)),(0,s.createElement)(_l.FlexItem,null,(0,s.createElement)(qh,{icon:Ly})),o&&(0,s.createElement)(_l.FlexItem,{className:"block-editor-block-draggable-chip__disabled"},(0,s.createElement)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})))))}const Oy=({isEnabled:e,blocks:t,icon:n,children:o,pattern:r})=>{const l={type:"inserter",blocks:t},i=(0,d.useSelect)((e=>{const{getBlockType:n}=e(c.store);return 1===t.length&&n(t[0].name)?.icon}),[t]),{startDragging:a,stopDragging:u}=ie((0,d.useDispatch)(Nr));return(0,s.createElement)(_l.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:l,onDragStart:e=>{a();const n=r?.type===Fn.user&&"unsynced"!==r?.syncStatus?[(0,c.createBlock)("core/block",{ref:r.id})]:t;e.dataTransfer.setData("text/html",(0,c.serialize)(n))},onDragEnd:()=>{u()},__experimentalDragComponent:(0,s.createElement)(Ay,{count:t.length,icon:n||!r&&i,isPattern:!!r})},(({onDraggableStart:t,onDraggableEnd:n})=>o({draggable:e,onDragStart:e?t:void 0,onDragEnd:e?n:void 0})))};const Dy=(0,u.memo)((function({className:e,isFirst:t,item:n,onSelect:o,onHover:r,isDraggable:l,...i}){const a=(0,u.useRef)(!1),d=n.icon?{backgroundColor:n.icon.background,color:n.icon.foreground}:{},p=(0,u.useMemo)((()=>[(0,c.createBlock)(n.name,n.initialAttributes,(0,c.createBlocksFromInnerBlocksTemplate)(n.innerBlocks))]),[n.name,n.initialAttributes,n.innerBlocks]),m=(0,c.isReusableBlock)(n)&&"unsynced"!==n.syncStatus||(0,c.isTemplatePart)(n);return(0,s.createElement)(Oy,{isEnabled:l&&!n.isDisabled,blocks:p,icon:n.icon},(({draggable:l,onDragStart:c,onDragEnd:u})=>(0,s.createElement)("div",{className:ml()("block-editor-block-types-list__list-item",{"is-synced":m}),draggable:l,onDragStart:e=>{a.current=!0,c&&(r(null),c(e))},onDragEnd:e=>{a.current=!1,u&&u(e)}},(0,s.createElement)(Ny,{isFirst:t,className:ml()("block-editor-block-types-list__item",e),disabled:n.isDisabled,onClick:e=>{e.preventDefault(),o(n,(0,zs.isAppleOS)()?e.metaKey:e.ctrlKey),r(null)},onKeyDown:e=>{const{keyCode:t}=e;t===zs.ENTER&&(e.preventDefault(),o(n,(0,zs.isAppleOS)()?e.metaKey:e.ctrlKey),r(null))},onMouseEnter:()=>{a.current||r(n)},onMouseLeave:()=>r(null),...i},(0,s.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:d},(0,s.createElement)(qh,{icon:n.icon,showColors:!0})),(0,s.createElement)("span",{className:"block-editor-block-types-list__item-title"},(0,s.createElement)(_l.__experimentalTruncate,{numberOfLines:3},n.title))))))}));const zy=(0,u.forwardRef)((function(e,t){const[n,o]=(0,u.useState)(!1);return(0,u.useEffect)((()=>{n&&(0,vo.speak)((0,x.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,s.createElement)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{o(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&o(!1)},...e})})),{CompositeGroupV2:Vy}=ie(_l.privateApis);const Fy=(0,u.forwardRef)((function(e,t){return(0,s.createElement)(Vy,{role:"presentation",ref:t,...e})}));const Hy=function e({items:t=[],onSelect:n,onHover:o=(()=>{}),children:r,label:l,isDraggable:i=!0}){const a="block-editor-block-types-list",u=(0,p.useInstanceId)(e,a);return(0,s.createElement)(zy,{className:a,"aria-label":l},function(e,t){const n=[];for(let o=0,r=e.length;o<r;o+=t)n.push(e.slice(o,o+t));return n}(t,3).map(((e,t)=>(0,s.createElement)(Fy,{key:t},e.map(((e,r)=>(0,s.createElement)(Dy,{key:e.id,item:e,className:(0,c.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:o,isDraggable:i&&!e.isDisabled,isFirst:0===t&&0===r,rowId:`${u}-${t}`})))))),r)};const Gy=function({title:e,icon:t,children:n}){return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,s.createElement)("h2",{className:"block-editor-inserter__panel-title"},e),(0,s.createElement)(_l.Icon,{icon:t})),(0,s.createElement)("div",{className:"block-editor-inserter__panel-content"},n))},{CompositeV2:Uy,useCompositeStoreV2:$y}=ie(_l.privateApis);const jy=function({children:e}){const t=$y({focusShift:!0,focusWrap:"horizontal"});return(0,s.createElement)(Uy,{store:t,render:(0,s.createElement)(s.Fragment,null)},e)},Wy=[];const Ky=function({rootClientId:e,onInsert:t,onHover:n,showMostUsedBlocks:o}){const[r,l,i,a]=qg(e,t),c=(0,u.useMemo)((()=>ne(r,"frecency","desc").slice(0,6)),[r]),d=(0,u.useMemo)((()=>r.filter((e=>!e.category))),[r]),m=(0,u.useMemo)((()=>(0,p.pipe)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>e.reduce(((e,t)=>{const{category:n}=t;return e[n]||(e[n]=[]),e[n].push(t),e}),{})))(r)),[r]),h=(0,u.useMemo)((()=>{const e={...i};return Object.keys(i).forEach((t=>{e[t]=r.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[r,i]);(0,u.useEffect)((()=>()=>n(null)),[]);const g=(0,p.useAsyncList)(l),f=l.length===g.length,b=(0,u.useMemo)((()=>Object.entries(i)),[i]),v=(0,p.useAsyncList)(f?b:Wy);return(0,s.createElement)(jy,null,(0,s.createElement)("div",null,o&&!!c.length&&(0,s.createElement)(Gy,{title:(0,x._x)("Most used","blocks")},(0,s.createElement)(Hy,{items:c,onSelect:a,onHover:n,label:(0,x._x)("Most used","blocks")})),g.map((e=>{const t=m[e.slug];return t&&t.length?(0,s.createElement)(Gy,{key:e.slug,title:e.title,icon:e.icon},(0,s.createElement)(Hy,{items:t,onSelect:a,onHover:n,label:e.title})):null})),f&&d.length>0&&(0,s.createElement)(Gy,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,x.__)("Uncategorized")},(0,s.createElement)(Hy,{items:d,onSelect:a,onHover:n,label:(0,x.__)("Uncategorized")})),v.map((([e,t])=>{const o=h[e];return o&&o.length?(0,s.createElement)(Gy,{key:e,title:t.title,icon:t.icon},(0,s.createElement)(Hy,{items:o,onSelect:a,onHover:n,label:t.title})):null}))))};function Zy({selectedCategory:e,patternCategories:t,onClickCategory:n}){const o="block-editor-block-patterns-explorer__sidebar";return(0,s.createElement)("div",{className:`${o}__categories-list`},t.map((({name:t,label:r})=>(0,s.createElement)(_l.Button,{key:t,label:r,className:`${o}__categories-list__item`,isPressed:e===t,onClick:()=>{n(t)}},r))))}function qy({searchValue:e,setSearchValue:t}){return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer__search"},(0,s.createElement)(_l.SearchControl,{__nextHasNoMarginBottom:!0,onChange:t,value:e,label:(0,x.__)("Search for patterns"),placeholder:(0,x.__)("Search")}))}const Yy=function({selectedCategory:e,patternCategories:t,onClickCategory:n,searchValue:o,setSearchValue:r}){return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer__sidebar"},(0,s.createElement)(qy,{searchValue:o,setSearchValue:r}),!o&&(0,s.createElement)(Zy,{selectedCategory:e,patternCategories:t,onClickCategory:n}))};function Xy({currentPage:e,numPages:t,changePage:n,totalItems:o}){return(0,s.createElement)(_l.__experimentalVStack,{className:"block-editor-patterns__grid-pagination-wrapper"},(0,s.createElement)(_l.__experimentalText,{variant:"muted"},(0,x.sprintf)((0,x._n)("%s item","%s items",o),o)),t>1&&(0,s.createElement)(_l.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",className:"block-editor-patterns__grid-pagination"},(0,s.createElement)(_l.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-previous"},(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:()=>n(1),disabled:1===e,"aria-label":(0,x.__)("First page")},(0,s.createElement)("span",null,"«")),(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:()=>n(e-1),disabled:1===e,"aria-label":(0,x.__)("Previous page")},(0,s.createElement)("span",null,"‹"))),(0,s.createElement)(_l.__experimentalText,{variant:"muted"},(0,x.sprintf)((0,x._x)("%1$s of %2$s","paging"),e,t)),(0,s.createElement)(_l.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-next"},(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:()=>n(e+1),disabled:e===t,"aria-label":(0,x.__)("Next page")},(0,s.createElement)("span",null,"›")),(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:()=>n(t),disabled:e===t,"aria-label":(0,x.__)("Last page"),size:"default"},(0,s.createElement)("span",null,"»")))))}const{CompositeV2:Qy,CompositeItemV2:Jy,useCompositeStoreV2:eE}=ie(_l.privateApis),tE=({showTooltip:e,title:t,children:n})=>e?(0,s.createElement)(_l.Tooltip,{text:t},n):(0,s.createElement)(s.Fragment,null,n);function nE({id:e,isDraggable:t,pattern:n,onClick:o,onHover:r,showTooltip:l}){const[i,a]=(0,u.useState)(!1),{blocks:c,viewportWidth:d}=n,m=`block-editor-block-patterns-list__item-description-${(0,p.useInstanceId)(nE)}`;return(0,s.createElement)(Oy,{isEnabled:t,blocks:c,pattern:n},(({draggable:t,onDragStart:u,onDragEnd:p})=>(0,s.createElement)("div",{className:"block-editor-block-patterns-list__list-item",draggable:t,onDragStart:e=>{a(!0),u&&(r?.(null),u(e))},onDragEnd:e=>{a(!1),p&&p(e)}},(0,s.createElement)(tE,{showTooltip:l&&!n.type!==Fn.user,title:n.title},(0,s.createElement)(Jy,{render:(0,s.createElement)("div",{role:"option","aria-label":n.title,"aria-describedby":n.description?m:void 0,className:ml()("block-editor-block-patterns-list__item",{"block-editor-block-patterns-list__list-item-synced":n.type===Fn.user&&!n.syncStatus})}),id:e,onClick:()=>{o(n,c),r?.(null)},onMouseEnter:()=>{i||r?.(n)},onMouseLeave:()=>r?.(null)},(0,s.createElement)(Ty,{blocks:c,viewportWidth:d}),(0,s.createElement)(_l.__experimentalHStack,{className:"block-editor-patterns__pattern-details"},n.type===Fn.user&&!n.syncStatus&&(0,s.createElement)("div",{className:"block-editor-patterns__pattern-icon-wrapper"},(0,s.createElement)(Ti,{className:"block-editor-patterns__pattern-icon",icon:q})),(!l||n.type===Fn.user)&&(0,s.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title)),!!n.description&&(0,s.createElement)(_l.VisuallyHidden,{id:m},n.description))))))}function oE(){return(0,s.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}const rE=(0,u.forwardRef)((function({isDraggable:e,blockPatterns:t,shownPatterns:n,onHover:o,onClickPattern:r,orientation:l,label:i=(0,x.__)("Block patterns"),showTitlesAsTooltip:a,pagingProps:c},d){const p=eE({orientation:l}),{setActiveId:m}=p;return(0,u.useEffect)((()=>{m(void 0)}),[m,n,t]),(0,s.createElement)(Qy,{store:p,role:"listbox",className:"block-editor-block-patterns-list","aria-label":i,ref:d},t.map((t=>n.includes(t)?(0,s.createElement)(nE,{key:t.name,id:t.name,pattern:t,onClick:r,onHover:o,isDraggable:e,showTooltip:a}):(0,s.createElement)(oE,{key:t.name}))),c&&(0,s.createElement)(Xy,{...c}))}));const lE=function({rootClientId:e="",insertionIndex:t,clientId:n,isAppender:o,onSelect:r,shouldFocusBlock:l=!0,selectBlockOnInsert:i=!0}){const{getSelectedBlock:s}=(0,d.useSelect)(Nr),{destinationRootClientId:a,destinationIndex:p}=(0,d.useSelect)((r=>{const{getSelectedBlockClientId:l,getBlockRootClientId:i,getBlockIndex:s,getBlockOrder:a}=r(Nr),c=l();let u,d=e;return void 0!==t?u=t:n?u=s(n):!o&&c?(d=i(c),u=s(c)+1):u=a(d).length,{destinationRootClientId:d,destinationIndex:u}}),[e,t,n,o]),{replaceBlocks:m,insertBlocks:h,showInsertionPoint:g,hideInsertionPoint:f}=(0,d.useDispatch)(Nr),b=(0,u.useCallback)(((e,t,n=!1)=>{const u=s();!o&&u&&(0,c.isUnmodifiedDefaultBlock)(u)?m(u.clientId,e,null,l||n?0:null,t):h(e,p,a,i,l||n?0:null,t);const d=Array.isArray(e)?e.length:1,g=(0,x.sprintf)((0,x._n)("%d block added.","%d blocks added.",d),d);(0,vo.speak)(g),r&&r(e)}),[o,s,m,h,a,p,r,l,i]),v=(0,u.useCallback)((e=>{e?g(a,p):f()}),[g,f,a,p]);return[a,b,v]},iE=(e,t)=>{const{patternCategories:n,patterns:o,userPatternCategories:r}=(0,d.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(Nr),{__experimentalUserPatternCategories:r,__experimentalBlockPatternCategories:l}=o();return{patterns:n(t),userPatternCategories:r,patternCategories:l}}),[t]),l=(0,u.useMemo)((()=>{const e=[...n];return r?.forEach((t=>{e.find((e=>e.name===t.name))||e.push(t)})),e}),[n,r]),{createSuccessNotice:i}=(0,d.useDispatch)(Os.store),s=(0,u.useCallback)(((t,n)=>{const o=t.type===Fn.user&&"unsynced"!==t.syncStatus?[(0,c.createBlock)("core/block",{ref:t.id})]:n;e((null!=o?o:[]).map((e=>(0,c.cloneBlock)(e))),t.name),i((0,x.sprintf)((0,x.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar",id:"block-pattern-inserted-notice"})}),[i,e]);return[o,l,s]},sE=20,aE=5;function cE(e,t,n,o=""){const[r,l]=(0,u.useState)(1),i=(0,p.usePrevious)(t),s=(0,p.usePrevious)(o);i===t&&s===o||1===r||l(1);const a=e.length,c=r-1,d=(0,u.useMemo)((()=>e.slice(c*sE,c*sE+sE)),[c,e]),m=(0,p.useAsyncList)(d,{step:aE}),h=Math.ceil(e.length/sE);return(0,u.useEffect)((function(){const e=(0,As.getScrollContainer)(n?.current);e?.scrollTo(0,0)}),[t,n]),{totalItems:a,categoryPatterns:d,categoryPatternsAsyncList:m,numPages:h,changePage:e=>{const t=(0,As.getScrollContainer)(n?.current);t?.scrollTo(0,0),l(e)},currentPage:r}}function uE({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,s.createElement)(_l.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count"},(0,x.sprintf)((0,x._n)("%d pattern found","%d patterns found",t),t)):null}const dE=function({searchValue:e,selectedCategory:t,patternCategories:n}){const o=(0,u.useRef)(),r=(0,p.useDebounce)(vo.speak,500),[l,i]=lE({shouldFocusBlock:!0}),[a,,c]=iE(i,l),d=(0,u.useMemo)((()=>n.map((e=>e.name))),[n]),m=(0,u.useMemo)((()=>{const n=a.filter((e=>{if(t===Gn.name)return!0;if(t===Un.name&&e.type===Fn.user)return!0;if("uncategorized"===t){const t=e.categories.some((e=>d.includes(e)));return!e.categories?.length||!t}return e.categories?.includes(t)}));return e?Kg(n,e):n}),[e,a,t,d]);(0,u.useEffect)((()=>{if(!e)return;const t=m.length,n=(0,x.sprintf)((0,x._n)("%d result found.","%d results found.",t),t);r(n)}),[e,r,m.length]);const h=cE(m,t,o),[g,f]=(0,u.useState)(e);e!==g&&(f(e),h.changePage(1));const b=!!m?.length;return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer__list",ref:o},(0,s.createElement)(uE,{filterValue:e,filteredBlockPatternsLength:m.length}),(0,s.createElement)(jy,null,b&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(rE,{shownPatterns:h.categoryPatternsAsyncList,blockPatterns:h.categoryPatterns,onClickPattern:c,isDraggable:!1}),(0,s.createElement)(Xy,{...h}))))};function pE(e,t="all"){const[n,o]=iE(void 0,e),r=(0,u.useMemo)((()=>"all"===t?n:n.filter((e=>!$n(e,t)))),[t,n]),l=(0,u.useMemo)((()=>{const e=o.filter((e=>r.some((t=>t.categories?.includes(e.name))))).sort(((e,t)=>e.label.localeCompare(t.label)));return r.some((e=>!function(e,t){return!(!e.categories||!e.categories.length)&&e.categories.some((e=>t.some((t=>t.name===e))))}(e,o)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,x._x)("Uncategorized")}),r.some((e=>e.type===Fn.user))&&e.unshift(Un),r.length>0&&e.unshift({name:Gn.name,label:Gn.label}),(0,vo.speak)((0,x.sprintf)((0,x._n)("%d category button displayed.","%d category buttons displayed.",e.length),e.length)),e}),[o,r]);return l}function mE({initialCategory:e,rootClientId:t}){const[n,o]=(0,u.useState)(""),[r,l]=(0,u.useState)("all"),[i,a]=(0,u.useState)(e?.name),c=pE(t,r);return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer"},(0,s.createElement)(Yy,{selectedCategory:i,patternCategories:c,onClickCategory:a,searchValue:n,setSearchValue:o,patternSourceFilter:r,setPatternSourceFilter:l}),(0,s.createElement)(dE,{searchValue:n,selectedCategory:i,patternCategories:c,patternSourceFilter:r}))}const hE=function({onModalClose:e,...t}){return(0,s.createElement)(_l.Modal,{title:(0,x.__)("Patterns"),onRequestClose:e,isFullScreen:!0},(0,s.createElement)(mE,{...t}))};function gE({title:e}){return(0,s.createElement)(_l.__experimentalVStack,{spacing:0},(0,s.createElement)(_l.__experimentalView,null,(0,s.createElement)(_l.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3},(0,s.createElement)(_l.__experimentalHStack,{spacing:2},(0,s.createElement)(_l.__experimentalNavigatorBackButton,{style:{minWidth:24,padding:0},icon:(0,x.isRTL)()?T_:M_,isSmall:!0,"aria-label":(0,x.__)("Navigate to the previous view")}),(0,s.createElement)(_l.__experimentalSpacer,null,(0,s.createElement)(_l.__experimentalHeading,{level:5},e))))))}function fE({categories:e,children:t}){return(0,s.createElement)(_l.__experimentalNavigatorProvider,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation"},(0,s.createElement)(_l.__experimentalNavigatorScreen,{path:"/"},(0,s.createElement)(_l.__experimentalItemGroup,null,e.map((e=>(0,s.createElement)(_l.__experimentalNavigatorButton,{key:e.name,path:`/category/${e.name}`,as:_l.__experimentalItem,isAction:!0},(0,s.createElement)(_l.__experimentalHStack,null,(0,s.createElement)(_l.FlexBlock,null,e.label),(0,s.createElement)(Ti,{icon:(0,x.isRTL)()?M_:T_}))))))),e.map((e=>(0,s.createElement)(_l.__experimentalNavigatorScreen,{key:e.name,path:`/category/${e.name}`},(0,s.createElement)(gE,{title:(0,x.__)("Back")}),t(e)))))}const bE=e=>"all"!==e,vE=e=>e.name===Un.name;function kE({setPatternSyncFilter:e,setPatternSourceFilter:t,patternSyncFilter:n,patternSourceFilter:o,scrollContainerRef:r,category:l}){const i=l.name===Un.name?Fn.user:o,a=bE(i),c=vE(l),d=(0,u.useMemo)((()=>[{value:"all",label:(0,x._x)("All","patterns")},{value:Hn.full,label:(0,x._x)("Synced","patterns"),disabled:a},{value:Hn.unsynced,label:(0,x._x)("Not synced","patterns"),disabled:a}]),[a]),p=(0,u.useMemo)((()=>[{value:"all",label:(0,x._x)("All","patterns"),disabled:c},{value:Fn.directory,label:(0,x.__)("Pattern Directory"),disabled:c},{value:Fn.theme,label:(0,x.__)("Theme & Plugins"),disabled:c},{value:Fn.user,label:(0,x.__)("User")}]),[c]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.DropdownMenu,{popoverProps:{placement:"right-end"},label:"Filter patterns",icon:(0,s.createElement)(Ti,{icon:(0,s.createElement)(_l.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(_l.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",fill:"#1E1E1E"}))})},(()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.MenuGroup,{label:(0,x.__)("Source")},(0,s.createElement)(_l.MenuItemsChoice,{choices:p,onSelect:n=>{var o;t(o=n),bE(o)&&e("all"),r.current?.scrollTo(0,0)},value:i})),(0,s.createElement)(_l.MenuGroup,{label:(0,x.__)("Type")},(0,s.createElement)(_l.MenuItemsChoice,{choices:d,onSelect:t=>{e(t),r.current?.scrollTo(0,0)},value:n})),(0,s.createElement)("div",{className:"block-editor-tool-selector__help"},(0,u.createInterpolateElement)((0,x.__)("Patterns are available from the <Link>WordPress.org Pattern Directory</Link>, bundled in the active theme, or created by users on this site. Only patterns created on this site can be synced."),{Link:(0,s.createElement)(_l.ExternalLink,{href:(0,x.__)("https://wordpress.org/patterns/")})}))))))}const _E=()=>{};function yE({rootClientId:e,onInsert:t,onHover:n=_E,category:o,showTitlesAsTooltip:r}){const[l,,i]=iE(t,e),[a,c]=(0,u.useState)("all"),[d,p]=(0,u.useState)("all"),m=pE(e,d),h=(0,u.useRef)(),g=(0,u.useMemo)((()=>l.filter((e=>!$n(e,d,a)&&(o.name===Gn.name||(o.name===Un.name&&e.type===Fn.user||("uncategorized"===o.name?!e.categories||!e.categories.some((e=>m.some((t=>t.name===e)))):e.categories?.includes(o.name))))))),[l,m,o.name,d,a]),f=cE(g,o,h),{changePage:b}=f;(0,u.useEffect)((()=>()=>n(null)),[]);const v=(0,u.useCallback)((e=>{c(e),b(1)}),[c,b]),k=(0,u.useCallback)((e=>{p(e),b(1)}),[p,b]);return(0,s.createElement)("div",{className:"block-editor-inserter__patterns-category-panel"},(0,s.createElement)(_l.__experimentalVStack,{spacing:2,className:"block-editor-inserter__patterns-category-panel-header"},(0,s.createElement)(_l.__experimentalHStack,null,(0,s.createElement)(_l.FlexBlock,null,(0,s.createElement)(_l.__experimentalHeading,{level:4,as:"div"},o.label)),(0,s.createElement)(kE,{patternSyncFilter:a,patternSourceFilter:d,setPatternSyncFilter:v,setPatternSourceFilter:k,scrollContainerRef:h,category:o})),!g.length&&(0,s.createElement)(_l.__experimentalText,{variant:"muted",className:"block-editor-inserter__patterns-category-no-results"},(0,x.__)("No results found"))),g.length>0&&(0,s.createElement)(rE,{ref:h,shownPatterns:f.categoryPatternsAsyncList,blockPatterns:f.categoryPatterns,onClickPattern:i,onHover:n,label:o.label,orientation:"vertical",category:o.name,isDraggable:!0,showTitlesAsTooltip:r,patternFilter:d,pagingProps:f}))}const EE=function({onSelectCategory:e,selectedCategory:t,onInsert:n,rootClientId:o}){const[r,l]=(0,u.useState)(!1),i=pE(o),a=t||i[0],c=(0,p.useViewportMatch)("medium","<");return(0,s.createElement)(s.Fragment,null,!c&&(0,s.createElement)("div",{className:"block-editor-inserter__block-patterns-tabs-container"},(0,s.createElement)("nav",{"aria-label":(0,x.__)("Block pattern categories"),className:"block-editor-inserter__block-patterns-tabs"},(0,s.createElement)(_l.__experimentalItemGroup,{role:"list"},i.map((n=>(0,s.createElement)(_l.__experimentalItem,{role:"listitem",key:n.name,onClick:()=>e(n),className:n===t?"block-editor-inserter__patterns-category block-editor-inserter__patterns-selected-category":"block-editor-inserter__patterns-category","aria-label":n.label,"aria-current":n===t?"true":void 0},(0,s.createElement)(_l.__experimentalHStack,null,(0,s.createElement)(_l.FlexBlock,null,n.label),(0,s.createElement)(Ti,{icon:(0,x.isRTL)()?M_:T_}))))),(0,s.createElement)("div",{role:"listitem"},(0,s.createElement)(_l.Button,{className:"block-editor-inserter__patterns-explore-button",onClick:()=>l(!0),variant:"secondary"},(0,x.__)("Explore all patterns")))))),c&&(0,s.createElement)(fE,{categories:i},(e=>(0,s.createElement)(yE,{key:e.name,onInsert:n,rootClientId:o,category:e,showTitlesAsTooltip:!1}))),r&&(0,s.createElement)(hE,{initialCategory:a,patternCategories:i,onModalClose:()=>l(!1),rootClientId:o}))};function wE({rootClientId:e,onInsert:t,onHover:n,category:o,showTitlesAsTooltip:r,patternFilter:l}){const i=(0,u.useRef)();return(0,u.useEffect)((()=>{const e=setTimeout((()=>{const[e]=As.focus.tabbable.find(i.current);e?.focus()}));return()=>clearTimeout(e)}),[o]),(0,s.createElement)("div",{ref:i,className:"block-editor-inserter__patterns-category-dialog"},(0,s.createElement)(yE,{key:o.name,rootClientId:e,onInsert:t,onHover:n,category:o,showTitlesAsTooltip:r,patternFilter:l}))}function SE(e){const[t,n]=(0,u.useState)([]),o=(0,d.useSelect)((e=>ie(e(Nr)).getInserterMediaCategories()),[]),{canInsertImage:r,canInsertVideo:l,canInsertAudio:i}=(0,d.useSelect)((t=>{const{canInsertBlockType:n}=t(Nr);return{canInsertImage:n("core/image",e),canInsertVideo:n("core/video",e),canInsertAudio:n("core/audio",e)}}),[e]);return(0,u.useEffect)((()=>{(async()=>{const e=[];if(!o)return;const t=new Map(await Promise.all(o.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]})))),s={image:r,video:l,audio:i};o.forEach((n=>{s[n.mediaType]&&t.get(n.name)&&e.push(n)})),e.length&&n(e)})()}),[r,l,i,o]),t}const CE=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})),xE={image:"img",video:"video",audio:"audio"};function BE(e,t){const n={id:e.id||void 0,caption:e.caption||void 0},o=e.url,r=e.alt||void 0;"image"===t?(n.url=o,n.alt=r):["video","audio"].includes(t)&&(n.src=o);const l=xE[t],i=(0,s.createElement)(l,{src:e.previewUrl||o,alt:r,controls:"audio"===t||void 0,inert:"true",onError:({currentTarget:t})=>{t.src===e.previewUrl&&(t.src=o)}});return[(0,c.createBlock)(`core/${t}`,n),i]}const IE=["image"],TE=25,ME={position:"bottom left",className:"block-editor-inserter__media-list__item-preview-options__popover"},{CompositeItemV2:PE}=ie(_l.privateApis);function RE({category:e,media:t}){if(!e.getReportUrl)return null;const n=e.getReportUrl(t);return(0,s.createElement)(_l.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,x.__)("Options"),popoverProps:ME,icon:Ef},(()=>(0,s.createElement)(_l.MenuGroup,null,(0,s.createElement)(_l.MenuItem,{onClick:()=>window.open(n,"_blank").focus(),icon:CE},(0,x.sprintf)((0,x.__)("Report %s"),e.mediaType)))))}function NE({onClose:e,onSubmit:t}){return(0,s.createElement)(_l.Modal,{title:(0,x.__)("Insert external image"),onRequestClose:e,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal"},(0,s.createElement)(_l.__experimentalVStack,{spacing:3},(0,s.createElement)("p",null,(0,x.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")),(0,s.createElement)("p",null,(0,x.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation."))),(0,s.createElement)(_l.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,s.createElement)(_l.FlexItem,null,(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:e},(0,x.__)("Cancel"))),(0,s.createElement)(_l.FlexItem,null,(0,s.createElement)(_l.Button,{variant:"primary",onClick:t},(0,x.__)("Insert")))))}function LE({media:e,onClick:t,category:n}){const[o,r]=(0,u.useState)(!1),[l,i]=(0,u.useState)(!1),[a,p]=(0,u.useState)(!1),[m,h]=(0,u.useMemo)((()=>BE(e,n.mediaType)),[e,n.mediaType]),{createErrorNotice:g,createSuccessNotice:f}=(0,d.useDispatch)(Os.store),b=(0,d.useSelect)((e=>e(Nr).getSettings().mediaUpload),[]),v=(0,u.useCallback)((e=>{if(a)return;const n=(0,c.cloneBlock)(e),{id:o,url:l,caption:i}=n.attributes;o?t(n):(p(!0),window.fetch(l).then((e=>e.blob())).then((e=>{b({filesList:[e],additionalData:{caption:i},onFileChange([e]){(0,Ls.isBlobURL)(e.url)||(t({...n,attributes:{...n.attributes,id:e.id,url:e.url}}),f((0,x.__)("Image uploaded and inserted."),{type:"snackbar"}),p(!1))},allowedTypes:IE,onError(e){g(e,{type:"snackbar"}),p(!1)}})})).catch((()=>{r(!0),p(!1)})))}),[a,t,b,g,f]),k="string"==typeof e.title?e.title:e.title?.rendered||(0,x.__)("no title");let _;if(k.length>TE){const e="...";_=k.slice(0,TE-e.length)+e}const y=(0,u.useCallback)((()=>i(!0)),[]),E=(0,u.useCallback)((()=>i(!1)),[]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Oy,{isEnabled:!0,blocks:[m]},(({draggable:t,onDragStart:o,onDragEnd:r})=>(0,s.createElement)("div",{className:ml()("block-editor-inserter__media-list__list-item",{"is-hovered":l}),draggable:t,onDragStart:o,onDragEnd:r},(0,s.createElement)("div",{onMouseEnter:y,onMouseLeave:E},(0,s.createElement)(_l.Tooltip,{text:_||k},(0,s.createElement)(PE,{render:(0,s.createElement)("div",{"aria-label":k,role:"option",className:"block-editor-inserter__media-list__item"}),onClick:()=>v(m)},(0,s.createElement)("div",{className:"block-editor-inserter__media-list__item-preview"},h,a&&(0,s.createElement)("div",{className:"block-editor-inserter__media-list__item-preview-spinner"},(0,s.createElement)(_l.Spinner,null))))),!a&&(0,s.createElement)(RE,{category:n,media:e}))))),o&&(0,s.createElement)(NE,{onClose:()=>r(!1),onSubmit:()=>{t((0,c.cloneBlock)(m)),f((0,x.__)("Image inserted."),{type:"snackbar"}),r(!1)}}))}const{CompositeV2:AE,useCompositeStoreV2:OE}=ie(_l.privateApis);const DE=function({mediaList:e,category:t,onClick:n,label:o=(0,x.__)("Media List")}){const r=OE();return(0,s.createElement)(AE,{store:r,role:"listbox",className:"block-editor-inserter__media-list","aria-label":o},e.map(((e,o)=>(0,s.createElement)(LE,{key:e.id||e.sourceId||o,media:e,category:t,onClick:n}))))};const zE=function(){return(0,s.createElement)("div",{className:"block-editor-inserter__no-results"},(0,s.createElement)(Ti,{className:"block-editor-inserter__no-results-icon",icon:Zh}),(0,s.createElement)("p",null,(0,x.__)("No results found.")))},VE=10;function FE({rootClientId:e,onInsert:t,category:n}){const o=(0,u.useRef)();return(0,u.useEffect)((()=>{const e=setTimeout((()=>{const[e]=As.focus.tabbable.find(o.current);e?.focus()}));return()=>clearTimeout(e)}),[n]),(0,s.createElement)("div",{ref:o,className:"block-editor-inserter__media-dialog"},(0,s.createElement)(HE,{rootClientId:e,onInsert:t,category:n}))}function HE({rootClientId:e,onInsert:t,category:n}){const[o,r,l]=(0,p.useDebouncedInput)(),{mediaList:i,isLoading:a}=function(e,t={}){const[n,o]=(0,u.useState)(),[r,l]=(0,u.useState)(!1),i=(0,u.useRef)();return(0,u.useEffect)((()=>{(async()=>{const n=JSON.stringify({category:e.name,...t});i.current=n,l(!0),o([]);const r=await(e.fetch?.(t));n===i.current&&(o(r),l(!1))})()}),[e.name,...Object.values(t)]),{mediaList:n,isLoading:r}}(n,{per_page:l?20:VE,search:l}),c="block-editor-inserter__media-panel",d=n.labels.search_items||(0,x.__)("Search");return(0,s.createElement)("div",{className:c},(0,s.createElement)(_l.SearchControl,{className:`${c}-search`,onChange:r,value:o,label:d,placeholder:d}),a&&(0,s.createElement)("div",{className:`${c}-spinner`},(0,s.createElement)(_l.Spinner,null)),!a&&!i?.length&&(0,s.createElement)(zE,null),!a&&!!i?.length&&(0,s.createElement)(DE,{rootClientId:e,onClick:t,mediaList:i,category:n}))}const GE=["image","video","audio"];const UE=function({rootClientId:e,selectedCategory:t,onSelectCategory:n,onInsert:o}){const r=SE(e),l=(0,p.useViewportMatch)("medium","<"),i="block-editor-inserter__media-tabs",a=(0,u.useCallback)((e=>{if(!e?.url)return;const[t]=BE(e,e.type);o(t)}),[o]),c=(0,u.useMemo)((()=>r.map((e=>({...e,label:e.labels.name})))),[r]);return(0,s.createElement)(s.Fragment,null,!l&&(0,s.createElement)("div",{className:`${i}-container`},(0,s.createElement)("nav",{"aria-label":(0,x.__)("Media categories")},(0,s.createElement)(_l.__experimentalItemGroup,{role:"list",className:i},r.map((e=>(0,s.createElement)(_l.__experimentalItem,{role:"listitem",key:e.name,onClick:()=>n(e),className:ml()(`${i}__media-category`,{"is-selected":t===e}),"aria-label":e.labels.name,"aria-current":e===t?"true":void 0},(0,s.createElement)(_l.__experimentalHStack,null,(0,s.createElement)(_l.FlexBlock,null,e.labels.name),(0,s.createElement)(Ti,{icon:(0,x.isRTL)()?M_:T_}))))),(0,s.createElement)("div",{role:"listitem"},(0,s.createElement)(Us,null,(0,s.createElement)(Gs,{multiple:!1,onSelect:a,allowedTypes:GE,render:({open:e})=>(0,s.createElement)(_l.Button,{onClick:t=>{t.target.focus(),e()},className:"block-editor-inserter__media-library-button",variant:"secondary","data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal"},(0,x.__)("Open Media Library"))})))))),l&&(0,s.createElement)(fE,{categories:c},(t=>(0,s.createElement)(HE,{onInsert:o,rootClientId:e,category:t}))))},{Fill:$E,Slot:jE}=(0,_l.createSlotFill)("__unstableInserterMenuExtension");$E.Slot=jE;const WE=$E,KE=[];const ZE=function({filterValue:e,onSelect:t,onHover:n,onHoverPattern:o,rootClientId:r,clientId:l,isAppender:i,__experimentalInsertionIndex:a,maxBlockPatterns:c,maxBlockTypes:m,showBlockDirectory:h=!1,isDraggable:g=!0,shouldFocusBlock:f=!0,prioritizePatterns:b,selectBlockOnInsert:v}){const k=(0,p.useDebounce)(vo.speak,500),{prioritizedBlocks:_}=(0,d.useSelect)((e=>{const t=e(Nr).getBlockListSettings(r);return{prioritizedBlocks:t?.prioritizedInserterBlocks||KE}}),[r]),[y,E]=lE({onSelect:t,rootClientId:r,clientId:l,isAppender:i,insertionIndex:a,shouldFocusBlock:f,selectBlockOnInsert:v}),[w,S,C,B]=qg(y,E),[I,,T]=iE(E,y),M=(0,u.useMemo)((()=>{if(0===c)return[];const t=Kg(I,e);return void 0!==c?t.slice(0,c):t}),[e,I,c]);let P=m;b&&M.length>2&&(P=0);const R=(0,u.useMemo)((()=>{if(0===P)return[];let t=ne(w.filter((e=>"core/block"!==e.name)),"frecency","desc");!e&&_.length&&(t=Yg(t,_));const n=Wg(t,S,C,e);return void 0!==P?n.slice(0,P):n}),[e,w,S,C,P,_]);(0,u.useEffect)((()=>{if(!e)return;const t=R.length+M.length,n=(0,x.sprintf)((0,x._n)("%d result found.","%d results found.",t),t);k(n)}),[e,k,R,M]);const N=(0,p.useAsyncList)(R,{step:9}),L=(0,p.useAsyncList)(N.length===R.length?M:KE),A=R.length>0||M.length>0,O=!!R.length&&(0,s.createElement)(Gy,{title:(0,s.createElement)(_l.VisuallyHidden,null,(0,x.__)("Blocks"))},(0,s.createElement)(Hy,{items:N,onSelect:B,onHover:n,label:(0,x.__)("Blocks"),isDraggable:g})),D=!!M.length&&(0,s.createElement)(Gy,{title:(0,s.createElement)(_l.VisuallyHidden,null,(0,x.__)("Block patterns"))},(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,s.createElement)(rE,{shownPatterns:L,blockPatterns:M,onClickPattern:T,onHover:o,isDraggable:g})));return(0,s.createElement)(jy,null,!h&&!A&&(0,s.createElement)(zE,null),b?D:O,!!R.length&&!!M.length&&(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),b?O:D,h&&(0,s.createElement)(WE.Slot,{fillProps:{onSelect:B,onHover:n,filterValue:e,hasItems:A,rootClientId:y}},(e=>e.length?e:A?null:(0,s.createElement)(zE,null))))},{Tabs:qE}=ie(_l.privateApis),YE={name:"blocks",title:(0,x.__)("Blocks")},XE={name:"patterns",title:(0,x.__)("Patterns")},QE={name:"media",title:(0,x.__)("Media")};const JE=function({showPatterns:e=!1,showMedia:t=!1,onSelect:n,tabsContents:o}){const r=[YE,e&&XE,t&&QE].filter(Boolean);return(0,s.createElement)("div",{className:"block-editor-inserter__tabs"},(0,s.createElement)(qE,{onSelect:n},(0,s.createElement)(qE.TabList,null,r.map((e=>(0,s.createElement)(qE.Tab,{key:e.name,tabId:e.name},e.title)))),r.map((e=>(0,s.createElement)(qE.TabPanel,{key:e.name,tabId:e.name,focusable:!1},o[e.name])))))};const ew=(0,u.forwardRef)((function({rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,onSelect:r,showInserterHelpPanel:l,showMostUsedBlocks:i,__experimentalFilterValue:a="",shouldFocusBlock:c=!0},m){const[h,g,f]=(0,p.useDebouncedInput)(a),[b,v]=(0,u.useState)(null),[k,_]=(0,u.useState)(null),[y,E]=(0,u.useState)("all"),[w,S]=(0,u.useState)(null),[C,B]=(0,u.useState)(null),[I,T,M]=lE({rootClientId:e,clientId:t,isAppender:n,insertionIndex:o,shouldFocusBlock:c}),{showPatterns:P}=(0,d.useSelect)((e=>{const{hasAllowedPatterns:t}=ie(e(Nr));return{showPatterns:t(I)}}),[I]),R=SE(I).length>0,N=(0,u.useCallback)(((e,t,n)=>{T(e,t,n),r()}),[T,r]),L=(0,u.useCallback)(((e,t)=>{T(e,{patternName:t}),r()}),[T,r]),A=(0,u.useCallback)((e=>{M(!!e),v(e)}),[M,v]),O=(0,u.useCallback)((e=>{M(!!e)}),[M]),D=(0,u.useCallback)(((e,t)=>{_(e),E(t)}),[_]),z=(0,u.useMemo)((()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-inserter__block-list"},(0,s.createElement)(Ky,{rootClientId:I,onInsert:N,onHover:A,showMostUsedBlocks:i})),l&&(0,s.createElement)("div",{className:"block-editor-inserter__tips"},(0,s.createElement)(_l.VisuallyHidden,{as:"h2"},(0,x.__)("A tip for using the block editor")),(0,s.createElement)(I_,null)))),[I,N,A,i,l]),V=(0,u.useMemo)((()=>(0,s.createElement)(EE,{rootClientId:I,onInsert:L,onSelectCategory:D,selectedCategory:k})),[I,L,D,k]),F=(0,u.useMemo)((()=>(0,s.createElement)(UE,{rootClientId:I,selectedCategory:w,onSelectCategory:S,onInsert:N})),[I,N,w,S]),H=(0,u.useMemo)((()=>({blocks:z,patterns:V,media:F})),[z,F,V]),G=(0,u.useRef)();(0,u.useImperativeHandle)(m,(()=>({focusSearch:()=>{G.current.focus()}})));const U="patterns"===C&&!f&&k,$=!f&&(P||R),j="media"===C&&!f&&w;return(0,s.createElement)("div",{className:"block-editor-inserter__menu"},(0,s.createElement)("div",{className:ml()("block-editor-inserter__main-area",{"show-as-tabs":$})},(0,s.createElement)(_l.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",onChange:e=>{b&&v(null),g(e)},value:h,label:(0,x.__)("Search for blocks and patterns"),placeholder:(0,x.__)("Search"),ref:G}),!!f&&(0,s.createElement)("div",{className:"block-editor-inserter__no-tab-container"},(0,s.createElement)(ZE,{filterValue:f,onSelect:r,onHover:A,onHoverPattern:O,rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,showBlockDirectory:!0,shouldFocusBlock:c})),$&&(0,s.createElement)(JE,{showPatterns:P,showMedia:R,onSelect:e=>{"patterns"!==e&&_(null),B(e)},tabsContents:H}),!f&&!$&&(0,s.createElement)("div",{className:"block-editor-inserter__no-tab-container"},z)),j&&(0,s.createElement)(FE,{rootClientId:I,onInsert:N,category:w}),l&&b&&(0,s.createElement)(_l.Popover,{className:"block-editor-inserter__preview-container__popover",placement:"right-start",offset:16,focusOnMount:!1,animate:!1},(0,s.createElement)(Py,{item:b})),U&&(0,s.createElement)(wE,{rootClientId:I,onInsert:L,onHover:O,category:k,patternFilter:y,showTitlesAsTooltip:!0}))}));function tw({onSelect:e,rootClientId:t,clientId:n,isAppender:o,prioritizePatterns:r,selectBlockOnInsert:l,hasSearch:i=!0}){const[a,c]=(0,u.useState)(""),[p,m]=lE({onSelect:e,rootClientId:t,clientId:n,isAppender:o,selectBlockOnInsert:l}),[h]=qg(p,m),[g]=iE(m,p),{setInserterIsOpened:f,insertionIndex:b}=(0,d.useSelect)((e=>{const{getSettings:t,getBlockIndex:o,getBlockCount:r}=e(Nr),l=t(),i=o(n),s=r();return{setInserterIsOpened:l.__experimentalSetIsInserterOpened,insertionIndex:-1===i?s:i}}),[n]),v=g.length&&(!!a||r),k=i&&(v&&g.length>6||h.length>6);(0,u.useEffect)((()=>{f&&f(!1)}),[f]);let _=0;return v&&(_=r?4:2),(0,s.createElement)("div",{className:ml()("block-editor-inserter__quick-inserter",{"has-search":k,"has-expand":f})},k&&(0,s.createElement)(_l.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",value:a,onChange:e=>{c(e)},label:(0,x.__)("Search for blocks and patterns"),placeholder:(0,x.__)("Search")}),(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,s.createElement)(ZE,{filterValue:a,onSelect:e,rootClientId:t,clientId:n,isAppender:o,maxBlockPatterns:_,maxBlockTypes:6,isDraggable:!1,prioritizePatterns:r,selectBlockOnInsert:l})),f&&(0,s.createElement)(_l.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{f({rootClientId:t,insertionIndex:b,filterValue:a})},"aria-label":(0,x.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,x.__)("Browse all")))}const nw=({onToggle:e,disabled:t,isOpen:n,blockTitle:o,hasSingleBlockType:r,toggleProps:l={},prioritizePatterns:i})=>{const{as:a=_l.Button,label:c,onClick:u,...d}=l;let p=c;return!p&&r?p=(0,x.sprintf)((0,x._x)("Add %s","directly add the only allowed block"),o):!p&&i?p=(0,x.__)("Add pattern"):p||(p=(0,x._x)("Add block","Generic label for block inserter button")),(0,s.createElement)(a,{icon:na,label:p,tooltipPosition:"bottom",onClick:function(t){e&&e(t),u&&u(t)},className:"block-editor-inserter__toggle","aria-haspopup":!r&&"true","aria-expanded":!r&&n,disabled:t,...d})};class ow 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({onToggle:e,isOpen:t}){const{disabled:n,blockTitle:o,hasSingleBlockType:r,directInsertBlock:l,toggleProps:i,hasItems:s,renderToggle:a=nw,prioritizePatterns:c}=this.props;return a({onToggle:e,isOpen:t,disabled:n||!s,blockTitle:o,hasSingleBlockType:r,directInsertBlock:l,toggleProps:i,prioritizePatterns:c})}renderContent({onClose:e}){const{rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r,__experimentalIsQuick:l,prioritizePatterns:i,onSelectOrClose:a,selectBlockOnInsert:c}=this.props;return l?(0,s.createElement)(tw,{onSelect:t=>{const n=Array.isArray(t)&&t?.length?t[0]:t;a&&"function"==typeof a&&a(n),e()},rootClientId:t,clientId:n,isAppender:o,prioritizePatterns:i,selectBlockOnInsert:c}):(0,s.createElement)(ew,{onSelect:()=>{e()},rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:o,__experimentalIsQuick:r,onSelectOrClose:l}=this.props;return t||n?this.renderToggle({onToggle:o}):(0,s.createElement)(_l.Dropdown,{className:"block-editor-inserter",contentClassName:ml()("block-editor-inserter__popover",{"is-quick":r}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,x.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:l})}}const rw=(0,p.compose)([(0,d.withSelect)(((e,{clientId:t,rootClientId:n,shouldDirectInsert:o=!0})=>{const{getBlockRootClientId:r,hasInserterItems:l,getAllowedBlocks:i,getDirectInsertBlock:s,getSettings:a}=e(Nr),{getBlockVariations:u}=e(c.store),d=i(n=n||r(t)||void 0),p=o&&s(n),m=a(),h=1===d?.length&&0===u(d[0].name,"inserter")?.length;let g=!1;return h&&(g=d[0]),{hasItems:l(n),hasSingleBlockType:h,blockTitle:g?g.title:"",allowedBlockType:g,directInsertBlock:p,rootClientId:n,prioritizePatterns:m.__experimentalPreferPatternsOnRoot&&!n}})),(0,d.withDispatch)(((e,t,{select:n})=>({insertOnlyAllowedBlock(){const{rootClientId:o,clientId:r,isAppender:l,hasSingleBlockType:i,allowedBlockType:s,directInsertBlock:a,onSelectOrClose:u,selectBlockOnInsert:d}=t;if(!i&&!a)return;const{insertBlock:p}=e(Nr);let m;if(a){const e=function(e){const{getBlock:t,getPreviousBlockClientId:l}=n(Nr);if(!e||!r&&!o)return{};const i={};let s={};if(r){const e=t(r),n=t(l(r));e?.name===n?.name&&(s=n?.attributes||{})}else{const e=t(o);if(e?.innerBlocks?.length){const t=e.innerBlocks[e.innerBlocks.length-1];a&&a?.name===t.name&&(s=t.attributes)}}return e.forEach((e=>{s.hasOwnProperty(e)&&(i[e]=s[e])})),i}(a.attributesToCopy);m=(0,c.createBlock)(a.name,{...a.attributes||{},...e})}else m=(0,c.createBlock)(s.name);p(m,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:i,getBlockRootClientId:s}=n(Nr);if(r)return e(r);const a=t();return!l&&a&&s(a)===o?e(a)+1:i(o).length}(),o,d),u&&u({clientId:m?.clientId});const h=(0,x.sprintf)((0,x.__)("%s block added"),s.title);(0,vo.speak)(h)}}))),(0,p.ifCondition)((({hasItems:e,isAppender:t,rootClientId:n,clientId:o})=>e||!t&&!n&&!o))])(ow),lw=(0,u.forwardRef)(((e,t)=>(0,s.createElement)(rw,{ref:t,...e}))),iw="\ufeff";function sw({rootClientId:e}){const{showPrompt:t,isLocked:n,placeholder:o}=(0,d.useSelect)((t=>{const{getBlockCount:n,getSettings:o,getTemplateLock:r}=t(Nr),l=!n(e),{bodyPlaceholder:i}=o();return{showPrompt:l,isLocked:!!r(e),placeholder:i}}),[e]),{insertDefaultBlock:r,startTyping:l}=(0,d.useDispatch)(Nr);if(n)return null;const i=(0,x_.decodeEntities)(o)||(0,x.__)("Type / to choose a block"),a=()=>{r(void 0,e),l()};return(0,s.createElement)("div",{"data-root-client-id":e||"",className:ml()("block-editor-default-block-appender",{"has-visible-prompt":t})},(0,s.createElement)("p",{tabIndex:"0",role:"button","aria-label":(0,x.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{zs.ENTER!==e.keyCode&&zs.SPACE!==e.keyCode||a()},onClick:()=>a(),onFocus:()=>{t&&a()}},t?i:iw),(0,s.createElement)(lw,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}function aw({rootClientId:e,className:t,onFocus:n,tabIndex:o},r){return(0,s.createElement)(lw,{position:"bottom center",rootClientId:e,__experimentalIsQuick:!0,renderToggle:({onToggle:e,disabled:l,isOpen:i,blockTitle:a,hasSingleBlockType:c})=>{let u;u=c?(0,x.sprintf)((0,x._x)("Add %s","directly add the only allowed block"),a):(0,x._x)("Add block","Generic label for block inserter button");const d=!c;let p=(0,s.createElement)(_l.Button,{ref:r,onFocus:n,tabIndex:o,className:ml()(t,"block-editor-button-block-appender"),onClick:e,"aria-haspopup":d?"true":void 0,"aria-expanded":d?i:void 0,disabled:l,label:u},!c&&(0,s.createElement)(_l.VisuallyHidden,{as:"span"},u),(0,s.createElement)(Ti,{icon:na}));return(d||c)&&(p=(0,s.createElement)(_l.Tooltip,{text:u},p)),p},isAppender:!0})}const cw=(0,u.forwardRef)(((e,t)=>(w()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),aw(e,t)))),uw=(0,u.forwardRef)(aw);function dw({rootClientId:e}){return(0,d.useSelect)((t=>t(Nr).canInsertBlockType((0,c.getDefaultBlockName)(),e)))?(0,s.createElement)(sw,{rootClientId:e}):(0,s.createElement)(uw,{rootClientId:e,className:"block-list-appender__toggle"})}function pw({rootClientId:e,CustomAppender:t,className:n,tagName:o="div"}){const r=(0,d.useSelect)((t=>{const{getBlockInsertionPoint:n,isBlockInsertionPointVisible:o,getBlockCount:r}=t(Nr),l=n();return o()&&e===l?.rootClientId&&0===r(e)}),[e]);return(0,s.createElement)(o,{tabIndex:-1,className:ml()("block-list-appender wp-block",n,{"is-drag-over":r}),contentEditable:!1,"data-block":!0},t?(0,s.createElement)(t,null):(0,s.createElement)(dw,{rootClientId:e}))}const mw=Number.MAX_SAFE_INTEGER;(0,u.createContext)();const hw=function({previousClientId:e,nextClientId:t,children:n,__unstablePopoverSlot:o,__unstableContentRef:r,operation:l="insert",nearestSide:i="right",...a}){const[c,p]=(0,u.useReducer)((e=>(e+1)%mw),0),{orientation:m,rootClientId:h,isVisible:g}=(0,d.useSelect)((n=>{const{getBlockListSettings:o,getBlockRootClientId:r,isBlockVisible:l}=n(Nr),i=r(null!=e?e:t);return{orientation:o(i)?.orientation||"vertical",rootClientId:i,isVisible:l(e)&&l(t)}}),[e,t]),f=bd(e),b=bd(t),v="vertical"===m,k=(0,u.useMemo)((()=>{if(c<0||!f&&!b||!g)return;return{contextElement:"group"===l?b||f:f||b,getBoundingClientRect(){const e=f?f.getBoundingClientRect():null,t=b?b.getBoundingClientRect():null;let n=0,o=0,r=0,s=0;if("group"===l){const l=t||e;o=l.top,r=0,s=l.bottom-l.top,n="left"===i?l.left-2:l.right-2}else v?(o=e?e.bottom:t.top,r=e?e.width:t.width,s=t&&e?t.top-e.bottom:0,n=e?e.left:t.left):(o=e?e.top:t.top,s=e?e.height:t.height,(0,x.isRTL)()?(n=t?t.right:e.left,r=e&&t?e.left-t.right:0):(n=e?e.right:t.left,r=e&&t?t.left-e.right:0));return new window.DOMRect(n,o,r,s)}}}),[f,b,c,v,g,l,i]),_=hm(r);return(0,u.useLayoutEffect)((()=>{if(!f)return;const e=new window.MutationObserver(p);return e.observe(f,{attributes:!0}),()=>{e.disconnect()}}),[f]),(0,u.useLayoutEffect)((()=>{if(!b)return;const e=new window.MutationObserver(p);return e.observe(b,{attributes:!0}),()=>{e.disconnect()}}),[b]),(0,u.useLayoutEffect)((()=>{if(f)return f.ownerDocument.defaultView.addEventListener("resize",p),()=>{f.ownerDocument.defaultView?.removeEventListener("resize",p)}}),[f]),(f||b)&&g?(0,s.createElement)(_l.Popover,{ref:_,animate:!1,anchor:k,focusOnMount:!1,__unstableSlotName:o,inline:!o,key:t+"--"+h,...a,className:ml()("block-editor-block-popover","block-editor-block-popover__inbetween",a.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled"},(0,s.createElement)("div",{className:"block-editor-block-popover__inbetween-container"},n)):null},gw={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};const fw=function({__unstablePopoverSlot:e,__unstableContentRef:t}){const{clientId:n}=(0,d.useSelect)((e=>{const{getBlockOrder:t,getBlockInsertionPoint:n}=e(Nr),o=n(),r=t(o.rootClientId);return r.length?{clientId:r[o.index]}:{}}),[]),o=(0,p.useReducedMotion)();return(0,s.createElement)(fm,{clientId:n,__unstableCoverTarget:!0,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone"},(0,s.createElement)(_l.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:o?gw.show:gw.hide,animate:gw.show,exit:o?gw.show:gw.exit,className:"block-editor-block-popover__drop-zone-foreground"}))},bw=(0,u.createContext)();function vw({__unstablePopoverSlot:e,__unstableContentRef:t,operation:n="insert",nearestSide:o="right"}){const{selectBlock:r,hideInsertionPoint:l}=(0,d.useDispatch)(Nr),i=(0,u.useContext)(bw),a=(0,u.useRef)(),{orientation:c,previousClientId:m,nextClientId:h,rootClientId:g,isInserterShown:f,isDistractionFree:b,isNavigationMode:v}=(0,d.useSelect)((e=>{const{getBlockOrder:t,getBlockListSettings:n,getBlockInsertionPoint:o,isBlockBeingDragged:r,getPreviousBlockClientId:l,getNextBlockClientId:i,getSettings:s,isNavigationMode:a}=e(Nr),c=o(),u=t(c.rootClientId);if(!u.length)return{};let d=u[c.index-1],p=u[c.index];for(;r(d);)d=l(d);for(;r(p);)p=i(p);const m=s();return{previousClientId:d,nextClientId:p,orientation:n(c.rootClientId)?.orientation||"vertical",rootClientId:c.rootClientId,isNavigationMode:a(),isDistractionFree:m.isDistractionFree,isInserterShown:c?.__unstableWithInserter}}),[]),{getBlockEditingMode:k}=(0,d.useSelect)(Nr),_=(0,p.useReducedMotion)();const y={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:f?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},E={start:{scale:_?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(b&&!v)return null;const w="horizontal"===c||"group"===n?"is-horizontal":"is-vertical",S=ml()("block-editor-block-list__insertion-point",w);return(0,s.createElement)(hw,{previousClientId:m,nextClientId:h,__unstablePopoverSlot:e,__unstableContentRef:t,operation:n,nearestSide:o},(0,s.createElement)(_l.__unstableMotion.div,{layout:!_,initial:_?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:a,tabIndex:-1,onClick:function(e){e.target===a.current&&h&&"disabled"!==k(h)&&r(h,-1)},onFocus:function(e){e.target!==a.current&&(i.current=!0)},className:ml()(S,{"is-with-inserter":f}),onHoverEnd:function(e){e.target!==a.current||i.current||l()}},(0,s.createElement)(_l.__unstableMotion.div,{variants:y,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),f&&(0,s.createElement)(_l.__unstableMotion.div,{variants:E,className:ml()("block-editor-block-list__insertion-point-inserter")},(0,s.createElement)(lw,{position:"bottom center",clientId:h,rootClientId:g,__experimentalIsQuick:!0,onToggle:e=>{i.current=e},onSelectOrClose:()=>{i.current=!1}}))))}function kw(e){const{insertionPoint:t,isVisible:n,isBlockListEmpty:o}=(0,d.useSelect)((e=>{const{getBlockInsertionPoint:t,isBlockInsertionPointVisible:n,getBlockCount:o}=e(Nr),r=t();return{insertionPoint:r,isVisible:n(),isBlockListEmpty:0===o(r?.rootClientId)}}),[]);return!n||o?null:"replace"===t.operation?(0,s.createElement)(fw,{key:`${t.rootClientId}-${t.index}`,...e}):(0,s.createElement)(vw,{operation:t.operation,nearestSide:t.nearestSide,...e})}function _w(){const e=(0,u.useContext)(bw),t=(0,d.useSelect)((e=>e(Nr).getSettings().isDistractionFree||"zoom-out"===e(Nr).__unstableGetEditorMode()),[]),{getBlockListSettings:n,getBlockIndex:o,isMultiSelecting:r,getSelectedBlockClientIds:l,getTemplateLock:i,__unstableIsWithinBlockOverlay:s,getBlockEditingMode:a,getBlockName:c}=(0,d.useSelect)(Nr),{showInsertionPoint:m,hideInsertionPoint:h}=(0,d.useDispatch)(Nr);return(0,p.useRefEffect)((u=>{if(!t)return u.addEventListener("mousemove",d),()=>{u.removeEventListener("mousemove",d)};function d(t){if(e.current)return;if(t.target.nodeType===t.target.TEXT_NODE)return;if(r())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void h();let u;if(!t.target.classList.contains("is-root-container")){u=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")}if(i(u)||"disabled"===a(u)||"core/block"===c(u))return;const d=n(u)?.orientation||"vertical",p=t.clientY,g=t.clientX;let f=Array.from(t.target.children).find((e=>{const t=e.getBoundingClientRect();return e.classList.contains("wp-block")&&"vertical"===d&&t.top>p||e.classList.contains("wp-block")&&"horizontal"===d&&((0,x.isRTL)()?t.right<g:t.left>g)}));if(!f)return void h();if(!f.id&&(f=f.firstElementChild,!f))return void h();const b=f.id.slice(6);if(!b||s(b))return;if(l().includes(b))return;const v=f.getBoundingClientRect();if("horizontal"===d&&(t.clientY>v.bottom||t.clientY<v.top)||"vertical"===d&&(t.clientX>v.right||t.clientX<v.left))return void h();const k=o(b);0!==k?m(u,k,{__unstableWithInserter:!0}):h()}}),[e,n,o,r,m,h,l,t])}const yw=(0,p.createHigherOrderComponent)((e=>t=>{const{clientId:n}=y();return(0,s.createElement)(e,{...t,clientId:n})}),"withClientId"),Ew=yw((({clientId:e,showSeparator:t,isFloating:n,onAddBlock:o,isToggle:r})=>(0,s.createElement)(uw,{className:ml()({"block-list-appender__toggle":r}),rootClientId:e,showSeparator:t,isFloating:n,onAddBlock:o}))),ww=(0,p.compose)([yw,(0,d.withSelect)(((e,{clientId:t})=>{const{getBlockOrder:n}=e(Nr),o=n(t);return{lastBlockClientId:o[o.length-1]}}))])((({clientId:e})=>(0,s.createElement)(sw,{rootClientId:e}))),Sw=new WeakMap;function Cw(e,t,n,o,r,l,i,s,a,c,p,m){const{updateBlockListSettings:h}=(0,d.useDispatch)(Nr),g=(0,d.useRegistry)(),f=function(e){const[t,n]=(0,u.useState)(e);return js()(t,e)||n(e),t}(n),b=(0,u.useMemo)((()=>o),o),v=void 0===a||"contentOnly"===t?t:a;(0,u.useLayoutEffect)((()=>{const t={allowedBlocks:f,prioritizedInserterBlocks:b,templateLock:v};if(void 0!==c&&(t.__experimentalCaptureToolbars=c),void 0!==p)t.orientation=p;else{const e=Vi(m?.type);t.orientation=e.getOrientation(m)}void 0!==i&&(w()("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),t.defaultBlock=i),void 0!==r&&(t.defaultBlock=r),void 0!==s&&(w()("__experimentalDirectInsert",{alternative:"directInsert",since:"6.3",version:"6.4"}),t.directInsert=s),void 0!==l&&(t.directInsert=l),Sw.get(g)||Sw.set(g,[]),Sw.get(g).push([e,t]),window.queueMicrotask((()=>{Sw.get(g)?.length&&g.batch((()=>{Sw.get(g).forEach((e=>{h(...e)})),Sw.set(g,[])}))}))}),[e,f,b,v,r,l,i,s,c,p,h,m,g])}function xw(e,t,n,o,r,l,i,s,a){return u=>{const{srcRootClientId:d,srcClientIds:p,type:m,blocks:h}=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}(u);if("inserter"===m){i();const e=h.map((e=>(0,c.cloneBlock)(e)));l(e,!0,null)}if("block"===m){const i=n(p[0]);if(d===e&&i===t)return;if(p.includes(e)||o(p).some((t=>t===e)))return;if("group"===s){const e=p.map((e=>a(e)));return void l(e,!0,null,p)}const c=d===e,u=p.length;r(p,d,c&&i<t?t-u:t)}}}function Bw(e,t,n={}){const{operation:o="insert",nearestSide:r="right"}=n,{canInsertBlockType:l,getBlockIndex:i,getClientIdsOfDescendants:s,getBlockOrder:a,getBlocksByClientId:p,getSettings:m,getBlock:h,isGroupable:g}=(0,d.useSelect)(Nr),{getGroupingBlockName:f}=(0,d.useSelect)(c.store),{insertBlocks:b,moveBlocksToPosition:v,updateBlockAttributes:k,clearSelectedBlock:_,replaceBlocks:y,removeBlocks:E}=(0,d.useDispatch)(Nr),w=(0,d.useRegistry)(),S=(0,u.useCallback)(((n,i=!0,s=0,u=[])=>{Array.isArray(n)||(n=[n]);const d=a(e)[t],p=n.map((e=>e.clientId)),m=g([...p,d]);if("replace"===o)y(d,n,void 0,s);else if("group"===o&&m){const t=h(d);"left"===r?n.push(t):n.unshift(t);const o=n.map((e=>(0,c.createBlock)(e.name,e.attributes,e.innerBlocks))),i=n.every((e=>"core/image"===e.name)),a=l("core/gallery",e),p=(0,c.createBlock)(i&&a?"core/gallery":f(),{layout:{type:"flex",flexWrap:i&&a?null:"nowrap"}},o);y([d,...u],p,void 0,s)}else b(n,t,e,i,s)}),[a,e,t,g,o,y,h,r,l,f,b]),C=(0,u.useCallback)(((n,r,l)=>{if("replace"===o){const o=p(n),r=a(e)[t];w.batch((()=>{E(n,!1),y(r,o,void 0,0)}))}else v(n,r,e,l)}),[o,a,p,v,w,E,y,t,e]),x=xw(e,t,i,s,C,S,_,o,h),B=function(e,t,n,o,r){return l=>{if(!t().mediaUpload)return;const i=(0,c.findTransform)((0,c.getBlockTransforms)("from"),(t=>"files"===t.type&&o(t.blockName,e)&&t.isMatch(l)));if(i){const e=i.transform(l,n);r(e)}}}(e,m,k,l,S),I=function(e){return t=>{const n=(0,c.pasteHandler)({HTML:t,mode:"BLOCKS"});n.length&&e(n)}}(S);return e=>{const t=(0,As.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?I(n):t.length?B(t):x(e)}}function Iw(e,t,n=["top","bottom","left","right"]){let o,r;return n.forEach((n=>{const l=function(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:l}=e,i=o?r:l,s=o?l:r,a=o?t.left:t.top,c=o?t.right:t.bottom,u=t[n];let d;return d=i>=a&&i<=c?i:i<c?a:c,Math.sqrt((i-d)**2+(s-u)**2)}(e,t,n);(void 0===o||l<o)&&(o=l,r=n)})),[o,r]}function Tw(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}const Mw=30,Pw=120,Rw=120;function Nw(e,t,n,o){let r=!0;if(t){const e=t?.map((({name:e})=>e));r=n.every((t=>e?.includes(t)))}const l=n.map((t=>e(t))).every((e=>{const[t]=e?.parent||[];return!t||t===o}));return r&&l}function Lw({dropZoneElement:e,rootClientId:t="",parentClientId:n="",isDisabled:o=!1}={}){const r=(0,d.useRegistry)(),[l,i]=(0,u.useState)({index:null,operation:"insert"}),{getBlockType:s}=(0,d.useSelect)(c.store),{getBlockListSettings:a,getBlocks:m,getBlockIndex:h,getDraggedBlockClientIds:g,getBlockNamesByClientId:f,getAllowedBlocks:b,isDragging:v}=ie((0,d.useSelect)(Nr)),{showInsertionPoint:k,hideInsertionPoint:_,startDragging:y,stopDragging:E}=ie((0,d.useDispatch)(Nr)),w=Bw("before"===l.operation||"after"===l.operation?n:t,l.index,{operation:l.operation,nearestSide:l.nearestSide}),S=(0,p.useThrottle)((0,u.useCallback)(((o,l)=>{v()||y();const u=b(t),d=f([t])[0],p=f(g());if(!Nw(s,u,p,d))return;const _=m(t);if(0===_.length)return void r.batch((()=>{i({index:0,operation:"insert"}),k(t,0,{operation:"insert"})}));const E=_.map((e=>{const t=e.clientId;return{isUnmodifiedDefaultBlock:(0,c.isUnmodifiedDefaultBlock)(e),getBoundingClientRect:()=>l.getElementById(`block-${t}`).getBoundingClientRect(),blockIndex:h(t),blockOrientation:a(t)?.orientation}})),[w,S,C]=function(e,t,n="vertical",o={}){const r="horizontal"===n?["left","right"]:["top","bottom"];let l=0,i="before",s=1/0,a=null,c="right";const{dropZoneElement:u,parentBlockOrientation:d,rootBlockIndex:p=0}=o;if(u&&"horizontal"!==d){const e=u.getBoundingClientRect(),[n,o]=Iw(t,e,["top","bottom"]);if(e.height>Pw&&n<Mw){if("top"===o)return[p,"before"];if("bottom"===o)return[p+1,"after"]}}const m=(0,x.isRTL)();if(u&&"horizontal"===d){const e=u.getBoundingClientRect(),[n,o]=Iw(t,e,["left","right"]);if(e.width>Rw&&n<Mw){if(m&&"right"===o||!m&&"left"===o)return[p,"before"];if(m&&"left"===o||!m&&"right"===o)return[p+1,"after"]}}e.forEach((({isUnmodifiedDefaultBlock:e,getBoundingClientRect:o,blockIndex:u,blockOrientation:d})=>{const p=o();let[h,g]=Iw(t,p,r);const[f,b]=Iw(t,p,["left","right"]),v=Tw(t,p);e&&v?h=0:"vertical"===n&&"horizontal"!==d&&(v&&f<Mw||!v&&function(e,t){return t.top<=e.y&&t.bottom>=e.y}(t,p))&&(a=u,c=b),h<s&&(i="bottom"===g||!m&&"right"===g||m&&"left"===g?"after":"before",s=h,l=u)}));const h=l+("after"===i?1:-1),g=!!e[l]?.isUnmodifiedDefaultBlock,f=!!e[h]?.isUnmodifiedDefaultBlock;if(null!==a)return[a,"group",c];if(!g&&!f)return["after"===i?l+1:l,"insert"];return[g?l:h,"replace"]}(E,{x:o.clientX,y:o.clientY},a(t)?.orientation,{dropZoneElement:e,parentBlockClientId:n,parentBlockOrientation:n?a(n)?.orientation:void 0,rootBlockIndex:h(t)});r.batch((()=>{i({index:w,operation:S,nearestSide:C});const e=["before","after"].includes(S)?n:t;k(e,w,{operation:S,nearestSide:C})}))}),[b,t,f,g,s,m,a,e,n,h,r,k,v,y]),200);return(0,p.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:o,onDrop:w,onDragOver(e){S(e,e.currentTarget.ownerDocument)},onDragLeave(){S.cancel(),_()},onDragEnd(){S.cancel(),E(),_()}})}const Aw={};function Ow({children:e,clientId:t}){const n=function(e){return(0,d.useSelect)((t=>{const n=t(Nr).getBlock(e);if(!n)return;const o=t(c.store).getBlockType(n.name);return o&&0!==Object.keys(o.providesContext).length?Object.fromEntries(Object.entries(o.providesContext).map((([e,t])=>[e,n.attributes[t]]))):void 0}),[e])}(t);return(0,s.createElement)(ff,{value:n},e)}const Dw=(0,u.memo)(Jw);function zw(e){const{clientId:t,allowedBlocks:n,prioritizedInserterBlocks:o,defaultBlock:r,directInsert:l,__experimentalDefaultBlock:i,__experimentalDirectInsert:a,template:p,templateLock:m,wrapperRef:h,templateInsertUpdatesSelection:g,__experimentalCaptureToolbars:f,__experimentalAppenderTagName:b,renderAppender:v,orientation:k,placeholder:_,layout:y,name:E,blockType:w,parentLock:S,defaultLayout:x}=e;Cw(t,S,n,o,r,l,i,a,m,f,k,y),function(e,t,n,o){const{getBlocks:r,getSelectedBlocksInitialCaretPosition:l,isBlockSelected:i}=(0,d.useSelect)(Nr),{replaceInnerBlocks:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,d.useDispatch)(Nr),p=(0,u.useRef)(null);(0,u.useLayoutEffect)((()=>{let u=!1;return window.queueMicrotask((()=>{if(u)return;const d=r(e),m=0===d.length||"all"===n||"contentOnly"===n,h=!C()(t,p.current);if(!m||!h)return;p.current=t;const g=(0,c.synchronizeBlocksWithTemplate)(d,t);C()(g,d)||(a(),s(e,g,0===d.length&&o&&0!==g.length&&i(e),l()))})),()=>{u=!0}}),[t,n,e])}(t,p,m,g);const B=(0,c.getBlockSupport)(E,"layout")||(0,c.getBlockSupport)(E,"__experimentalLayout")||Aw,{allowSizingOnChildren:I=!1}=B,T=y||B,M=(0,u.useMemo)((()=>({...x,...T,...I&&{allowSizingOnChildren:!0}})),[x,T,I]),P=(0,s.createElement)(Dw,{rootClientId:t,renderAppender:v,__experimentalAppenderTagName:b,layout:M,wrapperRef:h,placeholder:_});return 0===Object.keys(w.providesContext).length?P:(0,s.createElement)(Ow,{clientId:t},P)}function Vw(e){return L_(e),(0,s.createElement)(zw,{...e})}const Fw=(0,u.forwardRef)(((e,t)=>{const n=Hw({ref:t},e);return(0,s.createElement)("div",{className:"block-editor-inner-blocks"},(0,s.createElement)("div",{...n}))}));function Hw(e={},t={}){const{__unstableDisableLayoutClassNames:n,__unstableDisableDropZone:o,dropZoneElement:r}=t,{clientId:l,layout:i=null,__unstableLayoutClassNames:a=""}=y(),u=(0,d.useSelect)((e=>{if(!l)return{};const{getBlockName:t,isBlockSelected:n,hasSelectedInnerBlock:o,__unstableGetEditorMode:r,getTemplateLock:i,getBlockRootClientId:s,getBlockEditingMode:a,getBlockSettings:u,isDragging:d}=ie(e(Nr)),{hasBlockSupport:p,getBlockType:m}=e(c.store),h=t(l),g="navigation"===r(),f=a(l),b=s(l),[v]=u(l,"layout");return{__experimentalCaptureToolbars:p(h,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==h&&!n(l)&&!o(l,!0)&&g&&!d(),name:h,blockType:m(h),parentLock:i(b),parentClientId:b,isDropZoneDisabled:"disabled"===f,defaultLayout:v}}),[l]),{__experimentalCaptureToolbars:m,hasOverlay:h,name:g,blockType:f,parentLock:b,parentClientId:v,isDropZoneDisabled:k,defaultLayout:_}=u,E=Lw({dropZoneElement:r,rootClientId:l,parentClientId:v,isDisabled:k}),w=(0,p.useMergeRefs)([e.ref,o?null:E]),S={__experimentalCaptureToolbars:m,layout:i,name:g,blockType:f,parentLock:b,defaultLayout:_,...t},C=S.value&&S.onChange?Vw:zw;return{...e,ref:w,className:ml()(e.className,"block-editor-block-list__layout",n?"":a,{"has-overlay":h}),children:l?(0,s.createElement)(C,{...S,clientId:l}):(0,s.createElement)(Jw,{...t})}}Hw.save=c.__unstableGetInnerBlocksProps,Fw.DefaultBlockAppender=ww,Fw.ButtonBlockAppender=Ew,Fw.Content=()=>Hw.save().children;const Gw=Fw,Uw=new Set([zs.UP,zs.RIGHT,zs.DOWN,zs.LEFT,zs.ENTER,zs.BACKSPACE]);function $w(){const e=(0,d.useSelect)((e=>e(Nr).isTyping()),[]),{stopTyping:t}=(0,d.useDispatch)(Nr);return(0,p.useRefEffect)((n=>{if(!e)return;const{ownerDocument:o}=n;let r,l;function i(e){const{clientX:n,clientY:o}=e;r&&l&&(r!==n||l!==o)&&t(),r=n,l=o}return o.addEventListener("mousemove",i),()=>{o.removeEventListener("mousemove",i)}}),[e,t])}function jw(){const{isTyping:e,hasInlineToolbar:t}=(0,d.useSelect)((e=>{const{isTyping:t,getSettings:n}=e(Nr);return{isTyping:t(),hasInlineToolbar:n().hasInlineToolbar}}),[]),{startTyping:n,stopTyping:o}=(0,d.useDispatch)(Nr),r=$w(),l=(0,p.useRefEffect)((r=>{const{ownerDocument:l}=r,{defaultView:i}=l,s=i.getSelection();if(e){let c;function u(e){const{target:t}=e;c=i.setTimeout((()=>{(0,As.isTextField)(t)||o()}))}function d(e){const{keyCode:t}=e;t!==zs.ESCAPE&&t!==zs.TAB||o()}function p(){s.isCollapsed||o()}return r.addEventListener("focus",u),r.addEventListener("keydown",d),t||l.addEventListener("selectionchange",p),()=>{i.clearTimeout(c),r.removeEventListener("focus",u),r.removeEventListener("keydown",d),l.removeEventListener("selectionchange",p)}}function a(e){const{type:t,target:o}=e;(0,As.isTextField)(o)&&r.contains(o)&&("keydown"!==t||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&Uw.has(t)}(e))&&n()}return r.addEventListener("keypress",a),r.addEventListener("keydown",a),()=>{r.removeEventListener("keypress",a),r.removeEventListener("keydown",a)}}),[e,t,n,o]);return(0,p.useMergeRefs)([r,l])}const Ww=function({children:e}){return(0,s.createElement)("div",{ref:jw()},e)},Kw=(0,u.createContext)(),Zw=new WeakMap;function qw({className:e,...t}){const n=(0,p.useViewportMatch)("medium"),{isOutlineMode:o,isFocusMode:r,editorMode:l}=(0,d.useSelect)((e=>{const{getSettings:t,__unstableGetEditorMode:n}=e(Nr),{outlineMode:o,focusMode:r}=t();return{isOutlineMode:o,isFocusMode:r,editorMode:n()}}),[]),i=(0,d.useRegistry)(),{setBlockVisibility:a}=(0,d.useDispatch)(Nr),c=(0,p.useDebounce)((0,u.useCallback)((()=>{const e={};Zw.get(i).forEach((([t,n])=>{e[t]=n})),a(e)}),[i]),300,{trailing:!0}),m=(0,u.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{Zw.get(i)||Zw.set(i,[]);for(const t of e){const e=t.target.getAttribute("data-block");Zw.get(i).push([e,t.isIntersecting])}c()}))}),[]),h=Hw({ref:(0,p.useMergeRefs)([F_(),_w(),jw()]),className:ml()("is-root-container",e,{"is-outline-mode":o,"is-focus-mode":r&&n,"is-navigate-mode":"navigation"===l})},t);return(0,s.createElement)(Kw.Provider,{value:m},(0,s.createElement)("div",{...h}))}function Yw({clientId:e}){const{stopEditingAsBlocks:t}=ie((0,d.useDispatch)(Nr)),n=(0,d.useSelect)((t=>{const{isBlockSelected:n,hasSelectedInnerBlock:o}=t(Nr);return n(e)||o(e,!0)}),[e]);return(0,u.useEffect)((()=>{n||t(e)}),[n,e,t]),null}function Xw(e){return(0,s.createElement)(_,{value:v},(0,s.createElement)(qw,{...e}))}function Qw({placeholder:e,rootClientId:t,renderAppender:n,__experimentalAppenderTagName:o,layout:r=Fi}){const l=!1!==n,i=!!n,{order:a,selectedBlocks:c,visibleBlocks:u,temporarilyEditingAsBlocks:p,shouldRenderAppender:m}=(0,d.useSelect)((e=>{const{getBlockOrder:n,getSelectedBlockClientId:o,getSelectedBlockClientIds:r,__unstableGetVisibleBlocks:s,__unstableGetTemporarilyEditingAsBlocks:a,getTemplateLock:c,getBlockEditingMode:u,__unstableGetEditorMode:d}=e(Nr),p=o();return{order:n(t),selectedBlocks:r(),visibleBlocks:s(),temporarilyEditingAsBlocks:a(),shouldRenderAppender:l&&(i?!c(t)&&"disabled"!==u(t)&&"zoom-out"!==d():t===p||!t&&!p)}}),[t,l,i]);return(0,s.createElement)(Gi,{value:r},a.map((e=>(0,s.createElement)(d.AsyncModeProvider,{key:e,value:!u.has(e)&&!c.includes(e)},(0,s.createElement)(C_,{rootClientId:t,clientId:e})))),a.length<1&&e,!!p&&(0,s.createElement)(Yw,{clientId:p}),m&&(0,s.createElement)(pw,{tagName:o,rootClientId:t,CustomAppender:n}))}function Jw(e){return(0,s.createElement)(d.AsyncModeProvider,{value:!1},(0,s.createElement)(Qw,{...e}))}const eS={placement:"top-start"},tS={...eS,flip:!1,shift:!0},nS={...eS,flip:!0,shift:!1};function oS(e,t,n,o,r){if(!e||!t)return tS;const l=n?.scrollTop||0,i=t.getBoundingClientRect(),s=l+e.getBoundingClientRect().top,a=e.ownerDocument.documentElement.clientHeight,c=s+o,u=i.top>c,d=i.height>a-o;return r||!u&&!d?nS:tS}function rS({contentElement:e,clientId:t}){const n=bd(t),[o,r]=(0,u.useState)(0),{blockIndex:l,isSticky:i}=(0,d.useSelect)((e=>{const{getBlockIndex:n,getBlockAttributes:o}=e(Nr);return{blockIndex:n(t),isSticky:gh(o(t))}}),[t]),s=(0,u.useMemo)((()=>{if(e)return(0,As.getScrollContainer)(e)}),[e]),[a,c]=(0,u.useState)((()=>oS(e,n,s,o,i))),m=(0,p.useRefEffect)((e=>{r(e.offsetHeight)}),[]),h=(0,u.useCallback)((()=>c(oS(e,n,s,o,i))),[e,n,s,o]);return(0,u.useLayoutEffect)(h,[l,h]),(0,u.useLayoutEffect)((()=>{if(!e||!n)return;const t=e?.ownerDocument?.defaultView;let o;t?.addEventHandler?.("resize",h);const r=n?.ownerDocument?.defaultView;return r.ResizeObserver&&(o=new r.ResizeObserver(h),o.observe(n)),()=>{t?.removeEventHandler?.("resize",h),o&&o.disconnect()}}),[h,e,n]),{...a,ref:m}}function lS(e){const t=(0,d.useSelect)((t=>{const{getBlockRootClientId:n,getBlockParents:o,__experimentalGetBlockListSettingsForBlocks:r,isBlockInsertionPointVisible:l,getBlockInsertionPoint:i,getBlockOrder:s,hasMultiSelection:a,getLastMultiSelectedBlockClientId:c}=t(Nr),u=o(e),d=r(u),p=u.find((e=>d[e]?.__experimentalCaptureToolbars));let m=!1;if(l()){const t=i();m=s(t.rootClientId)[t.index]===e}return{capturingClientId:p,isInsertionPointVisible:m,lastClientId:a()?c():null,rootClientId:n(e)}}),[e]);return t}function iS({clientId:e,__unstableContentRef:t}){const{capturingClientId:n,isInsertionPointVisible:o,lastClientId:r,rootClientId:l}=lS(e),i=rS({contentElement:t?.current,clientId:e});return(0,s.createElement)(fm,{clientId:n||e,__unstableCoverTarget:!0,bottomClientId:r,className:ml()("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":o}),__unstableContentRef:t,resize:!1,shift:!1,...i},(0,s.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,s.createElement)(lw,{position:"bottom right",rootClientId:l,clientId:e,__experimentalIsQuick:!0})))}const sS=({appendToOwnerDocument:e,children:t,clientIds:n,cloneClassname:o,elementId:r,onDragStart:l,onDragEnd:i,fadeWhenDisabled:a=!1,dragComponent:m})=>{const{srcRootClientId:h,isDraggable:g,icon:f,visibleInserter:b,getBlockType:v}=(0,d.useSelect)((e=>{const{canMoveBlocks:t,getBlockRootClientId:o,getBlockName:r,getBlockAttributes:l,isBlockInsertionPointVisible:i}=e(Nr),{getBlockType:s,getActiveBlockVariation:a}=e(c.store),u=o(n[0]),d=r(n[0]),p=a(d,l(n[0]));return{srcRootClientId:u,isDraggable:t(n,u),icon:p?.icon||s(d)?.icon,visibleInserter:i(),getBlockType:s}}),[n]),k=(0,u.useRef)(!1),[_,y,E]=function(){const e=(0,u.useRef)(null),t=(0,u.useRef)(null),n=(0,u.useRef)(null),o=(0,u.useRef)(null);return(0,u.useEffect)((()=>()=>{o.current&&(clearInterval(o.current),o.current=null)}),[]),[(0,u.useCallback)((r=>{e.current=r.clientY,n.current=(0,As.getScrollContainer)(r.target),o.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,u.useCallback)((o=>{if(!n.current)return;const r=n.current.offsetHeight,l=e.current-n.current.offsetTop,i=o.clientY-n.current.offsetTop;if(o.clientY>l){const e=Math.max(r-l-50,0),n=Math.max(i-l-50,0),o=0===e||0===n?0:n/e;t.current=25*o}else if(o.clientY<l){const e=Math.max(l-50,0),n=Math.max(l-i-50,0),o=0===e||0===n?0:n/e;t.current=-25*o}else t.current=0}),[]),()=>{e.current=null,n.current=null,o.current&&(clearInterval(o.current),o.current=null)}]}(),{getAllowedBlocks:w,getBlockNamesByClientId:S,getBlockRootClientId:C}=(0,d.useSelect)(Nr),{startDraggingBlocks:x,stopDraggingBlocks:B}=(0,d.useDispatch)(Nr);(0,u.useEffect)((()=>()=>{k.current&&B()}),[]);const I=fd(n[0]),T=I.current?.closest("body");if((0,u.useEffect)((()=>{if(!T||!a)return;const e=(0,p.throttle)((e=>{if(!e.target.closest("[data-block]"))return;const t=S(n),o=e.target.closest("[data-block]").getAttribute("data-block"),r=w(o),l=S([o])[0];let i;if(0===r?.length){const e=C(o),n=S([e])[0],r=w(e);i=Nw(v,r,t,n)}else i=Nw(v,r,t,l);i||b?window?.document?.body?.classList?.remove("block-draggable-invalid-drag-token"):window?.document?.body?.classList?.add("block-draggable-invalid-drag-token")}),200);return T.addEventListener("dragover",e),()=>{T.removeEventListener("dragover",e)}}),[n,T,a,w,S,C,v,b]),!g)return t({draggable:!1});const M={type:"block",srcClientIds:n,srcRootClientId:h};return(0,s.createElement)(_l.Draggable,{appendToOwnerDocument:e,cloneClassname:o,__experimentalTransferDataType:"wp-blocks",transferData:M,onDragStart:e=>{window.requestAnimationFrame((()=>{x(n),k.current=!0,_(e),l&&l()}))},onDragOver:y,onDragEnd:()=>{B(),k.current=!1,E(),i&&i()},__experimentalDragComponent:void 0!==m?m:(0,s.createElement)(Ay,{count:n.length,icon:f,fadeWhenDisabled:!0}),elementId:r},(({onDraggableStart:e,onDraggableEnd:n})=>t({draggable:!0,onDragStart:e,onDragEnd:n})))},aS=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),cS=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),uS=(e,t)=>"up"===e?"horizontal"===t?(0,x.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===t?(0,x.isRTL)()?"left":"right":"down":null;function dS(e,t,n,o,r,l,i){const s=n+1;if(e>1)return function(e,t,n,o,r,l){const i=t+1;if(n&&o)return(0,x.__)("All blocks are selected, and cannot be moved");if(r>0&&!o){const t=uS("down",l);if("down"===t)return(0,x.sprintf)((0,x.__)("Move %1$d blocks from position %2$d down by one place"),e,i);if("left"===t)return(0,x.sprintf)((0,x.__)("Move %1$d blocks from position %2$d left by one place"),e,i);if("right"===t)return(0,x.sprintf)((0,x.__)("Move %1$d blocks from position %2$d right by one place"),e,i)}if(r>0&&o){const e=uS("down",l);if("down"===e)return(0,x.__)("Blocks cannot be moved down as they are already at the bottom");if("left"===e)return(0,x.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,x.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(r<0&&!n){const t=uS("up",l);if("up"===t)return(0,x.sprintf)((0,x.__)("Move %1$d blocks from position %2$d up by one place"),e,i);if("left"===t)return(0,x.sprintf)((0,x.__)("Move %1$d blocks from position %2$d left by one place"),e,i);if("right"===t)return(0,x.sprintf)((0,x.__)("Move %1$d blocks from position %2$d right by one place"),e,i)}if(r<0&&n){const e=uS("up",l);if("up"===e)return(0,x.__)("Blocks cannot be moved up as they are already at the top");if("left"===e)return(0,x.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,x.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}(e,n,o,r,l,i);if(o&&r)return(0,x.sprintf)((0,x.__)("Block %s is the only block, and cannot be moved"),t);if(l>0&&!r){const e=uS("down",i);if("down"===e)return(0,x.sprintf)((0,x.__)("Move %1$s block from position %2$d down to position %3$d"),t,s,s+1);if("left"===e)return(0,x.sprintf)((0,x.__)("Move %1$s block from position %2$d left to position %3$d"),t,s,s+1);if("right"===e)return(0,x.sprintf)((0,x.__)("Move %1$s block from position %2$d right to position %3$d"),t,s,s+1)}if(l>0&&r){const e=uS("down",i);if("down"===e)return(0,x.sprintf)((0,x.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return(0,x.sprintf)((0,x.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return(0,x.sprintf)((0,x.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(l<0&&!o){const e=uS("up",i);if("up"===e)return(0,x.sprintf)((0,x.__)("Move %1$s block from position %2$d up to position %3$d"),t,s,s-1);if("left"===e)return(0,x.sprintf)((0,x.__)("Move %1$s block from position %2$d left to position %3$d"),t,s,s-1);if("right"===e)return(0,x.sprintf)((0,x.__)("Move %1$s block from position %2$d right to position %3$d"),t,s,s-1)}if(l<0&&o){const e=uS("up",i);if("up"===e)return(0,x.sprintf)((0,x.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,x.sprintf)((0,x.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,x.sprintf)((0,x.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}const pS=(e,t)=>"up"===e?"horizontal"===t?(0,x.isRTL)()?T_:M_:aS:"down"===e?"horizontal"===t?(0,x.isRTL)()?M_:T_:cS:null,mS=(e,t)=>"up"===e?"horizontal"===t?(0,x.isRTL)()?(0,x.__)("Move right"):(0,x.__)("Move left"):(0,x.__)("Move up"):"down"===e?"horizontal"===t?(0,x.isRTL)()?(0,x.__)("Move left"):(0,x.__)("Move right"):(0,x.__)("Move down"):null,hS=(0,u.forwardRef)((({clientIds:e,direction:t,orientation:n,...o},r)=>{const l=(0,p.useInstanceId)(hS),i=Array.isArray(e)?e:[e],a=i.length,{blockType:u,isDisabled:m,rootClientId:h,isFirst:g,isLast:f,firstIndex:b,orientation:v="vertical"}=(0,d.useSelect)((e=>{const{getBlockIndex:o,getBlockRootClientId:r,getBlockOrder:l,getBlock:s,getBlockListSettings:a}=e(Nr),u=i[0],d=r(u),p=o(u),m=o(i[i.length-1]),h=l(d),g=s(u),f=0===p,b=m===h.length-1,{orientation:v}=a(d)||{};return{blockType:g?(0,c.getBlockType)(g.name):null,isDisabled:"up"===t?f:b,rootClientId:d,firstIndex:p,isFirst:f,isLast:b,orientation:n||v}}),[e,t]),{moveBlocksDown:k,moveBlocksUp:_}=(0,d.useDispatch)(Nr),y="up"===t?_:k,E=`block-editor-block-mover-button__description-${l}`;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.Button,{ref:r,className:ml()("block-editor-block-mover-button",`is-${t}-button`),icon:pS(t,v),label:mS(t,v),"aria-describedby":E,...o,onClick:m?null:t=>{y(e,h),o.onClick&&o.onClick(t)},disabled:m,__experimentalIsFocusable:!0}),(0,s.createElement)(_l.VisuallyHidden,{id:E},dS(a,u&&u.title,b,g,f,"up"===t?-1:1,v)))})),gS=(0,u.forwardRef)(((e,t)=>(0,s.createElement)(hS,{direction:"up",ref:t,...e}))),fS=(0,u.forwardRef)(((e,t)=>(0,s.createElement)(hS,{direction:"down",ref:t,...e})));const bS=function({clientIds:e,hideDragHandle:t}){const{canMove:n,rootClientId:o,isFirst:r,isLast:l,orientation:i}=(0,d.useSelect)((t=>{const{getBlockIndex:n,getBlockListSettings:o,canMoveBlocks:r,getBlockOrder:l,getBlockRootClientId:i}=t(Nr),s=Array.isArray(e)?e:[e],a=s[0],c=i(a),u=n(a),d=n(s[s.length-1]),p=l(c);return{canMove:r(e,c),rootClientId:c,isFirst:0===u,isLast:d===p.length-1,orientation:o(c)?.orientation}}),[e]);if(!n||r&&l&&!o)return null;const a=(0,x.__)("Drag");return(0,s.createElement)(_l.ToolbarGroup,{className:ml()("block-editor-block-mover",{"is-horizontal":"horizontal"===i})},!t&&(0,s.createElement)(sS,{clientIds:e,fadeWhenDisabled:!0},(e=>(0,s.createElement)(_l.Button,{icon:Ly,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:a,tabIndex:"-1",...e}))),(0,s.createElement)("div",{className:"block-editor-block-mover__move-button-container"},(0,s.createElement)(_l.ToolbarItem,null,(t=>(0,s.createElement)(gS,{clientIds:e,...t}))),(0,s.createElement)(_l.ToolbarItem,null,(t=>(0,s.createElement)(fS,{clientIds:e,...t})))))},{clearTimeout:vS,setTimeout:kS}=window,_S=200;function yS({ref:e,isFocused:t,highlightParent:n,debounceTimeout:o=_S}){const{getSelectedBlockClientId:r,getBlockRootClientId:l}=(0,d.useSelect)(Nr),{toggleBlockHighlight:i}=(0,d.useDispatch)(Nr),s=(0,u.useRef)(),a=(0,d.useSelect)((e=>e(Nr).getSettings().isDistractionFree),[]),c=e=>{if(e&&a)return;const t=r(),o=n?l(t):t;i(o,e)},p=()=>{const n=e?.current&&e.current.matches(":hover");return!t&&!n},m=()=>{const e=s.current;e&&vS&&vS(e)};return(0,u.useEffect)((()=>()=>{c(!1),m()}),[]),{debouncedShowGestures:e=>{e&&e.stopPropagation(),m(),c(!0)},debouncedHideGestures:e=>{e&&e.stopPropagation(),m(),s.current=kS((()=>{p()&&c(!1)}),o)}}}function ES({ref:e,highlightParent:t=!1,debounceTimeout:n=_S}){const[o,r]=(0,u.useState)(!1),{debouncedShowGestures:l,debouncedHideGestures:i}=yS({ref:e,debounceTimeout:n,isFocused:o,highlightParent:t}),s=(0,u.useRef)(!1),a=()=>e?.current&&e.current.contains(e.current.ownerDocument.activeElement);return(0,u.useEffect)((()=>{const t=e.current,n=()=>{a()&&(r(!0),l())},o=()=>{a()||(r(!1),i())};return t&&!s.current&&(t.addEventListener("focus",n,!0),t.addEventListener("blur",o,!0),s.current=!0),()=>{t&&(t.removeEventListener("focus",n),t.removeEventListener("blur",o))}}),[e,s,r,l,i]),{onMouseMove:l,onMouseLeave:i}}function wS(){const{selectBlock:e}=(0,d.useDispatch)(Nr),{firstParentClientId:t,isVisible:n}=(0,d.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:o,getBlockEditingMode:r}=e(Nr),{hasBlockSupport:l}=e(c.store),i=n(o()),s=i[i.length-1],a=t(s),u=(0,c.getBlockType)(a);return{firstParentClientId:s,isVisible:s&&"default"===r(s)&&l(u,"__experimentalParentSelector",!0)}}),[]),o=ih(t),r=(0,u.useRef)(),l=ES({ref:r,highlightParent:!0});return n?(0,s.createElement)("div",{className:"block-editor-block-parent-selector",key:t,ref:r,...l},(0,s.createElement)(_l.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,x.sprintf)((0,x.__)("Select parent block: %s"),o?.title),showTooltip:!0,icon:(0,s.createElement)(qh,{icon:o?.icon})})):null}const SS=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"}));function CS({blocks:e}){return(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,s.createElement)(_l.Popover,{className:"block-editor-block-switcher__preview__popover",placement:"bottom-start",focusOnMount:!1},(0,s.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,s.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,x.__)("Preview")),(0,s.createElement)(Ty,{viewportWidth:500,blocks:e})))))}const xS={};function BS({item:e,onSelect:t,setHoveredTransformItemName:n}){const{name:o,icon:r,title:l}=e;return(0,s.createElement)(_l.MenuItem,{className:(0,c.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),t(o)},onMouseLeave:()=>n(null),onMouseEnter:()=>n(o)},(0,s.createElement)(qh,{icon:r,showColors:!0}),l)}const IS=({transformations:e,onSelect:t,blocks:n})=>{const[o,r]=(0,u.useState)();return(0,s.createElement)(s.Fragment,null,o&&(0,s.createElement)(CS,{blocks:(0,c.cloneBlock)(n[0],e.find((({name:e})=>e===o)).attributes)}),e?.map((e=>(0,s.createElement)(BS,{key:e.name,item:e,onSelect:t,setHoveredTransformItemName:r}))))};function TS({restTransformations:e,onSelect:t,setHoveredTransformItemName:n}){return e.map((e=>(0,s.createElement)(MS,{key:e.name,item:e,onSelect:t,setHoveredTransformItemName:n})))}function MS({item:e,onSelect:t,setHoveredTransformItemName:n}){const{name:o,icon:r,title:l,isDisabled:i}=e;return(0,s.createElement)(_l.MenuItem,{className:(0,c.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),t(o)},disabled:i,onMouseLeave:()=>n(null),onMouseEnter:()=>n(o)},(0,s.createElement)(qh,{icon:r,showColors:!0}),l)}const PS=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:n,onSelect:o,onSelectVariation:r,blocks:l})=>{const[i,a]=(0,u.useState)(),{priorityTextTransformations:d,restTransformations:p}=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),o=e.reduce(((e,t)=>{const{name:o}=t;return n.includes(o)?e.priorityTextTransformations.push(t):e.restTransformations.push(t),e}),{priorityTextTransformations:[],restTransformations:[]});if(1===o.priorityTextTransformations.length&&"core/quote"===o.priorityTextTransformations[0].name){const e=o.priorityTextTransformations.pop();o.restTransformations.push(e)}return o}),[e]);return n.priorityTextTransformations.sort((({name:e},{name:n})=>t[e]<t[n]?-1:1)),n}(t),m=d.length&&p.length,h=!!p.length&&(0,s.createElement)(TS,{restTransformations:p,onSelect:o,setHoveredTransformItemName:a});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.MenuGroup,{label:(0,x.__)("Transform to"),className:e},i&&(0,s.createElement)(CS,{blocks:(0,c.switchToBlockType)(l,i)}),!!n?.length&&(0,s.createElement)(IS,{transformations:n,blocks:l,onSelect:r}),d.map((e=>(0,s.createElement)(MS,{key:e.name,item:e,onSelect:o,setHoveredTransformItemName:a}))),!m&&h),!!m&&(0,s.createElement)(_l.MenuGroup,{className:e},h))};function RS(e,t,n){const o=new(vp())(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}function NS(e){return e?.find((e=>e.isDefault))}function LS({clientId:e,onSwitch:t}){const{styles:n,block:o,blockType:r,className:l}=(0,d.useSelect)((t=>{const{getBlock:n}=t(Nr),o=n(e);if(!o)return{};const r=(0,c.getBlockType)(o.name),{getBlockStyles:l}=t(c.store);return{block:o,blockType:r,styles:l(o.name),className:o.attributes.className||""}}),[e]),{updateBlockAttributes:i}=(0,d.useDispatch)(Nr),s=function(e){return e&&0!==e.length?NS(e)?e:[{name:"default",label:(0,x._x)("Default","block style"),isDefault:!0},...e]:[]}(n),a=function(e,t){for(const n of new(vp())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),o=e?.find((({name:e})=>e===t));if(o)return o}return NS(e)}(s,l),p=function(e,t){return(0,u.useMemo)((()=>{const n=t?.example,o=t?.name;return n&&o?(0,c.getBlockFromExample)(o,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,c.cloneBlock)(e):void 0}),[t?.example?e?.name:e,t])}(o,r);return{onSelect:n=>{const o=RS(l,a,n);i(e,{className:o}),t()},stylesToRender:s,activeStyle:a,genericPreviewBlock:p,className:l}}const AS=()=>{};function OS({clientId:e,onSwitch:t=AS}){const{onSelect:n,stylesToRender:o,activeStyle:r}=LS({clientId:e,onSwitch:t});return o&&0!==o.length?(0,s.createElement)(s.Fragment,null,o.map((e=>{const t=e.label||e.name;return(0,s.createElement)(_l.MenuItem,{key:e.name,icon:r.name===e.name?uu:null,onClick:()=>n(e)},(0,s.createElement)(_l.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},t))}))):null}function DS({hoveredBlock:e,onSwitch:t}){const{clientId:n}=e;return(0,s.createElement)(_l.MenuGroup,{label:(0,x.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,s.createElement)(OS,{clientId:n,onSwitch:t}))}const zS=(e,t,n=new Set)=>{const{clientId:o,name:r,innerBlocks:l=[]}=e;if(!n.has(o)){if(r===t)return e;for(const e of l){const o=zS(e,t,n);if(o)return o}}},VS=(e,t)=>{const n=((e,t)=>{const n=(0,c.__experimentalGetBlockAttributesNamesByRole)(e,"content");return n?.length?n.reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}},FS=(e,t)=>(0,u.useMemo)((()=>e.reduce(((e,n)=>{const o=((e,t)=>{const n=t.map((e=>(0,c.cloneBlock)(e))),o=new Set;for(const t of e){let e=!1;for(const r of n){const n=zS(r,t.name,o);if(n){e=!0,o.add(n.clientId),VS(n,t);break}}if(!e)return}return n})(t,n.blocks);return o&&e.push({...n,transformedBlocks:o}),e}),[])),[e,t]),{CompositeV2:HS,CompositeItemV2:GS,useCompositeStoreV2:US}=ie(_l.privateApis);function $S({patterns:e,onSelect:t}){return(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,s.createElement)(_l.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,s.createElement)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview"},(0,s.createElement)(jS,{patterns:e,onSelect:t})))))}function jS({patterns:e,onSelect:t}){const n=US();return(0,s.createElement)(HS,{store:n,role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,x.__)("Patterns list")},e.map((e=>(0,s.createElement)(WS,{key:e.name,pattern:e,onSelect:t}))))}function WS({pattern:e,onSelect:t}){const n="block-editor-block-switcher__preview-patterns-container",o=(0,p.useInstanceId)(WS,`${n}-list__item-description`);return(0,s.createElement)("div",{className:`${n}-list__list-item`},(0,s.createElement)(GS,{render:(0,s.createElement)("div",{role:"option","aria-label":e.title,"aria-describedby":e.description?o:void 0,className:`${n}-list__item`}),onClick:()=>t(e.transformedBlocks)},(0,s.createElement)(Ty,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,s.createElement)("div",{className:`${n}-list__item-title`},e.title)),!!e.description&&(0,s.createElement)(_l.VisuallyHidden,{id:o},e.description))}const KS=function({blocks:e,patterns:t,onSelect:n}){const[o,r]=(0,u.useState)(!1),l=FS(t,e);return l.length?(0,s.createElement)(_l.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},o&&(0,s.createElement)($S,{patterns:l,onSelect:n}),(0,s.createElement)(_l.MenuItem,{onClick:e=>{e.preventDefault(),r(!o)},icon:T_},(0,x.__)("Patterns"))):null};function ZS({onClose:e,clientIds:t,hasBlockStyles:n,canRemove:o}){const{replaceBlocks:r,multiSelect:l,updateBlockAttributes:i}=(0,d.useDispatch)(Nr),{possibleBlockTransformations:a,patterns:p,blocks:m}=(0,d.useSelect)((e=>{const{getBlocksByClientId:n,getBlockRootClientId:o,getBlockTransformItems:r,__experimentalGetPatternTransformItems:l}=e(Nr),i=o(Array.isArray(t)?t[0]:t),s=n(t);return{blocks:s,possibleBlockTransformations:r(s,i),patterns:l(s,i)}}),[t]),h=function({clientIds:e,blocks:t}){const{activeBlockVariation:n,blockVariationTransformations:o}=(0,d.useSelect)((n=>{const{getBlockRootClientId:o,getBlockAttributes:r,canRemoveBlocks:l}=n(Nr),{getActiveBlockVariation:i,getBlockVariations:s}=n(c.store),a=o(Array.isArray(e)?e[0]:e),u=l(e,a);if(1!==t.length||!u)return xS;const[d]=t;return{blockVariationTransformations:s(d.name,"transform"),activeBlockVariation:i(d.name,r(d.clientId))}}),[e,t]);return(0,u.useMemo)((()=>o?.filter((({name:e})=>e!==n?.name))),[o,n])}({clientIds:t,blocks:m});function g(e){e.length>1&&l(e[0].clientId,e[e.length-1].clientId)}const f=1===m.length&&(0,c.isTemplatePart)(m[0]),b=!!a.length&&o&&!f,v=!!h?.length,k=!!p?.length&&o,_=b||v;return n||_||k?(0,s.createElement)("div",{className:"block-editor-block-switcher__container"},k&&(0,s.createElement)(KS,{blocks:m,patterns:p,onSelect:n=>{!function(e){r(t,e),g(e)}(n),e()}}),_&&(0,s.createElement)(PS,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:a,possibleBlockVariationTransformations:h,blocks:m,onSelect:n=>{!function(e){const n=(0,c.switchToBlockType)(m,e);r(t,n),g(n)}(n),e()},onSelectVariation:t=>{!function(e){i(m[0].clientId,{...h.find((({name:t})=>t===e)).attributes})}(t),e()}}),n&&(0,s.createElement)(DS,{hoveredBlock:m[0],onSwitch:e})):(0,s.createElement)("p",{className:"block-editor-block-switcher__no-transforms"},(0,x.__)("No transforms."))}const qS=({clientIds:e})=>{const{canRemove:t,hasBlockStyles:n,icon:o,invalidBlocks:r,isReusable:l,isTemplate:i}=(0,d.useSelect)((t=>{const{getBlockRootClientId:n,getBlocksByClientId:o,getBlockAttributes:r,canRemoveBlocks:l}=t(Nr),{getBlockStyles:i,getBlockType:s,getActiveBlockVariation:a}=t(c.store),u=o(e);if(!u.length||u.some((e=>!e)))return{invalidBlocks:!0};const d=n(Array.isArray(e)?e[0]:e),[{name:p}]=u,m=1===u.length,h=s(p);let g;if(m){const t=a(p,r(e[0]));g=t?.icon||h.icon}else{g=1===new Set(u.map((({name:e})=>e))).size?h.icon:SS}return{canRemove:l(e,d),hasBlockStyles:m&&!!i(p)?.length,icon:g,isReusable:m&&(0,c.isReusableBlock)(u[0]),isTemplate:m&&(0,c.isTemplatePart)(u[0])}}),[e]),a=df({clientId:e?.[0],maximumLength:35});if(r)return null;const u=1===e.length,p=u?a:(0,x.__)("Multiple blocks selected");if(!n&&!t)return(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(_l.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:p,icon:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(qh,{icon:o,showColors:!0}),(l||i)&&(0,s.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},a))}));const m=u?(0,x.__)("Change block type or style"):(0,x.sprintf)((0,x._n)("Change type of %d block","Change type of %d blocks",e.length),e.length);return(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(_l.ToolbarItem,null,(r=>(0,s.createElement)(_l.DropdownMenu,{className:"block-editor-block-switcher",label:p,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(qh,{icon:o,className:"block-editor-block-switcher__toggle",showColors:!0}),(l||i)&&(0,s.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},a)),toggleProps:{describedBy:m,...r},menuProps:{orientation:"both"}},(({onClose:o})=>(0,s.createElement)(ZS,{onClose:o,clientIds:e,hasBlockStyles:n,canRemove:t}))))))},{Fill:YS,Slot:XS}=(0,_l.createSlotFill)("__unstableBlockToolbarLastItem");YS.Slot=XS;const QS=YS,JS="align",eC="__experimentalBorder",tC="color",nC="customClassName",oC="typography.__experimentalFontFamily",rC="typography.fontSize",lC="layout",iC=["shadow",...["typography.lineHeight",rC,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",oC,"typography.textColumns","typography.__experimentalTextDecoration","typography.__experimentalTextTransform","typography.__experimentalWritingMode","typography.__experimentalLetterSpacing"],eC,tC,"spacing"];const sC={align:e=>(0,c.hasBlockSupport)(e,JS),borderColor:e=>function(e,t="any"){if("web"!==u.Platform.OS)return!1;const n=(0,c.getBlockSupport)(e,eC);return!0===n||("any"===t?!!(n?.color||n?.radius||n?.width||n?.style):!!n?.[t])}(e,"color"),backgroundColor:e=>{const t=(0,c.getBlockSupport)(e,tC);return t&&!1!==t.background},textColor:e=>{const t=(0,c.getBlockSupport)(e,tC);return t&&!1!==t.text},gradient:e=>{const t=(0,c.getBlockSupport)(e,tC);return null!==t&&"object"==typeof t&&!!t.gradients},className:e=>(0,c.hasBlockSupport)(e,nC,!0),fontFamily:e=>(0,c.hasBlockSupport)(e,oC),fontSize:e=>(0,c.hasBlockSupport)(e,rC),layout:e=>(0,c.hasBlockSupport)(e,lC),style:e=>iC.some((t=>(0,c.hasBlockSupport)(e,t)))};function aC(e,t){return Object.entries(sC).reduce(((n,[o,r])=>(r(e.name)&&r(t.name)&&(n[o]=e.attributes[o]),n)),{})}function cC(e,t,n){for(let o=0;o<Math.min(t.length,e.length);o+=1)n(e[o].clientId,aC(t[o],e[o])),cC(e[o].innerBlocks,t[o].innerBlocks,n)}function uC(){const e=(0,d.useRegistry)(),{updateBlockAttributes:t}=(0,d.useDispatch)(Nr),{createSuccessNotice:n,createWarningNotice:o,createErrorNotice:r}=(0,d.useDispatch)(Os.store);return(0,u.useCallback)((async l=>{let i="";try{if(!window.navigator.clipboard)return void r((0,x.__)("Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers."),{type:"snackbar"});i=await window.navigator.clipboard.readText()}catch(e){return void r((0,x.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"})}if(!i||!function(e){try{const t=(0,c.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return 1!==t.length||"core/freeform"!==t[0].name}catch(e){return!1}}(i))return void o((0,x.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});const s=(0,c.parse)(i);if(1===s.length?e.batch((()=>{cC(l,l.map((()=>s[0])),t)})):e.batch((()=>{cC(l,s,t)})),1===l.length){const e=(0,c.getBlockType)(l[0].name)?.title;n((0,x.sprintf)((0,x.__)("Pasted styles to %s."),e),{type:"snackbar"})}else n((0,x.sprintf)((0,x.__)("Pasted styles to %d blocks."),l.length),{type:"snackbar"})}),[e.batch,t,n,o,r])}function dC({clientIds:e,children:t,__experimentalUpdateSelection:n}){const{getDefaultBlockName:o,getGroupingBlockName:r}=(0,d.useSelect)(c.store),l=(0,d.useSelect)((t=>{const{canInsertBlockType:n,getBlockRootClientId:r,getBlocksByClientId:l,getDirectInsertBlock:i,canMoveBlocks:s,canRemoveBlocks:a}=t(Nr),u=l(e),d=r(e[0]),p=n(o(),d),m=d?i(d):null;return{canMove:s(e,d),canRemove:a(e,d),canInsertBlock:p||!!m,canCopyStyles:u.every((e=>!!e&&((0,c.hasBlockSupport)(e.name,"color")||(0,c.hasBlockSupport)(e.name,"typography")))),canDuplicate:u.every((e=>!!e&&(0,c.hasBlockSupport)(e.name,"multiple",!0)&&n(e.name,d)))}}),[e,o]),{getBlocksByClientId:i,getBlocks:s}=(0,d.useSelect)(Nr),{canMove:a,canRemove:u,canInsertBlock:p,canCopyStyles:m,canDuplicate:h}=l,{removeBlocks:g,replaceBlocks:f,duplicateBlocks:b,insertAfterBlock:v,insertBeforeBlock:k,flashBlock:_,setBlockMovingClientId:y,setNavigationMode:E,selectBlock:w}=(0,d.useDispatch)(Nr),S=ey(),C=uC();return t({canCopyStyles:m,canDuplicate:h,canInsertBlock:p,canMove:a,canRemove:u,onDuplicate:()=>b(e,n),onRemove:()=>g(e,n),onInsertBefore(){const t=Array.isArray(e)?e[0]:t;k(t)},onInsertAfter(){const t=Array.isArray(e)?e[e.length-1]:t;v(t)},onMoveTo(){E(!0),w(e[0]),y(e[0])},onGroup(){if(!e.length)return;const t=r(),n=(0,c.switchToBlockType)(i(e),t);n&&f(e,n)},onUngroup(){if(!e.length)return;const t=s(e[0]);t.length&&f(e,t)},onCopy(){1===e.length&&_(e[0]),S("copy",e)},async onPasteStyles(){await C(i(e))}})}const pC=function({clientId:e}){const t=(0,d.useSelect)((t=>t(Nr).getBlock(e)),[e]),{replaceBlocks:n}=(0,d.useDispatch)(Nr);return t&&"core/html"===t.name?(0,s.createElement)(_l.MenuItem,{onClick:()=>n(e,(0,c.rawHandler)({HTML:(0,c.getBlockContent)(t)}))},(0,x.__)("Convert to Blocks")):null},{Fill:mC,Slot:hC}=(0,_l.createSlotFill)("__unstableBlockSettingsMenuFirstItem");mC.Slot=hC;const gC=mC,fC={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"};function bC({clientIds:e,onCopy:t,label:n}){const{getBlocksByClientId:o}=(0,d.useSelect)(Nr),r=(0,p.useCopyToClipboard)((()=>(0,c.serialize)(o(e))),t),l=n||(0,x.__)("Copy");return(0,s.createElement)(_l.MenuItem,{ref:r},l)}function vC({parentClientId:e,parentBlockType:t}){const n=(0,p.useViewportMatch)("medium","<"),{selectBlock:o}=(0,d.useDispatch)(Nr),r=(0,u.useRef)(),l=ES({ref:r,highlightParent:!0});return n?(0,s.createElement)(_l.MenuItem,{...l,ref:r,icon:(0,s.createElement)(qh,{icon:t.icon}),onClick:()=>o(e)},(0,x.sprintf)((0,x.__)("Select parent block (%s)"),t.title)):null}function kC({block:e,clientIds:t,__experimentalSelectBlock:n,children:o,__unstableDisplayLocation:r,...l}){const i=e?.clientId,a=Array.isArray(t)?t:[t],m=a.length,h=a[0],{firstParentClientId:g,onlyBlock:f,parentBlockType:b,previousBlockClientId:v,selectedBlockClientIds:k}=(0,d.useSelect)((e=>{const{getBlockCount:t,getBlockName:n,getBlockRootClientId:o,getPreviousBlockClientId:r,getSelectedBlockClientIds:l,getBlockAttributes:i}=e(Nr),{getActiveBlockVariation:s}=e(c.store),a=o(h),u=a&&n(a);return{firstParentClientId:a,onlyBlock:1===t(a),parentBlockType:a&&(s(u,i(a))||(0,c.getBlockType)(u)),previousBlockClientId:r(h),selectedBlockClientIds:l()}}),[h]),{getBlockOrder:_,getSelectedBlockClientIds:y}=(0,d.useSelect)(Nr),E=(0,d.useSelect)((e=>ie(e(Nr)).getOpenedBlockSettingsMenu()),[]),{setOpenedBlockSettingsMenu:w}=ie((0,d.useDispatch)(Nr)),S=(0,d.useSelect)((e=>{const{getShortcutRepresentation:t}=e(A_.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")}}),[]),C=(0,A_.__unstableUseShortcutEventMatch)(),B=k.length>0,I=(0,u.useCallback)((async e=>{if(n){const t=await e;t&&t[0]&&n(t[0],!1)}}),[n]),T=(0,u.useCallback)((()=>{if(n){let e=v||g;e||(e=_()[0]);const t=B&&0===y().length;n(e,t)}}),[n,v,g,_,B,y]),M=k?.includes(g),P=i?E===i||!1:void 0,R=(0,u.useCallback)((e=>{e&&E!==i?w(i):!e&&E&&E===i&&w(void 0)}),[i,E,w]);return(0,s.createElement)(dC,{clientIds:t,__experimentalUpdateSelection:!n},(({canCopyStyles:e,canDuplicate:n,canInsertBlock:i,canMove:a,canRemove:c,onDuplicate:d,onInsertAfter:v,onInsertBefore:k,onRemove:_,onCopy:y,onPasteStyles:E,onMoveTo:B})=>(0,s.createElement)(_l.DropdownMenu,{icon:Ef,label:(0,x.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:fC,open:P,onToggle:R,noIcons:!0,menuProps:{onKeyDown(e){e.defaultPrevented||(C("core/block-editor/remove",e)&&c?(e.preventDefault(),T(_())):C("core/block-editor/duplicate",e)&&n?(e.preventDefault(),I(d())):C("core/block-editor/insert-after",e)&&i?(e.preventDefault(),w(void 0),v()):C("core/block-editor/insert-before",e)&&i&&(e.preventDefault(),w(void 0),k()))}},...l},(({onClose:l})=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.MenuGroup,null,(0,s.createElement)(gC.Slot,{fillProps:{onClose:l}}),!M&&!!g&&(0,s.createElement)(vC,{parentClientId:g,parentBlockType:b}),1===m&&(0,s.createElement)(pC,{clientId:h}),(0,s.createElement)(bC,{clientIds:t,onCopy:y}),n&&(0,s.createElement)(_l.MenuItem,{onClick:(0,p.pipe)(l,d,I),shortcut:S.duplicate},(0,x.__)("Duplicate")),i&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.MenuItem,{onClick:(0,p.pipe)(l,k),shortcut:S.insertBefore},(0,x.__)("Add before")),(0,s.createElement)(_l.MenuItem,{onClick:(0,p.pipe)(l,v),shortcut:S.insertAfter},(0,x.__)("Add after")))),e&&(0,s.createElement)(_l.MenuGroup,null,(0,s.createElement)(bC,{clientIds:t,onCopy:y,label:(0,x.__)("Copy styles")}),(0,s.createElement)(_l.MenuItem,{onClick:E},(0,x.__)("Paste styles"))),(0,s.createElement)(jh.Slot,{fillProps:{onClose:l,canMove:a,onMoveTo:B,onlyBlock:f,count:m,firstBlockClientId:h},clientIds:t,__unstableDisplayLocation:r}),"function"==typeof o?o({onClose:l}):u.Children.map((e=>(0,u.cloneElement)(e,{onClose:l}))),c&&(0,s.createElement)(_l.MenuGroup,null,(0,s.createElement)(_l.MenuItem,{onClick:(0,p.pipe)(l,_,T),shortcut:S.remove},(0,x.__)("Delete"))))))))}const _C=kC;const yC=function({clientIds:e,...t}){return(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(_l.ToolbarItem,null,(n=>(0,s.createElement)(_C,{clientIds:e,toggleProps:n,...t}))))};function EC({clientId:e}){const{canLock:t,isLocked:n}=Th(e),[o,r]=(0,u.useReducer)((e=>!e),!1),l=(0,u.useRef)(!1);if((0,u.useEffect)((()=>{n&&(l.current=!0)}),[n]),!n&&!l.current)return null;let i=n?(0,x.__)("Unlock"):(0,x.__)("Lock");return!t&&n&&(i=(0,x.__)("Locked")),(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.ToolbarGroup,{className:"block-editor-block-lock-toolbar"},(0,s.createElement)(_l.ToolbarButton,{accessibleWhenDisabled:!0,disabled:!t,icon:n?Rh:Mh,label:i,onClick:r,"aria-expanded":o,"aria-haspopup":"dialog"})),o&&(0,s.createElement)(Ah,{clientId:e,onClose:r}))}const wC=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.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"})),SC=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z"})),CC=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z"})),xC={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"}};const BC=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:o}=Bh(),{replaceBlocks:r}=(0,d.useDispatch)(Nr),{canRemove:l,variations:i}=(0,d.useSelect)((e=>{const{canRemoveBlocks:o}=e(Nr),{getBlockVariations:r}=e(c.store);return{canRemove:o(t),variations:r(n,"transform")}}),[t,n]),a=o=>{const l=(0,c.switchToBlockType)(e,n);"string"!=typeof o&&(o="group"),l&&l.length>0&&(l[0].attributes.layout=xC[o],r(t,l))};if(!o||!l)return null;const u=!!i.find((({name:e})=>"group-row"===e)),p=!!i.find((({name:e})=>"group-stack"===e));return(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(_l.ToolbarButton,{icon:wC,label:(0,x._x)("Group","verb"),onClick:a}),u&&(0,s.createElement)(_l.ToolbarButton,{icon:SC,label:(0,x._x)("Row","single horizontal line"),onClick:()=>a("row")}),p&&(0,s.createElement)(_l.ToolbarButton,{icon:CC,label:(0,x._x)("Stack","verb"),onClick:()=>a("stack")}))};function IC({clientIds:e}){const t=1===e.length?e[0]:void 0,n=(0,d.useSelect)((e=>!!t&&"html"===e(Nr).getBlockMode(t)),[t]),{toggleBlockMode:o}=(0,d.useDispatch)(Nr);return n?(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(_l.ToolbarButton,{onClick:()=>{o(t)}},(0,x.__)("Edit visually"))):null}const TC=(0,u.createContext)("");function MC(e){return Array.from(e.querySelectorAll("[data-toolbar-item]:not([disabled])"))}function PC(e){return e.contains(e.ownerDocument.activeElement)}function RC({toolbarRef:e,focusOnMount:t,isAccessibleToolbar:n,defaultIndex:o,onIndexChange:r,shouldUseKeyboardFocusShortcut:l,focusEditorOnEscape:i}){const[s]=(0,u.useState)(t),[a]=(0,u.useState)(o),c=(0,u.useCallback)((()=>{!function(e){const[t]=As.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}(e.current)}),[e]);(0,A_.useShortcut)("core/block-editor/focus-toolbar",(()=>{l&&c()})),(0,u.useEffect)((()=>{s&&c()}),[n,s,c]),(0,u.useEffect)((()=>{const t=e.current;let n=0;return s||PC(t)||(n=window.requestAnimationFrame((()=>{const e=MC(t),n=a||0;e[n]&&PC(t)&&e[n].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(n),!r||!t)return;const e=MC(t).findIndex((e=>0===e.tabIndex));r(e)}}),[a,s,r,e]);const{getLastFocus:p}=ie((0,d.useSelect)(Nr));(0,u.useEffect)((()=>{const t=e.current;if(i){const e=e=>{const t=p();e.keyCode===zs.ESCAPE&&t?.current&&(e.preventDefault(),t.current.focus())};return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}}),[i,p,e])}function NC({children:e,focusOnMount:t,focusEditorOnEscape:n=!1,shouldUseKeyboardFocusShortcut:o=!0,__experimentalInitialIndex:r,__experimentalOnIndexChange:l,...i}){const a=(0,u.useRef)(),c=function(e){const[t,n]=(0,u.useState)(!0),o=(0,u.useCallback)((()=>{const t=!As.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||w()("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)}),[e]);return(0,u.useLayoutEffect)((()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[o,t,e]),t}(a);return RC({toolbarRef:a,focusOnMount:t,defaultIndex:r,onIndexChange:l,isAccessibleToolbar:c,shouldUseKeyboardFocusShortcut:o,focusEditorOnEscape:n}),c?(0,s.createElement)(_l.Toolbar,{label:i["aria-label"],ref:a,...i},e):(0,s.createElement)(_l.NavigableMenu,{orientation:"horizontal",role:"toolbar",ref:a,...i},e)}function LC(e="default"){const t=yl[e]?.Slot,n=(0,_l.__experimentalUseSlotFills)(t?.__unstableName);return t?!!n?.length:null}const AC=(0,s.createElement)(Z.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd"},(0,s.createElement)(Z.Path,{d:"M5 19L8 16L5 19Z"}),(0,s.createElement)(Z.Path,{d:"M16 8L19 5L16 8Z"}),(0,s.createElement)(Z.G,null,(0,s.createElement)(Z.Path,{d:"M5 19L8 16"}),(0,s.createElement)(Z.Path,{d:"M9.30003 17.3C9.523 17.5237 9.78794 17.7013 10.0797 17.8224C10.3714 17.9435 10.6842 18.0059 11 18.0059C11.3159 18.0059 11.6287 17.9435 11.9204 17.8224C12.2121 17.7013 12.4771 17.5237 12.7 17.3L15 15L9.00003 9L6.70003 11.3C6.47629 11.523 6.29876 11.7879 6.17763 12.0796C6.05649 12.3714 5.99414 12.6841 5.99414 13C5.99414 13.3159 6.05649 13.6286 6.17763 13.9204C6.29876 14.2121 6.47629 14.477 6.70003 14.7L9.30003 17.3Z"}),(0,s.createElement)(Z.Path,{d:"M16 8L19 5"}),(0,s.createElement)(Z.Path,{d:"M9 9.00003L15 15L17.3 12.7C17.5237 12.4771 17.7013 12.2121 17.8224 11.9204C17.9435 11.6287 18.0059 11.3159 18.0059 11C18.0059 10.6842 17.9435 10.3714 17.8224 10.0797C17.7013 9.78794 17.5237 9.523 17.3 9.30003L14.7 6.70003C14.477 6.47629 14.2121 6.29876 13.9204 6.17763C13.6286 6.05649 13.3159 5.99414 13 5.99414C12.6841 5.99414 12.3714 6.05649 12.0796 6.17763C11.7879 6.29876 11.523 6.47629 11.3 6.70003L9 9.00003Z"})));function OC(){return(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(_l.ToolbarItem,{as:"div","aria-label":(0,x._x)("Connected","block toolbar button label"),className:"block-editor-block-bindings-toolbar-indicator"},(0,s.createElement)(_l.Icon,{icon:AC,size:24})))}function DC({hideDragHandle:e,focusOnMount:t,__experimentalInitialIndex:n,__experimentalOnIndexChange:o,variant:r="unstyled"}){const{blockClientId:l,blockClientIds:i,isDefaultEditingMode:a,blockType:m,blockName:h,shouldShowVisualToolbar:g,showParentSelector:f,isUsingBindings:b}=(0,d.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getBlockParents:o,getSelectedBlockClientIds:r,isBlockValid:l,getBlockRootClientId:i,getBlockEditingMode:s,getBlockAttributes:a}=e(Nr),u=r(),d=u[0],p=i(d),m=o(d),h=m[m.length-1],g=t(h),f=(0,c.getBlockType)(g),b="default"===s(d),v=t(d),k=u.every((e=>l(e))),_=u.every((e=>"visual"===n(e))),y=!!a(d)?.metadata?.bindings;return{blockClientId:d,blockClientIds:u,isDefaultEditingMode:b,blockName:v,blockType:d&&(0,c.getBlockType)(v),shouldShowVisualToolbar:k&&_,rootClientId:p,showParentSelector:f&&"default"===s(h)&&(0,c.hasBlockSupport)(f,"__experimentalParentSelector",!0)&&1===u.length&&b,isUsingBindings:y}}),[]),v=(0,u.useRef)(null),k=(0,u.useRef)(),_=ES({ref:k}),y=!(0,p.useViewportMatch)("medium","<"),E=m&&(0,c.hasBlockSupport)(m,"__experimentalToolbar",!0),w=function(){let e=!1;for(const t in yl)LC(t)&&(e=!0);return e}();if(!E||!a&&!w)return null;const S=i.length>1,C=(0,c.isReusableBlock)(m)||(0,c.isTemplatePart)(m),B=ml()("block-editor-block-contextual-toolbar",{"has-parent":f}),I=ml()("block-editor-block-toolbar",{"is-synced":C});return(0,s.createElement)(NC,{focusEditorOnEscape:!0,className:B,"aria-label":(0,x.__)("Block tools"),variant:"toolbar"===r?void 0:r,focusOnMount:t,__experimentalInitialIndex:n,__experimentalOnIndexChange:o,key:l},(0,s.createElement)("div",{ref:v,className:I},!S&&y&&a&&(0,s.createElement)(wS,null),b&&eg(h)&&(0,s.createElement)(OC,null),(g||S)&&a&&(0,s.createElement)("div",{ref:k,..._},(0,s.createElement)(_l.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,s.createElement)(qS,{clientIds:i}),!S&&(0,s.createElement)(EC,{clientId:l}),(0,s.createElement)(bS,{clientIds:i,hideDragHandle:e}))),g&&S&&(0,s.createElement)(BC,null),g&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Bl.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Bl.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Bl.Slot,{className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Bl.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Bl.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(TC.Provider,{value:m?.name},(0,s.createElement)(QS.Slot,null))),(0,s.createElement)(IC,{clientIds:i}),a&&(0,s.createElement)(yC,{clientIds:i})))}function zC({hideDragHandle:e,variant:t}){return(0,s.createElement)(DC,{hideDragHandle:e,variant:t,focusOnMount:void 0,__experimentalInitialIndex:void 0,__experimentalOnIndexChange:void 0})}function VC({clientId:e,isTyping:t,__unstableContentRef:n}){const{capturingClientId:o,isInsertionPointVisible:r,lastClientId:l}=lS(e),i=(0,u.useRef)();(0,u.useEffect)((()=>{i.current=void 0}),[e]);const{stopTyping:a}=(0,d.useDispatch)(Nr),c=(0,u.useRef)(!1);(0,A_.useShortcut)("core/block-editor/focus-toolbar",(()=>{c.current=!0,a(!0)})),(0,u.useEffect)((()=>{c.current=!1}));const p=rS({contentElement:n?.current,clientId:e});return!t&&(0,s.createElement)(fm,{clientId:o||e,bottomClientId:l,className:ml()("block-editor-block-list__block-popover",{"is-insertion-point-visible":r}),resize:!1,...p},(0,s.createElement)(DC,{focusOnMount:c.current,__experimentalInitialIndex:i.current,__experimentalOnIndexChange:e=>{i.current=e},variant:"toolbar"}))}const FC=function({clientId:e,rootClientId:t}){const n=(0,d.useSelect)((n=>{const{getBlock:o,getBlockIndex:r,hasBlockMovingClientId:l,getBlockListSettings:i,__unstableGetEditorMode:s}=n(Nr),{getActiveBlockVariation:a,getBlockType:u}=n(c.store),d=r(e),{name:p,attributes:m}=o(e),h=u(p),g=i(t)?.orientation,f=a(p,m);return{blockMovingMode:l(),editorMode:s(),icon:f?.icon||h.icon,label:(0,c.__experimentalGetAccessibleBlockLabel)(h,m,d+1,g)}}),[e,t]),{label:o,icon:r,blockMovingMode:l,editorMode:i}=n,{setNavigationMode:a,removeBlock:p}=(0,d.useDispatch)(Nr),m=(0,u.useRef)();(0,u.useEffect)((()=>{m.current.focus(),(0,vo.speak)(o)}),[o]);const h=bd(e),{hasBlockMovingClientId:g,getBlockIndex:f,getBlockRootClientId:b,getClientIdsOfDescendants:v,getSelectedBlockClientId:k,getMultiSelectedBlocksEndClientId:_,getPreviousBlockClientId:y,getNextBlockClientId:E}=(0,d.useSelect)(Nr),{selectBlock:w,clearSelectedBlock:S,setBlockMovingClientId:C,moveBlockToPosition:B}=(0,d.useDispatch)(Nr),I=ml()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!l}),T=(0,x.__)("Drag");return(0,s.createElement)("div",{className:I},(0,s.createElement)(_l.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,s.createElement)(_l.FlexItem,null,(0,s.createElement)(qh,{icon:r,showColors:!0})),(0,s.createElement)(_l.FlexItem,null,"zoom-out"===i&&(0,s.createElement)(bS,{clientIds:[e],hideDragHandle:!0}),"navigation"===i&&(0,s.createElement)(sS,{clientIds:[e]},(e=>(0,s.createElement)(_l.Button,{icon:Ly,className:"block-selection-button_drag-handle","aria-hidden":"true",label:T,tabIndex:"-1",...e})))),(0,s.createElement)(_l.FlexItem,null,(0,s.createElement)(_l.Button,{ref:m,onClick:"navigation"===i?()=>a(!1):void 0,onKeyDown:function(t){const{keyCode:n}=t,o=n===zs.UP,r=n===zs.DOWN,l=n===zs.LEFT,s=n===zs.RIGHT,c=n===zs.TAB,u=n===zs.ESCAPE,d=n===zs.ENTER,m=n===zs.SPACE,x=t.shiftKey;if(u&&"navigation"===i)return a(!1),void t.preventDefault();if(n===zs.BACKSPACE||n===zs.DELETE)return p(e),void t.preventDefault();const I=k(),T=_(),M=y(T||I),P=E(T||I),R=c&&x||o,N=c&&!x||r,L=l,A=s;let O;if(R)O=M;else if(N)O=P;else if(L){var D;O=null!==(D=b(I))&&void 0!==D?D:I}else if(A){var z;O=null!==(z=v(I)[0])&&void 0!==z?z:I}const V=g();if(u&&V&&!t.defaultPrevented&&(C(null),t.preventDefault()),(d||m)&&V){const e=b(V),t=b(I),n=f(V);let o=f(I);n<o&&e===t&&(o-=1),B(V,e,t,o),w(V),C(null)}if((!V||I!==V||!A)&&(N||R||L||A))if(O)t.preventDefault(),w(O);else if(c&&I){let e;if(N){e=h;do{e=As.focus.tabbable.findNext(e)}while(e&&h.contains(e));e||(e=h.ownerDocument.defaultView.frameElement,e=As.focus.tabbable.findNext(e))}else e=As.focus.tabbable.findPrevious(h);e&&(t.preventDefault(),e.focus(),S())}},label:o,showTooltip:!1,className:"block-selection-button_select-button"},(0,s.createElement)(pf,{clientId:e,maximumLength:35})))))};function HC({clientId:e,__unstableContentRef:t}){const{capturingClientId:n,isInsertionPointVisible:o,lastClientId:r,rootClientId:l}=lS(e),i=rS({contentElement:t?.current,clientId:e});return(0,s.createElement)(fm,{clientId:n||e,bottomClientId:r,className:ml()("block-editor-block-list__block-popover",{"is-insertion-point-visible":o}),resize:!1,...i},(0,s.createElement)(FC,{clientId:e,rootClientId:l}))}const GC=function({__unstableContentRef:e}){const[t,n]=(0,u.useState)(!1),o=(0,d.useSelect)((e=>e(Nr).getBlockOrder()),[]);return(0,u.useEffect)((()=>{const e=setTimeout((()=>{n(!0)}),500);return()=>{clearTimeout(e)}}),[]),t?o.map(((t,n)=>n===o.length-1?null:(0,s.createElement)(hw,{key:t,previousClientId:t,nextClientId:o[n+1],__unstableContentRef:e},(0,s.createElement)("div",{className:"block-editor-block-list__insertion-point-inserter is-with-inserter"},(0,s.createElement)(lw,{position:"bottom center",clientId:o[n+1],__experimentalIsQuick:!0}))))):null};function UC(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlock:o,getSettings:r,hasMultiSelection:l,__unstableGetEditorMode:i,isTyping:s}=e(Nr),a=t()||n(),{name:u="",attributes:d={}}=o(a)||{},p=i(),m=a&&u,h=(0,c.isUnmodifiedDefaultBlock)({name:u,attributes:d}),g=a&&!s()&&"edit"===p&&(0,c.isUnmodifiedDefaultBlock)({name:u,attributes:d}),f=m&&!l()&&("navigation"===p||"zoom-out"===p);return{clientId:a,hasFixedToolbar:r().hasFixedToolbar,isTyping:s(),isZoomOutMode:"zoom-out"===p,showEmptyBlockSideInserter:g,showBreadcrumb:!g&&f,showBlockToolbar:!r().hasFixedToolbar&&!g&&m&&!h&&!f}}function $C({children:e,__unstableContentRef:t,...n}){const{clientId:o,hasFixedToolbar:r,isTyping:l,isZoomOutMode:i,showEmptyBlockSideInserter:a,showBreadcrumb:c,showBlockToolbar:p}=(0,d.useSelect)(UC,[]),m=(0,A_.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:h,getBlockRootClientId:g}=(0,d.useSelect)(Nr),{duplicateBlocks:f,removeBlocks:b,insertAfterBlock:v,insertBeforeBlock:k,selectBlock:_,moveBlocksUp:y,moveBlocksDown:E}=(0,d.useDispatch)(Nr);const w=hm(t),S=hm(t);return(0,s.createElement)("div",{...n,onKeyDown:function(e){if(!e.defaultPrevented)if(m("core/block-editor/move-up",e)){const t=h();if(t.length){e.preventDefault();const n=g(t[0]);y(t,n)}}else if(m("core/block-editor/move-down",e)){const t=h();if(t.length){e.preventDefault();const n=g(t[0]);E(t,n)}}else if(m("core/block-editor/duplicate",e)){const t=h();t.length&&(e.preventDefault(),f(t))}else if(m("core/block-editor/remove",e)){const t=h();t.length&&(e.preventDefault(),b(t))}else if(m("core/block-editor/insert-after",e)){const t=h();t.length&&(e.preventDefault(),v(t[t.length-1]))}else if(m("core/block-editor/insert-before",e)){const t=h();t.length&&(e.preventDefault(),k(t[0]))}else if(m("core/block-editor/unselect",e)){if(e.target.closest("[role=toolbar]"))return;const t=h();t.length>1&&(e.preventDefault(),_(t[0]))}}},(0,s.createElement)(bw.Provider,{value:(0,u.useRef)(!1)},!l&&(0,s.createElement)(kw,{__unstableContentRef:t}),a&&(0,s.createElement)(iS,{__unstableContentRef:t,clientId:o}),p&&(0,s.createElement)(VC,{__unstableContentRef:t,clientId:o,isTyping:l}),c&&(0,s.createElement)(HC,{__unstableContentRef:t,clientId:o}),!i&&!r&&(0,s.createElement)(_l.Popover.Slot,{name:"block-toolbar",ref:w}),e,(0,s.createElement)(_l.Popover.Slot,{name:"__unstable-block-tools-after",ref:S}),i&&(0,s.createElement)(GC,{__unstableContentRef:t})))}function jC({shouldIframe:e=!0,height:t="300px",children:n=(0,s.createElement)(Xw,null),styles:o,contentRef:r,iframeProps:l}){const i=$w(),a=F_(),c=(0,u.useRef)(),d=(0,p.useMergeRefs)([r,a,c]);return e?(0,s.createElement)($C,{__unstableContentRef:c,style:{height:t,display:"flex"}},(0,s.createElement)(py,{...l,ref:i,contentRef:d,style:{...l?.style},name:"editor-canvas"},(0,s.createElement)(wy,{styles:o}),n)):(0,s.createElement)($C,{__unstableContentRef:c,style:{height:t,display:"flex"}},(0,s.createElement)(wy,{styles:o,scope:".editor-styles-wrapper"}),(0,s.createElement)(sy,{ref:d,className:"editor-styles-wrapper",tabIndex:-1,style:{height:"100%",width:"100%"}},n))}const WC=function({children:e,height:t,styles:n}){return(0,s.createElement)(jC,{height:t,styles:n},e)},KC=()=>(0,s.createElement)(_l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,s.createElement)(_l.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"})),ZC=({style:e,className:t})=>(0,s.createElement)("div",{className:"block-library-colors-selector__icon-container"},(0,s.createElement)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e},(0,s.createElement)(KC,null))),qC=({TextColor:e,BackgroundColor:t})=>({onToggle:n,isOpen:o})=>(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(_l.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,x.__)("Open Colors Selector"),onClick:n,onKeyDown:e=>{o||e.keyCode!==zs.DOWN||(e.preventDefault(),n())},icon:(0,s.createElement)(t,null,(0,s.createElement)(e,null,(0,s.createElement)(ZC,null)))})),YC=({children:e,...t})=>(w()("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,s.createElement)(_l.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:qC(t),renderContent:()=>e})),XC=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})),QC=(0,u.createContext)({}),JC=()=>(0,u.useContext)(QC);function ex({children:e,...t}){const n=(0,u.useRef)();return(0,u.useEffect)((()=>{n.current&&(n.current.textContent=n.current.textContent)}),[e]),(0,s.createElement)("div",{hidden:!0,...t,ref:n},e)}const tx=(0,u.forwardRef)((({nestingLevel:e,blockCount:t,clientId:n,...o},r)=>{const{insertedBlock:l,setInsertedBlock:i}=JC(),a=(0,p.useInstanceId)(tx),c=(0,d.useSelect)((e=>{const{getTemplateLock:t,__unstableGetEditorMode:o}=e(Nr);return!!t(n)||"zoom-out"===o()}),[n]),m=df({clientId:n,context:"list-view"}),h=df({clientId:l?.clientId,context:"list-view"});if((0,u.useEffect)((()=>{h?.length&&(0,vo.speak)((0,x.sprintf)((0,x.__)("%s block inserted"),h),"assertive")}),[h]),c)return null;const g=`list-view-appender__${a}`,f=(0,x.sprintf)((0,x.__)("Append to %1$s block at position %2$d, Level %3$d"),m,t+1,e);return(0,s.createElement)("div",{className:"list-view-appender"},(0,s.createElement)(lw,{ref:r,rootClientId:n,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:!1,__experimentalIsQuick:!0,...o,toggleProps:{"aria-describedby":g},onSelectOrClose:e=>{e?.clientId&&i(e)}}),(0,s.createElement)(ex,{id:g},f))})),nx=o_(_l.__experimentalTreeGridRow),ox=(0,u.forwardRef)((({isDragged:e,isSelected:t,position:n,level:o,rowCount:r,children:l,className:i,path:a,...c},u)=>{const d=l_({clientId:c["data-block"],enableAnimation:!0,triggerAnimationOnChange:a}),m=(0,p.useMergeRefs)([u,d]);return(0,s.createElement)(nx,{ref:m,className:ml()("block-editor-list-view-leaf",i),level:o,positionInSet:n,setSize:r,isExpanded:void 0,...c},l)})),rx=ox;const lx=(0,s.createElement)(Z.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.Path,{d:"M10.97 10.159a3.382 3.382 0 0 0-2.857.955l1.724 1.723-2.836 2.913L7 17h1.25l2.913-2.837 1.723 1.723a3.38 3.38 0 0 0 .606-.825c.33-.63.446-1.343.35-2.032L17 10.695 13.305 7l-2.334 3.159Z"})),ix=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.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"}));function sx({onClick:e}){return(0,s.createElement)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true","data-testid":"list-view-expander"},(0,s.createElement)(Ti,{icon:(0,x.isRTL)()?Zs:qs}))}const ax=3;function cx(e){if("core/image"===e.name)return e.attributes?.url?{url:e.attributes.url,alt:e.attributes.alt,clientId:e.clientId}:void 0}function ux(e,t){const n=cx(e);return n?[n]:t?[]:function(e){if("core/gallery"!==e.name||!e.innerBlocks)return[];const t=[];for(const n of e.innerBlocks){const e=cx(n);if(e&&t.push(e),t.length>=ax)return t}return t}(e)}const dx=(0,u.forwardRef)((function({className:e,block:{clientId:t,name:n},onClick:o,onContextMenu:r,onMouseDown:l,onToggleExpanded:i,tabIndex:a,onFocus:p,onDragStart:m,onDragEnd:h,draggable:g,isExpanded:f,ariaLabel:b,ariaDescribedBy:v,updateFocusAndSelection:k},_){const y=ih(t),E=df({clientId:t,context:"list-view"}),{isLocked:w}=Th(t),{canInsertBlockType:S,getSelectedBlockClientIds:C,getPreviousBlockClientId:B,getBlockRootClientId:I,getBlockOrder:T,getBlocksByClientId:M,getBlockAttributes:P,canRemoveBlocks:R}=(0,d.useSelect)(Nr),{duplicateBlocks:N,multiSelect:L,removeBlocks:A}=(0,d.useDispatch)(Nr),O=(0,A_.__unstableUseShortcutEventMatch)(),D="sticky"===y?.positionType,z=function({clientId:e,isExpanded:t}){const{block:n}=(0,d.useSelect)((t=>({block:t(Nr).getBlock(e)})),[e]);return(0,u.useMemo)((()=>ux(n,t)),[n,t])}({clientId:t,isExpanded:f}),{rootClientId:V}=JC(),F=P(t)?.metadata?.bindings,H=y?.positionLabel?(0,x.sprintf)((0,x.__)("Position: %1$s"),y.positionLabel):"";function G(){const e=C(),n=e.includes(t),o=n?e[0]:t,r=I(o);return{blocksToUpdate:n?e:[t],firstBlockClientId:o,firstBlockRootClientId:r,selectedBlockClientIds:e}}return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.Button,{className:ml()("block-editor-list-view-block-select-button",e),onClick:o,onContextMenu:r,onKeyDown:async function(e){if(e.keyCode===zs.ENTER||e.keyCode===zs.SPACE)o(e);else if(e.keyCode===zs.BACKSPACE||e.keyCode===zs.DELETE||O("core/block-editor/remove",e)){var t;const{blocksToUpdate:e,firstBlockClientId:n,firstBlockRootClientId:o,selectedBlockClientIds:r}=G();if(!R(e,o))return;let l=null!==(t=B(n))&&void 0!==t?t:o;A(e,!1);const i=r.length>0&&0===C().length;l||(l=T()[0]),k(l,i)}else if(O("core/block-editor/duplicate",e)){if(e.defaultPrevented)return;e.preventDefault();const{blocksToUpdate:t,firstBlockRootClientId:n}=G(),o=M(t).every((e=>!!e&&(0,c.hasBlockSupport)(e.name,"multiple",!0)&&S(e.name,n)));if(o){const e=await N(t,!1);e?.length&&k(e[0],!1)}}else if(O("core/block-editor/select-all",e)){if(e.defaultPrevented)return;e.preventDefault();const{firstBlockRootClientId:t,selectedBlockClientIds:n}=G(),o=T(t);if(!o.length)return;if(js()(n,o)&&t&&t!==V)return void k(t,!0);L(o[0],o[o.length-1],null)}},onMouseDown:l,ref:_,tabIndex:a,onFocus:p,onDragStart:e=>{e.dataTransfer.clearData(),m?.(e)},onDragEnd:h,draggable:g,href:`#block-${t}`,"aria-label":b,"aria-describedby":v,"aria-expanded":f},(0,s.createElement)(sx,{onClick:i}),(0,s.createElement)(qh,{icon:y?.icon,showColors:!0,context:"list-view"}),(0,s.createElement)(_l.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1},(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__title"},(0,s.createElement)(_l.__experimentalTruncate,{ellipsizeMode:"auto"},E)),y?.anchor&&(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper"},(0,s.createElement)(_l.__experimentalTruncate,{className:"block-editor-list-view-block-select-button__anchor",ellipsizeMode:"auto"},y.anchor)),F&&eg(n)&&(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__bindings"},(0,s.createElement)(Ti,{icon:AC})),H&&D&&(0,s.createElement)(_l.Tooltip,{text:H},(0,s.createElement)(Ti,{icon:lx})),z.length?(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__images","aria-hidden":!0},z.map(((e,t)=>(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__image",key:e.clientId,style:{backgroundImage:`url(${e.url})`,zIndex:z.length-t}})))):null,w&&(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__lock"},(0,s.createElement)(Ti,{icon:ix})))))})),px=(0,u.forwardRef)((({onClick:e,onToggleExpanded:t,block:n,isSelected:o,position:r,siblingBlockCount:l,level:i,isExpanded:a,selectedClientIds:c,...u},p)=>{const{clientId:m}=n,{blockMovingClientId:h,selectedBlockInBlockEditor:g}=(0,d.useSelect)((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n}=e(Nr);return{blockMovingClientId:t(),selectedBlockInBlockEditor:n()}}),[]),{AdditionalBlockContent:f,insertedBlock:b,setInsertedBlock:v}=JC(),k=h&&g===m,_=ml()("block-editor-list-view-block-contents",{"is-dropping-before":k}),y=c.includes(m)?c:[m];return(0,s.createElement)(s.Fragment,null,f&&(0,s.createElement)(f,{block:n,insertedBlock:b,setInsertedBlock:v}),(0,s.createElement)(sS,{appendToOwnerDocument:!0,clientIds:y,cloneClassname:"block-editor-list-view-draggable-chip"},(({draggable:c,onDragStart:d,onDragEnd:m})=>(0,s.createElement)(dx,{ref:p,className:_,block:n,onClick:e,onToggleExpanded:t,isSelected:o,position:r,siblingBlockCount:l,level:i,draggable:c,onDragStart:d,onDragEnd:m,isExpanded:a,...u}))))})),mx=px;function hx(e,t){const n=()=>{const n=t?.querySelector(`[role=row][data-block="${e}"]`);return n?As.focus.focusable.find(n)[0]:null};let o=n();o?o.focus():window.requestAnimationFrame((()=>{o=n(),o&&o.focus()}))}const gx=(0,u.memo)((function e({block:{clientId:t},displacement:n,isAfterDraggedBlocks:o,isDragged:r,isNesting:l,isSelected:i,isBranchSelected:a,selectBlock:m,position:h,level:g,rowCount:f,siblingBlockCount:b,showBlockMovers:v,path:k,isExpanded:_,selectedClientIds:y,isSyncedBranch:E}){const w=(0,u.useRef)(null),S=(0,u.useRef)(null),C=(0,u.useRef)(null),[B,I]=(0,u.useState)(!1),[T,M]=(0,u.useState)(),{isLocked:P,canEdit:R,canMove:N}=Th(t),L=i&&y[0]===t,A=i&&y[y.length-1]===t,{toggleBlockHighlight:O}=(0,d.useDispatch)(Nr),D=ih(t),z=D?.name||D?.title||(0,x.__)("Untitled"),{block:V,blockName:F,blockEditingMode:H}=(0,d.useSelect)((e=>{const{getBlock:n,getBlockName:o,getBlockEditingMode:r}=e(Nr);return{block:n(t),blockName:o(t),blockEditingMode:r(t)}}),[t]),G=(0,d.useSelect)((e=>e(Nr).getSettings().allowRightClickOverrides),[]),U=(0,c.hasBlockSupport)(F,"__experimentalToolbar",!0)&&"default"===H,$=`list-view-block-select-button__${(0,p.useInstanceId)(e)}`,{expand:j,collapse:W,BlockSettingsMenu:K,listViewInstanceId:Z,expandedState:q,setInsertedBlock:Y,treeGridElementRef:X}=JC(),Q=(0,u.useCallback)((()=>{I(!0),O(t,!0)}),[t,I,O]),J=(0,u.useCallback)((()=>{I(!1),O(t,!1)}),[t,I,O]),ee=(0,u.useCallback)((e=>{m(e,t),e.preventDefault()}),[t,m]),te=(0,u.useCallback)(((e,t)=>{t&&m(void 0,e,null,null),hx(e,X?.current)}),[m,X]),ne=(0,u.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===_?W(t):!1===_&&j(t)}),[t,j,W,_]),oe=(0,u.useCallback)((e=>{U&&G&&(C.current?.click(),M(new window.DOMRect(e.clientX,e.clientY,0,0)),e.preventDefault())}),[G,C,U]),re=(0,u.useCallback)((e=>{G&&2===e.button&&e.preventDefault()}),[G]),le=(0,u.useMemo)((()=>{const{ownerDocument:e}=S?.current||{};if(T&&e)return{ownerDocument:e,getBoundingClientRect:()=>T}}),[T]),ie=(0,u.useCallback)((()=>{M(void 0)}),[M]);if(function({isSelected:e,selectedClientIds:t,rowItemRef:n}){const o=1===t.length;(0,u.useLayoutEffect)((()=>{if(!e||!o||!n.current)return;const t=(0,As.getScrollContainer)(n.current),{ownerDocument:r}=n.current;if(t===r.body||t===r.documentElement||!t)return;const l=n.current.getBoundingClientRect(),i=t.getBoundingClientRect();(l.top<i.top||l.bottom>i.bottom)&&n.current.scrollIntoView()}),[e,o,n])}({isSelected:i,rowItemRef:S,selectedClientIds:y}),!V)return null;const se=((e,t,n)=>(0,x.sprintf)((0,x.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(h,b,g),ae=P?(0,x.sprintf)((0,x.__)("%s (locked)"),z):z,ce=(0,x.sprintf)((0,x.__)("Options for %s"),z),ue=v&&b>0,de=ml()("block-editor-list-view-block__mover-cell",{"is-visible":B||i}),pe=ml()("block-editor-list-view-block__menu-cell",{"is-visible":B||L});let me;ue?me=2:U||(me=3);const he=ml()({"is-selected":i,"is-first-selected":L,"is-last-selected":A,"is-branch-selected":a,"is-synced-branch":E,"is-dragging":r,"has-single-cell":!U,"is-synced":D?.isSynced,"is-draggable":N,"is-displacement-normal":"normal"===n,"is-displacement-up":"up"===n,"is-displacement-down":"down"===n,"is-after-dragged-blocks":o,"is-nesting":l}),ge=y.includes(t)?y:[t],fe=i&&1===y.length;return(0,s.createElement)(rx,{className:he,isDragged:r,onKeyDown:e=>{e.keyCode===zs.ESCAPE&&!e.defaultPrevented&&y.length>0&&(e.stopPropagation(),e.preventDefault(),m(e,void 0))},onMouseEnter:Q,onMouseLeave:J,onFocus:Q,onBlur:J,level:g,position:h,rowCount:f,path:k,id:`list-view-${Z}-block-${t}`,"data-block":t,"data-expanded":R?_:void 0,ref:S},(0,s.createElement)(_l.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:me,ref:w,"aria-selected":!!i},(({ref:e,tabIndex:t,onFocus:n})=>(0,s.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,s.createElement)(mx,{block:V,onClick:ee,onContextMenu:oe,onMouseDown:re,onToggleExpanded:ne,isSelected:i,position:h,siblingBlockCount:b,level:g,ref:e,tabIndex:fe?0:t,onFocus:n,isExpanded:R?_:void 0,selectedClientIds:y,ariaLabel:ae,ariaDescribedBy:$,updateFocusAndSelection:te}),(0,s.createElement)(ex,{id:$},se)))),ue&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.__experimentalTreeGridCell,{className:de,withoutGridItem:!0},(0,s.createElement)(_l.__experimentalTreeGridItem,null,(({ref:e,tabIndex:n,onFocus:o})=>(0,s.createElement)(gS,{orientation:"vertical",clientIds:[t],ref:e,tabIndex:n,onFocus:o}))),(0,s.createElement)(_l.__experimentalTreeGridItem,null,(({ref:e,tabIndex:n,onFocus:o})=>(0,s.createElement)(fS,{orientation:"vertical",clientIds:[t],ref:e,tabIndex:n,onFocus:o}))))),U&&K&&(0,s.createElement)(_l.__experimentalTreeGridCell,{className:pe,"aria-selected":!!i,ref:C},(({ref:e,tabIndex:t,onFocus:n})=>(0,s.createElement)(K,{clientIds:ge,block:V,icon:Ef,label:ce,popoverProps:{anchor:le},toggleProps:{ref:e,className:"block-editor-list-view-block__menu",tabIndex:t,onClick:ie,onFocus:n},disableOpenOnArrowDown:!0,expand:j,expandedState:q,setInsertedBlock:Y,__experimentalSelectBlock:te}))))}));function fx(e,t,n,o){var r;const l=n?.includes(e.clientId);if(l)return 0;return(null!==(r=t[e.clientId])&&void 0!==r?r:o)?1+e.innerBlocks.reduce(bx(t,n,o),0):1}const bx=(e,t,n)=>(o,r)=>{var l;const i=t?.includes(r.clientId);if(i)return o;return(null!==(l=e[r.clientId])&&void 0!==l?l:n)&&r.innerBlocks.length>0?o+fx(r,e,t,n):o+1},vx=()=>{};const kx=(0,u.memo)((function e(t){const{blocks:n,selectBlock:o=vx,showBlockMovers:r,selectedClientIds:l,level:i=1,path:a="",isBranchSelected:c=!1,listPosition:u=0,fixedListWindow:p,isExpanded:m,parentId:h,shouldShowInnerBlocks:g=!0,isSyncedBranch:f=!1,showAppender:b=!0}=t,v=ih(h),k=f||!!v?.isSynced,_=(0,d.useSelect)((e=>!h||e(Nr).canEditBlock(h)),[h]),{blockDropPosition:y,blockDropTargetIndex:E,firstDraggedBlockIndex:w,blockIndexes:S,expandedState:C,draggedClientIds:x}=JC();if(!_)return null;const B=b&&1===i,I=n.filter(Boolean),T=I.length,M=B?T+1:T;let P=u;return(0,s.createElement)(s.Fragment,null,I.map(((t,n)=>{var u;const{clientId:h,innerBlocks:f}=t;n>0&&(P+=fx(I[n-1],C,x,m));const b=!!x?.includes(h),{displacement:v,isAfterDraggedBlocks:_,isNesting:B}=function({blockIndexes:e,blockDropTargetIndex:t,blockDropPosition:n,clientId:o,firstDraggedBlockIndex:r,isDragged:l}){let i,s,a;if(!l){s=!1;const l=e[o];a=l>r,null!=t&&void 0!==r?void 0!==l&&(i=l>=r&&l<t?"up":l<r&&l>=t?"down":"normal",s="number"==typeof t&&t-1===l&&"inside"===n):null===t&&void 0!==r?i=void 0!==l&&l>=r?"up":"normal":null!=t&&void 0===r?void 0!==l&&(i=l<t?"normal":"down"):null===t&&(i="normal")}return{displacement:i,isNesting:s,isAfterDraggedBlocks:a}}({blockIndexes:S,blockDropTargetIndex:E,blockDropPosition:y,clientId:h,firstDraggedBlockIndex:w,isDragged:b}),{itemInView:R}=p,N=R(P),L=n+1,A=a.length>0?`${a}_${L}`:`${L}`,O=!!f?.length,D=O&&g?null!==(u=C[h])&&void 0!==u?u:m:void 0,z=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(h,l),V=c||z&&O,F=b||N||z&&h===l[0];return(0,s.createElement)(d.AsyncModeProvider,{key:h,value:!z},F&&(0,s.createElement)(gx,{block:t,selectBlock:o,isSelected:z,isBranchSelected:V,isDragged:b,level:i,position:L,rowCount:M,siblingBlockCount:T,showBlockMovers:r,path:A,isExpanded:!b&&D,listPosition:P,selectedClientIds:l,isSyncedBranch:k,displacement:v,isAfterDraggedBlocks:_,isNesting:B}),!F&&(0,s.createElement)("tr",null,(0,s.createElement)("td",{className:"block-editor-list-view-placeholder"})),O&&D&&!b&&(0,s.createElement)(e,{parentId:h,blocks:f,selectBlock:o,showBlockMovers:r,level:i+1,path:A,listPosition:P+1,fixedListWindow:p,isBranchSelected:V,selectedClientIds:l,isExpanded:m,isSyncedBranch:k}))})),B&&(0,s.createElement)(_l.__experimentalTreeGridRow,{level:i,setSize:M,positionInSet:M,isExpanded:!0},(0,s.createElement)(_l.__experimentalTreeGridCell,null,(e=>(0,s.createElement)(tx,{clientId:h,nestingLevel:i,blockCount:T,...e})))))}));function _x({draggedBlockClientId:e,listViewRef:t,blockDropTarget:n}){const o=ih(e),r=df({clientId:e,context:"list-view"}),{rootClientId:l,clientId:i,dropPosition:a}=n||{},[c,d]=(0,u.useMemo)((()=>{if(!t.current)return[];return[l?t.current.querySelector(`[data-block="${l}"]`):void 0,i?t.current.querySelector(`[data-block="${i}"]`):void 0]}),[t,l,i]),p=d||c,m=(0,x.isRTL)(),h=(0,u.useCallback)(((e,t)=>{if(!p)return 0;let n=p.offsetWidth;const o=(0,As.getScrollContainer)(p,"horizontal"),r=p.ownerDocument,l=o===r.body||o===r.documentElement;if(o&&!l){const r=o.getBoundingClientRect(),l=(0,x.isRTL)()?r.right-e.right:e.left-r.left,i=o.clientWidth;if(i<n+l&&(n=i-l),!m&&e.left+t<r.left)return n-=r.left-e.left,n;if(m&&e.right-t>r.right)return n-=e.right-r.right,n}return n-t}),[m,p]),g=(0,u.useMemo)((()=>{if(!p)return{};const e=p.getBoundingClientRect();return{width:h(e,0)}}),[h,p]),f=(0,u.useMemo)((()=>{if(!p)return{};const e=(0,As.getScrollContainer)(p),t=p.ownerDocument,n=e===t.body||e===t.documentElement;if(e&&!n){const t=e.getBoundingClientRect(),n=p.getBoundingClientRect(),o=m?t.right-n.right:n.left-t.left;if(!m&&t.left>n.left)return{transform:`translateX( ${o}px )`};if(m&&t.right<n.right)return{transform:`translateX( ${-1*o}px )`}}return{}}),[m,p]),b=(0,u.useMemo)((()=>{if(!c)return 1;const e=parseInt(c.getAttribute("aria-level"),10);return e?e+1:1}),[c]),v=(0,u.useMemo)((()=>!!p&&p.classList.contains("is-branch-selected")),[p]),k=(0,u.useMemo)((()=>{if(p&&("top"===a||"bottom"===a||"inside"===a))return{contextElement:p,getBoundingClientRect(){const e=p.getBoundingClientRect();let t=e.left,n=0;const o=(0,As.getScrollContainer)(p,"horizontal"),r=p.ownerDocument,l=o===r.body||o===r.documentElement;if(o&&!l){const e=o.getBoundingClientRect(),n=m?o.offsetWidth-o.clientWidth:0;t<e.left+n&&(t=e.left+n)}n="top"===a?e.top-2*e.height:e.top;const i=h(e,0),s=e.height;return new window.DOMRect(t,n,i,s)}}}),[p,a,h,m]);return p?(0,s.createElement)(_l.Popover,{animate:!1,anchor:k,focusOnMount:!1,className:"block-editor-list-view-drop-indicator--preview",variant:"unstyled",flip:!1,resize:!0},(0,s.createElement)("div",{style:g,className:ml()("block-editor-list-view-drop-indicator__line",{"block-editor-list-view-drop-indicator__line--darker":v})},(0,s.createElement)("div",{className:"block-editor-list-view-leaf","aria-level":b},(0,s.createElement)("div",{className:ml()("block-editor-list-view-block-select-button","block-editor-list-view-block-contents"),style:f},(0,s.createElement)(sx,{onClick:()=>{}}),(0,s.createElement)(qh,{icon:o?.icon,showColors:!0,context:"list-view"}),(0,s.createElement)(_l.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1},(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__title"},(0,s.createElement)(_l.__experimentalTruncate,{ellipsizeMode:"auto"},r)))),(0,s.createElement)("div",{className:"block-editor-list-view-block__menu-cell"})))):null}function yx(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,d.useDispatch)(Nr),{getBlockName:o,getBlockParents:r,getBlockSelectionStart:l,getSelectedBlockClientIds:i,hasMultiSelection:s,hasSelectedBlock:a}=(0,d.useSelect)(Nr),{getBlockType:p}=(0,d.useSelect)(c.store);return{updateBlockSelection:(0,u.useCallback)((async(c,u,d,m)=>{if(!c?.shiftKey&&c?.keyCode!==zs.ESCAPE)return void n(u,m);c.preventDefault();const h="keydown"===c.type&&c.keyCode===zs.ESCAPE,g="keydown"===c.type&&(c.keyCode===zs.UP||c.keyCode===zs.DOWN||c.keyCode===zs.HOME||c.keyCode===zs.END);if(!g&&!a()&&!s())return void n(u,null);const f=i(),b=[...r(u),u];if((h||g&&!f.some((e=>b.includes(e))))&&await e(),!h){let e=l(),n=u;g&&(a()||s()||(e=u),d&&(n=d));const o=r(e),i=r(n),{start:c,end:p}=function(e,t,n,o){const r=[...n,e],l=[...o,t],i=Math.min(r.length,l.length)-1;return{start:r[i],end:l[i]}}(e,n,o,i);await t(c,p,null)}const v=i();if((c.keyCode===zs.HOME||c.keyCode===zs.END)&&v.length>1)return;const k=f.filter((e=>!v.includes(e)));let _;if(1===k.length){const e=p(o(k[0]))?.title;e&&(_=(0,x.sprintf)((0,x.__)("%s deselected."),e))}else k.length>1&&(_=(0,x.sprintf)((0,x.__)("%s blocks deselected."),k.length));_&&(0,vo.speak)(_,"assertive")}),[e,o,p,r,l,i,s,a,t,n])}}const Ex=28;function wx(e,t){const n=e[t+1];return n&&n.isDraggedBlock?wx(e,t+1):n}const Sx=["top","bottom"];function Cx(e,t,n=!1){let o,r,l,i,s;for(let n=0;n<e.length;n++){const a=e[n];if(a.isDraggedBlock)continue;const c=a.element.getBoundingClientRect(),[u,d]=Iw(t,c,Sx),p=Tw(t,c);if(void 0===l||u<l||p){l=u;const t=e.indexOf(a),n=e[t-1];if("top"===d&&n&&n.rootClientId===a.rootClientId&&!n.isDraggedBlock?(r=n,o="bottom",i=n.element.getBoundingClientRect(),s=t-1):(r=a,o=d,i=c,s=t),p)break}}if(!r)return;const a=function(e,t){const n=[];let o=e;for(;o;)n.push({...o}),o=t.find((e=>e.clientId===o.rootClientId));return n}(r,e),c="bottom"===o;if(c&&r.canInsertDraggedBlocksAsChild&&(r.innerBlockCount>0&&r.isExpanded||function(e,t,n=1,o=!1){const r=o?t.right-n*Ex:t.left+n*Ex;return(o?e.x<r-Ex:e.x>r+Ex)&&e.y<t.bottom}(t,i,a.length,n))){const e=r.isExpanded?0:r.innerBlockCount||0;return{rootClientId:r.clientId,clientId:r.clientId,blockIndex:e,dropPosition:"inside"}}if(c&&r.rootClientId&&function(e,t,n=1,o=!1){const r=o?t.right-n*Ex:t.left+n*Ex;return o?e.x>r:e.x<r}(t,i,a.length,n)){const l=wx(e,s),c=r.nestingLevel,u=l?l.nestingLevel:1;if(c&&u){const d=function(e,t,n=1,o=!1){const r=o?t.right-n*Ex:t.left+n*Ex,l=o?r-e.x:e.x-r,i=Math.round(l/Ex);return Math.abs(i)}(t,i,a.length,n),p=Math.max(Math.min(d,c-u),0);if(a[p]){let t=r.blockIndex;if(a[p].nestingLevel===l?.nestingLevel)t=l?.blockIndex;else for(let n=s;n>=0;n--){const o=e[n];if(o.rootClientId===a[p].rootClientId){t=o.blockIndex+1;break}}return{rootClientId:a[p].rootClientId,clientId:r.clientId,blockIndex:t,dropPosition:o}}}}if(!r.canInsertDraggedBlocksAsSibling)return;const u=c?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+u,dropPosition:o}}const xx={leading:!1,trailing:!0};function Bx({selectBlock:e}){const t=(0,d.useRegistry)(),{getBlockOrder:n,getBlockRootClientId:o,getBlocksByClientId:r,getPreviousBlockClientId:l,getSelectedBlockClientIds:i,getSettings:s,canInsertBlockType:a,canRemoveBlocks:c}=(0,d.useSelect)(Nr),{flashBlock:u,removeBlocks:m,replaceBlocks:h,insertBlocks:g}=(0,d.useDispatch)(Nr),f=ey();return(0,p.useRefEffect)((d=>{function p(t,n){n&&e(void 0,t,null,null),hx(t,d)}function b(e){if(e.defaultPrevented)return;if(!d.contains(e.target.ownerDocument.activeElement))return;const b=e.target.ownerDocument.activeElement?.closest("[role=row]"),v=b?.dataset?.block;if(!v)return;const{blocksToUpdate:k,firstBlockClientId:_,firstBlockRootClientId:y,originallySelectedBlockClientIds:E}=function(e){const t=i(),n=t.includes(e),r=n?t[0]:e;return{blocksToUpdate:n?t:[e],firstBlockClientId:r,firstBlockRootClientId:o(r),originallySelectedBlockClientIds:t}}(v);if(0!==k.length){if(e.preventDefault(),"copy"===e.type||"cut"===e.type){1===k.length&&u(k[0]),f(e.type,k);oy(e,r(k),t)}if("cut"===e.type){var w;if(!c(k,y))return;let e=null!==(w=l(_))&&void 0!==w?w:y;m(k,!1);const t=E.length>0&&0===i().length;e||(e=n()[0]),p(e,t)}else if("paste"===e.type){const{__experimentalCanUserUseUnfilteredHTML:t}=s(),n=ry(e,t);if(1===k.length){const[e]=k;if(n.every((t=>a(t.name,e))))return g(n,void 0,e),void p(n[0]?.clientId,!1)}h(k,n,n.length-1,-1),p(n[0]?.clientId,!1)}}}return d.ownerDocument.addEventListener("copy",b),d.ownerDocument.addEventListener("cut",b),d.ownerDocument.addEventListener("paste",b),()=>{d.ownerDocument.removeEventListener("copy",b),d.ownerDocument.removeEventListener("cut",b),d.ownerDocument.removeEventListener("paste",b)}}),[])}const Ix=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;const Tx=(0,u.forwardRef)((function e({id:t,blocks:n,dropZoneElement:o,showBlockMovers:r=!1,isExpanded:l=!1,showAppender:i=!1,blockSettingsMenu:a=kC,rootClientId:c,description:m,onSelect:h,additionalBlockContent:g},f){n&&w()("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});const b=(0,p.useInstanceId)(e),{clientIdsTree:v,draggedClientIds:k,selectedClientIds:_}=function({blocks:e,rootClientId:t}){return(0,d.useSelect)((n=>{const{getDraggedBlockClientIds:o,getSelectedBlockClientIds:r,getEnabledClientIdsTree:l}=ie(n(Nr));return{selectedClientIds:r(),draggedClientIds:o(),clientIdsTree:null!=e?e:l(t)}}),[e,t])}({blocks:n,rootClientId:c}),y=function(e){const t=(0,u.useMemo)((()=>{const t={};let n=0;const o=e=>{e.forEach((e=>{t[e.clientId]=n,n++,e.innerBlocks.length>0&&o(e.innerBlocks)}))};return o(e),t}),[e]);return t}(v),{getBlock:E}=(0,d.useSelect)(Nr),{visibleBlockCount:S,shouldShowInnerBlocks:C}=(0,d.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n,__unstableGetEditorMode:o}=e(Nr),r=k?.length>0?n(k).length+1:0;return{visibleBlockCount:t()-r,shouldShowInnerBlocks:"zoom-out"!==o()}}),[k]),{updateBlockSelection:B}=yx(),[I,T]=(0,u.useReducer)(Ix,{}),[M,P]=(0,u.useState)(null),{setSelectedTreeId:R}=function({firstSelectedBlockClientId:e,setExpandedState:t}){const[n,o]=(0,u.useState)(null),{selectedBlockParentClientIds:r}=(0,d.useSelect)((t=>{const{getBlockParents:n}=t(Nr);return{selectedBlockParentClientIds:n(e,!1)}}),[e]);return(0,u.useEffect)((()=>{n!==e&&r?.length&&t({type:"expand",clientIds:r})}),[e,r,n,t]),{setSelectedTreeId:o}}({firstSelectedBlockClientId:_[0],setExpandedState:T}),N=(0,u.useCallback)(((e,t,n)=>{B(e,t,null,n),R(t),h&&h(E(t))}),[R,B,h,E]),{ref:L,target:A}=function({dropZoneElement:e,expandedState:t,setExpandedState:n}){const{getBlockRootClientId:o,getBlockIndex:r,getBlockCount:l,getDraggedBlockClientIds:i,canInsertBlocks:s}=(0,d.useSelect)(Nr),[a,c]=(0,u.useState)(),{rootClientId:m,blockIndex:h}=a||{},g=Bw(m,h),f=(0,x.isRTL)(),b=(0,p.usePrevious)(m),v=(0,u.useCallback)(((e,t)=>{const{rootClientId:o}=t||{};o&&("inside"!==t?.dropPosition||e[o]||n({type:"expand",clientIds:[o]}))}),[n]),k=(0,p.useThrottle)(v,500,xx);(0,u.useEffect)((()=>{"inside"===a?.dropPosition&&b===a?.rootClientId?k(t,a):k.cancel()}),[t,b,a,k]);const _=i(),y=(0,p.useThrottle)((0,u.useCallback)(((e,t)=>{const n={x:e.clientX,y:e.clientY},i=!!_?.length,a=Cx(Array.from(t.querySelectorAll("[data-block]")).map((e=>{const t=e.dataset.block,n="true"===e.dataset.expanded,a=e.classList.contains("is-dragging"),c=parseInt(e.getAttribute("aria-level"),10),u=o(t);return{clientId:t,isExpanded:n,rootClientId:u,blockIndex:r(t),element:e,nestingLevel:c||void 0,isDraggedBlock:!!i&&a,innerBlockCount:l(t),canInsertDraggedBlocksAsSibling:!i||s(_,u),canInsertDraggedBlocksAsChild:!i||s(_,t)}})),n,f);a&&c(a)}),[s,_,l,r,o,f]),50);return{ref:(0,p.__experimentalUseDropZone)({dropZoneElement:e,onDrop(e){a&&g(e)},onDragLeave(){y.cancel(),c(null)},onDragOver(e){y(e,e.currentTarget)},onDragEnd(){y.cancel(),c(void 0)}}),target:a}}({dropZoneElement:o,expandedState:I,setExpandedState:T}),O=(0,u.useRef)(),D=Bx({selectBlock:N}),z=(0,p.useMergeRefs)([D,O,L,f]);(0,u.useEffect)((()=>{_?.length&&hx(_[0],O?.current)}),[]);const V=(0,u.useCallback)((e=>{e&&T({type:"expand",clientIds:[e]})}),[T]),F=(0,u.useCallback)((e=>{e&&T({type:"collapse",clientIds:[e]})}),[T]),H=(0,u.useCallback)((e=>{V(e?.dataset?.block)}),[V]),G=(0,u.useCallback)((e=>{F(e?.dataset?.block)}),[F]),U=(0,u.useCallback)(((e,t,n)=>{e.shiftKey&&B(e,t?.dataset?.block,n?.dataset?.block)}),[B]),$=k?.[0],{blockDropTargetIndex:j,blockDropPosition:W,firstDraggedBlockIndex:K}=(0,u.useMemo)((()=>{let e,t;if(A?.clientId){const t=y[A.clientId];e=void 0===t||"top"===A?.dropPosition?t:t+1}else null===A&&(e=null);if($){const e=y[$];t=void 0===e||"top"===A?.dropPosition?e:e+1}return{blockDropTargetIndex:e,blockDropPosition:A?.dropPosition,firstDraggedBlockIndex:t}}),[A,y,$]),Z=(0,u.useMemo)((()=>({blockDropPosition:W,blockDropTargetIndex:j,blockIndexes:y,draggedClientIds:k,expandedState:I,expand:V,firstDraggedBlockIndex:K,collapse:F,BlockSettingsMenu:a,listViewInstanceId:b,AdditionalBlockContent:g,insertedBlock:M,setInsertedBlock:P,treeGridElementRef:O,rootClientId:c})),[W,j,y,k,I,V,K,F,a,b,g,M,P,c]),[q]=(0,p.__experimentalUseFixedWindowList)(O,36,S,{expandedState:I,useWindowing:!0,windowOverscan:40});if(!v.length&&!i)return null;const Y=m&&`block-editor-list-view-description-${b}`;return(0,s.createElement)(d.AsyncModeProvider,{value:!0},(0,s.createElement)(_x,{draggedBlockClientId:$,listViewRef:O,blockDropTarget:A}),m&&(0,s.createElement)(_l.VisuallyHidden,{id:Y},m),(0,s.createElement)(_l.__experimentalTreeGrid,{id:t,className:ml()("block-editor-list-view-tree",{"is-dragging":k?.length>0&&void 0!==j}),"aria-label":(0,x.__)("Block navigation structure"),ref:z,onCollapseRow:G,onExpandRow:H,onFocusRow:U,applicationAriaLabel:(0,x.__)("Block navigation structure"),"aria-describedby":Y,style:{"--wp-admin--list-view-dragged-items-height":k?.length?36*(k.length-1)+"px":null}},(0,s.createElement)(QC.Provider,{value:Z},(0,s.createElement)(kx,{blocks:v,parentId:c,selectBlock:N,showBlockMovers:r,fixedListWindow:q,selectedClientIds:_,isExpanded:l,shouldShowInnerBlocks:C,showAppender:i}))))})),Mx=(0,u.forwardRef)(((e,t)=>(0,s.createElement)(Tx,{ref:t,...e,showAppender:!1,rootClientId:null,onSelect:null,additionalBlockContent:null,blockSettingsMenu:void 0})));function Px({isEnabled:e,onToggle:t,isOpen:n,innerRef:o,...r}){return(0,s.createElement)(_l.Button,{...r,ref:o,icon:XC,"aria-expanded":n,"aria-haspopup":"true",onClick:e?t:void 0,label:(0,x.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e})}const Rx=(0,u.forwardRef)((function({isDisabled:e,...t},n){w()("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});const o=(0,d.useSelect)((e=>!!e(Nr).getBlockCount()),[])&&!e;return(0,s.createElement)(_l.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:e,onToggle:r})=>(0,s.createElement)(Px,{...t,innerRef:n,isOpen:e,onToggle:r,isEnabled:o}),renderContent:()=>(0,s.createElement)("div",{className:"block-editor-block-navigation__container"},(0,s.createElement)("p",{className:"block-editor-block-navigation__label"},(0,x.__)("List view")),(0,s.createElement)(Mx,null))})}));function Nx({genericPreviewBlock:e,style:t,className:n,activeStyle:o}){const r=(0,c.getBlockType)(e.name)?.example,l=RS(n,o,t),i=(0,u.useMemo)((()=>({...e,title:t.label||t.name,description:t.description,initialAttributes:{...e.attributes,className:l+" block-editor-block-styles__block-preview-container"},example:r})),[e,l]);return(0,s.createElement)(Py,{item:i})}const Lx=()=>{};const Ax=function({clientId:e,onSwitch:t=Lx,onHoverClassName:n=Lx}){const{onSelect:o,stylesToRender:r,activeStyle:l,genericPreviewBlock:i,className:a}=LS({clientId:e,onSwitch:t}),[c,d]=(0,u.useState)(null),m=(0,p.useViewportMatch)("medium","<");if(!r||0===r.length)return null;const h=(0,p.debounce)(d,250),g=e=>{var t;c!==e?(h(e),n(null!==(t=e?.name)&&void 0!==t?t:null)):h.cancel()};return(0,s.createElement)("div",{className:"block-editor-block-styles"},(0,s.createElement)("div",{className:"block-editor-block-styles__variants"},r.map((e=>{const t=e.label||e.name;return(0,s.createElement)(_l.Button,{__next40pxDefaultSize:!0,className:ml()("block-editor-block-styles__item",{"is-active":l.name===e.name}),key:e.name,variant:"secondary",label:t,onMouseEnter:()=>g(e),onFocus:()=>g(e),onMouseLeave:()=>g(null),onBlur:()=>g(null),onClick:()=>(e=>{o(e),n(null),d(null),h.cancel()})(e),"aria-current":l.name===e.name},(0,s.createElement)(_l.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text"},t))}))),c&&!m&&(0,s.createElement)(_l.Popover,{placement:"left-start",offset:34,focusOnMount:!1},(0,s.createElement)("div",{className:"block-editor-block-styles__preview-panel",onMouseLeave:()=>g(null)},(0,s.createElement)(Nx,{activeStyle:l,className:a,genericPreviewBlock:i,style:c}))))},Ox={0:(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"})),1:(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})),2:(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M9 11.1H5v-4H3v10h2v-4h4v4h2v-10H9v4zm8 4c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6v1.5h8v-2H17z"})),3:(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.3 1.7c-.4-.4-1-.7-1.6-.8v-.1c.6-.2 1.1-.5 1.5-.9.3-.4.5-.8.5-1.3 0-.4-.1-.8-.3-1.1-.2-.3-.5-.6-.8-.8-.4-.2-.8-.4-1.2-.5-.6-.1-1.1-.2-1.6-.2-.6 0-1.3.1-1.8.3s-1.1.5-1.6.9l1.2 1.4c.4-.2.7-.4 1.1-.6.3-.2.7-.3 1.1-.3.4 0 .8.1 1.1.3.3.2.4.5.4.8 0 .4-.2.7-.6.9-.7.3-1.5.5-2.2.4v1.6c.5 0 1 0 1.5.1.3.1.7.2 1 .3.2.1.4.2.5.4s.1.4.1.6c0 .3-.2.7-.5.8-.4.2-.9.3-1.4.3s-1-.1-1.4-.3c-.4-.2-.8-.4-1.2-.7L13 15.6c.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.6 0 1.1-.1 1.6-.2.4-.1.9-.2 1.3-.5.4-.2.7-.5.9-.9.2-.4.3-.8.3-1.2 0-.6-.3-1.1-.7-1.5z"})),4:(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})),5:(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.7 1.2c-.2-.3-.5-.7-.8-.9-.3-.3-.7-.5-1.1-.6-.5-.1-.9-.2-1.4-.2-.2 0-.5.1-.7.1-.2.1-.5.1-.7.2l.1-1.9h4.3V7H14l-.3 5 1 .6.5-.2.4-.1c.1-.1.3-.1.4-.1h.5c.5 0 1 .1 1.4.4.4.2.6.7.6 1.1 0 .4-.2.8-.6 1.1-.4.3-.9.4-1.4.4-.4 0-.9-.1-1.3-.3-.4-.2-.7-.4-1.1-.7 0 0-1.1 1.4-1 1.5.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.5 0 1-.1 1.5-.3s.9-.4 1.3-.7c.4-.3.7-.7.9-1.1s.3-.9.3-1.4-.1-1-.3-1.4z"})),6:(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M20.7 12.4c-.2-.3-.4-.6-.7-.9s-.6-.5-1-.6c-.4-.2-.8-.2-1.2-.2-.5 0-.9.1-1.3.3s-.8.5-1.2.8c0-.5 0-.9.2-1.4l.6-.9c.2-.2.5-.4.8-.5.6-.2 1.3-.2 1.9 0 .3.1.6.3.8.5 0 0 1.3-1.3 1.3-1.4-.4-.3-.9-.6-1.4-.8-.6-.2-1.3-.3-2-.3-.6 0-1.1.1-1.7.4-.5.2-1 .5-1.4.9-.4.4-.8 1-1 1.6-.3.7-.4 1.5-.4 2.3s.1 1.5.3 2.1c.2.6.6 1.1 1 1.5.4.4.9.7 1.4.9 1 .3 2 .3 3 0 .4-.1.8-.3 1.2-.6.3-.3.6-.6.8-1 .2-.5.3-.9.3-1.4s-.1-.9-.3-1.3zm-2 2.1c-.1.2-.3.4-.4.5-.1.1-.3.2-.5.2-.2.1-.4.1-.6.1-.2.1-.5 0-.7-.1-.2 0-.3-.2-.5-.3-.1-.2-.3-.4-.4-.6-.2-.3-.3-.7-.3-1 .3-.3.6-.5 1-.7.3-.1.7-.2 1-.2.4 0 .8.1 1.1.3.3.3.4.7.4 1.1 0 .2 0 .5-.1.7zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z"}))};function Dx({level:e}){return Ox[e]?(0,s.createElement)(_l.Icon,{icon:Ox[e]}):null}const zx=[1,2,3,4,5,6],Vx={className:"block-library-heading-level-dropdown"};function Fx({options:e=zx,value:t,onChange:n}){return(0,s.createElement)(_l.ToolbarDropdownMenu,{popoverProps:Vx,icon:(0,s.createElement)(Dx,{level:t}),label:(0,x.__)("Change level"),controls:e.map((e=>{{const o=e===t;return{icon:(0,s.createElement)(Dx,{level:e,isPressed:o}),title:0===e?(0,x.__)("Paragraph"):(0,x.sprintf)((0,x.__)("Heading %d"),e),isActive:o,onClick(){n(e)},role:"menuitemradio"}}}))})}const Hx=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.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"}));const Gx=function({icon:e=Hx,label:t=(0,x.__)("Choose variation"),instructions:n=(0,x.__)("Select a variation to start with."),variations:o,onSelect:r,allowSkip:l}){const i=ml()("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return(0,s.createElement)(_l.Placeholder,{icon:e,label:t,instructions:n,className:i},(0,s.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,x.__)("Block variations")},o.map((e=>(0,s.createElement)("li",{key:e.name},(0,s.createElement)(_l.Button,{variant:"secondary",icon:e.icon&&e.icon.src?e.icon.src:e.icon,iconSize:48,onClick:()=>r(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,s.createElement)("span",{className:"block-editor-block-variation-picker__variation-label"},e.title))))),l&&(0,s.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,s.createElement)(_l.Button,{variant:"link",onClick:()=>r()},(0,x.__)("Skip"))))},Ux=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"})),$x="carousel",jx="grid",Wx=({onBlockPatternSelect:e})=>(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},(0,s.createElement)(_l.Button,{variant:"primary",onClick:e},(0,x.__)("Choose"))),Kx=({handlePrevious:e,handleNext:t,activeSlide:n,totalSlides:o})=>(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},(0,s.createElement)(_l.Button,{icon:M_,label:(0,x.__)("Previous pattern"),onClick:e,disabled:0===n,__experimentalIsFocusable:!0}),(0,s.createElement)(_l.Button,{icon:T_,label:(0,x.__)("Next pattern"),onClick:t,disabled:n===o-1,__experimentalIsFocusable:!0})),Zx=({viewMode:e,setViewMode:t,handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:l,onBlockPatternSelect:i})=>{const a=e===$x,c=(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},(0,s.createElement)(_l.Button,{icon:Xi,label:(0,x.__)("Carousel view"),onClick:()=>t($x),isPressed:a}),(0,s.createElement)(_l.Button,{icon:Ux,label:(0,x.__)("Grid view"),onClick:()=>t(jx),isPressed:e===jx}));return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},a&&(0,s.createElement)(Kx,{handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:l}),c,a&&(0,s.createElement)(Wx,{onBlockPatternSelect:i}))};const qx=function(e,t,n){return(0,d.useSelect)((o=>{const{getBlockRootClientId:r,getPatternsByBlockTypes:l,__experimentalGetAllowedPatterns:i}=o(Nr),s=r(e);return n?i(s).filter(n):l(t,s)}),[e,t,n])},{CompositeV2:Yx,CompositeItemV2:Xx,useCompositeStoreV2:Qx}=ie(_l.privateApis),Jx=({viewMode:e,activeSlide:t,patterns:n,onBlockPatternSelect:o,showTitles:r})=>{const l=Qx(),i="block-editor-block-pattern-setup__container";if(e===$x){const e=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__carousel"},(0,s.createElement)("div",{className:i},(0,s.createElement)("div",{className:"carousel-container"},n.map(((n,o)=>(0,s.createElement)(tB,{active:o===t,className:e.get(o)||"",key:n.name,pattern:n}))))))}return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__grid"},(0,s.createElement)(Yx,{store:l,role:"listbox",className:i,"aria-label":(0,x.__)("Patterns list")},n.map((e=>(0,s.createElement)(eB,{key:e.name,pattern:e,onSelect:o,showTitles:r})))))};function eB({pattern:e,onSelect:t,showTitles:n}){const o="block-editor-block-pattern-setup-list",{blocks:r,description:l,viewportWidth:i=700}=e,a=(0,p.useInstanceId)(eB,`${o}__item-description`);return(0,s.createElement)("div",{className:`${o}__list-item`},(0,s.createElement)(Xx,{render:(0,s.createElement)("div",{"aria-describedby":l?a:void 0,"aria-label":e.title,className:`${o}__item`}),id:`${o}__pattern__${e.name}`,role:"option",onClick:()=>t(r)},(0,s.createElement)(Ty,{blocks:r,viewportWidth:i}),n&&(0,s.createElement)("div",{className:`${o}__item-title`},e.title),!!l&&(0,s.createElement)(_l.VisuallyHidden,{id:a},l)))}function tB({active:e,className:t,pattern:n,minHeight:o}){const{blocks:r,title:l,description:i}=n,a=(0,p.useInstanceId)(tB,"block-editor-block-pattern-setup-list__item-description");return(0,s.createElement)("div",{"aria-hidden":!e,role:"img",className:`pattern-slide ${t}`,"aria-label":l,"aria-describedby":i?a:void 0},(0,s.createElement)(Ty,{blocks:r,minHeight:o}),!!i&&(0,s.createElement)(_l.VisuallyHidden,{id:a},i))}const nB=({clientId:e,blockName:t,filterPatternsFn:n,onBlockPatternSelect:o,initialViewMode:r=$x,showTitles:l=!1})=>{const[i,a]=(0,u.useState)(r),[p,m]=(0,u.useState)(0),{replaceBlock:h}=(0,d.useDispatch)(Nr),g=qx(e,t,n);if(!g?.length)return null;const f=o||(t=>{const n=t.map((e=>(0,c.cloneBlock)(e)));h(e,n)});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:`block-editor-block-pattern-setup view-mode-${i}`},(0,s.createElement)(Jx,{viewMode:i,activeSlide:p,patterns:g,onBlockPatternSelect:f,showTitles:l}),(0,s.createElement)(Zx,{viewMode:i,setViewMode:a,activeSlide:p,totalSlides:g.length,handleNext:()=>{m((e=>Math.min(e+1,g.length-1)))},handlePrevious:()=>{m((e=>Math.max(e-1,0)))},onBlockPatternSelect:()=>{f(g[p].blocks)}})))};function oB({className:e,onSelectVariation:t,selectedValue:n,variations:o}){return(0,s.createElement)("fieldset",{className:e},(0,s.createElement)(_l.VisuallyHidden,{as:"legend"},(0,x.__)("Transform to variation")),o.map((e=>(0,s.createElement)(_l.Button,{key:e.name,icon:(0,s.createElement)(qh,{icon:e.icon,showColors:!0}),isPressed:n===e.name,label:n===e.name?e.title:(0,x.sprintf)((0,x.__)("Transform to %s"),e.title),onClick:()=>t(e.name),"aria-label":e.title,showTooltip:!0}))))}function rB({className:e,onSelectVariation:t,selectedValue:n,variations:o}){const r=o.map((({name:e,title:t,description:n})=>({value:e,label:t,info:n})));return(0,s.createElement)(_l.DropdownMenu,{className:e,label:(0,x.__)("Transform to variation"),text:(0,x.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${e}__popover`},icon:cS,toggleProps:{iconPosition:"right"}},(()=>(0,s.createElement)("div",{className:`${e}__container`},(0,s.createElement)(_l.MenuGroup,null,(0,s.createElement)(_l.MenuItemsChoice,{choices:r,value:n,onSelect:t})))))}function lB({className:e,onSelectVariation:t,selectedValue:n,variations:o}){return(0,s.createElement)("div",{className:e},(0,s.createElement)(_l.__experimentalToggleGroupControl,{label:(0,x.__)("Transform to variation"),value:n,hideLabelFromVision:!0,onChange:t,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0},o.map((e=>(0,s.createElement)(_l.__experimentalToggleGroupControlOptionIcon,{key:e.name,icon:e.icon,value:e.name,label:n===e.name?e.title:(0,x.sprintf)((0,x.__)("Transform to %s"),e.title)})))))}const iB=function({blockClientId:e}){const{updateBlockAttributes:t}=(0,d.useDispatch)(Nr),{activeBlockVariation:n,variations:o}=(0,d.useSelect)((t=>{const{getActiveBlockVariation:n,getBlockVariations:o}=t(c.store),{getBlockName:r,getBlockAttributes:l}=t(Nr),i=e&&r(e);return{activeBlockVariation:n(i,l(e)),variations:i&&o(i,"transform")}}),[e]),r=n?.name,l=(0,u.useMemo)((()=>{const e=new Set;return!!o&&(o.forEach((t=>{t.icon&&e.add(t.icon?.src||t.icon)})),e.size===o.length)}),[o]);if(!o?.length)return null;const i=o.length>5,a=l?i?oB:lB:rB;return(0,s.createElement)(a,{className:"block-editor-block-variation-transforms",onSelectVariation:n=>{t(e,{...o.find((({name:e})=>e===n)).attributes})},selectedValue:r,variations:o})},sB=(0,p.createHigherOrderComponent)((e=>t=>{const[n,o]=Ar("color.palette","color.custom"),{colors:r=n,disableCustomColors:l=!o}=t,i=r&&r.length>0||!l;return(0,s.createElement)(e,{...t,colors:r,disableCustomColors:l,hasColorsToChoose:i})}),"withColorContext"),aB=sB(_l.ColorPalette);function cB({onChange:e,value:t,...n}){return(0,s.createElement)(Xu,{...n,onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0})}const uB=window.wp.date,dB=new Date(2022,0,25);function pB({format:e,defaultFormat:t,onChange:n}){return(0,s.createElement)("fieldset",{className:"block-editor-date-format-picker"},(0,s.createElement)(_l.VisuallyHidden,{as:"legend"},(0,x.__)("Date format")),(0,s.createElement)(_l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Default format"),help:`${(0,x.__)("Example:")} ${(0,uB.dateI18n)(t,dB)}`,checked:!e,onChange:e=>n(e?null:t)}),e&&(0,s.createElement)(mB,{format:e,onChange:n}))}function mB({format:e,onChange:t}){var n;const o=[...new Set(["Y-m-d",(0,x._x)("n/j/Y","short date format"),(0,x._x)("n/j/Y g:i A","short date format with time"),(0,x._x)("M j, Y","medium date format"),(0,x._x)("M j, Y g:i A","medium date format with time"),(0,x._x)("F j, Y","long date format"),(0,x._x)("M j","short date format without the year")])],r=o.map(((e,t)=>({key:`suggested-${t}`,name:(0,uB.dateI18n)(e,dB),format:e}))),l={key:"custom",name:(0,x.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",__experimentalHint:(0,x.__)("Enter your own date format")},[i,a]=(0,u.useState)((()=>!!e&&!o.includes(e)));return(0,s.createElement)(_l.__experimentalVStack,null,(0,s.createElement)(_l.CustomSelectControl,{__nextUnconstrainedWidth:!0,label:(0,x.__)("Choose a format"),options:[...r,l],value:i?l:null!==(n=r.find((t=>t.format===e)))&&void 0!==n?n:l,onChange:({selectedItem:e})=>{e===l?a(!0):(a(!1),t(e.format))}}),i&&(0,s.createElement)(_l.TextControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Custom format"),hideLabelFromVision:!0,help:(0,u.createInterpolateElement)((0,x.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,s.createElement)(_l.ExternalLink,{href:(0,x.__)("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:e,onChange:e=>t(e)}))}const hB=({setting:e,children:t,panelId:n,...o})=>(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:()=>!!e.colorValue||!!e.gradientValue,label:e.label,onDeselect:()=>{e.colorValue?e.onColorChange():e.gradientValue&&e.onGradientChange()},isShownByDefault:void 0===e.isShownByDefault||e.isShownByDefault,...o,className:"block-editor-tools-panel-color-gradient-settings__item",panelId:n,resetAllFilter:e.resetAllFilter},t),gB=({colorValue:e,label:t})=>(0,s.createElement)(_l.__experimentalHStack,{justify:"flex-start"},(0,s.createElement)(_l.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:e}),(0,s.createElement)(_l.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t},t)),fB=e=>({onToggle:t,isOpen:n})=>{const{colorValue:o,label:r}=e,l={onClick:t,className:ml()("block-editor-panel-color-gradient-settings__dropdown",{"is-open":n}),"aria-expanded":n};return(0,s.createElement)(_l.Button,{...l},(0,s.createElement)(gB,{colorValue:o,label:r}))};function bB({colors:e,disableCustomColors:t,disableCustomGradients:n,enableAlpha:o,gradients:r,settings:l,__experimentalIsRenderedInSidebar:i,...a}){let c;return i&&(c={placement:"left-start",offset:36,shift:!0}),(0,s.createElement)(s.Fragment,null,l.map(((l,u)=>{var d;const p={clearable:!1,colorValue:l.colorValue,colors:e,disableCustomColors:t,disableCustomGradients:n,enableAlpha:o,gradientValue:l.gradientValue,gradients:r,label:l.label,onColorChange:l.onColorChange,onGradientChange:l.onGradientChange,showTitle:!1,__experimentalIsRenderedInSidebar:i,...l},m={colorValue:null!==(d=l.gradientValue)&&void 0!==d?d:l.colorValue,label:l.label};return l&&(0,s.createElement)(hB,{key:u,setting:l,...a},(0,s.createElement)(_l.Dropdown,{popoverProps:c,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:fB(m),renderContent:()=>(0,s.createElement)(_l.__experimentalDropdownContentWrapper,{paddingSize:"none"},(0,s.createElement)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content"},(0,s.createElement)(Xu,{...p})))}))})))}const vB=["colors","disableCustomColors","gradients","disableCustomGradients"],kB=({className:e,colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,children:l,settings:i,title:a,showTitle:c=!0,__experimentalIsRenderedInSidebar:u,enableAlpha:m})=>{const h=(0,p.useInstanceId)(kB),{batch:g}=(0,d.useRegistry)();return t&&0!==t.length||n&&0!==n.length||!o||!r||!i?.every((e=>(!e.colors||0===e.colors.length)&&(!e.gradients||0===e.gradients.length)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)))?(0,s.createElement)(_l.__experimentalToolsPanel,{className:ml()("block-editor-panel-color-gradient-settings",e),label:c?a:void 0,resetAll:()=>{g((()=>{i.forEach((({colorValue:e,gradientValue:t,onColorChange:n,onGradientChange:o})=>{e?n():t&&o()}))}))},panelId:h,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},(0,s.createElement)(bB,{settings:i,panelId:h,colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,__experimentalIsRenderedInSidebar:u,enableAlpha:m}),!!l&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.__experimentalSpacer,{marginY:4})," ",l)):null},_B=e=>{const t=qc();return(0,s.createElement)(kB,{...t,...e})},yB=e=>vB.every((t=>e.hasOwnProperty(t)))?(0,s.createElement)(kB,{...e}):(0,s.createElement)(_B,{...e});const EB=(0,u.createContext)({}),wB=()=>(0,u.useContext)(EB);function SB({id:e,url:t,naturalWidth:n,naturalHeight:o,onFinishEditing:r,onSaveImage:l,children:i}){const a=function({url:e,naturalWidth:t,naturalHeight:n}){const[o,r]=(0,u.useState)(),[l,i]=(0,u.useState)(),[s,a]=(0,u.useState)({x:0,y:0}),[c,d]=(0,u.useState)(100),[p,h]=(0,u.useState)(0),g=t/n,[f,b]=(0,u.useState)(g),v=(0,u.useCallback)((()=>{const t=(p+90)%360;let n=g;if(p%180==90&&(n=1/g),0===t)return r(),h(t),b(g),void a((e=>({x:-e.y*n,y:e.x*n})));const o=new window.Image;o.src=e,o.onload=function(e){const o=document.createElement("canvas");let l=0,i=0;t%180?(o.width=e.target.height,o.height=e.target.width):(o.width=e.target.width,o.height=e.target.height),90!==t&&180!==t||(l=o.width),270!==t&&180!==t||(i=o.height);const s=o.getContext("2d");s.translate(l,i),s.rotate(t*Math.PI/180),s.drawImage(e.target,0,0),o.toBlob((e=>{r(URL.createObjectURL(e)),h(t),b(o.width/o.height),a((e=>({x:-e.y*n,y:e.x*n})))}))};const l=(0,m.applyFilters)("media.crossOrigin",void 0,e);"string"==typeof l&&(o.crossOrigin=l)}),[p,g,e]);return(0,u.useMemo)((()=>({editedUrl:o,setEditedUrl:r,crop:l,setCrop:i,position:s,setPosition:a,zoom:c,setZoom:d,rotation:p,setRotation:h,rotateClockwise:v,aspect:f,setAspect:b,defaultAspect:g})),[o,l,s,c,p,v,f,g])}({url:t,naturalWidth:n,naturalHeight:o}),c=function({crop:e,rotation:t,url:n,id:o,onSaveImage:r,onFinishEditing:l}){const{createErrorNotice:i}=(0,d.useDispatch)(Os.store),[s,a]=(0,u.useState)(!1),c=(0,u.useCallback)((()=>{a(!1),l()}),[l]),p=(0,u.useCallback)((()=>{a(!0);const s=[];t>0&&s.push({type:"rotate",args:{angle:t}}),(e.width<99.9||e.height<99.9)&&s.push({type:"crop",args:{left:e.x,top:e.y,width:e.width,height:e.height}}),ef()({path:`/wp/v2/media/${o}/edit`,method:"POST",data:{src:n,modifiers:s}}).then((e=>{r({id:e.id,url:e.source_url})})).catch((e=>{i((0,x.sprintf)((0,x.__)("Could not edit image. %s"),(0,As.__unstableStripHTML)(e.message)),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{a(!1),l()}))}),[e,t,o,n,r,i,l]);return(0,u.useMemo)((()=>({isInProgress:s,apply:p,cancel:c})),[s,p,c])}({id:e,url:t,onSaveImage:l,onFinishEditing:r,...a}),p=(0,u.useMemo)((()=>({...a,...c})),[a,c]);return(0,s.createElement)(EB.Provider,{value:p},i)}
+ */,e.exports=function(e,t){if(!r.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,l=n in document;if(!l){var i=document.createElement("div");i.setAttribute(n,"return;"),l="function"==typeof i[n]}return!l&&o&&"wheel"===e&&(l=document.implementation.hasFeature("Events.wheel","3.0")),l}},7191:(e,t,n)=>{"use strict";var o=n(2213),r=n(1087);function l(e){var t=0,n=0,o=0,r=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),o=10*t,r=10*n,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(o=e.deltaX),(o||r)&&e.deltaMode&&(1==e.deltaMode?(o*=40,r*=40):(o*=800,r*=800)),o&&!t&&(t=o<1?-1:1),r&&!n&&(n=r<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:r}}l.getEventType=function(){return o.firefox()?"DOMMouseScroll":r("wheel")?"wheel":"mousewheel"},e.exports=l},2775:e=>{var t=String,n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};e.exports=n(),e.exports.createColors=n},4465:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8036:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};n(4465);const r=o(n(4529)),l=o(n(3576));e.exports=(0,l.default)(r.default)},5525:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prefixWrapCSSSelector=t.prefixWrapCSSRule=void 0;const o=n(3467);t.prefixWrapCSSRule=(e,n,r,l,i)=>{const s=e.selector.split(",").filter((e=>!(0,o.cssRuleMatchesPrefixSelector)({selector:e},l)));0!==s.length&&(e.selector=s.map((o=>(0,t.prefixWrapCSSSelector)(o,e,n,r,l,i))).filter(o.isValidCSSSelector).join(", "))};t.prefixWrapCSSSelector=(e,t,n,r,l,i)=>{const s=(0,o.cleanSelector)(e);return""===s?null:null!==n&&s.startsWith(n,0)||(0,o.isKeyframes)(t)||r.some((e=>s.match(e)))?s:(0,o.isNotRootTag)(s)?l+" "+s:i?l+" ."+s:s.replace(/^(body|html|:root)/,l)}},3467:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cssRuleMatchesPrefixSelector=t.isNotRootTag=t.isKeyframes=t.cleanSelector=t.isValidCSSSelector=void 0;const n=/(^\s*|\s*$)/g,o=/^(body|html|:root).*$/;t.isValidCSSSelector=e=>null!==e;t.cleanSelector=e=>e.replace(n,"");t.isKeyframes=e=>{const{parent:t}=e,n=t;return void 0!==t&&"atrule"===n.type&&void 0!==n.name&&null!==n.name.match(/keyframes$/)};t.isNotRootTag=e=>!e.match(o);t.cssRuleMatchesPrefixSelector=(e,t)=>{const n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^${n}$`).test(e.selector)}},9411:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldIncludeFilePath=void 0;t.shouldIncludeFilePath=(e,t,n)=>t.length>0?null!=e&&t.some((t=>e.match(t))):!(n.length>0)||!(null!=e&&n.some((t=>e.match(t))))},8061:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.asPostCSSv7PluginGenerator=void 0;const i=l(n(1311));t.asPostCSSv7PluginGenerator=e=>e.plugin(i.PLUGIN_NAME,((e,t)=>new i.default(e,t).prefix()))},2888:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.asPostCSSv8PluginGenerator=t.isPostCSSv8=void 0;const i=l(n(1311));t.isPostCSSv8=e=>void 0!==e.Root;t.asPostCSSv8PluginGenerator=()=>(e,t)=>{const n=new i.default(e,t);return{postcssPlugin:i.PLUGIN_NAME,Once(e){n.prefixRoot(e)}}}},3576:(e,t,n)=>{"use strict";const o=n(2888),r=n(8061);e.exports=e=>(0,o.isPostCSSv8)(e)?(0,o.asPostCSSv8PluginGenerator)():(0,r.asPostCSSv7PluginGenerator)(e)},1311:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PLUGIN_NAME=void 0;const o=n(5525),r=n(9411);t.PLUGIN_NAME="postcss-prefixwrap";t.default=class{blacklist;ignoredSelectors;isPrefixSelector;prefixRootTags;prefixSelector;whitelist;nested;constructor(e,t={}){this.blacklist=t.blacklist??[],this.ignoredSelectors=t.ignoredSelectors??[],this.isPrefixSelector=new RegExp(`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`),this.prefixRootTags=t.prefixRootTags??!1,this.prefixSelector=e,this.whitelist=t.whitelist??[],this.nested=t.nested??null}prefixRoot(e){(0,r.shouldIncludeFilePath)(e.source?.input?.file,this.whitelist,this.blacklist)&&e.walkRules((e=>{(0,o.prefixWrapCSSRule)(e,this.nested,this.ignoredSelectors,this.prefixSelector,this.prefixRootTags)}))}prefix(){return e=>{this.prefixRoot(e)}}}},5404:(e,t,n)=>{const o=n(1544);e.exports=e=>{const t=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(n){const r=o(n.value);let l=!1;r.walk((n=>{if("function"!==n.type||"url"!==n.value)return;const o=n.nodes[0].value,r=new URL(o,e.rootUrl);return r.pathname===o&&t.skipHostRelativeUrls||(n.nodes[0].value=r.toString(),l=!0),!1})),l&&(n.value=o.stringify(r))}}},e.exports.postcss=!0},1544:(e,t,n)=>{var o=n(8491),r=n(3815),l=n(4725);function i(e){return this instanceof i?(this.nodes=o(e),this):new i(e)}i.prototype.toString=function(){return Array.isArray(this.nodes)?l(this.nodes):""},i.prototype.walk=function(e,t){return r(this.nodes,e,t),this},i.unit=n(1524),i.walk=r,i.stringify=l,e.exports=i},8491:e=>{var t="(".charCodeAt(0),n=")".charCodeAt(0),o="'".charCodeAt(0),r='"'.charCodeAt(0),l="\\".charCodeAt(0),i="/".charCodeAt(0),s=",".charCodeAt(0),a=":".charCodeAt(0),c="*".charCodeAt(0),u="u".charCodeAt(0),d="U".charCodeAt(0),p="+".charCodeAt(0),m=/^[a-f0-9?-]+$/i;e.exports=function(e){for(var h,g,f,b,v,k,_,y,E,w=[],S=e,C=0,x=S.charCodeAt(C),B=S.length,I=[{nodes:w}],T=0,M="",P="",R="";C<B;)if(x<=32){h=C;do{h+=1,x=S.charCodeAt(h)}while(x<=32);b=S.slice(C,h),f=w[w.length-1],x===n&&T?R=b:f&&"div"===f.type?(f.after=b,f.sourceEndIndex+=b.length):x===s||x===a||x===i&&S.charCodeAt(h+1)!==c&&(!E||E&&"function"===E.type&&"calc"!==E.value)?P=b:w.push({type:"space",sourceIndex:C,sourceEndIndex:h,value:b}),C=h}else if(x===o||x===r){h=C,b={type:"string",sourceIndex:C,quote:g=x===o?"'":'"'};do{if(v=!1,~(h=S.indexOf(g,h+1)))for(k=h;S.charCodeAt(k-1)===l;)k-=1,v=!v;else h=(S+=g).length-1,b.unclosed=!0}while(v);b.value=S.slice(C+1,h),b.sourceEndIndex=b.unclosed?h:h+1,w.push(b),C=h+1,x=S.charCodeAt(C)}else if(x===i&&S.charCodeAt(C+1)===c)b={type:"comment",sourceIndex:C,sourceEndIndex:(h=S.indexOf("*/",C))+2},-1===h&&(b.unclosed=!0,h=S.length,b.sourceEndIndex=h),b.value=S.slice(C+2,h),w.push(b),C=h+2,x=S.charCodeAt(C);else if(x!==i&&x!==c||!E||"function"!==E.type||"calc"!==E.value)if(x===i||x===s||x===a)b=S[C],w.push({type:"div",sourceIndex:C-P.length,sourceEndIndex:C+b.length,value:b,before:P,after:""}),P="",C+=1,x=S.charCodeAt(C);else if(t===x){h=C;do{h+=1,x=S.charCodeAt(h)}while(x<=32);if(y=C,b={type:"function",sourceIndex:C-M.length,value:M,before:S.slice(y+1,h)},C=h,"url"===M&&x!==o&&x!==r){h-=1;do{if(v=!1,~(h=S.indexOf(")",h+1)))for(k=h;S.charCodeAt(k-1)===l;)k-=1,v=!v;else h=(S+=")").length-1,b.unclosed=!0}while(v);_=h;do{_-=1,x=S.charCodeAt(_)}while(x<=32);y<_?(b.nodes=C!==_+1?[{type:"word",sourceIndex:C,sourceEndIndex:_+1,value:S.slice(C,_+1)}]:[],b.unclosed&&_+1!==h?(b.after="",b.nodes.push({type:"space",sourceIndex:_+1,sourceEndIndex:h,value:S.slice(_+1,h)})):(b.after=S.slice(_+1,h),b.sourceEndIndex=h)):(b.after="",b.nodes=[]),C=h+1,b.sourceEndIndex=b.unclosed?h:C,x=S.charCodeAt(C),w.push(b)}else T+=1,b.after="",b.sourceEndIndex=C+1,w.push(b),I.push(b),w=b.nodes=[],E=b;M=""}else if(n===x&&T)C+=1,x=S.charCodeAt(C),E.after=R,E.sourceEndIndex+=R.length,R="",T-=1,I[I.length-1].sourceEndIndex=C,I.pop(),w=(E=I[T]).nodes;else{h=C;do{x===l&&(h+=1),h+=1,x=S.charCodeAt(h)}while(h<B&&!(x<=32||x===o||x===r||x===s||x===a||x===i||x===t||x===c&&E&&"function"===E.type&&"calc"===E.value||x===i&&"function"===E.type&&"calc"===E.value||x===n&&T));b=S.slice(C,h),t===x?M=b:u!==b.charCodeAt(0)&&d!==b.charCodeAt(0)||p!==b.charCodeAt(1)||!m.test(b.slice(2))?w.push({type:"word",sourceIndex:C,sourceEndIndex:h,value:b}):w.push({type:"unicode-range",sourceIndex:C,sourceEndIndex:h,value:b}),C=h}else b=S[C],w.push({type:"word",sourceIndex:C-P.length,sourceEndIndex:C+b.length,value:b}),C+=1,x=S.charCodeAt(C);for(C=I.length-1;C;C-=1)I[C].unclosed=!0,I[C].sourceEndIndex=S.length;return I[0].nodes}},4725:e=>{function t(e,t){var o,r,l=e.type,i=e.value;return t&&void 0!==(r=t(e))?r:"word"===l||"space"===l?i:"string"===l?(o=e.quote||"")+i+(e.unclosed?"":o):"comment"===l?"/*"+i+(e.unclosed?"":"*/"):"div"===l?(e.before||"")+i+(e.after||""):Array.isArray(e.nodes)?(o=n(e.nodes,t),"function"!==l?o:i+"("+(e.before||"")+o+(e.after||"")+(e.unclosed?"":")")):i}function n(e,n){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=t(e[r],n)+o;return o}return t(e,n)}e.exports=n},1524:e=>{var t="-".charCodeAt(0),n="+".charCodeAt(0),o=".".charCodeAt(0),r="e".charCodeAt(0),l="E".charCodeAt(0);e.exports=function(e){var i,s,a,c=0,u=e.length;if(0===u||!function(e){var r,l=e.charCodeAt(0);if(l===n||l===t){if((r=e.charCodeAt(1))>=48&&r<=57)return!0;var i=e.charCodeAt(2);return r===o&&i>=48&&i<=57}return l===o?(r=e.charCodeAt(1))>=48&&r<=57:l>=48&&l<=57}(e))return!1;for((i=e.charCodeAt(c))!==n&&i!==t||c++;c<u&&!((i=e.charCodeAt(c))<48||i>57);)c+=1;if(i=e.charCodeAt(c),s=e.charCodeAt(c+1),i===o&&s>=48&&s<=57)for(c+=2;c<u&&!((i=e.charCodeAt(c))<48||i>57);)c+=1;if(i=e.charCodeAt(c),s=e.charCodeAt(c+1),a=e.charCodeAt(c+2),(i===r||i===l)&&(s>=48&&s<=57||(s===n||s===t)&&a>=48&&a<=57))for(c+=s===n||s===t?3:2;c<u&&!((i=e.charCodeAt(c))<48||i>57);)c+=1;return{number:e.slice(0,c),unit:e.slice(c)}}},3815:e=>{e.exports=function e(t,n,o){var r,l,i,s;for(r=0,l=t.length;r<l;r+=1)i=t[r],o||(s=n(i,r,t)),!1!==s&&"function"===i.type&&Array.isArray(i.nodes)&&e(i.nodes,n,o),o&&n(i,r,t)}},1326:(e,t,n)=>{"use strict";let o=n(683);class r extends o{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=r,r.default=r,o.registerAtRule(r)},6589:(e,t,n)=>{"use strict";let o=n(7490);class r extends o{constructor(e){super(e),this.type="comment"}}e.exports=r,r.default=r},683:(e,t,n)=>{"use strict";let o,r,l,i,{isClean:s,my:a}=n(1381),c=n(1516),u=n(6589),d=n(7490);function p(e){return e.map((e=>(e.nodes&&(e.nodes=p(e.nodes)),delete e.source,e)))}function m(e){if(e[s]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)m(t)}class h extends d{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,n,o=this.getIterator();for(;this.indexes[o]<this.proxyOf.nodes.length&&(t=this.indexes[o],n=e(this.proxyOf.nodes[t],t),!1!==n);)this.indexes[o]+=1;return delete this.indexes[o],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map((e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e))):"every"===t||"some"===t?n=>e[t](((e,...t)=>n(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n,o=this.index(e),r=this.normalize(t,this.proxyOf.nodes[o]).reverse();o=this.index(e);for(let e of r)this.proxyOf.nodes.splice(o+1,0,e);for(let e in this.indexes)n=this.indexes[e],o<n&&(this.indexes[e]=n+r.length);return this.markDirty(),this}insertBefore(e,t){let n,o=this.index(e),r=0===o&&"prepend",l=this.normalize(t,this.proxyOf.nodes[o],r).reverse();o=this.index(e);for(let e of l)this.proxyOf.nodes.splice(o,0,e);for(let e in this.indexes)n=this.indexes[e],o<=n&&(this.indexes[e]=n+l.length);return this.markDirty(),this}normalize(e,t){if("string"==typeof e)e=p(o(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new c(e)]}else if(e.selector)e=[new r(e)];else if(e.name)e=[new l(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new u(e)]}return e.map((e=>(e[a]||h.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[s]&&m(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls((o=>{t.props&&!t.props.includes(o.prop)||t.fast&&!o.value.includes(t.fast)||(o.value=o.value.replace(e,n))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,n)=>{let o;try{o=e(t,n)}catch(e){throw t.addToError(e)}return!1!==o&&t.walk&&(o=t.walk(e)),o}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("atrule"===n.type&&e.test(n.name))return t(n,o)})):this.walk(((n,o)=>{if("atrule"===n.type&&n.name===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("atrule"===e.type)return t(e,n)})))}walkComments(e){return this.walk(((t,n)=>{if("comment"===t.type)return e(t,n)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("decl"===n.type&&e.test(n.prop))return t(n,o)})):this.walk(((n,o)=>{if("decl"===n.type&&n.prop===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("decl"===e.type)return t(e,n)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("rule"===n.type&&e.test(n.selector))return t(n,o)})):this.walk(((n,o)=>{if("rule"===n.type&&n.selector===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("rule"===e.type)return t(e,n)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}h.registerParse=e=>{o=e},h.registerRule=e=>{r=e},h.registerAtRule=e=>{l=e},h.registerRoot=e=>{i=e},e.exports=h,h.default=h,h.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,l.prototype):"rule"===e.type?Object.setPrototypeOf(e,r.prototype):"decl"===e.type?Object.setPrototypeOf(e,c.prototype):"comment"===e.type?Object.setPrototypeOf(e,u.prototype):"root"===e.type&&Object.setPrototypeOf(e,i.prototype),e[a]=!0,e.nodes&&e.nodes.forEach((e=>{h.rebuild(e)}))}},356:(e,t,n)=>{"use strict";let o=n(2775),r=n(9746);class l extends Error{constructor(e,t,n,o,r,i){super(e),this.name="CssSyntaxError",this.reason=e,r&&(this.file=r),o&&(this.source=o),i&&(this.plugin=i),void 0!==t&&void 0!==n&&("number"==typeof t?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,l)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=o.isColorSupported),r&&e&&(t=r(t));let n,l,i=t.split(/\r?\n/),s=Math.max(this.line-3,0),a=Math.min(this.line+2,i.length),c=String(a).length;if(e){let{bold:e,gray:t,red:r}=o.createColors(!0);n=t=>e(r(t)),l=e=>t(e)}else n=l=e=>e;return i.slice(s,a).map(((e,t)=>{let o=s+1+t,r=" "+(" "+o).slice(-c)+" | ";if(o===this.line){let t=l(r.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+l(r)+e+"\n "+t+n("^")}return" "+l(r)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=l,l.default=l},1516:(e,t,n)=>{"use strict";let o=n(7490);class r extends o{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}e.exports=r,r.default=r},271:(e,t,n)=>{"use strict";let o,r,l=n(683);class i extends l{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new o(new r,this,e).stringify()}}i.registerLazyResult=e=>{o=e},i.registerProcessor=e=>{r=e},e.exports=i,i.default=i},8940:(e,t,n)=>{"use strict";let o=n(1516),r=n(5696),l=n(6589),i=n(1326),s=n(5380),a=n(9434),c=n(4092);function u(e,t){if(Array.isArray(e))return e.map((e=>u(e)));let{inputs:n,...d}=e;if(n){t=[];for(let e of n){let n={...e,__proto__:s.prototype};n.map&&(n.map={...n.map,__proto__:r.prototype}),t.push(n)}}if(d.nodes&&(d.nodes=e.nodes.map((e=>u(e,t)))),d.source){let{inputId:e,...n}=d.source;d.source=n,null!=e&&(d.source.input=t[e])}if("root"===d.type)return new a(d);if("decl"===d.type)return new o(d);if("rule"===d.type)return new c(d);if("comment"===d.type)return new l(d);if("atrule"===d.type)return new i(d);throw new Error("Unknown node type: "+e.type)}e.exports=u,u.default=u},5380:(e,t,n)=>{"use strict";let{SourceMapConsumer:o,SourceMapGenerator:r}=n(1866),{fileURLToPath:l,pathToFileURL:i}=n(2739),{isAbsolute:s,resolve:a}=n(197),{nanoid:c}=n(5042),u=n(9746),d=n(356),p=n(5696),m=Symbol("fromOffsetCache"),h=Boolean(o&&r),g=Boolean(a&&s);class f{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!g||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=a(t.from)),g&&h){let e=new p(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+c(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,o={}){let r,l,s;if(t&&"object"==typeof t){let e=t,o=n;if("number"==typeof e.offset){let o=this.fromOffset(e.offset);t=o.line,n=o.col}else t=e.line,n=e.column;if("number"==typeof o.offset){let e=this.fromOffset(o.offset);l=e.line,s=e.col}else l=o.line,s=o.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let a=this.origin(t,n,l,s);return r=a?new d(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,o.plugin):new d(e,void 0===l?t:{column:n,line:t},void 0===l?n:{column:s,line:l},this.css,this.file,o.plugin),r.input={column:n,endColumn:s,endLine:l,line:t,source:this.css},this.file&&(i&&(r.input.url=i(this.file).toString()),r.input.file=this.file),r}fromOffset(e){let t,n;if(this[m])n=this[m];else{let e=this.css.split("\n");n=new Array(e.length);let t=0;for(let o=0,r=e.length;o<r;o++)n[o]=t,t+=e[o].length+1;this[m]=n}t=n[n.length-1];let o=0;if(e>=t)o=n.length-1;else{let t,r=n.length-2;for(;o<r;)if(t=o+(r-o>>1),e<n[t])r=t-1;else{if(!(e>=n[t+1])){o=t;break}o=t+1}}return{col:e-n[o]+1,line:o+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:a(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,o){if(!this.map)return!1;let r,a,c=this.map.consumer(),u=c.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof n&&(r=c.originalPositionFor({column:o,line:n})),a=s(u.source)?i(u.source):new URL(u.source,this.map.consumer().sourceRoot||i(this.map.mapFile));let d={column:u.column,endColumn:r&&r.column,endLine:r&&r.line,line:u.line,url:a.toString()};if("file:"===a.protocol){if(!l)throw new Error("file: protocol is not available in this PostCSS build");d.file=l(a)}let p=c.sourceContentFor(u.source);return p&&(d.source=p),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}e.exports=f,f.default=f,u&&u.registerInput&&u.registerInput(f)},448:(e,t,n)=>{"use strict";let{isClean:o,my:r}=n(1381),l=n(1670),i=n(633),s=n(683),a=n(271),c=(n(3122),n(9055)),u=n(4295),d=n(9434);const p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},m={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0},g=0;function f(e){return"object"==typeof e&&"function"==typeof e.then}function b(e){let t=!1,n=p[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,g,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,g,n+"Exit"]:[n,n+"Exit"]}function v(e){let t;return t="document"===e.type?["Document",g,"DocumentExit"]:"root"===e.type?["Root",g,"RootExit"]:b(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function k(e){return e[o]=!1,e.nodes&&e.nodes.forEach((e=>k(e))),e}let _={};class y{constructor(e,t,n){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof y||t instanceof c)o=k(t.root),t.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let e=u;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{o=e(t,n)}catch(e){this.processed=!0,this.error=e}o&&!o[r]&&s.rebuild(o)}else o=k(t);this.result=new c(e,o,n),this.helpers={..._,postcss:_,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!m[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!h[n])if("object"==typeof t[n])for(let o in t[n])e(t,"*"===o?n:n+"-"+o.toLowerCase(),t[n][o]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(f(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[o];){e[o]=!0;let t=[v(e)];for(;t.length>0;){let e=this.visitTick(t);if(f(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>n(e,this.helpers)));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=i;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new l(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(f(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[o];)e[o]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,o]of e){let e;this.result.lastPlugin=n;try{e=o(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(f(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:r}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,o]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return o(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==t.iterator){let r,l=t.iterator;for(;r=n.nodes[n.indexes[l]];)if(n.indexes[l]+=1,!r[o])return r[o]=!0,void e.push(v(r));t.iterator=0,delete n.indexes[l]}let l=t.events;for(;t.eventIndex<l.length;){let e=l[t.eventIndex];if(t.eventIndex+=1,e===g)return void(n.nodes&&n.nodes.length&&(n[o]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[o]=!0;let t=b(e);for(let n of t)if(n===g)e.nodes&&e.each((e=>{e[o]||this.walkSync(e)}));else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}y.registerPostcss=e=>{_=e},e.exports=y,y.default=y,d.registerLazyResult(y),a.registerLazyResult(y)},7374:e=>{"use strict";let t={comma:e=>t.split(e,[","],!0),space:e=>t.split(e,[" ","\n","\t"]),split(e,t,n){let o=[],r="",l=!1,i=0,s=!1,a="",c=!1;for(let n of e)c?c=!1:"\\"===n?c=!0:s?n===a&&(s=!1):'"'===n||"'"===n?(s=!0,a=n):"("===n?i+=1:")"===n?i>0&&(i-=1):0===i&&t.includes(n)&&(l=!0),l?(""!==r&&o.push(r.trim()),r="",l=!1):r+=n;return(n||""!==r)&&o.push(r.trim()),o}};e.exports=t,t.default=t},1670:(e,t,n)=>{"use strict";let{SourceMapConsumer:o,SourceMapGenerator:r}=n(1866),{dirname:l,relative:i,resolve:s,sep:a}=n(197),{pathToFileURL:c}=n(2739),u=n(5380),d=Boolean(o&&r),p=Boolean(l&&s&&i&&a);e.exports=class{constructor(e,t,n,o){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=o,this.originalCSS=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),r=e.root||l(e.file);!1===this.mapOpts.sourcesContent?(t=new o(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),p&&d&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=r.fromSourceMap(e)}else this.map=new r({file:this.outputFile()}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new r({file:this.outputFile()});let e,t,n=1,o=1,l="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((r,s,a)=>{if(this.css+=r,s&&"end"!==a&&(i.generated.line=n,i.generated.column=o-1,s.source&&s.source.start?(i.source=this.sourcePath(s),i.original.line=s.source.start.line,i.original.column=s.source.start.column-1,this.map.addMapping(i)):(i.source=l,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=r.match(/\n/g),e?(n+=e.length,t=r.lastIndexOf("\n"),o=r.length-t):o+=r.length,s&&"start"!==a){let e=s.parent||{raws:{}};("decl"===s.type||"atrule"===s.type&&!s.nodes)&&s===e.last&&!e.raws.semicolon||(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=n,i.generated.column=o-2,this.map.addMapping(i)):(i.source=l,i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=o-1,this.map.addMapping(i)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?l(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=l(s(n,this.mapOpts.annotation)));let o=i(n,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new u(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let o=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(o,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(c){let t=c(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===a&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}},7661:(e,t,n)=>{"use strict";let o=n(1670),r=n(633),l=(n(3122),n(4295));const i=n(9055);class s{constructor(e,t,n){let l;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let s=r;this.result=new i(this._processor,l,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get:()=>a.root});let c=new o(s,l,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=l;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}e.exports=s,s.default=s},7490:(e,t,n)=>{"use strict";let{isClean:o,my:r}=n(1381),l=n(356),i=n(346),s=n(633);function a(e,t){let n=new e.constructor;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;if("proxyCache"===o)continue;let r=e[o],l=typeof r;"parent"===o&&"object"===l?t&&(n[o]=t):"source"===o?n[o]=r:Array.isArray(r)?n[o]=r.map((e=>a(e,n))):("object"===l&&null!==r&&(r=a(r)),n[o]=r)}return n}class c{constructor(e={}){this.raws={},this[o]=!1,this[r]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=a(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:o}=this.rangeBy(t);return this.source.input.error(e,{column:o.column,line:o.line},{column:n.column,line:n.line},t)}return new l(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[o]){this[o]=!1;let e=this;for(;e=e.parent;)e[o]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){let o=(t=this.toString()).indexOf(e.word);-1!==o&&(n=this.positionInside(o,t))}return n}positionInside(e,t){let n=t||this.toString(),o=this.source.start.column,r=this.source.start.line;for(let t=0;t<e;t++)"\n"===n[t]?(o=1,r+=1):o+=1;return{column:o,line:r}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let o=this.toString(),r=o.indexOf(e.word);-1!==r&&(t=this.positionInside(r,o),n=this.positionInside(r+e.word.length,o))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return(new i).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let o of e)o===this?n=!0:n?(this.parent.insertAfter(t,o),t=o):this.parent.insertBefore(t,o);n||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let n={},o=null==t;t=t||new Map;let r=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let o=this[e];if(Array.isArray(o))n[e]=o.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof o&&o.toJSON)n[e]=o.toJSON(null,t);else if("source"===e){let l=t.get(o.input);null==l&&(l=r,t.set(o.input,r),r++),n[e]={end:o.end,inputId:l,start:o.start}}else n[e]=o}return o&&(n.inputs=[...t.keys()].map((e=>e.toJSON()))),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=s){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,n){let o={node:this};for(let e in n)o[e]=n[e];return e.warn(t,o)}get proxyOf(){return this}}e.exports=c,c.default=c},4295:(e,t,n)=>{"use strict";let o=n(683),r=n(3937),l=n(5380);function i(e,t){let n=new l(e,t),o=new r(n);try{o.parse()}catch(e){throw e}return o.root}e.exports=i,i.default=i,o.registerParse(i)},3937:(e,t,n)=>{"use strict";let o=n(1516),r=n(2327),l=n(6589),i=n(1326),s=n(9434),a=n(4092);const c={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,n,o,r=new i;r.name=e[1].slice(1),""===r.name&&this.unnamedAtrule(r,e),this.init(r,e[2]);let l=!1,s=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(a.length>0){for(o=a.length-1,n=a[o];n&&"space"===n[0];)n=a[--o];n&&(r.source.end=this.getPosition(n[3]||n[2]),r.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){l=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(r.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(r,"params",a),l&&(e=a[a.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),s&&(r.nodes=[],this.current=r)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,o=0;for(let r=t-1;r>=0&&(n=e[r],"space"===n[0]||(o+=1,2!==o));r--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(e){let t,n,o,r=0;for(let[l,i]of e.entries()){if(t=i,n=t[0],"("===n&&(r+=1),")"===n&&(r-=1),0===r&&":"===n){if(o){if("word"===o[0]&&"progid"===o[1])continue;return l}this.doubleColon(t)}o=t}return!1}comment(e){let t=new l;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=r(this.input)}decl(e,t){let n=new o;this.init(n,e[0][2]);let r,l=e[e.length-1];for(";"===l[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(l[3]||l[2]||function(e){for(let t=e.length-1;t>=0;t--){let n=e[t],o=n[3]||n[2];if(o)return o}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let i,s=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)s.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(r=e[t],"!important"===r[1].toLowerCase()){n.important=!0;let o=this.stringFrom(e,t);o=this.spacesFromEnd(e)+o," !important"!==o&&(n.raws.important=o);break}if("important"===r[1].toLowerCase()){let o=e.slice(0),r="";for(let e=t;e>0;e--){let t=o[e][0];if(0===r.trim().indexOf("!")&&"space"!==t)break;r=o.pop()[1]+r}0===r.trim().indexOf("!")&&(n.important=!0,n.raws.important=r,e=o)}if("space"!==r[0]&&"comment"!==r[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(n.raws.between+=s.map((e=>e[1])).join(""),s=[]),this.raw(n,"value",s.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new a;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,n=null,o=!1,r=null,l=[],i=e[1].startsWith("--"),s=[],a=e;for(;a;){if(n=a[0],s.push(a),"("===n||"["===n)r||(r=a),l.push("("===n?")":"]");else if(i&&o&&"{"===n)r||(r=a),l.push("}");else if(0===l.length){if(";"===n){if(o)return void this.decl(s,i);break}if("{"===n)return void this.rule(s);if("}"===n){this.tokenizer.back(s.pop()),t=!0;break}":"===n&&(o=!0)}else n===l[l.length-1]&&(l.pop(),0===l.length&&(r=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),l.length>0&&this.unclosedBracket(r),t&&o){if(!i)for(;s.length&&(a=s[s.length-1][0],"space"===a||"comment"===a);)this.tokenizer.back(s.pop());this.decl(s,i)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,o){let r,l,i,s,a=n.length,u="",d=!0;for(let e=0;e<a;e+=1)r=n[e],l=r[0],"space"!==l||e!==a-1||o?"comment"===l?(s=n[e-1]?n[e-1][0]:"empty",i=n[e+1]?n[e+1][0]:"empty",c[s]||c[i]||","===u.slice(-1)?d=!1:u+=r[1]):u+=r[1]:d=!1;if(!d){let o=n.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:o,value:u}}e[t]=u}rule(e){e.pop();let t=new a;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let o=t;o<e.length;o++)n+=e[o][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}},4529:(e,t,n)=>{"use strict";let o=n(356),r=n(1516),l=n(448),i=n(683),s=n(9656),a=n(633),c=n(8940),u=n(271),d=n(5776),p=n(6589),m=n(1326),h=n(9055),g=n(5380),f=n(4295),b=n(7374),v=n(4092),k=n(9434),_=n(7490);function y(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new s(e)}y.plugin=function(e,t){let n,o=!1;function r(...n){console&&console.warn&&!o&&(o=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let r=t(...n);return r.postcssPlugin=e,r.postcssVersion=(new s).version,r}return Object.defineProperty(r,"postcss",{get:()=>(n||(n=r()),n)}),r.process=function(e,t,n){return y([r(n)]).process(e,t)},r},y.stringify=a,y.parse=f,y.fromJSON=c,y.list=b,y.comment=e=>new p(e),y.atRule=e=>new m(e),y.decl=e=>new r(e),y.rule=e=>new v(e),y.root=e=>new k(e),y.document=e=>new u(e),y.CssSyntaxError=o,y.Declaration=r,y.Container=i,y.Processor=s,y.Document=u,y.Comment=p,y.Warning=d,y.AtRule=m,y.Result=h,y.Input=g,y.Rule=v,y.Root=k,y.Node=_,l.registerPostcss(y),e.exports=y,y.default=y},5696:(e,t,n)=>{"use strict";let{SourceMapConsumer:o,SourceMapGenerator:r}=n(1866),{existsSync:l,readFileSync:i}=n(9977),{dirname:s,join:a}=n(197);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,o=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new o(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),o=e.indexOf("*/",n);n>-1&&o>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,o)))}loadFile(e){if(this.root=s(e),l(e))return this.mapFile=e,i(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof o)return r.fromSourceMap(t).toString();if(t instanceof r)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=a(s(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=c,c.default=c},9656:(e,t,n)=>{"use strict";let o=n(7661),r=n(448),l=n(271),i=n(9434);class s{constructor(e=[]){this.version="8.4.35",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new r(this,e,t):new o(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=s,s.default=s,i.registerProcessor(s),l.registerProcessor(s)},9055:(e,t,n)=>{"use strict";let o=n(5776);class r{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new o(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}}e.exports=r,r.default=r},9434:(e,t,n)=>{"use strict";let o,r,l=n(683);class i extends l{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let o=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of o)e.raws.before=t.raws.before;return o}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new o(new r,this,e).stringify()}}i.registerLazyResult=e=>{o=e},i.registerProcessor=e=>{r=e},e.exports=i,i.default=i,l.registerRoot(i)},4092:(e,t,n)=>{"use strict";let o=n(683),r=n(7374);class l extends o{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return r.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}e.exports=l,l.default=l,o.registerRule(l)},346:e=>{"use strict";const t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class n{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,o=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:o&&(n+=" "),e.nodes)this.block(e,n+o);else{let r=(e.raws.between||"")+(t?";":"");this.builder(n+o+r,e)}}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let o=e.parent,r=0;for(;o&&"root"!==o.type;)r+=1,o=o.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<r;e++)n+=t}return n}block(e,t){let n,o=this.raw(e,"between","beforeOpen");this.builder(t+o+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let o=0;o<e.nodes.length;o++){let r=e.nodes[o],l=this.raw(r,"before");l&&this.builder(l),this.stringify(r,t!==o||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),o=e.prop+n+this.rawValue(e,"value");e.important&&(o+=e.raws.important||" !important"),t&&(o+=";"),this.builder(o,e)}document(e){this.body(e)}raw(e,n,o){let r;if(o||(o=n),n&&(r=e.raws[n],void 0!==r))return r;let l=e.parent;if("before"===o){if(!l||"root"===l.type&&l.first===e)return"";if(l&&"document"===l.type)return""}if(!l)return t[o];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[o])return i.rawCache[o];if("before"===o||"after"===o)return this.beforeAfter(e,o);{let t="raw"+((s=o)[0].toUpperCase()+s.slice(1));this[t]?r=this[t](i,e):i.walk((e=>{if(r=e.raws[n],void 0!==r)return!1}))}var s;return void 0===r&&(r=t[o]),i.rawCache[o]=r,r}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((n=>{let o=n.parent;if(o&&o!==e&&o.parent&&o.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let n=e[t],o=e.raws[t];return o&&o.value===n?o.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}e.exports=n,n.default=n},633:(e,t,n)=>{"use strict";let o=n(346);function r(e,t){new o(t).stringify(e)}e.exports=r,r.default=r},1381:e=>{"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},2327:e=>{"use strict";const t="'".charCodeAt(0),n='"'.charCodeAt(0),o="\\".charCodeAt(0),r="/".charCodeAt(0),l="\n".charCodeAt(0),i=" ".charCodeAt(0),s="\f".charCodeAt(0),a="\t".charCodeAt(0),c="\r".charCodeAt(0),u="[".charCodeAt(0),d="]".charCodeAt(0),p="(".charCodeAt(0),m=")".charCodeAt(0),h="{".charCodeAt(0),g="}".charCodeAt(0),f=";".charCodeAt(0),b="*".charCodeAt(0),v=":".charCodeAt(0),k="@".charCodeAt(0),_=/[\t\n\f\r "#'()/;[\\\]{}]/g,y=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,E=/.[\r\n"'(/\\]/,w=/[\da-f]/i;e.exports=function(e,S={}){let C,x,B,I,T,M,P,R,N,L,A=e.css.valueOf(),O=S.ignoreErrors,D=A.length,z=0,V=[],F=[];function H(t){throw e.error("Unclosed "+t,z)}return{back:function(e){F.push(e)},endOfFile:function(){return 0===F.length&&z>=D},nextToken:function(e){if(F.length)return F.pop();if(z>=D)return;let S=!!e&&e.ignoreUnclosed;switch(C=A.charCodeAt(z),C){case l:case i:case a:case c:case s:x=z;do{x+=1,C=A.charCodeAt(x)}while(C===i||C===l||C===a||C===c||C===s);L=["space",A.slice(z,x)],z=x-1;break;case u:case d:case h:case g:case v:case f:case m:{let e=String.fromCharCode(C);L=[e,e,z];break}case p:if(R=V.length?V.pop()[1]:"",N=A.charCodeAt(z+1),"url"===R&&N!==t&&N!==n&&N!==i&&N!==l&&N!==a&&N!==s&&N!==c){x=z;do{if(M=!1,x=A.indexOf(")",x+1),-1===x){if(O||S){x=z;break}H("bracket")}for(P=x;A.charCodeAt(P-1)===o;)P-=1,M=!M}while(M);L=["brackets",A.slice(z,x+1),z,x],z=x}else x=A.indexOf(")",z+1),I=A.slice(z,x+1),-1===x||E.test(I)?L=["(","(",z]:(L=["brackets",I,z,x],z=x);break;case t:case n:B=C===t?"'":'"',x=z;do{if(M=!1,x=A.indexOf(B,x+1),-1===x){if(O||S){x=z+1;break}H("string")}for(P=x;A.charCodeAt(P-1)===o;)P-=1,M=!M}while(M);L=["string",A.slice(z,x+1),z,x],z=x;break;case k:_.lastIndex=z+1,_.test(A),x=0===_.lastIndex?A.length-1:_.lastIndex-2,L=["at-word",A.slice(z,x+1),z,x],z=x;break;case o:for(x=z,T=!0;A.charCodeAt(x+1)===o;)x+=1,T=!T;if(C=A.charCodeAt(x+1),T&&C!==r&&C!==i&&C!==l&&C!==a&&C!==c&&C!==s&&(x+=1,w.test(A.charAt(x)))){for(;w.test(A.charAt(x+1));)x+=1;A.charCodeAt(x+1)===i&&(x+=1)}L=["word",A.slice(z,x+1),z,x],z=x;break;default:C===r&&A.charCodeAt(z+1)===b?(x=A.indexOf("*/",z+2)+1,0===x&&(O||S?x=A.length:H("comment")),L=["comment",A.slice(z,x+1),z,x],z=x):(y.lastIndex=z+1,y.test(A),x=0===y.lastIndex?A.length-1:y.lastIndex-2,L=["word",A.slice(z,x+1),z,x],V.push(L),z=x)}return z++,L},position:function(){return z}}}},3122:e=>{"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},5776:e=>{"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},628:(e,t,n)=>{"use strict";var o=n(4067);function r(){}function l(){}l.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,l,i){if(i!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,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:l,resetWarningCache:r};return n.PropTypes=n,n}},5826:(e,t,n)=>{e.exports=n(628)()},4067:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4462:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n};t.__esModule=!0;var s=n(1609),a=n(5826),c=n(4306),u=n(461),d="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return r(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,o=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||o?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),o=(t.onChange,t.style),r=(t.innerRef,t.children),a=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return s.createElement("textarea",l({},a,{onChange:this.onChange,style:u?l({},o,{maxHeight:u}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),r)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:a.number,maxRows:a.number,onResize:a.func,innerRef:a.any,async:a.bool},t}(s.Component);t.TextareaAutosize=s.forwardRef((function(e,t){return s.createElement(p,l({},e,{innerRef:t}))}))},4132:(e,t,n)=>{"use strict";var o=n(4462);t.A=o.TextareaAutosize},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),o=new RegExp(n,"g"),r=new RegExp(n,"");function l(e){return t[e]}var i=function(e){return e.replace(o,l)};e.exports=i,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=i},1609:e=>{"use strict";e.exports=window.React},9746:()=>{},9977:()=>{},197:()=>{},1866:()=>{},2739:()=>{},5042:e=>{e.exports={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let o="",r=n;for(;r--;)o+=e[Math.random()*e.length|0];return o}}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var l=t[o]={exports:{}};return e[o].call(l.exports,l,l.exports,n),l.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{AlignmentControl:()=>Tg,AlignmentToolbar:()=>Mg,Autocomplete:()=>lf,BlockAlignmentControl:()=>es,BlockAlignmentToolbar:()=>ts,BlockBreadcrumb:()=>mf,BlockCanvas:()=>WC,BlockColorsStyleSelector:()=>YC,BlockContextProvider:()=>ff,BlockControls:()=>Bl,BlockEdit:()=>yf,BlockEditorKeyboardShortcuts:()=>D_,BlockEditorProvider:()=>V_,BlockFormatControls:()=>xl,BlockIcon:()=>qh,BlockInspector:()=>XT,BlockList:()=>Xw,BlockMover:()=>bS,BlockNavigationDropdown:()=>Rx,BlockPreview:()=>Ty,BlockSelectionClearer:()=>H_,BlockSettingsMenu:()=>yC,BlockSettingsMenuControls:()=>jh,BlockStyles:()=>Ax,BlockTitle:()=>pf,BlockToolbar:()=>zC,BlockTools:()=>$C,BlockVerticalAlignmentControl:()=>pi,BlockVerticalAlignmentToolbar:()=>mi,ButtonBlockAppender:()=>uw,ButtonBlockerAppender:()=>cw,ColorPalette:()=>aB,ColorPaletteControl:()=>cB,ContrastChecker:()=>pd,CopyHandler:()=>JT,DefaultBlockAppender:()=>sw,FontSizePicker:()=>kg,HeadingLevelDropdown:()=>Fx,HeightControl:()=>Kp,InnerBlocks:()=>Gw,Inserter:()=>lw,InspectorAdvancedControls:()=>xs,InspectorControls:()=>Bs,JustifyContentControl:()=>fi,JustifyToolbar:()=>bi,LineHeightControl:()=>Vd,MediaPlaceholder:()=>cI,MediaReplaceFlow:()=>ec,MediaUpload:()=>Gs,MediaUploadCheck:()=>Us,MultiSelectScrollIntoView:()=>nM,NavigableToolbar:()=>NC,ObserveTyping:()=>Ww,PanelColorSettings:()=>uI,PlainText:()=>YI,RecursionProvider:()=>cM,ReusableBlocksRenameHint:()=>CM,RichText:()=>KI,RichTextShortcut:()=>JI,RichTextToolbarButton:()=>eT,SETTINGS_DEFAULTS:()=>I,SkipToSelectedBlock:()=>bT,ToolSelector:()=>oT,Typewriter:()=>sM,URLInput:()=>ta,URLInputButton:()=>sT,URLPopover:()=>lI,Warning:()=>wf,WritingFlow:()=>sy,__experimentalBlockAlignmentMatrixControl:()=>uf,__experimentalBlockFullHeightAligmentControl:()=>af,__experimentalBlockPatternSetup:()=>nB,__experimentalBlockPatternsList:()=>rE,__experimentalBlockVariationPicker:()=>Gx,__experimentalBlockVariationTransforms:()=>iB,__experimentalBorderRadiusControl:()=>cu,__experimentalColorGradientControl:()=>Xu,__experimentalColorGradientSettingsDropdown:()=>bB,__experimentalDateFormatPicker:()=>pB,__experimentalDuotoneControl:()=>Fm,__experimentalFontAppearanceControl:()=>Dd,__experimentalFontFamilyControl:()=>Nd,__experimentalGetBorderClassesAndStyles:()=>rg,__experimentalGetColorClassesAndStyles:()=>sg,__experimentalGetElementClassName:()=>BM,__experimentalGetGapCSSValue:()=>oi,__experimentalGetGradientClass:()=>Gu,__experimentalGetGradientObjectByGradientValue:()=>$u,__experimentalGetShadowClassesAndStyles:()=>ig,__experimentalGetSpacingClassesAndStyles:()=>cg,__experimentalImageEditor:()=>QB,__experimentalImageSizeControl:()=>tI,__experimentalImageURLInputUI:()=>hT,__experimentalInspectorPopoverHeader:()=>hM,__experimentalLetterSpacingControl:()=>Fd,__experimentalLibrary:()=>tM,__experimentalLinkControl:()=>Xa,__experimentalLinkControlSearchInput:()=>Ra,__experimentalLinkControlSearchItem:()=>ba,__experimentalLinkControlSearchResults:()=>Sa,__experimentalListView:()=>Mx,__experimentalPanelColorGradientSettings:()=>yB,__experimentalPreviewOptions:()=>gT,__experimentalPublishDateTimePicker:()=>gM,__experimentalRecursionProvider:()=>dM,__experimentalResponsiveBlockControl:()=>QI,__experimentalSpacingSizesControl:()=>jp,__experimentalTextDecorationControl:()=>Yd,__experimentalTextTransformControl:()=>Wd,__experimentalUnitControl:()=>rT,__experimentalUseBlockOverlayActive:()=>hf,__experimentalUseBlockPreview:()=>My,__experimentalUseBorderProps:()=>lg,__experimentalUseColorProps:()=>ag,__experimentalUseCustomSides:()=>Bm,__experimentalUseGradient:()=>Wu,__experimentalUseHasRecursion:()=>pM,__experimentalUseMultipleOriginColorsAndGradients:()=>qc,__experimentalUseResizeCanvas:()=>fT,__experimentalWritingModeControl:()=>ep,__unstableBlockNameContext:()=>TC,__unstableBlockSettingsMenuFirstItem:()=>gC,__unstableBlockToolbarLastItem:()=>QS,__unstableEditorStyles:()=>wy,__unstableIframe:()=>py,__unstableInserterMenuExtension:()=>WE,__unstableRichTextInputEvent:()=>tT,__unstableUseBlockSelectionClearer:()=>F_,__unstableUseClipboardHandler:()=>QT,__unstableUseMouseMoveTypingReset:()=>$w,__unstableUseTypewriter:()=>iM,__unstableUseTypingObserver:()=>jw,createCustomColorsHOC:()=>bg,getColorClassName:()=>Zc,getColorObjectByAttributeValues:()=>Wc,getColorObjectByColorValue:()=>Kc,getComputedFluidTypographyValue:()=>Ur,getCustomValueFromPreset:()=>Ql,getFontSize:()=>Ep,getFontSizeClass:()=>Sp,getFontSizeObjectByValue:()=>wp,getGradientSlugByValue:()=>ju,getGradientValueBySlug:()=>Uu,getPxFromCssUnit:()=>IM,getSpacingPresetCssVar:()=>ei,getTypographyClassesAndStyles:()=>ug,isValueSpacingPreset:()=>Xl,privateApis:()=>HR,store:()=>Nr,storeConfig:()=>Rr,transformStyles:()=>yy,useBlockCommands:()=>wM,useBlockDisplayInformation:()=>ih,useBlockEditContext:()=>y,useBlockEditingMode:()=>ns,useBlockProps:()=>y_,useCachedTruthy:()=>dg,useHasRecursion:()=>uM,useInnerBlocksProps:()=>Hw,useSetting:()=>Or,useSettings:()=>Ar,withColorContext:()=>sB,withColors:()=>vg,withFontSizes:()=>Eg});var e={};n.r(e),n.d(e,{__experimentalGetActiveBlockIdByBlockNames:()=>dn,__experimentalGetAllowedBlocks:()=>Ht,__experimentalGetAllowedPatterns:()=>Wt,__experimentalGetBlockListSettingsForBlocks:()=>Jt,__experimentalGetDirectInsertBlock:()=>Ut,__experimentalGetGlobalBlocksByName:()=>ye,__experimentalGetLastBlockAttributeChanges:()=>nn,__experimentalGetParsedPattern:()=>$t,__experimentalGetPatternTransformItems:()=>qt,__experimentalGetPatternsByBlockTypes:()=>Zt,__experimentalGetReusableBlockTitle:()=>en,__unstableGetBlockWithoutInnerBlocks:()=>me,__unstableGetClientIdWithClientIdsTree:()=>ge,__unstableGetClientIdsTree:()=>fe,__unstableGetContentLockingParent:()=>gn,__unstableGetEditorMode:()=>ln,__unstableGetSelectedBlocksWithPartialSelection:()=>nt,__unstableGetTemporarilyEditingAsBlocks:()=>fn,__unstableGetTemporarilyEditingFocusModeToRevert:()=>bn,__unstableGetVisibleBlocks:()=>hn,__unstableHasActiveBlockOverlayActive:()=>vn,__unstableIsFullySelected:()=>Qe,__unstableIsLastBlockChangeIgnored:()=>tn,__unstableIsSelectionCollapsed:()=>Je,__unstableIsSelectionMergeable:()=>tt,__unstableIsWithinBlockOverlay:()=>kn,__unstableSelectionHasUnmergeableBlock:()=>et,areInnerBlocksControlled:()=>un,canEditBlock:()=>Pt,canInsertBlockType:()=>Ct,canInsertBlocks:()=>xt,canLockBlockType:()=>Rt,canMoveBlock:()=>Tt,canMoveBlocks:()=>Mt,canRemoveBlock:()=>Bt,canRemoveBlocks:()=>It,didAutomaticChange:()=>an,getAdjacentBlockClientId:()=>ze,getAllowedBlocks:()=>Ft,getBlock:()=>pe,getBlockAttributes:()=>de,getBlockCount:()=>Se,getBlockEditingMode:()=>_n,getBlockHierarchyRootClientId:()=>Oe,getBlockIndex:()=>rt,getBlockInsertionPoint:()=>kt,getBlockListSettings:()=>Yt,getBlockMode:()=>pt,getBlockName:()=>ce,getBlockNamesByClientId:()=>we,getBlockOrder:()=>ot,getBlockParents:()=>Le,getBlockParentsByBlockName:()=>Ae,getBlockRootClientId:()=>Ne,getBlockSelectionEnd:()=>Ie,getBlockSelectionStart:()=>Be,getBlockTransformItems:()=>zt,getBlocks:()=>he,getBlocksByClientId:()=>Ee,getBlocksByName:()=>_e,getClientIdsOfDescendants:()=>be,getClientIdsWithDescendants:()=>ve,getDirectInsertBlock:()=>Gt,getDraggedBlockClientIds:()=>gt,getFirstMultiSelectedBlockClientId:()=>je,getGlobalBlockCount:()=>ke,getInserterItems:()=>Dt,getLastMultiSelectedBlockClientId:()=>We,getLowestCommonAncestorWithSelectedBlock:()=>De,getMultiSelectedBlockClientIds:()=>Ue,getMultiSelectedBlocks:()=>$e,getMultiSelectedBlocksEndClientId:()=>Xe,getMultiSelectedBlocksStartClientId:()=>Ye,getNextBlockClientId:()=>Fe,getPatternsByBlockTypes:()=>Kt,getPreviousBlockClientId:()=>Ve,getSelectedBlock:()=>Re,getSelectedBlockClientId:()=>Pe,getSelectedBlockClientIds:()=>Ge,getSelectedBlockCount:()=>Te,getSelectedBlocksInitialCaretPosition:()=>He,getSelectionEnd:()=>xe,getSelectionStart:()=>Ce,getSettings:()=>Xt,getTemplate:()=>Et,getTemplateLock:()=>wt,hasBlockMovingClientId:()=>sn,hasDraggedInnerBlock:()=>st,hasInserterItems:()=>Vt,hasMultiSelection:()=>ct,hasSelectedBlock:()=>Me,hasSelectedInnerBlock:()=>it,isAncestorBeingDragged:()=>bt,isAncestorMultiSelected:()=>qe,isBlockBeingDragged:()=>ft,isBlockHighlighted:()=>cn,isBlockInsertionPointVisible:()=>_t,isBlockMultiSelected:()=>Ze,isBlockSelected:()=>lt,isBlockValid:()=>ue,isBlockVisible:()=>mn,isBlockWithinSelection:()=>at,isCaretWithinFormattedText:()=>vt,isDraggingBlocks:()=>ht,isFirstMultiSelectedBlock:()=>Ke,isGroupable:()=>En,isLastBlockChangePersistent:()=>Qt,isMultiSelecting:()=>ut,isNavigationMode:()=>rn,isSelectionEnabled:()=>dt,isTyping:()=>mt,isUngroupable:()=>yn,isValidTemplate:()=>yt,wasBlockJustInserted:()=>pn});var t={};n.r(t),n.d(t,{__experimentalUpdateSettings:()=>Cn,clearBlockRemovalPrompt:()=>Mn,deleteStyleOverride:()=>Ln,ensureDefaultBlock:()=>Tn,hideBlockInterface:()=>xn,privateRemoveBlocks:()=>In,setBlockRemovalRules:()=>Pn,setLastFocus:()=>On,setOpenedBlockSettingsMenu:()=>Rn,setStyleOverride:()=>Nn,showBlockInterface:()=>Bn,startDragging:()=>zn,stopDragging:()=>Vn,stopEditingAsBlocks:()=>Dn,syncDerivedUpdates:()=>An});var r={};n.r(r),n.d(r,{getAllPatterns:()=>go,getBlockRemovalRules:()=>ao,getBlockSettings:()=>eo,getBlockWithoutAttributes:()=>oo,getEnabledBlockParents:()=>io,getEnabledClientIdsTree:()=>lo,getInserterMediaCategories:()=>mo,getLastFocus:()=>fo,getLastInsertedBlocksClientIds:()=>no,getOpenedBlockSettingsMenu:()=>co,getRegisteredInserterMediaCategories:()=>po,getRemovalPromptData:()=>so,getStyleOverrides:()=>uo,hasAllowedPatterns:()=>ho,isBlockInterfaceHidden:()=>to,isBlockSubtreeDisabled:()=>ro,isDragging:()=>bo});var l={};n.r(l),n.d(l,{__unstableDeleteSelection:()=>Yo,__unstableExpandSelection:()=>Qo,__unstableMarkAutomaticChange:()=>br,__unstableMarkLastChangeAsPersistent:()=>gr,__unstableMarkNextChangeAsNotPersistent:()=>fr,__unstableSaveReusableBlock:()=>hr,__unstableSetEditorMode:()=>kr,__unstableSetTemporarilyEditingAsBlocks:()=>Ir,__unstableSplitSelection:()=>Xo,clearSelectedBlock:()=>Lo,duplicateBlocks:()=>yr,enterFormattedText:()=>ar,exitFormattedText:()=>cr,flashBlock:()=>Cr,hideInsertionPoint:()=>Ko,insertAfterBlock:()=>wr,insertBeforeBlock:()=>Er,insertBlock:()=>$o,insertBlocks:()=>jo,insertDefaultBlock:()=>dr,mergeBlocks:()=>Jo,moveBlockToPosition:()=>Uo,moveBlocksDown:()=>Fo,moveBlocksToPosition:()=>Go,moveBlocksUp:()=>Ho,multiSelect:()=>No,receiveBlocks:()=>Co,registerInserterMediaCategory:()=>Tr,removeBlock:()=>tr,removeBlocks:()=>er,replaceBlock:()=>zo,replaceBlocks:()=>Do,replaceInnerBlocks:()=>nr,resetBlocks:()=>Eo,resetSelection:()=>So,selectBlock:()=>Io,selectNextBlock:()=>Mo,selectPreviousBlock:()=>To,selectionChange:()=>ur,setBlockEditingMode:()=>Mr,setBlockMovingClientId:()=>_r,setBlockVisibility:()=>Br,setHasControlledInnerBlocks:()=>xr,setNavigationMode:()=>vr,setTemplateValidity:()=>Zo,showInsertionPoint:()=>Wo,startDraggingBlocks:()=>ir,startMultiSelect:()=>Po,startTyping:()=>rr,stopDraggingBlocks:()=>sr,stopMultiSelect:()=>Ro,stopTyping:()=>lr,synchronizeTemplate:()=>qo,toggleBlockHighlight:()=>Sr,toggleBlockMode:()=>or,toggleSelection:()=>Ao,unsetBlockEditingMode:()=>Pr,updateBlock:()=>Bo,updateBlockAttributes:()=>xo,updateBlockListSettings:()=>pr,updateSettings:()=>mr,validateBlocksToTemplate:()=>wo});var i={};n.r(i),n.d(i,{AdvancedPanel:()=>KM,BorderPanel:()=>Bu,ColorPanel:()=>dd,DimensionsPanel:()=>mm,FiltersPanel:()=>Jm,GlobalStylesContext:()=>ol,ImageSettingsPanel:()=>WM,TypographyPanel:()=>gp,areGlobalStyleConfigsEqual:()=>nl,getBlockCSSSelector:()=>$m,getGlobalStylesChanges:()=>tP,getLayoutStyles:()=>LM,useGlobalSetting:()=>sl,useGlobalStyle:()=>al,useGlobalStylesOutput:()=>$M,useGlobalStylesOutputWithConfig:()=>UM,useGlobalStylesReset:()=>il,useHasBorderPanel:()=>vu,useHasBorderPanelControls:()=>ku,useHasColorPanel:()=>Qu,useHasDimensionsPanel:()=>em,useHasFiltersPanel:()=>Km,useHasImageSettingsPanel:()=>jM,useHasTypographyPanel:()=>op,useSettingsForBlockElement:()=>cl});var s=n(1609),a=n.n(s);const c=window.wp.blocks,u=window.wp.element,d=window.wp.data,p=window.wp.compose,m=window.wp.hooks,h=Symbol("mayDisplayControls"),g=Symbol("mayDisplayParentControls"),f=Symbol("blockEditingMode"),b=Symbol("blockBindings"),v={name:"",isSelected:!1},k=(0,u.createContext)(v),{Provider:_}=k;function y(){return(0,u.useContext)(k)}const E=window.wp.deprecated;var w=n.n(E),S=n(7734),C=n.n(S);const x=window.wp.i18n,B={insertUsage:{}},I={alignWide:!1,supportsLayout:!0,colors:[{name:(0,x.__)("Black"),slug:"black",color:"#000000"},{name:(0,x.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,x.__)("White"),slug:"white",color:"#ffffff"},{name:(0,x.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,x.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,x.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,x.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,x.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,x.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,x.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,x.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,x.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,x._x)("Small","font size name"),size:13,slug:"small"},{name:(0,x._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,x._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,x._x)("Large","font size name"),size:36,slug:"large"},{name:(0,x._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,x.__)("Thumbnail")},{slug:"medium",name:(0,x.__)("Medium")},{slug:"large",name:(0,x.__)("Large")},{slug:"full",name:(0,x.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,enableOpenverseMediaCategory:!0,clearBlockSelection:!0,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__unstableGalleryWithImageBlocks:!1,__unstableIsPreviewMode:!1,blockInspectorAnimation:{animationParent:"core/navigation","core/navigation":{enterDirection:"leftToRight"},"core/navigation-submenu":{enterDirection:"rightToLeft"},"core/navigation-link":{enterDirection:"rightToLeft"},"core/search":{enterDirection:"rightToLeft"},"core/social-links":{enterDirection:"rightToLeft"},"core/page-list":{enterDirection:"rightToLeft"},"core/spacer":{enterDirection:"rightToLeft"},"core/home-link":{enterDirection:"rightToLeft"},"core/site-title":{enterDirection:"rightToLeft"},"core/site-logo":{enterDirection:"rightToLeft"}},generateAnchors:!1,gradients:[{name:(0,x.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,x.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,x.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,x.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,x.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,x.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,x.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,x.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,x.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,x.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,x.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,x.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function T(e,t,n){return[...e.slice(0,n),...Array.isArray(t)?t:[t],...e.slice(n)]}function M(e,t,n,o=1){const r=[...e];return r.splice(t,o),T(r,e.slice(t,t+o),n)}const P=e=>e;function R(e,t=""){const n=new Map,o=[];return n.set(t,o),e.forEach((e=>{const{clientId:t,innerBlocks:r}=e;o.push(t),R(r,t).forEach(((e,t)=>{n.set(t,e)}))})),n}function N(e,t=""){const n=[],o=[[t,e]];for(;o.length;){const[e,t]=o.shift();t.forEach((({innerBlocks:t,...r})=>{n.push([r.clientId,e]),t?.length&&o.push([r.clientId,t])}))}return n}function L(e,t=P){const n=[],o=[...e];for(;o.length;){const{innerBlocks:e,...r}=o.shift();o.push(...e),n.push([r.clientId,t(r)])}return n}function A(e){return L(e,(e=>{const{attributes:t,...n}=e;return n}))}function O(e){return L(e,(e=>e.attributes))}function D(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&C()(e.clientIds,t.clientIds)&&function(e,t){return C()(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function z(e,t){const n=e.tree,o=[...t],r=[...t];for(;o.length;){const e=o.shift();o.push(...e.innerBlocks),r.push(...e.innerBlocks)}for(const e of r)n.set(e.clientId,{});for(const t of r)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 V(e,t,n=!1){const o=e.tree,r=new Set([]),l=new Set;for(const o of t){let t=n?o:e.parents.get(o);do{if(e.controlledInnerBlocks[t]){l.add(t);break}r.add(t),t=e.parents.get(t)}while(void 0!==t)}for(const e of r)o.set(e,{...o.get(e)});for(const t of r)o.get(t).innerBlocks=(e.order.get(t)||[]).map((e=>o.get(e)));for(const t of l)o.set("controlled||"+t,{innerBlocks:(e.order.get(t)||[]).map((e=>o.get(e)))})}const F=(0,p.pipe)(d.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:o}=n;if(e===o)return t;(t={...t}).attributes=new Map(t.attributes),t.attributes.forEach(((n,r)=>{const{name:l}=t.byClientId.get(r);"core/block"===l&&n.ref===e&&t.attributes.set(r,{...n,ref:o})}))}return e(t,n)}),(e=>(t={},n)=>{const o=e(t,n);if(o===t)return t;switch(o.tree=t.tree?t.tree:new Map,n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":o.tree=new Map(o.tree),z(o,n.blocks),V(o,n.rootClientId?[n.rootClientId]:[""],!0);break;case"UPDATE_BLOCK":o.tree=new Map(o.tree),o.tree.set(n.clientId,{...o.tree.get(n.clientId),...o.byClientId.get(n.clientId),attributes:o.attributes.get(n.clientId)}),V(o,[n.clientId],!1);break;case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":o.tree=new Map(o.tree),n.clientIds.forEach((e=>{o.tree.set(e,{...o.tree.get(e),attributes:o.attributes.get(e)})})),V(o,n.clientIds,!1);break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=function(e){const t={},n=[...e];for(;n.length;){const{innerBlocks:e,...o}=n.shift();n.push(...e),t[o.clientId]=!0}return t}(n.blocks);o.tree=new Map(o.tree),n.replacedClientIds.concat(n.replacedClientIds.filter((t=>!e[t])).map((e=>"controlled||"+e))).forEach((e=>{o.tree.delete(e)})),z(o,n.blocks),V(o,n.blocks.map((e=>e.clientId)),!1);const r=[];for(const e of n.clientIds)void 0===t.parents.get(e)||""!==t.parents.get(e)&&!o.byClientId.get(t.parents.get(e))||r.push(t.parents.get(e));V(o,r,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const r of n.clientIds)void 0===t.parents.get(r)||""!==t.parents.get(r)&&!o.byClientId.get(t.parents.get(r))||e.push(t.parents.get(r));o.tree=new Map(o.tree),n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e))).forEach((e=>{o.tree.delete(e)})),V(o,e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId?e.push(n.fromRootClientId):e.push(""),n.toRootClientId&&e.push(n.toRootClientId),o.tree=new Map(o.tree),V(o,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=new Map(o.tree),V(o,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=[];o.attributes.forEach(((t,r)=>{"core/block"===o.byClientId.get(r).name&&t.ref===n.updatedId&&e.push(r)})),o.tree=new Map(o.tree),e.forEach((e=>{o.tree.set(e,{...o.byClientId.get(e),attributes:o.attributes.get(e),innerBlocks:o.tree.get(e).innerBlocks})})),V(o,e,!1)}}return o}),(e=>(t,n)=>{const o=e=>{let o=e;for(let r=0;r<o.length;r++)!t.order.get(o[r])||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[o[r]]||(o===e&&(o=[...o]),o.push(...t.order.get(o[r])));return o};if(t)switch(n.type){case"REMOVE_BLOCKS":n={...n,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:o(n.clientIds)};break;case"REPLACE_BLOCKS":n={...n,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:o(n.clientIds)}}return e(t,n)}),(e=>(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const o={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...r}=e.shift();e.push(...n),t.controlledInnerBlocks[r.clientId]&&(o[r.clientId]=!0)}}let r=t;t.order.get(n.rootClientId)&&(r=e(r,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order.get(n.rootClientId)}));let l=r;if(n.blocks.length){l=e(l,{...n,type:"INSERT_BLOCKS",index:0});const r=new Map(l.order);Object.keys(o).forEach((e=>{t.order.get(e)&&r.set(e,t.order.get(e))})),l.order=r,l.tree=new Map(l.tree),Object.keys(o).forEach((e=>{const n=`controlled||${e}`;t.tree.has(n)&&l.tree.set(n,t.tree.get(n))}))}return l}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:new Map(A(n.blocks)),attributes:new Map(O(n.blocks)),order:R(n.blocks),parents:new Map(N(n.blocks)),controlledInnerBlocks:{}};return e.tree=new Map(t?.tree),z(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,o=!1;return(r,l)=>{let i,s=e(r,l);var a;"SET_EXPLICIT_PERSISTENT"===l.type&&(n=l.isPersistentChange,i=null===(a=r.isPersistentChange)||void 0===a||a);if(void 0!==n)return i=n,i===s.isPersistentChange?s:{...s,isPersistentChange:i};const c="MARK_LAST_CHANGE_AS_PERSISTENT"===l.type||o;var u;return r!==s||c?(s={...s,isPersistentChange:c?!o:!D(l,t)},t=l,o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===l.type,s):(o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===l.type,i=null===(u=r?.isPersistentChange)||void 0===u||u,r.isPersistentChange===i?r:{...s,isPersistentChange:i})}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,o)=>{const r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const o=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(o,n)}return e(t,n)}))({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return A(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"UPDATE_BLOCK":{if(!e.has(t.clientId))return e;const{attributes:n,...o}=t.updates;if(0===Object.values(o).length)return e;const r=new Map(e);return r.set(t.clientId,{...e.get(t.clientId),...o}),r}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),A(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},attributes(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return O(t.blocks).forEach((([e,t])=>{n.set(e,t)})),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"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e.get(t))))return e;let o=!1;const r=new Map(e);for(const l of t.clientIds){var n;const i=Object.entries(t.uniqueByBlock?t.attributes[l]:null!==(n=t.attributes)&&void 0!==n?n:{});if(0===i.length)continue;let s=!1;const a=e.get(l),c={};i.forEach((([e,t])=>{a[e]!==t&&(s=!0,c[e]=t)})),o=o||s,s&&r.set(l,{...a,...c})}return o?r: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)})),O(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},order(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{var n;const o=R(t.blocks),r=new Map(e);return o.forEach(((e,t)=>{""!==t&&r.set(t,e)})),r.set("",(null!==(n=e.get(""))&&void 0!==n?n:[]).concat(o[""])),r}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e.get(n)||[],r=R(t.blocks,n),{index:l=o.length}=t,i=new Map(e);return r.forEach(((e,t)=>{i.set(t,e)})),i.set(n,T(o,r.get(n),l)),i}case"MOVE_BLOCKS_TO_POSITION":{var o;const{fromRootClientId:n="",toRootClientId:r="",clientIds:l}=t,{index:i=e.get(r).length}=t;if(n===r){const t=e.get(r).indexOf(l[0]),n=new Map(e);return n.set(r,M(e.get(r),t,i,l.length)),n}const s=new Map(e);return s.set(n,null!==(o=e.get(n)?.filter((e=>!l.includes(e))))&&void 0!==o?o:[]),s.set(r,T(e.get(r),l,i)),s}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],l=e.get(o);if(!l.length||r===l[0])return e;const i=l.indexOf(r),s=new Map(e);return s.set(o,M(l,i,i-1,n.length)),s}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],l=n[n.length-1],i=e.get(o);if(!i.length||l===i[i.length-1])return e;const s=i.indexOf(r),a=new Map(e);return a.set(o,M(i,s,s+1,n.length)),a}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=R(t.blocks),r=new Map(e);return t.replacedClientIds.forEach((e=>{r.delete(e)})),o.forEach(((e,t)=>{""!==t&&r.set(t,e)})),r.forEach(((e,t)=>{const l=Object.values(e).reduce(((e,t)=>t===n[0]?[...e,...o.get("")]:(-1===n.indexOf(t)&&e.push(t),e)),[]);r.set(t,l)})),r}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n.forEach(((e,o)=>{var r;const l=null!==(r=e?.filter((e=>!t.removedClientIds.includes(e))))&&void 0!==r?r:[];l.length!==e.length&&n.set(o,l)})),n}}return e},parents(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{const n=new Map(e);return N(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"INSERT_BLOCKS":{const n=new Map(e);return N(t.blocks,t.rootClientId||"").forEach((([e,t])=>{n.set(e,t)})),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)})),N(t.blocks,e.get(t.clientIds[0])).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},controlledInnerBlocks:(e={},{type:t,clientId:n,hasControlledInnerBlocks:o})=>"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e});function H(e={},t){switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}const G=(0,d.combineReducers)({blocks:F,isDragging:function(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e},isTyping:function(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isBlockInterfaceHidden:function(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e},draggedBlocks:function(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(e={},t){switch(t.type){case"SELECTION_CHANGE":return t.clientId?{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}}:{selectionStart:t.start||e.selectionStart,selectionEnd:t.end||e.selectionEnd};case"RESET_SELECTION":const{selectionStart:n,selectionEnd:o}=t;return{selectionStart:n,selectionEnd:o};case"MULTI_SELECT":const{start:r,end:l}=t;return r===e.selectionStart?.clientId&&l===e.selectionEnd?.clientId?e:{selectionStart:{clientId:r},selectionEnd:{clientId:l}};case"RESET_BLOCKS":const i=e?.selectionStart?.clientId,s=e?.selectionEnd?.clientId;if(!i&&!s)return e;if(!t.blocks.some((e=>e.clientId===i)))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some((e=>e.clientId===s)))return{...e,selectionEnd:e.selectionStart}}const n=H(e.selectionStart,t),o=H(e.selectionEnd,t);return n===e.selectionStart&&o===e.selectionEnd?e:{selectionStart:n,selectionEnd:o}},isMultiSelecting:function(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(e=!0,t){return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(e=null,t){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(e={},t){if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter((([e])=>!t.clientIds.includes(e))));case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;if(!t.settings){if(e.hasOwnProperty(n)){const{[n]:t,...o}=e;return o}return e}return C()(e[n],t.settings)?e:{...e,[n]:t.settings}}}return e},insertionPoint:function(e=null,t){switch(t.type){case"SHOW_INSERTION_POINT":{const{rootClientId:n,index:o,__unstableWithInserter:r,operation:l,nearestSide:i}=t,s={rootClientId:n,index:o,__unstableWithInserter:r,operation:l,nearestSide:i};return C()(e,s)?e:s}case"HIDE_INSERTION_POINT":return null}return e},template:function(e={isValid:!0},t){return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(e=I,t){return"UPDATE_SETTINGS"===t.type?t.reset?{...I,...t.settings}:{...e,...t.settings}:e},preferences:function(e=B,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:o,name:r}=n;let l=r;const i=(0,d.select)(c.store).getActiveBlockVariation(r,o);return i?.name&&(l+="/"+i.name),"core/block"===r&&(l+="/"+o.ref),{...e,insertUsage:{...e.insertUsage,[l]:{time:t.time,count:e.insertUsage[l]?e.insertUsage[l].count+1:1}}}}),e)}return e},lastBlockAttributesChange:function(e=null,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce(((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return e},lastFocus:function(e=!1,t){return"LAST_FOCUS"===t.type?t.lastFocus:e},editorMode:function(e="edit",t){return"INSERT_BLOCKS"===t.type&&"navigation"===e?"edit":"SET_EDITOR_MODE"===t.type?t.mode:e},hasBlockMovingClientId:function(e=null,t){return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_EDITOR_MODE"===t.type?null:e},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(e={},t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":if(!t.blocks.length)return e;const n=t.blocks.map((e=>e.clientId)),o=t.meta?.source;return{clientIds:n,source:o};case"RESET_BLOCKS":return{}}return e},temporarilyEditingAsBlocks:function(e="",t){return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e},temporarilyEditingFocusModeRevert:function(e="",t){return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.focusModeToRevert:e},blockVisibility:function(e={},t){return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e},blockEditingModes:function(e=new Map,t){switch(t.type){case"SET_BLOCK_EDITING_MODE":return new Map(e).set(t.clientId,t.mode);case"UNSET_BLOCK_EDITING_MODE":{const n=new Map(e);return n.delete(t.clientId),n}case"RESET_BLOCKS":return e.has("")?(new Map).set("",e.get("")):e}return e},styleOverrides:function(e=new Map,t){switch(t.type){case"SET_STYLE_OVERRIDE":return new Map(e).set(t.id,t.style);case"DELETE_STYLE_OVERRIDE":{const n=new Map(e);return n.delete(t.id),n}}return e},removalPromptData:function(e=!1,t){switch(t.type){case"DISPLAY_BLOCK_REMOVAL_PROMPT":const{clientIds:e,selectPrevious:n,blockNamesForPrompt:o,messageType:r}=t;return{clientIds:e,selectPrevious:n,blockNamesForPrompt:o,messageType:r};case"CLEAR_BLOCK_REMOVAL_PROMPT":return!1}return e},blockRemovalRules:function(e=!1,t){return"SET_BLOCK_REMOVAL_RULES"===t.type?t.rules:e},openedBlockSettingsMenu:function(e=null,t){var n;return"SET_OPENED_BLOCK_SETTINGS_MENU"===t.type?null!==(n=t?.clientId)&&void 0!==n?n:null:e},registeredInserterMediaCategories:function(e=[],t){return"REGISTER_INSERTER_MEDIA_CATEGORY"===t.type?[...e,t.category]:e}});const U=function(e){return(t,n)=>{const o=e(t,n);return t?(o.automaticChangeStatus=t.automaticChangeStatus,"MARK_AUTOMATIC_CHANGE"===n.type?{...o,automaticChangeStatus:"pending"}:"MARK_AUTOMATIC_CHANGE_FINAL"===n.type&&"pending"===t.automaticChangeStatus?{...o,automaticChangeStatus:"final"}:o.blocks===t.blocks&&o.selection===t.selection||"final"!==o.automaticChangeStatus&&o.selection!==t.selection?o:{...o,automaticChangeStatus:void 0}):o}}(G);var $={};function j(e){return[e]}function W(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}function K(e,t){var n,o=t||j;function r(){n=new WeakMap}function l(){var t,r,l,i,s,a=arguments.length;for(i=new Array(a),l=0;l<a;l++)i[l]=arguments[l];for(t=function(e){var t,o,r,l,i,s=n,a=!0;for(t=0;t<e.length;t++){if(!(i=o=e[t])||"object"!=typeof i){a=!1;break}s.has(o)?s=s.get(o):(r=new WeakMap,s.set(o,r),s=r)}return s.has($)||((l=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=a,s.set($,l)),s.get($)}(s=o.apply(null,i)),t.isUniqueByDependants||(t.lastDependants&&!W(s,t.lastDependants,0)&&t.clear(),t.lastDependants=s),r=t.head;r;){if(W(r.args,i,1))return r!==t.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=t.head,r.prev=null,t.head.prev=r,t.head=r),r.val;r=r.next}return r={val:e.apply(null,i)},i[0]=null,r.args=i,t.head&&(t.head.prev=r,r.next=t.head),t.head=r,r.val}return l.getDependants=o,l.clear=r,r(),l}const Z=window.wp.primitives,q=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})),Y=window.wp.richText,X=Symbol("selectBlockPatternsKey"),Q=(e,t,n=null)=>"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n,J=(e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){const e=n.shift();if(!Q(t,e.name||e.blockName,!0))return!1;e.innerBlocks?.forEach((e=>{n.push(e)}))}return!0},ee=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[X]?.(e),t.blockPatterns],te=(e,t,n)=>(o,r)=>{let l,i;if("function"==typeof e?(l=e(o),i=e(r)):(l=o[e],i=r[e]),l>i)return"asc"===n?1:-1;if(i>l)return"asc"===n?-1:1;const s=t.findIndex((e=>e===o)),a=t.findIndex((e=>e===r));return s>a?1:a>s?-1:0};function ne(e,t,n="asc"){return e.concat().sort(te(t,e,n))}const oe="core/block-editor",re=window.wp.privateApis,{lock:le,unlock:ie}=(0,re.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/block-editor"),se=[],ae=new Set;function ce(e,t){const n=e.blocks.byClientId.get(t),o="core/social-link";if("web"!==u.Platform.OS&&n?.name===o){const n=e.blocks.attributes.get(t),{service:r}=null!=n?n:{};return r?`${o}-${r}`:o}return n?n.name:null}function ue(e,t){const n=e.blocks.byClientId.get(t);return!!n&&n.isValid}function de(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function pe(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}const me=K(((e,t)=>{const n=e.blocks.byClientId.get(t);return n?{...n,attributes:de(e,t)}:null}),((e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]));function he(e,t){const n=t&&un(e,t)?"controlled||"+t:t||"";return e.blocks.tree.get(n)?.innerBlocks||se}const ge=K(((e,t)=>(w()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:fe(e,t)})),(e=>[e.blocks.order])),fe=K(((e,t="")=>(w()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),ot(e,t).map((t=>ge(e,t))))),(e=>[e.blocks.order])),be=K(((e,t)=>{t=Array.isArray(t)?[...t]:[t];const n=[];for(const o of t){const t=e.blocks.order.get(o);t&&n.push(...t)}let o=0;for(;o<n.length;){const t=n[o],r=e.blocks.order.get(t);r&&n.splice(o+1,0,...r),o++}return n}),(e=>[e.blocks.order])),ve=e=>be(e,""),ke=K(((e,t)=>{const n=ve(e);if(!t)return n.length;let o=0;for(const r of n){e.blocks.byClientId.get(r).name===t&&o++}return o}),(e=>[e.blocks.order,e.blocks.byClientId])),_e=K(((e,t)=>{if(!t)return se;const n=Array.isArray(t)?t:[t],o=ve(e).filter((t=>{const o=e.blocks.byClientId.get(t);return n.includes(o.name)}));return o.length>0?o:se}),(e=>[e.blocks.order,e.blocks.byClientId]));function ye(e,t){return w()("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),_e(e,t)}const Ee=K(((e,t)=>(Array.isArray(t)?t:[t]).map((t=>pe(e,t)))),((e,t)=>(Array.isArray(t)?t:[t]).map((t=>e.blocks.tree.get(t))))),we=K(((e,t)=>Ee(e,t).filter(Boolean).map((e=>e.name))),((e,t)=>Ee(e,t)));function Se(e,t){return ot(e,t).length}function Ce(e){return e.selection.selectionStart}function xe(e){return e.selection.selectionEnd}function Be(e){return e.selection.selectionStart.clientId}function Ie(e){return e.selection.selectionEnd.clientId}function Te(e){const t=Ue(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function Me(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function Pe(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function Re(e){const t=Pe(e);return t?pe(e,t):null}function Ne(e,t){var n;return null!==(n=e.blocks.parents.get(t))&&void 0!==n?n:null}const Le=K(((e,t,n=!1)=>{const o=[];let r=t;for(;r=e.blocks.parents.get(r);)o.push(r);return o.length?n?o:o.reverse():se}),(e=>[e.blocks.parents])),Ae=K(((e,t,n,o=!1)=>{const r=Le(e,t,o),l=Array.isArray(n)?e=>n.includes(e):e=>n===e;return r.filter((t=>l(ce(e,t))))}),(e=>[e.blocks.parents]));function Oe(e,t){let n,o=t;do{n=o,o=e.blocks.parents.get(o)}while(o);return n}function De(e,t){const n=Pe(e),o=[...Le(e,t),t],r=[...Le(e,n),n];let l;const i=Math.min(o.length,r.length);for(let e=0;e<i&&o[e]===r[e];e++)l=o[e];return l}function ze(e,t,n=1){if(void 0===t&&(t=Pe(e)),void 0===t&&(t=n<0?je(e):We(e)),!t)return null;const o=Ne(e,t);if(null===o)return null;const{order:r}=e.blocks,l=r.get(o),i=l.indexOf(t)+1*n;return i<0||i===l.length?null:l[i]}function Ve(e,t){return ze(e,t,-1)}function Fe(e,t){return ze(e,t,1)}function He(e){return e.initialPosition}const Ge=K((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(!t.clientId||!n.clientId)return se;if(t.clientId===n.clientId)return[t.clientId];const o=Ne(e,t.clientId);if(null===o)return se;const r=ot(e,o),l=r.indexOf(t.clientId),i=r.indexOf(n.clientId);return l>i?r.slice(i,l+1):r.slice(l,i+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Ue(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?se:Ge(e)}const $e=K((e=>{const t=Ue(e);return t.length?t.map((t=>pe(e,t))):se}),(e=>[...Ge.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function je(e){return Ue(e)[0]||null}function We(e){const t=Ue(e);return t[t.length-1]||null}function Ke(e,t){return je(e)===t}function Ze(e,t){return-1!==Ue(e).indexOf(t)}const qe=K(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=Ne(e,n),o=Ze(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Ye(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Xe(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Qe(e){const t=Ce(e),n=xe(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function Je(e){const t=Ce(e),n=xe(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function et(e){return Ge(e).some((t=>{const n=ce(e,t);return!(0,c.getBlockType)(n).merge}))}function tt(e,t){const n=Ce(e),o=xe(e);if(n.clientId===o.clientId)return!1;if(!n.attributeKey||!o.attributeKey||void 0===n.offset||void 0===o.offset)return!1;const r=Ne(e,n.clientId);if(r!==Ne(e,o.clientId))return!1;const l=ot(e,r);let i,s;l.indexOf(n.clientId)>l.indexOf(o.clientId)?(i=o,s=n):(i=n,s=o);const a=t?s.clientId:i.clientId,u=t?i.clientId:s.clientId,d=ce(e,a);if(!(0,c.getBlockType)(d).merge)return!1;const p=pe(e,u);if(p.name===d)return!0;const m=(0,c.switchToBlockType)(p,d);return m&&m.length}const nt=e=>{const t=Ce(e),n=xe(e);if(t.clientId===n.clientId)return se;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return se;const o=Ne(e,t.clientId);if(o!==Ne(e,n.clientId))return se;const r=ot(e,o),l=r.indexOf(t.clientId),i=r.indexOf(n.clientId),[s,a]=l>i?[n,t]:[t,n],c=pe(e,s.clientId),u=pe(e,a.clientId),d=c.attributes[s.attributeKey],p=u.attributes[a.attributeKey];let m=(0,Y.create)({html:d}),h=(0,Y.create)({html:p});return m=(0,Y.remove)(m,0,s.offset),h=(0,Y.remove)(h,a.offset,h.text.length),[{...c,attributes:{...c.attributes,[s.attributeKey]:(0,Y.toHTMLString)({value:m})}},{...u,attributes:{...u.attributes,[a.attributeKey]:(0,Y.toHTMLString)({value:h})}}]};function ot(e,t){return e.blocks.order.get(t||"")||se}function rt(e,t){return ot(e,Ne(e,t)).indexOf(t)}function lt(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function it(e,t,n=!1){return ot(e,t).some((t=>lt(e,t)||Ze(e,t)||n&&it(e,t,n)))}function st(e,t,n=!1){return ot(e,t).some((t=>ft(e,t)||n&&st(e,t,n)))}function at(e,t){if(!t)return!1;const n=Ue(e),o=n.indexOf(t);return o>-1&&o<n.length-1}function ct(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function ut(e){return e.isMultiSelecting}function dt(e){return e.isSelectionEnabled}function pt(e,t){return e.blocksMode[t]||"visual"}function mt(e){return e.isTyping}function ht(e){return!!e.draggedBlocks.length}function gt(e){return e.draggedBlocks}function ft(e,t){return e.draggedBlocks.includes(t)}function bt(e,t){if(!ht(e))return!1;return Le(e,t).some((t=>ft(e,t)))}function vt(){return w()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}const kt=K((e=>{let t,n;const{insertionPoint:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:l}=r;return l?(t=Ne(e,l)||void 0,n=rt(e,r.clientId)+1):n=ot(e).length,{rootClientId:t,index:n}}),(e=>[e.insertionPoint,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]));function _t(e){return null!==e.insertionPoint}function yt(e){return e.template.isValid}function Et(e){return e.settings.template}function wt(e,t){var n,o;return t?null!==(n=Yt(e,t)?.templateLock)&&void 0!==n&&n:null!==(o=e.settings.templateLock)&&void 0!==o&&o}const St=(e,t,n=null)=>{let o;if(t&&"object"==typeof t?(o=t,t=o.name):o=(0,c.getBlockType)(t),!o)return!1;const{allowedBlockTypes:r}=Xt(e);if(!Q(r,t,!0))return!1;if(!!wt(e,n))return!1;if("disabled"===_n(e,null!=n?n:""))return!1;const l=Yt(e,n);if(n&&void 0===l)return!1;const i=ce(e,n),s=(0,c.getBlockType)(i),a=s?.allowedBlocks;let u=Q(a,t);if(!1!==u){const e=l?.allowedBlocks,n=Q(e,t);null!==n&&(u=n)}const d=o.parent,p=Q(d,i);let h=!0;const g=o.ancestor;if(g){h=[n,...Le(e,n)].some((t=>Q(g,ce(e,t))))}const f=h&&(null===u&&null===p||!0===u||!0===p);return f?(0,m.applyFilters)("blockEditor.__unstableCanInsertBlockType",f,o,n,{getBlock:pe.bind(null,e),getBlockParentsByBlockName:Ae.bind(null,e)}):f},Ct=K(St,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId.get(n),e.settings.allowedBlockTypes,e.settings.templateLock,e.blockEditingModes]));function xt(e,t,n=null){return t.every((t=>Ct(e,ce(e,t),n)))}function Bt(e,t,n=null){const o=de(e,t);return null===o||(void 0!==o.lock?.remove?!o.lock.remove:!wt(e,n)&&"disabled"!==_n(e,n))}function It(e,t,n=null){return t.every((t=>Bt(e,t,n)))}function Tt(e,t,n=null){const o=de(e,t);return null===o||(void 0!==o.lock?.move?!o.lock.move:"all"!==wt(e,n)&&"disabled"!==_n(e,n))}function Mt(e,t,n=null){return t.every((t=>Tt(e,t,n)))}function Pt(e,t){const n=de(e,t);if(null===n)return!0;const{lock:o}=n;return!o?.edit}function Rt(e,t){return!!(0,c.hasBlockSupport)(t,"lock",!0)&&!!e.settings?.canLockBlocks}function Nt(e,t){var n;return null!==(n=e.preferences.insertUsage?.[t])&&void 0!==n?n:null}const Lt=(e,t,n)=>!!(0,c.hasBlockSupport)(t,"inserter",!0)&&St(e,t.name,n),At=(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}},Ot=(e,{buildScope:t="inserter"})=>n=>{const o=n.name;let r=!1;(0,c.hasBlockSupport)(n.name,"multiple",!0)||(r=Ee(e,ve(e)).some((({name:e})=>e===n.name)));const{time:l,count:i=0}=Nt(e,o)||{},s={id:o,name:n.name,title:n.title,icon:n.icon,isDisabled:r,frecency:At(l,i)};if("transform"===t)return s;const a=(0,c.getBlockVariations)(n.name,"inserter");return{...s,initialAttributes:{},description:n.description,category:n.category,keywords:n.keywords,variations:a,example:n.example,utility:1}},Dt=K(((e,t=null)=>{const n=St(e,"core/block",t)?on(e).map((t=>{const n=t.wp_pattern_sync_status?q:{src:q,foreground:"var(--wp-block-synced-color)"},o=`core/block/${t.id}`,{time:r,count:l=0}=Nt(e,o)||{},i=At(r,l);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title?.raw,icon:n,category:"reusable",keywords:["reusable"],isDisabled:!1,utility:1,frecency:i,content:t.content?.raw,syncStatus:t.wp_pattern_sync_status}})):[],o=Ot(e,{buildScope:"inserter"}),r=(0,c.getBlockTypes)().filter((n=>Lt(e,n,t))).map(o).reduce(((t,n)=>{const{variations:o=[]}=n;if(o.some((({isDefault:e})=>e))||t.push(n),o.length){const r=((e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:l=0}=Nt(e,o)||{};return{...t,id:o,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:At(r,l)}})(e,n);t.push(...o.map(r))}return t}),[]),{core:l,noncore:i}=r.reduce(((e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e}),{core:[],noncore:[]});return[...[...l,...i],...n]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId.get(t),e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,on(e),(0,c.getBlockTypes)()])),zt=K(((e,t,n=null)=>{const o=Array.isArray(t)?t:[t],r=Ot(e,{buildScope:"transform"}),l=(0,c.getBlockTypes)().filter((t=>Lt(e,t,n))).map(r),i=Object.fromEntries(Object.entries(l).map((([,e])=>[e.name,e]))),s=(0,c.getPossibleBlockTransformations)(o).reduce(((e,t)=>(i[t?.name]&&e.push(i[t.name]),e)),[]);return ne(s,(e=>i[e.name].frecency),"desc")}),((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId.get(n),e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,c.getBlockTypes)()])),Vt=K(((e,t=null)=>{if((0,c.getBlockTypes)().some((n=>Lt(e,n,t))))return!0;return St(e,"core/block",t)&&on(e).length>0}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId.get(t),e.settings.allowedBlockTypes,e.settings.templateLock,on(e),(0,c.getBlockTypes)()])),Ft=K(((e,t=null)=>{if(!t)return;const n=(0,c.getBlockTypes)().filter((n=>Lt(e,n,t)));return St(e,"core/block",t)&&on(e).length>0&&n.push("core/block"),n}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId.get(t),e.settings.allowedBlockTypes,e.settings.templateLock,on(e),(0,c.getBlockTypes)()])),Ht=K(((e,t=null)=>(w()('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),Ft(e,t))),((e,t)=>[...Ft.getDependants(e,t)])),Gt=K(((e,t=null)=>{if(!t)return;const n=e.blockListSettings[t]?.defaultBlock,o=e.blockListSettings[t]?.directInsert;return n&&o?"function"==typeof o?o(pe(e,t))?n:null:n:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree.get(t)])),Ut=K(((e,t=null)=>(w()('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),Gt(e,t))),((e,t)=>[e.blockListSettings[t],e.blocks.tree.get(t)])),$t=(0,d.createRegistrySelector)((e=>K(((t,n)=>{const{getAllPatterns:o}=ie(e(oe)),r=o().find((({name:e})=>e===n));return r?{...r,blocks:(0,c.parse)(r.content,{__unstableSkipMigrationLogs:!0})}:null}),ee(e)))),jt=e=>(t,n)=>[...ee(e)(t),t.settings.allowedBlockTypes,t.settings.templateLock,t.blockListSettings[n],t.blocks.byClientId.get(n)],Wt=(0,d.createRegistrySelector)((e=>K(((t,n=null)=>{const{getAllPatterns:o,__experimentalGetParsedPattern:r}=ie(e(oe)),l=o(),{allowedBlockTypes:i}=Xt(t),s=l.filter((({inserter:e=!0})=>!!e)).map((({name:e})=>r(e))),a=s.filter((({blocks:e})=>J(e,i))),c=a.filter((({blocks:e})=>e.every((({name:e})=>Ct(t,e,n)))));return c}),jt(e)))),Kt=(0,d.createRegistrySelector)((e=>K(((t,n,o=null)=>{if(!n)return se;const r=e(oe).__experimentalGetAllowedPatterns(o),l=Array.isArray(n)?n:[n],i=r.filter((e=>e?.blockTypes?.some?.((e=>l.includes(e)))));return 0===i.length?se:i}),((t,n,o)=>jt(e)(t,o))))),Zt=(0,d.createRegistrySelector)((e=>(w()('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(oe).getPatternsByBlockTypes))),qt=(0,d.createRegistrySelector)((e=>K(((t,n,o=null)=>{if(!n)return se;if(n.some((({clientId:e,innerBlocks:n})=>n.length||un(t,e))))return se;const r=Array.from(new Set(n.map((({name:e})=>e))));return e(oe).getPatternsByBlockTypes(r,o)}),((t,n,o)=>jt(e)(t,o)))));function Yt(e,t){return e.blockListSettings[t]}function Xt(e){return e.settings}function Qt(e){return e.blocks.isPersistentChange}const Jt=K(((e,t=[])=>t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})),(e=>[e.blockListSettings])),en=K(((e,t)=>{const n=on(e).find((e=>e.id===t));return n?n.title?.raw:null}),(e=>[on(e)]));function tn(e){return e.blocks.isIgnoredChange}function nn(e){return e.lastBlockAttributesChange}function on(e){var t;return null!==(t=e.settings.__experimentalReusableBlocks)&&void 0!==t?t:se}function rn(e){return"navigation"===e.editorMode}function ln(e){return e.editorMode}function sn(e){return e.hasBlockMovingClientId}function an(e){return!!e.automaticChangeStatus}function cn(e,t){return e.highlightedBlock===t}function un(e,t){return!!e.blocks.controlledInnerBlocks[t]}const dn=K(((e,t)=>{if(!t.length)return null;const n=Pe(e);if(t.includes(ce(e,n)))return n;const o=Ue(e),r=Ae(e,n||o[0],t);return r?r[r.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function pn(e,t,n){const{lastBlockInserted:o}=e;return o.clientIds?.includes(t)&&o.source===n}function mn(e,t){var n;return null===(n=e.blockVisibility?.[t])||void 0===n||n}const hn=K((e=>{const t=new Set(Object.keys(e.blockVisibility).filter((t=>e.blockVisibility[t])));return 0===t.size?ae:t}),(e=>[e.blockVisibility])),gn=K(((e,t)=>{let n,o=t;for(;o=e.blocks.parents.get(o);)"core/block"!==ce(e,o)&&"contentOnly"!==wt(e,o)||(n=o);return n}),(e=>[e.blocks.parents,e.blockListSettings]));function fn(e){return e.temporarilyEditingAsBlocks}function bn(e){return e.temporarilyEditingFocusModeRevert}function vn(e,t){if("default"!==_n(e,t))return!1;if(!Pt(e,t))return!0;const n=ln(e);if("zoom-out"===n&&t&&!Ne(e,t))return!0;const o=(0,c.hasBlockSupport)(ce(e,t),"__experimentalDisableBlockOverlay",!1);return("navigation"===n||!o&&un(e,t))&&!lt(e,t)&&!it(e,t,!0)}function kn(e,t){let n=e.blocks.parents.get(t);for(;n;){if(vn(e,n))return!0;n=e.blocks.parents.get(n)}return!1}const _n=(0,d.createRegistrySelector)((e=>(t,n="")=>{const o=t.blockEditingModes.get(n);if(o)return o;if(!n)return"default";const r=Ne(t,n);if("contentOnly"===wt(t,r)){const o=ce(t,n);return e(c.store).__experimentalHasContentRoleAttribute(o)?"contentOnly":"disabled"}const l=_n(t,r);return"contentOnly"===l?"default":l})),yn=(0,d.createRegistrySelector)((e=>(t,n="")=>{const o=n||Pe(t);if(!o)return!1;const{getGroupingBlockName:r}=e(c.store),l=pe(t,o),i=r();return l&&(l.name===i||(0,c.getBlockType)(l.name)?.transforms?.ungroup)&&!!l.innerBlocks.length&&Bt(t,o)})),En=(0,d.createRegistrySelector)((e=>(t,n=se)=>{const{getGroupingBlockName:o}=e(c.store),r=o(),l=n?.length?n:Ge(t),i=l?.length?Ne(t,l[0]):void 0;return Ct(t,r,i)&&l.length&&It(t,l,i)})),wn=new WeakSet,Sn=["inserterMediaCategories","blockInspectorAnimation"];function Cn(e,{stripExperimentalSettings:t=!1,reset:n=!1}={}){let o=e;if(t&&"web"===u.Platform.OS){o={};for(const t in e)Sn.includes(t)||(o[t]=e[t])}return{type:"UPDATE_SETTINGS",settings:o,reset:n}}function xn(){return{type:"HIDE_BLOCK_INTERFACE"}}function Bn(){return{type:"SHOW_BLOCK_INTERFACE"}}const In=(e,t=!0,n=!1)=>({select:o,dispatch:r,registry:l})=>{if(!e||!e.length)return;var i;i=e,e=Array.isArray(i)?i:[i];const s=o.getBlockRootClientId(e[0]);if(!o.canRemoveBlocks(e,s))return;const a=!n&&o.getBlockRemovalRules();if(a){const n=new Set,l=[...e];let i="templates";for(;l.length;){const e=l.shift(),t=o.getBlockName(e);if(a[t]&&n.add(t),a["bindings/core/pattern-overrides"]){const r=o.getBlockParentsByBlockName(e,"core/block");if(r?.length>0)continue;const l=o.getBlockAttributes(e);l?.metadata?.bindings&&JSON.stringify(l.metadata.bindings).includes("core/pattern-overrides")&&(n.add(t),i="patternOverrides")}const r=o.getBlockOrder(e);l.push(...r)}if(n.size)return void r(function(e,t,n,o){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,blockNamesForPrompt:n,messageType:o}}(e,t,Array.from(n),i))}t&&r.selectPreviousBlock(e[0],t),l.batch((()=>{r({type:"REMOVE_BLOCKS",clientIds:e}),r(Tn())}))},Tn=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;const{__unstableHasCustomAppender:n}=e.getSettings();n||t.insertDefaultBlock()};function Mn(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function Pn(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function Rn(e){return{type:"SET_OPENED_BLOCK_SETTINGS_MENU",clientId:e}}function Nn(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function Ln(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function An(e){return({dispatch:t,select:n,registry:o})=>{o.batch((()=>{t({type:"SET_EXPLICIT_PERSISTENT",isPersistentChange:!1}),e(),t({type:"SET_EXPLICIT_PERSISTENT",isPersistentChange:void 0});const o=n.getBlocks();wn.add(o)}))}}function On(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function Dn(e){return({select:t,dispatch:n})=>{const o=t.__unstableGetTemporarilyEditingFocusModeToRevert();n.__unstableMarkNextChangeAsNotPersistent(),n.updateBlockAttributes(e,{templateLock:"contentOnly"}),n.updateBlockListSettings(e,{...t.getBlockListSettings(e),templateLock:"contentOnly"}),n.updateSettings({focusMode:o}),n.__unstableSetTemporarilyEditingAsBlocks()}}function zn(){return{type:"START_DRAGGING"}}function Vn(){return{type:"STOP_DRAGGING"}}const Fn={user:"user",theme:"theme",directory:"directory"},Hn={full:"fully",unsynced:"unsynced"},Gn={name:"allPatterns",label:(0,x._x)("All","patterns")},Un={name:"myPatterns",label:(0,x.__)("My patterns")};function $n(e,t,n){const o=e.name.startsWith("core/block"),r="core"===e.source||e.source?.startsWith("pattern-directory");return!(t!==Fn.theme||!o&&!r)||(!(t!==Fn.directory||!o&&r)||(t===Fn.user&&e.type!==Fn.user||(n===Hn.full&&""!==e.syncStatus||!(n!==Hn.unsynced||"unsynced"===e.syncStatus||!o))))}function jn(e,t,n){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};const o=t.pop();let r=e;for(const e of t){const t=r[e];r=r[e]=Array.isArray(t)?[...t]:{...t}}return r[o]=n,e}const Wn=(e,t,n)=>{var o;const r=Array.isArray(t)?t:t.split(".");let l=e;return r.forEach((e=>{l=l?.[e]})),null!==(o=l)&&void 0!==o?o:n},Kn=["color","border","dimensions","typography","spacing"],Zn={"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},qn={"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"},Yn=e=>qn[e]||e;const Xn=new WeakMap;function Qn(e){var t,n;return null!==(t=null!==(n=e.custom)&&void 0!==n?n:e.theme)&&void 0!==t?t:e.default}function Jn(e){return["default","theme","custom"].some((t=>e?.[t]?.length))}function eo(e,t,...n){const o=ce(e,t),r=[];if(t){let n=t;do{const t=ce(e,n);(0,c.hasBlockSupport)(t,"__experimentalSettings",!1)&&r.push(n)}while(n=e.blocks.parents.get(n))}return n.map((n=>{if(Kn.includes(n))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let l=(0,m.applyFilters)("blockEditor.useSetting.before",void 0,n,t,o);if(void 0!==l)return l;const i=Yn(n);for(const t of r){var s;const n=de(e,t);if(l=null!==(s=Wn(n.settings?.blocks?.[o],i))&&void 0!==s?s:Wn(n.settings,i),void 0!==l)break}const a=Xt(e);if(void 0===l&&o&&(l=Wn(a.__experimentalFeatures?.blocks?.[o],i)),void 0===l&&(l=Wn(a.__experimentalFeatures,i)),void 0!==l)return c.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[i]?Qn(l):l;const u=Zn[i]?.(a);return void 0!==u?u:"typography.dropCap"===i||void 0}))}function to(e){return e.isBlockInterfaceHidden}function no(e){return e?.lastBlockInserted?.clientIds}function oo(e,t){return e.blocks.byClientId.get(t)}const ro=(e,t)=>{const n=t=>"disabled"===_n(e,t)&&ot(e,t).every(n);return ot(e,t).every(n)};const lo=K((function e(t,n){const o=ot(t,n),r=[];for(const n of o){const o=e(t,n);"disabled"!==_n(t,n)?r.push({clientId:n,innerBlocks:o}):r.push(...o)}return r}),(e=>[e.blocks.order,e.blockEditingModes,e.settings.templateLock,e.blockListSettings])),io=K(((e,t,n=!1)=>Le(e,t,n).filter((t=>"disabled"!==_n(e,t)))),(e=>[e.blocks.parents,e.blockEditingModes,e.settings.templateLock,e.blockListSettings]));function so(e){return e.removalPromptData}function ao(e){return e.blockRemovalRules}function co(e){return e.openedBlockSettingsMenu}function uo(e){return e.styleOverrides}function po(e){return e.registeredInserterMediaCategories}const mo=K((e=>{const{settings:{inserterMediaCategories:t,allowedMimeTypes:n,enableOpenverseMediaCategory:o},registeredInserterMediaCategories:r}=e;if(!t&&!r.length||!n)return;const l=t?.map((({name:e})=>e))||[];return[...t||[],...(r||[]).filter((({name:e})=>!l.includes(e)))].filter((e=>!(!o&&"openverse"===e.name)&&Object.values(n).some((t=>t.startsWith(`${e.mediaType}/`)))))}),(e=>[e.settings.inserterMediaCategories,e.settings.allowedMimeTypes,e.settings.enableOpenverseMediaCategory,e.registeredInserterMediaCategories])),ho=(0,d.createRegistrySelector)((e=>K(((t,n=null)=>{const{getAllPatterns:o,__experimentalGetParsedPattern:r}=ie(e(oe)),l=o(),{allowedBlockTypes:i}=Xt(t);return l.some((({name:e,inserter:o=!0})=>{if(!o)return!1;const{blocks:l}=r(e);return J(l,i)&&l.every((({name:e})=>Ct(t,e,n)))}))}),((t,n)=>[ee(e)(t),t.settings.allowedBlockTypes,t.settings.templateLock,t.blockListSettings[n],t.blocks.byClientId.get(n)])))),go=(0,d.createRegistrySelector)((e=>K((t=>{var n;const{__experimentalBlockPatterns:o=[],__experimentalUserPatternCategories:r=[],__experimentalReusableBlocks:l=[]}=t.settings,i=(null!=l?l:[]).map((e=>({name:`core/block/${e.id}`,id:e.id,type:Fn.user,title:e.title.raw,categories:e.wp_pattern_category.map((e=>{const t=(null!=r?r:[]).find((({id:t})=>t===e));return t?t.slug:e})),content:e.content.raw,syncStatus:e.wp_pattern_sync_status})));return[...i,...o,...null!==(n=t.settings[X]?.(e))&&void 0!==n?n:[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name))))}),ee(e))));function fo(e){return e.lastFocus}function bo(e){return e.isDragging}const vo=window.wp.a11y,ko="†";function _o(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return("string"==typeof n||n instanceof Y.RichTextData)&&-1!==n.toString().indexOf(ko)}))}const yo=e=>Array.isArray(e)?e:[e],Eo=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(wo(e))},wo=e=>({select:t,dispatch:n})=>{const o=t.getTemplate(),r=t.getTemplateLock(),l=!o||"all"!==r||(0,c.doBlocksMatchTemplate)(e,o);if(l!==t.isValidTemplate())return n.setTemplateValidity(l),l};function So(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function Co(e){return w()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function xo(e,t,n=!1){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:yo(e),attributes:t,uniqueByBlock:n}}function Bo(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Io(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const To=(e,t=!1)=>({select:n,dispatch:o})=>{const r=n.getPreviousBlockClientId(e);if(r)o.selectBlock(r,-1);else if(t){const t=n.getBlockRootClientId(e);t&&o.selectBlock(t,-1)}},Mo=e=>({select:t,dispatch:n})=>{const o=t.getNextBlockClientId(e);o&&n.selectBlock(o)};function Po(){return{type:"START_MULTI_SELECT"}}function Ro(){return{type:"STOP_MULTI_SELECT"}}const No=(e,t,n=0)=>({select:o,dispatch:r})=>{if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;r({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const l=o.getSelectedBlockCount();(0,vo.speak)((0,x.sprintf)((0,x._n)("%s block selected.","%s blocks selected.",l),l),"assertive")};function Lo(){return{type:"CLEAR_SELECTED_BLOCK"}}function Ao(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Oo(e,t){var n;const o=null!==(n=t?.__experimentalPreferredStyleVariations?.value)&&void 0!==n?n:{};return e.map((e=>{const t=e.name;if(!(0,c.hasBlockSupport)(t,"defaultStylePicker",!0))return e;if(!o[t])return e;const n=e.attributes?.className;if(n?.includes("is-style-"))return e;const{attributes:r={}}=e,l=o[t];return{...e,attributes:{...r,className:`${n||""} is-style-${l}`.trim()}}}))}const Do=(e,t,n,o=0,r)=>({select:l,dispatch:i,registry:s})=>{e=yo(e),t=Oo(yo(t),l.getSettings());const a=l.getBlockRootClientId(e[0]);for(let e=0;e<t.length;e++){const n=t[e];if(!l.canInsertBlockType(n.name,a))return}s.batch((()=>{i({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r}),i.ensureDefaultBlock()}))};function zo(e,t){return Do(e,t)}const Vo=e=>(t,n)=>({select:o,dispatch:r})=>{o.canMoveBlocks(t,n)&&r({type:e,clientIds:yo(t),rootClientId:n})},Fo=Vo("MOVE_BLOCKS_DOWN"),Ho=Vo("MOVE_BLOCKS_UP"),Go=(e,t="",n="",o)=>({select:r,dispatch:l})=>{if(r.canMoveBlocks(e,t)){if(t!==n){if(!r.canRemoveBlocks(e,t))return;if(!r.canInsertBlocks(e,n))return}l({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o})}};function Uo(e,t="",n="",o){return Go([e],t,n,o)}function $o(e,t,n,o,r){return jo([e],t,n,o,0,r)}const jo=(e,t,n,o=!0,r=0,l)=>({select:i,dispatch:s})=>{null!==r&&"object"==typeof r&&(l=r,r=0,w()("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=Oo(yo(e),i.getSettings());const a=[];for(const t of e){i.canInsertBlockType(t.name,n)&&a.push(t)}a.length&&s({type:"INSERT_BLOCKS",blocks:a,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:l})};function Wo(e,t,n={}){const{__unstableWithInserter:o,operation:r,nearestSide:l}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o,operation:r,nearestSide:l}}const Ko=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function Zo(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const qo=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});const n=e.getBlocks(),o=e.getTemplate(),r=(0,c.synchronizeBlocksWithTemplate)(n,o);t.resetBlocks(r)},Yo=e=>({registry:t,select:n,dispatch:o})=>{const r=n.getSelectionStart(),l=n.getSelectionEnd();if(r.clientId===l.clientId)return;if(!r.attributeKey||!l.attributeKey||void 0===r.offset||void 0===l.offset)return!1;const i=n.getBlockRootClientId(r.clientId);if(i!==n.getBlockRootClientId(l.clientId))return;const s=n.getBlockOrder(i);let a,u;s.indexOf(r.clientId)>s.indexOf(l.clientId)?(a=l,u=r):(a=r,u=l);const d=e?u:a,p=n.getBlock(d.clientId),m=(0,c.getBlockType)(p.name);if(!m.merge)return;const h=a,g=u,f=n.getBlock(h.clientId),b=n.getBlock(g.clientId),v=f.attributes[h.attributeKey],k=b.attributes[g.attributeKey];let _=(0,Y.create)({html:v}),y=(0,Y.create)({html:k});_=(0,Y.remove)(_,h.offset,_.text.length),y=(0,Y.insert)(y,ko,0,g.offset);const E=(0,c.cloneBlock)(f,{[h.attributeKey]:(0,Y.toHTMLString)({value:_})}),w=(0,c.cloneBlock)(b,{[g.attributeKey]:(0,Y.toHTMLString)({value:y})}),S=e?E:w,C=f.name===b.name?[S]:(0,c.switchToBlockType)(S,m.name);if(!C||!C.length)return;let x;if(e){const e=C.pop();x=m.merge(e.attributes,w.attributes)}else{const e=C.shift();x=m.merge(E.attributes,e.attributes)}const B=_o(x),I=x[B],T=(0,Y.create)({html:I}),M=T.text.indexOf(ko),P=(0,Y.remove)(T,M,M+1),R=(0,Y.toHTMLString)({value:P});x[B]=R;const N=n.getSelectedBlockClientIds(),L=[...e?C:[],{...p,attributes:{...p.attributes,...x}},...e?[]:C];t.batch((()=>{o.selectionChange(p.clientId,B,M,M),o.replaceBlocks(N,L,0,n.getSelectedBlocksInitialCaretPosition())}))},Xo=()=>({select:e,dispatch:t})=>{const n=e.getSelectionStart(),o=e.getSelectionEnd();if(n.clientId===o.clientId)return;if(!n.attributeKey||!o.attributeKey||void 0===n.offset||void 0===o.offset)return;const r=e.getBlockRootClientId(n.clientId);if(r!==e.getBlockRootClientId(o.clientId))return;const l=e.getBlockOrder(r);let i,s;l.indexOf(n.clientId)>l.indexOf(o.clientId)?(i=o,s=n):(i=n,s=o);const a=i,c=s,u=e.getBlock(a.clientId),d=e.getBlock(c.clientId),p=u.attributes[a.attributeKey],m=d.attributes[c.attributeKey];let h=(0,Y.create)({html:p}),g=(0,Y.create)({html:m});h=(0,Y.remove)(h,a.offset,h.text.length),g=(0,Y.remove)(g,0,c.offset),t.replaceBlocks(e.getSelectedBlockClientIds(),[{...u,attributes:{...u.attributes,[a.attributeKey]:(0,Y.toHTMLString)({value:h})}},{...d,attributes:{...d.attributes,[c.attributeKey]:(0,Y.toHTMLString)({value:g})}}])},Qo=()=>({select:e,dispatch:t})=>{const n=e.getSelectionStart(),o=e.getSelectionEnd();t.selectionChange({start:{clientId:n.clientId},end:{clientId:o.clientId}})},Jo=(e,t)=>({registry:n,select:o,dispatch:r})=>{const l=[e,t];r({type:"MERGE_BLOCKS",blocks:l});const[i,s]=l,a=o.getBlock(i),u=(0,c.getBlockType)(a.name);if(!u)return;const d=o.getBlock(s);if(!u.merge&&(0,c.getBlockSupport)(a.name,"__experimentalOnMerge")){const e=(0,c.switchToBlockType)(d,u.name);if(1!==e?.length)return void r.selectBlock(a.clientId);const[t]=e;return t.innerBlocks.length<1?void r.selectBlock(a.clientId):void n.batch((()=>{r.insertBlocks(t.innerBlocks,void 0,i),r.removeBlock(s),r.selectBlock(t.innerBlocks[0].clientId);const e=o.getNextBlockClientId(i);if(e&&o.getBlockName(i)===o.getBlockName(e)){const t=o.getBlockAttributes(i),n=o.getBlockAttributes(e);Object.keys(t).every((e=>t[e]===n[e]))&&(r.moveBlocksToPosition(o.getBlockOrder(e),e,i),r.removeBlock(e,!1))}}))}if((0,c.isUnmodifiedDefaultBlock)(a))return void r.removeBlock(i,o.isBlockSelected(i));if((0,c.isUnmodifiedDefaultBlock)(d))return void r.removeBlock(s,o.isBlockSelected(s));if(!u.merge)return void r.selectBlock(a.clientId);const p=(0,c.getBlockType)(d.name),{clientId:m,attributeKey:h,offset:g}=o.getSelectionStart(),f=(m===i?u:p).attributes[h],b=(m===i||m===s)&&void 0!==h&&void 0!==g&&!!f;f||("number"==typeof h?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was "+typeof h):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const v=(0,c.cloneBlock)(a),k=(0,c.cloneBlock)(d);if(b){const e=m===i?v:k,t=e.attributes[h],n=(0,Y.insert)((0,Y.create)({html:t}),ko,g,g);e.attributes[h]=(0,Y.toHTMLString)({value:n})}const _=a.name===d.name?[k]:(0,c.switchToBlockType)(k,a.name);if(!_||!_.length)return;const y=u.merge(v.attributes,_[0].attributes);if(b){const e=_o(y),t=y[e],n=(0,Y.create)({html:t}),o=n.text.indexOf(ko),l=(0,Y.remove)(n,o,o+1),i=(0,Y.toHTMLString)({value:l});y[e]=i,r.selectionChange(a.clientId,e,o,o)}r.replaceBlocks([a.clientId,d.clientId],[{...a,attributes:{...a.attributes,...y}},..._.slice(1)],0)},er=(e,t=!0)=>In(e,t);function tr(e,t){return er([e],t)}function nr(e,t,n=!1,o=0){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function or(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function rr(){return{type:"START_TYPING"}}function lr(){return{type:"STOP_TYPING"}}function ir(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function sr(){return{type:"STOP_DRAGGING_BLOCKS"}}function ar(){return w()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function cr(){return w()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function ur(e,t,n,o){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}:{type:"SELECTION_CHANGE",...e}}const dr=(e,t,n)=>({dispatch:o})=>{const r=(0,c.getDefaultBlockName)();if(!r)return;const l=(0,c.createBlock)(r,e);return o.insertBlock(l,n,t)};function pr(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function mr(e){return Cn(e,{stripExperimentalSettings:!0})}function hr(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function gr(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function fr(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const br=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:t=(e=>setTimeout(e,100))}=window;t((()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},vr=(e=!0)=>({dispatch:t})=>{t.__unstableSetEditorMode(e?"navigation":"edit")},kr=e=>({dispatch:t,select:n})=>{if("zoom-out"===e){const e=n.getBlockSelectionStart();e&&t.selectBlock(n.getBlockHierarchyRootClientId(e))}t({type:"SET_EDITOR_MODE",mode:e}),"navigation"===e?(0,vo.speak)((0,x.__)("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,vo.speak)((0,x.__)("You are currently in edit mode. To return to the navigation mode, press Escape.")):"zoom-out"===e&&(0,vo.speak)((0,x.__)("You are currently in zoom-out mode."))},_r=(e=null)=>({dispatch:t})=>{t({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,vo.speak)((0,x.__)("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=(e,t=!0)=>({select:n,dispatch:o})=>{if(!e||!e.length)return;const r=n.getBlocksByClientId(e);if(r.some((e=>!e)))return;const l=r.map((e=>e.name));if(l.some((e=>!(0,c.hasBlockSupport)(e,"multiple",!0))))return;const i=n.getBlockRootClientId(e[0]),s=yo(e),a=n.getBlockIndex(s[s.length-1]),u=r.map((e=>(0,c.__experimentalCloneSanitizedBlock)(e)));return o.insertBlocks(u,a+1,i,t),u.length>1&&t&&o.multiSelect(u[0].clientId,u[u.length-1].clientId),u.map((e=>e.clientId))},Er=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e),l=o?t.getDirectInsertBlock(o):null;if(!l)return n.insertDefaultBlock({},o,r);const i={};if(l.attributesToCopy){const n=t.getBlockAttributes(e);l.attributesToCopy.forEach((e=>{n[e]&&(i[e]=n[e])}))}const s=(0,c.createBlock)(l.name,{...l.attributes,...i});return n.insertBlock(s,r,o)},wr=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e),l=o?t.getDirectInsertBlock(o):null;if(!l)return n.insertDefaultBlock({},o,r+1);const i={};if(l.attributesToCopy){const n=t.getBlockAttributes(e);l.attributesToCopy.forEach((e=>{n[e]&&(i[e]=n[e])}))}const s=(0,c.createBlock)(l.name,{...l.attributes,...i});return n.insertBlock(s,r+1,o)};function Sr(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const Cr=e=>async({dispatch:t})=>{t(Sr(e,!0)),await new Promise((e=>setTimeout(e,150))),t(Sr(e,!1))};function xr(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function Br(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function Ir(e,t){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e,focusModeToRevert:t}}const Tr=e=>({select:t,dispatch:n})=>{if(!e||"object"!=typeof e)return void console.error("Category should be an `InserterMediaCategory` object.");if(!e.name)return void console.error("Category should have a `name` that should be unique among all media categories.");if(!e.labels?.name)return void console.error("Category should have a `labels.name`.");if(!["image","audio","video"].includes(e.mediaType))return void console.error("Category should have `mediaType` property that is one of `image|audio|video`.");if(!e.fetch||"function"!=typeof e.fetch)return void console.error("Category should have a `fetch` function defined with the following signature `(InserterMediaRequest) => Promise<InserterMediaItem[]>`.");const o=t.getRegisteredInserterMediaCategories();o.some((({name:t})=>t===e.name))?console.error(`A category is already registered with the same name: "${e.name}".`):o.some((({labels:{name:t}={}})=>t===e.labels?.name))?console.error(`A category is already registered with the same labels.name: "${e.labels.name}".`):n({type:"REGISTER_INSERTER_MEDIA_CATEGORY",category:{...e,isExternalResource:!0}})};function Mr(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function Pr(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}const Rr={reducer:U,selectors:e,actions:l},Nr=(0,d.createReduxStore)(oe,{...Rr,persist:["preferences"]}),Lr=(0,d.registerStore)(oe,{...Rr,persist:["preferences"]});function Ar(...e){const{clientId:t=null}=y();return(0,d.useSelect)((n=>ie(n(Nr)).getBlockSettings(t,...e)),[t,...e])}function Or(e){w()("wp.blockEditor.useSetting",{since:"6.5",alternative:"wp.blockEditor.useSettings",note:"The new useSettings function can retrieve multiple settings at once, with better performance."});const[t]=Ar(e);return t}ie(Lr).registerPrivateActions(t),ie(Lr).registerPrivateSelectors(r),ie(Nr).registerPrivateActions(t),ie(Nr).registerPrivateSelectors(r);const Dr="1600px",zr="320px",Vr=1,Fr=.25,Hr=.75,Gr="14px";function Ur({minimumFontSize:e,maximumFontSize:t,fontSize:n,minimumViewportWidth:o=zr,maximumViewportWidth:r=Dr,scaleFactor:l=Vr,minimumFontSizeLimit:i}){if(i=$r(i)?i:Gr,n){const o=$r(n);if(!o?.unit)return null;const r=$r(i,{coerceTo:o.unit});if(r?.value&&!e&&!t&&o?.value<=r?.value)return null;if(t||(t=`${o.value}${o.unit}`),!e){const t="px"===o.unit?o.value:16*o.value,n=Math.min(Math.max(1-.075*Math.log2(t),Fr),Hr),l=jr(o.value*n,3);e=r?.value&&l<r?.value?`${r.value}${r.unit}`:`${l}${o.unit}`}}const s=$r(e),a=s?.unit||"rem",c=$r(t,{coerceTo:a});if(!s||!c)return null;const u=$r(e,{coerceTo:"rem"}),d=$r(r,{coerceTo:a}),p=$r(o,{coerceTo:a});if(!d||!p||!u)return null;const m=d.value-p.value;if(!m)return null;const h=jr(p.value/100,3),g=jr(h,3)+a,f=jr(((c.value-s.value)/m*100||1)*l,3);return`clamp(${e}, ${`${u.value}${u.unit} + ((1vw - ${g}) * ${f})`}, ${t})`}function $r(e,t={}){if("string"!=typeof e&&"number"!=typeof e)return null;isFinite(e)&&(e=`${e}px`);const{coerceTo:n,rootSizeValue:o,acceptableUnits:r}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},l=r?.join("|"),i=new RegExp(`^(\\d*\\.?\\d+)(${l}){1,1}$`),s=e.match(i);if(!s||s.length<3)return null;let[,a,c]=s,u=parseFloat(a);return"px"!==n||"em"!==c&&"rem"!==c||(u*=o,c=n),"px"!==c||"em"!==n&&"rem"!==n||(u/=o,c=n),"em"!==n&&"rem"!==n||"em"!==c&&"rem"!==c||(c=n),{value:jr(u,3),unit:c}}function jr(e,t=3){const n=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*n)/n):void 0}function Wr(e,t){const{size:n}=e;if(!Kr(t))return n;if(!n||"0"===n||!1===e?.fluid)return n;const o="object"==typeof t?.fluid?t?.fluid:{},r=Ur({minimumFontSize:e?.fluid?.min,maximumFontSize:e?.fluid?.max,fontSize:n,minimumFontSizeLimit:o?.minFontSize,maximumViewportWidth:o?.maxViewportWidth,minimumViewportWidth:o?.minViewportWidth});return r||n}function Kr(e){const t=e?.fluid;return!0===t||t&&"object"==typeof t&&Object.keys(t).length>0}function Zr(e){const t=e?.typography,n=e?.layout,o=$r(n?.wideSize)?n?.wideSize:null;return Kr(t)&&o?{fluid:{maxViewportWidth:o,...t.fluid}}:{fluid:t?.fluid}}const qr="body",Yr=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>Wr(e,Zr(t)),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:e})=>e,classes:[]}],Xr={"color.background":"color","color.text":"color","filter.duotone":"duotone","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.caption.color.text":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",shadow:"shadow","typography.fontSize":"font-size","typography.fontFamily":"font-family"},Qr={popoverProps:{placement:"left-start",offset:259}};function Jr(e,t,n,o,r){const l=[Wn(e,["blocks",t,...n]),Wn(e,n)];for(const i of l)if(i){const l=["custom","theme","default"];for(const s of l){const l=i[s];if(l){const i=l.find((e=>e[o]===r));if(i){if("slug"===o)return i;return Jr(e,t,n,"slug",i.slug)[o]===i[o]?i:void 0}}}}}function el(e,t,n){if(!n||"string"!=typeof n){if(!n?.ref||"string"!=typeof n?.ref)return n;{const t=n.ref.split(".");if(!(n=Wn(e,t))||n?.ref)return n}}const o="var:",r="var(--wp--";let l;if(n.startsWith(o))l=n.slice(4).split("|");else{if(!n.startsWith(r)||!n.endsWith(")"))return n;l=n.slice(10,-1).split("--")}const[i,...s]=l;return"preset"===i?function(e,t,n,[o,r]){const l=Yr.find((e=>e.cssVarInfix===o));if(!l)return n;const i=Jr(e.settings,t,l.path,"slug",r);if(i){const{valueKey:n}=l;return el(e,t,i[n])}return n}(e,t,n,s):"custom"===i?function(e,t,n,o){var r;const l=null!==(r=Wn(e.settings,["blocks",t,"custom",...o]))&&void 0!==r?r:Wn(e.settings,["custom",...o]);return l?el(e,t,l):n}(e,t,n,s):n}function tl(e,t){const n=e.split(","),o=t.split(","),r=[];return n.forEach((e=>{o.forEach((t=>{r.push(`${e.trim()} ${t.trim()}`)}))})),r.join(", ")}function nl(e,t){return"object"!=typeof e||"object"!=typeof t?e===t:C()(e?.styles,t?.styles)&&C()(e?.settings,t?.settings)}const ol=(0,u.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}}),rl={settings:{},styles:{}},ll=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","border.color","border.radius","border.style","border.width","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.minHeight","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textColumns","typography.textDecoration","typography.textTransform","typography.writingMode"],il=()=>{const{user:e,setUserConfig:t}=(0,u.useContext)(ol);return[!!e&&!C()(e,rl),(0,u.useCallback)((()=>t((()=>rl))),[t])]};function sl(e,t,n="all"){const{setUserConfig:o,...r}=(0,u.useContext)(ol),l=t?".blocks."+t:"",i=e?"."+e:"",s=`settings${l}${i}`,a=`settings${i}`,c="all"===n?"merged":n;return[(0,u.useMemo)((()=>{const t=r[c];if(!t)throw"Unsupported source";var n;if(e)return null!==(n=Wn(t,s))&&void 0!==n?n:Wn(t,a);let o={};return ll.forEach((e=>{var n;const r=null!==(n=Wn(t,`settings${l}.${e}`))&&void 0!==n?n:Wn(t,`settings.${e}`);void 0!==r&&(o=jn(o,e.split("."),r))})),o}),[r,c,e,s,a,l]),e=>{o((t=>jn(t,s.split("."),e)))}]}function al(e,t,n="all",{shouldDecodeEncode:o=!0}={}){const{merged:r,base:l,user:i,setUserConfig:s}=(0,u.useContext)(ol),a=e?"."+e:"",c=t?`styles.blocks.${t}${a}`:`styles${a}`;let d,p;switch(n){case"all":d=Wn(r,c),p=o?el(r,t,d):d;break;case"user":d=Wn(i,c),p=o?el(r,t,d):d;break;case"base":d=Wn(l,c),p=o?el(l,t,d):d;break;default:throw"Unsupported source"}return[p,n=>{s((l=>jn(l,c.split("."),o?function(e,t,n,o){if(!o)return o;const r=Xr[n],l=Yr.find((e=>e.cssVarInfix===r));if(!l)return o;const{valueKey:i,path:s}=l,a=Jr(e,t,s,i,o);return a?`var:preset|${r}|${a.slug}`:o}(r.settings,t,e,n):n)))}]}function cl(e,t,n){const{supportedStyles:o,supports:r}=(0,d.useSelect)((e=>({supportedStyles:ie(e(c.store)).getSupportedStyles(t,n),supports:e(c.store).getBlockType(t)?.supports})),[t,n]);return(0,u.useMemo)((()=>{const t={...e};return o.includes("fontSize")||(t.typography={...t.typography,fontSizes:{},customFontSize:!1}),o.includes("fontFamily")||(t.typography={...t.typography,fontFamilies:{}}),t.color={...t.color,text:t.color?.text&&o.includes("color"),background:t.color?.background&&(o.includes("background")||o.includes("backgroundColor")),button:t.color?.button&&o.includes("buttonColor"),heading:t.color?.heading&&o.includes("headingColor"),link:t.color?.link&&o.includes("linkColor"),caption:t.color?.caption&&o.includes("captionColor")},o.includes("background")||(t.color.gradients=[],t.color.customGradient=!1),o.includes("filter")||(t.color.defaultDuotone=!1,t.color.customDuotone=!1),["lineHeight","fontStyle","fontWeight","letterSpacing","textTransform","textDecoration","writingMode"].forEach((e=>{o.includes(e)||(t.typography={...t.typography,[e]:!1})})),o.includes("columnCount")||(t.typography={...t.typography,textColumns:!1}),["contentSize","wideSize"].forEach((e=>{o.includes(e)||(t.layout={...t.layout,[e]:!1})})),["padding","margin","blockGap"].forEach((e=>{o.includes(e)||(t.spacing={...t.spacing,[e]:!1});const n=Array.isArray(r?.spacing?.[e])?r?.spacing?.[e]:r?.spacing?.[e]?.sides;n?.length&&t.spacing?.[e]&&(t.spacing={...t.spacing,[e]:{...t.spacing?.[e],sides:n}})})),["aspectRatio","minHeight"].forEach((e=>{o.includes(e)||(t.dimensions={...t.dimensions,[e]:!1})})),["radius","color","style","width"].forEach((e=>{o.includes("border"+e.charAt(0).toUpperCase()+e.slice(1))||(t.border={...t.border,[e]:!1})})),t.shadow=!!o.includes("shadow")&&t.shadow,t}),[e,o,r])}function ul(e){const t=e?.color?.palette?.custom,n=e?.color?.palette?.theme,o=e?.color?.palette?.default,r=e?.color?.defaultPalette;return(0,u.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,x._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,x._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,x._x)("Custom","Indicates this palette is created by the user."),colors:t}),e}),[t,n,o,r])}function dl(e){const t=e?.color?.gradients?.custom,n=e?.color?.gradients?.theme,o=e?.color?.gradients?.default,r=e?.color?.defaultGradients;return(0,u.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,x._x)("Theme","Indicates this palette comes from the theme."),gradients:n}),r&&o&&o.length&&e.push({name:(0,x._x)("Default","Indicates this palette comes from WordPress."),gradients:o}),t&&t.length&&e.push({name:(0,x._x)("Custom","Indicates this palette is created by the user."),gradients:t}),e}),[t,n,o,r])}var pl=n(5755),ml=n.n(pl);const hl=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.entries(e).map((([e,t])=>[e,hl(t)])).filter((([,e])=>void 0!==e));return t.length?Object.fromEntries(t):void 0};function gl(e,t,n,o,r,l){if(Object.values(null!=e?e:{}).every((e=>!e)))return n;if(1===l.length&&n.innerBlocks.length===o.length)return n;let i=o[0]?.attributes;if(l.length>1&&o.length>1){if(!o[r])return n;i=o[r]?.attributes}let s=n;return Object.entries(e).forEach((([e,n])=>{n&&t[e].forEach((e=>{const t=Wn(i,e);t&&(s={...s,attributes:jn(s.attributes,e,t)})}))})),s}function fl(e,t,n){const o=(0,c.getBlockSupport)(e,t),r=o?.__experimentalSkipSerialization;return Array.isArray(r)?r.includes(n):r}function bl({id:e,css:t,assets:n,__unstableType:o}={}){const{setStyleOverride:r,deleteStyleOverride:l}=ie((0,d.useDispatch)(Nr)),i=(0,u.useId)();(0,u.useEffect)((()=>{if(!t&&!n)return;const s=e||i;return r(s,{id:e,css:t,assets:n,__unstableType:o}),()=>{l(s)}}),[e,t,n,o,i,r,l])}function vl(e,t){const[n,o,r,l,i,s,a,c,d,p,m,h,g,f,b,v,k,_,y,E,w,S,C,x,B,I,T,M,P,R,N,L,A,O,D,z,V,F,H,G,U,$,j,W,K,Z,q,Y,X,Q]=Ar("background.backgroundImage","background.backgroundSize","typography.fontFamilies.custom","typography.fontFamilies.default","typography.fontFamilies.theme","typography.fontSizes.custom","typography.fontSizes.default","typography.fontSizes.theme","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textColumns","typography.textDecoration","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.spacingSizes","spacing.units","dimensions.aspectRatio","dimensions.minHeight","layout","border.color","border.radius","border.style","border.width","color.custom","color.palette.custom","color.customDuotone","color.palette.theme","color.palette.default","color.defaultPalette","color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients","color.customGradient","color.background","color.link","color.text","color.heading","color.button","shadow");return cl((0,u.useMemo)((()=>({background:{backgroundImage:n,backgroundSize:o},color:{palette:{custom:N,theme:A,default:O},gradients:{custom:G,theme:U,default:$},duotone:{custom:V,theme:F,default:H},defaultGradients:j,defaultPalette:D,defaultDuotone:z,custom:R,customGradient:W,customDuotone:L,background:K,link:Z,heading:Y,button:X,text:q},typography:{fontFamilies:{custom:r,default:l,theme:i},fontSizes:{custom:s,default:a,theme:c},customFontSize:d,fontStyle:p,fontWeight:m,lineHeight:h,textColumns:g,textDecoration:f,textTransform:v,letterSpacing:k,writingMode:b},spacing:{spacingSizes:{custom:w},padding:_,margin:y,blockGap:E,units:S},border:{color:I,radius:T,style:M,width:P},dimensions:{aspectRatio:C,minHeight:x},layout:B,parentLayout:t,shadow:Q})),[n,o,r,l,i,s,a,c,d,p,m,h,g,f,v,k,b,_,y,E,w,S,C,x,B,t,I,T,M,P,R,N,L,A,O,D,z,V,F,H,G,U,$,j,W,K,Z,q,Y,X,Q]),e)}const kl=(0,u.memo)((function({index:e,useBlockProps:t,setAllWrapperProps:n,...o}){const r=t(o),l=t=>n((n=>{const o=[...n];return o[e]=t,o}));return(0,u.useEffect)((()=>(l(r),()=>{l(void 0)}))),null}));(0,m.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&(0,c.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));const _l=window.wp.components,yl={default:(0,_l.createSlotFill)("BlockControls"),block:(0,_l.createSlotFill)("BlockControlsBlock"),inline:(0,_l.createSlotFill)("BlockFormatControls"),other:(0,_l.createSlotFill)("BlockControlsOther"),parent:(0,_l.createSlotFill)("BlockControlsParent")};function El({group:e="default",controls:t,children:n,__experimentalShareWithChildBlocks:o=!1}){const r=function(e,t){const n=y();return n[h]?yl[e]?.Fill:n[g]&&t?yl.parent.Fill:null}(e,o);if(!r)return null;const l=(0,s.createElement)(s.Fragment,null,"default"===e&&(0,s.createElement)(_l.ToolbarGroup,{controls:t}),n);return(0,s.createElement)(_l.__experimentalStyleProvider,{document},(0,s.createElement)(r,null,(e=>{const{forwardedContext:t=[]}=e;return t.reduce(((e,[t,n])=>(0,s.createElement)(t,{...n},e)),l)})))}window.wp.warning;const{ComponentsContext:wl}=ie(_l.privateApis);function Sl({group:e="default",...t}){const n=(0,u.useContext)(_l.__experimentalToolbarContext),o=(0,u.useContext)(wl),r=(0,u.useMemo)((()=>({forwardedContext:[[_l.__experimentalToolbarContext.Provider,{value:n}],[wl.Provider,{value:o}]]})),[n,o]),l=yl[e]?.Slot,i=(0,_l.__experimentalUseSlotFills)(l?.__unstableName);if(!l)return null;if(!i?.length)return null;const a=(0,s.createElement)(l,{...t,bubblesVirtually:!0,fillProps:r});return"default"===e?a:(0,s.createElement)(_l.ToolbarGroup,null,a)}const Cl=El;Cl.Slot=Sl;const xl=e=>(0,s.createElement)(El,{group:"inline",...e});xl.Slot=e=>(0,s.createElement)(Sl,{group:"inline",...e});const Bl=Cl,Il=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),Tl=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})),Ml=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),Pl=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})),Rl=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})),Nl=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})),Ll=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.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"})),Al={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child:first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child:last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child:first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child:last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > *",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > *",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};function Ol(e,t=""){return e.split(",").map((e=>`.editor-styles-wrapper ${e}${t?` ${t}`:""}`)).join(",")}function Dl(e,t=Al,n,o){let r="";return t?.[n]?.spacingStyles?.length&&o&&t[n].spacingStyles.forEach((t=>{r+=`${Ol(e,t.selector.trim())} { `,r+=Object.entries(t.rules).map((([e,t])=>`${e}: ${t||o}`)).join("; "),r+="; }"})),r}function zl(e){const{contentSize:t,wideSize:n,type:o="default"}=e,r={},l=/^(?!0)\d+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i;return l.test(t)&&"constrained"===o&&(r.none=(0,x.sprintf)((0,x.__)("Max %s wide"),t)),l.test(n)&&(r.wide=(0,x.sprintf)((0,x.__)("Max %s wide"),n)),r}const Vl=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})),Fl=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,s.createElement)(Z.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,s.createElement)(Z.Path,{d:"m18 7.5v9h1.5v-9z"})),Hl=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,s.createElement)(Z.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,s.createElement)(Z.Path,{d:"m7.5 19.5h9v-1.5h-9z"})),Gl=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,s.createElement)(Z.Path,{d:"m16.5 6h-9v-1.5h9z"})),Ul=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,s.createElement)(Z.Path,{d:"m18 16.5v-9h1.5v9z"})),$l=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,s.createElement)(Z.Path,{d:"m16.5 19.5h-9v-1.5h9z",style:{fill:"#1e1e1e"}})),jl=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,s.createElement)(Z.Path,{d:"m4.5 16.5v-9h1.5v9z"})),Wl=["top","right","bottom","left"],Kl={top:void 0,right:void 0,bottom:void 0,left:void 0},Zl={custom:Vl,axial:Vl,horizontal:Fl,vertical:Hl,top:Gl,right:Ul,bottom:$l,left:jl},ql={default:(0,x.__)("Spacing control"),top:(0,x.__)("Top"),bottom:(0,x.__)("Bottom"),left:(0,x.__)("Left"),right:(0,x.__)("Right"),mixed:(0,x.__)("Mixed"),vertical:(0,x.__)("Vertical"),horizontal:(0,x.__)("Horizontal"),axial:(0,x.__)("Horizontal & vertical"),custom:(0,x.__)("Custom")},Yl={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function Xl(e){return!!e?.includes&&("0"===e||e.includes("var:preset|spacing|"))}function Ql(e,t){if(!Xl(e))return e;const n=ti(e),o=t.find((e=>String(e.slug)===n));return o?.size}function Jl(e,t){if(!e||Xl(e)||"0"===e)return e;const n=t.find((t=>String(t.size)===String(e)));return n?.slug?`var:preset|spacing|${n.slug}`:e}function ei(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function ti(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}function ni(e,t){if(!e||!e.length)return!1;const n=e.includes("horizontal")||e.includes("left")&&e.includes("right"),o=e.includes("vertical")||e.includes("top")&&e.includes("bottom");return"horizontal"===t?n:"vertical"===t?o:n||o}function oi(e,t="0"){const n=function(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:e?.top,left:t?e:e?.left}}(e);if(!n)return null;const o=ei(n?.top)||t,r=ei(n?.left)||t;return o===r?o:`${o} ${r}`}const ri=(0,s.createElement)(_l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(_l.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),li=(0,s.createElement)(_l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(_l.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),ii=(0,s.createElement)(_l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(_l.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),si=(0,s.createElement)(_l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(_l.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})),ai=(0,s.createElement)(_l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(_l.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})),ci={top:{icon:ii,title:(0,x._x)("Align top","Block vertical alignment setting")},center:{icon:li,title:(0,x._x)("Align middle","Block vertical alignment setting")},bottom:{icon:ri,title:(0,x._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:si,title:(0,x._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:ai,title:(0,x._x)("Space between","Block vertical alignment setting")}},ui=["top","center","bottom"];const di=function({value:e,onChange:t,controls:n=ui,isCollapsed:o=!0,isToolbar:r}){function l(n){return()=>t(e===n?void 0:n)}const i=ci[e],a=ci.top,c=r?_l.ToolbarGroup:_l.ToolbarDropdownMenu,u=r?{isCollapsed:o}:{};return(0,s.createElement)(c,{icon:i?i.icon:a.icon,label:(0,x._x)("Change vertical alignment","Block vertical alignment setting label"),controls:n.map((t=>({...ci[t],isActive:e===t,role:o?"menuitemradio":void 0,onClick:l(t)}))),...u})},pi=e=>(0,s.createElement)(di,{...e,isToolbar:!1}),mi=e=>(0,s.createElement)(di,{...e,isToolbar:!0}),hi={left:Il,center:Tl,right:Ml,"space-between":Pl,stretch:Rl};const gi=function({allowedControls:e=["left","center","right","space-between"],isCollapsed:t=!0,onChange:n,value:o,popoverProps:r,isToolbar:l}){const i=e=>{n(e===o?void 0:e)},a=o?hi[o]:hi.left,c=[{name:"left",icon:Il,title:(0,x.__)("Justify items left"),isActive:"left"===o,onClick:()=>i("left")},{name:"center",icon:Tl,title:(0,x.__)("Justify items center"),isActive:"center"===o,onClick:()=>i("center")},{name:"right",icon:Ml,title:(0,x.__)("Justify items right"),isActive:"right"===o,onClick:()=>i("right")},{name:"space-between",icon:Pl,title:(0,x.__)("Space between items"),isActive:"space-between"===o,onClick:()=>i("space-between")},{name:"stretch",icon:Rl,title:(0,x.__)("Stretch items"),isActive:"stretch"===o,onClick:()=>i("stretch")}],u=l?_l.ToolbarGroup:_l.ToolbarDropdownMenu,d=l?{isCollapsed:t}:{};return(0,s.createElement)(u,{icon:a,popoverProps:r,label:(0,x.__)("Change items justification"),controls:c.filter((t=>e.includes(t.name))),...d})},fi=e=>(0,s.createElement)(gi,{...e,isToolbar:!1}),bi=e=>(0,s.createElement)(gi,{...e,isToolbar:!0}),vi={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},ki={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},_i={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},yi=["wrap","nowrap"],Ei={name:"flex",label:(0,x.__)("Flex"),inspectorControls:function({layout:e={},onChange:t,layoutBlockSupport:n={}}){const{allowOrientation:o=!0}=n;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.Flex,null,(0,s.createElement)(_l.FlexItem,null,(0,s.createElement)(Ci,{layout:e,onChange:t})),(0,s.createElement)(_l.FlexItem,null,o&&(0,s.createElement)(Bi,{layout:e,onChange:t}))),(0,s.createElement)(xi,{layout:e,onChange:t}))},toolBarControls:function({layout:e={},onChange:t,layoutBlockSupport:n}){if(n?.allowSwitching)return null;const{allowVerticalAlignment:o=!0}=n;return(0,s.createElement)(Bl,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(Ci,{layout:e,onChange:t,isToolbar:!0}),o&&(0,s.createElement)(wi,{layout:e,onChange:t,isToolbar:!0}))},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:l=Al}){const{orientation:i="horizontal"}=t,s=n?.spacing?.blockGap&&!fl(o,"spacing","blockGap")?oi(n?.spacing?.blockGap,"0.5em"):void 0,a=vi[t.justifyContent],c=yi.includes(t.flexWrap)?t.flexWrap:"wrap",u=_i[t.verticalAlignment],d=ki[t.justifyContent]||ki.left;let p="";const m=[];return c&&"wrap"!==c&&m.push(`flex-wrap: ${c}`),"horizontal"===i?(u&&m.push(`align-items: ${u}`),a&&m.push(`justify-content: ${a}`)):(u&&m.push(`justify-content: ${u}`),m.push("flex-direction: column"),m.push(`align-items: ${d}`)),m.length&&(p=`${Ol(e)} {\n\t\t\t\t${m.join("; ")};\n\t\t\t}`),r&&s&&(p+=Dl(e,l,"flex",s)),p},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function wi({layout:e,onChange:t,isToolbar:n=!1}){const{orientation:o="horizontal"}=e,r="horizontal"===o?_i.center:_i.top,{verticalAlignment:l=r}=e,i=n=>{t({...e,verticalAlignment:n})};if(n)return(0,s.createElement)(pi,{onChange:i,value:l,controls:"horizontal"===o?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]});const a=[{value:"flex-start",label:(0,x.__)("Align items top")},{value:"center",label:(0,x.__)("Align items center")},{value:"flex-end",label:(0,x.__)("Align items bottom")}];return(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-vertical-alignment-control"},(0,s.createElement)("legend",null,(0,x.__)("Vertical alignment")),(0,s.createElement)("div",null,a.map(((e,t,n)=>(0,s.createElement)(_l.Button,{key:e,label:n,icon:t,isPressed:l===e,onClick:()=>i(e)})))))}const Si={placement:"bottom-start"};function Ci({layout:e,onChange:t,isToolbar:n=!1}){const{justifyContent:o="left",orientation:r="horizontal"}=e,l=n=>{t({...e,justifyContent:n})},i=["left","center","right"];if("horizontal"===r?i.push("space-between"):i.push("stretch"),n)return(0,s.createElement)(fi,{allowedControls:i,value:o,onChange:l,popoverProps:Si});const a=[{value:"left",icon:Il,label:(0,x.__)("Justify items left")},{value:"center",icon:Tl,label:(0,x.__)("Justify items center")},{value:"right",icon:Ml,label:(0,x.__)("Justify items right")}];return"horizontal"===r?a.push({value:"space-between",icon:Pl,label:(0,x.__)("Space between items")}):a.push({value:"stretch",icon:Rl,label:(0,x.__)("Stretch items")}),(0,s.createElement)(_l.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Justification"),value:o,onChange:l,className:"block-editor-hooks__flex-layout-justification-controls"},a.map((({value:e,icon:t,label:n})=>(0,s.createElement)(_l.__experimentalToggleGroupControlOptionIcon,{key:e,value:e,icon:t,label:n}))))}function xi({layout:e,onChange:t}){const{flexWrap:n="wrap"}=e;return(0,s.createElement)(_l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Allow to wrap to multiple lines"),onChange:n=>{t({...e,flexWrap:n?"wrap":"nowrap"})},checked:"wrap"===n})}function Bi({layout:e,onChange:t}){const{orientation:n="horizontal",verticalAlignment:o,justifyContent:r}=e;return(0,s.createElement)(_l.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,x.__)("Orientation"),value:n,onChange:n=>{let l=o,i=r;return"horizontal"===n?("space-between"===o&&(l="center"),"stretch"===r&&(i="left")):("stretch"===o&&(l="top"),"space-between"===r&&(i="left")),t({...e,orientation:n,verticalAlignment:l,justifyContent:i})}},(0,s.createElement)(_l.__experimentalToggleGroupControlOptionIcon,{icon:Nl,value:"horizontal",label:(0,x.__)("Horizontal")}),(0,s.createElement)(_l.__experimentalToggleGroupControlOptionIcon,{icon:Ll,value:"vertical",label:(0,x.__)("Vertical")}))}const Ii={name:"default",label:(0,x.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,style:t,blockName:n,hasBlockGapSupport:o,layoutDefinitions:r=Al}){const l=oi(t?.spacing?.blockGap);let i="";fl(n,"spacing","blockGap")||(l?.top?i=oi(l?.top):"string"==typeof l&&(i=oi(l)));let s="";return o&&i&&(s+=Dl(e,r,"default",i)),s},getOrientation:()=>"vertical",getAlignments(e,t){const n=zl(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 o=[{name:"left"},{name:"center"},{name:"right"}];if(!t){const{contentSize:t,wideSize:r}=e;t&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:n.wide})}return o.unshift({name:"none",info:n.none}),o}};const Ti=(0,u.forwardRef)((function({icon:e,size:t=24,...n},o){return(0,u.cloneElement)(e,{width:t,height:t,...n,ref:o})})),Mi=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})),Pi=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})),Ri=window.wp.styleEngine,Ni={name:"constrained",label:(0,x.__)("Constrained"),inspectorControls:function({layout:e,onChange:t,layoutBlockSupport:n={}}){const{wideSize:o,contentSize:r,justifyContent:l="center"}=e,{allowJustification:i=!0,allowCustomContentAndWideSize:a=!0}=n,c=[{value:"left",icon:Il,label:(0,x.__)("Justify items left")},{value:"center",icon:Tl,label:(0,x.__)("Justify items center")},{value:"right",icon:Ml,label:(0,x.__)("Justify items right")}],[u]=Ar("spacing.units"),d=(0,_l.__experimentalUseCustomUnits)({availableUnits:u||["%","px","em","rem","vw"]});return(0,s.createElement)(s.Fragment,null,a&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,s.createElement)(_l.__experimentalUnitControl,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,x.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,contentSize:n})},units:d}),(0,s.createElement)(Ti,{icon:Mi})),(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,s.createElement)(_l.__experimentalUnitControl,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,x.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,wideSize:n})},units:d}),(0,s.createElement)(Ti,{icon:Pi}))),(0,s.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,x.__)("Customize the width for all elements that are assigned to the center or wide columns."))),i&&(0,s.createElement)(_l.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Justification"),value:l,onChange:n=>{t({...e,justifyContent:n})}},c.map((({value:e,icon:t,label:n})=>(0,s.createElement)(_l.__experimentalToggleGroupControlOptionIcon,{key:e,value:e,icon:t,label:n})))))},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,layout:t={},style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:l=Al}){const{contentSize:i,wideSize:s,justifyContent:a}=t,c=oi(n?.spacing?.blockGap);let u="";fl(o,"spacing","blockGap")||(c?.top?u=oi(c?.top):"string"==typeof c&&(u=oi(c)));const d="left"===a?"0 !important":"auto !important",p="right"===a?"0 !important":"auto !important";let m=i||s?`\n\t\t\t\t\t${Ol(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=i?i:s};\n\t\t\t\t\t\tmargin-left: ${d};\n\t\t\t\t\t\tmargin-right: ${p};\n\t\t\t\t\t}\n\t\t\t\t\t${Ol(e,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=s?s:i};\n\t\t\t\t\t}\n\t\t\t\t\t${Ol(e,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";if("left"===a?m+=`${Ol(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${d}; }`:"right"===a&&(m+=`${Ol(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${p}; }`),n?.spacing?.padding){(0,Ri.getCSSRules)(n).forEach((t=>{"paddingRight"===t.key?m+=`\n\t\t\t\t\t${Ol(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${t.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`:"paddingLeft"===t.key&&(m+=`\n\t\t\t\t\t${Ol(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${t.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`)}))}return r&&u&&(m+=Dl(e,l,"constrained",u)),m},getOrientation:()=>"vertical",getAlignments(e){const t=zl(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:o}=e,r=[{name:"left"},{name:"center"},{name:"right"}];return n&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:t.wide}),r.unshift({name:"none",info:t.none}),r}},Li={px:600,"%":100,vw:100,vh:100,em:38,rem:38,svw:100,lvw:100,dvw:100,svh:100,lvh:100,dvh:100,vi:100,svi:100,lvi:100,dvi:100,vb:100,svb:100,lvb:100,dvb:100,vmin:100,svmin:100,lvmin:100,dvmin:100,vmax:100,svmax:100,lvmax:100,dvmax:100},Ai={name:"grid",label:(0,x.__)("Grid"),inspectorControls:function({layout:e={},onChange:t}){return e?.columnCount?(0,s.createElement)(Di,{layout:e,onChange:t}):(0,s.createElement)(Oi,{layout:e,onChange:t})},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:l=Al}){const{minimumColumnWidth:i="12rem",columnCount:s=null}=t,a=n?.spacing?.blockGap&&!fl(o,"spacing","blockGap")?oi(n?.spacing?.blockGap,"0.5em"):void 0;let c="";const u=[];return s?u.push(`grid-template-columns: repeat(${s}, minmax(0, 1fr))`):i&&u.push(`grid-template-columns: repeat(auto-fill, minmax(min(${i}, 100%), 1fr))`),u.length&&(c=`${Ol(e)} { ${u.join("; ")}; }`),r&&a&&(c+=Dl(e,l,"grid",a)),c},getOrientation:()=>"horizontal",getAlignments:()=>[]};function Oi({layout:e,onChange:t}){const{minimumColumnWidth:n="12rem"}=e,[o,r]=(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(n);return(0,s.createElement)("fieldset",null,(0,s.createElement)(_l.BaseControl.VisualLabel,{as:"legend"},(0,x.__)("Minimum column width")),(0,s.createElement)(_l.Flex,{gap:4},(0,s.createElement)(_l.FlexItem,{isBlock:!0},(0,s.createElement)(_l.__experimentalUnitControl,{size:"__unstable-large",onChange:n=>{t({...e,minimumColumnWidth:n})},onUnitChange:n=>{let l;["em","rem"].includes(n)&&"px"===r?l=(o/16).toFixed(2)+n:["em","rem"].includes(r)&&"px"===n?l=Math.round(16*o)+n:["vh","vw","%","svw","lvw","dvw","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(n)&&o>100&&(l=100+n),t({...e,minimumColumnWidth:l})},value:n,min:0})),(0,s.createElement)(_l.FlexItem,{isBlock:!0},(0,s.createElement)(_l.RangeControl,{onChange:n=>{t({...e,minimumColumnWidth:[n,r].join("")})},value:o,min:0,max:Li[r]||600,withInputField:!1}))))}function Di({layout:e,onChange:t}){const{columnCount:n=3}=e;return(0,s.createElement)(_l.RangeControl,{label:(0,x.__)("Columns"),value:n,onChange:n=>t({...e,columnCount:n}),min:1,max:6})}const zi=[Ii,Ei,Ni,Ai];function Vi(e="default"){return zi.find((t=>t.name===e))}const Fi={type:"default"},Hi=(0,u.createContext)(Fi),Gi=Hi.Provider;function Ui(){return(0,u.useContext)(Hi)}const $i=[],ji=["none","left","center","right","wide","full"],Wi=["wide","full"];function Ki(e=ji){e.includes("none")||(e=["none",...e]);const t=1===e.length&&"none"===e[0],[n,o,r]=(0,d.useSelect)((e=>{var n;if(t)return[!1,!1,!1];const o=e(Nr).getSettings();return[null!==(n=o.alignWide)&&void 0!==n&&n,o.supportsLayout,o.__unstableIsBlockBasedTheme]}),[t]),l=Ui();if(t)return $i;const i=Vi(l?.type);if(o){const t=i.getAlignments(l,r).filter((t=>e.includes(t.name)));return 1===t.length&&"none"===t[0].name?$i:t}if("default"!==i.name&&"constrained"!==i.name)return $i;const s=e.filter((e=>l.alignments?l.alignments.includes(e):!(!n&&Wi.includes(e))&&ji.includes(e))).map((e=>({name:e})));return 1===s.length&&"none"===s[0].name?$i:s}const Zi=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})),qi=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})),Yi=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})),Xi=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})),Qi={none:{icon:Zi,title:(0,x._x)("None","Alignment option")},left:{icon:qi,title:(0,x.__)("Align left")},center:{icon:Mi,title:(0,x.__)("Align center")},right:{icon:Yi,title:(0,x.__)("Align right")},wide:{icon:Pi,title:(0,x.__)("Wide width")},full:{icon:Xi,title:(0,x.__)("Full width")}};const Ji=function({value:e,onChange:t,controls:n,isToolbar:o,isCollapsed:r=!0}){const l=Ki(n);if(!!!l.length)return null;function i(n){t([e,"none"].includes(n)?void 0:n)}const a=Qi[e],c=Qi.none,u=o?_l.ToolbarGroup:_l.ToolbarDropdownMenu,d={icon:a?a.icon:c.icon,label:(0,x.__)("Align")},p=o?{isCollapsed:r,controls:l.map((({name:t})=>({...Qi[t],isActive:e===t||!e&&"none"===t,role:r?"menuitemradio":void 0,onClick:()=>i(t)})))}:{toggleProps:{describedBy:(0,x.__)("Change alignment")},children:({onClose:t})=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},l.map((({name:n,info:o})=>{const{icon:r,title:l}=Qi[n],a=n===e||!e&&"none"===n;return(0,s.createElement)(_l.MenuItem,{key:n,icon:r,iconPosition:"left",className:ml()("components-dropdown-menu__menu-item",{"is-active":a}),isSelected:a,onClick:()=>{i(n),t()},role:"menuitemradio",info:o},l)}))))};return(0,s.createElement)(u,{...d,...p})},es=e=>(0,s.createElement)(Ji,{...e,isToolbar:!1}),ts=e=>(0,s.createElement)(Ji,{...e,isToolbar:!0});function ns(e){const t=y(),{clientId:n=""}=t,{setBlockEditingMode:o,unsetBlockEditingMode:r}=(0,d.useDispatch)(Nr),l=(0,d.useSelect)((e=>n?null:e(Nr).getBlockEditingMode()),[n]);return(0,u.useEffect)((()=>(e&&o(n,e),()=>{e&&r(n)})),[n,e,o,r]),n?t[f]:l}const os=["left","center","right","wide","full"],rs=["wide","full"];function ls(e,t=!0,n=!0){let o;return o=Array.isArray(e)?os.filter((t=>e.includes(t))):!0===e?[...os]:[],!n||!0===e&&!t?o.filter((e=>!rs.includes(e))):o}const is={shareWithChildBlocks:!0,edit:function({name:e,align:t,setAttributes:n}){const o=Ki(ls((0,c.getBlockSupport)(e,"align"),(0,c.hasBlockSupport)(e,"alignWide",!0))).map((({name:e})=>e)),r=ns();return o.length&&"default"===r?(0,s.createElement)(Bl,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(es,{value:t,onChange:t=>{if(!t){const n=(0,c.getBlockType)(e),o=n?.attributes?.align?.default;o&&(t="")}n({align:t})},controls:o})):null},useBlockProps:function({name:e,align:t}){const n=ls((0,c.getBlockSupport)(e,"align"),(0,c.hasBlockSupport)(e,"alignWide",!0));if(Ki(n).some((e=>e.name===t)))return{"data-align":t};return{}},addSaveProps:function(e,t,n){const{align:o}=n,r=(0,c.getBlockSupport)(t,"align"),l=(0,c.hasBlockSupport)(t,"alignWide",!0),i=ls(r,l).includes(o);i&&(e.className=ml()(`align${o}`,e.className));return e},attributeKeys:["align"],hasSupport:e=>(0,c.hasBlockSupport)(e,"align",!1)};(0,m.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.align)&&void 0!==t?t:{})||(0,c.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...os,""]}}),e})),(0,m.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.lock)&&void 0!==t?t:{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));const ss=(0,_l.createSlotFill)("InspectorControls"),as=(0,_l.createSlotFill)("InspectorAdvancedControls"),cs=(0,_l.createSlotFill)("InspectorControlsBackground"),us=(0,_l.createSlotFill)("InspectorControlsBorder"),ds=(0,_l.createSlotFill)("InspectorControlsColor"),ps=(0,_l.createSlotFill)("InspectorControlsFilter"),ms=(0,_l.createSlotFill)("InspectorControlsDimensions"),hs=(0,_l.createSlotFill)("InspectorControlsPosition"),gs=(0,_l.createSlotFill)("InspectorControlsTypography"),fs=(0,_l.createSlotFill)("InspectorControlsListView"),bs=(0,_l.createSlotFill)("InspectorControlsStyles"),vs={default:ss,advanced:as,background:cs,border:us,color:ds,dimensions:ms,effects:(0,_l.createSlotFill)("InspectorControlsEffects"),filter:ps,list:fs,position:hs,settings:ss,styles:bs,typography:gs};function ks({children:e,group:t="default",__experimentalGroup:n,resetAllFilter:o}){n&&(w()("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=n);const r=y(),l=vs[t]?.Fill;return l&&r[h]?(0,s.createElement)(_l.__experimentalStyleProvider,{document},(0,s.createElement)(l,null,(t=>(0,s.createElement)(ys,{fillProps:t,children:e,resetAllFilter:o})))):null}function _s({resetAllFilter:e,children:t}){const{registerResetAllFilter:n,deregisterResetAllFilter:o}=(0,u.useContext)(_l.__experimentalToolsPanelContext);return(0,u.useEffect)((()=>{if(e&&n&&o)return n(e),()=>{o(e)}}),[e,n,o]),t}function ys({children:e,resetAllFilter:t,fillProps:n}){const{forwardedContext:o=[]}=n,r=(0,s.createElement)(_s,{resetAllFilter:t},e);return o.reduce(((e,[t,n])=>(0,s.createElement)(t,{...n},e)),r)}function Es({children:e,group:t,label:n}){const{updateBlockAttributes:o}=(0,d.useDispatch)(Nr),{getBlockAttributes:r,getMultiSelectedBlockClientIds:l,getSelectedBlockClientId:i,hasMultiSelection:a}=(0,d.useSelect)(Nr),c=i(),p=(0,u.useCallback)(((e=[])=>{const t={},n=a()?l():[c];n.forEach((n=>{const{style:o}=r(n);let l={style:o};e.forEach((e=>{l={...l,...e(l)}})),l={...l,style:hl(l.style)},t[n]=l})),o(n,t,!0)}),[r,l,a,c,o]);return(0,s.createElement)(_l.__experimentalToolsPanel,{className:`${t}-block-support-panel`,label:n,resetAll:p,key:c,panelId:c,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:Qr},e)}function ws({Slot:e,fillProps:t,...n}){const o=(0,u.useContext)(_l.__experimentalToolsPanelContext),r=(0,u.useMemo)((()=>{var e;return{...null!=t?t:{},forwardedContext:[...null!==(e=t?.forwardedContext)&&void 0!==e?e:[],[_l.__experimentalToolsPanelContext.Provider,{value:o}]]}}),[o,t]);return(0,s.createElement)(e,{...n,fillProps:r,bubblesVirtually:!0})}function Ss({__experimentalGroup:e,group:t="default",label:n,fillProps:o,...r}){e&&(w()("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);const l=vs[t]?.Slot,i=(0,_l.__experimentalUseSlotFills)(l?.__unstableName),a=(0,u.useContext)(_l.__unstableMotionContext),c=(0,u.useMemo)((()=>{var e;return{...null!=o?o:{},forwardedContext:[...null!==(e=o?.forwardedContext)&&void 0!==e?e:[],[_l.__unstableMotionContext.Provider,{value:a}]]}}),[a,o]);return l&&i?.length?n?(0,s.createElement)(Es,{group:t,label:n},(0,s.createElement)(ws,{...r,fillProps:c,Slot:l})):(0,s.createElement)(l,{...r,fillProps:c,bubblesVirtually:!0}):null}const Cs=ks;Cs.Slot=Ss;const xs=e=>(0,s.createElement)(ks,{...e,group:"advanced"});xs.Slot=e=>(0,s.createElement)(Ss,{...e,group:"advanced"}),xs.slotName="InspectorAdvancedControls";const Bs=Cs,Is=/[\s#]/g,Ts={type:"string",source:"attribute",attribute:"id",selector:"*"};const Ms={addSaveProps:function(e,t,n){(0,c.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor);return e},edit:function({name:e,anchor:t,setAttributes:n}){const o=ns(),r="web"===u.Platform.OS,l=(0,s.createElement)(_l.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,x.__)("HTML anchor"),help:(0,s.createElement)(s.Fragment,null,(0,x.__)("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."),r&&(0,s.createElement)(_l.ExternalLink,{href:(0,x.__)("https://wordpress.org/documentation/article/page-jumps/")},(0,x.__)("Learn more about anchors"))),value:t||"",placeholder:r?null:(0,x.__)("Add an anchor"),onChange:e=>{e=e.replace(Is,"-"),n({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,s.createElement)(s.Fragment,null,r&&"default"===o&&(0,s.createElement)(Bs,{group:"advanced"},l),!r&&"core/heading"===e&&(0,s.createElement)(Bs,null,(0,s.createElement)(_l.PanelBody,{title:(0,x.__)("Heading settings")},l)))},attributeKeys:["anchor"],hasSupport:e=>(0,c.hasBlockSupport)(e,"anchor")};(0,m.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.anchor)&&void 0!==t?t:{})||(0,c.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:Ts}),e}));const Ps={type:"string",source:"attribute",attribute:"aria-label",selector:"*"};const Rs={addSaveProps:function(e,t,n){return(0,c.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e},attributeKeys:["ariaLabel"],hasSupport:e=>(0,c.hasBlockSupport)(e,"ariaLabel")};(0,m.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){return e?.attributes?.ariaLabel?.type||(0,c.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:Ps}),e}));const Ns={edit:function({className:e,setAttributes:t}){return"default"!==ns()?null:(0,s.createElement)(Bs,{group:"advanced"},(0,s.createElement)(_l.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,x.__)("Additional CSS class(es)"),value:e||"",onChange:e=>{t({className:""!==e?e:void 0})},help:(0,x.__)("Separate multiple classes with spaces.")}))},addSaveProps:function(e,t,n){(0,c.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=ml()(e.className,n.className));return e},attributeKeys:["className"],hasSupport:e=>(0,c.hasBlockSupport)(e,"customClassName",!0)};(0,m.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",(function(e){return(0,c.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,m.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){if(!(0,c.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===o.length&&e.innerBlocks.length===t.length)return e;if(1===o.length&&t.length>1||o.length>1&&1===t.length)return e;if(t[n]){const o=t[n]?.attributes.className;if(o)return{...e,attributes:{...e.attributes,className:o}}}return e})),(0,m.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,c.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,c.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,c.getBlockDefaultClassName)(t.name)),e}));const Ls=window.wp.blob,As=window.wp.dom,Os=window.wp.notices,Ds=window.wp.url,zs=window.wp.keycodes,Vs=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,s.createElement)(Z.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})),Fs=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})),Hs=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"})),Gs=(0,_l.withFilters)("editor.MediaUpload")((()=>null));const Us=function({fallback:e=null,children:t}){const n=(0,d.useSelect)((e=>{const{getSettings:t}=e(Nr);return!!t().mediaUpload}),[]);return n?t:e},$s=window.wp.isShallowEqual;var js=n.n($s);const Ws=window.wp.preferences,Ks=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,s.createElement)(Z.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"})),Zs=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})),qs=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));const Ys=function e({children:t,settingsOpen:n,setSettingsOpen:o}){const r=(0,p.useReducedMotion)(),l=r?u.Fragment:_l.__unstableAnimatePresence,i=r?"div":_l.__unstableMotion.div,a=`link-control-settings-drawer-${(0,p.useInstanceId)(e)}`;return(0,s.createElement)(u.Fragment,null,(0,s.createElement)(_l.Button,{className:"block-editor-link-control__drawer-toggle","aria-expanded":n,onClick:()=>o(!n),icon:(0,x.isRTL)()?Zs:qs,"aria-controls":a},(0,x._x)("Advanced","Additional link settings")),(0,s.createElement)(l,null,n&&(0,s.createElement)(i,{className:"block-editor-link-control__drawer",hidden:!n,id:a,initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{opacity:1,height:"auto"},collapsed:{opacity:0,height:0}},transition:{duration:.1}},(0,s.createElement)("div",{className:"block-editor-link-control__drawer-inner"},t))))};var Xs=n(5428),Qs=n.n(Xs);function Js(e){return"function"==typeof e}class ea extends u.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||(0,u.createRef)(),this.inputRef=(0,u.createRef)(),this.updateSuggestions=(0,p.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.suggestionsRequest=null,this.state={suggestions:[],showSuggestions:!1,suggestionsValue:null,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:o,__experimentalShowInitialSuggestions:r=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,Qs()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value===o||this.props.disableSuggestions||(o?.length?this.updateSuggestions(o):r&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{__experimentalShowInitialSuggestions:e=!1,value:t}=this.props;return e&&!(t&&t.length)}updateSuggestions(e=""){const{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:n}=this.props;if(!t)return;const o=!e?.length;if(e=e.trim(),!o&&(e.length<2||!n&&(0,Ds.isURL)(e)))return this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null,void this.setState({suggestions:[],showSuggestions:!1,suggestionsValue:e,selectedSuggestion:null,loading:!1});this.setState({selectedSuggestion:null,loading:!0});const r=t(e,{isInitialSuggestions:o});r.then((t=>{this.suggestionsRequest===r&&(this.setState({suggestions:t,suggestionsValue:e,loading:!1,showSuggestions:!!t.length}),t.length?this.props.debouncedSpeak((0,x.sprintf)((0,x._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length),"assertive"):this.props.debouncedSpeak((0,x.__)("No results."),"assertive"))})).catch((()=>{this.suggestionsRequest===r&&this.setState({loading:!1})})).finally((()=>{this.suggestionsRequest===r&&(this.suggestionsRequest=null)})),this.suggestionsRequest=r}onChange(e){this.props.onChange(e.target.value)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||e&&e.length||null!==this.suggestionsRequest||this.updateSuggestions(n)}onKeyDown(e){this.props.onKeyDown?.(e);const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case zs.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case zs.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case zs.ENTER:this.props.onSubmit&&(e.preventDefault(),this.props.onSubmit(null,e))}return}const l=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case zs.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case zs.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case zs.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(l),this.props.speak((0,x.__)("Link selected.")));break;case zs.ENTER:e.preventDefault(),null!==this.state.selectedSuggestion?(this.selectLink(l),this.props.onSubmit&&this.props.onSubmit(l,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps({value:e,instanceId:t,disableSuggestions:n,__experimentalShowInitialSuggestions:o=!1},{showSuggestions:r}){let l=r;const i=e&&e.length;return o||i||(l=!1),!0===n&&(l=!1),{showSuggestions:l,suggestionsListboxId:`block-editor-url-input-suggestions-${t}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${t}`}}render(){return(0,s.createElement)(s.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{__nextHasNoMarginBottom:e=!1,label:t=null,className:n,isFullWidth:o,instanceId:r,placeholder:l=(0,x.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:a="",hideLabelFromVision:c=!1}=this.props,{loading:u,showSuggestions:d,selectedSuggestion:p,suggestionsListboxId:m,suggestionOptionIdPrefix:h}=this.state,g=`url-input-control-${r}`,f={id:g,label:t,className:ml()("block-editor-url-input",n,{"is-full-width":o}),hideLabelFromVision:c},b={id:g,value:a,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:l,onKeyDown:this.onKeyDown,role:"combobox","aria-label":t?void 0:(0,x.__)("URL"),"aria-expanded":d,"aria-autocomplete":"list","aria-owns":m,"aria-activedescendant":null!==p?`${h}-${p}`:void 0,ref:this.inputRef};return i?i(f,b,u):(e||w()("Bottom margin styles for wp.blockEditor.URLInput",{since:"6.2",version:"6.5",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"}),(0,s.createElement)(_l.BaseControl,{__nextHasNoMarginBottom:e,...f},(0,s.createElement)("input",{...b}),u&&(0,s.createElement)(_l.Spinner,null)))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:n,suggestions:o,suggestionsValue:r,selectedSuggestion:l,suggestionsListboxId:i,suggestionOptionIdPrefix:a,loading:c}=this.state;if(!n||0===o.length)return null;const u={id:i,ref:this.autocompleteRef,role:"listbox"},d=(e,t)=>({role:"option",tabIndex:"-1",id:`${a}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===l||void 0});return Js(t)?t({suggestions:o,selectedSuggestion:l,suggestionsListProps:u,buildSuggestionItemProps:d,isLoading:c,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!r?.length,currentInputValue:r}):(0,s.createElement)(_l.Popover,{placement:"bottom",focusOnMount:!1},(0,s.createElement)("div",{...u,className:ml()("block-editor-url-input__suggestions",`${e}__suggestions`)},o.map(((e,t)=>(0,s.createElement)(_l.Button,{...d(0,t),key:e.id,className:ml()("block-editor-url-input__suggestion",{"is-selected":t===l}),onClick:()=>this.handleOnClick(e)},e.title)))))}}const ta=(0,p.compose)(p.withSafeTimeout,_l.withSpokenMessages,p.withInstanceId,(0,d.withSelect)(((e,t)=>{if(Js(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(Nr);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(ea),na=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})),oa=({searchTerm:e,onClick:t,itemProps:n,buttonText:o})=>{if(!e)return null;let r;return r=o?"function"==typeof o?o(e):o:(0,u.createInterpolateElement)((0,x.sprintf)((0,x.__)("Create: <mark>%s</mark>"),e),{mark:(0,s.createElement)("mark",null)}),(0,s.createElement)(_l.MenuItem,{...n,iconPosition:"left",icon:na,className:"block-editor-link-control__search-item",onClick:t},r)},ra=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"})),la=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,s.createElement)(Z.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})),ia=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})),sa=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.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"})),aa=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})),ca=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})),ua=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})),da=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})),pa={post:ra,page:la,post_tag:ia,category:sa,attachment:aa};function ma({isURL:e,suggestion:t}){let n=null;return e?n=ca:t.type in pa&&(n=pa[t.type],"page"===t.type&&(t.isFrontPage&&(n=ua),t.isBlogHome&&(n=da))),n?(0,s.createElement)(Ti,{className:"block-editor-link-control__search-item-icon",icon:n}):null}function ha(e){const t=e?.trim();return t?.length?e?.replace(/^\/?/,"/"):e}function ga(e){const t=e?.trim();return t?.length?e?.replace(/\/$/,""):e}function fa(e){return e.isFrontPage?"front page":e.isBlogHome?"blog home":"post_tag"===e.type?"tag":e.type}const ba=({itemProps:e,suggestion:t,searchTerm:n,onClick:o,isURL:r=!1,shouldShowType:l=!1})=>{const i=r?(0,x.__)("Press ENTER to add this link"):(a=t.url)?(0,p.pipe)(Ds.safeDecodeURI,Ds.getPath,(e=>t=>null==t||t!=t?e:t)(""),((e,...t)=>(...n)=>e(...n,...t))(Ds.filterURLForDisplay,24),ga,ha)(a):a;var a;return(0,s.createElement)(_l.MenuItem,{...e,info:i,iconPosition:"left",icon:(0,s.createElement)(ma,{suggestion:t,isURL:r}),onClick:o,shortcut:l&&fa(t),className:"block-editor-link-control__search-item"},(0,s.createElement)(_l.TextHighlight,{text:(0,As.__unstableStripHTML)(t.title),highlight:n}))},va="__CREATE__",ka="link",_a="mailto",ya="internal",Ea=[ka,_a,"tel",ya],wa=[{id:"opensInNewTab",title:(0,x.__)("Open in new tab")}];function Sa({instanceId:e,withCreateSuggestion:t,currentInputValue:n,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:l,suggestions:i,selectedSuggestion:a,isLoading:c,isInitialSuggestions:u,createSuggestionButtonText:d,suggestionsQuery:p}){const m=ml()("block-editor-link-control__search-results",{"is-loading":c}),h=1===i.length&&Ea.includes(i[0].type),g=t&&!h&&!u,f=!p?.type,b=`block-editor-link-control-search-results-label-${e}`,v=u?(0,x.__)("Suggestions"):(0,x.sprintf)((0,x.__)('Search results for "%s"'),n),k=(0,s.createElement)(_l.VisuallyHidden,{id:b},v);return(0,s.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},k,(0,s.createElement)("div",{...r,className:m,"aria-labelledby":b},(0,s.createElement)(_l.MenuGroup,null,i.map(((e,t)=>g&&va===e.type?(0,s.createElement)(oa,{searchTerm:n,buttonText:d,onClick:()=>o(e),key:e.type,itemProps:l(e,t),isSelected:t===a}):va===e.type?null:(0,s.createElement)(ba,{key:`${e.id}-${e.type}`,itemProps:l(e,t),suggestion:e,index:t,onClick:()=>{o(e)},isSelected:t===a,isURL:Ea.includes(e.type),searchTerm:n,shouldShowType:f,isFrontPage:e?.isFrontPage,isBlogHome:e?.isBlogHome}))))))}function Ca(e){if(e.includes(" "))return!1;const t=(0,Ds.getProtocol)(e),n=(0,Ds.isValidProtocol)(t),o=function(e,t=6){const n=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(n)}(e),r=e?.startsWith("www."),l=e?.startsWith("#")&&(0,Ds.isValidFragment)(e);return n||r||l||o}const xa=()=>Promise.resolve([]),Ba=e=>{let t=ka;const n=(0,Ds.getProtocol)(e)||"";return n.includes("mailto")&&(t=_a),n.includes("tel")&&(t="tel"),e?.startsWith("#")&&(t=ya),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,Ds.prependHTTP)(e):e,type:t}])};function Ia(e,t,n){const{fetchSearchSuggestions:o,pageOnFront:r,pageForPosts:l}=(0,d.useSelect)((e=>{const{getSettings:t}=e(Nr);return{pageOnFront:t().pageOnFront,pageForPosts:t().pageForPosts,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),i=t?Ba:xa;return(0,u.useCallback)(((t,{isInitialSuggestions:s})=>Ca(t)?i(t,{isInitialSuggestions:s}):(async(e,t,n,o,r,l)=>{const{isInitialSuggestions:i}=t,s=await n(e,t);return s.map((e=>Number(e.id)===r?(e.isFrontPage=!0,e):Number(e.id)===l?(e.isBlogHome=!0,e):e)),i||Ca(e)||!o?s:s.concat({title:e,url:e,type:va})})(t,{...e,isInitialSuggestions:s},o,n,r,l)),[i,o,r,l,e,n])}const Ta=()=>Promise.resolve([]),Ma=()=>{},Pa=(0,u.forwardRef)((({value:e,children:t,currentLink:n={},className:o=null,placeholder:r=null,withCreateSuggestion:l=!1,onCreateSuggestion:i=Ma,onChange:a=Ma,onSelect:c=Ma,showSuggestions:d=!0,renderSuggestions:m=(e=>(0,s.createElement)(Sa,{...e})),fetchSuggestions:h=null,allowDirectEntry:g=!0,showInitialSuggestions:f=!1,suggestionsQuery:b={},withURLSuggestion:v=!0,createSuggestionButtonText:k,hideLabelFromVision:_=!1},y)=>{const E=Ia(b,g,l),w=d?h||E:Ta,S=(0,p.useInstanceId)(Pa),[C,B]=(0,u.useState)(),I=async e=>{let t=e;if(va!==e.type){if(g||t&&Object.keys(t).length>=1){const{id:e,url:o,...r}=null!=n?n:{};c({...r,...t},t)}}else try{t=await i(e.title),t?.url&&c(t)}catch(e){}};return(0,s.createElement)("div",{className:"block-editor-link-control__search-input-container"},(0,s.createElement)(ta,{disableSuggestions:n?.url===e,__nextHasNoMarginBottom:!0,label:(0,x.__)("Link"),hideLabelFromVision:_,className:o,value:e,onChange:(e,t)=>{a(e),B(t)},placeholder:null!=r?r:(0,x.__)("Search or type url"),__experimentalRenderSuggestions:d?e=>m({...e,instanceId:S,withCreateSuggestion:l,createSuggestionButtonText:k,suggestionsQuery:b,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),I(t)}}):null,__experimentalFetchLinkSuggestions:w,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:f,onSubmit:(t,n)=>{const o=t||C;o||e?.trim()?.length?I(o||{url:e}):n.preventDefault()},ref:y}),t)})),Ra=Pa,Na=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})),La=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})),Aa=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})),Oa=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})),{Slot:Da,Fill:za}=(0,_l.createSlotFill)("BlockEditorLinkControlViewer");function Va(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}const Fa=function(e){const[t,n]=(0,u.useReducer)(Va,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,d.useSelect)((e=>{const{getSettings:t}=e(Nr);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,u.useEffect)((()=>{if(e?.length&&o&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,r=t.signal;return o(e,{signal:r}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{r.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t};function Ha({value:e,onEditClick:t,hasRichPreviews:n=!1,hasUnlinkControl:o=!1,onRemove:r}){const l=(0,d.useSelect)((e=>e(Ws.store).get("core","showIconLabels")),[]),i=n?e?.url:null,{richData:a,isFetching:c}=Fa(i),u=a&&Object.keys(a).length,m=e&&(0,Ds.filterURLForDisplay)((0,Ds.safeDecodeURI)(e.url),24)||"",h=!e?.url?.length,g=!h&&(0,As.__unstableStripHTML)(a?.title||e?.title||m);let f;f=a?.icon?(0,s.createElement)("img",{src:a?.icon,alt:""}):h?(0,s.createElement)(Ti,{icon:Na,size:32}):(0,s.createElement)(Ti,{icon:ca});const{createNotice:b}=(0,d.useDispatch)(Os.store),v=(0,p.useCopyToClipboard)(e.url,(()=>{b("info",(0,x.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,s.createElement)("div",{"aria-label":(0,x.__)("Currently selected"),className:ml()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":u,"is-fetching":!!c,"is-preview":!0,"is-error":h,"is-url-title":g===m})},(0,s.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,s.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,s.createElement)("span",{className:ml()("block-editor-link-control__search-item-icon",{"is-image":a?.icon})},f),(0,s.createElement)("span",{className:"block-editor-link-control__search-item-details"},h?(0,s.createElement)("span",{className:"block-editor-link-control__search-item-error-notice"},(0,x.__)("Link is empty")):(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.ExternalLink,{className:"block-editor-link-control__search-item-title",href:e.url},(0,s.createElement)(_l.__experimentalTruncate,{numberOfLines:1},g)),e?.url&&g!==m&&(0,s.createElement)("span",{className:"block-editor-link-control__search-item-info"},(0,s.createElement)(_l.__experimentalTruncate,{numberOfLines:1},m))))),(0,s.createElement)(_l.Button,{icon:La,label:(0,x.__)("Edit link"),onClick:t,size:"compact"}),o&&(0,s.createElement)(_l.Button,{icon:Aa,label:(0,x.__)("Remove link"),onClick:r,size:"compact"}),(0,s.createElement)(_l.Button,{icon:Oa,label:(0,x.sprintf)((0,x.__)("Copy link%s"),h||l?"":": "+e.url),ref:v,disabled:h,size:"compact"}),(0,s.createElement)(Da,{fillProps:e})))}const Ga=()=>{},Ua=({value:e,onChange:t=Ga,settings:n})=>{if(!n||!n.length)return null;const o=n=>o=>{t({...e,[n.id]:o})},r=n.map((t=>(0,s.createElement)(_l.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-link-control__setting",key:t.id,label:t.title,onChange:o(t),checked:!!e&&!!e[t.id],help:t?.help})));return(0,s.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,s.createElement)(_l.VisuallyHidden,{as:"legend"},(0,x.__)("Currently selected link settings")),r)};const $a=e=>{let t=!1;return{promise:new Promise(((n,o)=>{e.then((e=>t?o({isCanceled:!0}):n(e)),(e=>o(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}};var ja=n(5215),Wa=n.n(ja);const Ka=()=>{},Za="core/block-editor",qa="linkControlSettingsDrawer";function Ya({searchInputPlaceholder:e,value:t,settings:n=wa,onChange:o=Ka,onRemove:r,onCancel:l,noDirectEntry:i=!1,showSuggestions:a=!0,showInitialSuggestions:c,forceIsEditingLink:p,createSuggestion:m,withCreateSuggestion:h,inputValue:g="",suggestionsQuery:f={},noURLSuggestion:b=!1,createSuggestionButtonText:v,hasRichPreviews:k=!1,hasTextControl:_=!1,renderControlBottom:y=null}){void 0===h&&m&&(h=!0);const[E,w]=(0,u.useState)(!1),{advancedSettingsPreference:S}=(0,d.useSelect)((e=>{var t;return{advancedSettingsPreference:null!==(t=e(Ws.store).get(Za,qa))&&void 0!==t&&t}}),[]),{set:C}=(0,d.useDispatch)(Ws.store),B=S||E,I=(0,u.useRef)(!0),T=(0,u.useRef)(),M=(0,u.useRef)(),P=(0,u.useRef)(!1),R=n.map((({id:e})=>e)),[N,L,A,O,D]=function(e){const[t,n]=(0,u.useState)(e||{}),[o,r]=(0,u.useState)(e);return Wa()(e,o)||(r(e),n(e)),[t,n,e=>{n({...t,url:e})},e=>{n({...t,title:e})},e=>o=>{const r=Object.keys(o).reduce(((t,n)=>(e.includes(n)&&(t[n]=o[n]),t)),{});n({...t,...r})}]}(t),z=t&&!(0,$s.isShallowEqualObjects)(N,t),[V,F]=(0,u.useState)(void 0!==p?p:!t||!t.url),{createPage:H,isCreatingPage:G,errorMessage:U}=function(e){const t=(0,u.useRef)(),[n,o]=(0,u.useState)(!1),[r,l]=(0,u.useState)(null);return(0,u.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),l(null);try{return t.current=$a(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw l(e.message||(0,x.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(m);(0,u.useEffect)((()=>{void 0!==p&&F(p)}),[p]),(0,u.useEffect)((()=>{if(I.current)return void(I.current=!1);(As.focus.focusable.find(T.current)[0]||T.current).focus(),P.current=!1}),[V,G]);const $=t?.url?.trim()?.length>0,j=()=>{P.current=!!T.current?.contains(T.current.ownerDocument.activeElement),F(!1)},W=()=>{z&&o({...t,...N,url:K}),j()},K=g||N?.url||"",Z=!K?.trim()?.length,q=r&&t&&!V&&!G,Y=V&&$,X=$&&_,Q=(V||!t)&&!G,J=!z||Z,ee=!!n?.length&&V&&$;return(0,s.createElement)("div",{tabIndex:-1,ref:T,className:"block-editor-link-control"},G&&(0,s.createElement)("div",{className:"block-editor-link-control__loading"},(0,s.createElement)(_l.Spinner,null)," ",(0,x.__)("Creating"),"…"),Q&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:ml()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":X,"has-actions":Y})},X&&(0,s.createElement)(_l.TextControl,{__nextHasNoMarginBottom:!0,ref:M,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,x.__)("Text"),value:N?.title,onChange:O,onKeyDown:e=>{const{keyCode:t}=e;t!==zs.ENTER||Z||(e.preventDefault(),W())},size:"__unstable-large"}),(0,s.createElement)(Ra,{currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:K,withCreateSuggestion:h,onCreateSuggestion:H,onChange:A,onSelect:e=>{const t=Object.keys(e).reduce(((t,n)=>(R.includes(n)||(t[n]=e[n]),t)),{});o({...N,...t,title:N?.title||e?.title}),j()},showInitialSuggestions:c,allowDirectEntry:!i,showSuggestions:a,suggestionsQuery:f,withURLSuggestion:!b,createSuggestionButtonText:v,hideLabelFromVision:!X}),!Y&&(0,s.createElement)("div",{className:"block-editor-link-control__search-enter"},(0,s.createElement)(_l.Button,{onClick:J?Ka:W,label:(0,x.__)("Submit"),icon:Ks,className:"block-editor-link-control__search-submit","aria-disabled":J}))),U&&(0,s.createElement)(_l.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},U)),t&&!V&&!G&&(0,s.createElement)(Ha,{key:t?.url,value:t,onEditClick:()=>F(!0),hasRichPreviews:k,hasUnlinkControl:q,onRemove:()=>{r(),F(!0)}}),ee&&(0,s.createElement)("div",{className:"block-editor-link-control__tools"},!Z&&(0,s.createElement)(Ys,{settingsOpen:B,setSettingsOpen:e=>{C&&C(Za,qa,e),w(e)}},(0,s.createElement)(Ua,{value:N,settings:n,onChange:D(R)}))),Y&&(0,s.createElement)(_l.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions"},(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:e=>{e.preventDefault(),e.stopPropagation(),L(t),$?j():r?.(),l?.()}},(0,x.__)("Cancel")),(0,s.createElement)(_l.Button,{variant:"primary",onClick:J?Ka:W,className:"block-editor-link-control__search-submit","aria-disabled":J},(0,x.__)("Save"))),!G&&y&&y())}Ya.ViewerFill=za,Ya.DEFAULT_LINK_SETTINGS=wa;const Xa=Ya,Qa=()=>{};let Ja=0;const ec=(0,p.compose)([(0,d.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(Os.store);return{createNotice:t,removeNotice:n}})),(0,_l.withFilters)("editor.MediaReplaceFlow")])((({mediaURL:e,mediaId:t,mediaIds:n,allowedTypes:o,accept:r,onError:l,onSelect:i,onSelectURL:a,onToggleFeaturedImage:c,useFeaturedImage:p,onFilesUpload:m=Qa,name:h=(0,x.__)("Replace"),createNotice:g,removeNotice:f,children:b,multiple:v=!1,addToGallery:k,handleUpload:_=!0,popoverProps:y})=>{const E=(0,d.useSelect)((e=>e(Nr).getSettings().mediaUpload),[]),w=!!E,S=(0,u.useRef)(),C="block-editor/media-replace-flow/error-notice/"+ ++Ja,B=e=>{const t=(0,As.__unstableStripHTML)(e);l?l(t):setTimeout((()=>{g("error",t,{speak:!0,id:C,isDismissible:!0})}),1e3)},I=(e,t)=>{p&&c&&c(),t(),i(e),(0,vo.speak)((0,x.__)("The media file has been replaced")),f(C)},T=e=>{e.keyCode===zs.DOWN&&(e.preventDefault(),e.target.click())},M=v&&!(!o||0===o.length)&&o.every((e=>"image"===e||e.startsWith("image/")));return(0,s.createElement)(_l.Dropdown,{popoverProps:y,contentClassName:"block-editor-media-replace-flow__options",renderToggle:({isOpen:e,onToggle:t})=>(0,s.createElement)(_l.ToolbarButton,{ref:S,"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:T},h),renderContent:({onClose:l})=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,s.createElement)(Us,null,(0,s.createElement)(Gs,{gallery:M,addToGallery:k,multiple:v,value:v?n:t,onSelect:e=>I(e,l),allowedTypes:o,render:({open:e})=>(0,s.createElement)(_l.MenuItem,{icon:Vs,onClick:e},(0,x.__)("Open Media Library"))}),(0,s.createElement)(_l.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!_)return t(),i(n);m(n),E({allowedTypes:o,filesList:n,onFileChange:([e])=>{I(e,t)},onError:B})})(e,l)},accept:r,multiple:!!v,render:({openFileDialog:e})=>(0,s.createElement)(_l.MenuItem,{icon:Fs,onClick:()=>{e()}},(0,x.__)("Upload"))})),c&&(0,s.createElement)(_l.MenuItem,{icon:Hs,onClick:c,isPressed:p},(0,x.__)("Use featured image")),b),a&&(0,s.createElement)("form",{className:ml()("block-editor-media-flow__url-input",{"has-siblings":w||c})},(0,s.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},(0,x.__)("Current media URL:")),(0,s.createElement)(Xa,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:e})=>{a(e),S.current.focus()}})))})})),tc="background",nc="image";function oc(e){return!!e?.background?.backgroundImage?.id||!!e?.background?.backgroundImage?.url}function rc(e,t="any"){if("web"!==u.Platform.OS)return!1;const n=(0,c.getBlockSupport)(e,tc);return!0===n||("any"===t?!!n?.backgroundImage||!!n?.backgroundSize||!!n?.backgroundRepeat:!!n?.[t])}function lc(e={},t){t({style:hl({...e,background:{...e?.background,backgroundImage:void 0}})})}function ic(e){return oc(e)?"has-background":""}function sc({label:e,filename:t,url:n}){const o=e||(0,Ds.getFilename)(n);return(0,s.createElement)(_l.__experimentalItemGroup,{as:"span"},(0,s.createElement)(_l.__experimentalHStack,{justify:"flex-start",as:"span"},(0,s.createElement)("span",{className:ml()("block-editor-hooks__background__inspector-image-indicator-wrapper",{"has-image":n}),"aria-hidden":!0},n&&(0,s.createElement)("span",{className:"block-editor-hooks__background__inspector-image-indicator",style:{backgroundImage:`url(${n})`}})),(0,s.createElement)(_l.FlexItem,{as:"span"},(0,s.createElement)(_l.__experimentalTruncate,{numberOfLines:1,className:"block-editor-hooks__background__inspector-media-replace-title"},o),(0,s.createElement)(_l.VisuallyHidden,{as:"span"},t?(0,x.sprintf)((0,x.__)("Selected image: %s"),t):(0,x.__)("No image selected")))))}function ac({clientId:e,isShownByDefault:t,setAttributes:n}){const{style:o,mediaUpload:r}=(0,d.useSelect)((t=>{const{getBlockAttributes:n,getSettings:o}=t(Nr);return{style:n(e)?.style,mediaUpload:o().mediaUpload}}),[e]),{id:l,title:i,url:a}=o?.background?.backgroundImage||{},c=(0,u.useRef)(),{createErrorNotice:p}=(0,d.useDispatch)(Os.store),m=e=>{p(e,{type:"snackbar"})},h=e=>{if(!e||!e.url){const e={...o,background:{...o?.background,backgroundImage:void 0}},t={style:hl(e)};return void n(t)}if((0,Ls.isBlobURL)(e.url))return;if(e.media_type&&e.media_type!==nc||!e.media_type&&e.type&&e.type!==nc)return void m((0,x.__)("Only images can be used as a background image."));const t={...o,background:{...o?.background,backgroundImage:{url:e.url,id:e.id,source:"file",title:e.title||void 0}}},r={style:hl(t)};n(r)},g=(0,u.useCallback)((e=>({...e,style:{...e.style,background:void 0}})),[]),f=oc(o);return(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>f,label:(0,x.__)("Background image"),onDeselect:()=>lc(o,n),isShownByDefault:t,resetAllFilter:g,panelId:e},(0,s.createElement)("div",{className:"block-editor-hooks__background__inspector-media-replace-container",ref:c},(0,s.createElement)(ec,{mediaId:l,mediaURL:a,allowedTypes:[nc],accept:"image/*",onSelect:h,name:(0,s.createElement)(sc,{label:(0,x.__)("Background image"),filename:i,url:a}),variant:"secondary"},f&&(0,s.createElement)(_l.MenuItem,{onClick:()=>{const[e]=As.focus.tabbable.find(c.current);e?.focus(),e?.click(),lc(o,n)}},(0,x.__)("Reset "))),(0,s.createElement)(_l.DropZone,{onFilesDrop:e=>{r({allowedTypes:["image"],filesList:e,onFileChange([e]){(0,Ls.isBlobURL)(e?.url)||h(e)},onError:m})},label:(0,x.__)("Drop to upload")})))}const cc=e=>{if(!e||isNaN(e.x)&&isNaN(e.y))return;return`${100*(isNaN(e.x)?.5:e.x)}% ${100*(isNaN(e.y)?.5:e.y)}%`},uc=e=>{if(!e)return{x:void 0,y:void 0};let[t,n]=e.split(" ").map((e=>parseFloat(e)/100));return t=isNaN(t)?void 0:t,n=isNaN(n)?t:n,{x:t,y:n}};function dc({clientId:e,isShownByDefault:t,setAttributes:n}){const o=(0,d.useSelect)((t=>t(Nr).getBlockAttributes(e)?.style),[e]),r=o?.background?.backgroundSize,l=o?.background?.backgroundRepeat,i=void 0!==r&&"cover"!==r&&"contain"!==r||""===r?"auto":r||"cover",a="no-repeat"!==l&&("cover"!==i||void 0!==l),c=function(e){return void 0!==e?.background?.backgroundPosition||void 0!==e?.background?.backgroundSize}(o),p=(0,u.useCallback)((e=>({...e,style:{...e.style,background:{...e.style?.background,backgroundRepeat:void 0,backgroundSize:void 0}}})),[]),m=e=>{let t=l;"contain"===e&&(t="no-repeat"),"cover"!==i&&"contain"!==i||"auto"!==e||(t=void 0),n({style:hl({...o,background:{...o?.background,backgroundRepeat:t,backgroundSize:e}})})};return(0,s.createElement)(_l.__experimentalVStack,{as:_l.__experimentalToolsPanelItem,spacing:2,className:"single-column",hasValue:()=>c,label:(0,x.__)("Size"),onDeselect:()=>function(e={},t){t({style:hl({...e,background:{...e?.background,backgroundPosition:void 0,backgroundRepeat:void 0,backgroundSize:void 0}})})}(o,n),isShownByDefault:t,resetAllFilter:p,panelId:e},(0,s.createElement)(_l.FocalPointPicker,{__next40pxDefaultSize:!0,label:(0,x.__)("Position"),url:o?.background?.backgroundImage?.url,value:uc(o?.background?.backgroundPosition),onChange:e=>{n({style:hl({...o,background:{...o?.background,backgroundPosition:cc(e)}})})}}),(0,s.createElement)(_l.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,x.__)("Size"),value:i,onChange:m,isBlock:!0,help:(h=r,"cover"===h||void 0===h?(0,x.__)("Image covers the space evenly."):"contain"===h?(0,x.__)("Image is contained without distortion."):(0,x.__)("Specify a fixed width."))},(0,s.createElement)(_l.__experimentalToggleGroupControlOption,{key:"cover",value:"cover",label:(0,x.__)("Cover")}),(0,s.createElement)(_l.__experimentalToggleGroupControlOption,{key:"contain",value:"contain",label:(0,x.__)("Contain")}),(0,s.createElement)(_l.__experimentalToggleGroupControlOption,{key:"fixed",value:"auto",label:(0,x.__)("Fixed")})),void 0!==r&&"cover"!==r&&"contain"!==r?(0,s.createElement)(_l.__experimentalUnitControl,{size:"__unstable-large",onChange:m,value:r}):null,"cover"!==i&&(0,s.createElement)(_l.ToggleControl,{label:(0,x.__)("Repeat"),checked:a,onChange:()=>{n({style:hl({...o,background:{...o?.background,backgroundRepeat:!0===a?"no-repeat":void 0}})})}}));var h}function pc(e){const[t,n]=Ar("background.backgroundImage","background.backgroundSize");if(!t||!rc(e.name,"backgroundImage"))return null;const o=!(!n||!rc(e.name,"backgroundSize")),r=(0,c.getBlockSupport)(e.name,[tc,"__experimentalDefaultControls"]);return(0,s.createElement)(Bs,{group:"background"},(0,s.createElement)(ac,{isShownByDefault:r?.backgroundImage,...e}),o&&(0,s.createElement)(dc,{isShownByDefault:r?.backgroundSize,...e}))}var mc={grad:.9,turn:360,rad:360/(2*Math.PI)},hc=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},gc=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},fc=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},bc=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},vc=function(e){return{r:fc(e.r,0,255),g:fc(e.g,0,255),b:fc(e.b,0,255),a:fc(e.a)}},kc=function(e){return{r:gc(e.r),g:gc(e.g),b:gc(e.b),a:gc(e.a,3)}},_c=/^#([0-9a-f]{3,8})$/i,yc=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Ec=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=Math.max(t,n,o),i=l-Math.min(t,n,o),s=i?l===t?(n-o)/i:l===n?2+(o-t)/i:4+(t-n)/i:0;return{h:60*(s<0?s+6:s),s:l?i/l*100:0,v:l/255*100,a:r}},wc=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var l=Math.floor(t),i=o*(1-n),s=o*(1-(t-l)*n),a=o*(1-(1-t+l)*n),c=l%6;return{r:255*[o,s,i,i,a,o][c],g:255*[a,o,o,s,i,i][c],b:255*[i,i,a,o,o,s][c],a:r}},Sc=function(e){return{h:bc(e.h),s:fc(e.s,0,100),l:fc(e.l,0,100),a:fc(e.a)}},Cc=function(e){return{h:gc(e.h),s:gc(e.s),l:gc(e.l),a:gc(e.a,3)}},xc=function(e){return wc((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},Bc=function(e){return{h:(t=Ec(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},Ic=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Tc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Mc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Pc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Rc={string:[[function(e){var t=_c.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?gc(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?gc(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Mc.exec(e)||Pc.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:vc({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=Ic.exec(e)||Tc.exec(e);if(!t)return null;var n,o,r=Sc({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(mc[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return xc(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=void 0===r?1:r;return hc(t)&&hc(n)&&hc(o)?vc({r:Number(t),g:Number(n),b:Number(o),a:Number(l)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,l=void 0===r?1:r;if(!hc(t)||!hc(n)||!hc(o))return null;var i=Sc({h:Number(t),s:Number(n),l:Number(o),a:Number(l)});return xc(i)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,l=void 0===r?1:r;if(!hc(t)||!hc(n)||!hc(o))return null;var i=function(e){return{h:bc(e.h),s:fc(e.s,0,100),v:fc(e.v,0,100),a:fc(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(l)});return wc(i)},"hsv"]]},Nc=function(e,t){for(var n=0;n<t.length;n++){var o=t[n][0](e);if(o)return[o,t[n][1]]}return[null,void 0]},Lc=function(e){return"string"==typeof e?Nc(e.trim(),Rc.string):"object"==typeof e&&null!==e?Nc(e,Rc.object):[null,void 0]},Ac=function(e,t){var n=Bc(e);return{h:n.h,s:fc(n.s+100*t,0,100),l:n.l,a:n.a}},Oc=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Dc=function(e,t){var n=Bc(e);return{h:n.h,s:n.s,l:fc(n.l+100*t,0,100),a:n.a}},zc=function(){function e(e){this.parsed=Lc(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return gc(Oc(this.rgba),2)},e.prototype.isDark=function(){return Oc(this.rgba)<.5},e.prototype.isLight=function(){return Oc(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=kc(this.rgba)).r,n=e.g,o=e.b,l=(r=e.a)<1?yc(gc(255*r)):"","#"+yc(t)+yc(n)+yc(o)+l;var e,t,n,o,r,l},e.prototype.toRgb=function(){return kc(this.rgba)},e.prototype.toRgbString=function(){return t=(e=kc(this.rgba)).r,n=e.g,o=e.b,(r=e.a)<1?"rgba("+t+", "+n+", "+o+", "+r+")":"rgb("+t+", "+n+", "+o+")";var e,t,n,o,r},e.prototype.toHsl=function(){return Cc(Bc(this.rgba))},e.prototype.toHslString=function(){return t=(e=Cc(Bc(this.rgba))).h,n=e.s,o=e.l,(r=e.a)<1?"hsla("+t+", "+n+"%, "+o+"%, "+r+")":"hsl("+t+", "+n+"%, "+o+"%)";var e,t,n,o,r},e.prototype.toHsv=function(){return e=Ec(this.rgba),{h:gc(e.h),s:gc(e.s),v:gc(e.v),a:gc(e.a,3)};var e},e.prototype.invert=function(){return Vc({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),Vc(Ac(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Vc(Ac(this.rgba,-e))},e.prototype.grayscale=function(){return Vc(Ac(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Vc(Dc(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Vc(Dc(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?Vc({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):gc(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Bc(this.rgba);return"number"==typeof e?Vc({h:e,s:t.s,l:t.l,a:t.a}):gc(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Vc(e).toHex()},e}(),Vc=function(e){return e instanceof zc?e:new zc(e)},Fc=[],Hc=function(e){e.forEach((function(e){Fc.indexOf(e)<0&&(e(zc,Rc),Fc.push(e))}))};function Gc(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var l={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,i,s=o[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var a=this.toRgb(),c=1/0,u="black";if(!l.length)for(var d in n)l[d]=new e(n[d]).toRgb();for(var p in n){var m=(r=a,i=l[p],Math.pow(r.r-i.r,2)+Math.pow(r.g-i.g,2)+Math.pow(r.b-i.b,2));m<c&&(c=m,u=p)}return u}},t.string.push([function(t){var o=t.toLowerCase(),r="transparent"===o?"#0000":n[o];return r?new e(r).toRgb():null},"name"])}var Uc=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},$c=function(e){return.2126*Uc(e.r)+.7152*Uc(e.g)+.0722*Uc(e.b)};function jc(e){e.prototype.luminance=function(){return e=$c(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,o,r,l,i,s,a,c=t instanceof e?t:new e(t);return l=this.rgba,i=c.toRgb(),n=(s=$c(l))>(a=$c(i))?(s+.05)/(a+.05):(a+.05)/(s+.05),void 0===(o=2)&&(o=0),void 0===r&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(l=(n=t).size)?"normal":l,"AAA"===(r=void 0===(o=n.level)?"AA":o)&&"normal"===i?7:"AA"===r&&"large"===i?3:4.5);var n,o,r,l,i}}Hc([Gc,jc]);const Wc=(e,t,n)=>{if(t){const n=e?.find((e=>e.slug===t));if(n)return n}return{color:n}},Kc=(e,t)=>e?.find((e=>e.color===t));function Zc(e,t){if(!e||!t)return;const{kebabCase:n}=ie(_l.privateApis);return`has-${n(t)}-${e}`}function qc(){const[e,t,n,o,r,l,i,s,a,c]=Ar("color.custom","color.palette.custom","color.palette.theme","color.palette.default","color.defaultPalette","color.customGradient","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients"),d={disableCustomColors:!e,disableCustomGradients:!l};return d.colors=(0,u.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,x._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,x._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,x._x)("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[t,n,o,r]),d.gradients=(0,u.useMemo)((()=>{const e=[];return s&&s.length&&e.push({name:(0,x._x)("Theme","Indicates this palette comes from the theme."),gradients:s}),c&&a&&a.length&&e.push({name:(0,x._x)("Default","Indicates this palette comes from WordPress."),gradients:a}),i&&i.length&&e.push({name:(0,x._x)("Custom","Indicates this palette is created by the user."),gradients:i}),e}),[i,s,a,c]),d.hasColorsOrGradients=!!d.colors.length||!!d.gradients.length,d}function Yc(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function Xc(e={}){const{flat:t,...n}=e;return t||Yc(Object.values(n).filter(Boolean))||"px"}function Qc(e={}){if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(e))),n=t.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),o=t.map((e=>e[1])),r=n.every((e=>e===n[0]))?n[0]:"",l=Yc(o);return 0===r||r?`${r}${l}`:void 0}function Jc(e={}){const t=Qc(e);return"string"!=typeof e&&isNaN(parseFloat(t))}function eu(e){if(!e)return!1;if("string"==typeof e)return!0;return!!Object.values(e).filter((e=>!!e||0===e)).length}function tu({onChange:e,selectedUnits:t,setSelectedUnits:n,values:o,...r}){let l=Qc(o);void 0===l&&(l=Xc(t));const i=eu(o)&&Jc(o),a=i?(0,x.__)("Mixed"):null;return(0,s.createElement)(_l.__experimentalUnitControl,{...r,"aria-label":(0,x.__)("Border radius"),disableUnits:i,isOnly:!0,value:l,onChange:t=>{const n=!isNaN(parseFloat(t));e(n?t:void 0)},onUnitChange:e=>{n({topLeft:e,topRight:e,bottomLeft:e,bottomRight:e})},placeholder:a,size:"__unstable-large"})}const nu={topLeft:(0,x.__)("Top left"),topRight:(0,x.__)("Top right"),bottomLeft:(0,x.__)("Bottom left"),bottomRight:(0,x.__)("Bottom right")};function ou({onChange:e,selectedUnits:t,setSelectedUnits:n,values:o,...r}){const l=t=>n=>{if(!e)return;const o=!isNaN(parseFloat(n))?n:void 0;e({...i,[t]:o})},i="string"!=typeof o?o:{topLeft:o,topRight:o,bottomLeft:o,bottomRight:o};return(0,s.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(nu).map((([e,o])=>{const[a,c]=(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(i[e]),u=i[e]?c:t[e]||t.flat;return(0,s.createElement)(_l.Tooltip,{text:o,placement:"top",key:e},(0,s.createElement)("div",{className:"components-border-radius-control__tooltip-wrapper"},(0,s.createElement)(_l.__experimentalUnitControl,{...r,"aria-label":o,value:[a,u].join(""),onChange:l(e),onUnitChange:(d=e,e=>{const o={...t};o[d]=e,n(o)}),size:"__unstable-large"})));var d})))}const ru=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"}));function lu({isLinked:e,...t}){const n=e?(0,x.__)("Unlink radii"):(0,x.__)("Link radii");return(0,s.createElement)(_l.Tooltip,{text:n},(0,s.createElement)(_l.Button,{...t,className:"component-border-radius-control__linked-button",size:"small",icon:e?ru:Aa,iconSize:24,"aria-label":n}))}const iu={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},su=0,au={px:100,em:20,rem:20};function cu({onChange:e,values:t}){const[n,o]=(0,u.useState)(!eu(t)||!Jc(t)),[r,l]=(0,u.useState)({flat:"string"==typeof t?(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[i]=Ar("spacing.units"),a=(0,_l.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"]}),c=Xc(r),d=a&&a.find((e=>e.value===c)),p=d?.step||1,[m]=(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(Qc(t));return(0,s.createElement)("fieldset",{className:"components-border-radius-control"},(0,s.createElement)(_l.BaseControl.VisualLabel,{as:"legend"},(0,x.__)("Radius")),(0,s.createElement)("div",{className:"components-border-radius-control__wrapper"},n?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(tu,{className:"components-border-radius-control__unit-control",values:t,min:su,onChange:e,selectedUnits:r,setSelectedUnits:l,units:a}),(0,s.createElement)(_l.RangeControl,{label:(0,x.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:null!=m?m:"",min:su,max:au[c],initialPosition:0,withInputField:!1,onChange:t=>{e(void 0!==t?`${t}${c}`:void 0)},step:p,__nextHasNoMarginBottom:!0})):(0,s.createElement)(ou,{min:su,onChange:e,selectedUnits:r,setSelectedUnits:l,values:t||iu,units:a}),(0,s.createElement)(lu,{onClick:()=>o(!n),isLinked:n})))}const uu=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),du=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.Path,{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z"})),pu=[];function mu({shadow:e,onShadowChange:t,settings:n}){const o=bu(n);return(0,s.createElement)("div",{className:"block-editor-global-styles__shadow-popover-container"},(0,s.createElement)(_l.__experimentalVStack,{spacing:4},(0,s.createElement)(_l.__experimentalHeading,{level:5},(0,x.__)("Drop shadow")),(0,s.createElement)(hu,{presets:o,activeShadow:e,onSelect:t}),(0,s.createElement)("div",{className:"block-editor-global-styles__clear-shadow"},(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:()=>t(void 0)},(0,x.__)("Clear")))))}function hu({presets:e,activeShadow:t,onSelect:n}){const{CompositeV2:o,useCompositeStoreV2:r}=ie(_l.privateApis),l=r();return e?(0,s.createElement)(o,{store:l,role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,x.__)("Drop shadows")},e.map((({name:e,slug:o,shadow:r})=>(0,s.createElement)(gu,{key:o,label:e,isActive:r===t,type:"unset"===o?"unset":"preset",onSelect:()=>n(r===t?void 0:r),shadow:r})))):null}function gu({type:e,label:t,isActive:n,onSelect:o,shadow:r}){const{CompositeItemV2:l}=ie(_l.privateApis);return(0,s.createElement)(l,{role:"option","aria-label":t,"aria-selected":n,className:ml()("block-editor-global-styles__shadow__item",{"is-active":n}),render:(0,s.createElement)(_l.Button,{className:ml()("block-editor-global-styles__shadow-indicator",{unset:"unset"===e}),onClick:o,label:t,style:{boxShadow:r},showTooltip:!0},n&&(0,s.createElement)(Ti,{icon:uu}))})}function fu({shadow:e,onShadowChange:t,settings:n}){return(0,s.createElement)(_l.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:({onToggle:e,isOpen:t})=>{const n={onClick:e,className:ml()({"is-open":t}),"aria-expanded":t};return(0,s.createElement)(_l.Button,{...n},(0,s.createElement)(_l.__experimentalHStack,{justify:"flex-start"},(0,s.createElement)(Ti,{className:"block-editor-global-styles__toggle-icon",icon:du,size:24}),(0,s.createElement)(_l.FlexItem,null,(0,x.__)("Drop shadow"))))},renderContent:()=>(0,s.createElement)(_l.__experimentalDropdownContentWrapper,{paddingSize:"medium"},(0,s.createElement)(mu,{shadow:e,onShadowChange:t,settings:n}))})}function bu(e){return(0,u.useMemo)((()=>{var t;if(!e?.shadow)return pu;const n=e?.shadow?.defaultPresets,{default:o,theme:r}=null!==(t=e?.shadow?.presets)&&void 0!==t?t:{},l={name:(0,x.__)("Unset"),slug:"unset",shadow:"none"},i=[...n&&o||pu,...r||pu];return i.length&&i.unshift(l),i}),[e])}function vu(e){return Object.values(ku(e)).some(Boolean)}function ku(e){return{hasBorderColor:_u(e),hasBorderRadius:yu(e),hasBorderStyle:Eu(e),hasBorderWidth:wu(e),hasShadow:Su(e)}}function _u(e){return e?.border?.color}function yu(e){return e?.border?.radius}function Eu(e){return e?.border?.style}function wu(e){return e?.border?.width}function Su(e){const t=bu(e);return!!e?.shadow&&t.length>0}function Cu({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r,label:l}){return(0,s.createElement)(_l.__experimentalToolsPanel,{label:l,resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:Qr},r)}const xu={radius:!0,color:!0,width:!0,shadow:!1};function Bu({as:e=Cu,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:l,name:i,defaultControls:a=xu}){var c,d;const p=ul(r),m=(0,u.useCallback)((e=>el({settings:r},"",e)),[r]),h=e=>{const t=p.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},g=(0,u.useMemo)((()=>{if((0,_l.__experimentalHasSplitBorders)(o?.border)){const e={...o?.border};return["top","right","bottom","left"].forEach((t=>{e[t]={...e[t],color:m(e[t]?.color)}})),e}return{...o?.border,color:o?.border?.color?m(o?.border?.color):void 0}}),[o?.border,m]),f=e=>n({...t,border:e}),b=_u(r),v=Eu(r),k=wu(r),_=yu(r),y=m(g?.radius),E=e=>f({...g,radius:e}),w=()=>{const e=t?.border?.radius;return"object"==typeof e?Object.entries(e).some(Boolean):!!e},S=Su(r),C=m(o?.shadow),B=null!==(d=Qn(null!==(c=r?.shadow?.presets)&&void 0!==c?c:{}))&&void 0!==d?d:[],I=e=>{const o=B?.find((({shadow:t})=>t===e))?.slug;n(jn(t,["shadow"],o?`var:preset|shadow|${o}`:e||void 0))},T=(0,u.useCallback)((e=>({...e,border:void 0,shadow:void 0})),[]),M=a?.color||a?.width,P=b||v||k||_,R=zu({blockName:i,hasShadowControl:S,hasBorderControl:P});return(0,s.createElement)(e,{resetAllFilter:T,value:t,onChange:n,panelId:l,label:R},(k||b)&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:()=>(0,_l.__experimentalIsDefinedBorder)(t?.border),label:(0,x.__)("Border"),onDeselect:()=>(()=>{if(w())return f({radius:t?.border?.radius});f(void 0)})(),isShownByDefault:M,panelId:l},(0,s.createElement)(_l.__experimentalBorderBoxControl,{colors:p,enableAlpha:!0,enableStyle:v,onChange:e=>{const t={...e};(0,_l.__experimentalHasSplitBorders)(t)?["top","right","bottom","left"].forEach((e=>{t[e]&&(t[e]={...t[e],color:h(t[e]?.color)})})):t&&(t.color=h(t.color)),f({radius:g?.radius,...t})},popoverOffset:40,popoverPlacement:"left-start",value:g,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!S,label:(0,x.__)("Border")})),_&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:w,label:(0,x.__)("Radius"),onDeselect:()=>E(void 0),isShownByDefault:a.radius,panelId:l},(0,s.createElement)(cu,{values:y,onChange:e=>{E(e||void 0)}})),S&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{label:(0,x.__)("Shadow"),hasValue:()=>!!t?.shadow,onDeselect:()=>I(void 0),isShownByDefault:a.shadow,panelId:l},P?(0,s.createElement)(_l.BaseControl.VisualLabel,{as:"legend"},(0,x.__)("Shadow")):null,(0,s.createElement)(_l.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,s.createElement)(fu,{shadow:C,onShadowChange:I,settings:r}))))}const Iu="__experimentalBorder",Tu="shadow",Mu=(e,t,n)=>{let o;return e.some((e=>e.colors.some((e=>e[t]===n&&(o=e,!0))))),o},Pu=({colors:e,namedColor:t,customColor:n})=>{if(t){const n=Mu(e,"slug",t);if(n)return n}if(!n)return{color:void 0};const o=Mu(e,"color",n);return o||{color:n}};function Ru(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function Nu(e){if((0,_l.__experimentalHasSplitBorders)(e?.border))return{style:e,borderColor:void 0};const t=e?.border?.color,n=t?.startsWith("var:preset|color|")?t.substring(17):void 0,o={...e};return o.border={...o.border,color:n?void 0:t},{style:hl(o),borderColor:n}}function Lu(e){return(0,_l.__experimentalHasSplitBorders)(e.style?.border)?e.style:{...e.style,border:{...e.style?.border,color:e.borderColor?"var:preset|color|"+e.borderColor:e.style?.border?.color}}}function Au({label:e,children:t,resetAllFilter:n}){const o=(0,u.useCallback)((e=>{const t=Lu(e),o=n(t);return{...e,...Nu(o)}}),[n]);return(0,s.createElement)(Bs,{group:"border",resetAllFilter:o,label:e},t)}function Ou({clientId:e,name:t,setAttributes:n,settings:o}){const r=vu(o);const{style:l,borderColor:i}=(0,d.useSelect)((function(t){const{style:n,borderColor:o}=t(Nr).getBlockAttributes(e)||{};return{style:n,borderColor:o}}),[e]),a=(0,u.useMemo)((()=>Lu({style:l,borderColor:i})),[l,i]);if(!r)return null;const p={...(0,c.getBlockSupport)(t,[Iu,"__experimentalDefaultControls"]),...(0,c.getBlockSupport)(t,[Tu,"__experimentalDefaultControls"])};return(0,s.createElement)(Bu,{as:Au,panelId:e,settings:o,value:a,onChange:e=>{n(Nu(e))},defaultControls:p})}function Du(e,t="any"){if("web"!==u.Platform.OS)return!1;const n=(0,c.getBlockSupport)(e,Iu);return!0===n||("any"===t?!!(n?.color||n?.radius||n?.width||n?.style):!!n?.[t])}function zu({blockName:e,hasBorderControl:t,hasShadowControl:n}={}){const o=ku(vl(e));return t||n||!e||(t=o?.hasBorderColor||o?.hasBorderStyle||o?.hasBorderWidth||o?.hasBorderRadius,n=o?.hasShadow),t&&n?(0,x.__)("Border & Shadow"):n?(0,x.__)("Shadow"):(0,x.__)("Border")}function Vu(e,t,n){if(!Du(t,"color")||fl(t,Iu,"color"))return e;const o=Fu(n),r=ml()(e.className,o);return e.className=r||void 0,e}function Fu(e){const{borderColor:t,style:n}=e,o=Zc("border-color",t);return ml()({"has-border-color":t||n?.border?.color,[o]:!!o})}const Hu={useBlockProps:function({name:e,borderColor:t,style:n}){const{colors:o}=qc();if(!Du(e,"color")||fl(e,Iu,"color"))return{};const{color:r}=Pu({colors:o,namedColor:t}),{color:l}=Pu({colors:o,namedColor:Ru(n?.border?.top?.color)}),{color:i}=Pu({colors:o,namedColor:Ru(n?.border?.right?.color)}),{color:s}=Pu({colors:o,namedColor:Ru(n?.border?.bottom?.color)}),{color:a}=Pu({colors:o,namedColor:Ru(n?.border?.left?.color)});return Vu({style:hl({borderTopColor:l||r,borderRightColor:i||r,borderBottomColor:s||r,borderLeftColor:a||r})||{}},e,{borderColor:t,style:n})},addSaveProps:Vu,attributeKeys:["borderColor","style"],hasSupport:e=>Du(e,"color")};function Gu(e){if(e)return`has-${e}-gradient-background`}function Uu(e,t){const n=e?.find((e=>e.slug===t));return n&&n.gradient}function $u(e,t){const n=e?.find((e=>e.gradient===t));return n}function ju(e,t){const n=$u(e,t);return n&&n.slug}function Wu({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){const{clientId:n}=y(),[o,r,l]=Ar("color.gradients.custom","color.gradients.theme","color.gradients.default"),i=(0,u.useMemo)((()=>[...o||[],...r||[],...l||[]]),[o,r,l]),{gradient:s,customGradient:a}=(0,d.useSelect)((o=>{const{getBlockAttributes:r}=o(Nr),l=r(n)||{};return{customGradient:l[t],gradient:l[e]}}),[n,e,t]),{updateBlockAttributes:c}=(0,d.useDispatch)(Nr),p=(0,u.useCallback)((o=>{const r=ju(i,o);c(n,r?{[e]:r,[t]:void 0}:{[e]:void 0,[t]:o})}),[i,n,c]),m=Gu(s);let h;return h=s?Uu(i,s):a,{gradientClass:m,gradientValue:h,setGradient:p}}(0,m.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Du(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e}));const Ku=["colors","disableCustomColors","gradients","disableCustomGradients"],Zu={color:"color",gradient:"gradient"};function qu({colors:e,gradients:t,disableCustomColors:n,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,className:l,label:i,onColorChange:a,onGradientChange:c,colorValue:u,gradientValue:d,clearable:p,showTitle:m=!0,enableAlpha:h,headingLevel:g}){const f=a&&(e&&e.length>0||!n),b=c&&(t&&t.length>0||!o);if(!f&&!b)return null;const v={[Zu.color]:(0,s.createElement)(_l.ColorPalette,{value:u,onChange:b?e=>{a(e),c()}:a,colors:e,disableCustomColors:n,__experimentalIsRenderedInSidebar:r,clearable:p,enableAlpha:h,headingLevel:g}),[Zu.gradient]:(0,s.createElement)(_l.GradientPicker,{value:d,onChange:f?e=>{c(e),a()}:c,gradients:t,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,clearable:p,headingLevel:g})},k=e=>(0,s.createElement)("div",{className:"block-editor-color-gradient-control__panel"},v[e]),{Tabs:_}=ie(_l.privateApis);return(0,s.createElement)(_l.BaseControl,{__nextHasNoMarginBottom:!0,className:ml()("block-editor-color-gradient-control",l)},(0,s.createElement)("fieldset",{className:"block-editor-color-gradient-control__fieldset"},(0,s.createElement)(_l.__experimentalVStack,{spacing:1},m&&(0,s.createElement)("legend",null,(0,s.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,s.createElement)(_l.BaseControl.VisualLabel,null,i))),f&&b&&(0,s.createElement)("div",null,(0,s.createElement)(_,{initialTabId:d?Zu.gradient:!!f&&Zu.color},(0,s.createElement)(_.TabList,null,(0,s.createElement)(_.Tab,{tabId:Zu.color},(0,x.__)("Solid")),(0,s.createElement)(_.Tab,{tabId:Zu.gradient},(0,x.__)("Gradient"))),(0,s.createElement)(_.TabPanel,{tabId:Zu.color,className:"block-editor-color-gradient-control__panel",focusable:!1},v.color),(0,s.createElement)(_.TabPanel,{tabId:Zu.gradient,className:"block-editor-color-gradient-control__panel",focusable:!1},v.gradient))),!b&&k(Zu.color),!f&&k(Zu.gradient))))}function Yu(e){const[t,n,o,r]=Ar("color.palette","color.gradients","color.custom","color.customGradient");return(0,s.createElement)(qu,{colors:t,gradients:n,disableCustomColors:!o,disableCustomGradients:!r,...e})}const Xu=function(e){return Ku.every((t=>e.hasOwnProperty(t)))?(0,s.createElement)(qu,{...e}):(0,s.createElement)(Yu,{...e})};function Qu(e){const t=Ju(e),n=rd(e),o=ed(e),r=nd(e),l=od(e),i=td(e);return t||n||o||r||l||i}function Ju(e){const t=ul(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function ed(e){const t=ul(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function td(e){const t=ul(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function nd(e){const t=ul(e),n=dl(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function od(e){const t=ul(e),n=dl(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function rd(e){const t=ul(e),n=dl(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function ld({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){return(0,s.createElement)(_l.__experimentalToolsPanel,{label:(0,x.__)("Color"),resetAll:()=>{const o=e(n);t(o)},panelId:o,hasInnerWrapper:!0,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:Qr},(0,s.createElement)("div",{className:"color-block-support-panel__inner-wrapper"},r))}const id={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},sd={placement:"left-start",offset:36,shift:!0},ad=({indicators:e,label:t})=>(0,s.createElement)(_l.__experimentalHStack,{justify:"flex-start"},(0,s.createElement)(_l.__experimentalZStack,{isLayered:!1,offset:-8},e.map(((e,t)=>(0,s.createElement)(_l.Flex,{key:t,expanded:!1},(0,s.createElement)(_l.ColorIndicator,{colorValue:e}))))),(0,s.createElement)(_l.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t},t));function cd({isGradient:e,inheritedValue:t,userValue:n,setValue:o,colorGradientControlSettings:r}){return(0,s.createElement)(Xu,{...r,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:e?void 0:t,gradientValue:e?t:void 0,onColorChange:e?void 0:o,onGradientChange:e?o:void 0,clearable:t===n,headingLevel:3})}function ud({label:e,hasValue:t,resetValue:n,isShownByDefault:o,indicators:r,tabs:l,colorGradientControlSettings:i,panelId:a}){const c=l.find((e=>void 0!==e.userValue)),{Tabs:u}=ie(_l.privateApis);return(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"block-editor-tools-panel-color-gradient-settings__item",hasValue:t,label:e,onDeselect:n,isShownByDefault:o,panelId:a},(0,s.createElement)(_l.Dropdown,{popoverProps:sd,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:t,isOpen:n})=>{const o={onClick:t,className:ml()("block-editor-panel-color-gradient-settings__dropdown",{"is-open":n}),"aria-expanded":n,"aria-label":(0,x.sprintf)((0,x.__)("Color %s styles"),e)};return(0,s.createElement)(_l.Button,{...o},(0,s.createElement)(ad,{indicators:r,label:e}))},renderContent:()=>(0,s.createElement)(_l.__experimentalDropdownContentWrapper,{paddingSize:"none"},(0,s.createElement)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content"},1===l.length&&(0,s.createElement)(cd,{...l[0],colorGradientControlSettings:i}),l.length>1&&(0,s.createElement)(u,{initialTabId:c?.key},(0,s.createElement)(u.TabList,null,l.map((e=>(0,s.createElement)(u.Tab,{key:e.key,tabId:e.key},e.label)))),l.map((e=>(0,s.createElement)(u.TabPanel,{key:e.key,tabId:e.key,focusable:!1},(0,s.createElement)(cd,{...e,colorGradientControlSettings:i})))))))}))}function dd({as:e=ld,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:l,defaultControls:i=id,children:a}){const c=ul(r),d=dl(r),p=r?.color?.custom,m=r?.color?.customGradient,h=c.length>0||p,g=d.length>0||m,f=e=>el({settings:r},"",e),b=e=>{const t=c.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},v=e=>{const t=d.flatMap((({gradients:e})=>e)).find((({gradient:t})=>t===e));return t?"var:preset|gradient|"+t.slug:e},k=rd(r),_=f(o?.color?.background),y=f(t?.color?.background),E=f(o?.color?.gradient),w=f(t?.color?.gradient),S=ed(r),C=f(o?.elements?.link?.color?.text),B=f(t?.elements?.link?.color?.text),I=f(o?.elements?.link?.[":hover"]?.color?.text),T=f(t?.elements?.link?.[":hover"]?.color?.text),M=Ju(r),P=f(o?.color?.text),R=f(t?.color?.text),N=e=>{let o=jn(t,["color","text"],b(e));P===C&&(o=jn(o,["elements","link","color","text"],b(e))),n(o)},L=[{name:"caption",label:(0,x.__)("Captions"),showPanel:td(r)},{name:"button",label:(0,x.__)("Button"),showPanel:od(r)},{name:"heading",label:(0,x.__)("Heading"),showPanel:nd(r)},{name:"h1",label:(0,x.__)("H1"),showPanel:nd(r)},{name:"h2",label:(0,x.__)("H2"),showPanel:nd(r)},{name:"h3",label:(0,x.__)("H3"),showPanel:nd(r)},{name:"h4",label:(0,x.__)("H4"),showPanel:nd(r)},{name:"h5",label:(0,x.__)("H5"),showPanel:nd(r)},{name:"h6",label:(0,x.__)("H6"),showPanel:nd(r)}],A=(0,u.useCallback)((e=>({...e,color:void 0,elements:{...e?.elements,link:{...e?.elements?.link,color:void 0,":hover":{color:void 0}},...L.reduce(((t,n)=>({...t,[n.name]:{...e?.elements?.[n.name],color:void 0}})),{})}})),[]),O=[M&&{key:"text",label:(0,x.__)("Text"),hasValue:()=>!!R,resetValue:()=>N(void 0),isShownByDefault:i.text,indicators:[P],tabs:[{key:"text",label:(0,x.__)("Text"),inheritedValue:P,setValue:N,userValue:R}]},k&&{key:"background",label:(0,x.__)("Background"),hasValue:()=>!!y||!!w,resetValue:()=>{const e=jn(t,["color","background"],void 0);e.color.gradient=void 0,n(e)},isShownByDefault:i.background,indicators:[null!=E?E:_],tabs:[h&&{key:"background",label:(0,x.__)("Solid"),inheritedValue:_,setValue:e=>{const o=jn(t,["color","background"],b(e));o.color.gradient=void 0,n(o)},userValue:y},g&&{key:"gradient",label:(0,x.__)("Gradient"),inheritedValue:E,setValue:e=>{const o=jn(t,["color","gradient"],v(e));o.color.background=void 0,n(o)},userValue:w,isGradient:!0}].filter(Boolean)},S&&{key:"link",label:(0,x.__)("Link"),hasValue:()=>!!B||!!T,resetValue:()=>{let e=jn(t,["elements","link",":hover","color","text"],void 0);e=jn(e,["elements","link","color","text"],void 0),n(e)},isShownByDefault:i.link,indicators:[C,I],tabs:[{key:"link",label:(0,x.__)("Default"),inheritedValue:C,setValue:e=>{n(jn(t,["elements","link","color","text"],b(e)))},userValue:B},{key:"hover",label:(0,x.__)("Hover"),inheritedValue:I,setValue:e=>{n(jn(t,["elements","link",":hover","color","text"],b(e)))},userValue:T}]}].filter(Boolean);return L.forEach((({name:e,label:r,showPanel:l})=>{if(!l)return;const s=f(o?.elements?.[e]?.color?.background),a=f(o?.elements?.[e]?.color?.gradient),c=f(o?.elements?.[e]?.color?.text),u=f(t?.elements?.[e]?.color?.background),d=f(t?.elements?.[e]?.color?.gradient),p=f(t?.elements?.[e]?.color?.text),m="caption"!==e;O.push({key:e,label:r,hasValue:()=>!!(p||u||d),resetValue:()=>{const o=jn(t,["elements",e,"color","background"],void 0);o.elements[e].color.gradient=void 0,o.elements[e].color.text=void 0,n(o)},isShownByDefault:i[e],indicators:m?[c,null!=a?a:s]:[c],tabs:[h&&{key:"text",label:(0,x.__)("Text"),inheritedValue:c,setValue:o=>{n(jn(t,["elements",e,"color","text"],b(o)))},userValue:p},h&&m&&{key:"background",label:(0,x.__)("Background"),inheritedValue:s,setValue:o=>{const r=jn(t,["elements",e,"color","background"],b(o));r.elements[e].color.gradient=void 0,n(r)},userValue:u},g&&m&&{key:"gradient",label:(0,x.__)("Gradient"),inheritedValue:a,setValue:o=>{const r=jn(t,["elements",e,"color","gradient"],v(o));r.elements[e].color.background=void 0,n(r)},userValue:d,isGradient:!0}].filter(Boolean)})})),(0,s.createElement)(e,{resetAllFilter:A,value:t,onChange:n,panelId:l},O.map((e=>(0,s.createElement)(ud,{key:e.key,...e,colorGradientControlSettings:{colors:c,disableCustomColors:!p,gradients:d,disableCustomGradients:!m},panelId:l}))),a)}Hc([Gc,jc]);const pd=function({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:n,fallbackLinkColor:o,fontSize:r,isLargeText:l,textColor:i,linkColor:a,enableAlphaChecker:c=!1}){const u=e||t;if(!u)return null;const d=i||n,p=a||o;if(!d&&!p)return null;const m=[{color:d,description:(0,x.__)("text color")},{color:p,description:(0,x.__)("link color")}],h=Vc(u),g=h.alpha()<1,f=h.brightness(),b={level:"AA",size:l||!1!==l&&r>=24?"large":"small"};let v="",k="";for(const e of m){if(!e.color)continue;const t=Vc(e.color),n=t.isReadable(h,b),o=t.alpha()<1;if(!n){if(g||o)continue;v=f<t.brightness()?(0,x.sprintf)((0,x.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),e.description):(0,x.sprintf)((0,x.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."),e.description),k=(0,x.__)("This color combination may be hard for people to read.");break}o&&c&&(v=(0,x.__)("Transparent text may be hard for people to read."),k=(0,x.__)("Transparent text may be hard for people to read."))}return v?((0,vo.speak)(k),(0,s.createElement)("div",{className:"block-editor-contrast-checker"},(0,s.createElement)(_l.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},v))):null},md=(0,u.createContext)({refs:new Map,callbacks:new Map});function hd({children:e}){const t=(0,u.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,s.createElement)(md.Provider,{value:t},e)}function gd(e){const{refs:t,callbacks:n}=(0,u.useContext)(md),o=(0,u.useRef)();return(0,u.useLayoutEffect)((()=>(t.set(o,e),()=>{t.delete(o)})),[e]),(0,p.useRefEffect)((t=>{o.current=t,n.forEach(((n,o)=>{e===n&&o(t)}))}),[e])}function fd(e){const{refs:t}=(0,u.useContext)(md),n=(0,u.useRef)();return n.current=e,(0,u.useMemo)((()=>({get current(){let e=null;for(const[o,r]of t.entries())r===n.current&&o.current&&(e=o.current);return e}})),[])}function bd(e){const{callbacks:t}=(0,u.useContext)(md),n=fd(e),[o,r]=(0,u.useState)(null);return(0,u.useLayoutEffect)((()=>{if(e)return t.set(r,e),()=>{t.delete(r)}}),[e]),n.current||o}function vd(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function kd({clientId:e}){const[t,n]=(0,u.useState)(),[o,r]=(0,u.useState)(),[l,i]=(0,u.useState)(),a=fd(e);return(0,u.useEffect)((()=>{if(!a.current)return;r(vd(a.current).color);const e=a.current?.querySelector("a");e&&e.innerText&&i(vd(e).color);let t=a.current,o=vd(t).backgroundColor;for(;"rgba(0, 0, 0, 0)"===o&&t.parentNode&&t.parentNode.nodeType===t.parentNode.ELEMENT_NODE;)t=t.parentNode,o=vd(t).backgroundColor;n(o)})),(0,s.createElement)(pd,{backgroundColor:t,textColor:o,enableAlphaChecker:!0,linkColor:l})}const _d="color",yd=e=>{const t=(0,c.getBlockSupport)(e,_d);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},Ed=e=>{if("web"!==u.Platform.OS)return!1;const t=(0,c.getBlockSupport)(e,_d);return null!==t&&"object"==typeof t&&!!t.link},wd=e=>{const t=(0,c.getBlockSupport)(e,_d);return null!==t&&"object"==typeof t&&!!t.gradients},Sd=e=>{const t=(0,c.getBlockSupport)(e,_d);return t&&!1!==t.background},Cd=e=>{const t=(0,c.getBlockSupport)(e,_d);return t&&!1!==t.text};function xd(e,t,n){if(!yd(t)||fl(t,_d))return e;const o=wd(t),{backgroundColor:r,textColor:l,gradient:i,style:s}=n,a=e=>!fl(t,_d,e),c=a("text")?Zc("color",l):void 0,u=a("gradients")?Gu(i):void 0,d=a("background")?Zc("background-color",r):void 0,p=a("background")||a("gradients"),m=r||s?.color?.background||o&&(i||s?.color?.gradient),h=ml()(e.className,c,u,{[d]:!(o&&s?.color?.gradient||!d),"has-text-color":a("text")&&(l||s?.color?.text),"has-background":p&&m,"has-link-color":a("link")&&s?.elements?.link?.color});return e.className=h||void 0,e}function Bd(e){const t=e?.color?.text,n=t?.startsWith("var:preset|color|")?t.substring(17):void 0,o=e?.color?.background,r=o?.startsWith("var:preset|color|")?o.substring(17):void 0,l=e?.color?.gradient,i=l?.startsWith("var:preset|gradient|")?l.substring(20):void 0,s={...e};return s.color={...s.color,text:n?void 0:t,background:r?void 0:o,gradient:i?void 0:l},{style:hl(s),textColor:n,backgroundColor:r,gradient:i}}function Id(e){return{...e.style,color:{...e.style?.color,text:e.textColor?"var:preset|color|"+e.textColor:e.style?.color?.text,background:e.backgroundColor?"var:preset|color|"+e.backgroundColor:e.style?.color?.background,gradient:e.gradient?"var:preset|gradient|"+e.gradient:e.style?.color?.gradient}}}function Td({children:e,resetAllFilter:t}){const n=(0,u.useCallback)((e=>{const n=Id(e),o=t(n);return{...e,...Bd(o)}}),[t]);return(0,s.createElement)(Bs,{group:"color",resetAllFilter:n},e)}function Md({clientId:e,name:t,setAttributes:n,settings:o}){const r=Qu(o);const{style:l,textColor:i,backgroundColor:a,gradient:p}=(0,d.useSelect)((function(t){const{style:n,textColor:o,backgroundColor:r,gradient:l}=t(Nr).getBlockAttributes(e)||{};return{style:n,textColor:o,backgroundColor:r,gradient:l}}),[e]),m=(0,u.useMemo)((()=>Id({style:l,textColor:i,backgroundColor:a,gradient:p})),[l,i,a,p]);if(!r)return null;const h=(0,c.getBlockSupport)(t,[_d,"__experimentalDefaultControls"]),g="web"===u.Platform.OS&&!m?.color?.gradient&&(o?.color?.text||o?.color?.link)&&!1!==(0,c.getBlockSupport)(t,[_d,"enableContrastChecker"]);return(0,s.createElement)(dd,{as:Td,panelId:e,settings:o,value:m,onChange:e=>{n(Bd(e))},defaultControls:h,enableContrastChecker:!1!==(0,c.getBlockSupport)(t,[_d,"enableContrastChecker"])},g&&(0,s.createElement)(kd,{clientId:e}))}const Pd={useBlockProps:function({name:e,backgroundColor:t,textColor:n,gradient:o,style:r}){const[l,i,s]=Ar("color.palette.custom","color.palette.theme","color.palette.default"),a=(0,u.useMemo)((()=>[...l||[],...i||[],...s||[]]),[l,i,s]);if(!yd(e)||fl(e,_d))return{};const c={};n&&!fl(e,_d,"text")&&(c.color=Wc(a,n)?.color),t&&!fl(e,_d,"background")&&(c.backgroundColor=Wc(a,t)?.color);const d=xd({style:c},e,{textColor:n,backgroundColor:t,gradient:o,style:r}),p=t||r?.color?.background||o||r?.color?.gradient;return{...d,className:ml()(d.className,!p&&ic(r))}},addSaveProps:xd,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:yd},Rd={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function Nd({value:e="",onChange:t,fontFamilies:n,...o}){const[r]=Ar("typography.fontFamilies");if(n||(n=r),!n||0===n.length)return null;const l=[{value:"",label:(0,x.__)("Default")},...n.map((({fontFamily:e,name:t})=>({value:e,label:t||e})))];return(0,s.createElement)(_l.SelectControl,{label:(0,x.__)("Font"),options:l,value:e,onChange:t,labelPosition:"top",...o})}(0,m.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return yd(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),wd(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,m.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){const r=e.name;return gl({linkColor:Ed(r),textColor:Cd(r),backgroundColor:Sd(r),gradient:wd(r)},Rd,e,t,n,o)}));const Ld=[{name:(0,x._x)("Regular","font style"),value:"normal"},{name:(0,x._x)("Italic","font style"),value:"italic"}],Ad=[{name:(0,x._x)("Thin","font weight"),value:"100"},{name:(0,x._x)("Extra Light","font weight"),value:"200"},{name:(0,x._x)("Light","font weight"),value:"300"},{name:(0,x._x)("Regular","font weight"),value:"400"},{name:(0,x._x)("Medium","font weight"),value:"500"},{name:(0,x._x)("Semi Bold","font weight"),value:"600"},{name:(0,x._x)("Bold","font weight"),value:"700"},{name:(0,x._x)("Extra Bold","font weight"),value:"800"},{name:(0,x._x)("Black","font weight"),value:"900"}],Od=(e,t)=>e?t?(0,x.__)("Appearance"):(0,x.__)("Font style"):(0,x.__)("Font weight");function Dd(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:o=!0,value:{fontStyle:r,fontWeight:l},...i}=e,a=n||o,c=Od(n,o),d={key:"default",name:(0,x.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},p=(0,u.useMemo)((()=>n&&o?(()=>{const e=[d];return Ld.forEach((({name:t,value:n})=>{Ad.forEach((({name:o,value:r})=>{const l="normal"===n?o:(0,x.sprintf)((0,x.__)("%1$s %2$s"),o,t);e.push({key:`${n}-${r}`,name:l,style:{fontStyle:n,fontWeight:r}})}))})),e})():n?(()=>{const e=[d];return Ld.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:n,fontWeight:void 0}})})),e})():(()=>{const e=[d];return Ad.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:void 0,fontWeight:n}})})),e})()),[e.options]),m=p.find((e=>e.style.fontStyle===r&&e.style.fontWeight===l))||p[0];return a&&(0,s.createElement)(_l.CustomSelectControl,{...i,className:"components-font-appearance-control",label:c,describedBy:m?n?o?(0,x.sprintf)((0,x.__)("Currently selected font appearance: %s"),m.name):(0,x.sprintf)((0,x.__)("Currently selected font style: %s"),m.name):(0,x.sprintf)((0,x.__)("Currently selected font weight: %s"),m.name):(0,x.__)("No selected font appearance"),options:p,value:m,onChange:({selectedItem:e})=>t(e.style),__nextUnconstrainedWidth:!0})}const zd=1.5;const Vd=({value:e,onChange:t,__nextHasNoMarginBottom:n=!1,__unstableInputWidth:o="60px",...r})=>{const l=function(e){return void 0!==e&&""!==e}(e),i=(e,t)=>{if(l)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return zd;default:return e}},a=l?e:"";n||w()("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 c=n?void 0:{marginBottom:24};return(0,s.createElement)("div",{className:"block-editor-line-height-control",style:c},(0,s.createElement)(_l.__experimentalNumberControl,{...r,__unstableInputWidth:o,__unstableStateReducer:(e,t)=>{const n=["insertText","insertFromPaste"].includes(t.payload.event.nativeEvent?.inputType),o=i(e.value,n);return{...e,value:o}},onChange:(e,{event:n})=>{""!==e?"click"!==n.type?t(`${e}`):t(i(`${e}`,!1)):t()},label:(0,x.__)("Line height"),placeholder:zd,step:.01,spinFactor:10,value:a,min:0,spinControls:"custom"}))};function Fd({value:e,onChange:t,__unstableInputWidth:n="60px",...o}){const[r]=Ar("spacing.units"),l=(0,_l.__experimentalUseCustomUnits)({availableUnits:r||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return(0,s.createElement)(_l.__experimentalUnitControl,{...o,label:(0,x.__)("Letter spacing"),value:e,__unstableInputWidth:n,units:l,onChange:t})}const Hd=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M7 11.5h10V13H7z"})),Gd=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.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"})),Ud=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.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"})),$d=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.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"})),jd=[{name:(0,x.__)("None"),value:"none",icon:Hd},{name:(0,x.__)("Uppercase"),value:"uppercase",icon:Gd},{name:(0,x.__)("Lowercase"),value:"lowercase",icon:Ud},{name:(0,x.__)("Capitalize"),value:"capitalize",icon:$d}];function Wd({className:e,value:t,onChange:n}){return(0,s.createElement)("fieldset",{className:ml()("block-editor-text-transform-control",e)},(0,s.createElement)(_l.BaseControl.VisualLabel,{as:"legend"},(0,x.__)("Letter case")),(0,s.createElement)("div",{className:"block-editor-text-transform-control__buttons"},jd.map((e=>(0,s.createElement)(_l.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===t,onClick:()=>{n(e.value===t?void 0:e.value)}})))))}const Kd=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.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"})),Zd=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.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"})),qd=[{name:(0,x.__)("None"),value:"none",icon:Hd},{name:(0,x.__)("Underline"),value:"underline",icon:Kd},{name:(0,x.__)("Strikethrough"),value:"line-through",icon:Zd}];function Yd({value:e,onChange:t,className:n}){return(0,s.createElement)("fieldset",{className:ml()("block-editor-text-decoration-control",n)},(0,s.createElement)(_l.BaseControl.VisualLabel,{as:"legend"},(0,x.__)("Decoration")),(0,s.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},qd.map((n=>(0,s.createElement)(_l.Button,{key:n.value,icon:n.icon,label:n.name,isPressed:n.value===e,onClick:()=>{t(n.value===e?void 0:n.value)}})))))}const Xd=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M8.2 14.4h3.9L13 17h1.7L11 6.5H9.3L5.6 17h1.7l.9-2.6zm2-5.5 1.4 4H8.8l1.4-4zm7.4 7.5-1.3.8.8 1.4H5.5V20h14.3l-2.2-3.6z"})),Qd=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M7 5.6v1.7l2.6.9v3.9L7 13v1.7L17.5 11V9.3L7 5.6zm4.2 6V8.8l4 1.4-4 1.4zm-5.7 5.6V5.5H4v14.3l3.6-2.2-.8-1.3-1.3.9z"})),Jd=[{name:(0,x.__)("Horizontal"),value:"horizontal-tb",icon:Xd},{name:(0,x.__)("Vertical"),value:(0,x.isRTL)()?"vertical-lr":"vertical-rl",icon:Qd}];function ep({className:e,value:t,onChange:n}){return(0,s.createElement)("fieldset",{className:ml()("block-editor-writing-mode-control",e)},(0,s.createElement)(_l.BaseControl.VisualLabel,{as:"legend"},(0,x.__)("Orientation")),(0,s.createElement)("div",{className:"block-editor-writing-mode-control__buttons"},Jd.map((e=>(0,s.createElement)(_l.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===t,onClick:()=>{n(e.value===t?void 0:e.value)}})))))}const tp=1,np=6;function op(e){const t=lp(e),n=ip(e),o=sp(e),r=ap(e),l=cp(e),i=up(e),s=dp(e),a=pp(e),c=rp(e);return t||n||o||r||l||c||i||s||a}function rp(e){return Jn(e?.typography?.fontSizes)||e?.typography?.customFontSize}function lp(e){return Jn(e?.typography?.fontFamilies)}function ip(e){return e?.typography?.lineHeight}function sp(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function ap(e){return e?.typography?.letterSpacing}function cp(e){return e?.typography?.textTransform}function up(e){return e?.typography?.textDecoration}function dp(e){return e?.typography?.writingMode}function pp(e){return e?.typography?.textColumns}function mp({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){return(0,s.createElement)(_l.__experimentalToolsPanel,{label:(0,x.__)("Typography"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:Qr},r)}const hp={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textTransform:!0,textDecoration:!0,writingMode:!0,textColumns:!0};function gp({as:e=mp,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:l,defaultControls:i=hp}){var a;const c=e=>el({settings:r},"",e),d=lp(r),p=null!==(a=r?.typography?.fontFamilies)&&void 0!==a?a:{},m=p?function(e){let t=Xn.get(e);return t||(t=["default","theme","custom"].flatMap((t=>{var n;return null!==(n=e[t])&&void 0!==n?n:[]})),Xn.set(e,t)),t}(p):[],h=c(o?.typography?.fontFamily),g=e=>{const o=m?.find((({fontFamily:t})=>t===e))?.slug;n(jn(t,["typography","fontFamily"],o?`var:preset|font-family|${o}`:e||void 0))},f=rp(r),b=!r?.typography?.customFontSize,v=function(e){var t,n;const o=null!==(n=Qn(null!==(t=e?.typography?.fontSizes)&&void 0!==t?t:{}))&&void 0!==n?n:[],r=[];for(const e of o)r.some((({slug:t})=>t===e.slug))||r.push(e);return r}(r),k=c(o?.typography?.fontSize),_=(e,o)=>{n(jn(t,["typography","fontSize"],(o?.slug?`var:preset|font-size|${o?.slug}`:e)||void 0))},y=sp(r),E=function(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,x.__)("Appearance"):(0,x.__)("Font style"):(0,x.__)("Font weight")}(r),w=r?.typography?.fontStyle,S=r?.typography?.fontWeight,C=c(o?.typography?.fontStyle),B=c(o?.typography?.fontWeight),I=({fontStyle:e,fontWeight:o})=>{n({...t,typography:{...t?.typography,fontStyle:e||void 0,fontWeight:o||void 0}})},T=ip(r),M=c(o?.typography?.lineHeight),P=e=>{n(jn(t,["typography","lineHeight"],e||void 0))},R=ap(r),N=c(o?.typography?.letterSpacing),L=e=>{n(jn(t,["typography","letterSpacing"],e||void 0))},A=pp(r),O=c(o?.typography?.textColumns),D=e=>{n(jn(t,["typography","textColumns"],e||void 0))},z=cp(r),V=c(o?.typography?.textTransform),F=e=>{n(jn(t,["typography","textTransform"],e||void 0))},H=up(r),G=c(o?.typography?.textDecoration),U=e=>{n(jn(t,["typography","textDecoration"],e||void 0))},$=dp(r),j=c(o?.typography?.writingMode),W=e=>{n(jn(t,["typography","writingMode"],e||void 0))},K=(0,u.useCallback)((e=>({...e,typography:{}})),[]);return(0,s.createElement)(e,{resetAllFilter:K,value:t,onChange:n,panelId:l},d&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{label:(0,x.__)("Font family"),hasValue:()=>!!t?.typography?.fontFamily,onDeselect:()=>g(void 0),isShownByDefault:i.fontFamily,panelId:l},(0,s.createElement)(Nd,{fontFamilies:m,value:h,onChange:g,size:"__unstable-large",__nextHasNoMarginBottom:!0})),f&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{label:(0,x.__)("Font size"),hasValue:()=>!!t?.typography?.fontSize,onDeselect:()=>_(void 0),isShownByDefault:i.fontSize,panelId:l},(0,s.createElement)(_l.FontSizePicker,{value:k,onChange:_,fontSizes:v,disableCustomFontSizes:b,withReset:!1,withSlider:!0,size:"__unstable-large"})),y&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"single-column",label:E,hasValue:()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,onDeselect:()=>{I({})},isShownByDefault:i.fontAppearance,panelId:l},(0,s.createElement)(Dd,{value:{fontStyle:C,fontWeight:B},onChange:I,hasFontStyles:w,hasFontWeights:S,size:"__unstable-large",__nextHasNoMarginBottom:!0})),T&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Line height"),hasValue:()=>void 0!==t?.typography?.lineHeight,onDeselect:()=>P(void 0),isShownByDefault:i.lineHeight,panelId:l},(0,s.createElement)(Vd,{__nextHasNoMarginBottom:!0,__unstableInputWidth:"auto",value:M,onChange:P,size:"__unstable-large"})),R&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Letter spacing"),hasValue:()=>!!t?.typography?.letterSpacing,onDeselect:()=>L(void 0),isShownByDefault:i.letterSpacing,panelId:l},(0,s.createElement)(Fd,{value:N,onChange:L,size:"__unstable-large",__unstableInputWidth:"auto"})),A&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Text columns"),hasValue:()=>!!t?.typography?.textColumns,onDeselect:()=>D(void 0),isShownByDefault:i.textColumns,panelId:l},(0,s.createElement)(_l.__experimentalNumberControl,{label:(0,x.__)("Text columns"),max:np,min:tp,onChange:D,size:"__unstable-large",spinControls:"custom",value:O,initialPosition:1})),H&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Text decoration"),hasValue:()=>!!t?.typography?.textDecoration,onDeselect:()=>U(void 0),isShownByDefault:i.textDecoration,panelId:l},(0,s.createElement)(Yd,{value:G,onChange:U,size:"__unstable-large",__unstableInputWidth:"auto"})),$&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Text orientation"),hasValue:()=>!!t?.typography?.writingMode,onDeselect:()=>W(void 0),isShownByDefault:i.writingMode,panelId:l},(0,s.createElement)(ep,{value:j,onChange:W,size:"__unstable-large",__nextHasNoMarginBottom:!0})),z&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{label:(0,x.__)("Letter case"),hasValue:()=>!!t?.typography?.textTransform,onDeselect:()=>F(void 0),isShownByDefault:i.textTransform,panelId:l},(0,s.createElement)(Wd,{value:V,onChange:F,showNone:!0,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})))}const fp="typography.lineHeight";const bp=window.wp.tokenList;var vp=n.n(bp);const kp="typography.__experimentalFontFamily";function _p(e,t,n){if(!(0,c.hasBlockSupport)(t,kp))return e;if(fl(t,Mp,"fontFamily"))return e;if(!n?.fontFamily)return e;const o=new(vp())(e.className),{kebabCase:r}=ie(_l.privateApis);o.add(`has-${r(n?.fontFamily)}-font-family`);const l=o.value;return e.className=l||void 0,e}const yp={useBlockProps:function({name:e,fontFamily:t}){return _p({},e,{fontFamily:t})},addSaveProps:_p,attributeKeys:["fontFamily"],hasSupport:e=>(0,c.hasBlockSupport)(e,kp)};(0,m.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,c.hasBlockSupport)(e,kp)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e}));const Ep=(e,t,n)=>{if(t){const n=e?.find((({slug:e})=>e===t));if(n)return n}return{size:n}};function wp(e,t){const n=e?.find((({size:e})=>e===t));return n||{size:t}}function Sp(e){if(!e)return;const{kebabCase:t}=ie(_l.privateApis);return`has-${t(e)}-font-size`}const Cp="typography.fontSize";function xp(e,t,n){if(!(0,c.hasBlockSupport)(t,Cp))return e;if(fl(t,Mp,"fontSize"))return e;const o=new(vp())(e.className);o.add(Sp(n.fontSize));const r=o.value;return e.className=r||void 0,e}const Bp={useBlockProps:function({name:e,fontSize:t,style:n}){const[o,r,l]=Ar("typography.fontSizes","typography.fluid","layout");if(!(0,c.hasBlockSupport)(e,Cp)||fl(e,Mp,"fontSize")||!t&&!n?.typography?.fontSize)return;let i;if(n?.typography?.fontSize){const e=Zr({typography:{fluid:r},layout:l});i={style:{fontSize:Wr({size:n.typography.fontSize},e)}}}return t&&(i={style:{fontSize:Ep(o,t,n?.typography?.fontSize).size}}),i?xp(i,e,{fontSize:t}):void 0},addSaveProps:xp,attributeKeys:["fontSize","style"],hasSupport:e=>(0,c.hasBlockSupport)(e,Cp)},Ip={fontSize:[["fontSize"],["style","typography","fontSize"]]};function Tp(e,t){return Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e))))}(0,m.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,c.hasBlockSupport)(e,Cp)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,m.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,o){const r=e.name;return gl({fontSize:(0,c.hasBlockSupport)(r,Cp)},Ip,e,t,n,o)}));const Mp="typography",Pp=[fp,Cp,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",kp,"typography.textColumns","typography.__experimentalTextDecoration","typography.__experimentalWritingMode","typography.__experimentalTextTransform","typography.__experimentalLetterSpacing"];function Rp(e){const t={...Tp(e,["fontFamily"])},n=e?.typography?.fontSize,o=e?.typography?.fontFamily,r=n?.startsWith("var:preset|font-size|")?n.substring(21):void 0,l=o?.startsWith("var:preset|font-family|")?o.substring(23):void 0;return t.typography={...Tp(t.typography,["fontFamily"]),fontSize:r?void 0:n},{style:hl(t),fontFamily:l,fontSize:r}}function Np(e){return{...e.style,typography:{...e.style?.typography,fontFamily:e.fontFamily?"var:preset|font-family|"+e.fontFamily:void 0,fontSize:e.fontSize?"var:preset|font-size|"+e.fontSize:e.style?.typography?.fontSize}}}function Lp({children:e,resetAllFilter:t}){const n=(0,u.useCallback)((e=>{const n=Np(e),o=t(n);return{...e,...Rp(o)}}),[t]);return(0,s.createElement)(Bs,{group:"typography",resetAllFilter:n},e)}function Ap({clientId:e,name:t,setAttributes:n,settings:o}){const{style:r,fontFamily:l,fontSize:i}=(0,d.useSelect)((function(t){const{style:n,fontFamily:o,fontSize:r}=t(Nr).getBlockAttributes(e)||{};return{style:n,fontFamily:o,fontSize:r}}),[e]),a=op(o),p=(0,u.useMemo)((()=>Np({style:r,fontFamily:l,fontSize:i})),[r,i,l]);if(!a)return null;const m=(0,c.getBlockSupport)(t,[Mp,"__experimentalDefaultControls"]);return(0,s.createElement)(gp,{as:Lp,panelId:e,settings:o,value:p,onChange:e=>{n(Rp(e))},defaultControls:m})}const Op=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,s.createElement)(Z.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})),Dp={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},svw:{max:100,steps:1},lvw:{max:100,steps:1},dvw:{max:100,steps:1},svh:{max:100,steps:1},lvh:{max:100,steps:1},dvh:{max:100,steps:1},vi:{max:100,steps:1},svi:{max:100,steps:1},lvi:{max:100,steps:1},dvi:{max:100,steps:1},vb:{max:100,steps:1},svb:{max:100,steps:1},lvb:{max:100,steps:1},dvb:{max:100,steps:1},vmin:{max:100,steps:1},svmin:{max:100,steps:1},lvmin:{max:100,steps:1},dvmin:{max:100,steps:1},vmax:{max:100,steps:1},svmax:{max:100,steps:1},lvmax:{max:100,steps:1},dvmax:{max:100,steps:1}};function zp({icon:e,isMixed:t=!1,minimumCustomValue:n,onChange:o,onMouseOut:r,onMouseOver:l,showSideInLabel:i=!0,side:a,spacingSizes:c,type:m,value:h}){var g,f;h=Jl(h,c);let b=c;const v=c.length<=8,k=(0,d.useSelect)((e=>{const t=e(Nr).getSettings();return t?.disableCustomSpacingSizes})),[_,y]=(0,u.useState)(!k&&void 0!==h&&!Xl(h)),E=(0,p.usePrevious)(h);h&&E!==h&&!Xl(h)&&!0!==_&&y(!0);const[w]=Ar("spacing.units"),S=(0,_l.__experimentalUseCustomUnits)({availableUnits:w||["px","em","rem"]});let C=null;!v&&!_&&void 0!==h&&(!Xl(h)||Xl(h)&&t)?(b=[...c,{name:t?(0,x.__)("Mixed"):(0,x.sprintf)((0,x.__)("Custom (%s)"),h),slug:"custom",size:h}],C=b.length-1):t||(C=_?Ql(h,c):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":ti(e),o=t.findIndex((e=>String(e.slug)===n));return-1!==o?o:NaN}(h,c));const B=(0,u.useMemo)((()=>(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(C)),[C])[1]||S[0]?.value,I=parseFloat(C,10),T=(e,t)=>{const n=parseInt(e,10);if("selectList"===t){if(0===n)return;if(1===n)return"0"}else if(0===n)return"0";return`var:preset|spacing|${c[e]?.slug}`},M=t?(0,x.__)("Mixed"):null,P=b.map(((e,t)=>({key:t,name:e.name}))),R=c.map(((e,t)=>({value:t,label:void 0}))),N=Wl.includes(a)&&i?ql[a]:"",L=i?m?.toLowerCase():m,A=(0,x.sprintf)((0,x.__)("%1$s %2$s"),N,L).trim();return(0,s.createElement)(_l.__experimentalHStack,{className:"spacing-sizes-control__wrapper"},e&&(0,s.createElement)(_l.Icon,{className:"spacing-sizes-control__icon",icon:e,size:24}),_&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.__experimentalUnitControl,{onMouseOver:l,onMouseOut:r,onFocus:l,onBlur:r,onChange:e=>o((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:C,units:S,min:n,placeholder:M,disableUnits:t,label:A,hideLabelFromVision:!0,className:"spacing-sizes-control__custom-value-input",size:"__unstable-large"}),(0,s.createElement)(_l.RangeControl,{onMouseOver:l,onMouseOut:r,onFocus:l,onBlur:r,value:I,min:0,max:null!==(g=Dp[B]?.max)&&void 0!==g?g:10,step:null!==(f=Dp[B]?.steps)&&void 0!==f?f:.1,withInputField:!1,onChange:e=>{o([e,B].join(""))},className:"spacing-sizes-control__custom-value-range",__nextHasNoMarginBottom:!0})),v&&!_&&(0,s.createElement)(_l.RangeControl,{onMouseOver:l,onMouseOut:r,className:"spacing-sizes-control__range-control",value:C,onChange:e=>o(T(e)),onMouseDown:e=>{e?.nativeEvent?.offsetX<35&&void 0===h&&o("0")},withInputField:!1,"aria-valuenow":C,"aria-valuetext":c[C]?.name,renderTooltipContent:e=>void 0===h?void 0:c[e]?.name,min:0,max:c.length-1,marks:R,label:A,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,onFocus:l,onBlur:r}),!v&&!_&&(0,s.createElement)(_l.CustomSelectControl,{className:"spacing-sizes-control__custom-select-control",value:P.find((e=>e.key===C))||"",onChange:e=>{o(T(e.selectedItem.key,"selectList"))},options:P,label:A,hideLabelFromVision:!0,__nextUnconstrainedWidth:!0,size:"__unstable-large",onMouseOver:l,onMouseOut:r,onFocus:l,onBlur:r}),!k&&(0,s.createElement)(_l.Button,{label:_?(0,x.__)("Use size preset"):(0,x.__)("Set custom size"),icon:Op,onClick:()=>{y(!_)},isPressed:_,size:"small",className:"spacing-sizes-control__custom-toggle",iconSize:24}))}const Vp=["vertical","horizontal"];function Fp({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:l,type:i,values:a}){const c=e=>n=>{if(!t)return;const o={...Object.keys(a).reduce(((e,t)=>(e[t]=Jl(a[t],l),e)),{})};"vertical"===e&&(o.top=n,o.bottom=n),"horizontal"===e&&(o.left=n,o.right=n),t(o)},u=r?.length?Vp.filter((e=>ni(r,e))):Vp;return(0,s.createElement)(s.Fragment,null,u.map((t=>{const r="vertical"===t?a.top:a.left;return(0,s.createElement)(zp,{key:`spacing-sizes-control-${t}`,icon:Zl[t],label:ql[t],minimumCustomValue:e,onChange:c(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:l,type:i,value:r,withInputField:!1})})))}function Hp({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:l,type:i,values:a}){const c=r?.length?Wl.filter((e=>r.includes(e))):Wl,u=e=>n=>{const o={...Object.keys(a).reduce(((e,t)=>(e[t]=Jl(a[t],l),e)),{})};o[e]=n,t(o)};return(0,s.createElement)(s.Fragment,null,c.map((t=>(0,s.createElement)(zp,{key:`spacing-sizes-control-${t}`,icon:Zl[t],label:ql[t],minimumCustomValue:e,onChange:u(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:l,type:i,value:a[t],withInputField:!1}))))}function Gp({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:l,spacingSizes:i,type:a,values:c}){return(0,s.createElement)(zp,{label:ql[l],minimumCustomValue:e,onChange:(u=l,e=>{const n={...Object.keys(c).reduce(((e,t)=>(e[t]=Jl(c[t],i),e)),{})};n[u]=e,t(n)}),onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:l,spacingSizes:i,type:a,value:c[l],withInputField:!1});var u}const Up=(0,s.createElement)(_l.Icon,{icon:uu,size:24});function $p({label:e,onChange:t,sides:n,value:o}){if(!n||!n.length)return;const r=function(e){if(!e||!e.length)return{};const t={},n=ni(e,"horizontal"),o=ni(e,"vertical");n&&o?t.axial={label:ql.axial,icon:Zl.axial}:n?t.axial={label:ql.horizontal,icon:Zl.horizontal}:o&&(t.axial={label:ql.vertical,icon:Zl.vertical});let r=0;return Wl.forEach((n=>{e.includes(n)&&(r+=1,t[n]={label:ql[n],icon:Zl[n]})})),r>1&&(t.custom={label:ql.custom,icon:Zl.custom}),t}(n),l=r[o].icon,{custom:i,...a}=r;return(0,s.createElement)(_l.DropdownMenu,{icon:l,label:e,className:"spacing-sizes-control__dropdown",toggleProps:{isSmall:!0}},(({onClose:e})=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.MenuGroup,null,Object.entries(a).map((([n,{label:r,icon:l}])=>{const i=o===n;return(0,s.createElement)(_l.MenuItem,{key:n,icon:l,iconPosition:"left",isSelected:i,role:"menuitemradio",onClick:()=>{t(n),e()},suffix:i?Up:void 0},r)}))),!!i&&(0,s.createElement)(_l.MenuGroup,null,(0,s.createElement)(_l.MenuItem,{icon:i.icon,iconPosition:"left",isSelected:o===Yl.custom,role:"menuitemradio",onClick:()=>{t(Yl.custom),e()},suffix:o===Yl.custom?Up:void 0},i.label)))))}function jp({inputProps:e,label:t,minimumCustomValue:n=0,onChange:o,onMouseOut:r,onMouseOver:l,showSideInLabel:i=!0,sides:a=Wl,useSelect:c,values:d}){const p=function(){const e=[{name:0,slug:"0",size:0}],[t]=Ar("spacing.spacingSizes");return t&&e.push(...t),e.length>8&&e.unshift({name:(0,x.__)("Default"),slug:"default",size:void 0}),e}(),m=d||Kl,h=1===a?.length,g=a?.includes("horizontal")&&a?.includes("vertical")&&2===a?.length,[f,b]=(0,u.useState)(function(e={},t){const{top:n,right:o,bottom:r,left:l}=e,i=[n,o,r,l].filter(Boolean),s=!(n!==r||l!==o||!n&&!l),a=!i.length&&function(e=[]){const t={top:0,right:0,bottom:0,left:0};return e.forEach((e=>t[e]+=1)),(t.top+t.bottom)%2==0&&(t.left+t.right)%2==0}(t);if(ni(t)&&(s||a))return Yl.axial;if(1===i.length){let t;return Object.entries(e).some((([e,n])=>(t=e,void 0!==n))),t}return 1!==t?.length||i.length?Yl.custom:t[0]}(m,a)),v={...e,minimumCustomValue:n,onChange:e=>{const t={...d,...e};o(t)},onMouseOut:r,onMouseOver:l,sides:a,spacingSizes:p,type:t,useSelect:c,values:m},k=Wl.includes(f)&&i?ql[f]:"",_=(0,x.sprintf)((0,x.__)("%1$s %2$s"),t,k).trim(),y=(0,x.sprintf)((0,x._x)("%s options","Button label to reveal side configuration options"),t);return(0,s.createElement)("fieldset",{className:"spacing-sizes-control"},(0,s.createElement)(_l.__experimentalHStack,{className:"spacing-sizes-control__header"},(0,s.createElement)(_l.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label"},_),!h&&!g&&(0,s.createElement)($p,{label:y,onChange:b,sides:a,value:f})),(0,s.createElement)(_l.__experimentalVStack,{spacing:.5},f===Yl.axial?(0,s.createElement)(Fp,{...v}):f===Yl.custom?(0,s.createElement)(Hp,{...v}):(0,s.createElement)(Gp,{side:f,...v,showSideInLabel:i})))}const Wp={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},svw:{max:100,step:1},lvw:{max:100,step:1},dvw:{max:100,step:1},svh:{max:100,step:1},lvh:{max:100,step:1},dvh:{max:100,step:1},vi:{max:100,step:1},svi:{max:100,step:1},lvi:{max:100,step:1},dvi:{max:100,step:1},vb:{max:100,step:1},svb:{max:100,step:1},lvb:{max:100,step:1},dvb:{max:100,step:1},vmin:{max:100,step:1},svmin:{max:100,step:1},lvmin:{max:100,step:1},dvmin:{max:100,step:1},vmax:{max:100,step:1},svmax:{max:100,step:1},lvmax:{max:100,step:1},dvmax:{max:100,step:1}};function Kp({label:e=(0,x.__)("Height"),onChange:t,value:n}){var o,r;const l=parseFloat(n),[i]=Ar("spacing.units"),a=(0,_l.__experimentalUseCustomUnits)({availableUnits:i||["%","px","em","rem","vh","vw"]}),c=(0,u.useMemo)((()=>(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(n)),[n])[1]||a[0]?.value||"px";return(0,s.createElement)("fieldset",{className:"block-editor-height-control"},(0,s.createElement)(_l.BaseControl.VisualLabel,{as:"legend"},e),(0,s.createElement)(_l.Flex,null,(0,s.createElement)(_l.FlexItem,{isBlock:!0},(0,s.createElement)(_l.__experimentalUnitControl,{value:n,units:a,onChange:t,onUnitChange:e=>{const[o,r]=(0,_l.__experimentalParseQuantityAndUnitFromRawValue)(n);["em","rem"].includes(e)&&"px"===r?t((o/16).toFixed(2)+e):["em","rem"].includes(r)&&"px"===e?t(Math.round(16*o)+e):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(e)&&o>100&&t(100+e)},min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})),(0,s.createElement)(_l.FlexItem,{isBlock:!0},(0,s.createElement)(_l.__experimentalSpacer,{marginX:2,marginBottom:0},(0,s.createElement)(_l.RangeControl,{value:l,min:0,max:null!==(o=Wp[c]?.max)&&void 0!==o?o:100,step:null!==(r=Wp[c]?.step)&&void 0!==r?r:.1,withInputField:!1,onChange:e=>{t([e,c].join(""))},__nextHasNoMarginBottom:!0,label:e,hideLabelFromVision:!0})))))}function Zp(e,t){const{orientation:n="horizontal"}=t;return"fill"===e?(0,x.__)("Stretch to fill available space."):"fixed"===e&&"horizontal"===n?(0,x.__)("Specify a fixed width."):"fixed"===e?(0,x.__)("Specify a fixed height."):(0,x.__)("Fit contents.")}function qp({value:e={},onChange:t,parentLayout:n}){const{selfStretch:o,flexSize:r}=e;return(0,u.useEffect)((()=>{"fixed"!==o||r||t({...e,selfStretch:"fit"})}),[]),(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:Yp(n),value:o||"fit",help:Zp(o,n),onChange:n=>{const o="fixed"!==n?null:r;t({...e,selfStretch:n,flexSize:o})},isBlock:!0},(0,s.createElement)(_l.__experimentalToggleGroupControlOption,{key:"fit",value:"fit",label:(0,x.__)("Fit")}),(0,s.createElement)(_l.__experimentalToggleGroupControlOption,{key:"fill",value:"fill",label:(0,x.__)("Fill")}),(0,s.createElement)(_l.__experimentalToggleGroupControlOption,{key:"fixed",value:"fixed",label:(0,x.__)("Fixed")})),"fixed"===o&&(0,s.createElement)(_l.__experimentalUnitControl,{size:"__unstable-large",onChange:n=>{t({...e,flexSize:n})},value:r}))}function Yp(e){const{orientation:t="horizontal"}=e;return"horizontal"===t?(0,x.__)("Width"):(0,x.__)("Height")}const Xp=[{label:(0,x._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},{label:(0,x._x)("Square - 1:1","Aspect ratio option for dimensions control"),value:"1"},{label:(0,x._x)("Standard - 4:3","Aspect ratio option for dimensions control"),value:"4/3"},{label:(0,x._x)("Portrait - 3:4","Aspect ratio option for dimensions control"),value:"3/4"},{label:(0,x._x)("Classic - 3:2","Aspect ratio option for dimensions control"),value:"3/2"},{label:(0,x._x)("Classic Portrait - 2:3","Aspect ratio option for dimensions control"),value:"2/3"},{label:(0,x._x)("Wide - 16:9","Aspect ratio option for dimensions control"),value:"16/9"},{label:(0,x._x)("Tall - 9:16","Aspect ratio option for dimensions control"),value:"9/16"},{label:(0,x._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];function Qp({panelId:e,value:t,onChange:n=(()=>{}),options:o=Xp,defaultValue:r=Xp[0].value,hasValue:l,isShownByDefault:i=!0}){const a=null!=t?t:"auto";return(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:l||(()=>a!==r),label:(0,x.__)("Aspect ratio"),onDeselect:()=>n(void 0),isShownByDefault:i,panelId:e},(0,s.createElement)(_l.SelectControl,{label:(0,x.__)("Aspect ratio"),value:a,options:o,onChange:n,size:"__unstable-large",__nextHasNoMarginBottom:!0}))}const Jp=["horizontal","vertical"];function em(e){const t=tm(e),n=nm(e),o=om(e),r=rm(e),l=lm(e),i=im(e),s=sm(e),a=am(e);return"web"===u.Platform.OS&&(t||n||o||r||l||i||s||a)}function tm(e){return e?.layout?.contentSize}function nm(e){return e?.layout?.wideSize}function om(e){return e?.spacing?.padding}function rm(e){return e?.spacing?.margin}function lm(e){return e?.spacing?.blockGap}function im(e){return e?.dimensions?.minHeight}function sm(e){return e?.dimensions?.aspectRatio}function am(e){var t;const{type:n="default",default:{type:o="default"}={},allowSizingOnChildren:r=!1}=null!==(t=e?.parentLayout)&&void 0!==t?t:{},l=("flex"===o||"flex"===n)&&r;return!!e?.layout&&l}function cm(e,t){if(!t||!e)return e;const n={};return t.forEach((t=>{"vertical"===t&&(n.top=e.top,n.bottom=e.bottom),"horizontal"===t&&(n.left=e.left,n.right=e.right),n[t]=e?.[t]})),n}function um(e){return e&&"string"==typeof e?{top:e,right:e,bottom:e,left:e}:e}function dm({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){return(0,s.createElement)(_l.__experimentalToolsPanel,{label:(0,x.__)("Dimensions"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:Qr},r)}const pm={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,aspectRatio:!0,childLayout:!0};function mm({as:e=dm,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:l,defaultControls:i=pm,onVisualize:a=(()=>{}),includeLayoutControls:c=!1}){var d,p,m,h,g,f,b,v,k;const{dimensions:_,spacing:y}=r,E=e=>e&&"object"==typeof e?Object.keys(e).reduce(((t,n)=>(t[n]=el({settings:{dimensions:_,spacing:y}},"",e[n]),t)),{}):el({settings:{dimensions:_,spacing:y}},"",e),w=function(e){var t,n;const{custom:o,theme:r,default:l}=e?.spacing?.spacingSizes||{};return(null!==(t=null!==(n=null!=o?o:r)&&void 0!==n?n:l)&&void 0!==t?t:[]).length>0}(r),S=(0,_l.__experimentalUseCustomUnits)({availableUnits:r?.spacing?.units||["%","px","em","rem","vw"]}),C=tm(r)&&c,B=E(o?.layout?.contentSize),I=e=>{n(jn(t,["layout","contentSize"],e||void 0))},T=nm(r)&&c,M=E(o?.layout?.wideSize),P=e=>{n(jn(t,["layout","wideSize"],e||void 0))},R=om(r),N=um(E(o?.spacing?.padding)),L=Array.isArray(r?.spacing?.padding)?r?.spacing?.padding:r?.spacing?.padding?.sides,A=L&&L.some((e=>Jp.includes(e))),O=e=>{const o=cm(e,L);n(jn(t,["spacing","padding"],o))},D=()=>a("padding"),z=rm(r),V=um(E(o?.spacing?.margin)),F=Array.isArray(r?.spacing?.margin)?r?.spacing?.margin:r?.spacing?.margin?.sides,H=F&&F.some((e=>Jp.includes(e))),G=e=>{const o=cm(e,F);n(jn(t,["spacing","margin"],o))},U=()=>a("margin"),$=lm(r),j=E(o?.spacing?.blockGap),W=function(e){return e&&"string"==typeof e?{top:e}:e?{...e,right:e?.left,bottom:e?.top}:e}(j),K=Array.isArray(r?.spacing?.blockGap)?r?.spacing?.blockGap:r?.spacing?.blockGap?.sides,Z=K&&K.some((e=>Jp.includes(e))),q=e=>{n(jn(t,["spacing","blockGap"],e))},Y=e=>{e||q(null),!Z&&e?.hasOwnProperty("top")?q(e.top):q({top:e?.top,left:e?.left})},X=im(r),Q=E(o?.dimensions?.minHeight),J=e=>{const o=jn(t,["dimensions","minHeight"],e);n(jn(o,["dimensions","aspectRatio"],void 0))},ee=sm(r),te=E(o?.dimensions?.aspectRatio),ne=am(r),oe=o?.layout,{orientation:re="horizontal"}=null!==(d=r?.parentLayout)&&void 0!==d?d:{},le="horizontal"===re?(0,x.__)("Width"):(0,x.__)("Height"),ie=e=>{n({...t,layout:{...t?.layout,...e}})},se=(0,u.useCallback)((e=>({...e,layout:hl({...e?.layout,contentSize:void 0,wideSize:void 0,selfStretch:void 0,flexSize:void 0}),spacing:{...e?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...e?.dimensions,minHeight:void 0,aspectRatio:void 0}})),[]),ae=()=>a(!1);return(0,s.createElement)(e,{resetAllFilter:se,value:t,onChange:n,panelId:l},(C||T)&&(0,s.createElement)("span",{className:"span-columns"},(0,x.__)("Set the width of the main content area.")),C&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Content size"),hasValue:()=>!!t?.layout?.contentSize,onDeselect:()=>I(void 0),isShownByDefault:null!==(p=i.contentSize)&&void 0!==p?p:pm.contentSize,panelId:l},(0,s.createElement)(_l.__experimentalHStack,{alignment:"flex-end",justify:"flex-start"},(0,s.createElement)(_l.__experimentalUnitControl,{label:(0,x.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:B||"",onChange:e=>{I(e)},units:S}),(0,s.createElement)(_l.__experimentalView,null,(0,s.createElement)(Ti,{icon:Mi})))),T&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Wide size"),hasValue:()=>!!t?.layout?.wideSize,onDeselect:()=>P(void 0),isShownByDefault:null!==(m=i.wideSize)&&void 0!==m?m:pm.wideSize,panelId:l},(0,s.createElement)(_l.__experimentalHStack,{alignment:"flex-end",justify:"flex-start"},(0,s.createElement)(_l.__experimentalUnitControl,{label:(0,x.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:M||"",onChange:e=>{P(e)},units:S}),(0,s.createElement)(_l.__experimentalView,null,(0,s.createElement)(Ti,{icon:Pi})))),R&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,label:(0,x.__)("Padding"),onDeselect:()=>O(void 0),isShownByDefault:null!==(h=i.padding)&&void 0!==h?h:pm.padding,className:ml()({"tools-panel-item-spacing":w}),panelId:l},!w&&(0,s.createElement)(_l.__experimentalBoxControl,{values:N,onChange:O,label:(0,x.__)("Padding"),sides:L,units:S,allowReset:!1,splitOnAxis:A,onMouseOver:D,onMouseOut:ae}),w&&(0,s.createElement)(jp,{values:N,onChange:O,label:(0,x.__)("Padding"),sides:L,units:S,allowReset:!1,onMouseOver:D,onMouseOut:ae})),z&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,label:(0,x.__)("Margin"),onDeselect:()=>G(void 0),isShownByDefault:null!==(g=i.margin)&&void 0!==g?g:pm.margin,className:ml()({"tools-panel-item-spacing":w}),panelId:l},!w&&(0,s.createElement)(_l.__experimentalBoxControl,{values:V,onChange:G,label:(0,x.__)("Margin"),sides:F,units:S,allowReset:!1,splitOnAxis:H,onMouseOver:U,onMouseOut:ae}),w&&(0,s.createElement)(jp,{values:V,onChange:G,label:(0,x.__)("Margin"),sides:F,units:S,allowReset:!1,onMouseOver:U,onMouseOut:ae})),$&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.blockGap,label:(0,x.__)("Block spacing"),onDeselect:()=>q(void 0),isShownByDefault:null!==(f=i.blockGap)&&void 0!==f?f:pm.blockGap,className:ml()({"tools-panel-item-spacing":w}),panelId:l},!w&&(Z?(0,s.createElement)(_l.__experimentalBoxControl,{label:(0,x.__)("Block spacing"),min:0,onChange:Y,units:S,sides:K,values:W,allowReset:!1,splitOnAxis:Z}):(0,s.createElement)(_l.__experimentalUnitControl,{label:(0,x.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:q,units:S,value:j})),w&&(0,s.createElement)(jp,{label:(0,x.__)("Block spacing"),min:0,onChange:Y,showSideInLabel:!1,sides:Z?K:["top"],values:W,allowReset:!1})),X&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:()=>!!t?.dimensions?.minHeight,label:(0,x.__)("Minimum height"),onDeselect:()=>{J(void 0)},isShownByDefault:null!==(b=i.minHeight)&&void 0!==b?b:pm.minHeight,panelId:l},(0,s.createElement)(Kp,{label:(0,x.__)("Minimum height"),value:Q,onChange:J})),ee&&(0,s.createElement)(Qp,{hasValue:()=>!!t?.dimensions?.aspectRatio,value:te,onChange:e=>{const o=jn(t,["dimensions","aspectRatio"],e);n(jn(o,["dimensions","minHeight"],void 0))},panelId:l,isShownByDefault:null!==(v=i.aspectRatio)&&void 0!==v?v:pm.aspectRatio}),ne&&(0,s.createElement)(_l.__experimentalVStack,{as:_l.__experimentalToolsPanelItem,spacing:2,hasValue:()=>!!t?.layout,label:le,onDeselect:()=>{ie({selfStretch:void 0,flexSize:void 0})},isShownByDefault:null!==(k=i.childLayout)&&void 0!==k?k:pm.childLayout,panelId:l},(0,s.createElement)(qp,{value:oe,onChange:ie,parentLayout:r?.parentLayout})))}const hm=function(e){return(0,p.useRefEffect)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:o}=t;e.current.scrollBy(n,o)}const o={passive:!0};return t.addEventListener("wheel",n,o),()=>{t.removeEventListener("wheel",n,o)}}),[e])},gm=Number.MAX_SAFE_INTEGER;const fm=(0,u.forwardRef)((function({clientId:e,bottomClientId:t,children:n,__unstableRefreshSize:o,__unstableCoverTarget:r=!1,__unstablePopoverSlot:l,__unstableContentRef:i,shift:a=!0,...c},d){const m=bd(e),h=bd(null!=t?t:e),g=(0,p.useMergeRefs)([d,hm(i)]),[f,b]=(0,u.useReducer)((e=>(e+1)%gm),0);(0,u.useLayoutEffect)((()=>{if(!m)return;const e=new window.MutationObserver(b);return e.observe(m,{attributes:!0}),()=>{e.disconnect()}}),[m]);const v=(0,u.useMemo)((()=>f<0||!m||h!==m?{}:{position:"absolute",width:m.offsetWidth,height:m.offsetHeight}),[m,h,o,f]),k=(0,u.useMemo)((()=>{if(!(f<0||!m||t&&!h))return{getBoundingClientRect(){var e,t,n,o;const r=m.getBoundingClientRect(),l=h?.getBoundingClientRect(),i=Math.min(r.left,null!==(e=l?.left)&&void 0!==e?e:1/0),s=Math.min(r.top,null!==(t=l?.top)&&void 0!==t?t:1/0),a=Math.max(r.right,null!==(n=l.right)&&void 0!==n?n:-1/0)-i,c=Math.max(r.bottom,null!==(o=l.bottom)&&void 0!==o?o:-1/0)-s;return new window.DOMRect(i,s,a,c)},contextElement:m}}),[t,h,m,f]);return!m||t&&!h?null:(0,s.createElement)(_l.Popover,{ref:g,animate:!1,focusOnMount:!1,anchor:k,__unstableSlotName:l,inline:!l,placement:"top-start",resize:!1,flip:!1,shift:a,...c,className:ml()("block-editor-block-popover",c.className),variant:"unstyled"},r&&(0,s.createElement)("div",{style:v},n),!r&&n)}));function bm(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function vm({clientId:e,attributes:t,forceShow:n}){const o=bd(e),[r,l]=(0,u.useState)(),i=t?.style?.spacing?.margin;(0,u.useEffect)((()=>{if(!o||null===o.ownerDocument.defaultView)return;const e=bm(o,"margin-top"),t=bm(o,"margin-right"),n=bm(o,"margin-bottom"),r=bm(o,"margin-left");l({borderTopWidth:e,borderRightWidth:t,borderBottomWidth:n,borderLeftWidth:r,top:e?`-${e}`:0,right:t?`-${t}`:0,bottom:n?`-${n}`:0,left:r?`-${r}`:0})}),[o,i]);const[a,c]=(0,u.useState)(!1),d=(0,u.useRef)(i),p=(0,u.useRef)();return(0,u.useEffect)((()=>(js()(i,d.current)||n||(c(!0),d.current=i,p.current=setTimeout((()=>{c(!1)}),400)),()=>{c(!1),p.current&&window.clearTimeout(p.current)})),[i,n]),a||n?(0,s.createElement)(fm,{clientId:e,__unstableCoverTarget:!0,__unstableRefreshSize:i,__unstablePopoverSlot:"block-toolbar",shift:!1},(0,s.createElement)("div",{className:"block-editor__padding-visualizer",style:r})):null}function km(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function _m({clientId:e,value:t,forceShow:n}){const o=bd(e),[r,l]=(0,u.useState)(),i=t?.spacing?.padding;(0,u.useEffect)((()=>{o&&null!==o.ownerDocument.defaultView&&l({borderTopWidth:km(o,"padding-top"),borderRightWidth:km(o,"padding-right"),borderBottomWidth:km(o,"padding-bottom"),borderLeftWidth:km(o,"padding-left")})}),[o,i]);const[a,c]=(0,u.useState)(!1),d=(0,u.useRef)(i),p=(0,u.useRef)();return(0,u.useEffect)((()=>(js()(i,d.current)||n||(c(!0),d.current=i,p.current=setTimeout((()=>{c(!1)}),400)),()=>{c(!1),p.current&&window.clearTimeout(p.current)})),[i,n]),a||n?(0,s.createElement)(fm,{clientId:e,__unstableCoverTarget:!0,__unstableRefreshSize:i,__unstablePopoverSlot:"block-toolbar",shift:!1},(0,s.createElement)("div",{className:"block-editor__padding-visualizer",style:r})):null}const ym="dimensions",Em="spacing";function wm({children:e,resetAllFilter:t}){const n=(0,u.useCallback)((e=>{const n=e.style,o=t(n);return{...e,style:o}}),[t]);return(0,s.createElement)(Bs,{group:"dimensions",resetAllFilter:n},e)}function Sm({clientId:e,name:t,setAttributes:n,settings:o}){const r=em(o),l=(0,d.useSelect)((t=>t(Nr).getBlockAttributes(e)?.style),[e]),[i,a]=function(){const[e,t]=(0,u.useState)(!1),{hideBlockInterface:n,showBlockInterface:o}=ie((0,d.useDispatch)(Nr));return(0,u.useEffect)((()=>{e?n():o()}),[e,o,n]),[e,t]}();if(!r)return null;const p={...(0,c.getBlockSupport)(t,[ym,"__experimentalDefaultControls"]),...(0,c.getBlockSupport)(t,[Em,"__experimentalDefaultControls"])};return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(mm,{as:wm,panelId:e,settings:o,value:l,onChange:e=>{n({style:hl(e)})},defaultControls:p,onVisualize:a}),!!o?.spacing?.padding&&(0,s.createElement)(_m,{forceShow:"padding"===i,clientId:e,value:l}),!!o?.spacing?.margin&&(0,s.createElement)(vm,{forceShow:"margin"===i,clientId:e,value:l}))}function Cm(e,t="any"){if("web"!==u.Platform.OS)return!1;const n=(0,c.getBlockSupport)(e,ym);return!0===n||("any"===t?!(!n?.aspectRatio&&!n?.minHeight):!!n?.[t])}const xm={useBlockProps:function({name:e,minHeight:t,style:n}){if(!Cm(e,"aspectRatio")||fl(e,ym,"aspectRatio"))return{};const o=ml()({"has-aspect-ratio":!!n?.dimensions?.aspectRatio}),r={};n?.dimensions?.aspectRatio?r.minHeight="unset":(t||n?.dimensions?.minHeight)&&(r.aspectRatio="unset");return{className:o,style:r}},attributeKeys:["minHeight","style"],hasSupport:e=>Cm(e,"aspectRatio")};function Bm(){w()("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}const Im=[...Pp,Iu,_d,ym,tc,Em,Tu],Tm=e=>Im.some((t=>(0,c.hasBlockSupport)(e,t)));function Mm(e={}){const t={};return(0,Ri.getCSSRules)(e).forEach((e=>{t[e.key]=e.value})),t}const Pm={[`${Iu}.__experimentalSkipSerialization`]:["border"],[`${_d}.__experimentalSkipSerialization`]:[_d],[`${Mp}.__experimentalSkipSerialization`]:[Mp],[`${ym}.__experimentalSkipSerialization`]:[ym],[`${Em}.__experimentalSkipSerialization`]:[Em],[`${Tu}.__experimentalSkipSerialization`]:[Tu]},Rm={...Pm,[`${ym}.aspectRatio`]:[`${ym}.aspectRatio`],[`${tc}`]:[tc]},Nm={[`${ym}.aspectRatio`]:!0,[`${tc}`]:!0},Lm={gradients:"gradient"};function Am(e,t,n=!1){if(!e)return e;let o=e;return n||(o=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;Am(o[t],[n],!0)}else 1===e.length&&delete o[e[0]]})),o}function Om(e,t,n,o=Rm){if(!Tm(t))return e;let{style:r}=n;return Object.entries(o).forEach((([e,n])=>{const o=Nm[e]||(0,c.getBlockSupport)(t,e);!0===o&&(r=Am(r,n)),Array.isArray(o)&&o.forEach((e=>{const t=Lm[e]||e;r=Am(r,[[...n,t]])}))})),e.style={...Mm(r),...e.style},e}const Dm={edit:function({clientId:e,name:t,setAttributes:n,__unstableParentLayout:o}){const r={clientId:e,name:t,setAttributes:n,settings:vl(t,o)};return"default"!==ns()?null:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Md,{...r}),(0,s.createElement)(pc,{...r}),(0,s.createElement)(Ap,{...r}),(0,s.createElement)(Ou,{...r}),(0,s.createElement)(Sm,{...r}))},hasSupport:Tm,addSaveProps:Om,attributeKeys:["style"],useBlockProps:function e({name:t,style:n}){const o=`wp-elements-${(0,p.useInstanceId)(e)}`,r=`.editor-styles-wrapper .${o}`,l=n?.elements,i=(0,u.useMemo)((()=>{if(!l)return;const e=[];return zm.forEach((({elementType:n,pseudo:o,elements:i})=>{if(fl(t,_d,n))return;const s=l?.[n];if(s){const t=tl(r,c.__EXPERIMENTAL_ELEMENTS[n]);e.push((0,Ri.compileCSS)(s,{selector:t})),o&&o.forEach((t=>{s[t]&&e.push((0,Ri.compileCSS)(s[t],{selector:tl(r,`${c.__EXPERIMENTAL_ELEMENTS[n]}${t}`)}))}))}i&&i.forEach((t=>{l[t]&&e.push((0,Ri.compileCSS)(l[t],{selector:tl(r,c.__EXPERIMENTAL_ELEMENTS[t])}))}))})),e.length>0?e.join(""):void 0}),[r,l,t]);return bl({css:i}),Om({className:o},t,{style:n},Pm)}},zm=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}];(0,m.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Tm(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e}));(0,m.addFilter)("blocks.registerBlockType","core/settings/addAttribute",(function(e){return t=e,(0,c.hasBlockSupport)(t,"__experimentalSettings",!1)?(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e;var t}));const Vm=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"}));const Fm=function e({id:t,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:l,value:i,onChange:a}){let c;c="unset"===i?(0,s.createElement)(_l.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):i?(0,s.createElement)(_l.DuotoneSwatch,{values:i}):(0,s.createElement)(Ti,{icon:Vm});const u=(0,x.__)("Apply duotone filter"),d=`${(0,p.useInstanceId)(e,"duotone-control",t)}__description`;return(0,s.createElement)(_l.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,x.__)("Duotone")},renderToggle:({isOpen:e,onToggle:t})=>(0,s.createElement)(_l.ToolbarButton,{showTooltip:!0,onClick:t,"aria-haspopup":"true","aria-expanded":e,onKeyDown:n=>{e||n.keyCode!==zs.DOWN||(n.preventDefault(),t())},label:u,icon:c}),renderContent:()=>(0,s.createElement)(_l.MenuGroup,{label:(0,x.__)("Duotone")},(0,s.createElement)("p",null,(0,x.__)("Create a two-tone color effect without losing your original image.")),(0,s.createElement)(_l.DuotonePicker,{"aria-label":u,"aria-describedby":d,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:l,value:i,onChange:a}))})};function Hm(e){return`${e}{filter:none}`}function Gm(e,t){return`${e}{filter:url(#${t})}`}function Um(e,t){const n=function(e=[]){const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=Vc(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}(t);return`\n<svg\n\txmlns:xlink="http://www.w3.org/1999/xlink"\n\tviewBox="0 0 0 0"\n\twidth="0"\n\theight="0"\n\tfocusable="false"\n\trole="none"\n\taria-hidden="true"\n\tstyle="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"\n>\n\t<defs>\n\t\t<filter id="${e}">\n\t\t\t\x3c!--\n\t\t\t\tUse sRGB instead of linearRGB so transparency looks correct.\n\t\t\t\tUse perceptual brightness to convert to grayscale.\n\t\t\t--\x3e\n\t\t\t<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>\n\t\t\t\x3c!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. --\x3e\n\t\t\t<feComponentTransfer color-interpolation-filters="sRGB">\n\t\t\t\t<feFuncR type="table" tableValues="${n.r.join(" ")}"></feFuncR>\n\t\t\t\t<feFuncG type="table" tableValues="${n.g.join(" ")}"></feFuncG>\n\t\t\t\t<feFuncB type="table" tableValues="${n.b.join(" ")}"></feFuncB>\n\t\t\t\t<feFuncA type="table" tableValues="${n.a.join(" ")}"></feFuncA>\n\t\t\t</feComponentTransfer>\n\t\t\t\x3c!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. --\x3e\n\t\t\t<feComposite in2="SourceGraphic" operator="in"></feComposite>\n\t\t</filter>\n\t</defs>\n</svg>`}function $m(e,t="root",n={}){if(!t)return null;const{fallback:o=!1}=n,{name:r,selectors:l,supports:i}=e,s=l&&Object.keys(l).length>0,a=Array.isArray(t)?t.join("."):t;let c=null;if(c=s&&l.root?l?.root:i?.__experimentalSelector?i.__experimentalSelector:".wp-block-"+r.replace("core/","").replace("/","-"),"root"===a)return c;const u=Array.isArray(t)?t:t.split(".");if(1===u.length){const e=o?c:null;if(s){return Wn(l,`${a}.root`,null)||Wn(l,a,null)||e}const t=Wn(i,`${a}.__experimentalSelector`,null);return t?tl(c,t):e}let d;return s&&(d=Wn(l,a,null)),d||(o?$m(e,u[0],n):null)}const jm=[];function Wm(e,{presetSetting:t,defaultSetting:n}){const o=!e?.color?.[n],r=e?.color?.[t]?.custom||jm,l=e?.color?.[t]?.theme||jm,i=e?.color?.[t]?.default||jm;return(0,u.useMemo)((()=>[...r,...l,...o?jm:i]),[o,r,l,i])}function Km(e){return Zm(e)}function Zm(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function qm({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){return(0,s.createElement)(_l.__experimentalToolsPanel,{label:(0,x._x)("Filters","Name for applying graphical effects"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:Qr},r)}const Ym={duotone:!0},Xm={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,x.__)("Duotone")},Qm=({indicator:e,label:t})=>(0,s.createElement)(_l.__experimentalHStack,{justify:"flex-start"},(0,s.createElement)(_l.__experimentalZStack,{isLayered:!1,offset:-8},(0,s.createElement)(_l.Flex,{expanded:!1},"unset"!==e&&e?(0,s.createElement)(_l.DuotoneSwatch,{values:e}):(0,s.createElement)(_l.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}))),(0,s.createElement)(_l.FlexItem,{title:t},t));function Jm({as:e=qm,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:l,defaultControls:i=Ym}){const a=Zm(r),c=Wm(r,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),d=Wm(r,{presetSetting:"palette",defaultSetting:"defaultPalette"}),p=(m=o?.filter?.duotone,el({settings:r},"",m));var m;const h=e=>{const o=c.find((({colors:t})=>t===e)),r=o?`var:preset|duotone|${o.slug}`:e;n(jn(t,["filter","duotone"],r))},g=(0,u.useCallback)((e=>({...e,filter:{...e.filter,duotone:void 0}})),[]);return(0,s.createElement)(e,{resetAllFilter:g,value:t,onChange:n,panelId:l},a&&(0,s.createElement)(_l.__experimentalToolsPanelItem,{label:(0,x.__)("Duotone"),hasValue:()=>!!t?.filter?.duotone,onDeselect:()=>h(void 0),isShownByDefault:i.duotone,panelId:l},(0,s.createElement)(_l.Dropdown,{popoverProps:Xm,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:({onToggle:e,isOpen:t})=>{const n={onClick:e,className:ml()({"is-open":t}),"aria-expanded":t};return(0,s.createElement)(_l.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,s.createElement)(_l.Button,{...n},(0,s.createElement)(Qm,{indicator:p,label:(0,x.__)("Duotone")})))},renderContent:()=>(0,s.createElement)(_l.__experimentalDropdownContentWrapper,{paddingSize:"small"},(0,s.createElement)(_l.MenuGroup,{label:(0,x.__)("Duotone")},(0,s.createElement)("p",null,(0,x.__)("Create a two-tone color effect without losing your original image.")),(0,s.createElement)(_l.DuotonePicker,{colorPalette:d,duotonePalette:c,disableCustomColors:!0,disableCustomDuotone:!0,value:p,onChange:h})))})))}const eh=[],th=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");function nh({presetSetting:e,defaultSetting:t}){const[n,o,r,l]=Ar(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,u.useMemo)((()=>[...o||eh,...r||eh,...n&&l||eh]),[n,o,r,l])}function oh(e,t){if(!e)return;const n=t?.find((({slug:t})=>e===`var:preset|duotone|${t}`));return n?n.colors:void 0}Hc([Gc]);const rh={shareWithChildBlocks:!0,edit:function({style:e,setAttributes:t,name:n}){const o=e?.color?.duotone,r=vl(n),l=ns(),i=nh({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=nh({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[c,u]=Ar("color.custom","color.customDuotone"),d=!c,p=!u||0===a?.length&&d;if(0===i?.length&&p)return null;if("default"!==l)return null;const m=Array.isArray(o)?o:oh(o,i);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Bs,{group:"filter"},(0,s.createElement)(Jm,{value:{filter:{duotone:m}},onChange:n=>{const o={...e,color:{...n?.filter}};t({style:o})},settings:r})),(0,s.createElement)(Bl,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(Fm,{duotonePalette:i,colorPalette:a,disableCustomDuotone:p,disableCustomColors:d,value:m,onChange:n=>{const o=function(e,t){if(!e||!Array.isArray(e))return;const n=t?.find((t=>t?.colors?.every(((t,n)=>t===e[n]))));return n?`var:preset|duotone|${n.slug}`:void 0}(n,i),r={...e,color:{...e?.color,duotone:null!=o?o:n}};t({style:r})},settings:r})))},useBlockProps:function e({name:t,style:n}){const o=(0,p.useInstanceId)(e),r=(0,u.useMemo)((()=>{const e=(0,c.getBlockType)(t);if(e){if(!(0,c.getBlockSupport)(e,"filter.duotone",!1))return null;const t=(0,c.getBlockSupport)(e,"color.__experimentalDuotone",!1);if(t){const n=$m(e);return"string"==typeof t?tl(n,t):n}return $m(e,"filter.duotone",{fallback:!0})}}),[t]),l=n?.color?.duotone,i=`wp-duotone-${o}`,s=r&&l;return lh({clientId:o,id:i,selector:r,attribute:l}),{className:s?i:""}},attributeKeys:["style"],hasSupport:e=>(0,c.hasBlockSupport)(e,"filter.duotone")};function lh({clientId:e,id:t,selector:n,attribute:o}){const r=nh({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),l=Array.isArray(o),i=l?void 0:oh(o,r),s="string"==typeof o&&i;let a=null;s?a=i:("string"==typeof o&&!s||l)&&(a=o);const c=n.split(",").map((e=>`.${t}${e.trim()}`)).join(", "),d=Array.isArray(a)||"unset"===a;bl(d?{css:"unset"!==a?Gm(c,t):Hm(c),__unstableType:"presets"}:void 0),bl(d?{assets:"unset"!==a?Um(t,a):"",__unstableType:"svgs"}:void 0);const p=bd(e);(0,u.useEffect)((()=>{if(d&&p&&th){const e=p.style.display;p.style.display="inline-block",p.offsetHeight,p.style.display=e}}),[d,p])}function ih(e){return(0,d.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o,__experimentalGetReusableBlockTitle:r}=t(Nr),{getBlockType:l,getActiveBlockVariation:i}=t(c.store),s=n(e),a=l(s);if(!a)return null;const u=o(e),d=i(s,u),p=(0,c.isReusableBlock)(a),m=(p?r(u.ref):void 0)||a.title,h=p||(0,c.isTemplatePart)(a),g=function(e){const t=e?.style?.position?.type;return"sticky"===t?(0,x.__)("Sticky"):"fixed"===t?(0,x.__)("Fixed"):null}(u),f={isSynced:h,title:m,icon:a.icon,description:a.description,anchor:u?.anchor,positionLabel:g,positionType:u?.style?.position?.type,name:u?.metadata?.name};return d?{isSynced:h,title:d.title||a.title,icon:d.icon||a.icon,description:d.description||a.description,anchor:u?.anchor,positionLabel:g,positionType:u?.style?.position?.type,name:u?.metadata?.name}:f}),[e])}(0,m.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,c.hasBlockSupport)(e,"filter.duotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e}));const{CustomSelectControl:sh}=ie(_l.privateApis),ah="position",ch="block-editor-hooks__position-selection__select-control__option",uh={key:"default",value:"",name:(0,x.__)("Default"),className:ch},dh={key:"sticky",value:"sticky",name:(0,x._x)("Sticky","Name for the value of the CSS position property"),className:ch,__experimentalHint:(0,x.__)("The block will stick to the top of the window instead of scrolling.")},ph={key:"fixed",value:"fixed",name:(0,x._x)("Fixed","Name for the value of the CSS position property"),className:ch,__experimentalHint:(0,x.__)("The block will not move when the page is scrolled.")},mh=["top","right","bottom","left"],hh=["sticky","fixed"];function gh(e){const t=e.style?.position?.type;return"sticky"===t||"fixed"===t}function fh({name:e}={}){const[t,n]=Ar("position.fixed","position.sticky"),o=!t&&!n;return r=e,!(0,c.getBlockSupport)(r,ah)||o;var r}function bh({style:e={},clientId:t,name:n,setAttributes:o}){const r=function(e){const t=(0,c.getBlockSupport)(e,ah);return!(!0!==t&&!t?.fixed)}(n),l=function(e){const t=(0,c.getBlockSupport)(e,ah);return!(!0!==t&&!t?.sticky)}(n),i=e?.position?.type,{firstParentClientId:a}=(0,d.useSelect)((e=>{const{getBlockParents:n}=e(Nr),o=n(t);return{firstParentClientId:o[o.length-1]}}),[t]),p=ih(a),m=l&&i===dh.value&&p?(0,x.sprintf)((0,x.__)("The block will stick to the scrollable area of the parent %s block."),p.title):null,h=(0,u.useMemo)((()=>{const e=[uh];return(l||i===dh.value)&&e.push(dh),(r||i===ph.value)&&e.push(ph),e}),[r,l,i]),g=i&&h.find((e=>e.value===i))||uh;return u.Platform.select({web:h.length>1?(0,s.createElement)(Bs,{group:"position"},(0,s.createElement)(_l.BaseControl,{className:"block-editor-hooks__position-selection",__nextHasNoMarginBottom:!0,help:m},(0,s.createElement)(sh,{__nextUnconstrainedWidth:!0,__next40pxDefaultSize:!0,className:"block-editor-hooks__position-selection__select-control",label:(0,x.__)("Position"),hideLabelFromVision:!0,describedBy:(0,x.sprintf)((0,x.__)("Currently selected position: %s"),g.name),options:h,value:g,__experimentalShowSelectedHint:!0,onChange:({selectedItem:t})=>{(t=>{const n={...e,position:{...e?.position,type:t,top:"sticky"===t||"fixed"===t?"0px":void 0}};o({style:hl(n)})})(t.value)},size:"__unstable-large"}))):null,native:null})}const vh={edit:function(e){return fh(e)?null:(0,s.createElement)(bh,{...e})},useBlockProps:function e({name:t,style:n}){const o=(0,c.hasBlockSupport)(t,ah),r=fh({name:t}),l=o&&!r,i=(0,p.useInstanceId)(e),s=`.wp-container-${i}.wp-container-${i}`;let a;l&&(a=function({selector:e,style:t}){let n="";const{type:o}=t?.position||{};return hh.includes(o)?(n+=`${e} {`,n+=`position: ${o};`,mh.forEach((e=>{void 0!==t?.position?.[e]&&(n+=`${e}: ${t.position[e]};`)})),"sticky"!==o&&"fixed"!==o||(n+="z-index: 10"),n+="}",n):n}({selector:s,style:n})||"");const u=ml()({[`wp-container-${i}`]:l&&!!a,[`is-position-${n?.position?.type}`]:l&&!!a&&!!n?.position?.type});return bl({css:a}),{className:u}},attributeKeys:["style"],hasSupport:e=>(0,c.hasBlockSupport)(e,ah)};const kh="layout";function _h(e){return(0,c.hasBlockSupport)(e,"layout")||(0,c.hasBlockSupport)(e,"__experimentalLayout")}function yh(e={},t=""){const{kebabCase:n}=ie(_l.privateApis),o=(0,d.useSelect)((e=>{const{getSettings:t}=e(Nr);return t().__experimentalFeatures?.useRootPaddingAwareAlignments}),[]),{layout:r}=e,{default:l}=(0,c.getBlockSupport)(t,kh)||{},i=r?.inherit||r?.contentSize||r?.wideSize?{...r,type:"constrained"}:r||l||{},s=[];if(Al[i?.type||"default"]?.className){const e=Al[i?.type||"default"]?.className,n=t.split("/"),o=`wp-block-${"core"===n[0]?n.pop():n.join("-")}-${e}`;s.push(e,o)}return(i?.inherit||i?.contentSize||"constrained"===i?.type)&&o&&s.push("has-global-padding"),i?.orientation&&s.push(`is-${n(i.orientation)}`),i?.justifyContent&&s.push(`is-content-justification-${n(i.justifyContent)}`),i?.flexWrap&&"nowrap"===i.flexWrap&&s.push("is-nowrap"),s}const Eh={shareWithChildBlocks:!0,edit:function({layout:e,setAttributes:t,name:n}){const o=vl(n),{layout:r}=o,[l]=Ar("layout"),{themeSupportsLayout:i}=(0,d.useSelect)((e=>{const{getSettings:t}=e(Nr);return{themeSupportsLayout:t().supportsLayout}}),[]);if("default"!==ns())return null;const a=(0,c.getBlockSupport)(n,kh,{}),u={...r,...a},{allowSwitching:p,allowEditing:m=!0,allowInheriting:h=!0,default:g}=u;if(!m)return null;const f=!(!h||!l||e?.type&&"default"!==e?.type&&"constrained"!==e?.type&&!e?.inherit),b=e||g||{},{inherit:v=!1,type:k="default",contentSize:_=null}=b;if(("default"===k||"constrained"===k)&&!i)return null;const y=Vi(k),E=Vi("constrained"),w=!b.type&&(_||v),S=!!v||!!_,C=e=>t({layout:e});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Bs,null,(0,s.createElement)(_l.PanelBody,{title:(0,x.__)("Layout")},f&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-hooks__toggle-control",label:(0,x.__)("Inner blocks use content width"),checked:"constrained"===y?.name||S,onChange:()=>t({layout:{type:"constrained"===y?.name||S?"default":"constrained"}}),help:"constrained"===y?.name||S?(0,x.__)("Nested blocks use content width with options for full and wide widths."):(0,x.__)("Nested blocks will fill the width of this container. Toggle to constrain.")})),!v&&p&&(0,s.createElement)(wh,{type:k,onChange:e=>t({layout:{type:e}})}),y&&"default"!==y.name&&(0,s.createElement)(y.inspectorControls,{layout:b,onChange:C,layoutBlockSupport:u}),E&&w&&(0,s.createElement)(E.inspectorControls,{layout:b,onChange:C,layoutBlockSupport:u}))),!v&&y&&(0,s.createElement)(y.toolBarControls,{layout:b,onChange:C,layoutBlockSupport:a}))},attributeKeys:["layout"],hasSupport:e=>_h(e)};function wh({type:e,onChange:t}){return(0,s.createElement)(_l.ButtonGroup,null,zi.map((({name:n,label:o})=>(0,s.createElement)(_l.Button,{key:n,isPressed:e===n,onClick:()=>t(n)},o))))}function Sh({block:e,props:t}){const{name:n,attributes:o}=t,r=(0,p.useInstanceId)(e),{layout:l}=o,{default:i}=(0,c.getBlockSupport)(n,kh)||{},a=l?.inherit||l?.contentSize||l?.wideSize?{...l,type:"constrained"}:l||i||{},u=yh(o,n),{kebabCase:d}=ie(_l.privateApis),m=`wp-container-${d(n)}-is-layout-`,h=`.${m}${r}.${m}${r}`,[g]=Ar("spacing.blockGap"),f=null!==g,b=Vi(a?.type||"default"),v=b?.getLayoutStyle?.({blockName:n,selector:h,layout:a,style:o?.style,hasBlockGapSupport:f}),k=ml()({[`${m}${r}`]:!!v},u);return bl({css:v}),(0,s.createElement)(e,{...t,__unstableLayoutClassNames:k})}const Ch=(0,p.createHigherOrderComponent)((e=>t=>{const n=_h(t.name);return(0,d.useSelect)((e=>!!n&&!e(Nr).getSettings().disableLayoutStyles),[n])?(0,s.createElement)(Sh,{block:e,props:t}):(0,s.createElement)(e,{...t})}),"withLayoutStyles");(0,m.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.layout)&&void 0!==t?t:{})||_h(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,m.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",Ch);const xh={useBlockProps:function e({style:t}){var n;const o=(0,d.useSelect)((e=>!e(Nr).getSettings().disableLayoutStyles)),r=null!==(n=t?.layout)&&void 0!==n?n:{},{selfStretch:l,flexSize:i}=r,s=(0,p.useInstanceId)(e),a=`.wp-container-content-${s}`;let c="";if(o&&("fixed"===l&&i?c=`${a} {\n\t\t\t\tflex-basis: ${i};\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}`:"fill"===l&&(c=`${a} {\n\t\t\t\tflex-grow: 1;\n\t\t\t}`)),bl({css:c}),c)return{className:`wp-container-content-${s}`}},attributeKeys:["style"],hasSupport:()=>!0};function Bh(e){return(0,d.useSelect)((t=>{const{getBlocksByClientId:n,getSelectedBlockClientIds:o,isUngroupable:r,isGroupable:l}=t(Nr),{getGroupingBlockName:i,getBlockType:s}=t(c.store),a=e?.length?e:o(),u=n(a),[d]=u,p=1===a.length&&r(a[0]);return{clientIds:a,isGroupable:l(a),isUngroupable:p,blocksSelection:u,groupingBlockName:i(),onUngroup:p&&s(d.name)?.transforms?.ungroup}}),[e])}function Ih({clientIds:e,isGroupable:t,isUngroupable:n,onUngroup:o,blocksSelection:r,groupingBlockName:l,onClose:i=(()=>{})}){const{replaceBlocks:a}=(0,d.useDispatch)(Nr);return t||n?(0,s.createElement)(s.Fragment,null,t&&(0,s.createElement)(_l.MenuItem,{onClick:()=>{(()=>{const t=(0,c.switchToBlockType)(r,l);t&&a(e,t)})(),i()}},(0,x._x)("Group","verb")),n&&(0,s.createElement)(_l.MenuItem,{onClick:()=>{(()=>{let t=r[0].innerBlocks;t.length&&(o&&(t=o(r[0].attributes,r[0].innerBlocks)),a(e,t))})(),i()}},(0,x._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor "))):null}function Th(e){return(0,d.useSelect)((t=>{const{canEditBlock:n,canMoveBlock:o,canRemoveBlock:r,canLockBlockType:l,getBlockName:i,getBlockRootClientId:s,getTemplateLock:a}=t(Nr),c=s(e),u=n(e),d=o(e,c),p=r(e,c);return{canEdit:u,canMove:d,canRemove:p,canLock:l(i(e)),isContentLocked:"contentOnly"===a(e),isLocked:!u||!d||!p}}),[e])}const Mh=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.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"})),Ph=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.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"})),Rh=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.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"})),Nh=["core/block","core/navigation"];function Lh(e){return e.remove&&e.move?"all":!(!e.remove||e.move)&&"insert"}function Ah({clientId:e,onClose:t}){const[n,o]=(0,u.useState)({move:!1,remove:!1}),{canEdit:r,canMove:l,canRemove:i}=Th(e),{allowsEditLocking:a,templateLock:m,hasTemplateLock:h}=(0,d.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(Nr),r=n(e),l=(0,c.getBlockType)(r);return{allowsEditLocking:Nh.includes(r),templateLock:o(e)?.templateLock,hasTemplateLock:!!l?.attributes?.templateLock}}),[e]),[g,f]=(0,u.useState)(!!m),{updateBlockAttributes:b}=(0,d.useDispatch)(Nr),v=ih(e),k=(0,p.useInstanceId)(Ah,"block-editor-block-lock-modal__options-title");(0,u.useEffect)((()=>{o({move:!l,remove:!i,...a?{edit:!r}:{}})}),[r,l,i,a]);const _=Object.values(n).every(Boolean),y=Object.values(n).some(Boolean)&&!_;return(0,s.createElement)(_l.Modal,{title:(0,x.sprintf)((0,x.__)("Lock %s"),v.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t},(0,s.createElement)("p",null,(0,x.__)("Choose specific attributes to restrict or lock all available options.")),(0,s.createElement)("form",{onSubmit:o=>{o.preventDefault(),b([e],{lock:n,templateLock:g?Lh(n):void 0}),t()}},(0,s.createElement)("div",{role:"group","aria-labelledby":k,className:"block-editor-block-lock-modal__options"},(0,s.createElement)(_l.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__options-title",label:(0,s.createElement)("span",{id:k},(0,x.__)("Lock all")),checked:_,indeterminate:y,onChange:e=>o({move:e,remove:e,...a?{edit:e}:{}})}),(0,s.createElement)("ul",{className:"block-editor-block-lock-modal__checklist"},a&&(0,s.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,s.createElement)(_l.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Restrict editing"),checked:!!n.edit,onChange:e=>o((t=>({...t,edit:e})))}),(0,s.createElement)(_l.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.edit?Rh:Mh})),(0,s.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,s.createElement)(_l.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Disable movement"),checked:n.move,onChange:e=>o((t=>({...t,move:e})))}),(0,s.createElement)(_l.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.move?Rh:Mh})),(0,s.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,s.createElement)(_l.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Prevent removal"),checked:n.remove,onChange:e=>o((t=>({...t,remove:e})))}),(0,s.createElement)(_l.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.remove?Rh:Mh}))),h&&(0,s.createElement)(_l.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__template-lock",label:(0,x.__)("Apply to all blocks inside"),checked:g,disabled:n.move&&!n.remove,onChange:()=>f(!g)})),(0,s.createElement)(_l.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,s.createElement)(_l.FlexItem,null,(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:t},(0,x.__)("Cancel"))),(0,s.createElement)(_l.FlexItem,null,(0,s.createElement)(_l.Button,{variant:"primary",type:"submit"},(0,x.__)("Apply"))))))}function Oh({clientId:e}){const{canLock:t,isLocked:n}=Th(e),[o,r]=(0,u.useReducer)((e=>!e),!1);if(!t)return null;const l=n?(0,x.__)("Unlock"):(0,x.__)("Lock");return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.MenuItem,{icon:n?Mh:Ph,onClick:r,"aria-expanded":o,"aria-haspopup":"dialog"},l),o&&(0,s.createElement)(Ah,{clientId:e,onClose:r}))}const Dh=()=>{};const zh=(0,p.compose)([(0,d.withSelect)(((e,{clientId:t})=>{const{getBlock:n,getBlockMode:o,getSettings:r}=e(Nr),l=n(t),i=r().codeEditingEnabled;return{mode:o(t),blockType:l?(0,c.getBlockType)(l.name):null,isCodeEditingEnabled:i}})),(0,d.withDispatch)(((e,{onToggle:t=Dh,clientId:n})=>({onToggleMode(){e(Nr).toggleBlockMode(n),t()}})))])((function({blockType:e,mode:t,onToggleMode:n,small:o=!1,isCodeEditingEnabled:r=!0}){if(!e||!(0,c.hasBlockSupport)(e,"html",!0)||!r)return null;const l="visual"===t?(0,x.__)("Edit as HTML"):(0,x.__)("Edit visually");return(0,s.createElement)(_l.MenuItem,{onClick:n},!o&&l)}));function Vh(e){return 0===e?.trim()?.length}function Fh({blockName:e,originalBlockName:t,onClose:n,onSave:o}){const[r,l]=(0,u.useState)(e),i=r!==e,a=r===t,c=Vh(r),d=i||a,m=(0,p.useInstanceId)(Fh,"block-editor-rename-modal__description");return(0,s.createElement)(_l.Modal,{title:(0,x.__)("Rename"),onRequestClose:n,overlayClassName:"block-editor-block-rename-modal",aria:{describedby:m},focusOnMount:"firstContentElement"},(0,s.createElement)("p",{id:m},(0,x.__)("Enter a custom name for this block.")),(0,s.createElement)("form",{onSubmit:e=>{e.preventDefault(),d&&(()=>{const e=a||c?(0,x.sprintf)((0,x.__)('Block name reset to: "%s".'),r):(0,x.sprintf)((0,x.__)('Block name changed to: "%s".'),r);(0,vo.speak)(e,"assertive"),o(r),n()})()}},(0,s.createElement)(_l.__experimentalVStack,{spacing:"3"},(0,s.createElement)(_l.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:r,label:(0,x.__)("Block name"),hideLabelFromVision:!0,placeholder:t,onChange:l,onFocus:e=>e.target.select()}),(0,s.createElement)(_l.__experimentalHStack,{justify:"right"},(0,s.createElement)(_l.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:n},(0,x.__)("Cancel")),(0,s.createElement)(_l.Button,{__next40pxDefaultSize:!0,"aria-disabled":!d,variant:"primary",type:"submit"},(0,x.__)("Save"))))))}function Hh({clientId:e}){const[t,n]=(0,u.useState)(!1),{metadata:o}=(0,d.useSelect)((t=>{const{getBlockAttributes:n}=t(Nr),o=n(e)?.metadata;return{metadata:o}}),[e]),{updateBlockAttributes:r}=(0,d.useDispatch)(Nr),l=o?.name;const i=ih(e);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.MenuItem,{onClick:()=>{n(!0)},"aria-expanded":t,"aria-haspopup":"dialog"},(0,x.__)("Rename")),t&&(0,s.createElement)(Fh,{blockName:l||"",originalBlockName:i?.title,onClose:()=>n(!1),onSave:t=>{(t===i?.title||Vh(t))&&(t=void 0),function(t){r([e],{metadata:{...o&&o,name:t}})}(t)}}))}const{Fill:Gh,Slot:Uh}=(0,_l.createSlotFill)("BlockSettingsMenuControls");function $h({...e}){return(0,s.createElement)(_l.__experimentalStyleProvider,{document},(0,s.createElement)(Gh,{...e}))}$h.Slot=({fillProps:e,clientIds:t=null,__unstableDisplayLocation:n})=>{const{selectedBlocks:o,selectedClientIds:r}=(0,d.useSelect)((e=>{const{getBlockNamesByClientId:n,getSelectedBlockClientIds:o}=e(Nr),r=null!==t?t:o();return{selectedBlocks:n(r),selectedClientIds:r}}),[t]),{canLock:l}=Th(r[0]),{canRename:i}=(a=o[0],{canRename:(0,c.getBlockSupport)(a,"renaming",!0)});var a;const u=1===r.length&&l,m=1===r.length&&i,h=Bh(r),{isGroupable:g,isUngroupable:f}=h,b=g||f;return(0,s.createElement)(Uh,{fillProps:{...e,__unstableDisplayLocation:n,selectedBlocks:o,selectedClientIds:r}},(t=>!t?.length>0&&!b&&!u?null:(0,s.createElement)(_l.MenuGroup,null,b&&(0,s.createElement)(Ih,{...h,onClose:e?.onClose}),u&&(0,s.createElement)(Oh,{clientId:r[0]}),m&&(0,s.createElement)(Hh,{clientId:r[0]}),t,e?.canMove&&!e?.onlyBlock&&(0,s.createElement)(_l.MenuItem,{onClick:(0,p.pipe)(e?.onClose,e?.onMoveTo)},(0,x.__)("Move to")),1===e?.count&&(0,s.createElement)(zh,{clientId:e?.firstBlockClientId,onToggle:e?.onClose}))))};const jh=$h;const Wh={edit:function({clientId:e,isSelected:t}){const{getBlockListSettings:n,getSettings:o}=(0,d.useSelect)(Nr),{templateLock:r,isLockedByParent:l,isEditingAsBlocks:i}=(0,d.useSelect)((t=>{const{__unstableGetContentLockingParent:n,getTemplateLock:o,__unstableGetTemporarilyEditingAsBlocks:r}=t(Nr);return{templateLock:o(e),isLockedByParent:!!n(e),isEditingAsBlocks:r()===e}}),[e]),{updateSettings:a,updateBlockListSettings:c,__unstableSetTemporarilyEditingAsBlocks:p}=(0,d.useDispatch)(Nr),{stopEditingAsBlocks:m}=ie((0,d.useDispatch)(Nr)),h=!l&&"contentOnly"===r,{__unstableMarkNextChangeAsNotPersistent:g,updateBlockAttributes:f}=(0,d.useDispatch)(Nr),b=(0,u.useCallback)((()=>{m(e)}),[e,m]);if(!h&&!i)return null;const v=i&&!h,k=!i&&h&&t;return(0,s.createElement)(s.Fragment,null,v&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Bl,{group:"other"},(0,s.createElement)(_l.ToolbarButton,{onClick:b},(0,x.__)("Done")))),k&&(0,s.createElement)(jh,null,(({onClose:t})=>(0,s.createElement)(_l.MenuItem,{onClick:()=>{g(),f(e,{templateLock:void 0}),c(e,{...n(e),templateLock:!1});const r=o().focusMode;a({focusMode:!0}),p(e,r),t()}},(0,x.__)("Modify")))))},hasSupport:()=>!0},Kh="metadata";(0,m.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",(function(e){return e?.attributes?.[Kh]?.type||(e.attributes={...e.attributes,[Kh]:{type:"object"}}),e}));const Zh=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.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"}));const qh=(0,u.memo)((function({icon:e,showColors:t=!1,className:n,context:o}){"block-default"===e?.src&&(e={src:Zh});const r=(0,s.createElement)(_l.Icon,{icon:e&&e.src?e.src:e,context:o}),l=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,s.createElement)("span",{style:l,className:ml()("block-editor-block-icon",n,{"has-colors":t})},r)})),Yh={};const Xh={edit:function({name:e,clientId:t,metadata:{ignoredHookedBlocks:n=[]}={}}){const o=(0,d.useSelect)((e=>e(c.store).getBlockTypes()),[]),r=(0,u.useMemo)((()=>o?.filter((({name:t,blockHooks:o})=>o&&e in o||n.includes(t)))),[o,e,n]),{blockIndex:l,rootClientId:i,innerBlocksLength:a}=(0,d.useSelect)((e=>{const{getBlocks:n,getBlockIndex:o,getBlockRootClientId:r}=e(Nr);return{blockIndex:o(t),innerBlocksLength:n(t)?.length,rootClientId:r(t)}}),[t]),p=(0,d.useSelect)((n=>{const{getBlocks:o,getGlobalBlockCount:l}=n(Nr),s=r.reduce(((n,r)=>{if(0===l(r.name))return n;const s=r?.blockHooks?.[e];let a;switch(s){case"before":case"after":a=o(i);break;case"first_child":case"last_child":a=o(t);break;case void 0:a=[...o(i),...o(t)]}const c=a?.find((e=>e.name===r.name));return c?{...n,[r.name]:c.clientId}:n}),{});return Object.values(s).length>0?s:Yh}),[r,e,t,i]),{insertBlock:m,removeBlock:h}=(0,d.useDispatch)(Nr);if(!r.length)return null;const g=r.reduce(((e,t)=>{const[n]=t.name.split("/");return e[n]||(e[n]=[]),e[n].push(t),e}),{});return(0,s.createElement)(Bs,null,(0,s.createElement)(_l.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,x.__)("Plugins"),initialOpen:!0},(0,s.createElement)("p",{className:"block-editor-hooks__block-hooks-helptext"},(0,x.__)("Manage the inclusion of blocks added automatically by plugins.")),Object.keys(g).map((n=>(0,s.createElement)(u.Fragment,{key:n},(0,s.createElement)("h3",null,n),g[n].map((n=>{const o=n.name in p;return(0,s.createElement)(_l.ToggleControl,{checked:o,key:n.title,label:(0,s.createElement)(_l.__experimentalHStack,{justify:"flex-start"},(0,s.createElement)(qh,{icon:n.icon}),(0,s.createElement)("span",null,n.title)),onChange:()=>{if(o)h(p[n.name],!1);else{const o=n.blockHooks[e];((e,n)=>{switch(n){case"before":case"after":m(e,"after"===n?l+1:l,i,!1);break;case"first_child":case"last_child":m(e,"first_child"===n?0:a,t,!1);break;case void 0:m(e,l+1,i,!1)}})((0,c.createBlock)(n.name),o)}}})})))))))},attributeKeys:["metadata"],hasSupport:()=>!0};const Qh={edit:function({metadata:e,setAttributes:t}){return(0,s.createElement)(Bs,{group:"advanced"},(0,s.createElement)(_l.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,x.__)("Block name"),value:e?.name||"",onChange:n=>{t({metadata:{...e,name:n}})}}))},attributeKeys:["metadata"],hasSupport:e=>(0,c.hasBlockSupport)(e,"renaming",!0)};(0,m.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",(function(e){return e.__experimentalLabel||(0,c.hasBlockSupport)(e,"renaming",!0)&&(e.__experimentalLabel=(e,{context:t})=>{const{metadata:n}=e;if("list-view"===t&&n?.name)return n.name}),e}));const Jh={"core/paragraph":["content"],"core/heading":["content"],"core/image":["url","title","alt"],"core/button":["url","text","linkTarget"]};function eg(e){return e in Jh}const tg=({args:e,attrName:t,blockProps:n,source:o,onPropValueChange:r})=>{const{placeholder:l,value:i}=o.useSource(n,e),{name:s}=n,a=n.attributes[t],d=(0,u.useCallback)(((e,n)=>{if(n instanceof Y.RichTextData){if(n.toHTMLString()===e)return;e=Y.RichTextData.fromHTMLString(e)}n!==e&&r({[t]:e})}),[t,r]);return(0,u.useLayoutEffect)((()=>{if(void 0!==i)d(i,a);else if(l){const e=(0,c.getBlockType)(s).attributes[t].attribute;if("src"===e||"href"===e)return void d(null);d(l)}}),[d,i,a,l,s,t]),null};function ng({blockProps:e,bindings:t,onPropValueChange:n}){const o=ie((0,d.useSelect)(c.store)).getAllBlockBindingsSources();return(0,s.createElement)(s.Fragment,null,Object.entries(t).map((([t,r])=>{const l=o[r.source];return l?.useSource?(0,s.createElement)(tg,{key:t,attrName:t,source:l,blockProps:e,args:r.args,onPropValueChange:n}):null})))}const og=(0,p.createHigherOrderComponent)((e=>t=>{const[n,o]=(0,u.useState)({}),r=(0,u.useCallback)((e=>o((t=>({...t,...e})))),[]),l=Object.fromEntries(Object.entries(t.attributes.metadata?.bindings||{}).filter((([e])=>{return n=t.name,o=e,eg(n)&&Jh[n].includes(o);var n,o})));return(0,s.createElement)(s.Fragment,null,Object.keys(l).length>0&&(0,s.createElement)(ng,{blockProps:t,bindings:l,onPropValueChange:r}),(0,s.createElement)(e,{...t,attributes:{...t.attributes,...n}}))}),"withBlockBindingSupport");function rg(e){const t=e.style?.border||{};return{className:Fu(e)||void 0,style:Mm({border:t})}}function lg(e){const{colors:t}=qc(),n=rg(e),{borderColor:o}=e;if(o){const e=Pu({colors:t,namedColor:o});n.style.borderColor=e.color}return n}function ig(e){return{style:Mm({shadow:e.style?.shadow||""})}}function sg(e){const{backgroundColor:t,textColor:n,gradient:o,style:r}=e,l=Zc("background-color",t),i=Zc("color",n),s=Gu(o),a=s||r?.color?.gradient;return{className:ml()(i,s,{[l]:!a&&!!l,"has-text-color":n||r?.color?.text,"has-background":t||r?.color?.background||o||r?.color?.gradient,"has-link-color":r?.elements?.link?.color})||void 0,style:Mm({color:r?.color||{}})}}function ag(e){const{backgroundColor:t,textColor:n,gradient:o}=e,[r,l,i,s,a,c]=Ar("color.palette.custom","color.palette.theme","color.palette.default","color.gradients.custom","color.gradients.theme","color.gradients.default"),d=(0,u.useMemo)((()=>[...r||[],...l||[],...i||[]]),[r,l,i]),p=(0,u.useMemo)((()=>[...s||[],...a||[],...c||[]]),[s,a,c]),m=sg(e);if(t){const e=Wc(d,t);m.style.backgroundColor=e.color}if(o&&(m.style.background=Uu(p,o)),n){const e=Wc(d,n);m.style.color=e.color}return m}function cg(e){const{style:t}=e;return{style:Mm({spacing:t?.spacing||{}})}}function ug(e,t){const{kebabCase:n}=ie(_l.privateApis);let o=e?.style?.typography||{};const r=Zr(t);o={...o,fontSize:Wr({size:e?.style?.typography?.fontSize},r)};const l=Mm({typography:o}),i=e?.fontFamily?`has-${n(e.fontFamily)}-font-family`:"";return{className:ml()(i,Sp(e?.fontSize)),style:l}}function dg(e){const[t,n]=(0,u.useState)(e);return(0,u.useEffect)((()=>{e&&n(e)}),[e]),t}var pg;(0,m.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",(function(e,t){return eg(t)?{...e,edit:og(e.edit)}:e})),function(e){e=e.map((e=>({...e,Edit:(0,u.memo)(e.edit)})));const t=(0,p.createHigherOrderComponent)((t=>n=>{const o=y();return[...e.map(((e,t)=>{const{Edit:r,hasSupport:l,attributeKeys:i=[],shareWithChildBlocks:a}=e;if(!(o[h]||o[g]&&a)||!l(n.name))return null;const c={};for(const e of i)n.attributes[e]&&(c[e]=n.attributes[e]);return(0,s.createElement)(r,{key:t,name:n.name,isSelected:n.isSelected,clientId:n.clientId,setAttributes:n.setAttributes,__unstableParentLayout:n.__unstableParentLayout,...c})})),(0,s.createElement)(t,{key:"edit",...n})]}),"withBlockEditHooks");(0,m.addFilter)("editor.BlockEdit","core/editor/hooks",t)}([is,Ms,Ns,Dm,rh,vh,Eh,Wh,Xh,Qh].filter(Boolean)),function(e){const t=(0,p.createHigherOrderComponent)((t=>n=>{const[o,r]=(0,u.useState)(Array(e.length).fill(void 0));return[...e.map(((e,t)=>{const{hasSupport:o,attributeKeys:l=[],useBlockProps:i}=e,a={};for(const e of l)n.attributes[e]&&(a[e]=n.attributes[e]);return Object.keys(a).length&&o(n.name)?(0,s.createElement)(kl,{key:t,index:t,useBlockProps:i,setAllWrapperProps:r,name:n.name,...a}):null})),(0,s.createElement)(t,{key:"edit",...n,wrapperProps:o.filter(Boolean).reduce(((e,t)=>({...e,...t,className:ml()(e.className,t.className),style:{...e.style,...t.style}})),n.wrapperProps||{})})]}),"withBlockListBlockHooks");(0,m.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}([is,Dm,Pd,xm,rh,yp,Bp,Hu,vh,xh]),pg=[is,Ms,Rs,Ns,Hu,Pd,Dm,yp,Bp],(0,m.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",(function(e,t,n){return pg.reduce(((e,o)=>{const{hasSupport:r,attributeKeys:l=[],addSaveProps:i}=o,s={};for(const e of l)n[e]&&(s[e]=n[e]);return Object.keys(s).length&&r(t)?i(e,t,s):e}),e)}),0),(0,m.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",(e=>(e.hasOwnProperty("className")&&!e.className&&delete e.className,e)));const mg=([e,...t])=>e.toUpperCase()+t.join(""),hg=e=>(0,p.createHigherOrderComponent)((t=>n=>(0,s.createElement)(t,{...n,colors:e})),"withCustomColorPalette"),gg=()=>(0,p.createHigherOrderComponent)((e=>t=>{const[n,o,r]=Ar("color.palette.custom","color.palette.theme","color.palette.default"),l=(0,u.useMemo)((()=>[...n||[],...o||[],...r||[]]),[n,o,r]);return(0,s.createElement)(e,{...t,colors:l})}),"withEditorColorPalette");function fg(e,t){const{kebabCase:n}=ie(_l.privateApis),o=e.reduce(((e,t)=>({...e,..."string"==typeof t?{[t]:n(t)}:t})),{});return(0,p.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=Vc(t),o=({color:e})=>n.contrast(e),r=Math.max(...e.map(o));return e.find((e=>o(e)===r)).color}(t,e)}createSetters(){return Object.keys(o).reduce(((e,t)=>{const n=mg(t),o=`custom${n}`;return e[`set${n}`]=this.createSetColor(t,o),e}),{})}createSetColor(e,t){return n=>{const o=Kc(this.props.colors,n);this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps({attributes:e,colors:t},n){return Object.entries(o).reduce(((o,[r,l])=>{const i=Wc(t,e[r],e[`custom${mg(r)}`]),s=n[r],a=s?.color;return a===i.color&&s?o[r]=s:o[r]={...i,class:Zc(l,i.slug)},o}),{})}render(){return(0,s.createElement)(e,{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils})}}])}function bg(e){return(...t)=>{const n=hg(e);return(0,p.createHigherOrderComponent)(fg(t,n),"withCustomColors")}}function vg(...e){const t=gg();return(0,p.createHigherOrderComponent)(fg(e,t),"withColors")}const kg=function(e){const[t,n]=Ar("typography.fontSizes","typography.customFontSize");return(0,s.createElement)(_l.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!n})},_g=[],yg=([e,...t])=>e.toUpperCase()+t.join(""),Eg=(...e)=>{const t=e.reduce(((e,t)=>(e[t]=`custom${yg(t)}`,e)),{});return(0,p.createHigherOrderComponent)((0,p.compose)([(0,p.createHigherOrderComponent)((e=>t=>{const[n]=Ar("typography.fontSizes");return(0,s.createElement)(e,{...t,fontSizes:n||_g})}),"withFontSizes"),e=>class extends u.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce(((e,[t,n])=>(e[`set${yg(t)}`]=this.createSetFontSize(t,n),e)),{})}createSetFontSize(e,t){return n=>{const o=this.props.fontSizes?.find((({size:e})=>e===Number(n)));this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps({attributes:e,fontSizes:n},o){const r=(t,n)=>!o[n]||(e[n]?e[n]!==o[n].slug:o[n].size!==e[t]);if(!Object.values(t).some(r))return null;const l=Object.entries(t).filter((([e,t])=>r(t,e))).reduce(((t,[o,r])=>{const l=e[o],i=Ep(n,l,e[r]);return t[o]={...i,class:Sp(l)},t}),{});return{...o,...l}}render(){return(0,s.createElement)(e,{...this.props,fontSizes:void 0,...this.state,...this.setters})}}]),"withFontSizes")},wg=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})),Sg=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})),Cg=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})),xg=[{icon:wg,title:(0,x.__)("Align text left"),align:"left"},{icon:Sg,title:(0,x.__)("Align text center"),align:"center"},{icon:Cg,title:(0,x.__)("Align text right"),align:"right"}],Bg={placement:"bottom-start"};const Ig=function({value:e,onChange:t,alignmentControls:n=xg,label:o=(0,x.__)("Align text"),describedBy:r=(0,x.__)("Change text alignment"),isCollapsed:l=!0,isToolbar:i}){function a(n){return()=>t(e===n?void 0:n)}const c=n.find((t=>t.align===e)),u=i?_l.ToolbarGroup:_l.ToolbarDropdownMenu,d=i?{isCollapsed:l}:{toggleProps:{describedBy:r},popoverProps:Bg};return(0,s.createElement)(u,{icon:c?c.icon:(0,x.isRTL)()?Cg:wg,label:o,controls:n.map((t=>{const{align:n}=t,o=e===n;return{...t,isActive:o,role:l?"menuitemradio":void 0,onClick:a(n)}})),...d})},Tg=e=>(0,s.createElement)(Ig,{...e,isToolbar:!1}),Mg=e=>(0,s.createElement)(Ig,{...e,isToolbar:!0});var Pg=n(9681),Rg=n.n(Pg);function Ng(e){return e.toLowerCase()}var Lg=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Ag=/[^A-Z0-9]+/gi;function Og(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}const Dg=e=>e.name||"",zg=e=>e.title,Vg=e=>e.description||"",Fg=e=>e.keywords||[],Hg=e=>e.category,Gg=()=>null;function Ug(e=""){return function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,o=void 0===n?Lg:n,r=t.stripRegexp,l=void 0===r?Ag:r,i=t.transform,s=void 0===i?Ng:i,a=t.delimiter,c=void 0===a?" ":a,u=Og(Og(e,o,"$1\0$2"),l,"\0"),d=0,p=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(p-1);)p--;return u.slice(d,p).split("\0").map(s).join(c)}(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 $g(e=""){return e=(e=(e=Rg()(e)).replace(/^\//,"")).toLowerCase()}const jg=(e="")=>Ug($g(e)),Wg=(e,t,n,o)=>{if(0===jg(o).length)return e;return Kg(e,o,{getCategory:e=>t.find((({slug:t})=>t===e.category))?.title,getCollection:e=>n[e.name.split("/")[0]]?.title})},Kg=(e=[],t="",n={})=>{if(0===jg(t).length)return e;const o=e.map((e=>[e,Zg(e,t,n)])).filter((([,e])=>e>0));return o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))};function Zg(e,t,n={}){const{getName:o=Dg,getTitle:r=zg,getDescription:l=Vg,getKeywords:i=Fg,getCategory:s=Hg,getCollection:a=Gg}=n,c=o(e),u=r(e),d=l(e),p=i(e),m=s(e),h=a(e),g=$g(t),f=$g(u);let b=0;if(g===f)b+=30;else if(f.startsWith(g))b+=20;else{const e=[c,u,d,...p,m,h].join(" ");0===((e,t)=>e.filter((e=>!jg(t).some((t=>t.includes(e))))))(Ug(g),e).length&&(b+=10)}if(0!==b&&c.startsWith("core/")){b+=c!==e.id?1:2}return b}const qg=(e,t)=>{const[n]=(0,d.useSelect)((t=>[t(Nr).getInserterItems(e)]),[e]),[o,r]=(0,d.useSelect)((e=>{const{getCategories:t,getCollections:n}=e(c.store);return[t(),n()]}),[]);return[n,o,r,(0,u.useCallback)((({name:e,initialAttributes:n,innerBlocks:o,syncStatus:r,content:l},i)=>{const s="unsynced"===r?(0,c.parse)(l,{__unstableSkipMigrationLogs:!0}):(0,c.createBlock)(e,n,(0,c.createBlocksFromInnerBlocksTemplate)(o));t(s,void 0,i)}),[t])]},Yg=(e,t)=>t?(e.sort((({id:e},{id:n})=>{let o=t.indexOf(e),r=t.indexOf(n);return o<0&&(o=t.length),r<0&&(r=t.length),o-r})),e):e,Xg=()=>{};const Qg={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n,prioritizedBlocks:o}=(0,d.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockListSettings:o,getBlockRootClientId:r}=e(Nr),l=t(),i=r(l);return{selectedBlockName:l?n(l):null,rootClientId:i,prioritizedBlocks:o(i)?.prioritizedInserterBlocks}}),[]),[r,l,i]=qg(t,Xg),a=(0,u.useMemo)((()=>(e.trim()?Wg(r,l,i,e):Yg(ne(r,"frecency","desc"),o)).filter((e=>e.name!==n)).slice(0,9)),[e,n,r,l,i,o]);return[(0,u.useMemo)((()=>a.map((e=>{const{title:t,icon:n,isDisabled:o}=e;return{key:`block-${e.id}`,value:e,label:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(qh,{key:"icon",icon:n,showColors:!0}),t),isDisabled:o}}))),[a])]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:o,syncStatus:r,content:l}=e;return{action:"replace",value:"unsynced"===r?(0,c.parse)(l,{__unstableSkipMigrationLogs:!0}):(0,c.createBlock)(t,n,(0,c.createBlocksFromInnerBlocksTemplate)(o))}}},Jg=window.wp.apiFetch;var ef=n.n(Jg);const tf=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.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"}));const nf={name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await ef()({path:(0,Ds.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=>[...e.title.split(/\s+/)],getOptionLabel:e=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ti,{key:"icon",icon:"page"===e.subtype?la:tf}),e.title),getOptionCompletion:e=>(0,s.createElement)("a",{href:e.url},e.title)},of=[];function rf({completers:e=of}){const{name:t}=y();return(0,u.useMemo)((()=>{let n=[...e,nf];return(t===(0,c.getDefaultBlockName)()||(0,c.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(n=[...n,Qg]),(0,m.hasFilter)("editor.Autocomplete.completers")&&(n===e&&(n=n.map((e=>({...e})))),n=(0,m.applyFilters)("editor.Autocomplete.completers",n,t)),n}),[e,t])}const lf=function(e){return(0,s.createElement)(_l.Autocomplete,{...e,completers:rf(e)})},sf=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"}));const af=function({isActive:e,label:t=(0,x.__)("Toggle full height"),onToggle:n,isDisabled:o}){return(0,s.createElement)(_l.ToolbarButton,{isActive:e,icon:sf,label:t,onClick:()=>n(!e),disabled:o})},cf=()=>{};const uf=function(e){const{label:t=(0,x.__)("Change matrix alignment"),onChange:n=cf,value:o="center",isDisabled:r}=e,l=(0,s.createElement)(_l.__experimentalAlignmentMatrixControl.Icon,{value:o});return(0,s.createElement)(_l.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:e,isOpen:n})=>(0,s.createElement)(_l.ToolbarButton,{onClick:e,"aria-haspopup":"true","aria-expanded":n,onKeyDown:t=>{n||t.keyCode!==zs.DOWN||(t.preventDefault(),e())},label:t,icon:l,showTooltip:!0,disabled:r}),renderContent:()=>(0,s.createElement)(_l.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:o})})};function df({clientId:e,maximumLength:t,context:n}){const o=(0,d.useSelect)((t=>{if(!e)return null;const{getBlockName:o,getBlockAttributes:r}=t(Nr),{getBlockType:l,getActiveBlockVariation:i}=t(c.store),s=o(e),a=l(s);if(!a)return null;const u=r(e),d=(0,c.__experimentalGetBlockLabel)(a,u,n);if(d!==a.title)return d;const p=i(s,u);return p?.title||a.title}),[e,n]);if(!o)return null;if(t&&t>0&&o.length>t){const e="...";return o.slice(0,t-e.length)+e}return o}function pf({clientId:e,maximumLength:t,context:n}){return df({clientId:e,maximumLength:t,context:n})}const mf=function({rootLabelText:e}){const{selectBlock:t,clearSelectedBlock:n}=(0,d.useDispatch)(Nr),{clientId:o,parents:r,hasSelection:l}=(0,d.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getEnabledBlockParents:o}=ie(e(Nr)),r=n();return{parents:o(r),clientId:r,hasSelection:!!t().clientId}}),[]),i=e||(0,x.__)("Document");return(0,s.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,x.__)("Block breadcrumb")},(0,s.createElement)("li",{className:l?void 0:"block-editor-block-breadcrumb__current","aria-current":l?void 0:"true"},l&&(0,s.createElement)(_l.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:n},i),!l&&i,!!o&&(0,s.createElement)(Ti,{icon:qs,className:"block-editor-block-breadcrumb__separator"})),r.map((e=>(0,s.createElement)("li",{key:e},(0,s.createElement)(_l.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>t(e)},(0,s.createElement)(pf,{clientId:e,maximumLength:35})),(0,s.createElement)(Ti,{icon:qs,className:"block-editor-block-breadcrumb__separator"})))),!!o&&(0,s.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,s.createElement)(pf,{clientId:o,maximumLength:35})))};function hf(e){return(0,d.useSelect)((t=>{const{__unstableHasActiveBlockOverlayActive:n}=t(Nr);return n(e)}),[e])}const gf=(0,u.createContext)({});function ff({value:e,children:t}){const n=(0,u.useContext)(gf),o=(0,u.useMemo)((()=>({...n,...e})),[n,e]);return(0,s.createElement)(gf.Provider,{value:o,children:t})}const bf=gf,vf={},kf=(0,_l.withFilters)("editor.BlockEdit")((e=>{const{name:t}=e,n=(0,c.getBlockType)(t);if(!n)return null;const o=n.edit||n.save;return(0,s.createElement)(o,{...e})})),_f=e=>{const{attributes:t={},name:n}=e,o=(0,c.getBlockType)(n),r=(0,u.useContext)(bf),l=(0,u.useMemo)((()=>o&&o.usesContext?Object.fromEntries(Object.entries(r).filter((([e])=>o.usesContext.includes(e)))):vf),[o,r]);if(!o)return null;if(o.apiVersion>1)return(0,s.createElement)(kf,{...e,context:l});const i=(0,c.hasBlockSupport)(o,"className",!0)?(0,c.getBlockDefaultClassName)(n):null,a=ml()(i,t.className,e.className);return(0,s.createElement)(kf,{...e,context:l,className:a})};function yf({mayDisplayControls:e,mayDisplayParentControls:t,blockEditingMode:n,...o}){const{name:r,isSelected:l,clientId:i,attributes:a={},__unstableLayoutClassNames:d}=o,{layout:p=null,metadata:m={}}=a,{bindings:v}=m,k=(0,c.hasBlockSupport)(r,"layout",!1)||(0,c.hasBlockSupport)(r,"__experimentalLayout",!1);return(0,s.createElement)(_,{value:(0,u.useMemo)((()=>({name:r,isSelected:l,clientId:i,layout:k?p:null,__unstableLayoutClassNames:d,[h]:e,[g]:t,[f]:n,[b]:v})),[r,l,i,k,p,d,e,t,n,v])},(0,s.createElement)(_f,{...o}))}const Ef=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));const wf=function({className:e,actions:t,children:n,secondaryActions:o}){return(0,s.createElement)("div",{style:{display:"contents",all:"initial"}},(0,s.createElement)("div",{className:ml()(e,"block-editor-warning")},(0,s.createElement)("div",{className:"block-editor-warning__contents"},(0,s.createElement)("p",{className:"block-editor-warning__message"},n),(u.Children.count(t)>0||o)&&(0,s.createElement)("div",{className:"block-editor-warning__actions"},u.Children.count(t)>0&&u.Children.map(t,((e,t)=>(0,s.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),o&&(0,s.createElement)(_l.DropdownMenu,{className:"block-editor-warning__secondary",icon:Ef,label:(0,x.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,s.createElement)(_l.MenuGroup,null,o.map(((e,t)=>(0,s.createElement)(_l.MenuItem,{onClick:e.onClick,key:t},e.title))))))))))};var Sf=n(8021);function Cf({title:e,rawContent:t,renderedContent:n,action:o,actionText:r,className:l}){return(0,s.createElement)("div",{className:l},(0,s.createElement)("div",{className:"block-editor-block-compare__content"},(0,s.createElement)("h2",{className:"block-editor-block-compare__heading"},e),(0,s.createElement)("div",{className:"block-editor-block-compare__html"},t),(0,s.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,s.createElement)(u.RawHTML,null,(0,As.safeHTML)(n)))),(0,s.createElement)("div",{className:"block-editor-block-compare__action"},(0,s.createElement)(_l.Button,{variant:"secondary",tabIndex:"0",onClick:o},r)))}const xf=function({block:e,onKeep:t,onConvert:n,convertor:o,convertButtonText:r}){const l=(i=o(e),(Array.isArray(i)?i:[i]).map((e=>(0,c.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var i;const a=(u=e.originalContent,d=l,(0,Sf.JJ)(u,d).map(((e,t)=>{const n=ml()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,s.createElement)("span",{key:t,className:n},e.value)})));var u,d;return(0,s.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,s.createElement)(Cf,{title:(0,x.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,x.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,s.createElement)(Cf,{title:(0,x.__)("After Conversion"),className:"block-editor-block-compare__converted",action:n,actionText:r,rawContent:a,renderedContent:l}))},Bf=e=>(0,c.rawHandler)({HTML:e.originalContent});function If({clientId:e}){const{block:t,canInsertHTMLBlock:n,canInsertClassicBlock:o}=(0,d.useSelect)((t=>{const{canInsertBlockType:n,getBlock:o,getBlockRootClientId:r}=t(Nr),l=r(e);return{block:o(e),canInsertHTMLBlock:n("core/html",l),canInsertClassicBlock:n("core/freeform",l)}}),[e]),{replaceBlock:r}=(0,d.useDispatch)(Nr),[l,i]=(0,u.useState)(!1),a=(0,u.useCallback)((()=>i(!1)),[]),p=(0,u.useMemo)((()=>({toClassic(){const e=(0,c.createBlock)("core/freeform",{content:t.originalContent});return r(t.clientId,e)},toHTML(){const e=(0,c.createBlock)("core/html",{content:t.originalContent});return r(t.clientId,e)},toBlocks(){const e=Bf(t);return r(t.clientId,e)},toRecoveredBlock(){const e=(0,c.createBlock)(t.name,t.attributes,t.innerBlocks);return r(t.clientId,e)}})),[t,r]),m=(0,u.useMemo)((()=>[{title:(0,x._x)("Resolve","imperative verb"),onClick:()=>i(!0)},n&&{title:(0,x.__)("Convert to HTML"),onClick:p.toHTML},o&&{title:(0,x.__)("Convert to Classic Block"),onClick:p.toClassic}].filter(Boolean)),[n,o,p]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(wf,{actions:[(0,s.createElement)(_l.Button,{key:"recover",onClick:p.toRecoveredBlock,variant:"primary"},(0,x.__)("Attempt Block Recovery"))],secondaryActions:m},(0,x.__)("This block contains unexpected or invalid content.")),l&&(0,s.createElement)(_l.Modal,{title:(0,x.__)("Resolve Block"),onRequestClose:a,className:"block-editor-block-compare"},(0,s.createElement)(xf,{block:t,onKeep:p.toHTML,onConvert:p.toBlocks,convertor:Bf,convertButtonText:(0,x.__)("Convert to Blocks")})))}const Tf=(0,s.createElement)(wf,{className:"block-editor-block-list__block-crash-warning"},(0,x.__)("This block has encountered an error and cannot be previewed.")),Mf=()=>Tf;class Pf 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}}const Rf=Pf;var Nf=n(4132);const Lf=function({clientId:e}){const[t,n]=(0,u.useState)(""),o=(0,d.useSelect)((t=>t(Nr).getBlock(e)),[e]),{updateBlock:r}=(0,d.useDispatch)(Nr);return(0,u.useEffect)((()=>{n((0,c.getBlockContent)(o))}),[o]),(0,s.createElement)(Nf.A,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:()=>{const l=(0,c.getBlockType)(o.name);if(!l)return;const i=(0,c.getBlockAttributes)(l,t,o.attributes),s=t||(0,c.getSaveContent)(l,i),[a]=t?(0,c.validateBlock)({...o,attributes:i,originalContent:s}):[!0];r(e,{attributes:i,originalContent:s,isValid:a}),t||n(s)},onChange:e=>n(e.target.value)})};var Af=Xf(),Of=e=>Kf(e,Af),Df=Xf();Of.write=e=>Kf(e,Df);var zf=Xf();Of.onStart=e=>Kf(e,zf);var Vf=Xf();Of.onFrame=e=>Kf(e,Vf);var Ff=Xf();Of.onFinish=e=>Kf(e,Ff);var Hf=[];Of.setTimeout=(e,t)=>{let n=Of.now()+t,o=()=>{let e=Hf.findIndex((e=>e.cancel==o));~e&&Hf.splice(e,1),jf-=~e?1:0},r={time:n,handler:e,cancel:o};return Hf.splice(Gf(n),0,r),jf+=1,Zf(),r};var Gf=e=>~(~Hf.findIndex((t=>t.time>e))||~Hf.length);Of.cancel=e=>{zf.delete(e),Vf.delete(e),Ff.delete(e),Af.delete(e),Df.delete(e)},Of.sync=e=>{Wf=!0,Of.batchedUpdates(e),Wf=!1},Of.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,Of.onStart(n)}return o.handler=e,o.cancel=()=>{zf.delete(n),t=null},o};var Uf=typeof window<"u"?window.requestAnimationFrame:()=>{};Of.use=e=>Uf=e,Of.now=typeof performance<"u"?()=>performance.now():Date.now,Of.batchedUpdates=e=>e(),Of.catch=console.error,Of.frameLoop="always",Of.advance=()=>{"demand"!==Of.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Yf()};var $f=-1,jf=0,Wf=!1;function Kf(e,t){Wf?(t.delete(e),e(0)):(t.add(e),Zf())}function Zf(){$f<0&&($f=0,"demand"!==Of.frameLoop&&Uf(qf))}function qf(){~$f&&(Uf(qf),Of.batchedUpdates(Yf))}function Yf(){let e=$f;$f=Of.now();let t=Gf($f);t&&(Qf(Hf.splice(0,t),(e=>e.handler())),jf-=t),jf?(zf.flush(),Af.flush(e?Math.min(64,$f-e):16.667),Vf.flush(),Df.flush(),Ff.flush()):$f=-1}function Xf(){let e=new Set,t=e;return{add(n){jf+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(jf-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,jf-=t.size,Qf(t,(t=>t(n)&&e.add(t))),jf+=e.size,t=e)}}}function Qf(e,t){e.forEach((e=>{try{t(e)}catch(e){Of.catch(e)}}))}var Jf=Object.defineProperty,eb={};function tb(){}((e,t)=>{for(var n in t)Jf(e,n,{get:t[n],enumerable:!0})})(eb,{assign:()=>gb,colors:()=>pb,createStringInterpolator:()=>ab,skipAnimation:()=>mb,to:()=>cb,willAdvance:()=>hb});var nb={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 ob(e,t){if(nb.arr(e)){if(!nb.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var rb=(e,t)=>e.forEach(t);function lb(e,t,n){if(nb.arr(e))for(let o=0;o<e.length;o++)t.call(n,e[o],`${o}`);else for(let o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o)}var ib=e=>nb.und(e)?[]:nb.arr(e)?e:[e];function sb(e,t){if(e.size){let n=Array.from(e);e.clear(),rb(n,t)}}var ab,cb,ub=(e,...t)=>sb(e,(e=>e(...t))),db=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),pb=null,mb=!1,hb=tb,gb=e=>{e.to&&(cb=e.to),e.now&&(Of.now=e.now),void 0!==e.colors&&(pb=e.colors),null!=e.skipAnimation&&(mb=e.skipAnimation),e.createStringInterpolator&&(ab=e.createStringInterpolator),e.requestAnimationFrame&&Of.use(e.requestAnimationFrame),e.batchedUpdates&&(Of.batchedUpdates=e.batchedUpdates),e.willAdvance&&(hb=e.willAdvance),e.frameLoop&&(Of.frameLoop=e.frameLoop)},fb=new Set,bb=[],vb=[],kb=0,_b={get idle(){return!fb.size&&!bb.length},start(e){kb>e.priority?(fb.add(e),Of.onStart(yb)):(Eb(e),Of(Sb))},advance:Sb,sort(e){if(kb)Of.onFrame((()=>_b.sort(e)));else{let t=bb.indexOf(e);~t&&(bb.splice(t,1),wb(e))}},clear(){bb=[],fb.clear()}};function yb(){fb.forEach(Eb),fb.clear(),Of(Sb)}function Eb(e){bb.includes(e)||wb(e)}function wb(e){bb.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(bb,(t=>t.priority>e.priority)),0,e)}function Sb(e){let t=vb;for(let n=0;n<bb.length;n++){let o=bb[n];kb=o.priority,o.idle||(hb(o),o.advance(e),o.idle||t.push(o))}return kb=0,(vb=bb).length=0,(bb=t).length>0}var Cb="[-+]?\\d*\\.?\\d+",xb=Cb+"%";function Bb(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Ib=new RegExp("rgb"+Bb(Cb,Cb,Cb)),Tb=new RegExp("rgba"+Bb(Cb,Cb,Cb,Cb)),Mb=new RegExp("hsl"+Bb(Cb,xb,xb)),Pb=new RegExp("hsla"+Bb(Cb,xb,xb,Cb)),Rb=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Nb=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Lb=/^#([0-9a-fA-F]{6})$/,Ab=/^#([0-9a-fA-F]{8})$/;function Ob(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 Db(e,t,n){let o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,l=Ob(r,o,e+1/3),i=Ob(r,o,e),s=Ob(r,o,e-1/3);return Math.round(255*l)<<24|Math.round(255*i)<<16|Math.round(255*s)<<8}function zb(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function Vb(e){return(parseFloat(e)%360+360)%360/360}function Fb(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Hb(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function Gb(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Lb.exec(e))?parseInt(t[1]+"ff",16)>>>0:pb&&void 0!==pb[e]?pb[e]:(t=Ib.exec(e))?(zb(t[1])<<24|zb(t[2])<<16|zb(t[3])<<8|255)>>>0:(t=Tb.exec(e))?(zb(t[1])<<24|zb(t[2])<<16|zb(t[3])<<8|Fb(t[4]))>>>0:(t=Rb.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Ab.exec(e))?parseInt(t[1],16)>>>0:(t=Nb.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Mb.exec(e))?(255|Db(Vb(t[1]),Hb(t[2]),Hb(t[3])))>>>0:(t=Pb.exec(e))?(Db(Vb(t[1]),Hb(t[2]),Hb(t[3]))|Fb(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}var Ub=(e,t,n)=>{if(nb.fun(e))return e;if(nb.arr(e))return Ub({range:e,output:t,extrapolate:n});if(nb.str(e.output[0]))return ab(e);let o=e,r=o.output,l=o.range||[0,1],i=o.extrapolateLeft||o.extrapolate||"extend",s=o.extrapolateRight||o.extrapolate||"extend",a=o.easing||(e=>e);return e=>{let t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,l);return function(e,t,n,o,r,l,i,s,a){let c=a?a(e):e;if(c<t){if("identity"===i)return c;"clamp"===i&&(c=t)}if(c>n){if("identity"===s)return c;"clamp"===s&&(c=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=l(c),o===-1/0?c=-c:r===1/0?c+=o:c=c*(r-o)+o,c)}(e,l[t],l[t+1],r[t],r[t+1],a,i,s,o.map)}};var $b=1.70158,jb=1.525*$b,Wb=$b+1,Kb=2*Math.PI/3,Zb=2*Math.PI/4.5,qb=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Yb={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=>Wb*e*e*e-$b*e*e,easeOutBack:e=>1+Wb*Math.pow(e-1,3)+$b*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(jb+1)*e-jb)/2:(Math.pow(2*e-2,2)*((jb+1)*(2*e-2)+jb)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*Kb),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*Kb)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Zb)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Zb)/2+1,easeInBounce:e=>1-qb(1-e),easeOutBounce:qb,easeInOutBounce:e=>e<.5?(1-qb(1-2*e))/2:(1+qb(2*e-1))/2,steps:(e,t="end")=>n=>{let o=(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(o):Math.ceil(o))/e)}},Xb=Symbol.for("FluidValue.get"),Qb=Symbol.for("FluidValue.observers"),Jb=e=>Boolean(e&&e[Xb]),ev=e=>e&&e[Xb]?e[Xb]():e,tv=e=>e[Qb]||null;function nv(e,t){let n=e[Qb];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var ov=class{[Xb];[Qb];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");rv(this,e)}},rv=(e,t)=>av(e,Xb,t);function lv(e,t){if(e[Xb]){let n=e[Qb];n||av(e,Qb,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function iv(e,t){let n=e[Qb];if(n&&n.has(t)){let o=n.size-1;o?n.delete(t):e[Qb]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var sv,av=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),cv=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,uv=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,dv=new RegExp(`(${cv.source})(%|[a-z]+)`,"i"),pv=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,mv=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,hv=e=>{let[t,n]=gv(e);if(!t||db())return e;let o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&mv.test(n)?hv(n):n||e},gv=e=>{let t=mv.exec(e);if(!t)return[,];let[,n,o]=t;return[n,o]},fv=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,bv=e=>{sv||(sv=pb?new RegExp(`(${Object.keys(pb).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>ev(e).replace(mv,hv).replace(uv,Gb).replace(sv,Gb))),n=t.map((e=>e.match(cv).map(Number))),o=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>Ub({...e,output:t})));return e=>{let n=!dv.test(t[0])&&t.find((e=>dv.test(e)))?.replace(cv,""),r=0;return t[0].replace(cv,(()=>`${o[r++](e)}${n||""}`)).replace(pv,fv)}},vv="react-spring: ",kv=e=>{let t=e,n=!1;if("function"!=typeof t)throw new TypeError(`${vv}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},_v=kv(console.warn);kv(console.warn);function yv(e){return nb.str(e)&&("#"==e[0]||/\d/.test(e)||!db()&&mv.test(e)||e in(pb||{}))}new WeakMap;new Set,new WeakMap,new WeakMap,new WeakMap;var Ev=db()?s.useEffect:s.useLayoutEffect;function wv(){let e=(0,s.useState)()[1],t=(()=>{let e=(0,s.useRef)(!1);return Ev((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var Sv=[];var Cv=Symbol.for("Animated:node"),xv=e=>e&&e[Cv],Bv=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,Cv,t),Iv=e=>e&&e[Cv]&&e[Cv].getPayload(),Tv=class{payload;constructor(){Bv(this,this)}getPayload(){return this.payload||[]}},Mv=class extends Tv{constructor(e){super(),this._value=e,nb.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new Mv(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return nb.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(){let{done:e}=this;this.done=!1,nb.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Pv=class extends Mv{_string=null;_toString;constructor(e){super(0),this._toString=Ub({output:[e,e]})}static create(e){return new Pv(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if(nb.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=Ub({output:[this.getValue(),e]})),this._value=0,super.reset()}},Rv={dependencies:null},Nv=class extends Tv{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return lb(this.source,((n,o)=>{(e=>!!e&&e[Cv]===e)(n)?t[o]=n.getValue(e):Jb(n)?t[o]=ev(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&rb(this.payload,(e=>e.reset()))}_makePayload(e){if(e){let t=new Set;return lb(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Rv.dependencies&&Jb(e)&&Rv.dependencies.add(e);let t=Iv(e);t&&rb(t,(e=>this.add(e)))}},Lv=class extends Nv{constructor(e){super(e)}static create(e){return new Lv(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){let t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(Av)),!0)}};function Av(e){return(yv(e)?Pv:Mv).create(e)}function Ov(e){let t=xv(e);return t?t.constructor:nb.arr(e)?Lv:yv(e)?Pv:Mv}var Dv=(e,t)=>{let n=!nb.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,s.forwardRef)(((o,r)=>{let l=(0,s.useRef)(null),i=n&&(0,s.useCallback)((e=>{l.current=function(e,t){return e&&(nb.fun(e)?e(t):e.current=t),t}(r,e)}),[r]),[a,c]=function(e,t){let n=new Set;return Rv.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Nv(e),Rv.dependencies=null,[e,n]}(o,t),u=wv(),d=()=>{let e=l.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,a.getValue(!0)))&&u()},p=new zv(d,c),m=(0,s.useRef)();Ev((()=>(m.current=p,rb(c,(e=>lv(e,p))),()=>{m.current&&(rb(m.current.deps,(e=>iv(e,m.current))),Of.cancel(m.current.update))}))),(0,s.useEffect)(d,[]),(e=>{(0,s.useEffect)(e,Sv)})((()=>()=>{let e=m.current;rb(e.deps,(t=>iv(t,e)))}));let h=t.getComponentProps(a.getValue());return s.createElement(e,{...h,ref:i})}))},zv=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&Of.write(this.update)}};var Vv=Symbol.for("AnimatedComponent"),Fv=e=>nb.str(e)?e:e&&nb.str(e.displayName)?e.displayName:nb.fun(e)&&e.name||null;function Hv(e,...t){return nb.fun(e)?e(...t):e}var Gv=(e,t)=>!0===e||!!(t&&e&&(nb.fun(e)?e(t):ib(e).includes(t))),Uv=(e,t)=>nb.obj(e)?t&&e[t]:e,$v=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,jv=e=>e,Wv=(e,t=jv)=>{let n=Kv;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));let o={};for(let r of n){let n=t(e[r],r);nb.und(n)||(o[r]=n)}return o},Kv=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Zv={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 qv(e){let t=function(e){let t={},n=0;if(lb(e,((e,o)=>{Zv[o]||(t[o]=e,n++)})),n)return t}(e);if(t){let n={to:t};return lb(e,((e,o)=>o in t||(n[o]=e))),n}return{...e}}function Yv(e){return e=ev(e),nb.arr(e)?e.map(Yv):yv(e)?eb.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Xv(e){return nb.fun(e)||nb.arr(e)&&nb.obj(e[0])}var Qv={tension:170,friction:26,mass:1,damping:1,easing:Yb.linear,clamp:!1},Jv=class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,Qv)}};function ek(e,t){if(nb.und(t.decay)){let n=!nb.und(t.tension)||!nb.und(t.friction);(n||!nb.und(t.frequency)||!nb.und(t.damping)||!nb.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var tk=[],nk=class{changed=!1;values=tk;toValues=null;fromValues=tk;to;from;config=new Jv;immediate=!1};function ok(e,{key:t,props:n,defaultProps:o,state:r,actions:l}){return new Promise(((i,s)=>{let a,c,u=Gv(n.cancel??o?.cancel,t);if(u)m();else{nb.und(n.pause)||(r.paused=Gv(n.pause,t));let e=o?.pause;!0!==e&&(e=r.paused||Gv(e,t)),a=Hv(n.delay||0,t),e?(r.resumeQueue.add(p),l.pause()):(l.resume(),p())}function d(){r.resumeQueue.add(p),r.timeouts.delete(c),c.cancel(),a=c.time-Of.now()}function p(){a>0&&!eb.skipAnimation?(r.delayed=!0,c=Of.setTimeout(m,a),r.pauseQueue.add(d),r.timeouts.add(c)):m()}function m(){r.delayed&&(r.delayed=!1),r.pauseQueue.delete(d),r.timeouts.delete(c),e<=(r.cancelId||0)&&(u=!0);try{l.start({...n,callId:e,cancel:u},i)}catch(e){s(e)}}}))}var rk=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?sk(e.get()):t.every((e=>e.noop))?lk(e.get()):ik(e.get(),t.every((e=>e.finished))),lk=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),ik=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),sk=e=>({value:e,cancelled:!0,finished:!1});function ak(e,t,n,o){let{callId:r,parentId:l,onRest:i}=t,{asyncTo:s,promise:a}=n;return l||e!==s||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;let c,u,d,p=Wv(t,((e,t)=>"onRest"===t?void 0:e)),m=new Promise(((e,t)=>(c=e,u=t))),h=e=>{let t=r<=(n.cancelId||0)&&sk(o)||r!==n.asyncId&&ik(o,!1);if(t)throw e.result=t,u(e),e},g=(e,t)=>{let l=new uk,i=new dk;return(async()=>{if(eb.skipAnimation)throw ck(n),i.result=ik(o,!1),u(i),i;h(l);let s=nb.obj(e)?{...e}:{...t,to:e};s.parentId=r,lb(p,((e,t)=>{nb.und(s[t])&&(s[t]=e)}));let a=await o.start(s);return h(l),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),a})()};if(eb.skipAnimation)return ck(n),ik(o,!1);try{let t;t=nb.arr(e)?(async e=>{for(let t of e)await g(t)})(e):Promise.resolve(e(g,o.stop.bind(o))),await Promise.all([t.then(c),m]),d=ik(o.get(),!0,!1)}catch(e){if(e instanceof uk)d=e.result;else{if(!(e instanceof dk))throw e;d=e.result}}finally{r==n.asyncId&&(n.asyncId=l,n.asyncTo=l?s:void 0,n.promise=l?a:void 0)}return nb.fun(i)&&Of.batchedUpdates((()=>{i(d,o,o.item)})),d})():a}function ck(e,t){sb(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var uk=class extends Error{result;constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},dk=class extends Error{result;constructor(){super("SkipAnimationSignal")}},pk=e=>e instanceof hk,mk=1,hk=class extends ov{id=mk++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=xv(this);return e&&e.getValue()}to(...e){return eb.to(this,e)}interpolate(...e){return _v(`${vv}The "interpolate" function is deprecated in v9 (use "to" instead)`),eb.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){nv(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||_b.sort(this),nv(this,{type:"priority",parent:this,priority:e})}},gk=Symbol.for("SpringPhase"),fk=e=>(1&e[gk])>0,bk=e=>(2&e[gk])>0,vk=e=>(4&e[gk])>0,kk=(e,t)=>t?e[gk]|=3:e[gk]&=-3,_k=(e,t)=>t?e[gk]|=4:e[gk]&=-5,yk=class extends hk{key;animation=new nk;queue;defaultProps={};_state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_pendingCalls=new Set;_lastCallId=0;_lastToId=0;_memoizedDuration=0;constructor(e,t){if(super(),!nb.und(e)||!nb.und(t)){let n=nb.obj(e)?{...e}:{...t,from:e};nb.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(bk(this)||this._state.asyncTo)||vk(this)}get goal(){return ev(this.animation.to)}get velocity(){let e=xv(this);return e instanceof Mv?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return fk(this)}get isAnimating(){return bk(this)}get isPaused(){return vk(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,o=this.animation,{config:r,toValues:l}=o,i=Iv(o.to);!i&&Jb(o.to)&&(l=ib(ev(o.to))),o.values.forEach(((s,a)=>{if(s.done)return;let c=s.constructor==Pv?1:i?i[a].lastPosition:l[a],u=o.immediate,d=c;if(!u){if(d=s.lastPosition,r.tension<=0)return void(s.done=!0);let t,n=s.elapsedTime+=e,l=o.fromValues[a],i=null!=s.v0?s.v0:s.v0=nb.arr(r.velocity)?r.velocity[a]:r.velocity,p=r.precision||(l==c?.005:Math.min(1,.001*Math.abs(c-l)));if(nb.und(r.duration))if(r.decay){let e=!0===r.decay?.998:r.decay,o=Math.exp(-(1-e)*n);d=l+i/(1-e)*(1-o),u=Math.abs(s.lastPosition-d)<=p,t=i*o}else{t=null==s.lastVelocity?i:s.lastVelocity;let n,o=r.restVelocity||p/10,a=r.clamp?0:r.bounce,m=!nb.und(a),h=l==c?s.v0>0:l<c,g=!1,f=1,b=Math.ceil(e/f);for(let e=0;e<b&&(n=Math.abs(t)>o,n||(u=Math.abs(c-d)<=p,!u));++e){m&&(g=d==c||d>c==h,g&&(t=-t*a,d=c)),t+=(1e-6*-r.tension*(d-c)+.001*-r.friction*t)/r.mass*f,d+=t*f}}else{let o=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,s.durationProgress>0&&(s.elapsedTime=r.duration*s.durationProgress,n=s.elapsedTime+=e)),o=(r.progress||0)+n/this._memoizedDuration,o=o>1?1:o<0?0:o,s.durationProgress=o),d=l+r.easing(o)*(c-l),t=(d-s.lastPosition)/e,u=1==o}s.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}i&&!i[a].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,r.round)&&(n=!0)}));let s=xv(this),a=s.getValue();if(t){let e=ev(o.to);a===e&&!n||r.decay?n&&r.decay&&this._onChange(a):(s.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(a)}set(e){return Of.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(bk(this)){let{to:e,config:t}=this.animation;Of.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 nb.und(e)?(n=this.queue||[],this.queue=[]):n=[nb.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>rk(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),ck(this._state,e&&this._lastCallId),Of.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){let t=this.key||"",{to:n,from:o}=e;n=nb.obj(n)?n[t]:n,(null==n||Xv(n))&&(n=void 0),o=nb.obj(o)?o[t]:o,null==o&&(o=void 0);let r={to:n,from:o};return fk(this)||(e.reverse&&([n,o]=[o,n]),o=ev(o),nb.und(o)?xv(this)||this._set(n):this._set(o)),r}_update({...e},t){let{key:n,defaultProps:o}=this;e.default&&Object.assign(o,Wv(e,((e,t)=>/^on/.test(t)?Uv(e,n):e))),Bk(this,e,"onProps"),Ik(this,"onProps",e,this);let r=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?");let l=this._state;return ok(++this._lastCallId,{key:n,props:e,defaultProps:o,state:l,actions:{pause:()=>{vk(this)||(_k(this,!0),ub(l.pauseQueue),Ik(this,"onPause",ik(this,Ek(this,this.animation.to)),this))},resume:()=>{vk(this)&&(_k(this,!1),bk(this)&&this._resume(),ub(l.resumeQueue),Ik(this,"onResume",ik(this,Ek(this,this.animation.to)),this))},start:this._merge.bind(this,r)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){let t=wk(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(sk(this));let o=!nb.und(e.to),r=!nb.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n(sk(this));this._lastToId=t.callId}let{key:l,defaultProps:i,animation:s}=this,{to:a,from:c}=s,{to:u=a,from:d=c}=e;r&&!o&&(!t.default||nb.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let p=!ob(d,c);p&&(s.from=d),d=ev(d);let m=!ob(u,a);m&&this._focus(u);let h=Xv(t.to),{config:g}=s,{decay:f,velocity:b}=g;(o||r)&&(g.velocity=0),t.config&&!h&&function(e,t,n){n&&(ek(n={...n},t),t={...n,...t}),ek(e,t),Object.assign(e,t);for(let t in Qv)null==e[t]&&(e[t]=Qv[t]);let{mass:o,frequency:r,damping:l}=e;nb.und(r)||(r<.01&&(r=.01),l<0&&(l=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*l*o/r)}(g,Hv(t.config,l),t.config!==i.config?Hv(i.config,l):void 0);let v=xv(this);if(!v||nb.und(u))return n(ik(this,!0));let k=nb.und(t.reset)?r&&!t.default:!nb.und(d)&&Gv(t.reset,l),_=k?d:this.get(),y=Yv(u),E=nb.num(y)||nb.arr(y)||yv(y),w=!h&&(!E||Gv(i.immediate||t.immediate,l));if(m){let e=Ov(u);if(e!==v.constructor){if(!w)throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`);v=this._set(y)}}let S=v.constructor,C=Jb(u),x=!1;if(!C){let e=k||!fk(this)&&p;(m||e)&&(x=ob(Yv(_),y),C=!x),(!ob(s.immediate,w)&&!w||!ob(g.decay,f)||!ob(g.velocity,b))&&(C=!0)}if(x&&bk(this)&&(s.changed&&!k?C=!0:C||this._stop(a)),!h&&((C||Jb(a))&&(s.values=v.getPayload(),s.toValues=Jb(u)?null:S==Pv?[1]:ib(y)),s.immediate!=w&&(s.immediate=w,!w&&!k&&this._set(a)),C)){let{onRest:e}=s;rb(xk,(e=>Bk(this,t,e)));let o=ik(this,Ek(this,a));ub(this._pendingCalls,o),this._pendingCalls.add(n),s.changed&&Of.batchedUpdates((()=>{s.changed=!k,e?.(o,this),k?Hv(i.onRest,o):s.onStart?.(o,this)}))}k&&this._set(_),h?n(ak(t.to,t,this._state,this)):C?this._start():bk(this)&&!m?this._pendingCalls.add(n):n(lk(_))}_focus(e){let t=this.animation;e!==t.to&&(tv(this)&&this._detach(),t.to=e,tv(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;Jb(t)&&(lv(t,this),pk(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;Jb(e)&&iv(e,this)}_set(e,t=!0){let n=ev(e);if(!nb.und(n)){let e=xv(this);if(!e||!ob(n,e.getValue())){let o=Ov(n);e&&e.constructor==o?e.setValue(n):Bv(this,o.create(n)),e&&Of.batchedUpdates((()=>{this._onChange(n,t)}))}}return xv(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,Ik(this,"onStart",ik(this,Ek(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Hv(this.animation.onChange,e,this)),Hv(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;xv(this).reset(ev(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),bk(this)||(kk(this,!0),vk(this)||this._resume())}_resume(){eb.skipAnimation?this.finish():_b.start(this)}_stop(e,t){if(bk(this)){kk(this,!1);let n=this.animation;rb(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),nv(this,{type:"idle",parent:this});let o=t?sk(this.get()):ik(this.get(),Ek(this,e??n.to));ub(this._pendingCalls,o),n.changed&&(n.changed=!1,Ik(this,"onRest",o,this))}}};function Ek(e,t){let n=Yv(t);return ob(Yv(e.get()),n)}function wk(e,t=e.loop,n=e.to){let o=Hv(t);if(o){let r=!0!==o&&qv(o),l=(r||e).reverse,i=!r||r.reset;return Sk({...e,loop:t,default:!1,pause:void 0,to:!l||Xv(n)?n:void 0,from:i?e.from:void 0,reset:i,...r})}}function Sk(e){let{to:t,from:n}=e=qv(e),o=new Set;return nb.obj(t)&&Ck(t,o),nb.obj(n)&&Ck(n,o),e.keys=o.size?Array.from(o):null,e}function Ck(e,t){lb(e,((e,n)=>null!=e&&t.add(n)))}var xk=["onStart","onRest","onChange","onPause","onResume"];function Bk(e,t,n){e.animation[n]=t[n]!==$v(t,n)?Uv(t[n],e.key):void 0}function Ik(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var Tk=["onStart","onChange","onRest"],Mk=1,Pk=class{id=Mk++;springs={};queue=[];ref;_flush;_initialProps;_lastAsyncId=0;_active=new Set;_changed=new Set;_started=!1;_item;_state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_events={onStart:new Map,onChange:new Map,onRest:new Map};constructor(e,t){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(){let e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(let t in e){let n=e[t];nb.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Sk(e)),this}start(e){let{queue:t}=this;return e?t=ib(e).map(Sk):this.queue=[],this._flush?this._flush(this,t):(Ok(this,t),Rk(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;rb(ib(t),(t=>n[t].stop(!!e)))}else ck(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(nb.und(e))this.start({pause:!0});else{let t=this.springs;rb(ib(e),(e=>t[e].pause()))}return this}resume(e){if(nb.und(e))this.start({pause:!1});else{let t=this.springs;rb(ib(e),(e=>t[e].resume()))}return this}each(e){lb(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,o=this._active.size>0,r=this._changed.size>0;(o&&!this._started||r&&!this._started)&&(this._started=!0,sb(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));let l=!o&&this._started,i=r||l&&n.size?this.get():null;r&&t.size&&sb(t,(([e,t])=>{t.value=i,e(t,this,this._item)})),l&&(this._started=!1,sb(n,(([e,t])=>{t.value=i,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}Of.onFrame(this._onFrame)}};function Rk(e,t){return Promise.all(t.map((t=>Nk(e,t)))).then((t=>rk(e,t)))}async function Nk(e,t,n){let{keys:o,to:r,from:l,loop:i,onRest:s,onResolve:a}=t,c=nb.obj(t.default)&&t.default;i&&(t.loop=!1),!1===r&&(t.to=null),!1===l&&(t.from=null);let u=nb.arr(r)||nb.fun(r)?r:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):rb(Tk,(n=>{let o=t[n];if(nb.fun(o)){let r=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=r.get(o);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):r.set(o,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));let d=e._state;t.pause===!d.paused?(d.paused=t.pause,ub(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let p=(o||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),m=!0===t.cancel||!0===$v(t,"cancel");(u||m&&d.asyncId)&&p.push(ok(++e._lastAsyncId,{props:t,state:d,actions:{pause:tb,resume:tb,start(t,n){m?(ck(d,e._lastAsyncId),n(sk(e))):(t.onRest=s,n(ak(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));let h=rk(e,await Promise.all(p));if(i&&h.finished&&(!n||!h.noop)){let n=wk(t,i,r);if(n)return Ok(e,[n]),Nk(e,n,!0)}return a&&Of.batchedUpdates((()=>a(h,e,e.item))),h}function Lk(e,t){let n=new yk;return n.key=e,t&&lv(n,t),n}function Ak(e,t,n){t.keys&&rb(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}function Ok(e,t){rb(t,(t=>{Ak(e.springs,t,(t=>Lk(t,e)))}))}var Dk=({children:e,...t})=>{let n=(0,s.useContext)(zk),o=t.pause||!!n.pause,r=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,s.useState)((()=>({inputs:t,result:e()}))),o=(0,s.useRef)(),r=o.current,l=r;return l?Boolean(t&&l.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,l.inputs))||(l={inputs:t,result:e()}):l=n,(0,s.useEffect)((()=>{o.current=l,r==n&&(n.inputs=n.result=void 0)}),[l]),l.result}((()=>({pause:o,immediate:r})),[o,r]);let{Provider:l}=zk;return s.createElement(l,{value:t},e)},zk=function(e,t){return Object.assign(e,s.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}(Dk,{});Dk.Provider=zk.Provider,Dk.Consumer=zk.Consumer;var Vk=class extends hk{constructor(e,t){super(),this.source=e,this.calc=Ub(...t);let n=this._get(),o=Ov(n);Bv(this,o.create(n))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get();ob(t,this.get())||(xv(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Hk(this._active)&&Gk(this)}_get(){let e=nb.arr(this.source)?this.source.map(ev):ib(ev(this.source));return this.calc(...e)}_start(){this.idle&&!Hk(this._active)&&(this.idle=!1,rb(Iv(this),(e=>{e.done=!1})),eb.skipAnimation?(Of.batchedUpdates((()=>this.advance())),Gk(this)):_b.start(this))}_attach(){let e=1;rb(ib(this.source),(t=>{Jb(t)&&lv(t,this),pk(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){rb(ib(this.source),(e=>{Jb(e)&&iv(e,this)})),this._active.clear(),Gk(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=ib(this.source).reduce(((e,t)=>Math.max(e,(pk(t)?t.priority:0)+1)),0))}};function Fk(e){return!1!==e.idle}function Hk(e){return!e.size||Array.from(e).every(Fk)}function Gk(e){e.idle||(e.idle=!0,rb(Iv(e),(e=>{e.done=!0})),nv(e,{type:"idle",parent:e}))}eb.assign({createStringInterpolator:bv,to:(e,t)=>new Vk(e,t)});_b.advance;const Uk=window.ReactDOM;var $k=/^--/;function jk(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||$k.test(e)||Kk.hasOwnProperty(e)&&Kk[e]?(""+t).trim():t+"px"}var Wk={};var Kk={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},Zk=["Webkit","Ms","Moz","O"];Kk=Object.keys(Kk).reduce(((e,t)=>(Zk.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Kk);var qk=/^(matrix|translate|scale|rotate|skew)/,Yk=/^(translate)/,Xk=/^(rotate|skew)/,Qk=(e,t)=>nb.num(e)&&0!==e?e+t:e,Jk=(e,t)=>nb.arr(e)?e.every((e=>Jk(e,t))):nb.num(e)?e===t:parseFloat(e)===t,e_=class extends Nv{constructor({x:e,y:t,z:n,...o}){let r=[],l=[];(e||t||n)&&(r.push([e||0,t||0,n||0]),l.push((e=>[`translate3d(${e.map((e=>Qk(e,"px"))).join(",")})`,Jk(e,0)]))),lb(o,((e,t)=>{if("transform"===t)r.push([e||""]),l.push((e=>[e,""===e]));else if(qk.test(t)){if(delete o[t],nb.und(e))return;let n=Yk.test(t)?"px":Xk.test(t)?"deg":"";r.push(ib(e)),l.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${Qk(r,n)})`,Jk(r,0)]:e=>[`${t}(${e.map((e=>Qk(e,n))).join(",")})`,Jk(e,t.startsWith("scale")?1:0)])}})),r.length&&(o.transform=new t_(r,l)),super(o)}},t_=class extends ov{constructor(e,t){super(),this.inputs=e,this.transforms=t}_value=null;get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return rb(this.inputs,((n,o)=>{let r=ev(n[0]),[l,i]=this.transforms[o](nb.arr(r)?r:n.map(ev));e+=" "+l,t=t&&i})),t?"none":e}observerAdded(e){1==e&&rb(this.inputs,(e=>rb(e,(e=>Jb(e)&&lv(e,this)))))}observerRemoved(e){0==e&&rb(this.inputs,(e=>rb(e,(e=>Jb(e)&&iv(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),nv(this,e)}};eb.assign({batchedUpdates:Uk.unstable_batchedUpdates,createStringInterpolator:bv,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 n_=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new Nv(e)),getComponentProps:o=(e=>e)}={})=>{let r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},l=e=>{let t=Fv(e)||"Anonymous";return(e=nb.str(e)?l[e]||(l[e]=Dv(e,r)):e[Vv]||(e[Vv]=Dv(e,r))).displayName=`Animated(${t})`,e};return lb(e,((t,n)=>{nb.arr(e)&&(n=Fv(t)),l[n]=l(t)})),{animated:l}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:o,children:r,scrollTop:l,scrollLeft:i,viewBox:s,...a}=t,c=Object.values(a),u=Object.keys(a).map((t=>n||e.hasAttribute(t)?t:Wk[t]||(Wk[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==r&&(e.textContent=r);for(let t in o)if(o.hasOwnProperty(t)){let n=jk(t,o[t]);$k.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==l&&(e.scrollTop=l),void 0!==i&&(e.scrollLeft=i),void 0!==s&&e.setAttribute("viewBox",s)},createAnimatedStyle:e=>new e_(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),o_=n_.animated;function r_(e){return{top:e.offsetTop,left:e.offsetLeft}}const l_=function({triggerAnimationOnChange:e,clientId:t}){const n=(0,u.useRef)(),{isTyping:o,getGlobalBlockCount:r,isBlockSelected:l,isFirstMultiSelectedBlock:i,isBlockMultiSelected:s,isAncestorMultiSelected:a}=(0,d.useSelect)(Nr),{previous:c,prevRect:p}=(0,u.useMemo)((()=>({previous:n.current&&r_(n.current),prevRect:n.current&&n.current.getBoundingClientRect()})),[e]);return(0,u.useLayoutEffect)((()=>{if(!c||!n.current)return;const e=(0,As.getScrollContainer)(n.current),u=l(t),d=u||i(t);function m(){if(d&&p){const t=n.current.getBoundingClientRect().top-p.top;t&&(e.scrollTop+=t)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||o()||r()>200)return void m();const h=u||s(t)||a(t)?"1":"",g=new Pk({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:e}){if(!n.current)return;let{x:t,y:o}=e;t=Math.round(t),o=Math.round(o);const r=0===t&&0===o;n.current.style.transformOrigin="center center",n.current.style.transform=r?null:`translate3d(${t}px,${o}px,0)`,n.current.style.zIndex=h,m()}});n.current.style.transform=void 0;const f=r_(n.current),b=Math.round(c.left-f.left),v=Math.round(c.top-f.top);return g.start({x:0,y:0,from:{x:b,y:v}}),()=>{g.stop(),g.set({x:0,y:0})}}),[c,p,t,o,r,l,i,s,a]),n},i_=(0,u.createContext)({}),s_=".block-editor-block-list__block",a_=".block-list-appender",c_=".block-editor-button-block-appender";function u_(e,t){return e.closest(s_)===t.closest(s_)}function d_(e,t){return t.closest([s_,a_,c_].join(","))===e}function p_(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(s_);return t?t.id.slice(6):void 0}function m_({clientId:e,initialPosition:t}){const n=(0,u.useRef)(),{isBlockSelected:o,isMultiSelecting:r}=(0,d.useSelect)(Nr);return(0,u.useEffect)((()=>{if(!o(e)||r())return;if(null==t)return;if(!n.current)return;const{ownerDocument:l}=n.current;if(d_(n.current,l.activeElement))return;const i=As.focus.tabbable.find(n.current).filter((e=>(0,As.isTextField)(e))),s=-1===t,a=i[s?i.length-1:0]||n.current;if(d_(n.current,a)){if(!n.current.getAttribute("contenteditable")){const e=As.focus.tabbable.findNext(n.current);if(e&&d_(n.current,e)&&(0,As.isFormElement)(e))return void e.focus()}(0,As.placeCaretAtHorizontalEdge)(a,s)}else n.current.focus()}),[t,e]),n}function h_(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function g_({isEnabled:e}){return(0,p.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",h_),t.addEventListener("mouseover",h_),()=>{t.removeEventListener("mouseout",h_),t.removeEventListener("mouseover",h_),t.classList.remove("is-hovered")}}),[e])}function f_(e){const{isBlockSelected:t}=(0,d.useSelect)(Nr),{selectBlock:n,selectionChange:o}=(0,d.useDispatch)(Nr);return(0,p.useRefEffect)((r=>{function l(l){r.parentElement.closest('[contenteditable="true"]')||(t(e)?l.target.isContentEditable||o(e):d_(r,l.target)&&n(e))}return r.addEventListener("focusin",l),()=>{r.removeEventListener("focusin",l)}}),[t,n])}function b_({clientId:e,isSelected:t}){const{getBlockRootClientId:n,getBlockIndex:o}=(0,d.useSelect)(Nr),{insertAfterBlock:r,removeBlock:l}=(0,d.useDispatch)(Nr);return(0,p.useRefEffect)((n=>{if(t)return n.addEventListener("keydown",o),n.addEventListener("dragstart",i),()=>{n.removeEventListener("keydown",o),n.removeEventListener("dragstart",i)};function o(t){const{keyCode:o,target:i}=t;o!==zs.ENTER&&o!==zs.BACKSPACE&&o!==zs.DELETE||i!==n||(0,As.isTextField)(i)||(t.preventDefault(),o===zs.ENTER?r(e):l(e))}function i(e){e.preventDefault()}}),[e,t,n,o,r,l])}function v_(e){const{isNavigationMode:t,isBlockSelected:n}=(0,d.useSelect)(Nr),{setNavigationMode:o,selectBlock:r}=(0,d.useDispatch)(Nr);return(0,p.useRefEffect)((l=>{function i(l){t()&&!l.defaultPrevented&&(l.preventDefault(),n(e)?o(!1):r(e))}return l.addEventListener("mousedown",i),()=>{l.removeEventListener("mousedown",i)}}),[e,t,n,o])}function k_(){const e=(0,u.useContext)(Kw);return(0,p.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function __({clientId:e="",isEnabled:t=!0}={}){const{getEnabledClientIdsTree:n}=ie((0,d.useSelect)(Nr));return(0,p.useRefEffect)((o=>{if(!t)return;const r=t=>{(t.target===o||t.target.classList.contains("is-root-container"))&&(t.defaultPrevented||(t.preventDefault(),n(e).forEach((({clientId:e})=>{const t=o.querySelector(`[data-block="${e}"]`);t&&(t.classList.remove("has-editable-outline"),t.offsetWidth,t.classList.add("has-editable-outline"))}))))};return o.addEventListener("click",r),()=>o.removeEventListener("click",r)}),[t])}function y_(e={},{__unstableIsHtml:t}={}){const{clientId:n,className:o,wrapperProps:r={},isAligned:l,index:i,mode:s,name:a,blockApiVersion:c,blockTitle:d,isSelected:m,isSubtreeDisabled:h,isOutlineEnabled:g,hasOverlay:f,initialPosition:v,blockEditingMode:k,isHighlighted:_,isMultiSelected:E,isPartiallySelected:w,isReusable:S,isDragging:C,hasChildSelected:B,removeOutline:I,isBlockMovingMode:T,canInsertMovingBlock:M,isEditingDisabled:P,hasEditableOutline:R,isTemporarilyEditingAsBlocks:N,defaultClassName:L,templateLock:A}=(0,u.useContext)(i_),O=(0,x.sprintf)((0,x.__)("Block: %s"),d),D="html"!==s||t?"":"-visual",z=(0,p.useMergeRefs)([e.ref,m_({clientId:n,initialPosition:v}),gd(n),f_(n),b_({clientId:n,isSelected:m}),v_(n),g_({isEnabled:g}),k_(),l_({triggerAnimationOnChange:i,clientId:n}),(0,p.useDisabled)({isDisabled:!f}),__({clientId:n,isEnabled:"core/block"===a||"contentOnly"===A})]),V=y(),F=!!V[b]&&eg(a)?{"--wp-admin-theme-color":"var(--wp-bound-block-color)"}:{};return c<2&&V.clientId,{tabIndex:"disabled"===k?-1:0,...r,...e,ref:z,id:`block-${n}${D}`,role:"document","aria-label":O,"data-block":n,"data-type":a,"data-title":d,inert:h?"true":void 0,className:ml()("block-editor-block-list__block",{"wp-block":!l,"has-block-overlay":f,"is-selected":m,"is-highlighted":_,"is-multi-selected":E,"is-partially-selected":w,"is-reusable":S,"is-dragging":C,"has-child-selected":B,"remove-outline":I,"is-block-moving-mode":T,"can-insert-moving-block":M,"is-editing-disabled":P,"has-editable-outline":R,"is-content-locked-temporarily-editing-as-blocks":N},o,e.className,r.className,L),style:{...r.style,...e.style,...F}}}function E_({children:e,isHtml:t,...n}){return(0,s.createElement)("div",{...y_(n,{__unstableIsHtml:t})},e)}function w_({block:{__unstableBlockSource:e},mode:t,isLocked:n,canRemove:o,clientId:r,isSelected:l,isSelectionEnabled:i,className:a,__unstableLayoutClassNames:p,name:m,isValid:h,attributes:g,wrapperProps:f,setAttributes:b,onReplace:v,onInsertBlocksAfter:k,onMerge:_,toggleSelection:y}){var E;const{mayDisplayControls:w,mayDisplayParentControls:S,themeSupportsLayout:C,...x}=(0,u.useContext)(i_),{removeBlock:B}=(0,d.useDispatch)(Nr),I=(0,u.useCallback)((()=>B(r)),[r]),T=Ui()||{};let M=(0,s.createElement)(yf,{name:m,isSelected:l,attributes:g,setAttributes:b,insertBlocksAfter:n?void 0:k,onReplace:o?v:void 0,onRemove:o?I:void 0,mergeBlocks:o?_:void 0,clientId:r,isSelectionEnabled:i,toggleSelection:y,__unstableLayoutClassNames:p,__unstableParentLayout:Object.keys(T).length?T:void 0,mayDisplayControls:w,mayDisplayParentControls:S,blockEditingMode:x.blockEditingMode});const P=(0,c.getBlockType)(m);P?.getEditWrapperProps&&(f=function(e,t){const n={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(n.className=ml()(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(n.style={...e.style,...t.style}),n}(f,P.getEditWrapperProps(g)));const R=f&&!!f["data-align"]&&!C,N=a?.includes("is-position-sticky");let L;if(R&&(M=(0,s.createElement)("div",{className:ml()("wp-block",N&&a),"data-align":f["data-align"]},M)),h)L="html"===t?(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{style:{display:"none"}},M),(0,s.createElement)(E_,{isHtml:!0},(0,s.createElement)(Lf,{clientId:r}))):P?.apiVersion>1?M:(0,s.createElement)(E_,null,M);else{const t=e?(0,c.serializeRawBlock)(e):(0,c.getSaveContent)(P,g);L=(0,s.createElement)(E_,{className:"has-warning"},(0,s.createElement)(If,{clientId:r}),(0,s.createElement)(u.RawHTML,null,(0,As.safeHTML)(t)))}const{"data-align":A,...O}=null!==(E=f)&&void 0!==E?E:{};return O.className=ml()(O.className,A&&C&&`align${A}`,!(A&&N)&&a),(0,s.createElement)(i_.Provider,{value:{wrapperProps:O,isAligned:R,...x}},(0,s.createElement)(Rf,{fallback:(0,s.createElement)(E_,{className:"has-warning"},(0,s.createElement)(Mf,null))},L))}y_.save=c.__unstableGetBlockProps;const S_=(0,d.withDispatch)(((e,t,n)=>{const{updateBlockAttributes:o,insertBlocks:r,mergeBlocks:l,replaceBlocks:i,toggleSelection:s,__unstableMarkLastChangeAsPersistent:a,moveBlocksToPosition:u,removeBlock:d}=e(Nr);return{setAttributes(e){const{getMultiSelectedBlockClientIds:r}=n.select(Nr),l=r(),{clientId:i}=t,s=l.length?l:[i];o(s,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;r(e,n,o)},onInsertBlocksAfter(e){const{clientId:o,rootClientId:l}=t,{getBlockIndex:i}=n.select(Nr),s=i(o);r(e,s+1,l)},onMerge(e){const{clientId:o,rootClientId:i}=t,{getPreviousBlockClientId:s,getNextBlockClientId:a,getBlock:p,getBlockAttributes:m,getBlockName:h,getBlockOrder:g,getBlockIndex:f,getBlockRootClientId:b,canInsertBlockType:v}=n.select(Nr);function k(e,t=!0){const o=b(e),l=g(e),[i]=l;1===l.length&&(0,c.isUnmodifiedBlock)(p(i))?d(e):n.batch((()=>{if(v(h(i),o))u([i],e,o,f(e));else{const n=(0,c.switchToBlockType)(p(i),(0,c.getDefaultBlockName)());n&&n.length&&(r(n,f(e),o,t),d(i,!1))}!g(e).length&&(0,c.isUnmodifiedBlock)(p(e))&&d(e,!1)}))}if(e){if(i){const e=a(i);if(e){if(h(i)!==h(e))return void l(i,e);{const t=m(i),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{u(g(e),e,i),d(e,!1)}))}}}const e=a(o);if(!e)return;g(e).length?k(e,!1):l(o,e)}else{const e=s(o);if(e)l(e,o);else if(i){const e=s(i);if(e&&h(i)===h(e)){const t=m(i),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{u(g(i),i,e),d(i,!1)}))}k(i)}else d(o)}},onReplace(e,n,o){e.length&&!(0,c.isUnmodifiedDefaultBlock)(e[e.length-1])&&a();const r=1===e?.length&&Array.isArray(e[0])?e[0]:e;i([t.clientId],r,n,o)},toggleSelection(e){s(e)}}}));w_=(0,p.compose)(S_,(0,_l.withFilters)("editor.BlockListBlock"))(w_);const C_=(0,u.memo)((function(e){const{clientId:t,rootClientId:n}=e,o=(0,d.useSelect)((e=>{const{isBlockSelected:o,getBlockMode:r,isSelectionEnabled:l,getTemplateLock:i,getBlockWithoutAttributes:s,getBlockAttributes:a,canRemoveBlock:u,canMoveBlock:d,getSettings:p,__unstableGetTemporarilyEditingAsBlocks:m,getBlockEditingMode:h,getBlockName:g,isFirstMultiSelectedBlock:f,getMultiSelectedBlockClientIds:b,hasSelectedInnerBlock:v,getBlockIndex:k,isTyping:_,isBlockMultiSelected:y,isBlockSubtreeDisabled:E,isBlockHighlighted:w,__unstableIsFullySelected:S,__unstableSelectionHasUnmergeableBlock:C,isBlockBeingDragged:x,isDragging:B,hasBlockMovingClientId:I,canInsertBlockType:T,__unstableHasActiveBlockOverlayActive:M,__unstableGetEditorMode:P,getSelectedBlocksInitialCaretPosition:R}=ie(e(Nr)),N=s(t);if(!N)return;const{hasBlockSupport:L,getActiveBlockVariation:A}=e(c.store),O=o(t),D=u(t,n),z=d(t,n),V=a(t),{name:F,isValid:H}=N,G=(0,c.getBlockType)(F),U=A(F,V),{outlineMode:$,supportsLayout:j}=p(),W=y(t),K=v(t,!0),Z=_(),q=G?.apiVersion>1,Y=I(),X=h(t);return{mode:r(t),isSelectionEnabled:l(),isLocked:!!i(n),templateLock:i(t),canRemove:D,canMove:z,blockWithoutAttributes:N,name:F,attributes:V,isValid:H,isSelected:O,themeSupportsLayout:j,isTemporarilyEditingAsBlocks:m()===t,blockEditingMode:X,mayDisplayControls:O||f(t)&&b().every((e=>g(e)===F)),mayDisplayParentControls:L(g(t),"__experimentalExposeControlsToChildren",!1)&&v(t),index:k(t),blockApiVersion:G?.apiVersion||1,blockTitle:U?.title||G?.title,isSubtreeDisabled:"disabled"===X&&E(t),isOutlineEnabled:$,hasOverlay:M(t)&&!B(),initialPosition:O&&"edit"===P()?R():void 0,isHighlighted:w(t),isMultiSelected:W,isPartiallySelected:W&&!S()&&!C(),isReusable:(0,c.isReusableBlock)(G),isDragging:x(t),hasChildSelected:K,removeOutline:O&&$&&Z,isBlockMovingMode:!!Y,canInsertMovingBlock:Y&&T(g(Y),n),isEditingDisabled:"disabled"===X,hasEditableOutline:"disabled"!==X&&"disabled"===h(n),className:q?V.className:void 0,defaultClassName:q?(0,c.getBlockDefaultClassName)(F):void 0}}),[t,n]),{mode:r,isSelectionEnabled:l,isLocked:i,canRemove:a,canMove:p,blockWithoutAttributes:m,name:h,attributes:g,isValid:f,isSelected:b,themeSupportsLayout:v,isTemporarilyEditingAsBlocks:k,blockEditingMode:_,mayDisplayControls:y,mayDisplayParentControls:E,index:w,blockApiVersion:S,blockTitle:C,isSubtreeDisabled:x,isOutlineEnabled:B,hasOverlay:I,initialPosition:T,isHighlighted:M,isMultiSelected:P,isPartiallySelected:R,isReusable:N,isDragging:L,hasChildSelected:A,removeOutline:O,isBlockMovingMode:D,canInsertMovingBlock:z,templateLock:V,isEditingDisabled:F,hasEditableOutline:H,className:G,defaultClassName:U}=o,$=(0,u.useMemo)((()=>({...m,attributes:g})),[m,g]);if(!o)return null;const j={clientId:t,className:G,index:w,mode:r,name:h,blockApiVersion:S,blockTitle:C,isSelected:b,isSubtreeDisabled:x,isOutlineEnabled:B,hasOverlay:I,initialPosition:T,blockEditingMode:_,isHighlighted:M,isMultiSelected:P,isPartiallySelected:R,isReusable:N,isDragging:L,hasChildSelected:A,removeOutline:O,isBlockMovingMode:D,canInsertMovingBlock:z,templateLock:V,isEditingDisabled:F,hasEditableOutline:H,isTemporarilyEditingAsBlocks:k,defaultClassName:U,mayDisplayControls:y,mayDisplayParentControls:E,themeSupportsLayout:v};return(0,s.createElement)(i_.Provider,{value:j},(0,s.createElement)(w_,{...e,mode:r,isSelectionEnabled:l,isLocked:i,canRemove:a,canMove:p,block:$,name:h,attributes:g,isValid:f,isSelected:b}))})),x_=window.wp.htmlEntities,B_=[(0,u.createInterpolateElement)((0,x.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,s.createElement)("kbd",null)}),(0,u.createInterpolateElement)((0,x.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,u.createInterpolateElement)((0,x.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,x.__)("Drag files into the editor to automatically insert media blocks."),(0,x.__)("Change a block's type by pressing the block icon on the toolbar.")];const I_=function(){const[e]=(0,u.useState)(Math.floor(Math.random()*B_.length));return(0,s.createElement)(_l.Tip,null,B_[e])},T_=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),M_=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));const P_=function({title:e,icon:t,description:n,blockType:o,className:r}){o&&(w()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:e,icon:t,description:n}=o));const{parentNavBlockClientId:l}=(0,d.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockParentsByBlockName:n}=e(Nr);return{parentNavBlockClientId:n(t(),"core/navigation",!0)[0]}}),[]),{selectBlock:i}=(0,d.useDispatch)(Nr);return(0,s.createElement)("div",{className:ml()("block-editor-block-card",r)},l&&(0,s.createElement)(_l.Button,{onClick:()=>i(l),label:(0,x.__)("Go to parent Navigation block"),style:{minWidth:24,padding:0},icon:(0,x.isRTL)()?T_:M_,size:"small"}),(0,s.createElement)(qh,{icon:t,showColors:!0}),(0,s.createElement)("div",{className:"block-editor-block-card__content"},(0,s.createElement)("h2",{className:"block-editor-block-card__title"},e),n&&(0,s.createElement)("span",{className:"block-editor-block-card__description"},n)))},R_=(0,p.createHigherOrderComponent)((e=>(0,d.withRegistry)((({useSubRegistry:t=!0,registry:n,...o})=>{if(!t)return(0,s.createElement)(e,{registry:n,...o});const[r,l]=(0,u.useState)(null);return(0,u.useEffect)((()=>{const e=(0,d.createRegistry)({},n);e.registerStore(oe,Rr),l(e)}),[n]),r?(0,s.createElement)(d.RegistryProvider,{value:r},(0,s.createElement)(e,{registry:r,...o})):null}))),"withRegistryProvider"),N_=()=>{};function L_({clientId:e=null,value:t,selection:n,onChange:o=N_,onInput:r=N_}){const l=(0,d.useRegistry)(),{resetBlocks:i,resetSelection:s,replaceInnerBlocks:a,setHasControlledInnerBlocks:p,__unstableMarkNextChangeAsNotPersistent:m}=l.dispatch(Nr),{getBlockName:h,getBlocks:g,getSelectionStart:f,getSelectionEnd:b}=l.select(Nr),v=(0,d.useSelect)((t=>!e||t(Nr).areInnerBlocksControlled(e)),[e]),k=(0,u.useRef)({incoming:null,outgoing:[]}),_=(0,u.useRef)(!1),y=()=>{t&&(m(),e?l.batch((()=>{p(e,!0);const n=t.map((e=>(0,c.cloneBlock)(e)));_.current&&(k.current.incoming=n),m(),a(e,n)})):(_.current&&(k.current.incoming=t),i(t)))},E=(0,u.useRef)(r),w=(0,u.useRef)(o);(0,u.useEffect)((()=>{E.current=r,w.current=o}),[r,o]),(0,u.useEffect)((()=>{k.current.outgoing.includes(t)?k.current.outgoing[k.current.outgoing.length-1]===t&&(k.current.outgoing=[]):g(e)!==t&&(k.current.outgoing=[],y(),n&&s(n.selectionStart,n.selectionEnd,n.initialPosition))}),[t,e]),(0,u.useEffect)((()=>{v||(k.current.outgoing=[],y())}),[v]),(0,u.useEffect)((()=>{const{getSelectedBlocksInitialCaretPosition:t,isLastBlockChangePersistent:n,__unstableIsLastBlockChangeIgnored:o,areInnerBlocksControlled:r}=l.select(Nr);let i=g(e),s=n(),a=!1;_.current=!0;const c=l.subscribe((()=>{if(null!==e&&null===h(e))return;if(!(!e||r(e)))return;const l=n(),c=g(e),u=c!==i;if(i=c,u&&(k.current.incoming||o()))return k.current.incoming=null,void(s=l);if(u||a&&!u&&l&&!s){s=l,k.current.outgoing.push(i);const e=s?w.current:E.current,n=wn.has(i);n&&wn.delete(i),e(i,{selection:{selectionStart:f(),selectionEnd:b(),initialPosition:t()},undoIgnore:n})}a=u}),Nr);return()=>{_.current=!1,c()}}),[l,e]),(0,u.useEffect)((()=>()=>{m(),e?(p(e,!1),m(),a(e,[])):i([])}),[])}const A_=window.wp.keyboardShortcuts;function O_(){return null}O_.Register=function(){const{registerShortcut:e}=(0,d.useDispatch)(A_.store);return(0,u.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,x.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,x.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,x.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:(0,x.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:(0,x.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,x.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:(0,x.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,x.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,x.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,x.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,x.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};const D_=O_,z_=R_((e=>{const{children:t,settings:n,stripExperimentalSettings:o=!1}=e,{__experimentalUpdateSettings:r}=ie((0,d.useDispatch)(Nr));return(0,u.useEffect)((()=>{r({...n,__internalIsInitialized:!0},{stripExperimentalSettings:o,reset:!0})}),[n,o,r]),L_(e),(0,s.createElement)(_l.SlotFillProvider,{passthrough:!0},!n?.__unstableIsPreviewMode&&(0,s.createElement)(D_.Register,null),(0,s.createElement)(hd,null,t))})),V_=e=>(0,s.createElement)(z_,{...e,stripExperimentalSettings:!0},e.children);function F_(){const{getSettings:e,hasSelectedBlock:t,hasMultiSelection:n}=(0,d.useSelect)(Nr),{clearSelectedBlock:o}=(0,d.useDispatch)(Nr),{clearBlockSelection:r}=e();return(0,p.useRefEffect)((e=>{if(r)return e.addEventListener("mousedown",l),()=>{e.removeEventListener("mousedown",l)};function l(r){(t()||n())&&r.target===e&&o()}}),[t,n,o,r])}function H_(e){return(0,s.createElement)("div",{ref:F_(),...e})}function G_(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r,getSelectedBlocksInitialCaretPosition:l,__unstableIsFullySelected:i}=e(Nr);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r(),initialPosition:l(),isFullSelection:i()}}function U_(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r,isFullSelection:l}=(0,d.useSelect)(G_,[]);return(0,p.useRefEffect)((r=>{const{ownerDocument:i}=r,{defaultView:s}=i;if(null==e)return;if(!o||t)return;const{length:a}=n;a<2||l&&(r.contentEditable=!0,r.focus(),s.getSelection().removeAllRanges())}),[o,t,n,r,e,l])}function $_(e,t,n,o){let r,l=As.focus.focusable.find(n);return t&&l.reverse(),l=l.slice(l.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),l.find((function(e){if(!(e.closest("[inert]")||1===e.children.length&&u_(e,e.firstElementChild)&&"true"===e.firstElementChild.getAttribute("contenteditable"))){if(!As.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(o){const t=e.getBoundingClientRect();if(t.left>=r.right||t.right<=r.left)return!1}return!0}}))}function j_(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:o,__unstableIsFullySelected:r}=(0,d.useSelect)(Nr),{selectBlock:l}=(0,d.useDispatch)(Nr);return(0,p.useRefEffect)((i=>{let s;function a(){s=null}function c(a){if(a.defaultPrevented)return;const{keyCode:c,target:u,shiftKey:d,ctrlKey:p,altKey:m,metaKey:h}=a,g=c===zs.UP,f=c===zs.DOWN,b=c===zs.LEFT,v=c===zs.RIGHT,k=g||b,_=b||v,y=g||f,E=_||y,w=d||p||m||h,S=y?As.isVerticalEdge:As.isHorizontalEdge,{ownerDocument:C}=i,{defaultView:x}=C;if(!E)return;if(o()){if(d)return;if(!r())return;return a.preventDefault(),void(k?l(e()):l(t(),-1))}if(!function(e,t,n){const o=t===zs.UP||t===zs.DOWN,{tagName:r}=e,l=e.getAttribute("type");if(o&&!n)return"INPUT"!==r||!["date","datetime-local","month","number","range","time","week"].includes(l);if("INPUT"===r)return["button","checkbox","number","color","file","image","radio","reset","submit"].includes(l);return"TEXTAREA"!==r}(u,c,w))return;y?s||(s=(0,As.computeCaretRect)(x)):s=null;const B=(0,As.isRTL)(u)?!k:k,{keepCaretInsideBlock:I}=n();if(d)(function(e,t){const n=$_(e,t,i);return n&&p_(n)})(u,k)&&S(u,k)&&(i.contentEditable=!0,i.focus());else if(!y||!(0,As.isVerticalEdge)(u,k)||m&&!(0,As.isHorizontalEdge)(u,B)||I){if(_&&x.getSelection().isCollapsed&&(0,As.isHorizontalEdge)(u,B)&&!I){const e=$_(u,B,i);(0,As.placeCaretAtHorizontalEdge)(e,k),a.preventDefault()}}else{const e=$_(u,k,i,!0);e&&((0,As.placeCaretAtVerticalEdge)(e,m?!k:k,m?void 0:s),a.preventDefault())}}return i.addEventListener("mousedown",a),i.addEventListener("keydown",c),()=>{i.removeEventListener("mousedown",a),i.removeEventListener("keydown",c)}}),[])}function W_(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,d.useSelect)(Nr),{multiSelect:o,selectBlock:r}=(0,d.useDispatch)(Nr),l=(0,A_.__unstableUseShortcutEventMatch)();return(0,p.useRefEffect)((i=>{function s(s){if(!l("core/block-editor/select-all",s))return;const a=t();if(a.length<2&&!(0,As.isEntirelySelected)(s.target))return;s.preventDefault();const[c]=a,u=n(c),d=e(u);a.length!==d.length?o(d[0],d[d.length-1]):u&&(i.ownerDocument.defaultView.getSelection().removeAllRanges(),r(u))}return i.addEventListener("keydown",s),()=>{i.removeEventListener("keydown",s)}}),[])}function K_(e,t){e.contentEditable=t,t&&e.focus()}function Z_(){const{startMultiSelect:e,stopMultiSelect:t}=(0,d.useDispatch)(Nr),{isSelectionEnabled:n,hasSelectedBlock:o,isDraggingBlocks:r,isMultiSelecting:l}=(0,d.useSelect)(Nr);return(0,p.useRefEffect)((i=>{const{ownerDocument:s}=i,{defaultView:a}=s;let c,u;function d(){t(),a.removeEventListener("mouseup",d),u=a.requestAnimationFrame((()=>{if(!o())return;K_(i,!1);const e=a.getSelection();if(e.rangeCount){const t=e.getRangeAt(0),{commonAncestorContainer:n}=t,o=t.cloneRange();c.contains(n)&&(c.focus(),e.removeAllRanges(),e.addRange(o))}}))}function p({buttons:t,target:o,relatedTarget:s}){o.contains(s)||r()||1===t&&(l()||i!==o&&"true"===o.getAttribute("contenteditable")&&n()&&(c=o,e(),a.addEventListener("mouseup",d),K_(i,!0)))}return i.addEventListener("mouseout",p),()=>{i.removeEventListener("mouseout",p),a.removeEventListener("mouseup",d),a.cancelAnimationFrame(u)}}),[e,t,n,o])}function q_(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function Y_(e){const t=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;return t?.closest("[data-wp-block-attribute-key]")}function X_(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,d.useDispatch)(Nr),{getBlockParents:o,getBlockSelectionStart:r,isMultiSelecting:l}=(0,d.useSelect)(Nr);return(0,p.useRefEffect)((i=>{const{ownerDocument:s}=i,{defaultView:a}=s;function c(s){const c=a.getSelection();if(!c.rangeCount)return;const u=function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(c),d=function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:t.childNodes[n]}(c);if(!i.contains(u)||!i.contains(d))return;const p=s.shiftKey&&"mouseup"===s.type;if(c.isCollapsed&&!p){if("true"===i.contentEditable&&!l()){q_(i,!1);let e=u.nodeType===u.ELEMENT_NODE?u:u.parentElement;e=e?.closest("[contenteditable]"),e?.focus()}return}let m=p_(u),h=p_(d);if(p){const e=r(),t=p_(s.target),n=t!==h;(m===h&&c.isCollapsed||!h||n)&&(h=t),m!==e&&(m=e)}if(void 0===m&&void 0===h)return void q_(i,!1);if(m===h)l()?e(m,m):t(m);else{const t=[...o(m),m],r=[...o(h),h],l=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,r);if(t[l]!==m||r[l]!==h)return void e(t[l],r[l]);const i=Y_(u),s=Y_(d);if(i&&s){var g,f;const e=c.getRangeAt(0),t=(0,Y.create)({element:i,range:e,__unstableIsEditableTree:!0}),o=(0,Y.create)({element:s,range:e,__unstableIsEditableTree:!0}),r=null!==(g=t.start)&&void 0!==g?g:t.end,l=null!==(f=o.start)&&void 0!==f?f:o.end;n({start:{clientId:m,attributeKey:i.dataset.wpBlockAttributeKey,offset:r},end:{clientId:h,attributeKey:s.dataset.wpBlockAttributeKey,offset:l}})}else e(m,h)}}return s.addEventListener("selectionchange",c),a.addEventListener("mouseup",c),()=>{s.removeEventListener("selectionchange",c),a.removeEventListener("mouseup",c)}}),[e,t,n,o])}function Q_(){const{selectBlock:e}=(0,d.useDispatch)(Nr),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:o}=(0,d.useSelect)(Nr);return(0,p.useRefEffect)((r=>{function l(l){if(!t()||0!==l.button)return;const i=n(),s=p_(l.target);l.shiftKey?i!==s&&(r.contentEditable=!0,r.focus()):o()&&e(s)}return r.addEventListener("mousedown",l),()=>{r.removeEventListener("mousedown",l)}}),[e,t,n,o])}function J_(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,__unstableIsSelectionMergeable:n,hasMultiSelection:o}=(0,d.useSelect)(Nr),{replaceBlocks:r,__unstableSplitSelection:l,removeBlocks:i,__unstableDeleteSelection:s,__unstableExpandSelection:a}=(0,d.useDispatch)(Nr);return(0,p.useRefEffect)((u=>{function d(e){"true"===u.contentEditable&&e.preventDefault()}function p(d){d.defaultPrevented||o()&&(d.keyCode===zs.ENTER?(u.contentEditable=!1,d.preventDefault(),e()?r(t(),(0,c.createBlock)((0,c.getDefaultBlockName)())):l()):d.keyCode===zs.BACKSPACE||d.keyCode===zs.DELETE?(u.contentEditable=!1,d.preventDefault(),e()?i(t()):n()?s(d.keyCode===zs.DELETE):a()):1!==d.key.length||d.metaKey||d.ctrlKey||(u.contentEditable=!1,n()?s(d.keyCode===zs.DELETE):(d.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges())))}function m(e){o()&&(u.contentEditable=!1,n()?s():(e.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges()))}return u.addEventListener("beforeinput",d),u.addEventListener("keydown",p),u.addEventListener("compositionstart",m),()=>{u.removeEventListener("beforeinput",d),u.removeEventListener("keydown",p),u.removeEventListener("compositionstart",m)}}),[])}function ey(){const{getBlockName:e}=(0,d.useSelect)(Nr),{getBlockType:t}=(0,d.useSelect)(c.store),{createSuccessNotice:n}=(0,d.useDispatch)(Os.store);return(0,u.useCallback)(((o,r)=>{let l="";if(1===r.length){const n=r[0],i=t(e(n))?.title;l="copy"===o?(0,x.sprintf)((0,x.__)('Copied "%s" to clipboard.'),i):(0,x.sprintf)((0,x.__)('Moved "%s" to clipboard.'),i)}else l="copy"===o?(0,x.sprintf)((0,x._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):(0,x.sprintf)((0,x._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(l,{type:"snackbar"})}),[])}function ty({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch(t){try{n=e.getData("Text")}catch(e){return}}n=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;const o=(e=e.substring(n+20)).indexOf("\x3c!--EndFragment--\x3e");return o>-1&&(e=e.substring(0,o)),e}(n),n=function(e){const t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(22):e}(n);const o=(0,As.getFilesFromDataTransfer)(e);return o.length&&!function(e,t){if(t&&1===e?.length&&0===e[0].type.indexOf("image/")){const e=/<\s*img\b/gi;if(1!==t.match(e)?.length)return!0;const n=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(n))return!0}return!1}(o,n)?{files:o}:{html:n,plainText:t,files:[]}}const ny=Symbol("requiresWrapperOnCopy");function oy(e,t,n){let o=t;const[r]=t;if(r){if(n.select(c.store).getBlockType(r.name)[ny]){const{getBlockRootClientId:e,getBlockName:t,getBlockAttributes:l}=n.select(Nr),i=e(r.clientId),s=t(i);s&&(o=(0,c.createBlock)(s,l(i),o))}}const l=(0,c.serialize)(o);e.clipboardData.setData("text/plain",function(e){e=e.replace(/<br>/g,"\n");return(0,As.__unstableStripHTML)(e).trim().replace(/\n\n+/g,"\n\n")}(l)),e.clipboardData.setData("text/html",l)}function ry(e,t){const{plainText:n,html:o,files:r}=ty(e);let l=[];if(r.length){const e=(0,c.getBlockTransforms)("from");l=r.reduce(((t,n)=>{const o=(0,c.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat()}else l=(0,c.pasteHandler)({HTML:o,plainText:n,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return l}function ly(){const e=(0,d.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:n,hasMultiSelection:o,getSettings:r,__unstableIsFullySelected:l,__unstableIsSelectionCollapsed:i,__unstableIsSelectionMergeable:s,__unstableGetSelectedBlocksWithPartialSelection:a,canInsertBlockType:c}=(0,d.useSelect)(Nr),{flashBlock:u,removeBlocks:m,replaceBlocks:h,__unstableDeleteSelection:g,__unstableExpandSelection:f,insertBlocks:b}=(0,d.useDispatch)(Nr),v=ey();return(0,p.useRefEffect)((d=>{function p(p){if(p.defaultPrevented)return;const k=n();if(0===k.length)return;if(!o()){const{target:e}=p,{ownerDocument:t}=e;if("copy"===p.type||"cut"===p.type?(0,As.documentHasUncollapsedSelection)(t):(0,As.documentHasSelection)(t))return}if(!d.contains(p.target.ownerDocument.activeElement))return;p.preventDefault();const _=s(),y=i()||l(),E=!y&&!_;if("copy"===p.type||"cut"===p.type)if(1===k.length&&u(k[0]),E)f();else{let n;if(v(p.type,k),y)n=t(k);else{const[e,o]=a();n=[e,...t(k.slice(1,k.length-1)),o]}oy(p,n,e)}if("cut"===p.type)y&&!E?m(k):(p.target.ownerDocument.activeElement.contentEditable=!1,g());else if("paste"===p.type){const{__experimentalCanUserUseUnfilteredHTML:e}=r(),t=ry(p,e);if(1===k.length){const[e]=k;if(t.every((t=>c(t.name,e))))return void b(t,void 0,e)}h(k,t,t.length-1,-1)}}return d.ownerDocument.addEventListener("copy",p),d.ownerDocument.addEventListener("cut",p),d.ownerDocument.addEventListener("paste",p),()=>{d.ownerDocument.removeEventListener("copy",p),d.ownerDocument.removeEventListener("cut",p),d.ownerDocument.removeEventListener("paste",p)}}),[])}function iy(){const[e,t,n]=function(){const e=(0,u.useRef)(),t=(0,u.useRef)(),n=(0,u.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:r,getBlockCount:l}=(0,d.useSelect)(Nr),{setNavigationMode:i,setLastFocus:a}=ie((0,d.useDispatch)(Nr)),c=(0,d.useSelect)((e=>e(Nr).isNavigationMode()),[]),{getLastFocus:m}=ie((0,d.useSelect)(Nr)),h=c?void 0:"0",g=(0,u.useRef)();function f(t){if(g.current)g.current=null;else if(o())e.current.focus();else if(r())m()?.current.focus();else{i(!0);const n=e.current.ownerDocument===t.target.ownerDocument?e.current:e.current.ownerDocument.defaultView.frameElement,o=t.target.compareDocumentPosition(n)&t.target.DOCUMENT_POSITION_FOLLOWING,r=As.focus.tabbable.find(e.current);r.length&&(o?r[0]:r[r.length-1]).focus()}}const b=(0,s.createElement)("div",{ref:t,tabIndex:h,onFocus:f}),v=(0,s.createElement)("div",{ref:n,tabIndex:h,onFocus:f}),k=(0,p.useRefEffect)((s=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===zs.ESCAPE&&!o())return e.preventDefault(),void i(!0);if(e.keyCode!==zs.TAB)return;const l=e.shiftKey,a=l?"findPrevious":"findNext";if(!o()&&!r())return void(e.target===s&&i(!0));const c=As.focus.tabbable[a](e.target),u=e.target.closest("[data-block]"),d=u&&c&&(u_(u,c)||d_(u,c));if((0,As.isFormElement)(c)&&d)return;const p=l?t:n;g.current=!0,p.current.focus({preventScroll:!0})}function u(e){a({...m(),current:e.target});const{ownerDocument:t}=s;e.relatedTarget||t.activeElement!==t.body||0!==l()||s.focus()}function d(o){if(o.keyCode!==zs.TAB)return;if("region"===o.target?.getAttribute("role"))return;if(e.current===o.target)return;const r=o.shiftKey?"findPrevious":"findNext",l=As.focus.tabbable[r](o.target);l!==t.current&&l!==n.current||(o.preventDefault(),l.focus({preventScroll:!0}))}const{ownerDocument:p}=s,{defaultView:h}=p;return h.addEventListener("keydown",d),s.addEventListener("keydown",c),s.addEventListener("focusout",u),()=>{h.removeEventListener("keydown",d),s.removeEventListener("keydown",c),s.removeEventListener("focusout",u)}}),[]);return[b,(0,p.useMergeRefs)([e,k]),v]}(),o=(0,d.useSelect)((e=>e(Nr).hasMultiSelection()),[]);return[e,(0,p.useMergeRefs)([t,ly(),J_(),Z_(),X_(),Q_(),U_(),W_(),j_(),(0,p.useRefEffect)((e=>{if(e.tabIndex=0,o)return e.classList.add("has-multi-selection"),e.setAttribute("aria-label",(0,x.__)("Multiple selected blocks")),()=>{e.classList.remove("has-multi-selection"),e.removeAttribute("aria-label")}}),[o])]),n]}const sy=(0,u.forwardRef)((function({children:e,...t},n){const[o,r,l]=iy();return(0,s.createElement)(s.Fragment,null,o,(0,s.createElement)("div",{...t,ref:(0,p.useMergeRefs)([r,n]),className:ml()(t.className,"block-editor-writing-flow")},e),l)}));let ay=null;function cy(e,t,n){const o={};for(const t in e)o[t]=e[t];if(e instanceof n.contentDocument.defaultView.MouseEvent){const e=n.getBoundingClientRect();o.clientX+=e.left,o.clientY+=e.top}const r=new t(e.type,o);o.defaultPrevented&&r.preventDefault();!n.dispatchEvent(r)&&e.preventDefault()}function uy(e){return(0,p.useRefEffect)((()=>{const{defaultView:t}=e;if(!t)return;const{frameElement:n}=t,o=e.documentElement,r=["dragover","mousemove"],l={};for(const e of r)l[e]=e=>{const t=Object.getPrototypeOf(e).constructor.name;cy(e,window[t],n)},o.addEventListener(e,l[e]);return()=>{for(const e of r)o.removeEventListener(e,l[e])}}))}function dy({contentRef:e,children:t,tabIndex:n=0,scale:o=1,frameSize:r=0,expand:l=!1,readonly:i,forwardedRef:a,...c}){const{resolvedAssets:m,isPreviewMode:h}=(0,d.useSelect)((e=>{const t=e(Nr).getSettings();return{resolvedAssets:t.__unstableResolvedAssets,isPreviewMode:t.__unstableIsPreviewMode}}),[]),{styles:g="",scripts:f=""}=m,[b,v]=(0,u.useState)(),[k,_]=(0,u.useState)([]),y=F_(),[E,w,S]=iy(),[C,{height:B}]=(0,p.useResizeObserver)(),I=(0,p.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function o(){const{contentDocument:o,ownerDocument:r}=e,{documentElement:l}=o;t=o,y(l),_(Array.from(r.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),o.dir=r.dir;for(const e of ay||(ay=Array.from(document.styleSheets).reduce(((e,t)=>{try{t.cssRules}catch(t){return e}const{ownerNode:n,cssRules:o}=t;if(null===n)return e;if(!o)return e;if("wp-reset-editor-styles-css"===n.id)return e;if(!n.id)return e;if(function e(t){return Array.from(t).find((({selectorText:t,conditionText:n,cssRules:o})=>n?e(o):t&&(t.includes(".editor-styles-wrapper")||t.includes(".wp-block"))))}(o)){const t="STYLE"===n.tagName;if(t){const t=n.id.replace("-inline-css","-css"),o=document.getElementById(t);o&&e.push(o.cloneNode(!0))}if(e.push(n.cloneNode(!0)),!t){const t=n.id.replace("-css","-inline-css"),o=document.getElementById(t);o&&e.push(o.cloneNode(!0))}}return e}),[]),ay))o.getElementById(e.id)||(o.head.appendChild(e.cloneNode(!0)),h||console.warn(`${e.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,e));t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1)}return e._load=()=>{v(e.contentDocument)},e.addEventListener("load",o),()=>{delete e._load,e.removeEventListener("load",o),t?.removeEventListener("dragover",n),t?.removeEventListener("drop",n)}}),[]),T=(0,p.useDisabled)({isDisabled:!i}),M=(0,p.useMergeRefs)([uy(b),e,y,w,T]),P=`<!doctype html>\n<html>\n\t<head>\n\t\t<meta charset="utf-8">\n\t\t<script>window.frameElement._load()<\/script>\n\t\t<style>html{height:auto!important;min-height:100%;}body{margin:0}</style>\n\t\t${g}\n\t\t${f}\n\t</head>\n\t<body>\n\t\t<script>document.currentScript.parentElement.remove()<\/script>\n\t</body>\n</html>`,[R,N]=(0,u.useMemo)((()=>{const e=URL.createObjectURL(new window.Blob([P],{type:"text/html"}));return[e,()=>URL.revokeObjectURL(e)]}),[P]);(0,u.useEffect)((()=>N),[N]);const L=B*(1-o)/2;return(0,s.createElement)(s.Fragment,null,n>=0&&E,(0,s.createElement)("iframe",{...c,style:{border:0,...c.style,height:l?B:c.style?.height,marginTop:1!==o?-L+r:c.style?.marginTop,marginBottom:1!==o?-L+r:c.style?.marginBottom,transform:1!==o?`scale( ${o} )`:c.style?.transform,transition:"all .3s"},ref:(0,p.useMergeRefs)([a,I]),tabIndex:n,src:R,title:(0,x.__)("Editor canvas"),onKeyDown:e=>{c.onKeyDown?c.onKeyDown(e):e.currentTarget.ownerDocument!==e.target.ownerDocument&&(e.stopPropagation(),cy(e,window.KeyboardEvent,e.currentTarget))}},b&&(0,u.createPortal)((0,s.createElement)("body",{ref:M,className:ml()("block-editor-iframe__body","editor-styles-wrapper",...k)},C,(0,s.createElement)(_l.__experimentalStyleProvider,{document:b},t)),b.documentElement)),n>=0&&S)}const py=(0,u.forwardRef)((function(e,t){return(0,d.useSelect)((e=>e(Nr).getSettings().__internalIsInitialized),[])?(0,s.createElement)(dy,{...e,forwardedRef:t}):null}));var my=n(4529);const hy=my,gy=(my.stringify,my.fromJSON,my.plugin,my.parse,my.list,my.document,my.comment,my.atRule,my.rule,my.decl,my.root,my.CssSyntaxError);my.Declaration,my.Container,my.Processor,my.Document,my.Comment,my.Warning,my.AtRule,my.Result,my.Input,my.Rule,my.Root,my.Node;var fy=n(8036),by=n.n(fy),vy=n(5404),ky=n.n(vy);const _y=new WeakMap;const yy=(e,t="")=>e.map((e=>{if(_y.has(e))return _y.get(e);const n=function({css:e,ignoredSelectors:t=[],baseURL:n},o=""){if(!o&&!n)return e;try{return hy([o&&by()(o,{ignoredSelectors:[...t,o]}),n&&ky()({rootUrl:n})].filter(Boolean)).process(e,{}).css}catch(e){return e instanceof gy?console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",e.message+"\n"+e.showSourceCode(!1)):console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",e),null}}(e,t);return _y.set(e,n),n}));function Ey(e,t){return(0,u.useCallback)((e=>{if(!e)return;const{ownerDocument:n}=e,{defaultView:o,body:r}=n,l=t?n.querySelector(t):r;let i;if(l)i=o?.getComputedStyle(l,null).getPropertyValue("background-color");else{const e=n.createElement("div");e.classList.add("editor-styles-wrapper"),r.appendChild(e),i=o?.getComputedStyle(e,null).getPropertyValue("background-color"),r.removeChild(e)}const s=Vc(i);s.luminance()>.5||0===s.alpha()?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}),[e,t])}function wy({styles:e,scope:t}){const n=(0,d.useSelect)((e=>ie(e(Nr)).getStyleOverrides()),[]),[o,r]=(0,u.useMemo)((()=>{const o=Object.values(null!=e?e:[]);for(const[e,t]of n){const n=o.findIndex((({id:t})=>e===t)),r={...t,id:e};-1===n?o.push(r):o[n]=r}return[yy(o.filter((e=>e?.css)),t),o.filter((e=>"svgs"===e.__unstableType)).map((e=>e.assets)).join("")]}),[e,n,t]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("style",{ref:Ey(o,t)}),o.map(((e,t)=>(0,s.createElement)("style",{key:t},e))),(0,s.createElement)(_l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 0 0",width:"0",height:"0",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"},dangerouslySetInnerHTML:{__html:r}}))}let Sy;Hc([Gc,jc]);const Cy=2e3,xy=[];function By({viewportWidth:e,containerWidth:t,minHeight:n,additionalStyles:o=xy}){e||(e=t);const[r,{height:l}]=(0,p.useResizeObserver)(),{styles:i}=(0,d.useSelect)((e=>({styles:e(Nr).getSettings().styles})),[]),a=(0,u.useMemo)((()=>i?[...i,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...o]:i),[i,o]);Sy=Sy||(0,u.memo)(Xw);const c=t/e,m=l?t/(l*c):0;return(0,s.createElement)(_l.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${c})`,aspectRatio:m,maxHeight:l>Cy?Cy*c:void 0,minHeight:n}},(0,s.createElement)(py,{contentRef:(0,p.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:e,height:l,pointerEvents:"none",maxHeight:Cy,minHeight:0!==c&&c<1&&n?n/c:n}},(0,s.createElement)(wy,{styles:a}),r,(0,s.createElement)(Sy,{renderAppender:!1})))}function Iy(e){const[t,{width:n}]=(0,p.useResizeObserver)();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{style:{position:"relative",width:"100%",height:0}},t),(0,s.createElement)("div",{className:"block-editor-block-preview__container"},!!n&&(0,s.createElement)(By,{...e,containerWidth:n})))}const Ty=(0,u.memo)((function({blocks:e,viewportWidth:t=1200,minHeight:n,additionalStyles:o=[],__experimentalMinHeight:r,__experimentalPadding:l}){r&&(n=r,w()("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),l&&(o=[...o,{css:`body { padding: ${l}px; }`}],w()("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));const i=(0,d.useSelect)((e=>e(Nr).getSettings()),[]),a=(0,u.useMemo)((()=>({...i,focusMode:!1,__unstableIsPreviewMode:!0})),[i]),c=(0,u.useMemo)((()=>Array.isArray(e)?e:[e]),[e]);return e&&0!==e.length?(0,s.createElement)(z_,{value:c,settings:a},(0,s.createElement)(Iy,{viewportWidth:t,minHeight:n,additionalStyles:o})):null}));function My({blocks:e,props:t={},layout:n}){const o=(0,d.useSelect)((e=>e(Nr).getSettings()),[]),r=(0,u.useMemo)((()=>({...o,styles:void 0,focusMode:!1,__unstableIsPreviewMode:!0})),[o]),l=(0,p.useDisabled)(),i=(0,p.useMergeRefs)([t.ref,l]),a=(0,u.useMemo)((()=>Array.isArray(e)?e:[e]),[e]),c=(0,s.createElement)(z_,{value:a,settings:r},(0,s.createElement)(wy,null),(0,s.createElement)(Jw,{renderAppender:!1,layout:n}));return{...t,ref:i,className:ml()(t.className,"block-editor-block-preview__live-content","components-disabled"),children:e?.length?c:null}}const Py=function({item:e}){var t;const{name:n,title:o,icon:r,description:l,initialAttributes:i,example:a}=e,d=(0,c.isReusableBlock)(e),p=(0,u.useMemo)((()=>a?(0,c.getBlockFromExample)(n,{attributes:{...a.attributes,...i},innerBlocks:a.innerBlocks}):(0,c.createBlock)(n,i)),[n,a,i]);return(0,s.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,s.createElement)("div",{className:"block-editor-inserter__preview"},d||a?(0,s.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,s.createElement)(Ty,{blocks:p,viewportWidth:null!==(t=a?.viewportWidth)&&void 0!==t?t:500,additionalStyles:[{css:"body { padding: 24px; }"}]})):(0,s.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,x.__)("No preview available."))),!d&&(0,s.createElement)(P_,{title:o,icon:r,description:l}))},{CompositeItemV2:Ry}=ie(_l.privateApis);const Ny=(0,u.forwardRef)((function({isFirst:e,as:t,children:n,...o},r){return(0,s.createElement)(Ry,{ref:r,role:"option",accessibleWhenDisabled:!0,...o,render:o=>{const r={...o,tabIndex:e?0:o.tabIndex};return t?(0,s.createElement)(t,{...r},n):"function"==typeof n?n(r):(0,s.createElement)(_l.Button,{...r},n)}})})),Ly=(0,s.createElement)(Z.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"}));function Ay({count:e,icon:t,isPattern:n,fadeWhenDisabled:o}){const r=n&&(0,x.__)("Pattern");return(0,s.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,s.createElement)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip"},(0,s.createElement)(_l.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,s.createElement)(_l.FlexItem,null,t?(0,s.createElement)(qh,{icon:t}):r||(0,x.sprintf)((0,x._n)("%d block","%d blocks",e),e)),(0,s.createElement)(_l.FlexItem,null,(0,s.createElement)(qh,{icon:Ly})),o&&(0,s.createElement)(_l.FlexItem,{className:"block-editor-block-draggable-chip__disabled"},(0,s.createElement)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})))))}const Oy=({isEnabled:e,blocks:t,icon:n,children:o,pattern:r})=>{const l={type:"inserter",blocks:t},i=(0,d.useSelect)((e=>{const{getBlockType:n}=e(c.store);return 1===t.length&&n(t[0].name)?.icon}),[t]),{startDragging:a,stopDragging:u}=ie((0,d.useDispatch)(Nr));return(0,s.createElement)(_l.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:l,onDragStart:e=>{a();const n=r?.type===Fn.user&&"unsynced"!==r?.syncStatus?[(0,c.createBlock)("core/block",{ref:r.id})]:t;e.dataTransfer.setData("text/html",(0,c.serialize)(n))},onDragEnd:()=>{u()},__experimentalDragComponent:(0,s.createElement)(Ay,{count:t.length,icon:n||!r&&i,isPattern:!!r})},(({onDraggableStart:t,onDraggableEnd:n})=>o({draggable:e,onDragStart:e?t:void 0,onDragEnd:e?n:void 0})))};const Dy=(0,u.memo)((function({className:e,isFirst:t,item:n,onSelect:o,onHover:r,isDraggable:l,...i}){const a=(0,u.useRef)(!1),d=n.icon?{backgroundColor:n.icon.background,color:n.icon.foreground}:{},p=(0,u.useMemo)((()=>[(0,c.createBlock)(n.name,n.initialAttributes,(0,c.createBlocksFromInnerBlocksTemplate)(n.innerBlocks))]),[n.name,n.initialAttributes,n.innerBlocks]),m=(0,c.isReusableBlock)(n)&&"unsynced"!==n.syncStatus||(0,c.isTemplatePart)(n);return(0,s.createElement)(Oy,{isEnabled:l&&!n.isDisabled,blocks:p,icon:n.icon},(({draggable:l,onDragStart:c,onDragEnd:u})=>(0,s.createElement)("div",{className:ml()("block-editor-block-types-list__list-item",{"is-synced":m}),draggable:l,onDragStart:e=>{a.current=!0,c&&(r(null),c(e))},onDragEnd:e=>{a.current=!1,u&&u(e)}},(0,s.createElement)(Ny,{isFirst:t,className:ml()("block-editor-block-types-list__item",e),disabled:n.isDisabled,onClick:e=>{e.preventDefault(),o(n,(0,zs.isAppleOS)()?e.metaKey:e.ctrlKey),r(null)},onKeyDown:e=>{const{keyCode:t}=e;t===zs.ENTER&&(e.preventDefault(),o(n,(0,zs.isAppleOS)()?e.metaKey:e.ctrlKey),r(null))},onMouseEnter:()=>{a.current||r(n)},onMouseLeave:()=>r(null),...i},(0,s.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:d},(0,s.createElement)(qh,{icon:n.icon,showColors:!0})),(0,s.createElement)("span",{className:"block-editor-block-types-list__item-title"},(0,s.createElement)(_l.__experimentalTruncate,{numberOfLines:3},n.title))))))}));const zy=(0,u.forwardRef)((function(e,t){const[n,o]=(0,u.useState)(!1);return(0,u.useEffect)((()=>{n&&(0,vo.speak)((0,x.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,s.createElement)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{o(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&o(!1)},...e})})),{CompositeGroupV2:Vy}=ie(_l.privateApis);const Fy=(0,u.forwardRef)((function(e,t){return(0,s.createElement)(Vy,{role:"presentation",ref:t,...e})}));const Hy=function e({items:t=[],onSelect:n,onHover:o=(()=>{}),children:r,label:l,isDraggable:i=!0}){const a="block-editor-block-types-list",u=(0,p.useInstanceId)(e,a);return(0,s.createElement)(zy,{className:a,"aria-label":l},function(e,t){const n=[];for(let o=0,r=e.length;o<r;o+=t)n.push(e.slice(o,o+t));return n}(t,3).map(((e,t)=>(0,s.createElement)(Fy,{key:t},e.map(((e,r)=>(0,s.createElement)(Dy,{key:e.id,item:e,className:(0,c.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:o,isDraggable:i&&!e.isDisabled,isFirst:0===t&&0===r,rowId:`${u}-${t}`})))))),r)};const Gy=function({title:e,icon:t,children:n}){return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,s.createElement)("h2",{className:"block-editor-inserter__panel-title"},e),(0,s.createElement)(_l.Icon,{icon:t})),(0,s.createElement)("div",{className:"block-editor-inserter__panel-content"},n))},{CompositeV2:Uy,useCompositeStoreV2:$y}=ie(_l.privateApis);const jy=function({children:e}){const t=$y({focusShift:!0,focusWrap:"horizontal"});return(0,s.createElement)(Uy,{store:t,render:(0,s.createElement)(s.Fragment,null)},e)},Wy=[];const Ky=function({rootClientId:e,onInsert:t,onHover:n,showMostUsedBlocks:o}){const[r,l,i,a]=qg(e,t),c=(0,u.useMemo)((()=>ne(r,"frecency","desc").slice(0,6)),[r]),d=(0,u.useMemo)((()=>r.filter((e=>!e.category))),[r]),m=(0,u.useMemo)((()=>(0,p.pipe)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>e.reduce(((e,t)=>{const{category:n}=t;return e[n]||(e[n]=[]),e[n].push(t),e}),{})))(r)),[r]),h=(0,u.useMemo)((()=>{const e={...i};return Object.keys(i).forEach((t=>{e[t]=r.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[r,i]);(0,u.useEffect)((()=>()=>n(null)),[]);const g=(0,p.useAsyncList)(l),f=l.length===g.length,b=(0,u.useMemo)((()=>Object.entries(i)),[i]),v=(0,p.useAsyncList)(f?b:Wy);return(0,s.createElement)(jy,null,(0,s.createElement)("div",null,o&&!!c.length&&(0,s.createElement)(Gy,{title:(0,x._x)("Most used","blocks")},(0,s.createElement)(Hy,{items:c,onSelect:a,onHover:n,label:(0,x._x)("Most used","blocks")})),g.map((e=>{const t=m[e.slug];return t&&t.length?(0,s.createElement)(Gy,{key:e.slug,title:e.title,icon:e.icon},(0,s.createElement)(Hy,{items:t,onSelect:a,onHover:n,label:e.title})):null})),f&&d.length>0&&(0,s.createElement)(Gy,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,x.__)("Uncategorized")},(0,s.createElement)(Hy,{items:d,onSelect:a,onHover:n,label:(0,x.__)("Uncategorized")})),v.map((([e,t])=>{const o=h[e];return o&&o.length?(0,s.createElement)(Gy,{key:e,title:t.title,icon:t.icon},(0,s.createElement)(Hy,{items:o,onSelect:a,onHover:n,label:t.title})):null}))))};function Zy({selectedCategory:e,patternCategories:t,onClickCategory:n}){const o="block-editor-block-patterns-explorer__sidebar";return(0,s.createElement)("div",{className:`${o}__categories-list`},t.map((({name:t,label:r})=>(0,s.createElement)(_l.Button,{key:t,label:r,className:`${o}__categories-list__item`,isPressed:e===t,onClick:()=>{n(t)}},r))))}function qy({searchValue:e,setSearchValue:t}){return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer__search"},(0,s.createElement)(_l.SearchControl,{__nextHasNoMarginBottom:!0,onChange:t,value:e,label:(0,x.__)("Search for patterns"),placeholder:(0,x.__)("Search")}))}const Yy=function({selectedCategory:e,patternCategories:t,onClickCategory:n,searchValue:o,setSearchValue:r}){return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer__sidebar"},(0,s.createElement)(qy,{searchValue:o,setSearchValue:r}),!o&&(0,s.createElement)(Zy,{selectedCategory:e,patternCategories:t,onClickCategory:n}))};function Xy({currentPage:e,numPages:t,changePage:n,totalItems:o}){return(0,s.createElement)(_l.__experimentalVStack,{className:"block-editor-patterns__grid-pagination-wrapper"},(0,s.createElement)(_l.__experimentalText,{variant:"muted"},(0,x.sprintf)((0,x._n)("%s item","%s items",o),o)),t>1&&(0,s.createElement)(_l.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",className:"block-editor-patterns__grid-pagination"},(0,s.createElement)(_l.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-previous"},(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:()=>n(1),disabled:1===e,"aria-label":(0,x.__)("First page")},(0,s.createElement)("span",null,"«")),(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:()=>n(e-1),disabled:1===e,"aria-label":(0,x.__)("Previous page")},(0,s.createElement)("span",null,"‹"))),(0,s.createElement)(_l.__experimentalText,{variant:"muted"},(0,x.sprintf)((0,x._x)("%1$s of %2$s","paging"),e,t)),(0,s.createElement)(_l.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-next"},(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:()=>n(e+1),disabled:e===t,"aria-label":(0,x.__)("Next page")},(0,s.createElement)("span",null,"›")),(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:()=>n(t),disabled:e===t,"aria-label":(0,x.__)("Last page"),size:"default"},(0,s.createElement)("span",null,"»")))))}const{CompositeV2:Qy,CompositeItemV2:Jy,useCompositeStoreV2:eE}=ie(_l.privateApis),tE=({showTooltip:e,title:t,children:n})=>e?(0,s.createElement)(_l.Tooltip,{text:t},n):(0,s.createElement)(s.Fragment,null,n);function nE({id:e,isDraggable:t,pattern:n,onClick:o,onHover:r,showTooltip:l}){const[i,a]=(0,u.useState)(!1),{blocks:c,viewportWidth:d}=n,m=`block-editor-block-patterns-list__item-description-${(0,p.useInstanceId)(nE)}`;return(0,s.createElement)(Oy,{isEnabled:t,blocks:c,pattern:n},(({draggable:t,onDragStart:u,onDragEnd:p})=>(0,s.createElement)("div",{className:"block-editor-block-patterns-list__list-item",draggable:t,onDragStart:e=>{a(!0),u&&(r?.(null),u(e))},onDragEnd:e=>{a(!1),p&&p(e)}},(0,s.createElement)(tE,{showTooltip:l&&!n.type!==Fn.user,title:n.title},(0,s.createElement)(Jy,{render:(0,s.createElement)("div",{role:"option","aria-label":n.title,"aria-describedby":n.description?m:void 0,className:ml()("block-editor-block-patterns-list__item",{"block-editor-block-patterns-list__list-item-synced":n.type===Fn.user&&!n.syncStatus})}),id:e,onClick:()=>{o(n,c),r?.(null)},onMouseEnter:()=>{i||r?.(n)},onMouseLeave:()=>r?.(null)},(0,s.createElement)(Ty,{blocks:c,viewportWidth:d}),(0,s.createElement)(_l.__experimentalHStack,{className:"block-editor-patterns__pattern-details"},n.type===Fn.user&&!n.syncStatus&&(0,s.createElement)("div",{className:"block-editor-patterns__pattern-icon-wrapper"},(0,s.createElement)(Ti,{className:"block-editor-patterns__pattern-icon",icon:q})),(!l||n.type===Fn.user)&&(0,s.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title)),!!n.description&&(0,s.createElement)(_l.VisuallyHidden,{id:m},n.description))))))}function oE(){return(0,s.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}const rE=(0,u.forwardRef)((function({isDraggable:e,blockPatterns:t,shownPatterns:n,onHover:o,onClickPattern:r,orientation:l,label:i=(0,x.__)("Block patterns"),showTitlesAsTooltip:a,pagingProps:c},d){const p=eE({orientation:l}),{setActiveId:m}=p;return(0,u.useEffect)((()=>{m(void 0)}),[m,n,t]),(0,s.createElement)(Qy,{store:p,role:"listbox",className:"block-editor-block-patterns-list","aria-label":i,ref:d},t.map((t=>n.includes(t)?(0,s.createElement)(nE,{key:t.name,id:t.name,pattern:t,onClick:r,onHover:o,isDraggable:e,showTooltip:a}):(0,s.createElement)(oE,{key:t.name}))),c&&(0,s.createElement)(Xy,{...c}))}));const lE=function({rootClientId:e="",insertionIndex:t,clientId:n,isAppender:o,onSelect:r,shouldFocusBlock:l=!0,selectBlockOnInsert:i=!0}){const{getSelectedBlock:s}=(0,d.useSelect)(Nr),{destinationRootClientId:a,destinationIndex:p}=(0,d.useSelect)((r=>{const{getSelectedBlockClientId:l,getBlockRootClientId:i,getBlockIndex:s,getBlockOrder:a}=r(Nr),c=l();let u,d=e;return void 0!==t?u=t:n?u=s(n):!o&&c?(d=i(c),u=s(c)+1):u=a(d).length,{destinationRootClientId:d,destinationIndex:u}}),[e,t,n,o]),{replaceBlocks:m,insertBlocks:h,showInsertionPoint:g,hideInsertionPoint:f}=(0,d.useDispatch)(Nr),b=(0,u.useCallback)(((e,t,n=!1)=>{const u=s();!o&&u&&(0,c.isUnmodifiedDefaultBlock)(u)?m(u.clientId,e,null,l||n?0:null,t):h(e,p,a,i,l||n?0:null,t);const d=Array.isArray(e)?e.length:1,g=(0,x.sprintf)((0,x._n)("%d block added.","%d blocks added.",d),d);(0,vo.speak)(g),r&&r(e)}),[o,s,m,h,a,p,r,l,i]),v=(0,u.useCallback)((e=>{e?g(a,p):f()}),[g,f,a,p]);return[a,b,v]},iE=(e,t)=>{const{patternCategories:n,patterns:o,userPatternCategories:r}=(0,d.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(Nr),{__experimentalUserPatternCategories:r,__experimentalBlockPatternCategories:l}=o();return{patterns:n(t),userPatternCategories:r,patternCategories:l}}),[t]),l=(0,u.useMemo)((()=>{const e=[...n];return r?.forEach((t=>{e.find((e=>e.name===t.name))||e.push(t)})),e}),[n,r]),{createSuccessNotice:i}=(0,d.useDispatch)(Os.store),s=(0,u.useCallback)(((t,n)=>{const o=t.type===Fn.user&&"unsynced"!==t.syncStatus?[(0,c.createBlock)("core/block",{ref:t.id})]:n;e((null!=o?o:[]).map((e=>(0,c.cloneBlock)(e))),t.name),i((0,x.sprintf)((0,x.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar",id:"block-pattern-inserted-notice"})}),[i,e]);return[o,l,s]},sE=20,aE=5;function cE(e,t,n,o=""){const[r,l]=(0,u.useState)(1),i=(0,p.usePrevious)(t),s=(0,p.usePrevious)(o);i===t&&s===o||1===r||l(1);const a=e.length,c=r-1,d=(0,u.useMemo)((()=>e.slice(c*sE,c*sE+sE)),[c,e]),m=(0,p.useAsyncList)(d,{step:aE}),h=Math.ceil(e.length/sE);return(0,u.useEffect)((function(){const e=(0,As.getScrollContainer)(n?.current);e?.scrollTo(0,0)}),[t,n]),{totalItems:a,categoryPatterns:d,categoryPatternsAsyncList:m,numPages:h,changePage:e=>{const t=(0,As.getScrollContainer)(n?.current);t?.scrollTo(0,0),l(e)},currentPage:r}}function uE({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,s.createElement)(_l.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count"},(0,x.sprintf)((0,x._n)("%d pattern found","%d patterns found",t),t)):null}const dE=function({searchValue:e,selectedCategory:t,patternCategories:n,rootClientId:o}){const r=(0,u.useRef)(),l=(0,p.useDebounce)(vo.speak,500),[i,a]=lE({rootClientId:o,shouldFocusBlock:!0}),[c,,d]=iE(a,i),m=(0,u.useMemo)((()=>n.map((e=>e.name))),[n]),h=(0,u.useMemo)((()=>{const n=c.filter((e=>{if(t===Gn.name)return!0;if(t===Un.name&&e.type===Fn.user)return!0;if("uncategorized"===t){const t=e.categories.some((e=>m.includes(e)));return!e.categories?.length||!t}return e.categories?.includes(t)}));return e?Kg(n,e):n}),[e,c,t,m]);(0,u.useEffect)((()=>{if(!e)return;const t=h.length,n=(0,x.sprintf)((0,x._n)("%d result found.","%d results found.",t),t);l(n)}),[e,l,h.length]);const g=cE(h,t,r),[f,b]=(0,u.useState)(e);e!==f&&(b(e),g.changePage(1));const v=!!h?.length;return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer__list",ref:r},(0,s.createElement)(uE,{filterValue:e,filteredBlockPatternsLength:h.length}),(0,s.createElement)(jy,null,v&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(rE,{shownPatterns:g.categoryPatternsAsyncList,blockPatterns:g.categoryPatterns,onClickPattern:d,isDraggable:!1}),(0,s.createElement)(Xy,{...g}))))};function pE(e,t="all"){const[n,o]=iE(void 0,e),r=(0,u.useMemo)((()=>"all"===t?n:n.filter((e=>!$n(e,t)))),[t,n]),l=(0,u.useMemo)((()=>{const e=o.filter((e=>r.some((t=>t.categories?.includes(e.name))))).sort(((e,t)=>e.label.localeCompare(t.label)));return r.some((e=>!function(e,t){return!(!e.categories||!e.categories.length)&&e.categories.some((e=>t.some((t=>t.name===e))))}(e,o)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,x._x)("Uncategorized")}),r.some((e=>e.type===Fn.user))&&e.unshift(Un),r.length>0&&e.unshift({name:Gn.name,label:Gn.label}),(0,vo.speak)((0,x.sprintf)((0,x._n)("%d category button displayed.","%d category buttons displayed.",e.length),e.length)),e}),[o,r]);return l}function mE({initialCategory:e,rootClientId:t}){const[n,o]=(0,u.useState)(""),[r,l]=(0,u.useState)("all"),[i,a]=(0,u.useState)(e?.name),c=pE(t,r);return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer"},(0,s.createElement)(Yy,{selectedCategory:i,patternCategories:c,onClickCategory:a,searchValue:n,setSearchValue:o,patternSourceFilter:r,setPatternSourceFilter:l}),(0,s.createElement)(dE,{searchValue:n,selectedCategory:i,patternCategories:c,patternSourceFilter:r,rootClientId:t}))}const hE=function({onModalClose:e,...t}){return(0,s.createElement)(_l.Modal,{title:(0,x.__)("Patterns"),onRequestClose:e,isFullScreen:!0},(0,s.createElement)(mE,{...t}))};function gE({title:e}){return(0,s.createElement)(_l.__experimentalVStack,{spacing:0},(0,s.createElement)(_l.__experimentalView,null,(0,s.createElement)(_l.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3},(0,s.createElement)(_l.__experimentalHStack,{spacing:2},(0,s.createElement)(_l.__experimentalNavigatorBackButton,{style:{minWidth:24,padding:0},icon:(0,x.isRTL)()?T_:M_,isSmall:!0,"aria-label":(0,x.__)("Navigate to the previous view")}),(0,s.createElement)(_l.__experimentalSpacer,null,(0,s.createElement)(_l.__experimentalHeading,{level:5},e))))))}function fE({categories:e,children:t}){return(0,s.createElement)(_l.__experimentalNavigatorProvider,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation"},(0,s.createElement)(_l.__experimentalNavigatorScreen,{path:"/"},(0,s.createElement)(_l.__experimentalItemGroup,null,e.map((e=>(0,s.createElement)(_l.__experimentalNavigatorButton,{key:e.name,path:`/category/${e.name}`,as:_l.__experimentalItem,isAction:!0},(0,s.createElement)(_l.__experimentalHStack,null,(0,s.createElement)(_l.FlexBlock,null,e.label),(0,s.createElement)(Ti,{icon:(0,x.isRTL)()?M_:T_}))))))),e.map((e=>(0,s.createElement)(_l.__experimentalNavigatorScreen,{key:e.name,path:`/category/${e.name}`},(0,s.createElement)(gE,{title:(0,x.__)("Back")}),t(e)))))}const bE=e=>"all"!==e,vE=e=>e.name===Un.name;function kE({setPatternSyncFilter:e,setPatternSourceFilter:t,patternSyncFilter:n,patternSourceFilter:o,scrollContainerRef:r,category:l}){const i=l.name===Un.name?Fn.user:o,a=bE(i),c=vE(l),d=(0,u.useMemo)((()=>[{value:"all",label:(0,x._x)("All","patterns")},{value:Hn.full,label:(0,x._x)("Synced","patterns"),disabled:a},{value:Hn.unsynced,label:(0,x._x)("Not synced","patterns"),disabled:a}]),[a]),p=(0,u.useMemo)((()=>[{value:"all",label:(0,x._x)("All","patterns"),disabled:c},{value:Fn.directory,label:(0,x.__)("Pattern Directory"),disabled:c},{value:Fn.theme,label:(0,x.__)("Theme & Plugins"),disabled:c},{value:Fn.user,label:(0,x.__)("User")}]),[c]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.DropdownMenu,{popoverProps:{placement:"right-end"},label:"Filter patterns",icon:(0,s.createElement)(Ti,{icon:(0,s.createElement)(_l.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(_l.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",fill:"#1E1E1E"}))})},(()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.MenuGroup,{label:(0,x.__)("Source")},(0,s.createElement)(_l.MenuItemsChoice,{choices:p,onSelect:n=>{var o;t(o=n),bE(o)&&e("all"),r.current?.scrollTo(0,0)},value:i})),(0,s.createElement)(_l.MenuGroup,{label:(0,x.__)("Type")},(0,s.createElement)(_l.MenuItemsChoice,{choices:d,onSelect:t=>{e(t),r.current?.scrollTo(0,0)},value:n})),(0,s.createElement)("div",{className:"block-editor-tool-selector__help"},(0,u.createInterpolateElement)((0,x.__)("Patterns are available from the <Link>WordPress.org Pattern Directory</Link>, bundled in the active theme, or created by users on this site. Only patterns created on this site can be synced."),{Link:(0,s.createElement)(_l.ExternalLink,{href:(0,x.__)("https://wordpress.org/patterns/")})}))))))}const _E=()=>{};function yE({rootClientId:e,onInsert:t,onHover:n=_E,category:o,showTitlesAsTooltip:r}){const[l,,i]=iE(t,e),[a,c]=(0,u.useState)("all"),[d,p]=(0,u.useState)("all"),m=pE(e,d),h=(0,u.useRef)(),g=(0,u.useMemo)((()=>l.filter((e=>!$n(e,d,a)&&(o.name===Gn.name||(o.name===Un.name&&e.type===Fn.user||("uncategorized"===o.name?!e.categories||!e.categories.some((e=>m.some((t=>t.name===e)))):e.categories?.includes(o.name))))))),[l,m,o.name,d,a]),f=cE(g,o,h),{changePage:b}=f;(0,u.useEffect)((()=>()=>n(null)),[]);const v=(0,u.useCallback)((e=>{c(e),b(1)}),[c,b]),k=(0,u.useCallback)((e=>{p(e),b(1)}),[p,b]);return(0,s.createElement)("div",{className:"block-editor-inserter__patterns-category-panel"},(0,s.createElement)(_l.__experimentalVStack,{spacing:2,className:"block-editor-inserter__patterns-category-panel-header"},(0,s.createElement)(_l.__experimentalHStack,null,(0,s.createElement)(_l.FlexBlock,null,(0,s.createElement)(_l.__experimentalHeading,{level:4,as:"div"},o.label)),(0,s.createElement)(kE,{patternSyncFilter:a,patternSourceFilter:d,setPatternSyncFilter:v,setPatternSourceFilter:k,scrollContainerRef:h,category:o})),!g.length&&(0,s.createElement)(_l.__experimentalText,{variant:"muted",className:"block-editor-inserter__patterns-category-no-results"},(0,x.__)("No results found"))),g.length>0&&(0,s.createElement)(rE,{ref:h,shownPatterns:f.categoryPatternsAsyncList,blockPatterns:f.categoryPatterns,onClickPattern:i,onHover:n,label:o.label,orientation:"vertical",category:o.name,isDraggable:!0,showTitlesAsTooltip:r,patternFilter:d,pagingProps:f}))}const EE=function({onSelectCategory:e,selectedCategory:t,onInsert:n,rootClientId:o}){const[r,l]=(0,u.useState)(!1),i=pE(o),a=t||i[0],c=(0,p.useViewportMatch)("medium","<");return(0,s.createElement)(s.Fragment,null,!c&&(0,s.createElement)("div",{className:"block-editor-inserter__block-patterns-tabs-container"},(0,s.createElement)("nav",{"aria-label":(0,x.__)("Block pattern categories"),className:"block-editor-inserter__block-patterns-tabs"},(0,s.createElement)(_l.__experimentalItemGroup,{role:"list"},i.map((n=>(0,s.createElement)(_l.__experimentalItem,{role:"listitem",key:n.name,onClick:()=>e(n),className:n===t?"block-editor-inserter__patterns-category block-editor-inserter__patterns-selected-category":"block-editor-inserter__patterns-category","aria-label":n.label,"aria-current":n===t?"true":void 0},(0,s.createElement)(_l.__experimentalHStack,null,(0,s.createElement)(_l.FlexBlock,null,n.label),(0,s.createElement)(Ti,{icon:(0,x.isRTL)()?M_:T_}))))),(0,s.createElement)("div",{role:"listitem"},(0,s.createElement)(_l.Button,{className:"block-editor-inserter__patterns-explore-button",onClick:()=>l(!0),variant:"secondary"},(0,x.__)("Explore all patterns")))))),c&&(0,s.createElement)(fE,{categories:i},(e=>(0,s.createElement)(yE,{key:e.name,onInsert:n,rootClientId:o,category:e,showTitlesAsTooltip:!1}))),r&&(0,s.createElement)(hE,{initialCategory:a,patternCategories:i,onModalClose:()=>l(!1),rootClientId:o}))};function wE({rootClientId:e,onInsert:t,onHover:n,category:o,showTitlesAsTooltip:r,patternFilter:l}){const i=(0,u.useRef)();return(0,u.useEffect)((()=>{const e=setTimeout((()=>{const[e]=As.focus.tabbable.find(i.current);e?.focus()}));return()=>clearTimeout(e)}),[o]),(0,s.createElement)("div",{ref:i,className:"block-editor-inserter__patterns-category-dialog"},(0,s.createElement)(yE,{key:o.name,rootClientId:e,onInsert:t,onHover:n,category:o,showTitlesAsTooltip:r,patternFilter:l}))}function SE(e){const[t,n]=(0,u.useState)([]),o=(0,d.useSelect)((e=>ie(e(Nr)).getInserterMediaCategories()),[]),{canInsertImage:r,canInsertVideo:l,canInsertAudio:i}=(0,d.useSelect)((t=>{const{canInsertBlockType:n}=t(Nr);return{canInsertImage:n("core/image",e),canInsertVideo:n("core/video",e),canInsertAudio:n("core/audio",e)}}),[e]);return(0,u.useEffect)((()=>{(async()=>{const e=[];if(!o)return;const t=new Map(await Promise.all(o.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]})))),s={image:r,video:l,audio:i};o.forEach((n=>{s[n.mediaType]&&t.get(n.name)&&e.push(n)})),e.length&&n(e)})()}),[r,l,i,o]),t}const CE=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})),xE={image:"img",video:"video",audio:"audio"};function BE(e,t){const n={id:e.id||void 0,caption:e.caption||void 0},o=e.url,r=e.alt||void 0;"image"===t?(n.url=o,n.alt=r):["video","audio"].includes(t)&&(n.src=o);const l=xE[t],i=(0,s.createElement)(l,{src:e.previewUrl||o,alt:r,controls:"audio"===t||void 0,inert:"true",onError:({currentTarget:t})=>{t.src===e.previewUrl&&(t.src=o)}});return[(0,c.createBlock)(`core/${t}`,n),i]}const IE=["image"],TE=25,ME={position:"bottom left",className:"block-editor-inserter__media-list__item-preview-options__popover"},{CompositeItemV2:PE}=ie(_l.privateApis);function RE({category:e,media:t}){if(!e.getReportUrl)return null;const n=e.getReportUrl(t);return(0,s.createElement)(_l.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,x.__)("Options"),popoverProps:ME,icon:Ef},(()=>(0,s.createElement)(_l.MenuGroup,null,(0,s.createElement)(_l.MenuItem,{onClick:()=>window.open(n,"_blank").focus(),icon:CE},(0,x.sprintf)((0,x.__)("Report %s"),e.mediaType)))))}function NE({onClose:e,onSubmit:t}){return(0,s.createElement)(_l.Modal,{title:(0,x.__)("Insert external image"),onRequestClose:e,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal"},(0,s.createElement)(_l.__experimentalVStack,{spacing:3},(0,s.createElement)("p",null,(0,x.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")),(0,s.createElement)("p",null,(0,x.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation."))),(0,s.createElement)(_l.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,s.createElement)(_l.FlexItem,null,(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:e},(0,x.__)("Cancel"))),(0,s.createElement)(_l.FlexItem,null,(0,s.createElement)(_l.Button,{variant:"primary",onClick:t},(0,x.__)("Insert")))))}function LE({media:e,onClick:t,category:n}){const[o,r]=(0,u.useState)(!1),[l,i]=(0,u.useState)(!1),[a,p]=(0,u.useState)(!1),[m,h]=(0,u.useMemo)((()=>BE(e,n.mediaType)),[e,n.mediaType]),{createErrorNotice:g,createSuccessNotice:f}=(0,d.useDispatch)(Os.store),b=(0,d.useSelect)((e=>e(Nr).getSettings().mediaUpload),[]),v=(0,u.useCallback)((e=>{if(a)return;const n=(0,c.cloneBlock)(e),{id:o,url:l,caption:i}=n.attributes;o?t(n):(p(!0),window.fetch(l).then((e=>e.blob())).then((e=>{b({filesList:[e],additionalData:{caption:i},onFileChange([e]){(0,Ls.isBlobURL)(e.url)||(t({...n,attributes:{...n.attributes,id:e.id,url:e.url}}),f((0,x.__)("Image uploaded and inserted."),{type:"snackbar"}),p(!1))},allowedTypes:IE,onError(e){g(e,{type:"snackbar"}),p(!1)}})})).catch((()=>{r(!0),p(!1)})))}),[a,t,b,g,f]),k="string"==typeof e.title?e.title:e.title?.rendered||(0,x.__)("no title");let _;if(k.length>TE){const e="...";_=k.slice(0,TE-e.length)+e}const y=(0,u.useCallback)((()=>i(!0)),[]),E=(0,u.useCallback)((()=>i(!1)),[]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Oy,{isEnabled:!0,blocks:[m]},(({draggable:t,onDragStart:o,onDragEnd:r})=>(0,s.createElement)("div",{className:ml()("block-editor-inserter__media-list__list-item",{"is-hovered":l}),draggable:t,onDragStart:o,onDragEnd:r},(0,s.createElement)("div",{onMouseEnter:y,onMouseLeave:E},(0,s.createElement)(_l.Tooltip,{text:_||k},(0,s.createElement)(PE,{render:(0,s.createElement)("div",{"aria-label":k,role:"option",className:"block-editor-inserter__media-list__item"}),onClick:()=>v(m)},(0,s.createElement)("div",{className:"block-editor-inserter__media-list__item-preview"},h,a&&(0,s.createElement)("div",{className:"block-editor-inserter__media-list__item-preview-spinner"},(0,s.createElement)(_l.Spinner,null))))),!a&&(0,s.createElement)(RE,{category:n,media:e}))))),o&&(0,s.createElement)(NE,{onClose:()=>r(!1),onSubmit:()=>{t((0,c.cloneBlock)(m)),f((0,x.__)("Image inserted."),{type:"snackbar"}),r(!1)}}))}const{CompositeV2:AE,useCompositeStoreV2:OE}=ie(_l.privateApis);const DE=function({mediaList:e,category:t,onClick:n,label:o=(0,x.__)("Media List")}){const r=OE();return(0,s.createElement)(AE,{store:r,role:"listbox",className:"block-editor-inserter__media-list","aria-label":o},e.map(((e,o)=>(0,s.createElement)(LE,{key:e.id||e.sourceId||o,media:e,category:t,onClick:n}))))};const zE=function(){return(0,s.createElement)("div",{className:"block-editor-inserter__no-results"},(0,s.createElement)(Ti,{className:"block-editor-inserter__no-results-icon",icon:Zh}),(0,s.createElement)("p",null,(0,x.__)("No results found.")))},VE=10;function FE({rootClientId:e,onInsert:t,category:n}){const o=(0,u.useRef)();return(0,u.useEffect)((()=>{const e=setTimeout((()=>{const[e]=As.focus.tabbable.find(o.current);e?.focus()}));return()=>clearTimeout(e)}),[n]),(0,s.createElement)("div",{ref:o,className:"block-editor-inserter__media-dialog"},(0,s.createElement)(HE,{rootClientId:e,onInsert:t,category:n}))}function HE({rootClientId:e,onInsert:t,category:n}){const[o,r,l]=(0,p.useDebouncedInput)(),{mediaList:i,isLoading:a}=function(e,t={}){const[n,o]=(0,u.useState)(),[r,l]=(0,u.useState)(!1),i=(0,u.useRef)();return(0,u.useEffect)((()=>{(async()=>{const n=JSON.stringify({category:e.name,...t});i.current=n,l(!0),o([]);const r=await(e.fetch?.(t));n===i.current&&(o(r),l(!1))})()}),[e.name,...Object.values(t)]),{mediaList:n,isLoading:r}}(n,{per_page:l?20:VE,search:l}),c="block-editor-inserter__media-panel",d=n.labels.search_items||(0,x.__)("Search");return(0,s.createElement)("div",{className:c},(0,s.createElement)(_l.SearchControl,{className:`${c}-search`,onChange:r,value:o,label:d,placeholder:d}),a&&(0,s.createElement)("div",{className:`${c}-spinner`},(0,s.createElement)(_l.Spinner,null)),!a&&!i?.length&&(0,s.createElement)(zE,null),!a&&!!i?.length&&(0,s.createElement)(DE,{rootClientId:e,onClick:t,mediaList:i,category:n}))}const GE=["image","video","audio"];const UE=function({rootClientId:e,selectedCategory:t,onSelectCategory:n,onInsert:o}){const r=SE(e),l=(0,p.useViewportMatch)("medium","<"),i="block-editor-inserter__media-tabs",a=(0,u.useCallback)((e=>{if(!e?.url)return;const[t]=BE(e,e.type);o(t)}),[o]),c=(0,u.useMemo)((()=>r.map((e=>({...e,label:e.labels.name})))),[r]);return(0,s.createElement)(s.Fragment,null,!l&&(0,s.createElement)("div",{className:`${i}-container`},(0,s.createElement)("nav",{"aria-label":(0,x.__)("Media categories")},(0,s.createElement)(_l.__experimentalItemGroup,{role:"list",className:i},r.map((e=>(0,s.createElement)(_l.__experimentalItem,{role:"listitem",key:e.name,onClick:()=>n(e),className:ml()(`${i}__media-category`,{"is-selected":t===e}),"aria-label":e.labels.name,"aria-current":e===t?"true":void 0},(0,s.createElement)(_l.__experimentalHStack,null,(0,s.createElement)(_l.FlexBlock,null,e.labels.name),(0,s.createElement)(Ti,{icon:(0,x.isRTL)()?M_:T_}))))),(0,s.createElement)("div",{role:"listitem"},(0,s.createElement)(Us,null,(0,s.createElement)(Gs,{multiple:!1,onSelect:a,allowedTypes:GE,render:({open:e})=>(0,s.createElement)(_l.Button,{onClick:t=>{t.target.focus(),e()},className:"block-editor-inserter__media-library-button",variant:"secondary","data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal"},(0,x.__)("Open Media Library"))})))))),l&&(0,s.createElement)(fE,{categories:c},(t=>(0,s.createElement)(HE,{onInsert:o,rootClientId:e,category:t}))))},{Fill:$E,Slot:jE}=(0,_l.createSlotFill)("__unstableInserterMenuExtension");$E.Slot=jE;const WE=$E,KE=[];const ZE=function({filterValue:e,onSelect:t,onHover:n,onHoverPattern:o,rootClientId:r,clientId:l,isAppender:i,__experimentalInsertionIndex:a,maxBlockPatterns:c,maxBlockTypes:m,showBlockDirectory:h=!1,isDraggable:g=!0,shouldFocusBlock:f=!0,prioritizePatterns:b,selectBlockOnInsert:v}){const k=(0,p.useDebounce)(vo.speak,500),{prioritizedBlocks:_}=(0,d.useSelect)((e=>{const t=e(Nr).getBlockListSettings(r);return{prioritizedBlocks:t?.prioritizedInserterBlocks||KE}}),[r]),[y,E]=lE({onSelect:t,rootClientId:r,clientId:l,isAppender:i,insertionIndex:a,shouldFocusBlock:f,selectBlockOnInsert:v}),[w,S,C,B]=qg(y,E),[I,,T]=iE(E,y),M=(0,u.useMemo)((()=>{if(0===c)return[];const t=Kg(I,e);return void 0!==c?t.slice(0,c):t}),[e,I,c]);let P=m;b&&M.length>2&&(P=0);const R=(0,u.useMemo)((()=>{if(0===P)return[];let t=ne(w.filter((e=>"core/block"!==e.name)),"frecency","desc");!e&&_.length&&(t=Yg(t,_));const n=Wg(t,S,C,e);return void 0!==P?n.slice(0,P):n}),[e,w,S,C,P,_]);(0,u.useEffect)((()=>{if(!e)return;const t=R.length+M.length,n=(0,x.sprintf)((0,x._n)("%d result found.","%d results found.",t),t);k(n)}),[e,k,R,M]);const N=(0,p.useAsyncList)(R,{step:9}),L=(0,p.useAsyncList)(N.length===R.length?M:KE),A=R.length>0||M.length>0,O=!!R.length&&(0,s.createElement)(Gy,{title:(0,s.createElement)(_l.VisuallyHidden,null,(0,x.__)("Blocks"))},(0,s.createElement)(Hy,{items:N,onSelect:B,onHover:n,label:(0,x.__)("Blocks"),isDraggable:g})),D=!!M.length&&(0,s.createElement)(Gy,{title:(0,s.createElement)(_l.VisuallyHidden,null,(0,x.__)("Block patterns"))},(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,s.createElement)(rE,{shownPatterns:L,blockPatterns:M,onClickPattern:T,onHover:o,isDraggable:g})));return(0,s.createElement)(jy,null,!h&&!A&&(0,s.createElement)(zE,null),b?D:O,!!R.length&&!!M.length&&(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),b?O:D,h&&(0,s.createElement)(WE.Slot,{fillProps:{onSelect:B,onHover:n,filterValue:e,hasItems:A,rootClientId:y}},(e=>e.length?e:A?null:(0,s.createElement)(zE,null))))},{Tabs:qE}=ie(_l.privateApis),YE={name:"blocks",title:(0,x.__)("Blocks")},XE={name:"patterns",title:(0,x.__)("Patterns")},QE={name:"media",title:(0,x.__)("Media")};const JE=function({showPatterns:e=!1,showMedia:t=!1,onSelect:n,tabsContents:o}){const r=[YE,e&&XE,t&&QE].filter(Boolean);return(0,s.createElement)("div",{className:"block-editor-inserter__tabs"},(0,s.createElement)(qE,{onSelect:n},(0,s.createElement)(qE.TabList,null,r.map((e=>(0,s.createElement)(qE.Tab,{key:e.name,tabId:e.name},e.title)))),r.map((e=>(0,s.createElement)(qE.TabPanel,{key:e.name,tabId:e.name,focusable:!1},o[e.name])))))};const ew=(0,u.forwardRef)((function({rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,onSelect:r,showInserterHelpPanel:l,showMostUsedBlocks:i,__experimentalFilterValue:a="",shouldFocusBlock:c=!0},m){const[h,g,f]=(0,p.useDebouncedInput)(a),[b,v]=(0,u.useState)(null),[k,_]=(0,u.useState)(null),[y,E]=(0,u.useState)("all"),[w,S]=(0,u.useState)(null),[C,B]=(0,u.useState)(null),[I,T,M]=lE({rootClientId:e,clientId:t,isAppender:n,insertionIndex:o,shouldFocusBlock:c}),{showPatterns:P}=(0,d.useSelect)((e=>{const{hasAllowedPatterns:t}=ie(e(Nr));return{showPatterns:t(I)}}),[I]),R=SE(I).length>0,N=(0,u.useCallback)(((e,t,n)=>{T(e,t,n),r()}),[T,r]),L=(0,u.useCallback)(((e,t)=>{T(e,{patternName:t}),r()}),[T,r]),A=(0,u.useCallback)((e=>{M(!!e),v(e)}),[M,v]),O=(0,u.useCallback)((e=>{M(!!e)}),[M]),D=(0,u.useCallback)(((e,t)=>{_(e),E(t)}),[_]),z=(0,u.useMemo)((()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-inserter__block-list"},(0,s.createElement)(Ky,{rootClientId:I,onInsert:N,onHover:A,showMostUsedBlocks:i})),l&&(0,s.createElement)("div",{className:"block-editor-inserter__tips"},(0,s.createElement)(_l.VisuallyHidden,{as:"h2"},(0,x.__)("A tip for using the block editor")),(0,s.createElement)(I_,null)))),[I,N,A,i,l]),V=(0,u.useMemo)((()=>(0,s.createElement)(EE,{rootClientId:I,onInsert:L,onSelectCategory:D,selectedCategory:k})),[I,L,D,k]),F=(0,u.useMemo)((()=>(0,s.createElement)(UE,{rootClientId:I,selectedCategory:w,onSelectCategory:S,onInsert:N})),[I,N,w,S]),H=(0,u.useMemo)((()=>({blocks:z,patterns:V,media:F})),[z,F,V]),G=(0,u.useRef)();(0,u.useImperativeHandle)(m,(()=>({focusSearch:()=>{G.current.focus()}})));const U="patterns"===C&&!f&&k,$=!f&&(P||R),j="media"===C&&!f&&w;return(0,s.createElement)("div",{className:"block-editor-inserter__menu"},(0,s.createElement)("div",{className:ml()("block-editor-inserter__main-area",{"show-as-tabs":$})},(0,s.createElement)(_l.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",onChange:e=>{b&&v(null),g(e)},value:h,label:(0,x.__)("Search for blocks and patterns"),placeholder:(0,x.__)("Search"),ref:G}),!!f&&(0,s.createElement)("div",{className:"block-editor-inserter__no-tab-container"},(0,s.createElement)(ZE,{filterValue:f,onSelect:r,onHover:A,onHoverPattern:O,rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,showBlockDirectory:!0,shouldFocusBlock:c})),$&&(0,s.createElement)(JE,{showPatterns:P,showMedia:R,onSelect:e=>{"patterns"!==e&&_(null),B(e)},tabsContents:H}),!f&&!$&&(0,s.createElement)("div",{className:"block-editor-inserter__no-tab-container"},z)),j&&(0,s.createElement)(FE,{rootClientId:I,onInsert:N,category:w}),l&&b&&(0,s.createElement)(_l.Popover,{className:"block-editor-inserter__preview-container__popover",placement:"right-start",offset:16,focusOnMount:!1,animate:!1},(0,s.createElement)(Py,{item:b})),U&&(0,s.createElement)(wE,{rootClientId:I,onInsert:L,onHover:O,category:k,patternFilter:y,showTitlesAsTooltip:!0}))}));function tw({onSelect:e,rootClientId:t,clientId:n,isAppender:o,prioritizePatterns:r,selectBlockOnInsert:l,hasSearch:i=!0}){const[a,c]=(0,u.useState)(""),[p,m]=lE({onSelect:e,rootClientId:t,clientId:n,isAppender:o,selectBlockOnInsert:l}),[h]=qg(p,m),[g]=iE(m,p),{setInserterIsOpened:f,insertionIndex:b}=(0,d.useSelect)((e=>{const{getSettings:t,getBlockIndex:o,getBlockCount:r}=e(Nr),l=t(),i=o(n),s=r();return{setInserterIsOpened:l.__experimentalSetIsInserterOpened,insertionIndex:-1===i?s:i}}),[n]),v=g.length&&(!!a||r),k=i&&(v&&g.length>6||h.length>6);(0,u.useEffect)((()=>{f&&f(!1)}),[f]);let _=0;return v&&(_=r?4:2),(0,s.createElement)("div",{className:ml()("block-editor-inserter__quick-inserter",{"has-search":k,"has-expand":f})},k&&(0,s.createElement)(_l.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",value:a,onChange:e=>{c(e)},label:(0,x.__)("Search for blocks and patterns"),placeholder:(0,x.__)("Search")}),(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,s.createElement)(ZE,{filterValue:a,onSelect:e,rootClientId:t,clientId:n,isAppender:o,maxBlockPatterns:_,maxBlockTypes:6,isDraggable:!1,prioritizePatterns:r,selectBlockOnInsert:l})),f&&(0,s.createElement)(_l.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{f({rootClientId:t,insertionIndex:b,filterValue:a})},"aria-label":(0,x.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,x.__)("Browse all")))}const nw=({onToggle:e,disabled:t,isOpen:n,blockTitle:o,hasSingleBlockType:r,toggleProps:l={},prioritizePatterns:i})=>{const{as:a=_l.Button,label:c,onClick:u,...d}=l;let p=c;return!p&&r?p=(0,x.sprintf)((0,x._x)("Add %s","directly add the only allowed block"),o):!p&&i?p=(0,x.__)("Add pattern"):p||(p=(0,x._x)("Add block","Generic label for block inserter button")),(0,s.createElement)(a,{icon:na,label:p,tooltipPosition:"bottom",onClick:function(t){e&&e(t),u&&u(t)},className:"block-editor-inserter__toggle","aria-haspopup":!r&&"true","aria-expanded":!r&&n,disabled:t,...d})};class ow 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({onToggle:e,isOpen:t}){const{disabled:n,blockTitle:o,hasSingleBlockType:r,directInsertBlock:l,toggleProps:i,hasItems:s,renderToggle:a=nw,prioritizePatterns:c}=this.props;return a({onToggle:e,isOpen:t,disabled:n||!s,blockTitle:o,hasSingleBlockType:r,directInsertBlock:l,toggleProps:i,prioritizePatterns:c})}renderContent({onClose:e}){const{rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r,__experimentalIsQuick:l,prioritizePatterns:i,onSelectOrClose:a,selectBlockOnInsert:c}=this.props;return l?(0,s.createElement)(tw,{onSelect:t=>{const n=Array.isArray(t)&&t?.length?t[0]:t;a&&"function"==typeof a&&a(n),e()},rootClientId:t,clientId:n,isAppender:o,prioritizePatterns:i,selectBlockOnInsert:c}):(0,s.createElement)(ew,{onSelect:()=>{e()},rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:o,__experimentalIsQuick:r,onSelectOrClose:l}=this.props;return t||n?this.renderToggle({onToggle:o}):(0,s.createElement)(_l.Dropdown,{className:"block-editor-inserter",contentClassName:ml()("block-editor-inserter__popover",{"is-quick":r}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,x.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:l})}}const rw=(0,p.compose)([(0,d.withSelect)(((e,{clientId:t,rootClientId:n,shouldDirectInsert:o=!0})=>{const{getBlockRootClientId:r,hasInserterItems:l,getAllowedBlocks:i,getDirectInsertBlock:s,getSettings:a}=e(Nr),{getBlockVariations:u}=e(c.store),d=i(n=n||r(t)||void 0),p=o&&s(n),m=a(),h=1===d?.length&&0===u(d[0].name,"inserter")?.length;let g=!1;return h&&(g=d[0]),{hasItems:l(n),hasSingleBlockType:h,blockTitle:g?g.title:"",allowedBlockType:g,directInsertBlock:p,rootClientId:n,prioritizePatterns:m.__experimentalPreferPatternsOnRoot&&!n}})),(0,d.withDispatch)(((e,t,{select:n})=>({insertOnlyAllowedBlock(){const{rootClientId:o,clientId:r,isAppender:l,hasSingleBlockType:i,allowedBlockType:s,directInsertBlock:a,onSelectOrClose:u,selectBlockOnInsert:d}=t;if(!i&&!a)return;const{insertBlock:p}=e(Nr);let m;if(a){const e=function(e){const{getBlock:t,getPreviousBlockClientId:l}=n(Nr);if(!e||!r&&!o)return{};const i={};let s={};if(r){const e=t(r),n=t(l(r));e?.name===n?.name&&(s=n?.attributes||{})}else{const e=t(o);if(e?.innerBlocks?.length){const t=e.innerBlocks[e.innerBlocks.length-1];a&&a?.name===t.name&&(s=t.attributes)}}return e.forEach((e=>{s.hasOwnProperty(e)&&(i[e]=s[e])})),i}(a.attributesToCopy);m=(0,c.createBlock)(a.name,{...a.attributes||{},...e})}else m=(0,c.createBlock)(s.name);p(m,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:i,getBlockRootClientId:s}=n(Nr);if(r)return e(r);const a=t();return!l&&a&&s(a)===o?e(a)+1:i(o).length}(),o,d),u&&u({clientId:m?.clientId});const h=(0,x.sprintf)((0,x.__)("%s block added"),s.title);(0,vo.speak)(h)}}))),(0,p.ifCondition)((({hasItems:e,isAppender:t,rootClientId:n,clientId:o})=>e||!t&&!n&&!o))])(ow),lw=(0,u.forwardRef)(((e,t)=>(0,s.createElement)(rw,{ref:t,...e}))),iw="\ufeff";function sw({rootClientId:e}){const{showPrompt:t,isLocked:n,placeholder:o}=(0,d.useSelect)((t=>{const{getBlockCount:n,getSettings:o,getTemplateLock:r}=t(Nr),l=!n(e),{bodyPlaceholder:i}=o();return{showPrompt:l,isLocked:!!r(e),placeholder:i}}),[e]),{insertDefaultBlock:r,startTyping:l}=(0,d.useDispatch)(Nr);if(n)return null;const i=(0,x_.decodeEntities)(o)||(0,x.__)("Type / to choose a block"),a=()=>{r(void 0,e),l()};return(0,s.createElement)("div",{"data-root-client-id":e||"",className:ml()("block-editor-default-block-appender",{"has-visible-prompt":t})},(0,s.createElement)("p",{tabIndex:"0",role:"button","aria-label":(0,x.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{zs.ENTER!==e.keyCode&&zs.SPACE!==e.keyCode||a()},onClick:()=>a(),onFocus:()=>{t&&a()}},t?i:iw),(0,s.createElement)(lw,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}function aw({rootClientId:e,className:t,onFocus:n,tabIndex:o},r){return(0,s.createElement)(lw,{position:"bottom center",rootClientId:e,__experimentalIsQuick:!0,renderToggle:({onToggle:e,disabled:l,isOpen:i,blockTitle:a,hasSingleBlockType:c})=>{let u;u=c?(0,x.sprintf)((0,x._x)("Add %s","directly add the only allowed block"),a):(0,x._x)("Add block","Generic label for block inserter button");const d=!c;let p=(0,s.createElement)(_l.Button,{ref:r,onFocus:n,tabIndex:o,className:ml()(t,"block-editor-button-block-appender"),onClick:e,"aria-haspopup":d?"true":void 0,"aria-expanded":d?i:void 0,disabled:l,label:u},!c&&(0,s.createElement)(_l.VisuallyHidden,{as:"span"},u),(0,s.createElement)(Ti,{icon:na}));return(d||c)&&(p=(0,s.createElement)(_l.Tooltip,{text:u},p)),p},isAppender:!0})}const cw=(0,u.forwardRef)(((e,t)=>(w()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),aw(e,t)))),uw=(0,u.forwardRef)(aw);function dw({rootClientId:e}){return(0,d.useSelect)((t=>t(Nr).canInsertBlockType((0,c.getDefaultBlockName)(),e)))?(0,s.createElement)(sw,{rootClientId:e}):(0,s.createElement)(uw,{rootClientId:e,className:"block-list-appender__toggle"})}function pw({rootClientId:e,CustomAppender:t,className:n,tagName:o="div"}){const r=(0,d.useSelect)((t=>{const{getBlockInsertionPoint:n,isBlockInsertionPointVisible:o,getBlockCount:r}=t(Nr),l=n();return o()&&e===l?.rootClientId&&0===r(e)}),[e]);return(0,s.createElement)(o,{tabIndex:-1,className:ml()("block-list-appender wp-block",n,{"is-drag-over":r}),contentEditable:!1,"data-block":!0},t?(0,s.createElement)(t,null):(0,s.createElement)(dw,{rootClientId:e}))}const mw=Number.MAX_SAFE_INTEGER;(0,u.createContext)();const hw=function({previousClientId:e,nextClientId:t,children:n,__unstablePopoverSlot:o,__unstableContentRef:r,operation:l="insert",nearestSide:i="right",...a}){const[c,p]=(0,u.useReducer)((e=>(e+1)%mw),0),{orientation:m,rootClientId:h,isVisible:g}=(0,d.useSelect)((n=>{const{getBlockListSettings:o,getBlockRootClientId:r,isBlockVisible:l}=n(Nr),i=r(null!=e?e:t);return{orientation:o(i)?.orientation||"vertical",rootClientId:i,isVisible:l(e)&&l(t)}}),[e,t]),f=bd(e),b=bd(t),v="vertical"===m,k=(0,u.useMemo)((()=>{if(c<0||!f&&!b||!g)return;return{contextElement:"group"===l?b||f:f||b,getBoundingClientRect(){const e=f?f.getBoundingClientRect():null,t=b?b.getBoundingClientRect():null;let n=0,o=0,r=0,s=0;if("group"===l){const l=t||e;o=l.top,r=0,s=l.bottom-l.top,n="left"===i?l.left-2:l.right-2}else v?(o=e?e.bottom:t.top,r=e?e.width:t.width,s=t&&e?t.top-e.bottom:0,n=e?e.left:t.left):(o=e?e.top:t.top,s=e?e.height:t.height,(0,x.isRTL)()?(n=t?t.right:e.left,r=e&&t?e.left-t.right:0):(n=e?e.right:t.left,r=e&&t?t.left-e.right:0));return new window.DOMRect(n,o,r,s)}}}),[f,b,c,v,g,l,i]),_=hm(r);return(0,u.useLayoutEffect)((()=>{if(!f)return;const e=new window.MutationObserver(p);return e.observe(f,{attributes:!0}),()=>{e.disconnect()}}),[f]),(0,u.useLayoutEffect)((()=>{if(!b)return;const e=new window.MutationObserver(p);return e.observe(b,{attributes:!0}),()=>{e.disconnect()}}),[b]),(0,u.useLayoutEffect)((()=>{if(f)return f.ownerDocument.defaultView.addEventListener("resize",p),()=>{f.ownerDocument.defaultView?.removeEventListener("resize",p)}}),[f]),(f||b)&&g?(0,s.createElement)(_l.Popover,{ref:_,animate:!1,anchor:k,focusOnMount:!1,__unstableSlotName:o,inline:!o,key:t+"--"+h,...a,className:ml()("block-editor-block-popover","block-editor-block-popover__inbetween",a.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled"},(0,s.createElement)("div",{className:"block-editor-block-popover__inbetween-container"},n)):null},gw={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};const fw=function({__unstablePopoverSlot:e,__unstableContentRef:t}){const{clientId:n}=(0,d.useSelect)((e=>{const{getBlockOrder:t,getBlockInsertionPoint:n}=e(Nr),o=n(),r=t(o.rootClientId);return r.length?{clientId:r[o.index]}:{}}),[]),o=(0,p.useReducedMotion)();return(0,s.createElement)(fm,{clientId:n,__unstableCoverTarget:!0,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone"},(0,s.createElement)(_l.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:o?gw.show:gw.hide,animate:gw.show,exit:o?gw.show:gw.exit,className:"block-editor-block-popover__drop-zone-foreground"}))},bw=(0,u.createContext)();function vw({__unstablePopoverSlot:e,__unstableContentRef:t,operation:n="insert",nearestSide:o="right"}){const{selectBlock:r,hideInsertionPoint:l}=(0,d.useDispatch)(Nr),i=(0,u.useContext)(bw),a=(0,u.useRef)(),{orientation:c,previousClientId:m,nextClientId:h,rootClientId:g,isInserterShown:f,isDistractionFree:b,isNavigationMode:v}=(0,d.useSelect)((e=>{const{getBlockOrder:t,getBlockListSettings:n,getBlockInsertionPoint:o,isBlockBeingDragged:r,getPreviousBlockClientId:l,getNextBlockClientId:i,getSettings:s,isNavigationMode:a}=e(Nr),c=o(),u=t(c.rootClientId);if(!u.length)return{};let d=u[c.index-1],p=u[c.index];for(;r(d);)d=l(d);for(;r(p);)p=i(p);const m=s();return{previousClientId:d,nextClientId:p,orientation:n(c.rootClientId)?.orientation||"vertical",rootClientId:c.rootClientId,isNavigationMode:a(),isDistractionFree:m.isDistractionFree,isInserterShown:c?.__unstableWithInserter}}),[]),{getBlockEditingMode:k}=(0,d.useSelect)(Nr),_=(0,p.useReducedMotion)();const y={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:f?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},E={start:{scale:_?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(b&&!v)return null;const w="horizontal"===c||"group"===n?"is-horizontal":"is-vertical",S=ml()("block-editor-block-list__insertion-point",w);return(0,s.createElement)(hw,{previousClientId:m,nextClientId:h,__unstablePopoverSlot:e,__unstableContentRef:t,operation:n,nearestSide:o},(0,s.createElement)(_l.__unstableMotion.div,{layout:!_,initial:_?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:a,tabIndex:-1,onClick:function(e){e.target===a.current&&h&&"disabled"!==k(h)&&r(h,-1)},onFocus:function(e){e.target!==a.current&&(i.current=!0)},className:ml()(S,{"is-with-inserter":f}),onHoverEnd:function(e){e.target!==a.current||i.current||l()}},(0,s.createElement)(_l.__unstableMotion.div,{variants:y,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),f&&(0,s.createElement)(_l.__unstableMotion.div,{variants:E,className:ml()("block-editor-block-list__insertion-point-inserter")},(0,s.createElement)(lw,{position:"bottom center",clientId:h,rootClientId:g,__experimentalIsQuick:!0,onToggle:e=>{i.current=e},onSelectOrClose:()=>{i.current=!1}}))))}function kw(e){const{insertionPoint:t,isVisible:n,isBlockListEmpty:o}=(0,d.useSelect)((e=>{const{getBlockInsertionPoint:t,isBlockInsertionPointVisible:n,getBlockCount:o}=e(Nr),r=t();return{insertionPoint:r,isVisible:n(),isBlockListEmpty:0===o(r?.rootClientId)}}),[]);return!n||o?null:"replace"===t.operation?(0,s.createElement)(fw,{key:`${t.rootClientId}-${t.index}`,...e}):(0,s.createElement)(vw,{operation:t.operation,nearestSide:t.nearestSide,...e})}function _w(){const e=(0,u.useContext)(bw),t=(0,d.useSelect)((e=>e(Nr).getSettings().isDistractionFree||"zoom-out"===e(Nr).__unstableGetEditorMode()),[]),{getBlockListSettings:n,getBlockIndex:o,isMultiSelecting:r,getSelectedBlockClientIds:l,getTemplateLock:i,__unstableIsWithinBlockOverlay:s,getBlockEditingMode:a,getBlockName:c}=(0,d.useSelect)(Nr),{showInsertionPoint:m,hideInsertionPoint:h}=(0,d.useDispatch)(Nr);return(0,p.useRefEffect)((u=>{if(!t)return u.addEventListener("mousemove",d),()=>{u.removeEventListener("mousemove",d)};function d(t){if(e.current)return;if(t.target.nodeType===t.target.TEXT_NODE)return;if(r())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void h();let u;if(!t.target.classList.contains("is-root-container")){u=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")}if(i(u)||"disabled"===a(u)||"core/block"===c(u))return;const d=n(u)?.orientation||"vertical",p=t.clientY,g=t.clientX;let f=Array.from(t.target.children).find((e=>{const t=e.getBoundingClientRect();return e.classList.contains("wp-block")&&"vertical"===d&&t.top>p||e.classList.contains("wp-block")&&"horizontal"===d&&((0,x.isRTL)()?t.right<g:t.left>g)}));if(!f)return void h();if(!f.id&&(f=f.firstElementChild,!f))return void h();const b=f.id.slice(6);if(!b||s(b))return;if(l().includes(b))return;const v=f.getBoundingClientRect();if("horizontal"===d&&(t.clientY>v.bottom||t.clientY<v.top)||"vertical"===d&&(t.clientX>v.right||t.clientX<v.left))return void h();const k=o(b);0!==k?m(u,k,{__unstableWithInserter:!0}):h()}}),[e,n,o,r,m,h,l,t])}const yw=(0,p.createHigherOrderComponent)((e=>t=>{const{clientId:n}=y();return(0,s.createElement)(e,{...t,clientId:n})}),"withClientId"),Ew=yw((({clientId:e,showSeparator:t,isFloating:n,onAddBlock:o,isToggle:r})=>(0,s.createElement)(uw,{className:ml()({"block-list-appender__toggle":r}),rootClientId:e,showSeparator:t,isFloating:n,onAddBlock:o}))),ww=(0,p.compose)([yw,(0,d.withSelect)(((e,{clientId:t})=>{const{getBlockOrder:n}=e(Nr),o=n(t);return{lastBlockClientId:o[o.length-1]}}))])((({clientId:e})=>(0,s.createElement)(sw,{rootClientId:e}))),Sw=new WeakMap;function Cw(e,t,n,o,r,l,i,s,a,c,p,m){const{updateBlockListSettings:h}=(0,d.useDispatch)(Nr),g=(0,d.useRegistry)(),f=function(e){const[t,n]=(0,u.useState)(e);return js()(t,e)||n(e),t}(n),b=(0,u.useMemo)((()=>o),o),v=void 0===a||"contentOnly"===t?t:a;(0,u.useLayoutEffect)((()=>{const t={allowedBlocks:f,prioritizedInserterBlocks:b,templateLock:v};if(void 0!==c&&(t.__experimentalCaptureToolbars=c),void 0!==p)t.orientation=p;else{const e=Vi(m?.type);t.orientation=e.getOrientation(m)}void 0!==i&&(w()("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),t.defaultBlock=i),void 0!==r&&(t.defaultBlock=r),void 0!==s&&(w()("__experimentalDirectInsert",{alternative:"directInsert",since:"6.3",version:"6.4"}),t.directInsert=s),void 0!==l&&(t.directInsert=l),Sw.get(g)||Sw.set(g,[]),Sw.get(g).push([e,t]),window.queueMicrotask((()=>{Sw.get(g)?.length&&g.batch((()=>{Sw.get(g).forEach((e=>{h(...e)})),Sw.set(g,[])}))}))}),[e,f,b,v,r,l,i,s,c,p,h,m,g])}function xw(e,t,n,o,r,l,i,s,a){return u=>{const{srcRootClientId:d,srcClientIds:p,type:m,blocks:h}=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}(u);if("inserter"===m){i();const e=h.map((e=>(0,c.cloneBlock)(e)));l(e,!0,null)}if("block"===m){const i=n(p[0]);if(d===e&&i===t)return;if(p.includes(e)||o(p).some((t=>t===e)))return;if("group"===s){const e=p.map((e=>a(e)));return void l(e,!0,null,p)}const c=d===e,u=p.length;r(p,d,c&&i<t?t-u:t)}}}function Bw(e,t,n={}){const{operation:o="insert",nearestSide:r="right"}=n,{canInsertBlockType:l,getBlockIndex:i,getClientIdsOfDescendants:s,getBlockOrder:a,getBlocksByClientId:p,getSettings:m,getBlock:h,isGroupable:g}=(0,d.useSelect)(Nr),{getGroupingBlockName:f}=(0,d.useSelect)(c.store),{insertBlocks:b,moveBlocksToPosition:v,updateBlockAttributes:k,clearSelectedBlock:_,replaceBlocks:y,removeBlocks:E}=(0,d.useDispatch)(Nr),w=(0,d.useRegistry)(),S=(0,u.useCallback)(((n,i=!0,s=0,u=[])=>{Array.isArray(n)||(n=[n]);const d=a(e)[t],p=n.map((e=>e.clientId)),m=g([...p,d]);if("replace"===o)y(d,n,void 0,s);else if("group"===o&&m){const t=h(d);"left"===r?n.push(t):n.unshift(t);const o=n.map((e=>(0,c.createBlock)(e.name,e.attributes,e.innerBlocks))),i=n.every((e=>"core/image"===e.name)),a=l("core/gallery",e),p=(0,c.createBlock)(i&&a?"core/gallery":f(),{layout:{type:"flex",flexWrap:i&&a?null:"nowrap"}},o);y([d,...u],p,void 0,s)}else b(n,t,e,i,s)}),[a,e,t,g,o,y,h,r,l,f,b]),C=(0,u.useCallback)(((n,r,l)=>{if("replace"===o){const o=p(n),r=a(e)[t];w.batch((()=>{E(n,!1),y(r,o,void 0,0)}))}else v(n,r,e,l)}),[o,a,p,v,w,E,y,t,e]),x=xw(e,t,i,s,C,S,_,o,h),B=function(e,t,n,o,r){return l=>{if(!t().mediaUpload)return;const i=(0,c.findTransform)((0,c.getBlockTransforms)("from"),(t=>"files"===t.type&&o(t.blockName,e)&&t.isMatch(l)));if(i){const e=i.transform(l,n);r(e)}}}(e,m,k,l,S),I=function(e){return t=>{const n=(0,c.pasteHandler)({HTML:t,mode:"BLOCKS"});n.length&&e(n)}}(S);return e=>{const t=(0,As.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?I(n):t.length?B(t):x(e)}}function Iw(e,t,n=["top","bottom","left","right"]){let o,r;return n.forEach((n=>{const l=function(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:l}=e,i=o?r:l,s=o?l:r,a=o?t.left:t.top,c=o?t.right:t.bottom,u=t[n];let d;return d=i>=a&&i<=c?i:i<c?a:c,Math.sqrt((i-d)**2+(s-u)**2)}(e,t,n);(void 0===o||l<o)&&(o=l,r=n)})),[o,r]}function Tw(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}const Mw=30,Pw=120,Rw=120;function Nw(e,t,n,o){let r=!0;if(t){const e=t?.map((({name:e})=>e));r=n.every((t=>e?.includes(t)))}const l=n.map((t=>e(t))).every((e=>{const[t]=e?.parent||[];return!t||t===o}));return r&&l}function Lw({dropZoneElement:e,rootClientId:t="",parentClientId:n="",isDisabled:o=!1}={}){const r=(0,d.useRegistry)(),[l,i]=(0,u.useState)({index:null,operation:"insert"}),{getBlockType:s}=(0,d.useSelect)(c.store),{getBlockListSettings:a,getBlocks:m,getBlockIndex:h,getDraggedBlockClientIds:g,getBlockNamesByClientId:f,getAllowedBlocks:b,isDragging:v}=ie((0,d.useSelect)(Nr)),{showInsertionPoint:k,hideInsertionPoint:_,startDragging:y,stopDragging:E}=ie((0,d.useDispatch)(Nr)),w=Bw("before"===l.operation||"after"===l.operation?n:t,l.index,{operation:l.operation,nearestSide:l.nearestSide}),S=(0,p.useThrottle)((0,u.useCallback)(((o,l)=>{v()||y();const u=b(t),d=f([t])[0],p=f(g());if(!Nw(s,u,p,d))return;const _=m(t);if(0===_.length)return void r.batch((()=>{i({index:0,operation:"insert"}),k(t,0,{operation:"insert"})}));const E=_.map((e=>{const t=e.clientId;return{isUnmodifiedDefaultBlock:(0,c.isUnmodifiedDefaultBlock)(e),getBoundingClientRect:()=>l.getElementById(`block-${t}`).getBoundingClientRect(),blockIndex:h(t),blockOrientation:a(t)?.orientation}})),[w,S,C]=function(e,t,n="vertical",o={}){const r="horizontal"===n?["left","right"]:["top","bottom"];let l=0,i="before",s=1/0,a=null,c="right";const{dropZoneElement:u,parentBlockOrientation:d,rootBlockIndex:p=0}=o;if(u&&"horizontal"!==d){const e=u.getBoundingClientRect(),[n,o]=Iw(t,e,["top","bottom"]);if(e.height>Pw&&n<Mw){if("top"===o)return[p,"before"];if("bottom"===o)return[p+1,"after"]}}const m=(0,x.isRTL)();if(u&&"horizontal"===d){const e=u.getBoundingClientRect(),[n,o]=Iw(t,e,["left","right"]);if(e.width>Rw&&n<Mw){if(m&&"right"===o||!m&&"left"===o)return[p,"before"];if(m&&"left"===o||!m&&"right"===o)return[p+1,"after"]}}e.forEach((({isUnmodifiedDefaultBlock:e,getBoundingClientRect:o,blockIndex:u,blockOrientation:d})=>{const p=o();let[h,g]=Iw(t,p,r);const[f,b]=Iw(t,p,["left","right"]),v=Tw(t,p);e&&v?h=0:"vertical"===n&&"horizontal"!==d&&(v&&f<Mw||!v&&function(e,t){return t.top<=e.y&&t.bottom>=e.y}(t,p))&&(a=u,c=b),h<s&&(i="bottom"===g||!m&&"right"===g||m&&"left"===g?"after":"before",s=h,l=u)}));const h=l+("after"===i?1:-1),g=!!e[l]?.isUnmodifiedDefaultBlock,f=!!e[h]?.isUnmodifiedDefaultBlock;if(null!==a)return[a,"group",c];if(!g&&!f)return["after"===i?l+1:l,"insert"];return[g?l:h,"replace"]}(E,{x:o.clientX,y:o.clientY},a(t)?.orientation,{dropZoneElement:e,parentBlockClientId:n,parentBlockOrientation:n?a(n)?.orientation:void 0,rootBlockIndex:h(t)});r.batch((()=>{i({index:w,operation:S,nearestSide:C});const e=["before","after"].includes(S)?n:t;k(e,w,{operation:S,nearestSide:C})}))}),[b,t,f,g,s,m,a,e,n,h,r,k,v,y]),200);return(0,p.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:o,onDrop:w,onDragOver(e){S(e,e.currentTarget.ownerDocument)},onDragLeave(){S.cancel(),_()},onDragEnd(){S.cancel(),E(),_()}})}const Aw={};function Ow({children:e,clientId:t}){const n=function(e){return(0,d.useSelect)((t=>{const n=t(Nr).getBlock(e);if(!n)return;const o=t(c.store).getBlockType(n.name);return o&&0!==Object.keys(o.providesContext).length?Object.fromEntries(Object.entries(o.providesContext).map((([e,t])=>[e,n.attributes[t]]))):void 0}),[e])}(t);return(0,s.createElement)(ff,{value:n},e)}const Dw=(0,u.memo)(Jw);function zw(e){const{clientId:t,allowedBlocks:n,prioritizedInserterBlocks:o,defaultBlock:r,directInsert:l,__experimentalDefaultBlock:i,__experimentalDirectInsert:a,template:p,templateLock:m,wrapperRef:h,templateInsertUpdatesSelection:g,__experimentalCaptureToolbars:f,__experimentalAppenderTagName:b,renderAppender:v,orientation:k,placeholder:_,layout:y,name:E,blockType:w,parentLock:S,defaultLayout:x}=e;Cw(t,S,n,o,r,l,i,a,m,f,k,y),function(e,t,n,o){const{getBlocks:r,getSelectedBlocksInitialCaretPosition:l,isBlockSelected:i}=(0,d.useSelect)(Nr),{replaceInnerBlocks:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,d.useDispatch)(Nr),p=(0,u.useRef)(null);(0,u.useLayoutEffect)((()=>{let u=!1;return window.queueMicrotask((()=>{if(u)return;const d=r(e),m=0===d.length||"all"===n||"contentOnly"===n,h=!C()(t,p.current);if(!m||!h)return;p.current=t;const g=(0,c.synchronizeBlocksWithTemplate)(d,t);C()(g,d)||(a(),s(e,g,0===d.length&&o&&0!==g.length&&i(e),l()))})),()=>{u=!0}}),[t,n,e])}(t,p,m,g);const B=(0,c.getBlockSupport)(E,"layout")||(0,c.getBlockSupport)(E,"__experimentalLayout")||Aw,{allowSizingOnChildren:I=!1}=B,T=y||B,M=(0,u.useMemo)((()=>({...x,...T,...I&&{allowSizingOnChildren:!0}})),[x,T,I]),P=(0,s.createElement)(Dw,{rootClientId:t,renderAppender:v,__experimentalAppenderTagName:b,layout:M,wrapperRef:h,placeholder:_});return 0===Object.keys(w.providesContext).length?P:(0,s.createElement)(Ow,{clientId:t},P)}function Vw(e){return L_(e),(0,s.createElement)(zw,{...e})}const Fw=(0,u.forwardRef)(((e,t)=>{const n=Hw({ref:t},e);return(0,s.createElement)("div",{className:"block-editor-inner-blocks"},(0,s.createElement)("div",{...n}))}));function Hw(e={},t={}){const{__unstableDisableLayoutClassNames:n,__unstableDisableDropZone:o,dropZoneElement:r}=t,{clientId:l,layout:i=null,__unstableLayoutClassNames:a=""}=y(),u=(0,d.useSelect)((e=>{if(!l)return{};const{getBlockName:t,isBlockSelected:n,hasSelectedInnerBlock:o,__unstableGetEditorMode:r,getTemplateLock:i,getBlockRootClientId:s,getBlockEditingMode:a,getBlockSettings:u,isDragging:d}=ie(e(Nr)),{hasBlockSupport:p,getBlockType:m}=e(c.store),h=t(l),g="navigation"===r(),f=a(l),b=s(l),[v]=u(l,"layout");return{__experimentalCaptureToolbars:p(h,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==h&&!n(l)&&!o(l,!0)&&g&&!d(),name:h,blockType:m(h),parentLock:i(b),parentClientId:b,isDropZoneDisabled:"disabled"===f,defaultLayout:v}}),[l]),{__experimentalCaptureToolbars:m,hasOverlay:h,name:g,blockType:f,parentLock:b,parentClientId:v,isDropZoneDisabled:k,defaultLayout:_}=u,E=Lw({dropZoneElement:r,rootClientId:l,parentClientId:v,isDisabled:k}),w=(0,p.useMergeRefs)([e.ref,o?null:E]),S={__experimentalCaptureToolbars:m,layout:i,name:g,blockType:f,parentLock:b,defaultLayout:_,...t},C=S.value&&S.onChange?Vw:zw;return{...e,ref:w,className:ml()(e.className,"block-editor-block-list__layout",n?"":a,{"has-overlay":h}),children:l?(0,s.createElement)(C,{...S,clientId:l}):(0,s.createElement)(Jw,{...t})}}Hw.save=c.__unstableGetInnerBlocksProps,Fw.DefaultBlockAppender=ww,Fw.ButtonBlockAppender=Ew,Fw.Content=()=>Hw.save().children;const Gw=Fw,Uw=new Set([zs.UP,zs.RIGHT,zs.DOWN,zs.LEFT,zs.ENTER,zs.BACKSPACE]);function $w(){const e=(0,d.useSelect)((e=>e(Nr).isTyping()),[]),{stopTyping:t}=(0,d.useDispatch)(Nr);return(0,p.useRefEffect)((n=>{if(!e)return;const{ownerDocument:o}=n;let r,l;function i(e){const{clientX:n,clientY:o}=e;r&&l&&(r!==n||l!==o)&&t(),r=n,l=o}return o.addEventListener("mousemove",i),()=>{o.removeEventListener("mousemove",i)}}),[e,t])}function jw(){const{isTyping:e,hasInlineToolbar:t}=(0,d.useSelect)((e=>{const{isTyping:t,getSettings:n}=e(Nr);return{isTyping:t(),hasInlineToolbar:n().hasInlineToolbar}}),[]),{startTyping:n,stopTyping:o}=(0,d.useDispatch)(Nr),r=$w(),l=(0,p.useRefEffect)((r=>{const{ownerDocument:l}=r,{defaultView:i}=l,s=i.getSelection();if(e){let c;function u(e){const{target:t}=e;c=i.setTimeout((()=>{(0,As.isTextField)(t)||o()}))}function d(e){const{keyCode:t}=e;t!==zs.ESCAPE&&t!==zs.TAB||o()}function p(){s.isCollapsed||o()}return r.addEventListener("focus",u),r.addEventListener("keydown",d),t||l.addEventListener("selectionchange",p),()=>{i.clearTimeout(c),r.removeEventListener("focus",u),r.removeEventListener("keydown",d),l.removeEventListener("selectionchange",p)}}function a(e){const{type:t,target:o}=e;(0,As.isTextField)(o)&&r.contains(o)&&("keydown"!==t||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&Uw.has(t)}(e))&&n()}return r.addEventListener("keypress",a),r.addEventListener("keydown",a),()=>{r.removeEventListener("keypress",a),r.removeEventListener("keydown",a)}}),[e,t,n,o]);return(0,p.useMergeRefs)([r,l])}const Ww=function({children:e}){return(0,s.createElement)("div",{ref:jw()},e)},Kw=(0,u.createContext)(),Zw=new WeakMap;function qw({className:e,...t}){const n=(0,p.useViewportMatch)("medium"),{isOutlineMode:o,isFocusMode:r,editorMode:l}=(0,d.useSelect)((e=>{const{getSettings:t,__unstableGetEditorMode:n}=e(Nr),{outlineMode:o,focusMode:r}=t();return{isOutlineMode:o,isFocusMode:r,editorMode:n()}}),[]),i=(0,d.useRegistry)(),{setBlockVisibility:a}=(0,d.useDispatch)(Nr),c=(0,p.useDebounce)((0,u.useCallback)((()=>{const e={};Zw.get(i).forEach((([t,n])=>{e[t]=n})),a(e)}),[i]),300,{trailing:!0}),m=(0,u.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{Zw.get(i)||Zw.set(i,[]);for(const t of e){const e=t.target.getAttribute("data-block");Zw.get(i).push([e,t.isIntersecting])}c()}))}),[]),h=Hw({ref:(0,p.useMergeRefs)([F_(),_w(),jw()]),className:ml()("is-root-container",e,{"is-outline-mode":o,"is-focus-mode":r&&n,"is-navigate-mode":"navigation"===l})},t);return(0,s.createElement)(Kw.Provider,{value:m},(0,s.createElement)("div",{...h}))}function Yw({clientId:e}){const{stopEditingAsBlocks:t}=ie((0,d.useDispatch)(Nr)),n=(0,d.useSelect)((t=>{const{isBlockSelected:n,hasSelectedInnerBlock:o}=t(Nr);return n(e)||o(e,!0)}),[e]);return(0,u.useEffect)((()=>{n||t(e)}),[n,e,t]),null}function Xw(e){return(0,s.createElement)(_,{value:v},(0,s.createElement)(qw,{...e}))}function Qw({placeholder:e,rootClientId:t,renderAppender:n,__experimentalAppenderTagName:o,layout:r=Fi}){const l=!1!==n,i=!!n,{order:a,selectedBlocks:c,visibleBlocks:u,temporarilyEditingAsBlocks:p,shouldRenderAppender:m}=(0,d.useSelect)((e=>{const{getBlockOrder:n,getSelectedBlockClientId:o,getSelectedBlockClientIds:r,__unstableGetVisibleBlocks:s,__unstableGetTemporarilyEditingAsBlocks:a,getTemplateLock:c,getBlockEditingMode:u,__unstableGetEditorMode:d}=e(Nr),p=o();return{order:n(t),selectedBlocks:r(),visibleBlocks:s(),temporarilyEditingAsBlocks:a(),shouldRenderAppender:l&&(i?!c(t)&&"disabled"!==u(t)&&"zoom-out"!==d():t===p||!t&&!p)}}),[t,l,i]);return(0,s.createElement)(Gi,{value:r},a.map((e=>(0,s.createElement)(d.AsyncModeProvider,{key:e,value:!u.has(e)&&!c.includes(e)},(0,s.createElement)(C_,{rootClientId:t,clientId:e})))),a.length<1&&e,!!p&&(0,s.createElement)(Yw,{clientId:p}),m&&(0,s.createElement)(pw,{tagName:o,rootClientId:t,CustomAppender:n}))}function Jw(e){return(0,s.createElement)(d.AsyncModeProvider,{value:!1},(0,s.createElement)(Qw,{...e}))}const eS={placement:"top-start"},tS={...eS,flip:!1,shift:!0},nS={...eS,flip:!0,shift:!1};function oS(e,t,n,o,r){if(!e||!t)return tS;const l=n?.scrollTop||0,i=t.getBoundingClientRect(),s=l+e.getBoundingClientRect().top,a=e.ownerDocument.documentElement.clientHeight,c=s+o,u=i.top>c,d=i.height>a-o;return r||!u&&!d?nS:tS}function rS({contentElement:e,clientId:t}){const n=bd(t),[o,r]=(0,u.useState)(0),{blockIndex:l,isSticky:i}=(0,d.useSelect)((e=>{const{getBlockIndex:n,getBlockAttributes:o}=e(Nr);return{blockIndex:n(t),isSticky:gh(o(t))}}),[t]),s=(0,u.useMemo)((()=>{if(e)return(0,As.getScrollContainer)(e)}),[e]),[a,c]=(0,u.useState)((()=>oS(e,n,s,o,i))),m=(0,p.useRefEffect)((e=>{r(e.offsetHeight)}),[]),h=(0,u.useCallback)((()=>c(oS(e,n,s,o,i))),[e,n,s,o]);return(0,u.useLayoutEffect)(h,[l,h]),(0,u.useLayoutEffect)((()=>{if(!e||!n)return;const t=e?.ownerDocument?.defaultView;let o;t?.addEventHandler?.("resize",h);const r=n?.ownerDocument?.defaultView;return r.ResizeObserver&&(o=new r.ResizeObserver(h),o.observe(n)),()=>{t?.removeEventHandler?.("resize",h),o&&o.disconnect()}}),[h,e,n]),{...a,ref:m}}function lS(e){const t=(0,d.useSelect)((t=>{const{getBlockRootClientId:n,getBlockParents:o,__experimentalGetBlockListSettingsForBlocks:r,isBlockInsertionPointVisible:l,getBlockInsertionPoint:i,getBlockOrder:s,hasMultiSelection:a,getLastMultiSelectedBlockClientId:c}=t(Nr),u=o(e),d=r(u),p=u.find((e=>d[e]?.__experimentalCaptureToolbars));let m=!1;if(l()){const t=i();m=s(t.rootClientId)[t.index]===e}return{capturingClientId:p,isInsertionPointVisible:m,lastClientId:a()?c():null,rootClientId:n(e)}}),[e]);return t}function iS({clientId:e,__unstableContentRef:t}){const{capturingClientId:n,isInsertionPointVisible:o,lastClientId:r,rootClientId:l}=lS(e),i=rS({contentElement:t?.current,clientId:e});return(0,s.createElement)(fm,{clientId:n||e,__unstableCoverTarget:!0,bottomClientId:r,className:ml()("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":o}),__unstableContentRef:t,resize:!1,shift:!1,...i},(0,s.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,s.createElement)(lw,{position:"bottom right",rootClientId:l,clientId:e,__experimentalIsQuick:!0})))}const sS=({appendToOwnerDocument:e,children:t,clientIds:n,cloneClassname:o,elementId:r,onDragStart:l,onDragEnd:i,fadeWhenDisabled:a=!1,dragComponent:m})=>{const{srcRootClientId:h,isDraggable:g,icon:f,visibleInserter:b,getBlockType:v}=(0,d.useSelect)((e=>{const{canMoveBlocks:t,getBlockRootClientId:o,getBlockName:r,getBlockAttributes:l,isBlockInsertionPointVisible:i}=e(Nr),{getBlockType:s,getActiveBlockVariation:a}=e(c.store),u=o(n[0]),d=r(n[0]),p=a(d,l(n[0]));return{srcRootClientId:u,isDraggable:t(n,u),icon:p?.icon||s(d)?.icon,visibleInserter:i(),getBlockType:s}}),[n]),k=(0,u.useRef)(!1),[_,y,E]=function(){const e=(0,u.useRef)(null),t=(0,u.useRef)(null),n=(0,u.useRef)(null),o=(0,u.useRef)(null);return(0,u.useEffect)((()=>()=>{o.current&&(clearInterval(o.current),o.current=null)}),[]),[(0,u.useCallback)((r=>{e.current=r.clientY,n.current=(0,As.getScrollContainer)(r.target),o.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,u.useCallback)((o=>{if(!n.current)return;const r=n.current.offsetHeight,l=e.current-n.current.offsetTop,i=o.clientY-n.current.offsetTop;if(o.clientY>l){const e=Math.max(r-l-50,0),n=Math.max(i-l-50,0),o=0===e||0===n?0:n/e;t.current=25*o}else if(o.clientY<l){const e=Math.max(l-50,0),n=Math.max(l-i-50,0),o=0===e||0===n?0:n/e;t.current=-25*o}else t.current=0}),[]),()=>{e.current=null,n.current=null,o.current&&(clearInterval(o.current),o.current=null)}]}(),{getAllowedBlocks:w,getBlockNamesByClientId:S,getBlockRootClientId:C}=(0,d.useSelect)(Nr),{startDraggingBlocks:x,stopDraggingBlocks:B}=(0,d.useDispatch)(Nr);(0,u.useEffect)((()=>()=>{k.current&&B()}),[]);const I=fd(n[0]),T=I.current?.closest("body");if((0,u.useEffect)((()=>{if(!T||!a)return;const e=(0,p.throttle)((e=>{if(!e.target.closest("[data-block]"))return;const t=S(n),o=e.target.closest("[data-block]").getAttribute("data-block"),r=w(o),l=S([o])[0];let i;if(0===r?.length){const e=C(o),n=S([e])[0],r=w(e);i=Nw(v,r,t,n)}else i=Nw(v,r,t,l);i||b?window?.document?.body?.classList?.remove("block-draggable-invalid-drag-token"):window?.document?.body?.classList?.add("block-draggable-invalid-drag-token")}),200);return T.addEventListener("dragover",e),()=>{T.removeEventListener("dragover",e)}}),[n,T,a,w,S,C,v,b]),!g)return t({draggable:!1});const M={type:"block",srcClientIds:n,srcRootClientId:h};return(0,s.createElement)(_l.Draggable,{appendToOwnerDocument:e,cloneClassname:o,__experimentalTransferDataType:"wp-blocks",transferData:M,onDragStart:e=>{window.requestAnimationFrame((()=>{x(n),k.current=!0,_(e),l&&l()}))},onDragOver:y,onDragEnd:()=>{B(),k.current=!1,E(),i&&i()},__experimentalDragComponent:void 0!==m?m:(0,s.createElement)(Ay,{count:n.length,icon:f,fadeWhenDisabled:!0}),elementId:r},(({onDraggableStart:e,onDraggableEnd:n})=>t({draggable:!0,onDragStart:e,onDragEnd:n})))},aS=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),cS=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),uS=(e,t)=>"up"===e?"horizontal"===t?(0,x.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===t?(0,x.isRTL)()?"left":"right":"down":null;function dS(e,t,n,o,r,l,i){const s=n+1;if(e>1)return function(e,t,n,o,r,l){const i=t+1;if(n&&o)return(0,x.__)("All blocks are selected, and cannot be moved");if(r>0&&!o){const t=uS("down",l);if("down"===t)return(0,x.sprintf)((0,x.__)("Move %1$d blocks from position %2$d down by one place"),e,i);if("left"===t)return(0,x.sprintf)((0,x.__)("Move %1$d blocks from position %2$d left by one place"),e,i);if("right"===t)return(0,x.sprintf)((0,x.__)("Move %1$d blocks from position %2$d right by one place"),e,i)}if(r>0&&o){const e=uS("down",l);if("down"===e)return(0,x.__)("Blocks cannot be moved down as they are already at the bottom");if("left"===e)return(0,x.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,x.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(r<0&&!n){const t=uS("up",l);if("up"===t)return(0,x.sprintf)((0,x.__)("Move %1$d blocks from position %2$d up by one place"),e,i);if("left"===t)return(0,x.sprintf)((0,x.__)("Move %1$d blocks from position %2$d left by one place"),e,i);if("right"===t)return(0,x.sprintf)((0,x.__)("Move %1$d blocks from position %2$d right by one place"),e,i)}if(r<0&&n){const e=uS("up",l);if("up"===e)return(0,x.__)("Blocks cannot be moved up as they are already at the top");if("left"===e)return(0,x.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,x.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}(e,n,o,r,l,i);if(o&&r)return(0,x.sprintf)((0,x.__)("Block %s is the only block, and cannot be moved"),t);if(l>0&&!r){const e=uS("down",i);if("down"===e)return(0,x.sprintf)((0,x.__)("Move %1$s block from position %2$d down to position %3$d"),t,s,s+1);if("left"===e)return(0,x.sprintf)((0,x.__)("Move %1$s block from position %2$d left to position %3$d"),t,s,s+1);if("right"===e)return(0,x.sprintf)((0,x.__)("Move %1$s block from position %2$d right to position %3$d"),t,s,s+1)}if(l>0&&r){const e=uS("down",i);if("down"===e)return(0,x.sprintf)((0,x.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return(0,x.sprintf)((0,x.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return(0,x.sprintf)((0,x.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(l<0&&!o){const e=uS("up",i);if("up"===e)return(0,x.sprintf)((0,x.__)("Move %1$s block from position %2$d up to position %3$d"),t,s,s-1);if("left"===e)return(0,x.sprintf)((0,x.__)("Move %1$s block from position %2$d left to position %3$d"),t,s,s-1);if("right"===e)return(0,x.sprintf)((0,x.__)("Move %1$s block from position %2$d right to position %3$d"),t,s,s-1)}if(l<0&&o){const e=uS("up",i);if("up"===e)return(0,x.sprintf)((0,x.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,x.sprintf)((0,x.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,x.sprintf)((0,x.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}const pS=(e,t)=>"up"===e?"horizontal"===t?(0,x.isRTL)()?T_:M_:aS:"down"===e?"horizontal"===t?(0,x.isRTL)()?M_:T_:cS:null,mS=(e,t)=>"up"===e?"horizontal"===t?(0,x.isRTL)()?(0,x.__)("Move right"):(0,x.__)("Move left"):(0,x.__)("Move up"):"down"===e?"horizontal"===t?(0,x.isRTL)()?(0,x.__)("Move left"):(0,x.__)("Move right"):(0,x.__)("Move down"):null,hS=(0,u.forwardRef)((({clientIds:e,direction:t,orientation:n,...o},r)=>{const l=(0,p.useInstanceId)(hS),i=Array.isArray(e)?e:[e],a=i.length,{blockType:u,isDisabled:m,rootClientId:h,isFirst:g,isLast:f,firstIndex:b,orientation:v="vertical"}=(0,d.useSelect)((e=>{const{getBlockIndex:o,getBlockRootClientId:r,getBlockOrder:l,getBlock:s,getBlockListSettings:a}=e(Nr),u=i[0],d=r(u),p=o(u),m=o(i[i.length-1]),h=l(d),g=s(u),f=0===p,b=m===h.length-1,{orientation:v}=a(d)||{};return{blockType:g?(0,c.getBlockType)(g.name):null,isDisabled:"up"===t?f:b,rootClientId:d,firstIndex:p,isFirst:f,isLast:b,orientation:n||v}}),[e,t]),{moveBlocksDown:k,moveBlocksUp:_}=(0,d.useDispatch)(Nr),y="up"===t?_:k,E=`block-editor-block-mover-button__description-${l}`;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.Button,{ref:r,className:ml()("block-editor-block-mover-button",`is-${t}-button`),icon:pS(t,v),label:mS(t,v),"aria-describedby":E,...o,onClick:m?null:t=>{y(e,h),o.onClick&&o.onClick(t)},disabled:m,__experimentalIsFocusable:!0}),(0,s.createElement)(_l.VisuallyHidden,{id:E},dS(a,u&&u.title,b,g,f,"up"===t?-1:1,v)))})),gS=(0,u.forwardRef)(((e,t)=>(0,s.createElement)(hS,{direction:"up",ref:t,...e}))),fS=(0,u.forwardRef)(((e,t)=>(0,s.createElement)(hS,{direction:"down",ref:t,...e})));const bS=function({clientIds:e,hideDragHandle:t}){const{canMove:n,rootClientId:o,isFirst:r,isLast:l,orientation:i}=(0,d.useSelect)((t=>{const{getBlockIndex:n,getBlockListSettings:o,canMoveBlocks:r,getBlockOrder:l,getBlockRootClientId:i}=t(Nr),s=Array.isArray(e)?e:[e],a=s[0],c=i(a),u=n(a),d=n(s[s.length-1]),p=l(c);return{canMove:r(e,c),rootClientId:c,isFirst:0===u,isLast:d===p.length-1,orientation:o(c)?.orientation}}),[e]);if(!n||r&&l&&!o)return null;const a=(0,x.__)("Drag");return(0,s.createElement)(_l.ToolbarGroup,{className:ml()("block-editor-block-mover",{"is-horizontal":"horizontal"===i})},!t&&(0,s.createElement)(sS,{clientIds:e,fadeWhenDisabled:!0},(e=>(0,s.createElement)(_l.Button,{icon:Ly,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:a,tabIndex:"-1",...e}))),(0,s.createElement)("div",{className:"block-editor-block-mover__move-button-container"},(0,s.createElement)(_l.ToolbarItem,null,(t=>(0,s.createElement)(gS,{clientIds:e,...t}))),(0,s.createElement)(_l.ToolbarItem,null,(t=>(0,s.createElement)(fS,{clientIds:e,...t})))))},{clearTimeout:vS,setTimeout:kS}=window,_S=200;function yS({ref:e,isFocused:t,highlightParent:n,debounceTimeout:o=_S}){const{getSelectedBlockClientId:r,getBlockRootClientId:l}=(0,d.useSelect)(Nr),{toggleBlockHighlight:i}=(0,d.useDispatch)(Nr),s=(0,u.useRef)(),a=(0,d.useSelect)((e=>e(Nr).getSettings().isDistractionFree),[]),c=e=>{if(e&&a)return;const t=r(),o=n?l(t):t;i(o,e)},p=()=>{const n=e?.current&&e.current.matches(":hover");return!t&&!n},m=()=>{const e=s.current;e&&vS&&vS(e)};return(0,u.useEffect)((()=>()=>{c(!1),m()}),[]),{debouncedShowGestures:e=>{e&&e.stopPropagation(),m(),c(!0)},debouncedHideGestures:e=>{e&&e.stopPropagation(),m(),s.current=kS((()=>{p()&&c(!1)}),o)}}}function ES({ref:e,highlightParent:t=!1,debounceTimeout:n=_S}){const[o,r]=(0,u.useState)(!1),{debouncedShowGestures:l,debouncedHideGestures:i}=yS({ref:e,debounceTimeout:n,isFocused:o,highlightParent:t}),s=(0,u.useRef)(!1),a=()=>e?.current&&e.current.contains(e.current.ownerDocument.activeElement);return(0,u.useEffect)((()=>{const t=e.current,n=()=>{a()&&(r(!0),l())},o=()=>{a()||(r(!1),i())};return t&&!s.current&&(t.addEventListener("focus",n,!0),t.addEventListener("blur",o,!0),s.current=!0),()=>{t&&(t.removeEventListener("focus",n),t.removeEventListener("blur",o))}}),[e,s,r,l,i]),{onMouseMove:l,onMouseLeave:i}}function wS(){const{selectBlock:e}=(0,d.useDispatch)(Nr),{firstParentClientId:t,isVisible:n}=(0,d.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:o,getBlockEditingMode:r}=e(Nr),{hasBlockSupport:l}=e(c.store),i=n(o()),s=i[i.length-1],a=t(s),u=(0,c.getBlockType)(a);return{firstParentClientId:s,isVisible:s&&"default"===r(s)&&l(u,"__experimentalParentSelector",!0)}}),[]),o=ih(t),r=(0,u.useRef)(),l=ES({ref:r,highlightParent:!0});return n?(0,s.createElement)("div",{className:"block-editor-block-parent-selector",key:t,ref:r,...l},(0,s.createElement)(_l.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,x.sprintf)((0,x.__)("Select parent block: %s"),o?.title),showTooltip:!0,icon:(0,s.createElement)(qh,{icon:o?.icon})})):null}const SS=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"}));function CS({blocks:e}){return(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,s.createElement)(_l.Popover,{className:"block-editor-block-switcher__preview__popover",placement:"bottom-start",focusOnMount:!1},(0,s.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,s.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,x.__)("Preview")),(0,s.createElement)(Ty,{viewportWidth:500,blocks:e})))))}const xS={};function BS({item:e,onSelect:t,setHoveredTransformItemName:n}){const{name:o,icon:r,title:l}=e;return(0,s.createElement)(_l.MenuItem,{className:(0,c.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),t(o)},onMouseLeave:()=>n(null),onMouseEnter:()=>n(o)},(0,s.createElement)(qh,{icon:r,showColors:!0}),l)}const IS=({transformations:e,onSelect:t,blocks:n})=>{const[o,r]=(0,u.useState)();return(0,s.createElement)(s.Fragment,null,o&&(0,s.createElement)(CS,{blocks:(0,c.cloneBlock)(n[0],e.find((({name:e})=>e===o)).attributes)}),e?.map((e=>(0,s.createElement)(BS,{key:e.name,item:e,onSelect:t,setHoveredTransformItemName:r}))))};function TS({restTransformations:e,onSelect:t,setHoveredTransformItemName:n}){return e.map((e=>(0,s.createElement)(MS,{key:e.name,item:e,onSelect:t,setHoveredTransformItemName:n})))}function MS({item:e,onSelect:t,setHoveredTransformItemName:n}){const{name:o,icon:r,title:l,isDisabled:i}=e;return(0,s.createElement)(_l.MenuItem,{className:(0,c.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),t(o)},disabled:i,onMouseLeave:()=>n(null),onMouseEnter:()=>n(o)},(0,s.createElement)(qh,{icon:r,showColors:!0}),l)}const PS=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:n,onSelect:o,onSelectVariation:r,blocks:l})=>{const[i,a]=(0,u.useState)(),{priorityTextTransformations:d,restTransformations:p}=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),o=e.reduce(((e,t)=>{const{name:o}=t;return n.includes(o)?e.priorityTextTransformations.push(t):e.restTransformations.push(t),e}),{priorityTextTransformations:[],restTransformations:[]});if(1===o.priorityTextTransformations.length&&"core/quote"===o.priorityTextTransformations[0].name){const e=o.priorityTextTransformations.pop();o.restTransformations.push(e)}return o}),[e]);return n.priorityTextTransformations.sort((({name:e},{name:n})=>t[e]<t[n]?-1:1)),n}(t),m=d.length&&p.length,h=!!p.length&&(0,s.createElement)(TS,{restTransformations:p,onSelect:o,setHoveredTransformItemName:a});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.MenuGroup,{label:(0,x.__)("Transform to"),className:e},i&&(0,s.createElement)(CS,{blocks:(0,c.switchToBlockType)(l,i)}),!!n?.length&&(0,s.createElement)(IS,{transformations:n,blocks:l,onSelect:r}),d.map((e=>(0,s.createElement)(MS,{key:e.name,item:e,onSelect:o,setHoveredTransformItemName:a}))),!m&&h),!!m&&(0,s.createElement)(_l.MenuGroup,{className:e},h))};function RS(e,t,n){const o=new(vp())(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}function NS(e){return e?.find((e=>e.isDefault))}function LS({clientId:e,onSwitch:t}){const{styles:n,block:o,blockType:r,className:l}=(0,d.useSelect)((t=>{const{getBlock:n}=t(Nr),o=n(e);if(!o)return{};const r=(0,c.getBlockType)(o.name),{getBlockStyles:l}=t(c.store);return{block:o,blockType:r,styles:l(o.name),className:o.attributes.className||""}}),[e]),{updateBlockAttributes:i}=(0,d.useDispatch)(Nr),s=function(e){return e&&0!==e.length?NS(e)?e:[{name:"default",label:(0,x._x)("Default","block style"),isDefault:!0},...e]:[]}(n),a=function(e,t){for(const n of new(vp())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),o=e?.find((({name:e})=>e===t));if(o)return o}return NS(e)}(s,l),p=function(e,t){return(0,u.useMemo)((()=>{const n=t?.example,o=t?.name;return n&&o?(0,c.getBlockFromExample)(o,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,c.cloneBlock)(e):void 0}),[t?.example?e?.name:e,t])}(o,r);return{onSelect:n=>{const o=RS(l,a,n);i(e,{className:o}),t()},stylesToRender:s,activeStyle:a,genericPreviewBlock:p,className:l}}const AS=()=>{};function OS({clientId:e,onSwitch:t=AS}){const{onSelect:n,stylesToRender:o,activeStyle:r}=LS({clientId:e,onSwitch:t});return o&&0!==o.length?(0,s.createElement)(s.Fragment,null,o.map((e=>{const t=e.label||e.name;return(0,s.createElement)(_l.MenuItem,{key:e.name,icon:r.name===e.name?uu:null,onClick:()=>n(e)},(0,s.createElement)(_l.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},t))}))):null}function DS({hoveredBlock:e,onSwitch:t}){const{clientId:n}=e;return(0,s.createElement)(_l.MenuGroup,{label:(0,x.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,s.createElement)(OS,{clientId:n,onSwitch:t}))}const zS=(e,t,n=new Set)=>{const{clientId:o,name:r,innerBlocks:l=[]}=e;if(!n.has(o)){if(r===t)return e;for(const e of l){const o=zS(e,t,n);if(o)return o}}},VS=(e,t)=>{const n=((e,t)=>{const n=(0,c.__experimentalGetBlockAttributesNamesByRole)(e,"content");return n?.length?n.reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}},FS=(e,t)=>(0,u.useMemo)((()=>e.reduce(((e,n)=>{const o=((e,t)=>{const n=t.map((e=>(0,c.cloneBlock)(e))),o=new Set;for(const t of e){let e=!1;for(const r of n){const n=zS(r,t.name,o);if(n){e=!0,o.add(n.clientId),VS(n,t);break}}if(!e)return}return n})(t,n.blocks);return o&&e.push({...n,transformedBlocks:o}),e}),[])),[e,t]),{CompositeV2:HS,CompositeItemV2:GS,useCompositeStoreV2:US}=ie(_l.privateApis);function $S({patterns:e,onSelect:t}){return(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,s.createElement)(_l.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,s.createElement)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview"},(0,s.createElement)(jS,{patterns:e,onSelect:t})))))}function jS({patterns:e,onSelect:t}){const n=US();return(0,s.createElement)(HS,{store:n,role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,x.__)("Patterns list")},e.map((e=>(0,s.createElement)(WS,{key:e.name,pattern:e,onSelect:t}))))}function WS({pattern:e,onSelect:t}){const n="block-editor-block-switcher__preview-patterns-container",o=(0,p.useInstanceId)(WS,`${n}-list__item-description`);return(0,s.createElement)("div",{className:`${n}-list__list-item`},(0,s.createElement)(GS,{render:(0,s.createElement)("div",{role:"option","aria-label":e.title,"aria-describedby":e.description?o:void 0,className:`${n}-list__item`}),onClick:()=>t(e.transformedBlocks)},(0,s.createElement)(Ty,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,s.createElement)("div",{className:`${n}-list__item-title`},e.title)),!!e.description&&(0,s.createElement)(_l.VisuallyHidden,{id:o},e.description))}const KS=function({blocks:e,patterns:t,onSelect:n}){const[o,r]=(0,u.useState)(!1),l=FS(t,e);return l.length?(0,s.createElement)(_l.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},o&&(0,s.createElement)($S,{patterns:l,onSelect:n}),(0,s.createElement)(_l.MenuItem,{onClick:e=>{e.preventDefault(),r(!o)},icon:T_},(0,x.__)("Patterns"))):null};function ZS({onClose:e,clientIds:t,hasBlockStyles:n,canRemove:o}){const{replaceBlocks:r,multiSelect:l,updateBlockAttributes:i}=(0,d.useDispatch)(Nr),{possibleBlockTransformations:a,patterns:p,blocks:m}=(0,d.useSelect)((e=>{const{getBlocksByClientId:n,getBlockRootClientId:o,getBlockTransformItems:r,__experimentalGetPatternTransformItems:l}=e(Nr),i=o(Array.isArray(t)?t[0]:t),s=n(t);return{blocks:s,possibleBlockTransformations:r(s,i),patterns:l(s,i)}}),[t]),h=function({clientIds:e,blocks:t}){const{activeBlockVariation:n,blockVariationTransformations:o}=(0,d.useSelect)((n=>{const{getBlockRootClientId:o,getBlockAttributes:r,canRemoveBlocks:l}=n(Nr),{getActiveBlockVariation:i,getBlockVariations:s}=n(c.store),a=o(Array.isArray(e)?e[0]:e),u=l(e,a);if(1!==t.length||!u)return xS;const[d]=t;return{blockVariationTransformations:s(d.name,"transform"),activeBlockVariation:i(d.name,r(d.clientId))}}),[e,t]);return(0,u.useMemo)((()=>o?.filter((({name:e})=>e!==n?.name))),[o,n])}({clientIds:t,blocks:m});function g(e){e.length>1&&l(e[0].clientId,e[e.length-1].clientId)}const f=1===m.length&&(0,c.isTemplatePart)(m[0]),b=!!a.length&&o&&!f,v=!!h?.length,k=!!p?.length&&o,_=b||v;return n||_||k?(0,s.createElement)("div",{className:"block-editor-block-switcher__container"},k&&(0,s.createElement)(KS,{blocks:m,patterns:p,onSelect:n=>{!function(e){r(t,e),g(e)}(n),e()}}),_&&(0,s.createElement)(PS,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:a,possibleBlockVariationTransformations:h,blocks:m,onSelect:n=>{!function(e){const n=(0,c.switchToBlockType)(m,e);r(t,n),g(n)}(n),e()},onSelectVariation:t=>{!function(e){i(m[0].clientId,{...h.find((({name:t})=>t===e)).attributes})}(t),e()}}),n&&(0,s.createElement)(DS,{hoveredBlock:m[0],onSwitch:e})):(0,s.createElement)("p",{className:"block-editor-block-switcher__no-transforms"},(0,x.__)("No transforms."))}const qS=({clientIds:e})=>{const{canRemove:t,hasBlockStyles:n,icon:o,invalidBlocks:r,isReusable:l,isTemplate:i}=(0,d.useSelect)((t=>{const{getBlockRootClientId:n,getBlocksByClientId:o,getBlockAttributes:r,canRemoveBlocks:l}=t(Nr),{getBlockStyles:i,getBlockType:s,getActiveBlockVariation:a}=t(c.store),u=o(e);if(!u.length||u.some((e=>!e)))return{invalidBlocks:!0};const d=n(Array.isArray(e)?e[0]:e),[{name:p}]=u,m=1===u.length,h=s(p);let g;if(m){const t=a(p,r(e[0]));g=t?.icon||h.icon}else{g=1===new Set(u.map((({name:e})=>e))).size?h.icon:SS}return{canRemove:l(e,d),hasBlockStyles:m&&!!i(p)?.length,icon:g,isReusable:m&&(0,c.isReusableBlock)(u[0]),isTemplate:m&&(0,c.isTemplatePart)(u[0])}}),[e]),a=df({clientId:e?.[0],maximumLength:35});if(r)return null;const u=1===e.length,p=u?a:(0,x.__)("Multiple blocks selected");if(!n&&!t)return(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(_l.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:p,icon:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(qh,{icon:o,showColors:!0}),(l||i)&&(0,s.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},a))}));const m=u?(0,x.__)("Change block type or style"):(0,x.sprintf)((0,x._n)("Change type of %d block","Change type of %d blocks",e.length),e.length);return(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(_l.ToolbarItem,null,(r=>(0,s.createElement)(_l.DropdownMenu,{className:"block-editor-block-switcher",label:p,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(qh,{icon:o,className:"block-editor-block-switcher__toggle",showColors:!0}),(l||i)&&(0,s.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},a)),toggleProps:{describedBy:m,...r},menuProps:{orientation:"both"}},(({onClose:o})=>(0,s.createElement)(ZS,{onClose:o,clientIds:e,hasBlockStyles:n,canRemove:t}))))))},{Fill:YS,Slot:XS}=(0,_l.createSlotFill)("__unstableBlockToolbarLastItem");YS.Slot=XS;const QS=YS,JS="align",eC="__experimentalBorder",tC="color",nC="customClassName",oC="typography.__experimentalFontFamily",rC="typography.fontSize",lC="layout",iC=["shadow",...["typography.lineHeight",rC,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",oC,"typography.textColumns","typography.__experimentalTextDecoration","typography.__experimentalTextTransform","typography.__experimentalWritingMode","typography.__experimentalLetterSpacing"],eC,tC,"spacing"];const sC={align:e=>(0,c.hasBlockSupport)(e,JS),borderColor:e=>function(e,t="any"){if("web"!==u.Platform.OS)return!1;const n=(0,c.getBlockSupport)(e,eC);return!0===n||("any"===t?!!(n?.color||n?.radius||n?.width||n?.style):!!n?.[t])}(e,"color"),backgroundColor:e=>{const t=(0,c.getBlockSupport)(e,tC);return t&&!1!==t.background},textColor:e=>{const t=(0,c.getBlockSupport)(e,tC);return t&&!1!==t.text},gradient:e=>{const t=(0,c.getBlockSupport)(e,tC);return null!==t&&"object"==typeof t&&!!t.gradients},className:e=>(0,c.hasBlockSupport)(e,nC,!0),fontFamily:e=>(0,c.hasBlockSupport)(e,oC),fontSize:e=>(0,c.hasBlockSupport)(e,rC),layout:e=>(0,c.hasBlockSupport)(e,lC),style:e=>iC.some((t=>(0,c.hasBlockSupport)(e,t)))};function aC(e,t){return Object.entries(sC).reduce(((n,[o,r])=>(r(e.name)&&r(t.name)&&(n[o]=e.attributes[o]),n)),{})}function cC(e,t,n){for(let o=0;o<Math.min(t.length,e.length);o+=1)n(e[o].clientId,aC(t[o],e[o])),cC(e[o].innerBlocks,t[o].innerBlocks,n)}function uC(){const e=(0,d.useRegistry)(),{updateBlockAttributes:t}=(0,d.useDispatch)(Nr),{createSuccessNotice:n,createWarningNotice:o,createErrorNotice:r}=(0,d.useDispatch)(Os.store);return(0,u.useCallback)((async l=>{let i="";try{if(!window.navigator.clipboard)return void r((0,x.__)("Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers."),{type:"snackbar"});i=await window.navigator.clipboard.readText()}catch(e){return void r((0,x.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"})}if(!i||!function(e){try{const t=(0,c.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return 1!==t.length||"core/freeform"!==t[0].name}catch(e){return!1}}(i))return void o((0,x.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});const s=(0,c.parse)(i);if(1===s.length?e.batch((()=>{cC(l,l.map((()=>s[0])),t)})):e.batch((()=>{cC(l,s,t)})),1===l.length){const e=(0,c.getBlockType)(l[0].name)?.title;n((0,x.sprintf)((0,x.__)("Pasted styles to %s."),e),{type:"snackbar"})}else n((0,x.sprintf)((0,x.__)("Pasted styles to %d blocks."),l.length),{type:"snackbar"})}),[e.batch,t,n,o,r])}function dC({clientIds:e,children:t,__experimentalUpdateSelection:n}){const{getDefaultBlockName:o,getGroupingBlockName:r}=(0,d.useSelect)(c.store),l=(0,d.useSelect)((t=>{const{canInsertBlockType:n,getBlockRootClientId:r,getBlocksByClientId:l,getDirectInsertBlock:i,canMoveBlocks:s,canRemoveBlocks:a}=t(Nr),u=l(e),d=r(e[0]),p=n(o(),d),m=d?i(d):null;return{canMove:s(e,d),canRemove:a(e,d),canInsertBlock:p||!!m,canCopyStyles:u.every((e=>!!e&&((0,c.hasBlockSupport)(e.name,"color")||(0,c.hasBlockSupport)(e.name,"typography")))),canDuplicate:u.every((e=>!!e&&(0,c.hasBlockSupport)(e.name,"multiple",!0)&&n(e.name,d)))}}),[e,o]),{getBlocksByClientId:i,getBlocks:s}=(0,d.useSelect)(Nr),{canMove:a,canRemove:u,canInsertBlock:p,canCopyStyles:m,canDuplicate:h}=l,{removeBlocks:g,replaceBlocks:f,duplicateBlocks:b,insertAfterBlock:v,insertBeforeBlock:k,flashBlock:_,setBlockMovingClientId:y,setNavigationMode:E,selectBlock:w}=(0,d.useDispatch)(Nr),S=ey(),C=uC();return t({canCopyStyles:m,canDuplicate:h,canInsertBlock:p,canMove:a,canRemove:u,onDuplicate:()=>b(e,n),onRemove:()=>g(e,n),onInsertBefore(){const t=Array.isArray(e)?e[0]:t;k(t)},onInsertAfter(){const t=Array.isArray(e)?e[e.length-1]:t;v(t)},onMoveTo(){E(!0),w(e[0]),y(e[0])},onGroup(){if(!e.length)return;const t=r(),n=(0,c.switchToBlockType)(i(e),t);n&&f(e,n)},onUngroup(){if(!e.length)return;const t=s(e[0]);t.length&&f(e,t)},onCopy(){1===e.length&&_(e[0]),S("copy",e)},async onPasteStyles(){await C(i(e))}})}const pC=function({clientId:e}){const t=(0,d.useSelect)((t=>t(Nr).getBlock(e)),[e]),{replaceBlocks:n}=(0,d.useDispatch)(Nr);return t&&"core/html"===t.name?(0,s.createElement)(_l.MenuItem,{onClick:()=>n(e,(0,c.rawHandler)({HTML:(0,c.getBlockContent)(t)}))},(0,x.__)("Convert to Blocks")):null},{Fill:mC,Slot:hC}=(0,_l.createSlotFill)("__unstableBlockSettingsMenuFirstItem");mC.Slot=hC;const gC=mC,fC={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"};function bC({clientIds:e,onCopy:t,label:n}){const{getBlocksByClientId:o}=(0,d.useSelect)(Nr),r=(0,p.useCopyToClipboard)((()=>(0,c.serialize)(o(e))),t),l=n||(0,x.__)("Copy");return(0,s.createElement)(_l.MenuItem,{ref:r},l)}function vC({parentClientId:e,parentBlockType:t}){const n=(0,p.useViewportMatch)("medium","<"),{selectBlock:o}=(0,d.useDispatch)(Nr),r=(0,u.useRef)(),l=ES({ref:r,highlightParent:!0});return n?(0,s.createElement)(_l.MenuItem,{...l,ref:r,icon:(0,s.createElement)(qh,{icon:t.icon}),onClick:()=>o(e)},(0,x.sprintf)((0,x.__)("Select parent block (%s)"),t.title)):null}function kC({block:e,clientIds:t,__experimentalSelectBlock:n,children:o,__unstableDisplayLocation:r,...l}){const i=e?.clientId,a=Array.isArray(t)?t:[t],m=a.length,h=a[0],{firstParentClientId:g,onlyBlock:f,parentBlockType:b,previousBlockClientId:v,selectedBlockClientIds:k}=(0,d.useSelect)((e=>{const{getBlockCount:t,getBlockName:n,getBlockRootClientId:o,getPreviousBlockClientId:r,getSelectedBlockClientIds:l,getBlockAttributes:i}=e(Nr),{getActiveBlockVariation:s}=e(c.store),a=o(h),u=a&&n(a);return{firstParentClientId:a,onlyBlock:1===t(a),parentBlockType:a&&(s(u,i(a))||(0,c.getBlockType)(u)),previousBlockClientId:r(h),selectedBlockClientIds:l()}}),[h]),{getBlockOrder:_,getSelectedBlockClientIds:y}=(0,d.useSelect)(Nr),E=(0,d.useSelect)((e=>ie(e(Nr)).getOpenedBlockSettingsMenu()),[]),{setOpenedBlockSettingsMenu:w}=ie((0,d.useDispatch)(Nr)),S=(0,d.useSelect)((e=>{const{getShortcutRepresentation:t}=e(A_.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")}}),[]),C=(0,A_.__unstableUseShortcutEventMatch)(),B=k.length>0,I=(0,u.useCallback)((async e=>{if(n){const t=await e;t&&t[0]&&n(t[0],!1)}}),[n]),T=(0,u.useCallback)((()=>{if(n){let e=v||g;e||(e=_()[0]);const t=B&&0===y().length;n(e,t)}}),[n,v,g,_,B,y]),M=k?.includes(g),P=i?E===i||!1:void 0,R=(0,u.useCallback)((e=>{e&&E!==i?w(i):!e&&E&&E===i&&w(void 0)}),[i,E,w]);return(0,s.createElement)(dC,{clientIds:t,__experimentalUpdateSelection:!n},(({canCopyStyles:e,canDuplicate:n,canInsertBlock:i,canMove:a,canRemove:c,onDuplicate:d,onInsertAfter:v,onInsertBefore:k,onRemove:_,onCopy:y,onPasteStyles:E,onMoveTo:B})=>(0,s.createElement)(_l.DropdownMenu,{icon:Ef,label:(0,x.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:fC,open:P,onToggle:R,noIcons:!0,menuProps:{onKeyDown(e){e.defaultPrevented||(C("core/block-editor/remove",e)&&c?(e.preventDefault(),T(_())):C("core/block-editor/duplicate",e)&&n?(e.preventDefault(),I(d())):C("core/block-editor/insert-after",e)&&i?(e.preventDefault(),w(void 0),v()):C("core/block-editor/insert-before",e)&&i&&(e.preventDefault(),w(void 0),k()))}},...l},(({onClose:l})=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.MenuGroup,null,(0,s.createElement)(gC.Slot,{fillProps:{onClose:l}}),!M&&!!g&&(0,s.createElement)(vC,{parentClientId:g,parentBlockType:b}),1===m&&(0,s.createElement)(pC,{clientId:h}),(0,s.createElement)(bC,{clientIds:t,onCopy:y}),n&&(0,s.createElement)(_l.MenuItem,{onClick:(0,p.pipe)(l,d,I),shortcut:S.duplicate},(0,x.__)("Duplicate")),i&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.MenuItem,{onClick:(0,p.pipe)(l,k),shortcut:S.insertBefore},(0,x.__)("Add before")),(0,s.createElement)(_l.MenuItem,{onClick:(0,p.pipe)(l,v),shortcut:S.insertAfter},(0,x.__)("Add after")))),e&&(0,s.createElement)(_l.MenuGroup,null,(0,s.createElement)(bC,{clientIds:t,onCopy:y,label:(0,x.__)("Copy styles")}),(0,s.createElement)(_l.MenuItem,{onClick:E},(0,x.__)("Paste styles"))),(0,s.createElement)(jh.Slot,{fillProps:{onClose:l,canMove:a,onMoveTo:B,onlyBlock:f,count:m,firstBlockClientId:h},clientIds:t,__unstableDisplayLocation:r}),"function"==typeof o?o({onClose:l}):u.Children.map((e=>(0,u.cloneElement)(e,{onClose:l}))),c&&(0,s.createElement)(_l.MenuGroup,null,(0,s.createElement)(_l.MenuItem,{onClick:(0,p.pipe)(l,_,T),shortcut:S.remove},(0,x.__)("Delete"))))))))}const _C=kC;const yC=function({clientIds:e,...t}){return(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(_l.ToolbarItem,null,(n=>(0,s.createElement)(_C,{clientIds:e,toggleProps:n,...t}))))};function EC({clientId:e}){const{canLock:t,isLocked:n}=Th(e),[o,r]=(0,u.useReducer)((e=>!e),!1),l=(0,u.useRef)(!1);if((0,u.useEffect)((()=>{n&&(l.current=!0)}),[n]),!n&&!l.current)return null;let i=n?(0,x.__)("Unlock"):(0,x.__)("Lock");return!t&&n&&(i=(0,x.__)("Locked")),(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.ToolbarGroup,{className:"block-editor-block-lock-toolbar"},(0,s.createElement)(_l.ToolbarButton,{accessibleWhenDisabled:!0,disabled:!t,icon:n?Rh:Mh,label:i,onClick:r,"aria-expanded":o,"aria-haspopup":"dialog"})),o&&(0,s.createElement)(Ah,{clientId:e,onClose:r}))}const wC=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.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"})),SC=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z"})),CC=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z"})),xC={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"}};const BC=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:o}=Bh(),{replaceBlocks:r}=(0,d.useDispatch)(Nr),{canRemove:l,variations:i}=(0,d.useSelect)((e=>{const{canRemoveBlocks:o}=e(Nr),{getBlockVariations:r}=e(c.store);return{canRemove:o(t),variations:r(n,"transform")}}),[t,n]),a=o=>{const l=(0,c.switchToBlockType)(e,n);"string"!=typeof o&&(o="group"),l&&l.length>0&&(l[0].attributes.layout=xC[o],r(t,l))};if(!o||!l)return null;const u=!!i.find((({name:e})=>"group-row"===e)),p=!!i.find((({name:e})=>"group-stack"===e));return(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(_l.ToolbarButton,{icon:wC,label:(0,x._x)("Group","verb"),onClick:a}),u&&(0,s.createElement)(_l.ToolbarButton,{icon:SC,label:(0,x._x)("Row","single horizontal line"),onClick:()=>a("row")}),p&&(0,s.createElement)(_l.ToolbarButton,{icon:CC,label:(0,x._x)("Stack","verb"),onClick:()=>a("stack")}))};function IC({clientIds:e}){const t=1===e.length?e[0]:void 0,n=(0,d.useSelect)((e=>!!t&&"html"===e(Nr).getBlockMode(t)),[t]),{toggleBlockMode:o}=(0,d.useDispatch)(Nr);return n?(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(_l.ToolbarButton,{onClick:()=>{o(t)}},(0,x.__)("Edit visually"))):null}const TC=(0,u.createContext)("");function MC(e){return Array.from(e.querySelectorAll("[data-toolbar-item]:not([disabled])"))}function PC(e){return e.contains(e.ownerDocument.activeElement)}function RC({toolbarRef:e,focusOnMount:t,isAccessibleToolbar:n,defaultIndex:o,onIndexChange:r,shouldUseKeyboardFocusShortcut:l,focusEditorOnEscape:i}){const[s]=(0,u.useState)(t),[a]=(0,u.useState)(o),c=(0,u.useCallback)((()=>{!function(e){const[t]=As.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}(e.current)}),[e]);(0,A_.useShortcut)("core/block-editor/focus-toolbar",(()=>{l&&c()})),(0,u.useEffect)((()=>{s&&c()}),[n,s,c]),(0,u.useEffect)((()=>{const t=e.current;let n=0;return s||PC(t)||(n=window.requestAnimationFrame((()=>{const e=MC(t),n=a||0;e[n]&&PC(t)&&e[n].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(n),!r||!t)return;const e=MC(t).findIndex((e=>0===e.tabIndex));r(e)}}),[a,s,r,e]);const{getLastFocus:p}=ie((0,d.useSelect)(Nr));(0,u.useEffect)((()=>{const t=e.current;if(i){const e=e=>{const t=p();e.keyCode===zs.ESCAPE&&t?.current&&(e.preventDefault(),t.current.focus())};return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}}),[i,p,e])}function NC({children:e,focusOnMount:t,focusEditorOnEscape:n=!1,shouldUseKeyboardFocusShortcut:o=!0,__experimentalInitialIndex:r,__experimentalOnIndexChange:l,...i}){const a=(0,u.useRef)(),c=function(e){const[t,n]=(0,u.useState)(!0),o=(0,u.useCallback)((()=>{const t=!As.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||w()("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)}),[e]);return(0,u.useLayoutEffect)((()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[o,t,e]),t}(a);return RC({toolbarRef:a,focusOnMount:t,defaultIndex:r,onIndexChange:l,isAccessibleToolbar:c,shouldUseKeyboardFocusShortcut:o,focusEditorOnEscape:n}),c?(0,s.createElement)(_l.Toolbar,{label:i["aria-label"],ref:a,...i},e):(0,s.createElement)(_l.NavigableMenu,{orientation:"horizontal",role:"toolbar",ref:a,...i},e)}function LC(e="default"){const t=yl[e]?.Slot,n=(0,_l.__experimentalUseSlotFills)(t?.__unstableName);return t?!!n?.length:null}const AC=(0,s.createElement)(Z.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd"},(0,s.createElement)(Z.Path,{d:"M5 19L8 16L5 19Z"}),(0,s.createElement)(Z.Path,{d:"M16 8L19 5L16 8Z"}),(0,s.createElement)(Z.G,null,(0,s.createElement)(Z.Path,{d:"M5 19L8 16"}),(0,s.createElement)(Z.Path,{d:"M9.30003 17.3C9.523 17.5237 9.78794 17.7013 10.0797 17.8224C10.3714 17.9435 10.6842 18.0059 11 18.0059C11.3159 18.0059 11.6287 17.9435 11.9204 17.8224C12.2121 17.7013 12.4771 17.5237 12.7 17.3L15 15L9.00003 9L6.70003 11.3C6.47629 11.523 6.29876 11.7879 6.17763 12.0796C6.05649 12.3714 5.99414 12.6841 5.99414 13C5.99414 13.3159 6.05649 13.6286 6.17763 13.9204C6.29876 14.2121 6.47629 14.477 6.70003 14.7L9.30003 17.3Z"}),(0,s.createElement)(Z.Path,{d:"M16 8L19 5"}),(0,s.createElement)(Z.Path,{d:"M9 9.00003L15 15L17.3 12.7C17.5237 12.4771 17.7013 12.2121 17.8224 11.9204C17.9435 11.6287 18.0059 11.3159 18.0059 11C18.0059 10.6842 17.9435 10.3714 17.8224 10.0797C17.7013 9.78794 17.5237 9.523 17.3 9.30003L14.7 6.70003C14.477 6.47629 14.2121 6.29876 13.9204 6.17763C13.6286 6.05649 13.3159 5.99414 13 5.99414C12.6841 5.99414 12.3714 6.05649 12.0796 6.17763C11.7879 6.29876 11.523 6.47629 11.3 6.70003L9 9.00003Z"})));function OC(){return(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(_l.ToolbarItem,{as:"div","aria-label":(0,x._x)("Connected","block toolbar button label"),className:"block-editor-block-bindings-toolbar-indicator"},(0,s.createElement)(_l.Icon,{icon:AC,size:24})))}function DC({hideDragHandle:e,focusOnMount:t,__experimentalInitialIndex:n,__experimentalOnIndexChange:o,variant:r="unstyled"}){const{blockClientId:l,blockClientIds:i,isDefaultEditingMode:a,blockType:m,blockName:h,shouldShowVisualToolbar:g,showParentSelector:f,isUsingBindings:b}=(0,d.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getBlockParents:o,getSelectedBlockClientIds:r,isBlockValid:l,getBlockRootClientId:i,getBlockEditingMode:s,getBlockAttributes:a}=e(Nr),u=r(),d=u[0],p=i(d),m=o(d),h=m[m.length-1],g=t(h),f=(0,c.getBlockType)(g),b="default"===s(d),v=t(d),k=u.every((e=>l(e))),_=u.every((e=>"visual"===n(e))),y=!!a(d)?.metadata?.bindings;return{blockClientId:d,blockClientIds:u,isDefaultEditingMode:b,blockName:v,blockType:d&&(0,c.getBlockType)(v),shouldShowVisualToolbar:k&&_,rootClientId:p,showParentSelector:f&&"default"===s(h)&&(0,c.hasBlockSupport)(f,"__experimentalParentSelector",!0)&&1===u.length&&b,isUsingBindings:y}}),[]),v=(0,u.useRef)(null),k=(0,u.useRef)(),_=ES({ref:k}),y=!(0,p.useViewportMatch)("medium","<"),E=m&&(0,c.hasBlockSupport)(m,"__experimentalToolbar",!0),w=function(){let e=!1;for(const t in yl)LC(t)&&(e=!0);return e}();if(!E||!a&&!w)return null;const S=i.length>1,C=(0,c.isReusableBlock)(m)||(0,c.isTemplatePart)(m),B=ml()("block-editor-block-contextual-toolbar",{"has-parent":f}),I=ml()("block-editor-block-toolbar",{"is-synced":C});return(0,s.createElement)(NC,{focusEditorOnEscape:!0,className:B,"aria-label":(0,x.__)("Block tools"),variant:"toolbar"===r?void 0:r,focusOnMount:t,__experimentalInitialIndex:n,__experimentalOnIndexChange:o,key:l},(0,s.createElement)("div",{ref:v,className:I},!S&&y&&a&&(0,s.createElement)(wS,null),b&&eg(h)&&(0,s.createElement)(OC,null),(g||S)&&a&&(0,s.createElement)("div",{ref:k,..._},(0,s.createElement)(_l.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,s.createElement)(qS,{clientIds:i}),!S&&(0,s.createElement)(EC,{clientId:l}),(0,s.createElement)(bS,{clientIds:i,hideDragHandle:e}))),g&&S&&(0,s.createElement)(BC,null),g&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Bl.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Bl.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Bl.Slot,{className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Bl.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Bl.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(TC.Provider,{value:m?.name},(0,s.createElement)(QS.Slot,null))),(0,s.createElement)(IC,{clientIds:i}),a&&(0,s.createElement)(yC,{clientIds:i})))}function zC({hideDragHandle:e,variant:t}){return(0,s.createElement)(DC,{hideDragHandle:e,variant:t,focusOnMount:void 0,__experimentalInitialIndex:void 0,__experimentalOnIndexChange:void 0})}function VC({clientId:e,isTyping:t,__unstableContentRef:n}){const{capturingClientId:o,isInsertionPointVisible:r,lastClientId:l}=lS(e),i=(0,u.useRef)();(0,u.useEffect)((()=>{i.current=void 0}),[e]);const{stopTyping:a}=(0,d.useDispatch)(Nr),c=(0,u.useRef)(!1);(0,A_.useShortcut)("core/block-editor/focus-toolbar",(()=>{c.current=!0,a(!0)})),(0,u.useEffect)((()=>{c.current=!1}));const p=rS({contentElement:n?.current,clientId:e});return!t&&(0,s.createElement)(fm,{clientId:o||e,bottomClientId:l,className:ml()("block-editor-block-list__block-popover",{"is-insertion-point-visible":r}),resize:!1,...p},(0,s.createElement)(DC,{focusOnMount:c.current,__experimentalInitialIndex:i.current,__experimentalOnIndexChange:e=>{i.current=e},variant:"toolbar"}))}const FC=function({clientId:e,rootClientId:t}){const n=(0,d.useSelect)((n=>{const{getBlock:o,getBlockIndex:r,hasBlockMovingClientId:l,getBlockListSettings:i,__unstableGetEditorMode:s}=n(Nr),{getActiveBlockVariation:a,getBlockType:u}=n(c.store),d=r(e),{name:p,attributes:m}=o(e),h=u(p),g=i(t)?.orientation,f=a(p,m);return{blockMovingMode:l(),editorMode:s(),icon:f?.icon||h.icon,label:(0,c.__experimentalGetAccessibleBlockLabel)(h,m,d+1,g)}}),[e,t]),{label:o,icon:r,blockMovingMode:l,editorMode:i}=n,{setNavigationMode:a,removeBlock:p}=(0,d.useDispatch)(Nr),m=(0,u.useRef)();(0,u.useEffect)((()=>{m.current.focus(),(0,vo.speak)(o)}),[o]);const h=bd(e),{hasBlockMovingClientId:g,getBlockIndex:f,getBlockRootClientId:b,getClientIdsOfDescendants:v,getSelectedBlockClientId:k,getMultiSelectedBlocksEndClientId:_,getPreviousBlockClientId:y,getNextBlockClientId:E}=(0,d.useSelect)(Nr),{selectBlock:w,clearSelectedBlock:S,setBlockMovingClientId:C,moveBlockToPosition:B}=(0,d.useDispatch)(Nr),I=ml()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!l}),T=(0,x.__)("Drag");return(0,s.createElement)("div",{className:I},(0,s.createElement)(_l.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,s.createElement)(_l.FlexItem,null,(0,s.createElement)(qh,{icon:r,showColors:!0})),(0,s.createElement)(_l.FlexItem,null,"zoom-out"===i&&(0,s.createElement)(bS,{clientIds:[e],hideDragHandle:!0}),"navigation"===i&&(0,s.createElement)(sS,{clientIds:[e]},(e=>(0,s.createElement)(_l.Button,{icon:Ly,className:"block-selection-button_drag-handle","aria-hidden":"true",label:T,tabIndex:"-1",...e})))),(0,s.createElement)(_l.FlexItem,null,(0,s.createElement)(_l.Button,{ref:m,onClick:"navigation"===i?()=>a(!1):void 0,onKeyDown:function(t){const{keyCode:n}=t,o=n===zs.UP,r=n===zs.DOWN,l=n===zs.LEFT,s=n===zs.RIGHT,c=n===zs.TAB,u=n===zs.ESCAPE,d=n===zs.ENTER,m=n===zs.SPACE,x=t.shiftKey;if(u&&"navigation"===i)return a(!1),void t.preventDefault();if(n===zs.BACKSPACE||n===zs.DELETE)return p(e),void t.preventDefault();const I=k(),T=_(),M=y(T||I),P=E(T||I),R=c&&x||o,N=c&&!x||r,L=l,A=s;let O;if(R)O=M;else if(N)O=P;else if(L){var D;O=null!==(D=b(I))&&void 0!==D?D:I}else if(A){var z;O=null!==(z=v(I)[0])&&void 0!==z?z:I}const V=g();if(u&&V&&!t.defaultPrevented&&(C(null),t.preventDefault()),(d||m)&&V){const e=b(V),t=b(I),n=f(V);let o=f(I);n<o&&e===t&&(o-=1),B(V,e,t,o),w(V),C(null)}if((!V||I!==V||!A)&&(N||R||L||A))if(O)t.preventDefault(),w(O);else if(c&&I){let e;if(N){e=h;do{e=As.focus.tabbable.findNext(e)}while(e&&h.contains(e));e||(e=h.ownerDocument.defaultView.frameElement,e=As.focus.tabbable.findNext(e))}else e=As.focus.tabbable.findPrevious(h);e&&(t.preventDefault(),e.focus(),S())}},label:o,showTooltip:!1,className:"block-selection-button_select-button"},(0,s.createElement)(pf,{clientId:e,maximumLength:35})))))};function HC({clientId:e,__unstableContentRef:t}){const{capturingClientId:n,isInsertionPointVisible:o,lastClientId:r,rootClientId:l}=lS(e),i=rS({contentElement:t?.current,clientId:e});return(0,s.createElement)(fm,{clientId:n||e,bottomClientId:r,className:ml()("block-editor-block-list__block-popover",{"is-insertion-point-visible":o}),resize:!1,...i},(0,s.createElement)(FC,{clientId:e,rootClientId:l}))}const GC=function({__unstableContentRef:e}){const[t,n]=(0,u.useState)(!1),o=(0,d.useSelect)((e=>e(Nr).getBlockOrder()),[]);return(0,u.useEffect)((()=>{const e=setTimeout((()=>{n(!0)}),500);return()=>{clearTimeout(e)}}),[]),t?o.map(((t,n)=>n===o.length-1?null:(0,s.createElement)(hw,{key:t,previousClientId:t,nextClientId:o[n+1],__unstableContentRef:e},(0,s.createElement)("div",{className:"block-editor-block-list__insertion-point-inserter is-with-inserter"},(0,s.createElement)(lw,{position:"bottom center",clientId:o[n+1],__experimentalIsQuick:!0}))))):null};function UC(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlock:o,getSettings:r,hasMultiSelection:l,__unstableGetEditorMode:i,isTyping:s}=e(Nr),a=t()||n(),{name:u="",attributes:d={}}=o(a)||{},p=i(),m=a&&u,h=(0,c.isUnmodifiedDefaultBlock)({name:u,attributes:d}),g=a&&!s()&&"edit"===p&&(0,c.isUnmodifiedDefaultBlock)({name:u,attributes:d}),f=m&&!l()&&("navigation"===p||"zoom-out"===p);return{clientId:a,hasFixedToolbar:r().hasFixedToolbar,isTyping:s(),isZoomOutMode:"zoom-out"===p,showEmptyBlockSideInserter:g,showBreadcrumb:!g&&f,showBlockToolbar:!r().hasFixedToolbar&&!g&&m&&!h&&!f}}function $C({children:e,__unstableContentRef:t,...n}){const{clientId:o,hasFixedToolbar:r,isTyping:l,isZoomOutMode:i,showEmptyBlockSideInserter:a,showBreadcrumb:c,showBlockToolbar:p}=(0,d.useSelect)(UC,[]),m=(0,A_.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:h,getBlockRootClientId:g}=(0,d.useSelect)(Nr),{duplicateBlocks:f,removeBlocks:b,insertAfterBlock:v,insertBeforeBlock:k,selectBlock:_,moveBlocksUp:y,moveBlocksDown:E}=(0,d.useDispatch)(Nr);const w=hm(t),S=hm(t);return(0,s.createElement)("div",{...n,onKeyDown:function(e){if(!e.defaultPrevented)if(m("core/block-editor/move-up",e)){const t=h();if(t.length){e.preventDefault();const n=g(t[0]);y(t,n)}}else if(m("core/block-editor/move-down",e)){const t=h();if(t.length){e.preventDefault();const n=g(t[0]);E(t,n)}}else if(m("core/block-editor/duplicate",e)){const t=h();t.length&&(e.preventDefault(),f(t))}else if(m("core/block-editor/remove",e)){const t=h();t.length&&(e.preventDefault(),b(t))}else if(m("core/block-editor/insert-after",e)){const t=h();t.length&&(e.preventDefault(),v(t[t.length-1]))}else if(m("core/block-editor/insert-before",e)){const t=h();t.length&&(e.preventDefault(),k(t[0]))}else if(m("core/block-editor/unselect",e)){if(e.target.closest("[role=toolbar]"))return;const t=h();t.length>1&&(e.preventDefault(),_(t[0]))}}},(0,s.createElement)(bw.Provider,{value:(0,u.useRef)(!1)},!l&&(0,s.createElement)(kw,{__unstableContentRef:t}),a&&(0,s.createElement)(iS,{__unstableContentRef:t,clientId:o}),p&&(0,s.createElement)(VC,{__unstableContentRef:t,clientId:o,isTyping:l}),c&&(0,s.createElement)(HC,{__unstableContentRef:t,clientId:o}),!i&&!r&&(0,s.createElement)(_l.Popover.Slot,{name:"block-toolbar",ref:w}),e,(0,s.createElement)(_l.Popover.Slot,{name:"__unstable-block-tools-after",ref:S}),i&&(0,s.createElement)(GC,{__unstableContentRef:t})))}function jC({shouldIframe:e=!0,height:t="300px",children:n=(0,s.createElement)(Xw,null),styles:o,contentRef:r,iframeProps:l}){const i=$w(),a=F_(),c=(0,u.useRef)(),d=(0,p.useMergeRefs)([r,a,c]);return e?(0,s.createElement)($C,{__unstableContentRef:c,style:{height:t,display:"flex"}},(0,s.createElement)(py,{...l,ref:i,contentRef:d,style:{...l?.style},name:"editor-canvas"},(0,s.createElement)(wy,{styles:o}),n)):(0,s.createElement)($C,{__unstableContentRef:c,style:{height:t,display:"flex"}},(0,s.createElement)(wy,{styles:o,scope:".editor-styles-wrapper"}),(0,s.createElement)(sy,{ref:d,className:"editor-styles-wrapper",tabIndex:-1,style:{height:"100%",width:"100%"}},n))}const WC=function({children:e,height:t,styles:n}){return(0,s.createElement)(jC,{height:t,styles:n},e)},KC=()=>(0,s.createElement)(_l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,s.createElement)(_l.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"})),ZC=({style:e,className:t})=>(0,s.createElement)("div",{className:"block-library-colors-selector__icon-container"},(0,s.createElement)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e},(0,s.createElement)(KC,null))),qC=({TextColor:e,BackgroundColor:t})=>({onToggle:n,isOpen:o})=>(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(_l.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,x.__)("Open Colors Selector"),onClick:n,onKeyDown:e=>{o||e.keyCode!==zs.DOWN||(e.preventDefault(),n())},icon:(0,s.createElement)(t,null,(0,s.createElement)(e,null,(0,s.createElement)(ZC,null)))})),YC=({children:e,...t})=>(w()("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,s.createElement)(_l.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:qC(t),renderContent:()=>e})),XC=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})),QC=(0,u.createContext)({}),JC=()=>(0,u.useContext)(QC);function ex({children:e,...t}){const n=(0,u.useRef)();return(0,u.useEffect)((()=>{n.current&&(n.current.textContent=n.current.textContent)}),[e]),(0,s.createElement)("div",{hidden:!0,...t,ref:n},e)}const tx=(0,u.forwardRef)((({nestingLevel:e,blockCount:t,clientId:n,...o},r)=>{const{insertedBlock:l,setInsertedBlock:i}=JC(),a=(0,p.useInstanceId)(tx),c=(0,d.useSelect)((e=>{const{getTemplateLock:t,__unstableGetEditorMode:o}=e(Nr);return!!t(n)||"zoom-out"===o()}),[n]),m=df({clientId:n,context:"list-view"}),h=df({clientId:l?.clientId,context:"list-view"});if((0,u.useEffect)((()=>{h?.length&&(0,vo.speak)((0,x.sprintf)((0,x.__)("%s block inserted"),h),"assertive")}),[h]),c)return null;const g=`list-view-appender__${a}`,f=(0,x.sprintf)((0,x.__)("Append to %1$s block at position %2$d, Level %3$d"),m,t+1,e);return(0,s.createElement)("div",{className:"list-view-appender"},(0,s.createElement)(lw,{ref:r,rootClientId:n,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:!1,__experimentalIsQuick:!0,...o,toggleProps:{"aria-describedby":g},onSelectOrClose:e=>{e?.clientId&&i(e)}}),(0,s.createElement)(ex,{id:g},f))})),nx=o_(_l.__experimentalTreeGridRow),ox=(0,u.forwardRef)((({isDragged:e,isSelected:t,position:n,level:o,rowCount:r,children:l,className:i,path:a,...c},u)=>{const d=l_({clientId:c["data-block"],enableAnimation:!0,triggerAnimationOnChange:a}),m=(0,p.useMergeRefs)([u,d]);return(0,s.createElement)(nx,{ref:m,className:ml()("block-editor-list-view-leaf",i),level:o,positionInSet:n,setSize:r,isExpanded:void 0,...c},l)})),rx=ox;const lx=(0,s.createElement)(Z.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.Path,{d:"M10.97 10.159a3.382 3.382 0 0 0-2.857.955l1.724 1.723-2.836 2.913L7 17h1.25l2.913-2.837 1.723 1.723a3.38 3.38 0 0 0 .606-.825c.33-.63.446-1.343.35-2.032L17 10.695 13.305 7l-2.334 3.159Z"})),ix=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.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"}));function sx({onClick:e}){return(0,s.createElement)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true","data-testid":"list-view-expander"},(0,s.createElement)(Ti,{icon:(0,x.isRTL)()?Zs:qs}))}const ax=3;function cx(e){if("core/image"===e.name)return e.attributes?.url?{url:e.attributes.url,alt:e.attributes.alt,clientId:e.clientId}:void 0}function ux(e,t){const n=cx(e);return n?[n]:t?[]:function(e){if("core/gallery"!==e.name||!e.innerBlocks)return[];const t=[];for(const n of e.innerBlocks){const e=cx(n);if(e&&t.push(e),t.length>=ax)return t}return t}(e)}const dx=(0,u.forwardRef)((function({className:e,block:{clientId:t,name:n},onClick:o,onContextMenu:r,onMouseDown:l,onToggleExpanded:i,tabIndex:a,onFocus:p,onDragStart:m,onDragEnd:h,draggable:g,isExpanded:f,ariaLabel:b,ariaDescribedBy:v,updateFocusAndSelection:k},_){const y=ih(t),E=df({clientId:t,context:"list-view"}),{isLocked:w}=Th(t),{canInsertBlockType:S,getSelectedBlockClientIds:C,getPreviousBlockClientId:B,getBlockRootClientId:I,getBlockOrder:T,getBlocksByClientId:M,getBlockAttributes:P,canRemoveBlocks:R}=(0,d.useSelect)(Nr),{duplicateBlocks:N,multiSelect:L,removeBlocks:A}=(0,d.useDispatch)(Nr),O=(0,A_.__unstableUseShortcutEventMatch)(),D="sticky"===y?.positionType,z=function({clientId:e,isExpanded:t}){const{block:n}=(0,d.useSelect)((t=>({block:t(Nr).getBlock(e)})),[e]);return(0,u.useMemo)((()=>ux(n,t)),[n,t])}({clientId:t,isExpanded:f}),{rootClientId:V}=JC(),F=P(t)?.metadata?.bindings,H=y?.positionLabel?(0,x.sprintf)((0,x.__)("Position: %1$s"),y.positionLabel):"";function G(){const e=C(),n=e.includes(t),o=n?e[0]:t,r=I(o);return{blocksToUpdate:n?e:[t],firstBlockClientId:o,firstBlockRootClientId:r,selectedBlockClientIds:e}}return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.Button,{className:ml()("block-editor-list-view-block-select-button",e),onClick:o,onContextMenu:r,onKeyDown:async function(e){if(e.keyCode===zs.ENTER||e.keyCode===zs.SPACE)o(e);else if(e.keyCode===zs.BACKSPACE||e.keyCode===zs.DELETE||O("core/block-editor/remove",e)){var t;const{blocksToUpdate:e,firstBlockClientId:n,firstBlockRootClientId:o,selectedBlockClientIds:r}=G();if(!R(e,o))return;let l=null!==(t=B(n))&&void 0!==t?t:o;A(e,!1);const i=r.length>0&&0===C().length;l||(l=T()[0]),k(l,i)}else if(O("core/block-editor/duplicate",e)){if(e.defaultPrevented)return;e.preventDefault();const{blocksToUpdate:t,firstBlockRootClientId:n}=G(),o=M(t).every((e=>!!e&&(0,c.hasBlockSupport)(e.name,"multiple",!0)&&S(e.name,n)));if(o){const e=await N(t,!1);e?.length&&k(e[0],!1)}}else if(O("core/block-editor/select-all",e)){if(e.defaultPrevented)return;e.preventDefault();const{firstBlockRootClientId:t,selectedBlockClientIds:n}=G(),o=T(t);if(!o.length)return;if(js()(n,o)&&t&&t!==V)return void k(t,!0);L(o[0],o[o.length-1],null)}},onMouseDown:l,ref:_,tabIndex:a,onFocus:p,onDragStart:e=>{e.dataTransfer.clearData(),m?.(e)},onDragEnd:h,draggable:g,href:`#block-${t}`,"aria-label":b,"aria-describedby":v,"aria-expanded":f},(0,s.createElement)(sx,{onClick:i}),(0,s.createElement)(qh,{icon:y?.icon,showColors:!0,context:"list-view"}),(0,s.createElement)(_l.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1},(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__title"},(0,s.createElement)(_l.__experimentalTruncate,{ellipsizeMode:"auto"},E)),y?.anchor&&(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper"},(0,s.createElement)(_l.__experimentalTruncate,{className:"block-editor-list-view-block-select-button__anchor",ellipsizeMode:"auto"},y.anchor)),F&&eg(n)&&(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__bindings"},(0,s.createElement)(Ti,{icon:AC})),H&&D&&(0,s.createElement)(_l.Tooltip,{text:H},(0,s.createElement)(Ti,{icon:lx})),z.length?(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__images","aria-hidden":!0},z.map(((e,t)=>(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__image",key:e.clientId,style:{backgroundImage:`url(${e.url})`,zIndex:z.length-t}})))):null,w&&(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__lock"},(0,s.createElement)(Ti,{icon:ix})))))})),px=(0,u.forwardRef)((({onClick:e,onToggleExpanded:t,block:n,isSelected:o,position:r,siblingBlockCount:l,level:i,isExpanded:a,selectedClientIds:c,...u},p)=>{const{clientId:m}=n,{blockMovingClientId:h,selectedBlockInBlockEditor:g}=(0,d.useSelect)((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n}=e(Nr);return{blockMovingClientId:t(),selectedBlockInBlockEditor:n()}}),[]),{AdditionalBlockContent:f,insertedBlock:b,setInsertedBlock:v}=JC(),k=h&&g===m,_=ml()("block-editor-list-view-block-contents",{"is-dropping-before":k}),y=c.includes(m)?c:[m];return(0,s.createElement)(s.Fragment,null,f&&(0,s.createElement)(f,{block:n,insertedBlock:b,setInsertedBlock:v}),(0,s.createElement)(sS,{appendToOwnerDocument:!0,clientIds:y,cloneClassname:"block-editor-list-view-draggable-chip"},(({draggable:c,onDragStart:d,onDragEnd:m})=>(0,s.createElement)(dx,{ref:p,className:_,block:n,onClick:e,onToggleExpanded:t,isSelected:o,position:r,siblingBlockCount:l,level:i,draggable:c,onDragStart:d,onDragEnd:m,isExpanded:a,...u}))))})),mx=px;function hx(e,t){const n=()=>{const n=t?.querySelector(`[role=row][data-block="${e}"]`);return n?As.focus.focusable.find(n)[0]:null};let o=n();o?o.focus():window.requestAnimationFrame((()=>{o=n(),o&&o.focus()}))}const gx=(0,u.memo)((function e({block:{clientId:t},displacement:n,isAfterDraggedBlocks:o,isDragged:r,isNesting:l,isSelected:i,isBranchSelected:a,selectBlock:m,position:h,level:g,rowCount:f,siblingBlockCount:b,showBlockMovers:v,path:k,isExpanded:_,selectedClientIds:y,isSyncedBranch:E}){const w=(0,u.useRef)(null),S=(0,u.useRef)(null),C=(0,u.useRef)(null),[B,I]=(0,u.useState)(!1),[T,M]=(0,u.useState)(),{isLocked:P,canEdit:R,canMove:N}=Th(t),L=i&&y[0]===t,A=i&&y[y.length-1]===t,{toggleBlockHighlight:O}=(0,d.useDispatch)(Nr),D=ih(t),z=D?.name||D?.title||(0,x.__)("Untitled"),{block:V,blockName:F,blockEditingMode:H}=(0,d.useSelect)((e=>{const{getBlock:n,getBlockName:o,getBlockEditingMode:r}=e(Nr);return{block:n(t),blockName:o(t),blockEditingMode:r(t)}}),[t]),G=(0,d.useSelect)((e=>e(Nr).getSettings().allowRightClickOverrides),[]),U=(0,c.hasBlockSupport)(F,"__experimentalToolbar",!0)&&"default"===H,$=`list-view-block-select-button__${(0,p.useInstanceId)(e)}`,{expand:j,collapse:W,BlockSettingsMenu:K,listViewInstanceId:Z,expandedState:q,setInsertedBlock:Y,treeGridElementRef:X}=JC(),Q=(0,u.useCallback)((()=>{I(!0),O(t,!0)}),[t,I,O]),J=(0,u.useCallback)((()=>{I(!1),O(t,!1)}),[t,I,O]),ee=(0,u.useCallback)((e=>{m(e,t),e.preventDefault()}),[t,m]),te=(0,u.useCallback)(((e,t)=>{t&&m(void 0,e,null,null),hx(e,X?.current)}),[m,X]),ne=(0,u.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===_?W(t):!1===_&&j(t)}),[t,j,W,_]),oe=(0,u.useCallback)((e=>{U&&G&&(C.current?.click(),M(new window.DOMRect(e.clientX,e.clientY,0,0)),e.preventDefault())}),[G,C,U]),re=(0,u.useCallback)((e=>{G&&2===e.button&&e.preventDefault()}),[G]),le=(0,u.useMemo)((()=>{const{ownerDocument:e}=S?.current||{};if(T&&e)return{ownerDocument:e,getBoundingClientRect:()=>T}}),[T]),ie=(0,u.useCallback)((()=>{M(void 0)}),[M]);if(function({isSelected:e,selectedClientIds:t,rowItemRef:n}){const o=1===t.length;(0,u.useLayoutEffect)((()=>{if(!e||!o||!n.current)return;const t=(0,As.getScrollContainer)(n.current),{ownerDocument:r}=n.current;if(t===r.body||t===r.documentElement||!t)return;const l=n.current.getBoundingClientRect(),i=t.getBoundingClientRect();(l.top<i.top||l.bottom>i.bottom)&&n.current.scrollIntoView()}),[e,o,n])}({isSelected:i,rowItemRef:S,selectedClientIds:y}),!V)return null;const se=((e,t,n)=>(0,x.sprintf)((0,x.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(h,b,g),ae=P?(0,x.sprintf)((0,x.__)("%s (locked)"),z):z,ce=(0,x.sprintf)((0,x.__)("Options for %s"),z),ue=v&&b>0,de=ml()("block-editor-list-view-block__mover-cell",{"is-visible":B||i}),pe=ml()("block-editor-list-view-block__menu-cell",{"is-visible":B||L});let me;ue?me=2:U||(me=3);const he=ml()({"is-selected":i,"is-first-selected":L,"is-last-selected":A,"is-branch-selected":a,"is-synced-branch":E,"is-dragging":r,"has-single-cell":!U,"is-synced":D?.isSynced,"is-draggable":N,"is-displacement-normal":"normal"===n,"is-displacement-up":"up"===n,"is-displacement-down":"down"===n,"is-after-dragged-blocks":o,"is-nesting":l}),ge=y.includes(t)?y:[t],fe=i&&1===y.length;return(0,s.createElement)(rx,{className:he,isDragged:r,onKeyDown:e=>{e.keyCode===zs.ESCAPE&&!e.defaultPrevented&&y.length>0&&(e.stopPropagation(),e.preventDefault(),m(e,void 0))},onMouseEnter:Q,onMouseLeave:J,onFocus:Q,onBlur:J,level:g,position:h,rowCount:f,path:k,id:`list-view-${Z}-block-${t}`,"data-block":t,"data-expanded":R?_:void 0,ref:S},(0,s.createElement)(_l.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:me,ref:w,"aria-selected":!!i},(({ref:e,tabIndex:t,onFocus:n})=>(0,s.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,s.createElement)(mx,{block:V,onClick:ee,onContextMenu:oe,onMouseDown:re,onToggleExpanded:ne,isSelected:i,position:h,siblingBlockCount:b,level:g,ref:e,tabIndex:fe?0:t,onFocus:n,isExpanded:R?_:void 0,selectedClientIds:y,ariaLabel:ae,ariaDescribedBy:$,updateFocusAndSelection:te}),(0,s.createElement)(ex,{id:$},se)))),ue&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.__experimentalTreeGridCell,{className:de,withoutGridItem:!0},(0,s.createElement)(_l.__experimentalTreeGridItem,null,(({ref:e,tabIndex:n,onFocus:o})=>(0,s.createElement)(gS,{orientation:"vertical",clientIds:[t],ref:e,tabIndex:n,onFocus:o}))),(0,s.createElement)(_l.__experimentalTreeGridItem,null,(({ref:e,tabIndex:n,onFocus:o})=>(0,s.createElement)(fS,{orientation:"vertical",clientIds:[t],ref:e,tabIndex:n,onFocus:o}))))),U&&K&&(0,s.createElement)(_l.__experimentalTreeGridCell,{className:pe,"aria-selected":!!i,ref:C},(({ref:e,tabIndex:t,onFocus:n})=>(0,s.createElement)(K,{clientIds:ge,block:V,icon:Ef,label:ce,popoverProps:{anchor:le},toggleProps:{ref:e,className:"block-editor-list-view-block__menu",tabIndex:t,onClick:ie,onFocus:n},disableOpenOnArrowDown:!0,expand:j,expandedState:q,setInsertedBlock:Y,__experimentalSelectBlock:te}))))}));function fx(e,t,n,o){var r;const l=n?.includes(e.clientId);if(l)return 0;return(null!==(r=t[e.clientId])&&void 0!==r?r:o)?1+e.innerBlocks.reduce(bx(t,n,o),0):1}const bx=(e,t,n)=>(o,r)=>{var l;const i=t?.includes(r.clientId);if(i)return o;return(null!==(l=e[r.clientId])&&void 0!==l?l:n)&&r.innerBlocks.length>0?o+fx(r,e,t,n):o+1},vx=()=>{};const kx=(0,u.memo)((function e(t){const{blocks:n,selectBlock:o=vx,showBlockMovers:r,selectedClientIds:l,level:i=1,path:a="",isBranchSelected:c=!1,listPosition:u=0,fixedListWindow:p,isExpanded:m,parentId:h,shouldShowInnerBlocks:g=!0,isSyncedBranch:f=!1,showAppender:b=!0}=t,v=ih(h),k=f||!!v?.isSynced,_=(0,d.useSelect)((e=>!h||e(Nr).canEditBlock(h)),[h]),{blockDropPosition:y,blockDropTargetIndex:E,firstDraggedBlockIndex:w,blockIndexes:S,expandedState:C,draggedClientIds:x}=JC();if(!_)return null;const B=b&&1===i,I=n.filter(Boolean),T=I.length,M=B?T+1:T;let P=u;return(0,s.createElement)(s.Fragment,null,I.map(((t,n)=>{var u;const{clientId:h,innerBlocks:f}=t;n>0&&(P+=fx(I[n-1],C,x,m));const b=!!x?.includes(h),{displacement:v,isAfterDraggedBlocks:_,isNesting:B}=function({blockIndexes:e,blockDropTargetIndex:t,blockDropPosition:n,clientId:o,firstDraggedBlockIndex:r,isDragged:l}){let i,s,a;if(!l){s=!1;const l=e[o];a=l>r,null!=t&&void 0!==r?void 0!==l&&(i=l>=r&&l<t?"up":l<r&&l>=t?"down":"normal",s="number"==typeof t&&t-1===l&&"inside"===n):null===t&&void 0!==r?i=void 0!==l&&l>=r?"up":"normal":null!=t&&void 0===r?void 0!==l&&(i=l<t?"normal":"down"):null===t&&(i="normal")}return{displacement:i,isNesting:s,isAfterDraggedBlocks:a}}({blockIndexes:S,blockDropTargetIndex:E,blockDropPosition:y,clientId:h,firstDraggedBlockIndex:w,isDragged:b}),{itemInView:R}=p,N=R(P),L=n+1,A=a.length>0?`${a}_${L}`:`${L}`,O=!!f?.length,D=O&&g?null!==(u=C[h])&&void 0!==u?u:m:void 0,z=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(h,l),V=c||z&&O,F=b||N||z&&h===l[0];return(0,s.createElement)(d.AsyncModeProvider,{key:h,value:!z},F&&(0,s.createElement)(gx,{block:t,selectBlock:o,isSelected:z,isBranchSelected:V,isDragged:b,level:i,position:L,rowCount:M,siblingBlockCount:T,showBlockMovers:r,path:A,isExpanded:!b&&D,listPosition:P,selectedClientIds:l,isSyncedBranch:k,displacement:v,isAfterDraggedBlocks:_,isNesting:B}),!F&&(0,s.createElement)("tr",null,(0,s.createElement)("td",{className:"block-editor-list-view-placeholder"})),O&&D&&!b&&(0,s.createElement)(e,{parentId:h,blocks:f,selectBlock:o,showBlockMovers:r,level:i+1,path:A,listPosition:P+1,fixedListWindow:p,isBranchSelected:V,selectedClientIds:l,isExpanded:m,isSyncedBranch:k}))})),B&&(0,s.createElement)(_l.__experimentalTreeGridRow,{level:i,setSize:M,positionInSet:M,isExpanded:!0},(0,s.createElement)(_l.__experimentalTreeGridCell,null,(e=>(0,s.createElement)(tx,{clientId:h,nestingLevel:i,blockCount:T,...e})))))}));function _x({draggedBlockClientId:e,listViewRef:t,blockDropTarget:n}){const o=ih(e),r=df({clientId:e,context:"list-view"}),{rootClientId:l,clientId:i,dropPosition:a}=n||{},[c,d]=(0,u.useMemo)((()=>{if(!t.current)return[];return[l?t.current.querySelector(`[data-block="${l}"]`):void 0,i?t.current.querySelector(`[data-block="${i}"]`):void 0]}),[t,l,i]),p=d||c,m=(0,x.isRTL)(),h=(0,u.useCallback)(((e,t)=>{if(!p)return 0;let n=p.offsetWidth;const o=(0,As.getScrollContainer)(p,"horizontal"),r=p.ownerDocument,l=o===r.body||o===r.documentElement;if(o&&!l){const r=o.getBoundingClientRect(),l=(0,x.isRTL)()?r.right-e.right:e.left-r.left,i=o.clientWidth;if(i<n+l&&(n=i-l),!m&&e.left+t<r.left)return n-=r.left-e.left,n;if(m&&e.right-t>r.right)return n-=e.right-r.right,n}return n-t}),[m,p]),g=(0,u.useMemo)((()=>{if(!p)return{};const e=p.getBoundingClientRect();return{width:h(e,0)}}),[h,p]),f=(0,u.useMemo)((()=>{if(!p)return{};const e=(0,As.getScrollContainer)(p),t=p.ownerDocument,n=e===t.body||e===t.documentElement;if(e&&!n){const t=e.getBoundingClientRect(),n=p.getBoundingClientRect(),o=m?t.right-n.right:n.left-t.left;if(!m&&t.left>n.left)return{transform:`translateX( ${o}px )`};if(m&&t.right<n.right)return{transform:`translateX( ${-1*o}px )`}}return{}}),[m,p]),b=(0,u.useMemo)((()=>{if(!c)return 1;const e=parseInt(c.getAttribute("aria-level"),10);return e?e+1:1}),[c]),v=(0,u.useMemo)((()=>!!p&&p.classList.contains("is-branch-selected")),[p]),k=(0,u.useMemo)((()=>{if(p&&("top"===a||"bottom"===a||"inside"===a))return{contextElement:p,getBoundingClientRect(){const e=p.getBoundingClientRect();let t=e.left,n=0;const o=(0,As.getScrollContainer)(p,"horizontal"),r=p.ownerDocument,l=o===r.body||o===r.documentElement;if(o&&!l){const e=o.getBoundingClientRect(),n=m?o.offsetWidth-o.clientWidth:0;t<e.left+n&&(t=e.left+n)}n="top"===a?e.top-2*e.height:e.top;const i=h(e,0),s=e.height;return new window.DOMRect(t,n,i,s)}}}),[p,a,h,m]);return p?(0,s.createElement)(_l.Popover,{animate:!1,anchor:k,focusOnMount:!1,className:"block-editor-list-view-drop-indicator--preview",variant:"unstyled",flip:!1,resize:!0},(0,s.createElement)("div",{style:g,className:ml()("block-editor-list-view-drop-indicator__line",{"block-editor-list-view-drop-indicator__line--darker":v})},(0,s.createElement)("div",{className:"block-editor-list-view-leaf","aria-level":b},(0,s.createElement)("div",{className:ml()("block-editor-list-view-block-select-button","block-editor-list-view-block-contents"),style:f},(0,s.createElement)(sx,{onClick:()=>{}}),(0,s.createElement)(qh,{icon:o?.icon,showColors:!0,context:"list-view"}),(0,s.createElement)(_l.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1},(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__title"},(0,s.createElement)(_l.__experimentalTruncate,{ellipsizeMode:"auto"},r)))),(0,s.createElement)("div",{className:"block-editor-list-view-block__menu-cell"})))):null}function yx(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,d.useDispatch)(Nr),{getBlockName:o,getBlockParents:r,getBlockSelectionStart:l,getSelectedBlockClientIds:i,hasMultiSelection:s,hasSelectedBlock:a}=(0,d.useSelect)(Nr),{getBlockType:p}=(0,d.useSelect)(c.store);return{updateBlockSelection:(0,u.useCallback)((async(c,u,d,m)=>{if(!c?.shiftKey&&c?.keyCode!==zs.ESCAPE)return void n(u,m);c.preventDefault();const h="keydown"===c.type&&c.keyCode===zs.ESCAPE,g="keydown"===c.type&&(c.keyCode===zs.UP||c.keyCode===zs.DOWN||c.keyCode===zs.HOME||c.keyCode===zs.END);if(!g&&!a()&&!s())return void n(u,null);const f=i(),b=[...r(u),u];if((h||g&&!f.some((e=>b.includes(e))))&&await e(),!h){let e=l(),n=u;g&&(a()||s()||(e=u),d&&(n=d));const o=r(e),i=r(n),{start:c,end:p}=function(e,t,n,o){const r=[...n,e],l=[...o,t],i=Math.min(r.length,l.length)-1;return{start:r[i],end:l[i]}}(e,n,o,i);await t(c,p,null)}const v=i();if((c.keyCode===zs.HOME||c.keyCode===zs.END)&&v.length>1)return;const k=f.filter((e=>!v.includes(e)));let _;if(1===k.length){const e=p(o(k[0]))?.title;e&&(_=(0,x.sprintf)((0,x.__)("%s deselected."),e))}else k.length>1&&(_=(0,x.sprintf)((0,x.__)("%s blocks deselected."),k.length));_&&(0,vo.speak)(_,"assertive")}),[e,o,p,r,l,i,s,a,t,n])}}const Ex=28;function wx(e,t){const n=e[t+1];return n&&n.isDraggedBlock?wx(e,t+1):n}const Sx=["top","bottom"];function Cx(e,t,n=!1){let o,r,l,i,s;for(let n=0;n<e.length;n++){const a=e[n];if(a.isDraggedBlock)continue;const c=a.element.getBoundingClientRect(),[u,d]=Iw(t,c,Sx),p=Tw(t,c);if(void 0===l||u<l||p){l=u;const t=e.indexOf(a),n=e[t-1];if("top"===d&&n&&n.rootClientId===a.rootClientId&&!n.isDraggedBlock?(r=n,o="bottom",i=n.element.getBoundingClientRect(),s=t-1):(r=a,o=d,i=c,s=t),p)break}}if(!r)return;const a=function(e,t){const n=[];let o=e;for(;o;)n.push({...o}),o=t.find((e=>e.clientId===o.rootClientId));return n}(r,e),c="bottom"===o;if(c&&r.canInsertDraggedBlocksAsChild&&(r.innerBlockCount>0&&r.isExpanded||function(e,t,n=1,o=!1){const r=o?t.right-n*Ex:t.left+n*Ex;return(o?e.x<r-Ex:e.x>r+Ex)&&e.y<t.bottom}(t,i,a.length,n))){const e=r.isExpanded?0:r.innerBlockCount||0;return{rootClientId:r.clientId,clientId:r.clientId,blockIndex:e,dropPosition:"inside"}}if(c&&r.rootClientId&&function(e,t,n=1,o=!1){const r=o?t.right-n*Ex:t.left+n*Ex;return o?e.x>r:e.x<r}(t,i,a.length,n)){const l=wx(e,s),c=r.nestingLevel,u=l?l.nestingLevel:1;if(c&&u){const d=function(e,t,n=1,o=!1){const r=o?t.right-n*Ex:t.left+n*Ex,l=o?r-e.x:e.x-r,i=Math.round(l/Ex);return Math.abs(i)}(t,i,a.length,n),p=Math.max(Math.min(d,c-u),0);if(a[p]){let t=r.blockIndex;if(a[p].nestingLevel===l?.nestingLevel)t=l?.blockIndex;else for(let n=s;n>=0;n--){const o=e[n];if(o.rootClientId===a[p].rootClientId){t=o.blockIndex+1;break}}return{rootClientId:a[p].rootClientId,clientId:r.clientId,blockIndex:t,dropPosition:o}}}}if(!r.canInsertDraggedBlocksAsSibling)return;const u=c?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+u,dropPosition:o}}const xx={leading:!1,trailing:!0};function Bx({selectBlock:e}){const t=(0,d.useRegistry)(),{getBlockOrder:n,getBlockRootClientId:o,getBlocksByClientId:r,getPreviousBlockClientId:l,getSelectedBlockClientIds:i,getSettings:s,canInsertBlockType:a,canRemoveBlocks:c}=(0,d.useSelect)(Nr),{flashBlock:u,removeBlocks:m,replaceBlocks:h,insertBlocks:g}=(0,d.useDispatch)(Nr),f=ey();return(0,p.useRefEffect)((d=>{function p(t,n){n&&e(void 0,t,null,null),hx(t,d)}function b(e){if(e.defaultPrevented)return;if(!d.contains(e.target.ownerDocument.activeElement))return;const b=e.target.ownerDocument.activeElement?.closest("[role=row]"),v=b?.dataset?.block;if(!v)return;const{blocksToUpdate:k,firstBlockClientId:_,firstBlockRootClientId:y,originallySelectedBlockClientIds:E}=function(e){const t=i(),n=t.includes(e),r=n?t[0]:e;return{blocksToUpdate:n?t:[e],firstBlockClientId:r,firstBlockRootClientId:o(r),originallySelectedBlockClientIds:t}}(v);if(0!==k.length){if(e.preventDefault(),"copy"===e.type||"cut"===e.type){1===k.length&&u(k[0]),f(e.type,k);oy(e,r(k),t)}if("cut"===e.type){var w;if(!c(k,y))return;let e=null!==(w=l(_))&&void 0!==w?w:y;m(k,!1);const t=E.length>0&&0===i().length;e||(e=n()[0]),p(e,t)}else if("paste"===e.type){const{__experimentalCanUserUseUnfilteredHTML:t}=s(),n=ry(e,t);if(1===k.length){const[e]=k;if(n.every((t=>a(t.name,e))))return g(n,void 0,e),void p(n[0]?.clientId,!1)}h(k,n,n.length-1,-1),p(n[0]?.clientId,!1)}}}return d.ownerDocument.addEventListener("copy",b),d.ownerDocument.addEventListener("cut",b),d.ownerDocument.addEventListener("paste",b),()=>{d.ownerDocument.removeEventListener("copy",b),d.ownerDocument.removeEventListener("cut",b),d.ownerDocument.removeEventListener("paste",b)}}),[])}const Ix=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;const Tx=(0,u.forwardRef)((function e({id:t,blocks:n,dropZoneElement:o,showBlockMovers:r=!1,isExpanded:l=!1,showAppender:i=!1,blockSettingsMenu:a=kC,rootClientId:c,description:m,onSelect:h,additionalBlockContent:g},f){n&&w()("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});const b=(0,p.useInstanceId)(e),{clientIdsTree:v,draggedClientIds:k,selectedClientIds:_}=function({blocks:e,rootClientId:t}){return(0,d.useSelect)((n=>{const{getDraggedBlockClientIds:o,getSelectedBlockClientIds:r,getEnabledClientIdsTree:l}=ie(n(Nr));return{selectedClientIds:r(),draggedClientIds:o(),clientIdsTree:null!=e?e:l(t)}}),[e,t])}({blocks:n,rootClientId:c}),y=function(e){const t=(0,u.useMemo)((()=>{const t={};let n=0;const o=e=>{e.forEach((e=>{t[e.clientId]=n,n++,e.innerBlocks.length>0&&o(e.innerBlocks)}))};return o(e),t}),[e]);return t}(v),{getBlock:E}=(0,d.useSelect)(Nr),{visibleBlockCount:S,shouldShowInnerBlocks:C}=(0,d.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n,__unstableGetEditorMode:o}=e(Nr),r=k?.length>0?n(k).length+1:0;return{visibleBlockCount:t()-r,shouldShowInnerBlocks:"zoom-out"!==o()}}),[k]),{updateBlockSelection:B}=yx(),[I,T]=(0,u.useReducer)(Ix,{}),[M,P]=(0,u.useState)(null),{setSelectedTreeId:R}=function({firstSelectedBlockClientId:e,setExpandedState:t}){const[n,o]=(0,u.useState)(null),{selectedBlockParentClientIds:r}=(0,d.useSelect)((t=>{const{getBlockParents:n}=t(Nr);return{selectedBlockParentClientIds:n(e,!1)}}),[e]);return(0,u.useEffect)((()=>{n!==e&&r?.length&&t({type:"expand",clientIds:r})}),[e,r,n,t]),{setSelectedTreeId:o}}({firstSelectedBlockClientId:_[0],setExpandedState:T}),N=(0,u.useCallback)(((e,t,n)=>{B(e,t,null,n),R(t),h&&h(E(t))}),[R,B,h,E]),{ref:L,target:A}=function({dropZoneElement:e,expandedState:t,setExpandedState:n}){const{getBlockRootClientId:o,getBlockIndex:r,getBlockCount:l,getDraggedBlockClientIds:i,canInsertBlocks:s}=(0,d.useSelect)(Nr),[a,c]=(0,u.useState)(),{rootClientId:m,blockIndex:h}=a||{},g=Bw(m,h),f=(0,x.isRTL)(),b=(0,p.usePrevious)(m),v=(0,u.useCallback)(((e,t)=>{const{rootClientId:o}=t||{};o&&("inside"!==t?.dropPosition||e[o]||n({type:"expand",clientIds:[o]}))}),[n]),k=(0,p.useThrottle)(v,500,xx);(0,u.useEffect)((()=>{"inside"===a?.dropPosition&&b===a?.rootClientId?k(t,a):k.cancel()}),[t,b,a,k]);const _=i(),y=(0,p.useThrottle)((0,u.useCallback)(((e,t)=>{const n={x:e.clientX,y:e.clientY},i=!!_?.length,a=Cx(Array.from(t.querySelectorAll("[data-block]")).map((e=>{const t=e.dataset.block,n="true"===e.dataset.expanded,a=e.classList.contains("is-dragging"),c=parseInt(e.getAttribute("aria-level"),10),u=o(t);return{clientId:t,isExpanded:n,rootClientId:u,blockIndex:r(t),element:e,nestingLevel:c||void 0,isDraggedBlock:!!i&&a,innerBlockCount:l(t),canInsertDraggedBlocksAsSibling:!i||s(_,u),canInsertDraggedBlocksAsChild:!i||s(_,t)}})),n,f);a&&c(a)}),[s,_,l,r,o,f]),50);return{ref:(0,p.__experimentalUseDropZone)({dropZoneElement:e,onDrop(e){a&&g(e)},onDragLeave(){y.cancel(),c(null)},onDragOver(e){y(e,e.currentTarget)},onDragEnd(){y.cancel(),c(void 0)}}),target:a}}({dropZoneElement:o,expandedState:I,setExpandedState:T}),O=(0,u.useRef)(),D=Bx({selectBlock:N}),z=(0,p.useMergeRefs)([D,O,L,f]);(0,u.useEffect)((()=>{_?.length&&hx(_[0],O?.current)}),[]);const V=(0,u.useCallback)((e=>{e&&T({type:"expand",clientIds:[e]})}),[T]),F=(0,u.useCallback)((e=>{e&&T({type:"collapse",clientIds:[e]})}),[T]),H=(0,u.useCallback)((e=>{V(e?.dataset?.block)}),[V]),G=(0,u.useCallback)((e=>{F(e?.dataset?.block)}),[F]),U=(0,u.useCallback)(((e,t,n)=>{e.shiftKey&&B(e,t?.dataset?.block,n?.dataset?.block)}),[B]),$=k?.[0],{blockDropTargetIndex:j,blockDropPosition:W,firstDraggedBlockIndex:K}=(0,u.useMemo)((()=>{let e,t;if(A?.clientId){const t=y[A.clientId];e=void 0===t||"top"===A?.dropPosition?t:t+1}else null===A&&(e=null);if($){const e=y[$];t=void 0===e||"top"===A?.dropPosition?e:e+1}return{blockDropTargetIndex:e,blockDropPosition:A?.dropPosition,firstDraggedBlockIndex:t}}),[A,y,$]),Z=(0,u.useMemo)((()=>({blockDropPosition:W,blockDropTargetIndex:j,blockIndexes:y,draggedClientIds:k,expandedState:I,expand:V,firstDraggedBlockIndex:K,collapse:F,BlockSettingsMenu:a,listViewInstanceId:b,AdditionalBlockContent:g,insertedBlock:M,setInsertedBlock:P,treeGridElementRef:O,rootClientId:c})),[W,j,y,k,I,V,K,F,a,b,g,M,P,c]),[q]=(0,p.__experimentalUseFixedWindowList)(O,36,S,{expandedState:I,useWindowing:!0,windowOverscan:40});if(!v.length&&!i)return null;const Y=m&&`block-editor-list-view-description-${b}`;return(0,s.createElement)(d.AsyncModeProvider,{value:!0},(0,s.createElement)(_x,{draggedBlockClientId:$,listViewRef:O,blockDropTarget:A}),m&&(0,s.createElement)(_l.VisuallyHidden,{id:Y},m),(0,s.createElement)(_l.__experimentalTreeGrid,{id:t,className:ml()("block-editor-list-view-tree",{"is-dragging":k?.length>0&&void 0!==j}),"aria-label":(0,x.__)("Block navigation structure"),ref:z,onCollapseRow:G,onExpandRow:H,onFocusRow:U,applicationAriaLabel:(0,x.__)("Block navigation structure"),"aria-describedby":Y,style:{"--wp-admin--list-view-dragged-items-height":k?.length?36*(k.length-1)+"px":null}},(0,s.createElement)(QC.Provider,{value:Z},(0,s.createElement)(kx,{blocks:v,parentId:c,selectBlock:N,showBlockMovers:r,fixedListWindow:q,selectedClientIds:_,isExpanded:l,shouldShowInnerBlocks:C,showAppender:i}))))})),Mx=(0,u.forwardRef)(((e,t)=>(0,s.createElement)(Tx,{ref:t,...e,showAppender:!1,rootClientId:null,onSelect:null,additionalBlockContent:null,blockSettingsMenu:void 0})));function Px({isEnabled:e,onToggle:t,isOpen:n,innerRef:o,...r}){return(0,s.createElement)(_l.Button,{...r,ref:o,icon:XC,"aria-expanded":n,"aria-haspopup":"true",onClick:e?t:void 0,label:(0,x.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e})}const Rx=(0,u.forwardRef)((function({isDisabled:e,...t},n){w()("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});const o=(0,d.useSelect)((e=>!!e(Nr).getBlockCount()),[])&&!e;return(0,s.createElement)(_l.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:e,onToggle:r})=>(0,s.createElement)(Px,{...t,innerRef:n,isOpen:e,onToggle:r,isEnabled:o}),renderContent:()=>(0,s.createElement)("div",{className:"block-editor-block-navigation__container"},(0,s.createElement)("p",{className:"block-editor-block-navigation__label"},(0,x.__)("List view")),(0,s.createElement)(Mx,null))})}));function Nx({genericPreviewBlock:e,style:t,className:n,activeStyle:o}){const r=(0,c.getBlockType)(e.name)?.example,l=RS(n,o,t),i=(0,u.useMemo)((()=>({...e,title:t.label||t.name,description:t.description,initialAttributes:{...e.attributes,className:l+" block-editor-block-styles__block-preview-container"},example:r})),[e,l]);return(0,s.createElement)(Py,{item:i})}const Lx=()=>{};const Ax=function({clientId:e,onSwitch:t=Lx,onHoverClassName:n=Lx}){const{onSelect:o,stylesToRender:r,activeStyle:l,genericPreviewBlock:i,className:a}=LS({clientId:e,onSwitch:t}),[c,d]=(0,u.useState)(null),m=(0,p.useViewportMatch)("medium","<");if(!r||0===r.length)return null;const h=(0,p.debounce)(d,250),g=e=>{var t;c!==e?(h(e),n(null!==(t=e?.name)&&void 0!==t?t:null)):h.cancel()};return(0,s.createElement)("div",{className:"block-editor-block-styles"},(0,s.createElement)("div",{className:"block-editor-block-styles__variants"},r.map((e=>{const t=e.label||e.name;return(0,s.createElement)(_l.Button,{__next40pxDefaultSize:!0,className:ml()("block-editor-block-styles__item",{"is-active":l.name===e.name}),key:e.name,variant:"secondary",label:t,onMouseEnter:()=>g(e),onFocus:()=>g(e),onMouseLeave:()=>g(null),onBlur:()=>g(null),onClick:()=>(e=>{o(e),n(null),d(null),h.cancel()})(e),"aria-current":l.name===e.name},(0,s.createElement)(_l.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text"},t))}))),c&&!m&&(0,s.createElement)(_l.Popover,{placement:"left-start",offset:34,focusOnMount:!1},(0,s.createElement)("div",{className:"block-editor-block-styles__preview-panel",onMouseLeave:()=>g(null)},(0,s.createElement)(Nx,{activeStyle:l,className:a,genericPreviewBlock:i,style:c}))))},Ox={0:(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"})),1:(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})),2:(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M9 11.1H5v-4H3v10h2v-4h4v4h2v-10H9v4zm8 4c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6v1.5h8v-2H17z"})),3:(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.3 1.7c-.4-.4-1-.7-1.6-.8v-.1c.6-.2 1.1-.5 1.5-.9.3-.4.5-.8.5-1.3 0-.4-.1-.8-.3-1.1-.2-.3-.5-.6-.8-.8-.4-.2-.8-.4-1.2-.5-.6-.1-1.1-.2-1.6-.2-.6 0-1.3.1-1.8.3s-1.1.5-1.6.9l1.2 1.4c.4-.2.7-.4 1.1-.6.3-.2.7-.3 1.1-.3.4 0 .8.1 1.1.3.3.2.4.5.4.8 0 .4-.2.7-.6.9-.7.3-1.5.5-2.2.4v1.6c.5 0 1 0 1.5.1.3.1.7.2 1 .3.2.1.4.2.5.4s.1.4.1.6c0 .3-.2.7-.5.8-.4.2-.9.3-1.4.3s-1-.1-1.4-.3c-.4-.2-.8-.4-1.2-.7L13 15.6c.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.6 0 1.1-.1 1.6-.2.4-.1.9-.2 1.3-.5.4-.2.7-.5.9-.9.2-.4.3-.8.3-1.2 0-.6-.3-1.1-.7-1.5z"})),4:(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})),5:(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.7 1.2c-.2-.3-.5-.7-.8-.9-.3-.3-.7-.5-1.1-.6-.5-.1-.9-.2-1.4-.2-.2 0-.5.1-.7.1-.2.1-.5.1-.7.2l.1-1.9h4.3V7H14l-.3 5 1 .6.5-.2.4-.1c.1-.1.3-.1.4-.1h.5c.5 0 1 .1 1.4.4.4.2.6.7.6 1.1 0 .4-.2.8-.6 1.1-.4.3-.9.4-1.4.4-.4 0-.9-.1-1.3-.3-.4-.2-.7-.4-1.1-.7 0 0-1.1 1.4-1 1.5.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.5 0 1-.1 1.5-.3s.9-.4 1.3-.7c.4-.3.7-.7.9-1.1s.3-.9.3-1.4-.1-1-.3-1.4z"})),6:(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M20.7 12.4c-.2-.3-.4-.6-.7-.9s-.6-.5-1-.6c-.4-.2-.8-.2-1.2-.2-.5 0-.9.1-1.3.3s-.8.5-1.2.8c0-.5 0-.9.2-1.4l.6-.9c.2-.2.5-.4.8-.5.6-.2 1.3-.2 1.9 0 .3.1.6.3.8.5 0 0 1.3-1.3 1.3-1.4-.4-.3-.9-.6-1.4-.8-.6-.2-1.3-.3-2-.3-.6 0-1.1.1-1.7.4-.5.2-1 .5-1.4.9-.4.4-.8 1-1 1.6-.3.7-.4 1.5-.4 2.3s.1 1.5.3 2.1c.2.6.6 1.1 1 1.5.4.4.9.7 1.4.9 1 .3 2 .3 3 0 .4-.1.8-.3 1.2-.6.3-.3.6-.6.8-1 .2-.5.3-.9.3-1.4s-.1-.9-.3-1.3zm-2 2.1c-.1.2-.3.4-.4.5-.1.1-.3.2-.5.2-.2.1-.4.1-.6.1-.2.1-.5 0-.7-.1-.2 0-.3-.2-.5-.3-.1-.2-.3-.4-.4-.6-.2-.3-.3-.7-.3-1 .3-.3.6-.5 1-.7.3-.1.7-.2 1-.2.4 0 .8.1 1.1.3.3.3.4.7.4 1.1 0 .2 0 .5-.1.7zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z"}))};function Dx({level:e}){return Ox[e]?(0,s.createElement)(_l.Icon,{icon:Ox[e]}):null}const zx=[1,2,3,4,5,6],Vx={className:"block-library-heading-level-dropdown"};function Fx({options:e=zx,value:t,onChange:n}){return(0,s.createElement)(_l.ToolbarDropdownMenu,{popoverProps:Vx,icon:(0,s.createElement)(Dx,{level:t}),label:(0,x.__)("Change level"),controls:e.map((e=>{{const o=e===t;return{icon:(0,s.createElement)(Dx,{level:e,isPressed:o}),title:0===e?(0,x.__)("Paragraph"):(0,x.sprintf)((0,x.__)("Heading %d"),e),isActive:o,onClick(){n(e)},role:"menuitemradio"}}}))})}const Hx=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.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"}));const Gx=function({icon:e=Hx,label:t=(0,x.__)("Choose variation"),instructions:n=(0,x.__)("Select a variation to start with."),variations:o,onSelect:r,allowSkip:l}){const i=ml()("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return(0,s.createElement)(_l.Placeholder,{icon:e,label:t,instructions:n,className:i},(0,s.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,x.__)("Block variations")},o.map((e=>(0,s.createElement)("li",{key:e.name},(0,s.createElement)(_l.Button,{variant:"secondary",icon:e.icon&&e.icon.src?e.icon.src:e.icon,iconSize:48,onClick:()=>r(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,s.createElement)("span",{className:"block-editor-block-variation-picker__variation-label"},e.title))))),l&&(0,s.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,s.createElement)(_l.Button,{variant:"link",onClick:()=>r()},(0,x.__)("Skip"))))},Ux=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"})),$x="carousel",jx="grid",Wx=({onBlockPatternSelect:e})=>(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},(0,s.createElement)(_l.Button,{variant:"primary",onClick:e},(0,x.__)("Choose"))),Kx=({handlePrevious:e,handleNext:t,activeSlide:n,totalSlides:o})=>(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},(0,s.createElement)(_l.Button,{icon:M_,label:(0,x.__)("Previous pattern"),onClick:e,disabled:0===n,__experimentalIsFocusable:!0}),(0,s.createElement)(_l.Button,{icon:T_,label:(0,x.__)("Next pattern"),onClick:t,disabled:n===o-1,__experimentalIsFocusable:!0})),Zx=({viewMode:e,setViewMode:t,handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:l,onBlockPatternSelect:i})=>{const a=e===$x,c=(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},(0,s.createElement)(_l.Button,{icon:Xi,label:(0,x.__)("Carousel view"),onClick:()=>t($x),isPressed:a}),(0,s.createElement)(_l.Button,{icon:Ux,label:(0,x.__)("Grid view"),onClick:()=>t(jx),isPressed:e===jx}));return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},a&&(0,s.createElement)(Kx,{handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:l}),c,a&&(0,s.createElement)(Wx,{onBlockPatternSelect:i}))};const qx=function(e,t,n){return(0,d.useSelect)((o=>{const{getBlockRootClientId:r,getPatternsByBlockTypes:l,__experimentalGetAllowedPatterns:i}=o(Nr),s=r(e);return n?i(s).filter(n):l(t,s)}),[e,t,n])},{CompositeV2:Yx,CompositeItemV2:Xx,useCompositeStoreV2:Qx}=ie(_l.privateApis),Jx=({viewMode:e,activeSlide:t,patterns:n,onBlockPatternSelect:o,showTitles:r})=>{const l=Qx(),i="block-editor-block-pattern-setup__container";if(e===$x){const e=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__carousel"},(0,s.createElement)("div",{className:i},(0,s.createElement)("div",{className:"carousel-container"},n.map(((n,o)=>(0,s.createElement)(tB,{active:o===t,className:e.get(o)||"",key:n.name,pattern:n}))))))}return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__grid"},(0,s.createElement)(Yx,{store:l,role:"listbox",className:i,"aria-label":(0,x.__)("Patterns list")},n.map((e=>(0,s.createElement)(eB,{key:e.name,pattern:e,onSelect:o,showTitles:r})))))};function eB({pattern:e,onSelect:t,showTitles:n}){const o="block-editor-block-pattern-setup-list",{blocks:r,description:l,viewportWidth:i=700}=e,a=(0,p.useInstanceId)(eB,`${o}__item-description`);return(0,s.createElement)("div",{className:`${o}__list-item`},(0,s.createElement)(Xx,{render:(0,s.createElement)("div",{"aria-describedby":l?a:void 0,"aria-label":e.title,className:`${o}__item`}),id:`${o}__pattern__${e.name}`,role:"option",onClick:()=>t(r)},(0,s.createElement)(Ty,{blocks:r,viewportWidth:i}),n&&(0,s.createElement)("div",{className:`${o}__item-title`},e.title),!!l&&(0,s.createElement)(_l.VisuallyHidden,{id:a},l)))}function tB({active:e,className:t,pattern:n,minHeight:o}){const{blocks:r,title:l,description:i}=n,a=(0,p.useInstanceId)(tB,"block-editor-block-pattern-setup-list__item-description");return(0,s.createElement)("div",{"aria-hidden":!e,role:"img",className:`pattern-slide ${t}`,"aria-label":l,"aria-describedby":i?a:void 0},(0,s.createElement)(Ty,{blocks:r,minHeight:o}),!!i&&(0,s.createElement)(_l.VisuallyHidden,{id:a},i))}const nB=({clientId:e,blockName:t,filterPatternsFn:n,onBlockPatternSelect:o,initialViewMode:r=$x,showTitles:l=!1})=>{const[i,a]=(0,u.useState)(r),[p,m]=(0,u.useState)(0),{replaceBlock:h}=(0,d.useDispatch)(Nr),g=qx(e,t,n);if(!g?.length)return null;const f=o||(t=>{const n=t.map((e=>(0,c.cloneBlock)(e)));h(e,n)});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:`block-editor-block-pattern-setup view-mode-${i}`},(0,s.createElement)(Jx,{viewMode:i,activeSlide:p,patterns:g,onBlockPatternSelect:f,showTitles:l}),(0,s.createElement)(Zx,{viewMode:i,setViewMode:a,activeSlide:p,totalSlides:g.length,handleNext:()=>{m((e=>Math.min(e+1,g.length-1)))},handlePrevious:()=>{m((e=>Math.max(e-1,0)))},onBlockPatternSelect:()=>{f(g[p].blocks)}})))};function oB({className:e,onSelectVariation:t,selectedValue:n,variations:o}){return(0,s.createElement)("fieldset",{className:e},(0,s.createElement)(_l.VisuallyHidden,{as:"legend"},(0,x.__)("Transform to variation")),o.map((e=>(0,s.createElement)(_l.Button,{key:e.name,icon:(0,s.createElement)(qh,{icon:e.icon,showColors:!0}),isPressed:n===e.name,label:n===e.name?e.title:(0,x.sprintf)((0,x.__)("Transform to %s"),e.title),onClick:()=>t(e.name),"aria-label":e.title,showTooltip:!0}))))}function rB({className:e,onSelectVariation:t,selectedValue:n,variations:o}){const r=o.map((({name:e,title:t,description:n})=>({value:e,label:t,info:n})));return(0,s.createElement)(_l.DropdownMenu,{className:e,label:(0,x.__)("Transform to variation"),text:(0,x.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${e}__popover`},icon:cS,toggleProps:{iconPosition:"right"}},(()=>(0,s.createElement)("div",{className:`${e}__container`},(0,s.createElement)(_l.MenuGroup,null,(0,s.createElement)(_l.MenuItemsChoice,{choices:r,value:n,onSelect:t})))))}function lB({className:e,onSelectVariation:t,selectedValue:n,variations:o}){return(0,s.createElement)("div",{className:e},(0,s.createElement)(_l.__experimentalToggleGroupControl,{label:(0,x.__)("Transform to variation"),value:n,hideLabelFromVision:!0,onChange:t,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0},o.map((e=>(0,s.createElement)(_l.__experimentalToggleGroupControlOptionIcon,{key:e.name,icon:e.icon,value:e.name,label:n===e.name?e.title:(0,x.sprintf)((0,x.__)("Transform to %s"),e.title)})))))}const iB=function({blockClientId:e}){const{updateBlockAttributes:t}=(0,d.useDispatch)(Nr),{activeBlockVariation:n,variations:o}=(0,d.useSelect)((t=>{const{getActiveBlockVariation:n,getBlockVariations:o}=t(c.store),{getBlockName:r,getBlockAttributes:l}=t(Nr),i=e&&r(e);return{activeBlockVariation:n(i,l(e)),variations:i&&o(i,"transform")}}),[e]),r=n?.name,l=(0,u.useMemo)((()=>{const e=new Set;return!!o&&(o.forEach((t=>{t.icon&&e.add(t.icon?.src||t.icon)})),e.size===o.length)}),[o]);if(!o?.length)return null;const i=o.length>5,a=l?i?oB:lB:rB;return(0,s.createElement)(a,{className:"block-editor-block-variation-transforms",onSelectVariation:n=>{t(e,{...o.find((({name:e})=>e===n)).attributes})},selectedValue:r,variations:o})},sB=(0,p.createHigherOrderComponent)((e=>t=>{const[n,o]=Ar("color.palette","color.custom"),{colors:r=n,disableCustomColors:l=!o}=t,i=r&&r.length>0||!l;return(0,s.createElement)(e,{...t,colors:r,disableCustomColors:l,hasColorsToChoose:i})}),"withColorContext"),aB=sB(_l.ColorPalette);function cB({onChange:e,value:t,...n}){return(0,s.createElement)(Xu,{...n,onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0})}const uB=window.wp.date,dB=new Date(2022,0,25);function pB({format:e,defaultFormat:t,onChange:n}){return(0,s.createElement)("fieldset",{className:"block-editor-date-format-picker"},(0,s.createElement)(_l.VisuallyHidden,{as:"legend"},(0,x.__)("Date format")),(0,s.createElement)(_l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Default format"),help:`${(0,x.__)("Example:")} ${(0,uB.dateI18n)(t,dB)}`,checked:!e,onChange:e=>n(e?null:t)}),e&&(0,s.createElement)(mB,{format:e,onChange:n}))}function mB({format:e,onChange:t}){var n;const o=[...new Set(["Y-m-d",(0,x._x)("n/j/Y","short date format"),(0,x._x)("n/j/Y g:i A","short date format with time"),(0,x._x)("M j, Y","medium date format"),(0,x._x)("M j, Y g:i A","medium date format with time"),(0,x._x)("F j, Y","long date format"),(0,x._x)("M j","short date format without the year")])],r=o.map(((e,t)=>({key:`suggested-${t}`,name:(0,uB.dateI18n)(e,dB),format:e}))),l={key:"custom",name:(0,x.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",__experimentalHint:(0,x.__)("Enter your own date format")},[i,a]=(0,u.useState)((()=>!!e&&!o.includes(e)));return(0,s.createElement)(_l.__experimentalVStack,null,(0,s.createElement)(_l.CustomSelectControl,{__nextUnconstrainedWidth:!0,label:(0,x.__)("Choose a format"),options:[...r,l],value:i?l:null!==(n=r.find((t=>t.format===e)))&&void 0!==n?n:l,onChange:({selectedItem:e})=>{e===l?a(!0):(a(!1),t(e.format))}}),i&&(0,s.createElement)(_l.TextControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Custom format"),hideLabelFromVision:!0,help:(0,u.createInterpolateElement)((0,x.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,s.createElement)(_l.ExternalLink,{href:(0,x.__)("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:e,onChange:e=>t(e)}))}const hB=({setting:e,children:t,panelId:n,...o})=>(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:()=>!!e.colorValue||!!e.gradientValue,label:e.label,onDeselect:()=>{e.colorValue?e.onColorChange():e.gradientValue&&e.onGradientChange()},isShownByDefault:void 0===e.isShownByDefault||e.isShownByDefault,...o,className:"block-editor-tools-panel-color-gradient-settings__item",panelId:n,resetAllFilter:e.resetAllFilter},t),gB=({colorValue:e,label:t})=>(0,s.createElement)(_l.__experimentalHStack,{justify:"flex-start"},(0,s.createElement)(_l.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:e}),(0,s.createElement)(_l.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t},t)),fB=e=>({onToggle:t,isOpen:n})=>{const{colorValue:o,label:r}=e,l={onClick:t,className:ml()("block-editor-panel-color-gradient-settings__dropdown",{"is-open":n}),"aria-expanded":n};return(0,s.createElement)(_l.Button,{...l},(0,s.createElement)(gB,{colorValue:o,label:r}))};function bB({colors:e,disableCustomColors:t,disableCustomGradients:n,enableAlpha:o,gradients:r,settings:l,__experimentalIsRenderedInSidebar:i,...a}){let c;return i&&(c={placement:"left-start",offset:36,shift:!0}),(0,s.createElement)(s.Fragment,null,l.map(((l,u)=>{var d;const p={clearable:!1,colorValue:l.colorValue,colors:e,disableCustomColors:t,disableCustomGradients:n,enableAlpha:o,gradientValue:l.gradientValue,gradients:r,label:l.label,onColorChange:l.onColorChange,onGradientChange:l.onGradientChange,showTitle:!1,__experimentalIsRenderedInSidebar:i,...l},m={colorValue:null!==(d=l.gradientValue)&&void 0!==d?d:l.colorValue,label:l.label};return l&&(0,s.createElement)(hB,{key:u,setting:l,...a},(0,s.createElement)(_l.Dropdown,{popoverProps:c,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:fB(m),renderContent:()=>(0,s.createElement)(_l.__experimentalDropdownContentWrapper,{paddingSize:"none"},(0,s.createElement)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content"},(0,s.createElement)(Xu,{...p})))}))})))}const vB=["colors","disableCustomColors","gradients","disableCustomGradients"],kB=({className:e,colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,children:l,settings:i,title:a,showTitle:c=!0,__experimentalIsRenderedInSidebar:u,enableAlpha:m})=>{const h=(0,p.useInstanceId)(kB),{batch:g}=(0,d.useRegistry)();return t&&0!==t.length||n&&0!==n.length||!o||!r||!i?.every((e=>(!e.colors||0===e.colors.length)&&(!e.gradients||0===e.gradients.length)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)))?(0,s.createElement)(_l.__experimentalToolsPanel,{className:ml()("block-editor-panel-color-gradient-settings",e),label:c?a:void 0,resetAll:()=>{g((()=>{i.forEach((({colorValue:e,gradientValue:t,onColorChange:n,onGradientChange:o})=>{e?n():t&&o()}))}))},panelId:h,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},(0,s.createElement)(bB,{settings:i,panelId:h,colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,__experimentalIsRenderedInSidebar:u,enableAlpha:m}),!!l&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.__experimentalSpacer,{marginY:4})," ",l)):null},_B=e=>{const t=qc();return(0,s.createElement)(kB,{...t,...e})},yB=e=>vB.every((t=>e.hasOwnProperty(t)))?(0,s.createElement)(kB,{...e}):(0,s.createElement)(_B,{...e});const EB=(0,u.createContext)({}),wB=()=>(0,u.useContext)(EB);function SB({id:e,url:t,naturalWidth:n,naturalHeight:o,onFinishEditing:r,onSaveImage:l,children:i}){const a=function({url:e,naturalWidth:t,naturalHeight:n}){const[o,r]=(0,u.useState)(),[l,i]=(0,u.useState)(),[s,a]=(0,u.useState)({x:0,y:0}),[c,d]=(0,u.useState)(100),[p,h]=(0,u.useState)(0),g=t/n,[f,b]=(0,u.useState)(g),v=(0,u.useCallback)((()=>{const t=(p+90)%360;let n=g;if(p%180==90&&(n=1/g),0===t)return r(),h(t),b(g),void a((e=>({x:-e.y*n,y:e.x*n})));const o=new window.Image;o.src=e,o.onload=function(e){const o=document.createElement("canvas");let l=0,i=0;t%180?(o.width=e.target.height,o.height=e.target.width):(o.width=e.target.width,o.height=e.target.height),90!==t&&180!==t||(l=o.width),270!==t&&180!==t||(i=o.height);const s=o.getContext("2d");s.translate(l,i),s.rotate(t*Math.PI/180),s.drawImage(e.target,0,0),o.toBlob((e=>{r(URL.createObjectURL(e)),h(t),b(o.width/o.height),a((e=>({x:-e.y*n,y:e.x*n})))}))};const l=(0,m.applyFilters)("media.crossOrigin",void 0,e);"string"==typeof l&&(o.crossOrigin=l)}),[p,g,e]);return(0,u.useMemo)((()=>({editedUrl:o,setEditedUrl:r,crop:l,setCrop:i,position:s,setPosition:a,zoom:c,setZoom:d,rotation:p,setRotation:h,rotateClockwise:v,aspect:f,setAspect:b,defaultAspect:g})),[o,l,s,c,p,v,f,g])}({url:t,naturalWidth:n,naturalHeight:o}),c=function({crop:e,rotation:t,url:n,id:o,onSaveImage:r,onFinishEditing:l}){const{createErrorNotice:i}=(0,d.useDispatch)(Os.store),[s,a]=(0,u.useState)(!1),c=(0,u.useCallback)((()=>{a(!1),l()}),[l]),p=(0,u.useCallback)((()=>{a(!0);const s=[];t>0&&s.push({type:"rotate",args:{angle:t}}),(e.width<99.9||e.height<99.9)&&s.push({type:"crop",args:{left:e.x,top:e.y,width:e.width,height:e.height}}),ef()({path:`/wp/v2/media/${o}/edit`,method:"POST",data:{src:n,modifiers:s}}).then((e=>{r({id:e.id,url:e.source_url})})).catch((e=>{i((0,x.sprintf)((0,x.__)("Could not edit image. %s"),(0,As.__unstableStripHTML)(e.message)),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{a(!1),l()}))}),[e,t,o,n,r,i,l]);return(0,u.useMemo)((()=>({isInProgress:s,apply:p,cancel:c})),[s,p,c])}({id:e,url:t,onSaveImage:l,onFinishEditing:r,...a}),p=(0,u.useMemo)((()=>({...a,...c})),[a,c]);return(0,s.createElement)(EB.Provider,{value:p},i)}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
@@ -38,4 +38,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
-var CB=function(e,t){return CB=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},CB(e,t)};var xB=function(){return xB=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},xB.apply(this,arguments)};Object.create;Object.create;var BB=n(7520),IB=n.n(BB);function TB(e,t,n,o,r){void 0===r&&(r=0);var l=OB(t.width,t.height,r),i=l.width,s=l.height;return{x:MB(e.x,i,n.width,o),y:MB(e.y,s,n.height,o)}}function MB(e,t,n,o){var r=t*o/2-n/2;return DB(e,-r,r)}function PB(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function RB(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function NB(e,t){return Math.min(e,Math.max(0,t))}function LB(e,t){return t}function AB(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function OB(e,t,n){var o=n*Math.PI/180;return{width:Math.abs(Math.cos(o)*e)+Math.abs(Math.sin(o)*t),height:Math.abs(Math.sin(o)*e)+Math.abs(Math.cos(o)*t)}}function DB(e,t,n){return Math.min(Math.max(e,t),n)}function zB(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}var VB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=a().createRef(),n.videoRef=a().createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc="undefined"!=typeof document?document:null,n.currentWindow="undefined"!=typeof window?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&n.containerRef){var e=!0;n.resizeObserver=new window.ResizeObserver((function(t){e?e=!1:n.computeSizes()})),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=function(e,t,n,o,r,l){var i=OB(t.width,t.height,n),s=DB(o.width/i.width*(100/e.width),r,l);return{crop:{x:s*i.width/2-o.width/2-i.width*s*(e.x/100),y:s*i.height/2-o.height/2-i.height*s*(e.y/100)},zoom:s}}(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),o=t.crop,r=t.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}else if(n.props.initialCroppedAreaPixels){var l=function(e,t,n,o,r,l){void 0===n&&(n=0);var i=OB(t.naturalWidth,t.naturalHeight,n),s=DB(function(e,t,n){var o=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*o):n.width/(e.width*o)}(e,t,o),r,l),a=o.height>o.width?o.height/e.height:o.width/e.width;return{crop:{x:((i.width-e.width)/2-e.x)*a,y:((i.height-e.height)/2-e.y)*a},zoom:s}}(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);o=l.crop,r=l.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}},n.computeSizes=function(){var e,t,o,r,l,i,s=n.imageRef.current||n.videoRef.current;if(s&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var a=n.containerRect.width/n.containerRect.height,c=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,u=(null===(o=n.imageRef.current)||void 0===o?void 0:o.naturalHeight)||(null===(r=n.videoRef.current)||void 0===r?void 0:r.videoHeight)||0,d=c/u,p=void 0;if(s.offsetWidth<c||s.offsetHeight<u)switch(n.props.objectFit){default:case"contain":p=a>d?{width:n.containerRect.height*d,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/d};break;case"horizontal-cover":p={width:n.containerRect.width,height:n.containerRect.width/d};break;case"vertical-cover":p={width:n.containerRect.height*d,height:n.containerRect.height};break;case"auto-cover":p=c>u?{width:n.containerRect.width,height:n.containerRect.width/d}:{width:n.containerRect.height*d,height:n.containerRect.height}}else p={width:s.offsetWidth,height:s.offsetHeight};n.mediaSize=xB(xB({},p),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var m=n.props.cropSize?n.props.cropSize:function(e,t,n,o,r,l){void 0===l&&(l=0);var i=OB(e,t,l),s=i.width,a=i.height,c=Math.min(s,n),u=Math.min(a,o);return c>u*r?{width:u*r,height:u}:{width:c,height:c/r}}(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(l=n.state.cropSize)||void 0===l?void 0:l.height)===m.height&&(null===(i=n.state.cropSize)||void 0===i?void 0:i.width)===m.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(m),n.setState({cropSize:m},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(m),m}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){n.currentDoc&&(n.isTouching=!0,n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var o=t.getMousePoint(e),r=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(r,o,{shouldUpdatePosition:!0}),n.props.onRotationChange){var l=n.gestureRotationStart+e.rotation;n.props.onRotationChange(l)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,o,r=e.x,l=e.y;n.dragStartPosition={x:r,y:l},n.dragStartCrop=xB({},n.props.crop),null===(o=(t=n.props).onInteractionStart)||void 0===o||o.call(t)},n.onDrag=function(e){var t=e.x,o=e.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==o){var e=t-n.dragStartPosition.x,r=o-n.dragStartPosition.y,l={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+r},i=n.props.restrictPosition?TB(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(i)}})))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(n.currentWindow&&(!n.props.onWheelRequest||n.props.onWheelRequest(e))){e.preventDefault();var o=t.getMousePoint(e),r=IB()(e).pixelY,l=n.props.zoom-r*n.props.zoomSpeed/200;n.setNewZoom(l,o,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)}},n.getPointOnContainer=function(e){var t=e.x,o=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(o-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,o=e.y,r=n.props,l=r.crop,i=r.zoom;return{x:(t+l.x)/i,y:(o+l.y)/i}},n.setNewZoom=function(e,t,o){var r=(void 0===o?{}:o).shouldUpdatePosition,l=void 0===r||r;if(n.state.cropSize&&n.props.onZoomChange){var i=DB(e,n.props.minZoom,n.props.maxZoom);if(l){var s=n.getPointOnContainer(t),a=n.getPointOnMedia(s),c={x:a.x*i-s.x,y:a.y*i-s.y},u=n.props.restrictPosition?TB(c,n.mediaSize,n.state.cropSize,i,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(i)}},n.getCropData=function(){return n.state.cropSize?function(e,t,n,o,r,l,i){void 0===l&&(l=0),void 0===i&&(i=!0);var s=i?NB:LB,a=OB(t.width,t.height,l),c=OB(t.naturalWidth,t.naturalHeight,l),u={x:s(100,((a.width-n.width/r)/2-e.x/r)/a.width*100),y:s(100,((a.height-n.height/r)/2-e.y/r)/a.height*100),width:s(100,n.width/a.width*100/r),height:s(100,n.height/a.height*100/r)},d=Math.round(s(c.width,u.width*c.width/100)),p=Math.round(s(c.height,u.height*c.height/100)),m=c.width>=c.height*o?{width:Math.round(p*o),height:p}:{width:d,height:Math.round(d/o)};return{croppedAreaPercentages:u,croppedAreaPixels:xB(xB({},m),{x:Math.round(s(c.width-m.width,u.x*c.width/100)),y:Math.round(s(c.height-m.height,u.y*c.height/100))})}}(n.props.restrictPosition?TB(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,o),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,o)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?TB(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){function n(){this.constructor=e}CB(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t,n,o,r,l,i,s,a,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(o=e.cropSize)||void 0===o?void 0:o.width)!==(null===(r=this.props.cropSize)||void 0===r?void 0:r.width)?this.computeSizes():(null===(l=e.crop)||void 0===l?void 0:l.x)===(null===(i=this.props.crop)||void 0===i?void 0:i.x)&&(null===(s=e.crop)||void 0===s?void 0:s.y)===(null===(a=this.props.crop)||void 0===a?void 0:a.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(c=this.videoRef.current)||void 0===c||c.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=PB(n,o),this.lastPinchRotation=RB(n,o),this.onDragStart(AB(n,o))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var o=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]),l=AB(o,r);this.onDrag(l),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=PB(o,r),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,l,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var i=RB(o,r),s=n.props.rotation+(i-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=i}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,r=t.mediaProps,l=t.transform,i=t.crop,s=i.x,c=i.y,u=t.rotation,d=t.zoom,p=t.cropShape,m=t.showGrid,h=t.style,g=h.containerStyle,f=h.cropAreaStyle,b=h.mediaStyle,v=t.classes,k=v.containerClassName,_=v.cropAreaClassName,y=v.mediaClassName,E=t.objectFit;return a().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:g,className:zB("reactEasyCrop_Container",k)},n?a().createElement("img",xB({alt:"",className:zB("reactEasyCrop_Image","contain"===E&&"reactEasyCrop_Contain","horizontal-cover"===E&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===E&&"reactEasyCrop_Cover_Vertical","auto-cover"===E&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),y)},r,{src:n,ref:this.imageRef,style:xB(xB({},b),{transform:l||"translate(".concat(s,"px, ").concat(c,"px) rotate(").concat(u,"deg) scale(").concat(d,")")}),onLoad:this.onMediaLoad})):o&&a().createElement("video",xB({autoPlay:!0,loop:!0,muted:!0,className:zB("reactEasyCrop_Video","contain"===E&&"reactEasyCrop_Contain","horizontal-cover"===E&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===E&&"reactEasyCrop_Cover_Vertical","auto-cover"===E&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),y)},r,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:xB(xB({},b),{transform:l||"translate(".concat(s,"px, ").concat(c,"px) rotate(").concat(u,"deg) scale(").concat(d,")")}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map((function(e){return a().createElement("source",xB({key:e.src},e))}))),this.state.cropSize&&a().createElement("div",{style:xB(xB({},f),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:zB("reactEasyCrop_CropArea","round"===p&&"reactEasyCrop_CropAreaRound",m&&"reactEasyCrop_CropAreaGrid",_)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(a().Component);const FB=100,HB=300,GB={placement:"bottom-start"};function UB({url:e,width:t,height:n,clientWidth:o,naturalHeight:r,naturalWidth:l,borderProps:i}){const{isInProgress:a,editedUrl:c,position:u,zoom:d,aspect:p,setPosition:m,setCrop:h,setZoom:g,rotation:f}=wB();let b=n||o*r/l;return f%180==90&&(b=o*l/r),(0,s.createElement)("div",{className:ml()("wp-block-image__crop-area",i?.className,{"is-applying":a}),style:{...i?.style,width:t||o,height:b}},(0,s.createElement)(VB,{image:c||e,disabled:a,minZoom:FB/100,maxZoom:HB/100,crop:u,zoom:d/100,aspect:p,onCropChange:e=>{m(e)},onCropComplete:e=>{h(e)},onZoomChange:e=>{g(100*e)}}),a&&(0,s.createElement)(_l.Spinner,null))}const $B=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"}));function jB(){const{isInProgress:e,zoom:t,setZoom:n}=wB();return(0,s.createElement)(_l.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:GB,renderToggle:({isOpen:t,onToggle:n})=>(0,s.createElement)(_l.ToolbarButton,{icon:$B,label:(0,x.__)("Zoom"),onClick:n,"aria-expanded":t,disabled:e}),renderContent:()=>(0,s.createElement)(_l.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Zoom"),min:FB,max:HB,value:Math.round(t),onChange:n})})}const WB=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"}));function KB({aspectRatios:e,isDisabled:t,label:n,onClick:o,value:r}){return(0,s.createElement)(_l.MenuGroup,{label:n},e.map((({title:e,aspect:n})=>(0,s.createElement)(_l.MenuItem,{key:n,disabled:t,onClick:()=>{o(n)},role:"menuitemradio",isSelected:n===r,icon:n===r?uu:void 0},e))))}function ZB({toggleProps:e}){const{isInProgress:t,aspect:n,setAspect:o,defaultAspect:r}=wB();return(0,s.createElement)(_l.DropdownMenu,{icon:WB,label:(0,x.__)("Aspect Ratio"),popoverProps:GB,toggleProps:e,className:"wp-block-image__aspect-ratio"},(({onClose:e})=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(KB,{isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:[{title:(0,x.__)("Original"),aspect:r},{title:(0,x.__)("Square"),aspect:1}]}),(0,s.createElement)(KB,{label:(0,x.__)("Landscape"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:[{title:(0,x.__)("16:9"),aspect:16/9},{title:(0,x.__)("4:3"),aspect:4/3},{title:(0,x.__)("3:2"),aspect:1.5}]}),(0,s.createElement)(KB,{label:(0,x.__)("Portrait"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:[{title:(0,x.__)("9:16"),aspect:9/16},{title:(0,x.__)("3:4"),aspect:3/4},{title:(0,x.__)("2:3"),aspect:2/3}]}))))}const qB=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}));function YB(){const{isInProgress:e,rotateClockwise:t}=wB();return(0,s.createElement)(_l.ToolbarButton,{icon:qB,label:(0,x.__)("Rotate"),onClick:t,disabled:e})}function XB(){const{isInProgress:e,apply:t,cancel:n}=wB();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.ToolbarButton,{onClick:t,disabled:e},(0,x.__)("Apply")),(0,s.createElement)(_l.ToolbarButton,{onClick:n},(0,x.__)("Cancel")))}function QB({id:e,url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i,onSaveImage:a,onFinishEditing:c,borderProps:u}){return(0,s.createElement)(SB,{id:e,url:t,naturalWidth:i,naturalHeight:l,onSaveImage:a,onFinishEditing:c},(0,s.createElement)(UB,{borderProps:u,url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}),(0,s.createElement)(Bl,null,(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(jB,null),(0,s.createElement)(_l.ToolbarItem,null,(e=>(0,s.createElement)(ZB,{toggleProps:e}))),(0,s.createElement)(YB,null)),(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(XB,null))))}const JB=[25,50,75,100],eI=()=>{};function tI({imageSizeHelp:e,imageWidth:t,imageHeight:n,imageSizeOptions:o=[],isResizable:r=!0,slug:l,width:i,height:a,onChange:c,onChangeImage:d=eI}){const{currentHeight:p,currentWidth:m,updateDimension:h,updateDimensions:g}=function(e,t,n,o,r){var l,i;const[s,a]=(0,u.useState)(null!==(l=null!=t?t:o)&&void 0!==l?l:""),[c,d]=(0,u.useState)(null!==(i=null!=e?e:n)&&void 0!==i?i:"");return(0,u.useEffect)((()=>{void 0===t&&void 0!==o&&a(o),void 0===e&&void 0!==n&&d(n)}),[o,n]),(0,u.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(s)&&a(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(c)&&d(e)}),[t,e]),{currentHeight:c,currentWidth:s,updateDimension:(e,t)=>{const n=""===t?void 0:parseInt(t,10);"width"===e?a(n):d(n),r({[e]:n})},updateDimensions:(e,t)=>{d(null!=e?e:n),a(null!=t?t:o),r({height:e,width:t})}}}(a,i,n,t,c);return(0,s.createElement)(s.Fragment,null,o&&o.length>0&&(0,s.createElement)(_l.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Resolution"),value:l,options:o,onChange:d,help:e,size:"__unstable-large"}),r&&(0,s.createElement)("div",{className:"block-editor-image-size-control"},(0,s.createElement)(_l.__experimentalHStack,{align:"baseline",spacing:"3"},(0,s.createElement)(_l.__experimentalNumberControl,{className:"block-editor-image-size-control__width",label:(0,x.__)("Width"),value:m,min:1,onChange:e=>h("width",e),size:"__unstable-large"}),(0,s.createElement)(_l.__experimentalNumberControl,{className:"block-editor-image-size-control__height",label:(0,x.__)("Height"),value:p,min:1,onChange:e=>h("height",e),size:"__unstable-large"})),(0,s.createElement)(_l.__experimentalHStack,null,(0,s.createElement)(_l.ButtonGroup,{"aria-label":(0,x.__)("Image size presets")},JB.map((e=>{const o=Math.round(t*(e/100)),r=Math.round(n*(e/100)),l=m===o&&p===r;return(0,s.createElement)(_l.Button,{key:e,size:"small",variant:l?"primary":void 0,isPressed:l,onClick:()=>g(r,o)},e,"%")}))),(0,s.createElement)(_l.Button,{size:"small",onClick:()=>g()},(0,x.__)("Reset")))))}function nI({url:e,urlLabel:t,className:n}){const o=ml()(n,"block-editor-url-popover__link-viewer-url");return e?(0,s.createElement)(_l.ExternalLink,{className:o,href:e},t||(0,Ds.filterURLForDisplay)((0,Ds.safeDecodeURI)(e))):(0,s.createElement)("span",{className:o})}const{__experimentalPopoverLegacyPositionToPlacement:oI}=ie(_l.privateApis),rI=(0,u.forwardRef)((({additionalControls:e,children:t,renderSettings:n,placement:o,focusOnMount:r="firstElement",position:l,...i},a)=>{let c;void 0!==l&&w()("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"}),void 0!==o?c=o:void 0!==l&&(c=oI(l)),c=c||"bottom";const[d,p]=(0,u.useState)(!1),m=!!n&&d;return(0,s.createElement)(_l.Popover,{ref:a,className:"block-editor-url-popover",focusOnMount:r,placement:c,shift:!0,variant:"toolbar",...i},(0,s.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,s.createElement)("div",{className:"block-editor-url-popover__row"},t,!!n&&(0,s.createElement)(_l.Button,{className:"block-editor-url-popover__settings-toggle",icon:cS,label:(0,x.__)("Link settings"),onClick:()=>{p(!d)},"aria-expanded":d,size:"compact"}))),m&&(0,s.createElement)("div",{className:"block-editor-url-popover__settings"},n()),e&&!m&&(0,s.createElement)("div",{className:"block-editor-url-popover__additional-controls"},e))}));rI.LinkEditor=function({autocompleteRef:e,className:t,onChangeInputValue:n,value:o,...r}){return(0,s.createElement)("form",{className:ml()("block-editor-url-popover__link-editor",t),...r},(0,s.createElement)(ta,{__nextHasNoMarginBottom:!0,value:o,onChange:n,autocompleteRef:e}),(0,s.createElement)(_l.Button,{icon:Ks,label:(0,x.__)("Apply"),type:"submit",size:"compact"}))},rI.LinkViewer=function({className:e,linkClassName:t,onEditLinkClick:n,url:o,urlLabel:r,...l}){return(0,s.createElement)("div",{className:ml()("block-editor-url-popover__link-viewer",e),...l},(0,s.createElement)(nI,{url:o,urlLabel:r,className:t}),n&&(0,s.createElement)(_l.Button,{icon:La,label:(0,x.__)("Edit"),onClick:n,size:"compact"}))};const lI=rI,iI=()=>{},sI=({src:e,onChange:t,onSubmit:n,onClose:o,popoverAnchor:r})=>(0,s.createElement)(lI,{anchor:r,onClose:o},(0,s.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:n},(0,s.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":(0,x.__)("URL"),placeholder:(0,x.__)("Paste or type URL"),onChange:t,value:e}),(0,s.createElement)(_l.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:Ks,label:(0,x.__)("Apply"),type:"submit"}))),aI=({isURLInputVisible:e,src:t,onChangeSrc:n,onSubmitSrc:o,openURLInput:r,closeURLInput:l})=>{const[i,a]=(0,u.useState)(null);return(0,s.createElement)("div",{className:"block-editor-media-placeholder__url-input-container",ref:a},(0,s.createElement)(_l.Button,{className:"block-editor-media-placeholder__button",onClick:r,isPressed:e,variant:"tertiary"},(0,x.__)("Insert from URL")),e&&(0,s.createElement)(sI,{src:t,onChange:n,onSubmit:o,onClose:l,popoverAnchor:i}))};const cI=(0,_l.withFilters)("editor.MediaPlaceholder")((function({value:e={},allowedTypes:t,className:n,icon:o,labels:r={},mediaPreview:l,notices:i,isAppender:a,accept:p,addToGallery:m,multiple:h=!1,handleUpload:g=!0,disableDropZone:f,disableMediaButtons:b,onError:v,onSelect:k,onCancel:_,onSelectURL:y,onToggleFeaturedImage:E,onDoubleClick:S,onFilesPreUpload:C=iI,onHTMLDrop:B,children:I,mediaLibraryButton:T,placeholder:M,style:P}){B&&w()("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});const R=(0,d.useSelect)((e=>{const{getSettings:t}=e(Nr);return t().mediaUpload}),[]),[N,L]=(0,u.useState)(""),[A,O]=(0,u.useState)(!1);(0,u.useEffect)((()=>{var t;L(null!==(t=e?.src)&&void 0!==t?t:"")}),[e?.src]);const D=e=>{L(e.target.value)},z=()=>{O(!0)},V=()=>{O(!1)},F=e=>{e.preventDefault(),N&&y&&(y(N),V())},H=n=>{if(!g)return k(n);let o;if(C(n),h)if(m){let t=[];o=n=>{const o=(null!=e?e:[]).filter((e=>e.id?!t.some((({id:t})=>Number(t)===Number(e.id))):!t.some((({urlSlug:t})=>e.url.includes(t)))));k(o.concat(n)),t=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else o=k;else o=([e])=>k(e);R({allowedTypes:t,filesList:n,onFileChange:o,onError:v})};async function G(e){const n=(0,c.pasteHandler)({HTML:e});return await async function(e){if(!e||!Array.isArray(e))return;const n=function e(t){return t.flatMap((t=>"core/image"!==t.name&&"core/audio"!==t.name&&"core/video"!==t.name||!t.attributes.url?e(t.innerBlocks):[t]))}(e);if(!n.length)return;const o=await Promise.all(n.map((e=>e.attributes.id?e.attributes:new Promise(((n,o)=>{window.fetch(e.attributes.url).then((e=>e.blob())).then((r=>R({filesList:[r],additionalData:{title:e.attributes.title,alt_text:e.attributes.alt,caption:e.attributes.caption},onFileChange:([e])=>{e.id&&n(e)},allowedTypes:t,onError:o}))).catch((()=>n(e.attributes.url)))}))))).catch((e=>v(e)));k(h?o:o[0])}(n)}const U=e=>{H(e.target.files)},$=null!=M?M:e=>{let{instructions:c,title:u}=r;if(R||y||(c=(0,x.__)("To edit this block, you need permission to upload media.")),void 0===c||void 0===u){const e=null!=t?t:[],[n]=e,o=1===e.length,r=o&&"audio"===n,l=o&&"image"===n,i=o&&"video"===n;void 0===c&&R&&(c=(0,x.__)("Upload a media file or pick one from your media library."),r?c=(0,x.__)("Upload an audio file, pick one from your media library, or add one with a URL."):l?c=(0,x.__)("Upload an image file, pick one from your media library, or add one with a URL."):i&&(c=(0,x.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===u&&(u=(0,x.__)("Media"),r?u=(0,x.__)("Audio"):l?u=(0,x.__)("Image"):i&&(u=(0,x.__)("Video")))}const d=ml()("block-editor-media-placeholder",n,{"is-appender":a});return(0,s.createElement)(_l.Placeholder,{icon:o,label:u,instructions:c,className:d,notices:i,onDoubleClick:S,preview:l,style:P},e,I)},j=()=>f?null:(0,s.createElement)(_l.DropZone,{onFilesDrop:H,onHTMLDrop:G}),W=()=>_&&(0,s.createElement)(_l.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,x.__)("Cancel"),variant:"link",onClick:_},(0,x.__)("Cancel")),K=()=>y&&(0,s.createElement)(aI,{isURLInputVisible:A,src:N,onChangeSrc:D,onSubmitSrc:F,openURLInput:z,closeURLInput:V}),Z=()=>E&&(0,s.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,s.createElement)(_l.Button,{className:"block-editor-media-placeholder__button",onClick:E,variant:"tertiary"},(0,x.__)("Use featured image")));return b?(0,s.createElement)(Us,null,j()):(0,s.createElement)(Us,{fallback:$(K())},(()=>{const n=null!=T?T:({open:e})=>(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:()=>{e()}},(0,x.__)("Media Library")),o=(0,s.createElement)(Gs,{addToGallery:m,gallery:h&&!(!t||0===t.length)&&t.every((e=>"image"===e||e.startsWith("image/"))),multiple:h,onSelect:k,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map((({id:e})=>e)):e.id,render:n});if(R&&a)return(0,s.createElement)(s.Fragment,null,j(),(0,s.createElement)(_l.FormFileUpload,{onChange:U,accept:p,multiple:!!h,render:({openFileDialog:e})=>{const t=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.Button,{variant:"primary",className:ml()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:e},(0,x.__)("Upload")),o,K(),Z(),W());return $(t)}}));if(R){const e=(0,s.createElement)(s.Fragment,null,j(),(0,s.createElement)(_l.FormFileUpload,{variant:"primary",className:ml()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:U,accept:p,multiple:!!h},(0,x.__)("Upload")),o,K(),Z(),W());return $(e)}return $(o)})())})),uI=({colorSettings:e,...t})=>{const n=e.map((e=>{if(!e)return e;const{value:t,onChange:n,...o}=e;return{...o,colorValue:t,onColorChange:n}}));return(0,s.createElement)(yB,{settings:n,gradients:[],disableCustomGradients:!0,...t})},dI={placement:"bottom-start"},pI=()=>(0,s.createElement)(s.Fragment,null,["bold","italic","link","unknown"].map((e=>(0,s.createElement)(_l.Slot,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,s.createElement)(_l.Slot,{name:"RichText.ToolbarControls"},(e=>{if(!e.length)return null;const t=e.map((([{props:e}])=>e)).some((({isActive:e})=>e));return(0,s.createElement)(_l.ToolbarItem,null,(n=>(0,s.createElement)(_l.DropdownMenu,{icon:cS,label:(0,x.__)("More"),toggleProps:{...n,className:ml()(n.className,{"is-pressed":t}),describedBy:(0,x.__)("Displays more block tools")},controls:ne(e.map((([{props:e}])=>e)),"title"),popoverProps:dI})))})));function mI({editableContentElement:e,activeFormats:t}){const n=t[t.length-1],o=n?.type,r=(0,d.useSelect)((e=>e(Y.store).getFormatType(o)),[o]),l=(0,Y.useAnchor)({editableContentElement:e,settings:r});return(0,s.createElement)(hI,{popoverAnchor:l})}function hI({popoverAnchor:e}){return(0,s.createElement)(_l.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,s.createElement)(NC,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,x.__)("Format tools")},(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(pI,null))))}const gI=({inline:e,editableContentElement:t,value:n})=>{const o=(0,d.useSelect)((e=>e(Nr).getSettings().hasInlineToolbar),[]);if(e)return(0,s.createElement)(hI,{popoverAnchor:t});if(o){const e=(0,Y.getActiveFormats)(n);return(0,Y.isCollapsed)(n)&&!e.length?null:(0,s.createElement)(mI,{editableContentElement:t,activeFormats:e})}return(0,s.createElement)(Bl,{group:"inline"},(0,s.createElement)(pI,null))};function fI(){const{didAutomaticChange:e,getSettings:t}=(0,d.useSelect)(Nr);return(0,p.useRefEffect)((n=>{function o(n){const{keyCode:o}=n;if(n.defaultPrevented)return;if(o!==zs.DELETE&&o!==zs.BACKSPACE&&o!==zs.ESCAPE)return;const{__experimentalUndo:r}=t();r&&e()&&(n.preventDefault(),r())}return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}}),[])}function bI(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function vI({allowedFormats:e,disableFormats:t}){return t?vI.EMPTY_ARRAY:e}function kI({value:e,pastedBlocks:t=[],onReplace:n,onSplit:o}){if(!n||!o)return;const{start:r=0,end:l=0}=e,i={...e,start:r,end:l},s=[],[a,c]=(0,Y.split)(i),u=t.length>0;let d=-1;const p=(0,Y.isEmpty)(a)&&!(0,Y.isEmpty)(c);u&&(0,Y.isEmpty)(a)||(s.push(o((0,Y.toHTMLString)({value:a}),!p)),d+=1),u&&(s.push(...t),d+=t.length),u&&(0,Y.isEmpty)(c)||s.push(o((0,Y.toHTMLString)({value:c}),p));n(s,u?d:1,u?-1:0)}function _I(e){const t=(0,u.useRef)(e);return t.current=e,(0,p.useRefEffect)((e=>{function n(e){const{isSelected:n,disableFormats:o,onChange:r,value:l,formatTypes:i,tagName:s,onReplace:a,onSplit:u,__unstableEmbedURLOnPaste:d,pastePlainText:p}=t.current;if(!n)return;const{plainText:m,html:h,files:g}=ty(e);if(e.preventDefault(),window.console.log("Received HTML:\n\n",h),window.console.log("Received plain text:\n\n",m),o)return void r((0,Y.insert)(l,m));function f(e){const t=i.reduce(((e,{__unstablePasteRule:t})=>(t&&e===l&&(e=t(l,{html:h,plainText:m})),e)),l);if(t!==l)r(t);else{const t=(0,Y.create)({html:e});!function(e,t){if(t?.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}(t,l.activeFormats),r((0,Y.insert)(l,t))}}if("true"===e.clipboardData.getData("rich-text"))return void f(h);if(p)return void r((0,Y.insert)(l,(0,Y.create)({text:m})));if(g?.length){window.console.log("Received items:\n\n",g);const e=(0,c.getBlockTransforms)("from"),t=g.reduce(((t,n)=>{const o=(0,c.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat();if(!t.length)return;return void(a&&(0,Y.isEmpty)(l)?a(t):kI({value:l,pastedBlocks:t,onReplace:a,onSplit:u}))}let b=a&&u?"AUTO":"INLINE";const v=m.trim();d&&(0,Y.isEmpty)(l)&&(0,Ds.isURL)(v)&&/^https?:/.test(v)&&(b="BLOCKS");const k=(0,c.pasteHandler)({HTML:h,plainText:m,mode:b,tagName:s});"string"==typeof k?f(k):k.length>0&&(a&&(0,Y.isEmpty)(l)?a(k,k.length-1,-1):kI({value:l,pastedBlocks:k,onReplace:a,onSplit:u}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}vI.EMPTY_ARRAY=[];const yI=["`",'"',"'","“”","‘’"];function EI(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,d.useDispatch)(Nr),o=(0,u.useRef)(e);return o.current=e,(0,p.useRefEffect)((e=>{function r(r){const{inputType:l,data:i}=r,{value:s,onChange:a}=o.current;if("insertText"!==l)return;if((0,Y.isCollapsed)(s))return;const c=(0,m.applyFilters)("blockEditor.wrapSelectionSettings",yI).find((([e,t])=>e===i||t===i));if(!c)return;const[u,d=u]=c,p=s.start,h=s.end+u.length;let g=(0,Y.insert)(s,u,p,p);g=(0,Y.insert)(g,d,h,h),t(),a(g),n();const f={};for(const e in r)f[e]=r[e];f.data=d;const{ownerDocument:b}=e,{defaultView:v}=b,k=new v.InputEvent("input",f);window.queueMicrotask((()=>{r.target.dispatchEvent(k)})),r.preventDefault()}return e.addEventListener("beforeinput",r),()=>{e.removeEventListener("beforeinput",r)}}),[])}function wI(e){let t=e.length;for(;t--;){const n=_o(e[t].attributes);if(n)return e[t].attributes[n]=e[t].attributes[n].toString().replace(ko,""),[e[t].clientId,n,0,0];const o=wI(e[t].innerBlocks);if(o)return o}return[]}function SI(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,d.useDispatch)(Nr),o=(0,u.useRef)(e);return o.current=e,(0,p.useRefEffect)((e=>{function r(){const{getValue:e,onReplace:t,selectionChange:r}=o.current;if(!t)return;const l=e(),{start:i,text:s}=l;if(" "!==s.slice(i-1,i))return;const a=s.slice(0,i).trim(),u=(0,c.getBlockTransforms)("from").filter((({type:e})=>"prefix"===e)),d=(0,c.findTransform)(u,(({prefix:e})=>a===e));if(!d)return;const p=(0,Y.toHTMLString)({value:(0,Y.insert)(l,ko,0,i)}),m=d.transform(p);return r(...wI([m])),t([m]),n(),!0}function l(e){const{inputType:l,type:i}=e,{getValue:s,onChange:a,__unstableAllowPrefixTransformations:c,formatTypes:u}=o.current;if("insertText"!==l&&"compositionend"!==i)return;if(c&&r())return;const d=s(),p=u.reduce(((e,{__unstableInputRule:t})=>(t&&(e=t(e)),e)),function(e){const t="tales of gutenberg",{start:n,text:o}=e;return n<18||o.slice(n-18,n).toLowerCase()!==t?e:(0,Y.insert)(e," 🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️")}(d));p!==d&&(t(),a({...p,activeFormats:d.activeFormats}),n())}return e.addEventListener("input",l),e.addEventListener("compositionend",l),()=>{e.removeEventListener("input",l),e.removeEventListener("compositionend",l)}}),[])}function CI(e){const t=(0,u.useRef)(e);return t.current=e,(0,p.useRefEffect)((e=>{function n(e){const{keyCode:n}=e;if(e.defaultPrevented)return;const{value:o,onMerge:r,onRemove:l}=t.current;if(n===zs.DELETE||n===zs.BACKSPACE){const{start:t,end:i,text:s}=o,a=n===zs.BACKSPACE,c=o.activeFormats&&!!o.activeFormats.length;if(!(0,Y.isCollapsed)(o)||c||a&&0!==t||!a&&i!==s.length)return;r?r(!a):l&&(0,Y.isEmpty)(o)&&a&&l(!a),e.preventDefault()}}return e.addEventListener("keydown",n),()=>{e.removeEventListener("keydown",n)}}),[])}function xI(e){const t=(0,d.useRegistry)(),{__unstableMarkAutomaticChange:n}=(0,d.useDispatch)(Nr),o=(0,u.useRef)(e);return o.current=e,(0,p.useRefEffect)((e=>{function r(e){if("true"!==e.target.contentEditable)return;if(e.defaultPrevented)return;if(e.keyCode!==zs.ENTER)return;const{removeEditorOnlyFormats:r,value:l,onReplace:i,onSplit:s,onChange:a,disableLineBreaks:u,onSplitAtEnd:d,onSplitAtDoubleLineEnd:p}=o.current;e.preventDefault();const m={...l};m.formats=r(l);const h=i&&s;if(i){const e=(0,c.getBlockTransforms)("from").filter((({type:e})=>"enter"===e)),t=(0,c.findTransform)(e,(e=>e.regExp.test(m.text)));if(t)return i([t.transform({content:m.text})]),void n()}const{text:g,start:f,end:b}=m;e.shiftKey?u||a((0,Y.insert)(m,"\n")):h?kI({value:m,onReplace:i,onSplit:s}):d&&f===b&&b===g.length?d():p&&f===b&&b===g.length&&"\n\n"===g.slice(-2)?t.batch((()=>{m.start=m.end-2,a((0,Y.remove)(m)),p()})):u||a((0,Y.insert)(m,"\n"))}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[])}function BI(e){return e(Y.store).getFormatTypes()}const II=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function TI(e,t){return"object"!=typeof e?{[t]:e}:Object.fromEntries(Object.entries(e).map((([e,n])=>[`${t}.${e}`,n])))}function MI(e,t){return e[t]?e[t]:Object.keys(e).filter((e=>e.startsWith(t+"."))).reduce(((n,o)=>(n[o.slice(t.length+1)]=e[o],n)),{})}function PI(e){return(0,p.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function RI(e){return(0,p.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function NI(){const{__unstableMarkLastChangeAsPersistent:e}=(0,d.useDispatch)(Nr);return(0,p.useRefEffect)((t=>{function n(t){"insertReplacementText"===t.inputType&&e()}return t.addEventListener("beforeinput",n),()=>{t.removeEventListener("beforeinput",n)}}),[])}function LI(){const{isMultiSelecting:e}=(0,d.useSelect)(Nr);return(0,p.useRefEffect)((t=>{function n(){if(!e())return;const n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",n),()=>{t.removeEventListener("focus",n)}}),[])}const AI={},OI=Symbol("usesContext");function DI({onChange:e,onFocus:t,value:n,forwardedRef:o,settings:r}){const{name:l,edit:i,[OI]:a}=r,c=(0,u.useContext)(bf),d=(0,u.useMemo)((()=>a?Object.fromEntries(Object.entries(c).filter((([e])=>a.includes(e)))):AI),[a,c]);if(!i)return null;const p=(0,Y.getActiveFormat)(n,l),m=void 0!==p,h=(0,Y.getActiveObject)(n),g=void 0!==h&&h.type===l;return(0,s.createElement)(i,{key:l,isActive:m,activeAttributes:m&&p.attributes||{},isObjectActive:g,activeObjectAttributes:g&&h.attributes||{},value:n,onChange:e,onFocus:t,contentRef:o,context:d})}function zI({formatTypes:e,...t}){return e.map((e=>(0,s.createElement)(DI,{settings:e,...t,key:e.name})))}function VI({value:e,tagName:t,multiline:n,format:o,...r}){if(KI.isEmpty(e)){const t=bI(n);e=t?(0,s.createElement)(t,null):null}else Array.isArray(e)?(w()("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),e=(0,s.createElement)(u.RawHTML,null,c.children.toHTML(e))):e="string"==typeof e?(0,s.createElement)(u.RawHTML,null,e):(0,s.createElement)(u.RawHTML,null,e.toHTMLString());return t?(0,s.createElement)(t,{...r},e):e}const FI=(0,u.forwardRef)((function({children:e,identifier:t,tagName:n="div",value:o="",onChange:r,multiline:l,...i},a){w()("wp.blockEditor.RichText multiline prop",{since:"6.1",version:"6.3",alternative:"nested blocks (InnerBlocks)",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/"});const{clientId:c}=y(),{selectionChange:u}=(0,d.useDispatch)(Nr),p=bI(l),m=`</${p}>${o=o||`<${p}></${p}>`}<${p}>`.split(`</${p}><${p}>`);function h(e){r(`<${p}>${e.join(`</${p}><${p}>`)}</${p}>`)}return m.shift(),m.pop(),(0,s.createElement)(n,{ref:a},m.map(((e,n)=>(0,s.createElement)(UI,{key:n,identifier:`${t}-${n}`,tagName:p,value:e,onChange:e=>{const t=m.slice();t[n]=e,h(t)},isSelected:void 0,onSplit:e=>e,onReplace:e=>{const o=m.slice();o.splice(n,1,...e),h(o),u(c,`${t}-${n+1}`,0,0)},onMerge:e=>{const o=m.slice();let r=0;if(e){if(!o[n+1])return;o.splice(n,2,o[n]+o[n+1]),r=o[n].length-1}else{if(!o[n-1])return;o.splice(n-1,2,o[n-1]+o[n]),r=o[n-1].length-1}h(o),u(c,`${t}-${n-(e?0:1)}`,r,r)},...i}))))}));const HI=(0,u.createContext)(),GI=(0,u.createContext)();function UI({children:e,tagName:t="div",value:n="",onChange:o,isSelected:r,multiline:l,inlineToolbar:i,wrapperClassName:a,autocompleters:m,onReplace:h,placeholder:g,allowedFormats:f,withoutInteractiveFormatting:v,onRemove:k,onMerge:_,onSplit:E,__unstableOnSplitAtEnd:w,__unstableOnSplitAtDoubleLineEnd:S,identifier:C,preserveWhiteSpace:x,__unstablePastePlainText:B,__unstableEmbedURLOnPaste:I,__unstableDisableFormats:T,disableLineBreaks:M,__unstableAllowPrefixTransformations:P,disableEditing:R,...N},L){N=function(e){const{__unstableMobileNoFocusOnMount:t,deleteEnter:n,placeholderTextColor:o,textAlign:r,selectionColor:l,tagsToEliminate:i,disableEditingMenu:s,fontSize:a,fontFamily:c,fontWeight:u,fontStyle:d,minWidth:p,maxWidth:m,setRef:h,disableSuggestions:g,disableAutocorrection:f,...b}=e;return b}(N);const A=(0,u.useRef)(),O=y(),{clientId:D,isSelected:z,name:V}=O,F=O[b],{selectionStart:H,selectionEnd:G,isSelected:U}=(0,d.useSelect)((e=>{if(!z)return{isSelected:!1};const{getSelectionStart:t,getSelectionEnd:n}=e(Nr),o=t(),l=n();let i;return void 0===r?i=o.clientId===D&&l.clientId===D&&o.attributeKey===C:r&&(i=o.clientId===D),{selectionStart:i?o.offset:void 0,selectionEnd:i?l.offset:void 0,isSelected:i}}),[D,C,r,z]),$=(0,d.useSelect)((e=>{let t=!1;if(F&&eg(V)){const n=(0,c.getBlockType)(V).attributes,{getBlockBindingsSource:o}=ie(e(c.store));for(const[e,r]of Object.entries(F)){if("rich-text"!==n?.[e]?.source)break;const l=o(r.source);if(!l||l.lockAttributesEditing){t=!0;break}}}return t}),[F,V]),j=R||$,{getSelectionStart:W,getSelectionEnd:K,getBlockRootClientId:Z}=(0,d.useSelect)(Nr),{selectionChange:q}=(0,d.useDispatch)(Nr),X=vI({allowedFormats:f,disableFormats:T}),Q=!X||X.length>0,J=(0,u.useCallback)(((e,t)=>{const n={},o=void 0===e&&void 0===t;if("number"==typeof e||o){if(void 0===t&&Z(D)!==Z(K().clientId))return;n.start={clientId:D,attributeKey:C,offset:e}}if("number"==typeof t||o){if(void 0===e&&Z(D)!==Z(W().clientId))return;n.end={clientId:D,attributeKey:C,offset:t}}q(n)}),[D,C]),{formatTypes:ee,prepareHandlers:te,valueHandlers:ne,changeHandlers:oe,dependencies:re}=function({clientId:e,identifier:t,withoutInteractiveFormatting:n,allowedFormats:o}){const r=(0,d.useSelect)(BI,[]),l=(0,u.useMemo)((()=>r.filter((({name:e,interactive:t,tagName:r})=>!(o&&!o.includes(e)||n&&(t||II.has(r)))))),[r,o,n]),i=(0,d.useSelect)((n=>l.reduce(((o,r)=>r.__experimentalGetPropsForEditableTreePreparation?{...o,...TI(r.__experimentalGetPropsForEditableTreePreparation(n,{richTextIdentifier:t,blockClientId:e}),r.name)}:o),{})),[l,e,t]),s=(0,d.useDispatch)(),a=[],c=[],p=[],m=[];for(const e in i)m.push(i[e]);return l.forEach((n=>{if(n.__experimentalCreatePrepareEditableTree){const o=n.__experimentalCreatePrepareEditableTree(MI(i,n.name),{richTextIdentifier:t,blockClientId:e});n.__experimentalCreateOnChangeEditableValue?c.push(o):a.push(o)}if(n.__experimentalCreateOnChangeEditableValue){let o={};n.__experimentalGetPropsForEditableTreeChangeHandler&&(o=n.__experimentalGetPropsForEditableTreeChangeHandler(s,{richTextIdentifier:t,blockClientId:e}));const r=MI(i,n.name);p.push(n.__experimentalCreateOnChangeEditableValue({..."object"==typeof r?r:{},...o},{richTextIdentifier:t,blockClientId:e}))}})),{formatTypes:l,prepareHandlers:a,valueHandlers:c,changeHandlers:p,dependencies:m}}({clientId:D,identifier:C,withoutInteractiveFormatting:v,allowedFormats:X});function le(e){return ee.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,Y.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:se,getValue:ae,onChange:ce,ref:ue}=(0,Y.__unstableUseRichText)({value:n,onChange(e,{__unstableFormats:t,__unstableText:n}){o(e),Object.values(oe).forEach((e=>{e(t,n)}))},selectionStart:H,selectionEnd:G,onSelectionChange:J,placeholder:g,__unstableIsSelected:U,__unstableDisableFormats:T,preserveWhiteSpace:x,__unstableDependencies:[...re,t],__unstableAfterParse:function(e){return ne.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:le,__unstableAddInvisibleFormats:function(e){return te.reduce(((t,n)=>n(t,e.text)),e.formats)}}),de=function(e){return(0,_l.__unstableUseAutocompleteProps)({...e,completers:rf(e)})}({onReplace:h,completers:m,record:se,onChange:ce});!function({html:e,value:t}){const n=(0,u.useRef)(),o=!!t.activeFormats?.length,{__unstableMarkLastChangeAsPersistent:r}=(0,d.useDispatch)(Nr);(0,u.useLayoutEffect)((()=>{if(n.current){if(n.current!==t.text){const e=window.setTimeout((()=>{r()}),1e3);return n.current=t.text,()=>{window.clearTimeout(e)}}r()}else n.current=t.text}),[e,o])}({html:n,value:se});const pe=(0,u.useRef)(new Set),me=(0,u.useRef)(new Set);function he(){A.current?.focus()}const ge=t;return(0,s.createElement)(s.Fragment,null,U&&(0,s.createElement)(HI.Provider,{value:pe},(0,s.createElement)(GI.Provider,{value:me},(0,s.createElement)(_l.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},e&&e({value:se,onChange:ce,onFocus:he}),(0,s.createElement)(zI,{value:se,onChange:ce,onFocus:he,formatTypes:ee,forwardedRef:A})))),U&&Q&&(0,s.createElement)(gI,{inline:i,editableContentElement:A.current,value:se}),(0,s.createElement)(ge,{role:"textbox","aria-multiline":!M,"aria-label":g,"aria-readonly":j,...N,...de,ref:(0,p.useMergeRefs)([ue,L,de.ref,N.ref,EI({value:se,onChange:ce}),SI({getValue:ae,onChange:ce,__unstableAllowPrefixTransformations:P,formatTypes:ee,onReplace:h,selectionChange:q}),NI(),(0,p.useRefEffect)((e=>{function t(e){(zs.isKeyboardEvent.primary(e,"z")||zs.isKeyboardEvent.primary(e,"y")||zs.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[]),PI(pe),RI(me),fI(),_I({isSelected:U,disableFormats:T,onChange:ce,value:se,formatTypes:ee,tagName:t,onReplace:h,onSplit:E,__unstableEmbedURLOnPaste:I,pastePlainText:B}),CI({value:se,onMerge:_,onRemove:k}),xI({removeEditorOnlyFormats:le,value:se,onReplace:h,onSplit:E,onChange:ce,disableLineBreaks:M,onSplitAtEnd:w,onSplitAtDoubleLineEnd:S}),LI(),A]),contentEditable:!j,suppressContentEditableWarning:!0,className:ml()("block-editor-rich-text__editable",N.className,"rich-text"),tabIndex:0!==N.tabIndex||j?N.tabIndex:null,"data-wp-block-attribute-key":C}))}const $I=(jI=(0,u.forwardRef)(UI),(0,u.forwardRef)(((e,t)=>{let n=e.value,o=e.onChange;Array.isArray(n)&&(w()("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),n=c.children.toHTML(e.value),o=t=>e.onChange(c.children.fromDOM((0,Y.__unstableCreateElement)(document,t).childNodes)));const r=e.multiline?FI:jI,l=(0,p.useInstanceId)(r);return(0,s.createElement)(r,{...e,identifier:e.identifier||l,value:n,onChange:o,ref:t})})));var jI;$I.Content=VI,$I.isEmpty=e=>!e||0===e.length;const WI=(0,u.forwardRef)(((e,t)=>(0,s.createElement)($I,{ref:t,...e,disableEditing:!1})));WI.Content=VI,WI.isEmpty=e=>!e||0===e.length;const KI=WI,ZI=(0,u.forwardRef)(((e,t)=>(0,s.createElement)(KI,{ref:t,...e,__unstableDisableFormats:!0})));ZI.Content=({value:e="",tagName:t="div",...n})=>(0,s.createElement)(t,{...n},e);const qI=ZI,YI=(0,u.forwardRef)((({__experimentalVersion:e,...t},n)=>{if(2===e)return(0,s.createElement)(qI,{ref:n,...t});const{className:o,onChange:r,...l}=t;return(0,s.createElement)(Nf.A,{ref:n,className:ml()("block-editor-plain-text",o),onChange:e=>r(e.target.value),...l})}));function XI({property:e,viewport:t,desc:n}){const o=(0,p.useInstanceId)(XI),r=n||(0,x.sprintf)((0,x._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),e,t.label);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("span",{"aria-describedby":`rbc-desc-${o}`},t.label),(0,s.createElement)(_l.VisuallyHidden,{as:"span",id:`rbc-desc-${o}`},r))}const QI=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:l,renderResponsiveControls:i,isResponsive:a=!1,defaultLabel:c={id:"all",label:(0,x._x)("All","screen sizes")},viewports:d=[{id:"small",label:(0,x.__)("Small screens")},{id:"medium",label:(0,x.__)("Medium screens")},{id:"large",label:(0,x.__)("Large screens")}]}=e;if(!t||!n||!l)return null;const p=o||(0,x.sprintf)((0,x.__)("Use the same %s on all screensizes."),n),m=(0,x.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),h=l((0,s.createElement)(XI,{property:n,viewport:c}),c);return(0,s.createElement)("fieldset",{className:"block-editor-responsive-block-control"},(0,s.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),(0,s.createElement)("div",{className:"block-editor-responsive-block-control__inner"},(0,s.createElement)(_l.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-responsive-block-control__toggle",label:p,checked:!a,onChange:r,help:m}),(0,s.createElement)("div",{className:ml()("block-editor-responsive-block-control__group",{"is-responsive":a})},!a&&h,a&&(i?i(d):d.map((e=>(0,s.createElement)(u.Fragment,{key:e.id},l((0,s.createElement)(XI,{property:n,viewport:e}),e))))))))};function JI({character:e,type:t,onUse:n}){const o=(0,u.useContext)(HI),r=(0,u.useRef)();return r.current=n,(0,u.useEffect)((()=>{function n(n){zs.isKeyboardEvent[t](n,e)&&(r.current(),n.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}}),[e,t]),null}function eT({name:e,shortcutType:t,shortcutCharacter:n,...o}){let r,l="RichText.ToolbarControls";return e&&(l+=`.${e}`),t&&n&&(r=zs.displayShortcut[t](n)),(0,s.createElement)(_l.Fill,{name:l},(0,s.createElement)(_l.ToolbarButton,{...o,shortcut:r}))}function tT({inputType:e,onInput:t}){const n=(0,u.useContext)(GI),o=(0,u.useRef)();return o.current=t,(0,u.useEffect)((()=>{function t(t){t.inputType===e&&(o.current(),t.preventDefault())}return n.current.add(t),()=>{n.current.delete(t)}}),[e]),null}const nT=(0,s.createElement)(_l.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,s.createElement)(_l.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"}));const oT=(0,u.forwardRef)((function(e,t){const n=(0,d.useSelect)((e=>e(Nr).__unstableGetEditorMode()),[]),{__unstableSetEditorMode:o}=(0,d.useDispatch)(Nr);return(0,s.createElement)(_l.Dropdown,{renderToggle:({isOpen:o,onToggle:r})=>(0,s.createElement)(_l.Button,{...e,ref:t,icon:"navigation"===n?nT:La,"aria-expanded":o,"aria-haspopup":"true",onClick:r,label:(0,x.__)("Tools")}),popoverProps:{placement:"bottom-start"},renderContent:()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.NavigableMenu,{role:"menu","aria-label":(0,x.__)("Tools")},(0,s.createElement)(_l.MenuItemsChoice,{value:"navigation"===n?"navigation":"edit",onSelect:o,choices:[{value:"edit",label:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ti,{icon:La}),(0,x.__)("Edit"))},{value:"navigation",label:(0,s.createElement)(s.Fragment,null,nT,(0,x.__)("Select"))}]})),(0,s.createElement)("div",{className:"block-editor-tool-selector__help"},(0,x.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function rT({units:e,...t}){const[n]=Ar("spacing.units"),o=(0,_l.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vw"],units:e});return(0,s.createElement)(_l.__experimentalUnitControl,{units:o,...t})}const lT=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"}));class iT extends u.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.submitLink=this.submitLink.bind(this),this.state={expanded:!1}}toggle(){this.setState({expanded:!this.state.expanded})}submitLink(e){e.preventDefault(),this.toggle()}render(){const{url:e,onChange:t}=this.props,{expanded:n}=this.state,o=e?(0,x.__)("Edit link"):(0,x.__)("Insert link");return(0,s.createElement)("div",{className:"block-editor-url-input__button"},(0,s.createElement)(_l.Button,{icon:ru,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,s.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},(0,s.createElement)("div",{className:"block-editor-url-input__button-modal-line"},(0,s.createElement)(_l.Button,{className:"block-editor-url-input__back",icon:lT,label:(0,x.__)("Close"),onClick:this.toggle}),(0,s.createElement)(ta,{__nextHasNoMarginBottom:!0,value:e||"",onChange:t}),(0,s.createElement)(_l.Button,{icon:Ks,label:(0,x.__)("Submit"),type:"submit"}))))}}const sT=iT,aT=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.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-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})),cT="none",uT="custom",dT="media",pT="attachment",mT=["noreferrer","noopener"],hT=({linkDestination:e,onChangeUrl:t,url:n,mediaType:o="image",mediaUrl:r,mediaLink:l,linkTarget:i,linkClass:a,rel:c,showLightboxSetting:d,lightboxEnabled:p,onSetLightbox:m})=>{const[h,g]=(0,u.useState)(!1),[f,b]=(0,u.useState)(null),[v,k]=(0,u.useState)(!1),[_,y]=(0,u.useState)(null),E=(0,u.useRef)(null),w=(0,u.useRef)();(0,u.useEffect)((()=>{if(!w.current)return;(As.focus.focusable.find(w.current)[0]||w.current).focus()}),[v,n,p]);const S=()=>{k(!1)},C=()=>{const e=[{linkDestination:dT,title:(0,x.__)("Link to image file"),url:"image"===o?r:void 0,icon:aT}];return"image"===o&&l&&e.push({linkDestination:pT,title:(0,x.__)("Link to attachment page"),url:"image"===o?l:void 0,icon:la}),e},B=(0,s.createElement)(_l.__experimentalVStack,{spacing:"3"},(0,s.createElement)(_l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Open in new tab"),onChange:e=>{const n=(e=>{const t=e?"_blank":void 0;let n;if(t){const e=(null!=c?c:"").split(" ");mT.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(null!=c?c:"").split(" ").filter((e=>!1===mT.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);t(n)},checked:"_blank"===i}),(0,s.createElement)(_l.TextControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Link rel"),value:null!=c?c:"",onChange:e=>{t({rel:e})}}),(0,s.createElement)(_l.TextControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Link CSS class"),value:a||"",onChange:e=>{t({linkClass:e})}})),I=null!==_?_:n,T=!0==(!I&&!p),M=(C().find((t=>t.linkDestination===e))||{}).title;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.ToolbarButton,{icon:ru,className:"components-toolbar__control",label:(0,x.__)("Link"),"aria-expanded":h,onClick:()=>{g(!0)},ref:b,isActive:!!n||p}),h&&(0,s.createElement)(lI,{ref:w,anchor:f,onFocusOutside:e=>{const t=E.current;t&&t.contains(e.target)||(g(!1),y(null),S())},onClose:()=>{y(null),S(),g(!1)},renderSettings:p?null:()=>B,additionalControls:T&&(0,s.createElement)(_l.NavigableMenu,null,C().map((e=>(0,s.createElement)(_l.MenuItem,{key:e.linkDestination,icon:e.icon,iconPosition:"left",onClick:()=>{y(null),(e=>{const n=C();let o;o=e?(n.find((t=>t.url===e))||{linkDestination:uT}).linkDestination:cT,t({linkDestination:o,href:e})})(e.url),S()}},e.title))),d&&(0,s.createElement)(_l.MenuItem,{key:"expand-on-click",className:"block-editor-url-popover__expand-on-click",icon:sf,info:(0,x.__)("Scale the image with a lightbox effect."),iconPosition:"left",onClick:()=>{y(null),t({linkDestination:cT,href:""}),m(!0),S()}},(0,x.__)("Expand on click"))),offset:13},(!n||v)&&!p&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(lI.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:I,onChangeInputValue:y,onSubmit:e=>{if(_){const e=C().find((e=>e.url===_))?.linkDestination||uT;t({href:_,linkDestination:e,lightbox:{enabled:!1}})}S(),y(null),e.preventDefault()},autocompleteRef:E})),n&&!v&&!p&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(lI.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:n,onEditLinkClick:()=>{e!==dT&&e!==pT||y(""),k(!0)},urlLabel:M}),(0,s.createElement)(_l.Button,{icon:Aa,label:(0,x.__)("Remove link"),onClick:()=>{t({linkDestination:cT,href:""})},size:"compact"})),!n&&!v&&p&&(0,s.createElement)("div",{className:"block-editor-url-popover__expand-on-click"},(0,s.createElement)(Ti,{icon:sf}),(0,s.createElement)("div",{className:"text"},(0,s.createElement)("p",null,(0,x.__)("Expand on click")),(0,s.createElement)("p",{className:"description"},(0,x.__)("Scales the image with a lightbox effect"))),(0,s.createElement)(_l.Button,{icon:Aa,label:(0,x.__)("Disable expand on click"),onClick:()=>{m(!1)},size:"compact"}))))};function gT(){return w()("wp.blockEditor.PreviewOptions",{version:"6.5"}),null}function fT(e){const[t,n]=(0,u.useState)(window.innerWidth);(0,u.useEffect)((()=>{if("Desktop"===e)return;const t=()=>n(window.innerWidth);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e]);const o=e=>{let n;switch(e){case"Tablet":n=780;break;case"Mobile":n=360;break;default:return null}return n<t?n:t};return(e=>{const t="Mobile"===e?"768px":"1024px",n=(window.innerHeight<800?36:72)+"px",r="auto";switch(e){case"Tablet":case"Mobile":return{width:o(e),marginTop:n,marginBottom:n,marginLeft:r,marginRight:r,height:t,borderRadius:"2px 2px 2px 2px",border:"1px solid #ddd",overflowY:"auto"};default:return{marginLeft:r,marginRight:r}}})(e)}const bT=(0,d.withSelect)((e=>({selectedBlockClientId:e(Nr).getBlockSelectionStart()})))((({selectedBlockClientId:e})=>{const t=fd(e);return e?(0,s.createElement)(_l.Button,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current.focus()}},(0,x.__)("Skip to the selected block")):null})),vT=window.wp.wordcount;const kT=(0,d.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(Nr);return{blocks:t()}}))((function({blocks:e}){const t=(0,vT.count)((0,c.serialize)(e),"words");return(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,s.createElement)(qh,{icon:SS,showColors:!0}),(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},(0,x.sprintf)((0,x._n)("%d Block","%d Blocks",e.length),e.length)),(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,x.sprintf)((0,x._n)("%d word selected.","%d words selected.",t),t))))}));function _T({blockName:e}){const{preferredStyle:t,onUpdatePreferredStyleVariations:n,styles:o}=(0,d.useSelect)((t=>{var n;const o=t(Nr).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:o?.value?.[e],onUpdatePreferredStyleVariations:null!==(n=o?.onChange)&&void 0!==n?n:null,styles:t(c.store).getBlockStyles(e)}}),[e]),r=(0,u.useMemo)((()=>[{label:(0,x.__)("Not set"),value:""},...o.map((({label:e,name:t})=>({label:e,value:t})))]),[o]),l=(0,u.useMemo)((()=>NS(o)?.name),[o]),i=(0,u.useCallback)((t=>{n(e,t)}),[e,n]);return t&&t!==l?n&&(0,s.createElement)("div",{className:"default-style-picker__default-switcher"},(0,s.createElement)(_l.SelectControl,{__nextHasNoMarginBottom:!0,options:r,value:t||"",label:(0,x.__)("Default Style"),onChange:i})):null}const yT=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})),ET=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.Path,{d:"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"})),wT={name:"settings",title:(0,x.__)("Settings"),value:"settings",icon:yT,className:"block-editor-block-inspector__tab-item"},ST={name:"styles",title:(0,x.__)("Styles"),value:"styles",icon:ET,className:"block-editor-block-inspector__tab-item"},CT={name:"list",title:(0,x.__)("List View"),value:"list-view",icon:XC,className:"block-editor-block-inspector__tab-item"},xT=()=>{const e=(0,_l.__experimentalUseSlotFills)(xs.slotName);return Boolean(e&&e.length)?(0,s.createElement)(_l.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,x.__)("Advanced"),initialOpen:!1},(0,s.createElement)(Bs.Slot,{group:"advanced"})):null},BT=()=>{const[e,t]=(0,u.useState)(),{multiSelectedBlocks:n}=(0,d.useSelect)((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:n}=e(Nr);return{multiSelectedBlocks:t(n())}}),[]);return(0,u.useLayoutEffect)((()=>{void 0===e&&t(n.some((({attributes:e})=>!!e?.style?.position?.type)))}),[e,n,t]),(0,s.createElement)(_l.PanelBody,{className:"block-editor-block-inspector__position",title:(0,x.__)("Position"),initialOpen:null!=e&&e},(0,s.createElement)(Bs.Slot,{group:"position"}))},IT=()=>{const e=(0,_l.__experimentalUseSlotFills)(vs.position.Slot.__unstableName);return Boolean(e&&e.length)?(0,s.createElement)(BT,null):null},TT=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),MT="isInspectorControlsTabsHintVisible";function PT(){const e=(0,d.useSelect)((e=>{var t;return null===(t=e(Ws.store).get("core",MT))||void 0===t||t}),[]),t=(0,u.useRef)(),{set:n}=(0,d.useDispatch)(Ws.store);return e?(0,s.createElement)("div",{ref:t,className:"block-editor-inspector-controls-tabs__hint"},(0,s.createElement)("div",{className:"block-editor-inspector-controls-tabs__hint-content"},(0,x.__)("Looking for other block settings? They've moved to the styles tab.")),(0,s.createElement)(_l.Button,{className:"block-editor-inspector-controls-tabs__hint-dismiss",icon:TT,iconSize:"16",label:(0,x.__)("Dismiss hint"),onClick:()=>{const e=As.focus.tabbable.findPrevious(t.current);e?.focus(),n("core",MT,!1)},showTooltip:!1})):null}const RT=({showAdvancedControls:e=!1})=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Bs.Slot,null),(0,s.createElement)(IT,null),e&&(0,s.createElement)("div",null,(0,s.createElement)(xT,null)),(0,s.createElement)(PT,null)),NT=({blockName:e,clientId:t,hasBlockStyles:n})=>{const o=zu({blockName:e});return(0,s.createElement)(s.Fragment,null,n&&(0,s.createElement)("div",null,(0,s.createElement)(_l.PanelBody,{title:(0,x.__)("Styles")},(0,s.createElement)(Ax,{clientId:t}),(0,c.hasBlockSupport)(e,"defaultStylePicker",!0)&&(0,s.createElement)(_T,{blockName:e}))),(0,s.createElement)(Bs.Slot,{group:"color",label:(0,x.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,s.createElement)(Bs.Slot,{group:"background",label:(0,x.__)("Background")}),(0,s.createElement)(Bs.Slot,{group:"filter"}),(0,s.createElement)(Bs.Slot,{group:"typography",label:(0,x.__)("Typography")}),(0,s.createElement)(Bs.Slot,{group:"dimensions",label:(0,x.__)("Dimensions")}),(0,s.createElement)(Bs.Slot,{group:"border",label:o}),(0,s.createElement)(Bs.Slot,{group:"styles"}))},LT=["core/navigation"],AT=e=>!LT.includes(e),{Tabs:OT}=ie(_l.privateApis);function DT({blockName:e,clientId:t,hasBlockStyles:n,tabs:o}){const r=AT(e)?void 0:CT.name;return(0,s.createElement)("div",{className:"block-editor-block-inspector__tabs"},(0,s.createElement)(OT,{initialTabId:r,key:t},(0,s.createElement)(OT.TabList,null,o.map((e=>(0,s.createElement)(OT.Tab,{key:e.name,tabId:e.name,render:(0,s.createElement)(_l.Button,{icon:e.icon,label:e.title,className:e.className})})))),(0,s.createElement)(OT.TabPanel,{tabId:wT.name,focusable:!1},(0,s.createElement)(RT,{showAdvancedControls:!!e})),(0,s.createElement)(OT.TabPanel,{tabId:ST.name,focusable:!1},(0,s.createElement)(NT,{blockName:e,clientId:t,hasBlockStyles:n})),(0,s.createElement)(OT.TabPanel,{tabId:CT.name,focusable:!1},(0,s.createElement)(Bs.Slot,{group:"list"}))))}const zT=[];function VT(e){const t=[],{border:n,color:o,default:r,dimensions:l,list:i,position:s,styles:a,typography:c,effects:u}=vs,p=AT(e),m=(0,_l.__experimentalUseSlotFills)(i.Slot.__unstableName),h=!p&&!!m&&m.length,g=[...(0,_l.__experimentalUseSlotFills)(n.Slot.__unstableName)||[],...(0,_l.__experimentalUseSlotFills)(o.Slot.__unstableName)||[],...(0,_l.__experimentalUseSlotFills)(l.Slot.__unstableName)||[],...(0,_l.__experimentalUseSlotFills)(a.Slot.__unstableName)||[],...(0,_l.__experimentalUseSlotFills)(c.Slot.__unstableName)||[],...(0,_l.__experimentalUseSlotFills)(u.Slot.__unstableName)||[]].length,f=(0,_l.__experimentalUseSlotFills)(xs.slotName)||[],b=[...(0,_l.__experimentalUseSlotFills)(r.Slot.__unstableName)||[],...(0,_l.__experimentalUseSlotFills)(s.Slot.__unstableName)||[],...h&&g>1?f:[]];h&&t.push(CT),b.length&&t.push(wT),g&&t.push(ST);const v=function(e,t={}){return void 0!==t[e]?t[e]:void 0===t.default||t.default}(e,(0,d.useSelect)((e=>e(Nr).getSettings().blockInspectorTabs),[]));return v?t:zT}const{createPrivateSlotFill:FT}=ie(_l.privateApis),{Fill:HT,Slot:GT}=FT("BlockInformation"),UT=e=>y()[h]?(0,s.createElement)(HT,{...e}):null;UT.Slot=e=>(0,s.createElement)(GT,{...e});const $T=UT;function jT({clientIds:e}){return e.length?(0,s.createElement)(_l.__experimentalVStack,{spacing:1},e.map((e=>(0,s.createElement)(WT,{key:e,clientId:e})))):null}function WT({clientId:e}){const{name:t,icon:n,isSelected:o}=(0,d.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o,isBlockSelected:r,hasSelectedInnerBlock:l}=t(Nr),{getBlockType:i}=t(c.store),s=i(n(e)),a=o(e);return{name:s&&(0,c.__experimentalGetBlockLabel)(s,a,"list-view"),icon:s?.icon,isSelected:r(e)||l(e,!0)}}),[e]),{selectBlock:r}=(0,d.useDispatch)(Nr);return(0,s.createElement)(_l.Button,{isPressed:o,onClick:()=>r(e)},(0,s.createElement)(_l.Flex,null,(0,s.createElement)(_l.FlexItem,null,(0,s.createElement)(qh,{icon:n})),(0,s.createElement)(_l.FlexBlock,{style:{textAlign:"left"}},(0,s.createElement)(_l.__experimentalTruncate,null,t))))}function KT({topLevelLockedBlock:e}){const t=(0,d.useSelect)((t=>{const{getClientIdsOfDescendants:n,getBlockName:o,getBlockEditingMode:r}=t(Nr);return n(e).filter((e=>"core/list-item"!==o(e)&&"contentOnly"===r(e)))}),[e]),n=ih(e);return(0,s.createElement)("div",{className:"block-editor-block-inspector"},(0,s.createElement)(P_,{...n,className:n.isSynced&&"is-synced"}),(0,s.createElement)(iB,{blockClientId:e}),(0,s.createElement)($T.Slot,null),t.length>0&&(0,s.createElement)(_l.PanelBody,{title:(0,x.__)("Content")},(0,s.createElement)(jT,{clientIds:t})))}const ZT=({animate:e,wrapper:t,children:n})=>e?t(n):n,qT=({blockInspectorAnimationSettings:e,selectedBlockClientId:t,children:n})=>{const o=e&&"leftToRight"===e.enterDirection?-50:50;return(0,s.createElement)(_l.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:o,opacity:0},key:t},n)},YT=({clientId:e,blockName:t})=>{const n=VT(t),o=n?.length>1,r=(0,d.useSelect)((e=>{const{getBlockStyles:n}=e(c.store),o=n(t);return o&&o.length>0}),[t]),l=ih(e),i=zu({blockName:t});return(0,s.createElement)("div",{className:"block-editor-block-inspector"},(0,s.createElement)(P_,{...l,className:l.isSynced&&"is-synced"}),(0,s.createElement)(iB,{blockClientId:e}),(0,s.createElement)($T.Slot,null),o&&(0,s.createElement)(DT,{hasBlockStyles:r,clientId:e,blockName:t,tabs:n}),!o&&(0,s.createElement)(s.Fragment,null,r&&(0,s.createElement)("div",null,(0,s.createElement)(_l.PanelBody,{title:(0,x.__)("Styles")},(0,s.createElement)(Ax,{clientId:e}),(0,c.hasBlockSupport)(t,"defaultStylePicker",!0)&&(0,s.createElement)(_T,{blockName:t}))),(0,s.createElement)(Bs.Slot,null),(0,s.createElement)(Bs.Slot,{group:"list"}),(0,s.createElement)(Bs.Slot,{group:"color",label:(0,x.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,s.createElement)(Bs.Slot,{group:"typography",label:(0,x.__)("Typography")}),(0,s.createElement)(Bs.Slot,{group:"dimensions",label:(0,x.__)("Dimensions")}),(0,s.createElement)(Bs.Slot,{group:"border",label:i}),(0,s.createElement)(Bs.Slot,{group:"styles"}),(0,s.createElement)(Bs.Slot,{group:"background",label:(0,x.__)("Background")}),(0,s.createElement)(IT,null),(0,s.createElement)("div",null,(0,s.createElement)(xT,null))),(0,s.createElement)(bT,{key:"back"}))},XT=({showNoBlockSelectedMessage:e=!0})=>{const{count:t,selectedBlockName:n,selectedBlockClientId:o,blockType:r,topLevelLockedBlock:l}=(0,d.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o,__unstableGetContentLockingParent:r,getTemplateLock:l}=e(Nr),i=t(),s=i&&o(i),a=s&&(0,c.getBlockType)(s);return{count:n(),selectedBlockClientId:i,selectedBlockName:s,blockType:a,topLevelLockedBlock:r(i)||("contentOnly"===l(i)||"core/block"===s?i:void 0)}}),[]),i=VT(r?.name),a=i?.length>1,u=function(e,t){return(0,d.useSelect)((t=>{if(e){const n=t(Nr).getSettings().blockInspectorAnimation,o=n?.animationParent,{getSelectedBlockClientId:r,getBlockParentsByBlockName:l}=t(Nr);return l(r(),o,!0)[0]||e.name===o?n?.[e.name]:null}return null}),[t,e])}(r,o),p=zu({blockName:n});if(t>1)return(0,s.createElement)("div",{className:"block-editor-block-inspector"},(0,s.createElement)(kT,null),a?(0,s.createElement)(DT,{tabs:i}):(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Bs.Slot,null),(0,s.createElement)(Bs.Slot,{group:"color",label:(0,x.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,s.createElement)(Bs.Slot,{group:"typography",label:(0,x.__)("Typography")}),(0,s.createElement)(Bs.Slot,{group:"dimensions",label:(0,x.__)("Dimensions")}),(0,s.createElement)(Bs.Slot,{group:"border",label:p}),(0,s.createElement)(Bs.Slot,{group:"styles"})));const m=n===(0,c.getUnregisteredTypeHandlerName)();return r&&o&&!m?l?(0,s.createElement)(KT,{topLevelLockedBlock:l}):(0,s.createElement)(ZT,{animate:u,wrapper:e=>(0,s.createElement)(qT,{blockInspectorAnimationSettings:u,selectedBlockClientId:o},e)},(0,s.createElement)(YT,{clientId:o,blockName:r.name})):e?(0,s.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,x.__)("No block selected.")):null},QT=()=>(w()("__unstableUseClipboardHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),ly());function JT(e){return w()("CopyHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),(0,s.createElement)("div",{...e,ref:ly()})}const eM=()=>{};const tM=(0,u.forwardRef)((function({rootClientId:e,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r=!1,__experimentalInsertionIndex:l,__experimentalFilterValue:i,onSelect:a=eM,shouldFocusBlock:c=!1},u){const{destinationRootClientId:p}=(0,d.useSelect)((n=>{const{getBlockRootClientId:o}=n(Nr);return{destinationRootClientId:e||o(t)||void 0}}),[t,e]);return(0,s.createElement)(ew,{onSelect:a,rootClientId:p,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r,__experimentalInsertionIndex:l,__experimentalFilterValue:i,shouldFocusBlock:c,ref:u})}));function nM(){return w()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const oM=-1!==window.navigator.userAgent.indexOf("Trident"),rM=new Set([zs.UP,zs.DOWN,zs.LEFT,zs.RIGHT]),lM=.75;function iM(){const e=(0,d.useSelect)((e=>e(Nr).hasSelectedBlock()),[]);return(0,p.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,l,i;function s(){r||(r=o.requestAnimationFrame((()=>{p(),r=null})))}function a(e){l&&o.cancelAnimationFrame(l),l=o.requestAnimationFrame((()=>{c(e),l=null}))}function c({keyCode:e}){if(!m())return;const r=(0,As.computeCaretRect)(o);if(!r)return;if(!i)return void(i=r);if(rM.has(e))return void(i=r);const l=r.top-i.top;if(0===l)return;const s=(0,As.getScrollContainer)(t);if(!s)return;const a=s===n.body||s===n.documentElement,c=a?o.scrollY:s.scrollTop,u=a?0:s.getBoundingClientRect().top,d=a?i.top/o.innerHeight:(i.top-u)/(o.innerHeight-u);if(0===c&&d<lM&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(i=r);const p=a?o.innerHeight:s.clientHeight;i.top+i.height>u+p||i.top<u?i=r:a?o.scrollBy(0,l):s.scrollTop+=l}function u(){n.addEventListener("selectionchange",d)}function d(){n.removeEventListener("selectionchange",d),p()}function p(){m()&&(i=(0,As.computeCaretRect)(o))}function m(){return t.contains(n.activeElement)&&n.activeElement.isContentEditable}return o.addEventListener("scroll",s,!0),o.addEventListener("resize",s,!0),t.addEventListener("keydown",a),t.addEventListener("keyup",c),t.addEventListener("mousedown",u),t.addEventListener("touchstart",u),()=>{o.removeEventListener("scroll",s,!0),o.removeEventListener("resize",s,!0),t.removeEventListener("keydown",a),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),o.cancelAnimationFrame(r),o.cancelAnimationFrame(l)}}),[e])}const sM=oM?e=>e.children:function({children:e}){return(0,s.createElement)("div",{ref:iM(),className:"block-editor__typewriter"},e)},aM=(0,u.createContext)({});function cM({children:e,uniqueId:t,blockName:n=""}){const o=(0,u.useContext)(aM),{name:r}=y();n=n||r;const l=(0,u.useMemo)((()=>function(e,t,n){const o={...e,[t]:e[t]?new Set(e[t]):new Set};return o[t].add(n),o}(o,n,t)),[o,n,t]);return(0,s.createElement)(aM.Provider,{value:l},e)}function uM(e,t=""){const n=(0,u.useContext)(aM),{name:o}=y();return t=t||o,Boolean(n[t]?.has(e))}const dM=e=>(w()("wp.blockEditor.__experimentalRecursionProvider",{since:"6.5",alternative:"wp.blockEditor.RecursionProvider"}),(0,s.createElement)(cM,{...e})),pM=e=>(w()("wp.blockEditor.__experimentalUseHasRecursion",{since:"6.5",alternative:"wp.blockEditor.useHasRecursion"}),uM(...e)),mM=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));function hM({title:e,help:t,actions:n=[],onClose:o}){return(0,s.createElement)(_l.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4},(0,s.createElement)(_l.__experimentalHStack,{alignment:"center"},(0,s.createElement)(_l.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13},e),(0,s.createElement)(_l.__experimentalSpacer,null),n.map((({label:e,icon:t,onClick:n})=>(0,s.createElement)(_l.Button,{key:e,className:"block-editor-inspector-popover-header__action",label:e,icon:t,variant:!t&&"tertiary",onClick:n},!t&&e))),o&&(0,s.createElement)(_l.Button,{className:"block-editor-inspector-popover-header__action",label:(0,x.__)("Close"),icon:mM,onClick:o})),t&&(0,s.createElement)(_l.__experimentalText,null,t))}const gM=(0,u.forwardRef)((function({onClose:e,onChange:t,...n},o){return(0,s.createElement)("div",{ref:o,className:"block-editor-publish-date-time-picker"},(0,s.createElement)(hM,{title:(0,x.__)("Publish"),actions:[{label:(0,x.__)("Now"),onClick:()=>t?.(null)}],onClose:e}),(0,s.createElement)(_l.DateTimePicker,{startOfWeek:(0,uB.getSettings)().l10n.startOfWeek,onChange:t,...n}))})),fM=window.wp.commands,bM=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M19.75 9c0-1.257-.565-2.197-1.39-2.858-.797-.64-1.827-1.017-2.815-1.247-1.802-.42-3.703-.403-4.383-.396L11 4.5V6l.177-.001c.696-.006 2.416-.02 4.028.356.887.207 1.67.518 2.216.957.52.416.829.945.829 1.688 0 .592-.167.966-.407 1.23-.255.281-.656.508-1.236.674-1.19.34-2.82.346-4.607.346h-.077c-1.692 0-3.527 0-4.942.404-.732.209-1.424.545-1.935 1.108-.526.579-.796 1.33-.796 2.238 0 1.257.565 2.197 1.39 2.858.797.64 1.827 1.017 2.815 1.247 1.802.42 3.703.403 4.383.396L13 19.5h.714V22L18 18.5 13.714 15v3H13l-.177.001c-.696.006-2.416.02-4.028-.356-.887-.207-1.67-.518-2.216-.957-.52-.416-.829-.945-.829-1.688 0-.592.167-.966.407-1.23.255-.281.656-.508 1.237-.674 1.189-.34 2.819-.346 4.606-.346h.077c1.692 0 3.527 0 4.941-.404.732-.209 1.425-.545 1.936-1.108.526-.579.796-1.33.796-2.238z"})),vM=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7zm-5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h1V9H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-1h-1.5v1z"})),kM=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})),_M=()=>{const{replaceBlocks:e,multiSelect:t}=(0,d.useDispatch)(Nr),{blocks:n,clientIds:o,canRemove:r,possibleBlockTransformations:l}=(0,d.useSelect)((e=>{const{getBlockRootClientId:t,getBlockTransformItems:n,getSelectedBlockClientIds:o,getBlocksByClientId:r,canRemoveBlocks:l}=e(Nr),i=o(),s=r(i),a=t(i[0]);return{blocks:s,clientIds:i,possibleBlockTransformations:n(s,a),canRemove:l(i,a)}}),[]),i=1===n.length&&(0,c.isTemplatePart)(n[0]);function a(r){const l=(0,c.switchToBlockType)(n,r);var i;e(o,l),(i=l).length>1&&t(i[0].clientId,i[i.length-1].clientId)}const u=!!l.length&&r&&!i;if(!o||o.length<1||!u)return{isLoading:!1,commands:[]};return{isLoading:!1,commands:l.map((e=>{const{name:t,title:n,icon:o}=e;return{name:"core/block-editor/transform-to-"+t.replace("/","-"),label:(0,x.sprintf)((0,x.__)("Transform to %s"),n),icon:(0,s.createElement)(qh,{icon:o}),callback:({close:e})=>{a(t),e()}}}))}},yM=()=>{const{clientIds:e}=(0,d.useSelect)((e=>{const{getSelectedBlockClientIds:t}=e(Nr);return{clientIds:t()}}),[]),{getBlockRootClientId:t,canMoveBlocks:n,getBlockCount:o}=(0,d.useSelect)(Nr),{setBlockMovingClientId:r,setNavigationMode:l,selectBlock:i}=(0,d.useDispatch)(Nr);if(!e||e.length<1)return{isLoading:!1,commands:[]};const s=t(e[0]),a=[];return n(e,s)&&1!==o(s)&&a.push({name:"move-to",label:(0,x.__)("Move to"),callback:()=>{l(!0),i(e[0]),r(e[0])},icon:bM}),{isLoading:!1,commands:a.map((e=>({...e,name:"core/block-editor/action-"+e.name,callback:({close:t})=>{e.callback(),t()}})))}},EM=()=>{const{clientIds:e,isUngroupable:t,isGroupable:n}=(0,d.useSelect)((e=>{const{getSelectedBlockClientIds:t,isUngroupable:n,isGroupable:o}=e(Nr);return{clientIds:t(),isUngroupable:n(),isGroupable:o()}}),[]),{canInsertBlockType:o,getBlockRootClientId:r,getBlocksByClientId:l,canRemoveBlocks:i}=(0,d.useSelect)(Nr),{getDefaultBlockName:s,getGroupingBlockName:a}=(0,d.useSelect)(c.store),u=l(e),{removeBlocks:p,replaceBlocks:m,duplicateBlocks:h,insertAfterBlock:g,insertBeforeBlock:f}=(0,d.useDispatch)(Nr),b=()=>{if(!u.length)return;const t=a(),n=(0,c.switchToBlockType)(u,t);n&&m(e,n)},v=()=>{if(!u.length)return;const t=u[0].innerBlocks;t.length&&m(e,t)};if(!e||e.length<1)return{isLoading:!1,commands:[]};const k=r(e[0]),_=o(s(),k),y=u.every((e=>!!e&&(0,c.hasBlockSupport)(e.name,"multiple",!0)&&o(e.name,k))),E=i(e,k),w=[];return y&&w.push({name:"duplicate",label:(0,x.__)("Duplicate"),callback:()=>h(e,!0),icon:SS}),_&&w.push({name:"add-before",label:(0,x.__)("Add before"),callback:()=>{const t=Array.isArray(e)?e[0]:t;f(t)},icon:na},{name:"add-after",label:(0,x.__)("Add after"),callback:()=>{const t=Array.isArray(e)?e[e.length-1]:t;g(t)},icon:na}),n&&w.push({name:"Group",label:(0,x.__)("Group"),callback:b,icon:wC}),t&&w.push({name:"ungroup",label:(0,x.__)("Ungroup"),callback:v,icon:vM}),E&&w.push({name:"remove",label:(0,x.__)("Delete"),callback:()=>p(e,!0),icon:kM}),{isLoading:!1,commands:w.map((e=>({...e,name:"core/block-editor/action-"+e.name,callback:({close:t})=>{e.callback(),t()}})))}},wM=()=>{(0,fM.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:_M}),(0,fM.useCommandLoader)({name:"core/block-editor/blockActions",hook:yM}),(0,fM.useCommandLoader)({name:"core/block-editor/blockQuickActions",hook:EM,context:"block-selection-edit"})},SM="isResuableBlocksrRenameHintVisible";function CM(){const e=(0,d.useSelect)((e=>{var t;return null===(t=e(Ws.store).get("core",SM))||void 0===t||t}),[]),t=(0,u.useRef)(),{set:n}=(0,d.useDispatch)(Ws.store);return e?(0,s.createElement)("div",{ref:t,className:"reusable-blocks-menu-items__rename-hint"},(0,s.createElement)("div",{className:"reusable-blocks-menu-items__rename-hint-content"},(0,x.__)("Reusable blocks are now synced patterns. A synced pattern will behave in exactly the same way as a reusable block.")),(0,s.createElement)(_l.Button,{className:"reusable-blocks-menu-items__rename-hint-dismiss",icon:TT,iconSize:"16",label:(0,x.__)("Dismiss hint"),onClick:()=>{const e=As.focus.tabbable.findPrevious(t.current);e?.focus(),n("core",SM,!1)},showTooltip:!1})):null}const xM={button:"wp-element-button",caption:"wp-element-caption"},BM=e=>xM[e]?xM[e]:"",IM=()=>"",TM={__experimentalBorder:"border",color:"color",spacing:"spacing",typography:"typography"};function MM(e){const t="var:";if(e?.startsWith?.(t)){return`var(--wp--${e.slice(4).split("|").join("--")})`}return e}function PM(e={},t,n){const{kebabCase:o}=ie(_l.privateApis);let r=[];return Object.keys(e).forEach((l=>{const i=t+o(l.replace("/","-")),s=e[l];if(s instanceof Object){const e=i+n;r=[...r,...PM(s,e,n)]}else r.push(`${i}: ${s}`)})),r}const RM=(e,t)=>{const n={};return Object.entries(e).forEach((([e,o])=>{if("root"===e||!t?.[e])return;const r="string"==typeof o;if(r||Object.entries(o).forEach((([o,r])=>{if("root"===o||!t?.[e][o])return;const l=NM({[e]:{[o]:t[e][o]}});n[r]=[...n[r]||[],...l],delete t[e][o]})),r||o.root){const l=r?o:o.root,i=NM({[e]:t[e]});n[l]=[...n[l]||[],...i],delete t[e]}})),n};function NM(e={},t="",n,o={},r=!0){const{kebabCase:l}=ie(_l.privateApis),i=qr===t,s=Object.entries(c.__EXPERIMENTAL_STYLE_PROPERTY).reduce(((t,[o,{value:r,properties:s,useEngine:a,rootOnly:c}])=>{if(c&&!i)return t;const u=r;if("elements"===u[0]||a)return t;const d=Wn(e,u);if("--wp--style--root--padding"===o&&("string"==typeof d||!n))return t;if(s&&"string"!=typeof d)Object.entries(s).forEach((e=>{const[n,o]=e;if(!Wn(d,[o],!1))return;const r=n.startsWith("--")?n:l(n);t.push(`${r}: ${MM(Wn(d,[o]))}`)}));else if(Wn(e,u,!1)){const n=o.startsWith("--")?o:l(o);t.push(`${n}: ${MM(Wn(e,u))}`)}return t}),[]);return(0,Ri.getCSSRules)(e).forEach((e=>{if(i&&(n||!r)&&e.key.startsWith("padding"))return;const t=e.key.startsWith("--")?e.key:l(e.key);let a=e.value;if("string"!=typeof a&&a?.ref){const e=a.ref.split(".");if(a=Wn(o,e),!a||a?.ref)return}"font-size"===t&&(a=Wr({size:a},Zr(o?.settings))),"aspect-ratio"===t&&s.push("min-height: unset"),s.push(`${t}: ${a}`)})),s}function LM({layoutDefinitions:e=Al,style:t,selector:n,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:l}){let i="",s=o?oi(t?.spacing?.blockGap):"";if(r&&(n===qr?s=s||"0.5em":!o&&l&&(s=l)),s&&e&&(Object.values(e).forEach((({className:e,name:t,spacingStyles:r})=>{(o||"flex"===t||"grid"===t)&&r?.length&&r.forEach((t=>{const r=[];if(t.rules&&Object.entries(t.rules).forEach((([e,t])=>{r.push(`${e}: ${t||s}`)})),r.length){let l="";l=o?n===qr?`:where(${n} .${e})${t?.selector||""}`:`${n}-${e}${t?.selector||""}`:n===qr?`:where(.${e}${t?.selector||""})`:`:where(${n}.${e}${t?.selector||""})`,i+=`${l} { ${r.join("; ")}; }`}}))})),n===qr&&o&&(i+=`${n} { --wp--style--block-gap: ${s}; }`)),n===qr&&e){const t=["block","flex","grid"];Object.values(e).forEach((({className:e,displayMode:o,baseStyles:r})=>{o&&t.includes(o)&&(i+=`${n} .${e} { display:${o}; }`),r?.length&&r.forEach((t=>{const o=[];if(t.rules&&Object.entries(t.rules).forEach((([e,t])=>{o.push(`${e}: ${t}`)})),o.length){i+=`${`${n} .${e}${t?.selector||""}`} { ${o.join("; ")}; }`}}))}))}return i}const AM=["border","color","dimensions","spacing","typography","filter","outline","shadow"];function OM(e){if(!e)return{};const t=Object.entries(e).filter((([e])=>AM.includes(e))).map((([e,t])=>[e,JSON.parse(JSON.stringify(t))]));return Object.fromEntries(t)}const DM=(e,t)=>{var n;const o=[];if(!e?.settings)return o;const r=e=>{let t={};return Yr.forEach((({path:n})=>{const o=Wn(e,n,!1);!1!==o&&(t=jn(t,n,o))})),t},l=r(e.settings),i=e.settings?.custom;return(Object.keys(l).length>0||i)&&o.push({presets:l,custom:i,selector:qr}),Object.entries(null!==(n=e.settings?.blocks)&&void 0!==n?n:{}).forEach((([e,n])=>{const l=r(n),i=n.custom;(Object.keys(l).length>0||i)&&o.push({presets:l,custom:i,selector:t[e]?.selector})})),o},zM=(e,t)=>{const n=DM(e,t);let o="";return n.forEach((({presets:t,custom:n,selector:r})=>{const l=function(e={},t){const{kebabCase:n}=ie(_l.privateApis);return Yr.reduce(((o,{path:r,valueKey:l,valueFunc:i,cssVarInfix:s})=>{const a=Wn(e,r,[]);return["default","theme","custom"].forEach((e=>{a[e]&&a[e].forEach((e=>{l&&!i?o.push(`--wp--preset--${s}--${n(e.slug)}: ${e[l]}`):i&&"function"==typeof i&&o.push(`--wp--preset--${s}--${n(e.slug)}: ${i(e,t)}`)}))})),o}),[])}(t,e?.settings),i=PM(n,"--wp--custom--","--");i.length>0&&l.push(...i),l.length>0&&(o+=`${r}{${l.join(";")};}`)})),o},VM=(e,t,n,o,r=!1,l=!0)=>{const i=((e,t)=>{var n;const o=[];if(!e?.styles)return o;const r=OM(e.styles);return r&&o.push({styles:r,selector:qr}),Object.entries(c.__EXPERIMENTAL_ELEMENTS).forEach((([t,n])=>{e.styles?.elements?.[t]&&o.push({styles:e.styles?.elements?.[t],selector:n})})),Object.entries(null!==(n=e.styles?.blocks)&&void 0!==n?n:{}).forEach((([e,n])=>{var r;const l=OM(n);if(n?.variations){const e={};Object.keys(n.variations).forEach((t=>{e[t]=OM(n.variations[t])})),l.variations=e}l&&t?.[e]?.selector&&o.push({duotoneSelector:t[e].duotoneSelector,fallbackGapValue:t[e].fallbackGapValue,hasLayoutSupport:t[e].hasLayoutSupport,selector:t[e].selector,styles:l,featureSelectors:t[e].featureSelectors,styleVariationSelectors:t[e].styleVariationSelectors}),Object.entries(null!==(r=n?.elements)&&void 0!==r?r:{}).forEach((([n,r])=>{r&&t?.[e]&&c.__EXPERIMENTAL_ELEMENTS[n]&&o.push({styles:r,selector:t[e]?.selector.split(",").map((e=>c.__EXPERIMENTAL_ELEMENTS[n].split(",").map((t=>e+" "+t)))).join(",")})}))})),o})(e,t),s=DM(e,t),a=e?.settings?.useRootPaddingAwareAlignments,{contentSize:u,wideSize:d}=e?.settings?.layout||{};let p="body {margin: 0;";if(u&&(p+=` --wp--style--global--content-size: ${u};`),d&&(p+=` --wp--style--global--wide-size: ${d};`),a&&l&&(p+="padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }\n\t\t\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding:not(.wp-block-block)) { padding-right: 0; padding-left: 0; }\n\t\t\t.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }\n\t\t\t.has-global-padding :where(.has-global-padding:not(.wp-block-block)) > .alignfull { margin-right: 0; margin-left: 0; }\n\t\t\t.has-global-padding > .alignfull:where(:not(.has-global-padding):not(.is-layout-flex):not(.is-layout-grid)) > :where(.wp-block:not(.alignfull),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where(.wp-block:not(.alignfull),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0;"),p+="}",i.forEach((({selector:t,duotoneSelector:i,styles:s,fallbackGapValue:c,hasLayoutSupport:u,featureSelectors:d,styleVariationSelectors:m})=>{if(d){const e=RM(d,s);Object.entries(e).forEach((([e,t])=>{if(t.length){const n=t.join(";");p+=`${e}{${n};}`}}))}if(m&&Object.entries(m).forEach((([t,n])=>{const o=s?.variations?.[t];if(o){if(d){const e=RM(d,o);Object.entries(e).forEach((([e,t])=>{if(t.length){const o=function(e,t){const n=e.split(","),o=[];return n.forEach((e=>{o.push(`${t.trim()}${e.trim()}`)})),o.join(", ")}(e,n),r=t.join(";");p+=`${o}{${r};}`}}))}const t=NM(o,n,a,e);t.length&&(p+=`${n}{${t.join(";")};}`)}})),i){const e={};s?.filter&&(e.filter=s.filter,delete s.filter);const t=NM(e);t.length&&(p+=`${i}{${t.join(";")};}`)}r||qr!==t&&!u||(p+=LM({style:s,selector:t,hasBlockGapSupport:n,hasFallbackGapSupport:o,fallbackGapValue:c}));const h=NM(s,t,a,e,l);h?.length&&(p+=`${t}{${h.join(";")};}`);const g=Object.entries(s).filter((([e])=>e.startsWith(":")));g?.length&&g.forEach((([e,n])=>{const o=NM(n);if(!o?.length)return;const r=`${t.split(",").map((t=>t+e)).join(",")}{${o.join(";")};}`;p+=r}))})),p+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",p+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",p+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }",n){const t=oi(e?.styles?.spacing?.blockGap)||"0.5em";p+=`:where(.wp-site-blocks) > * { margin-block-start: ${t}; margin-block-end: 0; }`,p+=":where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }",p+=":where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }"}return s.forEach((({selector:e,presets:t})=>{qr===e&&(e="");const n=function(e="*",t={}){const{kebabCase:n}=ie(_l.privateApis);return Yr.reduce(((o,{path:r,cssVarInfix:l,classes:i})=>{if(!i)return o;const s=Wn(t,r,[]);return["default","theme","custom"].forEach((t=>{s[t]&&s[t].forEach((({slug:t})=>{i.forEach((({classSuffix:r,propertyName:i})=>{const s=`.has-${n(t)}-${r}`,a=e.split(",").map((e=>`${e}${s}`)).join(","),c=`var(--wp--preset--${l}--${n(t)})`;o+=`${a}{${i}: ${c} !important;}`}))}))})),o}),"")}(e,t);n.length>0&&(p+=n)})),p};function FM(e,t){return DM(e,t).flatMap((({presets:e})=>function(e={}){return Yr.filter((e=>"duotone"===e.path.at(-1))).flatMap((t=>{const n=Wn(e,t.path,{});return["default","theme"].filter((e=>n[e])).flatMap((e=>n[e].map((e=>Um(`wp-duotone-${e.slug}`,e.colors))))).join("")}))}(e)))}const HM=(e,t)=>{const n={};return e.forEach((e=>{const o=e.name,r=$m(e);let l=$m(e,"filter.duotone");if(!l){const t=$m(e),n=(0,c.getBlockSupport)(e,"color.__experimentalDuotone",!1);l=n&&tl(t,n)}const i=!!e?.supports?.layout||!!e?.supports?.__experimentalLayout,s=e?.supports?.spacing?.blockGap?.__experimentalDefault,a=t(o),u={};a?.length&&a.forEach((e=>{const t=function(e,t){const n=`.is-style-${e}`;if(!t)return n;const o=/((?::\([^)]+\))?\s*)([^\s:]+)/,r=(e,t,o)=>t+o+n;return t.split(",").map((e=>e.replace(o,r))).join(",")}(e.name,r);u[e.name]=t}));const d=((e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;const n={root:t};return Object.entries(TM).forEach((([t,o])=>{const r=$m(e,t);r&&(n[o]=r)})),n})(e,r);n[o]={duotoneSelector:l,fallbackGapValue:s,featureSelectors:Object.keys(d).length?d:void 0,hasLayoutSupport:i,name:o,selector:r,styleVariationSelectors:Object.keys(u).length?u:void 0}})),n};function GM(e,t){let n="";return e.split("&").forEach((e=>{if(!e.includes("{"))n+=`${t}{${e.trim()}}`;else{const o=e.replace("}","").split("{");if(2!==o.length)return;const[r,l]=o,i=r.startsWith(" ")?tl(t,r):function(e,t){return e.includes(",")?e.split(",").map((e=>e+t)).join(","):e+t}(t,r);n+=`${i}{${l.trim()}}`}})),n}function UM(e={}){const[t]=sl("spacing.blockGap"),n=null!==t,o=!n,r=(0,d.useSelect)((e=>{const{getSettings:t}=e(Nr);return!!t().disableLayoutStyles})),l=(0,u.useContext)(bf),i=void 0!==l?.templateSlug,{getBlockStyles:s}=(0,d.useSelect)(c.store);return(0,u.useMemo)((()=>{var t;if(!e?.styles||!e?.settings)return[];const l=(a=e,a.styles?.blocks?.["core/separator"]&&a.styles?.blocks?.["core/separator"].color?.background&&!a.styles?.blocks?.["core/separator"].color?.text&&!a.styles?.blocks?.["core/separator"].border?.color?{...a,styles:{...a.styles,blocks:{...a.styles.blocks,"core/separator":{...a.styles.blocks["core/separator"],color:{...a.styles.blocks["core/separator"].color,text:a.styles?.blocks["core/separator"].color.background}}}}}:a);var a;const u=HM((0,c.getBlockTypes)(),s),d=zM(l,u),p=VM(l,u,n,o,r,i),m=FM(l,u),h=[{css:d,isGlobalStyles:!0},{css:p,isGlobalStyles:!0},{css:null!==(t=l.styles.css)&&void 0!==t?t:"",isGlobalStyles:!0},{assets:m,__unstableType:"svg",isGlobalStyles:!0}];return(0,c.getBlockTypes)().forEach((e=>{if(l.styles.blocks[e.name]?.css){const t=u[e.name].selector;h.push({css:GM(l.styles.blocks[e.name]?.css,t),isGlobalStyles:!0})}})),[h,l.settings]}),[n,o,e,r,i,s])}function $M(){const{merged:e}=(0,u.useContext)(ol);return UM(e)}function jM(e,t,n){return"core/image"===e&&n?.lightbox?.allowEditing||!!t?.lightbox}function WM({onChange:e,value:t,inheritedValue:n,panelId:o}){const r=()=>{e(void 0)};let l=!1;return n?.lightbox?.enabled&&(l=n.lightbox.enabled),(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.__experimentalToolsPanel,{label:(0,x._x)("Settings","Image settings"),resetAll:r,panelId:o,dropdownMenuProps:Qr},(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,x.__)("Expand on click"),onDeselect:r,isShownByDefault:!0,panelId:o},(0,s.createElement)(_l.ToggleControl,{label:(0,x.__)("Expand on click"),checked:l,onChange:t=>{e({enabled:t})}}))))}function KM({value:e,onChange:t,inheritedValue:n=e}){const[o,r]=(0,u.useState)(null),l=n?.css;return(0,s.createElement)(_l.__experimentalVStack,{spacing:3},o&&(0,s.createElement)(_l.Notice,{status:"error",onRemove:()=>r(null)},o),(0,s.createElement)(_l.TextareaControl,{label:(0,x.__)("Additional CSS"),__nextHasNoMarginBottom:!0,value:l,onChange:n=>function(n){if(t({...e,css:n}),o){const[e]=yy([{css:n}],".editor-styles-wrapper");e&&r(null)}}(n),onBlur:function(e){if(!e?.target?.value)return void r(null);const[t]=yy([{css:e.target.value}],".editor-styles-wrapper");r(null===t?(0,x.__)("There is an error with your CSS structure."):null)},className:"block-editor-global-styles-advanced-panel__custom-css-input",spellCheck:!1}))}const ZM=new Map,qM=[],YM={caption:(0,x.__)("Caption"),link:(0,x.__)("Link"),button:(0,x.__)("Button"),heading:(0,x.__)("Heading"),h1:(0,x.__)("H1"),h2:(0,x.__)("H2"),h3:(0,x.__)("H3"),h4:(0,x.__)("H4"),h5:(0,x.__)("H5"),h6:(0,x.__)("H6"),"settings.color":(0,x.__)("Color"),"settings.typography":(0,x.__)("Typography"),"styles.color":(0,x.__)("Colors"),"styles.spacing":(0,x.__)("Spacing"),"styles.typography":(0,x.__)("Typography")},XM=function(e,t){var n,o,r=0;function l(){var l,i,s=n,a=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(i=0;i<a;i++)if(s.args[i]!==arguments[i]){s=s.next;continue e}return s!==n&&(s===o&&(o=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=n,s.prev=null,n.prev=s,n=s),s.val}s=s.next}for(l=new Array(a),i=0;i<a;i++)l[i]=arguments[i];return s={args:l,val:e.apply(null,l)},n?(n.prev=s,s.next=n):o=s,r===t.maxSize?(o=o.prev).next=null:r++,n=s,s.val}return t=t||{},l.clear=function(){n=null,o=null,r=0},l}((()=>(0,c.getBlockTypes)().reduce(((e,{name:t,title:n})=>(e[t]=n,e)),{}))),QM=e=>null!==e&&"object"==typeof e;function JM(e,t,n=""){if(!QM(e)&&!QM(t))return e!==t?n.split(".").slice(0,2).join("."):void 0;e=QM(e)?e:{},t=QM(t)?t:{};const o=new Set([...Object.keys(e),...Object.keys(t)]);let r=[];for(const l of o){const o=n?n+"."+l:l,i=JM(e[l],t[l],o);i&&(r=r.concat(i))}return r}function eP(e,t){const n=JSON.stringify({next:e,previous:t});if(ZM.has(n))return ZM.get(n);const o=JM({styles:{color:e?.styles?.color,typography:e?.styles?.typography,spacing:e?.styles?.spacing},blocks:e?.styles?.blocks,elements:e?.styles?.elements,settings:e?.settings},{styles:{color:t?.styles?.color,typography:t?.styles?.typography,spacing:t?.styles?.spacing},blocks:t?.styles?.blocks,elements:t?.styles?.elements,settings:t?.settings});if(!o.length)return ZM.set(n,qM),qM;const r=[...new Set(o)].reduce(((e,t)=>{const n=function(e){if(YM[e])return YM[e];const t=e.split(".");if("blocks"===t?.[0]){const e=XM()?.[t[1]];return e||t[1]}return"elements"===t?.[0]?YM[t[1]]||t[1]:void 0}(t);return n&&e.push([t.split(".")[0],n]),e}),[]);return ZM.set(n,r),r}function tP(e,t,n={}){let o=eP(e,t);const r=o.length,{maxResults:l}=n;return r?(l&&r>l&&(o=o.slice(0,l)),Object.entries(o.reduce(((e,t)=>{const n=e[t[0]]||[];return n.includes(t[1])||(e[t[0]]=[...n,t[1]]),e}),{})).map((([e,t])=>{const n=t.length,o=t.join((0,x.__)(", "));switch(e){case"blocks":return(0,x.sprintf)((0,x._n)("%s block.","%s blocks.",n),o);case"elements":return(0,x.sprintf)((0,x._n)("%s element.","%s elements.",n),o);case"settings":return(0,x.sprintf)((0,x.__)("%s settings."),o);case"styles":return(0,x.sprintf)((0,x.__)("%s styles."),o);default:return(0,x.sprintf)((0,x.__)("%s."),o)}}))):qM}function nP(e,t,n){if(null==e||!1===e)return;if(Array.isArray(e))return oP(e,t,n);switch(typeof e){case"string":case"number":return}const{type:o,props:r}=e;switch(o){case u.StrictMode:case u.Fragment:return oP(r.children,t,n);case u.RawHTML:return;case Gw.Content:return rP(t,n);case VI:return void t.push(r.value)}switch(typeof o){case"string":return void 0!==r.children?oP(r.children,t,n):void 0;case"function":return nP(o.prototype&&"function"==typeof o.prototype.render?new o(r).render():o(r),t,n)}}function oP(e,...t){e=Array.isArray(e)?e:[e];for(let n=0;n<e.length;n++)nP(e[n],...t)}function rP(e,t){for(let n=0;n<t.length;n++){const{name:o,attributes:r,innerBlocks:l}=t[n];nP((0,c.getSaveElement)(o,r,(0,s.createElement)(Gw.Content,null)),e,l)}}const lP=[{value:"fill",label:(0,x._x)("Fill","Scale option for dimensions control"),help:(0,x.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,x._x)("Contain","Scale option for dimensions control"),help:(0,x.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,x._x)("Cover","Scale option for dimensions control"),help:(0,x.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,x._x)("None","Scale option for dimensions control"),help:(0,x.__)("Do not adjust the sizing of the content. Content that is too large will be clipped, and content that is too small will have additional padding.")},{value:"scale-down",label:(0,x._x)("Scale down","Scale option for dimensions control"),help:(0,x.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function iP({panelId:e,value:t,onChange:n,options:o=lP,defaultValue:r=lP[0].value,isShownByDefault:l=!0}){const i=null!=t?t:"fill",a=(0,u.useMemo)((()=>o.reduce(((e,t)=>(e[t.value]=t.help,e)),{})),[o]);return(0,s.createElement)(_l.__experimentalToolsPanelItem,{label:(0,x.__)("Scale"),isShownByDefault:l,hasValue:()=>i!==r,onDeselect:()=>n(r),panelId:e},(0,s.createElement)(_l.__experimentalToggleGroupControl,{label:(0,x.__)("Scale"),isBlock:!0,help:a[i],value:i,onChange:n,size:"__unstable-large"},o.map((e=>(0,s.createElement)(_l.__experimentalToggleGroupControlOption,{key:e.value,...e})))))}function sP(){return sP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},sP.apply(this,arguments)}function aP(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var cP=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,uP=aP((function(e){return cP.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));var dP=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),pP=Math.abs,mP=String.fromCharCode,hP=Object.assign;function gP(e){return e.trim()}function fP(e,t,n){return e.replace(t,n)}function bP(e,t){return e.indexOf(t)}function vP(e,t){return 0|e.charCodeAt(t)}function kP(e,t,n){return e.slice(t,n)}function _P(e){return e.length}function yP(e){return e.length}function EP(e,t){return t.push(e),e}var wP=1,SP=1,CP=0,xP=0,BP=0,IP="";function TP(e,t,n,o,r,l,i){return{value:e,root:t,parent:n,type:o,props:r,children:l,line:wP,column:SP,length:i,return:""}}function MP(e,t){return hP(TP("",null,null,"",null,null,0),e,{length:-e.length},t)}function PP(){return BP=xP>0?vP(IP,--xP):0,SP--,10===BP&&(SP=1,wP--),BP}function RP(){return BP=xP<CP?vP(IP,xP++):0,SP++,10===BP&&(SP=1,wP++),BP}function NP(){return vP(IP,xP)}function LP(){return xP}function AP(e,t){return kP(IP,e,t)}function OP(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function DP(e){return wP=SP=1,CP=_P(IP=e),xP=0,[]}function zP(e){return IP="",e}function VP(e){return gP(AP(xP-1,GP(91===e?e+2:40===e?e+1:e)))}function FP(e){for(;(BP=NP())&&BP<33;)RP();return OP(e)>2||OP(BP)>3?"":" "}function HP(e,t){for(;--t&&RP()&&!(BP<48||BP>102||BP>57&&BP<65||BP>70&&BP<97););return AP(e,LP()+(t<6&&32==NP()&&32==RP()))}function GP(e){for(;RP();)switch(BP){case e:return xP;case 34:case 39:34!==e&&39!==e&&GP(BP);break;case 40:41===e&&GP(e);break;case 92:RP()}return xP}function UP(e,t){for(;RP()&&e+BP!==57&&(e+BP!==84||47!==NP()););return"/*"+AP(t,xP-1)+"*"+mP(47===e?e:RP())}function $P(e){for(;!OP(NP());)RP();return AP(e,xP)}var jP="-ms-",WP="-moz-",KP="-webkit-",ZP="comm",qP="rule",YP="decl",XP="@keyframes";function QP(e,t){for(var n="",o=yP(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function JP(e,t,n,o){switch(e.type){case"@import":case YP:return e.return=e.return||e.value;case ZP:return"";case XP:return e.return=e.value+"{"+QP(e.children,o)+"}";case qP:e.value=e.props.join(",")}return _P(n=QP(e.children,o))?e.return=e.value+"{"+n+"}":""}function eR(e){return zP(tR("",null,null,null,[""],e=DP(e),0,[0],e))}function tR(e,t,n,o,r,l,i,s,a){for(var c=0,u=0,d=i,p=0,m=0,h=0,g=1,f=1,b=1,v=0,k="",_=r,y=l,E=o,w=k;f;)switch(h=v,v=RP()){case 40:if(108!=h&&58==vP(w,d-1)){-1!=bP(w+=fP(VP(v),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:w+=VP(v);break;case 9:case 10:case 13:case 32:w+=FP(h);break;case 92:w+=HP(LP()-1,7);continue;case 47:switch(NP()){case 42:case 47:EP(oR(UP(RP(),LP()),t,n),a);break;default:w+="/"}break;case 123*g:s[c++]=_P(w)*b;case 125*g:case 59:case 0:switch(v){case 0:case 125:f=0;case 59+u:m>0&&_P(w)-d&&EP(m>32?rR(w+";",o,n,d-1):rR(fP(w," ","")+";",o,n,d-2),a);break;case 59:w+=";";default:if(EP(E=nR(w,t,n,c,u,r,s,k,_=[],y=[],d),l),123===v)if(0===u)tR(w,t,E,E,_,l,d,s,y);else switch(99===p&&110===vP(w,3)?100:p){case 100:case 109:case 115:tR(e,E,E,o&&EP(nR(e,E,E,0,0,r,s,k,r,_=[],d),y),r,y,d,s,o?_:y);break;default:tR(w,E,E,E,[""],y,0,s,y)}}c=u=m=0,g=b=1,k=w="",d=i;break;case 58:d=1+_P(w),m=h;default:if(g<1)if(123==v)--g;else if(125==v&&0==g++&&125==PP())continue;switch(w+=mP(v),v*g){case 38:b=u>0?1:(w+="\f",-1);break;case 44:s[c++]=(_P(w)-1)*b,b=1;break;case 64:45===NP()&&(w+=VP(RP())),p=NP(),u=d=_P(k=w+=$P(LP())),v++;break;case 45:45===h&&2==_P(w)&&(g=0)}}return l}function nR(e,t,n,o,r,l,i,s,a,c,u){for(var d=r-1,p=0===r?l:[""],m=yP(p),h=0,g=0,f=0;h<o;++h)for(var b=0,v=kP(e,d+1,d=pP(g=i[h])),k=e;b<m;++b)(k=gP(g>0?p[b]+" "+v:fP(v,/&\f/g,p[b])))&&(a[f++]=k);return TP(e,t,n,0===r?qP:s,a,c,u)}function oR(e,t,n){return TP(e,t,n,ZP,mP(BP),kP(e,2,-2),0)}function rR(e,t,n,o){return TP(e,t,n,YP,kP(e,0,o),kP(e,o+1,-1),o)}var lR=function(e,t,n){for(var o=0,r=0;o=r,r=NP(),38===o&&12===r&&(t[n]=1),!OP(r);)RP();return AP(e,xP)},iR=function(e,t){return zP(function(e,t){var n=-1,o=44;do{switch(OP(o)){case 0:38===o&&12===NP()&&(t[n]=1),e[n]+=lR(xP-1,t,n);break;case 2:e[n]+=VP(o);break;case 4:if(44===o){e[++n]=58===NP()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=mP(o)}}while(o=RP());return e}(DP(e),t))},sR=new WeakMap,aR=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||sR.get(n))&&!o){sR.set(e,!0);for(var r=[],l=iR(t,r),i=n.props,s=0,a=0;s<l.length;s++)for(var c=0;c<i.length;c++,a++)e.props[a]=r[s]?l[s].replace(/&\f/g,i[c]):i[c]+" "+l[s]}}},cR=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function uR(e,t){switch(function(e,t){return 45^vP(e,0)?(((t<<2^vP(e,0))<<2^vP(e,1))<<2^vP(e,2))<<2^vP(e,3):0}(e,t)){case 5103:return KP+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return KP+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return KP+e+WP+e+jP+e+e;case 6828:case 4268:return KP+e+jP+e+e;case 6165:return KP+e+jP+"flex-"+e+e;case 5187:return KP+e+fP(e,/(\w+).+(:[^]+)/,KP+"box-$1$2"+jP+"flex-$1$2")+e;case 5443:return KP+e+jP+"flex-item-"+fP(e,/flex-|-self/,"")+e;case 4675:return KP+e+jP+"flex-line-pack"+fP(e,/align-content|flex-|-self/,"")+e;case 5548:return KP+e+jP+fP(e,"shrink","negative")+e;case 5292:return KP+e+jP+fP(e,"basis","preferred-size")+e;case 6060:return KP+"box-"+fP(e,"-grow","")+KP+e+jP+fP(e,"grow","positive")+e;case 4554:return KP+fP(e,/([^-])(transform)/g,"$1"+KP+"$2")+e;case 6187:return fP(fP(fP(e,/(zoom-|grab)/,KP+"$1"),/(image-set)/,KP+"$1"),e,"")+e;case 5495:case 3959:return fP(e,/(image-set\([^]*)/,KP+"$1$`$1");case 4968:return fP(fP(e,/(.+:)(flex-)?(.*)/,KP+"box-pack:$3"+jP+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+KP+e+e;case 4095:case 3583:case 4068:case 2532:return fP(e,/(.+)-inline(.+)/,KP+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(_P(e)-1-t>6)switch(vP(e,t+1)){case 109:if(45!==vP(e,t+4))break;case 102:return fP(e,/(.+:)(.+)-([^]+)/,"$1"+KP+"$2-$3$1"+WP+(108==vP(e,t+3)?"$3":"$2-$3"))+e;case 115:return~bP(e,"stretch")?uR(fP(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==vP(e,t+1))break;case 6444:switch(vP(e,_P(e)-3-(~bP(e,"!important")&&10))){case 107:return fP(e,":",":"+KP)+e;case 101:return fP(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+KP+(45===vP(e,14)?"inline-":"")+"box$3$1"+KP+"$2$3$1"+jP+"$2box$3")+e}break;case 5936:switch(vP(e,t+11)){case 114:return KP+e+jP+fP(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return KP+e+jP+fP(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return KP+e+jP+fP(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return KP+e+jP+e+e}return e}var dR=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case YP:e.return=uR(e.value,e.length);break;case XP:return QP([MP(e,{value:fP(e.value,"@","@"+KP)})],o);case qP:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return QP([MP(e,{props:[fP(t,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return QP([MP(e,{props:[fP(t,/:(plac\w+)/,":"+KP+"input-$1")]}),MP(e,{props:[fP(t,/:(plac\w+)/,":-moz-$1")]}),MP(e,{props:[fP(t,/:(plac\w+)/,jP+"input-$1")]})],o)}return""}))}}];const pR=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o=e.stylisPlugins||dR;var r,l,i={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)i[t[n]]=!0;s.push(e)}));var a,c,u,d,p=[JP,(d=function(e){a.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],m=(c=[aR,cR].concat(o,p),u=yP(c),function(e,t,n,o){for(var r="",l=0;l<u;l++)r+=c[l](e,t,n,o)||"";return r});l=function(e,t,n,o){a=n,function(e){QP(eR(e),m)}(e?e+"{"+t.styles+"}":t.styles),o&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new dP({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:l};return h.sheet.hydrate(s),h};const mR=function(e){for(var t,n=0,o=0,r=e.length;r>=4;++o,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(o)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};const hR={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function gR(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var fR=/[A-Z]|^ms/g,bR=/_EMO_([^_]+?)_([^]*?)_EMO_/g,vR=function(e){return 45===e.charCodeAt(1)},kR=function(e){return null!=e&&"boolean"!=typeof e},_R=gR((function(e){return vR(e)?e:e.replace(fR,"-$&").toLowerCase()})),yR=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(bR,(function(e,t,n){return wR={name:t,styles:n,next:wR},t}))}return 1===hR[e]||vR(e)||"number"!=typeof t||0===t?t:t+"px"};function ER(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return wR={name:n.name,styles:n.styles,next:wR},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)wR={name:o.name,styles:o.styles,next:wR},o=o.next;return n.styles+";"}return function(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r<n.length;r++)o+=ER(e,t,n[r])+";";else for(var l in n){var i=n[l];if("object"!=typeof i)null!=t&&void 0!==t[i]?o+=l+"{"+t[i]+"}":kR(i)&&(o+=_R(l)+":"+yR(l,i)+";");else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var s=ER(e,t,i);switch(l){case"animation":case"animationName":o+=_R(l)+":"+s+";";break;default:o+=l+"{"+s+"}"}}else for(var a=0;a<i.length;a++)kR(i[a])&&(o+=_R(l)+":"+yR(l,i[a])+";")}return o}(e,t,n);case"function":if(void 0!==e){var r=wR,l=n(e);return wR=r,ER(e,t,l)}}if(null==t)return n;var i=t[n];return void 0!==i?i:n}var wR,SR=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var CR=!!s.useInsertionEffect&&s.useInsertionEffect,xR=CR||function(e){return e()},BR=(0,s.createContext)("undefined"!=typeof HTMLElement?pR({key:"css"}):null);BR.Provider;var IR=function(e){return(0,s.forwardRef)((function(t,n){var o=(0,s.useContext)(BR);return e(t,o,n)}))},TR=(0,s.createContext)({});var MR=function(e,t,n){var o=e.key+"-"+t.name;!1===n&&void 0===e.registered[o]&&(e.registered[o]=t.styles)},PR=uP,RR=function(e){return"theme"!==e},NR=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?PR:RR},LR=function(e,t,n){var o;if(t){var r=t.shouldForwardProp;o=e.__emotion_forwardProp&&r?function(t){return e.__emotion_forwardProp(t)&&r(t)}:r}return"function"!=typeof o&&n&&(o=e.__emotion_forwardProp),o},AR=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;MR(t,n,o);xR((function(){return function(e,t,n){MR(e,t,n);var o=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var r=t;do{e.insert(t===r?"."+o:"",r,e.sheet,!0),r=r.next}while(void 0!==r)}}(t,n,o)}));return null};const OR=function e(t,n){var o,r,l=t.__emotion_real===t,i=l&&t.__emotion_base||t;void 0!==n&&(o=n.label,r=n.target);var a=LR(t,n,l),c=a||NR(i),u=!c("as");return function(){var d=arguments,p=l&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&p.push("label:"+o+";"),null==d[0]||void 0===d[0].raw)p.push.apply(p,d);else{0,p.push(d[0][0]);for(var m=d.length,h=1;h<m;h++)p.push(d[h],d[0][h])}var g=IR((function(e,t,n){var o=u&&e.as||i,l="",d=[],m=e;if(null==e.theme){for(var h in m={},e)m[h]=e[h];m.theme=(0,s.useContext)(TR)}"string"==typeof e.className?l=function(e,t,n){var o="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):o+=n+" "})),o}(t.registered,d,e.className):null!=e.className&&(l=e.className+" ");var g=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,r="";wR=void 0;var l=e[0];null==l||void 0===l.raw?(o=!1,r+=ER(n,t,l)):r+=l[0];for(var i=1;i<e.length;i++)r+=ER(n,t,e[i]),o&&(r+=l[i]);SR.lastIndex=0;for(var s,a="";null!==(s=SR.exec(r));)a+="-"+s[1];return{name:mR(r)+a,styles:r,next:wR}}(p.concat(d),t.registered,m);l+=t.key+"-"+g.name,void 0!==r&&(l+=" "+r);var f=u&&void 0===a?NR(o):c,b={};for(var v in e)u&&"as"===v||f(v)&&(b[v]=e[v]);return b.className=l,b.ref=n,(0,s.createElement)(s.Fragment,null,(0,s.createElement)(AR,{cache:t,serialized:g,isStringTag:"string"==typeof o}),(0,s.createElement)(o,b))}));return g.displayName=void 0!==o?o:"Styled("+("string"==typeof i?i:i.displayName||i.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=i,g.__emotion_styles=p,g.__emotion_forwardProp=a,Object.defineProperty(g,"toString",{value:function(){return"."+r}}),g.withComponent=function(t,o){return e(t,sP({},n,o,{shouldForwardProp:LR(g,o,!0)})).apply(void 0,p)},g}};const DR=OR(_l.__experimentalToolsPanelItem,{target:"ef8pe3d0"})({name:"957xgf",styles:"grid-column:span 1"});function zR({panelId:e,value:t={},onChange:n=(()=>{}),units:o,isShownByDefault:r=!0}){var l,i;const a="auto"===t.width?"":null!==(l=t.width)&&void 0!==l?l:"",c="auto"===t.height?"":null!==(i=t.height)&&void 0!==i?i:"",u=e=>o=>{const r={...t};o?r[e]=o:delete r[e],n(r)};return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(DR,{label:(0,x.__)("Width"),isShownByDefault:r,hasValue:()=>""!==a,onDeselect:u("width"),panelId:e},(0,s.createElement)(_l.__experimentalUnitControl,{label:(0,x.__)("Width"),placeholder:(0,x.__)("Auto"),labelPosition:"top",units:o,min:0,value:a,onChange:u("width"),size:"__unstable-large"})),(0,s.createElement)(DR,{label:(0,x.__)("Height"),isShownByDefault:r,hasValue:()=>""!==c,onDeselect:u("height"),panelId:e},(0,s.createElement)(_l.__experimentalUnitControl,{label:(0,x.__)("Height"),placeholder:(0,x.__)("Auto"),labelPosition:"top",units:o,min:0,value:c,onChange:u("height"),size:"__unstable-large"})))}const VR=function({panelId:e,value:t={},onChange:n=(()=>{}),aspectRatioOptions:o,defaultAspectRatio:r="auto",scaleOptions:l,defaultScale:i="fill",unitsOptions:a}){const c=void 0===t.width||"auto"===t.width?null:t.width,d=void 0===t.height||"auto"===t.height?null:t.height,p=void 0===t.aspectRatio||"auto"===t.aspectRatio?null:t.aspectRatio,m=void 0===t.scale||"fill"===t.scale?null:t.scale,[h,g]=(0,u.useState)(m),[f,b]=(0,u.useState)(p),v=c&&d?"custom":f,k=p||c&&d;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Qp,{panelId:e,options:o,defaultValue:r,value:v,onChange:e=>{const o={...t};b(e="auto"===e?null:e),e?o.aspectRatio=e:delete o.aspectRatio,e?h?o.scale=h:(o.scale=i,g(i)):delete o.scale,"custom"!==e&&c&&d&&delete o.height,n(o)}}),(0,s.createElement)(zR,{panelId:e,units:a,value:{width:c,height:d},onChange:({width:e,height:o})=>{const r={...t};o="auto"===o?null:o,(e="auto"===e?null:e)?r.width=e:delete r.width,o?r.height=o:delete r.height,e&&o?delete r.aspectRatio:f&&(r.aspectRatio=f),f||!!e==!!o?h?r.scale=h:(r.scale=i,g(i)):delete r.scale,n(r)}}),k&&(0,s.createElement)(iP,{panelId:e,options:l,defaultValue:i,value:h,onChange:e=>{const o={...t};g(e="fill"===e?null:e),e?o.scale=e:delete o.scale,n(o)}}))},FR=[{label:(0,x._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,x._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,x._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,x._x)("Full Size","Image size option for resolution control"),value:"full"}];const HR={};le(HR,{...i,ExperimentalBlockCanvas:jC,ExperimentalBlockEditorProvider:z_,getDuotoneFilter:Um,getRichTextValues:function(e=[]){c.__unstableGetBlockProps.skipFilters=!0;const t=[];return rP(t,e),c.__unstableGetBlockProps.skipFilters=!1,t.map((e=>e instanceof Y.RichTextData?e:Y.RichTextData.fromHTMLString(e)))},PrivateInserter:rw,PrivateQuickInserter:tw,PrivateListView:Tx,ResizableBoxPopover:function({clientId:e,resizableBoxProps:t,...n}){return(0,s.createElement)(fm,{clientId:e,__unstableCoverTarget:!0,__unstablePopoverSlot:"__unstable-block-tools-after",shift:!1,...n},(0,s.createElement)(_l.ResizableBox,{...t}))},BlockInfo:$T,useCanBlockToolbarBeFocused:function(){return(0,d.useSelect)((e=>{const{__unstableGetEditorMode:t,getBlock:n,getSettings:o,getSelectedBlockClientId:r,getFirstMultiSelectedBlockClientId:l}=ie(e(Nr)),i=l()||r(),s=(0,c.isUnmodifiedDefaultBlock)(n(i)||{});return!!i&&(o().hasFixedToolbar||"edit"===t()&&!s)}),[])},cleanEmptyObject:hl,useStyleOverride:bl,BlockQuickNavigation:jT,LayoutStyle:function({layout:e={},css:t,...n}){const o=Vi(e.type),[r]=Ar("spacing.blockGap"),l=null!==r;if(o){if(t)return(0,s.createElement)("style",null,t);const r=o.getLayoutStyle?.({hasBlockGapSupport:l,layout:e,...n});if(r)return(0,s.createElement)("style",null,r)}return null},BlockRemovalWarningModal:function({rules:e}){const{clientIds:t,selectPrevious:n,blockNamesForPrompt:o,messageType:r}=(0,d.useSelect)((e=>ie(e(Nr)).getRemovalPromptData())),{clearBlockRemovalPrompt:l,setBlockRemovalRules:i,privateRemoveBlocks:a}=ie((0,d.useDispatch)(Nr));if((0,u.useEffect)((()=>(i(e),()=>{i()})),[e,i]),!o)return;const c="templates"===r?(0,x._n)("Deleting this block will stop your post or page content from displaying on this template. It is not recommended.","Deleting these blocks will stop your post or page content from displaying on this template. It is not recommended.",o.length):(0,x._n)("Deleting this block could break patterns on your site that have content linked to it. Are you sure you want to delete it?","Deleting these blocks could break patterns on your site that have content linked to them. Are you sure you want to delete them?",o.length);return(0,s.createElement)(_l.Modal,{title:(0,x.__)("Be careful!"),onRequestClose:l,size:"medium"},(0,s.createElement)("p",null,c),(0,s.createElement)(_l.__experimentalHStack,{justify:"right"},(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:l},(0,x.__)("Cancel")),(0,s.createElement)(_l.Button,{variant:"primary",onClick:()=>{a(t,n,!0),l()}},(0,x.__)("Delete"))))},useLayoutClasses:yh,useLayoutStyles:function(e={},t,n){const{layout:o={},style:r={}}=e,l=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||{},i=Vi(l?.type||"default"),[s]=Ar("spacing.blockGap"),a=null!==s,c=i?.getLayoutStyle?.({blockName:t,selector:n,layout:o,style:r,hasBlockGapSupport:a});return c},DimensionsTool:VR,ResolutionTool:function({panelId:e,value:t,onChange:n,options:o=FR,defaultValue:r=FR[0].value,isShownByDefault:l=!0}){const i=null!=t?t:r;return(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:()=>i!==r,label:(0,x.__)("Resolution"),onDeselect:()=>n(r),isShownByDefault:l,panelId:e},(0,s.createElement)(_l.SelectControl,{label:(0,x.__)("Resolution"),value:i,options:o,onChange:n,help:(0,x.__)("Select the size of the source image."),size:"__unstable-large"}))},ReusableBlocksRenameHint:CM,useReusableBlocksRenameHint:function(){return(0,d.useSelect)((e=>{var t;return null===(t=e(Ws.store).get("core",SM))||void 0===t||t}),[])},usesContextKey:OI,useFlashEditableBlocks:__,selectBlockPatternsKey:X,requiresWrapperOnCopy:ny,PrivateRichText:$I})})(),(window.wp=window.wp||{}).blockEditor=o})(); \ No newline at end of file
+var CB=function(e,t){return CB=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},CB(e,t)};var xB=function(){return xB=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},xB.apply(this,arguments)};Object.create;Object.create;var BB=n(7520),IB=n.n(BB);function TB(e,t,n,o,r){void 0===r&&(r=0);var l=OB(t.width,t.height,r),i=l.width,s=l.height;return{x:MB(e.x,i,n.width,o),y:MB(e.y,s,n.height,o)}}function MB(e,t,n,o){var r=t*o/2-n/2;return DB(e,-r,r)}function PB(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function RB(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function NB(e,t){return Math.min(e,Math.max(0,t))}function LB(e,t){return t}function AB(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function OB(e,t,n){var o=n*Math.PI/180;return{width:Math.abs(Math.cos(o)*e)+Math.abs(Math.sin(o)*t),height:Math.abs(Math.sin(o)*e)+Math.abs(Math.cos(o)*t)}}function DB(e,t,n){return Math.min(Math.max(e,t),n)}function zB(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}var VB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=a().createRef(),n.videoRef=a().createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc="undefined"!=typeof document?document:null,n.currentWindow="undefined"!=typeof window?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&n.containerRef){var e=!0;n.resizeObserver=new window.ResizeObserver((function(t){e?e=!1:n.computeSizes()})),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=function(e,t,n,o,r,l){var i=OB(t.width,t.height,n),s=DB(o.width/i.width*(100/e.width),r,l);return{crop:{x:s*i.width/2-o.width/2-i.width*s*(e.x/100),y:s*i.height/2-o.height/2-i.height*s*(e.y/100)},zoom:s}}(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),o=t.crop,r=t.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}else if(n.props.initialCroppedAreaPixels){var l=function(e,t,n,o,r,l){void 0===n&&(n=0);var i=OB(t.naturalWidth,t.naturalHeight,n),s=DB(function(e,t,n){var o=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*o):n.width/(e.width*o)}(e,t,o),r,l),a=o.height>o.width?o.height/e.height:o.width/e.width;return{crop:{x:((i.width-e.width)/2-e.x)*a,y:((i.height-e.height)/2-e.y)*a},zoom:s}}(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);o=l.crop,r=l.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}},n.computeSizes=function(){var e,t,o,r,l,i,s=n.imageRef.current||n.videoRef.current;if(s&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var a=n.containerRect.width/n.containerRect.height,c=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,u=(null===(o=n.imageRef.current)||void 0===o?void 0:o.naturalHeight)||(null===(r=n.videoRef.current)||void 0===r?void 0:r.videoHeight)||0,d=c/u,p=void 0;if(s.offsetWidth<c||s.offsetHeight<u)switch(n.props.objectFit){default:case"contain":p=a>d?{width:n.containerRect.height*d,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/d};break;case"horizontal-cover":p={width:n.containerRect.width,height:n.containerRect.width/d};break;case"vertical-cover":p={width:n.containerRect.height*d,height:n.containerRect.height};break;case"auto-cover":p=c>u?{width:n.containerRect.width,height:n.containerRect.width/d}:{width:n.containerRect.height*d,height:n.containerRect.height}}else p={width:s.offsetWidth,height:s.offsetHeight};n.mediaSize=xB(xB({},p),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var m=n.props.cropSize?n.props.cropSize:function(e,t,n,o,r,l){void 0===l&&(l=0);var i=OB(e,t,l),s=i.width,a=i.height,c=Math.min(s,n),u=Math.min(a,o);return c>u*r?{width:u*r,height:u}:{width:c,height:c/r}}(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(l=n.state.cropSize)||void 0===l?void 0:l.height)===m.height&&(null===(i=n.state.cropSize)||void 0===i?void 0:i.width)===m.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(m),n.setState({cropSize:m},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(m),m}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){n.currentDoc&&(n.isTouching=!0,n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var o=t.getMousePoint(e),r=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(r,o,{shouldUpdatePosition:!0}),n.props.onRotationChange){var l=n.gestureRotationStart+e.rotation;n.props.onRotationChange(l)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,o,r=e.x,l=e.y;n.dragStartPosition={x:r,y:l},n.dragStartCrop=xB({},n.props.crop),null===(o=(t=n.props).onInteractionStart)||void 0===o||o.call(t)},n.onDrag=function(e){var t=e.x,o=e.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==o){var e=t-n.dragStartPosition.x,r=o-n.dragStartPosition.y,l={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+r},i=n.props.restrictPosition?TB(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(i)}})))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(n.currentWindow&&(!n.props.onWheelRequest||n.props.onWheelRequest(e))){e.preventDefault();var o=t.getMousePoint(e),r=IB()(e).pixelY,l=n.props.zoom-r*n.props.zoomSpeed/200;n.setNewZoom(l,o,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)}},n.getPointOnContainer=function(e){var t=e.x,o=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(o-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,o=e.y,r=n.props,l=r.crop,i=r.zoom;return{x:(t+l.x)/i,y:(o+l.y)/i}},n.setNewZoom=function(e,t,o){var r=(void 0===o?{}:o).shouldUpdatePosition,l=void 0===r||r;if(n.state.cropSize&&n.props.onZoomChange){var i=DB(e,n.props.minZoom,n.props.maxZoom);if(l){var s=n.getPointOnContainer(t),a=n.getPointOnMedia(s),c={x:a.x*i-s.x,y:a.y*i-s.y},u=n.props.restrictPosition?TB(c,n.mediaSize,n.state.cropSize,i,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(i)}},n.getCropData=function(){return n.state.cropSize?function(e,t,n,o,r,l,i){void 0===l&&(l=0),void 0===i&&(i=!0);var s=i?NB:LB,a=OB(t.width,t.height,l),c=OB(t.naturalWidth,t.naturalHeight,l),u={x:s(100,((a.width-n.width/r)/2-e.x/r)/a.width*100),y:s(100,((a.height-n.height/r)/2-e.y/r)/a.height*100),width:s(100,n.width/a.width*100/r),height:s(100,n.height/a.height*100/r)},d=Math.round(s(c.width,u.width*c.width/100)),p=Math.round(s(c.height,u.height*c.height/100)),m=c.width>=c.height*o?{width:Math.round(p*o),height:p}:{width:d,height:Math.round(d/o)};return{croppedAreaPercentages:u,croppedAreaPixels:xB(xB({},m),{x:Math.round(s(c.width-m.width,u.x*c.width/100)),y:Math.round(s(c.height-m.height,u.y*c.height/100))})}}(n.props.restrictPosition?TB(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,o),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,o)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?TB(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){function n(){this.constructor=e}CB(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t,n,o,r,l,i,s,a,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(o=e.cropSize)||void 0===o?void 0:o.width)!==(null===(r=this.props.cropSize)||void 0===r?void 0:r.width)?this.computeSizes():(null===(l=e.crop)||void 0===l?void 0:l.x)===(null===(i=this.props.crop)||void 0===i?void 0:i.x)&&(null===(s=e.crop)||void 0===s?void 0:s.y)===(null===(a=this.props.crop)||void 0===a?void 0:a.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(c=this.videoRef.current)||void 0===c||c.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=PB(n,o),this.lastPinchRotation=RB(n,o),this.onDragStart(AB(n,o))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var o=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]),l=AB(o,r);this.onDrag(l),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=PB(o,r),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,l,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var i=RB(o,r),s=n.props.rotation+(i-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=i}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,r=t.mediaProps,l=t.transform,i=t.crop,s=i.x,c=i.y,u=t.rotation,d=t.zoom,p=t.cropShape,m=t.showGrid,h=t.style,g=h.containerStyle,f=h.cropAreaStyle,b=h.mediaStyle,v=t.classes,k=v.containerClassName,_=v.cropAreaClassName,y=v.mediaClassName,E=t.objectFit;return a().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:g,className:zB("reactEasyCrop_Container",k)},n?a().createElement("img",xB({alt:"",className:zB("reactEasyCrop_Image","contain"===E&&"reactEasyCrop_Contain","horizontal-cover"===E&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===E&&"reactEasyCrop_Cover_Vertical","auto-cover"===E&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),y)},r,{src:n,ref:this.imageRef,style:xB(xB({},b),{transform:l||"translate(".concat(s,"px, ").concat(c,"px) rotate(").concat(u,"deg) scale(").concat(d,")")}),onLoad:this.onMediaLoad})):o&&a().createElement("video",xB({autoPlay:!0,loop:!0,muted:!0,className:zB("reactEasyCrop_Video","contain"===E&&"reactEasyCrop_Contain","horizontal-cover"===E&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===E&&"reactEasyCrop_Cover_Vertical","auto-cover"===E&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),y)},r,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:xB(xB({},b),{transform:l||"translate(".concat(s,"px, ").concat(c,"px) rotate(").concat(u,"deg) scale(").concat(d,")")}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map((function(e){return a().createElement("source",xB({key:e.src},e))}))),this.state.cropSize&&a().createElement("div",{style:xB(xB({},f),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:zB("reactEasyCrop_CropArea","round"===p&&"reactEasyCrop_CropAreaRound",m&&"reactEasyCrop_CropAreaGrid",_)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(a().Component);const FB=100,HB=300,GB={placement:"bottom-start"};function UB({url:e,width:t,height:n,clientWidth:o,naturalHeight:r,naturalWidth:l,borderProps:i}){const{isInProgress:a,editedUrl:c,position:u,zoom:d,aspect:p,setPosition:m,setCrop:h,setZoom:g,rotation:f}=wB();let b=n||o*r/l;return f%180==90&&(b=o*l/r),(0,s.createElement)("div",{className:ml()("wp-block-image__crop-area",i?.className,{"is-applying":a}),style:{...i?.style,width:t||o,height:b}},(0,s.createElement)(VB,{image:c||e,disabled:a,minZoom:FB/100,maxZoom:HB/100,crop:u,zoom:d/100,aspect:p,onCropChange:e=>{m(e)},onCropComplete:e=>{h(e)},onZoomChange:e=>{g(100*e)}}),a&&(0,s.createElement)(_l.Spinner,null))}const $B=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"}));function jB(){const{isInProgress:e,zoom:t,setZoom:n}=wB();return(0,s.createElement)(_l.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:GB,renderToggle:({isOpen:t,onToggle:n})=>(0,s.createElement)(_l.ToolbarButton,{icon:$B,label:(0,x.__)("Zoom"),onClick:n,"aria-expanded":t,disabled:e}),renderContent:()=>(0,s.createElement)(_l.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Zoom"),min:FB,max:HB,value:Math.round(t),onChange:n})})}const WB=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"}));function KB({aspectRatios:e,isDisabled:t,label:n,onClick:o,value:r}){return(0,s.createElement)(_l.MenuGroup,{label:n},e.map((({title:e,aspect:n})=>(0,s.createElement)(_l.MenuItem,{key:n,disabled:t,onClick:()=>{o(n)},role:"menuitemradio",isSelected:n===r,icon:n===r?uu:void 0},e))))}function ZB({toggleProps:e}){const{isInProgress:t,aspect:n,setAspect:o,defaultAspect:r}=wB();return(0,s.createElement)(_l.DropdownMenu,{icon:WB,label:(0,x.__)("Aspect Ratio"),popoverProps:GB,toggleProps:e,className:"wp-block-image__aspect-ratio"},(({onClose:e})=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(KB,{isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:[{title:(0,x.__)("Original"),aspect:r},{title:(0,x.__)("Square"),aspect:1}]}),(0,s.createElement)(KB,{label:(0,x.__)("Landscape"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:[{title:(0,x.__)("16:9"),aspect:16/9},{title:(0,x.__)("4:3"),aspect:4/3},{title:(0,x.__)("3:2"),aspect:1.5}]}),(0,s.createElement)(KB,{label:(0,x.__)("Portrait"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:[{title:(0,x.__)("9:16"),aspect:9/16},{title:(0,x.__)("3:4"),aspect:3/4},{title:(0,x.__)("2:3"),aspect:2/3}]}))))}const qB=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}));function YB(){const{isInProgress:e,rotateClockwise:t}=wB();return(0,s.createElement)(_l.ToolbarButton,{icon:qB,label:(0,x.__)("Rotate"),onClick:t,disabled:e})}function XB(){const{isInProgress:e,apply:t,cancel:n}=wB();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.ToolbarButton,{onClick:t,disabled:e},(0,x.__)("Apply")),(0,s.createElement)(_l.ToolbarButton,{onClick:n},(0,x.__)("Cancel")))}function QB({id:e,url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i,onSaveImage:a,onFinishEditing:c,borderProps:u}){return(0,s.createElement)(SB,{id:e,url:t,naturalWidth:i,naturalHeight:l,onSaveImage:a,onFinishEditing:c},(0,s.createElement)(UB,{borderProps:u,url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}),(0,s.createElement)(Bl,null,(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(jB,null),(0,s.createElement)(_l.ToolbarItem,null,(e=>(0,s.createElement)(ZB,{toggleProps:e}))),(0,s.createElement)(YB,null)),(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(XB,null))))}const JB=[25,50,75,100],eI=()=>{};function tI({imageSizeHelp:e,imageWidth:t,imageHeight:n,imageSizeOptions:o=[],isResizable:r=!0,slug:l,width:i,height:a,onChange:c,onChangeImage:d=eI}){const{currentHeight:p,currentWidth:m,updateDimension:h,updateDimensions:g}=function(e,t,n,o,r){var l,i;const[s,a]=(0,u.useState)(null!==(l=null!=t?t:o)&&void 0!==l?l:""),[c,d]=(0,u.useState)(null!==(i=null!=e?e:n)&&void 0!==i?i:"");return(0,u.useEffect)((()=>{void 0===t&&void 0!==o&&a(o),void 0===e&&void 0!==n&&d(n)}),[o,n]),(0,u.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(s)&&a(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(c)&&d(e)}),[t,e]),{currentHeight:c,currentWidth:s,updateDimension:(e,t)=>{const n=""===t?void 0:parseInt(t,10);"width"===e?a(n):d(n),r({[e]:n})},updateDimensions:(e,t)=>{d(null!=e?e:n),a(null!=t?t:o),r({height:e,width:t})}}}(a,i,n,t,c);return(0,s.createElement)(s.Fragment,null,o&&o.length>0&&(0,s.createElement)(_l.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Resolution"),value:l,options:o,onChange:d,help:e,size:"__unstable-large"}),r&&(0,s.createElement)("div",{className:"block-editor-image-size-control"},(0,s.createElement)(_l.__experimentalHStack,{align:"baseline",spacing:"3"},(0,s.createElement)(_l.__experimentalNumberControl,{className:"block-editor-image-size-control__width",label:(0,x.__)("Width"),value:m,min:1,onChange:e=>h("width",e),size:"__unstable-large"}),(0,s.createElement)(_l.__experimentalNumberControl,{className:"block-editor-image-size-control__height",label:(0,x.__)("Height"),value:p,min:1,onChange:e=>h("height",e),size:"__unstable-large"})),(0,s.createElement)(_l.__experimentalHStack,null,(0,s.createElement)(_l.ButtonGroup,{"aria-label":(0,x.__)("Image size presets")},JB.map((e=>{const o=Math.round(t*(e/100)),r=Math.round(n*(e/100)),l=m===o&&p===r;return(0,s.createElement)(_l.Button,{key:e,size:"small",variant:l?"primary":void 0,isPressed:l,onClick:()=>g(r,o)},e,"%")}))),(0,s.createElement)(_l.Button,{size:"small",onClick:()=>g()},(0,x.__)("Reset")))))}function nI({url:e,urlLabel:t,className:n}){const o=ml()(n,"block-editor-url-popover__link-viewer-url");return e?(0,s.createElement)(_l.ExternalLink,{className:o,href:e},t||(0,Ds.filterURLForDisplay)((0,Ds.safeDecodeURI)(e))):(0,s.createElement)("span",{className:o})}const{__experimentalPopoverLegacyPositionToPlacement:oI}=ie(_l.privateApis),rI=(0,u.forwardRef)((({additionalControls:e,children:t,renderSettings:n,placement:o,focusOnMount:r="firstElement",position:l,...i},a)=>{let c;void 0!==l&&w()("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"}),void 0!==o?c=o:void 0!==l&&(c=oI(l)),c=c||"bottom";const[d,p]=(0,u.useState)(!1),m=!!n&&d;return(0,s.createElement)(_l.Popover,{ref:a,className:"block-editor-url-popover",focusOnMount:r,placement:c,shift:!0,variant:"toolbar",...i},(0,s.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,s.createElement)("div",{className:"block-editor-url-popover__row"},t,!!n&&(0,s.createElement)(_l.Button,{className:"block-editor-url-popover__settings-toggle",icon:cS,label:(0,x.__)("Link settings"),onClick:()=>{p(!d)},"aria-expanded":d,size:"compact"}))),m&&(0,s.createElement)("div",{className:"block-editor-url-popover__settings"},n()),e&&!m&&(0,s.createElement)("div",{className:"block-editor-url-popover__additional-controls"},e))}));rI.LinkEditor=function({autocompleteRef:e,className:t,onChangeInputValue:n,value:o,...r}){return(0,s.createElement)("form",{className:ml()("block-editor-url-popover__link-editor",t),...r},(0,s.createElement)(ta,{__nextHasNoMarginBottom:!0,value:o,onChange:n,autocompleteRef:e}),(0,s.createElement)(_l.Button,{icon:Ks,label:(0,x.__)("Apply"),type:"submit",size:"compact"}))},rI.LinkViewer=function({className:e,linkClassName:t,onEditLinkClick:n,url:o,urlLabel:r,...l}){return(0,s.createElement)("div",{className:ml()("block-editor-url-popover__link-viewer",e),...l},(0,s.createElement)(nI,{url:o,urlLabel:r,className:t}),n&&(0,s.createElement)(_l.Button,{icon:La,label:(0,x.__)("Edit"),onClick:n,size:"compact"}))};const lI=rI,iI=()=>{},sI=({src:e,onChange:t,onSubmit:n,onClose:o,popoverAnchor:r})=>(0,s.createElement)(lI,{anchor:r,onClose:o},(0,s.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:n},(0,s.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":(0,x.__)("URL"),placeholder:(0,x.__)("Paste or type URL"),onChange:t,value:e}),(0,s.createElement)(_l.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:Ks,label:(0,x.__)("Apply"),type:"submit"}))),aI=({isURLInputVisible:e,src:t,onChangeSrc:n,onSubmitSrc:o,openURLInput:r,closeURLInput:l})=>{const[i,a]=(0,u.useState)(null);return(0,s.createElement)("div",{className:"block-editor-media-placeholder__url-input-container",ref:a},(0,s.createElement)(_l.Button,{className:"block-editor-media-placeholder__button",onClick:r,isPressed:e,variant:"tertiary"},(0,x.__)("Insert from URL")),e&&(0,s.createElement)(sI,{src:t,onChange:n,onSubmit:o,onClose:l,popoverAnchor:i}))};const cI=(0,_l.withFilters)("editor.MediaPlaceholder")((function({value:e={},allowedTypes:t,className:n,icon:o,labels:r={},mediaPreview:l,notices:i,isAppender:a,accept:p,addToGallery:m,multiple:h=!1,handleUpload:g=!0,disableDropZone:f,disableMediaButtons:b,onError:v,onSelect:k,onCancel:_,onSelectURL:y,onToggleFeaturedImage:E,onDoubleClick:S,onFilesPreUpload:C=iI,onHTMLDrop:B,children:I,mediaLibraryButton:T,placeholder:M,style:P}){B&&w()("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});const R=(0,d.useSelect)((e=>{const{getSettings:t}=e(Nr);return t().mediaUpload}),[]),[N,L]=(0,u.useState)(""),[A,O]=(0,u.useState)(!1);(0,u.useEffect)((()=>{var t;L(null!==(t=e?.src)&&void 0!==t?t:"")}),[e?.src]);const D=e=>{L(e.target.value)},z=()=>{O(!0)},V=()=>{O(!1)},F=e=>{e.preventDefault(),N&&y&&(y(N),V())},H=n=>{if(!g)return k(n);let o;if(C(n),h)if(m){let t=[];o=n=>{const o=(null!=e?e:[]).filter((e=>e.id?!t.some((({id:t})=>Number(t)===Number(e.id))):!t.some((({urlSlug:t})=>e.url.includes(t)))));k(o.concat(n)),t=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else o=k;else o=([e])=>k(e);R({allowedTypes:t,filesList:n,onFileChange:o,onError:v})};async function G(e){const n=(0,c.pasteHandler)({HTML:e});return await async function(e){if(!e||!Array.isArray(e))return;const n=function e(t){return t.flatMap((t=>"core/image"!==t.name&&"core/audio"!==t.name&&"core/video"!==t.name||!t.attributes.url?e(t.innerBlocks):[t]))}(e);if(!n.length)return;const o=await Promise.all(n.map((e=>e.attributes.id?e.attributes:new Promise(((n,o)=>{window.fetch(e.attributes.url).then((e=>e.blob())).then((r=>R({filesList:[r],additionalData:{title:e.attributes.title,alt_text:e.attributes.alt,caption:e.attributes.caption},onFileChange:([e])=>{e.id&&n(e)},allowedTypes:t,onError:o}))).catch((()=>n(e.attributes.url)))}))))).catch((e=>v(e)));k(h?o:o[0])}(n)}const U=e=>{H(e.target.files)},$=null!=M?M:e=>{let{instructions:c,title:u}=r;if(R||y||(c=(0,x.__)("To edit this block, you need permission to upload media.")),void 0===c||void 0===u){const e=null!=t?t:[],[n]=e,o=1===e.length,r=o&&"audio"===n,l=o&&"image"===n,i=o&&"video"===n;void 0===c&&R&&(c=(0,x.__)("Upload a media file or pick one from your media library."),r?c=(0,x.__)("Upload an audio file, pick one from your media library, or add one with a URL."):l?c=(0,x.__)("Upload an image file, pick one from your media library, or add one with a URL."):i&&(c=(0,x.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===u&&(u=(0,x.__)("Media"),r?u=(0,x.__)("Audio"):l?u=(0,x.__)("Image"):i&&(u=(0,x.__)("Video")))}const d=ml()("block-editor-media-placeholder",n,{"is-appender":a});return(0,s.createElement)(_l.Placeholder,{icon:o,label:u,instructions:c,className:d,notices:i,onDoubleClick:S,preview:l,style:P},e,I)},j=()=>f?null:(0,s.createElement)(_l.DropZone,{onFilesDrop:H,onHTMLDrop:G}),W=()=>_&&(0,s.createElement)(_l.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,x.__)("Cancel"),variant:"link",onClick:_},(0,x.__)("Cancel")),K=()=>y&&(0,s.createElement)(aI,{isURLInputVisible:A,src:N,onChangeSrc:D,onSubmitSrc:F,openURLInput:z,closeURLInput:V}),Z=()=>E&&(0,s.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,s.createElement)(_l.Button,{className:"block-editor-media-placeholder__button",onClick:E,variant:"tertiary"},(0,x.__)("Use featured image")));return b?(0,s.createElement)(Us,null,j()):(0,s.createElement)(Us,{fallback:$(K())},(()=>{const n=null!=T?T:({open:e})=>(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:()=>{e()}},(0,x.__)("Media Library")),o=(0,s.createElement)(Gs,{addToGallery:m,gallery:h&&!(!t||0===t.length)&&t.every((e=>"image"===e||e.startsWith("image/"))),multiple:h,onSelect:k,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map((({id:e})=>e)):e.id,render:n});if(R&&a)return(0,s.createElement)(s.Fragment,null,j(),(0,s.createElement)(_l.FormFileUpload,{onChange:U,accept:p,multiple:!!h,render:({openFileDialog:e})=>{const t=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.Button,{variant:"primary",className:ml()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:e},(0,x.__)("Upload")),o,K(),Z(),W());return $(t)}}));if(R){const e=(0,s.createElement)(s.Fragment,null,j(),(0,s.createElement)(_l.FormFileUpload,{variant:"primary",className:ml()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:U,accept:p,multiple:!!h},(0,x.__)("Upload")),o,K(),Z(),W());return $(e)}return $(o)})())})),uI=({colorSettings:e,...t})=>{const n=e.map((e=>{if(!e)return e;const{value:t,onChange:n,...o}=e;return{...o,colorValue:t,onColorChange:n}}));return(0,s.createElement)(yB,{settings:n,gradients:[],disableCustomGradients:!0,...t})},dI={placement:"bottom-start"},pI=()=>(0,s.createElement)(s.Fragment,null,["bold","italic","link","unknown"].map((e=>(0,s.createElement)(_l.Slot,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,s.createElement)(_l.Slot,{name:"RichText.ToolbarControls"},(e=>{if(!e.length)return null;const t=e.map((([{props:e}])=>e)).some((({isActive:e})=>e));return(0,s.createElement)(_l.ToolbarItem,null,(n=>(0,s.createElement)(_l.DropdownMenu,{icon:cS,label:(0,x.__)("More"),toggleProps:{...n,className:ml()(n.className,{"is-pressed":t}),describedBy:(0,x.__)("Displays more block tools")},controls:ne(e.map((([{props:e}])=>e)),"title"),popoverProps:dI})))})));function mI({editableContentElement:e,activeFormats:t}){const n=t[t.length-1],o=n?.type,r=(0,d.useSelect)((e=>e(Y.store).getFormatType(o)),[o]),l=(0,Y.useAnchor)({editableContentElement:e,settings:r});return(0,s.createElement)(hI,{popoverAnchor:l})}function hI({popoverAnchor:e}){return(0,s.createElement)(_l.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,s.createElement)(NC,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,x.__)("Format tools")},(0,s.createElement)(_l.ToolbarGroup,null,(0,s.createElement)(pI,null))))}const gI=({inline:e,editableContentElement:t,value:n})=>{const o=(0,d.useSelect)((e=>e(Nr).getSettings().hasInlineToolbar),[]);if(e)return(0,s.createElement)(hI,{popoverAnchor:t});if(o){const e=(0,Y.getActiveFormats)(n);return(0,Y.isCollapsed)(n)&&!e.length?null:(0,s.createElement)(mI,{editableContentElement:t,activeFormats:e})}return(0,s.createElement)(Bl,{group:"inline"},(0,s.createElement)(pI,null))};function fI(){const{didAutomaticChange:e,getSettings:t}=(0,d.useSelect)(Nr);return(0,p.useRefEffect)((n=>{function o(n){const{keyCode:o}=n;if(n.defaultPrevented)return;if(o!==zs.DELETE&&o!==zs.BACKSPACE&&o!==zs.ESCAPE)return;const{__experimentalUndo:r}=t();r&&e()&&(n.preventDefault(),r())}return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}}),[])}function bI(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function vI({allowedFormats:e,disableFormats:t}){return t?vI.EMPTY_ARRAY:e}function kI({value:e,pastedBlocks:t=[],onReplace:n,onSplit:o}){if(!n||!o)return;const{start:r=0,end:l=0}=e,i={...e,start:r,end:l},s=[],[a,c]=(0,Y.split)(i),u=t.length>0;let d=-1;const p=(0,Y.isEmpty)(a)&&!(0,Y.isEmpty)(c);u&&(0,Y.isEmpty)(a)||(s.push(o((0,Y.toHTMLString)({value:a}),!p)),d+=1),u&&(s.push(...t),d+=t.length),u&&(0,Y.isEmpty)(c)||s.push(o((0,Y.toHTMLString)({value:c}),p));n(s,u?d:1,u?-1:0)}function _I(e){const t=(0,u.useRef)(e);return t.current=e,(0,p.useRefEffect)((e=>{function n(e){const{isSelected:n,disableFormats:o,onChange:r,value:l,formatTypes:i,tagName:s,onReplace:a,onSplit:u,__unstableEmbedURLOnPaste:d,pastePlainText:p}=t.current;if(!n)return;const{plainText:m,html:h,files:g}=ty(e);if(e.preventDefault(),window.console.log("Received HTML:\n\n",h),window.console.log("Received plain text:\n\n",m),o)return void r((0,Y.insert)(l,m));function f(e){const t=i.reduce(((e,{__unstablePasteRule:t})=>(t&&e===l&&(e=t(l,{html:h,plainText:m})),e)),l);if(t!==l)r(t);else{const t=(0,Y.create)({html:e});!function(e,t){if(t?.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}(t,l.activeFormats),r((0,Y.insert)(l,t))}}if("true"===e.clipboardData.getData("rich-text"))return void f(h);if(p)return void r((0,Y.insert)(l,(0,Y.create)({text:m})));if(g?.length){window.console.log("Received items:\n\n",g);const e=(0,c.getBlockTransforms)("from"),t=g.reduce(((t,n)=>{const o=(0,c.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat();if(!t.length)return;return void(a&&(0,Y.isEmpty)(l)?a(t):kI({value:l,pastedBlocks:t,onReplace:a,onSplit:u}))}let b=a&&u?"AUTO":"INLINE";const v=m.trim();d&&(0,Y.isEmpty)(l)&&(0,Ds.isURL)(v)&&/^https?:/.test(v)&&(b="BLOCKS");const k=(0,c.pasteHandler)({HTML:h,plainText:m,mode:b,tagName:s});"string"==typeof k?f(k):k.length>0&&(a&&(0,Y.isEmpty)(l)?a(k,k.length-1,-1):kI({value:l,pastedBlocks:k,onReplace:a,onSplit:u}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}vI.EMPTY_ARRAY=[];const yI=["`",'"',"'","“”","‘’"];function EI(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,d.useDispatch)(Nr),o=(0,u.useRef)(e);return o.current=e,(0,p.useRefEffect)((e=>{function r(r){const{inputType:l,data:i}=r,{value:s,onChange:a}=o.current;if("insertText"!==l)return;if((0,Y.isCollapsed)(s))return;const c=(0,m.applyFilters)("blockEditor.wrapSelectionSettings",yI).find((([e,t])=>e===i||t===i));if(!c)return;const[u,d=u]=c,p=s.start,h=s.end+u.length;let g=(0,Y.insert)(s,u,p,p);g=(0,Y.insert)(g,d,h,h),t(),a(g),n();const f={};for(const e in r)f[e]=r[e];f.data=d;const{ownerDocument:b}=e,{defaultView:v}=b,k=new v.InputEvent("input",f);window.queueMicrotask((()=>{r.target.dispatchEvent(k)})),r.preventDefault()}return e.addEventListener("beforeinput",r),()=>{e.removeEventListener("beforeinput",r)}}),[])}function wI(e){let t=e.length;for(;t--;){const n=_o(e[t].attributes);if(n)return e[t].attributes[n]=e[t].attributes[n].toString().replace(ko,""),[e[t].clientId,n,0,0];const o=wI(e[t].innerBlocks);if(o)return o}return[]}function SI(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,d.useDispatch)(Nr),o=(0,u.useRef)(e);return o.current=e,(0,p.useRefEffect)((e=>{function r(){const{getValue:e,onReplace:t,selectionChange:r}=o.current;if(!t)return;const l=e(),{start:i,text:s}=l;if(" "!==s.slice(i-1,i))return;const a=s.slice(0,i).trim(),u=(0,c.getBlockTransforms)("from").filter((({type:e})=>"prefix"===e)),d=(0,c.findTransform)(u,(({prefix:e})=>a===e));if(!d)return;const p=(0,Y.toHTMLString)({value:(0,Y.insert)(l,ko,0,i)}),m=d.transform(p);return r(...wI([m])),t([m]),n(),!0}function l(e){const{inputType:l,type:i}=e,{getValue:s,onChange:a,__unstableAllowPrefixTransformations:c,formatTypes:u}=o.current;if("insertText"!==l&&"compositionend"!==i)return;if(c&&r())return;const d=s(),p=u.reduce(((e,{__unstableInputRule:t})=>(t&&(e=t(e)),e)),function(e){const t="tales of gutenberg",{start:n,text:o}=e;return n<18||o.slice(n-18,n).toLowerCase()!==t?e:(0,Y.insert)(e," 🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️")}(d));p!==d&&(t(),a({...p,activeFormats:d.activeFormats}),n())}return e.addEventListener("input",l),e.addEventListener("compositionend",l),()=>{e.removeEventListener("input",l),e.removeEventListener("compositionend",l)}}),[])}function CI(e){const t=(0,u.useRef)(e);return t.current=e,(0,p.useRefEffect)((e=>{function n(e){const{keyCode:n}=e;if(e.defaultPrevented)return;const{value:o,onMerge:r,onRemove:l}=t.current;if(n===zs.DELETE||n===zs.BACKSPACE){const{start:t,end:i,text:s}=o,a=n===zs.BACKSPACE,c=o.activeFormats&&!!o.activeFormats.length;if(!(0,Y.isCollapsed)(o)||c||a&&0!==t||!a&&i!==s.length)return;r?r(!a):l&&(0,Y.isEmpty)(o)&&a&&l(!a),e.preventDefault()}}return e.addEventListener("keydown",n),()=>{e.removeEventListener("keydown",n)}}),[])}function xI(e){const t=(0,d.useRegistry)(),{__unstableMarkAutomaticChange:n}=(0,d.useDispatch)(Nr),o=(0,u.useRef)(e);return o.current=e,(0,p.useRefEffect)((e=>{function r(e){if("true"!==e.target.contentEditable)return;if(e.defaultPrevented)return;if(e.keyCode!==zs.ENTER)return;const{removeEditorOnlyFormats:r,value:l,onReplace:i,onSplit:s,onChange:a,disableLineBreaks:u,onSplitAtEnd:d,onSplitAtDoubleLineEnd:p}=o.current;e.preventDefault();const m={...l};m.formats=r(l);const h=i&&s;if(i){const e=(0,c.getBlockTransforms)("from").filter((({type:e})=>"enter"===e)),t=(0,c.findTransform)(e,(e=>e.regExp.test(m.text)));if(t)return i([t.transform({content:m.text})]),void n()}const{text:g,start:f,end:b}=m;e.shiftKey?u||a((0,Y.insert)(m,"\n")):h?kI({value:m,onReplace:i,onSplit:s}):d&&f===b&&b===g.length?d():p&&f===b&&b===g.length&&"\n\n"===g.slice(-2)?t.batch((()=>{m.start=m.end-2,a((0,Y.remove)(m)),p()})):u||a((0,Y.insert)(m,"\n"))}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[])}function BI(e){return e(Y.store).getFormatTypes()}const II=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function TI(e,t){return"object"!=typeof e?{[t]:e}:Object.fromEntries(Object.entries(e).map((([e,n])=>[`${t}.${e}`,n])))}function MI(e,t){return e[t]?e[t]:Object.keys(e).filter((e=>e.startsWith(t+"."))).reduce(((n,o)=>(n[o.slice(t.length+1)]=e[o],n)),{})}function PI(e){return(0,p.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function RI(e){return(0,p.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function NI(){const{__unstableMarkLastChangeAsPersistent:e}=(0,d.useDispatch)(Nr);return(0,p.useRefEffect)((t=>{function n(t){"insertReplacementText"===t.inputType&&e()}return t.addEventListener("beforeinput",n),()=>{t.removeEventListener("beforeinput",n)}}),[])}function LI(){const{isMultiSelecting:e}=(0,d.useSelect)(Nr);return(0,p.useRefEffect)((t=>{function n(){if(!e())return;const n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",n),()=>{t.removeEventListener("focus",n)}}),[])}const AI={},OI=Symbol("usesContext");function DI({onChange:e,onFocus:t,value:n,forwardedRef:o,settings:r}){const{name:l,edit:i,[OI]:a}=r,c=(0,u.useContext)(bf),d=(0,u.useMemo)((()=>a?Object.fromEntries(Object.entries(c).filter((([e])=>a.includes(e)))):AI),[a,c]);if(!i)return null;const p=(0,Y.getActiveFormat)(n,l),m=void 0!==p,h=(0,Y.getActiveObject)(n),g=void 0!==h&&h.type===l;return(0,s.createElement)(i,{key:l,isActive:m,activeAttributes:m&&p.attributes||{},isObjectActive:g,activeObjectAttributes:g&&h.attributes||{},value:n,onChange:e,onFocus:t,contentRef:o,context:d})}function zI({formatTypes:e,...t}){return e.map((e=>(0,s.createElement)(DI,{settings:e,...t,key:e.name})))}function VI({value:e,tagName:t,multiline:n,format:o,...r}){if(KI.isEmpty(e)){const t=bI(n);e=t?(0,s.createElement)(t,null):null}else Array.isArray(e)?(w()("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),e=(0,s.createElement)(u.RawHTML,null,c.children.toHTML(e))):e="string"==typeof e?(0,s.createElement)(u.RawHTML,null,e):(0,s.createElement)(u.RawHTML,null,e.toHTMLString());return t?(0,s.createElement)(t,{...r},e):e}const FI=(0,u.forwardRef)((function({children:e,identifier:t,tagName:n="div",value:o="",onChange:r,multiline:l,...i},a){w()("wp.blockEditor.RichText multiline prop",{since:"6.1",version:"6.3",alternative:"nested blocks (InnerBlocks)",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/"});const{clientId:c}=y(),{selectionChange:u}=(0,d.useDispatch)(Nr),p=bI(l),m=`</${p}>${o=o||`<${p}></${p}>`}<${p}>`.split(`</${p}><${p}>`);function h(e){r(`<${p}>${e.join(`</${p}><${p}>`)}</${p}>`)}return m.shift(),m.pop(),(0,s.createElement)(n,{ref:a},m.map(((e,n)=>(0,s.createElement)(UI,{key:n,identifier:`${t}-${n}`,tagName:p,value:e,onChange:e=>{const t=m.slice();t[n]=e,h(t)},isSelected:void 0,onSplit:e=>e,onReplace:e=>{const o=m.slice();o.splice(n,1,...e),h(o),u(c,`${t}-${n+1}`,0,0)},onMerge:e=>{const o=m.slice();let r=0;if(e){if(!o[n+1])return;o.splice(n,2,o[n]+o[n+1]),r=o[n].length-1}else{if(!o[n-1])return;o.splice(n-1,2,o[n-1]+o[n]),r=o[n-1].length-1}h(o),u(c,`${t}-${n-(e?0:1)}`,r,r)},...i}))))}));const HI=(0,u.createContext)(),GI=(0,u.createContext)();function UI({children:e,tagName:t="div",value:n="",onChange:o,isSelected:r,multiline:l,inlineToolbar:i,wrapperClassName:a,autocompleters:m,onReplace:h,placeholder:g,allowedFormats:f,withoutInteractiveFormatting:v,onRemove:k,onMerge:_,onSplit:E,__unstableOnSplitAtEnd:w,__unstableOnSplitAtDoubleLineEnd:S,identifier:C,preserveWhiteSpace:x,__unstablePastePlainText:B,__unstableEmbedURLOnPaste:I,__unstableDisableFormats:T,disableLineBreaks:M,__unstableAllowPrefixTransformations:P,disableEditing:R,...N},L){N=function(e){const{__unstableMobileNoFocusOnMount:t,deleteEnter:n,placeholderTextColor:o,textAlign:r,selectionColor:l,tagsToEliminate:i,disableEditingMenu:s,fontSize:a,fontFamily:c,fontWeight:u,fontStyle:d,minWidth:p,maxWidth:m,setRef:h,disableSuggestions:g,disableAutocorrection:f,...b}=e;return b}(N);const A=(0,u.useRef)(),O=y(),{clientId:D,isSelected:z,name:V}=O,F=O[b],{selectionStart:H,selectionEnd:G,isSelected:U}=(0,d.useSelect)((e=>{if(!z)return{isSelected:!1};const{getSelectionStart:t,getSelectionEnd:n}=e(Nr),o=t(),l=n();let i;return void 0===r?i=o.clientId===D&&l.clientId===D&&o.attributeKey===C:r&&(i=o.clientId===D),{selectionStart:i?o.offset:void 0,selectionEnd:i?l.offset:void 0,isSelected:i}}),[D,C,r,z]),$=(0,d.useSelect)((e=>{let t=!1;if(F&&eg(V)){const n=(0,c.getBlockType)(V).attributes,{getBlockBindingsSource:o}=ie(e(c.store));for(const[e,r]of Object.entries(F)){if("rich-text"!==n?.[e]?.source)break;const l=o(r.source);if(!l||l.lockAttributesEditing){t=!0;break}}}return t}),[F,V]),j=R||$,{getSelectionStart:W,getSelectionEnd:K,getBlockRootClientId:Z}=(0,d.useSelect)(Nr),{selectionChange:q}=(0,d.useDispatch)(Nr),X=vI({allowedFormats:f,disableFormats:T}),Q=!X||X.length>0,J=(0,u.useCallback)(((e,t)=>{const n={},o=void 0===e&&void 0===t;if("number"==typeof e||o){if(void 0===t&&Z(D)!==Z(K().clientId))return;n.start={clientId:D,attributeKey:C,offset:e}}if("number"==typeof t||o){if(void 0===e&&Z(D)!==Z(W().clientId))return;n.end={clientId:D,attributeKey:C,offset:t}}q(n)}),[D,C]),{formatTypes:ee,prepareHandlers:te,valueHandlers:ne,changeHandlers:oe,dependencies:re}=function({clientId:e,identifier:t,withoutInteractiveFormatting:n,allowedFormats:o}){const r=(0,d.useSelect)(BI,[]),l=(0,u.useMemo)((()=>r.filter((({name:e,interactive:t,tagName:r})=>!(o&&!o.includes(e)||n&&(t||II.has(r)))))),[r,o,n]),i=(0,d.useSelect)((n=>l.reduce(((o,r)=>r.__experimentalGetPropsForEditableTreePreparation?{...o,...TI(r.__experimentalGetPropsForEditableTreePreparation(n,{richTextIdentifier:t,blockClientId:e}),r.name)}:o),{})),[l,e,t]),s=(0,d.useDispatch)(),a=[],c=[],p=[],m=[];for(const e in i)m.push(i[e]);return l.forEach((n=>{if(n.__experimentalCreatePrepareEditableTree){const o=n.__experimentalCreatePrepareEditableTree(MI(i,n.name),{richTextIdentifier:t,blockClientId:e});n.__experimentalCreateOnChangeEditableValue?c.push(o):a.push(o)}if(n.__experimentalCreateOnChangeEditableValue){let o={};n.__experimentalGetPropsForEditableTreeChangeHandler&&(o=n.__experimentalGetPropsForEditableTreeChangeHandler(s,{richTextIdentifier:t,blockClientId:e}));const r=MI(i,n.name);p.push(n.__experimentalCreateOnChangeEditableValue({..."object"==typeof r?r:{},...o},{richTextIdentifier:t,blockClientId:e}))}})),{formatTypes:l,prepareHandlers:a,valueHandlers:c,changeHandlers:p,dependencies:m}}({clientId:D,identifier:C,withoutInteractiveFormatting:v,allowedFormats:X});function le(e){return ee.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,Y.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:se,getValue:ae,onChange:ce,ref:ue}=(0,Y.__unstableUseRichText)({value:n,onChange(e,{__unstableFormats:t,__unstableText:n}){o(e),Object.values(oe).forEach((e=>{e(t,n)}))},selectionStart:H,selectionEnd:G,onSelectionChange:J,placeholder:g,__unstableIsSelected:U,__unstableDisableFormats:T,preserveWhiteSpace:x,__unstableDependencies:[...re,t],__unstableAfterParse:function(e){return ne.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:le,__unstableAddInvisibleFormats:function(e){return te.reduce(((t,n)=>n(t,e.text)),e.formats)}}),de=function(e){return(0,_l.__unstableUseAutocompleteProps)({...e,completers:rf(e)})}({onReplace:h,completers:m,record:se,onChange:ce});!function({html:e,value:t}){const n=(0,u.useRef)(),o=!!t.activeFormats?.length,{__unstableMarkLastChangeAsPersistent:r}=(0,d.useDispatch)(Nr);(0,u.useLayoutEffect)((()=>{if(n.current){if(n.current!==t.text){const e=window.setTimeout((()=>{r()}),1e3);return n.current=t.text,()=>{window.clearTimeout(e)}}r()}else n.current=t.text}),[e,o])}({html:n,value:se});const pe=(0,u.useRef)(new Set),me=(0,u.useRef)(new Set);function he(){A.current?.focus()}const ge=t;return(0,s.createElement)(s.Fragment,null,U&&(0,s.createElement)(HI.Provider,{value:pe},(0,s.createElement)(GI.Provider,{value:me},(0,s.createElement)(_l.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},e&&e({value:se,onChange:ce,onFocus:he}),(0,s.createElement)(zI,{value:se,onChange:ce,onFocus:he,formatTypes:ee,forwardedRef:A})))),U&&Q&&(0,s.createElement)(gI,{inline:i,editableContentElement:A.current,value:se}),(0,s.createElement)(ge,{role:"textbox","aria-multiline":!M,"aria-label":g,"aria-readonly":j,...N,...de,ref:(0,p.useMergeRefs)([ue,L,de.ref,N.ref,EI({value:se,onChange:ce}),SI({getValue:ae,onChange:ce,__unstableAllowPrefixTransformations:P,formatTypes:ee,onReplace:h,selectionChange:q}),NI(),(0,p.useRefEffect)((e=>{function t(e){(zs.isKeyboardEvent.primary(e,"z")||zs.isKeyboardEvent.primary(e,"y")||zs.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[]),PI(pe),RI(me),fI(),_I({isSelected:U,disableFormats:T,onChange:ce,value:se,formatTypes:ee,tagName:t,onReplace:h,onSplit:E,__unstableEmbedURLOnPaste:I,pastePlainText:B}),CI({value:se,onMerge:_,onRemove:k}),xI({removeEditorOnlyFormats:le,value:se,onReplace:h,onSplit:E,onChange:ce,disableLineBreaks:M,onSplitAtEnd:w,onSplitAtDoubleLineEnd:S}),LI(),A]),contentEditable:!j,suppressContentEditableWarning:!0,className:ml()("block-editor-rich-text__editable",N.className,"rich-text"),tabIndex:0!==N.tabIndex||j?N.tabIndex:null,"data-wp-block-attribute-key":C}))}const $I=(jI=(0,u.forwardRef)(UI),(0,u.forwardRef)(((e,t)=>{let n=e.value,o=e.onChange;Array.isArray(n)&&(w()("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),n=c.children.toHTML(e.value),o=t=>e.onChange(c.children.fromDOM((0,Y.__unstableCreateElement)(document,t).childNodes)));const r=e.multiline?FI:jI,l=(0,p.useInstanceId)(r);return(0,s.createElement)(r,{...e,identifier:e.identifier||l,value:n,onChange:o,ref:t})})));var jI;$I.Content=VI,$I.isEmpty=e=>!e||0===e.length;const WI=(0,u.forwardRef)(((e,t)=>(0,s.createElement)($I,{ref:t,...e,disableEditing:!1})));WI.Content=VI,WI.isEmpty=e=>!e||0===e.length;const KI=WI,ZI=(0,u.forwardRef)(((e,t)=>(0,s.createElement)(KI,{ref:t,...e,__unstableDisableFormats:!0})));ZI.Content=({value:e="",tagName:t="div",...n})=>(0,s.createElement)(t,{...n},e);const qI=ZI,YI=(0,u.forwardRef)((({__experimentalVersion:e,...t},n)=>{if(2===e)return(0,s.createElement)(qI,{ref:n,...t});const{className:o,onChange:r,...l}=t;return(0,s.createElement)(Nf.A,{ref:n,className:ml()("block-editor-plain-text",o),onChange:e=>r(e.target.value),...l})}));function XI({property:e,viewport:t,desc:n}){const o=(0,p.useInstanceId)(XI),r=n||(0,x.sprintf)((0,x._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),e,t.label);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("span",{"aria-describedby":`rbc-desc-${o}`},t.label),(0,s.createElement)(_l.VisuallyHidden,{as:"span",id:`rbc-desc-${o}`},r))}const QI=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:l,renderResponsiveControls:i,isResponsive:a=!1,defaultLabel:c={id:"all",label:(0,x._x)("All","screen sizes")},viewports:d=[{id:"small",label:(0,x.__)("Small screens")},{id:"medium",label:(0,x.__)("Medium screens")},{id:"large",label:(0,x.__)("Large screens")}]}=e;if(!t||!n||!l)return null;const p=o||(0,x.sprintf)((0,x.__)("Use the same %s on all screensizes."),n),m=(0,x.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),h=l((0,s.createElement)(XI,{property:n,viewport:c}),c);return(0,s.createElement)("fieldset",{className:"block-editor-responsive-block-control"},(0,s.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),(0,s.createElement)("div",{className:"block-editor-responsive-block-control__inner"},(0,s.createElement)(_l.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-responsive-block-control__toggle",label:p,checked:!a,onChange:r,help:m}),(0,s.createElement)("div",{className:ml()("block-editor-responsive-block-control__group",{"is-responsive":a})},!a&&h,a&&(i?i(d):d.map((e=>(0,s.createElement)(u.Fragment,{key:e.id},l((0,s.createElement)(XI,{property:n,viewport:e}),e))))))))};function JI({character:e,type:t,onUse:n}){const o=(0,u.useContext)(HI),r=(0,u.useRef)();return r.current=n,(0,u.useEffect)((()=>{function n(n){zs.isKeyboardEvent[t](n,e)&&(r.current(),n.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}}),[e,t]),null}function eT({name:e,shortcutType:t,shortcutCharacter:n,...o}){let r,l="RichText.ToolbarControls";return e&&(l+=`.${e}`),t&&n&&(r=zs.displayShortcut[t](n)),(0,s.createElement)(_l.Fill,{name:l},(0,s.createElement)(_l.ToolbarButton,{...o,shortcut:r}))}function tT({inputType:e,onInput:t}){const n=(0,u.useContext)(GI),o=(0,u.useRef)();return o.current=t,(0,u.useEffect)((()=>{function t(t){t.inputType===e&&(o.current(),t.preventDefault())}return n.current.add(t),()=>{n.current.delete(t)}}),[e]),null}const nT=(0,s.createElement)(_l.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,s.createElement)(_l.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"}));const oT=(0,u.forwardRef)((function(e,t){const n=(0,d.useSelect)((e=>e(Nr).__unstableGetEditorMode()),[]),{__unstableSetEditorMode:o}=(0,d.useDispatch)(Nr);return(0,s.createElement)(_l.Dropdown,{renderToggle:({isOpen:o,onToggle:r})=>(0,s.createElement)(_l.Button,{...e,ref:t,icon:"navigation"===n?nT:La,"aria-expanded":o,"aria-haspopup":"true",onClick:r,label:(0,x.__)("Tools")}),popoverProps:{placement:"bottom-start"},renderContent:()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.NavigableMenu,{role:"menu","aria-label":(0,x.__)("Tools")},(0,s.createElement)(_l.MenuItemsChoice,{value:"navigation"===n?"navigation":"edit",onSelect:o,choices:[{value:"edit",label:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ti,{icon:La}),(0,x.__)("Edit"))},{value:"navigation",label:(0,s.createElement)(s.Fragment,null,nT,(0,x.__)("Select"))}]})),(0,s.createElement)("div",{className:"block-editor-tool-selector__help"},(0,x.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function rT({units:e,...t}){const[n]=Ar("spacing.units"),o=(0,_l.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vw"],units:e});return(0,s.createElement)(_l.__experimentalUnitControl,{units:o,...t})}const lT=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"}));class iT extends u.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.submitLink=this.submitLink.bind(this),this.state={expanded:!1}}toggle(){this.setState({expanded:!this.state.expanded})}submitLink(e){e.preventDefault(),this.toggle()}render(){const{url:e,onChange:t}=this.props,{expanded:n}=this.state,o=e?(0,x.__)("Edit link"):(0,x.__)("Insert link");return(0,s.createElement)("div",{className:"block-editor-url-input__button"},(0,s.createElement)(_l.Button,{icon:ru,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,s.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},(0,s.createElement)("div",{className:"block-editor-url-input__button-modal-line"},(0,s.createElement)(_l.Button,{className:"block-editor-url-input__back",icon:lT,label:(0,x.__)("Close"),onClick:this.toggle}),(0,s.createElement)(ta,{__nextHasNoMarginBottom:!0,value:e||"",onChange:t}),(0,s.createElement)(_l.Button,{icon:Ks,label:(0,x.__)("Submit"),type:"submit"}))))}}const sT=iT,aT=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.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-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})),cT="none",uT="custom",dT="media",pT="attachment",mT=["noreferrer","noopener"],hT=({linkDestination:e,onChangeUrl:t,url:n,mediaType:o="image",mediaUrl:r,mediaLink:l,linkTarget:i,linkClass:a,rel:c,showLightboxSetting:d,lightboxEnabled:p,onSetLightbox:m,resetLightbox:h})=>{const[g,f]=(0,u.useState)(!1),[b,v]=(0,u.useState)(null),[k,_]=(0,u.useState)(!1),[y,E]=(0,u.useState)(null),w=(0,u.useRef)(null),S=(0,u.useRef)();(0,u.useEffect)((()=>{if(!S.current)return;(As.focus.focusable.find(S.current)[0]||S.current).focus()}),[k,n,p]);const C=()=>{e!==dT&&e!==pT||E(""),_(!0)},B=()=>{_(!1)},I=()=>{const e=[{linkDestination:dT,title:(0,x.__)("Link to image file"),url:"image"===o?r:void 0,icon:aT}];return"image"===o&&l&&e.push({linkDestination:pT,title:(0,x.__)("Link to attachment page"),url:"image"===o?l:void 0,icon:la}),e},T=(0,s.createElement)(_l.__experimentalVStack,{spacing:"3"},(0,s.createElement)(_l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Open in new tab"),onChange:e=>{const n=(e=>{const t=e?"_blank":void 0;let n;if(t){const e=(null!=c?c:"").split(" ");mT.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(null!=c?c:"").split(" ").filter((e=>!1===mT.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);t(n)},checked:"_blank"===i}),(0,s.createElement)(_l.TextControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Link rel"),value:null!=c?c:"",onChange:e=>{t({rel:e})}}),(0,s.createElement)(_l.TextControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Link CSS class"),value:a||"",onChange:e=>{t({linkClass:e})}})),M=null!==y?y:n,P=!p||p&&!d,R=!M&&P,N=(I().find((t=>t.linkDestination===e))||{}).title;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.ToolbarButton,{icon:ru,className:"components-toolbar__control",label:(0,x.__)("Link"),"aria-expanded":g,onClick:()=>{f(!0)},ref:v,isActive:!!n||p&&d}),g&&(0,s.createElement)(lI,{ref:S,anchor:b,onFocusOutside:e=>{const t=w.current;t&&t.contains(e.target)||(f(!1),E(null),B())},onClose:()=>{E(null),B(),f(!1)},renderSettings:P?()=>T:null,additionalControls:R&&(0,s.createElement)(_l.NavigableMenu,null,I().map((e=>(0,s.createElement)(_l.MenuItem,{key:e.linkDestination,icon:e.icon,iconPosition:"left",onClick:()=>{E(null),(e=>{const n=I();let o;o=e?(n.find((t=>t.url===e))||{linkDestination:uT}).linkDestination:cT,t({linkDestination:o,href:e})})(e.url),B()}},e.title))),d&&(0,s.createElement)(_l.MenuItem,{key:"expand-on-click",className:"block-editor-url-popover__expand-on-click",icon:sf,info:(0,x.__)("Scale the image with a lightbox effect."),iconPosition:"left",onClick:()=>{E(null),t({linkDestination:cT,href:""}),m(!0),B()}},(0,x.__)("Expand on click"))),offset:13},p&&d&&!n&&!k?(0,s.createElement)("div",{className:"block-editor-url-popover__expand-on-click"},(0,s.createElement)(Ti,{icon:sf}),(0,s.createElement)("div",{className:"text"},(0,s.createElement)("p",null,(0,x.__)("Expand on click")),(0,s.createElement)("p",{className:"description"},(0,x.__)("Scales the image with a lightbox effect"))),(0,s.createElement)(_l.Button,{icon:Aa,label:(0,x.__)("Disable expand on click"),onClick:()=>{m(!1)},size:"compact"})):!n||k?(0,s.createElement)(lI.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:M,onChangeInputValue:E,onSubmit:e=>{if(y){const e=I().find((e=>e.url===y))?.linkDestination||uT;t({href:y,linkDestination:e,lightbox:{enabled:!1}})}B(),E(null),e.preventDefault()},autocompleteRef:w}):n&&!k?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(lI.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:n,onEditLinkClick:C,urlLabel:N}),(0,s.createElement)(_l.Button,{icon:Aa,label:(0,x.__)("Remove link"),onClick:()=>{t({linkDestination:cT,href:""}),h()},size:"compact"})):void 0))};function gT(){return w()("wp.blockEditor.PreviewOptions",{version:"6.5"}),null}function fT(e){const[t,n]=(0,u.useState)(window.innerWidth);(0,u.useEffect)((()=>{if("Desktop"===e)return;const t=()=>n(window.innerWidth);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e]);const o=e=>{let n;switch(e){case"Tablet":n=780;break;case"Mobile":n=360;break;default:return null}return n<t?n:t};return(e=>{const t="Mobile"===e?"768px":"1024px",n=(window.innerHeight<800?36:72)+"px",r="auto";switch(e){case"Tablet":case"Mobile":return{width:o(e),marginTop:n,marginBottom:n,marginLeft:r,marginRight:r,height:t,borderRadius:"2px 2px 2px 2px",border:"1px solid #ddd",overflowY:"auto"};default:return{marginLeft:r,marginRight:r}}})(e)}const bT=(0,d.withSelect)((e=>({selectedBlockClientId:e(Nr).getBlockSelectionStart()})))((({selectedBlockClientId:e})=>{const t=fd(e);return e?(0,s.createElement)(_l.Button,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current.focus()}},(0,x.__)("Skip to the selected block")):null})),vT=window.wp.wordcount;const kT=(0,d.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(Nr);return{blocks:t()}}))((function({blocks:e}){const t=(0,vT.count)((0,c.serialize)(e),"words");return(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,s.createElement)(qh,{icon:SS,showColors:!0}),(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},(0,x.sprintf)((0,x._n)("%d Block","%d Blocks",e.length),e.length)),(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,x.sprintf)((0,x._n)("%d word selected.","%d words selected.",t),t))))}));function _T({blockName:e}){const{preferredStyle:t,onUpdatePreferredStyleVariations:n,styles:o}=(0,d.useSelect)((t=>{var n;const o=t(Nr).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:o?.value?.[e],onUpdatePreferredStyleVariations:null!==(n=o?.onChange)&&void 0!==n?n:null,styles:t(c.store).getBlockStyles(e)}}),[e]),r=(0,u.useMemo)((()=>[{label:(0,x.__)("Not set"),value:""},...o.map((({label:e,name:t})=>({label:e,value:t})))]),[o]),l=(0,u.useMemo)((()=>NS(o)?.name),[o]),i=(0,u.useCallback)((t=>{n(e,t)}),[e,n]);return t&&t!==l?n&&(0,s.createElement)("div",{className:"default-style-picker__default-switcher"},(0,s.createElement)(_l.SelectControl,{__nextHasNoMarginBottom:!0,options:r,value:t||"",label:(0,x.__)("Default Style"),onChange:i})):null}const yT=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})),ET=(0,s.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(Z.Path,{d:"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"})),wT={name:"settings",title:(0,x.__)("Settings"),value:"settings",icon:yT,className:"block-editor-block-inspector__tab-item"},ST={name:"styles",title:(0,x.__)("Styles"),value:"styles",icon:ET,className:"block-editor-block-inspector__tab-item"},CT={name:"list",title:(0,x.__)("List View"),value:"list-view",icon:XC,className:"block-editor-block-inspector__tab-item"},xT=()=>{const e=(0,_l.__experimentalUseSlotFills)(xs.slotName);return Boolean(e&&e.length)?(0,s.createElement)(_l.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,x.__)("Advanced"),initialOpen:!1},(0,s.createElement)(Bs.Slot,{group:"advanced"})):null},BT=()=>{const[e,t]=(0,u.useState)(),{multiSelectedBlocks:n}=(0,d.useSelect)((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:n}=e(Nr);return{multiSelectedBlocks:t(n())}}),[]);return(0,u.useLayoutEffect)((()=>{void 0===e&&t(n.some((({attributes:e})=>!!e?.style?.position?.type)))}),[e,n,t]),(0,s.createElement)(_l.PanelBody,{className:"block-editor-block-inspector__position",title:(0,x.__)("Position"),initialOpen:null!=e&&e},(0,s.createElement)(Bs.Slot,{group:"position"}))},IT=()=>{const e=(0,_l.__experimentalUseSlotFills)(vs.position.Slot.__unstableName);return Boolean(e&&e.length)?(0,s.createElement)(BT,null):null},TT=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),MT="isInspectorControlsTabsHintVisible";function PT(){const e=(0,d.useSelect)((e=>{var t;return null===(t=e(Ws.store).get("core",MT))||void 0===t||t}),[]),t=(0,u.useRef)(),{set:n}=(0,d.useDispatch)(Ws.store);return e?(0,s.createElement)("div",{ref:t,className:"block-editor-inspector-controls-tabs__hint"},(0,s.createElement)("div",{className:"block-editor-inspector-controls-tabs__hint-content"},(0,x.__)("Looking for other block settings? They've moved to the styles tab.")),(0,s.createElement)(_l.Button,{className:"block-editor-inspector-controls-tabs__hint-dismiss",icon:TT,iconSize:"16",label:(0,x.__)("Dismiss hint"),onClick:()=>{const e=As.focus.tabbable.findPrevious(t.current);e?.focus(),n("core",MT,!1)},showTooltip:!1})):null}const RT=({showAdvancedControls:e=!1})=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Bs.Slot,null),(0,s.createElement)(IT,null),e&&(0,s.createElement)("div",null,(0,s.createElement)(xT,null)),(0,s.createElement)(PT,null)),NT=({blockName:e,clientId:t,hasBlockStyles:n})=>{const o=zu({blockName:e});return(0,s.createElement)(s.Fragment,null,n&&(0,s.createElement)("div",null,(0,s.createElement)(_l.PanelBody,{title:(0,x.__)("Styles")},(0,s.createElement)(Ax,{clientId:t}),(0,c.hasBlockSupport)(e,"defaultStylePicker",!0)&&(0,s.createElement)(_T,{blockName:e}))),(0,s.createElement)(Bs.Slot,{group:"color",label:(0,x.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,s.createElement)(Bs.Slot,{group:"background",label:(0,x.__)("Background")}),(0,s.createElement)(Bs.Slot,{group:"filter"}),(0,s.createElement)(Bs.Slot,{group:"typography",label:(0,x.__)("Typography")}),(0,s.createElement)(Bs.Slot,{group:"dimensions",label:(0,x.__)("Dimensions")}),(0,s.createElement)(Bs.Slot,{group:"border",label:o}),(0,s.createElement)(Bs.Slot,{group:"styles"}))},LT=["core/navigation"],AT=e=>!LT.includes(e),{Tabs:OT}=ie(_l.privateApis);function DT({blockName:e,clientId:t,hasBlockStyles:n,tabs:o}){const r=AT(e)?void 0:CT.name;return(0,s.createElement)("div",{className:"block-editor-block-inspector__tabs"},(0,s.createElement)(OT,{initialTabId:r,key:t},(0,s.createElement)(OT.TabList,null,o.map((e=>(0,s.createElement)(OT.Tab,{key:e.name,tabId:e.name,render:(0,s.createElement)(_l.Button,{icon:e.icon,label:e.title,className:e.className})})))),(0,s.createElement)(OT.TabPanel,{tabId:wT.name,focusable:!1},(0,s.createElement)(RT,{showAdvancedControls:!!e})),(0,s.createElement)(OT.TabPanel,{tabId:ST.name,focusable:!1},(0,s.createElement)(NT,{blockName:e,clientId:t,hasBlockStyles:n})),(0,s.createElement)(OT.TabPanel,{tabId:CT.name,focusable:!1},(0,s.createElement)(Bs.Slot,{group:"list"}))))}const zT=[];function VT(e){const t=[],{border:n,color:o,default:r,dimensions:l,list:i,position:s,styles:a,typography:c,effects:u}=vs,p=AT(e),m=(0,_l.__experimentalUseSlotFills)(i.Slot.__unstableName),h=!p&&!!m&&m.length,g=[...(0,_l.__experimentalUseSlotFills)(n.Slot.__unstableName)||[],...(0,_l.__experimentalUseSlotFills)(o.Slot.__unstableName)||[],...(0,_l.__experimentalUseSlotFills)(l.Slot.__unstableName)||[],...(0,_l.__experimentalUseSlotFills)(a.Slot.__unstableName)||[],...(0,_l.__experimentalUseSlotFills)(c.Slot.__unstableName)||[],...(0,_l.__experimentalUseSlotFills)(u.Slot.__unstableName)||[]].length,f=(0,_l.__experimentalUseSlotFills)(xs.slotName)||[],b=[...(0,_l.__experimentalUseSlotFills)(r.Slot.__unstableName)||[],...(0,_l.__experimentalUseSlotFills)(s.Slot.__unstableName)||[],...h&&g>1?f:[]];h&&t.push(CT),b.length&&t.push(wT),g&&t.push(ST);const v=function(e,t={}){return void 0!==t[e]?t[e]:void 0===t.default||t.default}(e,(0,d.useSelect)((e=>e(Nr).getSettings().blockInspectorTabs),[]));return v?t:zT}const{createPrivateSlotFill:FT}=ie(_l.privateApis),{Fill:HT,Slot:GT}=FT("BlockInformation"),UT=e=>y()[h]?(0,s.createElement)(HT,{...e}):null;UT.Slot=e=>(0,s.createElement)(GT,{...e});const $T=UT;function jT({clientIds:e}){return e.length?(0,s.createElement)(_l.__experimentalVStack,{spacing:1},e.map((e=>(0,s.createElement)(WT,{key:e,clientId:e})))):null}function WT({clientId:e}){const{name:t,icon:n,isSelected:o}=(0,d.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o,isBlockSelected:r,hasSelectedInnerBlock:l}=t(Nr),{getBlockType:i}=t(c.store),s=i(n(e)),a=o(e);return{name:s&&(0,c.__experimentalGetBlockLabel)(s,a,"list-view"),icon:s?.icon,isSelected:r(e)||l(e,!0)}}),[e]),{selectBlock:r}=(0,d.useDispatch)(Nr);return(0,s.createElement)(_l.Button,{isPressed:o,onClick:()=>r(e)},(0,s.createElement)(_l.Flex,null,(0,s.createElement)(_l.FlexItem,null,(0,s.createElement)(qh,{icon:n})),(0,s.createElement)(_l.FlexBlock,{style:{textAlign:"left"}},(0,s.createElement)(_l.__experimentalTruncate,null,t))))}function KT({topLevelLockedBlock:e}){const t=(0,d.useSelect)((t=>{const{getClientIdsOfDescendants:n,getBlockName:o,getBlockEditingMode:r}=t(Nr);return n(e).filter((e=>"core/list-item"!==o(e)&&"contentOnly"===r(e)))}),[e]),n=ih(e);return(0,s.createElement)("div",{className:"block-editor-block-inspector"},(0,s.createElement)(P_,{...n,className:n.isSynced&&"is-synced"}),(0,s.createElement)(iB,{blockClientId:e}),(0,s.createElement)($T.Slot,null),t.length>0&&(0,s.createElement)(_l.PanelBody,{title:(0,x.__)("Content")},(0,s.createElement)(jT,{clientIds:t})))}const ZT=({animate:e,wrapper:t,children:n})=>e?t(n):n,qT=({blockInspectorAnimationSettings:e,selectedBlockClientId:t,children:n})=>{const o=e&&"leftToRight"===e.enterDirection?-50:50;return(0,s.createElement)(_l.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:o,opacity:0},key:t},n)},YT=({clientId:e,blockName:t})=>{const n=VT(t),o=n?.length>1,r=(0,d.useSelect)((e=>{const{getBlockStyles:n}=e(c.store),o=n(t);return o&&o.length>0}),[t]),l=ih(e),i=zu({blockName:t});return(0,s.createElement)("div",{className:"block-editor-block-inspector"},(0,s.createElement)(P_,{...l,className:l.isSynced&&"is-synced"}),(0,s.createElement)(iB,{blockClientId:e}),(0,s.createElement)($T.Slot,null),o&&(0,s.createElement)(DT,{hasBlockStyles:r,clientId:e,blockName:t,tabs:n}),!o&&(0,s.createElement)(s.Fragment,null,r&&(0,s.createElement)("div",null,(0,s.createElement)(_l.PanelBody,{title:(0,x.__)("Styles")},(0,s.createElement)(Ax,{clientId:e}),(0,c.hasBlockSupport)(t,"defaultStylePicker",!0)&&(0,s.createElement)(_T,{blockName:t}))),(0,s.createElement)(Bs.Slot,null),(0,s.createElement)(Bs.Slot,{group:"list"}),(0,s.createElement)(Bs.Slot,{group:"color",label:(0,x.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,s.createElement)(Bs.Slot,{group:"typography",label:(0,x.__)("Typography")}),(0,s.createElement)(Bs.Slot,{group:"dimensions",label:(0,x.__)("Dimensions")}),(0,s.createElement)(Bs.Slot,{group:"border",label:i}),(0,s.createElement)(Bs.Slot,{group:"styles"}),(0,s.createElement)(Bs.Slot,{group:"background",label:(0,x.__)("Background")}),(0,s.createElement)(IT,null),(0,s.createElement)("div",null,(0,s.createElement)(xT,null))),(0,s.createElement)(bT,{key:"back"}))},XT=({showNoBlockSelectedMessage:e=!0})=>{const{count:t,selectedBlockName:n,selectedBlockClientId:o,blockType:r,topLevelLockedBlock:l}=(0,d.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o,__unstableGetContentLockingParent:r,getTemplateLock:l}=e(Nr),i=t(),s=i&&o(i),a=s&&(0,c.getBlockType)(s);return{count:n(),selectedBlockClientId:i,selectedBlockName:s,blockType:a,topLevelLockedBlock:r(i)||("contentOnly"===l(i)||"core/block"===s?i:void 0)}}),[]),i=VT(r?.name),a=i?.length>1,u=function(e,t){return(0,d.useSelect)((t=>{if(e){const n=t(Nr).getSettings().blockInspectorAnimation,o=n?.animationParent,{getSelectedBlockClientId:r,getBlockParentsByBlockName:l}=t(Nr);return l(r(),o,!0)[0]||e.name===o?n?.[e.name]:null}return null}),[t,e])}(r,o),p=zu({blockName:n});if(t>1)return(0,s.createElement)("div",{className:"block-editor-block-inspector"},(0,s.createElement)(kT,null),a?(0,s.createElement)(DT,{tabs:i}):(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Bs.Slot,null),(0,s.createElement)(Bs.Slot,{group:"color",label:(0,x.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,s.createElement)(Bs.Slot,{group:"typography",label:(0,x.__)("Typography")}),(0,s.createElement)(Bs.Slot,{group:"dimensions",label:(0,x.__)("Dimensions")}),(0,s.createElement)(Bs.Slot,{group:"border",label:p}),(0,s.createElement)(Bs.Slot,{group:"styles"})));const m=n===(0,c.getUnregisteredTypeHandlerName)();return r&&o&&!m?l?(0,s.createElement)(KT,{topLevelLockedBlock:l}):(0,s.createElement)(ZT,{animate:u,wrapper:e=>(0,s.createElement)(qT,{blockInspectorAnimationSettings:u,selectedBlockClientId:o},e)},(0,s.createElement)(YT,{clientId:o,blockName:r.name})):e?(0,s.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,x.__)("No block selected.")):null},QT=()=>(w()("__unstableUseClipboardHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),ly());function JT(e){return w()("CopyHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),(0,s.createElement)("div",{...e,ref:ly()})}const eM=()=>{};const tM=(0,u.forwardRef)((function({rootClientId:e,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r=!1,__experimentalInsertionIndex:l,__experimentalFilterValue:i,onSelect:a=eM,shouldFocusBlock:c=!1},u){const{destinationRootClientId:p}=(0,d.useSelect)((n=>{const{getBlockRootClientId:o}=n(Nr);return{destinationRootClientId:e||o(t)||void 0}}),[t,e]);return(0,s.createElement)(ew,{onSelect:a,rootClientId:p,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r,__experimentalInsertionIndex:l,__experimentalFilterValue:i,shouldFocusBlock:c,ref:u})}));function nM(){return w()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const oM=-1!==window.navigator.userAgent.indexOf("Trident"),rM=new Set([zs.UP,zs.DOWN,zs.LEFT,zs.RIGHT]),lM=.75;function iM(){const e=(0,d.useSelect)((e=>e(Nr).hasSelectedBlock()),[]);return(0,p.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,l,i;function s(){r||(r=o.requestAnimationFrame((()=>{p(),r=null})))}function a(e){l&&o.cancelAnimationFrame(l),l=o.requestAnimationFrame((()=>{c(e),l=null}))}function c({keyCode:e}){if(!m())return;const r=(0,As.computeCaretRect)(o);if(!r)return;if(!i)return void(i=r);if(rM.has(e))return void(i=r);const l=r.top-i.top;if(0===l)return;const s=(0,As.getScrollContainer)(t);if(!s)return;const a=s===n.body||s===n.documentElement,c=a?o.scrollY:s.scrollTop,u=a?0:s.getBoundingClientRect().top,d=a?i.top/o.innerHeight:(i.top-u)/(o.innerHeight-u);if(0===c&&d<lM&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(i=r);const p=a?o.innerHeight:s.clientHeight;i.top+i.height>u+p||i.top<u?i=r:a?o.scrollBy(0,l):s.scrollTop+=l}function u(){n.addEventListener("selectionchange",d)}function d(){n.removeEventListener("selectionchange",d),p()}function p(){m()&&(i=(0,As.computeCaretRect)(o))}function m(){return t.contains(n.activeElement)&&n.activeElement.isContentEditable}return o.addEventListener("scroll",s,!0),o.addEventListener("resize",s,!0),t.addEventListener("keydown",a),t.addEventListener("keyup",c),t.addEventListener("mousedown",u),t.addEventListener("touchstart",u),()=>{o.removeEventListener("scroll",s,!0),o.removeEventListener("resize",s,!0),t.removeEventListener("keydown",a),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),o.cancelAnimationFrame(r),o.cancelAnimationFrame(l)}}),[e])}const sM=oM?e=>e.children:function({children:e}){return(0,s.createElement)("div",{ref:iM(),className:"block-editor__typewriter"},e)},aM=(0,u.createContext)({});function cM({children:e,uniqueId:t,blockName:n=""}){const o=(0,u.useContext)(aM),{name:r}=y();n=n||r;const l=(0,u.useMemo)((()=>function(e,t,n){const o={...e,[t]:e[t]?new Set(e[t]):new Set};return o[t].add(n),o}(o,n,t)),[o,n,t]);return(0,s.createElement)(aM.Provider,{value:l},e)}function uM(e,t=""){const n=(0,u.useContext)(aM),{name:o}=y();return t=t||o,Boolean(n[t]?.has(e))}const dM=e=>(w()("wp.blockEditor.__experimentalRecursionProvider",{since:"6.5",alternative:"wp.blockEditor.RecursionProvider"}),(0,s.createElement)(cM,{...e})),pM=(...e)=>(w()("wp.blockEditor.__experimentalUseHasRecursion",{since:"6.5",alternative:"wp.blockEditor.useHasRecursion"}),uM(...e)),mM=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));function hM({title:e,help:t,actions:n=[],onClose:o}){return(0,s.createElement)(_l.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4},(0,s.createElement)(_l.__experimentalHStack,{alignment:"center"},(0,s.createElement)(_l.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13},e),(0,s.createElement)(_l.__experimentalSpacer,null),n.map((({label:e,icon:t,onClick:n})=>(0,s.createElement)(_l.Button,{key:e,className:"block-editor-inspector-popover-header__action",label:e,icon:t,variant:!t&&"tertiary",onClick:n},!t&&e))),o&&(0,s.createElement)(_l.Button,{className:"block-editor-inspector-popover-header__action",label:(0,x.__)("Close"),icon:mM,onClick:o})),t&&(0,s.createElement)(_l.__experimentalText,null,t))}const gM=(0,u.forwardRef)((function({onClose:e,onChange:t,...n},o){return(0,s.createElement)("div",{ref:o,className:"block-editor-publish-date-time-picker"},(0,s.createElement)(hM,{title:(0,x.__)("Publish"),actions:[{label:(0,x.__)("Now"),onClick:()=>t?.(null)}],onClose:e}),(0,s.createElement)(_l.DateTimePicker,{startOfWeek:(0,uB.getSettings)().l10n.startOfWeek,onChange:t,...n}))})),fM=window.wp.commands,bM=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M19.75 9c0-1.257-.565-2.197-1.39-2.858-.797-.64-1.827-1.017-2.815-1.247-1.802-.42-3.703-.403-4.383-.396L11 4.5V6l.177-.001c.696-.006 2.416-.02 4.028.356.887.207 1.67.518 2.216.957.52.416.829.945.829 1.688 0 .592-.167.966-.407 1.23-.255.281-.656.508-1.236.674-1.19.34-2.82.346-4.607.346h-.077c-1.692 0-3.527 0-4.942.404-.732.209-1.424.545-1.935 1.108-.526.579-.796 1.33-.796 2.238 0 1.257.565 2.197 1.39 2.858.797.64 1.827 1.017 2.815 1.247 1.802.42 3.703.403 4.383.396L13 19.5h.714V22L18 18.5 13.714 15v3H13l-.177.001c-.696.006-2.416.02-4.028-.356-.887-.207-1.67-.518-2.216-.957-.52-.416-.829-.945-.829-1.688 0-.592.167-.966.407-1.23.255-.281.656-.508 1.237-.674 1.189-.34 2.819-.346 4.606-.346h.077c1.692 0 3.527 0 4.941-.404.732-.209 1.425-.545 1.936-1.108.526-.579.796-1.33.796-2.238z"})),vM=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7zm-5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h1V9H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-1h-1.5v1z"})),kM=(0,s.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(Z.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})),_M=()=>{const{replaceBlocks:e,multiSelect:t}=(0,d.useDispatch)(Nr),{blocks:n,clientIds:o,canRemove:r,possibleBlockTransformations:l}=(0,d.useSelect)((e=>{const{getBlockRootClientId:t,getBlockTransformItems:n,getSelectedBlockClientIds:o,getBlocksByClientId:r,canRemoveBlocks:l}=e(Nr),i=o(),s=r(i),a=t(i[0]);return{blocks:s,clientIds:i,possibleBlockTransformations:n(s,a),canRemove:l(i,a)}}),[]),i=1===n.length&&(0,c.isTemplatePart)(n[0]);function a(r){const l=(0,c.switchToBlockType)(n,r);var i;e(o,l),(i=l).length>1&&t(i[0].clientId,i[i.length-1].clientId)}const u=!!l.length&&r&&!i;if(!o||o.length<1||!u)return{isLoading:!1,commands:[]};return{isLoading:!1,commands:l.map((e=>{const{name:t,title:n,icon:o}=e;return{name:"core/block-editor/transform-to-"+t.replace("/","-"),label:(0,x.sprintf)((0,x.__)("Transform to %s"),n),icon:(0,s.createElement)(qh,{icon:o}),callback:({close:e})=>{a(t),e()}}}))}},yM=()=>{const{clientIds:e}=(0,d.useSelect)((e=>{const{getSelectedBlockClientIds:t}=e(Nr);return{clientIds:t()}}),[]),{getBlockRootClientId:t,canMoveBlocks:n,getBlockCount:o}=(0,d.useSelect)(Nr),{setBlockMovingClientId:r,setNavigationMode:l,selectBlock:i}=(0,d.useDispatch)(Nr);if(!e||e.length<1)return{isLoading:!1,commands:[]};const s=t(e[0]),a=[];return n(e,s)&&1!==o(s)&&a.push({name:"move-to",label:(0,x.__)("Move to"),callback:()=>{l(!0),i(e[0]),r(e[0])},icon:bM}),{isLoading:!1,commands:a.map((e=>({...e,name:"core/block-editor/action-"+e.name,callback:({close:t})=>{e.callback(),t()}})))}},EM=()=>{const{clientIds:e,isUngroupable:t,isGroupable:n}=(0,d.useSelect)((e=>{const{getSelectedBlockClientIds:t,isUngroupable:n,isGroupable:o}=e(Nr);return{clientIds:t(),isUngroupable:n(),isGroupable:o()}}),[]),{canInsertBlockType:o,getBlockRootClientId:r,getBlocksByClientId:l,canRemoveBlocks:i}=(0,d.useSelect)(Nr),{getDefaultBlockName:s,getGroupingBlockName:a}=(0,d.useSelect)(c.store),u=l(e),{removeBlocks:p,replaceBlocks:m,duplicateBlocks:h,insertAfterBlock:g,insertBeforeBlock:f}=(0,d.useDispatch)(Nr),b=()=>{if(!u.length)return;const t=a(),n=(0,c.switchToBlockType)(u,t);n&&m(e,n)},v=()=>{if(!u.length)return;const t=u[0].innerBlocks;t.length&&m(e,t)};if(!e||e.length<1)return{isLoading:!1,commands:[]};const k=r(e[0]),_=o(s(),k),y=u.every((e=>!!e&&(0,c.hasBlockSupport)(e.name,"multiple",!0)&&o(e.name,k))),E=i(e,k),w=[];return y&&w.push({name:"duplicate",label:(0,x.__)("Duplicate"),callback:()=>h(e,!0),icon:SS}),_&&w.push({name:"add-before",label:(0,x.__)("Add before"),callback:()=>{const t=Array.isArray(e)?e[0]:t;f(t)},icon:na},{name:"add-after",label:(0,x.__)("Add after"),callback:()=>{const t=Array.isArray(e)?e[e.length-1]:t;g(t)},icon:na}),n&&w.push({name:"Group",label:(0,x.__)("Group"),callback:b,icon:wC}),t&&w.push({name:"ungroup",label:(0,x.__)("Ungroup"),callback:v,icon:vM}),E&&w.push({name:"remove",label:(0,x.__)("Delete"),callback:()=>p(e,!0),icon:kM}),{isLoading:!1,commands:w.map((e=>({...e,name:"core/block-editor/action-"+e.name,callback:({close:t})=>{e.callback(),t()}})))}},wM=()=>{(0,fM.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:_M}),(0,fM.useCommandLoader)({name:"core/block-editor/blockActions",hook:yM}),(0,fM.useCommandLoader)({name:"core/block-editor/blockQuickActions",hook:EM,context:"block-selection-edit"})},SM="isResuableBlocksrRenameHintVisible";function CM(){const e=(0,d.useSelect)((e=>{var t;return null===(t=e(Ws.store).get("core",SM))||void 0===t||t}),[]),t=(0,u.useRef)(),{set:n}=(0,d.useDispatch)(Ws.store);return e?(0,s.createElement)("div",{ref:t,className:"reusable-blocks-menu-items__rename-hint"},(0,s.createElement)("div",{className:"reusable-blocks-menu-items__rename-hint-content"},(0,x.__)("Reusable blocks are now synced patterns. A synced pattern will behave in exactly the same way as a reusable block.")),(0,s.createElement)(_l.Button,{className:"reusable-blocks-menu-items__rename-hint-dismiss",icon:TT,iconSize:"16",label:(0,x.__)("Dismiss hint"),onClick:()=>{const e=As.focus.tabbable.findPrevious(t.current);e?.focus(),n("core",SM,!1)},showTooltip:!1})):null}const xM={button:"wp-element-button",caption:"wp-element-caption"},BM=e=>xM[e]?xM[e]:"",IM=()=>"",TM={__experimentalBorder:"border",color:"color",spacing:"spacing",typography:"typography"};function MM(e){const t="var:";if(e?.startsWith?.(t)){return`var(--wp--${e.slice(4).split("|").join("--")})`}return e}function PM(e={},t,n){const{kebabCase:o}=ie(_l.privateApis);let r=[];return Object.keys(e).forEach((l=>{const i=t+o(l.replace("/","-")),s=e[l];if(s instanceof Object){const e=i+n;r=[...r,...PM(s,e,n)]}else r.push(`${i}: ${s}`)})),r}const RM=(e,t)=>{const n={};return Object.entries(e).forEach((([e,o])=>{if("root"===e||!t?.[e])return;const r="string"==typeof o;if(r||Object.entries(o).forEach((([o,r])=>{if("root"===o||!t?.[e][o])return;const l=NM({[e]:{[o]:t[e][o]}});n[r]=[...n[r]||[],...l],delete t[e][o]})),r||o.root){const l=r?o:o.root,i=NM({[e]:t[e]});n[l]=[...n[l]||[],...i],delete t[e]}})),n};function NM(e={},t="",n,o={},r=!0){const{kebabCase:l}=ie(_l.privateApis),i=qr===t,s=Object.entries(c.__EXPERIMENTAL_STYLE_PROPERTY).reduce(((t,[o,{value:r,properties:s,useEngine:a,rootOnly:c}])=>{if(c&&!i)return t;const u=r;if("elements"===u[0]||a)return t;const d=Wn(e,u);if("--wp--style--root--padding"===o&&("string"==typeof d||!n))return t;if(s&&"string"!=typeof d)Object.entries(s).forEach((e=>{const[n,o]=e;if(!Wn(d,[o],!1))return;const r=n.startsWith("--")?n:l(n);t.push(`${r}: ${MM(Wn(d,[o]))}`)}));else if(Wn(e,u,!1)){const n=o.startsWith("--")?o:l(o);t.push(`${n}: ${MM(Wn(e,u))}`)}return t}),[]);return(0,Ri.getCSSRules)(e).forEach((e=>{if(i&&(n||!r)&&e.key.startsWith("padding"))return;const t=e.key.startsWith("--")?e.key:l(e.key);let a=e.value;if("string"!=typeof a&&a?.ref){const e=a.ref.split(".");if(a=Wn(o,e),!a||a?.ref)return}"font-size"===t&&(a=Wr({size:a},Zr(o?.settings))),"aspect-ratio"===t&&s.push("min-height: unset"),s.push(`${t}: ${a}`)})),s}function LM({layoutDefinitions:e=Al,style:t,selector:n,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:l}){let i="",s=o?oi(t?.spacing?.blockGap):"";if(r&&(n===qr?s=s||"0.5em":!o&&l&&(s=l)),s&&e&&(Object.values(e).forEach((({className:e,name:t,spacingStyles:r})=>{(o||"flex"===t||"grid"===t)&&r?.length&&r.forEach((t=>{const r=[];if(t.rules&&Object.entries(t.rules).forEach((([e,t])=>{r.push(`${e}: ${t||s}`)})),r.length){let l="";l=o?n===qr?`:where(${n} .${e})${t?.selector||""}`:`${n}-${e}${t?.selector||""}`:n===qr?`:where(.${e}${t?.selector||""})`:`:where(${n}.${e}${t?.selector||""})`,i+=`${l} { ${r.join("; ")}; }`}}))})),n===qr&&o&&(i+=`${n} { --wp--style--block-gap: ${s}; }`)),n===qr&&e){const t=["block","flex","grid"];Object.values(e).forEach((({className:e,displayMode:o,baseStyles:r})=>{o&&t.includes(o)&&(i+=`${n} .${e} { display:${o}; }`),r?.length&&r.forEach((t=>{const o=[];if(t.rules&&Object.entries(t.rules).forEach((([e,t])=>{o.push(`${e}: ${t}`)})),o.length){i+=`${`${n} .${e}${t?.selector||""}`} { ${o.join("; ")}; }`}}))}))}return i}const AM=["border","color","dimensions","spacing","typography","filter","outline","shadow"];function OM(e){if(!e)return{};const t=Object.entries(e).filter((([e])=>AM.includes(e))).map((([e,t])=>[e,JSON.parse(JSON.stringify(t))]));return Object.fromEntries(t)}const DM=(e,t)=>{var n;const o=[];if(!e?.settings)return o;const r=e=>{let t={};return Yr.forEach((({path:n})=>{const o=Wn(e,n,!1);!1!==o&&(t=jn(t,n,o))})),t},l=r(e.settings),i=e.settings?.custom;return(Object.keys(l).length>0||i)&&o.push({presets:l,custom:i,selector:qr}),Object.entries(null!==(n=e.settings?.blocks)&&void 0!==n?n:{}).forEach((([e,n])=>{const l=r(n),i=n.custom;(Object.keys(l).length>0||i)&&o.push({presets:l,custom:i,selector:t[e]?.selector})})),o},zM=(e,t)=>{const n=DM(e,t);let o="";return n.forEach((({presets:t,custom:n,selector:r})=>{const l=function(e={},t){const{kebabCase:n}=ie(_l.privateApis);return Yr.reduce(((o,{path:r,valueKey:l,valueFunc:i,cssVarInfix:s})=>{const a=Wn(e,r,[]);return["default","theme","custom"].forEach((e=>{a[e]&&a[e].forEach((e=>{l&&!i?o.push(`--wp--preset--${s}--${n(e.slug)}: ${e[l]}`):i&&"function"==typeof i&&o.push(`--wp--preset--${s}--${n(e.slug)}: ${i(e,t)}`)}))})),o}),[])}(t,e?.settings),i=PM(n,"--wp--custom--","--");i.length>0&&l.push(...i),l.length>0&&(o+=`${r}{${l.join(";")};}`)})),o},VM=(e,t,n,o,r=!1,l=!0)=>{const i=((e,t)=>{var n;const o=[];if(!e?.styles)return o;const r=OM(e.styles);return r&&o.push({styles:r,selector:qr}),Object.entries(c.__EXPERIMENTAL_ELEMENTS).forEach((([t,n])=>{e.styles?.elements?.[t]&&o.push({styles:e.styles?.elements?.[t],selector:n})})),Object.entries(null!==(n=e.styles?.blocks)&&void 0!==n?n:{}).forEach((([e,n])=>{var r;const l=OM(n);if(n?.variations){const e={};Object.keys(n.variations).forEach((t=>{e[t]=OM(n.variations[t])})),l.variations=e}l&&t?.[e]?.selector&&o.push({duotoneSelector:t[e].duotoneSelector,fallbackGapValue:t[e].fallbackGapValue,hasLayoutSupport:t[e].hasLayoutSupport,selector:t[e].selector,styles:l,featureSelectors:t[e].featureSelectors,styleVariationSelectors:t[e].styleVariationSelectors}),Object.entries(null!==(r=n?.elements)&&void 0!==r?r:{}).forEach((([n,r])=>{r&&t?.[e]&&c.__EXPERIMENTAL_ELEMENTS[n]&&o.push({styles:r,selector:t[e]?.selector.split(",").map((e=>c.__EXPERIMENTAL_ELEMENTS[n].split(",").map((t=>e+" "+t)))).join(",")})}))})),o})(e,t),s=DM(e,t),a=e?.settings?.useRootPaddingAwareAlignments,{contentSize:u,wideSize:d}=e?.settings?.layout||{};let p="body {margin: 0;";if(u&&(p+=` --wp--style--global--content-size: ${u};`),d&&(p+=` --wp--style--global--wide-size: ${d};`),a&&l&&(p+="padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }\n\t\t\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding:not(.wp-block-block)) { padding-right: 0; padding-left: 0; }\n\t\t\t.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }\n\t\t\t.has-global-padding :where(.has-global-padding:not(.wp-block-block)) > .alignfull { margin-right: 0; margin-left: 0; }\n\t\t\t.has-global-padding > .alignfull:where(:not(.has-global-padding):not(.is-layout-flex):not(.is-layout-grid)) > :where(.wp-block:not(.alignfull),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where(.wp-block:not(.alignfull),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0;"),p+="}",i.forEach((({selector:t,duotoneSelector:i,styles:s,fallbackGapValue:c,hasLayoutSupport:u,featureSelectors:d,styleVariationSelectors:m})=>{if(d){const e=RM(d,s);Object.entries(e).forEach((([e,t])=>{if(t.length){const n=t.join(";");p+=`${e}{${n};}`}}))}if(m&&Object.entries(m).forEach((([t,n])=>{const o=s?.variations?.[t];if(o){if(d){const e=RM(d,o);Object.entries(e).forEach((([e,t])=>{if(t.length){const o=function(e,t){const n=e.split(","),o=[];return n.forEach((e=>{o.push(`${t.trim()}${e.trim()}`)})),o.join(", ")}(e,n),r=t.join(";");p+=`${o}{${r};}`}}))}const t=NM(o,n,a,e);t.length&&(p+=`${n}{${t.join(";")};}`)}})),i){const e={};s?.filter&&(e.filter=s.filter,delete s.filter);const t=NM(e);t.length&&(p+=`${i}{${t.join(";")};}`)}r||qr!==t&&!u||(p+=LM({style:s,selector:t,hasBlockGapSupport:n,hasFallbackGapSupport:o,fallbackGapValue:c}));const h=NM(s,t,a,e,l);h?.length&&(p+=`${t}{${h.join(";")};}`);const g=Object.entries(s).filter((([e])=>e.startsWith(":")));g?.length&&g.forEach((([e,n])=>{const o=NM(n);if(!o?.length)return;const r=`${t.split(",").map((t=>t+e)).join(",")}{${o.join(";")};}`;p+=r}))})),p+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",p+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",p+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }",n){const t=oi(e?.styles?.spacing?.blockGap)||"0.5em";p+=`:where(.wp-site-blocks) > * { margin-block-start: ${t}; margin-block-end: 0; }`,p+=":where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }",p+=":where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }"}return s.forEach((({selector:e,presets:t})=>{qr===e&&(e="");const n=function(e="*",t={}){const{kebabCase:n}=ie(_l.privateApis);return Yr.reduce(((o,{path:r,cssVarInfix:l,classes:i})=>{if(!i)return o;const s=Wn(t,r,[]);return["default","theme","custom"].forEach((t=>{s[t]&&s[t].forEach((({slug:t})=>{i.forEach((({classSuffix:r,propertyName:i})=>{const s=`.has-${n(t)}-${r}`,a=e.split(",").map((e=>`${e}${s}`)).join(","),c=`var(--wp--preset--${l}--${n(t)})`;o+=`${a}{${i}: ${c} !important;}`}))}))})),o}),"")}(e,t);n.length>0&&(p+=n)})),p};function FM(e,t){return DM(e,t).flatMap((({presets:e})=>function(e={}){return Yr.filter((e=>"duotone"===e.path.at(-1))).flatMap((t=>{const n=Wn(e,t.path,{});return["default","theme"].filter((e=>n[e])).flatMap((e=>n[e].map((e=>Um(`wp-duotone-${e.slug}`,e.colors))))).join("")}))}(e)))}const HM=(e,t)=>{const n={};return e.forEach((e=>{const o=e.name,r=$m(e);let l=$m(e,"filter.duotone");if(!l){const t=$m(e),n=(0,c.getBlockSupport)(e,"color.__experimentalDuotone",!1);l=n&&tl(t,n)}const i=!!e?.supports?.layout||!!e?.supports?.__experimentalLayout,s=e?.supports?.spacing?.blockGap?.__experimentalDefault,a=t(o),u={};a?.length&&a.forEach((e=>{const t=function(e,t){const n=`.is-style-${e}`;if(!t)return n;const o=/((?::\([^)]+\))?\s*)([^\s:]+)/,r=(e,t,o)=>t+o+n;return t.split(",").map((e=>e.replace(o,r))).join(",")}(e.name,r);u[e.name]=t}));const d=((e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;const n={root:t};return Object.entries(TM).forEach((([t,o])=>{const r=$m(e,t);r&&(n[o]=r)})),n})(e,r);n[o]={duotoneSelector:l,fallbackGapValue:s,featureSelectors:Object.keys(d).length?d:void 0,hasLayoutSupport:i,name:o,selector:r,styleVariationSelectors:Object.keys(u).length?u:void 0}})),n};function GM(e,t){let n="";return e.split("&").forEach((e=>{if(!e.includes("{"))n+=`${t}{${e.trim()}}`;else{const o=e.replace("}","").split("{");if(2!==o.length)return;const[r,l]=o,i=r.startsWith(" ")?tl(t,r):function(e,t){return e.includes(",")?e.split(",").map((e=>e+t)).join(","):e+t}(t,r);n+=`${i}{${l.trim()}}`}})),n}function UM(e={}){const[t]=sl("spacing.blockGap"),n=null!==t,o=!n,r=(0,d.useSelect)((e=>{const{getSettings:t}=e(Nr);return!!t().disableLayoutStyles})),l=(0,u.useContext)(bf),i=void 0!==l?.templateSlug,{getBlockStyles:s}=(0,d.useSelect)(c.store);return(0,u.useMemo)((()=>{var t;if(!e?.styles||!e?.settings)return[];const l=(a=e,a.styles?.blocks?.["core/separator"]&&a.styles?.blocks?.["core/separator"].color?.background&&!a.styles?.blocks?.["core/separator"].color?.text&&!a.styles?.blocks?.["core/separator"].border?.color?{...a,styles:{...a.styles,blocks:{...a.styles.blocks,"core/separator":{...a.styles.blocks["core/separator"],color:{...a.styles.blocks["core/separator"].color,text:a.styles?.blocks["core/separator"].color.background}}}}}:a);var a;const u=HM((0,c.getBlockTypes)(),s),d=zM(l,u),p=VM(l,u,n,o,r,i),m=FM(l,u),h=[{css:d,isGlobalStyles:!0},{css:p,isGlobalStyles:!0},{css:null!==(t=l.styles.css)&&void 0!==t?t:"",isGlobalStyles:!0},{assets:m,__unstableType:"svg",isGlobalStyles:!0}];return(0,c.getBlockTypes)().forEach((e=>{if(l.styles.blocks[e.name]?.css){const t=u[e.name].selector;h.push({css:GM(l.styles.blocks[e.name]?.css,t),isGlobalStyles:!0})}})),[h,l.settings]}),[n,o,e,r,i,s])}function $M(){const{merged:e}=(0,u.useContext)(ol);return UM(e)}function jM(e,t,n){return"core/image"===e&&n?.lightbox?.allowEditing||!!t?.lightbox}function WM({onChange:e,value:t,inheritedValue:n,panelId:o}){const r=()=>{e(void 0)};let l=!1;return n?.lightbox?.enabled&&(l=n.lightbox.enabled),(0,s.createElement)(s.Fragment,null,(0,s.createElement)(_l.__experimentalToolsPanel,{label:(0,x._x)("Settings","Image settings"),resetAll:r,panelId:o,dropdownMenuProps:Qr},(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,x.__)("Expand on click"),onDeselect:r,isShownByDefault:!0,panelId:o},(0,s.createElement)(_l.ToggleControl,{label:(0,x.__)("Expand on click"),checked:l,onChange:t=>{e({enabled:t})}}))))}function KM({value:e,onChange:t,inheritedValue:n=e}){const[o,r]=(0,u.useState)(null),l=n?.css;return(0,s.createElement)(_l.__experimentalVStack,{spacing:3},o&&(0,s.createElement)(_l.Notice,{status:"error",onRemove:()=>r(null)},o),(0,s.createElement)(_l.TextareaControl,{label:(0,x.__)("Additional CSS"),__nextHasNoMarginBottom:!0,value:l,onChange:n=>function(n){if(t({...e,css:n}),o){const[e]=yy([{css:n}],".editor-styles-wrapper");e&&r(null)}}(n),onBlur:function(e){if(!e?.target?.value)return void r(null);const[t]=yy([{css:e.target.value}],".editor-styles-wrapper");r(null===t?(0,x.__)("There is an error with your CSS structure."):null)},className:"block-editor-global-styles-advanced-panel__custom-css-input",spellCheck:!1}))}const ZM=new Map,qM=[],YM={caption:(0,x.__)("Caption"),link:(0,x.__)("Link"),button:(0,x.__)("Button"),heading:(0,x.__)("Heading"),h1:(0,x.__)("H1"),h2:(0,x.__)("H2"),h3:(0,x.__)("H3"),h4:(0,x.__)("H4"),h5:(0,x.__)("H5"),h6:(0,x.__)("H6"),"settings.color":(0,x.__)("Color"),"settings.typography":(0,x.__)("Typography"),"styles.color":(0,x.__)("Colors"),"styles.spacing":(0,x.__)("Spacing"),"styles.typography":(0,x.__)("Typography")},XM=function(e,t){var n,o,r=0;function l(){var l,i,s=n,a=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(i=0;i<a;i++)if(s.args[i]!==arguments[i]){s=s.next;continue e}return s!==n&&(s===o&&(o=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=n,s.prev=null,n.prev=s,n=s),s.val}s=s.next}for(l=new Array(a),i=0;i<a;i++)l[i]=arguments[i];return s={args:l,val:e.apply(null,l)},n?(n.prev=s,s.next=n):o=s,r===t.maxSize?(o=o.prev).next=null:r++,n=s,s.val}return t=t||{},l.clear=function(){n=null,o=null,r=0},l}((()=>(0,c.getBlockTypes)().reduce(((e,{name:t,title:n})=>(e[t]=n,e)),{}))),QM=e=>null!==e&&"object"==typeof e;function JM(e,t,n=""){if(!QM(e)&&!QM(t))return e!==t?n.split(".").slice(0,2).join("."):void 0;e=QM(e)?e:{},t=QM(t)?t:{};const o=new Set([...Object.keys(e),...Object.keys(t)]);let r=[];for(const l of o){const o=n?n+"."+l:l,i=JM(e[l],t[l],o);i&&(r=r.concat(i))}return r}function eP(e,t){const n=JSON.stringify({next:e,previous:t});if(ZM.has(n))return ZM.get(n);const o=JM({styles:{color:e?.styles?.color,typography:e?.styles?.typography,spacing:e?.styles?.spacing},blocks:e?.styles?.blocks,elements:e?.styles?.elements,settings:e?.settings},{styles:{color:t?.styles?.color,typography:t?.styles?.typography,spacing:t?.styles?.spacing},blocks:t?.styles?.blocks,elements:t?.styles?.elements,settings:t?.settings});if(!o.length)return ZM.set(n,qM),qM;const r=[...new Set(o)].reduce(((e,t)=>{const n=function(e){if(YM[e])return YM[e];const t=e.split(".");if("blocks"===t?.[0]){const e=XM()?.[t[1]];return e||t[1]}return"elements"===t?.[0]?YM[t[1]]||t[1]:void 0}(t);return n&&e.push([t.split(".")[0],n]),e}),[]);return ZM.set(n,r),r}function tP(e,t,n={}){let o=eP(e,t);const r=o.length,{maxResults:l}=n;return r?(l&&r>l&&(o=o.slice(0,l)),Object.entries(o.reduce(((e,t)=>{const n=e[t[0]]||[];return n.includes(t[1])||(e[t[0]]=[...n,t[1]]),e}),{})).map((([e,t])=>{const n=t.length,o=t.join((0,x.__)(", "));switch(e){case"blocks":return(0,x.sprintf)((0,x._n)("%s block.","%s blocks.",n),o);case"elements":return(0,x.sprintf)((0,x._n)("%s element.","%s elements.",n),o);case"settings":return(0,x.sprintf)((0,x.__)("%s settings."),o);case"styles":return(0,x.sprintf)((0,x.__)("%s styles."),o);default:return(0,x.sprintf)((0,x.__)("%s."),o)}}))):qM}function nP(e,t,n){if(null==e||!1===e)return;if(Array.isArray(e))return oP(e,t,n);switch(typeof e){case"string":case"number":return}const{type:o,props:r}=e;switch(o){case u.StrictMode:case u.Fragment:return oP(r.children,t,n);case u.RawHTML:return;case Gw.Content:return rP(t,n);case VI:return void t.push(r.value)}switch(typeof o){case"string":return void 0!==r.children?oP(r.children,t,n):void 0;case"function":return nP(o.prototype&&"function"==typeof o.prototype.render?new o(r).render():o(r),t,n)}}function oP(e,...t){e=Array.isArray(e)?e:[e];for(let n=0;n<e.length;n++)nP(e[n],...t)}function rP(e,t){for(let n=0;n<t.length;n++){const{name:o,attributes:r,innerBlocks:l}=t[n];nP((0,c.getSaveElement)(o,r,(0,s.createElement)(Gw.Content,null)),e,l)}}const lP=[{value:"fill",label:(0,x._x)("Fill","Scale option for dimensions control"),help:(0,x.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,x._x)("Contain","Scale option for dimensions control"),help:(0,x.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,x._x)("Cover","Scale option for dimensions control"),help:(0,x.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,x._x)("None","Scale option for dimensions control"),help:(0,x.__)("Do not adjust the sizing of the content. Content that is too large will be clipped, and content that is too small will have additional padding.")},{value:"scale-down",label:(0,x._x)("Scale down","Scale option for dimensions control"),help:(0,x.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function iP({panelId:e,value:t,onChange:n,options:o=lP,defaultValue:r=lP[0].value,isShownByDefault:l=!0}){const i=null!=t?t:"fill",a=(0,u.useMemo)((()=>o.reduce(((e,t)=>(e[t.value]=t.help,e)),{})),[o]);return(0,s.createElement)(_l.__experimentalToolsPanelItem,{label:(0,x.__)("Scale"),isShownByDefault:l,hasValue:()=>i!==r,onDeselect:()=>n(r),panelId:e},(0,s.createElement)(_l.__experimentalToggleGroupControl,{label:(0,x.__)("Scale"),isBlock:!0,help:a[i],value:i,onChange:n,size:"__unstable-large"},o.map((e=>(0,s.createElement)(_l.__experimentalToggleGroupControlOption,{key:e.value,...e})))))}function sP(){return sP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},sP.apply(this,arguments)}function aP(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var cP=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,uP=aP((function(e){return cP.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));var dP=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),pP=Math.abs,mP=String.fromCharCode,hP=Object.assign;function gP(e){return e.trim()}function fP(e,t,n){return e.replace(t,n)}function bP(e,t){return e.indexOf(t)}function vP(e,t){return 0|e.charCodeAt(t)}function kP(e,t,n){return e.slice(t,n)}function _P(e){return e.length}function yP(e){return e.length}function EP(e,t){return t.push(e),e}var wP=1,SP=1,CP=0,xP=0,BP=0,IP="";function TP(e,t,n,o,r,l,i){return{value:e,root:t,parent:n,type:o,props:r,children:l,line:wP,column:SP,length:i,return:""}}function MP(e,t){return hP(TP("",null,null,"",null,null,0),e,{length:-e.length},t)}function PP(){return BP=xP>0?vP(IP,--xP):0,SP--,10===BP&&(SP=1,wP--),BP}function RP(){return BP=xP<CP?vP(IP,xP++):0,SP++,10===BP&&(SP=1,wP++),BP}function NP(){return vP(IP,xP)}function LP(){return xP}function AP(e,t){return kP(IP,e,t)}function OP(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function DP(e){return wP=SP=1,CP=_P(IP=e),xP=0,[]}function zP(e){return IP="",e}function VP(e){return gP(AP(xP-1,GP(91===e?e+2:40===e?e+1:e)))}function FP(e){for(;(BP=NP())&&BP<33;)RP();return OP(e)>2||OP(BP)>3?"":" "}function HP(e,t){for(;--t&&RP()&&!(BP<48||BP>102||BP>57&&BP<65||BP>70&&BP<97););return AP(e,LP()+(t<6&&32==NP()&&32==RP()))}function GP(e){for(;RP();)switch(BP){case e:return xP;case 34:case 39:34!==e&&39!==e&&GP(BP);break;case 40:41===e&&GP(e);break;case 92:RP()}return xP}function UP(e,t){for(;RP()&&e+BP!==57&&(e+BP!==84||47!==NP()););return"/*"+AP(t,xP-1)+"*"+mP(47===e?e:RP())}function $P(e){for(;!OP(NP());)RP();return AP(e,xP)}var jP="-ms-",WP="-moz-",KP="-webkit-",ZP="comm",qP="rule",YP="decl",XP="@keyframes";function QP(e,t){for(var n="",o=yP(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function JP(e,t,n,o){switch(e.type){case"@import":case YP:return e.return=e.return||e.value;case ZP:return"";case XP:return e.return=e.value+"{"+QP(e.children,o)+"}";case qP:e.value=e.props.join(",")}return _P(n=QP(e.children,o))?e.return=e.value+"{"+n+"}":""}function eR(e){return zP(tR("",null,null,null,[""],e=DP(e),0,[0],e))}function tR(e,t,n,o,r,l,i,s,a){for(var c=0,u=0,d=i,p=0,m=0,h=0,g=1,f=1,b=1,v=0,k="",_=r,y=l,E=o,w=k;f;)switch(h=v,v=RP()){case 40:if(108!=h&&58==vP(w,d-1)){-1!=bP(w+=fP(VP(v),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:w+=VP(v);break;case 9:case 10:case 13:case 32:w+=FP(h);break;case 92:w+=HP(LP()-1,7);continue;case 47:switch(NP()){case 42:case 47:EP(oR(UP(RP(),LP()),t,n),a);break;default:w+="/"}break;case 123*g:s[c++]=_P(w)*b;case 125*g:case 59:case 0:switch(v){case 0:case 125:f=0;case 59+u:m>0&&_P(w)-d&&EP(m>32?rR(w+";",o,n,d-1):rR(fP(w," ","")+";",o,n,d-2),a);break;case 59:w+=";";default:if(EP(E=nR(w,t,n,c,u,r,s,k,_=[],y=[],d),l),123===v)if(0===u)tR(w,t,E,E,_,l,d,s,y);else switch(99===p&&110===vP(w,3)?100:p){case 100:case 109:case 115:tR(e,E,E,o&&EP(nR(e,E,E,0,0,r,s,k,r,_=[],d),y),r,y,d,s,o?_:y);break;default:tR(w,E,E,E,[""],y,0,s,y)}}c=u=m=0,g=b=1,k=w="",d=i;break;case 58:d=1+_P(w),m=h;default:if(g<1)if(123==v)--g;else if(125==v&&0==g++&&125==PP())continue;switch(w+=mP(v),v*g){case 38:b=u>0?1:(w+="\f",-1);break;case 44:s[c++]=(_P(w)-1)*b,b=1;break;case 64:45===NP()&&(w+=VP(RP())),p=NP(),u=d=_P(k=w+=$P(LP())),v++;break;case 45:45===h&&2==_P(w)&&(g=0)}}return l}function nR(e,t,n,o,r,l,i,s,a,c,u){for(var d=r-1,p=0===r?l:[""],m=yP(p),h=0,g=0,f=0;h<o;++h)for(var b=0,v=kP(e,d+1,d=pP(g=i[h])),k=e;b<m;++b)(k=gP(g>0?p[b]+" "+v:fP(v,/&\f/g,p[b])))&&(a[f++]=k);return TP(e,t,n,0===r?qP:s,a,c,u)}function oR(e,t,n){return TP(e,t,n,ZP,mP(BP),kP(e,2,-2),0)}function rR(e,t,n,o){return TP(e,t,n,YP,kP(e,0,o),kP(e,o+1,-1),o)}var lR=function(e,t,n){for(var o=0,r=0;o=r,r=NP(),38===o&&12===r&&(t[n]=1),!OP(r);)RP();return AP(e,xP)},iR=function(e,t){return zP(function(e,t){var n=-1,o=44;do{switch(OP(o)){case 0:38===o&&12===NP()&&(t[n]=1),e[n]+=lR(xP-1,t,n);break;case 2:e[n]+=VP(o);break;case 4:if(44===o){e[++n]=58===NP()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=mP(o)}}while(o=RP());return e}(DP(e),t))},sR=new WeakMap,aR=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||sR.get(n))&&!o){sR.set(e,!0);for(var r=[],l=iR(t,r),i=n.props,s=0,a=0;s<l.length;s++)for(var c=0;c<i.length;c++,a++)e.props[a]=r[s]?l[s].replace(/&\f/g,i[c]):i[c]+" "+l[s]}}},cR=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function uR(e,t){switch(function(e,t){return 45^vP(e,0)?(((t<<2^vP(e,0))<<2^vP(e,1))<<2^vP(e,2))<<2^vP(e,3):0}(e,t)){case 5103:return KP+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return KP+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return KP+e+WP+e+jP+e+e;case 6828:case 4268:return KP+e+jP+e+e;case 6165:return KP+e+jP+"flex-"+e+e;case 5187:return KP+e+fP(e,/(\w+).+(:[^]+)/,KP+"box-$1$2"+jP+"flex-$1$2")+e;case 5443:return KP+e+jP+"flex-item-"+fP(e,/flex-|-self/,"")+e;case 4675:return KP+e+jP+"flex-line-pack"+fP(e,/align-content|flex-|-self/,"")+e;case 5548:return KP+e+jP+fP(e,"shrink","negative")+e;case 5292:return KP+e+jP+fP(e,"basis","preferred-size")+e;case 6060:return KP+"box-"+fP(e,"-grow","")+KP+e+jP+fP(e,"grow","positive")+e;case 4554:return KP+fP(e,/([^-])(transform)/g,"$1"+KP+"$2")+e;case 6187:return fP(fP(fP(e,/(zoom-|grab)/,KP+"$1"),/(image-set)/,KP+"$1"),e,"")+e;case 5495:case 3959:return fP(e,/(image-set\([^]*)/,KP+"$1$`$1");case 4968:return fP(fP(e,/(.+:)(flex-)?(.*)/,KP+"box-pack:$3"+jP+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+KP+e+e;case 4095:case 3583:case 4068:case 2532:return fP(e,/(.+)-inline(.+)/,KP+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(_P(e)-1-t>6)switch(vP(e,t+1)){case 109:if(45!==vP(e,t+4))break;case 102:return fP(e,/(.+:)(.+)-([^]+)/,"$1"+KP+"$2-$3$1"+WP+(108==vP(e,t+3)?"$3":"$2-$3"))+e;case 115:return~bP(e,"stretch")?uR(fP(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==vP(e,t+1))break;case 6444:switch(vP(e,_P(e)-3-(~bP(e,"!important")&&10))){case 107:return fP(e,":",":"+KP)+e;case 101:return fP(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+KP+(45===vP(e,14)?"inline-":"")+"box$3$1"+KP+"$2$3$1"+jP+"$2box$3")+e}break;case 5936:switch(vP(e,t+11)){case 114:return KP+e+jP+fP(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return KP+e+jP+fP(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return KP+e+jP+fP(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return KP+e+jP+e+e}return e}var dR=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case YP:e.return=uR(e.value,e.length);break;case XP:return QP([MP(e,{value:fP(e.value,"@","@"+KP)})],o);case qP:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return QP([MP(e,{props:[fP(t,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return QP([MP(e,{props:[fP(t,/:(plac\w+)/,":"+KP+"input-$1")]}),MP(e,{props:[fP(t,/:(plac\w+)/,":-moz-$1")]}),MP(e,{props:[fP(t,/:(plac\w+)/,jP+"input-$1")]})],o)}return""}))}}];const pR=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o=e.stylisPlugins||dR;var r,l,i={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)i[t[n]]=!0;s.push(e)}));var a,c,u,d,p=[JP,(d=function(e){a.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],m=(c=[aR,cR].concat(o,p),u=yP(c),function(e,t,n,o){for(var r="",l=0;l<u;l++)r+=c[l](e,t,n,o)||"";return r});l=function(e,t,n,o){a=n,function(e){QP(eR(e),m)}(e?e+"{"+t.styles+"}":t.styles),o&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new dP({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:l};return h.sheet.hydrate(s),h};const mR=function(e){for(var t,n=0,o=0,r=e.length;r>=4;++o,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(o)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};const hR={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function gR(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var fR=/[A-Z]|^ms/g,bR=/_EMO_([^_]+?)_([^]*?)_EMO_/g,vR=function(e){return 45===e.charCodeAt(1)},kR=function(e){return null!=e&&"boolean"!=typeof e},_R=gR((function(e){return vR(e)?e:e.replace(fR,"-$&").toLowerCase()})),yR=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(bR,(function(e,t,n){return wR={name:t,styles:n,next:wR},t}))}return 1===hR[e]||vR(e)||"number"!=typeof t||0===t?t:t+"px"};function ER(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return wR={name:n.name,styles:n.styles,next:wR},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)wR={name:o.name,styles:o.styles,next:wR},o=o.next;return n.styles+";"}return function(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r<n.length;r++)o+=ER(e,t,n[r])+";";else for(var l in n){var i=n[l];if("object"!=typeof i)null!=t&&void 0!==t[i]?o+=l+"{"+t[i]+"}":kR(i)&&(o+=_R(l)+":"+yR(l,i)+";");else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var s=ER(e,t,i);switch(l){case"animation":case"animationName":o+=_R(l)+":"+s+";";break;default:o+=l+"{"+s+"}"}}else for(var a=0;a<i.length;a++)kR(i[a])&&(o+=_R(l)+":"+yR(l,i[a])+";")}return o}(e,t,n);case"function":if(void 0!==e){var r=wR,l=n(e);return wR=r,ER(e,t,l)}}if(null==t)return n;var i=t[n];return void 0!==i?i:n}var wR,SR=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var CR=!!s.useInsertionEffect&&s.useInsertionEffect,xR=CR||function(e){return e()},BR=(0,s.createContext)("undefined"!=typeof HTMLElement?pR({key:"css"}):null);BR.Provider;var IR=function(e){return(0,s.forwardRef)((function(t,n){var o=(0,s.useContext)(BR);return e(t,o,n)}))},TR=(0,s.createContext)({});var MR=function(e,t,n){var o=e.key+"-"+t.name;!1===n&&void 0===e.registered[o]&&(e.registered[o]=t.styles)},PR=uP,RR=function(e){return"theme"!==e},NR=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?PR:RR},LR=function(e,t,n){var o;if(t){var r=t.shouldForwardProp;o=e.__emotion_forwardProp&&r?function(t){return e.__emotion_forwardProp(t)&&r(t)}:r}return"function"!=typeof o&&n&&(o=e.__emotion_forwardProp),o},AR=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;MR(t,n,o);xR((function(){return function(e,t,n){MR(e,t,n);var o=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var r=t;do{e.insert(t===r?"."+o:"",r,e.sheet,!0),r=r.next}while(void 0!==r)}}(t,n,o)}));return null};const OR=function e(t,n){var o,r,l=t.__emotion_real===t,i=l&&t.__emotion_base||t;void 0!==n&&(o=n.label,r=n.target);var a=LR(t,n,l),c=a||NR(i),u=!c("as");return function(){var d=arguments,p=l&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&p.push("label:"+o+";"),null==d[0]||void 0===d[0].raw)p.push.apply(p,d);else{0,p.push(d[0][0]);for(var m=d.length,h=1;h<m;h++)p.push(d[h],d[0][h])}var g=IR((function(e,t,n){var o=u&&e.as||i,l="",d=[],m=e;if(null==e.theme){for(var h in m={},e)m[h]=e[h];m.theme=(0,s.useContext)(TR)}"string"==typeof e.className?l=function(e,t,n){var o="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):o+=n+" "})),o}(t.registered,d,e.className):null!=e.className&&(l=e.className+" ");var g=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,r="";wR=void 0;var l=e[0];null==l||void 0===l.raw?(o=!1,r+=ER(n,t,l)):r+=l[0];for(var i=1;i<e.length;i++)r+=ER(n,t,e[i]),o&&(r+=l[i]);SR.lastIndex=0;for(var s,a="";null!==(s=SR.exec(r));)a+="-"+s[1];return{name:mR(r)+a,styles:r,next:wR}}(p.concat(d),t.registered,m);l+=t.key+"-"+g.name,void 0!==r&&(l+=" "+r);var f=u&&void 0===a?NR(o):c,b={};for(var v in e)u&&"as"===v||f(v)&&(b[v]=e[v]);return b.className=l,b.ref=n,(0,s.createElement)(s.Fragment,null,(0,s.createElement)(AR,{cache:t,serialized:g,isStringTag:"string"==typeof o}),(0,s.createElement)(o,b))}));return g.displayName=void 0!==o?o:"Styled("+("string"==typeof i?i:i.displayName||i.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=i,g.__emotion_styles=p,g.__emotion_forwardProp=a,Object.defineProperty(g,"toString",{value:function(){return"."+r}}),g.withComponent=function(t,o){return e(t,sP({},n,o,{shouldForwardProp:LR(g,o,!0)})).apply(void 0,p)},g}};const DR=OR(_l.__experimentalToolsPanelItem,{target:"ef8pe3d0"})({name:"957xgf",styles:"grid-column:span 1"});function zR({panelId:e,value:t={},onChange:n=(()=>{}),units:o,isShownByDefault:r=!0}){var l,i;const a="auto"===t.width?"":null!==(l=t.width)&&void 0!==l?l:"",c="auto"===t.height?"":null!==(i=t.height)&&void 0!==i?i:"",u=e=>o=>{const r={...t};o?r[e]=o:delete r[e],n(r)};return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(DR,{label:(0,x.__)("Width"),isShownByDefault:r,hasValue:()=>""!==a,onDeselect:u("width"),panelId:e},(0,s.createElement)(_l.__experimentalUnitControl,{label:(0,x.__)("Width"),placeholder:(0,x.__)("Auto"),labelPosition:"top",units:o,min:0,value:a,onChange:u("width"),size:"__unstable-large"})),(0,s.createElement)(DR,{label:(0,x.__)("Height"),isShownByDefault:r,hasValue:()=>""!==c,onDeselect:u("height"),panelId:e},(0,s.createElement)(_l.__experimentalUnitControl,{label:(0,x.__)("Height"),placeholder:(0,x.__)("Auto"),labelPosition:"top",units:o,min:0,value:c,onChange:u("height"),size:"__unstable-large"})))}const VR=function({panelId:e,value:t={},onChange:n=(()=>{}),aspectRatioOptions:o,defaultAspectRatio:r="auto",scaleOptions:l,defaultScale:i="fill",unitsOptions:a}){const c=void 0===t.width||"auto"===t.width?null:t.width,d=void 0===t.height||"auto"===t.height?null:t.height,p=void 0===t.aspectRatio||"auto"===t.aspectRatio?null:t.aspectRatio,m=void 0===t.scale||"fill"===t.scale?null:t.scale,[h,g]=(0,u.useState)(m),[f,b]=(0,u.useState)(p),v=c&&d?"custom":f,k=p||c&&d;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Qp,{panelId:e,options:o,defaultValue:r,value:v,onChange:e=>{const o={...t};b(e="auto"===e?null:e),e?o.aspectRatio=e:delete o.aspectRatio,e?h?o.scale=h:(o.scale=i,g(i)):delete o.scale,"custom"!==e&&c&&d&&delete o.height,n(o)}}),(0,s.createElement)(zR,{panelId:e,units:a,value:{width:c,height:d},onChange:({width:e,height:o})=>{const r={...t};o="auto"===o?null:o,(e="auto"===e?null:e)?r.width=e:delete r.width,o?r.height=o:delete r.height,e&&o?delete r.aspectRatio:f&&(r.aspectRatio=f),f||!!e==!!o?h?r.scale=h:(r.scale=i,g(i)):delete r.scale,n(r)}}),k&&(0,s.createElement)(iP,{panelId:e,options:l,defaultValue:i,value:h,onChange:e=>{const o={...t};g(e="fill"===e?null:e),e?o.scale=e:delete o.scale,n(o)}}))},FR=[{label:(0,x._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,x._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,x._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,x._x)("Full Size","Image size option for resolution control"),value:"full"}];const HR={};le(HR,{...i,ExperimentalBlockCanvas:jC,ExperimentalBlockEditorProvider:z_,getDuotoneFilter:Um,getRichTextValues:function(e=[]){c.__unstableGetBlockProps.skipFilters=!0;const t=[];return rP(t,e),c.__unstableGetBlockProps.skipFilters=!1,t.map((e=>e instanceof Y.RichTextData?e:Y.RichTextData.fromHTMLString(e)))},PrivateInserter:rw,PrivateQuickInserter:tw,PrivateListView:Tx,ResizableBoxPopover:function({clientId:e,resizableBoxProps:t,...n}){return(0,s.createElement)(fm,{clientId:e,__unstableCoverTarget:!0,__unstablePopoverSlot:"__unstable-block-tools-after",shift:!1,...n},(0,s.createElement)(_l.ResizableBox,{...t}))},BlockInfo:$T,useCanBlockToolbarBeFocused:function(){return(0,d.useSelect)((e=>{const{__unstableGetEditorMode:t,getBlock:n,getSettings:o,getSelectedBlockClientId:r,getFirstMultiSelectedBlockClientId:l}=ie(e(Nr)),i=l()||r(),s=(0,c.isUnmodifiedDefaultBlock)(n(i)||{});return!!i&&(o().hasFixedToolbar||"edit"===t()&&!s)}),[])},cleanEmptyObject:hl,useStyleOverride:bl,BlockQuickNavigation:jT,LayoutStyle:function({layout:e={},css:t,...n}){const o=Vi(e.type),[r]=Ar("spacing.blockGap"),l=null!==r;if(o){if(t)return(0,s.createElement)("style",null,t);const r=o.getLayoutStyle?.({hasBlockGapSupport:l,layout:e,...n});if(r)return(0,s.createElement)("style",null,r)}return null},BlockRemovalWarningModal:function({rules:e}){const{clientIds:t,selectPrevious:n,blockNamesForPrompt:o,messageType:r}=(0,d.useSelect)((e=>ie(e(Nr)).getRemovalPromptData())),{clearBlockRemovalPrompt:l,setBlockRemovalRules:i,privateRemoveBlocks:a}=ie((0,d.useDispatch)(Nr));if((0,u.useEffect)((()=>(i(e),()=>{i()})),[e,i]),!o)return;const c="templates"===r?(0,x._n)("Deleting this block will stop your post or page content from displaying on this template. It is not recommended.","Deleting these blocks will stop your post or page content from displaying on this template. It is not recommended.",o.length):(0,x._n)("Deleting this block could break patterns on your site that have content linked to it. Are you sure you want to delete it?","Deleting these blocks could break patterns on your site that have content linked to them. Are you sure you want to delete them?",o.length);return(0,s.createElement)(_l.Modal,{title:(0,x.__)("Be careful!"),onRequestClose:l,size:"medium"},(0,s.createElement)("p",null,c),(0,s.createElement)(_l.__experimentalHStack,{justify:"right"},(0,s.createElement)(_l.Button,{variant:"tertiary",onClick:l},(0,x.__)("Cancel")),(0,s.createElement)(_l.Button,{variant:"primary",onClick:()=>{a(t,n,!0),l()}},(0,x.__)("Delete"))))},useLayoutClasses:yh,useLayoutStyles:function(e={},t,n){const{layout:o={},style:r={}}=e,l=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||{},i=Vi(l?.type||"default"),[s]=Ar("spacing.blockGap"),a=null!==s,c=i?.getLayoutStyle?.({blockName:t,selector:n,layout:o,style:r,hasBlockGapSupport:a});return c},DimensionsTool:VR,ResolutionTool:function({panelId:e,value:t,onChange:n,options:o=FR,defaultValue:r=FR[0].value,isShownByDefault:l=!0}){const i=null!=t?t:r;return(0,s.createElement)(_l.__experimentalToolsPanelItem,{hasValue:()=>i!==r,label:(0,x.__)("Resolution"),onDeselect:()=>n(r),isShownByDefault:l,panelId:e},(0,s.createElement)(_l.SelectControl,{label:(0,x.__)("Resolution"),value:i,options:o,onChange:n,help:(0,x.__)("Select the size of the source image."),size:"__unstable-large"}))},ReusableBlocksRenameHint:CM,useReusableBlocksRenameHint:function(){return(0,d.useSelect)((e=>{var t;return null===(t=e(Ws.store).get("core",SM))||void 0===t||t}),[])},usesContextKey:OI,useFlashEditableBlocks:__,selectBlockPatternsKey:X,requiresWrapperOnCopy:ny,PrivateRichText:$I})})(),(window.wp=window.wp||{}).blockEditor=o})(); \ No newline at end of file
diff --git a/wp-includes/js/dist/block-library.js b/wp-includes/js/dist/block-library.js
index a83fe84..a60f80c 100644
--- a/wp-includes/js/dist/block-library.js
+++ b/wp-includes/js/dist/block-library.js
@@ -25964,6 +25964,23 @@ function image_Image({
});
}
}
+ function resetLightbox() {
+ // When deleting a link from an image while lightbox settings
+ // are enabled by default, we should disable the lightbox,
+ // otherwise the resulting UX looks like a mistake.
+ // See https://github.com/WordPress/gutenberg/pull/59890/files#r1532286123.
+ if (lightboxSetting?.enabled && lightboxSetting?.allowEditing) {
+ setAttributes({
+ lightbox: {
+ enabled: false
+ }
+ });
+ } else {
+ setAttributes({
+ lightbox: undefined
+ });
+ }
+ }
function onSetTitle(value) {
// This is the HTML title attribute, separate from the media object
// title.
@@ -26031,7 +26048,10 @@ function image_Image({
availableUnits: ['px']
});
const [lightboxSetting] = (0,external_wp_blockEditor_namespaceObject.useSettings)('lightbox');
- const showLightboxSetting = !!lightbox || lightboxSetting?.allowEditing === true;
+ const showLightboxSetting =
+ // If a block-level override is set, we should give users the option to
+ // remove that override, even if the lightbox UI is disabled in the settings.
+ !!lightbox && lightbox?.enabled !== lightboxSetting?.enabled || lightboxSetting?.allowEditing;
const lightboxChecked = !!lightbox?.enabled || !lightbox && !!lightboxSetting?.enabled;
const dimensionsControl = (0,external_React_namespaceObject.createElement)(DimensionsTool, {
value: {
@@ -26138,7 +26158,8 @@ function image_Image({
rel: rel,
showLightboxSetting: showLightboxSetting,
lightboxEnabled: lightboxChecked,
- onSetLightbox: onSetLightbox
+ onSetLightbox: onSetLightbox,
+ resetLightbox: resetLightbox
}), allowCrop && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
onClick: () => setIsEditingImage(true),
icon: library_crop,
@@ -45021,7 +45042,15 @@ const useUnsupportedBlocks = clientId => {
const blocks = {};
getClientIdsOfDescendants(clientId).forEach(descendantClientId => {
const blockName = getBlockName(descendantClientId);
- if (!blockName.startsWith('core/')) {
+ /*
+ * Client side navigation can be true in two states:
+ * - supports.interactivity = true;
+ * - supports.interactivity.clientNavigation = true;
+ */
+ const blockSupportsInteractivity = Object.is((0,external_wp_blocks_namespaceObject.getBlockSupport)(blockName, 'interactivity'), true);
+ const blockSupportsInteractivityClientNavigation = (0,external_wp_blocks_namespaceObject.getBlockSupport)(blockName, 'interactivity.clientNavigation');
+ const blockInteractivity = blockSupportsInteractivity || blockSupportsInteractivityClientNavigation;
+ if (!blockInteractivity) {
blocks.hasBlocksFromPlugins = true;
} else if (blockName === 'core/post-content') {
blocks.hasPostContentBlock = true;
@@ -45897,7 +45926,7 @@ function EnhancedPaginationModal({
};
let notice = (0,external_wp_i18n_namespaceObject.__)('If you still want to prevent full page reloads, remove that block, then disable "Force page reload" again in the Query Block settings.');
if (hasBlocksFromPlugins) {
- notice = (0,external_wp_i18n_namespaceObject.__)('Currently, avoiding full page reloads is not possible when blocks from plugins are present inside the Query block.') + ' ' + notice;
+ notice = (0,external_wp_i18n_namespaceObject.__)('Currently, avoiding full page reloads is not possible when non-interactive or non-clientNavigation compatible blocks from plugins are present inside the Query block.') + ' ' + notice;
} else if (hasPostContentBlock) {
notice = (0,external_wp_i18n_namespaceObject.__)('Currently, avoiding full page reloads is not possible when a Content block is present inside the Query block.') + ' ' + notice;
}
@@ -48945,6 +48974,30 @@ function setBlockEditMode(setEditMode, blocks, mode) {
block.name === block_name ? 'disabled' : mode);
});
}
+function RecursionWarning() {
+ const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
+ return (0,external_React_namespaceObject.createElement)("div", {
+ ...blockProps
+ }, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Block cannot be rendered inside itself.')));
+}
+
+// Wrap the main Edit function for the pattern block with a recursion wrapper
+// that allows short-circuiting rendering as early as possible, before any
+// of the other effects in the block edit have run.
+function ReusableBlockEditRecursionWrapper(props) {
+ const {
+ ref
+ } = props.attributes;
+ const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.useHasRecursion)(ref);
+ if (hasAlreadyRendered) {
+ return (0,external_React_namespaceObject.createElement)(RecursionWarning, null);
+ }
+ return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RecursionProvider, {
+ uniqueId: ref
+ }, (0,external_React_namespaceObject.createElement)(ReusableBlockEdit, {
+ ...props
+ }));
+}
function ReusableBlockEdit({
name,
attributes: {
@@ -48956,7 +49009,6 @@ function ReusableBlockEdit({
setAttributes
}) {
const registry = (0,external_wp_data_namespaceObject.useRegistry)();
- const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.useHasRecursion)(ref);
const {
record,
editedRecord,
@@ -49094,18 +49146,13 @@ function ReusableBlockEdit({
}
};
let children = null;
- if (hasAlreadyRendered) {
- children = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Block cannot be rendered inside itself.'));
- }
if (isMissing) {
children = (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, null, (0,external_wp_i18n_namespaceObject.__)('Block has been deleted or is unavailable.'));
}
if (!hasResolved) {
children = (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null));
}
- return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RecursionProvider, {
- uniqueId: ref
- }, userCanEdit && onNavigateToEntityRecord && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
+ return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, userCanEdit && onNavigateToEntityRecord && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
onClick: handleEditOriginal
}, (0,external_wp_i18n_namespaceObject.__)('Edit original')))), canOverrideBlocks && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
onClick: resetContent,
@@ -49286,7 +49333,7 @@ const {
const block_settings = {
deprecated: block_deprecated,
- edit: ReusableBlockEdit,
+ edit: ReusableBlockEditRecursionWrapper,
icon: library_symbol,
__experimentalLabel: ({
ref
diff --git a/wp-includes/js/dist/block-library.min.js b/wp-includes/js/dist/block-library.min.js
index 43dbeee..9be35f9 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 a={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var l=o.apply(null,n);l&&e.push(l)}}else if("object"===r){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var i in n)a.call(n,i)&&n[i]&&e.push(i)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},7734:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var a,o,r;if(Array.isArray(t)){if((a=t.length)!=n.length)return!1;for(o=a;0!=o--;)if(!e(t[o],n[o]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;for(o of t.entries())if(!e(o[1],n.get(o[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((a=t.length)!=n.length)return!1;for(o=a;0!=o--;)if(t[o]!==n[o])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((a=(r=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,r[o]))return!1;for(o=a;0!=o--;){var l=r[o];if(!e(t[l],n[l]))return!1}return!0}return t!=t&&n!=n}},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),a=new RegExp(n,"g"),o=new RegExp(n,"");function r(e){return t[e]}var l=function(e){return e.replace(a,r)};e.exports=l,e.exports.has=function(e){return!!e.match(o)},e.exports.remove=l}},t={};function n(a){var o=t[a];if(void 0!==o)return o.exports;var r=t[a]={exports:{}};return e[a](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};(()=>{"use strict";n.r(a),n.d(a,{__experimentalGetCoreBlocks:()=>oB,__experimentalRegisterExperimentalCoreBlocks:()=>lB,registerCoreBlocks:()=>rB});var e={};n.r(e),n.d(e,{init:()=>st,metadata:()=>rt,name:()=>lt,settings:()=>it});var t={};n.r(t),n.d(t,{init:()=>Bt,metadata:()=>Et,name:()=>Ct,settings:()=>St});var o={};n.r(o),n.d(o,{init:()=>an,metadata:()=>en,name:()=>tn,settings:()=>nn});var r={};n.r(r),n.d(r,{init:()=>Tn,metadata:()=>Sn,name:()=>Bn,settings:()=>Nn});var l={};n.r(l),n.d(l,{init:()=>Gn,metadata:()=>Vn,name:()=>$n,settings:()=>On});var i={};n.r(i),n.d(i,{init:()=>Kn,metadata:()=>Wn,name:()=>Zn,settings:()=>Qn});var s={};n.r(s),n.d(s,{init:()=>aa,metadata:()=>ea,name:()=>ta,settings:()=>na});var c={};n.r(c),n.d(c,{init:()=>ha,metadata:()=>pa,name:()=>da,settings:()=>ga});var m={};n.r(m),n.d(m,{init:()=>Ea,metadata:()=>ka,name:()=>xa,settings:()=>wa});var u={};n.r(u),n.d(u,{init:()=>Ma,metadata:()=>Ta,name:()=>Ia,settings:()=>Pa});var p={};n.r(p),n.d(p,{init:()=>Qa,metadata:()=>ja,name:()=>Wa,settings:()=>Za});var d={};n.r(d),n.d(d,{init:()=>io,metadata:()=>oo,name:()=>ro,settings:()=>lo});var g={};n.r(g),n.d(g,{init:()=>uo,metadata:()=>so,name:()=>co,settings:()=>mo});var h={};n.r(h),n.d(h,{init:()=>vo,metadata:()=>bo,name:()=>_o,settings:()=>yo});var b={};n.r(b),n.d(b,{init:()=>Eo,metadata:()=>ko,name:()=>xo,settings:()=>wo});var _={};n.r(_),n.d(_,{init:()=>Mo,metadata:()=>To,name:()=>Io,settings:()=>Po});var y={};n.r(y),n.d(y,{init:()=>Lo,metadata:()=>Ro,name:()=>Ao,settings:()=>Ho});var v={};n.r(v),n.d(v,{init:()=>Go,metadata:()=>Vo,name:()=>$o,settings:()=>Oo});var f={};n.r(f),n.d(f,{init:()=>tr,metadata:()=>Jo,name:()=>Xo,settings:()=>er});var k={};n.r(k),n.d(k,{init:()=>ir,metadata:()=>or,name:()=>rr,settings:()=>lr});var x={};n.r(x),n.d(x,{init:()=>gr,metadata:()=>ur,name:()=>pr,settings:()=>dr});var w={};n.r(w),n.d(w,{init:()=>fr,metadata:()=>_r,name:()=>yr,settings:()=>vr});var E={};n.r(E),n.d(E,{init:()=>Sr,metadata:()=>wr,name:()=>Er,settings:()=>Cr});var C={};n.r(C),n.d(C,{init:()=>Rr,metadata:()=>Pr,name:()=>Mr,settings:()=>zr});var S={};n.r(S),n.d(S,{init:()=>Ii,metadata:()=>Bi,name:()=>Ni,settings:()=>Ti});var B={};n.r(B),n.d(B,{init:()=>Li,metadata:()=>Ri,name:()=>Ai,settings:()=>Hi});var N={};n.r(N),n.d(N,{init:()=>Ss,metadata:()=>ws,name:()=>Es,settings:()=>Cs});var T={};n.r(T),n.d(T,{init:()=>Gs,metadata:()=>Vs,name:()=>$s,settings:()=>Os});var I={};n.r(I),n.d(I,{init:()=>ec,metadata:()=>Ys,name:()=>Js,settings:()=>Xs});var P={};n.r(P),n.d(P,{init:()=>pc,metadata:()=>cc,name:()=>mc,settings:()=>uc});var M={};n.r(M),n.d(M,{init:()=>vc,metadata:()=>bc,name:()=>_c,settings:()=>yc});var z={};n.r(z),n.d(z,{init:()=>Nc,metadata:()=>Cc,name:()=>Sc,settings:()=>Bc});var R={};n.r(R),n.d(R,{init:()=>Om,metadata:()=>Fm,name:()=>Vm,settings:()=>$m});var A={};n.r(A),n.d(A,{init:()=>ru,metadata:()=>nu,name:()=>au,settings:()=>ou});var H={};n.r(H),n.d(H,{init:()=>Nu,metadata:()=>Cu,name:()=>Su,settings:()=>Bu});var L={};n.r(L),n.d(L,{init:()=>Ru,metadata:()=>Pu,name:()=>Mu,settings:()=>zu});var D={};n.r(D),n.d(D,{init:()=>Gu,metadata:()=>Vu,name:()=>$u,settings:()=>Ou});var F={};n.r(F),n.d(F,{init:()=>fp,metadata:()=>_p,name:()=>yp,settings:()=>vp});var V={};n.r(V),n.d(V,{init:()=>Cp,metadata:()=>xp,name:()=>wp,settings:()=>Ep});var $={};n.r($),n.d($,{init:()=>Ap,metadata:()=>Mp,name:()=>zp,settings:()=>Rp});var O={};n.r(O),n.d(O,{init:()=>id,metadata:()=>od,name:()=>rd,settings:()=>ld});var G={};n.r(G),n.d(G,{init:()=>kd,metadata:()=>yd,name:()=>vd,settings:()=>fd});var U={};n.r(U),n.d(U,{init:()=>Sd,metadata:()=>wd,name:()=>Ed,settings:()=>Cd});var q={};n.r(q),n.d(q,{init:()=>pg,metadata:()=>cg,name:()=>mg,settings:()=>ug});var j={};n.r(j),n.d(j,{init:()=>yg,metadata:()=>hg,name:()=>bg,settings:()=>_g});var W={};n.r(W),n.d(W,{init:()=>Cg,metadata:()=>xg,name:()=>wg,settings:()=>Eg});var Z={};n.r(Z),n.d(Z,{init:()=>tb,metadata:()=>Jh,name:()=>Xh,settings:()=>eb});var Q={};n.r(Q),n.d(Q,{init:()=>gb,metadata:()=>ub,name:()=>pb,settings:()=>db});var K={};n.r(K),n.d(K,{init:()=>Eb,metadata:()=>kb,name:()=>xb,settings:()=>wb});var Y={};n.r(Y),n.d(Y,{init:()=>Ib,metadata:()=>Bb,name:()=>Nb,settings:()=>Tb});var J={};n.r(J),n.d(J,{init:()=>Vb,metadata:()=>Lb,name:()=>Db,settings:()=>Fb});var X={};n.r(X),n.d(X,{init:()=>Jb,metadata:()=>Qb,name:()=>Kb,settings:()=>Yb});var ee={};n.r(ee),n.d(ee,{init:()=>a_,metadata:()=>e_,name:()=>t_,settings:()=>n_});var te={};n.r(te),n.d(te,{init:()=>E_,metadata:()=>k_,name:()=>x_,settings:()=>w_});var ne={};n.r(ne),n.d(ne,{init:()=>P_,metadata:()=>N_,name:()=>T_,settings:()=>I_});var ae={};n.r(ae),n.d(ae,{init:()=>L_,metadata:()=>R_,name:()=>A_,settings:()=>H_});var oe={};n.r(oe),n.d(oe,{init:()=>O_,metadata:()=>F_,name:()=>V_,settings:()=>$_});var re={};n.r(re),n.d(re,{init:()=>Z_,metadata:()=>q_,name:()=>j_,settings:()=>W_});var le={};n.r(le),n.d(le,{init:()=>X_,metadata:()=>K_,name:()=>Y_,settings:()=>J_});var ie={};n.r(ie),n.d(ie,{init:()=>oy,metadata:()=>ty,name:()=>ny,settings:()=>ay});var se={};n.r(se),n.d(se,{init:()=>cy,metadata:()=>ly,name:()=>iy,settings:()=>sy});var ce={};n.r(ce),n.d(ce,{init:()=>fy,metadata:()=>_y,name:()=>yy,settings:()=>vy});var me={};n.r(me),n.d(me,{init:()=>Ty,metadata:()=>Sy,name:()=>By,settings:()=>Ny});var ue={};n.r(ue),n.d(ue,{init:()=>Ay,metadata:()=>My,name:()=>zy,settings:()=>Ry});var pe={};n.r(pe),n.d(pe,{init:()=>Wy,metadata:()=>Uy,name:()=>qy,settings:()=>jy});var de={};n.r(de),n.d(de,{init:()=>tv,metadata:()=>Jy,name:()=>Xy,settings:()=>ev});var ge={};n.r(ge),n.d(ge,{init:()=>sv,metadata:()=>rv,name:()=>lv,settings:()=>iv});var he={};n.r(he),n.d(he,{init:()=>yv,metadata:()=>hv,name:()=>bv,settings:()=>_v});var be={};n.r(be),n.d(be,{init:()=>Cv,metadata:()=>xv,name:()=>wv,settings:()=>Ev});var _e={};n.r(_e),n.d(_e,{init:()=>Pv,metadata:()=>Nv,name:()=>Tv,settings:()=>Iv});var ye={};n.r(ye),n.d(ye,{init:()=>Dv,metadata:()=>Av,name:()=>Hv,settings:()=>Lv});var ve={};n.r(ve),n.d(ve,{init:()=>of,metadata:()=>tf,name:()=>nf,settings:()=>af});var fe={};n.r(fe),n.d(fe,{init:()=>hk,metadata:()=>pk,name:()=>dk,settings:()=>gk});var ke={};n.r(ke),n.d(ke,{init:()=>fk,metadata:()=>_k,name:()=>yk,settings:()=>vk});var xe={};n.r(xe),n.d(xe,{init:()=>Nk,metadata:()=>Ck,name:()=>Sk,settings:()=>Bk});var we={};n.r(we),n.d(we,{init:()=>zk,metadata:()=>Ik,name:()=>Pk,settings:()=>Mk});var Ee={};n.r(Ee),n.d(Ee,{init:()=>Dk,metadata:()=>Ak,name:()=>Hk,settings:()=>Lk});var Ce={};n.r(Ce),n.d(Ce,{init:()=>Gk,metadata:()=>Vk,name:()=>$k,settings:()=>Ok});var Se={};n.r(Se),n.d(Se,{init:()=>Jk,metadata:()=>Qk,name:()=>Kk,settings:()=>Yk});var Be={};n.r(Be),n.d(Be,{init:()=>dx,metadata:()=>mx,name:()=>ux,settings:()=>px});var Ne={};n.r(Ne),n.d(Ne,{init:()=>Mx,metadata:()=>Tx,name:()=>Ix,settings:()=>Px});var Te={};n.r(Te),n.d(Te,{init:()=>Hx,metadata:()=>zx,name:()=>Rx,settings:()=>Ax});var Ie={};n.r(Ie),n.d(Ie,{init:()=>$x,metadata:()=>Dx,name:()=>Fx,settings:()=>Vx});var Pe={};n.r(Pe),n.d(Pe,{init:()=>ew,metadata:()=>Yx,name:()=>Jx,settings:()=>Xx});var Me={};n.r(Me),n.d(Me,{init:()=>sw,metadata:()=>rw,name:()=>lw,settings:()=>iw});var ze={};n.r(ze),n.d(ze,{init:()=>hw,metadata:()=>pw,name:()=>dw,settings:()=>gw});var Re={};n.r(Re),n.d(Re,{init:()=>Sw,metadata:()=>ww,name:()=>Ew,settings:()=>Cw});var Ae={};n.r(Ae),n.d(Ae,{init:()=>zw,metadata:()=>Iw,name:()=>Pw,settings:()=>Mw});var He={};n.r(He),n.d(He,{init:()=>Ow,metadata:()=>Fw,name:()=>Vw,settings:()=>$w});var Le={};n.r(Le),n.d(Le,{init:()=>Xw,metadata:()=>Kw,name:()=>Yw,settings:()=>Jw});var De={};n.r(De),n.d(De,{init:()=>sE,metadata:()=>rE,name:()=>lE,settings:()=>iE});var Fe={};n.r(Fe),n.d(Fe,{init:()=>fE,metadata:()=>_E,name:()=>yE,settings:()=>vE});var Ve={};n.r(Ve),n.d(Ve,{init:()=>tC,metadata:()=>JE,name:()=>XE,settings:()=>eC});var $e={};n.r($e),n.d($e,{init:()=>pC,metadata:()=>cC,name:()=>mC,settings:()=>uC});var Oe={};n.r(Oe),n.d(Oe,{init:()=>yC,metadata:()=>hC,name:()=>bC,settings:()=>_C});var Ge={};n.r(Ge),n.d(Ge,{init:()=>KC,metadata:()=>WC,name:()=>ZC,settings:()=>QC});var Ue={};n.r(Ue),n.d(Ue,{init:()=>tS,metadata:()=>JC,name:()=>XC,settings:()=>eS});var qe={};n.r(qe),n.d(qe,{init:()=>iS,metadata:()=>oS,name:()=>rS,settings:()=>lS});var je={};n.r(je),n.d(je,{init:()=>_S,metadata:()=>gS,name:()=>hS,settings:()=>bS});var We={};n.r(We),n.d(We,{init:()=>VS,metadata:()=>LS,name:()=>DS,settings:()=>FS});var Ze={};n.r(Ze),n.d(Ze,{init:()=>tB,metadata:()=>JS,name:()=>XS,settings:()=>eB});const Qe=window.wp.blocks,Ke=window.React,Ye=window.wp.primitives,Je=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"}));function Xe(e){if(!e)return;const{metadata:t,settings:n,name:a}=e;return(0,Qe.registerBlockType)({name:a,...t},n)}const et=window.wp.components,tt=window.wp.i18n,nt=window.wp.blockEditor,at=window.wp.serverSideRender;var ot=n.n(at);const rt={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/archives",title:"Archives",category:"widgets",description:"Display a date archive of your posts.",textdomain:"default",attributes:{displayAsDropdown:{type:"boolean",default:!1},showLabel:{type:"boolean",default:!0},showPostCounts:{type:"boolean",default:!1},type:{type:"string",default:"monthly"}},supports:{align:!0,html:!1,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-archives-editor"},{name:lt}=rt,it={icon:Je,example:{},edit:function({attributes:e,setAttributes:t}){const{showLabel:n,showPostCounts:a,displayAsDropdown:o,type:r}=e;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display as dropdown"),checked:o,onChange:()=>t({displayAsDropdown:!o})}),o&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show label"),checked:n,onChange:()=>t({showLabel:!n})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show post counts"),checked:a,onChange:()=>t({showPostCounts:!a})}),(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Group by:"),options:[{label:(0,tt.__)("Year"),value:"yearly"},{label:(0,tt.__)("Month"),value:"monthly"},{label:(0,tt.__)("Week"),value:"weekly"},{label:(0,tt.__)("Day"),value:"daily"}],value:r,onChange:e=>t({type:e})}))),(0,Ke.createElement)("div",{...(0,nt.useBlockProps)()},(0,Ke.createElement)(et.Disabled,null,(0,Ke.createElement)(ot(),{block:"core/archives",skipBlockSupportAttributes:!0,attributes:e}))))}},st=()=>Xe({name:lt,metadata:rt,settings:it}),ct=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.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"}));var mt=n(5755),ut=n.n(mt);const pt=window.wp.url,dt=window.wp.coreData,gt=window.wp.data;function ht(e){const t=e?e[0]:24,n=e?e[e.length-1]:96;return{minSize:t,maxSize:Math.floor(2.5*n)}}function bt(){const{avatarURL:e}=(0,gt.useSelect)((e=>{const{getSettings:t}=e(nt.store),{__experimentalDiscussionSettings:n}=t();return n}));return e}const _t=window.wp.element,yt={who:"authors",per_page:-1,_fields:"id,name",context:"view"};const vt=function({value:e,onChange:t}){const[n,a]=(0,_t.useState)(),o=(0,gt.useSelect)((e=>{const{getUsers:t}=e(dt.store);return t(yt)}),[]);if(!o)return null;const r=o.map((e=>({label:e.name,value:e.id})));return(0,Ke.createElement)(et.ComboboxControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("User"),help:(0,tt.__)("Select the avatar user to display, if it is blank it will use the post/page author."),value:e,onChange:t,options:n||r,onFilterValueChange:e=>a(r.filter((t=>t.label.toLowerCase().startsWith(e.toLowerCase()))))})},ft=({setAttributes:e,avatar:t,attributes:n,selectUser:a})=>(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Image size"),onChange:t=>e({size:t}),min:t.minSize,max:t.maxSize,initialPosition:n?.size,value:n?.size}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link to user profile"),onChange:()=>e({isLink:!n.isLink}),checked:n.isLink}),n.isLink&&(0,Ke.createElement)(et.ToggleControl,{label:(0,tt.__)("Open in new tab"),onChange:t=>e({linkTarget:t?"_blank":"_self"}),checked:"_blank"===n.linkTarget}),a&&(0,Ke.createElement)(vt,{value:n?.userId,onChange:t=>{e({userId:t})}}))),kt=({setAttributes:e,attributes:t,avatar:n,blockProps:a,isSelected:o})=>{const r=(0,nt.__experimentalUseBorderProps)(t),l=(0,pt.addQueryArgs)((0,pt.removeQueryArgs)(n?.src,["s"]),{s:2*t?.size});return(0,Ke.createElement)("div",{...a},(0,Ke.createElement)(et.ResizableBox,{size:{width:t.size,height:t.size},showHandle:o,onResizeStop:(n,a,o,r)=>{e({size:parseInt(t.size+(r.height||r.width),10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,tt.isRTL)(),bottom:!0,left:(0,tt.isRTL)()},minWidth:n.minSize,maxWidth:n.maxSize},(0,Ke.createElement)("img",{src:l,alt:n.alt,className:ut()("avatar","avatar-"+t.size,"photo","wp-block-avatar__image",r.className),style:r.style})))},xt=({attributes:e,context:t,setAttributes:n,isSelected:a})=>{const{commentId:o}=t,r=(0,nt.useBlockProps)(),l=function({commentId:e}){const[t]=(0,dt.useEntityProp)("root","comment","author_avatar_urls",e),[n]=(0,dt.useEntityProp)("root","comment","author_name",e),a=t?Object.values(t):null,o=t?Object.keys(t):null,{minSize:r,maxSize:l}=ht(o),i=bt();return{src:a?a[a.length-1]:i,minSize:r,maxSize:l,alt:n?(0,tt.sprintf)((0,tt.__)("%s Avatar"),n):(0,tt.__)("Default Avatar")}}({commentId:o});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(ft,{avatar:l,setAttributes:n,attributes:e,selectUser:!1}),e.isLink?(0,Ke.createElement)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault()},(0,Ke.createElement)(kt,{attributes:e,avatar:l,blockProps:r,isSelected:a,setAttributes:n})):(0,Ke.createElement)(kt,{attributes:e,avatar:l,blockProps:r,isSelected:a,setAttributes:n}))},wt=({attributes:e,context:t,setAttributes:n,isSelected:a})=>{const{postId:o,postType:r}=t,l=function({userId:e,postId:t,postType:n}){const{authorDetails:a}=(0,gt.useSelect)((a=>{const{getEditedEntityRecord:o,getUser:r}=a(dt.store);if(e)return{authorDetails:r(e)};const l=o("postType",n,t)?.author;return{authorDetails:l?r(l):null}}),[n,t,e]),o=a?.avatar_urls?Object.values(a.avatar_urls):null,r=a?.avatar_urls?Object.keys(a.avatar_urls):null,{minSize:l,maxSize:i}=ht(r),s=bt();return{src:o?o[o.length-1]:s,minSize:l,maxSize:i,alt:a?(0,tt.sprintf)((0,tt.__)("%s Avatar"),a?.name):(0,tt.__)("Default Avatar")}}({userId:e?.userId,postId:o,postType:r}),i=(0,nt.useBlockProps)();return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(ft,{selectUser:!0,attributes:e,avatar:l,setAttributes:n}),e.isLink?(0,Ke.createElement)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault()},(0,Ke.createElement)(kt,{attributes:e,avatar:l,blockProps:i,isSelected:a,setAttributes:n})):(0,Ke.createElement)(kt,{attributes:e,avatar:l,blockProps:i,isSelected:a,setAttributes:n}))};const Et={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,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,__experimentalDefaultControls:{margin:!1,padding:!1}},__experimentalBorder:{__experimentalSkipSerialization:!0,radius:!0,width:!0,color:!0,style:!0,__experimentalDefaultControls:{radius:!0}},color:{text:!1,background:!1,__experimentalDuotone:"img"},interactivity:{clientNavigation:!0}},selectors:{border:".wp-block-avatar img"},editorStyle:"wp-block-avatar-editor",style:"wp-block-avatar"},{name:Ct}=Et,St={icon:ct,edit:function(e){return e?.context?.commentId||null===e?.context?.commentId?(0,Ke.createElement)(xt,{...e}):(0,Ke.createElement)(wt,{...e})}},Bt=()=>Xe({name:Ct,metadata:Et,settings:St}),Nt=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.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"})),Tt=[{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({attributes:e}){const{autoplay:t,caption:n,loop:a,preload:o,src:r}=e;return(0,Ke.createElement)("figure",null,(0,Ke.createElement)("audio",{controls:"controls",src:r,autoPlay:t,loop:a,preload:o}),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:n}))}}],It=window.wp.blob,Pt=window.wp.notices;var Mt=n(1668),zt=n.n(Mt);function Rt(e,t){var n,a,o=0;function r(){var r,l,i=n,s=arguments.length;e:for(;i;){if(i.args.length===arguments.length){for(l=0;l<s;l++)if(i.args[l]!==arguments[l]){i=i.next;continue e}return i!==n&&(i===a&&(a=i.prev),i.prev.next=i.next,i.next&&(i.next.prev=i.prev),i.next=n,i.prev=null,n.prev=i,n=i),i.val}i=i.next}for(r=new Array(s),l=0;l<s;l++)r[l]=arguments[l];return i={args:r,val:e.apply(null,r)},n?(n.prev=i,i.next=n):a=i,o===t.maxSize?(a=a.prev).next=null:o++,n=i,i.val}return t=t||{},r.clear=function(){n=null,a=null,o=0},r}const At=[{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"}],Ht="wp-embed",Lt=window.wp.privateApis,{lock:Dt,unlock:Ft}=(0,Lt.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/block-library"),{name:Vt}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,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:"rich-text",source:"rich-text",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,spacing:{margin:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},$t=e=>e&&e.includes('class="wp-embedded-content"'),Ot=(e,t={})=>{const{preview:n,attributes:a={}}=e,{url:o,providerNameSlug:r,type:l,...i}=a;if(!o||!(0,Qe.getBlockType)(Vt))return;const s=(e=>(0,Qe.getBlockVariations)(Vt)?.find((({patterns:t})=>((e,t=[])=>t.some((t=>e.match(t))))(e,t))))(o),c="wordpress"===r||l===Ht;if(!c&&s&&(s.attributes.providerNameSlug!==r||!r))return(0,Qe.createBlock)(Vt,{url:o,...i,...s.attributes});const m=(0,Qe.getBlockVariations)(Vt)?.find((({name:e})=>"wordpress"===e));return m&&n&&$t(n.html)&&!c?(0,Qe.createBlock)(Vt,{url:o,...m.attributes,...t}):void 0},Gt=e=>{if(!e)return e;const t=At.reduce(((e,{className:t})=>(e[t]=!1,e)),{"wp-has-aspect-ratio":!1});return zt()(e,t)};function Ut(e,t,n=!0){if(!n)return Gt(t);const a=document.implementation.createHTMLDocument("");a.body.innerHTML=e;const o=a.body.querySelector("iframe");if(o&&o.height&&o.width){const e=(o.width/o.height).toFixed(2);for(let n=0;n<At.length;n++){const a=At[n];if(e>=a.ratio){return e-a.ratio>.1?Gt(t):zt()(Gt(t),a.className,"wp-has-aspect-ratio")}}}return t}const qt=Rt(((e,t,n,a,o=!0)=>{if(!e)return{};const r={};let{type:l="rich"}=e;const{html:i,provider_name:s}=e,{kebabCase:c}=Ft(et.privateApis),m=c((s||t).toLowerCase());return $t(i)&&(l=Ht),(i||"photo"===l)&&(r.type=l,r.providerNameSlug=m),(u=n)&&At.some((({className:e})=>u.includes(e)))||(r.className=Ut(i,n,a&&o)),r;var u})),jt=window.wp.compose,Wt=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.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"})),{PrivateRichText:Zt}=Ft(nt.privateApis);function Qt({key:e="caption",attributes:t,setAttributes:n,isSelected:a,insertBlocksAfter:o,placeholder:r=(0,tt.__)("Add caption"),label:l=(0,tt.__)("Caption text"),showToolbarButton:i=!0,className:s,disableEditing:c}){const m=t[e],u=(0,jt.usePrevious)(m),p=Zt.isEmpty(m),d=Zt.isEmpty(u),[g,h]=(0,_t.useState)(!p);(0,_t.useEffect)((()=>{!p&&d&&h(!0)}),[p,d]),(0,_t.useEffect)((()=>{!a&&p&&h(!1)}),[a,p]);const b=(0,_t.useCallback)((e=>{e&&p&&e.focus()}),[p]);return(0,Ke.createElement)(Ke.Fragment,null,i&&(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(et.ToolbarButton,{onClick:()=>{h(!g),g&&m&&n({caption:void 0})},icon:Wt,isPressed:g,label:g?(0,tt.__)("Remove caption"):(0,tt.__)("Add caption")})),g&&(!Zt.isEmpty(m)||a)&&(0,Ke.createElement)(Zt,{identifier:e,tagName:"figcaption",className:ut()(s,(0,nt.__experimentalGetElementClassName)("caption")),ref:b,"aria-label":l,placeholder:r,value:m,onChange:e=>n({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>o((0,Qe.createBlock)((0,Qe.getDefaultBlockName)())),disableEditing:c}))}const Kt=["audio"];const Yt=function({attributes:e,className:t,setAttributes:n,onReplace:a,isSelected:o,insertBlocksAfter:r}){const{id:l,autoplay:i,loop:s,preload:c,src:m}=e,u=!l&&(0,It.isBlobURL)(m),{getSettings:p}=(0,gt.useSelect)(nt.store);function d(e){return t=>{n({[e]:t})}}function g(e){if(e!==m){const t=Ot({attributes:{url:e}});if(void 0!==t&&a)return void a(t);n({src:e,id:void 0})}}(0,_t.useEffect)((()=>{if(!l&&(0,It.isBlobURL)(m)){const e=(0,It.getBlobByURL)(m);e&&p().mediaUpload({filesList:[e],onFileChange:([e])=>_(e),onError:e=>b(e),allowedTypes:Kt})}}),[]);const{createErrorNotice:h}=(0,gt.useDispatch)(Pt.store);function b(e){h(e,{type:"snackbar"})}function _(e){e&&e.url?n({src:e.url,id:e.id,caption:e.caption}):n({src:void 0,id:void 0,caption:void 0})}const y=ut()(t,{"is-transient":u}),v=(0,nt.useBlockProps)({className:y});return m?(0,Ke.createElement)(Ke.Fragment,null,o&&(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(nt.MediaReplaceFlow,{mediaId:l,mediaURL:m,allowedTypes:Kt,accept:"audio/*",onSelect:_,onSelectURL:g,onError:b})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Autoplay"),onChange:d("autoplay"),checked:i,help:function(e){return e?(0,tt.__)("Autoplay may cause usability issues for some users."):null}}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Loop"),onChange:d("loop"),checked:s}),(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt._x)("Preload","noun; Audio block parameter"),value:c||"",onChange:e=>n({preload:e||void 0}),options:[{value:"",label:(0,tt.__)("Browser default")},{value:"auto",label:(0,tt.__)("Auto")},{value:"metadata",label:(0,tt.__)("Metadata")},{value:"none",label:(0,tt._x)("None","Preload value")}]}))),(0,Ke.createElement)("figure",{...v},(0,Ke.createElement)(et.Disabled,{isDisabled:!o},(0,Ke.createElement)("audio",{controls:"controls",src:m})),u&&(0,Ke.createElement)(et.Spinner,null),(0,Ke.createElement)(Qt,{attributes:e,setAttributes:n,isSelected:o,insertBlocksAfter:r,label:(0,tt.__)("Audio caption text"),showToolbarButton:o}))):(0,Ke.createElement)("div",{...v},(0,Ke.createElement)(nt.MediaPlaceholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:Nt}),onSelect:_,onSelectURL:g,accept:"audio/*",allowedTypes:Kt,value:e,onError:b}))};const Jt={from:[{type:"files",isMatch:e=>1===e.length&&0===e[0].type.indexOf("audio/"),transform(e){const t=e[0];return(0,Qe.createBlock)("core/audio",{src:(0,It.createBlobURL)(t)})}},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:({named:{src:e,mp3:t,m4a:n,ogg:a,wav:o,wma:r}})=>e||t||n||a||o||r},loop:{type:"string",shortcode:({named:{loop:e}})=>e},autoplay:{type:"string",shortcode:({named:{autoplay:e}})=>e},preload:{type:"string",shortcode:({named:{preload:e}})=>e}}}]},Xt=Jt,en={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,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:"rich-text",source:"rich-text",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,__experimentalDefaultControls:{margin:!1,padding:!1}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-audio-editor",style:"wp-block-audio"},{name:tn}=en,nn={icon:Nt,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"},viewportWidth:350},transforms:Xt,deprecated:Tt,edit:Yt,save:function({attributes:e}){const{autoplay:t,caption:n,loop:a,preload:o,src:r}=e;return r&&(0,Ke.createElement)("figure",{...nt.useBlockProps.save()},(0,Ke.createElement)("audio",{controls:"controls",src:r,autoPlay:t,loop:a,preload:o}),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:n,className:(0,nt.__experimentalGetElementClassName)("caption")}))}},an=()=>Xe({name:tn,metadata:en,settings:nn}),on=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z"})),{cleanEmptyObject:rn}=Ft(nt.privateApis);function ln(e){if(!e?.style?.typography?.fontFamily)return e;const{fontFamily:t,...n}=e.style.typography;return{...e,style:rn({...e.style,typography:n}),fontFamily:t.split("|").pop()}}const sn=e=>{const{borderRadius:t,...n}=e,a=[t,n.style?.border?.radius].find((e=>"number"==typeof e&&0!==e));return a?{...n,style:{...n.style,border:{...n.style?.border,radius:`${a}px`}}}:n};const cn=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:a,customGradient:o,...r}=e;return{...r,style:t}},mn=e=>{const{color:t,textColor:n,...a}={...e,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0};return cn(a)},un={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"}},pn={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({attributes:e,className:t}){const{fontSize:n,linkTarget:a,rel:o,style:r,text:l,title:i,url:s,width:c}=e;if(!l)return null;const m=(0,nt.__experimentalGetBorderClassesAndStyles)(e),u=(0,nt.__experimentalGetColorClassesAndStyles)(e),p=(0,nt.__experimentalGetSpacingClassesAndStyles)(e),d=ut()("wp-block-button__link",u.className,m.className,{"no-border-radius":0===r?.border?.radius}),g={...m.style,...u.style,...p.style},h=ut()(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":n||r?.typography?.fontSize});return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:h})},(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:d,href:s,title:i,style:g,value:l,target:a,rel:o}))}},dn={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({attributes:e,className:t}){const{fontSize:n,linkTarget:a,rel:o,style:r,text:l,title:i,url:s,width:c}=e;if(!l)return null;const m=(0,nt.__experimentalGetBorderClassesAndStyles)(e),u=(0,nt.__experimentalGetColorClassesAndStyles)(e),p=(0,nt.__experimentalGetSpacingClassesAndStyles)(e),d=ut()("wp-block-button__link",u.className,m.className,{"no-border-radius":0===r?.border?.radius}),g={...m.style,...u.style,...p.style},h=ut()(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":n||r?.typography?.fontSize});return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:h})},(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:d,href:s,title:i,style:g,value:l,target:a,rel:o}))},migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},gn=[pn,dn,{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:{...un,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:({style:e})=>"number"==typeof e?.border?.radius,save({attributes:e,className:t}){const{fontSize:n,linkTarget:a,rel:o,style:r,text:l,title:i,url:s,width:c}=e;if(!l)return null;const m=r?.border?.radius,u=(0,nt.__experimentalGetColorClassesAndStyles)(e),p=ut()("wp-block-button__link",u.className,{"no-border-radius":0===r?.border?.radius}),d={borderRadius:m||void 0,...u.style},g=ut()(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":n||r?.typography?.fontSize});return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:g})},(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:p,href:s,title:i,style:d,value:l,target:a,rel:o}))},migrate:(0,jt.compose)(ln,sn)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...un,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({attributes:e,className:t}){const{borderRadius:n,linkTarget:a,rel:o,text:r,title:l,url:i,width:s}=e,c=(0,nt.__experimentalGetColorClassesAndStyles)(e),m=ut()("wp-block-button__link",c.className,{"no-border-radius":0===n}),u={borderRadius:n?n+"px":void 0,...c.style},p=ut()(t,{[`has-custom-width wp-block-button__width-${s}`]:s});return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:p})},(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:m,href:i,title:l,style:u,value:r,target:a,rel:o}))},migrate:(0,jt.compose)(ln,sn)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...un,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({attributes:e,className:t}){const{borderRadius:n,linkTarget:a,rel:o,text:r,title:l,url:i,width:s}=e,c=(0,nt.__experimentalGetColorClassesAndStyles)(e),m=ut()("wp-block-button__link",c.className,{"no-border-radius":0===n}),u={borderRadius:n?n+"px":void 0,...c.style},p=ut()(t,{[`has-custom-width wp-block-button__width-${s}`]:s});return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:p})},(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:m,href:i,title:l,style:u,value:r,target:a,rel:o}))},migrate:(0,jt.compose)(ln,sn)},{supports:{align:!0,alignWide:!1,color:{gradients:!0}},attributes:{...un,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({attributes:e}){const{borderRadius:t,linkTarget:n,rel:a,text:o,title:r,url:l}=e,i=ut()("wp-block-button__link",{"no-border-radius":0===t}),s={borderRadius:t?t+"px":void 0};return(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:i,href:l,title:r,style:s,value:o,target:n,rel:a})},migrate:sn},{supports:{align:!0,alignWide:!1},attributes:{...un,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,jt.compose)(sn,cn,(function(e){if(!e.align)return e;const{align:t,...n}=e;return{...n,className:ut()(n.className,`align${e.align}`)}})),save({attributes:e}){const{backgroundColor:t,borderRadius:n,customBackgroundColor:a,customTextColor:o,customGradient:r,linkTarget:l,gradient:i,rel:s,text:c,textColor:m,title:u,url:p}=e,d=(0,nt.getColorClassName)("color",m),g=!r&&(0,nt.getColorClassName)("background-color",t),h=(0,nt.__experimentalGetGradientClass)(i),b=ut()("wp-block-button__link",{"has-text-color":m||o,[d]:d,"has-background":t||a||r||i,[g]:g,"no-border-radius":0===n,[h]:h}),_={background:r||void 0,backgroundColor:g||r||i?void 0:a,color:d?void 0:o,borderRadius:n?n+"px":void 0};return(0,Ke.createElement)("div",null,(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:b,href:p,title:u,style:_,value:c,target:l,rel:s}))}},{attributes:{...un,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=>e.className&&e.className.includes("is-style-squared"),migrate(e){let t=e.className;return t&&(t=t.replace(/is-style-squared[\s]?/,"").trim()),sn(cn({...e,className:t||void 0,borderRadius:0}))},save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,customTextColor:a,linkTarget:o,rel:r,text:l,textColor:i,title:s,url:c}=e,m=(0,nt.getColorClassName)("color",i),u=(0,nt.getColorClassName)("background-color",t),p=ut()("wp-block-button__link",{"has-text-color":i||a,[m]:m,"has-background":t||n,[u]:u}),d={backgroundColor:u?void 0:n,color:m?void 0:a};return(0,Ke.createElement)("div",null,(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:p,href:c,title:s,style:d,value:l,target:o,rel:r}))}},{attributes:{...un,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},migrate:mn,save({attributes:e}){const{url:t,text:n,title:a,backgroundColor:o,textColor:r,customBackgroundColor:l,customTextColor:i}=e,s=(0,nt.getColorClassName)("color",r),c=(0,nt.getColorClassName)("background-color",o),m=ut()("wp-block-button__link",{"has-text-color":r||i,[s]:s,"has-background":o||l,[c]:c}),u={backgroundColor:c?void 0:l,color:s?void 0:i};return(0,Ke.createElement)("div",null,(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:m,href:t,title:a,style:u,value:n}))}},{attributes:{...un,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save({attributes:e}){const{url:t,text:n,title:a,align:o,color:r,textColor:l}=e,i={backgroundColor:r,color:l};return(0,Ke.createElement)("div",{className:`align${o}`},(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:t,title:a,style:i,value:n}))},migrate:mn},{attributes:{...un,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save({attributes:e}){const{url:t,text:n,title:a,align:o,color:r,textColor:l}=e;return(0,Ke.createElement)("div",{className:`align${o}`,style:{backgroundColor:r}},(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",href:t,title:a,style:{color:l},value:n}))},migrate:mn}],hn=gn,bn="noreferrer noopener",_n="_blank",yn="nofollow";function vn(e){return e.toString().replace(/<\/?a[^>]*>/g,"")}const fn=window.wp.keycodes,kn=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})),xn=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})),wn=[...nt.__experimentalLinkControl.DEFAULT_LINK_SETTINGS,{id:"nofollow",title:(0,tt.__)("Mark as nofollow")}];function En({selectedWidth:e,setAttributes:t}){return(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Width settings")},(0,Ke.createElement)(et.ButtonGroup,{"aria-label":(0,tt.__)("Button width")},[25,50,75,100].map((n=>(0,Ke.createElement)(et.Button,{key:n,size:"small",variant:n===e?"primary":void 0,onClick:()=>{var a;t({width:e===(a=n)?void 0:a})}},n,"%")))))}const Cn=function(e){const{attributes:t,setAttributes:n,className:a,isSelected:o,onReplace:r,mergeBlocks:l,clientId:i}=e,{tagName:s,textAlign:c,linkTarget:m,placeholder:u,rel:p,style:d,text:g,url:h,width:b,metadata:_}=t,y=s||"a",[v,f]=(0,_t.useState)(null),k=(0,nt.__experimentalUseBorderProps)(t),x=(0,nt.__experimentalUseColorProps)(t),w=(0,nt.__experimentalGetSpacingClassesAndStyles)(t),E=(0,nt.__experimentalGetShadowClassesAndStyles)(t),C=(0,_t.useRef)(),S=(0,_t.useRef)(),B=(0,nt.useBlockProps)({ref:(0,jt.useMergeRefs)([f,C]),onKeyDown:function(e){fn.isKeyboardEvent.primary(e,"k")?A(e):fn.isKeyboardEvent.primaryShift(e,"k")&&(H(),S.current?.focus())}}),N=(0,nt.useBlockEditingMode)(),[T,I]=(0,_t.useState)(!1),P=!!h,M=m===_n,z=!!p?.includes(yn),R="a"===y;function A(e){e.preventDefault(),I(!0)}function H(){n({url:void 0,linkTarget:void 0,rel:void 0}),I(!1)}(0,_t.useEffect)((()=>{o||I(!1)}),[o]);const L=(0,_t.useMemo)((()=>({url:h,opensInNewTab:M,nofollow:z})),[h,M,z]),D=function(e){const{replaceBlocks:t,selectionChange:n}=(0,gt.useDispatch)(nt.store),{getBlock:a,getBlockRootClientId:o,getBlockIndex:r}=(0,gt.useSelect)(nt.store),l=(0,_t.useRef)(e);return l.current=e,(0,jt.useRefEffect)((e=>{function i(e){if(e.defaultPrevented||e.keyCode!==fn.ENTER)return;const{content:i,clientId:s}=l.current;if(i.length)return;e.preventDefault();const c=a(o(s)),m=r(s),u=(0,Qe.cloneBlock)({...c,innerBlocks:c.innerBlocks.slice(0,m)}),p=(0,Qe.createBlock)((0,Qe.getDefaultBlockName)()),d=c.innerBlocks.slice(m+1),g=d.length?[(0,Qe.cloneBlock)({...c,innerBlocks:d})]:[];t(c.clientId,[u,p,...g],1),n(p.clientId)}return e.addEventListener("keydown",i),()=>{e.removeEventListener("keydown",i)}}),[])}({content:g,clientId:i}),F=(0,jt.useMergeRefs)([D,S]),{lockUrlControls:V=!1}=(0,gt.useSelect)((e=>{if(!o)return{};const t=Ft(e(Qe.store)).getBlockBindingsSource(_?.bindings?.url?.source);return{lockUrlControls:!!_?.bindings?.url&&(!t||t?.lockAttributesEditing)}}),[o]);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("div",{...B,className:ut()(B.className,{[`has-custom-width wp-block-button__width-${b}`]:b,"has-custom-font-size":B.style.fontSize})},(0,Ke.createElement)(nt.RichText,{ref:F,"aria-label":(0,tt.__)("Button text"),placeholder:u||(0,tt.__)("Add text…"),value:g,onChange:e=>n({text:vn(e)}),withoutInteractiveFormatting:!0,className:ut()(a,"wp-block-button__link",x.className,k.className,{[`has-text-align-${c}`]:c,"no-border-radius":0===d?.border?.radius},(0,nt.__experimentalGetElementClassName)("button")),style:{...k.style,...x.style,...w.style,...E.style},onSplit:e=>(0,Qe.createBlock)("core/button",{...t,text:e}),onReplace:r,onMerge:l,identifier:"text"})),(0,Ke.createElement)(nt.BlockControls,{group:"block"},"default"===N&&(0,Ke.createElement)(nt.AlignmentControl,{value:c,onChange:e=>{n({textAlign:e})}}),!P&&R&&!V&&(0,Ke.createElement)(et.ToolbarButton,{name:"link",icon:kn,title:(0,tt.__)("Link"),shortcut:fn.displayShortcut.primary("k"),onClick:A}),P&&R&&!V&&(0,Ke.createElement)(et.ToolbarButton,{name:"link",icon:xn,title:(0,tt.__)("Unlink"),shortcut:fn.displayShortcut.primaryShift("k"),onClick:H,isActive:!0})),R&&o&&(T||P)&&!V&&(0,Ke.createElement)(et.Popover,{placement:"bottom",onClose:()=>{I(!1),S.current?.focus()},anchor:v,focusOnMount:!!T&&"firstElement",__unstableSlotName:"__unstable-block-tools-after",shift:!0},(0,Ke.createElement)(nt.__experimentalLinkControl,{value:L,onChange:({url:e,opensInNewTab:t,nofollow:a})=>n(function({rel:e="",url:t="",opensInNewTab:n,nofollow:a}){let o,r=e;if(n)o=_n,r=r?.includes(bn)?r:r+` ${bn}`;else{const e=new RegExp(`\\b${bn}\\s*`,"g");r=r?.replace(e,"").trim()}if(a)r=r?.includes(yn)?r:r+` ${yn}`;else{const e=new RegExp(`\\b${yn}\\s*`,"g");r=r?.replace(e,"").trim()}return{url:(0,pt.prependHTTP)(t),linkTarget:o,rel:r||void 0}}({rel:p,url:e,opensInNewTab:t,nofollow:a})),onRemove:()=>{H(),S.current?.focus()},forceIsEditingLink:T,settings:wn})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(En,{selectedWidth:b,setAttributes:n})),(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},R&&(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link rel"),value:p||"",onChange:e=>n({rel:e})})))};const Sn={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,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:{tagName:{type:"string",enum:["a","button"],default:"a"},type:{type:"string",default:"button"},textAlign:{type:"string"},url:{type:"string",source:"attribute",selector:"a",attribute:"href",__experimentalRole:"content"},title:{type:"string",source:"attribute",selector:"a,button",attribute:"title",__experimentalRole:"content"},text:{type:"rich-text",source:"rich-text",selector:"a,button",__experimentalRole:"content"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target",__experimentalRole:"content"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel",__experimentalRole:"content"},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:{__experimentalSkipSerialization:!0},spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},__experimentalSelector:".wp-block-button .wp-block-button__link",interactivity:{clientNavigation:!0}},styles:[{name:"fill",label:"Fill",isDefault:!0},{name:"outline",label:"Outline"}],editorStyle:"wp-block-button-editor",style:"wp-block-button"},{name:Bn}=Sn,Nn={icon:on,example:{attributes:{className:"is-style-fill",text:(0,tt.__)("Call to Action")}},edit:Cn,save:function({attributes:e,className:t}){const{tagName:n,type:a,textAlign:o,fontSize:r,linkTarget:l,rel:i,style:s,text:c,title:m,url:u,width:p}=e;if(nt.RichText.isEmpty(c))return null;const d=n||"a",g="button"===d,h=a||"button",b=(0,nt.__experimentalGetBorderClassesAndStyles)(e),_=(0,nt.__experimentalGetColorClassesAndStyles)(e),y=(0,nt.__experimentalGetSpacingClassesAndStyles)(e),v=(0,nt.__experimentalGetShadowClassesAndStyles)(e),f=ut()("wp-block-button__link",_.className,b.className,{[`has-text-align-${o}`]:o,"no-border-radius":0===s?.border?.radius},(0,nt.__experimentalGetElementClassName)("button")),k={...b.style,..._.style,...y.style,...v.style},x=ut()(t,{[`has-custom-width wp-block-button__width-${p}`]:p,"has-custom-font-size":r||s?.typography?.fontSize});return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:x})},(0,Ke.createElement)(nt.RichText.Content,{tagName:d,type:g?h:null,className:f,href:g?null:u,title:m,style:k,value:c,target:g?null:l,rel:g?null:i}))},deprecated:hn,merge:(e,{text:t=""})=>({...e,text:(e.text||"")+t})},Tn=()=>Xe({name:Bn,metadata:Sn,settings:Nn}),In=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M14.5 17.5H9.5V16H14.5V17.5Z M14.5 8H9.5V6.5H14.5V8Z M7 3.5H17C18.1046 3.5 19 4.39543 19 5.5V9C19 10.1046 18.1046 11 17 11H7C5.89543 11 5 10.1046 5 9V5.5C5 4.39543 5.89543 3.5 7 3.5ZM17 5H7C6.72386 5 6.5 5.22386 6.5 5.5V9C6.5 9.27614 6.72386 9.5 7 9.5H17C17.2761 9.5 17.5 9.27614 17.5 9V5.5C17.5 5.22386 17.2761 5 17 5Z M7 13H17C18.1046 13 19 13.8954 19 15V18.5C19 19.6046 18.1046 20.5 17 20.5H7C5.89543 20.5 5 19.6046 5 18.5V15C5 13.8954 5.89543 13 7 13ZM17 14.5H7C6.72386 14.5 6.5 14.7239 6.5 15V18.5C6.5 18.7761 6.72386 19 7 19H17C17.2761 19 17.5 18.7761 17.5 18.5V15C17.5 14.7239 17.2761 14.5 17 14.5Z"})),Pn=e=>{if(e.layout)return e;const{contentJustification:t,orientation:n,...a}=e;return(t||n)&&Object.assign(a,{layout:{type:"flex",...t&&{justifyContent:t},...n&&{orientation:n}}}),a},Mn=[{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:({contentJustification:e,orientation:t})=>!!e||!!t,migrate:Pn,save:({attributes:{contentJustification:e,orientation:t}})=>(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:ut()({[`is-content-justification-${e}`]:e,"is-vertical":"vertical"===t})})},(0,Ke.createElement)(nt.InnerBlocks.Content,null))},{supports:{align:["center","left","right"],anchor:!0},save:()=>(0,Ke.createElement)("div",null,(0,Ke.createElement)(nt.InnerBlocks.Content,null)),isEligible:({align:e})=>e&&["center","left","right"].includes(e),migrate:e=>Pn({...e,align:void 0,contentJustification:e.align})}],zn=Mn,Rn=window.wp.richText;function An(e,t,n){if(!e)return;const{supports:a}=(0,Qe.getBlockType)(t),o=[];if(["core/paragraph","core/heading","core/image","core/button"].includes(t)&&n&&o.push("id","bindings"),!1!==a.renaming&&o.push("name"),!o.length)return;const r=Object.entries(e).reduce(((e,[t,a])=>o.includes(t)?(e[t]="bindings"===t?n(a):a,e):e),{});return Object.keys(r).length?r:void 0}const Hn={from:[{type:"block",isMultiBlock:!0,blocks:["core/button"],transform:e=>(0,Qe.createBlock)("core/buttons",{},e.map((e=>(0,Qe.createBlock)("core/button",e))))},{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,Qe.createBlock)("core/buttons",{},e.map((e=>{const{content:t,metadata:n}=e,a=(0,Rn.__unstableCreateElement)(document,t),o=a.innerText||"",r=a.querySelector("a"),l=r?.getAttribute("href");return(0,Qe.createBlock)("core/button",{text:o,url:l,metadata:An(n,"core/button",(({content:e})=>({text:e})))})}))),isMatch:e=>e.every((e=>{const t=(0,Rn.__unstableCreateElement)(document,e.content),n=t.innerText||"",a=t.querySelectorAll("a");return n.length<=30&&a.length<=1}))}]},Ln=Hn,Dn={name:"core/button",attributesToCopy:["backgroundColor","border","className","fontFamily","fontSize","gradient","style","textColor","width"]};const Fn=function({attributes:e,className:t}){var n;const{fontSize:a,layout:o,style:r}=e,l=(0,nt.useBlockProps)({className:ut()(t,{"has-custom-font-size":a||r?.typography?.fontSize})}),{preferredStyle:i,hasButtonVariations:s}=(0,gt.useSelect)((e=>{const t=e(nt.store).getSettings().__experimentalPreferredStyleVariations,n=e(Qe.store).getBlockVariations("core/button","inserter");return{preferredStyle:t?.value?.["core/button"],hasButtonVariations:n.length>0}}),[]),c=(0,nt.useInnerBlocksProps)(l,{defaultBlock:Dn,directInsert:!s,template:[["core/button",{className:i&&`is-style-${i}`}]],templateInsertUpdatesSelection:!0,orientation:null!==(n=o?.orientation)&&void 0!==n?n:"horizontal"});return(0,Ke.createElement)("div",{...c})};const Vn={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/buttons",title:"Buttons",category:"design",allowedBlocks:["core/button"],description:"Prompt visitors to take action with a group of button-style links.",keywords:["link"],textdomain:"default",supports:{anchor:!0,align:["wide","full"],html:!1,__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}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"},{name:$n}=Vn,On={icon:In,example:{innerBlocks:[{name:"core/button",attributes:{text:(0,tt.__)("Find out more")}},{name:"core/button",attributes:{text:(0,tt.__)("Contact us")}}]},deprecated:zn,transforms:Ln,edit:Fn,save:function({attributes:e,className:t}){const{fontSize:n,style:a}=e,o=nt.useBlockProps.save({className:ut()(t,{"has-custom-font-size":n||a?.typography?.fontSize})}),r=nt.useInnerBlocksProps.save(o);return(0,Ke.createElement)("div",{...r})}},Gn=()=>Xe({name:$n,metadata:Vn,settings:On}),Un=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.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"})),qn=Rt((e=>{if(!e)return{};const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()+1}}));const jn={from:[{type:"block",blocks:["core/archives"],transform:()=>(0,Qe.createBlock)("core/calendar")}],to:[{type:"block",blocks:["core/archives"],transform:()=>(0,Qe.createBlock)("core/archives")}]},Wn={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,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}},interactivity:{clientNavigation:!0}},style:"wp-block-calendar"},{name:Zn}=Wn,Qn={icon:Un,example:{},edit:function({attributes:e}){const t=(0,nt.useBlockProps)(),{date:n,hasPosts:a,hasPostsResolved:o}=(0,gt.useSelect)((e=>{const{getEntityRecords:t,hasFinishedResolution:n}=e(dt.store),a={status:"publish",per_page:1},o=t("postType","post",a),r=n("getEntityRecords",["postType","post",a]);let l;const i=e("core/editor");if(i){"post"===i.getEditedPostAttribute("type")&&(l=i.getEditedPostAttribute("date"))}return{date:l,hasPostsResolved:r,hasPosts:r&&1===o?.length}}),[]);return a?(0,Ke.createElement)("div",{...t},(0,Ke.createElement)(et.Disabled,null,(0,Ke.createElement)(ot(),{block:"core/calendar",attributes:{...e,...qn(n)}}))):(0,Ke.createElement)("div",{...t},(0,Ke.createElement)(et.Placeholder,{icon:Un,label:(0,tt.__)("Calendar")},o?(0,tt.__)("No published posts found."):(0,Ke.createElement)(et.Spinner,null)))},transforms:jn},Kn=()=>Xe({name:Zn,metadata:Wn,settings:Qn}),Yn=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.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"})),Jn=window.wp.htmlEntities,Xn=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.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 ea={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,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,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-categories-editor",style:"wp-block-categories"},{name:ta}=ea,na={icon:Yn,example:{},edit:function e({attributes:{displayAsDropdown:t,showHierarchy:n,showPostCounts:a,showOnlyTopLevel:o,showEmpty:r},setAttributes:l,className:i}){const s=(0,jt.useInstanceId)(e,"blocks-category-select"),c={per_page:-1,hide_empty:!r,context:"view"};o&&(c.parent=0);const{records:m,isResolving:u}=(0,dt.useEntityRecords)("taxonomy","category",c),p=e=>m?.length?null===e?m:m.filter((({parent:t})=>t===e)):[],d=e=>t=>l({[e]:t}),g=e=>e?(0,Jn.decodeEntities)(e).trim():(0,tt.__)("(Untitled)"),h=e=>{const t=p(e.id),{id:o,link:r,count:l,name:i}=e;return(0,Ke.createElement)("li",{key:o,className:`cat-item cat-item-${o}`},(0,Ke.createElement)("a",{href:r,target:"_blank",rel:"noreferrer noopener"},g(i)),a&&` (${l})`,n&&!!t.length&&(0,Ke.createElement)("ul",{className:"children"},t.map((e=>h(e)))))},b=(e,t)=>{const{id:o,count:r,name:l}=e,i=p(o);return[(0,Ke.createElement)("option",{key:o,className:`level-${t}`},Array.from({length:3*t}).map((()=>" ")),g(l),a&&` (${r})`),n&&!!i.length&&i.map((e=>b(e,t+1)))]},_=!m?.length||t||u?"div":"ul",y=ut()(i,{"wp-block-categories-list":!!m?.length&&!t&&!u,"wp-block-categories-dropdown":!!m?.length&&t&&!u}),v=(0,nt.useBlockProps)({className:y});return(0,Ke.createElement)(_,{...v},(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display as dropdown"),checked:t,onChange:d("displayAsDropdown")}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show post counts"),checked:a,onChange:d("showPostCounts")}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show only top level categories"),checked:o,onChange:d("showOnlyTopLevel")}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show empty categories"),checked:r,onChange:d("showEmpty")}),!o&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show hierarchy"),checked:n,onChange:d("showHierarchy")}))),u&&(0,Ke.createElement)(et.Placeholder,{icon:Xn,label:(0,tt.__)("Categories")},(0,Ke.createElement)(et.Spinner,null)),!u&&0===m?.length&&(0,Ke.createElement)("p",null,(0,tt.__)("Your site does not have any posts, so there is nothing to display here at the moment.")),!u&&m?.length>0&&(t?(()=>{const e=p(n?0:null);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.VisuallyHidden,{as:"label",htmlFor:s},(0,tt.__)("Categories")),(0,Ke.createElement)("select",{id:s},(0,Ke.createElement)("option",null,(0,tt.__)("Select Category")),e.map((e=>b(e,0)))))})():p(n?0:null).map((e=>h(e)))))}},aa=()=>Xe({name:ta,metadata:ea,settings:na}),oa=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.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"})),ra=({clientId:e})=>{const{replaceBlocks:t}=(0,gt.useDispatch)(nt.store),n=(0,gt.useSelect)((t=>t(nt.store).getBlock(e)),[e]);return(0,Ke.createElement)(et.ToolbarButton,{onClick:()=>t(n.clientId,(0,Qe.rawHandler)({HTML:(0,Qe.serialize)(n)}))},(0,tt.__)("Convert to blocks"))},la=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"}));function ia({onClick:e,isModalFullScreen:t}){return(0,jt.useViewportMatch)("small","<")?null:(0,Ke.createElement)(et.Button,{onClick:e,icon:la,isPressed:t,label:t?(0,tt.__)("Exit fullscreen"):(0,tt.__)("Enter fullscreen")})}function sa(e){const t=(0,gt.useSelect)((e=>e(nt.store).getSettings().styles));return(0,_t.useEffect)((()=>{const{baseURL:n,suffix:a,settings:o}=window.wpEditorL10n.tinymce;return window.tinymce.EditorManager.overrideDefaults({base_url:n,suffix:a}),window.wp.oldEditor.initialize(e.id,{tinymce:{...o,setup(e){e.on("init",(()=>{const n=e.getDoc();t.forEach((({css:e})=>{const t=n.createElement("style");t.innerHTML=e,n.head.appendChild(t)}))}))}}}),()=>{window.wp.oldEditor.remove(e.id)}}),[]),(0,Ke.createElement)("textarea",{...e})}function ca(e){const{clientId:t,attributes:{content:n},setAttributes:a,onReplace:o}=e,[r,l]=(0,_t.useState)(!1),[i,s]=(0,_t.useState)(!1),c=`editor-${t}`,m=()=>n?l(!1):o([]);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.ToolbarButton,{onClick:()=>l(!0)},(0,tt.__)("Edit")))),n&&(0,Ke.createElement)(_t.RawHTML,null,n),(r||!n)&&(0,Ke.createElement)(et.Modal,{title:(0,tt.__)("Classic Editor"),onRequestClose:m,shouldCloseOnClickOutside:!1,overlayClassName:"block-editor-freeform-modal",isFullScreen:i,className:"block-editor-freeform-modal__content",headerActions:(0,Ke.createElement)(ia,{onClick:()=>s(!i),isModalFullScreen:i})},(0,Ke.createElement)(sa,{id:c,defaultValue:n}),(0,Ke.createElement)(et.Flex,{className:"block-editor-freeform-modal__actions",justify:"flex-end",expanded:!1},(0,Ke.createElement)(et.FlexItem,null,(0,Ke.createElement)(et.Button,{variant:"tertiary",onClick:m},(0,tt.__)("Cancel"))),(0,Ke.createElement)(et.FlexItem,null,(0,Ke.createElement)(et.Button,{variant:"primary",onClick:()=>{a({content:window.wp.oldEditor.getContent(c)}),l(!1)}},(0,tt.__)("Save"))))))}const{wp:ma}=window;function ua({clientId:e,attributes:{content:t},setAttributes:n,onReplace:a}){const{getMultiSelectedBlockClientIds:o}=(0,gt.useSelect)(nt.store),r=(0,_t.useRef)(!1);return(0,_t.useEffect)((()=>{if(!r.current)return;const n=window.tinymce.get(`editor-${e}`),a=n?.getContent();a!==t&&n.setContent(t||"")}),[t]),(0,_t.useEffect)((()=>{const{baseURL:l,suffix:i}=window.wpEditorL10n.tinymce;function s(e){let r;t&&e.on("loadContent",(()=>e.setContent(t))),e.on("blur",(()=>{r=e.selection.getBookmark(2,!0);const t=document.querySelector(".interface-interface-skeleton__content"),a=t.scrollTop;return o()?.length||n({content:e.getContent()}),e.once("focus",(()=>{r&&(e.selection.moveToBookmark(r),t.scrollTop!==a&&(t.scrollTop=a))})),!1})),e.on("mousedown touchstart",(()=>{r=null}));const l=(0,jt.debounce)((()=>{const t=e.getContent();t!==e._lastChange&&(e._lastChange=t,n({content:t}))}),250);e.on("Paste Change input Undo Redo",l),e.on("remove",l.cancel),e.on("keydown",(t=>{fn.isKeyboardEvent.primary(t,"z")&&t.stopPropagation(),t.keyCode!==fn.BACKSPACE&&t.keyCode!==fn.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)||(a([]),t.preventDefault(),t.stopImmediatePropagation());const{altKey:n}=t;n&&t.keyCode===fn.F10&&t.stopPropagation()})),e.on("init",(()=>{const t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())}))}function c(){const{settings:t}=window.wpEditorL10n.tinymce;ma.oldEditor.initialize(`editor-${e}`,{tinymce:{...t,inline:!0,content_css:!1,fixed_toolbar_container:`#toolbar-${e}`,setup:s}})}function m(){"complete"===document.readyState&&c()}return r.current=!0,window.tinymce.EditorManager.overrideDefaults({base_url:l,suffix:i}),"complete"===document.readyState?c():document.addEventListener("readystatechange",m),()=>{document.removeEventListener("readystatechange",m),ma.oldEditor.remove(`editor-${e}`)}}),[]),(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("div",{key:"toolbar",id:`toolbar-${e}`,className:"block-library-classic__toolbar",onClick:function(){const t=window.tinymce.get(`editor-${e}`);t&&t.focus()},"data-placeholder":(0,tt.__)("Classic"),onKeyDown:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}}),(0,Ke.createElement)("div",{key:"editor",id:`editor-${e}`,className:"wp-block-freeform block-library-rich-text__tinymce"}))}const pa={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/freeform",title:"Classic",category:"text",description:"Use the classic WordPress editor.",textdomain:"default",attributes:{content:{type:"string",source:"raw"}},supports:{className:!1,customClassName:!1,reusable:!1},editorStyle:"wp-block-freeform-editor"},{name:da}=pa,ga={icon:oa,edit:function(e){const{clientId:t}=e,n=(0,gt.useSelect)((e=>e(nt.store).canRemoveBlock(t)),[t]),[a,o]=(0,_t.useState)(!1),r=(0,jt.useRefEffect)((e=>{o(e.ownerDocument!==document)}),[]);return(0,Ke.createElement)(Ke.Fragment,null,n&&(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(ra,{clientId:t}))),(0,Ke.createElement)("div",{...(0,nt.useBlockProps)({ref:r})},a?(0,Ke.createElement)(ca,{...e}):(0,Ke.createElement)(ua,{...e})))},save:function({attributes:e}){const{content:t}=e;return(0,Ke.createElement)(_t.RawHTML,null,t)}},ha=()=>Xe({name:da,metadata:pa,settings:ga}),ba=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.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 _a(e){return e.replace(/\[/g,"&#91;")}function ya(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1&#47;&#47;$2")}const va={from:[{type:"enter",regExp:/^```$/,transform:()=>(0,Qe.createBlock)("core/code")},{type:"block",blocks:["core/paragraph"],transform:({content:e,metadata:t})=>(0,Qe.createBlock)("core/code",{content:e,metadata:An(t,"core/code")})},{type:"block",blocks:["core/html"],transform:({content:e,metadata:t})=>(0,Qe.createBlock)("core/code",{content:(0,Rn.toHTMLString)({value:(0,Rn.create)({text:e})}),metadata:An(t,"core/code")})},{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:({content:e,metadata:t})=>(0,Qe.createBlock)("core/paragraph",{content:e,metadata:An(t,"core/paragraph")})}]},fa=va,ka={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/code",title:"Code",category:"text",description:"Display code snippets that respect your spacing and tabs.",textdomain:"default",attributes:{content:{type:"rich-text",source:"rich-text",selector:"code",__unstablePreserveWhiteSpace:!0}},supports:{align:["wide"],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,__experimentalDefaultControls:{margin:!1,padding:!1}},__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}},interactivity:{clientNavigation:!0}},style:"wp-block-code"},{name:xa}=ka,wa={icon:ba,example:{attributes:{content:(0,tt.__)("// 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 );")}},merge:(e,t)=>({content:e.content+"\n\n"+t.content}),transforms:fa,edit:function({attributes:e,setAttributes:t,onRemove:n,insertBlocksAfter:a,mergeBlocks:o}){const r=(0,nt.useBlockProps)();return(0,Ke.createElement)("pre",{...r},(0,Ke.createElement)(nt.RichText,{tagName:"code",identifier:"content",value:e.content,onChange:e=>t({content:e}),onRemove:n,onMerge:o,placeholder:(0,tt.__)("Write code…"),"aria-label":(0,tt.__)("Code"),preserveWhiteSpace:!0,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>a((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))}))},save:function({attributes:e}){return(0,Ke.createElement)("pre",{...nt.useBlockProps.save()},(0,Ke.createElement)(nt.RichText.Content,{tagName:"code",value:(t="string"==typeof e.content?e.content:e.content.toHTMLString({preserveWhiteSpace:!0}),(0,jt.pipe)(_a,ya)(t||""))}));var t}},Ea=()=>Xe({name:xa,metadata:ka,settings:wa}),Ca=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.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"})),Sa=[{attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}},isEligible:({width:e})=>isFinite(e),migrate:e=>({...e,width:`${e.width}%`}),save({attributes:e}){const{verticalAlignment:t,width:n}=e,a=ut()({[`is-vertically-aligned-${t}`]:t}),o={flexBasis:n+"%"};return(0,Ke.createElement)("div",{className:a,style:o},(0,Ke.createElement)(nt.InnerBlocks.Content,null))}}],Ba=Sa;const Na=function({attributes:{verticalAlignment:e,width:t,templateLock:n,allowedBlocks:a},setAttributes:o,clientId:r}){const l=ut()("block-core-columns",{[`is-vertically-aligned-${e}`]:e}),[i]=(0,nt.useSettings)("spacing.units"),s=(0,et.__experimentalUseCustomUnits)({availableUnits:i||["%","px","em","rem","vw"]}),{columnsIds:c,hasChildBlocks:m,rootClientId:u}=(0,gt.useSelect)((e=>{const{getBlockOrder:t,getBlockRootClientId:n}=e(nt.store),a=n(r);return{hasChildBlocks:t(r).length>0,rootClientId:a,columnsIds:t(a)}}),[r]),{updateBlockAttributes:p}=(0,gt.useDispatch)(nt.store),d=Number.isFinite(t)?t+"%":t,g=(0,nt.useBlockProps)({className:l,style:d?{flexBasis:d}:void 0}),h=c.length,b=c.indexOf(r)+1,_=(0,tt.sprintf)((0,tt.__)("%1$s (%2$d of %3$d)"),g["aria-label"],b,h),y=(0,nt.useInnerBlocksProps)({...g,"aria-label":_},{templateLock:n,allowedBlocks:a,renderAppender:m?void 0:nt.InnerBlocks.ButtonBlockAppender});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(nt.BlockVerticalAlignmentToolbar,{onChange:e=>{o({verticalAlignment:e}),p(u,{verticalAlignment:null})},value:e,controls:["top","center","bottom","stretch"]})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.__experimentalUnitControl,{label:(0,tt.__)("Width"),labelPosition:"edge",__unstableInputWidth:"80px",value:t||"",onChange:e=>{e=0>parseFloat(e)?"0":e,o({width:e})},units:s}))),(0,Ke.createElement)("div",{...y}))};const Ta={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/column",title:"Column",category:"design",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:{__experimentalOnEnter:!0,anchor:!0,reusable:!1,html:!1,color:{gradients:!0,heading:!0,button:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},shadow:!0,spacing:{blockGap:!0,padding:!0,__experimentalDefaultControls:{padding:!0,blockGap:!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}},layout:!0,interactivity:{clientNavigation:!0}}},{name:Ia}=Ta,Pa={icon:Ca,edit:Na,save:function({attributes:e}){const{verticalAlignment:t,width:n}=e,a=ut()({[`is-vertically-aligned-${t}`]:t});let o;if(n&&/\d/.test(n)){let e=Number.isFinite(n)?n+"%":n;if(!Number.isFinite(n)&&n?.endsWith("%")){const t=1e12;e=Math.round(Number.parseFloat(n)*t)/t+"%"}o={flexBasis:e}}const r=nt.useBlockProps.save({className:a,style:o}),l=nt.useInnerBlocksProps.save(r);return(0,Ke.createElement)("div",{...l})},deprecated:Ba},Ma=()=>Xe({name:Ia,metadata:Ta,settings:Pa}),za=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 7.5h-5v10h5v-10Zm1.5 0v10H19a.5.5 0 0 0 .5-.5V8a.5.5 0 0 0-.5-.5h-2.5ZM6 7.5h2.5v10H6a.5.5 0 0 1-.5-.5V8a.5.5 0 0 1 .5-.5ZM6 6h13a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Z"}));function Ra(e){let t,{doc:n}=Ra;n||(n=document.implementation.createHTMLDocument(""),Ra.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}const Aa=[{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:a,...o}=e;return{...o,style:t,isStackedOnMobile:!0}},save({attributes:e}){const{verticalAlignment:t,backgroundColor:n,customBackgroundColor:a,textColor:o,customTextColor:r}=e,l=(0,nt.getColorClassName)("background-color",n),i=(0,nt.getColorClassName)("color",o),s=ut()({"has-background":n||a,"has-text-color":o||r,[l]:l,[i]:i,[`are-vertically-aligned-${t}`]:t}),c={backgroundColor:l?void 0:a,color:i?void 0:r};return(0,Ke.createElement)("div",{className:s||void 0,style:c},(0,Ke.createElement)(nt.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},isEligible:(e,t)=>!!t.some((e=>/layout-column-\d+/.test(e.originalContent)))&&t.some((e=>void 0!==Ra(e.originalContent))),migrate(e,t){const n=t.reduce(((e,t)=>{const{originalContent:n}=t;let a=Ra(n);return void 0===a&&(a=0),e[a]||(e[a]=[]),e[a].push(t),e}),[]).map((e=>(0,Qe.createBlock)("core/column",{},e))),{columns:a,...o}=e;return[{...o,isStackedOnMobile:!0},n]},save({attributes:e}){const{columns:t}=e;return(0,Ke.createElement)("div",{className:`has-${t}-columns`},(0,Ke.createElement)(nt.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},migrate(e,t){const{columns:n,...a}=e;return[e={...a,isStackedOnMobile:!0},t]},save({attributes:e}){const{verticalAlignment:t,columns:n}=e,a=ut()(`has-${n}-columns`,{[`are-vertically-aligned-${t}`]:t});return(0,Ke.createElement)("div",{className:a},(0,Ke.createElement)(nt.InnerBlocks.Content,null))}}],Ha=e=>{const t=parseFloat(e);return Number.isFinite(t)?parseFloat(t.toFixed(2)):void 0};function La(e,t){const{width:n=100/t}=e.attributes;return Ha(n)}function Da(e,t,n=e.length){const a=function(e,t=e.length){return e.reduce(((e,n)=>e+La(n,t)),0)}(e,n);return Object.fromEntries(Object.entries(function(e,t=e.length){return e.reduce(((e,n)=>{const a=La(n,t);return Object.assign(e,{[n.clientId]:a})}),{})}(e,n)).map((([e,n])=>[e,Ha(t*n/a)])))}function Fa(e,t){return e.map((e=>({...e,attributes:{...e.attributes,width:`${t[e.clientId]}%`}})))}function Va({attributes:e,setAttributes:t,clientId:n}){const{isStackedOnMobile:a,verticalAlignment:o,templateLock:r}=e,{count:l,canInsertColumnBlock:i,minCount:s}=(0,gt.useSelect)((e=>{const{canInsertBlockType:t,canRemoveBlock:a,getBlocks:o,getBlockCount:r}=e(nt.store),l=o(n).reduce(((e,t,n)=>(a(t.clientId)||e.push(n),e)),[]);return{count:r(n),canInsertColumnBlock:t("core/column",n),minCount:Math.max(...l)+1}}),[n]),c=(0,gt.useRegistry)(),{getBlocks:m,getBlockOrder:u}=(0,gt.useSelect)(nt.store),{updateBlockAttributes:p,replaceInnerBlocks:d}=(0,gt.useDispatch)(nt.store),g=ut()({[`are-vertically-aligned-${o}`]:o,"is-not-stacked-on-mobile":!a}),h=(0,nt.useBlockProps)({className:g}),b=(0,nt.useInnerBlocksProps)(h,{orientation:"horizontal",renderAppender:!1,templateLock:r});function _(e,t){let a=m(n);const o=a.every((e=>{const t=e.attributes.width;return Number.isFinite(t?.endsWith?.("%")?parseFloat(t):t)}));const r=t>e;if(r&&o){const n=Ha(100/t);a=[...Fa(a,Da(a,100-n)),...Array.from({length:t-e}).map((()=>(0,Qe.createBlock)("core/column",{width:`${n}%`})))]}else if(r)a=[...a,...Array.from({length:t-e}).map((()=>(0,Qe.createBlock)("core/column")))];else if(t<e&&(a=a.slice(0,-(e-t)),o)){a=Fa(a,Da(a,100))}d(n,a)}return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(nt.BlockVerticalAlignmentToolbar,{onChange:function(e){const a=u(n);c.batch((()=>{t({verticalAlignment:e}),p(a,{verticalAlignment:e})}))},value:o})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},i&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Columns"),value:l,onChange:e=>_(l,Math.max(s,e)),min:Math.max(1,s),max:Math.max(6,l)}),l>6&&(0,Ke.createElement)(et.Notice,{status:"warning",isDismissible:!1},(0,tt.__)("This column count exceeds the recommended amount and may cause visual breakage."))),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Stack on mobile"),checked:a,onChange:()=>t({isStackedOnMobile:!a})}))),(0,Ke.createElement)("div",{...b}))}function $a({clientId:e,name:t,setAttributes:n}){const{blockType:a,defaultVariation:o,variations:r}=(0,gt.useSelect)((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:o}=e(Qe.store);return{blockType:a(t),defaultVariation:o(t,"block"),variations:n(t,"block")}}),[t]),{replaceInnerBlocks:l}=(0,gt.useDispatch)(nt.store),i=(0,nt.useBlockProps)();return(0,Ke.createElement)("div",{...i},(0,Ke.createElement)(nt.__experimentalBlockVariationPicker,{icon:a?.icon?.src,label:a?.title,variations:r,onSelect:(t=o)=>{t.attributes&&n(t.attributes),t.innerBlocks&&l(e,(0,Qe.createBlocksFromInnerBlocksTemplate)(t.innerBlocks),!0)},allowSkip:!0}))}const Oa=e=>{const{clientId:t}=e,n=(0,gt.useSelect)((e=>e(nt.store).getBlocks(t).length>0),[t])?Va:$a;return(0,Ke.createElement)(n,{...e})};const Ga=[{name:"one-column-full",title:(0,tt.__)("100"),description:(0,tt.__)("One column"),icon:(0,Ke.createElement)(et.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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,tt.__)("50 / 50"),description:(0,tt.__)("Two columns; equal split"),icon:(0,Ke.createElement)(et.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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,tt.__)("33 / 66"),description:(0,tt.__)("Two columns; one-third, two-thirds split"),icon:(0,Ke.createElement)(et.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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,tt.__)("66 / 33"),description:(0,tt.__)("Two columns; two-thirds, one-third split"),icon:(0,Ke.createElement)(et.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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,tt.__)("33 / 33 / 33"),description:(0,tt.__)("Three columns; equal split"),icon:(0,Ke.createElement)(et.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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,tt.__)("25 / 50 / 25"),description:(0,tt.__)("Three columns; wide center column"),icon:(0,Ke.createElement)(et.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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"]}],Ua={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:e=>{const t=+(100/e.length).toFixed(2),n=e.map((({name:e,attributes:n,innerBlocks:a})=>["core/column",{width:`${t}%`},[[e,{...n},a]]]));return(0,Qe.createBlock)("core/columns",{},(0,Qe.createBlocksFromInnerBlocksTemplate)(n))},isMatch:({length:e},t)=>(1!==t.length||"core/columns"!==t[0].name)&&(e&&e<=6)},{type:"block",blocks:["core/media-text"],priority:1,transform:(e,t)=>{const{align:n,backgroundColor:a,textColor:o,style:r,mediaAlt:l,mediaId:i,mediaPosition:s,mediaSizeSlug:c,mediaType:m,mediaUrl:u,mediaWidth:p,verticalAlignment:d}=e;let g;if("image"!==m&&m)g=["core/video",{id:i,src:u}];else{g=["core/image",{...{id:i,alt:l,url:u,sizeSlug:c},...{href:e.href,linkClass:e.linkClass,linkDestination:e.linkDestination,linkTarget:e.linkTarget,rel:e.rel}}]}const h=[["core/column",{width:`${p}%`},[g]],["core/column",{width:100-p+"%"},t]];return"right"===s&&h.reverse(),(0,Qe.createBlock)("core/columns",{align:n,backgroundColor:a,textColor:o,style:r,verticalAlignment:d},(0,Qe.createBlocksFromInnerBlocksTemplate)(h))}}],ungroup:(e,t)=>t.flatMap((e=>e.innerBlocks))},qa=Ua,ja={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/columns",title:"Columns",category:"design",allowedBlocks:["core/column"],description:"Display content in multiple columns, with blocks added to each column.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0,heading:!0,button:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{blockGap:{__experimentalDefault:"2em",sides:["horizontal","vertical"]},margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},layout:{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}},interactivity:{clientNavigation:!0},shadow:!0},editorStyle:"wp-block-columns-editor",style:"wp-block-columns"},{name:Wa}=ja,Za={icon:za,variations:Ga,example:{viewportWidth:600,innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,tt.__)("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,tt.__)("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,tt.__)("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,tt.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:Aa,edit:Oa,save:function({attributes:e}){const{isStackedOnMobile:t,verticalAlignment:n}=e,a=ut()({[`are-vertically-aligned-${n}`]:n,"is-not-stacked-on-mobile":!t}),o=nt.useBlockProps.save({className:a}),r=nt.useInnerBlocksProps.save(o);return(0,Ke.createElement)("div",{...r})},transforms:qa},Qa=()=>Xe({name:Wa,metadata:ja,settings:Za}),Ka=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.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"})),Ya=[{attributes:{tagName:{type:"string",default:"div"}},apiVersion:3,supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}}},save({attributes:{tagName:e}}){const t=nt.useBlockProps.save(),{className:n}=t,a=n?.split(" ")||[],o=a?.filter((e=>"wp-block-comments"!==e)),r={...t,className:o.join(" ")};return(0,Ke.createElement)(e,{...r},(0,Ke.createElement)(nt.InnerBlocks.Content,null))}}];function Ja({attributes:{tagName:e},setAttributes:t}){const n={section:(0,tt.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element."),aside:(0,tt.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.")};return(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("HTML element"),options:[{label:(0,tt.__)("Default (<div>)"),value:"div"},{label:"<section>",value:"section"},{label:"<aside>",value:"aside"}],value:e,onChange:e=>t({tagName:e}),help:n[e]})))}const Xa=()=>{const e=(0,jt.useInstanceId)(Xa);return(0,Ke.createElement)("div",{className:"comment-respond"},(0,Ke.createElement)("h3",{className:"comment-reply-title"},(0,tt.__)("Leave a Reply")),(0,Ke.createElement)("form",{noValidate:!0,className:"comment-form",onSubmit:e=>e.preventDefault()},(0,Ke.createElement)("p",null,(0,Ke.createElement)("label",{htmlFor:`comment-${e}`},(0,tt.__)("Comment")),(0,Ke.createElement)("textarea",{id:`comment-${e}`,name:"comment",cols:"45",rows:"8",readOnly:!0})),(0,Ke.createElement)("p",{className:"form-submit wp-block-button"},(0,Ke.createElement)("input",{name:"submit",type:"submit",className:ut()("wp-block-button__link",(0,nt.__experimentalGetElementClassName)("button")),label:(0,tt.__)("Post Comment"),value:(0,tt.__)("Post Comment"),"aria-disabled":"true"}))))},eo=({postId:e,postType:t})=>{const[n,a]=(0,dt.useEntityProp)("postType",t,"comment_status",e),o=void 0===t||void 0===e,{defaultCommentStatus:r}=(0,gt.useSelect)((e=>e(nt.store).getSettings().__experimentalDiscussionSettings)),l=(0,gt.useSelect)((e=>!!t&&!!e(dt.store).getPostType(t)?.supports.comments));if(!o&&"open"!==n){if("closed"===n){const e=[(0,Ke.createElement)(et.Button,{key:"enableComments",onClick:()=>a("open"),variant:"primary"},(0,tt._x)("Enable comments","action that affects the current post"))];return(0,Ke.createElement)(nt.Warning,{actions:e},(0,tt.__)("Post Comments Form block: Comments are not enabled for this item."))}if(!l)return(0,Ke.createElement)(nt.Warning,null,(0,tt.sprintf)((0,tt.__)("Post Comments Form block: Comments are not enabled for this post type (%s)."),t));if("open"!==r)return(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Post Comments Form block: Comments are not enabled."))}return(0,Ke.createElement)(Xa,null)};function to({postType:e,postId:t}){let[n]=(0,dt.useEntityProp)("postType",e,"title",t);n=n||(0,tt.__)("Post Title");const{avatarURL:a}=(0,gt.useSelect)((e=>e(nt.store).getSettings().__experimentalDiscussionSettings));return(0,Ke.createElement)("div",{className:"wp-block-comments__legacy-placeholder",inert:"true"},(0,Ke.createElement)("h3",null,(0,tt.sprintf)((0,tt.__)("One response to %s"),n)),(0,Ke.createElement)("div",{className:"navigation"},(0,Ke.createElement)("div",{className:"alignleft"},(0,Ke.createElement)("a",{href:"#top"},"« ",(0,tt.__)("Older Comments"))),(0,Ke.createElement)("div",{className:"alignright"},(0,Ke.createElement)("a",{href:"#top"},(0,tt.__)("Newer Comments")," »"))),(0,Ke.createElement)("ol",{className:"commentlist"},(0,Ke.createElement)("li",{className:"comment even thread-even depth-1"},(0,Ke.createElement)("article",{className:"comment-body"},(0,Ke.createElement)("footer",{className:"comment-meta"},(0,Ke.createElement)("div",{className:"comment-author vcard"},(0,Ke.createElement)("img",{alt:(0,tt.__)("Commenter Avatar"),src:a,className:"avatar avatar-32 photo",height:"32",width:"32",loading:"lazy"}),(0,Ke.createElement)("b",{className:"fn"},(0,Ke.createElement)("a",{href:"#top",className:"url"},(0,tt.__)("A WordPress Commenter")))," ",(0,Ke.createElement)("span",{className:"says"},(0,tt.__)("says"),":")),(0,Ke.createElement)("div",{className:"comment-metadata"},(0,Ke.createElement)("a",{href:"#top"},(0,Ke.createElement)("time",{dateTime:"2000-01-01T00:00:00+00:00"},(0,tt.__)("January 1, 2000 at 00:00 am")))," ",(0,Ke.createElement)("span",{className:"edit-link"},(0,Ke.createElement)("a",{className:"comment-edit-link",href:"#top"},(0,tt.__)("Edit"))))),(0,Ke.createElement)("div",{className:"comment-content"},(0,Ke.createElement)("p",null,(0,tt.__)("Hi, this is a comment."),(0,Ke.createElement)("br",null),(0,tt.__)("To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard."),(0,Ke.createElement)("br",null),(0,_t.createInterpolateElement)((0,tt.__)("Commenter avatars come from <a>Gravatar</a>."),{a:(0,Ke.createElement)("a",{href:"https://gravatar.com/"})}))),(0,Ke.createElement)("div",{className:"reply"},(0,Ke.createElement)("a",{className:"comment-reply-link",href:"#top","aria-label":(0,tt.__)("Reply to A WordPress Commenter")},(0,tt.__)("Reply")))))),(0,Ke.createElement)("div",{className:"navigation"},(0,Ke.createElement)("div",{className:"alignleft"},(0,Ke.createElement)("a",{href:"#top"},"« ",(0,tt.__)("Older Comments"))),(0,Ke.createElement)("div",{className:"alignright"},(0,Ke.createElement)("a",{href:"#top"},(0,tt.__)("Newer Comments")," »"))),(0,Ke.createElement)(eo,{postId:t,postType:e}))}function no({attributes:e,setAttributes:t,context:{postType:n,postId:a}}){const{textAlign:o}=e,r=[(0,Ke.createElement)(et.Button,{key:"convert",onClick:()=>{t({legacy:!1})},variant:"primary"},(0,tt.__)("Switch to editable mode"))],l=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${o}`]:o})});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:o,onChange:e=>{t({textAlign:e})}})),(0,Ke.createElement)("div",{...l},(0,Ke.createElement)(nt.Warning,{actions:r},(0,tt.__)("Comments block: You’re currently using the legacy version of the block. The following is just a placeholder - the final styling will likely look different. For a better representation and more customization options, switch the block to its editable mode.")),(0,Ke.createElement)(to,{postId:a,postType:n})))}const ao=[["core/comments-title"],["core/comment-template",{},[["core/columns",{},[["core/column",{width:"40px"},[["core/avatar",{size:40,style:{border:{radius:"20px"}}}]]],["core/column",{},[["core/comment-author-name",{fontSize:"small"}],["core/group",{layout:{type:"flex"},style:{spacing:{margin:{top:"0px",bottom:"0px"}}}},[["core/comment-date",{fontSize:"small"}],["core/comment-edit-link",{fontSize:"small"}]]],["core/comment-content"],["core/comment-reply-link",{fontSize:"small"}]]]]]]],["core/comments-pagination"],["core/post-comments-form"]];const oo={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments",title:"Comments",category:"theme",description:"An advanced block that allows displaying post comments using different visual configurations.",textdomain:"default",attributes:{tagName:{type:"string",default:"div"},legacy:{type:"boolean",default:!1}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},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-comments-editor",usesContext:["postId","postType"]},{name:ro}=oo,lo={icon:Ka,edit:function(e){const{attributes:t,setAttributes:n}=e,{tagName:a,legacy:o}=t,r=(0,nt.useBlockProps)(),l=(0,nt.useInnerBlocksProps)(r,{template:ao});return o?(0,Ke.createElement)(no,{...e}):(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Ja,{attributes:t,setAttributes:n}),(0,Ke.createElement)(a,{...l}))},save:function({attributes:{tagName:e,legacy:t}}){const n=nt.useBlockProps.save(),a=nt.useInnerBlocksProps.save(n);return t?null:(0,Ke.createElement)(e,{...a})},deprecated:Ya},io=()=>Xe({name:ro,metadata:oo,settings:lo});const so={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:"fse",name:"core/comment-author-avatar",title:"Comment Author Avatar (deprecated)",category:"theme",ancestor:["core/comment-template"],description:"This block is deprecated. Please use the Avatar block instead.",textdomain:"default",attributes:{width:{type:"number",default:96},height:{type:"number",default:96}},usesContext:["commentId"],supports:{html:!1,inserter:!1,__experimentalBorder:{radius:!0,width:!0,color:!0,style:!0},color:{background:!0,text:!1,__experimentalDefaultControls:{background:!0}},spacing:{__experimentalSkipSerialization:!0,margin:!0,padding:!0},interactivity:{clientNavigation:!0}}},{name:co}=so,mo={icon:ct,edit:function({attributes:e,context:{commentId:t},setAttributes:n,isSelected:a}){const{height:o,width:r}=e,[l]=(0,dt.useEntityProp)("root","comment","author_avatar_urls",t),[i]=(0,dt.useEntityProp)("root","comment","author_name",t),s=l?Object.values(l):null,c=l?Object.keys(l):null,m=c?c[0]:24,u=c?c[c.length-1]:96,p=(0,nt.useBlockProps)(),d=(0,nt.__experimentalGetSpacingClassesAndStyles)(e),g=Math.floor(2.5*u),{avatarURL:h}=(0,gt.useSelect)((e=>{const{getSettings:t}=e(nt.store),{__experimentalDiscussionSettings:n}=t();return n})),b=(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Avatar Settings")},(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Image size"),onChange:e=>n({width:e,height:e}),min:m,max:g,initialPosition:r,value:r}))),_=(0,Ke.createElement)(et.ResizableBox,{size:{width:r,height:o},showHandle:a,onResizeStop:(e,t,a,l)=>{n({height:parseInt(o+l.height,10),width:parseInt(r+l.width,10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,tt.isRTL)(),bottom:!0,left:(0,tt.isRTL)()},minWidth:m,maxWidth:g},(0,Ke.createElement)("img",{src:s?s[s.length-1]:h,alt:`${i} ${(0,tt.__)("Avatar")}`,...p}));return(0,Ke.createElement)(Ke.Fragment,null,b,(0,Ke.createElement)("div",{...d},_))}},uo=()=>Xe({name:co,metadata:so,settings:mo}),po=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z",fillRule:"evenodd",clipRule:"evenodd"}),(0,Ke.createElement)(Ye.Path,{d:"M15 15V15C15 13.8954 14.1046 13 13 13L11 13C9.89543 13 9 13.8954 9 15V15",fillRule:"evenodd",clipRule:"evenodd"}),(0,Ke.createElement)(Ye.Circle,{cx:"12",cy:"9",r:"2",fillRule:"evenodd",clipRule:"evenodd"}));const go={attributes:{isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},ho=[go],bo={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-author-name",title:"Comment Author Name",category:"theme",ancestor:["core/comment-template"],description:"Displays the name of the author of the comment.",textdomain:"default",attributes:{isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"},textAlign:{type:"string"}},usesContext:["commentId"],supports:{html:!1,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:_o}=bo,yo={icon:po,edit:function({attributes:{isLink:e,linkTarget:t,textAlign:n},context:{commentId:a},setAttributes:o}){const r=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${n}`]:n})});let l=(0,gt.useSelect)((e=>{const{getEntityRecord:t}=e(dt.store),n=t("root","comment",a),o=n?.author_name;if(n&&!o){var r;const e=t("root","user",n.author);return null!==(r=e?.name)&&void 0!==r?r:(0,tt.__)("Anonymous")}return null!=o?o:""}),[a]);const i=(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:n,onChange:e=>o({textAlign:e})})),s=(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link to authors URL"),onChange:()=>o({isLink:!e}),checked:e}),e&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>o({linkTarget:e?"_blank":"_self"}),checked:"_blank"===t})));a&&l||(l=(0,tt._x)("Comment Author","block title"));const c=e?(0,Ke.createElement)("a",{href:"#comment-author-pseudo-link",onClick:e=>e.preventDefault()},l):l;return(0,Ke.createElement)(Ke.Fragment,null,s,i,(0,Ke.createElement)("div",{...r},c))},deprecated:ho},vo=()=>Xe({name:_o,metadata:bo,settings:yo}),fo=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z"}));const ko={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-content",title:"Comment Content",category:"theme",ancestor:["core/comment-template"],description:"Displays the contents of a comment.",textdomain:"default",usesContext:["commentId"],attributes:{textAlign:{type:"string"}},supports:{color:{gradients:!0,link:!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}},spacing:{padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},html:!1}},{name:xo}=ko,wo={icon:fo,edit:function({setAttributes:e,attributes:{textAlign:t},context:{commentId:n}}){const a=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${t}`]:t})}),[o]=(0,dt.useEntityProp)("root","comment","content",n),r=(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:t,onChange:t=>e({textAlign:t})}));return n&&o?(0,Ke.createElement)(Ke.Fragment,null,r,(0,Ke.createElement)("div",{...a},(0,Ke.createElement)(et.Disabled,null,(0,Ke.createElement)(_t.RawHTML,{key:"html"},o.rendered)))):(0,Ke.createElement)(Ke.Fragment,null,r,(0,Ke.createElement)("div",{...a},(0,Ke.createElement)("p",null,(0,tt._x)("Comment Content","block title"))))}},Eo=()=>Xe({name:xo,metadata:ko,settings:wo}),Co=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M11.696 13.972c.356-.546.599-.958.728-1.235a1.79 1.79 0 00.203-.783c0-.264-.077-.47-.23-.618-.148-.153-.354-.23-.618-.23-.295 0-.569.07-.82.212a3.413 3.413 0 00-.738.571l-.147-1.188c.289-.234.59-.41.903-.526.313-.117.66-.175 1.041-.175.375 0 .695.08.959.24.264.153.46.362.59.626.135.265.203.556.203.876 0 .362-.08.734-.24 1.115-.154.381-.427.87-.82 1.466l-.756 1.152H14v1.106h-4l1.696-2.609z"}),(0,Ke.createElement)(Ye.Path,{d:"M19.5 7h-15v12a.5.5 0 00.5.5h14a.5.5 0 00.5-.5V7zM3 7V5a2 2 0 012-2h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"})),So=window.wp.date;const Bo={attributes:{format:{type:"string"},isLink:{type:"boolean",default:!1}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},No=[Bo],To={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-date",title:"Comment Date",category:"theme",ancestor:["core/comment-template"],description:"Displays the date on which the comment was posted.",textdomain:"default",attributes:{format:{type:"string"},isLink:{type:"boolean",default:!0}},usesContext:["commentId"],supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},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}},interactivity:{clientNavigation:!0}}},{name:Io}=To,Po={icon:Co,edit:function({attributes:{format:e,isLink:t},context:{commentId:n},setAttributes:a}){const o=(0,nt.useBlockProps)();let[r]=(0,dt.useEntityProp)("root","comment","date",n);const[l=(0,So.getSettings)().formats.date]=(0,dt.useEntityProp)("root","site","date_format"),i=(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(nt.__experimentalDateFormatPicker,{format:e,defaultFormat:l,onChange:e=>a({format:e})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link to comment"),onChange:()=>a({isLink:!t}),checked:t})));n&&r||(r=(0,tt._x)("Comment Date","block title"));let s=r instanceof Date?(0,Ke.createElement)("time",{dateTime:(0,So.dateI18n)("c",r)},(0,So.dateI18n)(e||l,r)):(0,Ke.createElement)("time",null,r);return t&&(s=(0,Ke.createElement)("a",{href:"#comment-date-pseudo-link",onClick:e=>e.preventDefault()},s)),(0,Ke.createElement)(Ke.Fragment,null,i,(0,Ke.createElement)("div",{...o},s))},deprecated:No},Mo=()=>Xe({name:Io,metadata:To,settings:Po}),zo=(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"m6.249 11.065.44-.44h3.186l-1.5 1.5H7.31l-1.957 1.96A.792.792 0 0 1 4 13.524V5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1.5L12.5 8V5.5h-7v6.315l.749-.75ZM20 19.75H7v-1.5h13v1.5Zm0-12.653-8.967 9.064L8 17l.867-2.935L17.833 5 20 7.097Z"}));const Ro={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-edit-link",title:"Comment Edit Link",category:"theme",ancestor:["core/comment-template"],description:"Displays a link to edit the comment in the WordPress Dashboard. This link is only visible to users with the edit comment capability.",textdomain:"default",usesContext:["commentId"],attributes:{linkTarget:{type:"string",default:"_self"},textAlign:{type:"string"}},supports:{html:!1,color:{link:!0,gradients:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},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}},interactivity:{clientNavigation:!0}}},{name:Ao}=Ro,Ho={icon:zo,edit:function({attributes:{linkTarget:e,textAlign:t},setAttributes:n}){const a=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${t}`]:t})}),o=(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:t,onChange:e=>n({textAlign:e})})),r=(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>n({linkTarget:e?"_blank":"_self"}),checked:"_blank"===e})));return(0,Ke.createElement)(Ke.Fragment,null,o,r,(0,Ke.createElement)("div",{...a},(0,Ke.createElement)("a",{href:"#edit-comment-pseudo-link",onClick:e=>e.preventDefault()},(0,tt.__)("Edit"))))}},Lo=()=>Xe({name:Ao,metadata:Ro,settings:Ho}),Do=(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M6.68822 10.625L6.24878 11.0649L5.5 11.8145L5.5 5.5L12.5 5.5V8L14 6.5V5C14 4.44772 13.5523 4 13 4H5C4.44772 4 4 4.44771 4 5V13.5247C4 13.8173 4.16123 14.086 4.41935 14.2237C4.72711 14.3878 5.10601 14.3313 5.35252 14.0845L7.31 12.125H8.375L9.875 10.625H7.31H6.68822ZM14.5605 10.4983L11.6701 13.75H16.9975C17.9963 13.75 18.7796 14.1104 19.3553 14.7048C19.9095 15.2771 20.2299 16.0224 20.4224 16.7443C20.7645 18.0276 20.7543 19.4618 20.7487 20.2544C20.7481 20.345 20.7475 20.4272 20.7475 20.4999L19.2475 20.5001C19.2475 20.4191 19.248 20.3319 19.2484 20.2394V20.2394C19.2526 19.4274 19.259 18.2035 18.973 17.1307C18.8156 16.5401 18.586 16.0666 18.2778 15.7483C17.9909 15.4521 17.5991 15.25 16.9975 15.25H11.8106L14.5303 17.9697L13.4696 19.0303L8.96956 14.5303L13.4394 9.50171L14.5605 10.4983Z"}));const Fo=function({setAttributes:e,attributes:{textAlign:t}}){const n=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${t}`]:t})}),a=(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:t,onChange:t=>e({textAlign:t})}));return(0,Ke.createElement)(Ke.Fragment,null,a,(0,Ke.createElement)("div",{...n},(0,Ke.createElement)("a",{href:"#comment-reply-pseudo-link",onClick:e=>e.preventDefault()},(0,tt.__)("Reply"))))},Vo={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-reply-link",title:"Comment Reply Link",category:"theme",ancestor:["core/comment-template"],description:"Displays a link to reply to a comment.",textdomain:"default",usesContext:["commentId"],attributes:{textAlign:{type:"string"}},supports:{color:{gradients:!0,link:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},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}},html:!1}},{name:$o}=Vo,Oo={edit:Fo,icon:Do},Go=()=>Xe({name:$o,metadata:Vo,settings:Oo}),Uo=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.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"})),qo=window.wp.apiFetch;var jo=n.n(qo);const Wo=({defaultPage:e,postId:t,perPage:n,queryArgs:a})=>{const[o,r]=(0,_t.useState)({}),l=`${t}_${n}`,i=o[l]||0;return(0,_t.useEffect)((()=>{i||"newest"!==e||jo()({path:(0,pt.addQueryArgs)("/wp/v2/comments",{...a,post:t,per_page:n,_fields:"id"}),method:"HEAD",parse:!1}).then((e=>{const t=parseInt(e.headers.get("X-WP-TotalPages"));r({...o,[l]:t<=1?1:t})}))}),[e,t,n,r]),"newest"===e?i:1},Zo=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]];function Qo({comment:e,activeCommentId:t,setActiveCommentId:n,firstCommentId:a,blocks:o}){const{children:r,...l}=(0,nt.useInnerBlocksProps)({},{template:Zo});return(0,Ke.createElement)("li",{...l},e.commentId===(t||a)?r:null,(0,Ke.createElement)(Ko,{blocks:o,commentId:e.commentId,setActiveCommentId:n,isHidden:e.commentId===(t||a)}),e?.children?.length>0?(0,Ke.createElement)(Yo,{comments:e.children,activeCommentId:t,setActiveCommentId:n,blocks:o,firstCommentId:a}):null)}const Ko=(0,_t.memo)((({blocks:e,commentId:t,setActiveCommentId:n,isHidden:a})=>{const o=(0,nt.__experimentalUseBlockPreview)({blocks:e}),r=()=>{n(t)},l={display:a?"none":void 0};return(0,Ke.createElement)("div",{...o,tabIndex:0,role:"button",style:l,onClick:r,onKeyPress:r})})),Yo=({comments:e,blockProps:t,activeCommentId:n,setActiveCommentId:a,blocks:o,firstCommentId:r})=>(0,Ke.createElement)("ol",{...t},e&&e.map((({commentId:e,...t},l)=>(0,Ke.createElement)(nt.BlockContextProvider,{key:t.commentId||l,value:{commentId:e<0?null:e}},(0,Ke.createElement)(Qo,{comment:{commentId:e,...t},activeCommentId:n,setActiveCommentId:a,blocks:o,firstCommentId:r})))));const Jo={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-template",title:"Comment Template",category:"design",parent:["core/comments"],description:"Contains the block elements used to display a comment, like the title, date, author, avatar and more.",textdomain:"default",usesContext:["postId"],supports:{align:!0,html:!1,reusable:!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}},interactivity:{clientNavigation:!0}},style:"wp-block-comment-template"},{name:Xo}=Jo,er={icon:Uo,edit:function({clientId:e,context:{postId:t}}){const n=(0,nt.useBlockProps)(),[a,o]=(0,_t.useState)(),{commentOrder:r,threadCommentsDepth:l,threadComments:i,commentsPerPage:s,pageComments:c}=(0,gt.useSelect)((e=>{const{getSettings:t}=e(nt.store);return t().__experimentalDiscussionSettings})),m=(({postId:e})=>{const t={status:"approve",order:"asc",context:"embed",parent:0,_embed:"children"},{pageComments:n,commentsPerPage:a,defaultCommentsPage:o}=(0,gt.useSelect)((e=>{const{getSettings:t}=e(nt.store),{__experimentalDiscussionSettings:n}=t();return n})),r=n?Math.min(a,100):100,l=Wo({defaultPage:o,postId:e,perPage:r,queryArgs:t});return(0,_t.useMemo)((()=>l?{...t,post:e,per_page:r,page:l}:null),[e,r,l])})({postId:t}),{topLevelComments:u,blocks:p}=(0,gt.useSelect)((t=>{const{getEntityRecords:n}=t(dt.store),{getBlocks:a}=t(nt.store);return{topLevelComments:m?n("root","comment",m):null,blocks:a(e)}}),[e,m]);let d=(e=>(0,_t.useMemo)((()=>e?.map((({id:e,_embedded:t})=>{const[n]=t?.children||[[]];return{commentId:e,children:n.map((e=>({commentId:e.id})))}}))),[e]))("desc"===r&&u?[...u].reverse():u);return u?(t||(d=(({perPage:e,pageComments:t,threadComments:n,threadCommentsDepth:a})=>{const o=n?Math.min(a,3):1,r=e=>e<o?[{commentId:-(e+3),children:r(e+1)}]:[],l=[{commentId:-1,children:r(1)}];return(!t||e>=2)&&o<3&&l.push({commentId:-2,children:[]}),(!t||e>=3)&&o<2&&l.push({commentId:-3,children:[]}),l})({perPage:s,pageComments:c,threadComments:i,threadCommentsDepth:l})),d.length?(0,Ke.createElement)(Yo,{comments:d,blockProps:n,blocks:p,activeCommentId:a,setActiveCommentId:o,firstCommentId:d[0]?.commentId}):(0,Ke.createElement)("p",{...n},(0,tt.__)("No results found."))):(0,Ke.createElement)("p",{...n},(0,Ke.createElement)(et.Spinner,null))},save:function(){return(0,Ke.createElement)(nt.InnerBlocks.Content,null)}},tr=()=>Xe({name:Xo,metadata:Jo,settings:er}),nr=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M16 10.5v3h3v-3h-3zm-5 3h3v-3h-3v3zM7 9l-3 3 3 3 1-1-2-2 2-2-1-1z"})),ar={none:"",arrow:"←",chevron:"«"};const or={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination-previous",title:"Comments Previous Page",category:"theme",parent:["core/comments-pagination"],description:"Displays the previous comment's page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["postId","comments/paginationArrow"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:rr}=or,lr={icon:nr,edit:function({attributes:{label:e},setAttributes:t,context:{"comments/paginationArrow":n}}){const a=ar[n];return(0,Ke.createElement)("a",{href:"#comments-pagination-previous-pseudo-link",onClick:e=>e.preventDefault(),...(0,nt.useBlockProps)()},a&&(0,Ke.createElement)("span",{className:`wp-block-comments-pagination-previous-arrow is-arrow-${n}`},a),(0,Ke.createElement)(nt.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,tt.__)("Older comments page link"),placeholder:(0,tt.__)("Older Comments"),value:e,onChange:e=>t({label:e})}))}},ir=()=>Xe({name:rr,metadata:or,settings:lr}),sr=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 13.5h6v-3H4v3zm8 0h3v-3h-3v3zm5-3v3h3v-3h-3z"}));function cr({value:e,onChange:t}){return(0,Ke.createElement)(et.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Arrow"),value:e,onChange:t,help:(0,tt.__)("A decorative arrow appended to the next and previous comments link."),isBlock:!0},(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"none",label:(0,tt._x)("None","Arrow option for Comments Pagination Next/Previous blocks")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,tt._x)("Arrow","Arrow option for Comments Pagination Next/Previous blocks")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,tt._x)("Chevron","Arrow option for Comments Pagination Next/Previous blocks")}))}const mr=[["core/comments-pagination-previous"],["core/comments-pagination-numbers"],["core/comments-pagination-next"]];const ur={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination",title:"Comments Pagination",category:"theme",parent:["core/comments"],allowedBlocks:["core/comments-pagination-previous","core/comments-pagination-numbers","core/comments-pagination-next"],description:"Displays a paginated navigation to next/previous set of comments, when applicable.",textdomain:"default",attributes:{paginationArrow:{type:"string",default:"none"}},providesContext:{"comments/paginationArrow":"paginationArrow"},supports:{align:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-comments-pagination-editor",style:"wp-block-comments-pagination"},{name:pr}=ur,dr={icon:sr,edit:function({attributes:{paginationArrow:e},setAttributes:t,clientId:n}){const a=(0,gt.useSelect)((e=>{const{getBlocks:t}=e(nt.store),a=t(n);return a?.find((e=>["core/comments-pagination-previous","core/comments-pagination-next"].includes(e.name)))}),[]),o=(0,nt.useBlockProps)(),r=(0,nt.useInnerBlocksProps)(o,{template:mr});return(0,gt.useSelect)((e=>{const{getSettings:t}=e(nt.store),{__experimentalDiscussionSettings:n}=t();return n?.pageComments}),[])?(0,Ke.createElement)(Ke.Fragment,null,a&&(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(cr,{value:e,onChange:e=>{t({paginationArrow:e})}}))),(0,Ke.createElement)("div",{...r})):(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Comments Pagination block: paging comments is disabled in the Discussion Settings"))},save:function(){return(0,Ke.createElement)(nt.InnerBlocks.Content,null)}},gr=()=>Xe({name:pr,metadata:ur,settings:dr}),hr=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M5 13.5h3v-3H5v3zm5 0h3v-3h-3v3zM17 9l-1 1 2 2-2 2 1 1 3-3-3-3z"})),br={none:"",arrow:"→",chevron:"»"};const _r={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination-next",title:"Comments Next Page",category:"theme",parent:["core/comments-pagination"],description:"Displays the next comment's page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["postId","comments/paginationArrow"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:yr}=_r,vr={icon:hr,edit:function({attributes:{label:e},setAttributes:t,context:{"comments/paginationArrow":n}}){const a=br[n];return(0,Ke.createElement)("a",{href:"#comments-pagination-next-pseudo-link",onClick:e=>e.preventDefault(),...(0,nt.useBlockProps)()},(0,Ke.createElement)(nt.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,tt.__)("Newer comments page link"),placeholder:(0,tt.__)("Newer Comments"),value:e,onChange:e=>t({label:e})}),a&&(0,Ke.createElement)("span",{className:`wp-block-comments-pagination-next-arrow is-arrow-${n}`},a))}},fr=()=>Xe({name:yr,metadata:_r,settings:vr}),kr=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 13.5h6v-3H4v3zm8.2-2.5.8-.3V14h1V9.3l-2.2.7.4 1zm7.1-1.2c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3-.1-.8-.3-1.1z"})),xr=({content:e,tag:t="a",extraClass:n=""})=>"a"===t?(0,Ke.createElement)(t,{className:`page-numbers ${n}`,href:"#comments-pagination-numbers-pseudo-link",onClick:e=>e.preventDefault()},e):(0,Ke.createElement)(t,{className:`page-numbers ${n}`},e);const wr={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination-numbers",title:"Comments Page Numbers",category:"theme",parent:["core/comments-pagination"],description:"Displays a list of page numbers for comments pagination.",textdomain:"default",usesContext:["postId"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:Er}=wr,Cr={icon:kr,edit:function(){return(0,Ke.createElement)("div",{...(0,nt.useBlockProps)()},(0,Ke.createElement)(xr,{content:"1"}),(0,Ke.createElement)(xr,{content:"2"}),(0,Ke.createElement)(xr,{content:"3",tag:"span",extraClass:"current"}),(0,Ke.createElement)(xr,{content:"4"}),(0,Ke.createElement)(xr,{content:"5"}),(0,Ke.createElement)(xr,{content:"...",tag:"span",extraClass:"dots"}),(0,Ke.createElement)(xr,{content:"8"}))}},Sr=()=>Xe({name:Er,metadata:wr,settings:Cr}),Br=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z"}));const{attributes:Nr,supports:Tr}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-title",title:"Comments Title",category:"theme",ancestor:["core/comments"],description:"Displays a title with the number of comments.",textdomain:"default",usesContext:["postId","postType"],attributes:{textAlign:{type:"string"},showPostTitle:{type:"boolean",default:!0},showCommentsCount:{type:"boolean",default:!0},level:{type:"number",default:2}},supports:{anchor:!1,align:!0,html:!1,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},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,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0}},interactivity:{clientNavigation:!0}}},Ir=[{attributes:{...Nr,singleCommentLabel:{type:"string"},multipleCommentsLabel:{type:"string"}},supports:Tr,migrate:e=>{const{singleCommentLabel:t,multipleCommentsLabel:n,...a}=e;return a},isEligible:({multipleCommentsLabel:e,singleCommentLabel:t})=>e||t,save:()=>null}],Pr={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-title",title:"Comments Title",category:"theme",ancestor:["core/comments"],description:"Displays a title with the number of comments.",textdomain:"default",usesContext:["postId","postType"],attributes:{textAlign:{type:"string"},showPostTitle:{type:"boolean",default:!0},showCommentsCount:{type:"boolean",default:!0},level:{type:"number",default:2}},supports:{anchor:!1,align:!0,html:!1,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},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,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0}},interactivity:{clientNavigation:!0}}},{name:Mr}=Pr,zr={icon:Br,edit:function({attributes:{textAlign:e,showPostTitle:t,showCommentsCount:n,level:a},setAttributes:o,context:{postType:r,postId:l}}){const i="h"+a,[s,c]=(0,_t.useState)(),[m]=(0,dt.useEntityProp)("postType",r,"title",l),u=void 0===l,p=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${e}`]:e})}),{threadCommentsDepth:d,threadComments:g,commentsPerPage:h,pageComments:b}=(0,gt.useSelect)((e=>{const{getSettings:t}=e(nt.store);return t().__experimentalDiscussionSettings}));(0,_t.useEffect)((()=>{if(u){const e=g?Math.min(d,3)-1:0,t=b?h:3,n=parseInt(e)+parseInt(t);return void c(Math.min(n,3))}const e=l;jo()({path:(0,pt.addQueryArgs)("/wp/v2/comments",{post:l,_fields:"id"}),method:"HEAD",parse:!1}).then((t=>{e===l&&c(parseInt(t.headers.get("X-WP-Total")))})).catch((()=>{c(0)}))}),[l]);const _=(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:e,onChange:e=>o({textAlign:e})}),(0,Ke.createElement)(nt.HeadingLevelDropdown,{value:a,onChange:e=>o({level:e})})),y=(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show post title"),checked:t,onChange:e=>o({showPostTitle:e})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show comments count"),checked:n,onChange:e=>o({showCommentsCount:e})}))),v=u?(0,tt.__)("“Post Title”"):`"${m}"`;let f;return f=n&&void 0!==s?t?1===s?(0,tt.sprintf)((0,tt.__)("One response to %s"),v):(0,tt.sprintf)((0,tt._n)("%1$s response to %2$s","%1$s responses to %2$s",s),s,v):1===s?(0,tt.__)("One response"):(0,tt.sprintf)((0,tt._n)("%s response","%s responses",s),s):t?1===s?(0,tt.sprintf)((0,tt.__)("Response to %s"),v):(0,tt.sprintf)((0,tt.__)("Responses to %s"),v):1===s?(0,tt.__)("Response"):(0,tt.__)("Responses"),(0,Ke.createElement)(Ke.Fragment,null,_,y,(0,Ke.createElement)(i,{...p},f))},deprecated:Ir},Rr=()=>Xe({name:Mr,metadata:Pr,settings:zr}),Ar=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h6.2v8.9l2.5-3.1 2.5 3.1V4.5h2.2c.4 0 .8.4.8.8v13.4z"})),Hr={"top left":"is-position-top-left","top center":"is-position-top-center","top right":"is-position-top-right","center left":"is-position-center-left","center center":"is-position-center-center",center:"is-position-center-center","center right":"is-position-center-right","bottom left":"is-position-bottom-left","bottom center":"is-position-bottom-center","bottom right":"is-position-bottom-right"},Lr="image",Dr="video",Fr=50,Vr={x:.5,y:.5},$r=["image","video"];function Or({x:e,y:t}=Vr){return`${Math.round(100*e)}% ${Math.round(100*t)}%`}function Gr(e){return 50===e||void 0===e?null:"has-background-dim-"+10*Math.round(e/10)}function Ur(e){return!e||"center center"===e||"center"===e}function qr(e){return Ur(e)?"":Hr[e]}function jr(e){return e?{backgroundImage:`url(${e})`}:{}}function Wr(e){return 0!==e&&50!==e&&e?"has-background-dim-"+10*Math.round(e/10):null}function Zr(e){return{...e,dimRatio:e.url?e.dimRatio:100}}function Qr(e){return e.tagName||(e={...e,tagName:"div"}),{...e}}const Kr={url:{type:"string"},id:{type:"number"},hasParallax:{type:"boolean",default:!1},dimRatio:{type:"number",default:50},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"}},Yr={url:{type:"string"},id:{type:"number"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},hasParallax:{type:"boolean",default:!1},isRepeated:{type:"boolean",default:!1},dimRatio:{type:"number",default:100},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},isDark:{type:"boolean",default:!0},allowedBlocks:{type:"array"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},Jr={...Yr,useFeaturedImage:{type:"boolean",default:!1},tagName:{type:"string",default:"div"}},Xr={anchor:!0,align:!0,html:!1,spacing:{padding:!0,__experimentalDefaultControls:{padding:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",text:!1,background:!1}},el={...Xr,spacing:{padding:!0,margin:["top","bottom"],blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",heading:!0,text:!0,background:!1,__experimentalSkipSerialization:["gradients"],enableContrastChecker:!1},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowJustification:!1}},tl={attributes:Jr,supports:el,save({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:a,customGradient:o,customOverlayColor:r,dimRatio:l,focalPoint:i,useFeaturedImage:s,hasParallax:c,isDark:m,isRepeated:u,overlayColor:p,url:d,alt:g,id:h,minHeight:b,minHeightUnit:_,tagName:y}=e,v=(0,nt.getColorClassName)("background-color",p),f=(0,nt.__experimentalGetGradientClass)(n),k=Lr===t,x=Dr===t,w=!(c||u),E={minHeight:(b&&_?`${b}${_}`:b)||void 0},C={backgroundColor:v?void 0:r,background:o||void 0},S=i&&w?Or(i):void 0,B=d?`url(${d})`:void 0,N=Or(i),T=ut()({"is-light":!m,"has-parallax":c,"is-repeated":u,"has-custom-content-position":!Ur(a)},qr(a)),I=ut()("wp-block-cover__image-background",h?`wp-image-${h}`:null,{"has-parallax":c,"is-repeated":u}),P=n||o;return(0,Ke.createElement)(y,{...nt.useBlockProps.save({className:T,style:E})},(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__background",v,Gr(l),{"has-background-dim":void 0!==l,"wp-block-cover__gradient-background":d&&P&&0!==l,"has-background-gradient":P,[f]:f}),style:C}),!s&&k&&d&&(w?(0,Ke.createElement)("img",{className:I,alt:g,src:d,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}):(0,Ke.createElement)("div",{role:"img",className:I,style:{backgroundPosition:N,backgroundImage:B}})),x&&d&&(0,Ke.createElement)("video",{className:ut()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})}))}},nl={attributes:Jr,supports:el,isEligible:e=>void 0!==e.customOverlayColor||void 0!==e.overlayColor,migrate:e=>({...e,isUserOverlayColor:!0}),save({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:a,customGradient:o,customOverlayColor:r,dimRatio:l,focalPoint:i,useFeaturedImage:s,hasParallax:c,isDark:m,isRepeated:u,overlayColor:p,url:d,alt:g,id:h,minHeight:b,minHeightUnit:_,tagName:y}=e,v=(0,nt.getColorClassName)("background-color",p),f=(0,nt.__experimentalGetGradientClass)(n),k=Lr===t,x=Dr===t,w=!(c||u),E={minHeight:(b&&_?`${b}${_}`:b)||void 0},C={backgroundColor:v?void 0:r,background:o||void 0},S=i&&w?Or(i):void 0,B=d?`url(${d})`:void 0,N=Or(i),T=ut()({"is-light":!m,"has-parallax":c,"is-repeated":u,"has-custom-content-position":!Ur(a)},qr(a)),I=ut()("wp-block-cover__image-background",h?`wp-image-${h}`:null,{"has-parallax":c,"is-repeated":u}),P=n||o;return(0,Ke.createElement)(y,{...nt.useBlockProps.save({className:T,style:E})},(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__background",v,Gr(l),{"has-background-dim":void 0!==l,"wp-block-cover__gradient-background":d&&P&&0!==l,"has-background-gradient":P,[f]:f}),style:C}),!s&&k&&d&&(w?(0,Ke.createElement)("img",{className:I,alt:g,src:d,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}):(0,Ke.createElement)("div",{role:"img",className:I,style:{backgroundPosition:N,backgroundImage:B}})),x&&d&&(0,Ke.createElement)("video",{className:ut()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})}))}},al={attributes:Yr,supports:Xr,save({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:a,customGradient:o,customOverlayColor:r,dimRatio:l,focalPoint:i,useFeaturedImage:s,hasParallax:c,isDark:m,isRepeated:u,overlayColor:p,url:d,alt:g,id:h,minHeight:b,minHeightUnit:_}=e,y=(0,nt.getColorClassName)("background-color",p),v=(0,nt.__experimentalGetGradientClass)(n),f=Lr===t,k=Dr===t,x=!(c||u),w={minHeight:(b&&_?`${b}${_}`:b)||void 0},E={backgroundColor:y?void 0:r,background:o||void 0},C=i&&x?Or(i):void 0,S=d?`url(${d})`:void 0,B=Or(i),N=ut()({"is-light":!m,"has-parallax":c,"is-repeated":u,"has-custom-content-position":!Ur(a)},qr(a)),T=ut()("wp-block-cover__image-background",h?`wp-image-${h}`:null,{"has-parallax":c,"is-repeated":u}),I=n||o;return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:N,style:w})},(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__background",y,Gr(l),{"has-background-dim":void 0!==l,"wp-block-cover__gradient-background":d&&I&&0!==l,"has-background-gradient":I,[v]:v}),style:E}),!s&&f&&d&&(x?(0,Ke.createElement)("img",{className:T,alt:g,src:d,style:{objectPosition:C},"data-object-fit":"cover","data-object-position":C}):(0,Ke.createElement)("div",{role:"img",className:T,style:{backgroundPosition:B,backgroundImage:S}})),k&&d&&(0,Ke.createElement)("video",{className:ut()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:C},"data-object-fit":"cover","data-object-position":C}),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})}))},migrate:Qr},ol={attributes:Yr,supports:Xr,save({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:a,customGradient:o,customOverlayColor:r,dimRatio:l,focalPoint:i,useFeaturedImage:s,hasParallax:c,isDark:m,isRepeated:u,overlayColor:p,url:d,alt:g,id:h,minHeight:b,minHeightUnit:_}=e,y=(0,nt.getColorClassName)("background-color",p),v=(0,nt.__experimentalGetGradientClass)(n),f=b&&_?`${b}${_}`:b,k=Lr===t,x=Dr===t,w=!(c||u),E={...!k||w||s?{}:jr(d),minHeight:f||void 0},C={backgroundColor:y?void 0:r,background:o||void 0},S=i&&w?`${Math.round(100*i.x)}% ${Math.round(100*i.y)}%`:void 0,B=ut()({"is-light":!m,"has-parallax":c,"is-repeated":u,"has-custom-content-position":!Ur(a)},qr(a)),N=n||o;return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:B,style:E})},(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__background",y,Gr(l),{"has-background-dim":void 0!==l,"wp-block-cover__gradient-background":d&&N&&0!==l,"has-background-gradient":N,[v]:v}),style:C}),!s&&k&&w&&d&&(0,Ke.createElement)("img",{className:ut()("wp-block-cover__image-background",h?`wp-image-${h}`:null),alt:g,src:d,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),x&&d&&(0,Ke.createElement)("video",{className:ut()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})}))},migrate:Qr},rl={attributes:Yr,supports:Xr,save({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:a,customGradient:o,customOverlayColor:r,dimRatio:l,focalPoint:i,hasParallax:s,isDark:c,isRepeated:m,overlayColor:u,url:p,alt:d,id:g,minHeight:h,minHeightUnit:b}=e,_=(0,nt.getColorClassName)("background-color",u),y=(0,nt.__experimentalGetGradientClass)(n),v=b?`${h}${b}`:h,f=Lr===t,k=Dr===t,x=!(s||m),w={...f&&!x?jr(p):{},minHeight:v||void 0},E={backgroundColor:_?void 0:r,background:o||void 0},C=i&&x?`${Math.round(100*i.x)}% ${Math.round(100*i.y)}%`:void 0,S=ut()({"is-light":!c,"has-parallax":s,"is-repeated":m,"has-custom-content-position":!Ur(a)},qr(a)),B=n||o;return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:S,style:w})},(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__background",_,Gr(l),{"has-background-dim":void 0!==l,"wp-block-cover__gradient-background":p&&B&&0!==l,"has-background-gradient":B,[y]:y}),style:E}),f&&x&&p&&(0,Ke.createElement)("img",{className:ut()("wp-block-cover__image-background",g?`wp-image-${g}`:null),alt:d,src:p,style:{objectPosition:C},"data-object-fit":"cover","data-object-position":C}),k&&p&&(0,Ke.createElement)("video",{className:ut()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:p,style:{objectPosition:C},"data-object-fit":"cover","data-object-position":C}),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})}))},migrate:Qr},ll={attributes:Yr,supports:Xr,save({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:a,customGradient:o,customOverlayColor:r,dimRatio:l,focalPoint:i,hasParallax:s,isDark:c,isRepeated:m,overlayColor:u,url:p,alt:d,id:g,minHeight:h,minHeightUnit:b}=e,_=(0,nt.getColorClassName)("background-color",u),y=(0,nt.__experimentalGetGradientClass)(n),v=b?`${h}${b}`:h,f=Lr===t,k=Dr===t,x=!(s||m),w={...f&&!x?jr(p):{},minHeight:v||void 0},E={backgroundColor:_?void 0:r,background:o||void 0},C=i&&x?`${Math.round(100*i.x)}% ${Math.round(100*i.y)}%`:void 0,S=ut()({"is-light":!c,"has-parallax":s,"is-repeated":m,"has-custom-content-position":!Ur(a)},qr(a));return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:S,style:w})},(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()(_,Gr(l),"wp-block-cover__gradient-background",y,{"has-background-dim":void 0!==l,"has-background-gradient":n||o,[y]:!p&&y}),style:E}),f&&x&&p&&(0,Ke.createElement)("img",{className:ut()("wp-block-cover__image-background",g?`wp-image-${g}`:null),alt:d,src:p,style:{objectPosition:C},"data-object-fit":"cover","data-object-position":C}),k&&p&&(0,Ke.createElement)("video",{className:ut()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:p,style:{objectPosition:C},"data-object-fit":"cover","data-object-position":C}),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})}))},migrate:Qr},il={attributes:{...Kr,isRepeated:{type:"boolean",default:!1},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""}},supports:Xr,save({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:a,customGradient:o,customOverlayColor:r,dimRatio:l,focalPoint:i,hasParallax:s,isRepeated:c,overlayColor:m,url:u,alt:p,id:d,minHeight:g,minHeightUnit:h}=e,b=(0,nt.getColorClassName)("background-color",m),_=(0,nt.__experimentalGetGradientClass)(n),y=h?`${g}${h}`:g,v=Lr===t,f=Dr===t,k=!(s||c),x={...v&&!k?jr(u):{},backgroundColor:b?void 0:r,background:o&&!u?o:void 0,minHeight:y||void 0},w=i&&k?`${Math.round(100*i.x)}% ${Math.round(100*i.y)}%`:void 0,E=ut()(Wr(l),b,{"has-background-dim":0!==l,"has-parallax":s,"is-repeated":c,"has-background-gradient":n||o,[_]:!u&&_,"has-custom-content-position":!Ur(a)},qr(a));return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:E,style:x})},u&&(n||o)&&0!==l&&(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__gradient-background",_),style:o?{background:o}:void 0}),v&&k&&u&&(0,Ke.createElement)("img",{className:ut()("wp-block-cover__image-background",d?`wp-image-${d}`:null),alt:p,src:u,style:{objectPosition:w},"data-object-fit":"cover","data-object-position":w}),f&&u&&(0,Ke.createElement)("video",{className:ut()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:u,style:{objectPosition:w},"data-object-fit":"cover","data-object-position":w}),(0,Ke.createElement)("div",{className:"wp-block-cover__inner-container"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))},migrate:(0,jt.compose)(Zr,Qr)},sl={attributes:{...Kr,isRepeated:{type:"boolean",default:!1},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:a,customGradient:o,customOverlayColor:r,dimRatio:l,focalPoint:i,hasParallax:s,isRepeated:c,overlayColor:m,url:u,minHeight:p,minHeightUnit:d}=e,g=(0,nt.getColorClassName)("background-color",m),h=(0,nt.__experimentalGetGradientClass)(n),b=d?`${p}${d}`:p,_=Lr===t,y=Dr===t,v=_?jr(u):{},f={};let k;g||(v.backgroundColor=r),o&&!u&&(v.background=o),v.minHeight=b||void 0,i&&(k=`${Math.round(100*i.x)}% ${Math.round(100*i.y)}%`,_&&!s&&(v.backgroundPosition=k),y&&(f.objectPosition=k));const x=ut()(Wr(l),g,{"has-background-dim":0!==l,"has-parallax":s,"is-repeated":c,"has-background-gradient":n||o,[h]:!u&&h,"has-custom-content-position":!Ur(a)},qr(a));return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:x,style:v})},u&&(n||o)&&0!==l&&(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__gradient-background",h),style:o?{background:o}:void 0}),y&&u&&(0,Ke.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:u,style:f}),(0,Ke.createElement)("div",{className:"wp-block-cover__inner-container"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))},migrate:(0,jt.compose)(Zr,Qr)},cl={attributes:{...Kr,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,gradient:n,customGradient:a,customOverlayColor:o,dimRatio:r,focalPoint:l,hasParallax:i,overlayColor:s,url:c,minHeight:m}=e,u=(0,nt.getColorClassName)("background-color",s),p=(0,nt.__experimentalGetGradientClass)(n),d=t===Lr?jr(c):{};u||(d.backgroundColor=o),l&&!i&&(d.backgroundPosition=`${Math.round(100*l.x)}% ${Math.round(100*l.y)}%`),a&&!c&&(d.background=a),d.minHeight=m||void 0;const g=ut()(Wr(r),u,{"has-background-dim":0!==r,"has-parallax":i,"has-background-gradient":a,[p]:!c&&p});return(0,Ke.createElement)("div",{className:g,style:d},c&&(n||a)&&0!==r&&(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__gradient-background",p),style:a?{background:a}:void 0}),Dr===t&&c&&(0,Ke.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:c}),(0,Ke.createElement)("div",{className:"wp-block-cover__inner-container"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))},migrate:(0,jt.compose)(Zr,Qr)},ml={attributes:{...Kr,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,gradient:n,customGradient:a,customOverlayColor:o,dimRatio:r,focalPoint:l,hasParallax:i,overlayColor:s,url:c,minHeight:m}=e,u=(0,nt.getColorClassName)("background-color",s),p=(0,nt.__experimentalGetGradientClass)(n),d=t===Lr?jr(c):{};u||(d.backgroundColor=o),l&&!i&&(d.backgroundPosition=`${100*l.x}% ${100*l.y}%`),a&&!c&&(d.background=a),d.minHeight=m||void 0;const g=ut()(Wr(r),u,{"has-background-dim":0!==r,"has-parallax":i,"has-background-gradient":a,[p]:!c&&p});return(0,Ke.createElement)("div",{className:g,style:d},c&&(n||a)&&0!==r&&(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__gradient-background",p),style:a?{background:a}:void 0}),Dr===t&&c&&(0,Ke.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:c}),(0,Ke.createElement)("div",{className:"wp-block-cover__inner-container"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))},migrate:(0,jt.compose)(Zr,Qr)},ul={attributes:{...Kr,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,contentAlign:n,customOverlayColor:a,dimRatio:o,focalPoint:r,hasParallax:l,overlayColor:i,title:s,url:c}=e,m=(0,nt.getColorClassName)("background-color",i),u=t===Lr?jr(c):{};m||(u.backgroundColor=a),r&&!l&&(u.backgroundPosition=`${100*r.x}% ${100*r.y}%`);const p=ut()(Wr(o),m,{"has-background-dim":0!==o,"has-parallax":l,[`has-${n}-content`]:"center"!==n});return(0,Ke.createElement)("div",{className:p,style:u},Dr===t&&c&&(0,Ke.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:c}),!nt.RichText.isEmpty(s)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"p",className:"wp-block-cover-text",value:s}))},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:n,contentAlign:a,...o}=t;return[o,[(0,Qe.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,tt.__)("Write title…")})]]}},pl={attributes:{...Kr,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"},align:{type:"string"}},supports:{className:!1},save({attributes:e}){const{url:t,title:n,hasParallax:a,dimRatio:o,align:r,contentAlign:l,overlayColor:i,customOverlayColor:s}=e,c=(0,nt.getColorClassName)("background-color",i),m=jr(t);c||(m.backgroundColor=s);const u=ut()("wp-block-cover-image",Wr(o),c,{"has-background-dim":0!==o,"has-parallax":a,[`has-${l}-content`]:"center"!==l},r?`align${r}`:null);return(0,Ke.createElement)("div",{className:u,style:m},!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"p",className:"wp-block-cover-image-text",value:n}))},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:n,contentAlign:a,align:o,...r}=t;return[r,[(0,Qe.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,tt.__)("Write title…")})]]}},dl={attributes:{...Kr,title:{type:"string",source:"html",selector:"h2"},align:{type:"string"},contentAlign:{type:"string",default:"center"}},supports:{className:!1},save({attributes:e}){const{url:t,title:n,hasParallax:a,dimRatio:o,align:r}=e,l=jr(t),i=ut()("wp-block-cover-image",Wr(o),{"has-background-dim":0!==o,"has-parallax":a},r?`align${r}`:null);return(0,Ke.createElement)("section",{className:i,style:l},(0,Ke.createElement)(nt.RichText.Content,{tagName:"h2",value:n}))},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:n,contentAlign:a,align:o,...r}=t;return[r,[(0,Qe.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,tt.__)("Write title…")})]]}},gl=[tl,nl,al,ol,rl,ll,il,sl,cl,ml,ul,pl,dl],{cleanEmptyObject:hl}=Ft(nt.privateApis);function bl({onChange:e,onUnitChange:t,unit:n="px",value:a=""}){const o=`block-cover-height-input-${(0,jt.useInstanceId)(et.__experimentalUnitControl)}`,r="px"===n,[l]=(0,nt.useSettings)("spacing.units"),i=(0,et.__experimentalUseCustomUnits)({availableUnits:l||["px","em","rem","vw","vh"],defaultValues:{px:430,"%":20,em:20,rem:20,vw:20,vh:50}}),s=(0,_t.useMemo)((()=>{const[e]=(0,et.__experimentalParseQuantityAndUnitFromRawValue)(a);return[e,n].join("")}),[n,a]),c=r?Fr:0;return(0,Ke.createElement)(et.__experimentalUnitControl,{label:(0,tt.__)("Minimum height of cover"),id:o,isResetValueOnUnitChange:!0,min:c,onChange:t=>{const n=""!==t?parseFloat(t):void 0;isNaN(n)&&void 0!==n||e(n)},onUnitChange:t,__unstableInputWidth:"80px",units:i,value:s})}function _l({attributes:e,setAttributes:t,clientId:n,setOverlayColor:a,coverRef:o,currentSettings:r,updateDimRatio:l,onClearMedia:i}){const{useFeaturedImage:s,dimRatio:c,focalPoint:m,hasParallax:u,isRepeated:p,minHeight:d,minHeightUnit:g,alt:h,tagName:b}=e,{isVideoBackground:_,isImageBackground:y,mediaElement:v,url:f,overlayColor:k}=r,{gradientValue:x,setGradient:w}=(0,nt.__experimentalUseGradient)(),E=_||y&&(!u||p),C=e=>{const[t,n]=v.current?[v.current.style,"objectPosition"]:[o.current.style,"backgroundPosition"];t[n]=Or(e)},S=(0,nt.__experimentalUseMultipleOriginColorsAndGradients)(),B={header:(0,tt.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,tt.__)("The <main> element should be used for the primary content of your document only."),section:(0,tt.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element."),article:(0,tt.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,tt.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),footer:(0,tt.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).")};return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,!!f&&(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},y&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Fixed background"),checked:u,onChange:()=>{t({hasParallax:!u,...u?{}:{focalPoint:void 0}})}}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Repeated background"),checked:p,onChange:()=>{t({isRepeated:!p})}})),E&&(0,Ke.createElement)(et.FocalPointPicker,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Focal point"),url:f,value:m,onDragStart:C,onDrag:C,onChange:e=>t({focalPoint:e})}),!s&&f&&!_&&(0,Ke.createElement)(et.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Alternative text"),value:h,onChange:e=>t({alt:e}),help:(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,tt.__)("Describe the purpose of the image.")),(0,Ke.createElement)("br",null),(0,tt.__)("Leave empty if decorative."))}),(0,Ke.createElement)(et.PanelRow,null,(0,Ke.createElement)(et.Button,{variant:"secondary",size:"small",className:"block-library-cover__reset-button",onClick:i},(0,tt.__)("Clear Media"))))),S.hasColorsOrGradients&&(0,Ke.createElement)(nt.InspectorControls,{group:"color"},(0,Ke.createElement)(nt.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:k.color,gradientValue:x,label:(0,tt.__)("Overlay"),onColorChange:a,onGradientChange:w,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0})}],panelId:n,...S}),(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>void 0!==c&&c!==(f?50:100),label:(0,tt.__)("Overlay opacity"),onDeselect:()=>l(f?50:100),resetAllFilter:()=>({dimRatio:f?50:100}),isShownByDefault:!0,panelId:n},(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Overlay opacity"),value:c,onChange:e=>l(e),min:0,max:100,step:10,required:!0,__next40pxDefaultSize:!0}))),(0,Ke.createElement)(nt.InspectorControls,{group:"dimensions"},(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>!!d,label:(0,tt.__)("Minimum height"),onDeselect:()=>t({minHeight:void 0,minHeightUnit:void 0}),resetAllFilter:()=>({minHeight:void 0,minHeightUnit:void 0}),isShownByDefault:!0,panelId:n},(0,Ke.createElement)(bl,{value:e?.style?.dimensions?.aspectRatio?"":d,unit:g,onChange:n=>t({minHeight:n,style:hl({...e?.style,dimensions:{...e?.style?.dimensions,aspectRatio:void 0}})}),onUnitChange:e=>t({minHeightUnit:e})}))),(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("HTML element"),options:[{label:(0,tt.__)("Default (<div>)"),value:"div"},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"}],value:b,onChange:e=>t({tagName:e}),help:B[b]})))}const{cleanEmptyObject:yl}=Ft(nt.privateApis);function vl({attributes:e,setAttributes:t,onSelectMedia:n,currentSettings:a,toggleUseFeaturedImage:o}){const{contentPosition:r,id:l,useFeaturedImage:i,minHeight:s,minHeightUnit:c}=e,{hasInnerBlocks:m,url:u}=a,[p,d]=(0,_t.useState)(s),[g,h]=(0,_t.useState)(c),b="vh"===c&&100===s&&!e?.style?.dimensions?.aspectRatio;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.__experimentalBlockAlignmentMatrixControl,{label:(0,tt.__)("Change content position"),value:r,onChange:e=>t({contentPosition:e}),isDisabled:!m}),(0,Ke.createElement)(nt.__experimentalBlockFullHeightAligmentControl,{isActive:b,onToggle:()=>b?t("vh"===g&&100===p?{minHeight:void 0,minHeightUnit:void 0}:{minHeight:p,minHeightUnit:g}):(d(s),h(c),t({minHeight:100,minHeightUnit:"vh",style:yl({...e?.style,dimensions:{...e?.style?.dimensions,aspectRatio:void 0}})})),isDisabled:!m})),(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(nt.MediaReplaceFlow,{mediaId:l,mediaURL:u,allowedTypes:$r,accept:"image/*,video/*",onSelect:n,onToggleFeaturedImage:o,useFeaturedImage:i,name:u?(0,tt.__)("Replace"):(0,tt.__)("Add Media")})))}function fl({disableMediaButtons:e=!1,children:t,onSelectMedia:n,onError:a,style:o,toggleUseFeaturedImage:r}){return(0,Ke.createElement)(nt.MediaPlaceholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:Ar}),labels:{title:(0,tt.__)("Cover"),instructions:(0,tt.__)("Drag and drop onto this block, upload, or select existing media from your library.")},onSelect:n,accept:"image/*,video/*",allowedTypes:$r,disableMediaButtons:e,onToggleFeaturedImage:r,onError:a,style:o},t)}const kl={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},{ResizableBoxPopover:xl}=Ft(nt.privateApis);function wl({className:e,height:t,minHeight:n,onResize:a,onResizeStart:o,onResizeStop:r,showHandle:l,size:i,width:s,...c}){const[m,u]=(0,_t.useState)(!1),p=(0,_t.useMemo)((()=>({height:t,minHeight:n,width:s})),[n,t,s]),d={className:ut()(e,{"is-resizing":m}),enable:kl,onResizeStart:(e,t,n)=>{o(n.clientHeight),a(n.clientHeight)},onResize:(e,t,n)=>{a(n.clientHeight),m||u(!0)},onResizeStop:(e,t,n)=>{r(n.clientHeight),u(!1)},showHandle:l,size:i,__experimentalShowTooltip:!0,__experimentalTooltipProps:{axis:"y",position:"bottom",isVisible:m}};return(0,Ke.createElement)(xl,{className:"block-library-cover__resizable-box-popover",__unstableRefreshSize:p,resizableBoxProps:d,...c})}var El={grad:.9,turn:360,rad:360/(2*Math.PI)},Cl=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Sl=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Bl=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Nl=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Tl=function(e){return{r:Bl(e.r,0,255),g:Bl(e.g,0,255),b:Bl(e.b,0,255),a:Bl(e.a)}},Il=function(e){return{r:Sl(e.r),g:Sl(e.g),b:Sl(e.b),a:Sl(e.a,3)}},Pl=/^#([0-9a-f]{3,8})$/i,Ml=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},zl=function(e){var t=e.r,n=e.g,a=e.b,o=e.a,r=Math.max(t,n,a),l=r-Math.min(t,n,a),i=l?r===t?(n-a)/l:r===n?2+(a-t)/l:4+(t-n)/l:0;return{h:60*(i<0?i+6:i),s:r?l/r*100:0,v:r/255*100,a:o}},Rl=function(e){var t=e.h,n=e.s,a=e.v,o=e.a;t=t/360*6,n/=100,a/=100;var r=Math.floor(t),l=a*(1-n),i=a*(1-(t-r)*n),s=a*(1-(1-t+r)*n),c=r%6;return{r:255*[a,i,l,l,s,a][c],g:255*[s,a,a,i,l,l][c],b:255*[l,l,s,a,a,i][c],a:o}},Al=function(e){return{h:Nl(e.h),s:Bl(e.s,0,100),l:Bl(e.l,0,100),a:Bl(e.a)}},Hl=function(e){return{h:Sl(e.h),s:Sl(e.s),l:Sl(e.l),a:Sl(e.a,3)}},Ll=function(e){return Rl((n=(t=e).s,{h:t.h,s:(n*=((a=t.l)<50?a:100-a)/100)>0?2*n/(a+n)*100:0,v:a+n,a:t.a}));var t,n,a},Dl=function(e){return{h:(t=zl(e)).h,s:(o=(200-(n=t.s))*(a=t.v)/100)>0&&o<200?n*a/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,a,o},Fl=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Vl=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,$l=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ol=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Gl={string:[[function(e){var t=Pl.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?Sl(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?Sl(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=$l.exec(e)||Ol.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Tl({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=Fl.exec(e)||Vl.exec(e);if(!t)return null;var n,a,o=Al({h:(n=t[1],a=t[2],void 0===a&&(a="deg"),Number(n)*(El[a]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return Ll(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,a=e.b,o=e.a,r=void 0===o?1:o;return Cl(t)&&Cl(n)&&Cl(a)?Tl({r:Number(t),g:Number(n),b:Number(a),a:Number(r)}):null},"rgb"],[function(e){var t=e.h,n=e.s,a=e.l,o=e.a,r=void 0===o?1:o;if(!Cl(t)||!Cl(n)||!Cl(a))return null;var l=Al({h:Number(t),s:Number(n),l:Number(a),a:Number(r)});return Ll(l)},"hsl"],[function(e){var t=e.h,n=e.s,a=e.v,o=e.a,r=void 0===o?1:o;if(!Cl(t)||!Cl(n)||!Cl(a))return null;var l=function(e){return{h:Nl(e.h),s:Bl(e.s,0,100),v:Bl(e.v,0,100),a:Bl(e.a)}}({h:Number(t),s:Number(n),v:Number(a),a:Number(r)});return Rl(l)},"hsv"]]},Ul=function(e,t){for(var n=0;n<t.length;n++){var a=t[n][0](e);if(a)return[a,t[n][1]]}return[null,void 0]},ql=function(e){return"string"==typeof e?Ul(e.trim(),Gl.string):"object"==typeof e&&null!==e?Ul(e,Gl.object):[null,void 0]},jl=function(e,t){var n=Dl(e);return{h:n.h,s:Bl(n.s+100*t,0,100),l:n.l,a:n.a}},Wl=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Zl=function(e,t){var n=Dl(e);return{h:n.h,s:n.s,l:Bl(n.l+100*t,0,100),a:n.a}},Ql=function(){function e(e){this.parsed=ql(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return Sl(Wl(this.rgba),2)},e.prototype.isDark=function(){return Wl(this.rgba)<.5},e.prototype.isLight=function(){return Wl(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=Il(this.rgba)).r,n=e.g,a=e.b,r=(o=e.a)<1?Ml(Sl(255*o)):"","#"+Ml(t)+Ml(n)+Ml(a)+r;var e,t,n,a,o,r},e.prototype.toRgb=function(){return Il(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Il(this.rgba)).r,n=e.g,a=e.b,(o=e.a)<1?"rgba("+t+", "+n+", "+a+", "+o+")":"rgb("+t+", "+n+", "+a+")";var e,t,n,a,o},e.prototype.toHsl=function(){return Hl(Dl(this.rgba))},e.prototype.toHslString=function(){return t=(e=Hl(Dl(this.rgba))).h,n=e.s,a=e.l,(o=e.a)<1?"hsla("+t+", "+n+"%, "+a+"%, "+o+")":"hsl("+t+", "+n+"%, "+a+"%)";var e,t,n,a,o},e.prototype.toHsv=function(){return e=zl(this.rgba),{h:Sl(e.h),s:Sl(e.s),v:Sl(e.v),a:Sl(e.a,3)};var e},e.prototype.invert=function(){return Kl({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),Kl(jl(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Kl(jl(this.rgba,-e))},e.prototype.grayscale=function(){return Kl(jl(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Kl(Zl(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Kl(Zl(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?Kl({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Sl(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Dl(this.rgba);return"number"==typeof e?Kl({h:e,s:t.s,l:t.l,a:t.a}):Sl(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Kl(e).toHex()},e}(),Kl=function(e){return e instanceof Ql?e:new Ql(e)},Yl=[];
+*/!function(){"use strict";var a={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var l=o.apply(null,n);l&&e.push(l)}}else if("object"===r){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var i in n)a.call(n,i)&&n[i]&&e.push(i)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},7734:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var a,o,r;if(Array.isArray(t)){if((a=t.length)!=n.length)return!1;for(o=a;0!=o--;)if(!e(t[o],n[o]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;for(o of t.entries())if(!e(o[1],n.get(o[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((a=t.length)!=n.length)return!1;for(o=a;0!=o--;)if(t[o]!==n[o])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((a=(r=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=a;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,r[o]))return!1;for(o=a;0!=o--;){var l=r[o];if(!e(t[l],n[l]))return!1}return!0}return t!=t&&n!=n}},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),a=new RegExp(n,"g"),o=new RegExp(n,"");function r(e){return t[e]}var l=function(e){return e.replace(a,r)};e.exports=l,e.exports.has=function(e){return!!e.match(o)},e.exports.remove=l}},t={};function n(a){var o=t[a];if(void 0!==o)return o.exports;var r=t[a]={exports:{}};return e[a](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};(()=>{"use strict";n.r(a),n.d(a,{__experimentalGetCoreBlocks:()=>iB,__experimentalRegisterExperimentalCoreBlocks:()=>cB,registerCoreBlocks:()=>sB});var e={};n.r(e),n.d(e,{init:()=>st,metadata:()=>rt,name:()=>lt,settings:()=>it});var t={};n.r(t),n.d(t,{init:()=>Bt,metadata:()=>Et,name:()=>Ct,settings:()=>St});var o={};n.r(o),n.d(o,{init:()=>an,metadata:()=>en,name:()=>tn,settings:()=>nn});var r={};n.r(r),n.d(r,{init:()=>Tn,metadata:()=>Sn,name:()=>Bn,settings:()=>Nn});var l={};n.r(l),n.d(l,{init:()=>Gn,metadata:()=>Vn,name:()=>$n,settings:()=>On});var i={};n.r(i),n.d(i,{init:()=>Kn,metadata:()=>Wn,name:()=>Zn,settings:()=>Qn});var s={};n.r(s),n.d(s,{init:()=>aa,metadata:()=>ea,name:()=>ta,settings:()=>na});var c={};n.r(c),n.d(c,{init:()=>ha,metadata:()=>pa,name:()=>da,settings:()=>ga});var m={};n.r(m),n.d(m,{init:()=>Ea,metadata:()=>ka,name:()=>xa,settings:()=>wa});var u={};n.r(u),n.d(u,{init:()=>Ma,metadata:()=>Ta,name:()=>Ia,settings:()=>Pa});var p={};n.r(p),n.d(p,{init:()=>Qa,metadata:()=>ja,name:()=>Wa,settings:()=>Za});var d={};n.r(d),n.d(d,{init:()=>io,metadata:()=>oo,name:()=>ro,settings:()=>lo});var g={};n.r(g),n.d(g,{init:()=>uo,metadata:()=>so,name:()=>co,settings:()=>mo});var h={};n.r(h),n.d(h,{init:()=>vo,metadata:()=>bo,name:()=>_o,settings:()=>yo});var b={};n.r(b),n.d(b,{init:()=>Eo,metadata:()=>ko,name:()=>xo,settings:()=>wo});var _={};n.r(_),n.d(_,{init:()=>Mo,metadata:()=>To,name:()=>Io,settings:()=>Po});var y={};n.r(y),n.d(y,{init:()=>Lo,metadata:()=>Ro,name:()=>Ao,settings:()=>Ho});var v={};n.r(v),n.d(v,{init:()=>Go,metadata:()=>Vo,name:()=>$o,settings:()=>Oo});var f={};n.r(f),n.d(f,{init:()=>tr,metadata:()=>Jo,name:()=>Xo,settings:()=>er});var k={};n.r(k),n.d(k,{init:()=>ir,metadata:()=>or,name:()=>rr,settings:()=>lr});var x={};n.r(x),n.d(x,{init:()=>gr,metadata:()=>ur,name:()=>pr,settings:()=>dr});var w={};n.r(w),n.d(w,{init:()=>fr,metadata:()=>_r,name:()=>yr,settings:()=>vr});var E={};n.r(E),n.d(E,{init:()=>Sr,metadata:()=>wr,name:()=>Er,settings:()=>Cr});var C={};n.r(C),n.d(C,{init:()=>Rr,metadata:()=>Pr,name:()=>Mr,settings:()=>zr});var S={};n.r(S),n.d(S,{init:()=>Ii,metadata:()=>Bi,name:()=>Ni,settings:()=>Ti});var B={};n.r(B),n.d(B,{init:()=>Li,metadata:()=>Ri,name:()=>Ai,settings:()=>Hi});var N={};n.r(N),n.d(N,{init:()=>Ss,metadata:()=>ws,name:()=>Es,settings:()=>Cs});var T={};n.r(T),n.d(T,{init:()=>Gs,metadata:()=>Vs,name:()=>$s,settings:()=>Os});var I={};n.r(I),n.d(I,{init:()=>ec,metadata:()=>Ys,name:()=>Js,settings:()=>Xs});var P={};n.r(P),n.d(P,{init:()=>pc,metadata:()=>cc,name:()=>mc,settings:()=>uc});var M={};n.r(M),n.d(M,{init:()=>vc,metadata:()=>bc,name:()=>_c,settings:()=>yc});var z={};n.r(z),n.d(z,{init:()=>Nc,metadata:()=>Cc,name:()=>Sc,settings:()=>Bc});var R={};n.r(R),n.d(R,{init:()=>Om,metadata:()=>Fm,name:()=>Vm,settings:()=>$m});var A={};n.r(A),n.d(A,{init:()=>ru,metadata:()=>nu,name:()=>au,settings:()=>ou});var H={};n.r(H),n.d(H,{init:()=>Nu,metadata:()=>Cu,name:()=>Su,settings:()=>Bu});var L={};n.r(L),n.d(L,{init:()=>Ru,metadata:()=>Pu,name:()=>Mu,settings:()=>zu});var D={};n.r(D),n.d(D,{init:()=>Gu,metadata:()=>Vu,name:()=>$u,settings:()=>Ou});var F={};n.r(F),n.d(F,{init:()=>fp,metadata:()=>_p,name:()=>yp,settings:()=>vp});var V={};n.r(V),n.d(V,{init:()=>Cp,metadata:()=>xp,name:()=>wp,settings:()=>Ep});var $={};n.r($),n.d($,{init:()=>Ap,metadata:()=>Mp,name:()=>zp,settings:()=>Rp});var O={};n.r(O),n.d(O,{init:()=>id,metadata:()=>od,name:()=>rd,settings:()=>ld});var G={};n.r(G),n.d(G,{init:()=>kd,metadata:()=>yd,name:()=>vd,settings:()=>fd});var U={};n.r(U),n.d(U,{init:()=>Sd,metadata:()=>wd,name:()=>Ed,settings:()=>Cd});var q={};n.r(q),n.d(q,{init:()=>pg,metadata:()=>cg,name:()=>mg,settings:()=>ug});var j={};n.r(j),n.d(j,{init:()=>yg,metadata:()=>hg,name:()=>bg,settings:()=>_g});var W={};n.r(W),n.d(W,{init:()=>Cg,metadata:()=>xg,name:()=>wg,settings:()=>Eg});var Z={};n.r(Z),n.d(Z,{init:()=>tb,metadata:()=>Jh,name:()=>Xh,settings:()=>eb});var Q={};n.r(Q),n.d(Q,{init:()=>gb,metadata:()=>ub,name:()=>pb,settings:()=>db});var K={};n.r(K),n.d(K,{init:()=>Eb,metadata:()=>kb,name:()=>xb,settings:()=>wb});var Y={};n.r(Y),n.d(Y,{init:()=>Ib,metadata:()=>Bb,name:()=>Nb,settings:()=>Tb});var J={};n.r(J),n.d(J,{init:()=>Vb,metadata:()=>Lb,name:()=>Db,settings:()=>Fb});var X={};n.r(X),n.d(X,{init:()=>Jb,metadata:()=>Qb,name:()=>Kb,settings:()=>Yb});var ee={};n.r(ee),n.d(ee,{init:()=>a_,metadata:()=>e_,name:()=>t_,settings:()=>n_});var te={};n.r(te),n.d(te,{init:()=>E_,metadata:()=>k_,name:()=>x_,settings:()=>w_});var ne={};n.r(ne),n.d(ne,{init:()=>P_,metadata:()=>N_,name:()=>T_,settings:()=>I_});var ae={};n.r(ae),n.d(ae,{init:()=>L_,metadata:()=>R_,name:()=>A_,settings:()=>H_});var oe={};n.r(oe),n.d(oe,{init:()=>O_,metadata:()=>F_,name:()=>V_,settings:()=>$_});var re={};n.r(re),n.d(re,{init:()=>Z_,metadata:()=>q_,name:()=>j_,settings:()=>W_});var le={};n.r(le),n.d(le,{init:()=>X_,metadata:()=>K_,name:()=>Y_,settings:()=>J_});var ie={};n.r(ie),n.d(ie,{init:()=>oy,metadata:()=>ty,name:()=>ny,settings:()=>ay});var se={};n.r(se),n.d(se,{init:()=>cy,metadata:()=>ly,name:()=>iy,settings:()=>sy});var ce={};n.r(ce),n.d(ce,{init:()=>fy,metadata:()=>_y,name:()=>yy,settings:()=>vy});var me={};n.r(me),n.d(me,{init:()=>Ty,metadata:()=>Sy,name:()=>By,settings:()=>Ny});var ue={};n.r(ue),n.d(ue,{init:()=>Ay,metadata:()=>My,name:()=>zy,settings:()=>Ry});var pe={};n.r(pe),n.d(pe,{init:()=>Wy,metadata:()=>Uy,name:()=>qy,settings:()=>jy});var de={};n.r(de),n.d(de,{init:()=>tv,metadata:()=>Jy,name:()=>Xy,settings:()=>ev});var ge={};n.r(ge),n.d(ge,{init:()=>sv,metadata:()=>rv,name:()=>lv,settings:()=>iv});var he={};n.r(he),n.d(he,{init:()=>yv,metadata:()=>hv,name:()=>bv,settings:()=>_v});var be={};n.r(be),n.d(be,{init:()=>Cv,metadata:()=>xv,name:()=>wv,settings:()=>Ev});var _e={};n.r(_e),n.d(_e,{init:()=>Pv,metadata:()=>Nv,name:()=>Tv,settings:()=>Iv});var ye={};n.r(ye),n.d(ye,{init:()=>Dv,metadata:()=>Av,name:()=>Hv,settings:()=>Lv});var ve={};n.r(ve),n.d(ve,{init:()=>of,metadata:()=>tf,name:()=>nf,settings:()=>af});var fe={};n.r(fe),n.d(fe,{init:()=>hk,metadata:()=>pk,name:()=>dk,settings:()=>gk});var ke={};n.r(ke),n.d(ke,{init:()=>fk,metadata:()=>_k,name:()=>yk,settings:()=>vk});var xe={};n.r(xe),n.d(xe,{init:()=>Nk,metadata:()=>Ck,name:()=>Sk,settings:()=>Bk});var we={};n.r(we),n.d(we,{init:()=>zk,metadata:()=>Ik,name:()=>Pk,settings:()=>Mk});var Ee={};n.r(Ee),n.d(Ee,{init:()=>Dk,metadata:()=>Ak,name:()=>Hk,settings:()=>Lk});var Ce={};n.r(Ce),n.d(Ce,{init:()=>Gk,metadata:()=>Vk,name:()=>$k,settings:()=>Ok});var Se={};n.r(Se),n.d(Se,{init:()=>Jk,metadata:()=>Qk,name:()=>Kk,settings:()=>Yk});var Be={};n.r(Be),n.d(Be,{init:()=>dx,metadata:()=>mx,name:()=>ux,settings:()=>px});var Ne={};n.r(Ne),n.d(Ne,{init:()=>Ax,metadata:()=>Mx,name:()=>zx,settings:()=>Rx});var Te={};n.r(Te),n.d(Te,{init:()=>Fx,metadata:()=>Hx,name:()=>Lx,settings:()=>Dx});var Ie={};n.r(Ie),n.d(Ie,{init:()=>Ux,metadata:()=>$x,name:()=>Ox,settings:()=>Gx});var Pe={};n.r(Pe),n.d(Pe,{init:()=>aw,metadata:()=>ew,name:()=>tw,settings:()=>nw});var Me={};n.r(Me),n.d(Me,{init:()=>uw,metadata:()=>sw,name:()=>cw,settings:()=>mw});var ze={};n.r(ze),n.d(ze,{init:()=>yw,metadata:()=>hw,name:()=>bw,settings:()=>_w});var Re={};n.r(Re),n.d(Re,{init:()=>Tw,metadata:()=>Sw,name:()=>Bw,settings:()=>Nw});var Ae={};n.r(Ae),n.d(Ae,{init:()=>Hw,metadata:()=>zw,name:()=>Rw,settings:()=>Aw});var He={};n.r(He),n.d(He,{init:()=>qw,metadata:()=>Ow,name:()=>Gw,settings:()=>Uw});var Le={};n.r(Le),n.d(Le,{init:()=>nE,metadata:()=>Xw,name:()=>eE,settings:()=>tE});var De={};n.r(De),n.d(De,{init:()=>uE,metadata:()=>sE,name:()=>cE,settings:()=>mE});var Fe={};n.r(Fe),n.d(Fe,{init:()=>wE,metadata:()=>fE,name:()=>kE,settings:()=>xE});var Ve={};n.r(Ve),n.d(Ve,{init:()=>oC,metadata:()=>tC,name:()=>nC,settings:()=>aC});var $e={};n.r($e),n.d($e,{init:()=>hC,metadata:()=>pC,name:()=>dC,settings:()=>gC});var Oe={};n.r(Oe),n.d(Oe,{init:()=>kC,metadata:()=>yC,name:()=>vC,settings:()=>fC});var Ge={};n.r(Ge),n.d(Ge,{init:()=>XC,metadata:()=>KC,name:()=>YC,settings:()=>JC});var Ue={};n.r(Ue),n.d(Ue,{init:()=>oS,metadata:()=>tS,name:()=>nS,settings:()=>aS});var qe={};n.r(qe),n.d(qe,{init:()=>mS,metadata:()=>iS,name:()=>sS,settings:()=>cS});var je={};n.r(je),n.d(je,{init:()=>fS,metadata:()=>_S,name:()=>yS,settings:()=>vS});var We={};n.r(We),n.d(We,{init:()=>GS,metadata:()=>VS,name:()=>$S,settings:()=>OS});var Ze={};n.r(Ze),n.d(Ze,{init:()=>oB,metadata:()=>tB,name:()=>nB,settings:()=>aB});const Qe=window.wp.blocks,Ke=window.React,Ye=window.wp.primitives,Je=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"}));function Xe(e){if(!e)return;const{metadata:t,settings:n,name:a}=e;return(0,Qe.registerBlockType)({name:a,...t},n)}const et=window.wp.components,tt=window.wp.i18n,nt=window.wp.blockEditor,at=window.wp.serverSideRender;var ot=n.n(at);const rt={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/archives",title:"Archives",category:"widgets",description:"Display a date archive of your posts.",textdomain:"default",attributes:{displayAsDropdown:{type:"boolean",default:!1},showLabel:{type:"boolean",default:!0},showPostCounts:{type:"boolean",default:!1},type:{type:"string",default:"monthly"}},supports:{align:!0,html:!1,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-archives-editor"},{name:lt}=rt,it={icon:Je,example:{},edit:function({attributes:e,setAttributes:t}){const{showLabel:n,showPostCounts:a,displayAsDropdown:o,type:r}=e;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display as dropdown"),checked:o,onChange:()=>t({displayAsDropdown:!o})}),o&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show label"),checked:n,onChange:()=>t({showLabel:!n})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show post counts"),checked:a,onChange:()=>t({showPostCounts:!a})}),(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Group by:"),options:[{label:(0,tt.__)("Year"),value:"yearly"},{label:(0,tt.__)("Month"),value:"monthly"},{label:(0,tt.__)("Week"),value:"weekly"},{label:(0,tt.__)("Day"),value:"daily"}],value:r,onChange:e=>t({type:e})}))),(0,Ke.createElement)("div",{...(0,nt.useBlockProps)()},(0,Ke.createElement)(et.Disabled,null,(0,Ke.createElement)(ot(),{block:"core/archives",skipBlockSupportAttributes:!0,attributes:e}))))}},st=()=>Xe({name:lt,metadata:rt,settings:it}),ct=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.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"}));var mt=n(5755),ut=n.n(mt);const pt=window.wp.url,dt=window.wp.coreData,gt=window.wp.data;function ht(e){const t=e?e[0]:24,n=e?e[e.length-1]:96;return{minSize:t,maxSize:Math.floor(2.5*n)}}function bt(){const{avatarURL:e}=(0,gt.useSelect)((e=>{const{getSettings:t}=e(nt.store),{__experimentalDiscussionSettings:n}=t();return n}));return e}const _t=window.wp.element,yt={who:"authors",per_page:-1,_fields:"id,name",context:"view"};const vt=function({value:e,onChange:t}){const[n,a]=(0,_t.useState)(),o=(0,gt.useSelect)((e=>{const{getUsers:t}=e(dt.store);return t(yt)}),[]);if(!o)return null;const r=o.map((e=>({label:e.name,value:e.id})));return(0,Ke.createElement)(et.ComboboxControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("User"),help:(0,tt.__)("Select the avatar user to display, if it is blank it will use the post/page author."),value:e,onChange:t,options:n||r,onFilterValueChange:e=>a(r.filter((t=>t.label.toLowerCase().startsWith(e.toLowerCase()))))})},ft=({setAttributes:e,avatar:t,attributes:n,selectUser:a})=>(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Image size"),onChange:t=>e({size:t}),min:t.minSize,max:t.maxSize,initialPosition:n?.size,value:n?.size}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link to user profile"),onChange:()=>e({isLink:!n.isLink}),checked:n.isLink}),n.isLink&&(0,Ke.createElement)(et.ToggleControl,{label:(0,tt.__)("Open in new tab"),onChange:t=>e({linkTarget:t?"_blank":"_self"}),checked:"_blank"===n.linkTarget}),a&&(0,Ke.createElement)(vt,{value:n?.userId,onChange:t=>{e({userId:t})}}))),kt=({setAttributes:e,attributes:t,avatar:n,blockProps:a,isSelected:o})=>{const r=(0,nt.__experimentalUseBorderProps)(t),l=(0,pt.addQueryArgs)((0,pt.removeQueryArgs)(n?.src,["s"]),{s:2*t?.size});return(0,Ke.createElement)("div",{...a},(0,Ke.createElement)(et.ResizableBox,{size:{width:t.size,height:t.size},showHandle:o,onResizeStop:(n,a,o,r)=>{e({size:parseInt(t.size+(r.height||r.width),10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,tt.isRTL)(),bottom:!0,left:(0,tt.isRTL)()},minWidth:n.minSize,maxWidth:n.maxSize},(0,Ke.createElement)("img",{src:l,alt:n.alt,className:ut()("avatar","avatar-"+t.size,"photo","wp-block-avatar__image",r.className),style:r.style})))},xt=({attributes:e,context:t,setAttributes:n,isSelected:a})=>{const{commentId:o}=t,r=(0,nt.useBlockProps)(),l=function({commentId:e}){const[t]=(0,dt.useEntityProp)("root","comment","author_avatar_urls",e),[n]=(0,dt.useEntityProp)("root","comment","author_name",e),a=t?Object.values(t):null,o=t?Object.keys(t):null,{minSize:r,maxSize:l}=ht(o),i=bt();return{src:a?a[a.length-1]:i,minSize:r,maxSize:l,alt:n?(0,tt.sprintf)((0,tt.__)("%s Avatar"),n):(0,tt.__)("Default Avatar")}}({commentId:o});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(ft,{avatar:l,setAttributes:n,attributes:e,selectUser:!1}),e.isLink?(0,Ke.createElement)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault()},(0,Ke.createElement)(kt,{attributes:e,avatar:l,blockProps:r,isSelected:a,setAttributes:n})):(0,Ke.createElement)(kt,{attributes:e,avatar:l,blockProps:r,isSelected:a,setAttributes:n}))},wt=({attributes:e,context:t,setAttributes:n,isSelected:a})=>{const{postId:o,postType:r}=t,l=function({userId:e,postId:t,postType:n}){const{authorDetails:a}=(0,gt.useSelect)((a=>{const{getEditedEntityRecord:o,getUser:r}=a(dt.store);if(e)return{authorDetails:r(e)};const l=o("postType",n,t)?.author;return{authorDetails:l?r(l):null}}),[n,t,e]),o=a?.avatar_urls?Object.values(a.avatar_urls):null,r=a?.avatar_urls?Object.keys(a.avatar_urls):null,{minSize:l,maxSize:i}=ht(r),s=bt();return{src:o?o[o.length-1]:s,minSize:l,maxSize:i,alt:a?(0,tt.sprintf)((0,tt.__)("%s Avatar"),a?.name):(0,tt.__)("Default Avatar")}}({userId:e?.userId,postId:o,postType:r}),i=(0,nt.useBlockProps)();return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(ft,{selectUser:!0,attributes:e,avatar:l,setAttributes:n}),e.isLink?(0,Ke.createElement)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault()},(0,Ke.createElement)(kt,{attributes:e,avatar:l,blockProps:i,isSelected:a,setAttributes:n})):(0,Ke.createElement)(kt,{attributes:e,avatar:l,blockProps:i,isSelected:a,setAttributes:n}))};const Et={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,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,__experimentalDefaultControls:{margin:!1,padding:!1}},__experimentalBorder:{__experimentalSkipSerialization:!0,radius:!0,width:!0,color:!0,style:!0,__experimentalDefaultControls:{radius:!0}},color:{text:!1,background:!1,__experimentalDuotone:"img"},interactivity:{clientNavigation:!0}},selectors:{border:".wp-block-avatar img"},editorStyle:"wp-block-avatar-editor",style:"wp-block-avatar"},{name:Ct}=Et,St={icon:ct,edit:function(e){return e?.context?.commentId||null===e?.context?.commentId?(0,Ke.createElement)(xt,{...e}):(0,Ke.createElement)(wt,{...e})}},Bt=()=>Xe({name:Ct,metadata:Et,settings:St}),Nt=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.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"})),Tt=[{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({attributes:e}){const{autoplay:t,caption:n,loop:a,preload:o,src:r}=e;return(0,Ke.createElement)("figure",null,(0,Ke.createElement)("audio",{controls:"controls",src:r,autoPlay:t,loop:a,preload:o}),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:n}))}}],It=window.wp.blob,Pt=window.wp.notices;var Mt=n(1668),zt=n.n(Mt);function Rt(e,t){var n,a,o=0;function r(){var r,l,i=n,s=arguments.length;e:for(;i;){if(i.args.length===arguments.length){for(l=0;l<s;l++)if(i.args[l]!==arguments[l]){i=i.next;continue e}return i!==n&&(i===a&&(a=i.prev),i.prev.next=i.next,i.next&&(i.next.prev=i.prev),i.next=n,i.prev=null,n.prev=i,n=i),i.val}i=i.next}for(r=new Array(s),l=0;l<s;l++)r[l]=arguments[l];return i={args:r,val:e.apply(null,r)},n?(n.prev=i,i.next=n):a=i,o===t.maxSize?(a=a.prev).next=null:o++,n=i,i.val}return t=t||{},r.clear=function(){n=null,a=null,o=0},r}const At=[{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"}],Ht="wp-embed",Lt=window.wp.privateApis,{lock:Dt,unlock:Ft}=(0,Lt.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/block-library"),{name:Vt}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,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:"rich-text",source:"rich-text",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,spacing:{margin:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},$t=e=>e&&e.includes('class="wp-embedded-content"'),Ot=(e,t={})=>{const{preview:n,attributes:a={}}=e,{url:o,providerNameSlug:r,type:l,...i}=a;if(!o||!(0,Qe.getBlockType)(Vt))return;const s=(e=>(0,Qe.getBlockVariations)(Vt)?.find((({patterns:t})=>((e,t=[])=>t.some((t=>e.match(t))))(e,t))))(o),c="wordpress"===r||l===Ht;if(!c&&s&&(s.attributes.providerNameSlug!==r||!r))return(0,Qe.createBlock)(Vt,{url:o,...i,...s.attributes});const m=(0,Qe.getBlockVariations)(Vt)?.find((({name:e})=>"wordpress"===e));return m&&n&&$t(n.html)&&!c?(0,Qe.createBlock)(Vt,{url:o,...m.attributes,...t}):void 0},Gt=e=>{if(!e)return e;const t=At.reduce(((e,{className:t})=>(e[t]=!1,e)),{"wp-has-aspect-ratio":!1});return zt()(e,t)};function Ut(e,t,n=!0){if(!n)return Gt(t);const a=document.implementation.createHTMLDocument("");a.body.innerHTML=e;const o=a.body.querySelector("iframe");if(o&&o.height&&o.width){const e=(o.width/o.height).toFixed(2);for(let n=0;n<At.length;n++){const a=At[n];if(e>=a.ratio){return e-a.ratio>.1?Gt(t):zt()(Gt(t),a.className,"wp-has-aspect-ratio")}}}return t}const qt=Rt(((e,t,n,a,o=!0)=>{if(!e)return{};const r={};let{type:l="rich"}=e;const{html:i,provider_name:s}=e,{kebabCase:c}=Ft(et.privateApis),m=c((s||t).toLowerCase());return $t(i)&&(l=Ht),(i||"photo"===l)&&(r.type=l,r.providerNameSlug=m),(u=n)&&At.some((({className:e})=>u.includes(e)))||(r.className=Ut(i,n,a&&o)),r;var u})),jt=window.wp.compose,Wt=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.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"})),{PrivateRichText:Zt}=Ft(nt.privateApis);function Qt({key:e="caption",attributes:t,setAttributes:n,isSelected:a,insertBlocksAfter:o,placeholder:r=(0,tt.__)("Add caption"),label:l=(0,tt.__)("Caption text"),showToolbarButton:i=!0,className:s,disableEditing:c}){const m=t[e],u=(0,jt.usePrevious)(m),p=Zt.isEmpty(m),d=Zt.isEmpty(u),[g,h]=(0,_t.useState)(!p);(0,_t.useEffect)((()=>{!p&&d&&h(!0)}),[p,d]),(0,_t.useEffect)((()=>{!a&&p&&h(!1)}),[a,p]);const b=(0,_t.useCallback)((e=>{e&&p&&e.focus()}),[p]);return(0,Ke.createElement)(Ke.Fragment,null,i&&(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(et.ToolbarButton,{onClick:()=>{h(!g),g&&m&&n({caption:void 0})},icon:Wt,isPressed:g,label:g?(0,tt.__)("Remove caption"):(0,tt.__)("Add caption")})),g&&(!Zt.isEmpty(m)||a)&&(0,Ke.createElement)(Zt,{identifier:e,tagName:"figcaption",className:ut()(s,(0,nt.__experimentalGetElementClassName)("caption")),ref:b,"aria-label":l,placeholder:r,value:m,onChange:e=>n({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>o((0,Qe.createBlock)((0,Qe.getDefaultBlockName)())),disableEditing:c}))}const Kt=["audio"];const Yt=function({attributes:e,className:t,setAttributes:n,onReplace:a,isSelected:o,insertBlocksAfter:r}){const{id:l,autoplay:i,loop:s,preload:c,src:m}=e,u=!l&&(0,It.isBlobURL)(m),{getSettings:p}=(0,gt.useSelect)(nt.store);function d(e){return t=>{n({[e]:t})}}function g(e){if(e!==m){const t=Ot({attributes:{url:e}});if(void 0!==t&&a)return void a(t);n({src:e,id:void 0})}}(0,_t.useEffect)((()=>{if(!l&&(0,It.isBlobURL)(m)){const e=(0,It.getBlobByURL)(m);e&&p().mediaUpload({filesList:[e],onFileChange:([e])=>_(e),onError:e=>b(e),allowedTypes:Kt})}}),[]);const{createErrorNotice:h}=(0,gt.useDispatch)(Pt.store);function b(e){h(e,{type:"snackbar"})}function _(e){e&&e.url?n({src:e.url,id:e.id,caption:e.caption}):n({src:void 0,id:void 0,caption:void 0})}const y=ut()(t,{"is-transient":u}),v=(0,nt.useBlockProps)({className:y});return m?(0,Ke.createElement)(Ke.Fragment,null,o&&(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(nt.MediaReplaceFlow,{mediaId:l,mediaURL:m,allowedTypes:Kt,accept:"audio/*",onSelect:_,onSelectURL:g,onError:b})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Autoplay"),onChange:d("autoplay"),checked:i,help:function(e){return e?(0,tt.__)("Autoplay may cause usability issues for some users."):null}}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Loop"),onChange:d("loop"),checked:s}),(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt._x)("Preload","noun; Audio block parameter"),value:c||"",onChange:e=>n({preload:e||void 0}),options:[{value:"",label:(0,tt.__)("Browser default")},{value:"auto",label:(0,tt.__)("Auto")},{value:"metadata",label:(0,tt.__)("Metadata")},{value:"none",label:(0,tt._x)("None","Preload value")}]}))),(0,Ke.createElement)("figure",{...v},(0,Ke.createElement)(et.Disabled,{isDisabled:!o},(0,Ke.createElement)("audio",{controls:"controls",src:m})),u&&(0,Ke.createElement)(et.Spinner,null),(0,Ke.createElement)(Qt,{attributes:e,setAttributes:n,isSelected:o,insertBlocksAfter:r,label:(0,tt.__)("Audio caption text"),showToolbarButton:o}))):(0,Ke.createElement)("div",{...v},(0,Ke.createElement)(nt.MediaPlaceholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:Nt}),onSelect:_,onSelectURL:g,accept:"audio/*",allowedTypes:Kt,value:e,onError:b}))};const Jt={from:[{type:"files",isMatch:e=>1===e.length&&0===e[0].type.indexOf("audio/"),transform(e){const t=e[0];return(0,Qe.createBlock)("core/audio",{src:(0,It.createBlobURL)(t)})}},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:({named:{src:e,mp3:t,m4a:n,ogg:a,wav:o,wma:r}})=>e||t||n||a||o||r},loop:{type:"string",shortcode:({named:{loop:e}})=>e},autoplay:{type:"string",shortcode:({named:{autoplay:e}})=>e},preload:{type:"string",shortcode:({named:{preload:e}})=>e}}}]},Xt=Jt,en={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,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:"rich-text",source:"rich-text",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,__experimentalDefaultControls:{margin:!1,padding:!1}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-audio-editor",style:"wp-block-audio"},{name:tn}=en,nn={icon:Nt,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"},viewportWidth:350},transforms:Xt,deprecated:Tt,edit:Yt,save:function({attributes:e}){const{autoplay:t,caption:n,loop:a,preload:o,src:r}=e;return r&&(0,Ke.createElement)("figure",{...nt.useBlockProps.save()},(0,Ke.createElement)("audio",{controls:"controls",src:r,autoPlay:t,loop:a,preload:o}),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:n,className:(0,nt.__experimentalGetElementClassName)("caption")}))}},an=()=>Xe({name:tn,metadata:en,settings:nn}),on=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z"})),{cleanEmptyObject:rn}=Ft(nt.privateApis);function ln(e){if(!e?.style?.typography?.fontFamily)return e;const{fontFamily:t,...n}=e.style.typography;return{...e,style:rn({...e.style,typography:n}),fontFamily:t.split("|").pop()}}const sn=e=>{const{borderRadius:t,...n}=e,a=[t,n.style?.border?.radius].find((e=>"number"==typeof e&&0!==e));return a?{...n,style:{...n.style,border:{...n.style?.border,radius:`${a}px`}}}:n};const cn=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:a,customGradient:o,...r}=e;return{...r,style:t}},mn=e=>{const{color:t,textColor:n,...a}={...e,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0};return cn(a)},un={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"}},pn={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({attributes:e,className:t}){const{fontSize:n,linkTarget:a,rel:o,style:r,text:l,title:i,url:s,width:c}=e;if(!l)return null;const m=(0,nt.__experimentalGetBorderClassesAndStyles)(e),u=(0,nt.__experimentalGetColorClassesAndStyles)(e),p=(0,nt.__experimentalGetSpacingClassesAndStyles)(e),d=ut()("wp-block-button__link",u.className,m.className,{"no-border-radius":0===r?.border?.radius}),g={...m.style,...u.style,...p.style},h=ut()(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":n||r?.typography?.fontSize});return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:h})},(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:d,href:s,title:i,style:g,value:l,target:a,rel:o}))}},dn={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({attributes:e,className:t}){const{fontSize:n,linkTarget:a,rel:o,style:r,text:l,title:i,url:s,width:c}=e;if(!l)return null;const m=(0,nt.__experimentalGetBorderClassesAndStyles)(e),u=(0,nt.__experimentalGetColorClassesAndStyles)(e),p=(0,nt.__experimentalGetSpacingClassesAndStyles)(e),d=ut()("wp-block-button__link",u.className,m.className,{"no-border-radius":0===r?.border?.radius}),g={...m.style,...u.style,...p.style},h=ut()(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":n||r?.typography?.fontSize});return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:h})},(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:d,href:s,title:i,style:g,value:l,target:a,rel:o}))},migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},gn=[pn,dn,{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:{...un,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:({style:e})=>"number"==typeof e?.border?.radius,save({attributes:e,className:t}){const{fontSize:n,linkTarget:a,rel:o,style:r,text:l,title:i,url:s,width:c}=e;if(!l)return null;const m=r?.border?.radius,u=(0,nt.__experimentalGetColorClassesAndStyles)(e),p=ut()("wp-block-button__link",u.className,{"no-border-radius":0===r?.border?.radius}),d={borderRadius:m||void 0,...u.style},g=ut()(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":n||r?.typography?.fontSize});return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:g})},(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:p,href:s,title:i,style:d,value:l,target:a,rel:o}))},migrate:(0,jt.compose)(ln,sn)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...un,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({attributes:e,className:t}){const{borderRadius:n,linkTarget:a,rel:o,text:r,title:l,url:i,width:s}=e,c=(0,nt.__experimentalGetColorClassesAndStyles)(e),m=ut()("wp-block-button__link",c.className,{"no-border-radius":0===n}),u={borderRadius:n?n+"px":void 0,...c.style},p=ut()(t,{[`has-custom-width wp-block-button__width-${s}`]:s});return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:p})},(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:m,href:i,title:l,style:u,value:r,target:a,rel:o}))},migrate:(0,jt.compose)(ln,sn)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...un,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({attributes:e,className:t}){const{borderRadius:n,linkTarget:a,rel:o,text:r,title:l,url:i,width:s}=e,c=(0,nt.__experimentalGetColorClassesAndStyles)(e),m=ut()("wp-block-button__link",c.className,{"no-border-radius":0===n}),u={borderRadius:n?n+"px":void 0,...c.style},p=ut()(t,{[`has-custom-width wp-block-button__width-${s}`]:s});return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:p})},(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:m,href:i,title:l,style:u,value:r,target:a,rel:o}))},migrate:(0,jt.compose)(ln,sn)},{supports:{align:!0,alignWide:!1,color:{gradients:!0}},attributes:{...un,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({attributes:e}){const{borderRadius:t,linkTarget:n,rel:a,text:o,title:r,url:l}=e,i=ut()("wp-block-button__link",{"no-border-radius":0===t}),s={borderRadius:t?t+"px":void 0};return(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:i,href:l,title:r,style:s,value:o,target:n,rel:a})},migrate:sn},{supports:{align:!0,alignWide:!1},attributes:{...un,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,jt.compose)(sn,cn,(function(e){if(!e.align)return e;const{align:t,...n}=e;return{...n,className:ut()(n.className,`align${e.align}`)}})),save({attributes:e}){const{backgroundColor:t,borderRadius:n,customBackgroundColor:a,customTextColor:o,customGradient:r,linkTarget:l,gradient:i,rel:s,text:c,textColor:m,title:u,url:p}=e,d=(0,nt.getColorClassName)("color",m),g=!r&&(0,nt.getColorClassName)("background-color",t),h=(0,nt.__experimentalGetGradientClass)(i),b=ut()("wp-block-button__link",{"has-text-color":m||o,[d]:d,"has-background":t||a||r||i,[g]:g,"no-border-radius":0===n,[h]:h}),_={background:r||void 0,backgroundColor:g||r||i?void 0:a,color:d?void 0:o,borderRadius:n?n+"px":void 0};return(0,Ke.createElement)("div",null,(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:b,href:p,title:u,style:_,value:c,target:l,rel:s}))}},{attributes:{...un,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=>e.className&&e.className.includes("is-style-squared"),migrate(e){let t=e.className;return t&&(t=t.replace(/is-style-squared[\s]?/,"").trim()),sn(cn({...e,className:t||void 0,borderRadius:0}))},save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,customTextColor:a,linkTarget:o,rel:r,text:l,textColor:i,title:s,url:c}=e,m=(0,nt.getColorClassName)("color",i),u=(0,nt.getColorClassName)("background-color",t),p=ut()("wp-block-button__link",{"has-text-color":i||a,[m]:m,"has-background":t||n,[u]:u}),d={backgroundColor:u?void 0:n,color:m?void 0:a};return(0,Ke.createElement)("div",null,(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:p,href:c,title:s,style:d,value:l,target:o,rel:r}))}},{attributes:{...un,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},migrate:mn,save({attributes:e}){const{url:t,text:n,title:a,backgroundColor:o,textColor:r,customBackgroundColor:l,customTextColor:i}=e,s=(0,nt.getColorClassName)("color",r),c=(0,nt.getColorClassName)("background-color",o),m=ut()("wp-block-button__link",{"has-text-color":r||i,[s]:s,"has-background":o||l,[c]:c}),u={backgroundColor:c?void 0:l,color:s?void 0:i};return(0,Ke.createElement)("div",null,(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:m,href:t,title:a,style:u,value:n}))}},{attributes:{...un,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save({attributes:e}){const{url:t,text:n,title:a,align:o,color:r,textColor:l}=e,i={backgroundColor:r,color:l};return(0,Ke.createElement)("div",{className:`align${o}`},(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:t,title:a,style:i,value:n}))},migrate:mn},{attributes:{...un,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save({attributes:e}){const{url:t,text:n,title:a,align:o,color:r,textColor:l}=e;return(0,Ke.createElement)("div",{className:`align${o}`,style:{backgroundColor:r}},(0,Ke.createElement)(nt.RichText.Content,{tagName:"a",href:t,title:a,style:{color:l},value:n}))},migrate:mn}],hn=gn,bn="noreferrer noopener",_n="_blank",yn="nofollow";function vn(e){return e.toString().replace(/<\/?a[^>]*>/g,"")}const fn=window.wp.keycodes,kn=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})),xn=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})),wn=[...nt.__experimentalLinkControl.DEFAULT_LINK_SETTINGS,{id:"nofollow",title:(0,tt.__)("Mark as nofollow")}];function En({selectedWidth:e,setAttributes:t}){return(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Width settings")},(0,Ke.createElement)(et.ButtonGroup,{"aria-label":(0,tt.__)("Button width")},[25,50,75,100].map((n=>(0,Ke.createElement)(et.Button,{key:n,size:"small",variant:n===e?"primary":void 0,onClick:()=>{var a;t({width:e===(a=n)?void 0:a})}},n,"%")))))}const Cn=function(e){const{attributes:t,setAttributes:n,className:a,isSelected:o,onReplace:r,mergeBlocks:l,clientId:i}=e,{tagName:s,textAlign:c,linkTarget:m,placeholder:u,rel:p,style:d,text:g,url:h,width:b,metadata:_}=t,y=s||"a",[v,f]=(0,_t.useState)(null),k=(0,nt.__experimentalUseBorderProps)(t),x=(0,nt.__experimentalUseColorProps)(t),w=(0,nt.__experimentalGetSpacingClassesAndStyles)(t),E=(0,nt.__experimentalGetShadowClassesAndStyles)(t),C=(0,_t.useRef)(),S=(0,_t.useRef)(),B=(0,nt.useBlockProps)({ref:(0,jt.useMergeRefs)([f,C]),onKeyDown:function(e){fn.isKeyboardEvent.primary(e,"k")?A(e):fn.isKeyboardEvent.primaryShift(e,"k")&&(H(),S.current?.focus())}}),N=(0,nt.useBlockEditingMode)(),[T,I]=(0,_t.useState)(!1),P=!!h,M=m===_n,z=!!p?.includes(yn),R="a"===y;function A(e){e.preventDefault(),I(!0)}function H(){n({url:void 0,linkTarget:void 0,rel:void 0}),I(!1)}(0,_t.useEffect)((()=>{o||I(!1)}),[o]);const L=(0,_t.useMemo)((()=>({url:h,opensInNewTab:M,nofollow:z})),[h,M,z]),D=function(e){const{replaceBlocks:t,selectionChange:n}=(0,gt.useDispatch)(nt.store),{getBlock:a,getBlockRootClientId:o,getBlockIndex:r}=(0,gt.useSelect)(nt.store),l=(0,_t.useRef)(e);return l.current=e,(0,jt.useRefEffect)((e=>{function i(e){if(e.defaultPrevented||e.keyCode!==fn.ENTER)return;const{content:i,clientId:s}=l.current;if(i.length)return;e.preventDefault();const c=a(o(s)),m=r(s),u=(0,Qe.cloneBlock)({...c,innerBlocks:c.innerBlocks.slice(0,m)}),p=(0,Qe.createBlock)((0,Qe.getDefaultBlockName)()),d=c.innerBlocks.slice(m+1),g=d.length?[(0,Qe.cloneBlock)({...c,innerBlocks:d})]:[];t(c.clientId,[u,p,...g],1),n(p.clientId)}return e.addEventListener("keydown",i),()=>{e.removeEventListener("keydown",i)}}),[])}({content:g,clientId:i}),F=(0,jt.useMergeRefs)([D,S]),{lockUrlControls:V=!1}=(0,gt.useSelect)((e=>{if(!o)return{};const t=Ft(e(Qe.store)).getBlockBindingsSource(_?.bindings?.url?.source);return{lockUrlControls:!!_?.bindings?.url&&(!t||t?.lockAttributesEditing)}}),[o]);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("div",{...B,className:ut()(B.className,{[`has-custom-width wp-block-button__width-${b}`]:b,"has-custom-font-size":B.style.fontSize})},(0,Ke.createElement)(nt.RichText,{ref:F,"aria-label":(0,tt.__)("Button text"),placeholder:u||(0,tt.__)("Add text…"),value:g,onChange:e=>n({text:vn(e)}),withoutInteractiveFormatting:!0,className:ut()(a,"wp-block-button__link",x.className,k.className,{[`has-text-align-${c}`]:c,"no-border-radius":0===d?.border?.radius},(0,nt.__experimentalGetElementClassName)("button")),style:{...k.style,...x.style,...w.style,...E.style},onSplit:e=>(0,Qe.createBlock)("core/button",{...t,text:e}),onReplace:r,onMerge:l,identifier:"text"})),(0,Ke.createElement)(nt.BlockControls,{group:"block"},"default"===N&&(0,Ke.createElement)(nt.AlignmentControl,{value:c,onChange:e=>{n({textAlign:e})}}),!P&&R&&!V&&(0,Ke.createElement)(et.ToolbarButton,{name:"link",icon:kn,title:(0,tt.__)("Link"),shortcut:fn.displayShortcut.primary("k"),onClick:A}),P&&R&&!V&&(0,Ke.createElement)(et.ToolbarButton,{name:"link",icon:xn,title:(0,tt.__)("Unlink"),shortcut:fn.displayShortcut.primaryShift("k"),onClick:H,isActive:!0})),R&&o&&(T||P)&&!V&&(0,Ke.createElement)(et.Popover,{placement:"bottom",onClose:()=>{I(!1),S.current?.focus()},anchor:v,focusOnMount:!!T&&"firstElement",__unstableSlotName:"__unstable-block-tools-after",shift:!0},(0,Ke.createElement)(nt.__experimentalLinkControl,{value:L,onChange:({url:e,opensInNewTab:t,nofollow:a})=>n(function({rel:e="",url:t="",opensInNewTab:n,nofollow:a}){let o,r=e;if(n)o=_n,r=r?.includes(bn)?r:r+` ${bn}`;else{const e=new RegExp(`\\b${bn}\\s*`,"g");r=r?.replace(e,"").trim()}if(a)r=r?.includes(yn)?r:r+` ${yn}`;else{const e=new RegExp(`\\b${yn}\\s*`,"g");r=r?.replace(e,"").trim()}return{url:(0,pt.prependHTTP)(t),linkTarget:o,rel:r||void 0}}({rel:p,url:e,opensInNewTab:t,nofollow:a})),onRemove:()=>{H(),S.current?.focus()},forceIsEditingLink:T,settings:wn})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(En,{selectedWidth:b,setAttributes:n})),(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},R&&(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link rel"),value:p||"",onChange:e=>n({rel:e})})))};const Sn={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,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:{tagName:{type:"string",enum:["a","button"],default:"a"},type:{type:"string",default:"button"},textAlign:{type:"string"},url:{type:"string",source:"attribute",selector:"a",attribute:"href",__experimentalRole:"content"},title:{type:"string",source:"attribute",selector:"a,button",attribute:"title",__experimentalRole:"content"},text:{type:"rich-text",source:"rich-text",selector:"a,button",__experimentalRole:"content"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target",__experimentalRole:"content"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel",__experimentalRole:"content"},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:{__experimentalSkipSerialization:!0},spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},__experimentalSelector:".wp-block-button .wp-block-button__link",interactivity:{clientNavigation:!0}},styles:[{name:"fill",label:"Fill",isDefault:!0},{name:"outline",label:"Outline"}],editorStyle:"wp-block-button-editor",style:"wp-block-button"},{name:Bn}=Sn,Nn={icon:on,example:{attributes:{className:"is-style-fill",text:(0,tt.__)("Call to Action")}},edit:Cn,save:function({attributes:e,className:t}){const{tagName:n,type:a,textAlign:o,fontSize:r,linkTarget:l,rel:i,style:s,text:c,title:m,url:u,width:p}=e;if(nt.RichText.isEmpty(c))return null;const d=n||"a",g="button"===d,h=a||"button",b=(0,nt.__experimentalGetBorderClassesAndStyles)(e),_=(0,nt.__experimentalGetColorClassesAndStyles)(e),y=(0,nt.__experimentalGetSpacingClassesAndStyles)(e),v=(0,nt.__experimentalGetShadowClassesAndStyles)(e),f=ut()("wp-block-button__link",_.className,b.className,{[`has-text-align-${o}`]:o,"no-border-radius":0===s?.border?.radius},(0,nt.__experimentalGetElementClassName)("button")),k={...b.style,..._.style,...y.style,...v.style},x=ut()(t,{[`has-custom-width wp-block-button__width-${p}`]:p,"has-custom-font-size":r||s?.typography?.fontSize});return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:x})},(0,Ke.createElement)(nt.RichText.Content,{tagName:d,type:g?h:null,className:f,href:g?null:u,title:m,style:k,value:c,target:g?null:l,rel:g?null:i}))},deprecated:hn,merge:(e,{text:t=""})=>({...e,text:(e.text||"")+t})},Tn=()=>Xe({name:Bn,metadata:Sn,settings:Nn}),In=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M14.5 17.5H9.5V16H14.5V17.5Z M14.5 8H9.5V6.5H14.5V8Z M7 3.5H17C18.1046 3.5 19 4.39543 19 5.5V9C19 10.1046 18.1046 11 17 11H7C5.89543 11 5 10.1046 5 9V5.5C5 4.39543 5.89543 3.5 7 3.5ZM17 5H7C6.72386 5 6.5 5.22386 6.5 5.5V9C6.5 9.27614 6.72386 9.5 7 9.5H17C17.2761 9.5 17.5 9.27614 17.5 9V5.5C17.5 5.22386 17.2761 5 17 5Z M7 13H17C18.1046 13 19 13.8954 19 15V18.5C19 19.6046 18.1046 20.5 17 20.5H7C5.89543 20.5 5 19.6046 5 18.5V15C5 13.8954 5.89543 13 7 13ZM17 14.5H7C6.72386 14.5 6.5 14.7239 6.5 15V18.5C6.5 18.7761 6.72386 19 7 19H17C17.2761 19 17.5 18.7761 17.5 18.5V15C17.5 14.7239 17.2761 14.5 17 14.5Z"})),Pn=e=>{if(e.layout)return e;const{contentJustification:t,orientation:n,...a}=e;return(t||n)&&Object.assign(a,{layout:{type:"flex",...t&&{justifyContent:t},...n&&{orientation:n}}}),a},Mn=[{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:({contentJustification:e,orientation:t})=>!!e||!!t,migrate:Pn,save:({attributes:{contentJustification:e,orientation:t}})=>(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:ut()({[`is-content-justification-${e}`]:e,"is-vertical":"vertical"===t})})},(0,Ke.createElement)(nt.InnerBlocks.Content,null))},{supports:{align:["center","left","right"],anchor:!0},save:()=>(0,Ke.createElement)("div",null,(0,Ke.createElement)(nt.InnerBlocks.Content,null)),isEligible:({align:e})=>e&&["center","left","right"].includes(e),migrate:e=>Pn({...e,align:void 0,contentJustification:e.align})}],zn=Mn,Rn=window.wp.richText;function An(e,t,n){if(!e)return;const{supports:a}=(0,Qe.getBlockType)(t),o=[];if(["core/paragraph","core/heading","core/image","core/button"].includes(t)&&n&&o.push("id","bindings"),!1!==a.renaming&&o.push("name"),!o.length)return;const r=Object.entries(e).reduce(((e,[t,a])=>o.includes(t)?(e[t]="bindings"===t?n(a):a,e):e),{});return Object.keys(r).length?r:void 0}const Hn={from:[{type:"block",isMultiBlock:!0,blocks:["core/button"],transform:e=>(0,Qe.createBlock)("core/buttons",{},e.map((e=>(0,Qe.createBlock)("core/button",e))))},{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,Qe.createBlock)("core/buttons",{},e.map((e=>{const{content:t,metadata:n}=e,a=(0,Rn.__unstableCreateElement)(document,t),o=a.innerText||"",r=a.querySelector("a"),l=r?.getAttribute("href");return(0,Qe.createBlock)("core/button",{text:o,url:l,metadata:An(n,"core/button",(({content:e})=>({text:e})))})}))),isMatch:e=>e.every((e=>{const t=(0,Rn.__unstableCreateElement)(document,e.content),n=t.innerText||"",a=t.querySelectorAll("a");return n.length<=30&&a.length<=1}))}]},Ln=Hn,Dn={name:"core/button",attributesToCopy:["backgroundColor","border","className","fontFamily","fontSize","gradient","style","textColor","width"]};const Fn=function({attributes:e,className:t}){var n;const{fontSize:a,layout:o,style:r}=e,l=(0,nt.useBlockProps)({className:ut()(t,{"has-custom-font-size":a||r?.typography?.fontSize})}),{preferredStyle:i,hasButtonVariations:s}=(0,gt.useSelect)((e=>{const t=e(nt.store).getSettings().__experimentalPreferredStyleVariations,n=e(Qe.store).getBlockVariations("core/button","inserter");return{preferredStyle:t?.value?.["core/button"],hasButtonVariations:n.length>0}}),[]),c=(0,nt.useInnerBlocksProps)(l,{defaultBlock:Dn,directInsert:!s,template:[["core/button",{className:i&&`is-style-${i}`}]],templateInsertUpdatesSelection:!0,orientation:null!==(n=o?.orientation)&&void 0!==n?n:"horizontal"});return(0,Ke.createElement)("div",{...c})};const Vn={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/buttons",title:"Buttons",category:"design",allowedBlocks:["core/button"],description:"Prompt visitors to take action with a group of button-style links.",keywords:["link"],textdomain:"default",supports:{anchor:!0,align:["wide","full"],html:!1,__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}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"},{name:$n}=Vn,On={icon:In,example:{innerBlocks:[{name:"core/button",attributes:{text:(0,tt.__)("Find out more")}},{name:"core/button",attributes:{text:(0,tt.__)("Contact us")}}]},deprecated:zn,transforms:Ln,edit:Fn,save:function({attributes:e,className:t}){const{fontSize:n,style:a}=e,o=nt.useBlockProps.save({className:ut()(t,{"has-custom-font-size":n||a?.typography?.fontSize})}),r=nt.useInnerBlocksProps.save(o);return(0,Ke.createElement)("div",{...r})}},Gn=()=>Xe({name:$n,metadata:Vn,settings:On}),Un=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.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"})),qn=Rt((e=>{if(!e)return{};const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()+1}}));const jn={from:[{type:"block",blocks:["core/archives"],transform:()=>(0,Qe.createBlock)("core/calendar")}],to:[{type:"block",blocks:["core/archives"],transform:()=>(0,Qe.createBlock)("core/archives")}]},Wn={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,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}},interactivity:{clientNavigation:!0}},style:"wp-block-calendar"},{name:Zn}=Wn,Qn={icon:Un,example:{},edit:function({attributes:e}){const t=(0,nt.useBlockProps)(),{date:n,hasPosts:a,hasPostsResolved:o}=(0,gt.useSelect)((e=>{const{getEntityRecords:t,hasFinishedResolution:n}=e(dt.store),a={status:"publish",per_page:1},o=t("postType","post",a),r=n("getEntityRecords",["postType","post",a]);let l;const i=e("core/editor");if(i){"post"===i.getEditedPostAttribute("type")&&(l=i.getEditedPostAttribute("date"))}return{date:l,hasPostsResolved:r,hasPosts:r&&1===o?.length}}),[]);return a?(0,Ke.createElement)("div",{...t},(0,Ke.createElement)(et.Disabled,null,(0,Ke.createElement)(ot(),{block:"core/calendar",attributes:{...e,...qn(n)}}))):(0,Ke.createElement)("div",{...t},(0,Ke.createElement)(et.Placeholder,{icon:Un,label:(0,tt.__)("Calendar")},o?(0,tt.__)("No published posts found."):(0,Ke.createElement)(et.Spinner,null)))},transforms:jn},Kn=()=>Xe({name:Zn,metadata:Wn,settings:Qn}),Yn=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.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"})),Jn=window.wp.htmlEntities,Xn=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.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 ea={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,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,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-categories-editor",style:"wp-block-categories"},{name:ta}=ea,na={icon:Yn,example:{},edit:function e({attributes:{displayAsDropdown:t,showHierarchy:n,showPostCounts:a,showOnlyTopLevel:o,showEmpty:r},setAttributes:l,className:i}){const s=(0,jt.useInstanceId)(e,"blocks-category-select"),c={per_page:-1,hide_empty:!r,context:"view"};o&&(c.parent=0);const{records:m,isResolving:u}=(0,dt.useEntityRecords)("taxonomy","category",c),p=e=>m?.length?null===e?m:m.filter((({parent:t})=>t===e)):[],d=e=>t=>l({[e]:t}),g=e=>e?(0,Jn.decodeEntities)(e).trim():(0,tt.__)("(Untitled)"),h=e=>{const t=p(e.id),{id:o,link:r,count:l,name:i}=e;return(0,Ke.createElement)("li",{key:o,className:`cat-item cat-item-${o}`},(0,Ke.createElement)("a",{href:r,target:"_blank",rel:"noreferrer noopener"},g(i)),a&&` (${l})`,n&&!!t.length&&(0,Ke.createElement)("ul",{className:"children"},t.map((e=>h(e)))))},b=(e,t)=>{const{id:o,count:r,name:l}=e,i=p(o);return[(0,Ke.createElement)("option",{key:o,className:`level-${t}`},Array.from({length:3*t}).map((()=>" ")),g(l),a&&` (${r})`),n&&!!i.length&&i.map((e=>b(e,t+1)))]},_=!m?.length||t||u?"div":"ul",y=ut()(i,{"wp-block-categories-list":!!m?.length&&!t&&!u,"wp-block-categories-dropdown":!!m?.length&&t&&!u}),v=(0,nt.useBlockProps)({className:y});return(0,Ke.createElement)(_,{...v},(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display as dropdown"),checked:t,onChange:d("displayAsDropdown")}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show post counts"),checked:a,onChange:d("showPostCounts")}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show only top level categories"),checked:o,onChange:d("showOnlyTopLevel")}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show empty categories"),checked:r,onChange:d("showEmpty")}),!o&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show hierarchy"),checked:n,onChange:d("showHierarchy")}))),u&&(0,Ke.createElement)(et.Placeholder,{icon:Xn,label:(0,tt.__)("Categories")},(0,Ke.createElement)(et.Spinner,null)),!u&&0===m?.length&&(0,Ke.createElement)("p",null,(0,tt.__)("Your site does not have any posts, so there is nothing to display here at the moment.")),!u&&m?.length>0&&(t?(()=>{const e=p(n?0:null);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.VisuallyHidden,{as:"label",htmlFor:s},(0,tt.__)("Categories")),(0,Ke.createElement)("select",{id:s},(0,Ke.createElement)("option",null,(0,tt.__)("Select Category")),e.map((e=>b(e,0)))))})():p(n?0:null).map((e=>h(e)))))}},aa=()=>Xe({name:ta,metadata:ea,settings:na}),oa=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.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"})),ra=({clientId:e})=>{const{replaceBlocks:t}=(0,gt.useDispatch)(nt.store),n=(0,gt.useSelect)((t=>t(nt.store).getBlock(e)),[e]);return(0,Ke.createElement)(et.ToolbarButton,{onClick:()=>t(n.clientId,(0,Qe.rawHandler)({HTML:(0,Qe.serialize)(n)}))},(0,tt.__)("Convert to blocks"))},la=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"}));function ia({onClick:e,isModalFullScreen:t}){return(0,jt.useViewportMatch)("small","<")?null:(0,Ke.createElement)(et.Button,{onClick:e,icon:la,isPressed:t,label:t?(0,tt.__)("Exit fullscreen"):(0,tt.__)("Enter fullscreen")})}function sa(e){const t=(0,gt.useSelect)((e=>e(nt.store).getSettings().styles));return(0,_t.useEffect)((()=>{const{baseURL:n,suffix:a,settings:o}=window.wpEditorL10n.tinymce;return window.tinymce.EditorManager.overrideDefaults({base_url:n,suffix:a}),window.wp.oldEditor.initialize(e.id,{tinymce:{...o,setup(e){e.on("init",(()=>{const n=e.getDoc();t.forEach((({css:e})=>{const t=n.createElement("style");t.innerHTML=e,n.head.appendChild(t)}))}))}}}),()=>{window.wp.oldEditor.remove(e.id)}}),[]),(0,Ke.createElement)("textarea",{...e})}function ca(e){const{clientId:t,attributes:{content:n},setAttributes:a,onReplace:o}=e,[r,l]=(0,_t.useState)(!1),[i,s]=(0,_t.useState)(!1),c=`editor-${t}`,m=()=>n?l(!1):o([]);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.ToolbarButton,{onClick:()=>l(!0)},(0,tt.__)("Edit")))),n&&(0,Ke.createElement)(_t.RawHTML,null,n),(r||!n)&&(0,Ke.createElement)(et.Modal,{title:(0,tt.__)("Classic Editor"),onRequestClose:m,shouldCloseOnClickOutside:!1,overlayClassName:"block-editor-freeform-modal",isFullScreen:i,className:"block-editor-freeform-modal__content",headerActions:(0,Ke.createElement)(ia,{onClick:()=>s(!i),isModalFullScreen:i})},(0,Ke.createElement)(sa,{id:c,defaultValue:n}),(0,Ke.createElement)(et.Flex,{className:"block-editor-freeform-modal__actions",justify:"flex-end",expanded:!1},(0,Ke.createElement)(et.FlexItem,null,(0,Ke.createElement)(et.Button,{variant:"tertiary",onClick:m},(0,tt.__)("Cancel"))),(0,Ke.createElement)(et.FlexItem,null,(0,Ke.createElement)(et.Button,{variant:"primary",onClick:()=>{a({content:window.wp.oldEditor.getContent(c)}),l(!1)}},(0,tt.__)("Save"))))))}const{wp:ma}=window;function ua({clientId:e,attributes:{content:t},setAttributes:n,onReplace:a}){const{getMultiSelectedBlockClientIds:o}=(0,gt.useSelect)(nt.store),r=(0,_t.useRef)(!1);return(0,_t.useEffect)((()=>{if(!r.current)return;const n=window.tinymce.get(`editor-${e}`),a=n?.getContent();a!==t&&n.setContent(t||"")}),[t]),(0,_t.useEffect)((()=>{const{baseURL:l,suffix:i}=window.wpEditorL10n.tinymce;function s(e){let r;t&&e.on("loadContent",(()=>e.setContent(t))),e.on("blur",(()=>{r=e.selection.getBookmark(2,!0);const t=document.querySelector(".interface-interface-skeleton__content"),a=t.scrollTop;return o()?.length||n({content:e.getContent()}),e.once("focus",(()=>{r&&(e.selection.moveToBookmark(r),t.scrollTop!==a&&(t.scrollTop=a))})),!1})),e.on("mousedown touchstart",(()=>{r=null}));const l=(0,jt.debounce)((()=>{const t=e.getContent();t!==e._lastChange&&(e._lastChange=t,n({content:t}))}),250);e.on("Paste Change input Undo Redo",l),e.on("remove",l.cancel),e.on("keydown",(t=>{fn.isKeyboardEvent.primary(t,"z")&&t.stopPropagation(),t.keyCode!==fn.BACKSPACE&&t.keyCode!==fn.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)||(a([]),t.preventDefault(),t.stopImmediatePropagation());const{altKey:n}=t;n&&t.keyCode===fn.F10&&t.stopPropagation()})),e.on("init",(()=>{const t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())}))}function c(){const{settings:t}=window.wpEditorL10n.tinymce;ma.oldEditor.initialize(`editor-${e}`,{tinymce:{...t,inline:!0,content_css:!1,fixed_toolbar_container:`#toolbar-${e}`,setup:s}})}function m(){"complete"===document.readyState&&c()}return r.current=!0,window.tinymce.EditorManager.overrideDefaults({base_url:l,suffix:i}),"complete"===document.readyState?c():document.addEventListener("readystatechange",m),()=>{document.removeEventListener("readystatechange",m),ma.oldEditor.remove(`editor-${e}`)}}),[]),(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("div",{key:"toolbar",id:`toolbar-${e}`,className:"block-library-classic__toolbar",onClick:function(){const t=window.tinymce.get(`editor-${e}`);t&&t.focus()},"data-placeholder":(0,tt.__)("Classic"),onKeyDown:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}}),(0,Ke.createElement)("div",{key:"editor",id:`editor-${e}`,className:"wp-block-freeform block-library-rich-text__tinymce"}))}const pa={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/freeform",title:"Classic",category:"text",description:"Use the classic WordPress editor.",textdomain:"default",attributes:{content:{type:"string",source:"raw"}},supports:{className:!1,customClassName:!1,reusable:!1},editorStyle:"wp-block-freeform-editor"},{name:da}=pa,ga={icon:oa,edit:function(e){const{clientId:t}=e,n=(0,gt.useSelect)((e=>e(nt.store).canRemoveBlock(t)),[t]),[a,o]=(0,_t.useState)(!1),r=(0,jt.useRefEffect)((e=>{o(e.ownerDocument!==document)}),[]);return(0,Ke.createElement)(Ke.Fragment,null,n&&(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(ra,{clientId:t}))),(0,Ke.createElement)("div",{...(0,nt.useBlockProps)({ref:r})},a?(0,Ke.createElement)(ca,{...e}):(0,Ke.createElement)(ua,{...e})))},save:function({attributes:e}){const{content:t}=e;return(0,Ke.createElement)(_t.RawHTML,null,t)}},ha=()=>Xe({name:da,metadata:pa,settings:ga}),ba=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.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 _a(e){return e.replace(/\[/g,"&#91;")}function ya(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1&#47;&#47;$2")}const va={from:[{type:"enter",regExp:/^```$/,transform:()=>(0,Qe.createBlock)("core/code")},{type:"block",blocks:["core/paragraph"],transform:({content:e,metadata:t})=>(0,Qe.createBlock)("core/code",{content:e,metadata:An(t,"core/code")})},{type:"block",blocks:["core/html"],transform:({content:e,metadata:t})=>(0,Qe.createBlock)("core/code",{content:(0,Rn.toHTMLString)({value:(0,Rn.create)({text:e})}),metadata:An(t,"core/code")})},{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:({content:e,metadata:t})=>(0,Qe.createBlock)("core/paragraph",{content:e,metadata:An(t,"core/paragraph")})}]},fa=va,ka={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/code",title:"Code",category:"text",description:"Display code snippets that respect your spacing and tabs.",textdomain:"default",attributes:{content:{type:"rich-text",source:"rich-text",selector:"code",__unstablePreserveWhiteSpace:!0}},supports:{align:["wide"],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,__experimentalDefaultControls:{margin:!1,padding:!1}},__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}},interactivity:{clientNavigation:!0}},style:"wp-block-code"},{name:xa}=ka,wa={icon:ba,example:{attributes:{content:(0,tt.__)("// 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 );")}},merge:(e,t)=>({content:e.content+"\n\n"+t.content}),transforms:fa,edit:function({attributes:e,setAttributes:t,onRemove:n,insertBlocksAfter:a,mergeBlocks:o}){const r=(0,nt.useBlockProps)();return(0,Ke.createElement)("pre",{...r},(0,Ke.createElement)(nt.RichText,{tagName:"code",identifier:"content",value:e.content,onChange:e=>t({content:e}),onRemove:n,onMerge:o,placeholder:(0,tt.__)("Write code…"),"aria-label":(0,tt.__)("Code"),preserveWhiteSpace:!0,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>a((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))}))},save:function({attributes:e}){return(0,Ke.createElement)("pre",{...nt.useBlockProps.save()},(0,Ke.createElement)(nt.RichText.Content,{tagName:"code",value:(t="string"==typeof e.content?e.content:e.content.toHTMLString({preserveWhiteSpace:!0}),(0,jt.pipe)(_a,ya)(t||""))}));var t}},Ea=()=>Xe({name:xa,metadata:ka,settings:wa}),Ca=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.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"})),Sa=[{attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}},isEligible:({width:e})=>isFinite(e),migrate:e=>({...e,width:`${e.width}%`}),save({attributes:e}){const{verticalAlignment:t,width:n}=e,a=ut()({[`is-vertically-aligned-${t}`]:t}),o={flexBasis:n+"%"};return(0,Ke.createElement)("div",{className:a,style:o},(0,Ke.createElement)(nt.InnerBlocks.Content,null))}}],Ba=Sa;const Na=function({attributes:{verticalAlignment:e,width:t,templateLock:n,allowedBlocks:a},setAttributes:o,clientId:r}){const l=ut()("block-core-columns",{[`is-vertically-aligned-${e}`]:e}),[i]=(0,nt.useSettings)("spacing.units"),s=(0,et.__experimentalUseCustomUnits)({availableUnits:i||["%","px","em","rem","vw"]}),{columnsIds:c,hasChildBlocks:m,rootClientId:u}=(0,gt.useSelect)((e=>{const{getBlockOrder:t,getBlockRootClientId:n}=e(nt.store),a=n(r);return{hasChildBlocks:t(r).length>0,rootClientId:a,columnsIds:t(a)}}),[r]),{updateBlockAttributes:p}=(0,gt.useDispatch)(nt.store),d=Number.isFinite(t)?t+"%":t,g=(0,nt.useBlockProps)({className:l,style:d?{flexBasis:d}:void 0}),h=c.length,b=c.indexOf(r)+1,_=(0,tt.sprintf)((0,tt.__)("%1$s (%2$d of %3$d)"),g["aria-label"],b,h),y=(0,nt.useInnerBlocksProps)({...g,"aria-label":_},{templateLock:n,allowedBlocks:a,renderAppender:m?void 0:nt.InnerBlocks.ButtonBlockAppender});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(nt.BlockVerticalAlignmentToolbar,{onChange:e=>{o({verticalAlignment:e}),p(u,{verticalAlignment:null})},value:e,controls:["top","center","bottom","stretch"]})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.__experimentalUnitControl,{label:(0,tt.__)("Width"),labelPosition:"edge",__unstableInputWidth:"80px",value:t||"",onChange:e=>{e=0>parseFloat(e)?"0":e,o({width:e})},units:s}))),(0,Ke.createElement)("div",{...y}))};const Ta={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/column",title:"Column",category:"design",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:{__experimentalOnEnter:!0,anchor:!0,reusable:!1,html:!1,color:{gradients:!0,heading:!0,button:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},shadow:!0,spacing:{blockGap:!0,padding:!0,__experimentalDefaultControls:{padding:!0,blockGap:!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}},layout:!0,interactivity:{clientNavigation:!0}}},{name:Ia}=Ta,Pa={icon:Ca,edit:Na,save:function({attributes:e}){const{verticalAlignment:t,width:n}=e,a=ut()({[`is-vertically-aligned-${t}`]:t});let o;if(n&&/\d/.test(n)){let e=Number.isFinite(n)?n+"%":n;if(!Number.isFinite(n)&&n?.endsWith("%")){const t=1e12;e=Math.round(Number.parseFloat(n)*t)/t+"%"}o={flexBasis:e}}const r=nt.useBlockProps.save({className:a,style:o}),l=nt.useInnerBlocksProps.save(r);return(0,Ke.createElement)("div",{...l})},deprecated:Ba},Ma=()=>Xe({name:Ia,metadata:Ta,settings:Pa}),za=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 7.5h-5v10h5v-10Zm1.5 0v10H19a.5.5 0 0 0 .5-.5V8a.5.5 0 0 0-.5-.5h-2.5ZM6 7.5h2.5v10H6a.5.5 0 0 1-.5-.5V8a.5.5 0 0 1 .5-.5ZM6 6h13a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Z"}));function Ra(e){let t,{doc:n}=Ra;n||(n=document.implementation.createHTMLDocument(""),Ra.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}const Aa=[{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:a,...o}=e;return{...o,style:t,isStackedOnMobile:!0}},save({attributes:e}){const{verticalAlignment:t,backgroundColor:n,customBackgroundColor:a,textColor:o,customTextColor:r}=e,l=(0,nt.getColorClassName)("background-color",n),i=(0,nt.getColorClassName)("color",o),s=ut()({"has-background":n||a,"has-text-color":o||r,[l]:l,[i]:i,[`are-vertically-aligned-${t}`]:t}),c={backgroundColor:l?void 0:a,color:i?void 0:r};return(0,Ke.createElement)("div",{className:s||void 0,style:c},(0,Ke.createElement)(nt.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},isEligible:(e,t)=>!!t.some((e=>/layout-column-\d+/.test(e.originalContent)))&&t.some((e=>void 0!==Ra(e.originalContent))),migrate(e,t){const n=t.reduce(((e,t)=>{const{originalContent:n}=t;let a=Ra(n);return void 0===a&&(a=0),e[a]||(e[a]=[]),e[a].push(t),e}),[]).map((e=>(0,Qe.createBlock)("core/column",{},e))),{columns:a,...o}=e;return[{...o,isStackedOnMobile:!0},n]},save({attributes:e}){const{columns:t}=e;return(0,Ke.createElement)("div",{className:`has-${t}-columns`},(0,Ke.createElement)(nt.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},migrate(e,t){const{columns:n,...a}=e;return[e={...a,isStackedOnMobile:!0},t]},save({attributes:e}){const{verticalAlignment:t,columns:n}=e,a=ut()(`has-${n}-columns`,{[`are-vertically-aligned-${t}`]:t});return(0,Ke.createElement)("div",{className:a},(0,Ke.createElement)(nt.InnerBlocks.Content,null))}}],Ha=e=>{const t=parseFloat(e);return Number.isFinite(t)?parseFloat(t.toFixed(2)):void 0};function La(e,t){const{width:n=100/t}=e.attributes;return Ha(n)}function Da(e,t,n=e.length){const a=function(e,t=e.length){return e.reduce(((e,n)=>e+La(n,t)),0)}(e,n);return Object.fromEntries(Object.entries(function(e,t=e.length){return e.reduce(((e,n)=>{const a=La(n,t);return Object.assign(e,{[n.clientId]:a})}),{})}(e,n)).map((([e,n])=>[e,Ha(t*n/a)])))}function Fa(e,t){return e.map((e=>({...e,attributes:{...e.attributes,width:`${t[e.clientId]}%`}})))}function Va({attributes:e,setAttributes:t,clientId:n}){const{isStackedOnMobile:a,verticalAlignment:o,templateLock:r}=e,{count:l,canInsertColumnBlock:i,minCount:s}=(0,gt.useSelect)((e=>{const{canInsertBlockType:t,canRemoveBlock:a,getBlocks:o,getBlockCount:r}=e(nt.store),l=o(n).reduce(((e,t,n)=>(a(t.clientId)||e.push(n),e)),[]);return{count:r(n),canInsertColumnBlock:t("core/column",n),minCount:Math.max(...l)+1}}),[n]),c=(0,gt.useRegistry)(),{getBlocks:m,getBlockOrder:u}=(0,gt.useSelect)(nt.store),{updateBlockAttributes:p,replaceInnerBlocks:d}=(0,gt.useDispatch)(nt.store),g=ut()({[`are-vertically-aligned-${o}`]:o,"is-not-stacked-on-mobile":!a}),h=(0,nt.useBlockProps)({className:g}),b=(0,nt.useInnerBlocksProps)(h,{orientation:"horizontal",renderAppender:!1,templateLock:r});function _(e,t){let a=m(n);const o=a.every((e=>{const t=e.attributes.width;return Number.isFinite(t?.endsWith?.("%")?parseFloat(t):t)}));const r=t>e;if(r&&o){const n=Ha(100/t);a=[...Fa(a,Da(a,100-n)),...Array.from({length:t-e}).map((()=>(0,Qe.createBlock)("core/column",{width:`${n}%`})))]}else if(r)a=[...a,...Array.from({length:t-e}).map((()=>(0,Qe.createBlock)("core/column")))];else if(t<e&&(a=a.slice(0,-(e-t)),o)){a=Fa(a,Da(a,100))}d(n,a)}return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(nt.BlockVerticalAlignmentToolbar,{onChange:function(e){const a=u(n);c.batch((()=>{t({verticalAlignment:e}),p(a,{verticalAlignment:e})}))},value:o})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},i&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Columns"),value:l,onChange:e=>_(l,Math.max(s,e)),min:Math.max(1,s),max:Math.max(6,l)}),l>6&&(0,Ke.createElement)(et.Notice,{status:"warning",isDismissible:!1},(0,tt.__)("This column count exceeds the recommended amount and may cause visual breakage."))),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Stack on mobile"),checked:a,onChange:()=>t({isStackedOnMobile:!a})}))),(0,Ke.createElement)("div",{...b}))}function $a({clientId:e,name:t,setAttributes:n}){const{blockType:a,defaultVariation:o,variations:r}=(0,gt.useSelect)((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:o}=e(Qe.store);return{blockType:a(t),defaultVariation:o(t,"block"),variations:n(t,"block")}}),[t]),{replaceInnerBlocks:l}=(0,gt.useDispatch)(nt.store),i=(0,nt.useBlockProps)();return(0,Ke.createElement)("div",{...i},(0,Ke.createElement)(nt.__experimentalBlockVariationPicker,{icon:a?.icon?.src,label:a?.title,variations:r,onSelect:(t=o)=>{t.attributes&&n(t.attributes),t.innerBlocks&&l(e,(0,Qe.createBlocksFromInnerBlocksTemplate)(t.innerBlocks),!0)},allowSkip:!0}))}const Oa=e=>{const{clientId:t}=e,n=(0,gt.useSelect)((e=>e(nt.store).getBlocks(t).length>0),[t])?Va:$a;return(0,Ke.createElement)(n,{...e})};const Ga=[{name:"one-column-full",title:(0,tt.__)("100"),description:(0,tt.__)("One column"),icon:(0,Ke.createElement)(et.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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,tt.__)("50 / 50"),description:(0,tt.__)("Two columns; equal split"),icon:(0,Ke.createElement)(et.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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,tt.__)("33 / 66"),description:(0,tt.__)("Two columns; one-third, two-thirds split"),icon:(0,Ke.createElement)(et.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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,tt.__)("66 / 33"),description:(0,tt.__)("Two columns; two-thirds, one-third split"),icon:(0,Ke.createElement)(et.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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,tt.__)("33 / 33 / 33"),description:(0,tt.__)("Three columns; equal split"),icon:(0,Ke.createElement)(et.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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,tt.__)("25 / 50 / 25"),description:(0,tt.__)("Three columns; wide center column"),icon:(0,Ke.createElement)(et.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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"]}],Ua={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:e=>{const t=+(100/e.length).toFixed(2),n=e.map((({name:e,attributes:n,innerBlocks:a})=>["core/column",{width:`${t}%`},[[e,{...n},a]]]));return(0,Qe.createBlock)("core/columns",{},(0,Qe.createBlocksFromInnerBlocksTemplate)(n))},isMatch:({length:e},t)=>(1!==t.length||"core/columns"!==t[0].name)&&(e&&e<=6)},{type:"block",blocks:["core/media-text"],priority:1,transform:(e,t)=>{const{align:n,backgroundColor:a,textColor:o,style:r,mediaAlt:l,mediaId:i,mediaPosition:s,mediaSizeSlug:c,mediaType:m,mediaUrl:u,mediaWidth:p,verticalAlignment:d}=e;let g;if("image"!==m&&m)g=["core/video",{id:i,src:u}];else{g=["core/image",{...{id:i,alt:l,url:u,sizeSlug:c},...{href:e.href,linkClass:e.linkClass,linkDestination:e.linkDestination,linkTarget:e.linkTarget,rel:e.rel}}]}const h=[["core/column",{width:`${p}%`},[g]],["core/column",{width:100-p+"%"},t]];return"right"===s&&h.reverse(),(0,Qe.createBlock)("core/columns",{align:n,backgroundColor:a,textColor:o,style:r,verticalAlignment:d},(0,Qe.createBlocksFromInnerBlocksTemplate)(h))}}],ungroup:(e,t)=>t.flatMap((e=>e.innerBlocks))},qa=Ua,ja={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/columns",title:"Columns",category:"design",allowedBlocks:["core/column"],description:"Display content in multiple columns, with blocks added to each column.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0,heading:!0,button:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{blockGap:{__experimentalDefault:"2em",sides:["horizontal","vertical"]},margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},layout:{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}},interactivity:{clientNavigation:!0},shadow:!0},editorStyle:"wp-block-columns-editor",style:"wp-block-columns"},{name:Wa}=ja,Za={icon:za,variations:Ga,example:{viewportWidth:600,innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,tt.__)("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,tt.__)("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,tt.__)("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,tt.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:Aa,edit:Oa,save:function({attributes:e}){const{isStackedOnMobile:t,verticalAlignment:n}=e,a=ut()({[`are-vertically-aligned-${n}`]:n,"is-not-stacked-on-mobile":!t}),o=nt.useBlockProps.save({className:a}),r=nt.useInnerBlocksProps.save(o);return(0,Ke.createElement)("div",{...r})},transforms:qa},Qa=()=>Xe({name:Wa,metadata:ja,settings:Za}),Ka=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.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"})),Ya=[{attributes:{tagName:{type:"string",default:"div"}},apiVersion:3,supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}}},save({attributes:{tagName:e}}){const t=nt.useBlockProps.save(),{className:n}=t,a=n?.split(" ")||[],o=a?.filter((e=>"wp-block-comments"!==e)),r={...t,className:o.join(" ")};return(0,Ke.createElement)(e,{...r},(0,Ke.createElement)(nt.InnerBlocks.Content,null))}}];function Ja({attributes:{tagName:e},setAttributes:t}){const n={section:(0,tt.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element."),aside:(0,tt.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.")};return(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("HTML element"),options:[{label:(0,tt.__)("Default (<div>)"),value:"div"},{label:"<section>",value:"section"},{label:"<aside>",value:"aside"}],value:e,onChange:e=>t({tagName:e}),help:n[e]})))}const Xa=()=>{const e=(0,jt.useInstanceId)(Xa);return(0,Ke.createElement)("div",{className:"comment-respond"},(0,Ke.createElement)("h3",{className:"comment-reply-title"},(0,tt.__)("Leave a Reply")),(0,Ke.createElement)("form",{noValidate:!0,className:"comment-form",onSubmit:e=>e.preventDefault()},(0,Ke.createElement)("p",null,(0,Ke.createElement)("label",{htmlFor:`comment-${e}`},(0,tt.__)("Comment")),(0,Ke.createElement)("textarea",{id:`comment-${e}`,name:"comment",cols:"45",rows:"8",readOnly:!0})),(0,Ke.createElement)("p",{className:"form-submit wp-block-button"},(0,Ke.createElement)("input",{name:"submit",type:"submit",className:ut()("wp-block-button__link",(0,nt.__experimentalGetElementClassName)("button")),label:(0,tt.__)("Post Comment"),value:(0,tt.__)("Post Comment"),"aria-disabled":"true"}))))},eo=({postId:e,postType:t})=>{const[n,a]=(0,dt.useEntityProp)("postType",t,"comment_status",e),o=void 0===t||void 0===e,{defaultCommentStatus:r}=(0,gt.useSelect)((e=>e(nt.store).getSettings().__experimentalDiscussionSettings)),l=(0,gt.useSelect)((e=>!!t&&!!e(dt.store).getPostType(t)?.supports.comments));if(!o&&"open"!==n){if("closed"===n){const e=[(0,Ke.createElement)(et.Button,{key:"enableComments",onClick:()=>a("open"),variant:"primary"},(0,tt._x)("Enable comments","action that affects the current post"))];return(0,Ke.createElement)(nt.Warning,{actions:e},(0,tt.__)("Post Comments Form block: Comments are not enabled for this item."))}if(!l)return(0,Ke.createElement)(nt.Warning,null,(0,tt.sprintf)((0,tt.__)("Post Comments Form block: Comments are not enabled for this post type (%s)."),t));if("open"!==r)return(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Post Comments Form block: Comments are not enabled."))}return(0,Ke.createElement)(Xa,null)};function to({postType:e,postId:t}){let[n]=(0,dt.useEntityProp)("postType",e,"title",t);n=n||(0,tt.__)("Post Title");const{avatarURL:a}=(0,gt.useSelect)((e=>e(nt.store).getSettings().__experimentalDiscussionSettings));return(0,Ke.createElement)("div",{className:"wp-block-comments__legacy-placeholder",inert:"true"},(0,Ke.createElement)("h3",null,(0,tt.sprintf)((0,tt.__)("One response to %s"),n)),(0,Ke.createElement)("div",{className:"navigation"},(0,Ke.createElement)("div",{className:"alignleft"},(0,Ke.createElement)("a",{href:"#top"},"« ",(0,tt.__)("Older Comments"))),(0,Ke.createElement)("div",{className:"alignright"},(0,Ke.createElement)("a",{href:"#top"},(0,tt.__)("Newer Comments")," »"))),(0,Ke.createElement)("ol",{className:"commentlist"},(0,Ke.createElement)("li",{className:"comment even thread-even depth-1"},(0,Ke.createElement)("article",{className:"comment-body"},(0,Ke.createElement)("footer",{className:"comment-meta"},(0,Ke.createElement)("div",{className:"comment-author vcard"},(0,Ke.createElement)("img",{alt:(0,tt.__)("Commenter Avatar"),src:a,className:"avatar avatar-32 photo",height:"32",width:"32",loading:"lazy"}),(0,Ke.createElement)("b",{className:"fn"},(0,Ke.createElement)("a",{href:"#top",className:"url"},(0,tt.__)("A WordPress Commenter")))," ",(0,Ke.createElement)("span",{className:"says"},(0,tt.__)("says"),":")),(0,Ke.createElement)("div",{className:"comment-metadata"},(0,Ke.createElement)("a",{href:"#top"},(0,Ke.createElement)("time",{dateTime:"2000-01-01T00:00:00+00:00"},(0,tt.__)("January 1, 2000 at 00:00 am")))," ",(0,Ke.createElement)("span",{className:"edit-link"},(0,Ke.createElement)("a",{className:"comment-edit-link",href:"#top"},(0,tt.__)("Edit"))))),(0,Ke.createElement)("div",{className:"comment-content"},(0,Ke.createElement)("p",null,(0,tt.__)("Hi, this is a comment."),(0,Ke.createElement)("br",null),(0,tt.__)("To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard."),(0,Ke.createElement)("br",null),(0,_t.createInterpolateElement)((0,tt.__)("Commenter avatars come from <a>Gravatar</a>."),{a:(0,Ke.createElement)("a",{href:"https://gravatar.com/"})}))),(0,Ke.createElement)("div",{className:"reply"},(0,Ke.createElement)("a",{className:"comment-reply-link",href:"#top","aria-label":(0,tt.__)("Reply to A WordPress Commenter")},(0,tt.__)("Reply")))))),(0,Ke.createElement)("div",{className:"navigation"},(0,Ke.createElement)("div",{className:"alignleft"},(0,Ke.createElement)("a",{href:"#top"},"« ",(0,tt.__)("Older Comments"))),(0,Ke.createElement)("div",{className:"alignright"},(0,Ke.createElement)("a",{href:"#top"},(0,tt.__)("Newer Comments")," »"))),(0,Ke.createElement)(eo,{postId:t,postType:e}))}function no({attributes:e,setAttributes:t,context:{postType:n,postId:a}}){const{textAlign:o}=e,r=[(0,Ke.createElement)(et.Button,{key:"convert",onClick:()=>{t({legacy:!1})},variant:"primary"},(0,tt.__)("Switch to editable mode"))],l=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${o}`]:o})});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:o,onChange:e=>{t({textAlign:e})}})),(0,Ke.createElement)("div",{...l},(0,Ke.createElement)(nt.Warning,{actions:r},(0,tt.__)("Comments block: You’re currently using the legacy version of the block. The following is just a placeholder - the final styling will likely look different. For a better representation and more customization options, switch the block to its editable mode.")),(0,Ke.createElement)(to,{postId:a,postType:n})))}const ao=[["core/comments-title"],["core/comment-template",{},[["core/columns",{},[["core/column",{width:"40px"},[["core/avatar",{size:40,style:{border:{radius:"20px"}}}]]],["core/column",{},[["core/comment-author-name",{fontSize:"small"}],["core/group",{layout:{type:"flex"},style:{spacing:{margin:{top:"0px",bottom:"0px"}}}},[["core/comment-date",{fontSize:"small"}],["core/comment-edit-link",{fontSize:"small"}]]],["core/comment-content"],["core/comment-reply-link",{fontSize:"small"}]]]]]]],["core/comments-pagination"],["core/post-comments-form"]];const oo={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments",title:"Comments",category:"theme",description:"An advanced block that allows displaying post comments using different visual configurations.",textdomain:"default",attributes:{tagName:{type:"string",default:"div"},legacy:{type:"boolean",default:!1}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},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-comments-editor",usesContext:["postId","postType"]},{name:ro}=oo,lo={icon:Ka,edit:function(e){const{attributes:t,setAttributes:n}=e,{tagName:a,legacy:o}=t,r=(0,nt.useBlockProps)(),l=(0,nt.useInnerBlocksProps)(r,{template:ao});return o?(0,Ke.createElement)(no,{...e}):(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Ja,{attributes:t,setAttributes:n}),(0,Ke.createElement)(a,{...l}))},save:function({attributes:{tagName:e,legacy:t}}){const n=nt.useBlockProps.save(),a=nt.useInnerBlocksProps.save(n);return t?null:(0,Ke.createElement)(e,{...a})},deprecated:Ya},io=()=>Xe({name:ro,metadata:oo,settings:lo});const so={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:"fse",name:"core/comment-author-avatar",title:"Comment Author Avatar (deprecated)",category:"theme",ancestor:["core/comment-template"],description:"This block is deprecated. Please use the Avatar block instead.",textdomain:"default",attributes:{width:{type:"number",default:96},height:{type:"number",default:96}},usesContext:["commentId"],supports:{html:!1,inserter:!1,__experimentalBorder:{radius:!0,width:!0,color:!0,style:!0},color:{background:!0,text:!1,__experimentalDefaultControls:{background:!0}},spacing:{__experimentalSkipSerialization:!0,margin:!0,padding:!0},interactivity:{clientNavigation:!0}}},{name:co}=so,mo={icon:ct,edit:function({attributes:e,context:{commentId:t},setAttributes:n,isSelected:a}){const{height:o,width:r}=e,[l]=(0,dt.useEntityProp)("root","comment","author_avatar_urls",t),[i]=(0,dt.useEntityProp)("root","comment","author_name",t),s=l?Object.values(l):null,c=l?Object.keys(l):null,m=c?c[0]:24,u=c?c[c.length-1]:96,p=(0,nt.useBlockProps)(),d=(0,nt.__experimentalGetSpacingClassesAndStyles)(e),g=Math.floor(2.5*u),{avatarURL:h}=(0,gt.useSelect)((e=>{const{getSettings:t}=e(nt.store),{__experimentalDiscussionSettings:n}=t();return n})),b=(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Avatar Settings")},(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Image size"),onChange:e=>n({width:e,height:e}),min:m,max:g,initialPosition:r,value:r}))),_=(0,Ke.createElement)(et.ResizableBox,{size:{width:r,height:o},showHandle:a,onResizeStop:(e,t,a,l)=>{n({height:parseInt(o+l.height,10),width:parseInt(r+l.width,10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,tt.isRTL)(),bottom:!0,left:(0,tt.isRTL)()},minWidth:m,maxWidth:g},(0,Ke.createElement)("img",{src:s?s[s.length-1]:h,alt:`${i} ${(0,tt.__)("Avatar")}`,...p}));return(0,Ke.createElement)(Ke.Fragment,null,b,(0,Ke.createElement)("div",{...d},_))}},uo=()=>Xe({name:co,metadata:so,settings:mo}),po=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z",fillRule:"evenodd",clipRule:"evenodd"}),(0,Ke.createElement)(Ye.Path,{d:"M15 15V15C15 13.8954 14.1046 13 13 13L11 13C9.89543 13 9 13.8954 9 15V15",fillRule:"evenodd",clipRule:"evenodd"}),(0,Ke.createElement)(Ye.Circle,{cx:"12",cy:"9",r:"2",fillRule:"evenodd",clipRule:"evenodd"}));const go={attributes:{isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},ho=[go],bo={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-author-name",title:"Comment Author Name",category:"theme",ancestor:["core/comment-template"],description:"Displays the name of the author of the comment.",textdomain:"default",attributes:{isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"},textAlign:{type:"string"}},usesContext:["commentId"],supports:{html:!1,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:_o}=bo,yo={icon:po,edit:function({attributes:{isLink:e,linkTarget:t,textAlign:n},context:{commentId:a},setAttributes:o}){const r=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${n}`]:n})});let l=(0,gt.useSelect)((e=>{const{getEntityRecord:t}=e(dt.store),n=t("root","comment",a),o=n?.author_name;if(n&&!o){var r;const e=t("root","user",n.author);return null!==(r=e?.name)&&void 0!==r?r:(0,tt.__)("Anonymous")}return null!=o?o:""}),[a]);const i=(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:n,onChange:e=>o({textAlign:e})})),s=(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link to authors URL"),onChange:()=>o({isLink:!e}),checked:e}),e&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>o({linkTarget:e?"_blank":"_self"}),checked:"_blank"===t})));a&&l||(l=(0,tt._x)("Comment Author","block title"));const c=e?(0,Ke.createElement)("a",{href:"#comment-author-pseudo-link",onClick:e=>e.preventDefault()},l):l;return(0,Ke.createElement)(Ke.Fragment,null,s,i,(0,Ke.createElement)("div",{...r},c))},deprecated:ho},vo=()=>Xe({name:_o,metadata:bo,settings:yo}),fo=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z"}));const ko={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-content",title:"Comment Content",category:"theme",ancestor:["core/comment-template"],description:"Displays the contents of a comment.",textdomain:"default",usesContext:["commentId"],attributes:{textAlign:{type:"string"}},supports:{color:{gradients:!0,link:!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}},spacing:{padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},html:!1}},{name:xo}=ko,wo={icon:fo,edit:function({setAttributes:e,attributes:{textAlign:t},context:{commentId:n}}){const a=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${t}`]:t})}),[o]=(0,dt.useEntityProp)("root","comment","content",n),r=(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:t,onChange:t=>e({textAlign:t})}));return n&&o?(0,Ke.createElement)(Ke.Fragment,null,r,(0,Ke.createElement)("div",{...a},(0,Ke.createElement)(et.Disabled,null,(0,Ke.createElement)(_t.RawHTML,{key:"html"},o.rendered)))):(0,Ke.createElement)(Ke.Fragment,null,r,(0,Ke.createElement)("div",{...a},(0,Ke.createElement)("p",null,(0,tt._x)("Comment Content","block title"))))}},Eo=()=>Xe({name:xo,metadata:ko,settings:wo}),Co=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M11.696 13.972c.356-.546.599-.958.728-1.235a1.79 1.79 0 00.203-.783c0-.264-.077-.47-.23-.618-.148-.153-.354-.23-.618-.23-.295 0-.569.07-.82.212a3.413 3.413 0 00-.738.571l-.147-1.188c.289-.234.59-.41.903-.526.313-.117.66-.175 1.041-.175.375 0 .695.08.959.24.264.153.46.362.59.626.135.265.203.556.203.876 0 .362-.08.734-.24 1.115-.154.381-.427.87-.82 1.466l-.756 1.152H14v1.106h-4l1.696-2.609z"}),(0,Ke.createElement)(Ye.Path,{d:"M19.5 7h-15v12a.5.5 0 00.5.5h14a.5.5 0 00.5-.5V7zM3 7V5a2 2 0 012-2h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"})),So=window.wp.date;const Bo={attributes:{format:{type:"string"},isLink:{type:"boolean",default:!1}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},No=[Bo],To={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-date",title:"Comment Date",category:"theme",ancestor:["core/comment-template"],description:"Displays the date on which the comment was posted.",textdomain:"default",attributes:{format:{type:"string"},isLink:{type:"boolean",default:!0}},usesContext:["commentId"],supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},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}},interactivity:{clientNavigation:!0}}},{name:Io}=To,Po={icon:Co,edit:function({attributes:{format:e,isLink:t},context:{commentId:n},setAttributes:a}){const o=(0,nt.useBlockProps)();let[r]=(0,dt.useEntityProp)("root","comment","date",n);const[l=(0,So.getSettings)().formats.date]=(0,dt.useEntityProp)("root","site","date_format"),i=(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(nt.__experimentalDateFormatPicker,{format:e,defaultFormat:l,onChange:e=>a({format:e})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link to comment"),onChange:()=>a({isLink:!t}),checked:t})));n&&r||(r=(0,tt._x)("Comment Date","block title"));let s=r instanceof Date?(0,Ke.createElement)("time",{dateTime:(0,So.dateI18n)("c",r)},(0,So.dateI18n)(e||l,r)):(0,Ke.createElement)("time",null,r);return t&&(s=(0,Ke.createElement)("a",{href:"#comment-date-pseudo-link",onClick:e=>e.preventDefault()},s)),(0,Ke.createElement)(Ke.Fragment,null,i,(0,Ke.createElement)("div",{...o},s))},deprecated:No},Mo=()=>Xe({name:Io,metadata:To,settings:Po}),zo=(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"m6.249 11.065.44-.44h3.186l-1.5 1.5H7.31l-1.957 1.96A.792.792 0 0 1 4 13.524V5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1.5L12.5 8V5.5h-7v6.315l.749-.75ZM20 19.75H7v-1.5h13v1.5Zm0-12.653-8.967 9.064L8 17l.867-2.935L17.833 5 20 7.097Z"}));const Ro={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-edit-link",title:"Comment Edit Link",category:"theme",ancestor:["core/comment-template"],description:"Displays a link to edit the comment in the WordPress Dashboard. This link is only visible to users with the edit comment capability.",textdomain:"default",usesContext:["commentId"],attributes:{linkTarget:{type:"string",default:"_self"},textAlign:{type:"string"}},supports:{html:!1,color:{link:!0,gradients:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},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}},interactivity:{clientNavigation:!0}}},{name:Ao}=Ro,Ho={icon:zo,edit:function({attributes:{linkTarget:e,textAlign:t},setAttributes:n}){const a=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${t}`]:t})}),o=(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:t,onChange:e=>n({textAlign:e})})),r=(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>n({linkTarget:e?"_blank":"_self"}),checked:"_blank"===e})));return(0,Ke.createElement)(Ke.Fragment,null,o,r,(0,Ke.createElement)("div",{...a},(0,Ke.createElement)("a",{href:"#edit-comment-pseudo-link",onClick:e=>e.preventDefault()},(0,tt.__)("Edit"))))}},Lo=()=>Xe({name:Ao,metadata:Ro,settings:Ho}),Do=(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M6.68822 10.625L6.24878 11.0649L5.5 11.8145L5.5 5.5L12.5 5.5V8L14 6.5V5C14 4.44772 13.5523 4 13 4H5C4.44772 4 4 4.44771 4 5V13.5247C4 13.8173 4.16123 14.086 4.41935 14.2237C4.72711 14.3878 5.10601 14.3313 5.35252 14.0845L7.31 12.125H8.375L9.875 10.625H7.31H6.68822ZM14.5605 10.4983L11.6701 13.75H16.9975C17.9963 13.75 18.7796 14.1104 19.3553 14.7048C19.9095 15.2771 20.2299 16.0224 20.4224 16.7443C20.7645 18.0276 20.7543 19.4618 20.7487 20.2544C20.7481 20.345 20.7475 20.4272 20.7475 20.4999L19.2475 20.5001C19.2475 20.4191 19.248 20.3319 19.2484 20.2394V20.2394C19.2526 19.4274 19.259 18.2035 18.973 17.1307C18.8156 16.5401 18.586 16.0666 18.2778 15.7483C17.9909 15.4521 17.5991 15.25 16.9975 15.25H11.8106L14.5303 17.9697L13.4696 19.0303L8.96956 14.5303L13.4394 9.50171L14.5605 10.4983Z"}));const Fo=function({setAttributes:e,attributes:{textAlign:t}}){const n=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${t}`]:t})}),a=(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:t,onChange:t=>e({textAlign:t})}));return(0,Ke.createElement)(Ke.Fragment,null,a,(0,Ke.createElement)("div",{...n},(0,Ke.createElement)("a",{href:"#comment-reply-pseudo-link",onClick:e=>e.preventDefault()},(0,tt.__)("Reply"))))},Vo={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-reply-link",title:"Comment Reply Link",category:"theme",ancestor:["core/comment-template"],description:"Displays a link to reply to a comment.",textdomain:"default",usesContext:["commentId"],attributes:{textAlign:{type:"string"}},supports:{color:{gradients:!0,link:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},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}},html:!1}},{name:$o}=Vo,Oo={edit:Fo,icon:Do},Go=()=>Xe({name:$o,metadata:Vo,settings:Oo}),Uo=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.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"})),qo=window.wp.apiFetch;var jo=n.n(qo);const Wo=({defaultPage:e,postId:t,perPage:n,queryArgs:a})=>{const[o,r]=(0,_t.useState)({}),l=`${t}_${n}`,i=o[l]||0;return(0,_t.useEffect)((()=>{i||"newest"!==e||jo()({path:(0,pt.addQueryArgs)("/wp/v2/comments",{...a,post:t,per_page:n,_fields:"id"}),method:"HEAD",parse:!1}).then((e=>{const t=parseInt(e.headers.get("X-WP-TotalPages"));r({...o,[l]:t<=1?1:t})}))}),[e,t,n,r]),"newest"===e?i:1},Zo=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]];function Qo({comment:e,activeCommentId:t,setActiveCommentId:n,firstCommentId:a,blocks:o}){const{children:r,...l}=(0,nt.useInnerBlocksProps)({},{template:Zo});return(0,Ke.createElement)("li",{...l},e.commentId===(t||a)?r:null,(0,Ke.createElement)(Ko,{blocks:o,commentId:e.commentId,setActiveCommentId:n,isHidden:e.commentId===(t||a)}),e?.children?.length>0?(0,Ke.createElement)(Yo,{comments:e.children,activeCommentId:t,setActiveCommentId:n,blocks:o,firstCommentId:a}):null)}const Ko=(0,_t.memo)((({blocks:e,commentId:t,setActiveCommentId:n,isHidden:a})=>{const o=(0,nt.__experimentalUseBlockPreview)({blocks:e}),r=()=>{n(t)},l={display:a?"none":void 0};return(0,Ke.createElement)("div",{...o,tabIndex:0,role:"button",style:l,onClick:r,onKeyPress:r})})),Yo=({comments:e,blockProps:t,activeCommentId:n,setActiveCommentId:a,blocks:o,firstCommentId:r})=>(0,Ke.createElement)("ol",{...t},e&&e.map((({commentId:e,...t},l)=>(0,Ke.createElement)(nt.BlockContextProvider,{key:t.commentId||l,value:{commentId:e<0?null:e}},(0,Ke.createElement)(Qo,{comment:{commentId:e,...t},activeCommentId:n,setActiveCommentId:a,blocks:o,firstCommentId:r})))));const Jo={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-template",title:"Comment Template",category:"design",parent:["core/comments"],description:"Contains the block elements used to display a comment, like the title, date, author, avatar and more.",textdomain:"default",usesContext:["postId"],supports:{align:!0,html:!1,reusable:!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}},interactivity:{clientNavigation:!0}},style:"wp-block-comment-template"},{name:Xo}=Jo,er={icon:Uo,edit:function({clientId:e,context:{postId:t}}){const n=(0,nt.useBlockProps)(),[a,o]=(0,_t.useState)(),{commentOrder:r,threadCommentsDepth:l,threadComments:i,commentsPerPage:s,pageComments:c}=(0,gt.useSelect)((e=>{const{getSettings:t}=e(nt.store);return t().__experimentalDiscussionSettings})),m=(({postId:e})=>{const t={status:"approve",order:"asc",context:"embed",parent:0,_embed:"children"},{pageComments:n,commentsPerPage:a,defaultCommentsPage:o}=(0,gt.useSelect)((e=>{const{getSettings:t}=e(nt.store),{__experimentalDiscussionSettings:n}=t();return n})),r=n?Math.min(a,100):100,l=Wo({defaultPage:o,postId:e,perPage:r,queryArgs:t});return(0,_t.useMemo)((()=>l?{...t,post:e,per_page:r,page:l}:null),[e,r,l])})({postId:t}),{topLevelComments:u,blocks:p}=(0,gt.useSelect)((t=>{const{getEntityRecords:n}=t(dt.store),{getBlocks:a}=t(nt.store);return{topLevelComments:m?n("root","comment",m):null,blocks:a(e)}}),[e,m]);let d=(e=>(0,_t.useMemo)((()=>e?.map((({id:e,_embedded:t})=>{const[n]=t?.children||[[]];return{commentId:e,children:n.map((e=>({commentId:e.id})))}}))),[e]))("desc"===r&&u?[...u].reverse():u);return u?(t||(d=(({perPage:e,pageComments:t,threadComments:n,threadCommentsDepth:a})=>{const o=n?Math.min(a,3):1,r=e=>e<o?[{commentId:-(e+3),children:r(e+1)}]:[],l=[{commentId:-1,children:r(1)}];return(!t||e>=2)&&o<3&&l.push({commentId:-2,children:[]}),(!t||e>=3)&&o<2&&l.push({commentId:-3,children:[]}),l})({perPage:s,pageComments:c,threadComments:i,threadCommentsDepth:l})),d.length?(0,Ke.createElement)(Yo,{comments:d,blockProps:n,blocks:p,activeCommentId:a,setActiveCommentId:o,firstCommentId:d[0]?.commentId}):(0,Ke.createElement)("p",{...n},(0,tt.__)("No results found."))):(0,Ke.createElement)("p",{...n},(0,Ke.createElement)(et.Spinner,null))},save:function(){return(0,Ke.createElement)(nt.InnerBlocks.Content,null)}},tr=()=>Xe({name:Xo,metadata:Jo,settings:er}),nr=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M16 10.5v3h3v-3h-3zm-5 3h3v-3h-3v3zM7 9l-3 3 3 3 1-1-2-2 2-2-1-1z"})),ar={none:"",arrow:"←",chevron:"«"};const or={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination-previous",title:"Comments Previous Page",category:"theme",parent:["core/comments-pagination"],description:"Displays the previous comment's page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["postId","comments/paginationArrow"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:rr}=or,lr={icon:nr,edit:function({attributes:{label:e},setAttributes:t,context:{"comments/paginationArrow":n}}){const a=ar[n];return(0,Ke.createElement)("a",{href:"#comments-pagination-previous-pseudo-link",onClick:e=>e.preventDefault(),...(0,nt.useBlockProps)()},a&&(0,Ke.createElement)("span",{className:`wp-block-comments-pagination-previous-arrow is-arrow-${n}`},a),(0,Ke.createElement)(nt.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,tt.__)("Older comments page link"),placeholder:(0,tt.__)("Older Comments"),value:e,onChange:e=>t({label:e})}))}},ir=()=>Xe({name:rr,metadata:or,settings:lr}),sr=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 13.5h6v-3H4v3zm8 0h3v-3h-3v3zm5-3v3h3v-3h-3z"}));function cr({value:e,onChange:t}){return(0,Ke.createElement)(et.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Arrow"),value:e,onChange:t,help:(0,tt.__)("A decorative arrow appended to the next and previous comments link."),isBlock:!0},(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"none",label:(0,tt._x)("None","Arrow option for Comments Pagination Next/Previous blocks")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,tt._x)("Arrow","Arrow option for Comments Pagination Next/Previous blocks")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,tt._x)("Chevron","Arrow option for Comments Pagination Next/Previous blocks")}))}const mr=[["core/comments-pagination-previous"],["core/comments-pagination-numbers"],["core/comments-pagination-next"]];const ur={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination",title:"Comments Pagination",category:"theme",parent:["core/comments"],allowedBlocks:["core/comments-pagination-previous","core/comments-pagination-numbers","core/comments-pagination-next"],description:"Displays a paginated navigation to next/previous set of comments, when applicable.",textdomain:"default",attributes:{paginationArrow:{type:"string",default:"none"}},providesContext:{"comments/paginationArrow":"paginationArrow"},supports:{align:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-comments-pagination-editor",style:"wp-block-comments-pagination"},{name:pr}=ur,dr={icon:sr,edit:function({attributes:{paginationArrow:e},setAttributes:t,clientId:n}){const a=(0,gt.useSelect)((e=>{const{getBlocks:t}=e(nt.store),a=t(n);return a?.find((e=>["core/comments-pagination-previous","core/comments-pagination-next"].includes(e.name)))}),[]),o=(0,nt.useBlockProps)(),r=(0,nt.useInnerBlocksProps)(o,{template:mr});return(0,gt.useSelect)((e=>{const{getSettings:t}=e(nt.store),{__experimentalDiscussionSettings:n}=t();return n?.pageComments}),[])?(0,Ke.createElement)(Ke.Fragment,null,a&&(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(cr,{value:e,onChange:e=>{t({paginationArrow:e})}}))),(0,Ke.createElement)("div",{...r})):(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Comments Pagination block: paging comments is disabled in the Discussion Settings"))},save:function(){return(0,Ke.createElement)(nt.InnerBlocks.Content,null)}},gr=()=>Xe({name:pr,metadata:ur,settings:dr}),hr=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M5 13.5h3v-3H5v3zm5 0h3v-3h-3v3zM17 9l-1 1 2 2-2 2 1 1 3-3-3-3z"})),br={none:"",arrow:"→",chevron:"»"};const _r={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination-next",title:"Comments Next Page",category:"theme",parent:["core/comments-pagination"],description:"Displays the next comment's page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["postId","comments/paginationArrow"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:yr}=_r,vr={icon:hr,edit:function({attributes:{label:e},setAttributes:t,context:{"comments/paginationArrow":n}}){const a=br[n];return(0,Ke.createElement)("a",{href:"#comments-pagination-next-pseudo-link",onClick:e=>e.preventDefault(),...(0,nt.useBlockProps)()},(0,Ke.createElement)(nt.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,tt.__)("Newer comments page link"),placeholder:(0,tt.__)("Newer Comments"),value:e,onChange:e=>t({label:e})}),a&&(0,Ke.createElement)("span",{className:`wp-block-comments-pagination-next-arrow is-arrow-${n}`},a))}},fr=()=>Xe({name:yr,metadata:_r,settings:vr}),kr=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 13.5h6v-3H4v3zm8.2-2.5.8-.3V14h1V9.3l-2.2.7.4 1zm7.1-1.2c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3-.1-.8-.3-1.1z"})),xr=({content:e,tag:t="a",extraClass:n=""})=>"a"===t?(0,Ke.createElement)(t,{className:`page-numbers ${n}`,href:"#comments-pagination-numbers-pseudo-link",onClick:e=>e.preventDefault()},e):(0,Ke.createElement)(t,{className:`page-numbers ${n}`},e);const wr={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination-numbers",title:"Comments Page Numbers",category:"theme",parent:["core/comments-pagination"],description:"Displays a list of page numbers for comments pagination.",textdomain:"default",usesContext:["postId"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:Er}=wr,Cr={icon:kr,edit:function(){return(0,Ke.createElement)("div",{...(0,nt.useBlockProps)()},(0,Ke.createElement)(xr,{content:"1"}),(0,Ke.createElement)(xr,{content:"2"}),(0,Ke.createElement)(xr,{content:"3",tag:"span",extraClass:"current"}),(0,Ke.createElement)(xr,{content:"4"}),(0,Ke.createElement)(xr,{content:"5"}),(0,Ke.createElement)(xr,{content:"...",tag:"span",extraClass:"dots"}),(0,Ke.createElement)(xr,{content:"8"}))}},Sr=()=>Xe({name:Er,metadata:wr,settings:Cr}),Br=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z"}));const{attributes:Nr,supports:Tr}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-title",title:"Comments Title",category:"theme",ancestor:["core/comments"],description:"Displays a title with the number of comments.",textdomain:"default",usesContext:["postId","postType"],attributes:{textAlign:{type:"string"},showPostTitle:{type:"boolean",default:!0},showCommentsCount:{type:"boolean",default:!0},level:{type:"number",default:2}},supports:{anchor:!1,align:!0,html:!1,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},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,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0}},interactivity:{clientNavigation:!0}}},Ir=[{attributes:{...Nr,singleCommentLabel:{type:"string"},multipleCommentsLabel:{type:"string"}},supports:Tr,migrate:e=>{const{singleCommentLabel:t,multipleCommentsLabel:n,...a}=e;return a},isEligible:({multipleCommentsLabel:e,singleCommentLabel:t})=>e||t,save:()=>null}],Pr={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-title",title:"Comments Title",category:"theme",ancestor:["core/comments"],description:"Displays a title with the number of comments.",textdomain:"default",usesContext:["postId","postType"],attributes:{textAlign:{type:"string"},showPostTitle:{type:"boolean",default:!0},showCommentsCount:{type:"boolean",default:!0},level:{type:"number",default:2}},supports:{anchor:!1,align:!0,html:!1,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},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,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0}},interactivity:{clientNavigation:!0}}},{name:Mr}=Pr,zr={icon:Br,edit:function({attributes:{textAlign:e,showPostTitle:t,showCommentsCount:n,level:a},setAttributes:o,context:{postType:r,postId:l}}){const i="h"+a,[s,c]=(0,_t.useState)(),[m]=(0,dt.useEntityProp)("postType",r,"title",l),u=void 0===l,p=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${e}`]:e})}),{threadCommentsDepth:d,threadComments:g,commentsPerPage:h,pageComments:b}=(0,gt.useSelect)((e=>{const{getSettings:t}=e(nt.store);return t().__experimentalDiscussionSettings}));(0,_t.useEffect)((()=>{if(u){const e=g?Math.min(d,3)-1:0,t=b?h:3,n=parseInt(e)+parseInt(t);return void c(Math.min(n,3))}const e=l;jo()({path:(0,pt.addQueryArgs)("/wp/v2/comments",{post:l,_fields:"id"}),method:"HEAD",parse:!1}).then((t=>{e===l&&c(parseInt(t.headers.get("X-WP-Total")))})).catch((()=>{c(0)}))}),[l]);const _=(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:e,onChange:e=>o({textAlign:e})}),(0,Ke.createElement)(nt.HeadingLevelDropdown,{value:a,onChange:e=>o({level:e})})),y=(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show post title"),checked:t,onChange:e=>o({showPostTitle:e})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show comments count"),checked:n,onChange:e=>o({showCommentsCount:e})}))),v=u?(0,tt.__)("“Post Title”"):`"${m}"`;let f;return f=n&&void 0!==s?t?1===s?(0,tt.sprintf)((0,tt.__)("One response to %s"),v):(0,tt.sprintf)((0,tt._n)("%1$s response to %2$s","%1$s responses to %2$s",s),s,v):1===s?(0,tt.__)("One response"):(0,tt.sprintf)((0,tt._n)("%s response","%s responses",s),s):t?1===s?(0,tt.sprintf)((0,tt.__)("Response to %s"),v):(0,tt.sprintf)((0,tt.__)("Responses to %s"),v):1===s?(0,tt.__)("Response"):(0,tt.__)("Responses"),(0,Ke.createElement)(Ke.Fragment,null,_,y,(0,Ke.createElement)(i,{...p},f))},deprecated:Ir},Rr=()=>Xe({name:Mr,metadata:Pr,settings:zr}),Ar=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h6.2v8.9l2.5-3.1 2.5 3.1V4.5h2.2c.4 0 .8.4.8.8v13.4z"})),Hr={"top left":"is-position-top-left","top center":"is-position-top-center","top right":"is-position-top-right","center left":"is-position-center-left","center center":"is-position-center-center",center:"is-position-center-center","center right":"is-position-center-right","bottom left":"is-position-bottom-left","bottom center":"is-position-bottom-center","bottom right":"is-position-bottom-right"},Lr="image",Dr="video",Fr=50,Vr={x:.5,y:.5},$r=["image","video"];function Or({x:e,y:t}=Vr){return`${Math.round(100*e)}% ${Math.round(100*t)}%`}function Gr(e){return 50===e||void 0===e?null:"has-background-dim-"+10*Math.round(e/10)}function Ur(e){return!e||"center center"===e||"center"===e}function qr(e){return Ur(e)?"":Hr[e]}function jr(e){return e?{backgroundImage:`url(${e})`}:{}}function Wr(e){return 0!==e&&50!==e&&e?"has-background-dim-"+10*Math.round(e/10):null}function Zr(e){return{...e,dimRatio:e.url?e.dimRatio:100}}function Qr(e){return e.tagName||(e={...e,tagName:"div"}),{...e}}const Kr={url:{type:"string"},id:{type:"number"},hasParallax:{type:"boolean",default:!1},dimRatio:{type:"number",default:50},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"}},Yr={url:{type:"string"},id:{type:"number"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},hasParallax:{type:"boolean",default:!1},isRepeated:{type:"boolean",default:!1},dimRatio:{type:"number",default:100},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},isDark:{type:"boolean",default:!0},allowedBlocks:{type:"array"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},Jr={...Yr,useFeaturedImage:{type:"boolean",default:!1},tagName:{type:"string",default:"div"}},Xr={anchor:!0,align:!0,html:!1,spacing:{padding:!0,__experimentalDefaultControls:{padding:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",text:!1,background:!1}},el={...Xr,spacing:{padding:!0,margin:["top","bottom"],blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",heading:!0,text:!0,background:!1,__experimentalSkipSerialization:["gradients"],enableContrastChecker:!1},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowJustification:!1}},tl={attributes:Jr,supports:el,save({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:a,customGradient:o,customOverlayColor:r,dimRatio:l,focalPoint:i,useFeaturedImage:s,hasParallax:c,isDark:m,isRepeated:u,overlayColor:p,url:d,alt:g,id:h,minHeight:b,minHeightUnit:_,tagName:y}=e,v=(0,nt.getColorClassName)("background-color",p),f=(0,nt.__experimentalGetGradientClass)(n),k=Lr===t,x=Dr===t,w=!(c||u),E={minHeight:(b&&_?`${b}${_}`:b)||void 0},C={backgroundColor:v?void 0:r,background:o||void 0},S=i&&w?Or(i):void 0,B=d?`url(${d})`:void 0,N=Or(i),T=ut()({"is-light":!m,"has-parallax":c,"is-repeated":u,"has-custom-content-position":!Ur(a)},qr(a)),I=ut()("wp-block-cover__image-background",h?`wp-image-${h}`:null,{"has-parallax":c,"is-repeated":u}),P=n||o;return(0,Ke.createElement)(y,{...nt.useBlockProps.save({className:T,style:E})},(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__background",v,Gr(l),{"has-background-dim":void 0!==l,"wp-block-cover__gradient-background":d&&P&&0!==l,"has-background-gradient":P,[f]:f}),style:C}),!s&&k&&d&&(w?(0,Ke.createElement)("img",{className:I,alt:g,src:d,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}):(0,Ke.createElement)("div",{role:"img",className:I,style:{backgroundPosition:N,backgroundImage:B}})),x&&d&&(0,Ke.createElement)("video",{className:ut()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})}))}},nl={attributes:Jr,supports:el,isEligible:e=>void 0!==e.customOverlayColor||void 0!==e.overlayColor,migrate:e=>({...e,isUserOverlayColor:!0}),save({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:a,customGradient:o,customOverlayColor:r,dimRatio:l,focalPoint:i,useFeaturedImage:s,hasParallax:c,isDark:m,isRepeated:u,overlayColor:p,url:d,alt:g,id:h,minHeight:b,minHeightUnit:_,tagName:y}=e,v=(0,nt.getColorClassName)("background-color",p),f=(0,nt.__experimentalGetGradientClass)(n),k=Lr===t,x=Dr===t,w=!(c||u),E={minHeight:(b&&_?`${b}${_}`:b)||void 0},C={backgroundColor:v?void 0:r,background:o||void 0},S=i&&w?Or(i):void 0,B=d?`url(${d})`:void 0,N=Or(i),T=ut()({"is-light":!m,"has-parallax":c,"is-repeated":u,"has-custom-content-position":!Ur(a)},qr(a)),I=ut()("wp-block-cover__image-background",h?`wp-image-${h}`:null,{"has-parallax":c,"is-repeated":u}),P=n||o;return(0,Ke.createElement)(y,{...nt.useBlockProps.save({className:T,style:E})},(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__background",v,Gr(l),{"has-background-dim":void 0!==l,"wp-block-cover__gradient-background":d&&P&&0!==l,"has-background-gradient":P,[f]:f}),style:C}),!s&&k&&d&&(w?(0,Ke.createElement)("img",{className:I,alt:g,src:d,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}):(0,Ke.createElement)("div",{role:"img",className:I,style:{backgroundPosition:N,backgroundImage:B}})),x&&d&&(0,Ke.createElement)("video",{className:ut()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})}))}},al={attributes:Yr,supports:Xr,save({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:a,customGradient:o,customOverlayColor:r,dimRatio:l,focalPoint:i,useFeaturedImage:s,hasParallax:c,isDark:m,isRepeated:u,overlayColor:p,url:d,alt:g,id:h,minHeight:b,minHeightUnit:_}=e,y=(0,nt.getColorClassName)("background-color",p),v=(0,nt.__experimentalGetGradientClass)(n),f=Lr===t,k=Dr===t,x=!(c||u),w={minHeight:(b&&_?`${b}${_}`:b)||void 0},E={backgroundColor:y?void 0:r,background:o||void 0},C=i&&x?Or(i):void 0,S=d?`url(${d})`:void 0,B=Or(i),N=ut()({"is-light":!m,"has-parallax":c,"is-repeated":u,"has-custom-content-position":!Ur(a)},qr(a)),T=ut()("wp-block-cover__image-background",h?`wp-image-${h}`:null,{"has-parallax":c,"is-repeated":u}),I=n||o;return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:N,style:w})},(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__background",y,Gr(l),{"has-background-dim":void 0!==l,"wp-block-cover__gradient-background":d&&I&&0!==l,"has-background-gradient":I,[v]:v}),style:E}),!s&&f&&d&&(x?(0,Ke.createElement)("img",{className:T,alt:g,src:d,style:{objectPosition:C},"data-object-fit":"cover","data-object-position":C}):(0,Ke.createElement)("div",{role:"img",className:T,style:{backgroundPosition:B,backgroundImage:S}})),k&&d&&(0,Ke.createElement)("video",{className:ut()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:C},"data-object-fit":"cover","data-object-position":C}),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})}))},migrate:Qr},ol={attributes:Yr,supports:Xr,save({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:a,customGradient:o,customOverlayColor:r,dimRatio:l,focalPoint:i,useFeaturedImage:s,hasParallax:c,isDark:m,isRepeated:u,overlayColor:p,url:d,alt:g,id:h,minHeight:b,minHeightUnit:_}=e,y=(0,nt.getColorClassName)("background-color",p),v=(0,nt.__experimentalGetGradientClass)(n),f=b&&_?`${b}${_}`:b,k=Lr===t,x=Dr===t,w=!(c||u),E={...!k||w||s?{}:jr(d),minHeight:f||void 0},C={backgroundColor:y?void 0:r,background:o||void 0},S=i&&w?`${Math.round(100*i.x)}% ${Math.round(100*i.y)}%`:void 0,B=ut()({"is-light":!m,"has-parallax":c,"is-repeated":u,"has-custom-content-position":!Ur(a)},qr(a)),N=n||o;return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:B,style:E})},(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__background",y,Gr(l),{"has-background-dim":void 0!==l,"wp-block-cover__gradient-background":d&&N&&0!==l,"has-background-gradient":N,[v]:v}),style:C}),!s&&k&&w&&d&&(0,Ke.createElement)("img",{className:ut()("wp-block-cover__image-background",h?`wp-image-${h}`:null),alt:g,src:d,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),x&&d&&(0,Ke.createElement)("video",{className:ut()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})}))},migrate:Qr},rl={attributes:Yr,supports:Xr,save({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:a,customGradient:o,customOverlayColor:r,dimRatio:l,focalPoint:i,hasParallax:s,isDark:c,isRepeated:m,overlayColor:u,url:p,alt:d,id:g,minHeight:h,minHeightUnit:b}=e,_=(0,nt.getColorClassName)("background-color",u),y=(0,nt.__experimentalGetGradientClass)(n),v=b?`${h}${b}`:h,f=Lr===t,k=Dr===t,x=!(s||m),w={...f&&!x?jr(p):{},minHeight:v||void 0},E={backgroundColor:_?void 0:r,background:o||void 0},C=i&&x?`${Math.round(100*i.x)}% ${Math.round(100*i.y)}%`:void 0,S=ut()({"is-light":!c,"has-parallax":s,"is-repeated":m,"has-custom-content-position":!Ur(a)},qr(a)),B=n||o;return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:S,style:w})},(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__background",_,Gr(l),{"has-background-dim":void 0!==l,"wp-block-cover__gradient-background":p&&B&&0!==l,"has-background-gradient":B,[y]:y}),style:E}),f&&x&&p&&(0,Ke.createElement)("img",{className:ut()("wp-block-cover__image-background",g?`wp-image-${g}`:null),alt:d,src:p,style:{objectPosition:C},"data-object-fit":"cover","data-object-position":C}),k&&p&&(0,Ke.createElement)("video",{className:ut()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:p,style:{objectPosition:C},"data-object-fit":"cover","data-object-position":C}),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})}))},migrate:Qr},ll={attributes:Yr,supports:Xr,save({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:a,customGradient:o,customOverlayColor:r,dimRatio:l,focalPoint:i,hasParallax:s,isDark:c,isRepeated:m,overlayColor:u,url:p,alt:d,id:g,minHeight:h,minHeightUnit:b}=e,_=(0,nt.getColorClassName)("background-color",u),y=(0,nt.__experimentalGetGradientClass)(n),v=b?`${h}${b}`:h,f=Lr===t,k=Dr===t,x=!(s||m),w={...f&&!x?jr(p):{},minHeight:v||void 0},E={backgroundColor:_?void 0:r,background:o||void 0},C=i&&x?`${Math.round(100*i.x)}% ${Math.round(100*i.y)}%`:void 0,S=ut()({"is-light":!c,"has-parallax":s,"is-repeated":m,"has-custom-content-position":!Ur(a)},qr(a));return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:S,style:w})},(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()(_,Gr(l),"wp-block-cover__gradient-background",y,{"has-background-dim":void 0!==l,"has-background-gradient":n||o,[y]:!p&&y}),style:E}),f&&x&&p&&(0,Ke.createElement)("img",{className:ut()("wp-block-cover__image-background",g?`wp-image-${g}`:null),alt:d,src:p,style:{objectPosition:C},"data-object-fit":"cover","data-object-position":C}),k&&p&&(0,Ke.createElement)("video",{className:ut()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:p,style:{objectPosition:C},"data-object-fit":"cover","data-object-position":C}),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})}))},migrate:Qr},il={attributes:{...Kr,isRepeated:{type:"boolean",default:!1},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""}},supports:Xr,save({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:a,customGradient:o,customOverlayColor:r,dimRatio:l,focalPoint:i,hasParallax:s,isRepeated:c,overlayColor:m,url:u,alt:p,id:d,minHeight:g,minHeightUnit:h}=e,b=(0,nt.getColorClassName)("background-color",m),_=(0,nt.__experimentalGetGradientClass)(n),y=h?`${g}${h}`:g,v=Lr===t,f=Dr===t,k=!(s||c),x={...v&&!k?jr(u):{},backgroundColor:b?void 0:r,background:o&&!u?o:void 0,minHeight:y||void 0},w=i&&k?`${Math.round(100*i.x)}% ${Math.round(100*i.y)}%`:void 0,E=ut()(Wr(l),b,{"has-background-dim":0!==l,"has-parallax":s,"is-repeated":c,"has-background-gradient":n||o,[_]:!u&&_,"has-custom-content-position":!Ur(a)},qr(a));return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:E,style:x})},u&&(n||o)&&0!==l&&(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__gradient-background",_),style:o?{background:o}:void 0}),v&&k&&u&&(0,Ke.createElement)("img",{className:ut()("wp-block-cover__image-background",d?`wp-image-${d}`:null),alt:p,src:u,style:{objectPosition:w},"data-object-fit":"cover","data-object-position":w}),f&&u&&(0,Ke.createElement)("video",{className:ut()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:u,style:{objectPosition:w},"data-object-fit":"cover","data-object-position":w}),(0,Ke.createElement)("div",{className:"wp-block-cover__inner-container"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))},migrate:(0,jt.compose)(Zr,Qr)},sl={attributes:{...Kr,isRepeated:{type:"boolean",default:!1},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:a,customGradient:o,customOverlayColor:r,dimRatio:l,focalPoint:i,hasParallax:s,isRepeated:c,overlayColor:m,url:u,minHeight:p,minHeightUnit:d}=e,g=(0,nt.getColorClassName)("background-color",m),h=(0,nt.__experimentalGetGradientClass)(n),b=d?`${p}${d}`:p,_=Lr===t,y=Dr===t,v=_?jr(u):{},f={};let k;g||(v.backgroundColor=r),o&&!u&&(v.background=o),v.minHeight=b||void 0,i&&(k=`${Math.round(100*i.x)}% ${Math.round(100*i.y)}%`,_&&!s&&(v.backgroundPosition=k),y&&(f.objectPosition=k));const x=ut()(Wr(l),g,{"has-background-dim":0!==l,"has-parallax":s,"is-repeated":c,"has-background-gradient":n||o,[h]:!u&&h,"has-custom-content-position":!Ur(a)},qr(a));return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:x,style:v})},u&&(n||o)&&0!==l&&(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__gradient-background",h),style:o?{background:o}:void 0}),y&&u&&(0,Ke.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:u,style:f}),(0,Ke.createElement)("div",{className:"wp-block-cover__inner-container"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))},migrate:(0,jt.compose)(Zr,Qr)},cl={attributes:{...Kr,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,gradient:n,customGradient:a,customOverlayColor:o,dimRatio:r,focalPoint:l,hasParallax:i,overlayColor:s,url:c,minHeight:m}=e,u=(0,nt.getColorClassName)("background-color",s),p=(0,nt.__experimentalGetGradientClass)(n),d=t===Lr?jr(c):{};u||(d.backgroundColor=o),l&&!i&&(d.backgroundPosition=`${Math.round(100*l.x)}% ${Math.round(100*l.y)}%`),a&&!c&&(d.background=a),d.minHeight=m||void 0;const g=ut()(Wr(r),u,{"has-background-dim":0!==r,"has-parallax":i,"has-background-gradient":a,[p]:!c&&p});return(0,Ke.createElement)("div",{className:g,style:d},c&&(n||a)&&0!==r&&(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__gradient-background",p),style:a?{background:a}:void 0}),Dr===t&&c&&(0,Ke.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:c}),(0,Ke.createElement)("div",{className:"wp-block-cover__inner-container"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))},migrate:(0,jt.compose)(Zr,Qr)},ml={attributes:{...Kr,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,gradient:n,customGradient:a,customOverlayColor:o,dimRatio:r,focalPoint:l,hasParallax:i,overlayColor:s,url:c,minHeight:m}=e,u=(0,nt.getColorClassName)("background-color",s),p=(0,nt.__experimentalGetGradientClass)(n),d=t===Lr?jr(c):{};u||(d.backgroundColor=o),l&&!i&&(d.backgroundPosition=`${100*l.x}% ${100*l.y}%`),a&&!c&&(d.background=a),d.minHeight=m||void 0;const g=ut()(Wr(r),u,{"has-background-dim":0!==r,"has-parallax":i,"has-background-gradient":a,[p]:!c&&p});return(0,Ke.createElement)("div",{className:g,style:d},c&&(n||a)&&0!==r&&(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__gradient-background",p),style:a?{background:a}:void 0}),Dr===t&&c&&(0,Ke.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:c}),(0,Ke.createElement)("div",{className:"wp-block-cover__inner-container"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))},migrate:(0,jt.compose)(Zr,Qr)},ul={attributes:{...Kr,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,contentAlign:n,customOverlayColor:a,dimRatio:o,focalPoint:r,hasParallax:l,overlayColor:i,title:s,url:c}=e,m=(0,nt.getColorClassName)("background-color",i),u=t===Lr?jr(c):{};m||(u.backgroundColor=a),r&&!l&&(u.backgroundPosition=`${100*r.x}% ${100*r.y}%`);const p=ut()(Wr(o),m,{"has-background-dim":0!==o,"has-parallax":l,[`has-${n}-content`]:"center"!==n});return(0,Ke.createElement)("div",{className:p,style:u},Dr===t&&c&&(0,Ke.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:c}),!nt.RichText.isEmpty(s)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"p",className:"wp-block-cover-text",value:s}))},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:n,contentAlign:a,...o}=t;return[o,[(0,Qe.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,tt.__)("Write title…")})]]}},pl={attributes:{...Kr,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"},align:{type:"string"}},supports:{className:!1},save({attributes:e}){const{url:t,title:n,hasParallax:a,dimRatio:o,align:r,contentAlign:l,overlayColor:i,customOverlayColor:s}=e,c=(0,nt.getColorClassName)("background-color",i),m=jr(t);c||(m.backgroundColor=s);const u=ut()("wp-block-cover-image",Wr(o),c,{"has-background-dim":0!==o,"has-parallax":a,[`has-${l}-content`]:"center"!==l},r?`align${r}`:null);return(0,Ke.createElement)("div",{className:u,style:m},!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"p",className:"wp-block-cover-image-text",value:n}))},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:n,contentAlign:a,align:o,...r}=t;return[r,[(0,Qe.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,tt.__)("Write title…")})]]}},dl={attributes:{...Kr,title:{type:"string",source:"html",selector:"h2"},align:{type:"string"},contentAlign:{type:"string",default:"center"}},supports:{className:!1},save({attributes:e}){const{url:t,title:n,hasParallax:a,dimRatio:o,align:r}=e,l=jr(t),i=ut()("wp-block-cover-image",Wr(o),{"has-background-dim":0!==o,"has-parallax":a},r?`align${r}`:null);return(0,Ke.createElement)("section",{className:i,style:l},(0,Ke.createElement)(nt.RichText.Content,{tagName:"h2",value:n}))},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:n,contentAlign:a,align:o,...r}=t;return[r,[(0,Qe.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,tt.__)("Write title…")})]]}},gl=[tl,nl,al,ol,rl,ll,il,sl,cl,ml,ul,pl,dl],{cleanEmptyObject:hl}=Ft(nt.privateApis);function bl({onChange:e,onUnitChange:t,unit:n="px",value:a=""}){const o=`block-cover-height-input-${(0,jt.useInstanceId)(et.__experimentalUnitControl)}`,r="px"===n,[l]=(0,nt.useSettings)("spacing.units"),i=(0,et.__experimentalUseCustomUnits)({availableUnits:l||["px","em","rem","vw","vh"],defaultValues:{px:430,"%":20,em:20,rem:20,vw:20,vh:50}}),s=(0,_t.useMemo)((()=>{const[e]=(0,et.__experimentalParseQuantityAndUnitFromRawValue)(a);return[e,n].join("")}),[n,a]),c=r?Fr:0;return(0,Ke.createElement)(et.__experimentalUnitControl,{label:(0,tt.__)("Minimum height of cover"),id:o,isResetValueOnUnitChange:!0,min:c,onChange:t=>{const n=""!==t?parseFloat(t):void 0;isNaN(n)&&void 0!==n||e(n)},onUnitChange:t,__unstableInputWidth:"80px",units:i,value:s})}function _l({attributes:e,setAttributes:t,clientId:n,setOverlayColor:a,coverRef:o,currentSettings:r,updateDimRatio:l,onClearMedia:i}){const{useFeaturedImage:s,dimRatio:c,focalPoint:m,hasParallax:u,isRepeated:p,minHeight:d,minHeightUnit:g,alt:h,tagName:b}=e,{isVideoBackground:_,isImageBackground:y,mediaElement:v,url:f,overlayColor:k}=r,{gradientValue:x,setGradient:w}=(0,nt.__experimentalUseGradient)(),E=_||y&&(!u||p),C=e=>{const[t,n]=v.current?[v.current.style,"objectPosition"]:[o.current.style,"backgroundPosition"];t[n]=Or(e)},S=(0,nt.__experimentalUseMultipleOriginColorsAndGradients)(),B={header:(0,tt.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,tt.__)("The <main> element should be used for the primary content of your document only."),section:(0,tt.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element."),article:(0,tt.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,tt.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),footer:(0,tt.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).")};return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,!!f&&(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},y&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Fixed background"),checked:u,onChange:()=>{t({hasParallax:!u,...u?{}:{focalPoint:void 0}})}}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Repeated background"),checked:p,onChange:()=>{t({isRepeated:!p})}})),E&&(0,Ke.createElement)(et.FocalPointPicker,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Focal point"),url:f,value:m,onDragStart:C,onDrag:C,onChange:e=>t({focalPoint:e})}),!s&&f&&!_&&(0,Ke.createElement)(et.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Alternative text"),value:h,onChange:e=>t({alt:e}),help:(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,tt.__)("Describe the purpose of the image.")),(0,Ke.createElement)("br",null),(0,tt.__)("Leave empty if decorative."))}),(0,Ke.createElement)(et.PanelRow,null,(0,Ke.createElement)(et.Button,{variant:"secondary",size:"small",className:"block-library-cover__reset-button",onClick:i},(0,tt.__)("Clear Media"))))),S.hasColorsOrGradients&&(0,Ke.createElement)(nt.InspectorControls,{group:"color"},(0,Ke.createElement)(nt.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:k.color,gradientValue:x,label:(0,tt.__)("Overlay"),onColorChange:a,onGradientChange:w,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0})}],panelId:n,...S}),(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>void 0!==c&&c!==(f?50:100),label:(0,tt.__)("Overlay opacity"),onDeselect:()=>l(f?50:100),resetAllFilter:()=>({dimRatio:f?50:100}),isShownByDefault:!0,panelId:n},(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Overlay opacity"),value:c,onChange:e=>l(e),min:0,max:100,step:10,required:!0,__next40pxDefaultSize:!0}))),(0,Ke.createElement)(nt.InspectorControls,{group:"dimensions"},(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>!!d,label:(0,tt.__)("Minimum height"),onDeselect:()=>t({minHeight:void 0,minHeightUnit:void 0}),resetAllFilter:()=>({minHeight:void 0,minHeightUnit:void 0}),isShownByDefault:!0,panelId:n},(0,Ke.createElement)(bl,{value:e?.style?.dimensions?.aspectRatio?"":d,unit:g,onChange:n=>t({minHeight:n,style:hl({...e?.style,dimensions:{...e?.style?.dimensions,aspectRatio:void 0}})}),onUnitChange:e=>t({minHeightUnit:e})}))),(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("HTML element"),options:[{label:(0,tt.__)("Default (<div>)"),value:"div"},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"}],value:b,onChange:e=>t({tagName:e}),help:B[b]})))}const{cleanEmptyObject:yl}=Ft(nt.privateApis);function vl({attributes:e,setAttributes:t,onSelectMedia:n,currentSettings:a,toggleUseFeaturedImage:o}){const{contentPosition:r,id:l,useFeaturedImage:i,minHeight:s,minHeightUnit:c}=e,{hasInnerBlocks:m,url:u}=a,[p,d]=(0,_t.useState)(s),[g,h]=(0,_t.useState)(c),b="vh"===c&&100===s&&!e?.style?.dimensions?.aspectRatio;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.__experimentalBlockAlignmentMatrixControl,{label:(0,tt.__)("Change content position"),value:r,onChange:e=>t({contentPosition:e}),isDisabled:!m}),(0,Ke.createElement)(nt.__experimentalBlockFullHeightAligmentControl,{isActive:b,onToggle:()=>b?t("vh"===g&&100===p?{minHeight:void 0,minHeightUnit:void 0}:{minHeight:p,minHeightUnit:g}):(d(s),h(c),t({minHeight:100,minHeightUnit:"vh",style:yl({...e?.style,dimensions:{...e?.style?.dimensions,aspectRatio:void 0}})})),isDisabled:!m})),(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(nt.MediaReplaceFlow,{mediaId:l,mediaURL:u,allowedTypes:$r,accept:"image/*,video/*",onSelect:n,onToggleFeaturedImage:o,useFeaturedImage:i,name:u?(0,tt.__)("Replace"):(0,tt.__)("Add Media")})))}function fl({disableMediaButtons:e=!1,children:t,onSelectMedia:n,onError:a,style:o,toggleUseFeaturedImage:r}){return(0,Ke.createElement)(nt.MediaPlaceholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:Ar}),labels:{title:(0,tt.__)("Cover"),instructions:(0,tt.__)("Drag and drop onto this block, upload, or select existing media from your library.")},onSelect:n,accept:"image/*,video/*",allowedTypes:$r,disableMediaButtons:e,onToggleFeaturedImage:r,onError:a,style:o},t)}const kl={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},{ResizableBoxPopover:xl}=Ft(nt.privateApis);function wl({className:e,height:t,minHeight:n,onResize:a,onResizeStart:o,onResizeStop:r,showHandle:l,size:i,width:s,...c}){const[m,u]=(0,_t.useState)(!1),p=(0,_t.useMemo)((()=>({height:t,minHeight:n,width:s})),[n,t,s]),d={className:ut()(e,{"is-resizing":m}),enable:kl,onResizeStart:(e,t,n)=>{o(n.clientHeight),a(n.clientHeight)},onResize:(e,t,n)=>{a(n.clientHeight),m||u(!0)},onResizeStop:(e,t,n)=>{r(n.clientHeight),u(!1)},showHandle:l,size:i,__experimentalShowTooltip:!0,__experimentalTooltipProps:{axis:"y",position:"bottom",isVisible:m}};return(0,Ke.createElement)(xl,{className:"block-library-cover__resizable-box-popover",__unstableRefreshSize:p,resizableBoxProps:d,...c})}var El={grad:.9,turn:360,rad:360/(2*Math.PI)},Cl=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Sl=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Bl=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Nl=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Tl=function(e){return{r:Bl(e.r,0,255),g:Bl(e.g,0,255),b:Bl(e.b,0,255),a:Bl(e.a)}},Il=function(e){return{r:Sl(e.r),g:Sl(e.g),b:Sl(e.b),a:Sl(e.a,3)}},Pl=/^#([0-9a-f]{3,8})$/i,Ml=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},zl=function(e){var t=e.r,n=e.g,a=e.b,o=e.a,r=Math.max(t,n,a),l=r-Math.min(t,n,a),i=l?r===t?(n-a)/l:r===n?2+(a-t)/l:4+(t-n)/l:0;return{h:60*(i<0?i+6:i),s:r?l/r*100:0,v:r/255*100,a:o}},Rl=function(e){var t=e.h,n=e.s,a=e.v,o=e.a;t=t/360*6,n/=100,a/=100;var r=Math.floor(t),l=a*(1-n),i=a*(1-(t-r)*n),s=a*(1-(1-t+r)*n),c=r%6;return{r:255*[a,i,l,l,s,a][c],g:255*[s,a,a,i,l,l][c],b:255*[l,l,s,a,a,i][c],a:o}},Al=function(e){return{h:Nl(e.h),s:Bl(e.s,0,100),l:Bl(e.l,0,100),a:Bl(e.a)}},Hl=function(e){return{h:Sl(e.h),s:Sl(e.s),l:Sl(e.l),a:Sl(e.a,3)}},Ll=function(e){return Rl((n=(t=e).s,{h:t.h,s:(n*=((a=t.l)<50?a:100-a)/100)>0?2*n/(a+n)*100:0,v:a+n,a:t.a}));var t,n,a},Dl=function(e){return{h:(t=zl(e)).h,s:(o=(200-(n=t.s))*(a=t.v)/100)>0&&o<200?n*a/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,a,o},Fl=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Vl=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,$l=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ol=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Gl={string:[[function(e){var t=Pl.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?Sl(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?Sl(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=$l.exec(e)||Ol.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Tl({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=Fl.exec(e)||Vl.exec(e);if(!t)return null;var n,a,o=Al({h:(n=t[1],a=t[2],void 0===a&&(a="deg"),Number(n)*(El[a]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return Ll(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,a=e.b,o=e.a,r=void 0===o?1:o;return Cl(t)&&Cl(n)&&Cl(a)?Tl({r:Number(t),g:Number(n),b:Number(a),a:Number(r)}):null},"rgb"],[function(e){var t=e.h,n=e.s,a=e.l,o=e.a,r=void 0===o?1:o;if(!Cl(t)||!Cl(n)||!Cl(a))return null;var l=Al({h:Number(t),s:Number(n),l:Number(a),a:Number(r)});return Ll(l)},"hsl"],[function(e){var t=e.h,n=e.s,a=e.v,o=e.a,r=void 0===o?1:o;if(!Cl(t)||!Cl(n)||!Cl(a))return null;var l=function(e){return{h:Nl(e.h),s:Bl(e.s,0,100),v:Bl(e.v,0,100),a:Bl(e.a)}}({h:Number(t),s:Number(n),v:Number(a),a:Number(r)});return Rl(l)},"hsv"]]},Ul=function(e,t){for(var n=0;n<t.length;n++){var a=t[n][0](e);if(a)return[a,t[n][1]]}return[null,void 0]},ql=function(e){return"string"==typeof e?Ul(e.trim(),Gl.string):"object"==typeof e&&null!==e?Ul(e,Gl.object):[null,void 0]},jl=function(e,t){var n=Dl(e);return{h:n.h,s:Bl(n.s+100*t,0,100),l:n.l,a:n.a}},Wl=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Zl=function(e,t){var n=Dl(e);return{h:n.h,s:n.s,l:Bl(n.l+100*t,0,100),a:n.a}},Ql=function(){function e(e){this.parsed=ql(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return Sl(Wl(this.rgba),2)},e.prototype.isDark=function(){return Wl(this.rgba)<.5},e.prototype.isLight=function(){return Wl(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=Il(this.rgba)).r,n=e.g,a=e.b,r=(o=e.a)<1?Ml(Sl(255*o)):"","#"+Ml(t)+Ml(n)+Ml(a)+r;var e,t,n,a,o,r},e.prototype.toRgb=function(){return Il(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Il(this.rgba)).r,n=e.g,a=e.b,(o=e.a)<1?"rgba("+t+", "+n+", "+a+", "+o+")":"rgb("+t+", "+n+", "+a+")";var e,t,n,a,o},e.prototype.toHsl=function(){return Hl(Dl(this.rgba))},e.prototype.toHslString=function(){return t=(e=Hl(Dl(this.rgba))).h,n=e.s,a=e.l,(o=e.a)<1?"hsla("+t+", "+n+"%, "+a+"%, "+o+")":"hsl("+t+", "+n+"%, "+a+"%)";var e,t,n,a,o},e.prototype.toHsv=function(){return e=zl(this.rgba),{h:Sl(e.h),s:Sl(e.s),v:Sl(e.v),a:Sl(e.a,3)};var e},e.prototype.invert=function(){return Kl({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),Kl(jl(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Kl(jl(this.rgba,-e))},e.prototype.grayscale=function(){return Kl(jl(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Kl(Zl(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Kl(Zl(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?Kl({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Sl(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Dl(this.rgba);return"number"==typeof e?Kl({h:e,s:t.s,l:t.l,a:t.a}):Sl(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Kl(e).toHex()},e}(),Kl=function(e){return e instanceof Ql?e:new Ql(e)},Yl=[];
/*! Fast Average Color | © 2022 Denis Seleznev | MIT License | https://github.com/fast-average-color/fast-average-color */
-function Jl(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function Xl(e){return"#"+e.map(Jl).join("")}function ei(e){return e?(t=e,Array.isArray(t[0])?e:[e]):[];var t}function ti(e,t,n){for(var a=0;a<n.length;a++)if(ni(e,t,n[a]))return!0;return!1}function ni(e,t,n){switch(n.length){case 3:if(function(e,t,n){if(255!==e[t+3])return!0;if(e[t]===n[0]&&e[t+1]===n[1]&&e[t+2]===n[2])return!0;return!1}(e,t,n))return!0;break;case 4:if(function(e,t,n){if(e[t+3]&&n[3])return e[t]===n[0]&&e[t+1]===n[1]&&e[t+2]===n[2]&&e[t+3]===n[3];return e[t+3]===n[3]}(e,t,n))return!0;break;case 5:if(function(e,t,n){var a=n[0],o=n[1],r=n[2],l=n[3],i=n[4],s=e[t+3],c=ai(s,l,i);if(!l)return c;if(!s&&c)return!0;if(ai(e[t],a,i)&&ai(e[t+1],o,i)&&ai(e[t+2],r,i)&&c)return!0;return!1}(e,t,n))return!0;break;default:return!1}}function ai(e,t,n){return e>=t-n&&e<=t+n}function oi(e,t,n){for(var a={},o=n.ignoredColor,r=n.step,l=[0,0,0,0,0],i=0;i<t;i+=r){var s=e[i],c=e[i+1],m=e[i+2],u=e[i+3];if(!o||!ti(e,i,o)){var p=Math.round(s/24)+","+Math.round(c/24)+","+Math.round(m/24);a[p]?a[p]=[a[p][0]+s*u,a[p][1]+c*u,a[p][2]+m*u,a[p][3]+u,a[p][4]+1]:a[p]=[s*u,c*u,m*u,u,1],l[4]<a[p][4]&&(l=a[p])}}var d=l[0],g=l[1],h=l[2],b=l[3],_=l[4];return b?[Math.round(d/b),Math.round(g/b),Math.round(h/b),Math.round(b/_)]:n.defaultColor}function ri(e,t,n){for(var a=0,o=0,r=0,l=0,i=0,s=n.ignoredColor,c=n.step,m=0;m<t;m+=c){var u=e[m+3],p=e[m]*u,d=e[m+1]*u,g=e[m+2]*u;s&&ti(e,m,s)||(a+=p,o+=d,r+=g,l+=u,i++)}return l?[Math.round(a/l),Math.round(o/l),Math.round(r/l),Math.round(l/i)]:n.defaultColor}function li(e,t,n){for(var a=0,o=0,r=0,l=0,i=0,s=n.ignoredColor,c=n.step,m=0;m<t;m+=c){var u=e[m],p=e[m+1],d=e[m+2],g=e[m+3];s&&ti(e,m,s)||(a+=u*u*g,o+=p*p*g,r+=d*d*g,l+=g,i++)}return l?[Math.round(Math.sqrt(a/l)),Math.round(Math.sqrt(o/l)),Math.round(Math.sqrt(r/l)),Math.round(l/i)]:n.defaultColor}function ii(e){return si(e,"defaultColor",[0,0,0,0])}function si(e,t,n){return void 0===e[t]?n:e[t]}function ci(e){if(ui(e)){var t=e.naturalWidth,n=e.naturalHeight;return e.naturalWidth||-1===e.src.search(/\.svg(\?|$)/i)||(t=n=100),{width:t,height:n}}return function(e){return"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement}(e)?{width:e.videoWidth,height:e.videoHeight}:{width:e.width,height:e.height}}function mi(e){return function(e){return"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement}(e)?"canvas":function(e){return pi&&e instanceof OffscreenCanvas}(e)?"offscreencanvas":function(e){return"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap}(e)?"imagebitmap":e.src}function ui(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement}var pi="undefined"!=typeof OffscreenCanvas;var di="undefined"==typeof window;function gi(e){return Error("FastAverageColor: "+e)}function hi(e,t){t||console.error(e)}var bi=function(){function e(){this.canvas=null,this.ctx=null}return e.prototype.getColorAsync=function(e,t){if(!e)return Promise.reject(gi("call .getColorAsync() without resource."));if("string"==typeof e){if("undefined"==typeof Image)return Promise.reject(gi("resource as string is not supported in this environment"));var n=new Image;return n.crossOrigin=t&&t.crossOrigin||"",n.src=e,this.bindImageEvents(n,t)}if(ui(e)&&!e.complete)return this.bindImageEvents(e,t);var a=this.getColor(e,t);return a.error?Promise.reject(a.error):Promise.resolve(a)},e.prototype.getColor=function(e,t){var n=ii(t=t||{});if(!e)return hi(r=gi("call .getColor(null) without resource"),t.silent),this.prepareResult(n,r);var a=function(e,t){var n,a=si(t,"left",0),o=si(t,"top",0),r=si(t,"width",e.width),l=si(t,"height",e.height),i=r,s=l;return"precision"===t.mode||(r>l?(n=r/l,i=100,s=Math.round(i/n)):(n=l/r,s=100,i=Math.round(s/n)),(i>r||s>l||i<10||s<10)&&(i=r,s=l)),{srcLeft:a,srcTop:o,srcWidth:r,srcHeight:l,destWidth:i,destHeight:s}}(ci(e),t);if(!(a.srcWidth&&a.srcHeight&&a.destWidth&&a.destHeight))return hi(r=gi('incorrect sizes for resource "'.concat(mi(e),'"')),t.silent),this.prepareResult(n,r);if(!this.canvas&&(this.canvas=di?pi?new OffscreenCanvas(1,1):null:document.createElement("canvas"),!this.canvas))return hi(r=gi("OffscreenCanvas is not supported in this browser"),t.silent),this.prepareResult(n,r);if(!this.ctx){if(this.ctx=this.canvas.getContext("2d",{willReadFrequently:!0}),!this.ctx)return hi(r=gi("Canvas Context 2D is not supported in this browser"),t.silent),this.prepareResult(n);this.ctx.imageSmoothingEnabled=!1}this.canvas.width=a.destWidth,this.canvas.height=a.destHeight;try{this.ctx.clearRect(0,0,a.destWidth,a.destHeight),this.ctx.drawImage(e,a.srcLeft,a.srcTop,a.srcWidth,a.srcHeight,0,0,a.destWidth,a.destHeight);var o=this.ctx.getImageData(0,0,a.destWidth,a.destHeight).data;return this.prepareResult(this.getColorFromArray4(o,t))}catch(a){var r;return hi(r=gi("security error (CORS) for resource ".concat(mi(e),".\nDetails: https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image")),t.silent),!t.silent&&console.error(a),this.prepareResult(n,r)}},e.prototype.getColorFromArray4=function(e,t){t=t||{};var n=e.length,a=ii(t);if(n<4)return a;var o,r=n-n%4,l=4*(t.step||1);switch(t.algorithm||"sqrt"){case"simple":o=ri;break;case"sqrt":o=li;break;case"dominant":o=oi;break;default:throw gi("".concat(t.algorithm," is unknown algorithm"))}return o(e,r,{defaultColor:a,ignoredColor:ei(t.ignoredColor),step:l})},e.prototype.prepareResult=function(e,t){var n,a=e.slice(0,3),o=[e[0],e[1],e[2],e[3]/255],r=(299*(n=e)[0]+587*n[1]+114*n[2])/1e3<128;return{value:[e[0],e[1],e[2],e[3]],rgb:"rgb("+a.join(",")+")",rgba:"rgba("+o.join(",")+")",hex:Xl(a),hexa:Xl(e),isDark:r,isLight:!r,error:t}},e.prototype.destroy=function(){this.canvas&&(this.canvas.width=1,this.canvas.height=1,this.canvas=null),this.ctx=null},e.prototype.bindImageEvents=function(e,t){var n=this;return new Promise((function(a,o){var r=function(){s();var r=n.getColor(e,t);r.error?o(r.error):a(r)},l=function(){s(),o(gi('Error loading image "'.concat(e.src,'".')))},i=function(){s(),o(gi('Image "'.concat(e.src,'" loading aborted')))},s=function(){e.removeEventListener("load",r),e.removeEventListener("error",l),e.removeEventListener("abort",i)};e.addEventListener("load",r),e.addEventListener("error",l),e.addEventListener("abort",i)}))},e}();const _i=window.wp.hooks;!function(e){e.forEach((function(e){Yl.indexOf(e)<0&&(e(Ql,Gl),Yl.push(e))}))}([function(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"},a={};for(var o in n)a[n[o]]=o;var r={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,l,i=a[this.toHex()];if(i)return i;if(null==t?void 0:t.closest){var s=this.toRgb(),c=1/0,m="black";if(!r.length)for(var u in n)r[u]=new e(n[u]).toRgb();for(var p in n){var d=(o=s,l=r[p],Math.pow(o.r-l.r,2)+Math.pow(o.g-l.g,2)+Math.pow(o.b-l.b,2));d<c&&(c=d,m=p)}return m}},t.string.push([function(t){var a=t.toLowerCase(),o="transparent"===a?"#0000":n[a];return o?new e(o).toRgb():null},"name"])}]);const yi="#FFF";function vi(){return vi.fastAverageColor||(vi.fastAverageColor=new bi),vi.fastAverageColor}const fi=Rt((async e=>{if(!e)return yi;const{r:t,g:n,b:a,a:o}=Kl(yi).toRgb();try{const r=(0,_i.applyFilters)("media.crossOrigin",void 0,e);return(await vi().getColorAsync(e,{defaultColor:[t,n,a,255*o],silent:!0,crossOrigin:r})).hex}catch(e){return yi}}));function ki(e,t,n){if(t===n||100===e)return Kl(t).isDark();const a=Kl(t).alpha(e/100).toRgb(),o=Kl(n).toRgb(),r=(i=o,{r:(l=a).r*l.a+i.r*i.a*(1-l.a),g:l.g*l.a+i.g*i.a*(1-l.a),b:l.b*l.a+i.b*i.a*(1-l.a),a:l.a+i.a*(1-l.a)});var l,i;return Kl(r).isDark()}const xi=(0,jt.compose)([(0,nt.withColors)({overlayColor:"background-color"})])((function({attributes:e,clientId:t,isSelected:n,overlayColor:a,setAttributes:o,setOverlayColor:r,toggleSelection:l,context:{postId:i,postType:s}}){const{contentPosition:c,id:m,url:u,backgroundType:p,useFeaturedImage:d,dimRatio:g,focalPoint:h,hasParallax:b,isDark:_,isRepeated:y,minHeight:v,minHeightUnit:f,alt:k,allowedBlocks:x,templateLock:w,tagName:E="div",isUserOverlayColor:C}=e,[S]=(0,dt.useEntityProp)("postType",s,"featured_media",i),{__unstableMarkNextChangeAsNotPersistent:B}=(0,gt.useDispatch)(nt.store),N=(0,gt.useSelect)((e=>S&&e(dt.store).getMedia(S,{context:"view"})),[S]),T=N?.source_url;(0,_t.useEffect)((()=>{(async()=>{if(!d)return;const e=await fi(T);let t=a.color;C||(t=e,B(),r(t));const n=ki(g,t,e);B(),o({isDark:n})})()}),[T]);const I=d?T:u?.replaceAll("&amp;","&"),P=d?Lr:p,{createErrorNotice:M}=(0,gt.useDispatch)(Pt.store),{gradientClass:z,gradientValue:R}=(0,nt.__experimentalUseGradient)(),A=async e=>{const t=function(e){if(!e||!e.url)return{url:void 0,id:void 0};let t;if((0,It.isBlobURL)(e.url)&&(e.type=(0,It.getBlobTypeByURL)(e.url)),e.media_type)t=e.media_type===Lr?Lr:Dr;else{if(e.type!==Lr&&e.type!==Dr)return;t=e.type}return{url:e.url,id:e.id,alt:e?.alt,backgroundType:t,...t===Dr?{hasParallax:void 0}:{}}}(e),n=[e?.type,e?.media_type].includes(Lr),l=await fi(n?e?.url:void 0);let i=a.color;C||(i=l,r(i),B());const s=void 0===u&&100===g?50:g,c=ki(s,i,l);o({...t,focalPoint:void 0,useFeaturedImage:void 0,dimRatio:s,isDark:c})},H=async e=>{const t=await fi(I),n=ki(g,e,t);r(e),B(),o({isUserOverlayColor:!0,isDark:n})},L=e=>{M(e,{type:"snackbar"})},D=((e,t)=>!e&&(0,It.isBlobURL)(t))(m,I),F=Lr===P,V=Dr===P,[$,{height:O,width:G}]=(0,jt.useResizeObserver)(),U=(0,_t.useMemo)((()=>({height:"px"===f?v:"auto",width:"auto"})),[v,f]),q=v&&f?`${v}${f}`:v,j=!(b||y),W={minHeight:q||void 0},Z=I?`url(${I})`:void 0,Q=Or(h),K={backgroundColor:a.color},Y={objectPosition:h&&j?Or(h):void 0},J=!!(I||a.color||R),X=(0,gt.useSelect)((e=>e(nt.store).getBlock(t).innerBlocks.length>0),[t]),ee=(0,_t.useRef)(),te=(0,nt.useBlockProps)({ref:ee}),[ne]=(0,nt.useSettings)("typography.fontSizes"),ae=function(e){return[["core/paragraph",{align:"center",placeholder:(0,tt.__)("Write title…"),...e}]]}({fontSize:ne?.length>0?"large":void 0}),oe=(0,nt.useInnerBlocksProps)({className:"wp-block-cover__inner-container"},{template:X?void 0:ae,templateInsertUpdatesSelection:!0,allowedBlocks:x,templateLock:w,dropZoneElement:ee.current}),re=(0,_t.useRef)(),le={isVideoBackground:V,isImageBackground:F,mediaElement:re,hasInnerBlocks:X,url:I,isImgElement:j,overlayColor:a},ie=async()=>{const e=!d,t=e?await fi(T):yi,n=C?a.color:t;C||(r(e?n:void 0),B());const l=100===g?50:g,i=ki(l,n,t);o({id:void 0,url:void 0,useFeaturedImage:e,dimRatio:l,backgroundType:d?Lr:void 0,isDark:i})},se=(0,Ke.createElement)(vl,{attributes:e,setAttributes:o,onSelectMedia:A,currentSettings:le,toggleUseFeaturedImage:ie}),ce=(0,Ke.createElement)(_l,{attributes:e,setAttributes:o,clientId:t,setOverlayColor:H,coverRef:ee,currentSettings:le,toggleUseFeaturedImage:ie,updateDimRatio:async e=>{const t=await fi(I),n=ki(e,a.color,t);o({dimRatio:e,isDark:n})},onClearMedia:()=>{let e=a.color;C||(e="#000",r(void 0),B());const t=ki(g,e,yi);o({url:void 0,id:void 0,backgroundType:void 0,focalPoint:void 0,hasParallax:void 0,isRepeated:void 0,useFeaturedImage:void 0,isDark:t})}}),me={className:"block-library-cover__resize-container",clientId:t,height:O,minHeight:q,onResizeStart:()=>{o({minHeightUnit:"px"}),l(!1)},onResize:e=>{o({minHeight:e})},onResizeStop:e=>{l(!0),o({minHeight:e})},showHandle:!e.style?.dimensions?.aspectRatio,size:U,width:G};if(!d&&!X&&!J)return(0,Ke.createElement)(Ke.Fragment,null,se,ce,n&&(0,Ke.createElement)(wl,{...me}),(0,Ke.createElement)(E,{...te,className:ut()("is-placeholder",te.className),style:{...te.style,minHeight:q||void 0}},$,(0,Ke.createElement)(fl,{onSelectMedia:A,onError:L,toggleUseFeaturedImage:ie},(0,Ke.createElement)("div",{className:"wp-block-cover__placeholder-background-options"},(0,Ke.createElement)(nt.ColorPalette,{disableCustomColors:!0,value:a.color,onChange:H,clearable:!1})))));const ue=ut()({"is-dark-theme":_,"is-light":!_,"is-transient":D,"has-parallax":b,"is-repeated":y,"has-custom-content-position":!Ur(c)},qr(c));return(0,Ke.createElement)(Ke.Fragment,null,se,ce,(0,Ke.createElement)(E,{...te,className:ut()(ue,te.className),style:{...W,...te.style},"data-url":I},$,(!d||I)&&(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__background",Gr(g),{[a.class]:a.class,"has-background-dim":void 0!==g,"wp-block-cover__gradient-background":I&&R&&0!==g,"has-background-gradient":R,[z]:z}),style:{backgroundImage:R,...K}}),!I&&d&&(0,Ke.createElement)(et.Placeholder,{className:"wp-block-cover__image--placeholder-image",withIllustration:!0}),I&&F&&(j?(0,Ke.createElement)("img",{ref:re,className:"wp-block-cover__image-background",alt:k,src:I,style:Y}):(0,Ke.createElement)("div",{ref:re,role:k?"img":void 0,"aria-label":k||void 0,className:ut()(ue,"wp-block-cover__image-background"),style:{backgroundImage:Z,backgroundPosition:Q}})),I&&V&&(0,Ke.createElement)("video",{ref:re,className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:I,style:Y}),D&&(0,Ke.createElement)(et.Spinner,null),(0,Ke.createElement)(fl,{disableMediaButtons:!0,onSelectMedia:A,onError:L,toggleUseFeaturedImage:ie}),(0,Ke.createElement)("div",{...oe})),n&&(0,Ke.createElement)(wl,{...me}))}));const{cleanEmptyObject:wi}=Ft(nt.privateApis),Ei={from:[{type:"block",blocks:["core/image"],transform:({caption:e,url:t,alt:n,align:a,id:o,anchor:r,style:l})=>(0,Qe.createBlock)("core/cover",{dimRatio:50,url:t,alt:n,align:a,id:o,anchor:r,style:{color:{duotone:l?.color?.duotone}}},[(0,Qe.createBlock)("core/paragraph",{content:e,fontSize:"large",align:"center"})])},{type:"block",blocks:["core/video"],transform:({caption:e,src:t,align:n,id:a,anchor:o})=>(0,Qe.createBlock)("core/cover",{dimRatio:50,url:t,align:n,id:a,backgroundType:Dr,anchor:o},[(0,Qe.createBlock)("core/paragraph",{content:e,fontSize:"large",align:"center"})])},{type:"block",blocks:["core/group"],transform:(e,t)=>{const{align:n,anchor:a,backgroundColor:o,gradient:r,style:l}=e;if(1===t?.length&&"core/cover"===t[0]?.name)return(0,Qe.createBlock)("core/cover",t[0].attributes,t[0].innerBlocks);const i={align:n,anchor:a,dimRatio:o||r||l?.color?.background||l?.color?.gradient?void 0:50,overlayColor:o,customOverlayColor:l?.color?.background,gradient:r,customGradient:l?.color?.gradient},s={...e,backgroundColor:void 0,gradient:void 0,style:wi({...e?.style,color:l?.color?{...l?.color,background:void 0,gradient:void 0}:void 0})};return(0,Qe.createBlock)("core/cover",i,[(0,Qe.createBlock)("core/group",s,t)])}}],to:[{type:"block",blocks:["core/image"],isMatch:({backgroundType:e,url:t,overlayColor:n,customOverlayColor:a,gradient:o,customGradient:r})=>t?e===Lr:!(n||a||o||r),transform:({title:e,url:t,alt:n,align:a,id:o,anchor:r,style:l})=>(0,Qe.createBlock)("core/image",{caption:e,url:t,alt:n,align:a,id:o,anchor:r,style:{color:{duotone:l?.color?.duotone}}})},{type:"block",blocks:["core/video"],isMatch:({backgroundType:e,url:t,overlayColor:n,customOverlayColor:a,gradient:o,customGradient:r})=>t?e===Dr:!(n||a||o||r),transform:({title:e,url:t,align:n,id:a,anchor:o})=>(0,Qe.createBlock)("core/video",{caption:e,src:t,id:a,align:n,anchor:o})},{type:"block",blocks:["core/group"],isMatch:({url:e,useFeaturedImage:t})=>!e&&!t,transform:(e,t)=>{const n={backgroundColor:e?.overlayColor,gradient:e?.gradient,style:wi({...e?.style,color:e?.customOverlayColor||e?.customGradient||e?.style?.color?{background:e?.customOverlayColor,gradient:e?.customGradient,...e?.style?.color}:void 0})};if(1===t?.length&&"core/group"===t[0]?.name){const e=wi(t[0].attributes||{});return e?.backgroundColor||e?.gradient||e?.style?.color?.background||e?.style?.color?.gradient?(0,Qe.createBlock)("core/group",e,t[0]?.innerBlocks):(0,Qe.createBlock)("core/group",{...n,...e,style:wi({...e?.style,color:n?.style?.color||e?.style?.color?{...n?.style?.color,...e?.style?.color}:void 0})},t[0]?.innerBlocks)}return(0,Qe.createBlock)("core/group",{...e,...n},t)}}]},Ci=Ei,Si=[{name:"cover",title:(0,tt.__)("Cover"),description:(0,tt.__)("Add an image or video with a text overlay."),attributes:{layout:{type:"constrained"}},isDefault:!0,icon:Ar}],Bi={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/cover",title:"Cover",category:"media",description:"Add an image or video with a text overlay.",textdomain:"default",attributes:{url:{type:"string"},useFeaturedImage:{type:"boolean",default:!1},id:{type:"number"},alt:{type:"string",default:""},hasParallax:{type:"boolean",default:!1},isRepeated:{type:"boolean",default:!1},dimRatio:{type:"number",default:100},overlayColor:{type:"string"},customOverlayColor:{type:"string"},isUserOverlayColor:{type:"boolean"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},isDark:{type:"boolean",default:!0},allowedBlocks:{type:"array"},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]},tagName:{type:"string",default:"div"}},usesContext:["postId","postType"],supports:{anchor:!0,align:!0,html:!1,spacing:{padding:!0,margin:["top","bottom"],blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",heading:!0,text:!0,background:!1,__experimentalSkipSerialization:["gradients"],enableContrastChecker:!1},dimensions:{aspectRatio:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowJustification:!1},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-cover-editor",style:"wp-block-cover"},{name:Ni}=Bi,Ti={icon:Ar,example:{attributes:{customOverlayColor:"#065174",dimRatio:40,url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,tt.__)("<strong>Snow Patrol</strong>"),align:"center",style:{typography:{fontSize:48},color:{text:"white"}}}}]},transforms:Ci,save:function({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:a,customGradient:o,customOverlayColor:r,dimRatio:l,focalPoint:i,useFeaturedImage:s,hasParallax:c,isDark:m,isRepeated:u,overlayColor:p,url:d,alt:g,id:h,minHeight:b,minHeightUnit:_,tagName:y}=e,v=(0,nt.getColorClassName)("background-color",p),f=(0,nt.__experimentalGetGradientClass)(n),k=Lr===t,x=Dr===t,w=!(c||u),E={minHeight:(b&&_?`${b}${_}`:b)||void 0},C={backgroundColor:v?void 0:r,background:o||void 0},S=i&&w?Or(i):void 0,B=d?`url(${d})`:void 0,N=Or(i),T=ut()({"is-light":!m,"has-parallax":c,"is-repeated":u,"has-custom-content-position":!Ur(a)},qr(a)),I=ut()("wp-block-cover__image-background",h?`wp-image-${h}`:null,{"has-parallax":c,"is-repeated":u}),P=n||o;return(0,Ke.createElement)(y,{...nt.useBlockProps.save({className:T,style:E})},(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__background",v,Gr(l),{"has-background-dim":void 0!==l,"wp-block-cover__gradient-background":d&&P&&0!==l,"has-background-gradient":P,[f]:f}),style:C}),!s&&k&&d&&(w?(0,Ke.createElement)("img",{className:I,alt:g,src:d,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}):(0,Ke.createElement)("div",{role:g?"img":void 0,"aria-label":g||void 0,className:I,style:{backgroundPosition:N,backgroundImage:B}})),x&&d&&(0,Ke.createElement)("video",{className:ut()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})}))},edit:xi,deprecated:gl,variations:Si},Ii=()=>Xe({name:Ni,metadata:Bi,settings:Ti}),Pi=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M4 16h10v1.5H4V16Zm0-4.5h16V13H4v-1.5ZM10 7h10v1.5H10V7Z",fillRule:"evenodd",clipRule:"evenodd"}),(0,Ke.createElement)(Ye.Path,{d:"m4 5.25 4 2.5-4 2.5v-5Z"})),Mi=[["core/paragraph",{placeholder:(0,tt.__)("Type / to add a hidden block")}]];const zi=function({attributes:e,setAttributes:t,clientId:n}){const{showContent:a,summary:o}=e,r=(0,nt.useBlockProps)(),l=(0,nt.useInnerBlocksProps)(r,{template:Mi,__experimentalCaptureToolbars:!0}),i=(0,gt.useSelect)((e=>{const{isBlockSelected:t,hasSelectedInnerBlock:a}=e(nt.store);return a(n,!0)||t(n)}),[n]);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{label:(0,tt.__)("Open by default"),checked:a,onChange:()=>t({showContent:!a})}))),(0,Ke.createElement)("details",{...l,open:i||a},(0,Ke.createElement)("summary",{onClick:e=>e.preventDefault()},(0,Ke.createElement)(nt.RichText,{"aria-label":(0,tt.__)("Write summary"),placeholder:(0,tt.__)("Write summary…"),allowedFormats:[],withoutInteractiveFormatting:!0,value:o,onChange:e=>t({summary:e})})),l.children))};const Ri={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/details",title:"Details",category:"text",description:"Hide and show additional content.",keywords:["accordion","summary","toggle","disclosure"],textdomain:"default",attributes:{showContent:{type:"boolean",default:!1},summary:{type:"rich-text",source:"rich-text",selector:"summary"}},supports:{align:["wide","full"],color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__experimentalBorder:{color:!0,width:!0,style:!0},html:!1,spacing:{margin:!0,padding:!0,blockGap:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowEditing:!1},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-details-editor",style:"wp-block-details"},{name:Ai}=Ri,Hi={icon:Pi,example:{attributes:{summary:"La Mancha",showContent:!0},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,tt.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}}]},save:function({attributes:e}){const{showContent:t}=e,n=e.summary?e.summary:"Details",a=nt.useBlockProps.save();return(0,Ke.createElement)("details",{...a,open:t},(0,Ke.createElement)("summary",null,(0,Ke.createElement)(nt.RichText.Content,{value:n})),(0,Ke.createElement)(nt.InnerBlocks.Content,null))},edit:zi},Li=()=>Xe({name:Ai,metadata:Ri,settings:Hi}),Di=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"}));function Fi(e){return e?(0,tt.__)("This embed will preserve its aspect ratio when the browser is resized."):(0,tt.__)("This embed may not preserve its aspect ratio when the browser is resized.")}const Vi=({blockSupportsResponsive:e,showEditButton:t,themeSupportsResponsive:n,allowResponsive:a,toggleResponsive:o,switchBackToURLInput:r})=>(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,t&&(0,Ke.createElement)(et.ToolbarButton,{className:"components-toolbar__control",label:(0,tt.__)("Edit URL"),icon:Di,onClick:r}))),n&&e&&(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Media settings"),className:"blocks-responsive"},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Resize for smaller devices"),checked:a,help:Fi,onChange:o})))),$i=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z"})),Oi=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM13.2 7.7c-.4.4-.7 1.1-.7 1.9v3.7c-.4-.3-.8-.4-1.3-.4-1.2 0-2.2 1-2.2 2.2 0 1.2 1 2.2 2.2 2.2.5 0 1-.2 1.4-.5.9-.6 1.4-1.6 1.4-2.6V9.6c0-.4.1-.6.2-.8.3-.3 1-.3 1.6-.3h.2V7h-.2c-.7 0-1.8 0-2.6.7z"})),Gi=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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-2zM9.2 4.5H19c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V9.8l4.6-5.3zm9.8 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})),Ui=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM10 15l5-3-5-3v6z"})),qi={foreground:"#1da1f2",src:(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(et.G,null,(0,Ke.createElement)(et.Path,{d:"M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z"})))},ji={foreground:"#ff0000",src:(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z"}))},Wi={foreground:"#3b5998",src:(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z"}))},Zi=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.G,null,(0,Ke.createElement)(et.Path,{d:"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z"}))),Qi={foreground:"#0073AA",src:(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.G,null,(0,Ke.createElement)(et.Path,{d:"M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z"})))},Ki={foreground:"#1db954",src:(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325"}))},Yi=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z"})),Ji={foreground:"#1ab7ea",src:(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(et.G,null,(0,Ke.createElement)(et.Path,{d:"M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z"})))},Xi=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z"})),es={foreground:"#35465c",src:(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"M19 3H5a2 2 0 00-2 2v14c0 1.1.9 2 2 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-5.69 14.66c-2.72 0-3.1-1.9-3.1-3.16v-3.56H8.49V8.99c1.7-.62 2.54-1.99 2.64-2.87 0-.06.06-.41.06-.58h1.9v3.1h2.17v2.3h-2.18v3.1c0 .47.13 1.3 1.2 1.26h1.1v2.36c-1.01.02-2.07 0-2.07 0z"}))},ts=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z"}),(0,Ke.createElement)(et.Path,{d:"M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z"}),(0,Ke.createElement)(et.Path,{d:"M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z"})),ns=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"m.0206909 21 19.8160091-13.07806 3.5831 6.20826z",fill:"#4bc7ee"}),(0,Ke.createElement)(et.Path,{d:"m23.7254 19.0205-10.1074-17.18468c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418h22.5655c1.279 0 1.8019-.8905 1.1599-1.9795z",fill:"#d4cdcb"}),(0,Ke.createElement)(et.Path,{d:"m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",fill:"#c3d82e"}),(0,Ke.createElement)(et.Path,{d:"m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z",fill:"#e4ecb0"}),(0,Ke.createElement)(et.Path,{d:"m.0206909 21 19.5468091-9.063 1.6621 2.8344z",fill:"#209dbd"}),(0,Ke.createElement)(et.Path,{d:"m.0206909 21 17.9209091-11.82623 1.6259 2.76323z",fill:"#7cb3c9"})),as=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"M11.903 16.568c-1.82 0-3.124-1.281-3.124-2.967a2.987 2.987 0 0 1 2.989-2.989c1.663 0 2.944 1.304 2.944 3.034 0 1.663-1.281 2.922-2.81 2.922ZM17.997 3l-3.308.73v5.107c-.809-1.034-2.045-1.37-3.505-1.37-1.529 0-2.9.561-4.023 1.662-1.259 1.214-1.933 2.764-1.933 4.495 0 1.888.72 3.506 2.113 4.742 1.056.944 2.314 1.415 3.775 1.415 1.438 0 2.517-.382 3.573-1.415v1.415h3.308V3Z",fill:"#333436"})),os=(0,Ke.createElement)(et.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(et.Path,{d:"M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"})),rs=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 44 44"},(0,Ke.createElement)(et.Path,{d:"M32.59521,22.001l4.31885-4.84473-6.34131-1.38379.646-6.459-5.94336,2.61035L22,6.31934l-3.27344,5.60351L12.78418,9.3125l.645,6.458L7.08643,17.15234,11.40479,21.999,7.08594,26.84375l6.34131,1.38379-.64551,6.458,5.94287-2.60938L22,37.68066l3.27344-5.60351,5.94287,2.61035-.64551-6.458,6.34277-1.38183Zm.44385,2.75244L30.772,23.97827l-1.59558-2.07391,1.97888.735Zm-8.82147,6.1579L22.75,33.424V30.88977l1.52228-2.22168ZM18.56226,13.48816,19.819,15.09534l-2.49219-.88642L15.94037,12.337Zm6.87719.00116,2.62043-1.15027-1.38654,1.86981L24.183,15.0946Zm3.59357,2.6029-1.22546,1.7381.07525-2.73486,1.44507-1.94867ZM22,29.33008l-2.16406-3.15686L22,23.23688l2.16406,2.93634Zm-4.25458-9.582-.10528-3.836,3.60986,1.284v3.73242Zm5.00458-2.552,3.60986-1.284-.10528,3.836L22.75,20.92853Zm-7.78174-1.10559-.29352-2.94263,1.44245,1.94739.07519,2.73321Zm2.30982,5.08319,3.50817,1.18164-2.16247,2.9342-3.678-1.08447Zm2.4486,7.49285L21.25,30.88977v2.53485L19.78052,30.91Zm3.48707-6.31121,3.50817-1.18164,2.33228,3.03137-3.678,1.08447Zm10.87219-4.28113-2.714,3.04529L28.16418,19.928l1.92176-2.72565ZM24.06036,12.81769l-2.06012,2.6322-2.059-2.63318L22,9.292ZM9.91455,18.07227l4.00079-.87195,1.921,2.72735-3.20794,1.19019Zm2.93024,4.565,1.9801-.73462L13.228,23.97827l-2.26838.77429Zm-1.55591,3.58819L13.701,25.4021l2.64935.78058-2.14447.67853Zm3.64868,1.977L18.19,27.17334l.08313,3.46332L14.52979,32.2793Zm10.7876,2.43549.08447-3.464,3.25165,1.03052.407,4.07684Zm4.06824-3.77478-2.14545-.68,2.65063-.781,2.41266.825Z"})),ls={foreground:"#f43e37",src:(0,Ke.createElement)(et.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z"}),(0,Ke.createElement)(et.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M2.67,12a9.33,9.33,0,0,1,18.66,0H19a7,7,0,1,0-7,7v2.33A9.33,9.33,0,0,1,2.67,12ZM12,17.6A5.6,5.6,0,1,1,17.6,12h-2A3.56,3.56,0,1,0,12,15.56Z",fill:"#fff"}))},is=()=>(0,Ke.createElement)("div",{className:"wp-block-embed is-loading"},(0,Ke.createElement)(et.Spinner,null)),ss=({icon:e,label:t,value:n,onSubmit:a,onChange:o,cannotEmbed:r,fallback:l,tryAgain:i})=>(0,Ke.createElement)(et.Placeholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:e,showColors:!0}),label:t,className:"wp-block-embed",instructions:(0,tt.__)("Paste a link to the content you want to display on your site.")},(0,Ke.createElement)("form",{onSubmit:a},(0,Ke.createElement)("input",{type:"url",value:n||"",className:"components-placeholder__input","aria-label":t,placeholder:(0,tt.__)("Enter URL to embed here…"),onChange:o}),(0,Ke.createElement)(et.Button,{variant:"primary",type:"submit"},(0,tt._x)("Embed","button label"))),(0,Ke.createElement)("div",{className:"wp-block-embed__learn-more"},(0,Ke.createElement)(et.ExternalLink,{href:(0,tt.__)("https://wordpress.org/documentation/article/embeds/")},(0,tt.__)("Learn more about embeds"))),r&&(0,Ke.createElement)("div",{className:"components-placeholder__error"},(0,Ke.createElement)("div",{className:"components-placeholder__instructions"},(0,tt.__)("Sorry, this content could not be embedded.")),(0,Ke.createElement)(et.Button,{variant:"secondary",onClick:i},(0,tt._x)("Try again","button label"))," ",(0,Ke.createElement)(et.Button,{variant:"secondary",onClick:l},(0,tt._x)("Convert to link","button label")))),cs={class:"className",frameborder:"frameBorder",marginheight:"marginHeight",marginwidth:"marginWidth"};function ms({html:e}){const t=(0,_t.useRef)(),n=(0,_t.useMemo)((()=>{const t=(new window.DOMParser).parseFromString(e,"text/html").querySelector("iframe"),n={};return t?(Array.from(t.attributes).forEach((({name:e,value:t})=>{"style"!==e&&(n[cs[e]||e]=t)})),n):n}),[e]);return(0,_t.useEffect)((()=>{const{ownerDocument:e}=t.current,{defaultView:a}=e;function o({data:{secret:e,message:a,value:o}={}}){"height"===a&&e===n["data-secret"]&&(t.current.height=o)}return a.addEventListener("message",o),()=>{a.removeEventListener("message",o)}}),[]),(0,Ke.createElement)("div",{className:"wp-block-embed__wrapper"},(0,Ke.createElement)("iframe",{ref:(0,jt.useMergeRefs)([t,(0,jt.useFocusableIframe)()]),title:n.title,...n}))}class us extends _t.Component{constructor(){super(...arguments),this.hideOverlay=this.hideOverlay.bind(this),this.state={interactive:!1}}static getDerivedStateFromProps(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}hideOverlay(){this.setState({interactive:!0})}render(){const{preview:e,previewable:t,url:n,type:a,caption:o,onCaptionChange:r,isSelected:l,className:i,icon:s,label:c,insertBlocksAfter:m}=this.props,{scripts:u}=e,{interactive:p}=this.state,d="photo"===a?(e=>{const t=e.url||e.thumbnail_url,n=(0,Ke.createElement)("p",null,(0,Ke.createElement)("img",{src:t,alt:e.title,width:"100%"}));return(0,_t.renderToString)(n)})(e):e.html,g=new URL(n).host.split("."),h=g.splice(g.length-2,g.length-1).join("."),b=(0,tt.sprintf)((0,tt.__)("Embedded content from %s"),h),_=zt()(a,i,"wp-block-embed__wrapper"),y="wp-embed"===a?(0,Ke.createElement)(ms,{html:d}):(0,Ke.createElement)("div",{className:"wp-block-embed__wrapper"},(0,Ke.createElement)(et.SandBox,{html:d,scripts:u,title:b,type:_,onFocus:this.hideOverlay}),!p&&(0,Ke.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}));return(0,Ke.createElement)("figure",{className:zt()(i,"wp-block-embed",{"is-type-video":"video"===a})},t?y:(0,Ke.createElement)(et.Placeholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:s,showColors:!0}),label:c},(0,Ke.createElement)("p",{className:"components-placeholder__error"},(0,Ke.createElement)("a",{href:n},n)),(0,Ke.createElement)("p",{className:"components-placeholder__error"},(0,tt.sprintf)((0,tt.__)("Embedded content from %s can't be previewed in the editor."),h))),(!nt.RichText.isEmpty(o)||l)&&(0,Ke.createElement)(nt.RichText,{identifier:"caption",tagName:"figcaption",className:(0,nt.__experimentalGetElementClassName)("caption"),placeholder:(0,tt.__)("Add caption"),value:o,onChange:r,inlineToolbar:!0,__unstableOnSplitAtEnd:()=>m((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))}))}}const ps=us,ds=e=>{const{attributes:{providerNameSlug:t,previewable:n,responsive:a,url:o},attributes:r,isSelected:l,onReplace:i,setAttributes:s,insertBlocksAfter:c,onFocus:m}=e,u={title:(0,tt._x)("Embed","block title"),icon:$i},{icon:p,title:d}=(g=t,(0,Qe.getBlockVariations)(Vt)?.find((({name:e})=>e===g))||u);var g;const[h,b]=(0,_t.useState)(o),[_,y]=(0,_t.useState)(!1),{invalidateResolution:v}=(0,gt.useDispatch)(dt.store),{preview:f,fetching:k,themeSupportsResponsive:x,cannotEmbed:w}=(0,gt.useSelect)((e=>{const{getEmbedPreview:t,isPreviewEmbedFallback:n,isRequestingEmbedPreview:a,getThemeSupports:r}=e(dt.store);if(!o)return{fetching:!1,cannotEmbed:!1};const l=t(o),i=n(o),s=!!l&&!(!1===l?.html&&void 0===l?.type)&&!(404===l?.data?.status);return{preview:s?l:void 0,fetching:a(o),themeSupportsResponsive:r()["responsive-embeds"],cannotEmbed:!s||i}}),[o]),E=()=>((e,t,n,a)=>{const{allowResponsive:o,className:r}=e;return{...e,...qt(t,n,r,a,o)}})(r,f,d,a);(0,_t.useEffect)((()=>{if(f?.html||!w||k)return;const e=o.replace(/\/$/,"");b(e),y(!1),s({url:e})}),[f?.html,o,w,k,s]),(0,_t.useEffect)((()=>{if(w&&!k&&h&&"x.com"===(0,pt.getAuthority)(h)){const e=new URL(h);e.host="twitter.com",s({url:e.toString()})}}),[h,w,k,s]),(0,_t.useEffect)((()=>{if(f&&!_){const t=E();if(s(t),i){const n=Ot(e,t);n&&i(n)}}}),[f,_]);const C=(0,nt.useBlockProps)();if(k)return(0,Ke.createElement)(Ye.View,{...C},(0,Ke.createElement)(is,null));const S=(0,tt.sprintf)((0,tt.__)("%s URL"),d);if(!f||w||_)return(0,Ke.createElement)(Ye.View,{...C},(0,Ke.createElement)(ss,{icon:p,label:S,onFocus:m,onSubmit:e=>{e&&e.preventDefault();const t=Gt(r.className);y(!1),s({url:h,className:t})},value:h,cannotEmbed:w,onChange:e=>b(e.target.value),fallback:()=>function(e,t){const n=(0,Ke.createElement)("a",{href:e},e);t((0,Qe.createBlock)("core/paragraph",{content:(0,_t.renderToString)(n)}))}(h,i),tryAgain:()=>{v("getEmbedPreview",[h])}}));const{caption:B,type:N,allowResponsive:T,className:I}=E(),P=ut()(I,e.className);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Vi,{showEditButton:f&&!w,themeSupportsResponsive:x,blockSupportsResponsive:a,allowResponsive:T,toggleResponsive:()=>{const{allowResponsive:e,className:t}=r,{html:n}=f,o=!e;s({allowResponsive:o,className:Ut(n,t,a&&o)})},switchBackToURLInput:()=>y(!0)}),(0,Ke.createElement)(Ye.View,{...C},(0,Ke.createElement)(ps,{preview:f,previewable:n,className:P,url:h,type:N,caption:B,onCaptionChange:e=>s({caption:e}),isSelected:l,icon:p,label:S,insertBlocksAfter:c})))};const{name:gs}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,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:"rich-text",source:"rich-text",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,spacing:{margin:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},hs={from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&/^\s*(https?:\/\/\S+)\s*$/i.test(e.textContent)&&1===e.textContent?.match(/https/gi)?.length,transform:e=>(0,Qe.createBlock)(gs,{url:e.textContent.trim()})}],to:[{type:"block",blocks:["core/paragraph"],isMatch:({url:e})=>!!e,transform:({url:e,caption:t})=>{let n=`<a href="${e}">${e}</a>`;return t?.trim()&&(n+=`<br />${t}`),(0,Qe.createBlock)("core/paragraph",{content:n})}}]},bs=hs,_s=[{name:"twitter",title:"Twitter",icon:qi,keywords:["tweet",(0,tt.__)("social")],description:(0,tt.__)("Embed a tweet."),patterns:[/^https?:\/\/(www\.)?twitter\.com\/.+/i],attributes:{providerNameSlug:"twitter",responsive:!0}},{name:"youtube",title:"YouTube",icon:ji,keywords:[(0,tt.__)("music"),(0,tt.__)("video")],description:(0,tt.__)("Embed a YouTube video."),patterns:[/^https?:\/\/((m|www)\.)?youtube\.com\/.+/i,/^https?:\/\/youtu\.be\/.+/i],attributes:{providerNameSlug:"youtube",responsive:!0}},{name:"facebook",title:"Facebook",icon:Wi,keywords:[(0,tt.__)("social")],description:(0,tt.__)("Embed a Facebook post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}},{name:"instagram",title:"Instagram",icon:Zi,keywords:[(0,tt.__)("image"),(0,tt.__)("social")],description:(0,tt.__)("Embed an Instagram post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"instagram",responsive:!0}},{name:"wordpress",title:"WordPress",icon:Qi,keywords:[(0,tt.__)("post"),(0,tt.__)("blog")],description:(0,tt.__)("Embed a WordPress post."),attributes:{providerNameSlug:"wordpress"}},{name:"soundcloud",title:"SoundCloud",icon:Oi,keywords:[(0,tt.__)("music"),(0,tt.__)("audio")],description:(0,tt.__)("Embed SoundCloud content."),patterns:[/^https?:\/\/(www\.)?soundcloud\.com\/.+/i],attributes:{providerNameSlug:"soundcloud",responsive:!0}},{name:"spotify",title:"Spotify",icon:Ki,keywords:[(0,tt.__)("music"),(0,tt.__)("audio")],description:(0,tt.__)("Embed Spotify content."),patterns:[/^https?:\/\/(open|play)\.spotify\.com\/.+/i],attributes:{providerNameSlug:"spotify",responsive:!0}},{name:"flickr",title:"Flickr",icon:Yi,keywords:[(0,tt.__)("image")],description:(0,tt.__)("Embed Flickr content."),patterns:[/^https?:\/\/(www\.)?flickr\.com\/.+/i,/^https?:\/\/flic\.kr\/.+/i],attributes:{providerNameSlug:"flickr",responsive:!0}},{name:"vimeo",title:"Vimeo",icon:Ji,keywords:[(0,tt.__)("video")],description:(0,tt.__)("Embed a Vimeo video."),patterns:[/^https?:\/\/(www\.)?vimeo\.com\/.+/i],attributes:{providerNameSlug:"vimeo",responsive:!0}},{name:"animoto",title:"Animoto",icon:ns,description:(0,tt.__)("Embed an Animoto video."),patterns:[/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i],attributes:{providerNameSlug:"animoto",responsive:!0}},{name:"cloudup",title:"Cloudup",icon:$i,description:(0,tt.__)("Embed Cloudup content."),patterns:[/^https?:\/\/cloudup\.com\/.+/i],attributes:{providerNameSlug:"cloudup",responsive:!0}},{name:"collegehumor",title:"CollegeHumor",icon:Ui,description:(0,tt.__)("Embed CollegeHumor content."),scope:["block"],patterns:[],attributes:{providerNameSlug:"collegehumor",responsive:!0}},{name:"crowdsignal",title:"Crowdsignal",icon:$i,keywords:["polldaddy",(0,tt.__)("survey")],description:(0,tt.__)("Embed Crowdsignal (formerly Polldaddy) content."),patterns:[/^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.crowdsignal\.net|.+\.survey\.fm)\/.+/i],attributes:{providerNameSlug:"crowdsignal",responsive:!0}},{name:"dailymotion",title:"Dailymotion",icon:as,keywords:[(0,tt.__)("video")],description:(0,tt.__)("Embed a Dailymotion video."),patterns:[/^https?:\/\/(www\.)?dailymotion\.com\/.+/i],attributes:{providerNameSlug:"dailymotion",responsive:!0}},{name:"imgur",title:"Imgur",icon:Gi,description:(0,tt.__)("Embed Imgur content."),patterns:[/^https?:\/\/(.+\.)?imgur\.com\/.+/i],attributes:{providerNameSlug:"imgur",responsive:!0}},{name:"issuu",title:"Issuu",icon:$i,description:(0,tt.__)("Embed Issuu content."),patterns:[/^https?:\/\/(www\.)?issuu\.com\/.+/i],attributes:{providerNameSlug:"issuu",responsive:!0}},{name:"kickstarter",title:"Kickstarter",icon:$i,description:(0,tt.__)("Embed Kickstarter content."),patterns:[/^https?:\/\/(www\.)?kickstarter\.com\/.+/i,/^https?:\/\/kck\.st\/.+/i],attributes:{providerNameSlug:"kickstarter",responsive:!0}},{name:"mixcloud",title:"Mixcloud",icon:Oi,keywords:[(0,tt.__)("music"),(0,tt.__)("audio")],description:(0,tt.__)("Embed Mixcloud content."),patterns:[/^https?:\/\/(www\.)?mixcloud\.com\/.+/i],attributes:{providerNameSlug:"mixcloud",responsive:!0}},{name:"pocket-casts",title:"Pocket Casts",icon:ls,keywords:[(0,tt.__)("podcast"),(0,tt.__)("audio")],description:(0,tt.__)("Embed a podcast player from Pocket Casts."),patterns:[/^https:\/\/pca.st\/\w+/i],attributes:{providerNameSlug:"pocket-casts",responsive:!0}},{name:"reddit",title:"Reddit",icon:Xi,description:(0,tt.__)("Embed a Reddit thread."),patterns:[/^https?:\/\/(www\.)?reddit\.com\/.+/i],attributes:{providerNameSlug:"reddit",responsive:!0}},{name:"reverbnation",title:"ReverbNation",icon:Oi,description:(0,tt.__)("Embed ReverbNation content."),patterns:[/^https?:\/\/(www\.)?reverbnation\.com\/.+/i],attributes:{providerNameSlug:"reverbnation",responsive:!0}},{name:"screencast",title:"Screencast",icon:Ui,description:(0,tt.__)("Embed Screencast content."),patterns:[/^https?:\/\/(www\.)?screencast\.com\/.+/i],attributes:{providerNameSlug:"screencast",responsive:!0}},{name:"scribd",title:"Scribd",icon:$i,description:(0,tt.__)("Embed Scribd content."),patterns:[/^https?:\/\/(www\.)?scribd\.com\/.+/i],attributes:{providerNameSlug:"scribd",responsive:!0}},{name:"slideshare",title:"Slideshare",icon:$i,description:(0,tt.__)("Embed Slideshare content."),patterns:[/^https?:\/\/(.+?\.)?slideshare\.net\/.+/i],attributes:{providerNameSlug:"slideshare",responsive:!0}},{name:"smugmug",title:"SmugMug",icon:Gi,description:(0,tt.__)("Embed SmugMug content."),patterns:[/^https?:\/\/(.+\.)?smugmug\.com\/.*/i],attributes:{providerNameSlug:"smugmug",previewable:!1,responsive:!0}},{name:"speaker-deck",title:"Speaker Deck",icon:$i,description:(0,tt.__)("Embed Speaker Deck content."),patterns:[/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i],attributes:{providerNameSlug:"speaker-deck",responsive:!0}},{name:"tiktok",title:"TikTok",icon:Ui,keywords:[(0,tt.__)("video")],description:(0,tt.__)("Embed a TikTok video."),patterns:[/^https?:\/\/(www\.)?tiktok\.com\/.+/i],attributes:{providerNameSlug:"tiktok",responsive:!0}},{name:"ted",title:"TED",icon:Ui,description:(0,tt.__)("Embed a TED video."),patterns:[/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i],attributes:{providerNameSlug:"ted",responsive:!0}},{name:"tumblr",title:"Tumblr",icon:es,keywords:[(0,tt.__)("social")],description:(0,tt.__)("Embed a Tumblr post."),patterns:[/^https?:\/\/(.+)\.tumblr\.com\/.+/i],attributes:{providerNameSlug:"tumblr",responsive:!0}},{name:"videopress",title:"VideoPress",icon:Ui,keywords:[(0,tt.__)("video")],description:(0,tt.__)("Embed a VideoPress video."),patterns:[/^https?:\/\/videopress\.com\/.+/i],attributes:{providerNameSlug:"videopress",responsive:!0}},{name:"wordpress-tv",title:"WordPress.tv",icon:Ui,description:(0,tt.__)("Embed a WordPress.tv video."),patterns:[/^https?:\/\/wordpress\.tv\/.+/i],attributes:{providerNameSlug:"wordpress-tv",responsive:!0}},{name:"amazon-kindle",title:"Amazon Kindle",icon:ts,keywords:[(0,tt.__)("ebook")],description:(0,tt.__)("Embed Amazon Kindle content."),patterns:[/^https?:\/\/([a-z0-9-]+\.)?(amazon|amzn)(\.[a-z]{2,4})+\/.+/i,/^https?:\/\/(www\.)?(a\.co|z\.cn)\/.+/i],attributes:{providerNameSlug:"amazon-kindle"}},{name:"pinterest",title:"Pinterest",icon:os,keywords:[(0,tt.__)("social"),(0,tt.__)("bookmark")],description:(0,tt.__)("Embed Pinterest pins, boards, and profiles."),patterns:[/^https?:\/\/([a-z]{2}|www)\.pinterest\.com(\.(au|mx))?\/.*/i],attributes:{providerNameSlug:"pinterest"}},{name:"wolfram-cloud",title:"Wolfram",icon:rs,description:(0,tt.__)("Embed Wolfram notebook content."),patterns:[/^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i],attributes:{providerNameSlug:"wolfram-cloud",responsive:!0}}];_s.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.providerNameSlug===t.providerNameSlug)}));const ys=_s,{attributes:vs}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,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:"rich-text",source:"rich-text",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,spacing:{margin:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},fs={attributes:vs,save({attributes:e}){const{url:t,caption:n,type:a,providerNameSlug:o}=e;if(!t)return null;const r=ut()("wp-block-embed",{[`is-type-${a}`]:a,[`is-provider-${o}`]:o,[`wp-block-embed-${o}`]:o});return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:r})},(0,Ke.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${t}\n`),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:n}))}},ks={attributes:vs,save({attributes:{url:e,caption:t,type:n,providerNameSlug:a}}){if(!e)return null;const o=ut()("wp-block-embed",{[`is-type-${n}`]:n,[`is-provider-${a}`]:a});return(0,Ke.createElement)("figure",{className:o},`\n${e}\n`,!nt.RichText.isEmpty(t)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:t}))}},xs=[fs,ks],ws={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,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:"rich-text",source:"rich-text",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,spacing:{margin:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},{name:Es}=ws,Cs={icon:$i,edit:ds,save:function({attributes:e}){const{url:t,caption:n,type:a,providerNameSlug:o}=e;if(!t)return null;const r=zt()("wp-block-embed",{[`is-type-${a}`]:a,[`is-provider-${o}`]:o,[`wp-block-embed-${o}`]:o});return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:r})},(0,Ke.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${t}\n`),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{className:(0,nt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:n}))},transforms:bs,variations:ys,deprecated:xs},Ss=()=>Xe({name:Es,metadata:ws,settings:Cs}),Bs=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})),Ns={attributes:{id:{type:"number"},href:{type:"string"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){const{href:t,fileId:n,fileName:a,textLinkHref:o,textLinkTarget:r,showDownloadButton:l,downloadButtonText:i,displayPreview:s,previewHeight:c}=e,m=nt.RichText.isEmpty(a)?(0,tt.__)("PDF embed"):(0,tt.sprintf)((0,tt.__)("Embed of %s."),a),u=!nt.RichText.isEmpty(a),p=u?n:void 0;return t&&(0,Ke.createElement)("div",{...nt.useBlockProps.save()},s&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":m})),u&&(0,Ke.createElement)("a",{id:p,href:o,target:r,rel:r?"noreferrer noopener":void 0},(0,Ke.createElement)(nt.RichText.Content,{value:a})),l&&(0,Ke.createElement)("a",{href:t,className:ut()("wp-block-file__button",(0,nt.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":p},(0,Ke.createElement)(nt.RichText.Content,{value:i})))}},Ts={attributes:{id:{type:"number"},href:{type:"string"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){const{href:t,fileId:n,fileName:a,textLinkHref:o,textLinkTarget:r,showDownloadButton:l,downloadButtonText:i,displayPreview:s,previewHeight:c}=e,m=nt.RichText.isEmpty(a)?(0,tt.__)("PDF embed"):(0,tt.sprintf)((0,tt.__)("Embed of %s."),a),u=!nt.RichText.isEmpty(a),p=u?n:void 0;return t&&(0,Ke.createElement)("div",{...nt.useBlockProps.save()},s&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":m})),u&&(0,Ke.createElement)("a",{id:p,href:o,target:r,rel:r?"noreferrer noopener":void 0},(0,Ke.createElement)(nt.RichText.Content,{value:a})),l&&(0,Ke.createElement)("a",{href:t,className:"wp-block-file__button",download:!0,"aria-describedby":p},(0,Ke.createElement)(nt.RichText.Content,{value:i})))}},Is={attributes:{id:{type:"number"},href:{type:"string"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){const{href:t,fileName:n,textLinkHref:a,textLinkTarget:o,showDownloadButton:r,downloadButtonText:l,displayPreview:i,previewHeight:s}=e,c=nt.RichText.isEmpty(n)?(0,tt.__)("PDF embed"):(0,tt.sprintf)((0,tt.__)("Embed of %s."),n);return t&&(0,Ke.createElement)("div",{...nt.useBlockProps.save()},i&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${s}px`},"aria-label":c})),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)("a",{href:a,target:o,rel:o?"noreferrer noopener":void 0},(0,Ke.createElement)(nt.RichText.Content,{value:n})),r&&(0,Ke.createElement)("a",{href:t,className:"wp-block-file__button",download:!0},(0,Ke.createElement)(nt.RichText.Content,{value:l})))}},Ps=[Ns,Ts,Is];function Ms({hrefs:e,openInNewWindow:t,showDownloadButton:n,changeLinkDestinationOption:a,changeOpenInNewWindow:o,changeShowDownloadButton:r,displayPreview:l,changeDisplayPreview:i,previewHeight:s,changePreviewHeight:c}){const{href:m,textLinkHref:u,attachmentPage:p}=e;let d=[{value:m,label:(0,tt.__)("URL")}];return p&&(d=[{value:m,label:(0,tt.__)("Media file")},{value:p,label:(0,tt.__)("Attachment page")}]),(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,m.endsWith(".pdf")&&(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("PDF settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show inline embed"),help:l?(0,tt.__)("Note: Most phone and tablet browsers won't display embedded PDFs."):null,checked:!!l,onChange:i}),l&&(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Height in pixels"),min:Rs,max:Math.max(As,s),value:s,onChange:c})),(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link to"),value:u,options:d,onChange:a}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),checked:t,onChange:o}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show download button"),checked:n,onChange:r}))))}const zs=e=>{let t;try{t=new window.ActiveXObject(e)}catch(e){t=void 0}return t},Rs=200,As=2e3;function Hs({text:e,disabled:t}){const{createNotice:n}=(0,gt.useDispatch)(Pt.store),a=(0,jt.useCopyToClipboard)(e,(()=>{n("info",(0,tt.__)("Copied URL to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,Ke.createElement)(et.ToolbarButton,{className:"components-clipboard-toolbar-button",ref:a,disabled:t},(0,tt.__)("Copy URL"))}const Ls=function({attributes:e,isSelected:t,setAttributes:n,clientId:a}){const{id:o,fileName:r,href:l,textLinkHref:i,textLinkTarget:s,showDownloadButton:c,downloadButtonText:m,displayPreview:u,previewHeight:p}=e,{getSettings:d}=(0,gt.useSelect)(nt.store),{media:g}=(0,gt.useSelect)((e=>({media:void 0===o?void 0:e(dt.store).getMedia(o)})),[o]),{createErrorNotice:h}=(0,gt.useDispatch)(Pt.store),{toggleSelection:b}=(0,gt.useDispatch)(nt.store);function _(e){if(!e||!e.url)return;const t=e.url.endsWith(".pdf");n({href:e.url,fileName:e.title,textLinkHref:e.url,id:e.id,displayPreview:!!t||void 0,previewHeight:t?600:void 0,fileId:`wp-block-file--media-${a}`})}function y(e){n({href:void 0}),h(e,{type:"snackbar"})}(0,_t.useEffect)((()=>{if((0,It.isBlobURL)(l)){const e=(0,It.getBlobByURL)(l);d().mediaUpload({filesList:[e],onFileChange:([e])=>_(e),onError:y}),(0,It.revokeBlobURL)(l)}nt.RichText.isEmpty(m)&&n({downloadButtonText:(0,tt._x)("Download","button label")})}),[]);const v=g&&g.link,f=(0,nt.useBlockProps)({className:ut()((0,It.isBlobURL)(l)&&(0,et.__unstableGetAnimateClassName)({type:"loading"}),{"is-transient":(0,It.isBlobURL)(l)})}),k=!(window.navigator.userAgent.indexOf("Mobi")>-1||window.navigator.userAgent.indexOf("Android")>-1||window.navigator.userAgent.indexOf("Macintosh")>-1&&window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2||(window.ActiveXObject||"ActiveXObject"in window)&&!zs("AcroPDF.PDF")&&!zs("PDF.PdfCtrl"))&&u;return l?(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Ms,{hrefs:{href:l,textLinkHref:i,attachmentPage:v},openInNewWindow:!!s,showDownloadButton:c,changeLinkDestinationOption:function(e){n({textLinkHref:e})},changeOpenInNewWindow:function(e){n({textLinkTarget:!!e&&"_blank"})},changeShowDownloadButton:function(e){n({showDownloadButton:e})},displayPreview:u,changeDisplayPreview:function(e){n({displayPreview:e})},previewHeight:p,changePreviewHeight:function(e){const t=Math.max(parseInt(e,10),Rs);n({previewHeight:t})}}),(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(nt.MediaReplaceFlow,{mediaId:o,mediaURL:l,accept:"*",onSelect:_,onError:y}),(0,Ke.createElement)(Hs,{text:l,disabled:(0,It.isBlobURL)(l)})),(0,Ke.createElement)("div",{...f},k&&(0,Ke.createElement)(et.ResizableBox,{size:{height:p},minHeight:Rs,maxHeight:As,minWidth:"100%",grid:[10,10],enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStart:()=>b(!1),onResizeStop:function(e,t,a,o){b(!0);const r=parseInt(p+o.height,10);n({previewHeight:r})},showHandle:t},(0,Ke.createElement)("object",{className:"wp-block-file__preview",data:l,type:"application/pdf","aria-label":(0,tt.__)("Embed of the selected PDF file.")}),!t&&(0,Ke.createElement)("div",{className:"wp-block-file__preview-overlay"})),(0,Ke.createElement)("div",{className:"wp-block-file__content-wrapper"},(0,Ke.createElement)(nt.RichText,{tagName:"a",value:r,placeholder:(0,tt.__)("Write file name…"),withoutInteractiveFormatting:!0,onChange:e=>n({fileName:vn(e)}),href:i}),c&&(0,Ke.createElement)("div",{className:"wp-block-file__button-richtext-wrapper"},(0,Ke.createElement)(nt.RichText,{tagName:"div","aria-label":(0,tt.__)("Download button text"),className:ut()("wp-block-file__button",(0,nt.__experimentalGetElementClassName)("button")),value:m,withoutInteractiveFormatting:!0,placeholder:(0,tt.__)("Add text…"),onChange:e=>n({downloadButtonText:vn(e)})}))))):(0,Ke.createElement)("div",{...f},(0,Ke.createElement)(nt.MediaPlaceholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:Bs}),labels:{title:(0,tt.__)("File"),instructions:(0,tt.__)("Upload a file or pick one from your media library.")},onSelect:_,onError:y,accept:"*"}))};const Ds={from:[{type:"files",isMatch:e=>e.length>0,priority:15,transform:e=>{const t=[];return e.forEach((e=>{const n=(0,It.createBlobURL)(e);t.push((0,Qe.createBlock)("core/file",{href:n,fileName:e.name,textLinkHref:n}))})),t}},{type:"block",blocks:["core/audio"],transform:e=>(0,Qe.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],transform:e=>(0,Qe.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],transform:e=>(0,Qe.createBlock)("core/file",{href:e.url,fileName:e.caption||(0,pt.getFilename)(e.url),textLinkHref:e.url,id:e.id,anchor:e.anchor})}],to:[{type:"block",blocks:["core/audio"],isMatch:({id:e})=>{if(!e)return!1;const{getMedia:t}=(0,gt.select)(dt.store),n=t(e);return!!n&&n.mime_type.includes("audio")},transform:e=>(0,Qe.createBlock)("core/audio",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],isMatch:({id:e})=>{if(!e)return!1;const{getMedia:t}=(0,gt.select)(dt.store),n=t(e);return!!n&&n.mime_type.includes("video")},transform:e=>(0,Qe.createBlock)("core/video",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],isMatch:({id:e})=>{if(!e)return!1;const{getMedia:t}=(0,gt.select)(dt.store),n=t(e);return!!n&&n.mime_type.includes("image")},transform:e=>(0,Qe.createBlock)("core/image",{url:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})}]},Fs=Ds,Vs={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/file",title:"File",category:"media",description:"Add a link to a downloadable file.",keywords:["document","pdf","download"],textdomain:"default",attributes:{id:{type:"number"},href:{type:"string"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"rich-text",source:"rich-text",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"rich-text",source:"rich-text",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},interactivity:!0},editorStyle:"wp-block-file-editor",style:"wp-block-file"},{name:$s}=Vs,Os={icon:Bs,example:{attributes:{href:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg",fileName:(0,tt._x)("Armstrong_Small_Step","Name of the file")}},transforms:Fs,deprecated:Ps,edit:Ls,save:function({attributes:e}){const{href:t,fileId:n,fileName:a,textLinkHref:o,textLinkTarget:r,showDownloadButton:l,downloadButtonText:i,displayPreview:s,previewHeight:c}=e,m=nt.RichText.isEmpty(a)?"PDF embed":a.toString(),u=!nt.RichText.isEmpty(a),p=u?n:void 0;return t&&(0,Ke.createElement)("div",{...nt.useBlockProps.save()},s&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":m})),u&&(0,Ke.createElement)("a",{id:p,href:o,target:r,rel:r?"noreferrer noopener":void 0},(0,Ke.createElement)(nt.RichText.Content,{value:a})),l&&(0,Ke.createElement)("a",{href:t,className:ut()("wp-block-file__button",(0,nt.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":p},(0,Ke.createElement)(nt.RichText.Content,{value:i})))}},Gs=()=>Xe({name:$s,metadata:Vs,settings:Os}),Us=["core/form-submission-notification",{type:"success"},[["core/paragraph",{content:'<mark style="background-color:rgba(0, 0, 0, 0);color:#345C00" class="has-inline-color">'+(0,tt.__)("Your form has been submitted successfully")+"</mark>"}]]],qs=["core/form-submission-notification",{type:"error"},[["core/paragraph",{content:'<mark style="background-color:rgba(0, 0, 0, 0);color:#CF2E2E" class="has-inline-color">'+(0,tt.__)("There was an error submitting your form.")+"</mark>"}]]],js=[Us,qs,["core/form-input",{type:"text",label:(0,tt.__)("Name"),required:!0}],["core/form-input",{type:"email",label:(0,tt.__)("Email"),required:!0}],["core/form-input",{type:"textarea",label:(0,tt.__)("Comment"),required:!0}],["core/form-submit-button",{}]],Ws=({attributes:e,setAttributes:t,clientId:n})=>{const{action:a,method:o,email:r,submissionMethod:l}=e,i=(0,nt.useBlockProps)(),{hasInnerBlocks:s}=(0,gt.useSelect)((e=>{const{getBlock:t}=e(nt.store),a=t(n);return{hasInnerBlocks:!(!a||!a.innerBlocks.length)}}),[n]),c=(0,nt.useInnerBlocksProps)(i,{template:js,renderAppender:s?void 0:nt.InnerBlocks.ButtonBlockAppender});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.SelectControl,{label:(0,tt.__)("Submissions method"),options:[{label:(0,tt.__)("Send email"),value:"email"},{label:(0,tt.__)("- Custom -"),value:"custom"}],value:l,onChange:e=>t({submissionMethod:e}),help:"custom"===l?(0,tt.__)('Select the method to use for form submissions. Additional options for the "custom" mode can be found in the "Advanced" section.'):(0,tt.__)("Select the method to use for form submissions.")}),"email"===l&&(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,tt.__)("Email for form submissions"),value:r,required:!0,onChange:e=>{t({email:e}),t({action:`mailto:${e}`}),t({method:"post"})},help:(0,tt.__)("The email address where form submissions will be sent. Separate multiple email addresses with a comma.")}))),"email"!==l&&(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Method"),options:[{label:"Get",value:"get"},{label:"Post",value:"post"}],value:o,onChange:e=>t({method:e}),help:(0,tt.__)("Select the method to use for form submissions.")}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,tt.__)("Form action"),value:a,onChange:e=>{t({action:e})},help:(0,tt.__)("The URL where the form should be submitted.")})),(0,Ke.createElement)("form",{...c,className:"wp-block-form",encType:"email"===l?"text/plain":null}))},Zs=({attributes:e})=>{const t=nt.useBlockProps.save(),{submissionMethod:n}=e;return(0,Ke.createElement)("form",{...t,className:"wp-block-form",encType:"email"===n?"text/plain":null},(0,Ke.createElement)(nt.InnerBlocks.Content,null))},Qs=[{name:"comment-form",title:(0,tt.__)("Experimental Comment form"),description:(0,tt.__)("A comment form for posts and pages."),attributes:{submissionMethod:"custom",action:"{SITE_URL}/wp-comments-post.php",method:"post",anchor:"comment-form"},isDefault:!1,innerBlocks:[["core/form-input",{type:"text",name:"author",label:(0,tt.__)("Name"),required:!0,visibilityPermissions:"logged-out"}],["core/form-input",{type:"email",name:"email",label:(0,tt.__)("Email"),required:!0,visibilityPermissions:"logged-out"}],["core/form-input",{type:"textarea",name:"comment",label:(0,tt.__)("Comment"),required:!0,visibilityPermissions:"all"}],["core/form-submit-button",{}]],scope:["inserter","transform"],isActive:e=>!e?.type||"text"===e?.type},{name:"wp-privacy-form",title:(0,tt.__)("Experimental privacy request form"),keywords:["GDPR"],description:(0,tt.__)("A form to request data exports and/or deletion."),attributes:{submissionMethod:"custom",action:"",method:"post",anchor:"gdpr-form"},isDefault:!1,innerBlocks:[Us,qs,["core/paragraph",{content:(0,tt.__)("To request an export or deletion of your personal data on this site, please fill-in the form below. You can define the type of request you wish to perform, and your email address. Once the form is submitted, you will receive a confirmation email with instructions on the next steps.")}],["core/form-input",{type:"email",name:"email",label:(0,tt.__)("Enter your email address."),required:!0,visibilityPermissions:"all"}],["core/form-input",{type:"checkbox",name:"export_personal_data",label:(0,tt.__)("Request data export"),required:!1,visibilityPermissions:"all"}],["core/form-input",{type:"checkbox",name:"remove_personal_data",label:(0,tt.__)("Request data deletion"),required:!1,visibilityPermissions:"all"}],["core/form-submit-button",{}],["core/form-input",{type:"hidden",name:"wp-action",value:"wp_privacy_send_request"}],["core/form-input",{type:"hidden",name:"wp-privacy-request",value:"1"}]],scope:["inserter","transform"],isActive:e=>!e?.type||"text"===e?.type}],Ks=Qs,Ys={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form",title:"Form",category:"common",allowedBlocks:["core/paragraph","core/heading","core/form-input","core/form-submit-button","core/form-submission-notification","core/group","core/columns"],description:"A form.",keywords:["container","wrapper","row","section"],textdomain:"default",icon:"feedback",attributes:{submissionMethod:{type:"string",default:"email"},method:{type:"string",default:"post"},action:{type:"string"},email:{type:"string"}},supports:{anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalSelector:"form"},viewScript:"file:./view.min.js"},{name:Js}=Ys,Xs={edit:Ws,save:Zs,variations:Ks},ec=()=>{const e=["core/form"];return(0,_i.addFilter)("blockEditor.__unstableCanInsertBlockType","core/block-library/preventInsertingFormIntoAnotherForm",((t,n,a,{getBlock:o,getBlockParentsByBlockName:r})=>{if("core/form"!==n.name)return t;for(const t of e){if(o(a)?.name===t||r(a,t).length)return!1}return!0})),Xe({name:Js,metadata:Ys,settings:Xs})};var tc=n(9681),nc=n.n(tc);const ac=window.wp.dom,oc={attributes:{type:{type:"string",default:"text"},name:{type:"string"},label:{type:"string",default:"Label",selector:".wp-block-form-input__label-content",source:"html",__experimentalRole:"content"},inlineLabel:{type:"boolean",default:!1},required:{type:"boolean",default:!1,selector:".wp-block-form-input__input",source:"attribute",attribute:"required"},placeholder:{type:"string",selector:".wp-block-form-input__input",source:"attribute",attribute:"placeholder",__experimentalRole:"content"},value:{type:"string",default:"",selector:"input",source:"attribute",attribute:"value"},visibilityPermissions:{type:"string",default:"all"}},supports:{className:!1,anchor:!0,reusable:!1,spacing:{margin:["top","bottom"]},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}}},save({attributes:e}){const{type:t,name:n,label:a,inlineLabel:o,required:r,placeholder:l,value:i}=e,s=(0,nt.__experimentalGetBorderClassesAndStyles)(e),c=(0,nt.__experimentalGetColorClassesAndStyles)(e),m={...s.style,...c.style},u=ut()("wp-block-form-input__input",c.className,s.className),p="textarea"===t?"textarea":"input";return"hidden"===t?(0,Ke.createElement)("input",{type:t,name:n,value:i}):(0,Ke.createElement)("label",{className:ut()("wp-block-form-input__label",{"is-label-inline":o})},(0,Ke.createElement)("span",{className:"wp-block-form-input__label-content"},(0,Ke.createElement)(nt.RichText.Content,{value:a})),(0,Ke.createElement)(p,{className:u,type:"textarea"===t?void 0:t,name:n||(d=a,nc()((0,ac.__unstableStripHTML)(d)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,"")),required:r,"aria-required":r,placeholder:l||void 0,style:m}));var d}},rc=[oc];const lc=function({attributes:e,setAttributes:t,className:n}){const{type:a,name:o,label:r,inlineLabel:l,required:i,placeholder:s,value:c}=e,m=(0,nt.useBlockProps)(),u=(0,_t.useRef)(),p="textarea"===a?"textarea":"input",d=(0,nt.__experimentalUseBorderProps)(e),g=(0,nt.__experimentalUseColorProps)(e);u.current&&u.current.focus();const h=(0,Ke.createElement)(Ke.Fragment,null,"hidden"!==a&&(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Input settings")},"checkbox"!==a&&(0,Ke.createElement)(et.CheckboxControl,{label:(0,tt.__)("Inline label"),checked:l,onChange:e=>{t({inlineLabel:e})}}),(0,Ke.createElement)(et.CheckboxControl,{label:(0,tt.__)("Required"),checked:i,onChange:e=>{t({required:e})}}))),(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.TextControl,{autoComplete:"off",label:(0,tt.__)("Name"),value:o,onChange:e=>{t({name:e})},help:(0,tt.__)('Affects the "name" atribute of the input element, and is used as a name for the form submission results.')})));return"hidden"===a?(0,Ke.createElement)(Ke.Fragment,null,h,(0,Ke.createElement)("input",{type:"hidden",className:ut()(n,"wp-block-form-input__input",g.className,d.className),"aria-label":(0,tt.__)("Value"),value:c,onChange:e=>t({value:e.target.value})})):(0,Ke.createElement)("div",{...m},h,(0,Ke.createElement)("span",{className:ut()("wp-block-form-input__label",{"is-label-inline":l||"checkbox"===a})},(0,Ke.createElement)(nt.RichText,{tagName:"span",className:"wp-block-form-input__label-content",value:r,onChange:e=>t({label:e}),"aria-label":r?(0,tt.__)("Label"):(0,tt.__)("Empty label"),"data-empty":!r,placeholder:(0,tt.__)("Type the label for this input")}),(0,Ke.createElement)(p,{type:"textarea"===a?void 0:a,className:ut()(n,"wp-block-form-input__input",g.className,d.className),"aria-label":(0,tt.__)("Optional placeholder text"),placeholder:s?void 0:(0,tt.__)("Optional placeholder…"),value:s,onChange:e=>t({placeholder:e.target.value}),"aria-required":i,style:{...d.style,...g.style}})))};const ic=[{name:"text",title:(0,tt.__)("Text Input"),icon:"edit-page",description:(0,tt.__)("A generic text input."),attributes:{type:"text"},isDefault:!0,scope:["inserter","transform"],isActive:e=>!e?.type||"text"===e?.type},{name:"textarea",title:(0,tt.__)("Textarea Input"),icon:"testimonial",description:(0,tt.__)("A textarea input to allow entering multiple lines of text."),attributes:{type:"textarea"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"textarea"===e?.type},{name:"checkbox",title:(0,tt.__)("Checkbox Input"),description:(0,tt.__)("A simple checkbox input."),icon:"forms",attributes:{type:"checkbox",inlineLabel:!0},isDefault:!0,scope:["inserter","transform"],isActive:e=>"checkbox"===e?.type},{name:"email",title:(0,tt.__)("Email Input"),icon:"email",description:(0,tt.__)("Used for email addresses."),attributes:{type:"email"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"email"===e?.type},{name:"url",title:(0,tt.__)("URL Input"),icon:"admin-site",description:(0,tt.__)("Used for URLs."),attributes:{type:"url"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"url"===e?.type},{name:"tel",title:(0,tt.__)("Telephone Input"),icon:"phone",description:(0,tt.__)("Used for phone numbers."),attributes:{type:"tel"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"tel"===e?.type},{name:"number",title:(0,tt.__)("Number Input"),icon:"edit-page",description:(0,tt.__)("A numeric input."),attributes:{type:"number"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"number"===e?.type}],sc=ic,cc={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form-input",title:"Input Field",category:"common",ancestor:["core/form"],description:"The basic building block for forms.",keywords:["input","form"],textdomain:"default",icon:"forms",attributes:{type:{type:"string",default:"text"},name:{type:"string"},label:{type:"rich-text",default:"Label",selector:".wp-block-form-input__label-content",source:"rich-text",__experimentalRole:"content"},inlineLabel:{type:"boolean",default:!1},required:{type:"boolean",default:!1,selector:".wp-block-form-input__input",source:"attribute",attribute:"required"},placeholder:{type:"string",selector:".wp-block-form-input__input",source:"attribute",attribute:"placeholder",__experimentalRole:"content"},value:{type:"string",default:"",selector:"input",source:"attribute",attribute:"value"},visibilityPermissions:{type:"string",default:"all"}},supports:{anchor:!0,reusable:!1,spacing:{margin:["top","bottom"]},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}}},style:["wp-block-form-input"]},{name:mc}=cc,uc={deprecated:rc,edit:lc,save:function({attributes:e}){const{type:t,name:n,label:a,inlineLabel:o,required:r,placeholder:l,value:i}=e,s=(0,nt.__experimentalGetBorderClassesAndStyles)(e),c=(0,nt.__experimentalGetColorClassesAndStyles)(e),m={...s.style,...c.style},u=ut()("wp-block-form-input__input",c.className,s.className),p="textarea"===t?"textarea":"input",d=nt.useBlockProps.save();return"hidden"===t?(0,Ke.createElement)("input",{type:t,name:n,value:i}):(0,Ke.createElement)("div",{...d},(0,Ke.createElement)("label",{className:ut()("wp-block-form-input__label",{"is-label-inline":o})},(0,Ke.createElement)("span",{className:"wp-block-form-input__label-content"},(0,Ke.createElement)(nt.RichText.Content,{value:a})),(0,Ke.createElement)(p,{className:u,type:"textarea"===t?void 0:t,name:n||(g=a,nc()((0,ac.__unstableStripHTML)(g)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,"")),required:r,"aria-required":r,placeholder:l||void 0,style:m})));var g},variations:sc},pc=()=>Xe({name:mc,metadata:cc,settings:uc}),dc=[["core/buttons",{},[["core/button",{text:(0,tt.__)("Submit"),tagName:"button",type:"submit"}]]]],gc=()=>{const e=(0,nt.useBlockProps)(),t=(0,nt.useInnerBlocksProps)(e,{template:dc,templateLock:"all"});return(0,Ke.createElement)("div",{className:"wp-block-form-submit-wrapper",...t})},hc=()=>{const e=nt.useBlockProps.save();return(0,Ke.createElement)("div",{className:"wp-block-form-submit-wrapper",...e},(0,Ke.createElement)(nt.InnerBlocks.Content,null))},bc={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form-submit-button",title:"Form Submit Button",category:"common",icon:"button",ancestor:["core/form"],allowedBlocks:["core/buttons","core/button"],description:"A submission button for forms.",keywords:["submit","button","form"],textdomain:"default",style:["wp-block-form-submit-button"]},{name:_c}=bc,yc={edit:gc,save:hc},vc=()=>Xe({name:_c,metadata:bc,settings:yc}),fc=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.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"})),kc=[["core/paragraph",{content:(0,tt.__)("Enter the message you wish displayed for form submission error/success, and select the type of the message (success/error) from the block's options.")}]],xc=({attributes:e,clientId:t})=>{const{type:n}=e,a=(0,nt.useBlockProps)({className:ut()("wp-block-form-submission-notification",{[`form-notification-type-${n}`]:n})}),{hasInnerBlocks:o}=(0,gt.useSelect)((e=>{const{getBlock:n}=e(nt.store),a=n(t);return{hasInnerBlocks:!(!a||!a.innerBlocks.length)}}),[t]),r=(0,nt.useInnerBlocksProps)(a,{template:kc,renderAppender:o?void 0:nt.InnerBlocks.ButtonBlockAppender});return(0,Ke.createElement)("div",{...r,"data-message-success":(0,tt.__)("Submission success notification"),"data-message-error":(0,tt.__)("Submission error notification")})};const wc=[{name:"form-submission-success",title:(0,tt.__)("Form Submission Success"),description:(0,tt.__)("Success message for form submissions."),attributes:{type:"success"},isDefault:!0,innerBlocks:[["core/paragraph",{content:(0,tt.__)("Your form has been submitted successfully."),backgroundColor:"#00D084",textColor:"#000000",style:{elements:{link:{color:{text:"#000000"}}}}}]],scope:["inserter","transform"],isActive:e=>!e?.type||"success"===e?.type},{name:"form-submission-error",title:(0,tt.__)("Form Submission Error"),description:(0,tt.__)("Error/failure message for form submissions."),attributes:{type:"error"},isDefault:!1,innerBlocks:[["core/paragraph",{content:(0,tt.__)("There was an error submitting your form."),backgroundColor:"#CF2E2E",textColor:"#FFFFFF",style:{elements:{link:{color:{text:"#FFFFFF"}}}}}]],scope:["inserter","transform"],isActive:e=>!e?.type||"error"===e?.type}],Ec=wc,Cc={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form-submission-notification",title:"Form Submission Notification",category:"common",ancestor:["core/form"],description:"Provide a notification message after the form has been submitted.",keywords:["form","feedback","notification","message"],textdomain:"default",icon:"feedback",attributes:{type:{type:"string",default:"success"}}},{name:Sc}=Cc,Bc={icon:fc,edit:xc,save:function({attributes:e}){const{type:t}=e;return(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save(nt.useBlockProps.save({className:ut()("wp-block-form-submission-notification",{[`form-notification-type-${t}`]:t})}))})},variations:Ec},Nc=()=>Xe({name:Sc,metadata:Cc,settings:Bc}),Tc=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M16.375 4.5H4.625a.125.125 0 0 0-.125.125v8.254l2.859-1.54a.75.75 0 0 1 .68-.016l2.384 1.142 2.89-2.074a.75.75 0 0 1 .874 0l2.313 1.66V4.625a.125.125 0 0 0-.125-.125Zm.125 9.398-2.75-1.975-2.813 2.02a.75.75 0 0 1-.76.067l-2.444-1.17L4.5 14.583v1.792c0 .069.056.125.125.125h11.75a.125.125 0 0 0 .125-.125v-2.477ZM4.625 3C3.728 3 3 3.728 3 4.625v11.75C3 17.273 3.728 18 4.625 18h11.75c.898 0 1.625-.727 1.625-1.625V4.625C18 3.728 17.273 3 16.375 3H4.625ZM20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z",fillRule:"evenodd",clipRule:"evenodd"})),Ic="none",Pc="media",Mc="attachment",zc="file",Rc="post";const Ac=(e,t="large")=>{const n=Object.fromEntries(Object.entries(null!=e?e:{}).filter((([e])=>["alt","id","link"].includes(e))));n.url=e?.sizes?.[t]?.url||e?.media_details?.sizes?.[t]?.source_url||e?.url||e?.source_url;const a=e?.sizes?.full?.url||e?.media_details?.sizes?.full?.source_url;return a&&(n.fullUrl=a),n};function Hc(){return!_t.Platform.isNative||function(){if(!window.wp||"boolean"!=typeof window.wp.galleryBlockV2Enabled)throw"window.wp.galleryBlockV2Enabled is not defined";return window.wp.galleryBlockV2Enabled}()}const Lc="file",Dc="post";function Fc(e){return Math.min(3,e?.images?.length)}function Vc(e,t){switch(t){case Lc:return{href:e?.source_url||e?.url,linkDestination:Pc};case Dc:return{href:e?.link,linkDestination:Mc};case Pc:return{href:e?.source_url||e?.url,linkDestination:Pc};case Mc:return{href:e?.link,linkDestination:Mc};case Ic:return{href:void 0,linkDestination:Ic}}return{}}function $c(e){let t=e.linkTo?e.linkTo:"none";"post"===t?t="attachment":"file"===t&&(t="media");const n=e.images.map((n=>function(e,t,n){return(0,Qe.createBlock)("core/image",{...e.id&&{id:parseInt(e.id)},url:e.url,alt:e.alt,caption:e.caption,sizeSlug:t,...Vc(e,n)})}(n,e.sizeSlug,t))),{images:a,ids:o,...r}=e;return[{...r,linkTo:t,allowResize:!1},n]}const Oc={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},shortCodeTransforms:{type:"array",default:[],items:{type:"object"}},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},fixedHeight:{type:"boolean",default:!0},linkTarget:{type:"string"},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"},allowResize:{type:"boolean",default:!1}},save({attributes:e}){const{caption:t,columns:n,imageCrop:a}=e,o=ut()("has-nested-images",{[`columns-${n}`]:void 0!==n,"columns-default":void 0===n,"is-cropped":a}),r=nt.useBlockProps.save({className:o}),l=nt.useInnerBlocksProps.save(r);return(0,Ke.createElement)("figure",{...l},l.children,!nt.RichText.isEmpty(t)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:t}))}},Gc={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},fixedHeight:{type:"boolean",default:!0},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"}},supports:{anchor:!0,align:!0},save({attributes:e}){const{images:t,columns:n=Fc(e),imageCrop:a,caption:o,linkTo:r}=e,l=`columns-${n} ${a?"is-cropped":""}`;return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:l})},(0,Ke.createElement)("ul",{className:"blocks-gallery-grid"},t.map((e=>{let t;switch(r){case Lc:t=e.fullUrl||e.url;break;case Dc:t=e.link}const n=(0,Ke.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,Ke.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,Ke.createElement)("figure",null,t?(0,Ke.createElement)("a",{href:t},n):n,!nt.RichText.isEmpty(e.caption)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!nt.RichText.isEmpty(o)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:o}))},migrate:e=>Hc()?$c(e):e},Uc={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},sizeSlug:{type:"string",default:"large"}},supports:{align:!0},isEligible:({linkTo:e})=>!e||"attachment"===e||"media"===e,migrate(e){if(Hc())return $c(e);let t=e.linkTo;return e.linkTo?"attachment"===e.linkTo?t="post":"media"===e.linkTo&&(t="file"):t="none",{...e,linkTo:t}},save({attributes:e}){const{images:t,columns:n=Fc(e),imageCrop:a,caption:o,linkTo:r}=e;return(0,Ke.createElement)("figure",{className:`columns-${n} ${a?"is-cropped":""}`},(0,Ke.createElement)("ul",{className:"blocks-gallery-grid"},t.map((e=>{let t;switch(r){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const n=(0,Ke.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,Ke.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,Ke.createElement)("figure",null,t?(0,Ke.createElement)("a",{href:t},n):n,!nt.RichText.isEmpty(e.caption)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!nt.RichText.isEmpty(o)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:o}))}},qc={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},link:{source:"attribute",selector:"img",attribute:"data-link"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",default:[]},columns:{type:"number"},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},isEligible:({ids:e})=>e&&e.some((e=>"string"==typeof e)),migrate(e){var t;return Hc()?$c(e):{...e,ids:(null!==(t=e.ids)&&void 0!==t?t:[]).map((e=>{const t=parseInt(e,10);return Number.isInteger(t)?t:null}))}},save({attributes:e}){const{images:t,columns:n=Fc(e),imageCrop:a,caption:o,linkTo:r}=e;return(0,Ke.createElement)("figure",{className:`columns-${n} ${a?"is-cropped":""}`},(0,Ke.createElement)("ul",{className:"blocks-gallery-grid"},t.map((e=>{let t;switch(r){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const n=(0,Ke.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,Ke.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,Ke.createElement)("figure",null,t?(0,Ke.createElement)("a",{href:t},n):n,!nt.RichText.isEmpty(e.caption)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!nt.RichText.isEmpty(o)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:o}))}},jc={attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"string",source:"html",selector:"figcaption"}}},ids:{type:"array",default:[]},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},save({attributes:e}){const{images:t,columns:n=Fc(e),imageCrop:a,linkTo:o}=e;return(0,Ke.createElement)("ul",{className:`columns-${n} ${a?"is-cropped":""}`},t.map((e=>{let t;switch(o){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const n=(0,Ke.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,Ke.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,Ke.createElement)("figure",null,t?(0,Ke.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:e.caption})))})))},migrate:e=>Hc()?$c(e):e},Wc={attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"string",source:"html",selector:"figcaption"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},isEligible:({images:e,ids:t})=>e&&e.length>0&&(!t&&e||t&&e&&t.length!==e.length||e.some(((e,n)=>!e&&null!==t[n]||parseInt(e,10)!==t[n]))),migrate(e){var t;return Hc()?$c(e):{...e,ids:(null!==(t=e.images)&&void 0!==t?t:[]).map((({id:e})=>e?parseInt(e,10):null))}},supports:{align:!0},save({attributes:e}){const{images:t,columns:n=Fc(e),imageCrop:a,linkTo:o}=e;return(0,Ke.createElement)("ul",{className:`columns-${n} ${a?"is-cropped":""}`},t.map((e=>{let t;switch(o){case"media":t=e.url;break;case"attachment":t=e.link}const n=(0,Ke.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,Ke.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,Ke.createElement)("figure",null,t?(0,Ke.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:e.caption})))})))}},Zc={attributes:{images:{type:"array",default:[],source:"query",selector:"div.wp-block-gallery figure.blocks-gallery-image img",query:{url:{source:"attribute",attribute:"src"},alt:{source:"attribute",attribute:"alt",default:""},id:{source:"attribute",attribute:"data-id"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},align:{type:"string",default:"none"}},supports:{align:!0},save({attributes:e}){const{images:t,columns:n=Fc(e),align:a,imageCrop:o,linkTo:r}=e,l=ut()(`columns-${n}`,{alignnone:"none"===a,"is-cropped":o});return(0,Ke.createElement)("div",{className:l},t.map((e=>{let t;switch(r){case"media":t=e.url;break;case"attachment":t=e.link}const n=(0,Ke.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id});return(0,Ke.createElement)("figure",{key:e.id||e.url,className:"blocks-gallery-image"},t?(0,Ke.createElement)("a",{href:t},n):n)})))},migrate:e=>Hc()?$c(e):e},Qc=[Oc,Gc,Uc,qc,jc,Wc,Zc],Kc=window.wp.viewport,Yc=(0,Ke.createElement)(nt.BlockIcon,{icon:Tc}),Jc=20,Xc="none",em="media",tm="attachment",nm="custom",am=["noreferrer","noopener"],om=["image"];function rm(e,t,n){switch(n||t){case zc:case Pc:return{href:e?.source_url||e?.url,linkDestination:em};case Rc:case Mc:return{href:e?.link,linkDestination:tm};case Ic:return{href:void 0,linkDestination:Xc}}return{}}function lm(e,{rel:t}){const n=e?"_blank":void 0;let a;return a=n||t?function(e){let t=e;return void 0!==e&&t&&(am.forEach((e=>{const n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),t||(t=void 0)),t}(t):void 0,{linkTarget:n,rel:a}}function im(e){const{attributes:t,isSelected:n,setAttributes:a,mediaPlaceholder:o,insertBlocksAfter:r,blockProps:l,__unstableLayoutClassNames:i,isContentLocked:s,multiGallerySelection:c}=e,{align:m,columns:u,imageCrop:p}=t;return(0,Ke.createElement)("figure",{...l,className:ut()(l.className,i,"blocks-gallery-grid",{[`align${m}`]:m,[`columns-${u}`]:void 0!==u,"columns-default":void 0===u,"is-cropped":p})},l.children,n&&!l.children&&(0,Ke.createElement)(Ye.View,{className:"blocks-gallery-media-placeholder-wrapper"},o),(0,Ke.createElement)(Qt,{attributes:t,setAttributes:a,isSelected:n,insertBlocksAfter:r,showToolbarButton:!c&&!s,className:"blocks-gallery-caption",label:(0,tt.__)("Gallery caption text"),placeholder:(0,tt.__)("Add gallery caption")}))}function sm(e,t,n){return(0,_t.useMemo)((()=>function(){if(!e||0===e.length)return;const{imageSizes:a}=n();let o={};t&&(o=e.reduce(((e,t)=>{if(!t.id)return e;const n=a.reduce(((e,n)=>{const a=t.sizes?.[n.slug]?.url,o=t.media_details?.sizes?.[n.slug]?.source_url;return{...e,[n.slug]:a||o}}),{});return{...e,[parseInt(t.id,10)]:n}}),{}));const r=Object.values(o);return a.filter((({slug:e})=>r.some((t=>t[e])))).map((({name:e,slug:t})=>({value:t,label:e})))}()),[e,t])}function cm(e,t){const[n,a]=(0,_t.useState)([]);return(0,_t.useMemo)((()=>function(){let o=!1;const r=n.filter((t=>e.find((e=>t.clientId===e.clientId))));r.length<n.length&&(o=!0);e.forEach((e=>{e.fromSavedContent&&!r.find((t=>t.id===e.id))&&(o=!0,r.push(e))}));const l=e.filter((e=>!r.find((t=>e.clientId&&t.clientId===e.clientId))&&t?.find((t=>t.id===e.id))&&!e.fromSavedConent));(o||l?.length>0)&&a([...r,...l]);return l.length>0?l:null}()),[e,t])}const mm=[];const{useStyleOverride:um}=Ft(nt.privateApis);function pm({blockGap:e,clientId:t}){const n="var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )";let a,o=n,r=n;e&&(a="string"==typeof e?(0,nt.__experimentalGetGapCSSValue)(e):(0,nt.__experimentalGetGapCSSValue)(e?.top)||n,r="string"==typeof e?(0,nt.__experimentalGetGapCSSValue)(e):(0,nt.__experimentalGetGapCSSValue)(e?.left)||n,o=a===r?a:`${a} ${r}`);return um({css:`#block-${t} {\n\t\t--wp--style--unstable-gallery-gap: ${"0"===r?"0px":r};\n\t\tgap: ${o}\n\t}`}),null}const dm=[{value:Mc,label:(0,tt.__)("Attachment Page")},{value:Pc,label:(0,tt.__)("Media File")},{value:Ic,label:(0,tt._x)("None","Media item link option")}],gm=["image"],hm=_t.Platform.isNative?(0,tt.__)("Add media"):(0,tt.__)("Drag images, upload new ones or select files from your library."),bm=_t.Platform.isNative?{type:"stepper"}:{},_m=[];const ym=(0,jt.compose)([(0,Kc.withViewportMatch)({isNarrow:"< small"})])((function(e){const{setAttributes:t,attributes:n,className:a,clientId:o,isSelected:r,insertBlocksAfter:l,isContentLocked:i,onFocus:s}=e,{columns:c,imageCrop:m,randomOrder:u,linkTarget:p,linkTo:d,sizeSlug:g}=n,{__unstableMarkNextChangeAsNotPersistent:h,replaceInnerBlocks:b,updateBlockAttributes:_,selectBlock:y}=(0,gt.useDispatch)(nt.store),{createSuccessNotice:v,createErrorNotice:f}=(0,gt.useDispatch)(Pt.store),{getBlock:k,getSettings:x,preferredStyle:w,innerBlockImages:E,blockWasJustInserted:C,multiGallerySelection:S}=(0,gt.useSelect)((e=>{var t;const{getBlockName:n,getMultiSelectedBlockClientIds:a,getSettings:r,getBlock:l,wasBlockJustInserted:i}=e(nt.store),s=r().__experimentalPreferredStyleVariations,c=a();return{getBlock:l,getSettings:r,preferredStyle:s?.value?.["core/image"],innerBlockImages:null!==(t=l(o)?.innerBlocks)&&void 0!==t?t:_m,blockWasJustInserted:i(o,"inserter_menu"),multiGallerySelection:c.length&&c.every((e=>"core/gallery"===n(e)))}}),[o]),B=(0,_t.useMemo)((()=>E?.map((e=>({clientId:e.clientId,id:e.attributes.id,url:e.attributes.url,attributes:e.attributes,fromSavedContent:Boolean(e.originalContent)})))),[E]),N=function(e){return(0,gt.useSelect)((t=>{var n;const a=e.map((e=>e.attributes.id)).filter((e=>void 0!==e));return 0===a.length?mm:null!==(n=t(dt.store).getMediaItems({include:a.join(","),per_page:-1,orderby:"include"}))&&void 0!==n?n:mm}),[e])}(E),T=cm(B,N);(0,_t.useEffect)((()=>{T?.forEach((e=>{h(),_(e.clientId,{...P(e.attributes),id:e.id,align:void 0})}))}),[T]);const I=sm(N,r,x);function P(e){const t=e.id?N.find((({id:t})=>t===e.id)):null;let a,o;return a=e.className&&""!==e.className?e.className:w?`is-style-${w}`:void 0,o=e.linkTarget||e.rel?{linkTarget:e.linkTarget,rel:e.rel}:lm(p,n),{...Ac(t,g),...rm(t,d,e?.linkDestination),...o,className:a,sizeSlug:g,caption:e.caption||t.caption?.raw,alt:e.alt||t.alt_text}}function M(e){const t=_t.Platform.isNative&&e.id?N.find((({id:t})=>t===e.id)):null,n=t?t?.media_type:e.type;return gm.some((e=>0===n?.indexOf(e)))||0===e.url?.indexOf("blob:")}function z(e){const t="[object FileList]"===Object.prototype.toString.call(e),n=t?Array.from(e).map((e=>e.url?e:Ac({url:(0,It.createBlobURL)(e)}))):e;n.every(M)||f((0,tt.__)("If uploading to a gallery all files need to be image formats"),{id:"gallery-upload-invalid-file",type:"snackbar"});const a=n.filter((e=>e.url||M(e))).map((e=>e.url?e:Ac({url:(0,It.createBlobURL)(e)}))),r=a.reduce(((e,t,n)=>(e[t.id]=n,e)),{}),l=t?E:E.filter((e=>a.find((t=>t.id===e.attributes.id)))),i=a.filter((e=>!l.find((t=>e.id===t.attributes.id)))).map((e=>(0,Qe.createBlock)("core/image",{id:e.id,url:e.url,caption:e.caption,alt:e.alt})));b(o,l.concat(i).sort(((e,t)=>r[e.attributes.id]-r[t.attributes.id]))),i?.length>0&&y(i[0].clientId)}(0,_t.useEffect)((()=>{d||(h(),t({linkTo:window?.wp?.media?.view?.settings?.defaultProps?.link||Ic}))}),[d]);const R=!!B.length,A=R&&B.some((e=>!!e.id)),H=B.some((e=>_t.Platform.isNative?0===e.url?.indexOf("file:"):!e.id&&0===e.url?.indexOf("blob:"))),L=_t.Platform.select({web:{addToGallery:!1,disableMediaButtons:H,value:{}},native:{addToGallery:A,isAppender:R,disableMediaButtons:R&&!r||H,value:A?B:{},autoOpenMediaUpload:!R&&r&&C,onFocus:s}}),D=(0,Ke.createElement)(nt.MediaPlaceholder,{handleUpload:!1,icon:Yc,labels:{title:(0,tt.__)("Gallery"),instructions:hm},onSelect:z,accept:"image/*",allowedTypes:gm,multiple:!0,onError:function(e){f(e,{type:"snackbar"})},...L}),F=(0,nt.useBlockProps)({className:ut()(a,"has-nested-images")}),V=_t.Platform.isNative&&{marginHorizontal:0,marginVertical:0},$=(0,nt.useInnerBlocksProps)(F,{orientation:"horizontal",renderAppender:!1,...V});if(!R)return(0,Ke.createElement)(Ye.View,{...$},$.children,D);const O=d&&"none"!==d;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},B.length>1&&(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Columns"),value:c||(G=B.length,G?Math.min(3,G):3),onChange:function(e){t({columns:e})},min:1,max:Math.min(8,B.length),...bm,required:!0,__next40pxDefaultSize:!0}),I?.length>0&&(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Resolution"),help:(0,tt.__)("Select the size of the source images."),value:g,options:I,onChange:function(e){t({sizeSlug:e});const n={},a=[];k(o).innerBlocks.forEach((t=>{a.push(t.clientId);const o=t.attributes.id?N.find((({id:e})=>e===t.attributes.id)):null;n[t.clientId]=function(e,t){const n=e?.media_details?.sizes?.[t]?.source_url;return n?{url:n,width:void 0,height:void 0,sizeSlug:t}:{}}(o,e)})),_(a,n,!0);const r=I.find((t=>t.value===e));v((0,tt.sprintf)((0,tt.__)("All gallery image sizes updated to: %s"),r.label),{id:"gallery-attributes-sizeSlug",type:"snackbar"})},hideCancelButton:!0,size:"__unstable-large"}),(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link to"),value:d,onChange:function(e){t({linkTo:e});const n={},a=[];k(o).innerBlocks.forEach((t=>{a.push(t.clientId);const o=t.attributes.id?N.find((({id:e})=>e===t.attributes.id)):null;n[t.clientId]=rm(o,e)})),_(a,n,!0);const r=[...dm].find((t=>t.value===e));v((0,tt.sprintf)((0,tt.__)("All gallery image links updated to: %s"),r.label),{id:"gallery-attributes-linkTo",type:"snackbar"})},options:dm,hideCancelButton:!0,size:"__unstable-large"}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Crop images to fit"),checked:!!m,onChange:function(){t({imageCrop:!m})}}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Randomize order"),checked:!!u,onChange:function(){t({randomOrder:!u})}}),O&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open images in new tab"),checked:"_blank"===p,onChange:function(e){const n=e?"_blank":void 0;t({linkTarget:n});const a={},r=[];k(o).innerBlocks.forEach((e=>{r.push(e.clientId),a[e.clientId]=lm(n,e.attributes)})),_(r,a,!0);const l=e?(0,tt.__)("All gallery images updated to open in new tab"):(0,tt.__)("All gallery images updated to not open in new tab");v(l,{id:"gallery-attributes-openInNewTab",type:"snackbar"})}}),_t.Platform.isWeb&&!I&&A&&(0,Ke.createElement)(et.BaseControl,{className:"gallery-image-sizes"},(0,Ke.createElement)(et.BaseControl.VisualLabel,null,(0,tt.__)("Resolution")),(0,Ke.createElement)(Ye.View,{className:"gallery-image-sizes__loading"},(0,Ke.createElement)(et.Spinner,null),(0,tt.__)("Loading options…"))))),_t.Platform.isWeb&&(0,Ke.createElement)(Ke.Fragment,null,!S&&(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(nt.MediaReplaceFlow,{allowedTypes:gm,accept:"image/*",handleUpload:!1,onSelect:z,name:(0,tt.__)("Add"),multiple:!0,mediaIds:B.filter((e=>e.id)).map((e=>e.id)),addToGallery:A})),(0,Ke.createElement)(pm,{blockGap:n.style?.spacing?.blockGap,clientId:o})),(0,Ke.createElement)(im,{...e,isContentLocked:i,images:B,mediaPlaceholder:!R||_t.Platform.isNative?D:void 0,blockProps:$,insertBlocksAfter:l,multiGallerySelection:S}));var G})),vm=(e,t="large")=>{const n=Object.fromEntries(Object.entries(null!=e?e:{}).filter((([e])=>["alt","id","link","caption"].includes(e))));n.url=e?.sizes?.[t]?.url||e?.media_details?.sizes?.[t]?.source_url||e?.url;const a=e?.sizes?.full?.url||e?.media_details?.sizes?.full?.source_url;return a&&(n.fullUrl=a),n},fm=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.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-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})),km=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),xm=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),wm=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),Em="none",Cm="file",Sm="post";class Bm extends _t.Component{constructor(){super(...arguments),this.onSelectImage=this.onSelectImage.bind(this),this.onRemoveImage=this.onRemoveImage.bind(this),this.bindContainer=this.bindContainer.bind(this),this.onEdit=this.onEdit.bind(this),this.onSelectImageFromLibrary=this.onSelectImageFromLibrary.bind(this),this.onSelectCustomURL=this.onSelectCustomURL.bind(this),this.state={isEditing:!1}}bindContainer(e){this.container=e}onSelectImage(){this.props.isSelected||this.props.onSelect()}onRemoveImage(e){this.container===this.container.ownerDocument.activeElement&&this.props.isSelected&&-1!==[fn.BACKSPACE,fn.DELETE].indexOf(e.keyCode)&&(e.preventDefault(),this.props.onRemove())}onEdit(){this.setState({isEditing:!0})}componentDidUpdate(){const{image:e,url:t,__unstableMarkNextChangeAsNotPersistent:n}=this.props;e&&!t&&(n(),this.props.setAttributes({url:e.source_url,alt:e.alt_text}))}deselectOnBlur(){this.props.onDeselect()}onSelectImageFromLibrary(e){const{setAttributes:t,id:n,url:a,alt:o,caption:r,sizeSlug:l}=this.props;if(!e||!e.url)return;let i=vm(e,l);if(((e,t)=>!e&&(0,It.isBlobURL)(t))(n,a)&&o){const{alt:e,...t}=i;i=t}if(r&&!i.caption){const{caption:e,...t}=i;i=t}t(i),this.setState({isEditing:!1})}onSelectCustomURL(e){const{setAttributes:t,url:n}=this.props;e!==n&&(t({url:e,id:void 0}),this.setState({isEditing:!1}))}render(){const{url:e,alt:t,id:n,linkTo:a,link:o,isFirstItem:r,isLastItem:l,isSelected:i,caption:s,onRemove:c,onMoveForward:m,onMoveBackward:u,setAttributes:p,"aria-label":d}=this.props,{isEditing:g}=this.state;let h;switch(a){case Cm:h=e;break;case Sm:h=o}const b=(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("img",{src:e,alt:t,"data-id":n,onKeyDown:this.onRemoveImage,tabIndex:"0","aria-label":d,ref:this.bindContainer}),(0,It.isBlobURL)(e)&&(0,Ke.createElement)(et.Spinner,null)),_=ut()({"is-selected":i,"is-transient":(0,It.isBlobURL)(e)});return(0,Ke.createElement)("figure",{className:_,onClick:this.onSelectImage,onFocus:this.onSelectImage},!g&&(h?(0,Ke.createElement)("a",{href:h},b):b),g&&(0,Ke.createElement)(nt.MediaPlaceholder,{labels:{title:(0,tt.__)("Edit gallery image")},icon:fm,onSelect:this.onSelectImageFromLibrary,onSelectURL:this.onSelectCustomURL,accept:"image/*",allowedTypes:["image"],value:{id:n,src:e}}),(0,Ke.createElement)(et.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-left"},(0,Ke.createElement)(et.Button,{icon:km,onClick:r?void 0:u,label:(0,tt.__)("Move image backward"),"aria-disabled":r,disabled:!i}),(0,Ke.createElement)(et.Button,{icon:xm,onClick:l?void 0:m,label:(0,tt.__)("Move image forward"),"aria-disabled":l,disabled:!i})),(0,Ke.createElement)(et.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-right"},(0,Ke.createElement)(et.Button,{icon:Di,onClick:this.onEdit,label:(0,tt.__)("Replace image"),disabled:!i}),(0,Ke.createElement)(et.Button,{icon:wm,onClick:c,label:(0,tt.__)("Remove image"),disabled:!i})),!g&&(i||s)&&(0,Ke.createElement)(nt.RichText,{tagName:"figcaption",className:(0,nt.__experimentalGetElementClassName)("caption"),"aria-label":(0,tt.__)("Image caption text"),placeholder:i?(0,tt.__)("Add caption"):null,value:s,onChange:e=>p({caption:e}),inlineToolbar:!0}))}}const Nm=(0,jt.compose)([(0,gt.withSelect)(((e,t)=>{const{getMedia:n}=e(dt.store),{id:a}=t;return{image:a?n(parseInt(a,10)):null}})),(0,gt.withDispatch)((e=>{const{__unstableMarkNextChangeAsNotPersistent:t}=e(nt.store);return{__unstableMarkNextChangeAsNotPersistent:t}}))])(Bm);function Tm({isHidden:e,...t}){return e?(0,Ke.createElement)(et.VisuallyHidden,{as:nt.RichText,...t}):(0,Ke.createElement)(nt.RichText,{...t})}const Im=e=>{const{attributes:t,isSelected:n,setAttributes:a,selectedImage:o,mediaPlaceholder:r,onMoveBackward:l,onMoveForward:i,onRemoveImage:s,onSelectImage:c,onDeselectImage:m,onSetImageAttributes:u,insertBlocksAfter:p,blockProps:d}=e,{align:g,columns:h=Fc(t),caption:b,imageCrop:_,images:y}=t;return(0,Ke.createElement)("figure",{...d,className:ut()(d.className,{[`align${g}`]:g,[`columns-${h}`]:h,"is-cropped":_})},(0,Ke.createElement)("ul",{className:"blocks-gallery-grid"},y.map(((e,a)=>{const r=(0,tt.sprintf)((0,tt.__)("image %1$d of %2$d in gallery"),a+1,y.length);return(0,Ke.createElement)("li",{className:"blocks-gallery-item",key:e.id?`${e.id}-${a}`:e.url},(0,Ke.createElement)(Nm,{url:e.url,alt:e.alt,id:e.id,isFirstItem:0===a,isLastItem:a+1===y.length,isSelected:n&&o===a,onMoveBackward:l(a),onMoveForward:i(a),onRemove:s(a),onSelect:c(a),onDeselect:m(a),setAttributes:e=>u(a,e),caption:e.caption,"aria-label":r,sizeSlug:t.sizeSlug}))}))),r,(0,Ke.createElement)(Tm,{isHidden:!n&&nt.RichText.isEmpty(b),tagName:"figcaption",className:ut()("blocks-gallery-caption",(0,nt.__experimentalGetElementClassName)("caption")),"aria-label":(0,tt.__)("Gallery caption text"),placeholder:(0,tt.__)("Write gallery caption…"),value:b,onChange:e=>a({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>p((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))}))},Pm=[{value:Sm,label:(0,tt.__)("Attachment Page")},{value:Cm,label:(0,tt.__)("Media File")},{value:Em,label:(0,tt.__)("None")}],Mm=["image"],zm=_t.Platform.select({web:(0,tt.__)("Drag images, upload new ones or select files from your library."),native:(0,tt.__)("ADD MEDIA")}),Rm=_t.Platform.select({web:{},native:{type:"stepper"}});const Am=(0,jt.compose)([et.withNotices,(0,Kc.withViewportMatch)({isNarrow:"< small"})])((function(e){const{attributes:t,clientId:n,isSelected:a,noticeUI:o,noticeOperations:r,onFocus:l}=e,{columns:i=Fc(t),imageCrop:s,images:c,linkTo:m,sizeSlug:u}=t,[p,d]=(0,_t.useState)(),[g,h]=(0,_t.useState)(),{__unstableMarkNextChangeAsNotPersistent:b}=(0,gt.useDispatch)(nt.store),{imageSizes:_,mediaUpload:y,getMedia:v,wasBlockJustInserted:f}=(0,gt.useSelect)((e=>{const t=e(nt.store).getSettings();return{imageSizes:t.imageSizes,mediaUpload:t.mediaUpload,getMedia:e(dt.store).getMedia,wasBlockJustInserted:e(nt.store).wasBlockJustInserted(n,"inserter_menu")}})),k=(0,_t.useMemo)((()=>{var e;return a?(null!==(e=t.ids)&&void 0!==e?e:[]).reduce(((e,t)=>{if(!t)return e;const n=v(t),a=_.reduce(((e,t)=>{const a=n?.sizes?.[t.slug]?.url,o=n?.media_details?.sizes?.[t.slug]?.source_url;return{...e,[t.slug]:a||o}}),{});return{...e,[parseInt(t,10)]:a}}),{}):{}}),[a,t.ids,_]);function x(t){if(t.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');t.images&&(t={...t,ids:t.images.map((({id:e})=>parseInt(e,10)))}),e.setAttributes(t)}function w(e,t){const n=[...c];n.splice(t,1,c[e]),n.splice(e,1,c[t]),d(t),x({images:n})}function E(e){const t=e.id.toString(),n=c.find((({id:e})=>e===t)),a=n?n.caption:e.caption;if(!g)return a;const o=g.find((({id:e})=>e===t));return o&&o.caption!==e.caption?e.caption:a}function C(e){h(e.map((e=>({id:e.id.toString(),caption:e.caption})))),x({images:e.map((e=>({...vm(e,u),caption:E(e),id:e.id.toString()}))),columns:t.columns?Math.min(e.length,t.columns):t.columns})}(0,_t.useEffect)((()=>{if("web"===_t.Platform.OS&&c&&c.length>0&&c.every((({url:e})=>(0,It.isBlobURL)(e)))){const e=c.map((({url:e})=>(0,It.getBlobByURL)(e)));c.forEach((({url:e})=>(0,It.revokeBlobURL)(e))),y({filesList:e,onFileChange:C,allowedTypes:["image"]})}}),[]),(0,_t.useEffect)((()=>{a||d()}),[a]),(0,_t.useEffect)((()=>{m||(b(),x({linkTo:window?.wp?.media?.view?.settings?.defaultProps?.link||Em}))}),[m]);const S=!!c.length,B=S&&c.some((e=>!!e.id)),N=(0,Ke.createElement)(nt.MediaPlaceholder,{addToGallery:B,isAppender:S,disableMediaButtons:S&&!a,icon:!S&&Yc,labels:{title:!S&&(0,tt.__)("Gallery"),instructions:!S&&zm},onSelect:C,accept:"image/*",allowedTypes:Mm,multiple:!0,value:B?c:{},onError:function(e){r.removeAllNotices(),r.createErrorNotice(e)},notices:S?void 0:o,onFocus:l,autoOpenMediaUpload:!S&&a&&f}),T=(0,nt.useBlockProps)();if(!S)return(0,Ke.createElement)(Ye.View,{...T},N);const I=function(){const e=Object.values(k);return _.filter((({slug:t})=>e.some((e=>e[t])))).map((({name:e,slug:t})=>({value:t,label:e})))}(),P=S&&I.length>0;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},c.length>1&&(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Columns"),value:i,onChange:function(e){x({columns:e})},min:1,max:Math.min(8,c.length),...Rm,required:!0}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Crop images"),checked:!!s,onChange:function(){x({imageCrop:!s})},help:function(e){return e?(0,tt.__)("Thumbnails are cropped to align."):(0,tt.__)("Thumbnails are not cropped.")}}),(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link to"),value:m,onChange:function(e){x({linkTo:e})},options:Pm,hideCancelButton:!0}),P&&(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Image size"),value:u,options:I,onChange:function(e){x({images:(null!=c?c:[]).map((t=>{if(!t.id)return t;const n=k[parseInt(t.id,10)]?.[e];return{...t,...n&&{url:n}}})),sizeSlug:e})},hideCancelButton:!0}))),o,(0,Ke.createElement)(Im,{...e,selectedImage:p,mediaPlaceholder:N,onMoveBackward:function(e){return()=>{0!==e&&w(e,e-1)}},onMoveForward:function(e){return()=>{e!==c.length-1&&w(e,e+1)}},onRemoveImage:function(e){return()=>{const n=c.filter(((t,n)=>e!==n));d(),x({images:n,columns:t.columns?Math.min(n.length,t.columns):t.columns})}},onSelectImage:function(e){return()=>{d(e)}},onDeselectImage:function(){return()=>{d()}},onSetImageAttributes:function(e,t){c[e]&&x({images:[...c.slice(0,e),{...c[e],...t},...c.slice(e+1)]})},blockProps:T,onFocusGalleryCaption:function(){d()}}))}));const Hm=(0,jt.compose)([et.withNotices])((function(e){return Hc()?(0,Ke.createElement)(ym,{...e}):(0,Ke.createElement)(Am,{...e})}));(0,_i.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-to",(function(e){if(Hc()&&"core/gallery"===e.name&&e.attributes?.images.length>0){const t=e.attributes.images.map((({url:t,id:n,alt:a})=>(0,Qe.createBlock)("core/image",{url:t,id:n?parseInt(n,10):null,alt:a,sizeSlug:e.attributes.sizeSlug,linkDestination:e.attributes.linkDestination})));delete e.attributes.ids,delete e.attributes.images,e.innerBlocks=t}return e})),(0,_i.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-from",(function(e,t){const n=(Array.isArray(t)?t:[t]).find((t=>"core/gallery"===t.name&&t.innerBlocks.length>0&&!t.attributes.images?.length>0&&!e.name.includes("core/")));if(n){const e=n.innerBlocks.map((({attributes:{url:e,id:t,alt:n}})=>({url:e,id:t?parseInt(t,10):null,alt:n}))),t=e.map((({id:e})=>e));n.attributes.images=e,n.attributes.ids=t}return e}));const Lm={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:e=>{let{align:t,sizeSlug:n}=e[0];t=e.every((e=>e.align===t))?t:void 0,n=e.every((e=>e.sizeSlug===n))?n:void 0;const a=e.filter((({url:e})=>e));if(Hc()){const e=a.map((e=>(e.width=void 0,e.height=void 0,(0,Qe.createBlock)("core/image",e))));return(0,Qe.createBlock)("core/gallery",{align:t,sizeSlug:n},e)}return(0,Qe.createBlock)("core/gallery",{images:a.map((({id:e,url:t,alt:n,caption:a})=>({id:e.toString(),url:t,alt:n,caption:a}))),ids:a.map((({id:e})=>parseInt(e,10))),align:t,sizeSlug:n})}},{type:"shortcode",tag:"gallery",transform({named:{ids:e,columns:t=3,link:n,orderby:a}}){const o=(e=>e?e.split(",").map((e=>parseInt(e,10))):[])(e).map((e=>parseInt(e,10)));let r=Ic;"post"===n?r=Mc:"file"===n&&(r=Pc);return(0,Qe.createBlock)("core/gallery",{columns:parseInt(t,10),linkTo:r,randomOrder:"rand"===a},o.map((e=>(0,Qe.createBlock)("core/image",{id:e}))))},isMatch:({named:e})=>void 0!==e.ids},{type:"files",priority:1,isMatch:e=>1!==e.length&&e.every((e=>0===e.type.indexOf("image/"))),transform(e){if(Hc()){const t=e.map((e=>(0,Qe.createBlock)("core/image",{url:(0,It.createBlobURL)(e)})));return(0,Qe.createBlock)("core/gallery",{},t)}const t=(0,Qe.createBlock)("core/gallery",{images:e.map((e=>Ac({url:(0,It.createBlobURL)(e)})))});return t}}],to:[{type:"block",blocks:["core/image"],transform:({align:e,images:t,ids:n,sizeSlug:a},o)=>Hc()?o.length>0?o.map((({attributes:{url:t,alt:n,caption:a,title:o,href:r,rel:l,linkClass:i,id:s,sizeSlug:c,linkDestination:m,linkTarget:u,anchor:p,className:d}})=>(0,Qe.createBlock)("core/image",{align:e,url:t,alt:n,caption:a,title:o,href:r,rel:l,linkClass:i,id:s,sizeSlug:c,linkDestination:m,linkTarget:u,anchor:p,className:d}))):(0,Qe.createBlock)("core/image",{align:e}):t.length>0?t.map((({url:t,alt:o,caption:r},l)=>(0,Qe.createBlock)("core/image",{id:n[l],url:t,alt:o,caption:r,align:e,sizeSlug:a}))):(0,Qe.createBlock)("core/image",{align:e})}]},Dm=Lm,Fm={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/gallery",title:"Gallery",category:"media",allowedBlocks:["core/image"],description:"Display multiple images in a rich gallery.",keywords:["images","photos"],textdomain:"default",attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"rich-text",source:"rich-text",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},shortCodeTransforms:{type:"array",items:{type:"object"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"rich-text",source:"rich-text",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},randomOrder:{type:"boolean",default:!1},fixedHeight:{type:"boolean",default:!0},linkTarget:{type:"string"},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"},allowResize:{type:"boolean",default:!1}},providesContext:{allowResize:"allowResize",imageCrop:"imageCrop",fixedHeight:"fixedHeight"},supports:{anchor:!0,align:!0,html:!1,units:["px","em","rem","vh","vw"],spacing:{margin:!0,padding:!0,blockGap:["horizontal","vertical"],__experimentalSkipSerialization:["blockGap"],__experimentalDefaultControls:{blockGap:!0,margin:!1,padding:!1}},color:{text:!1,background:!0,gradients:!0},layout:{allowSwitching:!1,allowInheriting:!1,allowEditing:!1,default:{type:"flex"}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-gallery-editor",style:"wp-block-gallery"},{name:Vm}=Fm,$m={icon:Tc,example:{attributes:{columns:2},innerBlocks:[{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg"}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg"}}]},transforms:Dm,edit:Hm,save:function({attributes:e}){if(!Hc())return function({attributes:e}){const{images:t,columns:n=Fc(e),imageCrop:a,caption:o,linkTo:r}=e,l=`columns-${n} ${a?"is-cropped":""}`;return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:l})},(0,Ke.createElement)("ul",{className:"blocks-gallery-grid"},t.map((e=>{let t;switch(r){case Cm:t=e.fullUrl||e.url;break;case Sm:t=e.link}const n=(0,Ke.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,Ke.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,Ke.createElement)("figure",null,t?(0,Ke.createElement)("a",{href:t},n):n,!nt.RichText.isEmpty(e.caption)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:ut()("blocks-gallery-item__caption",(0,nt.__experimentalGetElementClassName)("caption")),value:e.caption})))}))),!nt.RichText.isEmpty(o)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:ut()("blocks-gallery-caption",(0,nt.__experimentalGetElementClassName)("caption")),value:o}))}({attributes:e});const{caption:t,columns:n,imageCrop:a}=e,o=ut()("has-nested-images",{[`columns-${n}`]:void 0!==n,"columns-default":void 0===n,"is-cropped":a}),r=nt.useBlockProps.save({className:o}),l=nt.useInnerBlocksProps.save(r);return(0,Ke.createElement)("figure",{...l},l.children,!nt.RichText.isEmpty(t)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:ut()("blocks-gallery-caption",(0,nt.__experimentalGetElementClassName)("caption")),value:t}))},deprecated:Qc},Om=()=>Xe({name:Vm,metadata:Fm,settings:$m}),Gm=e=>{if(e.tagName||(e={...e,tagName:"div"}),!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:a,...o}=e;return{...o,style:t}},Um=[{attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},supports:{__experimentalOnEnter:!0,__experimentalSettings:!0,align:["wide","full"],anchor:!0,ariaLabel:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:["top","bottom"],padding:!0,blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},layout:!0},save:({attributes:{tagName:e}})=>(0,Ke.createElement)(e,{...nt.useInnerBlocksProps.save(nt.useBlockProps.save())}),isEligible:({layout:e})=>!e||e.inherit||e.contentSize&&"constrained"!==e.type,migrate:e=>{const{layout:t=null}=e;return t?t.inherit||t.contentSize?{...e,layout:{...t,type:"constrained"}}:void 0:e}},{attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},supports:{align:["wide","full"],anchor:!0,color:{gradients:!0,link:!0},spacing:{padding:!0},__experimentalBorder:{radius:!0}},save({attributes:e}){const{tagName:t}=e;return(0,Ke.createElement)(t,{...nt.useBlockProps.save()},(0,Ke.createElement)("div",{className:"wp-block-group__inner-container"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:Gm,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,textColor:a,customTextColor:o}=e,r=(0,nt.getColorClassName)("background-color",t),l=(0,nt.getColorClassName)("color",a),i=ut()(r,l,{"has-text-color":a||o,"has-background":t||n}),s={backgroundColor:r?void 0:n,color:l?void 0:o};return(0,Ke.createElement)("div",{className:i,style:s},(0,Ke.createElement)("div",{className:"wp-block-group__inner-container"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},migrate:Gm,supports:{align:["wide","full"],anchor:!0,html:!1},save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,textColor:a,customTextColor:o}=e,r=(0,nt.getColorClassName)("background-color",t),l=(0,nt.getColorClassName)("color",a),i=ut()(r,{"has-text-color":a||o,"has-background":t||n}),s={backgroundColor:r?void 0:n,color:l?void 0:o};return(0,Ke.createElement)("div",{className:i,style:s},(0,Ke.createElement)("div",{className:"wp-block-group__inner-container"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:Gm,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n}=e,a=(0,nt.getColorClassName)("background-color",t),o=ut()(a,{"has-background":t||n}),r={backgroundColor:a?void 0:n};return(0,Ke.createElement)("div",{className:o,style:r},(0,Ke.createElement)(nt.InnerBlocks.Content,null))}}],qm=Um,jm=(e="group")=>{const t={group:(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"44",height:"32",viewBox:"0 0 44 32"},(0,Ke.createElement)(et.Path,{d:"M42 0H2C.9 0 0 .9 0 2v28c0 1.1.9 2 2 2h40c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2z"})),"group-row":(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"44",height:"32",viewBox:"0 0 44 32"},(0,Ke.createElement)(et.Path,{d:"M42 0H23.5c-.6 0-1 .4-1 1v30c0 .6.4 1 1 1H42c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zM20.5 0H2C.9 0 0 .9 0 2v28c0 1.1.9 2 2 2h18.5c.6 0 1-.4 1-1V1c0-.6-.4-1-1-1z"})),"group-stack":(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"44",height:"32",viewBox:"0 0 44 32"},(0,Ke.createElement)(et.Path,{d:"M42 0H2C.9 0 0 .9 0 2v12.5c0 .6.4 1 1 1h42c.6 0 1-.4 1-1V2c0-1.1-.9-2-2-2zm1 16.5H1c-.6 0-1 .4-1 1V30c0 1.1.9 2 2 2h40c1.1 0 2-.9 2-2V17.5c0-.6-.4-1-1-1z"})),"group-grid":(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"44",height:"32",viewBox:"0 0 44 32"},(0,Ke.createElement)(et.Path,{d:"m20.30137,-0.00025l-18.9728,0c-0.86524,0.07234 -1.41711,0.79149 -1.41711,1.89149l0,12.64468c0,0.6 0.73401,0.96383 1.0304,0.96383l19.67469,0.03617c0.29639,0 1.0304,-0.4 1.0304,-1l-0.03576,-12.7532c0,-1.1 -0.76644,-1.78297 -1.30983,-1.78297zm0.52975,16.60851l-19.99654,-0.03617c-0.29639,0 -0.92312,0.36383 -0.92312,0.96383l-0.03576,12.68085c0,1.1 0.8022,1.81915 1.34559,1.81915l19.00857,0c0.54339,0 1.45287,-0.71915 1.45287,-1.81915l0,-12.53617c0,-0.6 -0.5552,-1.07234 -0.8516,-1.07234z"}),(0,Ke.createElement)(et.Path,{d:"m42.73056,-0.03617l-18.59217,0c-0.84788,0.07234 -1.38868,0.79149 -1.38868,1.89149l0,12.64468c0,0.6 0.71928,0.96383 1.00973,0.96383l19.27997,0.03617c0.29045,0 1.00973,-0.4 1.00973,-1l-0.03504,-12.7532c0,-1.1 -0.75106,-1.78297 -1.28355,-1.78297zm0.51912,16.60851l-19.59537,-0.03617c-0.29045,0 -0.9046,0.36383 -0.9046,0.96383l-0.03504,12.68085c0,1.1 0.78611,1.81915 1.31859,1.81915l18.62721,0c0.53249,0 1.42372,-0.71915 1.42372,-1.81915l0,-12.53617c0,-0.6 -0.54407,-1.07234 -0.83451,-1.07234z"}))};return t?.[e]};const Wm=function({name:e,onSelect:t}){const n=(0,gt.useSelect)((t=>t(Qe.store).getBlockVariations(e,"block")),[e]),a=(0,nt.useBlockProps)({className:"wp-block-group__placeholder"});return(0,Ke.createElement)("div",{...a},(0,Ke.createElement)(et.Placeholder,{instructions:(0,tt.__)("Group blocks together. Select a layout:")},(0,Ke.createElement)("ul",{role:"list",className:"wp-block-group-placeholder__variations","aria-label":(0,tt.__)("Block variations")},n.map((e=>(0,Ke.createElement)("li",{key:e.name},(0,Ke.createElement)(et.Button,{variant:"tertiary",icon:jm(e.name),iconSize:44,onClick:()=>t(e),className:"wp-block-group-placeholder__variation-button",label:`${e.title}: ${e.description}`})))))))};function Zm({tagName:e,onSelectTagName:t}){const n={header:(0,tt.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,tt.__)("The <main> element should be used for the primary content of your document only. "),section:(0,tt.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element."),article:(0,tt.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,tt.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),footer:(0,tt.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).")};return(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("HTML element"),options:[{label:(0,tt.__)("Default (<div>)"),value:"div"},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"}],value:e,onChange:t,help:n[e]}))}const Qm=function({attributes:e,name:t,setAttributes:n,clientId:a}){const{hasInnerBlocks:o,themeSupportsLayout:r}=(0,gt.useSelect)((e=>{const{getBlock:t,getSettings:n}=e(nt.store),o=t(a);return{hasInnerBlocks:!(!o||!o.innerBlocks.length),themeSupportsLayout:n()?.supportsLayout}}),[a]),{tagName:l="div",templateLock:i,allowedBlocks:s,layout:c={}}=e,{type:m="default"}=c,u=r||"flex"===m||"grid"===m,p=(0,_t.useRef)(),d=(0,nt.useBlockProps)({ref:p}),[g,h]=function({attributes:e={style:void 0,backgroundColor:void 0,textColor:void 0,fontSize:void 0},usedLayoutType:t="",hasInnerBlocks:n=!1}){const{style:a,backgroundColor:o,textColor:r,fontSize:l}=e,[i,s]=(0,_t.useState)(!(n||o||l||r||a||"flex"===t||"grid"===t));return(0,_t.useEffect)((()=>{(n||o||l||r||a||"flex"===t)&&s(!1)}),[o,l,r,a,t,n]),[i,s]}({attributes:e,usedLayoutType:m,hasInnerBlocks:o});let b;g?b=!1:o||(b=nt.InnerBlocks.ButtonBlockAppender);const _=(0,nt.useInnerBlocksProps)(u?d:{className:"wp-block-group__inner-container"},{dropZoneElement:p.current,templateLock:i,allowedBlocks:s,renderAppender:b}),{selectBlock:y}=(0,gt.useDispatch)(nt.store);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Zm,{tagName:l,onSelectTagName:e=>n({tagName:e})}),g&&(0,Ke.createElement)(Ye.View,null,_.children,(0,Ke.createElement)(Wm,{name:t,onSelect:e=>{n(e.attributes),y(a,-1),h(!1)}})),u&&!g&&(0,Ke.createElement)(l,{..._}),!u&&!g&&(0,Ke.createElement)(l,{...d},(0,Ke.createElement)("div",{..._})))};const Km={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert(e){const t=["wide","full"],n=e.reduce(((e,n)=>{const{align:a}=n.attributes;return t.indexOf(a)>t.indexOf(e)?a:e}),void 0),a=e.map((e=>(0,Qe.createBlock)(e.name,e.attributes,e.innerBlocks)));return(0,Qe.createBlock)("core/group",{align:n,layout:{type:"constrained"}},a)}}]},Ym=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z"})),Jm=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z"})),Xm=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"})),eu=[{name:"group",title:(0,tt.__)("Group"),description:(0,tt.__)("Gather blocks in a container."),attributes:{layout:{type:"constrained"}},isDefault:!0,scope:["block","inserter","transform"],isActive:e=>!e.layout||!e.layout?.type||"default"===e.layout?.type||"constrained"===e.layout?.type,icon:fc},{name:"group-row",title:(0,tt._x)("Row","single horizontal line"),description:(0,tt.__)("Arrange blocks horizontally."),attributes:{layout:{type:"flex",flexWrap:"nowrap"}},scope:["block","inserter","transform"],isActive:e=>"flex"===e.layout?.type&&(!e.layout?.orientation||"horizontal"===e.layout?.orientation),icon:Ym},{name:"group-stack",title:(0,tt.__)("Stack"),description:(0,tt.__)("Arrange blocks vertically."),attributes:{layout:{type:"flex",orientation:"vertical"}},scope:["block","inserter","transform"],isActive:e=>"flex"===e.layout?.type&&"vertical"===e.layout?.orientation,icon:Jm}];window?.__experimentalEnableGroupGridVariation&&eu.push({name:"group-grid",title:(0,tt.__)("Grid"),description:(0,tt.__)("Arrange blocks in a grid."),attributes:{layout:{type:"grid"}},scope:["block","inserter","transform"],isActive:e=>"grid"===e.layout?.type,icon:Xm});const tu=eu,nu={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/group",title:"Group",category:"design",description:"Gather blocks in a layout container.",keywords:["container","wrapper","row","section"],textdomain:"default",attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]},allowedBlocks:{type:"array"}},supports:{__experimentalOnEnter:!0,__experimentalOnMerge:!0,__experimentalSettings:!0,align:["wide","full"],anchor:!0,ariaLabel:!0,html:!1,background:{backgroundImage:!0,backgroundSize:!0,__experimentalDefaultControls:{backgroundImage:!0}},color:{gradients:!0,heading:!0,button:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:["top","bottom"],padding:!0,blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},dimensions:{minHeight:!0},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},position:{sticky:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowSizingOnChildren:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-group-editor",style:"wp-block-group"},{name:au}=nu,ou={icon:fc,example:{attributes:{style:{color:{text:"#000000",background:"#ffffff"}}},innerBlocks:[{name:"core/paragraph",attributes:{customTextColor:"#cf2e2e",fontSize:"large",content:(0,tt.__)("One.")}},{name:"core/paragraph",attributes:{customTextColor:"#ff6900",fontSize:"large",content:(0,tt.__)("Two.")}},{name:"core/paragraph",attributes:{customTextColor:"#fcb900",fontSize:"large",content:(0,tt.__)("Three.")}},{name:"core/paragraph",attributes:{customTextColor:"#00d084",fontSize:"large",content:(0,tt.__)("Four.")}},{name:"core/paragraph",attributes:{customTextColor:"#0693e3",fontSize:"large",content:(0,tt.__)("Five.")}},{name:"core/paragraph",attributes:{customTextColor:"#9b51e0",fontSize:"large",content:(0,tt.__)("Six.")}}]},transforms:Km,edit:Qm,save:function({attributes:{tagName:e}}){return(0,Ke.createElement)(e,{...nt.useInnerBlocksProps.save(nt.useBlockProps.save())})},deprecated:qm,variations:tu},ru=()=>Xe({name:au,metadata:nu,settings:ou}),lu=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M6 5V18.5911L12 13.8473L18 18.5911V5H6Z"})),iu={className:!1,anchor:!0},su={align:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:""},level:{type:"number",default:2},placeholder:{type:"string"}},cu=e=>{if(!e.customTextColor)return e;const t={color:{text:e.customTextColor}},{customTextColor:n,...a}=e;return{...a,style:t}},mu=["left","right","center"],uu=e=>{const{align:t,...n}=e;return mu.includes(t)?{...n,textAlign:t}:e},pu={supports:iu,attributes:{...su,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>cu(uu(e)),save({attributes:e}){const{align:t,level:n,content:a,textColor:o,customTextColor:r}=e,l="h"+n,i=(0,nt.getColorClassName)("color",o),s=ut()({[i]:i});return(0,Ke.createElement)(nt.RichText.Content,{className:s||void 0,tagName:l,style:{textAlign:t,color:i?void 0:r},value:a})}},du={attributes:{...su,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>cu(uu(e)),save({attributes:e}){const{align:t,content:n,customTextColor:a,level:o,textColor:r}=e,l="h"+o,i=(0,nt.getColorClassName)("color",r),s=ut()({[i]:i,[`has-text-align-${t}`]:t});return(0,Ke.createElement)(nt.RichText.Content,{className:s||void 0,tagName:l,style:{color:i?void 0:a},value:n})},supports:iu},gu={supports:iu,attributes:{...su,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>cu(uu(e)),save({attributes:e}){const{align:t,content:n,customTextColor:a,level:o,textColor:r}=e,l="h"+o,i=(0,nt.getColorClassName)("color",r),s=ut()({[i]:i,"has-text-color":r||a,[`has-text-align-${t}`]:t});return(0,Ke.createElement)(nt.RichText.Content,{className:s||void 0,tagName:l,style:{color:i?void 0:a},value:n})}},hu={supports:{align:["wide","full"],anchor:!0,className:!1,color:{link:!0},fontSize:!0,lineHeight:!0,__experimentalSelector:{"core/heading/h1":"h1","core/heading/h2":"h2","core/heading/h3":"h3","core/heading/h4":"h4","core/heading/h5":"h5","core/heading/h6":"h6"},__unstablePasteTextInline:!0},attributes:su,isEligible:({align:e})=>mu.includes(e),migrate:uu,save({attributes:e}){const{align:t,content:n,level:a}=e,o="h"+a,r=ut()({[`has-text-align-${t}`]:t});return(0,Ke.createElement)(o,{...nt.useBlockProps.save({className:r})},(0,Ke.createElement)(nt.RichText.Content,{value:n}))}},bu={supports:{align:["wide","full"],anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0,textTransform:!0}},__experimentalSelector:"h1,h2,h3,h4,h5,h6",__unstablePasteTextInline:!0,__experimentalSlashInserter:!0},attributes:{textAlign:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:"",__experimentalRole:"content"},level:{type:"number",default:2},placeholder:{type:"string"}},save({attributes:e}){const{textAlign:t,content:n,level:a}=e,o="h"+a,r=ut()({[`has-text-align-${t}`]:t});return(0,Ke.createElement)(o,{...nt.useBlockProps.save({className:r})},(0,Ke.createElement)(nt.RichText.Content,{value:n}))}},_u=[bu,hu,gu,du,pu],yu={},vu=e=>nc()((e=>{const t=document.createElement("div");return t.innerHTML=e,t.innerText})(e)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,""),fu=(e,t)=>{const n=vu(t);if(""===n)return null;delete yu[e];let a=n,o=0;for(;Object.values(yu).includes(a);)o+=1,a=n+"-"+o;return a},ku=(e,t)=>{yu[e]=t};const xu=function({attributes:e,setAttributes:t,mergeBlocks:n,onReplace:a,style:o,clientId:r}){const{textAlign:l,content:i,level:s,placeholder:c,anchor:m}=e,u="h"+s,p=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${l}`]:l}),style:o}),d=(0,nt.useBlockEditingMode)(),{canGenerateAnchors:g}=(0,gt.useSelect)((e=>{const{getGlobalBlockCount:t,getSettings:n}=e(nt.store);return{canGenerateAnchors:!!n().generateAnchors||t("core/table-of-contents")>0}}),[]),{__unstableMarkNextChangeAsNotPersistent:h}=(0,gt.useDispatch)(nt.store);return(0,_t.useEffect)((()=>{if(g)return!m&&i&&(h(),t({anchor:fu(r,i)})),ku(r,m),()=>ku(r,null)}),[m,i,r,g]),(0,Ke.createElement)(Ke.Fragment,null,"default"===d&&(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.HeadingLevelDropdown,{value:s,onChange:e=>t({level:e})}),(0,Ke.createElement)(nt.AlignmentControl,{value:l,onChange:e=>{t({textAlign:e})}})),(0,Ke.createElement)(nt.RichText,{identifier:"content",tagName:u,value:i,onChange:e=>{const n={content:e};!g||m&&e&&fu(r,i)!==m||(n.anchor=fu(r,e)),t(n)},onMerge:n,onSplit:(t,n)=>{let a;var o;n||t?a=(0,Qe.createBlock)("core/heading",{...e,content:t}):a=(0,Qe.createBlock)(null!==(o=(0,Qe.getDefaultBlockName)())&&void 0!==o?o:"core/heading");return n&&(a.clientId=r),a},onReplace:a,onRemove:()=>a([]),placeholder:c||(0,tt.__)("Heading"),textAlign:l,..._t.Platform.isNative&&{deleteEnter:!0},...p}))};const wu={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map((({content:e,anchor:t,align:n,metadata:a})=>(0,Qe.createBlock)("core/heading",{content:e,anchor:t,textAlign:n,metadata:An(a,"core/heading",(({content:e})=>({content:e})))})))},{type:"raw",selector:"h1,h2,h3,h4,h5,h6",schema:({phrasingContentSchema:e,isPaste:t})=>{const n={children:e,attributes:t?[]:["style","id"]};return{h1:n,h2:n,h3:n,h4:n,h5:n,h6:n}},transform(e){const t=(0,Qe.getBlockAttributes)("core/heading",e.outerHTML),{textAlign:n}=e.style||{};var a;return t.level=(a=e.nodeName,Number(a.substr(1))),"left"!==n&&"center"!==n&&"right"!==n||(t.align=n),(0,Qe.createBlock)("core/heading",t)}},...[1,2,3,4,5,6].map((e=>({type:"prefix",prefix:Array(e+1).join("#"),transform:t=>(0,Qe.createBlock)("core/heading",{level:e,content:t})}))),...[1,2,3,4,5,6].map((e=>({type:"enter",regExp:new RegExp(`^/(h|H)${e}$`),transform:()=>(0,Qe.createBlock)("core/heading",{level:e})})))],to:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map((({content:e,textAlign:t,metadata:n})=>(0,Qe.createBlock)("core/paragraph",{content:e,align:t,metadata:An(n,"core/paragraph",(({content:e})=>({content:e})))})))}]},Eu=wu,Cu={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/heading",title:"Heading",category:"text",description:"Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",keywords:["title","subtitle"],textdomain:"default",attributes:{textAlign:{type:"string"},content:{type:"rich-text",source:"rich-text",selector:"h1,h2,h3,h4,h5,h6",__experimentalRole:"content"},level:{type:"number",default:2},placeholder:{type:"string"}},supports:{align:["wide","full"],anchor:!0,className:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},__unstablePasteTextInline:!0,__experimentalSlashInserter:!0,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-heading-editor",style:"wp-block-heading"},{name:Su}=Cu,Bu={icon:lu,example:{attributes:{content:(0,tt.__)("Code is Poetry"),level:2}},__experimentalLabel(e,{context:t}){const{content:n,level:a}=e,o=e?.metadata?.name,r=n?.length>0;return"list-view"===t&&(o||r)?o||n:"accessibility"===t?r?(0,tt.sprintf)((0,tt.__)("Level %1$s. %2$s"),a,n):(0,tt.sprintf)((0,tt.__)("Level %s. Empty."),a):void 0},transforms:Eu,deprecated:_u,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:xu,save:function({attributes:e}){const{textAlign:t,content:n,level:a}=e,o="h"+a,r=ut()({[`has-text-align-${t}`]:t});return(0,Ke.createElement)(o,{...nt.useBlockProps.save({className:r})},(0,Ke.createElement)(nt.RichText.Content,{value:n}))}},Nu=()=>Xe({name:Su,metadata:Cu,settings:Bu}),Tu=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})),Iu=e=>e.preventDefault();const Pu={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/home-link",category:"design",parent:["core/navigation"],title:"Home Link",description:"Create a link that always points to the homepage of the site. Usually not necessary if there is already a site title link present in the header.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","fontSize","customFontSize","style"],supports:{reusable:!1,html:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-home-link-editor",style:"wp-block-home-link"},{name:Mu}=Pu,zu={icon:Tu,edit:function({attributes:e,setAttributes:t,context:n}){const{homeUrl:a}=(0,gt.useSelect)((e=>{const{getUnstableBase:t}=e(dt.store);return{homeUrl:t()?.home}}),[]),{__unstableMarkNextChangeAsNotPersistent:o}=(0,gt.useDispatch)(nt.store),{textColor:r,backgroundColor:l,style:i}=n,s=(0,nt.useBlockProps)({className:ut()("wp-block-navigation-item",{"has-text-color":!!r||!!i?.color?.text,[`has-${r}-color`]:!!r,"has-background":!!l||!!i?.color?.background,[`has-${l}-background-color`]:!!l}),style:{color:i?.color?.text,backgroundColor:i?.color?.background}}),{label:c}=e;return(0,_t.useEffect)((()=>{void 0===c&&(o(),t({label:(0,tt.__)("Home")}))}),[c]),(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("div",{...s},(0,Ke.createElement)("a",{className:"wp-block-home-link__content wp-block-navigation-item__content",href:a,onClick:Iu},(0,Ke.createElement)(nt.RichText,{identifier:"label",className:"wp-block-home-link__label",value:c,onChange:e=>{t({label:e})},"aria-label":(0,tt.__)("Home link text"),placeholder:(0,tt.__)("Add home link"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))))},save:function(){return(0,Ke.createElement)(nt.InnerBlocks.Content,null)},example:{attributes:{label:(0,tt._x)("Home Link","block example")}}},Ru=()=>Xe({name:Mu,metadata:Pu,settings:zu}),Au=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M4.8 11.4H2.1V9H1v6h1.1v-2.6h2.7V15h1.1V9H4.8v2.4zm1.9-1.3h1.7V15h1.1v-4.9h1.7V9H6.7v1.1zM16.2 9l-1.5 2.7L13.3 9h-.9l-.8 6h1.1l.5-4 1.5 2.8 1.5-2.8.5 4h1.1L17 9h-.8zm3.8 5V9h-1.1v6h3.6v-1H20z"})),Hu="\n\thtml,body,:root {\n\t\tmargin: 0 !important;\n\t\tpadding: 0 !important;\n\t\toverflow: visible !important;\n\t\tmin-height: auto !important;\n\t}\n";function Lu({content:e,isSelected:t}){const n=(0,gt.useSelect)((e=>e(nt.store).getSettings().styles)),a=(0,_t.useMemo)((()=>[Hu,...(0,nt.transformStyles)(n.filter((e=>e.css)))]),[n]);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.SandBox,{html:e,styles:a,title:(0,tt.__)("Custom HTML Preview"),tabIndex:-1}),!t&&(0,Ke.createElement)("div",{className:"block-library-html__preview-overlay"}))}const Du={from:[{type:"block",blocks:["core/code"],transform:({content:e})=>(0,Qe.createBlock)("core/html",{content:(0,Rn.create)({html:e}).text})}]},Fu=Du,Vu={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/html",title:"Custom HTML",category:"widgets",description:"Add custom HTML code and preview it as you edit.",keywords:["embed"],textdomain:"default",attributes:{content:{type:"string",source:"raw"}},supports:{customClassName:!1,className:!1,html:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-html-editor"},{name:$u}=Vu,Ou={icon:Au,example:{attributes:{content:"<marquee>"+(0,tt.__)("Welcome to the wonderful world of blocks…")+"</marquee>"}},edit:function e({attributes:t,setAttributes:n,isSelected:a}){const[o,r]=(0,_t.useState)(),l=(0,_t.useContext)(et.Disabled.Context),i=(0,jt.useInstanceId)(e,"html-edit-desc"),s=(0,nt.useBlockProps)({className:"block-library-html__edit","aria-describedby":o?i:void 0});return(0,Ke.createElement)("div",{...s},(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.ToolbarButton,{className:"components-tab-button",isPressed:!o,onClick:function(){r(!1)}},"HTML"),(0,Ke.createElement)(et.ToolbarButton,{className:"components-tab-button",isPressed:o,onClick:function(){r(!0)}},(0,tt.__)("Preview")))),o||l?(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Lu,{content:t.content,isSelected:a}),(0,Ke.createElement)(et.VisuallyHidden,{id:i},(0,tt.__)("HTML preview is not yet fully accessible. Please switch screen reader to virtualized mode to navigate the below iFrame."))):(0,Ke.createElement)(nt.PlainText,{value:t.content,onChange:e=>n({content:e}),placeholder:(0,tt.__)("Write HTML…"),"aria-label":(0,tt.__)("HTML")}))},save:function({attributes:e}){return(0,Ke.createElement)(_t.RawHTML,null,e.content)},transforms:Fu},Gu=()=>Xe({name:$u,metadata:Vu,settings:Ou}),Uu={attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"array",source:"children",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"}},save({attributes:e}){const{url:t,alt:n,caption:a,align:o,href:r,width:l,height:i}=e,s=l||i?{width:l,height:i}:{},c=(0,Ke.createElement)("img",{src:t,alt:n,...s});let m={};return l?m={width:l}:"left"!==o&&"right"!==o||(m={maxWidth:"50%"}),(0,Ke.createElement)("figure",{className:o?`align${o}`:null,style:m},r?(0,Ke.createElement)("a",{href:r},c):c,!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:a}))}},qu={attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"array",source:"children",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"}},save({attributes:e}){const{url:t,alt:n,caption:a,align:o,href:r,width:l,height:i,id:s}=e,c=(0,Ke.createElement)("img",{src:t,alt:n,className:s?`wp-image-${s}`:null,width:l,height:i});return(0,Ke.createElement)("figure",{className:o?`align${o}`:null},r?(0,Ke.createElement)("a",{href:r},c):c,!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:a}))}},ju={attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"array",source:"children",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"},linkDestination:{type:"string",default:"none"}},save({attributes:e}){const{url:t,alt:n,caption:a,align:o,href:r,width:l,height:i,id:s}=e,c=ut()({[`align${o}`]:o,"is-resized":l||i}),m=(0,Ke.createElement)("img",{src:t,alt:n,className:s?`wp-image-${s}`:null,width:l,height:i});return(0,Ke.createElement)("figure",{className:c},r?(0,Ke.createElement)("a",{href:r},m):m,!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:a}))}},Wu={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},title:{type:"string",source:"attribute",selector:"img",attribute:"title"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0},save({attributes:e}){const{url:t,alt:n,caption:a,align:o,href:r,rel:l,linkClass:i,width:s,height:c,id:m,linkTarget:u,sizeSlug:p,title:d}=e,g=l||void 0,h=ut()({[`align${o}`]:o,[`size-${p}`]:p,"is-resized":s||c}),b=(0,Ke.createElement)("img",{src:t,alt:n,className:m?`wp-image-${m}`:null,width:s,height:c,title:d}),_=(0,Ke.createElement)(Ke.Fragment,null,r?(0,Ke.createElement)("a",{className:i,href:r,target:u,rel:g},b):b,!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:a}));return"left"===o||"right"===o||"center"===o?(0,Ke.createElement)("div",{...nt.useBlockProps.save()},(0,Ke.createElement)("figure",{className:h},_)):(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:h})},_)}},Zu={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},title:{type:"string",source:"attribute",selector:"img",attribute:"title"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{__experimentalDuotone:"img",text:!1,background:!1},__experimentalBorder:{radius:!0,__experimentalDefaultControls:{radius:!0}},__experimentalStyle:{spacing:{margin:"0 0 1em 0"}}},save({attributes:e}){const{url:t,alt:n,caption:a,align:o,href:r,rel:l,linkClass:i,width:s,height:c,id:m,linkTarget:u,sizeSlug:p,title:d}=e,g=l||void 0,h=ut()({[`align${o}`]:o,[`size-${p}`]:p,"is-resized":s||c}),b=(0,Ke.createElement)("img",{src:t,alt:n,className:m?`wp-image-${m}`:null,width:s,height:c,title:d}),_=(0,Ke.createElement)(Ke.Fragment,null,r?(0,Ke.createElement)("a",{className:i,href:r,target:u,rel:g},b):b,!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:a}));return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:h})},_)}},Qu={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",__experimentalRole:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},title:{type:"string",source:"attribute",selector:"img",attribute:"title",__experimentalRole:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",__experimentalRole:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",__experimentalRole:"content"},width:{type:"number"},height:{type:"number"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}}},migrate(e){const{height:t,width:n}=e;return{...e,width:"number"==typeof n?`${n}px`:n,height:"number"==typeof t?`${t}px`:t}},save({attributes:e}){const{url:t,alt:n,caption:a,align:o,href:r,rel:l,linkClass:i,width:s,height:c,aspectRatio:m,scale:u,id:p,linkTarget:d,sizeSlug:g,title:h}=e,b=l||void 0,_=(0,nt.__experimentalGetBorderClassesAndStyles)(e),y=ut()({[`align${o}`]:o,[`size-${g}`]:g,"is-resized":s||c,"has-custom-border":!!_.className||_.style&&Object.keys(_.style).length>0}),v=ut()(_.className,{[`wp-image-${p}`]:!!p}),f=(0,Ke.createElement)("img",{src:t,alt:n,className:v||void 0,style:{..._.style,aspectRatio:m,objectFit:u},width:s,height:c,title:h}),k=(0,Ke.createElement)(Ke.Fragment,null,r?(0,Ke.createElement)("a",{className:i,href:r,target:d,rel:b},f):f,!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{className:(0,nt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:a}));return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:y})},k)}},Ku={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",__experimentalRole:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},title:{type:"string",source:"attribute",selector:"img",attribute:"title",__experimentalRole:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",__experimentalRole:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",__experimentalRole:"content"},width:{type:"number"},height:{type:"number"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}}},migrate:({width:e,height:t,...n})=>({...n,width:`${e}px`,height:`${t}px`}),save({attributes:e}){const{url:t,alt:n,caption:a,align:o,href:r,rel:l,linkClass:i,width:s,height:c,aspectRatio:m,scale:u,id:p,linkTarget:d,sizeSlug:g,title:h}=e,b=l||void 0,_=(0,nt.__experimentalGetBorderClassesAndStyles)(e),y=ut()({[`align${o}`]:o,[`size-${g}`]:g,"is-resized":s||c,"has-custom-border":!!_.className||_.style&&Object.keys(_.style).length>0}),v=ut()(_.className,{[`wp-image-${p}`]:!!p}),f=(0,Ke.createElement)("img",{src:t,alt:n,className:v||void 0,style:{..._.style,aspectRatio:m,objectFit:u,width:s,height:c},width:s,height:c,title:h}),k=(0,Ke.createElement)(Ke.Fragment,null,r?(0,Ke.createElement)("a",{className:i,href:r,target:d,rel:b},f):f,!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{className:(0,nt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:a}));return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:y})},k)}},Yu={attributes:{align:{type:"string"},behaviors:{type:"object"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",__experimentalRole:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},title:{type:"string",source:"attribute",selector:"img",attribute:"title",__experimentalRole:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",__experimentalRole:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",__experimentalRole:"content"},width:{type:"string"},height:{type:"string"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}}},migrate({width:e,height:t,...n}){if(!n.behaviors?.lightbox)return n;const{behaviors:{lightbox:{enabled:a}}}=n,o={...n,lightbox:{enabled:a}};return delete o.behaviors,o},isEligible:e=>!!e.behaviors,save({attributes:e}){const{url:t,alt:n,caption:a,align:o,href:r,rel:l,linkClass:i,width:s,height:c,aspectRatio:m,scale:u,id:p,linkTarget:d,sizeSlug:g,title:h}=e,b=l||void 0,_=(0,nt.__experimentalGetBorderClassesAndStyles)(e),y=ut()({[`align${o}`]:o,[`size-${g}`]:g,"is-resized":s||c,"has-custom-border":!!_.className||_.style&&Object.keys(_.style).length>0}),v=ut()(_.className,{[`wp-image-${p}`]:!!p}),f=(0,Ke.createElement)("img",{src:t,alt:n,className:v||void 0,style:{..._.style,aspectRatio:m,objectFit:u,width:s,height:c},title:h}),k=(0,Ke.createElement)(Ke.Fragment,null,r?(0,Ke.createElement)("a",{className:i,href:r,target:d,rel:b},f):f,!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{className:(0,nt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:a}));return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:y})},k)}},Ju=[Yu,Ku,Qu,Zu,Wu,ju,qu,Uu],Xu=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"})),ep=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M18 20v-2h2v-1.5H7.75a.25.25 0 0 1-.25-.25V4H6v2H4v1.5h2v8.75c0 .966.784 1.75 1.75 1.75h8.75v2H18ZM9.273 7.5h6.977a.25.25 0 0 1 .25.25v6.977H18V7.75A1.75 1.75 0 0 0 16.25 6H9.273v1.5Z"})),tp=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z"})),np=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));function ap(e,t){const[n,a]=(0,_t.useState)();function o(){a(e.current?.clientWidth)}return(0,_t.useEffect)(o,t),(0,_t.useEffect)((()=>{const{defaultView:t}=e.current.ownerDocument;return t.addEventListener("resize",o),()=>{t.removeEventListener("resize",o)}}),[]),n}const op={popoverProps:{placement:"left-start",offset:259}},{DimensionsTool:rp,ResolutionTool:lp}=Ft(nt.privateApis),ip=[{value:"cover",label:(0,tt._x)("Cover","Scale option for dimensions control"),help:(0,tt.__)("Image covers the space evenly.")},{value:"contain",label:(0,tt._x)("Contain","Scale option for dimensions control"),help:(0,tt.__)("Image is contained without distortion.")}],sp=({href:e,children:t})=>e?(0,Ke.createElement)("a",{href:e,onClick:e=>e.preventDefault(),"aria-disabled":!0,style:{pointerEvents:"none",cursor:"default",display:"inline"}},t):t;function cp({temporaryURL:e,attributes:t,setAttributes:n,isSingleSelected:a,insertBlocksAfter:o,onReplace:r,onSelectImage:l,onSelectURL:i,onUploadError:s,containerRef:c,context:m,clientId:u,blockEditingMode:p}){const{url:d="",alt:g,align:h,id:b,href:_,rel:y,linkClass:v,linkDestination:f,title:k,width:x,height:w,aspectRatio:E,scale:C,linkTarget:S,sizeSlug:B,lightbox:N,metadata:T}=t,I=x?parseInt(x,10):void 0,P=w?parseInt(w,10):void 0,M=(0,_t.useRef)(),{allowResize:z=!0}=m,{getBlock:R,getSettings:A}=(0,gt.useSelect)(nt.store),H=(0,gt.useSelect)((e=>b&&a?e(dt.store).getMedia(b,{context:"view"}):null),[b,a]),{canInsertCover:L,imageEditing:D,imageSizes:F,maxWidth:V}=(0,gt.useSelect)((e=>{const{getBlockRootClientId:t,canInsertBlockType:n}=e(nt.store),a=t(u),o=A();return{imageEditing:o.imageEditing,imageSizes:o.imageSizes,maxWidth:o.maxWidth,canInsertCover:n("core/cover",a)}}),[u]),{replaceBlocks:$,toggleSelection:O}=(0,gt.useDispatch)(nt.store),{createErrorNotice:G,createSuccessNotice:U}=(0,gt.useDispatch)(Pt.store),q=(0,jt.useViewportMatch)("medium"),j=["wide","full"].includes(h),[{loadedNaturalWidth:W,loadedNaturalHeight:Z},Q]=(0,_t.useState)({}),[K,Y]=(0,_t.useState)(!1),[J,X]=(0,_t.useState)(),ee=ap(c,[h]),te="default"===p,ne="contentOnly"===p,ae=z&&te&&!j&&q,oe=F.filter((({slug:e})=>H?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e})));(0,_t.useEffect)((()=>{mp(b,d)&&a&&A().mediaUpload?J||window.fetch(d.includes("?")?d:d+"?").then((e=>e.blob())).then((e=>X(e))).catch((()=>{})):X()}),[b,d,a,J]);const{naturalWidth:re,naturalHeight:le}=(0,_t.useMemo)((()=>({naturalWidth:M.current?.naturalWidth||W||void 0,naturalHeight:M.current?.naturalHeight||Z||void 0})),[W,Z,M.current?.complete]);function ie(e){n({title:e})}function se(e){n({alt:e})}(0,_t.useEffect)((()=>{a||Y(!1)}),[a]);const ce=b&&re&&le&&D,me=a&&ce&&!K;const ue=(0,et.__experimentalUseCustomUnits)({availableUnits:["px"]}),[pe]=(0,nt.useSettings)("lightbox"),de=!!N||!0===pe?.allowEditing,ge=!!N?.enabled||!N&&!!pe?.enabled,he=(0,Ke.createElement)(rp,{value:{width:x,height:w,scale:C,aspectRatio:E},onChange:({width:e,height:t,scale:a,aspectRatio:o})=>{n({width:!e&&t?"auto":e,height:t,scale:a,aspectRatio:o})},defaultScale:"cover",defaultAspectRatio:"auto",scaleOptions:ip,unitsOptions:ue}),be=()=>{n({alt:void 0,width:void 0,height:void 0,scale:void 0,aspectRatio:void 0,lightbox:void 0})},_e=(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.__experimentalToolsPanel,{label:(0,tt.__)("Settings"),resetAll:be,dropdownMenuProps:op},ae&&he)),{lockUrlControls:ye=!1,lockHrefControls:ve=!1,lockAltControls:fe=!1,lockAltControlsMessage:ke,lockTitleControls:xe=!1,lockTitleControlsMessage:we,lockCaption:Ee=!1}=(0,gt.useSelect)((e=>{if(!a)return{};const{getBlockBindingsSource:t}=Ft(e(Qe.store)),{getBlockParentsByBlockName:n}=Ft(e(nt.store)),{url:o,alt:r,title:l}=T?.bindings||{},i=n(u,"core/block").length>0,s=t(o?.source),c=t(r?.source),m=t(l?.source);return{lockUrlControls:!!o&&(!s||s?.lockAttributesEditing),lockHrefControls:i,lockCaption:i,lockAltControls:!!r&&(!c||c?.lockAttributesEditing),lockAltControlsMessage:c?.label?(0,tt.sprintf)((0,tt.__)("Connected to %s"),c.label):(0,tt.__)("Connected to dynamic data"),lockTitleControls:!!l&&(!m||m?.lockAttributesEditing),lockTitleControlsMessage:m?.label?(0,tt.sprintf)((0,tt.__)("Connected to %s"),m.label):(0,tt.__)("Connected to dynamic data")}}),[u,a,T?.bindings]),Ce=(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},a&&!K&&!ve&&!ye&&(0,Ke.createElement)(nt.__experimentalImageURLInputUI,{url:_||"",onChangeUrl:function(e){n(e)},linkDestination:f,mediaUrl:H&&H.source_url||d,mediaLink:H&&H.link,linkTarget:S,linkClass:v,rel:y,showLightboxSetting:de,lightboxEnabled:ge,onSetLightbox:function(e){n(e&&!pe?.enabled?{lightbox:{enabled:!0}}:!e&&pe?.enabled?{lightbox:{enabled:!1}}:{lightbox:void 0})}}),me&&(0,Ke.createElement)(et.ToolbarButton,{onClick:()=>Y(!0),icon:ep,label:(0,tt.__)("Crop")}),a&&L&&(0,Ke.createElement)(et.ToolbarButton,{icon:tp,label:(0,tt.__)("Add text over image"),onClick:function(){$(u,(0,Qe.switchToBlockType)(R(u),"core/cover"))}})),a&&!K&&!ye&&(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(nt.MediaReplaceFlow,{mediaId:b,mediaURL:d,allowedTypes:om,accept:"image/*",onSelect:l,onSelectURL:i,onError:s})),a&&J&&(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.ToolbarButton,{onClick:function(){const{mediaUpload:e}=A();e&&e({filesList:[J],onFileChange([e]){l(e),(0,It.isBlobURL)(e.url)||(X(),U((0,tt.__)("Image uploaded."),{type:"snackbar"}))},allowedTypes:om,onError(e){G(e,{type:"snackbar"})}})},icon:np,label:(0,tt.__)("Upload to Media Library")}))),ne&&(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(et.Dropdown,{popoverProps:{position:"bottom right"},renderToggle:({isOpen:e,onToggle:t})=>(0,Ke.createElement)(et.ToolbarButton,{onClick:t,"aria-haspopup":"true","aria-expanded":e,onKeyDown:n=>{e||n.keyCode!==fn.DOWN||(n.preventDefault(),t())}},(0,tt._x)("Alt","Alternative text for an image. Block toolbar label, a low character count is preferred.")),renderContent:()=>(0,Ke.createElement)(et.TextareaControl,{className:"wp-block-image__toolbar_content_textarea",label:(0,tt.__)("Alternative text"),value:g||"",onChange:se,disabled:fe,help:fe?(0,Ke.createElement)(Ke.Fragment,null,ke):(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,tt.__)("Describe the purpose of the image.")),(0,Ke.createElement)("br",null),(0,tt.__)("Leave empty if decorative.")),__nextHasNoMarginBottom:!0})}),(0,Ke.createElement)(et.Dropdown,{popoverProps:{position:"bottom right"},renderToggle:({isOpen:e,onToggle:t})=>(0,Ke.createElement)(et.ToolbarButton,{onClick:t,"aria-haspopup":"true","aria-expanded":e,onKeyDown:n=>{e||n.keyCode!==fn.DOWN||(n.preventDefault(),t())}},(0,tt.__)("Title")),renderContent:()=>(0,Ke.createElement)(et.TextControl,{className:"wp-block-image__toolbar_content_textarea",__nextHasNoMarginBottom:!0,label:(0,tt.__)("Title attribute"),value:k||"",onChange:ie,disabled:xe,help:xe?(0,Ke.createElement)(Ke.Fragment,null,we):(0,Ke.createElement)(Ke.Fragment,null,(0,tt.__)("Describe the role of this image on the page."),(0,Ke.createElement)(et.ExternalLink,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute"},(0,tt.__)("(Note: many devices and browsers do not display this text.)")))})})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.__experimentalToolsPanel,{label:(0,tt.__)("Settings"),resetAll:be,dropdownMenuProps:op},a&&(0,Ke.createElement)(et.__experimentalToolsPanelItem,{label:(0,tt.__)("Alternative text"),isShownByDefault:!0,hasValue:()=>!!g,onDeselect:()=>n({alt:void 0})},(0,Ke.createElement)(et.TextareaControl,{label:(0,tt.__)("Alternative text"),value:g||"",onChange:se,readOnly:fe,help:fe?(0,Ke.createElement)(Ke.Fragment,null,ke):(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,tt.__)("Describe the purpose of the image.")),(0,Ke.createElement)("br",null),(0,tt.__)("Leave empty if decorative.")),__nextHasNoMarginBottom:!0})),ae&&he,!!oe.length&&(0,Ke.createElement)(lp,{value:B,onChange:function(e){const t=H?.media_details?.sizes?.[e]?.source_url;if(!t)return null;n({url:t,sizeSlug:e})},options:oe}))),(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Title attribute"),value:k||"",onChange:ie,readOnly:xe,help:xe?(0,Ke.createElement)(Ke.Fragment,null,we):(0,Ke.createElement)(Ke.Fragment,null,(0,tt.__)("Describe the role of this image on the page."),(0,Ke.createElement)(et.ExternalLink,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute"},(0,tt.__)("(Note: many devices and browsers do not display this text.)")))}))),Se=(0,pt.getFilename)(d);let Be;Be=g||(Se?(0,tt.sprintf)((0,tt.__)("This image has an empty alt attribute; its file name is %s"),Se):(0,tt.__)("This image has an empty alt attribute"));const Ne=(0,nt.__experimentalUseBorderProps)(t),Te=(0,nt.__experimentalGetShadowClassesAndStyles)(t),Ie=t.className?.includes("is-style-rounded");let Pe=(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("img",{src:e||d,alt:Be,onError:()=>function(){const e=Ot({attributes:{url:d}});void 0!==e&&r(e)}(),onLoad:e=>{Q({loadedNaturalWidth:e.target?.naturalWidth,loadedNaturalHeight:e.target?.naturalHeight})},ref:M,className:Ne.className,style:{width:x&&w||E?"100%":void 0,height:x&&w||E?"100%":void 0,objectFit:C,...Ne.style,...Te.style}}),e&&(0,Ke.createElement)(et.Spinner,null));const Me=M.current?.width||ee;if(ce&&K)Pe=(0,Ke.createElement)(sp,{href:_},(0,Ke.createElement)(nt.__experimentalImageEditor,{id:b,url:d,width:I,height:P,clientWidth:Me,naturalHeight:le,naturalWidth:re,onSaveImage:e=>n(e),onFinishEditing:()=>{Y(!1)},borderProps:Ie?void 0:Ne}));else if(ae){const e=E&&function(e){const[t,n=1]=e.split("/").map(Number),a=t/n;return a===1/0||0===a?NaN:a}(E),t=re/le,o=e||I/P||t||1,r=!I&&P?P*o:I,l=!P&&I?I/o:P,i=re<le?Jc:Jc*o,s=le<re?Jc:Jc/o,c=2.5*V;let m=!1,u=!1;"center"===h?(m=!0,u=!0):(0,tt.isRTL)()?"left"===h?m=!0:u=!0:"right"===h?u=!0:m=!0,Pe=(0,Ke.createElement)(et.ResizableBox,{style:{display:"block",objectFit:C,aspectRatio:x||w||!E?void 0:E},size:{width:null!=r?r:"auto",height:null!=l?l:"auto"},showHandle:a,minWidth:i,maxWidth:c,minHeight:s,maxHeight:c/o,lockAspectRatio:o,enable:{top:!1,right:m,bottom:!0,left:u},onResizeStart:function(){O(!1)},onResizeStop:(e,a,r)=>{O(!0),n({width:`${r.offsetWidth}px`,height:"auto",aspectRatio:o===t?void 0:String(o)})},resizeRatio:"center"===h?2:1},(0,Ke.createElement)(sp,{href:_},Pe))}else Pe=(0,Ke.createElement)("div",{style:{width:x,height:w,aspectRatio:E}},(0,Ke.createElement)(sp,{href:_},Pe));return d||e?(0,Ke.createElement)(Ke.Fragment,null,!e&&Ce,Pe,(0,Ke.createElement)(Qt,{attributes:t,setAttributes:n,isSelected:a,insertBlocksAfter:o,label:(0,tt.__)("Image caption text"),showToolbarButton:a&&te,disableEditing:Ee})):T?.bindings?Ce:_e}const mp=(e,t)=>t&&!e&&!(0,It.isBlobURL)(t);function up(e,t){var n,a;return"url"in(null!==(n=e?.sizes?.[t])&&void 0!==n?n:{})||"source_url"in(null!==(a=e?.media_details?.sizes?.[t])&&void 0!==a?a:{})}const pp=function({attributes:e,setAttributes:t,isSelected:n,className:a,insertBlocksAfter:o,onReplace:r,context:l,clientId:i}){const{url:s="",alt:c,caption:m,id:u,width:p,height:d,sizeSlug:g,aspectRatio:h,scale:b,align:_,metadata:y}=e,[v,f]=(0,_t.useState)(),k=(0,_t.useRef)();(0,_t.useEffect)((()=>{k.current=c}),[c]);const x=(0,_t.useRef)();(0,_t.useEffect)((()=>{x.current=m}),[m]);const{__unstableMarkNextChangeAsNotPersistent:w}=(0,gt.useDispatch)(nt.store);(0,_t.useEffect)((()=>{["wide","full"].includes(_)&&(w(),t({width:void 0,height:void 0,aspectRatio:void 0,scale:void 0}))}),[_]);const E=(0,_t.useRef)(),{getSettings:C}=(0,gt.useSelect)(nt.store),S=(0,nt.useBlockEditingMode)(),{createErrorNotice:B}=(0,gt.useDispatch)(Pt.store);function N(e){B(e,{type:"snackbar"}),t({src:void 0,id:void 0,url:void 0}),f(void 0)}function T(n){if(!n||!n.url)return void t({url:void 0,alt:void 0,id:void 0,title:void 0,caption:void 0});if((0,It.isBlobURL)(n.url))return void f(n.url);f();const{imageDefaultSize:a}=C();let o="full";g&&up(n,g)?o=g:up(n,a)&&(o=a);let r,l=((e,t)=>{const n=Object.fromEntries(Object.entries(null!=e?e:{}).filter((([e])=>["alt","id","link","caption"].includes(e))));return n.url=e?.sizes?.[t]?.url||e?.media_details?.sizes?.[t]?.source_url||e.url,n})(n,o);if(x.current&&!l.caption){const{caption:e,...t}=l;l=t}r=n.id&&n.id===u?{url:s}:{sizeSlug:o};let i,c=e.linkDestination;if(!c)switch(window?.wp?.media?.view?.settings?.defaultProps?.link||Xc){case"file":case em:c=em;break;case"post":case tm:c=tm;break;case nm:c=nm;break;case Xc:c=Xc}switch(c){case em:i=n.url;break;case tm:i=n.link}l.href=i,t({...l,...r,linkDestination:c})}function I(e){e!==s&&t({url:e,id:void 0,sizeSlug:C().imageDefaultSize})}let P=((e,t)=>!e&&(0,It.isBlobURL)(t))(u,s);(0,_t.useEffect)((()=>{if(!P)return;const e=(0,It.getBlobByURL)(s);if(e){const{mediaUpload:t}=C();if(!t)return;t({filesList:[e],onFileChange:([e])=>{T(e)},allowedTypes:om,onError:e=>{P=!1,N(e)}})}}),[]),(0,_t.useEffect)((()=>{P?f(s):(0,It.revokeBlobURL)(v)}),[P,s]);const M=mp(u,s)?s:void 0,z=!!s&&(0,Ke.createElement)("img",{alt:(0,tt.__)("Edit image"),title:(0,tt.__)("Edit image"),className:"edit-image-preview",src:s}),R=(0,nt.__experimentalUseBorderProps)(e),A=(0,nt.__experimentalGetShadowClassesAndStyles)(e),H=ut()(a,{"is-transient":v,"is-resized":!!p||!!d,[`size-${g}`]:g,"has-custom-border":!!R.className||R.style&&Object.keys(R.style).length>0}),L=(0,nt.useBlockProps)({ref:E,className:H}),{lockUrlControls:D=!1,lockUrlControlsMessage:F}=(0,gt.useSelect)((e=>{if(!n)return{};const t=Ft(e(Qe.store)).getBlockBindingsSource(y?.bindings?.url?.source);return{lockUrlControls:!!y?.bindings?.url&&(!t||t?.lockAttributesEditing),lockUrlControlsMessage:t?.label?(0,tt.sprintf)((0,tt.__)("Connected to %s"),t.label):(0,tt.__)("Connected to dynamic data")}}),[n]);return(0,Ke.createElement)("figure",{...L},(0,Ke.createElement)(cp,{temporaryURL:v,attributes:e,setAttributes:t,isSingleSelected:n,insertBlocksAfter:o,onReplace:r,onSelectImage:T,onSelectURL:I,onUploadError:N,containerRef:E,context:l,clientId:i,blockEditingMode:S}),(0,Ke.createElement)(nt.MediaPlaceholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:fm}),onSelect:T,onSelectURL:I,onError:N,placeholder:e=>(0,Ke.createElement)(et.Placeholder,{className:ut()("block-editor-media-placeholder",{[R.className]:!!R.className&&!n}),withIllustration:!0,icon:D?Xu:fm,label:(0,tt.__)("Image"),instructions:!D&&(0,tt.__)("Upload an image file, pick one from your media library, or add one with a URL."),style:{aspectRatio:p&&d||!h?void 0:h,width:d&&h?"100%":p,height:p&&h?"100%":d,objectFit:b,...R.style,...A.style}},D?(0,Ke.createElement)("span",{className:"block-bindings-media-placeholder-message"},F):e),accept:"image/*",allowedTypes:om,value:{id:u,src:M},mediaPreview:z,disableMediaButtons:v||s}))};function dp(e,t){const{body:n}=document.implementation.createHTMLDocument("");n.innerHTML=e;const{firstElementChild:a}=n;if(a&&"A"===a.nodeName)return a.getAttribute(t)||void 0}const gp={img:{attributes:["src","alt","title"],classes:["alignleft","aligncenter","alignright","alignnone",/^wp-image-\d+$/]}},hp={from:[{type:"raw",isMatch:e=>"FIGURE"===e.nodeName&&!!e.querySelector("img"),schema:({phrasingContentSchema:e})=>({figure:{require:["img"],children:{...gp,a:{attributes:["href","rel","target"],children:gp},figcaption:{children:e}}}}),transform:e=>{const t=e.className+" "+e.querySelector("img").className,n=/(?:^|\s)align(left|center|right)(?:$|\s)/.exec(t),a=""===e.id?void 0:e.id,o=n?n[1]:void 0,r=/(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(t),l=r?Number(r[1]):void 0,i=e.querySelector("a"),s=i&&i.href?"custom":void 0,c=i&&i.href?i.href:void 0,m=i&&i.rel?i.rel:void 0,u=i&&i.className?i.className:void 0,p=(0,Qe.getBlockAttributes)("core/image",e.outerHTML,{align:o,id:l,linkDestination:s,href:c,rel:m,linkClass:u,anchor:a});return(0,Qe.createBlock)("core/image",p)}},{type:"files",isMatch(e){if(e.some((e=>0===e.type.indexOf("image/")))&&e.some((e=>0!==e.type.indexOf("image/")))){const{createErrorNotice:e}=(0,gt.dispatch)(Pt.store);e((0,tt.__)("If uploading to a gallery all files need to be image formats"),{id:"gallery-transform-invalid-file",type:"snackbar"})}return e.every((e=>0===e.type.indexOf("image/")))},transform(e){const t=e.map((e=>(0,Qe.createBlock)("core/image",{url:(0,It.createBlobURL)(e)})));return t}},{type:"shortcode",tag:"caption",attributes:{url:{type:"string",source:"attribute",attribute:"src",selector:"img"},alt:{type:"string",source:"attribute",attribute:"alt",selector:"img"},caption:{shortcode:function(e,{shortcode:t}){const{body:n}=document.implementation.createHTMLDocument("");n.innerHTML=t.content;let a=n.querySelector("img");for(;a&&a.parentNode&&a.parentNode!==n;)a=a.parentNode;return a&&a.parentNode.removeChild(a),n.innerHTML.trim()}},href:{shortcode:(e,{shortcode:t})=>dp(t.content,"href")},rel:{shortcode:(e,{shortcode:t})=>dp(t.content,"rel")},linkClass:{shortcode:(e,{shortcode:t})=>dp(t.content,"class")},id:{type:"number",shortcode:({named:{id:e}})=>{if(e)return parseInt(e.replace("attachment_",""),10)}},align:{type:"string",shortcode:({named:{align:e="alignnone"}})=>e.replace("align","")}}}]},bp=hp,_p={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/image",title:"Image",category:"media",usesContext:["allowResize","imageCrop","fixedHeight"],description:"Insert an image to make a visual statement.",keywords:["img","photo","picture"],textdomain:"default",attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src",__experimentalRole:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",__experimentalRole:"content"},caption:{type:"rich-text",source:"rich-text",selector:"figcaption",__experimentalRole:"content"},lightbox:{type:"object",enabled:{type:"boolean"}},title:{type:"string",source:"attribute",selector:"img",attribute:"title",__experimentalRole:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",__experimentalRole:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",__experimentalRole:"content"},width:{type:"string"},height:{type:"string"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{interactivity:!0,align:["left","center","right","wide","full"],anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}},shadow:{__experimentalSkipSerialization:!0}},selectors:{border:".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder",shadow:".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder",filter:{duotone:".wp-block-image img, .wp-block-image .components-placeholder"}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"rounded",label:"Rounded"}],editorStyle:"wp-block-image-editor",style:"wp-block-image"},{name:yp}=_p,vp={icon:fm,example:{attributes:{sizeSlug:"large",url:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",caption:(0,tt.__)("Mont Blanc appears—still, snowy, and serene.")}},__experimentalLabel(e,{context:t}){const n=e?.metadata?.name;if("list-view"===t&&n)return n;if("accessibility"===t){const{caption:t,alt:n,url:a}=e;return a?n?n+(t?". "+t:""):t||"":(0,tt.__)("Empty")}},getEditWrapperProps:e=>({"data-align":e.align}),transforms:bp,edit:pp,save:function({attributes:e}){const{url:t,alt:n,caption:a,align:o,href:r,rel:l,linkClass:i,width:s,height:c,aspectRatio:m,scale:u,id:p,linkTarget:d,sizeSlug:g,title:h}=e,b=l||void 0,_=(0,nt.__experimentalGetBorderClassesAndStyles)(e),y=(0,nt.__experimentalGetShadowClassesAndStyles)(e),v=ut()({alignnone:"none"===o,[`size-${g}`]:g,"is-resized":s||c,"has-custom-border":!!_.className||_.style&&Object.keys(_.style).length>0}),f=ut()(_.className,{[`wp-image-${p}`]:!!p}),k=(0,Ke.createElement)("img",{src:t,alt:n,className:f||void 0,style:{..._.style,...y.style,aspectRatio:m,objectFit:u,width:s,height:c},title:h}),x=(0,Ke.createElement)(Ke.Fragment,null,r?(0,Ke.createElement)("a",{className:i,href:r,target:d,rel:b},k):k,!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{className:(0,nt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:a}));return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:v})},x)},deprecated:Ju},fp=()=>Xe({name:yp,metadata:_p,settings:vp}),kp=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"}));const xp={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/latest-comments",title:"Latest Comments",category:"widgets",description:"Display a list of your most recent comments.",keywords:["recent comments"],textdomain:"default",attributes:{commentsToShow:{type:"number",default:5,minimum:1,maximum:100},displayAvatar:{type:"boolean",default:!0},displayDate:{type:"boolean",default:!0},displayExcerpt:{type:"boolean",default:!0}},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}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-latest-comments-editor",style:"wp-block-latest-comments"},{name:wp}=xp,Ep={icon:kp,example:{},edit:function({attributes:e,setAttributes:t}){const{commentsToShow:n,displayAvatar:a,displayDate:o,displayExcerpt:r}=e,l={...e,style:{...e?.style,spacing:void 0}};return(0,Ke.createElement)("div",{...(0,nt.useBlockProps)()},(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display avatar"),checked:a,onChange:()=>t({displayAvatar:!a})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display date"),checked:o,onChange:()=>t({displayDate:!o})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display excerpt"),checked:r,onChange:()=>t({displayExcerpt:!r})}),(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Number of comments"),value:n,onChange:e=>t({commentsToShow:e}),min:1,max:100,required:!0}))),(0,Ke.createElement)(et.Disabled,null,(0,Ke.createElement)(ot(),{block:"core/latest-comments",attributes:l,urlQueryArgs:{_locale:"site"}})))}},Cp=()=>Xe({name:wp,metadata:xp,settings:Ep}),Sp=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"})),{attributes:Bp}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/latest-posts",title:"Latest Posts",category:"widgets",description:"Display a list of your most recent posts.",keywords:["recent posts"],textdomain:"default",attributes:{categories:{type:"array",items:{type:"object"}},selectedAuthor:{type:"number"},postsToShow:{type:"number",default:5},displayPostContent:{type:"boolean",default:!1},displayPostContentRadio:{type:"string",default:"excerpt"},excerptLength:{type:"number",default:55},displayAuthor:{type:"boolean",default:!1},displayPostDate:{type:"boolean",default:!1},postLayout:{type:"string",default:"list"},columns:{type:"number",default:3},order:{type:"string",default:"desc"},orderBy:{type:"string",default:"date"},displayFeaturedImage:{type:"boolean",default:!1},featuredImageAlign:{type:"string",enum:["left","center","right"]},featuredImageSizeSlug:{type:"string",default:"thumbnail"},featuredImageSizeWidth:{type:"number",default:null},featuredImageSizeHeight:{type:"number",default:null},addLinkToFeaturedImage:{type:"boolean",default:!1}},supports:{align:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},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}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-latest-posts-editor",style:"wp-block-latest-posts"},Np=[{attributes:{...Bp,categories:{type:"string"}},supports:{align:!0,html:!1},migrate:e=>({...e,categories:[{id:Number(e.categories)}]}),isEligible:({categories:e})=>e&&"string"==typeof e,save:()=>null}],Tp=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"})),Ip={per_page:-1,context:"view"},Pp={per_page:-1,has_published_posts:["post"],context:"view"};const Mp={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/latest-posts",title:"Latest Posts",category:"widgets",description:"Display a list of your most recent posts.",keywords:["recent posts"],textdomain:"default",attributes:{categories:{type:"array",items:{type:"object"}},selectedAuthor:{type:"number"},postsToShow:{type:"number",default:5},displayPostContent:{type:"boolean",default:!1},displayPostContentRadio:{type:"string",default:"excerpt"},excerptLength:{type:"number",default:55},displayAuthor:{type:"boolean",default:!1},displayPostDate:{type:"boolean",default:!1},postLayout:{type:"string",default:"list"},columns:{type:"number",default:3},order:{type:"string",default:"desc"},orderBy:{type:"string",default:"date"},displayFeaturedImage:{type:"boolean",default:!1},featuredImageAlign:{type:"string",enum:["left","center","right"]},featuredImageSizeSlug:{type:"string",default:"thumbnail"},featuredImageSizeWidth:{type:"number",default:null},featuredImageSizeHeight:{type:"number",default:null},addLinkToFeaturedImage:{type:"boolean",default:!1}},supports:{align:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},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}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-latest-posts-editor",style:"wp-block-latest-posts"},{name:zp}=Mp,Rp={icon:Sp,example:{},edit:function e({attributes:t,setAttributes:n}){var a;const o=(0,jt.useInstanceId)(e),{postsToShow:r,order:l,orderBy:i,categories:s,selectedAuthor:c,displayFeaturedImage:m,displayPostContentRadio:u,displayPostContent:p,displayPostDate:d,displayAuthor:g,postLayout:h,columns:b,excerptLength:_,featuredImageAlign:y,featuredImageSizeSlug:v,featuredImageSizeWidth:f,featuredImageSizeHeight:k,addLinkToFeaturedImage:x}=t,{imageSizes:w,latestPosts:E,defaultImageWidth:C,defaultImageHeight:S,categoriesList:B,authorList:N}=(0,gt.useSelect)((e=>{var t,n;const{getEntityRecords:a,getUsers:o}=e(dt.store),m=e(nt.store).getSettings(),u=s&&s.length>0?s.map((e=>e.id)):[],p=Object.fromEntries(Object.entries({categories:u,author:c,order:l,orderby:i,per_page:r,_embed:"wp:featuredmedia"}).filter((([,e])=>void 0!==e)));return{defaultImageWidth:null!==(t=m.imageDimensions?.[v]?.width)&&void 0!==t?t:0,defaultImageHeight:null!==(n=m.imageDimensions?.[v]?.height)&&void 0!==n?n:0,imageSizes:m.imageSizes,latestPosts:a("postType","post",p),categoriesList:a("taxonomy","category",Ip),authorList:o(Pp)}}),[v,r,l,i,s,c]),{createWarningNotice:T,removeNotice:I}=(0,gt.useDispatch)(Pt.store);let P;const M=e=>{e.preventDefault(),I(P),P=`block-library/core/latest-posts/redirection-prevented/${o}`,T((0,tt.__)("Links are disabled in the editor."),{id:P,type:"snackbar"})},z=w.filter((({slug:e})=>"full"!==e)).map((({name:e,slug:t})=>({value:t,label:e}))),R=null!==(a=B?.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==a?a:{},A=!!E?.length,H=(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Post content")},(0,Ke.createElement)(et.ToggleControl,{label:(0,tt.__)("Post content"),checked:p,onChange:e=>n({displayPostContent:e})}),p&&(0,Ke.createElement)(et.RadioControl,{label:(0,tt.__)("Show:"),selected:u,options:[{label:(0,tt.__)("Excerpt"),value:"excerpt"},{label:(0,tt.__)("Full post"),value:"full_post"}],onChange:e=>n({displayPostContentRadio:e})}),p&&"excerpt"===u&&(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Max number of words"),value:_,onChange:e=>n({excerptLength:e}),min:10,max:100})),(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Post meta")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display author name"),checked:g,onChange:e=>n({displayAuthor:e})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display post date"),checked:d,onChange:e=>n({displayPostDate:e})})),(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Featured image")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display featured image"),checked:m,onChange:e=>n({displayFeaturedImage:e})}),m&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.__experimentalImageSizeControl,{onChange:e=>{const t={};e.hasOwnProperty("width")&&(t.featuredImageSizeWidth=e.width),e.hasOwnProperty("height")&&(t.featuredImageSizeHeight=e.height),n(t)},slug:v,width:f,height:k,imageWidth:C,imageHeight:S,imageSizeOptions:z,imageSizeHelp:(0,tt.__)("Select the size of the source image."),onChangeImage:e=>n({featuredImageSizeSlug:e,featuredImageSizeWidth:void 0,featuredImageSizeHeight:void 0})}),(0,Ke.createElement)(et.BaseControl,{className:"editor-latest-posts-image-alignment-control"},(0,Ke.createElement)(et.BaseControl.VisualLabel,null,(0,tt.__)("Image alignment")),(0,Ke.createElement)(nt.BlockAlignmentToolbar,{value:y,onChange:e=>n({featuredImageAlign:e}),controls:["left","center","right"],isCollapsed:!1})),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Add link to featured image"),checked:x,onChange:e=>n({addLinkToFeaturedImage:e})}))),(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Sorting and filtering")},(0,Ke.createElement)(et.QueryControls,{order:l,orderBy:i,numberOfItems:r,onOrderChange:e=>n({order:e}),onOrderByChange:e=>n({orderBy:e}),onNumberOfItemsChange:e=>n({postsToShow:e}),categorySuggestions:R,onCategoryChange:e=>{if(e.some((e=>"string"==typeof e&&!R[e])))return;const t=e.map((e=>"string"==typeof e?R[e]:e));if(t.includes(null))return!1;n({categories:t})},selectedCategories:s,onAuthorChange:e=>n({selectedAuthor:""!==e?Number(e):void 0}),authorList:null!=N?N:[],selectedAuthorId:c}),"grid"===h&&(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Columns"),value:b,onChange:e=>n({columns:e}),min:2,max:A?Math.min(6,E.length):6,required:!0}))),L=(0,nt.useBlockProps)({className:ut()({"wp-block-latest-posts__list":!0,"is-grid":"grid"===h,"has-dates":d,"has-author":g,[`columns-${b}`]:"grid"===h})});if(!A)return(0,Ke.createElement)("div",{...L},H,(0,Ke.createElement)(et.Placeholder,{icon:Xn,label:(0,tt.__)("Latest Posts")},Array.isArray(E)?(0,tt.__)("No posts found."):(0,Ke.createElement)(et.Spinner,null)));const D=E.length>r?E.slice(0,r):E,F=[{icon:Tp,title:(0,tt.__)("List view"),onClick:()=>n({postLayout:"list"}),isActive:"list"===h},{icon:Xm,title:(0,tt.__)("Grid view"),onClick:()=>n({postLayout:"grid"}),isActive:"grid"===h}],V=(0,So.getSettings)().formats.date;return(0,Ke.createElement)("div",null,H,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,{controls:F})),(0,Ke.createElement)("ul",{...L},D.map((e=>{const t=e.title.rendered.trim();let n=e.excerpt.rendered;const a=N?.find((t=>t.id===e.author)),o=document.createElement("div");o.innerHTML=n,n=o.textContent||o.innerText||"";const{url:r,alt:l}=function(e,t){var n;const a=e._embedded?.["wp:featuredmedia"]?.[0];return{url:null!==(n=a?.media_details?.sizes?.[t]?.source_url)&&void 0!==n?n:a?.source_url,alt:a?.alt_text}}(e,v),i=ut()({"wp-block-latest-posts__featured-image":!0,[`align${y}`]:!!y}),s=m&&r,c=s&&(0,Ke.createElement)("img",{src:r,alt:l,style:{maxWidth:f,maxHeight:k}}),h=_<n.trim().split(" ").length&&""===e.excerpt.raw?(0,Ke.createElement)(Ke.Fragment,null,n.trim().split(" ",_).join(" "),(0,_t.createInterpolateElement)((0,tt.sprintf)((0,tt.__)("… <a>Read more<span>: %1$s</span></a>"),t||(0,tt.__)("(no title)")),{a:(0,Ke.createElement)("a",{className:"wp-block-latest-posts__read-more",href:e.link,rel:"noopener noreferrer",onClick:M}),span:(0,Ke.createElement)("span",{className:"screen-reader-text"})})):n;return(0,Ke.createElement)("li",{key:e.id},s&&(0,Ke.createElement)("div",{className:i},x?(0,Ke.createElement)("a",{className:"wp-block-latest-posts__post-title",href:e.link,rel:"noreferrer noopener",onClick:M},c):c),(0,Ke.createElement)("a",{href:e.link,rel:"noreferrer noopener",dangerouslySetInnerHTML:t?{__html:t}:void 0,onClick:M},t?null:(0,tt.__)("(no title)")),g&&a&&(0,Ke.createElement)("div",{className:"wp-block-latest-posts__post-author"},(0,tt.sprintf)((0,tt.__)("by %s"),a.name)),d&&e.date_gmt&&(0,Ke.createElement)("time",{dateTime:(0,So.format)("c",e.date_gmt),className:"wp-block-latest-posts__post-date"},(0,So.dateI18n)(V,e.date_gmt)),p&&"excerpt"===u&&(0,Ke.createElement)("div",{className:"wp-block-latest-posts__post-excerpt"},h),p&&"full_post"===u&&(0,Ke.createElement)("div",{className:"wp-block-latest-posts__post-full-content",dangerouslySetInnerHTML:{__html:e.content.raw.trim()}}))}))))},deprecated:Np},Ap=()=>Xe({name:zp,metadata:Mp,settings:Rp}),Hp={A:"upper-alpha",a:"lower-alpha",I:"upper-roman",i:"lower-roman"};function Lp(e){const{values:t,start:n,reversed:a,ordered:o,type:r,...l}=e,i=document.createElement(o?"ol":"ul");i.innerHTML=t,n&&i.setAttribute("start",n),a&&i.setAttribute("reversed",!0),r&&i.setAttribute("type",r);const[s]=(0,Qe.rawHandler)({HTML:i.outerHTML});return[{...l,...s.attributes},s.innerBlocks]}const Dp={attributes:{ordered:{type:"boolean",default:!1,__experimentalRole:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",__experimentalRole:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,__experimentalFontFamily:!0},color:{gradients:!0,link:!0},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},save({attributes:e}){const{ordered:t,values:n,type:a,reversed:o,start:r}=e,l=t?"ol":"ul";return(0,Ke.createElement)(l,{...nt.useBlockProps.save({type:a,reversed:o,start:r})},(0,Ke.createElement)(nt.RichText.Content,{value:n,multiline:"li"}))},migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},Fp={attributes:{ordered:{type:"boolean",default:!1,__experimentalRole:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",__experimentalRole:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,__experimentalFontFamily:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},save({attributes:e}){const{ordered:t,values:n,type:a,reversed:o,start:r}=e,l=t?"ol":"ul";return(0,Ke.createElement)(l,{...nt.useBlockProps.save({type:a,reversed:o,start:r})},(0,Ke.createElement)(nt.RichText.Content,{value:n,multiline:"li"}))},migrate:Lp},Vp={attributes:{ordered:{type:"boolean",default:!1,__experimentalRole:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",__experimentalRole:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},isEligible:({type:e})=>!!e,save({attributes:e}){const{ordered:t,type:n,reversed:a,start:o}=e,r=t?"ol":"ul";return(0,Ke.createElement)(r,{...nt.useBlockProps.save({type:n,reversed:a,start:o})},(0,Ke.createElement)(nt.InnerBlocks.Content,null))},migrate:function(e){const{type:t}=e;return t&&Hp[t]?{...e,type:Hp[t]}:e}},$p=[Vp,Fp,Dp],Op=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM15.4697 14.9697L18.4393 12L15.4697 9.03033L16.5303 7.96967L20.0303 11.4697L20.5607 12L20.0303 12.5303L16.5303 16.0303L15.4697 14.9697Z"})),Gp=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-4-4.6l-4 4 4 4 1-1-3-3 3-3-1-1z"})),Up=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})),qp=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),jp=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M3.8 15.8h8.9v-1.5H3.8v1.5zm0-7h8.9V7.2H3.8v1.6zm14.7-2.1V10h1V5.3l-2.2.7.3 1 .9-.3zm1.2 6.1c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5H20v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3 0-.8-.3-1.1z"})),Wp=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM5 6.7V10h1V5.3L3.8 6l.4 1 .8-.3zm-.4 5.7c-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-1c.3-.6.8-1.4.9-2.1.1-.3 0-.8-.2-1.1-.5-.6-1.3-.5-1.7-.4z"})),Zp=window.wp.deprecated;var Qp=n.n(Zp);const Kp=({setAttributes:e,reversed:t,start:n,type:a})=>(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Ordered list settings")},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Start value"),type:"number",onChange:t=>{const n=parseInt(t,10);e({start:isNaN(n)?void 0:n})},value:Number.isInteger(n)?n.toString(10):"",step:"1"}),(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Numbering style"),options:[{label:(0,tt.__)("Numbers"),value:"decimal"},{label:(0,tt.__)("Uppercase letters"),value:"upper-alpha"},{label:(0,tt.__)("Lowercase letters"),value:"lower-alpha"},{label:(0,tt.__)("Uppercase Roman numerals"),value:"upper-roman"},{label:(0,tt.__)("Lowercase Roman numerals"),value:"lower-roman"}],value:a,onChange:t=>e({type:t})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Reverse list numbering"),checked:t||!1,onChange:t=>{e({reversed:t||void 0})}})));const Yp=(0,_t.forwardRef)((function(e,t){const{ordered:n,...a}=e,o=n?"ol":"ul";return(0,Ke.createElement)(o,{ref:t,...a})})),Jp=[["core/list-item"]];function Xp({clientId:e}){const t=function(e){const{replaceBlocks:t,selectionChange:n}=(0,gt.useDispatch)(nt.store),{getBlockRootClientId:a,getBlockAttributes:o,getBlock:r}=(0,gt.useSelect)(nt.store);return(0,_t.useCallback)((()=>{const l=a(e),i=o(l),s=(0,Qe.createBlock)("core/list-item",i),{innerBlocks:c}=r(e);t([l],[s,...c]),n(c[c.length-1].clientId)}),[e])}(e),n=(0,gt.useSelect)((t=>{const{getBlockRootClientId:n,getBlockName:a}=t(nt.store);return"core/list-item"===a(n(e))}),[e]);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToolbarButton,{icon:(0,tt.isRTL)()?Op:Gp,title:(0,tt.__)("Outdent"),describedBy:(0,tt.__)("Outdent list item"),disabled:!n,onClick:t}))}function ed({phrasingContentSchema:e}){const t={...e,ul:{},ol:{attributes:["type","start","reversed"]}};return["ul","ol"].forEach((e=>{t[e].children={li:{children:t}}})),t}function td(e){return e.flatMap((({name:e,attributes:t,innerBlocks:n=[]})=>"core/list-item"===e?[t.content,...td(n)]:td(n)))}const nd={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph","core/heading"],transform:e=>{let t=[];if(e.length>1)t=e.map((({content:e})=>(0,Qe.createBlock)("core/list-item",{content:e})));else if(1===e.length){const n=(0,Rn.create)({html:e[0].content});t=(0,Rn.split)(n,"\n").map((e=>(0,Qe.createBlock)("core/list-item",{content:(0,Rn.toHTMLString)({value:e})})))}return(0,Qe.createBlock)("core/list",{anchor:e.anchor},t)}},{type:"raw",selector:"ol,ul",schema:e=>({ol:ed(e).ol,ul:ed(e).ul}),transform:function e(t){const n=t.getAttribute("type"),a={ordered:"OL"===t.tagName,anchor:""===t.id?void 0:t.id,start:t.getAttribute("start")?parseInt(t.getAttribute("start"),10):void 0,reversed:!!t.hasAttribute("reversed")||void 0,type:n&&Hp[n]?Hp[n]:void 0},o=Array.from(t.children).map((t=>{const n=Array.from(t.childNodes).filter((e=>e.nodeType!==e.TEXT_NODE||0!==e.textContent.trim().length));n.reverse();const[a,...o]=n;if(!("UL"===a?.tagName||"OL"===a?.tagName))return(0,Qe.createBlock)("core/list-item",{content:t.innerHTML});const r=o.map((e=>e.nodeType===e.TEXT_NODE?e.textContent:e.outerHTML));r.reverse();const l={content:r.join("").trim()},i=[e(a)];return(0,Qe.createBlock)("core/list-item",l,i)}));return(0,Qe.createBlock)("core/list",a,o)}},...["*","-"].map((e=>({type:"prefix",prefix:e,transform:e=>(0,Qe.createBlock)("core/list",{},[(0,Qe.createBlock)("core/list-item",{content:e})])}))),...["1.","1)"].map((e=>({type:"prefix",prefix:e,transform:e=>(0,Qe.createBlock)("core/list",{ordered:!0},[(0,Qe.createBlock)("core/list-item",{content:e})])})))],to:[...["core/paragraph","core/heading"].map((e=>({type:"block",blocks:[e],transform:(t,n)=>td(n).map((t=>(0,Qe.createBlock)(e,{content:t})))})))]},ad=nd,od={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/list",title:"List",category:"text",allowedBlocks:["core/list-item"],description:"Create a bulleted or numbered list.",keywords:["bullet list","ordered list","numbered list"],textdomain:"default",attributes:{ordered:{type:"boolean",default:!1,__experimentalRole:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",__experimentalRole:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalOnMerge:!0,__experimentalSlashInserter:!0,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-list-editor",style:"wp-block-list"},{name:rd}=od,ld={icon:Tp,example:{innerBlocks:[{name:"core/list-item",attributes:{content:(0,tt.__)("Alice.")}},{name:"core/list-item",attributes:{content:(0,tt.__)("The White Rabbit.")}},{name:"core/list-item",attributes:{content:(0,tt.__)("The Cheshire Cat.")}},{name:"core/list-item",attributes:{content:(0,tt.__)("The Mad Hatter.")}},{name:"core/list-item",attributes:{content:(0,tt.__)("The Queen of Hearts.")}}]},transforms:ad,edit:function({attributes:e,setAttributes:t,clientId:n,style:a}){const{ordered:o,type:r,reversed:l,start:i}=e,s=(0,nt.useBlockProps)({style:{..._t.Platform.isNative&&a,listStyleType:o&&"decimal"!==r?r:void 0}}),c=(0,nt.useInnerBlocksProps)(s,{template:Jp,templateLock:!1,templateInsertUpdatesSelection:!0,..._t.Platform.isNative&&{marginVertical:8,marginHorizontal:8,renderAppender:!1},__experimentalCaptureToolbars:!0});!function(e,t){const n=(0,gt.useRegistry)(),{updateBlockAttributes:a,replaceInnerBlocks:o}=(0,gt.useDispatch)(nt.store);(0,_t.useEffect)((()=>{if(!e.values)return;const[r,l]=Lp(e);Qp()("Value attribute on the list block",{since:"6.0",version:"6.5",alternative:"inner blocks"}),n.batch((()=>{a(t,r),o(t,l)}))}),[e.values])}(e,n);const m=(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(et.ToolbarButton,{icon:(0,tt.isRTL)()?Up:qp,title:(0,tt.__)("Unordered"),describedBy:(0,tt.__)("Convert to unordered list"),isActive:!1===o,onClick:()=>{t({ordered:!1})}}),(0,Ke.createElement)(et.ToolbarButton,{icon:(0,tt.isRTL)()?jp:Wp,title:(0,tt.__)("Ordered"),describedBy:(0,tt.__)("Convert to ordered list"),isActive:!0===o,onClick:()=>{t({ordered:!0})}}),(0,Ke.createElement)(Xp,{clientId:n}));return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Yp,{ordered:o,reversed:l,start:i,...c}),m,o&&(0,Ke.createElement)(Kp,{setAttributes:t,reversed:l,start:i,type:r}))},save:function({attributes:e}){const{ordered:t,type:n,reversed:a,start:o}=e,r=t?"ol":"ul";return(0,Ke.createElement)(r,{...nt.useBlockProps.save({reversed:a,start:o,style:{listStyleType:t&&"decimal"!==n?n:void 0}})},(0,Ke.createElement)(nt.InnerBlocks.Content,null))},deprecated:$p},id=()=>Xe({name:rd,metadata:od,settings:ld}),sd=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M12 11v1.5h8V11h-8zm-6-1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),cd=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM20.0303 9.03033L17.0607 12L20.0303 14.9697L18.9697 16.0303L15.4697 12.5303L14.9393 12L15.4697 11.4697L18.9697 7.96967L20.0303 9.03033Z"})),md=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-8-3.5l3 3-3 3 1 1 4-4-4-4-1 1z"}));function ud(e){const{replaceBlocks:t,selectionChange:n,multiSelect:a}=(0,gt.useDispatch)(nt.store),{getBlock:o,getPreviousBlockClientId:r,getSelectionStart:l,getSelectionEnd:i,hasMultiSelection:s,getMultiSelectedBlockClientIds:c}=(0,gt.useSelect)(nt.store);return(0,_t.useCallback)((()=>{const m=s(),u=m?c():[e],p=u.map((e=>(0,Qe.cloneBlock)(o(e)))),d=r(e),g=(0,Qe.cloneBlock)(o(d));g.innerBlocks?.length||(g.innerBlocks=[(0,Qe.createBlock)("core/list")]),g.innerBlocks[g.innerBlocks.length-1].innerBlocks.push(...p);const h=l(),b=i();t([d,...u],[g]),m?a(p[0].clientId,p[p.length-1].clientId):n(p[0].clientId,b.attributeKey,b.clientId===h.clientId?h.offset:b.offset,b.offset)}),[e])}function pd(){const e=(0,gt.useRegistry)(),{moveBlocksToPosition:t,removeBlock:n,insertBlock:a,updateBlockListSettings:o}=(0,gt.useDispatch)(nt.store),{getBlockRootClientId:r,getBlockName:l,getBlockOrder:i,getBlockIndex:s,getSelectedBlockClientIds:c,getBlock:m,getBlockListSettings:u}=(0,gt.useSelect)(nt.store);return(0,_t.useCallback)(((p=c())=>{if(Array.isArray(p)||(p=[p]),!p.length)return;const d=p[0];if("core/list-item"!==l(d))return;const g=function(e){const t=r(e),n=r(t);if(n&&"core/list-item"===l(n))return n}(d);if(!g)return;const h=r(d),b=p[p.length-1],_=i(h).slice(s(b)+1);e.batch((()=>{if(_.length){let e=i(d)[0];if(!e){const t=(0,Qe.cloneBlock)(m(h),{},[]);e=t.clientId,a(t,0,d,!1),o(e,u(h))}t(_,h,e)}if(t(p,h,r(g),s(g)+1),!i(h).length){n(h,!1)}}))}),[])}function dd(e,t){const n=(0,gt.useRegistry)(),{getPreviousBlockClientId:a,getNextBlockClientId:o,getBlockOrder:r,getBlockRootClientId:l,getBlockName:i}=(0,gt.useSelect)(nt.store),{mergeBlocks:s,moveBlocksToPosition:c}=(0,gt.useDispatch)(nt.store),m=pd();function u(e){const t=r(e);return t.length?u(t[t.length-1]):e}function p(e){const t=l(e),n=l(t);if(n&&"core/list-item"===i(n))return n}function d(e){const t=o(e);if(t)return t;const n=p(e);return n?d(n):void 0}function g(e){const t=r(e);return t.length?r(t[0])[0]:d(e)}return o=>{function i(e,t){n.batch((()=>{const[n]=r(t);n&&c(r(n),n,l(e)),s(e,t)}))}if(o){const n=g(e);if(!n)return void t(o);p(n)?m(n):i(e,n)}else{const n=a(e);if(p(e))m(e);else if(n){i(u(n),e)}else t(o)}}}function gd(e){const t=(0,Qe.switchToBlockType)(e,"core/list");if(t)return t;const n=(0,Qe.switchToBlockType)(e,"core/paragraph");return n?(0,Qe.switchToBlockType)(n,"core/list"):null}function hd({clientId:e}){const t=ud(e),n=pd(),{canIndent:a,canOutdent:o}=(0,gt.useSelect)((t=>{const{getBlockIndex:n,getBlockRootClientId:a,getBlockName:o}=t(nt.store);return{canIndent:n(e)>0,canOutdent:"core/list-item"===o(a(a(e)))}}),[e]);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToolbarButton,{icon:(0,tt.isRTL)()?Op:Gp,title:(0,tt.__)("Outdent"),describedBy:(0,tt.__)("Outdent list item"),disabled:!o,onClick:()=>n()}),(0,Ke.createElement)(et.ToolbarButton,{icon:(0,tt.isRTL)()?cd:md,title:(0,tt.__)("Indent"),describedBy:(0,tt.__)("Indent list item"),isDisabled:!a,onClick:()=>t()}))}const bd={to:[{type:"block",blocks:["core/paragraph"],transform:(e,t=[])=>[(0,Qe.createBlock)("core/paragraph",e),...t.map((e=>(0,Qe.cloneBlock)(e)))]}]},_d=bd,yd={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/list-item",title:"List item",category:"text",parent:["core/list"],allowedBlocks:["core/list"],description:"Create a list item.",textdomain:"default",attributes:{placeholder:{type:"string"},content:{type:"rich-text",source:"rich-text",selector:"li",__experimentalRole:"content"}},supports:{className:!1,__experimentalSelector:"li",spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:vd}=yd,fd={icon:sd,edit:function({attributes:e,setAttributes:t,onReplace:n,clientId:a,mergeBlocks:o}){const{placeholder:r,content:l}=e,i=(0,nt.useBlockProps)(),s=(0,nt.useInnerBlocksProps)(i,{renderAppender:!1,__unstableDisableDropZone:!0}),c=function(e){const{replaceBlocks:t,selectionChange:n}=(0,gt.useDispatch)(nt.store),{getBlock:a,getBlockRootClientId:o,getBlockIndex:r,getBlockName:l}=(0,gt.useSelect)(nt.store),i=(0,_t.useRef)(e);i.current=e;const s=pd();return(0,jt.useRefEffect)((e=>{function c(e){if(e.defaultPrevented||e.keyCode!==fn.ENTER)return;const{content:c,clientId:m}=i.current;if(c.length)return;if(e.preventDefault(),"core/list-item"===l(o(o(i.current.clientId))))return void s();const u=a(o(m)),p=r(m),d=(0,Qe.cloneBlock)({...u,innerBlocks:u.innerBlocks.slice(0,p)}),g=(0,Qe.createBlock)((0,Qe.getDefaultBlockName)()),h=[...u.innerBlocks[p].innerBlocks[0]?.innerBlocks||[],...u.innerBlocks.slice(p+1)],b=h.length?[(0,Qe.cloneBlock)({...u,innerBlocks:h})]:[];t(u.clientId,[d,g,...b],1),n(g.clientId)}return e.addEventListener("keydown",c),()=>{e.removeEventListener("keydown",c)}}),[])}({content:l,clientId:a}),m=function(e){const{getSelectionStart:t,getSelectionEnd:n,getBlockIndex:a}=(0,gt.useSelect)(nt.store),o=ud(e);return(0,jt.useRefEffect)((r=>{function l(r){const{keyCode:l,shiftKey:i,altKey:s,metaKey:c,ctrlKey:m}=r;if(r.defaultPrevented||l!==fn.SPACE||i||s||c||m)return;if(0===a(e))return;const u=t(),p=n();0===u.offset&&0===p.offset&&(r.preventDefault(),o())}return r.addEventListener("keydown",l),()=>{r.removeEventListener("keydown",l)}}),[e,o])}(a),u=function(e){const t=(0,_t.useRef)(!1),{getBlock:n}=(0,gt.useSelect)(nt.store);return(0,_t.useCallback)((a=>{const o=n(e);return t.current?(0,Qe.cloneBlock)(o,{content:a}):(t.current=!0,(0,Qe.createBlock)(o.name,{...o.attributes,content:a}))}),[e,n])}(a),p=dd(a,o);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("li",{...s},(0,Ke.createElement)(nt.RichText,{ref:(0,jt.useMergeRefs)([c,m]),identifier:"content",tagName:"div",onChange:e=>t({content:e}),value:l,"aria-label":(0,tt.__)("List text"),placeholder:r||(0,tt.__)("List"),onSplit:u,onMerge:p,onReplace:n?(e,...t)=>{n(function(e){const t=[];for(let n of e)if("core/list-item"===n.name)t.push(n);else if("core/list"===n.name)t.push(...n.innerBlocks);else if(n=gd(n))for(const{innerBlocks:e}of n)t.push(...e);return t}(e),...t)}:void 0}),s.children),(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(hd,{clientId:a})))},save:function({attributes:e}){return(0,Ke.createElement)("li",{...nt.useBlockProps.save()},(0,Ke.createElement)(nt.RichText.Content,{value:e.content}),(0,Ke.createElement)(nt.InnerBlocks.Content,null))},merge:(e,t)=>({...e,content:e.content+t.content}),transforms:_d,[Ft(nt.privateApis).requiresWrapperOnCopy]:!0},kd=()=>Xe({name:vd,metadata:yd,settings:fd}),xd=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M11 14.5l1.1 1.1 3-3 .5-.5-.6-.6-3-3-1 1 1.7 1.7H5v1.5h7.7L11 14.5zM16.8 5h-7c-1.1 0-2 .9-2 2v1.5h1.5V7c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v10c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5v-1.5H7.8V17c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2z"}));const wd={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/loginout",title:"Login/out",category:"theme",description:"Show login & logout links.",keywords:["login","logout","form"],textdomain:"default",attributes:{displayLoginAsForm:{type:"boolean",default:!1},redirectToCurrent:{type:"boolean",default:!0}},supports:{className:!0,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:Ed}=wd,Cd={icon:xd,edit:function({attributes:e,setAttributes:t}){const{displayLoginAsForm:n,redirectToCurrent:a}=e;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display login as form"),checked:n,onChange:()=>t({displayLoginAsForm:!n})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Redirect to current URL"),checked:a,onChange:()=>t({redirectToCurrent:!a})}))),(0,Ke.createElement)("div",{...(0,nt.useBlockProps)({className:"logged-in"})},(0,Ke.createElement)("a",{href:"#login-pseudo-link"},(0,tt.__)("Log out"))))}},Sd=()=>Xe({name:Ed,metadata:wd,settings:Cd}),Bd=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z"})),Nd="full",Td="media",Id="attachment",Pd=[["core/paragraph",{placeholder:(0,tt._x)("Content…","content placeholder")}]],Md=(e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${100*t.x}% ${100*t.y}%`:"50% 50%"}:{},zd=50,Rd=()=>{},Ad=e=>{if(!e.customBackgroundColor)return e;const t={color:{background:e.customBackgroundColor}},{customBackgroundColor:n,...a}=e;return{...a,style:t}},Hd=e=>e.align?e:{...e,align:"wide"},Ld={align:{type:"string",default:"wide"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:""},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number"},mediaType:{type:"string"},mediaWidth:{type:"number",default:50},isStackedOnMobile:{type:"boolean",default:!1}},Dd={...Ld,isStackedOnMobile:{type:"boolean",default:!0},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},mediaSizeSlug:{type:"string"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},Fd={anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0}},Vd={attributes:{...Dd,mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:"",__experimentalRole:"content"},mediaId:{type:"number",__experimentalRole:"content"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src",__experimentalRole:"content"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href",__experimentalRole:"content"},mediaType:{type:"string",__experimentalRole:"content"}},supports:{...Fd,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},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}}},save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:n,mediaPosition:a,mediaType:o,mediaUrl:r,mediaWidth:l,mediaId:i,verticalAlignment:s,imageFill:c,focalPoint:m,linkClass:u,href:p,linkTarget:d,rel:g}=e,h=e.mediaSizeSlug||Nd,b=g||void 0,_=ut()({[`wp-image-${i}`]:i&&"image"===o,[`size-${h}`]:i&&"image"===o});let y=(0,Ke.createElement)("img",{src:r,alt:n,className:_||null});p&&(y=(0,Ke.createElement)("a",{className:u,href:p,target:d,rel:b},y));const v={image:()=>y,video:()=>(0,Ke.createElement)("video",{controls:!0,src:r})},f=ut()({"has-media-on-the-right":"right"===a,"is-stacked-on-mobile":t,[`is-vertically-aligned-${s}`]:s,"is-image-fill":c}),k=c?((e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${Math.round(100*t.x)}% ${Math.round(100*t.y)}%`:"50% 50%"}:{})(r,m):{};let x;l!==zd&&(x="right"===a?`auto ${l}%`:`${l}% auto`);const w={gridTemplateColumns:x};return"right"===a?(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:f,style:w})},(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,Ke.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||Rd)())):(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:f,style:w})},(0,Ke.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||Rd)()),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}))},migrate:Hd,isEligible(e,t,{block:n}){const{attributes:a}=n;return void 0===e.align&&!!a.className?.includes("alignwide")}},$d={attributes:Dd,supports:Fd,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:n,mediaPosition:a,mediaType:o,mediaUrl:r,mediaWidth:l,mediaId:i,verticalAlignment:s,imageFill:c,focalPoint:m,linkClass:u,href:p,linkTarget:d,rel:g}=e,h=e.mediaSizeSlug||Nd,b=g||void 0,_=ut()({[`wp-image-${i}`]:i&&"image"===o,[`size-${h}`]:i&&"image"===o});let y=(0,Ke.createElement)("img",{src:r,alt:n,className:_||null});p&&(y=(0,Ke.createElement)("a",{className:u,href:p,target:d,rel:b},y));const v={image:()=>y,video:()=>(0,Ke.createElement)("video",{controls:!0,src:r})},f=ut()({"has-media-on-the-right":"right"===a,"is-stacked-on-mobile":t,[`is-vertically-aligned-${s}`]:s,"is-image-fill":c}),k=c?Md(r,m):{};let x;l!==zd&&(x="right"===a?`auto ${l}%`:`${l}% auto`);const w={gridTemplateColumns:x};return"right"===a?(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:f,style:w})},(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,Ke.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||Rd)())):(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:f,style:w})},(0,Ke.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||Rd)()),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}))},migrate:Hd},Od={attributes:Dd,supports:Fd,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:n,mediaPosition:a,mediaType:o,mediaUrl:r,mediaWidth:l,mediaId:i,verticalAlignment:s,imageFill:c,focalPoint:m,linkClass:u,href:p,linkTarget:d,rel:g}=e,h=e.mediaSizeSlug||Nd,b=g||void 0,_=ut()({[`wp-image-${i}`]:i&&"image"===o,[`size-${h}`]:i&&"image"===o});let y=(0,Ke.createElement)("img",{src:r,alt:n,className:_||null});p&&(y=(0,Ke.createElement)("a",{className:u,href:p,target:d,rel:b},y));const v={image:()=>y,video:()=>(0,Ke.createElement)("video",{controls:!0,src:r})},f=ut()({"has-media-on-the-right":"right"===a,"is-stacked-on-mobile":t,[`is-vertically-aligned-${s}`]:s,"is-image-fill":c}),k=c?Md(r,m):{};let x;l!==zd&&(x="right"===a?`auto ${l}%`:`${l}% auto`);const w={gridTemplateColumns:x};return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:f,style:w})},(0,Ke.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||Rd)()),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}))},migrate:Hd},Gd={attributes:{...Ld,isStackedOnMobile:{type:"boolean",default:!0},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:(0,jt.compose)(Ad,Hd),save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,isStackedOnMobile:a,mediaAlt:o,mediaPosition:r,mediaType:l,mediaUrl:i,mediaWidth:s,mediaId:c,verticalAlignment:m,imageFill:u,focalPoint:p,linkClass:d,href:g,linkTarget:h,rel:b}=e,_=b||void 0;let y=(0,Ke.createElement)("img",{src:i,alt:o,className:c&&"image"===l?`wp-image-${c}`:null});g&&(y=(0,Ke.createElement)("a",{className:d,href:g,target:h,rel:_},y));const v={image:()=>y,video:()=>(0,Ke.createElement)("video",{controls:!0,src:i})},f=(0,nt.getColorClassName)("background-color",t),k=ut()({"has-media-on-the-right":"right"===r,"has-background":f||n,[f]:f,"is-stacked-on-mobile":a,[`is-vertically-aligned-${m}`]:m,"is-image-fill":u}),x=u?Md(i,p):{};let w;s!==zd&&(w="right"===r?`auto ${s}%`:`${s}% auto`);const E={backgroundColor:f?void 0:n,gridTemplateColumns:w};return(0,Ke.createElement)("div",{className:k,style:E},(0,Ke.createElement)("figure",{className:"wp-block-media-text__media",style:x},(v[l]||Rd)()),(0,Ke.createElement)("div",{className:"wp-block-media-text__content"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))}},Ud={attributes:{...Ld,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:(0,jt.compose)(Ad,Hd),save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,isStackedOnMobile:a,mediaAlt:o,mediaPosition:r,mediaType:l,mediaUrl:i,mediaWidth:s,mediaId:c,verticalAlignment:m,imageFill:u,focalPoint:p}=e,d={image:()=>(0,Ke.createElement)("img",{src:i,alt:o,className:c&&"image"===l?`wp-image-${c}`:null}),video:()=>(0,Ke.createElement)("video",{controls:!0,src:i})},g=(0,nt.getColorClassName)("background-color",t),h=ut()({"has-media-on-the-right":"right"===r,[g]:g,"is-stacked-on-mobile":a,[`is-vertically-aligned-${m}`]:m,"is-image-fill":u}),b=u?Md(i,p):{};let _;s!==zd&&(_="right"===r?`auto ${s}%`:`${s}% auto`);const y={backgroundColor:g?void 0:n,gridTemplateColumns:_};return(0,Ke.createElement)("div",{className:h,style:y},(0,Ke.createElement)("figure",{className:"wp-block-media-text__media",style:b},(d[l]||Rd)()),(0,Ke.createElement)("div",{className:"wp-block-media-text__content"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))}},qd={attributes:{...Ld,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"}},migrate:Hd,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,isStackedOnMobile:a,mediaAlt:o,mediaPosition:r,mediaType:l,mediaUrl:i,mediaWidth:s}=e,c={image:()=>(0,Ke.createElement)("img",{src:i,alt:o}),video:()=>(0,Ke.createElement)("video",{controls:!0,src:i})},m=(0,nt.getColorClassName)("background-color",t),u=ut()({"has-media-on-the-right":"right"===r,[m]:m,"is-stacked-on-mobile":a});let p;s!==zd&&(p="right"===r?`auto ${s}%`:`${s}% auto`);const d={backgroundColor:m?void 0:n,gridTemplateColumns:p};return(0,Ke.createElement)("div",{className:u,style:d},(0,Ke.createElement)("figure",{className:"wp-block-media-text__media"},(c[l]||Rd)()),(0,Ke.createElement)("div",{className:"wp-block-media-text__content"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))}},jd=[Vd,$d,Od,Gd,Ud,qd],Wd=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})),Zd=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})),Qd=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,Ke.createElement)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})),Kd=["image","video"],Yd=()=>{};function Jd(e,t){return e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${Math.round(100*t.x)}% ${Math.round(100*t.y)}%`:"50% 50%"}:{}}const Xd=(0,_t.forwardRef)((({isSelected:e,isStackedOnMobile:t,...n},a)=>{const o=(0,jt.useViewportMatch)("small","<");return(0,Ke.createElement)(et.ResizableBox,{ref:a,showHandle:e&&(!o||!t),...n})}));function eg({mediaId:e,mediaUrl:t,onSelectMedia:n}){return(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(nt.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:Kd,accept:"image/*,video/*",onSelect:n}))}function tg({className:e,mediaUrl:t,onSelectMedia:n}){const{createErrorNotice:a}=(0,gt.useDispatch)(Pt.store);return(0,Ke.createElement)(nt.MediaPlaceholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:Qd}),labels:{title:(0,tt.__)("Media area")},className:e,onSelect:n,accept:"image/*,video/*",allowedTypes:Kd,onError:e=>{a(e,{type:"snackbar"})},disableMediaButtons:t})}const ng=(0,_t.forwardRef)((function(e,t){const{className:n,commitWidthChange:a,focalPoint:o,imageFill:r,isSelected:l,isStackedOnMobile:i,mediaAlt:s,mediaId:c,mediaPosition:m,mediaType:u,mediaUrl:p,mediaWidth:d,onSelectMedia:g,onWidthChange:h,enableResize:b}=e,_=!c&&(0,It.isBlobURL)(p),{toggleSelection:y}=(0,gt.useDispatch)(nt.store);if(p){const v=()=>{y(!1)},f=(e,t,n)=>{h(parseInt(n.style.width))},k=(e,t,n)=>{y(!0),a(parseInt(n.style.width))},x={right:b&&"left"===m,left:b&&"right"===m},w="image"===u&&r?Jd(p,o):{},E={image:()=>(0,Ke.createElement)("img",{src:p,alt:s}),video:()=>(0,Ke.createElement)("video",{controls:!0,src:p})};return(0,Ke.createElement)(Xd,{as:"figure",className:ut()(n,"editor-media-container__resizer",{"is-transient":_}),style:w,size:{width:d+"%"},minWidth:"10%",maxWidth:"100%",enable:x,onResizeStart:v,onResize:f,onResizeStop:k,axis:"x",isSelected:l,isStackedOnMobile:i,ref:t},(0,Ke.createElement)(eg,{onSelectMedia:g,mediaUrl:p,mediaId:c}),(E[u]||Yd)(),_&&(0,Ke.createElement)(et.Spinner,null),(0,Ke.createElement)(tg,{...e}))}return(0,Ke.createElement)(tg,{...e})})),ag=e=>Math.max(15,Math.min(e,85));function og(e,t){return e?.media_details?.sizes?.[t]?.source_url}const rg=function({attributes:e,isSelected:t,setAttributes:n}){const{focalPoint:a,href:o,imageFill:r,isStackedOnMobile:l,linkClass:i,linkDestination:s,linkTarget:c,mediaAlt:m,mediaId:u,mediaPosition:p,mediaType:d,mediaUrl:g,mediaWidth:h,rel:b,verticalAlignment:_,allowedBlocks:y}=e,v=e.mediaSizeSlug||Nd,{imageSizes:f,image:k}=(0,gt.useSelect)((e=>{const{getSettings:n}=e(nt.store);return{image:u&&t?e(dt.store).getMedia(u,{context:"view"}):null,imageSizes:n()?.imageSizes}}),[t,u]),x=(0,_t.useRef)(),w=e=>{const{style:t}=x.current.resizable,{x:n,y:a}=e;t.backgroundPosition=`${100*n}% ${100*a}%`},[E,C]=(0,_t.useState)(null),S=function({attributes:{linkDestination:e,href:t},setAttributes:n}){return a=>{if(!a||!a.url)return void n({mediaAlt:void 0,mediaId:void 0,mediaType:void 0,mediaUrl:void 0,mediaLink:void 0,href:void 0,focalPoint:void 0});let o,r;(0,It.isBlobURL)(a.url)&&(a.type=(0,It.getBlobTypeByURL)(a.url)),o=a.media_type?"image"===a.media_type?"image":"video":a.type,"image"===o&&(r=a.sizes?.large?.url||a.media_details?.sizes?.large?.source_url);let l=t;e===Td&&(l=a.url),e===Id&&(l=a.link),n({mediaAlt:a.alt,mediaId:a.id,mediaType:o,mediaUrl:r||a.url,mediaLink:a.link||void 0,href:l,focalPoint:void 0})}}({attributes:e,setAttributes:n}),B=e=>{n({mediaWidth:ag(e)}),C(null)},N=ut()({"has-media-on-the-right":"right"===p,"is-selected":t,"is-stacked-on-mobile":l,[`is-vertically-aligned-${_}`]:_,"is-image-fill":r}),T=`${E||h}%`,I="right"===p?`1fr ${T}`:`${T} 1fr`,P={gridTemplateColumns:I,msGridColumns:I},M=f.filter((({slug:e})=>og(k,e))).map((({name:e,slug:t})=>({value:t,label:e}))),z=(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Media width"),value:E||h,onChange:B,min:15,max:85}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Stack on mobile"),checked:l,onChange:()=>n({isStackedOnMobile:!l})}),"image"===d&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Crop image to fill"),checked:!!r,onChange:()=>n({imageFill:!r})}),r&&g&&"image"===d&&(0,Ke.createElement)(et.FocalPointPicker,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Focal point"),url:g,value:a,onChange:e=>n({focalPoint:e}),onDragStart:w,onDrag:w}),"image"===d&&(0,Ke.createElement)(et.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Alternative text"),value:m,onChange:e=>{n({mediaAlt:e})},help:(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,tt.__)("Describe the purpose of the image.")),(0,Ke.createElement)("br",null),(0,tt.__)("Leave empty if decorative."))}),"image"===d&&(0,Ke.createElement)(nt.__experimentalImageSizeControl,{onChangeImage:e=>{const t=og(k,e);if(!t)return null;n({mediaUrl:t,mediaSizeSlug:e})},slug:v,imageSizeOptions:M,isResizable:!1,imageSizeHelp:(0,tt.__)("Select the size of the source image.")})),R=(0,nt.useBlockProps)({className:N,style:P}),A=(0,nt.useInnerBlocksProps)({className:"wp-block-media-text__content"},{template:Pd,allowedBlocks:y}),H=(0,nt.useBlockEditingMode)();return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,z),(0,Ke.createElement)(nt.BlockControls,{group:"block"},"default"===H&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockVerticalAlignmentControl,{onChange:e=>{n({verticalAlignment:e})},value:_}),(0,Ke.createElement)(et.ToolbarButton,{icon:Wd,title:(0,tt.__)("Show media on left"),isActive:"left"===p,onClick:()=>n({mediaPosition:"left"})}),(0,Ke.createElement)(et.ToolbarButton,{icon:Zd,title:(0,tt.__)("Show media on right"),isActive:"right"===p,onClick:()=>n({mediaPosition:"right"})})),"image"===d&&(0,Ke.createElement)(nt.__experimentalImageURLInputUI,{url:o||"",onChangeUrl:e=>{n(e)},linkDestination:s,mediaType:d,mediaUrl:k&&k.source_url,mediaLink:k&&k.link,linkTarget:c,linkClass:i,rel:b})),(0,Ke.createElement)("div",{...R},"right"===p&&(0,Ke.createElement)("div",{...A}),(0,Ke.createElement)(ng,{className:"wp-block-media-text__media",onSelectMedia:S,onWidthChange:e=>{C(ag(e))},commitWidthChange:B,ref:x,enableResize:"default"===H,focalPoint:a,imageFill:r,isSelected:t,isStackedOnMobile:l,mediaAlt:m,mediaId:u,mediaPosition:p,mediaType:d,mediaUrl:g,mediaWidth:h}),"right"!==p&&(0,Ke.createElement)("div",{...A})))},lg=()=>{};const ig={from:[{type:"block",blocks:["core/image"],transform:({alt:e,url:t,id:n,anchor:a})=>(0,Qe.createBlock)("core/media-text",{mediaAlt:e,mediaId:n,mediaUrl:t,mediaType:"image",anchor:a})},{type:"block",blocks:["core/video"],transform:({src:e,id:t,anchor:n})=>(0,Qe.createBlock)("core/media-text",{mediaId:t,mediaUrl:e,mediaType:"video",anchor:n})},{type:"block",blocks:["core/cover"],transform:({align:e,alt:t,anchor:n,backgroundType:a,customGradient:o,customOverlayColor:r,gradient:l,id:i,overlayColor:s,style:c,textColor:m,url:u},p)=>{let d={};return o?d={style:{color:{gradient:o}}}:r&&(d={style:{color:{background:r}}}),c?.color?.text&&(d.style={color:{...d.style?.color,text:c.color.text}}),(0,Qe.createBlock)("core/media-text",{align:e,anchor:n,backgroundColor:s,gradient:l,mediaAlt:t,mediaId:i,mediaType:a,mediaUrl:u,textColor:m,...d},p)}}],to:[{type:"block",blocks:["core/image"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"image"===e,transform:({mediaAlt:e,mediaId:t,mediaUrl:n,anchor:a})=>(0,Qe.createBlock)("core/image",{alt:e,id:t,url:n,anchor:a})},{type:"block",blocks:["core/video"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"video"===e,transform:({mediaId:e,mediaUrl:t,anchor:n})=>(0,Qe.createBlock)("core/video",{id:e,src:t,anchor:n})},{type:"block",blocks:["core/cover"],transform:({align:e,anchor:t,backgroundColor:n,focalPoint:a,gradient:o,mediaAlt:r,mediaId:l,mediaType:i,mediaUrl:s,style:c,textColor:m},u)=>{const p={};c?.color?.gradient?p.customGradient=c.color.gradient:c?.color?.background&&(p.customOverlayColor=c.color.background),c?.color?.text&&(p.style={color:{text:c.color.text}});const d={align:e,alt:r,anchor:t,backgroundType:i,dimRatio:s?50:100,focalPoint:a,gradient:o,id:l,overlayColor:n,textColor:m,url:s,...p};return(0,Qe.createBlock)("core/cover",d,u)}}]},sg=ig,cg={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/media-text",title:"Media & Text",category:"media",description:"Set media and words side-by-side for a richer layout.",keywords:["image","video"],textdomain:"default",attributes:{align:{type:"string",default:"none"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:"",__experimentalRole:"content"},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number",__experimentalRole:"content"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src",__experimentalRole:"content"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href",__experimentalRole:"content"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},mediaType:{type:"string",__experimentalRole:"content"},mediaWidth:{type:"number",default:50},mediaSizeSlug:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"},allowedBlocks:{type:"array"}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},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}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-media-text-editor",style:"wp-block-media-text"},{name:mg}=cg,ug={icon:Bd,example:{viewportWidth:601,attributes:{mediaType:"image",mediaUrl:"https://s.w.org/images/core/5.3/Biologia_Centrali-Americana_-_Cantorchilus_semibadius_1902.jpg"},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,tt.__)("The wren<br>Earns his living<br>Noiselessly.")}},{name:"core/paragraph",attributes:{content:(0,tt.__)("— Kobayashi Issa (一茶)")}}]},transforms:sg,edit:rg,save:function({attributes:e}){const{isStackedOnMobile:t,mediaAlt:n,mediaPosition:a,mediaType:o,mediaUrl:r,mediaWidth:l,mediaId:i,verticalAlignment:s,imageFill:c,focalPoint:m,linkClass:u,href:p,linkTarget:d,rel:g}=e,h=e.mediaSizeSlug||Nd,b=g||void 0,_=ut()({[`wp-image-${i}`]:i&&"image"===o,[`size-${h}`]:i&&"image"===o});let y=(0,Ke.createElement)("img",{src:r,alt:n,className:_||null});p&&(y=(0,Ke.createElement)("a",{className:u,href:p,target:d,rel:b},y));const v={image:()=>y,video:()=>(0,Ke.createElement)("video",{controls:!0,src:r})},f=ut()({"has-media-on-the-right":"right"===a,"is-stacked-on-mobile":t,[`is-vertically-aligned-${s}`]:s,"is-image-fill":c}),k=c?Jd(r,m):{};let x;50!==l&&(x="right"===a?`auto ${l}%`:`${l}% auto`);const w={gridTemplateColumns:x};return"right"===a?(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:f,style:w})},(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,Ke.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||lg)())):(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:f,style:w})},(0,Ke.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||lg)()),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}))},deprecated:jd},pg=()=>Xe({name:mg,metadata:cg,settings:ug});const dg=(0,gt.withDispatch)(((e,{clientId:t,attributes:n})=>{const{replaceBlock:a}=e(nt.store);return{convertToHTML(){a(t,(0,Qe.createBlock)("core/html",{content:n.originalUndelimitedContent}))}}}))((function({attributes:e,convertToHTML:t,clientId:n}){const{originalName:a,originalUndelimitedContent:o}=e,r=!!o,{hasFreeformBlock:l,hasHTMLBlock:i}=(0,gt.useSelect)((e=>{const{canInsertBlockType:t,getBlockRootClientId:a}=e(nt.store);return{hasFreeformBlock:t("core/freeform",a(n)),hasHTMLBlock:t("core/html",a(n))}}),[n]),s=[];let c;const m=(0,Ke.createElement)(et.Button,{key:"convert",onClick:t,variant:"primary"},(0,tt.__)("Keep as HTML"));return!r||l||a?r&&i?(c=(0,tt.sprintf)((0,tt.__)('Your site doesn’t include support for the "%s" block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely.'),a),s.push(m)):c=(0,tt.sprintf)((0,tt.__)('Your site doesn’t include support for the "%s" block. You can leave this block intact or remove it entirely.'),a):i?(c=(0,tt.__)("It appears you are trying to use the deprecated Classic block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely. Alternatively, you can refresh the page to use the Classic block."),s.push(m)):c=(0,tt.__)("It appears you are trying to use the deprecated Classic block. You can leave this block intact, or remove it entirely. Alternatively, you can refresh the page to use the Classic block."),(0,Ke.createElement)("div",{...(0,nt.useBlockProps)({className:"has-warning"})},(0,Ke.createElement)(nt.Warning,{actions:s},c),(0,Ke.createElement)(_t.RawHTML,null,(0,ac.safeHTML)(o)))})),gg=dg;const hg={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/missing",title:"Unsupported",category:"text",description:"Your site doesn’t include support for this block.",textdomain:"default",attributes:{originalName:{type:"string"},originalUndelimitedContent:{type:"string"},originalContent:{type:"string",source:"raw"}},supports:{className:!1,customClassName:!1,inserter:!1,html:!1,reusable:!1,interactivity:{clientNavigation:!0}}},{name:bg}=hg,_g={name:bg,__experimentalLabel(e,{context:t}){if("accessibility"===t){const{originalName:t}=e,n=t?(0,Qe.getBlockType)(t):void 0;return n?n.settings.title||t:""}},edit:gg,save:function({attributes:e}){return(0,Ke.createElement)(_t.RawHTML,null,e.originalContent)}},yg=()=>Xe({name:bg,metadata:hg,settings:_g}),vg=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z"})),fg=(0,tt.__)("Read more");const kg={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/more"===e.dataset.block,transform(e){const{customText:t,noTeaser:n}=e.dataset,a={};return t&&(a.customText=t),""===n&&(a.noTeaser=!0),(0,Qe.createBlock)("core/more",a)}}]},xg={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/more",title:"More",category:"design",description:"Content before this block will be shown in the excerpt on your archives page.",keywords:["read more"],textdomain:"default",attributes:{customText:{type:"string"},noTeaser:{type:"boolean",default:!1}},supports:{customClassName:!1,className:!1,html:!1,multiple:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-more-editor"},{name:wg}=xg,Eg={icon:vg,example:{},__experimentalLabel(e,{context:t}){const n=e?.metadata?.name;return"list-view"===t&&n?n:"accessibility"===t?e.customText:void 0},transforms:kg,edit:function({attributes:{customText:e,noTeaser:t},insertBlocksAfter:n,setAttributes:a}){const o={width:`${(e||fg).length+1.2}em`};return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Hide the excerpt on the full content page"),checked:!!t,onChange:()=>a({noTeaser:!t}),help:e=>e?(0,tt.__)("The excerpt is hidden."):(0,tt.__)("The excerpt is visible.")}))),(0,Ke.createElement)("div",{...(0,nt.useBlockProps)()},(0,Ke.createElement)("input",{"aria-label":(0,tt.__)("“Read more” link text"),type:"text",value:e,placeholder:fg,onChange:e=>{a({customText:""!==e.target.value?e.target.value:void 0})},onKeyDown:({keyCode:e})=>{e===fn.ENTER&&n([(0,Qe.createBlock)((0,Qe.getDefaultBlockName)())])},style:o})))},save:function({attributes:{customText:e,noTeaser:t}}){const n=e?`\x3c!--more ${e}--\x3e`:"\x3c!--more--\x3e",a=t?"\x3c!--noteaser--\x3e":"";return(0,Ke.createElement)(_t.RawHTML,null,[n,a].filter(Boolean).join("\n"))}},Cg=()=>Xe({name:wg,metadata:xg,settings:Eg}),Sg=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})),Bg=window.wp.a11y;const Ng=(0,_t.forwardRef)((function({icon:e,size:t=24,...n},a){return(0,_t.cloneElement)(e,{width:t,height:t,...n,ref:a})})),Tg=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),Ig={name:"core/navigation-link"},Pg=["core/navigation-link/page","core/navigation-link"],Mg={per_page:100,status:["publish","draft"],order:"desc",orderby:"date"},zg=["postType","wp_navigation",Mg];function Rg(e){const t=(0,dt.useResourcePermissions)("navigation",e),{navigationMenu:n,isNavigationMenuResolved:a,isNavigationMenuMissing:o}=(0,gt.useSelect)((t=>function(e,t){if(!t)return{isNavigationMenuResolved:!1,isNavigationMenuMissing:!0};const{getEntityRecord:n,getEditedEntityRecord:a,hasFinishedResolution:o}=e(dt.store),r=["postType","wp_navigation",t],l=n(...r),i=a(...r),s=o("getEditedEntityRecord",r),c="publish"===i.status||"draft"===i.status;return{isNavigationMenuResolved:s,isNavigationMenuMissing:s&&(!l||!c),navigationMenu:c?i:null}}(t,e)),[e]),{canCreate:r,canUpdate:l,canDelete:i,isResolving:s,hasResolved:c}=t,{records:m,isResolving:u,hasResolved:p}=(0,dt.useEntityRecords)("postType","wp_navigation",Mg);return{navigationMenu:n,isNavigationMenuResolved:a,isNavigationMenuMissing:o,navigationMenus:m,isResolvingNavigationMenus:u,hasResolvedNavigationMenus:p,canSwitchNavigationMenu:e?m?.length>1:m?.length>0,canUserCreateNavigationMenu:r,isResolvingCanUserCreateNavigationMenu:s,hasResolvedCanUserCreateNavigationMenu:c,canUserUpdateNavigationMenu:l,hasResolvedCanUserUpdateNavigationMenu:e?c:void 0,canUserDeleteNavigationMenu:i,hasResolvedCanUserDeleteNavigationMenu:e?c:void 0}}function Ag(e){const{records:t,isResolving:n,hasResolved:a}=(0,dt.useEntityRecords)("root","menu",{per_page:-1,context:"view"}),{records:o,isResolving:r,hasResolved:l}=(0,dt.useEntityRecords)("postType","page",{parent:0,order:"asc",orderby:"id",per_page:-1,context:"view"}),{records:i,hasResolved:s}=(0,dt.useEntityRecords)("root","menuItem",{menus:e,per_page:-1,context:"view"},{enabled:!!e});return{pages:o,isResolvingPages:r,hasResolvedPages:l,hasPages:!(!l||!o?.length),menus:t,isResolvingMenus:n,hasResolvedMenus:a,hasMenus:!(!a||!t?.length),menuItems:i,hasResolvedMenuItems:s}}const Hg=({isVisible:e=!0})=>(0,Ke.createElement)("div",{"aria-hidden":!e||void 0,className:"wp-block-navigation-placeholder__preview"},(0,Ke.createElement)("div",{className:"wp-block-navigation-placeholder__actions__indicator"},(0,Ke.createElement)(Ng,{icon:Sg}),(0,tt.__)("Navigation"))),Lg=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));const Dg=function({currentMenuId:e,onSelectNavigationMenu:t,onSelectClassicMenu:n,onCreateNew:a,actionLabel:o,createNavigationMenuIsSuccess:r,createNavigationMenuIsError:l}){const i=(0,tt.__)("Create from '%s'"),[s,c]=(0,_t.useState)(!1);o=o||i;const{menus:m}=Ag(),{navigationMenus:u,isResolvingNavigationMenus:p,hasResolvedNavigationMenus:d,canUserCreateNavigationMenu:g,canSwitchNavigationMenu:h}=Rg(),[b]=(0,dt.useEntityProp)("postType","wp_navigation","title"),_=(0,_t.useMemo)((()=>u?.map((({id:e,title:t,status:n},a)=>{const r=function(e,t,n){return e?"publish"===n?(0,Jn.decodeEntities)(e):(0,tt.sprintf)((0,tt.__)("%1$s (%2$s)"),(0,Jn.decodeEntities)(e),n):(0,tt.sprintf)((0,tt.__)("(no title %s)"),t)}(t?.rendered,a+1,n);return{value:e,label:r,ariaLabel:(0,tt.sprintf)(o,r),disabled:s||p||!d}}))||[]),[u,o,p,d,s]),y=!!u?.length,v=!!m?.length,f=!!h,k=!!g,x=y&&!e,w=!y&&d,E=d&&null===e;let C="";C=p?(0,tt.__)("Loading…"):x||w||E?(0,tt.__)("Choose or create a Navigation menu"):b,(0,_t.useEffect)((()=>{s&&(r||l)&&c(!1)}),[d,r,g,l,s,E,w,x]);const S=(0,Ke.createElement)(et.DropdownMenu,{label:C,icon:Lg,toggleProps:{isSmall:!0}},(({onClose:o})=>(0,Ke.createElement)(Ke.Fragment,null,f&&y&&(0,Ke.createElement)(et.MenuGroup,{label:(0,tt.__)("Menus")},(0,Ke.createElement)(et.MenuItemsChoice,{value:e,onSelect:e=>{t(e),o()},choices:_})),k&&v&&(0,Ke.createElement)(et.MenuGroup,{label:(0,tt.__)("Import Classic Menus")},m?.map((e=>{const t=(0,Jn.decodeEntities)(e.name);return(0,Ke.createElement)(et.MenuItem,{onClick:async()=>{c(!0),await n(e),c(!1),o()},key:e.id,"aria-label":(0,tt.sprintf)(i,t),disabled:s||p||!d},t)}))),g&&(0,Ke.createElement)(et.MenuGroup,{label:(0,tt.__)("Tools")},(0,Ke.createElement)(et.MenuItem,{onClick:async()=>{c(!0),await a(),c(!1),o()},disabled:s||p||!d},(0,tt.__)("Create new menu"))))));return S};function Fg({isSelected:e,currentMenuId:t,clientId:n,canUserCreateNavigationMenu:a=!1,isResolvingCanUserCreateNavigationMenu:o,onSelectNavigationMenu:r,onSelectClassicMenu:l,onCreateEmpty:i}){const{isResolvingMenus:s,hasResolvedMenus:c}=Ag();(0,_t.useEffect)((()=>{e&&(s&&(0,Bg.speak)((0,tt.__)("Loading navigation block setup options…")),c&&(0,Bg.speak)((0,tt.__)("Navigation block setup options ready.")))}),[c,s,e]);const m=s&&o;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.Placeholder,{className:"wp-block-navigation-placeholder"},(0,Ke.createElement)(Hg,{isVisible:!e}),(0,Ke.createElement)("div",{"aria-hidden":!e||void 0,className:"wp-block-navigation-placeholder__controls"},(0,Ke.createElement)("div",{className:"wp-block-navigation-placeholder__actions"},(0,Ke.createElement)("div",{className:"wp-block-navigation-placeholder__actions__indicator"},(0,Ke.createElement)(Ng,{icon:Sg})," ",(0,tt.__)("Navigation")),(0,Ke.createElement)("hr",null),m&&(0,Ke.createElement)(et.Spinner,null),(0,Ke.createElement)(Dg,{currentMenuId:t,clientId:n,onSelectNavigationMenu:r,onSelectClassicMenu:l}),(0,Ke.createElement)("hr",null),a&&(0,Ke.createElement)(et.Button,{variant:"tertiary",onClick:i},(0,tt.__)("Start empty"))))))}const Vg=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"}));function $g({icon:e}){return"menu"===e?(0,Ke.createElement)(Ng,{icon:Vg}):(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false"},(0,Ke.createElement)(Ye.Rect,{x:"4",y:"7.5",width:"16",height:"1.5"}),(0,Ke.createElement)(Ye.Rect,{x:"4",y:"15",width:"16",height:"1.5"}))}function Og({children:e,id:t,isOpen:n,isResponsive:a,onToggle:o,isHiddenByDefault:r,overlayBackgroundColor:l,overlayTextColor:i,hasIcon:s,icon:c}){if(!a)return e;const m=ut()("wp-block-navigation__responsive-container",{"has-text-color":!!i.color||!!i?.class,[(0,nt.getColorClassName)("color",i?.slug)]:!!i?.slug,"has-background":!!l.color||l?.class,[(0,nt.getColorClassName)("background-color",l?.slug)]:!!l?.slug,"is-menu-open":n,"hidden-by-default":r}),u={color:!i?.slug&&i?.color,backgroundColor:!l?.slug&&l?.color&&l.color},p=ut()("wp-block-navigation__responsive-container-open",{"always-shown":r}),d=`${t}-modal`,g={className:"wp-block-navigation__responsive-dialog",...n&&{role:"dialog","aria-modal":!0,"aria-label":(0,tt.__)("Menu")}};return(0,Ke.createElement)(Ke.Fragment,null,!n&&(0,Ke.createElement)(et.Button,{"aria-haspopup":"true","aria-label":s&&(0,tt.__)("Open menu"),className:p,onClick:()=>o(!0)},s&&(0,Ke.createElement)($g,{icon:c}),!s&&(0,tt.__)("Menu")),(0,Ke.createElement)("div",{className:m,style:u,id:d},(0,Ke.createElement)("div",{className:"wp-block-navigation__responsive-close",tabIndex:"-1"},(0,Ke.createElement)("div",{...g},(0,Ke.createElement)(et.Button,{className:"wp-block-navigation__responsive-container-close","aria-label":s&&(0,tt.__)("Close menu"),onClick:()=>o(!1)},s&&(0,Ke.createElement)(Ng,{icon:Tg}),!s&&(0,tt.__)("Close")),(0,Ke.createElement)("div",{className:"wp-block-navigation__responsive-container-content",id:`${d}-content`},e)))))}function Gg({clientId:e,hasCustomPlaceholder:t,orientation:n,templateLock:a}){const{isImmediateParentOfSelectedBlock:o,selectedBlockHasChildren:r,isSelected:l}=(0,gt.useSelect)((t=>{const{getBlockCount:n,hasSelectedInnerBlock:a,getSelectedBlockClientId:o}=t(nt.store),r=o();return{isImmediateParentOfSelectedBlock:a(e,!1),selectedBlockHasChildren:!!n(r),isSelected:r===e}}),[e]),[i,s,c]=(0,dt.useEntityBlockEditor)("postType","wp_navigation"),m=l||o&&!r,u=(0,_t.useMemo)((()=>(0,Ke.createElement)(Hg,null)),[]),p=!t&&!!!i?.length&&!l,d=(0,nt.useInnerBlocksProps)({className:"wp-block-navigation__container"},{value:i,onInput:s,onChange:c,prioritizedInserterBlocks:Pg,defaultBlock:Ig,directInsert:!0,orientation:n,templateLock:a,renderAppender:!!(l||o&&!r||m)&&nt.InnerBlocks.ButtonBlockAppender,placeholder:p?u:void 0,__experimentalCaptureToolbars:!0,__unstableDisableLayoutClassNames:!0});return(0,Ke.createElement)("div",{...d})}function Ug(){const[e,t]=(0,dt.useEntityProp)("postType","wp_navigation","title");return(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Menu name"),value:e,onChange:t})}const qg=(e,t,n)=>{if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const a in e){if(!t.hasOwnProperty(a))return!1;if(n&&n(a,e))return!0;if(!qg(e[a],t[a],n))return!1}return!0}return!1},jg={};function Wg({blocks:e,createNavigationMenu:t,hasSelection:n}){const a=(0,_t.useRef)();(0,_t.useEffect)((()=>{a?.current||(a.current=e)}),[e]);const o=function(e,t){return!qg(e,t,((e,t)=>{if("core/page-list"===t?.name&&"innerBlocks"===e)return!0}))}(a?.current,e),r=(0,_t.useContext)(et.Disabled.Context),l=(0,nt.useInnerBlocksProps)({className:"wp-block-navigation__container"},{renderAppender:!!n&&void 0,defaultBlock:Ig,directInsert:!0}),{isSaving:i,hasResolvedAllNavigationMenus:s}=(0,gt.useSelect)((e=>{if(r)return jg;const{hasFinishedResolution:t,isSavingEntityRecord:n}=e(dt.store);return{isSaving:n("postType","wp_navigation"),hasResolvedAllNavigationMenus:t("getEntityRecords",zg)}}),[r]);(0,_t.useEffect)((()=>{!r&&!i&&s&&n&&o&&t(null,e)}),[e,t,r,i,s,o,n]);const c=i?et.Disabled:"div";return(0,Ke.createElement)(c,{...l})}function Zg({onDelete:e}){const[t,n]=(0,_t.useState)(!1),a=(0,dt.useEntityId)("postType","wp_navigation"),[o]=(0,dt.useEntityProp)("postType","wp_navigation","title"),{deleteEntityRecord:r}=(0,gt.useDispatch)(dt.store);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.Button,{className:"wp-block-navigation-delete-menu-button",variant:"secondary",isDestructive:!0,onClick:()=>{n(!0)}},(0,tt.__)("Delete menu")),t&&(0,Ke.createElement)(et.Modal,{title:(0,tt.sprintf)((0,tt.__)("Delete %s"),o),onRequestClose:()=>n(!1)},(0,Ke.createElement)("p",null,(0,tt.__)("Are you sure you want to delete this navigation menu?")),(0,Ke.createElement)(et.__experimentalHStack,{justify:"right"},(0,Ke.createElement)(et.Button,{variant:"tertiary",onClick:()=>{n(!1)}},(0,tt.__)("Cancel")),(0,Ke.createElement)(et.Button,{variant:"primary",onClick:()=>{r("postType","wp_navigation",a,{force:!0}),e(o)}},(0,tt.__)("Confirm")))))}const Qg=function({name:e,message:t=""}={}){const n=(0,_t.useRef)(),{createWarningNotice:a,removeNotice:o}=(0,gt.useDispatch)(Pt.store);return[(0,_t.useCallback)((o=>{n.current||(n.current=e,a(o||t,{id:n.current,type:"snackbar"}))}),[n,a,t,e]),(0,_t.useCallback)((()=>{n.current&&(o(n.current),n.current=null)}),[n,o])]};function Kg({setAttributes:e,hasIcon:t,icon:n}){return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show icon button"),help:(0,tt.__)("Configure the visual appearance of the button that toggles the overlay menu."),onChange:t=>e({hasIcon:t}),checked:t}),(0,Ke.createElement)(et.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Icon"),value:n,onChange:t=>e({icon:t}),isBlock:!0},(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"handle","aria-label":(0,tt.__)("handle"),label:(0,Ke.createElement)($g,{icon:"handle"})}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"menu","aria-label":(0,tt.__)("menu"),label:(0,Ke.createElement)($g,{icon:"menu"})})))}function Yg(e){if(!e)return null;const t=Jg(function(e,t="id",n="parent"){const a=Object.create(null),o=[];for(const r of e)a[r[t]]={...r,children:[]},r[n]?(a[r[n]]=a[r[n]]||{},a[r[n]].children=a[r[n]].children||[],a[r[n]].children.push(a[r[t]])):o.push(a[r[t]]);return o}(e));return(0,_i.applyFilters)("blocks.navigation.__unstableMenuItemsToBlocks",t,e)}function Jg(e,t=0){let n={};const a=[...e].sort(((e,t)=>e.menu_order-t.menu_order)),o=a.map((e=>{if("block"===e.type){const[t]=(0,Qe.parse)(e.content.raw);return t||(0,Qe.createBlock)("core/freeform",{content:e.content})}const a=e.children?.length?"core/navigation-submenu":"core/navigation-link",o=function({title:e,xfn:t,classes:n,attr_title:a,object:o,object_id:r,description:l,url:i,type:s,target:c},m,u){o&&"post_tag"===o&&(o="tag");return{label:e?.rendered||"",...o?.length&&{type:o},kind:s?.replace("_","-")||"custom",url:i||"",...t?.length&&t.join(" ").trim()&&{rel:t.join(" ").trim()},...n?.length&&n.join(" ").trim()&&{className:n.join(" ").trim()},...a?.length&&{title:a},...r&&"custom"!==o&&{id:r},...l?.length&&{description:l},..."_blank"===c&&{opensInNewTab:!0},..."core/navigation-submenu"===m&&{isTopLevelItem:0===u},..."core/navigation-link"===m&&{isTopLevelLink:0===u}}}(e,a,t),{innerBlocks:r=[],mapping:l={}}=e.children?.length?Jg(e.children,t+1):{};n={...n,...l};const i=(0,Qe.createBlock)(a,o,r);return n[e.id]=i.clientId,i}));return{innerBlocks:o,mapping:n}}const Xg="success",eh="error",th="pending";let nh=null;const ah=function(e,{throwOnError:t=!1}={}){const n=(0,gt.useRegistry)(),{editEntityRecord:a}=(0,gt.useDispatch)(dt.store),[o,r]=(0,_t.useState)("idle"),[l,i]=(0,_t.useState)(null),s=(0,_t.useCallback)((async(t,o,r="publish")=>{let l,i;try{i=await n.resolveSelect(dt.store).getMenuItems({menus:t,per_page:-1,context:"view"})}catch(e){throw new Error((0,tt.sprintf)((0,tt.__)('Unable to fetch classic menu "%s" from API.'),o),{cause:e})}if(null===i)throw new Error((0,tt.sprintf)((0,tt.__)('Unable to fetch classic menu "%s" from API.'),o));const{innerBlocks:s}=Yg(i);try{l=await e(o,s,r),await a("postType","wp_navigation",l.id,{status:"publish"},{throwOnError:!0})}catch(e){throw new Error((0,tt.sprintf)((0,tt.__)('Unable to create Navigation Menu "%s".'),o),{cause:e})}return l}),[e,a,n]);return{convert:(0,_t.useCallback)((async(e,n,a)=>{if(nh!==e)return nh=e,e&&n?(r(th),i(null),await s(e,n,a).then((e=>(r(Xg),nh=null,e))).catch((e=>{if(i(e?.message),r(eh),nh=null,t)throw new Error((0,tt.sprintf)((0,tt.__)('Unable to create Navigation Menu "%s".'),n),{cause:e})}))):(i("Unable to convert menu. Missing menu details."),void r(eh))}),[s,t]),status:o,error:l}};function oh(e,t){return e&&t?e+"//"+t:null}const rh=["postType","wp_navigation",{status:"draft",per_page:-1}],lh=["postType","wp_navigation",{per_page:-1,status:"publish"}];function ih(e){const t=(0,_t.useContext)(et.Disabled.Context),n=function(e){return(0,gt.useSelect)((t=>{if(!e)return;const{getBlock:n,getBlockParentsByBlockName:a}=t(nt.store),o=a(e,"core/template-part",!0);if(!o?.length)return;const r=t("core/editor").__experimentalGetDefaultTemplatePartAreas(),{getCurrentTheme:l,getEditedEntityRecord:i}=t(dt.store);for(const e of o){const t=n(e),{theme:a=l()?.stylesheet,slug:o}=t.attributes,s=i("postType","wp_template_part",oh(a,o));if(s?.area)return r.find((e=>"uncategorized"!==e.area&&e.area===s.area))?.label}}),[e])}(t?void 0:e),a=(0,gt.useRegistry)();return(0,_t.useCallback)((async()=>{if(t)return"";const{getEntityRecords:e}=a.resolveSelect(dt.store),[o,r]=await Promise.all([e(...rh),e(...lh)]),l=n?(0,tt.sprintf)((0,tt.__)("%s navigation"),n):(0,tt.__)("Navigation"),i=[...o,...r].reduce(((e,t)=>t?.title?.raw?.startsWith(l)?e+1:e),0);return(i>0?`${l} ${i+1}`:l)||""}),[t,n,a])}const sh="success",ch="error",mh="pending",uh="idle";const ph=[];function dh(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function gh(e,t,n){if(!e)return;t(dh(e).color);let a=e,o=dh(a).backgroundColor;for(;"rgba(0, 0, 0, 0)"===o&&a.parentNode&&a.parentNode.nodeType===a.parentNode.ELEMENT_NODE;)a=a.parentNode,o=dh(a).backgroundColor;n(o)}function hh(e,t){const{textColor:n,customTextColor:a,backgroundColor:o,customBackgroundColor:r,overlayTextColor:l,customOverlayTextColor:i,overlayBackgroundColor:s,customOverlayBackgroundColor:c,style:m}=e,u={};return t&&i?u.customTextColor=i:t&&l?u.textColor=l:a?u.customTextColor=a:n?u.textColor=n:m?.color?.text&&(u.customTextColor=m.color.text),t&&c?u.customBackgroundColor=c:t&&s?u.backgroundColor=s:r?u.customBackgroundColor=r:o?u.backgroundColor=o:m?.color?.background&&(u.customTextColor=m.color.background),u}function bh(e){return{className:ut()("wp-block-navigation__submenu-container",{"has-text-color":!(!e.textColor&&!e.customTextColor),[`has-${e.textColor}-color`]:!!e.textColor,"has-background":!(!e.backgroundColor&&!e.customBackgroundColor),[`has-${e.backgroundColor}-background-color`]:!!e.backgroundColor}),style:{color:e.customTextColor,backgroundColor:e.customBackgroundColor}}}const _h=({className:e="",disabled:t,isMenuItem:n=!1})=>{let a=et.Button;return n&&(a=et.MenuItem),(0,Ke.createElement)(a,{variant:"link",disabled:t,className:e,href:(0,pt.addQueryArgs)("edit.php",{post_type:"wp_navigation"})},(0,tt.__)("Manage menus"))};const yh=function({onCreateNew:e}){return(0,Ke.createElement)(nt.Warning,null,(0,_t.createInterpolateElement)((0,tt.__)("Navigation menu has been deleted or is unavailable. <button>Create a new menu?</button>"),{button:(0,Ke.createElement)(et.Button,{onClick:e,variant:"link"})}))},vh=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z"})),fh=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),kh=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),xh={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},wh=["core/navigation-link","core/navigation-submenu"];function Eh({block:e,onClose:t,expandedState:n,expand:a,setInsertedBlock:o}){const{insertBlock:r,replaceBlock:l,replaceInnerBlocks:i}=(0,gt.useDispatch)(nt.store),s=e.clientId,c=!wh.includes(e.name);return(0,Ke.createElement)(et.MenuItem,{icon:vh,disabled:c,onClick:()=>{const c=(0,Qe.createBlock)("core/navigation-link");if("core/navigation-submenu"===e.name)r(c,e.innerBlocks.length,s,false);else{const t=(0,Qe.createBlock)("core/navigation-submenu",e.attributes,e.innerBlocks);l(s,t),i(t.clientId,[c],false)}o(c),n[e.clientId]||a(e.clientId),t()}},(0,tt.__)("Add submenu link"))}function Ch(e){const{block:t}=e,{clientId:n}=t,{moveBlocksDown:a,moveBlocksUp:o,removeBlocks:r}=(0,gt.useDispatch)(nt.store),l=(0,tt.sprintf)((0,tt.__)("Remove %s"),(0,nt.BlockTitle)({clientId:n,maximumLength:25})),i=(0,gt.useSelect)((e=>{const{getBlockRootClientId:t}=e(nt.store);return t(n)}),[n]);return(0,Ke.createElement)(et.DropdownMenu,{icon:Lg,label:(0,tt.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:xh,noIcons:!0,...e},(({onClose:s})=>(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.MenuGroup,null,(0,Ke.createElement)(et.MenuItem,{icon:fh,onClick:()=>{o([n],i),s()}},(0,tt.__)("Move up")),(0,Ke.createElement)(et.MenuItem,{icon:kh,onClick:()=>{a([n],i),s()}},(0,tt.__)("Move down")),(0,Ke.createElement)(Eh,{block:t,onClose:s,expanded:!0,expandedState:e.expandedState,expand:e.expand,setInsertedBlock:e.setInsertedBlock})),(0,Ke.createElement)(et.MenuGroup,null,(0,Ke.createElement)(et.MenuItem,{onClick:()=>{r([n],!1),s()}},l)))))}const Sh=window.wp.escapeHtml,Bh=(e={},t,n={})=>{const{label:a="",kind:o="",type:r=""}=n,{title:l="",url:i="",opensInNewTab:s,id:c,kind:m=o,type:u=r}=e,p=l.replace(/http(s?):\/\//gi,""),d=i.replace(/http(s?):\/\//gi,""),g=l&&l!==a&&p!==d?(0,Sh.escapeHTML)(l):a||(0,Sh.escapeHTML)(d),h="post_tag"===u?"tag":u.replace("-","_"),b=["post","page","tag","category"].indexOf(h)>-1,_=!m&&!b||"custom"===m?"custom":m;t({...i&&{url:encodeURI((0,pt.safeDecodeURI)(i))},...g&&{label:g},...void 0!==s&&{opensInNewTab:s},...c&&Number.isInteger(c)&&{id:c},..._&&{kind:_},...h&&"URL"!==h&&{type:h}})},Nh=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})),Th=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})),{PrivateQuickInserter:Ih}=Ft(nt.privateApis);function Ph(e,t){switch(e){case"post":case"page":return{type:"post",subtype:e};case"category":return{type:"term",subtype:"category"};case"tag":return{type:"term",subtype:"post_tag"};case"post_format":return{type:"post-format"};default:return"taxonomy"===t?{type:"term",subtype:e}:"post-type"===t?{type:"post",subtype:e}:{initialSuggestionsSearchOptions:{type:"post",subtype:"page",perPage:20}}}}function Mh({clientId:e,onBack:t,onSelectBlock:n}){const{rootBlockClientId:a}=(0,gt.useSelect)((t=>{const{getBlockRootClientId:n}=t(nt.store);return{rootBlockClientId:n(e)}}),[e]),o=(0,jt.useFocusOnMount)("firstElement"),r=(0,jt.useInstanceId)(nt.__experimentalLinkControl,"link-ui-block-inserter__title"),l=(0,jt.useInstanceId)(nt.__experimentalLinkControl,"link-ui-block-inserter__description");return e?(0,Ke.createElement)("div",{className:"link-ui-block-inserter",role:"dialog","aria-labelledby":r,"aria-describedby":l,ref:o},(0,Ke.createElement)(et.VisuallyHidden,null,(0,Ke.createElement)("h2",{id:r},(0,tt.__)("Add block")),(0,Ke.createElement)("p",{id:l},(0,tt.__)("Choose a block to add to your Navigation."))),(0,Ke.createElement)(et.Button,{className:"link-ui-block-inserter__back",icon:Nh,onClick:e=>{e.preventDefault(),t()},size:"small"},(0,tt.__)("Back")),(0,Ke.createElement)(Ih,{rootClientId:a,clientId:e,isAppender:!1,prioritizePatterns:!1,selectBlockOnInsert:!0,hasSearch:!1,onSelect:n})):null}function zh(e){const[t,n]=(0,_t.useState)(!1),[a,o]=(0,_t.useState)(!1),[r,l]=(0,_t.useState)(!0),{saveEntityRecord:i}=(0,gt.useDispatch)(dt.store),s=(0,dt.useResourcePermissions)("pages"),c=(0,dt.useResourcePermissions)("posts");const{label:m,url:u,opensInNewTab:p,type:d,kind:g}=e.link;let h=!1;d&&"page"!==d?"post"===d&&(h=c.canCreate):h=s.canCreate;const b=(0,_t.useMemo)((()=>({url:u,opensInNewTab:p,title:m&&(0,ac.__unstableStripHTML)(m)})),[m,p,u]),_=(0,jt.useInstanceId)(zh,"link-ui-link-control__title"),y=(0,jt.useInstanceId)(zh,"link-ui-link-control__description"),{onClose:v}=e;return(0,Ke.createElement)(Ke.Fragment,null,r&&(0,Ke.createElement)("div",{className:"components-popover-pointer-events-trap","aria-hidden":"true",onClick:()=>l(!1)}),(0,Ke.createElement)(et.Popover,{placement:"bottom",onClose:e.onClose,anchor:e.anchor,shift:!0},!t&&(0,Ke.createElement)("div",{role:"dialog","aria-labelledby":_,"aria-describedby":y},(0,Ke.createElement)(et.VisuallyHidden,null,(0,Ke.createElement)("h2",{id:_},(0,tt.__)("Add link")),(0,Ke.createElement)("p",{id:y},(0,tt.__)("Search for and add a link to your Navigation."))),(0,Ke.createElement)(nt.__experimentalLinkControl,{hasTextControl:!0,hasRichPreviews:!0,value:b,showInitialSuggestions:!0,withCreateSuggestion:h,createSuggestion:async function(t){const n=e.link.type||"page",a=await i("postType",n,{title:t,status:"draft"});return{id:a.id,type:n,title:(0,Jn.decodeEntities)(a.title.rendered),url:a.link,kind:"post-type"}},createSuggestionButtonText:e=>{let t;return t="post"===d?(0,tt.__)("Create draft post: <mark>%s</mark>"):(0,tt.__)("Create draft page: <mark>%s</mark>"),(0,_t.createInterpolateElement)((0,tt.sprintf)(t,e),{mark:(0,Ke.createElement)("mark",null)})},noDirectEntry:!!d,noURLSuggestion:!!d,suggestionsQuery:Ph(d,g),onChange:e.onChange,onRemove:e.onRemove,onCancel:e.onCancel,renderControlBottom:()=>!b?.url?.length&&(0,Ke.createElement)(Rh,{focusAddBlockButton:a,setAddingBlock:()=>{n(!0),o(!1)}})})),t&&(0,Ke.createElement)(Mh,{clientId:e.clientId,onBack:()=>{n(!1),o(!0)},onSelectBlock:v})))}const Rh=({setAddingBlock:e,focusAddBlockButton:t})=>{const n=(0,_t.useRef)();return(0,_t.useEffect)((()=>{t&&n.current?.focus()}),[t]),(0,Ke.createElement)(et.__experimentalVStack,{className:"link-ui-tools"},(0,Ke.createElement)(et.Button,{ref:n,icon:Th,onClick:t=>{t.preventDefault(),e(!0)},"aria-haspopup":"listbox"},(0,tt.__)("Add block")))},Ah=(0,tt.__)("Switch to '%s'"),Hh=["core/navigation-link","core/navigation-submenu"],{PrivateListView:Lh}=Ft(nt.privateApis);function Dh({block:e,insertedBlock:t,setInsertedBlock:n}){const{updateBlockAttributes:a}=(0,gt.useDispatch)(nt.store),o=Hh?.includes(t?.name),r=t?.clientId===e.clientId;if(!(o&&r))return null;return(0,Ke.createElement)(zh,{clientId:t?.clientId,link:t?.attributes,onClose:()=>{n(null)},onChange:e=>{var o;Bh(e,(o=t?.clientId,e=>{o&&a(o,e)}),t?.attributes),n(null)},onCancel:()=>{n(null)}})}const Fh=({clientId:e,currentMenuId:t,isLoading:n,isNavigationMenuMissing:a,onCreateNew:o})=>{const r=(0,gt.useSelect)((t=>!!t(nt.store).getBlockCount(e)),[e]),{navigationMenu:l}=Rg(t);if(t&&a)return(0,Ke.createElement)(yh,{onCreateNew:o});if(n)return(0,Ke.createElement)(et.Spinner,null);const i=l?(0,tt.sprintf)((0,tt.__)("Structure for navigation menu: %s"),l?.title||(0,tt.__)("Untitled menu")):(0,tt.__)("You have not yet created any menus. Displaying a list of your Pages");return(0,Ke.createElement)("div",{className:"wp-block-navigation__menu-inspector-controls"},!r&&(0,Ke.createElement)("p",{className:"wp-block-navigation__menu-inspector-controls__empty-message"},(0,tt.__)("This navigation menu is empty.")),(0,Ke.createElement)(Lh,{rootClientId:e,isExpanded:!0,description:i,showAppender:!0,blockSettingsMenu:Ch,additionalBlockContent:Dh}))},Vh=e=>{const{createNavigationMenuIsSuccess:t,createNavigationMenuIsError:n,currentMenuId:a=null,onCreateNew:o,onSelectClassicMenu:r,onSelectNavigationMenu:l,isManageMenusButtonDisabled:i,blockEditingMode:s}=e;return(0,Ke.createElement)(nt.InspectorControls,{group:"list"},(0,Ke.createElement)(et.PanelBody,{title:null},(0,Ke.createElement)(et.__experimentalHStack,{className:"wp-block-navigation-off-canvas-editor__header"},(0,Ke.createElement)(et.__experimentalHeading,{className:"wp-block-navigation-off-canvas-editor__title",level:2},(0,tt.__)("Menu")),"default"===s&&(0,Ke.createElement)(Dg,{currentMenuId:a,onSelectClassicMenu:r,onSelectNavigationMenu:l,onCreateNew:o,createNavigationMenuIsSuccess:t,createNavigationMenuIsError:n,actionLabel:Ah,isManageMenusButtonDisabled:i})),(0,Ke.createElement)(Fh,{...e})))};function $h({id:e,children:t}){return(0,Ke.createElement)(et.VisuallyHidden,null,(0,Ke.createElement)("div",{id:e,className:"wp-block-navigation__description"},t))}function Oh({id:e}){const[t]=(0,dt.useEntityProp)("postType","wp_navigation","title"),n=(0,tt.sprintf)((0,tt.__)('Navigation menu: "%s"'),t);return(0,Ke.createElement)($h,{id:e},n)}const Gh=(0,nt.withColors)({textColor:"color"},{backgroundColor:"color"},{overlayBackgroundColor:"color"},{overlayTextColor:"color"})((function({attributes:e,setAttributes:t,clientId:n,isSelected:a,className:o,backgroundColor:r,setBackgroundColor:l,textColor:i,setTextColor:s,overlayBackgroundColor:c,setOverlayBackgroundColor:m,overlayTextColor:u,setOverlayTextColor:p,hasSubmenuIndicatorSetting:d=!0,customPlaceholder:g=null,__unstableLayoutClassNames:h}){const{openSubmenusOnClick:b,overlayMenu:_,showSubmenuIcon:y,templateLock:v,layout:{justifyContent:f,orientation:k="horizontal",flexWrap:x="wrap"}={},hasIcon:w,icon:E="handle"}=e,C=e.ref,S=(0,_t.useCallback)((e=>{t({ref:e})}),[t]),B=`navigationMenu/${C}`,N=(0,nt.useHasRecursion)(B),T=(0,nt.useBlockEditingMode)(),{menus:I}=Ag(),[P,M]=Qg({name:"block-library/core/navigation/status"}),[z,R]=Qg({name:"block-library/core/navigation/classic-menu-conversion"}),[A,H]=Qg({name:"block-library/core/navigation/permissions/update"}),{create:L,status:D,error:F,value:V,isPending:$,isSuccess:O,isError:G}=function(e){const[t,n]=(0,_t.useState)(uh),[a,o]=(0,_t.useState)(null),[r,l]=(0,_t.useState)(null),{saveEntityRecord:i,editEntityRecord:s}=(0,gt.useDispatch)(dt.store),c=ih(e),m=(0,_t.useCallback)((async(e=null,t=[],a)=>{if(e&&"string"!=typeof e)throw l("Invalid title supplied when creating Navigation Menu."),n(ch),new Error("Value of supplied title argument was not a string.");n(mh),o(null),l(null),e||(e=await c().catch((e=>{throw l(e?.message),n(ch),new Error("Failed to create title when saving new Navigation Menu.",{cause:e})})));const r={title:e,content:(0,Qe.serialize)(t),status:a};return i("postType","wp_navigation",r).then((e=>(o(e),n(sh),"publish"!==a&&s("postType","wp_navigation",e.id,{status:"publish"}),e))).catch((e=>{throw l(e?.message),n(ch),new Error("Unable to save new Navigation Menu",{cause:e})}))}),[i,s,c]);return{create:m,status:t,value:a,error:r,isIdle:t===uh,isPending:t===mh,isSuccess:t===sh,isError:t===ch}}(n),U=async()=>{await L("")},{hasUncontrolledInnerBlocks:q,uncontrolledInnerBlocks:j,isInnerBlockSelected:W,innerBlocks:Z}=function(e){return(0,gt.useSelect)((t=>{const{getBlock:n,getBlocks:a,hasSelectedInnerBlock:o}=t(nt.store),r=n(e).innerBlocks,l=!!r?.length,i=l?ph:a(e);return{innerBlocks:l?r:i,hasUncontrolledInnerBlocks:l,uncontrolledInnerBlocks:r,controlledInnerBlocks:i,isInnerBlockSelected:o(e,!0)}}),[e])}(n),Q=!!Z.find((e=>"core/navigation-submenu"===e.name)),{replaceInnerBlocks:K,selectBlock:Y,__unstableMarkNextChangeAsNotPersistent:J}=(0,gt.useDispatch)(nt.store),[X,ee]=(0,_t.useState)(!1),[te,ne]=(0,_t.useState)(!1),{hasResolvedNavigationMenus:ae,isNavigationMenuResolved:oe,isNavigationMenuMissing:re,canUserUpdateNavigationMenu:le,hasResolvedCanUserUpdateNavigationMenu:ie,canUserDeleteNavigationMenu:se,hasResolvedCanUserDeleteNavigationMenu:ce,canUserCreateNavigationMenu:me,isResolvingCanUserCreateNavigationMenu:ue,hasResolvedCanUserCreateNavigationMenu:pe}=Rg(C),de=ae&&re,{convert:ge,status:he,error:be}=ah(L),_e=he===th,ye=(0,_t.useCallback)(((e,t={focusNavigationBlock:!1})=>{const{focusNavigationBlock:a}=t;S(e),a&&Y(n)}),[Y,n,S]),ve=!re&&oe,fe=q&&!ve,{getNavigationFallbackId:ke}=Ft((0,gt.useSelect)(dt.store)),xe=C||fe?null:ke();(0,_t.useEffect)((()=>{C||fe||!xe||(J(),S(xe))}),[C,S,fe,xe,J]);const we=(0,_t.useRef)(),Ee="nav",Ce=!C&&!$&&!_e&&ae&&0===I?.length&&!q,Se=!ae||$||_e||!(!C||ve||_e),Be=e.style?.typography?.textDecoration,Ne=(0,gt.useSelect)((e=>e(nt.store).__unstableHasActiveBlockOverlayActive(n)),[n]),Te="never"!==_,Ie=(0,nt.useBlockProps)({ref:we,className:ut()(o,{"items-justified-right":"right"===f,"items-justified-space-between":"space-between"===f,"items-justified-left":"left"===f,"items-justified-center":"center"===f,"is-vertical":"vertical"===k,"no-wrap":"nowrap"===x,"is-responsive":Te,"has-text-color":!!i.color||!!i?.class,[(0,nt.getColorClassName)("color",i?.slug)]:!!i?.slug,"has-background":!!r.color||r.class,[(0,nt.getColorClassName)("background-color",r?.slug)]:!!r?.slug,[`has-text-decoration-${Be}`]:Be,"block-editor-block-content-overlay":Ne},h),style:{color:!i?.slug&&i?.color,backgroundColor:!r?.slug&&r?.color}}),Pe="web"===_t.Platform.OS,[Me,ze]=(0,_t.useState)(),[Re,Ae]=(0,_t.useState)(),[He,Le]=(0,_t.useState)(),[De,Fe]=(0,_t.useState)(),Ve=async e=>ge(e.id,e.name,"draft"),$e=e=>{ye(e)};(0,_t.useEffect)((()=>{M(),$&&(0,Bg.speak)((0,tt.__)("Creating Navigation Menu.")),O&&(ye(V?.id,{focusNavigationBlock:!0}),P((0,tt.__)("Navigation Menu successfully created."))),G&&P((0,tt.__)("Failed to create Navigation Menu."))}),[D,F,V?.id,G,O,$,ye,M,P]),(0,_t.useEffect)((()=>{R(),he===th&&(0,Bg.speak)((0,tt.__)("Classic menu importing.")),he===Xg&&(z((0,tt.__)("Classic menu imported successfully.")),ye(V?.id,{focusNavigationBlock:!0})),he===eh&&z((0,tt.__)("Classic menu import failed."))}),[he,be,R,z,V?.id,ye]),(0,_t.useEffect)((()=>{if(!Pe)return;gh(we.current,Ae,ze);const e=we.current?.querySelector('[data-type="core/navigation-submenu"] [data-type="core/navigation-link"]');e&&(u.color||c.color)&&gh(e,Fe,Le)}),[Pe,u.color,c.color]),(0,_t.useEffect)((()=>{a||W||H(),(a||W)&&(C&&!de&&ie&&!le&&A((0,tt.__)("You do not have permission to edit this Menu. Any changes made will not be saved.")),C||!pe||me||A((0,tt.__)("You do not have permission to create Navigation Menus.")))}),[a,W,le,ie,me,pe,C,H,A,de]);const Oe=me||le,Ge=ut()("wp-block-navigation__overlay-menu-preview",{open:te}),Ue=y||b?"":(0,tt.__)('The current menu options offer reduced accessibility for users and are not recommended. Enabling either "Open on Click" or "Show arrow" offers enhanced accessibility by allowing keyboard users to browse submenus selectively.'),qe=(0,_t.useRef)(!0);(0,_t.useEffect)((()=>{!qe.current&&Ue&&(0,Bg.speak)(Ue),qe.current=!1}),[Ue]);const je=(0,jt.useInstanceId)(Kg,"overlay-menu-preview"),We=(0,nt.__experimentalUseMultipleOriginColorsAndGradients)(),Ze=(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,d&&(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Display")},Te&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.Button,{className:Ge,onClick:()=>{ne(!te)},"aria-label":(0,tt.__)("Overlay menu controls"),"aria-controls":je,"aria-expanded":te},w&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)($g,{icon:E}),(0,Ke.createElement)(Ng,{icon:Tg})),!w&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("span",null,(0,tt.__)("Menu")),(0,Ke.createElement)("span",null,(0,tt.__)("Close")))),(0,Ke.createElement)("div",{id:je},te&&(0,Ke.createElement)(Kg,{setAttributes:t,hasIcon:w,icon:E,hidden:!te}))),(0,Ke.createElement)("h3",null,(0,tt.__)("Overlay Menu")),(0,Ke.createElement)(et.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Configure overlay menu"),value:_,help:(0,tt.__)("Collapses the navigation options in a menu icon opening an overlay."),onChange:e=>t({overlayMenu:e}),isBlock:!0,hideLabelFromVision:!0},(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"never",label:(0,tt.__)("Off")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"mobile",label:(0,tt.__)("Mobile")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"always",label:(0,tt.__)("Always")})),Q&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("h3",null,(0,tt.__)("Submenus")),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,checked:b,onChange:e=>{t({openSubmenusOnClick:e,...e&&{showSubmenuIcon:!0}})},label:(0,tt.__)("Open on click")}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,checked:y,onChange:e=>{t({showSubmenuIcon:e})},disabled:e.openSubmenusOnClick,label:(0,tt.__)("Show arrow")}),Ue&&(0,Ke.createElement)("div",null,(0,Ke.createElement)(et.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},Ue))))),We.hasColorsOrGradients&&(0,Ke.createElement)(nt.InspectorControls,{group:"color"},(0,Ke.createElement)(nt.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:i.color,label:(0,tt.__)("Text"),onColorChange:s,resetAllFilter:()=>s()},{colorValue:r.color,label:(0,tt.__)("Background"),onColorChange:l,resetAllFilter:()=>l()},{colorValue:u.color,label:(0,tt.__)("Submenu & overlay text"),onColorChange:p,resetAllFilter:()=>p()},{colorValue:c.color,label:(0,tt.__)("Submenu & overlay background"),onColorChange:m,resetAllFilter:()=>m()}],panelId:n,...We,gradients:[],disableCustomGradients:!0}),Pe&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.ContrastChecker,{backgroundColor:Me,textColor:Re}),(0,Ke.createElement)(nt.ContrastChecker,{backgroundColor:He,textColor:De})))),Ye=`${n}-desc`,Je=!Oe||!ae;if(fe&&!$)return(0,Ke.createElement)(Ee,{...Ie,"aria-describedby":Ce?void 0:Ye},(0,Ke.createElement)($h,{id:Ye},(0,tt.__)("Unsaved Navigation Menu.")),(0,Ke.createElement)(Vh,{clientId:n,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:G,currentMenuId:C,isNavigationMenuMissing:re,isManageMenusButtonDisabled:Je,onCreateNew:U,onSelectClassicMenu:Ve,onSelectNavigationMenu:$e,isLoading:Se,blockEditingMode:T}),"default"===T&&Ze,(0,Ke.createElement)(Og,{id:n,onToggle:ee,isOpen:X,hasIcon:w,icon:E,isResponsive:Te,isHiddenByDefault:"always"===_,overlayBackgroundColor:c,overlayTextColor:u},(0,Ke.createElement)(Wg,{createNavigationMenu:L,blocks:j,hasSelection:a||W})));if(C&&re)return(0,Ke.createElement)(Ee,{...Ie},(0,Ke.createElement)(Vh,{clientId:n,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:G,currentMenuId:C,isNavigationMenuMissing:re,isManageMenusButtonDisabled:Je,onCreateNew:U,onSelectClassicMenu:Ve,onSelectNavigationMenu:$e,isLoading:Se,blockEditingMode:T}),(0,Ke.createElement)(yh,{onCreateNew:U}));if(ve&&N)return(0,Ke.createElement)("div",{...Ie},(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Block cannot be rendered inside itself.")));const Xe=g||Fg;return Ce&&g?(0,Ke.createElement)(Ee,{...Ie},(0,Ke.createElement)(Xe,{isSelected:a,currentMenuId:C,clientId:n,canUserCreateNavigationMenu:me,isResolvingCanUserCreateNavigationMenu:ue,onSelectNavigationMenu:$e,onSelectClassicMenu:Ve,onCreateEmpty:U})):(0,Ke.createElement)(dt.EntityProvider,{kind:"postType",type:"wp_navigation",id:C},(0,Ke.createElement)(nt.RecursionProvider,{uniqueId:B},(0,Ke.createElement)(Vh,{clientId:n,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:G,currentMenuId:C,isNavigationMenuMissing:re,isManageMenusButtonDisabled:Je,onCreateNew:U,onSelectClassicMenu:Ve,onSelectNavigationMenu:$e,isLoading:Se,blockEditingMode:T}),"default"===T&&Ze,"default"===T&&ve&&(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},ie&&le&&(0,Ke.createElement)(Ug,null),ce&&se&&(0,Ke.createElement)(Zg,{onDelete:(e="")=>{K(n,[]),P((0,tt.sprintf)((0,tt.__)("Navigation menu %s successfully deleted."),e))}}),(0,Ke.createElement)(_h,{disabled:Je,className:"wp-block-navigation-manage-menus-button"})),(0,Ke.createElement)(Ee,{...Ie,"aria-describedby":Ce||Se?void 0:Ye},Se&&(0,Ke.createElement)("div",{className:"wp-block-navigation__loading-indicator-container"},(0,Ke.createElement)(et.Spinner,{className:"wp-block-navigation__loading-indicator"})),!Se&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Oh,{id:Ye}),(0,Ke.createElement)(Og,{id:n,onToggle:ee,hasIcon:w,icon:E,isOpen:X,isResponsive:Te,isHiddenByDefault:"always"===_,overlayBackgroundColor:c,overlayTextColor:u},ve&&(0,Ke.createElement)(Gg,{clientId:n,hasCustomPlaceholder:!!g,templateLock:v,orientation:k}))))))}));const Uh={fontStyle:"var:preset|font-style|",fontWeight:"var:preset|font-weight|",textDecoration:"var:preset|text-decoration|",textTransform:"var:preset|text-transform|"},qh=({navigationMenuId:e,...t})=>({...t,ref:e}),jh=e=>{if(e.layout)return e;const{itemsJustification:t,orientation:n,...a}=e;return(t||n)&&Object.assign(a,{layout:{type:"flex",...t&&{justifyContent:t},...n&&{orientation:n}}}),a},Wh={attributes:{navigationMenuId:{type:"number"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"mobile"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},save:()=>(0,Ke.createElement)(nt.InnerBlocks.Content,null),isEligible:({navigationMenuId:e})=>!!e,migrate:qh},Zh={attributes:{navigationMenuId:{type:"number"},orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"never"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}}},save:()=>(0,Ke.createElement)(nt.InnerBlocks.Content,null),isEligible:({itemsJustification:e,orientation:t})=>!!e||!!t,migrate:(0,jt.compose)(qh,jh)},Qh={attributes:{orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"never"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}}},save:()=>(0,Ke.createElement)(nt.InnerBlocks.Content,null),migrate:(0,jt.compose)(qh,jh,ln),isEligible:({style:e})=>e?.typography?.fontFamily},Kh=[Wh,Zh,Qh,{attributes:{orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},isResponsive:{type:"boolean",default:"false"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0}},isEligible:e=>e.isResponsive,migrate:(0,jt.compose)(qh,jh,ln,(function(e){return delete e.isResponsive,{...e,overlayMenu:"mobile"}})),save:()=>(0,Ke.createElement)(nt.InnerBlocks.Content,null)},{attributes:{orientation:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,fontSize:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,color:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},save:()=>(0,Ke.createElement)(nt.InnerBlocks.Content,null),isEligible(e){if(!e.style||!e.style.typography)return!1;for(const t in Uh){const n=e.style.typography[t];if(n&&n.startsWith(Uh[t]))return!0}return!1},migrate:(0,jt.compose)(qh,jh,ln,(function(e){var t;return{...e,style:{...e.style,typography:Object.fromEntries(Object.entries(null!==(t=e.style.typography)&&void 0!==t?t:{}).map((([e,t])=>{const n=Uh[e];if(n&&t.startsWith(n)){const a=t.slice(n.length);return"textDecoration"===e&&"strikethrough"===a?[e,"line-through"]:[e,a]}return[e,t]})))}}}))},{attributes:{className:{type:"string"},textColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean"}},isEligible:e=>e.rgbTextColor||e.rgbBackgroundColor,supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0},migrate:(0,jt.compose)(qh,(e=>{const{rgbTextColor:t,rgbBackgroundColor:n,...a}=e;return{...a,customTextColor:e.textColor?void 0:e.rgbTextColor,customBackgroundColor:e.backgroundColor?void 0:e.rgbBackgroundColor}})),save:()=>(0,Ke.createElement)(nt.InnerBlocks.Content,null)}],Yh=Kh,Jh={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/navigation",title:"Navigation",category:"theme",allowedBlocks:["core/navigation-link","core/search","core/social-links","core/page-list","core/spacer","core/home-link","core/site-title","core/site-logo","core/navigation-submenu","core/loginout","core/buttons"],description:"A collection of blocks that allow visitors to get around your site.",keywords:["menu","navigation","links"],textdomain:"default",attributes:{ref:{type:"number"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"mobile"},icon:{type:"string",default:"handle"},hasIcon:{type:"boolean",default:!0},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"},maxNestingLevel:{type:"number",default:5},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},providesContext:{textColor:"textColor",customTextColor:"customTextColor",backgroundColor:"backgroundColor",customBackgroundColor:"customBackgroundColor",overlayTextColor:"overlayTextColor",customOverlayTextColor:"customOverlayTextColor",overlayBackgroundColor:"overlayBackgroundColor",customOverlayBackgroundColor:"customOverlayBackgroundColor",fontSize:"fontSize",customFontSize:"customFontSize",showSubmenuIcon:"showSubmenuIcon",openSubmenusOnClick:"openSubmenusOnClick",style:"style",maxNestingLevel:"maxNestingLevel"},supports:{align:["wide","full"],ariaLabel:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalLetterSpacing:!0,__experimentalTextDecoration:!0,__experimentalSkipSerialization:["textDecoration"],__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}},layout:{allowSwitching:!1,allowInheriting:!1,allowVerticalAlignment:!1,allowSizingOnChildren:!0,default:{type:"flex"}},__experimentalStyle:{elements:{link:{color:{text:"inherit"}}}},interactivity:!0,renaming:!1},editorStyle:"wp-block-navigation-editor",style:"wp-block-navigation"},{name:Xh}=Jh,eb={icon:Sg,example:{attributes:{overlayMenu:"never"},innerBlocks:[{name:"core/navigation-link",attributes:{label:(0,tt.__)("Home"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,tt.__)("About"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,tt.__)("Contact"),url:"https://make.wordpress.org/"}}]},edit:Gh,save:function({attributes:e}){if(!e.ref)return(0,Ke.createElement)(nt.InnerBlocks.Content,null)},deprecated:Yh},tb=()=>Xe({name:Xh,metadata:Jh,settings:eb}),nb=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M12.5 14.5h-1V16h1c2.2 0 4-1.8 4-4s-1.8-4-4-4h-1v1.5h1c1.4 0 2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5zm-4 1.5v-1.5h-1C6.1 14.5 5 13.4 5 12s1.1-2.5 2.5-2.5h1V8h-1c-2.2 0-4 1.8-4 4s1.8 4 4 4h1zm-1-3.2h5v-1.5h-5v1.5zM18 4H9c-1.1 0-2 .9-2 2v.5h1.5V6c0-.3.2-.5.5-.5h9c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5v-.5H7v.5c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2z"})),ab={name:"core/navigation-link"};const ob=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,Ke.createElement)(Ye.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})),rb=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})),lb=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z"}));function ib(e){switch(e){case"post":return Sp;case"page":return ob;case"tag":return rb;case"category":return Yn;default:return lb}}function sb(e,t){if("core/navigation-link"!==t)return e;if(e.variations){const t=(e,t)=>e.type===t.type,n=e.variations.map((e=>({...e,...!e.icon&&{icon:ib(e.name)},...!e.isActive&&{isActive:t}})));return{...e,variations:n}}return e}const cb={from:[{type:"block",blocks:["core/site-logo"],transform:()=>(0,Qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/spacer"],transform:()=>(0,Qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/home-link"],transform:()=>(0,Qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,Qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/search"],transform:()=>(0,Qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/page-list"],transform:()=>(0,Qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/buttons"],transform:()=>(0,Qe.createBlock)("core/navigation-link")}],to:[{type:"block",blocks:["core/navigation-submenu"],transform:(e,t)=>(0,Qe.createBlock)("core/navigation-submenu",e,t)},{type:"block",blocks:["core/spacer"],transform:()=>(0,Qe.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],transform:()=>(0,Qe.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],transform:()=>(0,Qe.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,Qe.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],transform:()=>(0,Qe.createBlock)("core/search",{showLabel:!1,buttonUseIcon:!0,buttonPosition:"button-inside"})},{type:"block",blocks:["core/page-list"],transform:()=>(0,Qe.createBlock)("core/page-list")},{type:"block",blocks:["core/buttons"],transform:({label:e,url:t,rel:n,title:a,opensInNewTab:o})=>(0,Qe.createBlock)("core/buttons",{},[(0,Qe.createBlock)("core/button",{text:e,url:t,rel:n,title:a,linkTarget:o?"_blank":void 0})])}]},mb=cb,ub={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/navigation-link",title:"Custom Link",category:"design",parent:["core/navigation"],allowedBlocks:["core/navigation-link","core/navigation-submenu","core/page-list"],description:"Add a page, link, or another item to your navigation.",textdomain:"default",attributes:{label:{type:"string"},type:{type:"string"},description:{type:"string"},rel:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"},title:{type:"string"},kind:{type:"string"},isTopLevelLink:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","style"],supports:{reusable:!1,html:!1,__experimentalSlashInserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},renaming:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-navigation-link-editor",style:"wp-block-navigation-link"},{name:pb}=ub,db={icon:nb,__experimentalLabel:({label:e})=>e,merge:(e,{label:t=""})=>({...e,label:e.label+t}),edit:function({attributes:e,isSelected:t,setAttributes:n,insertBlocksAfter:a,mergeBlocks:o,onReplace:r,context:l,clientId:i}){const{id:s,label:c,type:m,url:u,description:p,rel:d,title:g,kind:h}=e,[b,_]=((e,t,n)=>{const a="post-type"===e||"post"===t||"page"===t,o=Number.isInteger(n),r=(0,gt.useSelect)((e=>{if(!a)return null;const{getEntityRecord:o}=e(dt.store);return o("postType",t,n)?.status}),[a,t,n]);return[a&&o&&r&&"trash"===r,"draft"===r]})(h,m,s),{maxNestingLevel:y}=l,{replaceBlock:v,__unstableMarkNextChangeAsNotPersistent:f}=(0,gt.useDispatch)(nt.store),[k,x]=(0,_t.useState)(!1),[w,E]=(0,_t.useState)(null),C=(0,_t.useRef)(null),S=(e=>{const[t,n]=(0,_t.useState)(!1);return(0,_t.useEffect)((()=>{const{ownerDocument:t}=e.current;function a(e){r(e)}function o(){n(!1)}function r(t){e.current.contains(t.target)?n(!0):n(!1)}return t.addEventListener("dragstart",a),t.addEventListener("dragend",o),t.addEventListener("dragenter",r),()=>{t.removeEventListener("dragstart",a),t.removeEventListener("dragend",o),t.removeEventListener("dragenter",r)}}),[]),t})(C),B=(0,tt.__)("Add label…"),N=(0,_t.useRef)(),[T,I]=(0,_t.useState)(!1),{innerBlocks:P,isAtMaxNesting:M,isTopLevelLink:z,isParentOfSelectedBlock:R,hasChildren:A}=(0,gt.useSelect)((e=>{const{getBlocks:t,getBlockCount:n,getBlockName:a,getBlockRootClientId:o,hasSelectedInnerBlock:r,getBlockParentsByBlockName:l}=e(nt.store);return{innerBlocks:t(i),isAtMaxNesting:l(i,["core/navigation-link","core/navigation-submenu"]).length>=y,isTopLevelLink:"core/navigation"===a(o(i)),isParentOfSelectedBlock:r(i,!0),hasChildren:!!n(i)}}),[i]);function H(){const t=(0,Qe.createBlock)("core/navigation-submenu",e,P.length>0?P:[(0,Qe.createBlock)("core/navigation-link")]);v(i,t)}(0,_t.useEffect)((()=>{u||x(!0)}),[u]),(0,_t.useEffect)((()=>{A&&(f(),H())}),[A]),(0,_t.useEffect)((()=>{t||x(!1)}),[t]),(0,_t.useEffect)((()=>{k&&u&&((0,pt.isURL)((0,pt.prependHTTP)(c))&&/^.+\.[a-z]+/.test(c)?function(){N.current.focus();const{ownerDocument:e}=N.current,{defaultView:t}=e,n=t.getSelection(),a=e.createRange();a.selectNodeContents(N.current),n.removeAllRanges(),n.addRange(a)}():(0,ac.placeCaretAtHorizontalEdge)(N.current,!0))}),[u]);const{textColor:L,customTextColor:D,backgroundColor:F,customBackgroundColor:V}=hh(l,!z),$=(0,nt.useBlockProps)({ref:(0,jt.useMergeRefs)([E,C]),className:ut()("wp-block-navigation-item",{"is-editing":t||R,"is-dragging-within":S,"has-link":!!u,"has-child":A,"has-text-color":!!L||!!D,[(0,nt.getColorClassName)("color",L)]:!!L,"has-background":!!F||V,[(0,nt.getColorClassName)("background-color",F)]:!!F}),style:{color:!L&&D,backgroundColor:!F&&V},onKeyDown:function(e){(fn.isKeyboardEvent.primary(e,"k")||(!u||_||b)&&e.keyCode===fn.ENTER)&&(e.preventDefault(),x(!0))}}),O=(0,nt.useInnerBlocksProps)({...$,className:"remove-outline"},{defaultBlock:ab,directInsert:!0,renderAppender:!1});(!u||b||_)&&($.onClick=()=>x(!0));const G=ut()("wp-block-navigation-item__content",{"wp-block-navigation-link__placeholder":!u||b||_}),U=function(e){let t="";switch(e){case"post":t=(0,tt.__)("Select post");break;case"page":t=(0,tt.__)("Select page");break;case"category":t=(0,tt.__)("Select category");break;case"tag":t=(0,tt.__)("Select tag");break;default:t=(0,tt.__)("Add link")}return t}(m),q=`(${b?(0,tt.__)("Invalid"):(0,tt.__)("Draft")})`,j=b||_?(0,tt.__)("This item has been deleted, or is a draft"):(0,tt.__)("This item is missing a link");return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.ToolbarButton,{name:"link",icon:kn,title:(0,tt.__)("Link"),shortcut:fn.displayShortcut.primary("k"),onClick:()=>x(!0)}),!M&&(0,Ke.createElement)(et.ToolbarButton,{name:"submenu",icon:vh,title:(0,tt.__)("Add submenu"),onClick:H}))),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,value:c?(0,ac.__unstableStripHTML)(c):"",onChange:e=>{n({label:e})},label:(0,tt.__)("Label"),autoComplete:"off",onFocus:()=>I(!0),onBlur:()=>I(!1)}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,value:u?(0,pt.safeDecodeURI)(u):"",onChange:t=>{Bh({url:t},n,e)},label:(0,tt.__)("URL"),autoComplete:"off"}),(0,Ke.createElement)(et.TextareaControl,{__nextHasNoMarginBottom:!0,value:p||"",onChange:e=>{n({description:e})},label:(0,tt.__)("Description"),help:(0,tt.__)("The description will be displayed in the menu if the current theme supports it.")}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,value:g||"",onChange:e=>{n({title:e})},label:(0,tt.__)("Title attribute"),autoComplete:"off",help:(0,tt.__)("Additional information to help clarify the purpose of the link.")}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,value:d||"",onChange:e=>{n({rel:e})},label:(0,tt.__)("Rel attribute"),autoComplete:"off",help:(0,tt.__)("The relationship of the linked URL as space-separated link types.")}))),(0,Ke.createElement)("div",{...$},(0,Ke.createElement)("a",{className:G},u?(0,Ke.createElement)(Ke.Fragment,null,!b&&!_&&!T&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.RichText,{ref:N,identifier:"label",className:"wp-block-navigation-item__label",value:c,onChange:e=>n({label:e}),onMerge:o,onReplace:r,__unstableOnSplitAtEnd:()=>a((0,Qe.createBlock)("core/navigation-link")),"aria-label":(0,tt.__)("Navigation link text"),placeholder:B,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"],onClick:()=>{u||x(!0)}}),p&&(0,Ke.createElement)("span",{className:"wp-block-navigation-item__description"},p)),(b||_||T)&&(0,Ke.createElement)("div",{className:"wp-block-navigation-link__placeholder-text wp-block-navigation-link__label"},(0,Ke.createElement)(et.Tooltip,{text:j},(0,Ke.createElement)("span",{"aria-label":(0,tt.__)("Navigation link text")},`${(0,Jn.decodeEntities)(c)} ${b||_?q:""}`.trim())))):(0,Ke.createElement)("div",{className:"wp-block-navigation-link__placeholder-text"},(0,Ke.createElement)(et.Tooltip,{text:j},(0,Ke.createElement)("span",null,U))),k&&(0,Ke.createElement)(zh,{clientId:i,link:e,onClose:()=>{u||r([])},anchor:w,onRemove:function(){n({url:void 0,label:void 0,id:void 0,kind:void 0,type:void 0,opensInNewTab:!1}),x(!1)},onChange:t=>{Bh(t,n,e)}})),(0,Ke.createElement)("div",{...O})))},save:function(){return(0,Ke.createElement)(nt.InnerBlocks.Content,null)},example:{attributes:{label:(0,tt._x)("Example Link","navigation link preview example"),url:"https://example.com"}},deprecated:[{isEligible:e=>e.nofollow,attributes:{label:{type:"string"},type:{type:"string"},nofollow:{type:"boolean"},description:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"}},migrate:({nofollow:e,...t})=>({rel:e?"nofollow":"",...t}),save:()=>(0,Ke.createElement)(nt.InnerBlocks.Content,null)}],transforms:mb},gb=()=>((0,_i.addFilter)("blocks.registerBlockType","core/navigation-link",sb),Xe({name:pb,metadata:ub,settings:db})),hb=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m13.955 20.748 8-17.5-.91-.416L19.597 6H13.5v1.5h5.411l-1.6 3.5H13.5v1.5h3.126l-1.6 3.5H13.5l.028 1.5h.812l-1.295 2.832.91.416ZM17.675 16l-.686 1.5h4.539L21.5 16h-3.825Zm2.286-5-.686 1.5H21.5V11h-1.54ZM2 12c0 3.58 2.42 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.48 0-4.5-1.52-4.5-4S5.52 7.5 8 7.5h3.5V6H8c-3.58 0-6 2.42-6 6Z"})),bb=()=>(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},(0,Ke.createElement)(et.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})),_b=["core/navigation-link","core/navigation-submenu","core/page-list"],yb={name:"core/navigation-link"};const vb={to:[{type:"block",blocks:["core/navigation-link"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:e=>(0,Qe.createBlock)("core/navigation-link",e)},{type:"block",blocks:["core/spacer"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Qe.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Qe.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Qe.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Qe.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Qe.createBlock)("core/search")}]},fb=vb,kb={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/navigation-submenu",title:"Submenu",category:"design",parent:["core/navigation"],description:"Add a submenu to your navigation.",textdomain:"default",attributes:{label:{type:"string"},type:{type:"string"},description:{type:"string"},rel:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"},title:{type:"string"},kind:{type:"string"},isTopLevelItem:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","openSubmenusOnClick","style"],supports:{reusable:!1,html:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-navigation-submenu-editor",style:"wp-block-navigation-submenu"},{name:xb}=kb,wb={icon:({context:e})=>"list-view"===e?ob:vh,__experimentalLabel(e,{context:t}){const{label:n}=e,a=e?.metadata?.name;return"list-view"===t&&(a||n)&&e?.metadata?.name||n},edit:function({attributes:e,isSelected:t,setAttributes:n,mergeBlocks:a,onReplace:o,context:r,clientId:l}){const{label:i,type:s,url:c,description:m,rel:u,title:p}=e,{showSubmenuIcon:d,maxNestingLevel:g,openSubmenusOnClick:h}=r,{__unstableMarkNextChangeAsNotPersistent:b,replaceBlock:_}=(0,gt.useDispatch)(nt.store),[y,v]=(0,_t.useState)(!1),[f,k]=(0,_t.useState)(null),x=(0,_t.useRef)(null),w=(e=>{const[t,n]=(0,_t.useState)(!1);return(0,_t.useEffect)((()=>{const{ownerDocument:t}=e.current;function a(e){r(e)}function o(){n(!1)}function r(t){e.current.contains(t.target)?n(!0):n(!1)}return t.addEventListener("dragstart",a),t.addEventListener("dragend",o),t.addEventListener("dragenter",r),()=>{t.removeEventListener("dragstart",a),t.removeEventListener("dragend",o),t.removeEventListener("dragenter",r)}}),[]),t})(x),E=(0,tt.__)("Add text…"),C=(0,_t.useRef)(),S=(0,dt.useResourcePermissions)("pages"),B=(0,dt.useResourcePermissions)("posts"),{parentCount:N,isParentOfSelectedBlock:T,isImmediateParentOfSelectedBlock:I,hasChildren:P,selectedBlockHasChildren:M,onlyDescendantIsEmptyLink:z}=(0,gt.useSelect)((e=>{const{hasSelectedInnerBlock:t,getSelectedBlockClientId:n,getBlockParentsByBlockName:a,getBlock:o,getBlockCount:r,getBlockOrder:i}=e(nt.store);let s;const c=i(n());if(1===c?.length){const e=o(c[0]);s="core/navigation-link"===e?.name&&!e?.attributes?.label}return{parentCount:a(l,"core/navigation-submenu").length,isParentOfSelectedBlock:t(l,!0),isImmediateParentOfSelectedBlock:t(l,!1),hasChildren:!!r(l),selectedBlockHasChildren:!!c?.length,onlyDescendantIsEmptyLink:s}}),[l]),R=(0,jt.usePrevious)(P);(0,_t.useEffect)((()=>{h||c||v(!0)}),[]),(0,_t.useEffect)((()=>{t||v(!1)}),[t]),(0,_t.useEffect)((()=>{y&&c&&((0,pt.isURL)((0,pt.prependHTTP)(i))&&/^.+\.[a-z]+/.test(i)?function(){C.current.focus();const{ownerDocument:e}=C.current,{defaultView:t}=e,n=t.getSelection(),a=e.createRange();a.selectNodeContents(C.current),n.removeAllRanges(),n.addRange(a)}():(0,ac.placeCaretAtHorizontalEdge)(C.current,!0))}),[c]);let A=!1;s&&"page"!==s?"post"===s&&(A=B.canCreate):A=S.canCreate;const{textColor:H,customTextColor:L,backgroundColor:D,customBackgroundColor:F}=hh(r,N>0),V=(0,nt.useBlockProps)({ref:(0,jt.useMergeRefs)([k,x]),className:ut()("wp-block-navigation-item",{"is-editing":t||T,"is-dragging-within":w,"has-link":!!c,"has-child":P,"has-text-color":!!H||!!L,[(0,nt.getColorClassName)("color",H)]:!!H,"has-background":!!D||F,[(0,nt.getColorClassName)("background-color",D)]:!!D,"open-on-click":h}),style:{color:!H&&L,backgroundColor:!D&&F},onKeyDown:function(e){fn.isKeyboardEvent.primary(e,"k")&&(e.preventDefault(),v(!0))}}),$=hh(r,!0),O=N>=g?_b.filter((e=>"core/navigation-submenu"!==e)):_b,G=bh($),U=(0,nt.useInnerBlocksProps)(G,{allowedBlocks:O,defaultBlock:yb,directInsert:!0,__experimentalCaptureToolbars:!0,renderAppender:!!(t||I&&!M||P)&&nt.InnerBlocks.ButtonBlockAppender}),q=h?"button":"a";function j(){const t=(0,Qe.createBlock)("core/navigation-link",e);_(l,t)}(0,_t.useEffect)((()=>{!P&&R&&(b(),j())}),[P,R]);const W=!M||z;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,!h&&(0,Ke.createElement)(et.ToolbarButton,{name:"link",icon:kn,title:(0,tt.__)("Link"),shortcut:fn.displayShortcut.primary("k"),onClick:()=>v(!0)}),(0,Ke.createElement)(et.ToolbarButton,{name:"revert",icon:hb,title:(0,tt.__)("Convert to Link"),onClick:j,className:"wp-block-navigation__submenu__revert",isDisabled:!W}))),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,value:i||"",onChange:e=>{n({label:e})},label:(0,tt.__)("Label"),autoComplete:"off"}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,value:c||"",onChange:e=>{n({url:e})},label:(0,tt.__)("URL"),autoComplete:"off"}),(0,Ke.createElement)(et.TextareaControl,{__nextHasNoMarginBottom:!0,value:m||"",onChange:e=>{n({description:e})},label:(0,tt.__)("Description"),help:(0,tt.__)("The description will be displayed in the menu if the current theme supports it.")}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,value:p||"",onChange:e=>{n({title:e})},label:(0,tt.__)("Title attribute"),autoComplete:"off",help:(0,tt.__)("Additional information to help clarify the purpose of the link.")}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,value:u||"",onChange:e=>{n({rel:e})},label:(0,tt.__)("Rel attribute"),autoComplete:"off",help:(0,tt.__)("The relationship of the linked URL as space-separated link types.")}))),(0,Ke.createElement)("div",{...V},(0,Ke.createElement)(q,{className:"wp-block-navigation-item__content"},(0,Ke.createElement)(nt.RichText,{ref:C,identifier:"label",className:"wp-block-navigation-item__label",value:i,onChange:e=>n({label:e}),onMerge:a,onReplace:o,"aria-label":(0,tt.__)("Navigation link text"),placeholder:E,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"],onClick:()=>{h||c||v(!0)}}),!h&&y&&(0,Ke.createElement)(zh,{clientId:l,link:e,onClose:()=>v(!1),anchor:f,hasCreateSuggestion:A,onRemove:()=>{n({url:""}),(0,Bg.speak)((0,tt.__)("Link removed."),"assertive")},onChange:t=>{Bh(t,n,e)}})),(d||h)&&(0,Ke.createElement)("span",{className:"wp-block-navigation__submenu-icon"},(0,Ke.createElement)(bb,null)),(0,Ke.createElement)("div",{...U})))},save:function(){return(0,Ke.createElement)(nt.InnerBlocks.Content,null)},transforms:fb},Eb=()=>Xe({name:xb,metadata:kb,settings:wb}),Cb=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M17.5 9V6a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v3H8V6a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v3h1.5Zm0 6.5V18a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2v-2.5H8V18a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5v-2.5h1.5ZM4 13h16v-1.5H4V13Z"}));const Sb={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/nextpage"===e.dataset.block,transform:()=>(0,Qe.createBlock)("core/nextpage",{})}]},Bb={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/nextpage",title:"Page Break",category:"design",description:"Separate your content into a multi-page experience.",keywords:["next page","pagination"],parent:["core/post-content"],textdomain:"default",supports:{customClassName:!1,className:!1,html:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-nextpage-editor"},{name:Nb}=Bb,Tb={icon:Cb,example:{},transforms:Sb,edit:function(){return(0,Ke.createElement)("div",{...(0,nt.useBlockProps)()},(0,Ke.createElement)("span",null,(0,tt.__)("Page break")))},save:function(){return(0,Ke.createElement)(_t.RawHTML,null,"\x3c!--nextpage--\x3e")}},Ib=()=>Xe({name:Nb,metadata:Bb,settings:Tb}),Pb=new WeakMap;function Mb(){const e=(0,gt.useRegistry)();if(!Pb.has(e)){const t=new Map;Pb.set(e,zb.bind(null,t))}return Pb.get(e)}function zb(e,{name:t,blocks:n}){const a=[...n];for(;a.length;){const n=a.shift();for(const e of null!==(o=n.innerBlocks)&&void 0!==o?o:[]){var o;a.unshift(e)}"core/pattern"===n.name&&Rb(e,t,n.attributes.slug)}}function Rb(e,t,n){if(e.has(t)||e.set(t,new Set),e.get(t).add(n),Ab(e,t))throw new TypeError(`Pattern ${t} has a circular dependency and cannot be rendered.`)}function Ab(e,t,n=new Set,a=new Set){var o;n.add(t),a.add(t);const r=null!==(o=e.get(t))&&void 0!==o?o:new Set;for(const t of r)if(n.has(t)){if(a.has(t))return!0}else if(Ab(e,t,n,a))return!0;return a.delete(t),!1}const Hb=({attributes:e,clientId:t})=>{const n=(0,gt.useSelect)((t=>t(nt.store).__experimentalGetParsedPattern(e.slug)),[e.slug]),a=(0,gt.useSelect)((e=>e(dt.store).getCurrentTheme()?.stylesheet),[]),{replaceBlocks:o,setBlockEditingMode:r,__unstableMarkNextChangeAsNotPersistent:l}=(0,gt.useDispatch)(nt.store),{getBlockRootClientId:i,getBlockEditingMode:s}=(0,gt.useSelect)(nt.store),[c,m]=(0,_t.useState)(!1),u=Mb();(0,_t.useEffect)((()=>{if(!c&&n?.blocks){try{u(n)}catch(e){return void m(!0)}window.queueMicrotask((()=>{const e=i(t),c=n.blocks.map((e=>(0,Qe.cloneBlock)(function(e){return e.innerBlocks.find((e=>"core/template-part"===e.name))&&(e.innerBlocks=e.innerBlocks.map((e=>("core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=a),e)))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=a),e}(e)))),m=s(e);l(),r(e,"default"),l(),o(t,c),l(),r(e,m)}))}}),[t,c,n,l,o,s,r,i]);const p=(0,nt.useBlockProps)();return c?(0,Ke.createElement)("div",{...p},(0,Ke.createElement)(nt.Warning,null,(0,tt.sprintf)((0,tt.__)('Pattern "%s" cannot be rendered inside itself.'),n?.name))):(0,Ke.createElement)("div",{...p})},Lb={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/pattern",title:"Pattern placeholder",category:"theme",description:"Show a block pattern.",supports:{html:!1,inserter:!1,renaming:!1,interactivity:{clientNavigation:!0}},textdomain:"default",attributes:{slug:{type:"string"}}},{name:Db}=Lb,Fb={edit:Hb},Vb=()=>Xe({name:Db,metadata:Lb,settings:Fb}),$b=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"}),(0,Ke.createElement)(Ye.Path,{d:"M16 2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2ZM6 3.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z"}),(0,Ke.createElement)(Ye.Path,{d:"M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"}));function Ob(e,t){for(const n of e){if(n.attributes.id===t)return n;if(n.innerBlocks&&n.innerBlocks.length){const e=Ob(n.innerBlocks,t);if(e)return e}}return null}function Gb(e=[],t=null){let n=function(e=[]){const t={},n=[];return e.forEach((({id:e,title:a,link:o,type:r,parent:l})=>{var i;const s=null!==(i=t[e]?.innerBlocks)&&void 0!==i?i:[];t[e]=(0,Qe.createBlock)("core/navigation-link",{id:e,label:a.rendered,url:o,type:r,kind:"post-type"},s),l?(t[l]||(t[l]={innerBlocks:[]}),t[l].innerBlocks.push(t[e])):n.push(t[e])})),n}(e);if(t){const e=Ob(n,t);e&&e.innerBlocks&&(n=e.innerBlocks)}const a=e=>{e.forEach(((e,t,n)=>{const{attributes:o,innerBlocks:r}=e;if(0!==r.length){a(r);const e=(0,Qe.createBlock)("core/navigation-submenu",o,r);n[t]=e}}))};return a(n),n}function Ub({clientId:e,pages:t,parentClientId:n,parentPageID:a}){const{replaceBlock:o,selectBlock:r}=(0,gt.useDispatch)(nt.store);return()=>{const l=Gb(t,a);o(e,l),r(n)}}const qb=(0,tt.__)("This navigation menu displays your website's pages. Editing it will enable you to add, delete, or reorder pages. However, new pages will no longer be added automatically.");function jb({onClick:e,onClose:t,disabled:n}){return(0,Ke.createElement)(et.Modal,{onRequestClose:t,title:(0,tt.__)("Edit Page List"),className:"wp-block-page-list-modal",aria:{describedby:"wp-block-page-list-modal__description"}},(0,Ke.createElement)("p",{id:"wp-block-page-list-modal__description"},qb),(0,Ke.createElement)("div",{className:"wp-block-page-list-modal-buttons"},(0,Ke.createElement)(et.Button,{variant:"tertiary",onClick:t},(0,tt.__)("Cancel")),(0,Ke.createElement)(et.Button,{variant:"primary",disabled:n,onClick:e},(0,tt.__)("Edit"))))}const Wb=()=>{};function Zb({blockProps:e,innerBlocksProps:t,hasResolvedPages:n,blockList:a,pages:o,parentPageID:r}){if(!n)return(0,Ke.createElement)("div",{...e},(0,Ke.createElement)("div",{className:"wp-block-page-list__loading-indicator-container"},(0,Ke.createElement)(et.Spinner,{className:"wp-block-page-list__loading-indicator"})));if(null===o)return(0,Ke.createElement)("div",{...e},(0,Ke.createElement)(et.Notice,{status:"warning",isDismissible:!1},(0,tt.__)("Page List: Cannot retrieve Pages.")));if(0===o.length)return(0,Ke.createElement)("div",{...e},(0,Ke.createElement)(et.Notice,{status:"info",isDismissible:!1},(0,tt.__)("Page List: Cannot retrieve Pages.")));if(0===a.length){const t=o.find((e=>e.id===r));return t?.title?.rendered?(0,Ke.createElement)("div",{...e},(0,Ke.createElement)(nt.Warning,null,(0,tt.sprintf)((0,tt.__)('Page List: "%s" page has no children.'),t.title.rendered))):(0,Ke.createElement)("div",{...e},(0,Ke.createElement)(et.Notice,{status:"warning",isDismissible:!1},(0,tt.__)("Page List: Cannot retrieve Pages.")))}return o.length>0?(0,Ke.createElement)("ul",{...t}):void 0}const Qb={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/page-list",title:"Page List",category:"widgets",allowedBlocks:["core/page-list-item"],description:"Display a list of all pages.",keywords:["menu","navigation"],textdomain:"default",attributes:{parentPageID:{type:"integer",default:0},isNested:{type:"boolean",default:!1}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],supports:{reusable:!1,html:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-page-list-editor",style:"wp-block-page-list"},{name:Kb}=Qb,Yb={icon:$b,example:{},edit:function({context:e,clientId:t,attributes:n,setAttributes:a}){const{parentPageID:o}=n,[r,l]=(0,_t.useState)(!1),i=(0,_t.useCallback)((()=>l(!0)),[]),{records:s,hasResolved:c}=(0,dt.useEntityRecords)("postType","page",{per_page:100,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}),m="showSubmenuIcon"in e&&s?.length>0&&s?.length<=100,u=(0,_t.useMemo)((()=>{if(null===s)return new Map;const e=s.sort(((e,t)=>e.menu_order===t.menu_order?e.title.rendered.localeCompare(t.title.rendered):e.menu_order-t.menu_order));return e.reduce(((e,t)=>{const{parent:n}=t;return e.has(n)?e.get(n).push(t):e.set(n,[t]),e}),new Map)}),[s]),p=(0,nt.useBlockProps)({className:ut()("wp-block-page-list",{"has-text-color":!!e.textColor,[(0,nt.getColorClassName)("color",e.textColor)]:!!e.textColor,"has-background":!!e.backgroundColor,[(0,nt.getColorClassName)("background-color",e.backgroundColor)]:!!e.backgroundColor}),style:{...e.style?.color}}),d=(0,_t.useMemo)((function e(t=0,n=0){const a=u.get(t);return a?.length?a.reduce(((t,a)=>{const o=u.has(a.id),r={value:a.id,label:"— ".repeat(n)+a.title.rendered,rawName:a.title.rendered};return t.push(r),o&&t.push(...e(a.id,n+1)),t}),[]):[]}),[u]),g=(0,_t.useMemo)((function e(t=o){const n=u.get(t);return n?.length?n.reduce(((t,n)=>{const a=u.has(n.id),o={id:n.id,label:""!==n.title?.rendered?.trim()?n.title?.rendered:(0,tt.__)("(no title)"),title:n.title?.rendered,link:n.url,hasChildren:a};let r=null;const l=e(n.id);return r=(0,Qe.createBlock)("core/page-list-item",o,l),t.push(r),t}),[]):[]}),[u,o]),{isNested:h,hasSelectedChild:b,parentClientId:_,hasDraggedChild:y,isChildOfNavigation:v}=(0,gt.useSelect)((e=>{const{getBlockParentsByBlockName:n,hasSelectedInnerBlock:a,hasDraggedInnerBlock:o}=e(nt.store),r=n(t,"core/navigation-submenu",!0),l=n(t,"core/navigation",!0);return{isNested:r.length>0,isChildOfNavigation:l.length>0,hasSelectedChild:a(t,!0),hasDraggedChild:o(t,!0),parentClientId:l[0]}}),[t]),f=Ub({clientId:t,pages:s,parentClientId:_,parentPageID:o}),k=(0,nt.useInnerBlocksProps)(p,{renderAppender:!1,__unstableDisableDropZone:!0,templateLock:!v&&"all",onInput:Wb,onChange:Wb,value:g}),{selectBlock:x}=(0,gt.useDispatch)(nt.store);return(0,_t.useEffect)((()=>{(b||y)&&(i(),x(_))}),[b,y,_,x,i]),(0,_t.useEffect)((()=>{a({isNested:h})}),[h,a]),(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,d.length>0&&(0,Ke.createElement)(et.PanelBody,null,(0,Ke.createElement)(et.ComboboxControl,{__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,tt.__)("Parent"),value:o,options:d,onChange:e=>a({parentPageID:null!=e?e:0}),help:(0,tt.__)("Choose a page to show only its subpages.")})),m&&(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Edit this menu")},(0,Ke.createElement)("p",null,qb),(0,Ke.createElement)(et.Button,{variant:"primary",disabled:!c,onClick:f},(0,tt.__)("Edit")))),m&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(et.ToolbarButton,{title:(0,tt.__)("Edit"),onClick:i},(0,tt.__)("Edit"))),r&&(0,Ke.createElement)(jb,{onClick:f,onClose:()=>l(!1),disabled:!c})),(0,Ke.createElement)(Zb,{blockProps:p,innerBlocksProps:k,hasResolvedPages:c,blockList:g,pages:s,parentPageID:o}))}},Jb=()=>Xe({name:Kb,metadata:Qb,settings:Yb}),Xb=()=>(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},(0,Ke.createElement)(et.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"}));const e_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/page-list-item",title:"Page List Item",category:"widgets",parent:["core/page-list"],description:"Displays a page inside a list of all pages.",keywords:["page","menu","navigation"],textdomain:"default",attributes:{id:{type:"number"},label:{type:"string"},title:{type:"string"},link:{type:"string"},hasChildren:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],supports:{reusable:!1,html:!1,lock:!1,inserter:!1,__experimentalToolbar:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-page-list-editor",style:"wp-block-page-list"},{name:t_}=e_,n_={__experimentalLabel:({label:e})=>e,icon:ob,example:{},edit:function({context:e,attributes:t}){const{id:n,label:a,link:o,hasChildren:r,title:l}=t,i="showSubmenuIcon"in e,s=(0,gt.useSelect)((e=>{if(!e(dt.store).canUser("read","settings"))return;const t=e(dt.store).getEntityRecord("root","site");return"page"===t?.show_on_front&&t?.page_on_front}),[]),c=bh(hh(e,!0)),m=(0,nt.useBlockProps)(c,{className:"wp-block-pages-list__item"}),u=(0,nt.useInnerBlocksProps)(m);return(0,Ke.createElement)("li",{key:n,className:ut()("wp-block-pages-list__item",{"has-child":r,"wp-block-navigation-item":i,"open-on-click":e.openSubmenusOnClick,"open-on-hover-click":!e.openSubmenusOnClick&&e.showSubmenuIcon,"menu-item-home":n===s})},r&&e.openSubmenusOnClick?(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("button",{type:"button",className:"wp-block-navigation-item__content wp-block-navigation-submenu__toggle","aria-expanded":"false"},(0,Jn.decodeEntities)(a)),(0,Ke.createElement)("span",{className:"wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon"},(0,Ke.createElement)(Xb,null))):(0,Ke.createElement)("a",{className:ut()("wp-block-pages-list__item__link",{"wp-block-navigation-item__content":i}),href:o},(0,Jn.decodeEntities)(l)),r&&(0,Ke.createElement)(Ke.Fragment,null,!e.openSubmenusOnClick&&e.showSubmenuIcon&&(0,Ke.createElement)("button",{className:"wp-block-navigation-item__content wp-block-navigation-submenu__toggle wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon","aria-expanded":"false",type:"button"},(0,Ke.createElement)(Xb,null)),(0,Ke.createElement)("ul",{...u})))}},a_=()=>Xe({name:t_,metadata:e_,settings:n_}),o_=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"})),r_={className:!1},l_={align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:""},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},textColor:{type:"string"},backgroundColor:{type:"string"},fontSize:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]},style:{type:"object"}},i_=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customFontSize)return e;const t={};(e.customTextColor||e.customBackgroundColor)&&(t.color={}),e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customFontSize&&(t.typography={fontSize:e.customFontSize});const{customTextColor:n,customBackgroundColor:a,customFontSize:o,...r}=e;return{...r,style:t}},{style:s_,...c_}=l_,m_=[{supports:r_,attributes:{...c_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},save({attributes:e}){const{align:t,content:n,dropCap:a,direction:o}=e,r=ut()({"has-drop-cap":t!==((0,tt.isRTL)()?"left":"right")&&"center"!==t&&a,[`has-text-align-${t}`]:t});return(0,Ke.createElement)("p",{...nt.useBlockProps.save({className:r,dir:o})},(0,Ke.createElement)(nt.RichText.Content,{value:n}))}},{supports:r_,attributes:{...c_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:i_,save({attributes:e}){const{align:t,content:n,dropCap:a,backgroundColor:o,textColor:r,customBackgroundColor:l,customTextColor:i,fontSize:s,customFontSize:c,direction:m}=e,u=(0,nt.getColorClassName)("color",r),p=(0,nt.getColorClassName)("background-color",o),d=(0,nt.getFontSizeClass)(s),g=ut()({"has-text-color":r||i,"has-background":o||l,"has-drop-cap":a,[`has-text-align-${t}`]:t,[d]:d,[u]:u,[p]:p}),h={backgroundColor:p?void 0:l,color:u?void 0:i,fontSize:d?void 0:c};return(0,Ke.createElement)(nt.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:n,dir:m})}},{supports:r_,attributes:{...c_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:i_,save({attributes:e}){const{align:t,content:n,dropCap:a,backgroundColor:o,textColor:r,customBackgroundColor:l,customTextColor:i,fontSize:s,customFontSize:c,direction:m}=e,u=(0,nt.getColorClassName)("color",r),p=(0,nt.getColorClassName)("background-color",o),d=(0,nt.getFontSizeClass)(s),g=ut()({"has-text-color":r||i,"has-background":o||l,"has-drop-cap":a,[d]:d,[u]:u,[p]:p}),h={backgroundColor:p?void 0:l,color:u?void 0:i,fontSize:d?void 0:c,textAlign:t};return(0,Ke.createElement)(nt.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:n,dir:m})}},{supports:r_,attributes:{...c_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"},width:{type:"string"}},migrate:i_,save({attributes:e}){const{width:t,align:n,content:a,dropCap:o,backgroundColor:r,textColor:l,customBackgroundColor:i,customTextColor:s,fontSize:c,customFontSize:m}=e,u=(0,nt.getColorClassName)("color",l),p=(0,nt.getColorClassName)("background-color",r),d=c&&`is-${c}-text`,g=ut()({[`align${t}`]:t,"has-background":r||i,"has-drop-cap":o,[d]:d,[u]:u,[p]:p}),h={backgroundColor:p?void 0:i,color:u?void 0:s,fontSize:d?void 0:m,textAlign:n};return(0,Ke.createElement)(nt.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:a})}},{supports:r_,attributes:{...c_,fontSize:{type:"number"}},save({attributes:e}){const{width:t,align:n,content:a,dropCap:o,backgroundColor:r,textColor:l,fontSize:i}=e,s=ut()({[`align${t}`]:t,"has-background":r,"has-drop-cap":o}),c={backgroundColor:r,color:l,fontSize:i,textAlign:n};return(0,Ke.createElement)("p",{style:c,className:s||void 0},a)},migrate:e=>i_({...e,customFontSize:Number.isFinite(e.fontSize)?e.fontSize:void 0,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.backgroundColor&&"#"===e.backgroundColor[0]?e.backgroundColor:void 0})},{supports:r_,attributes:{...l_,content:{type:"string",source:"html",default:""}},save:({attributes:e})=>(0,Ke.createElement)(_t.RawHTML,null,e.content),migrate:e=>e}],u_=m_,p_=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z"}));function d_(e){const{batch:t}=(0,gt.useRegistry)(),{moveBlocksToPosition:n,replaceInnerBlocks:a,duplicateBlocks:o,insertBlock:r}=(0,gt.useDispatch)(nt.store),{getBlockRootClientId:l,getBlockIndex:i,getBlockOrder:s,getBlockName:c,getBlock:m,getNextBlockClientId:u,canInsertBlockType:p}=(0,gt.useSelect)(nt.store),d=(0,_t.useRef)(e);return d.current=e,(0,jt.useRefEffect)((e=>{function g(e){if(e.defaultPrevented)return;if(e.keyCode!==fn.ENTER)return;const{content:g,clientId:h}=d.current;if(g.length)return;const b=l(h);if(!(0,Qe.hasBlockSupport)(c(b),"__experimentalOnEnter",!1))return;const _=s(b),y=_.indexOf(h);if(y===_.length-1){let t=b;for(;!p(c(h),l(t));)t=l(t);return void("string"==typeof t&&(e.preventDefault(),n([h],b,l(t),i(t)+1)))}const v=(0,Qe.getDefaultBlockName)();if(!p(v,l(b)))return;e.preventDefault();const f=m(b);t((()=>{o([b]);const e=i(b);a(b,f.innerBlocks.slice(0,y)),a(u(b),f.innerBlocks.slice(y+1)),r((0,Qe.createBlock)(v),e+1,l(b),!0)}))}return e.addEventListener("keydown",g),()=>{e.removeEventListener("keydown",g)}}),[])}function g_({direction:e,setDirection:t}){return(0,tt.isRTL)()&&(0,Ke.createElement)(et.ToolbarButton,{icon:p_,title:(0,tt._x)("Left to right","editor button"),isActive:"ltr"===e,onClick:()=>{t("ltr"===e?void 0:"ltr")}})}function h_(e){return e===((0,tt.isRTL)()?"left":"right")||"center"===e}function b_({clientId:e,attributes:t,setAttributes:n}){const[a]=(0,nt.useSettings)("typography.dropCap");if(!a)return null;const{align:o,dropCap:r}=t;let l;return l=h_(o)?(0,tt.__)("Not available for aligned text."):r?(0,tt.__)("Showing large initial letter."):(0,tt.__)("Toggle to show a large initial letter."),(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>!!r,label:(0,tt.__)("Drop cap"),onDeselect:()=>n({dropCap:void 0}),resetAllFilter:()=>({dropCap:void 0}),panelId:e},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Drop cap"),checked:!!r,onChange:()=>n({dropCap:!r}),help:l,disabled:!!h_(o)}))}const __=function({attributes:e,mergeBlocks:t,onReplace:n,onRemove:a,setAttributes:o,clientId:r}){const{align:l,content:i,direction:s,dropCap:c,placeholder:m}=e,u=(0,nt.useBlockProps)({ref:d_({clientId:r,content:i}),className:ut()({"has-drop-cap":!h_(l)&&c,[`has-text-align-${l}`]:l}),style:{direction:s}}),p=(0,nt.useBlockEditingMode)();return(0,Ke.createElement)(Ke.Fragment,null,"default"===p&&(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:l,onChange:e=>o({align:e,dropCap:!h_(e)&&c})}),(0,Ke.createElement)(g_,{direction:s,setDirection:e=>o({direction:e})})),(0,Ke.createElement)(nt.InspectorControls,{group:"typography"},(0,Ke.createElement)(b_,{clientId:r,attributes:e,setAttributes:o})),(0,Ke.createElement)(nt.RichText,{identifier:"content",tagName:"p",...u,value:i,onChange:e=>o({content:e}),onSplit:(t,n)=>{let a;(n||t)&&(a={...e,content:t});const o=(0,Qe.createBlock)("core/paragraph",a);return n&&(o.clientId=r),o},onMerge:t,onReplace:n,onRemove:a,"aria-label":nt.RichText.isEmpty(i)?(0,tt.__)("Empty block; start writing or type forward slash to choose a block"):(0,tt.__)("Block: Paragraph"),"data-empty":nt.RichText.isEmpty(i),placeholder:m||(0,tt.__)("Type / to choose a block"),"data-custom-placeholder":!!m||void 0,__unstableEmbedURLOnPaste:!0,__unstableAllowPrefixTransformations:!0}))};const{name:y_}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/paragraph",title:"Paragraph",category:"text",description:"Start with the basic building block of all narrative.",keywords:["text"],textdomain:"default",usesContext:["postId"],attributes:{align:{type:"string"},content:{type:"rich-text",source:"rich-text",selector:"p",__experimentalRole:"content"},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]}},supports:{anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalSelector:"p",__unstablePasteTextInline:!0,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-paragraph-editor",style:"wp-block-paragraph"},v_={from:[{type:"raw",priority:20,selector:"p",schema:({phrasingContentSchema:e,isPaste:t})=>({p:{children:e,attributes:t?[]:["style","id"]}}),transform(e){const t=(0,Qe.getBlockAttributes)(y_,e.outerHTML),{textAlign:n}=e.style||{};return"left"!==n&&"center"!==n&&"right"!==n||(t.align=n),(0,Qe.createBlock)(y_,t)}}]},f_=v_,k_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/paragraph",title:"Paragraph",category:"text",description:"Start with the basic building block of all narrative.",keywords:["text"],textdomain:"default",usesContext:["postId"],attributes:{align:{type:"string"},content:{type:"rich-text",source:"rich-text",selector:"p",__experimentalRole:"content"},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]}},supports:{anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalSelector:"p",__unstablePasteTextInline:!0,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-paragraph-editor",style:"wp-block-paragraph"},{name:x_}=k_,w_={icon:o_,example:{attributes:{content:(0,tt.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}},__experimentalLabel(e,{context:t}){const n=e?.metadata?.name;if("list-view"===t&&n)return n;if("accessibility"===t){if(n)return n;const{content:t}=e;return t&&0!==t.length?t:(0,tt.__)("Empty")}},transforms:f_,deprecated:u_,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:__,save:function({attributes:e}){const{align:t,content:n,dropCap:a,direction:o}=e,r=ut()({"has-drop-cap":t!==((0,tt.isRTL)()?"left":"right")&&"center"!==t&&a,[`has-text-align-${t}`]:t});return(0,Ke.createElement)("p",{...nt.useBlockProps.save({className:r,dir:o})},(0,Ke.createElement)(nt.RichText.Content,{value:n}))}},E_=()=>Xe({name:x_,metadata:k_,settings:w_}),C_=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z",fillRule:"evenodd",clipRule:"evenodd"})),S_={who:"authors",per_page:100};const B_=function({isSelected:e,context:{postType:t,postId:n,queryId:a},attributes:o,setAttributes:r}){const l=Number.isFinite(a),{authorId:i,authorDetails:s,authors:c}=(0,gt.useSelect)((e=>{const{getEditedEntityRecord:a,getUser:o,getUsers:r}=e(dt.store),l=a("postType",t,n)?.author;return{authorId:l,authorDetails:l?o(l):null,authors:r(S_)}}),[t,n]),{editEntityRecord:m}=(0,gt.useDispatch)(dt.store),{textAlign:u,showAvatar:p,showBio:d,byline:g,isLink:h,linkTarget:b}=o,_=[],y=s?.name||(0,tt.__)("Post Author");s?.avatar_urls&&Object.keys(s.avatar_urls).forEach((e=>{_.push({value:e,label:`${e} x ${e}`})}));const v=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${u}`]:u})}),f=c?.length?c.map((({id:e,name:t})=>({value:e,label:t}))):[],k=e=>{m("postType",t,n,{author:e})},x=f.length>=25,w=!!n&&!l&&f.length>0;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},w&&(x&&(0,Ke.createElement)(et.ComboboxControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Author"),options:f,value:i,onChange:k,allowReset:!1})||(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Author"),value:i,options:f,onChange:k})),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show avatar"),checked:p,onChange:()=>r({showAvatar:!p})}),p&&(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Avatar size"),value:o.avatarSize,options:_,onChange:e=>{r({avatarSize:Number(e)})}}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show bio"),checked:d,onChange:()=>r({showBio:!d})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link author name to author page"),checked:h,onChange:()=>r({isLink:!h})}),h&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>r({linkTarget:e?"_blank":"_self"}),checked:"_blank"===b}))),(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:u,onChange:e=>{r({textAlign:e})}})),(0,Ke.createElement)("div",{...v},p&&s?.avatar_urls&&(0,Ke.createElement)("div",{className:"wp-block-post-author__avatar"},(0,Ke.createElement)("img",{width:o.avatarSize,src:s.avatar_urls[o.avatarSize],alt:s.name})),(0,Ke.createElement)("div",{className:"wp-block-post-author__content"},(!nt.RichText.isEmpty(g)||e)&&(0,Ke.createElement)(nt.RichText,{className:"wp-block-post-author__byline","aria-label":(0,tt.__)("Post author byline text"),placeholder:(0,tt.__)("Write byline…"),value:g,onChange:e=>r({byline:e})}),(0,Ke.createElement)("p",{className:"wp-block-post-author__name"},h?(0,Ke.createElement)("a",{href:"#post-author-pseudo-link",onClick:e=>e.preventDefault()},y):y),d&&(0,Ke.createElement)("p",{className:"wp-block-post-author__bio",dangerouslySetInnerHTML:{__html:s?.description}}))))},N_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-author",title:"Author",category:"theme",description:"Display post author details such as name, avatar, and bio.",textdomain:"default",attributes:{textAlign:{type:"string"},avatarSize:{type:"number",default:48},showAvatar:{type:"boolean",default:!0},showBio:{type:"boolean"},byline:{type:"string"},isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},usesContext:["postType","postId","queryId"],supports:{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}},color:{gradients:!0,link:!0,__experimentalDuotone:".wp-block-post-author__avatar img",__experimentalDefaultControls:{background:!0,text:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-post-author"},{name:T_}=N_,I_={icon:C_,edit:B_},P_=()=>Xe({name:T_,metadata:N_,settings:I_});const M_=function({context:{postType:e,postId:t},attributes:{textAlign:n,isLink:a,linkTarget:o},setAttributes:r}){const{authorName:l}=(0,gt.useSelect)((n=>{const{getEditedEntityRecord:a,getUser:o}=n(dt.store),r=a("postType",e,t)?.author;return{authorName:r?o(r):null}}),[e,t]),i=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${n}`]:n})}),s=l?.name||(0,tt.__)("Author Name"),c=a?(0,Ke.createElement)("a",{href:"#author-pseudo-link",onClick:e=>e.preventDefault(),className:"wp-block-post-author-name__link"},s):s;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:n,onChange:e=>{r({textAlign:e})}})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link to author archive"),onChange:()=>r({isLink:!a}),checked:a}),a&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>r({linkTarget:e?"_blank":"_self"}),checked:"_blank"===o}))),(0,Ke.createElement)("div",{...i}," ",c," "))},z_={from:[{type:"block",blocks:["core/post-author"],transform:({textAlign:e})=>(0,Qe.createBlock)("core/post-author-name",{textAlign:e})}],to:[{type:"block",blocks:["core/post-author"],transform:({textAlign:e})=>(0,Qe.createBlock)("core/post-author",{textAlign:e})}]},R_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-author-name",title:"Author Name",category:"theme",description:"The author name.",textdomain:"default",attributes:{textAlign:{type:"string"},isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},usesContext:["postType","postId"],supports:{html:!1,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:A_}=R_,H_={icon:C_,transforms:z_,edit:M_},L_=()=>Xe({name:A_,metadata:R_,settings:H_});const D_=function({context:{postType:e,postId:t},attributes:{textAlign:n},setAttributes:a}){const{authorDetails:o}=(0,gt.useSelect)((n=>{const{getEditedEntityRecord:a,getUser:o}=n(dt.store),r=a("postType",e,t)?.author;return{authorDetails:r?o(r):null}}),[e,t]),r=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${n}`]:n})}),l=o?.description||(0,tt.__)("Author Biography");return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:n,onChange:e=>{a({textAlign:e})}})),(0,Ke.createElement)("div",{...r,dangerouslySetInnerHTML:{__html:l}}))},F_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-author-biography",title:"Author Biography",category:"theme",description:"The author biography.",textdomain:"default",attributes:{textAlign:{type:"string"}},usesContext:["postType","postId"],supports:{spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!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}},interactivity:{clientNavigation:!0}}},{name:V_}=F_,$_={icon:C_,edit:D_},O_=()=>Xe({name:V_,metadata:F_,settings:$_}),G_=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.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"})),U_=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]];const q_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:"fse",name:"core/post-comment",title:"Comment (deprecated)",category:"theme",allowedBlocks:["core/avatar","core/comment-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link"],description:"This block is deprecated. Please use the Comments block instead.",textdomain:"default",attributes:{commentId:{type:"number"}},providesContext:{commentId:"commentId"},supports:{html:!1,inserter:!1,interactivity:{clientNavigation:!0}}},{name:j_}=q_,W_={icon:kp,edit:function({attributes:{commentId:e},setAttributes:t}){const[n,a]=(0,_t.useState)(e),o=(0,nt.useBlockProps)(),r=(0,nt.useInnerBlocksProps)(o,{template:U_});return e?(0,Ke.createElement)("div",{...r}):(0,Ke.createElement)("div",{...o},(0,Ke.createElement)(et.Placeholder,{icon:G_,label:(0,tt._x)("Post Comment","block title"),instructions:(0,tt.__)("To show a comment, input the comment ID.")},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,value:e,onChange:e=>a(parseInt(e))}),(0,Ke.createElement)(et.Button,{variant:"primary",onClick:()=>{t({commentId:n})}},(0,tt.__)("Save"))))},save:function(){const e=nt.useBlockProps.save(),t=nt.useInnerBlocksProps.save(e);return(0,Ke.createElement)("div",{...t})}},Z_=()=>Xe({name:j_,metadata:q_,settings:W_}),Q_=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.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-1V13c0-.6-.4-1-1-1zm-2.2 6.6H7l1.6-2.2c.3-.4.5-.7.6-.9.1-.2.2-.4.2-.5 0-.2-.1-.3-.1-.4-.1-.1-.2-.1-.4-.1s-.4 0-.6.1c-.3.1-.5.3-.7.4l-.2.2-.2-1.2.1-.1c.3-.2.5-.3.8-.4.3-.1.6-.1.9-.1.3 0 .6.1.9.2.2.1.4.3.6.5.1.2.2.5.2.7 0 .3-.1.6-.2.9-.1.3-.4.7-.7 1.1l-.5.6h1.6v1.2z"}));const K_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:"fse",name:"core/post-comments-count",title:"Comments Count",category:"theme",description:"Display a post's comments count.",textdomain:"default",attributes:{textAlign:{type:"string"}},usesContext:["postId"],supports:{html:!1,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},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}},interactivity:{clientNavigation:!0}}},{name:Y_}=K_,J_={icon:Q_,edit:function({attributes:e,context:t,setAttributes:n}){const{textAlign:a}=e,{postId:o}=t,[r,l]=(0,_t.useState)(),i=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${a}`]:a})});(0,_t.useEffect)((()=>{if(!o)return;const e=o;jo()({path:(0,pt.addQueryArgs)("/wp/v2/comments",{post:o}),parse:!1}).then((t=>{e===o&&l(t.headers.get("X-WP-Total"))}))}),[o]);const s=o&&void 0!==r,c={...i.style,textDecoration:s?i.style?.textDecoration:void 0};return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:a,onChange:e=>{n({textAlign:e})}})),(0,Ke.createElement)("div",{...i,style:c},s?r:(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Post Comments Count block: post not found."))))}},X_=()=>Xe({name:Y_,metadata:K_,settings:J_}),ey=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.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-1V13c0-.6-.4-1-1-1zm-.5 6.6H6.7l-1.2 1.2v-6.3h7v5.1z"}));const ty={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-comments-form",title:"Comments Form",category:"theme",description:"Display a post's comments form.",textdomain:"default",attributes:{textAlign:{type:"string"}},usesContext:["postId","postType"],supports:{html:!1,color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-post-comments-form-editor",style:["wp-block-post-comments-form","wp-block-buttons","wp-block-button"]},{name:ny}=ty,ay={icon:ey,edit:function e({attributes:t,context:n,setAttributes:a}){const{textAlign:o}=t,{postId:r,postType:l}=n,i=(0,jt.useInstanceId)(e),s=(0,tt.sprintf)("comments-form-edit-%d-desc",i),c=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${o}`]:o}),"aria-describedby":s});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:o,onChange:e=>{a({textAlign:e})}})),(0,Ke.createElement)("div",{...c},(0,Ke.createElement)(eo,{postId:r,postType:l}),(0,Ke.createElement)(et.VisuallyHidden,{id:s},(0,tt.__)("Comments form disabled in editor."))))}},oy=()=>Xe({name:ny,metadata:ty,settings:ay});const ry=function({context:e,attributes:t,setAttributes:n}){const{textAlign:a}=t,{postType:o,postId:r}=e,[l,i]=(0,_t.useState)(),s=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${a}`]:a})});(0,_t.useEffect)((()=>{if(!r)return;const e=r;jo()({path:(0,pt.addQueryArgs)("/wp/v2/comments",{post:r}),parse:!1}).then((t=>{e===r&&i(t.headers.get("X-WP-Total"))}))}),[r]);const c=(0,gt.useSelect)((e=>e(dt.store).getEditedEntityRecord("postType",o,r)),[o,r]);if(!c)return null;const{link:m}=c;let u;if(void 0!==l){const e=parseInt(l);u=0===e?(0,tt.__)("No comments"):(0,tt.sprintf)((0,tt._n)("%s comment","%s comments",e),e.toLocaleString())}return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:a,onChange:e=>{n({textAlign:e})}})),(0,Ke.createElement)("div",{...s},m&&void 0!==u?(0,Ke.createElement)("a",{href:m+"#comments",onClick:e=>e.preventDefault()},u):(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Post Comments Link block: post not found."))))},ly={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:"fse",name:"core/post-comments-link",title:"Comments Link",category:"theme",description:"Displays the link to the current post comments.",textdomain:"default",usesContext:["postType","postId"],attributes:{textAlign:{type:"string"}},supports:{html:!1,color:{link:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},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}},interactivity:{clientNavigation:!0}}},{name:iy}=ly,sy={edit:ry,icon:Q_},cy=()=>Xe({name:iy,metadata:ly,settings:sy}),my=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"}));function uy(e,t,n){return(0,gt.useSelect)((a=>a(dt.store).canUserEditEntityRecord(e,t,n)),[e,t,n])}function py({layoutClassNames:e,userCanEdit:t,postType:n,postId:a}){const[,,o]=(0,dt.useEntityProp)("postType",n,"content",a),r=(0,nt.useBlockProps)({className:e});return o?.protected&&!t?(0,Ke.createElement)("div",{...r},(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("This content is password protected."))):(0,Ke.createElement)("div",{...r,dangerouslySetInnerHTML:{__html:o?.rendered}})}function dy({context:e={}}){const{postType:t,postId:n}=e,[a,o,r]=(0,dt.useEntityBlockEditor)("postType",t,{id:n}),l=(0,gt.useSelect)((e=>e(dt.store).getEntityRecord("postType",t,n)),[t,n]),i=!!l?.content?.raw||a?.length,s=(0,nt.useInnerBlocksProps)((0,nt.useBlockProps)({className:"entry-content"}),{value:a,onInput:o,onChange:r,template:i?void 0:[["core/paragraph"]]});return(0,Ke.createElement)("div",{...s})}function gy(e){const{context:{queryId:t,postType:n,postId:a}={},layoutClassNames:o}=e,r=uy("postType",n,a);if(void 0===r)return null;const l=Number.isFinite(t);return r&&!l?(0,Ke.createElement)(dy,{...e}):(0,Ke.createElement)(py,{layoutClassNames:o,userCanEdit:r,postType:n,postId:a})}function hy({layoutClassNames:e}){const t=(0,nt.useBlockProps)({className:e});return(0,Ke.createElement)("div",{...t},(0,Ke.createElement)("p",null,(0,tt.__)("This is the Content block, it will display all the blocks in any single post or page.")),(0,Ke.createElement)("p",null,(0,tt.__)("That might be a simple arrangement like consecutive paragraphs in a blog post, or a more elaborate composition that includes image galleries, videos, tables, columns, and any other block types.")),(0,Ke.createElement)("p",null,(0,tt.__)("If there are any Custom Post Types registered at your site, the Content block can display the contents of those entries as well.")))}function by(){const e=(0,nt.useBlockProps)();return(0,Ke.createElement)("div",{...e},(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Block cannot be rendered inside itself.")))}const _y={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-content",title:"Content",category:"theme",description:"Displays the contents of a post or page.",textdomain:"default",usesContext:["postId","postType","queryId"],supports:{align:["wide","full"],html:!1,layout:!0,dimensions:{minHeight:!0},spacing:{blockGap:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!1,text:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-post-content-editor"},{name:yy}=_y,vy={icon:my,edit:function({context:e,__unstableLayoutClassNames:t}){const{postId:n,postType:a}=e,o=(0,nt.useHasRecursion)(n);return n&&a&&o?(0,Ke.createElement)(by,null):(0,Ke.createElement)(nt.RecursionProvider,{uniqueId:n},n&&a?(0,Ke.createElement)(gy,{context:e,layoutClassNames:t}):(0,Ke.createElement)(hy,{layoutClassNames:t}))}},fy=()=>Xe({name:yy,metadata:_y,settings:vy});function ky(e){return/(?:^|[^\\])[aAgh]/.test(e)}const xy={attributes:{textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},wy=[xy],Ey=[{name:"post-date-modified",title:(0,tt.__)("Modified Date"),description:(0,tt.__)("Display a post's last updated date."),attributes:{displayType:"modified"},scope:["block","inserter"],isActive:e=>"modified"===e.displayType,icon:Co}],Cy=Ey,Sy={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-date",title:"Date",category:"theme",description:"Display the publish date for an entry such as a post or page.",textdomain:"default",attributes:{textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1},displayType:{type:"string",default:"date"}},usesContext:["postId","postType","queryId"],supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},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}},interactivity:{clientNavigation:!0}}},{name:By}=Sy,Ny={icon:Co,edit:function({attributes:{textAlign:e,format:t,isLink:n,displayType:a},context:{postId:o,postType:r,queryId:l},setAttributes:i}){const s=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${e}`]:e,"wp-block-post-date__modified-date":"modified"===a})}),[c,m]=(0,_t.useState)(null),u=(0,_t.useMemo)((()=>({anchor:c})),[c]),p=Number.isFinite(l),d=(0,So.getSettings)(),[g=d.formats.date]=(0,dt.useEntityProp)("root","site","date_format"),[h=d.formats.time]=(0,dt.useEntityProp)("root","site","time_format"),[b,_]=(0,dt.useEntityProp)("postType",r,a,o),y=(0,gt.useSelect)((e=>r?e(dt.store).getPostType(r):null),[r]),v="date"===a?(0,tt.__)("Post Date"):(0,tt.__)("Post Modified Date");let f=b?(0,Ke.createElement)("time",{dateTime:(0,So.dateI18n)("c",b),ref:m},(0,So.dateI18n)(t||g,b)):v;return n&&b&&(f=(0,Ke.createElement)("a",{href:"#post-date-pseudo-link",onClick:e=>e.preventDefault()},f)),(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:e,onChange:e=>{i({textAlign:e})}}),b&&"date"===a&&!p&&(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.Dropdown,{popoverProps:u,renderContent:({onClose:e})=>(0,Ke.createElement)(nt.__experimentalPublishDateTimePicker,{currentDate:b,onChange:_,is12Hour:ky(h),onClose:e}),renderToggle:({isOpen:e,onToggle:t})=>(0,Ke.createElement)(et.ToolbarButton,{"aria-expanded":e,icon:Di,title:(0,tt.__)("Change Date"),onClick:t,onKeyDown:n=>{e||n.keyCode!==fn.DOWN||(n.preventDefault(),t())}})}))),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(nt.__experimentalDateFormatPicker,{format:t,defaultFormat:g,onChange:e=>i({format:e})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:y?.labels.singular_name?(0,tt.sprintf)((0,tt.__)("Link to %s"),y.labels.singular_name.toLowerCase()):(0,tt.__)("Link to post"),onChange:()=>i({isLink:!n}),checked:n}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display last modified date"),onChange:e=>i({displayType:e?"modified":"date"}),checked:"modified"===a,help:(0,tt.__)("Only shows if the post has been modified")}))),(0,Ke.createElement)("div",{...s},f))},deprecated:wy,variations:Cy},Ty=()=>Xe({name:By,metadata:Sy,settings:Ny}),Iy=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z"}));const Py={from:[{type:"block",blocks:["core/post-content"],transform:()=>(0,Qe.createBlock)("core/post-excerpt")}],to:[{type:"block",blocks:["core/post-content"],transform:()=>(0,Qe.createBlock)("core/post-content")}]},My={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-excerpt",title:"Excerpt",category:"theme",description:"Display the excerpt.",textdomain:"default",attributes:{textAlign:{type:"string"},moreText:{type:"string"},showMoreOnNewLine:{type:"boolean",default:!0},excerptLength:{type:"number",default:55}},usesContext:["postId","postType","queryId"],supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},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}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-post-excerpt-editor",style:"wp-block-post-excerpt"},{name:zy}=My,Ry={icon:Iy,transforms:Py,edit:function({attributes:{textAlign:e,moreText:t,showMoreOnNewLine:n,excerptLength:a},setAttributes:o,isSelected:r,context:{postId:l,postType:i,queryId:s}}){const c=Number.isFinite(s),m=uy("postType",i,l),[u,p,{rendered:d,protected:g}={}]=(0,dt.useEntityProp)("postType",i,"excerpt",l),h=(0,gt.useSelect)((e=>"page"===i||!!e(dt.store).getPostType(i)?.supports?.excerpt),[i]),b=m&&!c&&h,_=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${e}`]:e})}),y=(0,tt._x)("words","Word count type. Do not translate!"),v=(0,_t.useMemo)((()=>{if(!d)return"";const e=(new window.DOMParser).parseFromString(d,"text/html");return e.body.textContent||e.body.innerText||""}),[d]);if(!i||!l)return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(nt.AlignmentToolbar,{value:e,onChange:e=>o({textAlign:e})})),(0,Ke.createElement)("div",{..._},(0,Ke.createElement)("p",null,(0,tt.__)("This block will display the excerpt."))));if(g&&!m)return(0,Ke.createElement)("div",{..._},(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("The content is currently protected and does not have the available excerpt.")));const f=(0,Ke.createElement)(nt.RichText,{className:"wp-block-post-excerpt__more-link",tagName:"a","aria-label":(0,tt.__)("“Read more” link text"),placeholder:(0,tt.__)('Add "read more" link text'),value:t,onChange:e=>o({moreText:e}),withoutInteractiveFormatting:!0}),k=ut()("wp-block-post-excerpt__excerpt",{"is-inline":!n}),x=(u||v).trim();let w="";if("words"===y)w=x.split(" ",a).join(" ");else if("characters_excluding_spaces"===y){const e=x.split("",a).join(""),t=e.length-e.replaceAll(" ","").length;w=x.split("",a+t).join("")}else"characters_including_spaces"===y&&(w=x.split("",a).join(""));const E=w!==x,C=b?(0,Ke.createElement)(nt.RichText,{className:k,"aria-label":(0,tt.__)("Excerpt text"),value:r?x:(E?w+"…":x)||(0,tt.__)("No excerpt found"),onChange:p,tagName:"p"}):(0,Ke.createElement)("p",{className:k},E?w+"…":x||(0,tt.__)("No excerpt found"));return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(nt.AlignmentToolbar,{value:e,onChange:e=>o({textAlign:e})})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show link on new line"),checked:n,onChange:e=>o({showMoreOnNewLine:e})}),(0,Ke.createElement)(et.RangeControl,{label:(0,tt.__)("Max number of words"),value:a,onChange:e=>{o({excerptLength:e})},min:"10",max:"100"}))),(0,Ke.createElement)("div",{..._},C,!n&&" ",n?(0,Ke.createElement)("p",{className:"wp-block-post-excerpt__more-text"},f):f))}},Ay=()=>Xe({name:zy,metadata:My,settings:Ry}),Hy=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"})),Ly=(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"cover",label:(0,tt._x)("Cover","Scale option for Image dimension control")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"contain",label:(0,tt._x)("Contain","Scale option for Image dimension control")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"fill",label:(0,tt._x)("Fill","Scale option for Image dimension control")})),Dy="cover",Fy={cover:(0,tt.__)("Image is scaled and cropped to fill the entire space without being distorted."),contain:(0,tt.__)("Image is scaled to fill the space without clipping nor distorting."),fill:(0,tt.__)("Image will be stretched and distorted to completely fill the space.")},Vy=({clientId:e,attributes:{aspectRatio:t,width:n,height:a,scale:o,sizeSlug:r},setAttributes:l,imageSizeOptions:i=[]})=>{const[s]=(0,nt.useSettings)("spacing.units"),c=(0,et.__experimentalUseCustomUnits)({availableUnits:s||["px","%","vw","em","rem"]}),m=(e,t)=>{const n=parseFloat(t);isNaN(n)&&t||l({[e]:n<0?"0":t})},u=(0,tt._x)("Scale","Image scaling options"),p=a||t&&"auto"!==t;return(0,Ke.createElement)(nt.InspectorControls,{group:"dimensions"},(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:(0,tt.__)("Aspect ratio"),onDeselect:()=>l({aspectRatio:void 0}),resetAllFilter:()=>({aspectRatio:void 0}),isShownByDefault:!0,panelId:e},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Aspect ratio"),value:t,options:[{label:(0,tt.__)("Original"),value:"auto"},{label:(0,tt.__)("Square"),value:"1"},{label:(0,tt.__)("16:9"),value:"16/9"},{label:(0,tt.__)("4:3"),value:"4/3"},{label:(0,tt.__)("3:2"),value:"3/2"},{label:(0,tt.__)("9:16"),value:"9/16"},{label:(0,tt.__)("3:4"),value:"3/4"},{label:(0,tt.__)("2:3"),value:"2/3"}],onChange:e=>l({aspectRatio:e})})),(0,Ke.createElement)(et.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!a,label:(0,tt.__)("Height"),onDeselect:()=>l({height:void 0}),resetAllFilter:()=>({height:void 0}),isShownByDefault:!0,panelId:e},(0,Ke.createElement)(et.__experimentalUnitControl,{label:(0,tt.__)("Height"),labelPosition:"top",value:a||"",min:0,onChange:e=>m("height",e),units:c})),(0,Ke.createElement)(et.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!n,label:(0,tt.__)("Width"),onDeselect:()=>l({width:void 0}),resetAllFilter:()=>({width:void 0}),isShownByDefault:!0,panelId:e},(0,Ke.createElement)(et.__experimentalUnitControl,{label:(0,tt.__)("Width"),labelPosition:"top",value:n||"",min:0,onChange:e=>m("width",e),units:c})),p&&(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>!!o&&o!==Dy,label:u,onDeselect:()=>l({scale:Dy}),resetAllFilter:()=>({scale:Dy}),isShownByDefault:!0,panelId:e},(0,Ke.createElement)(et.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:u,value:o,help:Fy[o],onChange:e=>l({scale:e}),isBlock:!0},Ly)),!!i.length&&(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>!!r,label:(0,tt.__)("Resolution"),onDeselect:()=>l({sizeSlug:void 0}),resetAllFilter:()=>({sizeSlug:void 0}),isShownByDefault:!1,panelId:e},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Resolution"),value:r||"full",options:i,onChange:e=>l({sizeSlug:e}),help:(0,tt.__)("Select the size of the source image.")})))};const $y=(0,jt.compose)([(0,nt.withColors)({overlayColor:"background-color"})])((({clientId:e,attributes:t,setAttributes:n,overlayColor:a,setOverlayColor:o})=>{const{dimRatio:r}=t,{gradientClass:l,gradientValue:i,setGradient:s}=(0,nt.__experimentalUseGradient)(),c=(0,nt.__experimentalUseMultipleOriginColorsAndGradients)(),m=(0,nt.__experimentalUseBorderProps)(t),u={backgroundColor:a.color,backgroundImage:i,...m.style};return c.hasColorsOrGradients?(0,Ke.createElement)(Ke.Fragment,null,!!r&&(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-post-featured-image__overlay",(p=r,void 0===p?null:"has-background-dim-"+10*Math.round(p/10)),{[a.class]:a.class,"has-background-dim":void 0!==r,"has-background-gradient":i,[l]:l},m.className),style:u}),(0,Ke.createElement)(nt.InspectorControls,{group:"color"},(0,Ke.createElement)(nt.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:a.color,gradientValue:i,label:(0,tt.__)("Overlay"),onColorChange:o,onGradientChange:s,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0})}],panelId:e,...c}),(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>void 0!==r,label:(0,tt.__)("Overlay opacity"),onDeselect:()=>n({dimRatio:0}),resetAllFilter:()=>({dimRatio:0}),isShownByDefault:!0,panelId:e},(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Overlay opacity"),value:r,onChange:e=>n({dimRatio:e}),min:0,max:100,step:10,required:!0,__next40pxDefaultSize:!0})))):null;var p})),Oy=["image"];const Gy={onClick:e=>e.preventDefault(),"aria-disabled":!0};const Uy={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-featured-image",title:"Featured Image",category:"theme",description:"Display a post's featured image.",textdomain:"default",attributes:{isLink:{type:"boolean",default:!1},aspectRatio:{type:"string"},width:{type:"string"},height:{type:"string"},scale:{type:"string",default:"cover"},sizeSlug:{type:"string"},rel:{type:"string",attribute:"rel",default:""},linkTarget:{type:"string",default:"_self"},overlayColor:{type:"string"},customOverlayColor:{type:"string"},dimRatio:{type:"number",default:0},gradient:{type:"string"},customGradient:{type:"string"},useFirstImageFromPost:{type:"boolean",default:!1}},usesContext:["postId","postType","queryId"],supports:{align:["left","right","center","wide","full"],color:{__experimentalDuotone:"img, .wp-block-post-featured-image__placeholder, .components-placeholder__illustration, .components-placeholder::before",text:!1,background:!1},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSelector:"img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay",__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}},html:!1,spacing:{margin:!0,padding:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-post-featured-image-editor",style:"wp-block-post-featured-image"},{name:qy}=Uy,jy={icon:Hy,edit:function({clientId:e,attributes:t,setAttributes:n,context:{postId:a,postType:o,queryId:r}}){const l=Number.isFinite(r),{isLink:i,aspectRatio:s,height:c,width:m,scale:u,sizeSlug:p,rel:d,linkTarget:g,useFirstImageFromPost:h}=t,[b,_]=(0,dt.useEntityProp)("postType",o,"featured_media",a),[y]=(0,dt.useEntityProp)("postType",o,"content",a),v=(0,_t.useMemo)((()=>{if(b)return b;if(!h)return;const e=/<!--\s+wp:(?:core\/)?image\s+(?<attrs>{(?:(?:[^}]+|}+(?=})|(?!}\s+\/?-->).)*)?}\s+)?-->/.exec(y);return e?.groups?.attrs&&JSON.parse(e.groups.attrs)?.id}),[b,h,y]),{media:f,postType:k,postPermalink:x}=(0,gt.useSelect)((e=>{const{getMedia:t,getPostType:n,getEditedEntityRecord:r}=e(dt.store);return{media:v&&t(v,{context:"view"}),postType:o&&n(o),postPermalink:r("postType",o,a)?.link}}),[v,o,a]),w=function(e,t){return e?.media_details?.sizes?.[t]?.source_url||e?.source_url}(f,p),E=(0,gt.useSelect)((e=>e(nt.store).getSettings().imageSizes),[]).filter((({slug:e})=>f?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),C=(0,nt.useBlockProps)({style:{width:m,height:c,aspectRatio:s}}),S=(0,nt.__experimentalUseBorderProps)(t),B=(0,nt.useBlockEditingMode)(),N=e=>(0,Ke.createElement)(et.Placeholder,{className:ut()("block-editor-media-placeholder",S.className),withIllustration:!0,style:{height:!!s&&"100%",width:!!s&&"100%",...S.style}},e),T=e=>{e?.id&&_(e.id)},{createErrorNotice:I}=(0,gt.useDispatch)(Pt.store),P=e=>{I(e,{type:"snackbar"})},M="default"===B&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)($y,{attributes:t,setAttributes:n,clientId:e}),(0,Ke.createElement)(Vy,{clientId:e,attributes:t,setAttributes:n,imageSizeOptions:E}),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:k?.labels.singular_name?(0,tt.sprintf)((0,tt.__)("Link to %s"),k.labels.singular_name):(0,tt.__)("Link to post"),onChange:()=>n({isLink:!i}),checked:i}),i&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>n({linkTarget:e?"_blank":"_self"}),checked:"_blank"===g}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link rel"),value:d,onChange:e=>n({rel:e})})))));let z;if(!v&&(l||!a))return(0,Ke.createElement)(Ke.Fragment,null,M,(0,Ke.createElement)("div",{...C},i?(0,Ke.createElement)("a",{href:x,target:g,...Gy},N()):N()));const R=(0,tt.__)("Add a featured image"),A={...S.style,height:s?"100%":c,width:!!s&&"100%",objectFit:!(!c&&!s)&&u};return z=v?f?(0,Ke.createElement)("img",{className:S.className,src:w,alt:f.alt_text?(0,tt.sprintf)((0,tt.__)("Featured image: %s"),f.alt_text):(0,tt.__)("Featured image"),style:A}):N():(0,Ke.createElement)(nt.MediaPlaceholder,{onSelect:T,accept:"image/*",allowedTypes:Oy,onError:P,placeholder:N,mediaLibraryButton:({open:e})=>(0,Ke.createElement)(et.Button,{icon:np,variant:"primary",label:R,showTooltip:!0,tooltipPosition:"top center",onClick:()=>{e()}})}),(0,Ke.createElement)(Ke.Fragment,null,M,!!f&&!l&&(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(nt.MediaReplaceFlow,{mediaId:v,mediaURL:w,allowedTypes:Oy,accept:"image/*",onSelect:T,onError:P},(0,Ke.createElement)(et.MenuItem,{onClick:()=>_(0)},(0,tt.__)("Reset")))),(0,Ke.createElement)("figure",{...C},i?(0,Ke.createElement)("a",{href:x,target:g,...Gy},z):z))}},Wy=()=>Xe({name:qy,metadata:Uy,settings:jy});const Zy=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})),Qy=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})),Ky=[{isDefault:!0,name:"post-next",title:(0,tt.__)("Next post"),description:(0,tt.__)("Displays the post link that follows the current post."),icon:Zy,attributes:{type:"next"},scope:["inserter","transform"]},{name:"post-previous",title:(0,tt.__)("Previous post"),description:(0,tt.__)("Displays the post link that precedes the current post."),icon:Qy,attributes:{type:"previous"},scope:["inserter","transform"]}];Ky.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.type===t.type)}));const Yy=Ky,Jy={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-navigation-link",title:"Post Navigation Link",category:"theme",description:"Displays the next or previous post link that is adjacent to the current post.",textdomain:"default",attributes:{textAlign:{type:"string"},type:{type:"string",default:"next"},label:{type:"string"},showTitle:{type:"boolean",default:!1},linkLabel:{type:"boolean",default:!1},arrow:{type:"string",default:"none"},taxonomy:{type:"string",default:""}},usesContext:["postType"],supports:{reusable:!1,html:!1,color:{link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-post-navigation-link"},{name:Xy}=Jy,ev={edit:function({context:{postType:e},attributes:{type:t,label:n,showTitle:a,textAlign:o,linkLabel:r,arrow:l,taxonomy:i},setAttributes:s}){const c="next"===t;let m=c?(0,tt.__)("Next"):(0,tt.__)("Previous");const u={none:"",arrow:c?"→":"←",chevron:c?"»":"«"}[l];a&&(m=c?(0,tt.__)("Next: "):(0,tt.__)("Previous: "));const p=c?(0,tt.__)("Next post"):(0,tt.__)("Previous post"),d=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${o}`]:o})}),g=(0,gt.useSelect)((t=>{const{getTaxonomies:n}=t(dt.store);return n({type:e,per_page:-1})}),[e]);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display the title as a link"),help:(0,tt.__)("If you have entered a custom label, it will be prepended before the title."),checked:!!a,onChange:()=>s({showTitle:!a})}),a&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Include the label as part of the link"),checked:!!r,onChange:()=>s({linkLabel:!r})}),(0,Ke.createElement)(et.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Arrow"),value:l,onChange:e=>{s({arrow:e})},help:(0,tt.__)("A decorative arrow for the next and previous link."),isBlock:!0},(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"none",label:(0,tt._x)("None","Arrow option for Next/Previous link")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,tt._x)("Arrow","Arrow option for Next/Previous link")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,tt._x)("Chevron","Arrow option for Next/Previous link")})))),(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.SelectControl,{label:(0,tt.__)("Filter by taxonomy"),value:i,options:[{label:(0,tt.__)("Unfiltered"),value:""},...(null!=g?g:[]).filter((({visibility:e})=>!!e?.publicly_queryable)).map((e=>({value:e.slug,label:e.name})))],onChange:e=>s({taxonomy:e}),help:(0,tt.__)("Only link to posts that have the same taxonomy terms as the current post. For example the same tags or categories.")})),(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(nt.AlignmentToolbar,{value:o,onChange:e=>{s({textAlign:e})}})),(0,Ke.createElement)("div",{...d},!c&&u&&(0,Ke.createElement)("span",{className:`wp-block-post-navigation-link__arrow-previous is-arrow-${l}`},u),(0,Ke.createElement)(nt.RichText,{tagName:"a","aria-label":p,placeholder:m,value:n,allowedFormats:["core/bold","core/italic"],onChange:e=>s({label:e})}),a&&(0,Ke.createElement)("a",{href:"#post-navigation-pseudo-link",onClick:e=>e.preventDefault()},(0,tt.__)("An example title")),c&&u&&(0,Ke.createElement)("span",{className:`wp-block-post-navigation-link__arrow-next is-arrow-${l}`,"aria-hidden":!0},u)))},variations:Yy},tv=()=>Xe({name:Xy,metadata:Jy,settings:ev}),nv=[["core/post-title"],["core/post-date"],["core/post-excerpt"]];function av(){const e=(0,nt.useInnerBlocksProps)({className:"wp-block-post"},{template:nv,__unstableDisableLayoutClassNames:!0});return(0,Ke.createElement)("li",{...e})}const ov=(0,_t.memo)((function({blocks:e,blockContextId:t,isHidden:n,setActiveBlockContextId:a}){const o=(0,nt.__experimentalUseBlockPreview)({blocks:e,props:{className:"wp-block-post"}}),r=()=>{a(t)},l={display:n?"none":void 0};return(0,Ke.createElement)("li",{...o,tabIndex:0,role:"button",onClick:r,onKeyPress:r,style:l})}));const rv={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-template",title:"Post Template",category:"theme",parent:["core/query"],description:"Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.",textdomain:"default",usesContext:["queryId","query","displayLayout","templateSlug","previewPostType","enhancedPagination"],supports:{reusable:!1,html:!1,align:["wide","full"],layout:!0,color:{gradients:!0,link:!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}},spacing:{blockGap:{__experimentalDefault:"1.25em"},__experimentalDefaultControls:{blockGap:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-post-template",editorStyle:"wp-block-post-template-editor"},{name:lv}=rv,iv={icon:Uo,edit:function({setAttributes:e,clientId:t,context:{query:{perPage:n,offset:a=0,postType:o,order:r,orderBy:l,author:i,search:s,exclude:c,sticky:m,inherit:u,taxQuery:p,parents:d,pages:g,...h}={},templateSlug:b,previewPostType:_},attributes:{layout:y},__unstableLayoutClassNames:v}){const{type:f,columnCount:k=3}=y||{},[x,w]=(0,_t.useState)(),{posts:E,blocks:C}=(0,gt.useSelect)((e=>{const{getEntityRecords:g,getTaxonomies:y}=e(dt.store),{getBlocks:v}=e(nt.store),f=u&&b?.startsWith("category-")&&g("taxonomy","category",{context:"view",per_page:1,_fields:["id"],slug:b.replace("category-","")}),k={offset:a||0,order:r,orderby:l};if(p&&!u){const e=y({type:o,per_page:-1,context:"view"}),t=Object.entries(p).reduce(((t,[n,a])=>{const o=e?.find((({slug:e})=>e===n));return o?.rest_base&&(t[o?.rest_base]=a),t}),{});Object.keys(t).length&&Object.assign(k,t)}n&&(k.per_page=n),i&&(k.author=i),s&&(k.search=s),c?.length&&(k.exclude=c),d?.length&&(k.parent=d),m&&(k.sticky="only"===m),u&&(b?.startsWith("archive-")?(k.postType=b.replace("archive-",""),o=k.postType):f&&(k.categories=f[0]?.id));return{posts:g("postType",_||o,{...k,...h}),blocks:v(t)}}),[n,a,r,l,t,i,s,o,c,m,u,b,p,d,h,_]),S=(0,_t.useMemo)((()=>E?.map((e=>({postType:e.type,postId:e.id})))),[E]),B=(0,nt.useBlockProps)({className:ut()(v,{[`columns-${k}`]:"grid"===f&&k})});if(!E)return(0,Ke.createElement)("p",{...B},(0,Ke.createElement)(et.Spinner,null));if(!E.length)return(0,Ke.createElement)("p",{...B}," ",(0,tt.__)("No results found."));const N=t=>e({layout:{...y,...t}}),T=[{icon:Tp,title:(0,tt.__)("List view"),onClick:()=>N({type:"default"}),isActive:"default"===f||"constrained"===f},{icon:Xm,title:(0,tt.__)("Grid view"),onClick:()=>N({type:"grid",columnCount:k}),isActive:"grid"===f}];return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,{controls:T})),(0,Ke.createElement)("ul",{...B},S&&S.map((e=>(0,Ke.createElement)(nt.BlockContextProvider,{key:e.postId,value:e},e.postId===(x||S[0]?.postId)?(0,Ke.createElement)(av,null):null,(0,Ke.createElement)(ov,{blocks:C,blockContextId:e.postId,setActiveBlockContextId:w,isHidden:e.postId===(x||S[0]?.postId)}))))))},save:function(){return(0,Ke.createElement)(nt.InnerBlocks.Content,null)}},sv=()=>Xe({name:lv,metadata:rv,settings:iv}),cv=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M20 4H4v1.5h16V4zm-2 9h-3c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3zM4 9.5h9V8H4v1.5zM9 13H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3z",fillRule:"evenodd",clipRule:"evenodd"})),mv=[];const uv=["core/bold","core/image","core/italic","core/link","core/strikethrough","core/text-color"];const pv=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M8.1 12.3c.1.1.3.3.5.3.2.1.4.1.6.1.2 0 .4 0 .6-.1.2-.1.4-.2.5-.3l3-3c.3-.3.5-.7.5-1.1 0-.4-.2-.8-.5-1.1L9.7 3.5c-.1-.2-.3-.3-.5-.3H5c-.4 0-.8.4-.8.8v4.2c0 .2.1.4.2.5l3.7 3.6zM5.8 4.8h3.1l3.4 3.4v.1l-3 3 .5.5-.7-.5-3.3-3.4V4.8zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})),dv={category:cv,post_tag:pv};function gv(e,t){if("core/post-terms"!==t)return e;const n=e.variations.map((e=>{var t;return{...e,icon:null!==(t=dv[e.name])&&void 0!==t?t:cv}}));return{...e,variations:n}}const hv={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-terms",title:"Post Terms",category:"theme",description:"Post terms.",textdomain:"default",attributes:{term:{type:"string"},textAlign:{type:"string"},separator:{type:"string",default:", "},prefix:{type:"string",default:""},suffix:{type:"string",default:""}},usesContext:["postId","postType"],supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},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}},interactivity:{clientNavigation:!0}},style:"wp-block-post-terms"},{name:bv}=hv,_v={icon:cv,edit:function({attributes:e,clientId:t,context:n,isSelected:a,setAttributes:o,insertBlocksAfter:r}){const{term:l,textAlign:i,separator:s,prefix:c,suffix:m}=e,{postId:u,postType:p}=n,d=(0,gt.useSelect)((e=>{if(!l)return{};const{getTaxonomy:t}=e(dt.store),n=t(l);return n?.visibility?.publicly_queryable?n:{}}),[l]),{postTerms:g,hasPostTerms:h,isLoading:b}=function({postId:e,term:t}){const{slug:n}=t;return(0,gt.useSelect)((a=>{const o=t?.visibility?.publicly_queryable;if(!o)return{postTerms:mv,isLoading:!1,hasPostTerms:!1};const{getEntityRecords:r,isResolving:l}=a(dt.store),i=["taxonomy",n,{post:e,per_page:-1,context:"view"}],s=r(...i);return{postTerms:s,isLoading:l("getEntityRecords",i),hasPostTerms:!!s?.length}}),[e,t?.visibility?.publicly_queryable,n])}({postId:u,term:d}),_=u&&p,y=(0,nt.useBlockDisplayInformation)(t),v=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${i}`]:i,[`taxonomy-${l}`]:l})});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(nt.AlignmentToolbar,{value:i,onChange:e=>{o({textAlign:e})}})),(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,tt.__)("Separator"),value:s||"",onChange:e=>{o({separator:e})},help:(0,tt.__)("Enter character(s) used to separate terms.")})),(0,Ke.createElement)("div",{...v},b&&_&&(0,Ke.createElement)(et.Spinner,null),!b&&(a||c)&&(0,Ke.createElement)(nt.RichText,{allowedFormats:uv,className:"wp-block-post-terms__prefix","aria-label":(0,tt.__)("Prefix"),placeholder:(0,tt.__)("Prefix")+" ",value:c,onChange:e=>o({prefix:e}),tagName:"span"}),(!_||!l)&&(0,Ke.createElement)("span",null,y.title),_&&!b&&h&&g.map((e=>(0,Ke.createElement)("a",{key:e.id,href:e.link,onClick:e=>e.preventDefault()},(0,Jn.decodeEntities)(e.name)))).reduce(((e,t)=>(0,Ke.createElement)(Ke.Fragment,null,e,(0,Ke.createElement)("span",{className:"wp-block-post-terms__separator"},s||" "),t))),_&&!b&&!h&&(d?.labels?.no_terms||(0,tt.__)("Term items not found.")),!b&&(a||m)&&(0,Ke.createElement)(nt.RichText,{allowedFormats:uv,className:"wp-block-post-terms__suffix","aria-label":(0,tt.__)("Suffix"),placeholder:" "+(0,tt.__)("Suffix"),value:m,onChange:e=>o({suffix:e}),tagName:"span",__unstableOnSplitAtEnd:()=>r((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))})))}},yv=()=>((0,_i.addFilter)("blocks.registerBlockType","core/template-part",gv),Xe({name:bv,metadata:hv,settings:_v})),vv=window.wp.wordcount;const fv=function({attributes:e,setAttributes:t,context:n}){const{textAlign:a}=e,{postId:o,postType:r}=n,[l]=(0,dt.useEntityProp)("postType",r,"content",o),[i]=(0,dt.useEntityBlockEditor)("postType",r,{id:o}),s=(0,_t.useMemo)((()=>{let e;e=l instanceof Function?l({blocks:i}):i?(0,Qe.__unstableSerializeAndClean)(i):l;const t=(0,tt._x)("words","Word count type. Do not translate!"),n=Math.max(1,Math.round((0,vv.count)(e,t)/189));return(0,tt.sprintf)((0,tt._n)("%d minute","%d minutes",n),n)}),[l,i]),c=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${a}`]:a})});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:a,onChange:e=>{t({textAlign:e})}})),(0,Ke.createElement)("div",{...c},s))},kv=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16.5c-4.1 0-7.5-3.4-7.5-7.5S7.9 4.5 12 4.5s7.5 3.4 7.5 7.5-3.4 7.5-7.5 7.5zM12 7l-1 5c0 .3.2.6.4.8l4.2 2.8-2.7-4.1L12 7z"})),xv={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/post-time-to-read",title:"Time To Read",category:"theme",description:"Show minutes required to finish reading the post.",textdomain:"default",usesContext:["postId","postType"],attributes:{textAlign:{type:"string"}},supports:{color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},html:!1,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:wv}=xv,Ev={icon:kv,edit:fv},Cv=()=>Xe({name:wv,metadata:xv,settings:Ev});const Sv={attributes:{textAlign:{type:"string"},level:{type:"number",default:2},isLink:{type:"boolean",default:!1},rel:{type:"string",attribute:"rel",default:""},linkTarget:{type:"string",default:"_self"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},spacing:{margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0}},save:()=>null,migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},Bv=[Sv],Nv={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-title",title:"Title",category:"theme",description:"Displays the title of a post, page, or any other content-type.",textdomain:"default",usesContext:["postId","postType","queryId"],attributes:{textAlign:{type:"string"},level:{type:"number",default:2},isLink:{type:"boolean",default:!1},rel:{type:"string",attribute:"rel",default:""},linkTarget:{type:"string",default:"_self"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},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}},interactivity:{clientNavigation:!0}},style:"wp-block-post-title"},{name:Tv}=Nv,Iv={icon:Br,edit:function({attributes:{level:e,textAlign:t,isLink:n,rel:a,linkTarget:o},setAttributes:r,context:{postType:l,postId:i,queryId:s},insertBlocksAfter:c}){const m="h"+e,u=uy("postType",!Number.isFinite(s)&&l,i),[p="",d,g]=(0,dt.useEntityProp)("postType",l,"title",i),[h]=(0,dt.useEntityProp)("postType",l,"link",i),b=()=>{c((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))},_=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${t}`]:t})}),y=(0,nt.useBlockEditingMode)();let v=(0,Ke.createElement)(m,{..._},(0,tt.__)("Title"));return l&&i&&(v=u?(0,Ke.createElement)(nt.PlainText,{tagName:m,placeholder:(0,tt.__)("No Title"),value:p,onChange:d,__experimentalVersion:2,__unstableOnSplitAtEnd:b,..._}):(0,Ke.createElement)(m,{..._,dangerouslySetInnerHTML:{__html:g?.rendered}})),n&&l&&i&&(v=u?(0,Ke.createElement)(m,{..._},(0,Ke.createElement)(nt.PlainText,{tagName:"a",href:h,target:o,rel:a,placeholder:p.length?null:(0,tt.__)("No Title"),value:p,onChange:d,__experimentalVersion:2,__unstableOnSplitAtEnd:b})):(0,Ke.createElement)(m,{..._},(0,Ke.createElement)("a",{href:h,target:o,rel:a,onClick:e=>e.preventDefault(),dangerouslySetInnerHTML:{__html:g?.rendered}}))),(0,Ke.createElement)(Ke.Fragment,null,"default"===y&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.HeadingLevelDropdown,{value:e,onChange:e=>r({level:e})}),(0,Ke.createElement)(nt.AlignmentControl,{value:t,onChange:e=>{r({textAlign:e})}})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Make title a link"),onChange:()=>r({isLink:!n}),checked:n}),n&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>r({linkTarget:e?"_blank":"_self"}),checked:"_blank"===o}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link rel"),value:a,onChange:e=>r({rel:e})}))))),v)},deprecated:Bv},Pv=()=>Xe({name:Tv,metadata:Nv,settings:Iv}),Mv=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 16.5h6V15H7v1.5zm4-4h6V11h-6v1.5zM9 11H7v1.5h2V11zm6 5.5h2V15h-2v1.5z"}));const zv={from:[{type:"block",blocks:["core/code","core/paragraph"],transform:({content:e,anchor:t})=>(0,Qe.createBlock)("core/preformatted",{content:e,anchor:t})},{type:"raw",isMatch:e=>"PRE"===e.nodeName&&!(1===e.children.length&&"CODE"===e.firstChild.nodeName),schema:({phrasingContentSchema:e})=>({pre:{children:e}})}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,Qe.createBlock)("core/paragraph",e)},{type:"block",blocks:["core/code"],transform:e=>(0,Qe.createBlock)("core/code",e)}]},Rv=zv,Av={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/preformatted",title:"Preformatted",category:"text",description:"Add text that respects your spacing and tabs, and also allows styling.",textdomain:"default",attributes:{content:{type:"rich-text",source:"rich-text",selector:"pre",__unstablePreserveWhiteSpace:!0,__experimentalRole:"content"}},supports:{anchor:!0,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-preformatted"},{name:Hv}=Av,Lv={icon:Mv,example:{attributes:{content:(0,tt.__)("EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\nWindow, very small in the distance, illuminated.\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;")}},transforms:Rv,edit:function({attributes:e,mergeBlocks:t,setAttributes:n,onRemove:a,insertBlocksAfter:o,style:r}){const{content:l}=e,i=(0,nt.useBlockProps)({style:r});return(0,Ke.createElement)(nt.RichText,{tagName:"pre",identifier:"content",preserveWhiteSpace:!0,value:l,onChange:e=>{n({content:e})},onRemove:a,"aria-label":(0,tt.__)("Preformatted text"),placeholder:(0,tt.__)("Write preformatted text…"),onMerge:t,...i,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>o((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))})},save:function({attributes:e}){const{content:t}=e;return(0,Ke.createElement)("pre",{...nt.useBlockProps.save()},(0,Ke.createElement)(nt.RichText.Content,{value:t}))},merge:(e,t)=>({content:e.content+"\n\n"+t.content})},Dv=()=>Xe({name:Hv,metadata:Av,settings:Lv}),Fv=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M18 8H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v4zM4 4v1.5h16V4H4zm0 16h16v-1.5H4V20z"})),Vv="is-style-solid-color",$v={value:{type:"string",source:"html",selector:"blockquote",multiline:"p"},citation:{type:"string",source:"html",selector:"cite",default:""},mainColor:{type:"string"},customMainColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}};function Ov(e){if(!e)return;const t=e.match(/border-color:([^;]+)[;]?/);return t&&t[1]?t[1]:void 0}function Gv(e){const t=`</p>${e=e||"<p></p>"}<p>`.split("</p><p>");return t.shift(),t.pop(),t.join("<br>")}const Uv={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",__experimentalRole:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",__experimentalRole:"content"},textAlign:{type:"string"}},save({attributes:e}){const{textAlign:t,citation:n,value:a}=e,o=!nt.RichText.isEmpty(n);return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:ut()({[`has-text-align-${t}`]:t})})},(0,Ke.createElement)("blockquote",null,(0,Ke.createElement)(nt.RichText.Content,{value:a,multiline:!0}),o&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:n})))},migrate:({value:e,...t})=>({value:Gv(e),...t})},qv={attributes:{...$v},save({attributes:e}){const{mainColor:t,customMainColor:n,customTextColor:a,textColor:o,value:r,citation:l,className:i}=e,s=i?.includes(Vv);let c,m;if(s){const e=(0,nt.getColorClassName)("background-color",t);c=ut()({"has-background":e||n,[e]:e}),m={backgroundColor:e?void 0:n}}else n&&(m={borderColor:n});const u=(0,nt.getColorClassName)("color",o),p=ut()({"has-text-color":o||a,[u]:u}),d=u?void 0:{color:a};return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:c,style:m})},(0,Ke.createElement)("blockquote",{className:p,style:d},(0,Ke.createElement)(nt.RichText.Content,{value:r,multiline:!0}),!nt.RichText.isEmpty(l)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:l})))},migrate({value:e,className:t,mainColor:n,customMainColor:a,customTextColor:o,...r}){const l=t?.includes(Vv);let i;return a&&(i=l?{color:{background:a}}:{border:{color:a}}),o&&i&&(i.color={...i.color,text:o}),{value:Gv(e),className:t,backgroundColor:l?n:void 0,borderColor:l?void 0:n,textAlign:l?"left":void 0,style:i,...r}}},jv={attributes:{...$v,figureStyle:{source:"attribute",selector:"figure",attribute:"style"}},save({attributes:e}){const{mainColor:t,customMainColor:n,textColor:a,customTextColor:o,value:r,citation:l,className:i,figureStyle:s}=e,c=i?.includes(Vv);let m,u;if(c){const e=(0,nt.getColorClassName)("background-color",t);m=ut()({"has-background":e||n,[e]:e}),u={backgroundColor:e?void 0:n}}else if(n)u={borderColor:n};else if(t){u={borderColor:Ov(s)}}const p=(0,nt.getColorClassName)("color",a),d=(a||o)&&ut()("has-text-color",{[p]:p}),g=p?void 0:{color:o};return(0,Ke.createElement)("figure",{className:m,style:u},(0,Ke.createElement)("blockquote",{className:d,style:g},(0,Ke.createElement)(nt.RichText.Content,{value:r,multiline:!0}),!nt.RichText.isEmpty(l)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:l})))},migrate({value:e,className:t,figureStyle:n,mainColor:a,customMainColor:o,customTextColor:r,...l}){const i=t?.includes(Vv);let s;if(o&&(s=i?{color:{background:o}}:{border:{color:o}}),r&&s&&(s.color={...s.color,text:r}),!i&&a&&n){const a=Ov(n);if(a)return{value:Gv(e),...l,className:t,style:{border:{color:a}}}}return{value:Gv(e),className:t,backgroundColor:i?a:void 0,borderColor:i?void 0:a,textAlign:i?"left":void 0,style:s,...l}}},Wv={attributes:$v,save({attributes:e}){const{mainColor:t,customMainColor:n,textColor:a,customTextColor:o,value:r,citation:l,className:i}=e,s=i?.includes(Vv);let c,m;if(s)c=(0,nt.getColorClassName)("background-color",t),c||(m={backgroundColor:n});else if(n)m={borderColor:n};else if(t){var u;const e=null!==(u=(0,gt.select)(nt.store).getSettings().colors)&&void 0!==u?u:[];m={borderColor:(0,nt.getColorObjectByAttributeValues)(e,t).color}}const p=(0,nt.getColorClassName)("color",a),d=a||o?ut()("has-text-color",{[p]:p}):void 0,g=p?void 0:{color:o};return(0,Ke.createElement)("figure",{className:c,style:m},(0,Ke.createElement)("blockquote",{className:d,style:g},(0,Ke.createElement)(nt.RichText.Content,{value:r,multiline:!0}),!nt.RichText.isEmpty(l)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:l})))},migrate({value:e,className:t,mainColor:n,customMainColor:a,customTextColor:o,...r}){const l=t?.includes(Vv);let i={};return a&&(i=l?{color:{background:a}}:{border:{color:a}}),o&&i&&(i.color={...i.color,text:o}),{value:Gv(e),className:t,backgroundColor:l?n:void 0,borderColor:l?void 0:n,textAlign:l?"left":void 0,style:i,...r}}},Zv={attributes:{...$v},save({attributes:e}){const{value:t,citation:n}=e;return(0,Ke.createElement)("blockquote",null,(0,Ke.createElement)(nt.RichText.Content,{value:t,multiline:!0}),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:n}))},migrate:({value:e,...t})=>({value:Gv(e),...t})},Qv={attributes:{...$v,citation:{type:"string",source:"html",selector:"footer"},align:{type:"string",default:"none"}},save({attributes:e}){const{value:t,citation:n,align:a}=e;return(0,Ke.createElement)("blockquote",{className:`align${a}`},(0,Ke.createElement)(nt.RichText.Content,{value:t,multiline:!0}),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"footer",value:n}))},migrate:({value:e,...t})=>({value:Gv(e),...t})},Kv=[Uv,qv,jv,Wv,Zv,Qv],Yv="web"===_t.Platform.OS;const Jv=function({attributes:e,setAttributes:t,isSelected:n,insertBlocksAfter:a}){const{textAlign:o,citation:r,value:l}=e,i=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${o}`]:o})}),s=!nt.RichText.isEmpty(r)||n;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:o,onChange:e=>{t({textAlign:e})}})),(0,Ke.createElement)("figure",{...i},(0,Ke.createElement)("blockquote",null,(0,Ke.createElement)(nt.RichText,{identifier:"value",tagName:"p",value:l,onChange:e=>t({value:e}),"aria-label":(0,tt.__)("Pullquote text"),placeholder:(0,tt.__)("Add quote"),textAlign:"center"}),s&&(0,Ke.createElement)(nt.RichText,{identifier:"citation",tagName:Yv?"cite":void 0,style:{display:"block"},value:r,"aria-label":(0,tt.__)("Pullquote citation text"),placeholder:(0,tt.__)("Add citation"),onChange:e=>t({citation:e}),className:"wp-block-pullquote__citation",__unstableMobileNoFocusOnMount:!0,textAlign:"center",__unstableOnSplitAtEnd:()=>a((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))}))))};const Xv={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,Qe.createBlock)("core/pullquote",{value:(0,Rn.toHTMLString)({value:(0,Rn.join)(e.map((({content:e})=>(0,Rn.create)({html:e}))),"\n")}),anchor:e.anchor})},{type:"block",blocks:["core/heading"],transform:({content:e,anchor:t})=>(0,Qe.createBlock)("core/pullquote",{value:e,anchor:t})}],to:[{type:"block",blocks:["core/paragraph"],transform:({value:e,citation:t})=>{const n=[];return e&&n.push((0,Qe.createBlock)("core/paragraph",{content:e})),t&&n.push((0,Qe.createBlock)("core/paragraph",{content:t})),0===n.length?(0,Qe.createBlock)("core/paragraph",{content:""}):n}},{type:"block",blocks:["core/heading"],transform:({value:e,citation:t})=>{if(!e)return(0,Qe.createBlock)("core/heading",{content:t});const n=(0,Qe.createBlock)("core/heading",{content:e});return t?[n,(0,Qe.createBlock)("core/heading",{content:t})]:n}}]},ef=Xv,tf={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/pullquote",title:"Pullquote",category:"text",description:"Give special visual emphasis to a quote from your text.",textdomain:"default",attributes:{value:{type:"rich-text",source:"rich-text",selector:"p",__experimentalRole:"content"},citation:{type:"rich-text",source:"rich-text",selector:"cite",__experimentalRole:"content"},textAlign:{type:"string"}},supports:{anchor:!0,align:["left","right","wide","full"],color:{gradients:!0,background:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},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}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},__experimentalStyle:{typography:{fontSize:"1.5em",lineHeight:"1.6"}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-pullquote-editor",style:"wp-block-pullquote"},{name:nf}=tf,af={icon:Fv,example:{attributes:{value:(0,tt.__)("One of the hardest things to do in technology is disrupt yourself."),citation:(0,tt.__)("Matt Mullenweg")}},transforms:ef,edit:Jv,save:function({attributes:e}){const{textAlign:t,citation:n,value:a}=e,o=!nt.RichText.isEmpty(n);return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:ut()({[`has-text-align-${t}`]:t})})},(0,Ke.createElement)("blockquote",null,(0,Ke.createElement)(nt.RichText.Content,{tagName:"p",value:a}),o&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:n})))},deprecated:Kv},of=()=>Xe({name:nf,metadata:tf,settings:af}),rf=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M18.1823 11.6392C18.1823 13.0804 17.0139 14.2487 15.5727 14.2487C14.3579 14.2487 13.335 13.4179 13.0453 12.2922L13.0377 12.2625L13.0278 12.2335L12.3985 10.377L12.3942 10.3785C11.8571 8.64997 10.246 7.39405 8.33961 7.39405C5.99509 7.39405 4.09448 9.29465 4.09448 11.6392C4.09448 13.9837 5.99509 15.8843 8.33961 15.8843C8.88499 15.8843 9.40822 15.781 9.88943 15.5923L9.29212 14.0697C8.99812 14.185 8.67729 14.2487 8.33961 14.2487C6.89838 14.2487 5.73003 13.0804 5.73003 11.6392C5.73003 10.1979 6.89838 9.02959 8.33961 9.02959C9.55444 9.02959 10.5773 9.86046 10.867 10.9862L10.8772 10.9836L11.4695 12.7311C11.9515 14.546 13.6048 15.8843 15.5727 15.8843C17.9172 15.8843 19.8178 13.9837 19.8178 11.6392C19.8178 9.29465 17.9172 7.39404 15.5727 7.39404C15.0287 7.39404 14.5066 7.4968 14.0264 7.6847L14.6223 9.20781C14.9158 9.093 15.2358 9.02959 15.5727 9.02959C17.0139 9.02959 18.1823 10.1979 18.1823 11.6392Z"})),lf=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,Ke.createElement)(Ye.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})),sf=e=>{const t=e?.reduce(((e,t)=>{const{mapById:n,mapByName:a,names:o}=e;return n[t.id]=t,a[t.name]=t,o.push(t.name),e}),{mapById:{},mapByName:{},names:[]});return{entities:e,...t}},cf=(e,t)=>{const n=t.split(".");let a=e;return n.forEach((e=>{a=a?.[e]})),a},mf=(e,t)=>(e||[]).map((e=>({...e,name:(0,Jn.decodeEntities)(cf(e,t))}))),uf=()=>{const e=(0,gt.useSelect)((e=>{const{getPostTypes:t}=e(dt.store),n=["attachment"],a=t({per_page:-1})?.filter((({viewable:e,slug:t})=>e&&!n.includes(t)));return a}),[]);return{postTypesTaxonomiesMap:(0,_t.useMemo)((()=>{if(e?.length)return e.reduce(((e,t)=>(e[t.slug]=t.taxonomies,e)),{})}),[e]),postTypesSelectOptions:(0,_t.useMemo)((()=>(e||[]).map((({labels:e,slug:t})=>({label:e.singular_name,value:t})))),[e])}},pf=e=>(0,gt.useSelect)((t=>{const{getTaxonomies:n}=t(dt.store);return n({type:e,per_page:-1,context:"view"})}),[e]);function df(e,t){return!e||e.includes(t)}function gf(e,t){const n=(0,gt.useSelect)((e=>e(Qe.store).getActiveBlockVariation("core/query",t)?.name),[t]),a=`core/query/${n}`;return(0,gt.useSelect)((t=>{if(!n)return!1;const{getBlockRootClientId:o,getPatternsByBlockTypes:r}=t(nt.store),l=o(e);return r(a,l).length>0}),[e,n,a])?a:"core/query"}const hf=(e,t)=>(0,gt.useSelect)((n=>{const{getBlockRootClientId:a,getPatternsByBlockTypes:o}=n(nt.store),r=a(e);return o(t,r)}),[t,e]),bf=e=>(0,gt.useSelect)((t=>{const{getClientIdsOfDescendants:n,getBlockName:a}=t(nt.store),o={};return n(e).forEach((e=>{const t=a(e);t.startsWith("core/")?"core/post-content"===t&&(o.hasPostContentBlock=!0):o.hasBlocksFromPlugins=!0})),o.hasUnsupportedBlocks=o.hasBlocksFromPlugins||o.hasPostContentBlock,o}),[e]);function _f({attributes:{query:e},setQuery:t,openPatternSelectionModal:n,name:a,clientId:o}){const r=!!hf(o,a).length,l=(0,jt.useInstanceId)(_f,"blocks-query-pagination-max-page-input");return(0,Ke.createElement)(Ke.Fragment,null,!e.inherit&&(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.Dropdown,{contentClassName:"block-library-query-toolbar__popover",renderToggle:({onToggle:e})=>(0,Ke.createElement)(et.ToolbarButton,{icon:lf,label:(0,tt.__)("Display settings"),onClick:e}),renderContent:()=>(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.BaseControl,null,(0,Ke.createElement)(et.__experimentalNumberControl,{__unstableInputWidth:"60px",label:(0,tt.__)("Items per Page"),labelPosition:"edge",min:1,max:100,onChange:e=>{isNaN(e)||e<1||e>100||t({perPage:e})},step:"1",value:e.perPage,isDragEnabled:!1})),(0,Ke.createElement)(et.BaseControl,null,(0,Ke.createElement)(et.__experimentalNumberControl,{__unstableInputWidth:"60px",label:(0,tt.__)("Offset"),labelPosition:"edge",min:0,max:100,onChange:e=>{isNaN(e)||e<0||e>100||t({offset:e})},step:"1",value:e.offset,isDragEnabled:!1})),(0,Ke.createElement)(et.BaseControl,{id:l,help:(0,tt.__)("Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero).")},(0,Ke.createElement)(et.__experimentalNumberControl,{id:l,__unstableInputWidth:"60px",label:(0,tt.__)("Max page to show"),labelPosition:"edge",min:0,onChange:e=>{isNaN(e)||e<0||t({pages:e})},step:"1",value:e.pages,isDragEnabled:!1})))})),r&&(0,Ke.createElement)(et.ToolbarGroup,{className:"wp-block-template-part__block-control-group"},(0,Ke.createElement)(et.ToolbarButton,{onClick:n},(0,tt.__)("Replace"))))}const yf=[{label:(0,tt.__)("Newest to oldest"),value:"date/desc"},{label:(0,tt.__)("Oldest to newest"),value:"date/asc"},{label:(0,tt.__)("A → Z"),value:"title/asc"},{label:(0,tt.__)("Z → A"),value:"title/desc"}];const vf=function({order:e,orderBy:t,onChange:n}){return(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Order by"),value:`${t}/${e}`,options:yf,onChange:e=>{const[t,a]=e.split("/");n({order:a,orderBy:t})}})},ff={who:"authors",per_page:-1,_fields:"id,name",context:"view"};const kf=function({value:e,onChange:t}){const n=(0,gt.useSelect)((e=>{const{getUsers:t}=e(dt.store);return t(ff)}),[]);if(!n)return null;const a=sf(n),o=(e?e.toString().split(","):[]).reduce(((e,t)=>{const n=a.mapById[t];return n&&e.push({id:t,value:n.name}),e}),[]);return(0,Ke.createElement)(et.FormTokenField,{label:(0,tt.__)("Authors"),value:o,suggestions:a.names,onChange:e=>{const n=Array.from(e.reduce(((e,t)=>{const n=((e,t)=>{const n=t?.id||e[t]?.id;if(n)return n})(a.mapByName,t);return n&&e.add(n),e}),new Set));t({author:n.join(",")})},__experimentalShowHowTo:!1})},xf=[],wf={order:"asc",_fields:"id,title",context:"view"};const Ef=function({parents:e,postType:t,onChange:n}){const[a,o]=(0,_t.useState)(""),[r,l]=(0,_t.useState)(xf),[i,s]=(0,_t.useState)(xf),c=(0,jt.useDebounce)(o,250),{searchResults:m,searchHasResolved:u}=(0,gt.useSelect)((n=>{if(!a)return{searchResults:xf,searchHasResolved:!0};const{getEntityRecords:o,hasFinishedResolution:r}=n(dt.store),l=["postType",t,{...wf,search:a,orderby:"relevance",exclude:e,per_page:20}];return{searchResults:o(...l),searchHasResolved:r("getEntityRecords",l)}}),[a,e]),p=(0,gt.useSelect)((n=>{if(!e?.length)return xf;const{getEntityRecords:a}=n(dt.store);return a("postType",t,{...wf,include:e,per_page:e.length})}),[e]);(0,_t.useEffect)((()=>{if(e?.length||l(xf),!p?.length)return;const t=sf(mf(p,"title.rendered")),n=e.reduce(((e,n)=>{const a=t.mapById[n];return a&&e.push({id:n,value:a.name}),e}),[]);l(n)}),[e,p]);const d=(0,_t.useMemo)((()=>m?.length?sf(mf(m,"title.rendered")):xf),[m]);return(0,_t.useEffect)((()=>{u&&s(d.names)}),[d.names,u]),(0,Ke.createElement)(et.FormTokenField,{label:(0,tt.__)("Parents"),value:r,onInputChange:c,suggestions:i,onChange:e=>{const t=Array.from(e.reduce(((e,t)=>{const n=((e,t)=>{const n=t?.id||e?.[t]?.id;if(n)return n})(d.mapByName,t);return n&&e.add(n),e}),new Set));s(xf),n({parents:t})},__experimentalShowHowTo:!1})},Cf=[],Sf={order:"asc",_fields:"id,name",context:"view"},Bf=(e,t)=>{const n=t?.id||e?.find((e=>e.name===t))?.id;if(n)return n;const a=t.toLocaleLowerCase();return e?.find((e=>e.name.toLocaleLowerCase()===a))?.id};function Nf({onChange:e,query:t}){const{postType:n,taxQuery:a}=t,o=pf(n);return o&&0!==o.length?(0,Ke.createElement)(Ke.Fragment,null,o.map((t=>{const n=a?.[t.slug]||[];return(0,Ke.createElement)(Tf,{key:t.slug,taxonomy:t,termIds:n,onChange:n=>e({taxQuery:{...a,[t.slug]:n}})})}))):null}function Tf({taxonomy:e,termIds:t,onChange:n}){const[a,o]=(0,_t.useState)(""),[r,l]=(0,_t.useState)(Cf),[i,s]=(0,_t.useState)(Cf),c=(0,jt.useDebounce)(o,250),{searchResults:m,searchHasResolved:u}=(0,gt.useSelect)((n=>{if(!a)return{searchResults:Cf,searchHasResolved:!0};const{getEntityRecords:o,hasFinishedResolution:r}=n(dt.store),l=["taxonomy",e.slug,{...Sf,search:a,orderby:"name",exclude:t,per_page:20}];return{searchResults:o(...l),searchHasResolved:r("getEntityRecords",l)}}),[a,t]),p=(0,gt.useSelect)((n=>{if(!t?.length)return Cf;const{getEntityRecords:a}=n(dt.store);return a("taxonomy",e.slug,{...Sf,include:t,per_page:t.length})}),[t]);(0,_t.useEffect)((()=>{if(t?.length||l(Cf),!p?.length)return;const e=t.reduce(((e,t)=>{const n=p.find((e=>e.id===t));return n&&e.push({id:t,value:n.name}),e}),[]);l(e)}),[t,p]),(0,_t.useEffect)((()=>{u&&s(m.map((e=>e.name)))}),[m,u]);return(0,Ke.createElement)("div",{className:"block-library-query-inspector__taxonomy-control"},(0,Ke.createElement)(et.FormTokenField,{label:e.name,value:r,onInputChange:c,suggestions:i,displayTransform:Jn.decodeEntities,onChange:e=>{const t=new Set;for(const n of e){const e=Bf(m,n);e&&t.add(e)}s(Cf),n(Array.from(t))},__experimentalShowHowTo:!1}))}const If=[{label:(0,tt.__)("Include"),value:""},{label:(0,tt.__)("Exclude"),value:"exclude"},{label:(0,tt.__)("Only"),value:"only"}];function Pf({value:e,onChange:t}){return(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Sticky posts"),options:If,value:e,onChange:t,help:(0,tt.__)("Blog posts can be “stickied”, a feature that places them at the top of the front page of posts, keeping it there until new sticky posts are published.")})}function Mf({enhancedPagination:e,setAttributes:t,clientId:n}){const{hasUnsupportedBlocks:a}=bf(n);let o=(0,tt.__)("Browsing between pages requires a full page reload.");return e?o=(0,tt.__)("Browsing between pages won't require a full page reload, unless non-compatible blocks are detected."):a&&(o=(0,tt.__)("Force page reload can't be disabled because there are non-compatible blocks inside the Query block.")),(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToggleControl,{label:(0,tt.__)("Force page reload"),help:o,checked:!e,disabled:a,onChange:e=>{t({enhancedPagination:!e})}}))}const zf=({attributes:{query:{postType:e}={}}={}})=>{if(!e)return null;const t=(0,pt.addQueryArgs)("post-new.php",{post_type:e});return(0,Ke.createElement)("div",{className:"wp-block-query__create-new-link"},(0,_t.createInterpolateElement)((0,tt.__)("<a>Add new post</a>"),{a:(0,Ke.createElement)("a",{href:t})}))},{BlockInfo:Rf}=Ft(nt.privateApis);function Af(e){const{attributes:t,setQuery:n,setDisplayLayout:a,setAttributes:o,clientId:r}=e,{query:l,displayLayout:i,enhancedPagination:s}=t,{order:c,orderBy:m,author:u,postType:p,sticky:d,inherit:g,taxQuery:h,parents:b}=l,_=function(e){return(0,gt.useSelect)((t=>t(Qe.store).getActiveBlockVariation("core/query",e)?.allowedControls),[e])}(t),[y,v]=(0,_t.useState)("post"===p),{postTypesTaxonomiesMap:f,postTypesSelectOptions:k}=uf(),x=pf(p),w=function(e){return(0,gt.useSelect)((t=>{const n=t(dt.store).getPostType(e);return n?.viewable&&n?.hierarchical}),[e])}(p);(0,_t.useEffect)((()=>{v("post"===p)}),[p]);const[E,C]=(0,_t.useState)(l.search),S=(0,_t.useCallback)((0,jt.debounce)((()=>{l.search!==E&&n({search:E})}),250),[E,l.search]);(0,_t.useEffect)((()=>(S(),S.cancel)),[E,S]);const B=df(_,"inherit"),N=!g&&df(_,"postType"),T=!g&&df(_,"order"),I=!g&&y&&df(_,"sticky"),P=B||N||T||I,M=!!x?.length&&df(_,"taxQuery"),z=df(_,"author"),R=df(_,"search"),A=df(_,"parents")&&w,H=M||z||R||A;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Rf,null,(0,Ke.createElement)(zf,{...e})),P&&(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},B&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Inherit query from template"),help:(0,tt.__)("Toggle to use the global query context that is set with the current template, such as an archive or search. Disable to customize the settings independently."),checked:!!g,onChange:e=>n({inherit:!!e})}),N&&(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,options:k,value:p,label:(0,tt.__)("Post type"),onChange:e=>{const t={postType:e},a=f[e],o=Object.entries(h||{}).reduce(((e,[t,n])=>(a.includes(t)&&(e[t]=n),e)),{});t.taxQuery=Object.keys(o).length?o:void 0,"post"!==e&&(t.sticky=""),t.parents=[],n(t)},help:(0,tt.__)("WordPress contains different types of content and they are divided into collections called “Post types”. By default there are a few different ones such as blog posts and pages, but plugins could add more.")}),false,T&&(0,Ke.createElement)(vf,{order:c,orderBy:m,onChange:n}),I&&(0,Ke.createElement)(Pf,{value:d,onChange:e=>n({sticky:e})}),(0,Ke.createElement)(Mf,{enhancedPagination:s,setAttributes:o,clientId:r})),!g&&H&&(0,Ke.createElement)(et.__experimentalToolsPanel,{className:"block-library-query-toolspanel__filters",label:(0,tt.__)("Filters"),resetAll:()=>{n({author:"",parents:[],search:"",taxQuery:null}),C("")},dropdownMenuProps:op},M&&(0,Ke.createElement)(et.__experimentalToolsPanelItem,{label:(0,tt.__)("Taxonomies"),hasValue:()=>Object.values(h||{}).some((e=>!!e.length)),onDeselect:()=>n({taxQuery:null})},(0,Ke.createElement)(Nf,{onChange:n,query:l})),z&&(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>!!u,label:(0,tt.__)("Authors"),onDeselect:()=>n({author:""})},(0,Ke.createElement)(kf,{value:u,onChange:n})),R&&(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>!!E,label:(0,tt.__)("Keyword"),onDeselect:()=>C("")},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Keyword"),value:E,onChange:C})),A&&(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>!!b?.length,label:(0,tt.__)("Parents"),onDeselect:()=>n({parents:[]})},(0,Ke.createElement)(Ef,{parents:b,postType:p,onChange:n}))))}const Hf="wp-block-query-enhanced-pagination-modal__description";function Lf({clientId:e,attributes:{enhancedPagination:t},setAttributes:n}){const[a,o]=(0,_t.useState)(!1),{hasBlocksFromPlugins:r,hasPostContentBlock:l,hasUnsupportedBlocks:i}=bf(e);(0,_t.useEffect)((()=>{t&&i&&(n({enhancedPagination:!1}),o(!0))}),[t,i,n]);const s=()=>{o(!1)};let c=(0,tt.__)('If you still want to prevent full page reloads, remove that block, then disable "Force page reload" again in the Query Block settings.');return r?c=(0,tt.__)("Currently, avoiding full page reloads is not possible when blocks from plugins are present inside the Query block.")+" "+c:l&&(c=(0,tt.__)("Currently, avoiding full page reloads is not possible when a Content block is present inside the Query block.")+" "+c),a&&(0,Ke.createElement)(et.Modal,{title:(0,tt.__)("Query block: Force page reload enabled"),className:"wp-block-query__enhanced-pagination-modal",aria:{describedby:Hf},role:"alertdialog",focusOnMount:"firstElement",isDismissible:!1,onRequestClose:s},(0,Ke.createElement)(et.__experimentalVStack,{alignment:"right",spacing:5},(0,Ke.createElement)("span",{id:Hf},c),(0,Ke.createElement)(et.Button,{variant:"primary",onClick:s},(0,tt.__)("OK"))))}const Df=[["core/post-template"]];function Ff({attributes:e,setAttributes:t,openPatternSelectionModal:n,name:a,clientId:o}){const{queryId:r,query:l,displayLayout:i,tagName:s="div",query:{inherit:c}={}}=e,{__unstableMarkNextChangeAsNotPersistent:m}=(0,gt.useDispatch)(nt.store),u=(0,jt.useInstanceId)(Ff),p=(0,nt.useBlockProps)(),d=(0,nt.useInnerBlocksProps)(p,{template:Df}),{postsPerPage:g}=(0,gt.useSelect)((e=>{const{getSettings:t}=e(nt.store),{getEntityRecord:n,canUser:a}=e(dt.store);return{postsPerPage:(a("read","settings")?+n("root","site")?.posts_per_page:+t().postsPerPage)||3}}),[]);(0,_t.useEffect)((()=>{const e={};(c&&l.perPage!==g||!l.perPage&&g)&&(e.perPage=g),Object.keys(e).length&&(m(),h(e))}),[l.perPage,g,c]),(0,_t.useEffect)((()=>{Number.isFinite(r)||(m(),t({queryId:u}))}),[r,u]);const h=e=>t({query:{...l,...e}}),b={main:(0,tt.__)("The <main> element should be used for the primary content of your document only. "),section:(0,tt.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element."),aside:(0,tt.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.")};return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Lf,{attributes:e,setAttributes:t,clientId:o}),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(Af,{attributes:e,setQuery:h,setDisplayLayout:e=>t({displayLayout:{...i,...e}}),setAttributes:t,clientId:o})),(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(_f,{name:a,clientId:o,attributes:e,setQuery:h,openPatternSelectionModal:n})),(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("HTML element"),options:[{label:(0,tt.__)("Default (<div>)"),value:"div"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<aside>",value:"aside"}],value:s,onChange:e=>t({tagName:e}),help:b[s]})),(0,Ke.createElement)(s,{...d}))}function Vf({attributes:e,clientId:t,name:n,openPatternSelectionModal:a,setAttributes:o}){const[r,l]=(0,_t.useState)(!1),i=(0,nt.useBlockProps)(),s=gf(t,e),{blockType:c,activeBlockVariation:m,hasPatterns:u}=(0,gt.useSelect)((a=>{const{getActiveBlockVariation:o,getBlockType:r}=a(Qe.store),{getBlockRootClientId:l,getPatternsByBlockTypes:i}=a(nt.store),c=l(t);return{blockType:r(n),activeBlockVariation:o(n,e),hasPatterns:!!i(s,c).length}}),[n,s,t,e]),p=m?.icon?.src||m?.icon||c?.icon?.src,d=m?.title||c?.title;return r?(0,Ke.createElement)($f,{clientId:t,attributes:e,setAttributes:o,icon:p,label:d}):(0,Ke.createElement)("div",{...i},(0,Ke.createElement)(et.Placeholder,{icon:p,label:d,instructions:(0,tt.__)("Choose a pattern for the query loop or start blank.")},!!u&&(0,Ke.createElement)(et.Button,{variant:"primary",onClick:a},(0,tt.__)("Choose")),(0,Ke.createElement)(et.Button,{variant:"secondary",onClick:()=>{l(!0)}},(0,tt.__)("Start blank"))))}function $f({clientId:e,attributes:t,setAttributes:n,icon:a,label:o}){const r=function(e){const{activeVariationName:t,blockVariations:n}=(0,gt.useSelect)((t=>{const{getActiveBlockVariation:n,getBlockVariations:a}=t(Qe.store);return{activeVariationName:n("core/query",e)?.name,blockVariations:a("core/query","block")}}),[e]);return(0,_t.useMemo)((()=>{const e=e=>!e.attributes?.namespace;if(!t)return n.filter(e);const a=n.filter((e=>e.attributes?.namespace?.includes(t)));return a.length?a:n.filter(e)}),[t,n])}(t),{replaceInnerBlocks:l}=(0,gt.useDispatch)(nt.store),i=(0,nt.useBlockProps)();return(0,Ke.createElement)("div",{...i},(0,Ke.createElement)(nt.__experimentalBlockVariationPicker,{icon:a,label:o,variations:r,onSelect:a=>{a.attributes&&n({...a.attributes,query:{...a.attributes.query,postType:t.query.postType||a.attributes.query.postType},namespace:t.namespace}),a.innerBlocks&&l(e,(0,Qe.createBlocksFromInnerBlocksTemplate)(a.innerBlocks),!1)}}))}function Of(e=""){return e=(e=nc()(e)).trim().toLowerCase()}function Gf(e,t){const n=Of(t),a=Of(e.title);let o=0;if(n===a)o+=30;else if(a.startsWith(n))o+=20;else{n.split(" ").every((e=>a.includes(e)))&&(o+=10)}return o}function Uf(e=[],t=""){if(!t)return e;const n=e.map((e=>[e,Gf(e,t)])).filter((([,e])=>e>0));return n.sort((([,e],[,t])=>t-e)),n.map((([e])=>e))}function qf({clientId:e,attributes:t,setIsPatternSelectionModalOpen:n}){const[a,o]=(0,_t.useState)(""),{replaceBlock:r,selectBlock:l}=(0,gt.useDispatch)(nt.store),i=(0,_t.useMemo)((()=>({previewPostType:t.query.postType})),[t.query.postType]),s=gf(e,t),c=hf(e,s),m=(0,_t.useMemo)((()=>Uf(c,a)),[c,a]),u=(0,jt.useAsyncList)(m);return(0,Ke.createElement)(et.Modal,{overlayClassName:"block-library-query-pattern__selection-modal",title:(0,tt.__)("Choose a pattern"),onRequestClose:()=>n(!1),isFullScreen:!0},(0,Ke.createElement)("div",{className:"block-library-query-pattern__selection-content"},(0,Ke.createElement)("div",{className:"block-library-query-pattern__selection-search"},(0,Ke.createElement)(et.SearchControl,{__nextHasNoMarginBottom:!0,onChange:o,value:a,label:(0,tt.__)("Search for patterns"),placeholder:(0,tt.__)("Search")})),(0,Ke.createElement)(nt.BlockContextProvider,{value:i},(0,Ke.createElement)(nt.__experimentalBlockPatternsList,{blockPatterns:m,shownPatterns:u,onClickPattern:(n,a)=>{const{newBlocks:o,queryClientIds:i}=((e,t)=>{const{query:{postType:n,inherit:a}}=t,o=e.map((e=>(0,Qe.cloneBlock)(e))),r=[],l=[...o];for(;l.length>0;){const e=l.shift();"core/query"===e.name&&(e.attributes.query={...e.attributes.query,postType:n,inherit:a},r.push(e.clientId)),e.innerBlocks?.forEach((e=>{l.push(e)}))}return{newBlocks:o,queryClientIds:r}})(a,t);r(e,o),i[0]&&l(i[0])}}))))}const jf=e=>{const{clientId:t,attributes:n}=e,[a,o]=(0,_t.useState)(!1),r=(0,gt.useSelect)((e=>!!e(nt.store).getBlocks(t).length),[t])?Ff:Vf;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(r,{...e,openPatternSelectionModal:()=>o(!0)}),a&&(0,Ke.createElement)(qf,{clientId:t,attributes:n,setIsPatternSelectionModalOpen:o}))};const Wf=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},(0,Ke.createElement)(et.Path,{d:"M41 9H7v3h34V9zm-22 5H7v1h12v-1zM7 26h12v1H7v-1zm34-5H7v3h34v-3zM7 38h12v1H7v-1zm34-5H7v3h34v-3z"})),Zf=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},(0,Ke.createElement)(et.Path,{d:"M41 9H7v3h34V9zm-4 5H7v1h30v-1zm4 3H7v1h34v-1zM7 20h30v1H7v-1zm0 12h30v1H7v-1zm34 3H7v1h34v-1zM7 38h30v1H7v-1zm34-11H7v3h34v-3z"})),Qf=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},(0,Ke.createElement)(et.Path,{d:"M41 9H7v3h34V9zm-22 5H7v1h12v-1zm22 3H7v1h34v-1zM7 20h34v1H7v-1zm0 12h12v1H7v-1zm34 3H7v1h34v-1zM7 38h34v1H7v-1zm34-11H7v3h34v-3z"})),Kf=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},(0,Ke.createElement)(et.Path,{d:"M7 9h34v6H7V9zm12 8H7v1h12v-1zm18 3H7v1h30v-1zm0 18H7v1h30v-1zM7 35h12v1H7v-1zm34-8H7v6h34v-6z"})),Yf={query:{perPage:3,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!1}},Jf=[{name:"posts-list",title:(0,tt.__)("Posts List"),description:(0,tt.__)("Display a list of your most recent posts, excluding sticky posts."),icon:Sp,attributes:{namespace:"core/posts-list",query:{perPage:4,pages:1,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",sticky:"exclude",inherit:!1}},scope:["inserter"],isActive:({namespace:e,query:t})=>"core/posts-list"===e&&"post"===t.postType},{name:"title-date",title:(0,tt.__)("Title & Date"),icon:Wf,attributes:{...Yf},innerBlocks:[["core/post-template",{},[["core/post-title"],["core/post-date"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]},{name:"title-excerpt",title:(0,tt.__)("Title & Excerpt"),icon:Zf,attributes:{...Yf},innerBlocks:[["core/post-template",{},[["core/post-title"],["core/post-excerpt"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]},{name:"title-date-excerpt",title:(0,tt.__)("Title, Date, & Excerpt"),icon:Qf,attributes:{...Yf},innerBlocks:[["core/post-template",{},[["core/post-title"],["core/post-date"],["core/post-excerpt"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]},{name:"image-date-title",title:(0,tt.__)("Image, Date, & Title"),icon:Kf,attributes:{...Yf},innerBlocks:[["core/post-template",{},[["core/post-featured-image"],["core/post-date"],["core/post-title"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]}],{cleanEmptyObject:Xf}=Ft(nt.privateApis),ek=e=>{const{query:t}=e,{categoryIds:n,tagIds:a,...o}=t;return(t.categoryIds?.length||t.tagIds?.length)&&(o.taxQuery={category:t.categoryIds?.length?t.categoryIds:void 0,post_tag:t.tagIds?.length?t.tagIds:void 0}),{...e,query:o}},tk=(e,t)=>{const{style:n,backgroundColor:a,gradient:o,textColor:r,...l}=e;if(!(a||o||r||n?.color||n?.elements?.link))return[e,t];if(n&&(l.style=Xf({...n,color:void 0,elements:{...n.elements,link:void 0}})),nk(t)){const e=t[0],i=n?.color||n?.elements?.link||e.attributes.style?Xf({...e.attributes.style,color:n?.color,elements:n?.elements?.link?{link:n?.elements?.link}:void 0}):void 0;return[l,[(0,Qe.createBlock)("core/group",{...e.attributes,backgroundColor:a,gradient:o,textColor:r,style:i},e.innerBlocks)]]}return[l,[(0,Qe.createBlock)("core/group",{backgroundColor:a,gradient:o,textColor:r,style:Xf({color:n?.color,elements:n?.elements?.link?{link:n?.elements?.link}:void 0})},t)]]},nk=(e=[])=>1===e.length&&"core/group"===e[0].name,ak=e=>{const{layout:t=null}=e;if(!t)return e;const{inherit:n=null,contentSize:a=null,...o}=t;return n||a?{...e,layout:{...o,contentSize:a,type:"constrained"}}:e},ok=(e=[])=>{let t=null;for(const n of e){if("core/post-template"===n.name){t=n;break}n.innerBlocks.length&&(t=ok(n.innerBlocks))}return t},rk=(e=[],t)=>(e.forEach(((n,a)=>{"core/post-template"===n.name?e.splice(a,1,t):n.innerBlocks.length&&(n.innerBlocks=rk(n.innerBlocks,t))})),e),lk=(e,t)=>{const{displayLayout:n=null,...a}=e;if(!n)return[e,t];const o=ok(t);if(!o)return[e,t];const{type:r,columns:l}=n,i="flex"===r?"grid":"default",s=(0,Qe.createBlock)("core/post-template",{...o.attributes,layout:{type:i,...l&&{columnCount:l}}},o.innerBlocks);return[a,rk(t,s)]},ik={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",categoryIds:[],tagIds:[],order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0}},layout:{type:"object",default:{type:"list"}}},supports:{html:!1},migrate(e,t){const n=ek(e),{layout:a,...o}=n,r={...o,displayLayout:n.layout};return lk(r,t)},save:()=>(0,Ke.createElement)(nt.InnerBlocks.Content,null)},sk={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",categoryIds:[],tagIds:[],order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},layout:!0},isEligible:({query:{categoryIds:e,tagIds:t}={}})=>e||t,migrate(e,t){const n=ek(e),[a,o]=tk(n,t),r=ak(a);return lk(r,o)},save({attributes:{tagName:e="div"}}){const t=nt.useBlockProps.save(),n=nt.useInnerBlocksProps.save(t);return(0,Ke.createElement)(e,{...n})}},ck={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[]}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}},namespace:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},layout:!0},isEligible(e){const{style:t,backgroundColor:n,gradient:a,textColor:o}=e;return n||a||o||t?.color||t?.elements?.link},migrate(e,t){const[n,a]=tk(e,t),o=ak(n);return lk(o,a)},save({attributes:{tagName:e="div"}}){const t=nt.useBlockProps.save(),n=nt.useInnerBlocksProps.save(t);return(0,Ke.createElement)(e,{...n})}},mk={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[]}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}},namespace:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},layout:!0},save({attributes:{tagName:e="div"}}){const t=nt.useBlockProps.save(),n=nt.useInnerBlocksProps.save(t);return(0,Ke.createElement)(e,{...n})},isEligible:({layout:e})=>e?.inherit||e?.contentSize&&"constrained"!==e?.type,migrate(e,t){const n=ak(e);return lk(n,t)}},uk=[{attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[]}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}},namespace:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,layout:!0},save({attributes:{tagName:e="div"}}){const t=nt.useBlockProps.save(),n=nt.useInnerBlocksProps.save(t);return(0,Ke.createElement)(e,{...n})},isEligible:({displayLayout:e})=>!!e,migrate:lk},mk,ck,sk,ik],pk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query",title:"Query Loop",category:"theme",description:"An advanced block that allows displaying post types based on different query parameters and visual configurations.",textdomain:"default",attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[]}},tagName:{type:"string",default:"div"},namespace:{type:"string"},enhancedPagination:{type:"boolean",default:!1}},providesContext:{queryId:"queryId",query:"query",displayLayout:"displayLayout",enhancedPagination:"enhancedPagination"},supports:{align:["wide","full"],html:!1,layout:!0,interactivity:!0},editorStyle:"wp-block-query-editor"},{name:dk}=pk,gk={icon:rf,edit:jf,save:function({attributes:{tagName:e="div"}}){const t=nt.useBlockProps.save(),n=nt.useInnerBlocksProps.save(t);return(0,Ke.createElement)(e,{...n})},variations:Jf,deprecated:uk},hk=()=>Xe({name:dk,metadata:pk,settings:gk}),bk=[["core/paragraph",{placeholder:(0,tt.__)("Add text or blocks that will display when a query returns no results.")}]];const _k={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query-no-results",title:"No results",category:"theme",description:"Contains the block elements used to render content when no query results are found.",parent:["core/query"],textdomain:"default",usesContext:["queryId","query"],supports:{align:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:yk}=_k,vk={icon:rf,edit:function(){const e=(0,nt.useBlockProps)(),t=(0,nt.useInnerBlocksProps)(e,{template:bk});return(0,Ke.createElement)("div",{...t})},save:function(){return(0,Ke.createElement)(nt.InnerBlocks.Content,null)}},fk=()=>Xe({name:yk,metadata:_k,settings:vk});function kk({value:e,onChange:t}){return(0,Ke.createElement)(et.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Arrow"),value:e,onChange:t,help:(0,tt.__)("A decorative arrow appended to the next and previous page link."),isBlock:!0},(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"none",label:(0,tt._x)("None","Arrow option for Query Pagination Next/Previous blocks")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,tt._x)("Arrow","Arrow option for Query Pagination Next/Previous blocks")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,tt._x)("Chevron","Arrow option for Query Pagination Next/Previous blocks")}))}function xk({value:e,onChange:t}){return(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show label text"),help:(0,tt.__)('Toggle off to hide the label text, e.g. "Next Page".'),onChange:t,checked:!0===e})}const wk=[["core/query-pagination-previous"],["core/query-pagination-numbers"],["core/query-pagination-next"]];const Ek=[{save:()=>(0,Ke.createElement)("div",{...nt.useBlockProps.save()},(0,Ke.createElement)(nt.InnerBlocks.Content,null))}],Ck={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query-pagination",title:"Pagination",category:"theme",ancestor:["core/query"],allowedBlocks:["core/query-pagination-previous","core/query-pagination-numbers","core/query-pagination-next"],description:"Displays a paginated navigation to next/previous set of posts, when applicable.",textdomain:"default",attributes:{paginationArrow:{type:"string",default:"none"},showLabel:{type:"boolean",default:!0}},usesContext:["queryId","query"],providesContext:{paginationArrow:"paginationArrow",showLabel:"showLabel"},supports:{align:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-query-pagination-editor",style:"wp-block-query-pagination"},{name:Sk}=Ck,Bk={icon:sr,edit:function({attributes:{paginationArrow:e,showLabel:t},setAttributes:n,clientId:a}){const o=(0,gt.useSelect)((e=>{const{getBlocks:t}=e(nt.store),n=t(a);return n?.find((e=>["core/query-pagination-next","core/query-pagination-previous"].includes(e.name)))}),[a]),r=(0,nt.useBlockProps)(),l=(0,nt.useInnerBlocksProps)(r,{template:wk});return(0,_t.useEffect)((()=>{"none"!==e||t||n({showLabel:!0})}),[e,n,t]),(0,Ke.createElement)(Ke.Fragment,null,o&&(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(kk,{value:e,onChange:e=>{n({paginationArrow:e})}}),"none"!==e&&(0,Ke.createElement)(xk,{value:t,onChange:e=>{n({showLabel:e})}}))),(0,Ke.createElement)("nav",{...l}))},save:function(){return(0,Ke.createElement)(nt.InnerBlocks.Content,null)},deprecated:Ek},Nk=()=>Xe({name:Sk,metadata:Ck,settings:Bk}),Tk={none:"",arrow:"→",chevron:"»"};const Ik={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query-pagination-next",title:"Next Page",category:"theme",parent:["core/query-pagination"],description:"Displays the next posts page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["queryId","query","paginationArrow","showLabel","enhancedPagination"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:Pk}=Ik,Mk={icon:hr,edit:function({attributes:{label:e},setAttributes:t,context:{paginationArrow:n,showLabel:a}}){const o=Tk[n];return(0,Ke.createElement)("a",{href:"#pagination-next-pseudo-link",onClick:e=>e.preventDefault(),...(0,nt.useBlockProps)()},a&&(0,Ke.createElement)(nt.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,tt.__)("Next page link"),placeholder:(0,tt.__)("Next Page"),value:e,onChange:e=>t({label:e})}),o&&(0,Ke.createElement)("span",{className:`wp-block-query-pagination-next-arrow is-arrow-${n}`,"aria-hidden":!0},o))}},zk=()=>Xe({name:Pk,metadata:Ik,settings:Mk}),Rk=(e,t="a",n="")=>(0,Ke.createElement)(t,{key:e,className:`page-numbers ${n}`},e);const Ak={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query-pagination-numbers",title:"Page Numbers",category:"theme",parent:["core/query-pagination"],description:"Displays a list of page numbers for pagination.",textdomain:"default",attributes:{midSize:{type:"number",default:2}},usesContext:["queryId","query","enhancedPagination"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-query-pagination-numbers-editor"},{name:Hk}=Ak,Lk={icon:kr,edit:function({attributes:e,setAttributes:t}){const{midSize:n}=e,a=(e=>{const t=[];for(let n=1;n<=e;n++)t.push(Rk(n));t.push(Rk(e+1,"span","current"));for(let n=1;n<=e;n++)t.push(Rk(e+1+n));return t.push(Rk("...","span","dots")),t.push(Rk(2*e+3)),(0,Ke.createElement)(Ke.Fragment,null,t)})(parseInt(n,10));return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.RangeControl,{label:(0,tt.__)("Number of links"),help:(0,tt.__)("Specify how many links can appear before and after the current page number. Links to the first, current and last page are always visible."),value:n,onChange:e=>{t({midSize:parseInt(e,10)})},min:0,max:5,withInputField:!1}))),(0,Ke.createElement)("div",{...(0,nt.useBlockProps)()},a))}},Dk=()=>Xe({name:Hk,metadata:Ak,settings:Lk}),Fk={none:"",arrow:"←",chevron:"«"};const Vk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query-pagination-previous",title:"Previous Page",category:"theme",parent:["core/query-pagination"],description:"Displays the previous posts page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["queryId","query","paginationArrow","showLabel","enhancedPagination"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:$k}=Vk,Ok={icon:nr,edit:function({attributes:{label:e},setAttributes:t,context:{paginationArrow:n,showLabel:a}}){const o=Fk[n];return(0,Ke.createElement)("a",{href:"#pagination-previous-pseudo-link",onClick:e=>e.preventDefault(),...(0,nt.useBlockProps)()},o&&(0,Ke.createElement)("span",{className:`wp-block-query-pagination-previous-arrow is-arrow-${n}`,"aria-hidden":!0},o),a&&(0,Ke.createElement)(nt.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,tt.__)("Previous page link"),placeholder:(0,tt.__)("Previous Page"),value:e,onChange:e=>t({label:e})}))}},Gk=()=>Xe({name:$k,metadata:Vk,settings:Ok}),Uk=["archive","search"];const qk=[{isDefault:!0,name:"archive-title",title:(0,tt.__)("Archive Title"),description:(0,tt.__)("Display the archive title based on the queried object."),icon:Br,attributes:{type:"archive"},scope:["inserter"]},{isDefault:!1,name:"search-title",title:(0,tt.__)("Search Results Title"),description:(0,tt.__)("Display the search results title based on the queried object."),icon:Br,attributes:{type:"search"},scope:["inserter"]}];qk.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.type===t.type)}));const jk=qk,Wk={attributes:{type:{type:"string"},textAlign:{type:"string"},level:{type:"number",default:1}},supports:{align:["wide","full"],html:!1,color:{gradients:!0},spacing:{margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0}},save:()=>null,migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},Zk=[Wk],Qk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query-title",title:"Query Title",category:"theme",description:"Display the query title.",textdomain:"default",attributes:{type:{type:"string"},textAlign:{type:"string"},level:{type:"number",default:1},showPrefix:{type:"boolean",default:!0},showSearchTerm:{type:"boolean",default:!0}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-query-title"},{name:Kk}=Qk,Yk={icon:Br,edit:function({attributes:{type:e,level:t,textAlign:n,showPrefix:a,showSearchTerm:o},setAttributes:r}){const{archiveTypeTitle:l,archiveNameLabel:i}=(0,gt.useSelect)((e=>{const{getSettings:t}=e(nt.store),{__experimentalArchiveTitleNameLabel:n,__experimentalArchiveTitleTypeLabel:a}=t();return{archiveTypeTitle:a,archiveNameLabel:n}})),s=`h${t}`,c=(0,nt.useBlockProps)({className:ut()("wp-block-query-title__placeholder",{[`has-text-align-${n}`]:n})});if(!Uk.includes(e))return(0,Ke.createElement)("div",{...c},(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Provided type is not supported.")));let m;if("archive"===e){let e;e=l?a?i?(0,tt.sprintf)((0,tt.__)("%1$s: %2$s"),l,i):(0,tt.sprintf)((0,tt.__)("%s: Name"),l):i||(0,tt.sprintf)((0,tt.__)("%s name"),l):a?(0,tt.__)("Archive type: Name"):(0,tt.__)("Archive title"),m=(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show archive type in title"),onChange:()=>r({showPrefix:!a}),checked:a}))),(0,Ke.createElement)(s,{...c},e))}return"search"===e&&(m=(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show search term in title"),onChange:()=>r({showSearchTerm:!o}),checked:o}))),(0,Ke.createElement)(s,{...c},o?(0,tt.__)("Search results for: “search term”"):(0,tt.__)("Search results")))),(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.HeadingLevelDropdown,{value:t,onChange:e=>r({level:e})}),(0,Ke.createElement)(nt.AlignmentControl,{value:n,onChange:e=>{r({textAlign:e})}})),m)},variations:jk,deprecated:Zk},Jk=()=>Xe({name:Kk,metadata:Qk,settings:Yk}),Xk=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M13 6v6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H13zm-9 6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H4v6z"})),ex=e=>{const{value:t,...n}=e;return[{...n},t?(0,Qe.parseWithAttributeSchema)(t,{type:"array",source:"query",selector:"p",query:{content:{type:"string",source:"html"}}}).map((({content:e})=>(0,Qe.createBlock)("core/paragraph",{content:e}))):(0,Qe.createBlock)("core/paragraph")]},tx={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:"",__experimentalRole:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",__experimentalRole:"content"},align:{type:"string"}},supports:{anchor:!0,__experimentalSlashInserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0}}},save({attributes:e}){const{align:t,value:n,citation:a}=e,o=ut()({[`has-text-align-${t}`]:t});return(0,Ke.createElement)("blockquote",{...nt.useBlockProps.save({className:o})},(0,Ke.createElement)(nt.RichText.Content,{multiline:!0,value:n}),!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:a}))},migrate:ex},nx={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"}},migrate:ex,save({attributes:e}){const{align:t,value:n,citation:a}=e;return(0,Ke.createElement)("blockquote",{style:{textAlign:t||null}},(0,Ke.createElement)(nt.RichText.Content,{multiline:!0,value:n}),!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:a}))}},ax={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"},style:{type:"number",default:1}},migrate(e){if(2===e.style){const{style:t,...n}=e;return ex({...n,className:e.className?e.className+" is-style-large":"is-style-large"})}return ex(e)},save({attributes:e}){const{align:t,value:n,citation:a,style:o}=e;return(0,Ke.createElement)("blockquote",{className:2===o?"is-large":"",style:{textAlign:t||null}},(0,Ke.createElement)(nt.RichText.Content,{multiline:!0,value:n}),!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:a}))}},ox={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"footer",default:""},align:{type:"string"},style:{type:"number",default:1}},migrate(e){if(!isNaN(parseInt(e.style))){const{style:t,...n}=e;return ex({...n})}return ex(e)},save({attributes:e}){const{align:t,value:n,citation:a,style:o}=e;return(0,Ke.createElement)("blockquote",{className:`blocks-quote-style-${o}`,style:{textAlign:t||null}},(0,Ke.createElement)(nt.RichText.Content,{multiline:!0,value:n}),!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"footer",value:a}))}},rx=[tx,nx,ax,ox],lx="web"===_t.Platform.OS,ix=[["core/paragraph",{}]];const sx={from:[{type:"block",blocks:["core/pullquote"],transform:({value:e,citation:t,anchor:n,fontSize:a,style:o})=>(0,Qe.createBlock)("core/quote",{citation:t,anchor:n,fontSize:a,style:o},[(0,Qe.createBlock)("core/paragraph",{content:e})])},{type:"prefix",prefix:">",transform:e=>(0,Qe.createBlock)("core/quote",{},[(0,Qe.createBlock)("core/paragraph",{content:e})])},{type:"raw",schema:()=>({blockquote:{children:"*"}}),selector:"blockquote",transform:(e,t)=>(0,Qe.createBlock)("core/quote",{},t({HTML:e.innerHTML,mode:"BLOCKS"}))},{type:"block",isMultiBlock:!0,blocks:["*"],isMatch:({},e)=>1===e.length?["core/paragraph","core/heading","core/list","core/pullquote"].includes(e[0].name):!e.some((({name:e})=>"core/quote"===e)),__experimentalConvert:e=>(0,Qe.createBlock)("core/quote",{},e.map((e=>(0,Qe.createBlock)(e.name,e.attributes,e.innerBlocks))))}],to:[{type:"block",blocks:["core/pullquote"],isMatch:({},e)=>e.innerBlocks.every((({name:e})=>"core/paragraph"===e)),transform:({citation:e,anchor:t,fontSize:n,style:a},o)=>{const r=o.map((({attributes:e})=>`${e.content}`)).join("<br>");return(0,Qe.createBlock)("core/pullquote",{value:r,citation:e,anchor:t,fontSize:n,style:a})}},{type:"block",blocks:["core/paragraph"],transform:({citation:e},t)=>nt.RichText.isEmpty(e)?t:[...t,(0,Qe.createBlock)("core/paragraph",{content:e})]},{type:"block",blocks:["core/group"],transform:({citation:e,anchor:t},n)=>(0,Qe.createBlock)("core/group",{anchor:t},nt.RichText.isEmpty(e)?n:[...n,(0,Qe.createBlock)("core/paragraph",{content:e})])}],ungroup:({citation:e},t)=>nt.RichText.isEmpty(e)?t:[...t,(0,Qe.createBlock)("core/paragraph",{content:e})]},cx=sx,mx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/quote",title:"Quote",category:"text",description:'Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Julio Cortázar',keywords:["blockquote","cite"],textdomain:"default",attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:"",__experimentalRole:"content"},citation:{type:"rich-text",source:"rich-text",selector:"cite",__experimentalRole:"content"},align:{type:"string"}},supports:{anchor:!0,html:!1,__experimentalOnEnter:!0,__experimentalOnMerge:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},layout:{allowEditing:!1},spacing:{blockGap:!0},interactivity:{clientNavigation:!0}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"plain",label:"Plain"}],editorStyle:"wp-block-quote-editor",style:"wp-block-quote"},{name:ux}=mx,px={icon:Xk,example:{attributes:{citation:"Julio Cortázar"},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,tt.__)("In quoting others, we cite ourselves.")}}]},transforms:cx,edit:function({attributes:e,setAttributes:t,insertBlocksAfter:n,clientId:a,className:o,style:r}){const{align:l,citation:i}=e;((e,t)=>{const n=(0,gt.useRegistry)(),{updateBlockAttributes:a,replaceInnerBlocks:o}=(0,gt.useDispatch)(nt.store);(0,_t.useEffect)((()=>{if(!e.value)return;const[r,l]=ex(e);Qp()("Value attribute on the quote block",{since:"6.0",version:"6.5",alternative:"inner blocks"}),n.batch((()=>{a(t,r),o(t,l)}))}),[e.value])})(e,a);const s=(0,gt.useSelect)((e=>{const{isBlockSelected:t,hasSelectedInnerBlock:n}=e(nt.store);return n(a)||t(a)}),[]),c=(0,nt.useBlockProps)({className:ut()(o,{[`has-text-align-${l}`]:l}),...!lx&&{style:r}}),m=(0,nt.useInnerBlocksProps)(c,{template:ix,templateInsertUpdatesSelection:!0,__experimentalCaptureToolbars:!0});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:l,onChange:e=>{t({align:e})}})),(0,Ke.createElement)(et.BlockQuotation,{...m},m.children,(!nt.RichText.isEmpty(i)||s)&&(0,Ke.createElement)(nt.RichText,{identifier:"citation",tagName:lx?"cite":void 0,style:{display:"block"},value:i,onChange:e=>{t({citation:e})},__unstableMobileNoFocusOnMount:!0,"aria-label":(0,tt.__)("Quote citation"),placeholder:(0,tt.__)("Add citation"),className:"wp-block-quote__citation",__unstableOnSplitAtEnd:()=>n((0,Qe.createBlock)((0,Qe.getDefaultBlockName)())),...lx?{}:{textAlign:l}})))},save:function({attributes:e}){const{align:t,citation:n}=e,a=ut()({[`has-text-align-${t}`]:t});return(0,Ke.createElement)("blockquote",{...nt.useBlockProps.save({className:a})},(0,Ke.createElement)(nt.InnerBlocks.Content,null),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:n}))},deprecated:rx},dx=()=>Xe({name:ux,metadata:mx,settings:px}),gx=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})),hx=window.wp.patterns,{useLayoutClasses:bx}=Ft(nt.privateApis),{PARTIAL_SYNCING_SUPPORTED_BLOCKS:_x}=Ft(hx.privateApis),yx=["full","wide","left","right"];function vx(e,t,n={}){let a={};for(const o of e){o?.innerBlocks?.length&&(a={...a,...vx(o.innerBlocks,t,n)});const e=o.attributes.metadata?.id,r=o.clientId;e&&t?.[e]&&(a[r]=e)}return a}function fx(e){return Object.keys(_x).includes(e.name)&&!!e.attributes.metadata?.bindings&&Object.values(e.attributes.metadata.bindings).some((e=>"core/pattern-overrides"===e.source))}function kx(e){return e.some((e=>!!fx(e)||kx(e.innerBlocks)))}function xx(e){return Object.entries(e.attributes.metadata.bindings).filter((([,e])=>"core/pattern-overrides"===e.source)).map((([e])=>e))}function wx(e,t={},n,a){return e.map((e=>{var o;const r=wx(e.innerBlocks,t,n,a),l=null!==(o=a?.[e.clientId])&&void 0!==o?o:e.attributes.metadata?.name;if(!l||!fx(e))return{...e,innerBlocks:r};const i=xx(e),s={...e.attributes};for(const a of i){var c;null!==(c=n[l])&&void 0!==c||(n[l]={}),n[l][a]=e.attributes[a];const o=t[l];void 0!==o?.[a]&&(s[a]=o[a])}return{...e,attributes:s,innerBlocks:r}}))}function Ex(e,t,n){const a={};for(const s of e){var o;if(s.name===Ix)continue;s.innerBlocks.length&&Object.assign(a,Ex(s.innerBlocks,t,n));const e=null!==(o=n?.[s.clientId])&&void 0!==o?o:s.attributes.metadata?.name;if(!e||!fx(s))continue;const c=xx(s);for(const n of c){var r;if(l=s.attributes[n],i=t?.[e]?.[n],!(l instanceof Rn.RichTextData&&i instanceof Rn.RichTextData?l.toString()===i.toString():l===i))null!==(r=a[e])&&void 0!==r||(a[e]={}),a[e][n]=void 0===s.attributes[n]?"":s.attributes[n]}}var l,i;return Object.keys(a).length>0?a:void 0}function Cx(e,t,n){t.forEach((t=>{const a=n||(fx(t)?"contentOnly":"disabled");e(t.clientId,a),Cx(e,t.innerBlocks,t.name===Ix?"disabled":n)}))}const Sx={attributes:{ref:{type:"number"},content:{type:"object"}},supports:{customClassName:!1,html:!1,inserter:!1,renaming:!1},isEligible:({content:e})=>!!e&&Object.keys(e).every((t=>{return e[t].values&&("object"==typeof(n=e[t].values)&&!Array.isArray(n)&&null!==n);var n})),migrate(e){const{content:t,...n}=e;if(t&&Object.keys(t).length){const e={...t};for(const n in t)e[n]=t[n].values;return{...n,content:e}}return e}},Bx={attributes:{ref:{type:"number"},overrides:{type:"object"}},supports:{customClassName:!1,html:!1,inserter:!1,renaming:!1},isEligible:({overrides:e})=>!!e,migrate(e){const{overrides:t,...n}=e,a={};return Object.keys(t).forEach((e=>{a[e]=t[e]})),{...n,content:a}}},Nx=[Sx,Bx],Tx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/block",title:"Pattern",category:"reusable",description:"Reuse this design across your site.",keywords:["reusable"],textdomain:"default",attributes:{ref:{type:"number"},content:{type:"object"}},supports:{customClassName:!1,html:!1,inserter:!1,renaming:!1,interactivity:{clientNavigation:!0}}},{name:Ix}=Tx,Px={deprecated:Nx,edit:function({name:e,attributes:{ref:t,content:n},__unstableParentLayout:a,clientId:o,setAttributes:r}){const l=(0,gt.useRegistry)(),i=(0,nt.useHasRecursion)(t),{record:s,editedRecord:c,hasResolved:m}=(0,dt.useEntityRecord)("postType","wp_block",t),u=m&&!s,p=(0,_t.useRef)(n),d=(0,_t.useRef)({}),{replaceInnerBlocks:g,__unstableMarkNextChangeAsNotPersistent:h,setBlockEditingMode:b}=(0,gt.useDispatch)(nt.store),{syncDerivedUpdates:_}=Ft((0,gt.useDispatch)(nt.store)),{innerBlocks:y,userCanEdit:v,getBlockEditingMode:f,onNavigateToEntityRecord:k,editingMode:x,hasPatternOverridesSource:w}=(0,gt.useSelect)((e=>{const{canUser:n}=e(dt.store),{getBlocks:a,getSettings:r,getBlockEditingMode:l}=e(nt.store),{getBlockBindingsSource:i}=Ft(e(Qe.store));return{innerBlocks:a(o),userCanEdit:n("update","blocks",t),getBlockEditingMode:l,onNavigateToEntityRecord:r().onNavigateToEntityRecord,editingMode:l(o),hasPatternOverridesSource:!!i("core/pattern-overrides")}}),[o,t]);(0,_t.useEffect)((()=>{Cx(b,y,"disabled"!==x&&w?void 0:"disabled")}),[x,y,b,w]);const E=(0,_t.useMemo)((()=>w&&kx(y)),[w,y]),C=(0,_t.useMemo)((()=>{var e;return null!==(e=c.blocks?.map((e=>(0,Qe.cloneBlock)(e))))&&void 0!==e?e:c.content&&"function"!=typeof c.content?(0,Qe.parse)(c.content):[]}),[c.blocks,c.content]),S=(0,_t.useRef)({});(0,_t.useEffect)((()=>{S.current=vx(C,p.current),d.current={};const e=f(o);l.batch((()=>{b(o,"default"),_((()=>{const e=w?wx(C,p.current,d.current,S.current):C;g(o,e)})),b(o,e)}))}),[w,h,o,C,g,l,f,b,_]);const{alignment:B,layout:N}=((e,t)=>{const n=(0,_t.useRef)();return(0,_t.useMemo)((()=>{if(!e?.length)return{};let a=n.current;if(void 0===a){const o="constrained"===t?.type,r=e.some((e=>yx.includes(e.attributes.align)));a=o&&r?"full":null,n.current=a}return{alignment:a,layout:a?t:void 0}}),[e,t])})(y,a),T=bx({layout:N},e),I=(0,nt.useBlockProps)({className:ut()("block-library-block__reusable-block-container",N&&T,{[`align${B}`]:B})}),P=(0,nt.useInnerBlocksProps)(I,{templateLock:"all",layout:N,renderAppender:y?.length?void 0:nt.InnerBlocks.ButtonBlockAppender});(0,_t.useEffect)((()=>{if(!w)return;const{getBlocks:e}=l.select(nt.store);let t=e(o);return l.subscribe((()=>{const n=e(o);n!==t&&(t=n,_((()=>{r({content:Ex(n,d.current,S.current)})})))}),nt.store)}),[w,_,o,l,r]);let M=null;return i&&(M=(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Block cannot be rendered inside itself."))),u&&(M=(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Block has been deleted or is unavailable."))),m||(M=(0,Ke.createElement)(et.Placeholder,null,(0,Ke.createElement)(et.Spinner,null))),(0,Ke.createElement)(nt.RecursionProvider,{uniqueId:t},v&&k&&(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.ToolbarButton,{onClick:()=>{k({postId:t,postType:"wp_block"})}},(0,tt.__)("Edit original")))),E&&(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.ToolbarButton,{onClick:()=>{n&&g(o,C)},disabled:!n,__experimentalIsFocusable:!0},(0,tt.__)("Reset")))),null===M?(0,Ke.createElement)("div",{...P}):(0,Ke.createElement)("div",{...I},M))},icon:gx,__experimentalLabel:({ref:e})=>{if(!e)return;const t=(0,gt.select)(dt.store).getEditedEntityRecord("postType","wp_block",e);return t?.title?(0,Jn.decodeEntities)(t.title):void 0}},Mx=()=>Xe({name:Ix,metadata:Tx,settings:Px});const zx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/read-more",title:"Read More",category:"theme",description:"Displays the link of a post, page, or any other content-type.",textdomain:"default",attributes:{content:{type:"string"},linkTarget:{type:"string",default:"_self"}},usesContext:["postId"],supports:{html:!1,color:{gradients:!0,text:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0,textDecoration:!0}},spacing:{margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalDefaultControls:{width:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-read-more"},{name:Rx}=zx,Ax={icon:kn,edit:function({attributes:{content:e,linkTarget:t},setAttributes:n,insertBlocksAfter:a}){const o=(0,nt.useBlockProps)();return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>n({linkTarget:e?"_blank":"_self"}),checked:"_blank"===t}))),(0,Ke.createElement)(nt.RichText,{tagName:"a","aria-label":(0,tt.__)("“Read more” link text"),placeholder:(0,tt.__)("Read more"),value:e,onChange:e=>n({content:e}),__unstableOnSplitAtEnd:()=>a((0,Qe.createBlock)((0,Qe.getDefaultBlockName)())),withoutInteractiveFormatting:!0,...o}))}},Hx=()=>Xe({name:Rx,metadata:zx,settings:Ax}),Lx=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M5 10.2h-.8v1.5H5c1.9 0 3.8.8 5.1 2.1 1.4 1.4 2.1 3.2 2.1 5.1v.8h1.5V19c0-2.3-.9-4.5-2.6-6.2-1.6-1.6-3.8-2.6-6.1-2.6zm10.4-1.6C12.6 5.8 8.9 4.2 5 4.2h-.8v1.5H5c3.5 0 6.9 1.4 9.4 3.9s3.9 5.8 3.9 9.4v.8h1.5V19c0-3.9-1.6-7.6-4.4-10.4zM4 20h3v-3H4v3z"}));const Dx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/rss",title:"RSS",category:"widgets",description:"Display entries from any RSS or Atom feed.",keywords:["atom","feed"],textdomain:"default",attributes:{columns:{type:"number",default:2},blockLayout:{type:"string",default:"list"},feedURL:{type:"string",default:""},itemsToShow:{type:"number",default:5},displayExcerpt:{type:"boolean",default:!1},displayAuthor:{type:"boolean",default:!1},displayDate:{type:"boolean",default:!1},excerptLength:{type:"number",default:55}},supports:{align:!0,html:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-rss-editor",style:"wp-block-rss"},{name:Fx}=Dx,Vx={icon:Lx,example:{attributes:{feedURL:"https://wordpress.org"}},edit:function({attributes:e,setAttributes:t}){const[n,a]=(0,_t.useState)(!e.feedURL),{blockLayout:o,columns:r,displayAuthor:l,displayDate:i,displayExcerpt:s,excerptLength:c,feedURL:m,itemsToShow:u}=e;function p(n){return()=>{const a=e[n];t({[n]:!a})}}const d=(0,nt.useBlockProps)();if(n)return(0,Ke.createElement)("div",{...d},(0,Ke.createElement)(et.Placeholder,{icon:Lx,label:"RSS"},(0,Ke.createElement)("form",{onSubmit:function(e){e.preventDefault(),m&&(t({feedURL:(0,pt.prependHTTP)(m)}),a(!1))},className:"wp-block-rss__placeholder-form"},(0,Ke.createElement)(et.__experimentalHStack,{wrap:!0},(0,Ke.createElement)(et.__experimentalInputControl,{__next40pxDefaultSize:!0,placeholder:(0,tt.__)("Enter URL here…"),value:m,onChange:e=>t({feedURL:e}),className:"wp-block-rss__placeholder-input"}),(0,Ke.createElement)(et.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit"},(0,tt.__)("Use URL"))))));const g=[{icon:Di,title:(0,tt.__)("Edit RSS URL"),onClick:()=>a(!0)},{icon:Tp,title:(0,tt.__)("List view"),onClick:()=>t({blockLayout:"list"}),isActive:"list"===o},{icon:Xm,title:(0,tt.__)("Grid view"),onClick:()=>t({blockLayout:"grid"}),isActive:"grid"===o}];return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,{controls:g})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Number of items"),value:u,onChange:e=>t({itemsToShow:e}),min:1,max:20,required:!0}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display author"),checked:l,onChange:p("displayAuthor")}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display date"),checked:i,onChange:p("displayDate")}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display excerpt"),checked:s,onChange:p("displayExcerpt")}),s&&(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Max number of words in excerpt"),value:c,onChange:e=>t({excerptLength:e}),min:10,max:100,required:!0}),"grid"===o&&(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Columns"),value:r,onChange:e=>t({columns:e}),min:2,max:6,required:!0}))),(0,Ke.createElement)("div",{...d},(0,Ke.createElement)(et.Disabled,null,(0,Ke.createElement)(ot(),{block:"core/rss",attributes:e}))))}},$x=()=>Xe({name:Fx,metadata:Dx,settings:Vx}),Ox=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})),Gx=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Rect,{x:"7",y:"10",width:"10",height:"4",rx:"1",fill:"currentColor"})),Ux=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Rect,{x:"4.75",y:"15.25",width:"6.5",height:"9.5",transform:"rotate(-90 4.75 15.25)",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),(0,Ke.createElement)(et.Rect,{x:"16",y:"10",width:"4",height:"4",rx:"1",fill:"currentColor"})),qx=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Rect,{x:"4.75",y:"15.25",width:"6.5",height:"14.5",transform:"rotate(-90 4.75 15.25)",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),(0,Ke.createElement)(et.Rect,{x:"14",y:"10",width:"4",height:"4",rx:"1",fill:"currentColor"})),jx=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Rect,{x:"4.75",y:"15.25",width:"6.5",height:"14.5",transform:"rotate(-90 4.75 15.25)",stroke:"currentColor",fill:"none",strokeWidth:"1.5"})),Wx=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Rect,{x:"4.75",y:"7.75",width:"14.5",height:"8.5",rx:"1.25",stroke:"currentColor",fill:"none",strokeWidth:"1.5"}),(0,Ke.createElement)(et.Rect,{x:"8",y:"11",width:"8",height:"2",fill:"currentColor"})),Zx=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Rect,{x:"4.75",y:"17.25",width:"5.5",height:"14.5",transform:"rotate(-90 4.75 17.25)",stroke:"currentColor",fill:"none",strokeWidth:"1.5"}),(0,Ke.createElement)(et.Rect,{x:"4",y:"7",width:"10",height:"2",fill:"currentColor"}));function Qx(e){return"%"===e}const Kx=[{name:"default",isDefault:!0,attributes:{buttonText:(0,tt.__)("Search"),label:(0,tt.__)("Search")}}],Yx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/search",title:"Search",category:"widgets",description:"Help visitors find your content.",keywords:["find"],textdomain:"default",attributes:{label:{type:"string",__experimentalRole:"content"},showLabel:{type:"boolean",default:!0},placeholder:{type:"string",default:"",__experimentalRole:"content"},width:{type:"number"},widthUnit:{type:"string"},buttonText:{type:"string",__experimentalRole:"content"},buttonPosition:{type:"string",default:"button-outside"},buttonUseIcon:{type:"boolean",default:!1},query:{type:"object",default:{}},isSearchFieldHidden:{type:"boolean",default:!1}},supports:{align:["left","center","right"],color:{gradients:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{background:!0,text:!0}},interactivity:!0,typography:{__experimentalSkipSerialization:!0,__experimentalSelector:".wp-block-search__label, .wp-block-search__input, .wp-block-search__button",fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}},html:!1},editorStyle:"wp-block-search-editor",style:"wp-block-search"},{name:Jx}=Yx,Xx={icon:Ox,example:{attributes:{buttonText:(0,tt.__)("Search"),label:(0,tt.__)("Search")},viewportWidth:400},variations:Kx,edit:function({className:e,attributes:t,setAttributes:n,toggleSelection:a,isSelected:o,clientId:r}){const{label:l,showLabel:i,placeholder:s,width:c,widthUnit:m,align:u,buttonText:p,buttonPosition:d,buttonUseIcon:g,isSearchFieldHidden:h,style:b}=t,_=(0,gt.useSelect)((e=>{const{getBlockParentsByBlockName:t,wasBlockJustInserted:n}=e(nt.store);return!!t(r,"core/navigation")?.length&&n(r)}),[r]),{__unstableMarkNextChangeAsNotPersistent:y}=(0,gt.useDispatch)(nt.store);(0,_t.useEffect)((()=>{_&&(y(),n({showLabel:!1,buttonUseIcon:!0,buttonPosition:"button-inside"}))}),[y,_,n]);const v=b?.border?.radius,f=(0,nt.__experimentalUseBorderProps)(t);"number"==typeof v&&(f.style.borderRadius=`${v}px`);const k=(0,nt.__experimentalUseColorProps)(t),[x,w]=(0,nt.useSettings)("typography.fluid","layout"),E=(0,nt.getTypographyClassesAndStyles)(t,{typography:{fluid:x},layout:{wideSize:w?.wideSize}}),C=`wp-block-search__width-${(0,jt.useInstanceId)(et.__experimentalUnitControl)}`,S="button-inside"===d,B="button-outside"===d,N="no-button"===d,T="button-only"===d,I=(0,_t.useRef)(),P=(0,_t.useRef)(),M=(0,et.__experimentalUseCustomUnits)({availableUnits:["%","px"],defaultValues:{"%":50,px:350}});(0,_t.useEffect)((()=>{T&&!o&&n({isSearchFieldHidden:!0})}),[T,o,n]),(0,_t.useEffect)((()=>{T&&o&&n({isSearchFieldHidden:!1})}),[T,o,n,c]);const z=[{role:"menuitemradio",title:(0,tt.__)("Button outside"),isActive:"button-outside"===d,icon:Ux,onClick:()=>{n({buttonPosition:"button-outside",isSearchFieldHidden:!1})}},{role:"menuitemradio",title:(0,tt.__)("Button inside"),isActive:"button-inside"===d,icon:qx,onClick:()=>{n({buttonPosition:"button-inside",isSearchFieldHidden:!1})}},{role:"menuitemradio",title:(0,tt.__)("No button"),isActive:"no-button"===d,icon:jx,onClick:()=>{n({buttonPosition:"no-button",isSearchFieldHidden:!1})}},{role:"menuitemradio",title:(0,tt.__)("Button only"),isActive:"button-only"===d,icon:Gx,onClick:()=>{n({buttonPosition:"button-only",isSearchFieldHidden:!0})}}],R=()=>{const e=ut()("wp-block-search__input",S?void 0:f.className,E.className),t={...S?{borderRadius:v}:f.style,...E.style,textDecoration:void 0};return(0,Ke.createElement)("input",{type:"search",className:e,style:t,"aria-label":(0,tt.__)("Optional placeholder text"),placeholder:s?void 0:(0,tt.__)("Optional placeholder…"),value:s,onChange:e=>n({placeholder:e.target.value}),ref:I})},A=(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.ToolbarButton,{title:(0,tt.__)("Toggle search label"),icon:Zx,onClick:()=>{n({showLabel:!i})},className:i?"is-pressed":void 0}),(0,Ke.createElement)(et.ToolbarDropdownMenu,{icon:(()=>{switch(d){case"button-inside":return qx;case"button-outside":return Ux;case"no-button":return jx;case"button-only":return Gx}})(),label:(0,tt.__)("Change button position"),controls:z}),!N&&(0,Ke.createElement)(et.ToolbarButton,{title:(0,tt.__)("Use button with icon"),icon:Wx,onClick:()=>{n({buttonUseIcon:!g})},className:g?"is-pressed":void 0}))),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Display Settings")},(0,Ke.createElement)(et.BaseControl,{label:(0,tt.__)("Width"),id:C},(0,Ke.createElement)(et.__experimentalUnitControl,{id:C,min:Qx(m)?0:220,max:Qx(m)?100:void 0,step:1,onChange:e=>{const t="%"===m&&parseInt(e,10)>100?100:e;n({width:parseInt(t,10)})},onUnitChange:e=>{n({width:"%"===e?50:350,widthUnit:e})},__unstableInputWidth:"80px",value:`${c}${m}`,units:M}),(0,Ke.createElement)(et.ButtonGroup,{className:"wp-block-search__components-button-group","aria-label":(0,tt.__)("Percentage Width")},[25,50,75,100].map((e=>(0,Ke.createElement)(et.Button,{key:e,size:"small",variant:e===c&&"%"===m?"primary":void 0,onClick:()=>n({width:e,widthUnit:"%"})},e,"%")))))))),H=e=>e?`calc(${e} + 4px)`:void 0,L=(0,nt.useBlockProps)({className:ut()(e,S?"wp-block-search__button-inside":void 0,B?"wp-block-search__button-outside":void 0,N?"wp-block-search__no-button":void 0,T?"wp-block-search__button-only":void 0,g||N?void 0:"wp-block-search__text-button",g&&!N?"wp-block-search__icon-button":void 0,T&&h?"wp-block-search__searchfield-hidden":void 0),style:{...E.style,textDecoration:void 0}}),D=ut()("wp-block-search__label",E.className);return(0,Ke.createElement)("div",{...L},A,i&&(0,Ke.createElement)(nt.RichText,{className:D,"aria-label":(0,tt.__)("Label text"),placeholder:(0,tt.__)("Add label…"),withoutInteractiveFormatting:!0,value:l,onChange:e=>n({label:e}),style:E.style}),(0,Ke.createElement)(et.ResizableBox,{size:{width:`${c}${m}`},className:ut()("wp-block-search__inside-wrapper",S?f.className:void 0),style:(()=>{const e=S?f.style:{borderRadius:f.style?.borderRadius,borderTopLeftRadius:f.style?.borderTopLeftRadius,borderTopRightRadius:f.style?.borderTopRightRadius,borderBottomLeftRadius:f.style?.borderBottomLeftRadius,borderBottomRightRadius:f.style?.borderBottomRightRadius},t=void 0!==v&&0!==parseInt(v,10);if(S&&t){if("object"==typeof v){const{topLeft:t,topRight:n,bottomLeft:a,bottomRight:o}=v;return{...e,borderTopLeftRadius:H(t),borderTopRightRadius:H(n),borderBottomLeftRadius:H(a),borderBottomRightRadius:H(o)}}const t=Number.isInteger(v)?`${v}px`:v;e.borderRadius=`calc(${t} + 4px)`}return e})(),minWidth:220,enable:T?{}:{right:"right"!==u,left:"right"===u},onResizeStart:(e,t,o)=>{n({width:parseInt(o.offsetWidth,10),widthUnit:"px"}),a(!1)},onResizeStop:(e,t,o,r)=>{n({width:parseInt(c+r.width,10)}),a(!0)},showHandle:o},(S||B||T)&&(0,Ke.createElement)(Ke.Fragment,null,R(),(()=>{const e=ut()("wp-block-search__button",k.className,E.className,S?void 0:f.className,g?"has-icon":void 0,(0,nt.__experimentalGetElementClassName)("button")),t={...k.style,...E.style,...S?{borderRadius:v}:f.style},a=()=>{T&&n({isSearchFieldHidden:!h})};return(0,Ke.createElement)(Ke.Fragment,null,g&&(0,Ke.createElement)("button",{type:"button",className:e,style:t,"aria-label":p?(0,ac.__unstableStripHTML)(p):(0,tt.__)("Search"),onClick:a,ref:P},(0,Ke.createElement)(Ng,{icon:Ox})),!g&&(0,Ke.createElement)(nt.RichText,{className:e,style:t,"aria-label":(0,tt.__)("Button text"),placeholder:(0,tt.__)("Add button text…"),withoutInteractiveFormatting:!0,value:p,onChange:e=>n({buttonText:e}),onClick:a}))})()),N&&R()))}},ew=()=>Xe({name:Jx,metadata:Yx,settings:Xx}),tw=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M4.5 12.5v4H3V7h1.5v3.987h15V7H21v9.5h-1.5v-4h-15Z"}));const nw={from:[{type:"enter",regExp:/^-{3,}$/,transform:()=>(0,Qe.createBlock)("core/separator")},{type:"raw",selector:"hr",schema:{hr:{}}}]},aw={attributes:{color:{type:"string"},customColor:{type:"string"}},save({attributes:e}){const{color:t,customColor:n}=e,a=(0,nt.getColorClassName)("background-color",t),o=(0,nt.getColorClassName)("color",t),r=ut()({"has-text-color has-background":t||n,[a]:a,[o]:o}),l={backgroundColor:a?void 0:n,color:o?void 0:n};return(0,Ke.createElement)("hr",{...nt.useBlockProps.save({className:r,style:l})})},migrate(e){const{color:t,customColor:n,...a}=e;return{...a,backgroundColor:t||void 0,opacity:"css",style:n?{color:{background:n}}:void 0}}},ow=[aw],rw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/separator",title:"Separator",category:"design",description:"Create a break between ideas or sections with a horizontal separator.",keywords:["horizontal-line","hr","divider"],textdomain:"default",attributes:{opacity:{type:"string",default:"alpha-channel"}},supports:{anchor:!0,align:["center","wide","full"],color:{enableContrastChecker:!1,__experimentalSkipSerialization:!0,gradients:!0,background:!0,text:!1,__experimentalDefaultControls:{background:!0}},spacing:{margin:["top","bottom"]},interactivity:{clientNavigation:!0}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"wide",label:"Wide Line"},{name:"dots",label:"Dots"}],editorStyle:"wp-block-separator-editor",style:"wp-block-separator"},{name:lw}=rw,iw={icon:tw,example:{attributes:{customColor:"#065174",className:"is-style-wide"}},transforms:nw,edit:function({attributes:e,setAttributes:t}){const{backgroundColor:n,opacity:a,style:o}=e,r=(0,nt.__experimentalUseColorProps)(e),l=r?.style?.backgroundColor,i=!!o?.color?.background;!function(e,t,n){const[a,o]=(0,_t.useState)(!1),r=(0,jt.usePrevious)(t);(0,_t.useEffect)((()=>{"css"!==e||t||r||o(!0)}),[t,r,e]),(0,_t.useEffect)((()=>{"css"===e&&(a&&t||r&&t!==r)&&(n({opacity:"alpha-channel"}),o(!1))}),[a,t,r])}(a,l,t);const s=(0,nt.getColorClassName)("color",n),c=ut()({"has-text-color":n||l,[s]:s,"has-css-opacity":"css"===a,"has-alpha-channel-opacity":"alpha-channel"===a},r.className),m={color:l,backgroundColor:l};return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.HorizontalRule,{...(0,nt.useBlockProps)({className:c,style:i?m:void 0})}))},save:function({attributes:e}){const{backgroundColor:t,style:n,opacity:a}=e,o=n?.color?.background,r=(0,nt.__experimentalGetColorClassesAndStyles)(e),l=(0,nt.getColorClassName)("color",t),i=ut()({"has-text-color":t||o,[l]:l,"has-css-opacity":"css"===a,"has-alpha-channel-opacity":"alpha-channel"===a},r.className),s={backgroundColor:r?.style?.backgroundColor,color:l?void 0:o};return(0,Ke.createElement)("hr",{...nt.useBlockProps.save({className:i,style:s})})},deprecated:ow},sw=()=>Xe({name:lw,metadata:rw,settings:iw}),cw=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M16 4.2v1.5h2.5v12.5H16v1.5h4V4.2h-4zM4.2 19.8h4v-1.5H5.8V5.8h2.5V4.2h-4l-.1 15.6zm5.1-3.1l1.4.6 4-10-1.4-.6-4 10z"}));const mw=window.wp.autop,uw={from:[{type:"shortcode",tag:"[a-z][a-z0-9_-]*",attributes:{text:{type:"string",shortcode:(e,{content:t})=>(0,mw.removep)((0,mw.autop)(t))}},priority:20}]},pw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/shortcode",title:"Shortcode",category:"widgets",description:"Insert additional custom elements with a WordPress shortcode.",textdomain:"default",attributes:{text:{type:"string",source:"raw"}},supports:{className:!1,customClassName:!1,html:!1},editorStyle:"wp-block-shortcode-editor"},{name:dw}=pw,gw={icon:cw,transforms:uw,edit:function e({attributes:t,setAttributes:n}){const a=`blocks-shortcode-input-${(0,jt.useInstanceId)(e)}`;return(0,Ke.createElement)("div",{...(0,nt.useBlockProps)({className:"components-placeholder"})},(0,Ke.createElement)("label",{htmlFor:a,className:"components-placeholder__label"},(0,Ke.createElement)(Ng,{icon:cw}),(0,tt.__)("Shortcode")),(0,Ke.createElement)(nt.PlainText,{className:"blocks-shortcode__textarea",id:a,value:t.text,"aria-label":(0,tt.__)("Shortcode text"),placeholder:(0,tt.__)("Write shortcode here…"),onChange:e=>n({text:e})}))},save:function({attributes:e}){return(0,Ke.createElement)(_t.RawHTML,null,e.text)}},hw=()=>Xe({name:dw,metadata:pw,settings:gw}),bw=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 1.5c4.1 0 7.5 3.4 7.5 7.5v.1c-1.4-.8-3.3-1.7-3.4-1.8-.2-.1-.5-.1-.8.1l-2.9 2.1L9 11.3c-.2-.1-.4 0-.6.1l-3.7 2.2c-.1-.5-.2-1-.2-1.5 0-4.2 3.4-7.6 7.5-7.6zm0 15c-3.1 0-5.7-1.9-6.9-4.5l3.7-2.2 3.5 1.2c.2.1.5 0 .7-.1l2.9-2.1c.8.4 2.5 1.2 3.5 1.9-.9 3.3-3.9 5.8-7.4 5.8z"})),_w=["image"],yw="image/*",vw=({alt:e,attributes:{align:t,width:n,height:a,isLink:o,linkTarget:r,shouldSyncIcon:l},containerRef:i,isSelected:s,setAttributes:c,setLogo:m,logoUrl:u,siteUrl:p,logoId:d,iconId:g,setIcon:h,canUserEdit:b})=>{const _=ap(i,[t]),y=(0,jt.useViewportMatch)("medium"),v=!["wide","full"].includes(t)&&y,[{naturalWidth:f,naturalHeight:k},x]=(0,_t.useState)({}),[w,E]=(0,_t.useState)(!1),{toggleSelection:C}=(0,gt.useDispatch)(nt.store),S=ut()("custom-logo-link",{"is-transient":(0,It.isBlobURL)(u)}),{imageEditing:B,maxWidth:N,title:T}=(0,gt.useSelect)((e=>{const t=e(nt.store).getSettings(),n=e(dt.store).getEntityRecord("root","__unstableBase");return{title:n?.name,imageEditing:t.imageEditing,maxWidth:t.maxWidth}}),[]);(0,_t.useEffect)((()=>{l&&d!==g&&c({shouldSyncIcon:!1})}),[]),(0,_t.useEffect)((()=>{s||E(!1)}),[s]);const I=(0,Ke.createElement)("img",{className:"custom-logo",src:u,alt:e,onLoad:e=>{x({naturalWidth:e.target.naturalWidth,naturalHeight:e.target.naturalHeight})}});let P,M=I;if(o&&(M=(0,Ke.createElement)("a",{href:p,className:S,rel:"home",title:T,onClick:e=>e.preventDefault()},I)),_&&f&&k){P=f>_?_:f}if(!v||!P)return(0,Ke.createElement)("div",{style:{width:n,height:a}},M);const z=n||120,R=f/k,A=z/R,H=f<k?Jc:Math.ceil(Jc*R),L=k<f?Jc:Math.ceil(Jc/R),D=2.5*N;let F=!1,V=!1;"center"===t?(F=!0,V=!0):(0,tt.isRTL)()?"left"===t?F=!0:V=!0:"right"===t?V=!0:F=!0;const $=d&&f&&k&&B,O=$&&w?(0,Ke.createElement)(nt.__experimentalImageEditor,{id:d,url:u,width:z,height:A,clientWidth:_,naturalHeight:k,naturalWidth:f,onSaveImage:e=>{m(e.id)},onFinishEditing:()=>{E(!1)}}):(0,Ke.createElement)(et.ResizableBox,{size:{width:z,height:A},showHandle:s,minWidth:H,maxWidth:D,minHeight:L,maxHeight:D/R,lockAspectRatio:!0,enable:{top:!1,right:F,bottom:!0,left:V},onResizeStart:function(){C(!1)},onResizeStop:(e,t,n,a)=>{C(!0),c({width:parseInt(z+a.width,10),height:parseInt(A+a.height,10)})}},M),G=!window?.__experimentalUseCustomizerSiteLogoUrl?p+"/wp-admin/options-general.php":p+"/wp-admin/customize.php?autofocus[section]=title_tagline",U=(0,_t.createInterpolateElement)((0,tt.__)("Site Icons are what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. To use a custom icon that is different from your site logo, use the <a>Site Icon settings</a>."),{a:(0,Ke.createElement)("a",{href:G,target:"_blank",rel:"noopener noreferrer"})});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Image width"),onChange:e=>c({width:e}),min:H,max:D,initialPosition:Math.min(120,D),value:n||"",disabled:!v}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link image to home"),onChange:()=>c({isLink:!o}),checked:o}),o&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>c({linkTarget:e?"_blank":"_self"}),checked:"_blank"===r})),b&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Use as Site Icon"),onChange:e=>{c({shouldSyncIcon:e}),h(e?d:void 0)},checked:!!l,help:U})))),(0,Ke.createElement)(nt.BlockControls,{group:"block"},$&&!w&&(0,Ke.createElement)(et.ToolbarButton,{onClick:()=>E(!0),icon:ep,label:(0,tt.__)("Crop")})),O)};function fw({onRemoveLogo:e,...t}){return(0,Ke.createElement)(nt.MediaReplaceFlow,{...t,allowedTypes:_w,accept:yw},(0,Ke.createElement)(et.MenuItem,{onClick:e},(0,tt.__)("Reset")))}const kw=({mediaItemData:e={},itemGroupProps:t})=>{const{alt_text:n,source_url:a,slug:o,media_details:r}=e,l=r?.sizes?.full?.file||o;return(0,Ke.createElement)(et.__experimentalItemGroup,{...t,as:"span"},(0,Ke.createElement)(et.__experimentalHStack,{justify:"flex-start",as:"span"},(0,Ke.createElement)("img",{src:a,alt:n}),(0,Ke.createElement)(et.FlexItem,{as:"span"},(0,Ke.createElement)(et.__experimentalTruncate,{numberOfLines:1,className:"block-library-site-logo__inspector-media-replace-title"},l))))};const xw={to:[{type:"block",blocks:["core/site-title"],transform:({isLink:e,linkTarget:t})=>(0,Qe.createBlock)("core/site-title",{isLink:e,linkTarget:t})}]},ww={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/site-logo",title:"Site Logo",category:"theme",description:"Display an image to represent this site. Update this block and the changes apply everywhere.",textdomain:"default",attributes:{width:{type:"number"},isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"},shouldSyncIcon:{type:"boolean"}},example:{viewportWidth:500,attributes:{width:350,className:"block-editor-block-types-list__site-logo-example"}},supports:{html:!1,align:!0,alignWide:!1,color:{__experimentalDuotone:"img, .components-placeholder__illustration, .components-placeholder::before",text:!1,background:!1},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},interactivity:{clientNavigation:!0}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"rounded",label:"Rounded"}],editorStyle:"wp-block-site-logo-editor",style:"wp-block-site-logo"},{name:Ew}=ww,Cw={icon:bw,example:{},edit:function({attributes:e,className:t,setAttributes:n,isSelected:a}){const{width:o,shouldSyncIcon:r}=e,l=(0,_t.useRef)(),{siteLogoId:i,canUserEdit:s,url:c,siteIconId:m,mediaItemData:u,isRequestingMediaItem:p}=(0,gt.useSelect)((e=>{const{canUser:t,getEntityRecord:n,getEditedEntityRecord:a}=e(dt.store),o=t("update","settings"),r=o?a("root","site"):void 0,l=n("root","__unstableBase"),i=o?r?.site_logo:l?.site_logo,s=r?.site_icon,c=i&&e(dt.store).getMedia(i,{context:"view"}),m=i&&!e(dt.store).hasFinishedResolution("getMedia",[i,{context:"view"}]);return{siteLogoId:i,canUserEdit:o,url:l?.home,mediaItemData:c,isRequestingMediaItem:m,siteIconId:s}}),[]),{getSettings:d}=(0,gt.useSelect)(nt.store),{editEntityRecord:g}=(0,gt.useDispatch)(dt.store),h=(e,t=!1)=>{(r||t)&&b(e),g("root","site",void 0,{site_logo:e})},b=e=>g("root","site",void 0,{site_icon:null!=e?e:null}),{alt_text:_,source_url:y}=null!=u?u:{},v=e=>{if(void 0===r){const t=!m;return n({shouldSyncIcon:t}),void f(e,t)}f(e)},f=(e,t=!1)=>{e&&(e.id||!e.url?h(e.id,t):h(void 0))},{createErrorNotice:k}=(0,gt.useDispatch)(Pt.store),x=e=>{k(e,{type:"snackbar"})},w=e=>{d().mediaUpload({allowedTypes:_w,filesList:e,onFileChange([e]){(0,It.isBlobURL)(e?.url)||v(e)},onError:x})},E={mediaURL:y,onSelect:f,onError:x,onRemoveLogo:()=>{h(null),n({width:void 0})}},C=s&&y&&(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(fw,{...E}));let S;const B=void 0===i||p;B&&(S=(0,Ke.createElement)(et.Spinner,null)),y&&(S=(0,Ke.createElement)(vw,{alt:_,attributes:e,className:t,containerRef:l,isSelected:a,setAttributes:n,logoUrl:y,setLogo:h,logoId:u?.id||i,siteUrl:c,setIcon:b,iconId:m,canUserEdit:s}));const N=ut()(t,{"is-default-size":!o}),T=(0,nt.useBlockProps)({ref:l,className:N}),I=(0,tt.__)("Add a site logo"),P=(s||y)&&(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Media")},(0,Ke.createElement)("div",{className:"block-library-site-logo__inspector-media-replace-container"},!s&&!!y&&(0,Ke.createElement)(kw,{mediaItemData:u,itemGroupProps:{isBordered:!0,className:"block-library-site-logo__inspector-readonly-logo-preview"}}),s&&!!y&&(0,Ke.createElement)(fw,{...E,name:(0,Ke.createElement)(kw,{mediaItemData:u}),popoverProps:{}}),s&&!y&&(0,Ke.createElement)(nt.MediaUploadCheck,null,(0,Ke.createElement)(nt.MediaUpload,{onSelect:v,allowedTypes:_w,render:({open:e})=>(0,Ke.createElement)("div",{className:"block-library-site-logo__inspector-upload-container"},(0,Ke.createElement)(et.Button,{onClick:e,variant:"secondary"},B?(0,Ke.createElement)(et.Spinner,null):(0,tt.__)("Add media")),(0,Ke.createElement)(et.DropZone,{onFilesDrop:w}))})))));return(0,Ke.createElement)("div",{...T},C,P,!!y&&S,!y&&!s&&(0,Ke.createElement)(et.Placeholder,{className:"site-logo_placeholder"},!!B&&(0,Ke.createElement)("span",{className:"components-placeholder__preview"},(0,Ke.createElement)(et.Spinner,null))),!y&&s&&(0,Ke.createElement)(nt.MediaPlaceholder,{onSelect:v,accept:yw,allowedTypes:_w,onError:x,placeholder:e=>{const n=ut()("block-editor-media-placeholder",t);return(0,Ke.createElement)(et.Placeholder,{className:n,preview:S,withIllustration:!0,style:{width:o}},e)},mediaLibraryButton:({open:e})=>(0,Ke.createElement)(et.Button,{icon:np,variant:"primary",label:I,showTooltip:!0,tooltipPosition:"top center",onClick:()=>{e()}})}))},transforms:xw},Sw=()=>Xe({name:Ew,metadata:ww,settings:Cw});const Bw=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},(0,Ke.createElement)(et.Path,{d:"M4 10.5h16V9H4v1.5ZM4 15h9v-1.5H4V15Z"})),Nw={attributes:{textAlign:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},Tw=[Nw],Iw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/site-tagline",title:"Site Tagline",category:"theme",description:"Describe in a few words what the site is about. The tagline can be used in search results or when sharing on social networks even if it’s not displayed in the theme design.",keywords:["description"],textdomain:"default",attributes:{textAlign:{type:"string"}},example:{},supports:{align:["wide","full"],html:!1,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-site-tagline-editor"},{name:Pw}=Iw,Mw={icon:Bw,edit:function({attributes:e,setAttributes:t,insertBlocksAfter:n}){const{textAlign:a}=e,{canUserEdit:o,tagline:r}=(0,gt.useSelect)((e=>{const{canUser:t,getEntityRecord:n,getEditedEntityRecord:a}=e(dt.store),o=t("update","settings"),r=o?a("root","site"):{},l=n("root","__unstableBase");return{canUserEdit:t("update","settings"),tagline:o?r?.description:l?.description}}),[]),{editEntityRecord:l}=(0,gt.useDispatch)(dt.store),i=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${a}`]:a,"wp-block-site-tagline__placeholder":!o&&!r})}),s=o?(0,Ke.createElement)(nt.RichText,{allowedFormats:[],onChange:function(e){l("root","site",void 0,{description:e})},"aria-label":(0,tt.__)("Site tagline text"),placeholder:(0,tt.__)("Write site tagline…"),tagName:"p",value:r,disableLineBreaks:!0,__unstableOnSplitAtEnd:()=>n((0,Qe.createBlock)((0,Qe.getDefaultBlockName)())),...i}):(0,Ke.createElement)("p",{...i},r||(0,tt.__)("Site Tagline placeholder"));return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{onChange:e=>t({textAlign:e}),value:a})),s)},deprecated:Tw},zw=()=>Xe({name:Pw,metadata:Iw,settings:Mw}),Rw=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M12 9c-.8 0-1.5.7-1.5 1.5S11.2 12 12 12s1.5-.7 1.5-1.5S12.8 9 12 9zm0-5c-3.6 0-6.5 2.8-6.5 6.2 0 .8.3 1.8.9 3.1.5 1.1 1.2 2.3 2 3.6.7 1 3 3.8 3.2 3.9l.4.5.4-.5c.2-.2 2.6-2.9 3.2-3.9.8-1.2 1.5-2.5 2-3.6.6-1.3.9-2.3.9-3.1C18.5 6.8 15.6 4 12 4zm4.3 8.7c-.5 1-1.1 2.2-1.9 3.4-.5.7-1.7 2.2-2.4 3-.7-.8-1.9-2.3-2.4-3-.8-1.2-1.4-2.3-1.9-3.3-.6-1.4-.7-2.2-.7-2.5 0-2.6 2.2-4.7 5-4.7s5 2.1 5 4.7c0 .2-.1 1-.7 2.4z"})),Aw=[0,1,2,3,4,5,6];const Hw={attributes:{level:{type:"number",default:1},textAlign:{type:"string"},isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},Lw=[Hw],Dw={to:[{type:"block",blocks:["core/site-logo"],transform:({isLink:e,linkTarget:t})=>(0,Qe.createBlock)("core/site-logo",{isLink:e,linkTarget:t})}]},Fw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/site-title",title:"Site Title",category:"theme",description:"Displays the name of this site. Update the block, and the changes apply everywhere it’s used. This will also appear in the browser title bar and in search results.",textdomain:"default",attributes:{level:{type:"number",default:1},textAlign:{type:"string"},isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"}},example:{viewportWidth:500},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{padding:!0,margin:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-site-title-editor",style:"wp-block-site-title"},{name:Vw}=Fw,$w={icon:Rw,example:{},edit:function({attributes:e,setAttributes:t,insertBlocksAfter:n}){const{level:a,textAlign:o,isLink:r,linkTarget:l}=e,{canUserEdit:i,title:s}=(0,gt.useSelect)((e=>{const{canUser:t,getEntityRecord:n,getEditedEntityRecord:a}=e(dt.store),o=t("update","settings"),r=o?a("root","site"):{},l=n("root","__unstableBase");return{canUserEdit:o,title:o?r?.title:l?.name}}),[]),{editEntityRecord:c}=(0,gt.useDispatch)(dt.store),m=0===a?"p":`h${a}`,u=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${o}`]:o,"wp-block-site-title__placeholder":!i&&!s})}),p=i?(0,Ke.createElement)(m,{...u},(0,Ke.createElement)(nt.RichText,{tagName:r?"a":"span",href:r?"#site-title-pseudo-link":void 0,"aria-label":(0,tt.__)("Site title text"),placeholder:(0,tt.__)("Write site title…"),value:s,onChange:function(e){c("root","site",void 0,{title:e})},allowedFormats:[],disableLineBreaks:!0,__unstableOnSplitAtEnd:()=>n((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))})):(0,Ke.createElement)(m,{...u},r?(0,Ke.createElement)("a",{href:"#site-title-pseudo-link",onClick:e=>e.preventDefault()},(0,Jn.decodeEntities)(s)||(0,tt.__)("Site Title placeholder")):(0,Ke.createElement)("span",null,(0,Jn.decodeEntities)(s)||(0,tt.__)("Site Title placeholder")));return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.HeadingLevelDropdown,{options:Aw,value:a,onChange:e=>t({level:e})}),(0,Ke.createElement)(nt.AlignmentControl,{value:o,onChange:e=>{t({textAlign:e})}})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Make title link to home"),onChange:()=>t({isLink:!r}),checked:r}),r&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>t({linkTarget:e?"_blank":"_self"}),checked:"_blank"===l}))),p)},transforms:Dw,deprecated:Lw},Ow=()=>Xe({name:Vw,metadata:Fw,settings:$w}),Gw=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M9 11.8l6.1-4.5c.1.4.4.7.9.7h2c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1h-2c-.6 0-1 .4-1 1v.4l-6.4 4.8c-.2-.1-.4-.2-.6-.2H6c-.6 0-1 .4-1 1v2c0 .6.4 1 1 1h2c.2 0 .4-.1.6-.2l6.4 4.8v.4c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-2c0-.6-.4-1-1-1h-2c-.5 0-.8.3-.9.7L9 12.2v-.4z"})),Uw=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"})),qw=()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.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"})),jw=[{isDefault:!0,name:"wordpress",attributes:{service:"wordpress"},title:"WordPress",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M12.158,12.786L9.46,20.625c0.806,0.237,1.657,0.366,2.54,0.366c1.047,0,2.051-0.181,2.986-0.51 c-0.024-0.038-0.046-0.079-0.065-0.124L12.158,12.786z M3.009,12c0,3.559,2.068,6.634,5.067,8.092L3.788,8.341 C3.289,9.459,3.009,10.696,3.009,12z M18.069,11.546c0-1.112-0.399-1.881-0.741-2.48c-0.456-0.741-0.883-1.368-0.883-2.109 c0-0.826,0.627-1.596,1.51-1.596c0.04,0,0.078,0.005,0.116,0.007C16.472,3.904,14.34,3.009,12,3.009 c-3.141,0-5.904,1.612-7.512,4.052c0.211,0.007,0.41,0.011,0.579,0.011c0.94,0,2.396-0.114,2.396-0.114 C7.947,6.93,8.004,7.642,7.52,7.699c0,0-0.487,0.057-1.029,0.085l3.274,9.739l1.968-5.901l-1.401-3.838 C9.848,7.756,9.389,7.699,9.389,7.699C8.904,7.67,8.961,6.93,9.446,6.958c0,0,1.484,0.114,2.368,0.114 c0.94,0,2.397-0.114,2.397-0.114c0.485-0.028,0.542,0.684,0.057,0.741c0,0-0.488,0.057-1.029,0.085l3.249,9.665l0.897-2.996 C17.841,13.284,18.069,12.316,18.069,11.546z M19.889,7.686c0.039,0.286,0.06,0.593,0.06,0.924c0,0.912-0.171,1.938-0.684,3.22 l-2.746,7.94c2.673-1.558,4.47-4.454,4.47-7.771C20.991,10.436,20.591,8.967,19.889,7.686z M12,22C6.486,22,2,17.514,2,12 C2,6.486,6.486,2,12,2c5.514,0,10,4.486,10,10C22,17.514,17.514,22,12,22z"}))},{name:"fivehundredpx",attributes:{service:"fivehundredpx"},title:"500px",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M6.94026,15.1412c.00437.01213.108.29862.168.44064a6.55008,6.55008,0,1,0,6.03191-9.09557,6.68654,6.68654,0,0,0-2.58357.51467A8.53914,8.53914,0,0,0,8.21268,8.61344L8.209,8.61725V3.22948l9.0504-.00008c.32934-.0036.32934-.46353.32934-.61466s0-.61091-.33035-.61467L7.47248,2a.43.43,0,0,0-.43131.42692v7.58355c0,.24466.30476.42131.58793.4819.553.11812.68074-.05864.81617-.2457l.018-.02481A10.52673,10.52673,0,0,1,9.32258,9.258a5.35268,5.35268,0,1,1,7.58985,7.54976,5.417,5.417,0,0,1-3.80867,1.56365,5.17483,5.17483,0,0,1-2.69822-.74478l.00342-4.61111a2.79372,2.79372,0,0,1,.71372-1.78792,2.61611,2.61611,0,0,1,1.98282-.89477,2.75683,2.75683,0,0,1,1.95525.79477,2.66867,2.66867,0,0,1,.79656,1.909,2.724,2.724,0,0,1-2.75849,2.748,4.94651,4.94651,0,0,1-.86254-.13719c-.31234-.093-.44519.34058-.48892.48349-.16811.54966.08453.65862.13687.67489a3.75751,3.75751,0,0,0,1.25234.18375,3.94634,3.94634,0,1,0-2.82444-6.742,3.67478,3.67478,0,0,0-1.13028,2.584l-.00041.02323c-.0035.11667-.00579,2.881-.00644,3.78811l-.00407-.00451a6.18521,6.18521,0,0,1-1.0851-1.86092c-.10544-.27856-.34358-.22925-.66857-.12917-.14192.04372-.57386.17677-.47833.489Zm4.65165-1.08338a.51346.51346,0,0,0,.19513.31818l.02276.022a.52945.52945,0,0,0,.3517.18416.24242.24242,0,0,0,.16577-.0611c.05473-.05082.67382-.67812.73287-.738l.69041.68819a.28978.28978,0,0,0,.21437.11032.53239.53239,0,0,0,.35708-.19486c.29792-.30419.14885-.46821.07676-.54751l-.69954-.69975.72952-.73469c.16-.17311.01874-.35708-.12218-.498-.20461-.20461-.402-.25742-.52855-.14083l-.7254.72665-.73354-.73375a.20128.20128,0,0,0-.14179-.05695.54135.54135,0,0,0-.34379.19648c-.22561.22555-.274.38149-.15656.5059l.73374.7315-.72942.73072A.26589.26589,0,0,0,11.59191,14.05782Zm1.59866-9.915A8.86081,8.86081,0,0,0,9.854,4.776a.26169.26169,0,0,0-.16938.22759.92978.92978,0,0,0,.08619.42094c.05682.14524.20779.531.50006.41955a8.40969,8.40969,0,0,1,2.91968-.55484,7.87875,7.87875,0,0,1,3.086.62286,8.61817,8.61817,0,0,1,2.30562,1.49315.2781.2781,0,0,0,.18318.07586c.15529,0,.30425-.15253.43167-.29551.21268-.23861.35873-.4369.1492-.63538a8.50425,8.50425,0,0,0-2.62312-1.694A9.0177,9.0177,0,0,0,13.19058,4.14283ZM19.50945,18.6236h0a.93171.93171,0,0,0-.36642-.25406.26589.26589,0,0,0-.27613.06613l-.06943.06929A7.90606,7.90606,0,0,1,7.60639,18.505a7.57284,7.57284,0,0,1-1.696-2.51537,8.58715,8.58715,0,0,1-.5147-1.77754l-.00871-.04864c-.04939-.25873-.28755-.27684-.62981-.22448-.14234.02178-.5755.088-.53426.39969l.001.00712a9.08807,9.08807,0,0,0,15.406,4.99094c.00193-.00192.04753-.04718.0725-.07436C19.79425,19.16234,19.87422,18.98728,19.50945,18.6236Z"}))},{name:"amazon",attributes:{service:"amazon"},title:"Amazon",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M13.582,8.182C11.934,8.367,9.78,8.49,8.238,9.166c-1.781,0.769-3.03,2.337-3.03,4.644 c0,2.953,1.86,4.429,4.253,4.429c2.02,0,3.125-0.477,4.685-2.065c0.516,0.747,0.685,1.109,1.629,1.894 c0.212,0.114,0.483,0.103,0.672-0.066l0.006,0.006c0.567-0.505,1.599-1.401,2.18-1.888c0.231-0.188,0.19-0.496,0.009-0.754 c-0.52-0.718-1.072-1.303-1.072-2.634V8.305c0-1.876,0.133-3.599-1.249-4.891C15.23,2.369,13.422,2,12.04,2 C9.336,2,6.318,3.01,5.686,6.351C5.618,6.706,5.877,6.893,6.109,6.945l2.754,0.298C9.121,7.23,9.308,6.977,9.357,6.72 c0.236-1.151,1.2-1.706,2.284-1.706c0.584,0,1.249,0.215,1.595,0.738c0.398,0.584,0.346,1.384,0.346,2.061V8.182z M13.049,14.088 c-0.451,0.8-1.169,1.291-1.967,1.291c-1.09,0-1.728-0.83-1.728-2.061c0-2.42,2.171-2.86,4.227-2.86v0.615 C13.582,12.181,13.608,13.104,13.049,14.088z M20.683,19.339C18.329,21.076,14.917,22,11.979,22c-4.118,0-7.826-1.522-10.632-4.057 c-0.22-0.199-0.024-0.471,0.241-0.317c3.027,1.762,6.771,2.823,10.639,2.823c2.608,0,5.476-0.541,8.115-1.66 C20.739,18.62,21.072,19.051,20.683,19.339z M21.336,21.043c-0.194,0.163-0.379,0.076-0.293-0.139 c0.284-0.71,0.92-2.298,0.619-2.684c-0.301-0.386-1.99-0.183-2.749-0.092c-0.23,0.027-0.266-0.173-0.059-0.319 c1.348-0.946,3.555-0.673,3.811-0.356C22.925,17.773,22.599,19.986,21.336,21.043z"}))},{name:"bandcamp",attributes:{service:"bandcamp"},title:"Bandcamp",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M15.27 17.289 3 17.289 8.73 6.711 21 6.711 15.27 17.289"}))},{name:"behance",attributes:{service:"behance"},title:"Behance",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M7.799,5.698c0.589,0,1.12,0.051,1.606,0.156c0.482,0.102,0.894,0.273,1.241,0.507c0.344,0.235,0.612,0.546,0.804,0.938 c0.188,0.387,0.281,0.871,0.281,1.443c0,0.619-0.141,1.137-0.421,1.551c-0.284,0.413-0.7,0.751-1.255,1.014 c0.756,0.218,1.317,0.601,1.689,1.146c0.374,0.549,0.557,1.205,0.557,1.975c0,0.623-0.12,1.161-0.359,1.612 c-0.241,0.457-0.569,0.828-0.973,1.114c-0.408,0.288-0.876,0.5-1.399,0.637C9.052,17.931,8.514,18,7.963,18H2V5.698H7.799 M7.449,10.668c0.481,0,0.878-0.114,1.192-0.345c0.311-0.228,0.463-0.603,0.463-1.119c0-0.286-0.051-0.523-0.152-0.707 C8.848,8.315,8.711,8.171,8.536,8.07C8.362,7.966,8.166,7.894,7.94,7.854c-0.224-0.044-0.457-0.06-0.697-0.06H4.709v2.874H7.449z M7.6,15.905c0.267,0,0.521-0.024,0.759-0.077c0.243-0.053,0.457-0.137,0.637-0.261c0.182-0.12,0.332-0.283,0.441-0.491 C9.547,14.87,9.6,14.602,9.6,14.278c0-0.633-0.18-1.084-0.533-1.357c-0.356-0.27-0.83-0.404-1.413-0.404H4.709v3.388L7.6,15.905z M16.162,15.864c0.367,0.358,0.897,0.538,1.583,0.538c0.493,0,0.92-0.125,1.277-0.374c0.354-0.248,0.571-0.514,0.654-0.79h2.155 c-0.347,1.072-0.872,1.838-1.589,2.299C19.534,18,18.67,18.23,17.662,18.23c-0.701,0-1.332-0.113-1.899-0.337 c-0.567-0.227-1.041-0.544-1.439-0.958c-0.389-0.415-0.689-0.907-0.904-1.484c-0.213-0.574-0.32-1.21-0.32-1.899 c0-0.666,0.11-1.288,0.329-1.863c0.222-0.577,0.529-1.075,0.933-1.492c0.406-0.42,0.885-0.751,1.444-0.994 c0.558-0.241,1.175-0.363,1.857-0.363c0.754,0,1.414,0.145,1.98,0.44c0.563,0.291,1.026,0.686,1.389,1.181 c0.363,0.493,0.622,1.057,0.783,1.69c0.16,0.632,0.217,1.292,0.171,1.983h-6.428C15.557,14.84,15.795,15.506,16.162,15.864 M18.973,11.184c-0.291-0.321-0.783-0.496-1.384-0.496c-0.39,0-0.714,0.066-0.973,0.2c-0.254,0.132-0.461,0.297-0.621,0.491 c-0.157,0.197-0.265,0.405-0.328,0.628c-0.063,0.217-0.101,0.413-0.111,0.587h3.98C19.478,11.969,19.265,11.509,18.973,11.184z M15.057,7.738h4.985V6.524h-4.985L15.057,7.738z"}))},{name:"chain",attributes:{service:"chain"},title:"Link",icon:qw},{name:"codepen",attributes:{service:"codepen"},title:"CodePen",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M22.016,8.84c-0.002-0.013-0.005-0.025-0.007-0.037c-0.005-0.025-0.008-0.048-0.015-0.072 c-0.003-0.015-0.01-0.028-0.013-0.042c-0.008-0.02-0.015-0.04-0.023-0.062c-0.007-0.015-0.013-0.028-0.02-0.042 c-0.008-0.02-0.018-0.037-0.03-0.057c-0.007-0.013-0.017-0.027-0.025-0.038c-0.012-0.018-0.023-0.035-0.035-0.052 c-0.01-0.013-0.02-0.025-0.03-0.037c-0.015-0.017-0.028-0.032-0.043-0.045c-0.01-0.012-0.022-0.023-0.035-0.035 c-0.015-0.015-0.032-0.028-0.048-0.04c-0.012-0.01-0.025-0.02-0.037-0.03c-0.005-0.003-0.01-0.008-0.015-0.012l-9.161-6.096 c-0.289-0.192-0.666-0.192-0.955,0L2.359,8.237C2.354,8.24,2.349,8.245,2.344,8.249L2.306,8.277 c-0.017,0.013-0.033,0.027-0.048,0.04C2.246,8.331,2.234,8.342,2.222,8.352c-0.015,0.015-0.028,0.03-0.042,0.047 c-0.012,0.013-0.022,0.023-0.03,0.037C2.139,8.453,2.125,8.471,2.115,8.488C2.107,8.501,2.099,8.514,2.09,8.526 C2.079,8.548,2.069,8.565,2.06,8.585C2.054,8.6,2.047,8.613,2.04,8.626C2.032,8.648,2.025,8.67,2.019,8.69 c-0.005,0.013-0.01,0.027-0.013,0.042C1.999,8.755,1.995,8.778,1.99,8.803C1.989,8.817,1.985,8.828,1.984,8.84 C1.978,8.879,1.975,8.915,1.975,8.954v6.093c0,0.037,0.003,0.075,0.008,0.112c0.002,0.012,0.005,0.025,0.007,0.038 c0.005,0.023,0.008,0.047,0.015,0.072c0.003,0.015,0.008,0.028,0.013,0.04c0.007,0.022,0.013,0.042,0.022,0.063 c0.007,0.015,0.013,0.028,0.02,0.04c0.008,0.02,0.018,0.038,0.03,0.058c0.007,0.013,0.015,0.027,0.025,0.038 c0.012,0.018,0.023,0.035,0.035,0.052c0.01,0.013,0.02,0.025,0.03,0.037c0.013,0.015,0.028,0.032,0.042,0.045 c0.012,0.012,0.023,0.023,0.035,0.035c0.015,0.013,0.032,0.028,0.048,0.04l0.038,0.03c0.005,0.003,0.01,0.007,0.013,0.01 l9.163,6.095C11.668,21.953,11.833,22,12,22c0.167,0,0.332-0.047,0.478-0.144l9.163-6.095l0.015-0.01 c0.013-0.01,0.027-0.02,0.037-0.03c0.018-0.013,0.035-0.028,0.048-0.04c0.013-0.012,0.025-0.023,0.035-0.035 c0.017-0.015,0.03-0.032,0.043-0.045c0.01-0.013,0.02-0.025,0.03-0.037c0.013-0.018,0.025-0.035,0.035-0.052 c0.008-0.013,0.018-0.027,0.025-0.038c0.012-0.02,0.022-0.038,0.03-0.058c0.007-0.013,0.013-0.027,0.02-0.04 c0.008-0.022,0.015-0.042,0.023-0.063c0.003-0.013,0.01-0.027,0.013-0.04c0.007-0.025,0.01-0.048,0.015-0.072 c0.002-0.013,0.005-0.027,0.007-0.037c0.003-0.042,0.007-0.079,0.007-0.117V8.954C22.025,8.915,22.022,8.879,22.016,8.84z M12.862,4.464l6.751,4.49l-3.016,2.013l-3.735-2.492V4.464z M11.138,4.464v4.009l-3.735,2.494L4.389,8.954L11.138,4.464z M3.699,10.562L5.853,12l-2.155,1.438V10.562z M11.138,19.536l-6.749-4.491l3.015-2.011l3.735,2.492V19.536z M12,14.035L8.953,12 L12,9.966L15.047,12L12,14.035z M12.862,19.536v-4.009l3.735-2.492l3.016,2.011L12.862,19.536z M20.303,13.438L18.147,12 l2.156-1.438L20.303,13.438z"}))},{name:"deviantart",attributes:{service:"deviantart"},title:"DeviantArt",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M 18.19 5.636 18.19 2 18.188 2 14.553 2 14.19 2.366 12.474 5.636 11.935 6 5.81 6 5.81 10.994 9.177 10.994 9.477 11.357 5.81 18.363 5.81 22 5.811 22 9.447 22 9.81 21.634 11.526 18.364 12.065 18 18.19 18 18.19 13.006 14.823 13.006 14.523 12.641 18.19 5.636z"}))},{name:"dribbble",attributes:{service:"dribbble"},title:"Dribbble",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12,22C6.486,22,2,17.514,2,12S6.486,2,12,2c5.514,0,10,4.486,10,10S17.514,22,12,22z M20.434,13.369 c-0.292-0.092-2.644-0.794-5.32-0.365c1.117,3.07,1.572,5.57,1.659,6.09C18.689,17.798,20.053,15.745,20.434,13.369z M15.336,19.876c-0.127-0.749-0.623-3.361-1.822-6.477c-0.019,0.006-0.038,0.013-0.056,0.019c-4.818,1.679-6.547,5.02-6.701,5.334 c1.448,1.129,3.268,1.803,5.243,1.803C13.183,20.555,14.311,20.313,15.336,19.876z M5.654,17.724 c0.193-0.331,2.538-4.213,6.943-5.637c0.111-0.036,0.224-0.07,0.337-0.102c-0.214-0.485-0.448-0.971-0.692-1.45 c-4.266,1.277-8.405,1.223-8.778,1.216c-0.003,0.087-0.004,0.174-0.004,0.261C3.458,14.207,4.29,16.21,5.654,17.724z M3.639,10.264 c0.382,0.005,3.901,0.02,7.897-1.041c-1.415-2.516-2.942-4.631-3.167-4.94C5.979,5.41,4.193,7.613,3.639,10.264z M9.998,3.709 c0.236,0.316,1.787,2.429,3.187,5c3.037-1.138,4.323-2.867,4.477-3.085C16.154,4.286,14.17,3.471,12,3.471 C11.311,3.471,10.641,3.554,9.998,3.709z M18.612,6.612C18.432,6.855,17,8.69,13.842,9.979c0.199,0.407,0.389,0.821,0.567,1.237 c0.063,0.148,0.124,0.295,0.184,0.441c2.842-0.357,5.666,0.215,5.948,0.275C20.522,9.916,19.801,8.065,18.612,6.612z"}))},{name:"dropbox",attributes:{service:"dropbox"},title:"Dropbox",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12,6.134L6.069,9.797L2,6.54l5.883-3.843L12,6.134z M2,13.054l5.883,3.843L12,13.459L6.069,9.797L2,13.054z M12,13.459 l4.116,3.439L22,13.054l-4.069-3.257L12,13.459z M22,6.54l-5.884-3.843L12,6.134l5.931,3.663L22,6.54z M12.011,14.2l-4.129,3.426 l-1.767-1.153v1.291l5.896,3.539l5.897-3.539v-1.291l-1.769,1.153L12.011,14.2z"}))},{name:"etsy",attributes:{service:"etsy"},title:"Etsy",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M9.16033,4.038c0-.27174.02717-.43478.48913-.43478h6.22283c1.087,0,1.68478.92391,2.11957,2.663l.35326,1.38587h1.05978C19.59511,3.712,19.75815,2,19.75815,2s-2.663.29891-4.23913.29891h-7.962L3.29076,2.163v1.1413L4.731,3.57609c1.00543.19022,1.25.40761,1.33152,1.33152,0,0,.08152,2.71739.08152,7.20109s-.08152,7.17391-.08152,7.17391c0,.81522-.32609,1.11413-1.33152,1.30435l-1.44022.27174V22l4.2663-.13587h7.11957c1.60326,0,5.32609.13587,5.32609.13587.08152-.97826.625-5.40761.70652-5.89674H19.7038L18.644,18.52174c-.84239,1.90217-2.06522,2.038-3.42391,2.038H11.1712c-1.3587,0-2.01087-.54348-2.01087-1.712V12.65217s3.0163,0,3.99457.08152c.76087.05435,1.22283.27174,1.46739,1.33152l.32609,1.413h1.16848l-.08152-3.55978.163-3.587H15.02989l-.38043,1.57609c-.24457,1.03261-.40761,1.22283-1.46739,1.33152-1.38587.13587-4.02174.1087-4.02174.1087Z"}))},{name:"facebook",attributes:{service:"facebook"},title:"Facebook",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"}))},{name:"feed",attributes:{service:"feed"},title:"RSS Feed",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M2,8.667V12c5.515,0,10,4.485,10,10h3.333C15.333,14.637,9.363,8.667,2,8.667z M2,2v3.333 c9.19,0,16.667,7.477,16.667,16.667H22C22,10.955,13.045,2,2,2z M4.5,17C3.118,17,2,18.12,2,19.5S3.118,22,4.5,22S7,20.88,7,19.5 S5.882,17,4.5,17z"}))},{name:"flickr",attributes:{service:"flickr"},title:"Flickr",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M6.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5S9.25,7,6.5,7z M17.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5 S20.25,7,17.5,7z"}))},{name:"foursquare",attributes:{service:"foursquare"},title:"Foursquare",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M17.573,2c0,0-9.197,0-10.668,0S5,3.107,5,3.805s0,16.948,0,16.948c0,0.785,0.422,1.077,0.66,1.172 c0.238,0.097,0.892,0.177,1.285-0.275c0,0,5.035-5.843,5.122-5.93c0.132-0.132,0.132-0.132,0.262-0.132h3.26 c1.368,0,1.588-0.977,1.732-1.552c0.078-0.318,0.692-3.428,1.225-6.122l0.675-3.368C19.56,2.893,19.14,2,17.573,2z M16.495,7.22 c-0.053,0.252-0.372,0.518-0.665,0.518c-0.293,0-4.157,0-4.157,0c-0.467,0-0.802,0.318-0.802,0.787v0.508 c0,0.467,0.337,0.798,0.805,0.798c0,0,3.197,0,3.528,0s0.655,0.362,0.583,0.715c-0.072,0.353-0.407,2.102-0.448,2.295 c-0.04,0.193-0.262,0.523-0.655,0.523c-0.33,0-2.88,0-2.88,0c-0.523,0-0.683,0.068-1.033,0.503 c-0.35,0.437-3.505,4.223-3.505,4.223c-0.032,0.035-0.063,0.027-0.063-0.015V4.852c0-0.298,0.26-0.648,0.648-0.648 c0,0,8.228,0,8.562,0c0.315,0,0.61,0.297,0.528,0.683L16.495,7.22z"}))},{name:"goodreads",attributes:{service:"goodreads"},title:"Goodreads",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M17.3,17.5c-0.2,0.8-0.5,1.4-1,1.9c-0.4,0.5-1,0.9-1.7,1.2C13.9,20.9,13.1,21,12,21c-0.6,0-1.3-0.1-1.9-0.2 c-0.6-0.1-1.1-0.4-1.6-0.7c-0.5-0.3-0.9-0.7-1.2-1.2c-0.3-0.5-0.5-1.1-0.5-1.7h1.5c0.1,0.5,0.2,0.9,0.5,1.2 c0.2,0.3,0.5,0.6,0.9,0.8c0.3,0.2,0.7,0.3,1.1,0.4c0.4,0.1,0.8,0.1,1.2,0.1c1.4,0,2.5-0.4,3.1-1.2c0.6-0.8,1-2,1-3.5v-1.7h0 c-0.4,0.8-0.9,1.4-1.6,1.9c-0.7,0.5-1.5,0.7-2.4,0.7c-1,0-1.9-0.2-2.6-0.5C8.7,15,8.1,14.5,7.7,14c-0.5-0.6-0.8-1.3-1-2.1 c-0.2-0.8-0.3-1.6-0.3-2.5c0-0.9,0.1-1.7,0.4-2.5c0.3-0.8,0.6-1.5,1.1-2c0.5-0.6,1.1-1,1.8-1.4C10.3,3.2,11.1,3,12,3 c0.5,0,0.9,0.1,1.3,0.2c0.4,0.1,0.8,0.3,1.1,0.5c0.3,0.2,0.6,0.5,0.9,0.8c0.3,0.3,0.5,0.6,0.6,1h0V3.4h1.5V15 C17.6,15.9,17.5,16.7,17.3,17.5z M13.8,14.1c0.5-0.3,0.9-0.7,1.3-1.1c0.3-0.5,0.6-1,0.8-1.6c0.2-0.6,0.3-1.2,0.3-1.9 c0-0.6-0.1-1.2-0.2-1.9c-0.1-0.6-0.4-1.2-0.7-1.7c-0.3-0.5-0.7-0.9-1.3-1.2c-0.5-0.3-1.1-0.5-1.9-0.5s-1.4,0.2-1.9,0.5 c-0.5,0.3-1,0.7-1.3,1.2C8.5,6.4,8.3,7,8.1,7.6C8,8.2,7.9,8.9,7.9,9.5c0,0.6,0.1,1.3,0.2,1.9C8.3,12,8.6,12.5,8.9,13 c0.3,0.5,0.8,0.8,1.3,1.1c0.5,0.3,1.1,0.4,1.9,0.4C12.7,14.5,13.3,14.4,13.8,14.1z"}))},{name:"google",attributes:{service:"google"},title:"Google",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12.02,10.18v3.72v0.01h5.51c-0.26,1.57-1.67,4.22-5.5,4.22c-3.31,0-6.01-2.75-6.01-6.12s2.7-6.12,6.01-6.12 c1.87,0,3.13,0.8,3.85,1.48l2.84-2.76C16.99,2.99,14.73,2,12.03,2c-5.52,0-10,4.48-10,10s4.48,10,10,10c5.77,0,9.6-4.06,9.6-9.77 c0-0.83-0.11-1.42-0.25-2.05H12.02z"}))},{name:"github",attributes:{service:"github"},title:"GitHub",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"}))},{name:"gravatar",attributes:{service:"gravatar"},title:"Gravatar",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M10.8001 4.69937V10.6494C10.8001 11.1001 10.9791 11.5323 11.2978 11.851C11.6165 12.1697 12.0487 12.3487 12.4994 12.3487C12.9501 12.3487 13.3824 12.1697 13.7011 11.851C14.0198 11.5323 14.1988 11.1001 14.1988 10.6494V6.69089C15.2418 7.05861 16.1371 7.75537 16.7496 8.67617C17.3622 9.59698 17.6589 10.6919 17.595 11.796C17.5311 12.9001 17.1101 13.9535 16.3954 14.7975C15.6807 15.6415 14.711 16.2303 13.6325 16.4753C12.5541 16.7202 11.4252 16.608 10.4161 16.1555C9.40691 15.703 8.57217 14.9348 8.03763 13.9667C7.50308 12.9985 7.29769 11.8828 7.45242 10.7877C7.60714 9.69266 8.11359 8.67755 8.89545 7.89537C9.20904 7.57521 9.38364 7.14426 9.38132 6.69611C9.37899 6.24797 9.19994 5.81884 8.88305 5.50195C8.56616 5.18506 8.13704 5.00601 7.68889 5.00369C7.24075 5.00137 6.80979 5.17597 6.48964 5.48956C5.09907 6.8801 4.23369 8.7098 4.04094 10.6669C3.84819 12.624 4.34 14.5873 5.43257 16.2224C6.52515 17.8575 8.15088 19.0632 10.0328 19.634C11.9146 20.2049 13.9362 20.1055 15.753 19.3529C17.5699 18.6003 19.0695 17.241 19.9965 15.5066C20.9234 13.7722 21.2203 11.7701 20.8366 9.84133C20.4528 7.91259 19.4122 6.17658 17.892 4.92911C16.3717 3.68163 14.466 2.99987 12.4994 3C12.0487 3 11.6165 3.17904 11.2978 3.49773C10.9791 3.81643 10.8001 4.24867 10.8001 4.69937Z"}))},{name:"instagram",attributes:{service:"instagram"},title:"Instagram",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z"}))},{name:"lastfm",attributes:{service:"lastfm"},title:"Last.fm",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M 12.0002 1.5 C 6.2006 1.5 1.5 6.2011 1.5 11.9998 C 1.5 17.799 6.2006 22.5 12.0002 22.5 C 17.799 22.5 22.5 17.799 22.5 11.9998 C 22.5 6.2011 17.799 1.5 12.0002 1.5 Z M 16.1974 16.2204 C 14.8164 16.2152 13.9346 15.587 13.3345 14.1859 L 13.1816 13.8451 L 11.8541 10.8101 C 11.4271 9.7688 10.3526 9.0712 9.1801 9.0712 C 7.5695 9.0712 6.2593 10.3851 6.2593 12.001 C 6.2593 13.6165 7.5695 14.9303 9.1801 14.9303 C 10.272 14.9303 11.2651 14.3275 11.772 13.3567 C 11.7893 13.3235 11.8239 13.302 11.863 13.3038 C 11.9007 13.3054 11.9353 13.3288 11.9504 13.3632 L 12.4865 14.6046 C 12.5016 14.639 12.4956 14.6778 12.4723 14.7069 C 11.6605 15.6995 10.4602 16.2683 9.1801 16.2683 C 6.8331 16.2683 4.9234 14.3536 4.9234 12.001 C 4.9234 9.6468 6.833 7.732 9.1801 7.732 C 10.9572 7.732 12.3909 8.6907 13.1138 10.3636 C 13.1206 10.3802 13.8412 12.0708 14.4744 13.5191 C 14.8486 14.374 15.1462 14.896 16.1288 14.9292 C 17.0663 14.9613 17.7538 14.4122 17.7538 13.6485 C 17.7538 12.9691 17.3321 12.8004 16.3803 12.4822 C 14.7365 11.9398 13.845 11.3861 13.845 10.0182 C 13.845 8.6809 14.7667 7.8162 16.192 7.8162 C 17.1288 7.8162 17.8155 8.2287 18.2921 9.0768 C 18.305 9.1006 18.3079 9.1281 18.3004 9.1542 C 18.2929 9.1803 18.2748 9.2021 18.2507 9.2138 L 17.3614 9.669 C 17.3178 9.692 17.2643 9.6781 17.2356 9.6385 C 16.9329 9.2135 16.5956 9.0251 16.1423 9.0251 C 15.5512 9.0251 15.122 9.429 15.122 9.9865 C 15.122 10.6738 15.6529 10.8414 16.5339 11.1192 C 16.6491 11.1558 16.7696 11.194 16.8939 11.2343 C 18.2763 11.6865 19.0768 12.2311 19.0768 13.6836 C 19.0769 15.1297 17.8389 16.2204 16.1974 16.2204 Z"}))},{name:"linkedin",attributes:{service:"linkedin"},title:"LinkedIn",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"}))},{name:"mail",attributes:{service:"mail"},title:"Mail",keywords:["email","e-mail"],icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l7.5 5.6 7.5-5.6V17zm0-9.1L12 13.6 4.5 7.9V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v.9z"}))},{name:"mastodon",attributes:{service:"mastodon"},title:"Mastodon",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M23.193 7.879c0-5.206-3.411-6.732-3.411-6.732C18.062.357 15.108.025 12.041 0h-.076c-3.068.025-6.02.357-7.74 1.147 0 0-3.411 1.526-3.411 6.732 0 1.192-.023 2.618.015 4.129.124 5.092.934 10.109 5.641 11.355 2.17.574 4.034.695 5.535.612 2.722-.15 4.25-.972 4.25-.972l-.09-1.975s-1.945.613-4.129.539c-2.165-.074-4.449-.233-4.799-2.891a5.499 5.499 0 0 1-.048-.745s2.125.52 4.817.643c1.646.075 3.19-.097 4.758-.283 3.007-.359 5.625-2.212 5.954-3.905.517-2.665.475-6.507.475-6.507zm-4.024 6.709h-2.497V8.469c0-1.29-.543-1.944-1.628-1.944-1.2 0-1.802.776-1.802 2.312v3.349h-2.483v-3.35c0-1.536-.602-2.312-1.802-2.312-1.085 0-1.628.655-1.628 1.944v6.119H4.832V8.284c0-1.289.328-2.313.987-3.07.68-.758 1.569-1.146 2.674-1.146 1.278 0 2.246.491 2.886 1.474L12 6.585l.622-1.043c.64-.983 1.608-1.474 2.886-1.474 1.104 0 1.994.388 2.674 1.146.658.757.986 1.781.986 3.07v6.304z"}))},{name:"meetup",attributes:{service:"meetup"},title:"Meetup",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M19.24775,14.722a3.57032,3.57032,0,0,1-2.94457,3.52073,3.61886,3.61886,0,0,1-.64652.05634c-.07314-.0008-.10187.02846-.12507.09547A2.38881,2.38881,0,0,1,13.49453,20.094a2.33092,2.33092,0,0,1-1.827-.50716.13635.13635,0,0,0-.19878-.00408,3.191,3.191,0,0,1-2.104.60248,3.26309,3.26309,0,0,1-3.00324-2.71993,2.19076,2.19076,0,0,1-.03512-.30865c-.00156-.08579-.03413-.1189-.11608-.13493a2.86421,2.86421,0,0,1-1.23189-.56111,2.945,2.945,0,0,1-1.166-2.05749,2.97484,2.97484,0,0,1,.87524-2.50774.112.112,0,0,0,.02091-.16107,2.7213,2.7213,0,0,1-.36648-1.48A2.81256,2.81256,0,0,1,6.57673,7.58838a.35764.35764,0,0,0,.28869-.22819,4.2208,4.2208,0,0,1,6.02892-1.90111.25161.25161,0,0,0,.22023.0243,3.65608,3.65608,0,0,1,3.76031.90678A3.57244,3.57244,0,0,1,17.95918,8.626a2.97339,2.97339,0,0,1,.01829.57356.10637.10637,0,0,0,.0853.12792,1.97669,1.97669,0,0,1,1.27939,1.33733,2.00266,2.00266,0,0,1-.57112,2.12652c-.05284.05166-.04168.08328-.01173.13489A3.51189,3.51189,0,0,1,19.24775,14.722Zm-6.35959-.27836a1.6984,1.6984,0,0,0,1.14556,1.61113,3.82039,3.82039,0,0,0,1.036.17935,1.46888,1.46888,0,0,0,.73509-.12255.44082.44082,0,0,0,.26057-.44274.45312.45312,0,0,0-.29211-.43375.97191.97191,0,0,0-.20678-.063c-.21326-.03806-.42754-.0701-.63973-.11215a.54787.54787,0,0,1-.50172-.60926,2.75864,2.75864,0,0,1,.1773-.901c.1763-.535.414-1.045.64183-1.55913A12.686,12.686,0,0,0,15.85,10.47863a1.58461,1.58461,0,0,0,.04861-.87208,1.04531,1.04531,0,0,0-.85432-.83981,1.60658,1.60658,0,0,0-1.23654.16594.27593.27593,0,0,1-.36286-.03413c-.085-.0747-.16594-.15379-.24918-.23055a.98682.98682,0,0,0-1.33577-.04933,6.1468,6.1468,0,0,1-.4989.41615.47762.47762,0,0,1-.51535.03566c-.17448-.09307-.35512-.175-.53531-.25665a1.74949,1.74949,0,0,0-.56476-.2016,1.69943,1.69943,0,0,0-1.61654.91787,8.05815,8.05815,0,0,0-.32952.80126c-.45471,1.2557-.82507,2.53825-1.20838,3.81639a1.24151,1.24151,0,0,0,.51532,1.44389,1.42659,1.42659,0,0,0,1.22008.17166,1.09728,1.09728,0,0,0,.66994-.69764c.44145-1.04111.839-2.09989,1.25981-3.14926.11581-.28876.22792-.57874.35078-.86438a.44548.44548,0,0,1,.69189-.19539.50521.50521,0,0,1,.15044.43836,1.75625,1.75625,0,0,1-.14731.50453c-.27379.69219-.55265,1.38236-.82766,2.074a2.0836,2.0836,0,0,0-.14038.42876.50719.50719,0,0,0,.27082.57722.87236.87236,0,0,0,.66145.02739.99137.99137,0,0,0,.53406-.532q.61571-1.20914,1.228-2.42031.28423-.55863.57585-1.1133a.87189.87189,0,0,1,.29055-.35253.34987.34987,0,0,1,.37634-.01265.30291.30291,0,0,1,.12434.31459.56716.56716,0,0,1-.04655.1915c-.05318.12739-.10286.25669-.16183.38156-.34118.71775-.68754,1.43273-1.02568,2.152A2.00213,2.00213,0,0,0,12.88816,14.44366Zm4.78568,5.28972a.88573.88573,0,0,0-1.77139.00465.8857.8857,0,0,0,1.77139-.00465Zm-14.83838-7.296a.84329.84329,0,1,0,.00827-1.68655.8433.8433,0,0,0-.00827,1.68655Zm10.366-9.43673a.83506.83506,0,1,0-.0091,1.67.83505.83505,0,0,0,.0091-1.67Zm6.85014,5.22a.71651.71651,0,0,0-1.433.0093.71656.71656,0,0,0,1.433-.0093ZM5.37528,6.17908A.63823.63823,0,1,0,6.015,5.54483.62292.62292,0,0,0,5.37528,6.17908Zm6.68214,14.80843a.54949.54949,0,1,0-.55052.541A.54556.54556,0,0,0,12.05742,20.98752Zm8.53235-8.49689a.54777.54777,0,0,0-.54027.54023.53327.53327,0,0,0,.532.52293.51548.51548,0,0,0,.53272-.5237A.53187.53187,0,0,0,20.58977,12.49063ZM7.82846,2.4715a.44927.44927,0,1,0,.44484.44766A.43821.43821,0,0,0,7.82846,2.4715Zm13.775,7.60492a.41186.41186,0,0,0-.40065.39623.40178.40178,0,0,0,.40168.40168A.38994.38994,0,0,0,22,10.48172.39946.39946,0,0,0,21.60349,10.07642ZM5.79193,17.96207a.40469.40469,0,0,0-.397-.39646.399.399,0,0,0-.396.405.39234.39234,0,0,0,.39939.389A.39857.39857,0,0,0,5.79193,17.96207Z"}))},{name:"medium",attributes:{service:"medium"},title:"Medium",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M20.962,7.257l-5.457,8.867l-3.923-6.375l3.126-5.08c0.112-0.182,0.319-0.286,0.527-0.286c0.05,0,0.1,0.008,0.149,0.02 c0.039,0.01,0.078,0.023,0.114,0.041l5.43,2.715l0.006,0.003c0.004,0.002,0.007,0.006,0.011,0.008 C20.971,7.191,20.98,7.227,20.962,7.257z M9.86,8.592v5.783l5.14,2.57L9.86,8.592z M15.772,17.331l4.231,2.115 C20.554,19.721,21,19.529,21,19.016V8.835L15.772,17.331z M8.968,7.178L3.665,4.527C3.569,4.479,3.478,4.456,3.395,4.456 C3.163,4.456,3,4.636,3,4.938v11.45c0,0.306,0.224,0.669,0.498,0.806l4.671,2.335c0.12,0.06,0.234,0.088,0.337,0.088 c0.29,0,0.494-0.225,0.494-0.602V7.231C9,7.208,8.988,7.188,8.968,7.178z"}))},{name:"patreon",attributes:{service:"patreon"},title:"Patreon",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M20 8.40755C19.9969 6.10922 18.2543 4.22555 16.2097 3.54588C13.6708 2.70188 10.3222 2.82421 7.89775 3.99921C4.95932 5.42355 4.03626 8.54355 4.00186 11.6552C3.97363 14.2136 4.2222 20.9517 7.92225 20.9997C10.6715 21.0356 11.0809 17.3967 12.3529 15.6442C13.258 14.3974 14.4233 14.0452 15.8578 13.6806C18.3233 13.0537 20.0036 11.0551 20 8.40755Z"}))},{name:"pinterest",attributes:{service:"pinterest"},title:"Pinterest",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"}))},{name:"pocket",attributes:{service:"pocket"},title:"Pocket",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M21.927,4.194C21.667,3.48,20.982,3,20.222,3h-0.01h-1.721H3.839C3.092,3,2.411,3.47,2.145,4.17 C2.066,4.378,2.026,4.594,2.026,4.814v6.035l0.069,1.2c0.29,2.73,1.707,5.115,3.899,6.778c0.039,0.03,0.079,0.059,0.119,0.089 l0.025,0.018c1.175,0.859,2.491,1.441,3.91,1.727c0.655,0.132,1.325,0.2,1.991,0.2c0.615,0,1.232-0.057,1.839-0.17 c0.073-0.014,0.145-0.028,0.219-0.044c0.02-0.004,0.042-0.012,0.064-0.023c1.359-0.297,2.621-0.864,3.753-1.691l0.025-0.018 c0.04-0.029,0.08-0.058,0.119-0.089c2.192-1.664,3.609-4.049,3.898-6.778l0.069-1.2V4.814C22.026,4.605,22,4.398,21.927,4.194z M17.692,10.481l-4.704,4.512c-0.266,0.254-0.608,0.382-0.949,0.382c-0.342,0-0.684-0.128-0.949-0.382l-4.705-4.512 C5.838,9.957,5.82,9.089,6.344,8.542c0.524-0.547,1.392-0.565,1.939-0.04l3.756,3.601l3.755-3.601 c0.547-0.524,1.415-0.506,1.939,0.04C18.256,9.089,18.238,9.956,17.692,10.481z"}))},{name:"reddit",attributes:{service:"reddit"},title:"Reddit",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z"}))},{name:"skype",attributes:{service:"skype"},title:"Skype",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M10.113,2.699c0.033-0.006,0.067-0.013,0.1-0.02c0.033,0.017,0.066,0.033,0.098,0.051L10.113,2.699z M2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223z M21.275,13.771 c0.007-0.035,0.011-0.071,0.018-0.106c-0.018-0.031-0.033-0.064-0.052-0.095L21.275,13.771z M13.563,21.199 c0.032,0.019,0.065,0.035,0.096,0.053c0.036-0.006,0.071-0.011,0.105-0.017L13.563,21.199z M22,16.386 c0,1.494-0.581,2.898-1.637,3.953c-1.056,1.057-2.459,1.637-3.953,1.637c-0.967,0-1.914-0.251-2.75-0.725 c0.036-0.006,0.071-0.011,0.105-0.017l-0.202-0.035c0.032,0.019,0.065,0.035,0.096,0.053c-0.543,0.096-1.099,0.147-1.654,0.147 c-1.275,0-2.512-0.25-3.676-0.743c-1.125-0.474-2.135-1.156-3.002-2.023c-0.867-0.867-1.548-1.877-2.023-3.002 c-0.493-1.164-0.743-2.401-0.743-3.676c0-0.546,0.049-1.093,0.142-1.628c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103C2.244,9.5,2,8.566,2,7.615c0-1.493,0.582-2.898,1.637-3.953 c1.056-1.056,2.46-1.638,3.953-1.638c0.915,0,1.818,0.228,2.622,0.655c-0.033,0.007-0.067,0.013-0.1,0.02l0.199,0.031 c-0.032-0.018-0.066-0.034-0.098-0.051c0.002,0,0.003-0.001,0.004-0.001c0.586-0.112,1.187-0.169,1.788-0.169 c1.275,0,2.512,0.249,3.676,0.742c1.124,0.476,2.135,1.156,3.002,2.024c0.868,0.867,1.548,1.877,2.024,3.002 c0.493,1.164,0.743,2.401,0.743,3.676c0,0.575-0.054,1.15-0.157,1.712c-0.018-0.031-0.033-0.064-0.052-0.095l0.034,0.201 c0.007-0.035,0.011-0.071,0.018-0.106C21.754,14.494,22,15.432,22,16.386z M16.817,14.138c0-1.331-0.613-2.743-3.033-3.282 l-2.209-0.49c-0.84-0.192-1.807-0.444-1.807-1.237c0-0.794,0.679-1.348,1.903-1.348c2.468,0,2.243,1.696,3.468,1.696 c0.645,0,1.209-0.379,1.209-1.031c0-1.521-2.435-2.663-4.5-2.663c-2.242,0-4.63,0.952-4.63,3.488c0,1.221,0.436,2.521,2.839,3.123 l2.984,0.745c0.903,0.223,1.129,0.731,1.129,1.189c0,0.762-0.758,1.507-2.129,1.507c-2.679,0-2.307-2.062-3.743-2.062 c-0.645,0-1.113,0.444-1.113,1.078c0,1.236,1.501,2.886,4.856,2.886C15.236,17.737,16.817,16.199,16.817,14.138z"}))},{name:"snapchat",attributes:{service:"snapchat"},title:"Snapchat",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12.065,2a5.526,5.526,0,0,1,3.132.892A5.854,5.854,0,0,1,17.326,5.4a5.821,5.821,0,0,1,.351,2.33q0,.612-.117,2.487a.809.809,0,0,0,.365.091,1.93,1.93,0,0,0,.664-.176,1.93,1.93,0,0,1,.664-.176,1.3,1.3,0,0,1,.729.234.7.7,0,0,1,.351.6.839.839,0,0,1-.41.7,2.732,2.732,0,0,1-.9.41,3.192,3.192,0,0,0-.9.378.728.728,0,0,0-.41.618,1.575,1.575,0,0,0,.156.56,6.9,6.9,0,0,0,1.334,1.953,5.6,5.6,0,0,0,1.881,1.315,5.875,5.875,0,0,0,1.042.3.42.42,0,0,1,.365.456q0,.911-2.852,1.341a1.379,1.379,0,0,0-.143.507,1.8,1.8,0,0,1-.182.605.451.451,0,0,1-.429.241,5.878,5.878,0,0,1-.807-.085,5.917,5.917,0,0,0-.833-.085,4.217,4.217,0,0,0-.807.065,2.42,2.42,0,0,0-.82.293,6.682,6.682,0,0,0-.755.5q-.351.267-.755.527a3.886,3.886,0,0,1-.989.436A4.471,4.471,0,0,1,11.831,22a4.307,4.307,0,0,1-1.256-.176,3.784,3.784,0,0,1-.976-.436q-.4-.26-.749-.527a6.682,6.682,0,0,0-.755-.5,2.422,2.422,0,0,0-.807-.293,4.432,4.432,0,0,0-.82-.065,5.089,5.089,0,0,0-.853.1,5,5,0,0,1-.762.1.474.474,0,0,1-.456-.241,1.819,1.819,0,0,1-.182-.618,1.411,1.411,0,0,0-.143-.521q-2.852-.429-2.852-1.341a.42.42,0,0,1,.365-.456,5.793,5.793,0,0,0,1.042-.3,5.524,5.524,0,0,0,1.881-1.315,6.789,6.789,0,0,0,1.334-1.953A1.575,1.575,0,0,0,6,12.9a.728.728,0,0,0-.41-.618,3.323,3.323,0,0,0-.9-.384,2.912,2.912,0,0,1-.9-.41.814.814,0,0,1-.41-.684.71.71,0,0,1,.338-.593,1.208,1.208,0,0,1,.716-.241,1.976,1.976,0,0,1,.625.169,2.008,2.008,0,0,0,.69.169.919.919,0,0,0,.416-.091q-.117-1.849-.117-2.474A5.861,5.861,0,0,1,6.385,5.4,5.516,5.516,0,0,1,8.625,2.819,7.075,7.075,0,0,1,12.062,2Z"}))},{name:"soundcloud",attributes:{service:"soundcloud"},title:"SoundCloud",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M8.9,16.1L9,14L8.9,9.5c0-0.1,0-0.1-0.1-0.1c0,0-0.1-0.1-0.1-0.1c-0.1,0-0.1,0-0.1,0.1c0,0-0.1,0.1-0.1,0.1L8.3,14l0.1,2.1 c0,0.1,0,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1C8.8,16.3,8.9,16.3,8.9,16.1z M11.4,15.9l0.1-1.8L11.4,9c0-0.1,0-0.2-0.1-0.2 c0,0-0.1,0-0.1,0s-0.1,0-0.1,0c-0.1,0-0.1,0.1-0.1,0.2l0,0.1l-0.1,5c0,0,0,0.7,0.1,2v0c0,0.1,0,0.1,0.1,0.1c0.1,0.1,0.1,0.1,0.2,0.1 c0.1,0,0.1,0,0.2-0.1c0.1,0,0.1-0.1,0.1-0.2L11.4,15.9z M2.4,12.9L2.5,14l-0.2,1.1c0,0.1,0,0.1-0.1,0.1c0,0-0.1,0-0.1-0.1L2.1,14 l0.1-1.1C2.2,12.9,2.3,12.9,2.4,12.9C2.3,12.9,2.4,12.9,2.4,12.9z M3.1,12.2L3.3,14l-0.2,1.8c0,0.1,0,0.1-0.1,0.1 c-0.1,0-0.1,0-0.1-0.1L2.8,14L3,12.2C3,12.2,3,12.2,3.1,12.2C3.1,12.2,3.1,12.2,3.1,12.2z M3.9,11.9L4.1,14l-0.2,2.1 c0,0.1,0,0.1-0.1,0.1c-0.1,0-0.1,0-0.1-0.1L3.5,14l0.2-2.1c0-0.1,0-0.1,0.1-0.1C3.9,11.8,3.9,11.8,3.9,11.9z M4.7,11.9L4.9,14 l-0.2,2.1c0,0.1-0.1,0.1-0.1,0.1c-0.1,0-0.1,0-0.1-0.1L4.3,14l0.2-2.2c0-0.1,0-0.1,0.1-0.1C4.7,11.7,4.7,11.8,4.7,11.9z M5.6,12 l0.2,2l-0.2,2.1c0,0.1-0.1,0.1-0.1,0.1c0,0-0.1,0-0.1,0c0,0,0-0.1,0-0.1L5.1,14l0.2-2c0,0,0-0.1,0-0.1s0.1,0,0.1,0 C5.5,11.9,5.5,11.9,5.6,12L5.6,12z M6.4,10.7L6.6,14l-0.2,2.1c0,0,0,0.1,0,0.1c0,0-0.1,0-0.1,0c-0.1,0-0.1-0.1-0.2-0.2L5.9,14 l0.2-3.3c0-0.1,0.1-0.2,0.2-0.2c0,0,0.1,0,0.1,0C6.4,10.7,6.4,10.7,6.4,10.7z M7.2,10l0.2,4.1l-0.2,2.1c0,0,0,0.1,0,0.1 c0,0-0.1,0-0.1,0c-0.1,0-0.2-0.1-0.2-0.2l-0.1-2.1L6.8,10c0-0.1,0.1-0.2,0.2-0.2c0,0,0.1,0,0.1,0S7.2,9.9,7.2,10z M8,9.6L8.2,14 L8,16.1c0,0.1-0.1,0.2-0.2,0.2c-0.1,0-0.2-0.1-0.2-0.2L7.5,14l0.1-4.4c0-0.1,0-0.1,0.1-0.1c0,0,0.1-0.1,0.1-0.1c0.1,0,0.1,0,0.1,0.1 C8,9.6,8,9.6,8,9.6z M11.4,16.1L11.4,16.1L11.4,16.1z M9.7,9.6L9.8,14l-0.1,2.1c0,0.1,0,0.1-0.1,0.2s-0.1,0.1-0.2,0.1 c-0.1,0-0.1,0-0.1-0.1s-0.1-0.1-0.1-0.2L9.2,14l0.1-4.4c0-0.1,0-0.1,0.1-0.2s0.1-0.1,0.2-0.1c0.1,0,0.1,0,0.2,0.1S9.7,9.5,9.7,9.6 L9.7,9.6z M10.6,9.8l0.1,4.3l-0.1,2c0,0.1,0,0.1-0.1,0.2c0,0-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.2-0.1c0,0-0.1-0.1-0.1-0.2L10,14 l0.1-4.3c0-0.1,0-0.1,0.1-0.2c0,0,0.1-0.1,0.2-0.1c0.1,0,0.1,0,0.2,0.1S10.6,9.7,10.6,9.8z M12.4,14l-0.1,2c0,0.1,0,0.1-0.1,0.2 c-0.1,0.1-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.2-0.1c-0.1-0.1-0.1-0.1-0.1-0.2l-0.1-1l-0.1-1l0.1-5.5v0c0-0.1,0-0.2,0.1-0.2 c0.1,0,0.1-0.1,0.2-0.1c0,0,0.1,0,0.1,0c0.1,0,0.1,0.1,0.1,0.2L12.4,14z M22.1,13.9c0,0.7-0.2,1.3-0.7,1.7c-0.5,0.5-1.1,0.7-1.7,0.7 h-6.8c-0.1,0-0.1,0-0.2-0.1c-0.1-0.1-0.1-0.1-0.1-0.2V8.2c0-0.1,0.1-0.2,0.2-0.3c0.5-0.2,1-0.3,1.6-0.3c1.1,0,2.1,0.4,2.9,1.1 c0.8,0.8,1.3,1.7,1.4,2.8c0.3-0.1,0.6-0.2,1-0.2c0.7,0,1.3,0.2,1.7,0.7C21.8,12.6,22.1,13.2,22.1,13.9L22.1,13.9z"}))},{name:"spotify",attributes:{service:"spotify"},title:"Spotify",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12,2C6.477,2,2,6.477,2,12c0,5.523,4.477,10,10,10c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2 M16.586,16.424 c-0.18,0.295-0.563,0.387-0.857,0.207c-2.348-1.435-5.304-1.76-8.785-0.964c-0.335,0.077-0.67-0.133-0.746-0.469 c-0.077-0.335,0.132-0.67,0.469-0.746c3.809-0.871,7.077-0.496,9.713,1.115C16.673,15.746,16.766,16.13,16.586,16.424 M17.81,13.7 c-0.226,0.367-0.706,0.482-1.072,0.257c-2.687-1.652-6.785-2.131-9.965-1.166C6.36,12.917,5.925,12.684,5.8,12.273 C5.675,11.86,5.908,11.425,6.32,11.3c3.632-1.102,8.147-0.568,11.234,1.328C17.92,12.854,18.035,13.335,17.81,13.7 M17.915,10.865 c-3.223-1.914-8.54-2.09-11.618-1.156C5.804,9.859,5.281,9.58,5.131,9.086C4.982,8.591,5.26,8.069,5.755,7.919 c3.532-1.072,9.404-0.865,13.115,1.338c0.445,0.264,0.59,0.838,0.327,1.282C18.933,10.983,18.359,11.129,17.915,10.865"}))},{name:"telegram",attributes:{service:"telegram"},title:"Telegram",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 128 128",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M28.9700376,63.3244248 C47.6273373,55.1957357 60.0684594,49.8368063 66.2934036,47.2476366 C84.0668845,39.855031 87.7600616,38.5708563 90.1672227,38.528 C90.6966555,38.5191258 91.8804274,38.6503351 92.6472251,39.2725385 C93.294694,39.7979149 93.4728387,40.5076237 93.5580865,41.0057381 C93.6433345,41.5038525 93.7494885,42.63857 93.6651041,43.5252052 C92.7019529,53.6451182 88.5344133,78.2034783 86.4142057,89.5379542 C85.5170662,94.3339958 83.750571,95.9420841 82.0403991,96.0994568 C78.3237996,96.4414641 75.5015827,93.6432685 71.9018743,91.2836143 C66.2690414,87.5912212 63.0868492,85.2926952 57.6192095,81.6896017 C51.3004058,77.5256038 55.3966232,75.2369981 58.9976911,71.4967761 C59.9401076,70.5179421 76.3155302,55.6232293 76.6324771,54.2720454 C76.6721165,54.1030573 76.7089039,53.4731496 76.3346867,53.1405352 C75.9604695,52.8079208 75.4081573,52.921662 75.0095933,53.0121213 C74.444641,53.1403447 65.4461175,59.0880351 48.0140228,70.8551922 C45.4598218,72.6091037 43.1463059,73.4636682 41.0734751,73.4188859 C38.7883453,73.3695169 34.3926725,72.1268388 31.1249416,71.0646282 C27.1169366,69.7617838 23.931454,69.0729605 24.208838,66.8603276 C24.3533167,65.7078514 25.9403832,64.5292172 28.9700376,63.3244248 Z"}))},{name:"threads",attributes:{service:"threads"},title:"Threads",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M16.3 11.3c-.1 0-.2-.1-.2-.1-.1-2.6-1.5-4-3.9-4-1.4 0-2.6.6-3.3 1.7l1.3.9c.5-.8 1.4-1 2-1 .8 0 1.4.2 1.7.7.3.3.5.8.5 1.3-.7-.1-1.4-.2-2.2-.1-2.2.1-3.7 1.4-3.6 3.2 0 .9.5 1.7 1.3 2.2.7.4 1.5.6 2.4.6 1.2-.1 2.1-.5 2.7-1.3.5-.6.8-1.4.9-2.4.6.3 1 .8 1.2 1.3.4.9.4 2.4-.8 3.6-1.1 1.1-2.3 1.5-4.3 1.5-2.1 0-3.8-.7-4.8-2S5.7 14.3 5.7 12c0-2.3.5-4.1 1.5-5.4 1.1-1.3 2.7-2 4.8-2 2.2 0 3.8.7 4.9 2 .5.7.9 1.5 1.2 2.5l1.5-.4c-.3-1.2-.8-2.2-1.5-3.1-1.3-1.7-3.3-2.6-6-2.6-2.6 0-4.7.9-6 2.6C4.9 7.2 4.3 9.3 4.3 12s.6 4.8 1.9 6.4c1.4 1.7 3.4 2.6 6 2.6 2.3 0 4-.6 5.3-2 1.8-1.8 1.7-4 1.1-5.4-.4-.9-1.2-1.7-2.3-2.3zm-4 3.8c-1 .1-2-.4-2-1.3 0-.7.5-1.5 2.1-1.6h.5c.6 0 1.1.1 1.6.2-.2 2.3-1.3 2.7-2.2 2.7z"}))},{name:"tiktok",attributes:{service:"tiktok"},title:"TikTok",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 32 32",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M16.708 0.027c1.745-0.027 3.48-0.011 5.213-0.027 0.105 2.041 0.839 4.12 2.333 5.563 1.491 1.479 3.6 2.156 5.652 2.385v5.369c-1.923-0.063-3.855-0.463-5.6-1.291-0.76-0.344-1.468-0.787-2.161-1.24-0.009 3.896 0.016 7.787-0.025 11.667-0.104 1.864-0.719 3.719-1.803 5.255-1.744 2.557-4.771 4.224-7.88 4.276-1.907 0.109-3.812-0.411-5.437-1.369-2.693-1.588-4.588-4.495-4.864-7.615-0.032-0.667-0.043-1.333-0.016-1.984 0.24-2.537 1.495-4.964 3.443-6.615 2.208-1.923 5.301-2.839 8.197-2.297 0.027 1.975-0.052 3.948-0.052 5.923-1.323-0.428-2.869-0.308-4.025 0.495-0.844 0.547-1.485 1.385-1.819 2.333-0.276 0.676-0.197 1.427-0.181 2.145 0.317 2.188 2.421 4.027 4.667 3.828 1.489-0.016 2.916-0.88 3.692-2.145 0.251-0.443 0.532-0.896 0.547-1.417 0.131-2.385 0.079-4.76 0.095-7.145 0.011-5.375-0.016-10.735 0.025-16.093z"}))},{name:"tumblr",attributes:{service:"tumblr"},title:"Tumblr",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M17.04 21.28h-3.28c-2.84 0-4.94-1.37-4.94-5.02v-5.67H6.08V7.5c2.93-.73 4.11-3.3 4.3-5.48h3.01v4.93h3.47v3.65H13.4v4.93c0 1.47.73 2.01 1.92 2.01h1.73v3.75z"}))},{name:"twitch",attributes:{service:"twitch"},title:"Twitch",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M16.499,8.089h-1.636v4.91h1.636V8.089z M12,8.089h-1.637v4.91H12V8.089z M4.228,3.178L3,6.451v13.092h4.499V22h2.456 l2.454-2.456h3.681L21,14.636V3.178H4.228z M19.364,13.816l-2.864,2.865H12l-2.453,2.453V16.68H5.863V4.814h13.501V13.816z"}))},{name:"twitter",attributes:{service:"twitter"},title:"Twitter",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M22.23,5.924c-0.736,0.326-1.527,0.547-2.357,0.646c0.847-0.508,1.498-1.312,1.804-2.27 c-0.793,0.47-1.671,0.812-2.606,0.996C18.324,4.498,17.257,4,16.077,4c-2.266,0-4.103,1.837-4.103,4.103 c0,0.322,0.036,0.635,0.106,0.935C8.67,8.867,5.647,7.234,3.623,4.751C3.27,5.357,3.067,6.062,3.067,6.814 c0,1.424,0.724,2.679,1.825,3.415c-0.673-0.021-1.305-0.206-1.859-0.513c0,0.017,0,0.034,0,0.052c0,1.988,1.414,3.647,3.292,4.023 c-0.344,0.094-0.707,0.144-1.081,0.144c-0.264,0-0.521-0.026-0.772-0.074c0.522,1.63,2.038,2.816,3.833,2.85 c-1.404,1.1-3.174,1.756-5.096,1.756c-0.331,0-0.658-0.019-0.979-0.057c1.816,1.164,3.973,1.843,6.29,1.843 c7.547,0,11.675-6.252,11.675-11.675c0-0.178-0.004-0.355-0.012-0.531C20.985,7.47,21.68,6.747,22.23,5.924z"}))},{name:"vimeo",attributes:{service:"vimeo"},title:"Vimeo",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M22.396,7.164c-0.093,2.026-1.507,4.799-4.245,8.32C15.322,19.161,12.928,21,10.97,21c-1.214,0-2.24-1.119-3.079-3.359 c-0.56-2.053-1.119-4.106-1.68-6.159C5.588,9.243,4.921,8.122,4.206,8.122c-0.156,0-0.701,0.328-1.634,0.98L1.594,7.841 c1.027-0.902,2.04-1.805,3.037-2.708C6.001,3.95,7.03,3.327,7.715,3.264c1.619-0.156,2.616,0.951,2.99,3.321 c0.404,2.557,0.685,4.147,0.841,4.769c0.467,2.121,0.981,3.181,1.542,3.181c0.435,0,1.09-0.688,1.963-2.065 c0.871-1.376,1.338-2.422,1.401-3.142c0.125-1.187-0.343-1.782-1.401-1.782c-0.498,0-1.012,0.115-1.541,0.341 c1.023-3.35,2.977-4.977,5.862-4.884C21.511,3.066,22.52,4.453,22.396,7.164z"}))},{name:"vk",attributes:{service:"vk"},title:"VK",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z"}))},{name:"whatsapp",attributes:{service:"whatsapp"},title:"WhatsApp",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M 12.011719 2 C 6.5057187 2 2.0234844 6.478375 2.0214844 11.984375 C 2.0204844 13.744375 2.4814687 15.462563 3.3554688 16.976562 L 2 22 L 7.2324219 20.763672 C 8.6914219 21.559672 10.333859 21.977516 12.005859 21.978516 L 12.009766 21.978516 C 17.514766 21.978516 21.995047 17.499141 21.998047 11.994141 C 22.000047 9.3251406 20.962172 6.8157344 19.076172 4.9277344 C 17.190172 3.0407344 14.683719 2.001 12.011719 2 z M 12.009766 4 C 14.145766 4.001 16.153109 4.8337969 17.662109 6.3417969 C 19.171109 7.8517969 20.000047 9.8581875 19.998047 11.992188 C 19.996047 16.396187 16.413812 19.978516 12.007812 19.978516 C 10.674812 19.977516 9.3544062 19.642812 8.1914062 19.007812 L 7.5175781 18.640625 L 6.7734375 18.816406 L 4.8046875 19.28125 L 5.2851562 17.496094 L 5.5019531 16.695312 L 5.0878906 15.976562 C 4.3898906 14.768562 4.0204844 13.387375 4.0214844 11.984375 C 4.0234844 7.582375 7.6067656 4 12.009766 4 z M 8.4765625 7.375 C 8.3095625 7.375 8.0395469 7.4375 7.8105469 7.6875 C 7.5815469 7.9365 6.9355469 8.5395781 6.9355469 9.7675781 C 6.9355469 10.995578 7.8300781 12.182609 7.9550781 12.349609 C 8.0790781 12.515609 9.68175 15.115234 12.21875 16.115234 C 14.32675 16.946234 14.754891 16.782234 15.212891 16.740234 C 15.670891 16.699234 16.690438 16.137687 16.898438 15.554688 C 17.106437 14.971687 17.106922 14.470187 17.044922 14.367188 C 16.982922 14.263188 16.816406 14.201172 16.566406 14.076172 C 16.317406 13.951172 15.090328 13.348625 14.861328 13.265625 C 14.632328 13.182625 14.464828 13.140625 14.298828 13.390625 C 14.132828 13.640625 13.655766 14.201187 13.509766 14.367188 C 13.363766 14.534188 13.21875 14.556641 12.96875 14.431641 C 12.71875 14.305641 11.914938 14.041406 10.960938 13.191406 C 10.218937 12.530406 9.7182656 11.714844 9.5722656 11.464844 C 9.4272656 11.215844 9.5585938 11.079078 9.6835938 10.955078 C 9.7955938 10.843078 9.9316406 10.663578 10.056641 10.517578 C 10.180641 10.371578 10.223641 10.267562 10.306641 10.101562 C 10.389641 9.9355625 10.347156 9.7890625 10.285156 9.6640625 C 10.223156 9.5390625 9.737625 8.3065 9.515625 7.8125 C 9.328625 7.3975 9.131125 7.3878594 8.953125 7.3808594 C 8.808125 7.3748594 8.6425625 7.375 8.4765625 7.375 z"}))},{name:"x",attributes:{service:"x"},keywords:["twitter"],title:"X",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z"}))},{name:"yelp",attributes:{service:"yelp"},title:"Yelp",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12.271,16.718v1.417q-.011,3.257-.067,3.4a.707.707,0,0,1-.569.446,4.637,4.637,0,0,1-2.024-.424A4.609,4.609,0,0,1,7.8,20.565a.844.844,0,0,1-.19-.4.692.692,0,0,1,.044-.29,3.181,3.181,0,0,1,.379-.524q.335-.412,2.019-2.409.011,0,.669-.781a.757.757,0,0,1,.44-.274.965.965,0,0,1,.552.039.945.945,0,0,1,.418.324.732.732,0,0,1,.139.468Zm-1.662-2.8a.783.783,0,0,1-.58.781l-1.339.435q-3.067.981-3.257.981a.711.711,0,0,1-.6-.4,2.636,2.636,0,0,1-.19-.836,9.134,9.134,0,0,1,.011-1.857,3.559,3.559,0,0,1,.335-1.389.659.659,0,0,1,.625-.357,22.629,22.629,0,0,1,2.253.859q.781.324,1.283.524l.937.379a.771.771,0,0,1,.4.34A.982.982,0,0,1,10.609,13.917Zm9.213,3.313a4.467,4.467,0,0,1-1.021,1.8,4.559,4.559,0,0,1-1.512,1.417.671.671,0,0,1-.7-.078q-.156-.112-2.052-3.2l-.524-.859a.761.761,0,0,1-.128-.513.957.957,0,0,1,.217-.513.774.774,0,0,1,.926-.29q.011.011,1.327.446,2.264.736,2.7.887a2.082,2.082,0,0,1,.524.229.673.673,0,0,1,.245.68Zm-7.5-7.049q.056,1.137-.6,1.361-.647.19-1.272-.792L6.237,4.08a.7.7,0,0,1,.212-.691,5.788,5.788,0,0,1,2.314-1,5.928,5.928,0,0,1,2.5-.352.681.681,0,0,1,.547.5q.034.2.245,3.407T12.327,10.181Zm7.384,1.2a.679.679,0,0,1-.29.658q-.167.112-3.67.959-.747.167-1.015.257l.011-.022a.769.769,0,0,1-.513-.044.914.914,0,0,1-.413-.357.786.786,0,0,1,0-.971q.011-.011.836-1.137,1.394-1.908,1.673-2.275a2.423,2.423,0,0,1,.379-.435A.7.7,0,0,1,17.435,8a4.482,4.482,0,0,1,1.372,1.489,4.81,4.81,0,0,1,.9,1.868v.034Z"}))},{name:"youtube",attributes:{service:"youtube"},title:"YouTube",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"}))}];jw.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.service===t.service)}));const Ww=jw,Zw=({url:e,setAttributes:t,setPopover:n,popoverAnchor:a,clientId:o})=>{const{removeBlock:r}=(0,gt.useDispatch)(nt.store);return(0,Ke.createElement)(nt.URLPopover,{anchor:a,onClose:()=>n(!1)},(0,Ke.createElement)("form",{className:"block-editor-url-popover__link-editor",onSubmit:e=>{e.preventDefault(),n(!1)}},(0,Ke.createElement)("div",{className:"block-editor-url-input"},(0,Ke.createElement)(nt.URLInput,{__nextHasNoMarginBottom:!0,value:e,onChange:e=>t({url:e}),placeholder:(0,tt.__)("Enter address"),disableSuggestions:!0,onKeyDown:t=>{e||t.defaultPrevented||![fn.BACKSPACE,fn.DELETE].includes(t.keyCode)||r(o)}})),(0,Ke.createElement)(et.Button,{icon:Uw,label:(0,tt.__)("Apply"),type:"submit"})))},Qw=({attributes:e,context:t,isSelected:n,setAttributes:a,clientId:o})=>{const{url:r,service:l,label:i,rel:s}=e,{showLabels:c,iconColor:m,iconColorValue:u,iconBackgroundColor:p,iconBackgroundColorValue:d}=t,[g,h]=(0,_t.useState)(!1),b=ut()("wp-social-link","wp-social-link-"+l,{"wp-social-link__is-incomplete":!r,[`has-${m}-color`]:m,[`has-${p}-background-color`]:p}),[_,y]=(0,_t.useState)(null),v=(e=>{const t=Ww.find((t=>t.name===e));return t?t.icon:qw})(l),f=(e=>{const t=Ww.find((t=>t.name===e));return t?t.title:(0,tt.__)("Social Icon")})(l),k=null!=i?i:f,x=(0,nt.useBlockProps)({className:b,style:{color:u,backgroundColor:d}});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.sprintf)((0,tt.__)("%s label"),f),initialOpen:!1},(0,Ke.createElement)(et.PanelRow,null,(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link label"),help:(0,tt.__)("Briefly describe the link to help screen reader users."),value:i||"",onChange:e=>a({label:e})})))),(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link rel"),value:s||"",onChange:e=>a({rel:e})})),(0,Ke.createElement)("li",{...x},(0,Ke.createElement)(et.Button,{className:"wp-block-social-link-anchor",ref:y,onClick:()=>h(!0)},(0,Ke.createElement)(v,null),(0,Ke.createElement)("span",{className:ut()("wp-block-social-link-label",{"screen-reader-text":!c})},k),n&&g&&(0,Ke.createElement)(Zw,{url:r,setAttributes:a,setPopover:h,popoverAnchor:_,clientId:o}))))},Kw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/social-link",title:"Social Icon",category:"widgets",parent:["core/social-links"],description:"Display an icon linking to a social media profile or site.",textdomain:"default",attributes:{url:{type:"string"},service:{type:"string"},label:{type:"string"},rel:{type:"string"}},usesContext:["openInNewTab","showLabels","iconColor","iconColorValue","iconBackgroundColor","iconBackgroundColorValue"],supports:{reusable:!1,html:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-social-link-editor"},{name:Yw}=Kw,Jw={icon:Gw,edit:Qw,variations:Ww},Xw=()=>Xe({name:Yw,metadata:Kw,settings:Jw}),eE=[{attributes:{iconColor:{type:"string"},customIconColor:{type:"string"},iconColorValue:{type:"string"},iconBackgroundColor:{type:"string"},customIconBackgroundColor:{type:"string"},iconBackgroundColorValue:{type:"string"},openInNewTab:{type:"boolean",default:!1},size:{type:"string"}},providesContext:{openInNewTab:"openInNewTab"},supports:{align:["left","center","right"],anchor:!0},migrate:e=>{if(e.layout)return e;const{className:t}=e,n="items-justified-",a=new RegExp(`\\b${n}[^ ]*[ ]?\\b`,"g"),o={...e,className:t?.replace(a,"").trim()},r=t?.match(a)?.[0]?.trim();return r&&Object.assign(o,{layout:{type:"flex",justifyContent:r.slice(16)}}),o},save:e=>{const{attributes:{iconBackgroundColorValue:t,iconColorValue:n,itemsJustification:a,size:o}}=e,r=ut()(o,{"has-icon-color":n,"has-icon-background-color":t,[`items-justified-${a}`]:a}),l={"--wp--social-links--icon-color":n,"--wp--social-links--icon-background-color":t};return(0,Ke.createElement)("ul",{...nt.useBlockProps.save({className:r,style:l})},(0,Ke.createElement)(nt.InnerBlocks.Content,null))}}],tE=eE,nE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),aE=[{name:(0,tt.__)("Small"),value:"has-small-icon-size"},{name:(0,tt.__)("Normal"),value:"has-normal-icon-size"},{name:(0,tt.__)("Large"),value:"has-large-icon-size"},{name:(0,tt.__)("Huge"),value:"has-huge-icon-size"}];const oE=(0,nt.withColors)({iconColor:"icon-color",iconBackgroundColor:"icon-background-color"})((function(e){var t;const{clientId:n,attributes:a,iconBackgroundColor:o,iconColor:r,isSelected:l,setAttributes:i,setIconBackgroundColor:s,setIconColor:c}=e,{iconBackgroundColorValue:m,customIconBackgroundColor:u,iconColorValue:p,openInNewTab:d,showLabels:g,size:h}=a,b=a.className?.includes("is-style-logos-only"),_=(0,_t.useRef)({});(0,_t.useEffect)((()=>{b?(_.current={iconBackgroundColor:o,iconBackgroundColorValue:m,customIconBackgroundColor:u},i({iconBackgroundColor:void 0,customIconBackgroundColor:void 0,iconBackgroundColorValue:void 0})):i({..._.current})}),[b]);const y=(0,Ke.createElement)("li",{className:"wp-block-social-links__social-placeholder"},(0,Ke.createElement)("div",{className:"wp-block-social-links__social-placeholder-icons"},(0,Ke.createElement)("div",{className:"wp-social-link wp-social-link-twitter"}),(0,Ke.createElement)("div",{className:"wp-social-link wp-social-link-facebook"}),(0,Ke.createElement)("div",{className:"wp-social-link wp-social-link-instagram"}))),v=(0,Ke.createElement)("li",{className:"wp-block-social-links__social-prompt"},(0,tt.__)("Click plus to add")),f=ut()(h,{"has-visible-labels":g,"has-icon-color":r.color||p,"has-icon-background-color":o.color||m}),k=(0,nt.useBlockProps)({className:f}),x=(0,nt.useInnerBlocksProps)(k,{placeholder:l?v:y,templateLock:!1,orientation:null!==(t=a.layout?.orientation)&&void 0!==t?t:"horizontal",__experimentalAppenderTagName:"li"}),w=[{value:r.color||p,onChange:e=>{c(e),i({iconColorValue:e})},label:(0,tt.__)("Icon color"),resetAllFilter:()=>{c(void 0),i({iconColorValue:void 0})}}];b||w.push({value:o.color||m,onChange:e=>{s(e),i({iconBackgroundColorValue:e})},label:(0,tt.__)("Icon background"),resetAllFilter:()=>{s(void 0),i({iconBackgroundColorValue:void 0})}});const E=(0,nt.__experimentalUseMultipleOriginColorsAndGradients)();return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(et.ToolbarDropdownMenu,{label:(0,tt.__)("Size"),text:(0,tt.__)("Size"),icon:null,popoverProps:{position:"bottom right"}},(({onClose:e})=>(0,Ke.createElement)(et.MenuGroup,null,aE.map((t=>(0,Ke.createElement)(et.MenuItem,{icon:(h===t.value||!h&&"has-normal-icon-size"===t.value)&&nE,isSelected:h===t.value,key:t.value,onClick:()=>{i({size:t.value})},onClose:e,role:"menuitemradio"},t.name))))))),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open links in new tab"),checked:d,onChange:()=>i({openInNewTab:!d})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show labels"),checked:g,onChange:()=>i({showLabels:!g})}))),E.hasColorsOrGradients&&(0,Ke.createElement)(nt.InspectorControls,{group:"color"},w.map((({onChange:e,label:t,value:a,resetAllFilter:o})=>(0,Ke.createElement)(nt.__experimentalColorGradientSettingsDropdown,{key:`social-links-color-${t}`,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:a,label:t,onColorChange:e,isShownByDefault:!0,resetAllFilter:o,enableAlpha:!0}],panelId:n,...E}))),!b&&(0,Ke.createElement)(nt.ContrastChecker,{textColor:p,backgroundColor:m,isLargeText:!1})),(0,Ke.createElement)("ul",{...x}))}));const rE={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/social-links",title:"Social Icons",category:"widgets",allowedBlocks:["core/social-link"],description:"Display icons linking to your social media profiles or sites.",keywords:["links"],textdomain:"default",attributes:{iconColor:{type:"string"},customIconColor:{type:"string"},iconColorValue:{type:"string"},iconBackgroundColor:{type:"string"},customIconBackgroundColor:{type:"string"},iconBackgroundColorValue:{type:"string"},openInNewTab:{type:"boolean",default:!1},showLabels:{type:"boolean",default:!1},size:{type:"string"}},providesContext:{openInNewTab:"openInNewTab",showLabels:"showLabels",iconColor:"iconColor",iconColorValue:"iconColorValue",iconBackgroundColor:"iconBackgroundColor",iconBackgroundColorValue:"iconBackgroundColorValue"},supports:{align:["left","center","right"],anchor:!0,__experimentalExposeControlsToChildren:!0,layout:{allowSwitching:!1,allowInheriting:!1,allowVerticalAlignment:!1,default:{type:"flex"}},color:{enableContrastChecker:!1,background:!0,gradients:!0,text:!1,__experimentalDefaultControls:{background:!1}},spacing:{blockGap:["horizontal","vertical"],margin:!0,padding:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0,margin:!0,padding:!1}},interactivity:{clientNavigation:!0}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"logos-only",label:"Logos Only"},{name:"pill-shape",label:"Pill Shape"}],editorStyle:"wp-block-social-links-editor",style:"wp-block-social-links"},{name:lE}=rE,iE={example:{innerBlocks:[{name:"core/social-link",attributes:{service:"wordpress",url:"https://wordpress.org"}},{name:"core/social-link",attributes:{service:"facebook",url:"https://www.facebook.com/WordPress/"}},{name:"core/social-link",attributes:{service:"twitter",url:"https://twitter.com/WordPress"}}]},icon:Gw,edit:oE,save:function(e){const{attributes:{iconBackgroundColorValue:t,iconColorValue:n,showLabels:a,size:o}}=e,r=ut()(o,{"has-visible-labels":a,"has-icon-color":n,"has-icon-background-color":t}),l=nt.useBlockProps.save({className:r}),i=nt.useInnerBlocksProps.save(l);return(0,Ke.createElement)("ul",{...i})},deprecated:tE},sE=()=>Xe({name:lE,metadata:rE,settings:iE}),cE=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M7 18h4.5v1.5h-7v-7H6V17L17 6h-4.5V4.5h7v7H18V7L7 18Z"})),mE=[{attributes:{height:{type:"number",default:100},width:{type:"number"}},migrate(e){const{height:t,width:n}=e;return{...e,width:void 0!==n?`${n}px`:void 0,height:void 0!==t?`${t}px`:void 0}},save:({attributes:e})=>(0,Ke.createElement)("div",{...nt.useBlockProps.save({style:{height:e.height,width:e.width},"aria-hidden":!0})})}],uE=mE,pE=0;function dE({label:e,onChange:t,isResizing:n,value:a=""}){const o=(0,jt.useInstanceId)(et.__experimentalUnitControl,"block-spacer-height-input"),[r,l]=(0,nt.useSettings)("spacing.spacingSizes","spacing.units"),i=l?l.filter((e=>"%"!==e)):["px","em","rem","vw","vh"],s=(0,et.__experimentalUseCustomUnits)({availableUnits:i,defaultValues:{px:100,em:10,rem:10,vw:10,vh:25}}),c=e=>{t(e.all)},[m,u]=(0,et.__experimentalParseQuantityAndUnitFromRawValue)(a),p=(0,nt.isValueSpacingPreset)(a)?a:[m,n?"px":u].join("");return(0,Ke.createElement)(Ke.Fragment,null,(!r||0===r?.length)&&(0,Ke.createElement)(et.BaseControl,{label:e,id:o},(0,Ke.createElement)(et.__experimentalUnitControl,{id:o,isResetValueOnUnitChange:!0,min:pE,onChange:c,style:{maxWidth:80},value:p,units:s})),r?.length>0&&(0,Ke.createElement)(Ye.View,{className:"tools-panel-item-spacing"},(0,Ke.createElement)(nt.__experimentalSpacingSizesControl,{values:{all:p},onChange:c,label:e,sides:["all"],units:s,allowReset:!1,splitOnAxis:!1,showSideInLabel:!1})))}function gE({setAttributes:e,orientation:t,height:n,width:a,isResizing:o}){return(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},"horizontal"===t&&(0,Ke.createElement)(dE,{label:(0,tt.__)("Width"),value:a,onChange:t=>e({width:t}),isResizing:o}),"horizontal"!==t&&(0,Ke.createElement)(dE,{label:(0,tt.__)("Height"),value:n,onChange:t=>e({height:t}),isResizing:o})))}const hE=({orientation:e,onResizeStart:t,onResize:n,onResizeStop:a,isSelected:o,isResizing:r,setIsResizing:l,...i})=>{const s=t=>"horizontal"===e?t.clientWidth:t.clientHeight,c=e=>`${s(e)}px`;return(0,Ke.createElement)(et.ResizableBox,{className:ut()("block-library-spacer__resize-container",{"resize-horizontal":"horizontal"===e,"is-resizing":r,"is-selected":o}),onResizeStart:(e,a,o)=>{const r=c(o);t(r),n(r)},onResize:(e,t,a)=>{n(c(a)),r||l(!0)},onResizeStop:(e,t,n)=>{const o=s(n);a(`${o}px`),l(!1)},__experimentalShowTooltip:!0,__experimentalTooltipProps:{axis:"horizontal"===e?"x":"y",position:"corner",isVisible:r},showHandle:o,...i})},bE=({attributes:e,isSelected:t,setAttributes:n,toggleSelection:a,context:o,__unstableParentLayout:r,className:l})=>{const i=(0,gt.useSelect)((e=>{const t=e(nt.store).getSettings();return t?.disableCustomSpacingSizes})),{orientation:s}=o,{orientation:c,type:m,default:{type:u}={}}=r||{},p="flex"===m||!m&&"flex"===u,d=!c&&p?"horizontal":c||s,{height:g,width:h,style:b={}}=e,{layout:_={}}=b,{selfStretch:y,flexSize:v}=_,[f]=(0,nt.useSettings)("spacing.spacingSizes"),[k,x]=(0,_t.useState)(!1),[w,E]=(0,_t.useState)(null),[C,S]=(0,_t.useState)(null),B=()=>a(!1),N=()=>a(!0),T=e=>{N(),p&&n({style:{...b,layout:{..._,flexSize:e,selfStretch:"fixed"}}}),n({height:e}),E(null)},I=e=>{N(),p&&n({style:{...b,layout:{..._,flexSize:e,selfStretch:"fixed"}}}),n({width:e}),S(null)},P="horizontal"===d?C||v:w||v,M={height:"horizontal"===d?24:(()=>{if(!p)return w||(0,nt.getSpacingPresetCssVar)(g)||void 0})(),width:"horizontal"===d?(()=>{if(!p)return C||(0,nt.getSpacingPresetCssVar)(h)||void 0})():void 0,minWidth:"vertical"===d&&p?48:void 0,flexBasis:p?P:void 0,flexGrow:p&&k?0:void 0};return(0,_t.useEffect)((()=>{if(p&&"fill"!==y&&"fit"!==y&&!v)if("horizontal"===d){const e=(0,nt.getCustomValueFromPreset)(h,f)||(0,nt.getCustomValueFromPreset)(g,f)||"100px";n({width:"0px",style:{...b,layout:{..._,flexSize:e,selfStretch:"fixed"}}})}else{const e=(0,nt.getCustomValueFromPreset)(g,f)||(0,nt.getCustomValueFromPreset)(h,f)||"100px";n({height:"0px",style:{...b,layout:{..._,flexSize:e,selfStretch:"fixed"}}})}else!p||"fill"!==y&&"fit"!==y?p||!y&&!v||(n("horizontal"===d?{width:v}:{height:v}),n({style:{...b,layout:{..._,flexSize:void 0,selfStretch:void 0}}})):n("horizontal"===d?{width:void 0}:{height:void 0})}),[b,v,g,d,p,_,y,n,f,h]),(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Ye.View,{...(0,nt.useBlockProps)({style:M,className:ut()(l,{"custom-sizes-disabled":i})})},"horizontal"===(z=d)?(0,Ke.createElement)(hE,{minWidth:pE,enable:{top:!1,right:!0,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},orientation:z,onResizeStart:B,onResize:S,onResizeStop:I,isSelected:t,isResizing:k,setIsResizing:x}):(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(hE,{minHeight:pE,enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},orientation:z,onResizeStart:B,onResize:E,onResizeStop:T,isSelected:t,isResizing:k,setIsResizing:x}))),!p&&(0,Ke.createElement)(gE,{setAttributes:n,height:w||g,width:C||h,orientation:d,isResizing:k}));var z};const _E={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/spacer",title:"Spacer",category:"design",description:"Add white space between blocks and customize its height.",textdomain:"default",attributes:{height:{type:"string",default:"100px"},width:{type:"string"}},usesContext:["orientation"],supports:{anchor:!0,spacing:{margin:["top","bottom"],__experimentalDefaultControls:{margin:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-spacer-editor",style:"wp-block-spacer"},{name:yE}=_E,vE={icon:cE,edit:bE,save:function({attributes:e}){const{height:t,width:n,style:a}=e,{layout:{selfStretch:o}={}}=a||{},r="fill"===o||"fit"===o?void 0:t;return(0,Ke.createElement)("div",{...nt.useBlockProps.save({style:{height:(0,nt.getSpacingPresetCssVar)(r),width:(0,nt.getSpacingPresetCssVar)(n)},"aria-hidden":!0})})},deprecated:uE},fE=()=>Xe({name:yE,metadata:_E,settings:vE}),kE=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.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-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})),xE={"subtle-light-gray":"#f3f4f5","subtle-pale-green":"#e9fbe5","subtle-pale-blue":"#e7f5fe","subtle-pale-pink":"#fcf0ef"},wE={attributes:{hasFixedLayout:{type:"boolean",default:!1},caption:{type:"string",source:"html",selector:"figcaption",default:""},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}}},supports:{anchor:!0,align:!0,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{__experimentalSkipSerialization:!0,color:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}},__experimentalSelector:".wp-block-table > table"},save({attributes:e}){const{hasFixedLayout:t,head:n,body:a,foot:o,caption:r}=e;if(!n.length&&!a.length&&!o.length)return null;const l=(0,nt.__experimentalGetColorClassesAndStyles)(e),i=(0,nt.__experimentalGetBorderClassesAndStyles)(e),s=ut()(l.className,i.className,{"has-fixed-layout":t}),c=!nt.RichText.isEmpty(r),m=({type:e,rows:t})=>{if(!t.length)return null;const n=`t${e}`;return(0,Ke.createElement)(n,null,t.map((({cells:e},t)=>(0,Ke.createElement)("tr",{key:t},e.map((({content:e,tag:t,scope:n,align:a},o)=>{const r=ut()({[`has-text-align-${a}`]:a});return(0,Ke.createElement)(nt.RichText.Content,{className:r||void 0,"data-align":a,tagName:t,value:e,key:o,scope:"th"===t?n:void 0})}))))))};return(0,Ke.createElement)("figure",{...nt.useBlockProps.save()},(0,Ke.createElement)("table",{className:""===s?void 0:s,style:{...l.style,...i.style}},(0,Ke.createElement)(m,{type:"head",rows:n}),(0,Ke.createElement)(m,{type:"body",rows:a}),(0,Ke.createElement)(m,{type:"foot",rows:o})),c&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:r}))}},EE={attributes:{hasFixedLayout:{type:"boolean",default:!1},backgroundColor:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption",default:""},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}}},supports:{anchor:!0,align:!0,__experimentalSelector:".wp-block-table > table"},save:({attributes:e})=>{const{hasFixedLayout:t,head:n,body:a,foot:o,backgroundColor:r,caption:l}=e;if(!n.length&&!a.length&&!o.length)return null;const i=(0,nt.getColorClassName)("background-color",r),s=ut()(i,{"has-fixed-layout":t,"has-background":!!i}),c=!nt.RichText.isEmpty(l),m=({type:e,rows:t})=>{if(!t.length)return null;const n=`t${e}`;return(0,Ke.createElement)(n,null,t.map((({cells:e},t)=>(0,Ke.createElement)("tr",{key:t},e.map((({content:e,tag:t,scope:n,align:a},o)=>{const r=ut()({[`has-text-align-${a}`]:a});return(0,Ke.createElement)(nt.RichText.Content,{className:r||void 0,"data-align":a,tagName:t,value:e,key:o,scope:"th"===t?n:void 0})}))))))};return(0,Ke.createElement)("figure",{...nt.useBlockProps.save()},(0,Ke.createElement)("table",{className:""===s?void 0:s},(0,Ke.createElement)(m,{type:"head",rows:n}),(0,Ke.createElement)(m,{type:"body",rows:a}),(0,Ke.createElement)(m,{type:"foot",rows:o})),c&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:l}))},isEligible:e=>e.backgroundColor&&e.backgroundColor in xE&&!e.style,migrate:e=>({...e,backgroundColor:void 0,style:{color:{background:xE[e.backgroundColor]}}})},CE={attributes:{hasFixedLayout:{type:"boolean",default:!1},backgroundColor:{type:"string"},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"}}}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"}}}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"}}}}}},supports:{align:!0},save({attributes:e}){const{hasFixedLayout:t,head:n,body:a,foot:o,backgroundColor:r}=e;if(!n.length&&!a.length&&!o.length)return null;const l=(0,nt.getColorClassName)("background-color",r),i=ut()(l,{"has-fixed-layout":t,"has-background":!!l}),s=({type:e,rows:t})=>{if(!t.length)return null;const n=`t${e}`;return(0,Ke.createElement)(n,null,t.map((({cells:e},t)=>(0,Ke.createElement)("tr",{key:t},e.map((({content:e,tag:t,scope:n},a)=>(0,Ke.createElement)(nt.RichText.Content,{tagName:t,value:e,key:a,scope:"th"===t?n:void 0})))))))};return(0,Ke.createElement)("table",{className:i},(0,Ke.createElement)(s,{type:"head",rows:n}),(0,Ke.createElement)(s,{type:"body",rows:a}),(0,Ke.createElement)(s,{type:"foot",rows:o}))}},SE=[wE,EE,CE],BE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})),NE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})),TE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})),IE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M6.656 6.464h2.88v2.88h1.408v-2.88h2.88V5.12h-2.88V2.24H9.536v2.88h-2.88zM0 17.92V0h20.48v17.92H0zm7.68-2.56h5.12v-3.84H7.68v3.84zm-6.4 0H6.4v-3.84H1.28v3.84zM19.2 1.28H1.28v9.024H19.2V1.28zm0 10.24h-5.12v3.84h5.12v-3.84zM6.656 6.464h2.88v2.88h1.408v-2.88h2.88V5.12h-2.88V2.24H9.536v2.88h-2.88zM0 17.92V0h20.48v17.92H0zm7.68-2.56h5.12v-3.84H7.68v3.84zm-6.4 0H6.4v-3.84H1.28v3.84zM19.2 1.28H1.28v9.024H19.2V1.28zm0 10.24h-5.12v3.84h5.12v-3.84z"})),PE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M13.824 10.176h-2.88v-2.88H9.536v2.88h-2.88v1.344h2.88v2.88h1.408v-2.88h2.88zM0 17.92V0h20.48v17.92H0zM6.4 1.28H1.28v3.84H6.4V1.28zm6.4 0H7.68v3.84h5.12V1.28zm6.4 0h-5.12v3.84h5.12V1.28zm0 5.056H1.28v9.024H19.2V6.336z"})),ME=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M17.728 11.456L14.592 8.32l3.2-3.2-1.536-1.536-3.2 3.2L9.92 3.648 8.384 5.12l3.2 3.2-3.264 3.264 1.536 1.536 3.264-3.264 3.136 3.136 1.472-1.536zM0 17.92V0h20.48v17.92H0zm19.2-6.4h-.448l-1.28-1.28H19.2V6.4h-1.792l1.28-1.28h.512V1.28H1.28v3.84h6.208l1.28 1.28H1.28v3.84h7.424l-1.28 1.28H1.28v3.84H19.2v-3.84z"})),zE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M6.4 3.776v3.648H2.752v1.792H6.4v3.648h1.728V9.216h3.712V7.424H8.128V3.776zM0 17.92V0h20.48v17.92H0zM12.8 1.28H1.28v14.08H12.8V1.28zm6.4 0h-5.12v3.84h5.12V1.28zm0 5.12h-5.12v3.84h5.12V6.4zm0 5.12h-5.12v3.84h5.12v-3.84z"})),RE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M14.08 12.864V9.216h3.648V7.424H14.08V3.776h-1.728v3.648H8.64v1.792h3.712v3.648zM0 17.92V0h20.48v17.92H0zM6.4 1.28H1.28v3.84H6.4V1.28zm0 5.12H1.28v3.84H6.4V6.4zm0 5.12H1.28v3.84H6.4v-3.84zM19.2 1.28H7.68v14.08H19.2V1.28z"})),AE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M6.4 9.98L7.68 8.7v-.256L6.4 7.164V9.98zm6.4-1.532l1.28-1.28V9.92L12.8 8.64v-.192zm7.68 9.472V0H0v17.92h20.48zm-1.28-2.56h-5.12v-1.024l-.256.256-1.024-1.024v1.792H7.68v-1.792l-1.024 1.024-.256-.256v1.024H1.28V1.28H6.4v2.368l.704-.704.576.576V1.216h5.12V3.52l.96-.96.32.32V1.216h5.12V15.36zm-5.76-2.112l-3.136-3.136-3.264 3.264-1.536-1.536 3.264-3.264L5.632 5.44l1.536-1.536 3.136 3.136 3.2-3.2 1.536 1.536-3.2 3.2 3.136 3.136-1.536 1.536z"})),HE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 6v11.5h16V6H4zm1.5 1.5h6V11h-6V7.5zm0 8.5v-3.5h6V16h-6zm13 0H13v-3.5h5.5V16zM13 11V7.5h5.5V11H13z"})),LE=["align"];function DE(e,t,n){if(!t)return e;const a=Object.fromEntries(Object.entries(e).filter((([e])=>["head","body","foot"].includes(e)))),{sectionName:o,rowIndex:r}=t;return Object.fromEntries(Object.entries(a).map((([e,a])=>o&&o!==e?[e,a]:[e,a.map(((a,o)=>r&&r!==o?a:{cells:a.cells.map(((a,r)=>function(e,t){if(!e||!t)return!1;switch(t.type){case"column":return"column"===t.type&&e.columnIndex===t.columnIndex;case"cell":return"cell"===t.type&&e.sectionName===t.sectionName&&e.columnIndex===t.columnIndex&&e.rowIndex===t.rowIndex}}({sectionName:e,columnIndex:r,rowIndex:o},t)?n(a):a))}))])))}function FE(e,{sectionName:t,rowIndex:n,columnCount:a}){const o=function(e){return $E(e.head)?$E(e.body)?$E(e.foot)?void 0:e.foot[0]:e.body[0]:e.head[0]}(e),r=void 0===a?o?.cells?.length:a;return r?{[t]:[...e[t].slice(0,n),{cells:Array.from({length:r}).map(((e,n)=>{var a;const r=null!==(a=o?.cells?.[n])&&void 0!==a?a:{};return{...Object.fromEntries(Object.entries(r).filter((([e])=>LE.includes(e)))),content:"",tag:"head"===t?"th":"td"}}))},...e[t].slice(n)]}:e}function VE(e,t){var n;if(!$E(e[t]))return{[t]:[]};return FE(e,{sectionName:t,rowIndex:0,columnCount:null!==(n=e.body?.[0]?.cells?.length)&&void 0!==n?n:1})}function $E(e){return!e||!e.length||e.every(OE)}function OE(e){return!(e.cells&&e.cells.length)}const GE=[{icon:BE,title:(0,tt.__)("Align column left"),align:"left"},{icon:NE,title:(0,tt.__)("Align column center"),align:"center"},{icon:TE,title:(0,tt.__)("Align column right"),align:"right"}],UE={head:(0,tt.__)("Header cell text"),body:(0,tt.__)("Body cell text"),foot:(0,tt.__)("Footer cell text")},qE={head:(0,tt.__)("Header label"),foot:(0,tt.__)("Footer label")};function jE({name:e,...t}){const n=`t${e}`;return(0,Ke.createElement)(n,{...t})}const WE=function({attributes:e,setAttributes:t,insertBlocksAfter:n,isSelected:a}){const{hasFixedLayout:o,caption:r,head:l,foot:i}=e,[s,c]=(0,_t.useState)(2),[m,u]=(0,_t.useState)(2),[p,d]=(0,_t.useState)(),g=(0,nt.__experimentalUseColorProps)(e),h=(0,nt.__experimentalUseBorderProps)(e),b=(0,_t.useRef)(),[_,y]=(0,_t.useState)(!1);function v(n){p&&t(DE(e,p,(e=>({...e,content:n}))))}function f(n){if(!p)return;const{sectionName:a,rowIndex:o}=p,r=o+n;t(FE(e,{sectionName:a,rowIndex:r})),d({sectionName:a,rowIndex:r,columnIndex:0,type:"cell"})}function k(n=0){if(!p)return;const{columnIndex:a}=p,o=a+n;t(function(e,{columnIndex:t}){const n=Object.fromEntries(Object.entries(e).filter((([e])=>["head","body","foot"].includes(e))));return Object.fromEntries(Object.entries(n).map((([e,n])=>$E(n)?[e,n]:[e,n.map((n=>OE(n)||n.cells.length<t?n:{cells:[...n.cells.slice(0,t),{content:"",tag:"head"===e?"th":"td"},...n.cells.slice(t)]}))])))}(e,{columnIndex:o})),d({rowIndex:0,columnIndex:o,type:"cell"})}(0,_t.useEffect)((()=>{a||d()}),[a]),(0,_t.useEffect)((()=>{_&&(b?.current?.querySelector('td div[contentEditable="true"]')?.focus(),y(!1))}),[_]);const x=["head","body","foot"].filter((t=>!$E(e[t]))),w=[{icon:IE,title:(0,tt.__)("Insert row before"),isDisabled:!p,onClick:function(){f(0)}},{icon:PE,title:(0,tt.__)("Insert row after"),isDisabled:!p,onClick:function(){f(1)}},{icon:ME,title:(0,tt.__)("Delete row"),isDisabled:!p,onClick:function(){if(!p)return;const{sectionName:n,rowIndex:a}=p;d(),t(function(e,{sectionName:t,rowIndex:n}){return{[t]:e[t].filter(((e,t)=>t!==n))}}(e,{sectionName:n,rowIndex:a}))}},{icon:zE,title:(0,tt.__)("Insert column before"),isDisabled:!p,onClick:function(){k(0)}},{icon:RE,title:(0,tt.__)("Insert column after"),isDisabled:!p,onClick:function(){k(1)}},{icon:AE,title:(0,tt.__)("Delete column"),isDisabled:!p,onClick:function(){if(!p)return;const{sectionName:n,columnIndex:a}=p;d(),t(function(e,{columnIndex:t}){const n=Object.fromEntries(Object.entries(e).filter((([e])=>["head","body","foot"].includes(e))));return Object.fromEntries(Object.entries(n).map((([e,n])=>$E(n)?[e,n]:[e,n.map((e=>({cells:e.cells.length>=t?e.cells.filter(((e,n)=>n!==t)):e.cells}))).filter((e=>e.cells.length))])))}(e,{sectionName:n,columnIndex:a}))}}],E=x.map((t=>(0,Ke.createElement)(jE,{name:t,key:t},e[t].map((({cells:e},n)=>(0,Ke.createElement)("tr",{key:n},e.map((({content:e,tag:a,scope:o,align:r,colspan:l,rowspan:i},s)=>(0,Ke.createElement)(a,{key:s,scope:"th"===a?o:void 0,colSpan:l,rowSpan:i,className:ut()({[`has-text-align-${r}`]:r},"wp-block-table__cell-content")},(0,Ke.createElement)(nt.RichText,{value:e,onChange:v,onFocus:()=>{d({sectionName:t,rowIndex:n,columnIndex:s,type:"cell"})},"aria-label":UE[t],placeholder:qE[t]})))))))))),C=!x.length;return(0,Ke.createElement)("figure",{...(0,nt.useBlockProps)({ref:b})},!C&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{label:(0,tt.__)("Change column alignment"),alignmentControls:GE,value:function(){if(p)return function(e,t,n){const{sectionName:a,rowIndex:o,columnIndex:r}=t;return e[a]?.[o]?.cells?.[r]?.[n]}(e,p,"align")}(),onChange:n=>function(n){if(!p)return;const a={type:"column",columnIndex:p.columnIndex},o=DE(e,a,(e=>({...e,align:n})));t(o)}(n)})),(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(et.ToolbarDropdownMenu,{hasArrowIndicator:!0,icon:HE,label:(0,tt.__)("Edit table"),controls:w}))),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings"),className:"blocks-table-settings"},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Fixed width table cells"),checked:!!o,onChange:function(){t({hasFixedLayout:!o})}}),!C&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Header section"),checked:!(!l||!l.length),onChange:function(){t(VE(e,"head"))}}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Footer section"),checked:!(!i||!i.length),onChange:function(){t(VE(e,"foot"))}})))),!C&&(0,Ke.createElement)("table",{className:ut()(g.className,h.className,{"has-fixed-layout":o,"has-individual-borders":(0,et.__experimentalHasSplitBorders)(e?.style?.border)}),style:{...g.style,...h.style}},E),!C&&(0,Ke.createElement)(nt.RichText,{identifier:"caption",tagName:"figcaption",className:(0,nt.__experimentalGetElementClassName)("caption"),"aria-label":(0,tt.__)("Table caption text"),placeholder:(0,tt.__)("Add caption"),value:r,onChange:e=>t({caption:e}),onFocus:()=>d(),__unstableOnSplitAtEnd:()=>n((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))}),C&&(0,Ke.createElement)(et.Placeholder,{label:(0,tt.__)("Table"),icon:(0,Ke.createElement)(nt.BlockIcon,{icon:kE,showColors:!0}),instructions:(0,tt.__)("Insert a table for sharing data.")},(0,Ke.createElement)("form",{className:"blocks-table__placeholder-form",onSubmit:function(e){e.preventDefault(),t(function({rowCount:e,columnCount:t}){return{body:Array.from({length:e}).map((()=>({cells:Array.from({length:t}).map((()=>({content:"",tag:"td"})))})))}}({rowCount:parseInt(s,10)||2,columnCount:parseInt(m,10)||2})),y(!0)}},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,type:"number",label:(0,tt.__)("Column count"),value:m,onChange:function(e){u(e)},min:"1",className:"blocks-table__placeholder-input"}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,type:"number",label:(0,tt.__)("Row count"),value:s,onChange:function(e){c(e)},min:"1",className:"blocks-table__placeholder-input"}),(0,Ke.createElement)(et.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit"},(0,tt.__)("Create Table")))))};function ZE(e){const t=parseInt(e,10);if(Number.isInteger(t))return t<0||1===t?void 0:t.toString()}const QE=({phrasingContentSchema:e})=>({tr:{allowEmpty:!0,children:{th:{allowEmpty:!0,children:e,attributes:["scope","colspan","rowspan"]},td:{allowEmpty:!0,children:e,attributes:["colspan","rowspan"]}}}}),KE={from:[{type:"raw",selector:"table",schema:e=>({table:{children:{thead:{allowEmpty:!0,children:QE(e)},tfoot:{allowEmpty:!0,children:QE(e)},tbody:{allowEmpty:!0,children:QE(e)}}}}),transform:e=>{const t=Array.from(e.children).reduce(((e,t)=>{if(!t.children.length)return e;const n=t.nodeName.toLowerCase().slice(1),a=Array.from(t.children).reduce(((e,t)=>{if(!t.children.length)return e;const n=Array.from(t.children).reduce(((e,t)=>{const n=ZE(t.getAttribute("rowspan")),a=ZE(t.getAttribute("colspan"));return e.push({tag:t.nodeName.toLowerCase(),content:t.innerHTML,rowspan:n,colspan:a}),e}),[]);return e.push({cells:n}),e}),[]);return e[n]=a,e}),{});return(0,Qe.createBlock)("core/table",t)}}]},YE=KE,JE={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/table",title:"Table",category:"text",description:"Create structured content in rows and columns to display information.",textdomain:"default",attributes:{hasFixedLayout:{type:"boolean",default:!1},caption:{type:"rich-text",source:"rich-text",selector:"figcaption"},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"rich-text",source:"rich-text"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"},colspan:{type:"string",source:"attribute",attribute:"colspan"},rowspan:{type:"string",source:"attribute",attribute:"rowspan"}}}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"rich-text",source:"rich-text"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"},colspan:{type:"string",source:"attribute",attribute:"colspan"},rowspan:{type:"string",source:"attribute",attribute:"rowspan"}}}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"rich-text",source:"rich-text"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"},colspan:{type:"string",source:"attribute",attribute:"colspan"},rowspan:{type:"string",source:"attribute",attribute:"rowspan"}}}}}},supports:{anchor:!0,align:!0,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{__experimentalSkipSerialization:!0,color:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}},__experimentalSelector:".wp-block-table > table",interactivity:{clientNavigation:!0}},styles:[{name:"regular",label:"Default",isDefault:!0},{name:"stripes",label:"Stripes"}],editorStyle:"wp-block-table-editor",style:"wp-block-table"},{name:XE}=JE,eC={icon:kE,example:{attributes:{head:[{cells:[{content:(0,tt.__)("Version"),tag:"th"},{content:(0,tt.__)("Jazz Musician"),tag:"th"},{content:(0,tt.__)("Release Date"),tag:"th"}]}],body:[{cells:[{content:"5.2",tag:"td"},{content:"Jaco Pastorius",tag:"td"},{content:(0,tt.__)("May 7, 2019"),tag:"td"}]},{cells:[{content:"5.1",tag:"td"},{content:"Betty Carter",tag:"td"},{content:(0,tt.__)("February 21, 2019"),tag:"td"}]},{cells:[{content:"5.0",tag:"td"},{content:"Bebo Valdés",tag:"td"},{content:(0,tt.__)("December 6, 2018"),tag:"td"}]}]},viewportWidth:450},transforms:YE,edit:WE,save:function({attributes:e}){const{hasFixedLayout:t,head:n,body:a,foot:o,caption:r}=e;if(!n.length&&!a.length&&!o.length)return null;const l=(0,nt.__experimentalGetColorClassesAndStyles)(e),i=(0,nt.__experimentalGetBorderClassesAndStyles)(e),s=ut()(l.className,i.className,{"has-fixed-layout":t}),c=!nt.RichText.isEmpty(r),m=({type:e,rows:t})=>{if(!t.length)return null;const n=`t${e}`;return(0,Ke.createElement)(n,null,t.map((({cells:e},t)=>(0,Ke.createElement)("tr",{key:t},e.map((({content:e,tag:t,scope:n,align:a,colspan:o,rowspan:r},l)=>{const i=ut()({[`has-text-align-${a}`]:a});return(0,Ke.createElement)(nt.RichText.Content,{className:i||void 0,"data-align":a,tagName:t,value:e,key:l,scope:"th"===t?n:void 0,colSpan:o,rowSpan:r})}))))))};return(0,Ke.createElement)("figure",{...nt.useBlockProps.save()},(0,Ke.createElement)("table",{className:""===s?void 0:s,style:{...l.style,...i.style}},(0,Ke.createElement)(m,{type:"head",rows:n}),(0,Ke.createElement)(m,{type:"body",rows:a}),(0,Ke.createElement)(m,{type:"foot",rows:o})),c&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:r,className:(0,nt.__experimentalGetElementClassName)("caption")}))},deprecated:SE},tC=()=>Xe({name:XE,metadata:JE,settings:eC}),nC=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 9.484h-8.889v-1.5H20v1.5Zm0 7h-4.889v-1.5H20v1.5Zm-14 .032a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"}),(0,Ke.createElement)(Ye.Path,{d:"M13 15.516a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 8.484a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"})),aC="wp-block-table-of-contents__entry";function oC({nestedHeadingList:e,disableLinkActivation:t,onClick:n}){return(0,Ke.createElement)(Ke.Fragment,null,e.map(((e,a)=>{const{content:o,link:r}=e.heading,l=r?(0,Ke.createElement)("a",{className:aC,href:r,"aria-disabled":t||void 0,onClick:t&&"function"==typeof n?n:void 0},o):(0,Ke.createElement)("span",{className:aC},o);return(0,Ke.createElement)("li",{key:a},l,e.children?(0,Ke.createElement)("ol",null,(0,Ke.createElement)(oC,{nestedHeadingList:e.children,disableLinkActivation:t,onClick:t&&"function"==typeof n?n:void 0})):null)})))}function rC(e){const t=[];return e.forEach(((n,a)=>{if(""!==n.content&&n.level===e[0].level)if(e[a+1]?.level>n.level){let o=e.length;for(let t=a+1;t<e.length;t++)if(e[t].level===n.level){o=t;break}t.push({heading:n,children:rC(e.slice(a+1,o))})}else t.push({heading:n,children:null})})),t}var lC=n(7734),iC=n.n(lC);function sC(e,t,n){const{getBlockAttributes:a}=e(nt.store),{updateBlockAttributes:o,__unstableMarkNextChangeAsNotPersistent:r}=t(nt.store),l=a(n);if(null===l)return;const i=function(e,t){var n,a;const{getBlockAttributes:o,getBlockName:r,getClientIdsWithDescendants:l,getBlocksByName:i}=e(nt.store),s=null!==(n=e("core/editor").getPermalink())&&void 0!==n?n:null,c=0!==i("core/nextpage").length,{onlyIncludeCurrentPage:m}=null!==(a=o(t))&&void 0!==a?a:{},u=l();let p=1;if(c&&m){const e=u.indexOf(t);for(const[t,n]of u.entries()){if(t>=e)break;"core/nextpage"===r(n)&&p++}}const d=[];let g=1,h=null;"string"==typeof s&&(h=c?(0,pt.addQueryArgs)(s,{page:g}):s);for(const e of u){const t=r(e);if("core/nextpage"===t){if(g++,m&&g>p)break;"string"==typeof s&&(h=(0,pt.addQueryArgs)((0,pt.removeQueryArgs)(s,["page"]),{page:g}))}else if((!m||g===p)&&"core/heading"===t){const t=o(e),n="string"==typeof h&&"string"==typeof t.anchor&&""!==t.anchor;d.push({content:(0,ac.__unstableStripHTML)(t.content.replace(/(<br *\/?>)+/g," ")),level:t.level,link:n?`${h}#${t.anchor}`:null})}}return d}(e,n);iC()(i,l.headings)||(r(),o(n,{headings:i}))}const cC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/table-of-contents",title:"Table of Contents",category:"layout",description:"Summarize your post with a list of headings. Add HTML anchors to Heading blocks to link them here.",keywords:["document outline","summary"],textdomain:"default",attributes:{headings:{type:"array",items:{type:"object"},default:[]},onlyIncludeCurrentPage:{type:"boolean",default:!1}},supports:{html:!1,color:{text:!0,background:!0,gradients:!0,link:!0},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}},interactivity:{clientNavigation:!0}},example:{}},{name:mC}=cC,uC={icon:nC,edit:function e({attributes:{headings:t=[],onlyIncludeCurrentPage:n},clientId:a,setAttributes:o}){!function(e){const t=(0,gt.useRegistry)();(0,_t.useEffect)((()=>t.subscribe((()=>sC(t.select,t.dispatch,e)))),[t,e])}(a);const r=(0,nt.useBlockProps)(),l=(0,jt.useInstanceId)(e,"table-of-contents"),{createWarningNotice:i,removeNotice:s}=(0,gt.useDispatch)(Pt.store);let c;const m=(0,gt.useSelect)((e=>{const{getBlockRootClientId:t,canInsertBlockType:n}=e(nt.store);return n("core/list",t(a))}),[a]),{replaceBlocks:u}=(0,gt.useDispatch)(nt.store),p=rC(t),d=m&&(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.ToolbarButton,{onClick:()=>u(a,(0,Qe.createBlock)("core/list",{ordered:!0,values:(0,_t.renderToString)((0,Ke.createElement)(oC,{nestedHeadingList:p}))}))},(0,tt.__)("Convert to static list")))),g=(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Only include current page"),checked:n,onChange:e=>o({onlyIncludeCurrentPage:e}),help:n?(0,tt.__)("Only including headings from the current page (if the post is paginated)."):(0,tt.__)("Toggle to only include headings from the current page (if the post is paginated).")})));return 0===t.length?(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("div",{...r},(0,Ke.createElement)(et.Placeholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:nC}),label:(0,tt.__)("Table of Contents"),instructions:(0,tt.__)("Start adding Heading blocks to create a table of contents. Headings with HTML anchors will be linked here.")})),g):(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("nav",{...r},(0,Ke.createElement)("ol",null,(0,Ke.createElement)(oC,{nestedHeadingList:p,disableLinkActivation:!0,onClick:e=>{e.preventDefault(),s(c),c=`block-library/core/table-of-contents/redirection-prevented/${l}`,i((0,tt.__)("Links are disabled in the editor."),{id:c,type:"snackbar"})}}))),d,g)},save:function({attributes:{headings:e=[]}}){return 0===e.length?null:(0,Ke.createElement)("nav",{...nt.useBlockProps.save()},(0,Ke.createElement)("ol",null,(0,Ke.createElement)(oC,{nestedHeadingList:rC(e)})))}},pC=()=>Xe({name:mC,metadata:cC,settings:uC}),dC={from:[{type:"block",blocks:["core/categories"],transform:()=>(0,Qe.createBlock)("core/tag-cloud")}],to:[{type:"block",blocks:["core/categories"],transform:()=>(0,Qe.createBlock)("core/categories")}]};const gC=function({attributes:e,setAttributes:t}){const{taxonomy:n,showTagCounts:a,numberOfTags:o,smallestFontSize:r,largestFontSize:l}=e,[i]=(0,nt.useSettings)("spacing.units"),s=(0,et.__experimentalUseCustomUnits)({availableUnits:i||["%","px","em","rem"]}),c=(0,gt.useSelect)((e=>e(dt.store).getTaxonomies({per_page:-1})),[]),m=(e,n)=>{const[a,o]=(0,et.__experimentalParseQuantityAndUnitFromRawValue)(n);if(!Number.isFinite(a))return;const i={[e]:n};Object.entries({smallestFontSize:r,largestFontSize:l}).forEach((([t,n])=>{const[a,r]=(0,et.__experimentalParseQuantityAndUnitFromRawValue)(n);t!==e&&r!==o&&(i[t]=`${a}${o}`)})),t(i)},u=(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Taxonomy"),options:[{label:(0,tt.__)("- Select -"),value:"",disabled:!0},...(null!=c?c:[]).filter((e=>!!e.show_cloud)).map((e=>({value:e.slug,label:e.name})))],value:n,onChange:e=>t({taxonomy:e})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show post counts"),checked:a,onChange:()=>t({showTagCounts:!a})}),(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Number of tags"),value:o,onChange:e=>t({numberOfTags:e}),min:1,max:100,required:!0}),(0,Ke.createElement)(et.Flex,null,(0,Ke.createElement)(et.FlexItem,{isBlock:!0},(0,Ke.createElement)(et.__experimentalUnitControl,{label:(0,tt.__)("Smallest size"),value:r,onChange:e=>{m("smallestFontSize",e)},units:s,min:.1,max:100})),(0,Ke.createElement)(et.FlexItem,{isBlock:!0},(0,Ke.createElement)(et.__experimentalUnitControl,{label:(0,tt.__)("Largest size"),value:l,onChange:e=>{m("largestFontSize",e)},units:s,min:.1,max:100})))));return(0,Ke.createElement)(Ke.Fragment,null,u,(0,Ke.createElement)("div",{...(0,nt.useBlockProps)()},(0,Ke.createElement)(et.Disabled,null,(0,Ke.createElement)(ot(),{skipBlockSupportAttributes:!0,block:"core/tag-cloud",attributes:e}))))},hC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/tag-cloud",title:"Tag Cloud",category:"widgets",description:"A cloud of your most used tags.",textdomain:"default",attributes:{numberOfTags:{type:"number",default:45,minimum:1,maximum:100},taxonomy:{type:"string",default:"post_tag"},showTagCounts:{type:"boolean",default:!1},smallestFontSize:{type:"string",default:"8pt"},largestFontSize:{type:"string",default:"22pt"}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"outline",label:"Outline"}],supports:{html:!1,align:!0,spacing:{margin:!0,padding:!0},typography:{lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-tag-cloud-editor"},{name:bC}=hC,_C={icon:rb,example:{},edit:gC,transforms:dC},yC=()=>Xe({name:bC,metadata:hC,settings:_C});var vC=function(){return vC=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},vC.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function fC(e){return e.toLowerCase()}var kC=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],xC=/[^A-Z0-9]+/gi;function wC(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,a=void 0===n?kC:n,o=t.stripRegexp,r=void 0===o?xC:o,l=t.transform,i=void 0===l?fC:l,s=t.delimiter,c=void 0===s?" ":s,m=EC(EC(e,a,"$1\0$2"),r,"\0"),u=0,p=m.length;"\0"===m.charAt(u);)u++;for(;"\0"===m.charAt(p-1);)p--;return m.slice(u,p).split("\0").map(i).join(c)}function EC(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function CC(e){return function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(e.toLowerCase())}const SC=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}));function BC(e,t){return void 0===t&&(t={}),function(e,t){return void 0===t&&(t={}),wC(e,vC({delimiter:"."},t))}(e,vC({delimiter:"-"},t))}function NC(e,t){const{templateParts:n,isResolving:a}=(0,gt.useSelect)((e=>{const{getEntityRecords:t,isResolving:n}=e(dt.store),a={per_page:-1};return{templateParts:t("postType","wp_template_part",a),isResolving:n("getEntityRecords",["postType","wp_template_part",a])}}),[]);return{templateParts:(0,_t.useMemo)((()=>n&&n.filter((n=>oh(n.theme,n.slug)!==t&&(!e||"uncategorized"===e||n.area===e)))||[]),[n,e,t]),isResolving:a}}function TC(e,t){return(0,gt.useSelect)((n=>{const a=e?`core/template-part/${e}`:"core/template-part",{getBlockRootClientId:o,getPatternsByBlockTypes:r}=n(nt.store);return r(a,o(t))}),[e,t])}function IC(e,t){const{saveEntityRecord:n}=(0,gt.useDispatch)(dt.store);return async(a=[],o=(0,tt.__)("Untitled Template Part"))=>{const r={title:o,slug:BC(o).replace(/[^\w-]+/g,"")||"wp-custom-part",content:(0,Qe.serialize)(a),area:e},l=await n("postType","wp_template_part",r);t({slug:l.slug,theme:l.theme,area:void 0})}}function PC(e){return(0,gt.useSelect)((t=>{var n;const a=t("core/editor").__experimentalGetDefaultTemplatePartAreas(),o=a.find((t=>t.area===e)),r=a.find((e=>"uncategorized"===e.area));return{icon:o?.icon||r?.icon,label:o?.label||(0,tt.__)("Template Part"),tagName:null!==(n=o?.area_tag)&&void 0!==n?n:"div"}}),[e])}function MC({areaLabel:e,onClose:t,onSubmit:n}){const[a,o]=(0,_t.useState)((0,tt.__)("Untitled Template Part"));return(0,Ke.createElement)(et.Modal,{title:(0,tt.sprintf)((0,tt.__)("Name and create your new %s"),e.toLowerCase()),overlayClassName:"wp-block-template-part__placeholder-create-new__title-form",onRequestClose:t},(0,Ke.createElement)("form",{onSubmit:e=>{e.preventDefault(),n(a)}},(0,Ke.createElement)(et.__experimentalVStack,{spacing:"5"},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Name"),value:a,onChange:o}),(0,Ke.createElement)(et.__experimentalHStack,{justify:"right"},(0,Ke.createElement)(et.Button,{variant:"primary",type:"submit",disabled:!a.length,"aria-disabled":!a.length},(0,tt.__)("Create"))))))}function zC({area:e,clientId:t,templatePartId:n,onOpenSelectionModal:a,setAttributes:o}){const{templateParts:r,isResolving:l}=NC(e,n),i=TC(e,t),[s,c]=(0,_t.useState)(!1),m=PC(e),u=IC(e,o);return(0,Ke.createElement)(et.Placeholder,{icon:m.icon,label:m.label,instructions:(0,tt.sprintf)((0,tt.__)("Choose an existing %s or create a new one."),m.label.toLowerCase())},l&&(0,Ke.createElement)(et.Spinner,null),!l&&!(!r.length&&!i.length)&&(0,Ke.createElement)(et.Button,{variant:"primary",onClick:a},(0,tt.__)("Choose")),!l&&(0,Ke.createElement)(et.Button,{variant:"secondary",onClick:()=>{c(!0)}},(0,tt.__)("Start blank")),s&&(0,Ke.createElement)(MC,{areaLabel:m.label,onClose:()=>c(!1),onSubmit:e=>{u([],e)}}))}function RC({setAttributes:e,onClose:t,templatePartId:n=null,area:a,clientId:o}){const[r,l]=(0,_t.useState)(""),{templateParts:i}=NC(a,n),s=(0,_t.useMemo)((()=>Uf(i.map((e=>({name:oh(e.theme,e.slug),title:e.title.rendered,blocks:(0,Qe.parse)(e.content.raw),templatePart:e}))),r)),[i,r]),c=(0,jt.useAsyncList)(s),m=TC(a,o),u=(0,_t.useMemo)((()=>Uf(m,r)),[m,r]),p=(0,jt.useAsyncList)(u),{createSuccessNotice:d}=(0,gt.useDispatch)(Pt.store),g=IC(a,e),h=!!s.length,b=!!u.length;return(0,Ke.createElement)("div",{className:"block-library-template-part__selection-content"},(0,Ke.createElement)("div",{className:"block-library-template-part__selection-search"},(0,Ke.createElement)(et.SearchControl,{__nextHasNoMarginBottom:!0,onChange:l,value:r,label:(0,tt.__)("Search for replacements"),placeholder:(0,tt.__)("Search")})),h&&(0,Ke.createElement)("div",null,(0,Ke.createElement)("h2",null,(0,tt.__)("Existing template parts")),(0,Ke.createElement)(nt.__experimentalBlockPatternsList,{blockPatterns:s,shownPatterns:c,onClickPattern:n=>{var a;a=n.templatePart,e({slug:a.slug,theme:a.theme,area:void 0}),d((0,tt.sprintf)((0,tt.__)('Template Part "%s" inserted.'),a.title?.rendered||a.slug),{type:"snackbar"}),t()}})),b&&(0,Ke.createElement)("div",null,(0,Ke.createElement)("h2",null,(0,tt.__)("Patterns")),(0,Ke.createElement)(nt.__experimentalBlockPatternsList,{blockPatterns:u,shownPatterns:p,onClickPattern:(e,n)=>{g(n,e.title),t()}})),!h&&!b&&(0,Ke.createElement)(et.__experimentalHStack,{alignment:"center"},(0,Ke.createElement)("p",null,(0,tt.__)("No results found."))))}function AC(e){const t=(0,Qe.getPossibleBlockTransformations)([e]).filter((e=>{if(!e.transforms)return!0;const t=e.transforms?.from?.find((e=>e.blocks&&e.blocks.includes("*"))),n=e.transforms?.to?.find((e=>e.blocks&&e.blocks.includes("*")));return!t&&!n}));if(t.length)return(0,Qe.switchToBlockType)(e,t[0].name)}function HC(e=[]){return e.flatMap((e=>"core/legacy-widget"===e.name?AC(e):(0,Qe.createBlock)(e.name,e.attributes,HC(e.innerBlocks)))).filter((e=>!!e))}const LC={per_page:-1,_fields:"id,name,description,status,widgets"};function DC({area:e,setAttributes:t}){const[n,a]=(0,_t.useState)(""),[o,r]=(0,_t.useState)(!1),l=(0,gt.useRegistry)(),{sidebars:i,hasResolved:s}=(0,gt.useSelect)((e=>{const{getSidebars:t,hasFinishedResolution:n}=e(dt.store);return{sidebars:t(LC),hasResolved:n("getSidebars",[LC])}}),[]),{createErrorNotice:c}=(0,gt.useDispatch)(Pt.store),m=IC(e,t),u=(0,_t.useMemo)((()=>{const e=(null!=i?i:[]).filter((e=>"wp_inactive_widgets"!==e.id&&e.widgets.length>0)).map((e=>({value:e.id,label:e.name})));return e.length?[{value:"",label:(0,tt.__)("Select widget area")},...e]:[]}),[i]);if(!s)return(0,Ke.createElement)(et.__experimentalSpacer,{marginBottom:"0"});if(s&&!u.length)return null;return(0,Ke.createElement)(et.__experimentalSpacer,{marginBottom:"4"},(0,Ke.createElement)(et.__experimentalHStack,{as:"form",onSubmit:async function(e){if(e.preventDefault(),o||!n)return;r(!0);const t=u.find((({value:e})=>e===n)),{getWidgets:a}=l.resolveSelect(dt.store),i=await a({sidebar:t.value,_embed:"about"}),s=new Set,p=i.flatMap((e=>{const t=function(e){if("block"!==e.id_base){let t;return t=e._embedded.about[0].is_multi?{idBase:e.id_base,instance:e.instance}:{id:e.id},AC((0,Qe.createBlock)("core/legacy-widget",t))}const t=(0,Qe.parse)(e.instance.raw.content,{__unstableSkipAutop:!0});if(!t.length)return;const n=t[0];return"core/widget-group"===n.name?(0,Qe.createBlock)((0,Qe.getGroupingBlockName)(),void 0,HC(n.innerBlocks)):n.innerBlocks.length>0?(0,Qe.cloneBlock)(n,void 0,HC(n.innerBlocks)):n}(e);return t||(s.add(e.id_base),[])}));await m(p,(0,tt.sprintf)((0,tt.__)("Widget area: %s"),t.label)),s.size&&c((0,tt.sprintf)((0,tt.__)("Unable to import the following widgets: %s."),Array.from(s).join(", ")),{type:"snackbar"}),r(!1)}},(0,Ke.createElement)(et.FlexBlock,null,(0,Ke.createElement)(et.SelectControl,{label:(0,tt.__)("Import widget area"),value:n,options:u,onChange:e=>a(e),disabled:!u.length,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})),(0,Ke.createElement)(et.FlexItem,{style:{marginBottom:"8px",marginTop:"auto"}},(0,Ke.createElement)(et.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:o,"aria-disabled":o||!n},(0,tt._x)("Import","button label")))))}const FC={header:(0,tt.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,tt.__)("The <main> element should be used for the primary content of your document only."),section:(0,tt.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element."),article:(0,tt.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,tt.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),footer:(0,tt.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).")};function VC({tagName:e,setAttributes:t,isEntityAvailable:n,templatePartId:a,defaultWrapper:o,hasInnerBlocks:r}){const[l,i]=(0,dt.useEntityProp)("postType","wp_template_part","area",a),[s,c]=(0,dt.useEntityProp)("postType","wp_template_part","title",a),m=(0,gt.useSelect)((e=>e("core/editor").__experimentalGetDefaultTemplatePartAreas()),[]).map((({label:e,area:t})=>({label:e,value:t})));return(0,Ke.createElement)(Ke.Fragment,null,n&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Title"),value:s,onChange:e=>{c(e)},onFocus:e=>e.target.select()}),(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Area"),labelPosition:"top",options:m,value:l,onChange:i})),(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("HTML element"),options:[{label:(0,tt.sprintf)((0,tt.__)("Default based on area (%s)"),`<${o}>`),value:""},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"},{label:"<div>",value:"div"}],value:e||"",onChange:e=>t({tagName:e}),help:FC[e]}),!r&&(0,Ke.createElement)(DC,{area:l,setAttributes:t}))}function $C({postId:e,hasInnerBlocks:t,layout:n,tagName:a,blockProps:o}){const r=(0,gt.useSelect)((e=>{const{getSettings:t}=e(nt.store);return t()?.supportsLayout}),[]),[l]=(0,nt.useSettings)("layout"),i=n?.inherit?l||{}:n,[s,c,m]=(0,dt.useEntityBlockEditor)("postType","wp_template_part",{id:e}),u=(0,nt.useInnerBlocksProps)(o,{value:s,onInput:c,onChange:m,renderAppender:t?void 0:nt.InnerBlocks.ButtonBlockAppender,layout:r?i:void 0});return(0,Ke.createElement)(a,{...u})}function OC({isEntityAvailable:e,area:t,clientId:n,templatePartId:a,isTemplatePartSelectionOpen:o,setIsTemplatePartSelectionOpen:r}){const{templateParts:l}=NC(t,a),i=TC(t,n),s=!!l.length||!!i.length;return e&&s&&("header"===t||"footer"===t)?(0,Ke.createElement)(et.MenuItem,{onClick:()=>{r(!0)},"aria-expanded":o,"aria-haspopup":"dialog"},(0,tt.__)("Replace")):null}const GC=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M18.5 10.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"})),UC=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),qC=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.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.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));function jC(e,t){if("core/template-part"!==t)return e;if(e.variations){const t=(e,t)=>{const{area:n,theme:a,slug:o}=e;if(n)return n===t.area;if(!o)return!1;const{getCurrentTheme:r,getEntityRecord:l}=(0,gt.select)(dt.store),i=l("postType","wp_template_part",`${a||r()?.stylesheet}//${o}`);return i?.slug?i.slug===t.slug:i?.area===t.area},n=e.variations.map((e=>{return{...e,...!e.isActive&&{isActive:t},..."string"==typeof e.icon&&{icon:(n=e.icon,"header"===n?GC:"footer"===n?UC:"sidebar"===n?qC:SC)}};var n}));return{...e,variations:n}}return e}const WC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/template-part",title:"Template Part",category:"theme",description:"Edit the different global regions of your site, like the header, footer, sidebar, or create your own.",textdomain:"default",attributes:{slug:{type:"string"},theme:{type:"string"},tagName:{type:"string"},area:{type:"string"}},supports:{align:!0,html:!1,reusable:!1,renaming:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-template-part-editor"},{name:ZC}=WC,QC={icon:SC,__experimentalLabel:({slug:e,theme:t})=>{if(!e)return;const{getCurrentTheme:n,getEditedEntityRecord:a}=(0,gt.select)(dt.store),o=a("postType","wp_template_part",(t||n()?.stylesheet)+"//"+e);return o?(0,Jn.decodeEntities)(o.title)||function(e,t){return void 0===t&&(t={}),wC(e,vC({delimiter:" ",transform:CC},t))}(o.slug||""):void 0},edit:function({attributes:e,setAttributes:t,clientId:n}){const a=(0,gt.useSelect)((e=>e(dt.store).getCurrentTheme()?.stylesheet),[]),{slug:o,theme:r=a,tagName:l,layout:i={}}=e,s=oh(r,o),c=(0,nt.useHasRecursion)(s),[m,u]=(0,_t.useState)(!1),{isResolved:p,hasInnerBlocks:d,isMissing:g,area:h}=(0,gt.useSelect)((t=>{const{getEditedEntityRecord:a,hasFinishedResolution:o}=t(dt.store),{getBlockCount:r}=t(nt.store),l=["postType","wp_template_part",s],i=s?a(...l):null,c=i?.area||e.area,m=!!s&&o("getEditedEntityRecord",l);return{hasInnerBlocks:r(n)>0,isResolved:m,isMissing:m&&(!i||0===Object.keys(i).length),area:c}}),[s,e.area,n]),b=PC(h),_=(0,nt.useBlockProps)(),y=!o,v=!y&&!g&&p,f=l||b.tagName;return!d&&(o&&!r||o&&g)?(0,Ke.createElement)(f,{..._},(0,Ke.createElement)(nt.Warning,null,(0,tt.sprintf)((0,tt.__)("Template part has been deleted or is unavailable: %s"),o))):v&&c?(0,Ke.createElement)(f,{..._},(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Block cannot be rendered inside itself."))):(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.RecursionProvider,{uniqueId:s},(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(VC,{tagName:l,setAttributes:t,isEntityAvailable:v,templatePartId:s,defaultWrapper:b.tagName,hasInnerBlocks:d})),y&&(0,Ke.createElement)(f,{..._},(0,Ke.createElement)(zC,{area:e.area,templatePartId:s,clientId:n,setAttributes:t,onOpenSelectionModal:()=>u(!0)})),(0,Ke.createElement)(nt.BlockSettingsMenuControls,null,(({selectedClientIds:e})=>1!==e.length||n!==e[0]?null:(0,Ke.createElement)(OC,{isEntityAvailable:v,area:h,clientId:n,templatePartId:s,isTemplatePartSelectionOpen:m,setIsTemplatePartSelectionOpen:u}))),v&&(0,Ke.createElement)($C,{tagName:f,blockProps:_,postId:s,hasInnerBlocks:d,layout:i}),!y&&!p&&(0,Ke.createElement)(f,{..._},(0,Ke.createElement)(et.Spinner,null))),m&&(0,Ke.createElement)(et.Modal,{overlayClassName:"block-editor-template-part__selection-modal",title:(0,tt.sprintf)((0,tt.__)("Choose a %s"),b.label.toLowerCase()),onRequestClose:()=>u(!1),isFullScreen:!0},(0,Ke.createElement)(RC,{templatePartId:s,clientId:n,area:h,setAttributes:t,onClose:()=>u(!1)})))}},KC=()=>{(0,_i.addFilter)("blocks.registerBlockType","core/template-part",jC);const e=["core/post-template","core/post-content"];return(0,_i.addFilter)("blockEditor.__unstableCanInsertBlockType","core/block-library/removeTemplatePartsFromPostTemplates",((t,n,a,{getBlock:o,getBlockParentsByBlockName:r})=>{if("core/template-part"!==n.name)return t;for(const t of e){if(o(a)?.name===t||r(a,t).length)return!1}return!0})),Xe({name:ZC,metadata:WC,settings:QC})},YC=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z"}));const JC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/term-description",title:"Term Description",category:"theme",description:"Display the description of categories, tags and custom taxonomies when viewing an archive.",textdomain:"default",attributes:{textAlign:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:XC}=JC,eS={icon:YC,edit:function({attributes:e,setAttributes:t,mergedStyle:n}){const{textAlign:a}=e,o=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${a}`]:a}),style:n});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:a,onChange:e=>{t({textAlign:e})}})),(0,Ke.createElement)("div",{...o},(0,Ke.createElement)("div",{className:"wp-block-term-description__placeholder"},(0,Ke.createElement)("span",null,(0,tt.__)("Term Description")))))}},tS=()=>Xe({name:XC,metadata:JC,settings:eS});const nS={to:[{type:"block",blocks:["core/columns"],transform:({className:e,columns:t,content:n,width:a})=>(0,Qe.createBlock)("core/columns",{align:"wide"===a||"full"===a?a:void 0,className:e,columns:t},n.map((({children:e})=>(0,Qe.createBlock)("core/column",{},[(0,Qe.createBlock)("core/paragraph",{content:e})]))))}]},aS=nS,oS={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/text-columns",title:"Text Columns (deprecated)",icon:"columns",category:"design",description:"This block is deprecated. Please use the Columns block instead.",textdomain:"default",attributes:{content:{type:"array",source:"query",selector:"p",query:{children:{type:"string",source:"html"}},default:[{},{}]},columns:{type:"number",default:2},width:{type:"string"}},supports:{inserter:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-text-columns-editor",style:"wp-block-text-columns"},{name:rS}=oS,lS={transforms:aS,getEditWrapperProps(e){const{width:t}=e;if("wide"===t||"full"===t)return{"data-align":t}},edit:function({attributes:e,setAttributes:t}){const{width:n,content:a,columns:o}=e;return Qp()("The Text Columns block",{since:"5.3",alternative:"the Columns block"}),(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(nt.BlockAlignmentToolbar,{value:n,onChange:e=>t({width:e}),controls:["center","wide","full"]})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,null,(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Columns"),value:o,onChange:e=>t({columns:e}),min:2,max:4,required:!0}))),(0,Ke.createElement)("div",{...(0,nt.useBlockProps)({className:`align${n} columns-${o}`})},Array.from({length:o}).map(((e,n)=>(0,Ke.createElement)("div",{className:"wp-block-column",key:`column-${n}`},(0,Ke.createElement)(nt.RichText,{tagName:"p",value:a?.[n]?.children,onChange:e=>{t({content:[...a.slice(0,n),{children:e},...a.slice(n+1)]})},"aria-label":(0,tt.sprintf)((0,tt.__)("Column %d text"),n+1),placeholder:(0,tt.__)("New Column")}))))))},save:function({attributes:e}){const{width:t,content:n,columns:a}=e;return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:`align${t} columns-${a}`})},Array.from({length:a}).map(((e,t)=>(0,Ke.createElement)("div",{className:"wp-block-column",key:`column-${t}`},(0,Ke.createElement)(nt.RichText.Content,{tagName:"p",value:n?.[t]?.children})))))}},iS=()=>Xe({name:rS,metadata:oS,settings:lS}),sS=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})),cS={attributes:{content:{type:"string",source:"html",selector:"pre",default:""},textAlign:{type:"string"}},save({attributes:e}){const{textAlign:t,content:n}=e;return(0,Ke.createElement)(nt.RichText.Content,{tagName:"pre",style:{textAlign:t},value:n})}},mS={attributes:{content:{type:"string",source:"html",selector:"pre",default:"",__unstablePreserveWhiteSpace:!0,__experimentalRole:"content"},textAlign:{type:"string"}},supports:{anchor:!0,color:{gradients:!0,link:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},spacing:{padding:!0}},save({attributes:e}){const{textAlign:t,content:n}=e,a=ut()({[`has-text-align-${t}`]:t});return(0,Ke.createElement)("pre",{...nt.useBlockProps.save({className:a})},(0,Ke.createElement)(nt.RichText.Content,{value:n}))},migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},uS=[mS,cS];const pS={from:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,Qe.createBlock)("core/verse",e)}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,Qe.createBlock)("core/paragraph",e)}]},dS=pS,gS={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/verse",title:"Verse",category:"text",description:"Insert poetry. Use special spacing formats. Or quote song lyrics.",keywords:["poetry","poem"],textdomain:"default",attributes:{content:{type:"rich-text",source:"rich-text",selector:"pre",__unstablePreserveWhiteSpace:!0,__experimentalRole:"content"},textAlign:{type:"string"}},supports:{anchor:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,__experimentalFontFamily:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__experimentalBorder:{radius:!0,width:!0,color:!0,style:!0},interactivity:{clientNavigation:!0}},style:"wp-block-verse",editorStyle:"wp-block-verse-editor"},{name:hS}=gS,bS={icon:sS,example:{attributes:{content:(0,tt.__)("WHAT was he doing, the great god Pan,\n\tDown in the reeds by the river?\nSpreading ruin and scattering ban,\nSplashing and paddling with hoofs of a goat,\nAnd breaking the golden lilies afloat\n With the dragon-fly on the river.")}},transforms:dS,deprecated:uS,merge:(e,t)=>({content:e.content+"\n\n"+t.content}),edit:function({attributes:e,setAttributes:t,mergeBlocks:n,onRemove:a,insertBlocksAfter:o,style:r}){const{textAlign:l,content:i}=e,s=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${l}`]:l}),style:r});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(nt.AlignmentToolbar,{value:l,onChange:e=>{t({textAlign:e})}})),(0,Ke.createElement)(nt.RichText,{tagName:"pre",identifier:"content",preserveWhiteSpace:!0,value:i,onChange:e=>{t({content:e})},"aria-label":(0,tt.__)("Verse text"),placeholder:(0,tt.__)("Write verse…"),onRemove:a,onMerge:n,textAlign:l,...s,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>o((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))}))},save:function({attributes:e}){const{textAlign:t,content:n}=e,a=ut()({[`has-text-align-${t}`]:t});return(0,Ke.createElement)("pre",{...nt.useBlockProps.save({className:a})},(0,Ke.createElement)(nt.RichText.Content,{value:n}))}},_S=()=>Xe({name:hS,metadata:gS,settings:bS}),yS=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));function vS({tracks:e=[]}){return e.map((e=>(0,Ke.createElement)("track",{key:e.src,...e})))}const{attributes:fS}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/video",title:"Video",category:"media",description:"Embed a video from your media library or upload a new one.",keywords:["movie"],textdomain:"default",attributes:{autoplay:{type:"boolean",source:"attribute",selector:"video",attribute:"autoplay"},caption:{type:"rich-text",source:"rich-text",selector:"figcaption",__experimentalRole:"content"},controls:{type:"boolean",source:"attribute",selector:"video",attribute:"controls",default:!0},id:{type:"number",__experimentalRole:"content"},loop:{type:"boolean",source:"attribute",selector:"video",attribute:"loop"},muted:{type:"boolean",source:"attribute",selector:"video",attribute:"muted"},poster:{type:"string",source:"attribute",selector:"video",attribute:"poster"},preload:{type:"string",source:"attribute",selector:"video",attribute:"preload",default:"metadata"},src:{type:"string",source:"attribute",selector:"video",attribute:"src",__experimentalRole:"content"},playsInline:{type:"boolean",source:"attribute",selector:"video",attribute:"playsinline"},tracks:{__experimentalRole:"content",type:"array",items:{type:"object"},default:[]}},supports:{anchor:!0,align:!0,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-video-editor",style:"wp-block-video"},kS={attributes:fS,save({attributes:e}){const{autoplay:t,caption:n,controls:a,loop:o,muted:r,poster:l,preload:i,src:s,playsInline:c,tracks:m}=e;return(0,Ke.createElement)("figure",{...nt.useBlockProps.save()},s&&(0,Ke.createElement)("video",{autoPlay:t,controls:a,loop:o,muted:r,poster:l,preload:"metadata"!==i?i:void 0,src:s,playsInline:c},(0,Ke.createElement)(vS,{tracks:m})),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:n}))}},xS=[kS],wS=[{value:"auto",label:(0,tt.__)("Auto")},{value:"metadata",label:(0,tt.__)("Metadata")},{value:"none",label:(0,tt._x)("None","Preload value")}],ES=({setAttributes:e,attributes:t})=>{const{autoplay:n,controls:a,loop:o,muted:r,playsInline:l,preload:i}=t,s=(0,tt.__)("Autoplay may cause usability issues for some users."),c=_t.Platform.select({web:(0,_t.useCallback)((e=>e?s:null),[]),native:s}),m=(0,_t.useMemo)((()=>{const t=t=>n=>{e({[t]:n})};return{autoplay:t("autoplay"),loop:t("loop"),muted:t("muted"),controls:t("controls"),playsInline:t("playsInline")}}),[]),u=(0,_t.useCallback)((t=>{e({preload:t})}),[]);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Autoplay"),onChange:m.autoplay,checked:!!n,help:c}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Loop"),onChange:m.loop,checked:!!o}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Muted"),onChange:m.muted,checked:!!r}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Playback controls"),onChange:m.controls,checked:!!a}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Play inline"),onChange:m.playsInline,checked:!!l}),(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Preload"),value:i,onChange:u,options:wS,hideCancelButton:!0}))},CS=["text/vtt"],SS="subtitles",BS=[{label:(0,tt.__)("Subtitles"),value:"subtitles"},{label:(0,tt.__)("Captions"),value:"captions"},{label:(0,tt.__)("Descriptions"),value:"descriptions"},{label:(0,tt.__)("Chapters"),value:"chapters"},{label:(0,tt.__)("Metadata"),value:"metadata"}];function NS({tracks:e,onEditPress:t}){let n;return n=0===e.length?(0,Ke.createElement)("p",{className:"block-library-video-tracks-editor__tracks-informative-message"},(0,tt.__)("Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users.")):e.map(((e,n)=>(0,Ke.createElement)(et.__experimentalHStack,{key:n,className:"block-library-video-tracks-editor__track-list-track"},(0,Ke.createElement)("span",null,e.label," "),(0,Ke.createElement)(et.Button,{variant:"tertiary",onClick:()=>t(n),"aria-label":(0,tt.sprintf)((0,tt.__)("Edit %s"),e.label)},(0,tt.__)("Edit"))))),(0,Ke.createElement)(et.MenuGroup,{label:(0,tt.__)("Text tracks"),className:"block-library-video-tracks-editor__track-list"},n)}function TS({track:e,onChange:t,onClose:n,onRemove:a}){const{src:o="",label:r="",srcLang:l="",kind:i=SS}=e,s=o.startsWith("blob:")?"":(0,pt.getFilename)(o)||"";return(0,Ke.createElement)(et.NavigableMenu,null,(0,Ke.createElement)(et.__experimentalVStack,{className:"block-library-video-tracks-editor__single-track-editor",spacing:"4"},(0,Ke.createElement)("span",{className:"block-library-video-tracks-editor__single-track-editor-edit-track-label"},(0,tt.__)("Edit track")),(0,Ke.createElement)("span",null,(0,tt.__)("File"),": ",(0,Ke.createElement)("b",null,s)),(0,Ke.createElement)(et.__experimentalGrid,{columns:2,gap:4},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,autoFocus:!0,onChange:n=>t({...e,label:n}),label:(0,tt.__)("Label"),value:r,help:(0,tt.__)("Title of track")}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,onChange:n=>t({...e,srcLang:n}),label:(0,tt.__)("Source language"),value:l,help:(0,tt.__)("Language tag (en, fr, etc.)")})),(0,Ke.createElement)(et.__experimentalVStack,{spacing:"8"},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,className:"block-library-video-tracks-editor__single-track-editor-kind-select",options:BS,value:i,label:(0,tt.__)("Kind"),onChange:n=>{t({...e,kind:n})}}),(0,Ke.createElement)(et.__experimentalHStack,{className:"block-library-video-tracks-editor__single-track-editor-buttons-container"},(0,Ke.createElement)(et.Button,{variant:"secondary",onClick:()=>{const a={};let o=!1;""===r&&(a.label=(0,tt.__)("English"),o=!0),""===l&&(a.srcLang="en",o=!0),void 0===e.kind&&(a.kind=SS,o=!0),o&&t({...e,...a}),n()}},(0,tt.__)("Close")),(0,Ke.createElement)(et.Button,{isDestructive:!0,variant:"link",onClick:a},(0,tt.__)("Remove track"))))))}function IS({tracks:e=[],onChange:t}){const n=(0,gt.useSelect)((e=>e(nt.store).getSettings().mediaUpload),[]),[a,o]=(0,_t.useState)(null);return n?(0,Ke.createElement)(et.Dropdown,{contentClassName:"block-library-video-tracks-editor",renderToggle:({isOpen:e,onToggle:t})=>(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.ToolbarButton,{label:(0,tt.__)("Text tracks"),showTooltip:!0,"aria-expanded":e,"aria-haspopup":"true",onClick:t},(0,tt.__)("Text tracks"))),renderContent:()=>null!==a?(0,Ke.createElement)(TS,{track:e[a],onChange:n=>{const o=[...e];o[a]=n,t(o)},onClose:()=>o(null),onRemove:()=>{t(e.filter(((e,t)=>t!==a))),o(null)}}):(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.NavigableMenu,null,(0,Ke.createElement)(NS,{tracks:e,onEditPress:o}),(0,Ke.createElement)(et.MenuGroup,{className:"block-library-video-tracks-editor__add-tracks-container",label:(0,tt.__)("Add tracks")},(0,Ke.createElement)(nt.MediaUpload,{onSelect:({url:n})=>{const a=e.length;t([...e,{src:n}]),o(a)},allowedTypes:CS,render:({open:e})=>(0,Ke.createElement)(et.MenuItem,{icon:Qd,onClick:e},(0,tt.__)("Open Media Library"))}),(0,Ke.createElement)(nt.MediaUploadCheck,null,(0,Ke.createElement)(et.FormFileUpload,{onChange:a=>{const r=a.target.files,l=e.length;n({allowedTypes:CS,filesList:r,onFileChange:([{url:n}])=>{const a=[...e];a[l]||(a[l]={}),a[l]={...e[l],src:n},t(a),o(l)}})},accept:".vtt,text/vtt",render:({openFileDialog:e})=>(0,Ke.createElement)(et.MenuItem,{icon:np,onClick:()=>{e()}},(0,tt.__)("Upload"))})))))}):null}const PS=e=>(0,Ke.createElement)(et.Placeholder,{className:"block-editor-media-placeholder",withIllustration:!0,icon:yS,label:(0,tt.__)("Video"),instructions:(0,tt.__)("Upload a video file, pick one from your media library, or add one with a URL.")},e),MS=["video"],zS=["image"];const RS=function e({isSelected:t,attributes:n,className:a,setAttributes:o,insertBlocksAfter:r,onReplace:l}){const i=(0,jt.useInstanceId)(e),s=(0,_t.useRef)(),c=(0,_t.useRef)(),{id:m,controls:u,poster:p,src:d,tracks:g}=n,h=!m&&(0,It.isBlobURL)(d),{getSettings:b}=(0,gt.useSelect)(nt.store);function _(e){e&&e.url?o({src:e.url,id:e.id,poster:e.image?.src!==e.icon?e.image?.src:void 0,caption:e.caption}):o({src:void 0,id:void 0,poster:void 0,caption:void 0})}function y(e){if(e!==d){const t=Ot({attributes:{url:e}});if(void 0!==t&&l)return void l(t);o({src:e,id:void 0,poster:void 0})}}(0,_t.useEffect)((()=>{if(!m&&(0,It.isBlobURL)(d)){const e=(0,It.getBlobByURL)(d);e&&b().mediaUpload({filesList:[e],onFileChange:([e])=>_(e),onError:f,allowedTypes:MS})}}),[]),(0,_t.useEffect)((()=>{s.current&&s.current.load()}),[p]);const{createErrorNotice:v}=(0,gt.useDispatch)(Pt.store);function f(e){v(e,{type:"snackbar"})}const k=ut()(a,{"is-transient":h}),x=(0,nt.useBlockProps)({className:k});if(!d)return(0,Ke.createElement)("div",{...x},(0,Ke.createElement)(nt.MediaPlaceholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:yS}),onSelect:_,onSelectURL:y,accept:"video/*",allowedTypes:MS,value:n,onError:f,placeholder:PS}));const w=`video-block__poster-image-description-${i}`;return(0,Ke.createElement)(Ke.Fragment,null,t&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(IS,{tracks:g,onChange:e=>{o({tracks:e})}})),(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(nt.MediaReplaceFlow,{mediaId:m,mediaURL:d,allowedTypes:MS,accept:"video/*",onSelect:_,onSelectURL:y,onError:f}))),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(ES,{setAttributes:o,attributes:n}),(0,Ke.createElement)(nt.MediaUploadCheck,null,(0,Ke.createElement)(et.BaseControl,{className:"editor-video-poster-control"},(0,Ke.createElement)(et.BaseControl.VisualLabel,null,(0,tt.__)("Poster image")),(0,Ke.createElement)(nt.MediaUpload,{title:(0,tt.__)("Select poster image"),onSelect:function(e){o({poster:e.url})},allowedTypes:zS,render:({open:e})=>(0,Ke.createElement)(et.Button,{variant:"primary",onClick:e,ref:c,"aria-describedby":w},p?(0,tt.__)("Replace"):(0,tt.__)("Select"))}),(0,Ke.createElement)("p",{id:w,hidden:!0},p?(0,tt.sprintf)((0,tt.__)("The current poster image url is %s"),p):(0,tt.__)("There is no poster image currently selected")),!!p&&(0,Ke.createElement)(et.Button,{onClick:function(){o({poster:void 0}),c.current.focus()},variant:"tertiary"},(0,tt.__)("Remove")))))),(0,Ke.createElement)("figure",{...x},(0,Ke.createElement)(et.Disabled,{isDisabled:!t},(0,Ke.createElement)("video",{controls:u,poster:p,src:d,ref:s},(0,Ke.createElement)(vS,{tracks:g}))),h&&(0,Ke.createElement)(et.Spinner,null),(0,Ke.createElement)(Qt,{attributes:n,setAttributes:o,isSelected:t,insertBlocksAfter:r,label:(0,tt.__)("Video caption text"),showToolbarButton:t})))};const AS={from:[{type:"files",isMatch:e=>1===e.length&&0===e[0].type.indexOf("video/"),transform(e){const t=e[0];return(0,Qe.createBlock)("core/video",{src:(0,It.createBlobURL)(t)})}},{type:"shortcode",tag:"video",attributes:{src:{type:"string",shortcode:({named:{src:e,mp4:t,m4v:n,webm:a,ogv:o,flv:r}})=>e||t||n||a||o||r},poster:{type:"string",shortcode:({named:{poster:e}})=>e},loop:{type:"string",shortcode:({named:{loop:e}})=>e},autoplay:{type:"string",shortcode:({named:{autoplay:e}})=>e},preload:{type:"string",shortcode:({named:{preload:e}})=>e}}},{type:"raw",isMatch:e=>"P"===e.nodeName&&1===e.children.length&&"VIDEO"===e.firstChild.nodeName,transform:e=>{const t=e.firstChild,n={autoplay:!!t.hasAttribute("autoplay")||void 0,controls:!!t.hasAttribute("controls")&&void 0,loop:!!t.hasAttribute("loop")||void 0,muted:!!t.hasAttribute("muted")||void 0,preload:t.getAttribute("preload")||void 0,playsInline:!!t.hasAttribute("playsinline")||void 0,poster:t.getAttribute("poster")||void 0,src:t.getAttribute("src")||void 0};return(0,Qe.createBlock)("core/video",n)}}]},HS=AS,LS={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/video",title:"Video",category:"media",description:"Embed a video from your media library or upload a new one.",keywords:["movie"],textdomain:"default",attributes:{autoplay:{type:"boolean",source:"attribute",selector:"video",attribute:"autoplay"},caption:{type:"rich-text",source:"rich-text",selector:"figcaption",__experimentalRole:"content"},controls:{type:"boolean",source:"attribute",selector:"video",attribute:"controls",default:!0},id:{type:"number",__experimentalRole:"content"},loop:{type:"boolean",source:"attribute",selector:"video",attribute:"loop"},muted:{type:"boolean",source:"attribute",selector:"video",attribute:"muted"},poster:{type:"string",source:"attribute",selector:"video",attribute:"poster"},preload:{type:"string",source:"attribute",selector:"video",attribute:"preload",default:"metadata"},src:{type:"string",source:"attribute",selector:"video",attribute:"src",__experimentalRole:"content"},playsInline:{type:"boolean",source:"attribute",selector:"video",attribute:"playsinline"},tracks:{__experimentalRole:"content",type:"array",items:{type:"object"},default:[]}},supports:{anchor:!0,align:!0,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-video-editor",style:"wp-block-video"},{name:DS}=LS,FS={icon:yS,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/c/ca/Wood_thrush_in_Central_Park_switch_sides_%2816510%29.webm",caption:(0,tt.__)("Wood thrush singing in Central Park, NYC.")}},transforms:HS,deprecated:xS,edit:RS,save:function({attributes:e}){const{autoplay:t,caption:n,controls:a,loop:o,muted:r,poster:l,preload:i,src:s,playsInline:c,tracks:m}=e;return(0,Ke.createElement)("figure",{...nt.useBlockProps.save()},s&&(0,Ke.createElement)("video",{autoPlay:t,controls:a,loop:o,muted:r,poster:l,preload:"metadata"!==i?i:void 0,src:s,playsInline:c},(0,Ke.createElement)(vS,{tracks:m})),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{className:(0,nt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:n}))}},VS=()=>Xe({name:DS,metadata:LS,settings:FS});const $S={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let OS;const GS=new Uint8Array(16);function US(){if(!OS&&(OS="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!OS))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return OS(GS)}const qS=[];for(let e=0;e<256;++e)qS.push((e+256).toString(16).slice(1));function jS(e,t=0){return qS[e[t+0]]+qS[e[t+1]]+qS[e[t+2]]+qS[e[t+3]]+"-"+qS[e[t+4]]+qS[e[t+5]]+"-"+qS[e[t+6]]+qS[e[t+7]]+"-"+qS[e[t+8]]+qS[e[t+9]]+"-"+qS[e[t+10]]+qS[e[t+11]]+qS[e[t+12]]+qS[e[t+13]]+qS[e[t+14]]+qS[e[t+15]]}const WS=function(e,t,n){if($S.randomUUID&&!t&&!e)return $S.randomUUID();const a=(e=e||{}).random||(e.rng||US)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=a[e];return t}return jS(a)},{usesContextKey:ZS}=Ft(nt.privateApis),QS="core/footnote",KS="core/post-content",YS={title:(0,tt.__)("Footnote"),tagName:"sup",className:"fn",attributes:{"data-fn":"data-fn"},interactive:!0,contentEditable:!1,[ZS]:["postType","postId"],edit:function({value:e,onChange:t,isObjectActive:n,context:{postType:a,postId:o}}){const r=(0,gt.useRegistry)(),{getSelectedBlockClientId:l,getBlocks:i,getBlockRootClientId:s,getBlockName:c,getBlockParentsByBlockName:m}=r.select(nt.store),u=(0,gt.useSelect)((e=>{if(!e(Qe.store).getBlockType("core/footnotes"))return!1;const t=e(nt.store).getSettings().allowedBlockTypes;if(!1===t||Array.isArray(t)&&!t.includes("core/footnotes"))return!1;const n=e(dt.store).getEntityRecord("postType",a,o);if("string"!=typeof n?.meta?.footnotes)return!1;const{getBlockParentsByBlockName:r,getSelectedBlockClientId:l}=e(nt.store),i=r(l(),"core/block");return!i||0===i.length}),[a,o]),{selectionChange:p,insertBlock:d}=(0,gt.useDispatch)(nt.store);if(!u)return null;return(0,Ke.createElement)(nt.RichTextToolbarButton,{icon:Wp,title:(0,tt.__)("Footnote"),onClick:function(){r.batch((()=>{let a;if(n){const t=e.replacements[e.start];a=t?.attributes?.["data-fn"]}else{a=WS();const n=(0,Rn.insertObject)(e,{type:QS,attributes:{"data-fn":a},innerHTML:`<a href="#${a}" id="${a}-link">*</a>`},e.end,e.end);n.start=n.end-1,t(n)}const o=l(),r=m(o,KS);let u=null;{const e=[...r.length?i(r[0]):i()];for(;e.length;){const t=e.shift();if("core/footnotes"===t.name){u=t;break}e.push(...t.innerBlocks)}}if(!u){let e=s(o);for(;e&&c(e)!==KS;)e=s(e);u=(0,Qe.createBlock)("core/footnotes"),d(u,void 0,e)}p(u.clientId,a,0,0)}))},isActive:n})}},JS={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/footnotes",title:"Footnotes",category:"text",description:"Display footnotes added to the page.",keywords:["references"],textdomain:"default",usesContext:["postId","postType"],supports:{__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!1,color:!1,width:!1,style:!1}},color:{background:!0,link:!0,text:!0,__experimentalDefaultControls:{link:!0,text:!0}},html:!1,multiple:!1,reusable:!1,inserter:!1,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-footnotes"},{name:XS}=JS,eB={icon:Wp,edit:function({context:{postType:e,postId:t}}){const[n,a]=(0,dt.useEntityProp)("postType",e,"meta",t),o="string"==typeof n?.footnotes,r=n?.footnotes?JSON.parse(n.footnotes):[],l=(0,nt.useBlockProps)();return o?r.length?(0,Ke.createElement)("ol",{...l},r.map((({id:e,content:t})=>(0,Ke.createElement)("li",{key:e,onMouseDown:e=>{e.target===e.currentTarget&&(e.target.firstElementChild.focus(),e.preventDefault())}},(0,Ke.createElement)(nt.RichText,{id:e,tagName:"span",value:t,identifier:e,onFocus:e=>{e.target.textContent.trim()||e.target.scrollIntoView()},onChange:t=>{a({...n,footnotes:JSON.stringify(r.map((n=>n.id===e?{content:t,id:e}:n)))})}})," ",(0,Ke.createElement)("a",{href:`#${e}-link`},"↩︎"))))):(0,Ke.createElement)("div",{...l},(0,Ke.createElement)(et.Placeholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:Wp}),label:(0,tt.__)("Footnotes"),instructions:(0,tt.__)("Footnotes found in blocks within this document will be displayed here.")})):(0,Ke.createElement)("div",{...l},(0,Ke.createElement)(et.Placeholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:Wp}),label:(0,tt.__)("Footnotes"),instructions:(0,tt.__)("Footnotes are not supported here. Add this block to post or page content.")}))}};(0,Rn.registerFormatType)(QS,YS);const tB=()=>{Xe({name:XS,metadata:JS,settings:eB})};var nB=n(2321),aB=n.n(nB);const oB=()=>(()=>{const n=[te,F,H,R,O,G,Be,e,o,r,l,i,s,m,u,p,g,S,B,N,T,A,D,V,$,q,j,W,Y,X,ee,J,ye,ve,Ne,Ie,Pe,Me,ze,Le,De,Fe,Ve,Oe,qe,je,We,Ze,Z,Q,K,Re,He,Ae,fe,Ge,t,_e,ue,pe,ce,ne,ae,re,le,se,me,he,de,ge,be,xe,we,Ee,Ce,ke,Te,d,h,b,_,y,v,f,C,x,w,E,k,ie,$e,L,U,Ue,Se,oe];return window?.__experimentalEnableFormBlocks&&(n.push(I),n.push(P),n.push(M),n.push(z)),window?.wp?.oldEditor&&(window?.wp?.needsClassicBlock||!window?.__experimentalDisableTinymce||new URLSearchParams(window?.location?.search).get("requiresTinymce"))&&n.push(c),n.filter(Boolean)})().filter((({metadata:e})=>!aB()(e))),rB=(e=oB())=>{e.forEach((({init:e})=>e())),(0,Qe.setDefaultBlockName)(x_),window.wp&&window.wp.oldEditor&&e.some((({name:e})=>e===da))&&(0,Qe.setFreeformContentHandlerName)(da),(0,Qe.setUnregisteredTypeHandlerName)(bg),(0,Qe.setGroupingBlockName)(au)},lB=void 0})(),(window.wp=window.wp||{}).blockLibrary=a})(); \ No newline at end of file
+function Jl(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function Xl(e){return"#"+e.map(Jl).join("")}function ei(e){return e?(t=e,Array.isArray(t[0])?e:[e]):[];var t}function ti(e,t,n){for(var a=0;a<n.length;a++)if(ni(e,t,n[a]))return!0;return!1}function ni(e,t,n){switch(n.length){case 3:if(function(e,t,n){if(255!==e[t+3])return!0;if(e[t]===n[0]&&e[t+1]===n[1]&&e[t+2]===n[2])return!0;return!1}(e,t,n))return!0;break;case 4:if(function(e,t,n){if(e[t+3]&&n[3])return e[t]===n[0]&&e[t+1]===n[1]&&e[t+2]===n[2]&&e[t+3]===n[3];return e[t+3]===n[3]}(e,t,n))return!0;break;case 5:if(function(e,t,n){var a=n[0],o=n[1],r=n[2],l=n[3],i=n[4],s=e[t+3],c=ai(s,l,i);if(!l)return c;if(!s&&c)return!0;if(ai(e[t],a,i)&&ai(e[t+1],o,i)&&ai(e[t+2],r,i)&&c)return!0;return!1}(e,t,n))return!0;break;default:return!1}}function ai(e,t,n){return e>=t-n&&e<=t+n}function oi(e,t,n){for(var a={},o=n.ignoredColor,r=n.step,l=[0,0,0,0,0],i=0;i<t;i+=r){var s=e[i],c=e[i+1],m=e[i+2],u=e[i+3];if(!o||!ti(e,i,o)){var p=Math.round(s/24)+","+Math.round(c/24)+","+Math.round(m/24);a[p]?a[p]=[a[p][0]+s*u,a[p][1]+c*u,a[p][2]+m*u,a[p][3]+u,a[p][4]+1]:a[p]=[s*u,c*u,m*u,u,1],l[4]<a[p][4]&&(l=a[p])}}var d=l[0],g=l[1],h=l[2],b=l[3],_=l[4];return b?[Math.round(d/b),Math.round(g/b),Math.round(h/b),Math.round(b/_)]:n.defaultColor}function ri(e,t,n){for(var a=0,o=0,r=0,l=0,i=0,s=n.ignoredColor,c=n.step,m=0;m<t;m+=c){var u=e[m+3],p=e[m]*u,d=e[m+1]*u,g=e[m+2]*u;s&&ti(e,m,s)||(a+=p,o+=d,r+=g,l+=u,i++)}return l?[Math.round(a/l),Math.round(o/l),Math.round(r/l),Math.round(l/i)]:n.defaultColor}function li(e,t,n){for(var a=0,o=0,r=0,l=0,i=0,s=n.ignoredColor,c=n.step,m=0;m<t;m+=c){var u=e[m],p=e[m+1],d=e[m+2],g=e[m+3];s&&ti(e,m,s)||(a+=u*u*g,o+=p*p*g,r+=d*d*g,l+=g,i++)}return l?[Math.round(Math.sqrt(a/l)),Math.round(Math.sqrt(o/l)),Math.round(Math.sqrt(r/l)),Math.round(l/i)]:n.defaultColor}function ii(e){return si(e,"defaultColor",[0,0,0,0])}function si(e,t,n){return void 0===e[t]?n:e[t]}function ci(e){if(ui(e)){var t=e.naturalWidth,n=e.naturalHeight;return e.naturalWidth||-1===e.src.search(/\.svg(\?|$)/i)||(t=n=100),{width:t,height:n}}return function(e){return"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement}(e)?{width:e.videoWidth,height:e.videoHeight}:{width:e.width,height:e.height}}function mi(e){return function(e){return"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement}(e)?"canvas":function(e){return pi&&e instanceof OffscreenCanvas}(e)?"offscreencanvas":function(e){return"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap}(e)?"imagebitmap":e.src}function ui(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement}var pi="undefined"!=typeof OffscreenCanvas;var di="undefined"==typeof window;function gi(e){return Error("FastAverageColor: "+e)}function hi(e,t){t||console.error(e)}var bi=function(){function e(){this.canvas=null,this.ctx=null}return e.prototype.getColorAsync=function(e,t){if(!e)return Promise.reject(gi("call .getColorAsync() without resource."));if("string"==typeof e){if("undefined"==typeof Image)return Promise.reject(gi("resource as string is not supported in this environment"));var n=new Image;return n.crossOrigin=t&&t.crossOrigin||"",n.src=e,this.bindImageEvents(n,t)}if(ui(e)&&!e.complete)return this.bindImageEvents(e,t);var a=this.getColor(e,t);return a.error?Promise.reject(a.error):Promise.resolve(a)},e.prototype.getColor=function(e,t){var n=ii(t=t||{});if(!e)return hi(r=gi("call .getColor(null) without resource"),t.silent),this.prepareResult(n,r);var a=function(e,t){var n,a=si(t,"left",0),o=si(t,"top",0),r=si(t,"width",e.width),l=si(t,"height",e.height),i=r,s=l;return"precision"===t.mode||(r>l?(n=r/l,i=100,s=Math.round(i/n)):(n=l/r,s=100,i=Math.round(s/n)),(i>r||s>l||i<10||s<10)&&(i=r,s=l)),{srcLeft:a,srcTop:o,srcWidth:r,srcHeight:l,destWidth:i,destHeight:s}}(ci(e),t);if(!(a.srcWidth&&a.srcHeight&&a.destWidth&&a.destHeight))return hi(r=gi('incorrect sizes for resource "'.concat(mi(e),'"')),t.silent),this.prepareResult(n,r);if(!this.canvas&&(this.canvas=di?pi?new OffscreenCanvas(1,1):null:document.createElement("canvas"),!this.canvas))return hi(r=gi("OffscreenCanvas is not supported in this browser"),t.silent),this.prepareResult(n,r);if(!this.ctx){if(this.ctx=this.canvas.getContext("2d",{willReadFrequently:!0}),!this.ctx)return hi(r=gi("Canvas Context 2D is not supported in this browser"),t.silent),this.prepareResult(n);this.ctx.imageSmoothingEnabled=!1}this.canvas.width=a.destWidth,this.canvas.height=a.destHeight;try{this.ctx.clearRect(0,0,a.destWidth,a.destHeight),this.ctx.drawImage(e,a.srcLeft,a.srcTop,a.srcWidth,a.srcHeight,0,0,a.destWidth,a.destHeight);var o=this.ctx.getImageData(0,0,a.destWidth,a.destHeight).data;return this.prepareResult(this.getColorFromArray4(o,t))}catch(a){var r;return hi(r=gi("security error (CORS) for resource ".concat(mi(e),".\nDetails: https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image")),t.silent),!t.silent&&console.error(a),this.prepareResult(n,r)}},e.prototype.getColorFromArray4=function(e,t){t=t||{};var n=e.length,a=ii(t);if(n<4)return a;var o,r=n-n%4,l=4*(t.step||1);switch(t.algorithm||"sqrt"){case"simple":o=ri;break;case"sqrt":o=li;break;case"dominant":o=oi;break;default:throw gi("".concat(t.algorithm," is unknown algorithm"))}return o(e,r,{defaultColor:a,ignoredColor:ei(t.ignoredColor),step:l})},e.prototype.prepareResult=function(e,t){var n,a=e.slice(0,3),o=[e[0],e[1],e[2],e[3]/255],r=(299*(n=e)[0]+587*n[1]+114*n[2])/1e3<128;return{value:[e[0],e[1],e[2],e[3]],rgb:"rgb("+a.join(",")+")",rgba:"rgba("+o.join(",")+")",hex:Xl(a),hexa:Xl(e),isDark:r,isLight:!r,error:t}},e.prototype.destroy=function(){this.canvas&&(this.canvas.width=1,this.canvas.height=1,this.canvas=null),this.ctx=null},e.prototype.bindImageEvents=function(e,t){var n=this;return new Promise((function(a,o){var r=function(){s();var r=n.getColor(e,t);r.error?o(r.error):a(r)},l=function(){s(),o(gi('Error loading image "'.concat(e.src,'".')))},i=function(){s(),o(gi('Image "'.concat(e.src,'" loading aborted')))},s=function(){e.removeEventListener("load",r),e.removeEventListener("error",l),e.removeEventListener("abort",i)};e.addEventListener("load",r),e.addEventListener("error",l),e.addEventListener("abort",i)}))},e}();const _i=window.wp.hooks;!function(e){e.forEach((function(e){Yl.indexOf(e)<0&&(e(Ql,Gl),Yl.push(e))}))}([function(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"},a={};for(var o in n)a[n[o]]=o;var r={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,l,i=a[this.toHex()];if(i)return i;if(null==t?void 0:t.closest){var s=this.toRgb(),c=1/0,m="black";if(!r.length)for(var u in n)r[u]=new e(n[u]).toRgb();for(var p in n){var d=(o=s,l=r[p],Math.pow(o.r-l.r,2)+Math.pow(o.g-l.g,2)+Math.pow(o.b-l.b,2));d<c&&(c=d,m=p)}return m}},t.string.push([function(t){var a=t.toLowerCase(),o="transparent"===a?"#0000":n[a];return o?new e(o).toRgb():null},"name"])}]);const yi="#FFF";function vi(){return vi.fastAverageColor||(vi.fastAverageColor=new bi),vi.fastAverageColor}const fi=Rt((async e=>{if(!e)return yi;const{r:t,g:n,b:a,a:o}=Kl(yi).toRgb();try{const r=(0,_i.applyFilters)("media.crossOrigin",void 0,e);return(await vi().getColorAsync(e,{defaultColor:[t,n,a,255*o],silent:!0,crossOrigin:r})).hex}catch(e){return yi}}));function ki(e,t,n){if(t===n||100===e)return Kl(t).isDark();const a=Kl(t).alpha(e/100).toRgb(),o=Kl(n).toRgb(),r=(i=o,{r:(l=a).r*l.a+i.r*i.a*(1-l.a),g:l.g*l.a+i.g*i.a*(1-l.a),b:l.b*l.a+i.b*i.a*(1-l.a),a:l.a+i.a*(1-l.a)});var l,i;return Kl(r).isDark()}const xi=(0,jt.compose)([(0,nt.withColors)({overlayColor:"background-color"})])((function({attributes:e,clientId:t,isSelected:n,overlayColor:a,setAttributes:o,setOverlayColor:r,toggleSelection:l,context:{postId:i,postType:s}}){const{contentPosition:c,id:m,url:u,backgroundType:p,useFeaturedImage:d,dimRatio:g,focalPoint:h,hasParallax:b,isDark:_,isRepeated:y,minHeight:v,minHeightUnit:f,alt:k,allowedBlocks:x,templateLock:w,tagName:E="div",isUserOverlayColor:C}=e,[S]=(0,dt.useEntityProp)("postType",s,"featured_media",i),{__unstableMarkNextChangeAsNotPersistent:B}=(0,gt.useDispatch)(nt.store),N=(0,gt.useSelect)((e=>S&&e(dt.store).getMedia(S,{context:"view"})),[S]),T=N?.source_url;(0,_t.useEffect)((()=>{(async()=>{if(!d)return;const e=await fi(T);let t=a.color;C||(t=e,B(),r(t));const n=ki(g,t,e);B(),o({isDark:n})})()}),[T]);const I=d?T:u?.replaceAll("&amp;","&"),P=d?Lr:p,{createErrorNotice:M}=(0,gt.useDispatch)(Pt.store),{gradientClass:z,gradientValue:R}=(0,nt.__experimentalUseGradient)(),A=async e=>{const t=function(e){if(!e||!e.url)return{url:void 0,id:void 0};let t;if((0,It.isBlobURL)(e.url)&&(e.type=(0,It.getBlobTypeByURL)(e.url)),e.media_type)t=e.media_type===Lr?Lr:Dr;else{if(e.type!==Lr&&e.type!==Dr)return;t=e.type}return{url:e.url,id:e.id,alt:e?.alt,backgroundType:t,...t===Dr?{hasParallax:void 0}:{}}}(e),n=[e?.type,e?.media_type].includes(Lr),l=await fi(n?e?.url:void 0);let i=a.color;C||(i=l,r(i),B());const s=void 0===u&&100===g?50:g,c=ki(s,i,l);o({...t,focalPoint:void 0,useFeaturedImage:void 0,dimRatio:s,isDark:c})},H=async e=>{const t=await fi(I),n=ki(g,e,t);r(e),B(),o({isUserOverlayColor:!0,isDark:n})},L=e=>{M(e,{type:"snackbar"})},D=((e,t)=>!e&&(0,It.isBlobURL)(t))(m,I),F=Lr===P,V=Dr===P,[$,{height:O,width:G}]=(0,jt.useResizeObserver)(),U=(0,_t.useMemo)((()=>({height:"px"===f?v:"auto",width:"auto"})),[v,f]),q=v&&f?`${v}${f}`:v,j=!(b||y),W={minHeight:q||void 0},Z=I?`url(${I})`:void 0,Q=Or(h),K={backgroundColor:a.color},Y={objectPosition:h&&j?Or(h):void 0},J=!!(I||a.color||R),X=(0,gt.useSelect)((e=>e(nt.store).getBlock(t).innerBlocks.length>0),[t]),ee=(0,_t.useRef)(),te=(0,nt.useBlockProps)({ref:ee}),[ne]=(0,nt.useSettings)("typography.fontSizes"),ae=function(e){return[["core/paragraph",{align:"center",placeholder:(0,tt.__)("Write title…"),...e}]]}({fontSize:ne?.length>0?"large":void 0}),oe=(0,nt.useInnerBlocksProps)({className:"wp-block-cover__inner-container"},{template:X?void 0:ae,templateInsertUpdatesSelection:!0,allowedBlocks:x,templateLock:w,dropZoneElement:ee.current}),re=(0,_t.useRef)(),le={isVideoBackground:V,isImageBackground:F,mediaElement:re,hasInnerBlocks:X,url:I,isImgElement:j,overlayColor:a},ie=async()=>{const e=!d,t=e?await fi(T):yi,n=C?a.color:t;C||(r(e?n:void 0),B());const l=100===g?50:g,i=ki(l,n,t);o({id:void 0,url:void 0,useFeaturedImage:e,dimRatio:l,backgroundType:d?Lr:void 0,isDark:i})},se=(0,Ke.createElement)(vl,{attributes:e,setAttributes:o,onSelectMedia:A,currentSettings:le,toggleUseFeaturedImage:ie}),ce=(0,Ke.createElement)(_l,{attributes:e,setAttributes:o,clientId:t,setOverlayColor:H,coverRef:ee,currentSettings:le,toggleUseFeaturedImage:ie,updateDimRatio:async e=>{const t=await fi(I),n=ki(e,a.color,t);o({dimRatio:e,isDark:n})},onClearMedia:()=>{let e=a.color;C||(e="#000",r(void 0),B());const t=ki(g,e,yi);o({url:void 0,id:void 0,backgroundType:void 0,focalPoint:void 0,hasParallax:void 0,isRepeated:void 0,useFeaturedImage:void 0,isDark:t})}}),me={className:"block-library-cover__resize-container",clientId:t,height:O,minHeight:q,onResizeStart:()=>{o({minHeightUnit:"px"}),l(!1)},onResize:e=>{o({minHeight:e})},onResizeStop:e=>{l(!0),o({minHeight:e})},showHandle:!e.style?.dimensions?.aspectRatio,size:U,width:G};if(!d&&!X&&!J)return(0,Ke.createElement)(Ke.Fragment,null,se,ce,n&&(0,Ke.createElement)(wl,{...me}),(0,Ke.createElement)(E,{...te,className:ut()("is-placeholder",te.className),style:{...te.style,minHeight:q||void 0}},$,(0,Ke.createElement)(fl,{onSelectMedia:A,onError:L,toggleUseFeaturedImage:ie},(0,Ke.createElement)("div",{className:"wp-block-cover__placeholder-background-options"},(0,Ke.createElement)(nt.ColorPalette,{disableCustomColors:!0,value:a.color,onChange:H,clearable:!1})))));const ue=ut()({"is-dark-theme":_,"is-light":!_,"is-transient":D,"has-parallax":b,"is-repeated":y,"has-custom-content-position":!Ur(c)},qr(c));return(0,Ke.createElement)(Ke.Fragment,null,se,ce,(0,Ke.createElement)(E,{...te,className:ut()(ue,te.className),style:{...W,...te.style},"data-url":I},$,(!d||I)&&(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__background",Gr(g),{[a.class]:a.class,"has-background-dim":void 0!==g,"wp-block-cover__gradient-background":I&&R&&0!==g,"has-background-gradient":R,[z]:z}),style:{backgroundImage:R,...K}}),!I&&d&&(0,Ke.createElement)(et.Placeholder,{className:"wp-block-cover__image--placeholder-image",withIllustration:!0}),I&&F&&(j?(0,Ke.createElement)("img",{ref:re,className:"wp-block-cover__image-background",alt:k,src:I,style:Y}):(0,Ke.createElement)("div",{ref:re,role:k?"img":void 0,"aria-label":k||void 0,className:ut()(ue,"wp-block-cover__image-background"),style:{backgroundImage:Z,backgroundPosition:Q}})),I&&V&&(0,Ke.createElement)("video",{ref:re,className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:I,style:Y}),D&&(0,Ke.createElement)(et.Spinner,null),(0,Ke.createElement)(fl,{disableMediaButtons:!0,onSelectMedia:A,onError:L,toggleUseFeaturedImage:ie}),(0,Ke.createElement)("div",{...oe})),n&&(0,Ke.createElement)(wl,{...me}))}));const{cleanEmptyObject:wi}=Ft(nt.privateApis),Ei={from:[{type:"block",blocks:["core/image"],transform:({caption:e,url:t,alt:n,align:a,id:o,anchor:r,style:l})=>(0,Qe.createBlock)("core/cover",{dimRatio:50,url:t,alt:n,align:a,id:o,anchor:r,style:{color:{duotone:l?.color?.duotone}}},[(0,Qe.createBlock)("core/paragraph",{content:e,fontSize:"large",align:"center"})])},{type:"block",blocks:["core/video"],transform:({caption:e,src:t,align:n,id:a,anchor:o})=>(0,Qe.createBlock)("core/cover",{dimRatio:50,url:t,align:n,id:a,backgroundType:Dr,anchor:o},[(0,Qe.createBlock)("core/paragraph",{content:e,fontSize:"large",align:"center"})])},{type:"block",blocks:["core/group"],transform:(e,t)=>{const{align:n,anchor:a,backgroundColor:o,gradient:r,style:l}=e;if(1===t?.length&&"core/cover"===t[0]?.name)return(0,Qe.createBlock)("core/cover",t[0].attributes,t[0].innerBlocks);const i={align:n,anchor:a,dimRatio:o||r||l?.color?.background||l?.color?.gradient?void 0:50,overlayColor:o,customOverlayColor:l?.color?.background,gradient:r,customGradient:l?.color?.gradient},s={...e,backgroundColor:void 0,gradient:void 0,style:wi({...e?.style,color:l?.color?{...l?.color,background:void 0,gradient:void 0}:void 0})};return(0,Qe.createBlock)("core/cover",i,[(0,Qe.createBlock)("core/group",s,t)])}}],to:[{type:"block",blocks:["core/image"],isMatch:({backgroundType:e,url:t,overlayColor:n,customOverlayColor:a,gradient:o,customGradient:r})=>t?e===Lr:!(n||a||o||r),transform:({title:e,url:t,alt:n,align:a,id:o,anchor:r,style:l})=>(0,Qe.createBlock)("core/image",{caption:e,url:t,alt:n,align:a,id:o,anchor:r,style:{color:{duotone:l?.color?.duotone}}})},{type:"block",blocks:["core/video"],isMatch:({backgroundType:e,url:t,overlayColor:n,customOverlayColor:a,gradient:o,customGradient:r})=>t?e===Dr:!(n||a||o||r),transform:({title:e,url:t,align:n,id:a,anchor:o})=>(0,Qe.createBlock)("core/video",{caption:e,src:t,id:a,align:n,anchor:o})},{type:"block",blocks:["core/group"],isMatch:({url:e,useFeaturedImage:t})=>!e&&!t,transform:(e,t)=>{const n={backgroundColor:e?.overlayColor,gradient:e?.gradient,style:wi({...e?.style,color:e?.customOverlayColor||e?.customGradient||e?.style?.color?{background:e?.customOverlayColor,gradient:e?.customGradient,...e?.style?.color}:void 0})};if(1===t?.length&&"core/group"===t[0]?.name){const e=wi(t[0].attributes||{});return e?.backgroundColor||e?.gradient||e?.style?.color?.background||e?.style?.color?.gradient?(0,Qe.createBlock)("core/group",e,t[0]?.innerBlocks):(0,Qe.createBlock)("core/group",{...n,...e,style:wi({...e?.style,color:n?.style?.color||e?.style?.color?{...n?.style?.color,...e?.style?.color}:void 0})},t[0]?.innerBlocks)}return(0,Qe.createBlock)("core/group",{...e,...n},t)}}]},Ci=Ei,Si=[{name:"cover",title:(0,tt.__)("Cover"),description:(0,tt.__)("Add an image or video with a text overlay."),attributes:{layout:{type:"constrained"}},isDefault:!0,icon:Ar}],Bi={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/cover",title:"Cover",category:"media",description:"Add an image or video with a text overlay.",textdomain:"default",attributes:{url:{type:"string"},useFeaturedImage:{type:"boolean",default:!1},id:{type:"number"},alt:{type:"string",default:""},hasParallax:{type:"boolean",default:!1},isRepeated:{type:"boolean",default:!1},dimRatio:{type:"number",default:100},overlayColor:{type:"string"},customOverlayColor:{type:"string"},isUserOverlayColor:{type:"boolean"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},isDark:{type:"boolean",default:!0},allowedBlocks:{type:"array"},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]},tagName:{type:"string",default:"div"}},usesContext:["postId","postType"],supports:{anchor:!0,align:!0,html:!1,spacing:{padding:!0,margin:["top","bottom"],blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",heading:!0,text:!0,background:!1,__experimentalSkipSerialization:["gradients"],enableContrastChecker:!1},dimensions:{aspectRatio:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowJustification:!1},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-cover-editor",style:"wp-block-cover"},{name:Ni}=Bi,Ti={icon:Ar,example:{attributes:{customOverlayColor:"#065174",dimRatio:40,url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,tt.__)("<strong>Snow Patrol</strong>"),align:"center",style:{typography:{fontSize:48},color:{text:"white"}}}}]},transforms:Ci,save:function({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:a,customGradient:o,customOverlayColor:r,dimRatio:l,focalPoint:i,useFeaturedImage:s,hasParallax:c,isDark:m,isRepeated:u,overlayColor:p,url:d,alt:g,id:h,minHeight:b,minHeightUnit:_,tagName:y}=e,v=(0,nt.getColorClassName)("background-color",p),f=(0,nt.__experimentalGetGradientClass)(n),k=Lr===t,x=Dr===t,w=!(c||u),E={minHeight:(b&&_?`${b}${_}`:b)||void 0},C={backgroundColor:v?void 0:r,background:o||void 0},S=i&&w?Or(i):void 0,B=d?`url(${d})`:void 0,N=Or(i),T=ut()({"is-light":!m,"has-parallax":c,"is-repeated":u,"has-custom-content-position":!Ur(a)},qr(a)),I=ut()("wp-block-cover__image-background",h?`wp-image-${h}`:null,{"has-parallax":c,"is-repeated":u}),P=n||o;return(0,Ke.createElement)(y,{...nt.useBlockProps.save({className:T,style:E})},(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-cover__background",v,Gr(l),{"has-background-dim":void 0!==l,"wp-block-cover__gradient-background":d&&P&&0!==l,"has-background-gradient":P,[f]:f}),style:C}),!s&&k&&d&&(w?(0,Ke.createElement)("img",{className:I,alt:g,src:d,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}):(0,Ke.createElement)("div",{role:g?"img":void 0,"aria-label":g||void 0,className:I,style:{backgroundPosition:N,backgroundImage:B}})),x&&d&&(0,Ke.createElement)("video",{className:ut()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})}))},edit:xi,deprecated:gl,variations:Si},Ii=()=>Xe({name:Ni,metadata:Bi,settings:Ti}),Pi=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M4 16h10v1.5H4V16Zm0-4.5h16V13H4v-1.5ZM10 7h10v1.5H10V7Z",fillRule:"evenodd",clipRule:"evenodd"}),(0,Ke.createElement)(Ye.Path,{d:"m4 5.25 4 2.5-4 2.5v-5Z"})),Mi=[["core/paragraph",{placeholder:(0,tt.__)("Type / to add a hidden block")}]];const zi=function({attributes:e,setAttributes:t,clientId:n}){const{showContent:a,summary:o}=e,r=(0,nt.useBlockProps)(),l=(0,nt.useInnerBlocksProps)(r,{template:Mi,__experimentalCaptureToolbars:!0}),i=(0,gt.useSelect)((e=>{const{isBlockSelected:t,hasSelectedInnerBlock:a}=e(nt.store);return a(n,!0)||t(n)}),[n]);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{label:(0,tt.__)("Open by default"),checked:a,onChange:()=>t({showContent:!a})}))),(0,Ke.createElement)("details",{...l,open:i||a},(0,Ke.createElement)("summary",{onClick:e=>e.preventDefault()},(0,Ke.createElement)(nt.RichText,{"aria-label":(0,tt.__)("Write summary"),placeholder:(0,tt.__)("Write summary…"),allowedFormats:[],withoutInteractiveFormatting:!0,value:o,onChange:e=>t({summary:e})})),l.children))};const Ri={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/details",title:"Details",category:"text",description:"Hide and show additional content.",keywords:["accordion","summary","toggle","disclosure"],textdomain:"default",attributes:{showContent:{type:"boolean",default:!1},summary:{type:"rich-text",source:"rich-text",selector:"summary"}},supports:{align:["wide","full"],color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__experimentalBorder:{color:!0,width:!0,style:!0},html:!1,spacing:{margin:!0,padding:!0,blockGap:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowEditing:!1},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-details-editor",style:"wp-block-details"},{name:Ai}=Ri,Hi={icon:Pi,example:{attributes:{summary:"La Mancha",showContent:!0},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,tt.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}}]},save:function({attributes:e}){const{showContent:t}=e,n=e.summary?e.summary:"Details",a=nt.useBlockProps.save();return(0,Ke.createElement)("details",{...a,open:t},(0,Ke.createElement)("summary",null,(0,Ke.createElement)(nt.RichText.Content,{value:n})),(0,Ke.createElement)(nt.InnerBlocks.Content,null))},edit:zi},Li=()=>Xe({name:Ai,metadata:Ri,settings:Hi}),Di=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"}));function Fi(e){return e?(0,tt.__)("This embed will preserve its aspect ratio when the browser is resized."):(0,tt.__)("This embed may not preserve its aspect ratio when the browser is resized.")}const Vi=({blockSupportsResponsive:e,showEditButton:t,themeSupportsResponsive:n,allowResponsive:a,toggleResponsive:o,switchBackToURLInput:r})=>(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,t&&(0,Ke.createElement)(et.ToolbarButton,{className:"components-toolbar__control",label:(0,tt.__)("Edit URL"),icon:Di,onClick:r}))),n&&e&&(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Media settings"),className:"blocks-responsive"},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Resize for smaller devices"),checked:a,help:Fi,onChange:o})))),$i=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z"})),Oi=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM13.2 7.7c-.4.4-.7 1.1-.7 1.9v3.7c-.4-.3-.8-.4-1.3-.4-1.2 0-2.2 1-2.2 2.2 0 1.2 1 2.2 2.2 2.2.5 0 1-.2 1.4-.5.9-.6 1.4-1.6 1.4-2.6V9.6c0-.4.1-.6.2-.8.3-.3 1-.3 1.6-.3h.2V7h-.2c-.7 0-1.8 0-2.6.7z"})),Gi=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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-2zM9.2 4.5H19c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V9.8l4.6-5.3zm9.8 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})),Ui=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.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-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM10 15l5-3-5-3v6z"})),qi={foreground:"#1da1f2",src:(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(et.G,null,(0,Ke.createElement)(et.Path,{d:"M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z"})))},ji={foreground:"#ff0000",src:(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z"}))},Wi={foreground:"#3b5998",src:(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z"}))},Zi=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.G,null,(0,Ke.createElement)(et.Path,{d:"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z"}))),Qi={foreground:"#0073AA",src:(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.G,null,(0,Ke.createElement)(et.Path,{d:"M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z"})))},Ki={foreground:"#1db954",src:(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325"}))},Yi=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z"})),Ji={foreground:"#1ab7ea",src:(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(et.G,null,(0,Ke.createElement)(et.Path,{d:"M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z"})))},Xi=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z"})),es={foreground:"#35465c",src:(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"M19 3H5a2 2 0 00-2 2v14c0 1.1.9 2 2 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-5.69 14.66c-2.72 0-3.1-1.9-3.1-3.16v-3.56H8.49V8.99c1.7-.62 2.54-1.99 2.64-2.87 0-.06.06-.41.06-.58h1.9v3.1h2.17v2.3h-2.18v3.1c0 .47.13 1.3 1.2 1.26h1.1v2.36c-1.01.02-2.07 0-2.07 0z"}))},ts=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z"}),(0,Ke.createElement)(et.Path,{d:"M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z"}),(0,Ke.createElement)(et.Path,{d:"M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z"})),ns=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"m.0206909 21 19.8160091-13.07806 3.5831 6.20826z",fill:"#4bc7ee"}),(0,Ke.createElement)(et.Path,{d:"m23.7254 19.0205-10.1074-17.18468c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418h22.5655c1.279 0 1.8019-.8905 1.1599-1.9795z",fill:"#d4cdcb"}),(0,Ke.createElement)(et.Path,{d:"m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",fill:"#c3d82e"}),(0,Ke.createElement)(et.Path,{d:"m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z",fill:"#e4ecb0"}),(0,Ke.createElement)(et.Path,{d:"m.0206909 21 19.5468091-9.063 1.6621 2.8344z",fill:"#209dbd"}),(0,Ke.createElement)(et.Path,{d:"m.0206909 21 17.9209091-11.82623 1.6259 2.76323z",fill:"#7cb3c9"})),as=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"M11.903 16.568c-1.82 0-3.124-1.281-3.124-2.967a2.987 2.987 0 0 1 2.989-2.989c1.663 0 2.944 1.304 2.944 3.034 0 1.663-1.281 2.922-2.81 2.922ZM17.997 3l-3.308.73v5.107c-.809-1.034-2.045-1.37-3.505-1.37-1.529 0-2.9.561-4.023 1.662-1.259 1.214-1.933 2.764-1.933 4.495 0 1.888.72 3.506 2.113 4.742 1.056.944 2.314 1.415 3.775 1.415 1.438 0 2.517-.382 3.573-1.415v1.415h3.308V3Z",fill:"#333436"})),os=(0,Ke.createElement)(et.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(et.Path,{d:"M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"})),rs=(0,Ke.createElement)(et.SVG,{viewBox:"0 0 44 44"},(0,Ke.createElement)(et.Path,{d:"M32.59521,22.001l4.31885-4.84473-6.34131-1.38379.646-6.459-5.94336,2.61035L22,6.31934l-3.27344,5.60351L12.78418,9.3125l.645,6.458L7.08643,17.15234,11.40479,21.999,7.08594,26.84375l6.34131,1.38379-.64551,6.458,5.94287-2.60938L22,37.68066l3.27344-5.60351,5.94287,2.61035-.64551-6.458,6.34277-1.38183Zm.44385,2.75244L30.772,23.97827l-1.59558-2.07391,1.97888.735Zm-8.82147,6.1579L22.75,33.424V30.88977l1.52228-2.22168ZM18.56226,13.48816,19.819,15.09534l-2.49219-.88642L15.94037,12.337Zm6.87719.00116,2.62043-1.15027-1.38654,1.86981L24.183,15.0946Zm3.59357,2.6029-1.22546,1.7381.07525-2.73486,1.44507-1.94867ZM22,29.33008l-2.16406-3.15686L22,23.23688l2.16406,2.93634Zm-4.25458-9.582-.10528-3.836,3.60986,1.284v3.73242Zm5.00458-2.552,3.60986-1.284-.10528,3.836L22.75,20.92853Zm-7.78174-1.10559-.29352-2.94263,1.44245,1.94739.07519,2.73321Zm2.30982,5.08319,3.50817,1.18164-2.16247,2.9342-3.678-1.08447Zm2.4486,7.49285L21.25,30.88977v2.53485L19.78052,30.91Zm3.48707-6.31121,3.50817-1.18164,2.33228,3.03137-3.678,1.08447Zm10.87219-4.28113-2.714,3.04529L28.16418,19.928l1.92176-2.72565ZM24.06036,12.81769l-2.06012,2.6322-2.059-2.63318L22,9.292ZM9.91455,18.07227l4.00079-.87195,1.921,2.72735-3.20794,1.19019Zm2.93024,4.565,1.9801-.73462L13.228,23.97827l-2.26838.77429Zm-1.55591,3.58819L13.701,25.4021l2.64935.78058-2.14447.67853Zm3.64868,1.977L18.19,27.17334l.08313,3.46332L14.52979,32.2793Zm10.7876,2.43549.08447-3.464,3.25165,1.03052.407,4.07684Zm4.06824-3.77478-2.14545-.68,2.65063-.781,2.41266.825Z"})),ls={foreground:"#f43e37",src:(0,Ke.createElement)(et.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(et.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z"}),(0,Ke.createElement)(et.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M2.67,12a9.33,9.33,0,0,1,18.66,0H19a7,7,0,1,0-7,7v2.33A9.33,9.33,0,0,1,2.67,12ZM12,17.6A5.6,5.6,0,1,1,17.6,12h-2A3.56,3.56,0,1,0,12,15.56Z",fill:"#fff"}))},is=()=>(0,Ke.createElement)("div",{className:"wp-block-embed is-loading"},(0,Ke.createElement)(et.Spinner,null)),ss=({icon:e,label:t,value:n,onSubmit:a,onChange:o,cannotEmbed:r,fallback:l,tryAgain:i})=>(0,Ke.createElement)(et.Placeholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:e,showColors:!0}),label:t,className:"wp-block-embed",instructions:(0,tt.__)("Paste a link to the content you want to display on your site.")},(0,Ke.createElement)("form",{onSubmit:a},(0,Ke.createElement)("input",{type:"url",value:n||"",className:"components-placeholder__input","aria-label":t,placeholder:(0,tt.__)("Enter URL to embed here…"),onChange:o}),(0,Ke.createElement)(et.Button,{variant:"primary",type:"submit"},(0,tt._x)("Embed","button label"))),(0,Ke.createElement)("div",{className:"wp-block-embed__learn-more"},(0,Ke.createElement)(et.ExternalLink,{href:(0,tt.__)("https://wordpress.org/documentation/article/embeds/")},(0,tt.__)("Learn more about embeds"))),r&&(0,Ke.createElement)("div",{className:"components-placeholder__error"},(0,Ke.createElement)("div",{className:"components-placeholder__instructions"},(0,tt.__)("Sorry, this content could not be embedded.")),(0,Ke.createElement)(et.Button,{variant:"secondary",onClick:i},(0,tt._x)("Try again","button label"))," ",(0,Ke.createElement)(et.Button,{variant:"secondary",onClick:l},(0,tt._x)("Convert to link","button label")))),cs={class:"className",frameborder:"frameBorder",marginheight:"marginHeight",marginwidth:"marginWidth"};function ms({html:e}){const t=(0,_t.useRef)(),n=(0,_t.useMemo)((()=>{const t=(new window.DOMParser).parseFromString(e,"text/html").querySelector("iframe"),n={};return t?(Array.from(t.attributes).forEach((({name:e,value:t})=>{"style"!==e&&(n[cs[e]||e]=t)})),n):n}),[e]);return(0,_t.useEffect)((()=>{const{ownerDocument:e}=t.current,{defaultView:a}=e;function o({data:{secret:e,message:a,value:o}={}}){"height"===a&&e===n["data-secret"]&&(t.current.height=o)}return a.addEventListener("message",o),()=>{a.removeEventListener("message",o)}}),[]),(0,Ke.createElement)("div",{className:"wp-block-embed__wrapper"},(0,Ke.createElement)("iframe",{ref:(0,jt.useMergeRefs)([t,(0,jt.useFocusableIframe)()]),title:n.title,...n}))}class us extends _t.Component{constructor(){super(...arguments),this.hideOverlay=this.hideOverlay.bind(this),this.state={interactive:!1}}static getDerivedStateFromProps(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}hideOverlay(){this.setState({interactive:!0})}render(){const{preview:e,previewable:t,url:n,type:a,caption:o,onCaptionChange:r,isSelected:l,className:i,icon:s,label:c,insertBlocksAfter:m}=this.props,{scripts:u}=e,{interactive:p}=this.state,d="photo"===a?(e=>{const t=e.url||e.thumbnail_url,n=(0,Ke.createElement)("p",null,(0,Ke.createElement)("img",{src:t,alt:e.title,width:"100%"}));return(0,_t.renderToString)(n)})(e):e.html,g=new URL(n).host.split("."),h=g.splice(g.length-2,g.length-1).join("."),b=(0,tt.sprintf)((0,tt.__)("Embedded content from %s"),h),_=zt()(a,i,"wp-block-embed__wrapper"),y="wp-embed"===a?(0,Ke.createElement)(ms,{html:d}):(0,Ke.createElement)("div",{className:"wp-block-embed__wrapper"},(0,Ke.createElement)(et.SandBox,{html:d,scripts:u,title:b,type:_,onFocus:this.hideOverlay}),!p&&(0,Ke.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}));return(0,Ke.createElement)("figure",{className:zt()(i,"wp-block-embed",{"is-type-video":"video"===a})},t?y:(0,Ke.createElement)(et.Placeholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:s,showColors:!0}),label:c},(0,Ke.createElement)("p",{className:"components-placeholder__error"},(0,Ke.createElement)("a",{href:n},n)),(0,Ke.createElement)("p",{className:"components-placeholder__error"},(0,tt.sprintf)((0,tt.__)("Embedded content from %s can't be previewed in the editor."),h))),(!nt.RichText.isEmpty(o)||l)&&(0,Ke.createElement)(nt.RichText,{identifier:"caption",tagName:"figcaption",className:(0,nt.__experimentalGetElementClassName)("caption"),placeholder:(0,tt.__)("Add caption"),value:o,onChange:r,inlineToolbar:!0,__unstableOnSplitAtEnd:()=>m((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))}))}}const ps=us,ds=e=>{const{attributes:{providerNameSlug:t,previewable:n,responsive:a,url:o},attributes:r,isSelected:l,onReplace:i,setAttributes:s,insertBlocksAfter:c,onFocus:m}=e,u={title:(0,tt._x)("Embed","block title"),icon:$i},{icon:p,title:d}=(g=t,(0,Qe.getBlockVariations)(Vt)?.find((({name:e})=>e===g))||u);var g;const[h,b]=(0,_t.useState)(o),[_,y]=(0,_t.useState)(!1),{invalidateResolution:v}=(0,gt.useDispatch)(dt.store),{preview:f,fetching:k,themeSupportsResponsive:x,cannotEmbed:w}=(0,gt.useSelect)((e=>{const{getEmbedPreview:t,isPreviewEmbedFallback:n,isRequestingEmbedPreview:a,getThemeSupports:r}=e(dt.store);if(!o)return{fetching:!1,cannotEmbed:!1};const l=t(o),i=n(o),s=!!l&&!(!1===l?.html&&void 0===l?.type)&&!(404===l?.data?.status);return{preview:s?l:void 0,fetching:a(o),themeSupportsResponsive:r()["responsive-embeds"],cannotEmbed:!s||i}}),[o]),E=()=>((e,t,n,a)=>{const{allowResponsive:o,className:r}=e;return{...e,...qt(t,n,r,a,o)}})(r,f,d,a);(0,_t.useEffect)((()=>{if(f?.html||!w||k)return;const e=o.replace(/\/$/,"");b(e),y(!1),s({url:e})}),[f?.html,o,w,k,s]),(0,_t.useEffect)((()=>{if(w&&!k&&h&&"x.com"===(0,pt.getAuthority)(h)){const e=new URL(h);e.host="twitter.com",s({url:e.toString()})}}),[h,w,k,s]),(0,_t.useEffect)((()=>{if(f&&!_){const t=E();if(s(t),i){const n=Ot(e,t);n&&i(n)}}}),[f,_]);const C=(0,nt.useBlockProps)();if(k)return(0,Ke.createElement)(Ye.View,{...C},(0,Ke.createElement)(is,null));const S=(0,tt.sprintf)((0,tt.__)("%s URL"),d);if(!f||w||_)return(0,Ke.createElement)(Ye.View,{...C},(0,Ke.createElement)(ss,{icon:p,label:S,onFocus:m,onSubmit:e=>{e&&e.preventDefault();const t=Gt(r.className);y(!1),s({url:h,className:t})},value:h,cannotEmbed:w,onChange:e=>b(e.target.value),fallback:()=>function(e,t){const n=(0,Ke.createElement)("a",{href:e},e);t((0,Qe.createBlock)("core/paragraph",{content:(0,_t.renderToString)(n)}))}(h,i),tryAgain:()=>{v("getEmbedPreview",[h])}}));const{caption:B,type:N,allowResponsive:T,className:I}=E(),P=ut()(I,e.className);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Vi,{showEditButton:f&&!w,themeSupportsResponsive:x,blockSupportsResponsive:a,allowResponsive:T,toggleResponsive:()=>{const{allowResponsive:e,className:t}=r,{html:n}=f,o=!e;s({allowResponsive:o,className:Ut(n,t,a&&o)})},switchBackToURLInput:()=>y(!0)}),(0,Ke.createElement)(Ye.View,{...C},(0,Ke.createElement)(ps,{preview:f,previewable:n,className:P,url:h,type:N,caption:B,onCaptionChange:e=>s({caption:e}),isSelected:l,icon:p,label:S,insertBlocksAfter:c})))};const{name:gs}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,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:"rich-text",source:"rich-text",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,spacing:{margin:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},hs={from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&/^\s*(https?:\/\/\S+)\s*$/i.test(e.textContent)&&1===e.textContent?.match(/https/gi)?.length,transform:e=>(0,Qe.createBlock)(gs,{url:e.textContent.trim()})}],to:[{type:"block",blocks:["core/paragraph"],isMatch:({url:e})=>!!e,transform:({url:e,caption:t})=>{let n=`<a href="${e}">${e}</a>`;return t?.trim()&&(n+=`<br />${t}`),(0,Qe.createBlock)("core/paragraph",{content:n})}}]},bs=hs,_s=[{name:"twitter",title:"Twitter",icon:qi,keywords:["tweet",(0,tt.__)("social")],description:(0,tt.__)("Embed a tweet."),patterns:[/^https?:\/\/(www\.)?twitter\.com\/.+/i],attributes:{providerNameSlug:"twitter",responsive:!0}},{name:"youtube",title:"YouTube",icon:ji,keywords:[(0,tt.__)("music"),(0,tt.__)("video")],description:(0,tt.__)("Embed a YouTube video."),patterns:[/^https?:\/\/((m|www)\.)?youtube\.com\/.+/i,/^https?:\/\/youtu\.be\/.+/i],attributes:{providerNameSlug:"youtube",responsive:!0}},{name:"facebook",title:"Facebook",icon:Wi,keywords:[(0,tt.__)("social")],description:(0,tt.__)("Embed a Facebook post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}},{name:"instagram",title:"Instagram",icon:Zi,keywords:[(0,tt.__)("image"),(0,tt.__)("social")],description:(0,tt.__)("Embed an Instagram post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"instagram",responsive:!0}},{name:"wordpress",title:"WordPress",icon:Qi,keywords:[(0,tt.__)("post"),(0,tt.__)("blog")],description:(0,tt.__)("Embed a WordPress post."),attributes:{providerNameSlug:"wordpress"}},{name:"soundcloud",title:"SoundCloud",icon:Oi,keywords:[(0,tt.__)("music"),(0,tt.__)("audio")],description:(0,tt.__)("Embed SoundCloud content."),patterns:[/^https?:\/\/(www\.)?soundcloud\.com\/.+/i],attributes:{providerNameSlug:"soundcloud",responsive:!0}},{name:"spotify",title:"Spotify",icon:Ki,keywords:[(0,tt.__)("music"),(0,tt.__)("audio")],description:(0,tt.__)("Embed Spotify content."),patterns:[/^https?:\/\/(open|play)\.spotify\.com\/.+/i],attributes:{providerNameSlug:"spotify",responsive:!0}},{name:"flickr",title:"Flickr",icon:Yi,keywords:[(0,tt.__)("image")],description:(0,tt.__)("Embed Flickr content."),patterns:[/^https?:\/\/(www\.)?flickr\.com\/.+/i,/^https?:\/\/flic\.kr\/.+/i],attributes:{providerNameSlug:"flickr",responsive:!0}},{name:"vimeo",title:"Vimeo",icon:Ji,keywords:[(0,tt.__)("video")],description:(0,tt.__)("Embed a Vimeo video."),patterns:[/^https?:\/\/(www\.)?vimeo\.com\/.+/i],attributes:{providerNameSlug:"vimeo",responsive:!0}},{name:"animoto",title:"Animoto",icon:ns,description:(0,tt.__)("Embed an Animoto video."),patterns:[/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i],attributes:{providerNameSlug:"animoto",responsive:!0}},{name:"cloudup",title:"Cloudup",icon:$i,description:(0,tt.__)("Embed Cloudup content."),patterns:[/^https?:\/\/cloudup\.com\/.+/i],attributes:{providerNameSlug:"cloudup",responsive:!0}},{name:"collegehumor",title:"CollegeHumor",icon:Ui,description:(0,tt.__)("Embed CollegeHumor content."),scope:["block"],patterns:[],attributes:{providerNameSlug:"collegehumor",responsive:!0}},{name:"crowdsignal",title:"Crowdsignal",icon:$i,keywords:["polldaddy",(0,tt.__)("survey")],description:(0,tt.__)("Embed Crowdsignal (formerly Polldaddy) content."),patterns:[/^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.crowdsignal\.net|.+\.survey\.fm)\/.+/i],attributes:{providerNameSlug:"crowdsignal",responsive:!0}},{name:"dailymotion",title:"Dailymotion",icon:as,keywords:[(0,tt.__)("video")],description:(0,tt.__)("Embed a Dailymotion video."),patterns:[/^https?:\/\/(www\.)?dailymotion\.com\/.+/i],attributes:{providerNameSlug:"dailymotion",responsive:!0}},{name:"imgur",title:"Imgur",icon:Gi,description:(0,tt.__)("Embed Imgur content."),patterns:[/^https?:\/\/(.+\.)?imgur\.com\/.+/i],attributes:{providerNameSlug:"imgur",responsive:!0}},{name:"issuu",title:"Issuu",icon:$i,description:(0,tt.__)("Embed Issuu content."),patterns:[/^https?:\/\/(www\.)?issuu\.com\/.+/i],attributes:{providerNameSlug:"issuu",responsive:!0}},{name:"kickstarter",title:"Kickstarter",icon:$i,description:(0,tt.__)("Embed Kickstarter content."),patterns:[/^https?:\/\/(www\.)?kickstarter\.com\/.+/i,/^https?:\/\/kck\.st\/.+/i],attributes:{providerNameSlug:"kickstarter",responsive:!0}},{name:"mixcloud",title:"Mixcloud",icon:Oi,keywords:[(0,tt.__)("music"),(0,tt.__)("audio")],description:(0,tt.__)("Embed Mixcloud content."),patterns:[/^https?:\/\/(www\.)?mixcloud\.com\/.+/i],attributes:{providerNameSlug:"mixcloud",responsive:!0}},{name:"pocket-casts",title:"Pocket Casts",icon:ls,keywords:[(0,tt.__)("podcast"),(0,tt.__)("audio")],description:(0,tt.__)("Embed a podcast player from Pocket Casts."),patterns:[/^https:\/\/pca.st\/\w+/i],attributes:{providerNameSlug:"pocket-casts",responsive:!0}},{name:"reddit",title:"Reddit",icon:Xi,description:(0,tt.__)("Embed a Reddit thread."),patterns:[/^https?:\/\/(www\.)?reddit\.com\/.+/i],attributes:{providerNameSlug:"reddit",responsive:!0}},{name:"reverbnation",title:"ReverbNation",icon:Oi,description:(0,tt.__)("Embed ReverbNation content."),patterns:[/^https?:\/\/(www\.)?reverbnation\.com\/.+/i],attributes:{providerNameSlug:"reverbnation",responsive:!0}},{name:"screencast",title:"Screencast",icon:Ui,description:(0,tt.__)("Embed Screencast content."),patterns:[/^https?:\/\/(www\.)?screencast\.com\/.+/i],attributes:{providerNameSlug:"screencast",responsive:!0}},{name:"scribd",title:"Scribd",icon:$i,description:(0,tt.__)("Embed Scribd content."),patterns:[/^https?:\/\/(www\.)?scribd\.com\/.+/i],attributes:{providerNameSlug:"scribd",responsive:!0}},{name:"slideshare",title:"Slideshare",icon:$i,description:(0,tt.__)("Embed Slideshare content."),patterns:[/^https?:\/\/(.+?\.)?slideshare\.net\/.+/i],attributes:{providerNameSlug:"slideshare",responsive:!0}},{name:"smugmug",title:"SmugMug",icon:Gi,description:(0,tt.__)("Embed SmugMug content."),patterns:[/^https?:\/\/(.+\.)?smugmug\.com\/.*/i],attributes:{providerNameSlug:"smugmug",previewable:!1,responsive:!0}},{name:"speaker-deck",title:"Speaker Deck",icon:$i,description:(0,tt.__)("Embed Speaker Deck content."),patterns:[/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i],attributes:{providerNameSlug:"speaker-deck",responsive:!0}},{name:"tiktok",title:"TikTok",icon:Ui,keywords:[(0,tt.__)("video")],description:(0,tt.__)("Embed a TikTok video."),patterns:[/^https?:\/\/(www\.)?tiktok\.com\/.+/i],attributes:{providerNameSlug:"tiktok",responsive:!0}},{name:"ted",title:"TED",icon:Ui,description:(0,tt.__)("Embed a TED video."),patterns:[/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i],attributes:{providerNameSlug:"ted",responsive:!0}},{name:"tumblr",title:"Tumblr",icon:es,keywords:[(0,tt.__)("social")],description:(0,tt.__)("Embed a Tumblr post."),patterns:[/^https?:\/\/(.+)\.tumblr\.com\/.+/i],attributes:{providerNameSlug:"tumblr",responsive:!0}},{name:"videopress",title:"VideoPress",icon:Ui,keywords:[(0,tt.__)("video")],description:(0,tt.__)("Embed a VideoPress video."),patterns:[/^https?:\/\/videopress\.com\/.+/i],attributes:{providerNameSlug:"videopress",responsive:!0}},{name:"wordpress-tv",title:"WordPress.tv",icon:Ui,description:(0,tt.__)("Embed a WordPress.tv video."),patterns:[/^https?:\/\/wordpress\.tv\/.+/i],attributes:{providerNameSlug:"wordpress-tv",responsive:!0}},{name:"amazon-kindle",title:"Amazon Kindle",icon:ts,keywords:[(0,tt.__)("ebook")],description:(0,tt.__)("Embed Amazon Kindle content."),patterns:[/^https?:\/\/([a-z0-9-]+\.)?(amazon|amzn)(\.[a-z]{2,4})+\/.+/i,/^https?:\/\/(www\.)?(a\.co|z\.cn)\/.+/i],attributes:{providerNameSlug:"amazon-kindle"}},{name:"pinterest",title:"Pinterest",icon:os,keywords:[(0,tt.__)("social"),(0,tt.__)("bookmark")],description:(0,tt.__)("Embed Pinterest pins, boards, and profiles."),patterns:[/^https?:\/\/([a-z]{2}|www)\.pinterest\.com(\.(au|mx))?\/.*/i],attributes:{providerNameSlug:"pinterest"}},{name:"wolfram-cloud",title:"Wolfram",icon:rs,description:(0,tt.__)("Embed Wolfram notebook content."),patterns:[/^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i],attributes:{providerNameSlug:"wolfram-cloud",responsive:!0}}];_s.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.providerNameSlug===t.providerNameSlug)}));const ys=_s,{attributes:vs}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,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:"rich-text",source:"rich-text",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,spacing:{margin:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},fs={attributes:vs,save({attributes:e}){const{url:t,caption:n,type:a,providerNameSlug:o}=e;if(!t)return null;const r=ut()("wp-block-embed",{[`is-type-${a}`]:a,[`is-provider-${o}`]:o,[`wp-block-embed-${o}`]:o});return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:r})},(0,Ke.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${t}\n`),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:n}))}},ks={attributes:vs,save({attributes:{url:e,caption:t,type:n,providerNameSlug:a}}){if(!e)return null;const o=ut()("wp-block-embed",{[`is-type-${n}`]:n,[`is-provider-${a}`]:a});return(0,Ke.createElement)("figure",{className:o},`\n${e}\n`,!nt.RichText.isEmpty(t)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:t}))}},xs=[fs,ks],ws={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,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:"rich-text",source:"rich-text",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,spacing:{margin:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},{name:Es}=ws,Cs={icon:$i,edit:ds,save:function({attributes:e}){const{url:t,caption:n,type:a,providerNameSlug:o}=e;if(!t)return null;const r=zt()("wp-block-embed",{[`is-type-${a}`]:a,[`is-provider-${o}`]:o,[`wp-block-embed-${o}`]:o});return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:r})},(0,Ke.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${t}\n`),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{className:(0,nt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:n}))},transforms:bs,variations:ys,deprecated:xs},Ss=()=>Xe({name:Es,metadata:ws,settings:Cs}),Bs=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})),Ns={attributes:{id:{type:"number"},href:{type:"string"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){const{href:t,fileId:n,fileName:a,textLinkHref:o,textLinkTarget:r,showDownloadButton:l,downloadButtonText:i,displayPreview:s,previewHeight:c}=e,m=nt.RichText.isEmpty(a)?(0,tt.__)("PDF embed"):(0,tt.sprintf)((0,tt.__)("Embed of %s."),a),u=!nt.RichText.isEmpty(a),p=u?n:void 0;return t&&(0,Ke.createElement)("div",{...nt.useBlockProps.save()},s&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":m})),u&&(0,Ke.createElement)("a",{id:p,href:o,target:r,rel:r?"noreferrer noopener":void 0},(0,Ke.createElement)(nt.RichText.Content,{value:a})),l&&(0,Ke.createElement)("a",{href:t,className:ut()("wp-block-file__button",(0,nt.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":p},(0,Ke.createElement)(nt.RichText.Content,{value:i})))}},Ts={attributes:{id:{type:"number"},href:{type:"string"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){const{href:t,fileId:n,fileName:a,textLinkHref:o,textLinkTarget:r,showDownloadButton:l,downloadButtonText:i,displayPreview:s,previewHeight:c}=e,m=nt.RichText.isEmpty(a)?(0,tt.__)("PDF embed"):(0,tt.sprintf)((0,tt.__)("Embed of %s."),a),u=!nt.RichText.isEmpty(a),p=u?n:void 0;return t&&(0,Ke.createElement)("div",{...nt.useBlockProps.save()},s&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":m})),u&&(0,Ke.createElement)("a",{id:p,href:o,target:r,rel:r?"noreferrer noopener":void 0},(0,Ke.createElement)(nt.RichText.Content,{value:a})),l&&(0,Ke.createElement)("a",{href:t,className:"wp-block-file__button",download:!0,"aria-describedby":p},(0,Ke.createElement)(nt.RichText.Content,{value:i})))}},Is={attributes:{id:{type:"number"},href:{type:"string"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){const{href:t,fileName:n,textLinkHref:a,textLinkTarget:o,showDownloadButton:r,downloadButtonText:l,displayPreview:i,previewHeight:s}=e,c=nt.RichText.isEmpty(n)?(0,tt.__)("PDF embed"):(0,tt.sprintf)((0,tt.__)("Embed of %s."),n);return t&&(0,Ke.createElement)("div",{...nt.useBlockProps.save()},i&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${s}px`},"aria-label":c})),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)("a",{href:a,target:o,rel:o?"noreferrer noopener":void 0},(0,Ke.createElement)(nt.RichText.Content,{value:n})),r&&(0,Ke.createElement)("a",{href:t,className:"wp-block-file__button",download:!0},(0,Ke.createElement)(nt.RichText.Content,{value:l})))}},Ps=[Ns,Ts,Is];function Ms({hrefs:e,openInNewWindow:t,showDownloadButton:n,changeLinkDestinationOption:a,changeOpenInNewWindow:o,changeShowDownloadButton:r,displayPreview:l,changeDisplayPreview:i,previewHeight:s,changePreviewHeight:c}){const{href:m,textLinkHref:u,attachmentPage:p}=e;let d=[{value:m,label:(0,tt.__)("URL")}];return p&&(d=[{value:m,label:(0,tt.__)("Media file")},{value:p,label:(0,tt.__)("Attachment page")}]),(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,m.endsWith(".pdf")&&(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("PDF settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show inline embed"),help:l?(0,tt.__)("Note: Most phone and tablet browsers won't display embedded PDFs."):null,checked:!!l,onChange:i}),l&&(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Height in pixels"),min:Rs,max:Math.max(As,s),value:s,onChange:c})),(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link to"),value:u,options:d,onChange:a}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),checked:t,onChange:o}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show download button"),checked:n,onChange:r}))))}const zs=e=>{let t;try{t=new window.ActiveXObject(e)}catch(e){t=void 0}return t},Rs=200,As=2e3;function Hs({text:e,disabled:t}){const{createNotice:n}=(0,gt.useDispatch)(Pt.store),a=(0,jt.useCopyToClipboard)(e,(()=>{n("info",(0,tt.__)("Copied URL to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,Ke.createElement)(et.ToolbarButton,{className:"components-clipboard-toolbar-button",ref:a,disabled:t},(0,tt.__)("Copy URL"))}const Ls=function({attributes:e,isSelected:t,setAttributes:n,clientId:a}){const{id:o,fileName:r,href:l,textLinkHref:i,textLinkTarget:s,showDownloadButton:c,downloadButtonText:m,displayPreview:u,previewHeight:p}=e,{getSettings:d}=(0,gt.useSelect)(nt.store),{media:g}=(0,gt.useSelect)((e=>({media:void 0===o?void 0:e(dt.store).getMedia(o)})),[o]),{createErrorNotice:h}=(0,gt.useDispatch)(Pt.store),{toggleSelection:b}=(0,gt.useDispatch)(nt.store);function _(e){if(!e||!e.url)return;const t=e.url.endsWith(".pdf");n({href:e.url,fileName:e.title,textLinkHref:e.url,id:e.id,displayPreview:!!t||void 0,previewHeight:t?600:void 0,fileId:`wp-block-file--media-${a}`})}function y(e){n({href:void 0}),h(e,{type:"snackbar"})}(0,_t.useEffect)((()=>{if((0,It.isBlobURL)(l)){const e=(0,It.getBlobByURL)(l);d().mediaUpload({filesList:[e],onFileChange:([e])=>_(e),onError:y}),(0,It.revokeBlobURL)(l)}nt.RichText.isEmpty(m)&&n({downloadButtonText:(0,tt._x)("Download","button label")})}),[]);const v=g&&g.link,f=(0,nt.useBlockProps)({className:ut()((0,It.isBlobURL)(l)&&(0,et.__unstableGetAnimateClassName)({type:"loading"}),{"is-transient":(0,It.isBlobURL)(l)})}),k=!(window.navigator.userAgent.indexOf("Mobi")>-1||window.navigator.userAgent.indexOf("Android")>-1||window.navigator.userAgent.indexOf("Macintosh")>-1&&window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2||(window.ActiveXObject||"ActiveXObject"in window)&&!zs("AcroPDF.PDF")&&!zs("PDF.PdfCtrl"))&&u;return l?(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Ms,{hrefs:{href:l,textLinkHref:i,attachmentPage:v},openInNewWindow:!!s,showDownloadButton:c,changeLinkDestinationOption:function(e){n({textLinkHref:e})},changeOpenInNewWindow:function(e){n({textLinkTarget:!!e&&"_blank"})},changeShowDownloadButton:function(e){n({showDownloadButton:e})},displayPreview:u,changeDisplayPreview:function(e){n({displayPreview:e})},previewHeight:p,changePreviewHeight:function(e){const t=Math.max(parseInt(e,10),Rs);n({previewHeight:t})}}),(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(nt.MediaReplaceFlow,{mediaId:o,mediaURL:l,accept:"*",onSelect:_,onError:y}),(0,Ke.createElement)(Hs,{text:l,disabled:(0,It.isBlobURL)(l)})),(0,Ke.createElement)("div",{...f},k&&(0,Ke.createElement)(et.ResizableBox,{size:{height:p},minHeight:Rs,maxHeight:As,minWidth:"100%",grid:[10,10],enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStart:()=>b(!1),onResizeStop:function(e,t,a,o){b(!0);const r=parseInt(p+o.height,10);n({previewHeight:r})},showHandle:t},(0,Ke.createElement)("object",{className:"wp-block-file__preview",data:l,type:"application/pdf","aria-label":(0,tt.__)("Embed of the selected PDF file.")}),!t&&(0,Ke.createElement)("div",{className:"wp-block-file__preview-overlay"})),(0,Ke.createElement)("div",{className:"wp-block-file__content-wrapper"},(0,Ke.createElement)(nt.RichText,{tagName:"a",value:r,placeholder:(0,tt.__)("Write file name…"),withoutInteractiveFormatting:!0,onChange:e=>n({fileName:vn(e)}),href:i}),c&&(0,Ke.createElement)("div",{className:"wp-block-file__button-richtext-wrapper"},(0,Ke.createElement)(nt.RichText,{tagName:"div","aria-label":(0,tt.__)("Download button text"),className:ut()("wp-block-file__button",(0,nt.__experimentalGetElementClassName)("button")),value:m,withoutInteractiveFormatting:!0,placeholder:(0,tt.__)("Add text…"),onChange:e=>n({downloadButtonText:vn(e)})}))))):(0,Ke.createElement)("div",{...f},(0,Ke.createElement)(nt.MediaPlaceholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:Bs}),labels:{title:(0,tt.__)("File"),instructions:(0,tt.__)("Upload a file or pick one from your media library.")},onSelect:_,onError:y,accept:"*"}))};const Ds={from:[{type:"files",isMatch:e=>e.length>0,priority:15,transform:e=>{const t=[];return e.forEach((e=>{const n=(0,It.createBlobURL)(e);t.push((0,Qe.createBlock)("core/file",{href:n,fileName:e.name,textLinkHref:n}))})),t}},{type:"block",blocks:["core/audio"],transform:e=>(0,Qe.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],transform:e=>(0,Qe.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],transform:e=>(0,Qe.createBlock)("core/file",{href:e.url,fileName:e.caption||(0,pt.getFilename)(e.url),textLinkHref:e.url,id:e.id,anchor:e.anchor})}],to:[{type:"block",blocks:["core/audio"],isMatch:({id:e})=>{if(!e)return!1;const{getMedia:t}=(0,gt.select)(dt.store),n=t(e);return!!n&&n.mime_type.includes("audio")},transform:e=>(0,Qe.createBlock)("core/audio",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],isMatch:({id:e})=>{if(!e)return!1;const{getMedia:t}=(0,gt.select)(dt.store),n=t(e);return!!n&&n.mime_type.includes("video")},transform:e=>(0,Qe.createBlock)("core/video",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],isMatch:({id:e})=>{if(!e)return!1;const{getMedia:t}=(0,gt.select)(dt.store),n=t(e);return!!n&&n.mime_type.includes("image")},transform:e=>(0,Qe.createBlock)("core/image",{url:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})}]},Fs=Ds,Vs={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/file",title:"File",category:"media",description:"Add a link to a downloadable file.",keywords:["document","pdf","download"],textdomain:"default",attributes:{id:{type:"number"},href:{type:"string"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"rich-text",source:"rich-text",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"rich-text",source:"rich-text",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},interactivity:!0},editorStyle:"wp-block-file-editor",style:"wp-block-file"},{name:$s}=Vs,Os={icon:Bs,example:{attributes:{href:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg",fileName:(0,tt._x)("Armstrong_Small_Step","Name of the file")}},transforms:Fs,deprecated:Ps,edit:Ls,save:function({attributes:e}){const{href:t,fileId:n,fileName:a,textLinkHref:o,textLinkTarget:r,showDownloadButton:l,downloadButtonText:i,displayPreview:s,previewHeight:c}=e,m=nt.RichText.isEmpty(a)?"PDF embed":a.toString(),u=!nt.RichText.isEmpty(a),p=u?n:void 0;return t&&(0,Ke.createElement)("div",{...nt.useBlockProps.save()},s&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":m})),u&&(0,Ke.createElement)("a",{id:p,href:o,target:r,rel:r?"noreferrer noopener":void 0},(0,Ke.createElement)(nt.RichText.Content,{value:a})),l&&(0,Ke.createElement)("a",{href:t,className:ut()("wp-block-file__button",(0,nt.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":p},(0,Ke.createElement)(nt.RichText.Content,{value:i})))}},Gs=()=>Xe({name:$s,metadata:Vs,settings:Os}),Us=["core/form-submission-notification",{type:"success"},[["core/paragraph",{content:'<mark style="background-color:rgba(0, 0, 0, 0);color:#345C00" class="has-inline-color">'+(0,tt.__)("Your form has been submitted successfully")+"</mark>"}]]],qs=["core/form-submission-notification",{type:"error"},[["core/paragraph",{content:'<mark style="background-color:rgba(0, 0, 0, 0);color:#CF2E2E" class="has-inline-color">'+(0,tt.__)("There was an error submitting your form.")+"</mark>"}]]],js=[Us,qs,["core/form-input",{type:"text",label:(0,tt.__)("Name"),required:!0}],["core/form-input",{type:"email",label:(0,tt.__)("Email"),required:!0}],["core/form-input",{type:"textarea",label:(0,tt.__)("Comment"),required:!0}],["core/form-submit-button",{}]],Ws=({attributes:e,setAttributes:t,clientId:n})=>{const{action:a,method:o,email:r,submissionMethod:l}=e,i=(0,nt.useBlockProps)(),{hasInnerBlocks:s}=(0,gt.useSelect)((e=>{const{getBlock:t}=e(nt.store),a=t(n);return{hasInnerBlocks:!(!a||!a.innerBlocks.length)}}),[n]),c=(0,nt.useInnerBlocksProps)(i,{template:js,renderAppender:s?void 0:nt.InnerBlocks.ButtonBlockAppender});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.SelectControl,{label:(0,tt.__)("Submissions method"),options:[{label:(0,tt.__)("Send email"),value:"email"},{label:(0,tt.__)("- Custom -"),value:"custom"}],value:l,onChange:e=>t({submissionMethod:e}),help:"custom"===l?(0,tt.__)('Select the method to use for form submissions. Additional options for the "custom" mode can be found in the "Advanced" section.'):(0,tt.__)("Select the method to use for form submissions.")}),"email"===l&&(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,tt.__)("Email for form submissions"),value:r,required:!0,onChange:e=>{t({email:e}),t({action:`mailto:${e}`}),t({method:"post"})},help:(0,tt.__)("The email address where form submissions will be sent. Separate multiple email addresses with a comma.")}))),"email"!==l&&(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Method"),options:[{label:"Get",value:"get"},{label:"Post",value:"post"}],value:o,onChange:e=>t({method:e}),help:(0,tt.__)("Select the method to use for form submissions.")}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,tt.__)("Form action"),value:a,onChange:e=>{t({action:e})},help:(0,tt.__)("The URL where the form should be submitted.")})),(0,Ke.createElement)("form",{...c,className:"wp-block-form",encType:"email"===l?"text/plain":null}))},Zs=({attributes:e})=>{const t=nt.useBlockProps.save(),{submissionMethod:n}=e;return(0,Ke.createElement)("form",{...t,className:"wp-block-form",encType:"email"===n?"text/plain":null},(0,Ke.createElement)(nt.InnerBlocks.Content,null))},Qs=[{name:"comment-form",title:(0,tt.__)("Experimental Comment form"),description:(0,tt.__)("A comment form for posts and pages."),attributes:{submissionMethod:"custom",action:"{SITE_URL}/wp-comments-post.php",method:"post",anchor:"comment-form"},isDefault:!1,innerBlocks:[["core/form-input",{type:"text",name:"author",label:(0,tt.__)("Name"),required:!0,visibilityPermissions:"logged-out"}],["core/form-input",{type:"email",name:"email",label:(0,tt.__)("Email"),required:!0,visibilityPermissions:"logged-out"}],["core/form-input",{type:"textarea",name:"comment",label:(0,tt.__)("Comment"),required:!0,visibilityPermissions:"all"}],["core/form-submit-button",{}]],scope:["inserter","transform"],isActive:e=>!e?.type||"text"===e?.type},{name:"wp-privacy-form",title:(0,tt.__)("Experimental privacy request form"),keywords:["GDPR"],description:(0,tt.__)("A form to request data exports and/or deletion."),attributes:{submissionMethod:"custom",action:"",method:"post",anchor:"gdpr-form"},isDefault:!1,innerBlocks:[Us,qs,["core/paragraph",{content:(0,tt.__)("To request an export or deletion of your personal data on this site, please fill-in the form below. You can define the type of request you wish to perform, and your email address. Once the form is submitted, you will receive a confirmation email with instructions on the next steps.")}],["core/form-input",{type:"email",name:"email",label:(0,tt.__)("Enter your email address."),required:!0,visibilityPermissions:"all"}],["core/form-input",{type:"checkbox",name:"export_personal_data",label:(0,tt.__)("Request data export"),required:!1,visibilityPermissions:"all"}],["core/form-input",{type:"checkbox",name:"remove_personal_data",label:(0,tt.__)("Request data deletion"),required:!1,visibilityPermissions:"all"}],["core/form-submit-button",{}],["core/form-input",{type:"hidden",name:"wp-action",value:"wp_privacy_send_request"}],["core/form-input",{type:"hidden",name:"wp-privacy-request",value:"1"}]],scope:["inserter","transform"],isActive:e=>!e?.type||"text"===e?.type}],Ks=Qs,Ys={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form",title:"Form",category:"common",allowedBlocks:["core/paragraph","core/heading","core/form-input","core/form-submit-button","core/form-submission-notification","core/group","core/columns"],description:"A form.",keywords:["container","wrapper","row","section"],textdomain:"default",icon:"feedback",attributes:{submissionMethod:{type:"string",default:"email"},method:{type:"string",default:"post"},action:{type:"string"},email:{type:"string"}},supports:{anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalSelector:"form"},viewScript:"file:./view.min.js"},{name:Js}=Ys,Xs={edit:Ws,save:Zs,variations:Ks},ec=()=>{const e=["core/form"];return(0,_i.addFilter)("blockEditor.__unstableCanInsertBlockType","core/block-library/preventInsertingFormIntoAnotherForm",((t,n,a,{getBlock:o,getBlockParentsByBlockName:r})=>{if("core/form"!==n.name)return t;for(const t of e){if(o(a)?.name===t||r(a,t).length)return!1}return!0})),Xe({name:Js,metadata:Ys,settings:Xs})};var tc=n(9681),nc=n.n(tc);const ac=window.wp.dom,oc={attributes:{type:{type:"string",default:"text"},name:{type:"string"},label:{type:"string",default:"Label",selector:".wp-block-form-input__label-content",source:"html",__experimentalRole:"content"},inlineLabel:{type:"boolean",default:!1},required:{type:"boolean",default:!1,selector:".wp-block-form-input__input",source:"attribute",attribute:"required"},placeholder:{type:"string",selector:".wp-block-form-input__input",source:"attribute",attribute:"placeholder",__experimentalRole:"content"},value:{type:"string",default:"",selector:"input",source:"attribute",attribute:"value"},visibilityPermissions:{type:"string",default:"all"}},supports:{className:!1,anchor:!0,reusable:!1,spacing:{margin:["top","bottom"]},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}}},save({attributes:e}){const{type:t,name:n,label:a,inlineLabel:o,required:r,placeholder:l,value:i}=e,s=(0,nt.__experimentalGetBorderClassesAndStyles)(e),c=(0,nt.__experimentalGetColorClassesAndStyles)(e),m={...s.style,...c.style},u=ut()("wp-block-form-input__input",c.className,s.className),p="textarea"===t?"textarea":"input";return"hidden"===t?(0,Ke.createElement)("input",{type:t,name:n,value:i}):(0,Ke.createElement)("label",{className:ut()("wp-block-form-input__label",{"is-label-inline":o})},(0,Ke.createElement)("span",{className:"wp-block-form-input__label-content"},(0,Ke.createElement)(nt.RichText.Content,{value:a})),(0,Ke.createElement)(p,{className:u,type:"textarea"===t?void 0:t,name:n||(d=a,nc()((0,ac.__unstableStripHTML)(d)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,"")),required:r,"aria-required":r,placeholder:l||void 0,style:m}));var d}},rc=[oc];const lc=function({attributes:e,setAttributes:t,className:n}){const{type:a,name:o,label:r,inlineLabel:l,required:i,placeholder:s,value:c}=e,m=(0,nt.useBlockProps)(),u=(0,_t.useRef)(),p="textarea"===a?"textarea":"input",d=(0,nt.__experimentalUseBorderProps)(e),g=(0,nt.__experimentalUseColorProps)(e);u.current&&u.current.focus();const h=(0,Ke.createElement)(Ke.Fragment,null,"hidden"!==a&&(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Input settings")},"checkbox"!==a&&(0,Ke.createElement)(et.CheckboxControl,{label:(0,tt.__)("Inline label"),checked:l,onChange:e=>{t({inlineLabel:e})}}),(0,Ke.createElement)(et.CheckboxControl,{label:(0,tt.__)("Required"),checked:i,onChange:e=>{t({required:e})}}))),(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.TextControl,{autoComplete:"off",label:(0,tt.__)("Name"),value:o,onChange:e=>{t({name:e})},help:(0,tt.__)('Affects the "name" atribute of the input element, and is used as a name for the form submission results.')})));return"hidden"===a?(0,Ke.createElement)(Ke.Fragment,null,h,(0,Ke.createElement)("input",{type:"hidden",className:ut()(n,"wp-block-form-input__input",g.className,d.className),"aria-label":(0,tt.__)("Value"),value:c,onChange:e=>t({value:e.target.value})})):(0,Ke.createElement)("div",{...m},h,(0,Ke.createElement)("span",{className:ut()("wp-block-form-input__label",{"is-label-inline":l||"checkbox"===a})},(0,Ke.createElement)(nt.RichText,{tagName:"span",className:"wp-block-form-input__label-content",value:r,onChange:e=>t({label:e}),"aria-label":r?(0,tt.__)("Label"):(0,tt.__)("Empty label"),"data-empty":!r,placeholder:(0,tt.__)("Type the label for this input")}),(0,Ke.createElement)(p,{type:"textarea"===a?void 0:a,className:ut()(n,"wp-block-form-input__input",g.className,d.className),"aria-label":(0,tt.__)("Optional placeholder text"),placeholder:s?void 0:(0,tt.__)("Optional placeholder…"),value:s,onChange:e=>t({placeholder:e.target.value}),"aria-required":i,style:{...d.style,...g.style}})))};const ic=[{name:"text",title:(0,tt.__)("Text Input"),icon:"edit-page",description:(0,tt.__)("A generic text input."),attributes:{type:"text"},isDefault:!0,scope:["inserter","transform"],isActive:e=>!e?.type||"text"===e?.type},{name:"textarea",title:(0,tt.__)("Textarea Input"),icon:"testimonial",description:(0,tt.__)("A textarea input to allow entering multiple lines of text."),attributes:{type:"textarea"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"textarea"===e?.type},{name:"checkbox",title:(0,tt.__)("Checkbox Input"),description:(0,tt.__)("A simple checkbox input."),icon:"forms",attributes:{type:"checkbox",inlineLabel:!0},isDefault:!0,scope:["inserter","transform"],isActive:e=>"checkbox"===e?.type},{name:"email",title:(0,tt.__)("Email Input"),icon:"email",description:(0,tt.__)("Used for email addresses."),attributes:{type:"email"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"email"===e?.type},{name:"url",title:(0,tt.__)("URL Input"),icon:"admin-site",description:(0,tt.__)("Used for URLs."),attributes:{type:"url"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"url"===e?.type},{name:"tel",title:(0,tt.__)("Telephone Input"),icon:"phone",description:(0,tt.__)("Used for phone numbers."),attributes:{type:"tel"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"tel"===e?.type},{name:"number",title:(0,tt.__)("Number Input"),icon:"edit-page",description:(0,tt.__)("A numeric input."),attributes:{type:"number"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"number"===e?.type}],sc=ic,cc={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form-input",title:"Input Field",category:"common",ancestor:["core/form"],description:"The basic building block for forms.",keywords:["input","form"],textdomain:"default",icon:"forms",attributes:{type:{type:"string",default:"text"},name:{type:"string"},label:{type:"rich-text",default:"Label",selector:".wp-block-form-input__label-content",source:"rich-text",__experimentalRole:"content"},inlineLabel:{type:"boolean",default:!1},required:{type:"boolean",default:!1,selector:".wp-block-form-input__input",source:"attribute",attribute:"required"},placeholder:{type:"string",selector:".wp-block-form-input__input",source:"attribute",attribute:"placeholder",__experimentalRole:"content"},value:{type:"string",default:"",selector:"input",source:"attribute",attribute:"value"},visibilityPermissions:{type:"string",default:"all"}},supports:{anchor:!0,reusable:!1,spacing:{margin:["top","bottom"]},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}}},style:["wp-block-form-input"]},{name:mc}=cc,uc={deprecated:rc,edit:lc,save:function({attributes:e}){const{type:t,name:n,label:a,inlineLabel:o,required:r,placeholder:l,value:i}=e,s=(0,nt.__experimentalGetBorderClassesAndStyles)(e),c=(0,nt.__experimentalGetColorClassesAndStyles)(e),m={...s.style,...c.style},u=ut()("wp-block-form-input__input",c.className,s.className),p="textarea"===t?"textarea":"input",d=nt.useBlockProps.save();return"hidden"===t?(0,Ke.createElement)("input",{type:t,name:n,value:i}):(0,Ke.createElement)("div",{...d},(0,Ke.createElement)("label",{className:ut()("wp-block-form-input__label",{"is-label-inline":o})},(0,Ke.createElement)("span",{className:"wp-block-form-input__label-content"},(0,Ke.createElement)(nt.RichText.Content,{value:a})),(0,Ke.createElement)(p,{className:u,type:"textarea"===t?void 0:t,name:n||(g=a,nc()((0,ac.__unstableStripHTML)(g)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,"")),required:r,"aria-required":r,placeholder:l||void 0,style:m})));var g},variations:sc},pc=()=>Xe({name:mc,metadata:cc,settings:uc}),dc=[["core/buttons",{},[["core/button",{text:(0,tt.__)("Submit"),tagName:"button",type:"submit"}]]]],gc=()=>{const e=(0,nt.useBlockProps)(),t=(0,nt.useInnerBlocksProps)(e,{template:dc,templateLock:"all"});return(0,Ke.createElement)("div",{className:"wp-block-form-submit-wrapper",...t})},hc=()=>{const e=nt.useBlockProps.save();return(0,Ke.createElement)("div",{className:"wp-block-form-submit-wrapper",...e},(0,Ke.createElement)(nt.InnerBlocks.Content,null))},bc={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form-submit-button",title:"Form Submit Button",category:"common",icon:"button",ancestor:["core/form"],allowedBlocks:["core/buttons","core/button"],description:"A submission button for forms.",keywords:["submit","button","form"],textdomain:"default",style:["wp-block-form-submit-button"]},{name:_c}=bc,yc={edit:gc,save:hc},vc=()=>Xe({name:_c,metadata:bc,settings:yc}),fc=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.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"})),kc=[["core/paragraph",{content:(0,tt.__)("Enter the message you wish displayed for form submission error/success, and select the type of the message (success/error) from the block's options.")}]],xc=({attributes:e,clientId:t})=>{const{type:n}=e,a=(0,nt.useBlockProps)({className:ut()("wp-block-form-submission-notification",{[`form-notification-type-${n}`]:n})}),{hasInnerBlocks:o}=(0,gt.useSelect)((e=>{const{getBlock:n}=e(nt.store),a=n(t);return{hasInnerBlocks:!(!a||!a.innerBlocks.length)}}),[t]),r=(0,nt.useInnerBlocksProps)(a,{template:kc,renderAppender:o?void 0:nt.InnerBlocks.ButtonBlockAppender});return(0,Ke.createElement)("div",{...r,"data-message-success":(0,tt.__)("Submission success notification"),"data-message-error":(0,tt.__)("Submission error notification")})};const wc=[{name:"form-submission-success",title:(0,tt.__)("Form Submission Success"),description:(0,tt.__)("Success message for form submissions."),attributes:{type:"success"},isDefault:!0,innerBlocks:[["core/paragraph",{content:(0,tt.__)("Your form has been submitted successfully."),backgroundColor:"#00D084",textColor:"#000000",style:{elements:{link:{color:{text:"#000000"}}}}}]],scope:["inserter","transform"],isActive:e=>!e?.type||"success"===e?.type},{name:"form-submission-error",title:(0,tt.__)("Form Submission Error"),description:(0,tt.__)("Error/failure message for form submissions."),attributes:{type:"error"},isDefault:!1,innerBlocks:[["core/paragraph",{content:(0,tt.__)("There was an error submitting your form."),backgroundColor:"#CF2E2E",textColor:"#FFFFFF",style:{elements:{link:{color:{text:"#FFFFFF"}}}}}]],scope:["inserter","transform"],isActive:e=>!e?.type||"error"===e?.type}],Ec=wc,Cc={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form-submission-notification",title:"Form Submission Notification",category:"common",ancestor:["core/form"],description:"Provide a notification message after the form has been submitted.",keywords:["form","feedback","notification","message"],textdomain:"default",icon:"feedback",attributes:{type:{type:"string",default:"success"}}},{name:Sc}=Cc,Bc={icon:fc,edit:xc,save:function({attributes:e}){const{type:t}=e;return(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save(nt.useBlockProps.save({className:ut()("wp-block-form-submission-notification",{[`form-notification-type-${t}`]:t})}))})},variations:Ec},Nc=()=>Xe({name:Sc,metadata:Cc,settings:Bc}),Tc=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M16.375 4.5H4.625a.125.125 0 0 0-.125.125v8.254l2.859-1.54a.75.75 0 0 1 .68-.016l2.384 1.142 2.89-2.074a.75.75 0 0 1 .874 0l2.313 1.66V4.625a.125.125 0 0 0-.125-.125Zm.125 9.398-2.75-1.975-2.813 2.02a.75.75 0 0 1-.76.067l-2.444-1.17L4.5 14.583v1.792c0 .069.056.125.125.125h11.75a.125.125 0 0 0 .125-.125v-2.477ZM4.625 3C3.728 3 3 3.728 3 4.625v11.75C3 17.273 3.728 18 4.625 18h11.75c.898 0 1.625-.727 1.625-1.625V4.625C18 3.728 17.273 3 16.375 3H4.625ZM20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z",fillRule:"evenodd",clipRule:"evenodd"})),Ic="none",Pc="media",Mc="attachment",zc="file",Rc="post";const Ac=(e,t="large")=>{const n=Object.fromEntries(Object.entries(null!=e?e:{}).filter((([e])=>["alt","id","link"].includes(e))));n.url=e?.sizes?.[t]?.url||e?.media_details?.sizes?.[t]?.source_url||e?.url||e?.source_url;const a=e?.sizes?.full?.url||e?.media_details?.sizes?.full?.source_url;return a&&(n.fullUrl=a),n};function Hc(){return!_t.Platform.isNative||function(){if(!window.wp||"boolean"!=typeof window.wp.galleryBlockV2Enabled)throw"window.wp.galleryBlockV2Enabled is not defined";return window.wp.galleryBlockV2Enabled}()}const Lc="file",Dc="post";function Fc(e){return Math.min(3,e?.images?.length)}function Vc(e,t){switch(t){case Lc:return{href:e?.source_url||e?.url,linkDestination:Pc};case Dc:return{href:e?.link,linkDestination:Mc};case Pc:return{href:e?.source_url||e?.url,linkDestination:Pc};case Mc:return{href:e?.link,linkDestination:Mc};case Ic:return{href:void 0,linkDestination:Ic}}return{}}function $c(e){let t=e.linkTo?e.linkTo:"none";"post"===t?t="attachment":"file"===t&&(t="media");const n=e.images.map((n=>function(e,t,n){return(0,Qe.createBlock)("core/image",{...e.id&&{id:parseInt(e.id)},url:e.url,alt:e.alt,caption:e.caption,sizeSlug:t,...Vc(e,n)})}(n,e.sizeSlug,t))),{images:a,ids:o,...r}=e;return[{...r,linkTo:t,allowResize:!1},n]}const Oc={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},shortCodeTransforms:{type:"array",default:[],items:{type:"object"}},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},fixedHeight:{type:"boolean",default:!0},linkTarget:{type:"string"},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"},allowResize:{type:"boolean",default:!1}},save({attributes:e}){const{caption:t,columns:n,imageCrop:a}=e,o=ut()("has-nested-images",{[`columns-${n}`]:void 0!==n,"columns-default":void 0===n,"is-cropped":a}),r=nt.useBlockProps.save({className:o}),l=nt.useInnerBlocksProps.save(r);return(0,Ke.createElement)("figure",{...l},l.children,!nt.RichText.isEmpty(t)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:t}))}},Gc={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},fixedHeight:{type:"boolean",default:!0},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"}},supports:{anchor:!0,align:!0},save({attributes:e}){const{images:t,columns:n=Fc(e),imageCrop:a,caption:o,linkTo:r}=e,l=`columns-${n} ${a?"is-cropped":""}`;return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:l})},(0,Ke.createElement)("ul",{className:"blocks-gallery-grid"},t.map((e=>{let t;switch(r){case Lc:t=e.fullUrl||e.url;break;case Dc:t=e.link}const n=(0,Ke.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,Ke.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,Ke.createElement)("figure",null,t?(0,Ke.createElement)("a",{href:t},n):n,!nt.RichText.isEmpty(e.caption)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!nt.RichText.isEmpty(o)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:o}))},migrate:e=>Hc()?$c(e):e},Uc={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},sizeSlug:{type:"string",default:"large"}},supports:{align:!0},isEligible:({linkTo:e})=>!e||"attachment"===e||"media"===e,migrate(e){if(Hc())return $c(e);let t=e.linkTo;return e.linkTo?"attachment"===e.linkTo?t="post":"media"===e.linkTo&&(t="file"):t="none",{...e,linkTo:t}},save({attributes:e}){const{images:t,columns:n=Fc(e),imageCrop:a,caption:o,linkTo:r}=e;return(0,Ke.createElement)("figure",{className:`columns-${n} ${a?"is-cropped":""}`},(0,Ke.createElement)("ul",{className:"blocks-gallery-grid"},t.map((e=>{let t;switch(r){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const n=(0,Ke.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,Ke.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,Ke.createElement)("figure",null,t?(0,Ke.createElement)("a",{href:t},n):n,!nt.RichText.isEmpty(e.caption)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!nt.RichText.isEmpty(o)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:o}))}},qc={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},link:{source:"attribute",selector:"img",attribute:"data-link"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",default:[]},columns:{type:"number"},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},isEligible:({ids:e})=>e&&e.some((e=>"string"==typeof e)),migrate(e){var t;return Hc()?$c(e):{...e,ids:(null!==(t=e.ids)&&void 0!==t?t:[]).map((e=>{const t=parseInt(e,10);return Number.isInteger(t)?t:null}))}},save({attributes:e}){const{images:t,columns:n=Fc(e),imageCrop:a,caption:o,linkTo:r}=e;return(0,Ke.createElement)("figure",{className:`columns-${n} ${a?"is-cropped":""}`},(0,Ke.createElement)("ul",{className:"blocks-gallery-grid"},t.map((e=>{let t;switch(r){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const n=(0,Ke.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,Ke.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,Ke.createElement)("figure",null,t?(0,Ke.createElement)("a",{href:t},n):n,!nt.RichText.isEmpty(e.caption)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!nt.RichText.isEmpty(o)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:o}))}},jc={attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"string",source:"html",selector:"figcaption"}}},ids:{type:"array",default:[]},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},save({attributes:e}){const{images:t,columns:n=Fc(e),imageCrop:a,linkTo:o}=e;return(0,Ke.createElement)("ul",{className:`columns-${n} ${a?"is-cropped":""}`},t.map((e=>{let t;switch(o){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const n=(0,Ke.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,Ke.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,Ke.createElement)("figure",null,t?(0,Ke.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:e.caption})))})))},migrate:e=>Hc()?$c(e):e},Wc={attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"string",source:"html",selector:"figcaption"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},isEligible:({images:e,ids:t})=>e&&e.length>0&&(!t&&e||t&&e&&t.length!==e.length||e.some(((e,n)=>!e&&null!==t[n]||parseInt(e,10)!==t[n]))),migrate(e){var t;return Hc()?$c(e):{...e,ids:(null!==(t=e.images)&&void 0!==t?t:[]).map((({id:e})=>e?parseInt(e,10):null))}},supports:{align:!0},save({attributes:e}){const{images:t,columns:n=Fc(e),imageCrop:a,linkTo:o}=e;return(0,Ke.createElement)("ul",{className:`columns-${n} ${a?"is-cropped":""}`},t.map((e=>{let t;switch(o){case"media":t=e.url;break;case"attachment":t=e.link}const n=(0,Ke.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,Ke.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,Ke.createElement)("figure",null,t?(0,Ke.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:e.caption})))})))}},Zc={attributes:{images:{type:"array",default:[],source:"query",selector:"div.wp-block-gallery figure.blocks-gallery-image img",query:{url:{source:"attribute",attribute:"src"},alt:{source:"attribute",attribute:"alt",default:""},id:{source:"attribute",attribute:"data-id"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},align:{type:"string",default:"none"}},supports:{align:!0},save({attributes:e}){const{images:t,columns:n=Fc(e),align:a,imageCrop:o,linkTo:r}=e,l=ut()(`columns-${n}`,{alignnone:"none"===a,"is-cropped":o});return(0,Ke.createElement)("div",{className:l},t.map((e=>{let t;switch(r){case"media":t=e.url;break;case"attachment":t=e.link}const n=(0,Ke.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id});return(0,Ke.createElement)("figure",{key:e.id||e.url,className:"blocks-gallery-image"},t?(0,Ke.createElement)("a",{href:t},n):n)})))},migrate:e=>Hc()?$c(e):e},Qc=[Oc,Gc,Uc,qc,jc,Wc,Zc],Kc=window.wp.viewport,Yc=(0,Ke.createElement)(nt.BlockIcon,{icon:Tc}),Jc=20,Xc="none",em="media",tm="attachment",nm="custom",am=["noreferrer","noopener"],om=["image"];function rm(e,t,n){switch(n||t){case zc:case Pc:return{href:e?.source_url||e?.url,linkDestination:em};case Rc:case Mc:return{href:e?.link,linkDestination:tm};case Ic:return{href:void 0,linkDestination:Xc}}return{}}function lm(e,{rel:t}){const n=e?"_blank":void 0;let a;return a=n||t?function(e){let t=e;return void 0!==e&&t&&(am.forEach((e=>{const n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),t||(t=void 0)),t}(t):void 0,{linkTarget:n,rel:a}}function im(e){const{attributes:t,isSelected:n,setAttributes:a,mediaPlaceholder:o,insertBlocksAfter:r,blockProps:l,__unstableLayoutClassNames:i,isContentLocked:s,multiGallerySelection:c}=e,{align:m,columns:u,imageCrop:p}=t;return(0,Ke.createElement)("figure",{...l,className:ut()(l.className,i,"blocks-gallery-grid",{[`align${m}`]:m,[`columns-${u}`]:void 0!==u,"columns-default":void 0===u,"is-cropped":p})},l.children,n&&!l.children&&(0,Ke.createElement)(Ye.View,{className:"blocks-gallery-media-placeholder-wrapper"},o),(0,Ke.createElement)(Qt,{attributes:t,setAttributes:a,isSelected:n,insertBlocksAfter:r,showToolbarButton:!c&&!s,className:"blocks-gallery-caption",label:(0,tt.__)("Gallery caption text"),placeholder:(0,tt.__)("Add gallery caption")}))}function sm(e,t,n){return(0,_t.useMemo)((()=>function(){if(!e||0===e.length)return;const{imageSizes:a}=n();let o={};t&&(o=e.reduce(((e,t)=>{if(!t.id)return e;const n=a.reduce(((e,n)=>{const a=t.sizes?.[n.slug]?.url,o=t.media_details?.sizes?.[n.slug]?.source_url;return{...e,[n.slug]:a||o}}),{});return{...e,[parseInt(t.id,10)]:n}}),{}));const r=Object.values(o);return a.filter((({slug:e})=>r.some((t=>t[e])))).map((({name:e,slug:t})=>({value:t,label:e})))}()),[e,t])}function cm(e,t){const[n,a]=(0,_t.useState)([]);return(0,_t.useMemo)((()=>function(){let o=!1;const r=n.filter((t=>e.find((e=>t.clientId===e.clientId))));r.length<n.length&&(o=!0);e.forEach((e=>{e.fromSavedContent&&!r.find((t=>t.id===e.id))&&(o=!0,r.push(e))}));const l=e.filter((e=>!r.find((t=>e.clientId&&t.clientId===e.clientId))&&t?.find((t=>t.id===e.id))&&!e.fromSavedConent));(o||l?.length>0)&&a([...r,...l]);return l.length>0?l:null}()),[e,t])}const mm=[];const{useStyleOverride:um}=Ft(nt.privateApis);function pm({blockGap:e,clientId:t}){const n="var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )";let a,o=n,r=n;e&&(a="string"==typeof e?(0,nt.__experimentalGetGapCSSValue)(e):(0,nt.__experimentalGetGapCSSValue)(e?.top)||n,r="string"==typeof e?(0,nt.__experimentalGetGapCSSValue)(e):(0,nt.__experimentalGetGapCSSValue)(e?.left)||n,o=a===r?a:`${a} ${r}`);return um({css:`#block-${t} {\n\t\t--wp--style--unstable-gallery-gap: ${"0"===r?"0px":r};\n\t\tgap: ${o}\n\t}`}),null}const dm=[{value:Mc,label:(0,tt.__)("Attachment Page")},{value:Pc,label:(0,tt.__)("Media File")},{value:Ic,label:(0,tt._x)("None","Media item link option")}],gm=["image"],hm=_t.Platform.isNative?(0,tt.__)("Add media"):(0,tt.__)("Drag images, upload new ones or select files from your library."),bm=_t.Platform.isNative?{type:"stepper"}:{},_m=[];const ym=(0,jt.compose)([(0,Kc.withViewportMatch)({isNarrow:"< small"})])((function(e){const{setAttributes:t,attributes:n,className:a,clientId:o,isSelected:r,insertBlocksAfter:l,isContentLocked:i,onFocus:s}=e,{columns:c,imageCrop:m,randomOrder:u,linkTarget:p,linkTo:d,sizeSlug:g}=n,{__unstableMarkNextChangeAsNotPersistent:h,replaceInnerBlocks:b,updateBlockAttributes:_,selectBlock:y}=(0,gt.useDispatch)(nt.store),{createSuccessNotice:v,createErrorNotice:f}=(0,gt.useDispatch)(Pt.store),{getBlock:k,getSettings:x,preferredStyle:w,innerBlockImages:E,blockWasJustInserted:C,multiGallerySelection:S}=(0,gt.useSelect)((e=>{var t;const{getBlockName:n,getMultiSelectedBlockClientIds:a,getSettings:r,getBlock:l,wasBlockJustInserted:i}=e(nt.store),s=r().__experimentalPreferredStyleVariations,c=a();return{getBlock:l,getSettings:r,preferredStyle:s?.value?.["core/image"],innerBlockImages:null!==(t=l(o)?.innerBlocks)&&void 0!==t?t:_m,blockWasJustInserted:i(o,"inserter_menu"),multiGallerySelection:c.length&&c.every((e=>"core/gallery"===n(e)))}}),[o]),B=(0,_t.useMemo)((()=>E?.map((e=>({clientId:e.clientId,id:e.attributes.id,url:e.attributes.url,attributes:e.attributes,fromSavedContent:Boolean(e.originalContent)})))),[E]),N=function(e){return(0,gt.useSelect)((t=>{var n;const a=e.map((e=>e.attributes.id)).filter((e=>void 0!==e));return 0===a.length?mm:null!==(n=t(dt.store).getMediaItems({include:a.join(","),per_page:-1,orderby:"include"}))&&void 0!==n?n:mm}),[e])}(E),T=cm(B,N);(0,_t.useEffect)((()=>{T?.forEach((e=>{h(),_(e.clientId,{...P(e.attributes),id:e.id,align:void 0})}))}),[T]);const I=sm(N,r,x);function P(e){const t=e.id?N.find((({id:t})=>t===e.id)):null;let a,o;return a=e.className&&""!==e.className?e.className:w?`is-style-${w}`:void 0,o=e.linkTarget||e.rel?{linkTarget:e.linkTarget,rel:e.rel}:lm(p,n),{...Ac(t,g),...rm(t,d,e?.linkDestination),...o,className:a,sizeSlug:g,caption:e.caption||t.caption?.raw,alt:e.alt||t.alt_text}}function M(e){const t=_t.Platform.isNative&&e.id?N.find((({id:t})=>t===e.id)):null,n=t?t?.media_type:e.type;return gm.some((e=>0===n?.indexOf(e)))||0===e.url?.indexOf("blob:")}function z(e){const t="[object FileList]"===Object.prototype.toString.call(e),n=t?Array.from(e).map((e=>e.url?e:Ac({url:(0,It.createBlobURL)(e)}))):e;n.every(M)||f((0,tt.__)("If uploading to a gallery all files need to be image formats"),{id:"gallery-upload-invalid-file",type:"snackbar"});const a=n.filter((e=>e.url||M(e))).map((e=>e.url?e:Ac({url:(0,It.createBlobURL)(e)}))),r=a.reduce(((e,t,n)=>(e[t.id]=n,e)),{}),l=t?E:E.filter((e=>a.find((t=>t.id===e.attributes.id)))),i=a.filter((e=>!l.find((t=>e.id===t.attributes.id)))).map((e=>(0,Qe.createBlock)("core/image",{id:e.id,url:e.url,caption:e.caption,alt:e.alt})));b(o,l.concat(i).sort(((e,t)=>r[e.attributes.id]-r[t.attributes.id]))),i?.length>0&&y(i[0].clientId)}(0,_t.useEffect)((()=>{d||(h(),t({linkTo:window?.wp?.media?.view?.settings?.defaultProps?.link||Ic}))}),[d]);const R=!!B.length,A=R&&B.some((e=>!!e.id)),H=B.some((e=>_t.Platform.isNative?0===e.url?.indexOf("file:"):!e.id&&0===e.url?.indexOf("blob:"))),L=_t.Platform.select({web:{addToGallery:!1,disableMediaButtons:H,value:{}},native:{addToGallery:A,isAppender:R,disableMediaButtons:R&&!r||H,value:A?B:{},autoOpenMediaUpload:!R&&r&&C,onFocus:s}}),D=(0,Ke.createElement)(nt.MediaPlaceholder,{handleUpload:!1,icon:Yc,labels:{title:(0,tt.__)("Gallery"),instructions:hm},onSelect:z,accept:"image/*",allowedTypes:gm,multiple:!0,onError:function(e){f(e,{type:"snackbar"})},...L}),F=(0,nt.useBlockProps)({className:ut()(a,"has-nested-images")}),V=_t.Platform.isNative&&{marginHorizontal:0,marginVertical:0},$=(0,nt.useInnerBlocksProps)(F,{orientation:"horizontal",renderAppender:!1,...V});if(!R)return(0,Ke.createElement)(Ye.View,{...$},$.children,D);const O=d&&"none"!==d;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},B.length>1&&(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Columns"),value:c||(G=B.length,G?Math.min(3,G):3),onChange:function(e){t({columns:e})},min:1,max:Math.min(8,B.length),...bm,required:!0,__next40pxDefaultSize:!0}),I?.length>0&&(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Resolution"),help:(0,tt.__)("Select the size of the source images."),value:g,options:I,onChange:function(e){t({sizeSlug:e});const n={},a=[];k(o).innerBlocks.forEach((t=>{a.push(t.clientId);const o=t.attributes.id?N.find((({id:e})=>e===t.attributes.id)):null;n[t.clientId]=function(e,t){const n=e?.media_details?.sizes?.[t]?.source_url;return n?{url:n,width:void 0,height:void 0,sizeSlug:t}:{}}(o,e)})),_(a,n,!0);const r=I.find((t=>t.value===e));v((0,tt.sprintf)((0,tt.__)("All gallery image sizes updated to: %s"),r.label),{id:"gallery-attributes-sizeSlug",type:"snackbar"})},hideCancelButton:!0,size:"__unstable-large"}),(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link to"),value:d,onChange:function(e){t({linkTo:e});const n={},a=[];k(o).innerBlocks.forEach((t=>{a.push(t.clientId);const o=t.attributes.id?N.find((({id:e})=>e===t.attributes.id)):null;n[t.clientId]=rm(o,e)})),_(a,n,!0);const r=[...dm].find((t=>t.value===e));v((0,tt.sprintf)((0,tt.__)("All gallery image links updated to: %s"),r.label),{id:"gallery-attributes-linkTo",type:"snackbar"})},options:dm,hideCancelButton:!0,size:"__unstable-large"}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Crop images to fit"),checked:!!m,onChange:function(){t({imageCrop:!m})}}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Randomize order"),checked:!!u,onChange:function(){t({randomOrder:!u})}}),O&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open images in new tab"),checked:"_blank"===p,onChange:function(e){const n=e?"_blank":void 0;t({linkTarget:n});const a={},r=[];k(o).innerBlocks.forEach((e=>{r.push(e.clientId),a[e.clientId]=lm(n,e.attributes)})),_(r,a,!0);const l=e?(0,tt.__)("All gallery images updated to open in new tab"):(0,tt.__)("All gallery images updated to not open in new tab");v(l,{id:"gallery-attributes-openInNewTab",type:"snackbar"})}}),_t.Platform.isWeb&&!I&&A&&(0,Ke.createElement)(et.BaseControl,{className:"gallery-image-sizes"},(0,Ke.createElement)(et.BaseControl.VisualLabel,null,(0,tt.__)("Resolution")),(0,Ke.createElement)(Ye.View,{className:"gallery-image-sizes__loading"},(0,Ke.createElement)(et.Spinner,null),(0,tt.__)("Loading options…"))))),_t.Platform.isWeb&&(0,Ke.createElement)(Ke.Fragment,null,!S&&(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(nt.MediaReplaceFlow,{allowedTypes:gm,accept:"image/*",handleUpload:!1,onSelect:z,name:(0,tt.__)("Add"),multiple:!0,mediaIds:B.filter((e=>e.id)).map((e=>e.id)),addToGallery:A})),(0,Ke.createElement)(pm,{blockGap:n.style?.spacing?.blockGap,clientId:o})),(0,Ke.createElement)(im,{...e,isContentLocked:i,images:B,mediaPlaceholder:!R||_t.Platform.isNative?D:void 0,blockProps:$,insertBlocksAfter:l,multiGallerySelection:S}));var G})),vm=(e,t="large")=>{const n=Object.fromEntries(Object.entries(null!=e?e:{}).filter((([e])=>["alt","id","link","caption"].includes(e))));n.url=e?.sizes?.[t]?.url||e?.media_details?.sizes?.[t]?.source_url||e?.url;const a=e?.sizes?.full?.url||e?.media_details?.sizes?.full?.source_url;return a&&(n.fullUrl=a),n},fm=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.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-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})),km=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),xm=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),wm=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),Em="none",Cm="file",Sm="post";class Bm extends _t.Component{constructor(){super(...arguments),this.onSelectImage=this.onSelectImage.bind(this),this.onRemoveImage=this.onRemoveImage.bind(this),this.bindContainer=this.bindContainer.bind(this),this.onEdit=this.onEdit.bind(this),this.onSelectImageFromLibrary=this.onSelectImageFromLibrary.bind(this),this.onSelectCustomURL=this.onSelectCustomURL.bind(this),this.state={isEditing:!1}}bindContainer(e){this.container=e}onSelectImage(){this.props.isSelected||this.props.onSelect()}onRemoveImage(e){this.container===this.container.ownerDocument.activeElement&&this.props.isSelected&&-1!==[fn.BACKSPACE,fn.DELETE].indexOf(e.keyCode)&&(e.preventDefault(),this.props.onRemove())}onEdit(){this.setState({isEditing:!0})}componentDidUpdate(){const{image:e,url:t,__unstableMarkNextChangeAsNotPersistent:n}=this.props;e&&!t&&(n(),this.props.setAttributes({url:e.source_url,alt:e.alt_text}))}deselectOnBlur(){this.props.onDeselect()}onSelectImageFromLibrary(e){const{setAttributes:t,id:n,url:a,alt:o,caption:r,sizeSlug:l}=this.props;if(!e||!e.url)return;let i=vm(e,l);if(((e,t)=>!e&&(0,It.isBlobURL)(t))(n,a)&&o){const{alt:e,...t}=i;i=t}if(r&&!i.caption){const{caption:e,...t}=i;i=t}t(i),this.setState({isEditing:!1})}onSelectCustomURL(e){const{setAttributes:t,url:n}=this.props;e!==n&&(t({url:e,id:void 0}),this.setState({isEditing:!1}))}render(){const{url:e,alt:t,id:n,linkTo:a,link:o,isFirstItem:r,isLastItem:l,isSelected:i,caption:s,onRemove:c,onMoveForward:m,onMoveBackward:u,setAttributes:p,"aria-label":d}=this.props,{isEditing:g}=this.state;let h;switch(a){case Cm:h=e;break;case Sm:h=o}const b=(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("img",{src:e,alt:t,"data-id":n,onKeyDown:this.onRemoveImage,tabIndex:"0","aria-label":d,ref:this.bindContainer}),(0,It.isBlobURL)(e)&&(0,Ke.createElement)(et.Spinner,null)),_=ut()({"is-selected":i,"is-transient":(0,It.isBlobURL)(e)});return(0,Ke.createElement)("figure",{className:_,onClick:this.onSelectImage,onFocus:this.onSelectImage},!g&&(h?(0,Ke.createElement)("a",{href:h},b):b),g&&(0,Ke.createElement)(nt.MediaPlaceholder,{labels:{title:(0,tt.__)("Edit gallery image")},icon:fm,onSelect:this.onSelectImageFromLibrary,onSelectURL:this.onSelectCustomURL,accept:"image/*",allowedTypes:["image"],value:{id:n,src:e}}),(0,Ke.createElement)(et.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-left"},(0,Ke.createElement)(et.Button,{icon:km,onClick:r?void 0:u,label:(0,tt.__)("Move image backward"),"aria-disabled":r,disabled:!i}),(0,Ke.createElement)(et.Button,{icon:xm,onClick:l?void 0:m,label:(0,tt.__)("Move image forward"),"aria-disabled":l,disabled:!i})),(0,Ke.createElement)(et.ButtonGroup,{className:"block-library-gallery-item__inline-menu is-right"},(0,Ke.createElement)(et.Button,{icon:Di,onClick:this.onEdit,label:(0,tt.__)("Replace image"),disabled:!i}),(0,Ke.createElement)(et.Button,{icon:wm,onClick:c,label:(0,tt.__)("Remove image"),disabled:!i})),!g&&(i||s)&&(0,Ke.createElement)(nt.RichText,{tagName:"figcaption",className:(0,nt.__experimentalGetElementClassName)("caption"),"aria-label":(0,tt.__)("Image caption text"),placeholder:i?(0,tt.__)("Add caption"):null,value:s,onChange:e=>p({caption:e}),inlineToolbar:!0}))}}const Nm=(0,jt.compose)([(0,gt.withSelect)(((e,t)=>{const{getMedia:n}=e(dt.store),{id:a}=t;return{image:a?n(parseInt(a,10)):null}})),(0,gt.withDispatch)((e=>{const{__unstableMarkNextChangeAsNotPersistent:t}=e(nt.store);return{__unstableMarkNextChangeAsNotPersistent:t}}))])(Bm);function Tm({isHidden:e,...t}){return e?(0,Ke.createElement)(et.VisuallyHidden,{as:nt.RichText,...t}):(0,Ke.createElement)(nt.RichText,{...t})}const Im=e=>{const{attributes:t,isSelected:n,setAttributes:a,selectedImage:o,mediaPlaceholder:r,onMoveBackward:l,onMoveForward:i,onRemoveImage:s,onSelectImage:c,onDeselectImage:m,onSetImageAttributes:u,insertBlocksAfter:p,blockProps:d}=e,{align:g,columns:h=Fc(t),caption:b,imageCrop:_,images:y}=t;return(0,Ke.createElement)("figure",{...d,className:ut()(d.className,{[`align${g}`]:g,[`columns-${h}`]:h,"is-cropped":_})},(0,Ke.createElement)("ul",{className:"blocks-gallery-grid"},y.map(((e,a)=>{const r=(0,tt.sprintf)((0,tt.__)("image %1$d of %2$d in gallery"),a+1,y.length);return(0,Ke.createElement)("li",{className:"blocks-gallery-item",key:e.id?`${e.id}-${a}`:e.url},(0,Ke.createElement)(Nm,{url:e.url,alt:e.alt,id:e.id,isFirstItem:0===a,isLastItem:a+1===y.length,isSelected:n&&o===a,onMoveBackward:l(a),onMoveForward:i(a),onRemove:s(a),onSelect:c(a),onDeselect:m(a),setAttributes:e=>u(a,e),caption:e.caption,"aria-label":r,sizeSlug:t.sizeSlug}))}))),r,(0,Ke.createElement)(Tm,{isHidden:!n&&nt.RichText.isEmpty(b),tagName:"figcaption",className:ut()("blocks-gallery-caption",(0,nt.__experimentalGetElementClassName)("caption")),"aria-label":(0,tt.__)("Gallery caption text"),placeholder:(0,tt.__)("Write gallery caption…"),value:b,onChange:e=>a({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>p((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))}))},Pm=[{value:Sm,label:(0,tt.__)("Attachment Page")},{value:Cm,label:(0,tt.__)("Media File")},{value:Em,label:(0,tt.__)("None")}],Mm=["image"],zm=_t.Platform.select({web:(0,tt.__)("Drag images, upload new ones or select files from your library."),native:(0,tt.__)("ADD MEDIA")}),Rm=_t.Platform.select({web:{},native:{type:"stepper"}});const Am=(0,jt.compose)([et.withNotices,(0,Kc.withViewportMatch)({isNarrow:"< small"})])((function(e){const{attributes:t,clientId:n,isSelected:a,noticeUI:o,noticeOperations:r,onFocus:l}=e,{columns:i=Fc(t),imageCrop:s,images:c,linkTo:m,sizeSlug:u}=t,[p,d]=(0,_t.useState)(),[g,h]=(0,_t.useState)(),{__unstableMarkNextChangeAsNotPersistent:b}=(0,gt.useDispatch)(nt.store),{imageSizes:_,mediaUpload:y,getMedia:v,wasBlockJustInserted:f}=(0,gt.useSelect)((e=>{const t=e(nt.store).getSettings();return{imageSizes:t.imageSizes,mediaUpload:t.mediaUpload,getMedia:e(dt.store).getMedia,wasBlockJustInserted:e(nt.store).wasBlockJustInserted(n,"inserter_menu")}})),k=(0,_t.useMemo)((()=>{var e;return a?(null!==(e=t.ids)&&void 0!==e?e:[]).reduce(((e,t)=>{if(!t)return e;const n=v(t),a=_.reduce(((e,t)=>{const a=n?.sizes?.[t.slug]?.url,o=n?.media_details?.sizes?.[t.slug]?.source_url;return{...e,[t.slug]:a||o}}),{});return{...e,[parseInt(t,10)]:a}}),{}):{}}),[a,t.ids,_]);function x(t){if(t.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');t.images&&(t={...t,ids:t.images.map((({id:e})=>parseInt(e,10)))}),e.setAttributes(t)}function w(e,t){const n=[...c];n.splice(t,1,c[e]),n.splice(e,1,c[t]),d(t),x({images:n})}function E(e){const t=e.id.toString(),n=c.find((({id:e})=>e===t)),a=n?n.caption:e.caption;if(!g)return a;const o=g.find((({id:e})=>e===t));return o&&o.caption!==e.caption?e.caption:a}function C(e){h(e.map((e=>({id:e.id.toString(),caption:e.caption})))),x({images:e.map((e=>({...vm(e,u),caption:E(e),id:e.id.toString()}))),columns:t.columns?Math.min(e.length,t.columns):t.columns})}(0,_t.useEffect)((()=>{if("web"===_t.Platform.OS&&c&&c.length>0&&c.every((({url:e})=>(0,It.isBlobURL)(e)))){const e=c.map((({url:e})=>(0,It.getBlobByURL)(e)));c.forEach((({url:e})=>(0,It.revokeBlobURL)(e))),y({filesList:e,onFileChange:C,allowedTypes:["image"]})}}),[]),(0,_t.useEffect)((()=>{a||d()}),[a]),(0,_t.useEffect)((()=>{m||(b(),x({linkTo:window?.wp?.media?.view?.settings?.defaultProps?.link||Em}))}),[m]);const S=!!c.length,B=S&&c.some((e=>!!e.id)),N=(0,Ke.createElement)(nt.MediaPlaceholder,{addToGallery:B,isAppender:S,disableMediaButtons:S&&!a,icon:!S&&Yc,labels:{title:!S&&(0,tt.__)("Gallery"),instructions:!S&&zm},onSelect:C,accept:"image/*",allowedTypes:Mm,multiple:!0,value:B?c:{},onError:function(e){r.removeAllNotices(),r.createErrorNotice(e)},notices:S?void 0:o,onFocus:l,autoOpenMediaUpload:!S&&a&&f}),T=(0,nt.useBlockProps)();if(!S)return(0,Ke.createElement)(Ye.View,{...T},N);const I=function(){const e=Object.values(k);return _.filter((({slug:t})=>e.some((e=>e[t])))).map((({name:e,slug:t})=>({value:t,label:e})))}(),P=S&&I.length>0;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},c.length>1&&(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Columns"),value:i,onChange:function(e){x({columns:e})},min:1,max:Math.min(8,c.length),...Rm,required:!0}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Crop images"),checked:!!s,onChange:function(){x({imageCrop:!s})},help:function(e){return e?(0,tt.__)("Thumbnails are cropped to align."):(0,tt.__)("Thumbnails are not cropped.")}}),(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link to"),value:m,onChange:function(e){x({linkTo:e})},options:Pm,hideCancelButton:!0}),P&&(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Image size"),value:u,options:I,onChange:function(e){x({images:(null!=c?c:[]).map((t=>{if(!t.id)return t;const n=k[parseInt(t.id,10)]?.[e];return{...t,...n&&{url:n}}})),sizeSlug:e})},hideCancelButton:!0}))),o,(0,Ke.createElement)(Im,{...e,selectedImage:p,mediaPlaceholder:N,onMoveBackward:function(e){return()=>{0!==e&&w(e,e-1)}},onMoveForward:function(e){return()=>{e!==c.length-1&&w(e,e+1)}},onRemoveImage:function(e){return()=>{const n=c.filter(((t,n)=>e!==n));d(),x({images:n,columns:t.columns?Math.min(n.length,t.columns):t.columns})}},onSelectImage:function(e){return()=>{d(e)}},onDeselectImage:function(){return()=>{d()}},onSetImageAttributes:function(e,t){c[e]&&x({images:[...c.slice(0,e),{...c[e],...t},...c.slice(e+1)]})},blockProps:T,onFocusGalleryCaption:function(){d()}}))}));const Hm=(0,jt.compose)([et.withNotices])((function(e){return Hc()?(0,Ke.createElement)(ym,{...e}):(0,Ke.createElement)(Am,{...e})}));(0,_i.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-to",(function(e){if(Hc()&&"core/gallery"===e.name&&e.attributes?.images.length>0){const t=e.attributes.images.map((({url:t,id:n,alt:a})=>(0,Qe.createBlock)("core/image",{url:t,id:n?parseInt(n,10):null,alt:a,sizeSlug:e.attributes.sizeSlug,linkDestination:e.attributes.linkDestination})));delete e.attributes.ids,delete e.attributes.images,e.innerBlocks=t}return e})),(0,_i.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-from",(function(e,t){const n=(Array.isArray(t)?t:[t]).find((t=>"core/gallery"===t.name&&t.innerBlocks.length>0&&!t.attributes.images?.length>0&&!e.name.includes("core/")));if(n){const e=n.innerBlocks.map((({attributes:{url:e,id:t,alt:n}})=>({url:e,id:t?parseInt(t,10):null,alt:n}))),t=e.map((({id:e})=>e));n.attributes.images=e,n.attributes.ids=t}return e}));const Lm={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:e=>{let{align:t,sizeSlug:n}=e[0];t=e.every((e=>e.align===t))?t:void 0,n=e.every((e=>e.sizeSlug===n))?n:void 0;const a=e.filter((({url:e})=>e));if(Hc()){const e=a.map((e=>(e.width=void 0,e.height=void 0,(0,Qe.createBlock)("core/image",e))));return(0,Qe.createBlock)("core/gallery",{align:t,sizeSlug:n},e)}return(0,Qe.createBlock)("core/gallery",{images:a.map((({id:e,url:t,alt:n,caption:a})=>({id:e.toString(),url:t,alt:n,caption:a}))),ids:a.map((({id:e})=>parseInt(e,10))),align:t,sizeSlug:n})}},{type:"shortcode",tag:"gallery",transform({named:{ids:e,columns:t=3,link:n,orderby:a}}){const o=(e=>e?e.split(",").map((e=>parseInt(e,10))):[])(e).map((e=>parseInt(e,10)));let r=Ic;"post"===n?r=Mc:"file"===n&&(r=Pc);return(0,Qe.createBlock)("core/gallery",{columns:parseInt(t,10),linkTo:r,randomOrder:"rand"===a},o.map((e=>(0,Qe.createBlock)("core/image",{id:e}))))},isMatch:({named:e})=>void 0!==e.ids},{type:"files",priority:1,isMatch:e=>1!==e.length&&e.every((e=>0===e.type.indexOf("image/"))),transform(e){if(Hc()){const t=e.map((e=>(0,Qe.createBlock)("core/image",{url:(0,It.createBlobURL)(e)})));return(0,Qe.createBlock)("core/gallery",{},t)}const t=(0,Qe.createBlock)("core/gallery",{images:e.map((e=>Ac({url:(0,It.createBlobURL)(e)})))});return t}}],to:[{type:"block",blocks:["core/image"],transform:({align:e,images:t,ids:n,sizeSlug:a},o)=>Hc()?o.length>0?o.map((({attributes:{url:t,alt:n,caption:a,title:o,href:r,rel:l,linkClass:i,id:s,sizeSlug:c,linkDestination:m,linkTarget:u,anchor:p,className:d}})=>(0,Qe.createBlock)("core/image",{align:e,url:t,alt:n,caption:a,title:o,href:r,rel:l,linkClass:i,id:s,sizeSlug:c,linkDestination:m,linkTarget:u,anchor:p,className:d}))):(0,Qe.createBlock)("core/image",{align:e}):t.length>0?t.map((({url:t,alt:o,caption:r},l)=>(0,Qe.createBlock)("core/image",{id:n[l],url:t,alt:o,caption:r,align:e,sizeSlug:a}))):(0,Qe.createBlock)("core/image",{align:e})}]},Dm=Lm,Fm={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/gallery",title:"Gallery",category:"media",allowedBlocks:["core/image"],description:"Display multiple images in a rich gallery.",keywords:["images","photos"],textdomain:"default",attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"rich-text",source:"rich-text",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},shortCodeTransforms:{type:"array",items:{type:"object"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"rich-text",source:"rich-text",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},randomOrder:{type:"boolean",default:!1},fixedHeight:{type:"boolean",default:!0},linkTarget:{type:"string"},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"},allowResize:{type:"boolean",default:!1}},providesContext:{allowResize:"allowResize",imageCrop:"imageCrop",fixedHeight:"fixedHeight"},supports:{anchor:!0,align:!0,html:!1,units:["px","em","rem","vh","vw"],spacing:{margin:!0,padding:!0,blockGap:["horizontal","vertical"],__experimentalSkipSerialization:["blockGap"],__experimentalDefaultControls:{blockGap:!0,margin:!1,padding:!1}},color:{text:!1,background:!0,gradients:!0},layout:{allowSwitching:!1,allowInheriting:!1,allowEditing:!1,default:{type:"flex"}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-gallery-editor",style:"wp-block-gallery"},{name:Vm}=Fm,$m={icon:Tc,example:{attributes:{columns:2},innerBlocks:[{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg"}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg"}}]},transforms:Dm,edit:Hm,save:function({attributes:e}){if(!Hc())return function({attributes:e}){const{images:t,columns:n=Fc(e),imageCrop:a,caption:o,linkTo:r}=e,l=`columns-${n} ${a?"is-cropped":""}`;return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:l})},(0,Ke.createElement)("ul",{className:"blocks-gallery-grid"},t.map((e=>{let t;switch(r){case Cm:t=e.fullUrl||e.url;break;case Sm:t=e.link}const n=(0,Ke.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,Ke.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,Ke.createElement)("figure",null,t?(0,Ke.createElement)("a",{href:t},n):n,!nt.RichText.isEmpty(e.caption)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:ut()("blocks-gallery-item__caption",(0,nt.__experimentalGetElementClassName)("caption")),value:e.caption})))}))),!nt.RichText.isEmpty(o)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:ut()("blocks-gallery-caption",(0,nt.__experimentalGetElementClassName)("caption")),value:o}))}({attributes:e});const{caption:t,columns:n,imageCrop:a}=e,o=ut()("has-nested-images",{[`columns-${n}`]:void 0!==n,"columns-default":void 0===n,"is-cropped":a}),r=nt.useBlockProps.save({className:o}),l=nt.useInnerBlocksProps.save(r);return(0,Ke.createElement)("figure",{...l},l.children,!nt.RichText.isEmpty(t)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",className:ut()("blocks-gallery-caption",(0,nt.__experimentalGetElementClassName)("caption")),value:t}))},deprecated:Qc},Om=()=>Xe({name:Vm,metadata:Fm,settings:$m}),Gm=e=>{if(e.tagName||(e={...e,tagName:"div"}),!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:a,...o}=e;return{...o,style:t}},Um=[{attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},supports:{__experimentalOnEnter:!0,__experimentalSettings:!0,align:["wide","full"],anchor:!0,ariaLabel:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:["top","bottom"],padding:!0,blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},layout:!0},save:({attributes:{tagName:e}})=>(0,Ke.createElement)(e,{...nt.useInnerBlocksProps.save(nt.useBlockProps.save())}),isEligible:({layout:e})=>!e||e.inherit||e.contentSize&&"constrained"!==e.type,migrate:e=>{const{layout:t=null}=e;return t?t.inherit||t.contentSize?{...e,layout:{...t,type:"constrained"}}:void 0:e}},{attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},supports:{align:["wide","full"],anchor:!0,color:{gradients:!0,link:!0},spacing:{padding:!0},__experimentalBorder:{radius:!0}},save({attributes:e}){const{tagName:t}=e;return(0,Ke.createElement)(t,{...nt.useBlockProps.save()},(0,Ke.createElement)("div",{className:"wp-block-group__inner-container"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:Gm,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,textColor:a,customTextColor:o}=e,r=(0,nt.getColorClassName)("background-color",t),l=(0,nt.getColorClassName)("color",a),i=ut()(r,l,{"has-text-color":a||o,"has-background":t||n}),s={backgroundColor:r?void 0:n,color:l?void 0:o};return(0,Ke.createElement)("div",{className:i,style:s},(0,Ke.createElement)("div",{className:"wp-block-group__inner-container"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},migrate:Gm,supports:{align:["wide","full"],anchor:!0,html:!1},save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,textColor:a,customTextColor:o}=e,r=(0,nt.getColorClassName)("background-color",t),l=(0,nt.getColorClassName)("color",a),i=ut()(r,{"has-text-color":a||o,"has-background":t||n}),s={backgroundColor:r?void 0:n,color:l?void 0:o};return(0,Ke.createElement)("div",{className:i,style:s},(0,Ke.createElement)("div",{className:"wp-block-group__inner-container"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:Gm,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n}=e,a=(0,nt.getColorClassName)("background-color",t),o=ut()(a,{"has-background":t||n}),r={backgroundColor:a?void 0:n};return(0,Ke.createElement)("div",{className:o,style:r},(0,Ke.createElement)(nt.InnerBlocks.Content,null))}}],qm=Um,jm=(e="group")=>{const t={group:(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"44",height:"32",viewBox:"0 0 44 32"},(0,Ke.createElement)(et.Path,{d:"M42 0H2C.9 0 0 .9 0 2v28c0 1.1.9 2 2 2h40c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2z"})),"group-row":(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"44",height:"32",viewBox:"0 0 44 32"},(0,Ke.createElement)(et.Path,{d:"M42 0H23.5c-.6 0-1 .4-1 1v30c0 .6.4 1 1 1H42c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zM20.5 0H2C.9 0 0 .9 0 2v28c0 1.1.9 2 2 2h18.5c.6 0 1-.4 1-1V1c0-.6-.4-1-1-1z"})),"group-stack":(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"44",height:"32",viewBox:"0 0 44 32"},(0,Ke.createElement)(et.Path,{d:"M42 0H2C.9 0 0 .9 0 2v12.5c0 .6.4 1 1 1h42c.6 0 1-.4 1-1V2c0-1.1-.9-2-2-2zm1 16.5H1c-.6 0-1 .4-1 1V30c0 1.1.9 2 2 2h40c1.1 0 2-.9 2-2V17.5c0-.6-.4-1-1-1z"})),"group-grid":(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"44",height:"32",viewBox:"0 0 44 32"},(0,Ke.createElement)(et.Path,{d:"m20.30137,-0.00025l-18.9728,0c-0.86524,0.07234 -1.41711,0.79149 -1.41711,1.89149l0,12.64468c0,0.6 0.73401,0.96383 1.0304,0.96383l19.67469,0.03617c0.29639,0 1.0304,-0.4 1.0304,-1l-0.03576,-12.7532c0,-1.1 -0.76644,-1.78297 -1.30983,-1.78297zm0.52975,16.60851l-19.99654,-0.03617c-0.29639,0 -0.92312,0.36383 -0.92312,0.96383l-0.03576,12.68085c0,1.1 0.8022,1.81915 1.34559,1.81915l19.00857,0c0.54339,0 1.45287,-0.71915 1.45287,-1.81915l0,-12.53617c0,-0.6 -0.5552,-1.07234 -0.8516,-1.07234z"}),(0,Ke.createElement)(et.Path,{d:"m42.73056,-0.03617l-18.59217,0c-0.84788,0.07234 -1.38868,0.79149 -1.38868,1.89149l0,12.64468c0,0.6 0.71928,0.96383 1.00973,0.96383l19.27997,0.03617c0.29045,0 1.00973,-0.4 1.00973,-1l-0.03504,-12.7532c0,-1.1 -0.75106,-1.78297 -1.28355,-1.78297zm0.51912,16.60851l-19.59537,-0.03617c-0.29045,0 -0.9046,0.36383 -0.9046,0.96383l-0.03504,12.68085c0,1.1 0.78611,1.81915 1.31859,1.81915l18.62721,0c0.53249,0 1.42372,-0.71915 1.42372,-1.81915l0,-12.53617c0,-0.6 -0.54407,-1.07234 -0.83451,-1.07234z"}))};return t?.[e]};const Wm=function({name:e,onSelect:t}){const n=(0,gt.useSelect)((t=>t(Qe.store).getBlockVariations(e,"block")),[e]),a=(0,nt.useBlockProps)({className:"wp-block-group__placeholder"});return(0,Ke.createElement)("div",{...a},(0,Ke.createElement)(et.Placeholder,{instructions:(0,tt.__)("Group blocks together. Select a layout:")},(0,Ke.createElement)("ul",{role:"list",className:"wp-block-group-placeholder__variations","aria-label":(0,tt.__)("Block variations")},n.map((e=>(0,Ke.createElement)("li",{key:e.name},(0,Ke.createElement)(et.Button,{variant:"tertiary",icon:jm(e.name),iconSize:44,onClick:()=>t(e),className:"wp-block-group-placeholder__variation-button",label:`${e.title}: ${e.description}`})))))))};function Zm({tagName:e,onSelectTagName:t}){const n={header:(0,tt.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,tt.__)("The <main> element should be used for the primary content of your document only. "),section:(0,tt.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element."),article:(0,tt.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,tt.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),footer:(0,tt.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).")};return(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("HTML element"),options:[{label:(0,tt.__)("Default (<div>)"),value:"div"},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"}],value:e,onChange:t,help:n[e]}))}const Qm=function({attributes:e,name:t,setAttributes:n,clientId:a}){const{hasInnerBlocks:o,themeSupportsLayout:r}=(0,gt.useSelect)((e=>{const{getBlock:t,getSettings:n}=e(nt.store),o=t(a);return{hasInnerBlocks:!(!o||!o.innerBlocks.length),themeSupportsLayout:n()?.supportsLayout}}),[a]),{tagName:l="div",templateLock:i,allowedBlocks:s,layout:c={}}=e,{type:m="default"}=c,u=r||"flex"===m||"grid"===m,p=(0,_t.useRef)(),d=(0,nt.useBlockProps)({ref:p}),[g,h]=function({attributes:e={style:void 0,backgroundColor:void 0,textColor:void 0,fontSize:void 0},usedLayoutType:t="",hasInnerBlocks:n=!1}){const{style:a,backgroundColor:o,textColor:r,fontSize:l}=e,[i,s]=(0,_t.useState)(!(n||o||l||r||a||"flex"===t||"grid"===t));return(0,_t.useEffect)((()=>{(n||o||l||r||a||"flex"===t)&&s(!1)}),[o,l,r,a,t,n]),[i,s]}({attributes:e,usedLayoutType:m,hasInnerBlocks:o});let b;g?b=!1:o||(b=nt.InnerBlocks.ButtonBlockAppender);const _=(0,nt.useInnerBlocksProps)(u?d:{className:"wp-block-group__inner-container"},{dropZoneElement:p.current,templateLock:i,allowedBlocks:s,renderAppender:b}),{selectBlock:y}=(0,gt.useDispatch)(nt.store);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Zm,{tagName:l,onSelectTagName:e=>n({tagName:e})}),g&&(0,Ke.createElement)(Ye.View,null,_.children,(0,Ke.createElement)(Wm,{name:t,onSelect:e=>{n(e.attributes),y(a,-1),h(!1)}})),u&&!g&&(0,Ke.createElement)(l,{..._}),!u&&!g&&(0,Ke.createElement)(l,{...d},(0,Ke.createElement)("div",{..._})))};const Km={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert(e){const t=["wide","full"],n=e.reduce(((e,n)=>{const{align:a}=n.attributes;return t.indexOf(a)>t.indexOf(e)?a:e}),void 0),a=e.map((e=>(0,Qe.createBlock)(e.name,e.attributes,e.innerBlocks)));return(0,Qe.createBlock)("core/group",{align:n,layout:{type:"constrained"}},a)}}]},Ym=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z"})),Jm=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z"})),Xm=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"})),eu=[{name:"group",title:(0,tt.__)("Group"),description:(0,tt.__)("Gather blocks in a container."),attributes:{layout:{type:"constrained"}},isDefault:!0,scope:["block","inserter","transform"],isActive:e=>!e.layout||!e.layout?.type||"default"===e.layout?.type||"constrained"===e.layout?.type,icon:fc},{name:"group-row",title:(0,tt._x)("Row","single horizontal line"),description:(0,tt.__)("Arrange blocks horizontally."),attributes:{layout:{type:"flex",flexWrap:"nowrap"}},scope:["block","inserter","transform"],isActive:e=>"flex"===e.layout?.type&&(!e.layout?.orientation||"horizontal"===e.layout?.orientation),icon:Ym},{name:"group-stack",title:(0,tt.__)("Stack"),description:(0,tt.__)("Arrange blocks vertically."),attributes:{layout:{type:"flex",orientation:"vertical"}},scope:["block","inserter","transform"],isActive:e=>"flex"===e.layout?.type&&"vertical"===e.layout?.orientation,icon:Jm}];window?.__experimentalEnableGroupGridVariation&&eu.push({name:"group-grid",title:(0,tt.__)("Grid"),description:(0,tt.__)("Arrange blocks in a grid."),attributes:{layout:{type:"grid"}},scope:["block","inserter","transform"],isActive:e=>"grid"===e.layout?.type,icon:Xm});const tu=eu,nu={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/group",title:"Group",category:"design",description:"Gather blocks in a layout container.",keywords:["container","wrapper","row","section"],textdomain:"default",attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]},allowedBlocks:{type:"array"}},supports:{__experimentalOnEnter:!0,__experimentalOnMerge:!0,__experimentalSettings:!0,align:["wide","full"],anchor:!0,ariaLabel:!0,html:!1,background:{backgroundImage:!0,backgroundSize:!0,__experimentalDefaultControls:{backgroundImage:!0}},color:{gradients:!0,heading:!0,button:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:["top","bottom"],padding:!0,blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},dimensions:{minHeight:!0},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},position:{sticky:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowSizingOnChildren:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-group-editor",style:"wp-block-group"},{name:au}=nu,ou={icon:fc,example:{attributes:{style:{color:{text:"#000000",background:"#ffffff"}}},innerBlocks:[{name:"core/paragraph",attributes:{customTextColor:"#cf2e2e",fontSize:"large",content:(0,tt.__)("One.")}},{name:"core/paragraph",attributes:{customTextColor:"#ff6900",fontSize:"large",content:(0,tt.__)("Two.")}},{name:"core/paragraph",attributes:{customTextColor:"#fcb900",fontSize:"large",content:(0,tt.__)("Three.")}},{name:"core/paragraph",attributes:{customTextColor:"#00d084",fontSize:"large",content:(0,tt.__)("Four.")}},{name:"core/paragraph",attributes:{customTextColor:"#0693e3",fontSize:"large",content:(0,tt.__)("Five.")}},{name:"core/paragraph",attributes:{customTextColor:"#9b51e0",fontSize:"large",content:(0,tt.__)("Six.")}}]},transforms:Km,edit:Qm,save:function({attributes:{tagName:e}}){return(0,Ke.createElement)(e,{...nt.useInnerBlocksProps.save(nt.useBlockProps.save())})},deprecated:qm,variations:tu},ru=()=>Xe({name:au,metadata:nu,settings:ou}),lu=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M6 5V18.5911L12 13.8473L18 18.5911V5H6Z"})),iu={className:!1,anchor:!0},su={align:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:""},level:{type:"number",default:2},placeholder:{type:"string"}},cu=e=>{if(!e.customTextColor)return e;const t={color:{text:e.customTextColor}},{customTextColor:n,...a}=e;return{...a,style:t}},mu=["left","right","center"],uu=e=>{const{align:t,...n}=e;return mu.includes(t)?{...n,textAlign:t}:e},pu={supports:iu,attributes:{...su,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>cu(uu(e)),save({attributes:e}){const{align:t,level:n,content:a,textColor:o,customTextColor:r}=e,l="h"+n,i=(0,nt.getColorClassName)("color",o),s=ut()({[i]:i});return(0,Ke.createElement)(nt.RichText.Content,{className:s||void 0,tagName:l,style:{textAlign:t,color:i?void 0:r},value:a})}},du={attributes:{...su,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>cu(uu(e)),save({attributes:e}){const{align:t,content:n,customTextColor:a,level:o,textColor:r}=e,l="h"+o,i=(0,nt.getColorClassName)("color",r),s=ut()({[i]:i,[`has-text-align-${t}`]:t});return(0,Ke.createElement)(nt.RichText.Content,{className:s||void 0,tagName:l,style:{color:i?void 0:a},value:n})},supports:iu},gu={supports:iu,attributes:{...su,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>cu(uu(e)),save({attributes:e}){const{align:t,content:n,customTextColor:a,level:o,textColor:r}=e,l="h"+o,i=(0,nt.getColorClassName)("color",r),s=ut()({[i]:i,"has-text-color":r||a,[`has-text-align-${t}`]:t});return(0,Ke.createElement)(nt.RichText.Content,{className:s||void 0,tagName:l,style:{color:i?void 0:a},value:n})}},hu={supports:{align:["wide","full"],anchor:!0,className:!1,color:{link:!0},fontSize:!0,lineHeight:!0,__experimentalSelector:{"core/heading/h1":"h1","core/heading/h2":"h2","core/heading/h3":"h3","core/heading/h4":"h4","core/heading/h5":"h5","core/heading/h6":"h6"},__unstablePasteTextInline:!0},attributes:su,isEligible:({align:e})=>mu.includes(e),migrate:uu,save({attributes:e}){const{align:t,content:n,level:a}=e,o="h"+a,r=ut()({[`has-text-align-${t}`]:t});return(0,Ke.createElement)(o,{...nt.useBlockProps.save({className:r})},(0,Ke.createElement)(nt.RichText.Content,{value:n}))}},bu={supports:{align:["wide","full"],anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0,textTransform:!0}},__experimentalSelector:"h1,h2,h3,h4,h5,h6",__unstablePasteTextInline:!0,__experimentalSlashInserter:!0},attributes:{textAlign:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:"",__experimentalRole:"content"},level:{type:"number",default:2},placeholder:{type:"string"}},save({attributes:e}){const{textAlign:t,content:n,level:a}=e,o="h"+a,r=ut()({[`has-text-align-${t}`]:t});return(0,Ke.createElement)(o,{...nt.useBlockProps.save({className:r})},(0,Ke.createElement)(nt.RichText.Content,{value:n}))}},_u=[bu,hu,gu,du,pu],yu={},vu=e=>nc()((e=>{const t=document.createElement("div");return t.innerHTML=e,t.innerText})(e)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,""),fu=(e,t)=>{const n=vu(t);if(""===n)return null;delete yu[e];let a=n,o=0;for(;Object.values(yu).includes(a);)o+=1,a=n+"-"+o;return a},ku=(e,t)=>{yu[e]=t};const xu=function({attributes:e,setAttributes:t,mergeBlocks:n,onReplace:a,style:o,clientId:r}){const{textAlign:l,content:i,level:s,placeholder:c,anchor:m}=e,u="h"+s,p=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${l}`]:l}),style:o}),d=(0,nt.useBlockEditingMode)(),{canGenerateAnchors:g}=(0,gt.useSelect)((e=>{const{getGlobalBlockCount:t,getSettings:n}=e(nt.store);return{canGenerateAnchors:!!n().generateAnchors||t("core/table-of-contents")>0}}),[]),{__unstableMarkNextChangeAsNotPersistent:h}=(0,gt.useDispatch)(nt.store);return(0,_t.useEffect)((()=>{if(g)return!m&&i&&(h(),t({anchor:fu(r,i)})),ku(r,m),()=>ku(r,null)}),[m,i,r,g]),(0,Ke.createElement)(Ke.Fragment,null,"default"===d&&(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.HeadingLevelDropdown,{value:s,onChange:e=>t({level:e})}),(0,Ke.createElement)(nt.AlignmentControl,{value:l,onChange:e=>{t({textAlign:e})}})),(0,Ke.createElement)(nt.RichText,{identifier:"content",tagName:u,value:i,onChange:e=>{const n={content:e};!g||m&&e&&fu(r,i)!==m||(n.anchor=fu(r,e)),t(n)},onMerge:n,onSplit:(t,n)=>{let a;var o;n||t?a=(0,Qe.createBlock)("core/heading",{...e,content:t}):a=(0,Qe.createBlock)(null!==(o=(0,Qe.getDefaultBlockName)())&&void 0!==o?o:"core/heading");return n&&(a.clientId=r),a},onReplace:a,onRemove:()=>a([]),placeholder:c||(0,tt.__)("Heading"),textAlign:l,..._t.Platform.isNative&&{deleteEnter:!0},...p}))};const wu={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map((({content:e,anchor:t,align:n,metadata:a})=>(0,Qe.createBlock)("core/heading",{content:e,anchor:t,textAlign:n,metadata:An(a,"core/heading",(({content:e})=>({content:e})))})))},{type:"raw",selector:"h1,h2,h3,h4,h5,h6",schema:({phrasingContentSchema:e,isPaste:t})=>{const n={children:e,attributes:t?[]:["style","id"]};return{h1:n,h2:n,h3:n,h4:n,h5:n,h6:n}},transform(e){const t=(0,Qe.getBlockAttributes)("core/heading",e.outerHTML),{textAlign:n}=e.style||{};var a;return t.level=(a=e.nodeName,Number(a.substr(1))),"left"!==n&&"center"!==n&&"right"!==n||(t.align=n),(0,Qe.createBlock)("core/heading",t)}},...[1,2,3,4,5,6].map((e=>({type:"prefix",prefix:Array(e+1).join("#"),transform:t=>(0,Qe.createBlock)("core/heading",{level:e,content:t})}))),...[1,2,3,4,5,6].map((e=>({type:"enter",regExp:new RegExp(`^/(h|H)${e}$`),transform:()=>(0,Qe.createBlock)("core/heading",{level:e})})))],to:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map((({content:e,textAlign:t,metadata:n})=>(0,Qe.createBlock)("core/paragraph",{content:e,align:t,metadata:An(n,"core/paragraph",(({content:e})=>({content:e})))})))}]},Eu=wu,Cu={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/heading",title:"Heading",category:"text",description:"Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",keywords:["title","subtitle"],textdomain:"default",attributes:{textAlign:{type:"string"},content:{type:"rich-text",source:"rich-text",selector:"h1,h2,h3,h4,h5,h6",__experimentalRole:"content"},level:{type:"number",default:2},placeholder:{type:"string"}},supports:{align:["wide","full"],anchor:!0,className:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},__unstablePasteTextInline:!0,__experimentalSlashInserter:!0,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-heading-editor",style:"wp-block-heading"},{name:Su}=Cu,Bu={icon:lu,example:{attributes:{content:(0,tt.__)("Code is Poetry"),level:2}},__experimentalLabel(e,{context:t}){const{content:n,level:a}=e,o=e?.metadata?.name,r=n?.length>0;return"list-view"===t&&(o||r)?o||n:"accessibility"===t?r?(0,tt.sprintf)((0,tt.__)("Level %1$s. %2$s"),a,n):(0,tt.sprintf)((0,tt.__)("Level %s. Empty."),a):void 0},transforms:Eu,deprecated:_u,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:xu,save:function({attributes:e}){const{textAlign:t,content:n,level:a}=e,o="h"+a,r=ut()({[`has-text-align-${t}`]:t});return(0,Ke.createElement)(o,{...nt.useBlockProps.save({className:r})},(0,Ke.createElement)(nt.RichText.Content,{value:n}))}},Nu=()=>Xe({name:Su,metadata:Cu,settings:Bu}),Tu=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})),Iu=e=>e.preventDefault();const Pu={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/home-link",category:"design",parent:["core/navigation"],title:"Home Link",description:"Create a link that always points to the homepage of the site. Usually not necessary if there is already a site title link present in the header.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","fontSize","customFontSize","style"],supports:{reusable:!1,html:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-home-link-editor",style:"wp-block-home-link"},{name:Mu}=Pu,zu={icon:Tu,edit:function({attributes:e,setAttributes:t,context:n}){const{homeUrl:a}=(0,gt.useSelect)((e=>{const{getUnstableBase:t}=e(dt.store);return{homeUrl:t()?.home}}),[]),{__unstableMarkNextChangeAsNotPersistent:o}=(0,gt.useDispatch)(nt.store),{textColor:r,backgroundColor:l,style:i}=n,s=(0,nt.useBlockProps)({className:ut()("wp-block-navigation-item",{"has-text-color":!!r||!!i?.color?.text,[`has-${r}-color`]:!!r,"has-background":!!l||!!i?.color?.background,[`has-${l}-background-color`]:!!l}),style:{color:i?.color?.text,backgroundColor:i?.color?.background}}),{label:c}=e;return(0,_t.useEffect)((()=>{void 0===c&&(o(),t({label:(0,tt.__)("Home")}))}),[c]),(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("div",{...s},(0,Ke.createElement)("a",{className:"wp-block-home-link__content wp-block-navigation-item__content",href:a,onClick:Iu},(0,Ke.createElement)(nt.RichText,{identifier:"label",className:"wp-block-home-link__label",value:c,onChange:e=>{t({label:e})},"aria-label":(0,tt.__)("Home link text"),placeholder:(0,tt.__)("Add home link"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))))},save:function(){return(0,Ke.createElement)(nt.InnerBlocks.Content,null)},example:{attributes:{label:(0,tt._x)("Home Link","block example")}}},Ru=()=>Xe({name:Mu,metadata:Pu,settings:zu}),Au=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M4.8 11.4H2.1V9H1v6h1.1v-2.6h2.7V15h1.1V9H4.8v2.4zm1.9-1.3h1.7V15h1.1v-4.9h1.7V9H6.7v1.1zM16.2 9l-1.5 2.7L13.3 9h-.9l-.8 6h1.1l.5-4 1.5 2.8 1.5-2.8.5 4h1.1L17 9h-.8zm3.8 5V9h-1.1v6h3.6v-1H20z"})),Hu="\n\thtml,body,:root {\n\t\tmargin: 0 !important;\n\t\tpadding: 0 !important;\n\t\toverflow: visible !important;\n\t\tmin-height: auto !important;\n\t}\n";function Lu({content:e,isSelected:t}){const n=(0,gt.useSelect)((e=>e(nt.store).getSettings().styles)),a=(0,_t.useMemo)((()=>[Hu,...(0,nt.transformStyles)(n.filter((e=>e.css)))]),[n]);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.SandBox,{html:e,styles:a,title:(0,tt.__)("Custom HTML Preview"),tabIndex:-1}),!t&&(0,Ke.createElement)("div",{className:"block-library-html__preview-overlay"}))}const Du={from:[{type:"block",blocks:["core/code"],transform:({content:e})=>(0,Qe.createBlock)("core/html",{content:(0,Rn.create)({html:e}).text})}]},Fu=Du,Vu={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/html",title:"Custom HTML",category:"widgets",description:"Add custom HTML code and preview it as you edit.",keywords:["embed"],textdomain:"default",attributes:{content:{type:"string",source:"raw"}},supports:{customClassName:!1,className:!1,html:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-html-editor"},{name:$u}=Vu,Ou={icon:Au,example:{attributes:{content:"<marquee>"+(0,tt.__)("Welcome to the wonderful world of blocks…")+"</marquee>"}},edit:function e({attributes:t,setAttributes:n,isSelected:a}){const[o,r]=(0,_t.useState)(),l=(0,_t.useContext)(et.Disabled.Context),i=(0,jt.useInstanceId)(e,"html-edit-desc"),s=(0,nt.useBlockProps)({className:"block-library-html__edit","aria-describedby":o?i:void 0});return(0,Ke.createElement)("div",{...s},(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.ToolbarButton,{className:"components-tab-button",isPressed:!o,onClick:function(){r(!1)}},"HTML"),(0,Ke.createElement)(et.ToolbarButton,{className:"components-tab-button",isPressed:o,onClick:function(){r(!0)}},(0,tt.__)("Preview")))),o||l?(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Lu,{content:t.content,isSelected:a}),(0,Ke.createElement)(et.VisuallyHidden,{id:i},(0,tt.__)("HTML preview is not yet fully accessible. Please switch screen reader to virtualized mode to navigate the below iFrame."))):(0,Ke.createElement)(nt.PlainText,{value:t.content,onChange:e=>n({content:e}),placeholder:(0,tt.__)("Write HTML…"),"aria-label":(0,tt.__)("HTML")}))},save:function({attributes:e}){return(0,Ke.createElement)(_t.RawHTML,null,e.content)},transforms:Fu},Gu=()=>Xe({name:$u,metadata:Vu,settings:Ou}),Uu={attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"array",source:"children",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"}},save({attributes:e}){const{url:t,alt:n,caption:a,align:o,href:r,width:l,height:i}=e,s=l||i?{width:l,height:i}:{},c=(0,Ke.createElement)("img",{src:t,alt:n,...s});let m={};return l?m={width:l}:"left"!==o&&"right"!==o||(m={maxWidth:"50%"}),(0,Ke.createElement)("figure",{className:o?`align${o}`:null,style:m},r?(0,Ke.createElement)("a",{href:r},c):c,!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:a}))}},qu={attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"array",source:"children",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"}},save({attributes:e}){const{url:t,alt:n,caption:a,align:o,href:r,width:l,height:i,id:s}=e,c=(0,Ke.createElement)("img",{src:t,alt:n,className:s?`wp-image-${s}`:null,width:l,height:i});return(0,Ke.createElement)("figure",{className:o?`align${o}`:null},r?(0,Ke.createElement)("a",{href:r},c):c,!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:a}))}},ju={attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"array",source:"children",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"},linkDestination:{type:"string",default:"none"}},save({attributes:e}){const{url:t,alt:n,caption:a,align:o,href:r,width:l,height:i,id:s}=e,c=ut()({[`align${o}`]:o,"is-resized":l||i}),m=(0,Ke.createElement)("img",{src:t,alt:n,className:s?`wp-image-${s}`:null,width:l,height:i});return(0,Ke.createElement)("figure",{className:c},r?(0,Ke.createElement)("a",{href:r},m):m,!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:a}))}},Wu={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},title:{type:"string",source:"attribute",selector:"img",attribute:"title"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0},save({attributes:e}){const{url:t,alt:n,caption:a,align:o,href:r,rel:l,linkClass:i,width:s,height:c,id:m,linkTarget:u,sizeSlug:p,title:d}=e,g=l||void 0,h=ut()({[`align${o}`]:o,[`size-${p}`]:p,"is-resized":s||c}),b=(0,Ke.createElement)("img",{src:t,alt:n,className:m?`wp-image-${m}`:null,width:s,height:c,title:d}),_=(0,Ke.createElement)(Ke.Fragment,null,r?(0,Ke.createElement)("a",{className:i,href:r,target:u,rel:g},b):b,!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:a}));return"left"===o||"right"===o||"center"===o?(0,Ke.createElement)("div",{...nt.useBlockProps.save()},(0,Ke.createElement)("figure",{className:h},_)):(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:h})},_)}},Zu={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},title:{type:"string",source:"attribute",selector:"img",attribute:"title"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{__experimentalDuotone:"img",text:!1,background:!1},__experimentalBorder:{radius:!0,__experimentalDefaultControls:{radius:!0}},__experimentalStyle:{spacing:{margin:"0 0 1em 0"}}},save({attributes:e}){const{url:t,alt:n,caption:a,align:o,href:r,rel:l,linkClass:i,width:s,height:c,id:m,linkTarget:u,sizeSlug:p,title:d}=e,g=l||void 0,h=ut()({[`align${o}`]:o,[`size-${p}`]:p,"is-resized":s||c}),b=(0,Ke.createElement)("img",{src:t,alt:n,className:m?`wp-image-${m}`:null,width:s,height:c,title:d}),_=(0,Ke.createElement)(Ke.Fragment,null,r?(0,Ke.createElement)("a",{className:i,href:r,target:u,rel:g},b):b,!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:a}));return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:h})},_)}},Qu={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",__experimentalRole:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},title:{type:"string",source:"attribute",selector:"img",attribute:"title",__experimentalRole:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",__experimentalRole:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",__experimentalRole:"content"},width:{type:"number"},height:{type:"number"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}}},migrate(e){const{height:t,width:n}=e;return{...e,width:"number"==typeof n?`${n}px`:n,height:"number"==typeof t?`${t}px`:t}},save({attributes:e}){const{url:t,alt:n,caption:a,align:o,href:r,rel:l,linkClass:i,width:s,height:c,aspectRatio:m,scale:u,id:p,linkTarget:d,sizeSlug:g,title:h}=e,b=l||void 0,_=(0,nt.__experimentalGetBorderClassesAndStyles)(e),y=ut()({[`align${o}`]:o,[`size-${g}`]:g,"is-resized":s||c,"has-custom-border":!!_.className||_.style&&Object.keys(_.style).length>0}),v=ut()(_.className,{[`wp-image-${p}`]:!!p}),f=(0,Ke.createElement)("img",{src:t,alt:n,className:v||void 0,style:{..._.style,aspectRatio:m,objectFit:u},width:s,height:c,title:h}),k=(0,Ke.createElement)(Ke.Fragment,null,r?(0,Ke.createElement)("a",{className:i,href:r,target:d,rel:b},f):f,!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{className:(0,nt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:a}));return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:y})},k)}},Ku={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",__experimentalRole:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},title:{type:"string",source:"attribute",selector:"img",attribute:"title",__experimentalRole:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",__experimentalRole:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",__experimentalRole:"content"},width:{type:"number"},height:{type:"number"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}}},migrate:({width:e,height:t,...n})=>({...n,width:`${e}px`,height:`${t}px`}),save({attributes:e}){const{url:t,alt:n,caption:a,align:o,href:r,rel:l,linkClass:i,width:s,height:c,aspectRatio:m,scale:u,id:p,linkTarget:d,sizeSlug:g,title:h}=e,b=l||void 0,_=(0,nt.__experimentalGetBorderClassesAndStyles)(e),y=ut()({[`align${o}`]:o,[`size-${g}`]:g,"is-resized":s||c,"has-custom-border":!!_.className||_.style&&Object.keys(_.style).length>0}),v=ut()(_.className,{[`wp-image-${p}`]:!!p}),f=(0,Ke.createElement)("img",{src:t,alt:n,className:v||void 0,style:{..._.style,aspectRatio:m,objectFit:u,width:s,height:c},width:s,height:c,title:h}),k=(0,Ke.createElement)(Ke.Fragment,null,r?(0,Ke.createElement)("a",{className:i,href:r,target:d,rel:b},f):f,!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{className:(0,nt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:a}));return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:y})},k)}},Yu={attributes:{align:{type:"string"},behaviors:{type:"object"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",__experimentalRole:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},title:{type:"string",source:"attribute",selector:"img",attribute:"title",__experimentalRole:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",__experimentalRole:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",__experimentalRole:"content"},width:{type:"string"},height:{type:"string"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}}},migrate({width:e,height:t,...n}){if(!n.behaviors?.lightbox)return n;const{behaviors:{lightbox:{enabled:a}}}=n,o={...n,lightbox:{enabled:a}};return delete o.behaviors,o},isEligible:e=>!!e.behaviors,save({attributes:e}){const{url:t,alt:n,caption:a,align:o,href:r,rel:l,linkClass:i,width:s,height:c,aspectRatio:m,scale:u,id:p,linkTarget:d,sizeSlug:g,title:h}=e,b=l||void 0,_=(0,nt.__experimentalGetBorderClassesAndStyles)(e),y=ut()({[`align${o}`]:o,[`size-${g}`]:g,"is-resized":s||c,"has-custom-border":!!_.className||_.style&&Object.keys(_.style).length>0}),v=ut()(_.className,{[`wp-image-${p}`]:!!p}),f=(0,Ke.createElement)("img",{src:t,alt:n,className:v||void 0,style:{..._.style,aspectRatio:m,objectFit:u,width:s,height:c},title:h}),k=(0,Ke.createElement)(Ke.Fragment,null,r?(0,Ke.createElement)("a",{className:i,href:r,target:d,rel:b},f):f,!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{className:(0,nt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:a}));return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:y})},k)}},Ju=[Yu,Ku,Qu,Zu,Wu,ju,qu,Uu],Xu=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"})),ep=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M18 20v-2h2v-1.5H7.75a.25.25 0 0 1-.25-.25V4H6v2H4v1.5h2v8.75c0 .966.784 1.75 1.75 1.75h8.75v2H18ZM9.273 7.5h6.977a.25.25 0 0 1 .25.25v6.977H18V7.75A1.75 1.75 0 0 0 16.25 6H9.273v1.5Z"})),tp=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z"})),np=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));function ap(e,t){const[n,a]=(0,_t.useState)();function o(){a(e.current?.clientWidth)}return(0,_t.useEffect)(o,t),(0,_t.useEffect)((()=>{const{defaultView:t}=e.current.ownerDocument;return t.addEventListener("resize",o),()=>{t.removeEventListener("resize",o)}}),[]),n}const op={popoverProps:{placement:"left-start",offset:259}},{DimensionsTool:rp,ResolutionTool:lp}=Ft(nt.privateApis),ip=[{value:"cover",label:(0,tt._x)("Cover","Scale option for dimensions control"),help:(0,tt.__)("Image covers the space evenly.")},{value:"contain",label:(0,tt._x)("Contain","Scale option for dimensions control"),help:(0,tt.__)("Image is contained without distortion.")}],sp=({href:e,children:t})=>e?(0,Ke.createElement)("a",{href:e,onClick:e=>e.preventDefault(),"aria-disabled":!0,style:{pointerEvents:"none",cursor:"default",display:"inline"}},t):t;function cp({temporaryURL:e,attributes:t,setAttributes:n,isSingleSelected:a,insertBlocksAfter:o,onReplace:r,onSelectImage:l,onSelectURL:i,onUploadError:s,containerRef:c,context:m,clientId:u,blockEditingMode:p}){const{url:d="",alt:g,align:h,id:b,href:_,rel:y,linkClass:v,linkDestination:f,title:k,width:x,height:w,aspectRatio:E,scale:C,linkTarget:S,sizeSlug:B,lightbox:N,metadata:T}=t,I=x?parseInt(x,10):void 0,P=w?parseInt(w,10):void 0,M=(0,_t.useRef)(),{allowResize:z=!0}=m,{getBlock:R,getSettings:A}=(0,gt.useSelect)(nt.store),H=(0,gt.useSelect)((e=>b&&a?e(dt.store).getMedia(b,{context:"view"}):null),[b,a]),{canInsertCover:L,imageEditing:D,imageSizes:F,maxWidth:V}=(0,gt.useSelect)((e=>{const{getBlockRootClientId:t,canInsertBlockType:n}=e(nt.store),a=t(u),o=A();return{imageEditing:o.imageEditing,imageSizes:o.imageSizes,maxWidth:o.maxWidth,canInsertCover:n("core/cover",a)}}),[u]),{replaceBlocks:$,toggleSelection:O}=(0,gt.useDispatch)(nt.store),{createErrorNotice:G,createSuccessNotice:U}=(0,gt.useDispatch)(Pt.store),q=(0,jt.useViewportMatch)("medium"),j=["wide","full"].includes(h),[{loadedNaturalWidth:W,loadedNaturalHeight:Z},Q]=(0,_t.useState)({}),[K,Y]=(0,_t.useState)(!1),[J,X]=(0,_t.useState)(),ee=ap(c,[h]),te="default"===p,ne="contentOnly"===p,ae=z&&te&&!j&&q,oe=F.filter((({slug:e})=>H?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e})));(0,_t.useEffect)((()=>{mp(b,d)&&a&&A().mediaUpload?J||window.fetch(d.includes("?")?d:d+"?").then((e=>e.blob())).then((e=>X(e))).catch((()=>{})):X()}),[b,d,a,J]);const{naturalWidth:re,naturalHeight:le}=(0,_t.useMemo)((()=>({naturalWidth:M.current?.naturalWidth||W||void 0,naturalHeight:M.current?.naturalHeight||Z||void 0})),[W,Z,M.current?.complete]);function ie(e){n({title:e})}function se(e){n({alt:e})}(0,_t.useEffect)((()=>{a||Y(!1)}),[a]);const ce=b&&re&&le&&D,me=a&&ce&&!K;const ue=(0,et.__experimentalUseCustomUnits)({availableUnits:["px"]}),[pe]=(0,nt.useSettings)("lightbox"),de=!!N&&N?.enabled!==pe?.enabled||pe?.allowEditing,ge=!!N?.enabled||!N&&!!pe?.enabled,he=(0,Ke.createElement)(rp,{value:{width:x,height:w,scale:C,aspectRatio:E},onChange:({width:e,height:t,scale:a,aspectRatio:o})=>{n({width:!e&&t?"auto":e,height:t,scale:a,aspectRatio:o})},defaultScale:"cover",defaultAspectRatio:"auto",scaleOptions:ip,unitsOptions:ue}),be=()=>{n({alt:void 0,width:void 0,height:void 0,scale:void 0,aspectRatio:void 0,lightbox:void 0})},_e=(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.__experimentalToolsPanel,{label:(0,tt.__)("Settings"),resetAll:be,dropdownMenuProps:op},ae&&he)),{lockUrlControls:ye=!1,lockHrefControls:ve=!1,lockAltControls:fe=!1,lockAltControlsMessage:ke,lockTitleControls:xe=!1,lockTitleControlsMessage:we,lockCaption:Ee=!1}=(0,gt.useSelect)((e=>{if(!a)return{};const{getBlockBindingsSource:t}=Ft(e(Qe.store)),{getBlockParentsByBlockName:n}=Ft(e(nt.store)),{url:o,alt:r,title:l}=T?.bindings||{},i=n(u,"core/block").length>0,s=t(o?.source),c=t(r?.source),m=t(l?.source);return{lockUrlControls:!!o&&(!s||s?.lockAttributesEditing),lockHrefControls:i,lockCaption:i,lockAltControls:!!r&&(!c||c?.lockAttributesEditing),lockAltControlsMessage:c?.label?(0,tt.sprintf)((0,tt.__)("Connected to %s"),c.label):(0,tt.__)("Connected to dynamic data"),lockTitleControls:!!l&&(!m||m?.lockAttributesEditing),lockTitleControlsMessage:m?.label?(0,tt.sprintf)((0,tt.__)("Connected to %s"),m.label):(0,tt.__)("Connected to dynamic data")}}),[u,a,T?.bindings]),Ce=(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},a&&!K&&!ve&&!ye&&(0,Ke.createElement)(nt.__experimentalImageURLInputUI,{url:_||"",onChangeUrl:function(e){n(e)},linkDestination:f,mediaUrl:H&&H.source_url||d,mediaLink:H&&H.link,linkTarget:S,linkClass:v,rel:y,showLightboxSetting:de,lightboxEnabled:ge,onSetLightbox:function(e){n(e&&!pe?.enabled?{lightbox:{enabled:!0}}:!e&&pe?.enabled?{lightbox:{enabled:!1}}:{lightbox:void 0})},resetLightbox:function(){n(pe?.enabled&&pe?.allowEditing?{lightbox:{enabled:!1}}:{lightbox:void 0})}}),me&&(0,Ke.createElement)(et.ToolbarButton,{onClick:()=>Y(!0),icon:ep,label:(0,tt.__)("Crop")}),a&&L&&(0,Ke.createElement)(et.ToolbarButton,{icon:tp,label:(0,tt.__)("Add text over image"),onClick:function(){$(u,(0,Qe.switchToBlockType)(R(u),"core/cover"))}})),a&&!K&&!ye&&(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(nt.MediaReplaceFlow,{mediaId:b,mediaURL:d,allowedTypes:om,accept:"image/*",onSelect:l,onSelectURL:i,onError:s})),a&&J&&(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.ToolbarButton,{onClick:function(){const{mediaUpload:e}=A();e&&e({filesList:[J],onFileChange([e]){l(e),(0,It.isBlobURL)(e.url)||(X(),U((0,tt.__)("Image uploaded."),{type:"snackbar"}))},allowedTypes:om,onError(e){G(e,{type:"snackbar"})}})},icon:np,label:(0,tt.__)("Upload to Media Library")}))),ne&&(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(et.Dropdown,{popoverProps:{position:"bottom right"},renderToggle:({isOpen:e,onToggle:t})=>(0,Ke.createElement)(et.ToolbarButton,{onClick:t,"aria-haspopup":"true","aria-expanded":e,onKeyDown:n=>{e||n.keyCode!==fn.DOWN||(n.preventDefault(),t())}},(0,tt._x)("Alt","Alternative text for an image. Block toolbar label, a low character count is preferred.")),renderContent:()=>(0,Ke.createElement)(et.TextareaControl,{className:"wp-block-image__toolbar_content_textarea",label:(0,tt.__)("Alternative text"),value:g||"",onChange:se,disabled:fe,help:fe?(0,Ke.createElement)(Ke.Fragment,null,ke):(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,tt.__)("Describe the purpose of the image.")),(0,Ke.createElement)("br",null),(0,tt.__)("Leave empty if decorative.")),__nextHasNoMarginBottom:!0})}),(0,Ke.createElement)(et.Dropdown,{popoverProps:{position:"bottom right"},renderToggle:({isOpen:e,onToggle:t})=>(0,Ke.createElement)(et.ToolbarButton,{onClick:t,"aria-haspopup":"true","aria-expanded":e,onKeyDown:n=>{e||n.keyCode!==fn.DOWN||(n.preventDefault(),t())}},(0,tt.__)("Title")),renderContent:()=>(0,Ke.createElement)(et.TextControl,{className:"wp-block-image__toolbar_content_textarea",__nextHasNoMarginBottom:!0,label:(0,tt.__)("Title attribute"),value:k||"",onChange:ie,disabled:xe,help:xe?(0,Ke.createElement)(Ke.Fragment,null,we):(0,Ke.createElement)(Ke.Fragment,null,(0,tt.__)("Describe the role of this image on the page."),(0,Ke.createElement)(et.ExternalLink,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute"},(0,tt.__)("(Note: many devices and browsers do not display this text.)")))})})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.__experimentalToolsPanel,{label:(0,tt.__)("Settings"),resetAll:be,dropdownMenuProps:op},a&&(0,Ke.createElement)(et.__experimentalToolsPanelItem,{label:(0,tt.__)("Alternative text"),isShownByDefault:!0,hasValue:()=>!!g,onDeselect:()=>n({alt:void 0})},(0,Ke.createElement)(et.TextareaControl,{label:(0,tt.__)("Alternative text"),value:g||"",onChange:se,readOnly:fe,help:fe?(0,Ke.createElement)(Ke.Fragment,null,ke):(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,tt.__)("Describe the purpose of the image.")),(0,Ke.createElement)("br",null),(0,tt.__)("Leave empty if decorative.")),__nextHasNoMarginBottom:!0})),ae&&he,!!oe.length&&(0,Ke.createElement)(lp,{value:B,onChange:function(e){const t=H?.media_details?.sizes?.[e]?.source_url;if(!t)return null;n({url:t,sizeSlug:e})},options:oe}))),(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Title attribute"),value:k||"",onChange:ie,readOnly:xe,help:xe?(0,Ke.createElement)(Ke.Fragment,null,we):(0,Ke.createElement)(Ke.Fragment,null,(0,tt.__)("Describe the role of this image on the page."),(0,Ke.createElement)(et.ExternalLink,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute"},(0,tt.__)("(Note: many devices and browsers do not display this text.)")))}))),Se=(0,pt.getFilename)(d);let Be;Be=g||(Se?(0,tt.sprintf)((0,tt.__)("This image has an empty alt attribute; its file name is %s"),Se):(0,tt.__)("This image has an empty alt attribute"));const Ne=(0,nt.__experimentalUseBorderProps)(t),Te=(0,nt.__experimentalGetShadowClassesAndStyles)(t),Ie=t.className?.includes("is-style-rounded");let Pe=(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("img",{src:e||d,alt:Be,onError:()=>function(){const e=Ot({attributes:{url:d}});void 0!==e&&r(e)}(),onLoad:e=>{Q({loadedNaturalWidth:e.target?.naturalWidth,loadedNaturalHeight:e.target?.naturalHeight})},ref:M,className:Ne.className,style:{width:x&&w||E?"100%":void 0,height:x&&w||E?"100%":void 0,objectFit:C,...Ne.style,...Te.style}}),e&&(0,Ke.createElement)(et.Spinner,null));const Me=M.current?.width||ee;if(ce&&K)Pe=(0,Ke.createElement)(sp,{href:_},(0,Ke.createElement)(nt.__experimentalImageEditor,{id:b,url:d,width:I,height:P,clientWidth:Me,naturalHeight:le,naturalWidth:re,onSaveImage:e=>n(e),onFinishEditing:()=>{Y(!1)},borderProps:Ie?void 0:Ne}));else if(ae){const e=E&&function(e){const[t,n=1]=e.split("/").map(Number),a=t/n;return a===1/0||0===a?NaN:a}(E),t=re/le,o=e||I/P||t||1,r=!I&&P?P*o:I,l=!P&&I?I/o:P,i=re<le?Jc:Jc*o,s=le<re?Jc:Jc/o,c=2.5*V;let m=!1,u=!1;"center"===h?(m=!0,u=!0):(0,tt.isRTL)()?"left"===h?m=!0:u=!0:"right"===h?u=!0:m=!0,Pe=(0,Ke.createElement)(et.ResizableBox,{style:{display:"block",objectFit:C,aspectRatio:x||w||!E?void 0:E},size:{width:null!=r?r:"auto",height:null!=l?l:"auto"},showHandle:a,minWidth:i,maxWidth:c,minHeight:s,maxHeight:c/o,lockAspectRatio:o,enable:{top:!1,right:m,bottom:!0,left:u},onResizeStart:function(){O(!1)},onResizeStop:(e,a,r)=>{O(!0),n({width:`${r.offsetWidth}px`,height:"auto",aspectRatio:o===t?void 0:String(o)})},resizeRatio:"center"===h?2:1},(0,Ke.createElement)(sp,{href:_},Pe))}else Pe=(0,Ke.createElement)("div",{style:{width:x,height:w,aspectRatio:E}},(0,Ke.createElement)(sp,{href:_},Pe));return d||e?(0,Ke.createElement)(Ke.Fragment,null,!e&&Ce,Pe,(0,Ke.createElement)(Qt,{attributes:t,setAttributes:n,isSelected:a,insertBlocksAfter:o,label:(0,tt.__)("Image caption text"),showToolbarButton:a&&te,disableEditing:Ee})):T?.bindings?Ce:_e}const mp=(e,t)=>t&&!e&&!(0,It.isBlobURL)(t);function up(e,t){var n,a;return"url"in(null!==(n=e?.sizes?.[t])&&void 0!==n?n:{})||"source_url"in(null!==(a=e?.media_details?.sizes?.[t])&&void 0!==a?a:{})}const pp=function({attributes:e,setAttributes:t,isSelected:n,className:a,insertBlocksAfter:o,onReplace:r,context:l,clientId:i}){const{url:s="",alt:c,caption:m,id:u,width:p,height:d,sizeSlug:g,aspectRatio:h,scale:b,align:_,metadata:y}=e,[v,f]=(0,_t.useState)(),k=(0,_t.useRef)();(0,_t.useEffect)((()=>{k.current=c}),[c]);const x=(0,_t.useRef)();(0,_t.useEffect)((()=>{x.current=m}),[m]);const{__unstableMarkNextChangeAsNotPersistent:w}=(0,gt.useDispatch)(nt.store);(0,_t.useEffect)((()=>{["wide","full"].includes(_)&&(w(),t({width:void 0,height:void 0,aspectRatio:void 0,scale:void 0}))}),[_]);const E=(0,_t.useRef)(),{getSettings:C}=(0,gt.useSelect)(nt.store),S=(0,nt.useBlockEditingMode)(),{createErrorNotice:B}=(0,gt.useDispatch)(Pt.store);function N(e){B(e,{type:"snackbar"}),t({src:void 0,id:void 0,url:void 0}),f(void 0)}function T(n){if(!n||!n.url)return void t({url:void 0,alt:void 0,id:void 0,title:void 0,caption:void 0});if((0,It.isBlobURL)(n.url))return void f(n.url);f();const{imageDefaultSize:a}=C();let o="full";g&&up(n,g)?o=g:up(n,a)&&(o=a);let r,l=((e,t)=>{const n=Object.fromEntries(Object.entries(null!=e?e:{}).filter((([e])=>["alt","id","link","caption"].includes(e))));return n.url=e?.sizes?.[t]?.url||e?.media_details?.sizes?.[t]?.source_url||e.url,n})(n,o);if(x.current&&!l.caption){const{caption:e,...t}=l;l=t}r=n.id&&n.id===u?{url:s}:{sizeSlug:o};let i,c=e.linkDestination;if(!c)switch(window?.wp?.media?.view?.settings?.defaultProps?.link||Xc){case"file":case em:c=em;break;case"post":case tm:c=tm;break;case nm:c=nm;break;case Xc:c=Xc}switch(c){case em:i=n.url;break;case tm:i=n.link}l.href=i,t({...l,...r,linkDestination:c})}function I(e){e!==s&&t({url:e,id:void 0,sizeSlug:C().imageDefaultSize})}let P=((e,t)=>!e&&(0,It.isBlobURL)(t))(u,s);(0,_t.useEffect)((()=>{if(!P)return;const e=(0,It.getBlobByURL)(s);if(e){const{mediaUpload:t}=C();if(!t)return;t({filesList:[e],onFileChange:([e])=>{T(e)},allowedTypes:om,onError:e=>{P=!1,N(e)}})}}),[]),(0,_t.useEffect)((()=>{P?f(s):(0,It.revokeBlobURL)(v)}),[P,s]);const M=mp(u,s)?s:void 0,z=!!s&&(0,Ke.createElement)("img",{alt:(0,tt.__)("Edit image"),title:(0,tt.__)("Edit image"),className:"edit-image-preview",src:s}),R=(0,nt.__experimentalUseBorderProps)(e),A=(0,nt.__experimentalGetShadowClassesAndStyles)(e),H=ut()(a,{"is-transient":v,"is-resized":!!p||!!d,[`size-${g}`]:g,"has-custom-border":!!R.className||R.style&&Object.keys(R.style).length>0}),L=(0,nt.useBlockProps)({ref:E,className:H}),{lockUrlControls:D=!1,lockUrlControlsMessage:F}=(0,gt.useSelect)((e=>{if(!n)return{};const t=Ft(e(Qe.store)).getBlockBindingsSource(y?.bindings?.url?.source);return{lockUrlControls:!!y?.bindings?.url&&(!t||t?.lockAttributesEditing),lockUrlControlsMessage:t?.label?(0,tt.sprintf)((0,tt.__)("Connected to %s"),t.label):(0,tt.__)("Connected to dynamic data")}}),[n]);return(0,Ke.createElement)("figure",{...L},(0,Ke.createElement)(cp,{temporaryURL:v,attributes:e,setAttributes:t,isSingleSelected:n,insertBlocksAfter:o,onReplace:r,onSelectImage:T,onSelectURL:I,onUploadError:N,containerRef:E,context:l,clientId:i,blockEditingMode:S}),(0,Ke.createElement)(nt.MediaPlaceholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:fm}),onSelect:T,onSelectURL:I,onError:N,placeholder:e=>(0,Ke.createElement)(et.Placeholder,{className:ut()("block-editor-media-placeholder",{[R.className]:!!R.className&&!n}),withIllustration:!0,icon:D?Xu:fm,label:(0,tt.__)("Image"),instructions:!D&&(0,tt.__)("Upload an image file, pick one from your media library, or add one with a URL."),style:{aspectRatio:p&&d||!h?void 0:h,width:d&&h?"100%":p,height:p&&h?"100%":d,objectFit:b,...R.style,...A.style}},D?(0,Ke.createElement)("span",{className:"block-bindings-media-placeholder-message"},F):e),accept:"image/*",allowedTypes:om,value:{id:u,src:M},mediaPreview:z,disableMediaButtons:v||s}))};function dp(e,t){const{body:n}=document.implementation.createHTMLDocument("");n.innerHTML=e;const{firstElementChild:a}=n;if(a&&"A"===a.nodeName)return a.getAttribute(t)||void 0}const gp={img:{attributes:["src","alt","title"],classes:["alignleft","aligncenter","alignright","alignnone",/^wp-image-\d+$/]}},hp={from:[{type:"raw",isMatch:e=>"FIGURE"===e.nodeName&&!!e.querySelector("img"),schema:({phrasingContentSchema:e})=>({figure:{require:["img"],children:{...gp,a:{attributes:["href","rel","target"],children:gp},figcaption:{children:e}}}}),transform:e=>{const t=e.className+" "+e.querySelector("img").className,n=/(?:^|\s)align(left|center|right)(?:$|\s)/.exec(t),a=""===e.id?void 0:e.id,o=n?n[1]:void 0,r=/(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(t),l=r?Number(r[1]):void 0,i=e.querySelector("a"),s=i&&i.href?"custom":void 0,c=i&&i.href?i.href:void 0,m=i&&i.rel?i.rel:void 0,u=i&&i.className?i.className:void 0,p=(0,Qe.getBlockAttributes)("core/image",e.outerHTML,{align:o,id:l,linkDestination:s,href:c,rel:m,linkClass:u,anchor:a});return(0,Qe.createBlock)("core/image",p)}},{type:"files",isMatch(e){if(e.some((e=>0===e.type.indexOf("image/")))&&e.some((e=>0!==e.type.indexOf("image/")))){const{createErrorNotice:e}=(0,gt.dispatch)(Pt.store);e((0,tt.__)("If uploading to a gallery all files need to be image formats"),{id:"gallery-transform-invalid-file",type:"snackbar"})}return e.every((e=>0===e.type.indexOf("image/")))},transform(e){const t=e.map((e=>(0,Qe.createBlock)("core/image",{url:(0,It.createBlobURL)(e)})));return t}},{type:"shortcode",tag:"caption",attributes:{url:{type:"string",source:"attribute",attribute:"src",selector:"img"},alt:{type:"string",source:"attribute",attribute:"alt",selector:"img"},caption:{shortcode:function(e,{shortcode:t}){const{body:n}=document.implementation.createHTMLDocument("");n.innerHTML=t.content;let a=n.querySelector("img");for(;a&&a.parentNode&&a.parentNode!==n;)a=a.parentNode;return a&&a.parentNode.removeChild(a),n.innerHTML.trim()}},href:{shortcode:(e,{shortcode:t})=>dp(t.content,"href")},rel:{shortcode:(e,{shortcode:t})=>dp(t.content,"rel")},linkClass:{shortcode:(e,{shortcode:t})=>dp(t.content,"class")},id:{type:"number",shortcode:({named:{id:e}})=>{if(e)return parseInt(e.replace("attachment_",""),10)}},align:{type:"string",shortcode:({named:{align:e="alignnone"}})=>e.replace("align","")}}}]},bp=hp,_p={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/image",title:"Image",category:"media",usesContext:["allowResize","imageCrop","fixedHeight"],description:"Insert an image to make a visual statement.",keywords:["img","photo","picture"],textdomain:"default",attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src",__experimentalRole:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",__experimentalRole:"content"},caption:{type:"rich-text",source:"rich-text",selector:"figcaption",__experimentalRole:"content"},lightbox:{type:"object",enabled:{type:"boolean"}},title:{type:"string",source:"attribute",selector:"img",attribute:"title",__experimentalRole:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",__experimentalRole:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",__experimentalRole:"content"},width:{type:"string"},height:{type:"string"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{interactivity:!0,align:["left","center","right","wide","full"],anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}},shadow:{__experimentalSkipSerialization:!0}},selectors:{border:".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder",shadow:".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder",filter:{duotone:".wp-block-image img, .wp-block-image .components-placeholder"}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"rounded",label:"Rounded"}],editorStyle:"wp-block-image-editor",style:"wp-block-image"},{name:yp}=_p,vp={icon:fm,example:{attributes:{sizeSlug:"large",url:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",caption:(0,tt.__)("Mont Blanc appears—still, snowy, and serene.")}},__experimentalLabel(e,{context:t}){const n=e?.metadata?.name;if("list-view"===t&&n)return n;if("accessibility"===t){const{caption:t,alt:n,url:a}=e;return a?n?n+(t?". "+t:""):t||"":(0,tt.__)("Empty")}},getEditWrapperProps:e=>({"data-align":e.align}),transforms:bp,edit:pp,save:function({attributes:e}){const{url:t,alt:n,caption:a,align:o,href:r,rel:l,linkClass:i,width:s,height:c,aspectRatio:m,scale:u,id:p,linkTarget:d,sizeSlug:g,title:h}=e,b=l||void 0,_=(0,nt.__experimentalGetBorderClassesAndStyles)(e),y=(0,nt.__experimentalGetShadowClassesAndStyles)(e),v=ut()({alignnone:"none"===o,[`size-${g}`]:g,"is-resized":s||c,"has-custom-border":!!_.className||_.style&&Object.keys(_.style).length>0}),f=ut()(_.className,{[`wp-image-${p}`]:!!p}),k=(0,Ke.createElement)("img",{src:t,alt:n,className:f||void 0,style:{..._.style,...y.style,aspectRatio:m,objectFit:u,width:s,height:c},title:h}),x=(0,Ke.createElement)(Ke.Fragment,null,r?(0,Ke.createElement)("a",{className:i,href:r,target:d,rel:b},k):k,!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{className:(0,nt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:a}));return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:v})},x)},deprecated:Ju},fp=()=>Xe({name:yp,metadata:_p,settings:vp}),kp=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"}));const xp={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/latest-comments",title:"Latest Comments",category:"widgets",description:"Display a list of your most recent comments.",keywords:["recent comments"],textdomain:"default",attributes:{commentsToShow:{type:"number",default:5,minimum:1,maximum:100},displayAvatar:{type:"boolean",default:!0},displayDate:{type:"boolean",default:!0},displayExcerpt:{type:"boolean",default:!0}},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}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-latest-comments-editor",style:"wp-block-latest-comments"},{name:wp}=xp,Ep={icon:kp,example:{},edit:function({attributes:e,setAttributes:t}){const{commentsToShow:n,displayAvatar:a,displayDate:o,displayExcerpt:r}=e,l={...e,style:{...e?.style,spacing:void 0}};return(0,Ke.createElement)("div",{...(0,nt.useBlockProps)()},(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display avatar"),checked:a,onChange:()=>t({displayAvatar:!a})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display date"),checked:o,onChange:()=>t({displayDate:!o})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display excerpt"),checked:r,onChange:()=>t({displayExcerpt:!r})}),(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Number of comments"),value:n,onChange:e=>t({commentsToShow:e}),min:1,max:100,required:!0}))),(0,Ke.createElement)(et.Disabled,null,(0,Ke.createElement)(ot(),{block:"core/latest-comments",attributes:l,urlQueryArgs:{_locale:"site"}})))}},Cp=()=>Xe({name:wp,metadata:xp,settings:Ep}),Sp=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"})),{attributes:Bp}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/latest-posts",title:"Latest Posts",category:"widgets",description:"Display a list of your most recent posts.",keywords:["recent posts"],textdomain:"default",attributes:{categories:{type:"array",items:{type:"object"}},selectedAuthor:{type:"number"},postsToShow:{type:"number",default:5},displayPostContent:{type:"boolean",default:!1},displayPostContentRadio:{type:"string",default:"excerpt"},excerptLength:{type:"number",default:55},displayAuthor:{type:"boolean",default:!1},displayPostDate:{type:"boolean",default:!1},postLayout:{type:"string",default:"list"},columns:{type:"number",default:3},order:{type:"string",default:"desc"},orderBy:{type:"string",default:"date"},displayFeaturedImage:{type:"boolean",default:!1},featuredImageAlign:{type:"string",enum:["left","center","right"]},featuredImageSizeSlug:{type:"string",default:"thumbnail"},featuredImageSizeWidth:{type:"number",default:null},featuredImageSizeHeight:{type:"number",default:null},addLinkToFeaturedImage:{type:"boolean",default:!1}},supports:{align:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},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}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-latest-posts-editor",style:"wp-block-latest-posts"},Np=[{attributes:{...Bp,categories:{type:"string"}},supports:{align:!0,html:!1},migrate:e=>({...e,categories:[{id:Number(e.categories)}]}),isEligible:({categories:e})=>e&&"string"==typeof e,save:()=>null}],Tp=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"})),Ip={per_page:-1,context:"view"},Pp={per_page:-1,has_published_posts:["post"],context:"view"};const Mp={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/latest-posts",title:"Latest Posts",category:"widgets",description:"Display a list of your most recent posts.",keywords:["recent posts"],textdomain:"default",attributes:{categories:{type:"array",items:{type:"object"}},selectedAuthor:{type:"number"},postsToShow:{type:"number",default:5},displayPostContent:{type:"boolean",default:!1},displayPostContentRadio:{type:"string",default:"excerpt"},excerptLength:{type:"number",default:55},displayAuthor:{type:"boolean",default:!1},displayPostDate:{type:"boolean",default:!1},postLayout:{type:"string",default:"list"},columns:{type:"number",default:3},order:{type:"string",default:"desc"},orderBy:{type:"string",default:"date"},displayFeaturedImage:{type:"boolean",default:!1},featuredImageAlign:{type:"string",enum:["left","center","right"]},featuredImageSizeSlug:{type:"string",default:"thumbnail"},featuredImageSizeWidth:{type:"number",default:null},featuredImageSizeHeight:{type:"number",default:null},addLinkToFeaturedImage:{type:"boolean",default:!1}},supports:{align:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},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}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-latest-posts-editor",style:"wp-block-latest-posts"},{name:zp}=Mp,Rp={icon:Sp,example:{},edit:function e({attributes:t,setAttributes:n}){var a;const o=(0,jt.useInstanceId)(e),{postsToShow:r,order:l,orderBy:i,categories:s,selectedAuthor:c,displayFeaturedImage:m,displayPostContentRadio:u,displayPostContent:p,displayPostDate:d,displayAuthor:g,postLayout:h,columns:b,excerptLength:_,featuredImageAlign:y,featuredImageSizeSlug:v,featuredImageSizeWidth:f,featuredImageSizeHeight:k,addLinkToFeaturedImage:x}=t,{imageSizes:w,latestPosts:E,defaultImageWidth:C,defaultImageHeight:S,categoriesList:B,authorList:N}=(0,gt.useSelect)((e=>{var t,n;const{getEntityRecords:a,getUsers:o}=e(dt.store),m=e(nt.store).getSettings(),u=s&&s.length>0?s.map((e=>e.id)):[],p=Object.fromEntries(Object.entries({categories:u,author:c,order:l,orderby:i,per_page:r,_embed:"wp:featuredmedia"}).filter((([,e])=>void 0!==e)));return{defaultImageWidth:null!==(t=m.imageDimensions?.[v]?.width)&&void 0!==t?t:0,defaultImageHeight:null!==(n=m.imageDimensions?.[v]?.height)&&void 0!==n?n:0,imageSizes:m.imageSizes,latestPosts:a("postType","post",p),categoriesList:a("taxonomy","category",Ip),authorList:o(Pp)}}),[v,r,l,i,s,c]),{createWarningNotice:T,removeNotice:I}=(0,gt.useDispatch)(Pt.store);let P;const M=e=>{e.preventDefault(),I(P),P=`block-library/core/latest-posts/redirection-prevented/${o}`,T((0,tt.__)("Links are disabled in the editor."),{id:P,type:"snackbar"})},z=w.filter((({slug:e})=>"full"!==e)).map((({name:e,slug:t})=>({value:t,label:e}))),R=null!==(a=B?.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==a?a:{},A=!!E?.length,H=(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Post content")},(0,Ke.createElement)(et.ToggleControl,{label:(0,tt.__)("Post content"),checked:p,onChange:e=>n({displayPostContent:e})}),p&&(0,Ke.createElement)(et.RadioControl,{label:(0,tt.__)("Show:"),selected:u,options:[{label:(0,tt.__)("Excerpt"),value:"excerpt"},{label:(0,tt.__)("Full post"),value:"full_post"}],onChange:e=>n({displayPostContentRadio:e})}),p&&"excerpt"===u&&(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Max number of words"),value:_,onChange:e=>n({excerptLength:e}),min:10,max:100})),(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Post meta")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display author name"),checked:g,onChange:e=>n({displayAuthor:e})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display post date"),checked:d,onChange:e=>n({displayPostDate:e})})),(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Featured image")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display featured image"),checked:m,onChange:e=>n({displayFeaturedImage:e})}),m&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.__experimentalImageSizeControl,{onChange:e=>{const t={};e.hasOwnProperty("width")&&(t.featuredImageSizeWidth=e.width),e.hasOwnProperty("height")&&(t.featuredImageSizeHeight=e.height),n(t)},slug:v,width:f,height:k,imageWidth:C,imageHeight:S,imageSizeOptions:z,imageSizeHelp:(0,tt.__)("Select the size of the source image."),onChangeImage:e=>n({featuredImageSizeSlug:e,featuredImageSizeWidth:void 0,featuredImageSizeHeight:void 0})}),(0,Ke.createElement)(et.BaseControl,{className:"editor-latest-posts-image-alignment-control"},(0,Ke.createElement)(et.BaseControl.VisualLabel,null,(0,tt.__)("Image alignment")),(0,Ke.createElement)(nt.BlockAlignmentToolbar,{value:y,onChange:e=>n({featuredImageAlign:e}),controls:["left","center","right"],isCollapsed:!1})),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Add link to featured image"),checked:x,onChange:e=>n({addLinkToFeaturedImage:e})}))),(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Sorting and filtering")},(0,Ke.createElement)(et.QueryControls,{order:l,orderBy:i,numberOfItems:r,onOrderChange:e=>n({order:e}),onOrderByChange:e=>n({orderBy:e}),onNumberOfItemsChange:e=>n({postsToShow:e}),categorySuggestions:R,onCategoryChange:e=>{if(e.some((e=>"string"==typeof e&&!R[e])))return;const t=e.map((e=>"string"==typeof e?R[e]:e));if(t.includes(null))return!1;n({categories:t})},selectedCategories:s,onAuthorChange:e=>n({selectedAuthor:""!==e?Number(e):void 0}),authorList:null!=N?N:[],selectedAuthorId:c}),"grid"===h&&(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Columns"),value:b,onChange:e=>n({columns:e}),min:2,max:A?Math.min(6,E.length):6,required:!0}))),L=(0,nt.useBlockProps)({className:ut()({"wp-block-latest-posts__list":!0,"is-grid":"grid"===h,"has-dates":d,"has-author":g,[`columns-${b}`]:"grid"===h})});if(!A)return(0,Ke.createElement)("div",{...L},H,(0,Ke.createElement)(et.Placeholder,{icon:Xn,label:(0,tt.__)("Latest Posts")},Array.isArray(E)?(0,tt.__)("No posts found."):(0,Ke.createElement)(et.Spinner,null)));const D=E.length>r?E.slice(0,r):E,F=[{icon:Tp,title:(0,tt.__)("List view"),onClick:()=>n({postLayout:"list"}),isActive:"list"===h},{icon:Xm,title:(0,tt.__)("Grid view"),onClick:()=>n({postLayout:"grid"}),isActive:"grid"===h}],V=(0,So.getSettings)().formats.date;return(0,Ke.createElement)("div",null,H,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,{controls:F})),(0,Ke.createElement)("ul",{...L},D.map((e=>{const t=e.title.rendered.trim();let n=e.excerpt.rendered;const a=N?.find((t=>t.id===e.author)),o=document.createElement("div");o.innerHTML=n,n=o.textContent||o.innerText||"";const{url:r,alt:l}=function(e,t){var n;const a=e._embedded?.["wp:featuredmedia"]?.[0];return{url:null!==(n=a?.media_details?.sizes?.[t]?.source_url)&&void 0!==n?n:a?.source_url,alt:a?.alt_text}}(e,v),i=ut()({"wp-block-latest-posts__featured-image":!0,[`align${y}`]:!!y}),s=m&&r,c=s&&(0,Ke.createElement)("img",{src:r,alt:l,style:{maxWidth:f,maxHeight:k}}),h=_<n.trim().split(" ").length&&""===e.excerpt.raw?(0,Ke.createElement)(Ke.Fragment,null,n.trim().split(" ",_).join(" "),(0,_t.createInterpolateElement)((0,tt.sprintf)((0,tt.__)("… <a>Read more<span>: %1$s</span></a>"),t||(0,tt.__)("(no title)")),{a:(0,Ke.createElement)("a",{className:"wp-block-latest-posts__read-more",href:e.link,rel:"noopener noreferrer",onClick:M}),span:(0,Ke.createElement)("span",{className:"screen-reader-text"})})):n;return(0,Ke.createElement)("li",{key:e.id},s&&(0,Ke.createElement)("div",{className:i},x?(0,Ke.createElement)("a",{className:"wp-block-latest-posts__post-title",href:e.link,rel:"noreferrer noopener",onClick:M},c):c),(0,Ke.createElement)("a",{href:e.link,rel:"noreferrer noopener",dangerouslySetInnerHTML:t?{__html:t}:void 0,onClick:M},t?null:(0,tt.__)("(no title)")),g&&a&&(0,Ke.createElement)("div",{className:"wp-block-latest-posts__post-author"},(0,tt.sprintf)((0,tt.__)("by %s"),a.name)),d&&e.date_gmt&&(0,Ke.createElement)("time",{dateTime:(0,So.format)("c",e.date_gmt),className:"wp-block-latest-posts__post-date"},(0,So.dateI18n)(V,e.date_gmt)),p&&"excerpt"===u&&(0,Ke.createElement)("div",{className:"wp-block-latest-posts__post-excerpt"},h),p&&"full_post"===u&&(0,Ke.createElement)("div",{className:"wp-block-latest-posts__post-full-content",dangerouslySetInnerHTML:{__html:e.content.raw.trim()}}))}))))},deprecated:Np},Ap=()=>Xe({name:zp,metadata:Mp,settings:Rp}),Hp={A:"upper-alpha",a:"lower-alpha",I:"upper-roman",i:"lower-roman"};function Lp(e){const{values:t,start:n,reversed:a,ordered:o,type:r,...l}=e,i=document.createElement(o?"ol":"ul");i.innerHTML=t,n&&i.setAttribute("start",n),a&&i.setAttribute("reversed",!0),r&&i.setAttribute("type",r);const[s]=(0,Qe.rawHandler)({HTML:i.outerHTML});return[{...l,...s.attributes},s.innerBlocks]}const Dp={attributes:{ordered:{type:"boolean",default:!1,__experimentalRole:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",__experimentalRole:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,__experimentalFontFamily:!0},color:{gradients:!0,link:!0},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},save({attributes:e}){const{ordered:t,values:n,type:a,reversed:o,start:r}=e,l=t?"ol":"ul";return(0,Ke.createElement)(l,{...nt.useBlockProps.save({type:a,reversed:o,start:r})},(0,Ke.createElement)(nt.RichText.Content,{value:n,multiline:"li"}))},migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},Fp={attributes:{ordered:{type:"boolean",default:!1,__experimentalRole:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",__experimentalRole:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,__experimentalFontFamily:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},save({attributes:e}){const{ordered:t,values:n,type:a,reversed:o,start:r}=e,l=t?"ol":"ul";return(0,Ke.createElement)(l,{...nt.useBlockProps.save({type:a,reversed:o,start:r})},(0,Ke.createElement)(nt.RichText.Content,{value:n,multiline:"li"}))},migrate:Lp},Vp={attributes:{ordered:{type:"boolean",default:!1,__experimentalRole:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",__experimentalRole:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},isEligible:({type:e})=>!!e,save({attributes:e}){const{ordered:t,type:n,reversed:a,start:o}=e,r=t?"ol":"ul";return(0,Ke.createElement)(r,{...nt.useBlockProps.save({type:n,reversed:a,start:o})},(0,Ke.createElement)(nt.InnerBlocks.Content,null))},migrate:function(e){const{type:t}=e;return t&&Hp[t]?{...e,type:Hp[t]}:e}},$p=[Vp,Fp,Dp],Op=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM15.4697 14.9697L18.4393 12L15.4697 9.03033L16.5303 7.96967L20.0303 11.4697L20.5607 12L20.0303 12.5303L16.5303 16.0303L15.4697 14.9697Z"})),Gp=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-4-4.6l-4 4 4 4 1-1-3-3 3-3-1-1z"})),Up=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})),qp=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),jp=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M3.8 15.8h8.9v-1.5H3.8v1.5zm0-7h8.9V7.2H3.8v1.6zm14.7-2.1V10h1V5.3l-2.2.7.3 1 .9-.3zm1.2 6.1c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5H20v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3 0-.8-.3-1.1z"})),Wp=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM5 6.7V10h1V5.3L3.8 6l.4 1 .8-.3zm-.4 5.7c-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-1c.3-.6.8-1.4.9-2.1.1-.3 0-.8-.2-1.1-.5-.6-1.3-.5-1.7-.4z"})),Zp=window.wp.deprecated;var Qp=n.n(Zp);const Kp=({setAttributes:e,reversed:t,start:n,type:a})=>(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Ordered list settings")},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Start value"),type:"number",onChange:t=>{const n=parseInt(t,10);e({start:isNaN(n)?void 0:n})},value:Number.isInteger(n)?n.toString(10):"",step:"1"}),(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Numbering style"),options:[{label:(0,tt.__)("Numbers"),value:"decimal"},{label:(0,tt.__)("Uppercase letters"),value:"upper-alpha"},{label:(0,tt.__)("Lowercase letters"),value:"lower-alpha"},{label:(0,tt.__)("Uppercase Roman numerals"),value:"upper-roman"},{label:(0,tt.__)("Lowercase Roman numerals"),value:"lower-roman"}],value:a,onChange:t=>e({type:t})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Reverse list numbering"),checked:t||!1,onChange:t=>{e({reversed:t||void 0})}})));const Yp=(0,_t.forwardRef)((function(e,t){const{ordered:n,...a}=e,o=n?"ol":"ul";return(0,Ke.createElement)(o,{ref:t,...a})})),Jp=[["core/list-item"]];function Xp({clientId:e}){const t=function(e){const{replaceBlocks:t,selectionChange:n}=(0,gt.useDispatch)(nt.store),{getBlockRootClientId:a,getBlockAttributes:o,getBlock:r}=(0,gt.useSelect)(nt.store);return(0,_t.useCallback)((()=>{const l=a(e),i=o(l),s=(0,Qe.createBlock)("core/list-item",i),{innerBlocks:c}=r(e);t([l],[s,...c]),n(c[c.length-1].clientId)}),[e])}(e),n=(0,gt.useSelect)((t=>{const{getBlockRootClientId:n,getBlockName:a}=t(nt.store);return"core/list-item"===a(n(e))}),[e]);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToolbarButton,{icon:(0,tt.isRTL)()?Op:Gp,title:(0,tt.__)("Outdent"),describedBy:(0,tt.__)("Outdent list item"),disabled:!n,onClick:t}))}function ed({phrasingContentSchema:e}){const t={...e,ul:{},ol:{attributes:["type","start","reversed"]}};return["ul","ol"].forEach((e=>{t[e].children={li:{children:t}}})),t}function td(e){return e.flatMap((({name:e,attributes:t,innerBlocks:n=[]})=>"core/list-item"===e?[t.content,...td(n)]:td(n)))}const nd={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph","core/heading"],transform:e=>{let t=[];if(e.length>1)t=e.map((({content:e})=>(0,Qe.createBlock)("core/list-item",{content:e})));else if(1===e.length){const n=(0,Rn.create)({html:e[0].content});t=(0,Rn.split)(n,"\n").map((e=>(0,Qe.createBlock)("core/list-item",{content:(0,Rn.toHTMLString)({value:e})})))}return(0,Qe.createBlock)("core/list",{anchor:e.anchor},t)}},{type:"raw",selector:"ol,ul",schema:e=>({ol:ed(e).ol,ul:ed(e).ul}),transform:function e(t){const n=t.getAttribute("type"),a={ordered:"OL"===t.tagName,anchor:""===t.id?void 0:t.id,start:t.getAttribute("start")?parseInt(t.getAttribute("start"),10):void 0,reversed:!!t.hasAttribute("reversed")||void 0,type:n&&Hp[n]?Hp[n]:void 0},o=Array.from(t.children).map((t=>{const n=Array.from(t.childNodes).filter((e=>e.nodeType!==e.TEXT_NODE||0!==e.textContent.trim().length));n.reverse();const[a,...o]=n;if(!("UL"===a?.tagName||"OL"===a?.tagName))return(0,Qe.createBlock)("core/list-item",{content:t.innerHTML});const r=o.map((e=>e.nodeType===e.TEXT_NODE?e.textContent:e.outerHTML));r.reverse();const l={content:r.join("").trim()},i=[e(a)];return(0,Qe.createBlock)("core/list-item",l,i)}));return(0,Qe.createBlock)("core/list",a,o)}},...["*","-"].map((e=>({type:"prefix",prefix:e,transform:e=>(0,Qe.createBlock)("core/list",{},[(0,Qe.createBlock)("core/list-item",{content:e})])}))),...["1.","1)"].map((e=>({type:"prefix",prefix:e,transform:e=>(0,Qe.createBlock)("core/list",{ordered:!0},[(0,Qe.createBlock)("core/list-item",{content:e})])})))],to:[...["core/paragraph","core/heading"].map((e=>({type:"block",blocks:[e],transform:(t,n)=>td(n).map((t=>(0,Qe.createBlock)(e,{content:t})))})))]},ad=nd,od={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/list",title:"List",category:"text",allowedBlocks:["core/list-item"],description:"Create a bulleted or numbered list.",keywords:["bullet list","ordered list","numbered list"],textdomain:"default",attributes:{ordered:{type:"boolean",default:!1,__experimentalRole:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",__experimentalRole:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalOnMerge:!0,__experimentalSlashInserter:!0,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-list-editor",style:"wp-block-list"},{name:rd}=od,ld={icon:Tp,example:{innerBlocks:[{name:"core/list-item",attributes:{content:(0,tt.__)("Alice.")}},{name:"core/list-item",attributes:{content:(0,tt.__)("The White Rabbit.")}},{name:"core/list-item",attributes:{content:(0,tt.__)("The Cheshire Cat.")}},{name:"core/list-item",attributes:{content:(0,tt.__)("The Mad Hatter.")}},{name:"core/list-item",attributes:{content:(0,tt.__)("The Queen of Hearts.")}}]},transforms:ad,edit:function({attributes:e,setAttributes:t,clientId:n,style:a}){const{ordered:o,type:r,reversed:l,start:i}=e,s=(0,nt.useBlockProps)({style:{..._t.Platform.isNative&&a,listStyleType:o&&"decimal"!==r?r:void 0}}),c=(0,nt.useInnerBlocksProps)(s,{template:Jp,templateLock:!1,templateInsertUpdatesSelection:!0,..._t.Platform.isNative&&{marginVertical:8,marginHorizontal:8,renderAppender:!1},__experimentalCaptureToolbars:!0});!function(e,t){const n=(0,gt.useRegistry)(),{updateBlockAttributes:a,replaceInnerBlocks:o}=(0,gt.useDispatch)(nt.store);(0,_t.useEffect)((()=>{if(!e.values)return;const[r,l]=Lp(e);Qp()("Value attribute on the list block",{since:"6.0",version:"6.5",alternative:"inner blocks"}),n.batch((()=>{a(t,r),o(t,l)}))}),[e.values])}(e,n);const m=(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(et.ToolbarButton,{icon:(0,tt.isRTL)()?Up:qp,title:(0,tt.__)("Unordered"),describedBy:(0,tt.__)("Convert to unordered list"),isActive:!1===o,onClick:()=>{t({ordered:!1})}}),(0,Ke.createElement)(et.ToolbarButton,{icon:(0,tt.isRTL)()?jp:Wp,title:(0,tt.__)("Ordered"),describedBy:(0,tt.__)("Convert to ordered list"),isActive:!0===o,onClick:()=>{t({ordered:!0})}}),(0,Ke.createElement)(Xp,{clientId:n}));return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Yp,{ordered:o,reversed:l,start:i,...c}),m,o&&(0,Ke.createElement)(Kp,{setAttributes:t,reversed:l,start:i,type:r}))},save:function({attributes:e}){const{ordered:t,type:n,reversed:a,start:o}=e,r=t?"ol":"ul";return(0,Ke.createElement)(r,{...nt.useBlockProps.save({reversed:a,start:o,style:{listStyleType:t&&"decimal"!==n?n:void 0}})},(0,Ke.createElement)(nt.InnerBlocks.Content,null))},deprecated:$p},id=()=>Xe({name:rd,metadata:od,settings:ld}),sd=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M12 11v1.5h8V11h-8zm-6-1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),cd=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM20.0303 9.03033L17.0607 12L20.0303 14.9697L18.9697 16.0303L15.4697 12.5303L14.9393 12L15.4697 11.4697L18.9697 7.96967L20.0303 9.03033Z"})),md=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-8-3.5l3 3-3 3 1 1 4-4-4-4-1 1z"}));function ud(e){const{replaceBlocks:t,selectionChange:n,multiSelect:a}=(0,gt.useDispatch)(nt.store),{getBlock:o,getPreviousBlockClientId:r,getSelectionStart:l,getSelectionEnd:i,hasMultiSelection:s,getMultiSelectedBlockClientIds:c}=(0,gt.useSelect)(nt.store);return(0,_t.useCallback)((()=>{const m=s(),u=m?c():[e],p=u.map((e=>(0,Qe.cloneBlock)(o(e)))),d=r(e),g=(0,Qe.cloneBlock)(o(d));g.innerBlocks?.length||(g.innerBlocks=[(0,Qe.createBlock)("core/list")]),g.innerBlocks[g.innerBlocks.length-1].innerBlocks.push(...p);const h=l(),b=i();t([d,...u],[g]),m?a(p[0].clientId,p[p.length-1].clientId):n(p[0].clientId,b.attributeKey,b.clientId===h.clientId?h.offset:b.offset,b.offset)}),[e])}function pd(){const e=(0,gt.useRegistry)(),{moveBlocksToPosition:t,removeBlock:n,insertBlock:a,updateBlockListSettings:o}=(0,gt.useDispatch)(nt.store),{getBlockRootClientId:r,getBlockName:l,getBlockOrder:i,getBlockIndex:s,getSelectedBlockClientIds:c,getBlock:m,getBlockListSettings:u}=(0,gt.useSelect)(nt.store);return(0,_t.useCallback)(((p=c())=>{if(Array.isArray(p)||(p=[p]),!p.length)return;const d=p[0];if("core/list-item"!==l(d))return;const g=function(e){const t=r(e),n=r(t);if(n&&"core/list-item"===l(n))return n}(d);if(!g)return;const h=r(d),b=p[p.length-1],_=i(h).slice(s(b)+1);e.batch((()=>{if(_.length){let e=i(d)[0];if(!e){const t=(0,Qe.cloneBlock)(m(h),{},[]);e=t.clientId,a(t,0,d,!1),o(e,u(h))}t(_,h,e)}if(t(p,h,r(g),s(g)+1),!i(h).length){n(h,!1)}}))}),[])}function dd(e,t){const n=(0,gt.useRegistry)(),{getPreviousBlockClientId:a,getNextBlockClientId:o,getBlockOrder:r,getBlockRootClientId:l,getBlockName:i}=(0,gt.useSelect)(nt.store),{mergeBlocks:s,moveBlocksToPosition:c}=(0,gt.useDispatch)(nt.store),m=pd();function u(e){const t=r(e);return t.length?u(t[t.length-1]):e}function p(e){const t=l(e),n=l(t);if(n&&"core/list-item"===i(n))return n}function d(e){const t=o(e);if(t)return t;const n=p(e);return n?d(n):void 0}function g(e){const t=r(e);return t.length?r(t[0])[0]:d(e)}return o=>{function i(e,t){n.batch((()=>{const[n]=r(t);n&&c(r(n),n,l(e)),s(e,t)}))}if(o){const n=g(e);if(!n)return void t(o);p(n)?m(n):i(e,n)}else{const n=a(e);if(p(e))m(e);else if(n){i(u(n),e)}else t(o)}}}function gd(e){const t=(0,Qe.switchToBlockType)(e,"core/list");if(t)return t;const n=(0,Qe.switchToBlockType)(e,"core/paragraph");return n?(0,Qe.switchToBlockType)(n,"core/list"):null}function hd({clientId:e}){const t=ud(e),n=pd(),{canIndent:a,canOutdent:o}=(0,gt.useSelect)((t=>{const{getBlockIndex:n,getBlockRootClientId:a,getBlockName:o}=t(nt.store);return{canIndent:n(e)>0,canOutdent:"core/list-item"===o(a(a(e)))}}),[e]);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToolbarButton,{icon:(0,tt.isRTL)()?Op:Gp,title:(0,tt.__)("Outdent"),describedBy:(0,tt.__)("Outdent list item"),disabled:!o,onClick:()=>n()}),(0,Ke.createElement)(et.ToolbarButton,{icon:(0,tt.isRTL)()?cd:md,title:(0,tt.__)("Indent"),describedBy:(0,tt.__)("Indent list item"),isDisabled:!a,onClick:()=>t()}))}const bd={to:[{type:"block",blocks:["core/paragraph"],transform:(e,t=[])=>[(0,Qe.createBlock)("core/paragraph",e),...t.map((e=>(0,Qe.cloneBlock)(e)))]}]},_d=bd,yd={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/list-item",title:"List item",category:"text",parent:["core/list"],allowedBlocks:["core/list"],description:"Create a list item.",textdomain:"default",attributes:{placeholder:{type:"string"},content:{type:"rich-text",source:"rich-text",selector:"li",__experimentalRole:"content"}},supports:{className:!1,__experimentalSelector:"li",spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:vd}=yd,fd={icon:sd,edit:function({attributes:e,setAttributes:t,onReplace:n,clientId:a,mergeBlocks:o}){const{placeholder:r,content:l}=e,i=(0,nt.useBlockProps)(),s=(0,nt.useInnerBlocksProps)(i,{renderAppender:!1,__unstableDisableDropZone:!0}),c=function(e){const{replaceBlocks:t,selectionChange:n}=(0,gt.useDispatch)(nt.store),{getBlock:a,getBlockRootClientId:o,getBlockIndex:r,getBlockName:l}=(0,gt.useSelect)(nt.store),i=(0,_t.useRef)(e);i.current=e;const s=pd();return(0,jt.useRefEffect)((e=>{function c(e){if(e.defaultPrevented||e.keyCode!==fn.ENTER)return;const{content:c,clientId:m}=i.current;if(c.length)return;if(e.preventDefault(),"core/list-item"===l(o(o(i.current.clientId))))return void s();const u=a(o(m)),p=r(m),d=(0,Qe.cloneBlock)({...u,innerBlocks:u.innerBlocks.slice(0,p)}),g=(0,Qe.createBlock)((0,Qe.getDefaultBlockName)()),h=[...u.innerBlocks[p].innerBlocks[0]?.innerBlocks||[],...u.innerBlocks.slice(p+1)],b=h.length?[(0,Qe.cloneBlock)({...u,innerBlocks:h})]:[];t(u.clientId,[d,g,...b],1),n(g.clientId)}return e.addEventListener("keydown",c),()=>{e.removeEventListener("keydown",c)}}),[])}({content:l,clientId:a}),m=function(e){const{getSelectionStart:t,getSelectionEnd:n,getBlockIndex:a}=(0,gt.useSelect)(nt.store),o=ud(e);return(0,jt.useRefEffect)((r=>{function l(r){const{keyCode:l,shiftKey:i,altKey:s,metaKey:c,ctrlKey:m}=r;if(r.defaultPrevented||l!==fn.SPACE||i||s||c||m)return;if(0===a(e))return;const u=t(),p=n();0===u.offset&&0===p.offset&&(r.preventDefault(),o())}return r.addEventListener("keydown",l),()=>{r.removeEventListener("keydown",l)}}),[e,o])}(a),u=function(e){const t=(0,_t.useRef)(!1),{getBlock:n}=(0,gt.useSelect)(nt.store);return(0,_t.useCallback)((a=>{const o=n(e);return t.current?(0,Qe.cloneBlock)(o,{content:a}):(t.current=!0,(0,Qe.createBlock)(o.name,{...o.attributes,content:a}))}),[e,n])}(a),p=dd(a,o);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("li",{...s},(0,Ke.createElement)(nt.RichText,{ref:(0,jt.useMergeRefs)([c,m]),identifier:"content",tagName:"div",onChange:e=>t({content:e}),value:l,"aria-label":(0,tt.__)("List text"),placeholder:r||(0,tt.__)("List"),onSplit:u,onMerge:p,onReplace:n?(e,...t)=>{n(function(e){const t=[];for(let n of e)if("core/list-item"===n.name)t.push(n);else if("core/list"===n.name)t.push(...n.innerBlocks);else if(n=gd(n))for(const{innerBlocks:e}of n)t.push(...e);return t}(e),...t)}:void 0}),s.children),(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(hd,{clientId:a})))},save:function({attributes:e}){return(0,Ke.createElement)("li",{...nt.useBlockProps.save()},(0,Ke.createElement)(nt.RichText.Content,{value:e.content}),(0,Ke.createElement)(nt.InnerBlocks.Content,null))},merge:(e,t)=>({...e,content:e.content+t.content}),transforms:_d,[Ft(nt.privateApis).requiresWrapperOnCopy]:!0},kd=()=>Xe({name:vd,metadata:yd,settings:fd}),xd=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M11 14.5l1.1 1.1 3-3 .5-.5-.6-.6-3-3-1 1 1.7 1.7H5v1.5h7.7L11 14.5zM16.8 5h-7c-1.1 0-2 .9-2 2v1.5h1.5V7c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v10c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5v-1.5H7.8V17c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2z"}));const wd={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/loginout",title:"Login/out",category:"theme",description:"Show login & logout links.",keywords:["login","logout","form"],textdomain:"default",attributes:{displayLoginAsForm:{type:"boolean",default:!1},redirectToCurrent:{type:"boolean",default:!0}},supports:{className:!0,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:Ed}=wd,Cd={icon:xd,edit:function({attributes:e,setAttributes:t}){const{displayLoginAsForm:n,redirectToCurrent:a}=e;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display login as form"),checked:n,onChange:()=>t({displayLoginAsForm:!n})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Redirect to current URL"),checked:a,onChange:()=>t({redirectToCurrent:!a})}))),(0,Ke.createElement)("div",{...(0,nt.useBlockProps)({className:"logged-in"})},(0,Ke.createElement)("a",{href:"#login-pseudo-link"},(0,tt.__)("Log out"))))}},Sd=()=>Xe({name:Ed,metadata:wd,settings:Cd}),Bd=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z"})),Nd="full",Td="media",Id="attachment",Pd=[["core/paragraph",{placeholder:(0,tt._x)("Content…","content placeholder")}]],Md=(e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${100*t.x}% ${100*t.y}%`:"50% 50%"}:{},zd=50,Rd=()=>{},Ad=e=>{if(!e.customBackgroundColor)return e;const t={color:{background:e.customBackgroundColor}},{customBackgroundColor:n,...a}=e;return{...a,style:t}},Hd=e=>e.align?e:{...e,align:"wide"},Ld={align:{type:"string",default:"wide"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:""},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number"},mediaType:{type:"string"},mediaWidth:{type:"number",default:50},isStackedOnMobile:{type:"boolean",default:!1}},Dd={...Ld,isStackedOnMobile:{type:"boolean",default:!0},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},mediaSizeSlug:{type:"string"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},Fd={anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0}},Vd={attributes:{...Dd,mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:"",__experimentalRole:"content"},mediaId:{type:"number",__experimentalRole:"content"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src",__experimentalRole:"content"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href",__experimentalRole:"content"},mediaType:{type:"string",__experimentalRole:"content"}},supports:{...Fd,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},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}}},save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:n,mediaPosition:a,mediaType:o,mediaUrl:r,mediaWidth:l,mediaId:i,verticalAlignment:s,imageFill:c,focalPoint:m,linkClass:u,href:p,linkTarget:d,rel:g}=e,h=e.mediaSizeSlug||Nd,b=g||void 0,_=ut()({[`wp-image-${i}`]:i&&"image"===o,[`size-${h}`]:i&&"image"===o});let y=(0,Ke.createElement)("img",{src:r,alt:n,className:_||null});p&&(y=(0,Ke.createElement)("a",{className:u,href:p,target:d,rel:b},y));const v={image:()=>y,video:()=>(0,Ke.createElement)("video",{controls:!0,src:r})},f=ut()({"has-media-on-the-right":"right"===a,"is-stacked-on-mobile":t,[`is-vertically-aligned-${s}`]:s,"is-image-fill":c}),k=c?((e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${Math.round(100*t.x)}% ${Math.round(100*t.y)}%`:"50% 50%"}:{})(r,m):{};let x;l!==zd&&(x="right"===a?`auto ${l}%`:`${l}% auto`);const w={gridTemplateColumns:x};return"right"===a?(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:f,style:w})},(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,Ke.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||Rd)())):(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:f,style:w})},(0,Ke.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||Rd)()),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}))},migrate:Hd,isEligible(e,t,{block:n}){const{attributes:a}=n;return void 0===e.align&&!!a.className?.includes("alignwide")}},$d={attributes:Dd,supports:Fd,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:n,mediaPosition:a,mediaType:o,mediaUrl:r,mediaWidth:l,mediaId:i,verticalAlignment:s,imageFill:c,focalPoint:m,linkClass:u,href:p,linkTarget:d,rel:g}=e,h=e.mediaSizeSlug||Nd,b=g||void 0,_=ut()({[`wp-image-${i}`]:i&&"image"===o,[`size-${h}`]:i&&"image"===o});let y=(0,Ke.createElement)("img",{src:r,alt:n,className:_||null});p&&(y=(0,Ke.createElement)("a",{className:u,href:p,target:d,rel:b},y));const v={image:()=>y,video:()=>(0,Ke.createElement)("video",{controls:!0,src:r})},f=ut()({"has-media-on-the-right":"right"===a,"is-stacked-on-mobile":t,[`is-vertically-aligned-${s}`]:s,"is-image-fill":c}),k=c?Md(r,m):{};let x;l!==zd&&(x="right"===a?`auto ${l}%`:`${l}% auto`);const w={gridTemplateColumns:x};return"right"===a?(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:f,style:w})},(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,Ke.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||Rd)())):(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:f,style:w})},(0,Ke.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||Rd)()),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}))},migrate:Hd},Od={attributes:Dd,supports:Fd,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:n,mediaPosition:a,mediaType:o,mediaUrl:r,mediaWidth:l,mediaId:i,verticalAlignment:s,imageFill:c,focalPoint:m,linkClass:u,href:p,linkTarget:d,rel:g}=e,h=e.mediaSizeSlug||Nd,b=g||void 0,_=ut()({[`wp-image-${i}`]:i&&"image"===o,[`size-${h}`]:i&&"image"===o});let y=(0,Ke.createElement)("img",{src:r,alt:n,className:_||null});p&&(y=(0,Ke.createElement)("a",{className:u,href:p,target:d,rel:b},y));const v={image:()=>y,video:()=>(0,Ke.createElement)("video",{controls:!0,src:r})},f=ut()({"has-media-on-the-right":"right"===a,"is-stacked-on-mobile":t,[`is-vertically-aligned-${s}`]:s,"is-image-fill":c}),k=c?Md(r,m):{};let x;l!==zd&&(x="right"===a?`auto ${l}%`:`${l}% auto`);const w={gridTemplateColumns:x};return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:f,style:w})},(0,Ke.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||Rd)()),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}))},migrate:Hd},Gd={attributes:{...Ld,isStackedOnMobile:{type:"boolean",default:!0},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:(0,jt.compose)(Ad,Hd),save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,isStackedOnMobile:a,mediaAlt:o,mediaPosition:r,mediaType:l,mediaUrl:i,mediaWidth:s,mediaId:c,verticalAlignment:m,imageFill:u,focalPoint:p,linkClass:d,href:g,linkTarget:h,rel:b}=e,_=b||void 0;let y=(0,Ke.createElement)("img",{src:i,alt:o,className:c&&"image"===l?`wp-image-${c}`:null});g&&(y=(0,Ke.createElement)("a",{className:d,href:g,target:h,rel:_},y));const v={image:()=>y,video:()=>(0,Ke.createElement)("video",{controls:!0,src:i})},f=(0,nt.getColorClassName)("background-color",t),k=ut()({"has-media-on-the-right":"right"===r,"has-background":f||n,[f]:f,"is-stacked-on-mobile":a,[`is-vertically-aligned-${m}`]:m,"is-image-fill":u}),x=u?Md(i,p):{};let w;s!==zd&&(w="right"===r?`auto ${s}%`:`${s}% auto`);const E={backgroundColor:f?void 0:n,gridTemplateColumns:w};return(0,Ke.createElement)("div",{className:k,style:E},(0,Ke.createElement)("figure",{className:"wp-block-media-text__media",style:x},(v[l]||Rd)()),(0,Ke.createElement)("div",{className:"wp-block-media-text__content"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))}},Ud={attributes:{...Ld,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:(0,jt.compose)(Ad,Hd),save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,isStackedOnMobile:a,mediaAlt:o,mediaPosition:r,mediaType:l,mediaUrl:i,mediaWidth:s,mediaId:c,verticalAlignment:m,imageFill:u,focalPoint:p}=e,d={image:()=>(0,Ke.createElement)("img",{src:i,alt:o,className:c&&"image"===l?`wp-image-${c}`:null}),video:()=>(0,Ke.createElement)("video",{controls:!0,src:i})},g=(0,nt.getColorClassName)("background-color",t),h=ut()({"has-media-on-the-right":"right"===r,[g]:g,"is-stacked-on-mobile":a,[`is-vertically-aligned-${m}`]:m,"is-image-fill":u}),b=u?Md(i,p):{};let _;s!==zd&&(_="right"===r?`auto ${s}%`:`${s}% auto`);const y={backgroundColor:g?void 0:n,gridTemplateColumns:_};return(0,Ke.createElement)("div",{className:h,style:y},(0,Ke.createElement)("figure",{className:"wp-block-media-text__media",style:b},(d[l]||Rd)()),(0,Ke.createElement)("div",{className:"wp-block-media-text__content"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))}},qd={attributes:{...Ld,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"}},migrate:Hd,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,isStackedOnMobile:a,mediaAlt:o,mediaPosition:r,mediaType:l,mediaUrl:i,mediaWidth:s}=e,c={image:()=>(0,Ke.createElement)("img",{src:i,alt:o}),video:()=>(0,Ke.createElement)("video",{controls:!0,src:i})},m=(0,nt.getColorClassName)("background-color",t),u=ut()({"has-media-on-the-right":"right"===r,[m]:m,"is-stacked-on-mobile":a});let p;s!==zd&&(p="right"===r?`auto ${s}%`:`${s}% auto`);const d={backgroundColor:m?void 0:n,gridTemplateColumns:p};return(0,Ke.createElement)("div",{className:u,style:d},(0,Ke.createElement)("figure",{className:"wp-block-media-text__media"},(c[l]||Rd)()),(0,Ke.createElement)("div",{className:"wp-block-media-text__content"},(0,Ke.createElement)(nt.InnerBlocks.Content,null)))}},jd=[Vd,$d,Od,Gd,Ud,qd],Wd=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})),Zd=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})),Qd=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,Ke.createElement)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})),Kd=["image","video"],Yd=()=>{};function Jd(e,t){return e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${Math.round(100*t.x)}% ${Math.round(100*t.y)}%`:"50% 50%"}:{}}const Xd=(0,_t.forwardRef)((({isSelected:e,isStackedOnMobile:t,...n},a)=>{const o=(0,jt.useViewportMatch)("small","<");return(0,Ke.createElement)(et.ResizableBox,{ref:a,showHandle:e&&(!o||!t),...n})}));function eg({mediaId:e,mediaUrl:t,onSelectMedia:n}){return(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(nt.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:Kd,accept:"image/*,video/*",onSelect:n}))}function tg({className:e,mediaUrl:t,onSelectMedia:n}){const{createErrorNotice:a}=(0,gt.useDispatch)(Pt.store);return(0,Ke.createElement)(nt.MediaPlaceholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:Qd}),labels:{title:(0,tt.__)("Media area")},className:e,onSelect:n,accept:"image/*,video/*",allowedTypes:Kd,onError:e=>{a(e,{type:"snackbar"})},disableMediaButtons:t})}const ng=(0,_t.forwardRef)((function(e,t){const{className:n,commitWidthChange:a,focalPoint:o,imageFill:r,isSelected:l,isStackedOnMobile:i,mediaAlt:s,mediaId:c,mediaPosition:m,mediaType:u,mediaUrl:p,mediaWidth:d,onSelectMedia:g,onWidthChange:h,enableResize:b}=e,_=!c&&(0,It.isBlobURL)(p),{toggleSelection:y}=(0,gt.useDispatch)(nt.store);if(p){const v=()=>{y(!1)},f=(e,t,n)=>{h(parseInt(n.style.width))},k=(e,t,n)=>{y(!0),a(parseInt(n.style.width))},x={right:b&&"left"===m,left:b&&"right"===m},w="image"===u&&r?Jd(p,o):{},E={image:()=>(0,Ke.createElement)("img",{src:p,alt:s}),video:()=>(0,Ke.createElement)("video",{controls:!0,src:p})};return(0,Ke.createElement)(Xd,{as:"figure",className:ut()(n,"editor-media-container__resizer",{"is-transient":_}),style:w,size:{width:d+"%"},minWidth:"10%",maxWidth:"100%",enable:x,onResizeStart:v,onResize:f,onResizeStop:k,axis:"x",isSelected:l,isStackedOnMobile:i,ref:t},(0,Ke.createElement)(eg,{onSelectMedia:g,mediaUrl:p,mediaId:c}),(E[u]||Yd)(),_&&(0,Ke.createElement)(et.Spinner,null),(0,Ke.createElement)(tg,{...e}))}return(0,Ke.createElement)(tg,{...e})})),ag=e=>Math.max(15,Math.min(e,85));function og(e,t){return e?.media_details?.sizes?.[t]?.source_url}const rg=function({attributes:e,isSelected:t,setAttributes:n}){const{focalPoint:a,href:o,imageFill:r,isStackedOnMobile:l,linkClass:i,linkDestination:s,linkTarget:c,mediaAlt:m,mediaId:u,mediaPosition:p,mediaType:d,mediaUrl:g,mediaWidth:h,rel:b,verticalAlignment:_,allowedBlocks:y}=e,v=e.mediaSizeSlug||Nd,{imageSizes:f,image:k}=(0,gt.useSelect)((e=>{const{getSettings:n}=e(nt.store);return{image:u&&t?e(dt.store).getMedia(u,{context:"view"}):null,imageSizes:n()?.imageSizes}}),[t,u]),x=(0,_t.useRef)(),w=e=>{const{style:t}=x.current.resizable,{x:n,y:a}=e;t.backgroundPosition=`${100*n}% ${100*a}%`},[E,C]=(0,_t.useState)(null),S=function({attributes:{linkDestination:e,href:t},setAttributes:n}){return a=>{if(!a||!a.url)return void n({mediaAlt:void 0,mediaId:void 0,mediaType:void 0,mediaUrl:void 0,mediaLink:void 0,href:void 0,focalPoint:void 0});let o,r;(0,It.isBlobURL)(a.url)&&(a.type=(0,It.getBlobTypeByURL)(a.url)),o=a.media_type?"image"===a.media_type?"image":"video":a.type,"image"===o&&(r=a.sizes?.large?.url||a.media_details?.sizes?.large?.source_url);let l=t;e===Td&&(l=a.url),e===Id&&(l=a.link),n({mediaAlt:a.alt,mediaId:a.id,mediaType:o,mediaUrl:r||a.url,mediaLink:a.link||void 0,href:l,focalPoint:void 0})}}({attributes:e,setAttributes:n}),B=e=>{n({mediaWidth:ag(e)}),C(null)},N=ut()({"has-media-on-the-right":"right"===p,"is-selected":t,"is-stacked-on-mobile":l,[`is-vertically-aligned-${_}`]:_,"is-image-fill":r}),T=`${E||h}%`,I="right"===p?`1fr ${T}`:`${T} 1fr`,P={gridTemplateColumns:I,msGridColumns:I},M=f.filter((({slug:e})=>og(k,e))).map((({name:e,slug:t})=>({value:t,label:e}))),z=(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Media width"),value:E||h,onChange:B,min:15,max:85}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Stack on mobile"),checked:l,onChange:()=>n({isStackedOnMobile:!l})}),"image"===d&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Crop image to fill"),checked:!!r,onChange:()=>n({imageFill:!r})}),r&&g&&"image"===d&&(0,Ke.createElement)(et.FocalPointPicker,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Focal point"),url:g,value:a,onChange:e=>n({focalPoint:e}),onDragStart:w,onDrag:w}),"image"===d&&(0,Ke.createElement)(et.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Alternative text"),value:m,onChange:e=>{n({mediaAlt:e})},help:(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,tt.__)("Describe the purpose of the image.")),(0,Ke.createElement)("br",null),(0,tt.__)("Leave empty if decorative."))}),"image"===d&&(0,Ke.createElement)(nt.__experimentalImageSizeControl,{onChangeImage:e=>{const t=og(k,e);if(!t)return null;n({mediaUrl:t,mediaSizeSlug:e})},slug:v,imageSizeOptions:M,isResizable:!1,imageSizeHelp:(0,tt.__)("Select the size of the source image.")})),R=(0,nt.useBlockProps)({className:N,style:P}),A=(0,nt.useInnerBlocksProps)({className:"wp-block-media-text__content"},{template:Pd,allowedBlocks:y}),H=(0,nt.useBlockEditingMode)();return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,z),(0,Ke.createElement)(nt.BlockControls,{group:"block"},"default"===H&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockVerticalAlignmentControl,{onChange:e=>{n({verticalAlignment:e})},value:_}),(0,Ke.createElement)(et.ToolbarButton,{icon:Wd,title:(0,tt.__)("Show media on left"),isActive:"left"===p,onClick:()=>n({mediaPosition:"left"})}),(0,Ke.createElement)(et.ToolbarButton,{icon:Zd,title:(0,tt.__)("Show media on right"),isActive:"right"===p,onClick:()=>n({mediaPosition:"right"})})),"image"===d&&(0,Ke.createElement)(nt.__experimentalImageURLInputUI,{url:o||"",onChangeUrl:e=>{n(e)},linkDestination:s,mediaType:d,mediaUrl:k&&k.source_url,mediaLink:k&&k.link,linkTarget:c,linkClass:i,rel:b})),(0,Ke.createElement)("div",{...R},"right"===p&&(0,Ke.createElement)("div",{...A}),(0,Ke.createElement)(ng,{className:"wp-block-media-text__media",onSelectMedia:S,onWidthChange:e=>{C(ag(e))},commitWidthChange:B,ref:x,enableResize:"default"===H,focalPoint:a,imageFill:r,isSelected:t,isStackedOnMobile:l,mediaAlt:m,mediaId:u,mediaPosition:p,mediaType:d,mediaUrl:g,mediaWidth:h}),"right"!==p&&(0,Ke.createElement)("div",{...A})))},lg=()=>{};const ig={from:[{type:"block",blocks:["core/image"],transform:({alt:e,url:t,id:n,anchor:a})=>(0,Qe.createBlock)("core/media-text",{mediaAlt:e,mediaId:n,mediaUrl:t,mediaType:"image",anchor:a})},{type:"block",blocks:["core/video"],transform:({src:e,id:t,anchor:n})=>(0,Qe.createBlock)("core/media-text",{mediaId:t,mediaUrl:e,mediaType:"video",anchor:n})},{type:"block",blocks:["core/cover"],transform:({align:e,alt:t,anchor:n,backgroundType:a,customGradient:o,customOverlayColor:r,gradient:l,id:i,overlayColor:s,style:c,textColor:m,url:u},p)=>{let d={};return o?d={style:{color:{gradient:o}}}:r&&(d={style:{color:{background:r}}}),c?.color?.text&&(d.style={color:{...d.style?.color,text:c.color.text}}),(0,Qe.createBlock)("core/media-text",{align:e,anchor:n,backgroundColor:s,gradient:l,mediaAlt:t,mediaId:i,mediaType:a,mediaUrl:u,textColor:m,...d},p)}}],to:[{type:"block",blocks:["core/image"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"image"===e,transform:({mediaAlt:e,mediaId:t,mediaUrl:n,anchor:a})=>(0,Qe.createBlock)("core/image",{alt:e,id:t,url:n,anchor:a})},{type:"block",blocks:["core/video"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"video"===e,transform:({mediaId:e,mediaUrl:t,anchor:n})=>(0,Qe.createBlock)("core/video",{id:e,src:t,anchor:n})},{type:"block",blocks:["core/cover"],transform:({align:e,anchor:t,backgroundColor:n,focalPoint:a,gradient:o,mediaAlt:r,mediaId:l,mediaType:i,mediaUrl:s,style:c,textColor:m},u)=>{const p={};c?.color?.gradient?p.customGradient=c.color.gradient:c?.color?.background&&(p.customOverlayColor=c.color.background),c?.color?.text&&(p.style={color:{text:c.color.text}});const d={align:e,alt:r,anchor:t,backgroundType:i,dimRatio:s?50:100,focalPoint:a,gradient:o,id:l,overlayColor:n,textColor:m,url:s,...p};return(0,Qe.createBlock)("core/cover",d,u)}}]},sg=ig,cg={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/media-text",title:"Media & Text",category:"media",description:"Set media and words side-by-side for a richer layout.",keywords:["image","video"],textdomain:"default",attributes:{align:{type:"string",default:"none"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:"",__experimentalRole:"content"},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number",__experimentalRole:"content"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src",__experimentalRole:"content"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href",__experimentalRole:"content"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},mediaType:{type:"string",__experimentalRole:"content"},mediaWidth:{type:"number",default:50},mediaSizeSlug:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"},allowedBlocks:{type:"array"}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},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}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-media-text-editor",style:"wp-block-media-text"},{name:mg}=cg,ug={icon:Bd,example:{viewportWidth:601,attributes:{mediaType:"image",mediaUrl:"https://s.w.org/images/core/5.3/Biologia_Centrali-Americana_-_Cantorchilus_semibadius_1902.jpg"},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,tt.__)("The wren<br>Earns his living<br>Noiselessly.")}},{name:"core/paragraph",attributes:{content:(0,tt.__)("— Kobayashi Issa (一茶)")}}]},transforms:sg,edit:rg,save:function({attributes:e}){const{isStackedOnMobile:t,mediaAlt:n,mediaPosition:a,mediaType:o,mediaUrl:r,mediaWidth:l,mediaId:i,verticalAlignment:s,imageFill:c,focalPoint:m,linkClass:u,href:p,linkTarget:d,rel:g}=e,h=e.mediaSizeSlug||Nd,b=g||void 0,_=ut()({[`wp-image-${i}`]:i&&"image"===o,[`size-${h}`]:i&&"image"===o});let y=(0,Ke.createElement)("img",{src:r,alt:n,className:_||null});p&&(y=(0,Ke.createElement)("a",{className:u,href:p,target:d,rel:b},y));const v={image:()=>y,video:()=>(0,Ke.createElement)("video",{controls:!0,src:r})},f=ut()({"has-media-on-the-right":"right"===a,"is-stacked-on-mobile":t,[`is-vertically-aligned-${s}`]:s,"is-image-fill":c}),k=c?Jd(r,m):{};let x;50!==l&&(x="right"===a?`auto ${l}%`:`${l}% auto`);const w={gridTemplateColumns:x};return"right"===a?(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:f,style:w})},(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,Ke.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||lg)())):(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:f,style:w})},(0,Ke.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||lg)()),(0,Ke.createElement)("div",{...nt.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}))},deprecated:jd},pg=()=>Xe({name:mg,metadata:cg,settings:ug});const dg=(0,gt.withDispatch)(((e,{clientId:t,attributes:n})=>{const{replaceBlock:a}=e(nt.store);return{convertToHTML(){a(t,(0,Qe.createBlock)("core/html",{content:n.originalUndelimitedContent}))}}}))((function({attributes:e,convertToHTML:t,clientId:n}){const{originalName:a,originalUndelimitedContent:o}=e,r=!!o,{hasFreeformBlock:l,hasHTMLBlock:i}=(0,gt.useSelect)((e=>{const{canInsertBlockType:t,getBlockRootClientId:a}=e(nt.store);return{hasFreeformBlock:t("core/freeform",a(n)),hasHTMLBlock:t("core/html",a(n))}}),[n]),s=[];let c;const m=(0,Ke.createElement)(et.Button,{key:"convert",onClick:t,variant:"primary"},(0,tt.__)("Keep as HTML"));return!r||l||a?r&&i?(c=(0,tt.sprintf)((0,tt.__)('Your site doesn’t include support for the "%s" block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely.'),a),s.push(m)):c=(0,tt.sprintf)((0,tt.__)('Your site doesn’t include support for the "%s" block. You can leave this block intact or remove it entirely.'),a):i?(c=(0,tt.__)("It appears you are trying to use the deprecated Classic block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely. Alternatively, you can refresh the page to use the Classic block."),s.push(m)):c=(0,tt.__)("It appears you are trying to use the deprecated Classic block. You can leave this block intact, or remove it entirely. Alternatively, you can refresh the page to use the Classic block."),(0,Ke.createElement)("div",{...(0,nt.useBlockProps)({className:"has-warning"})},(0,Ke.createElement)(nt.Warning,{actions:s},c),(0,Ke.createElement)(_t.RawHTML,null,(0,ac.safeHTML)(o)))})),gg=dg;const hg={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/missing",title:"Unsupported",category:"text",description:"Your site doesn’t include support for this block.",textdomain:"default",attributes:{originalName:{type:"string"},originalUndelimitedContent:{type:"string"},originalContent:{type:"string",source:"raw"}},supports:{className:!1,customClassName:!1,inserter:!1,html:!1,reusable:!1,interactivity:{clientNavigation:!0}}},{name:bg}=hg,_g={name:bg,__experimentalLabel(e,{context:t}){if("accessibility"===t){const{originalName:t}=e,n=t?(0,Qe.getBlockType)(t):void 0;return n?n.settings.title||t:""}},edit:gg,save:function({attributes:e}){return(0,Ke.createElement)(_t.RawHTML,null,e.originalContent)}},yg=()=>Xe({name:bg,metadata:hg,settings:_g}),vg=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z"})),fg=(0,tt.__)("Read more");const kg={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/more"===e.dataset.block,transform(e){const{customText:t,noTeaser:n}=e.dataset,a={};return t&&(a.customText=t),""===n&&(a.noTeaser=!0),(0,Qe.createBlock)("core/more",a)}}]},xg={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/more",title:"More",category:"design",description:"Content before this block will be shown in the excerpt on your archives page.",keywords:["read more"],textdomain:"default",attributes:{customText:{type:"string"},noTeaser:{type:"boolean",default:!1}},supports:{customClassName:!1,className:!1,html:!1,multiple:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-more-editor"},{name:wg}=xg,Eg={icon:vg,example:{},__experimentalLabel(e,{context:t}){const n=e?.metadata?.name;return"list-view"===t&&n?n:"accessibility"===t?e.customText:void 0},transforms:kg,edit:function({attributes:{customText:e,noTeaser:t},insertBlocksAfter:n,setAttributes:a}){const o={width:`${(e||fg).length+1.2}em`};return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Hide the excerpt on the full content page"),checked:!!t,onChange:()=>a({noTeaser:!t}),help:e=>e?(0,tt.__)("The excerpt is hidden."):(0,tt.__)("The excerpt is visible.")}))),(0,Ke.createElement)("div",{...(0,nt.useBlockProps)()},(0,Ke.createElement)("input",{"aria-label":(0,tt.__)("“Read more” link text"),type:"text",value:e,placeholder:fg,onChange:e=>{a({customText:""!==e.target.value?e.target.value:void 0})},onKeyDown:({keyCode:e})=>{e===fn.ENTER&&n([(0,Qe.createBlock)((0,Qe.getDefaultBlockName)())])},style:o})))},save:function({attributes:{customText:e,noTeaser:t}}){const n=e?`\x3c!--more ${e}--\x3e`:"\x3c!--more--\x3e",a=t?"\x3c!--noteaser--\x3e":"";return(0,Ke.createElement)(_t.RawHTML,null,[n,a].filter(Boolean).join("\n"))}},Cg=()=>Xe({name:wg,metadata:xg,settings:Eg}),Sg=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})),Bg=window.wp.a11y;const Ng=(0,_t.forwardRef)((function({icon:e,size:t=24,...n},a){return(0,_t.cloneElement)(e,{width:t,height:t,...n,ref:a})})),Tg=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),Ig={name:"core/navigation-link"},Pg=["core/navigation-link/page","core/navigation-link"],Mg={per_page:100,status:["publish","draft"],order:"desc",orderby:"date"},zg=["postType","wp_navigation",Mg];function Rg(e){const t=(0,dt.useResourcePermissions)("navigation",e),{navigationMenu:n,isNavigationMenuResolved:a,isNavigationMenuMissing:o}=(0,gt.useSelect)((t=>function(e,t){if(!t)return{isNavigationMenuResolved:!1,isNavigationMenuMissing:!0};const{getEntityRecord:n,getEditedEntityRecord:a,hasFinishedResolution:o}=e(dt.store),r=["postType","wp_navigation",t],l=n(...r),i=a(...r),s=o("getEditedEntityRecord",r),c="publish"===i.status||"draft"===i.status;return{isNavigationMenuResolved:s,isNavigationMenuMissing:s&&(!l||!c),navigationMenu:c?i:null}}(t,e)),[e]),{canCreate:r,canUpdate:l,canDelete:i,isResolving:s,hasResolved:c}=t,{records:m,isResolving:u,hasResolved:p}=(0,dt.useEntityRecords)("postType","wp_navigation",Mg);return{navigationMenu:n,isNavigationMenuResolved:a,isNavigationMenuMissing:o,navigationMenus:m,isResolvingNavigationMenus:u,hasResolvedNavigationMenus:p,canSwitchNavigationMenu:e?m?.length>1:m?.length>0,canUserCreateNavigationMenu:r,isResolvingCanUserCreateNavigationMenu:s,hasResolvedCanUserCreateNavigationMenu:c,canUserUpdateNavigationMenu:l,hasResolvedCanUserUpdateNavigationMenu:e?c:void 0,canUserDeleteNavigationMenu:i,hasResolvedCanUserDeleteNavigationMenu:e?c:void 0}}function Ag(e){const{records:t,isResolving:n,hasResolved:a}=(0,dt.useEntityRecords)("root","menu",{per_page:-1,context:"view"}),{records:o,isResolving:r,hasResolved:l}=(0,dt.useEntityRecords)("postType","page",{parent:0,order:"asc",orderby:"id",per_page:-1,context:"view"}),{records:i,hasResolved:s}=(0,dt.useEntityRecords)("root","menuItem",{menus:e,per_page:-1,context:"view"},{enabled:!!e});return{pages:o,isResolvingPages:r,hasResolvedPages:l,hasPages:!(!l||!o?.length),menus:t,isResolvingMenus:n,hasResolvedMenus:a,hasMenus:!(!a||!t?.length),menuItems:i,hasResolvedMenuItems:s}}const Hg=({isVisible:e=!0})=>(0,Ke.createElement)("div",{"aria-hidden":!e||void 0,className:"wp-block-navigation-placeholder__preview"},(0,Ke.createElement)("div",{className:"wp-block-navigation-placeholder__actions__indicator"},(0,Ke.createElement)(Ng,{icon:Sg}),(0,tt.__)("Navigation"))),Lg=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));const Dg=function({currentMenuId:e,onSelectNavigationMenu:t,onSelectClassicMenu:n,onCreateNew:a,actionLabel:o,createNavigationMenuIsSuccess:r,createNavigationMenuIsError:l}){const i=(0,tt.__)("Create from '%s'"),[s,c]=(0,_t.useState)(!1);o=o||i;const{menus:m}=Ag(),{navigationMenus:u,isResolvingNavigationMenus:p,hasResolvedNavigationMenus:d,canUserCreateNavigationMenu:g,canSwitchNavigationMenu:h}=Rg(),[b]=(0,dt.useEntityProp)("postType","wp_navigation","title"),_=(0,_t.useMemo)((()=>u?.map((({id:e,title:t,status:n},a)=>{const r=function(e,t,n){return e?"publish"===n?(0,Jn.decodeEntities)(e):(0,tt.sprintf)((0,tt.__)("%1$s (%2$s)"),(0,Jn.decodeEntities)(e),n):(0,tt.sprintf)((0,tt.__)("(no title %s)"),t)}(t?.rendered,a+1,n);return{value:e,label:r,ariaLabel:(0,tt.sprintf)(o,r),disabled:s||p||!d}}))||[]),[u,o,p,d,s]),y=!!u?.length,v=!!m?.length,f=!!h,k=!!g,x=y&&!e,w=!y&&d,E=d&&null===e;let C="";C=p?(0,tt.__)("Loading…"):x||w||E?(0,tt.__)("Choose or create a Navigation menu"):b,(0,_t.useEffect)((()=>{s&&(r||l)&&c(!1)}),[d,r,g,l,s,E,w,x]);const S=(0,Ke.createElement)(et.DropdownMenu,{label:C,icon:Lg,toggleProps:{isSmall:!0}},(({onClose:o})=>(0,Ke.createElement)(Ke.Fragment,null,f&&y&&(0,Ke.createElement)(et.MenuGroup,{label:(0,tt.__)("Menus")},(0,Ke.createElement)(et.MenuItemsChoice,{value:e,onSelect:e=>{t(e),o()},choices:_})),k&&v&&(0,Ke.createElement)(et.MenuGroup,{label:(0,tt.__)("Import Classic Menus")},m?.map((e=>{const t=(0,Jn.decodeEntities)(e.name);return(0,Ke.createElement)(et.MenuItem,{onClick:async()=>{c(!0),await n(e),c(!1),o()},key:e.id,"aria-label":(0,tt.sprintf)(i,t),disabled:s||p||!d},t)}))),g&&(0,Ke.createElement)(et.MenuGroup,{label:(0,tt.__)("Tools")},(0,Ke.createElement)(et.MenuItem,{onClick:async()=>{c(!0),await a(),c(!1),o()},disabled:s||p||!d},(0,tt.__)("Create new menu"))))));return S};function Fg({isSelected:e,currentMenuId:t,clientId:n,canUserCreateNavigationMenu:a=!1,isResolvingCanUserCreateNavigationMenu:o,onSelectNavigationMenu:r,onSelectClassicMenu:l,onCreateEmpty:i}){const{isResolvingMenus:s,hasResolvedMenus:c}=Ag();(0,_t.useEffect)((()=>{e&&(s&&(0,Bg.speak)((0,tt.__)("Loading navigation block setup options…")),c&&(0,Bg.speak)((0,tt.__)("Navigation block setup options ready.")))}),[c,s,e]);const m=s&&o;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.Placeholder,{className:"wp-block-navigation-placeholder"},(0,Ke.createElement)(Hg,{isVisible:!e}),(0,Ke.createElement)("div",{"aria-hidden":!e||void 0,className:"wp-block-navigation-placeholder__controls"},(0,Ke.createElement)("div",{className:"wp-block-navigation-placeholder__actions"},(0,Ke.createElement)("div",{className:"wp-block-navigation-placeholder__actions__indicator"},(0,Ke.createElement)(Ng,{icon:Sg})," ",(0,tt.__)("Navigation")),(0,Ke.createElement)("hr",null),m&&(0,Ke.createElement)(et.Spinner,null),(0,Ke.createElement)(Dg,{currentMenuId:t,clientId:n,onSelectNavigationMenu:r,onSelectClassicMenu:l}),(0,Ke.createElement)("hr",null),a&&(0,Ke.createElement)(et.Button,{variant:"tertiary",onClick:i},(0,tt.__)("Start empty"))))))}const Vg=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"}));function $g({icon:e}){return"menu"===e?(0,Ke.createElement)(Ng,{icon:Vg}):(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false"},(0,Ke.createElement)(Ye.Rect,{x:"4",y:"7.5",width:"16",height:"1.5"}),(0,Ke.createElement)(Ye.Rect,{x:"4",y:"15",width:"16",height:"1.5"}))}function Og({children:e,id:t,isOpen:n,isResponsive:a,onToggle:o,isHiddenByDefault:r,overlayBackgroundColor:l,overlayTextColor:i,hasIcon:s,icon:c}){if(!a)return e;const m=ut()("wp-block-navigation__responsive-container",{"has-text-color":!!i.color||!!i?.class,[(0,nt.getColorClassName)("color",i?.slug)]:!!i?.slug,"has-background":!!l.color||l?.class,[(0,nt.getColorClassName)("background-color",l?.slug)]:!!l?.slug,"is-menu-open":n,"hidden-by-default":r}),u={color:!i?.slug&&i?.color,backgroundColor:!l?.slug&&l?.color&&l.color},p=ut()("wp-block-navigation__responsive-container-open",{"always-shown":r}),d=`${t}-modal`,g={className:"wp-block-navigation__responsive-dialog",...n&&{role:"dialog","aria-modal":!0,"aria-label":(0,tt.__)("Menu")}};return(0,Ke.createElement)(Ke.Fragment,null,!n&&(0,Ke.createElement)(et.Button,{"aria-haspopup":"true","aria-label":s&&(0,tt.__)("Open menu"),className:p,onClick:()=>o(!0)},s&&(0,Ke.createElement)($g,{icon:c}),!s&&(0,tt.__)("Menu")),(0,Ke.createElement)("div",{className:m,style:u,id:d},(0,Ke.createElement)("div",{className:"wp-block-navigation__responsive-close",tabIndex:"-1"},(0,Ke.createElement)("div",{...g},(0,Ke.createElement)(et.Button,{className:"wp-block-navigation__responsive-container-close","aria-label":s&&(0,tt.__)("Close menu"),onClick:()=>o(!1)},s&&(0,Ke.createElement)(Ng,{icon:Tg}),!s&&(0,tt.__)("Close")),(0,Ke.createElement)("div",{className:"wp-block-navigation__responsive-container-content",id:`${d}-content`},e)))))}function Gg({clientId:e,hasCustomPlaceholder:t,orientation:n,templateLock:a}){const{isImmediateParentOfSelectedBlock:o,selectedBlockHasChildren:r,isSelected:l}=(0,gt.useSelect)((t=>{const{getBlockCount:n,hasSelectedInnerBlock:a,getSelectedBlockClientId:o}=t(nt.store),r=o();return{isImmediateParentOfSelectedBlock:a(e,!1),selectedBlockHasChildren:!!n(r),isSelected:r===e}}),[e]),[i,s,c]=(0,dt.useEntityBlockEditor)("postType","wp_navigation"),m=l||o&&!r,u=(0,_t.useMemo)((()=>(0,Ke.createElement)(Hg,null)),[]),p=!t&&!!!i?.length&&!l,d=(0,nt.useInnerBlocksProps)({className:"wp-block-navigation__container"},{value:i,onInput:s,onChange:c,prioritizedInserterBlocks:Pg,defaultBlock:Ig,directInsert:!0,orientation:n,templateLock:a,renderAppender:!!(l||o&&!r||m)&&nt.InnerBlocks.ButtonBlockAppender,placeholder:p?u:void 0,__experimentalCaptureToolbars:!0,__unstableDisableLayoutClassNames:!0});return(0,Ke.createElement)("div",{...d})}function Ug(){const[e,t]=(0,dt.useEntityProp)("postType","wp_navigation","title");return(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Menu name"),value:e,onChange:t})}const qg=(e,t,n)=>{if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const a in e){if(!t.hasOwnProperty(a))return!1;if(n&&n(a,e))return!0;if(!qg(e[a],t[a],n))return!1}return!0}return!1},jg={};function Wg({blocks:e,createNavigationMenu:t,hasSelection:n}){const a=(0,_t.useRef)();(0,_t.useEffect)((()=>{a?.current||(a.current=e)}),[e]);const o=function(e,t){return!qg(e,t,((e,t)=>{if("core/page-list"===t?.name&&"innerBlocks"===e)return!0}))}(a?.current,e),r=(0,_t.useContext)(et.Disabled.Context),l=(0,nt.useInnerBlocksProps)({className:"wp-block-navigation__container"},{renderAppender:!!n&&void 0,defaultBlock:Ig,directInsert:!0}),{isSaving:i,hasResolvedAllNavigationMenus:s}=(0,gt.useSelect)((e=>{if(r)return jg;const{hasFinishedResolution:t,isSavingEntityRecord:n}=e(dt.store);return{isSaving:n("postType","wp_navigation"),hasResolvedAllNavigationMenus:t("getEntityRecords",zg)}}),[r]);(0,_t.useEffect)((()=>{!r&&!i&&s&&n&&o&&t(null,e)}),[e,t,r,i,s,o,n]);const c=i?et.Disabled:"div";return(0,Ke.createElement)(c,{...l})}function Zg({onDelete:e}){const[t,n]=(0,_t.useState)(!1),a=(0,dt.useEntityId)("postType","wp_navigation"),[o]=(0,dt.useEntityProp)("postType","wp_navigation","title"),{deleteEntityRecord:r}=(0,gt.useDispatch)(dt.store);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.Button,{className:"wp-block-navigation-delete-menu-button",variant:"secondary",isDestructive:!0,onClick:()=>{n(!0)}},(0,tt.__)("Delete menu")),t&&(0,Ke.createElement)(et.Modal,{title:(0,tt.sprintf)((0,tt.__)("Delete %s"),o),onRequestClose:()=>n(!1)},(0,Ke.createElement)("p",null,(0,tt.__)("Are you sure you want to delete this navigation menu?")),(0,Ke.createElement)(et.__experimentalHStack,{justify:"right"},(0,Ke.createElement)(et.Button,{variant:"tertiary",onClick:()=>{n(!1)}},(0,tt.__)("Cancel")),(0,Ke.createElement)(et.Button,{variant:"primary",onClick:()=>{r("postType","wp_navigation",a,{force:!0}),e(o)}},(0,tt.__)("Confirm")))))}const Qg=function({name:e,message:t=""}={}){const n=(0,_t.useRef)(),{createWarningNotice:a,removeNotice:o}=(0,gt.useDispatch)(Pt.store);return[(0,_t.useCallback)((o=>{n.current||(n.current=e,a(o||t,{id:n.current,type:"snackbar"}))}),[n,a,t,e]),(0,_t.useCallback)((()=>{n.current&&(o(n.current),n.current=null)}),[n,o])]};function Kg({setAttributes:e,hasIcon:t,icon:n}){return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show icon button"),help:(0,tt.__)("Configure the visual appearance of the button that toggles the overlay menu."),onChange:t=>e({hasIcon:t}),checked:t}),(0,Ke.createElement)(et.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Icon"),value:n,onChange:t=>e({icon:t}),isBlock:!0},(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"handle","aria-label":(0,tt.__)("handle"),label:(0,Ke.createElement)($g,{icon:"handle"})}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"menu","aria-label":(0,tt.__)("menu"),label:(0,Ke.createElement)($g,{icon:"menu"})})))}function Yg(e){if(!e)return null;const t=Jg(function(e,t="id",n="parent"){const a=Object.create(null),o=[];for(const r of e)a[r[t]]={...r,children:[]},r[n]?(a[r[n]]=a[r[n]]||{},a[r[n]].children=a[r[n]].children||[],a[r[n]].children.push(a[r[t]])):o.push(a[r[t]]);return o}(e));return(0,_i.applyFilters)("blocks.navigation.__unstableMenuItemsToBlocks",t,e)}function Jg(e,t=0){let n={};const a=[...e].sort(((e,t)=>e.menu_order-t.menu_order)),o=a.map((e=>{if("block"===e.type){const[t]=(0,Qe.parse)(e.content.raw);return t||(0,Qe.createBlock)("core/freeform",{content:e.content})}const a=e.children?.length?"core/navigation-submenu":"core/navigation-link",o=function({title:e,xfn:t,classes:n,attr_title:a,object:o,object_id:r,description:l,url:i,type:s,target:c},m,u){o&&"post_tag"===o&&(o="tag");return{label:e?.rendered||"",...o?.length&&{type:o},kind:s?.replace("_","-")||"custom",url:i||"",...t?.length&&t.join(" ").trim()&&{rel:t.join(" ").trim()},...n?.length&&n.join(" ").trim()&&{className:n.join(" ").trim()},...a?.length&&{title:a},...r&&"custom"!==o&&{id:r},...l?.length&&{description:l},..."_blank"===c&&{opensInNewTab:!0},..."core/navigation-submenu"===m&&{isTopLevelItem:0===u},..."core/navigation-link"===m&&{isTopLevelLink:0===u}}}(e,a,t),{innerBlocks:r=[],mapping:l={}}=e.children?.length?Jg(e.children,t+1):{};n={...n,...l};const i=(0,Qe.createBlock)(a,o,r);return n[e.id]=i.clientId,i}));return{innerBlocks:o,mapping:n}}const Xg="success",eh="error",th="pending";let nh=null;const ah=function(e,{throwOnError:t=!1}={}){const n=(0,gt.useRegistry)(),{editEntityRecord:a}=(0,gt.useDispatch)(dt.store),[o,r]=(0,_t.useState)("idle"),[l,i]=(0,_t.useState)(null),s=(0,_t.useCallback)((async(t,o,r="publish")=>{let l,i;try{i=await n.resolveSelect(dt.store).getMenuItems({menus:t,per_page:-1,context:"view"})}catch(e){throw new Error((0,tt.sprintf)((0,tt.__)('Unable to fetch classic menu "%s" from API.'),o),{cause:e})}if(null===i)throw new Error((0,tt.sprintf)((0,tt.__)('Unable to fetch classic menu "%s" from API.'),o));const{innerBlocks:s}=Yg(i);try{l=await e(o,s,r),await a("postType","wp_navigation",l.id,{status:"publish"},{throwOnError:!0})}catch(e){throw new Error((0,tt.sprintf)((0,tt.__)('Unable to create Navigation Menu "%s".'),o),{cause:e})}return l}),[e,a,n]);return{convert:(0,_t.useCallback)((async(e,n,a)=>{if(nh!==e)return nh=e,e&&n?(r(th),i(null),await s(e,n,a).then((e=>(r(Xg),nh=null,e))).catch((e=>{if(i(e?.message),r(eh),nh=null,t)throw new Error((0,tt.sprintf)((0,tt.__)('Unable to create Navigation Menu "%s".'),n),{cause:e})}))):(i("Unable to convert menu. Missing menu details."),void r(eh))}),[s,t]),status:o,error:l}};function oh(e,t){return e&&t?e+"//"+t:null}const rh=["postType","wp_navigation",{status:"draft",per_page:-1}],lh=["postType","wp_navigation",{per_page:-1,status:"publish"}];function ih(e){const t=(0,_t.useContext)(et.Disabled.Context),n=function(e){return(0,gt.useSelect)((t=>{if(!e)return;const{getBlock:n,getBlockParentsByBlockName:a}=t(nt.store),o=a(e,"core/template-part",!0);if(!o?.length)return;const r=t("core/editor").__experimentalGetDefaultTemplatePartAreas(),{getCurrentTheme:l,getEditedEntityRecord:i}=t(dt.store);for(const e of o){const t=n(e),{theme:a=l()?.stylesheet,slug:o}=t.attributes,s=i("postType","wp_template_part",oh(a,o));if(s?.area)return r.find((e=>"uncategorized"!==e.area&&e.area===s.area))?.label}}),[e])}(t?void 0:e),a=(0,gt.useRegistry)();return(0,_t.useCallback)((async()=>{if(t)return"";const{getEntityRecords:e}=a.resolveSelect(dt.store),[o,r]=await Promise.all([e(...rh),e(...lh)]),l=n?(0,tt.sprintf)((0,tt.__)("%s navigation"),n):(0,tt.__)("Navigation"),i=[...o,...r].reduce(((e,t)=>t?.title?.raw?.startsWith(l)?e+1:e),0);return(i>0?`${l} ${i+1}`:l)||""}),[t,n,a])}const sh="success",ch="error",mh="pending",uh="idle";const ph=[];function dh(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function gh(e,t,n){if(!e)return;t(dh(e).color);let a=e,o=dh(a).backgroundColor;for(;"rgba(0, 0, 0, 0)"===o&&a.parentNode&&a.parentNode.nodeType===a.parentNode.ELEMENT_NODE;)a=a.parentNode,o=dh(a).backgroundColor;n(o)}function hh(e,t){const{textColor:n,customTextColor:a,backgroundColor:o,customBackgroundColor:r,overlayTextColor:l,customOverlayTextColor:i,overlayBackgroundColor:s,customOverlayBackgroundColor:c,style:m}=e,u={};return t&&i?u.customTextColor=i:t&&l?u.textColor=l:a?u.customTextColor=a:n?u.textColor=n:m?.color?.text&&(u.customTextColor=m.color.text),t&&c?u.customBackgroundColor=c:t&&s?u.backgroundColor=s:r?u.customBackgroundColor=r:o?u.backgroundColor=o:m?.color?.background&&(u.customTextColor=m.color.background),u}function bh(e){return{className:ut()("wp-block-navigation__submenu-container",{"has-text-color":!(!e.textColor&&!e.customTextColor),[`has-${e.textColor}-color`]:!!e.textColor,"has-background":!(!e.backgroundColor&&!e.customBackgroundColor),[`has-${e.backgroundColor}-background-color`]:!!e.backgroundColor}),style:{color:e.customTextColor,backgroundColor:e.customBackgroundColor}}}const _h=({className:e="",disabled:t,isMenuItem:n=!1})=>{let a=et.Button;return n&&(a=et.MenuItem),(0,Ke.createElement)(a,{variant:"link",disabled:t,className:e,href:(0,pt.addQueryArgs)("edit.php",{post_type:"wp_navigation"})},(0,tt.__)("Manage menus"))};const yh=function({onCreateNew:e}){return(0,Ke.createElement)(nt.Warning,null,(0,_t.createInterpolateElement)((0,tt.__)("Navigation menu has been deleted or is unavailable. <button>Create a new menu?</button>"),{button:(0,Ke.createElement)(et.Button,{onClick:e,variant:"link"})}))},vh=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z"})),fh=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),kh=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),xh={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},wh=["core/navigation-link","core/navigation-submenu"];function Eh({block:e,onClose:t,expandedState:n,expand:a,setInsertedBlock:o}){const{insertBlock:r,replaceBlock:l,replaceInnerBlocks:i}=(0,gt.useDispatch)(nt.store),s=e.clientId,c=!wh.includes(e.name);return(0,Ke.createElement)(et.MenuItem,{icon:vh,disabled:c,onClick:()=>{const c=(0,Qe.createBlock)("core/navigation-link");if("core/navigation-submenu"===e.name)r(c,e.innerBlocks.length,s,false);else{const t=(0,Qe.createBlock)("core/navigation-submenu",e.attributes,e.innerBlocks);l(s,t),i(t.clientId,[c],false)}o(c),n[e.clientId]||a(e.clientId),t()}},(0,tt.__)("Add submenu link"))}function Ch(e){const{block:t}=e,{clientId:n}=t,{moveBlocksDown:a,moveBlocksUp:o,removeBlocks:r}=(0,gt.useDispatch)(nt.store),l=(0,tt.sprintf)((0,tt.__)("Remove %s"),(0,nt.BlockTitle)({clientId:n,maximumLength:25})),i=(0,gt.useSelect)((e=>{const{getBlockRootClientId:t}=e(nt.store);return t(n)}),[n]);return(0,Ke.createElement)(et.DropdownMenu,{icon:Lg,label:(0,tt.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:xh,noIcons:!0,...e},(({onClose:s})=>(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.MenuGroup,null,(0,Ke.createElement)(et.MenuItem,{icon:fh,onClick:()=>{o([n],i),s()}},(0,tt.__)("Move up")),(0,Ke.createElement)(et.MenuItem,{icon:kh,onClick:()=>{a([n],i),s()}},(0,tt.__)("Move down")),(0,Ke.createElement)(Eh,{block:t,onClose:s,expanded:!0,expandedState:e.expandedState,expand:e.expand,setInsertedBlock:e.setInsertedBlock})),(0,Ke.createElement)(et.MenuGroup,null,(0,Ke.createElement)(et.MenuItem,{onClick:()=>{r([n],!1),s()}},l)))))}const Sh=window.wp.escapeHtml,Bh=(e={},t,n={})=>{const{label:a="",kind:o="",type:r=""}=n,{title:l="",url:i="",opensInNewTab:s,id:c,kind:m=o,type:u=r}=e,p=l.replace(/http(s?):\/\//gi,""),d=i.replace(/http(s?):\/\//gi,""),g=l&&l!==a&&p!==d?(0,Sh.escapeHTML)(l):a||(0,Sh.escapeHTML)(d),h="post_tag"===u?"tag":u.replace("-","_"),b=["post","page","tag","category"].indexOf(h)>-1,_=!m&&!b||"custom"===m?"custom":m;t({...i&&{url:encodeURI((0,pt.safeDecodeURI)(i))},...g&&{label:g},...void 0!==s&&{opensInNewTab:s},...c&&Number.isInteger(c)&&{id:c},..._&&{kind:_},...h&&"URL"!==h&&{type:h}})},Nh=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})),Th=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})),{PrivateQuickInserter:Ih}=Ft(nt.privateApis);function Ph(e,t){switch(e){case"post":case"page":return{type:"post",subtype:e};case"category":return{type:"term",subtype:"category"};case"tag":return{type:"term",subtype:"post_tag"};case"post_format":return{type:"post-format"};default:return"taxonomy"===t?{type:"term",subtype:e}:"post-type"===t?{type:"post",subtype:e}:{initialSuggestionsSearchOptions:{type:"post",subtype:"page",perPage:20}}}}function Mh({clientId:e,onBack:t,onSelectBlock:n}){const{rootBlockClientId:a}=(0,gt.useSelect)((t=>{const{getBlockRootClientId:n}=t(nt.store);return{rootBlockClientId:n(e)}}),[e]),o=(0,jt.useFocusOnMount)("firstElement"),r=(0,jt.useInstanceId)(nt.__experimentalLinkControl,"link-ui-block-inserter__title"),l=(0,jt.useInstanceId)(nt.__experimentalLinkControl,"link-ui-block-inserter__description");return e?(0,Ke.createElement)("div",{className:"link-ui-block-inserter",role:"dialog","aria-labelledby":r,"aria-describedby":l,ref:o},(0,Ke.createElement)(et.VisuallyHidden,null,(0,Ke.createElement)("h2",{id:r},(0,tt.__)("Add block")),(0,Ke.createElement)("p",{id:l},(0,tt.__)("Choose a block to add to your Navigation."))),(0,Ke.createElement)(et.Button,{className:"link-ui-block-inserter__back",icon:Nh,onClick:e=>{e.preventDefault(),t()},size:"small"},(0,tt.__)("Back")),(0,Ke.createElement)(Ih,{rootClientId:a,clientId:e,isAppender:!1,prioritizePatterns:!1,selectBlockOnInsert:!0,hasSearch:!1,onSelect:n})):null}function zh(e){const[t,n]=(0,_t.useState)(!1),[a,o]=(0,_t.useState)(!1),[r,l]=(0,_t.useState)(!0),{saveEntityRecord:i}=(0,gt.useDispatch)(dt.store),s=(0,dt.useResourcePermissions)("pages"),c=(0,dt.useResourcePermissions)("posts");const{label:m,url:u,opensInNewTab:p,type:d,kind:g}=e.link;let h=!1;d&&"page"!==d?"post"===d&&(h=c.canCreate):h=s.canCreate;const b=(0,_t.useMemo)((()=>({url:u,opensInNewTab:p,title:m&&(0,ac.__unstableStripHTML)(m)})),[m,p,u]),_=(0,jt.useInstanceId)(zh,"link-ui-link-control__title"),y=(0,jt.useInstanceId)(zh,"link-ui-link-control__description"),{onClose:v}=e;return(0,Ke.createElement)(Ke.Fragment,null,r&&(0,Ke.createElement)("div",{className:"components-popover-pointer-events-trap","aria-hidden":"true",onClick:()=>l(!1)}),(0,Ke.createElement)(et.Popover,{placement:"bottom",onClose:e.onClose,anchor:e.anchor,shift:!0},!t&&(0,Ke.createElement)("div",{role:"dialog","aria-labelledby":_,"aria-describedby":y},(0,Ke.createElement)(et.VisuallyHidden,null,(0,Ke.createElement)("h2",{id:_},(0,tt.__)("Add link")),(0,Ke.createElement)("p",{id:y},(0,tt.__)("Search for and add a link to your Navigation."))),(0,Ke.createElement)(nt.__experimentalLinkControl,{hasTextControl:!0,hasRichPreviews:!0,value:b,showInitialSuggestions:!0,withCreateSuggestion:h,createSuggestion:async function(t){const n=e.link.type||"page",a=await i("postType",n,{title:t,status:"draft"});return{id:a.id,type:n,title:(0,Jn.decodeEntities)(a.title.rendered),url:a.link,kind:"post-type"}},createSuggestionButtonText:e=>{let t;return t="post"===d?(0,tt.__)("Create draft post: <mark>%s</mark>"):(0,tt.__)("Create draft page: <mark>%s</mark>"),(0,_t.createInterpolateElement)((0,tt.sprintf)(t,e),{mark:(0,Ke.createElement)("mark",null)})},noDirectEntry:!!d,noURLSuggestion:!!d,suggestionsQuery:Ph(d,g),onChange:e.onChange,onRemove:e.onRemove,onCancel:e.onCancel,renderControlBottom:()=>!b?.url?.length&&(0,Ke.createElement)(Rh,{focusAddBlockButton:a,setAddingBlock:()=>{n(!0),o(!1)}})})),t&&(0,Ke.createElement)(Mh,{clientId:e.clientId,onBack:()=>{n(!1),o(!0)},onSelectBlock:v})))}const Rh=({setAddingBlock:e,focusAddBlockButton:t})=>{const n=(0,_t.useRef)();return(0,_t.useEffect)((()=>{t&&n.current?.focus()}),[t]),(0,Ke.createElement)(et.__experimentalVStack,{className:"link-ui-tools"},(0,Ke.createElement)(et.Button,{ref:n,icon:Th,onClick:t=>{t.preventDefault(),e(!0)},"aria-haspopup":"listbox"},(0,tt.__)("Add block")))},Ah=(0,tt.__)("Switch to '%s'"),Hh=["core/navigation-link","core/navigation-submenu"],{PrivateListView:Lh}=Ft(nt.privateApis);function Dh({block:e,insertedBlock:t,setInsertedBlock:n}){const{updateBlockAttributes:a}=(0,gt.useDispatch)(nt.store),o=Hh?.includes(t?.name),r=t?.clientId===e.clientId;if(!(o&&r))return null;return(0,Ke.createElement)(zh,{clientId:t?.clientId,link:t?.attributes,onClose:()=>{n(null)},onChange:e=>{var o;Bh(e,(o=t?.clientId,e=>{o&&a(o,e)}),t?.attributes),n(null)},onCancel:()=>{n(null)}})}const Fh=({clientId:e,currentMenuId:t,isLoading:n,isNavigationMenuMissing:a,onCreateNew:o})=>{const r=(0,gt.useSelect)((t=>!!t(nt.store).getBlockCount(e)),[e]),{navigationMenu:l}=Rg(t);if(t&&a)return(0,Ke.createElement)(yh,{onCreateNew:o});if(n)return(0,Ke.createElement)(et.Spinner,null);const i=l?(0,tt.sprintf)((0,tt.__)("Structure for navigation menu: %s"),l?.title||(0,tt.__)("Untitled menu")):(0,tt.__)("You have not yet created any menus. Displaying a list of your Pages");return(0,Ke.createElement)("div",{className:"wp-block-navigation__menu-inspector-controls"},!r&&(0,Ke.createElement)("p",{className:"wp-block-navigation__menu-inspector-controls__empty-message"},(0,tt.__)("This navigation menu is empty.")),(0,Ke.createElement)(Lh,{rootClientId:e,isExpanded:!0,description:i,showAppender:!0,blockSettingsMenu:Ch,additionalBlockContent:Dh}))},Vh=e=>{const{createNavigationMenuIsSuccess:t,createNavigationMenuIsError:n,currentMenuId:a=null,onCreateNew:o,onSelectClassicMenu:r,onSelectNavigationMenu:l,isManageMenusButtonDisabled:i,blockEditingMode:s}=e;return(0,Ke.createElement)(nt.InspectorControls,{group:"list"},(0,Ke.createElement)(et.PanelBody,{title:null},(0,Ke.createElement)(et.__experimentalHStack,{className:"wp-block-navigation-off-canvas-editor__header"},(0,Ke.createElement)(et.__experimentalHeading,{className:"wp-block-navigation-off-canvas-editor__title",level:2},(0,tt.__)("Menu")),"default"===s&&(0,Ke.createElement)(Dg,{currentMenuId:a,onSelectClassicMenu:r,onSelectNavigationMenu:l,onCreateNew:o,createNavigationMenuIsSuccess:t,createNavigationMenuIsError:n,actionLabel:Ah,isManageMenusButtonDisabled:i})),(0,Ke.createElement)(Fh,{...e})))};function $h({id:e,children:t}){return(0,Ke.createElement)(et.VisuallyHidden,null,(0,Ke.createElement)("div",{id:e,className:"wp-block-navigation__description"},t))}function Oh({id:e}){const[t]=(0,dt.useEntityProp)("postType","wp_navigation","title"),n=(0,tt.sprintf)((0,tt.__)('Navigation menu: "%s"'),t);return(0,Ke.createElement)($h,{id:e},n)}const Gh=(0,nt.withColors)({textColor:"color"},{backgroundColor:"color"},{overlayBackgroundColor:"color"},{overlayTextColor:"color"})((function({attributes:e,setAttributes:t,clientId:n,isSelected:a,className:o,backgroundColor:r,setBackgroundColor:l,textColor:i,setTextColor:s,overlayBackgroundColor:c,setOverlayBackgroundColor:m,overlayTextColor:u,setOverlayTextColor:p,hasSubmenuIndicatorSetting:d=!0,customPlaceholder:g=null,__unstableLayoutClassNames:h}){const{openSubmenusOnClick:b,overlayMenu:_,showSubmenuIcon:y,templateLock:v,layout:{justifyContent:f,orientation:k="horizontal",flexWrap:x="wrap"}={},hasIcon:w,icon:E="handle"}=e,C=e.ref,S=(0,_t.useCallback)((e=>{t({ref:e})}),[t]),B=`navigationMenu/${C}`,N=(0,nt.useHasRecursion)(B),T=(0,nt.useBlockEditingMode)(),{menus:I}=Ag(),[P,M]=Qg({name:"block-library/core/navigation/status"}),[z,R]=Qg({name:"block-library/core/navigation/classic-menu-conversion"}),[A,H]=Qg({name:"block-library/core/navigation/permissions/update"}),{create:L,status:D,error:F,value:V,isPending:$,isSuccess:O,isError:G}=function(e){const[t,n]=(0,_t.useState)(uh),[a,o]=(0,_t.useState)(null),[r,l]=(0,_t.useState)(null),{saveEntityRecord:i,editEntityRecord:s}=(0,gt.useDispatch)(dt.store),c=ih(e),m=(0,_t.useCallback)((async(e=null,t=[],a)=>{if(e&&"string"!=typeof e)throw l("Invalid title supplied when creating Navigation Menu."),n(ch),new Error("Value of supplied title argument was not a string.");n(mh),o(null),l(null),e||(e=await c().catch((e=>{throw l(e?.message),n(ch),new Error("Failed to create title when saving new Navigation Menu.",{cause:e})})));const r={title:e,content:(0,Qe.serialize)(t),status:a};return i("postType","wp_navigation",r).then((e=>(o(e),n(sh),"publish"!==a&&s("postType","wp_navigation",e.id,{status:"publish"}),e))).catch((e=>{throw l(e?.message),n(ch),new Error("Unable to save new Navigation Menu",{cause:e})}))}),[i,s,c]);return{create:m,status:t,value:a,error:r,isIdle:t===uh,isPending:t===mh,isSuccess:t===sh,isError:t===ch}}(n),U=async()=>{await L("")},{hasUncontrolledInnerBlocks:q,uncontrolledInnerBlocks:j,isInnerBlockSelected:W,innerBlocks:Z}=function(e){return(0,gt.useSelect)((t=>{const{getBlock:n,getBlocks:a,hasSelectedInnerBlock:o}=t(nt.store),r=n(e).innerBlocks,l=!!r?.length,i=l?ph:a(e);return{innerBlocks:l?r:i,hasUncontrolledInnerBlocks:l,uncontrolledInnerBlocks:r,controlledInnerBlocks:i,isInnerBlockSelected:o(e,!0)}}),[e])}(n),Q=!!Z.find((e=>"core/navigation-submenu"===e.name)),{replaceInnerBlocks:K,selectBlock:Y,__unstableMarkNextChangeAsNotPersistent:J}=(0,gt.useDispatch)(nt.store),[X,ee]=(0,_t.useState)(!1),[te,ne]=(0,_t.useState)(!1),{hasResolvedNavigationMenus:ae,isNavigationMenuResolved:oe,isNavigationMenuMissing:re,canUserUpdateNavigationMenu:le,hasResolvedCanUserUpdateNavigationMenu:ie,canUserDeleteNavigationMenu:se,hasResolvedCanUserDeleteNavigationMenu:ce,canUserCreateNavigationMenu:me,isResolvingCanUserCreateNavigationMenu:ue,hasResolvedCanUserCreateNavigationMenu:pe}=Rg(C),de=ae&&re,{convert:ge,status:he,error:be}=ah(L),_e=he===th,ye=(0,_t.useCallback)(((e,t={focusNavigationBlock:!1})=>{const{focusNavigationBlock:a}=t;S(e),a&&Y(n)}),[Y,n,S]),ve=!re&&oe,fe=q&&!ve,{getNavigationFallbackId:ke}=Ft((0,gt.useSelect)(dt.store)),xe=C||fe?null:ke();(0,_t.useEffect)((()=>{C||fe||!xe||(J(),S(xe))}),[C,S,fe,xe,J]);const we=(0,_t.useRef)(),Ee="nav",Ce=!C&&!$&&!_e&&ae&&0===I?.length&&!q,Se=!ae||$||_e||!(!C||ve||_e),Be=e.style?.typography?.textDecoration,Ne=(0,gt.useSelect)((e=>e(nt.store).__unstableHasActiveBlockOverlayActive(n)),[n]),Te="never"!==_,Ie=(0,nt.useBlockProps)({ref:we,className:ut()(o,{"items-justified-right":"right"===f,"items-justified-space-between":"space-between"===f,"items-justified-left":"left"===f,"items-justified-center":"center"===f,"is-vertical":"vertical"===k,"no-wrap":"nowrap"===x,"is-responsive":Te,"has-text-color":!!i.color||!!i?.class,[(0,nt.getColorClassName)("color",i?.slug)]:!!i?.slug,"has-background":!!r.color||r.class,[(0,nt.getColorClassName)("background-color",r?.slug)]:!!r?.slug,[`has-text-decoration-${Be}`]:Be,"block-editor-block-content-overlay":Ne},h),style:{color:!i?.slug&&i?.color,backgroundColor:!r?.slug&&r?.color}}),Pe="web"===_t.Platform.OS,[Me,ze]=(0,_t.useState)(),[Re,Ae]=(0,_t.useState)(),[He,Le]=(0,_t.useState)(),[De,Fe]=(0,_t.useState)(),Ve=async e=>ge(e.id,e.name,"draft"),$e=e=>{ye(e)};(0,_t.useEffect)((()=>{M(),$&&(0,Bg.speak)((0,tt.__)("Creating Navigation Menu.")),O&&(ye(V?.id,{focusNavigationBlock:!0}),P((0,tt.__)("Navigation Menu successfully created."))),G&&P((0,tt.__)("Failed to create Navigation Menu."))}),[D,F,V?.id,G,O,$,ye,M,P]),(0,_t.useEffect)((()=>{R(),he===th&&(0,Bg.speak)((0,tt.__)("Classic menu importing.")),he===Xg&&(z((0,tt.__)("Classic menu imported successfully.")),ye(V?.id,{focusNavigationBlock:!0})),he===eh&&z((0,tt.__)("Classic menu import failed."))}),[he,be,R,z,V?.id,ye]),(0,_t.useEffect)((()=>{if(!Pe)return;gh(we.current,Ae,ze);const e=we.current?.querySelector('[data-type="core/navigation-submenu"] [data-type="core/navigation-link"]');e&&(u.color||c.color)&&gh(e,Fe,Le)}),[Pe,u.color,c.color]),(0,_t.useEffect)((()=>{a||W||H(),(a||W)&&(C&&!de&&ie&&!le&&A((0,tt.__)("You do not have permission to edit this Menu. Any changes made will not be saved.")),C||!pe||me||A((0,tt.__)("You do not have permission to create Navigation Menus.")))}),[a,W,le,ie,me,pe,C,H,A,de]);const Oe=me||le,Ge=ut()("wp-block-navigation__overlay-menu-preview",{open:te}),Ue=y||b?"":(0,tt.__)('The current menu options offer reduced accessibility for users and are not recommended. Enabling either "Open on Click" or "Show arrow" offers enhanced accessibility by allowing keyboard users to browse submenus selectively.'),qe=(0,_t.useRef)(!0);(0,_t.useEffect)((()=>{!qe.current&&Ue&&(0,Bg.speak)(Ue),qe.current=!1}),[Ue]);const je=(0,jt.useInstanceId)(Kg,"overlay-menu-preview"),We=(0,nt.__experimentalUseMultipleOriginColorsAndGradients)(),Ze=(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,d&&(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Display")},Te&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.Button,{className:Ge,onClick:()=>{ne(!te)},"aria-label":(0,tt.__)("Overlay menu controls"),"aria-controls":je,"aria-expanded":te},w&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)($g,{icon:E}),(0,Ke.createElement)(Ng,{icon:Tg})),!w&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("span",null,(0,tt.__)("Menu")),(0,Ke.createElement)("span",null,(0,tt.__)("Close")))),(0,Ke.createElement)("div",{id:je},te&&(0,Ke.createElement)(Kg,{setAttributes:t,hasIcon:w,icon:E,hidden:!te}))),(0,Ke.createElement)("h3",null,(0,tt.__)("Overlay Menu")),(0,Ke.createElement)(et.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Configure overlay menu"),value:_,help:(0,tt.__)("Collapses the navigation options in a menu icon opening an overlay."),onChange:e=>t({overlayMenu:e}),isBlock:!0,hideLabelFromVision:!0},(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"never",label:(0,tt.__)("Off")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"mobile",label:(0,tt.__)("Mobile")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"always",label:(0,tt.__)("Always")})),Q&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("h3",null,(0,tt.__)("Submenus")),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,checked:b,onChange:e=>{t({openSubmenusOnClick:e,...e&&{showSubmenuIcon:!0}})},label:(0,tt.__)("Open on click")}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,checked:y,onChange:e=>{t({showSubmenuIcon:e})},disabled:e.openSubmenusOnClick,label:(0,tt.__)("Show arrow")}),Ue&&(0,Ke.createElement)("div",null,(0,Ke.createElement)(et.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},Ue))))),We.hasColorsOrGradients&&(0,Ke.createElement)(nt.InspectorControls,{group:"color"},(0,Ke.createElement)(nt.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:i.color,label:(0,tt.__)("Text"),onColorChange:s,resetAllFilter:()=>s()},{colorValue:r.color,label:(0,tt.__)("Background"),onColorChange:l,resetAllFilter:()=>l()},{colorValue:u.color,label:(0,tt.__)("Submenu & overlay text"),onColorChange:p,resetAllFilter:()=>p()},{colorValue:c.color,label:(0,tt.__)("Submenu & overlay background"),onColorChange:m,resetAllFilter:()=>m()}],panelId:n,...We,gradients:[],disableCustomGradients:!0}),Pe&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.ContrastChecker,{backgroundColor:Me,textColor:Re}),(0,Ke.createElement)(nt.ContrastChecker,{backgroundColor:He,textColor:De})))),Ye=`${n}-desc`,Je=!Oe||!ae;if(fe&&!$)return(0,Ke.createElement)(Ee,{...Ie,"aria-describedby":Ce?void 0:Ye},(0,Ke.createElement)($h,{id:Ye},(0,tt.__)("Unsaved Navigation Menu.")),(0,Ke.createElement)(Vh,{clientId:n,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:G,currentMenuId:C,isNavigationMenuMissing:re,isManageMenusButtonDisabled:Je,onCreateNew:U,onSelectClassicMenu:Ve,onSelectNavigationMenu:$e,isLoading:Se,blockEditingMode:T}),"default"===T&&Ze,(0,Ke.createElement)(Og,{id:n,onToggle:ee,isOpen:X,hasIcon:w,icon:E,isResponsive:Te,isHiddenByDefault:"always"===_,overlayBackgroundColor:c,overlayTextColor:u},(0,Ke.createElement)(Wg,{createNavigationMenu:L,blocks:j,hasSelection:a||W})));if(C&&re)return(0,Ke.createElement)(Ee,{...Ie},(0,Ke.createElement)(Vh,{clientId:n,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:G,currentMenuId:C,isNavigationMenuMissing:re,isManageMenusButtonDisabled:Je,onCreateNew:U,onSelectClassicMenu:Ve,onSelectNavigationMenu:$e,isLoading:Se,blockEditingMode:T}),(0,Ke.createElement)(yh,{onCreateNew:U}));if(ve&&N)return(0,Ke.createElement)("div",{...Ie},(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Block cannot be rendered inside itself.")));const Xe=g||Fg;return Ce&&g?(0,Ke.createElement)(Ee,{...Ie},(0,Ke.createElement)(Xe,{isSelected:a,currentMenuId:C,clientId:n,canUserCreateNavigationMenu:me,isResolvingCanUserCreateNavigationMenu:ue,onSelectNavigationMenu:$e,onSelectClassicMenu:Ve,onCreateEmpty:U})):(0,Ke.createElement)(dt.EntityProvider,{kind:"postType",type:"wp_navigation",id:C},(0,Ke.createElement)(nt.RecursionProvider,{uniqueId:B},(0,Ke.createElement)(Vh,{clientId:n,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:G,currentMenuId:C,isNavigationMenuMissing:re,isManageMenusButtonDisabled:Je,onCreateNew:U,onSelectClassicMenu:Ve,onSelectNavigationMenu:$e,isLoading:Se,blockEditingMode:T}),"default"===T&&Ze,"default"===T&&ve&&(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},ie&&le&&(0,Ke.createElement)(Ug,null),ce&&se&&(0,Ke.createElement)(Zg,{onDelete:(e="")=>{K(n,[]),P((0,tt.sprintf)((0,tt.__)("Navigation menu %s successfully deleted."),e))}}),(0,Ke.createElement)(_h,{disabled:Je,className:"wp-block-navigation-manage-menus-button"})),(0,Ke.createElement)(Ee,{...Ie,"aria-describedby":Ce||Se?void 0:Ye},Se&&(0,Ke.createElement)("div",{className:"wp-block-navigation__loading-indicator-container"},(0,Ke.createElement)(et.Spinner,{className:"wp-block-navigation__loading-indicator"})),!Se&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Oh,{id:Ye}),(0,Ke.createElement)(Og,{id:n,onToggle:ee,hasIcon:w,icon:E,isOpen:X,isResponsive:Te,isHiddenByDefault:"always"===_,overlayBackgroundColor:c,overlayTextColor:u},ve&&(0,Ke.createElement)(Gg,{clientId:n,hasCustomPlaceholder:!!g,templateLock:v,orientation:k}))))))}));const Uh={fontStyle:"var:preset|font-style|",fontWeight:"var:preset|font-weight|",textDecoration:"var:preset|text-decoration|",textTransform:"var:preset|text-transform|"},qh=({navigationMenuId:e,...t})=>({...t,ref:e}),jh=e=>{if(e.layout)return e;const{itemsJustification:t,orientation:n,...a}=e;return(t||n)&&Object.assign(a,{layout:{type:"flex",...t&&{justifyContent:t},...n&&{orientation:n}}}),a},Wh={attributes:{navigationMenuId:{type:"number"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"mobile"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},save:()=>(0,Ke.createElement)(nt.InnerBlocks.Content,null),isEligible:({navigationMenuId:e})=>!!e,migrate:qh},Zh={attributes:{navigationMenuId:{type:"number"},orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"never"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}}},save:()=>(0,Ke.createElement)(nt.InnerBlocks.Content,null),isEligible:({itemsJustification:e,orientation:t})=>!!e||!!t,migrate:(0,jt.compose)(qh,jh)},Qh={attributes:{orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"never"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}}},save:()=>(0,Ke.createElement)(nt.InnerBlocks.Content,null),migrate:(0,jt.compose)(qh,jh,ln),isEligible:({style:e})=>e?.typography?.fontFamily},Kh=[Wh,Zh,Qh,{attributes:{orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},isResponsive:{type:"boolean",default:"false"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0}},isEligible:e=>e.isResponsive,migrate:(0,jt.compose)(qh,jh,ln,(function(e){return delete e.isResponsive,{...e,overlayMenu:"mobile"}})),save:()=>(0,Ke.createElement)(nt.InnerBlocks.Content,null)},{attributes:{orientation:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,fontSize:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,color:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},save:()=>(0,Ke.createElement)(nt.InnerBlocks.Content,null),isEligible(e){if(!e.style||!e.style.typography)return!1;for(const t in Uh){const n=e.style.typography[t];if(n&&n.startsWith(Uh[t]))return!0}return!1},migrate:(0,jt.compose)(qh,jh,ln,(function(e){var t;return{...e,style:{...e.style,typography:Object.fromEntries(Object.entries(null!==(t=e.style.typography)&&void 0!==t?t:{}).map((([e,t])=>{const n=Uh[e];if(n&&t.startsWith(n)){const a=t.slice(n.length);return"textDecoration"===e&&"strikethrough"===a?[e,"line-through"]:[e,a]}return[e,t]})))}}}))},{attributes:{className:{type:"string"},textColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean"}},isEligible:e=>e.rgbTextColor||e.rgbBackgroundColor,supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0},migrate:(0,jt.compose)(qh,(e=>{const{rgbTextColor:t,rgbBackgroundColor:n,...a}=e;return{...a,customTextColor:e.textColor?void 0:e.rgbTextColor,customBackgroundColor:e.backgroundColor?void 0:e.rgbBackgroundColor}})),save:()=>(0,Ke.createElement)(nt.InnerBlocks.Content,null)}],Yh=Kh,Jh={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/navigation",title:"Navigation",category:"theme",allowedBlocks:["core/navigation-link","core/search","core/social-links","core/page-list","core/spacer","core/home-link","core/site-title","core/site-logo","core/navigation-submenu","core/loginout","core/buttons"],description:"A collection of blocks that allow visitors to get around your site.",keywords:["menu","navigation","links"],textdomain:"default",attributes:{ref:{type:"number"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"mobile"},icon:{type:"string",default:"handle"},hasIcon:{type:"boolean",default:!0},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"},maxNestingLevel:{type:"number",default:5},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},providesContext:{textColor:"textColor",customTextColor:"customTextColor",backgroundColor:"backgroundColor",customBackgroundColor:"customBackgroundColor",overlayTextColor:"overlayTextColor",customOverlayTextColor:"customOverlayTextColor",overlayBackgroundColor:"overlayBackgroundColor",customOverlayBackgroundColor:"customOverlayBackgroundColor",fontSize:"fontSize",customFontSize:"customFontSize",showSubmenuIcon:"showSubmenuIcon",openSubmenusOnClick:"openSubmenusOnClick",style:"style",maxNestingLevel:"maxNestingLevel"},supports:{align:["wide","full"],ariaLabel:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalLetterSpacing:!0,__experimentalTextDecoration:!0,__experimentalSkipSerialization:["textDecoration"],__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}},layout:{allowSwitching:!1,allowInheriting:!1,allowVerticalAlignment:!1,allowSizingOnChildren:!0,default:{type:"flex"}},__experimentalStyle:{elements:{link:{color:{text:"inherit"}}}},interactivity:!0,renaming:!1},editorStyle:"wp-block-navigation-editor",style:"wp-block-navigation"},{name:Xh}=Jh,eb={icon:Sg,example:{attributes:{overlayMenu:"never"},innerBlocks:[{name:"core/navigation-link",attributes:{label:(0,tt.__)("Home"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,tt.__)("About"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,tt.__)("Contact"),url:"https://make.wordpress.org/"}}]},edit:Gh,save:function({attributes:e}){if(!e.ref)return(0,Ke.createElement)(nt.InnerBlocks.Content,null)},deprecated:Yh},tb=()=>Xe({name:Xh,metadata:Jh,settings:eb}),nb=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M12.5 14.5h-1V16h1c2.2 0 4-1.8 4-4s-1.8-4-4-4h-1v1.5h1c1.4 0 2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5zm-4 1.5v-1.5h-1C6.1 14.5 5 13.4 5 12s1.1-2.5 2.5-2.5h1V8h-1c-2.2 0-4 1.8-4 4s1.8 4 4 4h1zm-1-3.2h5v-1.5h-5v1.5zM18 4H9c-1.1 0-2 .9-2 2v.5h1.5V6c0-.3.2-.5.5-.5h9c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5v-.5H7v.5c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2z"})),ab={name:"core/navigation-link"};const ob=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,Ke.createElement)(Ye.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})),rb=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})),lb=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z"}));function ib(e){switch(e){case"post":return Sp;case"page":return ob;case"tag":return rb;case"category":return Yn;default:return lb}}function sb(e,t){if("core/navigation-link"!==t)return e;if(e.variations){const t=(e,t)=>e.type===t.type,n=e.variations.map((e=>({...e,...!e.icon&&{icon:ib(e.name)},...!e.isActive&&{isActive:t}})));return{...e,variations:n}}return e}const cb={from:[{type:"block",blocks:["core/site-logo"],transform:()=>(0,Qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/spacer"],transform:()=>(0,Qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/home-link"],transform:()=>(0,Qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,Qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/search"],transform:()=>(0,Qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/page-list"],transform:()=>(0,Qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/buttons"],transform:()=>(0,Qe.createBlock)("core/navigation-link")}],to:[{type:"block",blocks:["core/navigation-submenu"],transform:(e,t)=>(0,Qe.createBlock)("core/navigation-submenu",e,t)},{type:"block",blocks:["core/spacer"],transform:()=>(0,Qe.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],transform:()=>(0,Qe.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],transform:()=>(0,Qe.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,Qe.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],transform:()=>(0,Qe.createBlock)("core/search",{showLabel:!1,buttonUseIcon:!0,buttonPosition:"button-inside"})},{type:"block",blocks:["core/page-list"],transform:()=>(0,Qe.createBlock)("core/page-list")},{type:"block",blocks:["core/buttons"],transform:({label:e,url:t,rel:n,title:a,opensInNewTab:o})=>(0,Qe.createBlock)("core/buttons",{},[(0,Qe.createBlock)("core/button",{text:e,url:t,rel:n,title:a,linkTarget:o?"_blank":void 0})])}]},mb=cb,ub={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/navigation-link",title:"Custom Link",category:"design",parent:["core/navigation"],allowedBlocks:["core/navigation-link","core/navigation-submenu","core/page-list"],description:"Add a page, link, or another item to your navigation.",textdomain:"default",attributes:{label:{type:"string"},type:{type:"string"},description:{type:"string"},rel:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"},title:{type:"string"},kind:{type:"string"},isTopLevelLink:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","style"],supports:{reusable:!1,html:!1,__experimentalSlashInserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},renaming:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-navigation-link-editor",style:"wp-block-navigation-link"},{name:pb}=ub,db={icon:nb,__experimentalLabel:({label:e})=>e,merge:(e,{label:t=""})=>({...e,label:e.label+t}),edit:function({attributes:e,isSelected:t,setAttributes:n,insertBlocksAfter:a,mergeBlocks:o,onReplace:r,context:l,clientId:i}){const{id:s,label:c,type:m,url:u,description:p,rel:d,title:g,kind:h}=e,[b,_]=((e,t,n)=>{const a="post-type"===e||"post"===t||"page"===t,o=Number.isInteger(n),r=(0,gt.useSelect)((e=>{if(!a)return null;const{getEntityRecord:o}=e(dt.store);return o("postType",t,n)?.status}),[a,t,n]);return[a&&o&&r&&"trash"===r,"draft"===r]})(h,m,s),{maxNestingLevel:y}=l,{replaceBlock:v,__unstableMarkNextChangeAsNotPersistent:f}=(0,gt.useDispatch)(nt.store),[k,x]=(0,_t.useState)(!1),[w,E]=(0,_t.useState)(null),C=(0,_t.useRef)(null),S=(e=>{const[t,n]=(0,_t.useState)(!1);return(0,_t.useEffect)((()=>{const{ownerDocument:t}=e.current;function a(e){r(e)}function o(){n(!1)}function r(t){e.current.contains(t.target)?n(!0):n(!1)}return t.addEventListener("dragstart",a),t.addEventListener("dragend",o),t.addEventListener("dragenter",r),()=>{t.removeEventListener("dragstart",a),t.removeEventListener("dragend",o),t.removeEventListener("dragenter",r)}}),[]),t})(C),B=(0,tt.__)("Add label…"),N=(0,_t.useRef)(),[T,I]=(0,_t.useState)(!1),{innerBlocks:P,isAtMaxNesting:M,isTopLevelLink:z,isParentOfSelectedBlock:R,hasChildren:A}=(0,gt.useSelect)((e=>{const{getBlocks:t,getBlockCount:n,getBlockName:a,getBlockRootClientId:o,hasSelectedInnerBlock:r,getBlockParentsByBlockName:l}=e(nt.store);return{innerBlocks:t(i),isAtMaxNesting:l(i,["core/navigation-link","core/navigation-submenu"]).length>=y,isTopLevelLink:"core/navigation"===a(o(i)),isParentOfSelectedBlock:r(i,!0),hasChildren:!!n(i)}}),[i]);function H(){const t=(0,Qe.createBlock)("core/navigation-submenu",e,P.length>0?P:[(0,Qe.createBlock)("core/navigation-link")]);v(i,t)}(0,_t.useEffect)((()=>{u||x(!0)}),[u]),(0,_t.useEffect)((()=>{A&&(f(),H())}),[A]),(0,_t.useEffect)((()=>{t||x(!1)}),[t]),(0,_t.useEffect)((()=>{k&&u&&((0,pt.isURL)((0,pt.prependHTTP)(c))&&/^.+\.[a-z]+/.test(c)?function(){N.current.focus();const{ownerDocument:e}=N.current,{defaultView:t}=e,n=t.getSelection(),a=e.createRange();a.selectNodeContents(N.current),n.removeAllRanges(),n.addRange(a)}():(0,ac.placeCaretAtHorizontalEdge)(N.current,!0))}),[u]);const{textColor:L,customTextColor:D,backgroundColor:F,customBackgroundColor:V}=hh(l,!z),$=(0,nt.useBlockProps)({ref:(0,jt.useMergeRefs)([E,C]),className:ut()("wp-block-navigation-item",{"is-editing":t||R,"is-dragging-within":S,"has-link":!!u,"has-child":A,"has-text-color":!!L||!!D,[(0,nt.getColorClassName)("color",L)]:!!L,"has-background":!!F||V,[(0,nt.getColorClassName)("background-color",F)]:!!F}),style:{color:!L&&D,backgroundColor:!F&&V},onKeyDown:function(e){(fn.isKeyboardEvent.primary(e,"k")||(!u||_||b)&&e.keyCode===fn.ENTER)&&(e.preventDefault(),x(!0))}}),O=(0,nt.useInnerBlocksProps)({...$,className:"remove-outline"},{defaultBlock:ab,directInsert:!0,renderAppender:!1});(!u||b||_)&&($.onClick=()=>x(!0));const G=ut()("wp-block-navigation-item__content",{"wp-block-navigation-link__placeholder":!u||b||_}),U=function(e){let t="";switch(e){case"post":t=(0,tt.__)("Select post");break;case"page":t=(0,tt.__)("Select page");break;case"category":t=(0,tt.__)("Select category");break;case"tag":t=(0,tt.__)("Select tag");break;default:t=(0,tt.__)("Add link")}return t}(m),q=`(${b?(0,tt.__)("Invalid"):(0,tt.__)("Draft")})`,j=b||_?(0,tt.__)("This item has been deleted, or is a draft"):(0,tt.__)("This item is missing a link");return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.ToolbarButton,{name:"link",icon:kn,title:(0,tt.__)("Link"),shortcut:fn.displayShortcut.primary("k"),onClick:()=>x(!0)}),!M&&(0,Ke.createElement)(et.ToolbarButton,{name:"submenu",icon:vh,title:(0,tt.__)("Add submenu"),onClick:H}))),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,value:c?(0,ac.__unstableStripHTML)(c):"",onChange:e=>{n({label:e})},label:(0,tt.__)("Label"),autoComplete:"off",onFocus:()=>I(!0),onBlur:()=>I(!1)}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,value:u?(0,pt.safeDecodeURI)(u):"",onChange:t=>{Bh({url:t},n,e)},label:(0,tt.__)("URL"),autoComplete:"off"}),(0,Ke.createElement)(et.TextareaControl,{__nextHasNoMarginBottom:!0,value:p||"",onChange:e=>{n({description:e})},label:(0,tt.__)("Description"),help:(0,tt.__)("The description will be displayed in the menu if the current theme supports it.")}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,value:g||"",onChange:e=>{n({title:e})},label:(0,tt.__)("Title attribute"),autoComplete:"off",help:(0,tt.__)("Additional information to help clarify the purpose of the link.")}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,value:d||"",onChange:e=>{n({rel:e})},label:(0,tt.__)("Rel attribute"),autoComplete:"off",help:(0,tt.__)("The relationship of the linked URL as space-separated link types.")}))),(0,Ke.createElement)("div",{...$},(0,Ke.createElement)("a",{className:G},u?(0,Ke.createElement)(Ke.Fragment,null,!b&&!_&&!T&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.RichText,{ref:N,identifier:"label",className:"wp-block-navigation-item__label",value:c,onChange:e=>n({label:e}),onMerge:o,onReplace:r,__unstableOnSplitAtEnd:()=>a((0,Qe.createBlock)("core/navigation-link")),"aria-label":(0,tt.__)("Navigation link text"),placeholder:B,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"],onClick:()=>{u||x(!0)}}),p&&(0,Ke.createElement)("span",{className:"wp-block-navigation-item__description"},p)),(b||_||T)&&(0,Ke.createElement)("div",{className:"wp-block-navigation-link__placeholder-text wp-block-navigation-link__label"},(0,Ke.createElement)(et.Tooltip,{text:j},(0,Ke.createElement)("span",{"aria-label":(0,tt.__)("Navigation link text")},`${(0,Jn.decodeEntities)(c)} ${b||_?q:""}`.trim())))):(0,Ke.createElement)("div",{className:"wp-block-navigation-link__placeholder-text"},(0,Ke.createElement)(et.Tooltip,{text:j},(0,Ke.createElement)("span",null,U))),k&&(0,Ke.createElement)(zh,{clientId:i,link:e,onClose:()=>{u||r([])},anchor:w,onRemove:function(){n({url:void 0,label:void 0,id:void 0,kind:void 0,type:void 0,opensInNewTab:!1}),x(!1)},onChange:t=>{Bh(t,n,e)}})),(0,Ke.createElement)("div",{...O})))},save:function(){return(0,Ke.createElement)(nt.InnerBlocks.Content,null)},example:{attributes:{label:(0,tt._x)("Example Link","navigation link preview example"),url:"https://example.com"}},deprecated:[{isEligible:e=>e.nofollow,attributes:{label:{type:"string"},type:{type:"string"},nofollow:{type:"boolean"},description:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"}},migrate:({nofollow:e,...t})=>({rel:e?"nofollow":"",...t}),save:()=>(0,Ke.createElement)(nt.InnerBlocks.Content,null)}],transforms:mb},gb=()=>((0,_i.addFilter)("blocks.registerBlockType","core/navigation-link",sb),Xe({name:pb,metadata:ub,settings:db})),hb=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m13.955 20.748 8-17.5-.91-.416L19.597 6H13.5v1.5h5.411l-1.6 3.5H13.5v1.5h3.126l-1.6 3.5H13.5l.028 1.5h.812l-1.295 2.832.91.416ZM17.675 16l-.686 1.5h4.539L21.5 16h-3.825Zm2.286-5-.686 1.5H21.5V11h-1.54ZM2 12c0 3.58 2.42 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.48 0-4.5-1.52-4.5-4S5.52 7.5 8 7.5h3.5V6H8c-3.58 0-6 2.42-6 6Z"})),bb=()=>(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},(0,Ke.createElement)(et.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})),_b=["core/navigation-link","core/navigation-submenu","core/page-list"],yb={name:"core/navigation-link"};const vb={to:[{type:"block",blocks:["core/navigation-link"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:e=>(0,Qe.createBlock)("core/navigation-link",e)},{type:"block",blocks:["core/spacer"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Qe.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Qe.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Qe.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Qe.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,Qe.createBlock)("core/search")}]},fb=vb,kb={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/navigation-submenu",title:"Submenu",category:"design",parent:["core/navigation"],description:"Add a submenu to your navigation.",textdomain:"default",attributes:{label:{type:"string"},type:{type:"string"},description:{type:"string"},rel:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"},title:{type:"string"},kind:{type:"string"},isTopLevelItem:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","openSubmenusOnClick","style"],supports:{reusable:!1,html:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-navigation-submenu-editor",style:"wp-block-navigation-submenu"},{name:xb}=kb,wb={icon:({context:e})=>"list-view"===e?ob:vh,__experimentalLabel(e,{context:t}){const{label:n}=e,a=e?.metadata?.name;return"list-view"===t&&(a||n)&&e?.metadata?.name||n},edit:function({attributes:e,isSelected:t,setAttributes:n,mergeBlocks:a,onReplace:o,context:r,clientId:l}){const{label:i,type:s,url:c,description:m,rel:u,title:p}=e,{showSubmenuIcon:d,maxNestingLevel:g,openSubmenusOnClick:h}=r,{__unstableMarkNextChangeAsNotPersistent:b,replaceBlock:_}=(0,gt.useDispatch)(nt.store),[y,v]=(0,_t.useState)(!1),[f,k]=(0,_t.useState)(null),x=(0,_t.useRef)(null),w=(e=>{const[t,n]=(0,_t.useState)(!1);return(0,_t.useEffect)((()=>{const{ownerDocument:t}=e.current;function a(e){r(e)}function o(){n(!1)}function r(t){e.current.contains(t.target)?n(!0):n(!1)}return t.addEventListener("dragstart",a),t.addEventListener("dragend",o),t.addEventListener("dragenter",r),()=>{t.removeEventListener("dragstart",a),t.removeEventListener("dragend",o),t.removeEventListener("dragenter",r)}}),[]),t})(x),E=(0,tt.__)("Add text…"),C=(0,_t.useRef)(),S=(0,dt.useResourcePermissions)("pages"),B=(0,dt.useResourcePermissions)("posts"),{parentCount:N,isParentOfSelectedBlock:T,isImmediateParentOfSelectedBlock:I,hasChildren:P,selectedBlockHasChildren:M,onlyDescendantIsEmptyLink:z}=(0,gt.useSelect)((e=>{const{hasSelectedInnerBlock:t,getSelectedBlockClientId:n,getBlockParentsByBlockName:a,getBlock:o,getBlockCount:r,getBlockOrder:i}=e(nt.store);let s;const c=i(n());if(1===c?.length){const e=o(c[0]);s="core/navigation-link"===e?.name&&!e?.attributes?.label}return{parentCount:a(l,"core/navigation-submenu").length,isParentOfSelectedBlock:t(l,!0),isImmediateParentOfSelectedBlock:t(l,!1),hasChildren:!!r(l),selectedBlockHasChildren:!!c?.length,onlyDescendantIsEmptyLink:s}}),[l]),R=(0,jt.usePrevious)(P);(0,_t.useEffect)((()=>{h||c||v(!0)}),[]),(0,_t.useEffect)((()=>{t||v(!1)}),[t]),(0,_t.useEffect)((()=>{y&&c&&((0,pt.isURL)((0,pt.prependHTTP)(i))&&/^.+\.[a-z]+/.test(i)?function(){C.current.focus();const{ownerDocument:e}=C.current,{defaultView:t}=e,n=t.getSelection(),a=e.createRange();a.selectNodeContents(C.current),n.removeAllRanges(),n.addRange(a)}():(0,ac.placeCaretAtHorizontalEdge)(C.current,!0))}),[c]);let A=!1;s&&"page"!==s?"post"===s&&(A=B.canCreate):A=S.canCreate;const{textColor:H,customTextColor:L,backgroundColor:D,customBackgroundColor:F}=hh(r,N>0),V=(0,nt.useBlockProps)({ref:(0,jt.useMergeRefs)([k,x]),className:ut()("wp-block-navigation-item",{"is-editing":t||T,"is-dragging-within":w,"has-link":!!c,"has-child":P,"has-text-color":!!H||!!L,[(0,nt.getColorClassName)("color",H)]:!!H,"has-background":!!D||F,[(0,nt.getColorClassName)("background-color",D)]:!!D,"open-on-click":h}),style:{color:!H&&L,backgroundColor:!D&&F},onKeyDown:function(e){fn.isKeyboardEvent.primary(e,"k")&&(e.preventDefault(),v(!0))}}),$=hh(r,!0),O=N>=g?_b.filter((e=>"core/navigation-submenu"!==e)):_b,G=bh($),U=(0,nt.useInnerBlocksProps)(G,{allowedBlocks:O,defaultBlock:yb,directInsert:!0,__experimentalCaptureToolbars:!0,renderAppender:!!(t||I&&!M||P)&&nt.InnerBlocks.ButtonBlockAppender}),q=h?"button":"a";function j(){const t=(0,Qe.createBlock)("core/navigation-link",e);_(l,t)}(0,_t.useEffect)((()=>{!P&&R&&(b(),j())}),[P,R]);const W=!M||z;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,!h&&(0,Ke.createElement)(et.ToolbarButton,{name:"link",icon:kn,title:(0,tt.__)("Link"),shortcut:fn.displayShortcut.primary("k"),onClick:()=>v(!0)}),(0,Ke.createElement)(et.ToolbarButton,{name:"revert",icon:hb,title:(0,tt.__)("Convert to Link"),onClick:j,className:"wp-block-navigation__submenu__revert",isDisabled:!W}))),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,value:i||"",onChange:e=>{n({label:e})},label:(0,tt.__)("Label"),autoComplete:"off"}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,value:c||"",onChange:e=>{n({url:e})},label:(0,tt.__)("URL"),autoComplete:"off"}),(0,Ke.createElement)(et.TextareaControl,{__nextHasNoMarginBottom:!0,value:m||"",onChange:e=>{n({description:e})},label:(0,tt.__)("Description"),help:(0,tt.__)("The description will be displayed in the menu if the current theme supports it.")}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,value:p||"",onChange:e=>{n({title:e})},label:(0,tt.__)("Title attribute"),autoComplete:"off",help:(0,tt.__)("Additional information to help clarify the purpose of the link.")}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,value:u||"",onChange:e=>{n({rel:e})},label:(0,tt.__)("Rel attribute"),autoComplete:"off",help:(0,tt.__)("The relationship of the linked URL as space-separated link types.")}))),(0,Ke.createElement)("div",{...V},(0,Ke.createElement)(q,{className:"wp-block-navigation-item__content"},(0,Ke.createElement)(nt.RichText,{ref:C,identifier:"label",className:"wp-block-navigation-item__label",value:i,onChange:e=>n({label:e}),onMerge:a,onReplace:o,"aria-label":(0,tt.__)("Navigation link text"),placeholder:E,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"],onClick:()=>{h||c||v(!0)}}),!h&&y&&(0,Ke.createElement)(zh,{clientId:l,link:e,onClose:()=>v(!1),anchor:f,hasCreateSuggestion:A,onRemove:()=>{n({url:""}),(0,Bg.speak)((0,tt.__)("Link removed."),"assertive")},onChange:t=>{Bh(t,n,e)}})),(d||h)&&(0,Ke.createElement)("span",{className:"wp-block-navigation__submenu-icon"},(0,Ke.createElement)(bb,null)),(0,Ke.createElement)("div",{...U})))},save:function(){return(0,Ke.createElement)(nt.InnerBlocks.Content,null)},transforms:fb},Eb=()=>Xe({name:xb,metadata:kb,settings:wb}),Cb=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M17.5 9V6a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v3H8V6a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v3h1.5Zm0 6.5V18a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2v-2.5H8V18a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5v-2.5h1.5ZM4 13h16v-1.5H4V13Z"}));const Sb={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/nextpage"===e.dataset.block,transform:()=>(0,Qe.createBlock)("core/nextpage",{})}]},Bb={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/nextpage",title:"Page Break",category:"design",description:"Separate your content into a multi-page experience.",keywords:["next page","pagination"],parent:["core/post-content"],textdomain:"default",supports:{customClassName:!1,className:!1,html:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-nextpage-editor"},{name:Nb}=Bb,Tb={icon:Cb,example:{},transforms:Sb,edit:function(){return(0,Ke.createElement)("div",{...(0,nt.useBlockProps)()},(0,Ke.createElement)("span",null,(0,tt.__)("Page break")))},save:function(){return(0,Ke.createElement)(_t.RawHTML,null,"\x3c!--nextpage--\x3e")}},Ib=()=>Xe({name:Nb,metadata:Bb,settings:Tb}),Pb=new WeakMap;function Mb(){const e=(0,gt.useRegistry)();if(!Pb.has(e)){const t=new Map;Pb.set(e,zb.bind(null,t))}return Pb.get(e)}function zb(e,{name:t,blocks:n}){const a=[...n];for(;a.length;){const n=a.shift();for(const e of null!==(o=n.innerBlocks)&&void 0!==o?o:[]){var o;a.unshift(e)}"core/pattern"===n.name&&Rb(e,t,n.attributes.slug)}}function Rb(e,t,n){if(e.has(t)||e.set(t,new Set),e.get(t).add(n),Ab(e,t))throw new TypeError(`Pattern ${t} has a circular dependency and cannot be rendered.`)}function Ab(e,t,n=new Set,a=new Set){var o;n.add(t),a.add(t);const r=null!==(o=e.get(t))&&void 0!==o?o:new Set;for(const t of r)if(n.has(t)){if(a.has(t))return!0}else if(Ab(e,t,n,a))return!0;return a.delete(t),!1}const Hb=({attributes:e,clientId:t})=>{const n=(0,gt.useSelect)((t=>t(nt.store).__experimentalGetParsedPattern(e.slug)),[e.slug]),a=(0,gt.useSelect)((e=>e(dt.store).getCurrentTheme()?.stylesheet),[]),{replaceBlocks:o,setBlockEditingMode:r,__unstableMarkNextChangeAsNotPersistent:l}=(0,gt.useDispatch)(nt.store),{getBlockRootClientId:i,getBlockEditingMode:s}=(0,gt.useSelect)(nt.store),[c,m]=(0,_t.useState)(!1),u=Mb();(0,_t.useEffect)((()=>{if(!c&&n?.blocks){try{u(n)}catch(e){return void m(!0)}window.queueMicrotask((()=>{const e=i(t),c=n.blocks.map((e=>(0,Qe.cloneBlock)(function(e){return e.innerBlocks.find((e=>"core/template-part"===e.name))&&(e.innerBlocks=e.innerBlocks.map((e=>("core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=a),e)))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=a),e}(e)))),m=s(e);l(),r(e,"default"),l(),o(t,c),l(),r(e,m)}))}}),[t,c,n,l,o,s,r,i]);const p=(0,nt.useBlockProps)();return c?(0,Ke.createElement)("div",{...p},(0,Ke.createElement)(nt.Warning,null,(0,tt.sprintf)((0,tt.__)('Pattern "%s" cannot be rendered inside itself.'),n?.name))):(0,Ke.createElement)("div",{...p})},Lb={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/pattern",title:"Pattern placeholder",category:"theme",description:"Show a block pattern.",supports:{html:!1,inserter:!1,renaming:!1,interactivity:{clientNavigation:!0}},textdomain:"default",attributes:{slug:{type:"string"}}},{name:Db}=Lb,Fb={edit:Hb},Vb=()=>Xe({name:Db,metadata:Lb,settings:Fb}),$b=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"}),(0,Ke.createElement)(Ye.Path,{d:"M16 2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2ZM6 3.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z"}),(0,Ke.createElement)(Ye.Path,{d:"M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"}));function Ob(e,t){for(const n of e){if(n.attributes.id===t)return n;if(n.innerBlocks&&n.innerBlocks.length){const e=Ob(n.innerBlocks,t);if(e)return e}}return null}function Gb(e=[],t=null){let n=function(e=[]){const t={},n=[];return e.forEach((({id:e,title:a,link:o,type:r,parent:l})=>{var i;const s=null!==(i=t[e]?.innerBlocks)&&void 0!==i?i:[];t[e]=(0,Qe.createBlock)("core/navigation-link",{id:e,label:a.rendered,url:o,type:r,kind:"post-type"},s),l?(t[l]||(t[l]={innerBlocks:[]}),t[l].innerBlocks.push(t[e])):n.push(t[e])})),n}(e);if(t){const e=Ob(n,t);e&&e.innerBlocks&&(n=e.innerBlocks)}const a=e=>{e.forEach(((e,t,n)=>{const{attributes:o,innerBlocks:r}=e;if(0!==r.length){a(r);const e=(0,Qe.createBlock)("core/navigation-submenu",o,r);n[t]=e}}))};return a(n),n}function Ub({clientId:e,pages:t,parentClientId:n,parentPageID:a}){const{replaceBlock:o,selectBlock:r}=(0,gt.useDispatch)(nt.store);return()=>{const l=Gb(t,a);o(e,l),r(n)}}const qb=(0,tt.__)("This navigation menu displays your website's pages. Editing it will enable you to add, delete, or reorder pages. However, new pages will no longer be added automatically.");function jb({onClick:e,onClose:t,disabled:n}){return(0,Ke.createElement)(et.Modal,{onRequestClose:t,title:(0,tt.__)("Edit Page List"),className:"wp-block-page-list-modal",aria:{describedby:"wp-block-page-list-modal__description"}},(0,Ke.createElement)("p",{id:"wp-block-page-list-modal__description"},qb),(0,Ke.createElement)("div",{className:"wp-block-page-list-modal-buttons"},(0,Ke.createElement)(et.Button,{variant:"tertiary",onClick:t},(0,tt.__)("Cancel")),(0,Ke.createElement)(et.Button,{variant:"primary",disabled:n,onClick:e},(0,tt.__)("Edit"))))}const Wb=()=>{};function Zb({blockProps:e,innerBlocksProps:t,hasResolvedPages:n,blockList:a,pages:o,parentPageID:r}){if(!n)return(0,Ke.createElement)("div",{...e},(0,Ke.createElement)("div",{className:"wp-block-page-list__loading-indicator-container"},(0,Ke.createElement)(et.Spinner,{className:"wp-block-page-list__loading-indicator"})));if(null===o)return(0,Ke.createElement)("div",{...e},(0,Ke.createElement)(et.Notice,{status:"warning",isDismissible:!1},(0,tt.__)("Page List: Cannot retrieve Pages.")));if(0===o.length)return(0,Ke.createElement)("div",{...e},(0,Ke.createElement)(et.Notice,{status:"info",isDismissible:!1},(0,tt.__)("Page List: Cannot retrieve Pages.")));if(0===a.length){const t=o.find((e=>e.id===r));return t?.title?.rendered?(0,Ke.createElement)("div",{...e},(0,Ke.createElement)(nt.Warning,null,(0,tt.sprintf)((0,tt.__)('Page List: "%s" page has no children.'),t.title.rendered))):(0,Ke.createElement)("div",{...e},(0,Ke.createElement)(et.Notice,{status:"warning",isDismissible:!1},(0,tt.__)("Page List: Cannot retrieve Pages.")))}return o.length>0?(0,Ke.createElement)("ul",{...t}):void 0}const Qb={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/page-list",title:"Page List",category:"widgets",allowedBlocks:["core/page-list-item"],description:"Display a list of all pages.",keywords:["menu","navigation"],textdomain:"default",attributes:{parentPageID:{type:"integer",default:0},isNested:{type:"boolean",default:!1}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],supports:{reusable:!1,html:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-page-list-editor",style:"wp-block-page-list"},{name:Kb}=Qb,Yb={icon:$b,example:{},edit:function({context:e,clientId:t,attributes:n,setAttributes:a}){const{parentPageID:o}=n,[r,l]=(0,_t.useState)(!1),i=(0,_t.useCallback)((()=>l(!0)),[]),{records:s,hasResolved:c}=(0,dt.useEntityRecords)("postType","page",{per_page:100,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}),m="showSubmenuIcon"in e&&s?.length>0&&s?.length<=100,u=(0,_t.useMemo)((()=>{if(null===s)return new Map;const e=s.sort(((e,t)=>e.menu_order===t.menu_order?e.title.rendered.localeCompare(t.title.rendered):e.menu_order-t.menu_order));return e.reduce(((e,t)=>{const{parent:n}=t;return e.has(n)?e.get(n).push(t):e.set(n,[t]),e}),new Map)}),[s]),p=(0,nt.useBlockProps)({className:ut()("wp-block-page-list",{"has-text-color":!!e.textColor,[(0,nt.getColorClassName)("color",e.textColor)]:!!e.textColor,"has-background":!!e.backgroundColor,[(0,nt.getColorClassName)("background-color",e.backgroundColor)]:!!e.backgroundColor}),style:{...e.style?.color}}),d=(0,_t.useMemo)((function e(t=0,n=0){const a=u.get(t);return a?.length?a.reduce(((t,a)=>{const o=u.has(a.id),r={value:a.id,label:"— ".repeat(n)+a.title.rendered,rawName:a.title.rendered};return t.push(r),o&&t.push(...e(a.id,n+1)),t}),[]):[]}),[u]),g=(0,_t.useMemo)((function e(t=o){const n=u.get(t);return n?.length?n.reduce(((t,n)=>{const a=u.has(n.id),o={id:n.id,label:""!==n.title?.rendered?.trim()?n.title?.rendered:(0,tt.__)("(no title)"),title:n.title?.rendered,link:n.url,hasChildren:a};let r=null;const l=e(n.id);return r=(0,Qe.createBlock)("core/page-list-item",o,l),t.push(r),t}),[]):[]}),[u,o]),{isNested:h,hasSelectedChild:b,parentClientId:_,hasDraggedChild:y,isChildOfNavigation:v}=(0,gt.useSelect)((e=>{const{getBlockParentsByBlockName:n,hasSelectedInnerBlock:a,hasDraggedInnerBlock:o}=e(nt.store),r=n(t,"core/navigation-submenu",!0),l=n(t,"core/navigation",!0);return{isNested:r.length>0,isChildOfNavigation:l.length>0,hasSelectedChild:a(t,!0),hasDraggedChild:o(t,!0),parentClientId:l[0]}}),[t]),f=Ub({clientId:t,pages:s,parentClientId:_,parentPageID:o}),k=(0,nt.useInnerBlocksProps)(p,{renderAppender:!1,__unstableDisableDropZone:!0,templateLock:!v&&"all",onInput:Wb,onChange:Wb,value:g}),{selectBlock:x}=(0,gt.useDispatch)(nt.store);return(0,_t.useEffect)((()=>{(b||y)&&(i(),x(_))}),[b,y,_,x,i]),(0,_t.useEffect)((()=>{a({isNested:h})}),[h,a]),(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,d.length>0&&(0,Ke.createElement)(et.PanelBody,null,(0,Ke.createElement)(et.ComboboxControl,{__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,tt.__)("Parent"),value:o,options:d,onChange:e=>a({parentPageID:null!=e?e:0}),help:(0,tt.__)("Choose a page to show only its subpages.")})),m&&(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Edit this menu")},(0,Ke.createElement)("p",null,qb),(0,Ke.createElement)(et.Button,{variant:"primary",disabled:!c,onClick:f},(0,tt.__)("Edit")))),m&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(et.ToolbarButton,{title:(0,tt.__)("Edit"),onClick:i},(0,tt.__)("Edit"))),r&&(0,Ke.createElement)(jb,{onClick:f,onClose:()=>l(!1),disabled:!c})),(0,Ke.createElement)(Zb,{blockProps:p,innerBlocksProps:k,hasResolvedPages:c,blockList:g,pages:s,parentPageID:o}))}},Jb=()=>Xe({name:Kb,metadata:Qb,settings:Yb}),Xb=()=>(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},(0,Ke.createElement)(et.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"}));const e_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/page-list-item",title:"Page List Item",category:"widgets",parent:["core/page-list"],description:"Displays a page inside a list of all pages.",keywords:["page","menu","navigation"],textdomain:"default",attributes:{id:{type:"number"},label:{type:"string"},title:{type:"string"},link:{type:"string"},hasChildren:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],supports:{reusable:!1,html:!1,lock:!1,inserter:!1,__experimentalToolbar:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-page-list-editor",style:"wp-block-page-list"},{name:t_}=e_,n_={__experimentalLabel:({label:e})=>e,icon:ob,example:{},edit:function({context:e,attributes:t}){const{id:n,label:a,link:o,hasChildren:r,title:l}=t,i="showSubmenuIcon"in e,s=(0,gt.useSelect)((e=>{if(!e(dt.store).canUser("read","settings"))return;const t=e(dt.store).getEntityRecord("root","site");return"page"===t?.show_on_front&&t?.page_on_front}),[]),c=bh(hh(e,!0)),m=(0,nt.useBlockProps)(c,{className:"wp-block-pages-list__item"}),u=(0,nt.useInnerBlocksProps)(m);return(0,Ke.createElement)("li",{key:n,className:ut()("wp-block-pages-list__item",{"has-child":r,"wp-block-navigation-item":i,"open-on-click":e.openSubmenusOnClick,"open-on-hover-click":!e.openSubmenusOnClick&&e.showSubmenuIcon,"menu-item-home":n===s})},r&&e.openSubmenusOnClick?(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("button",{type:"button",className:"wp-block-navigation-item__content wp-block-navigation-submenu__toggle","aria-expanded":"false"},(0,Jn.decodeEntities)(a)),(0,Ke.createElement)("span",{className:"wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon"},(0,Ke.createElement)(Xb,null))):(0,Ke.createElement)("a",{className:ut()("wp-block-pages-list__item__link",{"wp-block-navigation-item__content":i}),href:o},(0,Jn.decodeEntities)(l)),r&&(0,Ke.createElement)(Ke.Fragment,null,!e.openSubmenusOnClick&&e.showSubmenuIcon&&(0,Ke.createElement)("button",{className:"wp-block-navigation-item__content wp-block-navigation-submenu__toggle wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon","aria-expanded":"false",type:"button"},(0,Ke.createElement)(Xb,null)),(0,Ke.createElement)("ul",{...u})))}},a_=()=>Xe({name:t_,metadata:e_,settings:n_}),o_=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"})),r_={className:!1},l_={align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:""},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},textColor:{type:"string"},backgroundColor:{type:"string"},fontSize:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]},style:{type:"object"}},i_=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customFontSize)return e;const t={};(e.customTextColor||e.customBackgroundColor)&&(t.color={}),e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customFontSize&&(t.typography={fontSize:e.customFontSize});const{customTextColor:n,customBackgroundColor:a,customFontSize:o,...r}=e;return{...r,style:t}},{style:s_,...c_}=l_,m_=[{supports:r_,attributes:{...c_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},save({attributes:e}){const{align:t,content:n,dropCap:a,direction:o}=e,r=ut()({"has-drop-cap":t!==((0,tt.isRTL)()?"left":"right")&&"center"!==t&&a,[`has-text-align-${t}`]:t});return(0,Ke.createElement)("p",{...nt.useBlockProps.save({className:r,dir:o})},(0,Ke.createElement)(nt.RichText.Content,{value:n}))}},{supports:r_,attributes:{...c_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:i_,save({attributes:e}){const{align:t,content:n,dropCap:a,backgroundColor:o,textColor:r,customBackgroundColor:l,customTextColor:i,fontSize:s,customFontSize:c,direction:m}=e,u=(0,nt.getColorClassName)("color",r),p=(0,nt.getColorClassName)("background-color",o),d=(0,nt.getFontSizeClass)(s),g=ut()({"has-text-color":r||i,"has-background":o||l,"has-drop-cap":a,[`has-text-align-${t}`]:t,[d]:d,[u]:u,[p]:p}),h={backgroundColor:p?void 0:l,color:u?void 0:i,fontSize:d?void 0:c};return(0,Ke.createElement)(nt.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:n,dir:m})}},{supports:r_,attributes:{...c_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:i_,save({attributes:e}){const{align:t,content:n,dropCap:a,backgroundColor:o,textColor:r,customBackgroundColor:l,customTextColor:i,fontSize:s,customFontSize:c,direction:m}=e,u=(0,nt.getColorClassName)("color",r),p=(0,nt.getColorClassName)("background-color",o),d=(0,nt.getFontSizeClass)(s),g=ut()({"has-text-color":r||i,"has-background":o||l,"has-drop-cap":a,[d]:d,[u]:u,[p]:p}),h={backgroundColor:p?void 0:l,color:u?void 0:i,fontSize:d?void 0:c,textAlign:t};return(0,Ke.createElement)(nt.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:n,dir:m})}},{supports:r_,attributes:{...c_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"},width:{type:"string"}},migrate:i_,save({attributes:e}){const{width:t,align:n,content:a,dropCap:o,backgroundColor:r,textColor:l,customBackgroundColor:i,customTextColor:s,fontSize:c,customFontSize:m}=e,u=(0,nt.getColorClassName)("color",l),p=(0,nt.getColorClassName)("background-color",r),d=c&&`is-${c}-text`,g=ut()({[`align${t}`]:t,"has-background":r||i,"has-drop-cap":o,[d]:d,[u]:u,[p]:p}),h={backgroundColor:p?void 0:i,color:u?void 0:s,fontSize:d?void 0:m,textAlign:n};return(0,Ke.createElement)(nt.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:a})}},{supports:r_,attributes:{...c_,fontSize:{type:"number"}},save({attributes:e}){const{width:t,align:n,content:a,dropCap:o,backgroundColor:r,textColor:l,fontSize:i}=e,s=ut()({[`align${t}`]:t,"has-background":r,"has-drop-cap":o}),c={backgroundColor:r,color:l,fontSize:i,textAlign:n};return(0,Ke.createElement)("p",{style:c,className:s||void 0},a)},migrate:e=>i_({...e,customFontSize:Number.isFinite(e.fontSize)?e.fontSize:void 0,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.backgroundColor&&"#"===e.backgroundColor[0]?e.backgroundColor:void 0})},{supports:r_,attributes:{...l_,content:{type:"string",source:"html",default:""}},save:({attributes:e})=>(0,Ke.createElement)(_t.RawHTML,null,e.content),migrate:e=>e}],u_=m_,p_=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z"}));function d_(e){const{batch:t}=(0,gt.useRegistry)(),{moveBlocksToPosition:n,replaceInnerBlocks:a,duplicateBlocks:o,insertBlock:r}=(0,gt.useDispatch)(nt.store),{getBlockRootClientId:l,getBlockIndex:i,getBlockOrder:s,getBlockName:c,getBlock:m,getNextBlockClientId:u,canInsertBlockType:p}=(0,gt.useSelect)(nt.store),d=(0,_t.useRef)(e);return d.current=e,(0,jt.useRefEffect)((e=>{function g(e){if(e.defaultPrevented)return;if(e.keyCode!==fn.ENTER)return;const{content:g,clientId:h}=d.current;if(g.length)return;const b=l(h);if(!(0,Qe.hasBlockSupport)(c(b),"__experimentalOnEnter",!1))return;const _=s(b),y=_.indexOf(h);if(y===_.length-1){let t=b;for(;!p(c(h),l(t));)t=l(t);return void("string"==typeof t&&(e.preventDefault(),n([h],b,l(t),i(t)+1)))}const v=(0,Qe.getDefaultBlockName)();if(!p(v,l(b)))return;e.preventDefault();const f=m(b);t((()=>{o([b]);const e=i(b);a(b,f.innerBlocks.slice(0,y)),a(u(b),f.innerBlocks.slice(y+1)),r((0,Qe.createBlock)(v),e+1,l(b),!0)}))}return e.addEventListener("keydown",g),()=>{e.removeEventListener("keydown",g)}}),[])}function g_({direction:e,setDirection:t}){return(0,tt.isRTL)()&&(0,Ke.createElement)(et.ToolbarButton,{icon:p_,title:(0,tt._x)("Left to right","editor button"),isActive:"ltr"===e,onClick:()=>{t("ltr"===e?void 0:"ltr")}})}function h_(e){return e===((0,tt.isRTL)()?"left":"right")||"center"===e}function b_({clientId:e,attributes:t,setAttributes:n}){const[a]=(0,nt.useSettings)("typography.dropCap");if(!a)return null;const{align:o,dropCap:r}=t;let l;return l=h_(o)?(0,tt.__)("Not available for aligned text."):r?(0,tt.__)("Showing large initial letter."):(0,tt.__)("Toggle to show a large initial letter."),(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>!!r,label:(0,tt.__)("Drop cap"),onDeselect:()=>n({dropCap:void 0}),resetAllFilter:()=>({dropCap:void 0}),panelId:e},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Drop cap"),checked:!!r,onChange:()=>n({dropCap:!r}),help:l,disabled:!!h_(o)}))}const __=function({attributes:e,mergeBlocks:t,onReplace:n,onRemove:a,setAttributes:o,clientId:r}){const{align:l,content:i,direction:s,dropCap:c,placeholder:m}=e,u=(0,nt.useBlockProps)({ref:d_({clientId:r,content:i}),className:ut()({"has-drop-cap":!h_(l)&&c,[`has-text-align-${l}`]:l}),style:{direction:s}}),p=(0,nt.useBlockEditingMode)();return(0,Ke.createElement)(Ke.Fragment,null,"default"===p&&(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:l,onChange:e=>o({align:e,dropCap:!h_(e)&&c})}),(0,Ke.createElement)(g_,{direction:s,setDirection:e=>o({direction:e})})),(0,Ke.createElement)(nt.InspectorControls,{group:"typography"},(0,Ke.createElement)(b_,{clientId:r,attributes:e,setAttributes:o})),(0,Ke.createElement)(nt.RichText,{identifier:"content",tagName:"p",...u,value:i,onChange:e=>o({content:e}),onSplit:(t,n)=>{let a;(n||t)&&(a={...e,content:t});const o=(0,Qe.createBlock)("core/paragraph",a);return n&&(o.clientId=r),o},onMerge:t,onReplace:n,onRemove:a,"aria-label":nt.RichText.isEmpty(i)?(0,tt.__)("Empty block; start writing or type forward slash to choose a block"):(0,tt.__)("Block: Paragraph"),"data-empty":nt.RichText.isEmpty(i),placeholder:m||(0,tt.__)("Type / to choose a block"),"data-custom-placeholder":!!m||void 0,__unstableEmbedURLOnPaste:!0,__unstableAllowPrefixTransformations:!0}))};const{name:y_}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/paragraph",title:"Paragraph",category:"text",description:"Start with the basic building block of all narrative.",keywords:["text"],textdomain:"default",usesContext:["postId"],attributes:{align:{type:"string"},content:{type:"rich-text",source:"rich-text",selector:"p",__experimentalRole:"content"},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]}},supports:{anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalSelector:"p",__unstablePasteTextInline:!0,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-paragraph-editor",style:"wp-block-paragraph"},v_={from:[{type:"raw",priority:20,selector:"p",schema:({phrasingContentSchema:e,isPaste:t})=>({p:{children:e,attributes:t?[]:["style","id"]}}),transform(e){const t=(0,Qe.getBlockAttributes)(y_,e.outerHTML),{textAlign:n}=e.style||{};return"left"!==n&&"center"!==n&&"right"!==n||(t.align=n),(0,Qe.createBlock)(y_,t)}}]},f_=v_,k_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/paragraph",title:"Paragraph",category:"text",description:"Start with the basic building block of all narrative.",keywords:["text"],textdomain:"default",usesContext:["postId"],attributes:{align:{type:"string"},content:{type:"rich-text",source:"rich-text",selector:"p",__experimentalRole:"content"},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]}},supports:{anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalSelector:"p",__unstablePasteTextInline:!0,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-paragraph-editor",style:"wp-block-paragraph"},{name:x_}=k_,w_={icon:o_,example:{attributes:{content:(0,tt.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}},__experimentalLabel(e,{context:t}){const n=e?.metadata?.name;if("list-view"===t&&n)return n;if("accessibility"===t){if(n)return n;const{content:t}=e;return t&&0!==t.length?t:(0,tt.__)("Empty")}},transforms:f_,deprecated:u_,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:__,save:function({attributes:e}){const{align:t,content:n,dropCap:a,direction:o}=e,r=ut()({"has-drop-cap":t!==((0,tt.isRTL)()?"left":"right")&&"center"!==t&&a,[`has-text-align-${t}`]:t});return(0,Ke.createElement)("p",{...nt.useBlockProps.save({className:r,dir:o})},(0,Ke.createElement)(nt.RichText.Content,{value:n}))}},E_=()=>Xe({name:x_,metadata:k_,settings:w_}),C_=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z",fillRule:"evenodd",clipRule:"evenodd"})),S_={who:"authors",per_page:100};const B_=function({isSelected:e,context:{postType:t,postId:n,queryId:a},attributes:o,setAttributes:r}){const l=Number.isFinite(a),{authorId:i,authorDetails:s,authors:c}=(0,gt.useSelect)((e=>{const{getEditedEntityRecord:a,getUser:o,getUsers:r}=e(dt.store),l=a("postType",t,n)?.author;return{authorId:l,authorDetails:l?o(l):null,authors:r(S_)}}),[t,n]),{editEntityRecord:m}=(0,gt.useDispatch)(dt.store),{textAlign:u,showAvatar:p,showBio:d,byline:g,isLink:h,linkTarget:b}=o,_=[],y=s?.name||(0,tt.__)("Post Author");s?.avatar_urls&&Object.keys(s.avatar_urls).forEach((e=>{_.push({value:e,label:`${e} x ${e}`})}));const v=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${u}`]:u})}),f=c?.length?c.map((({id:e,name:t})=>({value:e,label:t}))):[],k=e=>{m("postType",t,n,{author:e})},x=f.length>=25,w=!!n&&!l&&f.length>0;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},w&&(x&&(0,Ke.createElement)(et.ComboboxControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Author"),options:f,value:i,onChange:k,allowReset:!1})||(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Author"),value:i,options:f,onChange:k})),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show avatar"),checked:p,onChange:()=>r({showAvatar:!p})}),p&&(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Avatar size"),value:o.avatarSize,options:_,onChange:e=>{r({avatarSize:Number(e)})}}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show bio"),checked:d,onChange:()=>r({showBio:!d})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link author name to author page"),checked:h,onChange:()=>r({isLink:!h})}),h&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>r({linkTarget:e?"_blank":"_self"}),checked:"_blank"===b}))),(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:u,onChange:e=>{r({textAlign:e})}})),(0,Ke.createElement)("div",{...v},p&&s?.avatar_urls&&(0,Ke.createElement)("div",{className:"wp-block-post-author__avatar"},(0,Ke.createElement)("img",{width:o.avatarSize,src:s.avatar_urls[o.avatarSize],alt:s.name})),(0,Ke.createElement)("div",{className:"wp-block-post-author__content"},(!nt.RichText.isEmpty(g)||e)&&(0,Ke.createElement)(nt.RichText,{className:"wp-block-post-author__byline","aria-label":(0,tt.__)("Post author byline text"),placeholder:(0,tt.__)("Write byline…"),value:g,onChange:e=>r({byline:e})}),(0,Ke.createElement)("p",{className:"wp-block-post-author__name"},h?(0,Ke.createElement)("a",{href:"#post-author-pseudo-link",onClick:e=>e.preventDefault()},y):y),d&&(0,Ke.createElement)("p",{className:"wp-block-post-author__bio",dangerouslySetInnerHTML:{__html:s?.description}}))))},N_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-author",title:"Author",category:"theme",description:"Display post author details such as name, avatar, and bio.",textdomain:"default",attributes:{textAlign:{type:"string"},avatarSize:{type:"number",default:48},showAvatar:{type:"boolean",default:!0},showBio:{type:"boolean"},byline:{type:"string"},isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},usesContext:["postType","postId","queryId"],supports:{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}},color:{gradients:!0,link:!0,__experimentalDuotone:".wp-block-post-author__avatar img",__experimentalDefaultControls:{background:!0,text:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-post-author"},{name:T_}=N_,I_={icon:C_,edit:B_},P_=()=>Xe({name:T_,metadata:N_,settings:I_});const M_=function({context:{postType:e,postId:t},attributes:{textAlign:n,isLink:a,linkTarget:o},setAttributes:r}){const{authorName:l}=(0,gt.useSelect)((n=>{const{getEditedEntityRecord:a,getUser:o}=n(dt.store),r=a("postType",e,t)?.author;return{authorName:r?o(r):null}}),[e,t]),i=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${n}`]:n})}),s=l?.name||(0,tt.__)("Author Name"),c=a?(0,Ke.createElement)("a",{href:"#author-pseudo-link",onClick:e=>e.preventDefault(),className:"wp-block-post-author-name__link"},s):s;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:n,onChange:e=>{r({textAlign:e})}})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link to author archive"),onChange:()=>r({isLink:!a}),checked:a}),a&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>r({linkTarget:e?"_blank":"_self"}),checked:"_blank"===o}))),(0,Ke.createElement)("div",{...i}," ",c," "))},z_={from:[{type:"block",blocks:["core/post-author"],transform:({textAlign:e})=>(0,Qe.createBlock)("core/post-author-name",{textAlign:e})}],to:[{type:"block",blocks:["core/post-author"],transform:({textAlign:e})=>(0,Qe.createBlock)("core/post-author",{textAlign:e})}]},R_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-author-name",title:"Author Name",category:"theme",description:"The author name.",textdomain:"default",attributes:{textAlign:{type:"string"},isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},usesContext:["postType","postId"],supports:{html:!1,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:A_}=R_,H_={icon:C_,transforms:z_,edit:M_},L_=()=>Xe({name:A_,metadata:R_,settings:H_});const D_=function({context:{postType:e,postId:t},attributes:{textAlign:n},setAttributes:a}){const{authorDetails:o}=(0,gt.useSelect)((n=>{const{getEditedEntityRecord:a,getUser:o}=n(dt.store),r=a("postType",e,t)?.author;return{authorDetails:r?o(r):null}}),[e,t]),r=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${n}`]:n})}),l=o?.description||(0,tt.__)("Author Biography");return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:n,onChange:e=>{a({textAlign:e})}})),(0,Ke.createElement)("div",{...r,dangerouslySetInnerHTML:{__html:l}}))},F_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-author-biography",title:"Author Biography",category:"theme",description:"The author biography.",textdomain:"default",attributes:{textAlign:{type:"string"}},usesContext:["postType","postId"],supports:{spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!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}},interactivity:{clientNavigation:!0}}},{name:V_}=F_,$_={icon:C_,edit:D_},O_=()=>Xe({name:V_,metadata:F_,settings:$_}),G_=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.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"})),U_=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]];const q_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:"fse",name:"core/post-comment",title:"Comment (deprecated)",category:"theme",allowedBlocks:["core/avatar","core/comment-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link"],description:"This block is deprecated. Please use the Comments block instead.",textdomain:"default",attributes:{commentId:{type:"number"}},providesContext:{commentId:"commentId"},supports:{html:!1,inserter:!1,interactivity:{clientNavigation:!0}}},{name:j_}=q_,W_={icon:kp,edit:function({attributes:{commentId:e},setAttributes:t}){const[n,a]=(0,_t.useState)(e),o=(0,nt.useBlockProps)(),r=(0,nt.useInnerBlocksProps)(o,{template:U_});return e?(0,Ke.createElement)("div",{...r}):(0,Ke.createElement)("div",{...o},(0,Ke.createElement)(et.Placeholder,{icon:G_,label:(0,tt._x)("Post Comment","block title"),instructions:(0,tt.__)("To show a comment, input the comment ID.")},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,value:e,onChange:e=>a(parseInt(e))}),(0,Ke.createElement)(et.Button,{variant:"primary",onClick:()=>{t({commentId:n})}},(0,tt.__)("Save"))))},save:function(){const e=nt.useBlockProps.save(),t=nt.useInnerBlocksProps.save(e);return(0,Ke.createElement)("div",{...t})}},Z_=()=>Xe({name:j_,metadata:q_,settings:W_}),Q_=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.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-1V13c0-.6-.4-1-1-1zm-2.2 6.6H7l1.6-2.2c.3-.4.5-.7.6-.9.1-.2.2-.4.2-.5 0-.2-.1-.3-.1-.4-.1-.1-.2-.1-.4-.1s-.4 0-.6.1c-.3.1-.5.3-.7.4l-.2.2-.2-1.2.1-.1c.3-.2.5-.3.8-.4.3-.1.6-.1.9-.1.3 0 .6.1.9.2.2.1.4.3.6.5.1.2.2.5.2.7 0 .3-.1.6-.2.9-.1.3-.4.7-.7 1.1l-.5.6h1.6v1.2z"}));const K_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:"fse",name:"core/post-comments-count",title:"Comments Count",category:"theme",description:"Display a post's comments count.",textdomain:"default",attributes:{textAlign:{type:"string"}},usesContext:["postId"],supports:{html:!1,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},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}},interactivity:{clientNavigation:!0}}},{name:Y_}=K_,J_={icon:Q_,edit:function({attributes:e,context:t,setAttributes:n}){const{textAlign:a}=e,{postId:o}=t,[r,l]=(0,_t.useState)(),i=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${a}`]:a})});(0,_t.useEffect)((()=>{if(!o)return;const e=o;jo()({path:(0,pt.addQueryArgs)("/wp/v2/comments",{post:o}),parse:!1}).then((t=>{e===o&&l(t.headers.get("X-WP-Total"))}))}),[o]);const s=o&&void 0!==r,c={...i.style,textDecoration:s?i.style?.textDecoration:void 0};return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:a,onChange:e=>{n({textAlign:e})}})),(0,Ke.createElement)("div",{...i,style:c},s?r:(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Post Comments Count block: post not found."))))}},X_=()=>Xe({name:Y_,metadata:K_,settings:J_}),ey=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.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-1V13c0-.6-.4-1-1-1zm-.5 6.6H6.7l-1.2 1.2v-6.3h7v5.1z"}));const ty={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-comments-form",title:"Comments Form",category:"theme",description:"Display a post's comments form.",textdomain:"default",attributes:{textAlign:{type:"string"}},usesContext:["postId","postType"],supports:{html:!1,color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-post-comments-form-editor",style:["wp-block-post-comments-form","wp-block-buttons","wp-block-button"]},{name:ny}=ty,ay={icon:ey,edit:function e({attributes:t,context:n,setAttributes:a}){const{textAlign:o}=t,{postId:r,postType:l}=n,i=(0,jt.useInstanceId)(e),s=(0,tt.sprintf)("comments-form-edit-%d-desc",i),c=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${o}`]:o}),"aria-describedby":s});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:o,onChange:e=>{a({textAlign:e})}})),(0,Ke.createElement)("div",{...c},(0,Ke.createElement)(eo,{postId:r,postType:l}),(0,Ke.createElement)(et.VisuallyHidden,{id:s},(0,tt.__)("Comments form disabled in editor."))))}},oy=()=>Xe({name:ny,metadata:ty,settings:ay});const ry=function({context:e,attributes:t,setAttributes:n}){const{textAlign:a}=t,{postType:o,postId:r}=e,[l,i]=(0,_t.useState)(),s=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${a}`]:a})});(0,_t.useEffect)((()=>{if(!r)return;const e=r;jo()({path:(0,pt.addQueryArgs)("/wp/v2/comments",{post:r}),parse:!1}).then((t=>{e===r&&i(t.headers.get("X-WP-Total"))}))}),[r]);const c=(0,gt.useSelect)((e=>e(dt.store).getEditedEntityRecord("postType",o,r)),[o,r]);if(!c)return null;const{link:m}=c;let u;if(void 0!==l){const e=parseInt(l);u=0===e?(0,tt.__)("No comments"):(0,tt.sprintf)((0,tt._n)("%s comment","%s comments",e),e.toLocaleString())}return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:a,onChange:e=>{n({textAlign:e})}})),(0,Ke.createElement)("div",{...s},m&&void 0!==u?(0,Ke.createElement)("a",{href:m+"#comments",onClick:e=>e.preventDefault()},u):(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Post Comments Link block: post not found."))))},ly={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:"fse",name:"core/post-comments-link",title:"Comments Link",category:"theme",description:"Displays the link to the current post comments.",textdomain:"default",usesContext:["postType","postId"],attributes:{textAlign:{type:"string"}},supports:{html:!1,color:{link:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},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}},interactivity:{clientNavigation:!0}}},{name:iy}=ly,sy={edit:ry,icon:Q_},cy=()=>Xe({name:iy,metadata:ly,settings:sy}),my=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"}));function uy(e,t,n){return(0,gt.useSelect)((a=>a(dt.store).canUserEditEntityRecord(e,t,n)),[e,t,n])}function py({layoutClassNames:e,userCanEdit:t,postType:n,postId:a}){const[,,o]=(0,dt.useEntityProp)("postType",n,"content",a),r=(0,nt.useBlockProps)({className:e});return o?.protected&&!t?(0,Ke.createElement)("div",{...r},(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("This content is password protected."))):(0,Ke.createElement)("div",{...r,dangerouslySetInnerHTML:{__html:o?.rendered}})}function dy({context:e={}}){const{postType:t,postId:n}=e,[a,o,r]=(0,dt.useEntityBlockEditor)("postType",t,{id:n}),l=(0,gt.useSelect)((e=>e(dt.store).getEntityRecord("postType",t,n)),[t,n]),i=!!l?.content?.raw||a?.length,s=(0,nt.useInnerBlocksProps)((0,nt.useBlockProps)({className:"entry-content"}),{value:a,onInput:o,onChange:r,template:i?void 0:[["core/paragraph"]]});return(0,Ke.createElement)("div",{...s})}function gy(e){const{context:{queryId:t,postType:n,postId:a}={},layoutClassNames:o}=e,r=uy("postType",n,a);if(void 0===r)return null;const l=Number.isFinite(t);return r&&!l?(0,Ke.createElement)(dy,{...e}):(0,Ke.createElement)(py,{layoutClassNames:o,userCanEdit:r,postType:n,postId:a})}function hy({layoutClassNames:e}){const t=(0,nt.useBlockProps)({className:e});return(0,Ke.createElement)("div",{...t},(0,Ke.createElement)("p",null,(0,tt.__)("This is the Content block, it will display all the blocks in any single post or page.")),(0,Ke.createElement)("p",null,(0,tt.__)("That might be a simple arrangement like consecutive paragraphs in a blog post, or a more elaborate composition that includes image galleries, videos, tables, columns, and any other block types.")),(0,Ke.createElement)("p",null,(0,tt.__)("If there are any Custom Post Types registered at your site, the Content block can display the contents of those entries as well.")))}function by(){const e=(0,nt.useBlockProps)();return(0,Ke.createElement)("div",{...e},(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Block cannot be rendered inside itself.")))}const _y={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-content",title:"Content",category:"theme",description:"Displays the contents of a post or page.",textdomain:"default",usesContext:["postId","postType","queryId"],supports:{align:["wide","full"],html:!1,layout:!0,dimensions:{minHeight:!0},spacing:{blockGap:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!1,text:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-post-content-editor"},{name:yy}=_y,vy={icon:my,edit:function({context:e,__unstableLayoutClassNames:t}){const{postId:n,postType:a}=e,o=(0,nt.useHasRecursion)(n);return n&&a&&o?(0,Ke.createElement)(by,null):(0,Ke.createElement)(nt.RecursionProvider,{uniqueId:n},n&&a?(0,Ke.createElement)(gy,{context:e,layoutClassNames:t}):(0,Ke.createElement)(hy,{layoutClassNames:t}))}},fy=()=>Xe({name:yy,metadata:_y,settings:vy});function ky(e){return/(?:^|[^\\])[aAgh]/.test(e)}const xy={attributes:{textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},wy=[xy],Ey=[{name:"post-date-modified",title:(0,tt.__)("Modified Date"),description:(0,tt.__)("Display a post's last updated date."),attributes:{displayType:"modified"},scope:["block","inserter"],isActive:e=>"modified"===e.displayType,icon:Co}],Cy=Ey,Sy={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-date",title:"Date",category:"theme",description:"Display the publish date for an entry such as a post or page.",textdomain:"default",attributes:{textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1},displayType:{type:"string",default:"date"}},usesContext:["postId","postType","queryId"],supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},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}},interactivity:{clientNavigation:!0}}},{name:By}=Sy,Ny={icon:Co,edit:function({attributes:{textAlign:e,format:t,isLink:n,displayType:a},context:{postId:o,postType:r,queryId:l},setAttributes:i}){const s=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${e}`]:e,"wp-block-post-date__modified-date":"modified"===a})}),[c,m]=(0,_t.useState)(null),u=(0,_t.useMemo)((()=>({anchor:c})),[c]),p=Number.isFinite(l),d=(0,So.getSettings)(),[g=d.formats.date]=(0,dt.useEntityProp)("root","site","date_format"),[h=d.formats.time]=(0,dt.useEntityProp)("root","site","time_format"),[b,_]=(0,dt.useEntityProp)("postType",r,a,o),y=(0,gt.useSelect)((e=>r?e(dt.store).getPostType(r):null),[r]),v="date"===a?(0,tt.__)("Post Date"):(0,tt.__)("Post Modified Date");let f=b?(0,Ke.createElement)("time",{dateTime:(0,So.dateI18n)("c",b),ref:m},(0,So.dateI18n)(t||g,b)):v;return n&&b&&(f=(0,Ke.createElement)("a",{href:"#post-date-pseudo-link",onClick:e=>e.preventDefault()},f)),(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:e,onChange:e=>{i({textAlign:e})}}),b&&"date"===a&&!p&&(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.Dropdown,{popoverProps:u,renderContent:({onClose:e})=>(0,Ke.createElement)(nt.__experimentalPublishDateTimePicker,{currentDate:b,onChange:_,is12Hour:ky(h),onClose:e}),renderToggle:({isOpen:e,onToggle:t})=>(0,Ke.createElement)(et.ToolbarButton,{"aria-expanded":e,icon:Di,title:(0,tt.__)("Change Date"),onClick:t,onKeyDown:n=>{e||n.keyCode!==fn.DOWN||(n.preventDefault(),t())}})}))),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(nt.__experimentalDateFormatPicker,{format:t,defaultFormat:g,onChange:e=>i({format:e})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:y?.labels.singular_name?(0,tt.sprintf)((0,tt.__)("Link to %s"),y.labels.singular_name.toLowerCase()):(0,tt.__)("Link to post"),onChange:()=>i({isLink:!n}),checked:n}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display last modified date"),onChange:e=>i({displayType:e?"modified":"date"}),checked:"modified"===a,help:(0,tt.__)("Only shows if the post has been modified")}))),(0,Ke.createElement)("div",{...s},f))},deprecated:wy,variations:Cy},Ty=()=>Xe({name:By,metadata:Sy,settings:Ny}),Iy=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z"}));const Py={from:[{type:"block",blocks:["core/post-content"],transform:()=>(0,Qe.createBlock)("core/post-excerpt")}],to:[{type:"block",blocks:["core/post-content"],transform:()=>(0,Qe.createBlock)("core/post-content")}]},My={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-excerpt",title:"Excerpt",category:"theme",description:"Display the excerpt.",textdomain:"default",attributes:{textAlign:{type:"string"},moreText:{type:"string"},showMoreOnNewLine:{type:"boolean",default:!0},excerptLength:{type:"number",default:55}},usesContext:["postId","postType","queryId"],supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},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}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-post-excerpt-editor",style:"wp-block-post-excerpt"},{name:zy}=My,Ry={icon:Iy,transforms:Py,edit:function({attributes:{textAlign:e,moreText:t,showMoreOnNewLine:n,excerptLength:a},setAttributes:o,isSelected:r,context:{postId:l,postType:i,queryId:s}}){const c=Number.isFinite(s),m=uy("postType",i,l),[u,p,{rendered:d,protected:g}={}]=(0,dt.useEntityProp)("postType",i,"excerpt",l),h=(0,gt.useSelect)((e=>"page"===i||!!e(dt.store).getPostType(i)?.supports?.excerpt),[i]),b=m&&!c&&h,_=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${e}`]:e})}),y=(0,tt._x)("words","Word count type. Do not translate!"),v=(0,_t.useMemo)((()=>{if(!d)return"";const e=(new window.DOMParser).parseFromString(d,"text/html");return e.body.textContent||e.body.innerText||""}),[d]);if(!i||!l)return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(nt.AlignmentToolbar,{value:e,onChange:e=>o({textAlign:e})})),(0,Ke.createElement)("div",{..._},(0,Ke.createElement)("p",null,(0,tt.__)("This block will display the excerpt."))));if(g&&!m)return(0,Ke.createElement)("div",{..._},(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("The content is currently protected and does not have the available excerpt.")));const f=(0,Ke.createElement)(nt.RichText,{className:"wp-block-post-excerpt__more-link",tagName:"a","aria-label":(0,tt.__)("“Read more” link text"),placeholder:(0,tt.__)('Add "read more" link text'),value:t,onChange:e=>o({moreText:e}),withoutInteractiveFormatting:!0}),k=ut()("wp-block-post-excerpt__excerpt",{"is-inline":!n}),x=(u||v).trim();let w="";if("words"===y)w=x.split(" ",a).join(" ");else if("characters_excluding_spaces"===y){const e=x.split("",a).join(""),t=e.length-e.replaceAll(" ","").length;w=x.split("",a+t).join("")}else"characters_including_spaces"===y&&(w=x.split("",a).join(""));const E=w!==x,C=b?(0,Ke.createElement)(nt.RichText,{className:k,"aria-label":(0,tt.__)("Excerpt text"),value:r?x:(E?w+"…":x)||(0,tt.__)("No excerpt found"),onChange:p,tagName:"p"}):(0,Ke.createElement)("p",{className:k},E?w+"…":x||(0,tt.__)("No excerpt found"));return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(nt.AlignmentToolbar,{value:e,onChange:e=>o({textAlign:e})})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show link on new line"),checked:n,onChange:e=>o({showMoreOnNewLine:e})}),(0,Ke.createElement)(et.RangeControl,{label:(0,tt.__)("Max number of words"),value:a,onChange:e=>{o({excerptLength:e})},min:"10",max:"100"}))),(0,Ke.createElement)("div",{..._},C,!n&&" ",n?(0,Ke.createElement)("p",{className:"wp-block-post-excerpt__more-text"},f):f))}},Ay=()=>Xe({name:zy,metadata:My,settings:Ry}),Hy=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"})),Ly=(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"cover",label:(0,tt._x)("Cover","Scale option for Image dimension control")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"contain",label:(0,tt._x)("Contain","Scale option for Image dimension control")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"fill",label:(0,tt._x)("Fill","Scale option for Image dimension control")})),Dy="cover",Fy={cover:(0,tt.__)("Image is scaled and cropped to fill the entire space without being distorted."),contain:(0,tt.__)("Image is scaled to fill the space without clipping nor distorting."),fill:(0,tt.__)("Image will be stretched and distorted to completely fill the space.")},Vy=({clientId:e,attributes:{aspectRatio:t,width:n,height:a,scale:o,sizeSlug:r},setAttributes:l,imageSizeOptions:i=[]})=>{const[s]=(0,nt.useSettings)("spacing.units"),c=(0,et.__experimentalUseCustomUnits)({availableUnits:s||["px","%","vw","em","rem"]}),m=(e,t)=>{const n=parseFloat(t);isNaN(n)&&t||l({[e]:n<0?"0":t})},u=(0,tt._x)("Scale","Image scaling options"),p=a||t&&"auto"!==t;return(0,Ke.createElement)(nt.InspectorControls,{group:"dimensions"},(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:(0,tt.__)("Aspect ratio"),onDeselect:()=>l({aspectRatio:void 0}),resetAllFilter:()=>({aspectRatio:void 0}),isShownByDefault:!0,panelId:e},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Aspect ratio"),value:t,options:[{label:(0,tt.__)("Original"),value:"auto"},{label:(0,tt.__)("Square"),value:"1"},{label:(0,tt.__)("16:9"),value:"16/9"},{label:(0,tt.__)("4:3"),value:"4/3"},{label:(0,tt.__)("3:2"),value:"3/2"},{label:(0,tt.__)("9:16"),value:"9/16"},{label:(0,tt.__)("3:4"),value:"3/4"},{label:(0,tt.__)("2:3"),value:"2/3"}],onChange:e=>l({aspectRatio:e})})),(0,Ke.createElement)(et.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!a,label:(0,tt.__)("Height"),onDeselect:()=>l({height:void 0}),resetAllFilter:()=>({height:void 0}),isShownByDefault:!0,panelId:e},(0,Ke.createElement)(et.__experimentalUnitControl,{label:(0,tt.__)("Height"),labelPosition:"top",value:a||"",min:0,onChange:e=>m("height",e),units:c})),(0,Ke.createElement)(et.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!n,label:(0,tt.__)("Width"),onDeselect:()=>l({width:void 0}),resetAllFilter:()=>({width:void 0}),isShownByDefault:!0,panelId:e},(0,Ke.createElement)(et.__experimentalUnitControl,{label:(0,tt.__)("Width"),labelPosition:"top",value:n||"",min:0,onChange:e=>m("width",e),units:c})),p&&(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>!!o&&o!==Dy,label:u,onDeselect:()=>l({scale:Dy}),resetAllFilter:()=>({scale:Dy}),isShownByDefault:!0,panelId:e},(0,Ke.createElement)(et.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:u,value:o,help:Fy[o],onChange:e=>l({scale:e}),isBlock:!0},Ly)),!!i.length&&(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>!!r,label:(0,tt.__)("Resolution"),onDeselect:()=>l({sizeSlug:void 0}),resetAllFilter:()=>({sizeSlug:void 0}),isShownByDefault:!1,panelId:e},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Resolution"),value:r||"full",options:i,onChange:e=>l({sizeSlug:e}),help:(0,tt.__)("Select the size of the source image.")})))};const $y=(0,jt.compose)([(0,nt.withColors)({overlayColor:"background-color"})])((({clientId:e,attributes:t,setAttributes:n,overlayColor:a,setOverlayColor:o})=>{const{dimRatio:r}=t,{gradientClass:l,gradientValue:i,setGradient:s}=(0,nt.__experimentalUseGradient)(),c=(0,nt.__experimentalUseMultipleOriginColorsAndGradients)(),m=(0,nt.__experimentalUseBorderProps)(t),u={backgroundColor:a.color,backgroundImage:i,...m.style};return c.hasColorsOrGradients?(0,Ke.createElement)(Ke.Fragment,null,!!r&&(0,Ke.createElement)("span",{"aria-hidden":"true",className:ut()("wp-block-post-featured-image__overlay",(p=r,void 0===p?null:"has-background-dim-"+10*Math.round(p/10)),{[a.class]:a.class,"has-background-dim":void 0!==r,"has-background-gradient":i,[l]:l},m.className),style:u}),(0,Ke.createElement)(nt.InspectorControls,{group:"color"},(0,Ke.createElement)(nt.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:a.color,gradientValue:i,label:(0,tt.__)("Overlay"),onColorChange:o,onGradientChange:s,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0})}],panelId:e,...c}),(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>void 0!==r,label:(0,tt.__)("Overlay opacity"),onDeselect:()=>n({dimRatio:0}),resetAllFilter:()=>({dimRatio:0}),isShownByDefault:!0,panelId:e},(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Overlay opacity"),value:r,onChange:e=>n({dimRatio:e}),min:0,max:100,step:10,required:!0,__next40pxDefaultSize:!0})))):null;var p})),Oy=["image"];const Gy={onClick:e=>e.preventDefault(),"aria-disabled":!0};const Uy={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-featured-image",title:"Featured Image",category:"theme",description:"Display a post's featured image.",textdomain:"default",attributes:{isLink:{type:"boolean",default:!1},aspectRatio:{type:"string"},width:{type:"string"},height:{type:"string"},scale:{type:"string",default:"cover"},sizeSlug:{type:"string"},rel:{type:"string",attribute:"rel",default:""},linkTarget:{type:"string",default:"_self"},overlayColor:{type:"string"},customOverlayColor:{type:"string"},dimRatio:{type:"number",default:0},gradient:{type:"string"},customGradient:{type:"string"},useFirstImageFromPost:{type:"boolean",default:!1}},usesContext:["postId","postType","queryId"],supports:{align:["left","right","center","wide","full"],color:{__experimentalDuotone:"img, .wp-block-post-featured-image__placeholder, .components-placeholder__illustration, .components-placeholder::before",text:!1,background:!1},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSelector:"img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay",__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}},html:!1,spacing:{margin:!0,padding:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-post-featured-image-editor",style:"wp-block-post-featured-image"},{name:qy}=Uy,jy={icon:Hy,edit:function({clientId:e,attributes:t,setAttributes:n,context:{postId:a,postType:o,queryId:r}}){const l=Number.isFinite(r),{isLink:i,aspectRatio:s,height:c,width:m,scale:u,sizeSlug:p,rel:d,linkTarget:g,useFirstImageFromPost:h}=t,[b,_]=(0,dt.useEntityProp)("postType",o,"featured_media",a),[y]=(0,dt.useEntityProp)("postType",o,"content",a),v=(0,_t.useMemo)((()=>{if(b)return b;if(!h)return;const e=/<!--\s+wp:(?:core\/)?image\s+(?<attrs>{(?:(?:[^}]+|}+(?=})|(?!}\s+\/?-->).)*)?}\s+)?-->/.exec(y);return e?.groups?.attrs&&JSON.parse(e.groups.attrs)?.id}),[b,h,y]),{media:f,postType:k,postPermalink:x}=(0,gt.useSelect)((e=>{const{getMedia:t,getPostType:n,getEditedEntityRecord:r}=e(dt.store);return{media:v&&t(v,{context:"view"}),postType:o&&n(o),postPermalink:r("postType",o,a)?.link}}),[v,o,a]),w=function(e,t){return e?.media_details?.sizes?.[t]?.source_url||e?.source_url}(f,p),E=(0,gt.useSelect)((e=>e(nt.store).getSettings().imageSizes),[]).filter((({slug:e})=>f?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),C=(0,nt.useBlockProps)({style:{width:m,height:c,aspectRatio:s}}),S=(0,nt.__experimentalUseBorderProps)(t),B=(0,nt.useBlockEditingMode)(),N=e=>(0,Ke.createElement)(et.Placeholder,{className:ut()("block-editor-media-placeholder",S.className),withIllustration:!0,style:{height:!!s&&"100%",width:!!s&&"100%",...S.style}},e),T=e=>{e?.id&&_(e.id)},{createErrorNotice:I}=(0,gt.useDispatch)(Pt.store),P=e=>{I(e,{type:"snackbar"})},M="default"===B&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)($y,{attributes:t,setAttributes:n,clientId:e}),(0,Ke.createElement)(Vy,{clientId:e,attributes:t,setAttributes:n,imageSizeOptions:E}),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:k?.labels.singular_name?(0,tt.sprintf)((0,tt.__)("Link to %s"),k.labels.singular_name):(0,tt.__)("Link to post"),onChange:()=>n({isLink:!i}),checked:i}),i&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>n({linkTarget:e?"_blank":"_self"}),checked:"_blank"===g}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link rel"),value:d,onChange:e=>n({rel:e})})))));let z;if(!v&&(l||!a))return(0,Ke.createElement)(Ke.Fragment,null,M,(0,Ke.createElement)("div",{...C},i?(0,Ke.createElement)("a",{href:x,target:g,...Gy},N()):N()));const R=(0,tt.__)("Add a featured image"),A={...S.style,height:s?"100%":c,width:!!s&&"100%",objectFit:!(!c&&!s)&&u};return z=v?f?(0,Ke.createElement)("img",{className:S.className,src:w,alt:f.alt_text?(0,tt.sprintf)((0,tt.__)("Featured image: %s"),f.alt_text):(0,tt.__)("Featured image"),style:A}):N():(0,Ke.createElement)(nt.MediaPlaceholder,{onSelect:T,accept:"image/*",allowedTypes:Oy,onError:P,placeholder:N,mediaLibraryButton:({open:e})=>(0,Ke.createElement)(et.Button,{icon:np,variant:"primary",label:R,showTooltip:!0,tooltipPosition:"top center",onClick:()=>{e()}})}),(0,Ke.createElement)(Ke.Fragment,null,M,!!f&&!l&&(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(nt.MediaReplaceFlow,{mediaId:v,mediaURL:w,allowedTypes:Oy,accept:"image/*",onSelect:T,onError:P},(0,Ke.createElement)(et.MenuItem,{onClick:()=>_(0)},(0,tt.__)("Reset")))),(0,Ke.createElement)("figure",{...C},i?(0,Ke.createElement)("a",{href:x,target:g,...Gy},z):z))}},Wy=()=>Xe({name:qy,metadata:Uy,settings:jy});const Zy=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})),Qy=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})),Ky=[{isDefault:!0,name:"post-next",title:(0,tt.__)("Next post"),description:(0,tt.__)("Displays the post link that follows the current post."),icon:Zy,attributes:{type:"next"},scope:["inserter","transform"]},{name:"post-previous",title:(0,tt.__)("Previous post"),description:(0,tt.__)("Displays the post link that precedes the current post."),icon:Qy,attributes:{type:"previous"},scope:["inserter","transform"]}];Ky.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.type===t.type)}));const Yy=Ky,Jy={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-navigation-link",title:"Post Navigation Link",category:"theme",description:"Displays the next or previous post link that is adjacent to the current post.",textdomain:"default",attributes:{textAlign:{type:"string"},type:{type:"string",default:"next"},label:{type:"string"},showTitle:{type:"boolean",default:!1},linkLabel:{type:"boolean",default:!1},arrow:{type:"string",default:"none"},taxonomy:{type:"string",default:""}},usesContext:["postType"],supports:{reusable:!1,html:!1,color:{link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-post-navigation-link"},{name:Xy}=Jy,ev={edit:function({context:{postType:e},attributes:{type:t,label:n,showTitle:a,textAlign:o,linkLabel:r,arrow:l,taxonomy:i},setAttributes:s}){const c="next"===t;let m=c?(0,tt.__)("Next"):(0,tt.__)("Previous");const u={none:"",arrow:c?"→":"←",chevron:c?"»":"«"}[l];a&&(m=c?(0,tt.__)("Next: "):(0,tt.__)("Previous: "));const p=c?(0,tt.__)("Next post"):(0,tt.__)("Previous post"),d=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${o}`]:o})}),g=(0,gt.useSelect)((t=>{const{getTaxonomies:n}=t(dt.store);return n({type:e,per_page:-1})}),[e]);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display the title as a link"),help:(0,tt.__)("If you have entered a custom label, it will be prepended before the title."),checked:!!a,onChange:()=>s({showTitle:!a})}),a&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Include the label as part of the link"),checked:!!r,onChange:()=>s({linkLabel:!r})}),(0,Ke.createElement)(et.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Arrow"),value:l,onChange:e=>{s({arrow:e})},help:(0,tt.__)("A decorative arrow for the next and previous link."),isBlock:!0},(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"none",label:(0,tt._x)("None","Arrow option for Next/Previous link")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,tt._x)("Arrow","Arrow option for Next/Previous link")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,tt._x)("Chevron","Arrow option for Next/Previous link")})))),(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.SelectControl,{label:(0,tt.__)("Filter by taxonomy"),value:i,options:[{label:(0,tt.__)("Unfiltered"),value:""},...(null!=g?g:[]).filter((({visibility:e})=>!!e?.publicly_queryable)).map((e=>({value:e.slug,label:e.name})))],onChange:e=>s({taxonomy:e}),help:(0,tt.__)("Only link to posts that have the same taxonomy terms as the current post. For example the same tags or categories.")})),(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(nt.AlignmentToolbar,{value:o,onChange:e=>{s({textAlign:e})}})),(0,Ke.createElement)("div",{...d},!c&&u&&(0,Ke.createElement)("span",{className:`wp-block-post-navigation-link__arrow-previous is-arrow-${l}`},u),(0,Ke.createElement)(nt.RichText,{tagName:"a","aria-label":p,placeholder:m,value:n,allowedFormats:["core/bold","core/italic"],onChange:e=>s({label:e})}),a&&(0,Ke.createElement)("a",{href:"#post-navigation-pseudo-link",onClick:e=>e.preventDefault()},(0,tt.__)("An example title")),c&&u&&(0,Ke.createElement)("span",{className:`wp-block-post-navigation-link__arrow-next is-arrow-${l}`,"aria-hidden":!0},u)))},variations:Yy},tv=()=>Xe({name:Xy,metadata:Jy,settings:ev}),nv=[["core/post-title"],["core/post-date"],["core/post-excerpt"]];function av(){const e=(0,nt.useInnerBlocksProps)({className:"wp-block-post"},{template:nv,__unstableDisableLayoutClassNames:!0});return(0,Ke.createElement)("li",{...e})}const ov=(0,_t.memo)((function({blocks:e,blockContextId:t,isHidden:n,setActiveBlockContextId:a}){const o=(0,nt.__experimentalUseBlockPreview)({blocks:e,props:{className:"wp-block-post"}}),r=()=>{a(t)},l={display:n?"none":void 0};return(0,Ke.createElement)("li",{...o,tabIndex:0,role:"button",onClick:r,onKeyPress:r,style:l})}));const rv={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-template",title:"Post Template",category:"theme",parent:["core/query"],description:"Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.",textdomain:"default",usesContext:["queryId","query","displayLayout","templateSlug","previewPostType","enhancedPagination"],supports:{reusable:!1,html:!1,align:["wide","full"],layout:!0,color:{gradients:!0,link:!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}},spacing:{blockGap:{__experimentalDefault:"1.25em"},__experimentalDefaultControls:{blockGap:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-post-template",editorStyle:"wp-block-post-template-editor"},{name:lv}=rv,iv={icon:Uo,edit:function({setAttributes:e,clientId:t,context:{query:{perPage:n,offset:a=0,postType:o,order:r,orderBy:l,author:i,search:s,exclude:c,sticky:m,inherit:u,taxQuery:p,parents:d,pages:g,...h}={},templateSlug:b,previewPostType:_},attributes:{layout:y},__unstableLayoutClassNames:v}){const{type:f,columnCount:k=3}=y||{},[x,w]=(0,_t.useState)(),{posts:E,blocks:C}=(0,gt.useSelect)((e=>{const{getEntityRecords:g,getTaxonomies:y}=e(dt.store),{getBlocks:v}=e(nt.store),f=u&&b?.startsWith("category-")&&g("taxonomy","category",{context:"view",per_page:1,_fields:["id"],slug:b.replace("category-","")}),k={offset:a||0,order:r,orderby:l};if(p&&!u){const e=y({type:o,per_page:-1,context:"view"}),t=Object.entries(p).reduce(((t,[n,a])=>{const o=e?.find((({slug:e})=>e===n));return o?.rest_base&&(t[o?.rest_base]=a),t}),{});Object.keys(t).length&&Object.assign(k,t)}n&&(k.per_page=n),i&&(k.author=i),s&&(k.search=s),c?.length&&(k.exclude=c),d?.length&&(k.parent=d),m&&(k.sticky="only"===m),u&&(b?.startsWith("archive-")?(k.postType=b.replace("archive-",""),o=k.postType):f&&(k.categories=f[0]?.id));return{posts:g("postType",_||o,{...k,...h}),blocks:v(t)}}),[n,a,r,l,t,i,s,o,c,m,u,b,p,d,h,_]),S=(0,_t.useMemo)((()=>E?.map((e=>({postType:e.type,postId:e.id})))),[E]),B=(0,nt.useBlockProps)({className:ut()(v,{[`columns-${k}`]:"grid"===f&&k})});if(!E)return(0,Ke.createElement)("p",{...B},(0,Ke.createElement)(et.Spinner,null));if(!E.length)return(0,Ke.createElement)("p",{...B}," ",(0,tt.__)("No results found."));const N=t=>e({layout:{...y,...t}}),T=[{icon:Tp,title:(0,tt.__)("List view"),onClick:()=>N({type:"default"}),isActive:"default"===f||"constrained"===f},{icon:Xm,title:(0,tt.__)("Grid view"),onClick:()=>N({type:"grid",columnCount:k}),isActive:"grid"===f}];return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,{controls:T})),(0,Ke.createElement)("ul",{...B},S&&S.map((e=>(0,Ke.createElement)(nt.BlockContextProvider,{key:e.postId,value:e},e.postId===(x||S[0]?.postId)?(0,Ke.createElement)(av,null):null,(0,Ke.createElement)(ov,{blocks:C,blockContextId:e.postId,setActiveBlockContextId:w,isHidden:e.postId===(x||S[0]?.postId)}))))))},save:function(){return(0,Ke.createElement)(nt.InnerBlocks.Content,null)}},sv=()=>Xe({name:lv,metadata:rv,settings:iv}),cv=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M20 4H4v1.5h16V4zm-2 9h-3c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3zM4 9.5h9V8H4v1.5zM9 13H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3z",fillRule:"evenodd",clipRule:"evenodd"})),mv=[];const uv=["core/bold","core/image","core/italic","core/link","core/strikethrough","core/text-color"];const pv=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M8.1 12.3c.1.1.3.3.5.3.2.1.4.1.6.1.2 0 .4 0 .6-.1.2-.1.4-.2.5-.3l3-3c.3-.3.5-.7.5-1.1 0-.4-.2-.8-.5-1.1L9.7 3.5c-.1-.2-.3-.3-.5-.3H5c-.4 0-.8.4-.8.8v4.2c0 .2.1.4.2.5l3.7 3.6zM5.8 4.8h3.1l3.4 3.4v.1l-3 3 .5.5-.7-.5-3.3-3.4V4.8zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})),dv={category:cv,post_tag:pv};function gv(e,t){if("core/post-terms"!==t)return e;const n=e.variations.map((e=>{var t;return{...e,icon:null!==(t=dv[e.name])&&void 0!==t?t:cv}}));return{...e,variations:n}}const hv={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-terms",title:"Post Terms",category:"theme",description:"Post terms.",textdomain:"default",attributes:{term:{type:"string"},textAlign:{type:"string"},separator:{type:"string",default:", "},prefix:{type:"string",default:""},suffix:{type:"string",default:""}},usesContext:["postId","postType"],supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},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}},interactivity:{clientNavigation:!0}},style:"wp-block-post-terms"},{name:bv}=hv,_v={icon:cv,edit:function({attributes:e,clientId:t,context:n,isSelected:a,setAttributes:o,insertBlocksAfter:r}){const{term:l,textAlign:i,separator:s,prefix:c,suffix:m}=e,{postId:u,postType:p}=n,d=(0,gt.useSelect)((e=>{if(!l)return{};const{getTaxonomy:t}=e(dt.store),n=t(l);return n?.visibility?.publicly_queryable?n:{}}),[l]),{postTerms:g,hasPostTerms:h,isLoading:b}=function({postId:e,term:t}){const{slug:n}=t;return(0,gt.useSelect)((a=>{const o=t?.visibility?.publicly_queryable;if(!o)return{postTerms:mv,isLoading:!1,hasPostTerms:!1};const{getEntityRecords:r,isResolving:l}=a(dt.store),i=["taxonomy",n,{post:e,per_page:-1,context:"view"}],s=r(...i);return{postTerms:s,isLoading:l("getEntityRecords",i),hasPostTerms:!!s?.length}}),[e,t?.visibility?.publicly_queryable,n])}({postId:u,term:d}),_=u&&p,y=(0,nt.useBlockDisplayInformation)(t),v=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${i}`]:i,[`taxonomy-${l}`]:l})});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(nt.AlignmentToolbar,{value:i,onChange:e=>{o({textAlign:e})}})),(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,tt.__)("Separator"),value:s||"",onChange:e=>{o({separator:e})},help:(0,tt.__)("Enter character(s) used to separate terms.")})),(0,Ke.createElement)("div",{...v},b&&_&&(0,Ke.createElement)(et.Spinner,null),!b&&(a||c)&&(0,Ke.createElement)(nt.RichText,{allowedFormats:uv,className:"wp-block-post-terms__prefix","aria-label":(0,tt.__)("Prefix"),placeholder:(0,tt.__)("Prefix")+" ",value:c,onChange:e=>o({prefix:e}),tagName:"span"}),(!_||!l)&&(0,Ke.createElement)("span",null,y.title),_&&!b&&h&&g.map((e=>(0,Ke.createElement)("a",{key:e.id,href:e.link,onClick:e=>e.preventDefault()},(0,Jn.decodeEntities)(e.name)))).reduce(((e,t)=>(0,Ke.createElement)(Ke.Fragment,null,e,(0,Ke.createElement)("span",{className:"wp-block-post-terms__separator"},s||" "),t))),_&&!b&&!h&&(d?.labels?.no_terms||(0,tt.__)("Term items not found.")),!b&&(a||m)&&(0,Ke.createElement)(nt.RichText,{allowedFormats:uv,className:"wp-block-post-terms__suffix","aria-label":(0,tt.__)("Suffix"),placeholder:" "+(0,tt.__)("Suffix"),value:m,onChange:e=>o({suffix:e}),tagName:"span",__unstableOnSplitAtEnd:()=>r((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))})))}},yv=()=>((0,_i.addFilter)("blocks.registerBlockType","core/template-part",gv),Xe({name:bv,metadata:hv,settings:_v})),vv=window.wp.wordcount;const fv=function({attributes:e,setAttributes:t,context:n}){const{textAlign:a}=e,{postId:o,postType:r}=n,[l]=(0,dt.useEntityProp)("postType",r,"content",o),[i]=(0,dt.useEntityBlockEditor)("postType",r,{id:o}),s=(0,_t.useMemo)((()=>{let e;e=l instanceof Function?l({blocks:i}):i?(0,Qe.__unstableSerializeAndClean)(i):l;const t=(0,tt._x)("words","Word count type. Do not translate!"),n=Math.max(1,Math.round((0,vv.count)(e,t)/189));return(0,tt.sprintf)((0,tt._n)("%d minute","%d minutes",n),n)}),[l,i]),c=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${a}`]:a})});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:a,onChange:e=>{t({textAlign:e})}})),(0,Ke.createElement)("div",{...c},s))},kv=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Path,{d:"M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16.5c-4.1 0-7.5-3.4-7.5-7.5S7.9 4.5 12 4.5s7.5 3.4 7.5 7.5-3.4 7.5-7.5 7.5zM12 7l-1 5c0 .3.2.6.4.8l4.2 2.8-2.7-4.1L12 7z"})),xv={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/post-time-to-read",title:"Time To Read",category:"theme",description:"Show minutes required to finish reading the post.",textdomain:"default",usesContext:["postId","postType"],attributes:{textAlign:{type:"string"}},supports:{color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},html:!1,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:wv}=xv,Ev={icon:kv,edit:fv},Cv=()=>Xe({name:wv,metadata:xv,settings:Ev});const Sv={attributes:{textAlign:{type:"string"},level:{type:"number",default:2},isLink:{type:"boolean",default:!1},rel:{type:"string",attribute:"rel",default:""},linkTarget:{type:"string",default:"_self"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},spacing:{margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0}},save:()=>null,migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},Bv=[Sv],Nv={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-title",title:"Title",category:"theme",description:"Displays the title of a post, page, or any other content-type.",textdomain:"default",usesContext:["postId","postType","queryId"],attributes:{textAlign:{type:"string"},level:{type:"number",default:2},isLink:{type:"boolean",default:!1},rel:{type:"string",attribute:"rel",default:""},linkTarget:{type:"string",default:"_self"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},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}},interactivity:{clientNavigation:!0}},style:"wp-block-post-title"},{name:Tv}=Nv,Iv={icon:Br,edit:function({attributes:{level:e,textAlign:t,isLink:n,rel:a,linkTarget:o},setAttributes:r,context:{postType:l,postId:i,queryId:s},insertBlocksAfter:c}){const m="h"+e,u=uy("postType",!Number.isFinite(s)&&l,i),[p="",d,g]=(0,dt.useEntityProp)("postType",l,"title",i),[h]=(0,dt.useEntityProp)("postType",l,"link",i),b=()=>{c((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))},_=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${t}`]:t})}),y=(0,nt.useBlockEditingMode)();let v=(0,Ke.createElement)(m,{..._},(0,tt.__)("Title"));return l&&i&&(v=u?(0,Ke.createElement)(nt.PlainText,{tagName:m,placeholder:(0,tt.__)("No Title"),value:p,onChange:d,__experimentalVersion:2,__unstableOnSplitAtEnd:b,..._}):(0,Ke.createElement)(m,{..._,dangerouslySetInnerHTML:{__html:g?.rendered}})),n&&l&&i&&(v=u?(0,Ke.createElement)(m,{..._},(0,Ke.createElement)(nt.PlainText,{tagName:"a",href:h,target:o,rel:a,placeholder:p.length?null:(0,tt.__)("No Title"),value:p,onChange:d,__experimentalVersion:2,__unstableOnSplitAtEnd:b})):(0,Ke.createElement)(m,{..._},(0,Ke.createElement)("a",{href:h,target:o,rel:a,onClick:e=>e.preventDefault(),dangerouslySetInnerHTML:{__html:g?.rendered}}))),(0,Ke.createElement)(Ke.Fragment,null,"default"===y&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.HeadingLevelDropdown,{value:e,onChange:e=>r({level:e})}),(0,Ke.createElement)(nt.AlignmentControl,{value:t,onChange:e=>{r({textAlign:e})}})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Make title a link"),onChange:()=>r({isLink:!n}),checked:n}),n&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>r({linkTarget:e?"_blank":"_self"}),checked:"_blank"===o}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link rel"),value:a,onChange:e=>r({rel:e})}))))),v)},deprecated:Bv},Pv=()=>Xe({name:Tv,metadata:Nv,settings:Iv}),Mv=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 16.5h6V15H7v1.5zm4-4h6V11h-6v1.5zM9 11H7v1.5h2V11zm6 5.5h2V15h-2v1.5z"}));const zv={from:[{type:"block",blocks:["core/code","core/paragraph"],transform:({content:e,anchor:t})=>(0,Qe.createBlock)("core/preformatted",{content:e,anchor:t})},{type:"raw",isMatch:e=>"PRE"===e.nodeName&&!(1===e.children.length&&"CODE"===e.firstChild.nodeName),schema:({phrasingContentSchema:e})=>({pre:{children:e}})}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,Qe.createBlock)("core/paragraph",e)},{type:"block",blocks:["core/code"],transform:e=>(0,Qe.createBlock)("core/code",e)}]},Rv=zv,Av={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/preformatted",title:"Preformatted",category:"text",description:"Add text that respects your spacing and tabs, and also allows styling.",textdomain:"default",attributes:{content:{type:"rich-text",source:"rich-text",selector:"pre",__unstablePreserveWhiteSpace:!0,__experimentalRole:"content"}},supports:{anchor:!0,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-preformatted"},{name:Hv}=Av,Lv={icon:Mv,example:{attributes:{content:(0,tt.__)("EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\nWindow, very small in the distance, illuminated.\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;")}},transforms:Rv,edit:function({attributes:e,mergeBlocks:t,setAttributes:n,onRemove:a,insertBlocksAfter:o,style:r}){const{content:l}=e,i=(0,nt.useBlockProps)({style:r});return(0,Ke.createElement)(nt.RichText,{tagName:"pre",identifier:"content",preserveWhiteSpace:!0,value:l,onChange:e=>{n({content:e})},onRemove:a,"aria-label":(0,tt.__)("Preformatted text"),placeholder:(0,tt.__)("Write preformatted text…"),onMerge:t,...i,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>o((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))})},save:function({attributes:e}){const{content:t}=e;return(0,Ke.createElement)("pre",{...nt.useBlockProps.save()},(0,Ke.createElement)(nt.RichText.Content,{value:t}))},merge:(e,t)=>({content:e.content+"\n\n"+t.content})},Dv=()=>Xe({name:Hv,metadata:Av,settings:Lv}),Fv=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M18 8H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v4zM4 4v1.5h16V4H4zm0 16h16v-1.5H4V20z"})),Vv="is-style-solid-color",$v={value:{type:"string",source:"html",selector:"blockquote",multiline:"p"},citation:{type:"string",source:"html",selector:"cite",default:""},mainColor:{type:"string"},customMainColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}};function Ov(e){if(!e)return;const t=e.match(/border-color:([^;]+)[;]?/);return t&&t[1]?t[1]:void 0}function Gv(e){const t=`</p>${e=e||"<p></p>"}<p>`.split("</p><p>");return t.shift(),t.pop(),t.join("<br>")}const Uv={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",__experimentalRole:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",__experimentalRole:"content"},textAlign:{type:"string"}},save({attributes:e}){const{textAlign:t,citation:n,value:a}=e,o=!nt.RichText.isEmpty(n);return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:ut()({[`has-text-align-${t}`]:t})})},(0,Ke.createElement)("blockquote",null,(0,Ke.createElement)(nt.RichText.Content,{value:a,multiline:!0}),o&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:n})))},migrate:({value:e,...t})=>({value:Gv(e),...t})},qv={attributes:{...$v},save({attributes:e}){const{mainColor:t,customMainColor:n,customTextColor:a,textColor:o,value:r,citation:l,className:i}=e,s=i?.includes(Vv);let c,m;if(s){const e=(0,nt.getColorClassName)("background-color",t);c=ut()({"has-background":e||n,[e]:e}),m={backgroundColor:e?void 0:n}}else n&&(m={borderColor:n});const u=(0,nt.getColorClassName)("color",o),p=ut()({"has-text-color":o||a,[u]:u}),d=u?void 0:{color:a};return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:c,style:m})},(0,Ke.createElement)("blockquote",{className:p,style:d},(0,Ke.createElement)(nt.RichText.Content,{value:r,multiline:!0}),!nt.RichText.isEmpty(l)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:l})))},migrate({value:e,className:t,mainColor:n,customMainColor:a,customTextColor:o,...r}){const l=t?.includes(Vv);let i;return a&&(i=l?{color:{background:a}}:{border:{color:a}}),o&&i&&(i.color={...i.color,text:o}),{value:Gv(e),className:t,backgroundColor:l?n:void 0,borderColor:l?void 0:n,textAlign:l?"left":void 0,style:i,...r}}},jv={attributes:{...$v,figureStyle:{source:"attribute",selector:"figure",attribute:"style"}},save({attributes:e}){const{mainColor:t,customMainColor:n,textColor:a,customTextColor:o,value:r,citation:l,className:i,figureStyle:s}=e,c=i?.includes(Vv);let m,u;if(c){const e=(0,nt.getColorClassName)("background-color",t);m=ut()({"has-background":e||n,[e]:e}),u={backgroundColor:e?void 0:n}}else if(n)u={borderColor:n};else if(t){u={borderColor:Ov(s)}}const p=(0,nt.getColorClassName)("color",a),d=(a||o)&&ut()("has-text-color",{[p]:p}),g=p?void 0:{color:o};return(0,Ke.createElement)("figure",{className:m,style:u},(0,Ke.createElement)("blockquote",{className:d,style:g},(0,Ke.createElement)(nt.RichText.Content,{value:r,multiline:!0}),!nt.RichText.isEmpty(l)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:l})))},migrate({value:e,className:t,figureStyle:n,mainColor:a,customMainColor:o,customTextColor:r,...l}){const i=t?.includes(Vv);let s;if(o&&(s=i?{color:{background:o}}:{border:{color:o}}),r&&s&&(s.color={...s.color,text:r}),!i&&a&&n){const a=Ov(n);if(a)return{value:Gv(e),...l,className:t,style:{border:{color:a}}}}return{value:Gv(e),className:t,backgroundColor:i?a:void 0,borderColor:i?void 0:a,textAlign:i?"left":void 0,style:s,...l}}},Wv={attributes:$v,save({attributes:e}){const{mainColor:t,customMainColor:n,textColor:a,customTextColor:o,value:r,citation:l,className:i}=e,s=i?.includes(Vv);let c,m;if(s)c=(0,nt.getColorClassName)("background-color",t),c||(m={backgroundColor:n});else if(n)m={borderColor:n};else if(t){var u;const e=null!==(u=(0,gt.select)(nt.store).getSettings().colors)&&void 0!==u?u:[];m={borderColor:(0,nt.getColorObjectByAttributeValues)(e,t).color}}const p=(0,nt.getColorClassName)("color",a),d=a||o?ut()("has-text-color",{[p]:p}):void 0,g=p?void 0:{color:o};return(0,Ke.createElement)("figure",{className:c,style:m},(0,Ke.createElement)("blockquote",{className:d,style:g},(0,Ke.createElement)(nt.RichText.Content,{value:r,multiline:!0}),!nt.RichText.isEmpty(l)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:l})))},migrate({value:e,className:t,mainColor:n,customMainColor:a,customTextColor:o,...r}){const l=t?.includes(Vv);let i={};return a&&(i=l?{color:{background:a}}:{border:{color:a}}),o&&i&&(i.color={...i.color,text:o}),{value:Gv(e),className:t,backgroundColor:l?n:void 0,borderColor:l?void 0:n,textAlign:l?"left":void 0,style:i,...r}}},Zv={attributes:{...$v},save({attributes:e}){const{value:t,citation:n}=e;return(0,Ke.createElement)("blockquote",null,(0,Ke.createElement)(nt.RichText.Content,{value:t,multiline:!0}),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:n}))},migrate:({value:e,...t})=>({value:Gv(e),...t})},Qv={attributes:{...$v,citation:{type:"string",source:"html",selector:"footer"},align:{type:"string",default:"none"}},save({attributes:e}){const{value:t,citation:n,align:a}=e;return(0,Ke.createElement)("blockquote",{className:`align${a}`},(0,Ke.createElement)(nt.RichText.Content,{value:t,multiline:!0}),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"footer",value:n}))},migrate:({value:e,...t})=>({value:Gv(e),...t})},Kv=[Uv,qv,jv,Wv,Zv,Qv],Yv="web"===_t.Platform.OS;const Jv=function({attributes:e,setAttributes:t,isSelected:n,insertBlocksAfter:a}){const{textAlign:o,citation:r,value:l}=e,i=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${o}`]:o})}),s=!nt.RichText.isEmpty(r)||n;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:o,onChange:e=>{t({textAlign:e})}})),(0,Ke.createElement)("figure",{...i},(0,Ke.createElement)("blockquote",null,(0,Ke.createElement)(nt.RichText,{identifier:"value",tagName:"p",value:l,onChange:e=>t({value:e}),"aria-label":(0,tt.__)("Pullquote text"),placeholder:(0,tt.__)("Add quote"),textAlign:"center"}),s&&(0,Ke.createElement)(nt.RichText,{identifier:"citation",tagName:Yv?"cite":void 0,style:{display:"block"},value:r,"aria-label":(0,tt.__)("Pullquote citation text"),placeholder:(0,tt.__)("Add citation"),onChange:e=>t({citation:e}),className:"wp-block-pullquote__citation",__unstableMobileNoFocusOnMount:!0,textAlign:"center",__unstableOnSplitAtEnd:()=>a((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))}))))};const Xv={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,Qe.createBlock)("core/pullquote",{value:(0,Rn.toHTMLString)({value:(0,Rn.join)(e.map((({content:e})=>(0,Rn.create)({html:e}))),"\n")}),anchor:e.anchor})},{type:"block",blocks:["core/heading"],transform:({content:e,anchor:t})=>(0,Qe.createBlock)("core/pullquote",{value:e,anchor:t})}],to:[{type:"block",blocks:["core/paragraph"],transform:({value:e,citation:t})=>{const n=[];return e&&n.push((0,Qe.createBlock)("core/paragraph",{content:e})),t&&n.push((0,Qe.createBlock)("core/paragraph",{content:t})),0===n.length?(0,Qe.createBlock)("core/paragraph",{content:""}):n}},{type:"block",blocks:["core/heading"],transform:({value:e,citation:t})=>{if(!e)return(0,Qe.createBlock)("core/heading",{content:t});const n=(0,Qe.createBlock)("core/heading",{content:e});return t?[n,(0,Qe.createBlock)("core/heading",{content:t})]:n}}]},ef=Xv,tf={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/pullquote",title:"Pullquote",category:"text",description:"Give special visual emphasis to a quote from your text.",textdomain:"default",attributes:{value:{type:"rich-text",source:"rich-text",selector:"p",__experimentalRole:"content"},citation:{type:"rich-text",source:"rich-text",selector:"cite",__experimentalRole:"content"},textAlign:{type:"string"}},supports:{anchor:!0,align:["left","right","wide","full"],color:{gradients:!0,background:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},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}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},__experimentalStyle:{typography:{fontSize:"1.5em",lineHeight:"1.6"}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-pullquote-editor",style:"wp-block-pullquote"},{name:nf}=tf,af={icon:Fv,example:{attributes:{value:(0,tt.__)("One of the hardest things to do in technology is disrupt yourself."),citation:(0,tt.__)("Matt Mullenweg")}},transforms:ef,edit:Jv,save:function({attributes:e}){const{textAlign:t,citation:n,value:a}=e,o=!nt.RichText.isEmpty(n);return(0,Ke.createElement)("figure",{...nt.useBlockProps.save({className:ut()({[`has-text-align-${t}`]:t})})},(0,Ke.createElement)("blockquote",null,(0,Ke.createElement)(nt.RichText.Content,{tagName:"p",value:a}),o&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:n})))},deprecated:Kv},of=()=>Xe({name:nf,metadata:tf,settings:af}),rf=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M18.1823 11.6392C18.1823 13.0804 17.0139 14.2487 15.5727 14.2487C14.3579 14.2487 13.335 13.4179 13.0453 12.2922L13.0377 12.2625L13.0278 12.2335L12.3985 10.377L12.3942 10.3785C11.8571 8.64997 10.246 7.39405 8.33961 7.39405C5.99509 7.39405 4.09448 9.29465 4.09448 11.6392C4.09448 13.9837 5.99509 15.8843 8.33961 15.8843C8.88499 15.8843 9.40822 15.781 9.88943 15.5923L9.29212 14.0697C8.99812 14.185 8.67729 14.2487 8.33961 14.2487C6.89838 14.2487 5.73003 13.0804 5.73003 11.6392C5.73003 10.1979 6.89838 9.02959 8.33961 9.02959C9.55444 9.02959 10.5773 9.86046 10.867 10.9862L10.8772 10.9836L11.4695 12.7311C11.9515 14.546 13.6048 15.8843 15.5727 15.8843C17.9172 15.8843 19.8178 13.9837 19.8178 11.6392C19.8178 9.29465 17.9172 7.39404 15.5727 7.39404C15.0287 7.39404 14.5066 7.4968 14.0264 7.6847L14.6223 9.20781C14.9158 9.093 15.2358 9.02959 15.5727 9.02959C17.0139 9.02959 18.1823 10.1979 18.1823 11.6392Z"})),lf=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,Ke.createElement)(Ye.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})),sf=e=>{const t=e?.reduce(((e,t)=>{const{mapById:n,mapByName:a,names:o}=e;return n[t.id]=t,a[t.name]=t,o.push(t.name),e}),{mapById:{},mapByName:{},names:[]});return{entities:e,...t}},cf=(e,t)=>{const n=t.split(".");let a=e;return n.forEach((e=>{a=a?.[e]})),a},mf=(e,t)=>(e||[]).map((e=>({...e,name:(0,Jn.decodeEntities)(cf(e,t))}))),uf=()=>{const e=(0,gt.useSelect)((e=>{const{getPostTypes:t}=e(dt.store),n=["attachment"],a=t({per_page:-1})?.filter((({viewable:e,slug:t})=>e&&!n.includes(t)));return a}),[]);return{postTypesTaxonomiesMap:(0,_t.useMemo)((()=>{if(e?.length)return e.reduce(((e,t)=>(e[t.slug]=t.taxonomies,e)),{})}),[e]),postTypesSelectOptions:(0,_t.useMemo)((()=>(e||[]).map((({labels:e,slug:t})=>({label:e.singular_name,value:t})))),[e])}},pf=e=>(0,gt.useSelect)((t=>{const{getTaxonomies:n}=t(dt.store);return n({type:e,per_page:-1,context:"view"})}),[e]);function df(e,t){return!e||e.includes(t)}function gf(e,t){const n=(0,gt.useSelect)((e=>e(Qe.store).getActiveBlockVariation("core/query",t)?.name),[t]),a=`core/query/${n}`;return(0,gt.useSelect)((t=>{if(!n)return!1;const{getBlockRootClientId:o,getPatternsByBlockTypes:r}=t(nt.store),l=o(e);return r(a,l).length>0}),[e,n,a])?a:"core/query"}const hf=(e,t)=>(0,gt.useSelect)((n=>{const{getBlockRootClientId:a,getPatternsByBlockTypes:o}=n(nt.store),r=a(e);return o(t,r)}),[t,e]),bf=e=>(0,gt.useSelect)((t=>{const{getClientIdsOfDescendants:n,getBlockName:a}=t(nt.store),o={};return n(e).forEach((e=>{const t=a(e),n=Object.is((0,Qe.getBlockSupport)(t,"interactivity"),!0),r=(0,Qe.getBlockSupport)(t,"interactivity.clientNavigation");n||r?"core/post-content"===t&&(o.hasPostContentBlock=!0):o.hasBlocksFromPlugins=!0})),o.hasUnsupportedBlocks=o.hasBlocksFromPlugins||o.hasPostContentBlock,o}),[e]);function _f({attributes:{query:e},setQuery:t,openPatternSelectionModal:n,name:a,clientId:o}){const r=!!hf(o,a).length,l=(0,jt.useInstanceId)(_f,"blocks-query-pagination-max-page-input");return(0,Ke.createElement)(Ke.Fragment,null,!e.inherit&&(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.Dropdown,{contentClassName:"block-library-query-toolbar__popover",renderToggle:({onToggle:e})=>(0,Ke.createElement)(et.ToolbarButton,{icon:lf,label:(0,tt.__)("Display settings"),onClick:e}),renderContent:()=>(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.BaseControl,null,(0,Ke.createElement)(et.__experimentalNumberControl,{__unstableInputWidth:"60px",label:(0,tt.__)("Items per Page"),labelPosition:"edge",min:1,max:100,onChange:e=>{isNaN(e)||e<1||e>100||t({perPage:e})},step:"1",value:e.perPage,isDragEnabled:!1})),(0,Ke.createElement)(et.BaseControl,null,(0,Ke.createElement)(et.__experimentalNumberControl,{__unstableInputWidth:"60px",label:(0,tt.__)("Offset"),labelPosition:"edge",min:0,max:100,onChange:e=>{isNaN(e)||e<0||e>100||t({offset:e})},step:"1",value:e.offset,isDragEnabled:!1})),(0,Ke.createElement)(et.BaseControl,{id:l,help:(0,tt.__)("Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero).")},(0,Ke.createElement)(et.__experimentalNumberControl,{id:l,__unstableInputWidth:"60px",label:(0,tt.__)("Max page to show"),labelPosition:"edge",min:0,onChange:e=>{isNaN(e)||e<0||t({pages:e})},step:"1",value:e.pages,isDragEnabled:!1})))})),r&&(0,Ke.createElement)(et.ToolbarGroup,{className:"wp-block-template-part__block-control-group"},(0,Ke.createElement)(et.ToolbarButton,{onClick:n},(0,tt.__)("Replace"))))}const yf=[{label:(0,tt.__)("Newest to oldest"),value:"date/desc"},{label:(0,tt.__)("Oldest to newest"),value:"date/asc"},{label:(0,tt.__)("A → Z"),value:"title/asc"},{label:(0,tt.__)("Z → A"),value:"title/desc"}];const vf=function({order:e,orderBy:t,onChange:n}){return(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Order by"),value:`${t}/${e}`,options:yf,onChange:e=>{const[t,a]=e.split("/");n({order:a,orderBy:t})}})},ff={who:"authors",per_page:-1,_fields:"id,name",context:"view"};const kf=function({value:e,onChange:t}){const n=(0,gt.useSelect)((e=>{const{getUsers:t}=e(dt.store);return t(ff)}),[]);if(!n)return null;const a=sf(n),o=(e?e.toString().split(","):[]).reduce(((e,t)=>{const n=a.mapById[t];return n&&e.push({id:t,value:n.name}),e}),[]);return(0,Ke.createElement)(et.FormTokenField,{label:(0,tt.__)("Authors"),value:o,suggestions:a.names,onChange:e=>{const n=Array.from(e.reduce(((e,t)=>{const n=((e,t)=>{const n=t?.id||e[t]?.id;if(n)return n})(a.mapByName,t);return n&&e.add(n),e}),new Set));t({author:n.join(",")})},__experimentalShowHowTo:!1})},xf=[],wf={order:"asc",_fields:"id,title",context:"view"};const Ef=function({parents:e,postType:t,onChange:n}){const[a,o]=(0,_t.useState)(""),[r,l]=(0,_t.useState)(xf),[i,s]=(0,_t.useState)(xf),c=(0,jt.useDebounce)(o,250),{searchResults:m,searchHasResolved:u}=(0,gt.useSelect)((n=>{if(!a)return{searchResults:xf,searchHasResolved:!0};const{getEntityRecords:o,hasFinishedResolution:r}=n(dt.store),l=["postType",t,{...wf,search:a,orderby:"relevance",exclude:e,per_page:20}];return{searchResults:o(...l),searchHasResolved:r("getEntityRecords",l)}}),[a,e]),p=(0,gt.useSelect)((n=>{if(!e?.length)return xf;const{getEntityRecords:a}=n(dt.store);return a("postType",t,{...wf,include:e,per_page:e.length})}),[e]);(0,_t.useEffect)((()=>{if(e?.length||l(xf),!p?.length)return;const t=sf(mf(p,"title.rendered")),n=e.reduce(((e,n)=>{const a=t.mapById[n];return a&&e.push({id:n,value:a.name}),e}),[]);l(n)}),[e,p]);const d=(0,_t.useMemo)((()=>m?.length?sf(mf(m,"title.rendered")):xf),[m]);return(0,_t.useEffect)((()=>{u&&s(d.names)}),[d.names,u]),(0,Ke.createElement)(et.FormTokenField,{label:(0,tt.__)("Parents"),value:r,onInputChange:c,suggestions:i,onChange:e=>{const t=Array.from(e.reduce(((e,t)=>{const n=((e,t)=>{const n=t?.id||e?.[t]?.id;if(n)return n})(d.mapByName,t);return n&&e.add(n),e}),new Set));s(xf),n({parents:t})},__experimentalShowHowTo:!1})},Cf=[],Sf={order:"asc",_fields:"id,name",context:"view"},Bf=(e,t)=>{const n=t?.id||e?.find((e=>e.name===t))?.id;if(n)return n;const a=t.toLocaleLowerCase();return e?.find((e=>e.name.toLocaleLowerCase()===a))?.id};function Nf({onChange:e,query:t}){const{postType:n,taxQuery:a}=t,o=pf(n);return o&&0!==o.length?(0,Ke.createElement)(Ke.Fragment,null,o.map((t=>{const n=a?.[t.slug]||[];return(0,Ke.createElement)(Tf,{key:t.slug,taxonomy:t,termIds:n,onChange:n=>e({taxQuery:{...a,[t.slug]:n}})})}))):null}function Tf({taxonomy:e,termIds:t,onChange:n}){const[a,o]=(0,_t.useState)(""),[r,l]=(0,_t.useState)(Cf),[i,s]=(0,_t.useState)(Cf),c=(0,jt.useDebounce)(o,250),{searchResults:m,searchHasResolved:u}=(0,gt.useSelect)((n=>{if(!a)return{searchResults:Cf,searchHasResolved:!0};const{getEntityRecords:o,hasFinishedResolution:r}=n(dt.store),l=["taxonomy",e.slug,{...Sf,search:a,orderby:"name",exclude:t,per_page:20}];return{searchResults:o(...l),searchHasResolved:r("getEntityRecords",l)}}),[a,t]),p=(0,gt.useSelect)((n=>{if(!t?.length)return Cf;const{getEntityRecords:a}=n(dt.store);return a("taxonomy",e.slug,{...Sf,include:t,per_page:t.length})}),[t]);(0,_t.useEffect)((()=>{if(t?.length||l(Cf),!p?.length)return;const e=t.reduce(((e,t)=>{const n=p.find((e=>e.id===t));return n&&e.push({id:t,value:n.name}),e}),[]);l(e)}),[t,p]),(0,_t.useEffect)((()=>{u&&s(m.map((e=>e.name)))}),[m,u]);return(0,Ke.createElement)("div",{className:"block-library-query-inspector__taxonomy-control"},(0,Ke.createElement)(et.FormTokenField,{label:e.name,value:r,onInputChange:c,suggestions:i,displayTransform:Jn.decodeEntities,onChange:e=>{const t=new Set;for(const n of e){const e=Bf(m,n);e&&t.add(e)}s(Cf),n(Array.from(t))},__experimentalShowHowTo:!1}))}const If=[{label:(0,tt.__)("Include"),value:""},{label:(0,tt.__)("Exclude"),value:"exclude"},{label:(0,tt.__)("Only"),value:"only"}];function Pf({value:e,onChange:t}){return(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Sticky posts"),options:If,value:e,onChange:t,help:(0,tt.__)("Blog posts can be “stickied”, a feature that places them at the top of the front page of posts, keeping it there until new sticky posts are published.")})}function Mf({enhancedPagination:e,setAttributes:t,clientId:n}){const{hasUnsupportedBlocks:a}=bf(n);let o=(0,tt.__)("Browsing between pages requires a full page reload.");return e?o=(0,tt.__)("Browsing between pages won't require a full page reload, unless non-compatible blocks are detected."):a&&(o=(0,tt.__)("Force page reload can't be disabled because there are non-compatible blocks inside the Query block.")),(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToggleControl,{label:(0,tt.__)("Force page reload"),help:o,checked:!e,disabled:a,onChange:e=>{t({enhancedPagination:!e})}}))}const zf=({attributes:{query:{postType:e}={}}={}})=>{if(!e)return null;const t=(0,pt.addQueryArgs)("post-new.php",{post_type:e});return(0,Ke.createElement)("div",{className:"wp-block-query__create-new-link"},(0,_t.createInterpolateElement)((0,tt.__)("<a>Add new post</a>"),{a:(0,Ke.createElement)("a",{href:t})}))},{BlockInfo:Rf}=Ft(nt.privateApis);function Af(e){const{attributes:t,setQuery:n,setDisplayLayout:a,setAttributes:o,clientId:r}=e,{query:l,displayLayout:i,enhancedPagination:s}=t,{order:c,orderBy:m,author:u,postType:p,sticky:d,inherit:g,taxQuery:h,parents:b}=l,_=function(e){return(0,gt.useSelect)((t=>t(Qe.store).getActiveBlockVariation("core/query",e)?.allowedControls),[e])}(t),[y,v]=(0,_t.useState)("post"===p),{postTypesTaxonomiesMap:f,postTypesSelectOptions:k}=uf(),x=pf(p),w=function(e){return(0,gt.useSelect)((t=>{const n=t(dt.store).getPostType(e);return n?.viewable&&n?.hierarchical}),[e])}(p);(0,_t.useEffect)((()=>{v("post"===p)}),[p]);const[E,C]=(0,_t.useState)(l.search),S=(0,_t.useCallback)((0,jt.debounce)((()=>{l.search!==E&&n({search:E})}),250),[E,l.search]);(0,_t.useEffect)((()=>(S(),S.cancel)),[E,S]);const B=df(_,"inherit"),N=!g&&df(_,"postType"),T=!g&&df(_,"order"),I=!g&&y&&df(_,"sticky"),P=B||N||T||I,M=!!x?.length&&df(_,"taxQuery"),z=df(_,"author"),R=df(_,"search"),A=df(_,"parents")&&w,H=M||z||R||A;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Rf,null,(0,Ke.createElement)(zf,{...e})),P&&(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},B&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Inherit query from template"),help:(0,tt.__)("Toggle to use the global query context that is set with the current template, such as an archive or search. Disable to customize the settings independently."),checked:!!g,onChange:e=>n({inherit:!!e})}),N&&(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,options:k,value:p,label:(0,tt.__)("Post type"),onChange:e=>{const t={postType:e},a=f[e],o=Object.entries(h||{}).reduce(((e,[t,n])=>(a.includes(t)&&(e[t]=n),e)),{});t.taxQuery=Object.keys(o).length?o:void 0,"post"!==e&&(t.sticky=""),t.parents=[],n(t)},help:(0,tt.__)("WordPress contains different types of content and they are divided into collections called “Post types”. By default there are a few different ones such as blog posts and pages, but plugins could add more.")}),false,T&&(0,Ke.createElement)(vf,{order:c,orderBy:m,onChange:n}),I&&(0,Ke.createElement)(Pf,{value:d,onChange:e=>n({sticky:e})}),(0,Ke.createElement)(Mf,{enhancedPagination:s,setAttributes:o,clientId:r})),!g&&H&&(0,Ke.createElement)(et.__experimentalToolsPanel,{className:"block-library-query-toolspanel__filters",label:(0,tt.__)("Filters"),resetAll:()=>{n({author:"",parents:[],search:"",taxQuery:null}),C("")},dropdownMenuProps:op},M&&(0,Ke.createElement)(et.__experimentalToolsPanelItem,{label:(0,tt.__)("Taxonomies"),hasValue:()=>Object.values(h||{}).some((e=>!!e.length)),onDeselect:()=>n({taxQuery:null})},(0,Ke.createElement)(Nf,{onChange:n,query:l})),z&&(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>!!u,label:(0,tt.__)("Authors"),onDeselect:()=>n({author:""})},(0,Ke.createElement)(kf,{value:u,onChange:n})),R&&(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>!!E,label:(0,tt.__)("Keyword"),onDeselect:()=>C("")},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Keyword"),value:E,onChange:C})),A&&(0,Ke.createElement)(et.__experimentalToolsPanelItem,{hasValue:()=>!!b?.length,label:(0,tt.__)("Parents"),onDeselect:()=>n({parents:[]})},(0,Ke.createElement)(Ef,{parents:b,postType:p,onChange:n}))))}const Hf="wp-block-query-enhanced-pagination-modal__description";function Lf({clientId:e,attributes:{enhancedPagination:t},setAttributes:n}){const[a,o]=(0,_t.useState)(!1),{hasBlocksFromPlugins:r,hasPostContentBlock:l,hasUnsupportedBlocks:i}=bf(e);(0,_t.useEffect)((()=>{t&&i&&(n({enhancedPagination:!1}),o(!0))}),[t,i,n]);const s=()=>{o(!1)};let c=(0,tt.__)('If you still want to prevent full page reloads, remove that block, then disable "Force page reload" again in the Query Block settings.');return r?c=(0,tt.__)("Currently, avoiding full page reloads is not possible when non-interactive or non-clientNavigation compatible blocks from plugins are present inside the Query block.")+" "+c:l&&(c=(0,tt.__)("Currently, avoiding full page reloads is not possible when a Content block is present inside the Query block.")+" "+c),a&&(0,Ke.createElement)(et.Modal,{title:(0,tt.__)("Query block: Force page reload enabled"),className:"wp-block-query__enhanced-pagination-modal",aria:{describedby:Hf},role:"alertdialog",focusOnMount:"firstElement",isDismissible:!1,onRequestClose:s},(0,Ke.createElement)(et.__experimentalVStack,{alignment:"right",spacing:5},(0,Ke.createElement)("span",{id:Hf},c),(0,Ke.createElement)(et.Button,{variant:"primary",onClick:s},(0,tt.__)("OK"))))}const Df=[["core/post-template"]];function Ff({attributes:e,setAttributes:t,openPatternSelectionModal:n,name:a,clientId:o}){const{queryId:r,query:l,displayLayout:i,tagName:s="div",query:{inherit:c}={}}=e,{__unstableMarkNextChangeAsNotPersistent:m}=(0,gt.useDispatch)(nt.store),u=(0,jt.useInstanceId)(Ff),p=(0,nt.useBlockProps)(),d=(0,nt.useInnerBlocksProps)(p,{template:Df}),{postsPerPage:g}=(0,gt.useSelect)((e=>{const{getSettings:t}=e(nt.store),{getEntityRecord:n,canUser:a}=e(dt.store);return{postsPerPage:(a("read","settings")?+n("root","site")?.posts_per_page:+t().postsPerPage)||3}}),[]);(0,_t.useEffect)((()=>{const e={};(c&&l.perPage!==g||!l.perPage&&g)&&(e.perPage=g),Object.keys(e).length&&(m(),h(e))}),[l.perPage,g,c]),(0,_t.useEffect)((()=>{Number.isFinite(r)||(m(),t({queryId:u}))}),[r,u]);const h=e=>t({query:{...l,...e}}),b={main:(0,tt.__)("The <main> element should be used for the primary content of your document only. "),section:(0,tt.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element."),aside:(0,tt.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.")};return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Lf,{attributes:e,setAttributes:t,clientId:o}),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(Af,{attributes:e,setQuery:h,setDisplayLayout:e=>t({displayLayout:{...i,...e}}),setAttributes:t,clientId:o})),(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(_f,{name:a,clientId:o,attributes:e,setQuery:h,openPatternSelectionModal:n})),(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("HTML element"),options:[{label:(0,tt.__)("Default (<div>)"),value:"div"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<aside>",value:"aside"}],value:s,onChange:e=>t({tagName:e}),help:b[s]})),(0,Ke.createElement)(s,{...d}))}function Vf({attributes:e,clientId:t,name:n,openPatternSelectionModal:a,setAttributes:o}){const[r,l]=(0,_t.useState)(!1),i=(0,nt.useBlockProps)(),s=gf(t,e),{blockType:c,activeBlockVariation:m,hasPatterns:u}=(0,gt.useSelect)((a=>{const{getActiveBlockVariation:o,getBlockType:r}=a(Qe.store),{getBlockRootClientId:l,getPatternsByBlockTypes:i}=a(nt.store),c=l(t);return{blockType:r(n),activeBlockVariation:o(n,e),hasPatterns:!!i(s,c).length}}),[n,s,t,e]),p=m?.icon?.src||m?.icon||c?.icon?.src,d=m?.title||c?.title;return r?(0,Ke.createElement)($f,{clientId:t,attributes:e,setAttributes:o,icon:p,label:d}):(0,Ke.createElement)("div",{...i},(0,Ke.createElement)(et.Placeholder,{icon:p,label:d,instructions:(0,tt.__)("Choose a pattern for the query loop or start blank.")},!!u&&(0,Ke.createElement)(et.Button,{variant:"primary",onClick:a},(0,tt.__)("Choose")),(0,Ke.createElement)(et.Button,{variant:"secondary",onClick:()=>{l(!0)}},(0,tt.__)("Start blank"))))}function $f({clientId:e,attributes:t,setAttributes:n,icon:a,label:o}){const r=function(e){const{activeVariationName:t,blockVariations:n}=(0,gt.useSelect)((t=>{const{getActiveBlockVariation:n,getBlockVariations:a}=t(Qe.store);return{activeVariationName:n("core/query",e)?.name,blockVariations:a("core/query","block")}}),[e]);return(0,_t.useMemo)((()=>{const e=e=>!e.attributes?.namespace;if(!t)return n.filter(e);const a=n.filter((e=>e.attributes?.namespace?.includes(t)));return a.length?a:n.filter(e)}),[t,n])}(t),{replaceInnerBlocks:l}=(0,gt.useDispatch)(nt.store),i=(0,nt.useBlockProps)();return(0,Ke.createElement)("div",{...i},(0,Ke.createElement)(nt.__experimentalBlockVariationPicker,{icon:a,label:o,variations:r,onSelect:a=>{a.attributes&&n({...a.attributes,query:{...a.attributes.query,postType:t.query.postType||a.attributes.query.postType},namespace:t.namespace}),a.innerBlocks&&l(e,(0,Qe.createBlocksFromInnerBlocksTemplate)(a.innerBlocks),!1)}}))}function Of(e=""){return e=(e=nc()(e)).trim().toLowerCase()}function Gf(e,t){const n=Of(t),a=Of(e.title);let o=0;if(n===a)o+=30;else if(a.startsWith(n))o+=20;else{n.split(" ").every((e=>a.includes(e)))&&(o+=10)}return o}function Uf(e=[],t=""){if(!t)return e;const n=e.map((e=>[e,Gf(e,t)])).filter((([,e])=>e>0));return n.sort((([,e],[,t])=>t-e)),n.map((([e])=>e))}function qf({clientId:e,attributes:t,setIsPatternSelectionModalOpen:n}){const[a,o]=(0,_t.useState)(""),{replaceBlock:r,selectBlock:l}=(0,gt.useDispatch)(nt.store),i=(0,_t.useMemo)((()=>({previewPostType:t.query.postType})),[t.query.postType]),s=gf(e,t),c=hf(e,s),m=(0,_t.useMemo)((()=>Uf(c,a)),[c,a]),u=(0,jt.useAsyncList)(m);return(0,Ke.createElement)(et.Modal,{overlayClassName:"block-library-query-pattern__selection-modal",title:(0,tt.__)("Choose a pattern"),onRequestClose:()=>n(!1),isFullScreen:!0},(0,Ke.createElement)("div",{className:"block-library-query-pattern__selection-content"},(0,Ke.createElement)("div",{className:"block-library-query-pattern__selection-search"},(0,Ke.createElement)(et.SearchControl,{__nextHasNoMarginBottom:!0,onChange:o,value:a,label:(0,tt.__)("Search for patterns"),placeholder:(0,tt.__)("Search")})),(0,Ke.createElement)(nt.BlockContextProvider,{value:i},(0,Ke.createElement)(nt.__experimentalBlockPatternsList,{blockPatterns:m,shownPatterns:u,onClickPattern:(n,a)=>{const{newBlocks:o,queryClientIds:i}=((e,t)=>{const{query:{postType:n,inherit:a}}=t,o=e.map((e=>(0,Qe.cloneBlock)(e))),r=[],l=[...o];for(;l.length>0;){const e=l.shift();"core/query"===e.name&&(e.attributes.query={...e.attributes.query,postType:n,inherit:a},r.push(e.clientId)),e.innerBlocks?.forEach((e=>{l.push(e)}))}return{newBlocks:o,queryClientIds:r}})(a,t);r(e,o),i[0]&&l(i[0])}}))))}const jf=e=>{const{clientId:t,attributes:n}=e,[a,o]=(0,_t.useState)(!1),r=(0,gt.useSelect)((e=>!!e(nt.store).getBlocks(t).length),[t])?Ff:Vf;return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(r,{...e,openPatternSelectionModal:()=>o(!0)}),a&&(0,Ke.createElement)(qf,{clientId:t,attributes:n,setIsPatternSelectionModalOpen:o}))};const Wf=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},(0,Ke.createElement)(et.Path,{d:"M41 9H7v3h34V9zm-22 5H7v1h12v-1zM7 26h12v1H7v-1zm34-5H7v3h34v-3zM7 38h12v1H7v-1zm34-5H7v3h34v-3z"})),Zf=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},(0,Ke.createElement)(et.Path,{d:"M41 9H7v3h34V9zm-4 5H7v1h30v-1zm4 3H7v1h34v-1zM7 20h30v1H7v-1zm0 12h30v1H7v-1zm34 3H7v1h34v-1zM7 38h30v1H7v-1zm34-11H7v3h34v-3z"})),Qf=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},(0,Ke.createElement)(et.Path,{d:"M41 9H7v3h34V9zm-22 5H7v1h12v-1zm22 3H7v1h34v-1zM7 20h34v1H7v-1zm0 12h12v1H7v-1zm34 3H7v1h34v-1zM7 38h34v1H7v-1zm34-11H7v3h34v-3z"})),Kf=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},(0,Ke.createElement)(et.Path,{d:"M7 9h34v6H7V9zm12 8H7v1h12v-1zm18 3H7v1h30v-1zm0 18H7v1h30v-1zM7 35h12v1H7v-1zm34-8H7v6h34v-6z"})),Yf={query:{perPage:3,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!1}},Jf=[{name:"posts-list",title:(0,tt.__)("Posts List"),description:(0,tt.__)("Display a list of your most recent posts, excluding sticky posts."),icon:Sp,attributes:{namespace:"core/posts-list",query:{perPage:4,pages:1,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",sticky:"exclude",inherit:!1}},scope:["inserter"],isActive:({namespace:e,query:t})=>"core/posts-list"===e&&"post"===t.postType},{name:"title-date",title:(0,tt.__)("Title & Date"),icon:Wf,attributes:{...Yf},innerBlocks:[["core/post-template",{},[["core/post-title"],["core/post-date"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]},{name:"title-excerpt",title:(0,tt.__)("Title & Excerpt"),icon:Zf,attributes:{...Yf},innerBlocks:[["core/post-template",{},[["core/post-title"],["core/post-excerpt"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]},{name:"title-date-excerpt",title:(0,tt.__)("Title, Date, & Excerpt"),icon:Qf,attributes:{...Yf},innerBlocks:[["core/post-template",{},[["core/post-title"],["core/post-date"],["core/post-excerpt"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]},{name:"image-date-title",title:(0,tt.__)("Image, Date, & Title"),icon:Kf,attributes:{...Yf},innerBlocks:[["core/post-template",{},[["core/post-featured-image"],["core/post-date"],["core/post-title"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]}],{cleanEmptyObject:Xf}=Ft(nt.privateApis),ek=e=>{const{query:t}=e,{categoryIds:n,tagIds:a,...o}=t;return(t.categoryIds?.length||t.tagIds?.length)&&(o.taxQuery={category:t.categoryIds?.length?t.categoryIds:void 0,post_tag:t.tagIds?.length?t.tagIds:void 0}),{...e,query:o}},tk=(e,t)=>{const{style:n,backgroundColor:a,gradient:o,textColor:r,...l}=e;if(!(a||o||r||n?.color||n?.elements?.link))return[e,t];if(n&&(l.style=Xf({...n,color:void 0,elements:{...n.elements,link:void 0}})),nk(t)){const e=t[0],i=n?.color||n?.elements?.link||e.attributes.style?Xf({...e.attributes.style,color:n?.color,elements:n?.elements?.link?{link:n?.elements?.link}:void 0}):void 0;return[l,[(0,Qe.createBlock)("core/group",{...e.attributes,backgroundColor:a,gradient:o,textColor:r,style:i},e.innerBlocks)]]}return[l,[(0,Qe.createBlock)("core/group",{backgroundColor:a,gradient:o,textColor:r,style:Xf({color:n?.color,elements:n?.elements?.link?{link:n?.elements?.link}:void 0})},t)]]},nk=(e=[])=>1===e.length&&"core/group"===e[0].name,ak=e=>{const{layout:t=null}=e;if(!t)return e;const{inherit:n=null,contentSize:a=null,...o}=t;return n||a?{...e,layout:{...o,contentSize:a,type:"constrained"}}:e},ok=(e=[])=>{let t=null;for(const n of e){if("core/post-template"===n.name){t=n;break}n.innerBlocks.length&&(t=ok(n.innerBlocks))}return t},rk=(e=[],t)=>(e.forEach(((n,a)=>{"core/post-template"===n.name?e.splice(a,1,t):n.innerBlocks.length&&(n.innerBlocks=rk(n.innerBlocks,t))})),e),lk=(e,t)=>{const{displayLayout:n=null,...a}=e;if(!n)return[e,t];const o=ok(t);if(!o)return[e,t];const{type:r,columns:l}=n,i="flex"===r?"grid":"default",s=(0,Qe.createBlock)("core/post-template",{...o.attributes,layout:{type:i,...l&&{columnCount:l}}},o.innerBlocks);return[a,rk(t,s)]},ik={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",categoryIds:[],tagIds:[],order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0}},layout:{type:"object",default:{type:"list"}}},supports:{html:!1},migrate(e,t){const n=ek(e),{layout:a,...o}=n,r={...o,displayLayout:n.layout};return lk(r,t)},save:()=>(0,Ke.createElement)(nt.InnerBlocks.Content,null)},sk={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",categoryIds:[],tagIds:[],order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},layout:!0},isEligible:({query:{categoryIds:e,tagIds:t}={}})=>e||t,migrate(e,t){const n=ek(e),[a,o]=tk(n,t),r=ak(a);return lk(r,o)},save({attributes:{tagName:e="div"}}){const t=nt.useBlockProps.save(),n=nt.useInnerBlocksProps.save(t);return(0,Ke.createElement)(e,{...n})}},ck={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[]}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}},namespace:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},layout:!0},isEligible(e){const{style:t,backgroundColor:n,gradient:a,textColor:o}=e;return n||a||o||t?.color||t?.elements?.link},migrate(e,t){const[n,a]=tk(e,t),o=ak(n);return lk(o,a)},save({attributes:{tagName:e="div"}}){const t=nt.useBlockProps.save(),n=nt.useInnerBlocksProps.save(t);return(0,Ke.createElement)(e,{...n})}},mk={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[]}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}},namespace:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},layout:!0},save({attributes:{tagName:e="div"}}){const t=nt.useBlockProps.save(),n=nt.useInnerBlocksProps.save(t);return(0,Ke.createElement)(e,{...n})},isEligible:({layout:e})=>e?.inherit||e?.contentSize&&"constrained"!==e?.type,migrate(e,t){const n=ak(e);return lk(n,t)}},uk=[{attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[]}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}},namespace:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,layout:!0},save({attributes:{tagName:e="div"}}){const t=nt.useBlockProps.save(),n=nt.useInnerBlocksProps.save(t);return(0,Ke.createElement)(e,{...n})},isEligible:({displayLayout:e})=>!!e,migrate:lk},mk,ck,sk,ik],pk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query",title:"Query Loop",category:"theme",description:"An advanced block that allows displaying post types based on different query parameters and visual configurations.",textdomain:"default",attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[]}},tagName:{type:"string",default:"div"},namespace:{type:"string"},enhancedPagination:{type:"boolean",default:!1}},providesContext:{queryId:"queryId",query:"query",displayLayout:"displayLayout",enhancedPagination:"enhancedPagination"},supports:{align:["wide","full"],html:!1,layout:!0,interactivity:!0},editorStyle:"wp-block-query-editor"},{name:dk}=pk,gk={icon:rf,edit:jf,save:function({attributes:{tagName:e="div"}}){const t=nt.useBlockProps.save(),n=nt.useInnerBlocksProps.save(t);return(0,Ke.createElement)(e,{...n})},variations:Jf,deprecated:uk},hk=()=>Xe({name:dk,metadata:pk,settings:gk}),bk=[["core/paragraph",{placeholder:(0,tt.__)("Add text or blocks that will display when a query returns no results.")}]];const _k={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query-no-results",title:"No results",category:"theme",description:"Contains the block elements used to render content when no query results are found.",parent:["core/query"],textdomain:"default",usesContext:["queryId","query"],supports:{align:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:yk}=_k,vk={icon:rf,edit:function(){const e=(0,nt.useBlockProps)(),t=(0,nt.useInnerBlocksProps)(e,{template:bk});return(0,Ke.createElement)("div",{...t})},save:function(){return(0,Ke.createElement)(nt.InnerBlocks.Content,null)}},fk=()=>Xe({name:yk,metadata:_k,settings:vk});function kk({value:e,onChange:t}){return(0,Ke.createElement)(et.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Arrow"),value:e,onChange:t,help:(0,tt.__)("A decorative arrow appended to the next and previous page link."),isBlock:!0},(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"none",label:(0,tt._x)("None","Arrow option for Query Pagination Next/Previous blocks")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,tt._x)("Arrow","Arrow option for Query Pagination Next/Previous blocks")}),(0,Ke.createElement)(et.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,tt._x)("Chevron","Arrow option for Query Pagination Next/Previous blocks")}))}function xk({value:e,onChange:t}){return(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show label text"),help:(0,tt.__)('Toggle off to hide the label text, e.g. "Next Page".'),onChange:t,checked:!0===e})}const wk=[["core/query-pagination-previous"],["core/query-pagination-numbers"],["core/query-pagination-next"]];const Ek=[{save:()=>(0,Ke.createElement)("div",{...nt.useBlockProps.save()},(0,Ke.createElement)(nt.InnerBlocks.Content,null))}],Ck={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query-pagination",title:"Pagination",category:"theme",ancestor:["core/query"],allowedBlocks:["core/query-pagination-previous","core/query-pagination-numbers","core/query-pagination-next"],description:"Displays a paginated navigation to next/previous set of posts, when applicable.",textdomain:"default",attributes:{paginationArrow:{type:"string",default:"none"},showLabel:{type:"boolean",default:!0}},usesContext:["queryId","query"],providesContext:{paginationArrow:"paginationArrow",showLabel:"showLabel"},supports:{align:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-query-pagination-editor",style:"wp-block-query-pagination"},{name:Sk}=Ck,Bk={icon:sr,edit:function({attributes:{paginationArrow:e,showLabel:t},setAttributes:n,clientId:a}){const o=(0,gt.useSelect)((e=>{const{getBlocks:t}=e(nt.store),n=t(a);return n?.find((e=>["core/query-pagination-next","core/query-pagination-previous"].includes(e.name)))}),[a]),r=(0,nt.useBlockProps)(),l=(0,nt.useInnerBlocksProps)(r,{template:wk});return(0,_t.useEffect)((()=>{"none"!==e||t||n({showLabel:!0})}),[e,n,t]),(0,Ke.createElement)(Ke.Fragment,null,o&&(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(kk,{value:e,onChange:e=>{n({paginationArrow:e})}}),"none"!==e&&(0,Ke.createElement)(xk,{value:t,onChange:e=>{n({showLabel:e})}}))),(0,Ke.createElement)("nav",{...l}))},save:function(){return(0,Ke.createElement)(nt.InnerBlocks.Content,null)},deprecated:Ek},Nk=()=>Xe({name:Sk,metadata:Ck,settings:Bk}),Tk={none:"",arrow:"→",chevron:"»"};const Ik={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query-pagination-next",title:"Next Page",category:"theme",parent:["core/query-pagination"],description:"Displays the next posts page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["queryId","query","paginationArrow","showLabel","enhancedPagination"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:Pk}=Ik,Mk={icon:hr,edit:function({attributes:{label:e},setAttributes:t,context:{paginationArrow:n,showLabel:a}}){const o=Tk[n];return(0,Ke.createElement)("a",{href:"#pagination-next-pseudo-link",onClick:e=>e.preventDefault(),...(0,nt.useBlockProps)()},a&&(0,Ke.createElement)(nt.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,tt.__)("Next page link"),placeholder:(0,tt.__)("Next Page"),value:e,onChange:e=>t({label:e})}),o&&(0,Ke.createElement)("span",{className:`wp-block-query-pagination-next-arrow is-arrow-${n}`,"aria-hidden":!0},o))}},zk=()=>Xe({name:Pk,metadata:Ik,settings:Mk}),Rk=(e,t="a",n="")=>(0,Ke.createElement)(t,{key:e,className:`page-numbers ${n}`},e);const Ak={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query-pagination-numbers",title:"Page Numbers",category:"theme",parent:["core/query-pagination"],description:"Displays a list of page numbers for pagination.",textdomain:"default",attributes:{midSize:{type:"number",default:2}},usesContext:["queryId","query","enhancedPagination"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-query-pagination-numbers-editor"},{name:Hk}=Ak,Lk={icon:kr,edit:function({attributes:e,setAttributes:t}){const{midSize:n}=e,a=(e=>{const t=[];for(let n=1;n<=e;n++)t.push(Rk(n));t.push(Rk(e+1,"span","current"));for(let n=1;n<=e;n++)t.push(Rk(e+1+n));return t.push(Rk("...","span","dots")),t.push(Rk(2*e+3)),(0,Ke.createElement)(Ke.Fragment,null,t)})(parseInt(n,10));return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.RangeControl,{label:(0,tt.__)("Number of links"),help:(0,tt.__)("Specify how many links can appear before and after the current page number. Links to the first, current and last page are always visible."),value:n,onChange:e=>{t({midSize:parseInt(e,10)})},min:0,max:5,withInputField:!1}))),(0,Ke.createElement)("div",{...(0,nt.useBlockProps)()},a))}},Dk=()=>Xe({name:Hk,metadata:Ak,settings:Lk}),Fk={none:"",arrow:"←",chevron:"«"};const Vk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query-pagination-previous",title:"Previous Page",category:"theme",parent:["core/query-pagination"],description:"Displays the previous posts page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["queryId","query","paginationArrow","showLabel","enhancedPagination"],supports:{reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:$k}=Vk,Ok={icon:nr,edit:function({attributes:{label:e},setAttributes:t,context:{paginationArrow:n,showLabel:a}}){const o=Fk[n];return(0,Ke.createElement)("a",{href:"#pagination-previous-pseudo-link",onClick:e=>e.preventDefault(),...(0,nt.useBlockProps)()},o&&(0,Ke.createElement)("span",{className:`wp-block-query-pagination-previous-arrow is-arrow-${n}`,"aria-hidden":!0},o),a&&(0,Ke.createElement)(nt.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,tt.__)("Previous page link"),placeholder:(0,tt.__)("Previous Page"),value:e,onChange:e=>t({label:e})}))}},Gk=()=>Xe({name:$k,metadata:Vk,settings:Ok}),Uk=["archive","search"];const qk=[{isDefault:!0,name:"archive-title",title:(0,tt.__)("Archive Title"),description:(0,tt.__)("Display the archive title based on the queried object."),icon:Br,attributes:{type:"archive"},scope:["inserter"]},{isDefault:!1,name:"search-title",title:(0,tt.__)("Search Results Title"),description:(0,tt.__)("Display the search results title based on the queried object."),icon:Br,attributes:{type:"search"},scope:["inserter"]}];qk.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.type===t.type)}));const jk=qk,Wk={attributes:{type:{type:"string"},textAlign:{type:"string"},level:{type:"number",default:1}},supports:{align:["wide","full"],html:!1,color:{gradients:!0},spacing:{margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0}},save:()=>null,migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},Zk=[Wk],Qk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query-title",title:"Query Title",category:"theme",description:"Display the query title.",textdomain:"default",attributes:{type:{type:"string"},textAlign:{type:"string"},level:{type:"number",default:1},showPrefix:{type:"boolean",default:!0},showSearchTerm:{type:"boolean",default:!0}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-query-title"},{name:Kk}=Qk,Yk={icon:Br,edit:function({attributes:{type:e,level:t,textAlign:n,showPrefix:a,showSearchTerm:o},setAttributes:r}){const{archiveTypeTitle:l,archiveNameLabel:i}=(0,gt.useSelect)((e=>{const{getSettings:t}=e(nt.store),{__experimentalArchiveTitleNameLabel:n,__experimentalArchiveTitleTypeLabel:a}=t();return{archiveTypeTitle:a,archiveNameLabel:n}})),s=`h${t}`,c=(0,nt.useBlockProps)({className:ut()("wp-block-query-title__placeholder",{[`has-text-align-${n}`]:n})});if(!Uk.includes(e))return(0,Ke.createElement)("div",{...c},(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Provided type is not supported.")));let m;if("archive"===e){let e;e=l?a?i?(0,tt.sprintf)((0,tt.__)("%1$s: %2$s"),l,i):(0,tt.sprintf)((0,tt.__)("%s: Name"),l):i||(0,tt.sprintf)((0,tt.__)("%s name"),l):a?(0,tt.__)("Archive type: Name"):(0,tt.__)("Archive title"),m=(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show archive type in title"),onChange:()=>r({showPrefix:!a}),checked:a}))),(0,Ke.createElement)(s,{...c},e))}return"search"===e&&(m=(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show search term in title"),onChange:()=>r({showSearchTerm:!o}),checked:o}))),(0,Ke.createElement)(s,{...c},o?(0,tt.__)("Search results for: “search term”"):(0,tt.__)("Search results")))),(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.HeadingLevelDropdown,{value:t,onChange:e=>r({level:e})}),(0,Ke.createElement)(nt.AlignmentControl,{value:n,onChange:e=>{r({textAlign:e})}})),m)},variations:jk,deprecated:Zk},Jk=()=>Xe({name:Kk,metadata:Qk,settings:Yk}),Xk=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M13 6v6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H13zm-9 6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H4v6z"})),ex=e=>{const{value:t,...n}=e;return[{...n},t?(0,Qe.parseWithAttributeSchema)(t,{type:"array",source:"query",selector:"p",query:{content:{type:"string",source:"html"}}}).map((({content:e})=>(0,Qe.createBlock)("core/paragraph",{content:e}))):(0,Qe.createBlock)("core/paragraph")]},tx={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:"",__experimentalRole:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",__experimentalRole:"content"},align:{type:"string"}},supports:{anchor:!0,__experimentalSlashInserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0}}},save({attributes:e}){const{align:t,value:n,citation:a}=e,o=ut()({[`has-text-align-${t}`]:t});return(0,Ke.createElement)("blockquote",{...nt.useBlockProps.save({className:o})},(0,Ke.createElement)(nt.RichText.Content,{multiline:!0,value:n}),!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:a}))},migrate:ex},nx={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"}},migrate:ex,save({attributes:e}){const{align:t,value:n,citation:a}=e;return(0,Ke.createElement)("blockquote",{style:{textAlign:t||null}},(0,Ke.createElement)(nt.RichText.Content,{multiline:!0,value:n}),!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:a}))}},ax={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"},style:{type:"number",default:1}},migrate(e){if(2===e.style){const{style:t,...n}=e;return ex({...n,className:e.className?e.className+" is-style-large":"is-style-large"})}return ex(e)},save({attributes:e}){const{align:t,value:n,citation:a,style:o}=e;return(0,Ke.createElement)("blockquote",{className:2===o?"is-large":"",style:{textAlign:t||null}},(0,Ke.createElement)(nt.RichText.Content,{multiline:!0,value:n}),!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:a}))}},ox={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"footer",default:""},align:{type:"string"},style:{type:"number",default:1}},migrate(e){if(!isNaN(parseInt(e.style))){const{style:t,...n}=e;return ex({...n})}return ex(e)},save({attributes:e}){const{align:t,value:n,citation:a,style:o}=e;return(0,Ke.createElement)("blockquote",{className:`blocks-quote-style-${o}`,style:{textAlign:t||null}},(0,Ke.createElement)(nt.RichText.Content,{multiline:!0,value:n}),!nt.RichText.isEmpty(a)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"footer",value:a}))}},rx=[tx,nx,ax,ox],lx="web"===_t.Platform.OS,ix=[["core/paragraph",{}]];const sx={from:[{type:"block",blocks:["core/pullquote"],transform:({value:e,citation:t,anchor:n,fontSize:a,style:o})=>(0,Qe.createBlock)("core/quote",{citation:t,anchor:n,fontSize:a,style:o},[(0,Qe.createBlock)("core/paragraph",{content:e})])},{type:"prefix",prefix:">",transform:e=>(0,Qe.createBlock)("core/quote",{},[(0,Qe.createBlock)("core/paragraph",{content:e})])},{type:"raw",schema:()=>({blockquote:{children:"*"}}),selector:"blockquote",transform:(e,t)=>(0,Qe.createBlock)("core/quote",{},t({HTML:e.innerHTML,mode:"BLOCKS"}))},{type:"block",isMultiBlock:!0,blocks:["*"],isMatch:({},e)=>1===e.length?["core/paragraph","core/heading","core/list","core/pullquote"].includes(e[0].name):!e.some((({name:e})=>"core/quote"===e)),__experimentalConvert:e=>(0,Qe.createBlock)("core/quote",{},e.map((e=>(0,Qe.createBlock)(e.name,e.attributes,e.innerBlocks))))}],to:[{type:"block",blocks:["core/pullquote"],isMatch:({},e)=>e.innerBlocks.every((({name:e})=>"core/paragraph"===e)),transform:({citation:e,anchor:t,fontSize:n,style:a},o)=>{const r=o.map((({attributes:e})=>`${e.content}`)).join("<br>");return(0,Qe.createBlock)("core/pullquote",{value:r,citation:e,anchor:t,fontSize:n,style:a})}},{type:"block",blocks:["core/paragraph"],transform:({citation:e},t)=>nt.RichText.isEmpty(e)?t:[...t,(0,Qe.createBlock)("core/paragraph",{content:e})]},{type:"block",blocks:["core/group"],transform:({citation:e,anchor:t},n)=>(0,Qe.createBlock)("core/group",{anchor:t},nt.RichText.isEmpty(e)?n:[...n,(0,Qe.createBlock)("core/paragraph",{content:e})])}],ungroup:({citation:e},t)=>nt.RichText.isEmpty(e)?t:[...t,(0,Qe.createBlock)("core/paragraph",{content:e})]},cx=sx,mx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/quote",title:"Quote",category:"text",description:'Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Julio Cortázar',keywords:["blockquote","cite"],textdomain:"default",attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:"",__experimentalRole:"content"},citation:{type:"rich-text",source:"rich-text",selector:"cite",__experimentalRole:"content"},align:{type:"string"}},supports:{anchor:!0,html:!1,__experimentalOnEnter:!0,__experimentalOnMerge:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},layout:{allowEditing:!1},spacing:{blockGap:!0},interactivity:{clientNavigation:!0}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"plain",label:"Plain"}],editorStyle:"wp-block-quote-editor",style:"wp-block-quote"},{name:ux}=mx,px={icon:Xk,example:{attributes:{citation:"Julio Cortázar"},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,tt.__)("In quoting others, we cite ourselves.")}}]},transforms:cx,edit:function({attributes:e,setAttributes:t,insertBlocksAfter:n,clientId:a,className:o,style:r}){const{align:l,citation:i}=e;((e,t)=>{const n=(0,gt.useRegistry)(),{updateBlockAttributes:a,replaceInnerBlocks:o}=(0,gt.useDispatch)(nt.store);(0,_t.useEffect)((()=>{if(!e.value)return;const[r,l]=ex(e);Qp()("Value attribute on the quote block",{since:"6.0",version:"6.5",alternative:"inner blocks"}),n.batch((()=>{a(t,r),o(t,l)}))}),[e.value])})(e,a);const s=(0,gt.useSelect)((e=>{const{isBlockSelected:t,hasSelectedInnerBlock:n}=e(nt.store);return n(a)||t(a)}),[]),c=(0,nt.useBlockProps)({className:ut()(o,{[`has-text-align-${l}`]:l}),...!lx&&{style:r}}),m=(0,nt.useInnerBlocksProps)(c,{template:ix,templateInsertUpdatesSelection:!0,__experimentalCaptureToolbars:!0});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:l,onChange:e=>{t({align:e})}})),(0,Ke.createElement)(et.BlockQuotation,{...m},m.children,(!nt.RichText.isEmpty(i)||s)&&(0,Ke.createElement)(nt.RichText,{identifier:"citation",tagName:lx?"cite":void 0,style:{display:"block"},value:i,onChange:e=>{t({citation:e})},__unstableMobileNoFocusOnMount:!0,"aria-label":(0,tt.__)("Quote citation"),placeholder:(0,tt.__)("Add citation"),className:"wp-block-quote__citation",__unstableOnSplitAtEnd:()=>n((0,Qe.createBlock)((0,Qe.getDefaultBlockName)())),...lx?{}:{textAlign:l}})))},save:function({attributes:e}){const{align:t,citation:n}=e,a=ut()({[`has-text-align-${t}`]:t});return(0,Ke.createElement)("blockquote",{...nt.useBlockProps.save({className:a})},(0,Ke.createElement)(nt.InnerBlocks.Content,null),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"cite",value:n}))},deprecated:rx},dx=()=>Xe({name:ux,metadata:mx,settings:px}),gx=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})),hx=window.wp.patterns,{useLayoutClasses:bx}=Ft(nt.privateApis),{PARTIAL_SYNCING_SUPPORTED_BLOCKS:_x}=Ft(hx.privateApis),yx=["full","wide","left","right"];function vx(e,t,n={}){let a={};for(const o of e){o?.innerBlocks?.length&&(a={...a,...vx(o.innerBlocks,t,n)});const e=o.attributes.metadata?.id,r=o.clientId;e&&t?.[e]&&(a[r]=e)}return a}const fx=(e,t)=>{const n=(0,_t.useRef)();return(0,_t.useMemo)((()=>{if(!e?.length)return{};let a=n.current;if(void 0===a){const o="constrained"===t?.type,r=e.some((e=>yx.includes(e.attributes.align)));a=o&&r?"full":null,n.current=a}return{alignment:a,layout:a?t:void 0}}),[e,t])};function kx(e){return Object.keys(_x).includes(e.name)&&!!e.attributes.metadata?.bindings&&Object.values(e.attributes.metadata.bindings).some((e=>"core/pattern-overrides"===e.source))}function xx(e){return e.some((e=>!!kx(e)||xx(e.innerBlocks)))}function wx(e){return Object.entries(e.attributes.metadata.bindings).filter((([,e])=>"core/pattern-overrides"===e.source)).map((([e])=>e))}function Ex(e,t={},n,a){return e.map((e=>{var o;const r=Ex(e.innerBlocks,t,n,a),l=null!==(o=a?.[e.clientId])&&void 0!==o?o:e.attributes.metadata?.name;if(!l||!kx(e))return{...e,innerBlocks:r};const i=wx(e),s={...e.attributes};for(const a of i){var c;null!==(c=n[l])&&void 0!==c||(n[l]={}),n[l][a]=e.attributes[a];const o=t[l];void 0!==o?.[a]&&(s[a]=o[a])}return{...e,attributes:s,innerBlocks:r}}))}function Cx(e,t,n){const a={};for(const s of e){var o;if(s.name===zx)continue;s.innerBlocks.length&&Object.assign(a,Cx(s.innerBlocks,t,n));const e=null!==(o=n?.[s.clientId])&&void 0!==o?o:s.attributes.metadata?.name;if(!e||!kx(s))continue;const c=wx(s);for(const n of c){var r;if(l=s.attributes[n],i=t?.[e]?.[n],!(l instanceof Rn.RichTextData&&i instanceof Rn.RichTextData?l.toString()===i.toString():l===i))null!==(r=a[e])&&void 0!==r||(a[e]={}),a[e][n]=void 0===s.attributes[n]?"":s.attributes[n]}}var l,i;return Object.keys(a).length>0?a:void 0}function Sx(e,t,n){t.forEach((t=>{const a=n||(kx(t)?"contentOnly":"disabled");e(t.clientId,a),Sx(e,t.innerBlocks,t.name===zx?"disabled":n)}))}function Bx(){const e=(0,nt.useBlockProps)();return(0,Ke.createElement)("div",{...e},(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Block cannot be rendered inside itself.")))}function Nx({name:e,attributes:{ref:t,content:n},__unstableParentLayout:a,clientId:o,setAttributes:r}){const l=(0,gt.useRegistry)(),{record:i,editedRecord:s,hasResolved:c}=(0,dt.useEntityRecord)("postType","wp_block",t),m=c&&!i,u=(0,_t.useRef)(n),p=(0,_t.useRef)({}),{replaceInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:g,setBlockEditingMode:h}=(0,gt.useDispatch)(nt.store),{syncDerivedUpdates:b}=Ft((0,gt.useDispatch)(nt.store)),{innerBlocks:_,userCanEdit:y,getBlockEditingMode:v,onNavigateToEntityRecord:f,editingMode:k,hasPatternOverridesSource:x}=(0,gt.useSelect)((e=>{const{canUser:n}=e(dt.store),{getBlocks:a,getSettings:r,getBlockEditingMode:l}=e(nt.store),{getBlockBindingsSource:i}=Ft(e(Qe.store));return{innerBlocks:a(o),userCanEdit:n("update","blocks",t),getBlockEditingMode:l,onNavigateToEntityRecord:r().onNavigateToEntityRecord,editingMode:l(o),hasPatternOverridesSource:!!i("core/pattern-overrides")}}),[o,t]);(0,_t.useEffect)((()=>{Sx(h,_,"disabled"!==k&&x?void 0:"disabled")}),[k,_,h,x]);const w=(0,_t.useMemo)((()=>x&&xx(_)),[x,_]),E=(0,_t.useMemo)((()=>{var e;return null!==(e=s.blocks?.map((e=>(0,Qe.cloneBlock)(e))))&&void 0!==e?e:s.content&&"function"!=typeof s.content?(0,Qe.parse)(s.content):[]}),[s.blocks,s.content]),C=(0,_t.useRef)({});(0,_t.useEffect)((()=>{C.current=vx(E,u.current),p.current={};const e=v(o);l.batch((()=>{h(o,"default"),b((()=>{const e=x?Ex(E,u.current,p.current,C.current):E;d(o,e)})),h(o,e)}))}),[x,g,o,E,d,l,v,h,b]);const{alignment:S,layout:B}=fx(_,a),N=bx({layout:B},e),T=(0,nt.useBlockProps)({className:ut()("block-library-block__reusable-block-container",B&&N,{[`align${S}`]:S})}),I=(0,nt.useInnerBlocksProps)(T,{templateLock:"all",layout:B,renderAppender:_?.length?void 0:nt.InnerBlocks.ButtonBlockAppender});(0,_t.useEffect)((()=>{if(!x)return;const{getBlocks:e}=l.select(nt.store);let t=e(o);return l.subscribe((()=>{const n=e(o);n!==t&&(t=n,b((()=>{r({content:Cx(n,p.current,C.current)})})))}),nt.store)}),[x,b,o,l,r]);let P=null;return m&&(P=(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Block has been deleted or is unavailable."))),c||(P=(0,Ke.createElement)(et.Placeholder,null,(0,Ke.createElement)(et.Spinner,null))),(0,Ke.createElement)(Ke.Fragment,null,y&&f&&(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.ToolbarButton,{onClick:()=>{f({postId:t,postType:"wp_block"})}},(0,tt.__)("Edit original")))),w&&(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.ToolbarButton,{onClick:()=>{n&&d(o,E)},disabled:!n,__experimentalIsFocusable:!0},(0,tt.__)("Reset")))),null===P?(0,Ke.createElement)("div",{...I}):(0,Ke.createElement)("div",{...T},P))}const Tx={attributes:{ref:{type:"number"},content:{type:"object"}},supports:{customClassName:!1,html:!1,inserter:!1,renaming:!1},isEligible:({content:e})=>!!e&&Object.keys(e).every((t=>{return e[t].values&&("object"==typeof(n=e[t].values)&&!Array.isArray(n)&&null!==n);var n})),migrate(e){const{content:t,...n}=e;if(t&&Object.keys(t).length){const e={...t};for(const n in t)e[n]=t[n].values;return{...n,content:e}}return e}},Ix={attributes:{ref:{type:"number"},overrides:{type:"object"}},supports:{customClassName:!1,html:!1,inserter:!1,renaming:!1},isEligible:({overrides:e})=>!!e,migrate(e){const{overrides:t,...n}=e,a={};return Object.keys(t).forEach((e=>{a[e]=t[e]})),{...n,content:a}}},Px=[Tx,Ix],Mx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/block",title:"Pattern",category:"reusable",description:"Reuse this design across your site.",keywords:["reusable"],textdomain:"default",attributes:{ref:{type:"number"},content:{type:"object"}},supports:{customClassName:!1,html:!1,inserter:!1,renaming:!1,interactivity:{clientNavigation:!0}}},{name:zx}=Mx,Rx={deprecated:Px,edit:function(e){const{ref:t}=e.attributes;return(0,nt.useHasRecursion)(t)?(0,Ke.createElement)(Bx,null):(0,Ke.createElement)(nt.RecursionProvider,{uniqueId:t},(0,Ke.createElement)(Nx,{...e}))},icon:gx,__experimentalLabel:({ref:e})=>{if(!e)return;const t=(0,gt.select)(dt.store).getEditedEntityRecord("postType","wp_block",e);return t?.title?(0,Jn.decodeEntities)(t.title):void 0}},Ax=()=>Xe({name:zx,metadata:Mx,settings:Rx});const Hx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/read-more",title:"Read More",category:"theme",description:"Displays the link of a post, page, or any other content-type.",textdomain:"default",attributes:{content:{type:"string"},linkTarget:{type:"string",default:"_self"}},usesContext:["postId"],supports:{html:!1,color:{gradients:!0,text:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0,textDecoration:!0}},spacing:{margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalDefaultControls:{width:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-read-more"},{name:Lx}=Hx,Dx={icon:kn,edit:function({attributes:{content:e,linkTarget:t},setAttributes:n,insertBlocksAfter:a}){const o=(0,nt.useBlockProps)();return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>n({linkTarget:e?"_blank":"_self"}),checked:"_blank"===t}))),(0,Ke.createElement)(nt.RichText,{tagName:"a","aria-label":(0,tt.__)("“Read more” link text"),placeholder:(0,tt.__)("Read more"),value:e,onChange:e=>n({content:e}),__unstableOnSplitAtEnd:()=>a((0,Qe.createBlock)((0,Qe.getDefaultBlockName)())),withoutInteractiveFormatting:!0,...o}))}},Fx=()=>Xe({name:Lx,metadata:Hx,settings:Dx}),Vx=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M5 10.2h-.8v1.5H5c1.9 0 3.8.8 5.1 2.1 1.4 1.4 2.1 3.2 2.1 5.1v.8h1.5V19c0-2.3-.9-4.5-2.6-6.2-1.6-1.6-3.8-2.6-6.1-2.6zm10.4-1.6C12.6 5.8 8.9 4.2 5 4.2h-.8v1.5H5c3.5 0 6.9 1.4 9.4 3.9s3.9 5.8 3.9 9.4v.8h1.5V19c0-3.9-1.6-7.6-4.4-10.4zM4 20h3v-3H4v3z"}));const $x={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/rss",title:"RSS",category:"widgets",description:"Display entries from any RSS or Atom feed.",keywords:["atom","feed"],textdomain:"default",attributes:{columns:{type:"number",default:2},blockLayout:{type:"string",default:"list"},feedURL:{type:"string",default:""},itemsToShow:{type:"number",default:5},displayExcerpt:{type:"boolean",default:!1},displayAuthor:{type:"boolean",default:!1},displayDate:{type:"boolean",default:!1},excerptLength:{type:"number",default:55}},supports:{align:!0,html:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-rss-editor",style:"wp-block-rss"},{name:Ox}=$x,Gx={icon:Vx,example:{attributes:{feedURL:"https://wordpress.org"}},edit:function({attributes:e,setAttributes:t}){const[n,a]=(0,_t.useState)(!e.feedURL),{blockLayout:o,columns:r,displayAuthor:l,displayDate:i,displayExcerpt:s,excerptLength:c,feedURL:m,itemsToShow:u}=e;function p(n){return()=>{const a=e[n];t({[n]:!a})}}const d=(0,nt.useBlockProps)();if(n)return(0,Ke.createElement)("div",{...d},(0,Ke.createElement)(et.Placeholder,{icon:Vx,label:"RSS"},(0,Ke.createElement)("form",{onSubmit:function(e){e.preventDefault(),m&&(t({feedURL:(0,pt.prependHTTP)(m)}),a(!1))},className:"wp-block-rss__placeholder-form"},(0,Ke.createElement)(et.__experimentalHStack,{wrap:!0},(0,Ke.createElement)(et.__experimentalInputControl,{__next40pxDefaultSize:!0,placeholder:(0,tt.__)("Enter URL here…"),value:m,onChange:e=>t({feedURL:e}),className:"wp-block-rss__placeholder-input"}),(0,Ke.createElement)(et.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit"},(0,tt.__)("Use URL"))))));const g=[{icon:Di,title:(0,tt.__)("Edit RSS URL"),onClick:()=>a(!0)},{icon:Tp,title:(0,tt.__)("List view"),onClick:()=>t({blockLayout:"list"}),isActive:"list"===o},{icon:Xm,title:(0,tt.__)("Grid view"),onClick:()=>t({blockLayout:"grid"}),isActive:"grid"===o}];return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,{controls:g})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Number of items"),value:u,onChange:e=>t({itemsToShow:e}),min:1,max:20,required:!0}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display author"),checked:l,onChange:p("displayAuthor")}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display date"),checked:i,onChange:p("displayDate")}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Display excerpt"),checked:s,onChange:p("displayExcerpt")}),s&&(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Max number of words in excerpt"),value:c,onChange:e=>t({excerptLength:e}),min:10,max:100,required:!0}),"grid"===o&&(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Columns"),value:r,onChange:e=>t({columns:e}),min:2,max:6,required:!0}))),(0,Ke.createElement)("div",{...d},(0,Ke.createElement)(et.Disabled,null,(0,Ke.createElement)(ot(),{block:"core/rss",attributes:e}))))}},Ux=()=>Xe({name:Ox,metadata:$x,settings:Gx}),qx=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})),jx=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Rect,{x:"7",y:"10",width:"10",height:"4",rx:"1",fill:"currentColor"})),Wx=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Rect,{x:"4.75",y:"15.25",width:"6.5",height:"9.5",transform:"rotate(-90 4.75 15.25)",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),(0,Ke.createElement)(et.Rect,{x:"16",y:"10",width:"4",height:"4",rx:"1",fill:"currentColor"})),Zx=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Rect,{x:"4.75",y:"15.25",width:"6.5",height:"14.5",transform:"rotate(-90 4.75 15.25)",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),(0,Ke.createElement)(et.Rect,{x:"14",y:"10",width:"4",height:"4",rx:"1",fill:"currentColor"})),Qx=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Rect,{x:"4.75",y:"15.25",width:"6.5",height:"14.5",transform:"rotate(-90 4.75 15.25)",stroke:"currentColor",fill:"none",strokeWidth:"1.5"})),Kx=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Rect,{x:"4.75",y:"7.75",width:"14.5",height:"8.5",rx:"1.25",stroke:"currentColor",fill:"none",strokeWidth:"1.5"}),(0,Ke.createElement)(et.Rect,{x:"8",y:"11",width:"8",height:"2",fill:"currentColor"})),Yx=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(et.Rect,{x:"4.75",y:"17.25",width:"5.5",height:"14.5",transform:"rotate(-90 4.75 17.25)",stroke:"currentColor",fill:"none",strokeWidth:"1.5"}),(0,Ke.createElement)(et.Rect,{x:"4",y:"7",width:"10",height:"2",fill:"currentColor"}));function Jx(e){return"%"===e}const Xx=[{name:"default",isDefault:!0,attributes:{buttonText:(0,tt.__)("Search"),label:(0,tt.__)("Search")}}],ew={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/search",title:"Search",category:"widgets",description:"Help visitors find your content.",keywords:["find"],textdomain:"default",attributes:{label:{type:"string",__experimentalRole:"content"},showLabel:{type:"boolean",default:!0},placeholder:{type:"string",default:"",__experimentalRole:"content"},width:{type:"number"},widthUnit:{type:"string"},buttonText:{type:"string",__experimentalRole:"content"},buttonPosition:{type:"string",default:"button-outside"},buttonUseIcon:{type:"boolean",default:!1},query:{type:"object",default:{}},isSearchFieldHidden:{type:"boolean",default:!1}},supports:{align:["left","center","right"],color:{gradients:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{background:!0,text:!0}},interactivity:!0,typography:{__experimentalSkipSerialization:!0,__experimentalSelector:".wp-block-search__label, .wp-block-search__input, .wp-block-search__button",fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}},html:!1},editorStyle:"wp-block-search-editor",style:"wp-block-search"},{name:tw}=ew,nw={icon:qx,example:{attributes:{buttonText:(0,tt.__)("Search"),label:(0,tt.__)("Search")},viewportWidth:400},variations:Xx,edit:function({className:e,attributes:t,setAttributes:n,toggleSelection:a,isSelected:o,clientId:r}){const{label:l,showLabel:i,placeholder:s,width:c,widthUnit:m,align:u,buttonText:p,buttonPosition:d,buttonUseIcon:g,isSearchFieldHidden:h,style:b}=t,_=(0,gt.useSelect)((e=>{const{getBlockParentsByBlockName:t,wasBlockJustInserted:n}=e(nt.store);return!!t(r,"core/navigation")?.length&&n(r)}),[r]),{__unstableMarkNextChangeAsNotPersistent:y}=(0,gt.useDispatch)(nt.store);(0,_t.useEffect)((()=>{_&&(y(),n({showLabel:!1,buttonUseIcon:!0,buttonPosition:"button-inside"}))}),[y,_,n]);const v=b?.border?.radius,f=(0,nt.__experimentalUseBorderProps)(t);"number"==typeof v&&(f.style.borderRadius=`${v}px`);const k=(0,nt.__experimentalUseColorProps)(t),[x,w]=(0,nt.useSettings)("typography.fluid","layout"),E=(0,nt.getTypographyClassesAndStyles)(t,{typography:{fluid:x},layout:{wideSize:w?.wideSize}}),C=`wp-block-search__width-${(0,jt.useInstanceId)(et.__experimentalUnitControl)}`,S="button-inside"===d,B="button-outside"===d,N="no-button"===d,T="button-only"===d,I=(0,_t.useRef)(),P=(0,_t.useRef)(),M=(0,et.__experimentalUseCustomUnits)({availableUnits:["%","px"],defaultValues:{"%":50,px:350}});(0,_t.useEffect)((()=>{T&&!o&&n({isSearchFieldHidden:!0})}),[T,o,n]),(0,_t.useEffect)((()=>{T&&o&&n({isSearchFieldHidden:!1})}),[T,o,n,c]);const z=[{role:"menuitemradio",title:(0,tt.__)("Button outside"),isActive:"button-outside"===d,icon:Wx,onClick:()=>{n({buttonPosition:"button-outside",isSearchFieldHidden:!1})}},{role:"menuitemradio",title:(0,tt.__)("Button inside"),isActive:"button-inside"===d,icon:Zx,onClick:()=>{n({buttonPosition:"button-inside",isSearchFieldHidden:!1})}},{role:"menuitemradio",title:(0,tt.__)("No button"),isActive:"no-button"===d,icon:Qx,onClick:()=>{n({buttonPosition:"no-button",isSearchFieldHidden:!1})}},{role:"menuitemradio",title:(0,tt.__)("Button only"),isActive:"button-only"===d,icon:jx,onClick:()=>{n({buttonPosition:"button-only",isSearchFieldHidden:!0})}}],R=()=>{const e=ut()("wp-block-search__input",S?void 0:f.className,E.className),t={...S?{borderRadius:v}:f.style,...E.style,textDecoration:void 0};return(0,Ke.createElement)("input",{type:"search",className:e,style:t,"aria-label":(0,tt.__)("Optional placeholder text"),placeholder:s?void 0:(0,tt.__)("Optional placeholder…"),value:s,onChange:e=>n({placeholder:e.target.value}),ref:I})},A=(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.ToolbarButton,{title:(0,tt.__)("Toggle search label"),icon:Yx,onClick:()=>{n({showLabel:!i})},className:i?"is-pressed":void 0}),(0,Ke.createElement)(et.ToolbarDropdownMenu,{icon:(()=>{switch(d){case"button-inside":return Zx;case"button-outside":return Wx;case"no-button":return Qx;case"button-only":return jx}})(),label:(0,tt.__)("Change button position"),controls:z}),!N&&(0,Ke.createElement)(et.ToolbarButton,{title:(0,tt.__)("Use button with icon"),icon:Kx,onClick:()=>{n({buttonUseIcon:!g})},className:g?"is-pressed":void 0}))),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Display Settings")},(0,Ke.createElement)(et.BaseControl,{label:(0,tt.__)("Width"),id:C},(0,Ke.createElement)(et.__experimentalUnitControl,{id:C,min:Jx(m)?0:220,max:Jx(m)?100:void 0,step:1,onChange:e=>{const t="%"===m&&parseInt(e,10)>100?100:e;n({width:parseInt(t,10)})},onUnitChange:e=>{n({width:"%"===e?50:350,widthUnit:e})},__unstableInputWidth:"80px",value:`${c}${m}`,units:M}),(0,Ke.createElement)(et.ButtonGroup,{className:"wp-block-search__components-button-group","aria-label":(0,tt.__)("Percentage Width")},[25,50,75,100].map((e=>(0,Ke.createElement)(et.Button,{key:e,size:"small",variant:e===c&&"%"===m?"primary":void 0,onClick:()=>n({width:e,widthUnit:"%"})},e,"%")))))))),H=e=>e?`calc(${e} + 4px)`:void 0,L=(0,nt.useBlockProps)({className:ut()(e,S?"wp-block-search__button-inside":void 0,B?"wp-block-search__button-outside":void 0,N?"wp-block-search__no-button":void 0,T?"wp-block-search__button-only":void 0,g||N?void 0:"wp-block-search__text-button",g&&!N?"wp-block-search__icon-button":void 0,T&&h?"wp-block-search__searchfield-hidden":void 0),style:{...E.style,textDecoration:void 0}}),D=ut()("wp-block-search__label",E.className);return(0,Ke.createElement)("div",{...L},A,i&&(0,Ke.createElement)(nt.RichText,{className:D,"aria-label":(0,tt.__)("Label text"),placeholder:(0,tt.__)("Add label…"),withoutInteractiveFormatting:!0,value:l,onChange:e=>n({label:e}),style:E.style}),(0,Ke.createElement)(et.ResizableBox,{size:{width:`${c}${m}`},className:ut()("wp-block-search__inside-wrapper",S?f.className:void 0),style:(()=>{const e=S?f.style:{borderRadius:f.style?.borderRadius,borderTopLeftRadius:f.style?.borderTopLeftRadius,borderTopRightRadius:f.style?.borderTopRightRadius,borderBottomLeftRadius:f.style?.borderBottomLeftRadius,borderBottomRightRadius:f.style?.borderBottomRightRadius},t=void 0!==v&&0!==parseInt(v,10);if(S&&t){if("object"==typeof v){const{topLeft:t,topRight:n,bottomLeft:a,bottomRight:o}=v;return{...e,borderTopLeftRadius:H(t),borderTopRightRadius:H(n),borderBottomLeftRadius:H(a),borderBottomRightRadius:H(o)}}const t=Number.isInteger(v)?`${v}px`:v;e.borderRadius=`calc(${t} + 4px)`}return e})(),minWidth:220,enable:T?{}:{right:"right"!==u,left:"right"===u},onResizeStart:(e,t,o)=>{n({width:parseInt(o.offsetWidth,10),widthUnit:"px"}),a(!1)},onResizeStop:(e,t,o,r)=>{n({width:parseInt(c+r.width,10)}),a(!0)},showHandle:o},(S||B||T)&&(0,Ke.createElement)(Ke.Fragment,null,R(),(()=>{const e=ut()("wp-block-search__button",k.className,E.className,S?void 0:f.className,g?"has-icon":void 0,(0,nt.__experimentalGetElementClassName)("button")),t={...k.style,...E.style,...S?{borderRadius:v}:f.style},a=()=>{T&&n({isSearchFieldHidden:!h})};return(0,Ke.createElement)(Ke.Fragment,null,g&&(0,Ke.createElement)("button",{type:"button",className:e,style:t,"aria-label":p?(0,ac.__unstableStripHTML)(p):(0,tt.__)("Search"),onClick:a,ref:P},(0,Ke.createElement)(Ng,{icon:qx})),!g&&(0,Ke.createElement)(nt.RichText,{className:e,style:t,"aria-label":(0,tt.__)("Button text"),placeholder:(0,tt.__)("Add button text…"),withoutInteractiveFormatting:!0,value:p,onChange:e=>n({buttonText:e}),onClick:a}))})()),N&&R()))}},aw=()=>Xe({name:tw,metadata:ew,settings:nw}),ow=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M4.5 12.5v4H3V7h1.5v3.987h15V7H21v9.5h-1.5v-4h-15Z"}));const rw={from:[{type:"enter",regExp:/^-{3,}$/,transform:()=>(0,Qe.createBlock)("core/separator")},{type:"raw",selector:"hr",schema:{hr:{}}}]},lw={attributes:{color:{type:"string"},customColor:{type:"string"}},save({attributes:e}){const{color:t,customColor:n}=e,a=(0,nt.getColorClassName)("background-color",t),o=(0,nt.getColorClassName)("color",t),r=ut()({"has-text-color has-background":t||n,[a]:a,[o]:o}),l={backgroundColor:a?void 0:n,color:o?void 0:n};return(0,Ke.createElement)("hr",{...nt.useBlockProps.save({className:r,style:l})})},migrate(e){const{color:t,customColor:n,...a}=e;return{...a,backgroundColor:t||void 0,opacity:"css",style:n?{color:{background:n}}:void 0}}},iw=[lw],sw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/separator",title:"Separator",category:"design",description:"Create a break between ideas or sections with a horizontal separator.",keywords:["horizontal-line","hr","divider"],textdomain:"default",attributes:{opacity:{type:"string",default:"alpha-channel"}},supports:{anchor:!0,align:["center","wide","full"],color:{enableContrastChecker:!1,__experimentalSkipSerialization:!0,gradients:!0,background:!0,text:!1,__experimentalDefaultControls:{background:!0}},spacing:{margin:["top","bottom"]},interactivity:{clientNavigation:!0}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"wide",label:"Wide Line"},{name:"dots",label:"Dots"}],editorStyle:"wp-block-separator-editor",style:"wp-block-separator"},{name:cw}=sw,mw={icon:ow,example:{attributes:{customColor:"#065174",className:"is-style-wide"}},transforms:rw,edit:function({attributes:e,setAttributes:t}){const{backgroundColor:n,opacity:a,style:o}=e,r=(0,nt.__experimentalUseColorProps)(e),l=r?.style?.backgroundColor,i=!!o?.color?.background;!function(e,t,n){const[a,o]=(0,_t.useState)(!1),r=(0,jt.usePrevious)(t);(0,_t.useEffect)((()=>{"css"!==e||t||r||o(!0)}),[t,r,e]),(0,_t.useEffect)((()=>{"css"===e&&(a&&t||r&&t!==r)&&(n({opacity:"alpha-channel"}),o(!1))}),[a,t,r])}(a,l,t);const s=(0,nt.getColorClassName)("color",n),c=ut()({"has-text-color":n||l,[s]:s,"has-css-opacity":"css"===a,"has-alpha-channel-opacity":"alpha-channel"===a},r.className),m={color:l,backgroundColor:l};return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.HorizontalRule,{...(0,nt.useBlockProps)({className:c,style:i?m:void 0})}))},save:function({attributes:e}){const{backgroundColor:t,style:n,opacity:a}=e,o=n?.color?.background,r=(0,nt.__experimentalGetColorClassesAndStyles)(e),l=(0,nt.getColorClassName)("color",t),i=ut()({"has-text-color":t||o,[l]:l,"has-css-opacity":"css"===a,"has-alpha-channel-opacity":"alpha-channel"===a},r.className),s={backgroundColor:r?.style?.backgroundColor,color:l?void 0:o};return(0,Ke.createElement)("hr",{...nt.useBlockProps.save({className:i,style:s})})},deprecated:iw},uw=()=>Xe({name:cw,metadata:sw,settings:mw}),pw=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M16 4.2v1.5h2.5v12.5H16v1.5h4V4.2h-4zM4.2 19.8h4v-1.5H5.8V5.8h2.5V4.2h-4l-.1 15.6zm5.1-3.1l1.4.6 4-10-1.4-.6-4 10z"}));const dw=window.wp.autop,gw={from:[{type:"shortcode",tag:"[a-z][a-z0-9_-]*",attributes:{text:{type:"string",shortcode:(e,{content:t})=>(0,dw.removep)((0,dw.autop)(t))}},priority:20}]},hw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/shortcode",title:"Shortcode",category:"widgets",description:"Insert additional custom elements with a WordPress shortcode.",textdomain:"default",attributes:{text:{type:"string",source:"raw"}},supports:{className:!1,customClassName:!1,html:!1},editorStyle:"wp-block-shortcode-editor"},{name:bw}=hw,_w={icon:pw,transforms:gw,edit:function e({attributes:t,setAttributes:n}){const a=`blocks-shortcode-input-${(0,jt.useInstanceId)(e)}`;return(0,Ke.createElement)("div",{...(0,nt.useBlockProps)({className:"components-placeholder"})},(0,Ke.createElement)("label",{htmlFor:a,className:"components-placeholder__label"},(0,Ke.createElement)(Ng,{icon:pw}),(0,tt.__)("Shortcode")),(0,Ke.createElement)(nt.PlainText,{className:"blocks-shortcode__textarea",id:a,value:t.text,"aria-label":(0,tt.__)("Shortcode text"),placeholder:(0,tt.__)("Write shortcode here…"),onChange:e=>n({text:e})}))},save:function({attributes:e}){return(0,Ke.createElement)(_t.RawHTML,null,e.text)}},yw=()=>Xe({name:bw,metadata:hw,settings:_w}),vw=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 1.5c4.1 0 7.5 3.4 7.5 7.5v.1c-1.4-.8-3.3-1.7-3.4-1.8-.2-.1-.5-.1-.8.1l-2.9 2.1L9 11.3c-.2-.1-.4 0-.6.1l-3.7 2.2c-.1-.5-.2-1-.2-1.5 0-4.2 3.4-7.6 7.5-7.6zm0 15c-3.1 0-5.7-1.9-6.9-4.5l3.7-2.2 3.5 1.2c.2.1.5 0 .7-.1l2.9-2.1c.8.4 2.5 1.2 3.5 1.9-.9 3.3-3.9 5.8-7.4 5.8z"})),fw=["image"],kw="image/*",xw=({alt:e,attributes:{align:t,width:n,height:a,isLink:o,linkTarget:r,shouldSyncIcon:l},containerRef:i,isSelected:s,setAttributes:c,setLogo:m,logoUrl:u,siteUrl:p,logoId:d,iconId:g,setIcon:h,canUserEdit:b})=>{const _=ap(i,[t]),y=(0,jt.useViewportMatch)("medium"),v=!["wide","full"].includes(t)&&y,[{naturalWidth:f,naturalHeight:k},x]=(0,_t.useState)({}),[w,E]=(0,_t.useState)(!1),{toggleSelection:C}=(0,gt.useDispatch)(nt.store),S=ut()("custom-logo-link",{"is-transient":(0,It.isBlobURL)(u)}),{imageEditing:B,maxWidth:N,title:T}=(0,gt.useSelect)((e=>{const t=e(nt.store).getSettings(),n=e(dt.store).getEntityRecord("root","__unstableBase");return{title:n?.name,imageEditing:t.imageEditing,maxWidth:t.maxWidth}}),[]);(0,_t.useEffect)((()=>{l&&d!==g&&c({shouldSyncIcon:!1})}),[]),(0,_t.useEffect)((()=>{s||E(!1)}),[s]);const I=(0,Ke.createElement)("img",{className:"custom-logo",src:u,alt:e,onLoad:e=>{x({naturalWidth:e.target.naturalWidth,naturalHeight:e.target.naturalHeight})}});let P,M=I;if(o&&(M=(0,Ke.createElement)("a",{href:p,className:S,rel:"home",title:T,onClick:e=>e.preventDefault()},I)),_&&f&&k){P=f>_?_:f}if(!v||!P)return(0,Ke.createElement)("div",{style:{width:n,height:a}},M);const z=n||120,R=f/k,A=z/R,H=f<k?Jc:Math.ceil(Jc*R),L=k<f?Jc:Math.ceil(Jc/R),D=2.5*N;let F=!1,V=!1;"center"===t?(F=!0,V=!0):(0,tt.isRTL)()?"left"===t?F=!0:V=!0:"right"===t?V=!0:F=!0;const $=d&&f&&k&&B,O=$&&w?(0,Ke.createElement)(nt.__experimentalImageEditor,{id:d,url:u,width:z,height:A,clientWidth:_,naturalHeight:k,naturalWidth:f,onSaveImage:e=>{m(e.id)},onFinishEditing:()=>{E(!1)}}):(0,Ke.createElement)(et.ResizableBox,{size:{width:z,height:A},showHandle:s,minWidth:H,maxWidth:D,minHeight:L,maxHeight:D/R,lockAspectRatio:!0,enable:{top:!1,right:F,bottom:!0,left:V},onResizeStart:function(){C(!1)},onResizeStop:(e,t,n,a)=>{C(!0),c({width:parseInt(z+a.width,10),height:parseInt(A+a.height,10)})}},M),G=!window?.__experimentalUseCustomizerSiteLogoUrl?p+"/wp-admin/options-general.php":p+"/wp-admin/customize.php?autofocus[section]=title_tagline",U=(0,_t.createInterpolateElement)((0,tt.__)("Site Icons are what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. To use a custom icon that is different from your site logo, use the <a>Site Icon settings</a>."),{a:(0,Ke.createElement)("a",{href:G,target:"_blank",rel:"noopener noreferrer"})});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Image width"),onChange:e=>c({width:e}),min:H,max:D,initialPosition:Math.min(120,D),value:n||"",disabled:!v}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link image to home"),onChange:()=>c({isLink:!o}),checked:o}),o&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>c({linkTarget:e?"_blank":"_self"}),checked:"_blank"===r})),b&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Use as Site Icon"),onChange:e=>{c({shouldSyncIcon:e}),h(e?d:void 0)},checked:!!l,help:U})))),(0,Ke.createElement)(nt.BlockControls,{group:"block"},$&&!w&&(0,Ke.createElement)(et.ToolbarButton,{onClick:()=>E(!0),icon:ep,label:(0,tt.__)("Crop")})),O)};function ww({onRemoveLogo:e,...t}){return(0,Ke.createElement)(nt.MediaReplaceFlow,{...t,allowedTypes:fw,accept:kw},(0,Ke.createElement)(et.MenuItem,{onClick:e},(0,tt.__)("Reset")))}const Ew=({mediaItemData:e={},itemGroupProps:t})=>{const{alt_text:n,source_url:a,slug:o,media_details:r}=e,l=r?.sizes?.full?.file||o;return(0,Ke.createElement)(et.__experimentalItemGroup,{...t,as:"span"},(0,Ke.createElement)(et.__experimentalHStack,{justify:"flex-start",as:"span"},(0,Ke.createElement)("img",{src:a,alt:n}),(0,Ke.createElement)(et.FlexItem,{as:"span"},(0,Ke.createElement)(et.__experimentalTruncate,{numberOfLines:1,className:"block-library-site-logo__inspector-media-replace-title"},l))))};const Cw={to:[{type:"block",blocks:["core/site-title"],transform:({isLink:e,linkTarget:t})=>(0,Qe.createBlock)("core/site-title",{isLink:e,linkTarget:t})}]},Sw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/site-logo",title:"Site Logo",category:"theme",description:"Display an image to represent this site. Update this block and the changes apply everywhere.",textdomain:"default",attributes:{width:{type:"number"},isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"},shouldSyncIcon:{type:"boolean"}},example:{viewportWidth:500,attributes:{width:350,className:"block-editor-block-types-list__site-logo-example"}},supports:{html:!1,align:!0,alignWide:!1,color:{__experimentalDuotone:"img, .components-placeholder__illustration, .components-placeholder::before",text:!1,background:!1},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},interactivity:{clientNavigation:!0}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"rounded",label:"Rounded"}],editorStyle:"wp-block-site-logo-editor",style:"wp-block-site-logo"},{name:Bw}=Sw,Nw={icon:vw,example:{},edit:function({attributes:e,className:t,setAttributes:n,isSelected:a}){const{width:o,shouldSyncIcon:r}=e,l=(0,_t.useRef)(),{siteLogoId:i,canUserEdit:s,url:c,siteIconId:m,mediaItemData:u,isRequestingMediaItem:p}=(0,gt.useSelect)((e=>{const{canUser:t,getEntityRecord:n,getEditedEntityRecord:a}=e(dt.store),o=t("update","settings"),r=o?a("root","site"):void 0,l=n("root","__unstableBase"),i=o?r?.site_logo:l?.site_logo,s=r?.site_icon,c=i&&e(dt.store).getMedia(i,{context:"view"}),m=i&&!e(dt.store).hasFinishedResolution("getMedia",[i,{context:"view"}]);return{siteLogoId:i,canUserEdit:o,url:l?.home,mediaItemData:c,isRequestingMediaItem:m,siteIconId:s}}),[]),{getSettings:d}=(0,gt.useSelect)(nt.store),{editEntityRecord:g}=(0,gt.useDispatch)(dt.store),h=(e,t=!1)=>{(r||t)&&b(e),g("root","site",void 0,{site_logo:e})},b=e=>g("root","site",void 0,{site_icon:null!=e?e:null}),{alt_text:_,source_url:y}=null!=u?u:{},v=e=>{if(void 0===r){const t=!m;return n({shouldSyncIcon:t}),void f(e,t)}f(e)},f=(e,t=!1)=>{e&&(e.id||!e.url?h(e.id,t):h(void 0))},{createErrorNotice:k}=(0,gt.useDispatch)(Pt.store),x=e=>{k(e,{type:"snackbar"})},w=e=>{d().mediaUpload({allowedTypes:fw,filesList:e,onFileChange([e]){(0,It.isBlobURL)(e?.url)||v(e)},onError:x})},E={mediaURL:y,onSelect:f,onError:x,onRemoveLogo:()=>{h(null),n({width:void 0})}},C=s&&y&&(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(ww,{...E}));let S;const B=void 0===i||p;B&&(S=(0,Ke.createElement)(et.Spinner,null)),y&&(S=(0,Ke.createElement)(xw,{alt:_,attributes:e,className:t,containerRef:l,isSelected:a,setAttributes:n,logoUrl:y,setLogo:h,logoId:u?.id||i,siteUrl:c,setIcon:b,iconId:m,canUserEdit:s}));const N=ut()(t,{"is-default-size":!o}),T=(0,nt.useBlockProps)({ref:l,className:N}),I=(0,tt.__)("Add a site logo"),P=(s||y)&&(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Media")},(0,Ke.createElement)("div",{className:"block-library-site-logo__inspector-media-replace-container"},!s&&!!y&&(0,Ke.createElement)(Ew,{mediaItemData:u,itemGroupProps:{isBordered:!0,className:"block-library-site-logo__inspector-readonly-logo-preview"}}),s&&!!y&&(0,Ke.createElement)(ww,{...E,name:(0,Ke.createElement)(Ew,{mediaItemData:u}),popoverProps:{}}),s&&!y&&(0,Ke.createElement)(nt.MediaUploadCheck,null,(0,Ke.createElement)(nt.MediaUpload,{onSelect:v,allowedTypes:fw,render:({open:e})=>(0,Ke.createElement)("div",{className:"block-library-site-logo__inspector-upload-container"},(0,Ke.createElement)(et.Button,{onClick:e,variant:"secondary"},B?(0,Ke.createElement)(et.Spinner,null):(0,tt.__)("Add media")),(0,Ke.createElement)(et.DropZone,{onFilesDrop:w}))})))));return(0,Ke.createElement)("div",{...T},C,P,!!y&&S,!y&&!s&&(0,Ke.createElement)(et.Placeholder,{className:"site-logo_placeholder"},!!B&&(0,Ke.createElement)("span",{className:"components-placeholder__preview"},(0,Ke.createElement)(et.Spinner,null))),!y&&s&&(0,Ke.createElement)(nt.MediaPlaceholder,{onSelect:v,accept:kw,allowedTypes:fw,onError:x,placeholder:e=>{const n=ut()("block-editor-media-placeholder",t);return(0,Ke.createElement)(et.Placeholder,{className:n,preview:S,withIllustration:!0,style:{width:o}},e)},mediaLibraryButton:({open:e})=>(0,Ke.createElement)(et.Button,{icon:np,variant:"primary",label:I,showTooltip:!0,tooltipPosition:"top center",onClick:()=>{e()}})}))},transforms:Cw},Tw=()=>Xe({name:Bw,metadata:Sw,settings:Nw});const Iw=(0,Ke.createElement)(et.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},(0,Ke.createElement)(et.Path,{d:"M4 10.5h16V9H4v1.5ZM4 15h9v-1.5H4V15Z"})),Pw={attributes:{textAlign:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},Mw=[Pw],zw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/site-tagline",title:"Site Tagline",category:"theme",description:"Describe in a few words what the site is about. The tagline can be used in search results or when sharing on social networks even if it’s not displayed in the theme design.",keywords:["description"],textdomain:"default",attributes:{textAlign:{type:"string"}},example:{},supports:{align:["wide","full"],html:!1,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-site-tagline-editor"},{name:Rw}=zw,Aw={icon:Iw,edit:function({attributes:e,setAttributes:t,insertBlocksAfter:n}){const{textAlign:a}=e,{canUserEdit:o,tagline:r}=(0,gt.useSelect)((e=>{const{canUser:t,getEntityRecord:n,getEditedEntityRecord:a}=e(dt.store),o=t("update","settings"),r=o?a("root","site"):{},l=n("root","__unstableBase");return{canUserEdit:t("update","settings"),tagline:o?r?.description:l?.description}}),[]),{editEntityRecord:l}=(0,gt.useDispatch)(dt.store),i=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${a}`]:a,"wp-block-site-tagline__placeholder":!o&&!r})}),s=o?(0,Ke.createElement)(nt.RichText,{allowedFormats:[],onChange:function(e){l("root","site",void 0,{description:e})},"aria-label":(0,tt.__)("Site tagline text"),placeholder:(0,tt.__)("Write site tagline…"),tagName:"p",value:r,disableLineBreaks:!0,__unstableOnSplitAtEnd:()=>n((0,Qe.createBlock)((0,Qe.getDefaultBlockName)())),...i}):(0,Ke.createElement)("p",{...i},r||(0,tt.__)("Site Tagline placeholder"));return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{onChange:e=>t({textAlign:e}),value:a})),s)},deprecated:Mw},Hw=()=>Xe({name:Rw,metadata:zw,settings:Aw}),Lw=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M12 9c-.8 0-1.5.7-1.5 1.5S11.2 12 12 12s1.5-.7 1.5-1.5S12.8 9 12 9zm0-5c-3.6 0-6.5 2.8-6.5 6.2 0 .8.3 1.8.9 3.1.5 1.1 1.2 2.3 2 3.6.7 1 3 3.8 3.2 3.9l.4.5.4-.5c.2-.2 2.6-2.9 3.2-3.9.8-1.2 1.5-2.5 2-3.6.6-1.3.9-2.3.9-3.1C18.5 6.8 15.6 4 12 4zm4.3 8.7c-.5 1-1.1 2.2-1.9 3.4-.5.7-1.7 2.2-2.4 3-.7-.8-1.9-2.3-2.4-3-.8-1.2-1.4-2.3-1.9-3.3-.6-1.4-.7-2.2-.7-2.5 0-2.6 2.2-4.7 5-4.7s5 2.1 5 4.7c0 .2-.1 1-.7 2.4z"})),Dw=[0,1,2,3,4,5,6];const Fw={attributes:{level:{type:"number",default:1},textAlign:{type:"string"},isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},Vw=[Fw],$w={to:[{type:"block",blocks:["core/site-logo"],transform:({isLink:e,linkTarget:t})=>(0,Qe.createBlock)("core/site-logo",{isLink:e,linkTarget:t})}]},Ow={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/site-title",title:"Site Title",category:"theme",description:"Displays the name of this site. Update the block, and the changes apply everywhere it’s used. This will also appear in the browser title bar and in search results.",textdomain:"default",attributes:{level:{type:"number",default:1},textAlign:{type:"string"},isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"}},example:{viewportWidth:500},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{padding:!0,margin:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-site-title-editor",style:"wp-block-site-title"},{name:Gw}=Ow,Uw={icon:Lw,example:{},edit:function({attributes:e,setAttributes:t,insertBlocksAfter:n}){const{level:a,textAlign:o,isLink:r,linkTarget:l}=e,{canUserEdit:i,title:s}=(0,gt.useSelect)((e=>{const{canUser:t,getEntityRecord:n,getEditedEntityRecord:a}=e(dt.store),o=t("update","settings"),r=o?a("root","site"):{},l=n("root","__unstableBase");return{canUserEdit:o,title:o?r?.title:l?.name}}),[]),{editEntityRecord:c}=(0,gt.useDispatch)(dt.store),m=0===a?"p":`h${a}`,u=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${o}`]:o,"wp-block-site-title__placeholder":!i&&!s})}),p=i?(0,Ke.createElement)(m,{...u},(0,Ke.createElement)(nt.RichText,{tagName:r?"a":"span",href:r?"#site-title-pseudo-link":void 0,"aria-label":(0,tt.__)("Site title text"),placeholder:(0,tt.__)("Write site title…"),value:s,onChange:function(e){c("root","site",void 0,{title:e})},allowedFormats:[],disableLineBreaks:!0,__unstableOnSplitAtEnd:()=>n((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))})):(0,Ke.createElement)(m,{...u},r?(0,Ke.createElement)("a",{href:"#site-title-pseudo-link",onClick:e=>e.preventDefault()},(0,Jn.decodeEntities)(s)||(0,tt.__)("Site Title placeholder")):(0,Ke.createElement)("span",null,(0,Jn.decodeEntities)(s)||(0,tt.__)("Site Title placeholder")));return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.HeadingLevelDropdown,{options:Dw,value:a,onChange:e=>t({level:e})}),(0,Ke.createElement)(nt.AlignmentControl,{value:o,onChange:e=>{t({textAlign:e})}})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Make title link to home"),onChange:()=>t({isLink:!r}),checked:r}),r&&(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open in new tab"),onChange:e=>t({linkTarget:e?"_blank":"_self"}),checked:"_blank"===l}))),p)},transforms:$w,deprecated:Vw},qw=()=>Xe({name:Gw,metadata:Ow,settings:Uw}),jw=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M9 11.8l6.1-4.5c.1.4.4.7.9.7h2c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1h-2c-.6 0-1 .4-1 1v.4l-6.4 4.8c-.2-.1-.4-.2-.6-.2H6c-.6 0-1 .4-1 1v2c0 .6.4 1 1 1h2c.2 0 .4-.1.6-.2l6.4 4.8v.4c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-2c0-.6-.4-1-1-1h-2c-.5 0-.8.3-.9.7L9 12.2v-.4z"})),Ww=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"})),Zw=()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.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"})),Qw=[{isDefault:!0,name:"wordpress",attributes:{service:"wordpress"},title:"WordPress",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M12.158,12.786L9.46,20.625c0.806,0.237,1.657,0.366,2.54,0.366c1.047,0,2.051-0.181,2.986-0.51 c-0.024-0.038-0.046-0.079-0.065-0.124L12.158,12.786z M3.009,12c0,3.559,2.068,6.634,5.067,8.092L3.788,8.341 C3.289,9.459,3.009,10.696,3.009,12z M18.069,11.546c0-1.112-0.399-1.881-0.741-2.48c-0.456-0.741-0.883-1.368-0.883-2.109 c0-0.826,0.627-1.596,1.51-1.596c0.04,0,0.078,0.005,0.116,0.007C16.472,3.904,14.34,3.009,12,3.009 c-3.141,0-5.904,1.612-7.512,4.052c0.211,0.007,0.41,0.011,0.579,0.011c0.94,0,2.396-0.114,2.396-0.114 C7.947,6.93,8.004,7.642,7.52,7.699c0,0-0.487,0.057-1.029,0.085l3.274,9.739l1.968-5.901l-1.401-3.838 C9.848,7.756,9.389,7.699,9.389,7.699C8.904,7.67,8.961,6.93,9.446,6.958c0,0,1.484,0.114,2.368,0.114 c0.94,0,2.397-0.114,2.397-0.114c0.485-0.028,0.542,0.684,0.057,0.741c0,0-0.488,0.057-1.029,0.085l3.249,9.665l0.897-2.996 C17.841,13.284,18.069,12.316,18.069,11.546z M19.889,7.686c0.039,0.286,0.06,0.593,0.06,0.924c0,0.912-0.171,1.938-0.684,3.22 l-2.746,7.94c2.673-1.558,4.47-4.454,4.47-7.771C20.991,10.436,20.591,8.967,19.889,7.686z M12,22C6.486,22,2,17.514,2,12 C2,6.486,6.486,2,12,2c5.514,0,10,4.486,10,10C22,17.514,17.514,22,12,22z"}))},{name:"fivehundredpx",attributes:{service:"fivehundredpx"},title:"500px",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M6.94026,15.1412c.00437.01213.108.29862.168.44064a6.55008,6.55008,0,1,0,6.03191-9.09557,6.68654,6.68654,0,0,0-2.58357.51467A8.53914,8.53914,0,0,0,8.21268,8.61344L8.209,8.61725V3.22948l9.0504-.00008c.32934-.0036.32934-.46353.32934-.61466s0-.61091-.33035-.61467L7.47248,2a.43.43,0,0,0-.43131.42692v7.58355c0,.24466.30476.42131.58793.4819.553.11812.68074-.05864.81617-.2457l.018-.02481A10.52673,10.52673,0,0,1,9.32258,9.258a5.35268,5.35268,0,1,1,7.58985,7.54976,5.417,5.417,0,0,1-3.80867,1.56365,5.17483,5.17483,0,0,1-2.69822-.74478l.00342-4.61111a2.79372,2.79372,0,0,1,.71372-1.78792,2.61611,2.61611,0,0,1,1.98282-.89477,2.75683,2.75683,0,0,1,1.95525.79477,2.66867,2.66867,0,0,1,.79656,1.909,2.724,2.724,0,0,1-2.75849,2.748,4.94651,4.94651,0,0,1-.86254-.13719c-.31234-.093-.44519.34058-.48892.48349-.16811.54966.08453.65862.13687.67489a3.75751,3.75751,0,0,0,1.25234.18375,3.94634,3.94634,0,1,0-2.82444-6.742,3.67478,3.67478,0,0,0-1.13028,2.584l-.00041.02323c-.0035.11667-.00579,2.881-.00644,3.78811l-.00407-.00451a6.18521,6.18521,0,0,1-1.0851-1.86092c-.10544-.27856-.34358-.22925-.66857-.12917-.14192.04372-.57386.17677-.47833.489Zm4.65165-1.08338a.51346.51346,0,0,0,.19513.31818l.02276.022a.52945.52945,0,0,0,.3517.18416.24242.24242,0,0,0,.16577-.0611c.05473-.05082.67382-.67812.73287-.738l.69041.68819a.28978.28978,0,0,0,.21437.11032.53239.53239,0,0,0,.35708-.19486c.29792-.30419.14885-.46821.07676-.54751l-.69954-.69975.72952-.73469c.16-.17311.01874-.35708-.12218-.498-.20461-.20461-.402-.25742-.52855-.14083l-.7254.72665-.73354-.73375a.20128.20128,0,0,0-.14179-.05695.54135.54135,0,0,0-.34379.19648c-.22561.22555-.274.38149-.15656.5059l.73374.7315-.72942.73072A.26589.26589,0,0,0,11.59191,14.05782Zm1.59866-9.915A8.86081,8.86081,0,0,0,9.854,4.776a.26169.26169,0,0,0-.16938.22759.92978.92978,0,0,0,.08619.42094c.05682.14524.20779.531.50006.41955a8.40969,8.40969,0,0,1,2.91968-.55484,7.87875,7.87875,0,0,1,3.086.62286,8.61817,8.61817,0,0,1,2.30562,1.49315.2781.2781,0,0,0,.18318.07586c.15529,0,.30425-.15253.43167-.29551.21268-.23861.35873-.4369.1492-.63538a8.50425,8.50425,0,0,0-2.62312-1.694A9.0177,9.0177,0,0,0,13.19058,4.14283ZM19.50945,18.6236h0a.93171.93171,0,0,0-.36642-.25406.26589.26589,0,0,0-.27613.06613l-.06943.06929A7.90606,7.90606,0,0,1,7.60639,18.505a7.57284,7.57284,0,0,1-1.696-2.51537,8.58715,8.58715,0,0,1-.5147-1.77754l-.00871-.04864c-.04939-.25873-.28755-.27684-.62981-.22448-.14234.02178-.5755.088-.53426.39969l.001.00712a9.08807,9.08807,0,0,0,15.406,4.99094c.00193-.00192.04753-.04718.0725-.07436C19.79425,19.16234,19.87422,18.98728,19.50945,18.6236Z"}))},{name:"amazon",attributes:{service:"amazon"},title:"Amazon",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M13.582,8.182C11.934,8.367,9.78,8.49,8.238,9.166c-1.781,0.769-3.03,2.337-3.03,4.644 c0,2.953,1.86,4.429,4.253,4.429c2.02,0,3.125-0.477,4.685-2.065c0.516,0.747,0.685,1.109,1.629,1.894 c0.212,0.114,0.483,0.103,0.672-0.066l0.006,0.006c0.567-0.505,1.599-1.401,2.18-1.888c0.231-0.188,0.19-0.496,0.009-0.754 c-0.52-0.718-1.072-1.303-1.072-2.634V8.305c0-1.876,0.133-3.599-1.249-4.891C15.23,2.369,13.422,2,12.04,2 C9.336,2,6.318,3.01,5.686,6.351C5.618,6.706,5.877,6.893,6.109,6.945l2.754,0.298C9.121,7.23,9.308,6.977,9.357,6.72 c0.236-1.151,1.2-1.706,2.284-1.706c0.584,0,1.249,0.215,1.595,0.738c0.398,0.584,0.346,1.384,0.346,2.061V8.182z M13.049,14.088 c-0.451,0.8-1.169,1.291-1.967,1.291c-1.09,0-1.728-0.83-1.728-2.061c0-2.42,2.171-2.86,4.227-2.86v0.615 C13.582,12.181,13.608,13.104,13.049,14.088z M20.683,19.339C18.329,21.076,14.917,22,11.979,22c-4.118,0-7.826-1.522-10.632-4.057 c-0.22-0.199-0.024-0.471,0.241-0.317c3.027,1.762,6.771,2.823,10.639,2.823c2.608,0,5.476-0.541,8.115-1.66 C20.739,18.62,21.072,19.051,20.683,19.339z M21.336,21.043c-0.194,0.163-0.379,0.076-0.293-0.139 c0.284-0.71,0.92-2.298,0.619-2.684c-0.301-0.386-1.99-0.183-2.749-0.092c-0.23,0.027-0.266-0.173-0.059-0.319 c1.348-0.946,3.555-0.673,3.811-0.356C22.925,17.773,22.599,19.986,21.336,21.043z"}))},{name:"bandcamp",attributes:{service:"bandcamp"},title:"Bandcamp",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M15.27 17.289 3 17.289 8.73 6.711 21 6.711 15.27 17.289"}))},{name:"behance",attributes:{service:"behance"},title:"Behance",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M7.799,5.698c0.589,0,1.12,0.051,1.606,0.156c0.482,0.102,0.894,0.273,1.241,0.507c0.344,0.235,0.612,0.546,0.804,0.938 c0.188,0.387,0.281,0.871,0.281,1.443c0,0.619-0.141,1.137-0.421,1.551c-0.284,0.413-0.7,0.751-1.255,1.014 c0.756,0.218,1.317,0.601,1.689,1.146c0.374,0.549,0.557,1.205,0.557,1.975c0,0.623-0.12,1.161-0.359,1.612 c-0.241,0.457-0.569,0.828-0.973,1.114c-0.408,0.288-0.876,0.5-1.399,0.637C9.052,17.931,8.514,18,7.963,18H2V5.698H7.799 M7.449,10.668c0.481,0,0.878-0.114,1.192-0.345c0.311-0.228,0.463-0.603,0.463-1.119c0-0.286-0.051-0.523-0.152-0.707 C8.848,8.315,8.711,8.171,8.536,8.07C8.362,7.966,8.166,7.894,7.94,7.854c-0.224-0.044-0.457-0.06-0.697-0.06H4.709v2.874H7.449z M7.6,15.905c0.267,0,0.521-0.024,0.759-0.077c0.243-0.053,0.457-0.137,0.637-0.261c0.182-0.12,0.332-0.283,0.441-0.491 C9.547,14.87,9.6,14.602,9.6,14.278c0-0.633-0.18-1.084-0.533-1.357c-0.356-0.27-0.83-0.404-1.413-0.404H4.709v3.388L7.6,15.905z M16.162,15.864c0.367,0.358,0.897,0.538,1.583,0.538c0.493,0,0.92-0.125,1.277-0.374c0.354-0.248,0.571-0.514,0.654-0.79h2.155 c-0.347,1.072-0.872,1.838-1.589,2.299C19.534,18,18.67,18.23,17.662,18.23c-0.701,0-1.332-0.113-1.899-0.337 c-0.567-0.227-1.041-0.544-1.439-0.958c-0.389-0.415-0.689-0.907-0.904-1.484c-0.213-0.574-0.32-1.21-0.32-1.899 c0-0.666,0.11-1.288,0.329-1.863c0.222-0.577,0.529-1.075,0.933-1.492c0.406-0.42,0.885-0.751,1.444-0.994 c0.558-0.241,1.175-0.363,1.857-0.363c0.754,0,1.414,0.145,1.98,0.44c0.563,0.291,1.026,0.686,1.389,1.181 c0.363,0.493,0.622,1.057,0.783,1.69c0.16,0.632,0.217,1.292,0.171,1.983h-6.428C15.557,14.84,15.795,15.506,16.162,15.864 M18.973,11.184c-0.291-0.321-0.783-0.496-1.384-0.496c-0.39,0-0.714,0.066-0.973,0.2c-0.254,0.132-0.461,0.297-0.621,0.491 c-0.157,0.197-0.265,0.405-0.328,0.628c-0.063,0.217-0.101,0.413-0.111,0.587h3.98C19.478,11.969,19.265,11.509,18.973,11.184z M15.057,7.738h4.985V6.524h-4.985L15.057,7.738z"}))},{name:"chain",attributes:{service:"chain"},title:"Link",icon:Zw},{name:"codepen",attributes:{service:"codepen"},title:"CodePen",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M22.016,8.84c-0.002-0.013-0.005-0.025-0.007-0.037c-0.005-0.025-0.008-0.048-0.015-0.072 c-0.003-0.015-0.01-0.028-0.013-0.042c-0.008-0.02-0.015-0.04-0.023-0.062c-0.007-0.015-0.013-0.028-0.02-0.042 c-0.008-0.02-0.018-0.037-0.03-0.057c-0.007-0.013-0.017-0.027-0.025-0.038c-0.012-0.018-0.023-0.035-0.035-0.052 c-0.01-0.013-0.02-0.025-0.03-0.037c-0.015-0.017-0.028-0.032-0.043-0.045c-0.01-0.012-0.022-0.023-0.035-0.035 c-0.015-0.015-0.032-0.028-0.048-0.04c-0.012-0.01-0.025-0.02-0.037-0.03c-0.005-0.003-0.01-0.008-0.015-0.012l-9.161-6.096 c-0.289-0.192-0.666-0.192-0.955,0L2.359,8.237C2.354,8.24,2.349,8.245,2.344,8.249L2.306,8.277 c-0.017,0.013-0.033,0.027-0.048,0.04C2.246,8.331,2.234,8.342,2.222,8.352c-0.015,0.015-0.028,0.03-0.042,0.047 c-0.012,0.013-0.022,0.023-0.03,0.037C2.139,8.453,2.125,8.471,2.115,8.488C2.107,8.501,2.099,8.514,2.09,8.526 C2.079,8.548,2.069,8.565,2.06,8.585C2.054,8.6,2.047,8.613,2.04,8.626C2.032,8.648,2.025,8.67,2.019,8.69 c-0.005,0.013-0.01,0.027-0.013,0.042C1.999,8.755,1.995,8.778,1.99,8.803C1.989,8.817,1.985,8.828,1.984,8.84 C1.978,8.879,1.975,8.915,1.975,8.954v6.093c0,0.037,0.003,0.075,0.008,0.112c0.002,0.012,0.005,0.025,0.007,0.038 c0.005,0.023,0.008,0.047,0.015,0.072c0.003,0.015,0.008,0.028,0.013,0.04c0.007,0.022,0.013,0.042,0.022,0.063 c0.007,0.015,0.013,0.028,0.02,0.04c0.008,0.02,0.018,0.038,0.03,0.058c0.007,0.013,0.015,0.027,0.025,0.038 c0.012,0.018,0.023,0.035,0.035,0.052c0.01,0.013,0.02,0.025,0.03,0.037c0.013,0.015,0.028,0.032,0.042,0.045 c0.012,0.012,0.023,0.023,0.035,0.035c0.015,0.013,0.032,0.028,0.048,0.04l0.038,0.03c0.005,0.003,0.01,0.007,0.013,0.01 l9.163,6.095C11.668,21.953,11.833,22,12,22c0.167,0,0.332-0.047,0.478-0.144l9.163-6.095l0.015-0.01 c0.013-0.01,0.027-0.02,0.037-0.03c0.018-0.013,0.035-0.028,0.048-0.04c0.013-0.012,0.025-0.023,0.035-0.035 c0.017-0.015,0.03-0.032,0.043-0.045c0.01-0.013,0.02-0.025,0.03-0.037c0.013-0.018,0.025-0.035,0.035-0.052 c0.008-0.013,0.018-0.027,0.025-0.038c0.012-0.02,0.022-0.038,0.03-0.058c0.007-0.013,0.013-0.027,0.02-0.04 c0.008-0.022,0.015-0.042,0.023-0.063c0.003-0.013,0.01-0.027,0.013-0.04c0.007-0.025,0.01-0.048,0.015-0.072 c0.002-0.013,0.005-0.027,0.007-0.037c0.003-0.042,0.007-0.079,0.007-0.117V8.954C22.025,8.915,22.022,8.879,22.016,8.84z M12.862,4.464l6.751,4.49l-3.016,2.013l-3.735-2.492V4.464z M11.138,4.464v4.009l-3.735,2.494L4.389,8.954L11.138,4.464z M3.699,10.562L5.853,12l-2.155,1.438V10.562z M11.138,19.536l-6.749-4.491l3.015-2.011l3.735,2.492V19.536z M12,14.035L8.953,12 L12,9.966L15.047,12L12,14.035z M12.862,19.536v-4.009l3.735-2.492l3.016,2.011L12.862,19.536z M20.303,13.438L18.147,12 l2.156-1.438L20.303,13.438z"}))},{name:"deviantart",attributes:{service:"deviantart"},title:"DeviantArt",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M 18.19 5.636 18.19 2 18.188 2 14.553 2 14.19 2.366 12.474 5.636 11.935 6 5.81 6 5.81 10.994 9.177 10.994 9.477 11.357 5.81 18.363 5.81 22 5.811 22 9.447 22 9.81 21.634 11.526 18.364 12.065 18 18.19 18 18.19 13.006 14.823 13.006 14.523 12.641 18.19 5.636z"}))},{name:"dribbble",attributes:{service:"dribbble"},title:"Dribbble",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12,22C6.486,22,2,17.514,2,12S6.486,2,12,2c5.514,0,10,4.486,10,10S17.514,22,12,22z M20.434,13.369 c-0.292-0.092-2.644-0.794-5.32-0.365c1.117,3.07,1.572,5.57,1.659,6.09C18.689,17.798,20.053,15.745,20.434,13.369z M15.336,19.876c-0.127-0.749-0.623-3.361-1.822-6.477c-0.019,0.006-0.038,0.013-0.056,0.019c-4.818,1.679-6.547,5.02-6.701,5.334 c1.448,1.129,3.268,1.803,5.243,1.803C13.183,20.555,14.311,20.313,15.336,19.876z M5.654,17.724 c0.193-0.331,2.538-4.213,6.943-5.637c0.111-0.036,0.224-0.07,0.337-0.102c-0.214-0.485-0.448-0.971-0.692-1.45 c-4.266,1.277-8.405,1.223-8.778,1.216c-0.003,0.087-0.004,0.174-0.004,0.261C3.458,14.207,4.29,16.21,5.654,17.724z M3.639,10.264 c0.382,0.005,3.901,0.02,7.897-1.041c-1.415-2.516-2.942-4.631-3.167-4.94C5.979,5.41,4.193,7.613,3.639,10.264z M9.998,3.709 c0.236,0.316,1.787,2.429,3.187,5c3.037-1.138,4.323-2.867,4.477-3.085C16.154,4.286,14.17,3.471,12,3.471 C11.311,3.471,10.641,3.554,9.998,3.709z M18.612,6.612C18.432,6.855,17,8.69,13.842,9.979c0.199,0.407,0.389,0.821,0.567,1.237 c0.063,0.148,0.124,0.295,0.184,0.441c2.842-0.357,5.666,0.215,5.948,0.275C20.522,9.916,19.801,8.065,18.612,6.612z"}))},{name:"dropbox",attributes:{service:"dropbox"},title:"Dropbox",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12,6.134L6.069,9.797L2,6.54l5.883-3.843L12,6.134z M2,13.054l5.883,3.843L12,13.459L6.069,9.797L2,13.054z M12,13.459 l4.116,3.439L22,13.054l-4.069-3.257L12,13.459z M22,6.54l-5.884-3.843L12,6.134l5.931,3.663L22,6.54z M12.011,14.2l-4.129,3.426 l-1.767-1.153v1.291l5.896,3.539l5.897-3.539v-1.291l-1.769,1.153L12.011,14.2z"}))},{name:"etsy",attributes:{service:"etsy"},title:"Etsy",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M9.16033,4.038c0-.27174.02717-.43478.48913-.43478h6.22283c1.087,0,1.68478.92391,2.11957,2.663l.35326,1.38587h1.05978C19.59511,3.712,19.75815,2,19.75815,2s-2.663.29891-4.23913.29891h-7.962L3.29076,2.163v1.1413L4.731,3.57609c1.00543.19022,1.25.40761,1.33152,1.33152,0,0,.08152,2.71739.08152,7.20109s-.08152,7.17391-.08152,7.17391c0,.81522-.32609,1.11413-1.33152,1.30435l-1.44022.27174V22l4.2663-.13587h7.11957c1.60326,0,5.32609.13587,5.32609.13587.08152-.97826.625-5.40761.70652-5.89674H19.7038L18.644,18.52174c-.84239,1.90217-2.06522,2.038-3.42391,2.038H11.1712c-1.3587,0-2.01087-.54348-2.01087-1.712V12.65217s3.0163,0,3.99457.08152c.76087.05435,1.22283.27174,1.46739,1.33152l.32609,1.413h1.16848l-.08152-3.55978.163-3.587H15.02989l-.38043,1.57609c-.24457,1.03261-.40761,1.22283-1.46739,1.33152-1.38587.13587-4.02174.1087-4.02174.1087Z"}))},{name:"facebook",attributes:{service:"facebook"},title:"Facebook",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"}))},{name:"feed",attributes:{service:"feed"},title:"RSS Feed",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M2,8.667V12c5.515,0,10,4.485,10,10h3.333C15.333,14.637,9.363,8.667,2,8.667z M2,2v3.333 c9.19,0,16.667,7.477,16.667,16.667H22C22,10.955,13.045,2,2,2z M4.5,17C3.118,17,2,18.12,2,19.5S3.118,22,4.5,22S7,20.88,7,19.5 S5.882,17,4.5,17z"}))},{name:"flickr",attributes:{service:"flickr"},title:"Flickr",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M6.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5S9.25,7,6.5,7z M17.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5 S20.25,7,17.5,7z"}))},{name:"foursquare",attributes:{service:"foursquare"},title:"Foursquare",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M17.573,2c0,0-9.197,0-10.668,0S5,3.107,5,3.805s0,16.948,0,16.948c0,0.785,0.422,1.077,0.66,1.172 c0.238,0.097,0.892,0.177,1.285-0.275c0,0,5.035-5.843,5.122-5.93c0.132-0.132,0.132-0.132,0.262-0.132h3.26 c1.368,0,1.588-0.977,1.732-1.552c0.078-0.318,0.692-3.428,1.225-6.122l0.675-3.368C19.56,2.893,19.14,2,17.573,2z M16.495,7.22 c-0.053,0.252-0.372,0.518-0.665,0.518c-0.293,0-4.157,0-4.157,0c-0.467,0-0.802,0.318-0.802,0.787v0.508 c0,0.467,0.337,0.798,0.805,0.798c0,0,3.197,0,3.528,0s0.655,0.362,0.583,0.715c-0.072,0.353-0.407,2.102-0.448,2.295 c-0.04,0.193-0.262,0.523-0.655,0.523c-0.33,0-2.88,0-2.88,0c-0.523,0-0.683,0.068-1.033,0.503 c-0.35,0.437-3.505,4.223-3.505,4.223c-0.032,0.035-0.063,0.027-0.063-0.015V4.852c0-0.298,0.26-0.648,0.648-0.648 c0,0,8.228,0,8.562,0c0.315,0,0.61,0.297,0.528,0.683L16.495,7.22z"}))},{name:"goodreads",attributes:{service:"goodreads"},title:"Goodreads",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M17.3,17.5c-0.2,0.8-0.5,1.4-1,1.9c-0.4,0.5-1,0.9-1.7,1.2C13.9,20.9,13.1,21,12,21c-0.6,0-1.3-0.1-1.9-0.2 c-0.6-0.1-1.1-0.4-1.6-0.7c-0.5-0.3-0.9-0.7-1.2-1.2c-0.3-0.5-0.5-1.1-0.5-1.7h1.5c0.1,0.5,0.2,0.9,0.5,1.2 c0.2,0.3,0.5,0.6,0.9,0.8c0.3,0.2,0.7,0.3,1.1,0.4c0.4,0.1,0.8,0.1,1.2,0.1c1.4,0,2.5-0.4,3.1-1.2c0.6-0.8,1-2,1-3.5v-1.7h0 c-0.4,0.8-0.9,1.4-1.6,1.9c-0.7,0.5-1.5,0.7-2.4,0.7c-1,0-1.9-0.2-2.6-0.5C8.7,15,8.1,14.5,7.7,14c-0.5-0.6-0.8-1.3-1-2.1 c-0.2-0.8-0.3-1.6-0.3-2.5c0-0.9,0.1-1.7,0.4-2.5c0.3-0.8,0.6-1.5,1.1-2c0.5-0.6,1.1-1,1.8-1.4C10.3,3.2,11.1,3,12,3 c0.5,0,0.9,0.1,1.3,0.2c0.4,0.1,0.8,0.3,1.1,0.5c0.3,0.2,0.6,0.5,0.9,0.8c0.3,0.3,0.5,0.6,0.6,1h0V3.4h1.5V15 C17.6,15.9,17.5,16.7,17.3,17.5z M13.8,14.1c0.5-0.3,0.9-0.7,1.3-1.1c0.3-0.5,0.6-1,0.8-1.6c0.2-0.6,0.3-1.2,0.3-1.9 c0-0.6-0.1-1.2-0.2-1.9c-0.1-0.6-0.4-1.2-0.7-1.7c-0.3-0.5-0.7-0.9-1.3-1.2c-0.5-0.3-1.1-0.5-1.9-0.5s-1.4,0.2-1.9,0.5 c-0.5,0.3-1,0.7-1.3,1.2C8.5,6.4,8.3,7,8.1,7.6C8,8.2,7.9,8.9,7.9,9.5c0,0.6,0.1,1.3,0.2,1.9C8.3,12,8.6,12.5,8.9,13 c0.3,0.5,0.8,0.8,1.3,1.1c0.5,0.3,1.1,0.4,1.9,0.4C12.7,14.5,13.3,14.4,13.8,14.1z"}))},{name:"google",attributes:{service:"google"},title:"Google",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12.02,10.18v3.72v0.01h5.51c-0.26,1.57-1.67,4.22-5.5,4.22c-3.31,0-6.01-2.75-6.01-6.12s2.7-6.12,6.01-6.12 c1.87,0,3.13,0.8,3.85,1.48l2.84-2.76C16.99,2.99,14.73,2,12.03,2c-5.52,0-10,4.48-10,10s4.48,10,10,10c5.77,0,9.6-4.06,9.6-9.77 c0-0.83-0.11-1.42-0.25-2.05H12.02z"}))},{name:"github",attributes:{service:"github"},title:"GitHub",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"}))},{name:"gravatar",attributes:{service:"gravatar"},title:"Gravatar",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M10.8001 4.69937V10.6494C10.8001 11.1001 10.9791 11.5323 11.2978 11.851C11.6165 12.1697 12.0487 12.3487 12.4994 12.3487C12.9501 12.3487 13.3824 12.1697 13.7011 11.851C14.0198 11.5323 14.1988 11.1001 14.1988 10.6494V6.69089C15.2418 7.05861 16.1371 7.75537 16.7496 8.67617C17.3622 9.59698 17.6589 10.6919 17.595 11.796C17.5311 12.9001 17.1101 13.9535 16.3954 14.7975C15.6807 15.6415 14.711 16.2303 13.6325 16.4753C12.5541 16.7202 11.4252 16.608 10.4161 16.1555C9.40691 15.703 8.57217 14.9348 8.03763 13.9667C7.50308 12.9985 7.29769 11.8828 7.45242 10.7877C7.60714 9.69266 8.11359 8.67755 8.89545 7.89537C9.20904 7.57521 9.38364 7.14426 9.38132 6.69611C9.37899 6.24797 9.19994 5.81884 8.88305 5.50195C8.56616 5.18506 8.13704 5.00601 7.68889 5.00369C7.24075 5.00137 6.80979 5.17597 6.48964 5.48956C5.09907 6.8801 4.23369 8.7098 4.04094 10.6669C3.84819 12.624 4.34 14.5873 5.43257 16.2224C6.52515 17.8575 8.15088 19.0632 10.0328 19.634C11.9146 20.2049 13.9362 20.1055 15.753 19.3529C17.5699 18.6003 19.0695 17.241 19.9965 15.5066C20.9234 13.7722 21.2203 11.7701 20.8366 9.84133C20.4528 7.91259 19.4122 6.17658 17.892 4.92911C16.3717 3.68163 14.466 2.99987 12.4994 3C12.0487 3 11.6165 3.17904 11.2978 3.49773C10.9791 3.81643 10.8001 4.24867 10.8001 4.69937Z"}))},{name:"instagram",attributes:{service:"instagram"},title:"Instagram",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z"}))},{name:"lastfm",attributes:{service:"lastfm"},title:"Last.fm",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M 12.0002 1.5 C 6.2006 1.5 1.5 6.2011 1.5 11.9998 C 1.5 17.799 6.2006 22.5 12.0002 22.5 C 17.799 22.5 22.5 17.799 22.5 11.9998 C 22.5 6.2011 17.799 1.5 12.0002 1.5 Z M 16.1974 16.2204 C 14.8164 16.2152 13.9346 15.587 13.3345 14.1859 L 13.1816 13.8451 L 11.8541 10.8101 C 11.4271 9.7688 10.3526 9.0712 9.1801 9.0712 C 7.5695 9.0712 6.2593 10.3851 6.2593 12.001 C 6.2593 13.6165 7.5695 14.9303 9.1801 14.9303 C 10.272 14.9303 11.2651 14.3275 11.772 13.3567 C 11.7893 13.3235 11.8239 13.302 11.863 13.3038 C 11.9007 13.3054 11.9353 13.3288 11.9504 13.3632 L 12.4865 14.6046 C 12.5016 14.639 12.4956 14.6778 12.4723 14.7069 C 11.6605 15.6995 10.4602 16.2683 9.1801 16.2683 C 6.8331 16.2683 4.9234 14.3536 4.9234 12.001 C 4.9234 9.6468 6.833 7.732 9.1801 7.732 C 10.9572 7.732 12.3909 8.6907 13.1138 10.3636 C 13.1206 10.3802 13.8412 12.0708 14.4744 13.5191 C 14.8486 14.374 15.1462 14.896 16.1288 14.9292 C 17.0663 14.9613 17.7538 14.4122 17.7538 13.6485 C 17.7538 12.9691 17.3321 12.8004 16.3803 12.4822 C 14.7365 11.9398 13.845 11.3861 13.845 10.0182 C 13.845 8.6809 14.7667 7.8162 16.192 7.8162 C 17.1288 7.8162 17.8155 8.2287 18.2921 9.0768 C 18.305 9.1006 18.3079 9.1281 18.3004 9.1542 C 18.2929 9.1803 18.2748 9.2021 18.2507 9.2138 L 17.3614 9.669 C 17.3178 9.692 17.2643 9.6781 17.2356 9.6385 C 16.9329 9.2135 16.5956 9.0251 16.1423 9.0251 C 15.5512 9.0251 15.122 9.429 15.122 9.9865 C 15.122 10.6738 15.6529 10.8414 16.5339 11.1192 C 16.6491 11.1558 16.7696 11.194 16.8939 11.2343 C 18.2763 11.6865 19.0768 12.2311 19.0768 13.6836 C 19.0769 15.1297 17.8389 16.2204 16.1974 16.2204 Z"}))},{name:"linkedin",attributes:{service:"linkedin"},title:"LinkedIn",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"}))},{name:"mail",attributes:{service:"mail"},title:"Mail",keywords:["email","e-mail"],icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l7.5 5.6 7.5-5.6V17zm0-9.1L12 13.6 4.5 7.9V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v.9z"}))},{name:"mastodon",attributes:{service:"mastodon"},title:"Mastodon",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M23.193 7.879c0-5.206-3.411-6.732-3.411-6.732C18.062.357 15.108.025 12.041 0h-.076c-3.068.025-6.02.357-7.74 1.147 0 0-3.411 1.526-3.411 6.732 0 1.192-.023 2.618.015 4.129.124 5.092.934 10.109 5.641 11.355 2.17.574 4.034.695 5.535.612 2.722-.15 4.25-.972 4.25-.972l-.09-1.975s-1.945.613-4.129.539c-2.165-.074-4.449-.233-4.799-2.891a5.499 5.499 0 0 1-.048-.745s2.125.52 4.817.643c1.646.075 3.19-.097 4.758-.283 3.007-.359 5.625-2.212 5.954-3.905.517-2.665.475-6.507.475-6.507zm-4.024 6.709h-2.497V8.469c0-1.29-.543-1.944-1.628-1.944-1.2 0-1.802.776-1.802 2.312v3.349h-2.483v-3.35c0-1.536-.602-2.312-1.802-2.312-1.085 0-1.628.655-1.628 1.944v6.119H4.832V8.284c0-1.289.328-2.313.987-3.07.68-.758 1.569-1.146 2.674-1.146 1.278 0 2.246.491 2.886 1.474L12 6.585l.622-1.043c.64-.983 1.608-1.474 2.886-1.474 1.104 0 1.994.388 2.674 1.146.658.757.986 1.781.986 3.07v6.304z"}))},{name:"meetup",attributes:{service:"meetup"},title:"Meetup",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M19.24775,14.722a3.57032,3.57032,0,0,1-2.94457,3.52073,3.61886,3.61886,0,0,1-.64652.05634c-.07314-.0008-.10187.02846-.12507.09547A2.38881,2.38881,0,0,1,13.49453,20.094a2.33092,2.33092,0,0,1-1.827-.50716.13635.13635,0,0,0-.19878-.00408,3.191,3.191,0,0,1-2.104.60248,3.26309,3.26309,0,0,1-3.00324-2.71993,2.19076,2.19076,0,0,1-.03512-.30865c-.00156-.08579-.03413-.1189-.11608-.13493a2.86421,2.86421,0,0,1-1.23189-.56111,2.945,2.945,0,0,1-1.166-2.05749,2.97484,2.97484,0,0,1,.87524-2.50774.112.112,0,0,0,.02091-.16107,2.7213,2.7213,0,0,1-.36648-1.48A2.81256,2.81256,0,0,1,6.57673,7.58838a.35764.35764,0,0,0,.28869-.22819,4.2208,4.2208,0,0,1,6.02892-1.90111.25161.25161,0,0,0,.22023.0243,3.65608,3.65608,0,0,1,3.76031.90678A3.57244,3.57244,0,0,1,17.95918,8.626a2.97339,2.97339,0,0,1,.01829.57356.10637.10637,0,0,0,.0853.12792,1.97669,1.97669,0,0,1,1.27939,1.33733,2.00266,2.00266,0,0,1-.57112,2.12652c-.05284.05166-.04168.08328-.01173.13489A3.51189,3.51189,0,0,1,19.24775,14.722Zm-6.35959-.27836a1.6984,1.6984,0,0,0,1.14556,1.61113,3.82039,3.82039,0,0,0,1.036.17935,1.46888,1.46888,0,0,0,.73509-.12255.44082.44082,0,0,0,.26057-.44274.45312.45312,0,0,0-.29211-.43375.97191.97191,0,0,0-.20678-.063c-.21326-.03806-.42754-.0701-.63973-.11215a.54787.54787,0,0,1-.50172-.60926,2.75864,2.75864,0,0,1,.1773-.901c.1763-.535.414-1.045.64183-1.55913A12.686,12.686,0,0,0,15.85,10.47863a1.58461,1.58461,0,0,0,.04861-.87208,1.04531,1.04531,0,0,0-.85432-.83981,1.60658,1.60658,0,0,0-1.23654.16594.27593.27593,0,0,1-.36286-.03413c-.085-.0747-.16594-.15379-.24918-.23055a.98682.98682,0,0,0-1.33577-.04933,6.1468,6.1468,0,0,1-.4989.41615.47762.47762,0,0,1-.51535.03566c-.17448-.09307-.35512-.175-.53531-.25665a1.74949,1.74949,0,0,0-.56476-.2016,1.69943,1.69943,0,0,0-1.61654.91787,8.05815,8.05815,0,0,0-.32952.80126c-.45471,1.2557-.82507,2.53825-1.20838,3.81639a1.24151,1.24151,0,0,0,.51532,1.44389,1.42659,1.42659,0,0,0,1.22008.17166,1.09728,1.09728,0,0,0,.66994-.69764c.44145-1.04111.839-2.09989,1.25981-3.14926.11581-.28876.22792-.57874.35078-.86438a.44548.44548,0,0,1,.69189-.19539.50521.50521,0,0,1,.15044.43836,1.75625,1.75625,0,0,1-.14731.50453c-.27379.69219-.55265,1.38236-.82766,2.074a2.0836,2.0836,0,0,0-.14038.42876.50719.50719,0,0,0,.27082.57722.87236.87236,0,0,0,.66145.02739.99137.99137,0,0,0,.53406-.532q.61571-1.20914,1.228-2.42031.28423-.55863.57585-1.1133a.87189.87189,0,0,1,.29055-.35253.34987.34987,0,0,1,.37634-.01265.30291.30291,0,0,1,.12434.31459.56716.56716,0,0,1-.04655.1915c-.05318.12739-.10286.25669-.16183.38156-.34118.71775-.68754,1.43273-1.02568,2.152A2.00213,2.00213,0,0,0,12.88816,14.44366Zm4.78568,5.28972a.88573.88573,0,0,0-1.77139.00465.8857.8857,0,0,0,1.77139-.00465Zm-14.83838-7.296a.84329.84329,0,1,0,.00827-1.68655.8433.8433,0,0,0-.00827,1.68655Zm10.366-9.43673a.83506.83506,0,1,0-.0091,1.67.83505.83505,0,0,0,.0091-1.67Zm6.85014,5.22a.71651.71651,0,0,0-1.433.0093.71656.71656,0,0,0,1.433-.0093ZM5.37528,6.17908A.63823.63823,0,1,0,6.015,5.54483.62292.62292,0,0,0,5.37528,6.17908Zm6.68214,14.80843a.54949.54949,0,1,0-.55052.541A.54556.54556,0,0,0,12.05742,20.98752Zm8.53235-8.49689a.54777.54777,0,0,0-.54027.54023.53327.53327,0,0,0,.532.52293.51548.51548,0,0,0,.53272-.5237A.53187.53187,0,0,0,20.58977,12.49063ZM7.82846,2.4715a.44927.44927,0,1,0,.44484.44766A.43821.43821,0,0,0,7.82846,2.4715Zm13.775,7.60492a.41186.41186,0,0,0-.40065.39623.40178.40178,0,0,0,.40168.40168A.38994.38994,0,0,0,22,10.48172.39946.39946,0,0,0,21.60349,10.07642ZM5.79193,17.96207a.40469.40469,0,0,0-.397-.39646.399.399,0,0,0-.396.405.39234.39234,0,0,0,.39939.389A.39857.39857,0,0,0,5.79193,17.96207Z"}))},{name:"medium",attributes:{service:"medium"},title:"Medium",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M20.962,7.257l-5.457,8.867l-3.923-6.375l3.126-5.08c0.112-0.182,0.319-0.286,0.527-0.286c0.05,0,0.1,0.008,0.149,0.02 c0.039,0.01,0.078,0.023,0.114,0.041l5.43,2.715l0.006,0.003c0.004,0.002,0.007,0.006,0.011,0.008 C20.971,7.191,20.98,7.227,20.962,7.257z M9.86,8.592v5.783l5.14,2.57L9.86,8.592z M15.772,17.331l4.231,2.115 C20.554,19.721,21,19.529,21,19.016V8.835L15.772,17.331z M8.968,7.178L3.665,4.527C3.569,4.479,3.478,4.456,3.395,4.456 C3.163,4.456,3,4.636,3,4.938v11.45c0,0.306,0.224,0.669,0.498,0.806l4.671,2.335c0.12,0.06,0.234,0.088,0.337,0.088 c0.29,0,0.494-0.225,0.494-0.602V7.231C9,7.208,8.988,7.188,8.968,7.178z"}))},{name:"patreon",attributes:{service:"patreon"},title:"Patreon",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M20 8.40755C19.9969 6.10922 18.2543 4.22555 16.2097 3.54588C13.6708 2.70188 10.3222 2.82421 7.89775 3.99921C4.95932 5.42355 4.03626 8.54355 4.00186 11.6552C3.97363 14.2136 4.2222 20.9517 7.92225 20.9997C10.6715 21.0356 11.0809 17.3967 12.3529 15.6442C13.258 14.3974 14.4233 14.0452 15.8578 13.6806C18.3233 13.0537 20.0036 11.0551 20 8.40755Z"}))},{name:"pinterest",attributes:{service:"pinterest"},title:"Pinterest",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"}))},{name:"pocket",attributes:{service:"pocket"},title:"Pocket",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M21.927,4.194C21.667,3.48,20.982,3,20.222,3h-0.01h-1.721H3.839C3.092,3,2.411,3.47,2.145,4.17 C2.066,4.378,2.026,4.594,2.026,4.814v6.035l0.069,1.2c0.29,2.73,1.707,5.115,3.899,6.778c0.039,0.03,0.079,0.059,0.119,0.089 l0.025,0.018c1.175,0.859,2.491,1.441,3.91,1.727c0.655,0.132,1.325,0.2,1.991,0.2c0.615,0,1.232-0.057,1.839-0.17 c0.073-0.014,0.145-0.028,0.219-0.044c0.02-0.004,0.042-0.012,0.064-0.023c1.359-0.297,2.621-0.864,3.753-1.691l0.025-0.018 c0.04-0.029,0.08-0.058,0.119-0.089c2.192-1.664,3.609-4.049,3.898-6.778l0.069-1.2V4.814C22.026,4.605,22,4.398,21.927,4.194z M17.692,10.481l-4.704,4.512c-0.266,0.254-0.608,0.382-0.949,0.382c-0.342,0-0.684-0.128-0.949-0.382l-4.705-4.512 C5.838,9.957,5.82,9.089,6.344,8.542c0.524-0.547,1.392-0.565,1.939-0.04l3.756,3.601l3.755-3.601 c0.547-0.524,1.415-0.506,1.939,0.04C18.256,9.089,18.238,9.956,17.692,10.481z"}))},{name:"reddit",attributes:{service:"reddit"},title:"Reddit",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z"}))},{name:"skype",attributes:{service:"skype"},title:"Skype",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M10.113,2.699c0.033-0.006,0.067-0.013,0.1-0.02c0.033,0.017,0.066,0.033,0.098,0.051L10.113,2.699z M2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223z M21.275,13.771 c0.007-0.035,0.011-0.071,0.018-0.106c-0.018-0.031-0.033-0.064-0.052-0.095L21.275,13.771z M13.563,21.199 c0.032,0.019,0.065,0.035,0.096,0.053c0.036-0.006,0.071-0.011,0.105-0.017L13.563,21.199z M22,16.386 c0,1.494-0.581,2.898-1.637,3.953c-1.056,1.057-2.459,1.637-3.953,1.637c-0.967,0-1.914-0.251-2.75-0.725 c0.036-0.006,0.071-0.011,0.105-0.017l-0.202-0.035c0.032,0.019,0.065,0.035,0.096,0.053c-0.543,0.096-1.099,0.147-1.654,0.147 c-1.275,0-2.512-0.25-3.676-0.743c-1.125-0.474-2.135-1.156-3.002-2.023c-0.867-0.867-1.548-1.877-2.023-3.002 c-0.493-1.164-0.743-2.401-0.743-3.676c0-0.546,0.049-1.093,0.142-1.628c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103C2.244,9.5,2,8.566,2,7.615c0-1.493,0.582-2.898,1.637-3.953 c1.056-1.056,2.46-1.638,3.953-1.638c0.915,0,1.818,0.228,2.622,0.655c-0.033,0.007-0.067,0.013-0.1,0.02l0.199,0.031 c-0.032-0.018-0.066-0.034-0.098-0.051c0.002,0,0.003-0.001,0.004-0.001c0.586-0.112,1.187-0.169,1.788-0.169 c1.275,0,2.512,0.249,3.676,0.742c1.124,0.476,2.135,1.156,3.002,2.024c0.868,0.867,1.548,1.877,2.024,3.002 c0.493,1.164,0.743,2.401,0.743,3.676c0,0.575-0.054,1.15-0.157,1.712c-0.018-0.031-0.033-0.064-0.052-0.095l0.034,0.201 c0.007-0.035,0.011-0.071,0.018-0.106C21.754,14.494,22,15.432,22,16.386z M16.817,14.138c0-1.331-0.613-2.743-3.033-3.282 l-2.209-0.49c-0.84-0.192-1.807-0.444-1.807-1.237c0-0.794,0.679-1.348,1.903-1.348c2.468,0,2.243,1.696,3.468,1.696 c0.645,0,1.209-0.379,1.209-1.031c0-1.521-2.435-2.663-4.5-2.663c-2.242,0-4.63,0.952-4.63,3.488c0,1.221,0.436,2.521,2.839,3.123 l2.984,0.745c0.903,0.223,1.129,0.731,1.129,1.189c0,0.762-0.758,1.507-2.129,1.507c-2.679,0-2.307-2.062-3.743-2.062 c-0.645,0-1.113,0.444-1.113,1.078c0,1.236,1.501,2.886,4.856,2.886C15.236,17.737,16.817,16.199,16.817,14.138z"}))},{name:"snapchat",attributes:{service:"snapchat"},title:"Snapchat",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12.065,2a5.526,5.526,0,0,1,3.132.892A5.854,5.854,0,0,1,17.326,5.4a5.821,5.821,0,0,1,.351,2.33q0,.612-.117,2.487a.809.809,0,0,0,.365.091,1.93,1.93,0,0,0,.664-.176,1.93,1.93,0,0,1,.664-.176,1.3,1.3,0,0,1,.729.234.7.7,0,0,1,.351.6.839.839,0,0,1-.41.7,2.732,2.732,0,0,1-.9.41,3.192,3.192,0,0,0-.9.378.728.728,0,0,0-.41.618,1.575,1.575,0,0,0,.156.56,6.9,6.9,0,0,0,1.334,1.953,5.6,5.6,0,0,0,1.881,1.315,5.875,5.875,0,0,0,1.042.3.42.42,0,0,1,.365.456q0,.911-2.852,1.341a1.379,1.379,0,0,0-.143.507,1.8,1.8,0,0,1-.182.605.451.451,0,0,1-.429.241,5.878,5.878,0,0,1-.807-.085,5.917,5.917,0,0,0-.833-.085,4.217,4.217,0,0,0-.807.065,2.42,2.42,0,0,0-.82.293,6.682,6.682,0,0,0-.755.5q-.351.267-.755.527a3.886,3.886,0,0,1-.989.436A4.471,4.471,0,0,1,11.831,22a4.307,4.307,0,0,1-1.256-.176,3.784,3.784,0,0,1-.976-.436q-.4-.26-.749-.527a6.682,6.682,0,0,0-.755-.5,2.422,2.422,0,0,0-.807-.293,4.432,4.432,0,0,0-.82-.065,5.089,5.089,0,0,0-.853.1,5,5,0,0,1-.762.1.474.474,0,0,1-.456-.241,1.819,1.819,0,0,1-.182-.618,1.411,1.411,0,0,0-.143-.521q-2.852-.429-2.852-1.341a.42.42,0,0,1,.365-.456,5.793,5.793,0,0,0,1.042-.3,5.524,5.524,0,0,0,1.881-1.315,6.789,6.789,0,0,0,1.334-1.953A1.575,1.575,0,0,0,6,12.9a.728.728,0,0,0-.41-.618,3.323,3.323,0,0,0-.9-.384,2.912,2.912,0,0,1-.9-.41.814.814,0,0,1-.41-.684.71.71,0,0,1,.338-.593,1.208,1.208,0,0,1,.716-.241,1.976,1.976,0,0,1,.625.169,2.008,2.008,0,0,0,.69.169.919.919,0,0,0,.416-.091q-.117-1.849-.117-2.474A5.861,5.861,0,0,1,6.385,5.4,5.516,5.516,0,0,1,8.625,2.819,7.075,7.075,0,0,1,12.062,2Z"}))},{name:"soundcloud",attributes:{service:"soundcloud"},title:"SoundCloud",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M8.9,16.1L9,14L8.9,9.5c0-0.1,0-0.1-0.1-0.1c0,0-0.1-0.1-0.1-0.1c-0.1,0-0.1,0-0.1,0.1c0,0-0.1,0.1-0.1,0.1L8.3,14l0.1,2.1 c0,0.1,0,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1C8.8,16.3,8.9,16.3,8.9,16.1z M11.4,15.9l0.1-1.8L11.4,9c0-0.1,0-0.2-0.1-0.2 c0,0-0.1,0-0.1,0s-0.1,0-0.1,0c-0.1,0-0.1,0.1-0.1,0.2l0,0.1l-0.1,5c0,0,0,0.7,0.1,2v0c0,0.1,0,0.1,0.1,0.1c0.1,0.1,0.1,0.1,0.2,0.1 c0.1,0,0.1,0,0.2-0.1c0.1,0,0.1-0.1,0.1-0.2L11.4,15.9z M2.4,12.9L2.5,14l-0.2,1.1c0,0.1,0,0.1-0.1,0.1c0,0-0.1,0-0.1-0.1L2.1,14 l0.1-1.1C2.2,12.9,2.3,12.9,2.4,12.9C2.3,12.9,2.4,12.9,2.4,12.9z M3.1,12.2L3.3,14l-0.2,1.8c0,0.1,0,0.1-0.1,0.1 c-0.1,0-0.1,0-0.1-0.1L2.8,14L3,12.2C3,12.2,3,12.2,3.1,12.2C3.1,12.2,3.1,12.2,3.1,12.2z M3.9,11.9L4.1,14l-0.2,2.1 c0,0.1,0,0.1-0.1,0.1c-0.1,0-0.1,0-0.1-0.1L3.5,14l0.2-2.1c0-0.1,0-0.1,0.1-0.1C3.9,11.8,3.9,11.8,3.9,11.9z M4.7,11.9L4.9,14 l-0.2,2.1c0,0.1-0.1,0.1-0.1,0.1c-0.1,0-0.1,0-0.1-0.1L4.3,14l0.2-2.2c0-0.1,0-0.1,0.1-0.1C4.7,11.7,4.7,11.8,4.7,11.9z M5.6,12 l0.2,2l-0.2,2.1c0,0.1-0.1,0.1-0.1,0.1c0,0-0.1,0-0.1,0c0,0,0-0.1,0-0.1L5.1,14l0.2-2c0,0,0-0.1,0-0.1s0.1,0,0.1,0 C5.5,11.9,5.5,11.9,5.6,12L5.6,12z M6.4,10.7L6.6,14l-0.2,2.1c0,0,0,0.1,0,0.1c0,0-0.1,0-0.1,0c-0.1,0-0.1-0.1-0.2-0.2L5.9,14 l0.2-3.3c0-0.1,0.1-0.2,0.2-0.2c0,0,0.1,0,0.1,0C6.4,10.7,6.4,10.7,6.4,10.7z M7.2,10l0.2,4.1l-0.2,2.1c0,0,0,0.1,0,0.1 c0,0-0.1,0-0.1,0c-0.1,0-0.2-0.1-0.2-0.2l-0.1-2.1L6.8,10c0-0.1,0.1-0.2,0.2-0.2c0,0,0.1,0,0.1,0S7.2,9.9,7.2,10z M8,9.6L8.2,14 L8,16.1c0,0.1-0.1,0.2-0.2,0.2c-0.1,0-0.2-0.1-0.2-0.2L7.5,14l0.1-4.4c0-0.1,0-0.1,0.1-0.1c0,0,0.1-0.1,0.1-0.1c0.1,0,0.1,0,0.1,0.1 C8,9.6,8,9.6,8,9.6z M11.4,16.1L11.4,16.1L11.4,16.1z M9.7,9.6L9.8,14l-0.1,2.1c0,0.1,0,0.1-0.1,0.2s-0.1,0.1-0.2,0.1 c-0.1,0-0.1,0-0.1-0.1s-0.1-0.1-0.1-0.2L9.2,14l0.1-4.4c0-0.1,0-0.1,0.1-0.2s0.1-0.1,0.2-0.1c0.1,0,0.1,0,0.2,0.1S9.7,9.5,9.7,9.6 L9.7,9.6z M10.6,9.8l0.1,4.3l-0.1,2c0,0.1,0,0.1-0.1,0.2c0,0-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.2-0.1c0,0-0.1-0.1-0.1-0.2L10,14 l0.1-4.3c0-0.1,0-0.1,0.1-0.2c0,0,0.1-0.1,0.2-0.1c0.1,0,0.1,0,0.2,0.1S10.6,9.7,10.6,9.8z M12.4,14l-0.1,2c0,0.1,0,0.1-0.1,0.2 c-0.1,0.1-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.2-0.1c-0.1-0.1-0.1-0.1-0.1-0.2l-0.1-1l-0.1-1l0.1-5.5v0c0-0.1,0-0.2,0.1-0.2 c0.1,0,0.1-0.1,0.2-0.1c0,0,0.1,0,0.1,0c0.1,0,0.1,0.1,0.1,0.2L12.4,14z M22.1,13.9c0,0.7-0.2,1.3-0.7,1.7c-0.5,0.5-1.1,0.7-1.7,0.7 h-6.8c-0.1,0-0.1,0-0.2-0.1c-0.1-0.1-0.1-0.1-0.1-0.2V8.2c0-0.1,0.1-0.2,0.2-0.3c0.5-0.2,1-0.3,1.6-0.3c1.1,0,2.1,0.4,2.9,1.1 c0.8,0.8,1.3,1.7,1.4,2.8c0.3-0.1,0.6-0.2,1-0.2c0.7,0,1.3,0.2,1.7,0.7C21.8,12.6,22.1,13.2,22.1,13.9L22.1,13.9z"}))},{name:"spotify",attributes:{service:"spotify"},title:"Spotify",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12,2C6.477,2,2,6.477,2,12c0,5.523,4.477,10,10,10c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2 M16.586,16.424 c-0.18,0.295-0.563,0.387-0.857,0.207c-2.348-1.435-5.304-1.76-8.785-0.964c-0.335,0.077-0.67-0.133-0.746-0.469 c-0.077-0.335,0.132-0.67,0.469-0.746c3.809-0.871,7.077-0.496,9.713,1.115C16.673,15.746,16.766,16.13,16.586,16.424 M17.81,13.7 c-0.226,0.367-0.706,0.482-1.072,0.257c-2.687-1.652-6.785-2.131-9.965-1.166C6.36,12.917,5.925,12.684,5.8,12.273 C5.675,11.86,5.908,11.425,6.32,11.3c3.632-1.102,8.147-0.568,11.234,1.328C17.92,12.854,18.035,13.335,17.81,13.7 M17.915,10.865 c-3.223-1.914-8.54-2.09-11.618-1.156C5.804,9.859,5.281,9.58,5.131,9.086C4.982,8.591,5.26,8.069,5.755,7.919 c3.532-1.072,9.404-0.865,13.115,1.338c0.445,0.264,0.59,0.838,0.327,1.282C18.933,10.983,18.359,11.129,17.915,10.865"}))},{name:"telegram",attributes:{service:"telegram"},title:"Telegram",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 128 128",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M28.9700376,63.3244248 C47.6273373,55.1957357 60.0684594,49.8368063 66.2934036,47.2476366 C84.0668845,39.855031 87.7600616,38.5708563 90.1672227,38.528 C90.6966555,38.5191258 91.8804274,38.6503351 92.6472251,39.2725385 C93.294694,39.7979149 93.4728387,40.5076237 93.5580865,41.0057381 C93.6433345,41.5038525 93.7494885,42.63857 93.6651041,43.5252052 C92.7019529,53.6451182 88.5344133,78.2034783 86.4142057,89.5379542 C85.5170662,94.3339958 83.750571,95.9420841 82.0403991,96.0994568 C78.3237996,96.4414641 75.5015827,93.6432685 71.9018743,91.2836143 C66.2690414,87.5912212 63.0868492,85.2926952 57.6192095,81.6896017 C51.3004058,77.5256038 55.3966232,75.2369981 58.9976911,71.4967761 C59.9401076,70.5179421 76.3155302,55.6232293 76.6324771,54.2720454 C76.6721165,54.1030573 76.7089039,53.4731496 76.3346867,53.1405352 C75.9604695,52.8079208 75.4081573,52.921662 75.0095933,53.0121213 C74.444641,53.1403447 65.4461175,59.0880351 48.0140228,70.8551922 C45.4598218,72.6091037 43.1463059,73.4636682 41.0734751,73.4188859 C38.7883453,73.3695169 34.3926725,72.1268388 31.1249416,71.0646282 C27.1169366,69.7617838 23.931454,69.0729605 24.208838,66.8603276 C24.3533167,65.7078514 25.9403832,64.5292172 28.9700376,63.3244248 Z"}))},{name:"threads",attributes:{service:"threads"},title:"Threads",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M16.3 11.3c-.1 0-.2-.1-.2-.1-.1-2.6-1.5-4-3.9-4-1.4 0-2.6.6-3.3 1.7l1.3.9c.5-.8 1.4-1 2-1 .8 0 1.4.2 1.7.7.3.3.5.8.5 1.3-.7-.1-1.4-.2-2.2-.1-2.2.1-3.7 1.4-3.6 3.2 0 .9.5 1.7 1.3 2.2.7.4 1.5.6 2.4.6 1.2-.1 2.1-.5 2.7-1.3.5-.6.8-1.4.9-2.4.6.3 1 .8 1.2 1.3.4.9.4 2.4-.8 3.6-1.1 1.1-2.3 1.5-4.3 1.5-2.1 0-3.8-.7-4.8-2S5.7 14.3 5.7 12c0-2.3.5-4.1 1.5-5.4 1.1-1.3 2.7-2 4.8-2 2.2 0 3.8.7 4.9 2 .5.7.9 1.5 1.2 2.5l1.5-.4c-.3-1.2-.8-2.2-1.5-3.1-1.3-1.7-3.3-2.6-6-2.6-2.6 0-4.7.9-6 2.6C4.9 7.2 4.3 9.3 4.3 12s.6 4.8 1.9 6.4c1.4 1.7 3.4 2.6 6 2.6 2.3 0 4-.6 5.3-2 1.8-1.8 1.7-4 1.1-5.4-.4-.9-1.2-1.7-2.3-2.3zm-4 3.8c-1 .1-2-.4-2-1.3 0-.7.5-1.5 2.1-1.6h.5c.6 0 1.1.1 1.6.2-.2 2.3-1.3 2.7-2.2 2.7z"}))},{name:"tiktok",attributes:{service:"tiktok"},title:"TikTok",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 32 32",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M16.708 0.027c1.745-0.027 3.48-0.011 5.213-0.027 0.105 2.041 0.839 4.12 2.333 5.563 1.491 1.479 3.6 2.156 5.652 2.385v5.369c-1.923-0.063-3.855-0.463-5.6-1.291-0.76-0.344-1.468-0.787-2.161-1.24-0.009 3.896 0.016 7.787-0.025 11.667-0.104 1.864-0.719 3.719-1.803 5.255-1.744 2.557-4.771 4.224-7.88 4.276-1.907 0.109-3.812-0.411-5.437-1.369-2.693-1.588-4.588-4.495-4.864-7.615-0.032-0.667-0.043-1.333-0.016-1.984 0.24-2.537 1.495-4.964 3.443-6.615 2.208-1.923 5.301-2.839 8.197-2.297 0.027 1.975-0.052 3.948-0.052 5.923-1.323-0.428-2.869-0.308-4.025 0.495-0.844 0.547-1.485 1.385-1.819 2.333-0.276 0.676-0.197 1.427-0.181 2.145 0.317 2.188 2.421 4.027 4.667 3.828 1.489-0.016 2.916-0.88 3.692-2.145 0.251-0.443 0.532-0.896 0.547-1.417 0.131-2.385 0.079-4.76 0.095-7.145 0.011-5.375-0.016-10.735 0.025-16.093z"}))},{name:"tumblr",attributes:{service:"tumblr"},title:"Tumblr",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M17.04 21.28h-3.28c-2.84 0-4.94-1.37-4.94-5.02v-5.67H6.08V7.5c2.93-.73 4.11-3.3 4.3-5.48h3.01v4.93h3.47v3.65H13.4v4.93c0 1.47.73 2.01 1.92 2.01h1.73v3.75z"}))},{name:"twitch",attributes:{service:"twitch"},title:"Twitch",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M16.499,8.089h-1.636v4.91h1.636V8.089z M12,8.089h-1.637v4.91H12V8.089z M4.228,3.178L3,6.451v13.092h4.499V22h2.456 l2.454-2.456h3.681L21,14.636V3.178H4.228z M19.364,13.816l-2.864,2.865H12l-2.453,2.453V16.68H5.863V4.814h13.501V13.816z"}))},{name:"twitter",attributes:{service:"twitter"},title:"Twitter",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M22.23,5.924c-0.736,0.326-1.527,0.547-2.357,0.646c0.847-0.508,1.498-1.312,1.804-2.27 c-0.793,0.47-1.671,0.812-2.606,0.996C18.324,4.498,17.257,4,16.077,4c-2.266,0-4.103,1.837-4.103,4.103 c0,0.322,0.036,0.635,0.106,0.935C8.67,8.867,5.647,7.234,3.623,4.751C3.27,5.357,3.067,6.062,3.067,6.814 c0,1.424,0.724,2.679,1.825,3.415c-0.673-0.021-1.305-0.206-1.859-0.513c0,0.017,0,0.034,0,0.052c0,1.988,1.414,3.647,3.292,4.023 c-0.344,0.094-0.707,0.144-1.081,0.144c-0.264,0-0.521-0.026-0.772-0.074c0.522,1.63,2.038,2.816,3.833,2.85 c-1.404,1.1-3.174,1.756-5.096,1.756c-0.331,0-0.658-0.019-0.979-0.057c1.816,1.164,3.973,1.843,6.29,1.843 c7.547,0,11.675-6.252,11.675-11.675c0-0.178-0.004-0.355-0.012-0.531C20.985,7.47,21.68,6.747,22.23,5.924z"}))},{name:"vimeo",attributes:{service:"vimeo"},title:"Vimeo",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M22.396,7.164c-0.093,2.026-1.507,4.799-4.245,8.32C15.322,19.161,12.928,21,10.97,21c-1.214,0-2.24-1.119-3.079-3.359 c-0.56-2.053-1.119-4.106-1.68-6.159C5.588,9.243,4.921,8.122,4.206,8.122c-0.156,0-0.701,0.328-1.634,0.98L1.594,7.841 c1.027-0.902,2.04-1.805,3.037-2.708C6.001,3.95,7.03,3.327,7.715,3.264c1.619-0.156,2.616,0.951,2.99,3.321 c0.404,2.557,0.685,4.147,0.841,4.769c0.467,2.121,0.981,3.181,1.542,3.181c0.435,0,1.09-0.688,1.963-2.065 c0.871-1.376,1.338-2.422,1.401-3.142c0.125-1.187-0.343-1.782-1.401-1.782c-0.498,0-1.012,0.115-1.541,0.341 c1.023-3.35,2.977-4.977,5.862-4.884C21.511,3.066,22.52,4.453,22.396,7.164z"}))},{name:"vk",attributes:{service:"vk"},title:"VK",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z"}))},{name:"whatsapp",attributes:{service:"whatsapp"},title:"WhatsApp",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M 12.011719 2 C 6.5057187 2 2.0234844 6.478375 2.0214844 11.984375 C 2.0204844 13.744375 2.4814687 15.462563 3.3554688 16.976562 L 2 22 L 7.2324219 20.763672 C 8.6914219 21.559672 10.333859 21.977516 12.005859 21.978516 L 12.009766 21.978516 C 17.514766 21.978516 21.995047 17.499141 21.998047 11.994141 C 22.000047 9.3251406 20.962172 6.8157344 19.076172 4.9277344 C 17.190172 3.0407344 14.683719 2.001 12.011719 2 z M 12.009766 4 C 14.145766 4.001 16.153109 4.8337969 17.662109 6.3417969 C 19.171109 7.8517969 20.000047 9.8581875 19.998047 11.992188 C 19.996047 16.396187 16.413812 19.978516 12.007812 19.978516 C 10.674812 19.977516 9.3544062 19.642812 8.1914062 19.007812 L 7.5175781 18.640625 L 6.7734375 18.816406 L 4.8046875 19.28125 L 5.2851562 17.496094 L 5.5019531 16.695312 L 5.0878906 15.976562 C 4.3898906 14.768562 4.0204844 13.387375 4.0214844 11.984375 C 4.0234844 7.582375 7.6067656 4 12.009766 4 z M 8.4765625 7.375 C 8.3095625 7.375 8.0395469 7.4375 7.8105469 7.6875 C 7.5815469 7.9365 6.9355469 8.5395781 6.9355469 9.7675781 C 6.9355469 10.995578 7.8300781 12.182609 7.9550781 12.349609 C 8.0790781 12.515609 9.68175 15.115234 12.21875 16.115234 C 14.32675 16.946234 14.754891 16.782234 15.212891 16.740234 C 15.670891 16.699234 16.690438 16.137687 16.898438 15.554688 C 17.106437 14.971687 17.106922 14.470187 17.044922 14.367188 C 16.982922 14.263188 16.816406 14.201172 16.566406 14.076172 C 16.317406 13.951172 15.090328 13.348625 14.861328 13.265625 C 14.632328 13.182625 14.464828 13.140625 14.298828 13.390625 C 14.132828 13.640625 13.655766 14.201187 13.509766 14.367188 C 13.363766 14.534188 13.21875 14.556641 12.96875 14.431641 C 12.71875 14.305641 11.914938 14.041406 10.960938 13.191406 C 10.218937 12.530406 9.7182656 11.714844 9.5722656 11.464844 C 9.4272656 11.215844 9.5585938 11.079078 9.6835938 10.955078 C 9.7955938 10.843078 9.9316406 10.663578 10.056641 10.517578 C 10.180641 10.371578 10.223641 10.267562 10.306641 10.101562 C 10.389641 9.9355625 10.347156 9.7890625 10.285156 9.6640625 C 10.223156 9.5390625 9.737625 8.3065 9.515625 7.8125 C 9.328625 7.3975 9.131125 7.3878594 8.953125 7.3808594 C 8.808125 7.3748594 8.6425625 7.375 8.4765625 7.375 z"}))},{name:"x",attributes:{service:"x"},keywords:["twitter"],title:"X",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z"}))},{name:"yelp",attributes:{service:"yelp"},title:"Yelp",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M12.271,16.718v1.417q-.011,3.257-.067,3.4a.707.707,0,0,1-.569.446,4.637,4.637,0,0,1-2.024-.424A4.609,4.609,0,0,1,7.8,20.565a.844.844,0,0,1-.19-.4.692.692,0,0,1,.044-.29,3.181,3.181,0,0,1,.379-.524q.335-.412,2.019-2.409.011,0,.669-.781a.757.757,0,0,1,.44-.274.965.965,0,0,1,.552.039.945.945,0,0,1,.418.324.732.732,0,0,1,.139.468Zm-1.662-2.8a.783.783,0,0,1-.58.781l-1.339.435q-3.067.981-3.257.981a.711.711,0,0,1-.6-.4,2.636,2.636,0,0,1-.19-.836,9.134,9.134,0,0,1,.011-1.857,3.559,3.559,0,0,1,.335-1.389.659.659,0,0,1,.625-.357,22.629,22.629,0,0,1,2.253.859q.781.324,1.283.524l.937.379a.771.771,0,0,1,.4.34A.982.982,0,0,1,10.609,13.917Zm9.213,3.313a4.467,4.467,0,0,1-1.021,1.8,4.559,4.559,0,0,1-1.512,1.417.671.671,0,0,1-.7-.078q-.156-.112-2.052-3.2l-.524-.859a.761.761,0,0,1-.128-.513.957.957,0,0,1,.217-.513.774.774,0,0,1,.926-.29q.011.011,1.327.446,2.264.736,2.7.887a2.082,2.082,0,0,1,.524.229.673.673,0,0,1,.245.68Zm-7.5-7.049q.056,1.137-.6,1.361-.647.19-1.272-.792L6.237,4.08a.7.7,0,0,1,.212-.691,5.788,5.788,0,0,1,2.314-1,5.928,5.928,0,0,1,2.5-.352.681.681,0,0,1,.547.5q.034.2.245,3.407T12.327,10.181Zm7.384,1.2a.679.679,0,0,1-.29.658q-.167.112-3.67.959-.747.167-1.015.257l.011-.022a.769.769,0,0,1-.513-.044.914.914,0,0,1-.413-.357.786.786,0,0,1,0-.971q.011-.011.836-1.137,1.394-1.908,1.673-2.275a2.423,2.423,0,0,1,.379-.435A.7.7,0,0,1,17.435,8a4.482,4.482,0,0,1,1.372,1.489,4.81,4.81,0,0,1,.9,1.868v.034Z"}))},{name:"youtube",attributes:{service:"youtube"},title:"YouTube",icon:()=>(0,Ke.createElement)(Ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,Ke.createElement)(Ye.Path,{d:"M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"}))}];Qw.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.service===t.service)}));const Kw=Qw,Yw=({url:e,setAttributes:t,setPopover:n,popoverAnchor:a,clientId:o})=>{const{removeBlock:r}=(0,gt.useDispatch)(nt.store);return(0,Ke.createElement)(nt.URLPopover,{anchor:a,onClose:()=>n(!1)},(0,Ke.createElement)("form",{className:"block-editor-url-popover__link-editor",onSubmit:e=>{e.preventDefault(),n(!1)}},(0,Ke.createElement)("div",{className:"block-editor-url-input"},(0,Ke.createElement)(nt.URLInput,{__nextHasNoMarginBottom:!0,value:e,onChange:e=>t({url:e}),placeholder:(0,tt.__)("Enter address"),disableSuggestions:!0,onKeyDown:t=>{e||t.defaultPrevented||![fn.BACKSPACE,fn.DELETE].includes(t.keyCode)||r(o)}})),(0,Ke.createElement)(et.Button,{icon:Ww,label:(0,tt.__)("Apply"),type:"submit"})))},Jw=({attributes:e,context:t,isSelected:n,setAttributes:a,clientId:o})=>{const{url:r,service:l,label:i,rel:s}=e,{showLabels:c,iconColor:m,iconColorValue:u,iconBackgroundColor:p,iconBackgroundColorValue:d}=t,[g,h]=(0,_t.useState)(!1),b=ut()("wp-social-link","wp-social-link-"+l,{"wp-social-link__is-incomplete":!r,[`has-${m}-color`]:m,[`has-${p}-background-color`]:p}),[_,y]=(0,_t.useState)(null),v=(e=>{const t=Kw.find((t=>t.name===e));return t?t.icon:Zw})(l),f=(e=>{const t=Kw.find((t=>t.name===e));return t?t.title:(0,tt.__)("Social Icon")})(l),k=null!=i?i:f,x=(0,nt.useBlockProps)({className:b,style:{color:u,backgroundColor:d}});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.sprintf)((0,tt.__)("%s label"),f),initialOpen:!1},(0,Ke.createElement)(et.PanelRow,null,(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link label"),help:(0,tt.__)("Briefly describe the link to help screen reader users."),value:i||"",onChange:e=>a({label:e})})))),(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Link rel"),value:s||"",onChange:e=>a({rel:e})})),(0,Ke.createElement)("li",{...x},(0,Ke.createElement)(et.Button,{className:"wp-block-social-link-anchor",ref:y,onClick:()=>h(!0)},(0,Ke.createElement)(v,null),(0,Ke.createElement)("span",{className:ut()("wp-block-social-link-label",{"screen-reader-text":!c})},k),n&&g&&(0,Ke.createElement)(Yw,{url:r,setAttributes:a,setPopover:h,popoverAnchor:_,clientId:o}))))},Xw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/social-link",title:"Social Icon",category:"widgets",parent:["core/social-links"],description:"Display an icon linking to a social media profile or site.",textdomain:"default",attributes:{url:{type:"string"},service:{type:"string"},label:{type:"string"},rel:{type:"string"}},usesContext:["openInNewTab","showLabels","iconColor","iconColorValue","iconBackgroundColor","iconBackgroundColorValue"],supports:{reusable:!1,html:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-social-link-editor"},{name:eE}=Xw,tE={icon:jw,edit:Jw,variations:Kw},nE=()=>Xe({name:eE,metadata:Xw,settings:tE}),aE=[{attributes:{iconColor:{type:"string"},customIconColor:{type:"string"},iconColorValue:{type:"string"},iconBackgroundColor:{type:"string"},customIconBackgroundColor:{type:"string"},iconBackgroundColorValue:{type:"string"},openInNewTab:{type:"boolean",default:!1},size:{type:"string"}},providesContext:{openInNewTab:"openInNewTab"},supports:{align:["left","center","right"],anchor:!0},migrate:e=>{if(e.layout)return e;const{className:t}=e,n="items-justified-",a=new RegExp(`\\b${n}[^ ]*[ ]?\\b`,"g"),o={...e,className:t?.replace(a,"").trim()},r=t?.match(a)?.[0]?.trim();return r&&Object.assign(o,{layout:{type:"flex",justifyContent:r.slice(16)}}),o},save:e=>{const{attributes:{iconBackgroundColorValue:t,iconColorValue:n,itemsJustification:a,size:o}}=e,r=ut()(o,{"has-icon-color":n,"has-icon-background-color":t,[`items-justified-${a}`]:a}),l={"--wp--social-links--icon-color":n,"--wp--social-links--icon-background-color":t};return(0,Ke.createElement)("ul",{...nt.useBlockProps.save({className:r,style:l})},(0,Ke.createElement)(nt.InnerBlocks.Content,null))}}],oE=aE,rE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),lE=[{name:(0,tt.__)("Small"),value:"has-small-icon-size"},{name:(0,tt.__)("Normal"),value:"has-normal-icon-size"},{name:(0,tt.__)("Large"),value:"has-large-icon-size"},{name:(0,tt.__)("Huge"),value:"has-huge-icon-size"}];const iE=(0,nt.withColors)({iconColor:"icon-color",iconBackgroundColor:"icon-background-color"})((function(e){var t;const{clientId:n,attributes:a,iconBackgroundColor:o,iconColor:r,isSelected:l,setAttributes:i,setIconBackgroundColor:s,setIconColor:c}=e,{iconBackgroundColorValue:m,customIconBackgroundColor:u,iconColorValue:p,openInNewTab:d,showLabels:g,size:h}=a,b=a.className?.includes("is-style-logos-only"),_=(0,_t.useRef)({});(0,_t.useEffect)((()=>{b?(_.current={iconBackgroundColor:o,iconBackgroundColorValue:m,customIconBackgroundColor:u},i({iconBackgroundColor:void 0,customIconBackgroundColor:void 0,iconBackgroundColorValue:void 0})):i({..._.current})}),[b]);const y=(0,Ke.createElement)("li",{className:"wp-block-social-links__social-placeholder"},(0,Ke.createElement)("div",{className:"wp-block-social-links__social-placeholder-icons"},(0,Ke.createElement)("div",{className:"wp-social-link wp-social-link-twitter"}),(0,Ke.createElement)("div",{className:"wp-social-link wp-social-link-facebook"}),(0,Ke.createElement)("div",{className:"wp-social-link wp-social-link-instagram"}))),v=(0,Ke.createElement)("li",{className:"wp-block-social-links__social-prompt"},(0,tt.__)("Click plus to add")),f=ut()(h,{"has-visible-labels":g,"has-icon-color":r.color||p,"has-icon-background-color":o.color||m}),k=(0,nt.useBlockProps)({className:f}),x=(0,nt.useInnerBlocksProps)(k,{placeholder:l?v:y,templateLock:!1,orientation:null!==(t=a.layout?.orientation)&&void 0!==t?t:"horizontal",__experimentalAppenderTagName:"li"}),w=[{value:r.color||p,onChange:e=>{c(e),i({iconColorValue:e})},label:(0,tt.__)("Icon color"),resetAllFilter:()=>{c(void 0),i({iconColorValue:void 0})}}];b||w.push({value:o.color||m,onChange:e=>{s(e),i({iconBackgroundColorValue:e})},label:(0,tt.__)("Icon background"),resetAllFilter:()=>{s(void 0),i({iconBackgroundColorValue:void 0})}});const E=(0,nt.__experimentalUseMultipleOriginColorsAndGradients)();return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(et.ToolbarDropdownMenu,{label:(0,tt.__)("Size"),text:(0,tt.__)("Size"),icon:null,popoverProps:{position:"bottom right"}},(({onClose:e})=>(0,Ke.createElement)(et.MenuGroup,null,lE.map((t=>(0,Ke.createElement)(et.MenuItem,{icon:(h===t.value||!h&&"has-normal-icon-size"===t.value)&&rE,isSelected:h===t.value,key:t.value,onClick:()=>{i({size:t.value})},onClose:e,role:"menuitemradio"},t.name))))))),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Open links in new tab"),checked:d,onChange:()=>i({openInNewTab:!d})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show labels"),checked:g,onChange:()=>i({showLabels:!g})}))),E.hasColorsOrGradients&&(0,Ke.createElement)(nt.InspectorControls,{group:"color"},w.map((({onChange:e,label:t,value:a,resetAllFilter:o})=>(0,Ke.createElement)(nt.__experimentalColorGradientSettingsDropdown,{key:`social-links-color-${t}`,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:a,label:t,onColorChange:e,isShownByDefault:!0,resetAllFilter:o,enableAlpha:!0}],panelId:n,...E}))),!b&&(0,Ke.createElement)(nt.ContrastChecker,{textColor:p,backgroundColor:m,isLargeText:!1})),(0,Ke.createElement)("ul",{...x}))}));const sE={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/social-links",title:"Social Icons",category:"widgets",allowedBlocks:["core/social-link"],description:"Display icons linking to your social media profiles or sites.",keywords:["links"],textdomain:"default",attributes:{iconColor:{type:"string"},customIconColor:{type:"string"},iconColorValue:{type:"string"},iconBackgroundColor:{type:"string"},customIconBackgroundColor:{type:"string"},iconBackgroundColorValue:{type:"string"},openInNewTab:{type:"boolean",default:!1},showLabels:{type:"boolean",default:!1},size:{type:"string"}},providesContext:{openInNewTab:"openInNewTab",showLabels:"showLabels",iconColor:"iconColor",iconColorValue:"iconColorValue",iconBackgroundColor:"iconBackgroundColor",iconBackgroundColorValue:"iconBackgroundColorValue"},supports:{align:["left","center","right"],anchor:!0,__experimentalExposeControlsToChildren:!0,layout:{allowSwitching:!1,allowInheriting:!1,allowVerticalAlignment:!1,default:{type:"flex"}},color:{enableContrastChecker:!1,background:!0,gradients:!0,text:!1,__experimentalDefaultControls:{background:!1}},spacing:{blockGap:["horizontal","vertical"],margin:!0,padding:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0,margin:!0,padding:!1}},interactivity:{clientNavigation:!0}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"logos-only",label:"Logos Only"},{name:"pill-shape",label:"Pill Shape"}],editorStyle:"wp-block-social-links-editor",style:"wp-block-social-links"},{name:cE}=sE,mE={example:{innerBlocks:[{name:"core/social-link",attributes:{service:"wordpress",url:"https://wordpress.org"}},{name:"core/social-link",attributes:{service:"facebook",url:"https://www.facebook.com/WordPress/"}},{name:"core/social-link",attributes:{service:"twitter",url:"https://twitter.com/WordPress"}}]},icon:jw,edit:iE,save:function(e){const{attributes:{iconBackgroundColorValue:t,iconColorValue:n,showLabels:a,size:o}}=e,r=ut()(o,{"has-visible-labels":a,"has-icon-color":n,"has-icon-background-color":t}),l=nt.useBlockProps.save({className:r}),i=nt.useInnerBlocksProps.save(l);return(0,Ke.createElement)("ul",{...i})},deprecated:oE},uE=()=>Xe({name:cE,metadata:sE,settings:mE}),pE=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M7 18h4.5v1.5h-7v-7H6V17L17 6h-4.5V4.5h7v7H18V7L7 18Z"})),dE=[{attributes:{height:{type:"number",default:100},width:{type:"number"}},migrate(e){const{height:t,width:n}=e;return{...e,width:void 0!==n?`${n}px`:void 0,height:void 0!==t?`${t}px`:void 0}},save:({attributes:e})=>(0,Ke.createElement)("div",{...nt.useBlockProps.save({style:{height:e.height,width:e.width},"aria-hidden":!0})})}],gE=dE,hE=0;function bE({label:e,onChange:t,isResizing:n,value:a=""}){const o=(0,jt.useInstanceId)(et.__experimentalUnitControl,"block-spacer-height-input"),[r,l]=(0,nt.useSettings)("spacing.spacingSizes","spacing.units"),i=l?l.filter((e=>"%"!==e)):["px","em","rem","vw","vh"],s=(0,et.__experimentalUseCustomUnits)({availableUnits:i,defaultValues:{px:100,em:10,rem:10,vw:10,vh:25}}),c=e=>{t(e.all)},[m,u]=(0,et.__experimentalParseQuantityAndUnitFromRawValue)(a),p=(0,nt.isValueSpacingPreset)(a)?a:[m,n?"px":u].join("");return(0,Ke.createElement)(Ke.Fragment,null,(!r||0===r?.length)&&(0,Ke.createElement)(et.BaseControl,{label:e,id:o},(0,Ke.createElement)(et.__experimentalUnitControl,{id:o,isResetValueOnUnitChange:!0,min:hE,onChange:c,style:{maxWidth:80},value:p,units:s})),r?.length>0&&(0,Ke.createElement)(Ye.View,{className:"tools-panel-item-spacing"},(0,Ke.createElement)(nt.__experimentalSpacingSizesControl,{values:{all:p},onChange:c,label:e,sides:["all"],units:s,allowReset:!1,splitOnAxis:!1,showSideInLabel:!1})))}function _E({setAttributes:e,orientation:t,height:n,width:a,isResizing:o}){return(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},"horizontal"===t&&(0,Ke.createElement)(bE,{label:(0,tt.__)("Width"),value:a,onChange:t=>e({width:t}),isResizing:o}),"horizontal"!==t&&(0,Ke.createElement)(bE,{label:(0,tt.__)("Height"),value:n,onChange:t=>e({height:t}),isResizing:o})))}const yE=({orientation:e,onResizeStart:t,onResize:n,onResizeStop:a,isSelected:o,isResizing:r,setIsResizing:l,...i})=>{const s=t=>"horizontal"===e?t.clientWidth:t.clientHeight,c=e=>`${s(e)}px`;return(0,Ke.createElement)(et.ResizableBox,{className:ut()("block-library-spacer__resize-container",{"resize-horizontal":"horizontal"===e,"is-resizing":r,"is-selected":o}),onResizeStart:(e,a,o)=>{const r=c(o);t(r),n(r)},onResize:(e,t,a)=>{n(c(a)),r||l(!0)},onResizeStop:(e,t,n)=>{const o=s(n);a(`${o}px`),l(!1)},__experimentalShowTooltip:!0,__experimentalTooltipProps:{axis:"horizontal"===e?"x":"y",position:"corner",isVisible:r},showHandle:o,...i})},vE=({attributes:e,isSelected:t,setAttributes:n,toggleSelection:a,context:o,__unstableParentLayout:r,className:l})=>{const i=(0,gt.useSelect)((e=>{const t=e(nt.store).getSettings();return t?.disableCustomSpacingSizes})),{orientation:s}=o,{orientation:c,type:m,default:{type:u}={}}=r||{},p="flex"===m||!m&&"flex"===u,d=!c&&p?"horizontal":c||s,{height:g,width:h,style:b={}}=e,{layout:_={}}=b,{selfStretch:y,flexSize:v}=_,[f]=(0,nt.useSettings)("spacing.spacingSizes"),[k,x]=(0,_t.useState)(!1),[w,E]=(0,_t.useState)(null),[C,S]=(0,_t.useState)(null),B=()=>a(!1),N=()=>a(!0),T=e=>{N(),p&&n({style:{...b,layout:{..._,flexSize:e,selfStretch:"fixed"}}}),n({height:e}),E(null)},I=e=>{N(),p&&n({style:{...b,layout:{..._,flexSize:e,selfStretch:"fixed"}}}),n({width:e}),S(null)},P="horizontal"===d?C||v:w||v,M={height:"horizontal"===d?24:(()=>{if(!p)return w||(0,nt.getSpacingPresetCssVar)(g)||void 0})(),width:"horizontal"===d?(()=>{if(!p)return C||(0,nt.getSpacingPresetCssVar)(h)||void 0})():void 0,minWidth:"vertical"===d&&p?48:void 0,flexBasis:p?P:void 0,flexGrow:p&&k?0:void 0};return(0,_t.useEffect)((()=>{if(p&&"fill"!==y&&"fit"!==y&&!v)if("horizontal"===d){const e=(0,nt.getCustomValueFromPreset)(h,f)||(0,nt.getCustomValueFromPreset)(g,f)||"100px";n({width:"0px",style:{...b,layout:{..._,flexSize:e,selfStretch:"fixed"}}})}else{const e=(0,nt.getCustomValueFromPreset)(g,f)||(0,nt.getCustomValueFromPreset)(h,f)||"100px";n({height:"0px",style:{...b,layout:{..._,flexSize:e,selfStretch:"fixed"}}})}else!p||"fill"!==y&&"fit"!==y?p||!y&&!v||(n("horizontal"===d?{width:v}:{height:v}),n({style:{...b,layout:{..._,flexSize:void 0,selfStretch:void 0}}})):n("horizontal"===d?{width:void 0}:{height:void 0})}),[b,v,g,d,p,_,y,n,f,h]),(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(Ye.View,{...(0,nt.useBlockProps)({style:M,className:ut()(l,{"custom-sizes-disabled":i})})},"horizontal"===(z=d)?(0,Ke.createElement)(yE,{minWidth:hE,enable:{top:!1,right:!0,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},orientation:z,onResizeStart:B,onResize:S,onResizeStop:I,isSelected:t,isResizing:k,setIsResizing:x}):(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(yE,{minHeight:hE,enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},orientation:z,onResizeStart:B,onResize:E,onResizeStop:T,isSelected:t,isResizing:k,setIsResizing:x}))),!p&&(0,Ke.createElement)(_E,{setAttributes:n,height:w||g,width:C||h,orientation:d,isResizing:k}));var z};const fE={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/spacer",title:"Spacer",category:"design",description:"Add white space between blocks and customize its height.",textdomain:"default",attributes:{height:{type:"string",default:"100px"},width:{type:"string"}},usesContext:["orientation"],supports:{anchor:!0,spacing:{margin:["top","bottom"],__experimentalDefaultControls:{margin:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-spacer-editor",style:"wp-block-spacer"},{name:kE}=fE,xE={icon:pE,edit:vE,save:function({attributes:e}){const{height:t,width:n,style:a}=e,{layout:{selfStretch:o}={}}=a||{},r="fill"===o||"fit"===o?void 0:t;return(0,Ke.createElement)("div",{...nt.useBlockProps.save({style:{height:(0,nt.getSpacingPresetCssVar)(r),width:(0,nt.getSpacingPresetCssVar)(n)},"aria-hidden":!0})})},deprecated:gE},wE=()=>Xe({name:kE,metadata:fE,settings:xE}),EE=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.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-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})),CE={"subtle-light-gray":"#f3f4f5","subtle-pale-green":"#e9fbe5","subtle-pale-blue":"#e7f5fe","subtle-pale-pink":"#fcf0ef"},SE={attributes:{hasFixedLayout:{type:"boolean",default:!1},caption:{type:"string",source:"html",selector:"figcaption",default:""},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}}},supports:{anchor:!0,align:!0,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{__experimentalSkipSerialization:!0,color:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}},__experimentalSelector:".wp-block-table > table"},save({attributes:e}){const{hasFixedLayout:t,head:n,body:a,foot:o,caption:r}=e;if(!n.length&&!a.length&&!o.length)return null;const l=(0,nt.__experimentalGetColorClassesAndStyles)(e),i=(0,nt.__experimentalGetBorderClassesAndStyles)(e),s=ut()(l.className,i.className,{"has-fixed-layout":t}),c=!nt.RichText.isEmpty(r),m=({type:e,rows:t})=>{if(!t.length)return null;const n=`t${e}`;return(0,Ke.createElement)(n,null,t.map((({cells:e},t)=>(0,Ke.createElement)("tr",{key:t},e.map((({content:e,tag:t,scope:n,align:a},o)=>{const r=ut()({[`has-text-align-${a}`]:a});return(0,Ke.createElement)(nt.RichText.Content,{className:r||void 0,"data-align":a,tagName:t,value:e,key:o,scope:"th"===t?n:void 0})}))))))};return(0,Ke.createElement)("figure",{...nt.useBlockProps.save()},(0,Ke.createElement)("table",{className:""===s?void 0:s,style:{...l.style,...i.style}},(0,Ke.createElement)(m,{type:"head",rows:n}),(0,Ke.createElement)(m,{type:"body",rows:a}),(0,Ke.createElement)(m,{type:"foot",rows:o})),c&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:r}))}},BE={attributes:{hasFixedLayout:{type:"boolean",default:!1},backgroundColor:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption",default:""},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}}},supports:{anchor:!0,align:!0,__experimentalSelector:".wp-block-table > table"},save:({attributes:e})=>{const{hasFixedLayout:t,head:n,body:a,foot:o,backgroundColor:r,caption:l}=e;if(!n.length&&!a.length&&!o.length)return null;const i=(0,nt.getColorClassName)("background-color",r),s=ut()(i,{"has-fixed-layout":t,"has-background":!!i}),c=!nt.RichText.isEmpty(l),m=({type:e,rows:t})=>{if(!t.length)return null;const n=`t${e}`;return(0,Ke.createElement)(n,null,t.map((({cells:e},t)=>(0,Ke.createElement)("tr",{key:t},e.map((({content:e,tag:t,scope:n,align:a},o)=>{const r=ut()({[`has-text-align-${a}`]:a});return(0,Ke.createElement)(nt.RichText.Content,{className:r||void 0,"data-align":a,tagName:t,value:e,key:o,scope:"th"===t?n:void 0})}))))))};return(0,Ke.createElement)("figure",{...nt.useBlockProps.save()},(0,Ke.createElement)("table",{className:""===s?void 0:s},(0,Ke.createElement)(m,{type:"head",rows:n}),(0,Ke.createElement)(m,{type:"body",rows:a}),(0,Ke.createElement)(m,{type:"foot",rows:o})),c&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:l}))},isEligible:e=>e.backgroundColor&&e.backgroundColor in CE&&!e.style,migrate:e=>({...e,backgroundColor:void 0,style:{color:{background:CE[e.backgroundColor]}}})},NE={attributes:{hasFixedLayout:{type:"boolean",default:!1},backgroundColor:{type:"string"},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"}}}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"}}}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"}}}}}},supports:{align:!0},save({attributes:e}){const{hasFixedLayout:t,head:n,body:a,foot:o,backgroundColor:r}=e;if(!n.length&&!a.length&&!o.length)return null;const l=(0,nt.getColorClassName)("background-color",r),i=ut()(l,{"has-fixed-layout":t,"has-background":!!l}),s=({type:e,rows:t})=>{if(!t.length)return null;const n=`t${e}`;return(0,Ke.createElement)(n,null,t.map((({cells:e},t)=>(0,Ke.createElement)("tr",{key:t},e.map((({content:e,tag:t,scope:n},a)=>(0,Ke.createElement)(nt.RichText.Content,{tagName:t,value:e,key:a,scope:"th"===t?n:void 0})))))))};return(0,Ke.createElement)("table",{className:i},(0,Ke.createElement)(s,{type:"head",rows:n}),(0,Ke.createElement)(s,{type:"body",rows:a}),(0,Ke.createElement)(s,{type:"foot",rows:o}))}},TE=[SE,BE,NE],IE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})),PE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})),ME=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})),zE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M6.656 6.464h2.88v2.88h1.408v-2.88h2.88V5.12h-2.88V2.24H9.536v2.88h-2.88zM0 17.92V0h20.48v17.92H0zm7.68-2.56h5.12v-3.84H7.68v3.84zm-6.4 0H6.4v-3.84H1.28v3.84zM19.2 1.28H1.28v9.024H19.2V1.28zm0 10.24h-5.12v3.84h5.12v-3.84zM6.656 6.464h2.88v2.88h1.408v-2.88h2.88V5.12h-2.88V2.24H9.536v2.88h-2.88zM0 17.92V0h20.48v17.92H0zm7.68-2.56h5.12v-3.84H7.68v3.84zm-6.4 0H6.4v-3.84H1.28v3.84zM19.2 1.28H1.28v9.024H19.2V1.28zm0 10.24h-5.12v3.84h5.12v-3.84z"})),RE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M13.824 10.176h-2.88v-2.88H9.536v2.88h-2.88v1.344h2.88v2.88h1.408v-2.88h2.88zM0 17.92V0h20.48v17.92H0zM6.4 1.28H1.28v3.84H6.4V1.28zm6.4 0H7.68v3.84h5.12V1.28zm6.4 0h-5.12v3.84h5.12V1.28zm0 5.056H1.28v9.024H19.2V6.336z"})),AE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M17.728 11.456L14.592 8.32l3.2-3.2-1.536-1.536-3.2 3.2L9.92 3.648 8.384 5.12l3.2 3.2-3.264 3.264 1.536 1.536 3.264-3.264 3.136 3.136 1.472-1.536zM0 17.92V0h20.48v17.92H0zm19.2-6.4h-.448l-1.28-1.28H19.2V6.4h-1.792l1.28-1.28h.512V1.28H1.28v3.84h6.208l1.28 1.28H1.28v3.84h7.424l-1.28 1.28H1.28v3.84H19.2v-3.84z"})),HE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M6.4 3.776v3.648H2.752v1.792H6.4v3.648h1.728V9.216h3.712V7.424H8.128V3.776zM0 17.92V0h20.48v17.92H0zM12.8 1.28H1.28v14.08H12.8V1.28zm6.4 0h-5.12v3.84h5.12V1.28zm0 5.12h-5.12v3.84h5.12V6.4zm0 5.12h-5.12v3.84h5.12v-3.84z"})),LE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M14.08 12.864V9.216h3.648V7.424H14.08V3.776h-1.728v3.648H8.64v1.792h3.712v3.648zM0 17.92V0h20.48v17.92H0zM6.4 1.28H1.28v3.84H6.4V1.28zm0 5.12H1.28v3.84H6.4V6.4zm0 5.12H1.28v3.84H6.4v-3.84zM19.2 1.28H7.68v14.08H19.2V1.28z"})),DE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M6.4 9.98L7.68 8.7v-.256L6.4 7.164V9.98zm6.4-1.532l1.28-1.28V9.92L12.8 8.64v-.192zm7.68 9.472V0H0v17.92h20.48zm-1.28-2.56h-5.12v-1.024l-.256.256-1.024-1.024v1.792H7.68v-1.792l-1.024 1.024-.256-.256v1.024H1.28V1.28H6.4v2.368l.704-.704.576.576V1.216h5.12V3.52l.96-.96.32.32V1.216h5.12V15.36zm-5.76-2.112l-3.136-3.136-3.264 3.264-1.536-1.536 3.264-3.264L5.632 5.44l1.536-1.536 3.136 3.136 3.2-3.2 1.536 1.536-3.2 3.2 3.136 3.136-1.536 1.536z"})),FE=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M4 6v11.5h16V6H4zm1.5 1.5h6V11h-6V7.5zm0 8.5v-3.5h6V16h-6zm13 0H13v-3.5h5.5V16zM13 11V7.5h5.5V11H13z"})),VE=["align"];function $E(e,t,n){if(!t)return e;const a=Object.fromEntries(Object.entries(e).filter((([e])=>["head","body","foot"].includes(e)))),{sectionName:o,rowIndex:r}=t;return Object.fromEntries(Object.entries(a).map((([e,a])=>o&&o!==e?[e,a]:[e,a.map(((a,o)=>r&&r!==o?a:{cells:a.cells.map(((a,r)=>function(e,t){if(!e||!t)return!1;switch(t.type){case"column":return"column"===t.type&&e.columnIndex===t.columnIndex;case"cell":return"cell"===t.type&&e.sectionName===t.sectionName&&e.columnIndex===t.columnIndex&&e.rowIndex===t.rowIndex}}({sectionName:e,columnIndex:r,rowIndex:o},t)?n(a):a))}))])))}function OE(e,{sectionName:t,rowIndex:n,columnCount:a}){const o=function(e){return UE(e.head)?UE(e.body)?UE(e.foot)?void 0:e.foot[0]:e.body[0]:e.head[0]}(e),r=void 0===a?o?.cells?.length:a;return r?{[t]:[...e[t].slice(0,n),{cells:Array.from({length:r}).map(((e,n)=>{var a;const r=null!==(a=o?.cells?.[n])&&void 0!==a?a:{};return{...Object.fromEntries(Object.entries(r).filter((([e])=>VE.includes(e)))),content:"",tag:"head"===t?"th":"td"}}))},...e[t].slice(n)]}:e}function GE(e,t){var n;if(!UE(e[t]))return{[t]:[]};return OE(e,{sectionName:t,rowIndex:0,columnCount:null!==(n=e.body?.[0]?.cells?.length)&&void 0!==n?n:1})}function UE(e){return!e||!e.length||e.every(qE)}function qE(e){return!(e.cells&&e.cells.length)}const jE=[{icon:IE,title:(0,tt.__)("Align column left"),align:"left"},{icon:PE,title:(0,tt.__)("Align column center"),align:"center"},{icon:ME,title:(0,tt.__)("Align column right"),align:"right"}],WE={head:(0,tt.__)("Header cell text"),body:(0,tt.__)("Body cell text"),foot:(0,tt.__)("Footer cell text")},ZE={head:(0,tt.__)("Header label"),foot:(0,tt.__)("Footer label")};function QE({name:e,...t}){const n=`t${e}`;return(0,Ke.createElement)(n,{...t})}const KE=function({attributes:e,setAttributes:t,insertBlocksAfter:n,isSelected:a}){const{hasFixedLayout:o,caption:r,head:l,foot:i}=e,[s,c]=(0,_t.useState)(2),[m,u]=(0,_t.useState)(2),[p,d]=(0,_t.useState)(),g=(0,nt.__experimentalUseColorProps)(e),h=(0,nt.__experimentalUseBorderProps)(e),b=(0,_t.useRef)(),[_,y]=(0,_t.useState)(!1);function v(n){p&&t($E(e,p,(e=>({...e,content:n}))))}function f(n){if(!p)return;const{sectionName:a,rowIndex:o}=p,r=o+n;t(OE(e,{sectionName:a,rowIndex:r})),d({sectionName:a,rowIndex:r,columnIndex:0,type:"cell"})}function k(n=0){if(!p)return;const{columnIndex:a}=p,o=a+n;t(function(e,{columnIndex:t}){const n=Object.fromEntries(Object.entries(e).filter((([e])=>["head","body","foot"].includes(e))));return Object.fromEntries(Object.entries(n).map((([e,n])=>UE(n)?[e,n]:[e,n.map((n=>qE(n)||n.cells.length<t?n:{cells:[...n.cells.slice(0,t),{content:"",tag:"head"===e?"th":"td"},...n.cells.slice(t)]}))])))}(e,{columnIndex:o})),d({rowIndex:0,columnIndex:o,type:"cell"})}(0,_t.useEffect)((()=>{a||d()}),[a]),(0,_t.useEffect)((()=>{_&&(b?.current?.querySelector('td div[contentEditable="true"]')?.focus(),y(!1))}),[_]);const x=["head","body","foot"].filter((t=>!UE(e[t]))),w=[{icon:zE,title:(0,tt.__)("Insert row before"),isDisabled:!p,onClick:function(){f(0)}},{icon:RE,title:(0,tt.__)("Insert row after"),isDisabled:!p,onClick:function(){f(1)}},{icon:AE,title:(0,tt.__)("Delete row"),isDisabled:!p,onClick:function(){if(!p)return;const{sectionName:n,rowIndex:a}=p;d(),t(function(e,{sectionName:t,rowIndex:n}){return{[t]:e[t].filter(((e,t)=>t!==n))}}(e,{sectionName:n,rowIndex:a}))}},{icon:HE,title:(0,tt.__)("Insert column before"),isDisabled:!p,onClick:function(){k(0)}},{icon:LE,title:(0,tt.__)("Insert column after"),isDisabled:!p,onClick:function(){k(1)}},{icon:DE,title:(0,tt.__)("Delete column"),isDisabled:!p,onClick:function(){if(!p)return;const{sectionName:n,columnIndex:a}=p;d(),t(function(e,{columnIndex:t}){const n=Object.fromEntries(Object.entries(e).filter((([e])=>["head","body","foot"].includes(e))));return Object.fromEntries(Object.entries(n).map((([e,n])=>UE(n)?[e,n]:[e,n.map((e=>({cells:e.cells.length>=t?e.cells.filter(((e,n)=>n!==t)):e.cells}))).filter((e=>e.cells.length))])))}(e,{sectionName:n,columnIndex:a}))}}],E=x.map((t=>(0,Ke.createElement)(QE,{name:t,key:t},e[t].map((({cells:e},n)=>(0,Ke.createElement)("tr",{key:n},e.map((({content:e,tag:a,scope:o,align:r,colspan:l,rowspan:i},s)=>(0,Ke.createElement)(a,{key:s,scope:"th"===a?o:void 0,colSpan:l,rowSpan:i,className:ut()({[`has-text-align-${r}`]:r},"wp-block-table__cell-content")},(0,Ke.createElement)(nt.RichText,{value:e,onChange:v,onFocus:()=>{d({sectionName:t,rowIndex:n,columnIndex:s,type:"cell"})},"aria-label":WE[t],placeholder:ZE[t]})))))))))),C=!x.length;return(0,Ke.createElement)("figure",{...(0,nt.useBlockProps)({ref:b})},!C&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{label:(0,tt.__)("Change column alignment"),alignmentControls:jE,value:function(){if(p)return function(e,t,n){const{sectionName:a,rowIndex:o,columnIndex:r}=t;return e[a]?.[o]?.cells?.[r]?.[n]}(e,p,"align")}(),onChange:n=>function(n){if(!p)return;const a={type:"column",columnIndex:p.columnIndex},o=$E(e,a,(e=>({...e,align:n})));t(o)}(n)})),(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(et.ToolbarDropdownMenu,{hasArrowIndicator:!0,icon:FE,label:(0,tt.__)("Edit table"),controls:w}))),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings"),className:"blocks-table-settings"},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Fixed width table cells"),checked:!!o,onChange:function(){t({hasFixedLayout:!o})}}),!C&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Header section"),checked:!(!l||!l.length),onChange:function(){t(GE(e,"head"))}}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Footer section"),checked:!(!i||!i.length),onChange:function(){t(GE(e,"foot"))}})))),!C&&(0,Ke.createElement)("table",{className:ut()(g.className,h.className,{"has-fixed-layout":o,"has-individual-borders":(0,et.__experimentalHasSplitBorders)(e?.style?.border)}),style:{...g.style,...h.style}},E),!C&&(0,Ke.createElement)(nt.RichText,{identifier:"caption",tagName:"figcaption",className:(0,nt.__experimentalGetElementClassName)("caption"),"aria-label":(0,tt.__)("Table caption text"),placeholder:(0,tt.__)("Add caption"),value:r,onChange:e=>t({caption:e}),onFocus:()=>d(),__unstableOnSplitAtEnd:()=>n((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))}),C&&(0,Ke.createElement)(et.Placeholder,{label:(0,tt.__)("Table"),icon:(0,Ke.createElement)(nt.BlockIcon,{icon:EE,showColors:!0}),instructions:(0,tt.__)("Insert a table for sharing data.")},(0,Ke.createElement)("form",{className:"blocks-table__placeholder-form",onSubmit:function(e){e.preventDefault(),t(function({rowCount:e,columnCount:t}){return{body:Array.from({length:e}).map((()=>({cells:Array.from({length:t}).map((()=>({content:"",tag:"td"})))})))}}({rowCount:parseInt(s,10)||2,columnCount:parseInt(m,10)||2})),y(!0)}},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,type:"number",label:(0,tt.__)("Column count"),value:m,onChange:function(e){u(e)},min:"1",className:"blocks-table__placeholder-input"}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,type:"number",label:(0,tt.__)("Row count"),value:s,onChange:function(e){c(e)},min:"1",className:"blocks-table__placeholder-input"}),(0,Ke.createElement)(et.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit"},(0,tt.__)("Create Table")))))};function YE(e){const t=parseInt(e,10);if(Number.isInteger(t))return t<0||1===t?void 0:t.toString()}const JE=({phrasingContentSchema:e})=>({tr:{allowEmpty:!0,children:{th:{allowEmpty:!0,children:e,attributes:["scope","colspan","rowspan"]},td:{allowEmpty:!0,children:e,attributes:["colspan","rowspan"]}}}}),XE={from:[{type:"raw",selector:"table",schema:e=>({table:{children:{thead:{allowEmpty:!0,children:JE(e)},tfoot:{allowEmpty:!0,children:JE(e)},tbody:{allowEmpty:!0,children:JE(e)}}}}),transform:e=>{const t=Array.from(e.children).reduce(((e,t)=>{if(!t.children.length)return e;const n=t.nodeName.toLowerCase().slice(1),a=Array.from(t.children).reduce(((e,t)=>{if(!t.children.length)return e;const n=Array.from(t.children).reduce(((e,t)=>{const n=YE(t.getAttribute("rowspan")),a=YE(t.getAttribute("colspan"));return e.push({tag:t.nodeName.toLowerCase(),content:t.innerHTML,rowspan:n,colspan:a}),e}),[]);return e.push({cells:n}),e}),[]);return e[n]=a,e}),{});return(0,Qe.createBlock)("core/table",t)}}]},eC=XE,tC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/table",title:"Table",category:"text",description:"Create structured content in rows and columns to display information.",textdomain:"default",attributes:{hasFixedLayout:{type:"boolean",default:!1},caption:{type:"rich-text",source:"rich-text",selector:"figcaption"},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"rich-text",source:"rich-text"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"},colspan:{type:"string",source:"attribute",attribute:"colspan"},rowspan:{type:"string",source:"attribute",attribute:"rowspan"}}}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"rich-text",source:"rich-text"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"},colspan:{type:"string",source:"attribute",attribute:"colspan"},rowspan:{type:"string",source:"attribute",attribute:"rowspan"}}}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"rich-text",source:"rich-text"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"},colspan:{type:"string",source:"attribute",attribute:"colspan"},rowspan:{type:"string",source:"attribute",attribute:"rowspan"}}}}}},supports:{anchor:!0,align:!0,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{__experimentalSkipSerialization:!0,color:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}},__experimentalSelector:".wp-block-table > table",interactivity:{clientNavigation:!0}},styles:[{name:"regular",label:"Default",isDefault:!0},{name:"stripes",label:"Stripes"}],editorStyle:"wp-block-table-editor",style:"wp-block-table"},{name:nC}=tC,aC={icon:EE,example:{attributes:{head:[{cells:[{content:(0,tt.__)("Version"),tag:"th"},{content:(0,tt.__)("Jazz Musician"),tag:"th"},{content:(0,tt.__)("Release Date"),tag:"th"}]}],body:[{cells:[{content:"5.2",tag:"td"},{content:"Jaco Pastorius",tag:"td"},{content:(0,tt.__)("May 7, 2019"),tag:"td"}]},{cells:[{content:"5.1",tag:"td"},{content:"Betty Carter",tag:"td"},{content:(0,tt.__)("February 21, 2019"),tag:"td"}]},{cells:[{content:"5.0",tag:"td"},{content:"Bebo Valdés",tag:"td"},{content:(0,tt.__)("December 6, 2018"),tag:"td"}]}]},viewportWidth:450},transforms:eC,edit:KE,save:function({attributes:e}){const{hasFixedLayout:t,head:n,body:a,foot:o,caption:r}=e;if(!n.length&&!a.length&&!o.length)return null;const l=(0,nt.__experimentalGetColorClassesAndStyles)(e),i=(0,nt.__experimentalGetBorderClassesAndStyles)(e),s=ut()(l.className,i.className,{"has-fixed-layout":t}),c=!nt.RichText.isEmpty(r),m=({type:e,rows:t})=>{if(!t.length)return null;const n=`t${e}`;return(0,Ke.createElement)(n,null,t.map((({cells:e},t)=>(0,Ke.createElement)("tr",{key:t},e.map((({content:e,tag:t,scope:n,align:a,colspan:o,rowspan:r},l)=>{const i=ut()({[`has-text-align-${a}`]:a});return(0,Ke.createElement)(nt.RichText.Content,{className:i||void 0,"data-align":a,tagName:t,value:e,key:l,scope:"th"===t?n:void 0,colSpan:o,rowSpan:r})}))))))};return(0,Ke.createElement)("figure",{...nt.useBlockProps.save()},(0,Ke.createElement)("table",{className:""===s?void 0:s,style:{...l.style,...i.style}},(0,Ke.createElement)(m,{type:"head",rows:n}),(0,Ke.createElement)(m,{type:"body",rows:a}),(0,Ke.createElement)(m,{type:"foot",rows:o})),c&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:r,className:(0,nt.__experimentalGetElementClassName)("caption")}))},deprecated:TE},oC=()=>Xe({name:nC,metadata:tC,settings:aC}),rC=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 9.484h-8.889v-1.5H20v1.5Zm0 7h-4.889v-1.5H20v1.5Zm-14 .032a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"}),(0,Ke.createElement)(Ye.Path,{d:"M13 15.516a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 8.484a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"})),lC="wp-block-table-of-contents__entry";function iC({nestedHeadingList:e,disableLinkActivation:t,onClick:n}){return(0,Ke.createElement)(Ke.Fragment,null,e.map(((e,a)=>{const{content:o,link:r}=e.heading,l=r?(0,Ke.createElement)("a",{className:lC,href:r,"aria-disabled":t||void 0,onClick:t&&"function"==typeof n?n:void 0},o):(0,Ke.createElement)("span",{className:lC},o);return(0,Ke.createElement)("li",{key:a},l,e.children?(0,Ke.createElement)("ol",null,(0,Ke.createElement)(iC,{nestedHeadingList:e.children,disableLinkActivation:t,onClick:t&&"function"==typeof n?n:void 0})):null)})))}function sC(e){const t=[];return e.forEach(((n,a)=>{if(""!==n.content&&n.level===e[0].level)if(e[a+1]?.level>n.level){let o=e.length;for(let t=a+1;t<e.length;t++)if(e[t].level===n.level){o=t;break}t.push({heading:n,children:sC(e.slice(a+1,o))})}else t.push({heading:n,children:null})})),t}var cC=n(7734),mC=n.n(cC);function uC(e,t,n){const{getBlockAttributes:a}=e(nt.store),{updateBlockAttributes:o,__unstableMarkNextChangeAsNotPersistent:r}=t(nt.store),l=a(n);if(null===l)return;const i=function(e,t){var n,a;const{getBlockAttributes:o,getBlockName:r,getClientIdsWithDescendants:l,getBlocksByName:i}=e(nt.store),s=null!==(n=e("core/editor").getPermalink())&&void 0!==n?n:null,c=0!==i("core/nextpage").length,{onlyIncludeCurrentPage:m}=null!==(a=o(t))&&void 0!==a?a:{},u=l();let p=1;if(c&&m){const e=u.indexOf(t);for(const[t,n]of u.entries()){if(t>=e)break;"core/nextpage"===r(n)&&p++}}const d=[];let g=1,h=null;"string"==typeof s&&(h=c?(0,pt.addQueryArgs)(s,{page:g}):s);for(const e of u){const t=r(e);if("core/nextpage"===t){if(g++,m&&g>p)break;"string"==typeof s&&(h=(0,pt.addQueryArgs)((0,pt.removeQueryArgs)(s,["page"]),{page:g}))}else if((!m||g===p)&&"core/heading"===t){const t=o(e),n="string"==typeof h&&"string"==typeof t.anchor&&""!==t.anchor;d.push({content:(0,ac.__unstableStripHTML)(t.content.replace(/(<br *\/?>)+/g," ")),level:t.level,link:n?`${h}#${t.anchor}`:null})}}return d}(e,n);mC()(i,l.headings)||(r(),o(n,{headings:i}))}const pC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/table-of-contents",title:"Table of Contents",category:"layout",description:"Summarize your post with a list of headings. Add HTML anchors to Heading blocks to link them here.",keywords:["document outline","summary"],textdomain:"default",attributes:{headings:{type:"array",items:{type:"object"},default:[]},onlyIncludeCurrentPage:{type:"boolean",default:!1}},supports:{html:!1,color:{text:!0,background:!0,gradients:!0,link:!0},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}},interactivity:{clientNavigation:!0}},example:{}},{name:dC}=pC,gC={icon:rC,edit:function e({attributes:{headings:t=[],onlyIncludeCurrentPage:n},clientId:a,setAttributes:o}){!function(e){const t=(0,gt.useRegistry)();(0,_t.useEffect)((()=>t.subscribe((()=>uC(t.select,t.dispatch,e)))),[t,e])}(a);const r=(0,nt.useBlockProps)(),l=(0,jt.useInstanceId)(e,"table-of-contents"),{createWarningNotice:i,removeNotice:s}=(0,gt.useDispatch)(Pt.store);let c;const m=(0,gt.useSelect)((e=>{const{getBlockRootClientId:t,canInsertBlockType:n}=e(nt.store);return n("core/list",t(a))}),[a]),{replaceBlocks:u}=(0,gt.useDispatch)(nt.store),p=sC(t),d=m&&(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.ToolbarButton,{onClick:()=>u(a,(0,Qe.createBlock)("core/list",{ordered:!0,values:(0,_t.renderToString)((0,Ke.createElement)(iC,{nestedHeadingList:p}))}))},(0,tt.__)("Convert to static list")))),g=(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Only include current page"),checked:n,onChange:e=>o({onlyIncludeCurrentPage:e}),help:n?(0,tt.__)("Only including headings from the current page (if the post is paginated)."):(0,tt.__)("Toggle to only include headings from the current page (if the post is paginated).")})));return 0===t.length?(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("div",{...r},(0,Ke.createElement)(et.Placeholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:rC}),label:(0,tt.__)("Table of Contents"),instructions:(0,tt.__)("Start adding Heading blocks to create a table of contents. Headings with HTML anchors will be linked here.")})),g):(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)("nav",{...r},(0,Ke.createElement)("ol",null,(0,Ke.createElement)(iC,{nestedHeadingList:p,disableLinkActivation:!0,onClick:e=>{e.preventDefault(),s(c),c=`block-library/core/table-of-contents/redirection-prevented/${l}`,i((0,tt.__)("Links are disabled in the editor."),{id:c,type:"snackbar"})}}))),d,g)},save:function({attributes:{headings:e=[]}}){return 0===e.length?null:(0,Ke.createElement)("nav",{...nt.useBlockProps.save()},(0,Ke.createElement)("ol",null,(0,Ke.createElement)(iC,{nestedHeadingList:sC(e)})))}},hC=()=>Xe({name:dC,metadata:pC,settings:gC}),bC={from:[{type:"block",blocks:["core/categories"],transform:()=>(0,Qe.createBlock)("core/tag-cloud")}],to:[{type:"block",blocks:["core/categories"],transform:()=>(0,Qe.createBlock)("core/categories")}]};const _C=function({attributes:e,setAttributes:t}){const{taxonomy:n,showTagCounts:a,numberOfTags:o,smallestFontSize:r,largestFontSize:l}=e,[i]=(0,nt.useSettings)("spacing.units"),s=(0,et.__experimentalUseCustomUnits)({availableUnits:i||["%","px","em","rem"]}),c=(0,gt.useSelect)((e=>e(dt.store).getTaxonomies({per_page:-1})),[]),m=(e,n)=>{const[a,o]=(0,et.__experimentalParseQuantityAndUnitFromRawValue)(n);if(!Number.isFinite(a))return;const i={[e]:n};Object.entries({smallestFontSize:r,largestFontSize:l}).forEach((([t,n])=>{const[a,r]=(0,et.__experimentalParseQuantityAndUnitFromRawValue)(n);t!==e&&r!==o&&(i[t]=`${a}${o}`)})),t(i)},u=(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Taxonomy"),options:[{label:(0,tt.__)("- Select -"),value:"",disabled:!0},...(null!=c?c:[]).filter((e=>!!e.show_cloud)).map((e=>({value:e.slug,label:e.name})))],value:n,onChange:e=>t({taxonomy:e})}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Show post counts"),checked:a,onChange:()=>t({showTagCounts:!a})}),(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Number of tags"),value:o,onChange:e=>t({numberOfTags:e}),min:1,max:100,required:!0}),(0,Ke.createElement)(et.Flex,null,(0,Ke.createElement)(et.FlexItem,{isBlock:!0},(0,Ke.createElement)(et.__experimentalUnitControl,{label:(0,tt.__)("Smallest size"),value:r,onChange:e=>{m("smallestFontSize",e)},units:s,min:.1,max:100})),(0,Ke.createElement)(et.FlexItem,{isBlock:!0},(0,Ke.createElement)(et.__experimentalUnitControl,{label:(0,tt.__)("Largest size"),value:l,onChange:e=>{m("largestFontSize",e)},units:s,min:.1,max:100})))));return(0,Ke.createElement)(Ke.Fragment,null,u,(0,Ke.createElement)("div",{...(0,nt.useBlockProps)()},(0,Ke.createElement)(et.Disabled,null,(0,Ke.createElement)(ot(),{skipBlockSupportAttributes:!0,block:"core/tag-cloud",attributes:e}))))},yC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/tag-cloud",title:"Tag Cloud",category:"widgets",description:"A cloud of your most used tags.",textdomain:"default",attributes:{numberOfTags:{type:"number",default:45,minimum:1,maximum:100},taxonomy:{type:"string",default:"post_tag"},showTagCounts:{type:"boolean",default:!1},smallestFontSize:{type:"string",default:"8pt"},largestFontSize:{type:"string",default:"22pt"}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"outline",label:"Outline"}],supports:{html:!1,align:!0,spacing:{margin:!0,padding:!0},typography:{lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-tag-cloud-editor"},{name:vC}=yC,fC={icon:rb,example:{},edit:_C,transforms:bC},kC=()=>Xe({name:vC,metadata:yC,settings:fC});var xC=function(){return xC=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},xC.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function wC(e){return e.toLowerCase()}var EC=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],CC=/[^A-Z0-9]+/gi;function SC(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,a=void 0===n?EC:n,o=t.stripRegexp,r=void 0===o?CC:o,l=t.transform,i=void 0===l?wC:l,s=t.delimiter,c=void 0===s?" ":s,m=BC(BC(e,a,"$1\0$2"),r,"\0"),u=0,p=m.length;"\0"===m.charAt(u);)u++;for(;"\0"===m.charAt(p-1);)p--;return m.slice(u,p).split("\0").map(i).join(c)}function BC(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function NC(e){return function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(e.toLowerCase())}const TC=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}));function IC(e,t){return void 0===t&&(t={}),function(e,t){return void 0===t&&(t={}),SC(e,xC({delimiter:"."},t))}(e,xC({delimiter:"-"},t))}function PC(e,t){const{templateParts:n,isResolving:a}=(0,gt.useSelect)((e=>{const{getEntityRecords:t,isResolving:n}=e(dt.store),a={per_page:-1};return{templateParts:t("postType","wp_template_part",a),isResolving:n("getEntityRecords",["postType","wp_template_part",a])}}),[]);return{templateParts:(0,_t.useMemo)((()=>n&&n.filter((n=>oh(n.theme,n.slug)!==t&&(!e||"uncategorized"===e||n.area===e)))||[]),[n,e,t]),isResolving:a}}function MC(e,t){return(0,gt.useSelect)((n=>{const a=e?`core/template-part/${e}`:"core/template-part",{getBlockRootClientId:o,getPatternsByBlockTypes:r}=n(nt.store);return r(a,o(t))}),[e,t])}function zC(e,t){const{saveEntityRecord:n}=(0,gt.useDispatch)(dt.store);return async(a=[],o=(0,tt.__)("Untitled Template Part"))=>{const r={title:o,slug:IC(o).replace(/[^\w-]+/g,"")||"wp-custom-part",content:(0,Qe.serialize)(a),area:e},l=await n("postType","wp_template_part",r);t({slug:l.slug,theme:l.theme,area:void 0})}}function RC(e){return(0,gt.useSelect)((t=>{var n;const a=t("core/editor").__experimentalGetDefaultTemplatePartAreas(),o=a.find((t=>t.area===e)),r=a.find((e=>"uncategorized"===e.area));return{icon:o?.icon||r?.icon,label:o?.label||(0,tt.__)("Template Part"),tagName:null!==(n=o?.area_tag)&&void 0!==n?n:"div"}}),[e])}function AC({areaLabel:e,onClose:t,onSubmit:n}){const[a,o]=(0,_t.useState)((0,tt.__)("Untitled Template Part"));return(0,Ke.createElement)(et.Modal,{title:(0,tt.sprintf)((0,tt.__)("Name and create your new %s"),e.toLowerCase()),overlayClassName:"wp-block-template-part__placeholder-create-new__title-form",onRequestClose:t},(0,Ke.createElement)("form",{onSubmit:e=>{e.preventDefault(),n(a)}},(0,Ke.createElement)(et.__experimentalVStack,{spacing:"5"},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Name"),value:a,onChange:o}),(0,Ke.createElement)(et.__experimentalHStack,{justify:"right"},(0,Ke.createElement)(et.Button,{variant:"primary",type:"submit",disabled:!a.length,"aria-disabled":!a.length},(0,tt.__)("Create"))))))}function HC({area:e,clientId:t,templatePartId:n,onOpenSelectionModal:a,setAttributes:o}){const{templateParts:r,isResolving:l}=PC(e,n),i=MC(e,t),[s,c]=(0,_t.useState)(!1),m=RC(e),u=zC(e,o);return(0,Ke.createElement)(et.Placeholder,{icon:m.icon,label:m.label,instructions:(0,tt.sprintf)((0,tt.__)("Choose an existing %s or create a new one."),m.label.toLowerCase())},l&&(0,Ke.createElement)(et.Spinner,null),!l&&!(!r.length&&!i.length)&&(0,Ke.createElement)(et.Button,{variant:"primary",onClick:a},(0,tt.__)("Choose")),!l&&(0,Ke.createElement)(et.Button,{variant:"secondary",onClick:()=>{c(!0)}},(0,tt.__)("Start blank")),s&&(0,Ke.createElement)(AC,{areaLabel:m.label,onClose:()=>c(!1),onSubmit:e=>{u([],e)}}))}function LC({setAttributes:e,onClose:t,templatePartId:n=null,area:a,clientId:o}){const[r,l]=(0,_t.useState)(""),{templateParts:i}=PC(a,n),s=(0,_t.useMemo)((()=>Uf(i.map((e=>({name:oh(e.theme,e.slug),title:e.title.rendered,blocks:(0,Qe.parse)(e.content.raw),templatePart:e}))),r)),[i,r]),c=(0,jt.useAsyncList)(s),m=MC(a,o),u=(0,_t.useMemo)((()=>Uf(m,r)),[m,r]),p=(0,jt.useAsyncList)(u),{createSuccessNotice:d}=(0,gt.useDispatch)(Pt.store),g=zC(a,e),h=!!s.length,b=!!u.length;return(0,Ke.createElement)("div",{className:"block-library-template-part__selection-content"},(0,Ke.createElement)("div",{className:"block-library-template-part__selection-search"},(0,Ke.createElement)(et.SearchControl,{__nextHasNoMarginBottom:!0,onChange:l,value:r,label:(0,tt.__)("Search for replacements"),placeholder:(0,tt.__)("Search")})),h&&(0,Ke.createElement)("div",null,(0,Ke.createElement)("h2",null,(0,tt.__)("Existing template parts")),(0,Ke.createElement)(nt.__experimentalBlockPatternsList,{blockPatterns:s,shownPatterns:c,onClickPattern:n=>{var a;a=n.templatePart,e({slug:a.slug,theme:a.theme,area:void 0}),d((0,tt.sprintf)((0,tt.__)('Template Part "%s" inserted.'),a.title?.rendered||a.slug),{type:"snackbar"}),t()}})),b&&(0,Ke.createElement)("div",null,(0,Ke.createElement)("h2",null,(0,tt.__)("Patterns")),(0,Ke.createElement)(nt.__experimentalBlockPatternsList,{blockPatterns:u,shownPatterns:p,onClickPattern:(e,n)=>{g(n,e.title),t()}})),!h&&!b&&(0,Ke.createElement)(et.__experimentalHStack,{alignment:"center"},(0,Ke.createElement)("p",null,(0,tt.__)("No results found."))))}function DC(e){const t=(0,Qe.getPossibleBlockTransformations)([e]).filter((e=>{if(!e.transforms)return!0;const t=e.transforms?.from?.find((e=>e.blocks&&e.blocks.includes("*"))),n=e.transforms?.to?.find((e=>e.blocks&&e.blocks.includes("*")));return!t&&!n}));if(t.length)return(0,Qe.switchToBlockType)(e,t[0].name)}function FC(e=[]){return e.flatMap((e=>"core/legacy-widget"===e.name?DC(e):(0,Qe.createBlock)(e.name,e.attributes,FC(e.innerBlocks)))).filter((e=>!!e))}const VC={per_page:-1,_fields:"id,name,description,status,widgets"};function $C({area:e,setAttributes:t}){const[n,a]=(0,_t.useState)(""),[o,r]=(0,_t.useState)(!1),l=(0,gt.useRegistry)(),{sidebars:i,hasResolved:s}=(0,gt.useSelect)((e=>{const{getSidebars:t,hasFinishedResolution:n}=e(dt.store);return{sidebars:t(VC),hasResolved:n("getSidebars",[VC])}}),[]),{createErrorNotice:c}=(0,gt.useDispatch)(Pt.store),m=zC(e,t),u=(0,_t.useMemo)((()=>{const e=(null!=i?i:[]).filter((e=>"wp_inactive_widgets"!==e.id&&e.widgets.length>0)).map((e=>({value:e.id,label:e.name})));return e.length?[{value:"",label:(0,tt.__)("Select widget area")},...e]:[]}),[i]);if(!s)return(0,Ke.createElement)(et.__experimentalSpacer,{marginBottom:"0"});if(s&&!u.length)return null;return(0,Ke.createElement)(et.__experimentalSpacer,{marginBottom:"4"},(0,Ke.createElement)(et.__experimentalHStack,{as:"form",onSubmit:async function(e){if(e.preventDefault(),o||!n)return;r(!0);const t=u.find((({value:e})=>e===n)),{getWidgets:a}=l.resolveSelect(dt.store),i=await a({sidebar:t.value,_embed:"about"}),s=new Set,p=i.flatMap((e=>{const t=function(e){if("block"!==e.id_base){let t;return t=e._embedded.about[0].is_multi?{idBase:e.id_base,instance:e.instance}:{id:e.id},DC((0,Qe.createBlock)("core/legacy-widget",t))}const t=(0,Qe.parse)(e.instance.raw.content,{__unstableSkipAutop:!0});if(!t.length)return;const n=t[0];return"core/widget-group"===n.name?(0,Qe.createBlock)((0,Qe.getGroupingBlockName)(),void 0,FC(n.innerBlocks)):n.innerBlocks.length>0?(0,Qe.cloneBlock)(n,void 0,FC(n.innerBlocks)):n}(e);return t||(s.add(e.id_base),[])}));await m(p,(0,tt.sprintf)((0,tt.__)("Widget area: %s"),t.label)),s.size&&c((0,tt.sprintf)((0,tt.__)("Unable to import the following widgets: %s."),Array.from(s).join(", ")),{type:"snackbar"}),r(!1)}},(0,Ke.createElement)(et.FlexBlock,null,(0,Ke.createElement)(et.SelectControl,{label:(0,tt.__)("Import widget area"),value:n,options:u,onChange:e=>a(e),disabled:!u.length,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})),(0,Ke.createElement)(et.FlexItem,{style:{marginBottom:"8px",marginTop:"auto"}},(0,Ke.createElement)(et.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:o,"aria-disabled":o||!n},(0,tt._x)("Import","button label")))))}const OC={header:(0,tt.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,tt.__)("The <main> element should be used for the primary content of your document only."),section:(0,tt.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element."),article:(0,tt.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,tt.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),footer:(0,tt.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).")};function GC({tagName:e,setAttributes:t,isEntityAvailable:n,templatePartId:a,defaultWrapper:o,hasInnerBlocks:r}){const[l,i]=(0,dt.useEntityProp)("postType","wp_template_part","area",a),[s,c]=(0,dt.useEntityProp)("postType","wp_template_part","title",a),m=(0,gt.useSelect)((e=>e("core/editor").__experimentalGetDefaultTemplatePartAreas()),[]).map((({label:e,area:t})=>({label:e,value:t})));return(0,Ke.createElement)(Ke.Fragment,null,n&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Title"),value:s,onChange:e=>{c(e)},onFocus:e=>e.target.select()}),(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Area"),labelPosition:"top",options:m,value:l,onChange:i})),(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("HTML element"),options:[{label:(0,tt.sprintf)((0,tt.__)("Default based on area (%s)"),`<${o}>`),value:""},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"},{label:"<div>",value:"div"}],value:e||"",onChange:e=>t({tagName:e}),help:OC[e]}),!r&&(0,Ke.createElement)($C,{area:l,setAttributes:t}))}function UC({postId:e,hasInnerBlocks:t,layout:n,tagName:a,blockProps:o}){const r=(0,gt.useSelect)((e=>{const{getSettings:t}=e(nt.store);return t()?.supportsLayout}),[]),[l]=(0,nt.useSettings)("layout"),i=n?.inherit?l||{}:n,[s,c,m]=(0,dt.useEntityBlockEditor)("postType","wp_template_part",{id:e}),u=(0,nt.useInnerBlocksProps)(o,{value:s,onInput:c,onChange:m,renderAppender:t?void 0:nt.InnerBlocks.ButtonBlockAppender,layout:r?i:void 0});return(0,Ke.createElement)(a,{...u})}function qC({isEntityAvailable:e,area:t,clientId:n,templatePartId:a,isTemplatePartSelectionOpen:o,setIsTemplatePartSelectionOpen:r}){const{templateParts:l}=PC(t,a),i=MC(t,n),s=!!l.length||!!i.length;return e&&s&&("header"===t||"footer"===t)?(0,Ke.createElement)(et.MenuItem,{onClick:()=>{r(!0)},"aria-expanded":o,"aria-haspopup":"dialog"},(0,tt.__)("Replace")):null}const jC=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M18.5 10.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"})),WC=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),ZC=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.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.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));function QC(e,t){if("core/template-part"!==t)return e;if(e.variations){const t=(e,t)=>{const{area:n,theme:a,slug:o}=e;if(n)return n===t.area;if(!o)return!1;const{getCurrentTheme:r,getEntityRecord:l}=(0,gt.select)(dt.store),i=l("postType","wp_template_part",`${a||r()?.stylesheet}//${o}`);return i?.slug?i.slug===t.slug:i?.area===t.area},n=e.variations.map((e=>{return{...e,...!e.isActive&&{isActive:t},..."string"==typeof e.icon&&{icon:(n=e.icon,"header"===n?jC:"footer"===n?WC:"sidebar"===n?ZC:TC)}};var n}));return{...e,variations:n}}return e}const KC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/template-part",title:"Template Part",category:"theme",description:"Edit the different global regions of your site, like the header, footer, sidebar, or create your own.",textdomain:"default",attributes:{slug:{type:"string"},theme:{type:"string"},tagName:{type:"string"},area:{type:"string"}},supports:{align:!0,html:!1,reusable:!1,renaming:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-template-part-editor"},{name:YC}=KC,JC={icon:TC,__experimentalLabel:({slug:e,theme:t})=>{if(!e)return;const{getCurrentTheme:n,getEditedEntityRecord:a}=(0,gt.select)(dt.store),o=a("postType","wp_template_part",(t||n()?.stylesheet)+"//"+e);return o?(0,Jn.decodeEntities)(o.title)||function(e,t){return void 0===t&&(t={}),SC(e,xC({delimiter:" ",transform:NC},t))}(o.slug||""):void 0},edit:function({attributes:e,setAttributes:t,clientId:n}){const a=(0,gt.useSelect)((e=>e(dt.store).getCurrentTheme()?.stylesheet),[]),{slug:o,theme:r=a,tagName:l,layout:i={}}=e,s=oh(r,o),c=(0,nt.useHasRecursion)(s),[m,u]=(0,_t.useState)(!1),{isResolved:p,hasInnerBlocks:d,isMissing:g,area:h}=(0,gt.useSelect)((t=>{const{getEditedEntityRecord:a,hasFinishedResolution:o}=t(dt.store),{getBlockCount:r}=t(nt.store),l=["postType","wp_template_part",s],i=s?a(...l):null,c=i?.area||e.area,m=!!s&&o("getEditedEntityRecord",l);return{hasInnerBlocks:r(n)>0,isResolved:m,isMissing:m&&(!i||0===Object.keys(i).length),area:c}}),[s,e.area,n]),b=RC(h),_=(0,nt.useBlockProps)(),y=!o,v=!y&&!g&&p,f=l||b.tagName;return!d&&(o&&!r||o&&g)?(0,Ke.createElement)(f,{..._},(0,Ke.createElement)(nt.Warning,null,(0,tt.sprintf)((0,tt.__)("Template part has been deleted or is unavailable: %s"),o))):v&&c?(0,Ke.createElement)(f,{..._},(0,Ke.createElement)(nt.Warning,null,(0,tt.__)("Block cannot be rendered inside itself."))):(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.RecursionProvider,{uniqueId:s},(0,Ke.createElement)(nt.InspectorControls,{group:"advanced"},(0,Ke.createElement)(GC,{tagName:l,setAttributes:t,isEntityAvailable:v,templatePartId:s,defaultWrapper:b.tagName,hasInnerBlocks:d})),y&&(0,Ke.createElement)(f,{..._},(0,Ke.createElement)(HC,{area:e.area,templatePartId:s,clientId:n,setAttributes:t,onOpenSelectionModal:()=>u(!0)})),(0,Ke.createElement)(nt.BlockSettingsMenuControls,null,(({selectedClientIds:e})=>1!==e.length||n!==e[0]?null:(0,Ke.createElement)(qC,{isEntityAvailable:v,area:h,clientId:n,templatePartId:s,isTemplatePartSelectionOpen:m,setIsTemplatePartSelectionOpen:u}))),v&&(0,Ke.createElement)(UC,{tagName:f,blockProps:_,postId:s,hasInnerBlocks:d,layout:i}),!y&&!p&&(0,Ke.createElement)(f,{..._},(0,Ke.createElement)(et.Spinner,null))),m&&(0,Ke.createElement)(et.Modal,{overlayClassName:"block-editor-template-part__selection-modal",title:(0,tt.sprintf)((0,tt.__)("Choose a %s"),b.label.toLowerCase()),onRequestClose:()=>u(!1),isFullScreen:!0},(0,Ke.createElement)(LC,{templatePartId:s,clientId:n,area:h,setAttributes:t,onClose:()=>u(!1)})))}},XC=()=>{(0,_i.addFilter)("blocks.registerBlockType","core/template-part",QC);const e=["core/post-template","core/post-content"];return(0,_i.addFilter)("blockEditor.__unstableCanInsertBlockType","core/block-library/removeTemplatePartsFromPostTemplates",((t,n,a,{getBlock:o,getBlockParentsByBlockName:r})=>{if("core/template-part"!==n.name)return t;for(const t of e){if(o(a)?.name===t||r(a,t).length)return!1}return!0})),Xe({name:YC,metadata:KC,settings:JC})},eS=(0,Ke.createElement)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Ke.createElement)(Ye.Path,{d:"M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z"}));const tS={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/term-description",title:"Term Description",category:"theme",description:"Display the description of categories, tags and custom taxonomies when viewing an archive.",textdomain:"default",attributes:{textAlign:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}},{name:nS}=tS,aS={icon:eS,edit:function({attributes:e,setAttributes:t,mergedStyle:n}){const{textAlign:a}=e,o=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${a}`]:a}),style:n});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,{group:"block"},(0,Ke.createElement)(nt.AlignmentControl,{value:a,onChange:e=>{t({textAlign:e})}})),(0,Ke.createElement)("div",{...o},(0,Ke.createElement)("div",{className:"wp-block-term-description__placeholder"},(0,Ke.createElement)("span",null,(0,tt.__)("Term Description")))))}},oS=()=>Xe({name:nS,metadata:tS,settings:aS});const rS={to:[{type:"block",blocks:["core/columns"],transform:({className:e,columns:t,content:n,width:a})=>(0,Qe.createBlock)("core/columns",{align:"wide"===a||"full"===a?a:void 0,className:e,columns:t},n.map((({children:e})=>(0,Qe.createBlock)("core/column",{},[(0,Qe.createBlock)("core/paragraph",{content:e})]))))}]},lS=rS,iS={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/text-columns",title:"Text Columns (deprecated)",icon:"columns",category:"design",description:"This block is deprecated. Please use the Columns block instead.",textdomain:"default",attributes:{content:{type:"array",source:"query",selector:"p",query:{children:{type:"string",source:"html"}},default:[{},{}]},columns:{type:"number",default:2},width:{type:"string"}},supports:{inserter:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-text-columns-editor",style:"wp-block-text-columns"},{name:sS}=iS,cS={transforms:lS,getEditWrapperProps(e){const{width:t}=e;if("wide"===t||"full"===t)return{"data-align":t}},edit:function({attributes:e,setAttributes:t}){const{width:n,content:a,columns:o}=e;return Qp()("The Text Columns block",{since:"5.3",alternative:"the Columns block"}),(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(nt.BlockAlignmentToolbar,{value:n,onChange:e=>t({width:e}),controls:["center","wide","full"]})),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,null,(0,Ke.createElement)(et.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,tt.__)("Columns"),value:o,onChange:e=>t({columns:e}),min:2,max:4,required:!0}))),(0,Ke.createElement)("div",{...(0,nt.useBlockProps)({className:`align${n} columns-${o}`})},Array.from({length:o}).map(((e,n)=>(0,Ke.createElement)("div",{className:"wp-block-column",key:`column-${n}`},(0,Ke.createElement)(nt.RichText,{tagName:"p",value:a?.[n]?.children,onChange:e=>{t({content:[...a.slice(0,n),{children:e},...a.slice(n+1)]})},"aria-label":(0,tt.sprintf)((0,tt.__)("Column %d text"),n+1),placeholder:(0,tt.__)("New Column")}))))))},save:function({attributes:e}){const{width:t,content:n,columns:a}=e;return(0,Ke.createElement)("div",{...nt.useBlockProps.save({className:`align${t} columns-${a}`})},Array.from({length:a}).map(((e,t)=>(0,Ke.createElement)("div",{className:"wp-block-column",key:`column-${t}`},(0,Ke.createElement)(nt.RichText.Content,{tagName:"p",value:n?.[t]?.children})))))}},mS=()=>Xe({name:sS,metadata:iS,settings:cS}),uS=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})),pS={attributes:{content:{type:"string",source:"html",selector:"pre",default:""},textAlign:{type:"string"}},save({attributes:e}){const{textAlign:t,content:n}=e;return(0,Ke.createElement)(nt.RichText.Content,{tagName:"pre",style:{textAlign:t},value:n})}},dS={attributes:{content:{type:"string",source:"html",selector:"pre",default:"",__unstablePreserveWhiteSpace:!0,__experimentalRole:"content"},textAlign:{type:"string"}},supports:{anchor:!0,color:{gradients:!0,link:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},spacing:{padding:!0}},save({attributes:e}){const{textAlign:t,content:n}=e,a=ut()({[`has-text-align-${t}`]:t});return(0,Ke.createElement)("pre",{...nt.useBlockProps.save({className:a})},(0,Ke.createElement)(nt.RichText.Content,{value:n}))},migrate:ln,isEligible:({style:e})=>e?.typography?.fontFamily},gS=[dS,pS];const hS={from:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,Qe.createBlock)("core/verse",e)}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,Qe.createBlock)("core/paragraph",e)}]},bS=hS,_S={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/verse",title:"Verse",category:"text",description:"Insert poetry. Use special spacing formats. Or quote song lyrics.",keywords:["poetry","poem"],textdomain:"default",attributes:{content:{type:"rich-text",source:"rich-text",selector:"pre",__unstablePreserveWhiteSpace:!0,__experimentalRole:"content"},textAlign:{type:"string"}},supports:{anchor:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,__experimentalFontFamily:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__experimentalBorder:{radius:!0,width:!0,color:!0,style:!0},interactivity:{clientNavigation:!0}},style:"wp-block-verse",editorStyle:"wp-block-verse-editor"},{name:yS}=_S,vS={icon:uS,example:{attributes:{content:(0,tt.__)("WHAT was he doing, the great god Pan,\n\tDown in the reeds by the river?\nSpreading ruin and scattering ban,\nSplashing and paddling with hoofs of a goat,\nAnd breaking the golden lilies afloat\n With the dragon-fly on the river.")}},transforms:bS,deprecated:gS,merge:(e,t)=>({content:e.content+"\n\n"+t.content}),edit:function({attributes:e,setAttributes:t,mergeBlocks:n,onRemove:a,insertBlocksAfter:o,style:r}){const{textAlign:l,content:i}=e,s=(0,nt.useBlockProps)({className:ut()({[`has-text-align-${l}`]:l}),style:r});return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(nt.AlignmentToolbar,{value:l,onChange:e=>{t({textAlign:e})}})),(0,Ke.createElement)(nt.RichText,{tagName:"pre",identifier:"content",preserveWhiteSpace:!0,value:i,onChange:e=>{t({content:e})},"aria-label":(0,tt.__)("Verse text"),placeholder:(0,tt.__)("Write verse…"),onRemove:a,onMerge:n,textAlign:l,...s,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>o((0,Qe.createBlock)((0,Qe.getDefaultBlockName)()))}))},save:function({attributes:e}){const{textAlign:t,content:n}=e,a=ut()({[`has-text-align-${t}`]:t});return(0,Ke.createElement)("pre",{...nt.useBlockProps.save({className:a})},(0,Ke.createElement)(nt.RichText.Content,{value:n}))}},fS=()=>Xe({name:yS,metadata:_S,settings:vS}),kS=(0,Ke.createElement)(Ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Ke.createElement)(Ye.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));function xS({tracks:e=[]}){return e.map((e=>(0,Ke.createElement)("track",{key:e.src,...e})))}const{attributes:wS}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/video",title:"Video",category:"media",description:"Embed a video from your media library or upload a new one.",keywords:["movie"],textdomain:"default",attributes:{autoplay:{type:"boolean",source:"attribute",selector:"video",attribute:"autoplay"},caption:{type:"rich-text",source:"rich-text",selector:"figcaption",__experimentalRole:"content"},controls:{type:"boolean",source:"attribute",selector:"video",attribute:"controls",default:!0},id:{type:"number",__experimentalRole:"content"},loop:{type:"boolean",source:"attribute",selector:"video",attribute:"loop"},muted:{type:"boolean",source:"attribute",selector:"video",attribute:"muted"},poster:{type:"string",source:"attribute",selector:"video",attribute:"poster"},preload:{type:"string",source:"attribute",selector:"video",attribute:"preload",default:"metadata"},src:{type:"string",source:"attribute",selector:"video",attribute:"src",__experimentalRole:"content"},playsInline:{type:"boolean",source:"attribute",selector:"video",attribute:"playsinline"},tracks:{__experimentalRole:"content",type:"array",items:{type:"object"},default:[]}},supports:{anchor:!0,align:!0,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-video-editor",style:"wp-block-video"},ES={attributes:wS,save({attributes:e}){const{autoplay:t,caption:n,controls:a,loop:o,muted:r,poster:l,preload:i,src:s,playsInline:c,tracks:m}=e;return(0,Ke.createElement)("figure",{...nt.useBlockProps.save()},s&&(0,Ke.createElement)("video",{autoPlay:t,controls:a,loop:o,muted:r,poster:l,preload:"metadata"!==i?i:void 0,src:s,playsInline:c},(0,Ke.createElement)(xS,{tracks:m})),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{tagName:"figcaption",value:n}))}},CS=[ES],SS=[{value:"auto",label:(0,tt.__)("Auto")},{value:"metadata",label:(0,tt.__)("Metadata")},{value:"none",label:(0,tt._x)("None","Preload value")}],BS=({setAttributes:e,attributes:t})=>{const{autoplay:n,controls:a,loop:o,muted:r,playsInline:l,preload:i}=t,s=(0,tt.__)("Autoplay may cause usability issues for some users."),c=_t.Platform.select({web:(0,_t.useCallback)((e=>e?s:null),[]),native:s}),m=(0,_t.useMemo)((()=>{const t=t=>n=>{e({[t]:n})};return{autoplay:t("autoplay"),loop:t("loop"),muted:t("muted"),controls:t("controls"),playsInline:t("playsInline")}}),[]),u=(0,_t.useCallback)((t=>{e({preload:t})}),[]);return(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Autoplay"),onChange:m.autoplay,checked:!!n,help:c}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Loop"),onChange:m.loop,checked:!!o}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Muted"),onChange:m.muted,checked:!!r}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Playback controls"),onChange:m.controls,checked:!!a}),(0,Ke.createElement)(et.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Play inline"),onChange:m.playsInline,checked:!!l}),(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,tt.__)("Preload"),value:i,onChange:u,options:SS,hideCancelButton:!0}))},NS=["text/vtt"],TS="subtitles",IS=[{label:(0,tt.__)("Subtitles"),value:"subtitles"},{label:(0,tt.__)("Captions"),value:"captions"},{label:(0,tt.__)("Descriptions"),value:"descriptions"},{label:(0,tt.__)("Chapters"),value:"chapters"},{label:(0,tt.__)("Metadata"),value:"metadata"}];function PS({tracks:e,onEditPress:t}){let n;return n=0===e.length?(0,Ke.createElement)("p",{className:"block-library-video-tracks-editor__tracks-informative-message"},(0,tt.__)("Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users.")):e.map(((e,n)=>(0,Ke.createElement)(et.__experimentalHStack,{key:n,className:"block-library-video-tracks-editor__track-list-track"},(0,Ke.createElement)("span",null,e.label," "),(0,Ke.createElement)(et.Button,{variant:"tertiary",onClick:()=>t(n),"aria-label":(0,tt.sprintf)((0,tt.__)("Edit %s"),e.label)},(0,tt.__)("Edit"))))),(0,Ke.createElement)(et.MenuGroup,{label:(0,tt.__)("Text tracks"),className:"block-library-video-tracks-editor__track-list"},n)}function MS({track:e,onChange:t,onClose:n,onRemove:a}){const{src:o="",label:r="",srcLang:l="",kind:i=TS}=e,s=o.startsWith("blob:")?"":(0,pt.getFilename)(o)||"";return(0,Ke.createElement)(et.NavigableMenu,null,(0,Ke.createElement)(et.__experimentalVStack,{className:"block-library-video-tracks-editor__single-track-editor",spacing:"4"},(0,Ke.createElement)("span",{className:"block-library-video-tracks-editor__single-track-editor-edit-track-label"},(0,tt.__)("Edit track")),(0,Ke.createElement)("span",null,(0,tt.__)("File"),": ",(0,Ke.createElement)("b",null,s)),(0,Ke.createElement)(et.__experimentalGrid,{columns:2,gap:4},(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,autoFocus:!0,onChange:n=>t({...e,label:n}),label:(0,tt.__)("Label"),value:r,help:(0,tt.__)("Title of track")}),(0,Ke.createElement)(et.TextControl,{__nextHasNoMarginBottom:!0,onChange:n=>t({...e,srcLang:n}),label:(0,tt.__)("Source language"),value:l,help:(0,tt.__)("Language tag (en, fr, etc.)")})),(0,Ke.createElement)(et.__experimentalVStack,{spacing:"8"},(0,Ke.createElement)(et.SelectControl,{__nextHasNoMarginBottom:!0,className:"block-library-video-tracks-editor__single-track-editor-kind-select",options:IS,value:i,label:(0,tt.__)("Kind"),onChange:n=>{t({...e,kind:n})}}),(0,Ke.createElement)(et.__experimentalHStack,{className:"block-library-video-tracks-editor__single-track-editor-buttons-container"},(0,Ke.createElement)(et.Button,{variant:"secondary",onClick:()=>{const a={};let o=!1;""===r&&(a.label=(0,tt.__)("English"),o=!0),""===l&&(a.srcLang="en",o=!0),void 0===e.kind&&(a.kind=TS,o=!0),o&&t({...e,...a}),n()}},(0,tt.__)("Close")),(0,Ke.createElement)(et.Button,{isDestructive:!0,variant:"link",onClick:a},(0,tt.__)("Remove track"))))))}function zS({tracks:e=[],onChange:t}){const n=(0,gt.useSelect)((e=>e(nt.store).getSettings().mediaUpload),[]),[a,o]=(0,_t.useState)(null);return n?(0,Ke.createElement)(et.Dropdown,{contentClassName:"block-library-video-tracks-editor",renderToggle:({isOpen:e,onToggle:t})=>(0,Ke.createElement)(et.ToolbarGroup,null,(0,Ke.createElement)(et.ToolbarButton,{label:(0,tt.__)("Text tracks"),showTooltip:!0,"aria-expanded":e,"aria-haspopup":"true",onClick:t},(0,tt.__)("Text tracks"))),renderContent:()=>null!==a?(0,Ke.createElement)(MS,{track:e[a],onChange:n=>{const o=[...e];o[a]=n,t(o)},onClose:()=>o(null),onRemove:()=>{t(e.filter(((e,t)=>t!==a))),o(null)}}):(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(et.NavigableMenu,null,(0,Ke.createElement)(PS,{tracks:e,onEditPress:o}),(0,Ke.createElement)(et.MenuGroup,{className:"block-library-video-tracks-editor__add-tracks-container",label:(0,tt.__)("Add tracks")},(0,Ke.createElement)(nt.MediaUpload,{onSelect:({url:n})=>{const a=e.length;t([...e,{src:n}]),o(a)},allowedTypes:NS,render:({open:e})=>(0,Ke.createElement)(et.MenuItem,{icon:Qd,onClick:e},(0,tt.__)("Open Media Library"))}),(0,Ke.createElement)(nt.MediaUploadCheck,null,(0,Ke.createElement)(et.FormFileUpload,{onChange:a=>{const r=a.target.files,l=e.length;n({allowedTypes:NS,filesList:r,onFileChange:([{url:n}])=>{const a=[...e];a[l]||(a[l]={}),a[l]={...e[l],src:n},t(a),o(l)}})},accept:".vtt,text/vtt",render:({openFileDialog:e})=>(0,Ke.createElement)(et.MenuItem,{icon:np,onClick:()=>{e()}},(0,tt.__)("Upload"))})))))}):null}const RS=e=>(0,Ke.createElement)(et.Placeholder,{className:"block-editor-media-placeholder",withIllustration:!0,icon:kS,label:(0,tt.__)("Video"),instructions:(0,tt.__)("Upload a video file, pick one from your media library, or add one with a URL.")},e),AS=["video"],HS=["image"];const LS=function e({isSelected:t,attributes:n,className:a,setAttributes:o,insertBlocksAfter:r,onReplace:l}){const i=(0,jt.useInstanceId)(e),s=(0,_t.useRef)(),c=(0,_t.useRef)(),{id:m,controls:u,poster:p,src:d,tracks:g}=n,h=!m&&(0,It.isBlobURL)(d),{getSettings:b}=(0,gt.useSelect)(nt.store);function _(e){e&&e.url?o({src:e.url,id:e.id,poster:e.image?.src!==e.icon?e.image?.src:void 0,caption:e.caption}):o({src:void 0,id:void 0,poster:void 0,caption:void 0})}function y(e){if(e!==d){const t=Ot({attributes:{url:e}});if(void 0!==t&&l)return void l(t);o({src:e,id:void 0,poster:void 0})}}(0,_t.useEffect)((()=>{if(!m&&(0,It.isBlobURL)(d)){const e=(0,It.getBlobByURL)(d);e&&b().mediaUpload({filesList:[e],onFileChange:([e])=>_(e),onError:f,allowedTypes:AS})}}),[]),(0,_t.useEffect)((()=>{s.current&&s.current.load()}),[p]);const{createErrorNotice:v}=(0,gt.useDispatch)(Pt.store);function f(e){v(e,{type:"snackbar"})}const k=ut()(a,{"is-transient":h}),x=(0,nt.useBlockProps)({className:k});if(!d)return(0,Ke.createElement)("div",{...x},(0,Ke.createElement)(nt.MediaPlaceholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:kS}),onSelect:_,onSelectURL:y,accept:"video/*",allowedTypes:AS,value:n,onError:f,placeholder:RS}));const w=`video-block__poster-image-description-${i}`;return(0,Ke.createElement)(Ke.Fragment,null,t&&(0,Ke.createElement)(Ke.Fragment,null,(0,Ke.createElement)(nt.BlockControls,null,(0,Ke.createElement)(zS,{tracks:g,onChange:e=>{o({tracks:e})}})),(0,Ke.createElement)(nt.BlockControls,{group:"other"},(0,Ke.createElement)(nt.MediaReplaceFlow,{mediaId:m,mediaURL:d,allowedTypes:AS,accept:"video/*",onSelect:_,onSelectURL:y,onError:f}))),(0,Ke.createElement)(nt.InspectorControls,null,(0,Ke.createElement)(et.PanelBody,{title:(0,tt.__)("Settings")},(0,Ke.createElement)(BS,{setAttributes:o,attributes:n}),(0,Ke.createElement)(nt.MediaUploadCheck,null,(0,Ke.createElement)(et.BaseControl,{className:"editor-video-poster-control"},(0,Ke.createElement)(et.BaseControl.VisualLabel,null,(0,tt.__)("Poster image")),(0,Ke.createElement)(nt.MediaUpload,{title:(0,tt.__)("Select poster image"),onSelect:function(e){o({poster:e.url})},allowedTypes:HS,render:({open:e})=>(0,Ke.createElement)(et.Button,{variant:"primary",onClick:e,ref:c,"aria-describedby":w},p?(0,tt.__)("Replace"):(0,tt.__)("Select"))}),(0,Ke.createElement)("p",{id:w,hidden:!0},p?(0,tt.sprintf)((0,tt.__)("The current poster image url is %s"),p):(0,tt.__)("There is no poster image currently selected")),!!p&&(0,Ke.createElement)(et.Button,{onClick:function(){o({poster:void 0}),c.current.focus()},variant:"tertiary"},(0,tt.__)("Remove")))))),(0,Ke.createElement)("figure",{...x},(0,Ke.createElement)(et.Disabled,{isDisabled:!t},(0,Ke.createElement)("video",{controls:u,poster:p,src:d,ref:s},(0,Ke.createElement)(xS,{tracks:g}))),h&&(0,Ke.createElement)(et.Spinner,null),(0,Ke.createElement)(Qt,{attributes:n,setAttributes:o,isSelected:t,insertBlocksAfter:r,label:(0,tt.__)("Video caption text"),showToolbarButton:t})))};const DS={from:[{type:"files",isMatch:e=>1===e.length&&0===e[0].type.indexOf("video/"),transform(e){const t=e[0];return(0,Qe.createBlock)("core/video",{src:(0,It.createBlobURL)(t)})}},{type:"shortcode",tag:"video",attributes:{src:{type:"string",shortcode:({named:{src:e,mp4:t,m4v:n,webm:a,ogv:o,flv:r}})=>e||t||n||a||o||r},poster:{type:"string",shortcode:({named:{poster:e}})=>e},loop:{type:"string",shortcode:({named:{loop:e}})=>e},autoplay:{type:"string",shortcode:({named:{autoplay:e}})=>e},preload:{type:"string",shortcode:({named:{preload:e}})=>e}}},{type:"raw",isMatch:e=>"P"===e.nodeName&&1===e.children.length&&"VIDEO"===e.firstChild.nodeName,transform:e=>{const t=e.firstChild,n={autoplay:!!t.hasAttribute("autoplay")||void 0,controls:!!t.hasAttribute("controls")&&void 0,loop:!!t.hasAttribute("loop")||void 0,muted:!!t.hasAttribute("muted")||void 0,preload:t.getAttribute("preload")||void 0,playsInline:!!t.hasAttribute("playsinline")||void 0,poster:t.getAttribute("poster")||void 0,src:t.getAttribute("src")||void 0};return(0,Qe.createBlock)("core/video",n)}}]},FS=DS,VS={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/video",title:"Video",category:"media",description:"Embed a video from your media library or upload a new one.",keywords:["movie"],textdomain:"default",attributes:{autoplay:{type:"boolean",source:"attribute",selector:"video",attribute:"autoplay"},caption:{type:"rich-text",source:"rich-text",selector:"figcaption",__experimentalRole:"content"},controls:{type:"boolean",source:"attribute",selector:"video",attribute:"controls",default:!0},id:{type:"number",__experimentalRole:"content"},loop:{type:"boolean",source:"attribute",selector:"video",attribute:"loop"},muted:{type:"boolean",source:"attribute",selector:"video",attribute:"muted"},poster:{type:"string",source:"attribute",selector:"video",attribute:"poster"},preload:{type:"string",source:"attribute",selector:"video",attribute:"preload",default:"metadata"},src:{type:"string",source:"attribute",selector:"video",attribute:"src",__experimentalRole:"content"},playsInline:{type:"boolean",source:"attribute",selector:"video",attribute:"playsinline"},tracks:{__experimentalRole:"content",type:"array",items:{type:"object"},default:[]}},supports:{anchor:!0,align:!0,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-video-editor",style:"wp-block-video"},{name:$S}=VS,OS={icon:kS,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/c/ca/Wood_thrush_in_Central_Park_switch_sides_%2816510%29.webm",caption:(0,tt.__)("Wood thrush singing in Central Park, NYC.")}},transforms:FS,deprecated:CS,edit:LS,save:function({attributes:e}){const{autoplay:t,caption:n,controls:a,loop:o,muted:r,poster:l,preload:i,src:s,playsInline:c,tracks:m}=e;return(0,Ke.createElement)("figure",{...nt.useBlockProps.save()},s&&(0,Ke.createElement)("video",{autoPlay:t,controls:a,loop:o,muted:r,poster:l,preload:"metadata"!==i?i:void 0,src:s,playsInline:c},(0,Ke.createElement)(xS,{tracks:m})),!nt.RichText.isEmpty(n)&&(0,Ke.createElement)(nt.RichText.Content,{className:(0,nt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:n}))}},GS=()=>Xe({name:$S,metadata:VS,settings:OS});const US={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let qS;const jS=new Uint8Array(16);function WS(){if(!qS&&(qS="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!qS))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return qS(jS)}const ZS=[];for(let e=0;e<256;++e)ZS.push((e+256).toString(16).slice(1));function QS(e,t=0){return ZS[e[t+0]]+ZS[e[t+1]]+ZS[e[t+2]]+ZS[e[t+3]]+"-"+ZS[e[t+4]]+ZS[e[t+5]]+"-"+ZS[e[t+6]]+ZS[e[t+7]]+"-"+ZS[e[t+8]]+ZS[e[t+9]]+"-"+ZS[e[t+10]]+ZS[e[t+11]]+ZS[e[t+12]]+ZS[e[t+13]]+ZS[e[t+14]]+ZS[e[t+15]]}const KS=function(e,t,n){if(US.randomUUID&&!t&&!e)return US.randomUUID();const a=(e=e||{}).random||(e.rng||WS)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=a[e];return t}return QS(a)},{usesContextKey:YS}=Ft(nt.privateApis),JS="core/footnote",XS="core/post-content",eB={title:(0,tt.__)("Footnote"),tagName:"sup",className:"fn",attributes:{"data-fn":"data-fn"},interactive:!0,contentEditable:!1,[YS]:["postType","postId"],edit:function({value:e,onChange:t,isObjectActive:n,context:{postType:a,postId:o}}){const r=(0,gt.useRegistry)(),{getSelectedBlockClientId:l,getBlocks:i,getBlockRootClientId:s,getBlockName:c,getBlockParentsByBlockName:m}=r.select(nt.store),u=(0,gt.useSelect)((e=>{if(!e(Qe.store).getBlockType("core/footnotes"))return!1;const t=e(nt.store).getSettings().allowedBlockTypes;if(!1===t||Array.isArray(t)&&!t.includes("core/footnotes"))return!1;const n=e(dt.store).getEntityRecord("postType",a,o);if("string"!=typeof n?.meta?.footnotes)return!1;const{getBlockParentsByBlockName:r,getSelectedBlockClientId:l}=e(nt.store),i=r(l(),"core/block");return!i||0===i.length}),[a,o]),{selectionChange:p,insertBlock:d}=(0,gt.useDispatch)(nt.store);if(!u)return null;return(0,Ke.createElement)(nt.RichTextToolbarButton,{icon:Wp,title:(0,tt.__)("Footnote"),onClick:function(){r.batch((()=>{let a;if(n){const t=e.replacements[e.start];a=t?.attributes?.["data-fn"]}else{a=KS();const n=(0,Rn.insertObject)(e,{type:JS,attributes:{"data-fn":a},innerHTML:`<a href="#${a}" id="${a}-link">*</a>`},e.end,e.end);n.start=n.end-1,t(n)}const o=l(),r=m(o,XS);let u=null;{const e=[...r.length?i(r[0]):i()];for(;e.length;){const t=e.shift();if("core/footnotes"===t.name){u=t;break}e.push(...t.innerBlocks)}}if(!u){let e=s(o);for(;e&&c(e)!==XS;)e=s(e);u=(0,Qe.createBlock)("core/footnotes"),d(u,void 0,e)}p(u.clientId,a,0,0)}))},isActive:n})}},tB={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/footnotes",title:"Footnotes",category:"text",description:"Display footnotes added to the page.",keywords:["references"],textdomain:"default",usesContext:["postId","postType"],supports:{__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!1,color:!1,width:!1,style:!1}},color:{background:!0,link:!0,text:!0,__experimentalDefaultControls:{link:!0,text:!0}},html:!1,multiple:!1,reusable:!1,inserter:!1,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-footnotes"},{name:nB}=tB,aB={icon:Wp,edit:function({context:{postType:e,postId:t}}){const[n,a]=(0,dt.useEntityProp)("postType",e,"meta",t),o="string"==typeof n?.footnotes,r=n?.footnotes?JSON.parse(n.footnotes):[],l=(0,nt.useBlockProps)();return o?r.length?(0,Ke.createElement)("ol",{...l},r.map((({id:e,content:t})=>(0,Ke.createElement)("li",{key:e,onMouseDown:e=>{e.target===e.currentTarget&&(e.target.firstElementChild.focus(),e.preventDefault())}},(0,Ke.createElement)(nt.RichText,{id:e,tagName:"span",value:t,identifier:e,onFocus:e=>{e.target.textContent.trim()||e.target.scrollIntoView()},onChange:t=>{a({...n,footnotes:JSON.stringify(r.map((n=>n.id===e?{content:t,id:e}:n)))})}})," ",(0,Ke.createElement)("a",{href:`#${e}-link`},"↩︎"))))):(0,Ke.createElement)("div",{...l},(0,Ke.createElement)(et.Placeholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:Wp}),label:(0,tt.__)("Footnotes"),instructions:(0,tt.__)("Footnotes found in blocks within this document will be displayed here.")})):(0,Ke.createElement)("div",{...l},(0,Ke.createElement)(et.Placeholder,{icon:(0,Ke.createElement)(nt.BlockIcon,{icon:Wp}),label:(0,tt.__)("Footnotes"),instructions:(0,tt.__)("Footnotes are not supported here. Add this block to post or page content.")}))}};(0,Rn.registerFormatType)(JS,eB);const oB=()=>{Xe({name:nB,metadata:tB,settings:aB})};var rB=n(2321),lB=n.n(rB);const iB=()=>(()=>{const n=[te,F,H,R,O,G,Be,e,o,r,l,i,s,m,u,p,g,S,B,N,T,A,D,V,$,q,j,W,Y,X,ee,J,ye,ve,Ne,Ie,Pe,Me,ze,Le,De,Fe,Ve,Oe,qe,je,We,Ze,Z,Q,K,Re,He,Ae,fe,Ge,t,_e,ue,pe,ce,ne,ae,re,le,se,me,he,de,ge,be,xe,we,Ee,Ce,ke,Te,d,h,b,_,y,v,f,C,x,w,E,k,ie,$e,L,U,Ue,Se,oe];return window?.__experimentalEnableFormBlocks&&(n.push(I),n.push(P),n.push(M),n.push(z)),window?.wp?.oldEditor&&(window?.wp?.needsClassicBlock||!window?.__experimentalDisableTinymce||new URLSearchParams(window?.location?.search).get("requiresTinymce"))&&n.push(c),n.filter(Boolean)})().filter((({metadata:e})=>!lB()(e))),sB=(e=iB())=>{e.forEach((({init:e})=>e())),(0,Qe.setDefaultBlockName)(x_),window.wp&&window.wp.oldEditor&&e.some((({name:e})=>e===da))&&(0,Qe.setFreeformContentHandlerName)(da),(0,Qe.setUnregisteredTypeHandlerName)(bg),(0,Qe.setGroupingBlockName)(au)},cB=void 0})(),(window.wp=window.wp||{}).blockLibrary=a})(); \ No newline at end of file
diff --git a/wp-includes/js/dist/components.js b/wp-includes/js/dist/components.js
index 2ca3181..70bfb3d 100644
--- a/wp-includes/js/dist/components.js
+++ b/wp-includes/js/dist/components.js
@@ -56545,7 +56545,7 @@ const DayButton = /*#__PURE__*/emotion_styled_base_browser_esm(build_module_butt
justify-self: end;
`, " ", props => props.disabled && `
pointer-events: none;
- `, " &&&{border-radius:100%;height:", space(8), ";width:", space(8), ";", props => props.isSelected && `
+ `, " &&&{border-radius:100%;height:", space(7), ";width:", space(7), ";", props => props.isSelected && `
background: ${COLORS.theme.accent};
color: ${COLORS.white};
`, " ", props => !props.isSelected && props.isToday && `
diff --git a/wp-includes/js/dist/components.min.js b/wp-includes/js/dist/components.min.js
index aa19ce9..95bc414 100644
--- a/wp-includes/js/dist/components.min.js
+++ b/wp-includes/js/dist/components.min.js
@@ -45,7 +45,7 @@
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
-function li(e){return"[object Object]"===Object.prototype.toString.call(e)}function ci(e){var t,n;return!1!==li(e)&&(void 0===(t=e.constructor)||!1!==li(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}const ui=function(e,t){const n=(0,Uo.useRef)(!1);(0,Uo.useEffect)((()=>{if(n.current)return e();n.current=!0}),t)},di=(0,Uo.createContext)({}),fi=()=>(0,Uo.useContext)(di);const mi=(0,Uo.memo)((({children:e,value:t})=>{const n=function({value:e}){const t=fi(),n=(0,Uo.useRef)(e);return ui((()=>{si()(n.current,e)&&n.current}),[e]),(0,Uo.useMemo)((()=>ii()(null!=t?t:{},null!=e?e:{},{isMergeableObject:ci})),[t,e])}({value:t});return(0,r.createElement)(di.Provider,{value:n},e)})),pi="data-wp-component",hi="data-wp-c16t",gi="__contextSystemKey__";var vi=function(){return vi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},vi.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function bi(e){return e.toLowerCase()}var yi=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],xi=/[^A-Z0-9]+/gi;function wi(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function Ei(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,r=void 0===n?yi:n,o=t.stripRegexp,i=void 0===o?xi:o,a=t.transform,s=void 0===a?bi:a,l=t.delimiter,c=void 0===l?" ":l,u=wi(wi(e,r,"$1\0$2"),i,"\0"),d=0,f=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(f-1);)f--;return u.slice(d,f).split("\0").map(s).join(c)}(e,vi({delimiter:"."},t))}function _i(e,t){return void 0===t&&(t={}),Ei(e,vi({delimiter:"-"},t))}function Si(e,t){var n,r,o=0;function i(){var i,a,s=n,l=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(a=0;a<l;a++)if(s.args[a]!==arguments[a]){s=s.next;continue e}return s!==n&&(s===r&&(r=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=n,s.prev=null,n.prev=s,n=s),s.val}s=s.next}for(i=new Array(l),a=0;a<l;a++)i[a]=arguments[a];return s={args:i,val:e.apply(null,i)},n?(n.prev=s,s.next=n):r=s,o===t.maxSize?(r=r.prev).next=null:o++,n=s,s.val}return t=t||{},i.clear=function(){n=null,r=null,o=0},i}const Ci=Si((function(e){return`components-${_i(e)}`}));var ki=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),Pi=Math.abs,Ti=String.fromCharCode,Ii=Object.assign;function Ri(e){return e.trim()}function Mi(e,t,n){return e.replace(t,n)}function Ni(e,t){return e.indexOf(t)}function Di(e,t){return 0|e.charCodeAt(t)}function Ai(e,t,n){return e.slice(t,n)}function Oi(e){return e.length}function zi(e){return e.length}function Li(e,t){return t.push(e),e}var Fi=1,Bi=1,ji=0,Vi=0,Hi=0,$i="";function Wi(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Fi,column:Bi,length:a,return:""}}function Ui(e,t){return Ii(Wi("",null,null,"",null,null,0),e,{length:-e.length},t)}function Gi(){return Hi=Vi>0?Di($i,--Vi):0,Bi--,10===Hi&&(Bi=1,Fi--),Hi}function qi(){return Hi=Vi<ji?Di($i,Vi++):0,Bi++,10===Hi&&(Bi=1,Fi++),Hi}function Yi(){return Di($i,Vi)}function Ki(){return Vi}function Xi(e,t){return Ai($i,e,t)}function Zi(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ji(e){return Fi=Bi=1,ji=Oi($i=e),Vi=0,[]}function Qi(e){return $i="",e}function ea(e){return Ri(Xi(Vi-1,ra(91===e?e+2:40===e?e+1:e)))}function ta(e){for(;(Hi=Yi())&&Hi<33;)qi();return Zi(e)>2||Zi(Hi)>3?"":" "}function na(e,t){for(;--t&&qi()&&!(Hi<48||Hi>102||Hi>57&&Hi<65||Hi>70&&Hi<97););return Xi(e,Ki()+(t<6&&32==Yi()&&32==qi()))}function ra(e){for(;qi();)switch(Hi){case e:return Vi;case 34:case 39:34!==e&&39!==e&&ra(Hi);break;case 40:41===e&&ra(e);break;case 92:qi()}return Vi}function oa(e,t){for(;qi()&&e+Hi!==57&&(e+Hi!==84||47!==Yi()););return"/*"+Xi(t,Vi-1)+"*"+Ti(47===e?e:qi())}function ia(e){for(;!Zi(Yi());)qi();return Xi(e,Vi)}var aa="-ms-",sa="-moz-",la="-webkit-",ca="comm",ua="rule",da="decl",fa="@keyframes";function ma(e,t){for(var n="",r=zi(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function pa(e,t,n,r){switch(e.type){case"@import":case da:return e.return=e.return||e.value;case ca:return"";case fa:return e.return=e.value+"{"+ma(e.children,r)+"}";case ua:e.value=e.props.join(",")}return Oi(n=ma(e.children,r))?e.return=e.value+"{"+n+"}":""}function ha(e){return Qi(ga("",null,null,null,[""],e=Ji(e),0,[0],e))}function ga(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,m=0,p=0,h=1,g=1,v=1,b=0,y="",x=o,w=i,E=r,_=y;g;)switch(p=b,b=qi()){case 40:if(108!=p&&58==Di(_,d-1)){-1!=Ni(_+=Mi(ea(b),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:_+=ea(b);break;case 9:case 10:case 13:case 32:_+=ta(p);break;case 92:_+=na(Ki()-1,7);continue;case 47:switch(Yi()){case 42:case 47:Li(ba(oa(qi(),Ki()),t,n),l);break;default:_+="/"}break;case 123*h:s[c++]=Oi(_)*v;case 125*h:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:m>0&&Oi(_)-d&&Li(m>32?ya(_+";",r,n,d-1):ya(Mi(_," ","")+";",r,n,d-2),l);break;case 59:_+=";";default:if(Li(E=va(_,t,n,c,u,o,s,y,x=[],w=[],d),i),123===b)if(0===u)ga(_,t,E,E,x,i,d,s,w);else switch(99===f&&110===Di(_,3)?100:f){case 100:case 109:case 115:ga(e,E,E,r&&Li(va(e,E,E,0,0,o,s,y,o,x=[],d),w),o,w,d,s,r?x:w);break;default:ga(_,E,E,E,[""],w,0,s,w)}}c=u=m=0,h=v=1,y=_="",d=a;break;case 58:d=1+Oi(_),m=p;default:if(h<1)if(123==b)--h;else if(125==b&&0==h++&&125==Gi())continue;switch(_+=Ti(b),b*h){case 38:v=u>0?1:(_+="\f",-1);break;case 44:s[c++]=(Oi(_)-1)*v,v=1;break;case 64:45===Yi()&&(_+=ea(qi())),f=Yi(),u=d=Oi(y=_+=ia(Ki())),b++;break;case 45:45===p&&2==Oi(_)&&(h=0)}}return i}function va(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,f=0===o?i:[""],m=zi(f),p=0,h=0,g=0;p<r;++p)for(var v=0,b=Ai(e,d+1,d=Pi(h=a[p])),y=e;v<m;++v)(y=Ri(h>0?f[v]+" "+b:Mi(b,/&\f/g,f[v])))&&(l[g++]=y);return Wi(e,t,n,0===o?ua:s,l,c,u)}function ba(e,t,n){return Wi(e,t,n,ca,Ti(Hi),Ai(e,2,-2),0)}function ya(e,t,n,r){return Wi(e,t,n,da,Ai(e,0,r),Ai(e,r+1,-1),r)}var xa=function(e,t,n){for(var r=0,o=0;r=o,o=Yi(),38===r&&12===o&&(t[n]=1),!Zi(o);)qi();return Xi(e,Vi)},wa=function(e,t){return Qi(function(e,t){var n=-1,r=44;do{switch(Zi(r)){case 0:38===r&&12===Yi()&&(t[n]=1),e[n]+=xa(Vi-1,t,n);break;case 2:e[n]+=ea(r);break;case 4:if(44===r){e[++n]=58===Yi()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Ti(r)}}while(r=qi());return e}(Ji(e),t))},Ea=new WeakMap,_a=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Ea.get(n))&&!r){Ea.set(e,!0);for(var o=[],i=wa(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},Sa=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Ca(e,t){switch(function(e,t){return 45^Di(e,0)?(((t<<2^Di(e,0))<<2^Di(e,1))<<2^Di(e,2))<<2^Di(e,3):0}(e,t)){case 5103:return la+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return la+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return la+e+sa+e+aa+e+e;case 6828:case 4268:return la+e+aa+e+e;case 6165:return la+e+aa+"flex-"+e+e;case 5187:return la+e+Mi(e,/(\w+).+(:[^]+)/,la+"box-$1$2"+aa+"flex-$1$2")+e;case 5443:return la+e+aa+"flex-item-"+Mi(e,/flex-|-self/,"")+e;case 4675:return la+e+aa+"flex-line-pack"+Mi(e,/align-content|flex-|-self/,"")+e;case 5548:return la+e+aa+Mi(e,"shrink","negative")+e;case 5292:return la+e+aa+Mi(e,"basis","preferred-size")+e;case 6060:return la+"box-"+Mi(e,"-grow","")+la+e+aa+Mi(e,"grow","positive")+e;case 4554:return la+Mi(e,/([^-])(transform)/g,"$1"+la+"$2")+e;case 6187:return Mi(Mi(Mi(e,/(zoom-|grab)/,la+"$1"),/(image-set)/,la+"$1"),e,"")+e;case 5495:case 3959:return Mi(e,/(image-set\([^]*)/,la+"$1$`$1");case 4968:return Mi(Mi(e,/(.+:)(flex-)?(.*)/,la+"box-pack:$3"+aa+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+la+e+e;case 4095:case 3583:case 4068:case 2532:return Mi(e,/(.+)-inline(.+)/,la+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Oi(e)-1-t>6)switch(Di(e,t+1)){case 109:if(45!==Di(e,t+4))break;case 102:return Mi(e,/(.+:)(.+)-([^]+)/,"$1"+la+"$2-$3$1"+sa+(108==Di(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Ni(e,"stretch")?Ca(Mi(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Di(e,t+1))break;case 6444:switch(Di(e,Oi(e)-3-(~Ni(e,"!important")&&10))){case 107:return Mi(e,":",":"+la)+e;case 101:return Mi(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+la+(45===Di(e,14)?"inline-":"")+"box$3$1"+la+"$2$3$1"+aa+"$2box$3")+e}break;case 5936:switch(Di(e,t+11)){case 114:return la+e+aa+Mi(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return la+e+aa+Mi(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return la+e+aa+Mi(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return la+e+aa+e+e}return e}var ka=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case da:e.return=Ca(e.value,e.length);break;case fa:return ma([Ui(e,{value:Mi(e.value,"@","@"+la)})],r);case ua:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ma([Ui(e,{props:[Mi(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return ma([Ui(e,{props:[Mi(t,/:(plac\w+)/,":"+la+"input-$1")]}),Ui(e,{props:[Mi(t,/:(plac\w+)/,":-moz-$1")]}),Ui(e,{props:[Mi(t,/:(plac\w+)/,aa+"input-$1")]})],r)}return""}))}}];const Pa=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||ka;var o,i,a={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,c,u,d,f=[pa,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],m=(c=[_a,Sa].concat(r,f),u=zi(c),function(e,t,n,r){for(var o="",i=0;i<u;i++)o+=c[i](e,t,n,r)||"";return o});i=function(e,t,n,r){l=n,function(e){ma(ha(e),m)}(e?e+"{"+t.styles+"}":t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new ki({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return p.sheet.hydrate(s),p};const Ta=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};const Ia={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Ra(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Ma=/[A-Z]|^ms/g,Na=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Da=function(e){return 45===e.charCodeAt(1)},Aa=function(e){return null!=e&&"boolean"!=typeof e},Oa=Ra((function(e){return Da(e)?e:e.replace(Ma,"-$&").toLowerCase()})),za=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Na,(function(e,t,n){return Fa={name:t,styles:n,next:Fa},t}))}return 1===Ia[e]||Da(e)||"number"!=typeof t||0===t?t:t+"px"};function La(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Fa={name:n.name,styles:n.styles,next:Fa},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Fa={name:r.name,styles:r.styles,next:Fa},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=La(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":Aa(a)&&(r+=Oa(i)+":"+za(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=La(e,t,a);switch(i){case"animation":case"animationName":r+=Oa(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var l=0;l<a.length;l++)Aa(a[l])&&(r+=Oa(i)+":"+za(i,a[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=Fa,i=n(e);return Fa=o,La(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var Fa,Ba=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var ja=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Fa=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=La(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=La(n,t,e[a]),r&&(o+=i[a]);Ba.lastIndex=0;for(var s,l="";null!==(s=Ba.exec(o));)l+="-"+s[1];return{name:Ta(o)+l,styles:o,next:Fa}},Va=!!r.useInsertionEffect&&r.useInsertionEffect,Ha=Va||function(e){return e()},$a=(0,r.createContext)("undefined"!=typeof HTMLElement?Pa({key:"css"}):null);var Wa=$a.Provider,Ua=function(e){return(0,r.forwardRef)((function(t,n){var o=(0,r.useContext)($a);return e(t,o,n)}))},Ga=(0,r.createContext)({});function qa(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var Ya=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Ka=function(e,t,n){Ya(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0);o=o.next}while(void 0!==o)}};function Xa(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function Za(e,t,n){var r=[],o=qa(e,r,n);return r.length<2?n:o+t(r)}var Ja=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(null!=o){var i=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var a in i="",o)o[a]&&a&&(i&&(i+=" "),i+=a);break;default:i=o}i&&(n&&(n+=" "),n+=i)}}return n};const Qa=function(e){var t=Pa(e);t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=ja(n,t.registered,void 0);return Ka(t,o,!1),t.key+"-"+o.name};return{css:n,cx:function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return Za(t.registered,n,Ja(r))},injectGlobal:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=ja(n,t.registered);Xa(t,o)},keyframes:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=ja(n,t.registered),i="animation-"+o.name;return Xa(t,{name:o.name,styles:"@keyframes "+i+"{"+o.styles+"}"}),i},hydrate:function(e){e.forEach((function(e){t.inserted[e]=!0}))},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:qa.bind(null,t.registered),merge:Za.bind(null,t.registered,n)}};var es=Qa({key:"css"}),ts=(es.flush,es.hydrate,es.cx);es.merge,es.getRegisteredStyles,es.injectGlobal,es.keyframes,es.css,es.sheet,es.cache;const ns=()=>{const e=(0,r.useContext)($a),t=(0,Uo.useCallback)(((...t)=>{if(null===e)throw new Error("The `useCx` hook should be only used within a valid Emotion Cache Context");return ts(...t.map((t=>(e=>null!=e&&["name","styles"].every((t=>void 0!==e[t])))(t)?(Ka(e,t,!1),`${e.key}-${t.name}`):t)))}),[e]);return t};function rs(e,t){const n=fi(),r=n?.[t]||{},o={[hi]:!0,...(i=t,{[pi]:i})};var i;const{_overrides:a,...s}=r,l=Object.entries(s).length?Object.assign({},s,e):e,c=ns()(Ci(t),e.className),u="function"==typeof l.renderChildren?l.renderChildren(l):l.children;for(const e in l)o[e]=l[e];for(const e in a)o[e]=a[e];return void 0!==u&&(o.children=u),o.className=c,o}function os(e,t){return as(e,t,{forwardsRef:!0})}function is(e,t){return as(e,t)}function as(e,t,n){const r=n?.forwardsRef?(0,Uo.forwardRef)(e):e;let o=r[gi]||[t];return Array.isArray(t)&&(o=[...o,...t]),"string"==typeof t&&(o=[...o,t]),Object.assign(r,{[gi]:[...new Set(o)],displayName:t,selector:`.${Ci(t)}`})}function ss(e){if(!e)return[];let t=[];return e[gi]&&(t=e[gi]),e.type&&e.type[gi]&&(t=e.type[gi]),t}function ls(e,t){return!!e&&("string"==typeof t?ss(e).includes(t):!!Array.isArray(t)&&t.some((t=>ss(e).includes(t))))}const cs={border:0,clip:"rect(1px, 1px, 1px, 1px)",WebkitClipPath:"inset( 50% )",clipPath:"inset( 50% )",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",wordWrap:"normal"};function us(){return us=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},us.apply(this,arguments)}function ds(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var fs=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,ms=ds((function(e){return fs.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),ps=function(e){return"theme"!==e},hs=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?ms:ps},gs=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},vs=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;Ya(t,n,r);Ha((function(){return Ka(t,n,r)}));return null};const bs=function e(t,n){var o,i,a=t.__emotion_real===t,s=a&&t.__emotion_base||t;void 0!==n&&(o=n.label,i=n.target);var l=gs(t,n,a),c=l||hs(s),u=!c("as");return function(){var d=arguments,f=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&f.push("label:"+o+";"),null==d[0]||void 0===d[0].raw)f.push.apply(f,d);else{0,f.push(d[0][0]);for(var m=d.length,p=1;p<m;p++)f.push(d[p],d[0][p])}var h=Ua((function(e,t,n){var o=u&&e.as||s,a="",d=[],m=e;if(null==e.theme){for(var p in m={},e)m[p]=e[p];m.theme=(0,r.useContext)(Ga)}"string"==typeof e.className?a=qa(t.registered,d,e.className):null!=e.className&&(a=e.className+" ");var h=ja(f.concat(d),t.registered,m);a+=t.key+"-"+h.name,void 0!==i&&(a+=" "+i);var g=u&&void 0===l?hs(o):c,v={};for(var b in e)u&&"as"===b||g(b)&&(v[b]=e[b]);return v.className=a,v.ref=n,(0,r.createElement)(r.Fragment,null,(0,r.createElement)(vs,{cache:t,serialized:h,isStringTag:"string"==typeof o}),(0,r.createElement)(o,v))}));return h.displayName=void 0!==o?o:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=s,h.__emotion_styles=f,h.__emotion_forwardProp=l,Object.defineProperty(h,"toString",{value:function(){return"."+i}}),h.withComponent=function(t,r){return e(t,us({},n,r,{shouldForwardProp:gs(h,r,!0)})).apply(void 0,f)},h}},ys=bs("div",{target:"e19lxcc00"})("");ys.selector=".components-view",ys.displayName="View";const xs=ys;const ws=os((function(e,t){const{style:n,...o}=rs(e,"VisuallyHidden");return(0,r.createElement)(xs,{ref:t,...o,style:{...cs,...n||{}}})}),"VisuallyHidden"),Es=[["top left","top center","top right"],["center left","center center","center right"],["bottom left","bottom center","bottom right"]],_s={"top left":(0,u.__)("Top Left"),"top center":(0,u.__)("Top Center"),"top right":(0,u.__)("Top Right"),"center left":(0,u.__)("Center Left"),"center center":(0,u.__)("Center"),center:(0,u.__)("Center"),"center right":(0,u.__)("Center Right"),"bottom left":(0,u.__)("Bottom Left"),"bottom center":(0,u.__)("Bottom Center"),"bottom right":(0,u.__)("Bottom Right")},Ss=Es.flat();function Cs(e){const t="center"===e?"center center":e,n=t?.replace("-"," ");return Ss.includes(n)?n:void 0}function ks(e,t){const n=Cs(t);if(!n)return;return`${e}-${n.replace(" ","-")}`}o(1880);function Ps(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ja(t)}var Ts=function(){var e=Ps.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};const Is="#fff",Rs={900:"#1e1e1e",800:"#2f2f2f",700:"#757575",600:"#949494",400:"#ccc",300:"#ddd",200:"#e0e0e0",100:"#f0f0f0"},Ms={accent:"var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9))",accentDarker10:"var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #2145e6))",accentDarker20:"var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6))",accentInverted:`var(--wp-components-color-accent-inverted, ${Is})`,background:`var(--wp-components-color-background, ${Is})`,foreground:`var(--wp-components-color-foreground, ${Rs[900]})`,foregroundInverted:`var(--wp-components-color-foreground-inverted, ${Is})`,gray:{900:`var(--wp-components-color-foreground, ${Rs[900]})`,800:`var(--wp-components-color-gray-800, ${Rs[800]})`,700:`var(--wp-components-color-gray-700, ${Rs[700]})`,600:`var(--wp-components-color-gray-600, ${Rs[600]})`,400:`var(--wp-components-color-gray-400, ${Rs[400]})`,300:`var(--wp-components-color-gray-300, ${Rs[300]})`,200:`var(--wp-components-color-gray-200, ${Rs[200]})`,100:`var(--wp-components-color-gray-100, ${Rs[100]})`}},Ns={background:Ms.background,backgroundDisabled:Ms.gray[100],border:Ms.gray[600],borderHover:Ms.gray[700],borderFocus:Ms.accent,borderDisabled:Ms.gray[400],textDisabled:Ms.gray[600],darkGrayPlaceholder:`color-mix(in srgb, ${Ms.foreground}, transparent 38%)`,lightGrayPlaceholder:`color-mix(in srgb, ${Ms.background}, transparent 35%)`},Ds=Object.freeze({gray:Rs,white:Is,alert:{yellow:"#f0b849",red:"#d94f4f",green:"#4ab866"},theme:Ms,ui:Ns});function As(e="transition"){let t;switch(e){case"transition":t="transition-duration: 0ms;";break;case"animation":t="animation-duration: 1ms;";break;default:t="\n\t\t\t\tanimation-duration: 1ms;\n\t\t\t\ttransition-duration: 0ms;\n\t\t\t"}return`\n\t\t@media ( prefers-reduced-motion: reduce ) {\n\t\t\t${t};\n\t\t}\n\t`}var Os={name:"93uojk",styles:"border-radius:2px;box-sizing:border-box;direction:ltr;display:grid;grid-template-columns:repeat( 3, 1fr );outline:none"};const zs=()=>Os,Ls=bs("div",{target:"ecapk1j3"})(zs,";border:1px solid transparent;cursor:pointer;grid-template-columns:auto;",(({size:e=92})=>Ps("grid-template-rows:repeat( 3, calc( ",e,"px / 3 ) );width:",e,"px;","")),";"),Fs=bs("div",{target:"ecapk1j2"})({name:"1x5gbbj",styles:"box-sizing:border-box;display:grid;grid-template-columns:repeat( 3, 1fr )"}),Bs=e=>Ps("background:currentColor;box-sizing:border-box;display:grid;margin:auto;transition:all 120ms linear;",As("transition")," ",(({isActive:e})=>Ps("box-shadow:",e?`0 0 0 2px ${Ds.gray[900]}`:null,";color:",e?Ds.gray[900]:Ds.gray[400],";*:hover>&{color:",e?Ds.gray[900]:Ds.theme.accent,";}",""))(e),";",""),js=bs("span",{target:"ecapk1j1"})("height:6px;width:6px;",Bs,";"),Vs=bs("span",{target:"ecapk1j0"})({name:"rjf3ub",styles:"appearance:none;border:none;box-sizing:border-box;margin:0;display:flex;position:relative;outline:none;align-items:center;justify-content:center;padding:0"});function Hs({id:e,isActive:t=!1,value:n,...o}){const i=_s[n];return(0,r.createElement)(ri,{text:i},(0,r.createElement)(qt,{id:e,render:(0,r.createElement)(Vs,{...o,role:"gridcell"})},(0,r.createElement)(ws,null,n),(0,r.createElement)(js,{isActive:t,role:"presentation"})))}function $s(e,t,n){return Ce(t,[n.store]),Ht(e,n,"items","setItems"),e}function Ws(e){const t=e.map(((e,t)=>[t,e]));let n=!1;return t.sort((([e,t],[r,o])=>{const i=t.element,a=o.element;return i===a?0:i&&a?function(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}(i,a)?(e>r&&(n=!0),-1):(e<r&&(n=!0),1):0})),n?t.map((([e,t])=>t)):e}function Us(e={}){var t;e.store;const n=null==(t=e.store)?void 0:t.getState(),r=V(e.items,null==n?void 0:n.items,e.defaultItems,[]),o=new Map(r.map((e=>[e.id,e]))),i={items:r,renderedItems:V(null==n?void 0:n.renderedItems,[])},a=null==(s=e.store)?void 0:s.__unstablePrivateStore;var s;const l=Rt({items:r,renderedItems:i.renderedItems},a),c=Rt(i,e.store),u=e=>{const t=Ws(e);l.setState("renderedItems",t),c.setState("renderedItems",t)};Mt(c,(()=>Nt(l))),Mt(l,(()=>Ot(l,["items"],(e=>{c.setState("items",e.items)})))),Mt(l,(()=>Ot(l,["renderedItems"],(e=>{let t=!0,n=requestAnimationFrame((()=>{const{renderedItems:t}=c.getState();e.renderedItems!==t&&u(e.renderedItems)}));if("function"!=typeof IntersectionObserver)return()=>cancelAnimationFrame(n);const r=function(e){var t;const n=e.find((e=>!!e.element)),r=[...e].reverse().find((e=>!!e.element));let o=null==(t=null==n?void 0:n.element)?void 0:t.parentElement;for(;o&&(null==r?void 0:r.element);){if(r&&o.contains(r.element))return o;o=o.parentElement}return G(o).body}(e.renderedItems),o=new IntersectionObserver((()=>{t?t=!1:(cancelAnimationFrame(n),n=requestAnimationFrame((()=>u(e.renderedItems))))}),{root:r});for(const t of e.renderedItems)t.element&&o.observe(t.element);return()=>{cancelAnimationFrame(n),o.disconnect()}}))));const d=(e,t,n=!1)=>{let r;t((t=>{const n=t.findIndex((({id:t})=>t===e.id)),i=t.slice();if(-1!==n){r=t[n];const a=R(R({},r),e);i[n]=a,o.set(e.id,a)}else i.push(e),o.set(e.id,e);return i}));return()=>{t((t=>{if(!r)return n&&o.delete(e.id),t.filter((({id:t})=>t!==e.id));const i=t.findIndex((({id:t})=>t===e.id));if(-1===i)return t;const a=t.slice();return a[i]=r,o.set(e.id,r),a}))}},f=e=>d(e,(e=>l.setState("items",e)),!0);return M(R({},c),{registerItem:f,renderItem:e=>z(f(e),d(e,(e=>l.setState("renderedItems",e)))),item:e=>{if(!e)return null;let t=o.get(e);if(!t){const{items:n}=c.getState();t=n.find((t=>t.id===e)),t&&o.set(e,t)}return t||null},__unstablePrivateStore:l})}function Gs(e){const t=[];for(const n of e)t.push(...n);return t}function qs(e){return e.slice().reverse()}var Ys={id:null};function Ks(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}function Xs(e,t){return e.filter((e=>e.rowId===t))}function Zs(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}function Js(e){let t=0;for(const{length:n}of e)n>t&&(t=n);return t}function Qs(e,t,n){const r=Js(e);for(const o of e)for(let e=0;e<r;e+=1){const r=o[e];if(!r||n&&r.disabled){const r=0===e&&n?Ks(o):o[e-1];o[e]=r&&t!==r.id&&n?r:{id:"__EMPTY_ITEM__",disabled:!0,rowId:null==r?void 0:r.rowId}}}return e}function el(e){const t=Zs(e),n=Js(t),r=[];for(let e=0;e<n;e+=1)for(const n of t){const t=n[e];t&&r.push(M(R({},t),{rowId:t.rowId?`${e}`:void 0}))}return r}function tl(e={}){var t;const n=null==(t=e.store)?void 0:t.getState(),r=Us(e),o=V(e.activeId,null==n?void 0:n.activeId,e.defaultActiveId),i=Rt(M(R({},r.getState()),{activeId:o,baseElement:V(null==n?void 0:n.baseElement,null),includesBaseElement:V(e.includesBaseElement,null==n?void 0:n.includesBaseElement,null===o),moves:V(null==n?void 0:n.moves,0),orientation:V(e.orientation,null==n?void 0:n.orientation,"both"),rtl:V(e.rtl,null==n?void 0:n.rtl,!1),virtualFocus:V(e.virtualFocus,null==n?void 0:n.virtualFocus,!1),focusLoop:V(e.focusLoop,null==n?void 0:n.focusLoop,!1),focusWrap:V(e.focusWrap,null==n?void 0:n.focusWrap,!1),focusShift:V(e.focusShift,null==n?void 0:n.focusShift,!1)}),r,e.store);Mt(i,(()=>At(i,["renderedItems","activeId"],(e=>{i.setState("activeId",(t=>{var n;return void 0!==t?t:null==(n=Ks(e.renderedItems))?void 0:n.id}))}))));const a=(e,t,n,r)=>{var o,a;const{activeId:s,rtl:l,focusLoop:c,focusWrap:u,includesBaseElement:d}=i.getState(),f=l&&"vertical"!==t?qs(e):e;if(null==s)return null==(o=Ks(f))?void 0:o.id;const m=f.find((e=>e.id===s));if(!m)return null==(a=Ks(f))?void 0:a.id;const p=!!m.rowId,h=f.indexOf(m),g=f.slice(h+1),v=Xs(g,m.rowId);if(void 0!==r){const e=function(e,t){return e.filter((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(v,s),t=e.slice(r)[0]||e[e.length-1];return null==t?void 0:t.id}const b=function(e){return"vertical"===e?"horizontal":"horizontal"===e?"vertical":void 0}(p?t||"horizontal":t),y=c&&c!==b,x=p&&u&&u!==b;if(n=n||!p&&y&&d,y){const e=function(e,t,n=!1){const r=e.findIndex((e=>e.id===t));return[...e.slice(r+1),...n?[Ys]:[],...e.slice(0,r)]}(x&&!n?f:Xs(f,m.rowId),s,n),t=Ks(e,s);return null==t?void 0:t.id}if(x){const e=Ks(n?v:g,s);return n?(null==e?void 0:e.id)||null:null==e?void 0:e.id}const w=Ks(v,s);return!w&&n?null:null==w?void 0:w.id};return M(R(R({},r),i),{setBaseElement:e=>i.setState("baseElement",e),setActiveId:e=>i.setState("activeId",e),move:e=>{void 0!==e&&(i.setState("activeId",e),i.setState("moves",(e=>e+1)))},first:()=>{var e;return null==(e=Ks(i.getState().renderedItems))?void 0:e.id},last:()=>{var e;return null==(e=Ks(qs(i.getState().renderedItems)))?void 0:e.id},next:e=>{const{renderedItems:t,orientation:n}=i.getState();return a(t,n,!1,e)},previous:e=>{var t;const{renderedItems:n,orientation:r,includesBaseElement:o}=i.getState(),s=!!!(null==(t=Ks(n))?void 0:t.rowId)&&o;return a(qs(n),r,s,e)},down:e=>{const{activeId:t,renderedItems:n,focusShift:r,focusLoop:o,includesBaseElement:s}=i.getState(),l=r&&!e,c=el(Gs(Qs(Zs(n),t,l)));return a(c,"vertical",o&&"horizontal"!==o&&s,e)},up:e=>{const{activeId:t,renderedItems:n,focusShift:r,includesBaseElement:o}=i.getState(),s=r&&!e,l=el(qs(Gs(Qs(Zs(n),t,s))));return a(l,"vertical",o,e)}})}function nl(e,t,n){return Ht(e=$s(e,t,n),n,"activeId","setActiveId"),Ht(e,n,"includesBaseElement"),Ht(e,n,"virtualFocus"),Ht(e,n,"orientation"),Ht(e,n,"rtl"),Ht(e,n,"focusLoop"),Ht(e,n,"focusWrap"),Ht(e,n,"focusShift"),e}function rl(e={}){const[t,n]=$t(tl,e);return nl(t,n,e)}function ol(e,t,n){return we((r=>{var o;if(null==t||t(r),r.defaultPrevented)return;if(r.isPropagationStopped())return;if(!ce(r))return;if(function(e){return"Shift"===e.key||"Control"===e.key||"Alt"===e.key||"Meta"===e.key}(r))return;if(function(e){const t=e.target;return!(t&&!te(t)||1!==e.key.length||e.ctrlKey||e.metaKey)}(r))return;const i=e.getState(),a=null==(o=yt(e,i.activeId))?void 0:o.element;if(!a)return;const s=r,{view:l}=s,c=E(s,["view"]);a!==(null==n?void 0:n.current)&&a.focus(),function(e,t,n){const r=new KeyboardEvent(t,n);return e.dispatchEvent(r)}(a,r.type,c)||r.preventDefault(),r.currentTarget.contains(a)&&r.stopPropagation()}))}var il=Ve((e=>{var t=e,{store:n,composite:o=!0,focusOnMove:i=o,moveOnKeyPress:a=!0}=t,s=E(t,["store","composite","focusOnMove","moveOnKeyPress"]);const l=St();F(n=n||l,!1);const c=(0,r.useRef)(null),u=function(e){const[t,n]=(0,r.useState)(!1),o=(0,r.useCallback)((()=>n(!0)),[]),i=e.useState((t=>yt(e,t.activeId)));return(0,r.useEffect)((()=>{const e=null==i?void 0:i.element;t&&e&&(n(!1),e.focus({preventScroll:!0}))}),[i,t]),o}(n),d=n.useState("moves");(0,r.useEffect)((()=>{var e;if(!n)return;if(!d)return;if(!o)return;if(!i)return;const{activeId:t}=n.getState(),r=null==(e=yt(n,t))?void 0:e.element;r&&function(e,t){"scrollIntoView"in e?(e.focus({preventScroll:!0}),e.scrollIntoView(R({block:"nearest",inline:"nearest"},t))):e.focus()}(r)}),[n,d,o,i]),be((()=>{if(!n)return;if(!d)return;if(!o)return;const{baseElement:e,activeId:t}=n.getState();if(!(null===t))return;if(!e)return;const r=c.current;c.current=null,r&&ue(r,{relatedTarget:e}),Ze(e)||e.focus()}),[n,d,o]);const f=n.useState("activeId"),m=n.useState("virtualFocus");be((()=>{var e;if(!n)return;if(!o)return;if(!m)return;const t=c.current;if(c.current=null,!t)return;const r=(null==(e=yt(n,f))?void 0:e.element)||q(t);r!==t&&ue(t,{relatedTarget:r})}),[n,f,m,o]);const p=ol(n,s.onKeyDownCapture,c),h=ol(n,s.onKeyUpCapture,c),g=s.onFocusCapture,v=we((e=>{if(null==g||g(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:t}=n.getState();if(!t)return;const r=e.relatedTarget,o=function(e){const t=e[xt];return delete e[xt],t}(e.currentTarget);ce(e)&&o&&(e.stopPropagation(),c.current=r)})),b=s.onFocus,y=we((e=>{if(null==b||b(e),e.defaultPrevented)return;if(!o)return;if(!n)return;const{relatedTarget:t}=e,{virtualFocus:r}=n.getState();r?ce(e)&&!wt(n,t)&&queueMicrotask(u):ce(e)&&n.setActiveId(null)})),_=s.onBlurCapture,S=we((e=>{var t;if(null==_||_(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:r,activeId:o}=n.getState();if(!r)return;const i=null==(t=yt(n,o))?void 0:t.element,a=e.relatedTarget,s=wt(n,a),l=c.current;if(c.current=null,ce(e)&&s)a===i?l&&l!==a&&ue(l,e):i?ue(i,e):l&&ue(l,e),e.stopPropagation();else{!wt(n,e.target)&&i&&ue(i,e)}})),C=s.onKeyDown,k=Pe(a),P=we((e=>{var t;if(null==C||C(e),e.defaultPrevented)return;if(!n)return;if(!ce(e))return;const{orientation:r,items:o,renderedItems:i,activeId:a}=n.getState(),s=yt(n,a);if(null==(t=null==s?void 0:s.element)?void 0:t.isConnected)return;const l="horizontal"!==r,c="vertical"!==r,u=function(e){return e.some((e=>!!e.rowId))}(i);if(("ArrowLeft"===e.key||"ArrowRight"===e.key||"Home"===e.key||"End"===e.key)&&te(e.currentTarget))return;const d={ArrowUp:(u||l)&&(()=>{if(u){const e=o&&function(e){return function(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(Gs(qs(function(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}(e))))}(o);return null==e?void 0:e.id}return null==n?void 0:n.last()}),ArrowRight:(u||c)&&n.first,ArrowDown:(u||l)&&n.first,ArrowLeft:(u||c)&&n.last,Home:n.first,End:n.last,PageUp:n.first,PageDown:n.last},f=d[e.key];if(f){const t=f();if(void 0!==t){if(!k(e))return;e.preventDefault(),n.move(t)}}}));s=Te(s,(e=>(0,Le.jsx)(Ct,{value:n,children:e})),[n]);const T=n.useState((e=>{var t;if(n&&o&&e.virtualFocus)return null==(t=yt(n,e.activeId))?void 0:t.id}));s=w(x({"aria-activedescendant":T},s),{ref:Ee(o?n.setBaseElement:null,s.ref),onKeyDownCapture:p,onKeyUpCapture:h,onFocusCapture:v,onFocus:y,onBlurCapture:S,onKeyDown:P});const I=n.useState((e=>o&&(e.virtualFocus||null===e.activeId)));return s=ct(x({focusable:I},s))})),al=Fe((e=>je("div",il(e))));var sl=Ve((e=>{var t=e,{store:n,"aria-setsize":o,"aria-posinset":i}=t,a=E(t,["store","aria-setsize","aria-posinset"]);const s=_t();F(n=n||s,!1);const l=_e(a.id),c=n.useState((e=>e.baseElement||void 0)),u=(0,r.useMemo)((()=>({id:l,baseElement:c,ariaSetSize:o,ariaPosInSet:i})),[l,c,o,i]);return a=Te(a,(e=>(0,Le.jsx)(Tt.Provider,{value:u,children:e})),[u]),a=x({id:l},a)})),ll=Fe((e=>je("div",sl(e))));bs("div",{target:"erowt52"})({name:"ogl07i",styles:"box-sizing:border-box;padding:2px"});const cl=bs("div",{target:"erowt51"})("transform-origin:top left;height:100%;width:100%;",zs,";",(()=>Ps({gridTemplateRows:"repeat( 3, calc( 21px / 3))",padding:1.5,maxHeight:24,maxWidth:24},"","")),";",(({disablePointerEvents:e})=>Ps({pointerEvents:e?"none":void 0},"","")),";"),ul=bs("span",{target:"erowt50"})("height:2px;width:2px;",Bs,";",(({isActive:e})=>Ps("box-shadow:",e?"0 0 0 1px currentColor":null,";color:currentColor;*:hover>&{color:currentColor;}","")),";"),dl=Vs;const fl=function({className:e,disablePointerEvents:t=!0,size:n=24,style:o={},value:i="center",...a}){const s=function(e="center"){const t=Cs(e);if(!t)return;const n=Ss.indexOf(t);return n>-1?n:void 0}(i),l=(n/24).toFixed(2),u=c()("component-alignment-matrix-control-icon",e),d={...o,transform:`scale(${l})`};return(0,r.createElement)(cl,{...a,className:u,disablePointerEvents:t,role:"presentation",style:d},Ss.map(((e,t)=>{const n=s===t;return(0,r.createElement)(dl,{key:e},(0,r.createElement)(ul,{isActive:n}))})))};function ml({className:e,id:t,label:n=(0,u.__)("Alignment Matrix Control"),defaultValue:o="center center",value:i,onChange:a,width:s=92,...l}){const f=(0,d.useInstanceId)(ml,"alignment-matrix-control",t),m=rl({defaultActiveId:ks(f,o),activeId:ks(f,i),setActiveId:e=>{const t=function(e,t){const n=t?.replace(e+"-","");return Cs(n)}(f,e);t&&a?.(t)},rtl:(0,u.isRTL)()}),p=m.useState("activeId"),h=c()("component-alignment-matrix-control",e);return(0,r.createElement)(al,{store:m,render:(0,r.createElement)(Ls,{...l,"aria-label":n,className:h,id:f,role:"grid",size:s})},Es.map(((e,t)=>(0,r.createElement)(ll,{render:(0,r.createElement)(Fs,{role:"row"}),key:t},e.map((e=>{const t=ks(f,e),n=t===p;return(0,r.createElement)(Hs,{id:t,isActive:n,key:e,value:e})}))))))}ml.Icon=fl;const pl=ml;function hl(e){return"appear"===e?"top":"left"}function gl(e){if("loading"===e.type)return c()("components-animate__loading");const{type:t,origin:n=hl(t)}=e;if("appear"===t){const[e,t="center"]=n.split(" ");return c()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?c()("components-animate__slide-in","is-from-"+n):void 0}const vl=function({type:e,options:t={},children:n}){return n({className:gl({type:e,...t})})},bl=(0,r.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),yl=(0,r.createContext)({}),xl=(0,r.createContext)(null),wl="undefined"!=typeof document,El=wl?r.useLayoutEffect:r.useEffect,_l=(0,r.createContext)({strict:!1});function Sl(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Cl(e){return"string"==typeof e||Array.isArray(e)}function kl(e){return"object"==typeof e&&"function"==typeof e.start}const Pl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Tl=["initial",...Pl];function Il(e){return kl(e.animate)||Tl.some((t=>Cl(e[t])))}function Rl(e){return Boolean(Il(e)||e.variants)}function Ml(e){const{initial:t,animate:n}=function(e,t){if(Il(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Cl(t)?t:void 0,animate:Cl(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,r.useContext)(yl));return(0,r.useMemo)((()=>({initial:t,animate:n})),[Nl(t),Nl(n)])}function Nl(e){return Array.isArray(e)?e.join(" "):e}const Dl={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Al={};for(const e in Dl)Al[e]={isEnabled:t=>Dl[e].some((e=>!!t[e]))};const Ol=(0,r.createContext)({}),zl=(0,r.createContext)({}),Ll=Symbol.for("motionComponentSymbol");function Fl({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:o,Component:i}){e&&function(e){for(const t in e)Al[t]={...Al[t],...e[t]}}(e);const a=(0,r.forwardRef)((function(a,s){let l;const c={...(0,r.useContext)(bl),...a,layoutId:Bl(a)},{isStatic:u}=c,d=Ml(a),f=o(a,u);if(!u&&wl){d.visualElement=function(e,t,n,o){const{visualElement:i}=(0,r.useContext)(yl),a=(0,r.useContext)(_l),s=(0,r.useContext)(xl),l=(0,r.useContext)(bl).reducedMotion,c=(0,r.useRef)();o=o||a.renderer,!c.current&&o&&(c.current=o(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:!!s&&!1===s.initial,reducedMotionConfig:l}));const u=c.current;(0,r.useInsertionEffect)((()=>{u&&u.update(n,s)}));const d=(0,r.useRef)(Boolean(window.HandoffAppearAnimations));return El((()=>{u&&(u.render(),d.current&&u.animationState&&u.animationState.animateChanges())})),(0,r.useEffect)((()=>{u&&(u.updateFeatures(),!d.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,d.current=!1)})),u}(i,f,c,t);const n=(0,r.useContext)(zl),o=(0,r.useContext)(_l).strict;d.visualElement&&(l=d.visualElement.loadFeatures(c,o,e,n))}return r.createElement(yl.Provider,{value:d},l&&d.visualElement?r.createElement(l,{visualElement:d.visualElement,...c}):null,n(i,a,function(e,t,n){return(0,r.useCallback)((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):Sl(n)&&(n.current=r))}),[t])}(f,d.visualElement,s),f,u,d.visualElement))}));return a[Ll]=i,a}function Bl({layoutId:e}){const t=(0,r.useContext)(Ol).id;return t&&void 0!==e?t+"-"+e:e}function jl(e){function t(t,n={}){return Fl(e(t,n))}if("undefined"==typeof Proxy)return t;const n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}const Vl=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Hl(e){return"string"==typeof e&&!e.includes("-")&&!!(Vl.indexOf(e)>-1||/[A-Z]/.test(e))}const $l={};const Wl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ul=new Set(Wl);function Gl(e,{layout:t,layoutId:n}){return Ul.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!$l[e]||"opacity"===e)}const ql=e=>Boolean(e&&e.getVelocity),Yl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Kl=Wl.length;const Xl=e=>t=>"string"==typeof t&&t.startsWith(e),Zl=Xl("--"),Jl=Xl("var(--"),Ql=(e,t)=>t&&"number"==typeof e?t.transform(e):e,ec=(e,t,n)=>Math.min(Math.max(n,e),t),tc={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},nc={...tc,transform:e=>ec(0,1,e)},rc={...tc,default:1},oc=e=>Math.round(1e5*e)/1e5,ic=/(-)?([\d]*\.?[\d])+/g,ac=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,sc=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function lc(e){return"string"==typeof e}const cc=e=>({test:t=>lc(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),uc=cc("deg"),dc=cc("%"),fc=cc("px"),mc=cc("vh"),pc=cc("vw"),hc={...dc,parse:e=>dc.parse(e)/100,transform:e=>dc.transform(100*e)},gc={...tc,transform:Math.round},vc={borderWidth:fc,borderTopWidth:fc,borderRightWidth:fc,borderBottomWidth:fc,borderLeftWidth:fc,borderRadius:fc,radius:fc,borderTopLeftRadius:fc,borderTopRightRadius:fc,borderBottomRightRadius:fc,borderBottomLeftRadius:fc,width:fc,maxWidth:fc,height:fc,maxHeight:fc,size:fc,top:fc,right:fc,bottom:fc,left:fc,padding:fc,paddingTop:fc,paddingRight:fc,paddingBottom:fc,paddingLeft:fc,margin:fc,marginTop:fc,marginRight:fc,marginBottom:fc,marginLeft:fc,rotate:uc,rotateX:uc,rotateY:uc,rotateZ:uc,scale:rc,scaleX:rc,scaleY:rc,scaleZ:rc,skew:uc,skewX:uc,skewY:uc,distance:fc,translateX:fc,translateY:fc,translateZ:fc,x:fc,y:fc,z:fc,perspective:fc,transformPerspective:fc,opacity:nc,originX:hc,originY:hc,originZ:fc,zIndex:gc,fillOpacity:nc,strokeOpacity:nc,numOctaves:gc};function bc(e,t,n,r){const{style:o,vars:i,transform:a,transformOrigin:s}=e;let l=!1,c=!1,u=!0;for(const e in t){const n=t[e];if(Zl(e)){i[e]=n;continue}const r=vc[e],d=Ql(n,r);if(Ul.has(e)){if(l=!0,a[e]=d,!u)continue;n!==(r.default||0)&&(u=!1)}else e.startsWith("origin")?(c=!0,s[e]=d):o[e]=d}if(t.transform||(l||r?o.transform=function(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let i="";for(let t=0;t<Kl;t++){const n=Wl[t];void 0!==e[n]&&(i+=`${Yl[n]||n}(${e[n]}) `)}return t&&!e.z&&(i+="translateZ(0)"),i=i.trim(),o?i=o(e,r?"":i):n&&r&&(i="none"),i}(e.transform,n,u,r):o.transform&&(o.transform="none")),c){const{originX:e="50%",originY:t="50%",originZ:n=0}=s;o.transformOrigin=`${e} ${t} ${n}`}}const yc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function xc(e,t,n){for(const r in t)ql(t[r])||Gl(r,n)||(e[r]=t[r])}function wc(e,t,n){const o={};return xc(o,e.style||{},e),Object.assign(o,function({transformTemplate:e},t,n){return(0,r.useMemo)((()=>{const r=yc();return bc(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)}),[t])}(e,t,n)),e.transformValues?e.transformValues(o):o}function Ec(e,t,n){const r={},o=wc(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const _c=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Sc(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||_c.has(e)}let Cc=e=>!Sc(e);try{(kc=require("@emotion/is-prop-valid").default)&&(Cc=e=>e.startsWith("on")?!Sc(e):kc(e))}catch(W){}var kc;function Pc(e,t,n){return"string"==typeof e?e:fc.transform(t+n*e)}const Tc={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ic={offset:"strokeDashoffset",array:"strokeDasharray"};function Rc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d,f){if(bc(e,c,u,f),d)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:m,style:p,dimensions:h}=e;m.transform&&(h&&(p.transform=m.transform),delete m.transform),h&&(void 0!==o||void 0!==i||p.transform)&&(p.transformOrigin=function(e,t,n){return`${Pc(t,e.x,e.width)} ${Pc(n,e.y,e.height)}`}(h,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(m.x=t),void 0!==n&&(m.y=n),void 0!==r&&(m.scale=r),void 0!==a&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Tc:Ic;e[i.offset]=fc.transform(-r);const a=fc.transform(t),s=fc.transform(n);e[i.array]=`${a} ${s}`}(m,a,s,l,!1)}const Mc=()=>({...yc(),attrs:{}}),Nc=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Dc(e,t,n,o){const i=(0,r.useMemo)((()=>{const n=Mc();return Rc(n,t,{enableHardwareAcceleration:!1},Nc(o),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};xc(t,e.style,e),i.style={...t,...i.style}}return i}function Ac(e=!1){return(t,n,o,{latestValues:i},a)=>{const s=(Hl(t)?Dc:Ec)(n,i,a,t),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(Cc(o)||!0===n&&Sc(o)||!t&&!Sc(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),c={...l,...s,ref:o},{children:u}=n,d=(0,r.useMemo)((()=>ql(u)?u.get():u),[u]);return(0,r.createElement)(t,{...c,children:d})}}const Oc=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function zc(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const Lc=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Fc(e,t,n,r){zc(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Lc.has(n)?n:Oc(n),t.attrs[n])}function Bc(e,t){const{style:n}=e,r={};for(const o in n)(ql(n[o])||t.style&&ql(t.style[o])||Gl(o,e))&&(r[o]=n[o]);return r}function jc(e,t){const n=Bc(e,t);for(const r in e)if(ql(e[r])||ql(t[r])){n[-1!==Wl.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]}return n}function Vc(e,t,n,r={},o={}){return"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),"string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),t}function Hc(e){const t=(0,r.useRef)(null);return null===t.current&&(t.current=e()),t.current}const $c=e=>Array.isArray(e),Wc=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),Uc=e=>$c(e)?e[e.length-1]||0:e;function Gc(e){const t=ql(e)?e.get():e;return Wc(t)?t.toValue():t}const qc=e=>(t,n)=>{const o=(0,r.useContext)(yl),i=(0,r.useContext)(xl),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const a={latestValues:Yc(r,o,i,e),renderState:t()};return n&&(a.mount=e=>n(r,e,a)),a}(e,t,o,i);return n?a():Hc(a)};function Yc(e,t,n,r){const o={},i=r(e,{});for(const e in i)o[e]=Gc(i[e]);let{initial:a,animate:s}=e;const l=Il(e),c=Rl(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const d=u?s:a;if(d&&"boolean"!=typeof d&&!kl(d)){(Array.isArray(d)?d:[d]).forEach((t=>{const n=Vc(e,t);if(!n)return;const{transitionEnd:r,transition:i,...a}=n;for(const e in a){let t=a[e];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(o[e]=t)}for(const e in r)o[e]=r[e]}))}return o}const Kc=e=>e;class Xc{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const t=this.order.indexOf(e);-1!==t&&(this.order.splice(t,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}const Zc=["prepare","read","update","preRender","render","postRender"];const{schedule:Jc,cancel:Qc,state:eu,steps:tu}=function(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=Zc.reduce(((e,t)=>(e[t]=function(e){let t=new Xc,n=new Xc,r=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(e,i=!1,s=!1)=>{const l=s&&o,c=l?t:n;return i&&a.add(e),c.add(e)&&l&&o&&(r=t.order.length),e},cancel:e=>{n.remove(e),a.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let n=0;n<r;n++){const r=t.order[n];r(l),a.has(r)&&(s.schedule(r),e())}o=!1,i&&(i=!1,s.process(l))}}};return s}((()=>n=!0)),e)),{}),a=e=>i[e].process(o),s=()=>{const i=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,Zc.forEach(a),o.isProcessing=!1,n&&t&&(r=!1,e(s))};return{schedule:Zc.reduce(((t,a)=>{const l=i[a];return t[a]=(t,i=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(s)),l.schedule(t,i,a)),t}),{}),cancel:e=>Zc.forEach((t=>i[t].cancel(e))),state:o,steps:i}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Kc,!0),nu={useVisualState:qc({scrapeMotionValuesFromProps:jc,createRenderState:Mc,onMount:(e,t,{renderState:n,latestValues:r})=>{Jc.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}})),Jc.render((()=>{Rc(n,r,{enableHardwareAcceleration:!1},Nc(t.tagName),e.transformTemplate),Fc(t,n)}))}})},ru={useVisualState:qc({scrapeMotionValuesFromProps:Bc,createRenderState:yc})};function ou(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const iu=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function au(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const su=e=>t=>iu(t)&&e(t,au(t));function lu(e,t,n,r){return ou(e,t,su(n),r)}const cu=(e,t)=>n=>t(e(n)),uu=(...e)=>e.reduce(cu);function du(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const fu=du("dragHorizontal"),mu=du("dragVertical");function pu(e){let t=!1;if("y"===e)t=mu();else if("x"===e)t=fu();else{const e=fu(),n=mu();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function hu(){const e=pu(!0);return!e||(e(),!1)}class gu{constructor(e){this.isMounted=!1,this.node=e}update(){}}function vu(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End");return lu(e.current,n,((n,o)=>{if("touch"===n.type||hu())return;const i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t),i[r]&&Jc.update((()=>i[r](n,o)))}),{passive:!e.getProps()[r]})}const bu=(e,t)=>!!t&&(e===t||bu(e,t.parentElement));function yu(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,au(n))}const xu=new WeakMap,wu=new WeakMap,Eu=e=>{const t=xu.get(e.target);t&&t(e)},_u=e=>{e.forEach(Eu)};function Su(e,t,n){const r=function({root:e,...t}){const n=e||document;wu.has(n)||wu.set(n,{});const r=wu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(_u,{root:e,...t})),r[o]}(t);return xu.set(e,n),r.observe(e),()=>{xu.delete(e),r.unobserve(e)}}const Cu={some:0,all:1};const ku={inView:{Feature:class extends gu{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:Cu[r]};return Su(this.node.current,i,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends gu{constructor(){super(...arguments),this.removeStartListeners=Kc,this.removeEndListeners=Kc,this.removeAccessibleListeners=Kc,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),r=lu(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r}=this.node.getProps();Jc.update((()=>{bu(this.node.current,e.target)?n&&n(e,t):r&&r(e,t)}))}),{passive:!(n.onTap||n.onPointerUp)}),o=lu(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=uu(r,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=ou(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=ou(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&yu("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&Jc.update((()=>n(e,t)))}))})),yu("down",((e,t)=>{this.startPress(e,t)}))})),t=ou(this.node.current,"blur",(()=>{this.isPressing&&yu("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=uu(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Jc.update((()=>n(e,t)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!hu()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Jc.update((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=lu(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=ou(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=uu(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends gu{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=uu(ou(this.node.current,"focus",(()=>this.onFocus())),ou(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends gu{mount(){this.unmount=uu(vu(this.node,!0),vu(this.node,!1))}unmount(){}}}};function Pu(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Tu(e,t,n){const r=e.getProps();return Vc(r,t,void 0!==n?n:r.custom,function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.get())),t}(e),function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.getVelocity())),t}(e))}const Iu="data-"+Oc("framerAppearId");let Ru=Kc,Mu=Kc;const Nu=e=>1e3*e,Du=e=>e/1e3,Au=!1,Ou=e=>Array.isArray(e)&&"number"==typeof e[0];function zu(e){return Boolean(!e||"string"==typeof e&&Fu[e]||Ou(e)||Array.isArray(e)&&e.every(zu))}const Lu=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Fu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Lu([0,.65,.55,1]),circOut:Lu([.55,0,1,.45]),backIn:Lu([.31,.01,.66,-.59]),backOut:Lu([.33,1.53,.69,.99])};function Bu(e){if(e)return Ou(e)?Lu(e):Array.isArray(e)?e.map(Bu):Fu[e]}const ju=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Vu=1e-7,Hu=12;function $u(e,t,n,r){if(e===t&&n===r)return Kc;const o=t=>function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=ju(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>Vu&&++s<Hu);return a}(t,0,1,e,n);return e=>0===e||1===e?e:ju(o(e),t,r)}const Wu=$u(.42,0,1,1),Uu=$u(0,0,.58,1),Gu=$u(.42,0,.58,1),qu=e=>Array.isArray(e)&&"number"!=typeof e[0],Yu=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ku=e=>t=>1-e(1-t),Xu=e=>1-Math.sin(Math.acos(e)),Zu=Ku(Xu),Ju=Yu(Zu),Qu=$u(.33,1.53,.69,.99),ed=Ku(Qu),td=Yu(ed),nd={linear:Kc,easeIn:Wu,easeInOut:Gu,easeOut:Uu,circIn:Xu,circInOut:Ju,circOut:Zu,backIn:ed,backInOut:td,backOut:Qu,anticipate:e=>(e*=2)<1?.5*ed(e):.5*(2-Math.pow(2,-10*(e-1)))},rd=e=>{if(Array.isArray(e)){Mu(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return $u(t,n,r,o)}return"string"==typeof e?(Mu(void 0!==nd[e],`Invalid easing type '${e}'`),nd[e]):e},od=(e,t)=>n=>Boolean(lc(n)&&sc.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),id=(e,t,n)=>r=>{if(!lc(r))return r;const[o,i,a,s]=r.match(ic);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},ad={...tc,transform:e=>Math.round((e=>ec(0,255,e))(e))},sd={test:od("rgb","red"),parse:id("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ad.transform(e)+", "+ad.transform(t)+", "+ad.transform(n)+", "+oc(nc.transform(r))+")"};const ld={test:od("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:sd.transform},cd={test:od("hsl","hue"),parse:id("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+dc.transform(oc(t))+", "+dc.transform(oc(n))+", "+oc(nc.transform(r))+")"},ud={test:e=>sd.test(e)||ld.test(e)||cd.test(e),parse:e=>sd.test(e)?sd.parse(e):cd.test(e)?cd.parse(e):ld.parse(e),transform:e=>lc(e)?e:e.hasOwnProperty("red")?sd.transform(e):cd.transform(e)},dd=(e,t,n)=>-n*e+n*t+e;function fd(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}const md=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},pd=[ld,sd,cd];function hd(e){const t=(e=>pd.find((t=>t.test(e))))(e);Mu(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===cd&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=fd(s,r,e+1/3),i=fd(s,r,e),a=fd(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(n)),n}const gd=(e,t)=>{const n=hd(e),r=hd(t),o={...n};return e=>(o.red=md(n.red,r.red,e),o.green=md(n.green,r.green,e),o.blue=md(n.blue,r.blue,e),o.alpha=dd(n.alpha,r.alpha,e),sd.transform(o))};const vd={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:Kc},bd={regex:ac,countKey:"Colors",token:"${c}",parse:ud.parse},yd={regex:ic,countKey:"Numbers",token:"${n}",parse:tc.parse};function xd(e,{regex:t,countKey:n,token:r,parse:o}){const i=e.tokenised.match(t);i&&(e["num"+n]=i.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...i.map(o)))}function wd(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&xd(n,vd),xd(n,bd),xd(n,yd),n}function Ed(e){return wd(e).values}function _d(e){const{values:t,numColors:n,numVars:r,tokenised:o}=wd(e),i=t.length;return e=>{let t=o;for(let o=0;o<i;o++)t=o<r?t.replace(vd.token,e[o]):o<r+n?t.replace(bd.token,ud.transform(e[o])):t.replace(yd.token,oc(e[o]));return t}}const Sd=e=>"number"==typeof e?0:e;const Cd={test:function(e){var t,n;return isNaN(e)&&lc(e)&&((null===(t=e.match(ic))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(ac))||void 0===n?void 0:n.length)||0)>0},parse:Ed,createTransformer:_d,getAnimatableNone:function(e){const t=Ed(e);return _d(e)(t.map(Sd))}},kd=(e,t)=>n=>`${n>0?t:e}`;function Pd(e,t){return"number"==typeof e?n=>dd(e,t,n):ud.test(e)?gd(e,t):e.startsWith("var(")?kd(e,t):Rd(e,t)}const Td=(e,t)=>{const n=[...e],r=n.length,o=e.map(((e,n)=>Pd(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}},Id=(e,t)=>{const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=Pd(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}},Rd=(e,t)=>{const n=Cd.createTransformer(t),r=wd(e),o=wd(t);return r.numVars===o.numVars&&r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?uu(Td(r.values,o.values),n):(Ru(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),kd(e,t))},Md=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Nd=(e,t)=>n=>dd(e,t,n);function Dd(e,t,n){const r=[],o=n||function(e){return"number"==typeof e?Nd:"string"==typeof e?ud.test(e)?gd:Rd:Array.isArray(e)?Td:"object"==typeof e?Id:Nd}(e[0]),i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||Kc:t;i=uu(e,i)}r.push(i)}return r}function Ad(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Mu(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Dd(t,r,o),s=a.length,l=t=>{let n=0;if(s>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=Md(e[n],e[n+1],t);return a[n](r)};return n?t=>l(ec(e[0],e[i-1],t)):l}function Od(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Md(0,t,r);e.push(dd(n,1,o))}}(t,e.length-1),t}function zd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=qu(r)?r.map(rd):rd(r),i={done:!1,value:t[0]},a=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:Od(t),e),s=Ad(a,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map((()=>c||Gu)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}function Ld(e,t){return t?e*(1e3/t):0}const Fd=5;function Bd(e,t,n){const r=Math.max(t-Fd,0);return Ld(n-e(r),t-r)}const jd=.001,Vd=.01,Hd=10,$d=.05,Wd=1;function Ud({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;Ru(e<=Nu(Hd),"Spring duration must be 10 seconds or less");let a=1-t;a=ec($d,Wd,a),e=ec(Vd,Hd,Du(e)),a<1?(o=t=>{const r=t*a,o=r*e,i=r-n,s=qd(t,a),l=Math.exp(-o);return jd-i/s*l},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=qd(Math.pow(t,2),a);return(-o(t)+jd>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-jd,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<Gd;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=Nu(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}const Gd=12;function qd(e,t){return e*Math.sqrt(1-t*t)}const Yd=["duration","bounce"],Kd=["stiffness","damping","mass"];function Xd(e,t){return t.some((t=>void 0!==e[t]))}function Zd({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],a={done:!1,value:o},{stiffness:s,damping:l,mass:c,velocity:u,duration:d,isResolvedFromDuration:f}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Xd(e,Kd)&&Xd(e,Yd)){const n=Ud(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}(r),m=u?-Du(u):0,p=l/(2*Math.sqrt(s*c)),h=i-o,g=Du(Math.sqrt(s/c)),v=Math.abs(h)<5;let b;if(n||(n=v?.01:2),t||(t=v?.005:.5),p<1){const e=qd(g,p);b=t=>{const n=Math.exp(-p*g*t);return i-n*((m+p*g*h)/e*Math.sin(e*t)+h*Math.cos(e*t))}}else if(1===p)b=e=>i-Math.exp(-g*e)*(h+(m+g*h)*e);else{const e=g*Math.sqrt(p*p-1);b=t=>{const n=Math.exp(-p*g*t),r=Math.min(e*t,300);return i-n*((m+p*g*h)*Math.sinh(r)+e*h*Math.cosh(r))/e}}return{calculatedDuration:f&&d||null,next:e=>{const r=b(e);if(f)a.done=e>=d;else{let o=m;0!==e&&(o=p<1?Bd(b,e,r):0);const s=Math.abs(o)<=n,l=Math.abs(i-r)<=t;a.done=s&&l}return a.value=a.done?i:r,a}}}function Jd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},m=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let p=n*t;const h=d+p,g=void 0===a?h:a(h);g!==h&&(p=g-d);const v=e=>-p*Math.exp(-e/r),b=e=>g+v(e),y=e=>{const t=v(e),n=b(e);f.done=Math.abs(t)<=c,f.value=f.done?g:n};let x,w;const E=e=>{(e=>void 0!==s&&e<s||void 0!==l&&e>l)(f.value)&&(x=e,w=Zd({keyframes:[f.value,m(f.value)],velocity:Bd(b,e,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,y(e),E(e)),void 0!==x&&e>x?w.next(e-x):(!t&&y(e),f)}}}const Qd=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Jc.update(t,!0),stop:()=>Qc(t),now:()=>eu.isProcessing?eu.timestamp:performance.now()}},ef=2e4;function tf(e){let t=0;let n=e.next(t);for(;!n.done&&t<ef;)t+=50,n=e.next(t);return t>=ef?1/0:t}const nf={decay:Jd,inertia:Jd,tween:zd,keyframes:zd,spring:Zd};function rf({autoplay:e=!0,delay:t=0,driver:n=Qd,keyframes:r,type:o="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:s="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:d,...f}){let m,p,h=1,g=!1;const v=()=>{p=new Promise((e=>{m=e}))};let b;v();const y=nf[o]||zd;let x;y!==zd&&"number"!=typeof r[0]&&(x=Ad([0,100],r,{clamp:!1}),r=[0,100]);const w=y({...f,keyframes:r});let E;"mirror"===s&&(E=y({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let _="idle",S=null,C=null,k=null;null===w.calculatedDuration&&i&&(w.calculatedDuration=tf(w));const{calculatedDuration:P}=w;let T=1/0,I=1/0;null!==P&&(T=P+a,I=T*(i+1)-a);let R=0;const M=e=>{if(null===C)return;h>0&&(C=Math.min(C,e)),h<0&&(C=Math.min(e-I/h,C)),R=null!==S?S:Math.round(e-C)*h;const n=R-t*(h>=0?1:-1),o=h>=0?n<0:n>I;R=Math.max(n,0),"finished"===_&&null===S&&(R=I);let l=R,c=w;if(i){const e=R/T;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,i+1);const r=Boolean(t%2);r&&("reverse"===s?(n=1-n,a&&(n-=a/T)):"mirror"===s&&(c=E));let o=ec(0,1,n);R>I&&(o="reverse"===s&&r?1:0),l=o*T}const u=o?{done:!1,value:r[0]}:c.next(l);x&&(u.value=x(u.value));let{done:f}=u;o||null===P||(f=h>=0?R>=I:R<=0);const m=null===S&&("finished"===_||"running"===_&&f);return d&&d(u.value),m&&A(),u},N=()=>{b&&b.stop(),b=void 0},D=()=>{_="idle",N(),m(),v(),C=k=null},A=()=>{_="finished",u&&u(),N(),m()},O=()=>{if(g)return;b||(b=n(M));const e=b.now();l&&l(),null!==S?C=e-S:C&&"finished"!==_||(C=e),"finished"===_&&v(),k=C,S=null,_="running",b.start()};e&&O();const z={then:(e,t)=>p.then(e,t),get time(){return Du(R)},set time(e){e=Nu(e),R=e,null===S&&b&&0!==h?C=b.now()-e/h:S=e},get duration(){const e=null===w.calculatedDuration?tf(w):w.calculatedDuration;return Du(e)},get speed(){return h},set speed(e){e!==h&&b&&(h=e,z.time=Du(R))},get state(){return _},play:O,pause:()=>{_="paused",S=R},stop:()=>{g=!0,"idle"!==_&&(_="idle",c&&c(),D())},cancel:()=>{null!==k&&M(k),D()},complete:()=>{_="finished"},sample:e=>(C=0,M(e))};return z}const of=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),af=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);function sf(e,t,{onUpdate:n,onComplete:r,...o}){if(!(of()&&af.has(t)&&!o.repeatDelay&&"mirror"!==o.repeatType&&0!==o.damping&&"inertia"!==o.type))return!1;let i,a,s=!1;const l=()=>{a=new Promise((e=>{i=e}))};l();let{keyframes:c,duration:u=300,ease:d,times:f}=o;if(((e,t)=>"spring"===t.type||"backgroundColor"===e||!zu(t.ease))(t,o)){const e=rf({...o,repeat:0,delay:0});let t={done:!1,value:c[0]};const n=[];let r=0;for(;!t.done&&r<2e4;)t=e.sample(r),n.push(t.value),r+=10;f=void 0,c=n,u=r-10,d="linear"}const m=function(e,t,n,{delay:r=0,duration:o,repeat:i=0,repeatType:a="loop",ease:s,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Bu(s);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"})}(e.owner.current,t,c,{...o,duration:u,ease:d,times:f});o.syncStart&&(m.startTime=eu.isProcessing?eu.timestamp:document.timeline?document.timeline.currentTime:performance.now());const p=()=>m.cancel(),h=()=>{Jc.update(p),i(),l()};m.onfinish=()=>{e.set(function(e,{repeat:t,repeatType:n="loop"}){return e[t&&"loop"!==n&&t%2==1?0:e.length-1]}(c,o)),r&&r(),h()};return{then:(e,t)=>a.then(e,t),attachTimeline:e=>(m.timeline=e,m.onfinish=null,Kc),get time(){return Du(m.currentTime||0)},set time(e){m.currentTime=Nu(e)},get speed(){return m.playbackRate},set speed(e){m.playbackRate=e},get duration(){return Du(u)},play:()=>{s||(m.play(),Qc(p))},pause:()=>m.pause(),stop:()=>{if(s=!0,"idle"===m.playState)return;const{currentTime:t}=m;if(t){const n=rf({...o,autoplay:!1});e.setWithVelocity(n.sample(t-10).value,n.sample(t).value,10)}h()},complete:()=>m.finish(),cancel:h}}const lf={type:"spring",stiffness:500,damping:25,restSpeed:10},cf={type:"keyframes",duration:.8},uf={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},df=(e,{keyframes:t})=>t.length>2?cf:Ul.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:lf:uf,ff=(e,t)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Cd.test(t)&&"0"!==t||t.startsWith("url("))),mf=new Set(["brightness","contrast","saturate","opacity"]);function pf(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(ic)||[];if(!r)return e;const o=n.replace(r,"");let i=mf.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const hf=/([a-z-]*)\(.*?\)/g,gf={...Cd,getAnimatableNone:e=>{const t=e.match(hf);return t?t.map(pf).join(" "):e}},vf={...vc,color:ud,backgroundColor:ud,outlineColor:ud,fill:ud,stroke:ud,borderColor:ud,borderTopColor:ud,borderRightColor:ud,borderBottomColor:ud,borderLeftColor:ud,filter:gf,WebkitFilter:gf},bf=e=>vf[e];function yf(e,t){let n=bf(e);return n!==gf&&(n=Cd),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const xf=e=>/^0[^.\s]+$/.test(e);function wf(e){return"number"==typeof e?0===e:null!==e?"none"===e||"0"===e||xf(e):void 0}function Ef(e,t){return e[t]||e.default||e}const _f=(e,t,n,r={})=>o=>{const i=Ef(r,e)||{},a=i.delay||r.delay||0;let{elapsed:s=0}=r;s-=Nu(a);const l=function(e,t,n,r){const o=ff(t,n);let i;i=Array.isArray(n)?[...n]:[null,n];const a=void 0!==r.from?r.from:e.get();let s;const l=[];for(let e=0;e<i.length;e++)null===i[e]&&(i[e]=0===e?a:i[e-1]),wf(i[e])&&l.push(e),"string"==typeof i[e]&&"none"!==i[e]&&"0"!==i[e]&&(s=i[e]);if(o&&l.length&&s)for(let e=0;e<l.length;e++)i[l[e]]=yf(t,s);return i}(t,e,n,i),c=l[0],u=l[l.length-1],d=ff(e,c),f=ff(e,u);Ru(d===f,`You are trying to animate ${e} from "${c}" to "${u}". ${c} is not an animatable value - to enable this animation set ${c} to a value animatable to ${u} via the \`style\` property.`);let m={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...i,delay:-s,onUpdate:e=>{t.set(e),i.onUpdate&&i.onUpdate(e)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}};if(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}(i)||(m={...m,...df(e,m)}),m.duration&&(m.duration=Nu(m.duration)),m.repeatDelay&&(m.repeatDelay=Nu(m.repeatDelay)),!d||!f||Au||!1===i.type)return function({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Kc,pause:Kc,stop:Kc,then:e=>(e(),Promise.resolve()),cancel:Kc,complete:Kc});return t?rf({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}(Au?{...m,delay:0}:m);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const n=sf(t,e,m);if(n)return n}return rf(m)};function Sf(e){return Boolean(ql(e)&&e.add)}const Cf=e=>/^\-?\d*\.?\d+$/.test(e);function kf(e,t){-1===e.indexOf(t)&&e.push(t)}function Pf(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Tf{constructor(){this.subscriptions=[]}add(e){return kf(this.subscriptions,e),()=>Pf(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const If={current:void 0};class Rf{constructor(e,t={}){var n;this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(e,t=!0)=>{this.prev=this.current,this.current=e;const{delta:n,timestamp:r}=eu;this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,Jc.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Jc.postRender(this.velocityCheck),this.velocityCheck=({timestamp:e})=>{e!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Tf);const n=this.events[e].add(t);return"change"===e?()=>{n(),Jc.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return If.current&&If.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Ld(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Mf(e,t){return new Rf(e,t)}const Nf=e=>t=>t.test(e),Df=[tc,fc,dc,uc,pc,mc,{test:e=>"auto"===e,parse:e=>e}],Af=e=>Df.find(Nf(e)),Of=[...Df,ud,Cd],zf=e=>Of.find(Nf(e));function Lf(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Mf(n))}function Ff(e,t){const n=Tu(e,t);let{transitionEnd:r={},transition:o={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const t in i){Lf(e,t,Uc(i[t]))}}function Bf(e,t){if(!t)return;return(t[e]||t.default||t).from}function jf({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Vf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...s}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const t in s){const r=e.getValue(t),o=s[t];if(!r||void 0===o||u&&jf(u,t))continue;const a={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!r.hasAnimated){const n=e.getProps()[Iu];n&&(a.elapsed=window.HandoffAppearAnimations(n,t,r,Jc),a.syncStart=!0)}r.start(_f(t,r,o,e.shouldReduceMotion&&Ul.has(t)?{type:!1}:a));const d=r.animation;Sf(l)&&(l.add(t),d.then((()=>l.remove(t)))),c.push(d)}return a&&Promise.all(c).then((()=>{a&&Ff(e,a)})),c}function Hf(e,t,n={}){const r=Tu(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(Vf(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:a,staggerDirection:s}=o;return function(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort($f).forEach(((e,r)=>{e.notify("AnimationStart",t),a.push(Hf(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(a)}(e,t,i+r,a,s,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[e,t]="beforeChildren"===s?[i,a]:[a,i];return e().then((()=>t()))}return Promise.all([i(),a(n.delay)])}function $f(e,t){return e.sortNodePosition(t)}const Wf=[...Pl].reverse(),Uf=Pl.length;function Gf(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>Hf(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=Hf(e,t,n);else{const o="function"==typeof t?Tu(e,t,n.custom):t;r=Promise.all(Vf(e,o,n))}return r.then((()=>e.notify("AnimationComplete",t)))}(e,t,n))))}function qf(e){let t=Gf(e);const n={animate:Kf(!0),whileInView:Kf(),whileHover:Kf(),whileTap:Kf(),whileDrag:Kf(),whileFocus:Kf(),exit:Kf()};let r=!0;const o=(t,n)=>{const r=Tu(e,n);if(r){const{transition:e,transitionEnd:n,...o}=r;t={...t,...o,...n}}return t};function i(i,a){const s=e.getProps(),l=e.getVariantContext(!0)||{},c=[],u=new Set;let d={},f=1/0;for(let t=0;t<Uf;t++){const m=Wf[t],p=n[m],h=void 0!==s[m]?s[m]:l[m],g=Cl(h),v=m===a?p.isActive:null;!1===v&&(f=t);let b=h===l[m]&&h!==s[m]&&g;if(b&&r&&e.manuallyAnimateOnMount&&(b=!1),p.protectedKeys={...d},!p.isActive&&null===v||!h&&!p.prevProp||kl(h)||"boolean"==typeof h)continue;const y=Yf(p.prevProp,h);let x=y||m===a&&p.isActive&&!b&&g||t>f&&g;const w=Array.isArray(h)?h:[h];let E=w.reduce(o,{});!1===v&&(E={});const{prevResolvedValues:_={}}=p,S={..._,...E},C=e=>{x=!0,u.delete(e),p.needsAnimating[e]=!0};for(const e in S){const t=E[e],n=_[e];d.hasOwnProperty(e)||(t!==n?$c(t)&&$c(n)?!Pu(t,n)||y?C(e):p.protectedKeys[e]=!0:void 0!==t?C(e):u.add(e):void 0!==t&&u.has(e)?C(e):p.protectedKeys[e]=!0)}p.prevProp=h,p.prevResolvedValues=E,p.isActive&&(d={...d,...E}),r&&e.blockInitialAnimation&&(x=!1),x&&!b&&c.push(...w.map((e=>({animation:e,options:{type:m,...i}}))))}if(u.size){const t={};u.forEach((n=>{const r=e.getBaseTarget(n);void 0!==r&&(t[n]=r)})),c.push({animation:t})}let m=Boolean(c.length);return r&&!1===s.initial&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(c):Promise.resolve()}return{animateChanges:i,setActive:function(t,r,o){var a;if(n[t].isActive===r)return Promise.resolve();null===(a=e.variantChildren)||void 0===a||a.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=i(o,t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n}}function Yf(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Pu(t,e)}function Kf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let Xf=0;const Zf={animation:{Feature:class extends gu{constructor(e){super(e),e.animationState||(e.animationState=qf(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),kl(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends gu{constructor(){super(...arguments),this.id=Xf++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const o=this.node.animationState.setActive("exit",!e,{custom:null!=n?n:this.node.getProps().custom});t&&!e&&o.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},Jf=(e,t)=>Math.abs(e-t);class Qf{constructor(e,t,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=nm(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Jf(e.x,t.x),r=Jf(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=eu;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=em(t,this.transformPagePoint),Jc.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:r}=this.handlers,o=nm("pointercancel"===e.type?this.lastMoveEventInfo:em(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!iu(e))return;this.handlers=t,this.transformPagePoint=n;const r=em(au(e),this.transformPagePoint),{point:o}=r,{timestamp:i}=eu;this.history=[{...o,timestamp:i}];const{onSessionStart:a}=t;a&&a(e,nm(r,this.history)),this.removeListeners=uu(lu(window,"pointermove",this.handlePointerMove),lu(window,"pointerup",this.handlePointerUp),lu(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Qc(this.updatePoint)}}function em(e,t){return t?{point:t(e.point)}:e}function tm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function nm({point:e},t){return{point:e,delta:tm(e,om(t)),offset:tm(e,rm(t)),velocity:im(t,.1)}}function rm(e){return e[0]}function om(e){return e[e.length-1]}function im(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=om(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Nu(t)));)n--;if(!r)return{x:0,y:0};const i=Du(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function am(e){return e.max-e.min}function sm(e,t=0,n=.01){return Math.abs(e-t)<=n}function lm(e,t,n,r=.5){e.origin=r,e.originPoint=dd(t.min,t.max,e.origin),e.scale=am(n)/am(t),(sm(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=dd(n.min,n.max,e.origin)-e.originPoint,(sm(e.translate)||isNaN(e.translate))&&(e.translate=0)}function cm(e,t,n,r){lm(e.x,t.x,n.x,r?r.originX:void 0),lm(e.y,t.y,n.y,r?r.originY:void 0)}function um(e,t,n){e.min=n.min+t.min,e.max=e.min+am(t)}function dm(e,t,n){e.min=t.min-n.min,e.max=e.min+am(t)}function fm(e,t,n){dm(e.x,t.x,n.x),dm(e.y,t.y,n.y)}function mm(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function pm(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const hm=.35;function gm(e,t,n){return{min:vm(e,t),max:vm(e,n)}}function vm(e,t){return"number"==typeof e?e:e[t]||0}const bm=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),ym=()=>({x:{min:0,max:0},y:{min:0,max:0}});function xm(e){return[e("x"),e("y")]}function wm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Em(e){return void 0===e||1===e}function _m({scale:e,scaleX:t,scaleY:n}){return!Em(e)||!Em(t)||!Em(n)}function Sm(e){return _m(e)||Cm(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Cm(e){return km(e.x)||km(e.y)}function km(e){return e&&"0%"!==e}function Pm(e,t,n){return n+t*(e-n)}function Tm(e,t,n,r,o){return void 0!==o&&(e=Pm(e,o,r)),Pm(e,n,r)+t}function Im(e,t=0,n=1,r,o){e.min=Tm(e.min,t,n,r,o),e.max=Tm(e.max,t,n,r,o)}function Rm(e,{x:t,y:n}){Im(e.x,t.translate,t.scale,t.originPoint),Im(e.y,n.translate,n.scale,n.originPoint)}function Mm(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Nm(e,t){e.min=e.min+t,e.max=e.max+t}function Dm(e,t,[n,r,o]){const i=void 0!==t[o]?t[o]:.5,a=dd(e.min,e.max,i);Im(e,t[n],t[r],a,t.scale)}const Am=["x","scaleX","originX"],Om=["y","scaleY","originY"];function zm(e,t){Dm(e.x,t,Am),Dm(e.y,t,Om)}function Lm(e,t){return wm(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const Fm=new WeakMap;class Bm{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ym(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;this.panSession=new Qf(e,{onSessionStart:e=>{this.stopAnimation(),t&&this.snapToCursor(au(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=pu(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),xm((e=>{let t=this.getAxisMotionValue(e).get()||0;if(dc.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=am(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),o&&Jc.update((()=>o(e,t)),!1,!0);const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&Jc.update((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!jm(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?dd(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?dd(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:n}=this.visualElement.projection||{},r=this.constraints;e&&Sl(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:mm(e.x,n,o),y:mm(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=hm){return!1===e?e=0:!0===e&&(e=hm),{x:gm(e,"left","right"),y:gm(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&xm((e=>{this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Sl(e))return!1;const n=e.current;Mu(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=Lm(e,n),{scroll:o}=t;return o&&(Nm(r.x,o.offset.x),Nm(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:pm(e.x,t.x),y:pm(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=wm(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=xm((a=>{if(!jm(a,t,this.currentDirection))return;let l=s&&s[a]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,d)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(_f(e,n,0,t))}stopAnimation(){xm((e=>this.getAxisMotionValue(e).stop()))}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){xm((t=>{const{drag:n}=this.getProps();if(!jm(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-dd(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Sl(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};xm((e=>{const t=this.getAxisMotionValue(e);if(t){const n=t.get();r[e]=function(e,t){let n=.5;const r=am(e),o=am(t);return o>r?n=Md(t.min,t.max-r,e.min):r>o&&(n=Md(e.min,e.max-o,t.min)),ec(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),xm((t=>{if(!jm(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(dd(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Fm.set(this.visualElement,this);const e=lu(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Sl(e)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),t();const o=ou(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(xm((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=hm,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function jm(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Vm=e=>(t,n)=>{e&&Jc.update((()=>e(t,n)))};const Hm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function $m(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Wm={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!fc.test(e))return e;e=parseFloat(e)}return`${$m(e,t.target.x)}% ${$m(e,t.target.y)}%`}},Um={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Cd.parse(e);if(o.length>5)return r;const i=Cd.createTransformer(e),a="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=dd(s,l,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}};class Gm extends r.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=Ym,Object.assign($l,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Hm.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||Jc.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function qm(e){const[t,n]=function(){const e=(0,r.useContext)(xl);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:o}=e,i=(0,r.useId)();return(0,r.useEffect)((()=>o(i)),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}(),o=(0,r.useContext)(Ol);return r.createElement(Gm,{...e,layoutGroup:o,switchLayoutGroup:(0,r.useContext)(zl),isPresent:t,safeToRemove:n})}const Ym={borderRadius:{...Wm,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wm,borderTopRightRadius:Wm,borderBottomLeftRadius:Wm,borderBottomRightRadius:Wm,boxShadow:Um},Km=["TopLeft","TopRight","BottomLeft","BottomRight"],Xm=Km.length,Zm=e=>"string"==typeof e?parseFloat(e):e,Jm=e=>"number"==typeof e||fc.test(e);function Qm(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const ep=np(0,.5,Zu),tp=np(.5,.95,Kc);function np(e,t,n){return r=>r<e?0:r>t?1:n(Md(e,t,r))}function rp(e,t){e.min=t.min,e.max=t.max}function op(e,t){rp(e.x,t.x),rp(e.y,t.y)}function ip(e,t,n,r,o){return e=Pm(e-=t,1/n,r),void 0!==o&&(e=Pm(e,1/o,r)),e}function ap(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){dc.test(t)&&(t=parseFloat(t),t=dd(a.min,a.max,t/100)-a.min);if("number"!=typeof t)return;let s=dd(i.min,i.max,r);e===i&&(s-=t),e.min=ip(e.min,t,n,s,o),e.max=ip(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const sp=["x","scaleX","originX"],lp=["y","scaleY","originY"];function cp(e,t,n,r){ap(e.x,t,sp,n?n.x:void 0,r?r.x:void 0),ap(e.y,t,lp,n?n.y:void 0,r?r.y:void 0)}function up(e){return 0===e.translate&&1===e.scale}function dp(e){return up(e.x)&&up(e.y)}function fp(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function mp(e){return am(e.x)/am(e.y)}class pp{constructor(){this.members=[]}add(e){kf(this.members,e),e.scheduleRender()}remove(e){if(Pf(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function hp(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y;if((o||i)&&(r=`translate3d(${o}px, ${i}px, 0) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:e,rotateX:t,rotateY:o}=n;e&&(r+=`rotate(${e}deg) `),t&&(r+=`rotateX(${t}deg) `),o&&(r+=`rotateY(${o}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return 1===a&&1===s||(r+=`scale(${a}, ${s})`),r||"none"}const gp=(e,t)=>e.depth-t.depth;class vp{constructor(){this.children=[],this.isDirty=!1}add(e){kf(this.children,e),this.isDirty=!0}remove(e){Pf(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(gp),this.isDirty=!1,this.children.forEach(e)}}const bp=["","X","Y","Z"];let yp=0;const xp={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function wp({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=yp++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var e;xp.totalNodes=xp.resolvedTargetDeltas=xp.recalculatedProjection=0,this.nodes.forEach(Sp),this.nodes.forEach(Mp),this.nodes.forEach(Np),this.nodes.forEach(Cp),e=xp,window.MotionDebug&&window.MotionDebug.record(e)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new vp)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Tf),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=performance.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Qc(r),e(i-t))};return Jc.read(r,!0),()=>Qc(r)}(r,250),Hm.hasAnimatedSinceResize&&(Hm.hasAnimatedSinceResize=!1,this.nodes.forEach(Rp))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||Fp,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!fp(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...Ef(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Rp(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Qc(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Dp),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Pp);this.isUpdating||this.nodes.forEach(Tp),this.isUpdating=!1,this.nodes.forEach(Ip),this.nodes.forEach(Ep),this.nodes.forEach(_p),this.clearAllSnapshots();const e=performance.now();eu.delta=ec(0,1e3/60,e-eu.timestamp),eu.timestamp=e,eu.isProcessing=!0,tu.update.process(eu),tu.preRender.process(eu),tu.render.process(eu),eu.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask((()=>this.update())))}clearAllSnapshots(){this.nodes.forEach(kp),this.sharedNodes.forEach(Ap)}scheduleUpdateProjection(){Jc.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Jc.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++){this.path[e].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ym(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&(this.scroll={animationId:this.root.animationId,phase:e,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform,t=this.projectionDelta&&!dp(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||Sm(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Vp((r=n).x),Vp(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return ym();const t=e.measureViewportBox(),{scroll:n}=this.root;return n&&(Nm(t.x,n.offset.x),Nm(t.y,n.offset.y)),t}removeElementScroll(e){const t=ym();op(t,e);for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:o,options:i}=r;if(r!==this.root&&o&&i.layoutScroll){if(o.isRoot){op(t,e);const{scroll:n}=this.root;n&&(Nm(t.x,-n.offset.x),Nm(t.y,-n.offset.y))}Nm(t.x,o.offset.x),Nm(t.y,o.offset.y)}}return t}applyTransform(e,t=!1){const n=ym();op(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&zm(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),Sm(r.latestValues)&&zm(n,r.latestValues)}return Sm(this.latestValues)&&zm(n,this.latestValues),n}removeTransform(e){const t=ym();op(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!Sm(n.latestValues))continue;_m(n.latestValues)&&n.updateSnapshot();const r=ym();op(r,n.measurePageBox()),cp(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return Sm(this.latestValues)&&cp(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==eu.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=eu.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ym(),this.relativeTargetOrigin=ym(),fm(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),op(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var a,s,l;if(this.target||(this.target=ym(),this.targetWithTransforms=ym()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),a=this.target,s=this.relativeTarget,l=this.relativeParent.target,um(a.x,s.x,l.x),um(a.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):op(this.target,this.layout.layoutBox),Rm(this.target,this.targetDelta)):op(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ym(),this.relativeTargetOrigin=ym(),fm(this.relativeTargetOrigin,this.target,e.target),op(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}xp.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!_m(this.parent.latestValues)&&!Cm(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===eu.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;op(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,a;t.x=t.y=1;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const o=i.instance;o&&o.style&&"contents"===o.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&zm(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Rm(e,a)),r&&Sm(i.latestValues)&&zm(e,i.latestValues))}t.x=Mm(t.x),t.y=Mm(t.y)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox);const{target:l}=t;if(!l)return void(this.projectionTransform&&(this.projectionDelta=bm(),this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta=bm(),this.projectionDeltaWithTransform=bm());const c=this.projectionTransform;cm(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=hp(this.projectionDelta,this.treeScale),this.projectionTransform===c&&this.treeScale.x===a&&this.treeScale.y===s||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),xp.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i=bm();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a=ym(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(s&&!c&&!0===this.options.crossfade&&!this.path.some(Lp));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;Op(i.x,e.x,n),Op(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(fm(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){zp(e.x,t.x,n.x,r),zp(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,a,n),d&&function(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d=ym()),op(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=dd(0,void 0!==n.opacity?n.opacity:1,ep(r)),e.opacityExit=dd(void 0!==t.opacity?t.opacity:1,0,tp(r))):i&&(e.opacity=dd(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<Xm;o++){const i=`border${Km[o]}Radius`;let a=Qm(t,i),s=Qm(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||Jm(a)===Jm(s)?(e[i]=Math.max(dd(Zm(a),Zm(s),r),0),(dc.test(s)||dc.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=dd(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Qc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Jc.update((()=>{Hm.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=ql(e)?e:Mf(e);return r.start(_f("",r,t,n)),r.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Hp(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||ym();const t=am(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=am(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}op(t,n),zm(t,o),cm(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new pp);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(t=!0),!t)return;const r={};for(let t=0;t<bp.length;t++){const o="rotate"+bp[t];n[o]&&(r[o]=n[o],e.setStaticValue(o,0))}e.render();for(const t in r)e.setStaticValue(t,r[t]);e.scheduleRender()}getProjectionStyles(e={}){var t,n;const r={};if(!this.instance||this.isSVG)return r;if(!this.isVisible)return{visibility:"hidden"};r.visibility="";const o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Gc(e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Gc(e.pointerEvents)||""),this.hasProjected&&!Sm(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const a=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=hp(this.projectionDeltaWithTransform,this.treeScale,a),o&&(r.transform=o(a,r.transform));const{x:s,y:l}=this.projectionDelta;r.transformOrigin=`${100*s.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=a.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:r.opacity=i===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const e in $l){if(void 0===a[e])continue;const{correct:t,applyTo:n}=$l[e],o="none"===r.transform?a[e]:t(a[e],i);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=o}else r[e]=o}return this.options.layoutId&&(r.pointerEvents=i===this?Gc(e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Pp),this.root.sharedNodes.clear()}}}function Ep(e){e.updateLayout()}function _p(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?xm((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=am(r);r.min=t[e].min,r.max=r.min+o})):Hp(o,n.layoutBox,t)&&xm((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],a=am(t[r]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)}));const a=bm();cm(a,t,n.layoutBox);const s=bm();i?cm(s,e.applyTransform(r,!0),n.measuredBox):cm(s,t,n.layoutBox);const l=!dp(a);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const a=ym();fm(a,n.layoutBox,o.layoutBox);const s=ym();fm(s,t,i.layoutBox),fp(a,s)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Sp(e){xp.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Cp(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function kp(e){e.clearSnapshot()}function Pp(e){e.clearMeasurements()}function Tp(e){e.isLayoutDirty=!1}function Ip(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Rp(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Mp(e){e.resolveTargetDelta()}function Np(e){e.calcProjection()}function Dp(e){e.resetRotation()}function Ap(e){e.removeLeadSnapshot()}function Op(e,t,n){e.translate=dd(t.translate,0,n),e.scale=dd(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function zp(e,t,n,r){e.min=dd(t.min,n.min,r),e.max=dd(t.max,n.max,r)}function Lp(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Fp={duration:.45,ease:[.4,0,.1,1]},Bp=e=>"undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().includes(e),jp=Bp("applewebkit/")&&!Bp("chrome/")?Math.round:Kc;function Vp(e){e.min=jp(e.min),e.max=jp(e.max)}function Hp(e,t,n){return"position"===e||"preserve-aspect"===e&&!sm(mp(t),mp(n),.2)}const $p=wp({attachResizeListener:(e,t)=>ou(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Wp={current:void 0},Up=wp({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Wp.current){const e=new $p({});e.mount(window),e.setOptions({layoutScroll:!0}),Wp.current=e}return Wp.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Gp={pan:{Feature:class extends gu{constructor(){super(...arguments),this.removePointerDownListener=Kc}onPointerDown(e){this.session=new Qf(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Vm(e),onStart:Vm(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Jc.update((()=>r(e,t)))}}}mount(){this.removePointerDownListener=lu(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends gu{constructor(e){super(e),this.removeGroupControls=Kc,this.removeListeners=Kc,this.controls=new Bm(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Kc}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Up,MeasureLayout:qm}},qp=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;const Yp=4;function Kp(e,t,n=1){Mu(n<=Yp,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=qp.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return Cf(e)?parseFloat(e):e}return Jl(o)?Kp(o,t,n+1):o}const Xp=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Zp=e=>Xp.has(e),Jp=e=>e===tc||e===fc,Qp=(e,t)=>parseFloat(e.split(", ")[t]),eh=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return Qp(o[1],t);{const t=r.match(/^matrix\((.+)\)$/);return t?Qp(t[1],e):0}},th=new Set(["x","y","z"]),nh=Wl.filter((e=>!th.has(e)));const rh={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:eh(4,13),y:eh(5,14)};rh.translateX=rh.x,rh.translateY=rh.y;const oh=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(Zp);let i=[],a=!1;const s=[];if(o.forEach((o=>{const l=e.getValue(o);if(!e.hasValue(o))return;let c=n[o],u=Af(c);const d=t[o];let f;if($c(d)){const e=d.length,t=null===d[0]?1:0;c=d[t],u=Af(c);for(let n=t;n<e&&null!==d[n];n++)f?Mu(Af(d[n])===f,"All keyframes must be of the same type"):(f=Af(d[n]),Mu(f===u||Jp(u)&&Jp(f),"Keyframes must be of the same dimension as the current value"))}else f=Af(d);if(u!==f)if(Jp(u)&&Jp(f)){const e=l.get();"string"==typeof e&&l.set(parseFloat(e)),"string"==typeof d?t[o]=parseFloat(d):Array.isArray(d)&&f===fc&&(t[o]=d.map(parseFloat))}else(null==u?void 0:u.transform)&&(null==f?void 0:f.transform)&&(0===c||0===d)?0===c?l.set(f.transform(c)):t[o]=u.transform(d):(a||(i=function(e){const t=[];return nh.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.render(),t}(e),a=!0),s.push(o),r[o]=void 0!==r[o]?r[o]:t[o],l.jump(d))})),s.length){const n=s.indexOf("height")>=0?window.pageYOffset:null,o=((e,t,n)=>{const r=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:a}=i,s={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach((e=>{s[e]=rh[e](r,i)})),t.render();const l=t.measureViewportBox();return n.forEach((n=>{const r=t.getValue(n);r&&r.jump(s[n]),e[n]=rh[n](l,i)})),e})(t,e,s);return i.length&&i.forEach((([t,n])=>{e.getValue(t).set(n)})),e.render(),wl&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:r}}return{target:t,transitionEnd:r}};function ih(e,t,n,r){return(e=>Object.keys(e).some(Zp))(t)?oh(e,t,n,r):{target:t,transitionEnd:r}}const ah=(e,t,n,r)=>{const o=function(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach((e=>{const t=e.get();if(!Jl(t))return;const n=Kp(t,r);n&&e.set(n)}));for(const e in t){const o=t[e];if(!Jl(o))continue;const i=Kp(o,r);i&&(t[e]=i,n||(n={}),void 0===n[e]&&(n[e]=o))}return{target:t,transitionEnd:n}}(e,t,r);return ih(e,t=o.target,n,r=o.transitionEnd)},sh={current:null},lh={current:!1};function ch(){if(lh.current=!0,wl)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>sh.current=e.matches;e.addListener(t),t()}else sh.current=!1}const uh=new WeakMap,dh=Object.keys(Al),fh=dh.length,mh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],ph=Tl.length;class hh{constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,visualState:o},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Jc.render(this.render,!1,!0);const{latestValues:a,renderState:s}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=s,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=i,this.isControllingVariants=Il(t),this.isVariantNode=Rl(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(t,{});for(const e in c){const t=c[e];void 0!==a[e]&&ql(t)&&(t.set(a[e],!1),Sf(l)&&l.add(e))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,uh.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),lh.current||ch(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||sh.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){uh.delete(this.current),this.projection&&this.projection.unmount(),Qc(this.notifyUpdate),Qc(this.render),this.valueSubscriptions.forEach((e=>e())),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const n=Ul.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Jc.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(()=>{r(),o()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures({children:e,...t},n,r,o){let i,a;for(let e=0;e<fh;e++){const n=dh[e],{isEnabled:r,Feature:o,ProjectionNode:s,MeasureLayout:l}=Al[n];s&&(i=s),r(t)&&(!this.features[n]&&o&&(this.features[n]=new o(this)),l&&(a=l))}if(!this.projection&&i){this.projection=new i(this.latestValues,this.parent&&this.parent.projection);const{layoutId:e,layout:n,drag:r,dragConstraints:a,layoutScroll:s,layoutRoot:l}=t;this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(r)||a&&Sl(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:o,layoutScroll:s,layoutRoot:l})}return a}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ym()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<mh.length;t++){const n=mh[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){const{willChange:r}=t;for(const o in t){const i=t[o],a=n[o];if(ql(i))e.addValue(o,i),Sf(r)&&r.add(o);else if(ql(a))e.addValue(o,Mf(i,{owner:e})),Sf(r)&&r.remove(o);else if(a!==i)if(e.hasValue(o)){const t=e.getValue(o);!t.hasAnimated&&t.set(i)}else{const t=e.getStaticValue(o);e.addValue(o,Mf(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let e=0;e<ph;e++){const n=Tl[e],r=this.props[n];(Cl(r)||!1===r)&&(t[n]=r)}return t}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Mf(t,{owner:this}),this.addValue(e,n)),n}readValue(e){var t;return void 0===this.latestValues[e]&&this.current?null!==(t=this.getBaseTargetFromProps(this.props,e))&&void 0!==t?t:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e]}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props,r="string"==typeof n||"object"==typeof n?null===(t=Vc(this.props,n))||void 0===t?void 0:t[e]:void 0;if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||ql(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new Tf),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class gh extends hh{sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...n},{transformValues:r},o){let i=function(e,t,n){const r={};for(const o in e){const e=Bf(o,t);if(void 0!==e)r[o]=e;else{const e=n.getValue(o);e&&(r[o]=e.get())}}return r}(n,e||{},this);if(r&&(t&&(t=r(t)),n&&(n=r(n)),i&&(i=r(i))),o){!function(e,t,n){var r,o;const i=Object.keys(t).filter((t=>!e.hasValue(t))),a=i.length;if(a)for(let s=0;s<a;s++){const a=i[s],l=t[a];let c=null;Array.isArray(l)&&(c=l[0]),null===c&&(c=null!==(o=null!==(r=n[a])&&void 0!==r?r:e.readValue(a))&&void 0!==o?o:t[a]),null!=c&&("string"==typeof c&&(Cf(c)||xf(c))?c=parseFloat(c):!zf(c)&&Cd.test(l)&&(c=yf(a,l)),e.addValue(a,Mf(c,{owner:e})),void 0===n[a]&&(n[a]=c),null!==c&&e.setBaseTarget(a,c))}}(this,n,i);const e=ah(this,n,i,t);t=e.transitionEnd,n=e.target}return{transition:e,transitionEnd:t,...n}}}class vh extends gh{readValueFromInstance(e,t){if(Ul.has(t)){const e=bf(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(Zl(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Lm(e,t)}build(e,t,n,r){bc(e,t,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return Bc(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ql(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}renderInstance(e,t,n,r){zc(e,t,n,r)}}class bh extends gh{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Ul.has(t)){const e=bf(t);return e&&e.default||0}return t=Lc.has(t)?t:Oc(t),e.getAttribute(t)}measureInstanceViewportBox(){return ym()}scrapeMotionValuesFromProps(e,t){return jc(e,t)}build(e,t,n,r){Rc(e,t,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,n,r){Fc(e,t,0,r)}mount(e){this.isSVGTag=Nc(e.tagName),super.mount(e)}}const yh=(e,t)=>Hl(e)?new bh(t,{enableHardwareAcceleration:!1}):new vh(t,{enableHardwareAcceleration:!0}),xh={...Zf,...ku,...Gp,...{layout:{ProjectionNode:Up,MeasureLayout:qm}}},wh=jl(((e,t)=>function(e,{forwardMotionProps:t=!1},n,r){return{...Hl(e)?nu:ru,preloadedFeatures:n,useRender:Ac(t),createVisualElement:r,Component:e}}(e,t,xh,yh)));function Eh(){const e=(0,r.useRef)(!1);return El((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function _h(){const e=Eh(),[t,n]=(0,r.useState)(0),o=(0,r.useCallback)((()=>{e.current&&n(t+1)}),[t]);return[(0,r.useCallback)((()=>Jc.postRender(o)),[o]),t]}class Sh extends r.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Ch({children:e,isPresent:t}){const n=(0,r.useId)(),o=(0,r.useRef)(null),i=(0,r.useRef)({width:0,height:0,top:0,left:0});return(0,r.useInsertionEffect)((()=>{const{width:e,height:r,top:a,left:s}=i.current;if(t||!o.current||!e||!r)return;o.current.dataset.motionPopId=n;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${r}px !important;\n top: ${a}px !important;\n left: ${s}px !important;\n }\n `),()=>{document.head.removeChild(l)}}),[t]),r.createElement(Sh,{isPresent:t,childRef:o,sizeRef:i},r.cloneElement(e,{ref:o}))}const kh=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:i,presenceAffectsLayout:a,mode:s})=>{const l=Hc(Ph),c=(0,r.useId)(),u=(0,r.useMemo)((()=>({id:c,initial:t,isPresent:n,custom:i,onExitComplete:e=>{l.set(e,!0);for(const e of l.values())if(!e)return;o&&o()},register:e=>(l.set(e,!1),()=>l.delete(e))})),a?void 0:[n]);return(0,r.useMemo)((()=>{l.forEach(((e,t)=>l.set(t,!1)))}),[n]),r.useEffect((()=>{!n&&!l.size&&o&&o()}),[n]),"popLayout"===s&&(e=r.createElement(Ch,{isPresent:n},e)),r.createElement(xl.Provider,{value:u},e)};function Ph(){return new Map}const Th=e=>e.key||"";const Ih=({children:e,custom:t,initial:n=!0,onExitComplete:o,exitBeforeEnter:i,presenceAffectsLayout:a=!0,mode:s="sync"})=>{Mu(!i,"Replace exitBeforeEnter with mode='wait'");const l=(0,r.useContext)(Ol).forceRender||_h()[0],c=Eh(),u=function(e){const t=[];return r.Children.forEach(e,(e=>{(0,r.isValidElement)(e)&&t.push(e)})),t}(e);let d=u;const f=(0,r.useRef)(new Map).current,m=(0,r.useRef)(d),p=(0,r.useRef)(new Map).current,h=(0,r.useRef)(!0);var g;if(El((()=>{h.current=!1,function(e,t){e.forEach((e=>{const n=Th(e);t.set(n,e)}))}(u,p),m.current=d})),g=()=>{h.current=!0,p.clear(),f.clear()},(0,r.useEffect)((()=>()=>g()),[]),h.current)return r.createElement(r.Fragment,null,d.map((e=>r.createElement(kh,{key:Th(e),isPresent:!0,initial:!!n&&void 0,presenceAffectsLayout:a,mode:s},e))));d=[...d];const v=m.current.map(Th),b=u.map(Th),y=v.length;for(let e=0;e<y;e++){const t=v[e];-1!==b.indexOf(t)||f.has(t)||f.set(t,void 0)}return"wait"===s&&f.size&&(d=[]),f.forEach(((e,n)=>{if(-1!==b.indexOf(n))return;const i=p.get(n);if(!i)return;const h=v.indexOf(n);let g=e;if(!g){const e=()=>{p.delete(n),f.delete(n);const e=m.current.findIndex((e=>e.key===n));if(m.current.splice(e,1),!f.size){if(m.current=u,!1===c.current)return;l(),o&&o()}};g=r.createElement(kh,{key:Th(i),isPresent:!1,onExitComplete:e,custom:t,presenceAffectsLayout:a,mode:s},i),f.set(n,g)}d.splice(h,0,g)})),d=d.map((e=>{const t=e.key;return f.has(t)?e:r.createElement(kh,{key:Th(e),isPresent:!0,presenceAffectsLayout:a,mode:s},e)})),r.createElement(r.Fragment,null,f.size?d:d.map((e=>(0,r.cloneElement)(e))))},Rh=["40em","52em","64em"],Mh=(e={})=>{const{defaultIndex:t=0}=e;if("number"!=typeof t)throw new TypeError(`Default breakpoint index should be a number. Got: ${t}, ${typeof t}`);if(t<0||t>Rh.length-1)throw new RangeError(`Default breakpoint index out of range. Theme has ${Rh.length} breakpoints, got index ${t}`);const[n,r]=(0,Uo.useState)(t);return(0,Uo.useEffect)((()=>{const e=()=>{const e=Rh.filter((e=>"undefined"!=typeof window&&window.matchMedia(`screen and (min-width: ${e})`).matches)).length;n!==e&&r(e)};return e(),"undefined"!=typeof window&&window.addEventListener("resize",e),()=>{"undefined"!=typeof window&&window.removeEventListener("resize",e)}}),[n]),n};function Nh(e,t={}){const n=Mh(t);if(!Array.isArray(e)&&"function"!=typeof e)return e;const r=e||[];return r[n>=r.length?r.length-1:n]}const Dh="4px";function Ah(e){if(void 0===e)return;if(!e)return"0";const t="number"==typeof e?e:Number(e);return"undefined"!=typeof window&&window.CSS?.supports?.("margin",e.toString())||Number.isNaN(t)?e.toString():`calc(${Dh} * ${e})`}const Oh={name:"zjik7",styles:"display:flex"},zh={name:"qgaee5",styles:"display:block;max-height:100%;max-width:100%;min-height:0;min-width:0"},Lh={name:"82a6rk",styles:"flex:1"},Fh={name:"13nosa1",styles:">*{min-height:0;}"},Bh={name:"1pwxzk4",styles:">*{min-width:0;}"};function jh(e){const{align:t,className:n,direction:r="row",expanded:o=!0,gap:i=2,justify:a="space-between",wrap:s=!1,...l}=rs(function(e){const{isReversed:t,...n}=e;return void 0!==t?(qo()("Flex isReversed",{alternative:'Flex direction="row-reverse" or "column-reverse"',since:"5.9"}),{...n,direction:t?"row-reverse":"row"}):n}(e),"Flex"),c=Nh(Array.isArray(r)?r:[r]),u="string"==typeof c&&!!c.includes("column"),d=ns();return{...l,className:(0,Uo.useMemo)((()=>{const e=Ps({alignItems:null!=t?t:u?"normal":"center",flexDirection:c,flexWrap:s?"wrap":void 0,gap:Ah(i),justifyContent:a,height:u&&o?"100%":void 0,width:!u&&o?"100%":void 0},"","");return d(Oh,e,u?Fh:Bh,n)}),[t,n,d,c,o,i,u,a,s]),isColumn:u}}const Vh=(0,Uo.createContext)({flexItemDisplay:void 0}),Hh=()=>(0,Uo.useContext)(Vh);const $h=os((function(e,t){const{children:n,isColumn:o,...i}=jh(e);return(0,r.createElement)(Vh.Provider,{value:{flexItemDisplay:o?"block":void 0}},(0,r.createElement)(xs,{...i,ref:t},n))}),"Flex");function Wh(e){const{className:t,display:n,isBlock:r=!1,...o}=rs(e,"FlexItem"),i={},a=Hh().flexItemDisplay;i.Base=Ps({display:n||a},"","");return{...o,className:ns()(zh,i.Base,r&&Lh,t)}}const Uh=os((function(e,t){const n=function(e){return Wh({isBlock:!0,...rs(e,"FlexBlock")})}(e);return(0,r.createElement)(xs,{...n,ref:t})}),"FlexBlock"),Gh=new RegExp(/-left/g),qh=new RegExp(/-right/g),Yh=new RegExp(/Left/g),Kh=new RegExp(/Right/g);function Xh(e){return"left"===e?"right":"right"===e?"left":Gh.test(e)?e.replace(Gh,"-right"):qh.test(e)?e.replace(qh,"-left"):Yh.test(e)?e.replace(Yh,"Right"):Kh.test(e)?e.replace(Kh,"Left"):e}const Zh=(e={})=>Object.fromEntries(Object.entries(e).map((([e,t])=>[Xh(e),t])));function Jh(e={},t){return()=>t?(0,u.isRTL)()?Ps(t,""):Ps(e,""):(0,u.isRTL)()?Ps(Zh(e),""):Ps(e,"")}Jh.watch=()=>(0,u.isRTL)();const Qh=e=>null!=e;const eg=os((function(e,t){const n=function(e){const{className:t,margin:n,marginBottom:r=2,marginLeft:o,marginRight:i,marginTop:a,marginX:s,marginY:l,padding:c,paddingBottom:u,paddingLeft:d,paddingRight:f,paddingTop:m,paddingX:p,paddingY:h,...g}=rs(e,"Spacer");return{...g,className:ns()(Qh(n)&&Ps("margin:",Ah(n),";",""),Qh(l)&&Ps("margin-bottom:",Ah(l),";margin-top:",Ah(l),";",""),Qh(s)&&Ps("margin-left:",Ah(s),";margin-right:",Ah(s),";",""),Qh(a)&&Ps("margin-top:",Ah(a),";",""),Qh(r)&&Ps("margin-bottom:",Ah(r),";",""),Qh(o)&&Jh({marginLeft:Ah(o)})(),Qh(i)&&Jh({marginRight:Ah(i)})(),Qh(c)&&Ps("padding:",Ah(c),";",""),Qh(h)&&Ps("padding-bottom:",Ah(h),";padding-top:",Ah(h),";",""),Qh(p)&&Ps("padding-left:",Ah(p),";padding-right:",Ah(p),";",""),Qh(m)&&Ps("padding-top:",Ah(m),";",""),Qh(u)&&Ps("padding-bottom:",Ah(u),";",""),Qh(d)&&Jh({paddingLeft:Ah(d)})(),Qh(f)&&Jh({paddingRight:Ah(f)})(),t)}}(e);return(0,r.createElement)(xs,{...n,ref:t})}),"Spacer"),tg=eg,ng=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})),rg=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M7 11.5h10V13H7z"}));const og=os((function(e,t){const n=Wh(e);return(0,r.createElement)(xs,{...n,ref:t})}),"FlexItem");const ig={name:"hdknak",styles:"display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"};function ag(e){return null!=e}const sg=e=>"string"==typeof e?(e=>parseFloat(e))(e):e,lg="…",cg={auto:"auto",head:"head",middle:"middle",tail:"tail",none:"none"},ug={ellipsis:lg,ellipsizeMode:cg.auto,limit:0,numberOfLines:0};function dg(e="",t){const n={...ug,...t},{ellipsis:r,ellipsizeMode:o,limit:i}=n;if(o===cg.none)return e;let a,s;switch(o){case cg.head:a=0,s=i;break;case cg.middle:a=Math.floor(i/2),s=Math.floor(i/2);break;default:a=i,s=0}const l=o!==cg.auto?function(e,t,n,r){if("string"!=typeof e)return"";const o=e.length,i=~~t,a=~~n,s=ag(r)?r:lg;return 0===i&&0===a||i>=o||a>=o||i+a>=o?e:0===a?e.slice(0,i)+s:e.slice(0,i)+s+e.slice(o-a)}(e,a,s,r):e;return l}function fg(e){const{className:t,children:n,ellipsis:r=lg,ellipsizeMode:o=cg.auto,limit:i=0,numberOfLines:a=0,...s}=rs(e,"Truncate"),l=ns();let c;"string"==typeof n?c=n:"number"==typeof n&&(c=n.toString());const u=c?dg(c,{ellipsis:r,ellipsizeMode:o,limit:i,numberOfLines:a}):n,d=!!c&&o===cg.auto;return{...s,className:(0,Uo.useMemo)((()=>l(d&&!a&&ig,d&&!!a&&Ps("-webkit-box-orient:vertical;-webkit-line-clamp:",a,";display:-webkit-box;overflow:hidden;",""),t)),[t,l,a,d]),children:u}}var mg={grad:.9,turn:360,rad:360/(2*Math.PI)},pg=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},hg=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},gg=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},vg=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},bg=function(e){return{r:gg(e.r,0,255),g:gg(e.g,0,255),b:gg(e.b,0,255),a:gg(e.a)}},yg=function(e){return{r:hg(e.r),g:hg(e.g),b:hg(e.b),a:hg(e.a,3)}},xg=/^#([0-9a-f]{3,8})$/i,wg=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Eg=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:60*(s<0?s+6:s),s:i?a/i*100:0,v:i/255*100,a:o}},_g=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),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:255*[r,s,a,a,l,r][c],g:255*[l,r,r,s,a,a][c],b:255*[a,a,l,r,r,s][c],a:o}},Sg=function(e){return{h:vg(e.h),s:gg(e.s,0,100),l:gg(e.l,0,100),a:gg(e.a)}},Cg=function(e){return{h:hg(e.h),s:hg(e.s),l:hg(e.l),a:hg(e.a,3)}},kg=function(e){return _g((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},Pg=function(e){return{h:(t=Eg(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},Tg=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ig=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Rg=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Mg=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ng={string:[[function(e){var t=xg.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?hg(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?hg(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Rg.exec(e)||Mg.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:bg({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=Tg.exec(e)||Ig.exec(e);if(!t)return null;var n,r,o=Sg({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(mg[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return kg(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 pg(t)&&pg(n)&&pg(r)?bg({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(!pg(t)||!pg(n)||!pg(r))return null;var a=Sg({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return kg(a)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!pg(t)||!pg(n)||!pg(r))return null;var a=function(e){return{h:vg(e.h),s:gg(e.s,0,100),v:gg(e.v,0,100),a:gg(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return _g(a)},"hsv"]]},Dg=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},Ag=function(e){return"string"==typeof e?Dg(e.trim(),Ng.string):"object"==typeof e&&null!==e?Dg(e,Ng.object):[null,void 0]},Og=function(e,t){var n=Pg(e);return{h:n.h,s:gg(n.s+100*t,0,100),l:n.l,a:n.a}},zg=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Lg=function(e,t){var n=Pg(e);return{h:n.h,s:n.s,l:gg(n.l+100*t,0,100),a:n.a}},Fg=function(){function e(e){this.parsed=Ag(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return hg(zg(this.rgba),2)},e.prototype.isDark=function(){return zg(this.rgba)<.5},e.prototype.isLight=function(){return zg(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=yg(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?wg(hg(255*o)):"","#"+wg(t)+wg(n)+wg(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return yg(this.rgba)},e.prototype.toRgbString=function(){return t=(e=yg(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 Cg(Pg(this.rgba))},e.prototype.toHslString=function(){return t=(e=Cg(Pg(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=Eg(this.rgba),{h:hg(e.h),s:hg(e.s),v:hg(e.v),a:hg(e.a,3)};var e},e.prototype.invert=function(){return Bg({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),Bg(Og(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Bg(Og(this.rgba,-e))},e.prototype.grayscale=function(){return Bg(Og(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Bg(Lg(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Bg(Lg(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?Bg({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):hg(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Pg(this.rgba);return"number"==typeof e?Bg({h:e,s:t.s,l:t.l,a:t.a}):hg(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Bg(e).toHex()},e}(),Bg=function(e){return e instanceof Fg?e:new Fg(e)},jg=[],Vg=function(e){e.forEach((function(e){jg.indexOf(e)<0&&(e(Fg,Ng),jg.push(e))}))};function Hg(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,a,s=r[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var l=this.toRgb(),c=1/0,u="black";if(!i.length)for(var d in n)i[d]=new e(n[d]).toRgb();for(var f in n){var m=(o=l,a=i[f],Math.pow(o.r-a.r,2)+Math.pow(o.g-a.g,2)+Math.pow(o.b-a.b,2));m<c&&(c=m,u=f)}return u}},t.string.push([function(t){var r=t.toLowerCase(),o="transparent"===r?"#0000":n[r];return o?new e(o).toRgb():null},"name"])}let $g;Vg([Hg]);const Wg=Si((function(e){if("string"!=typeof e)return"";if("string"==typeof(t=e)&&Bg(t).isValid())return e;var t;if(!e.includes("var("))return"";if("undefined"==typeof document)return"";const n=function(){if("undefined"!=typeof document){if(!$g){const e=document.createElement("div");e.setAttribute("data-g2-color-computation-node",""),document.body.appendChild(e),$g=e}return $g}}();if(!n)return"";n.style.background=e;const r=window?.getComputedStyle(n).background;return n.style.background="",r||""}));function Ug(e){const t=function(e){const t=Wg(e);return Bg(t).isLight()?"#000000":"#ffffff"}(e);return"#000000"===t?"dark":"light"}const Gg="36px",qg="12px",Yg={controlSurfaceColor:Ds.white,controlTextActiveColor:Ds.theme.accent,controlPaddingX:qg,controlPaddingXLarge:`calc(${qg} * 1.3334)`,controlPaddingXSmall:`calc(${qg} / 1.3334)`,controlBackgroundColor:Ds.white,controlBorderRadius:"2px",controlBoxShadow:"transparent",controlBoxShadowFocus:`0 0 0 0.5px ${Ds.theme.accent}`,controlDestructiveBorderColor:Ds.alert.red,controlHeight:Gg,controlHeightXSmall:`calc( ${Gg} * 0.6 )`,controlHeightSmall:`calc( ${Gg} * 0.8 )`,controlHeightLarge:`calc( ${Gg} * 1.2 )`,controlHeightXLarge:`calc( ${Gg} * 1.4 )`},Kg={toggleGroupControlBackgroundColor:Yg.controlBackgroundColor,toggleGroupControlBorderColor:Ds.ui.border,toggleGroupControlBackdropBackgroundColor:Yg.controlSurfaceColor,toggleGroupControlBackdropBorderColor:Ds.ui.border,toggleGroupControlButtonColorActive:Yg.controlBackgroundColor},Xg=Object.assign({},Yg,Kg,{colorDivider:"rgba(0, 0, 0, 0.1)",colorScrollbarThumb:"rgba(0, 0, 0, 0.2)",colorScrollbarThumbHover:"rgba(0, 0, 0, 0.5)",colorScrollbarTrack:"rgba(0, 0, 0, 0.04)",elevationIntensity:1,radiusBlockUi:"2px",borderWidth:"1px",borderWidthFocus:"1.5px",borderWidthTab:"4px",spinnerSize:16,fontSize:"13px",fontSizeH1:"calc(2.44 * 13px)",fontSizeH2:"calc(1.95 * 13px)",fontSizeH3:"calc(1.56 * 13px)",fontSizeH4:"calc(1.25 * 13px)",fontSizeH5:"13px",fontSizeH6:"calc(0.8 * 13px)",fontSizeInputMobile:"16px",fontSizeMobile:"15px",fontSizeSmall:"calc(0.92 * 13px)",fontSizeXSmall:"calc(0.75 * 13px)",fontLineHeightBase:"1.2",fontWeight:"normal",fontWeightHeading:"600",gridBase:"4px",cardBorderRadius:"2px",cardPaddingXSmall:`${Ah(2)}`,cardPaddingSmall:`${Ah(4)}`,cardPaddingMedium:`${Ah(4)} ${Ah(6)}`,cardPaddingLarge:`${Ah(6)} ${Ah(8)}`,popoverShadow:"0 0.7px 1px rgba(0, 0, 0, 0.1), 0 1.2px 1.7px -0.2px rgba(0, 0, 0, 0.1), 0 2.3px 3.3px -0.5px rgba(0, 0, 0, 0.1)",surfaceBackgroundColor:Ds.white,surfaceBackgroundSubtleColor:"#F3F3F3",surfaceBackgroundTintColor:"#F5F5F5",surfaceBorderColor:"rgba(0, 0, 0, 0.1)",surfaceBorderBoldColor:"rgba(0, 0, 0, 0.15)",surfaceBorderSubtleColor:"rgba(0, 0, 0, 0.05)",surfaceBackgroundTertiaryColor:Ds.white,surfaceColor:Ds.white,transitionDuration:"200ms",transitionDurationFast:"160ms",transitionDurationFaster:"120ms",transitionDurationFastest:"100ms",transitionTimingFunction:"cubic-bezier(0.08, 0.52, 0.52, 1)",transitionTimingFunctionControl:"cubic-bezier(0.12, 0.8, 0.32, 1)"});const Zg=Ps("color:",Ds.gray[900],";line-height:",Xg.fontLineHeightBase,";margin:0;",""),Jg={name:"4zleql",styles:"display:block"},Qg=Ps("color:",Ds.alert.green,";",""),ev=Ps("color:",Ds.alert.red,";",""),tv=Ps("color:",Ds.gray[700],";",""),nv=Ps("mark{background:",Ds.alert.yellow,";border-radius:2px;box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;}",""),rv={name:"50zrmy",styles:"text-transform:uppercase"};var ov=o(9664);const iv=Si((e=>{const t={};for(const n in e)t[n.toLowerCase()]=e[n];return t}));const av=13,sv={body:av,caption:10,footnote:11,largeTitle:28,subheadline:12,title:20},lv=[1,2,3,4,5,6].flatMap((e=>[e,e.toString()]));function cv(e=av){if(e in sv)return cv(sv[e]);if("number"!=typeof e){const t=parseFloat(e);if(Number.isNaN(t))return e;e=t}return`calc(${`(${e} / ${av})`} * ${Xg.fontSize})`}function uv(e=3){if(!lv.includes(e))return cv(e);return Xg[`fontSizeH${e}`]}var dv={name:"50zrmy",styles:"text-transform:uppercase"};function fv(t){const{adjustLineHeightForInnerControls:n,align:r,children:o,className:i,color:a,ellipsizeMode:s,isDestructive:l=!1,display:c,highlightEscape:u=!1,highlightCaseSensitive:d=!1,highlightWords:f,highlightSanitize:m,isBlock:p=!1,letterSpacing:h,lineHeight:g,optimizeReadabilityFor:v,size:b,truncate:y=!1,upperCase:x=!1,variant:w,weight:E=Xg.fontWeight,..._}=rs(t,"Text");let S=o;const C=Array.isArray(f),k="caption"===b;if(C){if("string"!=typeof o)throw new TypeError("`children` of `Text` must only be `string` types when `highlightWords` is defined");S=function({activeClassName:e="",activeIndex:t=-1,activeStyle:n,autoEscape:r,caseSensitive:o=!1,children:i,findChunks:a,highlightClassName:s="",highlightStyle:l={},highlightTag:c="mark",sanitize:u,searchWords:d=[],unhighlightClassName:f="",unhighlightStyle:m}){if(!i)return null;if("string"!=typeof i)return i;const p=i,h=(0,ov.findAll)({autoEscape:r,caseSensitive:o,findChunks:a,sanitize:u,searchWords:d,textToHighlight:p}),g=c;let v,b=-1,y="";const x=h.map(((r,i)=>{const a=p.substr(r.start,r.end-r.start);if(r.highlight){let r;b++,r="object"==typeof s?o?s[a]:(s=iv(s))[a.toLowerCase()]:s;const c=b===+t;y=`${r} ${c?e:""}`,v=!0===c&&null!==n?Object.assign({},l,n):l;const u={children:a,className:y,key:i,style:v};return"string"!=typeof g&&(u.highlightIndex=b),(0,Uo.createElement)(g,u)}return(0,Uo.createElement)("span",{children:a,className:f,key:i,style:m})}));return x}({autoEscape:u,children:o,caseSensitive:d,searchWords:f,sanitize:m})}const P=ns();let T;!0===y&&(T="auto"),!1===y&&(T="none");const I=fg({..._,className:(0,Uo.useMemo)((()=>{const t={},o=function(e,t){if(t)return t;if(!e)return;let n=`calc(${Xg.controlHeight} + ${Ah(2)})`;switch(e){case"large":n=`calc(${Xg.controlHeightLarge} + ${Ah(2)})`;break;case"small":n=`calc(${Xg.controlHeightSmall} + ${Ah(2)})`;break;case"xSmall":n=`calc(${Xg.controlHeightXSmall} + ${Ah(2)})`}return n}(n,g);if(t.Base=Ps({color:a,display:c,fontSize:cv(b),fontWeight:E,lineHeight:o,letterSpacing:h,textAlign:r},"",""),t.upperCase=dv,t.optimalTextColor=null,v){const e="dark"===Ug(v);t.optimalTextColor=Ps(e?{color:Ds.gray[900]}:{color:Ds.white},"","")}return P(Zg,t.Base,t.optimalTextColor,l&&ev,!!C&&nv,p&&Jg,k&&tv,w&&e[w],x&&t.upperCase,i)}),[n,r,i,a,P,c,p,k,l,C,h,g,v,b,x,w,E]),children:o,ellipsizeMode:s||T});return!y&&Array.isArray(o)&&(S=Uo.Children.map(o,(e=>{if("object"!=typeof e||null===e||!("props"in e))return e;return ls(e,["Link"])?(0,Uo.cloneElement)(e,{size:e.props.size||"inherit"}):e}))),{...I,children:y?I.children:S}}const mv=os((function(e,t){const n=fv(e);return(0,r.createElement)(xs,{as:"span",...n,ref:t})}),"Text");const pv={name:"9amh4a",styles:"font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase"};var hv={name:"1739oy8",styles:"z-index:1"};const gv=({isFocused:e})=>e?hv:"",vv=bs($h,{target:"em5sgkm7"})("box-sizing:border-box;position:relative;border-radius:2px;padding-top:0;",gv,";");var bv={name:"1d3w5wq",styles:"width:100%"};const yv=bs("div",{target:"em5sgkm6"})("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;",(({disabled:e})=>Ps({backgroundColor:e?Ds.ui.backgroundDisabled:Ds.ui.background},"",""))," ",(({__unstableInputWidth:e,labelPosition:t})=>e?"side"===t?"":Ps("edge"===t?{flex:`0 0 ${e}`}:{width:e},"",""):bv),";"),xv=({inputSize:e})=>{const t={default:"13px",small:"11px",compact:"13px","__unstable-large":"13px"},n=t[e]||t.default;return n?Ps("font-size:","16px",";@media ( min-width: 600px ){font-size:",n,";}",""):""},wv=({inputSize:e,__next40pxDefaultSize:t})=>{const n={default:{height:40,lineHeight:1,minHeight:40,paddingLeft:Ah(4),paddingRight:Ah(4)},small:{height:24,lineHeight:1,minHeight:24,paddingLeft:Ah(2),paddingRight:Ah(2)},compact:{height:32,lineHeight:1,minHeight:32,paddingLeft:Ah(2),paddingRight:Ah(2)},"__unstable-large":{height:40,lineHeight:1,minHeight:40,paddingLeft:Ah(4),paddingRight:Ah(4)}};return t||(n.default=n.compact),n[e]||n.default},Ev=bs("input",{target:"em5sgkm5"})("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",Ds.theme.foreground,";display:block;font-family:inherit;margin:0;outline:none;width:100%;",(({isDragging:e,dragCursor:t})=>{let n,r;return e&&(n=Ps("cursor:",t,";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}","")),e&&t&&(r=Ps("&:active{cursor:",t,";}","")),Ps(n," ",r,";","")})," ",(({disabled:e})=>e?Ps({color:Ds.ui.textDisabled},"",""):"")," ",xv," ",(e=>Ps(wv(e),"",""))," ",(({paddingInlineStart:e,paddingInlineEnd:t})=>Ps({paddingInlineStart:e,paddingInlineEnd:t},"",""))," &::-webkit-input-placeholder{line-height:normal;}}"),_v=bs(mv,{target:"em5sgkm4"})("&&&{",pv,";box-sizing:border-box;display:block;padding-top:0;padding-bottom:0;max-width:100%;z-index:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"),Sv=e=>(0,r.createElement)(_v,{...e,as:"label"}),Cv=bs(og,{target:"em5sgkm3"})({name:"1b6uupn",styles:"max-width:calc( 100% - 10px )"}),kv=bs("div",{target:"em5sgkm2"})("&&&{box-sizing:border-box;border-radius:inherit;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;",(({disabled:e,isBorderless:t,isFocused:n})=>{let r,o,i,a=t?"transparent":Ds.ui.border;return n&&(a=Ds.ui.borderFocus,r=Xg.controlBoxShadowFocus,o="2px solid transparent",i="-2px"),e&&(a=t?"transparent":Ds.ui.borderDisabled),Ps({boxShadow:r,borderColor:a,borderStyle:"solid",borderWidth:1,outline:o,outlineOffset:i},"","")})," ",Jh({paddingLeft:2}),";}"),Pv=bs("span",{target:"em5sgkm1"})({name:"pvvbxf",styles:"box-sizing:border-box;display:block"}),Tv=bs("span",{target:"em5sgkm0"})({name:"jgf79h",styles:"align-items:center;align-self:stretch;box-sizing:border-box;display:flex"});const Iv=(0,Uo.memo)((function({disabled:e=!1,isBorderless:t=!1,isFocused:n=!1}){return(0,r.createElement)(kv,{"aria-hidden":"true",className:"components-input-control__backdrop",disabled:e,isBorderless:t,isFocused:n})})),Rv=Iv;function Mv({children:e,hideLabelFromVision:t,htmlFor:n,...o}){return e?t?(0,r.createElement)(ws,{as:"label",htmlFor:n},e):(0,r.createElement)(Cv,null,(0,r.createElement)(Sv,{htmlFor:n,...o},e)):null}function Nv(e){const{__next36pxDefaultSize:t,__next40pxDefaultSize:n,...r}=e;return{...r,__next40pxDefaultSize:null!=n?n:t}}function Dv(e){const t={};switch(e){case"top":t.direction="column",t.expanded=!1,t.gap=0;break;case"bottom":t.direction="column-reverse",t.expanded=!1,t.gap=0;break;case"edge":t.justify="space-between"}return t}function Av(e,t){const{__next40pxDefaultSize:n,__unstableInputWidth:o,children:i,className:a,disabled:s=!1,hideLabelFromVision:l=!1,labelPosition:c,id:u,isBorderless:f=!1,isFocused:m=!1,label:p,prefix:h,size:g="default",suffix:v,...b}=Nv(rs(e,"InputBase")),y=function(e){const t=(0,d.useInstanceId)(Av);return e||`input-base-control-${t}`}(u),x=l||!p,{paddingLeft:w,paddingRight:E}=wv({inputSize:g,__next40pxDefaultSize:n}),_=(0,Uo.useMemo)((()=>({InputControlPrefixWrapper:{paddingLeft:w},InputControlSuffixWrapper:{paddingRight:E}})),[w,E]);return(0,r.createElement)(vv,{...b,...Dv(c),className:a,gap:2,isFocused:m,labelPosition:c,ref:t},(0,r.createElement)(Mv,{className:"components-input-control__label",hideLabelFromVision:l,labelPosition:c,htmlFor:y},p),(0,r.createElement)(yv,{__unstableInputWidth:o,className:"components-input-control__container",disabled:s,hideLabel:x,labelPosition:c},(0,r.createElement)(mi,{value:_},h&&(0,r.createElement)(Pv,{className:"components-input-control__prefix"},h),i,v&&(0,r.createElement)(Tv,{className:"components-input-control__suffix"},v)),(0,r.createElement)(Rv,{disabled:s,isBorderless:f,isFocused:m})))}const Ov=os(Av,"InputBase");const zv={toVector:(e,t)=>(void 0===e&&(e=t),Array.isArray(e)?e:[e,e]),add:(e,t)=>[e[0]+t[0],e[1]+t[1]],sub:(e,t)=>[e[0]-t[0],e[1]-t[1]],addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function Lv(e,t,n){return 0===t||Math.abs(t)===1/0?Math.pow(e,5*n):e*t*n/(t+n*e)}function Fv(e,t,n,r=.15){return 0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-Lv(t-e,n-t,r)+t:e>n?+Lv(e-n,n-t,r)+n:e}function Bv(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function jv(e,t,n){return(t=Bv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vv(Object(n),!0).forEach((function(t){jv(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const $v={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function Wv(e){return e?e[0].toUpperCase()+e.slice(1):""}const Uv=["enter","leave"];function Gv(e,t="",n=!1){const r=$v[e],o=r&&r[t]||t;return"on"+Wv(e)+Wv(o)+(function(e=!1,t){return e&&!Uv.includes(t)}(n,o)?"Capture":"")}const qv=["gotpointercapture","lostpointercapture"];function Yv(e){let t=e.substring(2).toLowerCase();const n=!!~t.indexOf("passive");n&&(t=t.replace("passive",""));const r=qv.includes(t)?"capturecapture":"capture",o=!!~t.indexOf(r);return o&&(t=t.replace("capture","")),{device:t,capture:o,passive:n}}function Kv(e){return"touches"in e}function Xv(e){return Kv(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function Zv(e){return Kv(e)?function(e){return"touchend"===e.type||"touchcancel"===e.type?e.changedTouches:e.targetTouches}(e)[0]:e}function Jv(e){return function(e){return Array.from(e.touches).filter((t=>{var n,r;return t.target===e.currentTarget||(null===(n=e.currentTarget)||void 0===n||null===(r=n.contains)||void 0===r?void 0:r.call(n,t.target))}))}(e).map((e=>e.identifier))}function Qv(e){const t=Zv(e);return Kv(e)?t.identifier:t.pointerId}function eb(e){const t=Zv(e);return[t.clientX,t.clientY]}function tb(e,...t){return"function"==typeof e?e(...t):e}function nb(){}function rb(...e){return 0===e.length?nb:1===e.length?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function ob(e,t){return Object.assign({},t,e||{})}class ib{constructor(e,t,n){this.ctrl=e,this.args=t,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:e,shared:t,ingKey:n,args:r}=this;t[n]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=r,e.axis=void 0,e.memo=void 0,e.elapsedTime=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){const t=this.state,n=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=e.target,t.currentTarget=e.currentTarget,t.lastOffset=n.from?tb(n.from,t):t.offset,t.offset=t.lastOffset),t.startTime=t.timeStamp=e.timeStamp}computeValues(e){const t=this.state;t._values=e,t.values=this.config.transform(e)}computeInitial(){const e=this.state;e._initial=e._values,e.initial=e.values}compute(e){const{state:t,config:n,shared:r}=this;t.args=this.args;let o=0;if(e&&(t.event=e,n.preventDefault&&e.cancelable&&t.event.preventDefault(),t.type=e.type,r.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,r.locked=!!document.pointerLockElement,Object.assign(r,function(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i})}return t}(e)),r.down=r.pressed=r.buttons%2==1||r.touches>0,o=e.timeStamp-t.timeStamp,t.timeStamp=e.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const e=t._delta.map(Math.abs);zv.addTo(t._distance,e)}this.axisIntent&&this.axisIntent(e);const[i,a]=t._movement,[s,l]=n.threshold,{_step:c,values:u}=t;if(n.hasCustomTransform?(!1===c[0]&&(c[0]=Math.abs(i)>=s&&u[0]),!1===c[1]&&(c[1]=Math.abs(a)>=l&&u[1])):(!1===c[0]&&(c[0]=Math.abs(i)>=s&&Math.sign(i)*s),!1===c[1]&&(c[1]=Math.abs(a)>=l&&Math.sign(a)*l)),t.intentional=!1!==c[0]||!1!==c[1],!t.intentional)return;const d=[0,0];if(n.hasCustomTransform){const[e,t]=u;d[0]=!1!==c[0]?e-c[0]:0,d[1]=!1!==c[1]?t-c[1]:0}else d[0]=!1!==c[0]?i-c[0]:0,d[1]=!1!==c[1]?a-c[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(d);const f=t.offset,m=t._active&&!t._blocked||t.active;m&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=r[this.ingKey]=t._active,e&&(t.first&&("bounds"in n&&(t._bounds=tb(n.bounds,t)),this.setup&&this.setup()),t.movement=d,this.computeOffset()));const[p,h]=t.offset,[[g,v],[b,y]]=t._bounds;t.overflow=[p<g?-1:p>v?1:0,h<b?-1:h>y?1:0],t._movementBound[0]=!!t.overflow[0]&&(!1===t._movementBound[0]?t._movement[0]:t._movementBound[0]),t._movementBound[1]=!!t.overflow[1]&&(!1===t._movementBound[1]?t._movement[1]:t._movementBound[1]);const x=t._active&&n.rubberband||[0,0];if(t.offset=function(e,[t,n],[r,o]){const[[i,a],[s,l]]=e;return[Fv(t,i,a,r),Fv(n,s,l,o)]}(t._bounds,t.offset,x),t.delta=zv.sub(t.offset,f),this.computeMovement(),m&&(!t.last||o>32)){t.delta=zv.sub(t.offset,f);const e=t.delta.map(Math.abs);zv.addTo(t.distance,e),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&o>0&&(t.velocity=[e[0]/o,e[1]/o])}}emit(){const e=this.state,t=this.shared,n=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!n.triggerAllEvents)return;const r=this.handler(Hv(Hv(Hv({},t),e),{},{[this.aliasKey]:e.values}));void 0!==r&&(e.memo=r)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}class ab extends ib{constructor(...e){super(...e),jv(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=zv.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=zv.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const t=this.state,n=this.config;if(!t.axis&&e){const r="object"==typeof n.axisThreshold?n.axisThreshold[Xv(e)]:n.axisThreshold;t.axis=function([e,t],n){const r=Math.abs(e),o=Math.abs(t);return r>o&&r>n?"x":o>r&&o>n?"y":void 0}(t._movement,r)}t._blocked=(n.lockDirection||!!n.axis)&&!t.axis||!!n.axis&&n.axis!==t.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":e[1]=0;break;case"y":e[0]=0}}}const sb=e=>e,lb={enabled:(e=!0)=>e,eventOptions:(e,t,n)=>Hv(Hv({},n.shared.eventOptions),e),preventDefault:(e=!1)=>e,triggerAllEvents:(e=!1)=>e,rubberband(e=0){switch(e){case!0:return[.15,.15];case!1:return[0,0];default:return zv.toVector(e)}},from:e=>"function"==typeof e?e:null!=e?zv.toVector(e):void 0,transform(e,t,n){const r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||sb},threshold:e=>zv.toVector(e,0)};const cb=Hv(Hv({},lb),{},{axis(e,t,{axis:n}){if(this.lockDirection="lock"===n,!this.lockDirection)return n},axisThreshold:(e=0)=>e,bounds(e={}){if("function"==typeof e)return t=>cb.bounds(e(t));if("current"in e)return()=>e.current;if("function"==typeof HTMLElement&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:o=1/0}=e;return[[t,n],[r,o]]}}),ub={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]};const db="undefined"!=typeof window&&window.document&&window.document.createElement;function fb(){return db&&"ontouchstart"in window||db&&window.navigator.maxTouchPoints>1}const mb={isBrowser:db,gesture:function(){try{return"constructor"in GestureEvent}catch(e){return!1}}(),touch:fb(),touchscreen:fb(),pointer:db&&"onpointerdown"in window,pointerLock:db&&"exitPointerLock"in window.document},pb={mouse:0,touch:0,pen:8},hb=Hv(Hv({},cb),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:o=!1}={}}){return this.pointerLock=r&&mb.pointerLock,mb.touch&&n?"touch":this.pointerLock?"mouse":mb.pointer&&!o?"pointer":mb.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay="number"==typeof n?n:n||void 0===n&&e?250:void 0,mb.touchscreen&&!1!==n)return e||(void 0!==n?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1,keys:o=!0}={}}){return this.pointerButtons=r,this.keys=o,!this.pointerLock&&"pointer"===this.device&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:r=3,axis:o}){const i=zv.toVector(e,n?r:o?1:0);return this.filterTaps=n,this.tapsThreshold=r,i},swipe({velocity:e=.5,distance:t=50,duration:n=250}={}){return{velocity:this.transform(zv.toVector(e)),distance:this.transform(zv.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return 180;case!1:return 0;default:return e}},axisThreshold:e=>e?Hv(Hv({},pb),e):pb,keyboardDisplacement:(e=10)=>e});Hv(Hv({},lb),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!mb.touch&&mb.gesture)return"gesture";if(mb.touch&&r)return"touch";if(mb.touchscreen){if(mb.pointer)return"pointer";if(mb.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const o=e=>{const t=ob(tb(n,e),{min:-1/0,max:1/0});return[t.min,t.max]},i=e=>{const t=ob(tb(r,e),{min:-1/0,max:1/0});return[t.min,t.max]};return"function"!=typeof n&&"function"!=typeof r?[o(),i()]:e=>[o(e),i(e)]},threshold(e,t,n){this.lockDirection="lock"===n.axis;return zv.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey:e=>void 0===e?"ctrlKey":e,pinchOnWheel:(e=!0)=>e});Hv(Hv({},cb),{},{mouseOnly:(e=!0)=>e});Hv(Hv({},cb),{},{mouseOnly:(e=!0)=>e});const gb=new Map,vb=new Map;const bb={key:"drag",engine:class extends ab{constructor(...e){super(...e),jv(this,"ingKey","dragging")}reset(){super.reset();const e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){const e=this.state;if(e._bounds instanceof HTMLElement){const t=e._bounds.getBoundingClientRect(),n=e.currentTarget.getBoundingClientRect(),r={left:t.left-n.left+e.offset[0],right:t.right-n.right+e.offset[0],top:t.top-n.top+e.offset[1],bottom:t.bottom-n.bottom+e.offset[1]};e._bounds=cb.bounds(r)}}cancel(){const e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout((()=>{this.compute(),this.emit()}),0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){const t=this.config,n=this.state;if(null!=e.buttons&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(e.buttons):-1!==t.pointerButtons&&t.pointerButtons!==e.buttons))return;const r=this.ctrl.setEventIds(e);t.pointerCapture&&e.target.setPointerCapture(e.pointerId),r&&r.size>1&&n._pointerActive||(this.start(e),this.setupPointer(e),n._pointerId=Qv(e),n._pointerActive=!0,this.computeValues(eb(e)),this.computeInitial(),t.preventScrollAxis&&"mouse"!==Xv(e)?(n._active=!1,this.setupScrollPrevention(e)):t.delay>0?(this.setupDelayTrigger(e),t.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(e),this.emit()}pointerMove(e){const t=this.state,n=this.config;if(!t._pointerActive)return;if(t.type===e.type&&e.timeStamp===t.timeStamp)return;const r=Qv(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;const o=eb(e);return document.pointerLockElement===e.target?t._delta=[e.movementX,e.movementY]:(t._delta=zv.sub(o,t._values),this.computeValues(o)),zv.addTo(t._movement,t._delta),this.compute(e),t._delayed&&t.intentional?(this.timeoutStore.remove("dragDelay"),t.active=!1,void this.startPointerDrag(e)):n.preventScrollAxis&&!t._preventScroll?t.axis?t.axis===n.preventScrollAxis||"xy"===n.preventScrollAxis?(t._active=!1,void this.clean()):(this.timeoutStore.remove("startPointerDrag"),void this.startPointerDrag(e)):void 0:void this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch(e){0}const t=this.state,n=this.config;if(!t._active||!t._pointerActive)return;const r=Qv(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[o,i]=t._distance;if(t.tap=o<=n.tapsThreshold&&i<=n.tapsThreshold,t.tap&&n.filterTaps)t._force=!0;else{const[e,r]=t.direction,[o,i]=t.velocity,[a,s]=t.movement,[l,c]=n.swipe.velocity,[u,d]=n.swipe.distance,f=n.swipe.duration;t.elapsedTime<f&&(Math.abs(o)>l&&Math.abs(a)>u&&(t.swipe[0]=e),Math.abs(i)>c&&Math.abs(s)>d&&(t.swipe[1]=r))}this.emit()}pointerClick(e){!this.state.tap&&e.detail>0&&(e.preventDefault(),e.stopPropagation())}setupPointer(e){const t=this.config,n=t.device;t.pointerLock&&e.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,function(e){"persist"in e&&"function"==typeof e.persist&&e.persist()}(e);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add("dragDelay",(()=>{this.state._step=[0,0],this.startPointerDrag(e)}),this.config.delay)}keyDown(e){const t=ub[e.key];if(t){const n=this.state,r=e.shiftKey?10:e.altKey?.1:1;this.start(e),n._delta=t(this.config.keyboardDisplacement,r),n._keyboardActive=!0,zv.addTo(n._movement,n._delta),this.compute(e),this.emit()}}keyUp(e){e.key in ub&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){const t=this.config.device;e(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(e(t,"change",this.pointerMove.bind(this)),e(t,"end",this.pointerUp.bind(this)),e(t,"cancel",this.pointerUp.bind(this)),e("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(e("key","down",this.keyDown.bind(this)),e("key","up",this.keyUp.bind(this))),this.config.filterTaps&&e("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}},resolver:hb};function yb(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const xb={target(e){if(e)return()=>"current"in e?e.current:e},enabled:(e=!0)=>e,window:(e=(mb.isBrowser?window:void 0))=>e,eventOptions:({passive:e=!0,capture:t=!1}={})=>({passive:e,capture:t}),transform:e=>e},wb=["target","eventOptions","window","enabled","transform"];function Eb(e={},t){const n={};for(const[r,o]of Object.entries(t))switch(typeof o){case"function":n[r]=o.call(n,e[r],r,e);break;case"object":n[r]=Eb(e[r],o);break;case"boolean":o&&(n[r]=e[r])}return n}class _b{constructor(e,t){jv(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=t}add(e,t,n,r,o){const i=this._listeners,a=function(e,t=""){const n=$v[e];return e+(n&&n[t]||t)}(t,n),s=Hv(Hv({},this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{}),o);e.addEventListener(a,r,s);const l=()=>{e.removeEventListener(a,r,s),i.delete(l)};return i.add(l),l}clean(){this._listeners.forEach((e=>e())),this._listeners.clear()}}class Sb{constructor(){jv(this,"_timeouts",new Map)}add(e,t,n=140,...r){this.remove(e),this._timeouts.set(e,window.setTimeout(t,n,...r))}remove(e){const t=this._timeouts.get(e);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach((e=>{window.clearTimeout(e)})),this._timeouts.clear()}}class Cb{constructor(e){jv(this,"gestures",new Set),jv(this,"_targetEventStore",new _b(this)),jv(this,"gestureEventStores",{}),jv(this,"gestureTimeoutStores",{}),jv(this,"handlers",{}),jv(this,"config",{}),jv(this,"pointerIds",new Set),jv(this,"touchIds",new Set),jv(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),function(e,t){t.drag&&kb(e,"drag");t.wheel&&kb(e,"wheel");t.scroll&&kb(e,"scroll");t.move&&kb(e,"move");t.pinch&&kb(e,"pinch");t.hover&&kb(e,"hover")}(this,e)}setEventIds(e){return Kv(e)?(this.touchIds=new Set(Jv(e)),this.touchIds):"pointerId"in e?("pointerup"===e.type||"pointercancel"===e.type?this.pointerIds.delete(e.pointerId):"pointerdown"===e.type&&this.pointerIds.add(e.pointerId),this.pointerIds):void 0}applyHandlers(e,t){this.handlers=e,this.nativeHandlers=t}applyConfig(e,t){this.config=function(e,t,n={}){const r=e,{target:o,eventOptions:i,window:a,enabled:s,transform:l}=r,c=yb(r,wb);if(n.shared=Eb({target:o,eventOptions:i,window:a,enabled:s,transform:l},xb),t){const e=vb.get(t);n[t]=Eb(Hv({shared:n.shared},c),e)}else for(const e in c){const t=vb.get(e);t&&(n[e]=Eb(Hv({shared:n.shared},c[e]),t))}return n}(e,t,this.config)}clean(){this._targetEventStore.clean();for(const e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){const t=this.config.shared,n={};let r;if(!t.target||(r=t.target(),r)){if(t.enabled){for(const t of this.gestures){const o=this.config[t],i=Pb(n,o.eventOptions,!!r);if(o.enabled){new(gb.get(t))(this,e,t).bind(i)}}const o=Pb(n,t.eventOptions,!!r);for(const t in this.nativeHandlers)o(t,"",(n=>this.nativeHandlers[t](Hv(Hv({},this.state.shared),{},{event:n,args:e}))),void 0,!0)}for(const e in n)n[e]=rb(...n[e]);if(!r)return n;for(const e in n){const{device:t,capture:o,passive:i}=Yv(e);this._targetEventStore.add(r,t,"",n[e],{capture:o,passive:i})}}}}function kb(e,t){e.gestures.add(t),e.gestureEventStores[t]=new _b(e,t),e.gestureTimeoutStores[t]=new Sb}const Pb=(e,t,n)=>(r,o,i,a={},s=!1)=>{var l,c;const u=null!==(l=a.capture)&&void 0!==l?l:t.capture,d=null!==(c=a.passive)&&void 0!==c?c:t.passive;let f=s?r:Gv(r,o,u);n&&d&&(f+="Passive"),e[f]=e[f]||[],e[f].push(i)};function Tb(e,t={},n,r){const o=s().useMemo((()=>new Cb(e)),[]);if(o.applyHandlers(e,r),o.applyConfig(t,n),s().useEffect(o.effect.bind(o)),s().useEffect((()=>o.clean.bind(o)),[]),void 0===t.target)return o.bind.bind(o)}function Ib(e,t){var n;return n=bb,gb.set(n.key,n.engine),vb.set(n.key,n.resolver),Tb({drag:e},t||{},"drag")}const Rb=e=>e,Mb={error:null,initialValue:"",isDirty:!1,isDragEnabled:!1,isDragging:!1,isPressEnterToChange:!1,value:""},Nb="CHANGE",Db="COMMIT",Ab="CONTROL",Ob="DRAG_END",zb="DRAG_START",Lb="DRAG",Fb="INVALIDATE",Bb="PRESS_DOWN",jb="PRESS_ENTER",Vb="PRESS_UP",Hb="RESET";function $b(e=Rb,t=Mb,n){const[r,o]=(0,Uo.useReducer)((i=e,(e,t)=>{const n={...e};switch(t.type){case Ab:return n.value=t.payload.value,n.isDirty=!1,n._event=void 0,n;case Vb:case Bb:n.isDirty=!1;break;case zb:n.isDragging=!0;break;case Ob:n.isDragging=!1;break;case Nb:n.error=null,n.value=t.payload.value,e.isPressEnterToChange&&(n.isDirty=!0);break;case Db:n.value=t.payload.value,n.isDirty=!1;break;case Hb:n.error=null,n.isDirty=!1,n.value=t.payload.value||e.initialValue;break;case Fb:n.error=t.payload.error}return n._event=t.payload.event,i(n,t)}),function(e=Mb){const{value:t}=e;return{...Mb,...e,initialValue:t}}(t));var i;const a=e=>(t,n)=>{o({type:e,payload:{value:t,event:n}})},s=e=>t=>{o({type:e,payload:{event:t}})},l=e=>t=>{o({type:e,payload:t})},c=a(Nb),u=a(Hb),d=a(Db),f=l(zb),m=l(Lb),p=l(Ob),h=s(Vb),g=s(Bb),v=s(jb),b=(0,Uo.useRef)(r),y=(0,Uo.useRef)({value:t.value,onChangeHandler:n});return(0,Uo.useLayoutEffect)((()=>{b.current=r,y.current={value:t.value,onChangeHandler:n}})),(0,Uo.useLayoutEffect)((()=>{var e;void 0===b.current._event||r.value===y.current.value||r.isDirty||y.current.onChangeHandler(null!==(e=r.value)&&void 0!==e?e:"",{event:b.current._event})}),[r.value,r.isDirty]),(0,Uo.useLayoutEffect)((()=>{var e;t.value===b.current.value||b.current.isDirty||o({type:Ab,payload:{value:null!==(e=t.value)&&void 0!==e?e:""}})}),[t.value]),{change:c,commit:d,dispatch:o,drag:m,dragEnd:p,dragStart:f,invalidate:(e,t)=>o({type:Fb,payload:{error:e,event:t}}),pressDown:g,pressEnter:v,pressUp:h,reset:u,state:r}}const Wb=()=>{};const Ub=(0,Uo.forwardRef)((function({disabled:e=!1,dragDirection:t="n",dragThreshold:n=10,id:o,isDragEnabled:i=!1,isFocused:a,isPressEnterToChange:s=!1,onBlur:l=Wb,onChange:c=Wb,onDrag:u=Wb,onDragEnd:d=Wb,onDragStart:f=Wb,onFocus:m=Wb,onKeyDown:p=Wb,onValidate:h=Wb,size:g="default",setIsFocused:v,stateReducer:b=(e=>e),value:y,type:x,...w},E){const{state:_,change:S,commit:C,drag:k,dragEnd:P,dragStart:T,invalidate:I,pressDown:R,pressEnter:M,pressUp:N,reset:D}=$b(b,{isDragEnabled:i,value:y,isPressEnterToChange:s},c),{value:A,isDragging:O,isDirty:z}=_,L=(0,Uo.useRef)(!1),F=function(e,t){const n=function(e){let t="ns-resize";switch(e){case"n":case"s":t="ns-resize";break;case"e":case"w":t="ew-resize"}return t}(t);return(0,Uo.useEffect)((()=>{document.documentElement.style.cursor=e?n:null}),[e,n]),n}(O,t),B=e=>{const t=e.currentTarget.value;try{h(t),C(t,e)}catch(t){I(t,e)}},j=Ib((e=>{const{distance:t,dragging:n,event:r,target:o}=e;if(e.event={...e.event,target:o},t){if(r.stopPropagation(),!n)return d(e),void P(e);u(e),k(e),O||(f(e),T(e))}}),{axis:"e"===t||"w"===t?"x":"y",threshold:n,enabled:i,pointer:{capture:!1}}),V=i?j():{};let H;return"number"===x&&(H=e=>{w.onMouseDown?.(e),e.currentTarget!==e.currentTarget.ownerDocument.activeElement&&e.currentTarget.focus()}),(0,r.createElement)(Ev,{...w,...V,className:"components-input-control__input",disabled:e,dragCursor:F,isDragging:O,id:o,onBlur:e=>{l(e),v?.(!1),!z&&e.target.validity.valid||(L.current=!0,B(e))},onChange:e=>{const t=e.target.value;S(t,e)},onFocus:e=>{m(e),v?.(!0)},onKeyDown:e=>{const{key:t}=e;switch(p(e),t){case"ArrowUp":N(e);break;case"ArrowDown":R(e);break;case"Enter":M(e),s&&(e.preventDefault(),B(e));break;case"Escape":s&&z&&(e.preventDefault(),D(y,e))}},onMouseDown:H,ref:E,inputSize:g,value:null!=A?A:"",type:x})})),Gb=Ub,qb={"default.fontFamily":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif","default.fontSize":"13px","helpText.fontSize":"12px",mobileTextMinFontSize:"16px"};function Yb(e){var t;return null!==(t=qb[e])&&void 0!==t?t:""}const Kb={name:"kv6lnz",styles:"box-sizing:border-box;*,*::before,*::after{box-sizing:inherit;}"};const Xb=bs("div",{target:"ej5x27r4"})("font-family:",Yb("default.fontFamily"),";font-size:",Yb("default.fontSize"),";",Kb,";"),Zb=bs("div",{target:"ej5x27r3"})((({__nextHasNoMarginBottom:e=!1})=>!e&&Ps("margin-bottom:",Ah(2),";",""))," .components-panel__row &{margin-bottom:inherit;}"),Jb=Ps(pv,";display:inline-block;margin-bottom:",Ah(2),";padding:0;",""),Qb=bs("label",{target:"ej5x27r2"})(Jb,";");var ey={name:"11yad0w",styles:"margin-bottom:revert"};const ty=bs("p",{target:"ej5x27r1"})("margin-top:",Ah(2),";margin-bottom:0;font-size:",Yb("helpText.fontSize"),";font-style:normal;color:",Ds.gray[700],";",(({__nextHasNoMarginBottom:e=!1})=>!e&&ey),";"),ny=bs("span",{target:"ej5x27r0"})(Jb,";"),ry=({className:e,children:t,...n})=>(0,r.createElement)(ny,{...n,className:c()("components-base-control__label",e)},t),oy=Object.assign(is((e=>{const{__nextHasNoMarginBottom:t=!1,id:n,label:o,hideLabelFromVision:i=!1,help:a,className:s,children:l}=rs(e,"BaseControl");return(0,r.createElement)(Xb,{className:s},(0,r.createElement)(Zb,{className:"components-base-control__field",__nextHasNoMarginBottom:t},o&&n&&(i?(0,r.createElement)(ws,{as:"label",htmlFor:n},o):(0,r.createElement)(Qb,{className:"components-base-control__label",htmlFor:n},o)),o&&!n&&(i?(0,r.createElement)(ws,{as:"label"},o):(0,r.createElement)(ry,null,o)),l),!!a&&(0,r.createElement)(ty,{id:n?n+"__help":void 0,className:"components-base-control__help",__nextHasNoMarginBottom:t},a))}),"BaseControl"),{VisualLabel:ry}),iy=oy,ay=()=>{};const sy=(0,Uo.forwardRef)((function(e,t){const{__next40pxDefaultSize:n,__unstableStateReducer:o=(e=>e),__unstableInputWidth:i,className:a,disabled:s=!1,help:l,hideLabelFromVision:u=!1,id:f,isPressEnterToChange:m=!1,label:p,labelPosition:h="top",onChange:g=ay,onValidate:v=ay,onKeyDown:b=ay,prefix:y,size:x="default",style:w,suffix:E,value:_,...S}=Nv(e),[C,k]=(0,Uo.useState)(!1),P=function(e){const t=(0,d.useInstanceId)(sy);return e||`inspector-input-control-${t}`}(f),T=c()("components-input-control",a),I=function(e){const t=(0,Uo.useRef)(e.value),[n,r]=(0,Uo.useState)({}),o=void 0!==n.value?n.value:e.value;return(0,Uo.useLayoutEffect)((()=>{const{current:o}=t;t.current=e.value,void 0===n.value||n.isStale?n.isStale&&e.value!==o&&r({}):r({...n,isStale:!0})}),[e.value,n]),{value:o,onBlur:t=>{r({}),e.onBlur?.(t)},onChange:(t,n)=>{r((e=>Object.assign(e,{value:t,isStale:!1}))),e.onChange(t,n)}}}({value:_,onBlur:S.onBlur,onChange:g}),R=l?{["string"==typeof l?"aria-describedby":"aria-details"]:`${P}__help`}:{};return(0,r.createElement)(iy,{className:T,help:l,id:P,__nextHasNoMarginBottom:!0},(0,r.createElement)(Ov,{__next40pxDefaultSize:n,__unstableInputWidth:i,disabled:s,gap:3,hideLabelFromVision:u,id:P,isFocused:C,justify:"left",label:p,labelPosition:h,prefix:y,size:x,style:w,suffix:E},(0,r.createElement)(Gb,{...S,...R,__next40pxDefaultSize:n,className:"components-input-control__input",disabled:s,id:P,isFocused:C,isPressEnterToChange:m,onKeyDown:b,onValidate:v,paddingInlineStart:y?Ah(2):void 0,paddingInlineEnd:E?Ah(2):void 0,ref:t,setIsFocused:k,size:x,stateReducer:o,...I})))})),ly=sy;const cy=function({icon:e,className:t,size:n=20,style:o={},...i}){const a=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" "),s={...20!=n?{fontSize:`${n}px`,width:`${n}px`,height:`${n}px`}:{},...o};return(0,r.createElement)("span",{className:a,style:s,...i})};const uy=function({icon:e=null,size:t=("string"==typeof e?20:24),...r}){if("string"==typeof e)return(0,Uo.createElement)(cy,{icon:e,size:t,...r});if((0,Uo.isValidElement)(e)&&cy===e.type)return(0,Uo.cloneElement)(e,{...r});if("function"==typeof e)return(0,Uo.createElement)(e,{size:t,...r});if(e&&("svg"===e.type||e.type===n.SVG)){const o={...e.props,width:t,height:t,...r};return(0,Uo.createElement)(n.SVG,{...o})}return(0,Uo.isValidElement)(e)?(0,Uo.cloneElement)(e,{size:t,...r}):e},dy=["onMouseDown","onClick"];const fy=(0,Uo.forwardRef)((function(e,t){const{__next40pxDefaultSize:n,isBusy:o,isDestructive:i,className:a,disabled:s,icon:l,iconPosition:u="left",iconSize:f,showTooltip:m,tooltipPosition:p,shortcut:h,label:g,children:v,size:b="default",text:y,variant:x,__experimentalIsFocusable:w,describedBy:E,..._}=function({isDefault:e,isPrimary:t,isSecondary:n,isTertiary:r,isLink:o,isPressed:i,isSmall:a,size:s,variant:l,...c}){let u=s,d=l;const f={"aria-pressed":i};var m,p,h,g,v,b;return a&&(null!==(m=u)&&void 0!==m||(u="small")),t&&(null!==(p=d)&&void 0!==p||(d="primary")),r&&(null!==(h=d)&&void 0!==h||(d="tertiary")),n&&(null!==(g=d)&&void 0!==g||(d="secondary")),e&&(qo()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"',version:"6.2"}),null!==(v=d)&&void 0!==v||(d="secondary")),o&&(null!==(b=d)&&void 0!==b||(d="link")),{...f,...c,size:u,variant:d}}(e),{href:S,target:C,"aria-checked":k,"aria-pressed":P,"aria-selected":T,...I}="href"in _?_:{href:void 0,target:void 0,..._},R=(0,d.useInstanceId)(fy,"components-button__description"),M="string"==typeof v&&!!v||Array.isArray(v)&&v?.[0]&&null!==v[0]&&"components-tooltip"!==v?.[0]?.props?.className,N=c()("components-button",a,{"is-next-40px-default-size":n,"is-secondary":"secondary"===x,"is-primary":"primary"===x,"is-small":"small"===b,"is-compact":"compact"===b,"is-tertiary":"tertiary"===x,"is-pressed":[!0,"true","mixed"].includes(P),"is-pressed-mixed":"mixed"===P,"is-busy":o,"is-link":"link"===x,"is-destructive":i,"has-text":!!l&&(M||y),"has-icon":!!l}),D=s&&!w,A=void 0===S||D?"button":"a",O="button"===A?{type:"button",disabled:D,"aria-checked":k,"aria-pressed":P,"aria-selected":T}:{},z="a"===A?{href:S,target:C}:{};if(s&&w){O["aria-disabled"]=!0,z["aria-disabled"]=!0;for(const e of dy)I[e]=e=>{e&&(e.stopPropagation(),e.preventDefault())}}const L=!D&&(m&&!!g||!!h||!!g&&!v?.length&&!1!==m),F=E?R:void 0,B=I["aria-describedby"]||F,j={className:N,"aria-label":I["aria-label"]||g,"aria-describedby":B,ref:t},V=(0,r.createElement)(r.Fragment,null,l&&"left"===u&&(0,r.createElement)(uy,{icon:l,size:f}),y&&(0,r.createElement)(r.Fragment,null,y),l&&"right"===u&&(0,r.createElement)(uy,{icon:l,size:f}),v),H="a"===A?(0,r.createElement)("a",{...z,...I,...j},V):(0,r.createElement)("button",{...O,...I,...j},V),$=L?{text:v?.length&&E?E:g,shortcut:h,placement:p&&Xo(p)}:{};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(ri,{...$},H),E&&(0,r.createElement)(ws,null,(0,r.createElement)("span",{id:F},E)))})),my=fy;var py={name:"euqsgg",styles:"input[type='number']::-webkit-outer-spin-button,input[type='number']::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}input[type='number']{-moz-appearance:textfield;}"};const hy=({hideHTMLArrows:e})=>e?py:"",gy=bs(ly,{target:"ep09it41"})(hy,";"),vy=bs(my,{target:"ep09it40"})("&&&&&{color:",Ds.theme.accent,";}"),by={smallSpinButtons:Ps("width:",Ah(5),";min-width:",Ah(5),";height:",Ah(5),";","")};function yy(e){const t=Number(e);return isNaN(t)?0:t}function xy(...e){return e.reduce(((e,t)=>e+yy(t)),0)}function wy(e,t,n){const r=yy(e);return Math.max(t,Math.min(r,n))}function Ey(e=0,t=1/0,n=1/0,r=1){const o=yy(e),i=yy(r),a=function(e){const t=(e+"").split(".");return void 0!==t[1]?t[1].length:0}(r),s=wy(Math.round(o/i)*i,t,n);return a?yy(s.toFixed(a)):s}const _y={bottom:{align:"flex-end",justify:"center"},bottomLeft:{align:"flex-end",justify:"flex-start"},bottomRight:{align:"flex-end",justify:"flex-end"},center:{align:"center",justify:"center"},edge:{align:"center",justify:"space-between"},left:{align:"center",justify:"flex-start"},right:{align:"center",justify:"flex-end"},stretch:{align:"stretch"},top:{align:"flex-start",justify:"center"},topLeft:{align:"flex-start",justify:"flex-start"},topRight:{align:"flex-start",justify:"flex-end"}},Sy={bottom:{justify:"flex-end",align:"center"},bottomLeft:{justify:"flex-end",align:"flex-start"},bottomRight:{justify:"flex-end",align:"flex-end"},center:{justify:"center",align:"center"},edge:{justify:"space-between",align:"center"},left:{justify:"center",align:"flex-start"},right:{justify:"center",align:"flex-end"},stretch:{align:"stretch"},top:{justify:"flex-start",align:"center"},topLeft:{justify:"flex-start",align:"flex-start"},topRight:{justify:"flex-start",align:"flex-end"}};function Cy(e){return"string"==typeof e?[e]:Uo.Children.toArray(e).filter((e=>(0,Uo.isValidElement)(e)))}function ky(e){const{alignment:t="edge",children:n,direction:o,spacing:i=2,...a}=rs(e,"HStack"),s=function(e,t="row"){if(!ag(e))return{};const n="column"===t?Sy:_y;return e in n?n[e]:{align:e}}(t,o),l=Cy(n).map(((e,t)=>{if(ls(e,["Spacer"])){const n=e,o=n.key||`hstack-${t}`;return(0,r.createElement)(og,{isBlock:!0,key:o,...n.props})}return e}));return jh({children:l,direction:o,justify:"center",...s,...a,gap:i})}const Py=os((function(e,t){const n=ky(e);return(0,r.createElement)(xs,{...n,ref:t})}),"HStack"),Ty=()=>{};const Iy=(0,Uo.forwardRef)((function(e,t){const{__unstableStateReducer:n,className:o,dragDirection:i="n",hideHTMLArrows:a=!1,spinControls:s=(a?"none":"native"),isDragEnabled:l=!0,isShiftStepEnabled:f=!0,label:m,max:p=1/0,min:h=-1/0,required:g=!1,shiftStep:v=10,step:b=1,spinFactor:y=1,type:x="number",value:w,size:E="default",suffix:_,onChange:S=Ty,...C}=Nv(e);a&&qo()("wp.components.NumberControl hideHTMLArrows prop ",{alternative:'spinControls="none"',since:"6.2",version:"6.3"});const k=(0,Uo.useRef)(),P=(0,d.useMergeRefs)([k,t]),T="any"===b,I=T?1:sg(b),R=sg(y)*I,M=Ey(0,h,p,I),N=(e,t)=>T?""+Math.min(p,Math.max(h,sg(e))):""+Ey(e,h,p,null!=t?t:I),D="number"===x?"off":void 0,A=c()("components-number-control",o),O=ns()("small"===E&&by.smallSpinButtons),z=(e,t,n)=>{n?.preventDefault();const r=n?.shiftKey&&f,o=r?sg(v)*R:R;let i=function(e){const t=""===e;return!ag(e)||t}(e)?M:e;return"up"===t?i=xy(i,o):"down"===t&&(i=function(...e){return e.reduce(((e,t,n)=>{const r=yy(t);return 0===n?r:e-r}),0)}(i,o)),N(i,r?o:void 0)},L=e=>t=>S(String(z(w,e,t)),{event:{...t,target:k.current}});return(0,r.createElement)(gy,{autoComplete:D,inputMode:"numeric",...C,className:A,dragDirection:i,hideHTMLArrows:"native"!==s,isDragEnabled:l,label:m,max:p,min:h,ref:P,required:g,step:b,type:x,value:w,__unstableStateReducer:(e,t)=>{var r;const o=((e,t)=>{const n={...e},{type:r,payload:o}=t,a=o.event,s=n.value;if(r!==Vb&&r!==Bb||(n.value=z(s,r===Vb?"up":"down",a)),r===Lb&&l){const[e,t]=o.delta,r=o.shiftKey&&f,a=r?sg(v)*R:R;let l,c;switch(i){case"n":c=t,l=-1;break;case"e":c=e,l=(0,u.isRTL)()?-1:1;break;case"s":c=t,l=1;break;case"w":c=e,l=(0,u.isRTL)()?1:-1}if(0!==c){c=Math.ceil(Math.abs(c))*Math.sign(c);const e=c*a*l;n.value=N(xy(s,e),r?a:void 0)}}if(r===jb||r===Db){const e=!1===g&&""===s;n.value=e?s:N(s)}return n})(e,t);return null!==(r=n?.(o,t))&&void 0!==r?r:o},size:E,suffix:"custom"===s?(0,r.createElement)(r.Fragment,null,_,(0,r.createElement)(tg,{marginBottom:0,marginRight:2},(0,r.createElement)(Py,{spacing:1},(0,r.createElement)(vy,{className:O,icon:ng,size:"small",label:(0,u.__)("Increment"),onClick:L("up")}),(0,r.createElement)(vy,{className:O,icon:rg,size:"small",label:(0,u.__)("Decrement"),onClick:L("down")})))):_,onChange:S})})),Ry=Iy;const My=bs("div",{target:"eln3bjz3"})("border-radius:50%;border:",Xg.borderWidth," solid ",Ds.ui.border,";box-sizing:border-box;cursor:grab;height:",32,"px;overflow:hidden;width:",32,"px;:active{cursor:grabbing;}"),Ny=bs("div",{target:"eln3bjz2"})({name:"1r307gh",styles:"box-sizing:border-box;position:relative;width:100%;height:100%;:focus-visible{outline:none;}"}),Dy=bs("div",{target:"eln3bjz1"})("background:",Ds.theme.accent,";border-radius:50%;box-sizing:border-box;display:block;left:50%;top:4px;transform:translateX( -50% );position:absolute;width:",6,"px;height:",6,"px;"),Ay=bs(mv,{target:"eln3bjz0"})("color:",Ds.theme.accent,";margin-right:",Ah(3),";");const Oy=function({value:e,onChange:t,...n}){const o=(0,Uo.useRef)(null),i=(0,Uo.useRef)(),a=(0,Uo.useRef)(),s=e=>{if(void 0!==e&&(e.preventDefault(),e.target?.focus(),void 0!==i.current&&void 0!==t)){const{x:n,y:r}=i.current;t(function(e,t,n,r){const o=r-t,i=n-e,a=Math.atan2(o,i),s=Math.round(a*(180/Math.PI))+90;if(s<0)return 360+s;return s}(n,r,e.clientX,e.clientY))}},{startDrag:l,isDragging:c}=(0,d.__experimentalUseDragging)({onDragStart:e=>{(()=>{if(null===o.current)return;const e=o.current.getBoundingClientRect();i.current={x:e.x+e.width/2,y:e.y+e.height/2}})(),s(e)},onDragMove:s,onDragEnd:s});return(0,Uo.useEffect)((()=>{c?(void 0===a.current&&(a.current=document.body.style.cursor),document.body.style.cursor="grabbing"):(document.body.style.cursor=a.current||"",a.current=void 0)}),[c]),(0,r.createElement)(My,{ref:o,onMouseDown:l,className:"components-angle-picker-control__angle-circle",...n},(0,r.createElement)(Ny,{style:e?{transform:`rotate(${e}deg)`}:void 0,className:"components-angle-picker-control__angle-circle-indicator-wrapper",tabIndex:-1},(0,r.createElement)(Dy,{className:"components-angle-picker-control__angle-circle-indicator"})))};const zy=(0,Uo.forwardRef)((function(e,t){const{className:n,label:o=(0,u.__)("Angle"),onChange:i,value:a,...s}=e,l=c()("components-angle-picker-control",n),d=(0,r.createElement)(Ay,null,"°"),[f,m]=(0,u.isRTL)()?[d,null]:[null,d];return(0,r.createElement)($h,{...s,ref:t,className:l,gap:2},(0,r.createElement)(Uh,null,(0,r.createElement)(Ry,{label:o,className:"components-angle-picker-control__input-field",max:360,min:0,onChange:e=>{if(void 0===i)return;const t=void 0!==e&&""!==e?parseInt(e,10):0;i(t)},size:"__unstable-large",step:"1",value:a,spinControls:"none",prefix:f,suffix:m})),(0,r.createElement)(tg,{marginBottom:"1",marginTop:"auto"},(0,r.createElement)(Oy,{"aria-hidden":"true",value:a,onChange:i})))}));var Ly=o(9681),Fy=o.n(Ly);const By=window.wp.richText,jy=window.wp.a11y,Vy=window.wp.keycodes,Hy=new RegExp(`[${["-","~","­","֊","־","᐀","᠆","‐","‑","‒","–","—","―","⁓","⁻","₋","−","⸗","⸺","⸻","〜","〰","゠","︱","︲","﹘","﹣","-"].join("")}]`,"g"),$y=e=>Fy()(e).toLocaleLowerCase().replace(Hy,"-");function Wy(e){var t;let n=null!==(t=e?.toString?.())&&void 0!==t?t:"";return n=n.replace(/['\u2019]/,""),_i(n,{splitRegexp:[/(?!(?:1ST|2ND|3RD|[4-9]TH)(?![a-z]))([a-z0-9])([A-Z])/g,/(?!(?:1st|2nd|3rd|[4-9]th)(?![a-z]))([0-9])([a-z])/g,/([A-Za-z])([0-9])/g,/([A-Z])([A-Z][a-z])/g]})}function Uy(e){return e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}function Gy(e){return t=>{const[n,r]=(0,Uo.useState)([]);return(0,Uo.useLayoutEffect)((()=>{const{options:n,isDebounced:o}=e,i=(0,d.debounce)((()=>{const o=Promise.resolve("function"==typeof n?n(t):n).then((n=>{if(o.canceled)return;const i=n.map(((t,n)=>({key:`${e.name}-${n}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[],isDisabled:!!e.isOptionDisabled&&e.isOptionDisabled(t)}))),a=new RegExp("(?:\\b|\\s|^)"+Uy(t),"i");r(function(e,t=[],n=10){const r=[];for(let o=0;o<t.length;o++){const i=t[o];let{keywords:a=[]}=i;if("string"==typeof i.label&&(a=[...a,i.label]),a.some((t=>e.test(Fy()(t))))&&(r.push(i),r.length===n))break}return r}(a,i))}));return o}),o?250:0),a=i();return()=>{i.cancel(),a&&(a.canceled=!0)}}),[t]),[n]}}const qy=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Po({element:n.current,padding:r}).fn(t):{}:n?Po({element:n,padding:r}).fn(t):{};var o}});var Yy="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function Ky(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Ky(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Ky(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Xy(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zy(e,t){const n=Xy(e);return Math.round(t*n)/n}function Jy(e){const t=r.useRef(e);return Yy((()=>{t.current=e})),t}function Qy(){!lh.current&&ch();const[e]=(0,r.useState)(sh.current);return e}const ex=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));let tx=0;function nx(e){const t=document.scrollingElement||document.body;e&&(tx=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=tx)}let rx=0;const ox=function(){return(0,Uo.useEffect)((()=>(0===rx&&nx(!0),++rx,()=>{1===rx&&nx(!1),--rx})),[]),null},ix=Symbol(),ax=Symbol(),sx=Symbol();let lx=(e,t)=>new Proxy(e,t);const cx=Object.getPrototypeOf,ux=new WeakMap,dx=e=>e&&(ux.has(e)?ux.get(e):cx(e)===Object.prototype||cx(e)===Array.prototype),fx=e=>"object"==typeof e&&null!==e,mx=new WeakMap,px=e=>e[sx]||e,hx=(e,t,n)=>{if(!dx(e))return e;const r=px(e),o=(e=>Object.isFrozen(e)||Object.values(Object.getOwnPropertyDescriptors(e)).some((e=>!e.writable)))(r);let i=n&&n.get(r);return i&&i[1].f===o||(i=((e,t)=>{const n={f:t};let r=!1;const o=(t,o)=>{if(!r){let r=n.a.get(e);r||(r=new Set,n.a.set(e,r)),o&&r.has(ix)||r.add(t)}},i={get:(t,r)=>r===sx?e:(o(r),hx(t[r],n.a,n.c)),has:(t,i)=>i===ax?(r=!0,n.a.delete(e),!0):(o(i),i in t),getOwnPropertyDescriptor:(e,t)=>(o(t,!0),Object.getOwnPropertyDescriptor(e,t)),ownKeys:e=>(o(ix),Reflect.ownKeys(e))};return t&&(i.set=i.deleteProperty=()=>!1),[i,n]})(r,o),i[1].p=lx(o?(e=>{let t=mx.get(e);if(!t){if(Array.isArray(e))t=Array.from(e);else{const n=Object.getOwnPropertyDescriptors(e);Object.values(n).forEach((e=>{e.configurable=!0})),t=Object.create(cx(e),n)}mx.set(e,t)}return t})(r):r,i[0]),n&&n.set(r,i)),i[1].a=t,i[1].c=n,i[1].p},gx=(e,t)=>{const n=Reflect.ownKeys(e),r=Reflect.ownKeys(t);return n.length!==r.length||n.some(((e,t)=>e!==r[t]))},vx=(e,t,n,r)=>{if(Object.is(e,t))return!1;if(!fx(e)||!fx(t))return!0;const o=n.get(px(e));if(!o)return!0;if(r){const n=r.get(e);if(n&&n.n===t)return n.g;r.set(e,{n:t,g:!1})}let i=null;for(const a of o){const o=a===ix?gx(e,t):vx(e[a],t[a],n,r);if(!0!==o&&!1!==o||(i=o),i)break}return null===i&&(i=!0),r&&r.set(e,{n:t,g:i}),i},bx=(e,t=!0)=>{ux.set(e,t)},yx=e=>"object"==typeof e&&null!==e,xx=new WeakSet,wx=Symbol("VERSION"),Ex=Symbol("LISTENERS"),_x=Symbol("SNAPSHOT"),Sx=(e=Object.is,t=((e,t)=>new Proxy(e,t)),n=(e=>yx(e)&&!xx.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)),r=Symbol("PROMISE_RESULT"),o=Symbol("PROMISE_ERROR"),i=new WeakMap,a=((e,t,n)=>{const a=i.get(n);if((null==a?void 0:a[0])===e)return a[1];const s=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return bx(s,!0),i.set(n,[e,s]),Reflect.ownKeys(t).forEach((e=>{const i=Reflect.get(t,e,n);if(xx.has(i))bx(i,!1),s[e]=i;else if(i instanceof Promise)if(r in i)s[e]=i[r];else{const t=i[o]||i;Object.defineProperty(s,e,{get(){if(r in i)return i[r];throw t}})}else(null==i?void 0:i[Ex])?s[e]=i[_x]:s[e]=i})),Object.freeze(s)}),s=new WeakMap,l=[1],c=(i=>{if(!yx(i))throw new Error("object required");const c=s.get(i);if(c)return c;let u=l[0];const d=new Set,f=(e,t=++l[0])=>{u!==t&&(u=t,d.forEach((n=>n(e,t))))},m=new Map,p=e=>{let t=m.get(e);return t||(t=(t,n)=>{const r=[...t];r[1]=[e,...r[1]],f(r,n)},m.set(e,t)),t},h=e=>{const t=m.get(e);return m.delete(e),t},g=Array.isArray(i)?[]:Object.create(Object.getPrototypeOf(i)),v={get:(e,t,n)=>t===wx?u:t===Ex?d:t===_x?a(u,e,n):Reflect.get(e,t,n),deleteProperty(e,t){const n=Reflect.get(e,t),r=null==n?void 0:n[Ex];r&&r.delete(h(t));const o=Reflect.deleteProperty(e,t);return o&&f(["delete",[t],n]),o},set(t,i,a,s){var l;const c=Reflect.has(t,i),u=Reflect.get(t,i,s);if(c&&e(u,a))return!0;const d=null==u?void 0:u[Ex];let m;return d&&d.delete(h(i)),yx(a)&&(a=(e=>dx(e)&&e[sx]||null)(a)||a),(null==(l=Object.getOwnPropertyDescriptor(t,i))?void 0:l.set)?m=a:a instanceof Promise?m=a.then((e=>(m[r]=e,f(["resolve",[i],e]),e))).catch((e=>{m[o]=e,f(["reject",[i],e])})):(null==a?void 0:a[Ex])?(m=a,m[Ex].add(p(i))):n(a)?(m=kx(a),m[Ex].add(p(i))):m=a,Reflect.set(t,i,m,s),f(["set",[i],a,u]),!0}},b=t(g,v);return s.set(i,b),Reflect.ownKeys(i).forEach((e=>{const t=Object.getOwnPropertyDescriptor(i,e);t.get||t.set?Object.defineProperty(g,e,t):b[e]=i[e]})),b}))=>[c,xx,wx,Ex,_x,e,t,n,r,o,i,a,s,l],[Cx]=Sx();function kx(e={}){return Cx(e)}function Px(e,t,n){let r;(null==e?void 0:e[Ex])||console.warn("Please use proxy object");const o=[],i=e=>{o.push(e),n?t(o.splice(0)):r||(r=Promise.resolve().then((()=>{r=void 0,t(o.splice(0))})))};return e[Ex].add(i),()=>{e[Ex].delete(i)}}function Tx(e){return(null==e?void 0:e[_x])||console.warn("Please use proxy object"),e[_x]}function Ix(e){return xx.add(e),e}const{useSyncExternalStore:Rx}=Ft,Mx=(e,t)=>{const n=(0,r.useRef)();(0,r.useEffect)((()=>{n.current=((e,t)=>{const n=[],r=new WeakSet,o=(e,i)=>{if(r.has(e))return;fx(e)&&r.add(e);const a=fx(e)&&t.get(px(e));a?a.forEach((t=>{o(e[t],i?[...i,t]:[t])})):i&&n.push(i)};return o(e),n})(e,t)})),(0,r.useDebugValue)(n.current)};function Nx(e,t){const n=null==t?void 0:t.sync,o=(0,r.useRef)(),i=(0,r.useRef)();let a=!0;const s=Rx((0,r.useCallback)((t=>{const r=Px(e,t,n);return t(),r}),[e,n]),(()=>{const t=Tx(e);try{if(!a&&o.current&&i.current&&!vx(o.current,t,i.current,new WeakMap))return o.current}catch(e){}return t}),(()=>Tx(e)));a=!1;const l=new WeakMap;(0,r.useEffect)((()=>{o.current=s,i.current=l})),Mx(s,l);const c=(0,r.useMemo)((()=>new WeakMap),[]);return hx(s,l,c)}Symbol();function Dx(e){const t=kx({data:Array.from(e||[]),has(e){return this.data.some((t=>t[0]===e))},set(e,t){const n=this.data.find((t=>t[0]===e));return n?n[1]=t:this.data.push([e,t]),this},get(e){var t;return null==(t=this.data.find((t=>t[0]===e)))?void 0:t[1]},delete(e){const t=this.data.findIndex((t=>t[0]===e));return-1!==t&&(this.data.splice(t,1),!0)},clear(){this.data.splice(0)},get size(){return this.data.length},toJSON:()=>({}),forEach(e){this.data.forEach((t=>{e(t[1],t[0],this)}))},keys(){return this.data.map((e=>e[0])).values()},values(){return this.data.map((e=>e[1])).values()},entries(){return new Map(this.data).entries()},get[Symbol.toStringTag](){return"Map"},[Symbol.iterator](){return this.entries()}});return Object.defineProperties(t,{data:{enumerable:!1},size:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(t),t}const Ax={slots:Dx(),fills:Dx(),registerSlot:()=>{},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},isDefault:!0},Ox=(0,Uo.createContext)(Ax);function zx(e){const t=(0,Uo.useContext)(Ox);return{...Nx(t.slots,{sync:!0}).get(e),...(0,Uo.useMemo)((()=>({updateSlot:n=>t.updateSlot(e,n),unregisterSlot:n=>t.unregisterSlot(e,n),registerFill:n=>t.registerFill(e,n),unregisterFill:n=>t.unregisterFill(e,n)})),[e,t])}}const Lx={registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>[],subscribe:()=>()=>{}},Fx=(0,Uo.createContext)(Lx),Bx=e=>{const{getSlot:t,subscribe:n}=(0,Uo.useContext)(Fx);return(0,Uo.useSyncExternalStore)(n,(()=>t(e)),(()=>t(e)))};function jx({name:e,children:t}){const{registerFill:n,unregisterFill:r}=(0,Uo.useContext)(Fx),o=Bx(e),i=(0,Uo.useRef)({name:e,children:t});return(0,Uo.useLayoutEffect)((()=>{const t=i.current;return n(e,t),()=>r(e,t)}),[]),(0,Uo.useLayoutEffect)((()=>{i.current.children=t,o&&o.forceUpdate()}),[t]),(0,Uo.useLayoutEffect)((()=>{e!==i.current.name&&(r(i.current.name,i.current),i.current.name=e,n(e,i.current))}),[e]),null}function Vx(e){return"function"==typeof e}class Hx extends Uo.Component{constructor(e){super(e),this.isUnmounted=!1}componentDidMount(){const{registerSlot:e}=this.props;this.isUnmounted=!1,e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:n,registerSlot:r}=this.props;e.name!==t&&(n(e.name,this),r(t,this))}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){var e;const{children:t,name:n,fillProps:o={},getFills:i}=this.props,a=(null!==(e=i(n,this))&&void 0!==e?e:[]).map((e=>{const t=Vx(e.children)?e.children(o):e.children;return Uo.Children.map(t,((e,t)=>{if(!e||"string"==typeof e)return e;let n=t;return"object"==typeof e&&"key"in e&&e?.key&&(n=e.key),(0,Uo.cloneElement)(e,{key:n})}))})).filter((e=>!(0,Uo.isEmptyElement)(e)));return(0,r.createElement)(r.Fragment,null,Vx(t)?t(a):a)}}const $x=e=>(0,r.createElement)(Fx.Consumer,null,(({registerSlot:t,unregisterSlot:n,getFills:o})=>(0,r.createElement)(Hx,{...e,registerSlot:t,unregisterSlot:n,getFills:o}))),Wx={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Ux;const Gx=new Uint8Array(16);function qx(){if(!Ux&&(Ux="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ux))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ux(Gx)}const Yx=[];for(let e=0;e<256;++e)Yx.push((e+256).toString(16).slice(1));function Kx(e,t=0){return Yx[e[t+0]]+Yx[e[t+1]]+Yx[e[t+2]]+Yx[e[t+3]]+"-"+Yx[e[t+4]]+Yx[e[t+5]]+"-"+Yx[e[t+6]]+Yx[e[t+7]]+"-"+Yx[e[t+8]]+Yx[e[t+9]]+"-"+Yx[e[t+10]]+Yx[e[t+11]]+Yx[e[t+12]]+Yx[e[t+13]]+Yx[e[t+14]]+Yx[e[t+15]]}const Xx=function(e,t,n){if(Wx.randomUUID&&!t&&!e)return Wx.randomUUID();const r=(e=e||{}).random||(e.rng||qx)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Kx(r)},Zx=new Set,Jx=new WeakMap;function Qx(e){const{children:t,document:n}=e;if(!n)return null;const o=(e=>{if(Jx.has(e))return Jx.get(e);let t=Xx().replace(/[0-9]/g,"");for(;Zx.has(t);)t=Xx().replace(/[0-9]/g,"");Zx.add(t);const n=Pa({container:e,key:t});return Jx.set(e,n),n})(n.head);return(0,r.createElement)(Wa,{value:o},t)}const ew=Qx;function tw(e){var t;const{name:n,children:o}=e,{registerFill:i,unregisterFill:a,...s}=zx(n),l=function(){const[,e]=(0,Uo.useState)({}),t=(0,Uo.useRef)(!0);return(0,Uo.useEffect)((()=>(t.current=!0,()=>{t.current=!1})),[]),()=>{t.current&&e({})}}(),c=(0,Uo.useRef)({rerender:l});if((0,Uo.useEffect)((()=>(i(c),()=>{a(c)})),[i,a]),!s.ref||!s.ref.current)return null;const u=(0,r.createElement)(ew,{document:s.ref.current.ownerDocument},"function"==typeof o?o(null!==(t=s.fillProps)&&void 0!==t?t:{}):o);return(0,Uo.createPortal)(u,s.ref.current)}const nw=(0,Uo.forwardRef)((function(e,t){const{name:n,fillProps:o={},as:i,children:a,...s}=e,{registerSlot:l,unregisterSlot:c,...u}=(0,Uo.useContext)(Ox),f=(0,Uo.useRef)(null);return(0,Uo.useLayoutEffect)((()=>(l(n,f,o),()=>{c(n,f)})),[l,c,n]),(0,Uo.useLayoutEffect)((()=>{u.updateSlot(n,o)})),(0,r.createElement)(xs,{as:i,ref:(0,d.useMergeRefs)([t,f]),...s})})),rw=window.wp.isShallowEqual;var ow=o.n(rw);function iw(){const e=Dx(),t=Dx();return{slots:e,fills:t,registerSlot:(t,n,r)=>{const o=e.get(t);e.set(t,Ix({...o,ref:n||o?.ref,fillProps:r||o?.fillProps||{}}))},updateSlot:(n,r)=>{const o=e.get(n);if(!o)return;if(ow()(o.fillProps,r))return;o.fillProps=r;const i=t.get(n);i&&i.forEach((e=>e.current.rerender()))},unregisterSlot:(t,n)=>{e.get(t)?.ref===n&&e.delete(t)},registerFill:(e,n)=>{t.set(e,Ix([...t.get(e)||[],n]))},unregisterFill:(e,n)=>{const r=t.get(e);r&&t.set(e,Ix(r.filter((e=>e!==n))))}}}function aw({children:e}){const t=(0,Uo.useMemo)(iw,[]);return(0,r.createElement)(Ox.Provider,{value:t},e)}function sw(){const e={},t={};let n=[];function r(t){return e[t]}function o(e){const t=r(e);t&&t.forceUpdate()}function i(){n.forEach((e=>e()))}return{registerSlot:function(t,n){const r=e[t];e[t]=n,i(),o(t),r&&r.forceUpdate()},unregisterSlot:function(t,n){e[t]===n&&(delete e[t],i())},registerFill:function(e,n){t[e]=[...t[e]||[],n],o(e)},unregisterFill:function(e,n){var r;t[e]=null!==(r=t[e]?.filter((e=>e!==n)))&&void 0!==r?r:[],o(e)},getSlot:r,getFills:function(n,r){return e[n]!==r?[]:t[n]},subscribe:function(e){return n.push(e),()=>{n=n.filter((t=>t!==e))}}}}const lw=function({children:e}){const t=(0,Uo.useMemo)(sw,[]);return(0,r.createElement)(Fx.Provider,{value:t},e)};function cw(e){return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(jx,{...e}),(0,r.createElement)(tw,{...e}))}const uw=(0,Uo.forwardRef)((function(e,t){const{bubblesVirtually:n,...o}=e;return n?(0,r.createElement)(nw,{...o,ref:t}):(0,r.createElement)($x,{...o})}));function dw({children:e,passthrough:t=!1}){return!(0,Uo.useContext)(Ox).isDefault&&t?(0,r.createElement)(r.Fragment,null,e):(0,r.createElement)(lw,null,(0,r.createElement)(aw,null,e))}function fw(e){const t="symbol"==typeof e?e.description:e,n=t=>(0,r.createElement)(cw,{name:e,...t});n.displayName=`${t}Fill`;const o=t=>(0,r.createElement)(uw,{name:e,...t});return o.displayName=`${t}Slot`,o.__unstableName=e,{Fill:n,Slot:o}}const mw="Popover",pw=()=>(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",className:"components-popover__triangle",role:"presentation"},(0,r.createElement)(n.Path,{className:"components-popover__triangle-bg",d:"M 0 0 L 50 50 L 100 0"}),(0,r.createElement)(n.Path,{className:"components-popover__triangle-border",d:"M 0 0 L 50 50 L 100 0",vectorEffect:"non-scaling-stroke"})),hw=(0,Uo.createContext)(void 0),gw="components-popover__fallback-container",vw=os(((e,t)=>{const{animate:n=!0,headerTitle:o,constrainTabbing:i,onClose:a,children:s,className:l,noArrow:u=!0,position:f,placement:m="bottom-start",offset:p=0,focusOnMount:h="firstElement",anchor:g,expandOnMobile:v,onFocusOutside:b,__unstableSlotName:y=mw,flip:x=!0,resize:w=!0,shift:E=!1,inline:_=!1,variant:S,__unstableForcePosition:C,anchorRef:k,anchorRect:P,getAnchorRect:T,isAlternate:I,...R}=rs(e,"Popover");let M=x,N=w;void 0!==C&&(qo()("`__unstableForcePosition` prop in wp.components.Popover",{since:"6.1",version:"6.3",alternative:"`flip={ false }` and `resize={ false }`"}),M=!C,N=!C),void 0!==k&&qo()("`anchorRef` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"}),void 0!==P&&qo()("`anchorRect` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"}),void 0!==T&&qo()("`getAnchorRect` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"});const D=I?"toolbar":S;void 0!==I&&qo()("`isAlternate` prop in wp.components.Popover",{since:"6.2",alternative:"`variant` prop with the `'toolbar'` value"});const A=(0,Uo.useRef)(null),[O,z]=(0,Uo.useState)(null),L=(0,Uo.useCallback)((e=>{z(e)}),[]),F=(0,d.useViewportMatch)("medium","<"),B=v&&F,j=!B&&!u,V=f?Xo(f):m,H=[..."overlay"===m?[{name:"overlay",fn:({rects:e})=>e.reference},ko({apply({rects:e,elements:t}){var n;const{firstElementChild:r}=null!==(n=t.floating)&&void 0!==n?n:{};r instanceof HTMLElement&&Object.assign(r.style,{width:`${e.reference.width}px`,height:`${e.reference.height}px`})}})]:[],Fr(p),M&&Co(),N&&ko({apply(e){var t;const{firstElementChild:n}=null!==(t=X.floating.current)&&void 0!==t?t:{};n instanceof HTMLElement&&Object.assign(n.style,{maxHeight:`${e.availableHeight}px`,overflow:"auto"})}}),E&&So({crossAxis:!0,limiter:To(),padding:1}),qy({element:A})],$=(0,Uo.useContext)(hw)||y,W=zx($);let U;(a||b)&&(U=(e,t)=>{"focus-outside"===e&&b?b(t):a&&a()});const[G,q]=(0,d.__experimentalUseDialog)({constrainTabbing:i,focusOnMount:h,__unstableOnClose:U,onClose:U}),{x:Y,y:K,refs:X,strategy:Z,update:J,placement:Q,middlewareData:{arrow:ee}}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=r.useState(o);Ky(m,o)||p(o);const[h,g]=r.useState(null),[v,b]=r.useState(null),y=r.useCallback((e=>{e!==_.current&&(_.current=e,g(e))}),[]),x=r.useCallback((e=>{e!==S.current&&(S.current=e,b(e))}),[]),w=a||h,E=s||v,_=r.useRef(null),S=r.useRef(null),C=r.useRef(d),k=null!=c,P=Jy(c),T=Jy(i),I=r.useCallback((()=>{if(!_.current||!S.current)return;const e={placement:t,strategy:n,middleware:m};T.current&&(e.platform=T.current),Io(_.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};R.current&&!Ky(C.current,t)&&(C.current=t,tr.flushSync((()=>{f(t)})))}))}),[m,t,n,T]);Yy((()=>{!1===u&&C.current.isPositioned&&(C.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[u]);const R=r.useRef(!1);Yy((()=>(R.current=!0,()=>{R.current=!1})),[]),Yy((()=>{if(w&&(_.current=w),E&&(S.current=E),w&&E){if(P.current)return P.current(w,E,I);I()}}),[w,E,I,P,k]);const M=r.useMemo((()=>({reference:_,floating:S,setReference:y,setFloating:x})),[y,x]),N=r.useMemo((()=>({reference:w,floating:E})),[w,E]),D=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!N.floating)return e;const t=Zy(N.floating,d.x),r=Zy(N.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Xy(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,N.floating,d.x,d.y]);return r.useMemo((()=>({...d,update:I,refs:M,elements:N,floatingStyles:D})),[d,I,M,N,D])}({placement:"overlay"===V?void 0:V,middleware:H,whileElementsMounted:(e,t,n)=>_o(e,t,n,{layoutShift:!1,animationFrame:!0})}),te=(0,Uo.useCallback)((e=>{A.current=e,J()}),[J]),ne=k?.top,re=k?.bottom,oe=k?.startContainer,ie=k?.current;(0,Uo.useLayoutEffect)((()=>{const e=(({anchor:e,anchorRef:t,anchorRect:n,getAnchorRect:r,fallbackReferenceElement:o})=>{var i;let a=null;return e?a=e:function(e){return!!e?.top}(t)?a={getBoundingClientRect(){const e=t.top.getBoundingClientRect(),n=t.bottom.getBoundingClientRect();return new window.DOMRect(e.x,e.y,e.width,n.bottom-e.top)}}:function(e){return!!e?.current}(t)?a=t.current:t?a=t:n?a={getBoundingClientRect:()=>n}:r?a={getBoundingClientRect(){var e,t,n,i;const a=r(o);return new window.DOMRect(null!==(e=a.x)&&void 0!==e?e:a.left,null!==(t=a.y)&&void 0!==t?t:a.top,null!==(n=a.width)&&void 0!==n?n:a.right-a.left,null!==(i=a.height)&&void 0!==i?i:a.bottom-a.top)}}:o&&(a=o.parentElement),null!==(i=a)&&void 0!==i?i:null})({anchor:g,anchorRef:k,anchorRect:P,getAnchorRect:T,fallbackReferenceElement:O});X.setReference(e)}),[g,k,ne,re,oe,ie,P,T,O,X]);const ae=(0,d.useMergeRefs)([X.setFloating,G,t]),se=B?void 0:{position:Z,top:0,left:0,x:Jo(Y),y:Jo(K)},le=Qy(),ce=n&&!B&&!le,[ue,de]=(0,Uo.useState)(!1),{style:fe,...me}=(0,Uo.useMemo)((()=>(e=>{const t=e.startsWith("top")||e.startsWith("bottom")?"translateY":"translateX",n=e.startsWith("top")||e.startsWith("left")?1:-1;return{style:Zo[e],initial:{opacity:0,scale:0,[t]:2*n+"em"},animate:{opacity:1,scale:1,[t]:0},transition:{duration:.1,ease:[0,0,.2,1]}}})(Q)),[Q]),pe=ce?{style:{...fe,...se},onAnimationComplete:()=>de(!0),...me}:{animate:!1,style:se},he=(!ce||ue)&&null!==Y&&null!==K,[ge,ve]=(0,Uo.useState)(!1),be=(0,Uo.useMemo)((()=>({ColorPicker:{onPickerDragStart(){ve(!0)},onPickerDragEnd(){ve(!1)}}})),[]);let ye=(0,r.createElement)(r.Fragment,null,ge&&(0,r.createElement)("div",{className:"components-popover-pointer-events-trap","aria-hidden":"true",onClick:()=>ve(!1)}),(0,r.createElement)(wh.div,{className:c()("components-popover",l,{"is-expanded":B,"is-positioned":he,[`is-${"toolbar"===D?"alternate":D}`]:D}),...pe,...R,ref:ae,...q,tabIndex:-1},B&&(0,r.createElement)(ox,null),B&&(0,r.createElement)("div",{className:"components-popover__header"},(0,r.createElement)("span",{className:"components-popover__header-title"},o),(0,r.createElement)(my,{className:"components-popover__close",icon:ex,onClick:a})),(0,r.createElement)("div",{className:"components-popover__content"},(0,r.createElement)(mi,{value:be},s)),j&&(0,r.createElement)("div",{ref:te,className:["components-popover__arrow",`is-${Q.split("-")[0]}`].join(" "),style:{left:void 0!==ee?.x&&Number.isFinite(ee.x)?`${ee.x}px`:"",top:void 0!==ee?.y&&Number.isFinite(ee.y)?`${ee.y}px`:""}},(0,r.createElement)(pw,null))));const xe=W.ref&&!_,we=k||P||g;return xe?ye=(0,r.createElement)(cw,{name:$},ye):_||(ye=(0,Uo.createPortal)((0,r.createElement)(Qx,{document},ye),(()=>{let e=document.body.querySelector("."+gw);return e||(e=document.createElement("div"),e.className=gw,document.body.append(e)),e})())),we?ye:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{ref:L}),ye)}),"Popover");vw.Slot=(0,Uo.forwardRef)((function({name:e=mw},t){return(0,r.createElement)(uw,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})})),vw.__unstableSlotNameProvider=hw.Provider;const bw=vw;function yw(e){const t=e.useItems?e.useItems:Gy(e);return function({filterValue:e,instanceId:n,listBoxId:o,className:i,selectedIndex:a,onChangeOptions:s,onSelect:l,onReset:f,reset:m,contentRef:p}){const[h]=t(e),g=(0,By.useAnchor)({editableContentElement:p.current}),[v,b]=(0,Uo.useState)(!1),y=(0,Uo.useRef)(null),x=(0,d.useMergeRefs)([y,(0,d.useRefEffect)((e=>{p.current&&b(e.ownerDocument!==p.current.ownerDocument)}),[p])]);!function(e,t){(0,Uo.useEffect)((()=>{const n=n=>{e.current&&!e.current.contains(n.target)&&t(n)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}}),[t])}(y,m);const w=(0,d.useDebounce)(jy.speak,500);if((0,Uo.useLayoutEffect)((()=>{s(h),function(t){w&&(t.length?w(e?(0,u.sprintf)((0,u._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length):(0,u.sprintf)((0,u._n)("Initial %d result loaded. Type to filter all available results. Use up and down arrow keys to navigate.","Initial %d results loaded. Type to filter all available results. Use up and down arrow keys to navigate.",t.length),t.length),"assertive"):w((0,u.__)("No results."),"assertive"))}(h)}),[h]),0===h.length)return null;const E=({Component:e="div"})=>(0,r.createElement)(e,{id:o,role:"listbox",className:"components-autocomplete__results"},h.map(((e,t)=>(0,r.createElement)(my,{key:e.key,id:`components-autocomplete-item-${n}-${e.key}`,role:"option","aria-selected":t===a,disabled:e.isDisabled,className:c()("components-autocomplete__result",i,{"is-selected":t===a}),onClick:()=>l(e)},e.label))));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(bw,{focusOnMount:!1,onClose:f,placement:"top-start",className:"components-autocomplete__popover",anchor:g,ref:x},(0,r.createElement)(E,null)),p.current&&v&&(0,tr.createPortal)((0,r.createElement)(E,{Component:ws}),p.current.ownerDocument.body))}}const xw=e=>{if(null===e)return"";switch(typeof e){case"string":case"number":return e.toString();case"boolean":default:return"";case"object":if(e instanceof Array)return e.map(xw).join("");if("props"in e)return xw(e.props.children)}return""},ww=[];function Ew({record:e,onChange:t,onReplace:n,completers:o,contentRef:i}){const a=(0,d.useInstanceId)(Ew),[s,l]=(0,Uo.useState)(0),[c,u]=(0,Uo.useState)(ww),[f,m]=(0,Uo.useState)(""),[p,h]=(0,Uo.useState)(null),[g,v]=(0,Uo.useState)(null),b=(0,Uo.useRef)(!1);function y(r){const{getOptionCompletion:o}=p||{};if(!r.isDisabled){if(o){const i=o(r.value,f),a=(e=>null!==e&&"object"==typeof e&&"action"in e&&void 0!==e.action&&"value"in e&&void 0!==e.value)(i)?i:{action:"insert-at-caret",value:i};if("replace"===a.action)return void n([a.value]);"insert-at-caret"===a.action&&function(n){if(null===p)return;const r=e.start,o=r-p.triggerPrefix.length-f.length,i=(0,By.create)({html:(0,Uo.renderToString)(n)});t((0,By.insert)(e,i,o,r))}(a.value)}x()}}function x(){l(0),u(ww),m(""),h(null),v(null)}const w=(0,Uo.useMemo)((()=>(0,By.isCollapsed)(e)?(0,By.getTextContent)((0,By.slice)(e,0)):""),[e]);(0,Uo.useEffect)((()=>{if(!w)return void(p&&x());const t=o.reduce(((e,t)=>w.lastIndexOf(t.triggerPrefix)>(null!==e?w.lastIndexOf(e.triggerPrefix):-1)?t:e),null);if(!t)return void(p&&x());const{allowContext:n,triggerPrefix:r}=t,i=w.lastIndexOf(r),a=w.slice(i+r.length);if(a.length>50)return;const s=0===c.length,l=a.split(/\s/),u=1===l.length,d=b.current&&l.length<=3;if(s&&!d&&!u)return void(p&&x());const f=(0,By.getTextContent)((0,By.slice)(e,void 0,(0,By.getTextContent)(e).length));if(n&&!n(w.slice(0,i),f))return void(p&&x());if(/^\s/.test(a)||/\s\s+$/.test(a))return void(p&&x());if(!/[\u0000-\uFFFF]*$/.test(a))return void(p&&x());const y=Uy(t.triggerPrefix),E=Fy()(w),_=E.slice(E.lastIndexOf(t.triggerPrefix)).match(new RegExp(`${y}([\0-￿]*)$`)),S=_&&_[1];h(t),v((()=>t!==p?yw(t):g)),m(null===S?"":S)}),[w]);const{key:E=""}=c[s]||{},{className:_}=p||{},S=!!p&&c.length>0,C=S?`components-autocomplete-listbox-${a}`:void 0;return{listBoxId:C,activeId:S?`components-autocomplete-item-${a}-${E}`:null,onKeyDown:function(e){if(b.current="Backspace"===e.key,p&&0!==c.length&&!e.defaultPrevented&&!e.isComposing&&229!==e.keyCode){switch(e.key){case"ArrowUp":{const e=(0===s?c.length:s)-1;l(e),(0,Vy.isAppleOS)()&&(0,jy.speak)(xw(c[e].label),"assertive");break}case"ArrowDown":{const e=(s+1)%c.length;l(e),(0,Vy.isAppleOS)()&&(0,jy.speak)(xw(c[e].label),"assertive");break}case"Escape":h(null),v(null),e.preventDefault();break;case"Enter":y(c[s]);break;case"ArrowLeft":case"ArrowRight":return void x();default:return}e.preventDefault()}},popover:void 0!==e.start&&g&&(0,r.createElement)(g,{className:_,filterValue:f,instanceId:a,listBoxId:C,selectedIndex:s,onChangeOptions:function(e){l(e.length===c.length?s:0),u(e)},onSelect:y,value:e,contentRef:i,reset:x})}}function _w(e){const t=(0,Uo.useRef)(null),n=(0,Uo.useRef)(),{record:r}=e,o=function(e){const t=(0,Uo.useRef)(new Set);return t.current.add(e),t.current.size>2&&t.current.delete(Array.from(t.current)[0]),Array.from(t.current)[0]}(r),{popover:i,listBoxId:a,activeId:s,onKeyDown:l}=Ew({...e,contentRef:t});n.current=l;const c=(0,d.useMergeRefs)([t,(0,d.useRefEffect)((e=>{function t(e){n.current?.(e)}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[])]);return r.text!==o?.text?{ref:c,children:i,"aria-autocomplete":a?"list":void 0,"aria-owns":a,"aria-activedescendant":s}:{ref:c}}function Sw({children:e,isSelected:t,...n}){const{popover:o,...i}=Ew(n);return(0,r.createElement)(r.Fragment,null,e(i),t&&o)}function Cw(e){const{help:t,id:n,...r}=e,o=(0,d.useInstanceId)(iy,"wp-components-base-control",n);return{baseControlProps:{id:o,help:t,...r},controlProps:{id:o,...t?{["string"==typeof t?"aria-describedby":"aria-details"]:`${o}__help`}:{}}}}const kw=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})),Pw=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"}));const Tw=Ps("",""),Iw={name:"bjn8wh",styles:"position:relative"},Rw=e=>{const{color:t=Ds.gray[200],style:n="solid",width:r=Xg.borderWidth}=e||{};return`${t} ${!!r&&"0"!==r||!!t?n||"solid":n} ${r!==Xg.borderWidth?`clamp(1px, ${r}, 10px)`:r}`},Mw={name:"1nwbfnf",styles:"grid-column:span 2;margin:0 auto"};function Nw(e){const{className:t,size:n="default",...r}=rs(e,"BorderBoxControlLinkedButton"),o=ns();return{...r,className:(0,Uo.useMemo)((()=>o((e=>Ps("position:absolute;top:","__unstable-large"===e?"8px":"3px",";",Jh({right:0})()," line-height:0;",""))(n),t)),[t,o,n])}}const Dw=os(((e,t)=>{const{className:n,isLinked:o,...i}=Nw(e),a=o?(0,u.__)("Unlink sides"):(0,u.__)("Link sides");return(0,r.createElement)(ri,{text:a},(0,r.createElement)(xs,{className:n},(0,r.createElement)(my,{...i,size:"small",icon:o?kw:Pw,iconSize:24,"aria-label":a,ref:t})))}),"BorderBoxControlLinkedButton");function Aw(e){const{className:t,value:n,size:r="default",...o}=rs(e,"BorderBoxControlVisualizer"),i=ns(),a=(0,Uo.useMemo)((()=>i(((e,t)=>Ps("position:absolute;top:","__unstable-large"===t?"20px":"15px",";right:","__unstable-large"===t?"39px":"29px",";bottom:","__unstable-large"===t?"20px":"15px",";left:","__unstable-large"===t?"39px":"29px",";border-top:",Rw(e?.top),";border-bottom:",Rw(e?.bottom),";",Jh({borderLeft:Rw(e?.left)})()," ",Jh({borderRight:Rw(e?.right)})(),";",""))(n,r),t)),[i,t,n,r]);return{...o,className:a,value:n}}const Ow=os(((e,t)=>{const{value:n,...o}=Aw(e);return(0,r.createElement)(xs,{...o,ref:t})}),"BorderBoxControlVisualizer"),zw=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),Lw=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M5 11.25h14v1.5H5z"})),Fw=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"})),Bw=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{fillRule:"evenodd",d:"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z",clipRule:"evenodd"})),jw=(0,r.createContext)(null),Vw=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Hw(){const e=new Set,t=new WeakMap,n=()=>e.forEach(Vw);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const $w=e=>!0===e,Ww=({children:e,id:t,inherit:n=!0})=>{const o=(0,r.useContext)(Ol),i=(0,r.useContext)(jw),[a,s]=_h(),l=(0,r.useRef)(null),c=o.id||i;null===l.current&&((e=>$w(!0===e)||"id"===e)(n)&&c&&(t=t?c+"-"+t:c),l.current={id:t,group:$w(n)&&o.group||Hw()});const u=(0,r.useMemo)((()=>({...l.current,forceRender:a})),[s]);return r.createElement(Ol.Provider,{value:u},e)};const Uw=e=>{const t=Ps("border-color:",Ds.ui.border,";","");return Ps(e&&t," &:hover{border-color:",Ds.ui.borderHover,";}&:focus-within{border-color:",Ds.ui.borderFocus,";box-shadow:",Xg.controlBoxShadowFocus,";z-index:1;outline:2px solid transparent;outline-offset:-2px;}","")};var Gw={name:"1aqh2c7",styles:"min-height:40px;padding:3px"},qw={name:"1ndywgm",styles:"min-height:36px;padding:2px"};const Yw=e=>({default:qw,"__unstable-large":Gw}[e]),Kw={name:"7whenc",styles:"display:flex;width:100%"},Xw=bs("div",{target:"eakva830"})({name:"zjik7",styles:"display:flex"});function Zw(e={}){var t,n=N(e,[]);const r=null==(t=n.store)?void 0:t.getState(),o=tl(M(R({},n),{focusLoop:V(n.focusLoop,null==r?void 0:r.focusLoop,!0)})),i=Rt(M(R({},o.getState()),{value:V(n.value,null==r?void 0:r.value,n.defaultValue,null)}),o,n.store);return M(R(R({},o),i),{setValue:e=>i.setState("value",e)})}function Jw(e={}){const[t,n]=$t(Zw,e);return function(e,t,n){return Ht(e=nl(e,t,n),n,"value","setValue"),e}(t,n,e)}var Qw=He([Ct],[kt]),eE=Qw.useContext,tE=(Qw.useScopedContext,Qw.useProviderContext),nE=(Qw.ContextProvider,Qw.ScopedContextProvider),rE=Ve((e=>{var t=e,{store:n}=t,r=E(t,["store"]);const o=tE();return F(n=n||o,!1),r=Te(r,(e=>(0,Le.jsx)(nE,{value:n,children:e})),[n]),r=x({role:"radiogroup"},r),r=il(x({store:n},r))})),oE=Fe((e=>je("div",rE(e))));const iE=(0,Uo.createContext)({}),aE=iE;function sE(e){const t=(0,Uo.useRef)(!0),n=(0,d.usePrevious)(e),r=(0,Uo.useRef)(!1);(0,Uo.useEffect)((()=>{t.current&&(t.current=!1)}),[]);const o=r.current||!t.current&&n!==e;return(0,Uo.useEffect)((()=>{r.current=o}),[o]),o?{value:null!=e?e:"",defaultValue:void 0}:{value:void 0,defaultValue:e}}const lE=(0,Uo.forwardRef)((function({children:e,isAdaptiveWidth:t,label:n,onChange:o,size:i,value:a,id:s,...l},c){const u=(0,d.useInstanceId)(lE,"toggle-group-control-as-radio-group"),f=s||u,{value:m,defaultValue:p}=sE(a),h=o?e=>{o(null!=e?e:void 0)}:void 0,g=Jw({defaultValue:p,value:m,setValue:h}),v=g.useState("value"),b=g.setValue,y=(0,Uo.useMemo)((()=>({baseId:f,isBlock:!t,size:i,value:v,setValue:b})),[f,t,i,v,b]);return(0,r.createElement)(aE.Provider,{value:y},(0,r.createElement)(oE,{store:g,"aria-label":n,render:(0,r.createElement)(xs,null),...l,id:f,ref:c},e))}));function cE({defaultValue:e,onChange:t,value:n}){const r=void 0!==n,o=r?n:e,[i,a]=(0,Uo.useState)(o);let s;return s=r&&"function"==typeof t?t:r||"function"!=typeof t?a:e=>{t(e),a(e)},[r?n:i,s]}const uE=(0,Uo.forwardRef)((function({children:e,isAdaptiveWidth:t,label:n,onChange:o,size:i,value:a,id:s,...l},c){const u=(0,d.useInstanceId)(uE,"toggle-group-control-as-button-group"),f=s||u,{value:m,defaultValue:p}=sE(a),[h,g]=cE({defaultValue:p,value:m,onChange:o}),v=(0,Uo.useMemo)((()=>({baseId:f,value:h,setValue:g,isBlock:!t,isDeselectable:!0,size:i})),[f,h,g,t,i]);return(0,r.createElement)(aE.Provider,{value:v},(0,r.createElement)(xs,{"aria-label":n,...l,ref:c,role:"group"},e))}));const dE=os((function(e,t){const{__nextHasNoMarginBottom:n=!1,__next40pxDefaultSize:o=!1,className:i,isAdaptiveWidth:a=!1,isBlock:s=!1,isDeselectable:l=!1,label:c,hideLabelFromVision:u=!1,help:f,onChange:m,size:p="default",value:h,children:g,...v}=rs(e,"ToggleGroupControl"),b=(0,d.useInstanceId)(dE,"toggle-group-control"),y=o&&"default"===p?"__unstable-large":p,x=ns(),w=(0,Uo.useMemo)((()=>x((({isBlock:e,isDeselectable:t,size:n})=>Ps("background:",Ds.ui.background,";border:1px solid transparent;border-radius:",Xg.controlBorderRadius,";display:inline-flex;min-width:0;position:relative;",Yw(n)," ",!t&&Uw(e),";",""))({isBlock:s,isDeselectable:l,size:y}),s&&Kw,i)),[i,x,s,l,y]),E=l?uE:lE;return(0,r.createElement)(iy,{help:f,__nextHasNoMarginBottom:n},!u&&(0,r.createElement)(Xw,null,(0,r.createElement)(iy.VisualLabel,null,c)),(0,r.createElement)(E,{...v,className:w,isAdaptiveWidth:a,label:c,onChange:m,ref:t,size:y,value:h},(0,r.createElement)(Ww,{id:b},g)))}),"ToggleGroupControl"),fE=dE;var mE=Ve((e=>{var t=e,{store:n,name:o,value:i,checked:a}=t,s=E(t,["store","name","value","checked"]);const l=eE();n=n||l;const c=_e(s.id),u=(0,r.useRef)(null),d=Vt(n,(e=>null!=a?a:function(e,t){if(void 0!==t)return null!=e&&null!=t?t===e:!!t}(i,null==e?void 0:e.value)));(0,r.useEffect)((()=>{if(!c)return;if(!d)return;(null==n?void 0:n.getState().activeId)===c||null==n||n.setActiveId(c)}),[n,d,c]);const f=s.onChange,m=function(e,t){return"input"===e&&(!t||"radio"===t)}(Se(u,s.as||"input"),s.type),p=j(s),[h,g]=ke();(0,r.useEffect)((()=>{const e=u.current;e&&(m||(void 0!==d&&(e.checked=d),void 0!==o&&(e.name=o),void 0!==i&&(e.value=`${i}`)))}),[h,m,d,o,i]);const v=we((e=>{if(p)return e.preventDefault(),void e.stopPropagation();m||(e.currentTarget.checked=!0,g()),null==f||f(e),e.defaultPrevented||null==n||n.setValue(i)})),b=s.onClick,y=we((e=>{null==b||b(e),e.defaultPrevented||m||v(e)})),_=s.onFocus,S=we((e=>{if(null==_||_(e),e.defaultPrevented)return;if(!m)return;if(!n)return;const{moves:t,activeId:r}=n.getState();t&&(c&&r!==c||v(e))}));return s=w(x({id:c,role:m?void 0:"radio",type:m?"radio":void 0,"aria-checked":d},s),{ref:Ee(u,s.ref),onChange:v,onClick:y,onFocus:S}),s=Gt(x({store:n,clickOnEnter:!m},s)),x({name:m?o:void 0,value:m?i:void 0,checked:d},s)})),pE=Be((e=>je("input",mE(e))));const hE=bs("div",{target:"et6ln9s1"})({name:"sln1fl",styles:"display:inline-flex;max-width:100%;min-width:0;position:relative"}),gE={name:"82a6rk",styles:"flex:1"},vE=({isDeselectable:e,isIcon:t,isPressed:n,size:r})=>Ps("align-items:center;appearance:none;background:transparent;border:none;border-radius:",Xg.controlBorderRadius,";color:",Ds.gray[700],";fill:currentColor;cursor:pointer;display:flex;font-family:inherit;height:100%;justify-content:center;line-height:100%;outline:none;padding:0 12px;position:relative;text-align:center;transition:background ",Xg.transitionDurationFast," linear,color ",Xg.transitionDurationFast," linear,font-weight 60ms linear;",As("transition")," user-select:none;width:100%;z-index:2;&::-moz-focus-inner{border:0;}&:active{background:",Xg.toggleGroupControlBackgroundColor,";}",e&&yE," ",t&&wE({size:r})," ",n&&bE,";",""),bE=Ps("color:",Ds.white,";&:active{background:transparent;}",""),yE=Ps("color:",Ds.gray[900],";&:focus{box-shadow:inset 0 0 0 1px ",Ds.white,",0 0 0 ",Xg.borderWidthFocus," ",Ds.theme.accent,";outline:2px solid transparent;}",""),xE=bs("div",{target:"et6ln9s0"})("display:flex;font-size:",Xg.fontSize,";line-height:1;"),wE=({size:e="default"})=>Ps("color:",Ds.gray[900],";height:",{default:"30px","__unstable-large":"32px"}[e],";aspect-ratio:1;padding-left:0;padding-right:0;",""),EE=Ps("background:",Ds.gray[900],";border-radius:",Xg.controlBorderRadius,";position:absolute;inset:0;z-index:1;outline:2px solid transparent;outline-offset:-3px;",""),{ButtonContentView:_E,LabelView:SE}=t,CE={duration:0},kE=({showTooltip:e,text:t,children:n})=>e&&t?(0,r.createElement)(ri,{text:t,placement:"top"},n):(0,r.createElement)(r.Fragment,null,n);const PE=os((function e(t,n){const o=Qy(),i=(0,Uo.useContext)(iE),a=rs({...t,id:(0,d.useInstanceId)(e,i.baseId||"toggle-group-control-option-base")},"ToggleGroupControlOptionBase"),{isBlock:s=!1,isDeselectable:l=!1,size:c="default"}=i,{className:u,isIcon:f=!1,value:m,children:p,showTooltip:h=!1,onFocus:g,...v}=a,b=i.value===m,y=ns(),x=(0,Uo.useMemo)((()=>y(s&&gE)),[y,s]),w=(0,Uo.useMemo)((()=>y(vE({isDeselectable:l,isIcon:f,isPressed:b,size:c}),u)),[y,l,f,b,c,u]),E=(0,Uo.useMemo)((()=>y(EE)),[y]),_={...v,className:w,"data-value":m,ref:n};return(0,r.createElement)(SE,{className:x},(0,r.createElement)(kE,{showTooltip:h,text:v["aria-label"]},l?(0,r.createElement)("button",{..._,onFocus:g,"aria-pressed":b,type:"button",onClick:()=>{l&&b?i.setValue(void 0):i.setValue(m)}},(0,r.createElement)(_E,null,p)):(0,r.createElement)(pE,{render:(0,r.createElement)("button",{type:"button",..._,onFocus:e=>{g?.(e),e.defaultPrevented||i.setValue(m)}}),value:m},(0,r.createElement)(_E,null,p))),b?(0,r.createElement)(wh.div,{className:E,transition:o?CE:void 0,role:"presentation",layoutId:"toggle-group-backdrop-shared-layout-id"}):null)}),"ToggleGroupControlOptionBase"),TE=PE;const IE=(0,Uo.forwardRef)((function(e,t){const{icon:n,label:o,...i}=e;return(0,r.createElement)(TE,{...i,isIcon:!0,"aria-label":o,showTooltip:!0,ref:t},(0,r.createElement)(uy,{icon:n}))})),RE=IE,ME=[{label:(0,u.__)("Solid"),icon:Lw,value:"solid"},{label:(0,u.__)("Dashed"),icon:Fw,value:"dashed"},{label:(0,u.__)("Dotted"),icon:Bw,value:"dotted"}];const NE=os((function({onChange:e,...t},n){return(0,r.createElement)(fE,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,ref:n,isDeselectable:!0,onChange:t=>{e?.(t)},...t},ME.map((e=>(0,r.createElement)(RE,{key:e.value,value:e.value,icon:e.icon,label:e.label}))))}),"BorderControlStylePicker");const DE=(0,Uo.forwardRef)((function(e,t){const{className:n,colorValue:o,...i}=e;return(0,r.createElement)("span",{className:c()("component-color-indicator",n),style:{background:o},ref:t,...i})}));var AE=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},OE=function(e){return.2126*AE(e.r)+.7152*AE(e.g)+.0722*AE(e.b)};function zE(e){e.prototype.luminance=function(){return e=OE(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,r,o,i,a,s,l,c=t instanceof e?t:new e(t);return i=this.rgba,a=c.toRgb(),n=(s=OE(i))>(l=OE(a))?(s+.05)/(l+.05):(l+.05)/(s+.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)>=(a=void 0===(i=(n=t).size)?"normal":i,"AAA"===(o=void 0===(r=n.level)?"AA":r)&&"normal"===a?7:"AA"===o&&"large"===a?3:4.5);var n,r,o,i,a}}const LE=os(((e,t)=>{const{renderContent:n,renderToggle:o,className:i,contentClassName:a,expandOnMobile:s,headerTitle:l,focusOnMount:u,popoverProps:f,onClose:m,onToggle:p,style:h,open:g,defaultOpen:v,position:b,variant:y}=rs(e,"Dropdown");void 0!==b&&qo()("`position` prop in wp.components.Dropdown",{since:"6.2",alternative:"`popoverProps.placement` prop",hint:"Note that the `position` prop will override any values passed through the `popoverProps.placement` prop."});const[x,w]=(0,Uo.useState)(null),E=(0,Uo.useRef)(),[_,S]=cE({defaultValue:v,value:g,onChange:p});function C(){m?.(),S(!1)}const k={isOpen:!!_,onToggle:()=>S(!_),onClose:C},P=!!(f?.anchor||f?.anchorRef||f?.getAnchorRect||f?.anchorRect);return(0,r.createElement)("div",{className:i,ref:(0,d.useMergeRefs)([E,t,w]),tabIndex:-1,style:h},o(k),_&&(0,r.createElement)(bw,{position:b,onClose:C,onFocusOutside:function(){if(!E.current)return;const{ownerDocument:e}=E.current,t=e?.activeElement?.closest('[role="dialog"]');E.current.contains(e.activeElement)||t&&!t.contains(E.current)||C()},expandOnMobile:s,headerTitle:l,focusOnMount:u,offset:13,anchor:P?void 0:x,variant:y,...f,className:c()("components-dropdown__content",f?.className,a)},n(k)))}),"Dropdown"),FE=LE;const BE=os((function(e,t){const n=rs(e,"InputControlSuffixWrapper");return(0,r.createElement)(tg,{marginBottom:0,...n,ref:t})}),"InputControlSuffixWrapper"),jE=bs("select",{target:"e1mv6sxx2"})("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",Ds.gray[900],";display:block;font-family:inherit;margin:0;width:100%;max-width:none;cursor:pointer;white-space:nowrap;text-overflow:ellipsis;",(({disabled:e})=>e?Ps({color:Ds.ui.textDisabled},"",""):""),";",xv,";",(({__next40pxDefaultSize:e,multiple:t,selectSize:n="default"})=>{if(t)return;const r={default:{height:40,minHeight:40,paddingTop:0,paddingBottom:0},small:{height:24,minHeight:24,paddingTop:0,paddingBottom:0},compact:{height:32,minHeight:32,paddingTop:0,paddingBottom:0},"__unstable-large":{height:40,minHeight:40,paddingTop:0,paddingBottom:0}};e||(r.default=r.compact);return Ps(r[n]||r.default,"","")}),";",(({__next40pxDefaultSize:e,multiple:t,selectSize:n="default"})=>{const r={default:16,small:8,compact:8,"__unstable-large":16};e||(r.default=r.compact);const o=r[n]||r.default;return Jh({paddingLeft:o,paddingRight:o+18,...t?{paddingTop:o,paddingBottom:o}:{}})}),";",(({multiple:e})=>({overflow:e?"auto":"hidden"})),";}"),VE=bs("div",{target:"e1mv6sxx1"})("margin-inline-end:",Ah(-1),";line-height:0;"),HE=bs(BE,{target:"e1mv6sxx0"})("position:absolute;pointer-events:none;",Jh({right:0}),";");const $E=(0,Uo.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,Uo.cloneElement)(e,{width:t,height:t,...n,ref:r})})),WE=(0,r.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(n.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),UE=()=>(0,r.createElement)(HE,null,(0,r.createElement)(VE,null,(0,r.createElement)($E,{icon:WE,size:18}))),GE=()=>{};const qE=(0,Uo.forwardRef)((function(e,t){const{className:n,disabled:o=!1,help:i,hideLabelFromVision:a,id:s,label:l,multiple:u=!1,onBlur:f=GE,onChange:m,onFocus:p=GE,options:h=[],size:g="default",value:v,labelPosition:b="top",children:y,prefix:x,suffix:w,__next40pxDefaultSize:E=!1,__nextHasNoMarginBottom:_=!1,...S}=Nv(e),[C,k]=(0,Uo.useState)(!1),P=function(e){const t=(0,d.useInstanceId)(qE);return e||`inspector-select-control-${t}`}(s),T=i?`${P}__help`:void 0;if(!h?.length&&!y)return null;const I=c()("components-select-control",n);return(0,r.createElement)(iy,{help:i,id:P,__nextHasNoMarginBottom:_},(0,r.createElement)(Ov,{className:I,disabled:o,hideLabelFromVision:a,id:P,isFocused:C,label:l,size:g,suffix:w||!u&&(0,r.createElement)(UE,null),prefix:x,labelPosition:b,__next40pxDefaultSize:E},(0,r.createElement)(jE,{...S,__next40pxDefaultSize:E,"aria-describedby":T,className:"components-select-control__input",disabled:o,id:P,multiple:u,onBlur:e=>{f(e),k(!1)},onChange:t=>{if(e.multiple){const n=Array.from(t.target.options).filter((({selected:e})=>e)).map((({value:e})=>e));e.onChange?.(n,{event:t})}else e.onChange?.(t.target.value,{event:t})},onFocus:e=>{p(e),k(!0)},ref:t,selectSize:g,value:v},y||h.map(((e,t)=>{const n=e.id||`${e.label}-${e.value}-${t}`;return(0,r.createElement)("option",{key:n,value:e.value,disabled:e.disabled,hidden:e.hidden},e.label)})))))})),YE=qE,KE={initial:void 0,fallback:""};const XE=function(e,t=KE){const{initial:n,fallback:r}={...KE,...t},[o,i]=(0,Uo.useState)(e),a=ag(e);return(0,Uo.useEffect)((()=>{a&&o&&i(void 0)}),[a,o]),[function(e=[],t){var n;return null!==(n=e.find(ag))&&void 0!==n?n:t}([e,o,n],r),(0,Uo.useCallback)((e=>{a||i(e)}),[a])]};function ZE(e,t,n){return"number"!=typeof e?null:parseFloat(`${wy(e,t,n)}`)}const JE=30,QE=()=>Ps({height:JE,minHeight:JE},"",""),e_=12,t_=bs("div",{target:"e1epgpqk14"})("-webkit-tap-highlight-color:transparent;align-items:center;display:flex;justify-content:flex-start;padding:0;position:relative;touch-action:none;width:100%;min-height:40px;",(({__next40pxDefaultSize:e})=>!e&&Ps({minHeight:JE},"","")),";"),n_=bs("div",{target:"e1epgpqk13"})("display:block;flex:1;position:relative;width:100%;",(({color:e=Ds.ui.borderFocus})=>Ps({color:e},"","")),";",QE,";",(({marks:e,__nextHasNoMarginBottom:t})=>t?"":Ps({marginBottom:e?16:void 0},"","")),";"),r_=bs("span",{target:"e1epgpqk12"})("display:flex;margin-top:",4,"px;",Jh({marginRight:6}),";"),o_=bs("span",{target:"e1epgpqk11"})("display:flex;margin-top:",4,"px;",Jh({marginLeft:6}),";"),i_=bs("span",{target:"e1epgpqk10"})("background-color:",Ds.gray[300],";left:0;pointer-events:none;right:0;display:block;height:",4,"px;position:absolute;margin-top:",13,"px;top:0;border-radius:",4,"px;",(({disabled:e,railColor:t})=>{let n=t||"";return e&&(n=Ds.ui.backgroundDisabled),Ps({background:n},"","")}),";"),a_=bs("span",{target:"e1epgpqk9"})("background-color:currentColor;border-radius:",4,"px;height:",4,"px;pointer-events:none;display:block;position:absolute;margin-top:",13,"px;top:0;",(({disabled:e,trackColor:t})=>{let n=t||"currentColor";return e&&(n=Ds.gray[400]),Ps({background:n},"","")}),";"),s_=bs("span",{target:"e1epgpqk8"})({name:"l7tjj5",styles:"display:block;pointer-events:none;position:relative;width:100%;user-select:none"}),l_=bs("span",{target:"e1epgpqk7"})("height:",e_,"px;left:0;position:absolute;top:-4px;width:1px;",(({disabled:e,isFilled:t})=>{let n=t?"currentColor":Ds.gray[300];return e&&(n=Ds.gray[400]),Ps({backgroundColor:n},"","")}),";"),c_=bs("span",{target:"e1epgpqk6"})("color:",Ds.gray[300],";left:0;font-size:11px;position:absolute;top:12px;transform:translateX( -50% );white-space:nowrap;",(({isFilled:e})=>Ps({color:e?Ds.gray[700]:Ds.gray[300]},"","")),";"),u_=({disabled:e})=>Ps("background-color:",e?Ds.gray[400]:Ds.theme.accent,";",""),d_=bs("span",{target:"e1epgpqk5"})("align-items:center;display:flex;height:",e_,"px;justify-content:center;margin-top:",9,"px;outline:0;pointer-events:none;position:absolute;top:0;user-select:none;width:",e_,"px;border-radius:50%;",u_,";",Jh({marginLeft:-10}),";",Jh({transform:"translateX( 4.5px )"},{transform:"translateX( -4.5px )"}),";"),f_=bs("span",{target:"e1epgpqk4"})("align-items:center;border-radius:50%;height:100%;outline:0;position:absolute;user-select:none;width:100%;",u_,";",(({isFocused:e})=>e?Ps("&::before{content:' ';position:absolute;background-color:",Ds.theme.accent,";opacity:0.4;border-radius:50%;height:",20,"px;width:",20,"px;top:-4px;left:-4px;}",""):""),";"),m_=bs("input",{target:"e1epgpqk3"})("box-sizing:border-box;cursor:pointer;display:block;height:100%;left:0;margin:0 -",6,"px;opacity:0;outline:none;position:absolute;right:0;top:0;width:calc( 100% + ",e_,"px );");var p_={name:"1cypxip",styles:"top:-80%"},h_={name:"1lr98c4",styles:"bottom:-80%"};const g_=bs("span",{target:"e1epgpqk2"})("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;color:white;display:inline-block;font-size:12px;min-width:32px;opacity:0;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;transition:opacity 120ms ease;user-select:none;line-height:1.4;",(({show:e})=>Ps({opacity:e?1:0},"","")),";",(({position:e})=>"bottom"===e?h_:p_),";",As("transition"),";",Jh({transform:"translateX(-50%)"},{transform:"translateX(50%)"}),";"),v_=bs(Ry,{target:"e1epgpqk1"})("display:inline-block;font-size:13px;margin-top:0;input[type='number']&{",QE,";}",Jh({marginLeft:`${Ah(4)} !important`}),";"),b_=bs("span",{target:"e1epgpqk0"})("display:block;margin-top:0;button,button.is-small{margin-left:0;",QE,";}",Jh({marginLeft:8}),";");const y_=(0,Uo.forwardRef)((function(e,t){const{describedBy:n,label:o,value:i,...a}=e;return(0,r.createElement)(m_,{...a,"aria-describedby":n,"aria-label":o,"aria-hidden":!1,ref:t,tabIndex:0,type:"range",value:i})}));function x_(e){const{className:t,isFilled:n=!1,label:o,style:i={},...a}=e,s=c()("components-range-control__mark",n&&"is-filled",t),l=c()("components-range-control__mark-label",n&&"is-filled");return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l_,{...a,"aria-hidden":"true",className:s,isFilled:n,style:i}),o&&(0,r.createElement)(c_,{"aria-hidden":"true",className:l,isFilled:n,style:i},o))}function w_(e){const{disabled:t=!1,marks:n=!1,min:o=0,max:i=100,step:a=1,value:s=0,...l}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i_,{disabled:t,...l}),n&&(0,r.createElement)(E_,{disabled:t,marks:n,min:o,max:i,step:a,value:s}))}function E_(e){const{disabled:t=!1,marks:n=!1,min:o=0,max:i=100,step:a=1,value:s=0}=e,l=function({marks:e,min:t=0,max:n=100,step:r=1,value:o=0}){if(!e)return[];const i=n-t;if(!Array.isArray(e)){e=[];const n=1+Math.round(i/r);for(;n>e.push({value:r*e.length+t}););}const a=[];return e.forEach(((e,r)=>{if(e.value<t||e.value>n)return;const s=`mark-${r}`,l=e.value<=o,c=(e.value-t)/i*100+"%",d={[(0,u.isRTL)()?"right":"left"]:c};a.push({...e,isFilled:l,key:s,style:d})})),a}({marks:n,min:o,max:i,step:"any"===a?1:a,value:s});return(0,r.createElement)(s_,{"aria-hidden":"true",className:"components-range-control__marks"},l.map((e=>(0,r.createElement)(x_,{...e,key:e.key,"aria-hidden":"true",disabled:t}))))}function __(e){const{className:t,inputRef:n,tooltipPosition:o,show:i=!1,style:a={},value:s=0,renderTooltipContent:l=(e=>e),zIndex:u=100,...d}=e,f=function({inputRef:e,tooltipPosition:t}){const[n,r]=(0,Uo.useState)(),o=(0,Uo.useCallback)((()=>{e&&e.current&&r(t)}),[t,e]);return(0,Uo.useEffect)((()=>{o()}),[o]),(0,Uo.useEffect)((()=>(window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}))),n}({inputRef:n,tooltipPosition:o}),m=c()("components-simple-tooltip",t),p={...a,zIndex:u};return(0,r.createElement)(g_,{...d,"aria-hidden":i,className:m,position:f,show:i,role:"tooltip",style:p},l(s))}const S_=()=>{};const C_=(0,Uo.forwardRef)((function e(t,n){const{__nextHasNoMarginBottom:o=!1,afterIcon:i,allowReset:a=!1,beforeIcon:s,className:l,color:f=Ds.theme.accent,currentInput:m,disabled:p=!1,help:h,hideLabelFromVision:g=!1,initialPosition:v,isShiftStepEnabled:b=!0,label:y,marks:x=!1,max:w=100,min:E=0,onBlur:_=S_,onChange:S=S_,onFocus:C=S_,onMouseLeave:k=S_,onMouseMove:P=S_,railColor:T,renderTooltipContent:I=(e=>e),resetFallbackValue:R,__next40pxDefaultSize:M=!1,shiftStep:N=10,showTooltip:D,step:A=1,trackColor:O,value:z,withInputField:L=!0,...F}=t,[B,j]=function(e){const{min:t,max:n,value:r,initial:o}=e,[i,a]=XE(ZE(r,t,n),{initial:ZE(null!=o?o:null,t,n),fallback:null});return[i,(0,Uo.useCallback)((e=>{a(null===e?null:ZE(e,t,n))}),[t,n,a])]}({min:E,max:w,value:null!=z?z:null,initial:v}),V=(0,Uo.useRef)(!1);let H=D,$=L;"any"===A&&(H=!1,$=!1);const[W,U]=(0,Uo.useState)(H),[G,q]=(0,Uo.useState)(!1),Y=(0,Uo.useRef)(),K=Y.current?.matches(":focus"),X=!p&&G,Z=null===B,J=Z?"":void 0!==B?B:m,Q=Z?(w-E)/2+E:B,ee=`${wy(Z?50:(B-E)/(w-E)*100,0,100)}%`,te=c()("components-range-control",l),ne=c()("components-range-control__wrapper",!!x&&"is-marked"),re=(0,d.useInstanceId)(e,"inspector-range-control"),oe=h?`${re}__help`:void 0,ie=!1!==H&&Number.isFinite(B),ae=()=>{let e=parseFloat(`${R}`),t=e;isNaN(e)&&(e=null,t=void 0),j(e),S(t)},se={[(0,u.isRTL)()?"right":"left"]:ee};return(0,r.createElement)(iy,{__nextHasNoMarginBottom:o,className:te,label:y,hideLabelFromVision:g,id:`${re}`,help:h},(0,r.createElement)(t_,{className:"components-range-control__root",__next40pxDefaultSize:M},s&&(0,r.createElement)(r_,null,(0,r.createElement)(uy,{icon:s})),(0,r.createElement)(n_,{__nextHasNoMarginBottom:o,className:ne,color:f,marks:!!x},(0,r.createElement)(y_,{...F,className:"components-range-control__slider",describedBy:oe,disabled:p,id:`${re}`,label:y,max:w,min:E,onBlur:e=>{_(e),q(!1),U(!1)},onChange:e=>{const t=parseFloat(e.target.value);j(t),S(t)},onFocus:e=>{C(e),q(!0),U(!0)},onMouseMove:P,onMouseLeave:k,ref:(0,d.useMergeRefs)([Y,n]),step:A,value:null!=J?J:void 0}),(0,r.createElement)(w_,{"aria-hidden":!0,disabled:p,marks:x,max:w,min:E,railColor:T,step:A,value:Q}),(0,r.createElement)(a_,{"aria-hidden":!0,className:"components-range-control__track",disabled:p,style:{width:ee},trackColor:O}),(0,r.createElement)(d_,{className:"components-range-control__thumb-wrapper",style:se,disabled:p},(0,r.createElement)(f_,{"aria-hidden":!0,isFocused:X,disabled:p})),ie&&(0,r.createElement)(__,{className:"components-range-control__tooltip",inputRef:Y,tooltipPosition:"bottom",renderTooltipContent:I,show:K||W,style:se,value:B})),i&&(0,r.createElement)(o_,null,(0,r.createElement)(uy,{icon:i})),$&&(0,r.createElement)(v_,{"aria-label":y,className:"components-range-control__number",disabled:p,inputMode:"decimal",isShiftStepEnabled:b,max:w,min:E,onBlur:()=>{V.current&&(ae(),V.current=!1)},onChange:e=>{let t=parseFloat(e);j(t),isNaN(t)?a&&(V.current=!0):((t<E||t>w)&&(t=ZE(t,E,w)),S(t),V.current=!1)},shiftStep:N,size:M?"__unstable-large":"default",__unstableInputWidth:Ah(M?20:16),step:A,value:J}),a&&(0,r.createElement)(b_,null,(0,r.createElement)(my,{className:"components-range-control__reset",disabled:p||void 0===B,variant:"secondary",size:"small",onClick:ae},(0,u.__)("Reset")))))})),k_=C_,P_=bs(Ry,{target:"ez9hsf47"})(yv,"{width:",Ah(24),";}"),T_=bs(YE,{target:"ez9hsf46"})("margin-left:",Ah(-2),";width:5em;select:not( :focus )~",kv,kv,kv,"{border-color:transparent;}"),I_=bs(k_,{target:"ez9hsf45"})("flex:1;margin-right:",Ah(2),";"),R_=`\n.react-colorful__interactive {\n\twidth: calc( 100% - ${Ah(2)} );\n\tmargin-left: ${Ah(1)};\n}`,M_=bs("div",{target:"ez9hsf44"})("padding-top:",Ah(2),";padding-right:0;padding-left:0;padding-bottom:0;"),N_=bs(Py,{target:"ez9hsf43"})("padding-left:",Ah(4),";padding-right:",Ah(4),";"),D_=bs($h,{target:"ez9hsf42"})("padding-top:",Ah(4),";padding-left:",Ah(4),";padding-right:",Ah(3),";padding-bottom:",Ah(5),";"),A_=bs("div",{target:"ez9hsf41"})(Kb,";width:216px;.react-colorful{display:flex;flex-direction:column;align-items:center;width:216px;height:auto;}.react-colorful__saturation{width:100%;border-radius:0;height:216px;margin-bottom:",Ah(4),";border-bottom:none;}.react-colorful__hue,.react-colorful__alpha{width:184px;height:16px;border-radius:16px;margin-bottom:",Ah(2),";}.react-colorful__pointer{height:16px;width:16px;border:none;box-shadow:0 0 2px 0 rgba( 0, 0, 0, 0.25 );outline:2px solid transparent;}.react-colorful__pointer-fill{box-shadow:inset 0 0 0 ",Xg.borderWidthFocus," #fff;}",R_,";"),O_=bs(my,{target:"ez9hsf40"})("&&&&&{min-width:",Ah(6),";padding:0;>svg{margin-right:0;}}"),z_=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})),L_=e=>{const{color:t,colorType:n}=e,[o,i]=(0,Uo.useState)(null),a=(0,Uo.useRef)(),s=(0,d.useCopyToClipboard)((()=>{switch(n){case"hsl":return t.toHslString();case"rgb":return t.toRgbString();default:return t.toHex()}}),(()=>{a.current&&clearTimeout(a.current),i(t.toHex()),a.current=setTimeout((()=>{i(null),a.current=void 0}),3e3)}));return(0,Uo.useEffect)((()=>()=>{a.current&&clearTimeout(a.current)}),[]),(0,r.createElement)(ri,{delay:0,hideOnClick:!1,text:o===t.toHex()?(0,u.__)("Copied!"):(0,u.__)("Copy")},(0,r.createElement)(O_,{size:"small",ref:s,icon:z_,showTooltip:!1}))},F_=({min:e,max:t,label:n,abbreviation:o,onChange:i,value:a})=>(0,r.createElement)(Py,{spacing:4},(0,r.createElement)(P_,{min:e,max:t,label:n,hideLabelFromVision:!0,value:a,onChange:e=>{i(e?"string"!=typeof e?e:parseInt(e,10):0)},prefix:(0,r.createElement)(tg,{as:mv,paddingLeft:Ah(4),color:Ds.theme.accent,lineHeight:1},o),spinControls:"none",size:"__unstable-large"}),(0,r.createElement)(I_,{__nextHasNoMarginBottom:!0,label:n,hideLabelFromVision:!0,min:e,max:t,value:a,onChange:i,withInputField:!1})),B_=({color:e,onChange:t,enableAlpha:n})=>{const{r:o,g:i,b:a,a:s}=e.toRgb();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(F_,{min:0,max:255,label:"Red",abbreviation:"R",value:o,onChange:e=>t(Bg({r:e,g:i,b:a,a:s}))}),(0,r.createElement)(F_,{min:0,max:255,label:"Green",abbreviation:"G",value:i,onChange:e=>t(Bg({r:o,g:e,b:a,a:s}))}),(0,r.createElement)(F_,{min:0,max:255,label:"Blue",abbreviation:"B",value:a,onChange:e=>t(Bg({r:o,g:i,b:e,a:s}))}),n&&(0,r.createElement)(F_,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*s),onChange:e=>t(Bg({r:o,g:i,b:a,a:e/100}))}))},j_=({color:e,onChange:t,enableAlpha:n})=>{const o=(0,Uo.useMemo)((()=>e.toHsl()),[e]),[i,a]=(0,Uo.useState)({...o}),s=e.isEqual(Bg(i));(0,Uo.useEffect)((()=>{s||a(o)}),[o,s]);const l=s?i:o,c=n=>{const r=Bg({...l,...n});e.isEqual(r)?a((e=>({...e,...n}))):t(r)};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(F_,{min:0,max:359,label:"Hue",abbreviation:"H",value:l.h,onChange:e=>{c({h:e})}}),(0,r.createElement)(F_,{min:0,max:100,label:"Saturation",abbreviation:"S",value:l.s,onChange:e=>{c({s:e})}}),(0,r.createElement)(F_,{min:0,max:100,label:"Lightness",abbreviation:"L",value:l.l,onChange:e=>{c({l:e})}}),n&&(0,r.createElement)(F_,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*l.a),onChange:e=>{c({a:e/100})}}))},V_=({color:e,onChange:t,enableAlpha:n})=>(0,r.createElement)(sy,{prefix:(0,r.createElement)(tg,{as:mv,marginLeft:Ah(4),color:Ds.theme.accent,lineHeight:1},"#"),value:e.toHex().slice(1).toUpperCase(),onChange:e=>{if(!e)return;const n=e.startsWith("#")?e:"#"+e;t(Bg(n))},maxLength:n?9:7,label:(0,u.__)("Hex color"),hideLabelFromVision:!0,size:"__unstable-large",__unstableStateReducer:(e,t)=>{const n=t.payload?.event?.nativeEvent;if("insertFromPaste"!==n?.inputType)return{...e};const r=e.value?.startsWith("#")?e.value.slice(1).toUpperCase():e.value?.toUpperCase();return{...e,value:r}},__unstableInputWidth:"9em"}),H_=({colorType:e,color:t,onChange:n,enableAlpha:o})=>{const i={color:t,onChange:n,enableAlpha:o};switch(e){case"hsl":return(0,r.createElement)(j_,{...i});case"rgb":return(0,r.createElement)(B_,{...i});default:return(0,r.createElement)(V_,{...i})}};function $_(){return($_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function W_(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}function U_(e){var t=(0,r.useRef)(e),n=(0,r.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var G_=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e<t?t:e},q_=function(e){return"touches"in e},Y_=function(e){return e&&e.ownerDocument.defaultView||self},K_=function(e,t,n){var r=e.getBoundingClientRect(),o=q_(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:G_((o.pageX-(r.left+Y_(e).pageXOffset))/r.width),top:G_((o.pageY-(r.top+Y_(e).pageYOffset))/r.height)}},X_=function(e){!q_(e)&&e.preventDefault()},Z_=r.memo((function(e){var t=e.onMove,n=e.onKey,o=W_(e,["onMove","onKey"]),i=(0,r.useRef)(null),a=U_(t),s=U_(n),l=(0,r.useRef)(null),c=(0,r.useRef)(!1),u=(0,r.useMemo)((function(){var e=function(e){X_(e),(q_(e)?e.touches.length>0:e.buttons>0)&&i.current?a(K_(i.current,e,l.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=c.current,o=Y_(i.current),a=n?o.addEventListener:o.removeEventListener;a(r?"touchmove":"mousemove",e),a(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=i.current;if(r&&(X_(t),!function(e,t){return t&&!q_(e)}(t,c.current)&&r)){if(q_(t)){c.current=!0;var o=t.changedTouches||[];o.length&&(l.current=o[0].identifier)}r.focus(),a(K_(r,t,l.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),s({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[s,a]),d=u[0],f=u[1],m=u[2];return(0,r.useEffect)((function(){return m}),[m]),r.createElement("div",$_({},o,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:i,onKeyDown:f,tabIndex:0,role:"slider"}))})),J_=function(e){return e.filter(Boolean).join(" ")},Q_=function(e){var t=e.color,n=e.left,o=e.top,i=void 0===o?.5:o,a=J_(["react-colorful__pointer",e.className]);return r.createElement("div",{className:a,style:{top:100*i+"%",left:100*n+"%"}},r.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},eS=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},tS=(Math.PI,function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:eS(e.h),s:eS(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:eS(o/2),a:eS(r,2)}}),nS=function(e){var t=tS(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},rS=function(e){var t=tS(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},oS=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),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:eS(255*[r,s,a,a,l,r][c]),g:eS(255*[l,r,r,s,a,a][c]),b:eS(255*[a,a,l,r,r,s][c]),a:eS(o,2)}},iS=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?sS({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)}):{h:0,s:0,v:0,a:1}},aS=iS,sS=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:eS(60*(s<0?s+6:s)),s:eS(i?a/i*100:0),v:eS(i/255*100),a:o}},lS=r.memo((function(e){var t=e.hue,n=e.onChange,o=J_(["react-colorful__hue",e.className]);return r.createElement("div",{className:o},r.createElement(Z_,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:G_(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":eS(t),"aria-valuemax":"360","aria-valuemin":"0"},r.createElement(Q_,{className:"react-colorful__hue-pointer",left:t/360,color:nS({h:t,s:100,v:100,a:1})})))})),cS=r.memo((function(e){var t=e.hsva,n=e.onChange,o={backgroundColor:nS({h:t.h,s:100,v:100,a:1})};return r.createElement("div",{className:"react-colorful__saturation",style:o},r.createElement(Z_,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:G_(t.s+100*e.left,0,100),v:G_(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+eS(t.s)+"%, Brightness "+eS(t.v)+"%"},r.createElement(Q_,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:nS(t)})))})),uS=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},dS=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")};function fS(e,t,n){var o=U_(n),i=(0,r.useState)((function(){return e.toHsva(t)})),a=i[0],s=i[1],l=(0,r.useRef)({color:t,hsva:a});(0,r.useEffect)((function(){if(!e.equal(t,l.current.color)){var n=e.toHsva(t);l.current={hsva:n,color:t},s(n)}}),[t,e]),(0,r.useEffect)((function(){var t;uS(a,l.current.hsva)||e.equal(t=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:t},o(t))}),[a,e,o]);var c=(0,r.useCallback)((function(e){s((function(t){return Object.assign({},t,e)}))}),[]);return[a,c]}var mS,pS="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,hS=new Map,gS=function(e){pS((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!hS.has(t)){var n=t.createElement("style");n.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',hS.set(t,n);var r=mS||o.nc;r&&n.setAttribute("nonce",r),t.head.appendChild(n)}}),[])},vS=function(e){var t=e.className,n=e.colorModel,o=e.color,i=void 0===o?n.defaultColor:o,a=e.onChange,s=W_(e,["className","colorModel","color","onChange"]),l=(0,r.useRef)(null);gS(l);var c=fS(n,i,a),u=c[0],d=c[1],f=J_(["react-colorful",t]);return r.createElement("div",$_({},s,{ref:l,className:f}),r.createElement(cS,{hsva:u,onChange:d}),r.createElement(lS,{hue:u.h,onChange:d,className:"react-colorful__last-control"}))},bS=function(e){var t=e.className,n=e.hsva,o=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+rS(Object.assign({},n,{a:0}))+", "+rS(Object.assign({},n,{a:1}))+")"},a=J_(["react-colorful__alpha",t]),s=eS(100*n.a);return r.createElement("div",{className:a},r.createElement("div",{className:"react-colorful__alpha-gradient",style:i}),r.createElement(Z_,{onMove:function(e){o({a:e.left})},onKey:function(e){o({a:G_(n.a+e.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},r.createElement(Q_,{className:"react-colorful__alpha-pointer",left:n.a,color:rS(n)})))},yS=function(e){var t=e.className,n=e.colorModel,o=e.color,i=void 0===o?n.defaultColor:o,a=e.onChange,s=W_(e,["className","colorModel","color","onChange"]),l=(0,r.useRef)(null);gS(l);var c=fS(n,i,a),u=c[0],d=c[1],f=J_(["react-colorful",t]);return r.createElement("div",$_({},s,{ref:l,className:f}),r.createElement(cS,{hsva:u,onChange:d}),r.createElement(lS,{hue:u.h,onChange:d}),r.createElement(bS,{hsva:u,onChange:d,className:"react-colorful__last-control"}))},xS={defaultColor:"rgba(0, 0, 0, 1)",toHsva:iS,fromHsva:function(e){var t=oS(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:dS},wS=function(e){return r.createElement(yS,$_({},e,{colorModel:xS}))},ES={defaultColor:"rgb(0, 0, 0)",toHsva:aS,fromHsva:function(e){var t=oS(e);return"rgb("+t.r+", "+t.g+", "+t.b+")"},equal:dS},_S=function(e){return r.createElement(vS,$_({},e,{colorModel:ES}))};const SS=({color:e,enableAlpha:t,onChange:n,onDragStart:o,onDragEnd:i,containerEl:a})=>{const s=t?wS:_S,l=(0,Uo.useMemo)((()=>e.toRgbString()),[e]);return(({containerEl:e,onDragStart:t,onDragEnd:n})=>{const r=(0,Uo.useRef)(!1),o=(0,Uo.useRef)(!1);(0,Uo.useEffect)((()=>{if(!e||!t&&!n)return;const i=[e.querySelector(".react-colorful__saturation"),e.querySelector(".react-colorful__hue"),e.querySelector(".react-colorful__alpha")].filter((e=>!!e));if(0===i.length)return;const a=e.ownerDocument,s=e=>{r.current=!1,o.current=!1,n?.(e)},l=e=>{r.current=!0,t?.(e)},c=e=>{const t=0===e.buttons;o.current&&t&&s(e)};return i.forEach((e=>e.addEventListener("pointerdown",l))),a.addEventListener("pointerup",s),a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",(()=>{o.current=r.current})),()=>{i.forEach((e=>e.removeEventListener("pointerdown",l))),a.removeEventListener("pointerup",s),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",s)}}),[t,n,e])})({containerEl:a,onDragStart:o,onDragEnd:i}),(0,r.createElement)(s,{color:l,onChange:e=>{n(Bg(e))}})};Vg([Hg]);const CS=[{label:"RGB",value:"rgb"},{label:"HSL",value:"hsl"},{label:"Hex",value:"hex"}],kS=os(((e,t)=>{const{enableAlpha:n=!1,color:o,onChange:i,defaultValue:a="#fff",copyFormat:s,onPickerDragStart:l,onPickerDragEnd:c,...f}=rs(e,"ColorPicker"),[m,p]=(0,Uo.useState)(null),[h,g]=cE({onChange:i,value:o,defaultValue:a}),v=(0,Uo.useMemo)((()=>Bg(h||"")),[h]),b=(0,d.useDebounce)(g),y=(0,Uo.useCallback)((e=>{b(e.toHex())}),[b]),[x,w]=(0,Uo.useState)(s||"hex");return(0,r.createElement)(A_,{ref:(0,d.useMergeRefs)([e=>{p(e)},t]),...f},(0,r.createElement)(SS,{containerEl:m,onChange:y,color:v,enableAlpha:n,onDragStart:l,onDragEnd:c}),(0,r.createElement)(M_,null,(0,r.createElement)(N_,{justify:"space-between"},(0,r.createElement)(T_,{__nextHasNoMarginBottom:!0,options:CS,value:x,onChange:e=>w(e),label:(0,u.__)("Color format"),hideLabelFromVision:!0}),(0,r.createElement)(L_,{color:v,colorType:s||x})),(0,r.createElement)(D_,{direction:"column",gap:2},(0,r.createElement)(H_,{colorType:x,color:v,onChange:y,enableAlpha:n}))))}),"ColorPicker"),PS=kS;function TS(e){if(void 0!==e)return"string"==typeof e?e:e.hex?e.hex:void 0}const IS=Si((e=>{const t=Bg(e),n=t.toHex(),r=t.toRgb(),o=t.toHsv(),i=t.toHsl();return{hex:n,rgb:r,hsv:o,hsl:i,source:"hex",oldHue:i.h}}));function RS(e){const{onChangeComplete:t}=e,n=(0,Uo.useCallback)((e=>{t(IS(e))}),[t]);return function(e){return void 0!==e.onChangeComplete||void 0!==e.disableAlpha||"string"==typeof e.color?.hex}(e)?{color:TS(e.color),enableAlpha:!e.disableAlpha,onChange:n}:{...e,color:e.color,enableAlpha:e.enableAlpha,onChange:e.onChange}}const MS=e=>(0,r.createElement)(PS,{...RS(e)}),NS=(0,Uo.createContext)({}),DS=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));const AS=(0,Uo.forwardRef)((function(e,t){const{isPressed:n,...o}=e;return(0,r.createElement)(my,{...o,"aria-pressed":n,ref:t})}));const OS=(0,Uo.forwardRef)((function(e,t){const{id:n,isSelected:o,compositeStore:i,...a}=e,s=i.useState("activeId");return o&&!s&&i.setActiveId(n),(0,r.createElement)(qt,{render:(0,r.createElement)(my,{...a,role:"option","aria-selected":!!o,ref:t}),store:i,id:n})}));function zS(e){const{actions:t,options:n,baseId:o,className:i,loop:a=!0,children:s,...l}=e,c=rl({focusLoop:a,rtl:(0,u.isRTL)()}),d={baseId:o,compositeStore:c};return(0,r.createElement)("div",{className:i},(0,r.createElement)(NS.Provider,{value:d},(0,r.createElement)(al,{...l,id:o,store:c,role:"listbox"},n),s,t))}function LS(e){const{actions:t,options:n,children:o,baseId:i,...a}=e;return(0,r.createElement)("div",{...a,id:i},(0,r.createElement)(NS.Provider,{value:{baseId:i}},n,o,t))}function FS(e){const{asButtons:t,actions:n,options:o,children:i,className:a,...s}=e,l=(0,d.useInstanceId)(FS,"components-circular-option-picker",s.id),u=t?LS:zS,f=n?(0,r.createElement)("div",{className:"components-circular-option-picker__custom-clear-wrapper"},n):void 0,m=(0,r.createElement)("div",{className:"components-circular-option-picker__swatches"},o);return(0,r.createElement)(u,{...s,baseId:l,className:c()("components-circular-option-picker",a),actions:f,options:m},i)}FS.Option=function e({className:t,isSelected:n,selectedIconProps:o={},tooltipText:i,...a}){const{baseId:s,compositeStore:l}=(0,Uo.useContext)(NS),u={id:(0,d.useInstanceId)(e,s||"components-circular-option-picker__option"),className:"components-circular-option-picker__option",...a},f=l?(0,r.createElement)(OS,{...u,compositeStore:l,isSelected:n}):(0,r.createElement)(AS,{...u,isPressed:n});return(0,r.createElement)("div",{className:c()(t,"components-circular-option-picker__option-wrapper")},i?(0,r.createElement)(ri,{text:i},f):f,n&&(0,r.createElement)($E,{icon:DS,...o}))},FS.OptionGroup=function({className:e,options:t,...n}){const o="aria-label"in n||"aria-labelledby"in n?"group":void 0;return(0,r.createElement)("div",{...n,role:o,className:c()("components-circular-option-picker__option-group","components-circular-option-picker__swatches",e)},t)},FS.ButtonAction=function({className:e,children:t,...n}){return(0,r.createElement)(my,{className:c()("components-circular-option-picker__clear",e),variant:"tertiary",...n},t)},FS.DropdownLinkAction=function({buttonProps:e,className:t,dropdownProps:n,linkText:o}){return(0,r.createElement)(FE,{className:c()("components-circular-option-picker__dropdown-link-action",t),renderToggle:({isOpen:t,onToggle:n})=>(0,r.createElement)(my,{"aria-expanded":t,"aria-haspopup":"true",onClick:n,variant:"link",...e},o),...n})};const BS=FS;const jS=os((function(e,t){const n=function(e){const{expanded:t=!1,alignment:n="stretch",...r}=rs(e,"VStack");return ky({direction:"column",expanded:t,alignment:n,...r})}(e);return(0,r.createElement)(xs,{...n,ref:t})}),"VStack");const VS=os((function(e,t){const n=fg(e);return(0,r.createElement)(xs,{as:"span",...n,ref:t})}),"Truncate");const HS=os((function(e,t){const n=function(e){const{as:t,level:n=2,color:r=Ds.gray[900],isBlock:o=!0,weight:i=Xg.fontWeightHeading,...a}=rs(e,"Heading"),s=t||`h${n}`,l={};return"string"==typeof s&&"h"!==s[0]&&(l.role="heading",l["aria-level"]="string"==typeof n?parseInt(n):n),{...fv({color:r,isBlock:o,weight:i,size:uv(n),...a}),...l,as:s}}(e);return(0,r.createElement)(xs,{...n,ref:t})}),"Heading"),$S=HS;const WS=bs($S,{target:"ev9wop70"})({name:"13lxv2o",styles:"text-transform:uppercase;line-height:24px;font-weight:500;&&&{font-size:11px;margin-bottom:0;}"}),US=bs("div",{target:"eovvns30"})("margin-left:",Ah(-2),";margin-right:",Ah(-2),";&:first-of-type{margin-top:",Ah(-2),";}&:last-of-type{margin-bottom:",Ah(-2),";}",(({paddingSize:e="small"})=>{if("none"===e)return;const t={small:Ah(2),medium:Ah(4)};return Ps("padding:",t[e]||t.small,";","")}),";");const GS=os((function(e,t){const{paddingSize:n="small",...o}=rs(e,"DropdownContentWrapper");return(0,r.createElement)(US,{...o,paddingSize:n,ref:t})}),"DropdownContentWrapper");Vg([Hg,zE]);const qS=e=>e.length>0&&e.every((e=>{return t=e,Array.isArray(t.colors)&&!("color"in t);var t}));function YS({className:e,clearColor:t,colors:n,onChange:o,value:i,...a}){const s=(0,Uo.useMemo)((()=>n.map((({color:e,name:n},a)=>{const s=Bg(e),l=i===e;return(0,r.createElement)(BS.Option,{key:`${e}-${a}`,isSelected:l,selectedIconProps:l?{fill:s.contrast()>s.contrast("#000")?"#fff":"#000"}:{},tooltipText:n||(0,u.sprintf)((0,u.__)("Color code: %s"),e),style:{backgroundColor:e,color:e},onClick:l?t:()=>o(e,a),"aria-label":n?(0,u.sprintf)((0,u.__)("Color: %s"),n):(0,u.sprintf)((0,u.__)("Color code: %s"),e)})}))),[n,i,o,t]);return(0,r.createElement)(BS.OptionGroup,{className:e,options:s,...a})}function KS({className:e,clearColor:t,colors:n,onChange:o,value:i,headingLevel:a}){const s=(0,d.useInstanceId)(KS,"color-palette");return 0===n.length?null:(0,r.createElement)(jS,{spacing:3,className:e},n.map((({name:e,colors:n},l)=>{const c=`${s}-${l}`;return(0,r.createElement)(jS,{spacing:2,key:l},(0,r.createElement)(WS,{id:c,level:a},e),(0,r.createElement)(YS,{clearColor:t,colors:n,onChange:e=>o(e,l),value:i,"aria-labelledby":c}))})))}function XS({isRenderedInSidebar:e,popoverProps:t,...n}){const o=(0,Uo.useMemo)((()=>({shift:!0,resize:!1,...e?{placement:"left-start",offset:34}:{placement:"bottom",offset:8},...t})),[e,t]);return(0,r.createElement)(FE,{contentClassName:"components-color-palette__custom-color-dropdown-content",popoverProps:o,...n})}Vg([Hg,zE]);const ZS=(0,Uo.forwardRef)((function(e,t){const{asButtons:n,loop:o,clearable:i=!0,colors:a=[],disableCustomColors:s=!1,enableAlpha:l=!1,onChange:d,value:f,__experimentalIsRenderedInSidebar:m=!1,headingLevel:p=2,"aria-label":h,"aria-labelledby":g,...v}=e,[b,y]=(0,Uo.useState)(f),x=(0,Uo.useCallback)((()=>d(void 0)),[d]),w=(0,Uo.useCallback)((e=>{y(((e,t)=>{if(!/^var\(/.test(null!=e?e:"")||null===t)return e;const{ownerDocument:n}=t,{defaultView:r}=n,o=r?.getComputedStyle(t).backgroundColor;return o?Bg(o).toHex():e})(f,e))}),[f]),E=qS(a),_=(0,Uo.useMemo)((()=>((e,t=[],n=!1)=>{if(!e)return"";const r=/^var\(/.test(e),o=r?e:Bg(e).toHex(),i=n?t:[{colors:t}];for(const{colors:e}of i)for(const{name:t,color:n}of e)if(o===(r?n:Bg(n).toHex()))return t;return(0,u.__)("Custom")})(f,a,E)),[f,a,E]),S=f?.startsWith("#"),C=f?.replace(/^var\((.+)\)$/,"$1"),k=C?(0,u.sprintf)((0,u.__)('Custom color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),_,C):(0,u.__)("Custom color picker."),P={clearColor:x,onChange:d,value:f},T=!!i&&(0,r.createElement)(BS.ButtonAction,{onClick:x},(0,u.__)("Clear"));let I;if(n)I={asButtons:!0};else{const e={asButtons:!1,loop:o};I=h?{...e,"aria-label":h}:g?{...e,"aria-labelledby":g}:{...e,"aria-label":(0,u.__)("Custom color picker.")}}return(0,r.createElement)(jS,{spacing:3,ref:t,...v},!s&&(0,r.createElement)(XS,{isRenderedInSidebar:m,renderContent:()=>(0,r.createElement)(GS,{paddingSize:"none"},(0,r.createElement)(MS,{color:b,onChange:e=>d(e),enableAlpha:l})),renderToggle:({isOpen:e,onToggle:t})=>(0,r.createElement)(jS,{className:"components-color-palette__custom-color-wrapper",spacing:0},(0,r.createElement)("button",{ref:w,className:"components-color-palette__custom-color-button","aria-expanded":e,"aria-haspopup":"true",onClick:t,"aria-label":k,style:{background:f},type:"button"}),(0,r.createElement)(jS,{className:"components-color-palette__custom-color-text-wrapper",spacing:.5},(0,r.createElement)(VS,{className:"components-color-palette__custom-color-name"},f?_:(0,u.__)("No color selected")),(0,r.createElement)(VS,{className:c()("components-color-palette__custom-color-value",{"components-color-palette__custom-color-value--is-hex":S})},C)))}),(0,r.createElement)(BS,{...I,actions:T,options:E?(0,r.createElement)(KS,{...P,headingLevel:p,colors:a,value:f}):(0,r.createElement)(YS,{...P,colors:a,value:f})}))})),JS=ZS,QS=bs(Ry,{target:"e1bagdl32"})("&&&{input{display:block;width:100%;}",kv,"{transition:box-shadow 0.1s linear;}}"),eC=({selectSize:e})=>({small:Ps("box-sizing:border-box;padding:2px 1px;width:20px;color:",Ds.gray[800],";font-size:8px;line-height:1;letter-spacing:-0.5px;text-transform:uppercase;text-align-last:center;",""),default:Ps("box-sizing:border-box;min-width:24px;max-width:48px;height:24px;margin-inline-end:",Ah(2),";padding:",Ah(1),";color:",Ds.theme.accent,";font-size:13px;line-height:1;text-align-last:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;","")}[e]),tC=bs("div",{target:"e1bagdl31"})("&&&{pointer-events:none;",eC,";color:",Ds.gray[900],";}"),nC=bs("select",{target:"e1bagdl30"})("&&&{appearance:none;background:transparent;border-radius:2px;border:none;display:block;outline:none;margin:0;min-height:auto;font-family:inherit;",eC,";",(({selectSize:e="default"})=>({small:Ps("height:100%;border:1px solid transparent;transition:box-shadow 0.1s linear,border 0.1s linear;",Jh({borderTopLeftRadius:0,borderBottomLeftRadius:0})()," &:not(:disabled):hover{background-color:",Ds.gray[100],";}&:focus{border:1px solid ",Ds.ui.borderFocus,";box-shadow:inset 0 0 0 ",Xg.borderWidth+" "+Ds.ui.borderFocus,";outline-offset:0;outline:2px solid transparent;z-index:1;}",""),default:Ps("display:flex;justify-content:center;align-items:center;&:hover{color:",Ds.ui.borderFocus,";box-shadow:inset 0 0 0 ",Xg.borderWidth+" "+Ds.ui.borderFocus,";outline:",Xg.borderWidth," solid transparent;}&:focus{box-shadow:0 0 0 ",Xg.borderWidthFocus+" "+Ds.ui.borderFocus,";outline:",Xg.borderWidthFocus," solid transparent;}","")}[e])),";&:not( :disabled ){cursor:pointer;}}");const rC={name:"f3vz0n",styles:"font-weight:500"},oC=Ps("box-shadow:inset ",Xg.controlBoxShadowFocus,";",""),iC=Ps("border:0;padding:0;margin:0;",Kb,";",""),aC=Ps(QS,"{flex:0 0 auto;}",""),sC=Ps("background:#fff;&&>button{aspect-ratio:1;padding:0;display:flex;align-items:center;justify-content:center;",Jh({borderRadius:"2px 0 0 2px"},{borderRadius:"0 2px 2px 0"})()," border:",Xg.borderWidth," solid ",Ds.ui.border,";&:focus,&:hover:not( :disabled ){",oC," border-color:",Ds.ui.borderFocus,";z-index:1;position:relative;}}",""),lC=(e,t)=>{const{style:n}=e||{};return Ps("border-radius:9999px;border:2px solid transparent;",n?(e=>{const{color:t,style:n}=e||{},r=n&&"none"!==n?Ds.gray[300]:void 0;return Ps("border-style:","none"===n?"solid":n,";border-color:",t||r,";","")})(e):void 0," width:","__unstable-large"===t?"24px":"22px",";height:","__unstable-large"===t?"24px":"22px",";padding:","__unstable-large"===t?"2px":"1px",";&>span{height:",Ah(4),";width:",Ah(4),";background:linear-gradient(\n\t\t\t\t-45deg,\n\t\t\t\ttransparent 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 52%,\n\t\t\t\ttransparent 52%\n\t\t\t);}","")},cC=Ps("width:",228,"px;>div:first-of-type>",Qb,"{margin-bottom:0;",rC,";}&& ",Qb,"+button:not( .has-text ){min-width:24px;padding:0;}",""),uC=Ps("",""),dC=Ps("",""),fC=Ps("justify-content:center;width:100%;&&{border-top:",Xg.borderWidth," solid ",Ds.gray[400],";border-top-left-radius:0;border-top-right-radius:0;height:40px;}",""),mC="web"===Uo.Platform.OS,pC={px:{value:"px",label:mC?"px":(0,u.__)("Pixels (px)"),a11yLabel:(0,u.__)("Pixels (px)"),step:1},"%":{value:"%",label:mC?"%":(0,u.__)("Percentage (%)"),a11yLabel:(0,u.__)("Percent (%)"),step:.1},em:{value:"em",label:mC?"em":(0,u.__)("Relative to parent font size (em)"),a11yLabel:(0,u._x)("ems","Relative to parent font size (em)"),step:.01},rem:{value:"rem",label:mC?"rem":(0,u.__)("Relative to root font size (rem)"),a11yLabel:(0,u._x)("rems","Relative to root font size (rem)"),step:.01},vw:{value:"vw",label:mC?"vw":(0,u.__)("Viewport width (vw)"),a11yLabel:(0,u.__)("Viewport width (vw)"),step:.1},vh:{value:"vh",label:mC?"vh":(0,u.__)("Viewport height (vh)"),a11yLabel:(0,u.__)("Viewport height (vh)"),step:.1},vmin:{value:"vmin",label:mC?"vmin":(0,u.__)("Viewport smallest dimension (vmin)"),a11yLabel:(0,u.__)("Viewport smallest dimension (vmin)"),step:.1},vmax:{value:"vmax",label:mC?"vmax":(0,u.__)("Viewport largest dimension (vmax)"),a11yLabel:(0,u.__)("Viewport largest dimension (vmax)"),step:.1},ch:{value:"ch",label:mC?"ch":(0,u.__)("Width of the zero (0) character (ch)"),a11yLabel:(0,u.__)("Width of the zero (0) character (ch)"),step:.01},ex:{value:"ex",label:mC?"ex":(0,u.__)("x-height of the font (ex)"),a11yLabel:(0,u.__)("x-height of the font (ex)"),step:.01},cm:{value:"cm",label:mC?"cm":(0,u.__)("Centimeters (cm)"),a11yLabel:(0,u.__)("Centimeters (cm)"),step:.001},mm:{value:"mm",label:mC?"mm":(0,u.__)("Millimeters (mm)"),a11yLabel:(0,u.__)("Millimeters (mm)"),step:.1},in:{value:"in",label:mC?"in":(0,u.__)("Inches (in)"),a11yLabel:(0,u.__)("Inches (in)"),step:.001},pc:{value:"pc",label:mC?"pc":(0,u.__)("Picas (pc)"),a11yLabel:(0,u.__)("Picas (pc)"),step:1},pt:{value:"pt",label:mC?"pt":(0,u.__)("Points (pt)"),a11yLabel:(0,u.__)("Points (pt)"),step:1},svw:{value:"svw",label:mC?"svw":(0,u.__)("Small viewport width (svw)"),a11yLabel:(0,u.__)("Small viewport width (svw)"),step:.1},svh:{value:"svh",label:mC?"svh":(0,u.__)("Small viewport height (svh)"),a11yLabel:(0,u.__)("Small viewport height (svh)"),step:.1},svi:{value:"svi",label:mC?"svi":(0,u.__)("Viewport smallest size in the inline direction (svi)"),a11yLabel:(0,u.__)("Small viewport width or height (svi)"),step:.1},svb:{value:"svb",label:mC?"svb":(0,u.__)("Viewport smallest size in the block direction (svb)"),a11yLabel:(0,u.__)("Small viewport width or height (svb)"),step:.1},svmin:{value:"svmin",label:mC?"svmin":(0,u.__)("Small viewport smallest dimension (svmin)"),a11yLabel:(0,u.__)("Small viewport smallest dimension (svmin)"),step:.1},lvw:{value:"lvw",label:mC?"lvw":(0,u.__)("Large viewport width (lvw)"),a11yLabel:(0,u.__)("Large viewport width (lvw)"),step:.1},lvh:{value:"lvh",label:mC?"lvh":(0,u.__)("Large viewport height (lvh)"),a11yLabel:(0,u.__)("Large viewport height (lvh)"),step:.1},lvi:{value:"lvi",label:mC?"lvi":(0,u.__)("Large viewport width or height (lvi)"),a11yLabel:(0,u.__)("Large viewport width or height (lvi)"),step:.1},lvb:{value:"lvb",label:mC?"lvb":(0,u.__)("Large viewport width or height (lvb)"),a11yLabel:(0,u.__)("Large viewport width or height (lvb)"),step:.1},lvmin:{value:"lvmin",label:mC?"lvmin":(0,u.__)("Large viewport smallest dimension (lvmin)"),a11yLabel:(0,u.__)("Large viewport smallest dimension (lvmin)"),step:.1},dvw:{value:"dvw",label:mC?"dvw":(0,u.__)("Dynamic viewport width (dvw)"),a11yLabel:(0,u.__)("Dynamic viewport width (dvw)"),step:.1},dvh:{value:"dvh",label:mC?"dvh":(0,u.__)("Dynamic viewport height (dvh)"),a11yLabel:(0,u.__)("Dynamic viewport height (dvh)"),step:.1},dvi:{value:"dvi",label:mC?"dvi":(0,u.__)("Dynamic viewport width or height (dvi)"),a11yLabel:(0,u.__)("Dynamic viewport width or height (dvi)"),step:.1},dvb:{value:"dvb",label:mC?"dvb":(0,u.__)("Dynamic viewport width or height (dvb)"),a11yLabel:(0,u.__)("Dynamic viewport width or height (dvb)"),step:.1},dvmin:{value:"dvmin",label:mC?"dvmin":(0,u.__)("Dynamic viewport smallest dimension (dvmin)"),a11yLabel:(0,u.__)("Dynamic viewport smallest dimension (dvmin)"),step:.1},dvmax:{value:"dvmax",label:mC?"dvmax":(0,u.__)("Dynamic viewport largest dimension (dvmax)"),a11yLabel:(0,u.__)("Dynamic viewport largest dimension (dvmax)"),step:.1},svmax:{value:"svmax",label:mC?"svmax":(0,u.__)("Small viewport largest dimension (svmax)"),a11yLabel:(0,u.__)("Small viewport largest dimension (svmax)"),step:.1},lvmax:{value:"lvmax",label:mC?"lvmax":(0,u.__)("Large viewport largest dimension (lvmax)"),a11yLabel:(0,u.__)("Large viewport largest dimension (lvmax)"),step:.1}},hC=Object.values(pC),gC=[pC.px,pC["%"],pC.em,pC.rem,pC.vw,pC.vh],vC=pC.px;function bC(e,t,n){return xC(t?`${null!=e?e:""}${t}`:e,n)}function yC(e){return Array.isArray(e)&&!!e.length}function xC(e,t=hC){let n,r;if(void 0!==e||null===e){n=`${e}`.trim();const t=parseFloat(n);r=isFinite(t)?t:void 0}const o=n?.match(/[\d.\-\+]*\s*(.*)/),i=o?.[1]?.toLowerCase();let a;if(yC(t)){const e=t.find((e=>e.value===i));a=e?.value}else a=vC.value;return[r,a]}const wC=({units:e=hC,availableUnits:t=[],defaultValues:n})=>{const r=function(e=[],t){return Array.isArray(t)?t.filter((t=>e.includes(t.value))):[]}(t,e);return n&&r.forEach(((e,t)=>{if(n[e.value]){const[o]=xC(n[e.value]);r[t].default=o}})),r};const EC=e=>e.replace(/^var\((.+)\)$/,"$1"),_C=os(((e,t)=>{const{__experimentalIsRenderedInSidebar:n,border:o,colors:i,disableCustomColors:a,enableAlpha:s,enableStyle:l,indicatorClassName:c,indicatorWrapperClassName:d,isStyleSettable:f,onReset:m,onColorChange:p,onStyleChange:h,popoverContentClassName:g,popoverControlsClassName:v,resetButtonClassName:b,showDropdownHeader:y,size:x,__unstablePopoverProps:w,...E}=function(e){const{border:t,className:n,colors:r=[],enableAlpha:o=!1,enableStyle:i=!0,onChange:a,previousStyleSelection:s,size:l="default",__experimentalIsRenderedInSidebar:c=!1,...u}=rs(e,"BorderControlDropdown"),[d]=xC(t?.width),f=0===d,m=ns(),p=(0,Uo.useMemo)((()=>m(sC,n)),[n,m]),h=(0,Uo.useMemo)((()=>m(dC)),[m]),g=(0,Uo.useMemo)((()=>m(lC(t,l))),[t,m,l]),v=(0,Uo.useMemo)((()=>m(cC)),[m]),b=(0,Uo.useMemo)((()=>m(uC)),[m]),y=(0,Uo.useMemo)((()=>m(fC)),[m]);return{...u,border:t,className:p,colors:r,enableAlpha:o,enableStyle:i,indicatorClassName:h,indicatorWrapperClassName:g,onColorChange:e=>{a({color:e,style:"none"===t?.style?s:t?.style,width:f&&e?"1px":t?.width})},onStyleChange:e=>{const n=f&&e?"1px":t?.width;a({...t,style:e,width:n})},onReset:()=>{a({...t,color:void 0,style:void 0})},popoverContentClassName:b,popoverControlsClassName:v,resetButtonClassName:y,size:l,__experimentalIsRenderedInSidebar:c}}(e),{color:_,style:S}=o||{},C=((e,t)=>{if(e&&t){if(qS(t)){let n;return t.some((t=>t.colors.some((t=>t.color===e&&(n=t,!0))))),n}return t.find((t=>t.color===e))}})(_,i),k=((e,t,n,r)=>{if(r){if(t){const e=EC(t.color);return n?(0,u.sprintf)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s". The currently selected style is "%3$s".',t.name,e,n):(0,u.sprintf)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s".',t.name,e)}if(e){const t=EC(e);return n?(0,u.sprintf)('Border color and style picker. The currently selected color has a value of "%1$s". The currently selected style is "%2$s".',t,n):(0,u.sprintf)('Border color and style picker. The currently selected color has a value of "%1$s".',t)}return(0,u.__)("Border color and style picker.")}return t?(0,u.sprintf)('Border color picker. The currently selected color is called "%1$s" and has a value of "%2$s".',t.name,EC(t.color)):e?(0,u.sprintf)('Border color picker. The currently selected color has a value of "%1$s".',EC(e)):(0,u.__)("Border color picker.")})(_,C,S,l),P=_||S&&"none"!==S,T=n?"bottom left":void 0;return(0,r.createElement)(FE,{renderToggle:({onToggle:e})=>(0,r.createElement)(my,{onClick:e,variant:"tertiary","aria-label":k,tooltipPosition:T,label:(0,u.__)("Border color and style picker"),showTooltip:!0,__next40pxDefaultSize:"__unstable-large"===x},(0,r.createElement)("span",{className:d},(0,r.createElement)(DE,{className:c,colorValue:_}))),renderContent:({onClose:e})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(GS,{paddingSize:"medium"},(0,r.createElement)(jS,{className:v,spacing:6},y?(0,r.createElement)(Py,null,(0,r.createElement)(Qb,null,(0,u.__)("Border color")),(0,r.createElement)(my,{size:"small",label:(0,u.__)("Close border color"),icon:zw,onClick:e})):void 0,(0,r.createElement)(JS,{className:g,value:_,onChange:p,colors:i,disableCustomColors:a,__experimentalIsRenderedInSidebar:n,clearable:!1,enableAlpha:s}),l&&f&&(0,r.createElement)(NE,{label:(0,u.__)("Style"),value:S,onChange:h}))),P&&(0,r.createElement)(GS,{paddingSize:"none"},(0,r.createElement)(my,{className:b,variant:"tertiary",onClick:()=>{m(),e()}},(0,u.__)("Reset")))),popoverProps:{...w},...E,ref:t})}),"BorderControlDropdown"),SC=_C;const CC=(0,Uo.forwardRef)((function({className:e,isUnitSelectTabbable:t=!0,onChange:n,size:o="default",unit:i="px",units:a=gC,...s},l){if(!yC(a)||1===a?.length)return(0,r.createElement)(tC,{className:"components-unit-control__unit-label",selectSize:o},i);const u=c()("components-unit-control__select",e);return(0,r.createElement)(nC,{ref:l,className:u,onChange:e=>{const{value:t}=e.target,r=a.find((e=>e.value===t));n?.(t,{event:e,data:r})},selectSize:o,tabIndex:t?void 0:-1,value:i,...s},a.map((e=>(0,r.createElement)("option",{value:e.value,key:e.value},e.label))))}));const kC=(0,Uo.forwardRef)((function(e,t){const{__unstableStateReducer:n,autoComplete:o="off",children:i,className:a,disabled:s=!1,disableUnits:l=!1,isPressEnterToChange:d=!1,isResetValueOnUnitChange:f=!1,isUnitSelectTabbable:m=!0,label:p,onChange:h,onUnitChange:g,size:v="default",unit:b,units:y=gC,value:x,onFocus:w,...E}=Nv(e);"unit"in e&&qo()("UnitControl unit prop",{since:"5.6",hint:"The unit should be provided within the `value` prop.",version:"6.2"});const _=null!=x?x:void 0,[S,C]=(0,Uo.useMemo)((()=>{const e=function(e,t,n=hC){const r=Array.isArray(n)?[...n]:[],[,o]=bC(e,t,hC);return o&&!r.some((e=>e.value===o))&&pC[o]&&r.unshift(pC[o]),r}(_,b,y),[{value:t=""}={},...n]=e,r=n.reduce(((e,{value:t})=>{const n=Uy(t?.substring(0,1)||"");return e.includes(n)?e:`${e}|${n}`}),Uy(t.substring(0,1)));return[e,new RegExp(`^(?:${r})$`,"i")]}),[_,b,y]),[k,P]=bC(_,b,S),[T,I]=XE(1===S.length?S[0].value:b,{initial:P,fallback:""});(0,Uo.useEffect)((()=>{void 0!==P&&I(P)}),[P,I]);const R=c()("components-unit-control","components-unit-control-wrapper",a);let M;!l&&m&&S.length&&(M=e=>{E.onKeyDown?.(e),!e.metaKey&&C.test(e.key)&&N.current?.focus()});const N=(0,Uo.useRef)(null),D=l?null:(0,r.createElement)(CC,{ref:N,"aria-label":(0,u.__)("Select unit"),disabled:s,isUnitSelectTabbable:m,onChange:(e,t)=>{const{data:n}=t;let r=`${null!=k?k:""}${e}`;f&&void 0!==n?.default&&(r=`${n.default}${e}`),h?.(r,t),g?.(e,t),I(e)},size:["small","compact"].includes(v)||"default"===v&&!E.__next40pxDefaultSize?"small":"default",unit:T,units:S,onFocus:w,onBlur:e.onBlur});let A=E.step;if(!A&&S){var O;const e=S.find((e=>e.value===T));A=null!==(O=e?.step)&&void 0!==O?O:1}return(0,r.createElement)(QS,{...E,autoComplete:o,className:R,disabled:s,spinControls:"none",isPressEnterToChange:d,label:p,onKeyDown:M,onChange:(e,t)=>{if(""===e||null==e)return void h?.("",t);const n=function(e,t,n,r){const[o,i]=xC(e,t),a=null!=o?o:n;let s=i||r;return!s&&yC(t)&&(s=t[0].value),[a,s]}(e,S,k,T).join("");h?.(n,t)},ref:t,size:v,suffix:D,type:d?"text":"number",value:null!=k?k:"",step:A,onFocus:w,__unstableStateReducer:n})})),PC=kC,TC=e=>void 0!==e?.width&&""!==e.width||void 0!==e?.color;function IC(e){const{className:t,colors:n=[],isCompact:r,onChange:o,enableAlpha:i=!0,enableStyle:a=!0,shouldSanitizeBorder:s=!0,size:l="default",value:c,width:u,__experimentalIsRenderedInSidebar:d=!1,__next40pxDefaultSize:f,...m}=rs(e,"BorderControl"),p="default"===l&&f?"__unstable-large":l,[h,g]=xC(c?.width),v=g||"px",b=0===h,[y,x]=(0,Uo.useState)(),[w,E]=(0,Uo.useState)(),_=!s||TC(c),S=(0,Uo.useCallback)((e=>{!s||TC(e)?o(e):o(void 0)}),[o,s]),C=(0,Uo.useCallback)((e=>{const t=""===e?void 0:e,[n]=xC(e),r=0===n,o={...c,width:t};r&&!b&&(x(c?.color),E(c?.style),o.color=void 0,o.style="none"),!r&&b&&(void 0===o.color&&(o.color=y),"none"===o.style&&(o.style=w)),S(o)}),[c,b,y,w,S]),k=(0,Uo.useCallback)((e=>{C(`${e}${v}`)}),[C,v]),P=ns(),T=(0,Uo.useMemo)((()=>P(iC,t)),[t,P]);let I=u;r&&(I="__unstable-large"===l?"116px":"90px");const R=(0,Uo.useMemo)((()=>{const e=!!I&&aC,t=(e=>Ps("height:","__unstable-large"===e?"40px":"30px",";",""))(p);return P(Ps(QS,"{flex:1 1 40%;}&& ",nC,"{min-height:0;}",""),e,t)}),[I,P,p]),M=(0,Uo.useMemo)((()=>P(Ps("flex:1 1 60%;",Jh({marginRight:Ah(3)})(),";",""))),[P]);return{...m,className:T,colors:n,enableAlpha:i,enableStyle:a,innerWrapperClassName:R,inputWidth:I,isStyleSettable:_,onBorderChange:S,onSliderChange:k,onWidthChange:C,previousStyleSelection:w,sliderClassName:M,value:c,widthUnit:v,widthValue:h,size:p,__experimentalIsRenderedInSidebar:d,__next40pxDefaultSize:f}}const RC=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,r.createElement)(ws,{as:"legend"},t):(0,r.createElement)(Qb,{as:"legend"},t):null},MC=os(((e,t)=>{const{__next40pxDefaultSize:n=!1,colors:o,disableCustomColors:i,disableUnits:a,enableAlpha:s,enableStyle:l,hideLabelFromVision:c,innerWrapperClassName:d,inputWidth:f,isStyleSettable:m,label:p,onBorderChange:h,onSliderChange:g,onWidthChange:v,placeholder:b,__unstablePopoverProps:y,previousStyleSelection:x,showDropdownHeader:w,size:E,sliderClassName:_,value:S,widthUnit:C,widthValue:k,withSlider:P,__experimentalIsRenderedInSidebar:T,...I}=IC(e);return(0,r.createElement)(xs,{as:"fieldset",...I,ref:t},(0,r.createElement)(RC,{label:p,hideLabelFromVision:c}),(0,r.createElement)(Py,{spacing:4,className:d},(0,r.createElement)(PC,{prefix:(0,r.createElement)(SC,{border:S,colors:o,__unstablePopoverProps:y,disableCustomColors:i,enableAlpha:s,enableStyle:l,isStyleSettable:m,onChange:h,previousStyleSelection:x,showDropdownHeader:w,__experimentalIsRenderedInSidebar:T,size:E}),label:(0,u.__)("Border width"),hideLabelFromVision:!0,min:0,onChange:v,value:S?.width||"",placeholder:b,disableUnits:a,__unstableInputWidth:f,size:E}),P&&(0,r.createElement)(k_,{__nextHasNoMarginBottom:!0,label:(0,u.__)("Border width"),hideLabelFromVision:!0,className:_,initialPosition:0,max:100,min:0,onChange:g,step:["px","%"].includes(C)?1:.1,value:k||void 0,withInputField:!1,__next40pxDefaultSize:n})))}),"BorderControl"),NC=MC,DC={bottom:{alignItems:"flex-end",justifyContent:"center"},bottomLeft:{alignItems:"flex-start",justifyContent:"flex-end"},bottomRight:{alignItems:"flex-end",justifyContent:"flex-end"},center:{alignItems:"center",justifyContent:"center"},spaced:{alignItems:"center",justifyContent:"space-between"},left:{alignItems:"center",justifyContent:"flex-start"},right:{alignItems:"center",justifyContent:"flex-end"},stretch:{alignItems:"stretch"},top:{alignItems:"flex-start",justifyContent:"center"},topLeft:{alignItems:"flex-start",justifyContent:"flex-start"},topRight:{alignItems:"flex-start",justifyContent:"flex-end"}};function AC(e){const{align:t,alignment:n,className:r,columnGap:o,columns:i=2,gap:a=3,isInline:s=!1,justify:l,rowGap:c,rows:u,templateColumns:d,templateRows:f,...m}=rs(e,"Grid"),p=Nh(Array.isArray(i)?i:[i]),h=Nh(Array.isArray(u)?u:[u]),g=d||!!i&&`repeat( ${p}, 1fr )`,v=f||!!u&&`repeat( ${h}, 1fr )`,b=ns();return{...m,className:(0,Uo.useMemo)((()=>{const e=function(e){return e?DC[e]:{}}(n),i=Ps({alignItems:t,display:s?"inline-grid":"grid",gap:`calc( ${Xg.gridBase} * ${a} )`,gridTemplateColumns:g||void 0,gridTemplateRows:v||void 0,gridRowGap:c,gridColumnGap:o,justifyContent:l,verticalAlign:s?"middle":void 0,...e},"","");return b(i,r)}),[t,n,r,o,b,a,g,v,s,l,c])}}const OC=os((function(e,t){const n=AC(e);return(0,r.createElement)(xs,{...n,ref:t})}),"Grid");function zC(e){const{className:t,colors:n=[],enableAlpha:r=!1,enableStyle:o=!0,size:i="default",__experimentalIsRenderedInSidebar:a=!1,...s}=rs(e,"BorderBoxControlSplitControls"),l=ns(),c=(0,Uo.useMemo)((()=>l((e=>Ps("position:relative;flex:1;width:","__unstable-large"===e?void 0:"80%",";",""))(i),t)),[l,t,i]);return{...s,centeredClassName:(0,Uo.useMemo)((()=>l(Mw,t)),[l,t]),className:c,colors:n,enableAlpha:r,enableStyle:o,rightAlignedClassName:(0,Uo.useMemo)((()=>l(Ps(Jh({marginLeft:"auto"})(),";",""),t)),[l,t]),size:i,__experimentalIsRenderedInSidebar:a}}const LC=os(((e,t)=>{const{centeredClassName:n,colors:o,disableCustomColors:i,enableAlpha:a,enableStyle:s,onChange:l,popoverPlacement:c,popoverOffset:f,rightAlignedClassName:m,size:p="default",value:h,__experimentalIsRenderedInSidebar:g,...v}=zC(e),[b,y]=(0,Uo.useState)(null),x=(0,Uo.useMemo)((()=>c?{placement:c,offset:f,anchor:b,shift:!0}:void 0),[c,f,b]),w={colors:o,disableCustomColors:i,enableAlpha:a,enableStyle:s,isCompact:!0,__experimentalIsRenderedInSidebar:g,size:p},E=(0,d.useMergeRefs)([y,t]);return(0,r.createElement)(OC,{...v,ref:E,gap:4},(0,r.createElement)(Ow,{value:h,size:p}),(0,r.createElement)(NC,{className:n,hideLabelFromVision:!0,label:(0,u.__)("Top border"),onChange:e=>l(e,"top"),__unstablePopoverProps:x,value:h?.top,...w}),(0,r.createElement)(NC,{hideLabelFromVision:!0,label:(0,u.__)("Left border"),onChange:e=>l(e,"left"),__unstablePopoverProps:x,value:h?.left,...w}),(0,r.createElement)(NC,{className:m,hideLabelFromVision:!0,label:(0,u.__)("Right border"),onChange:e=>l(e,"right"),__unstablePopoverProps:x,value:h?.right,...w}),(0,r.createElement)(NC,{className:n,hideLabelFromVision:!0,label:(0,u.__)("Bottom border"),onChange:e=>l(e,"bottom"),__unstablePopoverProps:x,value:h?.bottom,...w}))}),"BorderBoxControlSplitControls"),FC=LC,BC=/^([\d.\-+]*)\s*(fr|cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%|cap|ic|rlh|vi|vb|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx|svw|lvw|dvw|svh|lvh|dvh|svi|lvi|dvi|svb|lvb|dvb|svmin|lvmin|dvmin|svmax|lvmax|dvmax)?$/;const jC=["top","right","bottom","left"],VC=["color","style","width"],HC=e=>!e||!VC.some((t=>void 0!==e[t])),$C=e=>{if(!e)return!1;if(WC(e)){return!jC.every((t=>HC(e[t])))}return!HC(e)},WC=(e={})=>Object.keys(e).some((e=>-1!==jC.indexOf(e))),UC=e=>{if(!WC(e))return!1;const t=jC.map((t=>GC(e?.[t])));return!t.every((e=>e===t[0]))},GC=(e,t)=>{if(HC(e))return t;const{color:n,style:r,width:o}=t||{},{color:i=n,style:a=r,width:s=o}=e;return[s,!!s&&"0"!==s||!!i?a||"solid":a,i].filter(Boolean).join(" ")},qC=e=>function(e){if(0===e.length)return;const t={};let n,r=0;return e.forEach((e=>{t[e]=void 0===t[e]?1:t[e]+1,t[e]>r&&(n=e,r=t[e])})),n}(e.map((e=>void 0===e?void 0:function(e){const t=e.trim().match(BC);if(!t)return[void 0,void 0];const[,n,r]=t;let o=parseFloat(n);return o=Number.isNaN(o)?void 0:o,[o,r]}(`${e}`)[1])).filter((e=>void 0!==e)));function YC(e){const{className:t,colors:n=[],onChange:r,enableAlpha:o=!1,enableStyle:i=!0,size:a="default",value:s,__experimentalIsRenderedInSidebar:l=!1,__next40pxDefaultSize:c,...u}=rs(e,"BorderBoxControl"),d="default"===a&&c?"__unstable-large":a,f=UC(s),m=WC(s),p=m?(e=>{if(!e)return;const t=[],n=[],r=[];jC.forEach((o=>{t.push(e[o]?.color),n.push(e[o]?.style),r.push(e[o]?.width)}));const o=t.every((e=>e===t[0])),i=n.every((e=>e===n[0])),a=r.every((e=>e===r[0]));return{color:o?t[0]:void 0,style:i?n[0]:void 0,width:a?r[0]:qC(r)}})(s):s,h=m?s:(e=>{if(e&&!HC(e))return{top:e,right:e,bottom:e,left:e}})(s),g=!isNaN(parseFloat(`${p?.width}`)),[v,b]=(0,Uo.useState)(!f),y=ns(),x=(0,Uo.useMemo)((()=>y(Tw,t)),[y,t]),w=(0,Uo.useMemo)((()=>y(Ps("flex:1;",Jh({marginRight:"24px"})(),";",""))),[y]),E=(0,Uo.useMemo)((()=>y(Iw)),[y]);return{...u,className:x,colors:n,disableUnits:f&&!g,enableAlpha:o,enableStyle:i,hasMixedBorders:f,isLinked:v,linkedControlClassName:w,onLinkedChange:e=>{if(!e)return r(void 0);if(!f||(t=e)&&VC.every((e=>void 0!==t[e])))return r(HC(e)?void 0:e);var t;const n=((e,t)=>{const n={};return e.color!==t.color&&(n.color=t.color),e.style!==t.style&&(n.style=t.style),e.width!==t.width&&(n.width=t.width),n})(p,e),o={top:{...s?.top,...n},right:{...s?.right,...n},bottom:{...s?.bottom,...n},left:{...s?.left,...n}};if(UC(o))return r(o);const i=HC(o.top)?void 0:o.top;r(i)},onSplitChange:(e,t)=>{const n={...h,[t]:e};UC(n)?r(n):r(e)},toggleLinked:()=>b(!v),linkedValue:p,size:d,splitValue:h,wrapperClassName:E,__experimentalIsRenderedInSidebar:l}}const KC=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,r.createElement)(ws,{as:"label"},t):(0,r.createElement)(Qb,null,t):null},XC=os(((e,t)=>{const{className:n,colors:o,disableCustomColors:i,disableUnits:a,enableAlpha:s,enableStyle:l,hasMixedBorders:c,hideLabelFromVision:f,isLinked:m,label:p,linkedControlClassName:h,linkedValue:g,onLinkedChange:v,onSplitChange:b,popoverPlacement:y,popoverOffset:x,size:w,splitValue:E,toggleLinked:_,wrapperClassName:S,__experimentalIsRenderedInSidebar:C,...k}=YC(e),[P,T]=(0,Uo.useState)(null),I=(0,Uo.useMemo)((()=>y?{placement:y,offset:x,anchor:P,shift:!0}:void 0),[y,x,P]),R=(0,d.useMergeRefs)([T,t]);return(0,r.createElement)(xs,{className:n,...k,ref:R},(0,r.createElement)(KC,{label:p,hideLabelFromVision:f}),(0,r.createElement)(xs,{className:S},m?(0,r.createElement)(NC,{className:h,colors:o,disableUnits:a,disableCustomColors:i,enableAlpha:s,enableStyle:l,onChange:v,placeholder:c?(0,u.__)("Mixed"):void 0,__unstablePopoverProps:I,shouldSanitizeBorder:!1,value:g,withSlider:!0,width:"__unstable-large"===w?"116px":"110px",__experimentalIsRenderedInSidebar:C,size:w}):(0,r.createElement)(FC,{colors:o,disableCustomColors:i,enableAlpha:s,enableStyle:l,onChange:b,popoverPlacement:y,popoverOffset:x,value:E,__experimentalIsRenderedInSidebar:C,size:w}),(0,r.createElement)(Dw,{onClick:_,isLinked:m,size:w})))}),"BorderBoxControl"),ZC=XC;const JC=bs("span",{target:"e1j5nr4z8"})({name:"1w884gc",styles:"box-sizing:border-box;display:block;width:24px;height:24px;position:relative;padding:4px"}),QC=bs("span",{target:"e1j5nr4z7"})({name:"i6vjox",styles:"box-sizing:border-box;display:block;position:relative;width:100%;height:100%"}),ek=bs("span",{target:"e1j5nr4z6"})("box-sizing:border-box;display:block;pointer-events:none;position:absolute;",(({isFocused:e})=>Ps({backgroundColor:"currentColor",opacity:e?1:.3},"","")),";"),tk=bs(ek,{target:"e1j5nr4z5"})({name:"1k2w39q",styles:"bottom:3px;top:3px;width:2px"}),nk=bs(ek,{target:"e1j5nr4z4"})({name:"1q9b07k",styles:"height:2px;left:3px;right:3px"}),rk=bs(nk,{target:"e1j5nr4z3"})({name:"abcix4",styles:"top:0"}),ok=bs(tk,{target:"e1j5nr4z2"})({name:"1wf8jf",styles:"right:0"}),ik=bs(nk,{target:"e1j5nr4z1"})({name:"8tapst",styles:"bottom:0"}),ak=bs(tk,{target:"e1j5nr4z0"})({name:"1ode3cm",styles:"left:0"});function sk({size:e=24,side:t="all",sides:n,...o}){const i=e=>!(e=>n?.length&&!n.includes(e))(e)&&("all"===t||t===e),a=i("top")||i("vertical"),s=i("right")||i("horizontal"),l=i("bottom")||i("vertical"),c=i("left")||i("horizontal"),u=e/24;return(0,r.createElement)(JC,{style:{transform:`scale(${u})`},...o},(0,r.createElement)(QC,null,(0,r.createElement)(rk,{isFocused:a}),(0,r.createElement)(ok,{isFocused:s}),(0,r.createElement)(ik,{isFocused:l}),(0,r.createElement)(ak,{isFocused:c})))}const lk=bs(PC,{target:"e1jovhle5"})({name:"1ejyr19",styles:"max-width:90px"}),ck=bs(Py,{target:"e1jovhle4"})({name:"1j1lmoi",styles:"grid-column:1/span 3"}),uk=bs(my,{target:"e1jovhle3"})({name:"tkya7b",styles:"grid-area:1/2;justify-self:end"}),dk=bs("div",{target:"e1jovhle2"})({name:"1dfa8al",styles:"grid-area:1/3;justify-self:end"}),fk=bs(sk,{target:"e1jovhle1"})({name:"ou8xsw",styles:"flex:0 0 auto"}),mk=bs(k_,{target:"e1jovhle0"})("width:100%;margin-inline-end:",Ah(2),";"),pk={px:{max:300,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:10,step:.1},rm:{max:10,step:.1},svw:{max:100,step:1},lvw:{max:100,step:1},dvw:{max:100,step:1},svh:{max:100,step:1},lvh:{max:100,step:1},dvh:{max:100,step:1},vi:{max:100,step:1},svi:{max:100,step:1},lvi:{max:100,step:1},dvi:{max:100,step:1},vb:{max:100,step:1},svb:{max:100,step:1},lvb:{max:100,step:1},dvb:{max:100,step:1},vmin:{max:100,step:1},svmin:{max:100,step:1},lvmin:{max:100,step:1},dvmin:{max:100,step:1},vmax:{max:100,step:1},svmax:{max:100,step:1},lvmax:{max:100,step:1},dvmax:{max:100,step:1}},hk={all:(0,u.__)("All sides"),top:(0,u.__)("Top side"),bottom:(0,u.__)("Bottom side"),left:(0,u.__)("Left side"),right:(0,u.__)("Right side"),mixed:(0,u.__)("Mixed"),vertical:(0,u.__)("Top and bottom sides"),horizontal:(0,u.__)("Left and right sides")},gk={top:void 0,right:void 0,bottom:void 0,left:void 0},vk=["top","right","bottom","left"];function bk(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function yk(e={},t,n=vk){const r=function(e){const t=[];if(!e?.length)return vk;if(e.includes("vertical"))t.push("top","bottom");else if(e.includes("horizontal"))t.push("left","right");else{const n=vk.filter((t=>e.includes(t)));t.push(...n)}return t}(n).map((t=>xC(e[t]))),o=r.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),i=r.map((e=>e[1])),a=o.every((e=>e===o[0]))?o[0]:"";let s;var l;"number"==typeof a?s=bk(i):s=null!==(l=function(e){if(!e||"object"!=typeof e)return;const t=Object.values(e).filter(Boolean);return bk(t)}(t))&&void 0!==l?l:bk(i);return[a,s].join("")}function xk(e={},t,n=vk){const r=yk(e,t,n);return isNaN(parseFloat(r))}function wk(e){return void 0!==e&&Object.values(e).filter((e=>!!e&&/\d/.test(e))).length>0}function Ek(e,t){let n="all";return e||(n=t?"vertical":"top"),n}function _k(e,t,n){const r={...e};return n?.length?n.forEach((e=>{"vertical"===e?(r.top=t,r.bottom=t):"horizontal"===e?(r.left=t,r.right=t):r[e]=t})):vk.forEach((e=>r[e]=t)),r}const Sk=()=>{};function Ck({__next40pxDefaultSize:e,onChange:t=Sk,onFocus:n=Sk,values:o,sides:i,selectedUnits:a,setSelectedUnits:s,...l}){var c,u;const f=(0,d.useInstanceId)(Ck,"box-control-input-all"),m=yk(o,a,i),p=wk(o)&&xk(o,a,i),h=p?hk.mixed:void 0,[g,v]=xC(m),b=e=>{const n=void 0!==e&&!isNaN(parseFloat(e)),r=_k(o,n?e:void 0,i);t(r)};return(0,r.createElement)(Py,null,(0,r.createElement)(lk,{...l,__next40pxDefaultSize:e,className:"component-box-control__unit-control",disableUnits:p,id:f,isPressEnterToChange:!0,value:m,onChange:b,onUnitChange:e=>{const t=_k(a,e,i);s(t)},onFocus:e=>{n(e,{side:"all"})},placeholder:h,label:hk.all,hideLabelFromVision:!0}),(0,r.createElement)(mk,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e,"aria-controls":f,label:hk.all,hideLabelFromVision:!0,onChange:e=>{b(void 0!==e?[e,v].join(""):void 0)},min:0,max:null!==(c=pk[null!=v?v:"px"]?.max)&&void 0!==c?c:10,step:null!==(u=pk[null!=v?v:"px"]?.step)&&void 0!==u?u:.1,value:null!=g?g:0,withInputField:!1}))}const kk=()=>{};function Pk({__next40pxDefaultSize:e,onChange:t=kk,onFocus:n=kk,values:o,selectedUnits:i,setSelectedUnits:a,sides:s,...l}){const c=(0,d.useInstanceId)(Pk,"box-control-input"),u=e=>t=>{n(t,{side:e})},f=(e,n,r)=>{const i={...o},a=void 0!==n&&!isNaN(parseFloat(n))?n:void 0;if(i[e]=a,r?.event.altKey)switch(e){case"top":i.bottom=a;break;case"bottom":i.top=a;break;case"left":i.right=a;break;case"right":i.left=a}(e=>{t(e)})(i)},m=e=>t=>{const n={...i};n[e]=t,a(n)},p=s?.length?vk.filter((e=>s.includes(e))):vk;return(0,r.createElement)(r.Fragment,null,p.map((t=>{var n,a;const[d,p]=xC(o[t]),h=o[t]?p:i[t],g=[c,t].join("-");return(0,r.createElement)(ck,{key:`box-control-${t}`,expanded:!0},(0,r.createElement)(fk,{side:t,sides:s}),(0,r.createElement)(ri,{placement:"top-end",text:hk[t]},(0,r.createElement)(lk,{...l,__next40pxDefaultSize:e,className:"component-box-control__unit-control",id:g,isPressEnterToChange:!0,value:[d,h].join(""),onChange:(e,n)=>f(t,e,n),onUnitChange:m(t),onFocus:u(t),label:hk[t],hideLabelFromVision:!0})),(0,r.createElement)(mk,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e,"aria-controls":g,label:hk[t],hideLabelFromVision:!0,onChange:e=>{f(t,void 0!==e?[e,h].join(""):void 0)},min:0,max:null!==(n=pk[null!=h?h:"px"]?.max)&&void 0!==n?n:10,step:null!==(a=pk[null!=h?h:"px"]?.step)&&void 0!==a?a:.1,value:null!=d?d:0,withInputField:!1}))})))}const Tk=["vertical","horizontal"];function Ik({__next40pxDefaultSize:e,onChange:t,onFocus:n,values:o,selectedUnits:i,setSelectedUnits:a,sides:s,...l}){const c=(0,d.useInstanceId)(Ik,"box-control-input"),u=e=>t=>{n&&n(t,{side:e})},f=(e,n)=>{if(!t)return;const r={...o},i=void 0!==n&&!isNaN(parseFloat(n))?n:void 0;"vertical"===e&&(r.top=i,r.bottom=i),"horizontal"===e&&(r.left=i,r.right=i),t(r)},m=e=>t=>{const n={...i};"vertical"===e&&(n.top=t,n.bottom=t),"horizontal"===e&&(n.left=t,n.right=t),a(n)},p=s?.length?Tk.filter((e=>s.includes(e))):Tk;return(0,r.createElement)(r.Fragment,null,p.map((t=>{var n,a;const[d,p]=xC("vertical"===t?o.top:o.left),h="vertical"===t?i.top:i.left,g=[c,t].join("-");return(0,r.createElement)(ck,{key:t},(0,r.createElement)(fk,{side:t,sides:s}),(0,r.createElement)(ri,{placement:"top-end",text:hk[t]},(0,r.createElement)(lk,{...l,__next40pxDefaultSize:e,className:"component-box-control__unit-control",id:g,isPressEnterToChange:!0,value:[d,null!=h?h:p].join(""),onChange:e=>f(t,e),onUnitChange:m(t),onFocus:u(t),label:hk[t],hideLabelFromVision:!0,key:t})),(0,r.createElement)(mk,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e,"aria-controls":g,label:hk[t],hideLabelFromVision:!0,onChange:e=>f(t,void 0!==e?[e,null!=h?h:p].join(""):void 0),min:0,max:null!==(n=pk[null!=h?h:"px"]?.max)&&void 0!==n?n:10,step:null!==(a=pk[null!=h?h:"px"]?.step)&&void 0!==a?a:.1,value:null!=d?d:0,withInputField:!1}))})))}function Rk({isLinked:e,...t}){const n=e?(0,u.__)("Unlink sides"):(0,u.__)("Link sides");return(0,r.createElement)(ri,{text:n},(0,r.createElement)(my,{...t,className:"component-box-control__linked-button",size:"small",icon:e?kw:Pw,iconSize:24,"aria-label":n}))}const Mk={min:0},Nk=()=>{};function Dk({__next40pxDefaultSize:e=!1,id:t,inputProps:n=Mk,onChange:o=Nk,label:i=(0,u.__)("Box Control"),values:a,units:s,sides:l,splitOnAxis:c=!1,allowReset:f=!0,resetValues:m=gk,onMouseOver:p,onMouseOut:h}){const[g,v]=XE(a,{fallback:gk}),b=g||gk,y=wk(a),x=1===l?.length,[w,E]=(0,Uo.useState)(y),[_,S]=(0,Uo.useState)(!y||!xk(b)||x),[C,k]=(0,Uo.useState)(Ek(_,c)),[P,T]=(0,Uo.useState)({top:xC(a?.top)[1],right:xC(a?.right)[1],bottom:xC(a?.bottom)[1],left:xC(a?.left)[1]}),I=function(e){const t=(0,d.useInstanceId)(Dk,"inspector-box-control");return e||t}(t),R=`${I}-heading`,M={...n,onChange:e=>{o(e),v(e),E(!0)},onFocus:(e,{side:t})=>{k(t)},isLinked:_,units:s,selectedUnits:P,setSelectedUnits:T,sides:l,values:b,onMouseOver:p,onMouseOut:h,__next40pxDefaultSize:e};return(0,r.createElement)(OC,{id:I,columns:3,templateColumns:"1fr min-content min-content",role:"group","aria-labelledby":R},(0,r.createElement)(oy.VisualLabel,{id:R},i),_&&(0,r.createElement)(ck,null,(0,r.createElement)(fk,{side:C,sides:l}),(0,r.createElement)(Ck,{...M})),!x&&(0,r.createElement)(dk,null,(0,r.createElement)(Rk,{onClick:()=>{S(!_),k(Ek(!_,c))},isLinked:_})),!_&&c&&(0,r.createElement)(Ik,{...M}),!_&&!c&&(0,r.createElement)(Pk,{...M}),f&&(0,r.createElement)(uk,{className:"component-box-control__reset-button",variant:"secondary",size:"small",onClick:()=>{o(m),v(m),T(m),E(!1)},disabled:!w},(0,u.__)("Reset")))}const Ak=Dk;const Ok=(0,Uo.forwardRef)((function(e,t){const{className:n,...o}=e,i=c()("components-button-group",n);return(0,r.createElement)("div",{ref:t,role:"group",className:i,...o})}));const zk={name:"12ip69d",styles:"background:transparent;display:block;margin:0!important;pointer-events:none;position:absolute;will-change:box-shadow"};function Lk(e){return`0 ${e}px ${2*e}px 0\n\t${`rgba(0, 0, 0, ${e/20})`}`}const Fk=os((function(e,t){const n=function(e){const{active:t,borderRadius:n="inherit",className:r,focus:o,hover:i,isInteractive:a=!1,offset:s=0,value:l=0,...c}=rs(e,"Elevation"),u=ns();return{...c,className:(0,Uo.useMemo)((()=>{let e=ag(i)?i:2*l,c=ag(t)?t:l/2;a||(e=ag(i)?i:void 0,c=ag(t)?t:void 0);const d=`box-shadow ${Xg.transitionDuration} ${Xg.transitionTimingFunction}`,f={};return f.Base=Ps({borderRadius:n,bottom:s,boxShadow:Lk(l),opacity:Xg.elevationIntensity,left:s,right:s,top:s,transition:d},As("transition"),"",""),ag(e)&&(f.hover=Ps("*:hover>&{box-shadow:",Lk(e),";}","")),ag(c)&&(f.active=Ps("*:active>&{box-shadow:",Lk(c),";}","")),ag(o)&&(f.focus=Ps("*:focus>&{box-shadow:",Lk(o),";}","")),u(zk,f.Base,f.hover,f.focus,f.active,r)}),[t,n,r,u,o,i,a,s,l]),"aria-hidden":!0}}(e);return(0,r.createElement)(xs,{...n,ref:t})}),"Elevation"),Bk=Fk;const jk=`calc(${Xg.cardBorderRadius} - 1px)`,Vk=Ps("box-shadow:0 0 0 1px ",Xg.surfaceBorderColor,";outline:none;",""),Hk={name:"1showjb",styles:"border-bottom:1px solid;box-sizing:border-box;&:last-child{border-bottom:none;}"},$k={name:"14n5oej",styles:"border-top:1px solid;box-sizing:border-box;&:first-of-type{border-top:none;}"},Wk={name:"13udsys",styles:"height:100%"},Uk={name:"6ywzd",styles:"box-sizing:border-box;height:auto;max-height:100%"},Gk={name:"dq805e",styles:"box-sizing:border-box;overflow:hidden;&>img,&>iframe{display:block;height:auto;max-width:100%;width:100%;}"},qk={name:"c990dr",styles:"box-sizing:border-box;display:block;width:100%"},Yk=Ps("&:first-of-type{border-top-left-radius:",jk,";border-top-right-radius:",jk,";}&:last-of-type{border-bottom-left-radius:",jk,";border-bottom-right-radius:",jk,";}",""),Kk=Ps("border-color:",Xg.colorDivider,";",""),Xk={name:"1t90u8d",styles:"box-shadow:none"},Zk={name:"1e1ncky",styles:"border:none"},Jk=Ps("border-radius:",jk,";",""),Qk=Ps("padding:",Xg.cardPaddingXSmall,";",""),eP={large:Ps("padding:",Xg.cardPaddingLarge,";",""),medium:Ps("padding:",Xg.cardPaddingMedium,";",""),small:Ps("padding:",Xg.cardPaddingSmall,";",""),xSmall:Qk,extraSmall:Qk},tP=Ps("background-color:",Ds.ui.backgroundDisabled,";",""),nP=Ps("background-color:",Xg.surfaceColor,";color:",Ds.gray[900],";position:relative;","");Xg.surfaceBackgroundColor;function rP({borderBottom:e,borderLeft:t,borderRight:n,borderTop:r}){const o=`1px solid ${Xg.surfaceBorderColor}`;return Ps({borderBottom:e?o:void 0,borderLeft:t?o:void 0,borderRight:n?o:void 0,borderTop:r?o:void 0},"","")}const oP=Ps("",""),iP=Ps("background:",Xg.surfaceBackgroundTintColor,";",""),aP=Ps("background:",Xg.surfaceBackgroundTertiaryColor,";",""),sP=e=>[e,e].join(" "),lP=e=>["90deg",[Xg.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),cP=e=>[[Xg.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),uP=(e,t)=>Ps("background:",(e=>[`linear-gradient( ${lP(e)} ) center`,`linear-gradient( ${cP(e)} ) center`,Xg.surfaceBorderBoldColor].join(","))(t),";background-size:",sP(e),";",""),dP=[`linear-gradient( ${[`${Xg.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`,`linear-gradient( ${["90deg",`${Xg.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`].join(","),fP=(e,t,n)=>{switch(e){case"dotted":return uP(t,n);case"grid":return(e=>Ps("background:",Xg.surfaceBackgroundColor,";background-image:",dP,";background-size:",sP(e),";",""))(t);case"primary":return oP;case"secondary":return iP;case"tertiary":return aP}};function mP(e){const{backgroundSize:t=12,borderBottom:n=!1,borderLeft:r=!1,borderRight:o=!1,borderTop:i=!1,className:a,variant:s="primary",...l}=rs(e,"Surface"),c=ns();return{...l,className:(0,Uo.useMemo)((()=>{const e={borders:rP({borderBottom:n,borderLeft:r,borderRight:o,borderTop:i})};return c(nP,e.borders,fP(s,`${t}px`,t-1+"px"),a)}),[t,n,r,o,i,a,c,s])}}function pP(e){const{className:t,elevation:n=0,isBorderless:r=!1,isRounded:o=!0,size:i="medium",...a}=rs(function({elevation:e,isElevated:t,...n}){const r={...n};let o=e;var i;return t&&(qo()("Card isElevated prop",{since:"5.9",alternative:"elevation"}),null!==(i=o)&&void 0!==i||(o=2)),void 0!==o&&(r.elevation=o),r}(e),"Card"),s=ns();return{...mP({...a,className:(0,Uo.useMemo)((()=>s(Vk,r&&Xk,o&&Jk,t)),[t,s,r,o])}),elevation:n,isBorderless:r,isRounded:o,size:i}}const hP=os((function(e,t){const{children:n,elevation:o,isBorderless:i,isRounded:a,size:s,...l}=pP(e),c=a?Xg.cardBorderRadius:0,u=ns(),d=(0,Uo.useMemo)((()=>u(Ps({borderRadius:c},"",""))),[u,c]),f=(0,Uo.useMemo)((()=>{const e={size:s,isBorderless:i};return{CardBody:e,CardHeader:e,CardFooter:e}}),[i,s]);return(0,r.createElement)(mi,{value:f},(0,r.createElement)(xs,{...l,ref:t},(0,r.createElement)(xs,{className:u(Wk)},n),(0,r.createElement)(Bk,{className:d,isInteractive:!1,value:o?1:0}),(0,r.createElement)(Bk,{className:d,isInteractive:!1,value:o})))}),"Card"),gP=hP;const vP=Ps("@media only screen and ( min-device-width: 40em ){&::-webkit-scrollbar{height:12px;width:12px;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-track{background:",Xg.colorScrollbarTrack,";border-radius:8px;}&::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:",Xg.colorScrollbarThumb,";border:2px solid rgba( 0, 0, 0, 0 );border-radius:7px;}&:hover::-webkit-scrollbar-thumb{background-color:",Xg.colorScrollbarThumbHover,";}}",""),bP={name:"13udsys",styles:"height:100%"},yP={name:"7zq9w",styles:"scroll-behavior:smooth"},xP={name:"q33xhg",styles:"overflow-x:auto;overflow-y:hidden"},wP={name:"103x71s",styles:"overflow-x:hidden;overflow-y:auto"},EP={name:"umwchj",styles:"overflow-y:auto"};const _P=os((function(e,t){const n=function(e){const{className:t,scrollDirection:n="y",smoothScroll:r=!1,...o}=rs(e,"Scrollable"),i=ns();return{...o,className:(0,Uo.useMemo)((()=>i(bP,vP,r&&yP,"x"===n&&xP,"y"===n&&wP,"auto"===n&&EP,t)),[t,i,n,r])}}(e);return(0,r.createElement)(xs,{...n,ref:t})}),"Scrollable"),SP=_P;const CP=os((function(e,t){const{isScrollable:n,...o}=function(e){const{className:t,isScrollable:n=!1,isShady:r=!1,size:o="medium",...i}=rs(e,"CardBody"),a=ns();return{...i,className:(0,Uo.useMemo)((()=>a(Uk,Yk,eP[o],r&&tP,"components-card__body",t)),[t,a,r,o]),isScrollable:n}}(e);return n?(0,r.createElement)(SP,{...o,ref:t}):(0,r.createElement)(xs,{...o,ref:t})}),"CardBody"),kP=CP;var PP=Ve((e=>{var t=e,{orientation:n="horizontal"}=t,r=E(t,["orientation"]);return r=x({role:"separator","aria-orientation":n},r)})),TP=Fe((e=>je("hr",PP(e))));const IP={vertical:{start:"marginLeft",end:"marginRight"},horizontal:{start:"marginTop",end:"marginBottom"}};var RP={name:"1u4hpl4",styles:"display:inline"};const MP=bs("hr",{target:"e19on6iw0"})("border:0;margin:0;",(({"aria-orientation":e="horizontal"})=>"vertical"===e?RP:void 0)," ",(({"aria-orientation":e="horizontal"})=>Ps({["vertical"===e?"borderRight":"borderBottom"]:"1px solid currentColor"},"",""))," ",(({"aria-orientation":e="horizontal"})=>Ps({height:"vertical"===e?"auto":0,width:"vertical"===e?0:"auto"},"",""))," ",(({"aria-orientation":e="horizontal",margin:t,marginStart:n,marginEnd:r})=>Ps(Jh({[IP[e].start]:Ah(null!=n?n:t),[IP[e].end]:Ah(null!=r?r:t)})(),"","")),";");const NP=os((function(e,t){const n=rs(e,"Divider");return(0,r.createElement)(TP,{render:(0,r.createElement)(MP,null),...n,ref:t})}),"Divider");const DP=os((function(e,t){const n=function(e){const{className:t,...n}=rs(e,"CardDivider"),r=ns();return{...n,className:(0,Uo.useMemo)((()=>r(qk,Kk,"components-card__divider",t)),[t,r])}}(e);return(0,r.createElement)(NP,{...n,ref:t})}),"CardDivider"),AP=DP;const OP=os((function(e,t){const n=function(e){const{className:t,justify:n,isBorderless:r=!1,isShady:o=!1,size:i="medium",...a}=rs(e,"CardFooter"),s=ns();return{...a,className:(0,Uo.useMemo)((()=>s($k,Yk,Kk,eP[i],r&&Zk,o&&tP,"components-card__footer",t)),[t,s,r,o,i]),justify:n}}(e);return(0,r.createElement)($h,{...n,ref:t})}),"CardFooter"),zP=OP;const LP=os((function(e,t){const n=function(e){const{className:t,isBorderless:n=!1,isShady:r=!1,size:o="medium",...i}=rs(e,"CardHeader"),a=ns();return{...i,className:(0,Uo.useMemo)((()=>a(Hk,Yk,Kk,eP[o],n&&Zk,r&&tP,"components-card__header",t)),[t,a,n,r,o])}}(e);return(0,r.createElement)($h,{...n,ref:t})}),"CardHeader"),FP=LP;const BP=os((function(e,t){const n=function(e){const{className:t,...n}=rs(e,"CardMedia"),r=ns();return{...n,className:(0,Uo.useMemo)((()=>r(Gk,Yk,"components-card__media",t)),[t,r])}}(e);return(0,r.createElement)(xs,{...n,ref:t})}),"CardMedia"),jP=BP;const VP=function e(t){const{__nextHasNoMarginBottom:n,label:o,className:i,heading:a,checked:s,indeterminate:l,help:u,id:f,onChange:m,...p}=t;a&&qo()("`heading` prop in `CheckboxControl`",{alternative:"a separate element to implement a heading",since:"5.8"});const[h,g]=(0,Uo.useState)(!1),[v,b]=(0,Uo.useState)(!1),y=(0,d.useRefEffect)((e=>{e&&(e.indeterminate=!!l,g(e.matches(":checked")),b(e.matches(":indeterminate")))}),[s,l]),x=(0,d.useInstanceId)(e,"inspector-checkbox-control",f);return(0,r.createElement)(iy,{__nextHasNoMarginBottom:n,label:a,id:x,help:u,className:c()("components-checkbox-control",i)},(0,r.createElement)("span",{className:"components-checkbox-control__input-container"},(0,r.createElement)("input",{ref:y,id:x,className:"components-checkbox-control__input",type:"checkbox",value:"1",onChange:e=>m(e.target.checked),checked:s,"aria-describedby":u?x+"__help":void 0,...p}),v?(0,r.createElement)($E,{icon:rg,className:"components-checkbox-control__indeterminate",role:"presentation"}):null,h?(0,r.createElement)($E,{icon:DS,className:"components-checkbox-control__checked",role:"presentation"}):null),o&&(0,r.createElement)("label",{className:"components-checkbox-control__label",htmlFor:x},o))},HP=4e3;function $P({className:e,children:t,onCopy:n,onFinishCopy:o,text:i,...a}){qo()("wp.components.ClipboardButton",{since:"5.8",alternative:"wp.compose.useCopyToClipboard"});const s=(0,Uo.useRef)(),l=(0,d.useCopyToClipboard)(i,(()=>{n(),s.current&&clearTimeout(s.current),o&&(s.current=setTimeout((()=>o()),HP))}));(0,Uo.useEffect)((()=>{s.current&&clearTimeout(s.current)}),[]);const u=c()("components-clipboard-button",e);return(0,r.createElement)(my,{...a,className:u,ref:l,onCopy:e=>{e.target.focus()}},t)}const WP=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));const UP=e=>Ps("font-size:",Yb("default.fontSize"),";font-family:inherit;appearance:none;border:1px solid transparent;cursor:pointer;background:none;text-align:start;text-decoration:","a"===e?"none":void 0,";svg,path{fill:currentColor;}&:hover{color:",Ds.theme.accent,";}&:focus{box-shadow:none;outline:none;}&:focus-visible{box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ",Ds.theme.accent,";outline:2px solid transparent;outline-offset:0;}",""),GP={name:"1bcj5ek",styles:"width:100%;display:block"},qP={name:"150ruhm",styles:"box-sizing:border-box;width:100%;display:block;margin:0;color:inherit"},YP=Ps("border:1px solid ",Xg.surfaceBorderColor,";",""),KP=Ps(">*:not( marquee )>*{border-bottom:1px solid ",Xg.surfaceBorderColor,";}>*:last-of-type>*:not( :focus ){border-bottom-color:transparent;}",""),XP=Xg.controlBorderRadius,ZP=Ps("border-radius:",XP,";",""),JP=Ps("border-radius:",XP,";>*:first-of-type>*{border-top-left-radius:",XP,";border-top-right-radius:",XP,";}>*:last-of-type>*{border-bottom-left-radius:",XP,";border-bottom-right-radius:",XP,";}",""),QP=`calc(${Xg.fontSize} * ${Xg.fontLineHeightBase})`,eT=`calc((${Xg.controlHeight} - ${QP} - 2px) / 2)`,tT=`calc((${Xg.controlHeightSmall} - ${QP} - 2px) / 2)`,nT=`calc((${Xg.controlHeightLarge} - ${QP} - 2px) / 2)`,rT={small:Ps("padding:",tT," ",Xg.controlPaddingXSmall,";",""),medium:Ps("padding:",eT," ",Xg.controlPaddingX,";",""),large:Ps("padding:",nT," ",Xg.controlPaddingXLarge,";","")};const oT=(0,Uo.createContext)({size:"medium"}),iT=()=>(0,Uo.useContext)(oT);const aT=os((function(e,t){const{isBordered:n,isSeparated:o,size:i,...a}=function(e){const{className:t,isBordered:n=!1,isRounded:r=!0,isSeparated:o=!1,role:i="list",...a}=rs(e,"ItemGroup");return{isBordered:n,className:ns()(n&&YP,o&&KP,r&&JP,t),role:i,isSeparated:o,...a}}(e),{size:s}=iT(),l={spacedAround:!n&&!o,size:i||s};return(0,r.createElement)(oT.Provider,{value:l},(0,r.createElement)(xs,{...a,ref:t}))}),"ItemGroup"),sT=10,lT=0,cT=sT;function uT(e){return Math.max(0,Math.min(100,e))}function dT(e,t,n){const r=e.slice();return r[t]=n,r}function fT(e,t,n){if(function(e,t,n,r=lT){const o=e[t].position,i=Math.min(o,n),a=Math.max(o,n);return e.some((({position:e},o)=>o!==t&&(Math.abs(e-n)<r||i<e&&e<a)))}(e,t,n))return e;return dT(e,t,{...e[t],position:n})}function mT(e,t,n){return dT(e,t,{...e[t],color:n})}function pT(e,t){if(!t)return;const{x:n,width:r}=t.getBoundingClientRect(),o=e-n;return Math.round(uT(100*o/r))}function hT({isOpen:e,position:t,color:n,...o}){const i=`components-custom-gradient-picker__control-point-button-description-${(0,d.useInstanceId)(hT)}`;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(my,{"aria-label":(0,u.sprintf)((0,u.__)("Gradient control point at position %1$s%% with color code %2$s."),t,n),"aria-describedby":i,"aria-haspopup":"true","aria-expanded":e,className:c()("components-custom-gradient-picker__control-point-button",{"is-active":e}),...o}),(0,r.createElement)(ws,{id:i},(0,u.__)("Use your left or right arrow keys or drag and drop with the mouse to change the gradient position. Press the button to change the color or remove the control point.")))}function gT({isRenderedInSidebar:e,className:t,...n}){const o=(0,Uo.useMemo)((()=>({placement:"bottom",offset:8,resize:!1})),[]),i=c()("components-custom-gradient-picker__control-point-dropdown",t);return(0,r.createElement)(XS,{isRenderedInSidebar:e,popoverProps:o,className:i,...n})}function vT({disableRemove:e,disableAlpha:t,gradientPickerDomRef:n,ignoreMarkerPosition:o,value:i,onChange:a,onStartControlPointChange:s,onStopControlPointChange:l,__experimentalIsRenderedInSidebar:c}){const d=(0,Uo.useRef)(),f=e=>{if(void 0===d.current||null===n.current)return;const t=pT(e.clientX,n.current),{initialPosition:r,index:o,significantMoveHappened:s}=d.current;!s&&Math.abs(r-t)>=5&&(d.current.significantMoveHappened=!0),a(fT(i,o,t))},m=()=>{window&&window.removeEventListener&&d.current&&d.current.listenersActivated&&(window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",m),l(),d.current.listenersActivated=!1)},p=(0,Uo.useRef)();return p.current=m,(0,Uo.useEffect)((()=>()=>{p.current?.()}),[]),(0,r.createElement)(r.Fragment,null,i.map(((n,p)=>{const h=n?.position;return o!==h&&(0,r.createElement)(gT,{isRenderedInSidebar:c,key:p,onClose:l,renderToggle:({isOpen:e,onToggle:t})=>(0,r.createElement)(hT,{key:p,onClick:()=>{d.current&&d.current.significantMoveHappened||(e?l():s(),t())},onMouseDown:()=>{window&&window.addEventListener&&(d.current={initialPosition:h,index:p,significantMoveHappened:!1,listenersActivated:!0},s(),window.addEventListener("mousemove",f),window.addEventListener("mouseup",m))},onKeyDown:e=>{"ArrowLeft"===e.code?(e.stopPropagation(),a(fT(i,p,uT(n.position-cT)))):"ArrowRight"===e.code&&(e.stopPropagation(),a(fT(i,p,uT(n.position+cT))))},isOpen:e,position:n.position,color:n.color}),renderContent:({onClose:o})=>(0,r.createElement)(GS,{paddingSize:"none"},(0,r.createElement)(MS,{enableAlpha:!t,color:n.color,onChange:e=>{a(mT(i,p,Bg(e).toRgbString()))}}),!e&&i.length>2&&(0,r.createElement)(Py,{className:"components-custom-gradient-picker__remove-control-point-wrapper",alignment:"center"},(0,r.createElement)(my,{onClick:()=>{a(function(e,t){return e.filter(((e,n)=>n!==t))}(i,p)),o()},variant:"link"},(0,u.__)("Remove Control Point")))),style:{left:`${n.position}%`,transform:"translateX( -50% )"}})})))}vT.InsertPoint=function({value:e,onChange:t,onOpenInserter:n,onCloseInserter:o,insertPosition:i,disableAlpha:a,__experimentalIsRenderedInSidebar:s}){const[l,c]=(0,Uo.useState)(!1);return(0,r.createElement)(gT,{isRenderedInSidebar:s,className:"components-custom-gradient-picker__inserter",onClose:()=>{o()},renderToggle:({isOpen:e,onToggle:t})=>(0,r.createElement)(my,{"aria-expanded":e,"aria-haspopup":"true",onClick:()=>{e?o():(c(!1),n()),t()},className:"components-custom-gradient-picker__insert-point-dropdown",icon:ng}),renderContent:()=>(0,r.createElement)(GS,{paddingSize:"none"},(0,r.createElement)(MS,{enableAlpha:!a,onChange:n=>{l?t(function(e,t,n){const r=e.findIndex((e=>e.position===t));return mT(e,r,n)}(e,i,Bg(n).toRgbString())):(t(function(e,t,n){const r=e.findIndex((e=>e.position>t)),o={color:n,position:t},i=e.slice();return i.splice(r-1,0,o),i}(e,i,Bg(n).toRgbString())),c(!0))}})),style:null!==i?{left:`${i}%`,transform:"translateX( -50% )"}:void 0})};const bT=vT,yT=(e,t)=>{switch(t.type){case"MOVE_INSERTER":if("IDLE"===e.id||"MOVING_INSERTER"===e.id)return{id:"MOVING_INSERTER",insertPosition:t.insertPosition};break;case"STOP_INSERTER_MOVE":if("MOVING_INSERTER"===e.id)return{id:"IDLE"};break;case"OPEN_INSERTER":if("MOVING_INSERTER"===e.id)return{id:"INSERTING_CONTROL_POINT",insertPosition:e.insertPosition};break;case"CLOSE_INSERTER":if("INSERTING_CONTROL_POINT"===e.id)return{id:"IDLE"};break;case"START_CONTROL_CHANGE":if("IDLE"===e.id)return{id:"MOVING_CONTROL_POINT"};break;case"STOP_CONTROL_CHANGE":if("MOVING_CONTROL_POINT"===e.id)return{id:"IDLE"}}return e},xT={id:"IDLE"};function wT({background:e,hasGradient:t,value:n,onChange:o,disableInserter:i=!1,disableAlpha:a=!1,__experimentalIsRenderedInSidebar:s=!1}){const l=(0,Uo.useRef)(null),[u,d]=(0,Uo.useReducer)(yT,xT),f=e=>{if(!l.current)return;const t=pT(e.clientX,l.current);n.some((({position:e})=>Math.abs(t-e)<sT))?"MOVING_INSERTER"===u.id&&d({type:"STOP_INSERTER_MOVE"}):d({type:"MOVE_INSERTER",insertPosition:t})},m="MOVING_INSERTER"===u.id,p="INSERTING_CONTROL_POINT"===u.id;return(0,r.createElement)("div",{className:c()("components-custom-gradient-picker__gradient-bar",{"has-gradient":t}),onMouseEnter:f,onMouseMove:f,onMouseLeave:()=>{d({type:"STOP_INSERTER_MOVE"})}},(0,r.createElement)("div",{className:"components-custom-gradient-picker__gradient-bar-background",style:{background:e,opacity:t?1:.4}}),(0,r.createElement)("div",{ref:l,className:"components-custom-gradient-picker__markers-container"},!i&&(m||p)&&(0,r.createElement)(bT.InsertPoint,{__experimentalIsRenderedInSidebar:s,disableAlpha:a,insertPosition:u.insertPosition,value:n,onChange:o,onOpenInserter:()=>{d({type:"OPEN_INSERTER"})},onCloseInserter:()=>{d({type:"CLOSE_INSERTER"})}}),(0,r.createElement)(bT,{__experimentalIsRenderedInSidebar:s,disableAlpha:a,disableRemove:i,gradientPickerDomRef:l,ignoreMarkerPosition:p?u.insertPosition:void 0,value:n,onChange:o,onStartControlPointChange:()=>{d({type:"START_CONTROL_CHANGE"})},onStopControlPointChange:()=>{d({type:"STOP_CONTROL_CHANGE"})}})))}var ET=o(8924);const _T="linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%)",ST={type:"angular",value:"90"},CT=[{value:"linear-gradient",label:(0,u.__)("Linear")},{value:"radial-gradient",label:(0,u.__)("Radial")}],kT={top:0,"top right":45,"right top":45,right:90,"right bottom":135,"bottom right":135,bottom:180,"bottom left":225,"left bottom":225,left:270,"top left":315,"left top":315};function PT({type:e,value:t,length:n}){return`${function({type:e,value:t}){return"literal"===e?t:"hex"===e?`#${t}`:`${e}(${t.join(",")})`}({type:e,value:t})} ${function(e){if(!e)return"";const{value:t,type:n}=e;return`${t}${n}`}(n)}`}function TT({type:e,orientation:t,colorStops:n}){const r=function(e){if(!Array.isArray(e)&&e&&"angular"===e.type)return`${e.value}deg`}(t);return`${e}(${[r,...n.sort(((e,t)=>{const n=e=>void 0===e?.length?.value?0:parseInt(e.length.value);return n(e)-n(t)})).map(PT)].filter(Boolean).join(",")})`}function IT(e){return void 0===e.length||"%"!==e.length.type}function RT(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;case"rgb":case"rgba":return`${e.type}(${e.value.join(",")})`;default:return"transparent"}}Vg([Hg]);const MT=bs(Uh,{target:"e10bzpgi1"})({name:"1gvx10y",styles:"flex-grow:5"}),NT=bs(Uh,{target:"e10bzpgi0"})({name:"1gvx10y",styles:"flex-grow:5"}),DT=({gradientAST:e,hasGradient:t,onChange:n})=>{var o;const i=null!==(o=e?.orientation?.value)&&void 0!==o?o:180;return(0,r.createElement)(zy,{onChange:t=>{n(TT({...e,orientation:{type:"angular",value:`${t}`}}))},value:t?i:""})},AT=({gradientAST:e,hasGradient:t,onChange:n})=>{const{type:o}=e;return(0,r.createElement)(YE,{__nextHasNoMarginBottom:!0,className:"components-custom-gradient-picker__type-picker",label:(0,u.__)("Type"),labelPosition:"top",onChange:t=>{"linear-gradient"===t&&n(TT({...e,orientation:e.orientation?void 0:ST,type:"linear-gradient"})),"radial-gradient"===t&&(()=>{const{orientation:t,...r}=e;n(TT({...r,type:"radial-gradient"}))})()},options:CT,size:"__unstable-large",value:t?o:void 0})};const OT=function({value:e,onChange:t,__experimentalIsRenderedInSidebar:n=!1}){const{gradientAST:o,hasGradient:i}=function(e){let t,n=!!e;const r=null!=e?e:_T;try{t=ET.parse(r)[0]}catch(e){console.warn("wp.components.CustomGradientPicker failed to parse the gradient with error",e),t=ET.parse(_T)[0],n=!1}if(Array.isArray(t.orientation)||"directional"!==t.orientation?.type||(t.orientation={type:"angular",value:kT[t.orientation.value].toString()}),t.colorStops.some(IT)){const{colorStops:e}=t,n=100/(e.length-1);e.forEach(((e,t)=>{e.length={value:""+n*t,type:"%"}}))}return{gradientAST:t,hasGradient:n}}(e),a=function(e){return TT({type:"linear-gradient",orientation:ST,colorStops:e.colorStops})}(o),s=o.colorStops.map((e=>({color:RT(e),position:parseInt(e.length.value)})));return(0,r.createElement)(jS,{spacing:4,className:"components-custom-gradient-picker"},(0,r.createElement)(wT,{__experimentalIsRenderedInSidebar:n,background:a,hasGradient:i,value:s,onChange:e=>{t(TT(function(e,t){return{...e,colorStops:t.map((({position:e,color:t})=>{const{r:n,g:r,b:o,a:i}=Bg(t).toRgb();return{length:{type:"%",value:e?.toString()},type:i<1?"rgba":"rgb",value:i<1?[`${n}`,`${r}`,`${o}`,`${i}`]:[`${n}`,`${r}`,`${o}`]}}))}}(o,e)))}}),(0,r.createElement)($h,{gap:3,className:"components-custom-gradient-picker__ui-line"},(0,r.createElement)(MT,null,(0,r.createElement)(AT,{gradientAST:o,hasGradient:i,onChange:t})),(0,r.createElement)(NT,null,"linear-gradient"===o.type&&(0,r.createElement)(DT,{gradientAST:o,hasGradient:i,onChange:t}))))},zT=e=>e.length>0&&e.every((e=>{return t=e,Array.isArray(t.gradients)&&!("gradient"in t);var t}));function LT({className:e,clearGradient:t,gradients:n,onChange:o,value:i,...a}){const s=(0,Uo.useMemo)((()=>n.map((({gradient:e,name:n,slug:a},s)=>(0,r.createElement)(BS.Option,{key:a,value:e,isSelected:i===e,tooltipText:n||(0,u.sprintf)((0,u.__)("Gradient code: %s"),e),style:{color:"rgba( 0,0,0,0 )",background:e},onClick:i===e?t:()=>o(e,s),"aria-label":n?(0,u.sprintf)((0,u.__)("Gradient: %s"),n):(0,u.sprintf)((0,u.__)("Gradient code: %s"),e)})))),[n,i,o,t]);return(0,r.createElement)(BS.OptionGroup,{className:e,options:s,...a})}function FT({className:e,clearGradient:t,gradients:n,onChange:o,value:i,headingLevel:a}){const s=(0,d.useInstanceId)(FT);return(0,r.createElement)(jS,{spacing:3,className:e},n.map((({name:e,gradients:n},l)=>{const c=`color-palette-${s}-${l}`;return(0,r.createElement)(jS,{spacing:2,key:l},(0,r.createElement)(WS,{level:a,id:c},e),(0,r.createElement)(LT,{clearGradient:t,gradients:n,onChange:e=>o(e,l),value:i,"aria-labelledby":c}))})))}function BT(e){const{asButtons:t,loop:n,actions:o,headingLevel:i,"aria-label":a,"aria-labelledby":s,...l}=e,c=zT(e.gradients)?(0,r.createElement)(FT,{headingLevel:i,...l}):(0,r.createElement)(LT,{...l});let d;if(t)d={asButtons:!0};else{const e={asButtons:!1,loop:n};d=a?{...e,"aria-label":a}:s?{...e,"aria-labelledby":s}:{...e,"aria-label":(0,u.__)("Custom color picker.")}}return(0,r.createElement)(BS,{...d,actions:o,options:c})}const jT=function({className:e,gradients:t=[],onChange:n,value:o,clearable:i=!0,disableCustomGradients:a=!1,__experimentalIsRenderedInSidebar:s,headingLevel:l=2,...c}){const d=(0,Uo.useCallback)((()=>n(void 0)),[n]);return(0,r.createElement)(jS,{spacing:t.length?4:0},!a&&(0,r.createElement)(OT,{__experimentalIsRenderedInSidebar:s,value:o,onChange:n}),(t.length>0||i)&&(0,r.createElement)(BT,{...c,className:e,clearGradient:d,gradients:t,onChange:n,value:o,actions:i&&!a&&(0,r.createElement)(BS.ButtonAction,{onClick:d},(0,u.__)("Clear")),headingLevel:l}))},VT=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"})),HT=window.wp.dom,$T=()=>{},WT=["menuitem","menuitemradio","menuitemcheckbox"];class UT extends Uo.Component{constructor(e){super(e),this.onKeyDown=this.onKeyDown.bind(this),this.bindContainer=this.bindContainer.bind(this),this.getFocusableContext=this.getFocusableContext.bind(this),this.getFocusableIndex=this.getFocusableIndex.bind(this)}componentDidMount(){this.container&&this.container.addEventListener("keydown",this.onKeyDown)}componentWillUnmount(){this.container&&this.container.removeEventListener("keydown",this.onKeyDown)}bindContainer(e){const{forwardedRef:t}=this.props;this.container=e,"function"==typeof t?t(e):t&&"current"in t&&(t.current=e)}getFocusableContext(e){if(!this.container)return null;const{onlyBrowserTabstops:t}=this.props,n=(t?HT.focus.tabbable:HT.focus.focusable).find(this.container),r=this.getFocusableIndex(n,e);return r>-1&&e?{index:r,target:e,focusables:n}:null}getFocusableIndex(e,t){return e.indexOf(t)}onKeyDown(e){this.props.onKeyDown&&this.props.onKeyDown(e);const{getFocusableContext:t}=this,{cycle:n=!0,eventToOffset:r,onNavigate:o=$T,stopNavigationEvents:i}=this.props,a=r(e);if(void 0!==a&&i){e.stopImmediatePropagation();const t=e.target?.getAttribute("role");!!t&&WT.includes(t)&&e.preventDefault()}if(!a)return;const s=e.target?.ownerDocument?.activeElement;if(!s)return;const l=t(s);if(!l)return;const{index:c,focusables:u}=l,d=n?function(e,t,n){const r=e+n;return r<0?t+r:r>=t?r-t:r}(c,u.length,a):c+a;d>=0&&d<u.length&&(u[d].focus(),o(d,u[d]),"Tab"===e.code&&e.preventDefault())}render(){const{children:e,stopNavigationEvents:t,eventToOffset:n,onNavigate:o,onKeyDown:i,cycle:a,onlyBrowserTabstops:s,forwardedRef:l,...c}=this.props;return(0,r.createElement)("div",{ref:this.bindContainer,...c},e)}}const GT=(e,t)=>(0,r.createElement)(UT,{...e,forwardedRef:t});GT.displayName="NavigableContainer";const qT=(0,Uo.forwardRef)(GT);const YT=(0,Uo.forwardRef)((function({role:e="menu",orientation:t="vertical",...n},o){return(0,r.createElement)(qT,{ref:o,stopNavigationEvents:!0,onlyBrowserTabstops:!1,role:e,"aria-orientation":"presentation"===e||"vertical"!==t&&"horizontal"!==t?void 0:t,eventToOffset:e=>{const{code:n}=e;let r=["ArrowDown"],o=["ArrowUp"];return"horizontal"===t&&(r=["ArrowRight"],o=["ArrowLeft"]),"both"===t&&(r=["ArrowRight","ArrowDown"],o=["ArrowLeft","ArrowUp"]),r.includes(n)?1:o.includes(n)?-1:["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(n)?0:void 0},...n})})),KT=YT;function XT(e={},t={}){const n={...e,...t};return t.className&&e.className&&(n.className=c()(t.className,e.className)),n}function ZT(e){return"function"==typeof e}const JT=is((function(e){const{children:t,className:n,controls:o,icon:i=VT,label:a,popoverProps:s,toggleProps:l,menuProps:u,disableOpenOnArrowDown:d=!1,text:f,noIcons:m,open:p,defaultOpen:h,onToggle:g,variant:v}=rs(e,"DropdownMenu");if(!o?.length&&!ZT(t))return null;let b;o?.length&&(b=o,Array.isArray(b[0])||(b=[o]));const y=XT({className:"components-dropdown-menu__popover",variant:v},s);return(0,r.createElement)(FE,{className:n,popoverProps:y,renderToggle:({isOpen:e,onToggle:t})=>{var n;const{as:o=my,...s}=null!=l?l:{},u=XT({className:c()("components-dropdown-menu__toggle",{"is-opened":e})},s);return(0,r.createElement)(o,{...u,icon:i,onClick:e=>{t(),u.onClick&&u.onClick(e)},onKeyDown:n=>{(n=>{d||e||"ArrowDown"!==n.code||(n.preventDefault(),t())})(n),u.onKeyDown&&u.onKeyDown(n)},"aria-haspopup":"true","aria-expanded":e,label:a,text:f,showTooltip:null===(n=l?.showTooltip)||void 0===n||n},u.children)},renderContent:e=>{const n=XT({"aria-label":a,className:c()("components-dropdown-menu__menu",{"no-icons":m})},u);return(0,r.createElement)(KT,{...n,role:"menu"},ZT(t)?t(e):null,b?.flatMap(((t,n)=>t.map(((t,o)=>(0,r.createElement)(my,{key:[n,o].join(),onClick:n=>{n.stopPropagation(),e.onClose(),t.onClick&&t.onClick()},className:c()("components-dropdown-menu__menu-item",{"has-separator":n>0&&0===o,"is-active":t.isActive,"is-icon-only":!t.title}),icon:t.icon,label:t.label,"aria-checked":"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.isActive:void 0,role:"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.role:"menuitem",disabled:t.isDisabled},t.title))))))},open:p,defaultOpen:h,onToggle:g})}),"DropdownMenu"),QT=JT;const eI=bs(DE,{target:"e1lpqc909"})("&&{flex-shrink:0;width:",Ah(6),";height:",Ah(6),";}"),tI=bs(ly,{target:"e1lpqc908"})(yv,"{background:",Ds.gray[100],";border-radius:",Xg.controlBorderRadius,";",Ev,Ev,Ev,Ev,"{height:",Ah(8),";}",kv,kv,kv,"{border-color:transparent;box-shadow:none;}}"),nI=({as:e})=>"button"===e?Ps("display:flex;align-items:center;width:100%;appearance:none;background:transparent;border:none;border-radius:0;padding:0;cursor:pointer;&:hover{color:",Ds.theme.accent,";}",""):null,rI=bs(xs,{target:"e1lpqc907"})(nI," padding-block:3px;padding-inline-start:",Ah(3),";border:1px solid ",Xg.surfaceBorderColor,";border-bottom-color:transparent;font-size:",Yb("default.fontSize"),";&:focus-visible{border-color:transparent;box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ",Ds.theme.accent,";outline:2px solid transparent;outline-offset:0;}border-top-left-radius:",Xg.controlBorderRadius,";border-top-right-radius:",Xg.controlBorderRadius,";&+&{border-top-left-radius:0;border-top-right-radius:0;}&:last-child{border-bottom-left-radius:",Xg.controlBorderRadius,";border-bottom-right-radius:",Xg.controlBorderRadius,";border-bottom-color:",Xg.surfaceBorderColor,";}&.is-selected+&{border-top-color:transparent;}&.is-selected{border-color:",Ds.theme.accent,";}"),oI=bs("div",{target:"e1lpqc906"})("line-height:",Ah(8),";margin-left:",Ah(2),";margin-right:",Ah(2),";white-space:nowrap;overflow:hidden;"),iI=bs($S,{target:"e1lpqc905"})("text-transform:uppercase;line-height:",Ah(6),";font-weight:500;&&&{font-size:11px;margin-bottom:0;}"),aI=bs(xs,{target:"e1lpqc904"})("height:",Ah(6),";display:flex;"),sI=bs(Py,{target:"e1lpqc903"})("margin-bottom:",Ah(2),";"),lI=bs(xs,{target:"e1lpqc902"})({name:"u6wnko",styles:"&&&{.components-button.has-icon{min-width:0;padding:0;}}"}),cI=bs(my,{target:"e1lpqc901"})("&&{color:",Ds.theme.accent,";}"),uI=bs(my,{target:"e1lpqc900"})("&&{margin-top:",Ah(1),";}");function dI({value:e,onChange:t,label:n}){return(0,r.createElement)(tI,{label:n,hideLabelFromVision:!0,value:e,onChange:t})}function fI({isGradient:e,element:t,onChange:n,popoverProps:o,onClose:i=(()=>{})}){const a=(0,Uo.useMemo)((()=>({shift:!0,offset:20,resize:!1,placement:"left-start",...o,className:c()("components-palette-edit__popover",o?.className)})),[o]);return(0,r.createElement)(bw,{...a,onClose:i},!e&&(0,r.createElement)(MS,{color:t.color,enableAlpha:!0,onChange:e=>{n({...t,color:e})}}),e&&(0,r.createElement)("div",{className:"components-palette-edit__popover-gradient-picker"},(0,r.createElement)(OT,{__experimentalIsRenderedInSidebar:!0,value:t.gradient,onChange:e=>{n({...t,gradient:e})}})))}function mI({canOnlyChangeValues:e,element:t,onChange:n,isEditing:o,onStartEditing:i,onRemove:a,onStopEditing:s,popoverProps:l,slugPrefix:c,isGradient:f}){const m=(0,d.__experimentalUseFocusOutside)(s),p=f?t.gradient:t.color,[h,g]=(0,Uo.useState)(null),v=(0,Uo.useMemo)((()=>({...l,anchor:h})),[h,l]);return(0,r.createElement)(rI,{className:o?"is-selected":void 0,as:o?"div":"button",onClick:i,"aria-label":o?void 0:(0,u.sprintf)((0,u.__)("Edit: %s"),t.name.trim().length?t.name:p),ref:g,...o?{...m}:{}},(0,r.createElement)(Py,{justify:"flex-start"},(0,r.createElement)(eI,{colorValue:p}),(0,r.createElement)(og,null,o&&!e?(0,r.createElement)(dI,{label:f?(0,u.__)("Gradient name"):(0,u.__)("Color name"),value:t.name,onChange:e=>n({...t,name:e,slug:c+Wy(null!=e?e:"")})}):(0,r.createElement)(oI,null,t.name.trim().length?t.name:" ")),o&&!e&&(0,r.createElement)(og,null,(0,r.createElement)(uI,{size:"small",icon:Lw,label:(0,u.__)("Remove color"),onClick:a}))),o&&(0,r.createElement)(fI,{isGradient:f,onChange:n,element:t,popoverProps:v}))}function pI({elements:e,onChange:t,editingElement:n,setEditingElement:o,canOnlyChangeValues:i,slugPrefix:a,isGradient:s,popoverProps:l}){const c=(0,Uo.useRef)();(0,Uo.useEffect)((()=>{c.current=e}),[e]);const u=(0,d.useDebounce)(t,100);return(0,r.createElement)(jS,{spacing:3},(0,r.createElement)(aT,{isRounded:!0},e.map(((c,d)=>(0,r.createElement)(mI,{isGradient:s,canOnlyChangeValues:i,key:d,element:c,onStartEditing:()=>{n!==d&&o(d)},onChange:t=>{u(e.map(((e,n)=>n===d?t:e)))},onRemove:()=>{o(null);const n=e.filter(((e,t)=>t!==d));t(n.length?n:void 0)},isEditing:d===n,onStopEditing:()=>{d===n&&o(null)},slugPrefix:a,popoverProps:l})))))}const hI=[];const gI=function({gradients:e,colors:t=hI,onChange:n,paletteLabel:o,paletteLabelHeadingLevel:i=2,emptyMessage:a,canOnlyChangeValues:s,canReset:l,slugPrefix:c="",popoverProps:f}){const m=!!e,p=m?e:t,[h,g]=(0,Uo.useState)(!1),[v,b]=(0,Uo.useState)(null),y=h&&!!v&&p[v]&&!p[v].slug,x=p.length>0,w=(0,d.useDebounce)(n,100),E=(0,Uo.useCallback)(((e,t)=>{const n=void 0===t?void 0:p[t];n&&n[m?"gradient":"color"]===e?b(t):g(!0)}),[m,p]);return(0,r.createElement)(lI,null,(0,r.createElement)(sI,null,(0,r.createElement)(iI,{level:i},o),(0,r.createElement)(aI,null,x&&h&&(0,r.createElement)(cI,{size:"small",onClick:()=>{g(!1),b(null)}},(0,u.__)("Done")),!s&&(0,r.createElement)(my,{size:"small",isPressed:y,icon:ng,label:m?(0,u.__)("Add gradient"):(0,u.__)("Add color"),onClick:()=>{const r=function(e,t){const n=new RegExp(`^${t}color-([\\d]+)$`),r=e.reduce(((e,t)=>{if("string"==typeof t?.slug){const r=t?.slug.match(n);if(r){const t=parseInt(r[1],10);if(t>=e)return t+1}}return e}),1);return(0,u.sprintf)((0,u.__)("Color %s"),r)}(p,c);n(e?[...e,{gradient:_T,name:r,slug:c+Wy(r)}]:[...t,{color:"#000",name:r,slug:c+Wy(r)}]),g(!0),b(p.length)}}),x&&(!h||!s||l)&&(0,r.createElement)(QT,{icon:WP,label:m?(0,u.__)("Gradient options"):(0,u.__)("Color options"),toggleProps:{isSmall:!0}},(({onClose:e})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(KT,{role:"menu"},!h&&(0,r.createElement)(my,{variant:"tertiary",onClick:()=>{g(!0),e()},className:"components-palette-edit__menu-button"},(0,u.__)("Show details")),!s&&(0,r.createElement)(my,{variant:"tertiary",onClick:()=>{b(null),g(!1),n(),e()},className:"components-palette-edit__menu-button"},m?(0,u.__)("Remove all gradients"):(0,u.__)("Remove all colors")),l&&(0,r.createElement)(my,{variant:"tertiary",onClick:()=>{b(null),n(),e()}},m?(0,u.__)("Reset gradient"):(0,u.__)("Reset colors")))))))),x&&(0,r.createElement)(r.Fragment,null,h&&(0,r.createElement)(pI,{canOnlyChangeValues:s,elements:p,onChange:n,editingElement:v,setEditingElement:b,slugPrefix:c,isGradient:m,popoverProps:f}),!h&&null!==v&&(0,r.createElement)(fI,{isGradient:m,onClose:()=>b(null),onChange:e=>{w(p.map(((t,n)=>n===v?e:t)))},element:p[null!=v?v:-1],popoverProps:f}),!h&&(m?(0,r.createElement)(jT,{gradients:e,onChange:E,clearable:!1,disableCustomGradients:!0}):(0,r.createElement)(JS,{colors:t,onChange:E,clearable:!1,disableCustomColors:!0}))),!x&&a)},vI=({__next40pxDefaultSize:e})=>!e&&Ps("height:28px;padding-left:",Ah(1),";padding-right:",Ah(1),";",""),bI=bs($h,{target:"evuatpg0"})("height:38px;padding-left:",Ah(2),";padding-right:",Ah(2),";",vI,";");const yI=(0,Uo.forwardRef)((function(e,t){const{value:n,isExpanded:o,instanceId:i,selectedSuggestionIndex:a,className:s,onChange:l,onFocus:u,onBlur:d,...f}=e,[m,p]=(0,Uo.useState)(!1),h=n?n.length+1:0;return(0,r.createElement)("input",{ref:t,id:`components-form-token-input-${i}`,type:"text",...f,value:n||"",onChange:e=>{l&&l({value:e.target.value})},onFocus:e=>{p(!0),u?.(e)},onBlur:e=>{p(!1),d?.(e)},size:h,className:c()(s,"components-form-token-field__input"),autoComplete:"off",role:"combobox","aria-expanded":o,"aria-autocomplete":"list","aria-owns":o?`components-form-token-suggestions-${i}`:void 0,"aria-activedescendant":m&&-1!==a&&o?`components-form-token-suggestions-${i}-${a}`:void 0,"aria-describedby":`components-form-token-suggestions-howto-${i}`})})),xI=yI;var wI=o(5428),EI=o.n(wI);const _I=e=>{e.preventDefault()};const SI=function({selectedIndex:e,scrollIntoView:t,match:n,onHover:o,onSelect:i,suggestions:a=[],displayTransform:s,instanceId:l,__experimentalRenderItem:u}){const[f,m]=(0,Uo.useState)(!1),p=(0,d.useRefEffect)((n=>{let r;return e>-1&&t&&n.children[e]&&(m(!0),EI()(n.children[e],n,{onlyScrollIfNeeded:!0}),r=requestAnimationFrame((()=>{m(!1)}))),()=>{void 0!==r&&cancelAnimationFrame(r)}}),[e,t]),h=e=>()=>{f||o?.(e)},g=e=>()=>{i?.(e)};return(0,r.createElement)("ul",{ref:p,className:"components-form-token-field__suggestions-list",id:`components-form-token-suggestions-${l}`,role:"listbox"},a.map(((t,o)=>{const i=(e=>{const t=s(n).toLocaleLowerCase();if(0===t.length)return null;const r=s(e),o=r.toLocaleLowerCase().indexOf(t);return{suggestionBeforeMatch:r.substring(0,o),suggestionMatch:r.substring(o,o+t.length),suggestionAfterMatch:r.substring(o+t.length)}})(t),a=c()("components-form-token-field__suggestion",{"is-selected":o===e});let d;return d="function"==typeof u?u({item:t}):i?(0,r.createElement)("span",{"aria-label":s(t)},i.suggestionBeforeMatch,(0,r.createElement)("strong",{className:"components-form-token-field__suggestion-match"},i.suggestionMatch),i.suggestionAfterMatch):s(t),(0,r.createElement)("li",{id:`components-form-token-suggestions-${l}-${o}`,role:"option",className:a,key:"object"==typeof t&&"value"in t?t?.value:s(t),onMouseDown:_I,onClick:g(t),onMouseEnter:h(t),"aria-selected":o===e},d)})))},CI=(0,d.createHigherOrderComponent)((e=>t=>{const[n,o]=(0,Uo.useState)(void 0),i=(0,Uo.useCallback)((e=>o((()=>e?.handleFocusOutside?e.handleFocusOutside.bind(e):void 0))),[]);return(0,r.createElement)("div",{...(0,d.__experimentalUseFocusOutside)(n)},(0,r.createElement)(e,{ref:i,...t}))}),"withFocusOutside"),kI=()=>{},PI=CI(class extends Uo.Component{handleFocusOutside(e){this.props.onFocusOutside(e)}render(){return this.props.children}}),TI=(e,t)=>null===e?-1:t.indexOf(e);const II=function e(t){var n;const{__nextHasNoMarginBottom:o=!1,__next40pxDefaultSize:i=!1,value:a,label:s,options:l,onChange:f,onFilterValueChange:m=kI,hideLabelFromVision:p,help:h,allowReset:g=!0,className:v,messages:b={selected:(0,u.__)("Item selected.")},__experimentalRenderItem:y}=Nv(t),[x,w]=cE({value:a,onChange:f}),E=l.find((e=>e.value===x)),_=null!==(n=E?.label)&&void 0!==n?n:"",S=(0,d.useInstanceId)(e,"combobox-control"),[C,k]=(0,Uo.useState)(E||null),[P,T]=(0,Uo.useState)(!1),[I,R]=(0,Uo.useState)(!1),[M,N]=(0,Uo.useState)(""),D=(0,Uo.useRef)(null),A=(0,Uo.useMemo)((()=>{const e=[],t=[],n=$y(M);return l.forEach((r=>{const o=$y(r.label).indexOf(n);0===o?e.push(r):o>0&&t.push(r)})),e.concat(t)}),[M,l]),O=e=>{w(e.value),(0,jy.speak)(b.selected,"assertive"),k(e),N(""),T(!1)},z=(e=1)=>{let t=TI(C,A)+e;t<0?t=A.length-1:t>=A.length&&(t=0),k(A[t]),T(!0)};return(0,Uo.useEffect)((()=>{const e=A.length>0,t=TI(C,A)>0;e&&!t&&k(A[0])}),[A,C]),(0,Uo.useEffect)((()=>{const e=A.length>0;if(P){const t=e?(0,u.sprintf)((0,u._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",A.length),A.length):(0,u.__)("No results.");(0,jy.speak)(t,"polite")}}),[A,P]),(0,r.createElement)(PI,{onFocusOutside:()=>{T(!1)}},(0,r.createElement)(iy,{__nextHasNoMarginBottom:o,className:c()(v,"components-combobox-control"),label:s,id:`components-form-token-input-${S}`,hideLabelFromVision:p,help:h},(0,r.createElement)("div",{className:"components-combobox-control__suggestions-container",tabIndex:-1,onKeyDown:e=>{let t=!1;if(!e.defaultPrevented&&!e.nativeEvent.isComposing&&229!==e.keyCode){switch(e.code){case"Enter":C&&(O(C),t=!0);break;case"ArrowUp":z(-1),t=!0;break;case"ArrowDown":z(1),t=!0;break;case"Escape":T(!1),k(null),t=!0}t&&e.preventDefault()}}},(0,r.createElement)(bI,{__next40pxDefaultSize:i},(0,r.createElement)(Uh,null,(0,r.createElement)(xI,{className:"components-combobox-control__input",instanceId:S,ref:D,value:P?M:_,onFocus:()=>{R(!0),T(!0),m(""),N("")},onBlur:()=>{R(!1)},isExpanded:P,selectedSuggestionIndex:TI(C,A),onChange:e=>{const t=e.value;N(t),m(t),I&&T(!0)}})),g&&(0,r.createElement)(og,null,(0,r.createElement)(my,{className:"components-combobox-control__reset",icon:zw,disabled:!x,onClick:()=>{w(null),D.current?.focus()},label:(0,u.__)("Reset")}))),P&&(0,r.createElement)(SI,{instanceId:S,match:{label:M,value:""},displayTransform:e=>e.label,suggestions:A,selectedIndex:TI(C,A),onHover:k,onSelect:O,scrollIntoView:!0,__experimentalRenderItem:y}))))};var RI=(0,r.createContext)(void 0),MI=Ve((e=>{const[t,n]=(0,r.useState)();return e=Te(e,(e=>(0,Le.jsx)(RI.Provider,{value:n,children:e})),[]),e=x({role:"group","aria-labelledby":t},e)}));Fe((e=>je("div",MI(e))));var NI=Ve((e=>{var t=e,{store:n}=t,r=E(t,["store"]);return r=MI(r)})),DI=Fe((e=>je("div",NI(e))));function AI(e){if(e.state){const{state:t,...n}=e,{store:r,...o}=AI(t);return{...n,...o,store:r}}return e}function OI(e,t={}){const n=e.displayName,o=n=>{const{store:o,...i}=AI(n),a=i;return a.id=(0,d.useInstanceId)(o,a.baseId,a.id),Object.entries(t).forEach((([e,t])=>{a.hasOwnProperty(e)&&(Object.assign(a,{[t]:a[e]}),delete a[e])})),delete a.baseId,(0,r.createElement)(e,{...a,store:o})};return o.displayName=n,o}const zI=(0,Uo.forwardRef)((({role:e,...t},n)=>{const o="row"===e?ll:DI;return(0,r.createElement)(o,{ref:n,role:e,...t})}));zI.displayName="CompositeGroup";const LI=OI(al,{baseId:"id"}),FI=OI(zI),BI=OI(qt,{focusable:"accessibleWhenDisabled"});function jI(e={}){const{baseId:t,currentId:n,orientation:r,rtl:o=!1,loop:i=!1,wrap:a=!1,shift:s=!1,unstable_virtual:l}=e;return{baseId:(0,d.useInstanceId)(LI,"composite",t),store:rl({defaultActiveId:n,rtl:o,orientation:r,focusLoop:i,focusShift:s,focusWrap:a,virtualFocus:l})}}const VI=new Set(["alert","status","log","marquee","timer"]),HI=[];function $I(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||t&&VI.has(t))}const WI=(0,Uo.createContext)([]),UI=new Map;const GI=(0,Uo.forwardRef)((function(e,t){const{bodyOpenClassName:n="modal-open",role:o="dialog",title:i=null,focusOnMount:a=!0,shouldCloseOnEsc:s=!0,shouldCloseOnClickOutside:l=!0,isDismissible:f=!0,aria:m={labelledby:void 0,describedby:void 0},onRequestClose:p,icon:h,closeButtonLabel:g,children:v,style:b,overlayClassName:y,className:x,contentLabel:w,onKeyDown:E,isFullScreen:_=!1,size:S,headerActions:C=null,__experimentalHideHeader:k=!1}=e,P=(0,Uo.useRef)(),T=(0,d.useInstanceId)(GI),I=i?`components-modal-header-${T}`:m.labelledby,R=(0,d.useFocusOnMount)("firstContentElement"===a?"firstElement":a),M=(0,d.useConstrainedTabbing)(),N=(0,d.useFocusReturn)(),D=(0,Uo.useRef)(null),A=(0,Uo.useRef)(null),[O,z]=(0,Uo.useState)(!1),[L,F]=(0,Uo.useState)(!1);let B;_||"fill"===S?B="is-full-screen":S&&(B=`has-size-${S}`);const j=(0,Uo.useCallback)((()=>{if(!D.current)return;const e=(0,HT.getScrollContainer)(D.current);D.current===e?F(!0):F(!1)}),[D]);(0,Uo.useEffect)((()=>(function(e){const t=Array.from(document.body.children),n=[];HI.push(n);for(const r of t)r!==e&&$I(r)&&(r.setAttribute("aria-hidden","true"),n.push(r))}(P.current),()=>function(){const e=HI.pop();if(e)for(const t of e)t.removeAttribute("aria-hidden")}())),[]);const V=(0,Uo.useRef)();(0,Uo.useEffect)((()=>{V.current=p}),[p]);const H=(0,Uo.useContext)(WI),$=(0,Uo.useRef)([]);(0,Uo.useEffect)((()=>{H.push(V);const[e,t]=H;t&&e?.current?.();const n=$.current;return()=>{n[0]?.current?.(),H.shift()}}),[H]),(0,Uo.useEffect)((()=>{var e;const t=n,r=1+(null!==(e=UI.get(t))&&void 0!==e?e:0);return UI.set(t,r),document.body.classList.add(n),()=>{const e=UI.get(t)-1;0===e?(document.body.classList.remove(t),UI.delete(t)):UI.set(t,e)}}),[n]),(0,Uo.useLayoutEffect)((()=>{if(!window.ResizeObserver||!A.current)return;const e=new ResizeObserver(j);return e.observe(A.current),j(),()=>{e.disconnect()}}),[j,A]);const W=(0,Uo.useCallback)((e=>{var t;const n=null!==(t=e?.currentTarget?.scrollTop)&&void 0!==t?t:-1;!O&&n>0?z(!0):O&&n<=0&&z(!1)}),[O]);let U=null;const G={onPointerDown:e=>{e.target===e.currentTarget&&(U=e.target,e.preventDefault())},onPointerUp:({target:e,button:t})=>{const n=e===U;U=null,0===t&&n&&p()}},q=(0,r.createElement)("div",{ref:(0,d.useMergeRefs)([P,t]),className:c()("components-modal__screen-overlay",y),onKeyDown:function(e){e.nativeEvent.isComposing||229===e.keyCode||!s||"Escape"!==e.code&&"Escape"!==e.key||e.defaultPrevented||(e.preventDefault(),p&&p(e))},...l?G:{}},(0,r.createElement)(ew,{document},(0,r.createElement)("div",{className:c()("components-modal__frame",B,x),style:b,ref:(0,d.useMergeRefs)([M,N,"firstContentElement"!==a?R:null]),role:o,"aria-label":w,"aria-labelledby":w?void 0:I,"aria-describedby":m.describedby,tabIndex:-1,onKeyDown:E},(0,r.createElement)("div",{className:c()("components-modal__content",{"hide-header":k,"is-scrollable":L,"has-scrolled-content":O}),role:"document",onScroll:W,ref:D,"aria-label":L?(0,u.__)("Scrollable section"):void 0,tabIndex:L?0:void 0},!k&&(0,r.createElement)("div",{className:"components-modal__header"},(0,r.createElement)("div",{className:"components-modal__header-heading-container"},h&&(0,r.createElement)("span",{className:"components-modal__icon-container","aria-hidden":!0},h),i&&(0,r.createElement)("h1",{id:I,className:"components-modal__header-heading"},i)),C,f&&(0,r.createElement)(my,{onClick:p,icon:ex,label:g||(0,u.__)("Close")})),(0,r.createElement)("div",{ref:(0,d.useMergeRefs)([A,"firstContentElement"===a?R:null])},v)))));return(0,Uo.createPortal)((0,r.createElement)(WI.Provider,{value:$.current},q),document.body)})),qI=GI;const YI={name:"7g5ii0",styles:"&&{z-index:1000001;}"},KI=os(((e,t)=>{const{isOpen:n,onConfirm:o,onCancel:i,children:a,confirmButtonText:s,cancelButtonText:l,...c}=rs(e,"ConfirmDialog"),d=ns()(YI),f=(0,Uo.useRef)(),m=(0,Uo.useRef)(),[p,h]=(0,Uo.useState)(),[g,v]=(0,Uo.useState)();(0,Uo.useEffect)((()=>{const e=void 0!==n;h(!e||n),v(!e)}),[n]);const b=(0,Uo.useCallback)((e=>t=>{e?.(t),g&&h(!1)}),[g,h]),y=(0,Uo.useCallback)((e=>{e.target===f.current||e.target===m.current||"Enter"!==e.key||b(o)(e)}),[b,o]),x=null!=l?l:(0,u.__)("Cancel"),w=null!=s?s:(0,u.__)("OK");return(0,r.createElement)(r.Fragment,null,p&&(0,r.createElement)(qI,{onRequestClose:b(i),onKeyDown:y,closeButtonLabel:x,isDismissible:!0,ref:t,overlayClassName:d,__experimentalHideHeader:!0,...c},(0,r.createElement)(jS,{spacing:8},(0,r.createElement)(mv,null,a),(0,r.createElement)($h,{direction:"row",justify:"flex-end"},(0,r.createElement)(my,{__next40pxDefaultSize:!0,ref:f,variant:"tertiary",onClick:b(i)},x),(0,r.createElement)(my,{__next40pxDefaultSize:!0,ref:m,variant:"primary",onClick:b(o)},w)))))}),"ConfirmDialog");var XI=o(5826),ZI=o.n(XI);o(1915);function JI(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function QI(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function eR(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return QI(n.overflowY,t)||QI(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function tR(e,t,n,r,o,i,a,s){return i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0}let nR=0;function rR(){}function oR(e,t){if(!e)return;const n=function(e,t){var n=window,r=t.scrollMode,o=t.block,i=t.inline,a=t.boundary,s=t.skipOverflowHiddenElements,l="function"==typeof a?a:function(e){return e!==a};if(!JI(e))throw new TypeError("Invalid target");for(var c,u,d=document.scrollingElement||document.documentElement,f=[],m=e;JI(m)&&l(m);){if((m=null==(u=(c=m).parentElement)?c.getRootNode().host||null:u)===d){f.push(m);break}null!=m&&m===document.body&&eR(m)&&!eR(document.documentElement)||null!=m&&eR(m,s)&&f.push(m)}for(var p=n.visualViewport?n.visualViewport.width:innerWidth,h=n.visualViewport?n.visualViewport.height:innerHeight,g=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),y=b.height,x=b.width,w=b.top,E=b.right,_=b.bottom,S=b.left,C="start"===o||"nearest"===o?w:"end"===o?_:w+y/2,k="center"===i?S+x/2:"end"===i?E:S,P=[],T=0;T<f.length;T++){var I=f[T],R=I.getBoundingClientRect(),M=R.height,N=R.width,D=R.top,A=R.right,O=R.bottom,z=R.left;if("if-needed"===r&&w>=0&&S>=0&&_<=h&&E<=p&&w>=D&&_<=O&&S>=z&&E<=A)return P;var L=getComputedStyle(I),F=parseInt(L.borderLeftWidth,10),B=parseInt(L.borderTopWidth,10),j=parseInt(L.borderRightWidth,10),V=parseInt(L.borderBottomWidth,10),H=0,$=0,W="offsetWidth"in I?I.offsetWidth-I.clientWidth-F-j:0,U="offsetHeight"in I?I.offsetHeight-I.clientHeight-B-V:0,G="offsetWidth"in I?0===I.offsetWidth?0:N/I.offsetWidth:0,q="offsetHeight"in I?0===I.offsetHeight?0:M/I.offsetHeight:0;if(d===I)H="start"===o?C:"end"===o?C-h:"nearest"===o?tR(v,v+h,h,B,V,v+C,v+C+y,y):C-h/2,$="start"===i?k:"center"===i?k-p/2:"end"===i?k-p:tR(g,g+p,p,F,j,g+k,g+k+x,x),H=Math.max(0,H+v),$=Math.max(0,$+g);else{H="start"===o?C-D-B:"end"===o?C-O+V+U:"nearest"===o?tR(D,O,M,B,V+U,C,C+y,y):C-(D+M/2)+U/2,$="start"===i?k-z-F:"center"===i?k-(z+N/2)+W/2:"end"===i?k-A+j+W:tR(z,A,N,F,j+W,k,k+x,x);var Y=I.scrollLeft,K=I.scrollTop;C+=K-(H=Math.max(0,Math.min(K+H/q,I.scrollHeight-M/q+U))),k+=Y-($=Math.max(0,Math.min(Y+$/G,I.scrollWidth-N/G+W)))}P.push({el:I,top:H,left:$})}return P}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach((e=>{let{el:t,top:n,left:r}=e;t.scrollTop=n,t.scrollLeft=r}))}function iR(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function aR(e,t){let n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];r(),n=setTimeout((()=>{n=null,e(...i)}),t)}return o.cancel=r,o}function sR(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((t=>(t&&t(e,...r),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault)))}}function lR(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach((t=>{"function"==typeof t?t(e):t&&(t.current=e)}))}}function cR(){return String(nR++)}function uR(e){let{isOpen:t,resultCount:n,previousResultCount:r}=e;return t?n?n!==r?`${n} result${1===n?" is":"s are"} available, use up and down arrow keys to navigate. Press Enter key to select.`:"":"No results are available.":""}function dR(e,t){return Object.keys(e).reduce(((n,r)=>(n[r]=fR(t,r)?t[r]:e[r],n)),{})}function fR(e,t){return void 0!==e[t]}function mR(e){const{key:t,keyCode:n}=e;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?`Arrow${t}`:t}function pR(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;const i=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);let a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);const s=hR(e,a,n,r,o);return-1===s?t>=n?-1:t:s}function hR(e,t,n,r,o){const i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(let e=t+1;e<n;e++)if(!r(e).hasAttribute("disabled"))return e}else for(let e=t-1;e>=0;e--)if(!r(e).hasAttribute("disabled"))return e;return o?e>0?hR(1,0,n,r,!1):hR(-1,n-1,n,r,!1):-1}function gR(e,t,n,r){return void 0===r&&(r=!0),t.some((t=>t&&(iR(t,e,n)||r&&iR(t,n.document.activeElement,n))))}const vR=aR((e=>{yR(e).textContent=""}),500);function bR(e,t){const n=yR(t);e&&(n.textContent=e,vR(t))}function yR(e){void 0===e&&(e=document);let t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}const xR={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function wR(e,t,n){const{props:r,type:o}=e,i={};Object.keys(t).forEach((r=>{!function(e,t,n,r){const{props:o,type:i}=t,a=`on${PR(e)}Change`;o[a]&&void 0!==r[e]&&r[e]!==n[e]&&o[a]({type:i,...r})}(r,e,t,n),n[r]!==t[r]&&(i[r]=n[r])})),r.onStateChange&&Object.keys(i).length&&r.onStateChange({type:o,...i})}const ER=aR(((e,t)=>{bR(e(),t)}),200),_R="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect;function SR(e){let{id:t=`downshift-${cR()}`,labelId:n,menuId:o,getItemId:i,toggleButtonId:a,inputId:s}=e;const l=(0,r.useRef)({labelId:n||`${t}-label`,menuId:o||`${t}-menu`,getItemId:i||(e=>`${t}-item-${e}`),toggleButtonId:a||`${t}-toggle-button`,inputId:s||`${t}-input`});return l.current}function CR(e,t,n){return void 0!==e?e:0===n.length?-1:n.indexOf(t)}function kR(e){return/^\S{1}$/.test(e)}function PR(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function TR(e){const t=(0,r.useRef)(e);return t.current=e,t}function IR(e,t,n){const o=(0,r.useRef)(),i=(0,r.useRef)(),a=(0,r.useCallback)(((t,n)=>{i.current=n,t=dR(t,n.props);const r=e(t,n);return n.props.stateReducer(t,{...n,changes:r})}),[e]),[s,l]=(0,r.useReducer)(a,t),c=TR(n),u=(0,r.useCallback)((e=>l({props:c.current,...e})),[c]),d=i.current;return(0,r.useEffect)((()=>{d&&o.current&&o.current!==s&&wR(d,dR(o.current,d.props),s),o.current=s}),[s,n,d]),[s,u]}function RR(e,t,n){const[r,o]=IR(e,t,n);return[dR(r,n),o]}const MR={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){const{selectedItem:t,itemToString:n}=e;return t?`${n(t)} has been selected.`:""},scrollIntoView:oR,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};function NR(e,t,n){void 0===n&&(n=xR);const r=e[`default${PR(t)}`];return void 0!==r?r:n[t]}function DR(e,t,n){void 0===n&&(n=xR);const r=e[t];if(void 0!==r)return r;const o=e[`initial${PR(t)}`];return void 0!==o?o:NR(e,t,n)}function AR(e){const t=DR(e,"selectedItem"),n=DR(e,"isOpen"),r=DR(e,"highlightedIndex"),o=DR(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:o}}function OR(e,t,n,r){const{items:o,initialHighlightedIndex:i,defaultHighlightedIndex:a}=e,{selectedItem:s,highlightedIndex:l}=t;return 0===o.length?-1:void 0!==i&&l===i?i:void 0!==a?a:s?0===n?o.indexOf(s):pR(n,o.indexOf(s),o.length,r,!1):0===n?-1:n<0?o.length-1:0}function zR(e,t,n,o){const i=(0,r.useRef)({isMouseDown:!1,isTouchMove:!1});return(0,r.useEffect)((()=>{const r=()=>{i.current.isMouseDown=!0},a=r=>{i.current.isMouseDown=!1,e&&!gR(r.target,t.map((e=>e.current)),n)&&o()},s=()=>{i.current.isTouchMove=!1},l=()=>{i.current.isTouchMove=!0},c=r=>{!e||i.current.isTouchMove||gR(r.target,t.map((e=>e.current)),n,!1)||o()};return n.addEventListener("mousedown",r),n.addEventListener("mouseup",a),n.addEventListener("touchstart",s),n.addEventListener("touchmove",l),n.addEventListener("touchend",c),function(){n.removeEventListener("mousedown",r),n.removeEventListener("mouseup",a),n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",l),n.removeEventListener("touchend",c)}}),[e,n]),i}let LR=()=>rR;function FR(e,t,n){let{isInitialMount:o,highlightedIndex:i,items:a,environment:s,...l}=n;(0,r.useEffect)((()=>{o||ER((()=>e({highlightedIndex:i,highlightedItem:a[i],resultCount:a.length,...l})),s.document)}),t)}function BR(e){let{highlightedIndex:t,isOpen:n,itemRefs:o,getItemNodeFromIndex:i,menuElement:a,scrollIntoView:s}=e;const l=(0,r.useRef)(!0);return _R((()=>{t<0||!n||!Object.keys(o.current).length||(!1===l.current?l.current=!0:s(i(t),a))}),[t]),l}let jR=rR;function VR(e,t,n){const{type:r,props:o}=t;let i;switch(r){case n.ItemMouseMove:i={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:i={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:i={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:OR(o,e,0)};break;case n.FunctionOpenMenu:i={isOpen:!0,highlightedIndex:OR(o,e,0)};break;case n.FunctionCloseMenu:i={isOpen:!1};break;case n.FunctionSetHighlightedIndex:i={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:i={inputValue:t.inputValue};break;case n.FunctionReset:i={highlightedIndex:NR(o,"highlightedIndex"),isOpen:NR(o,"isOpen"),selectedItem:NR(o,"selectedItem"),inputValue:NR(o,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return{...e,...i}}function HR(e){for(var t=e.keysSoFar,n=e.highlightedIndex,r=e.items,o=e.itemToString,i=e.getItemNodeFromIndex,a=t.toLowerCase(),s=0;s<r.length;s++){var l=(s+n+1)%r.length,c=r[l];if(void 0!==c&&o(c).toLowerCase().startsWith(a)){var u=i(l);if(!(null==u?void 0:u.hasAttribute("disabled")))return l}}return n}ZI().array.isRequired,ZI().func,ZI().func,ZI().func,ZI().bool,ZI().number,ZI().number,ZI().number,ZI().bool,ZI().bool,ZI().bool,ZI().any,ZI().any,ZI().any,ZI().string,ZI().string,ZI().string,ZI().func,ZI().string,ZI().func,ZI().func,ZI().func,ZI().func,ZI().func,ZI().shape({addEventListener:ZI().func,removeEventListener:ZI().func,document:ZI().shape({getElementById:ZI().func,activeElement:ZI().any,body:ZI().any})});var $R=vi(vi({},MR),{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(1===n?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}}),WR=rR;const UR=0,GR=1,qR=2,YR=3,KR=4,XR=5,ZR=6,JR=7,QR=8,eM=9,tM=10,nM=11,rM=12,oM=13,iM=14,aM=15,sM=16,lM=17,cM=18,uM=19,dM=20,fM=21,mM=22;var pM=Object.freeze({__proto__:null,MenuKeyDownArrowDown:UR,MenuKeyDownArrowUp:GR,MenuKeyDownEscape:qR,MenuKeyDownHome:YR,MenuKeyDownEnd:KR,MenuKeyDownEnter:XR,MenuKeyDownSpaceButton:ZR,MenuKeyDownCharacter:JR,MenuBlur:QR,MenuMouseLeave:eM,ItemMouseMove:tM,ItemClick:nM,ToggleButtonClick:rM,ToggleButtonKeyDownArrowDown:oM,ToggleButtonKeyDownArrowUp:iM,ToggleButtonKeyDownCharacter:aM,FunctionToggleMenu:sM,FunctionOpenMenu:lM,FunctionCloseMenu:cM,FunctionSetHighlightedIndex:uM,FunctionSelectItem:dM,FunctionSetInputValue:fM,FunctionReset:mM});function hM(e,t){const{type:n,props:r,shiftKey:o}=t;let i;switch(n){case nM:i={isOpen:NR(r,"isOpen"),highlightedIndex:NR(r,"highlightedIndex"),selectedItem:r.items[t.index]};break;case aM:{const n=t.key,o=`${e.inputValue}${n}`,a=HR({keysSoFar:o,highlightedIndex:e.selectedItem?r.items.indexOf(e.selectedItem):-1,items:r.items,itemToString:r.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex});i={inputValue:o,...a>=0&&{selectedItem:r.items[a]}}}break;case oM:i={highlightedIndex:OR(r,e,1,t.getItemNodeFromIndex),isOpen:!0};break;case iM:i={highlightedIndex:OR(r,e,-1,t.getItemNodeFromIndex),isOpen:!0};break;case XR:case ZR:i={isOpen:NR(r,"isOpen"),highlightedIndex:NR(r,"highlightedIndex"),...e.highlightedIndex>=0&&{selectedItem:r.items[e.highlightedIndex]}};break;case YR:i={highlightedIndex:hR(1,0,r.items.length,t.getItemNodeFromIndex,!1)};break;case KR:i={highlightedIndex:hR(-1,r.items.length-1,r.items.length,t.getItemNodeFromIndex,!1)};break;case qR:case QR:i={isOpen:!1,highlightedIndex:-1};break;case JR:{const n=t.key,o=`${e.inputValue}${n}`,a=HR({keysSoFar:o,highlightedIndex:e.highlightedIndex,items:r.items,itemToString:r.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex});i={inputValue:o,...a>=0&&{highlightedIndex:a}}}break;case UR:i={highlightedIndex:pR(o?5:1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)};break;case GR:i={highlightedIndex:pR(o?-5:-1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)};break;case dM:i={selectedItem:t.selectedItem};break;default:return VR(e,t,pM)}return{...e,...i}}function gM(e){void 0===e&&(e={}),WR(e,gM);const t={...$R,...e},{items:n,scrollIntoView:o,environment:i,initialIsOpen:a,defaultIsOpen:s,itemToString:l,getA11ySelectionMessage:c,getA11yStatusMessage:u}=t,d=AR(t),[f,m]=RR(hM,d,t),{isOpen:p,highlightedIndex:h,selectedItem:g,inputValue:v}=f,b=(0,r.useRef)(null),y=(0,r.useRef)(null),x=(0,r.useRef)({}),w=(0,r.useRef)(!0),E=(0,r.useRef)(null),_=SR(t),S=(0,r.useRef)(),C=(0,r.useRef)(!0),k=TR({state:f,props:t}),P=(0,r.useCallback)((e=>x.current[_.getItemId(e)]),[_]);FR(u,[p,h,v,n],{isInitialMount:C.current,previousResultCount:S.current,items:n,environment:i,itemToString:l,...f}),FR(c,[g],{isInitialMount:C.current,previousResultCount:S.current,items:n,environment:i,itemToString:l,...f});const T=BR({menuElement:y.current,highlightedIndex:h,isOpen:p,itemRefs:x,scrollIntoView:o,getItemNodeFromIndex:P});(0,r.useEffect)((()=>(E.current=aR((e=>{e({type:fM,inputValue:""})}),500),()=>{E.current.cancel()})),[]),(0,r.useEffect)((()=>{v&&E.current(m)}),[m,v]),jR({isInitialMount:C.current,props:t,state:f}),(0,r.useEffect)((()=>{C.current?(a||s||p)&&y.current&&y.current.focus():p?y.current&&y.current.focus():i.document.activeElement===y.current&&b.current&&(w.current=!1,b.current.focus())}),[p]),(0,r.useEffect)((()=>{C.current||(S.current=n.length)}));const I=zR(p,[y,b],i,(()=>{m({type:QR})})),R=LR("getMenuProps","getToggleButtonProps");(0,r.useEffect)((()=>{C.current=!1}),[]),(0,r.useEffect)((()=>{p||(x.current={})}),[p]);const M=(0,r.useMemo)((()=>({ArrowDown(e){e.preventDefault(),m({type:oM,getItemNodeFromIndex:P,shiftKey:e.shiftKey})},ArrowUp(e){e.preventDefault(),m({type:iM,getItemNodeFromIndex:P,shiftKey:e.shiftKey})}})),[m,P]),N=(0,r.useMemo)((()=>({ArrowDown(e){e.preventDefault(),m({type:UR,getItemNodeFromIndex:P,shiftKey:e.shiftKey})},ArrowUp(e){e.preventDefault(),m({type:GR,getItemNodeFromIndex:P,shiftKey:e.shiftKey})},Home(e){e.preventDefault(),m({type:YR,getItemNodeFromIndex:P})},End(e){e.preventDefault(),m({type:KR,getItemNodeFromIndex:P})},Escape(){m({type:qR})},Enter(e){e.preventDefault(),m({type:XR})}," "(e){e.preventDefault(),m({type:ZR})}})),[m,P]),D=(0,r.useCallback)((()=>{m({type:sM})}),[m]),A=(0,r.useCallback)((()=>{m({type:cM})}),[m]),O=(0,r.useCallback)((()=>{m({type:lM})}),[m]),z=(0,r.useCallback)((e=>{m({type:uM,highlightedIndex:e})}),[m]),L=(0,r.useCallback)((e=>{m({type:dM,selectedItem:e})}),[m]),F=(0,r.useCallback)((()=>{m({type:mM})}),[m]),B=(0,r.useCallback)((e=>{m({type:fM,inputValue:e})}),[m]),j=(0,r.useCallback)((e=>({id:_.labelId,htmlFor:_.toggleButtonId,...e})),[_]),V=(0,r.useCallback)((function(e,t){let{onMouseLeave:n,refKey:r="ref",onKeyDown:o,onBlur:i,ref:a,...s}=void 0===e?{}:e,{suppressRefError:l=!1}=void 0===t?{}:t;const c=k.current.state;return R("getMenuProps",l,r,y),{[r]:lR(a,(e=>{y.current=e})),id:_.menuId,role:"listbox","aria-labelledby":_.labelId,tabIndex:-1,...c.isOpen&&c.highlightedIndex>-1&&{"aria-activedescendant":_.getItemId(c.highlightedIndex)},onMouseLeave:sR(n,(()=>{m({type:eM})})),onKeyDown:sR(o,(e=>{const t=mR(e);t&&N[t]?N[t](e):kR(t)&&m({type:JR,key:t,getItemNodeFromIndex:P})})),onBlur:sR(i,(()=>{if(!1===w.current)return void(w.current=!0);!I.current.isMouseDown&&m({type:QR})})),...s}}),[m,k,N,I,R,_,P]),H=(0,r.useCallback)((function(e,t){let{onClick:n,onKeyDown:r,refKey:o="ref",ref:i,...a}=void 0===e?{}:e,{suppressRefError:s=!1}=void 0===t?{}:t;const l=()=>{m({type:rM})},c=e=>{const t=mR(e);t&&M[t]?M[t](e):kR(t)&&m({type:aM,key:t,getItemNodeFromIndex:P})},u={[o]:lR(i,(e=>{b.current=e})),id:_.toggleButtonId,"aria-haspopup":"listbox","aria-expanded":k.current.state.isOpen,"aria-labelledby":`${_.labelId} ${_.toggleButtonId}`,...a};return a.disabled||(u.onClick=sR(n,l),u.onKeyDown=sR(r,c)),R("getToggleButtonProps",s,o,b),u}),[m,k,M,R,_,P]),$=(0,r.useCallback)((function(e){let{item:t,index:n,onMouseMove:r,onClick:o,refKey:i="ref",ref:a,disabled:s,...l}=void 0===e?{}:e;const{state:c,props:u}=k.current,d=()=>{m({type:nM,index:n})},f=CR(n,t,u.items);if(f<0)throw new Error("Pass either item or item index in getItemProps!");const p={disabled:s,role:"option","aria-selected":`${f===c.highlightedIndex}`,id:_.getItemId(f),[i]:lR(a,(e=>{e&&(x.current[_.getItemId(f)]=e)})),...l};return s||(p.onClick=sR(o,d)),p.onMouseMove=sR(r,(()=>{n!==c.highlightedIndex&&(T.current=!1,m({type:tM,index:n,disabled:s}))})),p}),[m,k,T,_]);return{getToggleButtonProps:H,getLabelProps:j,getMenuProps:V,getItemProps:$,toggleMenu:D,openMenu:O,closeMenu:A,setHighlightedIndex:z,selectItem:L,reset:F,setInputValue:B,highlightedIndex:h,isOpen:p,selectedItem:g,inputValue:v}}gM.stateChangeTypes=pM;ZI().array.isRequired,ZI().func,ZI().func,ZI().func,ZI().bool,ZI().number,ZI().number,ZI().number,ZI().bool,ZI().bool,ZI().bool,ZI().any,ZI().any,ZI().any,ZI().string,ZI().string,ZI().string,ZI().string,ZI().string,ZI().string,ZI().func,ZI().string,ZI().string,ZI().func,ZI().func,ZI().func,ZI().func,ZI().func,ZI().func,ZI().shape({addEventListener:ZI().func,removeEventListener:ZI().func,document:ZI().shape({getElementById:ZI().func,activeElement:ZI().any,body:ZI().any})});ZI().array,ZI().array,ZI().array,ZI().func,ZI().func,ZI().func,ZI().number,ZI().number,ZI().number,ZI().func,ZI().func,ZI().string,ZI().string,ZI().shape({addEventListener:ZI().func,removeEventListener:ZI().func,document:ZI().shape({getElementById:ZI().func,activeElement:ZI().any,body:ZI().any})});const vM=e=>e.__nextUnconstrainedWidth?"":Ps(yv,"{min-width:130px;}",""),bM=bs(Ov,{target:"eswuck60"})(vM,";"),yM=e=>e?.name,xM=({selectedItem:e},{type:t,changes:n,props:{items:r}})=>{switch(t){case gM.stateChangeTypes.ToggleButtonKeyDownArrowDown:return{selectedItem:r[e?Math.min(r.indexOf(e)+1,r.length-1):0]};case gM.stateChangeTypes.ToggleButtonKeyDownArrowUp:return{selectedItem:r[e?Math.max(r.indexOf(e)-1,0):r.length-1]};default:return n}};function wM(e){const{__next40pxDefaultSize:t=!1,__nextUnconstrainedWidth:n=!1,className:o,hideLabelFromVision:i,label:a,describedBy:s,options:l,onChange:d,size:f="default",value:m,onMouseOver:p,onMouseOut:h,onFocus:g,onBlur:v,__experimentalShowSelectedHint:b=!1}=Nv(e),{getLabelProps:y,getToggleButtonProps:x,getMenuProps:w,getItemProps:E,isOpen:_,highlightedIndex:S,selectedItem:C}=gM({initialSelectedItem:l[0],items:l,itemToString:yM,onSelectedItemChange:d,...null!=m?{selectedItem:m}:void 0,stateReducer:xM}),[k,P]=(0,Uo.useState)(!1);n||qo()("Constrained width styles for wp.components.CustomSelectControl",{since:"6.1",version:"6.4",hint:"Set the `__nextUnconstrainedWidth` prop to true to start opting into the new styles, which will become the default in a future version"});const T=w({className:"components-custom-select-control__menu","aria-hidden":!_}),I=(0,Uo.useCallback)((e=>{e.stopPropagation(),T?.onKeyDown?.(e)}),[T]);return T["aria-activedescendant"]?.startsWith("downshift-null")&&delete T["aria-activedescendant"],(0,r.createElement)("div",{className:c()("components-custom-select-control",o)},i?(0,r.createElement)(ws,{as:"label",...y()},a):(0,r.createElement)(Qb,{...y({className:"components-custom-select-control__label"})},a),(0,r.createElement)(bM,{__next40pxDefaultSize:t,__nextUnconstrainedWidth:n,isFocused:_||k,__unstableInputWidth:n?void 0:"auto",labelPosition:n?void 0:"top",size:f,suffix:(0,r.createElement)(UE,null)},(0,r.createElement)(jE,{onMouseOver:p,onMouseOut:h,as:"button",onFocus:function(e){P(!0),g?.(e)},onBlur:function(e){P(!1),v?.(e)},selectSize:f,__next40pxDefaultSize:t,...x({"aria-label":a,"aria-labelledby":void 0,className:"components-custom-select-control__button",describedBy:s||(C?(0,u.sprintf)((0,u.__)("Currently selected: %s"),C.name):(0,u.__)("No selection"))})},yM(C),b&&C.__experimentalHint&&(0,r.createElement)("span",{className:"components-custom-select-control__hint"},C.__experimentalHint))),(0,r.createElement)("ul",{...T,onKeyDown:I},_&&l.map(((e,n)=>(0,r.createElement)("li",{...E({item:e,index:n,key:e.key,className:c()(e.className,"components-custom-select-control__item",{"is-highlighted":n===S,"has-hint":!!e.__experimentalHint,"is-next-40px-default-size":t}),style:e.style})},e.name,e.__experimentalHint&&(0,r.createElement)("span",{className:"components-custom-select-control__item-hint"},e.__experimentalHint),e===C&&(0,r.createElement)($E,{icon:DS,className:"components-custom-select-control__item-icon"}))))))}function EM(e){return(0,r.createElement)(wM,{...e,__experimentalShowSelectedHint:!1})}function _M(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function SM(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function CM(e){SM(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function kM(e,t){SM(2,arguments);var n=CM(e),r=_M(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var o=n.getDate(),i=new Date(n.getTime());return i.setMonth(n.getMonth()+r+1,0),o>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}var PM,TM,IM={};function RM(){return IM}function MM(e,t){var n,r,o,i,a,s,l,c;SM(1,arguments);var u=RM(),d=_M(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=CM(e),m=f.getDay(),p=(m<d?7:0)+m-d;return f.setDate(f.getDate()-p),f.setHours(0,0,0,0),f}function NM(e,t){return SM(2,arguments),function(e,t){SM(2,arguments);var n=CM(e),r=_M(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}(e,7*_M(t))}function DM(e,t){return SM(2,arguments),kM(e,12*_M(t))}function AM(e){SM(1,arguments);var t=CM(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function OM(e,t){var n;SM(1,arguments);var r=e||{},o=CM(r.start),i=CM(r.end).getTime();if(!(o.getTime()<=i))throw new RangeError("Invalid interval");var a=[],s=o;s.setHours(0,0,0,0);var l=Number(null!==(n=null==t?void 0:t.step)&&void 0!==n?n:1);if(l<1||isNaN(l))throw new RangeError("`options.step` must be a number greater than 1");for(;s.getTime()<=i;)a.push(CM(s)),s.setDate(s.getDate()+l),s.setHours(0,0,0,0);return a}function zM(e){SM(1,arguments);var t=CM(e);return t.setDate(1),t.setHours(0,0,0,0),t}function LM(e,t){var n,r,o,i,a,s,l,c;SM(1,arguments);var u=RM(),d=_M(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=CM(e),m=f.getDay(),p=6+(m<d?-7:0)-(m-d);return f.setDate(f.getDate()+p),f.setHours(23,59,59,999),f}function FM(e,t){SM(2,arguments);var n=CM(e),r=CM(t);return n.getTime()===r.getTime()}function BM(e,t){SM(2,arguments);var n=CM(e),r=_M(t),o=n.getFullYear(),i=n.getDate(),a=new Date(0);a.setFullYear(o,r,15),a.setHours(0,0,0,0);var s=function(e){SM(1,arguments);var t=CM(e),n=t.getFullYear(),r=t.getMonth(),o=new Date(0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}(a);return n.setMonth(r,Math.min(i,s)),n}function jM(){return function(e){SM(1,arguments);var t=CM(e);return t.setHours(0,0,0,0),t}(Date.now())}!function(e){e[e.JANUARY=0]="JANUARY",e[e.FEBRUARY=1]="FEBRUARY",e[e.MARCH=2]="MARCH",e[e.APRIL=3]="APRIL",e[e.MAY=4]="MAY",e[e.JUNE=5]="JUNE",e[e.JULY=6]="JULY",e[e.AUGUST=7]="AUGUST",e[e.SEPTEMBER=8]="SEPTEMBER",e[e.OCTOBER=9]="OCTOBER",e[e.NOVEMBER=10]="NOVEMBER",e[e.DECEMBER=11]="DECEMBER"}(PM||(PM={})),function(e){e[e.SUNDAY=0]="SUNDAY",e[e.MONDAY=1]="MONDAY",e[e.TUESDAY=2]="TUESDAY",e[e.WEDNESDAY=3]="WEDNESDAY",e[e.THURSDAY=4]="THURSDAY",e[e.FRIDAY=5]="FRIDAY",e[e.SATURDAY=6]="SATURDAY"}(TM||(TM={}));var VM=function(e,t,n){return(FM(e,t)||function(e,t){SM(2,arguments);var n=CM(e),r=CM(t);return n.getTime()>r.getTime()}(e,t))&&(FM(e,n)||function(e,t){SM(2,arguments);var n=CM(e),r=CM(t);return n.getTime()<r.getTime()}(e,n))},HM=function(e){return function(e,t){if(SM(2,arguments),"object"!=typeof t||null===t)throw new RangeError("values parameter must be an object");var n=CM(e);return isNaN(n.getTime())?new Date(NaN):(null!=t.year&&n.setFullYear(t.year),null!=t.month&&(n=BM(n,t.month)),null!=t.date&&n.setDate(_M(t.date)),null!=t.hours&&n.setHours(_M(t.hours)),null!=t.minutes&&n.setMinutes(_M(t.minutes)),null!=t.seconds&&n.setSeconds(_M(t.seconds)),null!=t.milliseconds&&n.setMilliseconds(_M(t.milliseconds)),n)}(e,{hours:0,minutes:0,seconds:0,milliseconds:0})},$M=function(e){var t=void 0===e?{}:e,n=t.weekStartsOn,o=void 0===n?TM.SUNDAY:n,i=t.viewing,a=void 0===i?new Date:i,s=t.selected,l=void 0===s?[]:s,c=t.numberOfMonths,u=void 0===c?1:c,d=(0,r.useState)(a),f=d[0],m=d[1],p=(0,r.useCallback)((function(){return m(jM())}),[m]),h=(0,r.useCallback)((function(e){return m((function(t){return BM(t,e)}))}),[]),g=(0,r.useCallback)((function(){return m((function(e){return function(e,t){return SM(2,arguments),kM(e,-_M(t))}(e,1)}))}),[]),v=(0,r.useCallback)((function(){return m((function(e){return kM(e,1)}))}),[]),b=(0,r.useCallback)((function(e){return m((function(t){return function(e,t){SM(2,arguments);var n=CM(e),r=_M(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}(t,e)}))}),[]),y=(0,r.useCallback)((function(){return m((function(e){return function(e,t){return SM(2,arguments),DM(e,-_M(t))}(e,1)}))}),[]),x=(0,r.useCallback)((function(){return m((function(e){return DM(e,1)}))}),[]),w=(0,r.useState)(l.map(HM)),E=w[0],_=w[1],S=(0,r.useCallback)((function(e){return E.findIndex((function(t){return FM(t,e)}))>-1}),[E]),C=(0,r.useCallback)((function(e,t){_(t?Array.isArray(e)?e:[e]:function(t){return t.concat(Array.isArray(e)?e:[e])})}),[]),k=(0,r.useCallback)((function(e){return _((function(t){return Array.isArray(e)?t.filter((function(t){return!e.map((function(e){return e.getTime()})).includes(t.getTime())})):t.filter((function(t){return!FM(t,e)}))}))}),[]),P=(0,r.useCallback)((function(e,t){return S(e)?k(e):C(e,t)}),[k,S,C]),T=(0,r.useCallback)((function(e,t,n){_(n?OM({start:e,end:t}):function(n){return n.concat(OM({start:e,end:t}))})}),[]),I=(0,r.useCallback)((function(e,t){_((function(n){return n.filter((function(n){return!OM({start:e,end:t}).map((function(e){return e.getTime()})).includes(n.getTime())}))}))}),[]),R=(0,r.useMemo)((function(){return function(e){SM(1,arguments);var t=e||{},n=CM(t.start),r=CM(t.end).getTime(),o=[];if(!(n.getTime()<=r))throw new RangeError("Invalid interval");var i=n;for(i.setHours(0,0,0,0),i.setDate(1);i.getTime()<=r;)o.push(CM(i)),i.setMonth(i.getMonth()+1);return o}({start:zM(f),end:AM(kM(f,u-1))}).map((function(e){return function(e,t){SM(1,arguments);var n=e||{},r=CM(n.start),o=CM(n.end),i=o.getTime();if(!(r.getTime()<=i))throw new RangeError("Invalid interval");var a=MM(r,t),s=MM(o,t);a.setHours(15),s.setHours(15),i=s.getTime();for(var l=[],c=a;c.getTime()<=i;)c.setHours(0),l.push(CM(c)),(c=NM(c,1)).setHours(15);return l}({start:zM(e),end:AM(e)},{weekStartsOn:o}).map((function(e){return OM({start:MM(e,{weekStartsOn:o}),end:LM(e,{weekStartsOn:o})})}))}))}),[f,o,u]);return{clearTime:HM,inRange:VM,viewing:f,setViewing:m,viewToday:p,viewMonth:h,viewPreviousMonth:g,viewNextMonth:v,viewYear:b,viewPreviousYear:y,viewNextYear:x,selected:E,setSelected:_,clearSelected:function(){return _([])},isSelected:S,select:C,deselect:k,toggle:P,selectRange:T,deselectRange:I,calendar:R}};function WM(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function UM(e){return UM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},UM(e)}function GM(e){WM(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===UM(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function qM(e){WM(1,arguments);var t=GM(e);return t.setHours(0,0,0,0),t}function YM(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function KM(e,t){WM(2,arguments);var n=GM(e),r=YM(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var o=n.getDate(),i=new Date(n.getTime());return i.setMonth(n.getMonth()+r+1,0),o>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}function XM(e,t){return WM(2,arguments),KM(e,-YM(t))}function ZM(e){return ZM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ZM(e)}function JM(e){if(WM(1,arguments),!function(e){return WM(1,arguments),e instanceof Date||"object"===ZM(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=GM(e);return!isNaN(Number(t))}function QM(e,t){return WM(2,arguments),function(e,t){WM(2,arguments);var n=GM(e).getTime(),r=YM(t);return new Date(n+r)}(e,-YM(t))}function eN(e){WM(1,arguments);var t=GM(e),n=t.getUTCDay(),r=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-r),t.setUTCHours(0,0,0,0),t}function tN(e){WM(1,arguments);var t=GM(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=eN(r),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var a=eN(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function nN(e){WM(1,arguments);var t=GM(e),n=eN(t).getTime()-function(e){WM(1,arguments);var t=tN(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),eN(n)}(t).getTime();return Math.round(n/6048e5)+1}var rN={};function oN(){return rN}function iN(e,t){var n,r,o,i,a,s,l,c;WM(1,arguments);var u=oN(),d=YM(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=GM(e),m=f.getUTCDay(),p=(m<d?7:0)+m-d;return f.setUTCDate(f.getUTCDate()-p),f.setUTCHours(0,0,0,0),f}function aN(e,t){var n,r,o,i,a,s,l,c;WM(1,arguments);var u=GM(e),d=u.getUTCFullYear(),f=oN(),m=YM(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:f.firstWeekContainsDate)&&void 0!==r?r:null===(l=f.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,m),p.setUTCHours(0,0,0,0);var h=iN(p,t),g=new Date(0);g.setUTCFullYear(d,0,m),g.setUTCHours(0,0,0,0);var v=iN(g,t);return u.getTime()>=h.getTime()?d+1:u.getTime()>=v.getTime()?d:d-1}function sN(e,t){WM(1,arguments);var n=GM(e),r=iN(n,t).getTime()-function(e,t){var n,r,o,i,a,s,l,c;WM(1,arguments);var u=oN(),d=YM(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),f=aN(e,t),m=new Date(0);return m.setUTCFullYear(f,0,d),m.setUTCHours(0,0,0,0),iN(m,t)}(n,t).getTime();return Math.round(r/6048e5)+1}function lN(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var cN={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return lN("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):lN(n+1,2)},d:function(e,t){return lN(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return lN(e.getUTCHours()%12||12,t.length)},H:function(e,t){return lN(e.getUTCHours(),t.length)},m:function(e,t){return lN(e.getUTCMinutes(),t.length)},s:function(e,t){return lN(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return lN(Math.floor(r*Math.pow(10,n-3)),t.length)}};const uN=cN;var dN="midnight",fN="noon",mN="morning",pN="afternoon",hN="evening",gN="night",vN={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return uN.y(e,t)},Y:function(e,t,n,r){var o=aN(e,r),i=o>0?o:1-o;return"YY"===t?lN(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):lN(i,t.length)},R:function(e,t){return lN(tN(e),t.length)},u:function(e,t){return lN(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return lN(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return lN(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return uN.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return lN(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=sN(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):lN(o,t.length)},I:function(e,t,n){var r=nN(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):lN(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):uN.d(e,t)},D:function(e,t,n){var r=function(e){WM(1,arguments);var t=GM(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):lN(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return lN(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return lN(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return lN(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?fN:0===o?dN:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?hN:o>=12?pN:o>=4?mN:gN,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return uN.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):uN.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):lN(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):lN(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):uN.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):uN.s(e,t)},S:function(e,t){return uN.S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return yN(o);case"XXXX":case"XX":return xN(o);default:return xN(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return yN(o);case"xxxx":case"xx":return xN(o);default:return xN(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+bN(o,":");default:return"GMT"+xN(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+bN(o,":");default:return"GMT"+xN(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e;return lN(Math.floor(o.getTime()/1e3),t.length)},T:function(e,t,n,r){return lN((r._originalDate||e).getTime(),t.length)}};function bN(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t||"";return n+String(o)+a+lN(i,2)}function yN(e,t){return e%60==0?(e>0?"-":"+")+lN(Math.abs(e)/60,2):xN(e,t)}function xN(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+lN(Math.floor(o/60),2)+n+lN(o%60,2)}const wN=vN;var EN=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},_N=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},SN={p:_N,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return EN(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",EN(o,t)).replace("{{time}}",_N(i,t))}};const CN=SN;var kN=["D","DD"],PN=["YY","YYYY"];function TN(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var IN={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};const RN=function(e,t,n){var r,o=IN[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function MN(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const NN={date:MN({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:MN({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:MN({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};var DN={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};const AN=function(e,t,n,r){return DN[e]};function ON(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var a=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var zN={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ON({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:ON({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:ON({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:ON({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:ON({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};const LN=zN;function FN(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var a,s=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return}(l,(function(e){return e.test(s)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n;return}(l,(function(e){return e.test(s)}));return a=e.valueCallback?e.valueCallback(c):c,{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(s.length)}}}var BN,jN={ordinalNumber:(BN={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(BN.matchPattern);if(!n)return null;var r=n[0],o=e.match(BN.parsePattern);if(!o)return null;var i=BN.valueCallback?BN.valueCallback(o[0]):o[0];return{value:i=t.valueCallback?t.valueCallback(i):i,rest:e.slice(r.length)}}),era:FN({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:FN({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:FN({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:FN({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:FN({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};const VN={code:"en-US",formatDistance:RN,formatLong:NN,formatRelative:AN,localize:LN,match:jN,options:{weekStartsOn:0,firstWeekContainsDate:1}};var HN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$N=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,WN=/^'([^]*?)'?$/,UN=/''/g,GN=/[a-zA-Z]/;function qN(e,t,n){var r,o,i,a,s,l,c,u,d,f,m,p,h,g,v,b,y,x;WM(2,arguments);var w=String(t),E=oN(),_=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:E.locale)&&void 0!==r?r:VN,S=YM(null!==(i=null!==(a=null!==(s=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n||null===(c=n.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==s?s:E.firstWeekContainsDate)&&void 0!==a?a:null===(d=E.locale)||void 0===d||null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==i?i:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=YM(null!==(m=null!==(p=null!==(h=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(v=n.locale)||void 0===v||null===(b=v.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==h?h:E.weekStartsOn)&&void 0!==p?p:null===(y=E.locale)||void 0===y||null===(x=y.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==m?m:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!_.localize)throw new RangeError("locale must contain localize property");if(!_.formatLong)throw new RangeError("locale must contain formatLong property");var k=GM(e);if(!JM(k))throw new RangeError("Invalid time value");var P=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}(k),T=QM(k,P),I={firstWeekContainsDate:S,weekStartsOn:C,locale:_,_originalDate:k},R=w.match($N).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,CN[t])(e,_.formatLong):e})).join("").match(HN).map((function(r){if("''"===r)return"'";var o=r[0];if("'"===o)return function(e){var t=e.match(WN);if(!t)return e;return t[1].replace(UN,"'")}(r);var i=wN[o];if(i)return null!=n&&n.useAdditionalWeekYearTokens||!function(e){return-1!==PN.indexOf(e)}(r)||TN(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!function(e){return-1!==kN.indexOf(e)}(r)||TN(r,t,String(e)),i(T,r,_.localize,I);if(o.match(GN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("");return R}function YN(e,t){WM(2,arguments);var n=GM(e),r=GM(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function KN(e,t){WM(2,arguments);var n=GM(e),r=GM(t);return n.getTime()===r.getTime()}function XN(e,t){WM(2,arguments);var n=qM(e),r=qM(t);return n.getTime()===r.getTime()}function ZN(e,t){WM(2,arguments);var n=GM(e),r=YM(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}function JN(e,t){return WM(2,arguments),ZN(e,7*YM(t))}const QN=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})),eD=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})),tD=window.wp.date;const nD=bs("div",{target:"e105ri6r5"})({name:"1khn195",styles:"box-sizing:border-box"}),rD=bs(Py,{target:"e105ri6r4"})("margin-bottom:",Ah(4),";"),oD=bs($S,{target:"e105ri6r3"})("font-size:",Xg.fontSize,";font-weight:",Xg.fontWeight,";strong{font-weight:",Xg.fontWeightHeading,";}"),iD=bs("div",{target:"e105ri6r2"})("column-gap:",Ah(2),";display:grid;grid-template-columns:0.5fr repeat( 5, 1fr ) 0.5fr;justify-items:center;row-gap:",Ah(2),";"),aD=bs("div",{target:"e105ri6r1"})("color:",Ds.gray[700],";font-size:",Xg.fontSize,";line-height:",Xg.fontLineHeightBase,";&:nth-of-type( 1 ){justify-self:start;}&:nth-of-type( 7 ){justify-self:end;}"),sD=bs(my,{shouldForwardProp:e=>!["column","isSelected","isToday","hasEvents"].includes(e),target:"e105ri6r0"})("grid-column:",(e=>e.column),";position:relative;justify-content:center;",(e=>1===e.column&&"\n\t\tjustify-self: start;\n\t\t")," ",(e=>7===e.column&&"\n\t\tjustify-self: end;\n\t\t")," ",(e=>e.disabled&&"\n\t\tpointer-events: none;\n\t\t")," &&&{border-radius:100%;height:",Ah(8),";width:",Ah(8),";",(e=>e.isSelected&&`\n\t\t\tbackground: ${Ds.theme.accent};\n\t\t\tcolor: ${Ds.white};\n\t\t\t`)," ",(e=>!e.isSelected&&e.isToday&&`\n\t\t\tbackground: ${Ds.gray[200]};\n\t\t\t`),";}",(e=>e.hasEvents&&`\n\t\t::before {\n\t\t\tbackground: ${e.isSelected?Ds.white:Ds.theme.accent};\n\t\t\tborder-radius: 2px;\n\t\t\tbottom: 2px;\n\t\t\tcontent: " ";\n\t\t\theight: 4px;\n\t\t\tleft: 50%;\n\t\t\tmargin-left: -2px;\n\t\t\tposition: absolute;\n\t\t\twidth: 4px;\n\t\t}\n\t\t`),";");function lD(e){return"string"==typeof e?new Date(e):GM(e)}const cD="yyyy-MM-dd'T'HH:mm:ss";function uD({day:e,column:t,isSelected:n,isFocusable:o,isFocusAllowed:i,isToday:a,isInvalid:s,numEvents:l,onClick:c,onKeyDown:u}){const d=(0,Uo.useRef)();return(0,Uo.useEffect)((()=>{d.current&&o&&i&&d.current.focus()}),[o]),(0,r.createElement)(sD,{ref:d,className:"components-datetime__date__day",disabled:s,tabIndex:o?0:-1,"aria-label":dD(e,n,l),column:t,isSelected:n,isToday:a,hasEvents:l>0,onClick:c,onKeyDown:u},(0,tD.dateI18n)("j",e,-e.getTimezoneOffset()))}function dD(e,t,n){const{formats:r}=(0,tD.getSettings)(),o=(0,tD.dateI18n)(r.date,e,-e.getTimezoneOffset());return t&&n>0?(0,u.sprintf)((0,u._n)("%1$s. Selected. There is %2$d event","%1$s. Selected. There are %2$d events",n),o,n):t?(0,u.sprintf)((0,u.__)("%1$s. Selected"),o):n>0?(0,u.sprintf)((0,u._n)("%1$s. There is %2$d event","%1$s. There are %2$d events",n),o,n):o}const fD=function({currentDate:e,onChange:t,events:n=[],isInvalidDate:o,onMonthPreviewed:i,startOfWeek:a=0}){const s=e?lD(e):new Date,{calendar:l,viewing:c,setSelected:d,setViewing:f,isSelected:m,viewPreviousMonth:p,viewNextMonth:h}=$M({selected:[qM(s)],viewing:qM(s),weekStartsOn:a}),[g,v]=(0,Uo.useState)(qM(s)),[b,y]=(0,Uo.useState)(!1),[x,w]=(0,Uo.useState)(e);return e!==x&&(w(e),d([qM(s)]),f(qM(s)),v(qM(s))),(0,r.createElement)(nD,{className:"components-datetime__date",role:"application","aria-label":(0,u.__)("Calendar")},(0,r.createElement)(rD,null,(0,r.createElement)(my,{icon:(0,u.isRTL)()?QN:eD,variant:"tertiary","aria-label":(0,u.__)("View previous month"),onClick:()=>{p(),v(XM(g,1)),i?.(qN(XM(c,1),cD))}}),(0,r.createElement)(oD,{level:3},(0,r.createElement)("strong",null,(0,tD.dateI18n)("F",c,-c.getTimezoneOffset()))," ",(0,tD.dateI18n)("Y",c,-c.getTimezoneOffset())),(0,r.createElement)(my,{icon:(0,u.isRTL)()?eD:QN,variant:"tertiary","aria-label":(0,u.__)("View next month"),onClick:()=>{h(),v(KM(g,1)),i?.(qN(KM(c,1),cD))}})),(0,r.createElement)(iD,{onFocus:()=>y(!0),onBlur:()=>y(!1)},l[0][0].map((e=>(0,r.createElement)(aD,{key:e.toString()},(0,tD.dateI18n)("D",e,-e.getTimezoneOffset())))),l[0].map((e=>e.map(((e,a)=>YN(e,c)?(0,r.createElement)(uD,{key:e.toString(),day:e,column:a+1,isSelected:m(e),isFocusable:KN(e,g),isFocusAllowed:b,isToday:XN(e,new Date),isInvalid:!!o&&o(e),numEvents:n.filter((t=>XN(t.date,e))).length,onClick:()=>{d([e]),v(e),t?.(qN(new Date(e.getFullYear(),e.getMonth(),e.getDate(),s.getHours(),s.getMinutes(),s.getSeconds(),s.getMilliseconds()),cD))},onKeyDown:t=>{let n;"ArrowLeft"===t.key&&(n=ZN(e,(0,u.isRTL)()?1:-1)),"ArrowRight"===t.key&&(n=ZN(e,(0,u.isRTL)()?-1:1)),"ArrowUp"===t.key&&(n=function(e,t){return WM(2,arguments),JN(e,-YM(t))}(e,1)),"ArrowDown"===t.key&&(n=JN(e,1)),"PageUp"===t.key&&(n=XM(e,1)),"PageDown"===t.key&&(n=KM(e,1)),"Home"===t.key&&(n=function(e,t){var n,r,o,i,a,s,l,c;WM(1,arguments);var u=oN(),d=YM(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=GM(e),m=f.getDay(),p=(m<d?7:0)+m-d;return f.setDate(f.getDate()-p),f.setHours(0,0,0,0),f}(e)),"End"===t.key&&(n=qM(function(e,t){var n,r,o,i,a,s,l,c;WM(1,arguments);var u=oN(),d=YM(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=GM(e),m=f.getDay(),p=6+(m<d?-7:0)-(m-d);return f.setDate(f.getDate()+p),f.setHours(23,59,59,999),f}(e))),n&&(t.preventDefault(),v(n),YN(n,c)||(f(n),i?.(qN(n,cD))))}}):null))))))};function mD(e){WM(1,arguments);var t=GM(e);return t.setSeconds(0,0),t}function pD(e,t){WM(2,arguments);var n=GM(e),r=YM(t),o=n.getFullYear(),i=n.getDate(),a=new Date(0);a.setFullYear(o,r,15),a.setHours(0,0,0,0);var s=function(e){WM(1,arguments);var t=GM(e),n=t.getFullYear(),r=t.getMonth(),o=new Date(0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}(a);return n.setMonth(r,Math.min(i,s)),n}function hD(e){return hD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hD(e)}const gD=bs("div",{target:"evcr2319"})("box-sizing:border-box;font-size:",Xg.fontSize,";"),vD=bs("fieldset",{target:"evcr2318"})("border:0;margin:0 0 ",Ah(4)," 0;padding:0;&:last-child{margin-bottom:0;}"),bD=bs("div",{target:"evcr2317"})({name:"pd0mhc",styles:"direction:ltr;display:flex"}),yD=Ps("&&& ",Ev,"{padding-left:",Ah(2),";padding-right:",Ah(2),";text-align:center;}",""),xD=bs(Ry,{target:"evcr2316"})(yD," width:",Ah(9),";&&& ",Ev,"{padding-right:0;}&&& ",kv,"{border-right:0;border-top-right-radius:0;border-bottom-right-radius:0;}"),wD=bs("span",{target:"evcr2315"})("border-top:",Xg.borderWidth," solid ",Ds.gray[700],";border-bottom:",Xg.borderWidth," solid ",Ds.gray[700],";line-height:calc(\n\t\t",Xg.controlHeight," - ",Xg.borderWidth," * 2\n\t);display:inline-block;"),ED=bs(Ry,{target:"evcr2314"})(yD," width:",Ah(9),";&&& ",Ev,"{padding-left:0;}&&& ",kv,"{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0;}"),_D=bs("div",{target:"evcr2313"})({name:"1ff36h2",styles:"flex-grow:1"}),SD=bs(Ry,{target:"evcr2312"})(yD," width:",Ah(9),";"),CD=bs(Ry,{target:"evcr2311"})(yD," width:",Ah(14),";"),kD=bs("div",{target:"evcr2310"})({name:"ebu3jh",styles:"text-decoration:underline dotted"}),PD=()=>{const{timezone:e}=(0,tD.getSettings)(),t=(new Date).getTimezoneOffset()/60*-1;if(Number(e.offset)===t)return null;const n=Number(e.offset)>=0?"+":"",o=""!==e.abbr&&isNaN(Number(e.abbr))?e.abbr:`UTC${n}${e.offsetFormatted}`,i=e.string.replace("_"," "),a="UTC"===e.string?(0,u.__)("Coordinated Universal Time"):`(${o}) ${i}`;return 0===i.trim().length?(0,r.createElement)(kD,{className:"components-datetime__timezone"},o):(0,r.createElement)(ri,{placement:"top",text:a},(0,r.createElement)(kD,{className:"components-datetime__timezone"},o))};function TD(e,t){return t?(e%12+12)%24:e%12}function ID(e){return(t,n)=>{const r={...t};return n.type!==Db&&n.type!==Vb&&n.type!==Bb||void 0!==r.value&&(r.value=r.value.toString().padStart(e,"0")),r}}const RD=function({is12Hour:e,currentTime:t,onChange:n}){const[o,i]=(0,Uo.useState)((()=>t?mD(lD(t)):new Date));(0,Uo.useEffect)((()=>{i(t?mD(lD(t)):new Date)}),[t]);const{day:a,month:s,year:l,minutes:c,hours:d,am:f}=(0,Uo.useMemo)((()=>({day:qN(o,"dd"),month:qN(o,"MM"),year:qN(o,"yyyy"),minutes:qN(o,"mm"),hours:qN(o,e?"hh":"HH"),am:qN(o,"a")})),[o,e]),m=t=>(r,{event:a})=>{var s;const l=null!==(s=a.target?.ownerDocument.defaultView?.HTMLInputElement)&&void 0!==s?s:HTMLInputElement;if(!(a.target instanceof l))return;if(!a.target.validity.valid)return;let c=Number(r);"hours"===t&&e&&(c=TD(c,"PM"===f));const u=function(e,t){if(WM(2,arguments),"object"!==hD(t)||null===t)throw new RangeError("values parameter must be an object");var n=GM(e);return isNaN(n.getTime())?new Date(NaN):(null!=t.year&&n.setFullYear(t.year),null!=t.month&&(n=pD(n,t.month)),null!=t.date&&n.setDate(YM(t.date)),null!=t.hours&&n.setHours(YM(t.hours)),null!=t.minutes&&n.setMinutes(YM(t.minutes)),null!=t.seconds&&n.setSeconds(YM(t.seconds)),null!=t.milliseconds&&n.setMilliseconds(YM(t.milliseconds)),n)}(o,{[t]:c});i(u),n?.(qN(u,cD))};function p(e){return()=>{if(f===e)return;const t=parseInt(d,10),r=function(e,t){WM(2,arguments);var n=GM(e),r=YM(t);return n.setHours(r),n}(o,TD(t,"PM"===e));i(r),n?.(qN(r,cD))}}const h=(0,r.createElement)(SD,{className:"components-datetime__time-field components-datetime__time-field-day",label:(0,u.__)("Day"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:a,step:1,min:1,max:31,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("date")}),g=(0,r.createElement)(_D,null,(0,r.createElement)(YE,{className:"components-datetime__time-field components-datetime__time-field-month",label:(0,u.__)("Month"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:s,options:[{value:"01",label:(0,u.__)("January")},{value:"02",label:(0,u.__)("February")},{value:"03",label:(0,u.__)("March")},{value:"04",label:(0,u.__)("April")},{value:"05",label:(0,u.__)("May")},{value:"06",label:(0,u.__)("June")},{value:"07",label:(0,u.__)("July")},{value:"08",label:(0,u.__)("August")},{value:"09",label:(0,u.__)("September")},{value:"10",label:(0,u.__)("October")},{value:"11",label:(0,u.__)("November")},{value:"12",label:(0,u.__)("December")}],onChange:e=>{const t=pD(o,Number(e)-1);i(t),n?.(qN(t,cD))}}));return(0,r.createElement)(gD,{className:"components-datetime__time"},(0,r.createElement)(vD,null,(0,r.createElement)(iy.VisualLabel,{as:"legend",className:"components-datetime__time-legend"},(0,u.__)("Time")),(0,r.createElement)(Py,{className:"components-datetime__time-wrapper"},(0,r.createElement)(bD,{className:"components-datetime__time-field components-datetime__time-field-time"},(0,r.createElement)(xD,{className:"components-datetime__time-field-hours-input",label:(0,u.__)("Hours"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:d,step:1,min:e?1:0,max:e?12:23,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("hours"),__unstableStateReducer:ID(2)}),(0,r.createElement)(wD,{className:"components-datetime__time-separator","aria-hidden":"true"},":"),(0,r.createElement)(ED,{className:"components-datetime__time-field-minutes-input",label:(0,u.__)("Minutes"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:c,step:1,min:0,max:59,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("minutes"),__unstableStateReducer:ID(2)})),e&&(0,r.createElement)(Ok,{className:"components-datetime__time-field components-datetime__time-field-am-pm"},(0,r.createElement)(my,{className:"components-datetime__time-am-button",variant:"AM"===f?"primary":"secondary",__next40pxDefaultSize:!0,onClick:p("AM")},(0,u.__)("AM")),(0,r.createElement)(my,{className:"components-datetime__time-pm-button",variant:"PM"===f?"primary":"secondary",__next40pxDefaultSize:!0,onClick:p("PM")},(0,u.__)("PM"))),(0,r.createElement)(tg,null),(0,r.createElement)(PD,null))),(0,r.createElement)(vD,null,(0,r.createElement)(iy.VisualLabel,{as:"legend",className:"components-datetime__time-legend"},(0,u.__)("Date")),(0,r.createElement)(Py,{className:"components-datetime__time-wrapper"},e?(0,r.createElement)(r.Fragment,null,g,h):(0,r.createElement)(r.Fragment,null,h,g),(0,r.createElement)(CD,{className:"components-datetime__time-field components-datetime__time-field-year",label:(0,u.__)("Year"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:l,step:1,min:1,max:9999,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("year"),__unstableStateReducer:ID(4)}))))};const MD=bs(jS,{target:"e1p5onf00"})({name:"1khn195",styles:"box-sizing:border-box"}),ND=()=>{};const DD=(0,Uo.forwardRef)((function({currentDate:e,is12Hour:t,isInvalidDate:n,onMonthPreviewed:o=ND,onChange:i,events:a,startOfWeek:s},l){return(0,r.createElement)(MD,{ref:l,className:"components-datetime",spacing:4},(0,r.createElement)(r.Fragment,null,(0,r.createElement)(RD,{currentTime:e,onChange:i,is12Hour:t}),(0,r.createElement)(fD,{currentDate:e,onChange:i,isInvalidDate:n,events:a,onMonthPreviewed:o,startOfWeek:s})))})),AD=DD,OD=[{name:(0,u._x)("None","Size of a UI element"),slug:"none"},{name:(0,u._x)("Small","Size of a UI element"),slug:"small"},{name:(0,u._x)("Medium","Size of a UI element"),slug:"medium"},{name:(0,u._x)("Large","Size of a UI element"),slug:"large"},{name:(0,u._x)("Extra Large","Size of a UI element"),slug:"xlarge"}];const zD=function(e){const{__next40pxDefaultSize:t=!1,label:n,value:o,sizes:i=OD,icon:a,onChange:s,className:l=""}=e,d=(0,r.createElement)(r.Fragment,null,a&&(0,r.createElement)(uy,{icon:a}),n);return(0,r.createElement)(YE,{__next40pxDefaultSize:t,className:c()(l,"block-editor-dimension-control"),label:d,hideLabelFromVision:!1,value:o,onChange:e=>{const t=((e,t)=>e.find((e=>t===e.slug)))(i,e);t&&o!==t.slug?"function"==typeof s&&s(t.slug):s?.(void 0)},options:(e=>{const t=e.map((({name:e,slug:t})=>({label:e,value:t})));return[{label:(0,u.__)("Default"),value:""},...t]})(i)})};const LD={name:"u2jump",styles:"position:relative;pointer-events:none;&::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;}*{pointer-events:none;}"},FD=(0,Uo.createContext)(!1),{Consumer:BD,Provider:jD}=FD;function VD({className:e,children:t,isDisabled:n=!0,...o}){const i=ns();return(0,r.createElement)(jD,{value:n},(0,r.createElement)("div",{inert:n?"true":void 0,className:n?i(LD,e,"components-disabled"):void 0,...o},t))}VD.Context=FD,VD.Consumer=BD;const HD=VD,$D=(0,Uo.forwardRef)((({visible:e,children:t,...n},o)=>{const i=Xt({open:e});return(0,r.createElement)(Zn,{store:i,ref:o,...n},t)})),WD="is-dragging-components-draggable";const UD=function({children:e,onDragStart:t,onDragOver:n,onDragEnd:o,appendToOwnerDocument:i=!1,cloneClassname:a,elementId:s,transferData:l,__experimentalTransferDataType:c="text",__experimentalDragComponent:u}){const f=(0,Uo.useRef)(null),m=(0,Uo.useRef)((()=>{}));return(0,Uo.useEffect)((()=>()=>{m.current()}),[]),(0,r.createElement)(r.Fragment,null,e({onDraggableStart:function(e){const{ownerDocument:r}=e.target;e.dataTransfer.setData(c,JSON.stringify(l));const o=r.createElement("div");o.style.top="0",o.style.left="0";const u=r.createElement("div");"function"==typeof e.dataTransfer.setDragImage&&(u.classList.add("components-draggable__invisible-drag-image"),r.body.appendChild(u),e.dataTransfer.setDragImage(u,0,0)),o.classList.add("components-draggable__clone"),a&&o.classList.add(a);let p=0,h=0;if(f.current){p=e.clientX,h=e.clientY,o.style.transform=`translate( ${p}px, ${h}px )`;const t=r.createElement("div");t.innerHTML=f.current.innerHTML,o.appendChild(t),r.body.appendChild(o)}else{const e=r.getElementById(s),t=e.getBoundingClientRect(),n=e.parentNode,a=t.top,l=t.left;o.style.width=`${t.width+0}px`;const c=e.cloneNode(!0);c.id=`clone-${s}`,p=l-0,h=a-0,o.style.transform=`translate( ${p}px, ${h}px )`,Array.from(c.querySelectorAll("iframe")).forEach((e=>e.parentNode?.removeChild(e))),o.appendChild(c),i?r.body.appendChild(o):n?.appendChild(o)}let g=e.clientX,v=e.clientY;const b=(0,d.throttle)((function(e){if(g===e.clientX&&v===e.clientY)return;const t=p+e.clientX-g,r=h+e.clientY-v;o.style.transform=`translate( ${t}px, ${r}px )`,g=e.clientX,v=e.clientY,p=t,h=r,n&&n(e)}),16);r.addEventListener("dragover",b),r.body.classList.add(WD),t&&t(e),m.current=()=>{o&&o.parentNode&&o.parentNode.removeChild(o),u&&u.parentNode&&u.parentNode.removeChild(u),r.body.classList.remove(WD),r.removeEventListener("dragover",b)}},onDraggableEnd:function(e){e.preventDefault(),m.current(),o&&o(e)}}),u&&(0,r.createElement)("div",{className:"components-draggable-drag-component-root",style:{display:"none"},ref:f},u))},GD=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));const qD=function({className:e,label:t,onFilesDrop:n,onHTMLDrop:o,onDrop:i,...a}){const[s,l]=(0,Uo.useState)(),[f,m]=(0,Uo.useState)(),[p,h]=(0,Uo.useState)(),g=(0,d.__experimentalUseDropZone)({onDrop(e){const t=e.dataTransfer?(0,HT.getFilesFromDataTransfer)(e.dataTransfer):[],r=e.dataTransfer?.getData("text/html");r&&o?o(r):t.length&&n?n(t):i&&i(e)},onDragStart(e){l(!0);let t="default";e.dataTransfer?.types.includes("text/html")?t="html":(e.dataTransfer?.types.includes("Files")||(e.dataTransfer?(0,HT.getFilesFromDataTransfer)(e.dataTransfer):[]).length>0)&&(t="file"),h(t)},onDragEnd(){l(!1),h(void 0)},onDragEnter(){m(!0)},onDragLeave(){m(!1)}}),v=(0,d.useReducedMotion)();let b;const y={hidden:{opacity:0},show:{opacity:1,transition:{type:"tween",duration:.2,delay:0,delayChildren:.1}},exit:{opacity:0,transition:{duration:.2,delayChildren:0}}},x={hidden:{opacity:0,scale:.9},show:{opacity:1,scale:1,transition:{duration:.1}},exit:{opacity:0,scale:.9}};f&&(b=(0,r.createElement)(wh.div,{variants:y,initial:v?"show":"hidden",animate:"show",exit:v?"show":"exit",className:"components-drop-zone__content",style:{pointerEvents:"none"}},(0,r.createElement)(wh.div,{variants:x},(0,r.createElement)($E,{icon:GD,className:"components-drop-zone__content-icon"}),(0,r.createElement)("span",{className:"components-drop-zone__content-text"},t||(0,u.__)("Drop files to upload")))));const w=c()("components-drop-zone",e,{"is-active":(s||f)&&("file"===p&&n||"html"===p&&o||"default"===p&&i),"is-dragging-over-document":s,"is-dragging-over-element":f,[`is-dragging-${p}`]:!!p});return(0,r.createElement)("div",{...a,ref:g,className:w},v?b:(0,r.createElement)(Ih,null,b))};function YD({children:e}){return qo()("wp.components.DropZoneProvider",{since:"5.8",hint:"wp.component.DropZone no longer needs a provider. wp.components.DropZoneProvider is safe to remove from your code."}),e}const KD=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M5 17.7c.4.5.8.9 1.2 1.2l1.1-1.4c-.4-.3-.7-.6-1-1L5 17.7zM5 6.3l1.4 1.1c.3-.4.6-.7 1-1L6.3 5c-.5.4-.9.8-1.3 1.3zm.1 7.8l-1.7.5c.2.6.4 1.1.7 1.6l1.5-.8c-.2-.4-.4-.8-.5-1.3zM4.8 12v-.7L3 11.1v1.8l1.7-.2c.1-.2.1-.5.1-.7zm3 7.9c.5.3 1.1.5 1.6.7l.5-1.7c-.5-.1-.9-.3-1.3-.5l-.8 1.5zM19 6.3c-.4-.5-.8-.9-1.2-1.2l-1.1 1.4c.4.3.7.6 1 1L19 6.3zm-.1 3.6l1.7-.5c-.2-.6-.4-1.1-.7-1.6l-1.5.8c.2.4.4.8.5 1.3zM5.6 8.6l-1.5-.8c-.3.5-.5 1-.7 1.6l1.7.5c.1-.5.3-.9.5-1.3zm2.2-4.5l.8 1.5c.4-.2.8-.4 1.3-.5l-.5-1.7c-.6.2-1.1.4-1.6.7zm8.8 13.5l1.1 1.4c.5-.4.9-.8 1.2-1.2l-1.4-1.1c-.2.3-.5.6-.9.9zm1.8-2.2l1.5.8c.3-.5.5-1.1.7-1.6l-1.7-.5c-.1.5-.3.9-.5 1.3zm2.6-4.3l-1.7.2v1.4l1.7.2V12v-.9zM11.1 3l.2 1.7h1.4l.2-1.7h-1.8zm3 2.1c.5.1.9.3 1.3.5l.8-1.5c-.5-.3-1.1-.5-1.6-.7l-.5 1.7zM12 19.2h-.7l-.2 1.8h1.8l-.2-1.7c-.2-.1-.5-.1-.7-.1zm2.1-.3l.5 1.7c.6-.2 1.1-.4 1.6-.7l-.8-1.5c-.4.2-.8.4-1.3.5z"}));function XD(e=[],t="90deg"){const n=100/e.length,r=e.map(((e,t)=>`${e} ${t*n}%, ${e} ${(t+1)*n}%`)).join(", ");return`linear-gradient( ${t}, ${r} )`}Vg([Hg]);const ZD=function({values:e}){return e?(0,r.createElement)(DE,{colorValue:XD(e,"135deg")}):(0,r.createElement)(uy,{icon:KD})};function JD({label:e,value:t,colors:n,disableCustomColors:o,enableAlpha:i,onChange:a}){const[s,l]=(0,Uo.useState)(!1),c=(0,d.useInstanceId)(JD,"color-list-picker-option"),f=`${c}__label`,m=`${c}__content`;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(my,{className:"components-color-list-picker__swatch-button",onClick:()=>l((e=>!e)),"aria-expanded":s,"aria-controls":m},(0,r.createElement)(Py,{justify:"flex-start",spacing:2},t?(0,r.createElement)(DE,{colorValue:t,className:"components-color-list-picker__swatch-color"}):(0,r.createElement)(uy,{icon:KD}),(0,r.createElement)("span",{id:f},e))),(0,r.createElement)("div",{role:"group",id:m,"aria-labelledby":f,"aria-hidden":!s},s&&(0,r.createElement)(JS,{"aria-label":(0,u.__)("Color options"),className:"components-color-list-picker__color-picker",colors:n,value:t,clearable:!1,onChange:a,disableCustomColors:o,enableAlpha:i})))}const QD=function({colors:e,labels:t,value:n=[],disableCustomColors:o,enableAlpha:i,onChange:a}){return(0,r.createElement)("div",{className:"components-color-list-picker"},t.map(((t,s)=>(0,r.createElement)(JD,{key:s,label:t,value:n[s],colors:e,disableCustomColors:o,enableAlpha:i,onChange:e=>{const t=n.slice();t[s]=e,a(t)}}))))},eA=["#333","#CCC"];function tA({value:e,onChange:t}){const n=!!e,o=n?e:eA,i=XD(o),a=(s=o).map(((e,t)=>({position:100*t/(s.length-1),color:e})));var s;return(0,r.createElement)(wT,{disableInserter:!0,background:i,hasGradient:n,value:a,onChange:e=>{const n=function(e=[]){return e.map((({color:e})=>e))}(e);t(n)}})}const nA=function({asButtons:e,loop:t,clearable:n=!0,unsetable:o=!0,colorPalette:i,duotonePalette:a,disableCustomColors:s,disableCustomDuotone:l,value:c,onChange:d,"aria-label":f,"aria-labelledby":m,...p}){const[h,g]=(0,Uo.useMemo)((()=>{return!(e=i)||e.length<2?["#000","#fff"]:e.map((({color:e})=>({color:e,brightness:Bg(e).brightness()}))).reduce((([e,t],n)=>[n.brightness<=e.brightness?n:e,n.brightness>=t.brightness?n:t]),[{brightness:1,color:""},{brightness:0,color:""}]).map((({color:e})=>e));var e}),[i]),v="unset"===c,b=(0,u.__)("Unset"),y=(0,r.createElement)(BS.Option,{key:"unset",value:"unset",isSelected:v,tooltipText:b,"aria-label":b,className:"components-duotone-picker__color-indicator",onClick:()=>{d(v?void 0:"unset")}}),x=a.map((({colors:e,slug:t,name:n})=>{const o={background:XD(e,"135deg"),color:"transparent"},i=null!=n?n:(0,u.sprintf)((0,u.__)("Duotone code: %s"),t),a=n?(0,u.sprintf)((0,u.__)("Duotone: %s"),n):i,s=si()(e,c);return(0,r.createElement)(BS.Option,{key:t,value:e,isSelected:s,"aria-label":a,tooltipText:i,style:o,onClick:()=>{d(s?void 0:e)}})}));let w;if(e)w={asButtons:!0};else{const e={asButtons:!1,loop:t};w=f?{...e,"aria-label":f}:m?{...e,"aria-labelledby":m}:{...e,"aria-label":(0,u.__)("Custom color picker.")}}const E=o?[y,...x]:x;return(0,r.createElement)(BS,{...p,...w,options:E,actions:!!n&&(0,r.createElement)(BS.ButtonAction,{onClick:()=>d(void 0)},(0,u.__)("Clear"))},(0,r.createElement)(tg,{paddingTop:0===E.length?0:4},(0,r.createElement)(jS,{spacing:3},!s&&!l&&(0,r.createElement)(tA,{value:v?void 0:c,onChange:d}),!l&&(0,r.createElement)(QD,{labels:[(0,u.__)("Shadows"),(0,u.__)("Highlights")],colors:i,value:v?void 0:c,disableCustomColors:s,enableAlpha:!0,onChange:e=>{e[0]||(e[0]=h),e[1]||(e[1]=g);const t=e.length>=2?e:void 0;d(t)}}))))},rA=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"}));const oA=bs($E,{target:"esh4a730"})({name:"rvs7bx",styles:"width:1em;height:1em;margin:0;vertical-align:middle;fill:currentColor"});const iA=(0,Uo.forwardRef)((function(e,t){const{href:n,children:o,className:i,rel:a="",...s}=e,l=[...new Set([...a.split(" "),"external","noreferrer","noopener"].filter(Boolean))].join(" "),d=c()("components-external-link",i),f=!!n?.startsWith("#");return(0,r.createElement)("a",{...s,className:d,href:n,onClick:t=>{f&&t.preventDefault(),e.onClick&&e.onClick(t)},target:"_blank",rel:l,ref:t},o,(0,r.createElement)(ws,{as:"span"},(0,u.__)("(opens in a new tab)")),(0,r.createElement)(oA,{icon:rA,className:"components-external-link__icon"}))})),aA={width:200,height:170},sA=["avi","mpg","mpeg","mov","mp4","m4v","ogg","ogv","webm","wmv"];function lA(e){return Math.round(100*e)}const cA=bs("div",{target:"eeew7dm8"})({name:"jqnsxy",styles:"background-color:transparent;display:flex;text-align:center;width:100%"}),uA=bs("div",{target:"eeew7dm7"})("align-items:center;border-radius:",Xg.radiusBlockUi,";cursor:pointer;display:inline-flex;justify-content:center;margin:auto;position:relative;height:100%;&:after{border-radius:inherit;bottom:0;box-shadow:inset 0 0 0 1px rgba( 0, 0, 0, 0.1 );content:'';left:0;pointer-events:none;position:absolute;right:0;top:0;}img,video{border-radius:inherit;box-sizing:border-box;display:block;height:auto;margin:0;max-height:100%;max-width:100%;pointer-events:none;user-select:none;width:auto;}"),dA=bs("div",{target:"eeew7dm6"})("background:",Ds.gray[100],";border-radius:inherit;box-sizing:border-box;height:",aA.height,"px;max-width:280px;min-width:",aA.width,"px;width:100%;"),fA=bs(PC,{target:"eeew7dm5"})({name:"1d3w5wq",styles:"width:100%"});var mA={name:"1mn7kwb",styles:"padding-bottom:1em"};const pA=({__nextHasNoMarginBottom:e})=>e?void 0:mA;var hA={name:"1mn7kwb",styles:"padding-bottom:1em"};const gA=({hasHelpText:e=!1})=>e?hA:void 0,vA=bs($h,{target:"eeew7dm4"})("max-width:320px;padding-top:1em;",gA," ",pA,";"),bA=bs("div",{target:"eeew7dm3"})("left:50%;overflow:hidden;pointer-events:none;position:absolute;top:50%;transform:translate3d( -50%, -50%, 0 );transition:opacity 100ms linear;z-index:1;",As("transition")," opacity:",(({showOverlay:e})=>e?1:0),";"),yA=bs("div",{target:"eeew7dm2"})({name:"1yzbo24",styles:"background:rgba( 255, 255, 255, 0.4 );backdrop-filter:blur( 16px ) saturate( 180% );position:absolute;transform:translateZ( 0 )"}),xA=bs(yA,{target:"eeew7dm1"})({name:"1sw8ur",styles:"height:1px;left:1px;right:1px"}),wA=bs(yA,{target:"eeew7dm0"})({name:"188vg4t",styles:"width:1px;top:1px;bottom:1px"}),EA=0,_A=100,SA=()=>{};function CA({__nextHasNoMarginBottom:e,__next40pxDefaultSize:t,hasHelpText:n,onChange:o=SA,point:i={x:.5,y:.5}}){const a=lA(i.x),s=lA(i.y),l=(e,t)=>{if(void 0===e)return;const n=parseInt(e,10);isNaN(n)||o({...i,[t]:n/100})};return(0,r.createElement)(vA,{className:"focal-point-picker__controls",__nextHasNoMarginBottom:e,hasHelpText:n,gap:4},(0,r.createElement)(kA,{__next40pxDefaultSize:t,label:(0,u.__)("Left"),"aria-label":(0,u.__)("Focal point left position"),value:[a,"%"].join(""),onChange:e=>l(e,"x"),dragDirection:"e"}),(0,r.createElement)(kA,{__next40pxDefaultSize:t,label:(0,u.__)("Top"),"aria-label":(0,u.__)("Focal point top position"),value:[s,"%"].join(""),onChange:e=>l(e,"y"),dragDirection:"s"}))}function kA(e){return(0,r.createElement)(fA,{className:"focal-point-picker__controls-position-unit-control",labelPosition:"top",max:_A,min:EA,units:[{value:"%",label:"%"}],...e})}const PA=bs("div",{target:"e19snlhg0"})("background-color:transparent;cursor:grab;height:40px;margin:-20px 0 0 -20px;position:absolute;user-select:none;width:40px;will-change:transform;z-index:10000;background:rgba( 255, 255, 255, 0.4 );border:1px solid rgba( 255, 255, 255, 0.4 );border-radius:50%;backdrop-filter:blur( 16px ) saturate( 180% );box-shadow:rgb( 0 0 0 / 10% ) 0px 0px 8px;transition:transform 100ms linear;",As("transition")," ",(({isDragging:e})=>e&&"\n\t\t\tbox-shadow: rgb( 0 0 0 / 12% ) 0px 0px 10px;\n\t\t\ttransform: scale( 1.1 );\n\t\t\tcursor: grabbing;\n\t\t\t"),";");function TA({left:e="50%",top:t="50%",...n}){const o=c()("components-focal-point-picker__icon_container"),i={left:e,top:t};return(0,r.createElement)(PA,{...n,className:o,style:i})}function IA({bounds:e,...t}){return(0,r.createElement)(bA,{...t,className:"components-focal-point-picker__grid",style:{width:e.width,height:e.height}},(0,r.createElement)(xA,{style:{top:"33%"}}),(0,r.createElement)(xA,{style:{top:"66%"}}),(0,r.createElement)(wA,{style:{left:"33%"}}),(0,r.createElement)(wA,{style:{left:"66%"}}))}function RA({alt:e,autoPlay:t,src:n,onLoad:o,mediaRef:i,muted:a=!0,...s}){if(!n)return(0,r.createElement)(dA,{className:"components-focal-point-picker__media components-focal-point-picker__media--placeholder",ref:i,...s});return function(e=""){return!!e&&(e.startsWith("data:video/")||sA.includes(function(e=""){const t=e.split(".");return t[t.length-1]}(e)))}(n)?(0,r.createElement)("video",{...s,autoPlay:t,className:"components-focal-point-picker__media components-focal-point-picker__media--video",loop:!0,muted:a,onLoadedData:o,ref:i,src:n}):(0,r.createElement)("img",{...s,alt:e,className:"components-focal-point-picker__media components-focal-point-picker__media--image",onLoad:o,ref:i,src:n})}const MA=function e({__nextHasNoMarginBottom:t,__next40pxDefaultSize:n=!1,autoPlay:o=!0,className:i,help:a,label:s,onChange:l,onDrag:f,onDragEnd:m,onDragStart:p,resolvePoint:h,url:g,value:v={x:.5,y:.5},...b}){const[y,x]=(0,Uo.useState)(v),[w,E]=(0,Uo.useState)(!1),{startDrag:_,endDrag:S,isDragging:C}=(0,d.__experimentalUseDragging)({onDragStart:e=>{T.current?.focus();const t=N(e);t&&(p?.(t,e),x(t))},onDragMove:e=>{e.preventDefault();const t=N(e);t&&(f?.(t,e),x(t))},onDragEnd:()=>{m?.(),l?.(y)}}),{x:k,y:P}=C?y:v,T=(0,Uo.useRef)(null),[I,R]=(0,Uo.useState)(aA),M=(0,Uo.useRef)((()=>{if(!T.current)return;const{clientWidth:e,clientHeight:t}=T.current;R(e>0&&t>0?{width:e,height:t}:{...aA})}));(0,Uo.useEffect)((()=>{const e=M.current;if(!T.current)return;const{defaultView:t}=T.current.ownerDocument;return t?.addEventListener("resize",e),()=>t?.removeEventListener("resize",e)}),[]),(0,d.useIsomorphicLayoutEffect)((()=>{M.current()}),[]);const N=({clientX:e,clientY:t,shiftKey:n})=>{if(!T.current)return;const{top:r,left:o}=T.current.getBoundingClientRect();let i=(e-o)/I.width,a=(t-r)/I.height;return n&&(i=.1*Math.round(i/.1),a=.1*Math.round(a/.1)),D({x:i,y:a})},D=e=>{var t;const n=null!==(t=h?.(e))&&void 0!==t?t:e;n.x=Math.max(0,Math.min(n.x,1)),n.y=Math.max(0,Math.min(n.y,1));const r=e=>Math.round(100*e)/100;return{x:r(n.x),y:r(n.y)}},A={left:void 0!==k?k*I.width:.5*I.width,top:void 0!==P?P*I.height:.5*I.height},O=c()("components-focal-point-picker-control",i),z=`inspector-focal-point-picker-control-${(0,d.useInstanceId)(e)}`;return ui((()=>{E(!0);const e=window.setTimeout((()=>{E(!1)}),600);return()=>window.clearTimeout(e)}),[k,P]),(0,r.createElement)(iy,{...b,__nextHasNoMarginBottom:t,label:s,id:z,help:a,className:O},(0,r.createElement)(cA,{className:"components-focal-point-picker-wrapper"},(0,r.createElement)(uA,{className:"components-focal-point-picker",onKeyDown:e=>{const{code:t,shiftKey:n}=e;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t))return;e.preventDefault();const r={x:k,y:P},o=n?.1:.01,i="ArrowUp"===t||"ArrowLeft"===t?-1*o:o,a="ArrowUp"===t||"ArrowDown"===t?"y":"x";r[a]=r[a]+i,l?.(D(r))},onMouseDown:_,onBlur:()=>{C&&S()},ref:T,role:"button",tabIndex:-1},(0,r.createElement)(IA,{bounds:I,showOverlay:w}),(0,r.createElement)(RA,{alt:(0,u.__)("Media preview"),autoPlay:o,onLoad:M.current,src:g}),(0,r.createElement)(TA,{...A,isDragging:C}))),(0,r.createElement)(CA,{__nextHasNoMarginBottom:t,__next40pxDefaultSize:n,hasHelpText:!!a,point:{x:k,y:P},onChange:e=>{l?.(D(e))}}))};function NA({iframeRef:e,...t}){const n=(0,d.useMergeRefs)([e,(0,d.useFocusableIframe)()]);return qo()("wp.components.FocusableIframe",{since:"5.9",alternative:"wp.compose.useFocusableIframe"}),(0,r.createElement)("iframe",{ref:n,...t})}const DA=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,r.createElement)(n.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"}));function AA(e){const[t,...n]=e;if(!t)return null;const[,r]=xC(t.size);return n.every((e=>{const[,t]=xC(e.size);return t===r}))?r:null}const OA=bs("fieldset",{target:"e8tqeku4"})({name:"1t1ytme",styles:"border:0;margin:0;padding:0"}),zA=bs(Py,{target:"e8tqeku3"})("height:",Ah(4),";"),LA=bs(my,{target:"e8tqeku2"})("margin-top:",Ah(-1),";"),FA=bs(iy.VisualLabel,{target:"e8tqeku1"})("display:flex;gap:",Ah(1),";justify-content:flex-start;margin-bottom:0;"),BA=bs("span",{target:"e8tqeku0"})("color:",Ds.gray[700],";"),jA={key:"default",name:(0,u.__)("Default"),value:void 0},VA={key:"custom",name:(0,u.__)("Custom")},HA=e=>{var t;const{__next40pxDefaultSize:n,fontSizes:o,value:i,disableCustomFontSizes:a,size:s,onChange:l,onSelectCustom:c}=e,d=!!AA(o),f=[jA,...o.map((e=>{let t;if(d){const[n]=xC(e.size);void 0!==n&&(t=String(n))}else(function(e){return/^[\d\.]+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i.test(String(e))})(e.size)&&(t=String(e.size));return{key:e.slug,name:e.name||e.slug,value:e.size,__experimentalHint:t}})),...a?[]:[VA]],m=i?null!==(t=f.find((e=>e.value===i)))&&void 0!==t?t:VA:jA;return(0,r.createElement)(wM,{__next40pxDefaultSize:n,__nextUnconstrainedWidth:!0,className:"components-font-size-picker__select",label:(0,u.__)("Font size"),hideLabelFromVision:!0,describedBy:(0,u.sprintf)((0,u.__)("Currently selected font size: %s"),m.name),options:f,value:m,__experimentalShowSelectedHint:!0,onChange:({selectedItem:e})=>{e===VA?c():l(e.value)},size:s})};const $A=(0,Uo.forwardRef)((function(e,t){const{label:n,...o}=e,i=o["aria-label"]||n;return(0,r.createElement)(TE,{...o,"aria-label":i,ref:t},n)})),WA=[(0,u.__)("S"),(0,u.__)("M"),(0,u.__)("L"),(0,u.__)("XL"),(0,u.__)("XXL")],UA=[(0,u.__)("Small"),(0,u.__)("Medium"),(0,u.__)("Large"),(0,u.__)("Extra Large"),(0,u.__)("Extra Extra Large")],GA=e=>{const{fontSizes:t,value:n,__next40pxDefaultSize:o,size:i,onChange:a}=e;return(0,r.createElement)(fE,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:o,label:(0,u.__)("Font size"),hideLabelFromVision:!0,value:n,onChange:a,isBlock:!0,size:i},t.map(((e,t)=>(0,r.createElement)($A,{key:e.slug,value:e.size,label:WA[t],"aria-label":e.name||UA[t],showTooltip:!0}))))},qA=(0,Uo.forwardRef)(((e,t)=>{const{__next40pxDefaultSize:n=!1,fallbackFontSize:o,fontSizes:i=[],disableCustomFontSizes:a=!1,onChange:s,size:l="default",units:c,value:d,withSlider:f=!1,withReset:m=!0}=e,p=wC({availableUnits:c||["px","em","rem"]}),h=i.length>5,g=i.find((e=>e.size===d)),v=!!d&&!g,[b,y]=(0,Uo.useState)(!a&&v),x=(0,Uo.useMemo)((()=>{if(b)return(0,u.__)("Custom");if(!h)return g?g.name||UA[i.indexOf(g)]:"";const e=AA(i);return e?`(${e})`:""}),[b,h,g,i]);if(0===i.length&&a)return null;const w="string"==typeof d||"string"==typeof i[0]?.size,[E,_]=xC(d,p),S=!!_&&["em","rem"].includes(_),C=void 0===d;return(0,r.createElement)(OA,{ref:t,className:"components-font-size-picker"},(0,r.createElement)(ws,{as:"legend"},(0,u.__)("Font size")),(0,r.createElement)(tg,null,(0,r.createElement)(zA,{className:"components-font-size-picker__header"},(0,r.createElement)(FA,{"aria-label":`${(0,u.__)("Size")} ${x||""}`},(0,u.__)("Size"),x&&(0,r.createElement)(BA,{className:"components-font-size-picker__header__hint"},x)),!a&&(0,r.createElement)(LA,{label:b?(0,u.__)("Use size preset"):(0,u.__)("Set custom size"),icon:DA,onClick:()=>{y(!b)},isPressed:b,size:"small"}))),(0,r.createElement)("div",null,!!i.length&&h&&!b&&(0,r.createElement)(HA,{__next40pxDefaultSize:n,fontSizes:i,value:d,disableCustomFontSizes:a,size:l,onChange:e=>{void 0===e?s?.(void 0):s?.(w?e:Number(e),i.find((t=>t.size===e)))},onSelectCustom:()=>y(!0)}),!h&&!b&&(0,r.createElement)(GA,{fontSizes:i,value:d,__next40pxDefaultSize:n,size:l,onChange:e=>{void 0===e?s?.(void 0):s?.(w?e:Number(e),i.find((t=>t.size===e)))}}),!a&&b&&(0,r.createElement)($h,{className:"components-font-size-picker__custom-size-control"},(0,r.createElement)(og,{isBlock:!0},(0,r.createElement)(PC,{__next40pxDefaultSize:n,label:(0,u.__)("Custom"),labelPosition:"top",hideLabelFromVision:!0,value:d,onChange:e=>{s?.(void 0===e?void 0:w?e:parseInt(e,10))},size:l,units:w?p:[],min:0})),f&&(0,r.createElement)(og,{isBlock:!0},(0,r.createElement)(tg,{marginX:2,marginBottom:0},(0,r.createElement)(k_,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:n,className:"components-font-size-picker__custom-input",label:(0,u.__)("Custom Size"),hideLabelFromVision:!0,value:E,initialPosition:o,withInputField:!1,onChange:e=>{s?.(void 0===e?void 0:w?e+(null!=_?_:"px"):e)},min:0,max:S?10:100,step:S?.1:1}))),m&&(0,r.createElement)(og,null,(0,r.createElement)(fy,{disabled:C,__experimentalIsFocusable:!0,onClick:()=>{s?.(void 0)},variant:"secondary",__next40pxDefaultSize:!0,size:"__unstable-large"===l||e.__next40pxDefaultSize?"default":"small"},(0,u.__)("Reset"))))))})),YA=qA;const KA=function({accept:e,children:t,multiple:n=!1,onChange:o,onClick:i,render:a,...s}){const l=(0,Uo.useRef)(null),c=()=>{l.current?.click()},u=a?a({openFileDialog:c}):(0,r.createElement)(my,{onClick:c,...s},t);return(0,r.createElement)("div",{className:"components-form-file-upload"},u,(0,r.createElement)("input",{type:"file",ref:l,multiple:n,style:{display:"none"},accept:e,onChange:o,onClick:i,"data-testid":"form-file-upload-input"}))},XA=()=>{};const ZA=function(e){const{className:t,checked:n,id:o,disabled:i,onChange:a=XA,...s}=e,l=c()("components-form-toggle",t,{"is-checked":n,"is-disabled":i});return(0,r.createElement)("span",{className:l},(0,r.createElement)("input",{className:"components-form-toggle__input",id:o,type:"checkbox",checked:n,onChange:a,disabled:i,...s}),(0,r.createElement)("span",{className:"components-form-toggle__track"}),(0,r.createElement)("span",{className:"components-form-toggle__thumb"}))},JA=()=>{};function QA({value:e,status:t,title:n,displayTransform:o,isBorderless:i=!1,disabled:a=!1,onClickRemove:s=JA,onMouseEnter:l,onMouseLeave:f,messages:m,termPosition:p,termsCount:h}){const g=(0,d.useInstanceId)(QA),v=c()("components-form-token-field__token",{"is-error":"error"===t,"is-success":"success"===t,"is-validating":"validating"===t,"is-borderless":i,"is-disabled":a}),b=o(e),y=(0,u.sprintf)((0,u.__)("%1$s (%2$s of %3$s)"),b,p,h);return(0,r.createElement)("span",{className:v,onMouseEnter:l,onMouseLeave:f,title:n},(0,r.createElement)("span",{className:"components-form-token-field__token-text",id:`components-form-token-field__token-text-${g}`},(0,r.createElement)(ws,{as:"span"},y),(0,r.createElement)("span",{"aria-hidden":"true"},b)),(0,r.createElement)(my,{className:"components-form-token-field__remove-token",icon:zw,onClick:a?void 0:()=>s({value:e}),disabled:a,label:m.remove,"aria-describedby":`components-form-token-field__token-text-${g}`}))}const eO=({__next40pxDefaultSize:e,hasTokens:t})=>!e&&Ps("padding-top:",Ah(t?1:.5),";padding-bottom:",Ah(t?1:.5),";",""),tO=bs($h,{target:"ehq8nmi0"})("padding:7px;",Kb," ",eO,";"),nO=e=>e;const rO=function e(t){const{autoCapitalize:n,autoComplete:o,maxLength:i,placeholder:a,label:s=(0,u.__)("Add item"),className:l,suggestions:f=[],maxSuggestions:m=100,value:p=[],displayTransform:h=nO,saveTransform:g=(e=>e.trim()),onChange:v=(()=>{}),onInputChange:b=(()=>{}),onFocus:y,isBorderless:x=!1,disabled:w=!1,tokenizeOnSpace:E=!1,messages:_={added:(0,u.__)("Item added."),removed:(0,u.__)("Item removed."),remove:(0,u.__)("Remove item"),__experimentalInvalid:(0,u.__)("Invalid item")},__experimentalRenderItem:S,__experimentalExpandOnFocus:C=!1,__experimentalValidateInput:k=(()=>!0),__experimentalShowHowTo:P=!0,__next40pxDefaultSize:T=!1,__experimentalAutoSelectFirstMatch:I=!1,__nextHasNoMarginBottom:R=!1,tokenizeOnBlur:M=!1}=Nv(t),N=(0,d.useInstanceId)(e),[D,A]=(0,Uo.useState)(""),[O,z]=(0,Uo.useState)(0),[L,F]=(0,Uo.useState)(!1),[B,j]=(0,Uo.useState)(!1),[V,H]=(0,Uo.useState)(-1),[$,W]=(0,Uo.useState)(!1),U=(0,d.usePrevious)(f),G=(0,d.usePrevious)(p),q=(0,Uo.useRef)(null),Y=(0,Uo.useRef)(null),K=(0,d.useDebounce)(jy.speak,500);function X(){q.current?.focus()}function Z(){return q.current===q.current?.ownerDocument.activeElement}function J(e){if(me()&&k(D))F(!1),M&&me()&&se(D);else{if(A(""),z(0),F(!1),C){const t=e.relatedTarget===Y.current;j(t)}else j(!1);H(-1),W(!1)}}function Q(e){e.target===Y.current&&L&&e.preventDefault()}function ee(e){le(e.value),X()}function te(e){const t=e.value,n=E?/[ ,\t]+/:/[,\t]+/,r=t.split(n),o=r[r.length-1]||"";r.length>1&&ae(r.slice(0,-1)),A(o),b(o)}function ne(e){let t=!1;return Z()&&fe()&&(e(),t=!0),t}function re(){const e=de()-1;e>-1&&le(p[e])}function oe(){const e=de();e<p.length&&(le(p[e]),function(e){z(p.length-Math.max(e,-1)-1)}(e))}function ie(){let e=!1;const t=function(){if(-1!==V)return ue()[V];return}();return t?(se(t),e=!0):me()&&(se(D),e=!0),e}function ae(e){const t=[...new Set(e.map(g).filter(Boolean).filter((e=>!function(e){return p.some((t=>ce(e)===ce(t)))}(e))))];if(t.length>0){const e=[...p];e.splice(de(),0,...t),v(e)}}function se(e){k(e)?(ae([e]),(0,jy.speak)(_.added,"assertive"),A(""),H(-1),W(!1),j(!C),L&&!M&&X()):(0,jy.speak)(_.__experimentalInvalid,"assertive")}function le(e){const t=p.filter((t=>ce(t)!==ce(e)));v(t),(0,jy.speak)(_.removed,"assertive")}function ce(e){return"object"==typeof e?e.value:e}function ue(e=D,t=f,n=p,r=m,o=g){let i=o(e);const a=[],s=[],l=n.map((e=>"string"==typeof e?e:e.value));return 0===i.length?t=t.filter((e=>!l.includes(e))):(i=i.toLocaleLowerCase(),t.forEach((e=>{const t=e.toLocaleLowerCase().indexOf(i);-1===l.indexOf(e)&&(0===t?a.push(e):t>0&&s.push(e))})),t=a.concat(s)),t.slice(0,r)}function de(){return p.length-O}function fe(){return 0===D.length}function me(){return g(D).length>0}function pe(e=!0){const t=D.trim().length>1,n=ue(D),r=n.length>0,o=Z()&&C;if(j(o||t&&r),e&&(I&&t&&r?(H(0),W(!0)):(H(-1),W(!1))),t){const e=r?(0,u.sprintf)((0,u._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",n.length),n.length):(0,u.__)("No results.");K(e,"assertive")}}function he(e,t,n){const o=ce(e),i="string"!=typeof e?e.status:void 0,a=t+1,s=n.length;return(0,r.createElement)(og,{key:"token-"+o},(0,r.createElement)(QA,{value:o,status:i,title:"string"!=typeof e?e.title:void 0,displayTransform:h,onClickRemove:ee,isBorderless:"string"!=typeof e&&e.isBorderless||x,onMouseEnter:"string"!=typeof e?e.onMouseEnter:void 0,onMouseLeave:"string"!=typeof e?e.onMouseLeave:void 0,disabled:"error"!==i&&w,messages:_,termsCount:s,termPosition:a}))}(0,Uo.useEffect)((()=>{L&&!Z()&&X()}),[L]),(0,Uo.useEffect)((()=>{const e=!ow()(f,U||[]);(e||p!==G)&&pe(e)}),[f,U,p,G]),(0,Uo.useEffect)((()=>{pe()}),[D]),(0,Uo.useEffect)((()=>{pe()}),[I]),w&&L&&(F(!1),A(""));const ge=c()(l,"components-form-token-field__input-container",{"is-active":L,"is-disabled":w});let ve={className:"components-form-token-field",tabIndex:-1};const be=ue();return w||(ve=Object.assign({},ve,{onKeyDown:function(e){let t=!1;if(!e.defaultPrevented&&!e.nativeEvent.isComposing&&229!==e.keyCode){switch(e.key){case"Backspace":t=ne(re);break;case"Enter":t=ie();break;case"ArrowLeft":t=function(){let e=!1;return fe()&&(z((e=>Math.min(e+1,p.length))),e=!0),e}();break;case"ArrowUp":H((e=>(0===e?ue(D,f,p,m,g).length:e)-1)),W(!0),t=!0;break;case"ArrowRight":t=function(){let e=!1;return fe()&&(z((e=>Math.max(e-1,0))),e=!0),e}();break;case"ArrowDown":H((e=>(e+1)%ue(D,f,p,m,g).length)),W(!0),t=!0;break;case"Delete":t=ne(oe);break;case"Space":E&&(t=ie());break;case"Escape":t=function(e){return e.target instanceof HTMLInputElement&&(A(e.target.value),j(!1),H(-1),W(!1)),!0}(e)}t&&e.preventDefault()}},onKeyPress:function(e){let t=!1;","===e.key&&(me()&&se(D),t=!0);t&&e.preventDefault()},onFocus:function(e){Z()||e.target===Y.current?(F(!0),j(C||B)):F(!1),"function"==typeof y&&y(e)}})),(0,r.createElement)("div",{...ve},(0,r.createElement)(Qb,{htmlFor:`components-form-token-input-${N}`,className:"components-form-token-field__label"},s),(0,r.createElement)("div",{ref:Y,className:ge,tabIndex:-1,onMouseDown:Q,onTouchStart:Q},(0,r.createElement)(tO,{justify:"flex-start",align:"center",gap:1,wrap:!0,__next40pxDefaultSize:T,hasTokens:!!p.length},function(){const e=p.map(he);return e.splice(de(),0,function(){const e={instanceId:N,autoCapitalize:n,autoComplete:o,placeholder:0===p.length?a:"",key:"input",disabled:w,value:D,onBlur:J,isExpanded:B,selectedSuggestionIndex:V};return(0,r.createElement)(xI,{...e,onChange:i&&p.length>=i?void 0:te,ref:q})}()),e}()),B&&(0,r.createElement)(SI,{instanceId:N,match:g(D),displayTransform:h,suggestions:be,selectedIndex:V,scrollIntoView:$,onHover:function(e){const t=ue().indexOf(e);t>=0&&(H(t),W(!1))},onSelect:function(e){se(e)},__experimentalRenderItem:S})),!R&&(0,r.createElement)(tg,{marginBottom:2}),P&&(0,r.createElement)(ty,{id:`components-form-token-suggestions-howto-${N}`,className:"components-form-token-field__help",__nextHasNoMarginBottom:R},E?(0,u.__)("Separate with commas, spaces, or the Enter key."):(0,u.__)("Separate with commas or the Enter key.")))},oO=()=>(0,r.createElement)(n.SVG,{width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(n.Circle,{cx:"4",cy:"4",r:"4"}));function iO({currentPage:e,numberOfPages:t,setCurrentPage:n}){return(0,r.createElement)("ul",{className:"components-guide__page-control","aria-label":(0,u.__)("Guide controls")},Array.from({length:t}).map(((o,i)=>(0,r.createElement)("li",{key:i,"aria-current":i===e?"step":void 0},(0,r.createElement)(my,{key:i,icon:(0,r.createElement)(oO,null),"aria-label":(0,u.sprintf)((0,u.__)("Page %1$d of %2$d"),i+1,t),onClick:()=>n(i)})))))}const aO=function({children:e,className:t,contentLabel:n,finishButtonText:o=(0,u.__)("Finish"),onFinish:i,pages:a=[]}){const s=(0,Uo.useRef)(null),[l,d]=(0,Uo.useState)(0);var f;(0,Uo.useEffect)((()=>{const e=s.current?.querySelector(".components-guide");e instanceof HTMLElement&&e.focus()}),[l]),(0,Uo.useEffect)((()=>{Uo.Children.count(e)&&qo()("Passing children to <Guide>",{since:"5.5",alternative:"the `pages` prop"})}),[e]),Uo.Children.count(e)&&(a=null!==(f=Uo.Children.map(e,(e=>({content:e}))))&&void 0!==f?f:[]);const m=l>0,p=l<a.length-1,h=()=>{m&&d(l-1)},g=()=>{p&&d(l+1)};return 0===a.length?null:(0,r.createElement)(qI,{className:c()("components-guide",t),contentLabel:n,isDismissible:a.length>1,onRequestClose:i,onKeyDown:e=>{"ArrowLeft"===e.code?(h(),e.preventDefault()):"ArrowRight"===e.code&&(g(),e.preventDefault())},ref:s},(0,r.createElement)("div",{className:"components-guide__container"},(0,r.createElement)("div",{className:"components-guide__page"},a[l].image,a.length>1&&(0,r.createElement)(iO,{currentPage:l,numberOfPages:a.length,setCurrentPage:d}),a[l].content),(0,r.createElement)("div",{className:"components-guide__footer"},m&&(0,r.createElement)(my,{className:"components-guide__back-button",variant:"tertiary",onClick:h},(0,u.__)("Previous")),p&&(0,r.createElement)(my,{className:"components-guide__forward-button",variant:"primary",onClick:g},(0,u.__)("Next")),!p&&(0,r.createElement)(my,{className:"components-guide__finish-button",variant:"primary",onClick:i},o))))};function sO(e){return(0,Uo.useEffect)((()=>{qo()("<GuidePage>",{since:"5.5",alternative:"the `pages` prop in <Guide>"})}),[]),(0,r.createElement)("div",{...e})}const lO=(0,Uo.forwardRef)((function({label:e,labelPosition:t,size:n,tooltip:o,...i},a){return qo()("wp.components.IconButton",{since:"5.4",alternative:"wp.components.Button",version:"6.2"}),(0,r.createElement)(my,{...i,ref:a,tooltipPosition:t,iconSize:n,showTooltip:void 0!==o?!!o:void 0,label:o||e})}));const cO=os((function(e,t){const{role:n,wrapperClassName:o,...i}=function(e){const{as:t,className:n,onClick:r,role:o="listitem",size:i,...a}=rs(e,"Item"),{spacedAround:s,size:l}=iT(),c=i||l,u=t||(void 0!==r?"button":"div"),d=ns(),f=(0,Uo.useMemo)((()=>d(("button"===u||"a"===u)&&UP(u),rT[c]||rT.medium,qP,s&&ZP,n)),[u,n,d,c,s]),m=d(GP);return{as:u,className:f,onClick:r,wrapperClassName:m,role:o,...a}}(e);return(0,r.createElement)("div",{role:n,className:o},(0,r.createElement)(xs,{...i,ref:t}))}),"Item"),uO=cO;const dO=os((function(e,t){const n=rs(e,"InputControlPrefixWrapper");return(0,r.createElement)(tg,{marginBottom:0,...n,ref:t})}),"InputControlPrefixWrapper");function fO({target:e,callback:t,shortcut:n,bindGlobal:r,eventName:o}){return(0,d.useKeyboardShortcut)(n,t,{bindGlobal:r,target:e,eventName:o}),null}const mO=function({children:e,shortcuts:t,bindGlobal:n,eventName:o}){const i=(0,Uo.useRef)(null),a=Object.entries(null!=t?t:{}).map((([e,t])=>(0,r.createElement)(fO,{key:e,shortcut:e,callback:t,bindGlobal:n,eventName:o,target:i})));return Uo.Children.count(e)?(0,r.createElement)("div",{ref:i},a,e):(0,r.createElement)(r.Fragment,null,a)};const pO=function e(t){const{children:n,className:o="",label:i,hideSeparator:a}=t,s=(0,d.useInstanceId)(e);if(!Uo.Children.count(n))return null;const l=`components-menu-group-label-${s}`,u=c()(o,"components-menu-group",{"has-hidden-separator":a});return(0,r.createElement)("div",{className:u},i&&(0,r.createElement)("div",{className:"components-menu-group__label",id:l,"aria-hidden":"true"},i),(0,r.createElement)("div",{role:"group","aria-labelledby":i?l:void 0},n))};const hO=(0,Uo.forwardRef)((function(e,t){let{children:n,info:o,className:i,icon:a,iconPosition:s="right",shortcut:l,isSelected:u,role:d="menuitem",suffix:f,...m}=e;return i=c()("components-menu-item__button",i),o&&(n=(0,r.createElement)("span",{className:"components-menu-item__info-wrapper"},(0,r.createElement)("span",{className:"components-menu-item__item"},n),(0,r.createElement)("span",{className:"components-menu-item__info"},o))),a&&"string"!=typeof a&&(a=(0,Uo.cloneElement)(a,{className:c()("components-menu-items__item-icon",{"has-icon-right":"right"===s})})),(0,r.createElement)(my,{ref:t,"aria-checked":"menuitemcheckbox"===d||"menuitemradio"===d?u:void 0,role:d,icon:"left"===s?a:void 0,className:i,...m},(0,r.createElement)("span",{className:"components-menu-item__item"},n),!f&&(0,r.createElement)(Yo,{className:"components-menu-item__shortcut",shortcut:l}),!f&&a&&"right"===s&&(0,r.createElement)(uy,{icon:a}),f)})),gO=hO,vO=()=>{};const bO=function({choices:e=[],onHover:t=vO,onSelect:n,value:o}){return(0,r.createElement)(r.Fragment,null,e.map((e=>{const i=o===e.value;return(0,r.createElement)(gO,{key:e.value,role:"menuitemradio",disabled:e.disabled,icon:i?DS:null,info:e.info,isSelected:i,shortcut:e.shortcut,className:"components-menu-items-choice",onClick:()=>{i||n(e.value)},onMouseEnter:()=>t(e.value),onMouseLeave:()=>t(null),"aria-label":e["aria-label"]},e.label)})))};const yO=(0,Uo.forwardRef)((function({eventToOffset:e,...t},n){return(0,r.createElement)(qT,{ref:n,stopNavigationEvents:!0,onlyBrowserTabstops:!0,eventToOffset:t=>{const{code:n,shiftKey:r}=t;return"Tab"===n?r?-1:1:e?e(t):void 0},...t})})),xO="root",wO=100,EO=()=>{},_O=()=>{},SO=(0,Uo.createContext)({activeItem:void 0,activeMenu:xO,setActiveMenu:EO,navigationTree:{items:{},getItem:_O,addItem:EO,removeItem:EO,menus:{},getMenu:_O,addMenu:EO,removeMenu:EO,childMenu:{},traverseMenu:EO,isMenuEmpty:()=>!1}}),CO=()=>(0,Uo.useContext)(SO);const kO=bs("div",{target:"eeiismy11"})("width:100%;box-sizing:border-box;padding:0 ",Ah(4),";overflow:hidden;"),PO=bs("div",{target:"eeiismy10"})("margin-top:",Ah(6),";margin-bottom:",Ah(6),";display:flex;flex-direction:column;ul{padding:0;margin:0;list-style:none;}.components-navigation__back-button{margin-bottom:",Ah(6),";}.components-navigation__group+.components-navigation__group{margin-top:",Ah(6),";}"),TO=bs(my,{target:"eeiismy9"})({name:"26l0q2",styles:"&.is-tertiary{color:inherit;opacity:0.7;&:hover:not( :disabled ){opacity:1;box-shadow:none;color:inherit;}&:active:not( :disabled ){background:transparent;opacity:1;color:inherit;}}"}),IO=bs("div",{target:"eeiismy8"})({name:"1aubja5",styles:"overflow:hidden;width:100%"}),RO=bs("div",{target:"eeiismy7"})({name:"rgorny",styles:"margin:11px 0;padding:1px"}),MO=bs("span",{target:"eeiismy6"})("height:",Ah(6),";.components-button.is-small{color:inherit;opacity:0.7;margin-right:",Ah(1),";padding:0;&:active:not( :disabled ){background:none;opacity:1;color:inherit;}&:hover:not( :disabled ){box-shadow:none;opacity:1;color:inherit;}}"),NO=bs($S,{target:"eeiismy5"})("min-height:",Ah(12),";align-items:center;color:inherit;display:flex;justify-content:space-between;margin-bottom:",Ah(2),";padding:",(()=>(0,u.isRTL)()?`${Ah(1)} ${Ah(4)} ${Ah(1)} ${Ah(2)}`:`${Ah(1)} ${Ah(2)} ${Ah(1)} ${Ah(4)}`),";"),DO=bs("li",{target:"eeiismy4"})("border-radius:2px;color:inherit;margin-bottom:0;>button,>a.components-button,>a{width:100%;color:inherit;opacity:0.7;padding:",Ah(2)," ",Ah(4),";",Jh({textAlign:"left"},{textAlign:"right"})," &:hover,&:focus:not( [aria-disabled='true'] ):active,&:active:not( [aria-disabled='true'] ):active{color:inherit;opacity:1;}}&.is-active{background-color:",Ds.theme.accent,";color:",Ds.white,";>button,>a{color:",Ds.white,";opacity:1;}}>svg path{color:",Ds.gray[600],";}"),AO=bs("div",{target:"eeiismy3"})("display:flex;align-items:center;height:auto;min-height:40px;margin:0;padding:",Ah(1.5)," ",Ah(4),";font-weight:400;line-height:20px;width:100%;color:inherit;opacity:0.7;"),OO=bs("span",{target:"eeiismy2"})("display:flex;margin-right:",Ah(2),";"),zO=bs("span",{target:"eeiismy1"})("margin-left:",(()=>(0,u.isRTL)()?"0":Ah(2)),";margin-right:",(()=>(0,u.isRTL)()?Ah(2):"0"),";display:inline-flex;padding:",Ah(1)," ",Ah(3),";border-radius:2px;animation:fade-in 250ms ease-out;@keyframes fade-in{from{opacity:0;}to{opacity:1;}}",As("animation"),";"),LO=bs(mv,{target:"eeiismy0"})((()=>(0,u.isRTL)()?"margin-left: auto;":"margin-right: auto;")," font-size:14px;line-height:20px;color:inherit;");function FO(){const[e,t]=(0,Uo.useState)({});return{nodes:e,getNode:t=>e[t],addNode:(e,n)=>{const{children:r,...o}=n;return t((t=>({...t,[e]:o})))},removeNode:e=>t((t=>{const{[e]:n,...r}=t;return r}))}}const BO=()=>{};const jO=function({activeItem:e,activeMenu:t=xO,children:n,className:o,onActivateMenu:i=BO}){const[a,s]=(0,Uo.useState)(t),[l,d]=(0,Uo.useState)(),f=(()=>{const{nodes:e,getNode:t,addNode:n,removeNode:r}=FO(),{nodes:o,getNode:i,addNode:a,removeNode:s}=FO(),[l,c]=(0,Uo.useState)({}),u=e=>l[e]||[],d=(e,t)=>{const n=[];let r,o=[e];for(;o.length>0&&(r=i(o.shift()),!r||n.includes(r.menu)||(n.push(r.menu),o=[...o,...u(r.menu)],!1!==t(r))););};return{items:e,getItem:t,addItem:n,removeItem:r,menus:o,getMenu:i,addMenu:(e,t)=>{c((n=>{const r={...n};return t.parentMenu?(r[t.parentMenu]||(r[t.parentMenu]=[]),r[t.parentMenu].push(e),r):r})),a(e,t)},removeMenu:s,childMenu:l,traverseMenu:d,isMenuEmpty:e=>{let t=!0;return d(e,(e=>{if(!e.isEmpty)return t=!1,!1})),t}}})(),m=(0,u.isRTL)()?"right":"left",p=(e,t=m)=>{f.getMenu(e)&&(d(t),s(e),i(e))},h=(0,Uo.useRef)(!1);(0,Uo.useEffect)((()=>{h.current||(h.current=!0)}),[]),(0,Uo.useEffect)((()=>{t!==a&&p(t)}),[t]);const g={activeItem:e,activeMenu:a,setActiveMenu:p,navigationTree:f},v=c()("components-navigation",o),b=gl({type:"slide-in",origin:l});return(0,r.createElement)(kO,{className:v},(0,r.createElement)("div",{key:a,className:b?c()({[b]:h.current&&l}):void 0},(0,r.createElement)(SO.Provider,{value:g},n)))},VO=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),HO=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));const $O=(0,Uo.forwardRef)((function({backButtonLabel:e,className:t,href:n,onClick:o,parentMenu:i},a){const{setActiveMenu:s,navigationTree:l}=CO(),d=c()("components-navigation__back-button",t),f=void 0!==i?l.getMenu(i)?.title:void 0,m=(0,u.isRTL)()?VO:HO;return(0,r.createElement)(TO,{className:d,href:n,variant:"tertiary",ref:a,onClick:e=>{"function"==typeof o&&o(e);const t=(0,u.isRTL)()?"left":"right";i&&!e.defaultPrevented&&s(i,t)}},(0,r.createElement)($E,{icon:m}),e||f||(0,u.__)("Back"))})),WO=$O,UO=(0,Uo.createContext)({group:void 0});let GO=0;const qO=function({children:e,className:t,title:n}){const[o]=(0,Uo.useState)("group-"+ ++GO),{navigationTree:{items:i}}=CO(),a={group:o};if(!Object.values(i).some((e=>e.group===o&&e._isVisible)))return(0,r.createElement)(UO.Provider,{value:a},e);const s=`components-navigation__group-title-${o}`,l=c()("components-navigation__group",t);return(0,r.createElement)(UO.Provider,{value:a},(0,r.createElement)("li",{className:l},n&&(0,r.createElement)(NO,{className:"components-navigation__group-title",id:s,level:3},n),(0,r.createElement)("ul",{"aria-labelledby":s,role:"group"},e)))};function YO(e){const{badge:t,title:n}=e;return(0,r.createElement)(r.Fragment,null,n&&(0,r.createElement)(LO,{className:"components-navigation__item-title",as:"span"},n),t&&(0,r.createElement)(zO,{className:"components-navigation__item-badge"},t))}const KO=(0,Uo.createContext)({menu:void 0,search:""}),XO=()=>(0,Uo.useContext)(KO),ZO=e=>Fy()(e).replace(/^\//,"").toLowerCase(),JO=(e,t)=>{const{activeMenu:n,navigationTree:{addItem:r,removeItem:o}}=CO(),{group:i}=(0,Uo.useContext)(UO),{menu:a,search:s}=XO();(0,Uo.useEffect)((()=>{const l=n===a,c=!s||void 0!==t.title&&((e,t)=>-1!==ZO(e).indexOf(ZO(t)))(t.title,s);return r(e,{...t,group:i,menu:a,_isVisible:l&&c}),()=>{o(e)}}),[n,s])};let QO=0;function ez(e){const{children:t,className:n,title:o,href:i,...a}=e,[s]=(0,Uo.useState)("item-"+ ++QO);JO(s,e);const{navigationTree:l}=CO();if(!l.getItem(s)?._isVisible)return null;const u=c()("components-navigation__item",n);return(0,r.createElement)(DO,{className:u,...a},t)}const tz=()=>{};const nz=function(e){const{badge:t,children:n,className:o,href:i,item:a,navigateToMenu:s,onClick:l=tz,title:d,icon:f,hideIfTargetMenuEmpty:m,isText:p,...h}=e,{activeItem:g,setActiveMenu:v,navigationTree:{isMenuEmpty:b}}=CO();if(m&&s&&b(s))return null;const y=a&&g===a,x=c()(o,{"is-active":y}),w=(0,u.isRTL)()?HO:VO,E=n?e:{...e,onClick:void 0},_=p?h:{as:my,href:i,onClick:e=>{s&&v(s),l(e)},"aria-current":y?"page":void 0,...h};return(0,r.createElement)(ez,{...E,className:x},n||(0,r.createElement)(AO,{..._},f&&(0,r.createElement)(OO,null,(0,r.createElement)($E,{icon:f})),(0,r.createElement)(YO,{title:d,badge:t}),s&&(0,r.createElement)($E,{icon:w})))},rz=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})),oz=(0,d.createHigherOrderComponent)((e=>t=>(0,r.createElement)(e,{...t,speak:jy.speak,debouncedSpeak:(0,d.useDebounce)(jy.speak,500)})),"withSpokenMessages"),iz=bs("div",{target:"effl84m1"})("display:flex;padding-inline-end:",(({size:e})=>Ah("compact"===e?1:2)),";svg{fill:currentColor;}"),az=bs(ly,{target:"effl84m0"})("input[type='search']{&::-webkit-search-decoration,&::-webkit-search-cancel-button,&::-webkit-search-results-button,&::-webkit-search-results-decoration{-webkit-appearance:none;}}&:not( :focus-within ){--wp-components-color-background:",Ds.theme.gray[100],";}");function sz({searchRef:e,value:t,onChange:n,onClose:o}){if(!o&&!t)return(0,r.createElement)($E,{icon:rz});return(0,r.createElement)(my,{size:"small",icon:zw,label:o?(0,u.__)("Close search"):(0,u.__)("Reset search"),onClick:null!=o?o:()=>{n(""),e.current?.focus()}})}const lz=(0,Uo.forwardRef)((function({__nextHasNoMarginBottom:e=!1,className:t,onChange:n,value:o,label:i=(0,u.__)("Search"),placeholder:a=(0,u.__)("Search"),hideLabelFromVision:s=!0,onClose:l,size:f="default",...m},p){delete m.disabled;const h=(0,Uo.useRef)(null),g=(0,d.useInstanceId)(lz,"components-search-control"),v=(0,Uo.useMemo)((()=>({BaseControl:{_overrides:{__nextHasNoMarginBottom:e}},InputBase:{isBorderless:!0}})),[e]);return(0,r.createElement)(mi,{value:v},(0,r.createElement)(az,{__next40pxDefaultSize:!0,id:g,hideLabelFromVision:s,label:i,ref:(0,d.useMergeRefs)([h,p]),type:"search",size:f,className:c()("components-search-control",t),onChange:e=>n(null!=e?e:""),autoComplete:"off",placeholder:a,value:null!=o?o:"",suffix:(0,r.createElement)(iz,{size:f},(0,r.createElement)(sz,{searchRef:h,value:o,onChange:n,onClose:l})),...m}))})),cz=lz;const uz=oz((function({debouncedSpeak:e,onCloseSearch:t,onSearch:n,search:o,title:i}){const{navigationTree:{items:a}}=CO(),{menu:s}=XO(),l=(0,Uo.useRef)(null);(0,Uo.useEffect)((()=>{const e=setTimeout((()=>{l.current?.focus()}),wO);return()=>{clearTimeout(e)}}),[]),(0,Uo.useEffect)((()=>{if(!o)return;const t=Object.values(a).filter((e=>e._isVisible)).length,n=(0,u.sprintf)((0,u._n)("%d result found.","%d results found.",t),t);e(n)}),[a,o]);const c=()=>{n?.(""),t()},d=`components-navigation__menu-title-search-${s}`,f=(0,u.sprintf)((0,u.__)("Search %s"),i?.toLowerCase()).trim();return(0,r.createElement)(RO,null,(0,r.createElement)(cz,{__nextHasNoMarginBottom:!0,className:"components-navigation__menu-search-input",id:d,onChange:e=>n?.(e),onKeyDown:e=>{"Escape"!==e.code||e.defaultPrevented||(e.preventDefault(),c())},placeholder:f,onClose:c,ref:l,value:o}))}));function dz({hasSearch:e,onSearch:t,search:n,title:o,titleAction:i}){const[a,s]=(0,Uo.useState)(!1),{menu:l}=XO(),c=(0,Uo.useRef)(null);if(!o)return null;const d=`components-navigation__menu-title-${l}`,f=(0,u.sprintf)((0,u.__)("Search in %s"),o);return(0,r.createElement)(IO,{className:"components-navigation__menu-title"},!a&&(0,r.createElement)(NO,{as:"h2",className:"components-navigation__menu-title-heading",level:3},(0,r.createElement)("span",{id:d},o),(e||i)&&(0,r.createElement)(MO,null,i,e&&(0,r.createElement)(my,{size:"small",variant:"tertiary",label:f,onClick:()=>s(!0),ref:c},(0,r.createElement)($E,{icon:rz})))),a&&(0,r.createElement)("div",{className:gl({type:"slide-in",origin:"left"})},(0,r.createElement)(uz,{onCloseSearch:()=>{s(!1),setTimeout((()=>{c.current?.focus()}),wO)},onSearch:t,search:n,title:o})))}function fz({search:e}){const{navigationTree:{items:t}}=CO(),n=Object.values(t).filter((e=>e._isVisible)).length;return!e||n?null:(0,r.createElement)(DO,null,(0,r.createElement)(AO,null,(0,u.__)("No results found.")," "))}const mz=function(e){const{backButtonLabel:t,children:n,className:o,hasSearch:i,menu:a=xO,onBackButtonClick:s,onSearch:l,parentMenu:u,search:d,isSearchDebouncing:f,title:m,titleAction:p}=e,[h,g]=(0,Uo.useState)("");(e=>{const{navigationTree:{addMenu:t,removeMenu:n}}=CO(),r=e.menu||xO;(0,Uo.useEffect)((()=>(t(r,{...e,menu:r}),()=>{n(r)})),[])})(e);const{activeMenu:v}=CO(),b={menu:a,search:h};if(v!==a)return(0,r.createElement)(KO.Provider,{value:b},n);const y=!!l,x=y?d:h,w=y?l:g,E=`components-navigation__menu-title-${a}`,_=c()("components-navigation__menu",o);return(0,r.createElement)(KO.Provider,{value:b},(0,r.createElement)(PO,{className:_},(u||s)&&(0,r.createElement)(WO,{backButtonLabel:t,parentMenu:u,onClick:s}),m&&(0,r.createElement)(dz,{hasSearch:i,onSearch:w,search:x,title:m,titleAction:p}),(0,r.createElement)(KT,null,(0,r.createElement)("ul",{"aria-labelledby":E},n,x&&!f&&(0,r.createElement)(fz,{search:x})))))};function pz(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[s=n+1])throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--o){s++;break}}else if("("===e[s]&&(o++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));i+=e[s++]}else i+=e[s++]+e[s++];if(o)throw new TypeError("Unbalanced pattern at ".concat(n));if(!i)throw new TypeError("Missing pattern at ".concat(n));t.push({type:"PATTERN",index:n,value:i}),n=s}else{for(var a="",s=n+1;s<e.length;){var l=e.charCodeAt(s);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;a+=e[s++]}if(!a)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:a}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,i="[^".concat(gz(t.delimiter||"/#?"),"]+?"),a=[],s=0,l=0,c="",u=function(e){if(l<n.length&&n[l].type===e)return n[l++].value},d=function(e){var t=u(e);if(void 0!==t)return t;var r=n[l],o=r.type,i=r.index;throw new TypeError("Unexpected ".concat(o," at ").concat(i,", expected ").concat(e))},f=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t};l<n.length;){var m=u("CHAR"),p=u("NAME"),h=u("PATTERN");if(p||h){var g=m||"";-1===o.indexOf(g)&&(c+=g,g=""),c&&(a.push(c),c=""),a.push({name:p||s++,prefix:g,suffix:"",pattern:h||i,modifier:u("MODIFIER")||""})}else{var v=m||u("ESCAPED_CHAR");if(v)c+=v;else if(c&&(a.push(c),c=""),u("OPEN")){g=f();var b=u("NAME")||"",y=u("PATTERN")||"",x=f();d("CLOSE"),a.push({name:b||(y?s++:""),pattern:b&&!y?i:y,prefix:g,suffix:x,modifier:u("MODIFIER")||""})}else d("END")}}return a}function hz(e,t){var n=[];return function(e,t,n){void 0===n&&(n={});var r=n.decode,o=void 0===r?function(e){return e}:r;return function(n){var r=e.exec(n);if(!r)return!1;for(var i=r[0],a=r.index,s=Object.create(null),l=function(e){if(void 0===r[e])return"continue";var n=t[e-1];"*"===n.modifier||"+"===n.modifier?s[n.name]=r[e].split(n.prefix+n.suffix).map((function(e){return o(e,n)})):s[n.name]=o(r[e],n)},c=1;c<r.length;c++)l(c);return{path:i,index:a,params:s}}}(yz(e,n,t),n,t)}function gz(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function vz(e){return e&&e.sensitive?"":"i"}function bz(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var r=n.strict,o=void 0!==r&&r,i=n.start,a=void 0===i||i,s=n.end,l=void 0===s||s,c=n.encode,u=void 0===c?function(e){return e}:c,d=n.delimiter,f=void 0===d?"/#?":d,m=n.endsWith,p="[".concat(gz(void 0===m?"":m),"]|$"),h="[".concat(gz(f),"]"),g=a?"^":"",v=0,b=e;v<b.length;v++){var y=b[v];if("string"==typeof y)g+=gz(u(y));else{var x=gz(u(y.prefix)),w=gz(u(y.suffix));if(y.pattern)if(t&&t.push(y),x||w)if("+"===y.modifier||"*"===y.modifier){var E="*"===y.modifier?"?":"";g+="(?:".concat(x,"((?:").concat(y.pattern,")(?:").concat(w).concat(x,"(?:").concat(y.pattern,"))*)").concat(w,")").concat(E)}else g+="(?:".concat(x,"(").concat(y.pattern,")").concat(w,")").concat(y.modifier);else"+"===y.modifier||"*"===y.modifier?g+="((?:".concat(y.pattern,")").concat(y.modifier,")"):g+="(".concat(y.pattern,")").concat(y.modifier);else g+="(?:".concat(x).concat(w,")").concat(y.modifier)}}if(l)o||(g+="".concat(h,"?")),g+=n.endsWith?"(?=".concat(p,")"):"$";else{var _=e[e.length-1],S="string"==typeof _?h.indexOf(_[_.length-1])>-1:void 0===_;o||(g+="(?:".concat(h,"(?=").concat(p,"))?")),S||(g+="(?=".concat(h,"|").concat(p,")"))}return new RegExp(g,vz(n))}(pz(e,n),t,n)}function yz(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,o=n.exec(e.source);o;)t.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return yz(e,t,n).source}));return new RegExp("(?:".concat(r.join("|"),")"),vz(n))}(e,t,n):bz(e,t,n)}function xz(e,t){return hz(t,{decode:decodeURIComponent})(e)}const wz=(0,Uo.createContext)({location:{},goTo:()=>{},goBack:()=>{},goToParent:()=>{},addScreen:()=>{},removeScreen:()=>{},params:{}});const Ez={name:"xpkswc",styles:"overflow-x:hidden;contain:content"},_z=Ts({"0%":{opacity:0,transform:"translateX( 50px )"},"100%":{opacity:1,transform:"none"}}),Sz=Ts({"0%":{opacity:0,transform:"translateX( -50px )"},"100%":{opacity:1,transform:"none"}}),Cz=e=>Ps("overflow-x:auto;max-height:100%;",(({isInitial:e,isBack:t,isRTL:n})=>{if(e&&!t)return;return Ps("animation-duration:0.14s;animation-timing-function:ease-in-out;will-change:transform,opacity;animation-name:",n&&t||!n&&!t?_z:Sz,";@media ( prefers-reduced-motion ){animation-duration:0s;}","")})(e),";","");function kz(e=[],t){switch(t.type){case"add":return[...e,t.screen];case"remove":return e.filter((e=>e.id!==t.screen.id))}return e}const Pz=os((function(e,t){const{initialPath:n,children:o,className:i,...a}=rs(e,"NavigatorProvider"),[s,l]=(0,Uo.useState)([{path:n}]),c=(0,Uo.useRef)([]),[u,d]=(0,Uo.useReducer)(kz,[]),f=(0,Uo.useRef)([]);(0,Uo.useEffect)((()=>{f.current=u}),[u]),(0,Uo.useEffect)((()=>{c.current=s}),[s]);const m=(0,Uo.useRef)(),p=(0,Uo.useMemo)((()=>{let e;if(0===s.length||void 0===(e=s[s.length-1].path))return void(m.current=void 0);const t=(e=>{const t=function(e,t){for(const n of t){const t=xz(e,n.path);if(t)return{params:t.params,id:n.id}}}(e,u);return m.current&&t&&ow()(t.params,m.current.params)&&t.id===m.current.id?m.current:t})(e);return m.current=t,t}),[u,s]),h=(0,Uo.useCallback)((e=>d({type:"add",screen:e})),[]),g=(0,Uo.useCallback)((e=>d({type:"remove",screen:e})),[]),v=(0,Uo.useCallback)((()=>{l((e=>e.length<=1?e:[...e.slice(0,-2),{...e[e.length-2],isBack:!0,hasRestoredFocus:!1}]))}),[]),b=(0,Uo.useCallback)(((e,t={})=>{const{focusTargetSelector:n,isBack:r=!1,skipFocus:o=!1,replace:i=!1,...a}=t;r&&c.current.length>1&&c.current[c.current.length-2].path===e?v():l((t=>{const s={...a,path:e,isBack:r,hasRestoredFocus:!1,skipFocus:o};if(0===t.length)return i?[]:[s];const l=t.slice(t.length>49?1:0,-1);return i||l.push({...t[t.length-1],focusTargetSelector:n}),l.push(s),l}))}),[v]),y=(0,Uo.useCallback)(((e={})=>{const t=c.current[c.current.length-1].path;if(void 0===t)return;const n=function(e,t){if(!e.startsWith("/"))return;const n=e.split("/");let r;for(;n.length>1&&void 0===r;){n.pop();const e=""===n.join("/")?"/":n.join("/");t.find((t=>!1!==xz(e,t.path)))&&(r=e)}return r}(t,f.current);void 0!==n&&b(n,{...e,isBack:!0})}),[b]),x=(0,Uo.useMemo)((()=>({location:{...s[s.length-1],isInitial:1===s.length},params:p?p.params:{},match:p?p.id:void 0,goTo:b,goBack:v,goToParent:y,addScreen:h,removeScreen:g})),[s,p,b,v,y,h,g]),w=ns(),E=(0,Uo.useMemo)((()=>w(Ez,i)),[i,w]);return(0,r.createElement)(xs,{ref:t,className:E,...a},(0,r.createElement)(wz.Provider,{value:x},o))}),"NavigatorProvider"),Tz=Pz,Iz=window.wp.escapeHtml;const Rz=os((function(e,t){const n=(0,Uo.useId)(),{children:o,className:i,path:a,...s}=rs(e,"NavigatorScreen"),{location:l,match:c,addScreen:f,removeScreen:m}=(0,Uo.useContext)(wz),p=c===n,h=(0,Uo.useRef)(null);(0,Uo.useEffect)((()=>{const e={id:n,path:(0,Iz.escapeAttribute)(a)};return f(e),()=>m(e)}),[n,a,f,m]);const g=(0,u.isRTL)(),{isInitial:v,isBack:b}=l,y=ns(),x=(0,Uo.useMemo)((()=>y(Cz({isInitial:v,isBack:b,isRTL:g}),i)),[i,y,v,b,g]),w=(0,Uo.useRef)(l);(0,Uo.useEffect)((()=>{w.current=l}),[l]);const E=l.isInitial&&!l.isBack;(0,Uo.useEffect)((()=>{if(E||!p||!h.current||w.current.hasRestoredFocus||l.skipFocus)return;const e=h.current.ownerDocument.activeElement;if(h.current.contains(e))return;let t=null;if(l.isBack&&l?.focusTargetSelector&&(t=h.current.querySelector(l.focusTargetSelector)),!t){const e=HT.focus.tabbable.find(h.current)[0];t=null!=e?e:h.current}w.current.hasRestoredFocus=!0,t.focus()}),[E,p,l.isBack,l.focusTargetSelector,l.skipFocus]);const _=(0,d.useMergeRefs)([t,h]);return p?(0,r.createElement)(xs,{ref:_,className:x,...s},o):null}),"NavigatorScreen"),Mz=Rz;const Nz=function(){const{location:e,params:t,goTo:n,goBack:r,goToParent:o}=(0,Uo.useContext)(wz);return{location:e,goTo:n,goBack:r,goToParent:o,params:t}},Dz=(e,t)=>`[${e}="${t}"]`;const Az=os((function(e,t){const n=function(e){const{path:t,onClick:n,as:r=my,attributeName:o="id",...i}=rs(e,"NavigatorButton"),a=(0,Iz.escapeAttribute)(t),{goTo:s}=Nz();return{as:r,onClick:(0,Uo.useCallback)((e=>{e.preventDefault(),s(a,{focusTargetSelector:Dz(o,a)}),n?.(e)}),[s,n,o,a]),...i,[o]:a}}(e);return(0,r.createElement)(xs,{ref:t,...n})}),"NavigatorButton");function Oz(e){const{onClick:t,as:n=my,goToParent:r=!1,...o}=rs(e,"NavigatorBackButton"),{goBack:i,goToParent:a}=Nz();return{as:n,onClick:(0,Uo.useCallback)((e=>{e.preventDefault(),r?a():i(),t?.(e)}),[r,a,i,t]),...o}}const zz=os((function(e,t){const n=Oz(e);return(0,r.createElement)(xs,{ref:t,...n})}),"NavigatorBackButton");const Lz=os((function(e,t){const n=Oz({...e,goToParent:!0});return(0,r.createElement)(xs,{ref:t,...n})}),"NavigatorToParentButton"),Fz=()=>{};function Bz(e){switch(e){case"success":case"warning":case"info":return"polite";default:return"assertive"}}const jz=function({className:e,status:t="info",children:n,spokenMessage:o=n,onRemove:i=Fz,isDismissible:a=!0,actions:s=[],politeness:l=Bz(t),__unstableHTML:d,onDismiss:f=Fz}){!function(e,t){const n="string"==typeof e?e:(0,Uo.renderToString)(e);(0,Uo.useEffect)((()=>{n&&(0,jy.speak)(n,t)}),[n,t])}(o,l);const m=c()(e,"components-notice","is-"+t,{"is-dismissible":a});return d&&"string"==typeof n&&(n=(0,r.createElement)(Uo.RawHTML,null,n)),(0,r.createElement)("div",{className:m},(0,r.createElement)(ws,null,function(e){switch(e){case"warning":return(0,u.__)("Warning notice");case"info":return(0,u.__)("Information notice");case"error":return(0,u.__)("Error notice");default:return(0,u.__)("Notice")}}(t)),(0,r.createElement)("div",{className:"components-notice__content"},n,(0,r.createElement)("div",{className:"components-notice__actions"},s.map((({className:e,label:t,isPrimary:n,variant:o,noDefaultClasses:i=!1,onClick:a,url:s},l)=>{let u=o;return"primary"===o||i||(u=s?"link":"secondary"),void 0===u&&n&&(u="primary"),(0,r.createElement)(my,{key:l,href:s,variant:u,onClick:s?void 0:a,className:c()("components-notice__action",e)},t)})))),a&&(0,r.createElement)(my,{className:"components-notice__dismiss",icon:ex,label:(0,u.__)("Close"),onClick:()=>{f(),i()}}))},Vz=()=>{};const Hz=function({notices:e,onRemove:t=Vz,className:n,children:o}){const i=e=>()=>t(e);return n=c()("components-notice-list",n),(0,r.createElement)("div",{className:n},o,[...e].reverse().map((e=>{const{content:t,...n}=e;return(0,r.createElement)(jz,{...n,key:e.id,onRemove:i(e.id)},e.content)})))};const $z=function({label:e,children:t}){return(0,r.createElement)("div",{className:"components-panel__header"},e&&(0,r.createElement)("h2",null,e),t)};const Wz=(0,Uo.forwardRef)((function({header:e,className:t,children:n},o){const i=c()(t,"components-panel");return(0,r.createElement)("div",{className:i,ref:o},e&&(0,r.createElement)($z,{label:e}),n)})),Uz=(0,r.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(n.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),Gz=()=>{};const qz=(0,Uo.forwardRef)((({isOpened:e,icon:t,title:n,...o},i)=>n?(0,r.createElement)("h2",{className:"components-panel__body-title"},(0,r.createElement)(my,{className:"components-panel__body-toggle","aria-expanded":e,ref:i,...o},(0,r.createElement)("span",{"aria-hidden":"true"},(0,r.createElement)(uy,{className:"components-panel__arrow",icon:e?Uz:WE})),n,t&&(0,r.createElement)(uy,{icon:t,className:"components-panel__icon",size:20}))):null)),Yz=(0,Uo.forwardRef)((function(e,t){const{buttonProps:n={},children:o,className:i,icon:a,initialOpen:s,onToggle:l=Gz,opened:u,title:f,scrollAfterOpen:m=!0}=e,[p,h]=XE(u,{initial:void 0===s||s,fallback:!1}),g=(0,Uo.useRef)(null),v=(0,d.useReducedMotion)()?"auto":"smooth",b=(0,Uo.useRef)();b.current=m,ui((()=>{p&&b.current&&g.current?.scrollIntoView&&g.current.scrollIntoView({inline:"nearest",block:"nearest",behavior:v})}),[p,v]);const y=c()("components-panel__body",i,{"is-opened":p});return(0,r.createElement)("div",{className:y,ref:(0,d.useMergeRefs)([g,t])},(0,r.createElement)(qz,{icon:a,isOpened:Boolean(p),onClick:e=>{e.preventDefault();const t=!p;h(t),l(t)},title:f,...n}),"function"==typeof o?o({opened:Boolean(p)}):p&&o)})),Kz=Yz;const Xz=(0,Uo.forwardRef)((function({className:e,children:t},n){return(0,r.createElement)("div",{className:c()("components-panel__row",e),ref:n},t)})),Zz=(0,r.createElement)(n.SVG,{className:"components-placeholder__illustration",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",preserveAspectRatio:"none"},(0,r.createElement)(n.Path,{vectorEffect:"non-scaling-stroke",d:"M60 60 0 0"}));const Jz=function(e){const{icon:t,children:n,label:o,instructions:i,className:a,notices:s,preview:l,isColumnLayout:u,withIllustration:f,...m}=e,[p,{width:h}]=(0,d.useResizeObserver)();let g;"number"==typeof h&&(g={"is-large":h>=480,"is-medium":h>=160&&h<480,"is-small":h<160});const v=c()("components-placeholder",a,g,f?"has-illustration":null),b=c()("components-placeholder__fieldset",{"is-column-layout":u});return(0,Uo.useEffect)((()=>{i&&(0,jy.speak)(i)}),[i]),(0,r.createElement)("div",{...m,className:v},f?Zz:null,p,s,l&&(0,r.createElement)("div",{className:"components-placeholder__preview"},l),(0,r.createElement)("div",{className:"components-placeholder__label"},(0,r.createElement)(uy,{icon:t}),o),!!i&&(0,r.createElement)("div",{className:"components-placeholder__instructions"},i),(0,r.createElement)("div",{className:b},n))},Qz=e=>e.every((e=>null!==e.parent));function eL(e){const t=e.map((e=>({children:[],parent:null,...e,id:String(e.id)})));if(!Qz(t))return t;const n=t.reduce(((e,t)=>{const{parent:n}=t;return e[n]||(e[n]=[]),e[n].push(t),e}),{}),r=e=>e.map((e=>{const t=n[e.id];return{...e,children:t&&t.length?r(t):[]}}));return r(n[0]||[])}const tL=window.wp.htmlEntities;function nL(e,t=0){return e.flatMap((e=>[{value:e.id,label:" ".repeat(3*t)+(0,tL.decodeEntities)(e.name)},...nL(e.children||[],t+1)]))}const rL=function(e){const{label:t,noOptionLabel:n,onChange:o,selectedId:i,tree:a=[],...s}=Nv(e),l=(0,Uo.useMemo)((()=>[n&&{value:"",label:n},...nL(a)].filter((e=>!!e))),[n,a]);return(0,r.createElement)(qE,{label:t,options:l,onChange:o,value:i,...s})};function oL({__next40pxDefaultSize:e,label:t,noOptionLabel:n,authorList:o,selectedAuthorId:i,onChange:a}){if(!o)return null;const s=eL(o);return(0,r.createElement)(rL,{label:t,noOptionLabel:n,onChange:a,tree:s,selectedId:void 0!==i?String(i):void 0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e})}function iL({__next40pxDefaultSize:e,label:t,noOptionLabel:n,categoriesList:o,selectedCategoryId:i,onChange:a,...s}){const l=(0,Uo.useMemo)((()=>eL(o)),[o]);return(0,r.createElement)(rL,{label:t,noOptionLabel:n,onChange:a,tree:l,selectedId:void 0!==i?String(i):void 0,...s,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e})}function aL(e){return"categoriesList"in e}function sL(e){return"categorySuggestions"in e}const lL=function({__next40pxDefaultSize:e=!1,authorList:t,selectedAuthorId:n,numberOfItems:o,order:i,orderBy:a,maxItems:s=100,minItems:l=1,onAuthorChange:c,onNumberOfItemsChange:d,onOrderChange:f,onOrderByChange:m,...p}){return(0,r.createElement)(jS,{spacing:"4",className:"components-query-controls"},[f&&m&&(0,r.createElement)(YE,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e,key:"query-controls-order-select",label:(0,u.__)("Order by"),value:`${a}/${i}`,options:[{label:(0,u.__)("Newest to oldest"),value:"date/desc"},{label:(0,u.__)("Oldest to newest"),value:"date/asc"},{label:(0,u.__)("A → Z"),value:"title/asc"},{label:(0,u.__)("Z → A"),value:"title/desc"}],onChange:e=>{if("string"!=typeof e)return;const[t,n]=e.split("/");n!==i&&f(n),t!==a&&m(t)}}),aL(p)&&p.categoriesList&&p.onCategoryChange&&(0,r.createElement)(iL,{__next40pxDefaultSize:e,key:"query-controls-category-select",categoriesList:p.categoriesList,label:(0,u.__)("Category"),noOptionLabel:(0,u._x)("All","categories"),selectedCategoryId:p.selectedCategoryId,onChange:p.onCategoryChange}),sL(p)&&p.categorySuggestions&&p.onCategoryChange&&(0,r.createElement)(rO,{__next40pxDefaultSize:e,__nextHasNoMarginBottom:!0,key:"query-controls-categories-select",label:(0,u.__)("Categories"),value:p.selectedCategories&&p.selectedCategories.map((e=>({id:e.id,value:e.name||e.value}))),suggestions:Object.keys(p.categorySuggestions),onChange:p.onCategoryChange,maxSuggestions:20}),c&&(0,r.createElement)(oL,{__next40pxDefaultSize:e,key:"query-controls-author-select",authorList:t,label:(0,u.__)("Author"),noOptionLabel:(0,u._x)("All","authors"),selectedAuthorId:n,onChange:c}),d&&(0,r.createElement)(k_,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e,key:"query-controls-range-control",label:(0,u.__)("Number of items"),value:o,onChange:d,min:l,max:s,required:!0})])},cL=(0,Uo.createContext)({store:void 0,disabled:void 0});const uL=(0,Uo.forwardRef)((function({value:e,children:t,...n},o){const{store:i,disabled:a}=(0,Uo.useContext)(cL),s=i?.useState("value"),l=void 0!==s&&s===e;return(0,r.createElement)(pE,{disabled:a,store:i,ref:o,value:e,render:(0,r.createElement)(my,{variant:l?"primary":"secondary",...n})},t||e)})),dL=uL;const fL=(0,Uo.forwardRef)((function({label:e,checked:t,defaultChecked:n,disabled:o,onChange:i,children:a,...s},l){const c=Jw({value:t,defaultValue:n,setValue:e=>{i?.(null!=e?e:void 0)}}),u=(0,Uo.useMemo)((()=>({store:c,disabled:o})),[c,o]);return(0,r.createElement)(cL.Provider,{value:u},(0,r.createElement)(oE,{store:c,render:(0,r.createElement)(Ok,null,a),"aria-label":e,ref:l,...s}))})),mL=fL;const pL=function e(t){const{label:n,className:o,selected:i,help:a,onChange:s,hideLabelFromVision:l,options:u=[],...f}=t,m=`inspector-radio-control-${(0,d.useInstanceId)(e)}`,p=e=>s(e.target.value);return u?.length?(0,r.createElement)(iy,{__nextHasNoMarginBottom:!0,label:n,id:m,hideLabelFromVision:l,help:a,className:c()(o,"components-radio-control")},(0,r.createElement)(jS,{spacing:1},u.map(((e,t)=>(0,r.createElement)("div",{key:`${m}-${t}`,className:"components-radio-control__option"},(0,r.createElement)("input",{id:`${m}-${t}`,className:"components-radio-control__input",type:"radio",name:m,value:e.value,onChange:p,checked:e.value===i,"aria-describedby":a?`${m}__help`:void 0,...f}),(0,r.createElement)("label",{className:"components-radio-control__label",htmlFor:`${m}-${t}`},e.label)))))):null};var hL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gL=function(){return gL=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},gL.apply(this,arguments)},vL={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},bL={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},yL={width:"20px",height:"20px",position:"absolute"},xL={top:gL(gL({},vL),{top:"-5px"}),right:gL(gL({},bL),{left:void 0,right:"-5px"}),bottom:gL(gL({},vL),{top:void 0,bottom:"-5px"}),left:gL(gL({},bL),{left:"-5px"}),topRight:gL(gL({},yL),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:gL(gL({},yL),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:gL(gL({},yL),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:gL(gL({},yL),{left:"-10px",top:"-10px",cursor:"nw-resize"})},wL=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return hL(t,e),t.prototype.render=function(){return r.createElement("div",{className:this.props.className||"",style:gL(gL({position:"absolute",userSelect:"none"},xL[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(r.PureComponent),EL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_L=function(){return _L=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},_L.apply(this,arguments)},SL={width:"auto",height:"auto"},CL=function(e,t,n){return Math.max(Math.min(e,n),t)},kL=function(e,t){return Math.round(e/t)*t},PL=function(e,t){return new RegExp(e,"i").test(t)},TL=function(e){return Boolean(e.touches&&e.touches.length)},IL=function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,o){return Math.abs(r-e)<Math.abs(t[n]-e)?o:n}),0),o=Math.abs(t[r]-e);return 0===n||o<n?t[r]:e},RL=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},ML=function(e,t,n,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return r*(Number(e.replace("vh",""))/100)}return e},NL=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],DL="__resizable_base__",AL=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(DL):t.className+=DL,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return EL(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||SL},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return RL(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?RL(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?RL(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,o=this.props.boundsByDirection,i=this.state.direction,a=o&&PL("left",i),s=o&&PL("top",i);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=a?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=s?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,o=this.state,i=o.direction,a=o.original,s=this.props,l=s.lockAspectRatio,c=s.lockAspectRatioExtraHeight,u=s.lockAspectRatioExtraWidth,d=a.width,f=a.height,m=c||0,p=u||0;return PL("right",i)&&(d=a.width+(e-a.x)*r/n,l&&(f=(d-p)/this.ratio+m)),PL("left",i)&&(d=a.width-(e-a.x)*r/n,l&&(f=(d-p)/this.ratio+m)),PL("bottom",i)&&(f=a.height+(t-a.y)*r/n,l&&(d=(f-m)*this.ratio+p)),PL("top",i)&&(f=a.height-(t-a.y)*r/n,l&&(d=(f-m)*this.ratio+p)),{newWidth:d,newHeight:f}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var o=this.props,i=o.lockAspectRatio,a=o.lockAspectRatioExtraHeight,s=o.lockAspectRatioExtraWidth,l=void 0===r.width?10:r.width,c=void 0===n.width||n.width<0?e:n.width,u=void 0===r.height?10:r.height,d=void 0===n.height||n.height<0?t:n.height,f=a||0,m=s||0;if(i){var p=(u-f)*this.ratio+m,h=(d-f)*this.ratio+m,g=(l-m)/this.ratio+f,v=(c-m)/this.ratio+f,b=Math.max(l,p),y=Math.min(c,h),x=Math.max(u,g),w=Math.min(d,v);e=CL(e,b,y),t=CL(t,x,w)}else e=CL(e,l,c),t=CL(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),o=r.left,i=r.top,a=r.right,s=r.bottom;this.resizableLeft=o,this.resizableRight=a,this.resizableTop=i,this.resizableBottom=s}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(r=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent&&TL(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var i=this.window.getComputedStyle(this.resizable);if("auto"!==i.flexBasis){var a=this.parentNode;if(a){var s=this.window.getComputedStyle(a).flexDirection;this.flexDir=s.startsWith("row")?"row":"column",n=i.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:r,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:_L(_L({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&TL(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var n=this.props,r=n.maxWidth,o=n.maxHeight,i=n.minWidth,a=n.minHeight,s=TL(e)?e.touches[0].clientX:e.clientX,l=TL(e)?e.touches[0].clientY:e.clientY,c=this.state,u=c.direction,d=c.original,f=c.width,m=c.height,p=this.getParentSize(),h=function(e,t,n,r,o,i,a){return r=ML(r,e.width,t,n),o=ML(o,e.height,t,n),i=ML(i,e.width,t,n),a=ML(a,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===i?void 0:Number(i),minHeight:void 0===a?void 0:Number(a)}}(p,this.window.innerWidth,this.window.innerHeight,r,o,i,a);r=h.maxWidth,o=h.maxHeight,i=h.minWidth,a=h.minHeight;var g=this.calculateNewSizeFromDirection(s,l),v=g.newHeight,b=g.newWidth,y=this.calculateNewMaxFromBoundary(r,o);this.props.snap&&this.props.snap.x&&(b=IL(b,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(v=IL(v,this.props.snap.y,this.props.snapGap));var x=this.calculateNewSizeFromAspectRatio(b,v,{width:y.maxWidth,height:y.maxHeight},{width:i,height:a});if(b=x.newWidth,v=x.newHeight,this.props.grid){var w=kL(b,this.props.grid[0]),E=kL(v,this.props.grid[1]),_=this.props.snapGap||0;b=0===_||Math.abs(w-b)<=_?w:b,v=0===_||Math.abs(E-v)<=_?E:v}var S={width:b-d.width,height:v-d.height};if(f&&"string"==typeof f)if(f.endsWith("%"))b=b/p.width*100+"%";else if(f.endsWith("vw")){b=b/this.window.innerWidth*100+"vw"}else if(f.endsWith("vh")){b=b/this.window.innerHeight*100+"vh"}if(m&&"string"==typeof m)if(m.endsWith("%"))v=v/p.height*100+"%";else if(m.endsWith("vw")){v=v/this.window.innerWidth*100+"vw"}else if(m.endsWith("vh")){v=v/this.window.innerHeight*100+"vh"}var C={width:this.createSizeForCssProperty(b,"width"),height:this.createSizeForCssProperty(v,"height")};"row"===this.flexDir?C.flexBasis=C.width:"column"===this.flexDir&&(C.flexBasis=C.height),(0,tr.flushSync)((function(){t.setState(C)})),this.props.onResize&&this.props.onResize(e,u,this.resizable,S)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,o=t.original;if(n&&this.resizable){var i={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,i),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:_L(_L({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,o=t.handleStyles,i=t.handleClasses,a=t.handleWrapperStyle,s=t.handleWrapperClass,l=t.handleComponent;if(!n)return null;var c=Object.keys(n).map((function(t){return!1!==n[t]?r.createElement(wL,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:o&&o[t],className:i&&i[t]},l&&l[t]?l[t]:null):null}));return r.createElement("div",{className:s,style:a},c)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==NL.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=_L(_L(_L({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return r.createElement(o,_L({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&r.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(r.PureComponent);const OL=()=>{},zL={bottom:"bottom",corner:"corner"};function LL({axis:e,fadeTimeout:t=180,onResize:n=OL,position:r=zL.bottom,showPx:o=!1}){const[i,a]=(0,d.useResizeObserver)(),s=!!e,[l,c]=(0,Uo.useState)(!1),[u,f]=(0,Uo.useState)(!1),{width:m,height:p}=a,h=(0,Uo.useRef)(p),g=(0,Uo.useRef)(m),v=(0,Uo.useRef)(),b=(0,Uo.useCallback)((()=>{v.current&&window.clearTimeout(v.current),v.current=window.setTimeout((()=>{s||(c(!1),f(!1))}),t)}),[t,s]);(0,Uo.useEffect)((()=>{if(!(null!==m||null!==p))return;const e=m!==g.current,t=p!==h.current;if(e||t){if(m&&!g.current&&p&&!h.current)return g.current=m,void(h.current=p);e&&(c(!0),g.current=m),t&&(f(!0),h.current=p),n({width:m,height:p}),b()}}),[m,p,n,b]);const y=function({axis:e,height:t,moveX:n=!1,moveY:r=!1,position:o=zL.bottom,showPx:i=!1,width:a}){if(!n&&!r)return;if(o===zL.corner)return`${a} x ${t}`;const s=i?" px":"";if(e){if("x"===e&&n)return`${a}${s}`;if("y"===e&&r)return`${t}${s}`}if(n&&r)return`${a} x ${t}`;if(n)return`${a}${s}`;if(r)return`${t}${s}`;return}({axis:e,height:p,moveX:l,moveY:u,position:r,showPx:o,width:m});return{label:y,resizeListener:i}}const FL=bs("div",{target:"e1wq7y4k3"})({name:"1cd7zoc",styles:"bottom:0;box-sizing:border-box;left:0;pointer-events:none;position:absolute;right:0;top:0"}),BL=bs("div",{target:"e1wq7y4k2"})({name:"ajymcs",styles:"align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;opacity:0;pointer-events:none;transition:opacity 120ms linear"}),jL=bs("div",{target:"e1wq7y4k1"})("background:",Ds.theme.foreground,";border-radius:2px;box-sizing:border-box;font-family:",Yb("default.fontFamily"),";font-size:12px;color:",Ds.theme.foregroundInverted,";padding:4px 8px;position:relative;"),VL=bs(mv,{target:"e1wq7y4k0"})("&&&{color:",Ds.theme.foregroundInverted,";display:block;font-size:13px;line-height:1.4;white-space:nowrap;}");const HL=(0,Uo.forwardRef)((function({label:e,position:t=zL.corner,zIndex:n=1e3,...o},i){const a=!!e,s=t===zL.bottom,l=t===zL.corner;if(!a)return null;let c={opacity:a?1:void 0,zIndex:n},d={};return s&&(c={...c,position:"absolute",bottom:-10,left:"50%",transform:"translate(-50%, 0)"},d={transform:"translate(0, 100%)"}),l&&(c={...c,position:"absolute",top:4,right:(0,u.isRTL)()?void 0:4,left:(0,u.isRTL)()?4:void 0}),(0,r.createElement)(BL,{"aria-hidden":"true",className:"components-resizable-tooltip__tooltip-wrapper",ref:i,style:c,...o},(0,r.createElement)(jL,{className:"components-resizable-tooltip__tooltip",style:d},(0,r.createElement)(VL,{as:"span"},e)))})),$L=HL,WL=()=>{};const UL=(0,Uo.forwardRef)((function({axis:e,className:t,fadeTimeout:n=180,isVisible:o=!0,labelRef:i,onResize:a=WL,position:s=zL.bottom,showPx:l=!0,zIndex:u=1e3,...d},f){const{label:m,resizeListener:p}=LL({axis:e,fadeTimeout:n,onResize:a,showPx:l,position:s});if(!o)return null;const h=c()("components-resize-tooltip",t);return(0,r.createElement)(FL,{"aria-hidden":"true",className:h,ref:f,...d},p,(0,r.createElement)($L,{"aria-hidden":d["aria-hidden"],label:m,position:s,ref:i,zIndex:u}))})),GL=UL,qL="components-resizable-box__handle",YL="components-resizable-box__side-handle",KL="components-resizable-box__corner-handle",XL={top:c()(qL,YL,"components-resizable-box__handle-top"),right:c()(qL,YL,"components-resizable-box__handle-right"),bottom:c()(qL,YL,"components-resizable-box__handle-bottom"),left:c()(qL,YL,"components-resizable-box__handle-left"),topLeft:c()(qL,KL,"components-resizable-box__handle-top","components-resizable-box__handle-left"),topRight:c()(qL,KL,"components-resizable-box__handle-top","components-resizable-box__handle-right"),bottomRight:c()(qL,KL,"components-resizable-box__handle-bottom","components-resizable-box__handle-right"),bottomLeft:c()(qL,KL,"components-resizable-box__handle-bottom","components-resizable-box__handle-left")},ZL={width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},JL={top:ZL,right:ZL,bottom:ZL,left:ZL,topLeft:ZL,topRight:ZL,bottomRight:ZL,bottomLeft:ZL};const QL=(0,Uo.forwardRef)((function({className:e,children:t,showHandle:n=!0,__experimentalShowTooltip:o=!1,__experimentalTooltipProps:i={},...a},s){return(0,r.createElement)(AL,{className:c()("components-resizable-box__container",n&&"has-show-handle",e),handleClasses:XL,handleStyles:JL,ref:s,...a},t,o&&(0,r.createElement)(GL,{...i}))}));const eF=function({naturalWidth:e,naturalHeight:t,children:n,isInline:o=!1}){if(1!==Uo.Children.count(n))return null;const i=o?"span":"div";let a;return e&&t&&(a=`${e} / ${t}`),(0,r.createElement)(i,{className:"components-responsive-wrapper"},(0,r.createElement)("div",null,(0,Uo.cloneElement)(n,{className:c()("components-responsive-wrapper__content",n.props.className),style:{...n.props.style,aspectRatio:a}})))},tF=function(){const{MutationObserver:e}=window;if(!e||!document.body||!window.parent)return;function t(){const e=document.body.getBoundingClientRect();window.parent.postMessage({action:"resize",width:e.width,height:e.height},"*")}function n(e){e.style&&["width","height","minHeight","maxHeight"].forEach((function(t){/^\\d+(vw|vh|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)$/.test(e.style[t])&&(e.style[t]="")}))}new e(t).observe(document.body,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}),window.addEventListener("load",t,!0),Array.prototype.forEach.call(document.querySelectorAll("[style]"),n),Array.prototype.forEach.call(document.styleSheets,(function(e){Array.prototype.forEach.call(e.cssRules||e.rules,n)})),document.body.style.position="absolute",document.body.style.width="100%",document.body.setAttribute("data-resizable-iframe-connected",""),t(),window.addEventListener("resize",t,!0)};const nF=function({html:e="",title:t="",type:n,styles:o=[],scripts:i=[],onFocus:a,tabIndex:s}){const l=(0,Uo.useRef)(),[c,u]=(0,Uo.useState)(0),[f,m]=(0,Uo.useState)(0);function p(a=!1){if(!function(){try{return!!l.current?.contentDocument?.body}catch(e){return!1}}())return;const{contentDocument:s,ownerDocument:c}=l.current;if(!a&&null!==s?.body.getAttribute("data-resizable-iframe-connected"))return;const u=(0,r.createElement)("html",{lang:c.documentElement.lang,className:n},(0,r.createElement)("head",null,(0,r.createElement)("title",null,t),(0,r.createElement)("style",{dangerouslySetInnerHTML:{__html:"\n\tbody {\n\t\tmargin: 0;\n\t}\n\thtml,\n\tbody,\n\tbody > div {\n\t\twidth: 100%;\n\t}\n\thtml.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio > div,\n\tbody.wp-has-aspect-ratio > div iframe {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */\n\t}\n\tbody > div > * {\n\t\tmargin-top: 0 !important; /* Has to have !important to override inline styles. */\n\t\tmargin-bottom: 0 !important;\n\t}\n"}}),o.map(((e,t)=>(0,r.createElement)("style",{key:t,dangerouslySetInnerHTML:{__html:e}})))),(0,r.createElement)("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:n},(0,r.createElement)("div",{dangerouslySetInnerHTML:{__html:e}}),(0,r.createElement)("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:`(${tF.toString()})();`}}),i.map((e=>(0,r.createElement)("script",{key:e,src:e})))));s.open(),s.write("<!DOCTYPE html>"+(0,Uo.renderToString)(u)),s.close()}return(0,Uo.useEffect)((()=>{function e(){p(!1)}function t(e){const t=l.current;if(!t||t.contentWindow!==e.source)return;let n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}"resize"===n.action&&(u(n.width),m(n.height))}p();const n=l.current,r=n?.ownerDocument?.defaultView;return n?.addEventListener("load",e,!1),r?.addEventListener("message",t),()=>{n?.removeEventListener("load",e,!1),r?.removeEventListener("message",t)}}),[]),(0,Uo.useEffect)((()=>{p()}),[t,o,i]),(0,Uo.useEffect)((()=>{p(!0)}),[e,n]),(0,r.createElement)("iframe",{ref:(0,d.useMergeRefs)([l,(0,d.useFocusableIframe)()]),title:t,tabIndex:s,className:"components-sandbox",sandbox:"allow-scripts allow-same-origin allow-presentation",onFocus:a,width:Math.ceil(c),height:Math.ceil(f)})};const rF=(0,Uo.forwardRef)((function({className:e,children:t,spokenMessage:n=t,politeness:o="polite",actions:i=[],onRemove:a,icon:s=null,explicitDismiss:l=!1,onDismiss:d,listRef:f},m){function p(e){e&&e.preventDefault&&e.preventDefault(),f?.current?.focus(),d?.(),a?.()}!function(e,t){const n="string"==typeof e?e:(0,Uo.renderToString)(e);(0,Uo.useEffect)((()=>{n&&(0,jy.speak)(n,t)}),[n,t])}(n,o);const h=(0,Uo.useRef)({onDismiss:d,onRemove:a});(0,Uo.useLayoutEffect)((()=>{h.current={onDismiss:d,onRemove:a}})),(0,Uo.useEffect)((()=>{const e=setTimeout((()=>{l||(h.current.onDismiss?.(),h.current.onRemove?.())}),1e4);return()=>clearTimeout(e)}),[l]);const g=c()(e,"components-snackbar",{"components-snackbar-explicit-dismiss":!!l});i&&i.length>1&&(i=[i[0]]);const v=c()("components-snackbar__content",{"components-snackbar__content-with-icon":!!s});return(0,r.createElement)("div",{ref:m,className:g,onClick:l?void 0:p,tabIndex:0,role:l?"":"button",onKeyPress:l?void 0:p,"aria-label":l?"":(0,u.__)("Dismiss this notice")},(0,r.createElement)("div",{className:v},s&&(0,r.createElement)("div",{className:"components-snackbar__icon"},s),t,i.map((({label:e,onClick:t,url:n},o)=>(0,r.createElement)(my,{key:o,href:n,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),a?.(),t&&t(e)}(e,t),className:"components-snackbar__action"},e))),l&&(0,r.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:0,className:"components-snackbar__dismiss-button",onClick:p,onKeyPress:p},"✕")))})),oF=rF,iF={init:{height:0,opacity:0},open:{height:"auto",opacity:1,transition:{height:{type:"tween",duration:.3,ease:[0,0,.2,1]},opacity:{type:"tween",duration:.25,delay:.05,ease:[0,0,.2,1]}}},exit:{opacity:0,transition:{type:"tween",duration:.1,ease:[0,0,.2,1]}}};const aF=function({notices:e,className:t,children:n,onRemove:o}){const i=(0,Uo.useRef)(null),a=(0,d.useReducedMotion)();t=c()("components-snackbar-list",t);const s=e=>()=>o?.(e.id);return(0,r.createElement)("div",{className:t,tabIndex:-1,ref:i},n,(0,r.createElement)(Ih,null,e.map((e=>{const{content:t,...n}=e;return(0,r.createElement)(wh.div,{layout:!a,initial:"init",animate:"open",exit:"exit",key:e.id,variants:a?void 0:iF},(0,r.createElement)("div",{className:"components-snackbar-list__notice-container"},(0,r.createElement)(oF,{...n,onRemove:s(e),listRef:i},e.content)))}))))};const sF=Ts`
+function li(e){return"[object Object]"===Object.prototype.toString.call(e)}function ci(e){var t,n;return!1!==li(e)&&(void 0===(t=e.constructor)||!1!==li(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}const ui=function(e,t){const n=(0,Uo.useRef)(!1);(0,Uo.useEffect)((()=>{if(n.current)return e();n.current=!0}),t)},di=(0,Uo.createContext)({}),fi=()=>(0,Uo.useContext)(di);const mi=(0,Uo.memo)((({children:e,value:t})=>{const n=function({value:e}){const t=fi(),n=(0,Uo.useRef)(e);return ui((()=>{si()(n.current,e)&&n.current}),[e]),(0,Uo.useMemo)((()=>ii()(null!=t?t:{},null!=e?e:{},{isMergeableObject:ci})),[t,e])}({value:t});return(0,r.createElement)(di.Provider,{value:n},e)})),pi="data-wp-component",hi="data-wp-c16t",gi="__contextSystemKey__";var vi=function(){return vi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},vi.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function bi(e){return e.toLowerCase()}var yi=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],xi=/[^A-Z0-9]+/gi;function wi(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function Ei(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,r=void 0===n?yi:n,o=t.stripRegexp,i=void 0===o?xi:o,a=t.transform,s=void 0===a?bi:a,l=t.delimiter,c=void 0===l?" ":l,u=wi(wi(e,r,"$1\0$2"),i,"\0"),d=0,f=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(f-1);)f--;return u.slice(d,f).split("\0").map(s).join(c)}(e,vi({delimiter:"."},t))}function _i(e,t){return void 0===t&&(t={}),Ei(e,vi({delimiter:"-"},t))}function Si(e,t){var n,r,o=0;function i(){var i,a,s=n,l=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(a=0;a<l;a++)if(s.args[a]!==arguments[a]){s=s.next;continue e}return s!==n&&(s===r&&(r=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=n,s.prev=null,n.prev=s,n=s),s.val}s=s.next}for(i=new Array(l),a=0;a<l;a++)i[a]=arguments[a];return s={args:i,val:e.apply(null,i)},n?(n.prev=s,s.next=n):r=s,o===t.maxSize?(r=r.prev).next=null:o++,n=s,s.val}return t=t||{},i.clear=function(){n=null,r=null,o=0},i}const Ci=Si((function(e){return`components-${_i(e)}`}));var ki=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),Pi=Math.abs,Ti=String.fromCharCode,Ii=Object.assign;function Ri(e){return e.trim()}function Mi(e,t,n){return e.replace(t,n)}function Ni(e,t){return e.indexOf(t)}function Di(e,t){return 0|e.charCodeAt(t)}function Ai(e,t,n){return e.slice(t,n)}function Oi(e){return e.length}function zi(e){return e.length}function Li(e,t){return t.push(e),e}var Fi=1,Bi=1,ji=0,Vi=0,Hi=0,$i="";function Wi(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Fi,column:Bi,length:a,return:""}}function Ui(e,t){return Ii(Wi("",null,null,"",null,null,0),e,{length:-e.length},t)}function Gi(){return Hi=Vi>0?Di($i,--Vi):0,Bi--,10===Hi&&(Bi=1,Fi--),Hi}function qi(){return Hi=Vi<ji?Di($i,Vi++):0,Bi++,10===Hi&&(Bi=1,Fi++),Hi}function Yi(){return Di($i,Vi)}function Ki(){return Vi}function Xi(e,t){return Ai($i,e,t)}function Zi(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ji(e){return Fi=Bi=1,ji=Oi($i=e),Vi=0,[]}function Qi(e){return $i="",e}function ea(e){return Ri(Xi(Vi-1,ra(91===e?e+2:40===e?e+1:e)))}function ta(e){for(;(Hi=Yi())&&Hi<33;)qi();return Zi(e)>2||Zi(Hi)>3?"":" "}function na(e,t){for(;--t&&qi()&&!(Hi<48||Hi>102||Hi>57&&Hi<65||Hi>70&&Hi<97););return Xi(e,Ki()+(t<6&&32==Yi()&&32==qi()))}function ra(e){for(;qi();)switch(Hi){case e:return Vi;case 34:case 39:34!==e&&39!==e&&ra(Hi);break;case 40:41===e&&ra(e);break;case 92:qi()}return Vi}function oa(e,t){for(;qi()&&e+Hi!==57&&(e+Hi!==84||47!==Yi()););return"/*"+Xi(t,Vi-1)+"*"+Ti(47===e?e:qi())}function ia(e){for(;!Zi(Yi());)qi();return Xi(e,Vi)}var aa="-ms-",sa="-moz-",la="-webkit-",ca="comm",ua="rule",da="decl",fa="@keyframes";function ma(e,t){for(var n="",r=zi(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function pa(e,t,n,r){switch(e.type){case"@import":case da:return e.return=e.return||e.value;case ca:return"";case fa:return e.return=e.value+"{"+ma(e.children,r)+"}";case ua:e.value=e.props.join(",")}return Oi(n=ma(e.children,r))?e.return=e.value+"{"+n+"}":""}function ha(e){return Qi(ga("",null,null,null,[""],e=Ji(e),0,[0],e))}function ga(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,m=0,p=0,h=1,g=1,v=1,b=0,y="",x=o,w=i,E=r,_=y;g;)switch(p=b,b=qi()){case 40:if(108!=p&&58==Di(_,d-1)){-1!=Ni(_+=Mi(ea(b),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:_+=ea(b);break;case 9:case 10:case 13:case 32:_+=ta(p);break;case 92:_+=na(Ki()-1,7);continue;case 47:switch(Yi()){case 42:case 47:Li(ba(oa(qi(),Ki()),t,n),l);break;default:_+="/"}break;case 123*h:s[c++]=Oi(_)*v;case 125*h:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:m>0&&Oi(_)-d&&Li(m>32?ya(_+";",r,n,d-1):ya(Mi(_," ","")+";",r,n,d-2),l);break;case 59:_+=";";default:if(Li(E=va(_,t,n,c,u,o,s,y,x=[],w=[],d),i),123===b)if(0===u)ga(_,t,E,E,x,i,d,s,w);else switch(99===f&&110===Di(_,3)?100:f){case 100:case 109:case 115:ga(e,E,E,r&&Li(va(e,E,E,0,0,o,s,y,o,x=[],d),w),o,w,d,s,r?x:w);break;default:ga(_,E,E,E,[""],w,0,s,w)}}c=u=m=0,h=v=1,y=_="",d=a;break;case 58:d=1+Oi(_),m=p;default:if(h<1)if(123==b)--h;else if(125==b&&0==h++&&125==Gi())continue;switch(_+=Ti(b),b*h){case 38:v=u>0?1:(_+="\f",-1);break;case 44:s[c++]=(Oi(_)-1)*v,v=1;break;case 64:45===Yi()&&(_+=ea(qi())),f=Yi(),u=d=Oi(y=_+=ia(Ki())),b++;break;case 45:45===p&&2==Oi(_)&&(h=0)}}return i}function va(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,f=0===o?i:[""],m=zi(f),p=0,h=0,g=0;p<r;++p)for(var v=0,b=Ai(e,d+1,d=Pi(h=a[p])),y=e;v<m;++v)(y=Ri(h>0?f[v]+" "+b:Mi(b,/&\f/g,f[v])))&&(l[g++]=y);return Wi(e,t,n,0===o?ua:s,l,c,u)}function ba(e,t,n){return Wi(e,t,n,ca,Ti(Hi),Ai(e,2,-2),0)}function ya(e,t,n,r){return Wi(e,t,n,da,Ai(e,0,r),Ai(e,r+1,-1),r)}var xa=function(e,t,n){for(var r=0,o=0;r=o,o=Yi(),38===r&&12===o&&(t[n]=1),!Zi(o);)qi();return Xi(e,Vi)},wa=function(e,t){return Qi(function(e,t){var n=-1,r=44;do{switch(Zi(r)){case 0:38===r&&12===Yi()&&(t[n]=1),e[n]+=xa(Vi-1,t,n);break;case 2:e[n]+=ea(r);break;case 4:if(44===r){e[++n]=58===Yi()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Ti(r)}}while(r=qi());return e}(Ji(e),t))},Ea=new WeakMap,_a=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Ea.get(n))&&!r){Ea.set(e,!0);for(var o=[],i=wa(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},Sa=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Ca(e,t){switch(function(e,t){return 45^Di(e,0)?(((t<<2^Di(e,0))<<2^Di(e,1))<<2^Di(e,2))<<2^Di(e,3):0}(e,t)){case 5103:return la+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return la+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return la+e+sa+e+aa+e+e;case 6828:case 4268:return la+e+aa+e+e;case 6165:return la+e+aa+"flex-"+e+e;case 5187:return la+e+Mi(e,/(\w+).+(:[^]+)/,la+"box-$1$2"+aa+"flex-$1$2")+e;case 5443:return la+e+aa+"flex-item-"+Mi(e,/flex-|-self/,"")+e;case 4675:return la+e+aa+"flex-line-pack"+Mi(e,/align-content|flex-|-self/,"")+e;case 5548:return la+e+aa+Mi(e,"shrink","negative")+e;case 5292:return la+e+aa+Mi(e,"basis","preferred-size")+e;case 6060:return la+"box-"+Mi(e,"-grow","")+la+e+aa+Mi(e,"grow","positive")+e;case 4554:return la+Mi(e,/([^-])(transform)/g,"$1"+la+"$2")+e;case 6187:return Mi(Mi(Mi(e,/(zoom-|grab)/,la+"$1"),/(image-set)/,la+"$1"),e,"")+e;case 5495:case 3959:return Mi(e,/(image-set\([^]*)/,la+"$1$`$1");case 4968:return Mi(Mi(e,/(.+:)(flex-)?(.*)/,la+"box-pack:$3"+aa+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+la+e+e;case 4095:case 3583:case 4068:case 2532:return Mi(e,/(.+)-inline(.+)/,la+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Oi(e)-1-t>6)switch(Di(e,t+1)){case 109:if(45!==Di(e,t+4))break;case 102:return Mi(e,/(.+:)(.+)-([^]+)/,"$1"+la+"$2-$3$1"+sa+(108==Di(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Ni(e,"stretch")?Ca(Mi(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Di(e,t+1))break;case 6444:switch(Di(e,Oi(e)-3-(~Ni(e,"!important")&&10))){case 107:return Mi(e,":",":"+la)+e;case 101:return Mi(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+la+(45===Di(e,14)?"inline-":"")+"box$3$1"+la+"$2$3$1"+aa+"$2box$3")+e}break;case 5936:switch(Di(e,t+11)){case 114:return la+e+aa+Mi(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return la+e+aa+Mi(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return la+e+aa+Mi(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return la+e+aa+e+e}return e}var ka=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case da:e.return=Ca(e.value,e.length);break;case fa:return ma([Ui(e,{value:Mi(e.value,"@","@"+la)})],r);case ua:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ma([Ui(e,{props:[Mi(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return ma([Ui(e,{props:[Mi(t,/:(plac\w+)/,":"+la+"input-$1")]}),Ui(e,{props:[Mi(t,/:(plac\w+)/,":-moz-$1")]}),Ui(e,{props:[Mi(t,/:(plac\w+)/,aa+"input-$1")]})],r)}return""}))}}];const Pa=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||ka;var o,i,a={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,c,u,d,f=[pa,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],m=(c=[_a,Sa].concat(r,f),u=zi(c),function(e,t,n,r){for(var o="",i=0;i<u;i++)o+=c[i](e,t,n,r)||"";return o});i=function(e,t,n,r){l=n,function(e){ma(ha(e),m)}(e?e+"{"+t.styles+"}":t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new ki({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return p.sheet.hydrate(s),p};const Ta=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};const Ia={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Ra(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Ma=/[A-Z]|^ms/g,Na=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Da=function(e){return 45===e.charCodeAt(1)},Aa=function(e){return null!=e&&"boolean"!=typeof e},Oa=Ra((function(e){return Da(e)?e:e.replace(Ma,"-$&").toLowerCase()})),za=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Na,(function(e,t,n){return Fa={name:t,styles:n,next:Fa},t}))}return 1===Ia[e]||Da(e)||"number"!=typeof t||0===t?t:t+"px"};function La(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Fa={name:n.name,styles:n.styles,next:Fa},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Fa={name:r.name,styles:r.styles,next:Fa},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=La(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":Aa(a)&&(r+=Oa(i)+":"+za(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=La(e,t,a);switch(i){case"animation":case"animationName":r+=Oa(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var l=0;l<a.length;l++)Aa(a[l])&&(r+=Oa(i)+":"+za(i,a[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=Fa,i=n(e);return Fa=o,La(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var Fa,Ba=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var ja=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Fa=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=La(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=La(n,t,e[a]),r&&(o+=i[a]);Ba.lastIndex=0;for(var s,l="";null!==(s=Ba.exec(o));)l+="-"+s[1];return{name:Ta(o)+l,styles:o,next:Fa}},Va=!!r.useInsertionEffect&&r.useInsertionEffect,Ha=Va||function(e){return e()},$a=(0,r.createContext)("undefined"!=typeof HTMLElement?Pa({key:"css"}):null);var Wa=$a.Provider,Ua=function(e){return(0,r.forwardRef)((function(t,n){var o=(0,r.useContext)($a);return e(t,o,n)}))},Ga=(0,r.createContext)({});function qa(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var Ya=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Ka=function(e,t,n){Ya(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0);o=o.next}while(void 0!==o)}};function Xa(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function Za(e,t,n){var r=[],o=qa(e,r,n);return r.length<2?n:o+t(r)}var Ja=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(null!=o){var i=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var a in i="",o)o[a]&&a&&(i&&(i+=" "),i+=a);break;default:i=o}i&&(n&&(n+=" "),n+=i)}}return n};const Qa=function(e){var t=Pa(e);t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=ja(n,t.registered,void 0);return Ka(t,o,!1),t.key+"-"+o.name};return{css:n,cx:function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return Za(t.registered,n,Ja(r))},injectGlobal:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=ja(n,t.registered);Xa(t,o)},keyframes:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=ja(n,t.registered),i="animation-"+o.name;return Xa(t,{name:o.name,styles:"@keyframes "+i+"{"+o.styles+"}"}),i},hydrate:function(e){e.forEach((function(e){t.inserted[e]=!0}))},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:qa.bind(null,t.registered),merge:Za.bind(null,t.registered,n)}};var es=Qa({key:"css"}),ts=(es.flush,es.hydrate,es.cx);es.merge,es.getRegisteredStyles,es.injectGlobal,es.keyframes,es.css,es.sheet,es.cache;const ns=()=>{const e=(0,r.useContext)($a),t=(0,Uo.useCallback)(((...t)=>{if(null===e)throw new Error("The `useCx` hook should be only used within a valid Emotion Cache Context");return ts(...t.map((t=>(e=>null!=e&&["name","styles"].every((t=>void 0!==e[t])))(t)?(Ka(e,t,!1),`${e.key}-${t.name}`):t)))}),[e]);return t};function rs(e,t){const n=fi(),r=n?.[t]||{},o={[hi]:!0,...(i=t,{[pi]:i})};var i;const{_overrides:a,...s}=r,l=Object.entries(s).length?Object.assign({},s,e):e,c=ns()(Ci(t),e.className),u="function"==typeof l.renderChildren?l.renderChildren(l):l.children;for(const e in l)o[e]=l[e];for(const e in a)o[e]=a[e];return void 0!==u&&(o.children=u),o.className=c,o}function os(e,t){return as(e,t,{forwardsRef:!0})}function is(e,t){return as(e,t)}function as(e,t,n){const r=n?.forwardsRef?(0,Uo.forwardRef)(e):e;let o=r[gi]||[t];return Array.isArray(t)&&(o=[...o,...t]),"string"==typeof t&&(o=[...o,t]),Object.assign(r,{[gi]:[...new Set(o)],displayName:t,selector:`.${Ci(t)}`})}function ss(e){if(!e)return[];let t=[];return e[gi]&&(t=e[gi]),e.type&&e.type[gi]&&(t=e.type[gi]),t}function ls(e,t){return!!e&&("string"==typeof t?ss(e).includes(t):!!Array.isArray(t)&&t.some((t=>ss(e).includes(t))))}const cs={border:0,clip:"rect(1px, 1px, 1px, 1px)",WebkitClipPath:"inset( 50% )",clipPath:"inset( 50% )",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",wordWrap:"normal"};function us(){return us=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},us.apply(this,arguments)}function ds(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var fs=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,ms=ds((function(e){return fs.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),ps=function(e){return"theme"!==e},hs=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?ms:ps},gs=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},vs=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;Ya(t,n,r);Ha((function(){return Ka(t,n,r)}));return null};const bs=function e(t,n){var o,i,a=t.__emotion_real===t,s=a&&t.__emotion_base||t;void 0!==n&&(o=n.label,i=n.target);var l=gs(t,n,a),c=l||hs(s),u=!c("as");return function(){var d=arguments,f=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&f.push("label:"+o+";"),null==d[0]||void 0===d[0].raw)f.push.apply(f,d);else{0,f.push(d[0][0]);for(var m=d.length,p=1;p<m;p++)f.push(d[p],d[0][p])}var h=Ua((function(e,t,n){var o=u&&e.as||s,a="",d=[],m=e;if(null==e.theme){for(var p in m={},e)m[p]=e[p];m.theme=(0,r.useContext)(Ga)}"string"==typeof e.className?a=qa(t.registered,d,e.className):null!=e.className&&(a=e.className+" ");var h=ja(f.concat(d),t.registered,m);a+=t.key+"-"+h.name,void 0!==i&&(a+=" "+i);var g=u&&void 0===l?hs(o):c,v={};for(var b in e)u&&"as"===b||g(b)&&(v[b]=e[b]);return v.className=a,v.ref=n,(0,r.createElement)(r.Fragment,null,(0,r.createElement)(vs,{cache:t,serialized:h,isStringTag:"string"==typeof o}),(0,r.createElement)(o,v))}));return h.displayName=void 0!==o?o:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=s,h.__emotion_styles=f,h.__emotion_forwardProp=l,Object.defineProperty(h,"toString",{value:function(){return"."+i}}),h.withComponent=function(t,r){return e(t,us({},n,r,{shouldForwardProp:gs(h,r,!0)})).apply(void 0,f)},h}},ys=bs("div",{target:"e19lxcc00"})("");ys.selector=".components-view",ys.displayName="View";const xs=ys;const ws=os((function(e,t){const{style:n,...o}=rs(e,"VisuallyHidden");return(0,r.createElement)(xs,{ref:t,...o,style:{...cs,...n||{}}})}),"VisuallyHidden"),Es=[["top left","top center","top right"],["center left","center center","center right"],["bottom left","bottom center","bottom right"]],_s={"top left":(0,u.__)("Top Left"),"top center":(0,u.__)("Top Center"),"top right":(0,u.__)("Top Right"),"center left":(0,u.__)("Center Left"),"center center":(0,u.__)("Center"),center:(0,u.__)("Center"),"center right":(0,u.__)("Center Right"),"bottom left":(0,u.__)("Bottom Left"),"bottom center":(0,u.__)("Bottom Center"),"bottom right":(0,u.__)("Bottom Right")},Ss=Es.flat();function Cs(e){const t="center"===e?"center center":e,n=t?.replace("-"," ");return Ss.includes(n)?n:void 0}function ks(e,t){const n=Cs(t);if(!n)return;return`${e}-${n.replace(" ","-")}`}o(1880);function Ps(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ja(t)}var Ts=function(){var e=Ps.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};const Is="#fff",Rs={900:"#1e1e1e",800:"#2f2f2f",700:"#757575",600:"#949494",400:"#ccc",300:"#ddd",200:"#e0e0e0",100:"#f0f0f0"},Ms={accent:"var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9))",accentDarker10:"var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #2145e6))",accentDarker20:"var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6))",accentInverted:`var(--wp-components-color-accent-inverted, ${Is})`,background:`var(--wp-components-color-background, ${Is})`,foreground:`var(--wp-components-color-foreground, ${Rs[900]})`,foregroundInverted:`var(--wp-components-color-foreground-inverted, ${Is})`,gray:{900:`var(--wp-components-color-foreground, ${Rs[900]})`,800:`var(--wp-components-color-gray-800, ${Rs[800]})`,700:`var(--wp-components-color-gray-700, ${Rs[700]})`,600:`var(--wp-components-color-gray-600, ${Rs[600]})`,400:`var(--wp-components-color-gray-400, ${Rs[400]})`,300:`var(--wp-components-color-gray-300, ${Rs[300]})`,200:`var(--wp-components-color-gray-200, ${Rs[200]})`,100:`var(--wp-components-color-gray-100, ${Rs[100]})`}},Ns={background:Ms.background,backgroundDisabled:Ms.gray[100],border:Ms.gray[600],borderHover:Ms.gray[700],borderFocus:Ms.accent,borderDisabled:Ms.gray[400],textDisabled:Ms.gray[600],darkGrayPlaceholder:`color-mix(in srgb, ${Ms.foreground}, transparent 38%)`,lightGrayPlaceholder:`color-mix(in srgb, ${Ms.background}, transparent 35%)`},Ds=Object.freeze({gray:Rs,white:Is,alert:{yellow:"#f0b849",red:"#d94f4f",green:"#4ab866"},theme:Ms,ui:Ns});function As(e="transition"){let t;switch(e){case"transition":t="transition-duration: 0ms;";break;case"animation":t="animation-duration: 1ms;";break;default:t="\n\t\t\t\tanimation-duration: 1ms;\n\t\t\t\ttransition-duration: 0ms;\n\t\t\t"}return`\n\t\t@media ( prefers-reduced-motion: reduce ) {\n\t\t\t${t};\n\t\t}\n\t`}var Os={name:"93uojk",styles:"border-radius:2px;box-sizing:border-box;direction:ltr;display:grid;grid-template-columns:repeat( 3, 1fr );outline:none"};const zs=()=>Os,Ls=bs("div",{target:"ecapk1j3"})(zs,";border:1px solid transparent;cursor:pointer;grid-template-columns:auto;",(({size:e=92})=>Ps("grid-template-rows:repeat( 3, calc( ",e,"px / 3 ) );width:",e,"px;","")),";"),Fs=bs("div",{target:"ecapk1j2"})({name:"1x5gbbj",styles:"box-sizing:border-box;display:grid;grid-template-columns:repeat( 3, 1fr )"}),Bs=e=>Ps("background:currentColor;box-sizing:border-box;display:grid;margin:auto;transition:all 120ms linear;",As("transition")," ",(({isActive:e})=>Ps("box-shadow:",e?`0 0 0 2px ${Ds.gray[900]}`:null,";color:",e?Ds.gray[900]:Ds.gray[400],";*:hover>&{color:",e?Ds.gray[900]:Ds.theme.accent,";}",""))(e),";",""),js=bs("span",{target:"ecapk1j1"})("height:6px;width:6px;",Bs,";"),Vs=bs("span",{target:"ecapk1j0"})({name:"rjf3ub",styles:"appearance:none;border:none;box-sizing:border-box;margin:0;display:flex;position:relative;outline:none;align-items:center;justify-content:center;padding:0"});function Hs({id:e,isActive:t=!1,value:n,...o}){const i=_s[n];return(0,r.createElement)(ri,{text:i},(0,r.createElement)(qt,{id:e,render:(0,r.createElement)(Vs,{...o,role:"gridcell"})},(0,r.createElement)(ws,null,n),(0,r.createElement)(js,{isActive:t,role:"presentation"})))}function $s(e,t,n){return Ce(t,[n.store]),Ht(e,n,"items","setItems"),e}function Ws(e){const t=e.map(((e,t)=>[t,e]));let n=!1;return t.sort((([e,t],[r,o])=>{const i=t.element,a=o.element;return i===a?0:i&&a?function(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}(i,a)?(e>r&&(n=!0),-1):(e<r&&(n=!0),1):0})),n?t.map((([e,t])=>t)):e}function Us(e={}){var t;e.store;const n=null==(t=e.store)?void 0:t.getState(),r=V(e.items,null==n?void 0:n.items,e.defaultItems,[]),o=new Map(r.map((e=>[e.id,e]))),i={items:r,renderedItems:V(null==n?void 0:n.renderedItems,[])},a=null==(s=e.store)?void 0:s.__unstablePrivateStore;var s;const l=Rt({items:r,renderedItems:i.renderedItems},a),c=Rt(i,e.store),u=e=>{const t=Ws(e);l.setState("renderedItems",t),c.setState("renderedItems",t)};Mt(c,(()=>Nt(l))),Mt(l,(()=>Ot(l,["items"],(e=>{c.setState("items",e.items)})))),Mt(l,(()=>Ot(l,["renderedItems"],(e=>{let t=!0,n=requestAnimationFrame((()=>{const{renderedItems:t}=c.getState();e.renderedItems!==t&&u(e.renderedItems)}));if("function"!=typeof IntersectionObserver)return()=>cancelAnimationFrame(n);const r=function(e){var t;const n=e.find((e=>!!e.element)),r=[...e].reverse().find((e=>!!e.element));let o=null==(t=null==n?void 0:n.element)?void 0:t.parentElement;for(;o&&(null==r?void 0:r.element);){if(r&&o.contains(r.element))return o;o=o.parentElement}return G(o).body}(e.renderedItems),o=new IntersectionObserver((()=>{t?t=!1:(cancelAnimationFrame(n),n=requestAnimationFrame((()=>u(e.renderedItems))))}),{root:r});for(const t of e.renderedItems)t.element&&o.observe(t.element);return()=>{cancelAnimationFrame(n),o.disconnect()}}))));const d=(e,t,n=!1)=>{let r;t((t=>{const n=t.findIndex((({id:t})=>t===e.id)),i=t.slice();if(-1!==n){r=t[n];const a=R(R({},r),e);i[n]=a,o.set(e.id,a)}else i.push(e),o.set(e.id,e);return i}));return()=>{t((t=>{if(!r)return n&&o.delete(e.id),t.filter((({id:t})=>t!==e.id));const i=t.findIndex((({id:t})=>t===e.id));if(-1===i)return t;const a=t.slice();return a[i]=r,o.set(e.id,r),a}))}},f=e=>d(e,(e=>l.setState("items",e)),!0);return M(R({},c),{registerItem:f,renderItem:e=>z(f(e),d(e,(e=>l.setState("renderedItems",e)))),item:e=>{if(!e)return null;let t=o.get(e);if(!t){const{items:n}=c.getState();t=n.find((t=>t.id===e)),t&&o.set(e,t)}return t||null},__unstablePrivateStore:l})}function Gs(e){const t=[];for(const n of e)t.push(...n);return t}function qs(e){return e.slice().reverse()}var Ys={id:null};function Ks(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}function Xs(e,t){return e.filter((e=>e.rowId===t))}function Zs(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}function Js(e){let t=0;for(const{length:n}of e)n>t&&(t=n);return t}function Qs(e,t,n){const r=Js(e);for(const o of e)for(let e=0;e<r;e+=1){const r=o[e];if(!r||n&&r.disabled){const r=0===e&&n?Ks(o):o[e-1];o[e]=r&&t!==r.id&&n?r:{id:"__EMPTY_ITEM__",disabled:!0,rowId:null==r?void 0:r.rowId}}}return e}function el(e){const t=Zs(e),n=Js(t),r=[];for(let e=0;e<n;e+=1)for(const n of t){const t=n[e];t&&r.push(M(R({},t),{rowId:t.rowId?`${e}`:void 0}))}return r}function tl(e={}){var t;const n=null==(t=e.store)?void 0:t.getState(),r=Us(e),o=V(e.activeId,null==n?void 0:n.activeId,e.defaultActiveId),i=Rt(M(R({},r.getState()),{activeId:o,baseElement:V(null==n?void 0:n.baseElement,null),includesBaseElement:V(e.includesBaseElement,null==n?void 0:n.includesBaseElement,null===o),moves:V(null==n?void 0:n.moves,0),orientation:V(e.orientation,null==n?void 0:n.orientation,"both"),rtl:V(e.rtl,null==n?void 0:n.rtl,!1),virtualFocus:V(e.virtualFocus,null==n?void 0:n.virtualFocus,!1),focusLoop:V(e.focusLoop,null==n?void 0:n.focusLoop,!1),focusWrap:V(e.focusWrap,null==n?void 0:n.focusWrap,!1),focusShift:V(e.focusShift,null==n?void 0:n.focusShift,!1)}),r,e.store);Mt(i,(()=>At(i,["renderedItems","activeId"],(e=>{i.setState("activeId",(t=>{var n;return void 0!==t?t:null==(n=Ks(e.renderedItems))?void 0:n.id}))}))));const a=(e,t,n,r)=>{var o,a;const{activeId:s,rtl:l,focusLoop:c,focusWrap:u,includesBaseElement:d}=i.getState(),f=l&&"vertical"!==t?qs(e):e;if(null==s)return null==(o=Ks(f))?void 0:o.id;const m=f.find((e=>e.id===s));if(!m)return null==(a=Ks(f))?void 0:a.id;const p=!!m.rowId,h=f.indexOf(m),g=f.slice(h+1),v=Xs(g,m.rowId);if(void 0!==r){const e=function(e,t){return e.filter((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(v,s),t=e.slice(r)[0]||e[e.length-1];return null==t?void 0:t.id}const b=function(e){return"vertical"===e?"horizontal":"horizontal"===e?"vertical":void 0}(p?t||"horizontal":t),y=c&&c!==b,x=p&&u&&u!==b;if(n=n||!p&&y&&d,y){const e=function(e,t,n=!1){const r=e.findIndex((e=>e.id===t));return[...e.slice(r+1),...n?[Ys]:[],...e.slice(0,r)]}(x&&!n?f:Xs(f,m.rowId),s,n),t=Ks(e,s);return null==t?void 0:t.id}if(x){const e=Ks(n?v:g,s);return n?(null==e?void 0:e.id)||null:null==e?void 0:e.id}const w=Ks(v,s);return!w&&n?null:null==w?void 0:w.id};return M(R(R({},r),i),{setBaseElement:e=>i.setState("baseElement",e),setActiveId:e=>i.setState("activeId",e),move:e=>{void 0!==e&&(i.setState("activeId",e),i.setState("moves",(e=>e+1)))},first:()=>{var e;return null==(e=Ks(i.getState().renderedItems))?void 0:e.id},last:()=>{var e;return null==(e=Ks(qs(i.getState().renderedItems)))?void 0:e.id},next:e=>{const{renderedItems:t,orientation:n}=i.getState();return a(t,n,!1,e)},previous:e=>{var t;const{renderedItems:n,orientation:r,includesBaseElement:o}=i.getState(),s=!!!(null==(t=Ks(n))?void 0:t.rowId)&&o;return a(qs(n),r,s,e)},down:e=>{const{activeId:t,renderedItems:n,focusShift:r,focusLoop:o,includesBaseElement:s}=i.getState(),l=r&&!e,c=el(Gs(Qs(Zs(n),t,l)));return a(c,"vertical",o&&"horizontal"!==o&&s,e)},up:e=>{const{activeId:t,renderedItems:n,focusShift:r,includesBaseElement:o}=i.getState(),s=r&&!e,l=el(qs(Gs(Qs(Zs(n),t,s))));return a(l,"vertical",o,e)}})}function nl(e,t,n){return Ht(e=$s(e,t,n),n,"activeId","setActiveId"),Ht(e,n,"includesBaseElement"),Ht(e,n,"virtualFocus"),Ht(e,n,"orientation"),Ht(e,n,"rtl"),Ht(e,n,"focusLoop"),Ht(e,n,"focusWrap"),Ht(e,n,"focusShift"),e}function rl(e={}){const[t,n]=$t(tl,e);return nl(t,n,e)}function ol(e,t,n){return we((r=>{var o;if(null==t||t(r),r.defaultPrevented)return;if(r.isPropagationStopped())return;if(!ce(r))return;if(function(e){return"Shift"===e.key||"Control"===e.key||"Alt"===e.key||"Meta"===e.key}(r))return;if(function(e){const t=e.target;return!(t&&!te(t)||1!==e.key.length||e.ctrlKey||e.metaKey)}(r))return;const i=e.getState(),a=null==(o=yt(e,i.activeId))?void 0:o.element;if(!a)return;const s=r,{view:l}=s,c=E(s,["view"]);a!==(null==n?void 0:n.current)&&a.focus(),function(e,t,n){const r=new KeyboardEvent(t,n);return e.dispatchEvent(r)}(a,r.type,c)||r.preventDefault(),r.currentTarget.contains(a)&&r.stopPropagation()}))}var il=Ve((e=>{var t=e,{store:n,composite:o=!0,focusOnMove:i=o,moveOnKeyPress:a=!0}=t,s=E(t,["store","composite","focusOnMove","moveOnKeyPress"]);const l=St();F(n=n||l,!1);const c=(0,r.useRef)(null),u=function(e){const[t,n]=(0,r.useState)(!1),o=(0,r.useCallback)((()=>n(!0)),[]),i=e.useState((t=>yt(e,t.activeId)));return(0,r.useEffect)((()=>{const e=null==i?void 0:i.element;t&&e&&(n(!1),e.focus({preventScroll:!0}))}),[i,t]),o}(n),d=n.useState("moves");(0,r.useEffect)((()=>{var e;if(!n)return;if(!d)return;if(!o)return;if(!i)return;const{activeId:t}=n.getState(),r=null==(e=yt(n,t))?void 0:e.element;r&&function(e,t){"scrollIntoView"in e?(e.focus({preventScroll:!0}),e.scrollIntoView(R({block:"nearest",inline:"nearest"},t))):e.focus()}(r)}),[n,d,o,i]),be((()=>{if(!n)return;if(!d)return;if(!o)return;const{baseElement:e,activeId:t}=n.getState();if(!(null===t))return;if(!e)return;const r=c.current;c.current=null,r&&ue(r,{relatedTarget:e}),Ze(e)||e.focus()}),[n,d,o]);const f=n.useState("activeId"),m=n.useState("virtualFocus");be((()=>{var e;if(!n)return;if(!o)return;if(!m)return;const t=c.current;if(c.current=null,!t)return;const r=(null==(e=yt(n,f))?void 0:e.element)||q(t);r!==t&&ue(t,{relatedTarget:r})}),[n,f,m,o]);const p=ol(n,s.onKeyDownCapture,c),h=ol(n,s.onKeyUpCapture,c),g=s.onFocusCapture,v=we((e=>{if(null==g||g(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:t}=n.getState();if(!t)return;const r=e.relatedTarget,o=function(e){const t=e[xt];return delete e[xt],t}(e.currentTarget);ce(e)&&o&&(e.stopPropagation(),c.current=r)})),b=s.onFocus,y=we((e=>{if(null==b||b(e),e.defaultPrevented)return;if(!o)return;if(!n)return;const{relatedTarget:t}=e,{virtualFocus:r}=n.getState();r?ce(e)&&!wt(n,t)&&queueMicrotask(u):ce(e)&&n.setActiveId(null)})),_=s.onBlurCapture,S=we((e=>{var t;if(null==_||_(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:r,activeId:o}=n.getState();if(!r)return;const i=null==(t=yt(n,o))?void 0:t.element,a=e.relatedTarget,s=wt(n,a),l=c.current;if(c.current=null,ce(e)&&s)a===i?l&&l!==a&&ue(l,e):i?ue(i,e):l&&ue(l,e),e.stopPropagation();else{!wt(n,e.target)&&i&&ue(i,e)}})),C=s.onKeyDown,k=Pe(a),P=we((e=>{var t;if(null==C||C(e),e.defaultPrevented)return;if(!n)return;if(!ce(e))return;const{orientation:r,items:o,renderedItems:i,activeId:a}=n.getState(),s=yt(n,a);if(null==(t=null==s?void 0:s.element)?void 0:t.isConnected)return;const l="horizontal"!==r,c="vertical"!==r,u=function(e){return e.some((e=>!!e.rowId))}(i);if(("ArrowLeft"===e.key||"ArrowRight"===e.key||"Home"===e.key||"End"===e.key)&&te(e.currentTarget))return;const d={ArrowUp:(u||l)&&(()=>{if(u){const e=o&&function(e){return function(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(Gs(qs(function(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}(e))))}(o);return null==e?void 0:e.id}return null==n?void 0:n.last()}),ArrowRight:(u||c)&&n.first,ArrowDown:(u||l)&&n.first,ArrowLeft:(u||c)&&n.last,Home:n.first,End:n.last,PageUp:n.first,PageDown:n.last},f=d[e.key];if(f){const t=f();if(void 0!==t){if(!k(e))return;e.preventDefault(),n.move(t)}}}));s=Te(s,(e=>(0,Le.jsx)(Ct,{value:n,children:e})),[n]);const T=n.useState((e=>{var t;if(n&&o&&e.virtualFocus)return null==(t=yt(n,e.activeId))?void 0:t.id}));s=w(x({"aria-activedescendant":T},s),{ref:Ee(o?n.setBaseElement:null,s.ref),onKeyDownCapture:p,onKeyUpCapture:h,onFocusCapture:v,onFocus:y,onBlurCapture:S,onKeyDown:P});const I=n.useState((e=>o&&(e.virtualFocus||null===e.activeId)));return s=ct(x({focusable:I},s))})),al=Fe((e=>je("div",il(e))));var sl=Ve((e=>{var t=e,{store:n,"aria-setsize":o,"aria-posinset":i}=t,a=E(t,["store","aria-setsize","aria-posinset"]);const s=_t();F(n=n||s,!1);const l=_e(a.id),c=n.useState((e=>e.baseElement||void 0)),u=(0,r.useMemo)((()=>({id:l,baseElement:c,ariaSetSize:o,ariaPosInSet:i})),[l,c,o,i]);return a=Te(a,(e=>(0,Le.jsx)(Tt.Provider,{value:u,children:e})),[u]),a=x({id:l},a)})),ll=Fe((e=>je("div",sl(e))));bs("div",{target:"erowt52"})({name:"ogl07i",styles:"box-sizing:border-box;padding:2px"});const cl=bs("div",{target:"erowt51"})("transform-origin:top left;height:100%;width:100%;",zs,";",(()=>Ps({gridTemplateRows:"repeat( 3, calc( 21px / 3))",padding:1.5,maxHeight:24,maxWidth:24},"","")),";",(({disablePointerEvents:e})=>Ps({pointerEvents:e?"none":void 0},"","")),";"),ul=bs("span",{target:"erowt50"})("height:2px;width:2px;",Bs,";",(({isActive:e})=>Ps("box-shadow:",e?"0 0 0 1px currentColor":null,";color:currentColor;*:hover>&{color:currentColor;}","")),";"),dl=Vs;const fl=function({className:e,disablePointerEvents:t=!0,size:n=24,style:o={},value:i="center",...a}){const s=function(e="center"){const t=Cs(e);if(!t)return;const n=Ss.indexOf(t);return n>-1?n:void 0}(i),l=(n/24).toFixed(2),u=c()("component-alignment-matrix-control-icon",e),d={...o,transform:`scale(${l})`};return(0,r.createElement)(cl,{...a,className:u,disablePointerEvents:t,role:"presentation",style:d},Ss.map(((e,t)=>{const n=s===t;return(0,r.createElement)(dl,{key:e},(0,r.createElement)(ul,{isActive:n}))})))};function ml({className:e,id:t,label:n=(0,u.__)("Alignment Matrix Control"),defaultValue:o="center center",value:i,onChange:a,width:s=92,...l}){const f=(0,d.useInstanceId)(ml,"alignment-matrix-control",t),m=rl({defaultActiveId:ks(f,o),activeId:ks(f,i),setActiveId:e=>{const t=function(e,t){const n=t?.replace(e+"-","");return Cs(n)}(f,e);t&&a?.(t)},rtl:(0,u.isRTL)()}),p=m.useState("activeId"),h=c()("component-alignment-matrix-control",e);return(0,r.createElement)(al,{store:m,render:(0,r.createElement)(Ls,{...l,"aria-label":n,className:h,id:f,role:"grid",size:s})},Es.map(((e,t)=>(0,r.createElement)(ll,{render:(0,r.createElement)(Fs,{role:"row"}),key:t},e.map((e=>{const t=ks(f,e),n=t===p;return(0,r.createElement)(Hs,{id:t,isActive:n,key:e,value:e})}))))))}ml.Icon=fl;const pl=ml;function hl(e){return"appear"===e?"top":"left"}function gl(e){if("loading"===e.type)return c()("components-animate__loading");const{type:t,origin:n=hl(t)}=e;if("appear"===t){const[e,t="center"]=n.split(" ");return c()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?c()("components-animate__slide-in","is-from-"+n):void 0}const vl=function({type:e,options:t={},children:n}){return n({className:gl({type:e,...t})})},bl=(0,r.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),yl=(0,r.createContext)({}),xl=(0,r.createContext)(null),wl="undefined"!=typeof document,El=wl?r.useLayoutEffect:r.useEffect,_l=(0,r.createContext)({strict:!1});function Sl(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Cl(e){return"string"==typeof e||Array.isArray(e)}function kl(e){return"object"==typeof e&&"function"==typeof e.start}const Pl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Tl=["initial",...Pl];function Il(e){return kl(e.animate)||Tl.some((t=>Cl(e[t])))}function Rl(e){return Boolean(Il(e)||e.variants)}function Ml(e){const{initial:t,animate:n}=function(e,t){if(Il(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Cl(t)?t:void 0,animate:Cl(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,r.useContext)(yl));return(0,r.useMemo)((()=>({initial:t,animate:n})),[Nl(t),Nl(n)])}function Nl(e){return Array.isArray(e)?e.join(" "):e}const Dl={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Al={};for(const e in Dl)Al[e]={isEnabled:t=>Dl[e].some((e=>!!t[e]))};const Ol=(0,r.createContext)({}),zl=(0,r.createContext)({}),Ll=Symbol.for("motionComponentSymbol");function Fl({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:o,Component:i}){e&&function(e){for(const t in e)Al[t]={...Al[t],...e[t]}}(e);const a=(0,r.forwardRef)((function(a,s){let l;const c={...(0,r.useContext)(bl),...a,layoutId:Bl(a)},{isStatic:u}=c,d=Ml(a),f=o(a,u);if(!u&&wl){d.visualElement=function(e,t,n,o){const{visualElement:i}=(0,r.useContext)(yl),a=(0,r.useContext)(_l),s=(0,r.useContext)(xl),l=(0,r.useContext)(bl).reducedMotion,c=(0,r.useRef)();o=o||a.renderer,!c.current&&o&&(c.current=o(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:!!s&&!1===s.initial,reducedMotionConfig:l}));const u=c.current;(0,r.useInsertionEffect)((()=>{u&&u.update(n,s)}));const d=(0,r.useRef)(Boolean(window.HandoffAppearAnimations));return El((()=>{u&&(u.render(),d.current&&u.animationState&&u.animationState.animateChanges())})),(0,r.useEffect)((()=>{u&&(u.updateFeatures(),!d.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,d.current=!1)})),u}(i,f,c,t);const n=(0,r.useContext)(zl),o=(0,r.useContext)(_l).strict;d.visualElement&&(l=d.visualElement.loadFeatures(c,o,e,n))}return r.createElement(yl.Provider,{value:d},l&&d.visualElement?r.createElement(l,{visualElement:d.visualElement,...c}):null,n(i,a,function(e,t,n){return(0,r.useCallback)((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):Sl(n)&&(n.current=r))}),[t])}(f,d.visualElement,s),f,u,d.visualElement))}));return a[Ll]=i,a}function Bl({layoutId:e}){const t=(0,r.useContext)(Ol).id;return t&&void 0!==e?t+"-"+e:e}function jl(e){function t(t,n={}){return Fl(e(t,n))}if("undefined"==typeof Proxy)return t;const n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}const Vl=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Hl(e){return"string"==typeof e&&!e.includes("-")&&!!(Vl.indexOf(e)>-1||/[A-Z]/.test(e))}const $l={};const Wl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ul=new Set(Wl);function Gl(e,{layout:t,layoutId:n}){return Ul.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!$l[e]||"opacity"===e)}const ql=e=>Boolean(e&&e.getVelocity),Yl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Kl=Wl.length;const Xl=e=>t=>"string"==typeof t&&t.startsWith(e),Zl=Xl("--"),Jl=Xl("var(--"),Ql=(e,t)=>t&&"number"==typeof e?t.transform(e):e,ec=(e,t,n)=>Math.min(Math.max(n,e),t),tc={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},nc={...tc,transform:e=>ec(0,1,e)},rc={...tc,default:1},oc=e=>Math.round(1e5*e)/1e5,ic=/(-)?([\d]*\.?[\d])+/g,ac=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,sc=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function lc(e){return"string"==typeof e}const cc=e=>({test:t=>lc(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),uc=cc("deg"),dc=cc("%"),fc=cc("px"),mc=cc("vh"),pc=cc("vw"),hc={...dc,parse:e=>dc.parse(e)/100,transform:e=>dc.transform(100*e)},gc={...tc,transform:Math.round},vc={borderWidth:fc,borderTopWidth:fc,borderRightWidth:fc,borderBottomWidth:fc,borderLeftWidth:fc,borderRadius:fc,radius:fc,borderTopLeftRadius:fc,borderTopRightRadius:fc,borderBottomRightRadius:fc,borderBottomLeftRadius:fc,width:fc,maxWidth:fc,height:fc,maxHeight:fc,size:fc,top:fc,right:fc,bottom:fc,left:fc,padding:fc,paddingTop:fc,paddingRight:fc,paddingBottom:fc,paddingLeft:fc,margin:fc,marginTop:fc,marginRight:fc,marginBottom:fc,marginLeft:fc,rotate:uc,rotateX:uc,rotateY:uc,rotateZ:uc,scale:rc,scaleX:rc,scaleY:rc,scaleZ:rc,skew:uc,skewX:uc,skewY:uc,distance:fc,translateX:fc,translateY:fc,translateZ:fc,x:fc,y:fc,z:fc,perspective:fc,transformPerspective:fc,opacity:nc,originX:hc,originY:hc,originZ:fc,zIndex:gc,fillOpacity:nc,strokeOpacity:nc,numOctaves:gc};function bc(e,t,n,r){const{style:o,vars:i,transform:a,transformOrigin:s}=e;let l=!1,c=!1,u=!0;for(const e in t){const n=t[e];if(Zl(e)){i[e]=n;continue}const r=vc[e],d=Ql(n,r);if(Ul.has(e)){if(l=!0,a[e]=d,!u)continue;n!==(r.default||0)&&(u=!1)}else e.startsWith("origin")?(c=!0,s[e]=d):o[e]=d}if(t.transform||(l||r?o.transform=function(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let i="";for(let t=0;t<Kl;t++){const n=Wl[t];void 0!==e[n]&&(i+=`${Yl[n]||n}(${e[n]}) `)}return t&&!e.z&&(i+="translateZ(0)"),i=i.trim(),o?i=o(e,r?"":i):n&&r&&(i="none"),i}(e.transform,n,u,r):o.transform&&(o.transform="none")),c){const{originX:e="50%",originY:t="50%",originZ:n=0}=s;o.transformOrigin=`${e} ${t} ${n}`}}const yc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function xc(e,t,n){for(const r in t)ql(t[r])||Gl(r,n)||(e[r]=t[r])}function wc(e,t,n){const o={};return xc(o,e.style||{},e),Object.assign(o,function({transformTemplate:e},t,n){return(0,r.useMemo)((()=>{const r=yc();return bc(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)}),[t])}(e,t,n)),e.transformValues?e.transformValues(o):o}function Ec(e,t,n){const r={},o=wc(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const _c=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Sc(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||_c.has(e)}let Cc=e=>!Sc(e);try{(kc=require("@emotion/is-prop-valid").default)&&(Cc=e=>e.startsWith("on")?!Sc(e):kc(e))}catch(W){}var kc;function Pc(e,t,n){return"string"==typeof e?e:fc.transform(t+n*e)}const Tc={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ic={offset:"strokeDashoffset",array:"strokeDasharray"};function Rc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d,f){if(bc(e,c,u,f),d)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:m,style:p,dimensions:h}=e;m.transform&&(h&&(p.transform=m.transform),delete m.transform),h&&(void 0!==o||void 0!==i||p.transform)&&(p.transformOrigin=function(e,t,n){return`${Pc(t,e.x,e.width)} ${Pc(n,e.y,e.height)}`}(h,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(m.x=t),void 0!==n&&(m.y=n),void 0!==r&&(m.scale=r),void 0!==a&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Tc:Ic;e[i.offset]=fc.transform(-r);const a=fc.transform(t),s=fc.transform(n);e[i.array]=`${a} ${s}`}(m,a,s,l,!1)}const Mc=()=>({...yc(),attrs:{}}),Nc=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Dc(e,t,n,o){const i=(0,r.useMemo)((()=>{const n=Mc();return Rc(n,t,{enableHardwareAcceleration:!1},Nc(o),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};xc(t,e.style,e),i.style={...t,...i.style}}return i}function Ac(e=!1){return(t,n,o,{latestValues:i},a)=>{const s=(Hl(t)?Dc:Ec)(n,i,a,t),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(Cc(o)||!0===n&&Sc(o)||!t&&!Sc(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),c={...l,...s,ref:o},{children:u}=n,d=(0,r.useMemo)((()=>ql(u)?u.get():u),[u]);return(0,r.createElement)(t,{...c,children:d})}}const Oc=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function zc(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const Lc=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Fc(e,t,n,r){zc(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Lc.has(n)?n:Oc(n),t.attrs[n])}function Bc(e,t){const{style:n}=e,r={};for(const o in n)(ql(n[o])||t.style&&ql(t.style[o])||Gl(o,e))&&(r[o]=n[o]);return r}function jc(e,t){const n=Bc(e,t);for(const r in e)if(ql(e[r])||ql(t[r])){n[-1!==Wl.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]}return n}function Vc(e,t,n,r={},o={}){return"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),"string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),t}function Hc(e){const t=(0,r.useRef)(null);return null===t.current&&(t.current=e()),t.current}const $c=e=>Array.isArray(e),Wc=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),Uc=e=>$c(e)?e[e.length-1]||0:e;function Gc(e){const t=ql(e)?e.get():e;return Wc(t)?t.toValue():t}const qc=e=>(t,n)=>{const o=(0,r.useContext)(yl),i=(0,r.useContext)(xl),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const a={latestValues:Yc(r,o,i,e),renderState:t()};return n&&(a.mount=e=>n(r,e,a)),a}(e,t,o,i);return n?a():Hc(a)};function Yc(e,t,n,r){const o={},i=r(e,{});for(const e in i)o[e]=Gc(i[e]);let{initial:a,animate:s}=e;const l=Il(e),c=Rl(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const d=u?s:a;if(d&&"boolean"!=typeof d&&!kl(d)){(Array.isArray(d)?d:[d]).forEach((t=>{const n=Vc(e,t);if(!n)return;const{transitionEnd:r,transition:i,...a}=n;for(const e in a){let t=a[e];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(o[e]=t)}for(const e in r)o[e]=r[e]}))}return o}const Kc=e=>e;class Xc{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const t=this.order.indexOf(e);-1!==t&&(this.order.splice(t,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}const Zc=["prepare","read","update","preRender","render","postRender"];const{schedule:Jc,cancel:Qc,state:eu,steps:tu}=function(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=Zc.reduce(((e,t)=>(e[t]=function(e){let t=new Xc,n=new Xc,r=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(e,i=!1,s=!1)=>{const l=s&&o,c=l?t:n;return i&&a.add(e),c.add(e)&&l&&o&&(r=t.order.length),e},cancel:e=>{n.remove(e),a.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let n=0;n<r;n++){const r=t.order[n];r(l),a.has(r)&&(s.schedule(r),e())}o=!1,i&&(i=!1,s.process(l))}}};return s}((()=>n=!0)),e)),{}),a=e=>i[e].process(o),s=()=>{const i=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,Zc.forEach(a),o.isProcessing=!1,n&&t&&(r=!1,e(s))};return{schedule:Zc.reduce(((t,a)=>{const l=i[a];return t[a]=(t,i=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(s)),l.schedule(t,i,a)),t}),{}),cancel:e=>Zc.forEach((t=>i[t].cancel(e))),state:o,steps:i}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Kc,!0),nu={useVisualState:qc({scrapeMotionValuesFromProps:jc,createRenderState:Mc,onMount:(e,t,{renderState:n,latestValues:r})=>{Jc.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}})),Jc.render((()=>{Rc(n,r,{enableHardwareAcceleration:!1},Nc(t.tagName),e.transformTemplate),Fc(t,n)}))}})},ru={useVisualState:qc({scrapeMotionValuesFromProps:Bc,createRenderState:yc})};function ou(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const iu=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function au(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const su=e=>t=>iu(t)&&e(t,au(t));function lu(e,t,n,r){return ou(e,t,su(n),r)}const cu=(e,t)=>n=>t(e(n)),uu=(...e)=>e.reduce(cu);function du(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const fu=du("dragHorizontal"),mu=du("dragVertical");function pu(e){let t=!1;if("y"===e)t=mu();else if("x"===e)t=fu();else{const e=fu(),n=mu();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function hu(){const e=pu(!0);return!e||(e(),!1)}class gu{constructor(e){this.isMounted=!1,this.node=e}update(){}}function vu(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End");return lu(e.current,n,((n,o)=>{if("touch"===n.type||hu())return;const i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t),i[r]&&Jc.update((()=>i[r](n,o)))}),{passive:!e.getProps()[r]})}const bu=(e,t)=>!!t&&(e===t||bu(e,t.parentElement));function yu(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,au(n))}const xu=new WeakMap,wu=new WeakMap,Eu=e=>{const t=xu.get(e.target);t&&t(e)},_u=e=>{e.forEach(Eu)};function Su(e,t,n){const r=function({root:e,...t}){const n=e||document;wu.has(n)||wu.set(n,{});const r=wu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(_u,{root:e,...t})),r[o]}(t);return xu.set(e,n),r.observe(e),()=>{xu.delete(e),r.unobserve(e)}}const Cu={some:0,all:1};const ku={inView:{Feature:class extends gu{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:Cu[r]};return Su(this.node.current,i,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends gu{constructor(){super(...arguments),this.removeStartListeners=Kc,this.removeEndListeners=Kc,this.removeAccessibleListeners=Kc,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),r=lu(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r}=this.node.getProps();Jc.update((()=>{bu(this.node.current,e.target)?n&&n(e,t):r&&r(e,t)}))}),{passive:!(n.onTap||n.onPointerUp)}),o=lu(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=uu(r,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=ou(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=ou(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&yu("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&Jc.update((()=>n(e,t)))}))})),yu("down",((e,t)=>{this.startPress(e,t)}))})),t=ou(this.node.current,"blur",(()=>{this.isPressing&&yu("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=uu(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Jc.update((()=>n(e,t)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!hu()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Jc.update((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=lu(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=ou(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=uu(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends gu{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=uu(ou(this.node.current,"focus",(()=>this.onFocus())),ou(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends gu{mount(){this.unmount=uu(vu(this.node,!0),vu(this.node,!1))}unmount(){}}}};function Pu(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Tu(e,t,n){const r=e.getProps();return Vc(r,t,void 0!==n?n:r.custom,function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.get())),t}(e),function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.getVelocity())),t}(e))}const Iu="data-"+Oc("framerAppearId");let Ru=Kc,Mu=Kc;const Nu=e=>1e3*e,Du=e=>e/1e3,Au=!1,Ou=e=>Array.isArray(e)&&"number"==typeof e[0];function zu(e){return Boolean(!e||"string"==typeof e&&Fu[e]||Ou(e)||Array.isArray(e)&&e.every(zu))}const Lu=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Fu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Lu([0,.65,.55,1]),circOut:Lu([.55,0,1,.45]),backIn:Lu([.31,.01,.66,-.59]),backOut:Lu([.33,1.53,.69,.99])};function Bu(e){if(e)return Ou(e)?Lu(e):Array.isArray(e)?e.map(Bu):Fu[e]}const ju=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Vu=1e-7,Hu=12;function $u(e,t,n,r){if(e===t&&n===r)return Kc;const o=t=>function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=ju(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>Vu&&++s<Hu);return a}(t,0,1,e,n);return e=>0===e||1===e?e:ju(o(e),t,r)}const Wu=$u(.42,0,1,1),Uu=$u(0,0,.58,1),Gu=$u(.42,0,.58,1),qu=e=>Array.isArray(e)&&"number"!=typeof e[0],Yu=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ku=e=>t=>1-e(1-t),Xu=e=>1-Math.sin(Math.acos(e)),Zu=Ku(Xu),Ju=Yu(Zu),Qu=$u(.33,1.53,.69,.99),ed=Ku(Qu),td=Yu(ed),nd={linear:Kc,easeIn:Wu,easeInOut:Gu,easeOut:Uu,circIn:Xu,circInOut:Ju,circOut:Zu,backIn:ed,backInOut:td,backOut:Qu,anticipate:e=>(e*=2)<1?.5*ed(e):.5*(2-Math.pow(2,-10*(e-1)))},rd=e=>{if(Array.isArray(e)){Mu(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return $u(t,n,r,o)}return"string"==typeof e?(Mu(void 0!==nd[e],`Invalid easing type '${e}'`),nd[e]):e},od=(e,t)=>n=>Boolean(lc(n)&&sc.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),id=(e,t,n)=>r=>{if(!lc(r))return r;const[o,i,a,s]=r.match(ic);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},ad={...tc,transform:e=>Math.round((e=>ec(0,255,e))(e))},sd={test:od("rgb","red"),parse:id("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ad.transform(e)+", "+ad.transform(t)+", "+ad.transform(n)+", "+oc(nc.transform(r))+")"};const ld={test:od("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:sd.transform},cd={test:od("hsl","hue"),parse:id("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+dc.transform(oc(t))+", "+dc.transform(oc(n))+", "+oc(nc.transform(r))+")"},ud={test:e=>sd.test(e)||ld.test(e)||cd.test(e),parse:e=>sd.test(e)?sd.parse(e):cd.test(e)?cd.parse(e):ld.parse(e),transform:e=>lc(e)?e:e.hasOwnProperty("red")?sd.transform(e):cd.transform(e)},dd=(e,t,n)=>-n*e+n*t+e;function fd(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}const md=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},pd=[ld,sd,cd];function hd(e){const t=(e=>pd.find((t=>t.test(e))))(e);Mu(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===cd&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=fd(s,r,e+1/3),i=fd(s,r,e),a=fd(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(n)),n}const gd=(e,t)=>{const n=hd(e),r=hd(t),o={...n};return e=>(o.red=md(n.red,r.red,e),o.green=md(n.green,r.green,e),o.blue=md(n.blue,r.blue,e),o.alpha=dd(n.alpha,r.alpha,e),sd.transform(o))};const vd={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:Kc},bd={regex:ac,countKey:"Colors",token:"${c}",parse:ud.parse},yd={regex:ic,countKey:"Numbers",token:"${n}",parse:tc.parse};function xd(e,{regex:t,countKey:n,token:r,parse:o}){const i=e.tokenised.match(t);i&&(e["num"+n]=i.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...i.map(o)))}function wd(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&xd(n,vd),xd(n,bd),xd(n,yd),n}function Ed(e){return wd(e).values}function _d(e){const{values:t,numColors:n,numVars:r,tokenised:o}=wd(e),i=t.length;return e=>{let t=o;for(let o=0;o<i;o++)t=o<r?t.replace(vd.token,e[o]):o<r+n?t.replace(bd.token,ud.transform(e[o])):t.replace(yd.token,oc(e[o]));return t}}const Sd=e=>"number"==typeof e?0:e;const Cd={test:function(e){var t,n;return isNaN(e)&&lc(e)&&((null===(t=e.match(ic))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(ac))||void 0===n?void 0:n.length)||0)>0},parse:Ed,createTransformer:_d,getAnimatableNone:function(e){const t=Ed(e);return _d(e)(t.map(Sd))}},kd=(e,t)=>n=>`${n>0?t:e}`;function Pd(e,t){return"number"==typeof e?n=>dd(e,t,n):ud.test(e)?gd(e,t):e.startsWith("var(")?kd(e,t):Rd(e,t)}const Td=(e,t)=>{const n=[...e],r=n.length,o=e.map(((e,n)=>Pd(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}},Id=(e,t)=>{const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=Pd(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}},Rd=(e,t)=>{const n=Cd.createTransformer(t),r=wd(e),o=wd(t);return r.numVars===o.numVars&&r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?uu(Td(r.values,o.values),n):(Ru(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),kd(e,t))},Md=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Nd=(e,t)=>n=>dd(e,t,n);function Dd(e,t,n){const r=[],o=n||function(e){return"number"==typeof e?Nd:"string"==typeof e?ud.test(e)?gd:Rd:Array.isArray(e)?Td:"object"==typeof e?Id:Nd}(e[0]),i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||Kc:t;i=uu(e,i)}r.push(i)}return r}function Ad(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Mu(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Dd(t,r,o),s=a.length,l=t=>{let n=0;if(s>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=Md(e[n],e[n+1],t);return a[n](r)};return n?t=>l(ec(e[0],e[i-1],t)):l}function Od(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Md(0,t,r);e.push(dd(n,1,o))}}(t,e.length-1),t}function zd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=qu(r)?r.map(rd):rd(r),i={done:!1,value:t[0]},a=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:Od(t),e),s=Ad(a,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map((()=>c||Gu)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}function Ld(e,t){return t?e*(1e3/t):0}const Fd=5;function Bd(e,t,n){const r=Math.max(t-Fd,0);return Ld(n-e(r),t-r)}const jd=.001,Vd=.01,Hd=10,$d=.05,Wd=1;function Ud({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;Ru(e<=Nu(Hd),"Spring duration must be 10 seconds or less");let a=1-t;a=ec($d,Wd,a),e=ec(Vd,Hd,Du(e)),a<1?(o=t=>{const r=t*a,o=r*e,i=r-n,s=qd(t,a),l=Math.exp(-o);return jd-i/s*l},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=qd(Math.pow(t,2),a);return(-o(t)+jd>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-jd,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<Gd;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=Nu(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}const Gd=12;function qd(e,t){return e*Math.sqrt(1-t*t)}const Yd=["duration","bounce"],Kd=["stiffness","damping","mass"];function Xd(e,t){return t.some((t=>void 0!==e[t]))}function Zd({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],a={done:!1,value:o},{stiffness:s,damping:l,mass:c,velocity:u,duration:d,isResolvedFromDuration:f}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Xd(e,Kd)&&Xd(e,Yd)){const n=Ud(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}(r),m=u?-Du(u):0,p=l/(2*Math.sqrt(s*c)),h=i-o,g=Du(Math.sqrt(s/c)),v=Math.abs(h)<5;let b;if(n||(n=v?.01:2),t||(t=v?.005:.5),p<1){const e=qd(g,p);b=t=>{const n=Math.exp(-p*g*t);return i-n*((m+p*g*h)/e*Math.sin(e*t)+h*Math.cos(e*t))}}else if(1===p)b=e=>i-Math.exp(-g*e)*(h+(m+g*h)*e);else{const e=g*Math.sqrt(p*p-1);b=t=>{const n=Math.exp(-p*g*t),r=Math.min(e*t,300);return i-n*((m+p*g*h)*Math.sinh(r)+e*h*Math.cosh(r))/e}}return{calculatedDuration:f&&d||null,next:e=>{const r=b(e);if(f)a.done=e>=d;else{let o=m;0!==e&&(o=p<1?Bd(b,e,r):0);const s=Math.abs(o)<=n,l=Math.abs(i-r)<=t;a.done=s&&l}return a.value=a.done?i:r,a}}}function Jd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},m=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let p=n*t;const h=d+p,g=void 0===a?h:a(h);g!==h&&(p=g-d);const v=e=>-p*Math.exp(-e/r),b=e=>g+v(e),y=e=>{const t=v(e),n=b(e);f.done=Math.abs(t)<=c,f.value=f.done?g:n};let x,w;const E=e=>{(e=>void 0!==s&&e<s||void 0!==l&&e>l)(f.value)&&(x=e,w=Zd({keyframes:[f.value,m(f.value)],velocity:Bd(b,e,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,y(e),E(e)),void 0!==x&&e>x?w.next(e-x):(!t&&y(e),f)}}}const Qd=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Jc.update(t,!0),stop:()=>Qc(t),now:()=>eu.isProcessing?eu.timestamp:performance.now()}},ef=2e4;function tf(e){let t=0;let n=e.next(t);for(;!n.done&&t<ef;)t+=50,n=e.next(t);return t>=ef?1/0:t}const nf={decay:Jd,inertia:Jd,tween:zd,keyframes:zd,spring:Zd};function rf({autoplay:e=!0,delay:t=0,driver:n=Qd,keyframes:r,type:o="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:s="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:d,...f}){let m,p,h=1,g=!1;const v=()=>{p=new Promise((e=>{m=e}))};let b;v();const y=nf[o]||zd;let x;y!==zd&&"number"!=typeof r[0]&&(x=Ad([0,100],r,{clamp:!1}),r=[0,100]);const w=y({...f,keyframes:r});let E;"mirror"===s&&(E=y({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let _="idle",S=null,C=null,k=null;null===w.calculatedDuration&&i&&(w.calculatedDuration=tf(w));const{calculatedDuration:P}=w;let T=1/0,I=1/0;null!==P&&(T=P+a,I=T*(i+1)-a);let R=0;const M=e=>{if(null===C)return;h>0&&(C=Math.min(C,e)),h<0&&(C=Math.min(e-I/h,C)),R=null!==S?S:Math.round(e-C)*h;const n=R-t*(h>=0?1:-1),o=h>=0?n<0:n>I;R=Math.max(n,0),"finished"===_&&null===S&&(R=I);let l=R,c=w;if(i){const e=R/T;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,i+1);const r=Boolean(t%2);r&&("reverse"===s?(n=1-n,a&&(n-=a/T)):"mirror"===s&&(c=E));let o=ec(0,1,n);R>I&&(o="reverse"===s&&r?1:0),l=o*T}const u=o?{done:!1,value:r[0]}:c.next(l);x&&(u.value=x(u.value));let{done:f}=u;o||null===P||(f=h>=0?R>=I:R<=0);const m=null===S&&("finished"===_||"running"===_&&f);return d&&d(u.value),m&&A(),u},N=()=>{b&&b.stop(),b=void 0},D=()=>{_="idle",N(),m(),v(),C=k=null},A=()=>{_="finished",u&&u(),N(),m()},O=()=>{if(g)return;b||(b=n(M));const e=b.now();l&&l(),null!==S?C=e-S:C&&"finished"!==_||(C=e),"finished"===_&&v(),k=C,S=null,_="running",b.start()};e&&O();const z={then:(e,t)=>p.then(e,t),get time(){return Du(R)},set time(e){e=Nu(e),R=e,null===S&&b&&0!==h?C=b.now()-e/h:S=e},get duration(){const e=null===w.calculatedDuration?tf(w):w.calculatedDuration;return Du(e)},get speed(){return h},set speed(e){e!==h&&b&&(h=e,z.time=Du(R))},get state(){return _},play:O,pause:()=>{_="paused",S=R},stop:()=>{g=!0,"idle"!==_&&(_="idle",c&&c(),D())},cancel:()=>{null!==k&&M(k),D()},complete:()=>{_="finished"},sample:e=>(C=0,M(e))};return z}const of=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),af=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);function sf(e,t,{onUpdate:n,onComplete:r,...o}){if(!(of()&&af.has(t)&&!o.repeatDelay&&"mirror"!==o.repeatType&&0!==o.damping&&"inertia"!==o.type))return!1;let i,a,s=!1;const l=()=>{a=new Promise((e=>{i=e}))};l();let{keyframes:c,duration:u=300,ease:d,times:f}=o;if(((e,t)=>"spring"===t.type||"backgroundColor"===e||!zu(t.ease))(t,o)){const e=rf({...o,repeat:0,delay:0});let t={done:!1,value:c[0]};const n=[];let r=0;for(;!t.done&&r<2e4;)t=e.sample(r),n.push(t.value),r+=10;f=void 0,c=n,u=r-10,d="linear"}const m=function(e,t,n,{delay:r=0,duration:o,repeat:i=0,repeatType:a="loop",ease:s,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Bu(s);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"})}(e.owner.current,t,c,{...o,duration:u,ease:d,times:f});o.syncStart&&(m.startTime=eu.isProcessing?eu.timestamp:document.timeline?document.timeline.currentTime:performance.now());const p=()=>m.cancel(),h=()=>{Jc.update(p),i(),l()};m.onfinish=()=>{e.set(function(e,{repeat:t,repeatType:n="loop"}){return e[t&&"loop"!==n&&t%2==1?0:e.length-1]}(c,o)),r&&r(),h()};return{then:(e,t)=>a.then(e,t),attachTimeline:e=>(m.timeline=e,m.onfinish=null,Kc),get time(){return Du(m.currentTime||0)},set time(e){m.currentTime=Nu(e)},get speed(){return m.playbackRate},set speed(e){m.playbackRate=e},get duration(){return Du(u)},play:()=>{s||(m.play(),Qc(p))},pause:()=>m.pause(),stop:()=>{if(s=!0,"idle"===m.playState)return;const{currentTime:t}=m;if(t){const n=rf({...o,autoplay:!1});e.setWithVelocity(n.sample(t-10).value,n.sample(t).value,10)}h()},complete:()=>m.finish(),cancel:h}}const lf={type:"spring",stiffness:500,damping:25,restSpeed:10},cf={type:"keyframes",duration:.8},uf={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},df=(e,{keyframes:t})=>t.length>2?cf:Ul.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:lf:uf,ff=(e,t)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Cd.test(t)&&"0"!==t||t.startsWith("url("))),mf=new Set(["brightness","contrast","saturate","opacity"]);function pf(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(ic)||[];if(!r)return e;const o=n.replace(r,"");let i=mf.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const hf=/([a-z-]*)\(.*?\)/g,gf={...Cd,getAnimatableNone:e=>{const t=e.match(hf);return t?t.map(pf).join(" "):e}},vf={...vc,color:ud,backgroundColor:ud,outlineColor:ud,fill:ud,stroke:ud,borderColor:ud,borderTopColor:ud,borderRightColor:ud,borderBottomColor:ud,borderLeftColor:ud,filter:gf,WebkitFilter:gf},bf=e=>vf[e];function yf(e,t){let n=bf(e);return n!==gf&&(n=Cd),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const xf=e=>/^0[^.\s]+$/.test(e);function wf(e){return"number"==typeof e?0===e:null!==e?"none"===e||"0"===e||xf(e):void 0}function Ef(e,t){return e[t]||e.default||e}const _f=(e,t,n,r={})=>o=>{const i=Ef(r,e)||{},a=i.delay||r.delay||0;let{elapsed:s=0}=r;s-=Nu(a);const l=function(e,t,n,r){const o=ff(t,n);let i;i=Array.isArray(n)?[...n]:[null,n];const a=void 0!==r.from?r.from:e.get();let s;const l=[];for(let e=0;e<i.length;e++)null===i[e]&&(i[e]=0===e?a:i[e-1]),wf(i[e])&&l.push(e),"string"==typeof i[e]&&"none"!==i[e]&&"0"!==i[e]&&(s=i[e]);if(o&&l.length&&s)for(let e=0;e<l.length;e++)i[l[e]]=yf(t,s);return i}(t,e,n,i),c=l[0],u=l[l.length-1],d=ff(e,c),f=ff(e,u);Ru(d===f,`You are trying to animate ${e} from "${c}" to "${u}". ${c} is not an animatable value - to enable this animation set ${c} to a value animatable to ${u} via the \`style\` property.`);let m={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...i,delay:-s,onUpdate:e=>{t.set(e),i.onUpdate&&i.onUpdate(e)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}};if(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}(i)||(m={...m,...df(e,m)}),m.duration&&(m.duration=Nu(m.duration)),m.repeatDelay&&(m.repeatDelay=Nu(m.repeatDelay)),!d||!f||Au||!1===i.type)return function({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Kc,pause:Kc,stop:Kc,then:e=>(e(),Promise.resolve()),cancel:Kc,complete:Kc});return t?rf({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}(Au?{...m,delay:0}:m);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const n=sf(t,e,m);if(n)return n}return rf(m)};function Sf(e){return Boolean(ql(e)&&e.add)}const Cf=e=>/^\-?\d*\.?\d+$/.test(e);function kf(e,t){-1===e.indexOf(t)&&e.push(t)}function Pf(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Tf{constructor(){this.subscriptions=[]}add(e){return kf(this.subscriptions,e),()=>Pf(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const If={current:void 0};class Rf{constructor(e,t={}){var n;this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(e,t=!0)=>{this.prev=this.current,this.current=e;const{delta:n,timestamp:r}=eu;this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,Jc.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Jc.postRender(this.velocityCheck),this.velocityCheck=({timestamp:e})=>{e!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Tf);const n=this.events[e].add(t);return"change"===e?()=>{n(),Jc.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return If.current&&If.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Ld(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Mf(e,t){return new Rf(e,t)}const Nf=e=>t=>t.test(e),Df=[tc,fc,dc,uc,pc,mc,{test:e=>"auto"===e,parse:e=>e}],Af=e=>Df.find(Nf(e)),Of=[...Df,ud,Cd],zf=e=>Of.find(Nf(e));function Lf(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Mf(n))}function Ff(e,t){const n=Tu(e,t);let{transitionEnd:r={},transition:o={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const t in i){Lf(e,t,Uc(i[t]))}}function Bf(e,t){if(!t)return;return(t[e]||t.default||t).from}function jf({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Vf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...s}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const t in s){const r=e.getValue(t),o=s[t];if(!r||void 0===o||u&&jf(u,t))continue;const a={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!r.hasAnimated){const n=e.getProps()[Iu];n&&(a.elapsed=window.HandoffAppearAnimations(n,t,r,Jc),a.syncStart=!0)}r.start(_f(t,r,o,e.shouldReduceMotion&&Ul.has(t)?{type:!1}:a));const d=r.animation;Sf(l)&&(l.add(t),d.then((()=>l.remove(t)))),c.push(d)}return a&&Promise.all(c).then((()=>{a&&Ff(e,a)})),c}function Hf(e,t,n={}){const r=Tu(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(Vf(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:a,staggerDirection:s}=o;return function(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort($f).forEach(((e,r)=>{e.notify("AnimationStart",t),a.push(Hf(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(a)}(e,t,i+r,a,s,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[e,t]="beforeChildren"===s?[i,a]:[a,i];return e().then((()=>t()))}return Promise.all([i(),a(n.delay)])}function $f(e,t){return e.sortNodePosition(t)}const Wf=[...Pl].reverse(),Uf=Pl.length;function Gf(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>Hf(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=Hf(e,t,n);else{const o="function"==typeof t?Tu(e,t,n.custom):t;r=Promise.all(Vf(e,o,n))}return r.then((()=>e.notify("AnimationComplete",t)))}(e,t,n))))}function qf(e){let t=Gf(e);const n={animate:Kf(!0),whileInView:Kf(),whileHover:Kf(),whileTap:Kf(),whileDrag:Kf(),whileFocus:Kf(),exit:Kf()};let r=!0;const o=(t,n)=>{const r=Tu(e,n);if(r){const{transition:e,transitionEnd:n,...o}=r;t={...t,...o,...n}}return t};function i(i,a){const s=e.getProps(),l=e.getVariantContext(!0)||{},c=[],u=new Set;let d={},f=1/0;for(let t=0;t<Uf;t++){const m=Wf[t],p=n[m],h=void 0!==s[m]?s[m]:l[m],g=Cl(h),v=m===a?p.isActive:null;!1===v&&(f=t);let b=h===l[m]&&h!==s[m]&&g;if(b&&r&&e.manuallyAnimateOnMount&&(b=!1),p.protectedKeys={...d},!p.isActive&&null===v||!h&&!p.prevProp||kl(h)||"boolean"==typeof h)continue;const y=Yf(p.prevProp,h);let x=y||m===a&&p.isActive&&!b&&g||t>f&&g;const w=Array.isArray(h)?h:[h];let E=w.reduce(o,{});!1===v&&(E={});const{prevResolvedValues:_={}}=p,S={..._,...E},C=e=>{x=!0,u.delete(e),p.needsAnimating[e]=!0};for(const e in S){const t=E[e],n=_[e];d.hasOwnProperty(e)||(t!==n?$c(t)&&$c(n)?!Pu(t,n)||y?C(e):p.protectedKeys[e]=!0:void 0!==t?C(e):u.add(e):void 0!==t&&u.has(e)?C(e):p.protectedKeys[e]=!0)}p.prevProp=h,p.prevResolvedValues=E,p.isActive&&(d={...d,...E}),r&&e.blockInitialAnimation&&(x=!1),x&&!b&&c.push(...w.map((e=>({animation:e,options:{type:m,...i}}))))}if(u.size){const t={};u.forEach((n=>{const r=e.getBaseTarget(n);void 0!==r&&(t[n]=r)})),c.push({animation:t})}let m=Boolean(c.length);return r&&!1===s.initial&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(c):Promise.resolve()}return{animateChanges:i,setActive:function(t,r,o){var a;if(n[t].isActive===r)return Promise.resolve();null===(a=e.variantChildren)||void 0===a||a.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=i(o,t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n}}function Yf(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Pu(t,e)}function Kf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let Xf=0;const Zf={animation:{Feature:class extends gu{constructor(e){super(e),e.animationState||(e.animationState=qf(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),kl(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends gu{constructor(){super(...arguments),this.id=Xf++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const o=this.node.animationState.setActive("exit",!e,{custom:null!=n?n:this.node.getProps().custom});t&&!e&&o.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},Jf=(e,t)=>Math.abs(e-t);class Qf{constructor(e,t,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=nm(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Jf(e.x,t.x),r=Jf(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=eu;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=em(t,this.transformPagePoint),Jc.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:r}=this.handlers,o=nm("pointercancel"===e.type?this.lastMoveEventInfo:em(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!iu(e))return;this.handlers=t,this.transformPagePoint=n;const r=em(au(e),this.transformPagePoint),{point:o}=r,{timestamp:i}=eu;this.history=[{...o,timestamp:i}];const{onSessionStart:a}=t;a&&a(e,nm(r,this.history)),this.removeListeners=uu(lu(window,"pointermove",this.handlePointerMove),lu(window,"pointerup",this.handlePointerUp),lu(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Qc(this.updatePoint)}}function em(e,t){return t?{point:t(e.point)}:e}function tm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function nm({point:e},t){return{point:e,delta:tm(e,om(t)),offset:tm(e,rm(t)),velocity:im(t,.1)}}function rm(e){return e[0]}function om(e){return e[e.length-1]}function im(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=om(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Nu(t)));)n--;if(!r)return{x:0,y:0};const i=Du(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function am(e){return e.max-e.min}function sm(e,t=0,n=.01){return Math.abs(e-t)<=n}function lm(e,t,n,r=.5){e.origin=r,e.originPoint=dd(t.min,t.max,e.origin),e.scale=am(n)/am(t),(sm(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=dd(n.min,n.max,e.origin)-e.originPoint,(sm(e.translate)||isNaN(e.translate))&&(e.translate=0)}function cm(e,t,n,r){lm(e.x,t.x,n.x,r?r.originX:void 0),lm(e.y,t.y,n.y,r?r.originY:void 0)}function um(e,t,n){e.min=n.min+t.min,e.max=e.min+am(t)}function dm(e,t,n){e.min=t.min-n.min,e.max=e.min+am(t)}function fm(e,t,n){dm(e.x,t.x,n.x),dm(e.y,t.y,n.y)}function mm(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function pm(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const hm=.35;function gm(e,t,n){return{min:vm(e,t),max:vm(e,n)}}function vm(e,t){return"number"==typeof e?e:e[t]||0}const bm=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),ym=()=>({x:{min:0,max:0},y:{min:0,max:0}});function xm(e){return[e("x"),e("y")]}function wm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Em(e){return void 0===e||1===e}function _m({scale:e,scaleX:t,scaleY:n}){return!Em(e)||!Em(t)||!Em(n)}function Sm(e){return _m(e)||Cm(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Cm(e){return km(e.x)||km(e.y)}function km(e){return e&&"0%"!==e}function Pm(e,t,n){return n+t*(e-n)}function Tm(e,t,n,r,o){return void 0!==o&&(e=Pm(e,o,r)),Pm(e,n,r)+t}function Im(e,t=0,n=1,r,o){e.min=Tm(e.min,t,n,r,o),e.max=Tm(e.max,t,n,r,o)}function Rm(e,{x:t,y:n}){Im(e.x,t.translate,t.scale,t.originPoint),Im(e.y,n.translate,n.scale,n.originPoint)}function Mm(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Nm(e,t){e.min=e.min+t,e.max=e.max+t}function Dm(e,t,[n,r,o]){const i=void 0!==t[o]?t[o]:.5,a=dd(e.min,e.max,i);Im(e,t[n],t[r],a,t.scale)}const Am=["x","scaleX","originX"],Om=["y","scaleY","originY"];function zm(e,t){Dm(e.x,t,Am),Dm(e.y,t,Om)}function Lm(e,t){return wm(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const Fm=new WeakMap;class Bm{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ym(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;this.panSession=new Qf(e,{onSessionStart:e=>{this.stopAnimation(),t&&this.snapToCursor(au(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=pu(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),xm((e=>{let t=this.getAxisMotionValue(e).get()||0;if(dc.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=am(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),o&&Jc.update((()=>o(e,t)),!1,!0);const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&Jc.update((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!jm(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?dd(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?dd(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:n}=this.visualElement.projection||{},r=this.constraints;e&&Sl(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:mm(e.x,n,o),y:mm(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=hm){return!1===e?e=0:!0===e&&(e=hm),{x:gm(e,"left","right"),y:gm(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&xm((e=>{this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Sl(e))return!1;const n=e.current;Mu(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=Lm(e,n),{scroll:o}=t;return o&&(Nm(r.x,o.offset.x),Nm(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:pm(e.x,t.x),y:pm(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=wm(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=xm((a=>{if(!jm(a,t,this.currentDirection))return;let l=s&&s[a]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,d)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(_f(e,n,0,t))}stopAnimation(){xm((e=>this.getAxisMotionValue(e).stop()))}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){xm((t=>{const{drag:n}=this.getProps();if(!jm(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-dd(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Sl(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};xm((e=>{const t=this.getAxisMotionValue(e);if(t){const n=t.get();r[e]=function(e,t){let n=.5;const r=am(e),o=am(t);return o>r?n=Md(t.min,t.max-r,e.min):r>o&&(n=Md(e.min,e.max-o,t.min)),ec(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),xm((t=>{if(!jm(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(dd(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Fm.set(this.visualElement,this);const e=lu(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Sl(e)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),t();const o=ou(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(xm((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=hm,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function jm(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Vm=e=>(t,n)=>{e&&Jc.update((()=>e(t,n)))};const Hm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function $m(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Wm={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!fc.test(e))return e;e=parseFloat(e)}return`${$m(e,t.target.x)}% ${$m(e,t.target.y)}%`}},Um={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Cd.parse(e);if(o.length>5)return r;const i=Cd.createTransformer(e),a="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=dd(s,l,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}};class Gm extends r.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=Ym,Object.assign($l,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Hm.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||Jc.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function qm(e){const[t,n]=function(){const e=(0,r.useContext)(xl);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:o}=e,i=(0,r.useId)();return(0,r.useEffect)((()=>o(i)),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}(),o=(0,r.useContext)(Ol);return r.createElement(Gm,{...e,layoutGroup:o,switchLayoutGroup:(0,r.useContext)(zl),isPresent:t,safeToRemove:n})}const Ym={borderRadius:{...Wm,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wm,borderTopRightRadius:Wm,borderBottomLeftRadius:Wm,borderBottomRightRadius:Wm,boxShadow:Um},Km=["TopLeft","TopRight","BottomLeft","BottomRight"],Xm=Km.length,Zm=e=>"string"==typeof e?parseFloat(e):e,Jm=e=>"number"==typeof e||fc.test(e);function Qm(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const ep=np(0,.5,Zu),tp=np(.5,.95,Kc);function np(e,t,n){return r=>r<e?0:r>t?1:n(Md(e,t,r))}function rp(e,t){e.min=t.min,e.max=t.max}function op(e,t){rp(e.x,t.x),rp(e.y,t.y)}function ip(e,t,n,r,o){return e=Pm(e-=t,1/n,r),void 0!==o&&(e=Pm(e,1/o,r)),e}function ap(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){dc.test(t)&&(t=parseFloat(t),t=dd(a.min,a.max,t/100)-a.min);if("number"!=typeof t)return;let s=dd(i.min,i.max,r);e===i&&(s-=t),e.min=ip(e.min,t,n,s,o),e.max=ip(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const sp=["x","scaleX","originX"],lp=["y","scaleY","originY"];function cp(e,t,n,r){ap(e.x,t,sp,n?n.x:void 0,r?r.x:void 0),ap(e.y,t,lp,n?n.y:void 0,r?r.y:void 0)}function up(e){return 0===e.translate&&1===e.scale}function dp(e){return up(e.x)&&up(e.y)}function fp(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function mp(e){return am(e.x)/am(e.y)}class pp{constructor(){this.members=[]}add(e){kf(this.members,e),e.scheduleRender()}remove(e){if(Pf(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function hp(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y;if((o||i)&&(r=`translate3d(${o}px, ${i}px, 0) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:e,rotateX:t,rotateY:o}=n;e&&(r+=`rotate(${e}deg) `),t&&(r+=`rotateX(${t}deg) `),o&&(r+=`rotateY(${o}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return 1===a&&1===s||(r+=`scale(${a}, ${s})`),r||"none"}const gp=(e,t)=>e.depth-t.depth;class vp{constructor(){this.children=[],this.isDirty=!1}add(e){kf(this.children,e),this.isDirty=!0}remove(e){Pf(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(gp),this.isDirty=!1,this.children.forEach(e)}}const bp=["","X","Y","Z"];let yp=0;const xp={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function wp({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=yp++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var e;xp.totalNodes=xp.resolvedTargetDeltas=xp.recalculatedProjection=0,this.nodes.forEach(Sp),this.nodes.forEach(Mp),this.nodes.forEach(Np),this.nodes.forEach(Cp),e=xp,window.MotionDebug&&window.MotionDebug.record(e)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new vp)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Tf),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=performance.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Qc(r),e(i-t))};return Jc.read(r,!0),()=>Qc(r)}(r,250),Hm.hasAnimatedSinceResize&&(Hm.hasAnimatedSinceResize=!1,this.nodes.forEach(Rp))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||Fp,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!fp(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...Ef(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Rp(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Qc(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Dp),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Pp);this.isUpdating||this.nodes.forEach(Tp),this.isUpdating=!1,this.nodes.forEach(Ip),this.nodes.forEach(Ep),this.nodes.forEach(_p),this.clearAllSnapshots();const e=performance.now();eu.delta=ec(0,1e3/60,e-eu.timestamp),eu.timestamp=e,eu.isProcessing=!0,tu.update.process(eu),tu.preRender.process(eu),tu.render.process(eu),eu.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask((()=>this.update())))}clearAllSnapshots(){this.nodes.forEach(kp),this.sharedNodes.forEach(Ap)}scheduleUpdateProjection(){Jc.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Jc.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++){this.path[e].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ym(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&(this.scroll={animationId:this.root.animationId,phase:e,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform,t=this.projectionDelta&&!dp(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||Sm(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Vp((r=n).x),Vp(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return ym();const t=e.measureViewportBox(),{scroll:n}=this.root;return n&&(Nm(t.x,n.offset.x),Nm(t.y,n.offset.y)),t}removeElementScroll(e){const t=ym();op(t,e);for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:o,options:i}=r;if(r!==this.root&&o&&i.layoutScroll){if(o.isRoot){op(t,e);const{scroll:n}=this.root;n&&(Nm(t.x,-n.offset.x),Nm(t.y,-n.offset.y))}Nm(t.x,o.offset.x),Nm(t.y,o.offset.y)}}return t}applyTransform(e,t=!1){const n=ym();op(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&zm(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),Sm(r.latestValues)&&zm(n,r.latestValues)}return Sm(this.latestValues)&&zm(n,this.latestValues),n}removeTransform(e){const t=ym();op(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!Sm(n.latestValues))continue;_m(n.latestValues)&&n.updateSnapshot();const r=ym();op(r,n.measurePageBox()),cp(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return Sm(this.latestValues)&&cp(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==eu.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=eu.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ym(),this.relativeTargetOrigin=ym(),fm(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),op(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var a,s,l;if(this.target||(this.target=ym(),this.targetWithTransforms=ym()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),a=this.target,s=this.relativeTarget,l=this.relativeParent.target,um(a.x,s.x,l.x),um(a.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):op(this.target,this.layout.layoutBox),Rm(this.target,this.targetDelta)):op(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ym(),this.relativeTargetOrigin=ym(),fm(this.relativeTargetOrigin,this.target,e.target),op(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}xp.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!_m(this.parent.latestValues)&&!Cm(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===eu.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;op(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,a;t.x=t.y=1;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const o=i.instance;o&&o.style&&"contents"===o.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&zm(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Rm(e,a)),r&&Sm(i.latestValues)&&zm(e,i.latestValues))}t.x=Mm(t.x),t.y=Mm(t.y)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox);const{target:l}=t;if(!l)return void(this.projectionTransform&&(this.projectionDelta=bm(),this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta=bm(),this.projectionDeltaWithTransform=bm());const c=this.projectionTransform;cm(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=hp(this.projectionDelta,this.treeScale),this.projectionTransform===c&&this.treeScale.x===a&&this.treeScale.y===s||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),xp.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i=bm();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a=ym(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(s&&!c&&!0===this.options.crossfade&&!this.path.some(Lp));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;Op(i.x,e.x,n),Op(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(fm(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){zp(e.x,t.x,n.x,r),zp(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,a,n),d&&function(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d=ym()),op(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=dd(0,void 0!==n.opacity?n.opacity:1,ep(r)),e.opacityExit=dd(void 0!==t.opacity?t.opacity:1,0,tp(r))):i&&(e.opacity=dd(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<Xm;o++){const i=`border${Km[o]}Radius`;let a=Qm(t,i),s=Qm(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||Jm(a)===Jm(s)?(e[i]=Math.max(dd(Zm(a),Zm(s),r),0),(dc.test(s)||dc.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=dd(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Qc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Jc.update((()=>{Hm.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=ql(e)?e:Mf(e);return r.start(_f("",r,t,n)),r.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Hp(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||ym();const t=am(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=am(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}op(t,n),zm(t,o),cm(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new pp);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(t=!0),!t)return;const r={};for(let t=0;t<bp.length;t++){const o="rotate"+bp[t];n[o]&&(r[o]=n[o],e.setStaticValue(o,0))}e.render();for(const t in r)e.setStaticValue(t,r[t]);e.scheduleRender()}getProjectionStyles(e={}){var t,n;const r={};if(!this.instance||this.isSVG)return r;if(!this.isVisible)return{visibility:"hidden"};r.visibility="";const o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Gc(e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Gc(e.pointerEvents)||""),this.hasProjected&&!Sm(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const a=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=hp(this.projectionDeltaWithTransform,this.treeScale,a),o&&(r.transform=o(a,r.transform));const{x:s,y:l}=this.projectionDelta;r.transformOrigin=`${100*s.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=a.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:r.opacity=i===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const e in $l){if(void 0===a[e])continue;const{correct:t,applyTo:n}=$l[e],o="none"===r.transform?a[e]:t(a[e],i);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=o}else r[e]=o}return this.options.layoutId&&(r.pointerEvents=i===this?Gc(e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Pp),this.root.sharedNodes.clear()}}}function Ep(e){e.updateLayout()}function _p(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?xm((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=am(r);r.min=t[e].min,r.max=r.min+o})):Hp(o,n.layoutBox,t)&&xm((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],a=am(t[r]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)}));const a=bm();cm(a,t,n.layoutBox);const s=bm();i?cm(s,e.applyTransform(r,!0),n.measuredBox):cm(s,t,n.layoutBox);const l=!dp(a);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const a=ym();fm(a,n.layoutBox,o.layoutBox);const s=ym();fm(s,t,i.layoutBox),fp(a,s)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Sp(e){xp.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Cp(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function kp(e){e.clearSnapshot()}function Pp(e){e.clearMeasurements()}function Tp(e){e.isLayoutDirty=!1}function Ip(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Rp(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Mp(e){e.resolveTargetDelta()}function Np(e){e.calcProjection()}function Dp(e){e.resetRotation()}function Ap(e){e.removeLeadSnapshot()}function Op(e,t,n){e.translate=dd(t.translate,0,n),e.scale=dd(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function zp(e,t,n,r){e.min=dd(t.min,n.min,r),e.max=dd(t.max,n.max,r)}function Lp(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Fp={duration:.45,ease:[.4,0,.1,1]},Bp=e=>"undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().includes(e),jp=Bp("applewebkit/")&&!Bp("chrome/")?Math.round:Kc;function Vp(e){e.min=jp(e.min),e.max=jp(e.max)}function Hp(e,t,n){return"position"===e||"preserve-aspect"===e&&!sm(mp(t),mp(n),.2)}const $p=wp({attachResizeListener:(e,t)=>ou(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Wp={current:void 0},Up=wp({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Wp.current){const e=new $p({});e.mount(window),e.setOptions({layoutScroll:!0}),Wp.current=e}return Wp.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Gp={pan:{Feature:class extends gu{constructor(){super(...arguments),this.removePointerDownListener=Kc}onPointerDown(e){this.session=new Qf(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Vm(e),onStart:Vm(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Jc.update((()=>r(e,t)))}}}mount(){this.removePointerDownListener=lu(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends gu{constructor(e){super(e),this.removeGroupControls=Kc,this.removeListeners=Kc,this.controls=new Bm(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Kc}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Up,MeasureLayout:qm}},qp=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;const Yp=4;function Kp(e,t,n=1){Mu(n<=Yp,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=qp.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return Cf(e)?parseFloat(e):e}return Jl(o)?Kp(o,t,n+1):o}const Xp=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Zp=e=>Xp.has(e),Jp=e=>e===tc||e===fc,Qp=(e,t)=>parseFloat(e.split(", ")[t]),eh=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return Qp(o[1],t);{const t=r.match(/^matrix\((.+)\)$/);return t?Qp(t[1],e):0}},th=new Set(["x","y","z"]),nh=Wl.filter((e=>!th.has(e)));const rh={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:eh(4,13),y:eh(5,14)};rh.translateX=rh.x,rh.translateY=rh.y;const oh=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(Zp);let i=[],a=!1;const s=[];if(o.forEach((o=>{const l=e.getValue(o);if(!e.hasValue(o))return;let c=n[o],u=Af(c);const d=t[o];let f;if($c(d)){const e=d.length,t=null===d[0]?1:0;c=d[t],u=Af(c);for(let n=t;n<e&&null!==d[n];n++)f?Mu(Af(d[n])===f,"All keyframes must be of the same type"):(f=Af(d[n]),Mu(f===u||Jp(u)&&Jp(f),"Keyframes must be of the same dimension as the current value"))}else f=Af(d);if(u!==f)if(Jp(u)&&Jp(f)){const e=l.get();"string"==typeof e&&l.set(parseFloat(e)),"string"==typeof d?t[o]=parseFloat(d):Array.isArray(d)&&f===fc&&(t[o]=d.map(parseFloat))}else(null==u?void 0:u.transform)&&(null==f?void 0:f.transform)&&(0===c||0===d)?0===c?l.set(f.transform(c)):t[o]=u.transform(d):(a||(i=function(e){const t=[];return nh.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.render(),t}(e),a=!0),s.push(o),r[o]=void 0!==r[o]?r[o]:t[o],l.jump(d))})),s.length){const n=s.indexOf("height")>=0?window.pageYOffset:null,o=((e,t,n)=>{const r=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:a}=i,s={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach((e=>{s[e]=rh[e](r,i)})),t.render();const l=t.measureViewportBox();return n.forEach((n=>{const r=t.getValue(n);r&&r.jump(s[n]),e[n]=rh[n](l,i)})),e})(t,e,s);return i.length&&i.forEach((([t,n])=>{e.getValue(t).set(n)})),e.render(),wl&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:r}}return{target:t,transitionEnd:r}};function ih(e,t,n,r){return(e=>Object.keys(e).some(Zp))(t)?oh(e,t,n,r):{target:t,transitionEnd:r}}const ah=(e,t,n,r)=>{const o=function(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach((e=>{const t=e.get();if(!Jl(t))return;const n=Kp(t,r);n&&e.set(n)}));for(const e in t){const o=t[e];if(!Jl(o))continue;const i=Kp(o,r);i&&(t[e]=i,n||(n={}),void 0===n[e]&&(n[e]=o))}return{target:t,transitionEnd:n}}(e,t,r);return ih(e,t=o.target,n,r=o.transitionEnd)},sh={current:null},lh={current:!1};function ch(){if(lh.current=!0,wl)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>sh.current=e.matches;e.addListener(t),t()}else sh.current=!1}const uh=new WeakMap,dh=Object.keys(Al),fh=dh.length,mh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],ph=Tl.length;class hh{constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,visualState:o},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Jc.render(this.render,!1,!0);const{latestValues:a,renderState:s}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=s,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=i,this.isControllingVariants=Il(t),this.isVariantNode=Rl(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(t,{});for(const e in c){const t=c[e];void 0!==a[e]&&ql(t)&&(t.set(a[e],!1),Sf(l)&&l.add(e))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,uh.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),lh.current||ch(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||sh.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){uh.delete(this.current),this.projection&&this.projection.unmount(),Qc(this.notifyUpdate),Qc(this.render),this.valueSubscriptions.forEach((e=>e())),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const n=Ul.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Jc.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(()=>{r(),o()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures({children:e,...t},n,r,o){let i,a;for(let e=0;e<fh;e++){const n=dh[e],{isEnabled:r,Feature:o,ProjectionNode:s,MeasureLayout:l}=Al[n];s&&(i=s),r(t)&&(!this.features[n]&&o&&(this.features[n]=new o(this)),l&&(a=l))}if(!this.projection&&i){this.projection=new i(this.latestValues,this.parent&&this.parent.projection);const{layoutId:e,layout:n,drag:r,dragConstraints:a,layoutScroll:s,layoutRoot:l}=t;this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(r)||a&&Sl(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:o,layoutScroll:s,layoutRoot:l})}return a}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ym()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<mh.length;t++){const n=mh[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){const{willChange:r}=t;for(const o in t){const i=t[o],a=n[o];if(ql(i))e.addValue(o,i),Sf(r)&&r.add(o);else if(ql(a))e.addValue(o,Mf(i,{owner:e})),Sf(r)&&r.remove(o);else if(a!==i)if(e.hasValue(o)){const t=e.getValue(o);!t.hasAnimated&&t.set(i)}else{const t=e.getStaticValue(o);e.addValue(o,Mf(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let e=0;e<ph;e++){const n=Tl[e],r=this.props[n];(Cl(r)||!1===r)&&(t[n]=r)}return t}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Mf(t,{owner:this}),this.addValue(e,n)),n}readValue(e){var t;return void 0===this.latestValues[e]&&this.current?null!==(t=this.getBaseTargetFromProps(this.props,e))&&void 0!==t?t:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e]}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props,r="string"==typeof n||"object"==typeof n?null===(t=Vc(this.props,n))||void 0===t?void 0:t[e]:void 0;if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||ql(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new Tf),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class gh extends hh{sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...n},{transformValues:r},o){let i=function(e,t,n){const r={};for(const o in e){const e=Bf(o,t);if(void 0!==e)r[o]=e;else{const e=n.getValue(o);e&&(r[o]=e.get())}}return r}(n,e||{},this);if(r&&(t&&(t=r(t)),n&&(n=r(n)),i&&(i=r(i))),o){!function(e,t,n){var r,o;const i=Object.keys(t).filter((t=>!e.hasValue(t))),a=i.length;if(a)for(let s=0;s<a;s++){const a=i[s],l=t[a];let c=null;Array.isArray(l)&&(c=l[0]),null===c&&(c=null!==(o=null!==(r=n[a])&&void 0!==r?r:e.readValue(a))&&void 0!==o?o:t[a]),null!=c&&("string"==typeof c&&(Cf(c)||xf(c))?c=parseFloat(c):!zf(c)&&Cd.test(l)&&(c=yf(a,l)),e.addValue(a,Mf(c,{owner:e})),void 0===n[a]&&(n[a]=c),null!==c&&e.setBaseTarget(a,c))}}(this,n,i);const e=ah(this,n,i,t);t=e.transitionEnd,n=e.target}return{transition:e,transitionEnd:t,...n}}}class vh extends gh{readValueFromInstance(e,t){if(Ul.has(t)){const e=bf(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(Zl(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Lm(e,t)}build(e,t,n,r){bc(e,t,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return Bc(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ql(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}renderInstance(e,t,n,r){zc(e,t,n,r)}}class bh extends gh{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Ul.has(t)){const e=bf(t);return e&&e.default||0}return t=Lc.has(t)?t:Oc(t),e.getAttribute(t)}measureInstanceViewportBox(){return ym()}scrapeMotionValuesFromProps(e,t){return jc(e,t)}build(e,t,n,r){Rc(e,t,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,n,r){Fc(e,t,0,r)}mount(e){this.isSVGTag=Nc(e.tagName),super.mount(e)}}const yh=(e,t)=>Hl(e)?new bh(t,{enableHardwareAcceleration:!1}):new vh(t,{enableHardwareAcceleration:!0}),xh={...Zf,...ku,...Gp,...{layout:{ProjectionNode:Up,MeasureLayout:qm}}},wh=jl(((e,t)=>function(e,{forwardMotionProps:t=!1},n,r){return{...Hl(e)?nu:ru,preloadedFeatures:n,useRender:Ac(t),createVisualElement:r,Component:e}}(e,t,xh,yh)));function Eh(){const e=(0,r.useRef)(!1);return El((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function _h(){const e=Eh(),[t,n]=(0,r.useState)(0),o=(0,r.useCallback)((()=>{e.current&&n(t+1)}),[t]);return[(0,r.useCallback)((()=>Jc.postRender(o)),[o]),t]}class Sh extends r.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Ch({children:e,isPresent:t}){const n=(0,r.useId)(),o=(0,r.useRef)(null),i=(0,r.useRef)({width:0,height:0,top:0,left:0});return(0,r.useInsertionEffect)((()=>{const{width:e,height:r,top:a,left:s}=i.current;if(t||!o.current||!e||!r)return;o.current.dataset.motionPopId=n;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${r}px !important;\n top: ${a}px !important;\n left: ${s}px !important;\n }\n `),()=>{document.head.removeChild(l)}}),[t]),r.createElement(Sh,{isPresent:t,childRef:o,sizeRef:i},r.cloneElement(e,{ref:o}))}const kh=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:i,presenceAffectsLayout:a,mode:s})=>{const l=Hc(Ph),c=(0,r.useId)(),u=(0,r.useMemo)((()=>({id:c,initial:t,isPresent:n,custom:i,onExitComplete:e=>{l.set(e,!0);for(const e of l.values())if(!e)return;o&&o()},register:e=>(l.set(e,!1),()=>l.delete(e))})),a?void 0:[n]);return(0,r.useMemo)((()=>{l.forEach(((e,t)=>l.set(t,!1)))}),[n]),r.useEffect((()=>{!n&&!l.size&&o&&o()}),[n]),"popLayout"===s&&(e=r.createElement(Ch,{isPresent:n},e)),r.createElement(xl.Provider,{value:u},e)};function Ph(){return new Map}const Th=e=>e.key||"";const Ih=({children:e,custom:t,initial:n=!0,onExitComplete:o,exitBeforeEnter:i,presenceAffectsLayout:a=!0,mode:s="sync"})=>{Mu(!i,"Replace exitBeforeEnter with mode='wait'");const l=(0,r.useContext)(Ol).forceRender||_h()[0],c=Eh(),u=function(e){const t=[];return r.Children.forEach(e,(e=>{(0,r.isValidElement)(e)&&t.push(e)})),t}(e);let d=u;const f=(0,r.useRef)(new Map).current,m=(0,r.useRef)(d),p=(0,r.useRef)(new Map).current,h=(0,r.useRef)(!0);var g;if(El((()=>{h.current=!1,function(e,t){e.forEach((e=>{const n=Th(e);t.set(n,e)}))}(u,p),m.current=d})),g=()=>{h.current=!0,p.clear(),f.clear()},(0,r.useEffect)((()=>()=>g()),[]),h.current)return r.createElement(r.Fragment,null,d.map((e=>r.createElement(kh,{key:Th(e),isPresent:!0,initial:!!n&&void 0,presenceAffectsLayout:a,mode:s},e))));d=[...d];const v=m.current.map(Th),b=u.map(Th),y=v.length;for(let e=0;e<y;e++){const t=v[e];-1!==b.indexOf(t)||f.has(t)||f.set(t,void 0)}return"wait"===s&&f.size&&(d=[]),f.forEach(((e,n)=>{if(-1!==b.indexOf(n))return;const i=p.get(n);if(!i)return;const h=v.indexOf(n);let g=e;if(!g){const e=()=>{p.delete(n),f.delete(n);const e=m.current.findIndex((e=>e.key===n));if(m.current.splice(e,1),!f.size){if(m.current=u,!1===c.current)return;l(),o&&o()}};g=r.createElement(kh,{key:Th(i),isPresent:!1,onExitComplete:e,custom:t,presenceAffectsLayout:a,mode:s},i),f.set(n,g)}d.splice(h,0,g)})),d=d.map((e=>{const t=e.key;return f.has(t)?e:r.createElement(kh,{key:Th(e),isPresent:!0,presenceAffectsLayout:a,mode:s},e)})),r.createElement(r.Fragment,null,f.size?d:d.map((e=>(0,r.cloneElement)(e))))},Rh=["40em","52em","64em"],Mh=(e={})=>{const{defaultIndex:t=0}=e;if("number"!=typeof t)throw new TypeError(`Default breakpoint index should be a number. Got: ${t}, ${typeof t}`);if(t<0||t>Rh.length-1)throw new RangeError(`Default breakpoint index out of range. Theme has ${Rh.length} breakpoints, got index ${t}`);const[n,r]=(0,Uo.useState)(t);return(0,Uo.useEffect)((()=>{const e=()=>{const e=Rh.filter((e=>"undefined"!=typeof window&&window.matchMedia(`screen and (min-width: ${e})`).matches)).length;n!==e&&r(e)};return e(),"undefined"!=typeof window&&window.addEventListener("resize",e),()=>{"undefined"!=typeof window&&window.removeEventListener("resize",e)}}),[n]),n};function Nh(e,t={}){const n=Mh(t);if(!Array.isArray(e)&&"function"!=typeof e)return e;const r=e||[];return r[n>=r.length?r.length-1:n]}const Dh="4px";function Ah(e){if(void 0===e)return;if(!e)return"0";const t="number"==typeof e?e:Number(e);return"undefined"!=typeof window&&window.CSS?.supports?.("margin",e.toString())||Number.isNaN(t)?e.toString():`calc(${Dh} * ${e})`}const Oh={name:"zjik7",styles:"display:flex"},zh={name:"qgaee5",styles:"display:block;max-height:100%;max-width:100%;min-height:0;min-width:0"},Lh={name:"82a6rk",styles:"flex:1"},Fh={name:"13nosa1",styles:">*{min-height:0;}"},Bh={name:"1pwxzk4",styles:">*{min-width:0;}"};function jh(e){const{align:t,className:n,direction:r="row",expanded:o=!0,gap:i=2,justify:a="space-between",wrap:s=!1,...l}=rs(function(e){const{isReversed:t,...n}=e;return void 0!==t?(qo()("Flex isReversed",{alternative:'Flex direction="row-reverse" or "column-reverse"',since:"5.9"}),{...n,direction:t?"row-reverse":"row"}):n}(e),"Flex"),c=Nh(Array.isArray(r)?r:[r]),u="string"==typeof c&&!!c.includes("column"),d=ns();return{...l,className:(0,Uo.useMemo)((()=>{const e=Ps({alignItems:null!=t?t:u?"normal":"center",flexDirection:c,flexWrap:s?"wrap":void 0,gap:Ah(i),justifyContent:a,height:u&&o?"100%":void 0,width:!u&&o?"100%":void 0},"","");return d(Oh,e,u?Fh:Bh,n)}),[t,n,d,c,o,i,u,a,s]),isColumn:u}}const Vh=(0,Uo.createContext)({flexItemDisplay:void 0}),Hh=()=>(0,Uo.useContext)(Vh);const $h=os((function(e,t){const{children:n,isColumn:o,...i}=jh(e);return(0,r.createElement)(Vh.Provider,{value:{flexItemDisplay:o?"block":void 0}},(0,r.createElement)(xs,{...i,ref:t},n))}),"Flex");function Wh(e){const{className:t,display:n,isBlock:r=!1,...o}=rs(e,"FlexItem"),i={},a=Hh().flexItemDisplay;i.Base=Ps({display:n||a},"","");return{...o,className:ns()(zh,i.Base,r&&Lh,t)}}const Uh=os((function(e,t){const n=function(e){return Wh({isBlock:!0,...rs(e,"FlexBlock")})}(e);return(0,r.createElement)(xs,{...n,ref:t})}),"FlexBlock"),Gh=new RegExp(/-left/g),qh=new RegExp(/-right/g),Yh=new RegExp(/Left/g),Kh=new RegExp(/Right/g);function Xh(e){return"left"===e?"right":"right"===e?"left":Gh.test(e)?e.replace(Gh,"-right"):qh.test(e)?e.replace(qh,"-left"):Yh.test(e)?e.replace(Yh,"Right"):Kh.test(e)?e.replace(Kh,"Left"):e}const Zh=(e={})=>Object.fromEntries(Object.entries(e).map((([e,t])=>[Xh(e),t])));function Jh(e={},t){return()=>t?(0,u.isRTL)()?Ps(t,""):Ps(e,""):(0,u.isRTL)()?Ps(Zh(e),""):Ps(e,"")}Jh.watch=()=>(0,u.isRTL)();const Qh=e=>null!=e;const eg=os((function(e,t){const n=function(e){const{className:t,margin:n,marginBottom:r=2,marginLeft:o,marginRight:i,marginTop:a,marginX:s,marginY:l,padding:c,paddingBottom:u,paddingLeft:d,paddingRight:f,paddingTop:m,paddingX:p,paddingY:h,...g}=rs(e,"Spacer");return{...g,className:ns()(Qh(n)&&Ps("margin:",Ah(n),";",""),Qh(l)&&Ps("margin-bottom:",Ah(l),";margin-top:",Ah(l),";",""),Qh(s)&&Ps("margin-left:",Ah(s),";margin-right:",Ah(s),";",""),Qh(a)&&Ps("margin-top:",Ah(a),";",""),Qh(r)&&Ps("margin-bottom:",Ah(r),";",""),Qh(o)&&Jh({marginLeft:Ah(o)})(),Qh(i)&&Jh({marginRight:Ah(i)})(),Qh(c)&&Ps("padding:",Ah(c),";",""),Qh(h)&&Ps("padding-bottom:",Ah(h),";padding-top:",Ah(h),";",""),Qh(p)&&Ps("padding-left:",Ah(p),";padding-right:",Ah(p),";",""),Qh(m)&&Ps("padding-top:",Ah(m),";",""),Qh(u)&&Ps("padding-bottom:",Ah(u),";",""),Qh(d)&&Jh({paddingLeft:Ah(d)})(),Qh(f)&&Jh({paddingRight:Ah(f)})(),t)}}(e);return(0,r.createElement)(xs,{...n,ref:t})}),"Spacer"),tg=eg,ng=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})),rg=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M7 11.5h10V13H7z"}));const og=os((function(e,t){const n=Wh(e);return(0,r.createElement)(xs,{...n,ref:t})}),"FlexItem");const ig={name:"hdknak",styles:"display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"};function ag(e){return null!=e}const sg=e=>"string"==typeof e?(e=>parseFloat(e))(e):e,lg="…",cg={auto:"auto",head:"head",middle:"middle",tail:"tail",none:"none"},ug={ellipsis:lg,ellipsizeMode:cg.auto,limit:0,numberOfLines:0};function dg(e="",t){const n={...ug,...t},{ellipsis:r,ellipsizeMode:o,limit:i}=n;if(o===cg.none)return e;let a,s;switch(o){case cg.head:a=0,s=i;break;case cg.middle:a=Math.floor(i/2),s=Math.floor(i/2);break;default:a=i,s=0}const l=o!==cg.auto?function(e,t,n,r){if("string"!=typeof e)return"";const o=e.length,i=~~t,a=~~n,s=ag(r)?r:lg;return 0===i&&0===a||i>=o||a>=o||i+a>=o?e:0===a?e.slice(0,i)+s:e.slice(0,i)+s+e.slice(o-a)}(e,a,s,r):e;return l}function fg(e){const{className:t,children:n,ellipsis:r=lg,ellipsizeMode:o=cg.auto,limit:i=0,numberOfLines:a=0,...s}=rs(e,"Truncate"),l=ns();let c;"string"==typeof n?c=n:"number"==typeof n&&(c=n.toString());const u=c?dg(c,{ellipsis:r,ellipsizeMode:o,limit:i,numberOfLines:a}):n,d=!!c&&o===cg.auto;return{...s,className:(0,Uo.useMemo)((()=>l(d&&!a&&ig,d&&!!a&&Ps("-webkit-box-orient:vertical;-webkit-line-clamp:",a,";display:-webkit-box;overflow:hidden;",""),t)),[t,l,a,d]),children:u}}var mg={grad:.9,turn:360,rad:360/(2*Math.PI)},pg=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},hg=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},gg=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},vg=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},bg=function(e){return{r:gg(e.r,0,255),g:gg(e.g,0,255),b:gg(e.b,0,255),a:gg(e.a)}},yg=function(e){return{r:hg(e.r),g:hg(e.g),b:hg(e.b),a:hg(e.a,3)}},xg=/^#([0-9a-f]{3,8})$/i,wg=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Eg=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:60*(s<0?s+6:s),s:i?a/i*100:0,v:i/255*100,a:o}},_g=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),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:255*[r,s,a,a,l,r][c],g:255*[l,r,r,s,a,a][c],b:255*[a,a,l,r,r,s][c],a:o}},Sg=function(e){return{h:vg(e.h),s:gg(e.s,0,100),l:gg(e.l,0,100),a:gg(e.a)}},Cg=function(e){return{h:hg(e.h),s:hg(e.s),l:hg(e.l),a:hg(e.a,3)}},kg=function(e){return _g((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},Pg=function(e){return{h:(t=Eg(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},Tg=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ig=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Rg=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Mg=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ng={string:[[function(e){var t=xg.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?hg(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?hg(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Rg.exec(e)||Mg.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:bg({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=Tg.exec(e)||Ig.exec(e);if(!t)return null;var n,r,o=Sg({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(mg[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return kg(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 pg(t)&&pg(n)&&pg(r)?bg({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(!pg(t)||!pg(n)||!pg(r))return null;var a=Sg({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return kg(a)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!pg(t)||!pg(n)||!pg(r))return null;var a=function(e){return{h:vg(e.h),s:gg(e.s,0,100),v:gg(e.v,0,100),a:gg(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return _g(a)},"hsv"]]},Dg=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},Ag=function(e){return"string"==typeof e?Dg(e.trim(),Ng.string):"object"==typeof e&&null!==e?Dg(e,Ng.object):[null,void 0]},Og=function(e,t){var n=Pg(e);return{h:n.h,s:gg(n.s+100*t,0,100),l:n.l,a:n.a}},zg=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Lg=function(e,t){var n=Pg(e);return{h:n.h,s:n.s,l:gg(n.l+100*t,0,100),a:n.a}},Fg=function(){function e(e){this.parsed=Ag(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return hg(zg(this.rgba),2)},e.prototype.isDark=function(){return zg(this.rgba)<.5},e.prototype.isLight=function(){return zg(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=yg(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?wg(hg(255*o)):"","#"+wg(t)+wg(n)+wg(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return yg(this.rgba)},e.prototype.toRgbString=function(){return t=(e=yg(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 Cg(Pg(this.rgba))},e.prototype.toHslString=function(){return t=(e=Cg(Pg(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=Eg(this.rgba),{h:hg(e.h),s:hg(e.s),v:hg(e.v),a:hg(e.a,3)};var e},e.prototype.invert=function(){return Bg({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),Bg(Og(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Bg(Og(this.rgba,-e))},e.prototype.grayscale=function(){return Bg(Og(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Bg(Lg(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Bg(Lg(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?Bg({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):hg(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Pg(this.rgba);return"number"==typeof e?Bg({h:e,s:t.s,l:t.l,a:t.a}):hg(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Bg(e).toHex()},e}(),Bg=function(e){return e instanceof Fg?e:new Fg(e)},jg=[],Vg=function(e){e.forEach((function(e){jg.indexOf(e)<0&&(e(Fg,Ng),jg.push(e))}))};function Hg(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,a,s=r[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var l=this.toRgb(),c=1/0,u="black";if(!i.length)for(var d in n)i[d]=new e(n[d]).toRgb();for(var f in n){var m=(o=l,a=i[f],Math.pow(o.r-a.r,2)+Math.pow(o.g-a.g,2)+Math.pow(o.b-a.b,2));m<c&&(c=m,u=f)}return u}},t.string.push([function(t){var r=t.toLowerCase(),o="transparent"===r?"#0000":n[r];return o?new e(o).toRgb():null},"name"])}let $g;Vg([Hg]);const Wg=Si((function(e){if("string"!=typeof e)return"";if("string"==typeof(t=e)&&Bg(t).isValid())return e;var t;if(!e.includes("var("))return"";if("undefined"==typeof document)return"";const n=function(){if("undefined"!=typeof document){if(!$g){const e=document.createElement("div");e.setAttribute("data-g2-color-computation-node",""),document.body.appendChild(e),$g=e}return $g}}();if(!n)return"";n.style.background=e;const r=window?.getComputedStyle(n).background;return n.style.background="",r||""}));function Ug(e){const t=function(e){const t=Wg(e);return Bg(t).isLight()?"#000000":"#ffffff"}(e);return"#000000"===t?"dark":"light"}const Gg="36px",qg="12px",Yg={controlSurfaceColor:Ds.white,controlTextActiveColor:Ds.theme.accent,controlPaddingX:qg,controlPaddingXLarge:`calc(${qg} * 1.3334)`,controlPaddingXSmall:`calc(${qg} / 1.3334)`,controlBackgroundColor:Ds.white,controlBorderRadius:"2px",controlBoxShadow:"transparent",controlBoxShadowFocus:`0 0 0 0.5px ${Ds.theme.accent}`,controlDestructiveBorderColor:Ds.alert.red,controlHeight:Gg,controlHeightXSmall:`calc( ${Gg} * 0.6 )`,controlHeightSmall:`calc( ${Gg} * 0.8 )`,controlHeightLarge:`calc( ${Gg} * 1.2 )`,controlHeightXLarge:`calc( ${Gg} * 1.4 )`},Kg={toggleGroupControlBackgroundColor:Yg.controlBackgroundColor,toggleGroupControlBorderColor:Ds.ui.border,toggleGroupControlBackdropBackgroundColor:Yg.controlSurfaceColor,toggleGroupControlBackdropBorderColor:Ds.ui.border,toggleGroupControlButtonColorActive:Yg.controlBackgroundColor},Xg=Object.assign({},Yg,Kg,{colorDivider:"rgba(0, 0, 0, 0.1)",colorScrollbarThumb:"rgba(0, 0, 0, 0.2)",colorScrollbarThumbHover:"rgba(0, 0, 0, 0.5)",colorScrollbarTrack:"rgba(0, 0, 0, 0.04)",elevationIntensity:1,radiusBlockUi:"2px",borderWidth:"1px",borderWidthFocus:"1.5px",borderWidthTab:"4px",spinnerSize:16,fontSize:"13px",fontSizeH1:"calc(2.44 * 13px)",fontSizeH2:"calc(1.95 * 13px)",fontSizeH3:"calc(1.56 * 13px)",fontSizeH4:"calc(1.25 * 13px)",fontSizeH5:"13px",fontSizeH6:"calc(0.8 * 13px)",fontSizeInputMobile:"16px",fontSizeMobile:"15px",fontSizeSmall:"calc(0.92 * 13px)",fontSizeXSmall:"calc(0.75 * 13px)",fontLineHeightBase:"1.2",fontWeight:"normal",fontWeightHeading:"600",gridBase:"4px",cardBorderRadius:"2px",cardPaddingXSmall:`${Ah(2)}`,cardPaddingSmall:`${Ah(4)}`,cardPaddingMedium:`${Ah(4)} ${Ah(6)}`,cardPaddingLarge:`${Ah(6)} ${Ah(8)}`,popoverShadow:"0 0.7px 1px rgba(0, 0, 0, 0.1), 0 1.2px 1.7px -0.2px rgba(0, 0, 0, 0.1), 0 2.3px 3.3px -0.5px rgba(0, 0, 0, 0.1)",surfaceBackgroundColor:Ds.white,surfaceBackgroundSubtleColor:"#F3F3F3",surfaceBackgroundTintColor:"#F5F5F5",surfaceBorderColor:"rgba(0, 0, 0, 0.1)",surfaceBorderBoldColor:"rgba(0, 0, 0, 0.15)",surfaceBorderSubtleColor:"rgba(0, 0, 0, 0.05)",surfaceBackgroundTertiaryColor:Ds.white,surfaceColor:Ds.white,transitionDuration:"200ms",transitionDurationFast:"160ms",transitionDurationFaster:"120ms",transitionDurationFastest:"100ms",transitionTimingFunction:"cubic-bezier(0.08, 0.52, 0.52, 1)",transitionTimingFunctionControl:"cubic-bezier(0.12, 0.8, 0.32, 1)"});const Zg=Ps("color:",Ds.gray[900],";line-height:",Xg.fontLineHeightBase,";margin:0;",""),Jg={name:"4zleql",styles:"display:block"},Qg=Ps("color:",Ds.alert.green,";",""),ev=Ps("color:",Ds.alert.red,";",""),tv=Ps("color:",Ds.gray[700],";",""),nv=Ps("mark{background:",Ds.alert.yellow,";border-radius:2px;box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;}",""),rv={name:"50zrmy",styles:"text-transform:uppercase"};var ov=o(9664);const iv=Si((e=>{const t={};for(const n in e)t[n.toLowerCase()]=e[n];return t}));const av=13,sv={body:av,caption:10,footnote:11,largeTitle:28,subheadline:12,title:20},lv=[1,2,3,4,5,6].flatMap((e=>[e,e.toString()]));function cv(e=av){if(e in sv)return cv(sv[e]);if("number"!=typeof e){const t=parseFloat(e);if(Number.isNaN(t))return e;e=t}return`calc(${`(${e} / ${av})`} * ${Xg.fontSize})`}function uv(e=3){if(!lv.includes(e))return cv(e);return Xg[`fontSizeH${e}`]}var dv={name:"50zrmy",styles:"text-transform:uppercase"};function fv(t){const{adjustLineHeightForInnerControls:n,align:r,children:o,className:i,color:a,ellipsizeMode:s,isDestructive:l=!1,display:c,highlightEscape:u=!1,highlightCaseSensitive:d=!1,highlightWords:f,highlightSanitize:m,isBlock:p=!1,letterSpacing:h,lineHeight:g,optimizeReadabilityFor:v,size:b,truncate:y=!1,upperCase:x=!1,variant:w,weight:E=Xg.fontWeight,..._}=rs(t,"Text");let S=o;const C=Array.isArray(f),k="caption"===b;if(C){if("string"!=typeof o)throw new TypeError("`children` of `Text` must only be `string` types when `highlightWords` is defined");S=function({activeClassName:e="",activeIndex:t=-1,activeStyle:n,autoEscape:r,caseSensitive:o=!1,children:i,findChunks:a,highlightClassName:s="",highlightStyle:l={},highlightTag:c="mark",sanitize:u,searchWords:d=[],unhighlightClassName:f="",unhighlightStyle:m}){if(!i)return null;if("string"!=typeof i)return i;const p=i,h=(0,ov.findAll)({autoEscape:r,caseSensitive:o,findChunks:a,sanitize:u,searchWords:d,textToHighlight:p}),g=c;let v,b=-1,y="";const x=h.map(((r,i)=>{const a=p.substr(r.start,r.end-r.start);if(r.highlight){let r;b++,r="object"==typeof s?o?s[a]:(s=iv(s))[a.toLowerCase()]:s;const c=b===+t;y=`${r} ${c?e:""}`,v=!0===c&&null!==n?Object.assign({},l,n):l;const u={children:a,className:y,key:i,style:v};return"string"!=typeof g&&(u.highlightIndex=b),(0,Uo.createElement)(g,u)}return(0,Uo.createElement)("span",{children:a,className:f,key:i,style:m})}));return x}({autoEscape:u,children:o,caseSensitive:d,searchWords:f,sanitize:m})}const P=ns();let T;!0===y&&(T="auto"),!1===y&&(T="none");const I=fg({..._,className:(0,Uo.useMemo)((()=>{const t={},o=function(e,t){if(t)return t;if(!e)return;let n=`calc(${Xg.controlHeight} + ${Ah(2)})`;switch(e){case"large":n=`calc(${Xg.controlHeightLarge} + ${Ah(2)})`;break;case"small":n=`calc(${Xg.controlHeightSmall} + ${Ah(2)})`;break;case"xSmall":n=`calc(${Xg.controlHeightXSmall} + ${Ah(2)})`}return n}(n,g);if(t.Base=Ps({color:a,display:c,fontSize:cv(b),fontWeight:E,lineHeight:o,letterSpacing:h,textAlign:r},"",""),t.upperCase=dv,t.optimalTextColor=null,v){const e="dark"===Ug(v);t.optimalTextColor=Ps(e?{color:Ds.gray[900]}:{color:Ds.white},"","")}return P(Zg,t.Base,t.optimalTextColor,l&&ev,!!C&&nv,p&&Jg,k&&tv,w&&e[w],x&&t.upperCase,i)}),[n,r,i,a,P,c,p,k,l,C,h,g,v,b,x,w,E]),children:o,ellipsizeMode:s||T});return!y&&Array.isArray(o)&&(S=Uo.Children.map(o,(e=>{if("object"!=typeof e||null===e||!("props"in e))return e;return ls(e,["Link"])?(0,Uo.cloneElement)(e,{size:e.props.size||"inherit"}):e}))),{...I,children:y?I.children:S}}const mv=os((function(e,t){const n=fv(e);return(0,r.createElement)(xs,{as:"span",...n,ref:t})}),"Text");const pv={name:"9amh4a",styles:"font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase"};var hv={name:"1739oy8",styles:"z-index:1"};const gv=({isFocused:e})=>e?hv:"",vv=bs($h,{target:"em5sgkm7"})("box-sizing:border-box;position:relative;border-radius:2px;padding-top:0;",gv,";");var bv={name:"1d3w5wq",styles:"width:100%"};const yv=bs("div",{target:"em5sgkm6"})("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;",(({disabled:e})=>Ps({backgroundColor:e?Ds.ui.backgroundDisabled:Ds.ui.background},"",""))," ",(({__unstableInputWidth:e,labelPosition:t})=>e?"side"===t?"":Ps("edge"===t?{flex:`0 0 ${e}`}:{width:e},"",""):bv),";"),xv=({inputSize:e})=>{const t={default:"13px",small:"11px",compact:"13px","__unstable-large":"13px"},n=t[e]||t.default;return n?Ps("font-size:","16px",";@media ( min-width: 600px ){font-size:",n,";}",""):""},wv=({inputSize:e,__next40pxDefaultSize:t})=>{const n={default:{height:40,lineHeight:1,minHeight:40,paddingLeft:Ah(4),paddingRight:Ah(4)},small:{height:24,lineHeight:1,minHeight:24,paddingLeft:Ah(2),paddingRight:Ah(2)},compact:{height:32,lineHeight:1,minHeight:32,paddingLeft:Ah(2),paddingRight:Ah(2)},"__unstable-large":{height:40,lineHeight:1,minHeight:40,paddingLeft:Ah(4),paddingRight:Ah(4)}};return t||(n.default=n.compact),n[e]||n.default},Ev=bs("input",{target:"em5sgkm5"})("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",Ds.theme.foreground,";display:block;font-family:inherit;margin:0;outline:none;width:100%;",(({isDragging:e,dragCursor:t})=>{let n,r;return e&&(n=Ps("cursor:",t,";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}","")),e&&t&&(r=Ps("&:active{cursor:",t,";}","")),Ps(n," ",r,";","")})," ",(({disabled:e})=>e?Ps({color:Ds.ui.textDisabled},"",""):"")," ",xv," ",(e=>Ps(wv(e),"",""))," ",(({paddingInlineStart:e,paddingInlineEnd:t})=>Ps({paddingInlineStart:e,paddingInlineEnd:t},"",""))," &::-webkit-input-placeholder{line-height:normal;}}"),_v=bs(mv,{target:"em5sgkm4"})("&&&{",pv,";box-sizing:border-box;display:block;padding-top:0;padding-bottom:0;max-width:100%;z-index:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"),Sv=e=>(0,r.createElement)(_v,{...e,as:"label"}),Cv=bs(og,{target:"em5sgkm3"})({name:"1b6uupn",styles:"max-width:calc( 100% - 10px )"}),kv=bs("div",{target:"em5sgkm2"})("&&&{box-sizing:border-box;border-radius:inherit;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;",(({disabled:e,isBorderless:t,isFocused:n})=>{let r,o,i,a=t?"transparent":Ds.ui.border;return n&&(a=Ds.ui.borderFocus,r=Xg.controlBoxShadowFocus,o="2px solid transparent",i="-2px"),e&&(a=t?"transparent":Ds.ui.borderDisabled),Ps({boxShadow:r,borderColor:a,borderStyle:"solid",borderWidth:1,outline:o,outlineOffset:i},"","")})," ",Jh({paddingLeft:2}),";}"),Pv=bs("span",{target:"em5sgkm1"})({name:"pvvbxf",styles:"box-sizing:border-box;display:block"}),Tv=bs("span",{target:"em5sgkm0"})({name:"jgf79h",styles:"align-items:center;align-self:stretch;box-sizing:border-box;display:flex"});const Iv=(0,Uo.memo)((function({disabled:e=!1,isBorderless:t=!1,isFocused:n=!1}){return(0,r.createElement)(kv,{"aria-hidden":"true",className:"components-input-control__backdrop",disabled:e,isBorderless:t,isFocused:n})})),Rv=Iv;function Mv({children:e,hideLabelFromVision:t,htmlFor:n,...o}){return e?t?(0,r.createElement)(ws,{as:"label",htmlFor:n},e):(0,r.createElement)(Cv,null,(0,r.createElement)(Sv,{htmlFor:n,...o},e)):null}function Nv(e){const{__next36pxDefaultSize:t,__next40pxDefaultSize:n,...r}=e;return{...r,__next40pxDefaultSize:null!=n?n:t}}function Dv(e){const t={};switch(e){case"top":t.direction="column",t.expanded=!1,t.gap=0;break;case"bottom":t.direction="column-reverse",t.expanded=!1,t.gap=0;break;case"edge":t.justify="space-between"}return t}function Av(e,t){const{__next40pxDefaultSize:n,__unstableInputWidth:o,children:i,className:a,disabled:s=!1,hideLabelFromVision:l=!1,labelPosition:c,id:u,isBorderless:f=!1,isFocused:m=!1,label:p,prefix:h,size:g="default",suffix:v,...b}=Nv(rs(e,"InputBase")),y=function(e){const t=(0,d.useInstanceId)(Av);return e||`input-base-control-${t}`}(u),x=l||!p,{paddingLeft:w,paddingRight:E}=wv({inputSize:g,__next40pxDefaultSize:n}),_=(0,Uo.useMemo)((()=>({InputControlPrefixWrapper:{paddingLeft:w},InputControlSuffixWrapper:{paddingRight:E}})),[w,E]);return(0,r.createElement)(vv,{...b,...Dv(c),className:a,gap:2,isFocused:m,labelPosition:c,ref:t},(0,r.createElement)(Mv,{className:"components-input-control__label",hideLabelFromVision:l,labelPosition:c,htmlFor:y},p),(0,r.createElement)(yv,{__unstableInputWidth:o,className:"components-input-control__container",disabled:s,hideLabel:x,labelPosition:c},(0,r.createElement)(mi,{value:_},h&&(0,r.createElement)(Pv,{className:"components-input-control__prefix"},h),i,v&&(0,r.createElement)(Tv,{className:"components-input-control__suffix"},v)),(0,r.createElement)(Rv,{disabled:s,isBorderless:f,isFocused:m})))}const Ov=os(Av,"InputBase");const zv={toVector:(e,t)=>(void 0===e&&(e=t),Array.isArray(e)?e:[e,e]),add:(e,t)=>[e[0]+t[0],e[1]+t[1]],sub:(e,t)=>[e[0]-t[0],e[1]-t[1]],addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function Lv(e,t,n){return 0===t||Math.abs(t)===1/0?Math.pow(e,5*n):e*t*n/(t+n*e)}function Fv(e,t,n,r=.15){return 0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-Lv(t-e,n-t,r)+t:e>n?+Lv(e-n,n-t,r)+n:e}function Bv(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function jv(e,t,n){return(t=Bv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vv(Object(n),!0).forEach((function(t){jv(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const $v={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function Wv(e){return e?e[0].toUpperCase()+e.slice(1):""}const Uv=["enter","leave"];function Gv(e,t="",n=!1){const r=$v[e],o=r&&r[t]||t;return"on"+Wv(e)+Wv(o)+(function(e=!1,t){return e&&!Uv.includes(t)}(n,o)?"Capture":"")}const qv=["gotpointercapture","lostpointercapture"];function Yv(e){let t=e.substring(2).toLowerCase();const n=!!~t.indexOf("passive");n&&(t=t.replace("passive",""));const r=qv.includes(t)?"capturecapture":"capture",o=!!~t.indexOf(r);return o&&(t=t.replace("capture","")),{device:t,capture:o,passive:n}}function Kv(e){return"touches"in e}function Xv(e){return Kv(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function Zv(e){return Kv(e)?function(e){return"touchend"===e.type||"touchcancel"===e.type?e.changedTouches:e.targetTouches}(e)[0]:e}function Jv(e){return function(e){return Array.from(e.touches).filter((t=>{var n,r;return t.target===e.currentTarget||(null===(n=e.currentTarget)||void 0===n||null===(r=n.contains)||void 0===r?void 0:r.call(n,t.target))}))}(e).map((e=>e.identifier))}function Qv(e){const t=Zv(e);return Kv(e)?t.identifier:t.pointerId}function eb(e){const t=Zv(e);return[t.clientX,t.clientY]}function tb(e,...t){return"function"==typeof e?e(...t):e}function nb(){}function rb(...e){return 0===e.length?nb:1===e.length?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function ob(e,t){return Object.assign({},t,e||{})}class ib{constructor(e,t,n){this.ctrl=e,this.args=t,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:e,shared:t,ingKey:n,args:r}=this;t[n]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=r,e.axis=void 0,e.memo=void 0,e.elapsedTime=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){const t=this.state,n=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=e.target,t.currentTarget=e.currentTarget,t.lastOffset=n.from?tb(n.from,t):t.offset,t.offset=t.lastOffset),t.startTime=t.timeStamp=e.timeStamp}computeValues(e){const t=this.state;t._values=e,t.values=this.config.transform(e)}computeInitial(){const e=this.state;e._initial=e._values,e.initial=e.values}compute(e){const{state:t,config:n,shared:r}=this;t.args=this.args;let o=0;if(e&&(t.event=e,n.preventDefault&&e.cancelable&&t.event.preventDefault(),t.type=e.type,r.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,r.locked=!!document.pointerLockElement,Object.assign(r,function(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i})}return t}(e)),r.down=r.pressed=r.buttons%2==1||r.touches>0,o=e.timeStamp-t.timeStamp,t.timeStamp=e.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const e=t._delta.map(Math.abs);zv.addTo(t._distance,e)}this.axisIntent&&this.axisIntent(e);const[i,a]=t._movement,[s,l]=n.threshold,{_step:c,values:u}=t;if(n.hasCustomTransform?(!1===c[0]&&(c[0]=Math.abs(i)>=s&&u[0]),!1===c[1]&&(c[1]=Math.abs(a)>=l&&u[1])):(!1===c[0]&&(c[0]=Math.abs(i)>=s&&Math.sign(i)*s),!1===c[1]&&(c[1]=Math.abs(a)>=l&&Math.sign(a)*l)),t.intentional=!1!==c[0]||!1!==c[1],!t.intentional)return;const d=[0,0];if(n.hasCustomTransform){const[e,t]=u;d[0]=!1!==c[0]?e-c[0]:0,d[1]=!1!==c[1]?t-c[1]:0}else d[0]=!1!==c[0]?i-c[0]:0,d[1]=!1!==c[1]?a-c[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(d);const f=t.offset,m=t._active&&!t._blocked||t.active;m&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=r[this.ingKey]=t._active,e&&(t.first&&("bounds"in n&&(t._bounds=tb(n.bounds,t)),this.setup&&this.setup()),t.movement=d,this.computeOffset()));const[p,h]=t.offset,[[g,v],[b,y]]=t._bounds;t.overflow=[p<g?-1:p>v?1:0,h<b?-1:h>y?1:0],t._movementBound[0]=!!t.overflow[0]&&(!1===t._movementBound[0]?t._movement[0]:t._movementBound[0]),t._movementBound[1]=!!t.overflow[1]&&(!1===t._movementBound[1]?t._movement[1]:t._movementBound[1]);const x=t._active&&n.rubberband||[0,0];if(t.offset=function(e,[t,n],[r,o]){const[[i,a],[s,l]]=e;return[Fv(t,i,a,r),Fv(n,s,l,o)]}(t._bounds,t.offset,x),t.delta=zv.sub(t.offset,f),this.computeMovement(),m&&(!t.last||o>32)){t.delta=zv.sub(t.offset,f);const e=t.delta.map(Math.abs);zv.addTo(t.distance,e),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&o>0&&(t.velocity=[e[0]/o,e[1]/o])}}emit(){const e=this.state,t=this.shared,n=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!n.triggerAllEvents)return;const r=this.handler(Hv(Hv(Hv({},t),e),{},{[this.aliasKey]:e.values}));void 0!==r&&(e.memo=r)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}class ab extends ib{constructor(...e){super(...e),jv(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=zv.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=zv.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const t=this.state,n=this.config;if(!t.axis&&e){const r="object"==typeof n.axisThreshold?n.axisThreshold[Xv(e)]:n.axisThreshold;t.axis=function([e,t],n){const r=Math.abs(e),o=Math.abs(t);return r>o&&r>n?"x":o>r&&o>n?"y":void 0}(t._movement,r)}t._blocked=(n.lockDirection||!!n.axis)&&!t.axis||!!n.axis&&n.axis!==t.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":e[1]=0;break;case"y":e[0]=0}}}const sb=e=>e,lb={enabled:(e=!0)=>e,eventOptions:(e,t,n)=>Hv(Hv({},n.shared.eventOptions),e),preventDefault:(e=!1)=>e,triggerAllEvents:(e=!1)=>e,rubberband(e=0){switch(e){case!0:return[.15,.15];case!1:return[0,0];default:return zv.toVector(e)}},from:e=>"function"==typeof e?e:null!=e?zv.toVector(e):void 0,transform(e,t,n){const r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||sb},threshold:e=>zv.toVector(e,0)};const cb=Hv(Hv({},lb),{},{axis(e,t,{axis:n}){if(this.lockDirection="lock"===n,!this.lockDirection)return n},axisThreshold:(e=0)=>e,bounds(e={}){if("function"==typeof e)return t=>cb.bounds(e(t));if("current"in e)return()=>e.current;if("function"==typeof HTMLElement&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:o=1/0}=e;return[[t,n],[r,o]]}}),ub={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]};const db="undefined"!=typeof window&&window.document&&window.document.createElement;function fb(){return db&&"ontouchstart"in window||db&&window.navigator.maxTouchPoints>1}const mb={isBrowser:db,gesture:function(){try{return"constructor"in GestureEvent}catch(e){return!1}}(),touch:fb(),touchscreen:fb(),pointer:db&&"onpointerdown"in window,pointerLock:db&&"exitPointerLock"in window.document},pb={mouse:0,touch:0,pen:8},hb=Hv(Hv({},cb),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:o=!1}={}}){return this.pointerLock=r&&mb.pointerLock,mb.touch&&n?"touch":this.pointerLock?"mouse":mb.pointer&&!o?"pointer":mb.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay="number"==typeof n?n:n||void 0===n&&e?250:void 0,mb.touchscreen&&!1!==n)return e||(void 0!==n?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1,keys:o=!0}={}}){return this.pointerButtons=r,this.keys=o,!this.pointerLock&&"pointer"===this.device&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:r=3,axis:o}){const i=zv.toVector(e,n?r:o?1:0);return this.filterTaps=n,this.tapsThreshold=r,i},swipe({velocity:e=.5,distance:t=50,duration:n=250}={}){return{velocity:this.transform(zv.toVector(e)),distance:this.transform(zv.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return 180;case!1:return 0;default:return e}},axisThreshold:e=>e?Hv(Hv({},pb),e):pb,keyboardDisplacement:(e=10)=>e});Hv(Hv({},lb),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!mb.touch&&mb.gesture)return"gesture";if(mb.touch&&r)return"touch";if(mb.touchscreen){if(mb.pointer)return"pointer";if(mb.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const o=e=>{const t=ob(tb(n,e),{min:-1/0,max:1/0});return[t.min,t.max]},i=e=>{const t=ob(tb(r,e),{min:-1/0,max:1/0});return[t.min,t.max]};return"function"!=typeof n&&"function"!=typeof r?[o(),i()]:e=>[o(e),i(e)]},threshold(e,t,n){this.lockDirection="lock"===n.axis;return zv.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey:e=>void 0===e?"ctrlKey":e,pinchOnWheel:(e=!0)=>e});Hv(Hv({},cb),{},{mouseOnly:(e=!0)=>e});Hv(Hv({},cb),{},{mouseOnly:(e=!0)=>e});const gb=new Map,vb=new Map;const bb={key:"drag",engine:class extends ab{constructor(...e){super(...e),jv(this,"ingKey","dragging")}reset(){super.reset();const e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){const e=this.state;if(e._bounds instanceof HTMLElement){const t=e._bounds.getBoundingClientRect(),n=e.currentTarget.getBoundingClientRect(),r={left:t.left-n.left+e.offset[0],right:t.right-n.right+e.offset[0],top:t.top-n.top+e.offset[1],bottom:t.bottom-n.bottom+e.offset[1]};e._bounds=cb.bounds(r)}}cancel(){const e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout((()=>{this.compute(),this.emit()}),0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){const t=this.config,n=this.state;if(null!=e.buttons&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(e.buttons):-1!==t.pointerButtons&&t.pointerButtons!==e.buttons))return;const r=this.ctrl.setEventIds(e);t.pointerCapture&&e.target.setPointerCapture(e.pointerId),r&&r.size>1&&n._pointerActive||(this.start(e),this.setupPointer(e),n._pointerId=Qv(e),n._pointerActive=!0,this.computeValues(eb(e)),this.computeInitial(),t.preventScrollAxis&&"mouse"!==Xv(e)?(n._active=!1,this.setupScrollPrevention(e)):t.delay>0?(this.setupDelayTrigger(e),t.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(e),this.emit()}pointerMove(e){const t=this.state,n=this.config;if(!t._pointerActive)return;if(t.type===e.type&&e.timeStamp===t.timeStamp)return;const r=Qv(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;const o=eb(e);return document.pointerLockElement===e.target?t._delta=[e.movementX,e.movementY]:(t._delta=zv.sub(o,t._values),this.computeValues(o)),zv.addTo(t._movement,t._delta),this.compute(e),t._delayed&&t.intentional?(this.timeoutStore.remove("dragDelay"),t.active=!1,void this.startPointerDrag(e)):n.preventScrollAxis&&!t._preventScroll?t.axis?t.axis===n.preventScrollAxis||"xy"===n.preventScrollAxis?(t._active=!1,void this.clean()):(this.timeoutStore.remove("startPointerDrag"),void this.startPointerDrag(e)):void 0:void this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch(e){0}const t=this.state,n=this.config;if(!t._active||!t._pointerActive)return;const r=Qv(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[o,i]=t._distance;if(t.tap=o<=n.tapsThreshold&&i<=n.tapsThreshold,t.tap&&n.filterTaps)t._force=!0;else{const[e,r]=t.direction,[o,i]=t.velocity,[a,s]=t.movement,[l,c]=n.swipe.velocity,[u,d]=n.swipe.distance,f=n.swipe.duration;t.elapsedTime<f&&(Math.abs(o)>l&&Math.abs(a)>u&&(t.swipe[0]=e),Math.abs(i)>c&&Math.abs(s)>d&&(t.swipe[1]=r))}this.emit()}pointerClick(e){!this.state.tap&&e.detail>0&&(e.preventDefault(),e.stopPropagation())}setupPointer(e){const t=this.config,n=t.device;t.pointerLock&&e.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,function(e){"persist"in e&&"function"==typeof e.persist&&e.persist()}(e);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add("dragDelay",(()=>{this.state._step=[0,0],this.startPointerDrag(e)}),this.config.delay)}keyDown(e){const t=ub[e.key];if(t){const n=this.state,r=e.shiftKey?10:e.altKey?.1:1;this.start(e),n._delta=t(this.config.keyboardDisplacement,r),n._keyboardActive=!0,zv.addTo(n._movement,n._delta),this.compute(e),this.emit()}}keyUp(e){e.key in ub&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){const t=this.config.device;e(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(e(t,"change",this.pointerMove.bind(this)),e(t,"end",this.pointerUp.bind(this)),e(t,"cancel",this.pointerUp.bind(this)),e("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(e("key","down",this.keyDown.bind(this)),e("key","up",this.keyUp.bind(this))),this.config.filterTaps&&e("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}},resolver:hb};function yb(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const xb={target(e){if(e)return()=>"current"in e?e.current:e},enabled:(e=!0)=>e,window:(e=(mb.isBrowser?window:void 0))=>e,eventOptions:({passive:e=!0,capture:t=!1}={})=>({passive:e,capture:t}),transform:e=>e},wb=["target","eventOptions","window","enabled","transform"];function Eb(e={},t){const n={};for(const[r,o]of Object.entries(t))switch(typeof o){case"function":n[r]=o.call(n,e[r],r,e);break;case"object":n[r]=Eb(e[r],o);break;case"boolean":o&&(n[r]=e[r])}return n}class _b{constructor(e,t){jv(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=t}add(e,t,n,r,o){const i=this._listeners,a=function(e,t=""){const n=$v[e];return e+(n&&n[t]||t)}(t,n),s=Hv(Hv({},this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{}),o);e.addEventListener(a,r,s);const l=()=>{e.removeEventListener(a,r,s),i.delete(l)};return i.add(l),l}clean(){this._listeners.forEach((e=>e())),this._listeners.clear()}}class Sb{constructor(){jv(this,"_timeouts",new Map)}add(e,t,n=140,...r){this.remove(e),this._timeouts.set(e,window.setTimeout(t,n,...r))}remove(e){const t=this._timeouts.get(e);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach((e=>{window.clearTimeout(e)})),this._timeouts.clear()}}class Cb{constructor(e){jv(this,"gestures",new Set),jv(this,"_targetEventStore",new _b(this)),jv(this,"gestureEventStores",{}),jv(this,"gestureTimeoutStores",{}),jv(this,"handlers",{}),jv(this,"config",{}),jv(this,"pointerIds",new Set),jv(this,"touchIds",new Set),jv(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),function(e,t){t.drag&&kb(e,"drag");t.wheel&&kb(e,"wheel");t.scroll&&kb(e,"scroll");t.move&&kb(e,"move");t.pinch&&kb(e,"pinch");t.hover&&kb(e,"hover")}(this,e)}setEventIds(e){return Kv(e)?(this.touchIds=new Set(Jv(e)),this.touchIds):"pointerId"in e?("pointerup"===e.type||"pointercancel"===e.type?this.pointerIds.delete(e.pointerId):"pointerdown"===e.type&&this.pointerIds.add(e.pointerId),this.pointerIds):void 0}applyHandlers(e,t){this.handlers=e,this.nativeHandlers=t}applyConfig(e,t){this.config=function(e,t,n={}){const r=e,{target:o,eventOptions:i,window:a,enabled:s,transform:l}=r,c=yb(r,wb);if(n.shared=Eb({target:o,eventOptions:i,window:a,enabled:s,transform:l},xb),t){const e=vb.get(t);n[t]=Eb(Hv({shared:n.shared},c),e)}else for(const e in c){const t=vb.get(e);t&&(n[e]=Eb(Hv({shared:n.shared},c[e]),t))}return n}(e,t,this.config)}clean(){this._targetEventStore.clean();for(const e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){const t=this.config.shared,n={};let r;if(!t.target||(r=t.target(),r)){if(t.enabled){for(const t of this.gestures){const o=this.config[t],i=Pb(n,o.eventOptions,!!r);if(o.enabled){new(gb.get(t))(this,e,t).bind(i)}}const o=Pb(n,t.eventOptions,!!r);for(const t in this.nativeHandlers)o(t,"",(n=>this.nativeHandlers[t](Hv(Hv({},this.state.shared),{},{event:n,args:e}))),void 0,!0)}for(const e in n)n[e]=rb(...n[e]);if(!r)return n;for(const e in n){const{device:t,capture:o,passive:i}=Yv(e);this._targetEventStore.add(r,t,"",n[e],{capture:o,passive:i})}}}}function kb(e,t){e.gestures.add(t),e.gestureEventStores[t]=new _b(e,t),e.gestureTimeoutStores[t]=new Sb}const Pb=(e,t,n)=>(r,o,i,a={},s=!1)=>{var l,c;const u=null!==(l=a.capture)&&void 0!==l?l:t.capture,d=null!==(c=a.passive)&&void 0!==c?c:t.passive;let f=s?r:Gv(r,o,u);n&&d&&(f+="Passive"),e[f]=e[f]||[],e[f].push(i)};function Tb(e,t={},n,r){const o=s().useMemo((()=>new Cb(e)),[]);if(o.applyHandlers(e,r),o.applyConfig(t,n),s().useEffect(o.effect.bind(o)),s().useEffect((()=>o.clean.bind(o)),[]),void 0===t.target)return o.bind.bind(o)}function Ib(e,t){var n;return n=bb,gb.set(n.key,n.engine),vb.set(n.key,n.resolver),Tb({drag:e},t||{},"drag")}const Rb=e=>e,Mb={error:null,initialValue:"",isDirty:!1,isDragEnabled:!1,isDragging:!1,isPressEnterToChange:!1,value:""},Nb="CHANGE",Db="COMMIT",Ab="CONTROL",Ob="DRAG_END",zb="DRAG_START",Lb="DRAG",Fb="INVALIDATE",Bb="PRESS_DOWN",jb="PRESS_ENTER",Vb="PRESS_UP",Hb="RESET";function $b(e=Rb,t=Mb,n){const[r,o]=(0,Uo.useReducer)((i=e,(e,t)=>{const n={...e};switch(t.type){case Ab:return n.value=t.payload.value,n.isDirty=!1,n._event=void 0,n;case Vb:case Bb:n.isDirty=!1;break;case zb:n.isDragging=!0;break;case Ob:n.isDragging=!1;break;case Nb:n.error=null,n.value=t.payload.value,e.isPressEnterToChange&&(n.isDirty=!0);break;case Db:n.value=t.payload.value,n.isDirty=!1;break;case Hb:n.error=null,n.isDirty=!1,n.value=t.payload.value||e.initialValue;break;case Fb:n.error=t.payload.error}return n._event=t.payload.event,i(n,t)}),function(e=Mb){const{value:t}=e;return{...Mb,...e,initialValue:t}}(t));var i;const a=e=>(t,n)=>{o({type:e,payload:{value:t,event:n}})},s=e=>t=>{o({type:e,payload:{event:t}})},l=e=>t=>{o({type:e,payload:t})},c=a(Nb),u=a(Hb),d=a(Db),f=l(zb),m=l(Lb),p=l(Ob),h=s(Vb),g=s(Bb),v=s(jb),b=(0,Uo.useRef)(r),y=(0,Uo.useRef)({value:t.value,onChangeHandler:n});return(0,Uo.useLayoutEffect)((()=>{b.current=r,y.current={value:t.value,onChangeHandler:n}})),(0,Uo.useLayoutEffect)((()=>{var e;void 0===b.current._event||r.value===y.current.value||r.isDirty||y.current.onChangeHandler(null!==(e=r.value)&&void 0!==e?e:"",{event:b.current._event})}),[r.value,r.isDirty]),(0,Uo.useLayoutEffect)((()=>{var e;t.value===b.current.value||b.current.isDirty||o({type:Ab,payload:{value:null!==(e=t.value)&&void 0!==e?e:""}})}),[t.value]),{change:c,commit:d,dispatch:o,drag:m,dragEnd:p,dragStart:f,invalidate:(e,t)=>o({type:Fb,payload:{error:e,event:t}}),pressDown:g,pressEnter:v,pressUp:h,reset:u,state:r}}const Wb=()=>{};const Ub=(0,Uo.forwardRef)((function({disabled:e=!1,dragDirection:t="n",dragThreshold:n=10,id:o,isDragEnabled:i=!1,isFocused:a,isPressEnterToChange:s=!1,onBlur:l=Wb,onChange:c=Wb,onDrag:u=Wb,onDragEnd:d=Wb,onDragStart:f=Wb,onFocus:m=Wb,onKeyDown:p=Wb,onValidate:h=Wb,size:g="default",setIsFocused:v,stateReducer:b=(e=>e),value:y,type:x,...w},E){const{state:_,change:S,commit:C,drag:k,dragEnd:P,dragStart:T,invalidate:I,pressDown:R,pressEnter:M,pressUp:N,reset:D}=$b(b,{isDragEnabled:i,value:y,isPressEnterToChange:s},c),{value:A,isDragging:O,isDirty:z}=_,L=(0,Uo.useRef)(!1),F=function(e,t){const n=function(e){let t="ns-resize";switch(e){case"n":case"s":t="ns-resize";break;case"e":case"w":t="ew-resize"}return t}(t);return(0,Uo.useEffect)((()=>{document.documentElement.style.cursor=e?n:null}),[e,n]),n}(O,t),B=e=>{const t=e.currentTarget.value;try{h(t),C(t,e)}catch(t){I(t,e)}},j=Ib((e=>{const{distance:t,dragging:n,event:r,target:o}=e;if(e.event={...e.event,target:o},t){if(r.stopPropagation(),!n)return d(e),void P(e);u(e),k(e),O||(f(e),T(e))}}),{axis:"e"===t||"w"===t?"x":"y",threshold:n,enabled:i,pointer:{capture:!1}}),V=i?j():{};let H;return"number"===x&&(H=e=>{w.onMouseDown?.(e),e.currentTarget!==e.currentTarget.ownerDocument.activeElement&&e.currentTarget.focus()}),(0,r.createElement)(Ev,{...w,...V,className:"components-input-control__input",disabled:e,dragCursor:F,isDragging:O,id:o,onBlur:e=>{l(e),v?.(!1),!z&&e.target.validity.valid||(L.current=!0,B(e))},onChange:e=>{const t=e.target.value;S(t,e)},onFocus:e=>{m(e),v?.(!0)},onKeyDown:e=>{const{key:t}=e;switch(p(e),t){case"ArrowUp":N(e);break;case"ArrowDown":R(e);break;case"Enter":M(e),s&&(e.preventDefault(),B(e));break;case"Escape":s&&z&&(e.preventDefault(),D(y,e))}},onMouseDown:H,ref:E,inputSize:g,value:null!=A?A:"",type:x})})),Gb=Ub,qb={"default.fontFamily":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif","default.fontSize":"13px","helpText.fontSize":"12px",mobileTextMinFontSize:"16px"};function Yb(e){var t;return null!==(t=qb[e])&&void 0!==t?t:""}const Kb={name:"kv6lnz",styles:"box-sizing:border-box;*,*::before,*::after{box-sizing:inherit;}"};const Xb=bs("div",{target:"ej5x27r4"})("font-family:",Yb("default.fontFamily"),";font-size:",Yb("default.fontSize"),";",Kb,";"),Zb=bs("div",{target:"ej5x27r3"})((({__nextHasNoMarginBottom:e=!1})=>!e&&Ps("margin-bottom:",Ah(2),";",""))," .components-panel__row &{margin-bottom:inherit;}"),Jb=Ps(pv,";display:inline-block;margin-bottom:",Ah(2),";padding:0;",""),Qb=bs("label",{target:"ej5x27r2"})(Jb,";");var ey={name:"11yad0w",styles:"margin-bottom:revert"};const ty=bs("p",{target:"ej5x27r1"})("margin-top:",Ah(2),";margin-bottom:0;font-size:",Yb("helpText.fontSize"),";font-style:normal;color:",Ds.gray[700],";",(({__nextHasNoMarginBottom:e=!1})=>!e&&ey),";"),ny=bs("span",{target:"ej5x27r0"})(Jb,";"),ry=({className:e,children:t,...n})=>(0,r.createElement)(ny,{...n,className:c()("components-base-control__label",e)},t),oy=Object.assign(is((e=>{const{__nextHasNoMarginBottom:t=!1,id:n,label:o,hideLabelFromVision:i=!1,help:a,className:s,children:l}=rs(e,"BaseControl");return(0,r.createElement)(Xb,{className:s},(0,r.createElement)(Zb,{className:"components-base-control__field",__nextHasNoMarginBottom:t},o&&n&&(i?(0,r.createElement)(ws,{as:"label",htmlFor:n},o):(0,r.createElement)(Qb,{className:"components-base-control__label",htmlFor:n},o)),o&&!n&&(i?(0,r.createElement)(ws,{as:"label"},o):(0,r.createElement)(ry,null,o)),l),!!a&&(0,r.createElement)(ty,{id:n?n+"__help":void 0,className:"components-base-control__help",__nextHasNoMarginBottom:t},a))}),"BaseControl"),{VisualLabel:ry}),iy=oy,ay=()=>{};const sy=(0,Uo.forwardRef)((function(e,t){const{__next40pxDefaultSize:n,__unstableStateReducer:o=(e=>e),__unstableInputWidth:i,className:a,disabled:s=!1,help:l,hideLabelFromVision:u=!1,id:f,isPressEnterToChange:m=!1,label:p,labelPosition:h="top",onChange:g=ay,onValidate:v=ay,onKeyDown:b=ay,prefix:y,size:x="default",style:w,suffix:E,value:_,...S}=Nv(e),[C,k]=(0,Uo.useState)(!1),P=function(e){const t=(0,d.useInstanceId)(sy);return e||`inspector-input-control-${t}`}(f),T=c()("components-input-control",a),I=function(e){const t=(0,Uo.useRef)(e.value),[n,r]=(0,Uo.useState)({}),o=void 0!==n.value?n.value:e.value;return(0,Uo.useLayoutEffect)((()=>{const{current:o}=t;t.current=e.value,void 0===n.value||n.isStale?n.isStale&&e.value!==o&&r({}):r({...n,isStale:!0})}),[e.value,n]),{value:o,onBlur:t=>{r({}),e.onBlur?.(t)},onChange:(t,n)=>{r((e=>Object.assign(e,{value:t,isStale:!1}))),e.onChange(t,n)}}}({value:_,onBlur:S.onBlur,onChange:g}),R=l?{["string"==typeof l?"aria-describedby":"aria-details"]:`${P}__help`}:{};return(0,r.createElement)(iy,{className:T,help:l,id:P,__nextHasNoMarginBottom:!0},(0,r.createElement)(Ov,{__next40pxDefaultSize:n,__unstableInputWidth:i,disabled:s,gap:3,hideLabelFromVision:u,id:P,isFocused:C,justify:"left",label:p,labelPosition:h,prefix:y,size:x,style:w,suffix:E},(0,r.createElement)(Gb,{...S,...R,__next40pxDefaultSize:n,className:"components-input-control__input",disabled:s,id:P,isFocused:C,isPressEnterToChange:m,onKeyDown:b,onValidate:v,paddingInlineStart:y?Ah(2):void 0,paddingInlineEnd:E?Ah(2):void 0,ref:t,setIsFocused:k,size:x,stateReducer:o,...I})))})),ly=sy;const cy=function({icon:e,className:t,size:n=20,style:o={},...i}){const a=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" "),s={...20!=n?{fontSize:`${n}px`,width:`${n}px`,height:`${n}px`}:{},...o};return(0,r.createElement)("span",{className:a,style:s,...i})};const uy=function({icon:e=null,size:t=("string"==typeof e?20:24),...r}){if("string"==typeof e)return(0,Uo.createElement)(cy,{icon:e,size:t,...r});if((0,Uo.isValidElement)(e)&&cy===e.type)return(0,Uo.cloneElement)(e,{...r});if("function"==typeof e)return(0,Uo.createElement)(e,{size:t,...r});if(e&&("svg"===e.type||e.type===n.SVG)){const o={...e.props,width:t,height:t,...r};return(0,Uo.createElement)(n.SVG,{...o})}return(0,Uo.isValidElement)(e)?(0,Uo.cloneElement)(e,{size:t,...r}):e},dy=["onMouseDown","onClick"];const fy=(0,Uo.forwardRef)((function(e,t){const{__next40pxDefaultSize:n,isBusy:o,isDestructive:i,className:a,disabled:s,icon:l,iconPosition:u="left",iconSize:f,showTooltip:m,tooltipPosition:p,shortcut:h,label:g,children:v,size:b="default",text:y,variant:x,__experimentalIsFocusable:w,describedBy:E,..._}=function({isDefault:e,isPrimary:t,isSecondary:n,isTertiary:r,isLink:o,isPressed:i,isSmall:a,size:s,variant:l,...c}){let u=s,d=l;const f={"aria-pressed":i};var m,p,h,g,v,b;return a&&(null!==(m=u)&&void 0!==m||(u="small")),t&&(null!==(p=d)&&void 0!==p||(d="primary")),r&&(null!==(h=d)&&void 0!==h||(d="tertiary")),n&&(null!==(g=d)&&void 0!==g||(d="secondary")),e&&(qo()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"',version:"6.2"}),null!==(v=d)&&void 0!==v||(d="secondary")),o&&(null!==(b=d)&&void 0!==b||(d="link")),{...f,...c,size:u,variant:d}}(e),{href:S,target:C,"aria-checked":k,"aria-pressed":P,"aria-selected":T,...I}="href"in _?_:{href:void 0,target:void 0,..._},R=(0,d.useInstanceId)(fy,"components-button__description"),M="string"==typeof v&&!!v||Array.isArray(v)&&v?.[0]&&null!==v[0]&&"components-tooltip"!==v?.[0]?.props?.className,N=c()("components-button",a,{"is-next-40px-default-size":n,"is-secondary":"secondary"===x,"is-primary":"primary"===x,"is-small":"small"===b,"is-compact":"compact"===b,"is-tertiary":"tertiary"===x,"is-pressed":[!0,"true","mixed"].includes(P),"is-pressed-mixed":"mixed"===P,"is-busy":o,"is-link":"link"===x,"is-destructive":i,"has-text":!!l&&(M||y),"has-icon":!!l}),D=s&&!w,A=void 0===S||D?"button":"a",O="button"===A?{type:"button",disabled:D,"aria-checked":k,"aria-pressed":P,"aria-selected":T}:{},z="a"===A?{href:S,target:C}:{};if(s&&w){O["aria-disabled"]=!0,z["aria-disabled"]=!0;for(const e of dy)I[e]=e=>{e&&(e.stopPropagation(),e.preventDefault())}}const L=!D&&(m&&!!g||!!h||!!g&&!v?.length&&!1!==m),F=E?R:void 0,B=I["aria-describedby"]||F,j={className:N,"aria-label":I["aria-label"]||g,"aria-describedby":B,ref:t},V=(0,r.createElement)(r.Fragment,null,l&&"left"===u&&(0,r.createElement)(uy,{icon:l,size:f}),y&&(0,r.createElement)(r.Fragment,null,y),l&&"right"===u&&(0,r.createElement)(uy,{icon:l,size:f}),v),H="a"===A?(0,r.createElement)("a",{...z,...I,...j},V):(0,r.createElement)("button",{...O,...I,...j},V),$=L?{text:v?.length&&E?E:g,shortcut:h,placement:p&&Xo(p)}:{};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(ri,{...$},H),E&&(0,r.createElement)(ws,null,(0,r.createElement)("span",{id:F},E)))})),my=fy;var py={name:"euqsgg",styles:"input[type='number']::-webkit-outer-spin-button,input[type='number']::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}input[type='number']{-moz-appearance:textfield;}"};const hy=({hideHTMLArrows:e})=>e?py:"",gy=bs(ly,{target:"ep09it41"})(hy,";"),vy=bs(my,{target:"ep09it40"})("&&&&&{color:",Ds.theme.accent,";}"),by={smallSpinButtons:Ps("width:",Ah(5),";min-width:",Ah(5),";height:",Ah(5),";","")};function yy(e){const t=Number(e);return isNaN(t)?0:t}function xy(...e){return e.reduce(((e,t)=>e+yy(t)),0)}function wy(e,t,n){const r=yy(e);return Math.max(t,Math.min(r,n))}function Ey(e=0,t=1/0,n=1/0,r=1){const o=yy(e),i=yy(r),a=function(e){const t=(e+"").split(".");return void 0!==t[1]?t[1].length:0}(r),s=wy(Math.round(o/i)*i,t,n);return a?yy(s.toFixed(a)):s}const _y={bottom:{align:"flex-end",justify:"center"},bottomLeft:{align:"flex-end",justify:"flex-start"},bottomRight:{align:"flex-end",justify:"flex-end"},center:{align:"center",justify:"center"},edge:{align:"center",justify:"space-between"},left:{align:"center",justify:"flex-start"},right:{align:"center",justify:"flex-end"},stretch:{align:"stretch"},top:{align:"flex-start",justify:"center"},topLeft:{align:"flex-start",justify:"flex-start"},topRight:{align:"flex-start",justify:"flex-end"}},Sy={bottom:{justify:"flex-end",align:"center"},bottomLeft:{justify:"flex-end",align:"flex-start"},bottomRight:{justify:"flex-end",align:"flex-end"},center:{justify:"center",align:"center"},edge:{justify:"space-between",align:"center"},left:{justify:"center",align:"flex-start"},right:{justify:"center",align:"flex-end"},stretch:{align:"stretch"},top:{justify:"flex-start",align:"center"},topLeft:{justify:"flex-start",align:"flex-start"},topRight:{justify:"flex-start",align:"flex-end"}};function Cy(e){return"string"==typeof e?[e]:Uo.Children.toArray(e).filter((e=>(0,Uo.isValidElement)(e)))}function ky(e){const{alignment:t="edge",children:n,direction:o,spacing:i=2,...a}=rs(e,"HStack"),s=function(e,t="row"){if(!ag(e))return{};const n="column"===t?Sy:_y;return e in n?n[e]:{align:e}}(t,o),l=Cy(n).map(((e,t)=>{if(ls(e,["Spacer"])){const n=e,o=n.key||`hstack-${t}`;return(0,r.createElement)(og,{isBlock:!0,key:o,...n.props})}return e}));return jh({children:l,direction:o,justify:"center",...s,...a,gap:i})}const Py=os((function(e,t){const n=ky(e);return(0,r.createElement)(xs,{...n,ref:t})}),"HStack"),Ty=()=>{};const Iy=(0,Uo.forwardRef)((function(e,t){const{__unstableStateReducer:n,className:o,dragDirection:i="n",hideHTMLArrows:a=!1,spinControls:s=(a?"none":"native"),isDragEnabled:l=!0,isShiftStepEnabled:f=!0,label:m,max:p=1/0,min:h=-1/0,required:g=!1,shiftStep:v=10,step:b=1,spinFactor:y=1,type:x="number",value:w,size:E="default",suffix:_,onChange:S=Ty,...C}=Nv(e);a&&qo()("wp.components.NumberControl hideHTMLArrows prop ",{alternative:'spinControls="none"',since:"6.2",version:"6.3"});const k=(0,Uo.useRef)(),P=(0,d.useMergeRefs)([k,t]),T="any"===b,I=T?1:sg(b),R=sg(y)*I,M=Ey(0,h,p,I),N=(e,t)=>T?""+Math.min(p,Math.max(h,sg(e))):""+Ey(e,h,p,null!=t?t:I),D="number"===x?"off":void 0,A=c()("components-number-control",o),O=ns()("small"===E&&by.smallSpinButtons),z=(e,t,n)=>{n?.preventDefault();const r=n?.shiftKey&&f,o=r?sg(v)*R:R;let i=function(e){const t=""===e;return!ag(e)||t}(e)?M:e;return"up"===t?i=xy(i,o):"down"===t&&(i=function(...e){return e.reduce(((e,t,n)=>{const r=yy(t);return 0===n?r:e-r}),0)}(i,o)),N(i,r?o:void 0)},L=e=>t=>S(String(z(w,e,t)),{event:{...t,target:k.current}});return(0,r.createElement)(gy,{autoComplete:D,inputMode:"numeric",...C,className:A,dragDirection:i,hideHTMLArrows:"native"!==s,isDragEnabled:l,label:m,max:p,min:h,ref:P,required:g,step:b,type:x,value:w,__unstableStateReducer:(e,t)=>{var r;const o=((e,t)=>{const n={...e},{type:r,payload:o}=t,a=o.event,s=n.value;if(r!==Vb&&r!==Bb||(n.value=z(s,r===Vb?"up":"down",a)),r===Lb&&l){const[e,t]=o.delta,r=o.shiftKey&&f,a=r?sg(v)*R:R;let l,c;switch(i){case"n":c=t,l=-1;break;case"e":c=e,l=(0,u.isRTL)()?-1:1;break;case"s":c=t,l=1;break;case"w":c=e,l=(0,u.isRTL)()?1:-1}if(0!==c){c=Math.ceil(Math.abs(c))*Math.sign(c);const e=c*a*l;n.value=N(xy(s,e),r?a:void 0)}}if(r===jb||r===Db){const e=!1===g&&""===s;n.value=e?s:N(s)}return n})(e,t);return null!==(r=n?.(o,t))&&void 0!==r?r:o},size:E,suffix:"custom"===s?(0,r.createElement)(r.Fragment,null,_,(0,r.createElement)(tg,{marginBottom:0,marginRight:2},(0,r.createElement)(Py,{spacing:1},(0,r.createElement)(vy,{className:O,icon:ng,size:"small",label:(0,u.__)("Increment"),onClick:L("up")}),(0,r.createElement)(vy,{className:O,icon:rg,size:"small",label:(0,u.__)("Decrement"),onClick:L("down")})))):_,onChange:S})})),Ry=Iy;const My=bs("div",{target:"eln3bjz3"})("border-radius:50%;border:",Xg.borderWidth," solid ",Ds.ui.border,";box-sizing:border-box;cursor:grab;height:",32,"px;overflow:hidden;width:",32,"px;:active{cursor:grabbing;}"),Ny=bs("div",{target:"eln3bjz2"})({name:"1r307gh",styles:"box-sizing:border-box;position:relative;width:100%;height:100%;:focus-visible{outline:none;}"}),Dy=bs("div",{target:"eln3bjz1"})("background:",Ds.theme.accent,";border-radius:50%;box-sizing:border-box;display:block;left:50%;top:4px;transform:translateX( -50% );position:absolute;width:",6,"px;height:",6,"px;"),Ay=bs(mv,{target:"eln3bjz0"})("color:",Ds.theme.accent,";margin-right:",Ah(3),";");const Oy=function({value:e,onChange:t,...n}){const o=(0,Uo.useRef)(null),i=(0,Uo.useRef)(),a=(0,Uo.useRef)(),s=e=>{if(void 0!==e&&(e.preventDefault(),e.target?.focus(),void 0!==i.current&&void 0!==t)){const{x:n,y:r}=i.current;t(function(e,t,n,r){const o=r-t,i=n-e,a=Math.atan2(o,i),s=Math.round(a*(180/Math.PI))+90;if(s<0)return 360+s;return s}(n,r,e.clientX,e.clientY))}},{startDrag:l,isDragging:c}=(0,d.__experimentalUseDragging)({onDragStart:e=>{(()=>{if(null===o.current)return;const e=o.current.getBoundingClientRect();i.current={x:e.x+e.width/2,y:e.y+e.height/2}})(),s(e)},onDragMove:s,onDragEnd:s});return(0,Uo.useEffect)((()=>{c?(void 0===a.current&&(a.current=document.body.style.cursor),document.body.style.cursor="grabbing"):(document.body.style.cursor=a.current||"",a.current=void 0)}),[c]),(0,r.createElement)(My,{ref:o,onMouseDown:l,className:"components-angle-picker-control__angle-circle",...n},(0,r.createElement)(Ny,{style:e?{transform:`rotate(${e}deg)`}:void 0,className:"components-angle-picker-control__angle-circle-indicator-wrapper",tabIndex:-1},(0,r.createElement)(Dy,{className:"components-angle-picker-control__angle-circle-indicator"})))};const zy=(0,Uo.forwardRef)((function(e,t){const{className:n,label:o=(0,u.__)("Angle"),onChange:i,value:a,...s}=e,l=c()("components-angle-picker-control",n),d=(0,r.createElement)(Ay,null,"°"),[f,m]=(0,u.isRTL)()?[d,null]:[null,d];return(0,r.createElement)($h,{...s,ref:t,className:l,gap:2},(0,r.createElement)(Uh,null,(0,r.createElement)(Ry,{label:o,className:"components-angle-picker-control__input-field",max:360,min:0,onChange:e=>{if(void 0===i)return;const t=void 0!==e&&""!==e?parseInt(e,10):0;i(t)},size:"__unstable-large",step:"1",value:a,spinControls:"none",prefix:f,suffix:m})),(0,r.createElement)(tg,{marginBottom:"1",marginTop:"auto"},(0,r.createElement)(Oy,{"aria-hidden":"true",value:a,onChange:i})))}));var Ly=o(9681),Fy=o.n(Ly);const By=window.wp.richText,jy=window.wp.a11y,Vy=window.wp.keycodes,Hy=new RegExp(`[${["-","~","­","֊","־","᐀","᠆","‐","‑","‒","–","—","―","⁓","⁻","₋","−","⸗","⸺","⸻","〜","〰","゠","︱","︲","﹘","﹣","-"].join("")}]`,"g"),$y=e=>Fy()(e).toLocaleLowerCase().replace(Hy,"-");function Wy(e){var t;let n=null!==(t=e?.toString?.())&&void 0!==t?t:"";return n=n.replace(/['\u2019]/,""),_i(n,{splitRegexp:[/(?!(?:1ST|2ND|3RD|[4-9]TH)(?![a-z]))([a-z0-9])([A-Z])/g,/(?!(?:1st|2nd|3rd|[4-9]th)(?![a-z]))([0-9])([a-z])/g,/([A-Za-z])([0-9])/g,/([A-Z])([A-Z][a-z])/g]})}function Uy(e){return e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}function Gy(e){return t=>{const[n,r]=(0,Uo.useState)([]);return(0,Uo.useLayoutEffect)((()=>{const{options:n,isDebounced:o}=e,i=(0,d.debounce)((()=>{const o=Promise.resolve("function"==typeof n?n(t):n).then((n=>{if(o.canceled)return;const i=n.map(((t,n)=>({key:`${e.name}-${n}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[],isDisabled:!!e.isOptionDisabled&&e.isOptionDisabled(t)}))),a=new RegExp("(?:\\b|\\s|^)"+Uy(t),"i");r(function(e,t=[],n=10){const r=[];for(let o=0;o<t.length;o++){const i=t[o];let{keywords:a=[]}=i;if("string"==typeof i.label&&(a=[...a,i.label]),a.some((t=>e.test(Fy()(t))))&&(r.push(i),r.length===n))break}return r}(a,i))}));return o}),o?250:0),a=i();return()=>{i.cancel(),a&&(a.canceled=!0)}}),[t]),[n]}}const qy=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Po({element:n.current,padding:r}).fn(t):{}:n?Po({element:n,padding:r}).fn(t):{};var o}});var Yy="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function Ky(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Ky(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Ky(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Xy(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zy(e,t){const n=Xy(e);return Math.round(t*n)/n}function Jy(e){const t=r.useRef(e);return Yy((()=>{t.current=e})),t}function Qy(){!lh.current&&ch();const[e]=(0,r.useState)(sh.current);return e}const ex=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));let tx=0;function nx(e){const t=document.scrollingElement||document.body;e&&(tx=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=tx)}let rx=0;const ox=function(){return(0,Uo.useEffect)((()=>(0===rx&&nx(!0),++rx,()=>{1===rx&&nx(!1),--rx})),[]),null},ix=Symbol(),ax=Symbol(),sx=Symbol();let lx=(e,t)=>new Proxy(e,t);const cx=Object.getPrototypeOf,ux=new WeakMap,dx=e=>e&&(ux.has(e)?ux.get(e):cx(e)===Object.prototype||cx(e)===Array.prototype),fx=e=>"object"==typeof e&&null!==e,mx=new WeakMap,px=e=>e[sx]||e,hx=(e,t,n)=>{if(!dx(e))return e;const r=px(e),o=(e=>Object.isFrozen(e)||Object.values(Object.getOwnPropertyDescriptors(e)).some((e=>!e.writable)))(r);let i=n&&n.get(r);return i&&i[1].f===o||(i=((e,t)=>{const n={f:t};let r=!1;const o=(t,o)=>{if(!r){let r=n.a.get(e);r||(r=new Set,n.a.set(e,r)),o&&r.has(ix)||r.add(t)}},i={get:(t,r)=>r===sx?e:(o(r),hx(t[r],n.a,n.c)),has:(t,i)=>i===ax?(r=!0,n.a.delete(e),!0):(o(i),i in t),getOwnPropertyDescriptor:(e,t)=>(o(t,!0),Object.getOwnPropertyDescriptor(e,t)),ownKeys:e=>(o(ix),Reflect.ownKeys(e))};return t&&(i.set=i.deleteProperty=()=>!1),[i,n]})(r,o),i[1].p=lx(o?(e=>{let t=mx.get(e);if(!t){if(Array.isArray(e))t=Array.from(e);else{const n=Object.getOwnPropertyDescriptors(e);Object.values(n).forEach((e=>{e.configurable=!0})),t=Object.create(cx(e),n)}mx.set(e,t)}return t})(r):r,i[0]),n&&n.set(r,i)),i[1].a=t,i[1].c=n,i[1].p},gx=(e,t)=>{const n=Reflect.ownKeys(e),r=Reflect.ownKeys(t);return n.length!==r.length||n.some(((e,t)=>e!==r[t]))},vx=(e,t,n,r)=>{if(Object.is(e,t))return!1;if(!fx(e)||!fx(t))return!0;const o=n.get(px(e));if(!o)return!0;if(r){const n=r.get(e);if(n&&n.n===t)return n.g;r.set(e,{n:t,g:!1})}let i=null;for(const a of o){const o=a===ix?gx(e,t):vx(e[a],t[a],n,r);if(!0!==o&&!1!==o||(i=o),i)break}return null===i&&(i=!0),r&&r.set(e,{n:t,g:i}),i},bx=(e,t=!0)=>{ux.set(e,t)},yx=e=>"object"==typeof e&&null!==e,xx=new WeakSet,wx=Symbol("VERSION"),Ex=Symbol("LISTENERS"),_x=Symbol("SNAPSHOT"),Sx=(e=Object.is,t=((e,t)=>new Proxy(e,t)),n=(e=>yx(e)&&!xx.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)),r=Symbol("PROMISE_RESULT"),o=Symbol("PROMISE_ERROR"),i=new WeakMap,a=((e,t,n)=>{const a=i.get(n);if((null==a?void 0:a[0])===e)return a[1];const s=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return bx(s,!0),i.set(n,[e,s]),Reflect.ownKeys(t).forEach((e=>{const i=Reflect.get(t,e,n);if(xx.has(i))bx(i,!1),s[e]=i;else if(i instanceof Promise)if(r in i)s[e]=i[r];else{const t=i[o]||i;Object.defineProperty(s,e,{get(){if(r in i)return i[r];throw t}})}else(null==i?void 0:i[Ex])?s[e]=i[_x]:s[e]=i})),Object.freeze(s)}),s=new WeakMap,l=[1],c=(i=>{if(!yx(i))throw new Error("object required");const c=s.get(i);if(c)return c;let u=l[0];const d=new Set,f=(e,t=++l[0])=>{u!==t&&(u=t,d.forEach((n=>n(e,t))))},m=new Map,p=e=>{let t=m.get(e);return t||(t=(t,n)=>{const r=[...t];r[1]=[e,...r[1]],f(r,n)},m.set(e,t)),t},h=e=>{const t=m.get(e);return m.delete(e),t},g=Array.isArray(i)?[]:Object.create(Object.getPrototypeOf(i)),v={get:(e,t,n)=>t===wx?u:t===Ex?d:t===_x?a(u,e,n):Reflect.get(e,t,n),deleteProperty(e,t){const n=Reflect.get(e,t),r=null==n?void 0:n[Ex];r&&r.delete(h(t));const o=Reflect.deleteProperty(e,t);return o&&f(["delete",[t],n]),o},set(t,i,a,s){var l;const c=Reflect.has(t,i),u=Reflect.get(t,i,s);if(c&&e(u,a))return!0;const d=null==u?void 0:u[Ex];let m;return d&&d.delete(h(i)),yx(a)&&(a=(e=>dx(e)&&e[sx]||null)(a)||a),(null==(l=Object.getOwnPropertyDescriptor(t,i))?void 0:l.set)?m=a:a instanceof Promise?m=a.then((e=>(m[r]=e,f(["resolve",[i],e]),e))).catch((e=>{m[o]=e,f(["reject",[i],e])})):(null==a?void 0:a[Ex])?(m=a,m[Ex].add(p(i))):n(a)?(m=kx(a),m[Ex].add(p(i))):m=a,Reflect.set(t,i,m,s),f(["set",[i],a,u]),!0}},b=t(g,v);return s.set(i,b),Reflect.ownKeys(i).forEach((e=>{const t=Object.getOwnPropertyDescriptor(i,e);t.get||t.set?Object.defineProperty(g,e,t):b[e]=i[e]})),b}))=>[c,xx,wx,Ex,_x,e,t,n,r,o,i,a,s,l],[Cx]=Sx();function kx(e={}){return Cx(e)}function Px(e,t,n){let r;(null==e?void 0:e[Ex])||console.warn("Please use proxy object");const o=[],i=e=>{o.push(e),n?t(o.splice(0)):r||(r=Promise.resolve().then((()=>{r=void 0,t(o.splice(0))})))};return e[Ex].add(i),()=>{e[Ex].delete(i)}}function Tx(e){return(null==e?void 0:e[_x])||console.warn("Please use proxy object"),e[_x]}function Ix(e){return xx.add(e),e}const{useSyncExternalStore:Rx}=Ft,Mx=(e,t)=>{const n=(0,r.useRef)();(0,r.useEffect)((()=>{n.current=((e,t)=>{const n=[],r=new WeakSet,o=(e,i)=>{if(r.has(e))return;fx(e)&&r.add(e);const a=fx(e)&&t.get(px(e));a?a.forEach((t=>{o(e[t],i?[...i,t]:[t])})):i&&n.push(i)};return o(e),n})(e,t)})),(0,r.useDebugValue)(n.current)};function Nx(e,t){const n=null==t?void 0:t.sync,o=(0,r.useRef)(),i=(0,r.useRef)();let a=!0;const s=Rx((0,r.useCallback)((t=>{const r=Px(e,t,n);return t(),r}),[e,n]),(()=>{const t=Tx(e);try{if(!a&&o.current&&i.current&&!vx(o.current,t,i.current,new WeakMap))return o.current}catch(e){}return t}),(()=>Tx(e)));a=!1;const l=new WeakMap;(0,r.useEffect)((()=>{o.current=s,i.current=l})),Mx(s,l);const c=(0,r.useMemo)((()=>new WeakMap),[]);return hx(s,l,c)}Symbol();function Dx(e){const t=kx({data:Array.from(e||[]),has(e){return this.data.some((t=>t[0]===e))},set(e,t){const n=this.data.find((t=>t[0]===e));return n?n[1]=t:this.data.push([e,t]),this},get(e){var t;return null==(t=this.data.find((t=>t[0]===e)))?void 0:t[1]},delete(e){const t=this.data.findIndex((t=>t[0]===e));return-1!==t&&(this.data.splice(t,1),!0)},clear(){this.data.splice(0)},get size(){return this.data.length},toJSON:()=>({}),forEach(e){this.data.forEach((t=>{e(t[1],t[0],this)}))},keys(){return this.data.map((e=>e[0])).values()},values(){return this.data.map((e=>e[1])).values()},entries(){return new Map(this.data).entries()},get[Symbol.toStringTag](){return"Map"},[Symbol.iterator](){return this.entries()}});return Object.defineProperties(t,{data:{enumerable:!1},size:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(t),t}const Ax={slots:Dx(),fills:Dx(),registerSlot:()=>{},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},isDefault:!0},Ox=(0,Uo.createContext)(Ax);function zx(e){const t=(0,Uo.useContext)(Ox);return{...Nx(t.slots,{sync:!0}).get(e),...(0,Uo.useMemo)((()=>({updateSlot:n=>t.updateSlot(e,n),unregisterSlot:n=>t.unregisterSlot(e,n),registerFill:n=>t.registerFill(e,n),unregisterFill:n=>t.unregisterFill(e,n)})),[e,t])}}const Lx={registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>[],subscribe:()=>()=>{}},Fx=(0,Uo.createContext)(Lx),Bx=e=>{const{getSlot:t,subscribe:n}=(0,Uo.useContext)(Fx);return(0,Uo.useSyncExternalStore)(n,(()=>t(e)),(()=>t(e)))};function jx({name:e,children:t}){const{registerFill:n,unregisterFill:r}=(0,Uo.useContext)(Fx),o=Bx(e),i=(0,Uo.useRef)({name:e,children:t});return(0,Uo.useLayoutEffect)((()=>{const t=i.current;return n(e,t),()=>r(e,t)}),[]),(0,Uo.useLayoutEffect)((()=>{i.current.children=t,o&&o.forceUpdate()}),[t]),(0,Uo.useLayoutEffect)((()=>{e!==i.current.name&&(r(i.current.name,i.current),i.current.name=e,n(e,i.current))}),[e]),null}function Vx(e){return"function"==typeof e}class Hx extends Uo.Component{constructor(e){super(e),this.isUnmounted=!1}componentDidMount(){const{registerSlot:e}=this.props;this.isUnmounted=!1,e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:n,registerSlot:r}=this.props;e.name!==t&&(n(e.name,this),r(t,this))}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){var e;const{children:t,name:n,fillProps:o={},getFills:i}=this.props,a=(null!==(e=i(n,this))&&void 0!==e?e:[]).map((e=>{const t=Vx(e.children)?e.children(o):e.children;return Uo.Children.map(t,((e,t)=>{if(!e||"string"==typeof e)return e;let n=t;return"object"==typeof e&&"key"in e&&e?.key&&(n=e.key),(0,Uo.cloneElement)(e,{key:n})}))})).filter((e=>!(0,Uo.isEmptyElement)(e)));return(0,r.createElement)(r.Fragment,null,Vx(t)?t(a):a)}}const $x=e=>(0,r.createElement)(Fx.Consumer,null,(({registerSlot:t,unregisterSlot:n,getFills:o})=>(0,r.createElement)(Hx,{...e,registerSlot:t,unregisterSlot:n,getFills:o}))),Wx={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Ux;const Gx=new Uint8Array(16);function qx(){if(!Ux&&(Ux="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ux))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ux(Gx)}const Yx=[];for(let e=0;e<256;++e)Yx.push((e+256).toString(16).slice(1));function Kx(e,t=0){return Yx[e[t+0]]+Yx[e[t+1]]+Yx[e[t+2]]+Yx[e[t+3]]+"-"+Yx[e[t+4]]+Yx[e[t+5]]+"-"+Yx[e[t+6]]+Yx[e[t+7]]+"-"+Yx[e[t+8]]+Yx[e[t+9]]+"-"+Yx[e[t+10]]+Yx[e[t+11]]+Yx[e[t+12]]+Yx[e[t+13]]+Yx[e[t+14]]+Yx[e[t+15]]}const Xx=function(e,t,n){if(Wx.randomUUID&&!t&&!e)return Wx.randomUUID();const r=(e=e||{}).random||(e.rng||qx)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Kx(r)},Zx=new Set,Jx=new WeakMap;function Qx(e){const{children:t,document:n}=e;if(!n)return null;const o=(e=>{if(Jx.has(e))return Jx.get(e);let t=Xx().replace(/[0-9]/g,"");for(;Zx.has(t);)t=Xx().replace(/[0-9]/g,"");Zx.add(t);const n=Pa({container:e,key:t});return Jx.set(e,n),n})(n.head);return(0,r.createElement)(Wa,{value:o},t)}const ew=Qx;function tw(e){var t;const{name:n,children:o}=e,{registerFill:i,unregisterFill:a,...s}=zx(n),l=function(){const[,e]=(0,Uo.useState)({}),t=(0,Uo.useRef)(!0);return(0,Uo.useEffect)((()=>(t.current=!0,()=>{t.current=!1})),[]),()=>{t.current&&e({})}}(),c=(0,Uo.useRef)({rerender:l});if((0,Uo.useEffect)((()=>(i(c),()=>{a(c)})),[i,a]),!s.ref||!s.ref.current)return null;const u=(0,r.createElement)(ew,{document:s.ref.current.ownerDocument},"function"==typeof o?o(null!==(t=s.fillProps)&&void 0!==t?t:{}):o);return(0,Uo.createPortal)(u,s.ref.current)}const nw=(0,Uo.forwardRef)((function(e,t){const{name:n,fillProps:o={},as:i,children:a,...s}=e,{registerSlot:l,unregisterSlot:c,...u}=(0,Uo.useContext)(Ox),f=(0,Uo.useRef)(null);return(0,Uo.useLayoutEffect)((()=>(l(n,f,o),()=>{c(n,f)})),[l,c,n]),(0,Uo.useLayoutEffect)((()=>{u.updateSlot(n,o)})),(0,r.createElement)(xs,{as:i,ref:(0,d.useMergeRefs)([t,f]),...s})})),rw=window.wp.isShallowEqual;var ow=o.n(rw);function iw(){const e=Dx(),t=Dx();return{slots:e,fills:t,registerSlot:(t,n,r)=>{const o=e.get(t);e.set(t,Ix({...o,ref:n||o?.ref,fillProps:r||o?.fillProps||{}}))},updateSlot:(n,r)=>{const o=e.get(n);if(!o)return;if(ow()(o.fillProps,r))return;o.fillProps=r;const i=t.get(n);i&&i.forEach((e=>e.current.rerender()))},unregisterSlot:(t,n)=>{e.get(t)?.ref===n&&e.delete(t)},registerFill:(e,n)=>{t.set(e,Ix([...t.get(e)||[],n]))},unregisterFill:(e,n)=>{const r=t.get(e);r&&t.set(e,Ix(r.filter((e=>e!==n))))}}}function aw({children:e}){const t=(0,Uo.useMemo)(iw,[]);return(0,r.createElement)(Ox.Provider,{value:t},e)}function sw(){const e={},t={};let n=[];function r(t){return e[t]}function o(e){const t=r(e);t&&t.forceUpdate()}function i(){n.forEach((e=>e()))}return{registerSlot:function(t,n){const r=e[t];e[t]=n,i(),o(t),r&&r.forceUpdate()},unregisterSlot:function(t,n){e[t]===n&&(delete e[t],i())},registerFill:function(e,n){t[e]=[...t[e]||[],n],o(e)},unregisterFill:function(e,n){var r;t[e]=null!==(r=t[e]?.filter((e=>e!==n)))&&void 0!==r?r:[],o(e)},getSlot:r,getFills:function(n,r){return e[n]!==r?[]:t[n]},subscribe:function(e){return n.push(e),()=>{n=n.filter((t=>t!==e))}}}}const lw=function({children:e}){const t=(0,Uo.useMemo)(sw,[]);return(0,r.createElement)(Fx.Provider,{value:t},e)};function cw(e){return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(jx,{...e}),(0,r.createElement)(tw,{...e}))}const uw=(0,Uo.forwardRef)((function(e,t){const{bubblesVirtually:n,...o}=e;return n?(0,r.createElement)(nw,{...o,ref:t}):(0,r.createElement)($x,{...o})}));function dw({children:e,passthrough:t=!1}){return!(0,Uo.useContext)(Ox).isDefault&&t?(0,r.createElement)(r.Fragment,null,e):(0,r.createElement)(lw,null,(0,r.createElement)(aw,null,e))}function fw(e){const t="symbol"==typeof e?e.description:e,n=t=>(0,r.createElement)(cw,{name:e,...t});n.displayName=`${t}Fill`;const o=t=>(0,r.createElement)(uw,{name:e,...t});return o.displayName=`${t}Slot`,o.__unstableName=e,{Fill:n,Slot:o}}const mw="Popover",pw=()=>(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",className:"components-popover__triangle",role:"presentation"},(0,r.createElement)(n.Path,{className:"components-popover__triangle-bg",d:"M 0 0 L 50 50 L 100 0"}),(0,r.createElement)(n.Path,{className:"components-popover__triangle-border",d:"M 0 0 L 50 50 L 100 0",vectorEffect:"non-scaling-stroke"})),hw=(0,Uo.createContext)(void 0),gw="components-popover__fallback-container",vw=os(((e,t)=>{const{animate:n=!0,headerTitle:o,constrainTabbing:i,onClose:a,children:s,className:l,noArrow:u=!0,position:f,placement:m="bottom-start",offset:p=0,focusOnMount:h="firstElement",anchor:g,expandOnMobile:v,onFocusOutside:b,__unstableSlotName:y=mw,flip:x=!0,resize:w=!0,shift:E=!1,inline:_=!1,variant:S,__unstableForcePosition:C,anchorRef:k,anchorRect:P,getAnchorRect:T,isAlternate:I,...R}=rs(e,"Popover");let M=x,N=w;void 0!==C&&(qo()("`__unstableForcePosition` prop in wp.components.Popover",{since:"6.1",version:"6.3",alternative:"`flip={ false }` and `resize={ false }`"}),M=!C,N=!C),void 0!==k&&qo()("`anchorRef` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"}),void 0!==P&&qo()("`anchorRect` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"}),void 0!==T&&qo()("`getAnchorRect` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"});const D=I?"toolbar":S;void 0!==I&&qo()("`isAlternate` prop in wp.components.Popover",{since:"6.2",alternative:"`variant` prop with the `'toolbar'` value"});const A=(0,Uo.useRef)(null),[O,z]=(0,Uo.useState)(null),L=(0,Uo.useCallback)((e=>{z(e)}),[]),F=(0,d.useViewportMatch)("medium","<"),B=v&&F,j=!B&&!u,V=f?Xo(f):m,H=[..."overlay"===m?[{name:"overlay",fn:({rects:e})=>e.reference},ko({apply({rects:e,elements:t}){var n;const{firstElementChild:r}=null!==(n=t.floating)&&void 0!==n?n:{};r instanceof HTMLElement&&Object.assign(r.style,{width:`${e.reference.width}px`,height:`${e.reference.height}px`})}})]:[],Fr(p),M&&Co(),N&&ko({apply(e){var t;const{firstElementChild:n}=null!==(t=X.floating.current)&&void 0!==t?t:{};n instanceof HTMLElement&&Object.assign(n.style,{maxHeight:`${e.availableHeight}px`,overflow:"auto"})}}),E&&So({crossAxis:!0,limiter:To(),padding:1}),qy({element:A})],$=(0,Uo.useContext)(hw)||y,W=zx($);let U;(a||b)&&(U=(e,t)=>{"focus-outside"===e&&b?b(t):a&&a()});const[G,q]=(0,d.__experimentalUseDialog)({constrainTabbing:i,focusOnMount:h,__unstableOnClose:U,onClose:U}),{x:Y,y:K,refs:X,strategy:Z,update:J,placement:Q,middlewareData:{arrow:ee}}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=r.useState(o);Ky(m,o)||p(o);const[h,g]=r.useState(null),[v,b]=r.useState(null),y=r.useCallback((e=>{e!==_.current&&(_.current=e,g(e))}),[]),x=r.useCallback((e=>{e!==S.current&&(S.current=e,b(e))}),[]),w=a||h,E=s||v,_=r.useRef(null),S=r.useRef(null),C=r.useRef(d),k=null!=c,P=Jy(c),T=Jy(i),I=r.useCallback((()=>{if(!_.current||!S.current)return;const e={placement:t,strategy:n,middleware:m};T.current&&(e.platform=T.current),Io(_.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};R.current&&!Ky(C.current,t)&&(C.current=t,tr.flushSync((()=>{f(t)})))}))}),[m,t,n,T]);Yy((()=>{!1===u&&C.current.isPositioned&&(C.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[u]);const R=r.useRef(!1);Yy((()=>(R.current=!0,()=>{R.current=!1})),[]),Yy((()=>{if(w&&(_.current=w),E&&(S.current=E),w&&E){if(P.current)return P.current(w,E,I);I()}}),[w,E,I,P,k]);const M=r.useMemo((()=>({reference:_,floating:S,setReference:y,setFloating:x})),[y,x]),N=r.useMemo((()=>({reference:w,floating:E})),[w,E]),D=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!N.floating)return e;const t=Zy(N.floating,d.x),r=Zy(N.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Xy(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,N.floating,d.x,d.y]);return r.useMemo((()=>({...d,update:I,refs:M,elements:N,floatingStyles:D})),[d,I,M,N,D])}({placement:"overlay"===V?void 0:V,middleware:H,whileElementsMounted:(e,t,n)=>_o(e,t,n,{layoutShift:!1,animationFrame:!0})}),te=(0,Uo.useCallback)((e=>{A.current=e,J()}),[J]),ne=k?.top,re=k?.bottom,oe=k?.startContainer,ie=k?.current;(0,Uo.useLayoutEffect)((()=>{const e=(({anchor:e,anchorRef:t,anchorRect:n,getAnchorRect:r,fallbackReferenceElement:o})=>{var i;let a=null;return e?a=e:function(e){return!!e?.top}(t)?a={getBoundingClientRect(){const e=t.top.getBoundingClientRect(),n=t.bottom.getBoundingClientRect();return new window.DOMRect(e.x,e.y,e.width,n.bottom-e.top)}}:function(e){return!!e?.current}(t)?a=t.current:t?a=t:n?a={getBoundingClientRect:()=>n}:r?a={getBoundingClientRect(){var e,t,n,i;const a=r(o);return new window.DOMRect(null!==(e=a.x)&&void 0!==e?e:a.left,null!==(t=a.y)&&void 0!==t?t:a.top,null!==(n=a.width)&&void 0!==n?n:a.right-a.left,null!==(i=a.height)&&void 0!==i?i:a.bottom-a.top)}}:o&&(a=o.parentElement),null!==(i=a)&&void 0!==i?i:null})({anchor:g,anchorRef:k,anchorRect:P,getAnchorRect:T,fallbackReferenceElement:O});X.setReference(e)}),[g,k,ne,re,oe,ie,P,T,O,X]);const ae=(0,d.useMergeRefs)([X.setFloating,G,t]),se=B?void 0:{position:Z,top:0,left:0,x:Jo(Y),y:Jo(K)},le=Qy(),ce=n&&!B&&!le,[ue,de]=(0,Uo.useState)(!1),{style:fe,...me}=(0,Uo.useMemo)((()=>(e=>{const t=e.startsWith("top")||e.startsWith("bottom")?"translateY":"translateX",n=e.startsWith("top")||e.startsWith("left")?1:-1;return{style:Zo[e],initial:{opacity:0,scale:0,[t]:2*n+"em"},animate:{opacity:1,scale:1,[t]:0},transition:{duration:.1,ease:[0,0,.2,1]}}})(Q)),[Q]),pe=ce?{style:{...fe,...se},onAnimationComplete:()=>de(!0),...me}:{animate:!1,style:se},he=(!ce||ue)&&null!==Y&&null!==K,[ge,ve]=(0,Uo.useState)(!1),be=(0,Uo.useMemo)((()=>({ColorPicker:{onPickerDragStart(){ve(!0)},onPickerDragEnd(){ve(!1)}}})),[]);let ye=(0,r.createElement)(r.Fragment,null,ge&&(0,r.createElement)("div",{className:"components-popover-pointer-events-trap","aria-hidden":"true",onClick:()=>ve(!1)}),(0,r.createElement)(wh.div,{className:c()("components-popover",l,{"is-expanded":B,"is-positioned":he,[`is-${"toolbar"===D?"alternate":D}`]:D}),...pe,...R,ref:ae,...q,tabIndex:-1},B&&(0,r.createElement)(ox,null),B&&(0,r.createElement)("div",{className:"components-popover__header"},(0,r.createElement)("span",{className:"components-popover__header-title"},o),(0,r.createElement)(my,{className:"components-popover__close",icon:ex,onClick:a})),(0,r.createElement)("div",{className:"components-popover__content"},(0,r.createElement)(mi,{value:be},s)),j&&(0,r.createElement)("div",{ref:te,className:["components-popover__arrow",`is-${Q.split("-")[0]}`].join(" "),style:{left:void 0!==ee?.x&&Number.isFinite(ee.x)?`${ee.x}px`:"",top:void 0!==ee?.y&&Number.isFinite(ee.y)?`${ee.y}px`:""}},(0,r.createElement)(pw,null))));const xe=W.ref&&!_,we=k||P||g;return xe?ye=(0,r.createElement)(cw,{name:$},ye):_||(ye=(0,Uo.createPortal)((0,r.createElement)(Qx,{document},ye),(()=>{let e=document.body.querySelector("."+gw);return e||(e=document.createElement("div"),e.className=gw,document.body.append(e)),e})())),we?ye:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{ref:L}),ye)}),"Popover");vw.Slot=(0,Uo.forwardRef)((function({name:e=mw},t){return(0,r.createElement)(uw,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})})),vw.__unstableSlotNameProvider=hw.Provider;const bw=vw;function yw(e){const t=e.useItems?e.useItems:Gy(e);return function({filterValue:e,instanceId:n,listBoxId:o,className:i,selectedIndex:a,onChangeOptions:s,onSelect:l,onReset:f,reset:m,contentRef:p}){const[h]=t(e),g=(0,By.useAnchor)({editableContentElement:p.current}),[v,b]=(0,Uo.useState)(!1),y=(0,Uo.useRef)(null),x=(0,d.useMergeRefs)([y,(0,d.useRefEffect)((e=>{p.current&&b(e.ownerDocument!==p.current.ownerDocument)}),[p])]);!function(e,t){(0,Uo.useEffect)((()=>{const n=n=>{e.current&&!e.current.contains(n.target)&&t(n)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}}),[t])}(y,m);const w=(0,d.useDebounce)(jy.speak,500);if((0,Uo.useLayoutEffect)((()=>{s(h),function(t){w&&(t.length?w(e?(0,u.sprintf)((0,u._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length):(0,u.sprintf)((0,u._n)("Initial %d result loaded. Type to filter all available results. Use up and down arrow keys to navigate.","Initial %d results loaded. Type to filter all available results. Use up and down arrow keys to navigate.",t.length),t.length),"assertive"):w((0,u.__)("No results."),"assertive"))}(h)}),[h]),0===h.length)return null;const E=({Component:e="div"})=>(0,r.createElement)(e,{id:o,role:"listbox",className:"components-autocomplete__results"},h.map(((e,t)=>(0,r.createElement)(my,{key:e.key,id:`components-autocomplete-item-${n}-${e.key}`,role:"option","aria-selected":t===a,disabled:e.isDisabled,className:c()("components-autocomplete__result",i,{"is-selected":t===a}),onClick:()=>l(e)},e.label))));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(bw,{focusOnMount:!1,onClose:f,placement:"top-start",className:"components-autocomplete__popover",anchor:g,ref:x},(0,r.createElement)(E,null)),p.current&&v&&(0,tr.createPortal)((0,r.createElement)(E,{Component:ws}),p.current.ownerDocument.body))}}const xw=e=>{if(null===e)return"";switch(typeof e){case"string":case"number":return e.toString();case"boolean":default:return"";case"object":if(e instanceof Array)return e.map(xw).join("");if("props"in e)return xw(e.props.children)}return""},ww=[];function Ew({record:e,onChange:t,onReplace:n,completers:o,contentRef:i}){const a=(0,d.useInstanceId)(Ew),[s,l]=(0,Uo.useState)(0),[c,u]=(0,Uo.useState)(ww),[f,m]=(0,Uo.useState)(""),[p,h]=(0,Uo.useState)(null),[g,v]=(0,Uo.useState)(null),b=(0,Uo.useRef)(!1);function y(r){const{getOptionCompletion:o}=p||{};if(!r.isDisabled){if(o){const i=o(r.value,f),a=(e=>null!==e&&"object"==typeof e&&"action"in e&&void 0!==e.action&&"value"in e&&void 0!==e.value)(i)?i:{action:"insert-at-caret",value:i};if("replace"===a.action)return void n([a.value]);"insert-at-caret"===a.action&&function(n){if(null===p)return;const r=e.start,o=r-p.triggerPrefix.length-f.length,i=(0,By.create)({html:(0,Uo.renderToString)(n)});t((0,By.insert)(e,i,o,r))}(a.value)}x()}}function x(){l(0),u(ww),m(""),h(null),v(null)}const w=(0,Uo.useMemo)((()=>(0,By.isCollapsed)(e)?(0,By.getTextContent)((0,By.slice)(e,0)):""),[e]);(0,Uo.useEffect)((()=>{if(!w)return void(p&&x());const t=o.reduce(((e,t)=>w.lastIndexOf(t.triggerPrefix)>(null!==e?w.lastIndexOf(e.triggerPrefix):-1)?t:e),null);if(!t)return void(p&&x());const{allowContext:n,triggerPrefix:r}=t,i=w.lastIndexOf(r),a=w.slice(i+r.length);if(a.length>50)return;const s=0===c.length,l=a.split(/\s/),u=1===l.length,d=b.current&&l.length<=3;if(s&&!d&&!u)return void(p&&x());const f=(0,By.getTextContent)((0,By.slice)(e,void 0,(0,By.getTextContent)(e).length));if(n&&!n(w.slice(0,i),f))return void(p&&x());if(/^\s/.test(a)||/\s\s+$/.test(a))return void(p&&x());if(!/[\u0000-\uFFFF]*$/.test(a))return void(p&&x());const y=Uy(t.triggerPrefix),E=Fy()(w),_=E.slice(E.lastIndexOf(t.triggerPrefix)).match(new RegExp(`${y}([\0-￿]*)$`)),S=_&&_[1];h(t),v((()=>t!==p?yw(t):g)),m(null===S?"":S)}),[w]);const{key:E=""}=c[s]||{},{className:_}=p||{},S=!!p&&c.length>0,C=S?`components-autocomplete-listbox-${a}`:void 0;return{listBoxId:C,activeId:S?`components-autocomplete-item-${a}-${E}`:null,onKeyDown:function(e){if(b.current="Backspace"===e.key,p&&0!==c.length&&!e.defaultPrevented&&!e.isComposing&&229!==e.keyCode){switch(e.key){case"ArrowUp":{const e=(0===s?c.length:s)-1;l(e),(0,Vy.isAppleOS)()&&(0,jy.speak)(xw(c[e].label),"assertive");break}case"ArrowDown":{const e=(s+1)%c.length;l(e),(0,Vy.isAppleOS)()&&(0,jy.speak)(xw(c[e].label),"assertive");break}case"Escape":h(null),v(null),e.preventDefault();break;case"Enter":y(c[s]);break;case"ArrowLeft":case"ArrowRight":return void x();default:return}e.preventDefault()}},popover:void 0!==e.start&&g&&(0,r.createElement)(g,{className:_,filterValue:f,instanceId:a,listBoxId:C,selectedIndex:s,onChangeOptions:function(e){l(e.length===c.length?s:0),u(e)},onSelect:y,value:e,contentRef:i,reset:x})}}function _w(e){const t=(0,Uo.useRef)(null),n=(0,Uo.useRef)(),{record:r}=e,o=function(e){const t=(0,Uo.useRef)(new Set);return t.current.add(e),t.current.size>2&&t.current.delete(Array.from(t.current)[0]),Array.from(t.current)[0]}(r),{popover:i,listBoxId:a,activeId:s,onKeyDown:l}=Ew({...e,contentRef:t});n.current=l;const c=(0,d.useMergeRefs)([t,(0,d.useRefEffect)((e=>{function t(e){n.current?.(e)}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[])]);return r.text!==o?.text?{ref:c,children:i,"aria-autocomplete":a?"list":void 0,"aria-owns":a,"aria-activedescendant":s}:{ref:c}}function Sw({children:e,isSelected:t,...n}){const{popover:o,...i}=Ew(n);return(0,r.createElement)(r.Fragment,null,e(i),t&&o)}function Cw(e){const{help:t,id:n,...r}=e,o=(0,d.useInstanceId)(iy,"wp-components-base-control",n);return{baseControlProps:{id:o,help:t,...r},controlProps:{id:o,...t?{["string"==typeof t?"aria-describedby":"aria-details"]:`${o}__help`}:{}}}}const kw=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})),Pw=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"}));const Tw=Ps("",""),Iw={name:"bjn8wh",styles:"position:relative"},Rw=e=>{const{color:t=Ds.gray[200],style:n="solid",width:r=Xg.borderWidth}=e||{};return`${t} ${!!r&&"0"!==r||!!t?n||"solid":n} ${r!==Xg.borderWidth?`clamp(1px, ${r}, 10px)`:r}`},Mw={name:"1nwbfnf",styles:"grid-column:span 2;margin:0 auto"};function Nw(e){const{className:t,size:n="default",...r}=rs(e,"BorderBoxControlLinkedButton"),o=ns();return{...r,className:(0,Uo.useMemo)((()=>o((e=>Ps("position:absolute;top:","__unstable-large"===e?"8px":"3px",";",Jh({right:0})()," line-height:0;",""))(n),t)),[t,o,n])}}const Dw=os(((e,t)=>{const{className:n,isLinked:o,...i}=Nw(e),a=o?(0,u.__)("Unlink sides"):(0,u.__)("Link sides");return(0,r.createElement)(ri,{text:a},(0,r.createElement)(xs,{className:n},(0,r.createElement)(my,{...i,size:"small",icon:o?kw:Pw,iconSize:24,"aria-label":a,ref:t})))}),"BorderBoxControlLinkedButton");function Aw(e){const{className:t,value:n,size:r="default",...o}=rs(e,"BorderBoxControlVisualizer"),i=ns(),a=(0,Uo.useMemo)((()=>i(((e,t)=>Ps("position:absolute;top:","__unstable-large"===t?"20px":"15px",";right:","__unstable-large"===t?"39px":"29px",";bottom:","__unstable-large"===t?"20px":"15px",";left:","__unstable-large"===t?"39px":"29px",";border-top:",Rw(e?.top),";border-bottom:",Rw(e?.bottom),";",Jh({borderLeft:Rw(e?.left)})()," ",Jh({borderRight:Rw(e?.right)})(),";",""))(n,r),t)),[i,t,n,r]);return{...o,className:a,value:n}}const Ow=os(((e,t)=>{const{value:n,...o}=Aw(e);return(0,r.createElement)(xs,{...o,ref:t})}),"BorderBoxControlVisualizer"),zw=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),Lw=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M5 11.25h14v1.5H5z"})),Fw=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"})),Bw=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{fillRule:"evenodd",d:"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z",clipRule:"evenodd"})),jw=(0,r.createContext)(null),Vw=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Hw(){const e=new Set,t=new WeakMap,n=()=>e.forEach(Vw);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const $w=e=>!0===e,Ww=({children:e,id:t,inherit:n=!0})=>{const o=(0,r.useContext)(Ol),i=(0,r.useContext)(jw),[a,s]=_h(),l=(0,r.useRef)(null),c=o.id||i;null===l.current&&((e=>$w(!0===e)||"id"===e)(n)&&c&&(t=t?c+"-"+t:c),l.current={id:t,group:$w(n)&&o.group||Hw()});const u=(0,r.useMemo)((()=>({...l.current,forceRender:a})),[s]);return r.createElement(Ol.Provider,{value:u},e)};const Uw=e=>{const t=Ps("border-color:",Ds.ui.border,";","");return Ps(e&&t," &:hover{border-color:",Ds.ui.borderHover,";}&:focus-within{border-color:",Ds.ui.borderFocus,";box-shadow:",Xg.controlBoxShadowFocus,";z-index:1;outline:2px solid transparent;outline-offset:-2px;}","")};var Gw={name:"1aqh2c7",styles:"min-height:40px;padding:3px"},qw={name:"1ndywgm",styles:"min-height:36px;padding:2px"};const Yw=e=>({default:qw,"__unstable-large":Gw}[e]),Kw={name:"7whenc",styles:"display:flex;width:100%"},Xw=bs("div",{target:"eakva830"})({name:"zjik7",styles:"display:flex"});function Zw(e={}){var t,n=N(e,[]);const r=null==(t=n.store)?void 0:t.getState(),o=tl(M(R({},n),{focusLoop:V(n.focusLoop,null==r?void 0:r.focusLoop,!0)})),i=Rt(M(R({},o.getState()),{value:V(n.value,null==r?void 0:r.value,n.defaultValue,null)}),o,n.store);return M(R(R({},o),i),{setValue:e=>i.setState("value",e)})}function Jw(e={}){const[t,n]=$t(Zw,e);return function(e,t,n){return Ht(e=nl(e,t,n),n,"value","setValue"),e}(t,n,e)}var Qw=He([Ct],[kt]),eE=Qw.useContext,tE=(Qw.useScopedContext,Qw.useProviderContext),nE=(Qw.ContextProvider,Qw.ScopedContextProvider),rE=Ve((e=>{var t=e,{store:n}=t,r=E(t,["store"]);const o=tE();return F(n=n||o,!1),r=Te(r,(e=>(0,Le.jsx)(nE,{value:n,children:e})),[n]),r=x({role:"radiogroup"},r),r=il(x({store:n},r))})),oE=Fe((e=>je("div",rE(e))));const iE=(0,Uo.createContext)({}),aE=iE;function sE(e){const t=(0,Uo.useRef)(!0),n=(0,d.usePrevious)(e),r=(0,Uo.useRef)(!1);(0,Uo.useEffect)((()=>{t.current&&(t.current=!1)}),[]);const o=r.current||!t.current&&n!==e;return(0,Uo.useEffect)((()=>{r.current=o}),[o]),o?{value:null!=e?e:"",defaultValue:void 0}:{value:void 0,defaultValue:e}}const lE=(0,Uo.forwardRef)((function({children:e,isAdaptiveWidth:t,label:n,onChange:o,size:i,value:a,id:s,...l},c){const u=(0,d.useInstanceId)(lE,"toggle-group-control-as-radio-group"),f=s||u,{value:m,defaultValue:p}=sE(a),h=o?e=>{o(null!=e?e:void 0)}:void 0,g=Jw({defaultValue:p,value:m,setValue:h}),v=g.useState("value"),b=g.setValue,y=(0,Uo.useMemo)((()=>({baseId:f,isBlock:!t,size:i,value:v,setValue:b})),[f,t,i,v,b]);return(0,r.createElement)(aE.Provider,{value:y},(0,r.createElement)(oE,{store:g,"aria-label":n,render:(0,r.createElement)(xs,null),...l,id:f,ref:c},e))}));function cE({defaultValue:e,onChange:t,value:n}){const r=void 0!==n,o=r?n:e,[i,a]=(0,Uo.useState)(o);let s;return s=r&&"function"==typeof t?t:r||"function"!=typeof t?a:e=>{t(e),a(e)},[r?n:i,s]}const uE=(0,Uo.forwardRef)((function({children:e,isAdaptiveWidth:t,label:n,onChange:o,size:i,value:a,id:s,...l},c){const u=(0,d.useInstanceId)(uE,"toggle-group-control-as-button-group"),f=s||u,{value:m,defaultValue:p}=sE(a),[h,g]=cE({defaultValue:p,value:m,onChange:o}),v=(0,Uo.useMemo)((()=>({baseId:f,value:h,setValue:g,isBlock:!t,isDeselectable:!0,size:i})),[f,h,g,t,i]);return(0,r.createElement)(aE.Provider,{value:v},(0,r.createElement)(xs,{"aria-label":n,...l,ref:c,role:"group"},e))}));const dE=os((function(e,t){const{__nextHasNoMarginBottom:n=!1,__next40pxDefaultSize:o=!1,className:i,isAdaptiveWidth:a=!1,isBlock:s=!1,isDeselectable:l=!1,label:c,hideLabelFromVision:u=!1,help:f,onChange:m,size:p="default",value:h,children:g,...v}=rs(e,"ToggleGroupControl"),b=(0,d.useInstanceId)(dE,"toggle-group-control"),y=o&&"default"===p?"__unstable-large":p,x=ns(),w=(0,Uo.useMemo)((()=>x((({isBlock:e,isDeselectable:t,size:n})=>Ps("background:",Ds.ui.background,";border:1px solid transparent;border-radius:",Xg.controlBorderRadius,";display:inline-flex;min-width:0;position:relative;",Yw(n)," ",!t&&Uw(e),";",""))({isBlock:s,isDeselectable:l,size:y}),s&&Kw,i)),[i,x,s,l,y]),E=l?uE:lE;return(0,r.createElement)(iy,{help:f,__nextHasNoMarginBottom:n},!u&&(0,r.createElement)(Xw,null,(0,r.createElement)(iy.VisualLabel,null,c)),(0,r.createElement)(E,{...v,className:w,isAdaptiveWidth:a,label:c,onChange:m,ref:t,size:y,value:h},(0,r.createElement)(Ww,{id:b},g)))}),"ToggleGroupControl"),fE=dE;var mE=Ve((e=>{var t=e,{store:n,name:o,value:i,checked:a}=t,s=E(t,["store","name","value","checked"]);const l=eE();n=n||l;const c=_e(s.id),u=(0,r.useRef)(null),d=Vt(n,(e=>null!=a?a:function(e,t){if(void 0!==t)return null!=e&&null!=t?t===e:!!t}(i,null==e?void 0:e.value)));(0,r.useEffect)((()=>{if(!c)return;if(!d)return;(null==n?void 0:n.getState().activeId)===c||null==n||n.setActiveId(c)}),[n,d,c]);const f=s.onChange,m=function(e,t){return"input"===e&&(!t||"radio"===t)}(Se(u,s.as||"input"),s.type),p=j(s),[h,g]=ke();(0,r.useEffect)((()=>{const e=u.current;e&&(m||(void 0!==d&&(e.checked=d),void 0!==o&&(e.name=o),void 0!==i&&(e.value=`${i}`)))}),[h,m,d,o,i]);const v=we((e=>{if(p)return e.preventDefault(),void e.stopPropagation();m||(e.currentTarget.checked=!0,g()),null==f||f(e),e.defaultPrevented||null==n||n.setValue(i)})),b=s.onClick,y=we((e=>{null==b||b(e),e.defaultPrevented||m||v(e)})),_=s.onFocus,S=we((e=>{if(null==_||_(e),e.defaultPrevented)return;if(!m)return;if(!n)return;const{moves:t,activeId:r}=n.getState();t&&(c&&r!==c||v(e))}));return s=w(x({id:c,role:m?void 0:"radio",type:m?"radio":void 0,"aria-checked":d},s),{ref:Ee(u,s.ref),onChange:v,onClick:y,onFocus:S}),s=Gt(x({store:n,clickOnEnter:!m},s)),x({name:m?o:void 0,value:m?i:void 0,checked:d},s)})),pE=Be((e=>je("input",mE(e))));const hE=bs("div",{target:"et6ln9s1"})({name:"sln1fl",styles:"display:inline-flex;max-width:100%;min-width:0;position:relative"}),gE={name:"82a6rk",styles:"flex:1"},vE=({isDeselectable:e,isIcon:t,isPressed:n,size:r})=>Ps("align-items:center;appearance:none;background:transparent;border:none;border-radius:",Xg.controlBorderRadius,";color:",Ds.gray[700],";fill:currentColor;cursor:pointer;display:flex;font-family:inherit;height:100%;justify-content:center;line-height:100%;outline:none;padding:0 12px;position:relative;text-align:center;transition:background ",Xg.transitionDurationFast," linear,color ",Xg.transitionDurationFast," linear,font-weight 60ms linear;",As("transition")," user-select:none;width:100%;z-index:2;&::-moz-focus-inner{border:0;}&:active{background:",Xg.toggleGroupControlBackgroundColor,";}",e&&yE," ",t&&wE({size:r})," ",n&&bE,";",""),bE=Ps("color:",Ds.white,";&:active{background:transparent;}",""),yE=Ps("color:",Ds.gray[900],";&:focus{box-shadow:inset 0 0 0 1px ",Ds.white,",0 0 0 ",Xg.borderWidthFocus," ",Ds.theme.accent,";outline:2px solid transparent;}",""),xE=bs("div",{target:"et6ln9s0"})("display:flex;font-size:",Xg.fontSize,";line-height:1;"),wE=({size:e="default"})=>Ps("color:",Ds.gray[900],";height:",{default:"30px","__unstable-large":"32px"}[e],";aspect-ratio:1;padding-left:0;padding-right:0;",""),EE=Ps("background:",Ds.gray[900],";border-radius:",Xg.controlBorderRadius,";position:absolute;inset:0;z-index:1;outline:2px solid transparent;outline-offset:-3px;",""),{ButtonContentView:_E,LabelView:SE}=t,CE={duration:0},kE=({showTooltip:e,text:t,children:n})=>e&&t?(0,r.createElement)(ri,{text:t,placement:"top"},n):(0,r.createElement)(r.Fragment,null,n);const PE=os((function e(t,n){const o=Qy(),i=(0,Uo.useContext)(iE),a=rs({...t,id:(0,d.useInstanceId)(e,i.baseId||"toggle-group-control-option-base")},"ToggleGroupControlOptionBase"),{isBlock:s=!1,isDeselectable:l=!1,size:c="default"}=i,{className:u,isIcon:f=!1,value:m,children:p,showTooltip:h=!1,onFocus:g,...v}=a,b=i.value===m,y=ns(),x=(0,Uo.useMemo)((()=>y(s&&gE)),[y,s]),w=(0,Uo.useMemo)((()=>y(vE({isDeselectable:l,isIcon:f,isPressed:b,size:c}),u)),[y,l,f,b,c,u]),E=(0,Uo.useMemo)((()=>y(EE)),[y]),_={...v,className:w,"data-value":m,ref:n};return(0,r.createElement)(SE,{className:x},(0,r.createElement)(kE,{showTooltip:h,text:v["aria-label"]},l?(0,r.createElement)("button",{..._,onFocus:g,"aria-pressed":b,type:"button",onClick:()=>{l&&b?i.setValue(void 0):i.setValue(m)}},(0,r.createElement)(_E,null,p)):(0,r.createElement)(pE,{render:(0,r.createElement)("button",{type:"button",..._,onFocus:e=>{g?.(e),e.defaultPrevented||i.setValue(m)}}),value:m},(0,r.createElement)(_E,null,p))),b?(0,r.createElement)(wh.div,{className:E,transition:o?CE:void 0,role:"presentation",layoutId:"toggle-group-backdrop-shared-layout-id"}):null)}),"ToggleGroupControlOptionBase"),TE=PE;const IE=(0,Uo.forwardRef)((function(e,t){const{icon:n,label:o,...i}=e;return(0,r.createElement)(TE,{...i,isIcon:!0,"aria-label":o,showTooltip:!0,ref:t},(0,r.createElement)(uy,{icon:n}))})),RE=IE,ME=[{label:(0,u.__)("Solid"),icon:Lw,value:"solid"},{label:(0,u.__)("Dashed"),icon:Fw,value:"dashed"},{label:(0,u.__)("Dotted"),icon:Bw,value:"dotted"}];const NE=os((function({onChange:e,...t},n){return(0,r.createElement)(fE,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,ref:n,isDeselectable:!0,onChange:t=>{e?.(t)},...t},ME.map((e=>(0,r.createElement)(RE,{key:e.value,value:e.value,icon:e.icon,label:e.label}))))}),"BorderControlStylePicker");const DE=(0,Uo.forwardRef)((function(e,t){const{className:n,colorValue:o,...i}=e;return(0,r.createElement)("span",{className:c()("component-color-indicator",n),style:{background:o},ref:t,...i})}));var AE=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},OE=function(e){return.2126*AE(e.r)+.7152*AE(e.g)+.0722*AE(e.b)};function zE(e){e.prototype.luminance=function(){return e=OE(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,r,o,i,a,s,l,c=t instanceof e?t:new e(t);return i=this.rgba,a=c.toRgb(),n=(s=OE(i))>(l=OE(a))?(s+.05)/(l+.05):(l+.05)/(s+.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)>=(a=void 0===(i=(n=t).size)?"normal":i,"AAA"===(o=void 0===(r=n.level)?"AA":r)&&"normal"===a?7:"AA"===o&&"large"===a?3:4.5);var n,r,o,i,a}}const LE=os(((e,t)=>{const{renderContent:n,renderToggle:o,className:i,contentClassName:a,expandOnMobile:s,headerTitle:l,focusOnMount:u,popoverProps:f,onClose:m,onToggle:p,style:h,open:g,defaultOpen:v,position:b,variant:y}=rs(e,"Dropdown");void 0!==b&&qo()("`position` prop in wp.components.Dropdown",{since:"6.2",alternative:"`popoverProps.placement` prop",hint:"Note that the `position` prop will override any values passed through the `popoverProps.placement` prop."});const[x,w]=(0,Uo.useState)(null),E=(0,Uo.useRef)(),[_,S]=cE({defaultValue:v,value:g,onChange:p});function C(){m?.(),S(!1)}const k={isOpen:!!_,onToggle:()=>S(!_),onClose:C},P=!!(f?.anchor||f?.anchorRef||f?.getAnchorRect||f?.anchorRect);return(0,r.createElement)("div",{className:i,ref:(0,d.useMergeRefs)([E,t,w]),tabIndex:-1,style:h},o(k),_&&(0,r.createElement)(bw,{position:b,onClose:C,onFocusOutside:function(){if(!E.current)return;const{ownerDocument:e}=E.current,t=e?.activeElement?.closest('[role="dialog"]');E.current.contains(e.activeElement)||t&&!t.contains(E.current)||C()},expandOnMobile:s,headerTitle:l,focusOnMount:u,offset:13,anchor:P?void 0:x,variant:y,...f,className:c()("components-dropdown__content",f?.className,a)},n(k)))}),"Dropdown"),FE=LE;const BE=os((function(e,t){const n=rs(e,"InputControlSuffixWrapper");return(0,r.createElement)(tg,{marginBottom:0,...n,ref:t})}),"InputControlSuffixWrapper"),jE=bs("select",{target:"e1mv6sxx2"})("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",Ds.gray[900],";display:block;font-family:inherit;margin:0;width:100%;max-width:none;cursor:pointer;white-space:nowrap;text-overflow:ellipsis;",(({disabled:e})=>e?Ps({color:Ds.ui.textDisabled},"",""):""),";",xv,";",(({__next40pxDefaultSize:e,multiple:t,selectSize:n="default"})=>{if(t)return;const r={default:{height:40,minHeight:40,paddingTop:0,paddingBottom:0},small:{height:24,minHeight:24,paddingTop:0,paddingBottom:0},compact:{height:32,minHeight:32,paddingTop:0,paddingBottom:0},"__unstable-large":{height:40,minHeight:40,paddingTop:0,paddingBottom:0}};e||(r.default=r.compact);return Ps(r[n]||r.default,"","")}),";",(({__next40pxDefaultSize:e,multiple:t,selectSize:n="default"})=>{const r={default:16,small:8,compact:8,"__unstable-large":16};e||(r.default=r.compact);const o=r[n]||r.default;return Jh({paddingLeft:o,paddingRight:o+18,...t?{paddingTop:o,paddingBottom:o}:{}})}),";",(({multiple:e})=>({overflow:e?"auto":"hidden"})),";}"),VE=bs("div",{target:"e1mv6sxx1"})("margin-inline-end:",Ah(-1),";line-height:0;"),HE=bs(BE,{target:"e1mv6sxx0"})("position:absolute;pointer-events:none;",Jh({right:0}),";");const $E=(0,Uo.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,Uo.cloneElement)(e,{width:t,height:t,...n,ref:r})})),WE=(0,r.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(n.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),UE=()=>(0,r.createElement)(HE,null,(0,r.createElement)(VE,null,(0,r.createElement)($E,{icon:WE,size:18}))),GE=()=>{};const qE=(0,Uo.forwardRef)((function(e,t){const{className:n,disabled:o=!1,help:i,hideLabelFromVision:a,id:s,label:l,multiple:u=!1,onBlur:f=GE,onChange:m,onFocus:p=GE,options:h=[],size:g="default",value:v,labelPosition:b="top",children:y,prefix:x,suffix:w,__next40pxDefaultSize:E=!1,__nextHasNoMarginBottom:_=!1,...S}=Nv(e),[C,k]=(0,Uo.useState)(!1),P=function(e){const t=(0,d.useInstanceId)(qE);return e||`inspector-select-control-${t}`}(s),T=i?`${P}__help`:void 0;if(!h?.length&&!y)return null;const I=c()("components-select-control",n);return(0,r.createElement)(iy,{help:i,id:P,__nextHasNoMarginBottom:_},(0,r.createElement)(Ov,{className:I,disabled:o,hideLabelFromVision:a,id:P,isFocused:C,label:l,size:g,suffix:w||!u&&(0,r.createElement)(UE,null),prefix:x,labelPosition:b,__next40pxDefaultSize:E},(0,r.createElement)(jE,{...S,__next40pxDefaultSize:E,"aria-describedby":T,className:"components-select-control__input",disabled:o,id:P,multiple:u,onBlur:e=>{f(e),k(!1)},onChange:t=>{if(e.multiple){const n=Array.from(t.target.options).filter((({selected:e})=>e)).map((({value:e})=>e));e.onChange?.(n,{event:t})}else e.onChange?.(t.target.value,{event:t})},onFocus:e=>{p(e),k(!0)},ref:t,selectSize:g,value:v},y||h.map(((e,t)=>{const n=e.id||`${e.label}-${e.value}-${t}`;return(0,r.createElement)("option",{key:n,value:e.value,disabled:e.disabled,hidden:e.hidden},e.label)})))))})),YE=qE,KE={initial:void 0,fallback:""};const XE=function(e,t=KE){const{initial:n,fallback:r}={...KE,...t},[o,i]=(0,Uo.useState)(e),a=ag(e);return(0,Uo.useEffect)((()=>{a&&o&&i(void 0)}),[a,o]),[function(e=[],t){var n;return null!==(n=e.find(ag))&&void 0!==n?n:t}([e,o,n],r),(0,Uo.useCallback)((e=>{a||i(e)}),[a])]};function ZE(e,t,n){return"number"!=typeof e?null:parseFloat(`${wy(e,t,n)}`)}const JE=30,QE=()=>Ps({height:JE,minHeight:JE},"",""),e_=12,t_=bs("div",{target:"e1epgpqk14"})("-webkit-tap-highlight-color:transparent;align-items:center;display:flex;justify-content:flex-start;padding:0;position:relative;touch-action:none;width:100%;min-height:40px;",(({__next40pxDefaultSize:e})=>!e&&Ps({minHeight:JE},"","")),";"),n_=bs("div",{target:"e1epgpqk13"})("display:block;flex:1;position:relative;width:100%;",(({color:e=Ds.ui.borderFocus})=>Ps({color:e},"","")),";",QE,";",(({marks:e,__nextHasNoMarginBottom:t})=>t?"":Ps({marginBottom:e?16:void 0},"","")),";"),r_=bs("span",{target:"e1epgpqk12"})("display:flex;margin-top:",4,"px;",Jh({marginRight:6}),";"),o_=bs("span",{target:"e1epgpqk11"})("display:flex;margin-top:",4,"px;",Jh({marginLeft:6}),";"),i_=bs("span",{target:"e1epgpqk10"})("background-color:",Ds.gray[300],";left:0;pointer-events:none;right:0;display:block;height:",4,"px;position:absolute;margin-top:",13,"px;top:0;border-radius:",4,"px;",(({disabled:e,railColor:t})=>{let n=t||"";return e&&(n=Ds.ui.backgroundDisabled),Ps({background:n},"","")}),";"),a_=bs("span",{target:"e1epgpqk9"})("background-color:currentColor;border-radius:",4,"px;height:",4,"px;pointer-events:none;display:block;position:absolute;margin-top:",13,"px;top:0;",(({disabled:e,trackColor:t})=>{let n=t||"currentColor";return e&&(n=Ds.gray[400]),Ps({background:n},"","")}),";"),s_=bs("span",{target:"e1epgpqk8"})({name:"l7tjj5",styles:"display:block;pointer-events:none;position:relative;width:100%;user-select:none"}),l_=bs("span",{target:"e1epgpqk7"})("height:",e_,"px;left:0;position:absolute;top:-4px;width:1px;",(({disabled:e,isFilled:t})=>{let n=t?"currentColor":Ds.gray[300];return e&&(n=Ds.gray[400]),Ps({backgroundColor:n},"","")}),";"),c_=bs("span",{target:"e1epgpqk6"})("color:",Ds.gray[300],";left:0;font-size:11px;position:absolute;top:12px;transform:translateX( -50% );white-space:nowrap;",(({isFilled:e})=>Ps({color:e?Ds.gray[700]:Ds.gray[300]},"","")),";"),u_=({disabled:e})=>Ps("background-color:",e?Ds.gray[400]:Ds.theme.accent,";",""),d_=bs("span",{target:"e1epgpqk5"})("align-items:center;display:flex;height:",e_,"px;justify-content:center;margin-top:",9,"px;outline:0;pointer-events:none;position:absolute;top:0;user-select:none;width:",e_,"px;border-radius:50%;",u_,";",Jh({marginLeft:-10}),";",Jh({transform:"translateX( 4.5px )"},{transform:"translateX( -4.5px )"}),";"),f_=bs("span",{target:"e1epgpqk4"})("align-items:center;border-radius:50%;height:100%;outline:0;position:absolute;user-select:none;width:100%;",u_,";",(({isFocused:e})=>e?Ps("&::before{content:' ';position:absolute;background-color:",Ds.theme.accent,";opacity:0.4;border-radius:50%;height:",20,"px;width:",20,"px;top:-4px;left:-4px;}",""):""),";"),m_=bs("input",{target:"e1epgpqk3"})("box-sizing:border-box;cursor:pointer;display:block;height:100%;left:0;margin:0 -",6,"px;opacity:0;outline:none;position:absolute;right:0;top:0;width:calc( 100% + ",e_,"px );");var p_={name:"1cypxip",styles:"top:-80%"},h_={name:"1lr98c4",styles:"bottom:-80%"};const g_=bs("span",{target:"e1epgpqk2"})("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;color:white;display:inline-block;font-size:12px;min-width:32px;opacity:0;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;transition:opacity 120ms ease;user-select:none;line-height:1.4;",(({show:e})=>Ps({opacity:e?1:0},"","")),";",(({position:e})=>"bottom"===e?h_:p_),";",As("transition"),";",Jh({transform:"translateX(-50%)"},{transform:"translateX(50%)"}),";"),v_=bs(Ry,{target:"e1epgpqk1"})("display:inline-block;font-size:13px;margin-top:0;input[type='number']&{",QE,";}",Jh({marginLeft:`${Ah(4)} !important`}),";"),b_=bs("span",{target:"e1epgpqk0"})("display:block;margin-top:0;button,button.is-small{margin-left:0;",QE,";}",Jh({marginLeft:8}),";");const y_=(0,Uo.forwardRef)((function(e,t){const{describedBy:n,label:o,value:i,...a}=e;return(0,r.createElement)(m_,{...a,"aria-describedby":n,"aria-label":o,"aria-hidden":!1,ref:t,tabIndex:0,type:"range",value:i})}));function x_(e){const{className:t,isFilled:n=!1,label:o,style:i={},...a}=e,s=c()("components-range-control__mark",n&&"is-filled",t),l=c()("components-range-control__mark-label",n&&"is-filled");return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l_,{...a,"aria-hidden":"true",className:s,isFilled:n,style:i}),o&&(0,r.createElement)(c_,{"aria-hidden":"true",className:l,isFilled:n,style:i},o))}function w_(e){const{disabled:t=!1,marks:n=!1,min:o=0,max:i=100,step:a=1,value:s=0,...l}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i_,{disabled:t,...l}),n&&(0,r.createElement)(E_,{disabled:t,marks:n,min:o,max:i,step:a,value:s}))}function E_(e){const{disabled:t=!1,marks:n=!1,min:o=0,max:i=100,step:a=1,value:s=0}=e,l=function({marks:e,min:t=0,max:n=100,step:r=1,value:o=0}){if(!e)return[];const i=n-t;if(!Array.isArray(e)){e=[];const n=1+Math.round(i/r);for(;n>e.push({value:r*e.length+t}););}const a=[];return e.forEach(((e,r)=>{if(e.value<t||e.value>n)return;const s=`mark-${r}`,l=e.value<=o,c=(e.value-t)/i*100+"%",d={[(0,u.isRTL)()?"right":"left"]:c};a.push({...e,isFilled:l,key:s,style:d})})),a}({marks:n,min:o,max:i,step:"any"===a?1:a,value:s});return(0,r.createElement)(s_,{"aria-hidden":"true",className:"components-range-control__marks"},l.map((e=>(0,r.createElement)(x_,{...e,key:e.key,"aria-hidden":"true",disabled:t}))))}function __(e){const{className:t,inputRef:n,tooltipPosition:o,show:i=!1,style:a={},value:s=0,renderTooltipContent:l=(e=>e),zIndex:u=100,...d}=e,f=function({inputRef:e,tooltipPosition:t}){const[n,r]=(0,Uo.useState)(),o=(0,Uo.useCallback)((()=>{e&&e.current&&r(t)}),[t,e]);return(0,Uo.useEffect)((()=>{o()}),[o]),(0,Uo.useEffect)((()=>(window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}))),n}({inputRef:n,tooltipPosition:o}),m=c()("components-simple-tooltip",t),p={...a,zIndex:u};return(0,r.createElement)(g_,{...d,"aria-hidden":i,className:m,position:f,show:i,role:"tooltip",style:p},l(s))}const S_=()=>{};const C_=(0,Uo.forwardRef)((function e(t,n){const{__nextHasNoMarginBottom:o=!1,afterIcon:i,allowReset:a=!1,beforeIcon:s,className:l,color:f=Ds.theme.accent,currentInput:m,disabled:p=!1,help:h,hideLabelFromVision:g=!1,initialPosition:v,isShiftStepEnabled:b=!0,label:y,marks:x=!1,max:w=100,min:E=0,onBlur:_=S_,onChange:S=S_,onFocus:C=S_,onMouseLeave:k=S_,onMouseMove:P=S_,railColor:T,renderTooltipContent:I=(e=>e),resetFallbackValue:R,__next40pxDefaultSize:M=!1,shiftStep:N=10,showTooltip:D,step:A=1,trackColor:O,value:z,withInputField:L=!0,...F}=t,[B,j]=function(e){const{min:t,max:n,value:r,initial:o}=e,[i,a]=XE(ZE(r,t,n),{initial:ZE(null!=o?o:null,t,n),fallback:null});return[i,(0,Uo.useCallback)((e=>{a(null===e?null:ZE(e,t,n))}),[t,n,a])]}({min:E,max:w,value:null!=z?z:null,initial:v}),V=(0,Uo.useRef)(!1);let H=D,$=L;"any"===A&&(H=!1,$=!1);const[W,U]=(0,Uo.useState)(H),[G,q]=(0,Uo.useState)(!1),Y=(0,Uo.useRef)(),K=Y.current?.matches(":focus"),X=!p&&G,Z=null===B,J=Z?"":void 0!==B?B:m,Q=Z?(w-E)/2+E:B,ee=`${wy(Z?50:(B-E)/(w-E)*100,0,100)}%`,te=c()("components-range-control",l),ne=c()("components-range-control__wrapper",!!x&&"is-marked"),re=(0,d.useInstanceId)(e,"inspector-range-control"),oe=h?`${re}__help`:void 0,ie=!1!==H&&Number.isFinite(B),ae=()=>{let e=parseFloat(`${R}`),t=e;isNaN(e)&&(e=null,t=void 0),j(e),S(t)},se={[(0,u.isRTL)()?"right":"left"]:ee};return(0,r.createElement)(iy,{__nextHasNoMarginBottom:o,className:te,label:y,hideLabelFromVision:g,id:`${re}`,help:h},(0,r.createElement)(t_,{className:"components-range-control__root",__next40pxDefaultSize:M},s&&(0,r.createElement)(r_,null,(0,r.createElement)(uy,{icon:s})),(0,r.createElement)(n_,{__nextHasNoMarginBottom:o,className:ne,color:f,marks:!!x},(0,r.createElement)(y_,{...F,className:"components-range-control__slider",describedBy:oe,disabled:p,id:`${re}`,label:y,max:w,min:E,onBlur:e=>{_(e),q(!1),U(!1)},onChange:e=>{const t=parseFloat(e.target.value);j(t),S(t)},onFocus:e=>{C(e),q(!0),U(!0)},onMouseMove:P,onMouseLeave:k,ref:(0,d.useMergeRefs)([Y,n]),step:A,value:null!=J?J:void 0}),(0,r.createElement)(w_,{"aria-hidden":!0,disabled:p,marks:x,max:w,min:E,railColor:T,step:A,value:Q}),(0,r.createElement)(a_,{"aria-hidden":!0,className:"components-range-control__track",disabled:p,style:{width:ee},trackColor:O}),(0,r.createElement)(d_,{className:"components-range-control__thumb-wrapper",style:se,disabled:p},(0,r.createElement)(f_,{"aria-hidden":!0,isFocused:X,disabled:p})),ie&&(0,r.createElement)(__,{className:"components-range-control__tooltip",inputRef:Y,tooltipPosition:"bottom",renderTooltipContent:I,show:K||W,style:se,value:B})),i&&(0,r.createElement)(o_,null,(0,r.createElement)(uy,{icon:i})),$&&(0,r.createElement)(v_,{"aria-label":y,className:"components-range-control__number",disabled:p,inputMode:"decimal",isShiftStepEnabled:b,max:w,min:E,onBlur:()=>{V.current&&(ae(),V.current=!1)},onChange:e=>{let t=parseFloat(e);j(t),isNaN(t)?a&&(V.current=!0):((t<E||t>w)&&(t=ZE(t,E,w)),S(t),V.current=!1)},shiftStep:N,size:M?"__unstable-large":"default",__unstableInputWidth:Ah(M?20:16),step:A,value:J}),a&&(0,r.createElement)(b_,null,(0,r.createElement)(my,{className:"components-range-control__reset",disabled:p||void 0===B,variant:"secondary",size:"small",onClick:ae},(0,u.__)("Reset")))))})),k_=C_,P_=bs(Ry,{target:"ez9hsf47"})(yv,"{width:",Ah(24),";}"),T_=bs(YE,{target:"ez9hsf46"})("margin-left:",Ah(-2),";width:5em;select:not( :focus )~",kv,kv,kv,"{border-color:transparent;}"),I_=bs(k_,{target:"ez9hsf45"})("flex:1;margin-right:",Ah(2),";"),R_=`\n.react-colorful__interactive {\n\twidth: calc( 100% - ${Ah(2)} );\n\tmargin-left: ${Ah(1)};\n}`,M_=bs("div",{target:"ez9hsf44"})("padding-top:",Ah(2),";padding-right:0;padding-left:0;padding-bottom:0;"),N_=bs(Py,{target:"ez9hsf43"})("padding-left:",Ah(4),";padding-right:",Ah(4),";"),D_=bs($h,{target:"ez9hsf42"})("padding-top:",Ah(4),";padding-left:",Ah(4),";padding-right:",Ah(3),";padding-bottom:",Ah(5),";"),A_=bs("div",{target:"ez9hsf41"})(Kb,";width:216px;.react-colorful{display:flex;flex-direction:column;align-items:center;width:216px;height:auto;}.react-colorful__saturation{width:100%;border-radius:0;height:216px;margin-bottom:",Ah(4),";border-bottom:none;}.react-colorful__hue,.react-colorful__alpha{width:184px;height:16px;border-radius:16px;margin-bottom:",Ah(2),";}.react-colorful__pointer{height:16px;width:16px;border:none;box-shadow:0 0 2px 0 rgba( 0, 0, 0, 0.25 );outline:2px solid transparent;}.react-colorful__pointer-fill{box-shadow:inset 0 0 0 ",Xg.borderWidthFocus," #fff;}",R_,";"),O_=bs(my,{target:"ez9hsf40"})("&&&&&{min-width:",Ah(6),";padding:0;>svg{margin-right:0;}}"),z_=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})),L_=e=>{const{color:t,colorType:n}=e,[o,i]=(0,Uo.useState)(null),a=(0,Uo.useRef)(),s=(0,d.useCopyToClipboard)((()=>{switch(n){case"hsl":return t.toHslString();case"rgb":return t.toRgbString();default:return t.toHex()}}),(()=>{a.current&&clearTimeout(a.current),i(t.toHex()),a.current=setTimeout((()=>{i(null),a.current=void 0}),3e3)}));return(0,Uo.useEffect)((()=>()=>{a.current&&clearTimeout(a.current)}),[]),(0,r.createElement)(ri,{delay:0,hideOnClick:!1,text:o===t.toHex()?(0,u.__)("Copied!"):(0,u.__)("Copy")},(0,r.createElement)(O_,{size:"small",ref:s,icon:z_,showTooltip:!1}))},F_=({min:e,max:t,label:n,abbreviation:o,onChange:i,value:a})=>(0,r.createElement)(Py,{spacing:4},(0,r.createElement)(P_,{min:e,max:t,label:n,hideLabelFromVision:!0,value:a,onChange:e=>{i(e?"string"!=typeof e?e:parseInt(e,10):0)},prefix:(0,r.createElement)(tg,{as:mv,paddingLeft:Ah(4),color:Ds.theme.accent,lineHeight:1},o),spinControls:"none",size:"__unstable-large"}),(0,r.createElement)(I_,{__nextHasNoMarginBottom:!0,label:n,hideLabelFromVision:!0,min:e,max:t,value:a,onChange:i,withInputField:!1})),B_=({color:e,onChange:t,enableAlpha:n})=>{const{r:o,g:i,b:a,a:s}=e.toRgb();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(F_,{min:0,max:255,label:"Red",abbreviation:"R",value:o,onChange:e=>t(Bg({r:e,g:i,b:a,a:s}))}),(0,r.createElement)(F_,{min:0,max:255,label:"Green",abbreviation:"G",value:i,onChange:e=>t(Bg({r:o,g:e,b:a,a:s}))}),(0,r.createElement)(F_,{min:0,max:255,label:"Blue",abbreviation:"B",value:a,onChange:e=>t(Bg({r:o,g:i,b:e,a:s}))}),n&&(0,r.createElement)(F_,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*s),onChange:e=>t(Bg({r:o,g:i,b:a,a:e/100}))}))},j_=({color:e,onChange:t,enableAlpha:n})=>{const o=(0,Uo.useMemo)((()=>e.toHsl()),[e]),[i,a]=(0,Uo.useState)({...o}),s=e.isEqual(Bg(i));(0,Uo.useEffect)((()=>{s||a(o)}),[o,s]);const l=s?i:o,c=n=>{const r=Bg({...l,...n});e.isEqual(r)?a((e=>({...e,...n}))):t(r)};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(F_,{min:0,max:359,label:"Hue",abbreviation:"H",value:l.h,onChange:e=>{c({h:e})}}),(0,r.createElement)(F_,{min:0,max:100,label:"Saturation",abbreviation:"S",value:l.s,onChange:e=>{c({s:e})}}),(0,r.createElement)(F_,{min:0,max:100,label:"Lightness",abbreviation:"L",value:l.l,onChange:e=>{c({l:e})}}),n&&(0,r.createElement)(F_,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*l.a),onChange:e=>{c({a:e/100})}}))},V_=({color:e,onChange:t,enableAlpha:n})=>(0,r.createElement)(sy,{prefix:(0,r.createElement)(tg,{as:mv,marginLeft:Ah(4),color:Ds.theme.accent,lineHeight:1},"#"),value:e.toHex().slice(1).toUpperCase(),onChange:e=>{if(!e)return;const n=e.startsWith("#")?e:"#"+e;t(Bg(n))},maxLength:n?9:7,label:(0,u.__)("Hex color"),hideLabelFromVision:!0,size:"__unstable-large",__unstableStateReducer:(e,t)=>{const n=t.payload?.event?.nativeEvent;if("insertFromPaste"!==n?.inputType)return{...e};const r=e.value?.startsWith("#")?e.value.slice(1).toUpperCase():e.value?.toUpperCase();return{...e,value:r}},__unstableInputWidth:"9em"}),H_=({colorType:e,color:t,onChange:n,enableAlpha:o})=>{const i={color:t,onChange:n,enableAlpha:o};switch(e){case"hsl":return(0,r.createElement)(j_,{...i});case"rgb":return(0,r.createElement)(B_,{...i});default:return(0,r.createElement)(V_,{...i})}};function $_(){return($_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function W_(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}function U_(e){var t=(0,r.useRef)(e),n=(0,r.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var G_=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e<t?t:e},q_=function(e){return"touches"in e},Y_=function(e){return e&&e.ownerDocument.defaultView||self},K_=function(e,t,n){var r=e.getBoundingClientRect(),o=q_(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:G_((o.pageX-(r.left+Y_(e).pageXOffset))/r.width),top:G_((o.pageY-(r.top+Y_(e).pageYOffset))/r.height)}},X_=function(e){!q_(e)&&e.preventDefault()},Z_=r.memo((function(e){var t=e.onMove,n=e.onKey,o=W_(e,["onMove","onKey"]),i=(0,r.useRef)(null),a=U_(t),s=U_(n),l=(0,r.useRef)(null),c=(0,r.useRef)(!1),u=(0,r.useMemo)((function(){var e=function(e){X_(e),(q_(e)?e.touches.length>0:e.buttons>0)&&i.current?a(K_(i.current,e,l.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=c.current,o=Y_(i.current),a=n?o.addEventListener:o.removeEventListener;a(r?"touchmove":"mousemove",e),a(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=i.current;if(r&&(X_(t),!function(e,t){return t&&!q_(e)}(t,c.current)&&r)){if(q_(t)){c.current=!0;var o=t.changedTouches||[];o.length&&(l.current=o[0].identifier)}r.focus(),a(K_(r,t,l.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),s({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[s,a]),d=u[0],f=u[1],m=u[2];return(0,r.useEffect)((function(){return m}),[m]),r.createElement("div",$_({},o,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:i,onKeyDown:f,tabIndex:0,role:"slider"}))})),J_=function(e){return e.filter(Boolean).join(" ")},Q_=function(e){var t=e.color,n=e.left,o=e.top,i=void 0===o?.5:o,a=J_(["react-colorful__pointer",e.className]);return r.createElement("div",{className:a,style:{top:100*i+"%",left:100*n+"%"}},r.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},eS=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},tS=(Math.PI,function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:eS(e.h),s:eS(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:eS(o/2),a:eS(r,2)}}),nS=function(e){var t=tS(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},rS=function(e){var t=tS(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},oS=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),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:eS(255*[r,s,a,a,l,r][c]),g:eS(255*[l,r,r,s,a,a][c]),b:eS(255*[a,a,l,r,r,s][c]),a:eS(o,2)}},iS=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?sS({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)}):{h:0,s:0,v:0,a:1}},aS=iS,sS=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:eS(60*(s<0?s+6:s)),s:eS(i?a/i*100:0),v:eS(i/255*100),a:o}},lS=r.memo((function(e){var t=e.hue,n=e.onChange,o=J_(["react-colorful__hue",e.className]);return r.createElement("div",{className:o},r.createElement(Z_,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:G_(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":eS(t),"aria-valuemax":"360","aria-valuemin":"0"},r.createElement(Q_,{className:"react-colorful__hue-pointer",left:t/360,color:nS({h:t,s:100,v:100,a:1})})))})),cS=r.memo((function(e){var t=e.hsva,n=e.onChange,o={backgroundColor:nS({h:t.h,s:100,v:100,a:1})};return r.createElement("div",{className:"react-colorful__saturation",style:o},r.createElement(Z_,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:G_(t.s+100*e.left,0,100),v:G_(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+eS(t.s)+"%, Brightness "+eS(t.v)+"%"},r.createElement(Q_,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:nS(t)})))})),uS=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},dS=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")};function fS(e,t,n){var o=U_(n),i=(0,r.useState)((function(){return e.toHsva(t)})),a=i[0],s=i[1],l=(0,r.useRef)({color:t,hsva:a});(0,r.useEffect)((function(){if(!e.equal(t,l.current.color)){var n=e.toHsva(t);l.current={hsva:n,color:t},s(n)}}),[t,e]),(0,r.useEffect)((function(){var t;uS(a,l.current.hsva)||e.equal(t=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:t},o(t))}),[a,e,o]);var c=(0,r.useCallback)((function(e){s((function(t){return Object.assign({},t,e)}))}),[]);return[a,c]}var mS,pS="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,hS=new Map,gS=function(e){pS((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!hS.has(t)){var n=t.createElement("style");n.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',hS.set(t,n);var r=mS||o.nc;r&&n.setAttribute("nonce",r),t.head.appendChild(n)}}),[])},vS=function(e){var t=e.className,n=e.colorModel,o=e.color,i=void 0===o?n.defaultColor:o,a=e.onChange,s=W_(e,["className","colorModel","color","onChange"]),l=(0,r.useRef)(null);gS(l);var c=fS(n,i,a),u=c[0],d=c[1],f=J_(["react-colorful",t]);return r.createElement("div",$_({},s,{ref:l,className:f}),r.createElement(cS,{hsva:u,onChange:d}),r.createElement(lS,{hue:u.h,onChange:d,className:"react-colorful__last-control"}))},bS=function(e){var t=e.className,n=e.hsva,o=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+rS(Object.assign({},n,{a:0}))+", "+rS(Object.assign({},n,{a:1}))+")"},a=J_(["react-colorful__alpha",t]),s=eS(100*n.a);return r.createElement("div",{className:a},r.createElement("div",{className:"react-colorful__alpha-gradient",style:i}),r.createElement(Z_,{onMove:function(e){o({a:e.left})},onKey:function(e){o({a:G_(n.a+e.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},r.createElement(Q_,{className:"react-colorful__alpha-pointer",left:n.a,color:rS(n)})))},yS=function(e){var t=e.className,n=e.colorModel,o=e.color,i=void 0===o?n.defaultColor:o,a=e.onChange,s=W_(e,["className","colorModel","color","onChange"]),l=(0,r.useRef)(null);gS(l);var c=fS(n,i,a),u=c[0],d=c[1],f=J_(["react-colorful",t]);return r.createElement("div",$_({},s,{ref:l,className:f}),r.createElement(cS,{hsva:u,onChange:d}),r.createElement(lS,{hue:u.h,onChange:d}),r.createElement(bS,{hsva:u,onChange:d,className:"react-colorful__last-control"}))},xS={defaultColor:"rgba(0, 0, 0, 1)",toHsva:iS,fromHsva:function(e){var t=oS(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:dS},wS=function(e){return r.createElement(yS,$_({},e,{colorModel:xS}))},ES={defaultColor:"rgb(0, 0, 0)",toHsva:aS,fromHsva:function(e){var t=oS(e);return"rgb("+t.r+", "+t.g+", "+t.b+")"},equal:dS},_S=function(e){return r.createElement(vS,$_({},e,{colorModel:ES}))};const SS=({color:e,enableAlpha:t,onChange:n,onDragStart:o,onDragEnd:i,containerEl:a})=>{const s=t?wS:_S,l=(0,Uo.useMemo)((()=>e.toRgbString()),[e]);return(({containerEl:e,onDragStart:t,onDragEnd:n})=>{const r=(0,Uo.useRef)(!1),o=(0,Uo.useRef)(!1);(0,Uo.useEffect)((()=>{if(!e||!t&&!n)return;const i=[e.querySelector(".react-colorful__saturation"),e.querySelector(".react-colorful__hue"),e.querySelector(".react-colorful__alpha")].filter((e=>!!e));if(0===i.length)return;const a=e.ownerDocument,s=e=>{r.current=!1,o.current=!1,n?.(e)},l=e=>{r.current=!0,t?.(e)},c=e=>{const t=0===e.buttons;o.current&&t&&s(e)};return i.forEach((e=>e.addEventListener("pointerdown",l))),a.addEventListener("pointerup",s),a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",(()=>{o.current=r.current})),()=>{i.forEach((e=>e.removeEventListener("pointerdown",l))),a.removeEventListener("pointerup",s),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",s)}}),[t,n,e])})({containerEl:a,onDragStart:o,onDragEnd:i}),(0,r.createElement)(s,{color:l,onChange:e=>{n(Bg(e))}})};Vg([Hg]);const CS=[{label:"RGB",value:"rgb"},{label:"HSL",value:"hsl"},{label:"Hex",value:"hex"}],kS=os(((e,t)=>{const{enableAlpha:n=!1,color:o,onChange:i,defaultValue:a="#fff",copyFormat:s,onPickerDragStart:l,onPickerDragEnd:c,...f}=rs(e,"ColorPicker"),[m,p]=(0,Uo.useState)(null),[h,g]=cE({onChange:i,value:o,defaultValue:a}),v=(0,Uo.useMemo)((()=>Bg(h||"")),[h]),b=(0,d.useDebounce)(g),y=(0,Uo.useCallback)((e=>{b(e.toHex())}),[b]),[x,w]=(0,Uo.useState)(s||"hex");return(0,r.createElement)(A_,{ref:(0,d.useMergeRefs)([e=>{p(e)},t]),...f},(0,r.createElement)(SS,{containerEl:m,onChange:y,color:v,enableAlpha:n,onDragStart:l,onDragEnd:c}),(0,r.createElement)(M_,null,(0,r.createElement)(N_,{justify:"space-between"},(0,r.createElement)(T_,{__nextHasNoMarginBottom:!0,options:CS,value:x,onChange:e=>w(e),label:(0,u.__)("Color format"),hideLabelFromVision:!0}),(0,r.createElement)(L_,{color:v,colorType:s||x})),(0,r.createElement)(D_,{direction:"column",gap:2},(0,r.createElement)(H_,{colorType:x,color:v,onChange:y,enableAlpha:n}))))}),"ColorPicker"),PS=kS;function TS(e){if(void 0!==e)return"string"==typeof e?e:e.hex?e.hex:void 0}const IS=Si((e=>{const t=Bg(e),n=t.toHex(),r=t.toRgb(),o=t.toHsv(),i=t.toHsl();return{hex:n,rgb:r,hsv:o,hsl:i,source:"hex",oldHue:i.h}}));function RS(e){const{onChangeComplete:t}=e,n=(0,Uo.useCallback)((e=>{t(IS(e))}),[t]);return function(e){return void 0!==e.onChangeComplete||void 0!==e.disableAlpha||"string"==typeof e.color?.hex}(e)?{color:TS(e.color),enableAlpha:!e.disableAlpha,onChange:n}:{...e,color:e.color,enableAlpha:e.enableAlpha,onChange:e.onChange}}const MS=e=>(0,r.createElement)(PS,{...RS(e)}),NS=(0,Uo.createContext)({}),DS=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));const AS=(0,Uo.forwardRef)((function(e,t){const{isPressed:n,...o}=e;return(0,r.createElement)(my,{...o,"aria-pressed":n,ref:t})}));const OS=(0,Uo.forwardRef)((function(e,t){const{id:n,isSelected:o,compositeStore:i,...a}=e,s=i.useState("activeId");return o&&!s&&i.setActiveId(n),(0,r.createElement)(qt,{render:(0,r.createElement)(my,{...a,role:"option","aria-selected":!!o,ref:t}),store:i,id:n})}));function zS(e){const{actions:t,options:n,baseId:o,className:i,loop:a=!0,children:s,...l}=e,c=rl({focusLoop:a,rtl:(0,u.isRTL)()}),d={baseId:o,compositeStore:c};return(0,r.createElement)("div",{className:i},(0,r.createElement)(NS.Provider,{value:d},(0,r.createElement)(al,{...l,id:o,store:c,role:"listbox"},n),s,t))}function LS(e){const{actions:t,options:n,children:o,baseId:i,...a}=e;return(0,r.createElement)("div",{...a,id:i},(0,r.createElement)(NS.Provider,{value:{baseId:i}},n,o,t))}function FS(e){const{asButtons:t,actions:n,options:o,children:i,className:a,...s}=e,l=(0,d.useInstanceId)(FS,"components-circular-option-picker",s.id),u=t?LS:zS,f=n?(0,r.createElement)("div",{className:"components-circular-option-picker__custom-clear-wrapper"},n):void 0,m=(0,r.createElement)("div",{className:"components-circular-option-picker__swatches"},o);return(0,r.createElement)(u,{...s,baseId:l,className:c()("components-circular-option-picker",a),actions:f,options:m},i)}FS.Option=function e({className:t,isSelected:n,selectedIconProps:o={},tooltipText:i,...a}){const{baseId:s,compositeStore:l}=(0,Uo.useContext)(NS),u={id:(0,d.useInstanceId)(e,s||"components-circular-option-picker__option"),className:"components-circular-option-picker__option",...a},f=l?(0,r.createElement)(OS,{...u,compositeStore:l,isSelected:n}):(0,r.createElement)(AS,{...u,isPressed:n});return(0,r.createElement)("div",{className:c()(t,"components-circular-option-picker__option-wrapper")},i?(0,r.createElement)(ri,{text:i},f):f,n&&(0,r.createElement)($E,{icon:DS,...o}))},FS.OptionGroup=function({className:e,options:t,...n}){const o="aria-label"in n||"aria-labelledby"in n?"group":void 0;return(0,r.createElement)("div",{...n,role:o,className:c()("components-circular-option-picker__option-group","components-circular-option-picker__swatches",e)},t)},FS.ButtonAction=function({className:e,children:t,...n}){return(0,r.createElement)(my,{className:c()("components-circular-option-picker__clear",e),variant:"tertiary",...n},t)},FS.DropdownLinkAction=function({buttonProps:e,className:t,dropdownProps:n,linkText:o}){return(0,r.createElement)(FE,{className:c()("components-circular-option-picker__dropdown-link-action",t),renderToggle:({isOpen:t,onToggle:n})=>(0,r.createElement)(my,{"aria-expanded":t,"aria-haspopup":"true",onClick:n,variant:"link",...e},o),...n})};const BS=FS;const jS=os((function(e,t){const n=function(e){const{expanded:t=!1,alignment:n="stretch",...r}=rs(e,"VStack");return ky({direction:"column",expanded:t,alignment:n,...r})}(e);return(0,r.createElement)(xs,{...n,ref:t})}),"VStack");const VS=os((function(e,t){const n=fg(e);return(0,r.createElement)(xs,{as:"span",...n,ref:t})}),"Truncate");const HS=os((function(e,t){const n=function(e){const{as:t,level:n=2,color:r=Ds.gray[900],isBlock:o=!0,weight:i=Xg.fontWeightHeading,...a}=rs(e,"Heading"),s=t||`h${n}`,l={};return"string"==typeof s&&"h"!==s[0]&&(l.role="heading",l["aria-level"]="string"==typeof n?parseInt(n):n),{...fv({color:r,isBlock:o,weight:i,size:uv(n),...a}),...l,as:s}}(e);return(0,r.createElement)(xs,{...n,ref:t})}),"Heading"),$S=HS;const WS=bs($S,{target:"ev9wop70"})({name:"13lxv2o",styles:"text-transform:uppercase;line-height:24px;font-weight:500;&&&{font-size:11px;margin-bottom:0;}"}),US=bs("div",{target:"eovvns30"})("margin-left:",Ah(-2),";margin-right:",Ah(-2),";&:first-of-type{margin-top:",Ah(-2),";}&:last-of-type{margin-bottom:",Ah(-2),";}",(({paddingSize:e="small"})=>{if("none"===e)return;const t={small:Ah(2),medium:Ah(4)};return Ps("padding:",t[e]||t.small,";","")}),";");const GS=os((function(e,t){const{paddingSize:n="small",...o}=rs(e,"DropdownContentWrapper");return(0,r.createElement)(US,{...o,paddingSize:n,ref:t})}),"DropdownContentWrapper");Vg([Hg,zE]);const qS=e=>e.length>0&&e.every((e=>{return t=e,Array.isArray(t.colors)&&!("color"in t);var t}));function YS({className:e,clearColor:t,colors:n,onChange:o,value:i,...a}){const s=(0,Uo.useMemo)((()=>n.map((({color:e,name:n},a)=>{const s=Bg(e),l=i===e;return(0,r.createElement)(BS.Option,{key:`${e}-${a}`,isSelected:l,selectedIconProps:l?{fill:s.contrast()>s.contrast("#000")?"#fff":"#000"}:{},tooltipText:n||(0,u.sprintf)((0,u.__)("Color code: %s"),e),style:{backgroundColor:e,color:e},onClick:l?t:()=>o(e,a),"aria-label":n?(0,u.sprintf)((0,u.__)("Color: %s"),n):(0,u.sprintf)((0,u.__)("Color code: %s"),e)})}))),[n,i,o,t]);return(0,r.createElement)(BS.OptionGroup,{className:e,options:s,...a})}function KS({className:e,clearColor:t,colors:n,onChange:o,value:i,headingLevel:a}){const s=(0,d.useInstanceId)(KS,"color-palette");return 0===n.length?null:(0,r.createElement)(jS,{spacing:3,className:e},n.map((({name:e,colors:n},l)=>{const c=`${s}-${l}`;return(0,r.createElement)(jS,{spacing:2,key:l},(0,r.createElement)(WS,{id:c,level:a},e),(0,r.createElement)(YS,{clearColor:t,colors:n,onChange:e=>o(e,l),value:i,"aria-labelledby":c}))})))}function XS({isRenderedInSidebar:e,popoverProps:t,...n}){const o=(0,Uo.useMemo)((()=>({shift:!0,resize:!1,...e?{placement:"left-start",offset:34}:{placement:"bottom",offset:8},...t})),[e,t]);return(0,r.createElement)(FE,{contentClassName:"components-color-palette__custom-color-dropdown-content",popoverProps:o,...n})}Vg([Hg,zE]);const ZS=(0,Uo.forwardRef)((function(e,t){const{asButtons:n,loop:o,clearable:i=!0,colors:a=[],disableCustomColors:s=!1,enableAlpha:l=!1,onChange:d,value:f,__experimentalIsRenderedInSidebar:m=!1,headingLevel:p=2,"aria-label":h,"aria-labelledby":g,...v}=e,[b,y]=(0,Uo.useState)(f),x=(0,Uo.useCallback)((()=>d(void 0)),[d]),w=(0,Uo.useCallback)((e=>{y(((e,t)=>{if(!/^var\(/.test(null!=e?e:"")||null===t)return e;const{ownerDocument:n}=t,{defaultView:r}=n,o=r?.getComputedStyle(t).backgroundColor;return o?Bg(o).toHex():e})(f,e))}),[f]),E=qS(a),_=(0,Uo.useMemo)((()=>((e,t=[],n=!1)=>{if(!e)return"";const r=/^var\(/.test(e),o=r?e:Bg(e).toHex(),i=n?t:[{colors:t}];for(const{colors:e}of i)for(const{name:t,color:n}of e)if(o===(r?n:Bg(n).toHex()))return t;return(0,u.__)("Custom")})(f,a,E)),[f,a,E]),S=f?.startsWith("#"),C=f?.replace(/^var\((.+)\)$/,"$1"),k=C?(0,u.sprintf)((0,u.__)('Custom color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),_,C):(0,u.__)("Custom color picker."),P={clearColor:x,onChange:d,value:f},T=!!i&&(0,r.createElement)(BS.ButtonAction,{onClick:x},(0,u.__)("Clear"));let I;if(n)I={asButtons:!0};else{const e={asButtons:!1,loop:o};I=h?{...e,"aria-label":h}:g?{...e,"aria-labelledby":g}:{...e,"aria-label":(0,u.__)("Custom color picker.")}}return(0,r.createElement)(jS,{spacing:3,ref:t,...v},!s&&(0,r.createElement)(XS,{isRenderedInSidebar:m,renderContent:()=>(0,r.createElement)(GS,{paddingSize:"none"},(0,r.createElement)(MS,{color:b,onChange:e=>d(e),enableAlpha:l})),renderToggle:({isOpen:e,onToggle:t})=>(0,r.createElement)(jS,{className:"components-color-palette__custom-color-wrapper",spacing:0},(0,r.createElement)("button",{ref:w,className:"components-color-palette__custom-color-button","aria-expanded":e,"aria-haspopup":"true",onClick:t,"aria-label":k,style:{background:f},type:"button"}),(0,r.createElement)(jS,{className:"components-color-palette__custom-color-text-wrapper",spacing:.5},(0,r.createElement)(VS,{className:"components-color-palette__custom-color-name"},f?_:(0,u.__)("No color selected")),(0,r.createElement)(VS,{className:c()("components-color-palette__custom-color-value",{"components-color-palette__custom-color-value--is-hex":S})},C)))}),(0,r.createElement)(BS,{...I,actions:T,options:E?(0,r.createElement)(KS,{...P,headingLevel:p,colors:a,value:f}):(0,r.createElement)(YS,{...P,colors:a,value:f})}))})),JS=ZS,QS=bs(Ry,{target:"e1bagdl32"})("&&&{input{display:block;width:100%;}",kv,"{transition:box-shadow 0.1s linear;}}"),eC=({selectSize:e})=>({small:Ps("box-sizing:border-box;padding:2px 1px;width:20px;color:",Ds.gray[800],";font-size:8px;line-height:1;letter-spacing:-0.5px;text-transform:uppercase;text-align-last:center;",""),default:Ps("box-sizing:border-box;min-width:24px;max-width:48px;height:24px;margin-inline-end:",Ah(2),";padding:",Ah(1),";color:",Ds.theme.accent,";font-size:13px;line-height:1;text-align-last:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;","")}[e]),tC=bs("div",{target:"e1bagdl31"})("&&&{pointer-events:none;",eC,";color:",Ds.gray[900],";}"),nC=bs("select",{target:"e1bagdl30"})("&&&{appearance:none;background:transparent;border-radius:2px;border:none;display:block;outline:none;margin:0;min-height:auto;font-family:inherit;",eC,";",(({selectSize:e="default"})=>({small:Ps("height:100%;border:1px solid transparent;transition:box-shadow 0.1s linear,border 0.1s linear;",Jh({borderTopLeftRadius:0,borderBottomLeftRadius:0})()," &:not(:disabled):hover{background-color:",Ds.gray[100],";}&:focus{border:1px solid ",Ds.ui.borderFocus,";box-shadow:inset 0 0 0 ",Xg.borderWidth+" "+Ds.ui.borderFocus,";outline-offset:0;outline:2px solid transparent;z-index:1;}",""),default:Ps("display:flex;justify-content:center;align-items:center;&:hover{color:",Ds.ui.borderFocus,";box-shadow:inset 0 0 0 ",Xg.borderWidth+" "+Ds.ui.borderFocus,";outline:",Xg.borderWidth," solid transparent;}&:focus{box-shadow:0 0 0 ",Xg.borderWidthFocus+" "+Ds.ui.borderFocus,";outline:",Xg.borderWidthFocus," solid transparent;}","")}[e])),";&:not( :disabled ){cursor:pointer;}}");const rC={name:"f3vz0n",styles:"font-weight:500"},oC=Ps("box-shadow:inset ",Xg.controlBoxShadowFocus,";",""),iC=Ps("border:0;padding:0;margin:0;",Kb,";",""),aC=Ps(QS,"{flex:0 0 auto;}",""),sC=Ps("background:#fff;&&>button{aspect-ratio:1;padding:0;display:flex;align-items:center;justify-content:center;",Jh({borderRadius:"2px 0 0 2px"},{borderRadius:"0 2px 2px 0"})()," border:",Xg.borderWidth," solid ",Ds.ui.border,";&:focus,&:hover:not( :disabled ){",oC," border-color:",Ds.ui.borderFocus,";z-index:1;position:relative;}}",""),lC=(e,t)=>{const{style:n}=e||{};return Ps("border-radius:9999px;border:2px solid transparent;",n?(e=>{const{color:t,style:n}=e||{},r=n&&"none"!==n?Ds.gray[300]:void 0;return Ps("border-style:","none"===n?"solid":n,";border-color:",t||r,";","")})(e):void 0," width:","__unstable-large"===t?"24px":"22px",";height:","__unstable-large"===t?"24px":"22px",";padding:","__unstable-large"===t?"2px":"1px",";&>span{height:",Ah(4),";width:",Ah(4),";background:linear-gradient(\n\t\t\t\t-45deg,\n\t\t\t\ttransparent 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 52%,\n\t\t\t\ttransparent 52%\n\t\t\t);}","")},cC=Ps("width:",228,"px;>div:first-of-type>",Qb,"{margin-bottom:0;",rC,";}&& ",Qb,"+button:not( .has-text ){min-width:24px;padding:0;}",""),uC=Ps("",""),dC=Ps("",""),fC=Ps("justify-content:center;width:100%;&&{border-top:",Xg.borderWidth," solid ",Ds.gray[400],";border-top-left-radius:0;border-top-right-radius:0;height:40px;}",""),mC="web"===Uo.Platform.OS,pC={px:{value:"px",label:mC?"px":(0,u.__)("Pixels (px)"),a11yLabel:(0,u.__)("Pixels (px)"),step:1},"%":{value:"%",label:mC?"%":(0,u.__)("Percentage (%)"),a11yLabel:(0,u.__)("Percent (%)"),step:.1},em:{value:"em",label:mC?"em":(0,u.__)("Relative to parent font size (em)"),a11yLabel:(0,u._x)("ems","Relative to parent font size (em)"),step:.01},rem:{value:"rem",label:mC?"rem":(0,u.__)("Relative to root font size (rem)"),a11yLabel:(0,u._x)("rems","Relative to root font size (rem)"),step:.01},vw:{value:"vw",label:mC?"vw":(0,u.__)("Viewport width (vw)"),a11yLabel:(0,u.__)("Viewport width (vw)"),step:.1},vh:{value:"vh",label:mC?"vh":(0,u.__)("Viewport height (vh)"),a11yLabel:(0,u.__)("Viewport height (vh)"),step:.1},vmin:{value:"vmin",label:mC?"vmin":(0,u.__)("Viewport smallest dimension (vmin)"),a11yLabel:(0,u.__)("Viewport smallest dimension (vmin)"),step:.1},vmax:{value:"vmax",label:mC?"vmax":(0,u.__)("Viewport largest dimension (vmax)"),a11yLabel:(0,u.__)("Viewport largest dimension (vmax)"),step:.1},ch:{value:"ch",label:mC?"ch":(0,u.__)("Width of the zero (0) character (ch)"),a11yLabel:(0,u.__)("Width of the zero (0) character (ch)"),step:.01},ex:{value:"ex",label:mC?"ex":(0,u.__)("x-height of the font (ex)"),a11yLabel:(0,u.__)("x-height of the font (ex)"),step:.01},cm:{value:"cm",label:mC?"cm":(0,u.__)("Centimeters (cm)"),a11yLabel:(0,u.__)("Centimeters (cm)"),step:.001},mm:{value:"mm",label:mC?"mm":(0,u.__)("Millimeters (mm)"),a11yLabel:(0,u.__)("Millimeters (mm)"),step:.1},in:{value:"in",label:mC?"in":(0,u.__)("Inches (in)"),a11yLabel:(0,u.__)("Inches (in)"),step:.001},pc:{value:"pc",label:mC?"pc":(0,u.__)("Picas (pc)"),a11yLabel:(0,u.__)("Picas (pc)"),step:1},pt:{value:"pt",label:mC?"pt":(0,u.__)("Points (pt)"),a11yLabel:(0,u.__)("Points (pt)"),step:1},svw:{value:"svw",label:mC?"svw":(0,u.__)("Small viewport width (svw)"),a11yLabel:(0,u.__)("Small viewport width (svw)"),step:.1},svh:{value:"svh",label:mC?"svh":(0,u.__)("Small viewport height (svh)"),a11yLabel:(0,u.__)("Small viewport height (svh)"),step:.1},svi:{value:"svi",label:mC?"svi":(0,u.__)("Viewport smallest size in the inline direction (svi)"),a11yLabel:(0,u.__)("Small viewport width or height (svi)"),step:.1},svb:{value:"svb",label:mC?"svb":(0,u.__)("Viewport smallest size in the block direction (svb)"),a11yLabel:(0,u.__)("Small viewport width or height (svb)"),step:.1},svmin:{value:"svmin",label:mC?"svmin":(0,u.__)("Small viewport smallest dimension (svmin)"),a11yLabel:(0,u.__)("Small viewport smallest dimension (svmin)"),step:.1},lvw:{value:"lvw",label:mC?"lvw":(0,u.__)("Large viewport width (lvw)"),a11yLabel:(0,u.__)("Large viewport width (lvw)"),step:.1},lvh:{value:"lvh",label:mC?"lvh":(0,u.__)("Large viewport height (lvh)"),a11yLabel:(0,u.__)("Large viewport height (lvh)"),step:.1},lvi:{value:"lvi",label:mC?"lvi":(0,u.__)("Large viewport width or height (lvi)"),a11yLabel:(0,u.__)("Large viewport width or height (lvi)"),step:.1},lvb:{value:"lvb",label:mC?"lvb":(0,u.__)("Large viewport width or height (lvb)"),a11yLabel:(0,u.__)("Large viewport width or height (lvb)"),step:.1},lvmin:{value:"lvmin",label:mC?"lvmin":(0,u.__)("Large viewport smallest dimension (lvmin)"),a11yLabel:(0,u.__)("Large viewport smallest dimension (lvmin)"),step:.1},dvw:{value:"dvw",label:mC?"dvw":(0,u.__)("Dynamic viewport width (dvw)"),a11yLabel:(0,u.__)("Dynamic viewport width (dvw)"),step:.1},dvh:{value:"dvh",label:mC?"dvh":(0,u.__)("Dynamic viewport height (dvh)"),a11yLabel:(0,u.__)("Dynamic viewport height (dvh)"),step:.1},dvi:{value:"dvi",label:mC?"dvi":(0,u.__)("Dynamic viewport width or height (dvi)"),a11yLabel:(0,u.__)("Dynamic viewport width or height (dvi)"),step:.1},dvb:{value:"dvb",label:mC?"dvb":(0,u.__)("Dynamic viewport width or height (dvb)"),a11yLabel:(0,u.__)("Dynamic viewport width or height (dvb)"),step:.1},dvmin:{value:"dvmin",label:mC?"dvmin":(0,u.__)("Dynamic viewport smallest dimension (dvmin)"),a11yLabel:(0,u.__)("Dynamic viewport smallest dimension (dvmin)"),step:.1},dvmax:{value:"dvmax",label:mC?"dvmax":(0,u.__)("Dynamic viewport largest dimension (dvmax)"),a11yLabel:(0,u.__)("Dynamic viewport largest dimension (dvmax)"),step:.1},svmax:{value:"svmax",label:mC?"svmax":(0,u.__)("Small viewport largest dimension (svmax)"),a11yLabel:(0,u.__)("Small viewport largest dimension (svmax)"),step:.1},lvmax:{value:"lvmax",label:mC?"lvmax":(0,u.__)("Large viewport largest dimension (lvmax)"),a11yLabel:(0,u.__)("Large viewport largest dimension (lvmax)"),step:.1}},hC=Object.values(pC),gC=[pC.px,pC["%"],pC.em,pC.rem,pC.vw,pC.vh],vC=pC.px;function bC(e,t,n){return xC(t?`${null!=e?e:""}${t}`:e,n)}function yC(e){return Array.isArray(e)&&!!e.length}function xC(e,t=hC){let n,r;if(void 0!==e||null===e){n=`${e}`.trim();const t=parseFloat(n);r=isFinite(t)?t:void 0}const o=n?.match(/[\d.\-\+]*\s*(.*)/),i=o?.[1]?.toLowerCase();let a;if(yC(t)){const e=t.find((e=>e.value===i));a=e?.value}else a=vC.value;return[r,a]}const wC=({units:e=hC,availableUnits:t=[],defaultValues:n})=>{const r=function(e=[],t){return Array.isArray(t)?t.filter((t=>e.includes(t.value))):[]}(t,e);return n&&r.forEach(((e,t)=>{if(n[e.value]){const[o]=xC(n[e.value]);r[t].default=o}})),r};const EC=e=>e.replace(/^var\((.+)\)$/,"$1"),_C=os(((e,t)=>{const{__experimentalIsRenderedInSidebar:n,border:o,colors:i,disableCustomColors:a,enableAlpha:s,enableStyle:l,indicatorClassName:c,indicatorWrapperClassName:d,isStyleSettable:f,onReset:m,onColorChange:p,onStyleChange:h,popoverContentClassName:g,popoverControlsClassName:v,resetButtonClassName:b,showDropdownHeader:y,size:x,__unstablePopoverProps:w,...E}=function(e){const{border:t,className:n,colors:r=[],enableAlpha:o=!1,enableStyle:i=!0,onChange:a,previousStyleSelection:s,size:l="default",__experimentalIsRenderedInSidebar:c=!1,...u}=rs(e,"BorderControlDropdown"),[d]=xC(t?.width),f=0===d,m=ns(),p=(0,Uo.useMemo)((()=>m(sC,n)),[n,m]),h=(0,Uo.useMemo)((()=>m(dC)),[m]),g=(0,Uo.useMemo)((()=>m(lC(t,l))),[t,m,l]),v=(0,Uo.useMemo)((()=>m(cC)),[m]),b=(0,Uo.useMemo)((()=>m(uC)),[m]),y=(0,Uo.useMemo)((()=>m(fC)),[m]);return{...u,border:t,className:p,colors:r,enableAlpha:o,enableStyle:i,indicatorClassName:h,indicatorWrapperClassName:g,onColorChange:e=>{a({color:e,style:"none"===t?.style?s:t?.style,width:f&&e?"1px":t?.width})},onStyleChange:e=>{const n=f&&e?"1px":t?.width;a({...t,style:e,width:n})},onReset:()=>{a({...t,color:void 0,style:void 0})},popoverContentClassName:b,popoverControlsClassName:v,resetButtonClassName:y,size:l,__experimentalIsRenderedInSidebar:c}}(e),{color:_,style:S}=o||{},C=((e,t)=>{if(e&&t){if(qS(t)){let n;return t.some((t=>t.colors.some((t=>t.color===e&&(n=t,!0))))),n}return t.find((t=>t.color===e))}})(_,i),k=((e,t,n,r)=>{if(r){if(t){const e=EC(t.color);return n?(0,u.sprintf)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s". The currently selected style is "%3$s".',t.name,e,n):(0,u.sprintf)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s".',t.name,e)}if(e){const t=EC(e);return n?(0,u.sprintf)('Border color and style picker. The currently selected color has a value of "%1$s". The currently selected style is "%2$s".',t,n):(0,u.sprintf)('Border color and style picker. The currently selected color has a value of "%1$s".',t)}return(0,u.__)("Border color and style picker.")}return t?(0,u.sprintf)('Border color picker. The currently selected color is called "%1$s" and has a value of "%2$s".',t.name,EC(t.color)):e?(0,u.sprintf)('Border color picker. The currently selected color has a value of "%1$s".',EC(e)):(0,u.__)("Border color picker.")})(_,C,S,l),P=_||S&&"none"!==S,T=n?"bottom left":void 0;return(0,r.createElement)(FE,{renderToggle:({onToggle:e})=>(0,r.createElement)(my,{onClick:e,variant:"tertiary","aria-label":k,tooltipPosition:T,label:(0,u.__)("Border color and style picker"),showTooltip:!0,__next40pxDefaultSize:"__unstable-large"===x},(0,r.createElement)("span",{className:d},(0,r.createElement)(DE,{className:c,colorValue:_}))),renderContent:({onClose:e})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(GS,{paddingSize:"medium"},(0,r.createElement)(jS,{className:v,spacing:6},y?(0,r.createElement)(Py,null,(0,r.createElement)(Qb,null,(0,u.__)("Border color")),(0,r.createElement)(my,{size:"small",label:(0,u.__)("Close border color"),icon:zw,onClick:e})):void 0,(0,r.createElement)(JS,{className:g,value:_,onChange:p,colors:i,disableCustomColors:a,__experimentalIsRenderedInSidebar:n,clearable:!1,enableAlpha:s}),l&&f&&(0,r.createElement)(NE,{label:(0,u.__)("Style"),value:S,onChange:h}))),P&&(0,r.createElement)(GS,{paddingSize:"none"},(0,r.createElement)(my,{className:b,variant:"tertiary",onClick:()=>{m(),e()}},(0,u.__)("Reset")))),popoverProps:{...w},...E,ref:t})}),"BorderControlDropdown"),SC=_C;const CC=(0,Uo.forwardRef)((function({className:e,isUnitSelectTabbable:t=!0,onChange:n,size:o="default",unit:i="px",units:a=gC,...s},l){if(!yC(a)||1===a?.length)return(0,r.createElement)(tC,{className:"components-unit-control__unit-label",selectSize:o},i);const u=c()("components-unit-control__select",e);return(0,r.createElement)(nC,{ref:l,className:u,onChange:e=>{const{value:t}=e.target,r=a.find((e=>e.value===t));n?.(t,{event:e,data:r})},selectSize:o,tabIndex:t?void 0:-1,value:i,...s},a.map((e=>(0,r.createElement)("option",{value:e.value,key:e.value},e.label))))}));const kC=(0,Uo.forwardRef)((function(e,t){const{__unstableStateReducer:n,autoComplete:o="off",children:i,className:a,disabled:s=!1,disableUnits:l=!1,isPressEnterToChange:d=!1,isResetValueOnUnitChange:f=!1,isUnitSelectTabbable:m=!0,label:p,onChange:h,onUnitChange:g,size:v="default",unit:b,units:y=gC,value:x,onFocus:w,...E}=Nv(e);"unit"in e&&qo()("UnitControl unit prop",{since:"5.6",hint:"The unit should be provided within the `value` prop.",version:"6.2"});const _=null!=x?x:void 0,[S,C]=(0,Uo.useMemo)((()=>{const e=function(e,t,n=hC){const r=Array.isArray(n)?[...n]:[],[,o]=bC(e,t,hC);return o&&!r.some((e=>e.value===o))&&pC[o]&&r.unshift(pC[o]),r}(_,b,y),[{value:t=""}={},...n]=e,r=n.reduce(((e,{value:t})=>{const n=Uy(t?.substring(0,1)||"");return e.includes(n)?e:`${e}|${n}`}),Uy(t.substring(0,1)));return[e,new RegExp(`^(?:${r})$`,"i")]}),[_,b,y]),[k,P]=bC(_,b,S),[T,I]=XE(1===S.length?S[0].value:b,{initial:P,fallback:""});(0,Uo.useEffect)((()=>{void 0!==P&&I(P)}),[P,I]);const R=c()("components-unit-control","components-unit-control-wrapper",a);let M;!l&&m&&S.length&&(M=e=>{E.onKeyDown?.(e),!e.metaKey&&C.test(e.key)&&N.current?.focus()});const N=(0,Uo.useRef)(null),D=l?null:(0,r.createElement)(CC,{ref:N,"aria-label":(0,u.__)("Select unit"),disabled:s,isUnitSelectTabbable:m,onChange:(e,t)=>{const{data:n}=t;let r=`${null!=k?k:""}${e}`;f&&void 0!==n?.default&&(r=`${n.default}${e}`),h?.(r,t),g?.(e,t),I(e)},size:["small","compact"].includes(v)||"default"===v&&!E.__next40pxDefaultSize?"small":"default",unit:T,units:S,onFocus:w,onBlur:e.onBlur});let A=E.step;if(!A&&S){var O;const e=S.find((e=>e.value===T));A=null!==(O=e?.step)&&void 0!==O?O:1}return(0,r.createElement)(QS,{...E,autoComplete:o,className:R,disabled:s,spinControls:"none",isPressEnterToChange:d,label:p,onKeyDown:M,onChange:(e,t)=>{if(""===e||null==e)return void h?.("",t);const n=function(e,t,n,r){const[o,i]=xC(e,t),a=null!=o?o:n;let s=i||r;return!s&&yC(t)&&(s=t[0].value),[a,s]}(e,S,k,T).join("");h?.(n,t)},ref:t,size:v,suffix:D,type:d?"text":"number",value:null!=k?k:"",step:A,onFocus:w,__unstableStateReducer:n})})),PC=kC,TC=e=>void 0!==e?.width&&""!==e.width||void 0!==e?.color;function IC(e){const{className:t,colors:n=[],isCompact:r,onChange:o,enableAlpha:i=!0,enableStyle:a=!0,shouldSanitizeBorder:s=!0,size:l="default",value:c,width:u,__experimentalIsRenderedInSidebar:d=!1,__next40pxDefaultSize:f,...m}=rs(e,"BorderControl"),p="default"===l&&f?"__unstable-large":l,[h,g]=xC(c?.width),v=g||"px",b=0===h,[y,x]=(0,Uo.useState)(),[w,E]=(0,Uo.useState)(),_=!s||TC(c),S=(0,Uo.useCallback)((e=>{!s||TC(e)?o(e):o(void 0)}),[o,s]),C=(0,Uo.useCallback)((e=>{const t=""===e?void 0:e,[n]=xC(e),r=0===n,o={...c,width:t};r&&!b&&(x(c?.color),E(c?.style),o.color=void 0,o.style="none"),!r&&b&&(void 0===o.color&&(o.color=y),"none"===o.style&&(o.style=w)),S(o)}),[c,b,y,w,S]),k=(0,Uo.useCallback)((e=>{C(`${e}${v}`)}),[C,v]),P=ns(),T=(0,Uo.useMemo)((()=>P(iC,t)),[t,P]);let I=u;r&&(I="__unstable-large"===l?"116px":"90px");const R=(0,Uo.useMemo)((()=>{const e=!!I&&aC,t=(e=>Ps("height:","__unstable-large"===e?"40px":"30px",";",""))(p);return P(Ps(QS,"{flex:1 1 40%;}&& ",nC,"{min-height:0;}",""),e,t)}),[I,P,p]),M=(0,Uo.useMemo)((()=>P(Ps("flex:1 1 60%;",Jh({marginRight:Ah(3)})(),";",""))),[P]);return{...m,className:T,colors:n,enableAlpha:i,enableStyle:a,innerWrapperClassName:R,inputWidth:I,isStyleSettable:_,onBorderChange:S,onSliderChange:k,onWidthChange:C,previousStyleSelection:w,sliderClassName:M,value:c,widthUnit:v,widthValue:h,size:p,__experimentalIsRenderedInSidebar:d,__next40pxDefaultSize:f}}const RC=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,r.createElement)(ws,{as:"legend"},t):(0,r.createElement)(Qb,{as:"legend"},t):null},MC=os(((e,t)=>{const{__next40pxDefaultSize:n=!1,colors:o,disableCustomColors:i,disableUnits:a,enableAlpha:s,enableStyle:l,hideLabelFromVision:c,innerWrapperClassName:d,inputWidth:f,isStyleSettable:m,label:p,onBorderChange:h,onSliderChange:g,onWidthChange:v,placeholder:b,__unstablePopoverProps:y,previousStyleSelection:x,showDropdownHeader:w,size:E,sliderClassName:_,value:S,widthUnit:C,widthValue:k,withSlider:P,__experimentalIsRenderedInSidebar:T,...I}=IC(e);return(0,r.createElement)(xs,{as:"fieldset",...I,ref:t},(0,r.createElement)(RC,{label:p,hideLabelFromVision:c}),(0,r.createElement)(Py,{spacing:4,className:d},(0,r.createElement)(PC,{prefix:(0,r.createElement)(SC,{border:S,colors:o,__unstablePopoverProps:y,disableCustomColors:i,enableAlpha:s,enableStyle:l,isStyleSettable:m,onChange:h,previousStyleSelection:x,showDropdownHeader:w,__experimentalIsRenderedInSidebar:T,size:E}),label:(0,u.__)("Border width"),hideLabelFromVision:!0,min:0,onChange:v,value:S?.width||"",placeholder:b,disableUnits:a,__unstableInputWidth:f,size:E}),P&&(0,r.createElement)(k_,{__nextHasNoMarginBottom:!0,label:(0,u.__)("Border width"),hideLabelFromVision:!0,className:_,initialPosition:0,max:100,min:0,onChange:g,step:["px","%"].includes(C)?1:.1,value:k||void 0,withInputField:!1,__next40pxDefaultSize:n})))}),"BorderControl"),NC=MC,DC={bottom:{alignItems:"flex-end",justifyContent:"center"},bottomLeft:{alignItems:"flex-start",justifyContent:"flex-end"},bottomRight:{alignItems:"flex-end",justifyContent:"flex-end"},center:{alignItems:"center",justifyContent:"center"},spaced:{alignItems:"center",justifyContent:"space-between"},left:{alignItems:"center",justifyContent:"flex-start"},right:{alignItems:"center",justifyContent:"flex-end"},stretch:{alignItems:"stretch"},top:{alignItems:"flex-start",justifyContent:"center"},topLeft:{alignItems:"flex-start",justifyContent:"flex-start"},topRight:{alignItems:"flex-start",justifyContent:"flex-end"}};function AC(e){const{align:t,alignment:n,className:r,columnGap:o,columns:i=2,gap:a=3,isInline:s=!1,justify:l,rowGap:c,rows:u,templateColumns:d,templateRows:f,...m}=rs(e,"Grid"),p=Nh(Array.isArray(i)?i:[i]),h=Nh(Array.isArray(u)?u:[u]),g=d||!!i&&`repeat( ${p}, 1fr )`,v=f||!!u&&`repeat( ${h}, 1fr )`,b=ns();return{...m,className:(0,Uo.useMemo)((()=>{const e=function(e){return e?DC[e]:{}}(n),i=Ps({alignItems:t,display:s?"inline-grid":"grid",gap:`calc( ${Xg.gridBase} * ${a} )`,gridTemplateColumns:g||void 0,gridTemplateRows:v||void 0,gridRowGap:c,gridColumnGap:o,justifyContent:l,verticalAlign:s?"middle":void 0,...e},"","");return b(i,r)}),[t,n,r,o,b,a,g,v,s,l,c])}}const OC=os((function(e,t){const n=AC(e);return(0,r.createElement)(xs,{...n,ref:t})}),"Grid");function zC(e){const{className:t,colors:n=[],enableAlpha:r=!1,enableStyle:o=!0,size:i="default",__experimentalIsRenderedInSidebar:a=!1,...s}=rs(e,"BorderBoxControlSplitControls"),l=ns(),c=(0,Uo.useMemo)((()=>l((e=>Ps("position:relative;flex:1;width:","__unstable-large"===e?void 0:"80%",";",""))(i),t)),[l,t,i]);return{...s,centeredClassName:(0,Uo.useMemo)((()=>l(Mw,t)),[l,t]),className:c,colors:n,enableAlpha:r,enableStyle:o,rightAlignedClassName:(0,Uo.useMemo)((()=>l(Ps(Jh({marginLeft:"auto"})(),";",""),t)),[l,t]),size:i,__experimentalIsRenderedInSidebar:a}}const LC=os(((e,t)=>{const{centeredClassName:n,colors:o,disableCustomColors:i,enableAlpha:a,enableStyle:s,onChange:l,popoverPlacement:c,popoverOffset:f,rightAlignedClassName:m,size:p="default",value:h,__experimentalIsRenderedInSidebar:g,...v}=zC(e),[b,y]=(0,Uo.useState)(null),x=(0,Uo.useMemo)((()=>c?{placement:c,offset:f,anchor:b,shift:!0}:void 0),[c,f,b]),w={colors:o,disableCustomColors:i,enableAlpha:a,enableStyle:s,isCompact:!0,__experimentalIsRenderedInSidebar:g,size:p},E=(0,d.useMergeRefs)([y,t]);return(0,r.createElement)(OC,{...v,ref:E,gap:4},(0,r.createElement)(Ow,{value:h,size:p}),(0,r.createElement)(NC,{className:n,hideLabelFromVision:!0,label:(0,u.__)("Top border"),onChange:e=>l(e,"top"),__unstablePopoverProps:x,value:h?.top,...w}),(0,r.createElement)(NC,{hideLabelFromVision:!0,label:(0,u.__)("Left border"),onChange:e=>l(e,"left"),__unstablePopoverProps:x,value:h?.left,...w}),(0,r.createElement)(NC,{className:m,hideLabelFromVision:!0,label:(0,u.__)("Right border"),onChange:e=>l(e,"right"),__unstablePopoverProps:x,value:h?.right,...w}),(0,r.createElement)(NC,{className:n,hideLabelFromVision:!0,label:(0,u.__)("Bottom border"),onChange:e=>l(e,"bottom"),__unstablePopoverProps:x,value:h?.bottom,...w}))}),"BorderBoxControlSplitControls"),FC=LC,BC=/^([\d.\-+]*)\s*(fr|cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%|cap|ic|rlh|vi|vb|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx|svw|lvw|dvw|svh|lvh|dvh|svi|lvi|dvi|svb|lvb|dvb|svmin|lvmin|dvmin|svmax|lvmax|dvmax)?$/;const jC=["top","right","bottom","left"],VC=["color","style","width"],HC=e=>!e||!VC.some((t=>void 0!==e[t])),$C=e=>{if(!e)return!1;if(WC(e)){return!jC.every((t=>HC(e[t])))}return!HC(e)},WC=(e={})=>Object.keys(e).some((e=>-1!==jC.indexOf(e))),UC=e=>{if(!WC(e))return!1;const t=jC.map((t=>GC(e?.[t])));return!t.every((e=>e===t[0]))},GC=(e,t)=>{if(HC(e))return t;const{color:n,style:r,width:o}=t||{},{color:i=n,style:a=r,width:s=o}=e;return[s,!!s&&"0"!==s||!!i?a||"solid":a,i].filter(Boolean).join(" ")},qC=e=>function(e){if(0===e.length)return;const t={};let n,r=0;return e.forEach((e=>{t[e]=void 0===t[e]?1:t[e]+1,t[e]>r&&(n=e,r=t[e])})),n}(e.map((e=>void 0===e?void 0:function(e){const t=e.trim().match(BC);if(!t)return[void 0,void 0];const[,n,r]=t;let o=parseFloat(n);return o=Number.isNaN(o)?void 0:o,[o,r]}(`${e}`)[1])).filter((e=>void 0!==e)));function YC(e){const{className:t,colors:n=[],onChange:r,enableAlpha:o=!1,enableStyle:i=!0,size:a="default",value:s,__experimentalIsRenderedInSidebar:l=!1,__next40pxDefaultSize:c,...u}=rs(e,"BorderBoxControl"),d="default"===a&&c?"__unstable-large":a,f=UC(s),m=WC(s),p=m?(e=>{if(!e)return;const t=[],n=[],r=[];jC.forEach((o=>{t.push(e[o]?.color),n.push(e[o]?.style),r.push(e[o]?.width)}));const o=t.every((e=>e===t[0])),i=n.every((e=>e===n[0])),a=r.every((e=>e===r[0]));return{color:o?t[0]:void 0,style:i?n[0]:void 0,width:a?r[0]:qC(r)}})(s):s,h=m?s:(e=>{if(e&&!HC(e))return{top:e,right:e,bottom:e,left:e}})(s),g=!isNaN(parseFloat(`${p?.width}`)),[v,b]=(0,Uo.useState)(!f),y=ns(),x=(0,Uo.useMemo)((()=>y(Tw,t)),[y,t]),w=(0,Uo.useMemo)((()=>y(Ps("flex:1;",Jh({marginRight:"24px"})(),";",""))),[y]),E=(0,Uo.useMemo)((()=>y(Iw)),[y]);return{...u,className:x,colors:n,disableUnits:f&&!g,enableAlpha:o,enableStyle:i,hasMixedBorders:f,isLinked:v,linkedControlClassName:w,onLinkedChange:e=>{if(!e)return r(void 0);if(!f||(t=e)&&VC.every((e=>void 0!==t[e])))return r(HC(e)?void 0:e);var t;const n=((e,t)=>{const n={};return e.color!==t.color&&(n.color=t.color),e.style!==t.style&&(n.style=t.style),e.width!==t.width&&(n.width=t.width),n})(p,e),o={top:{...s?.top,...n},right:{...s?.right,...n},bottom:{...s?.bottom,...n},left:{...s?.left,...n}};if(UC(o))return r(o);const i=HC(o.top)?void 0:o.top;r(i)},onSplitChange:(e,t)=>{const n={...h,[t]:e};UC(n)?r(n):r(e)},toggleLinked:()=>b(!v),linkedValue:p,size:d,splitValue:h,wrapperClassName:E,__experimentalIsRenderedInSidebar:l}}const KC=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,r.createElement)(ws,{as:"label"},t):(0,r.createElement)(Qb,null,t):null},XC=os(((e,t)=>{const{className:n,colors:o,disableCustomColors:i,disableUnits:a,enableAlpha:s,enableStyle:l,hasMixedBorders:c,hideLabelFromVision:f,isLinked:m,label:p,linkedControlClassName:h,linkedValue:g,onLinkedChange:v,onSplitChange:b,popoverPlacement:y,popoverOffset:x,size:w,splitValue:E,toggleLinked:_,wrapperClassName:S,__experimentalIsRenderedInSidebar:C,...k}=YC(e),[P,T]=(0,Uo.useState)(null),I=(0,Uo.useMemo)((()=>y?{placement:y,offset:x,anchor:P,shift:!0}:void 0),[y,x,P]),R=(0,d.useMergeRefs)([T,t]);return(0,r.createElement)(xs,{className:n,...k,ref:R},(0,r.createElement)(KC,{label:p,hideLabelFromVision:f}),(0,r.createElement)(xs,{className:S},m?(0,r.createElement)(NC,{className:h,colors:o,disableUnits:a,disableCustomColors:i,enableAlpha:s,enableStyle:l,onChange:v,placeholder:c?(0,u.__)("Mixed"):void 0,__unstablePopoverProps:I,shouldSanitizeBorder:!1,value:g,withSlider:!0,width:"__unstable-large"===w?"116px":"110px",__experimentalIsRenderedInSidebar:C,size:w}):(0,r.createElement)(FC,{colors:o,disableCustomColors:i,enableAlpha:s,enableStyle:l,onChange:b,popoverPlacement:y,popoverOffset:x,value:E,__experimentalIsRenderedInSidebar:C,size:w}),(0,r.createElement)(Dw,{onClick:_,isLinked:m,size:w})))}),"BorderBoxControl"),ZC=XC;const JC=bs("span",{target:"e1j5nr4z8"})({name:"1w884gc",styles:"box-sizing:border-box;display:block;width:24px;height:24px;position:relative;padding:4px"}),QC=bs("span",{target:"e1j5nr4z7"})({name:"i6vjox",styles:"box-sizing:border-box;display:block;position:relative;width:100%;height:100%"}),ek=bs("span",{target:"e1j5nr4z6"})("box-sizing:border-box;display:block;pointer-events:none;position:absolute;",(({isFocused:e})=>Ps({backgroundColor:"currentColor",opacity:e?1:.3},"","")),";"),tk=bs(ek,{target:"e1j5nr4z5"})({name:"1k2w39q",styles:"bottom:3px;top:3px;width:2px"}),nk=bs(ek,{target:"e1j5nr4z4"})({name:"1q9b07k",styles:"height:2px;left:3px;right:3px"}),rk=bs(nk,{target:"e1j5nr4z3"})({name:"abcix4",styles:"top:0"}),ok=bs(tk,{target:"e1j5nr4z2"})({name:"1wf8jf",styles:"right:0"}),ik=bs(nk,{target:"e1j5nr4z1"})({name:"8tapst",styles:"bottom:0"}),ak=bs(tk,{target:"e1j5nr4z0"})({name:"1ode3cm",styles:"left:0"});function sk({size:e=24,side:t="all",sides:n,...o}){const i=e=>!(e=>n?.length&&!n.includes(e))(e)&&("all"===t||t===e),a=i("top")||i("vertical"),s=i("right")||i("horizontal"),l=i("bottom")||i("vertical"),c=i("left")||i("horizontal"),u=e/24;return(0,r.createElement)(JC,{style:{transform:`scale(${u})`},...o},(0,r.createElement)(QC,null,(0,r.createElement)(rk,{isFocused:a}),(0,r.createElement)(ok,{isFocused:s}),(0,r.createElement)(ik,{isFocused:l}),(0,r.createElement)(ak,{isFocused:c})))}const lk=bs(PC,{target:"e1jovhle5"})({name:"1ejyr19",styles:"max-width:90px"}),ck=bs(Py,{target:"e1jovhle4"})({name:"1j1lmoi",styles:"grid-column:1/span 3"}),uk=bs(my,{target:"e1jovhle3"})({name:"tkya7b",styles:"grid-area:1/2;justify-self:end"}),dk=bs("div",{target:"e1jovhle2"})({name:"1dfa8al",styles:"grid-area:1/3;justify-self:end"}),fk=bs(sk,{target:"e1jovhle1"})({name:"ou8xsw",styles:"flex:0 0 auto"}),mk=bs(k_,{target:"e1jovhle0"})("width:100%;margin-inline-end:",Ah(2),";"),pk={px:{max:300,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:10,step:.1},rm:{max:10,step:.1},svw:{max:100,step:1},lvw:{max:100,step:1},dvw:{max:100,step:1},svh:{max:100,step:1},lvh:{max:100,step:1},dvh:{max:100,step:1},vi:{max:100,step:1},svi:{max:100,step:1},lvi:{max:100,step:1},dvi:{max:100,step:1},vb:{max:100,step:1},svb:{max:100,step:1},lvb:{max:100,step:1},dvb:{max:100,step:1},vmin:{max:100,step:1},svmin:{max:100,step:1},lvmin:{max:100,step:1},dvmin:{max:100,step:1},vmax:{max:100,step:1},svmax:{max:100,step:1},lvmax:{max:100,step:1},dvmax:{max:100,step:1}},hk={all:(0,u.__)("All sides"),top:(0,u.__)("Top side"),bottom:(0,u.__)("Bottom side"),left:(0,u.__)("Left side"),right:(0,u.__)("Right side"),mixed:(0,u.__)("Mixed"),vertical:(0,u.__)("Top and bottom sides"),horizontal:(0,u.__)("Left and right sides")},gk={top:void 0,right:void 0,bottom:void 0,left:void 0},vk=["top","right","bottom","left"];function bk(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function yk(e={},t,n=vk){const r=function(e){const t=[];if(!e?.length)return vk;if(e.includes("vertical"))t.push("top","bottom");else if(e.includes("horizontal"))t.push("left","right");else{const n=vk.filter((t=>e.includes(t)));t.push(...n)}return t}(n).map((t=>xC(e[t]))),o=r.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),i=r.map((e=>e[1])),a=o.every((e=>e===o[0]))?o[0]:"";let s;var l;"number"==typeof a?s=bk(i):s=null!==(l=function(e){if(!e||"object"!=typeof e)return;const t=Object.values(e).filter(Boolean);return bk(t)}(t))&&void 0!==l?l:bk(i);return[a,s].join("")}function xk(e={},t,n=vk){const r=yk(e,t,n);return isNaN(parseFloat(r))}function wk(e){return void 0!==e&&Object.values(e).filter((e=>!!e&&/\d/.test(e))).length>0}function Ek(e,t){let n="all";return e||(n=t?"vertical":"top"),n}function _k(e,t,n){const r={...e};return n?.length?n.forEach((e=>{"vertical"===e?(r.top=t,r.bottom=t):"horizontal"===e?(r.left=t,r.right=t):r[e]=t})):vk.forEach((e=>r[e]=t)),r}const Sk=()=>{};function Ck({__next40pxDefaultSize:e,onChange:t=Sk,onFocus:n=Sk,values:o,sides:i,selectedUnits:a,setSelectedUnits:s,...l}){var c,u;const f=(0,d.useInstanceId)(Ck,"box-control-input-all"),m=yk(o,a,i),p=wk(o)&&xk(o,a,i),h=p?hk.mixed:void 0,[g,v]=xC(m),b=e=>{const n=void 0!==e&&!isNaN(parseFloat(e)),r=_k(o,n?e:void 0,i);t(r)};return(0,r.createElement)(Py,null,(0,r.createElement)(lk,{...l,__next40pxDefaultSize:e,className:"component-box-control__unit-control",disableUnits:p,id:f,isPressEnterToChange:!0,value:m,onChange:b,onUnitChange:e=>{const t=_k(a,e,i);s(t)},onFocus:e=>{n(e,{side:"all"})},placeholder:h,label:hk.all,hideLabelFromVision:!0}),(0,r.createElement)(mk,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e,"aria-controls":f,label:hk.all,hideLabelFromVision:!0,onChange:e=>{b(void 0!==e?[e,v].join(""):void 0)},min:0,max:null!==(c=pk[null!=v?v:"px"]?.max)&&void 0!==c?c:10,step:null!==(u=pk[null!=v?v:"px"]?.step)&&void 0!==u?u:.1,value:null!=g?g:0,withInputField:!1}))}const kk=()=>{};function Pk({__next40pxDefaultSize:e,onChange:t=kk,onFocus:n=kk,values:o,selectedUnits:i,setSelectedUnits:a,sides:s,...l}){const c=(0,d.useInstanceId)(Pk,"box-control-input"),u=e=>t=>{n(t,{side:e})},f=(e,n,r)=>{const i={...o},a=void 0!==n&&!isNaN(parseFloat(n))?n:void 0;if(i[e]=a,r?.event.altKey)switch(e){case"top":i.bottom=a;break;case"bottom":i.top=a;break;case"left":i.right=a;break;case"right":i.left=a}(e=>{t(e)})(i)},m=e=>t=>{const n={...i};n[e]=t,a(n)},p=s?.length?vk.filter((e=>s.includes(e))):vk;return(0,r.createElement)(r.Fragment,null,p.map((t=>{var n,a;const[d,p]=xC(o[t]),h=o[t]?p:i[t],g=[c,t].join("-");return(0,r.createElement)(ck,{key:`box-control-${t}`,expanded:!0},(0,r.createElement)(fk,{side:t,sides:s}),(0,r.createElement)(ri,{placement:"top-end",text:hk[t]},(0,r.createElement)(lk,{...l,__next40pxDefaultSize:e,className:"component-box-control__unit-control",id:g,isPressEnterToChange:!0,value:[d,h].join(""),onChange:(e,n)=>f(t,e,n),onUnitChange:m(t),onFocus:u(t),label:hk[t],hideLabelFromVision:!0})),(0,r.createElement)(mk,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e,"aria-controls":g,label:hk[t],hideLabelFromVision:!0,onChange:e=>{f(t,void 0!==e?[e,h].join(""):void 0)},min:0,max:null!==(n=pk[null!=h?h:"px"]?.max)&&void 0!==n?n:10,step:null!==(a=pk[null!=h?h:"px"]?.step)&&void 0!==a?a:.1,value:null!=d?d:0,withInputField:!1}))})))}const Tk=["vertical","horizontal"];function Ik({__next40pxDefaultSize:e,onChange:t,onFocus:n,values:o,selectedUnits:i,setSelectedUnits:a,sides:s,...l}){const c=(0,d.useInstanceId)(Ik,"box-control-input"),u=e=>t=>{n&&n(t,{side:e})},f=(e,n)=>{if(!t)return;const r={...o},i=void 0!==n&&!isNaN(parseFloat(n))?n:void 0;"vertical"===e&&(r.top=i,r.bottom=i),"horizontal"===e&&(r.left=i,r.right=i),t(r)},m=e=>t=>{const n={...i};"vertical"===e&&(n.top=t,n.bottom=t),"horizontal"===e&&(n.left=t,n.right=t),a(n)},p=s?.length?Tk.filter((e=>s.includes(e))):Tk;return(0,r.createElement)(r.Fragment,null,p.map((t=>{var n,a;const[d,p]=xC("vertical"===t?o.top:o.left),h="vertical"===t?i.top:i.left,g=[c,t].join("-");return(0,r.createElement)(ck,{key:t},(0,r.createElement)(fk,{side:t,sides:s}),(0,r.createElement)(ri,{placement:"top-end",text:hk[t]},(0,r.createElement)(lk,{...l,__next40pxDefaultSize:e,className:"component-box-control__unit-control",id:g,isPressEnterToChange:!0,value:[d,null!=h?h:p].join(""),onChange:e=>f(t,e),onUnitChange:m(t),onFocus:u(t),label:hk[t],hideLabelFromVision:!0,key:t})),(0,r.createElement)(mk,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e,"aria-controls":g,label:hk[t],hideLabelFromVision:!0,onChange:e=>f(t,void 0!==e?[e,null!=h?h:p].join(""):void 0),min:0,max:null!==(n=pk[null!=h?h:"px"]?.max)&&void 0!==n?n:10,step:null!==(a=pk[null!=h?h:"px"]?.step)&&void 0!==a?a:.1,value:null!=d?d:0,withInputField:!1}))})))}function Rk({isLinked:e,...t}){const n=e?(0,u.__)("Unlink sides"):(0,u.__)("Link sides");return(0,r.createElement)(ri,{text:n},(0,r.createElement)(my,{...t,className:"component-box-control__linked-button",size:"small",icon:e?kw:Pw,iconSize:24,"aria-label":n}))}const Mk={min:0},Nk=()=>{};function Dk({__next40pxDefaultSize:e=!1,id:t,inputProps:n=Mk,onChange:o=Nk,label:i=(0,u.__)("Box Control"),values:a,units:s,sides:l,splitOnAxis:c=!1,allowReset:f=!0,resetValues:m=gk,onMouseOver:p,onMouseOut:h}){const[g,v]=XE(a,{fallback:gk}),b=g||gk,y=wk(a),x=1===l?.length,[w,E]=(0,Uo.useState)(y),[_,S]=(0,Uo.useState)(!y||!xk(b)||x),[C,k]=(0,Uo.useState)(Ek(_,c)),[P,T]=(0,Uo.useState)({top:xC(a?.top)[1],right:xC(a?.right)[1],bottom:xC(a?.bottom)[1],left:xC(a?.left)[1]}),I=function(e){const t=(0,d.useInstanceId)(Dk,"inspector-box-control");return e||t}(t),R=`${I}-heading`,M={...n,onChange:e=>{o(e),v(e),E(!0)},onFocus:(e,{side:t})=>{k(t)},isLinked:_,units:s,selectedUnits:P,setSelectedUnits:T,sides:l,values:b,onMouseOver:p,onMouseOut:h,__next40pxDefaultSize:e};return(0,r.createElement)(OC,{id:I,columns:3,templateColumns:"1fr min-content min-content",role:"group","aria-labelledby":R},(0,r.createElement)(oy.VisualLabel,{id:R},i),_&&(0,r.createElement)(ck,null,(0,r.createElement)(fk,{side:C,sides:l}),(0,r.createElement)(Ck,{...M})),!x&&(0,r.createElement)(dk,null,(0,r.createElement)(Rk,{onClick:()=>{S(!_),k(Ek(!_,c))},isLinked:_})),!_&&c&&(0,r.createElement)(Ik,{...M}),!_&&!c&&(0,r.createElement)(Pk,{...M}),f&&(0,r.createElement)(uk,{className:"component-box-control__reset-button",variant:"secondary",size:"small",onClick:()=>{o(m),v(m),T(m),E(!1)},disabled:!w},(0,u.__)("Reset")))}const Ak=Dk;const Ok=(0,Uo.forwardRef)((function(e,t){const{className:n,...o}=e,i=c()("components-button-group",n);return(0,r.createElement)("div",{ref:t,role:"group",className:i,...o})}));const zk={name:"12ip69d",styles:"background:transparent;display:block;margin:0!important;pointer-events:none;position:absolute;will-change:box-shadow"};function Lk(e){return`0 ${e}px ${2*e}px 0\n\t${`rgba(0, 0, 0, ${e/20})`}`}const Fk=os((function(e,t){const n=function(e){const{active:t,borderRadius:n="inherit",className:r,focus:o,hover:i,isInteractive:a=!1,offset:s=0,value:l=0,...c}=rs(e,"Elevation"),u=ns();return{...c,className:(0,Uo.useMemo)((()=>{let e=ag(i)?i:2*l,c=ag(t)?t:l/2;a||(e=ag(i)?i:void 0,c=ag(t)?t:void 0);const d=`box-shadow ${Xg.transitionDuration} ${Xg.transitionTimingFunction}`,f={};return f.Base=Ps({borderRadius:n,bottom:s,boxShadow:Lk(l),opacity:Xg.elevationIntensity,left:s,right:s,top:s,transition:d},As("transition"),"",""),ag(e)&&(f.hover=Ps("*:hover>&{box-shadow:",Lk(e),";}","")),ag(c)&&(f.active=Ps("*:active>&{box-shadow:",Lk(c),";}","")),ag(o)&&(f.focus=Ps("*:focus>&{box-shadow:",Lk(o),";}","")),u(zk,f.Base,f.hover,f.focus,f.active,r)}),[t,n,r,u,o,i,a,s,l]),"aria-hidden":!0}}(e);return(0,r.createElement)(xs,{...n,ref:t})}),"Elevation"),Bk=Fk;const jk=`calc(${Xg.cardBorderRadius} - 1px)`,Vk=Ps("box-shadow:0 0 0 1px ",Xg.surfaceBorderColor,";outline:none;",""),Hk={name:"1showjb",styles:"border-bottom:1px solid;box-sizing:border-box;&:last-child{border-bottom:none;}"},$k={name:"14n5oej",styles:"border-top:1px solid;box-sizing:border-box;&:first-of-type{border-top:none;}"},Wk={name:"13udsys",styles:"height:100%"},Uk={name:"6ywzd",styles:"box-sizing:border-box;height:auto;max-height:100%"},Gk={name:"dq805e",styles:"box-sizing:border-box;overflow:hidden;&>img,&>iframe{display:block;height:auto;max-width:100%;width:100%;}"},qk={name:"c990dr",styles:"box-sizing:border-box;display:block;width:100%"},Yk=Ps("&:first-of-type{border-top-left-radius:",jk,";border-top-right-radius:",jk,";}&:last-of-type{border-bottom-left-radius:",jk,";border-bottom-right-radius:",jk,";}",""),Kk=Ps("border-color:",Xg.colorDivider,";",""),Xk={name:"1t90u8d",styles:"box-shadow:none"},Zk={name:"1e1ncky",styles:"border:none"},Jk=Ps("border-radius:",jk,";",""),Qk=Ps("padding:",Xg.cardPaddingXSmall,";",""),eP={large:Ps("padding:",Xg.cardPaddingLarge,";",""),medium:Ps("padding:",Xg.cardPaddingMedium,";",""),small:Ps("padding:",Xg.cardPaddingSmall,";",""),xSmall:Qk,extraSmall:Qk},tP=Ps("background-color:",Ds.ui.backgroundDisabled,";",""),nP=Ps("background-color:",Xg.surfaceColor,";color:",Ds.gray[900],";position:relative;","");Xg.surfaceBackgroundColor;function rP({borderBottom:e,borderLeft:t,borderRight:n,borderTop:r}){const o=`1px solid ${Xg.surfaceBorderColor}`;return Ps({borderBottom:e?o:void 0,borderLeft:t?o:void 0,borderRight:n?o:void 0,borderTop:r?o:void 0},"","")}const oP=Ps("",""),iP=Ps("background:",Xg.surfaceBackgroundTintColor,";",""),aP=Ps("background:",Xg.surfaceBackgroundTertiaryColor,";",""),sP=e=>[e,e].join(" "),lP=e=>["90deg",[Xg.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),cP=e=>[[Xg.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),uP=(e,t)=>Ps("background:",(e=>[`linear-gradient( ${lP(e)} ) center`,`linear-gradient( ${cP(e)} ) center`,Xg.surfaceBorderBoldColor].join(","))(t),";background-size:",sP(e),";",""),dP=[`linear-gradient( ${[`${Xg.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`,`linear-gradient( ${["90deg",`${Xg.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`].join(","),fP=(e,t,n)=>{switch(e){case"dotted":return uP(t,n);case"grid":return(e=>Ps("background:",Xg.surfaceBackgroundColor,";background-image:",dP,";background-size:",sP(e),";",""))(t);case"primary":return oP;case"secondary":return iP;case"tertiary":return aP}};function mP(e){const{backgroundSize:t=12,borderBottom:n=!1,borderLeft:r=!1,borderRight:o=!1,borderTop:i=!1,className:a,variant:s="primary",...l}=rs(e,"Surface"),c=ns();return{...l,className:(0,Uo.useMemo)((()=>{const e={borders:rP({borderBottom:n,borderLeft:r,borderRight:o,borderTop:i})};return c(nP,e.borders,fP(s,`${t}px`,t-1+"px"),a)}),[t,n,r,o,i,a,c,s])}}function pP(e){const{className:t,elevation:n=0,isBorderless:r=!1,isRounded:o=!0,size:i="medium",...a}=rs(function({elevation:e,isElevated:t,...n}){const r={...n};let o=e;var i;return t&&(qo()("Card isElevated prop",{since:"5.9",alternative:"elevation"}),null!==(i=o)&&void 0!==i||(o=2)),void 0!==o&&(r.elevation=o),r}(e),"Card"),s=ns();return{...mP({...a,className:(0,Uo.useMemo)((()=>s(Vk,r&&Xk,o&&Jk,t)),[t,s,r,o])}),elevation:n,isBorderless:r,isRounded:o,size:i}}const hP=os((function(e,t){const{children:n,elevation:o,isBorderless:i,isRounded:a,size:s,...l}=pP(e),c=a?Xg.cardBorderRadius:0,u=ns(),d=(0,Uo.useMemo)((()=>u(Ps({borderRadius:c},"",""))),[u,c]),f=(0,Uo.useMemo)((()=>{const e={size:s,isBorderless:i};return{CardBody:e,CardHeader:e,CardFooter:e}}),[i,s]);return(0,r.createElement)(mi,{value:f},(0,r.createElement)(xs,{...l,ref:t},(0,r.createElement)(xs,{className:u(Wk)},n),(0,r.createElement)(Bk,{className:d,isInteractive:!1,value:o?1:0}),(0,r.createElement)(Bk,{className:d,isInteractive:!1,value:o})))}),"Card"),gP=hP;const vP=Ps("@media only screen and ( min-device-width: 40em ){&::-webkit-scrollbar{height:12px;width:12px;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-track{background:",Xg.colorScrollbarTrack,";border-radius:8px;}&::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:",Xg.colorScrollbarThumb,";border:2px solid rgba( 0, 0, 0, 0 );border-radius:7px;}&:hover::-webkit-scrollbar-thumb{background-color:",Xg.colorScrollbarThumbHover,";}}",""),bP={name:"13udsys",styles:"height:100%"},yP={name:"7zq9w",styles:"scroll-behavior:smooth"},xP={name:"q33xhg",styles:"overflow-x:auto;overflow-y:hidden"},wP={name:"103x71s",styles:"overflow-x:hidden;overflow-y:auto"},EP={name:"umwchj",styles:"overflow-y:auto"};const _P=os((function(e,t){const n=function(e){const{className:t,scrollDirection:n="y",smoothScroll:r=!1,...o}=rs(e,"Scrollable"),i=ns();return{...o,className:(0,Uo.useMemo)((()=>i(bP,vP,r&&yP,"x"===n&&xP,"y"===n&&wP,"auto"===n&&EP,t)),[t,i,n,r])}}(e);return(0,r.createElement)(xs,{...n,ref:t})}),"Scrollable"),SP=_P;const CP=os((function(e,t){const{isScrollable:n,...o}=function(e){const{className:t,isScrollable:n=!1,isShady:r=!1,size:o="medium",...i}=rs(e,"CardBody"),a=ns();return{...i,className:(0,Uo.useMemo)((()=>a(Uk,Yk,eP[o],r&&tP,"components-card__body",t)),[t,a,r,o]),isScrollable:n}}(e);return n?(0,r.createElement)(SP,{...o,ref:t}):(0,r.createElement)(xs,{...o,ref:t})}),"CardBody"),kP=CP;var PP=Ve((e=>{var t=e,{orientation:n="horizontal"}=t,r=E(t,["orientation"]);return r=x({role:"separator","aria-orientation":n},r)})),TP=Fe((e=>je("hr",PP(e))));const IP={vertical:{start:"marginLeft",end:"marginRight"},horizontal:{start:"marginTop",end:"marginBottom"}};var RP={name:"1u4hpl4",styles:"display:inline"};const MP=bs("hr",{target:"e19on6iw0"})("border:0;margin:0;",(({"aria-orientation":e="horizontal"})=>"vertical"===e?RP:void 0)," ",(({"aria-orientation":e="horizontal"})=>Ps({["vertical"===e?"borderRight":"borderBottom"]:"1px solid currentColor"},"",""))," ",(({"aria-orientation":e="horizontal"})=>Ps({height:"vertical"===e?"auto":0,width:"vertical"===e?0:"auto"},"",""))," ",(({"aria-orientation":e="horizontal",margin:t,marginStart:n,marginEnd:r})=>Ps(Jh({[IP[e].start]:Ah(null!=n?n:t),[IP[e].end]:Ah(null!=r?r:t)})(),"","")),";");const NP=os((function(e,t){const n=rs(e,"Divider");return(0,r.createElement)(TP,{render:(0,r.createElement)(MP,null),...n,ref:t})}),"Divider");const DP=os((function(e,t){const n=function(e){const{className:t,...n}=rs(e,"CardDivider"),r=ns();return{...n,className:(0,Uo.useMemo)((()=>r(qk,Kk,"components-card__divider",t)),[t,r])}}(e);return(0,r.createElement)(NP,{...n,ref:t})}),"CardDivider"),AP=DP;const OP=os((function(e,t){const n=function(e){const{className:t,justify:n,isBorderless:r=!1,isShady:o=!1,size:i="medium",...a}=rs(e,"CardFooter"),s=ns();return{...a,className:(0,Uo.useMemo)((()=>s($k,Yk,Kk,eP[i],r&&Zk,o&&tP,"components-card__footer",t)),[t,s,r,o,i]),justify:n}}(e);return(0,r.createElement)($h,{...n,ref:t})}),"CardFooter"),zP=OP;const LP=os((function(e,t){const n=function(e){const{className:t,isBorderless:n=!1,isShady:r=!1,size:o="medium",...i}=rs(e,"CardHeader"),a=ns();return{...i,className:(0,Uo.useMemo)((()=>a(Hk,Yk,Kk,eP[o],n&&Zk,r&&tP,"components-card__header",t)),[t,a,n,r,o])}}(e);return(0,r.createElement)($h,{...n,ref:t})}),"CardHeader"),FP=LP;const BP=os((function(e,t){const n=function(e){const{className:t,...n}=rs(e,"CardMedia"),r=ns();return{...n,className:(0,Uo.useMemo)((()=>r(Gk,Yk,"components-card__media",t)),[t,r])}}(e);return(0,r.createElement)(xs,{...n,ref:t})}),"CardMedia"),jP=BP;const VP=function e(t){const{__nextHasNoMarginBottom:n,label:o,className:i,heading:a,checked:s,indeterminate:l,help:u,id:f,onChange:m,...p}=t;a&&qo()("`heading` prop in `CheckboxControl`",{alternative:"a separate element to implement a heading",since:"5.8"});const[h,g]=(0,Uo.useState)(!1),[v,b]=(0,Uo.useState)(!1),y=(0,d.useRefEffect)((e=>{e&&(e.indeterminate=!!l,g(e.matches(":checked")),b(e.matches(":indeterminate")))}),[s,l]),x=(0,d.useInstanceId)(e,"inspector-checkbox-control",f);return(0,r.createElement)(iy,{__nextHasNoMarginBottom:n,label:a,id:x,help:u,className:c()("components-checkbox-control",i)},(0,r.createElement)("span",{className:"components-checkbox-control__input-container"},(0,r.createElement)("input",{ref:y,id:x,className:"components-checkbox-control__input",type:"checkbox",value:"1",onChange:e=>m(e.target.checked),checked:s,"aria-describedby":u?x+"__help":void 0,...p}),v?(0,r.createElement)($E,{icon:rg,className:"components-checkbox-control__indeterminate",role:"presentation"}):null,h?(0,r.createElement)($E,{icon:DS,className:"components-checkbox-control__checked",role:"presentation"}):null),o&&(0,r.createElement)("label",{className:"components-checkbox-control__label",htmlFor:x},o))},HP=4e3;function $P({className:e,children:t,onCopy:n,onFinishCopy:o,text:i,...a}){qo()("wp.components.ClipboardButton",{since:"5.8",alternative:"wp.compose.useCopyToClipboard"});const s=(0,Uo.useRef)(),l=(0,d.useCopyToClipboard)(i,(()=>{n(),s.current&&clearTimeout(s.current),o&&(s.current=setTimeout((()=>o()),HP))}));(0,Uo.useEffect)((()=>{s.current&&clearTimeout(s.current)}),[]);const u=c()("components-clipboard-button",e);return(0,r.createElement)(my,{...a,className:u,ref:l,onCopy:e=>{e.target.focus()}},t)}const WP=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));const UP=e=>Ps("font-size:",Yb("default.fontSize"),";font-family:inherit;appearance:none;border:1px solid transparent;cursor:pointer;background:none;text-align:start;text-decoration:","a"===e?"none":void 0,";svg,path{fill:currentColor;}&:hover{color:",Ds.theme.accent,";}&:focus{box-shadow:none;outline:none;}&:focus-visible{box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ",Ds.theme.accent,";outline:2px solid transparent;outline-offset:0;}",""),GP={name:"1bcj5ek",styles:"width:100%;display:block"},qP={name:"150ruhm",styles:"box-sizing:border-box;width:100%;display:block;margin:0;color:inherit"},YP=Ps("border:1px solid ",Xg.surfaceBorderColor,";",""),KP=Ps(">*:not( marquee )>*{border-bottom:1px solid ",Xg.surfaceBorderColor,";}>*:last-of-type>*:not( :focus ){border-bottom-color:transparent;}",""),XP=Xg.controlBorderRadius,ZP=Ps("border-radius:",XP,";",""),JP=Ps("border-radius:",XP,";>*:first-of-type>*{border-top-left-radius:",XP,";border-top-right-radius:",XP,";}>*:last-of-type>*{border-bottom-left-radius:",XP,";border-bottom-right-radius:",XP,";}",""),QP=`calc(${Xg.fontSize} * ${Xg.fontLineHeightBase})`,eT=`calc((${Xg.controlHeight} - ${QP} - 2px) / 2)`,tT=`calc((${Xg.controlHeightSmall} - ${QP} - 2px) / 2)`,nT=`calc((${Xg.controlHeightLarge} - ${QP} - 2px) / 2)`,rT={small:Ps("padding:",tT," ",Xg.controlPaddingXSmall,";",""),medium:Ps("padding:",eT," ",Xg.controlPaddingX,";",""),large:Ps("padding:",nT," ",Xg.controlPaddingXLarge,";","")};const oT=(0,Uo.createContext)({size:"medium"}),iT=()=>(0,Uo.useContext)(oT);const aT=os((function(e,t){const{isBordered:n,isSeparated:o,size:i,...a}=function(e){const{className:t,isBordered:n=!1,isRounded:r=!0,isSeparated:o=!1,role:i="list",...a}=rs(e,"ItemGroup");return{isBordered:n,className:ns()(n&&YP,o&&KP,r&&JP,t),role:i,isSeparated:o,...a}}(e),{size:s}=iT(),l={spacedAround:!n&&!o,size:i||s};return(0,r.createElement)(oT.Provider,{value:l},(0,r.createElement)(xs,{...a,ref:t}))}),"ItemGroup"),sT=10,lT=0,cT=sT;function uT(e){return Math.max(0,Math.min(100,e))}function dT(e,t,n){const r=e.slice();return r[t]=n,r}function fT(e,t,n){if(function(e,t,n,r=lT){const o=e[t].position,i=Math.min(o,n),a=Math.max(o,n);return e.some((({position:e},o)=>o!==t&&(Math.abs(e-n)<r||i<e&&e<a)))}(e,t,n))return e;return dT(e,t,{...e[t],position:n})}function mT(e,t,n){return dT(e,t,{...e[t],color:n})}function pT(e,t){if(!t)return;const{x:n,width:r}=t.getBoundingClientRect(),o=e-n;return Math.round(uT(100*o/r))}function hT({isOpen:e,position:t,color:n,...o}){const i=`components-custom-gradient-picker__control-point-button-description-${(0,d.useInstanceId)(hT)}`;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(my,{"aria-label":(0,u.sprintf)((0,u.__)("Gradient control point at position %1$s%% with color code %2$s."),t,n),"aria-describedby":i,"aria-haspopup":"true","aria-expanded":e,className:c()("components-custom-gradient-picker__control-point-button",{"is-active":e}),...o}),(0,r.createElement)(ws,{id:i},(0,u.__)("Use your left or right arrow keys or drag and drop with the mouse to change the gradient position. Press the button to change the color or remove the control point.")))}function gT({isRenderedInSidebar:e,className:t,...n}){const o=(0,Uo.useMemo)((()=>({placement:"bottom",offset:8,resize:!1})),[]),i=c()("components-custom-gradient-picker__control-point-dropdown",t);return(0,r.createElement)(XS,{isRenderedInSidebar:e,popoverProps:o,className:i,...n})}function vT({disableRemove:e,disableAlpha:t,gradientPickerDomRef:n,ignoreMarkerPosition:o,value:i,onChange:a,onStartControlPointChange:s,onStopControlPointChange:l,__experimentalIsRenderedInSidebar:c}){const d=(0,Uo.useRef)(),f=e=>{if(void 0===d.current||null===n.current)return;const t=pT(e.clientX,n.current),{initialPosition:r,index:o,significantMoveHappened:s}=d.current;!s&&Math.abs(r-t)>=5&&(d.current.significantMoveHappened=!0),a(fT(i,o,t))},m=()=>{window&&window.removeEventListener&&d.current&&d.current.listenersActivated&&(window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",m),l(),d.current.listenersActivated=!1)},p=(0,Uo.useRef)();return p.current=m,(0,Uo.useEffect)((()=>()=>{p.current?.()}),[]),(0,r.createElement)(r.Fragment,null,i.map(((n,p)=>{const h=n?.position;return o!==h&&(0,r.createElement)(gT,{isRenderedInSidebar:c,key:p,onClose:l,renderToggle:({isOpen:e,onToggle:t})=>(0,r.createElement)(hT,{key:p,onClick:()=>{d.current&&d.current.significantMoveHappened||(e?l():s(),t())},onMouseDown:()=>{window&&window.addEventListener&&(d.current={initialPosition:h,index:p,significantMoveHappened:!1,listenersActivated:!0},s(),window.addEventListener("mousemove",f),window.addEventListener("mouseup",m))},onKeyDown:e=>{"ArrowLeft"===e.code?(e.stopPropagation(),a(fT(i,p,uT(n.position-cT)))):"ArrowRight"===e.code&&(e.stopPropagation(),a(fT(i,p,uT(n.position+cT))))},isOpen:e,position:n.position,color:n.color}),renderContent:({onClose:o})=>(0,r.createElement)(GS,{paddingSize:"none"},(0,r.createElement)(MS,{enableAlpha:!t,color:n.color,onChange:e=>{a(mT(i,p,Bg(e).toRgbString()))}}),!e&&i.length>2&&(0,r.createElement)(Py,{className:"components-custom-gradient-picker__remove-control-point-wrapper",alignment:"center"},(0,r.createElement)(my,{onClick:()=>{a(function(e,t){return e.filter(((e,n)=>n!==t))}(i,p)),o()},variant:"link"},(0,u.__)("Remove Control Point")))),style:{left:`${n.position}%`,transform:"translateX( -50% )"}})})))}vT.InsertPoint=function({value:e,onChange:t,onOpenInserter:n,onCloseInserter:o,insertPosition:i,disableAlpha:a,__experimentalIsRenderedInSidebar:s}){const[l,c]=(0,Uo.useState)(!1);return(0,r.createElement)(gT,{isRenderedInSidebar:s,className:"components-custom-gradient-picker__inserter",onClose:()=>{o()},renderToggle:({isOpen:e,onToggle:t})=>(0,r.createElement)(my,{"aria-expanded":e,"aria-haspopup":"true",onClick:()=>{e?o():(c(!1),n()),t()},className:"components-custom-gradient-picker__insert-point-dropdown",icon:ng}),renderContent:()=>(0,r.createElement)(GS,{paddingSize:"none"},(0,r.createElement)(MS,{enableAlpha:!a,onChange:n=>{l?t(function(e,t,n){const r=e.findIndex((e=>e.position===t));return mT(e,r,n)}(e,i,Bg(n).toRgbString())):(t(function(e,t,n){const r=e.findIndex((e=>e.position>t)),o={color:n,position:t},i=e.slice();return i.splice(r-1,0,o),i}(e,i,Bg(n).toRgbString())),c(!0))}})),style:null!==i?{left:`${i}%`,transform:"translateX( -50% )"}:void 0})};const bT=vT,yT=(e,t)=>{switch(t.type){case"MOVE_INSERTER":if("IDLE"===e.id||"MOVING_INSERTER"===e.id)return{id:"MOVING_INSERTER",insertPosition:t.insertPosition};break;case"STOP_INSERTER_MOVE":if("MOVING_INSERTER"===e.id)return{id:"IDLE"};break;case"OPEN_INSERTER":if("MOVING_INSERTER"===e.id)return{id:"INSERTING_CONTROL_POINT",insertPosition:e.insertPosition};break;case"CLOSE_INSERTER":if("INSERTING_CONTROL_POINT"===e.id)return{id:"IDLE"};break;case"START_CONTROL_CHANGE":if("IDLE"===e.id)return{id:"MOVING_CONTROL_POINT"};break;case"STOP_CONTROL_CHANGE":if("MOVING_CONTROL_POINT"===e.id)return{id:"IDLE"}}return e},xT={id:"IDLE"};function wT({background:e,hasGradient:t,value:n,onChange:o,disableInserter:i=!1,disableAlpha:a=!1,__experimentalIsRenderedInSidebar:s=!1}){const l=(0,Uo.useRef)(null),[u,d]=(0,Uo.useReducer)(yT,xT),f=e=>{if(!l.current)return;const t=pT(e.clientX,l.current);n.some((({position:e})=>Math.abs(t-e)<sT))?"MOVING_INSERTER"===u.id&&d({type:"STOP_INSERTER_MOVE"}):d({type:"MOVE_INSERTER",insertPosition:t})},m="MOVING_INSERTER"===u.id,p="INSERTING_CONTROL_POINT"===u.id;return(0,r.createElement)("div",{className:c()("components-custom-gradient-picker__gradient-bar",{"has-gradient":t}),onMouseEnter:f,onMouseMove:f,onMouseLeave:()=>{d({type:"STOP_INSERTER_MOVE"})}},(0,r.createElement)("div",{className:"components-custom-gradient-picker__gradient-bar-background",style:{background:e,opacity:t?1:.4}}),(0,r.createElement)("div",{ref:l,className:"components-custom-gradient-picker__markers-container"},!i&&(m||p)&&(0,r.createElement)(bT.InsertPoint,{__experimentalIsRenderedInSidebar:s,disableAlpha:a,insertPosition:u.insertPosition,value:n,onChange:o,onOpenInserter:()=>{d({type:"OPEN_INSERTER"})},onCloseInserter:()=>{d({type:"CLOSE_INSERTER"})}}),(0,r.createElement)(bT,{__experimentalIsRenderedInSidebar:s,disableAlpha:a,disableRemove:i,gradientPickerDomRef:l,ignoreMarkerPosition:p?u.insertPosition:void 0,value:n,onChange:o,onStartControlPointChange:()=>{d({type:"START_CONTROL_CHANGE"})},onStopControlPointChange:()=>{d({type:"STOP_CONTROL_CHANGE"})}})))}var ET=o(8924);const _T="linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%)",ST={type:"angular",value:"90"},CT=[{value:"linear-gradient",label:(0,u.__)("Linear")},{value:"radial-gradient",label:(0,u.__)("Radial")}],kT={top:0,"top right":45,"right top":45,right:90,"right bottom":135,"bottom right":135,bottom:180,"bottom left":225,"left bottom":225,left:270,"top left":315,"left top":315};function PT({type:e,value:t,length:n}){return`${function({type:e,value:t}){return"literal"===e?t:"hex"===e?`#${t}`:`${e}(${t.join(",")})`}({type:e,value:t})} ${function(e){if(!e)return"";const{value:t,type:n}=e;return`${t}${n}`}(n)}`}function TT({type:e,orientation:t,colorStops:n}){const r=function(e){if(!Array.isArray(e)&&e&&"angular"===e.type)return`${e.value}deg`}(t);return`${e}(${[r,...n.sort(((e,t)=>{const n=e=>void 0===e?.length?.value?0:parseInt(e.length.value);return n(e)-n(t)})).map(PT)].filter(Boolean).join(",")})`}function IT(e){return void 0===e.length||"%"!==e.length.type}function RT(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;case"rgb":case"rgba":return`${e.type}(${e.value.join(",")})`;default:return"transparent"}}Vg([Hg]);const MT=bs(Uh,{target:"e10bzpgi1"})({name:"1gvx10y",styles:"flex-grow:5"}),NT=bs(Uh,{target:"e10bzpgi0"})({name:"1gvx10y",styles:"flex-grow:5"}),DT=({gradientAST:e,hasGradient:t,onChange:n})=>{var o;const i=null!==(o=e?.orientation?.value)&&void 0!==o?o:180;return(0,r.createElement)(zy,{onChange:t=>{n(TT({...e,orientation:{type:"angular",value:`${t}`}}))},value:t?i:""})},AT=({gradientAST:e,hasGradient:t,onChange:n})=>{const{type:o}=e;return(0,r.createElement)(YE,{__nextHasNoMarginBottom:!0,className:"components-custom-gradient-picker__type-picker",label:(0,u.__)("Type"),labelPosition:"top",onChange:t=>{"linear-gradient"===t&&n(TT({...e,orientation:e.orientation?void 0:ST,type:"linear-gradient"})),"radial-gradient"===t&&(()=>{const{orientation:t,...r}=e;n(TT({...r,type:"radial-gradient"}))})()},options:CT,size:"__unstable-large",value:t?o:void 0})};const OT=function({value:e,onChange:t,__experimentalIsRenderedInSidebar:n=!1}){const{gradientAST:o,hasGradient:i}=function(e){let t,n=!!e;const r=null!=e?e:_T;try{t=ET.parse(r)[0]}catch(e){console.warn("wp.components.CustomGradientPicker failed to parse the gradient with error",e),t=ET.parse(_T)[0],n=!1}if(Array.isArray(t.orientation)||"directional"!==t.orientation?.type||(t.orientation={type:"angular",value:kT[t.orientation.value].toString()}),t.colorStops.some(IT)){const{colorStops:e}=t,n=100/(e.length-1);e.forEach(((e,t)=>{e.length={value:""+n*t,type:"%"}}))}return{gradientAST:t,hasGradient:n}}(e),a=function(e){return TT({type:"linear-gradient",orientation:ST,colorStops:e.colorStops})}(o),s=o.colorStops.map((e=>({color:RT(e),position:parseInt(e.length.value)})));return(0,r.createElement)(jS,{spacing:4,className:"components-custom-gradient-picker"},(0,r.createElement)(wT,{__experimentalIsRenderedInSidebar:n,background:a,hasGradient:i,value:s,onChange:e=>{t(TT(function(e,t){return{...e,colorStops:t.map((({position:e,color:t})=>{const{r:n,g:r,b:o,a:i}=Bg(t).toRgb();return{length:{type:"%",value:e?.toString()},type:i<1?"rgba":"rgb",value:i<1?[`${n}`,`${r}`,`${o}`,`${i}`]:[`${n}`,`${r}`,`${o}`]}}))}}(o,e)))}}),(0,r.createElement)($h,{gap:3,className:"components-custom-gradient-picker__ui-line"},(0,r.createElement)(MT,null,(0,r.createElement)(AT,{gradientAST:o,hasGradient:i,onChange:t})),(0,r.createElement)(NT,null,"linear-gradient"===o.type&&(0,r.createElement)(DT,{gradientAST:o,hasGradient:i,onChange:t}))))},zT=e=>e.length>0&&e.every((e=>{return t=e,Array.isArray(t.gradients)&&!("gradient"in t);var t}));function LT({className:e,clearGradient:t,gradients:n,onChange:o,value:i,...a}){const s=(0,Uo.useMemo)((()=>n.map((({gradient:e,name:n,slug:a},s)=>(0,r.createElement)(BS.Option,{key:a,value:e,isSelected:i===e,tooltipText:n||(0,u.sprintf)((0,u.__)("Gradient code: %s"),e),style:{color:"rgba( 0,0,0,0 )",background:e},onClick:i===e?t:()=>o(e,s),"aria-label":n?(0,u.sprintf)((0,u.__)("Gradient: %s"),n):(0,u.sprintf)((0,u.__)("Gradient code: %s"),e)})))),[n,i,o,t]);return(0,r.createElement)(BS.OptionGroup,{className:e,options:s,...a})}function FT({className:e,clearGradient:t,gradients:n,onChange:o,value:i,headingLevel:a}){const s=(0,d.useInstanceId)(FT);return(0,r.createElement)(jS,{spacing:3,className:e},n.map((({name:e,gradients:n},l)=>{const c=`color-palette-${s}-${l}`;return(0,r.createElement)(jS,{spacing:2,key:l},(0,r.createElement)(WS,{level:a,id:c},e),(0,r.createElement)(LT,{clearGradient:t,gradients:n,onChange:e=>o(e,l),value:i,"aria-labelledby":c}))})))}function BT(e){const{asButtons:t,loop:n,actions:o,headingLevel:i,"aria-label":a,"aria-labelledby":s,...l}=e,c=zT(e.gradients)?(0,r.createElement)(FT,{headingLevel:i,...l}):(0,r.createElement)(LT,{...l});let d;if(t)d={asButtons:!0};else{const e={asButtons:!1,loop:n};d=a?{...e,"aria-label":a}:s?{...e,"aria-labelledby":s}:{...e,"aria-label":(0,u.__)("Custom color picker.")}}return(0,r.createElement)(BS,{...d,actions:o,options:c})}const jT=function({className:e,gradients:t=[],onChange:n,value:o,clearable:i=!0,disableCustomGradients:a=!1,__experimentalIsRenderedInSidebar:s,headingLevel:l=2,...c}){const d=(0,Uo.useCallback)((()=>n(void 0)),[n]);return(0,r.createElement)(jS,{spacing:t.length?4:0},!a&&(0,r.createElement)(OT,{__experimentalIsRenderedInSidebar:s,value:o,onChange:n}),(t.length>0||i)&&(0,r.createElement)(BT,{...c,className:e,clearGradient:d,gradients:t,onChange:n,value:o,actions:i&&!a&&(0,r.createElement)(BS.ButtonAction,{onClick:d},(0,u.__)("Clear")),headingLevel:l}))},VT=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"})),HT=window.wp.dom,$T=()=>{},WT=["menuitem","menuitemradio","menuitemcheckbox"];class UT extends Uo.Component{constructor(e){super(e),this.onKeyDown=this.onKeyDown.bind(this),this.bindContainer=this.bindContainer.bind(this),this.getFocusableContext=this.getFocusableContext.bind(this),this.getFocusableIndex=this.getFocusableIndex.bind(this)}componentDidMount(){this.container&&this.container.addEventListener("keydown",this.onKeyDown)}componentWillUnmount(){this.container&&this.container.removeEventListener("keydown",this.onKeyDown)}bindContainer(e){const{forwardedRef:t}=this.props;this.container=e,"function"==typeof t?t(e):t&&"current"in t&&(t.current=e)}getFocusableContext(e){if(!this.container)return null;const{onlyBrowserTabstops:t}=this.props,n=(t?HT.focus.tabbable:HT.focus.focusable).find(this.container),r=this.getFocusableIndex(n,e);return r>-1&&e?{index:r,target:e,focusables:n}:null}getFocusableIndex(e,t){return e.indexOf(t)}onKeyDown(e){this.props.onKeyDown&&this.props.onKeyDown(e);const{getFocusableContext:t}=this,{cycle:n=!0,eventToOffset:r,onNavigate:o=$T,stopNavigationEvents:i}=this.props,a=r(e);if(void 0!==a&&i){e.stopImmediatePropagation();const t=e.target?.getAttribute("role");!!t&&WT.includes(t)&&e.preventDefault()}if(!a)return;const s=e.target?.ownerDocument?.activeElement;if(!s)return;const l=t(s);if(!l)return;const{index:c,focusables:u}=l,d=n?function(e,t,n){const r=e+n;return r<0?t+r:r>=t?r-t:r}(c,u.length,a):c+a;d>=0&&d<u.length&&(u[d].focus(),o(d,u[d]),"Tab"===e.code&&e.preventDefault())}render(){const{children:e,stopNavigationEvents:t,eventToOffset:n,onNavigate:o,onKeyDown:i,cycle:a,onlyBrowserTabstops:s,forwardedRef:l,...c}=this.props;return(0,r.createElement)("div",{ref:this.bindContainer,...c},e)}}const GT=(e,t)=>(0,r.createElement)(UT,{...e,forwardedRef:t});GT.displayName="NavigableContainer";const qT=(0,Uo.forwardRef)(GT);const YT=(0,Uo.forwardRef)((function({role:e="menu",orientation:t="vertical",...n},o){return(0,r.createElement)(qT,{ref:o,stopNavigationEvents:!0,onlyBrowserTabstops:!1,role:e,"aria-orientation":"presentation"===e||"vertical"!==t&&"horizontal"!==t?void 0:t,eventToOffset:e=>{const{code:n}=e;let r=["ArrowDown"],o=["ArrowUp"];return"horizontal"===t&&(r=["ArrowRight"],o=["ArrowLeft"]),"both"===t&&(r=["ArrowRight","ArrowDown"],o=["ArrowLeft","ArrowUp"]),r.includes(n)?1:o.includes(n)?-1:["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(n)?0:void 0},...n})})),KT=YT;function XT(e={},t={}){const n={...e,...t};return t.className&&e.className&&(n.className=c()(t.className,e.className)),n}function ZT(e){return"function"==typeof e}const JT=is((function(e){const{children:t,className:n,controls:o,icon:i=VT,label:a,popoverProps:s,toggleProps:l,menuProps:u,disableOpenOnArrowDown:d=!1,text:f,noIcons:m,open:p,defaultOpen:h,onToggle:g,variant:v}=rs(e,"DropdownMenu");if(!o?.length&&!ZT(t))return null;let b;o?.length&&(b=o,Array.isArray(b[0])||(b=[o]));const y=XT({className:"components-dropdown-menu__popover",variant:v},s);return(0,r.createElement)(FE,{className:n,popoverProps:y,renderToggle:({isOpen:e,onToggle:t})=>{var n;const{as:o=my,...s}=null!=l?l:{},u=XT({className:c()("components-dropdown-menu__toggle",{"is-opened":e})},s);return(0,r.createElement)(o,{...u,icon:i,onClick:e=>{t(),u.onClick&&u.onClick(e)},onKeyDown:n=>{(n=>{d||e||"ArrowDown"!==n.code||(n.preventDefault(),t())})(n),u.onKeyDown&&u.onKeyDown(n)},"aria-haspopup":"true","aria-expanded":e,label:a,text:f,showTooltip:null===(n=l?.showTooltip)||void 0===n||n},u.children)},renderContent:e=>{const n=XT({"aria-label":a,className:c()("components-dropdown-menu__menu",{"no-icons":m})},u);return(0,r.createElement)(KT,{...n,role:"menu"},ZT(t)?t(e):null,b?.flatMap(((t,n)=>t.map(((t,o)=>(0,r.createElement)(my,{key:[n,o].join(),onClick:n=>{n.stopPropagation(),e.onClose(),t.onClick&&t.onClick()},className:c()("components-dropdown-menu__menu-item",{"has-separator":n>0&&0===o,"is-active":t.isActive,"is-icon-only":!t.title}),icon:t.icon,label:t.label,"aria-checked":"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.isActive:void 0,role:"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.role:"menuitem",disabled:t.isDisabled},t.title))))))},open:p,defaultOpen:h,onToggle:g})}),"DropdownMenu"),QT=JT;const eI=bs(DE,{target:"e1lpqc909"})("&&{flex-shrink:0;width:",Ah(6),";height:",Ah(6),";}"),tI=bs(ly,{target:"e1lpqc908"})(yv,"{background:",Ds.gray[100],";border-radius:",Xg.controlBorderRadius,";",Ev,Ev,Ev,Ev,"{height:",Ah(8),";}",kv,kv,kv,"{border-color:transparent;box-shadow:none;}}"),nI=({as:e})=>"button"===e?Ps("display:flex;align-items:center;width:100%;appearance:none;background:transparent;border:none;border-radius:0;padding:0;cursor:pointer;&:hover{color:",Ds.theme.accent,";}",""):null,rI=bs(xs,{target:"e1lpqc907"})(nI," padding-block:3px;padding-inline-start:",Ah(3),";border:1px solid ",Xg.surfaceBorderColor,";border-bottom-color:transparent;font-size:",Yb("default.fontSize"),";&:focus-visible{border-color:transparent;box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ",Ds.theme.accent,";outline:2px solid transparent;outline-offset:0;}border-top-left-radius:",Xg.controlBorderRadius,";border-top-right-radius:",Xg.controlBorderRadius,";&+&{border-top-left-radius:0;border-top-right-radius:0;}&:last-child{border-bottom-left-radius:",Xg.controlBorderRadius,";border-bottom-right-radius:",Xg.controlBorderRadius,";border-bottom-color:",Xg.surfaceBorderColor,";}&.is-selected+&{border-top-color:transparent;}&.is-selected{border-color:",Ds.theme.accent,";}"),oI=bs("div",{target:"e1lpqc906"})("line-height:",Ah(8),";margin-left:",Ah(2),";margin-right:",Ah(2),";white-space:nowrap;overflow:hidden;"),iI=bs($S,{target:"e1lpqc905"})("text-transform:uppercase;line-height:",Ah(6),";font-weight:500;&&&{font-size:11px;margin-bottom:0;}"),aI=bs(xs,{target:"e1lpqc904"})("height:",Ah(6),";display:flex;"),sI=bs(Py,{target:"e1lpqc903"})("margin-bottom:",Ah(2),";"),lI=bs(xs,{target:"e1lpqc902"})({name:"u6wnko",styles:"&&&{.components-button.has-icon{min-width:0;padding:0;}}"}),cI=bs(my,{target:"e1lpqc901"})("&&{color:",Ds.theme.accent,";}"),uI=bs(my,{target:"e1lpqc900"})("&&{margin-top:",Ah(1),";}");function dI({value:e,onChange:t,label:n}){return(0,r.createElement)(tI,{label:n,hideLabelFromVision:!0,value:e,onChange:t})}function fI({isGradient:e,element:t,onChange:n,popoverProps:o,onClose:i=(()=>{})}){const a=(0,Uo.useMemo)((()=>({shift:!0,offset:20,resize:!1,placement:"left-start",...o,className:c()("components-palette-edit__popover",o?.className)})),[o]);return(0,r.createElement)(bw,{...a,onClose:i},!e&&(0,r.createElement)(MS,{color:t.color,enableAlpha:!0,onChange:e=>{n({...t,color:e})}}),e&&(0,r.createElement)("div",{className:"components-palette-edit__popover-gradient-picker"},(0,r.createElement)(OT,{__experimentalIsRenderedInSidebar:!0,value:t.gradient,onChange:e=>{n({...t,gradient:e})}})))}function mI({canOnlyChangeValues:e,element:t,onChange:n,isEditing:o,onStartEditing:i,onRemove:a,onStopEditing:s,popoverProps:l,slugPrefix:c,isGradient:f}){const m=(0,d.__experimentalUseFocusOutside)(s),p=f?t.gradient:t.color,[h,g]=(0,Uo.useState)(null),v=(0,Uo.useMemo)((()=>({...l,anchor:h})),[h,l]);return(0,r.createElement)(rI,{className:o?"is-selected":void 0,as:o?"div":"button",onClick:i,"aria-label":o?void 0:(0,u.sprintf)((0,u.__)("Edit: %s"),t.name.trim().length?t.name:p),ref:g,...o?{...m}:{}},(0,r.createElement)(Py,{justify:"flex-start"},(0,r.createElement)(eI,{colorValue:p}),(0,r.createElement)(og,null,o&&!e?(0,r.createElement)(dI,{label:f?(0,u.__)("Gradient name"):(0,u.__)("Color name"),value:t.name,onChange:e=>n({...t,name:e,slug:c+Wy(null!=e?e:"")})}):(0,r.createElement)(oI,null,t.name.trim().length?t.name:" ")),o&&!e&&(0,r.createElement)(og,null,(0,r.createElement)(uI,{size:"small",icon:Lw,label:(0,u.__)("Remove color"),onClick:a}))),o&&(0,r.createElement)(fI,{isGradient:f,onChange:n,element:t,popoverProps:v}))}function pI({elements:e,onChange:t,editingElement:n,setEditingElement:o,canOnlyChangeValues:i,slugPrefix:a,isGradient:s,popoverProps:l}){const c=(0,Uo.useRef)();(0,Uo.useEffect)((()=>{c.current=e}),[e]);const u=(0,d.useDebounce)(t,100);return(0,r.createElement)(jS,{spacing:3},(0,r.createElement)(aT,{isRounded:!0},e.map(((c,d)=>(0,r.createElement)(mI,{isGradient:s,canOnlyChangeValues:i,key:d,element:c,onStartEditing:()=>{n!==d&&o(d)},onChange:t=>{u(e.map(((e,n)=>n===d?t:e)))},onRemove:()=>{o(null);const n=e.filter(((e,t)=>t!==d));t(n.length?n:void 0)},isEditing:d===n,onStopEditing:()=>{d===n&&o(null)},slugPrefix:a,popoverProps:l})))))}const hI=[];const gI=function({gradients:e,colors:t=hI,onChange:n,paletteLabel:o,paletteLabelHeadingLevel:i=2,emptyMessage:a,canOnlyChangeValues:s,canReset:l,slugPrefix:c="",popoverProps:f}){const m=!!e,p=m?e:t,[h,g]=(0,Uo.useState)(!1),[v,b]=(0,Uo.useState)(null),y=h&&!!v&&p[v]&&!p[v].slug,x=p.length>0,w=(0,d.useDebounce)(n,100),E=(0,Uo.useCallback)(((e,t)=>{const n=void 0===t?void 0:p[t];n&&n[m?"gradient":"color"]===e?b(t):g(!0)}),[m,p]);return(0,r.createElement)(lI,null,(0,r.createElement)(sI,null,(0,r.createElement)(iI,{level:i},o),(0,r.createElement)(aI,null,x&&h&&(0,r.createElement)(cI,{size:"small",onClick:()=>{g(!1),b(null)}},(0,u.__)("Done")),!s&&(0,r.createElement)(my,{size:"small",isPressed:y,icon:ng,label:m?(0,u.__)("Add gradient"):(0,u.__)("Add color"),onClick:()=>{const r=function(e,t){const n=new RegExp(`^${t}color-([\\d]+)$`),r=e.reduce(((e,t)=>{if("string"==typeof t?.slug){const r=t?.slug.match(n);if(r){const t=parseInt(r[1],10);if(t>=e)return t+1}}return e}),1);return(0,u.sprintf)((0,u.__)("Color %s"),r)}(p,c);n(e?[...e,{gradient:_T,name:r,slug:c+Wy(r)}]:[...t,{color:"#000",name:r,slug:c+Wy(r)}]),g(!0),b(p.length)}}),x&&(!h||!s||l)&&(0,r.createElement)(QT,{icon:WP,label:m?(0,u.__)("Gradient options"):(0,u.__)("Color options"),toggleProps:{isSmall:!0}},(({onClose:e})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(KT,{role:"menu"},!h&&(0,r.createElement)(my,{variant:"tertiary",onClick:()=>{g(!0),e()},className:"components-palette-edit__menu-button"},(0,u.__)("Show details")),!s&&(0,r.createElement)(my,{variant:"tertiary",onClick:()=>{b(null),g(!1),n(),e()},className:"components-palette-edit__menu-button"},m?(0,u.__)("Remove all gradients"):(0,u.__)("Remove all colors")),l&&(0,r.createElement)(my,{variant:"tertiary",onClick:()=>{b(null),n(),e()}},m?(0,u.__)("Reset gradient"):(0,u.__)("Reset colors")))))))),x&&(0,r.createElement)(r.Fragment,null,h&&(0,r.createElement)(pI,{canOnlyChangeValues:s,elements:p,onChange:n,editingElement:v,setEditingElement:b,slugPrefix:c,isGradient:m,popoverProps:f}),!h&&null!==v&&(0,r.createElement)(fI,{isGradient:m,onClose:()=>b(null),onChange:e=>{w(p.map(((t,n)=>n===v?e:t)))},element:p[null!=v?v:-1],popoverProps:f}),!h&&(m?(0,r.createElement)(jT,{gradients:e,onChange:E,clearable:!1,disableCustomGradients:!0}):(0,r.createElement)(JS,{colors:t,onChange:E,clearable:!1,disableCustomColors:!0}))),!x&&a)},vI=({__next40pxDefaultSize:e})=>!e&&Ps("height:28px;padding-left:",Ah(1),";padding-right:",Ah(1),";",""),bI=bs($h,{target:"evuatpg0"})("height:38px;padding-left:",Ah(2),";padding-right:",Ah(2),";",vI,";");const yI=(0,Uo.forwardRef)((function(e,t){const{value:n,isExpanded:o,instanceId:i,selectedSuggestionIndex:a,className:s,onChange:l,onFocus:u,onBlur:d,...f}=e,[m,p]=(0,Uo.useState)(!1),h=n?n.length+1:0;return(0,r.createElement)("input",{ref:t,id:`components-form-token-input-${i}`,type:"text",...f,value:n||"",onChange:e=>{l&&l({value:e.target.value})},onFocus:e=>{p(!0),u?.(e)},onBlur:e=>{p(!1),d?.(e)},size:h,className:c()(s,"components-form-token-field__input"),autoComplete:"off",role:"combobox","aria-expanded":o,"aria-autocomplete":"list","aria-owns":o?`components-form-token-suggestions-${i}`:void 0,"aria-activedescendant":m&&-1!==a&&o?`components-form-token-suggestions-${i}-${a}`:void 0,"aria-describedby":`components-form-token-suggestions-howto-${i}`})})),xI=yI;var wI=o(5428),EI=o.n(wI);const _I=e=>{e.preventDefault()};const SI=function({selectedIndex:e,scrollIntoView:t,match:n,onHover:o,onSelect:i,suggestions:a=[],displayTransform:s,instanceId:l,__experimentalRenderItem:u}){const[f,m]=(0,Uo.useState)(!1),p=(0,d.useRefEffect)((n=>{let r;return e>-1&&t&&n.children[e]&&(m(!0),EI()(n.children[e],n,{onlyScrollIfNeeded:!0}),r=requestAnimationFrame((()=>{m(!1)}))),()=>{void 0!==r&&cancelAnimationFrame(r)}}),[e,t]),h=e=>()=>{f||o?.(e)},g=e=>()=>{i?.(e)};return(0,r.createElement)("ul",{ref:p,className:"components-form-token-field__suggestions-list",id:`components-form-token-suggestions-${l}`,role:"listbox"},a.map(((t,o)=>{const i=(e=>{const t=s(n).toLocaleLowerCase();if(0===t.length)return null;const r=s(e),o=r.toLocaleLowerCase().indexOf(t);return{suggestionBeforeMatch:r.substring(0,o),suggestionMatch:r.substring(o,o+t.length),suggestionAfterMatch:r.substring(o+t.length)}})(t),a=c()("components-form-token-field__suggestion",{"is-selected":o===e});let d;return d="function"==typeof u?u({item:t}):i?(0,r.createElement)("span",{"aria-label":s(t)},i.suggestionBeforeMatch,(0,r.createElement)("strong",{className:"components-form-token-field__suggestion-match"},i.suggestionMatch),i.suggestionAfterMatch):s(t),(0,r.createElement)("li",{id:`components-form-token-suggestions-${l}-${o}`,role:"option",className:a,key:"object"==typeof t&&"value"in t?t?.value:s(t),onMouseDown:_I,onClick:g(t),onMouseEnter:h(t),"aria-selected":o===e},d)})))},CI=(0,d.createHigherOrderComponent)((e=>t=>{const[n,o]=(0,Uo.useState)(void 0),i=(0,Uo.useCallback)((e=>o((()=>e?.handleFocusOutside?e.handleFocusOutside.bind(e):void 0))),[]);return(0,r.createElement)("div",{...(0,d.__experimentalUseFocusOutside)(n)},(0,r.createElement)(e,{ref:i,...t}))}),"withFocusOutside"),kI=()=>{},PI=CI(class extends Uo.Component{handleFocusOutside(e){this.props.onFocusOutside(e)}render(){return this.props.children}}),TI=(e,t)=>null===e?-1:t.indexOf(e);const II=function e(t){var n;const{__nextHasNoMarginBottom:o=!1,__next40pxDefaultSize:i=!1,value:a,label:s,options:l,onChange:f,onFilterValueChange:m=kI,hideLabelFromVision:p,help:h,allowReset:g=!0,className:v,messages:b={selected:(0,u.__)("Item selected.")},__experimentalRenderItem:y}=Nv(t),[x,w]=cE({value:a,onChange:f}),E=l.find((e=>e.value===x)),_=null!==(n=E?.label)&&void 0!==n?n:"",S=(0,d.useInstanceId)(e,"combobox-control"),[C,k]=(0,Uo.useState)(E||null),[P,T]=(0,Uo.useState)(!1),[I,R]=(0,Uo.useState)(!1),[M,N]=(0,Uo.useState)(""),D=(0,Uo.useRef)(null),A=(0,Uo.useMemo)((()=>{const e=[],t=[],n=$y(M);return l.forEach((r=>{const o=$y(r.label).indexOf(n);0===o?e.push(r):o>0&&t.push(r)})),e.concat(t)}),[M,l]),O=e=>{w(e.value),(0,jy.speak)(b.selected,"assertive"),k(e),N(""),T(!1)},z=(e=1)=>{let t=TI(C,A)+e;t<0?t=A.length-1:t>=A.length&&(t=0),k(A[t]),T(!0)};return(0,Uo.useEffect)((()=>{const e=A.length>0,t=TI(C,A)>0;e&&!t&&k(A[0])}),[A,C]),(0,Uo.useEffect)((()=>{const e=A.length>0;if(P){const t=e?(0,u.sprintf)((0,u._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",A.length),A.length):(0,u.__)("No results.");(0,jy.speak)(t,"polite")}}),[A,P]),(0,r.createElement)(PI,{onFocusOutside:()=>{T(!1)}},(0,r.createElement)(iy,{__nextHasNoMarginBottom:o,className:c()(v,"components-combobox-control"),label:s,id:`components-form-token-input-${S}`,hideLabelFromVision:p,help:h},(0,r.createElement)("div",{className:"components-combobox-control__suggestions-container",tabIndex:-1,onKeyDown:e=>{let t=!1;if(!e.defaultPrevented&&!e.nativeEvent.isComposing&&229!==e.keyCode){switch(e.code){case"Enter":C&&(O(C),t=!0);break;case"ArrowUp":z(-1),t=!0;break;case"ArrowDown":z(1),t=!0;break;case"Escape":T(!1),k(null),t=!0}t&&e.preventDefault()}}},(0,r.createElement)(bI,{__next40pxDefaultSize:i},(0,r.createElement)(Uh,null,(0,r.createElement)(xI,{className:"components-combobox-control__input",instanceId:S,ref:D,value:P?M:_,onFocus:()=>{R(!0),T(!0),m(""),N("")},onBlur:()=>{R(!1)},isExpanded:P,selectedSuggestionIndex:TI(C,A),onChange:e=>{const t=e.value;N(t),m(t),I&&T(!0)}})),g&&(0,r.createElement)(og,null,(0,r.createElement)(my,{className:"components-combobox-control__reset",icon:zw,disabled:!x,onClick:()=>{w(null),D.current?.focus()},label:(0,u.__)("Reset")}))),P&&(0,r.createElement)(SI,{instanceId:S,match:{label:M,value:""},displayTransform:e=>e.label,suggestions:A,selectedIndex:TI(C,A),onHover:k,onSelect:O,scrollIntoView:!0,__experimentalRenderItem:y}))))};var RI=(0,r.createContext)(void 0),MI=Ve((e=>{const[t,n]=(0,r.useState)();return e=Te(e,(e=>(0,Le.jsx)(RI.Provider,{value:n,children:e})),[]),e=x({role:"group","aria-labelledby":t},e)}));Fe((e=>je("div",MI(e))));var NI=Ve((e=>{var t=e,{store:n}=t,r=E(t,["store"]);return r=MI(r)})),DI=Fe((e=>je("div",NI(e))));function AI(e){if(e.state){const{state:t,...n}=e,{store:r,...o}=AI(t);return{...n,...o,store:r}}return e}function OI(e,t={}){const n=e.displayName,o=n=>{const{store:o,...i}=AI(n),a=i;return a.id=(0,d.useInstanceId)(o,a.baseId,a.id),Object.entries(t).forEach((([e,t])=>{a.hasOwnProperty(e)&&(Object.assign(a,{[t]:a[e]}),delete a[e])})),delete a.baseId,(0,r.createElement)(e,{...a,store:o})};return o.displayName=n,o}const zI=(0,Uo.forwardRef)((({role:e,...t},n)=>{const o="row"===e?ll:DI;return(0,r.createElement)(o,{ref:n,role:e,...t})}));zI.displayName="CompositeGroup";const LI=OI(al,{baseId:"id"}),FI=OI(zI),BI=OI(qt,{focusable:"accessibleWhenDisabled"});function jI(e={}){const{baseId:t,currentId:n,orientation:r,rtl:o=!1,loop:i=!1,wrap:a=!1,shift:s=!1,unstable_virtual:l}=e;return{baseId:(0,d.useInstanceId)(LI,"composite",t),store:rl({defaultActiveId:n,rtl:o,orientation:r,focusLoop:i,focusShift:s,focusWrap:a,virtualFocus:l})}}const VI=new Set(["alert","status","log","marquee","timer"]),HI=[];function $I(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||t&&VI.has(t))}const WI=(0,Uo.createContext)([]),UI=new Map;const GI=(0,Uo.forwardRef)((function(e,t){const{bodyOpenClassName:n="modal-open",role:o="dialog",title:i=null,focusOnMount:a=!0,shouldCloseOnEsc:s=!0,shouldCloseOnClickOutside:l=!0,isDismissible:f=!0,aria:m={labelledby:void 0,describedby:void 0},onRequestClose:p,icon:h,closeButtonLabel:g,children:v,style:b,overlayClassName:y,className:x,contentLabel:w,onKeyDown:E,isFullScreen:_=!1,size:S,headerActions:C=null,__experimentalHideHeader:k=!1}=e,P=(0,Uo.useRef)(),T=(0,d.useInstanceId)(GI),I=i?`components-modal-header-${T}`:m.labelledby,R=(0,d.useFocusOnMount)("firstContentElement"===a?"firstElement":a),M=(0,d.useConstrainedTabbing)(),N=(0,d.useFocusReturn)(),D=(0,Uo.useRef)(null),A=(0,Uo.useRef)(null),[O,z]=(0,Uo.useState)(!1),[L,F]=(0,Uo.useState)(!1);let B;_||"fill"===S?B="is-full-screen":S&&(B=`has-size-${S}`);const j=(0,Uo.useCallback)((()=>{if(!D.current)return;const e=(0,HT.getScrollContainer)(D.current);D.current===e?F(!0):F(!1)}),[D]);(0,Uo.useEffect)((()=>(function(e){const t=Array.from(document.body.children),n=[];HI.push(n);for(const r of t)r!==e&&$I(r)&&(r.setAttribute("aria-hidden","true"),n.push(r))}(P.current),()=>function(){const e=HI.pop();if(e)for(const t of e)t.removeAttribute("aria-hidden")}())),[]);const V=(0,Uo.useRef)();(0,Uo.useEffect)((()=>{V.current=p}),[p]);const H=(0,Uo.useContext)(WI),$=(0,Uo.useRef)([]);(0,Uo.useEffect)((()=>{H.push(V);const[e,t]=H;t&&e?.current?.();const n=$.current;return()=>{n[0]?.current?.(),H.shift()}}),[H]),(0,Uo.useEffect)((()=>{var e;const t=n,r=1+(null!==(e=UI.get(t))&&void 0!==e?e:0);return UI.set(t,r),document.body.classList.add(n),()=>{const e=UI.get(t)-1;0===e?(document.body.classList.remove(t),UI.delete(t)):UI.set(t,e)}}),[n]),(0,Uo.useLayoutEffect)((()=>{if(!window.ResizeObserver||!A.current)return;const e=new ResizeObserver(j);return e.observe(A.current),j(),()=>{e.disconnect()}}),[j,A]);const W=(0,Uo.useCallback)((e=>{var t;const n=null!==(t=e?.currentTarget?.scrollTop)&&void 0!==t?t:-1;!O&&n>0?z(!0):O&&n<=0&&z(!1)}),[O]);let U=null;const G={onPointerDown:e=>{e.target===e.currentTarget&&(U=e.target,e.preventDefault())},onPointerUp:({target:e,button:t})=>{const n=e===U;U=null,0===t&&n&&p()}},q=(0,r.createElement)("div",{ref:(0,d.useMergeRefs)([P,t]),className:c()("components-modal__screen-overlay",y),onKeyDown:function(e){e.nativeEvent.isComposing||229===e.keyCode||!s||"Escape"!==e.code&&"Escape"!==e.key||e.defaultPrevented||(e.preventDefault(),p&&p(e))},...l?G:{}},(0,r.createElement)(ew,{document},(0,r.createElement)("div",{className:c()("components-modal__frame",B,x),style:b,ref:(0,d.useMergeRefs)([M,N,"firstContentElement"!==a?R:null]),role:o,"aria-label":w,"aria-labelledby":w?void 0:I,"aria-describedby":m.describedby,tabIndex:-1,onKeyDown:E},(0,r.createElement)("div",{className:c()("components-modal__content",{"hide-header":k,"is-scrollable":L,"has-scrolled-content":O}),role:"document",onScroll:W,ref:D,"aria-label":L?(0,u.__)("Scrollable section"):void 0,tabIndex:L?0:void 0},!k&&(0,r.createElement)("div",{className:"components-modal__header"},(0,r.createElement)("div",{className:"components-modal__header-heading-container"},h&&(0,r.createElement)("span",{className:"components-modal__icon-container","aria-hidden":!0},h),i&&(0,r.createElement)("h1",{id:I,className:"components-modal__header-heading"},i)),C,f&&(0,r.createElement)(my,{onClick:p,icon:ex,label:g||(0,u.__)("Close")})),(0,r.createElement)("div",{ref:(0,d.useMergeRefs)([A,"firstContentElement"===a?R:null])},v)))));return(0,Uo.createPortal)((0,r.createElement)(WI.Provider,{value:$.current},q),document.body)})),qI=GI;const YI={name:"7g5ii0",styles:"&&{z-index:1000001;}"},KI=os(((e,t)=>{const{isOpen:n,onConfirm:o,onCancel:i,children:a,confirmButtonText:s,cancelButtonText:l,...c}=rs(e,"ConfirmDialog"),d=ns()(YI),f=(0,Uo.useRef)(),m=(0,Uo.useRef)(),[p,h]=(0,Uo.useState)(),[g,v]=(0,Uo.useState)();(0,Uo.useEffect)((()=>{const e=void 0!==n;h(!e||n),v(!e)}),[n]);const b=(0,Uo.useCallback)((e=>t=>{e?.(t),g&&h(!1)}),[g,h]),y=(0,Uo.useCallback)((e=>{e.target===f.current||e.target===m.current||"Enter"!==e.key||b(o)(e)}),[b,o]),x=null!=l?l:(0,u.__)("Cancel"),w=null!=s?s:(0,u.__)("OK");return(0,r.createElement)(r.Fragment,null,p&&(0,r.createElement)(qI,{onRequestClose:b(i),onKeyDown:y,closeButtonLabel:x,isDismissible:!0,ref:t,overlayClassName:d,__experimentalHideHeader:!0,...c},(0,r.createElement)(jS,{spacing:8},(0,r.createElement)(mv,null,a),(0,r.createElement)($h,{direction:"row",justify:"flex-end"},(0,r.createElement)(my,{__next40pxDefaultSize:!0,ref:f,variant:"tertiary",onClick:b(i)},x),(0,r.createElement)(my,{__next40pxDefaultSize:!0,ref:m,variant:"primary",onClick:b(o)},w)))))}),"ConfirmDialog");var XI=o(5826),ZI=o.n(XI);o(1915);function JI(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function QI(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function eR(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return QI(n.overflowY,t)||QI(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function tR(e,t,n,r,o,i,a,s){return i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0}let nR=0;function rR(){}function oR(e,t){if(!e)return;const n=function(e,t){var n=window,r=t.scrollMode,o=t.block,i=t.inline,a=t.boundary,s=t.skipOverflowHiddenElements,l="function"==typeof a?a:function(e){return e!==a};if(!JI(e))throw new TypeError("Invalid target");for(var c,u,d=document.scrollingElement||document.documentElement,f=[],m=e;JI(m)&&l(m);){if((m=null==(u=(c=m).parentElement)?c.getRootNode().host||null:u)===d){f.push(m);break}null!=m&&m===document.body&&eR(m)&&!eR(document.documentElement)||null!=m&&eR(m,s)&&f.push(m)}for(var p=n.visualViewport?n.visualViewport.width:innerWidth,h=n.visualViewport?n.visualViewport.height:innerHeight,g=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),y=b.height,x=b.width,w=b.top,E=b.right,_=b.bottom,S=b.left,C="start"===o||"nearest"===o?w:"end"===o?_:w+y/2,k="center"===i?S+x/2:"end"===i?E:S,P=[],T=0;T<f.length;T++){var I=f[T],R=I.getBoundingClientRect(),M=R.height,N=R.width,D=R.top,A=R.right,O=R.bottom,z=R.left;if("if-needed"===r&&w>=0&&S>=0&&_<=h&&E<=p&&w>=D&&_<=O&&S>=z&&E<=A)return P;var L=getComputedStyle(I),F=parseInt(L.borderLeftWidth,10),B=parseInt(L.borderTopWidth,10),j=parseInt(L.borderRightWidth,10),V=parseInt(L.borderBottomWidth,10),H=0,$=0,W="offsetWidth"in I?I.offsetWidth-I.clientWidth-F-j:0,U="offsetHeight"in I?I.offsetHeight-I.clientHeight-B-V:0,G="offsetWidth"in I?0===I.offsetWidth?0:N/I.offsetWidth:0,q="offsetHeight"in I?0===I.offsetHeight?0:M/I.offsetHeight:0;if(d===I)H="start"===o?C:"end"===o?C-h:"nearest"===o?tR(v,v+h,h,B,V,v+C,v+C+y,y):C-h/2,$="start"===i?k:"center"===i?k-p/2:"end"===i?k-p:tR(g,g+p,p,F,j,g+k,g+k+x,x),H=Math.max(0,H+v),$=Math.max(0,$+g);else{H="start"===o?C-D-B:"end"===o?C-O+V+U:"nearest"===o?tR(D,O,M,B,V+U,C,C+y,y):C-(D+M/2)+U/2,$="start"===i?k-z-F:"center"===i?k-(z+N/2)+W/2:"end"===i?k-A+j+W:tR(z,A,N,F,j+W,k,k+x,x);var Y=I.scrollLeft,K=I.scrollTop;C+=K-(H=Math.max(0,Math.min(K+H/q,I.scrollHeight-M/q+U))),k+=Y-($=Math.max(0,Math.min(Y+$/G,I.scrollWidth-N/G+W)))}P.push({el:I,top:H,left:$})}return P}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach((e=>{let{el:t,top:n,left:r}=e;t.scrollTop=n,t.scrollLeft=r}))}function iR(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function aR(e,t){let n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];r(),n=setTimeout((()=>{n=null,e(...i)}),t)}return o.cancel=r,o}function sR(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((t=>(t&&t(e,...r),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault)))}}function lR(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach((t=>{"function"==typeof t?t(e):t&&(t.current=e)}))}}function cR(){return String(nR++)}function uR(e){let{isOpen:t,resultCount:n,previousResultCount:r}=e;return t?n?n!==r?`${n} result${1===n?" is":"s are"} available, use up and down arrow keys to navigate. Press Enter key to select.`:"":"No results are available.":""}function dR(e,t){return Object.keys(e).reduce(((n,r)=>(n[r]=fR(t,r)?t[r]:e[r],n)),{})}function fR(e,t){return void 0!==e[t]}function mR(e){const{key:t,keyCode:n}=e;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?`Arrow${t}`:t}function pR(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;const i=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);let a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);const s=hR(e,a,n,r,o);return-1===s?t>=n?-1:t:s}function hR(e,t,n,r,o){const i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(let e=t+1;e<n;e++)if(!r(e).hasAttribute("disabled"))return e}else for(let e=t-1;e>=0;e--)if(!r(e).hasAttribute("disabled"))return e;return o?e>0?hR(1,0,n,r,!1):hR(-1,n-1,n,r,!1):-1}function gR(e,t,n,r){return void 0===r&&(r=!0),t.some((t=>t&&(iR(t,e,n)||r&&iR(t,n.document.activeElement,n))))}const vR=aR((e=>{yR(e).textContent=""}),500);function bR(e,t){const n=yR(t);e&&(n.textContent=e,vR(t))}function yR(e){void 0===e&&(e=document);let t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}const xR={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function wR(e,t,n){const{props:r,type:o}=e,i={};Object.keys(t).forEach((r=>{!function(e,t,n,r){const{props:o,type:i}=t,a=`on${PR(e)}Change`;o[a]&&void 0!==r[e]&&r[e]!==n[e]&&o[a]({type:i,...r})}(r,e,t,n),n[r]!==t[r]&&(i[r]=n[r])})),r.onStateChange&&Object.keys(i).length&&r.onStateChange({type:o,...i})}const ER=aR(((e,t)=>{bR(e(),t)}),200),_R="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect;function SR(e){let{id:t=`downshift-${cR()}`,labelId:n,menuId:o,getItemId:i,toggleButtonId:a,inputId:s}=e;const l=(0,r.useRef)({labelId:n||`${t}-label`,menuId:o||`${t}-menu`,getItemId:i||(e=>`${t}-item-${e}`),toggleButtonId:a||`${t}-toggle-button`,inputId:s||`${t}-input`});return l.current}function CR(e,t,n){return void 0!==e?e:0===n.length?-1:n.indexOf(t)}function kR(e){return/^\S{1}$/.test(e)}function PR(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function TR(e){const t=(0,r.useRef)(e);return t.current=e,t}function IR(e,t,n){const o=(0,r.useRef)(),i=(0,r.useRef)(),a=(0,r.useCallback)(((t,n)=>{i.current=n,t=dR(t,n.props);const r=e(t,n);return n.props.stateReducer(t,{...n,changes:r})}),[e]),[s,l]=(0,r.useReducer)(a,t),c=TR(n),u=(0,r.useCallback)((e=>l({props:c.current,...e})),[c]),d=i.current;return(0,r.useEffect)((()=>{d&&o.current&&o.current!==s&&wR(d,dR(o.current,d.props),s),o.current=s}),[s,n,d]),[s,u]}function RR(e,t,n){const[r,o]=IR(e,t,n);return[dR(r,n),o]}const MR={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){const{selectedItem:t,itemToString:n}=e;return t?`${n(t)} has been selected.`:""},scrollIntoView:oR,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};function NR(e,t,n){void 0===n&&(n=xR);const r=e[`default${PR(t)}`];return void 0!==r?r:n[t]}function DR(e,t,n){void 0===n&&(n=xR);const r=e[t];if(void 0!==r)return r;const o=e[`initial${PR(t)}`];return void 0!==o?o:NR(e,t,n)}function AR(e){const t=DR(e,"selectedItem"),n=DR(e,"isOpen"),r=DR(e,"highlightedIndex"),o=DR(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:o}}function OR(e,t,n,r){const{items:o,initialHighlightedIndex:i,defaultHighlightedIndex:a}=e,{selectedItem:s,highlightedIndex:l}=t;return 0===o.length?-1:void 0!==i&&l===i?i:void 0!==a?a:s?0===n?o.indexOf(s):pR(n,o.indexOf(s),o.length,r,!1):0===n?-1:n<0?o.length-1:0}function zR(e,t,n,o){const i=(0,r.useRef)({isMouseDown:!1,isTouchMove:!1});return(0,r.useEffect)((()=>{const r=()=>{i.current.isMouseDown=!0},a=r=>{i.current.isMouseDown=!1,e&&!gR(r.target,t.map((e=>e.current)),n)&&o()},s=()=>{i.current.isTouchMove=!1},l=()=>{i.current.isTouchMove=!0},c=r=>{!e||i.current.isTouchMove||gR(r.target,t.map((e=>e.current)),n,!1)||o()};return n.addEventListener("mousedown",r),n.addEventListener("mouseup",a),n.addEventListener("touchstart",s),n.addEventListener("touchmove",l),n.addEventListener("touchend",c),function(){n.removeEventListener("mousedown",r),n.removeEventListener("mouseup",a),n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",l),n.removeEventListener("touchend",c)}}),[e,n]),i}let LR=()=>rR;function FR(e,t,n){let{isInitialMount:o,highlightedIndex:i,items:a,environment:s,...l}=n;(0,r.useEffect)((()=>{o||ER((()=>e({highlightedIndex:i,highlightedItem:a[i],resultCount:a.length,...l})),s.document)}),t)}function BR(e){let{highlightedIndex:t,isOpen:n,itemRefs:o,getItemNodeFromIndex:i,menuElement:a,scrollIntoView:s}=e;const l=(0,r.useRef)(!0);return _R((()=>{t<0||!n||!Object.keys(o.current).length||(!1===l.current?l.current=!0:s(i(t),a))}),[t]),l}let jR=rR;function VR(e,t,n){const{type:r,props:o}=t;let i;switch(r){case n.ItemMouseMove:i={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:i={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:i={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:OR(o,e,0)};break;case n.FunctionOpenMenu:i={isOpen:!0,highlightedIndex:OR(o,e,0)};break;case n.FunctionCloseMenu:i={isOpen:!1};break;case n.FunctionSetHighlightedIndex:i={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:i={inputValue:t.inputValue};break;case n.FunctionReset:i={highlightedIndex:NR(o,"highlightedIndex"),isOpen:NR(o,"isOpen"),selectedItem:NR(o,"selectedItem"),inputValue:NR(o,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return{...e,...i}}function HR(e){for(var t=e.keysSoFar,n=e.highlightedIndex,r=e.items,o=e.itemToString,i=e.getItemNodeFromIndex,a=t.toLowerCase(),s=0;s<r.length;s++){var l=(s+n+1)%r.length,c=r[l];if(void 0!==c&&o(c).toLowerCase().startsWith(a)){var u=i(l);if(!(null==u?void 0:u.hasAttribute("disabled")))return l}}return n}ZI().array.isRequired,ZI().func,ZI().func,ZI().func,ZI().bool,ZI().number,ZI().number,ZI().number,ZI().bool,ZI().bool,ZI().bool,ZI().any,ZI().any,ZI().any,ZI().string,ZI().string,ZI().string,ZI().func,ZI().string,ZI().func,ZI().func,ZI().func,ZI().func,ZI().func,ZI().shape({addEventListener:ZI().func,removeEventListener:ZI().func,document:ZI().shape({getElementById:ZI().func,activeElement:ZI().any,body:ZI().any})});var $R=vi(vi({},MR),{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(1===n?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}}),WR=rR;const UR=0,GR=1,qR=2,YR=3,KR=4,XR=5,ZR=6,JR=7,QR=8,eM=9,tM=10,nM=11,rM=12,oM=13,iM=14,aM=15,sM=16,lM=17,cM=18,uM=19,dM=20,fM=21,mM=22;var pM=Object.freeze({__proto__:null,MenuKeyDownArrowDown:UR,MenuKeyDownArrowUp:GR,MenuKeyDownEscape:qR,MenuKeyDownHome:YR,MenuKeyDownEnd:KR,MenuKeyDownEnter:XR,MenuKeyDownSpaceButton:ZR,MenuKeyDownCharacter:JR,MenuBlur:QR,MenuMouseLeave:eM,ItemMouseMove:tM,ItemClick:nM,ToggleButtonClick:rM,ToggleButtonKeyDownArrowDown:oM,ToggleButtonKeyDownArrowUp:iM,ToggleButtonKeyDownCharacter:aM,FunctionToggleMenu:sM,FunctionOpenMenu:lM,FunctionCloseMenu:cM,FunctionSetHighlightedIndex:uM,FunctionSelectItem:dM,FunctionSetInputValue:fM,FunctionReset:mM});function hM(e,t){const{type:n,props:r,shiftKey:o}=t;let i;switch(n){case nM:i={isOpen:NR(r,"isOpen"),highlightedIndex:NR(r,"highlightedIndex"),selectedItem:r.items[t.index]};break;case aM:{const n=t.key,o=`${e.inputValue}${n}`,a=HR({keysSoFar:o,highlightedIndex:e.selectedItem?r.items.indexOf(e.selectedItem):-1,items:r.items,itemToString:r.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex});i={inputValue:o,...a>=0&&{selectedItem:r.items[a]}}}break;case oM:i={highlightedIndex:OR(r,e,1,t.getItemNodeFromIndex),isOpen:!0};break;case iM:i={highlightedIndex:OR(r,e,-1,t.getItemNodeFromIndex),isOpen:!0};break;case XR:case ZR:i={isOpen:NR(r,"isOpen"),highlightedIndex:NR(r,"highlightedIndex"),...e.highlightedIndex>=0&&{selectedItem:r.items[e.highlightedIndex]}};break;case YR:i={highlightedIndex:hR(1,0,r.items.length,t.getItemNodeFromIndex,!1)};break;case KR:i={highlightedIndex:hR(-1,r.items.length-1,r.items.length,t.getItemNodeFromIndex,!1)};break;case qR:case QR:i={isOpen:!1,highlightedIndex:-1};break;case JR:{const n=t.key,o=`${e.inputValue}${n}`,a=HR({keysSoFar:o,highlightedIndex:e.highlightedIndex,items:r.items,itemToString:r.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex});i={inputValue:o,...a>=0&&{highlightedIndex:a}}}break;case UR:i={highlightedIndex:pR(o?5:1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)};break;case GR:i={highlightedIndex:pR(o?-5:-1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)};break;case dM:i={selectedItem:t.selectedItem};break;default:return VR(e,t,pM)}return{...e,...i}}function gM(e){void 0===e&&(e={}),WR(e,gM);const t={...$R,...e},{items:n,scrollIntoView:o,environment:i,initialIsOpen:a,defaultIsOpen:s,itemToString:l,getA11ySelectionMessage:c,getA11yStatusMessage:u}=t,d=AR(t),[f,m]=RR(hM,d,t),{isOpen:p,highlightedIndex:h,selectedItem:g,inputValue:v}=f,b=(0,r.useRef)(null),y=(0,r.useRef)(null),x=(0,r.useRef)({}),w=(0,r.useRef)(!0),E=(0,r.useRef)(null),_=SR(t),S=(0,r.useRef)(),C=(0,r.useRef)(!0),k=TR({state:f,props:t}),P=(0,r.useCallback)((e=>x.current[_.getItemId(e)]),[_]);FR(u,[p,h,v,n],{isInitialMount:C.current,previousResultCount:S.current,items:n,environment:i,itemToString:l,...f}),FR(c,[g],{isInitialMount:C.current,previousResultCount:S.current,items:n,environment:i,itemToString:l,...f});const T=BR({menuElement:y.current,highlightedIndex:h,isOpen:p,itemRefs:x,scrollIntoView:o,getItemNodeFromIndex:P});(0,r.useEffect)((()=>(E.current=aR((e=>{e({type:fM,inputValue:""})}),500),()=>{E.current.cancel()})),[]),(0,r.useEffect)((()=>{v&&E.current(m)}),[m,v]),jR({isInitialMount:C.current,props:t,state:f}),(0,r.useEffect)((()=>{C.current?(a||s||p)&&y.current&&y.current.focus():p?y.current&&y.current.focus():i.document.activeElement===y.current&&b.current&&(w.current=!1,b.current.focus())}),[p]),(0,r.useEffect)((()=>{C.current||(S.current=n.length)}));const I=zR(p,[y,b],i,(()=>{m({type:QR})})),R=LR("getMenuProps","getToggleButtonProps");(0,r.useEffect)((()=>{C.current=!1}),[]),(0,r.useEffect)((()=>{p||(x.current={})}),[p]);const M=(0,r.useMemo)((()=>({ArrowDown(e){e.preventDefault(),m({type:oM,getItemNodeFromIndex:P,shiftKey:e.shiftKey})},ArrowUp(e){e.preventDefault(),m({type:iM,getItemNodeFromIndex:P,shiftKey:e.shiftKey})}})),[m,P]),N=(0,r.useMemo)((()=>({ArrowDown(e){e.preventDefault(),m({type:UR,getItemNodeFromIndex:P,shiftKey:e.shiftKey})},ArrowUp(e){e.preventDefault(),m({type:GR,getItemNodeFromIndex:P,shiftKey:e.shiftKey})},Home(e){e.preventDefault(),m({type:YR,getItemNodeFromIndex:P})},End(e){e.preventDefault(),m({type:KR,getItemNodeFromIndex:P})},Escape(){m({type:qR})},Enter(e){e.preventDefault(),m({type:XR})}," "(e){e.preventDefault(),m({type:ZR})}})),[m,P]),D=(0,r.useCallback)((()=>{m({type:sM})}),[m]),A=(0,r.useCallback)((()=>{m({type:cM})}),[m]),O=(0,r.useCallback)((()=>{m({type:lM})}),[m]),z=(0,r.useCallback)((e=>{m({type:uM,highlightedIndex:e})}),[m]),L=(0,r.useCallback)((e=>{m({type:dM,selectedItem:e})}),[m]),F=(0,r.useCallback)((()=>{m({type:mM})}),[m]),B=(0,r.useCallback)((e=>{m({type:fM,inputValue:e})}),[m]),j=(0,r.useCallback)((e=>({id:_.labelId,htmlFor:_.toggleButtonId,...e})),[_]),V=(0,r.useCallback)((function(e,t){let{onMouseLeave:n,refKey:r="ref",onKeyDown:o,onBlur:i,ref:a,...s}=void 0===e?{}:e,{suppressRefError:l=!1}=void 0===t?{}:t;const c=k.current.state;return R("getMenuProps",l,r,y),{[r]:lR(a,(e=>{y.current=e})),id:_.menuId,role:"listbox","aria-labelledby":_.labelId,tabIndex:-1,...c.isOpen&&c.highlightedIndex>-1&&{"aria-activedescendant":_.getItemId(c.highlightedIndex)},onMouseLeave:sR(n,(()=>{m({type:eM})})),onKeyDown:sR(o,(e=>{const t=mR(e);t&&N[t]?N[t](e):kR(t)&&m({type:JR,key:t,getItemNodeFromIndex:P})})),onBlur:sR(i,(()=>{if(!1===w.current)return void(w.current=!0);!I.current.isMouseDown&&m({type:QR})})),...s}}),[m,k,N,I,R,_,P]),H=(0,r.useCallback)((function(e,t){let{onClick:n,onKeyDown:r,refKey:o="ref",ref:i,...a}=void 0===e?{}:e,{suppressRefError:s=!1}=void 0===t?{}:t;const l=()=>{m({type:rM})},c=e=>{const t=mR(e);t&&M[t]?M[t](e):kR(t)&&m({type:aM,key:t,getItemNodeFromIndex:P})},u={[o]:lR(i,(e=>{b.current=e})),id:_.toggleButtonId,"aria-haspopup":"listbox","aria-expanded":k.current.state.isOpen,"aria-labelledby":`${_.labelId} ${_.toggleButtonId}`,...a};return a.disabled||(u.onClick=sR(n,l),u.onKeyDown=sR(r,c)),R("getToggleButtonProps",s,o,b),u}),[m,k,M,R,_,P]),$=(0,r.useCallback)((function(e){let{item:t,index:n,onMouseMove:r,onClick:o,refKey:i="ref",ref:a,disabled:s,...l}=void 0===e?{}:e;const{state:c,props:u}=k.current,d=()=>{m({type:nM,index:n})},f=CR(n,t,u.items);if(f<0)throw new Error("Pass either item or item index in getItemProps!");const p={disabled:s,role:"option","aria-selected":`${f===c.highlightedIndex}`,id:_.getItemId(f),[i]:lR(a,(e=>{e&&(x.current[_.getItemId(f)]=e)})),...l};return s||(p.onClick=sR(o,d)),p.onMouseMove=sR(r,(()=>{n!==c.highlightedIndex&&(T.current=!1,m({type:tM,index:n,disabled:s}))})),p}),[m,k,T,_]);return{getToggleButtonProps:H,getLabelProps:j,getMenuProps:V,getItemProps:$,toggleMenu:D,openMenu:O,closeMenu:A,setHighlightedIndex:z,selectItem:L,reset:F,setInputValue:B,highlightedIndex:h,isOpen:p,selectedItem:g,inputValue:v}}gM.stateChangeTypes=pM;ZI().array.isRequired,ZI().func,ZI().func,ZI().func,ZI().bool,ZI().number,ZI().number,ZI().number,ZI().bool,ZI().bool,ZI().bool,ZI().any,ZI().any,ZI().any,ZI().string,ZI().string,ZI().string,ZI().string,ZI().string,ZI().string,ZI().func,ZI().string,ZI().string,ZI().func,ZI().func,ZI().func,ZI().func,ZI().func,ZI().func,ZI().shape({addEventListener:ZI().func,removeEventListener:ZI().func,document:ZI().shape({getElementById:ZI().func,activeElement:ZI().any,body:ZI().any})});ZI().array,ZI().array,ZI().array,ZI().func,ZI().func,ZI().func,ZI().number,ZI().number,ZI().number,ZI().func,ZI().func,ZI().string,ZI().string,ZI().shape({addEventListener:ZI().func,removeEventListener:ZI().func,document:ZI().shape({getElementById:ZI().func,activeElement:ZI().any,body:ZI().any})});const vM=e=>e.__nextUnconstrainedWidth?"":Ps(yv,"{min-width:130px;}",""),bM=bs(Ov,{target:"eswuck60"})(vM,";"),yM=e=>e?.name,xM=({selectedItem:e},{type:t,changes:n,props:{items:r}})=>{switch(t){case gM.stateChangeTypes.ToggleButtonKeyDownArrowDown:return{selectedItem:r[e?Math.min(r.indexOf(e)+1,r.length-1):0]};case gM.stateChangeTypes.ToggleButtonKeyDownArrowUp:return{selectedItem:r[e?Math.max(r.indexOf(e)-1,0):r.length-1]};default:return n}};function wM(e){const{__next40pxDefaultSize:t=!1,__nextUnconstrainedWidth:n=!1,className:o,hideLabelFromVision:i,label:a,describedBy:s,options:l,onChange:d,size:f="default",value:m,onMouseOver:p,onMouseOut:h,onFocus:g,onBlur:v,__experimentalShowSelectedHint:b=!1}=Nv(e),{getLabelProps:y,getToggleButtonProps:x,getMenuProps:w,getItemProps:E,isOpen:_,highlightedIndex:S,selectedItem:C}=gM({initialSelectedItem:l[0],items:l,itemToString:yM,onSelectedItemChange:d,...null!=m?{selectedItem:m}:void 0,stateReducer:xM}),[k,P]=(0,Uo.useState)(!1);n||qo()("Constrained width styles for wp.components.CustomSelectControl",{since:"6.1",version:"6.4",hint:"Set the `__nextUnconstrainedWidth` prop to true to start opting into the new styles, which will become the default in a future version"});const T=w({className:"components-custom-select-control__menu","aria-hidden":!_}),I=(0,Uo.useCallback)((e=>{e.stopPropagation(),T?.onKeyDown?.(e)}),[T]);return T["aria-activedescendant"]?.startsWith("downshift-null")&&delete T["aria-activedescendant"],(0,r.createElement)("div",{className:c()("components-custom-select-control",o)},i?(0,r.createElement)(ws,{as:"label",...y()},a):(0,r.createElement)(Qb,{...y({className:"components-custom-select-control__label"})},a),(0,r.createElement)(bM,{__next40pxDefaultSize:t,__nextUnconstrainedWidth:n,isFocused:_||k,__unstableInputWidth:n?void 0:"auto",labelPosition:n?void 0:"top",size:f,suffix:(0,r.createElement)(UE,null)},(0,r.createElement)(jE,{onMouseOver:p,onMouseOut:h,as:"button",onFocus:function(e){P(!0),g?.(e)},onBlur:function(e){P(!1),v?.(e)},selectSize:f,__next40pxDefaultSize:t,...x({"aria-label":a,"aria-labelledby":void 0,className:"components-custom-select-control__button",describedBy:s||(C?(0,u.sprintf)((0,u.__)("Currently selected: %s"),C.name):(0,u.__)("No selection"))})},yM(C),b&&C.__experimentalHint&&(0,r.createElement)("span",{className:"components-custom-select-control__hint"},C.__experimentalHint))),(0,r.createElement)("ul",{...T,onKeyDown:I},_&&l.map(((e,n)=>(0,r.createElement)("li",{...E({item:e,index:n,key:e.key,className:c()(e.className,"components-custom-select-control__item",{"is-highlighted":n===S,"has-hint":!!e.__experimentalHint,"is-next-40px-default-size":t}),style:e.style})},e.name,e.__experimentalHint&&(0,r.createElement)("span",{className:"components-custom-select-control__item-hint"},e.__experimentalHint),e===C&&(0,r.createElement)($E,{icon:DS,className:"components-custom-select-control__item-icon"}))))))}function EM(e){return(0,r.createElement)(wM,{...e,__experimentalShowSelectedHint:!1})}function _M(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function SM(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function CM(e){SM(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function kM(e,t){SM(2,arguments);var n=CM(e),r=_M(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var o=n.getDate(),i=new Date(n.getTime());return i.setMonth(n.getMonth()+r+1,0),o>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}var PM,TM,IM={};function RM(){return IM}function MM(e,t){var n,r,o,i,a,s,l,c;SM(1,arguments);var u=RM(),d=_M(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=CM(e),m=f.getDay(),p=(m<d?7:0)+m-d;return f.setDate(f.getDate()-p),f.setHours(0,0,0,0),f}function NM(e,t){return SM(2,arguments),function(e,t){SM(2,arguments);var n=CM(e),r=_M(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}(e,7*_M(t))}function DM(e,t){return SM(2,arguments),kM(e,12*_M(t))}function AM(e){SM(1,arguments);var t=CM(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function OM(e,t){var n;SM(1,arguments);var r=e||{},o=CM(r.start),i=CM(r.end).getTime();if(!(o.getTime()<=i))throw new RangeError("Invalid interval");var a=[],s=o;s.setHours(0,0,0,0);var l=Number(null!==(n=null==t?void 0:t.step)&&void 0!==n?n:1);if(l<1||isNaN(l))throw new RangeError("`options.step` must be a number greater than 1");for(;s.getTime()<=i;)a.push(CM(s)),s.setDate(s.getDate()+l),s.setHours(0,0,0,0);return a}function zM(e){SM(1,arguments);var t=CM(e);return t.setDate(1),t.setHours(0,0,0,0),t}function LM(e,t){var n,r,o,i,a,s,l,c;SM(1,arguments);var u=RM(),d=_M(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=CM(e),m=f.getDay(),p=6+(m<d?-7:0)-(m-d);return f.setDate(f.getDate()+p),f.setHours(23,59,59,999),f}function FM(e,t){SM(2,arguments);var n=CM(e),r=CM(t);return n.getTime()===r.getTime()}function BM(e,t){SM(2,arguments);var n=CM(e),r=_M(t),o=n.getFullYear(),i=n.getDate(),a=new Date(0);a.setFullYear(o,r,15),a.setHours(0,0,0,0);var s=function(e){SM(1,arguments);var t=CM(e),n=t.getFullYear(),r=t.getMonth(),o=new Date(0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}(a);return n.setMonth(r,Math.min(i,s)),n}function jM(){return function(e){SM(1,arguments);var t=CM(e);return t.setHours(0,0,0,0),t}(Date.now())}!function(e){e[e.JANUARY=0]="JANUARY",e[e.FEBRUARY=1]="FEBRUARY",e[e.MARCH=2]="MARCH",e[e.APRIL=3]="APRIL",e[e.MAY=4]="MAY",e[e.JUNE=5]="JUNE",e[e.JULY=6]="JULY",e[e.AUGUST=7]="AUGUST",e[e.SEPTEMBER=8]="SEPTEMBER",e[e.OCTOBER=9]="OCTOBER",e[e.NOVEMBER=10]="NOVEMBER",e[e.DECEMBER=11]="DECEMBER"}(PM||(PM={})),function(e){e[e.SUNDAY=0]="SUNDAY",e[e.MONDAY=1]="MONDAY",e[e.TUESDAY=2]="TUESDAY",e[e.WEDNESDAY=3]="WEDNESDAY",e[e.THURSDAY=4]="THURSDAY",e[e.FRIDAY=5]="FRIDAY",e[e.SATURDAY=6]="SATURDAY"}(TM||(TM={}));var VM=function(e,t,n){return(FM(e,t)||function(e,t){SM(2,arguments);var n=CM(e),r=CM(t);return n.getTime()>r.getTime()}(e,t))&&(FM(e,n)||function(e,t){SM(2,arguments);var n=CM(e),r=CM(t);return n.getTime()<r.getTime()}(e,n))},HM=function(e){return function(e,t){if(SM(2,arguments),"object"!=typeof t||null===t)throw new RangeError("values parameter must be an object");var n=CM(e);return isNaN(n.getTime())?new Date(NaN):(null!=t.year&&n.setFullYear(t.year),null!=t.month&&(n=BM(n,t.month)),null!=t.date&&n.setDate(_M(t.date)),null!=t.hours&&n.setHours(_M(t.hours)),null!=t.minutes&&n.setMinutes(_M(t.minutes)),null!=t.seconds&&n.setSeconds(_M(t.seconds)),null!=t.milliseconds&&n.setMilliseconds(_M(t.milliseconds)),n)}(e,{hours:0,minutes:0,seconds:0,milliseconds:0})},$M=function(e){var t=void 0===e?{}:e,n=t.weekStartsOn,o=void 0===n?TM.SUNDAY:n,i=t.viewing,a=void 0===i?new Date:i,s=t.selected,l=void 0===s?[]:s,c=t.numberOfMonths,u=void 0===c?1:c,d=(0,r.useState)(a),f=d[0],m=d[1],p=(0,r.useCallback)((function(){return m(jM())}),[m]),h=(0,r.useCallback)((function(e){return m((function(t){return BM(t,e)}))}),[]),g=(0,r.useCallback)((function(){return m((function(e){return function(e,t){return SM(2,arguments),kM(e,-_M(t))}(e,1)}))}),[]),v=(0,r.useCallback)((function(){return m((function(e){return kM(e,1)}))}),[]),b=(0,r.useCallback)((function(e){return m((function(t){return function(e,t){SM(2,arguments);var n=CM(e),r=_M(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}(t,e)}))}),[]),y=(0,r.useCallback)((function(){return m((function(e){return function(e,t){return SM(2,arguments),DM(e,-_M(t))}(e,1)}))}),[]),x=(0,r.useCallback)((function(){return m((function(e){return DM(e,1)}))}),[]),w=(0,r.useState)(l.map(HM)),E=w[0],_=w[1],S=(0,r.useCallback)((function(e){return E.findIndex((function(t){return FM(t,e)}))>-1}),[E]),C=(0,r.useCallback)((function(e,t){_(t?Array.isArray(e)?e:[e]:function(t){return t.concat(Array.isArray(e)?e:[e])})}),[]),k=(0,r.useCallback)((function(e){return _((function(t){return Array.isArray(e)?t.filter((function(t){return!e.map((function(e){return e.getTime()})).includes(t.getTime())})):t.filter((function(t){return!FM(t,e)}))}))}),[]),P=(0,r.useCallback)((function(e,t){return S(e)?k(e):C(e,t)}),[k,S,C]),T=(0,r.useCallback)((function(e,t,n){_(n?OM({start:e,end:t}):function(n){return n.concat(OM({start:e,end:t}))})}),[]),I=(0,r.useCallback)((function(e,t){_((function(n){return n.filter((function(n){return!OM({start:e,end:t}).map((function(e){return e.getTime()})).includes(n.getTime())}))}))}),[]),R=(0,r.useMemo)((function(){return function(e){SM(1,arguments);var t=e||{},n=CM(t.start),r=CM(t.end).getTime(),o=[];if(!(n.getTime()<=r))throw new RangeError("Invalid interval");var i=n;for(i.setHours(0,0,0,0),i.setDate(1);i.getTime()<=r;)o.push(CM(i)),i.setMonth(i.getMonth()+1);return o}({start:zM(f),end:AM(kM(f,u-1))}).map((function(e){return function(e,t){SM(1,arguments);var n=e||{},r=CM(n.start),o=CM(n.end),i=o.getTime();if(!(r.getTime()<=i))throw new RangeError("Invalid interval");var a=MM(r,t),s=MM(o,t);a.setHours(15),s.setHours(15),i=s.getTime();for(var l=[],c=a;c.getTime()<=i;)c.setHours(0),l.push(CM(c)),(c=NM(c,1)).setHours(15);return l}({start:zM(e),end:AM(e)},{weekStartsOn:o}).map((function(e){return OM({start:MM(e,{weekStartsOn:o}),end:LM(e,{weekStartsOn:o})})}))}))}),[f,o,u]);return{clearTime:HM,inRange:VM,viewing:f,setViewing:m,viewToday:p,viewMonth:h,viewPreviousMonth:g,viewNextMonth:v,viewYear:b,viewPreviousYear:y,viewNextYear:x,selected:E,setSelected:_,clearSelected:function(){return _([])},isSelected:S,select:C,deselect:k,toggle:P,selectRange:T,deselectRange:I,calendar:R}};function WM(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function UM(e){return UM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},UM(e)}function GM(e){WM(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===UM(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function qM(e){WM(1,arguments);var t=GM(e);return t.setHours(0,0,0,0),t}function YM(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function KM(e,t){WM(2,arguments);var n=GM(e),r=YM(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var o=n.getDate(),i=new Date(n.getTime());return i.setMonth(n.getMonth()+r+1,0),o>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}function XM(e,t){return WM(2,arguments),KM(e,-YM(t))}function ZM(e){return ZM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ZM(e)}function JM(e){if(WM(1,arguments),!function(e){return WM(1,arguments),e instanceof Date||"object"===ZM(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=GM(e);return!isNaN(Number(t))}function QM(e,t){return WM(2,arguments),function(e,t){WM(2,arguments);var n=GM(e).getTime(),r=YM(t);return new Date(n+r)}(e,-YM(t))}function eN(e){WM(1,arguments);var t=GM(e),n=t.getUTCDay(),r=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-r),t.setUTCHours(0,0,0,0),t}function tN(e){WM(1,arguments);var t=GM(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=eN(r),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var a=eN(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function nN(e){WM(1,arguments);var t=GM(e),n=eN(t).getTime()-function(e){WM(1,arguments);var t=tN(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),eN(n)}(t).getTime();return Math.round(n/6048e5)+1}var rN={};function oN(){return rN}function iN(e,t){var n,r,o,i,a,s,l,c;WM(1,arguments);var u=oN(),d=YM(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=GM(e),m=f.getUTCDay(),p=(m<d?7:0)+m-d;return f.setUTCDate(f.getUTCDate()-p),f.setUTCHours(0,0,0,0),f}function aN(e,t){var n,r,o,i,a,s,l,c;WM(1,arguments);var u=GM(e),d=u.getUTCFullYear(),f=oN(),m=YM(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:f.firstWeekContainsDate)&&void 0!==r?r:null===(l=f.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,m),p.setUTCHours(0,0,0,0);var h=iN(p,t),g=new Date(0);g.setUTCFullYear(d,0,m),g.setUTCHours(0,0,0,0);var v=iN(g,t);return u.getTime()>=h.getTime()?d+1:u.getTime()>=v.getTime()?d:d-1}function sN(e,t){WM(1,arguments);var n=GM(e),r=iN(n,t).getTime()-function(e,t){var n,r,o,i,a,s,l,c;WM(1,arguments);var u=oN(),d=YM(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),f=aN(e,t),m=new Date(0);return m.setUTCFullYear(f,0,d),m.setUTCHours(0,0,0,0),iN(m,t)}(n,t).getTime();return Math.round(r/6048e5)+1}function lN(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var cN={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return lN("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):lN(n+1,2)},d:function(e,t){return lN(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return lN(e.getUTCHours()%12||12,t.length)},H:function(e,t){return lN(e.getUTCHours(),t.length)},m:function(e,t){return lN(e.getUTCMinutes(),t.length)},s:function(e,t){return lN(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return lN(Math.floor(r*Math.pow(10,n-3)),t.length)}};const uN=cN;var dN="midnight",fN="noon",mN="morning",pN="afternoon",hN="evening",gN="night",vN={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return uN.y(e,t)},Y:function(e,t,n,r){var o=aN(e,r),i=o>0?o:1-o;return"YY"===t?lN(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):lN(i,t.length)},R:function(e,t){return lN(tN(e),t.length)},u:function(e,t){return lN(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return lN(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return lN(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return uN.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return lN(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=sN(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):lN(o,t.length)},I:function(e,t,n){var r=nN(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):lN(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):uN.d(e,t)},D:function(e,t,n){var r=function(e){WM(1,arguments);var t=GM(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):lN(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return lN(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return lN(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return lN(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?fN:0===o?dN:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?hN:o>=12?pN:o>=4?mN:gN,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return uN.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):uN.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):lN(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):lN(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):uN.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):uN.s(e,t)},S:function(e,t){return uN.S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return yN(o);case"XXXX":case"XX":return xN(o);default:return xN(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return yN(o);case"xxxx":case"xx":return xN(o);default:return xN(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+bN(o,":");default:return"GMT"+xN(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+bN(o,":");default:return"GMT"+xN(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e;return lN(Math.floor(o.getTime()/1e3),t.length)},T:function(e,t,n,r){return lN((r._originalDate||e).getTime(),t.length)}};function bN(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t||"";return n+String(o)+a+lN(i,2)}function yN(e,t){return e%60==0?(e>0?"-":"+")+lN(Math.abs(e)/60,2):xN(e,t)}function xN(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+lN(Math.floor(o/60),2)+n+lN(o%60,2)}const wN=vN;var EN=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},_N=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},SN={p:_N,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return EN(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",EN(o,t)).replace("{{time}}",_N(i,t))}};const CN=SN;var kN=["D","DD"],PN=["YY","YYYY"];function TN(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var IN={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};const RN=function(e,t,n){var r,o=IN[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function MN(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const NN={date:MN({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:MN({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:MN({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};var DN={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};const AN=function(e,t,n,r){return DN[e]};function ON(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var a=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var zN={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ON({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:ON({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:ON({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:ON({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:ON({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};const LN=zN;function FN(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var a,s=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return}(l,(function(e){return e.test(s)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n;return}(l,(function(e){return e.test(s)}));return a=e.valueCallback?e.valueCallback(c):c,{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(s.length)}}}var BN,jN={ordinalNumber:(BN={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(BN.matchPattern);if(!n)return null;var r=n[0],o=e.match(BN.parsePattern);if(!o)return null;var i=BN.valueCallback?BN.valueCallback(o[0]):o[0];return{value:i=t.valueCallback?t.valueCallback(i):i,rest:e.slice(r.length)}}),era:FN({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:FN({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:FN({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:FN({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:FN({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};const VN={code:"en-US",formatDistance:RN,formatLong:NN,formatRelative:AN,localize:LN,match:jN,options:{weekStartsOn:0,firstWeekContainsDate:1}};var HN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$N=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,WN=/^'([^]*?)'?$/,UN=/''/g,GN=/[a-zA-Z]/;function qN(e,t,n){var r,o,i,a,s,l,c,u,d,f,m,p,h,g,v,b,y,x;WM(2,arguments);var w=String(t),E=oN(),_=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:E.locale)&&void 0!==r?r:VN,S=YM(null!==(i=null!==(a=null!==(s=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n||null===(c=n.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==s?s:E.firstWeekContainsDate)&&void 0!==a?a:null===(d=E.locale)||void 0===d||null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==i?i:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=YM(null!==(m=null!==(p=null!==(h=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(v=n.locale)||void 0===v||null===(b=v.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==h?h:E.weekStartsOn)&&void 0!==p?p:null===(y=E.locale)||void 0===y||null===(x=y.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==m?m:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!_.localize)throw new RangeError("locale must contain localize property");if(!_.formatLong)throw new RangeError("locale must contain formatLong property");var k=GM(e);if(!JM(k))throw new RangeError("Invalid time value");var P=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}(k),T=QM(k,P),I={firstWeekContainsDate:S,weekStartsOn:C,locale:_,_originalDate:k},R=w.match($N).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,CN[t])(e,_.formatLong):e})).join("").match(HN).map((function(r){if("''"===r)return"'";var o=r[0];if("'"===o)return function(e){var t=e.match(WN);if(!t)return e;return t[1].replace(UN,"'")}(r);var i=wN[o];if(i)return null!=n&&n.useAdditionalWeekYearTokens||!function(e){return-1!==PN.indexOf(e)}(r)||TN(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!function(e){return-1!==kN.indexOf(e)}(r)||TN(r,t,String(e)),i(T,r,_.localize,I);if(o.match(GN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("");return R}function YN(e,t){WM(2,arguments);var n=GM(e),r=GM(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function KN(e,t){WM(2,arguments);var n=GM(e),r=GM(t);return n.getTime()===r.getTime()}function XN(e,t){WM(2,arguments);var n=qM(e),r=qM(t);return n.getTime()===r.getTime()}function ZN(e,t){WM(2,arguments);var n=GM(e),r=YM(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}function JN(e,t){return WM(2,arguments),ZN(e,7*YM(t))}const QN=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})),eD=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})),tD=window.wp.date;const nD=bs("div",{target:"e105ri6r5"})({name:"1khn195",styles:"box-sizing:border-box"}),rD=bs(Py,{target:"e105ri6r4"})("margin-bottom:",Ah(4),";"),oD=bs($S,{target:"e105ri6r3"})("font-size:",Xg.fontSize,";font-weight:",Xg.fontWeight,";strong{font-weight:",Xg.fontWeightHeading,";}"),iD=bs("div",{target:"e105ri6r2"})("column-gap:",Ah(2),";display:grid;grid-template-columns:0.5fr repeat( 5, 1fr ) 0.5fr;justify-items:center;row-gap:",Ah(2),";"),aD=bs("div",{target:"e105ri6r1"})("color:",Ds.gray[700],";font-size:",Xg.fontSize,";line-height:",Xg.fontLineHeightBase,";&:nth-of-type( 1 ){justify-self:start;}&:nth-of-type( 7 ){justify-self:end;}"),sD=bs(my,{shouldForwardProp:e=>!["column","isSelected","isToday","hasEvents"].includes(e),target:"e105ri6r0"})("grid-column:",(e=>e.column),";position:relative;justify-content:center;",(e=>1===e.column&&"\n\t\tjustify-self: start;\n\t\t")," ",(e=>7===e.column&&"\n\t\tjustify-self: end;\n\t\t")," ",(e=>e.disabled&&"\n\t\tpointer-events: none;\n\t\t")," &&&{border-radius:100%;height:",Ah(7),";width:",Ah(7),";",(e=>e.isSelected&&`\n\t\t\tbackground: ${Ds.theme.accent};\n\t\t\tcolor: ${Ds.white};\n\t\t\t`)," ",(e=>!e.isSelected&&e.isToday&&`\n\t\t\tbackground: ${Ds.gray[200]};\n\t\t\t`),";}",(e=>e.hasEvents&&`\n\t\t::before {\n\t\t\tbackground: ${e.isSelected?Ds.white:Ds.theme.accent};\n\t\t\tborder-radius: 2px;\n\t\t\tbottom: 2px;\n\t\t\tcontent: " ";\n\t\t\theight: 4px;\n\t\t\tleft: 50%;\n\t\t\tmargin-left: -2px;\n\t\t\tposition: absolute;\n\t\t\twidth: 4px;\n\t\t}\n\t\t`),";");function lD(e){return"string"==typeof e?new Date(e):GM(e)}const cD="yyyy-MM-dd'T'HH:mm:ss";function uD({day:e,column:t,isSelected:n,isFocusable:o,isFocusAllowed:i,isToday:a,isInvalid:s,numEvents:l,onClick:c,onKeyDown:u}){const d=(0,Uo.useRef)();return(0,Uo.useEffect)((()=>{d.current&&o&&i&&d.current.focus()}),[o]),(0,r.createElement)(sD,{ref:d,className:"components-datetime__date__day",disabled:s,tabIndex:o?0:-1,"aria-label":dD(e,n,l),column:t,isSelected:n,isToday:a,hasEvents:l>0,onClick:c,onKeyDown:u},(0,tD.dateI18n)("j",e,-e.getTimezoneOffset()))}function dD(e,t,n){const{formats:r}=(0,tD.getSettings)(),o=(0,tD.dateI18n)(r.date,e,-e.getTimezoneOffset());return t&&n>0?(0,u.sprintf)((0,u._n)("%1$s. Selected. There is %2$d event","%1$s. Selected. There are %2$d events",n),o,n):t?(0,u.sprintf)((0,u.__)("%1$s. Selected"),o):n>0?(0,u.sprintf)((0,u._n)("%1$s. There is %2$d event","%1$s. There are %2$d events",n),o,n):o}const fD=function({currentDate:e,onChange:t,events:n=[],isInvalidDate:o,onMonthPreviewed:i,startOfWeek:a=0}){const s=e?lD(e):new Date,{calendar:l,viewing:c,setSelected:d,setViewing:f,isSelected:m,viewPreviousMonth:p,viewNextMonth:h}=$M({selected:[qM(s)],viewing:qM(s),weekStartsOn:a}),[g,v]=(0,Uo.useState)(qM(s)),[b,y]=(0,Uo.useState)(!1),[x,w]=(0,Uo.useState)(e);return e!==x&&(w(e),d([qM(s)]),f(qM(s)),v(qM(s))),(0,r.createElement)(nD,{className:"components-datetime__date",role:"application","aria-label":(0,u.__)("Calendar")},(0,r.createElement)(rD,null,(0,r.createElement)(my,{icon:(0,u.isRTL)()?QN:eD,variant:"tertiary","aria-label":(0,u.__)("View previous month"),onClick:()=>{p(),v(XM(g,1)),i?.(qN(XM(c,1),cD))}}),(0,r.createElement)(oD,{level:3},(0,r.createElement)("strong",null,(0,tD.dateI18n)("F",c,-c.getTimezoneOffset()))," ",(0,tD.dateI18n)("Y",c,-c.getTimezoneOffset())),(0,r.createElement)(my,{icon:(0,u.isRTL)()?eD:QN,variant:"tertiary","aria-label":(0,u.__)("View next month"),onClick:()=>{h(),v(KM(g,1)),i?.(qN(KM(c,1),cD))}})),(0,r.createElement)(iD,{onFocus:()=>y(!0),onBlur:()=>y(!1)},l[0][0].map((e=>(0,r.createElement)(aD,{key:e.toString()},(0,tD.dateI18n)("D",e,-e.getTimezoneOffset())))),l[0].map((e=>e.map(((e,a)=>YN(e,c)?(0,r.createElement)(uD,{key:e.toString(),day:e,column:a+1,isSelected:m(e),isFocusable:KN(e,g),isFocusAllowed:b,isToday:XN(e,new Date),isInvalid:!!o&&o(e),numEvents:n.filter((t=>XN(t.date,e))).length,onClick:()=>{d([e]),v(e),t?.(qN(new Date(e.getFullYear(),e.getMonth(),e.getDate(),s.getHours(),s.getMinutes(),s.getSeconds(),s.getMilliseconds()),cD))},onKeyDown:t=>{let n;"ArrowLeft"===t.key&&(n=ZN(e,(0,u.isRTL)()?1:-1)),"ArrowRight"===t.key&&(n=ZN(e,(0,u.isRTL)()?-1:1)),"ArrowUp"===t.key&&(n=function(e,t){return WM(2,arguments),JN(e,-YM(t))}(e,1)),"ArrowDown"===t.key&&(n=JN(e,1)),"PageUp"===t.key&&(n=XM(e,1)),"PageDown"===t.key&&(n=KM(e,1)),"Home"===t.key&&(n=function(e,t){var n,r,o,i,a,s,l,c;WM(1,arguments);var u=oN(),d=YM(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=GM(e),m=f.getDay(),p=(m<d?7:0)+m-d;return f.setDate(f.getDate()-p),f.setHours(0,0,0,0),f}(e)),"End"===t.key&&(n=qM(function(e,t){var n,r,o,i,a,s,l,c;WM(1,arguments);var u=oN(),d=YM(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=GM(e),m=f.getDay(),p=6+(m<d?-7:0)-(m-d);return f.setDate(f.getDate()+p),f.setHours(23,59,59,999),f}(e))),n&&(t.preventDefault(),v(n),YN(n,c)||(f(n),i?.(qN(n,cD))))}}):null))))))};function mD(e){WM(1,arguments);var t=GM(e);return t.setSeconds(0,0),t}function pD(e,t){WM(2,arguments);var n=GM(e),r=YM(t),o=n.getFullYear(),i=n.getDate(),a=new Date(0);a.setFullYear(o,r,15),a.setHours(0,0,0,0);var s=function(e){WM(1,arguments);var t=GM(e),n=t.getFullYear(),r=t.getMonth(),o=new Date(0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}(a);return n.setMonth(r,Math.min(i,s)),n}function hD(e){return hD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hD(e)}const gD=bs("div",{target:"evcr2319"})("box-sizing:border-box;font-size:",Xg.fontSize,";"),vD=bs("fieldset",{target:"evcr2318"})("border:0;margin:0 0 ",Ah(4)," 0;padding:0;&:last-child{margin-bottom:0;}"),bD=bs("div",{target:"evcr2317"})({name:"pd0mhc",styles:"direction:ltr;display:flex"}),yD=Ps("&&& ",Ev,"{padding-left:",Ah(2),";padding-right:",Ah(2),";text-align:center;}",""),xD=bs(Ry,{target:"evcr2316"})(yD," width:",Ah(9),";&&& ",Ev,"{padding-right:0;}&&& ",kv,"{border-right:0;border-top-right-radius:0;border-bottom-right-radius:0;}"),wD=bs("span",{target:"evcr2315"})("border-top:",Xg.borderWidth," solid ",Ds.gray[700],";border-bottom:",Xg.borderWidth," solid ",Ds.gray[700],";line-height:calc(\n\t\t",Xg.controlHeight," - ",Xg.borderWidth," * 2\n\t);display:inline-block;"),ED=bs(Ry,{target:"evcr2314"})(yD," width:",Ah(9),";&&& ",Ev,"{padding-left:0;}&&& ",kv,"{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0;}"),_D=bs("div",{target:"evcr2313"})({name:"1ff36h2",styles:"flex-grow:1"}),SD=bs(Ry,{target:"evcr2312"})(yD," width:",Ah(9),";"),CD=bs(Ry,{target:"evcr2311"})(yD," width:",Ah(14),";"),kD=bs("div",{target:"evcr2310"})({name:"ebu3jh",styles:"text-decoration:underline dotted"}),PD=()=>{const{timezone:e}=(0,tD.getSettings)(),t=(new Date).getTimezoneOffset()/60*-1;if(Number(e.offset)===t)return null;const n=Number(e.offset)>=0?"+":"",o=""!==e.abbr&&isNaN(Number(e.abbr))?e.abbr:`UTC${n}${e.offsetFormatted}`,i=e.string.replace("_"," "),a="UTC"===e.string?(0,u.__)("Coordinated Universal Time"):`(${o}) ${i}`;return 0===i.trim().length?(0,r.createElement)(kD,{className:"components-datetime__timezone"},o):(0,r.createElement)(ri,{placement:"top",text:a},(0,r.createElement)(kD,{className:"components-datetime__timezone"},o))};function TD(e,t){return t?(e%12+12)%24:e%12}function ID(e){return(t,n)=>{const r={...t};return n.type!==Db&&n.type!==Vb&&n.type!==Bb||void 0!==r.value&&(r.value=r.value.toString().padStart(e,"0")),r}}const RD=function({is12Hour:e,currentTime:t,onChange:n}){const[o,i]=(0,Uo.useState)((()=>t?mD(lD(t)):new Date));(0,Uo.useEffect)((()=>{i(t?mD(lD(t)):new Date)}),[t]);const{day:a,month:s,year:l,minutes:c,hours:d,am:f}=(0,Uo.useMemo)((()=>({day:qN(o,"dd"),month:qN(o,"MM"),year:qN(o,"yyyy"),minutes:qN(o,"mm"),hours:qN(o,e?"hh":"HH"),am:qN(o,"a")})),[o,e]),m=t=>(r,{event:a})=>{var s;const l=null!==(s=a.target?.ownerDocument.defaultView?.HTMLInputElement)&&void 0!==s?s:HTMLInputElement;if(!(a.target instanceof l))return;if(!a.target.validity.valid)return;let c=Number(r);"hours"===t&&e&&(c=TD(c,"PM"===f));const u=function(e,t){if(WM(2,arguments),"object"!==hD(t)||null===t)throw new RangeError("values parameter must be an object");var n=GM(e);return isNaN(n.getTime())?new Date(NaN):(null!=t.year&&n.setFullYear(t.year),null!=t.month&&(n=pD(n,t.month)),null!=t.date&&n.setDate(YM(t.date)),null!=t.hours&&n.setHours(YM(t.hours)),null!=t.minutes&&n.setMinutes(YM(t.minutes)),null!=t.seconds&&n.setSeconds(YM(t.seconds)),null!=t.milliseconds&&n.setMilliseconds(YM(t.milliseconds)),n)}(o,{[t]:c});i(u),n?.(qN(u,cD))};function p(e){return()=>{if(f===e)return;const t=parseInt(d,10),r=function(e,t){WM(2,arguments);var n=GM(e),r=YM(t);return n.setHours(r),n}(o,TD(t,"PM"===e));i(r),n?.(qN(r,cD))}}const h=(0,r.createElement)(SD,{className:"components-datetime__time-field components-datetime__time-field-day",label:(0,u.__)("Day"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:a,step:1,min:1,max:31,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("date")}),g=(0,r.createElement)(_D,null,(0,r.createElement)(YE,{className:"components-datetime__time-field components-datetime__time-field-month",label:(0,u.__)("Month"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:s,options:[{value:"01",label:(0,u.__)("January")},{value:"02",label:(0,u.__)("February")},{value:"03",label:(0,u.__)("March")},{value:"04",label:(0,u.__)("April")},{value:"05",label:(0,u.__)("May")},{value:"06",label:(0,u.__)("June")},{value:"07",label:(0,u.__)("July")},{value:"08",label:(0,u.__)("August")},{value:"09",label:(0,u.__)("September")},{value:"10",label:(0,u.__)("October")},{value:"11",label:(0,u.__)("November")},{value:"12",label:(0,u.__)("December")}],onChange:e=>{const t=pD(o,Number(e)-1);i(t),n?.(qN(t,cD))}}));return(0,r.createElement)(gD,{className:"components-datetime__time"},(0,r.createElement)(vD,null,(0,r.createElement)(iy.VisualLabel,{as:"legend",className:"components-datetime__time-legend"},(0,u.__)("Time")),(0,r.createElement)(Py,{className:"components-datetime__time-wrapper"},(0,r.createElement)(bD,{className:"components-datetime__time-field components-datetime__time-field-time"},(0,r.createElement)(xD,{className:"components-datetime__time-field-hours-input",label:(0,u.__)("Hours"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:d,step:1,min:e?1:0,max:e?12:23,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("hours"),__unstableStateReducer:ID(2)}),(0,r.createElement)(wD,{className:"components-datetime__time-separator","aria-hidden":"true"},":"),(0,r.createElement)(ED,{className:"components-datetime__time-field-minutes-input",label:(0,u.__)("Minutes"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:c,step:1,min:0,max:59,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("minutes"),__unstableStateReducer:ID(2)})),e&&(0,r.createElement)(Ok,{className:"components-datetime__time-field components-datetime__time-field-am-pm"},(0,r.createElement)(my,{className:"components-datetime__time-am-button",variant:"AM"===f?"primary":"secondary",__next40pxDefaultSize:!0,onClick:p("AM")},(0,u.__)("AM")),(0,r.createElement)(my,{className:"components-datetime__time-pm-button",variant:"PM"===f?"primary":"secondary",__next40pxDefaultSize:!0,onClick:p("PM")},(0,u.__)("PM"))),(0,r.createElement)(tg,null),(0,r.createElement)(PD,null))),(0,r.createElement)(vD,null,(0,r.createElement)(iy.VisualLabel,{as:"legend",className:"components-datetime__time-legend"},(0,u.__)("Date")),(0,r.createElement)(Py,{className:"components-datetime__time-wrapper"},e?(0,r.createElement)(r.Fragment,null,g,h):(0,r.createElement)(r.Fragment,null,h,g),(0,r.createElement)(CD,{className:"components-datetime__time-field components-datetime__time-field-year",label:(0,u.__)("Year"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:l,step:1,min:1,max:9999,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("year"),__unstableStateReducer:ID(4)}))))};const MD=bs(jS,{target:"e1p5onf00"})({name:"1khn195",styles:"box-sizing:border-box"}),ND=()=>{};const DD=(0,Uo.forwardRef)((function({currentDate:e,is12Hour:t,isInvalidDate:n,onMonthPreviewed:o=ND,onChange:i,events:a,startOfWeek:s},l){return(0,r.createElement)(MD,{ref:l,className:"components-datetime",spacing:4},(0,r.createElement)(r.Fragment,null,(0,r.createElement)(RD,{currentTime:e,onChange:i,is12Hour:t}),(0,r.createElement)(fD,{currentDate:e,onChange:i,isInvalidDate:n,events:a,onMonthPreviewed:o,startOfWeek:s})))})),AD=DD,OD=[{name:(0,u._x)("None","Size of a UI element"),slug:"none"},{name:(0,u._x)("Small","Size of a UI element"),slug:"small"},{name:(0,u._x)("Medium","Size of a UI element"),slug:"medium"},{name:(0,u._x)("Large","Size of a UI element"),slug:"large"},{name:(0,u._x)("Extra Large","Size of a UI element"),slug:"xlarge"}];const zD=function(e){const{__next40pxDefaultSize:t=!1,label:n,value:o,sizes:i=OD,icon:a,onChange:s,className:l=""}=e,d=(0,r.createElement)(r.Fragment,null,a&&(0,r.createElement)(uy,{icon:a}),n);return(0,r.createElement)(YE,{__next40pxDefaultSize:t,className:c()(l,"block-editor-dimension-control"),label:d,hideLabelFromVision:!1,value:o,onChange:e=>{const t=((e,t)=>e.find((e=>t===e.slug)))(i,e);t&&o!==t.slug?"function"==typeof s&&s(t.slug):s?.(void 0)},options:(e=>{const t=e.map((({name:e,slug:t})=>({label:e,value:t})));return[{label:(0,u.__)("Default"),value:""},...t]})(i)})};const LD={name:"u2jump",styles:"position:relative;pointer-events:none;&::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;}*{pointer-events:none;}"},FD=(0,Uo.createContext)(!1),{Consumer:BD,Provider:jD}=FD;function VD({className:e,children:t,isDisabled:n=!0,...o}){const i=ns();return(0,r.createElement)(jD,{value:n},(0,r.createElement)("div",{inert:n?"true":void 0,className:n?i(LD,e,"components-disabled"):void 0,...o},t))}VD.Context=FD,VD.Consumer=BD;const HD=VD,$D=(0,Uo.forwardRef)((({visible:e,children:t,...n},o)=>{const i=Xt({open:e});return(0,r.createElement)(Zn,{store:i,ref:o,...n},t)})),WD="is-dragging-components-draggable";const UD=function({children:e,onDragStart:t,onDragOver:n,onDragEnd:o,appendToOwnerDocument:i=!1,cloneClassname:a,elementId:s,transferData:l,__experimentalTransferDataType:c="text",__experimentalDragComponent:u}){const f=(0,Uo.useRef)(null),m=(0,Uo.useRef)((()=>{}));return(0,Uo.useEffect)((()=>()=>{m.current()}),[]),(0,r.createElement)(r.Fragment,null,e({onDraggableStart:function(e){const{ownerDocument:r}=e.target;e.dataTransfer.setData(c,JSON.stringify(l));const o=r.createElement("div");o.style.top="0",o.style.left="0";const u=r.createElement("div");"function"==typeof e.dataTransfer.setDragImage&&(u.classList.add("components-draggable__invisible-drag-image"),r.body.appendChild(u),e.dataTransfer.setDragImage(u,0,0)),o.classList.add("components-draggable__clone"),a&&o.classList.add(a);let p=0,h=0;if(f.current){p=e.clientX,h=e.clientY,o.style.transform=`translate( ${p}px, ${h}px )`;const t=r.createElement("div");t.innerHTML=f.current.innerHTML,o.appendChild(t),r.body.appendChild(o)}else{const e=r.getElementById(s),t=e.getBoundingClientRect(),n=e.parentNode,a=t.top,l=t.left;o.style.width=`${t.width+0}px`;const c=e.cloneNode(!0);c.id=`clone-${s}`,p=l-0,h=a-0,o.style.transform=`translate( ${p}px, ${h}px )`,Array.from(c.querySelectorAll("iframe")).forEach((e=>e.parentNode?.removeChild(e))),o.appendChild(c),i?r.body.appendChild(o):n?.appendChild(o)}let g=e.clientX,v=e.clientY;const b=(0,d.throttle)((function(e){if(g===e.clientX&&v===e.clientY)return;const t=p+e.clientX-g,r=h+e.clientY-v;o.style.transform=`translate( ${t}px, ${r}px )`,g=e.clientX,v=e.clientY,p=t,h=r,n&&n(e)}),16);r.addEventListener("dragover",b),r.body.classList.add(WD),t&&t(e),m.current=()=>{o&&o.parentNode&&o.parentNode.removeChild(o),u&&u.parentNode&&u.parentNode.removeChild(u),r.body.classList.remove(WD),r.removeEventListener("dragover",b)}},onDraggableEnd:function(e){e.preventDefault(),m.current(),o&&o(e)}}),u&&(0,r.createElement)("div",{className:"components-draggable-drag-component-root",style:{display:"none"},ref:f},u))},GD=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));const qD=function({className:e,label:t,onFilesDrop:n,onHTMLDrop:o,onDrop:i,...a}){const[s,l]=(0,Uo.useState)(),[f,m]=(0,Uo.useState)(),[p,h]=(0,Uo.useState)(),g=(0,d.__experimentalUseDropZone)({onDrop(e){const t=e.dataTransfer?(0,HT.getFilesFromDataTransfer)(e.dataTransfer):[],r=e.dataTransfer?.getData("text/html");r&&o?o(r):t.length&&n?n(t):i&&i(e)},onDragStart(e){l(!0);let t="default";e.dataTransfer?.types.includes("text/html")?t="html":(e.dataTransfer?.types.includes("Files")||(e.dataTransfer?(0,HT.getFilesFromDataTransfer)(e.dataTransfer):[]).length>0)&&(t="file"),h(t)},onDragEnd(){l(!1),h(void 0)},onDragEnter(){m(!0)},onDragLeave(){m(!1)}}),v=(0,d.useReducedMotion)();let b;const y={hidden:{opacity:0},show:{opacity:1,transition:{type:"tween",duration:.2,delay:0,delayChildren:.1}},exit:{opacity:0,transition:{duration:.2,delayChildren:0}}},x={hidden:{opacity:0,scale:.9},show:{opacity:1,scale:1,transition:{duration:.1}},exit:{opacity:0,scale:.9}};f&&(b=(0,r.createElement)(wh.div,{variants:y,initial:v?"show":"hidden",animate:"show",exit:v?"show":"exit",className:"components-drop-zone__content",style:{pointerEvents:"none"}},(0,r.createElement)(wh.div,{variants:x},(0,r.createElement)($E,{icon:GD,className:"components-drop-zone__content-icon"}),(0,r.createElement)("span",{className:"components-drop-zone__content-text"},t||(0,u.__)("Drop files to upload")))));const w=c()("components-drop-zone",e,{"is-active":(s||f)&&("file"===p&&n||"html"===p&&o||"default"===p&&i),"is-dragging-over-document":s,"is-dragging-over-element":f,[`is-dragging-${p}`]:!!p});return(0,r.createElement)("div",{...a,ref:g,className:w},v?b:(0,r.createElement)(Ih,null,b))};function YD({children:e}){return qo()("wp.components.DropZoneProvider",{since:"5.8",hint:"wp.component.DropZone no longer needs a provider. wp.components.DropZoneProvider is safe to remove from your code."}),e}const KD=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M5 17.7c.4.5.8.9 1.2 1.2l1.1-1.4c-.4-.3-.7-.6-1-1L5 17.7zM5 6.3l1.4 1.1c.3-.4.6-.7 1-1L6.3 5c-.5.4-.9.8-1.3 1.3zm.1 7.8l-1.7.5c.2.6.4 1.1.7 1.6l1.5-.8c-.2-.4-.4-.8-.5-1.3zM4.8 12v-.7L3 11.1v1.8l1.7-.2c.1-.2.1-.5.1-.7zm3 7.9c.5.3 1.1.5 1.6.7l.5-1.7c-.5-.1-.9-.3-1.3-.5l-.8 1.5zM19 6.3c-.4-.5-.8-.9-1.2-1.2l-1.1 1.4c.4.3.7.6 1 1L19 6.3zm-.1 3.6l1.7-.5c-.2-.6-.4-1.1-.7-1.6l-1.5.8c.2.4.4.8.5 1.3zM5.6 8.6l-1.5-.8c-.3.5-.5 1-.7 1.6l1.7.5c.1-.5.3-.9.5-1.3zm2.2-4.5l.8 1.5c.4-.2.8-.4 1.3-.5l-.5-1.7c-.6.2-1.1.4-1.6.7zm8.8 13.5l1.1 1.4c.5-.4.9-.8 1.2-1.2l-1.4-1.1c-.2.3-.5.6-.9.9zm1.8-2.2l1.5.8c.3-.5.5-1.1.7-1.6l-1.7-.5c-.1.5-.3.9-.5 1.3zm2.6-4.3l-1.7.2v1.4l1.7.2V12v-.9zM11.1 3l.2 1.7h1.4l.2-1.7h-1.8zm3 2.1c.5.1.9.3 1.3.5l.8-1.5c-.5-.3-1.1-.5-1.6-.7l-.5 1.7zM12 19.2h-.7l-.2 1.8h1.8l-.2-1.7c-.2-.1-.5-.1-.7-.1zm2.1-.3l.5 1.7c.6-.2 1.1-.4 1.6-.7l-.8-1.5c-.4.2-.8.4-1.3.5z"}));function XD(e=[],t="90deg"){const n=100/e.length,r=e.map(((e,t)=>`${e} ${t*n}%, ${e} ${(t+1)*n}%`)).join(", ");return`linear-gradient( ${t}, ${r} )`}Vg([Hg]);const ZD=function({values:e}){return e?(0,r.createElement)(DE,{colorValue:XD(e,"135deg")}):(0,r.createElement)(uy,{icon:KD})};function JD({label:e,value:t,colors:n,disableCustomColors:o,enableAlpha:i,onChange:a}){const[s,l]=(0,Uo.useState)(!1),c=(0,d.useInstanceId)(JD,"color-list-picker-option"),f=`${c}__label`,m=`${c}__content`;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(my,{className:"components-color-list-picker__swatch-button",onClick:()=>l((e=>!e)),"aria-expanded":s,"aria-controls":m},(0,r.createElement)(Py,{justify:"flex-start",spacing:2},t?(0,r.createElement)(DE,{colorValue:t,className:"components-color-list-picker__swatch-color"}):(0,r.createElement)(uy,{icon:KD}),(0,r.createElement)("span",{id:f},e))),(0,r.createElement)("div",{role:"group",id:m,"aria-labelledby":f,"aria-hidden":!s},s&&(0,r.createElement)(JS,{"aria-label":(0,u.__)("Color options"),className:"components-color-list-picker__color-picker",colors:n,value:t,clearable:!1,onChange:a,disableCustomColors:o,enableAlpha:i})))}const QD=function({colors:e,labels:t,value:n=[],disableCustomColors:o,enableAlpha:i,onChange:a}){return(0,r.createElement)("div",{className:"components-color-list-picker"},t.map(((t,s)=>(0,r.createElement)(JD,{key:s,label:t,value:n[s],colors:e,disableCustomColors:o,enableAlpha:i,onChange:e=>{const t=n.slice();t[s]=e,a(t)}}))))},eA=["#333","#CCC"];function tA({value:e,onChange:t}){const n=!!e,o=n?e:eA,i=XD(o),a=(s=o).map(((e,t)=>({position:100*t/(s.length-1),color:e})));var s;return(0,r.createElement)(wT,{disableInserter:!0,background:i,hasGradient:n,value:a,onChange:e=>{const n=function(e=[]){return e.map((({color:e})=>e))}(e);t(n)}})}const nA=function({asButtons:e,loop:t,clearable:n=!0,unsetable:o=!0,colorPalette:i,duotonePalette:a,disableCustomColors:s,disableCustomDuotone:l,value:c,onChange:d,"aria-label":f,"aria-labelledby":m,...p}){const[h,g]=(0,Uo.useMemo)((()=>{return!(e=i)||e.length<2?["#000","#fff"]:e.map((({color:e})=>({color:e,brightness:Bg(e).brightness()}))).reduce((([e,t],n)=>[n.brightness<=e.brightness?n:e,n.brightness>=t.brightness?n:t]),[{brightness:1,color:""},{brightness:0,color:""}]).map((({color:e})=>e));var e}),[i]),v="unset"===c,b=(0,u.__)("Unset"),y=(0,r.createElement)(BS.Option,{key:"unset",value:"unset",isSelected:v,tooltipText:b,"aria-label":b,className:"components-duotone-picker__color-indicator",onClick:()=>{d(v?void 0:"unset")}}),x=a.map((({colors:e,slug:t,name:n})=>{const o={background:XD(e,"135deg"),color:"transparent"},i=null!=n?n:(0,u.sprintf)((0,u.__)("Duotone code: %s"),t),a=n?(0,u.sprintf)((0,u.__)("Duotone: %s"),n):i,s=si()(e,c);return(0,r.createElement)(BS.Option,{key:t,value:e,isSelected:s,"aria-label":a,tooltipText:i,style:o,onClick:()=>{d(s?void 0:e)}})}));let w;if(e)w={asButtons:!0};else{const e={asButtons:!1,loop:t};w=f?{...e,"aria-label":f}:m?{...e,"aria-labelledby":m}:{...e,"aria-label":(0,u.__)("Custom color picker.")}}const E=o?[y,...x]:x;return(0,r.createElement)(BS,{...p,...w,options:E,actions:!!n&&(0,r.createElement)(BS.ButtonAction,{onClick:()=>d(void 0)},(0,u.__)("Clear"))},(0,r.createElement)(tg,{paddingTop:0===E.length?0:4},(0,r.createElement)(jS,{spacing:3},!s&&!l&&(0,r.createElement)(tA,{value:v?void 0:c,onChange:d}),!l&&(0,r.createElement)(QD,{labels:[(0,u.__)("Shadows"),(0,u.__)("Highlights")],colors:i,value:v?void 0:c,disableCustomColors:s,enableAlpha:!0,onChange:e=>{e[0]||(e[0]=h),e[1]||(e[1]=g);const t=e.length>=2?e:void 0;d(t)}}))))},rA=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"}));const oA=bs($E,{target:"esh4a730"})({name:"rvs7bx",styles:"width:1em;height:1em;margin:0;vertical-align:middle;fill:currentColor"});const iA=(0,Uo.forwardRef)((function(e,t){const{href:n,children:o,className:i,rel:a="",...s}=e,l=[...new Set([...a.split(" "),"external","noreferrer","noopener"].filter(Boolean))].join(" "),d=c()("components-external-link",i),f=!!n?.startsWith("#");return(0,r.createElement)("a",{...s,className:d,href:n,onClick:t=>{f&&t.preventDefault(),e.onClick&&e.onClick(t)},target:"_blank",rel:l,ref:t},o,(0,r.createElement)(ws,{as:"span"},(0,u.__)("(opens in a new tab)")),(0,r.createElement)(oA,{icon:rA,className:"components-external-link__icon"}))})),aA={width:200,height:170},sA=["avi","mpg","mpeg","mov","mp4","m4v","ogg","ogv","webm","wmv"];function lA(e){return Math.round(100*e)}const cA=bs("div",{target:"eeew7dm8"})({name:"jqnsxy",styles:"background-color:transparent;display:flex;text-align:center;width:100%"}),uA=bs("div",{target:"eeew7dm7"})("align-items:center;border-radius:",Xg.radiusBlockUi,";cursor:pointer;display:inline-flex;justify-content:center;margin:auto;position:relative;height:100%;&:after{border-radius:inherit;bottom:0;box-shadow:inset 0 0 0 1px rgba( 0, 0, 0, 0.1 );content:'';left:0;pointer-events:none;position:absolute;right:0;top:0;}img,video{border-radius:inherit;box-sizing:border-box;display:block;height:auto;margin:0;max-height:100%;max-width:100%;pointer-events:none;user-select:none;width:auto;}"),dA=bs("div",{target:"eeew7dm6"})("background:",Ds.gray[100],";border-radius:inherit;box-sizing:border-box;height:",aA.height,"px;max-width:280px;min-width:",aA.width,"px;width:100%;"),fA=bs(PC,{target:"eeew7dm5"})({name:"1d3w5wq",styles:"width:100%"});var mA={name:"1mn7kwb",styles:"padding-bottom:1em"};const pA=({__nextHasNoMarginBottom:e})=>e?void 0:mA;var hA={name:"1mn7kwb",styles:"padding-bottom:1em"};const gA=({hasHelpText:e=!1})=>e?hA:void 0,vA=bs($h,{target:"eeew7dm4"})("max-width:320px;padding-top:1em;",gA," ",pA,";"),bA=bs("div",{target:"eeew7dm3"})("left:50%;overflow:hidden;pointer-events:none;position:absolute;top:50%;transform:translate3d( -50%, -50%, 0 );transition:opacity 100ms linear;z-index:1;",As("transition")," opacity:",(({showOverlay:e})=>e?1:0),";"),yA=bs("div",{target:"eeew7dm2"})({name:"1yzbo24",styles:"background:rgba( 255, 255, 255, 0.4 );backdrop-filter:blur( 16px ) saturate( 180% );position:absolute;transform:translateZ( 0 )"}),xA=bs(yA,{target:"eeew7dm1"})({name:"1sw8ur",styles:"height:1px;left:1px;right:1px"}),wA=bs(yA,{target:"eeew7dm0"})({name:"188vg4t",styles:"width:1px;top:1px;bottom:1px"}),EA=0,_A=100,SA=()=>{};function CA({__nextHasNoMarginBottom:e,__next40pxDefaultSize:t,hasHelpText:n,onChange:o=SA,point:i={x:.5,y:.5}}){const a=lA(i.x),s=lA(i.y),l=(e,t)=>{if(void 0===e)return;const n=parseInt(e,10);isNaN(n)||o({...i,[t]:n/100})};return(0,r.createElement)(vA,{className:"focal-point-picker__controls",__nextHasNoMarginBottom:e,hasHelpText:n,gap:4},(0,r.createElement)(kA,{__next40pxDefaultSize:t,label:(0,u.__)("Left"),"aria-label":(0,u.__)("Focal point left position"),value:[a,"%"].join(""),onChange:e=>l(e,"x"),dragDirection:"e"}),(0,r.createElement)(kA,{__next40pxDefaultSize:t,label:(0,u.__)("Top"),"aria-label":(0,u.__)("Focal point top position"),value:[s,"%"].join(""),onChange:e=>l(e,"y"),dragDirection:"s"}))}function kA(e){return(0,r.createElement)(fA,{className:"focal-point-picker__controls-position-unit-control",labelPosition:"top",max:_A,min:EA,units:[{value:"%",label:"%"}],...e})}const PA=bs("div",{target:"e19snlhg0"})("background-color:transparent;cursor:grab;height:40px;margin:-20px 0 0 -20px;position:absolute;user-select:none;width:40px;will-change:transform;z-index:10000;background:rgba( 255, 255, 255, 0.4 );border:1px solid rgba( 255, 255, 255, 0.4 );border-radius:50%;backdrop-filter:blur( 16px ) saturate( 180% );box-shadow:rgb( 0 0 0 / 10% ) 0px 0px 8px;transition:transform 100ms linear;",As("transition")," ",(({isDragging:e})=>e&&"\n\t\t\tbox-shadow: rgb( 0 0 0 / 12% ) 0px 0px 10px;\n\t\t\ttransform: scale( 1.1 );\n\t\t\tcursor: grabbing;\n\t\t\t"),";");function TA({left:e="50%",top:t="50%",...n}){const o=c()("components-focal-point-picker__icon_container"),i={left:e,top:t};return(0,r.createElement)(PA,{...n,className:o,style:i})}function IA({bounds:e,...t}){return(0,r.createElement)(bA,{...t,className:"components-focal-point-picker__grid",style:{width:e.width,height:e.height}},(0,r.createElement)(xA,{style:{top:"33%"}}),(0,r.createElement)(xA,{style:{top:"66%"}}),(0,r.createElement)(wA,{style:{left:"33%"}}),(0,r.createElement)(wA,{style:{left:"66%"}}))}function RA({alt:e,autoPlay:t,src:n,onLoad:o,mediaRef:i,muted:a=!0,...s}){if(!n)return(0,r.createElement)(dA,{className:"components-focal-point-picker__media components-focal-point-picker__media--placeholder",ref:i,...s});return function(e=""){return!!e&&(e.startsWith("data:video/")||sA.includes(function(e=""){const t=e.split(".");return t[t.length-1]}(e)))}(n)?(0,r.createElement)("video",{...s,autoPlay:t,className:"components-focal-point-picker__media components-focal-point-picker__media--video",loop:!0,muted:a,onLoadedData:o,ref:i,src:n}):(0,r.createElement)("img",{...s,alt:e,className:"components-focal-point-picker__media components-focal-point-picker__media--image",onLoad:o,ref:i,src:n})}const MA=function e({__nextHasNoMarginBottom:t,__next40pxDefaultSize:n=!1,autoPlay:o=!0,className:i,help:a,label:s,onChange:l,onDrag:f,onDragEnd:m,onDragStart:p,resolvePoint:h,url:g,value:v={x:.5,y:.5},...b}){const[y,x]=(0,Uo.useState)(v),[w,E]=(0,Uo.useState)(!1),{startDrag:_,endDrag:S,isDragging:C}=(0,d.__experimentalUseDragging)({onDragStart:e=>{T.current?.focus();const t=N(e);t&&(p?.(t,e),x(t))},onDragMove:e=>{e.preventDefault();const t=N(e);t&&(f?.(t,e),x(t))},onDragEnd:()=>{m?.(),l?.(y)}}),{x:k,y:P}=C?y:v,T=(0,Uo.useRef)(null),[I,R]=(0,Uo.useState)(aA),M=(0,Uo.useRef)((()=>{if(!T.current)return;const{clientWidth:e,clientHeight:t}=T.current;R(e>0&&t>0?{width:e,height:t}:{...aA})}));(0,Uo.useEffect)((()=>{const e=M.current;if(!T.current)return;const{defaultView:t}=T.current.ownerDocument;return t?.addEventListener("resize",e),()=>t?.removeEventListener("resize",e)}),[]),(0,d.useIsomorphicLayoutEffect)((()=>{M.current()}),[]);const N=({clientX:e,clientY:t,shiftKey:n})=>{if(!T.current)return;const{top:r,left:o}=T.current.getBoundingClientRect();let i=(e-o)/I.width,a=(t-r)/I.height;return n&&(i=.1*Math.round(i/.1),a=.1*Math.round(a/.1)),D({x:i,y:a})},D=e=>{var t;const n=null!==(t=h?.(e))&&void 0!==t?t:e;n.x=Math.max(0,Math.min(n.x,1)),n.y=Math.max(0,Math.min(n.y,1));const r=e=>Math.round(100*e)/100;return{x:r(n.x),y:r(n.y)}},A={left:void 0!==k?k*I.width:.5*I.width,top:void 0!==P?P*I.height:.5*I.height},O=c()("components-focal-point-picker-control",i),z=`inspector-focal-point-picker-control-${(0,d.useInstanceId)(e)}`;return ui((()=>{E(!0);const e=window.setTimeout((()=>{E(!1)}),600);return()=>window.clearTimeout(e)}),[k,P]),(0,r.createElement)(iy,{...b,__nextHasNoMarginBottom:t,label:s,id:z,help:a,className:O},(0,r.createElement)(cA,{className:"components-focal-point-picker-wrapper"},(0,r.createElement)(uA,{className:"components-focal-point-picker",onKeyDown:e=>{const{code:t,shiftKey:n}=e;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t))return;e.preventDefault();const r={x:k,y:P},o=n?.1:.01,i="ArrowUp"===t||"ArrowLeft"===t?-1*o:o,a="ArrowUp"===t||"ArrowDown"===t?"y":"x";r[a]=r[a]+i,l?.(D(r))},onMouseDown:_,onBlur:()=>{C&&S()},ref:T,role:"button",tabIndex:-1},(0,r.createElement)(IA,{bounds:I,showOverlay:w}),(0,r.createElement)(RA,{alt:(0,u.__)("Media preview"),autoPlay:o,onLoad:M.current,src:g}),(0,r.createElement)(TA,{...A,isDragging:C}))),(0,r.createElement)(CA,{__nextHasNoMarginBottom:t,__next40pxDefaultSize:n,hasHelpText:!!a,point:{x:k,y:P},onChange:e=>{l?.(D(e))}}))};function NA({iframeRef:e,...t}){const n=(0,d.useMergeRefs)([e,(0,d.useFocusableIframe)()]);return qo()("wp.components.FocusableIframe",{since:"5.9",alternative:"wp.compose.useFocusableIframe"}),(0,r.createElement)("iframe",{ref:n,...t})}const DA=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,r.createElement)(n.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"}));function AA(e){const[t,...n]=e;if(!t)return null;const[,r]=xC(t.size);return n.every((e=>{const[,t]=xC(e.size);return t===r}))?r:null}const OA=bs("fieldset",{target:"e8tqeku4"})({name:"1t1ytme",styles:"border:0;margin:0;padding:0"}),zA=bs(Py,{target:"e8tqeku3"})("height:",Ah(4),";"),LA=bs(my,{target:"e8tqeku2"})("margin-top:",Ah(-1),";"),FA=bs(iy.VisualLabel,{target:"e8tqeku1"})("display:flex;gap:",Ah(1),";justify-content:flex-start;margin-bottom:0;"),BA=bs("span",{target:"e8tqeku0"})("color:",Ds.gray[700],";"),jA={key:"default",name:(0,u.__)("Default"),value:void 0},VA={key:"custom",name:(0,u.__)("Custom")},HA=e=>{var t;const{__next40pxDefaultSize:n,fontSizes:o,value:i,disableCustomFontSizes:a,size:s,onChange:l,onSelectCustom:c}=e,d=!!AA(o),f=[jA,...o.map((e=>{let t;if(d){const[n]=xC(e.size);void 0!==n&&(t=String(n))}else(function(e){return/^[\d\.]+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i.test(String(e))})(e.size)&&(t=String(e.size));return{key:e.slug,name:e.name||e.slug,value:e.size,__experimentalHint:t}})),...a?[]:[VA]],m=i?null!==(t=f.find((e=>e.value===i)))&&void 0!==t?t:VA:jA;return(0,r.createElement)(wM,{__next40pxDefaultSize:n,__nextUnconstrainedWidth:!0,className:"components-font-size-picker__select",label:(0,u.__)("Font size"),hideLabelFromVision:!0,describedBy:(0,u.sprintf)((0,u.__)("Currently selected font size: %s"),m.name),options:f,value:m,__experimentalShowSelectedHint:!0,onChange:({selectedItem:e})=>{e===VA?c():l(e.value)},size:s})};const $A=(0,Uo.forwardRef)((function(e,t){const{label:n,...o}=e,i=o["aria-label"]||n;return(0,r.createElement)(TE,{...o,"aria-label":i,ref:t},n)})),WA=[(0,u.__)("S"),(0,u.__)("M"),(0,u.__)("L"),(0,u.__)("XL"),(0,u.__)("XXL")],UA=[(0,u.__)("Small"),(0,u.__)("Medium"),(0,u.__)("Large"),(0,u.__)("Extra Large"),(0,u.__)("Extra Extra Large")],GA=e=>{const{fontSizes:t,value:n,__next40pxDefaultSize:o,size:i,onChange:a}=e;return(0,r.createElement)(fE,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:o,label:(0,u.__)("Font size"),hideLabelFromVision:!0,value:n,onChange:a,isBlock:!0,size:i},t.map(((e,t)=>(0,r.createElement)($A,{key:e.slug,value:e.size,label:WA[t],"aria-label":e.name||UA[t],showTooltip:!0}))))},qA=(0,Uo.forwardRef)(((e,t)=>{const{__next40pxDefaultSize:n=!1,fallbackFontSize:o,fontSizes:i=[],disableCustomFontSizes:a=!1,onChange:s,size:l="default",units:c,value:d,withSlider:f=!1,withReset:m=!0}=e,p=wC({availableUnits:c||["px","em","rem"]}),h=i.length>5,g=i.find((e=>e.size===d)),v=!!d&&!g,[b,y]=(0,Uo.useState)(!a&&v),x=(0,Uo.useMemo)((()=>{if(b)return(0,u.__)("Custom");if(!h)return g?g.name||UA[i.indexOf(g)]:"";const e=AA(i);return e?`(${e})`:""}),[b,h,g,i]);if(0===i.length&&a)return null;const w="string"==typeof d||"string"==typeof i[0]?.size,[E,_]=xC(d,p),S=!!_&&["em","rem"].includes(_),C=void 0===d;return(0,r.createElement)(OA,{ref:t,className:"components-font-size-picker"},(0,r.createElement)(ws,{as:"legend"},(0,u.__)("Font size")),(0,r.createElement)(tg,null,(0,r.createElement)(zA,{className:"components-font-size-picker__header"},(0,r.createElement)(FA,{"aria-label":`${(0,u.__)("Size")} ${x||""}`},(0,u.__)("Size"),x&&(0,r.createElement)(BA,{className:"components-font-size-picker__header__hint"},x)),!a&&(0,r.createElement)(LA,{label:b?(0,u.__)("Use size preset"):(0,u.__)("Set custom size"),icon:DA,onClick:()=>{y(!b)},isPressed:b,size:"small"}))),(0,r.createElement)("div",null,!!i.length&&h&&!b&&(0,r.createElement)(HA,{__next40pxDefaultSize:n,fontSizes:i,value:d,disableCustomFontSizes:a,size:l,onChange:e=>{void 0===e?s?.(void 0):s?.(w?e:Number(e),i.find((t=>t.size===e)))},onSelectCustom:()=>y(!0)}),!h&&!b&&(0,r.createElement)(GA,{fontSizes:i,value:d,__next40pxDefaultSize:n,size:l,onChange:e=>{void 0===e?s?.(void 0):s?.(w?e:Number(e),i.find((t=>t.size===e)))}}),!a&&b&&(0,r.createElement)($h,{className:"components-font-size-picker__custom-size-control"},(0,r.createElement)(og,{isBlock:!0},(0,r.createElement)(PC,{__next40pxDefaultSize:n,label:(0,u.__)("Custom"),labelPosition:"top",hideLabelFromVision:!0,value:d,onChange:e=>{s?.(void 0===e?void 0:w?e:parseInt(e,10))},size:l,units:w?p:[],min:0})),f&&(0,r.createElement)(og,{isBlock:!0},(0,r.createElement)(tg,{marginX:2,marginBottom:0},(0,r.createElement)(k_,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:n,className:"components-font-size-picker__custom-input",label:(0,u.__)("Custom Size"),hideLabelFromVision:!0,value:E,initialPosition:o,withInputField:!1,onChange:e=>{s?.(void 0===e?void 0:w?e+(null!=_?_:"px"):e)},min:0,max:S?10:100,step:S?.1:1}))),m&&(0,r.createElement)(og,null,(0,r.createElement)(fy,{disabled:C,__experimentalIsFocusable:!0,onClick:()=>{s?.(void 0)},variant:"secondary",__next40pxDefaultSize:!0,size:"__unstable-large"===l||e.__next40pxDefaultSize?"default":"small"},(0,u.__)("Reset"))))))})),YA=qA;const KA=function({accept:e,children:t,multiple:n=!1,onChange:o,onClick:i,render:a,...s}){const l=(0,Uo.useRef)(null),c=()=>{l.current?.click()},u=a?a({openFileDialog:c}):(0,r.createElement)(my,{onClick:c,...s},t);return(0,r.createElement)("div",{className:"components-form-file-upload"},u,(0,r.createElement)("input",{type:"file",ref:l,multiple:n,style:{display:"none"},accept:e,onChange:o,onClick:i,"data-testid":"form-file-upload-input"}))},XA=()=>{};const ZA=function(e){const{className:t,checked:n,id:o,disabled:i,onChange:a=XA,...s}=e,l=c()("components-form-toggle",t,{"is-checked":n,"is-disabled":i});return(0,r.createElement)("span",{className:l},(0,r.createElement)("input",{className:"components-form-toggle__input",id:o,type:"checkbox",checked:n,onChange:a,disabled:i,...s}),(0,r.createElement)("span",{className:"components-form-toggle__track"}),(0,r.createElement)("span",{className:"components-form-toggle__thumb"}))},JA=()=>{};function QA({value:e,status:t,title:n,displayTransform:o,isBorderless:i=!1,disabled:a=!1,onClickRemove:s=JA,onMouseEnter:l,onMouseLeave:f,messages:m,termPosition:p,termsCount:h}){const g=(0,d.useInstanceId)(QA),v=c()("components-form-token-field__token",{"is-error":"error"===t,"is-success":"success"===t,"is-validating":"validating"===t,"is-borderless":i,"is-disabled":a}),b=o(e),y=(0,u.sprintf)((0,u.__)("%1$s (%2$s of %3$s)"),b,p,h);return(0,r.createElement)("span",{className:v,onMouseEnter:l,onMouseLeave:f,title:n},(0,r.createElement)("span",{className:"components-form-token-field__token-text",id:`components-form-token-field__token-text-${g}`},(0,r.createElement)(ws,{as:"span"},y),(0,r.createElement)("span",{"aria-hidden":"true"},b)),(0,r.createElement)(my,{className:"components-form-token-field__remove-token",icon:zw,onClick:a?void 0:()=>s({value:e}),disabled:a,label:m.remove,"aria-describedby":`components-form-token-field__token-text-${g}`}))}const eO=({__next40pxDefaultSize:e,hasTokens:t})=>!e&&Ps("padding-top:",Ah(t?1:.5),";padding-bottom:",Ah(t?1:.5),";",""),tO=bs($h,{target:"ehq8nmi0"})("padding:7px;",Kb," ",eO,";"),nO=e=>e;const rO=function e(t){const{autoCapitalize:n,autoComplete:o,maxLength:i,placeholder:a,label:s=(0,u.__)("Add item"),className:l,suggestions:f=[],maxSuggestions:m=100,value:p=[],displayTransform:h=nO,saveTransform:g=(e=>e.trim()),onChange:v=(()=>{}),onInputChange:b=(()=>{}),onFocus:y,isBorderless:x=!1,disabled:w=!1,tokenizeOnSpace:E=!1,messages:_={added:(0,u.__)("Item added."),removed:(0,u.__)("Item removed."),remove:(0,u.__)("Remove item"),__experimentalInvalid:(0,u.__)("Invalid item")},__experimentalRenderItem:S,__experimentalExpandOnFocus:C=!1,__experimentalValidateInput:k=(()=>!0),__experimentalShowHowTo:P=!0,__next40pxDefaultSize:T=!1,__experimentalAutoSelectFirstMatch:I=!1,__nextHasNoMarginBottom:R=!1,tokenizeOnBlur:M=!1}=Nv(t),N=(0,d.useInstanceId)(e),[D,A]=(0,Uo.useState)(""),[O,z]=(0,Uo.useState)(0),[L,F]=(0,Uo.useState)(!1),[B,j]=(0,Uo.useState)(!1),[V,H]=(0,Uo.useState)(-1),[$,W]=(0,Uo.useState)(!1),U=(0,d.usePrevious)(f),G=(0,d.usePrevious)(p),q=(0,Uo.useRef)(null),Y=(0,Uo.useRef)(null),K=(0,d.useDebounce)(jy.speak,500);function X(){q.current?.focus()}function Z(){return q.current===q.current?.ownerDocument.activeElement}function J(e){if(me()&&k(D))F(!1),M&&me()&&se(D);else{if(A(""),z(0),F(!1),C){const t=e.relatedTarget===Y.current;j(t)}else j(!1);H(-1),W(!1)}}function Q(e){e.target===Y.current&&L&&e.preventDefault()}function ee(e){le(e.value),X()}function te(e){const t=e.value,n=E?/[ ,\t]+/:/[,\t]+/,r=t.split(n),o=r[r.length-1]||"";r.length>1&&ae(r.slice(0,-1)),A(o),b(o)}function ne(e){let t=!1;return Z()&&fe()&&(e(),t=!0),t}function re(){const e=de()-1;e>-1&&le(p[e])}function oe(){const e=de();e<p.length&&(le(p[e]),function(e){z(p.length-Math.max(e,-1)-1)}(e))}function ie(){let e=!1;const t=function(){if(-1!==V)return ue()[V];return}();return t?(se(t),e=!0):me()&&(se(D),e=!0),e}function ae(e){const t=[...new Set(e.map(g).filter(Boolean).filter((e=>!function(e){return p.some((t=>ce(e)===ce(t)))}(e))))];if(t.length>0){const e=[...p];e.splice(de(),0,...t),v(e)}}function se(e){k(e)?(ae([e]),(0,jy.speak)(_.added,"assertive"),A(""),H(-1),W(!1),j(!C),L&&!M&&X()):(0,jy.speak)(_.__experimentalInvalid,"assertive")}function le(e){const t=p.filter((t=>ce(t)!==ce(e)));v(t),(0,jy.speak)(_.removed,"assertive")}function ce(e){return"object"==typeof e?e.value:e}function ue(e=D,t=f,n=p,r=m,o=g){let i=o(e);const a=[],s=[],l=n.map((e=>"string"==typeof e?e:e.value));return 0===i.length?t=t.filter((e=>!l.includes(e))):(i=i.toLocaleLowerCase(),t.forEach((e=>{const t=e.toLocaleLowerCase().indexOf(i);-1===l.indexOf(e)&&(0===t?a.push(e):t>0&&s.push(e))})),t=a.concat(s)),t.slice(0,r)}function de(){return p.length-O}function fe(){return 0===D.length}function me(){return g(D).length>0}function pe(e=!0){const t=D.trim().length>1,n=ue(D),r=n.length>0,o=Z()&&C;if(j(o||t&&r),e&&(I&&t&&r?(H(0),W(!0)):(H(-1),W(!1))),t){const e=r?(0,u.sprintf)((0,u._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",n.length),n.length):(0,u.__)("No results.");K(e,"assertive")}}function he(e,t,n){const o=ce(e),i="string"!=typeof e?e.status:void 0,a=t+1,s=n.length;return(0,r.createElement)(og,{key:"token-"+o},(0,r.createElement)(QA,{value:o,status:i,title:"string"!=typeof e?e.title:void 0,displayTransform:h,onClickRemove:ee,isBorderless:"string"!=typeof e&&e.isBorderless||x,onMouseEnter:"string"!=typeof e?e.onMouseEnter:void 0,onMouseLeave:"string"!=typeof e?e.onMouseLeave:void 0,disabled:"error"!==i&&w,messages:_,termsCount:s,termPosition:a}))}(0,Uo.useEffect)((()=>{L&&!Z()&&X()}),[L]),(0,Uo.useEffect)((()=>{const e=!ow()(f,U||[]);(e||p!==G)&&pe(e)}),[f,U,p,G]),(0,Uo.useEffect)((()=>{pe()}),[D]),(0,Uo.useEffect)((()=>{pe()}),[I]),w&&L&&(F(!1),A(""));const ge=c()(l,"components-form-token-field__input-container",{"is-active":L,"is-disabled":w});let ve={className:"components-form-token-field",tabIndex:-1};const be=ue();return w||(ve=Object.assign({},ve,{onKeyDown:function(e){let t=!1;if(!e.defaultPrevented&&!e.nativeEvent.isComposing&&229!==e.keyCode){switch(e.key){case"Backspace":t=ne(re);break;case"Enter":t=ie();break;case"ArrowLeft":t=function(){let e=!1;return fe()&&(z((e=>Math.min(e+1,p.length))),e=!0),e}();break;case"ArrowUp":H((e=>(0===e?ue(D,f,p,m,g).length:e)-1)),W(!0),t=!0;break;case"ArrowRight":t=function(){let e=!1;return fe()&&(z((e=>Math.max(e-1,0))),e=!0),e}();break;case"ArrowDown":H((e=>(e+1)%ue(D,f,p,m,g).length)),W(!0),t=!0;break;case"Delete":t=ne(oe);break;case"Space":E&&(t=ie());break;case"Escape":t=function(e){return e.target instanceof HTMLInputElement&&(A(e.target.value),j(!1),H(-1),W(!1)),!0}(e)}t&&e.preventDefault()}},onKeyPress:function(e){let t=!1;","===e.key&&(me()&&se(D),t=!0);t&&e.preventDefault()},onFocus:function(e){Z()||e.target===Y.current?(F(!0),j(C||B)):F(!1),"function"==typeof y&&y(e)}})),(0,r.createElement)("div",{...ve},(0,r.createElement)(Qb,{htmlFor:`components-form-token-input-${N}`,className:"components-form-token-field__label"},s),(0,r.createElement)("div",{ref:Y,className:ge,tabIndex:-1,onMouseDown:Q,onTouchStart:Q},(0,r.createElement)(tO,{justify:"flex-start",align:"center",gap:1,wrap:!0,__next40pxDefaultSize:T,hasTokens:!!p.length},function(){const e=p.map(he);return e.splice(de(),0,function(){const e={instanceId:N,autoCapitalize:n,autoComplete:o,placeholder:0===p.length?a:"",key:"input",disabled:w,value:D,onBlur:J,isExpanded:B,selectedSuggestionIndex:V};return(0,r.createElement)(xI,{...e,onChange:i&&p.length>=i?void 0:te,ref:q})}()),e}()),B&&(0,r.createElement)(SI,{instanceId:N,match:g(D),displayTransform:h,suggestions:be,selectedIndex:V,scrollIntoView:$,onHover:function(e){const t=ue().indexOf(e);t>=0&&(H(t),W(!1))},onSelect:function(e){se(e)},__experimentalRenderItem:S})),!R&&(0,r.createElement)(tg,{marginBottom:2}),P&&(0,r.createElement)(ty,{id:`components-form-token-suggestions-howto-${N}`,className:"components-form-token-field__help",__nextHasNoMarginBottom:R},E?(0,u.__)("Separate with commas, spaces, or the Enter key."):(0,u.__)("Separate with commas or the Enter key.")))},oO=()=>(0,r.createElement)(n.SVG,{width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(n.Circle,{cx:"4",cy:"4",r:"4"}));function iO({currentPage:e,numberOfPages:t,setCurrentPage:n}){return(0,r.createElement)("ul",{className:"components-guide__page-control","aria-label":(0,u.__)("Guide controls")},Array.from({length:t}).map(((o,i)=>(0,r.createElement)("li",{key:i,"aria-current":i===e?"step":void 0},(0,r.createElement)(my,{key:i,icon:(0,r.createElement)(oO,null),"aria-label":(0,u.sprintf)((0,u.__)("Page %1$d of %2$d"),i+1,t),onClick:()=>n(i)})))))}const aO=function({children:e,className:t,contentLabel:n,finishButtonText:o=(0,u.__)("Finish"),onFinish:i,pages:a=[]}){const s=(0,Uo.useRef)(null),[l,d]=(0,Uo.useState)(0);var f;(0,Uo.useEffect)((()=>{const e=s.current?.querySelector(".components-guide");e instanceof HTMLElement&&e.focus()}),[l]),(0,Uo.useEffect)((()=>{Uo.Children.count(e)&&qo()("Passing children to <Guide>",{since:"5.5",alternative:"the `pages` prop"})}),[e]),Uo.Children.count(e)&&(a=null!==(f=Uo.Children.map(e,(e=>({content:e}))))&&void 0!==f?f:[]);const m=l>0,p=l<a.length-1,h=()=>{m&&d(l-1)},g=()=>{p&&d(l+1)};return 0===a.length?null:(0,r.createElement)(qI,{className:c()("components-guide",t),contentLabel:n,isDismissible:a.length>1,onRequestClose:i,onKeyDown:e=>{"ArrowLeft"===e.code?(h(),e.preventDefault()):"ArrowRight"===e.code&&(g(),e.preventDefault())},ref:s},(0,r.createElement)("div",{className:"components-guide__container"},(0,r.createElement)("div",{className:"components-guide__page"},a[l].image,a.length>1&&(0,r.createElement)(iO,{currentPage:l,numberOfPages:a.length,setCurrentPage:d}),a[l].content),(0,r.createElement)("div",{className:"components-guide__footer"},m&&(0,r.createElement)(my,{className:"components-guide__back-button",variant:"tertiary",onClick:h},(0,u.__)("Previous")),p&&(0,r.createElement)(my,{className:"components-guide__forward-button",variant:"primary",onClick:g},(0,u.__)("Next")),!p&&(0,r.createElement)(my,{className:"components-guide__finish-button",variant:"primary",onClick:i},o))))};function sO(e){return(0,Uo.useEffect)((()=>{qo()("<GuidePage>",{since:"5.5",alternative:"the `pages` prop in <Guide>"})}),[]),(0,r.createElement)("div",{...e})}const lO=(0,Uo.forwardRef)((function({label:e,labelPosition:t,size:n,tooltip:o,...i},a){return qo()("wp.components.IconButton",{since:"5.4",alternative:"wp.components.Button",version:"6.2"}),(0,r.createElement)(my,{...i,ref:a,tooltipPosition:t,iconSize:n,showTooltip:void 0!==o?!!o:void 0,label:o||e})}));const cO=os((function(e,t){const{role:n,wrapperClassName:o,...i}=function(e){const{as:t,className:n,onClick:r,role:o="listitem",size:i,...a}=rs(e,"Item"),{spacedAround:s,size:l}=iT(),c=i||l,u=t||(void 0!==r?"button":"div"),d=ns(),f=(0,Uo.useMemo)((()=>d(("button"===u||"a"===u)&&UP(u),rT[c]||rT.medium,qP,s&&ZP,n)),[u,n,d,c,s]),m=d(GP);return{as:u,className:f,onClick:r,wrapperClassName:m,role:o,...a}}(e);return(0,r.createElement)("div",{role:n,className:o},(0,r.createElement)(xs,{...i,ref:t}))}),"Item"),uO=cO;const dO=os((function(e,t){const n=rs(e,"InputControlPrefixWrapper");return(0,r.createElement)(tg,{marginBottom:0,...n,ref:t})}),"InputControlPrefixWrapper");function fO({target:e,callback:t,shortcut:n,bindGlobal:r,eventName:o}){return(0,d.useKeyboardShortcut)(n,t,{bindGlobal:r,target:e,eventName:o}),null}const mO=function({children:e,shortcuts:t,bindGlobal:n,eventName:o}){const i=(0,Uo.useRef)(null),a=Object.entries(null!=t?t:{}).map((([e,t])=>(0,r.createElement)(fO,{key:e,shortcut:e,callback:t,bindGlobal:n,eventName:o,target:i})));return Uo.Children.count(e)?(0,r.createElement)("div",{ref:i},a,e):(0,r.createElement)(r.Fragment,null,a)};const pO=function e(t){const{children:n,className:o="",label:i,hideSeparator:a}=t,s=(0,d.useInstanceId)(e);if(!Uo.Children.count(n))return null;const l=`components-menu-group-label-${s}`,u=c()(o,"components-menu-group",{"has-hidden-separator":a});return(0,r.createElement)("div",{className:u},i&&(0,r.createElement)("div",{className:"components-menu-group__label",id:l,"aria-hidden":"true"},i),(0,r.createElement)("div",{role:"group","aria-labelledby":i?l:void 0},n))};const hO=(0,Uo.forwardRef)((function(e,t){let{children:n,info:o,className:i,icon:a,iconPosition:s="right",shortcut:l,isSelected:u,role:d="menuitem",suffix:f,...m}=e;return i=c()("components-menu-item__button",i),o&&(n=(0,r.createElement)("span",{className:"components-menu-item__info-wrapper"},(0,r.createElement)("span",{className:"components-menu-item__item"},n),(0,r.createElement)("span",{className:"components-menu-item__info"},o))),a&&"string"!=typeof a&&(a=(0,Uo.cloneElement)(a,{className:c()("components-menu-items__item-icon",{"has-icon-right":"right"===s})})),(0,r.createElement)(my,{ref:t,"aria-checked":"menuitemcheckbox"===d||"menuitemradio"===d?u:void 0,role:d,icon:"left"===s?a:void 0,className:i,...m},(0,r.createElement)("span",{className:"components-menu-item__item"},n),!f&&(0,r.createElement)(Yo,{className:"components-menu-item__shortcut",shortcut:l}),!f&&a&&"right"===s&&(0,r.createElement)(uy,{icon:a}),f)})),gO=hO,vO=()=>{};const bO=function({choices:e=[],onHover:t=vO,onSelect:n,value:o}){return(0,r.createElement)(r.Fragment,null,e.map((e=>{const i=o===e.value;return(0,r.createElement)(gO,{key:e.value,role:"menuitemradio",disabled:e.disabled,icon:i?DS:null,info:e.info,isSelected:i,shortcut:e.shortcut,className:"components-menu-items-choice",onClick:()=>{i||n(e.value)},onMouseEnter:()=>t(e.value),onMouseLeave:()=>t(null),"aria-label":e["aria-label"]},e.label)})))};const yO=(0,Uo.forwardRef)((function({eventToOffset:e,...t},n){return(0,r.createElement)(qT,{ref:n,stopNavigationEvents:!0,onlyBrowserTabstops:!0,eventToOffset:t=>{const{code:n,shiftKey:r}=t;return"Tab"===n?r?-1:1:e?e(t):void 0},...t})})),xO="root",wO=100,EO=()=>{},_O=()=>{},SO=(0,Uo.createContext)({activeItem:void 0,activeMenu:xO,setActiveMenu:EO,navigationTree:{items:{},getItem:_O,addItem:EO,removeItem:EO,menus:{},getMenu:_O,addMenu:EO,removeMenu:EO,childMenu:{},traverseMenu:EO,isMenuEmpty:()=>!1}}),CO=()=>(0,Uo.useContext)(SO);const kO=bs("div",{target:"eeiismy11"})("width:100%;box-sizing:border-box;padding:0 ",Ah(4),";overflow:hidden;"),PO=bs("div",{target:"eeiismy10"})("margin-top:",Ah(6),";margin-bottom:",Ah(6),";display:flex;flex-direction:column;ul{padding:0;margin:0;list-style:none;}.components-navigation__back-button{margin-bottom:",Ah(6),";}.components-navigation__group+.components-navigation__group{margin-top:",Ah(6),";}"),TO=bs(my,{target:"eeiismy9"})({name:"26l0q2",styles:"&.is-tertiary{color:inherit;opacity:0.7;&:hover:not( :disabled ){opacity:1;box-shadow:none;color:inherit;}&:active:not( :disabled ){background:transparent;opacity:1;color:inherit;}}"}),IO=bs("div",{target:"eeiismy8"})({name:"1aubja5",styles:"overflow:hidden;width:100%"}),RO=bs("div",{target:"eeiismy7"})({name:"rgorny",styles:"margin:11px 0;padding:1px"}),MO=bs("span",{target:"eeiismy6"})("height:",Ah(6),";.components-button.is-small{color:inherit;opacity:0.7;margin-right:",Ah(1),";padding:0;&:active:not( :disabled ){background:none;opacity:1;color:inherit;}&:hover:not( :disabled ){box-shadow:none;opacity:1;color:inherit;}}"),NO=bs($S,{target:"eeiismy5"})("min-height:",Ah(12),";align-items:center;color:inherit;display:flex;justify-content:space-between;margin-bottom:",Ah(2),";padding:",(()=>(0,u.isRTL)()?`${Ah(1)} ${Ah(4)} ${Ah(1)} ${Ah(2)}`:`${Ah(1)} ${Ah(2)} ${Ah(1)} ${Ah(4)}`),";"),DO=bs("li",{target:"eeiismy4"})("border-radius:2px;color:inherit;margin-bottom:0;>button,>a.components-button,>a{width:100%;color:inherit;opacity:0.7;padding:",Ah(2)," ",Ah(4),";",Jh({textAlign:"left"},{textAlign:"right"})," &:hover,&:focus:not( [aria-disabled='true'] ):active,&:active:not( [aria-disabled='true'] ):active{color:inherit;opacity:1;}}&.is-active{background-color:",Ds.theme.accent,";color:",Ds.white,";>button,>a{color:",Ds.white,";opacity:1;}}>svg path{color:",Ds.gray[600],";}"),AO=bs("div",{target:"eeiismy3"})("display:flex;align-items:center;height:auto;min-height:40px;margin:0;padding:",Ah(1.5)," ",Ah(4),";font-weight:400;line-height:20px;width:100%;color:inherit;opacity:0.7;"),OO=bs("span",{target:"eeiismy2"})("display:flex;margin-right:",Ah(2),";"),zO=bs("span",{target:"eeiismy1"})("margin-left:",(()=>(0,u.isRTL)()?"0":Ah(2)),";margin-right:",(()=>(0,u.isRTL)()?Ah(2):"0"),";display:inline-flex;padding:",Ah(1)," ",Ah(3),";border-radius:2px;animation:fade-in 250ms ease-out;@keyframes fade-in{from{opacity:0;}to{opacity:1;}}",As("animation"),";"),LO=bs(mv,{target:"eeiismy0"})((()=>(0,u.isRTL)()?"margin-left: auto;":"margin-right: auto;")," font-size:14px;line-height:20px;color:inherit;");function FO(){const[e,t]=(0,Uo.useState)({});return{nodes:e,getNode:t=>e[t],addNode:(e,n)=>{const{children:r,...o}=n;return t((t=>({...t,[e]:o})))},removeNode:e=>t((t=>{const{[e]:n,...r}=t;return r}))}}const BO=()=>{};const jO=function({activeItem:e,activeMenu:t=xO,children:n,className:o,onActivateMenu:i=BO}){const[a,s]=(0,Uo.useState)(t),[l,d]=(0,Uo.useState)(),f=(()=>{const{nodes:e,getNode:t,addNode:n,removeNode:r}=FO(),{nodes:o,getNode:i,addNode:a,removeNode:s}=FO(),[l,c]=(0,Uo.useState)({}),u=e=>l[e]||[],d=(e,t)=>{const n=[];let r,o=[e];for(;o.length>0&&(r=i(o.shift()),!r||n.includes(r.menu)||(n.push(r.menu),o=[...o,...u(r.menu)],!1!==t(r))););};return{items:e,getItem:t,addItem:n,removeItem:r,menus:o,getMenu:i,addMenu:(e,t)=>{c((n=>{const r={...n};return t.parentMenu?(r[t.parentMenu]||(r[t.parentMenu]=[]),r[t.parentMenu].push(e),r):r})),a(e,t)},removeMenu:s,childMenu:l,traverseMenu:d,isMenuEmpty:e=>{let t=!0;return d(e,(e=>{if(!e.isEmpty)return t=!1,!1})),t}}})(),m=(0,u.isRTL)()?"right":"left",p=(e,t=m)=>{f.getMenu(e)&&(d(t),s(e),i(e))},h=(0,Uo.useRef)(!1);(0,Uo.useEffect)((()=>{h.current||(h.current=!0)}),[]),(0,Uo.useEffect)((()=>{t!==a&&p(t)}),[t]);const g={activeItem:e,activeMenu:a,setActiveMenu:p,navigationTree:f},v=c()("components-navigation",o),b=gl({type:"slide-in",origin:l});return(0,r.createElement)(kO,{className:v},(0,r.createElement)("div",{key:a,className:b?c()({[b]:h.current&&l}):void 0},(0,r.createElement)(SO.Provider,{value:g},n)))},VO=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),HO=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));const $O=(0,Uo.forwardRef)((function({backButtonLabel:e,className:t,href:n,onClick:o,parentMenu:i},a){const{setActiveMenu:s,navigationTree:l}=CO(),d=c()("components-navigation__back-button",t),f=void 0!==i?l.getMenu(i)?.title:void 0,m=(0,u.isRTL)()?VO:HO;return(0,r.createElement)(TO,{className:d,href:n,variant:"tertiary",ref:a,onClick:e=>{"function"==typeof o&&o(e);const t=(0,u.isRTL)()?"left":"right";i&&!e.defaultPrevented&&s(i,t)}},(0,r.createElement)($E,{icon:m}),e||f||(0,u.__)("Back"))})),WO=$O,UO=(0,Uo.createContext)({group:void 0});let GO=0;const qO=function({children:e,className:t,title:n}){const[o]=(0,Uo.useState)("group-"+ ++GO),{navigationTree:{items:i}}=CO(),a={group:o};if(!Object.values(i).some((e=>e.group===o&&e._isVisible)))return(0,r.createElement)(UO.Provider,{value:a},e);const s=`components-navigation__group-title-${o}`,l=c()("components-navigation__group",t);return(0,r.createElement)(UO.Provider,{value:a},(0,r.createElement)("li",{className:l},n&&(0,r.createElement)(NO,{className:"components-navigation__group-title",id:s,level:3},n),(0,r.createElement)("ul",{"aria-labelledby":s,role:"group"},e)))};function YO(e){const{badge:t,title:n}=e;return(0,r.createElement)(r.Fragment,null,n&&(0,r.createElement)(LO,{className:"components-navigation__item-title",as:"span"},n),t&&(0,r.createElement)(zO,{className:"components-navigation__item-badge"},t))}const KO=(0,Uo.createContext)({menu:void 0,search:""}),XO=()=>(0,Uo.useContext)(KO),ZO=e=>Fy()(e).replace(/^\//,"").toLowerCase(),JO=(e,t)=>{const{activeMenu:n,navigationTree:{addItem:r,removeItem:o}}=CO(),{group:i}=(0,Uo.useContext)(UO),{menu:a,search:s}=XO();(0,Uo.useEffect)((()=>{const l=n===a,c=!s||void 0!==t.title&&((e,t)=>-1!==ZO(e).indexOf(ZO(t)))(t.title,s);return r(e,{...t,group:i,menu:a,_isVisible:l&&c}),()=>{o(e)}}),[n,s])};let QO=0;function ez(e){const{children:t,className:n,title:o,href:i,...a}=e,[s]=(0,Uo.useState)("item-"+ ++QO);JO(s,e);const{navigationTree:l}=CO();if(!l.getItem(s)?._isVisible)return null;const u=c()("components-navigation__item",n);return(0,r.createElement)(DO,{className:u,...a},t)}const tz=()=>{};const nz=function(e){const{badge:t,children:n,className:o,href:i,item:a,navigateToMenu:s,onClick:l=tz,title:d,icon:f,hideIfTargetMenuEmpty:m,isText:p,...h}=e,{activeItem:g,setActiveMenu:v,navigationTree:{isMenuEmpty:b}}=CO();if(m&&s&&b(s))return null;const y=a&&g===a,x=c()(o,{"is-active":y}),w=(0,u.isRTL)()?HO:VO,E=n?e:{...e,onClick:void 0},_=p?h:{as:my,href:i,onClick:e=>{s&&v(s),l(e)},"aria-current":y?"page":void 0,...h};return(0,r.createElement)(ez,{...E,className:x},n||(0,r.createElement)(AO,{..._},f&&(0,r.createElement)(OO,null,(0,r.createElement)($E,{icon:f})),(0,r.createElement)(YO,{title:d,badge:t}),s&&(0,r.createElement)($E,{icon:w})))},rz=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(n.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})),oz=(0,d.createHigherOrderComponent)((e=>t=>(0,r.createElement)(e,{...t,speak:jy.speak,debouncedSpeak:(0,d.useDebounce)(jy.speak,500)})),"withSpokenMessages"),iz=bs("div",{target:"effl84m1"})("display:flex;padding-inline-end:",(({size:e})=>Ah("compact"===e?1:2)),";svg{fill:currentColor;}"),az=bs(ly,{target:"effl84m0"})("input[type='search']{&::-webkit-search-decoration,&::-webkit-search-cancel-button,&::-webkit-search-results-button,&::-webkit-search-results-decoration{-webkit-appearance:none;}}&:not( :focus-within ){--wp-components-color-background:",Ds.theme.gray[100],";}");function sz({searchRef:e,value:t,onChange:n,onClose:o}){if(!o&&!t)return(0,r.createElement)($E,{icon:rz});return(0,r.createElement)(my,{size:"small",icon:zw,label:o?(0,u.__)("Close search"):(0,u.__)("Reset search"),onClick:null!=o?o:()=>{n(""),e.current?.focus()}})}const lz=(0,Uo.forwardRef)((function({__nextHasNoMarginBottom:e=!1,className:t,onChange:n,value:o,label:i=(0,u.__)("Search"),placeholder:a=(0,u.__)("Search"),hideLabelFromVision:s=!0,onClose:l,size:f="default",...m},p){delete m.disabled;const h=(0,Uo.useRef)(null),g=(0,d.useInstanceId)(lz,"components-search-control"),v=(0,Uo.useMemo)((()=>({BaseControl:{_overrides:{__nextHasNoMarginBottom:e}},InputBase:{isBorderless:!0}})),[e]);return(0,r.createElement)(mi,{value:v},(0,r.createElement)(az,{__next40pxDefaultSize:!0,id:g,hideLabelFromVision:s,label:i,ref:(0,d.useMergeRefs)([h,p]),type:"search",size:f,className:c()("components-search-control",t),onChange:e=>n(null!=e?e:""),autoComplete:"off",placeholder:a,value:null!=o?o:"",suffix:(0,r.createElement)(iz,{size:f},(0,r.createElement)(sz,{searchRef:h,value:o,onChange:n,onClose:l})),...m}))})),cz=lz;const uz=oz((function({debouncedSpeak:e,onCloseSearch:t,onSearch:n,search:o,title:i}){const{navigationTree:{items:a}}=CO(),{menu:s}=XO(),l=(0,Uo.useRef)(null);(0,Uo.useEffect)((()=>{const e=setTimeout((()=>{l.current?.focus()}),wO);return()=>{clearTimeout(e)}}),[]),(0,Uo.useEffect)((()=>{if(!o)return;const t=Object.values(a).filter((e=>e._isVisible)).length,n=(0,u.sprintf)((0,u._n)("%d result found.","%d results found.",t),t);e(n)}),[a,o]);const c=()=>{n?.(""),t()},d=`components-navigation__menu-title-search-${s}`,f=(0,u.sprintf)((0,u.__)("Search %s"),i?.toLowerCase()).trim();return(0,r.createElement)(RO,null,(0,r.createElement)(cz,{__nextHasNoMarginBottom:!0,className:"components-navigation__menu-search-input",id:d,onChange:e=>n?.(e),onKeyDown:e=>{"Escape"!==e.code||e.defaultPrevented||(e.preventDefault(),c())},placeholder:f,onClose:c,ref:l,value:o}))}));function dz({hasSearch:e,onSearch:t,search:n,title:o,titleAction:i}){const[a,s]=(0,Uo.useState)(!1),{menu:l}=XO(),c=(0,Uo.useRef)(null);if(!o)return null;const d=`components-navigation__menu-title-${l}`,f=(0,u.sprintf)((0,u.__)("Search in %s"),o);return(0,r.createElement)(IO,{className:"components-navigation__menu-title"},!a&&(0,r.createElement)(NO,{as:"h2",className:"components-navigation__menu-title-heading",level:3},(0,r.createElement)("span",{id:d},o),(e||i)&&(0,r.createElement)(MO,null,i,e&&(0,r.createElement)(my,{size:"small",variant:"tertiary",label:f,onClick:()=>s(!0),ref:c},(0,r.createElement)($E,{icon:rz})))),a&&(0,r.createElement)("div",{className:gl({type:"slide-in",origin:"left"})},(0,r.createElement)(uz,{onCloseSearch:()=>{s(!1),setTimeout((()=>{c.current?.focus()}),wO)},onSearch:t,search:n,title:o})))}function fz({search:e}){const{navigationTree:{items:t}}=CO(),n=Object.values(t).filter((e=>e._isVisible)).length;return!e||n?null:(0,r.createElement)(DO,null,(0,r.createElement)(AO,null,(0,u.__)("No results found.")," "))}const mz=function(e){const{backButtonLabel:t,children:n,className:o,hasSearch:i,menu:a=xO,onBackButtonClick:s,onSearch:l,parentMenu:u,search:d,isSearchDebouncing:f,title:m,titleAction:p}=e,[h,g]=(0,Uo.useState)("");(e=>{const{navigationTree:{addMenu:t,removeMenu:n}}=CO(),r=e.menu||xO;(0,Uo.useEffect)((()=>(t(r,{...e,menu:r}),()=>{n(r)})),[])})(e);const{activeMenu:v}=CO(),b={menu:a,search:h};if(v!==a)return(0,r.createElement)(KO.Provider,{value:b},n);const y=!!l,x=y?d:h,w=y?l:g,E=`components-navigation__menu-title-${a}`,_=c()("components-navigation__menu",o);return(0,r.createElement)(KO.Provider,{value:b},(0,r.createElement)(PO,{className:_},(u||s)&&(0,r.createElement)(WO,{backButtonLabel:t,parentMenu:u,onClick:s}),m&&(0,r.createElement)(dz,{hasSearch:i,onSearch:w,search:x,title:m,titleAction:p}),(0,r.createElement)(KT,null,(0,r.createElement)("ul",{"aria-labelledby":E},n,x&&!f&&(0,r.createElement)(fz,{search:x})))))};function pz(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[s=n+1])throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--o){s++;break}}else if("("===e[s]&&(o++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));i+=e[s++]}else i+=e[s++]+e[s++];if(o)throw new TypeError("Unbalanced pattern at ".concat(n));if(!i)throw new TypeError("Missing pattern at ".concat(n));t.push({type:"PATTERN",index:n,value:i}),n=s}else{for(var a="",s=n+1;s<e.length;){var l=e.charCodeAt(s);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;a+=e[s++]}if(!a)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:a}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,i="[^".concat(gz(t.delimiter||"/#?"),"]+?"),a=[],s=0,l=0,c="",u=function(e){if(l<n.length&&n[l].type===e)return n[l++].value},d=function(e){var t=u(e);if(void 0!==t)return t;var r=n[l],o=r.type,i=r.index;throw new TypeError("Unexpected ".concat(o," at ").concat(i,", expected ").concat(e))},f=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t};l<n.length;){var m=u("CHAR"),p=u("NAME"),h=u("PATTERN");if(p||h){var g=m||"";-1===o.indexOf(g)&&(c+=g,g=""),c&&(a.push(c),c=""),a.push({name:p||s++,prefix:g,suffix:"",pattern:h||i,modifier:u("MODIFIER")||""})}else{var v=m||u("ESCAPED_CHAR");if(v)c+=v;else if(c&&(a.push(c),c=""),u("OPEN")){g=f();var b=u("NAME")||"",y=u("PATTERN")||"",x=f();d("CLOSE"),a.push({name:b||(y?s++:""),pattern:b&&!y?i:y,prefix:g,suffix:x,modifier:u("MODIFIER")||""})}else d("END")}}return a}function hz(e,t){var n=[];return function(e,t,n){void 0===n&&(n={});var r=n.decode,o=void 0===r?function(e){return e}:r;return function(n){var r=e.exec(n);if(!r)return!1;for(var i=r[0],a=r.index,s=Object.create(null),l=function(e){if(void 0===r[e])return"continue";var n=t[e-1];"*"===n.modifier||"+"===n.modifier?s[n.name]=r[e].split(n.prefix+n.suffix).map((function(e){return o(e,n)})):s[n.name]=o(r[e],n)},c=1;c<r.length;c++)l(c);return{path:i,index:a,params:s}}}(yz(e,n,t),n,t)}function gz(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function vz(e){return e&&e.sensitive?"":"i"}function bz(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var r=n.strict,o=void 0!==r&&r,i=n.start,a=void 0===i||i,s=n.end,l=void 0===s||s,c=n.encode,u=void 0===c?function(e){return e}:c,d=n.delimiter,f=void 0===d?"/#?":d,m=n.endsWith,p="[".concat(gz(void 0===m?"":m),"]|$"),h="[".concat(gz(f),"]"),g=a?"^":"",v=0,b=e;v<b.length;v++){var y=b[v];if("string"==typeof y)g+=gz(u(y));else{var x=gz(u(y.prefix)),w=gz(u(y.suffix));if(y.pattern)if(t&&t.push(y),x||w)if("+"===y.modifier||"*"===y.modifier){var E="*"===y.modifier?"?":"";g+="(?:".concat(x,"((?:").concat(y.pattern,")(?:").concat(w).concat(x,"(?:").concat(y.pattern,"))*)").concat(w,")").concat(E)}else g+="(?:".concat(x,"(").concat(y.pattern,")").concat(w,")").concat(y.modifier);else"+"===y.modifier||"*"===y.modifier?g+="((?:".concat(y.pattern,")").concat(y.modifier,")"):g+="(".concat(y.pattern,")").concat(y.modifier);else g+="(?:".concat(x).concat(w,")").concat(y.modifier)}}if(l)o||(g+="".concat(h,"?")),g+=n.endsWith?"(?=".concat(p,")"):"$";else{var _=e[e.length-1],S="string"==typeof _?h.indexOf(_[_.length-1])>-1:void 0===_;o||(g+="(?:".concat(h,"(?=").concat(p,"))?")),S||(g+="(?=".concat(h,"|").concat(p,")"))}return new RegExp(g,vz(n))}(pz(e,n),t,n)}function yz(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,o=n.exec(e.source);o;)t.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return yz(e,t,n).source}));return new RegExp("(?:".concat(r.join("|"),")"),vz(n))}(e,t,n):bz(e,t,n)}function xz(e,t){return hz(t,{decode:decodeURIComponent})(e)}const wz=(0,Uo.createContext)({location:{},goTo:()=>{},goBack:()=>{},goToParent:()=>{},addScreen:()=>{},removeScreen:()=>{},params:{}});const Ez={name:"xpkswc",styles:"overflow-x:hidden;contain:content"},_z=Ts({"0%":{opacity:0,transform:"translateX( 50px )"},"100%":{opacity:1,transform:"none"}}),Sz=Ts({"0%":{opacity:0,transform:"translateX( -50px )"},"100%":{opacity:1,transform:"none"}}),Cz=e=>Ps("overflow-x:auto;max-height:100%;",(({isInitial:e,isBack:t,isRTL:n})=>{if(e&&!t)return;return Ps("animation-duration:0.14s;animation-timing-function:ease-in-out;will-change:transform,opacity;animation-name:",n&&t||!n&&!t?_z:Sz,";@media ( prefers-reduced-motion ){animation-duration:0s;}","")})(e),";","");function kz(e=[],t){switch(t.type){case"add":return[...e,t.screen];case"remove":return e.filter((e=>e.id!==t.screen.id))}return e}const Pz=os((function(e,t){const{initialPath:n,children:o,className:i,...a}=rs(e,"NavigatorProvider"),[s,l]=(0,Uo.useState)([{path:n}]),c=(0,Uo.useRef)([]),[u,d]=(0,Uo.useReducer)(kz,[]),f=(0,Uo.useRef)([]);(0,Uo.useEffect)((()=>{f.current=u}),[u]),(0,Uo.useEffect)((()=>{c.current=s}),[s]);const m=(0,Uo.useRef)(),p=(0,Uo.useMemo)((()=>{let e;if(0===s.length||void 0===(e=s[s.length-1].path))return void(m.current=void 0);const t=(e=>{const t=function(e,t){for(const n of t){const t=xz(e,n.path);if(t)return{params:t.params,id:n.id}}}(e,u);return m.current&&t&&ow()(t.params,m.current.params)&&t.id===m.current.id?m.current:t})(e);return m.current=t,t}),[u,s]),h=(0,Uo.useCallback)((e=>d({type:"add",screen:e})),[]),g=(0,Uo.useCallback)((e=>d({type:"remove",screen:e})),[]),v=(0,Uo.useCallback)((()=>{l((e=>e.length<=1?e:[...e.slice(0,-2),{...e[e.length-2],isBack:!0,hasRestoredFocus:!1}]))}),[]),b=(0,Uo.useCallback)(((e,t={})=>{const{focusTargetSelector:n,isBack:r=!1,skipFocus:o=!1,replace:i=!1,...a}=t;r&&c.current.length>1&&c.current[c.current.length-2].path===e?v():l((t=>{const s={...a,path:e,isBack:r,hasRestoredFocus:!1,skipFocus:o};if(0===t.length)return i?[]:[s];const l=t.slice(t.length>49?1:0,-1);return i||l.push({...t[t.length-1],focusTargetSelector:n}),l.push(s),l}))}),[v]),y=(0,Uo.useCallback)(((e={})=>{const t=c.current[c.current.length-1].path;if(void 0===t)return;const n=function(e,t){if(!e.startsWith("/"))return;const n=e.split("/");let r;for(;n.length>1&&void 0===r;){n.pop();const e=""===n.join("/")?"/":n.join("/");t.find((t=>!1!==xz(e,t.path)))&&(r=e)}return r}(t,f.current);void 0!==n&&b(n,{...e,isBack:!0})}),[b]),x=(0,Uo.useMemo)((()=>({location:{...s[s.length-1],isInitial:1===s.length},params:p?p.params:{},match:p?p.id:void 0,goTo:b,goBack:v,goToParent:y,addScreen:h,removeScreen:g})),[s,p,b,v,y,h,g]),w=ns(),E=(0,Uo.useMemo)((()=>w(Ez,i)),[i,w]);return(0,r.createElement)(xs,{ref:t,className:E,...a},(0,r.createElement)(wz.Provider,{value:x},o))}),"NavigatorProvider"),Tz=Pz,Iz=window.wp.escapeHtml;const Rz=os((function(e,t){const n=(0,Uo.useId)(),{children:o,className:i,path:a,...s}=rs(e,"NavigatorScreen"),{location:l,match:c,addScreen:f,removeScreen:m}=(0,Uo.useContext)(wz),p=c===n,h=(0,Uo.useRef)(null);(0,Uo.useEffect)((()=>{const e={id:n,path:(0,Iz.escapeAttribute)(a)};return f(e),()=>m(e)}),[n,a,f,m]);const g=(0,u.isRTL)(),{isInitial:v,isBack:b}=l,y=ns(),x=(0,Uo.useMemo)((()=>y(Cz({isInitial:v,isBack:b,isRTL:g}),i)),[i,y,v,b,g]),w=(0,Uo.useRef)(l);(0,Uo.useEffect)((()=>{w.current=l}),[l]);const E=l.isInitial&&!l.isBack;(0,Uo.useEffect)((()=>{if(E||!p||!h.current||w.current.hasRestoredFocus||l.skipFocus)return;const e=h.current.ownerDocument.activeElement;if(h.current.contains(e))return;let t=null;if(l.isBack&&l?.focusTargetSelector&&(t=h.current.querySelector(l.focusTargetSelector)),!t){const e=HT.focus.tabbable.find(h.current)[0];t=null!=e?e:h.current}w.current.hasRestoredFocus=!0,t.focus()}),[E,p,l.isBack,l.focusTargetSelector,l.skipFocus]);const _=(0,d.useMergeRefs)([t,h]);return p?(0,r.createElement)(xs,{ref:_,className:x,...s},o):null}),"NavigatorScreen"),Mz=Rz;const Nz=function(){const{location:e,params:t,goTo:n,goBack:r,goToParent:o}=(0,Uo.useContext)(wz);return{location:e,goTo:n,goBack:r,goToParent:o,params:t}},Dz=(e,t)=>`[${e}="${t}"]`;const Az=os((function(e,t){const n=function(e){const{path:t,onClick:n,as:r=my,attributeName:o="id",...i}=rs(e,"NavigatorButton"),a=(0,Iz.escapeAttribute)(t),{goTo:s}=Nz();return{as:r,onClick:(0,Uo.useCallback)((e=>{e.preventDefault(),s(a,{focusTargetSelector:Dz(o,a)}),n?.(e)}),[s,n,o,a]),...i,[o]:a}}(e);return(0,r.createElement)(xs,{ref:t,...n})}),"NavigatorButton");function Oz(e){const{onClick:t,as:n=my,goToParent:r=!1,...o}=rs(e,"NavigatorBackButton"),{goBack:i,goToParent:a}=Nz();return{as:n,onClick:(0,Uo.useCallback)((e=>{e.preventDefault(),r?a():i(),t?.(e)}),[r,a,i,t]),...o}}const zz=os((function(e,t){const n=Oz(e);return(0,r.createElement)(xs,{ref:t,...n})}),"NavigatorBackButton");const Lz=os((function(e,t){const n=Oz({...e,goToParent:!0});return(0,r.createElement)(xs,{ref:t,...n})}),"NavigatorToParentButton"),Fz=()=>{};function Bz(e){switch(e){case"success":case"warning":case"info":return"polite";default:return"assertive"}}const jz=function({className:e,status:t="info",children:n,spokenMessage:o=n,onRemove:i=Fz,isDismissible:a=!0,actions:s=[],politeness:l=Bz(t),__unstableHTML:d,onDismiss:f=Fz}){!function(e,t){const n="string"==typeof e?e:(0,Uo.renderToString)(e);(0,Uo.useEffect)((()=>{n&&(0,jy.speak)(n,t)}),[n,t])}(o,l);const m=c()(e,"components-notice","is-"+t,{"is-dismissible":a});return d&&"string"==typeof n&&(n=(0,r.createElement)(Uo.RawHTML,null,n)),(0,r.createElement)("div",{className:m},(0,r.createElement)(ws,null,function(e){switch(e){case"warning":return(0,u.__)("Warning notice");case"info":return(0,u.__)("Information notice");case"error":return(0,u.__)("Error notice");default:return(0,u.__)("Notice")}}(t)),(0,r.createElement)("div",{className:"components-notice__content"},n,(0,r.createElement)("div",{className:"components-notice__actions"},s.map((({className:e,label:t,isPrimary:n,variant:o,noDefaultClasses:i=!1,onClick:a,url:s},l)=>{let u=o;return"primary"===o||i||(u=s?"link":"secondary"),void 0===u&&n&&(u="primary"),(0,r.createElement)(my,{key:l,href:s,variant:u,onClick:s?void 0:a,className:c()("components-notice__action",e)},t)})))),a&&(0,r.createElement)(my,{className:"components-notice__dismiss",icon:ex,label:(0,u.__)("Close"),onClick:()=>{f(),i()}}))},Vz=()=>{};const Hz=function({notices:e,onRemove:t=Vz,className:n,children:o}){const i=e=>()=>t(e);return n=c()("components-notice-list",n),(0,r.createElement)("div",{className:n},o,[...e].reverse().map((e=>{const{content:t,...n}=e;return(0,r.createElement)(jz,{...n,key:e.id,onRemove:i(e.id)},e.content)})))};const $z=function({label:e,children:t}){return(0,r.createElement)("div",{className:"components-panel__header"},e&&(0,r.createElement)("h2",null,e),t)};const Wz=(0,Uo.forwardRef)((function({header:e,className:t,children:n},o){const i=c()(t,"components-panel");return(0,r.createElement)("div",{className:i,ref:o},e&&(0,r.createElement)($z,{label:e}),n)})),Uz=(0,r.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(n.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),Gz=()=>{};const qz=(0,Uo.forwardRef)((({isOpened:e,icon:t,title:n,...o},i)=>n?(0,r.createElement)("h2",{className:"components-panel__body-title"},(0,r.createElement)(my,{className:"components-panel__body-toggle","aria-expanded":e,ref:i,...o},(0,r.createElement)("span",{"aria-hidden":"true"},(0,r.createElement)(uy,{className:"components-panel__arrow",icon:e?Uz:WE})),n,t&&(0,r.createElement)(uy,{icon:t,className:"components-panel__icon",size:20}))):null)),Yz=(0,Uo.forwardRef)((function(e,t){const{buttonProps:n={},children:o,className:i,icon:a,initialOpen:s,onToggle:l=Gz,opened:u,title:f,scrollAfterOpen:m=!0}=e,[p,h]=XE(u,{initial:void 0===s||s,fallback:!1}),g=(0,Uo.useRef)(null),v=(0,d.useReducedMotion)()?"auto":"smooth",b=(0,Uo.useRef)();b.current=m,ui((()=>{p&&b.current&&g.current?.scrollIntoView&&g.current.scrollIntoView({inline:"nearest",block:"nearest",behavior:v})}),[p,v]);const y=c()("components-panel__body",i,{"is-opened":p});return(0,r.createElement)("div",{className:y,ref:(0,d.useMergeRefs)([g,t])},(0,r.createElement)(qz,{icon:a,isOpened:Boolean(p),onClick:e=>{e.preventDefault();const t=!p;h(t),l(t)},title:f,...n}),"function"==typeof o?o({opened:Boolean(p)}):p&&o)})),Kz=Yz;const Xz=(0,Uo.forwardRef)((function({className:e,children:t},n){return(0,r.createElement)("div",{className:c()("components-panel__row",e),ref:n},t)})),Zz=(0,r.createElement)(n.SVG,{className:"components-placeholder__illustration",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",preserveAspectRatio:"none"},(0,r.createElement)(n.Path,{vectorEffect:"non-scaling-stroke",d:"M60 60 0 0"}));const Jz=function(e){const{icon:t,children:n,label:o,instructions:i,className:a,notices:s,preview:l,isColumnLayout:u,withIllustration:f,...m}=e,[p,{width:h}]=(0,d.useResizeObserver)();let g;"number"==typeof h&&(g={"is-large":h>=480,"is-medium":h>=160&&h<480,"is-small":h<160});const v=c()("components-placeholder",a,g,f?"has-illustration":null),b=c()("components-placeholder__fieldset",{"is-column-layout":u});return(0,Uo.useEffect)((()=>{i&&(0,jy.speak)(i)}),[i]),(0,r.createElement)("div",{...m,className:v},f?Zz:null,p,s,l&&(0,r.createElement)("div",{className:"components-placeholder__preview"},l),(0,r.createElement)("div",{className:"components-placeholder__label"},(0,r.createElement)(uy,{icon:t}),o),!!i&&(0,r.createElement)("div",{className:"components-placeholder__instructions"},i),(0,r.createElement)("div",{className:b},n))},Qz=e=>e.every((e=>null!==e.parent));function eL(e){const t=e.map((e=>({children:[],parent:null,...e,id:String(e.id)})));if(!Qz(t))return t;const n=t.reduce(((e,t)=>{const{parent:n}=t;return e[n]||(e[n]=[]),e[n].push(t),e}),{}),r=e=>e.map((e=>{const t=n[e.id];return{...e,children:t&&t.length?r(t):[]}}));return r(n[0]||[])}const tL=window.wp.htmlEntities;function nL(e,t=0){return e.flatMap((e=>[{value:e.id,label:" ".repeat(3*t)+(0,tL.decodeEntities)(e.name)},...nL(e.children||[],t+1)]))}const rL=function(e){const{label:t,noOptionLabel:n,onChange:o,selectedId:i,tree:a=[],...s}=Nv(e),l=(0,Uo.useMemo)((()=>[n&&{value:"",label:n},...nL(a)].filter((e=>!!e))),[n,a]);return(0,r.createElement)(qE,{label:t,options:l,onChange:o,value:i,...s})};function oL({__next40pxDefaultSize:e,label:t,noOptionLabel:n,authorList:o,selectedAuthorId:i,onChange:a}){if(!o)return null;const s=eL(o);return(0,r.createElement)(rL,{label:t,noOptionLabel:n,onChange:a,tree:s,selectedId:void 0!==i?String(i):void 0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e})}function iL({__next40pxDefaultSize:e,label:t,noOptionLabel:n,categoriesList:o,selectedCategoryId:i,onChange:a,...s}){const l=(0,Uo.useMemo)((()=>eL(o)),[o]);return(0,r.createElement)(rL,{label:t,noOptionLabel:n,onChange:a,tree:l,selectedId:void 0!==i?String(i):void 0,...s,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e})}function aL(e){return"categoriesList"in e}function sL(e){return"categorySuggestions"in e}const lL=function({__next40pxDefaultSize:e=!1,authorList:t,selectedAuthorId:n,numberOfItems:o,order:i,orderBy:a,maxItems:s=100,minItems:l=1,onAuthorChange:c,onNumberOfItemsChange:d,onOrderChange:f,onOrderByChange:m,...p}){return(0,r.createElement)(jS,{spacing:"4",className:"components-query-controls"},[f&&m&&(0,r.createElement)(YE,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e,key:"query-controls-order-select",label:(0,u.__)("Order by"),value:`${a}/${i}`,options:[{label:(0,u.__)("Newest to oldest"),value:"date/desc"},{label:(0,u.__)("Oldest to newest"),value:"date/asc"},{label:(0,u.__)("A → Z"),value:"title/asc"},{label:(0,u.__)("Z → A"),value:"title/desc"}],onChange:e=>{if("string"!=typeof e)return;const[t,n]=e.split("/");n!==i&&f(n),t!==a&&m(t)}}),aL(p)&&p.categoriesList&&p.onCategoryChange&&(0,r.createElement)(iL,{__next40pxDefaultSize:e,key:"query-controls-category-select",categoriesList:p.categoriesList,label:(0,u.__)("Category"),noOptionLabel:(0,u._x)("All","categories"),selectedCategoryId:p.selectedCategoryId,onChange:p.onCategoryChange}),sL(p)&&p.categorySuggestions&&p.onCategoryChange&&(0,r.createElement)(rO,{__next40pxDefaultSize:e,__nextHasNoMarginBottom:!0,key:"query-controls-categories-select",label:(0,u.__)("Categories"),value:p.selectedCategories&&p.selectedCategories.map((e=>({id:e.id,value:e.name||e.value}))),suggestions:Object.keys(p.categorySuggestions),onChange:p.onCategoryChange,maxSuggestions:20}),c&&(0,r.createElement)(oL,{__next40pxDefaultSize:e,key:"query-controls-author-select",authorList:t,label:(0,u.__)("Author"),noOptionLabel:(0,u._x)("All","authors"),selectedAuthorId:n,onChange:c}),d&&(0,r.createElement)(k_,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e,key:"query-controls-range-control",label:(0,u.__)("Number of items"),value:o,onChange:d,min:l,max:s,required:!0})])},cL=(0,Uo.createContext)({store:void 0,disabled:void 0});const uL=(0,Uo.forwardRef)((function({value:e,children:t,...n},o){const{store:i,disabled:a}=(0,Uo.useContext)(cL),s=i?.useState("value"),l=void 0!==s&&s===e;return(0,r.createElement)(pE,{disabled:a,store:i,ref:o,value:e,render:(0,r.createElement)(my,{variant:l?"primary":"secondary",...n})},t||e)})),dL=uL;const fL=(0,Uo.forwardRef)((function({label:e,checked:t,defaultChecked:n,disabled:o,onChange:i,children:a,...s},l){const c=Jw({value:t,defaultValue:n,setValue:e=>{i?.(null!=e?e:void 0)}}),u=(0,Uo.useMemo)((()=>({store:c,disabled:o})),[c,o]);return(0,r.createElement)(cL.Provider,{value:u},(0,r.createElement)(oE,{store:c,render:(0,r.createElement)(Ok,null,a),"aria-label":e,ref:l,...s}))})),mL=fL;const pL=function e(t){const{label:n,className:o,selected:i,help:a,onChange:s,hideLabelFromVision:l,options:u=[],...f}=t,m=`inspector-radio-control-${(0,d.useInstanceId)(e)}`,p=e=>s(e.target.value);return u?.length?(0,r.createElement)(iy,{__nextHasNoMarginBottom:!0,label:n,id:m,hideLabelFromVision:l,help:a,className:c()(o,"components-radio-control")},(0,r.createElement)(jS,{spacing:1},u.map(((e,t)=>(0,r.createElement)("div",{key:`${m}-${t}`,className:"components-radio-control__option"},(0,r.createElement)("input",{id:`${m}-${t}`,className:"components-radio-control__input",type:"radio",name:m,value:e.value,onChange:p,checked:e.value===i,"aria-describedby":a?`${m}__help`:void 0,...f}),(0,r.createElement)("label",{className:"components-radio-control__label",htmlFor:`${m}-${t}`},e.label)))))):null};var hL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gL=function(){return gL=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},gL.apply(this,arguments)},vL={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},bL={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},yL={width:"20px",height:"20px",position:"absolute"},xL={top:gL(gL({},vL),{top:"-5px"}),right:gL(gL({},bL),{left:void 0,right:"-5px"}),bottom:gL(gL({},vL),{top:void 0,bottom:"-5px"}),left:gL(gL({},bL),{left:"-5px"}),topRight:gL(gL({},yL),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:gL(gL({},yL),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:gL(gL({},yL),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:gL(gL({},yL),{left:"-10px",top:"-10px",cursor:"nw-resize"})},wL=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return hL(t,e),t.prototype.render=function(){return r.createElement("div",{className:this.props.className||"",style:gL(gL({position:"absolute",userSelect:"none"},xL[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(r.PureComponent),EL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_L=function(){return _L=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},_L.apply(this,arguments)},SL={width:"auto",height:"auto"},CL=function(e,t,n){return Math.max(Math.min(e,n),t)},kL=function(e,t){return Math.round(e/t)*t},PL=function(e,t){return new RegExp(e,"i").test(t)},TL=function(e){return Boolean(e.touches&&e.touches.length)},IL=function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,o){return Math.abs(r-e)<Math.abs(t[n]-e)?o:n}),0),o=Math.abs(t[r]-e);return 0===n||o<n?t[r]:e},RL=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},ML=function(e,t,n,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return r*(Number(e.replace("vh",""))/100)}return e},NL=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],DL="__resizable_base__",AL=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(DL):t.className+=DL,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return EL(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||SL},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return RL(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?RL(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?RL(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,o=this.props.boundsByDirection,i=this.state.direction,a=o&&PL("left",i),s=o&&PL("top",i);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=a?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=s?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,o=this.state,i=o.direction,a=o.original,s=this.props,l=s.lockAspectRatio,c=s.lockAspectRatioExtraHeight,u=s.lockAspectRatioExtraWidth,d=a.width,f=a.height,m=c||0,p=u||0;return PL("right",i)&&(d=a.width+(e-a.x)*r/n,l&&(f=(d-p)/this.ratio+m)),PL("left",i)&&(d=a.width-(e-a.x)*r/n,l&&(f=(d-p)/this.ratio+m)),PL("bottom",i)&&(f=a.height+(t-a.y)*r/n,l&&(d=(f-m)*this.ratio+p)),PL("top",i)&&(f=a.height-(t-a.y)*r/n,l&&(d=(f-m)*this.ratio+p)),{newWidth:d,newHeight:f}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var o=this.props,i=o.lockAspectRatio,a=o.lockAspectRatioExtraHeight,s=o.lockAspectRatioExtraWidth,l=void 0===r.width?10:r.width,c=void 0===n.width||n.width<0?e:n.width,u=void 0===r.height?10:r.height,d=void 0===n.height||n.height<0?t:n.height,f=a||0,m=s||0;if(i){var p=(u-f)*this.ratio+m,h=(d-f)*this.ratio+m,g=(l-m)/this.ratio+f,v=(c-m)/this.ratio+f,b=Math.max(l,p),y=Math.min(c,h),x=Math.max(u,g),w=Math.min(d,v);e=CL(e,b,y),t=CL(t,x,w)}else e=CL(e,l,c),t=CL(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),o=r.left,i=r.top,a=r.right,s=r.bottom;this.resizableLeft=o,this.resizableRight=a,this.resizableTop=i,this.resizableBottom=s}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(r=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent&&TL(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var i=this.window.getComputedStyle(this.resizable);if("auto"!==i.flexBasis){var a=this.parentNode;if(a){var s=this.window.getComputedStyle(a).flexDirection;this.flexDir=s.startsWith("row")?"row":"column",n=i.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:r,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:_L(_L({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&TL(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var n=this.props,r=n.maxWidth,o=n.maxHeight,i=n.minWidth,a=n.minHeight,s=TL(e)?e.touches[0].clientX:e.clientX,l=TL(e)?e.touches[0].clientY:e.clientY,c=this.state,u=c.direction,d=c.original,f=c.width,m=c.height,p=this.getParentSize(),h=function(e,t,n,r,o,i,a){return r=ML(r,e.width,t,n),o=ML(o,e.height,t,n),i=ML(i,e.width,t,n),a=ML(a,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===i?void 0:Number(i),minHeight:void 0===a?void 0:Number(a)}}(p,this.window.innerWidth,this.window.innerHeight,r,o,i,a);r=h.maxWidth,o=h.maxHeight,i=h.minWidth,a=h.minHeight;var g=this.calculateNewSizeFromDirection(s,l),v=g.newHeight,b=g.newWidth,y=this.calculateNewMaxFromBoundary(r,o);this.props.snap&&this.props.snap.x&&(b=IL(b,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(v=IL(v,this.props.snap.y,this.props.snapGap));var x=this.calculateNewSizeFromAspectRatio(b,v,{width:y.maxWidth,height:y.maxHeight},{width:i,height:a});if(b=x.newWidth,v=x.newHeight,this.props.grid){var w=kL(b,this.props.grid[0]),E=kL(v,this.props.grid[1]),_=this.props.snapGap||0;b=0===_||Math.abs(w-b)<=_?w:b,v=0===_||Math.abs(E-v)<=_?E:v}var S={width:b-d.width,height:v-d.height};if(f&&"string"==typeof f)if(f.endsWith("%"))b=b/p.width*100+"%";else if(f.endsWith("vw")){b=b/this.window.innerWidth*100+"vw"}else if(f.endsWith("vh")){b=b/this.window.innerHeight*100+"vh"}if(m&&"string"==typeof m)if(m.endsWith("%"))v=v/p.height*100+"%";else if(m.endsWith("vw")){v=v/this.window.innerWidth*100+"vw"}else if(m.endsWith("vh")){v=v/this.window.innerHeight*100+"vh"}var C={width:this.createSizeForCssProperty(b,"width"),height:this.createSizeForCssProperty(v,"height")};"row"===this.flexDir?C.flexBasis=C.width:"column"===this.flexDir&&(C.flexBasis=C.height),(0,tr.flushSync)((function(){t.setState(C)})),this.props.onResize&&this.props.onResize(e,u,this.resizable,S)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,o=t.original;if(n&&this.resizable){var i={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,i),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:_L(_L({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,o=t.handleStyles,i=t.handleClasses,a=t.handleWrapperStyle,s=t.handleWrapperClass,l=t.handleComponent;if(!n)return null;var c=Object.keys(n).map((function(t){return!1!==n[t]?r.createElement(wL,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:o&&o[t],className:i&&i[t]},l&&l[t]?l[t]:null):null}));return r.createElement("div",{className:s,style:a},c)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==NL.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=_L(_L(_L({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return r.createElement(o,_L({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&r.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(r.PureComponent);const OL=()=>{},zL={bottom:"bottom",corner:"corner"};function LL({axis:e,fadeTimeout:t=180,onResize:n=OL,position:r=zL.bottom,showPx:o=!1}){const[i,a]=(0,d.useResizeObserver)(),s=!!e,[l,c]=(0,Uo.useState)(!1),[u,f]=(0,Uo.useState)(!1),{width:m,height:p}=a,h=(0,Uo.useRef)(p),g=(0,Uo.useRef)(m),v=(0,Uo.useRef)(),b=(0,Uo.useCallback)((()=>{v.current&&window.clearTimeout(v.current),v.current=window.setTimeout((()=>{s||(c(!1),f(!1))}),t)}),[t,s]);(0,Uo.useEffect)((()=>{if(!(null!==m||null!==p))return;const e=m!==g.current,t=p!==h.current;if(e||t){if(m&&!g.current&&p&&!h.current)return g.current=m,void(h.current=p);e&&(c(!0),g.current=m),t&&(f(!0),h.current=p),n({width:m,height:p}),b()}}),[m,p,n,b]);const y=function({axis:e,height:t,moveX:n=!1,moveY:r=!1,position:o=zL.bottom,showPx:i=!1,width:a}){if(!n&&!r)return;if(o===zL.corner)return`${a} x ${t}`;const s=i?" px":"";if(e){if("x"===e&&n)return`${a}${s}`;if("y"===e&&r)return`${t}${s}`}if(n&&r)return`${a} x ${t}`;if(n)return`${a}${s}`;if(r)return`${t}${s}`;return}({axis:e,height:p,moveX:l,moveY:u,position:r,showPx:o,width:m});return{label:y,resizeListener:i}}const FL=bs("div",{target:"e1wq7y4k3"})({name:"1cd7zoc",styles:"bottom:0;box-sizing:border-box;left:0;pointer-events:none;position:absolute;right:0;top:0"}),BL=bs("div",{target:"e1wq7y4k2"})({name:"ajymcs",styles:"align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;opacity:0;pointer-events:none;transition:opacity 120ms linear"}),jL=bs("div",{target:"e1wq7y4k1"})("background:",Ds.theme.foreground,";border-radius:2px;box-sizing:border-box;font-family:",Yb("default.fontFamily"),";font-size:12px;color:",Ds.theme.foregroundInverted,";padding:4px 8px;position:relative;"),VL=bs(mv,{target:"e1wq7y4k0"})("&&&{color:",Ds.theme.foregroundInverted,";display:block;font-size:13px;line-height:1.4;white-space:nowrap;}");const HL=(0,Uo.forwardRef)((function({label:e,position:t=zL.corner,zIndex:n=1e3,...o},i){const a=!!e,s=t===zL.bottom,l=t===zL.corner;if(!a)return null;let c={opacity:a?1:void 0,zIndex:n},d={};return s&&(c={...c,position:"absolute",bottom:-10,left:"50%",transform:"translate(-50%, 0)"},d={transform:"translate(0, 100%)"}),l&&(c={...c,position:"absolute",top:4,right:(0,u.isRTL)()?void 0:4,left:(0,u.isRTL)()?4:void 0}),(0,r.createElement)(BL,{"aria-hidden":"true",className:"components-resizable-tooltip__tooltip-wrapper",ref:i,style:c,...o},(0,r.createElement)(jL,{className:"components-resizable-tooltip__tooltip",style:d},(0,r.createElement)(VL,{as:"span"},e)))})),$L=HL,WL=()=>{};const UL=(0,Uo.forwardRef)((function({axis:e,className:t,fadeTimeout:n=180,isVisible:o=!0,labelRef:i,onResize:a=WL,position:s=zL.bottom,showPx:l=!0,zIndex:u=1e3,...d},f){const{label:m,resizeListener:p}=LL({axis:e,fadeTimeout:n,onResize:a,showPx:l,position:s});if(!o)return null;const h=c()("components-resize-tooltip",t);return(0,r.createElement)(FL,{"aria-hidden":"true",className:h,ref:f,...d},p,(0,r.createElement)($L,{"aria-hidden":d["aria-hidden"],label:m,position:s,ref:i,zIndex:u}))})),GL=UL,qL="components-resizable-box__handle",YL="components-resizable-box__side-handle",KL="components-resizable-box__corner-handle",XL={top:c()(qL,YL,"components-resizable-box__handle-top"),right:c()(qL,YL,"components-resizable-box__handle-right"),bottom:c()(qL,YL,"components-resizable-box__handle-bottom"),left:c()(qL,YL,"components-resizable-box__handle-left"),topLeft:c()(qL,KL,"components-resizable-box__handle-top","components-resizable-box__handle-left"),topRight:c()(qL,KL,"components-resizable-box__handle-top","components-resizable-box__handle-right"),bottomRight:c()(qL,KL,"components-resizable-box__handle-bottom","components-resizable-box__handle-right"),bottomLeft:c()(qL,KL,"components-resizable-box__handle-bottom","components-resizable-box__handle-left")},ZL={width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},JL={top:ZL,right:ZL,bottom:ZL,left:ZL,topLeft:ZL,topRight:ZL,bottomRight:ZL,bottomLeft:ZL};const QL=(0,Uo.forwardRef)((function({className:e,children:t,showHandle:n=!0,__experimentalShowTooltip:o=!1,__experimentalTooltipProps:i={},...a},s){return(0,r.createElement)(AL,{className:c()("components-resizable-box__container",n&&"has-show-handle",e),handleClasses:XL,handleStyles:JL,ref:s,...a},t,o&&(0,r.createElement)(GL,{...i}))}));const eF=function({naturalWidth:e,naturalHeight:t,children:n,isInline:o=!1}){if(1!==Uo.Children.count(n))return null;const i=o?"span":"div";let a;return e&&t&&(a=`${e} / ${t}`),(0,r.createElement)(i,{className:"components-responsive-wrapper"},(0,r.createElement)("div",null,(0,Uo.cloneElement)(n,{className:c()("components-responsive-wrapper__content",n.props.className),style:{...n.props.style,aspectRatio:a}})))},tF=function(){const{MutationObserver:e}=window;if(!e||!document.body||!window.parent)return;function t(){const e=document.body.getBoundingClientRect();window.parent.postMessage({action:"resize",width:e.width,height:e.height},"*")}function n(e){e.style&&["width","height","minHeight","maxHeight"].forEach((function(t){/^\\d+(vw|vh|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)$/.test(e.style[t])&&(e.style[t]="")}))}new e(t).observe(document.body,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}),window.addEventListener("load",t,!0),Array.prototype.forEach.call(document.querySelectorAll("[style]"),n),Array.prototype.forEach.call(document.styleSheets,(function(e){Array.prototype.forEach.call(e.cssRules||e.rules,n)})),document.body.style.position="absolute",document.body.style.width="100%",document.body.setAttribute("data-resizable-iframe-connected",""),t(),window.addEventListener("resize",t,!0)};const nF=function({html:e="",title:t="",type:n,styles:o=[],scripts:i=[],onFocus:a,tabIndex:s}){const l=(0,Uo.useRef)(),[c,u]=(0,Uo.useState)(0),[f,m]=(0,Uo.useState)(0);function p(a=!1){if(!function(){try{return!!l.current?.contentDocument?.body}catch(e){return!1}}())return;const{contentDocument:s,ownerDocument:c}=l.current;if(!a&&null!==s?.body.getAttribute("data-resizable-iframe-connected"))return;const u=(0,r.createElement)("html",{lang:c.documentElement.lang,className:n},(0,r.createElement)("head",null,(0,r.createElement)("title",null,t),(0,r.createElement)("style",{dangerouslySetInnerHTML:{__html:"\n\tbody {\n\t\tmargin: 0;\n\t}\n\thtml,\n\tbody,\n\tbody > div {\n\t\twidth: 100%;\n\t}\n\thtml.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio > div,\n\tbody.wp-has-aspect-ratio > div iframe {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */\n\t}\n\tbody > div > * {\n\t\tmargin-top: 0 !important; /* Has to have !important to override inline styles. */\n\t\tmargin-bottom: 0 !important;\n\t}\n"}}),o.map(((e,t)=>(0,r.createElement)("style",{key:t,dangerouslySetInnerHTML:{__html:e}})))),(0,r.createElement)("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:n},(0,r.createElement)("div",{dangerouslySetInnerHTML:{__html:e}}),(0,r.createElement)("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:`(${tF.toString()})();`}}),i.map((e=>(0,r.createElement)("script",{key:e,src:e})))));s.open(),s.write("<!DOCTYPE html>"+(0,Uo.renderToString)(u)),s.close()}return(0,Uo.useEffect)((()=>{function e(){p(!1)}function t(e){const t=l.current;if(!t||t.contentWindow!==e.source)return;let n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}"resize"===n.action&&(u(n.width),m(n.height))}p();const n=l.current,r=n?.ownerDocument?.defaultView;return n?.addEventListener("load",e,!1),r?.addEventListener("message",t),()=>{n?.removeEventListener("load",e,!1),r?.removeEventListener("message",t)}}),[]),(0,Uo.useEffect)((()=>{p()}),[t,o,i]),(0,Uo.useEffect)((()=>{p(!0)}),[e,n]),(0,r.createElement)("iframe",{ref:(0,d.useMergeRefs)([l,(0,d.useFocusableIframe)()]),title:t,tabIndex:s,className:"components-sandbox",sandbox:"allow-scripts allow-same-origin allow-presentation",onFocus:a,width:Math.ceil(c),height:Math.ceil(f)})};const rF=(0,Uo.forwardRef)((function({className:e,children:t,spokenMessage:n=t,politeness:o="polite",actions:i=[],onRemove:a,icon:s=null,explicitDismiss:l=!1,onDismiss:d,listRef:f},m){function p(e){e&&e.preventDefault&&e.preventDefault(),f?.current?.focus(),d?.(),a?.()}!function(e,t){const n="string"==typeof e?e:(0,Uo.renderToString)(e);(0,Uo.useEffect)((()=>{n&&(0,jy.speak)(n,t)}),[n,t])}(n,o);const h=(0,Uo.useRef)({onDismiss:d,onRemove:a});(0,Uo.useLayoutEffect)((()=>{h.current={onDismiss:d,onRemove:a}})),(0,Uo.useEffect)((()=>{const e=setTimeout((()=>{l||(h.current.onDismiss?.(),h.current.onRemove?.())}),1e4);return()=>clearTimeout(e)}),[l]);const g=c()(e,"components-snackbar",{"components-snackbar-explicit-dismiss":!!l});i&&i.length>1&&(i=[i[0]]);const v=c()("components-snackbar__content",{"components-snackbar__content-with-icon":!!s});return(0,r.createElement)("div",{ref:m,className:g,onClick:l?void 0:p,tabIndex:0,role:l?"":"button",onKeyPress:l?void 0:p,"aria-label":l?"":(0,u.__)("Dismiss this notice")},(0,r.createElement)("div",{className:v},s&&(0,r.createElement)("div",{className:"components-snackbar__icon"},s),t,i.map((({label:e,onClick:t,url:n},o)=>(0,r.createElement)(my,{key:o,href:n,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),a?.(),t&&t(e)}(e,t),className:"components-snackbar__action"},e))),l&&(0,r.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:0,className:"components-snackbar__dismiss-button",onClick:p,onKeyPress:p},"✕")))})),oF=rF,iF={init:{height:0,opacity:0},open:{height:"auto",opacity:1,transition:{height:{type:"tween",duration:.3,ease:[0,0,.2,1]},opacity:{type:"tween",duration:.25,delay:.05,ease:[0,0,.2,1]}}},exit:{opacity:0,transition:{type:"tween",duration:.1,ease:[0,0,.2,1]}}};const aF=function({notices:e,className:t,children:n,onRemove:o}){const i=(0,Uo.useRef)(null),a=(0,d.useReducedMotion)();t=c()("components-snackbar-list",t);const s=e=>()=>o?.(e.id);return(0,r.createElement)("div",{className:t,tabIndex:-1,ref:i},n,(0,r.createElement)(Ih,null,e.map((e=>{const{content:t,...n}=e;return(0,r.createElement)(wh.div,{layout:!a,initial:"init",animate:"open",exit:"exit",key:e.id,variants:a?void 0:iF},(0,r.createElement)("div",{className:"components-snackbar-list__notice-container"},(0,r.createElement)(oF,{...n,onRemove:s(e),listRef:i},e.content)))}))))};const sF=Ts`
from {
transform: rotate(0deg);
}
diff --git a/wp-includes/js/dist/edit-site.js b/wp-includes/js/dist/edit-site.js
index 2e302dd..df841da 100644
--- a/wp-includes/js/dist/edit-site.js
+++ b/wp-includes/js/dist/edit-site.js
@@ -9658,6 +9658,45 @@ function useSupportedStyles(name, element) {
return supportedPanels;
}
+;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/utils/set-nested-value.js
+/**
+ * Sets the value at path of object.
+ * If a portion of path doesn’t exist, it’s created.
+ * Arrays are created for missing index properties while objects are created
+ * for all other missing properties.
+ *
+ * This function intentionally mutates the input object.
+ *
+ * Inspired by _.set().
+ *
+ * @see https://lodash.com/docs/4.17.15#set
+ *
+ * @todo Needs to be deduplicated with its copy in `@wordpress/core-data`.
+ *
+ * @param {Object} object Object to modify
+ * @param {Array} path Path of the property to set.
+ * @param {*} value Value to set.
+ */
+function setNestedValue(object, path, value) {
+ if (!object || typeof object !== 'object') {
+ return object;
+ }
+ path.reduce((acc, key, idx) => {
+ if (acc[key] === undefined) {
+ if (Number.isInteger(path[idx + 1])) {
+ acc[key] = [];
+ } else {
+ acc[key] = {};
+ }
+ }
+ if (idx === path.length - 1) {
+ acc[key] = value;
+ }
+ return acc[key];
+ }, object);
+ return object;
+}
+
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/hooks/push-changes-to-global-styles/index.js
/**
@@ -9679,6 +9718,7 @@ function useSupportedStyles(name, element) {
*/
+
const {
cleanEmptyObject,
GlobalStylesContext
@@ -9877,44 +9917,6 @@ function useChangesToPush(name, attributes, userConfig) {
return changes;
}, [supports, attributes, blockUserConfig]);
}
-
-/**
- * Sets the value at path of object.
- * If a portion of path doesn’t exist, it’s created.
- * Arrays are created for missing index properties while objects are created
- * for all other missing properties.
- *
- * This function intentionally mutates the input object.
- *
- * Inspired by _.set().
- *
- * @see https://lodash.com/docs/4.17.15#set
- *
- * @todo Needs to be deduplicated with its copy in `@wordpress/core-data`.
- *
- * @param {Object} object Object to modify
- * @param {Array} path Path of the property to set.
- * @param {*} value Value to set.
- */
-function setNestedValue(object, path, value) {
- if (!object || typeof object !== 'object') {
- return object;
- }
- path.reduce((acc, key, idx) => {
- if (acc[key] === undefined) {
- if (Number.isInteger(path[idx + 1])) {
- acc[key] = [];
- } else {
- acc[key] = {};
- }
- }
- if (idx === path.length - 1) {
- acc[key] = value;
- }
- return acc[key];
- }, object);
- return object;
-}
function cloneDeep(object) {
return !object ? {} : JSON.parse(JSON.stringify(object));
}
@@ -26985,12 +26987,13 @@ const {
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
+
const FontLibraryContext = (0,external_wp_element_namespaceObject.createContext)({});
function FontLibraryProvider({
children
}) {
const {
- __experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits
+ saveEntityRecord
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
const {
globalStylesId
@@ -27031,9 +27034,25 @@ function FontLibraryProvider({
// theme.json file font families
const [baseFontFamilies] = context_useGlobalSetting('typography.fontFamilies', undefined, 'base');
- // Save font families to the global styles post in the database.
- const saveFontFamilies = () => {
- saveSpecifiedEntityEdits('root', 'globalStyles', globalStylesId, ['settings.typography.fontFamilies']);
+ /*
+ * Save the font families to the database.
+ * This function is called when the user activates or deactivates a font family.
+ * It only updates the global styles post content in the database for new font families.
+ * This avoids saving other styles/settings changed by the user using other parts of the editor.
+ *
+ * It uses the font families from the param to avoid using the font families from an outdated state.
+ *
+ * @param {Array} fonts - The font families that will be saved to the database.
+ */
+ const saveFontFamilies = async fonts => {
+ // Gets the global styles database post content.
+ const updatedGlobalStyles = globalStyles.record;
+
+ // Updates the database version of global styles with the edited font families in the client.
+ setNestedValue(updatedGlobalStyles, ['settings', 'typography', 'fontFamilies'], fonts);
+
+ // Saves a new version of the global styles in the database.
+ await saveEntityRecord('root', 'globalStyles', updatedGlobalStyles);
};
// Library Fonts
@@ -27176,10 +27195,9 @@ function FontLibraryProvider({
installationErrors = installationErrors.reduce((unique, item) => unique.includes(item.message) ? unique : [...unique, item.message], []);
if (fontFamiliesToActivate.length > 0) {
// Activate the font family (add the font family to the global styles).
- activateCustomFontFamilies(fontFamiliesToActivate);
-
+ const activeFonts = activateCustomFontFamilies(fontFamiliesToActivate);
// Save the global styles to the database.
- await saveSpecifiedEntityEdits('root', 'globalStyles', globalStylesId, ['settings.typography.fontFamilies']);
+ await saveFontFamilies(activeFonts);
refreshLibrary();
}
if (installationErrors.length > 0) {
@@ -27200,9 +27218,9 @@ function FontLibraryProvider({
// Deactivate the font family if delete request is successful
// (Removes the font family from the global styles).
if (uninstalledFontFamily.deleted) {
- deactivateFontFamily(fontFamilyToUninstall);
+ const activeFonts = deactivateFontFamily(fontFamilyToUninstall);
// Save the global styles to the database.
- await saveSpecifiedEntityEdits('root', 'globalStyles', globalStylesId, ['settings.typography.fontFamilies']);
+ await saveFontFamilies(activeFonts);
}
// Refresh the library (the library font families from database).
@@ -27220,19 +27238,35 @@ function FontLibraryProvider({
// We want to save as active all the theme fonts at the beginning
const initialCustomFonts = (_fontFamilies$font$so = fontFamilies?.[font.source]) !== null && _fontFamilies$font$so !== void 0 ? _fontFamilies$font$so : [];
const newCustomFonts = initialCustomFonts.filter(f => f.slug !== font.slug);
- setFontFamilies({
+ const activeFonts = {
...fontFamilies,
[font.source]: newCustomFonts
- });
+ };
+ setFontFamilies(activeFonts);
if (font.fontFace) {
font.fontFace.forEach(face => {
unloadFontFaceInBrowser(face, 'all');
});
}
+ return activeFonts;
};
const activateCustomFontFamilies = fontsToAdd => {
- // Removes the id from the families and faces to avoid saving that to global styles post content.
- const fontsToActivate = fontsToAdd.map(({
+ const fontsToActivate = cleanFontsForSave(fontsToAdd);
+ const activeFonts = {
+ ...fontFamilies,
+ // Merge the existing custom fonts with the new fonts.
+ custom: mergeFontFamilies(fontFamilies?.custom, fontsToActivate)
+ };
+
+ // Activate the fonts by set the new custom fonts array.
+ setFontFamilies(activeFonts);
+ loadFontsInBrowser(fontsToActivate);
+ return activeFonts;
+ };
+
+ // Removes the id from the families and faces to avoid saving that to global styles post content.
+ const cleanFontsForSave = fonts => {
+ return fonts.map(({
id: _familyDbId,
fontFace,
...font
@@ -27245,16 +27279,10 @@ function FontLibraryProvider({
}) => face)
} : {})
}));
-
- // Activate the fonts by set the new custom fonts array.
- setFontFamilies({
- ...fontFamilies,
- // Merge the existing custom fonts with the new fonts.
- custom: mergeFontFamilies(fontFamilies?.custom, fontsToActivate)
- });
-
+ };
+ const loadFontsInBrowser = fonts => {
// Add custom fonts to the browser.
- fontsToActivate.forEach(font => {
+ fonts.forEach(font => {
if (font.fontFace) {
font.fontFace.forEach(face => {
// Load font faces just in the iframe because they already are in the document.
@@ -27324,6 +27352,7 @@ function FontLibraryProvider({
value: {
libraryFontSelected,
handleSetLibraryFontSelected,
+ fontFamilies,
themeFonts,
baseThemeFonts,
customFonts,
@@ -27622,7 +27651,8 @@ function InstalledFonts() {
getFontFacesActivated,
fontFamiliesHasChanges,
notice,
- setNotice
+ setNotice,
+ fontFamilies
} = (0,external_wp_element_namespaceObject.useContext)(FontLibraryContext);
const [isConfirmDeleteOpen, setIsConfirmDeleteOpen] = (0,external_wp_element_namespaceObject.useState)(false);
const customFontFamilyId = libraryFontSelected?.source === 'custom' && libraryFontSelected?.id;
@@ -27752,7 +27782,9 @@ function InstalledFonts() {
onClick: handleUninstallClick
}, (0,external_wp_i18n_namespaceObject.__)('Delete')), (0,external_React_.createElement)(external_wp_components_namespaceObject.Button, {
variant: "primary",
- onClick: saveFontFamilies,
+ onClick: () => {
+ saveFontFamilies(fontFamilies);
+ },
disabled: !fontFamiliesHasChanges,
__experimentalIsFocusable: true
}, (0,external_wp_i18n_namespaceObject.__)('Update'))));
@@ -28188,6 +28220,7 @@ function FontCollection({
isSmall: true,
onClick: () => {
setSelectedFont(null);
+ setNotice(null);
},
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Navigate to the previous view')
}), (0,external_React_.createElement)(external_wp_components_namespaceObject.__experimentalHeading, {
@@ -32375,7 +32408,7 @@ const {
} = unlock(external_wp_components_namespaceObject.privateApis);
const DEFAULT_TAB = {
id: 'installed-fonts',
- title: (0,external_wp_i18n_namespaceObject.__)('Library')
+ title: (0,external_wp_i18n_namespaceObject._x)('Library', 'Font library')
};
const UPLOAD_TAB = {
id: 'upload-fonts',
diff --git a/wp-includes/js/dist/edit-site.min.js b/wp-includes/js/dist/edit-site.min.js
index 88e8aff..e4e01a7 100644
--- a/wp-includes/js/dist/edit-site.min.js
+++ b/wp-includes/js/dist/edit-site.min.js
@@ -1,5 +1,5 @@
/*! This file is auto-generated */
-(()=>{var e,t,n={4660:e=>{e.exports=function(){function e(t,n,r){function a(i,o){if(!n[i]){if(!t[i]){if(s)return s(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[i]={exports:{}};t[i][0].call(c.exports,(function(e){return a(t[i][1][e]||e)}),c,c.exports,e,t,n,r)}return n[i].exports}for(var s=void 0,i=0;i<r.length;i++)a(r[i]);return a}return e}()({1:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)a(n,r)&&(e[r]=n[r])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var s={arraySet:function(e,t,n,r,a){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),a);else for(var s=0;s<r;s++)e[a+s]=t[n+s]},flattenChunks:function(e){var t,n,r,a,s,i;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(i=new Uint8Array(r),a=0,t=0,n=e.length;t<n;t++)s=e[t],i.set(s,a),a+=s.length;return i}},i={arraySet:function(e,t,n,r,a){for(var s=0;s<r;s++)e[a+s]=t[n+s]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,s)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,i))},n.setTyped(r)},{}],2:[function(e,t,n){"use strict";var r=e("./common"),a=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(e){a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){s=!1}for(var i=new r.Buf8(256),o=0;o<256;o++)i[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&s||!e.subarray&&a))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",i=0;i<t;i++)n+=String.fromCharCode(e[i]);return n}i[254]=i[254]=1,n.string2buf=function(e){var t,n,a,s,i,o=e.length,l=0;for(s=0;s<o;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(a=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(a-56320),s++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(l),i=0,s=0;i<l;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(a=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(a-56320),s++),n<128?t[i++]=n:n<2048?(t[i++]=192|n>>>6,t[i++]=128|63&n):n<65536?(t[i++]=224|n>>>12,t[i++]=128|n>>>6&63,t[i++]=128|63&n):(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63,t[i++]=128|n>>>6&63,t[i++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,a=t.length;n<a;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,r,a,s,o=t||e.length,c=new Array(2*o);for(r=0,n=0;n<o;)if((a=e[n++])<128)c[r++]=a;else if((s=i[a])>4)c[r++]=65533,n+=s-1;else{for(a&=2===s?31:3===s?15:7;s>1&&n<o;)a=a<<6|63&e[n++],s--;s>1?c[r++]=65533:a<65536?c[r++]=a:(a-=65536,c[r++]=55296|a>>10&1023,c[r++]=56320|1023&a)}return l(c,r)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+i[e[n]]>t?n:t}},{"./common":1}],3:[function(e,t,n){"use strict";function r(e,t,n,r){for(var a=65535&e|0,s=e>>>16&65535|0,i=0;0!==n;){n-=i=n>2e3?2e3:n;do{s=s+(a=a+t[r++]|0)|0}while(--i);a%=65521,s%=65521}return a|s<<16|0}t.exports=r},{}],4:[function(e,t,n){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,n){"use strict";function r(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}var a=r();function s(e,t,n,r){var s=a,i=r+n;e^=-1;for(var o=r;o<i;o++)e=e>>>8^s[255&(e^t[o])];return-1^e}t.exports=s},{}],6:[function(e,t,n){"use strict";function r(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}t.exports=r},{}],7:[function(e,t,n){"use strict";var r=30,a=12;t.exports=function(e,t){var n,s,i,o,l,c,u,d,m,p,h,f,g,y,v,_,b,E,w,S,x,C,k,T,P;n=e.state,s=e.next_in,T=e.input,i=s+(e.avail_in-5),o=e.next_out,P=e.output,l=o-(t-e.avail_out),c=o+(e.avail_out-257),u=n.dmax,d=n.wsize,m=n.whave,p=n.wnext,h=n.window,f=n.hold,g=n.bits,y=n.lencode,v=n.distcode,_=(1<<n.lenbits)-1,b=(1<<n.distbits)-1;e:do{g<15&&(f+=T[s++]<<g,g+=8,f+=T[s++]<<g,g+=8),E=y[f&_];t:for(;;){if(f>>>=w=E>>>24,g-=w,0==(w=E>>>16&255))P[o++]=65535&E;else{if(!(16&w)){if(0==(64&w)){E=y[(65535&E)+(f&(1<<w)-1)];continue t}if(32&w){n.mode=a;break e}e.msg="invalid literal/length code",n.mode=r;break e}S=65535&E,(w&=15)&&(g<w&&(f+=T[s++]<<g,g+=8),S+=f&(1<<w)-1,f>>>=w,g-=w),g<15&&(f+=T[s++]<<g,g+=8,f+=T[s++]<<g,g+=8),E=v[f&b];n:for(;;){if(f>>>=w=E>>>24,g-=w,!(16&(w=E>>>16&255))){if(0==(64&w)){E=v[(65535&E)+(f&(1<<w)-1)];continue n}e.msg="invalid distance code",n.mode=r;break e}if(x=65535&E,g<(w&=15)&&(f+=T[s++]<<g,(g+=8)<w&&(f+=T[s++]<<g,g+=8)),(x+=f&(1<<w)-1)>u){e.msg="invalid distance too far back",n.mode=r;break e}if(f>>>=w,g-=w,x>(w=o-l)){if((w=x-w)>m&&n.sane){e.msg="invalid distance too far back",n.mode=r;break e}if(C=0,k=h,0===p){if(C+=d-w,w<S){S-=w;do{P[o++]=h[C++]}while(--w);C=o-x,k=P}}else if(p<w){if(C+=d+p-w,(w-=p)<S){S-=w;do{P[o++]=h[C++]}while(--w);if(C=0,p<S){S-=w=p;do{P[o++]=h[C++]}while(--w);C=o-x,k=P}}}else if(C+=p-w,w<S){S-=w;do{P[o++]=h[C++]}while(--w);C=o-x,k=P}for(;S>2;)P[o++]=k[C++],P[o++]=k[C++],P[o++]=k[C++],S-=3;S&&(P[o++]=k[C++],S>1&&(P[o++]=k[C++]))}else{C=o-x;do{P[o++]=P[C++],P[o++]=P[C++],P[o++]=P[C++],S-=3}while(S>2);S&&(P[o++]=P[C++],S>1&&(P[o++]=P[C++]))}break}}break}}while(s<i&&o<c);s-=S=g>>3,f&=(1<<(g-=S<<3))-1,e.next_in=s,e.next_out=o,e.avail_in=s<i?i-s+5:5-(s-i),e.avail_out=o<c?c-o+257:257-(o-c),n.hold=f,n.bits=g}},{}],8:[function(e,t,n){"use strict";var r=e("../utils/common"),a=e("./adler32"),s=e("./crc32"),i=e("./inffast"),o=e("./inftrees"),l=0,c=1,u=2,d=4,m=5,p=6,h=0,f=1,g=2,y=-2,v=-3,_=-4,b=-5,E=8,w=1,S=2,x=3,C=4,k=5,T=6,P=7,I=8,M=9,A=10,O=11,N=12,F=13,R=14,D=15,V=16,L=17,B=18,z=19,H=20,G=21,U=22,W=23,j=24,Z=25,q=26,Y=27,K=28,X=29,J=30,Q=31,$=852,ee=592,te=15;function ne(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function re(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ae(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=w,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32($),t.distcode=t.distdyn=new r.Buf32(ee),t.sane=1,t.back=-1,h):y}function se(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,ae(e)):y}function ie(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?y:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,se(e))):y}function oe(e,t){var n,r;return e?(r=new re,e.state=r,r.window=null,(n=ie(e,t))!==h&&(e.state=null),n):y}function le(e){return oe(e,te)}var ce,ue,de=!0;function me(e){if(de){var t;for(ce=new r.Buf32(512),ue=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(o(c,e.lens,0,288,ce,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;o(u,e.lens,0,32,ue,0,e.work,{bits:5}),de=!1}e.lencode=ce,e.lenbits=9,e.distcode=ue,e.distbits=5}function pe(e,t,n,a){var s,i=e.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new r.Buf8(i.wsize)),a>=i.wsize?(r.arraySet(i.window,t,n-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):((s=i.wsize-i.wnext)>a&&(s=a),r.arraySet(i.window,t,n-a,s,i.wnext),(a-=s)?(r.arraySet(i.window,t,n-a,a,0),i.wnext=a,i.whave=i.wsize):(i.wnext+=s,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=s))),0}function he(e,t){var n,$,ee,te,re,ae,se,ie,oe,le,ce,ue,de,he,fe,ge,ye,ve,_e,be,Ee,we,Se,xe,Ce=0,ke=new r.Buf8(4),Te=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return y;(n=e.state).mode===N&&(n.mode=F),re=e.next_out,ee=e.output,se=e.avail_out,te=e.next_in,$=e.input,ae=e.avail_in,ie=n.hold,oe=n.bits,le=ae,ce=se,we=h;e:for(;;)switch(n.mode){case w:if(0===n.wrap){n.mode=F;break}for(;oe<16;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if(2&n.wrap&&35615===ie){n.check=0,ke[0]=255&ie,ke[1]=ie>>>8&255,n.check=s(n.check,ke,2,0),ie=0,oe=0,n.mode=S;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&ie)<<8)+(ie>>8))%31){e.msg="incorrect header check",n.mode=J;break}if((15&ie)!==E){e.msg="unknown compression method",n.mode=J;break}if(oe-=4,Ee=8+(15&(ie>>>=4)),0===n.wbits)n.wbits=Ee;else if(Ee>n.wbits){e.msg="invalid window size",n.mode=J;break}n.dmax=1<<Ee,e.adler=n.check=1,n.mode=512&ie?A:N,ie=0,oe=0;break;case S:for(;oe<16;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if(n.flags=ie,(255&n.flags)!==E){e.msg="unknown compression method",n.mode=J;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=J;break}n.head&&(n.head.text=ie>>8&1),512&n.flags&&(ke[0]=255&ie,ke[1]=ie>>>8&255,n.check=s(n.check,ke,2,0)),ie=0,oe=0,n.mode=x;case x:for(;oe<32;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}n.head&&(n.head.time=ie),512&n.flags&&(ke[0]=255&ie,ke[1]=ie>>>8&255,ke[2]=ie>>>16&255,ke[3]=ie>>>24&255,n.check=s(n.check,ke,4,0)),ie=0,oe=0,n.mode=C;case C:for(;oe<16;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}n.head&&(n.head.xflags=255&ie,n.head.os=ie>>8),512&n.flags&&(ke[0]=255&ie,ke[1]=ie>>>8&255,n.check=s(n.check,ke,2,0)),ie=0,oe=0,n.mode=k;case k:if(1024&n.flags){for(;oe<16;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}n.length=ie,n.head&&(n.head.extra_len=ie),512&n.flags&&(ke[0]=255&ie,ke[1]=ie>>>8&255,n.check=s(n.check,ke,2,0)),ie=0,oe=0}else n.head&&(n.head.extra=null);n.mode=T;case T:if(1024&n.flags&&((ue=n.length)>ae&&(ue=ae),ue&&(n.head&&(Ee=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,$,te,ue,Ee)),512&n.flags&&(n.check=s(n.check,$,ue,te)),ae-=ue,te+=ue,n.length-=ue),n.length))break e;n.length=0,n.mode=P;case P:if(2048&n.flags){if(0===ae)break e;ue=0;do{Ee=$[te+ue++],n.head&&Ee&&n.length<65536&&(n.head.name+=String.fromCharCode(Ee))}while(Ee&&ue<ae);if(512&n.flags&&(n.check=s(n.check,$,ue,te)),ae-=ue,te+=ue,Ee)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=I;case I:if(4096&n.flags){if(0===ae)break e;ue=0;do{Ee=$[te+ue++],n.head&&Ee&&n.length<65536&&(n.head.comment+=String.fromCharCode(Ee))}while(Ee&&ue<ae);if(512&n.flags&&(n.check=s(n.check,$,ue,te)),ae-=ue,te+=ue,Ee)break e}else n.head&&(n.head.comment=null);n.mode=M;case M:if(512&n.flags){for(;oe<16;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if(ie!==(65535&n.check)){e.msg="header crc mismatch",n.mode=J;break}ie=0,oe=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=N;break;case A:for(;oe<32;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}e.adler=n.check=ne(ie),ie=0,oe=0,n.mode=O;case O:if(0===n.havedict)return e.next_out=re,e.avail_out=se,e.next_in=te,e.avail_in=ae,n.hold=ie,n.bits=oe,g;e.adler=n.check=1,n.mode=N;case N:if(t===m||t===p)break e;case F:if(n.last){ie>>>=7&oe,oe-=7&oe,n.mode=Y;break}for(;oe<3;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}switch(n.last=1&ie,oe-=1,3&(ie>>>=1)){case 0:n.mode=R;break;case 1:if(me(n),n.mode=H,t===p){ie>>>=2,oe-=2;break e}break;case 2:n.mode=L;break;case 3:e.msg="invalid block type",n.mode=J}ie>>>=2,oe-=2;break;case R:for(ie>>>=7&oe,oe-=7&oe;oe<32;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if((65535&ie)!=(ie>>>16^65535)){e.msg="invalid stored block lengths",n.mode=J;break}if(n.length=65535&ie,ie=0,oe=0,n.mode=D,t===p)break e;case D:n.mode=V;case V:if(ue=n.length){if(ue>ae&&(ue=ae),ue>se&&(ue=se),0===ue)break e;r.arraySet(ee,$,te,ue,re),ae-=ue,te+=ue,se-=ue,re+=ue,n.length-=ue;break}n.mode=N;break;case L:for(;oe<14;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if(n.nlen=257+(31&ie),ie>>>=5,oe-=5,n.ndist=1+(31&ie),ie>>>=5,oe-=5,n.ncode=4+(15&ie),ie>>>=4,oe-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=J;break}n.have=0,n.mode=B;case B:for(;n.have<n.ncode;){for(;oe<3;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}n.lens[Te[n.have++]]=7&ie,ie>>>=3,oe-=3}for(;n.have<19;)n.lens[Te[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Se={bits:n.lenbits},we=o(l,n.lens,0,19,n.lencode,0,n.work,Se),n.lenbits=Se.bits,we){e.msg="invalid code lengths set",n.mode=J;break}n.have=0,n.mode=z;case z:for(;n.have<n.nlen+n.ndist;){for(;ge=(Ce=n.lencode[ie&(1<<n.lenbits)-1])>>>16&255,ye=65535&Ce,!((fe=Ce>>>24)<=oe);){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if(ye<16)ie>>>=fe,oe-=fe,n.lens[n.have++]=ye;else{if(16===ye){for(xe=fe+2;oe<xe;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if(ie>>>=fe,oe-=fe,0===n.have){e.msg="invalid bit length repeat",n.mode=J;break}Ee=n.lens[n.have-1],ue=3+(3&ie),ie>>>=2,oe-=2}else if(17===ye){for(xe=fe+3;oe<xe;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}oe-=fe,Ee=0,ue=3+(7&(ie>>>=fe)),ie>>>=3,oe-=3}else{for(xe=fe+7;oe<xe;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}oe-=fe,Ee=0,ue=11+(127&(ie>>>=fe)),ie>>>=7,oe-=7}if(n.have+ue>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=J;break}for(;ue--;)n.lens[n.have++]=Ee}}if(n.mode===J)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=J;break}if(n.lenbits=9,Se={bits:n.lenbits},we=o(c,n.lens,0,n.nlen,n.lencode,0,n.work,Se),n.lenbits=Se.bits,we){e.msg="invalid literal/lengths set",n.mode=J;break}if(n.distbits=6,n.distcode=n.distdyn,Se={bits:n.distbits},we=o(u,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Se),n.distbits=Se.bits,we){e.msg="invalid distances set",n.mode=J;break}if(n.mode=H,t===p)break e;case H:n.mode=G;case G:if(ae>=6&&se>=258){e.next_out=re,e.avail_out=se,e.next_in=te,e.avail_in=ae,n.hold=ie,n.bits=oe,i(e,ce),re=e.next_out,ee=e.output,se=e.avail_out,te=e.next_in,$=e.input,ae=e.avail_in,ie=n.hold,oe=n.bits,n.mode===N&&(n.back=-1);break}for(n.back=0;ge=(Ce=n.lencode[ie&(1<<n.lenbits)-1])>>>16&255,ye=65535&Ce,!((fe=Ce>>>24)<=oe);){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if(ge&&0==(240&ge)){for(ve=fe,_e=ge,be=ye;ge=(Ce=n.lencode[be+((ie&(1<<ve+_e)-1)>>ve)])>>>16&255,ye=65535&Ce,!(ve+(fe=Ce>>>24)<=oe);){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}ie>>>=ve,oe-=ve,n.back+=ve}if(ie>>>=fe,oe-=fe,n.back+=fe,n.length=ye,0===ge){n.mode=q;break}if(32&ge){n.back=-1,n.mode=N;break}if(64&ge){e.msg="invalid literal/length code",n.mode=J;break}n.extra=15&ge,n.mode=U;case U:if(n.extra){for(xe=n.extra;oe<xe;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}n.length+=ie&(1<<n.extra)-1,ie>>>=n.extra,oe-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=W;case W:for(;ge=(Ce=n.distcode[ie&(1<<n.distbits)-1])>>>16&255,ye=65535&Ce,!((fe=Ce>>>24)<=oe);){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if(0==(240&ge)){for(ve=fe,_e=ge,be=ye;ge=(Ce=n.distcode[be+((ie&(1<<ve+_e)-1)>>ve)])>>>16&255,ye=65535&Ce,!(ve+(fe=Ce>>>24)<=oe);){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}ie>>>=ve,oe-=ve,n.back+=ve}if(ie>>>=fe,oe-=fe,n.back+=fe,64&ge){e.msg="invalid distance code",n.mode=J;break}n.offset=ye,n.extra=15&ge,n.mode=j;case j:if(n.extra){for(xe=n.extra;oe<xe;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}n.offset+=ie&(1<<n.extra)-1,ie>>>=n.extra,oe-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=J;break}n.mode=Z;case Z:if(0===se)break e;if(ue=ce-se,n.offset>ue){if((ue=n.offset-ue)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=J;break}ue>n.wnext?(ue-=n.wnext,de=n.wsize-ue):de=n.wnext-ue,ue>n.length&&(ue=n.length),he=n.window}else he=ee,de=re-n.offset,ue=n.length;ue>se&&(ue=se),se-=ue,n.length-=ue;do{ee[re++]=he[de++]}while(--ue);0===n.length&&(n.mode=G);break;case q:if(0===se)break e;ee[re++]=n.length,se--,n.mode=G;break;case Y:if(n.wrap){for(;oe<32;){if(0===ae)break e;ae--,ie|=$[te++]<<oe,oe+=8}if(ce-=se,e.total_out+=ce,n.total+=ce,ce&&(e.adler=n.check=n.flags?s(n.check,ee,ce,re-ce):a(n.check,ee,ce,re-ce)),ce=se,(n.flags?ie:ne(ie))!==n.check){e.msg="incorrect data check",n.mode=J;break}ie=0,oe=0}n.mode=K;case K:if(n.wrap&&n.flags){for(;oe<32;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if(ie!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=J;break}ie=0,oe=0}n.mode=X;case X:we=f;break e;case J:we=v;break e;case Q:return _;default:return y}return e.next_out=re,e.avail_out=se,e.next_in=te,e.avail_in=ae,n.hold=ie,n.bits=oe,(n.wsize||ce!==e.avail_out&&n.mode<J&&(n.mode<Y||t!==d))&&pe(e,e.output,e.next_out,ce-e.avail_out)?(n.mode=Q,_):(le-=e.avail_in,ce-=e.avail_out,e.total_in+=le,e.total_out+=ce,n.total+=ce,n.wrap&&ce&&(e.adler=n.check=n.flags?s(n.check,ee,ce,e.next_out-ce):a(n.check,ee,ce,e.next_out-ce)),e.data_type=n.bits+(n.last?64:0)+(n.mode===N?128:0)+(n.mode===H||n.mode===D?256:0),(0===le&&0===ce||t===d)&&we===h&&(we=b),we)}function fe(e){if(!e||!e.state)return y;var t=e.state;return t.window&&(t.window=null),e.state=null,h}function ge(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?y:(n.head=t,t.done=!1,h):y}function ye(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&n.mode!==O?y:n.mode===O&&a(1,t,r,0)!==n.check?v:pe(e,t,r,r)?(n.mode=Q,_):(n.havedict=1,h):y}n.inflateReset=se,n.inflateReset2=ie,n.inflateResetKeep=ae,n.inflateInit=le,n.inflateInit2=oe,n.inflate=he,n.inflateEnd=fe,n.inflateGetHeader=ge,n.inflateSetDictionary=ye,n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,n){"use strict";var r=e("../utils/common"),a=15,s=852,i=592,o=0,l=1,c=2,u=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],d=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],p=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,h,f,g,y,v){var _,b,E,w,S,x,C,k,T,P=v.bits,I=0,M=0,A=0,O=0,N=0,F=0,R=0,D=0,V=0,L=0,B=null,z=0,H=new r.Buf16(a+1),G=new r.Buf16(a+1),U=null,W=0;for(I=0;I<=a;I++)H[I]=0;for(M=0;M<h;M++)H[t[n+M]]++;for(N=P,O=a;O>=1&&0===H[O];O--);if(N>O&&(N=O),0===O)return f[g++]=20971520,f[g++]=20971520,v.bits=1,0;for(A=1;A<O&&0===H[A];A++);for(N<A&&(N=A),D=1,I=1;I<=a;I++)if(D<<=1,(D-=H[I])<0)return-1;if(D>0&&(e===o||1!==O))return-1;for(G[1]=0,I=1;I<a;I++)G[I+1]=G[I]+H[I];for(M=0;M<h;M++)0!==t[n+M]&&(y[G[t[n+M]]++]=M);if(e===o?(B=U=y,x=19):e===l?(B=u,z-=257,U=d,W-=257,x=256):(B=m,U=p,x=-1),L=0,M=0,I=A,S=g,F=N,R=0,E=-1,w=(V=1<<N)-1,e===l&&V>s||e===c&&V>i)return 1;for(;;){C=I-R,y[M]<x?(k=0,T=y[M]):y[M]>x?(k=U[W+y[M]],T=B[z+y[M]]):(k=96,T=0),_=1<<I-R,A=b=1<<F;do{f[S+(L>>R)+(b-=_)]=C<<24|k<<16|T|0}while(0!==b);for(_=1<<I-1;L&_;)_>>=1;if(0!==_?(L&=_-1,L+=_):L=0,M++,0==--H[I]){if(I===O)break;I=t[n+y[M]]}if(I>N&&(L&w)!==E){for(0===R&&(R=N),S+=A,D=1<<(F=I-R);F+R<O&&!((D-=H[F+R])<=0);)F++,D<<=1;if(V+=1<<F,e===l&&V>s||e===c&&V>i)return 1;f[E=L&w]=N<<24|F<<16|S-g|0}}return 0!==L&&(f[S+L]=I-R<<24|64<<16|0),v.bits=N,0}},{"../utils/common":1}],10:[function(e,t,n){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,n){"use strict";function r(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=r},{}],"/lib/inflate.js":[function(e,t,n){"use strict";var r=e("./zlib/inflate"),a=e("./utils/common"),s=e("./utils/strings"),i=e("./zlib/constants"),o=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=a.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==i.Z_OK)throw new Error(o[n]);if(this.header=new c,r.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=s.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=r.inflateSetDictionary(this.strm,t.dictionary))!==i.Z_OK))throw new Error(o[n])}function m(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||o[n.err];return n.result}function p(e,t){return(t=t||{}).raw=!0,m(e,t)}d.prototype.push=function(e,t){var n,o,l,c,d,m=this.strm,p=this.options.chunkSize,h=this.options.dictionary,f=!1;if(this.ended)return!1;o=t===~~t?t:!0===t?i.Z_FINISH:i.Z_NO_FLUSH,"string"==typeof e?m.input=s.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?m.input=new Uint8Array(e):m.input=e,m.next_in=0,m.avail_in=m.input.length;do{if(0===m.avail_out&&(m.output=new a.Buf8(p),m.next_out=0,m.avail_out=p),(n=r.inflate(m,i.Z_NO_FLUSH))===i.Z_NEED_DICT&&h&&(n=r.inflateSetDictionary(this.strm,h)),n===i.Z_BUF_ERROR&&!0===f&&(n=i.Z_OK,f=!1),n!==i.Z_STREAM_END&&n!==i.Z_OK)return this.onEnd(n),this.ended=!0,!1;m.next_out&&(0!==m.avail_out&&n!==i.Z_STREAM_END&&(0!==m.avail_in||o!==i.Z_FINISH&&o!==i.Z_SYNC_FLUSH)||("string"===this.options.to?(l=s.utf8border(m.output,m.next_out),c=m.next_out-l,d=s.buf2string(m.output,l),m.next_out=c,m.avail_out=p-c,c&&a.arraySet(m.output,m.output,l,c,0),this.onData(d)):this.onData(a.shrinkBuf(m.output,m.next_out)))),0===m.avail_in&&0===m.avail_out&&(f=!0)}while((m.avail_in>0||0===m.avail_out)&&n!==i.Z_STREAM_END);return n===i.Z_STREAM_END&&(o=i.Z_FINISH),o===i.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===i.Z_OK):o!==i.Z_SYNC_FLUSH||(this.onEnd(i.Z_OK),m.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===i.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=d,n.inflate=m,n.inflateRaw=p,n.ungzip=m},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")},8572:e=>{e.exports=function(){function e(t,n,r){function a(i,o){if(!n[i]){if(!t[i]){if(s)return s(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[i]={exports:{}};t[i][0].call(c.exports,(function(e){return a(t[i][1][e]||e)}),c,c.exports,e,t,n,r)}return n[i].exports}for(var s=void 0,i=0;i<r.length;i++)a(r[i]);return a}return e}()({1:[function(e,t,n){var r=4096,a=2*r+32,s=2*r-1,i=new Uint32Array([0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215]);function o(e){this.buf_=new Uint8Array(a),this.input_=e,this.reset()}o.READ_SIZE=r,o.IBUF_MASK=s,o.prototype.reset=function(){this.buf_ptr_=0,this.val_=0,this.pos_=0,this.bit_pos_=0,this.bit_end_pos_=0,this.eos_=0,this.readMoreInput();for(var e=0;e<4;e++)this.val_|=this.buf_[this.pos_]<<8*e,++this.pos_;return this.bit_end_pos_>0},o.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var e=this.buf_ptr_,t=this.input_.read(this.buf_,e,r);if(t<0)throw new Error("Unexpected end of input");if(t<r){this.eos_=1;for(var n=0;n<32;n++)this.buf_[e+t+n]=0}if(0===e){for(n=0;n<32;n++)this.buf_[(r<<1)+n]=this.buf_[n];this.buf_ptr_=r}else this.buf_ptr_=0;this.bit_end_pos_+=t<<3}},o.prototype.fillBitWindow=function(){for(;this.bit_pos_>=8;)this.val_>>>=8,this.val_|=this.buf_[this.pos_&s]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},o.prototype.readBits=function(e){32-this.bit_pos_<e&&this.fillBitWindow();var t=this.val_>>>this.bit_pos_&i[e];return this.bit_pos_+=e,t},t.exports=o},{}],2:[function(e,t,n){n.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),n.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},{}],3:[function(e,t,n){var r=e("./streams").BrotliInput,a=e("./streams").BrotliOutput,s=e("./bit_reader"),i=e("./dictionary"),o=e("./huffman").HuffmanCode,l=e("./huffman").BrotliBuildHuffmanTable,c=e("./context"),u=e("./prefix"),d=e("./transform"),m=8,p=16,h=256,f=704,g=26,y=6,v=2,_=8,b=255,E=1080,w=18,S=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),x=16,C=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),k=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),T=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function P(e){var t;return 0===e.readBits(1)?16:(t=e.readBits(3))>0?17+t:(t=e.readBits(3))>0?8+t:17}function I(e){if(e.readBits(1)){var t=e.readBits(3);return 0===t?1:e.readBits(t)+(1<<t)}return 0}function M(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function A(e){var t,n,r,a=new M;if(a.input_end=e.readBits(1),a.input_end&&e.readBits(1))return a;if(7===(t=e.readBits(2)+4)){if(a.is_metadata=!0,0!==e.readBits(1))throw new Error("Invalid reserved bit");if(0===(n=e.readBits(2)))return a;for(r=0;r<n;r++){var s=e.readBits(8);if(r+1===n&&n>1&&0===s)throw new Error("Invalid size byte");a.meta_block_length|=s<<8*r}}else for(r=0;r<t;++r){var i=e.readBits(4);if(r+1===t&&t>4&&0===i)throw new Error("Invalid size nibble");a.meta_block_length|=i<<4*r}return++a.meta_block_length,a.input_end||a.is_metadata||(a.is_uncompressed=e.readBits(1)),a}function O(e,t,n){var r;return n.fillBitWindow(),(r=e[t+=n.val_>>>n.bit_pos_&b].bits-_)>0&&(n.bit_pos_+=_,t+=e[t].value,t+=n.val_>>>n.bit_pos_&(1<<r)-1),n.bit_pos_+=e[t].bits,e[t].value}function N(e,t,n,r){for(var a=0,s=m,i=0,c=0,u=32768,d=[],h=0;h<32;h++)d.push(new o(0,0));for(l(d,0,5,e,w);a<t&&u>0;){var f,g=0;if(r.readMoreInput(),r.fillBitWindow(),g+=r.val_>>>r.bit_pos_&31,r.bit_pos_+=d[g].bits,(f=255&d[g].value)<p)i=0,n[a++]=f,0!==f&&(s=f,u-=32768>>f);else{var y,v,_=f-14,b=0;if(f===p&&(b=s),c!==b&&(i=0,c=b),y=i,i>0&&(i-=2,i<<=_),a+(v=(i+=r.readBits(_)+3)-y)>t)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var E=0;E<v;E++)n[a+E]=c;a+=v,0!==c&&(u-=v<<15-c)}}if(0!==u)throw new Error("[ReadHuffmanCodeLengths] space = "+u);for(;a<t;a++)n[a]=0}function F(e,t,n,r){var a,s=0,i=new Uint8Array(e);if(r.readMoreInput(),1===(a=r.readBits(2))){for(var c=e-1,u=0,d=new Int32Array(4),m=r.readBits(2)+1;c;)c>>=1,++u;for(p=0;p<m;++p)d[p]=r.readBits(u)%e,i[d[p]]=2;switch(i[d[0]]=1,m){case 1:break;case 3:if(d[0]===d[1]||d[0]===d[2]||d[1]===d[2])throw new Error("[ReadHuffmanCode] invalid symbols");break;case 2:if(d[0]===d[1])throw new Error("[ReadHuffmanCode] invalid symbols");i[d[1]]=1;break;case 4:if(d[0]===d[1]||d[0]===d[2]||d[0]===d[3]||d[1]===d[2]||d[1]===d[3]||d[2]===d[3])throw new Error("[ReadHuffmanCode] invalid symbols");r.readBits(1)?(i[d[2]]=3,i[d[3]]=3):i[d[0]]=2}}else{var p,h=new Uint8Array(w),f=32,g=0,y=[new o(2,0),new o(2,4),new o(2,3),new o(3,2),new o(2,0),new o(2,4),new o(2,3),new o(4,1),new o(2,0),new o(2,4),new o(2,3),new o(3,2),new o(2,0),new o(2,4),new o(2,3),new o(4,5)];for(p=a;p<w&&f>0;++p){var v,b=S[p],E=0;r.fillBitWindow(),E+=r.val_>>>r.bit_pos_&15,r.bit_pos_+=y[E].bits,v=y[E].value,h[b]=v,0!==v&&(f-=32>>v,++g)}if(1!==g&&0!==f)throw new Error("[ReadHuffmanCode] invalid num_codes or space");N(h,e,i,r)}if(0===(s=l(t,n,_,i,e)))throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return s}function R(e,t,n){var r,a;return r=O(e,t,n),a=u.kBlockLengthPrefixCode[r].nbits,u.kBlockLengthPrefixCode[r].offset+n.readBits(a)}function D(e,t,n){var r;return e<x?(n+=C[e],r=t[n&=3]+k[e]):r=e-x+1,r}function V(e,t){for(var n=e[t],r=t;r;--r)e[r]=e[r-1];e[0]=n}function L(e,t){var n,r=new Uint8Array(256);for(n=0;n<256;++n)r[n]=n;for(n=0;n<t;++n){var a=e[n];e[n]=r[a],a&&V(r,a)}}function B(e,t){this.alphabet_size=e,this.num_htrees=t,this.codes=new Array(t+t*T[e+31>>>5]),this.htrees=new Uint32Array(t)}function z(e,t){var n,r,a={num_htrees:null,context_map:null},s=0;t.readMoreInput();var i=a.num_htrees=I(t)+1,l=a.context_map=new Uint8Array(e);if(i<=1)return a;for(t.readBits(1)&&(s=t.readBits(4)+1),n=[],r=0;r<E;r++)n[r]=new o(0,0);for(F(i+s,n,0,t),r=0;r<e;){var c;if(t.readMoreInput(),0===(c=O(n,0,t)))l[r]=0,++r;else if(c<=s)for(var u=1+(1<<c)+t.readBits(c);--u;){if(r>=e)throw new Error("[DecodeContextMap] i >= context_map_size");l[r]=0,++r}else l[r]=c-s,++r}return t.readBits(1)&&L(l,e),a}function H(e,t,n,r,a,s,i){var o,l=2*n,c=n,u=O(t,n*E,i);(o=0===u?a[l+(1&s[c])]:1===u?a[l+(s[c]-1&1)]+1:u-2)>=e&&(o-=e),r[n]=o,a[l+(1&s[c])]=o,++s[c]}function G(e,t,n,r,a,i){var o,l=a+1,c=n&a,u=i.pos_&s.IBUF_MASK;if(t<8||i.bit_pos_+(t<<3)<i.bit_end_pos_)for(;t-- >0;)i.readMoreInput(),r[c++]=i.readBits(8),c===l&&(e.write(r,l),c=0);else{if(i.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;i.bit_pos_<32;)r[c]=i.val_>>>i.bit_pos_,i.bit_pos_+=8,++c,--t;if(u+(o=i.bit_end_pos_-i.bit_pos_>>3)>s.IBUF_MASK){for(var d=s.IBUF_MASK+1-u,m=0;m<d;m++)r[c+m]=i.buf_[u+m];o-=d,c+=d,t-=d,u=0}for(m=0;m<o;m++)r[c+m]=i.buf_[u+m];if(t-=o,(c+=o)>=l)for(e.write(r,l),c-=l,m=0;m<c;m++)r[m]=r[l+m];for(;c+t>=l;){if(o=l-c,i.input_.read(r,c,o)<o)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");e.write(r,l),t-=o,c=0}if(i.input_.read(r,c,t)<t)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");i.reset()}}function U(e){var t=e.bit_pos_+7&-8;return 0==e.readBits(t-e.bit_pos_)}function W(e){var t=new r(e),n=new s(t);return P(n),A(n).meta_block_length}function j(e,t){var n=new r(e);null==t&&(t=W(e));var s=new Uint8Array(t),i=new a(s);return Z(n,i),i.pos<i.buffer.length&&(i.buffer=i.buffer.subarray(0,i.pos)),i.buffer}function Z(e,t){var n,r,a,l,m,p,_,b,w,S=0,C=0,k=0,T=0,M=[16,15,11,4],N=0,V=0,L=0,W=[new B(0,0),new B(0,0),new B(0,0)],j=128+s.READ_SIZE;r=(1<<(k=P(w=new s(e))))-16,l=(a=1<<k)-1,m=new Uint8Array(a+j+i.maxDictionaryWordLength),p=a,_=[],b=[];for(var Z=0;Z<3*E;Z++)_[Z]=new o(0,0),b[Z]=new o(0,0);for(;!C;){var q,Y,K,X,J,Q,$,ee,te,ne=0,re=[1<<28,1<<28,1<<28],ae=[0],se=[1,1,1],ie=[0,1,0,1,0,1],oe=[0],le=null,ce=null,ue=null,de=null,me=0,pe=null,he=0,fe=0,ge=0;for(n=0;n<3;++n)W[n].codes=null,W[n].htrees=null;w.readMoreInput();var ye=A(w);if(S+(ne=ye.meta_block_length)>t.buffer.length){var ve=new Uint8Array(S+ne);ve.set(t.buffer),t.buffer=ve}if(C=ye.input_end,q=ye.is_uncompressed,ye.is_metadata)for(U(w);ne>0;--ne)w.readMoreInput(),w.readBits(8);else if(0!==ne)if(q)w.bit_pos_=w.bit_pos_+7&-8,G(t,ne,S,m,l,w),S+=ne;else{for(n=0;n<3;++n)se[n]=I(w)+1,se[n]>=2&&(F(se[n]+2,_,n*E,w),F(g,b,n*E,w),re[n]=R(b,n*E,w),oe[n]=1);for(w.readMoreInput(),X=(1<<(Y=w.readBits(2)))-1,J=(K=x+(w.readBits(4)<<Y))+(48<<Y),ce=new Uint8Array(se[0]),n=0;n<se[0];++n)w.readMoreInput(),ce[n]=w.readBits(2)<<1;var _e=z(se[0]<<y,w);Q=_e.num_htrees,le=_e.context_map;var be=z(se[2]<<v,w);for($=be.num_htrees,ue=be.context_map,W[0]=new B(h,Q),W[1]=new B(f,se[1]),W[2]=new B(J,$),n=0;n<3;++n)W[n].decode(w);for(de=0,pe=0,ee=ce[ae[0]],fe=c.lookupOffsets[ee],ge=c.lookupOffsets[ee+1],te=W[1].htrees[0];ne>0;){var Ee,we,Se,xe,Ce,ke,Te,Pe,Ie,Me,Ae,Oe;for(w.readMoreInput(),0===re[1]&&(H(se[1],_,1,ae,ie,oe,w),re[1]=R(b,E,w),te=W[1].htrees[ae[1]]),--re[1],(we=(Ee=O(W[1].codes,te,w))>>6)>=2?(we-=2,Te=-1):Te=0,Se=u.kInsertRangeLut[we]+(Ee>>3&7),xe=u.kCopyRangeLut[we]+(7&Ee),Ce=u.kInsertLengthPrefixCode[Se].offset+w.readBits(u.kInsertLengthPrefixCode[Se].nbits),ke=u.kCopyLengthPrefixCode[xe].offset+w.readBits(u.kCopyLengthPrefixCode[xe].nbits),V=m[S-1&l],L=m[S-2&l],Ie=0;Ie<Ce;++Ie)w.readMoreInput(),0===re[0]&&(H(se[0],_,0,ae,ie,oe,w),re[0]=R(b,0,w),de=ae[0]<<y,ee=ce[ae[0]],fe=c.lookupOffsets[ee],ge=c.lookupOffsets[ee+1]),me=le[de+(c.lookup[fe+V]|c.lookup[ge+L])],--re[0],L=V,V=O(W[0].codes,W[0].htrees[me],w),m[S&l]=V,(S&l)===l&&t.write(m,a),++S;if((ne-=Ce)<=0)break;if(Te<0&&(w.readMoreInput(),0===re[2]&&(H(se[2],_,2,ae,ie,oe,w),re[2]=R(b,2*E,w),pe=ae[2]<<v),--re[2],he=ue[pe+(255&(ke>4?3:ke-2))],(Te=O(W[2].codes,W[2].htrees[he],w))>=K&&(Oe=(Te-=K)&X,Te=K+((Ne=(2+(1&(Te>>=Y))<<(Ae=1+(Te>>1)))-4)+w.readBits(Ae)<<Y)+Oe)),(Pe=D(Te,M,N))<0)throw new Error("[BrotliDecompress] invalid distance");if(Me=S&l,Pe>(T=S<r&&T!==r?S:r)){if(!(ke>=i.minDictionaryWordLength&&ke<=i.maxDictionaryWordLength))throw new Error("Invalid backward reference. pos: "+S+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);var Ne=i.offsetsByLength[ke],Fe=Pe-T-1,Re=i.sizeBitsByLength[ke],De=Fe>>Re;if(Ne+=(Fe&(1<<Re)-1)*ke,!(De<d.kNumTransforms))throw new Error("Invalid backward reference. pos: "+S+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);var Ve=d.transformDictionaryWord(m,Me,Ne,ke,De);if(S+=Ve,ne-=Ve,(Me+=Ve)>=p){t.write(m,a);for(var Le=0;Le<Me-p;Le++)m[Le]=m[p+Le]}}else{if(Te>0&&(M[3&N]=Pe,++N),ke>ne)throw new Error("Invalid backward reference. pos: "+S+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);for(Ie=0;Ie<ke;++Ie)m[S&l]=m[S-Pe&l],(S&l)===l&&t.write(m,a),++S,--ne}V=m[S-1&l],L=m[S-2&l]}S&=1073741823}}t.write(m,S&l)}B.prototype.decode=function(e){var t,n=0;for(t=0;t<this.num_htrees;++t)this.htrees[t]=n,n+=F(this.alphabet_size,this.codes,n,e)},n.BrotliDecompressedSize=W,n.BrotliDecompressBuffer=j,n.BrotliDecompress=Z,i.init()},{"./bit_reader":1,"./context":2,"./dictionary":6,"./huffman":7,"./prefix":9,"./streams":10,"./transform":11}],4:[function(e,t,n){var r=e("base64-js");n.init=function(){return(0,e("./decode").BrotliDecompressBuffer)(r.toByteArray(e("./dictionary.bin.js")))}},{"./decode":3,"./dictionary.bin.js":5,"base64-js":8}],5:[function(e,t,n){t.exports="W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3Q99MvKtwB6bHdERYRY0hStJoMjNeTsNX7bn+Y7e4EQ3bf8xBc7L0BsyfFPK43dGSXpL6clYC/I328h54/VYrQ5i0648FgbGtl837svJ35L3Mot/+nPlNpWgKx1gGXQYqX6n+bbZ7wuyCHKcUok12Xjqub7NXZGzqBx0SD+uziNf87t7ve42jxSKQoW3nyxVrWIGlFShhCKxjpZZ5MeGna0+lBkk+kaN8F9qFBAFgEogyMBdcX/T1W/WnMOi/7ycWUQloEBKGeC48MkiwqJkJO+12eQiOFHMmck6q/IjWW3RZlany23TBm+cNr/84/oi5GGmGBZWrZ6j+zykVozz5fT/QH/Da6WTbZYYPynVNO7kxzuNN2kxKKWche5WveitPKAecB8YcAHz/+zXLjcLzkdDSktNIDwZE9J9X+tto43oJy65wApM3mDzYtCwX9lM+N5VR3kXYo0Z3t0TtXfgBFg7gU8oN0Dgl7fZlUbhNll+0uuohRVKjrEd8egrSndy5/Tgd2gqjA4CAVuC7ESUmL3DZoGnfhQV8uwnpi8EGvAVVsowNRxPudck7+oqAUDkwZopWqFnW1riss0t1z6iCISVKreYGNvQcXv+1L9+jbP8cd/dPUiqBso2q+7ZyFBvENCkkVr44iyPbtOoOoCecWsiuqMSML5lv+vN5MzUr+Dnh73G7Q1YnRYJVYXHRJaNAOByiaK6CusgFdBPE40r0rvqXV7tksKO2DrHYXBTv8P5ysqxEx8VDXUDDqkPH6NNOV/a2WH8zlkXRELSa8P+heNyJBBP7PgsG1EtWtNef6/i+lcayzQwQCsduidpbKfhWUDgAEmyhGu/zVTacI6RS0zTABrOYueemnVa19u9fT23N/Ta6RvTpof5DWygqreCqrDAgM4LID1+1T/taU6yTFVLqXOv+/MuQOFnaF8vLMKD7tKWDoBdALgxF33zQccCcdHx8fKIVdW69O7qHtXpeGr9jbbpFA+qRMWr5hp0s67FPc7HAiLV0g0/peZlW7hJPYEhZyhpSwahnf93/tZgfqZWXFdmdXBzqxGHLrQKxoAY6fRoBhgCRPmmGueYZ5JexTVDKUIXzkG/fqp/0U3hAgQdJ9zumutK6nqWbaqvm1pgu03IYR+G+8s0jDBBz8cApZFSBeuWasyqo2OMDKAZCozS+GWSvL/HsE9rHxooe17U3s/lTE+VZAk4j3dp6uIGaC0JMiqR5CUsabPyM0dOYDR7Ea7ip4USZlya38YfPtvrX/tBlhHilj55nZ1nfN24AOAi9BVtz/Mbn8AEDJCqJgsVUa6nQnSxv2Fs7l/NlCzpfYEjmPrNyib/+t0ei2eEMjvNhLkHCZlci4WhBe7ePZTmzYqlY9+1pxtS4GB+5lM1BHT9tS270EWUDYFq1I0yY/fNiAk4bk9yBgmef/f2k6AlYQZHsNFnW8wBQxCd68iWv7/35bXfz3JZmfGligWAKRjIs3IpzxQ27vAglHSiOzCYzJ9L9A1CdiyFvyR66ucA4jKifu5ehwER26yV7HjKqn5Mfozo7Coxxt8LWWPT47BeMxX8p0Pjb7hZn+6bw7z3Lw+7653j5sI8CLu5kThpMlj1m4c2ch3jGcP1FsT13vuK3qjecKTZk2kHcOZY40UX+qdaxstZqsqQqgXz+QGF99ZJLqr3VYu4aecl1Ab5GmqS8k/GV5b95zxQ5d4EfXUJ6kTS/CXF/aiqKDOT1T7Jz5z0PwDUcwr9clLN1OJGCiKfqvah+h3XzrBOiLOW8wvn8gW6qE8vPxi+Efv+UH55T7PQFVMh6cZ1pZQlzJpKZ7P7uWvwPGJ6DTlR6wbyj3Iv2HyefnRo/dv7dNx+qaa0N38iBsR++Uil7Wd4afwDNsrzDAK4fXZwvEY/jdKuIKXlfrQd2C39dW7ntnRbIp9OtGy9pPBn/V2ASoi/2UJZfS+xuGLH8bnLuPlzdTNS6zdyk8Dt/h6sfOW5myxh1f+zf3zZ3MX/mO9cQPp5pOx967ZA6/pqHvclNfnUFF+rq+Vd7alKr6KWPcIDhpn6v2K6NlUu6LrKo8b/pYpU/Gazfvtwhn7tEOUuXht5rUJdSf6sLjYf0VTYDgwJ81yaqKTUYej/tbHckSRb/HZicwGJqh1mAHB/IuNs9dc9yuvF3D5Xocm3elWFdq5oEy70dYFit79yaLiNjPj5UUcVmZUVhQEhW5V2Z6Cm4HVH/R8qlamRYwBileuh07CbEce3TXa2JmXWBf+ozt319psboobeZhVnwhMZzOeQJzhpTDbP71Tv8HuZxxUI/+ma3XW6DFDDs4+qmpERwHGBd2edxwUKlODRdUWZ/g0GOezrbzOZauFMai4QU6GVHV6aPNBiBndHSsV4IzpvUiiYyg6OyyrL4Dj5q/Lw3N5kAwftEVl9rNd7Jk5PDij2hTH6wIXnsyXkKePxbmHYgC8A6an5Fob/KH5GtC0l4eFso+VpxedtJHdHpNm+Bvy4C79yVOkrZsLrQ3OHCeB0Ra+kBIRldUGlDCEmq2RwXnfyh6Dz+alk6eftI2n6sastRrGwbwszBeDRS/Fa/KwRJkCzTsLr/JCs5hOPE/MPLYdZ1F1fv7D+VmysX6NpOC8aU9F4Qs6HvDyUy9PvFGDKZ/P5101TYHFl8pjj6wm/qyS75etZhhfg0UEL4OYmHk6m6dO192AzoIyPSV9QedDA4Ml23rRbqxMPMxf7FJnDc5FTElVS/PyqgePzmwVZ26NWhRDQ+oaT7ly7ell4s3DypS1s0g+tOr7XHrrkZj9+x/mJBttrLx98lFIaRZzHz4aC7r52/JQ4VjHahY2/YVXZn/QC2ztQb/sY3uRlyc5vQS8nLPGT/n27495i8HPA152z7Fh5aFpyn1GPJKHuPL8Iw94DuW3KjkURAWZXn4EQy89xiKEHN1mk/tkM4gYDBxwNoYvRfE6LFqsxWJtPrDGbsnLMap3Ka3MUoytW0cvieozOmdERmhcqzG+3HmZv2yZeiIeQTKGdRT4HHNxekm1tY+/n06rGmFleqLscSERzctTKM6G9P0Pc1RmVvrascIxaO1CQCiYPE15bD7c3xSeW7gXxYjgxcrUlcbIvO0r+Yplhx0kTt3qafDOmFyMjgGxXu73rddMHpV1wMubyAGcf/v5dLr5P72Ta9lBF+fzMJrMycwv+9vnU3ANIl1cH9tfW7af8u0/HG0vV47jNFXzFTtaha1xvze/s8KMtCYucXc1nzfd/MQydUXn/b72RBt5wO/3jRcMH9BdhC/yctKBIveRYPrNpDWqBsO8VMmP+WvRaOcA4zRMR1PvSoO92rS7pYEv+fZfEfTMzEdM+6X5tLlyxExhqLRkms5EuLovLfx66de5fL2/yX02H52FPVwahrPqmN/E0oVXnsCKhbi/yRxX83nRbUKWhzYceXOntfuXn51NszJ6MO73pQf5Pl4in3ec4JU8hF7ppV34+mm9r1LY0ee/i1O1wpd8+zfLztE0cqBxggiBi5Bu95v9l3r9r/U5hweLn+TbfxowrWDqdJauKd8+q/dH8sbPkc9ttuyO94f7/XK/nHX46MPFLEb5qQlNPvhJ50/59t9ft3LXu7uVaWaO2bDrDCnRSzZyWvFKxO1+vT8MwwunR3bX0CkfPjqb4K9O19tn5X50PvmYpEwHtiW9WtzuV/s76B1zvLLNkViNd8ySxIl/3orfqP90TyTGaf7/rx8jQzeHJXdmh/N6YDvbvmTBwCdxfEQ1NcL6wNMdSIXNq7b1EUzRy1/Axsyk5p22GMG1b+GxFgbHErZh92wuvco0AuOLXct9hvw2nw/LqIcDRRmJmmZzcgUa7JpM/WV/S9IUfbF56TL2orzqwebdRD8nIYNJ41D/hz37Fo11p2Y21wzPcn713qVGhqtevStYfGH4n69OEJtPvbbLYWvscDqc3Hgnu166+tAyLnxrX0Y5zoYjV++1sI7t5kMr02KT/+uwtkc+rZLOf/qn/s3nYCf13Dg8/sB2diJgjGqjQ+TLhxbzyue2Ob7X6/9lUwW7a+lbznHzOYy8LKW1C/uRPbQY3KW/0gO9LXunHLvPL97afba9bFtc9hmz7GAttjVYlCvQAiOwAk/gC5+hkLEs6tr3AZKxLJtOEwk2dLxTYWsIB/j/ToWtIWzo906FrSG8iaqqqqqqiIiIiAgzMzMzNz+AyK+01/zi8n8S+Y1MjoRaQ80WU/G8MBlO+53VPXANrWm4wzGUVZUjjBJZVdhpcfkjsmcWaO+UEldXi1e+zq+HOsCpknYshuh8pOLISJun7TN0EIGW2xTnlOImeecnoGW4raxe2G1T3HEvfYUYMhG+gAFOAwh5nK8mZhwJMmN7r224QVsNFvZ87Z0qatvknklyPDK3Hy45PgVKXji52Wen4d4PlFVVYGnNap+fSpFbK90rYnhUc6n91Q3AY9E0tJOFrcfZtm/491XbcG/jsViUPPX76qmeuiz+qY1Hk7/1VPM405zWVuoheLUimpWYdVzCmUdKHebMdzgrYrb8mL2eeLSnRWHdonfZa8RsOU9F37w+591l5FLYHiOqWeHtE/lWrBHcRKp3uhtr8yXm8LU/5ms+NM6ZKsqu90cFZ4o58+k4rdrtB97NADFbwmEG7lXqvirhOTOqU14xuUF2myIjURcPHrPOQ4lmM3PeMg7bUuk0nnZi67bXsU6H8lhqIo8TaOrEafCO1ARK9PjC0QOoq2BxmMdgYB9G/lIb9++fqNJ2s7BHGFyBNmZAR8J3KCo012ikaSP8BCrf6VI0X5xdnbhHIO+B5rbOyB54zXkzfObyJ4ecwxfqBJMLFc7m59rNcw7hoHnFZ0b00zee+gTqvjm61Pb4xn0kcDX4jvHM0rBXZypG3DCKnD/Waa/ZtHmtFPgO5eETx+k7RrVg3aSwm2YoNXnCs3XPQDhNn+Fia6IlOOuIG6VJH7TP6ava26ehKHQa2T4N0tcZ9dPCGo3ZdnNltsHQbeYt5vPnJezV/cAeNypdml1vCHI8M81nSRP5Qi2+mI8v/sxiZru9187nRtp3f/42NemcONa+4eVC3PCZzc88aZh851CqSsshe70uPxeN/dmYwlwb3trwMrN1Gq8jbnApcVDx/yDPeYs5/7r62tsQ6lLg+DiFXTEhzR9dHqv0iT4tgj825W+H3XiRUNUZT2kR9Ri0+lp+UM3iQtS8uOE23Ly4KYtvqH13jghUntJRAewuzNLDXp8RxdcaA3cMY6TO2IeSFRXezeWIjCqyhsUdMYuCgYTZSKpBype1zRfq8FshvfBPc6BAQWl7/QxIDp3VGo1J3vn42OEs3qznws+YLRXbymyB19a9XBx6n/owcyxlEYyFWCi+kG9F+EyD/4yn80+agaZ9P7ay2Dny99aK2o91FkfEOY8hBwyfi5uwx2y5SaHmG+oq/zl1FX/8irOf8Y3vAcX/6uLP6A6nvMO24edSGPjQc827Rw2atX+z2bKq0CmW9mOtYnr5/AfDa1ZfPaXnKtlWborup7QYx+Or2uWb+N3N//2+yDcXMqIJdf55xl7/vsj4WoPPlxLxtVrkJ4w/tTe3mLdATOOYwxcq52w5Wxz5MbPdVs5O8/lhfE7dPj0bIiPQ3QV0iqm4m3YX8hRfc6jQ3fWepevMqUDJd86Z4vwM40CWHnn+WphsGHfieF02D3tmZvpWD+kBpNCFcLnZhcmmrhpGzzbdA+sQ1ar18OJD87IOKOFoRNznaHPNHUfUNhvY1iU+uhvEvpKHaUn3qK3exVVyX4joipp3um7FmYJWmA+WbIDshRpbVRx5/nqstCgy87FGbfVB8yDGCqS+2qCsnRwnSAN6zgzxfdB2nBT/vZ4/6uxb6oH8b4VBRxiIB93wLa47hG3w2SL/2Z27yOXJFwZpSJaBYyvajA7vRRYNKqljXKpt/CFD/tSMr18DKKbwB0xggBePatl1nki0yvqW5zchlyZmJ0OTxJ3D+fsYJs/mxYN5+Le5oagtcl+YsVvy8kSjI2YGvGjvmpkRS9W2dtXqWnVuxUhURm1lKtou/hdEq19VBp9OjGvHEQSmrpuf2R24mXGheil8KeiANY8fW1VERUfBImb64j12caBZmRViZHbeVMjCrPDg9A90IXrtnsYCuZtRQ0PyrKDjBNOsPfKsg1pA02gHlVr0OXiFhtp6nJqXVzcbfM0KnzC3ggOENPE9VBdmHKN6LYaijb4wXxJn5A0FSDF5j+h1ooZx885Jt3ZKzO5n7Z5WfNEOtyyPqQEnn7WLv5Fis3PdgMshjF1FRydbNyeBbyKI1oN1TRVrVK7kgsb/zjX4NDPIRMctVeaxVB38Vh1x5KbeJbU138AM5KzmZu3uny0ErygxiJF7GVXUrPzFxrlx1uFdAaZFDN9cvIb74qD9tzBMo7L7WIEYK+sla1DVMHpF0F7b3+Y6S+zjvLeDMCpapmJo1weBWuxKF3rOocih1gun4BoJh1kWnV/Jmiq6uOhK3VfKxEHEkafjLgK3oujaPzY6SXg8phhL4TNR1xvJd1Wa0aYFfPUMLrNBDCh4AuGRTbtKMc6Z1Udj8evY/ZpCuMAUefdo69DZUngoqE1P9A3PJfOf7WixCEj+Y6t7fYeHbbxUAoFV3M89cCKfma3fc1+jKRe7MFWEbQqEfyzO2x/wrO2VYH7iYdQ9BkPyI8/3kXBpLaCpU7eC0Yv/am/tEDu7HZpqg0EvHo0nf/R/gRzUWy33/HXMJQeu1GylKmOkXzlCfGFruAcPPhaGqZOtu19zsJ1SO2Jz4Ztth5cBX6mRQwWmDwryG9FUMlZzNckMdK+IoMJv1rOWnBamS2w2KHiaPMPLC15hCZm4KTpoZyj4E2TqC/P6r7/EhnDMhKicZZ1ZwxuC7DPzDGs53q8gXaI9kFTK+2LTq7bhwsTbrMV8Rsfua5lMS0FwbTitUVnVa1yTb5IX51mmYnUcP9wPr8Ji1tiYJeJV9GZTrQhF7vvdU2OTU42ogJ9FDwhmycI2LIg++03C6scYhUyUuMV5tkw6kGUoL+mjNC38+wMdWNljn6tGPpRES7veqrSn5TRuv+dh6JVL/iDHU1db4c9WK3++OrH3PqziF916UMUKn8G67nN60GfWiHrXYhUG3yVWmyYak59NHj8t1smG4UDiWz2rPHNrKnN4Zo1LBbr2/eF9YZ0n0blx2nG4X+EKFxvS3W28JESD+FWk61VCD3z/URGHiJl++7TdBwkCj6tGOH3qDb0QqcOF9Kzpj0HUb/KyFW3Yhj2VMKJqGZleFBH7vqvf7WqLC3XMuHV8q8a4sTFuxUtkD/6JIBvKaVjv96ndgruKZ1k/BHzqf2K9fLk7HGXANyLDd1vxkK/i055pnzl+zw6zLnwXlVYVtfmacJgEpRP1hbGgrYPVN6v2lG+idQNGmwcKXu/8xEj/P6qe/sB2WmwNp6pp8jaISMkwdleFXYK55NHWLTTbutSUqjBfDGWo/Yg918qQ+8BRZSAHZbfuNZz2O0sov1Ue4CWlVg3rFhM3Kljj9ksGd/NUhk4nH+a5UN2+1i8+NM3vRNp7uQ6sqexSCukEVlVZriHNqFi5rLm9TMWa4qm3idJqppQACol2l4VSuvWLfta4JcXy3bROPNbXOgdOhG47LC0CwW/dMlSx4Jf17aEU3yA1x9p+Yc0jupXgcMuYNku64iYOkGToVDuJvlbEKlJqsmiHbvNrIVZEH+yFdF8DbleZ6iNiWwMqvtMp/mSpwx5KxRrT9p3MAPTHGtMbfvdFhyj9vhaKcn3At8Lc16Ai+vBcSp1ztXi7rCJZx/ql7TXcclq6Q76UeKWDy9boS0WHIjUuWhPG8LBmW5y2rhuTpM5vsLt+HOLh1Yf0DqXa9tsfC+kaKt2htA0ai/L2i7RKoNjEwztkmRU0GfgW1TxUvPFhg0V7DdfWJk5gfrccpYv+MA9M0dkGTLECeYwUixRzjRFdmjG7zdZIl3XKB9YliNKI31lfa7i2JG5C8Ss+rHe0D7Z696/V3DEAOWHnQ9yNahMUl5kENWS6pHKKp2D1BaSrrHdE1w2qNxIztpXgUIrF0bm15YML4b6V1k+GpNysTahKMVrrS85lTVo9OGJ96I47eAy5rYWpRf/mIzeoYU1DKaQCTUVwrhHeyNoDqHel+lLxr9WKzhSYw7vrR6+V5q0pfi2k3L1zqkubY6rrd9ZLvSuWNf0uqnkY+FpTvFzSW9Fp0b9l8JA7THV9eCi/PY/SCZIUYx3BU2alj7Cm3VV6eYpios4b6WuNOJdYXUK3zTqj5CVG2FqYM4Z7CuIU0qO05XR0d71FHM0YhZmJmTRfLlXEumN82BGtzdX0S19t1e+bUieK8zRmqpa4Qc5TSjifmaQsY2ETLjhI36gMR1+7qpjdXXHiceUekfBaucHShAOiFXmv3sNmGQyU5iVgnoocuonQXEPTFwslHtS8R+A47StI9wj0iSrtbi5rMysczFiImsQ+bdFClnFjjpXXwMy6O7qfjOr8Fb0a7ODItisjnn3EQO16+ypd1cwyaAW5Yzxz5QknfMO7643fXW/I9y3U2xH27Oapqr56Z/tEzglj6IbT6HEHjopiXqeRbe5mQQvxtcbDOVverN0ZgMdzqRYRjaXtMRd56Q4cZSmdPvZJdSrhJ1D9zNXPqAEqPIavPdfubt5oke2kmv0dztIszSv2VYuoyf1UuopbsYb+uX9h6WpwjpgtZ6fNNawNJ4q8O3CFoSbioAaOSZMx2GYaPYB+rEb6qjQiNRFQ76TvwNFVKD+BhH9VhcKGsXzmMI7BptU/CNWolM7YzROvpFAntsiWJp6eR2d3GarcYShVYSUqhmYOWj5E96NK2WvmYNTeY7Zs4RUEdv9h9QT4EseKt6LzLrqEOs3hxAY1MaNWpSa6zZx8F3YOVeCYMS88W+CYHDuWe4yoc6YK+djDuEOrBR5lvh0r+Q9uM88lrjx9x9AtgpQVNE8r+3O6Gvw59D+kBF/UMXyhliYUtPjmvXGY6Dk3x+kEOW+GtdMVC4EZTqoS/jmR0P0LS75DOc/w2vnri97M4SdbZ8qeU7gg8DVbERkU5geaMQO3mYrSYyAngeUQqrN0C0/vsFmcgWNXNeidsTAj7/4MncJR0caaBUpbLK1yBCBNRjEv6KvuVSdpPnEMJdsRRtqJ+U8tN1gXA4ePHc6ZT0eviI73UOJF0fEZ8YaneAQqQdGphNvwM4nIqPnXxV0xA0fnCT+oAhJuyw/q8jO0y8CjSteZExwBpIN6SvNp6A5G/abi6egeND/1GTguhuNjaUbbnSbGd4L8937Ezm34Eyi6n1maeOBxh3PI0jzJDf5mh/BsLD7F2GOKvlA/5gtvxI3/eV4sLfKW5Wy+oio+es/u6T8UU+nsofy57Icb/JlZHPFtCgd/x+bwt3ZT+xXTtTtTrGAb4QehC6X9G+8YT+ozcLxDsdCjsuOqwPFnrdLYaFc92Ui0m4fr39lYmlCaqTit7G6O/3kWDkgtXjNH4BiEm/+jegQnihOtfffn33WxsFjhfMd48HT+f6o6X65j7XR8WLSHMFkxbvOYsrRsF1bowDuSQ18Mkxk4qz2zoGPL5fu9h2Hqmt1asl3Q3Yu3szOc+spiCmX4AETBM3pLoTYSp3sVxahyhL8eC4mPN9k2x3o0xkiixIzM3CZFzf5oR4mecQ5+ax2wCah3/crmnHoqR0+KMaOPxRif1oEFRFOO/kTPPmtww+NfMXxEK6gn6iU32U6fFruIz8Q4WgljtnaCVTBgWx7diUdshC9ZEa5yKpRBBeW12r/iNc/+EgNqmhswNB8SBoihHXeDF7rrWDLcmt3V8GYYN7pXRy4DZjj4DJuUBL5iC3DQAaoo4vkftqVTYRGLS3mHZ7gdmdTTqbgNN/PTdTCOTgXolc88MhXAEUMdX0iy1JMuk5wLsgeu0QUYlz2S4skTWwJz6pOm/8ihrmgGfFgri+ZWUK2gAPHgbWa8jaocdSuM4FJYoKicYX/ZSENkg9Q1ZzJfwScfVnR2DegOGwCvmogaWJCLQepv9WNlU6QgsmOwICquU28Mlk3d9W5E81lU/5Ez0LcX6lwKMWDNluNKfBDUy/phJgBcMnfkh9iRxrdOzgs08JdPB85Lwo+GUSb4t3nC+0byqMZtO2fQJ4U2zGIr49t/28qmmGv2RanDD7a3FEcdtutkW8twwwlUSpb8QalodddbBfNHKDQ828BdE7OBgFdiKYohLawFYqpybQoxATZrheLhdI7+0Zlu9Q1myRcd15r9UIm8K2LGJxqTegntqNVMKnf1a8zQiyUR1rxoqjiFxeHxqFcYUTHfDu7rhbWng6qOxOsI+5A1p9mRyEPdVkTlE24vY54W7bWc6jMgZvNXdfC9/9q7408KDsbdL7Utz7QFSDetz2picArzrdpL8OaCHC9V26RroemtDZ5yNM/KGkWMyTmfnInEvwtSD23UcFcjhaE3VKzkoaEMKGBft4XbIO6forTY1lmGQwVmKicBCiArDzE+1oIxE08fWeviIOD5TznqH+OoHadvoOP20drMPe5Irg3XBQziW2XDuHYzjqQQ4wySssjXUs5H+t3FWYMHppUnBHMx/nYIT5d7OmjDbgD9F6na3m4l7KdkeSO3kTEPXafiWinogag7b52taiZhL1TSvBFmEZafFq2H8khQaZXuitCewT5FBgVtPK0j4xUHPfUz3Q28eac1Z139DAP23dgki94EC8vbDPTQC97HPPSWjUNG5tWKMsaxAEMKC0665Xvo1Ntd07wCLNf8Q56mrEPVpCxlIMVlQlWRxM3oAfpgIc+8KC3rEXUog5g06vt7zgXY8grH7hhwVSaeuvC06YYRAwpbyk/Unzj9hLEZNs2oxPQB9yc+GnL6zTgq7rI++KDJwX2SP8Sd6YzTuw5lV/kU6eQxRD12omfQAW6caTR4LikYkBB1CMOrvgRr/VY75+NSB40Cni6bADAtaK+vyxVWpf9NeKJxN2KYQ8Q2xPB3K1s7fuhvWbr2XpgW044VD6DRs0qXoqKf1NFsaGvKJc47leUV3pppP/5VTKFhaGuol4Esfjf5zyCyUHmHthChcYh4hYLQF+AFWsuq4t0wJyWgdwQVOZiV0efRHPoK5+E1vjz9wTJmVkITC9oEstAsyZSgE/dbicwKr89YUxKZI+owD205Tm5lnnmDRuP/JnzxX3gMtlrcX0UesZdxyQqYQuEW4R51vmQ5xOZteUd8SJruMlTUzhtVw/Nq7eUBcqN2/HVotgfngif60yKEtoUx3WYOZlVJuJOh8u59fzSDPFYtQgqDUAGyGhQOAvKroXMcOYY0qjnStJR/G3aP+Jt1sLVlGV8POwr/6OGsqetnyF3TmTqZjENfnXh51oxe9qVUw2M78EzAJ+IM8lZ1MBPQ9ZWSVc4J3mWSrLKrMHReA5qdGoz0ODRsaA+vwxXA2cAM4qlfzBJA6581m4hzxItQw5dxrrBL3Y6kCbUcFxo1S8jyV44q//+7ASNNudZ6xeaNOSIUffqMn4A9lIjFctYn2gpEPAb3f7p3iIBN8H14FUGQ9ct2hPsL+cEsTgUrR47uJVN4n4wt/wgfwwHuOnLd4yobkofy8JvxSQTA7rMpDIc608SlZFJfZYcmbT0tAHpPE8MrtQ42siTUNWxqvWZOmvu9f0JPoQmg+6l7sZWwyfi6PXkxJnwBraUG0MYG4zYHQz3igy/XsFkx5tNQxw43qvI9dU3f0DdhOUlHKjmi1VAr2Kiy0HZwD8VeEbhh0OiDdMYspolQsYdSwjCcjeowIXNZVUPmL2wwIkYhmXKhGozdCJ4lRKbsf4NBh/XnQoS92NJEWOVOFs2YhN8c5QZFeK0pRdAG40hqvLbmoSA8xQmzOOEc7wLcme9JOsjPCEgpCwUs9E2DohMHRhUeyGIN6TFvrbny8nDuilsDpzrH5mS76APoIEJmItS67sQJ+nfwddzmjPxcBEBBCw0kWDwd0EZCkNeOD7NNQhtBm7KHL9mRxj6U1yWU2puzlIDtpYxdH4ZPeXBJkTGAJfUr/oTCz/iypY6uXaR2V1doPxJYlrw2ghH0D5gbrhFcIxzYwi4a/4hqVdf2DdxBp6vGYDjavxMAAoy+1+3aiO6S3W/QAKNVXagDtvsNtx7Ks+HKgo6U21B+QSZgIogV5Bt+BnXisdVfy9VyXV+2P5fMuvdpAjM1o/K9Z+XnE4EOCrue+kcdYHqAQ0/Y/OmNlQ6OI33jH/uD1RalPaHpJAm2av0/xtpqdXVKNDrc9F2izo23Wu7firgbURFDNX9eGGeYBhiypyXZft2j3hTvzE6PMWKsod//rEILDkzBXfi7xh0eFkfb3/1zzPK/PI5Nk3FbZyTl4mq5BfBoVoqiPHO4Q4QKZAlrQ3MdNfi3oxIjvsM3kAFv3fdufurqYR3PSwX/mpGy/GFI/B2MNPiNdOppWVbs/gjF3YH+QA9jMhlAbhvasAHstB0IJew09iAkmXHl1/TEj+jvHOpOGrPRQXbPADM+Ig2/OEcUcpgPTItMtW4DdqgfYVI/+4hAFWYjUGpOP/UwNuB7+BbKOcALbjobdgzeBQfjgNSp2GOpxzGLj70Vvq5cw2AoYENwKLUtJUX8sGRox4dVa/TN4xKwaKcl9XawQR/uNus700Hf17pyNnezrUgaY9e4MADhEDBpsJT6y1gDJs1q6wlwGhuUzGR7C8kgpjPyHWwsvrf3yn1zJEIRa5eSxoLAZOCR9xbuztxFRJW9ZmMYfCFJ0evm9F2fVnuje92Rc4Pl6A8bluN8MZyyJGZ0+sNSb//DvAFxC2BqlEsFwccWeAl6CyBcQV1bx4mQMBP1Jxqk1EUADNLeieS2dUFbQ/c/kvwItbZ7tx0st16viqd53WsRmPTKv2AD8CUnhtPWg5aUegNpsYgasaw2+EVooeNKmrW3MFtj76bYHJm5K9gpAXZXsE5U8DM8XmVOSJ1F1WnLy6nQup+jx52bAb+rCq6y9WXl2B2oZDhfDkW7H3oYfT/4xx5VncBuxMXP2lNfhUVQjSSzSRbuZFE4vFawlzveXxaYKVs8LpvAb8IRYF3ZHiRnm0ADeNPWocwxSzNseG7NrSEVZoHdKWqaGEBz1N8Pt7kFbqh3LYmAbm9i1IChIpLpM5AS6mr6OAPHMwwznVy61YpBYX8xZDN/a+lt7n+x5j4bNOVteZ8lj3hpAHSx1VR8vZHec4AHO9XFCdjZ9eRkSV65ljMmZVzaej2qFn/qt1lvWzNZEfHxK3qOJrHL6crr0CRzMox5f2e8ALBB4UGFZKA3tN6F6IXd32GTJXGQ7DTi9j/dNcLF9jCbDcWGKxoKTYblIwbLDReL00LRcDPMcQuXLMh5YzgtfjkFK1DP1iDzzYYVZz5M/kWYRlRpig1htVRjVCknm+h1M5LiEDXOyHREhvzCGpFZjHS0RsK27o2avgdilrJkalWqPW3D9gmwV37HKmfM3F8YZj2ar+vHFvf3B8CRoH4kDHIK9mrAg+owiEwNjjd9V+FsQKYR8czJrUkf7Qoi2YaW6EVDZp5zYlqiYtuXOTHk4fAcZ7qBbdLDiJq0WNV1l2+Hntk1mMWvxrYmc8kIx8G3rW36J6Ra4lLrTOCgiOihmow+YnzUT19jbV2B3RWqSHyxkhmgsBqMYWvOcUom1jDQ436+fcbu3xf2bbeqU/ca+C4DOKE+e3qvmeMqW3AxejfzBRFVcwVYPq4L0APSWWoJu+5UYX4qg5U6YTioqQGPG9XrnuZ/BkxuYpe6Li87+18EskyQW/uA+uk2rpHpr6hut2TlVbKgWkFpx+AZffweiw2+VittkEyf/ifinS/0ItRL2Jq3tQOcxPaWO2xrG68GdFoUpZgFXaP2wYVtRc6xYCfI1CaBqyWpg4bx8OHBQwsV4XWMibZZ0LYjWEy2IxQ1mZrf1/UNbYCJplWu3nZ4WpodIGVA05d+RWSS+ET9tH3RfGGmNI1cIY7evZZq7o+a0bjjygpmR3mVfalkT/SZGT27Q8QGalwGlDOS9VHCyFAIL0a1Q7JiW3saz9gqY8lqKynFrPCzxkU4SIfLc9VfCI5edgRhDXs0edO992nhTKHriREP1NJC6SROMgQ0xO5kNNZOhMOIT99AUElbxqeZF8A3xrfDJsWtDnUenAHdYWSwAbYjFqQZ+D5gi3hNK8CSxU9i6f6ClL9IGlj1OPMQAsr84YG6ijsJpCaGWj75c3yOZKBB9mNpQNPUKkK0D6wgLH8MGoyRxTX6Y05Q4AnYNXMZwXM4eij/9WpsM/9CoRnFQXGR6MEaY+FXvXEO3RO0JaStk6OXuHVATHJE+1W+TU3bSZ2ksMtqjO0zfSJCdBv7y2d8DMx6TfVme3q0ZpTKMMu4YL/t7ciTNtdDkwPogh3Cnjx7qk08SHwf+dksZ7M2vCOlfsF0hQ6J4ehPCaHTNrM/zBSOqD83dBEBCW/F/LEmeh0nOHd7oVl3/Qo/9GUDkkbj7yz+9cvvu+dDAtx8NzCDTP4iKdZvk9MWiizvtILLepysflSvTLFBZ37RLwiriqyRxYv/zrgFd/9XVHh/OmzBvDX4mitMR/lUavs2Vx6cR94lzAkplm3IRNy4TFfu47tuYs9EQPIPVta4P64tV+sZ7n3ued3cgEx2YK+QL5+xms6osk8qQbTyuKVGdaX9FQqk6qfDnT5ykxk0VK7KZ62b6DNDUfQlqGHxSMKv1P0XN5BqMeKG1P4Wp5QfZDUCEldppoX0U6ss2jIko2XpURKCIhfaOqLPfShdtS37ZrT+jFRSH2xYVV1rmT/MBtRQhxiO4MQ3iAGlaZi+9PWBEIXOVnu9jN1f921lWLZky9bqbM3J2MAAI9jmuAx3gyoEUa6P2ivs0EeNv/OR+AX6q5SW6l5HaoFuS6jr6yg9limu+P0KYKzfMXWcQSfTXzpOzKEKpwI3YGXZpSSy2LTlMgfmFA3CF6R5c9xWEtRuCg2ZPUQ2Nb6dRFTNd4TfGHrnEWSKHPuRyiJSDAZ+KX0VxmSHjGPbQTLVpqixia2uyhQ394gBMt7C3ZAmxn/DJS+l1fBsAo2Eir/C0jG9csd4+/tp12pPc/BVJGaK9mfvr7M/CeztrmCO5qY06Edi4xAGtiEhnWAbzLy2VEyazE1J5nPmgU4RpW4Sa0TnOT6w5lgt3/tMpROigHHmexBGAMY0mdcDbDxWIz41NgdD6oxgHsJRgr5RnT6wZAkTOcStU4NMOQNemSO7gxGahdEsC+NRVGxMUhQmmM0llWRbbmFGHzEqLM4Iw0H7577Kyo+Zf+2cUFIOw93gEY171vQaM0HLwpjpdRR6Jz7V0ckE7XzYJ0TmY9znLdzkva0vNrAGGT5SUZ5uaHDkcGvI0ySpwkasEgZPMseYcu85w8HPdSNi+4T6A83iAwDbxgeFcB1ZM2iGXzFcEOUlYVrEckaOyodfvaYSQ7GuB4ISE0nYJc15X/1ciDTPbPCgYJK55VkEor4LvzL9S2WDy4xj+6FOqVyTAC2ZNowheeeSI5hA/02l8UYkv4nk9iaVn+kCVEUstgk5Hyq+gJm6R9vG3rhuM904he/hFmNQaUIATB1y3vw+OmxP4X5Yi6A5I5jJufHCjF9+AGNwnEllZjUco6XhsO5T5+R3yxz5yLVOnAn0zuS+6zdj0nTJbEZCbXJdtpfYZfCeCOqJHoE2vPPFS6eRLjIJlG69X93nfR0mxSFXzp1Zc0lt/VafDaImhUMtbnqWVb9M4nGNQLN68BHP7AR8Il9dkcxzmBv8PCZlw9guY0lurbBsmNYlwJZsA/B15/HfkbjbwPddaVecls/elmDHNW2r4crAx43feNkfRwsaNq/yyJ0d/p5hZ6AZajz7DBfUok0ZU62gCzz7x8eVfJTKA8IWn45vINLSM1q+HF9CV9qF3zP6Ml21kPPL3CXzkuYUlnSqT+Ij4tI/od5KwIs+tDajDs64owN7tOAd6eucGz+KfO26iNcBFpbWA5732bBNWO4kHNpr9D955L61bvHCF/mwSrz6eQaDjfDEANqGMkFc+NGxpKZzCD2sj/JrHd+zlPQ8Iz7Q+2JVIiVCuCKoK/hlAEHzvk/Piq3mRL1rT/fEh9hoT5GJmeYswg1otiKydizJ/fS2SeKHVu6Z3JEHjiW8NaTQgP5xdBli8nC57XiN9hrquBu99hn9zqwo92+PM2JXtpeVZS0PdqR5mDyDreMMtEws+CpwaRyyzoYtfcvt9PJIW0fJVNNi/FFyRsea7peLvJrL+5b4GOXJ8tAr+ATk9f8KmiIsRhqRy0vFzwRV3Z5dZ3QqIU8JQ/uQpkJbjMUMFj2F9sCFeaBjI4+fL/oN3+LQgjI4zuAfQ+3IPIPFQBccf0clJpsfpnBxD84atwtupkGqKvrH7cGNl/QcWcSi6wcVDML6ljOgYbo+2BOAWNNjlUBPiyitUAwbnhFvLbnqw42kR3Yp2kv2dMeDdcGOX5kT4S6M44KHEB/SpCfl7xgsUvs+JNY9G3O2X/6FEt9FyAn57lrbiu+tl83sCymSvq9eZbe9mchL7MTf/Ta78e80zSf0hYY5eUU7+ff14jv7Xy8qjzfzzzvaJnrIdvFb5BLWKcWGy5/w7+vV2cvIfwHqdTB+RuJK5oj9mbt0Hy94AmjMjjwYNZlNS6uiyxNnwNyt3gdreLb64p/3+08nXkb92LTkkRgFOwk1oGEVllcOj5lv1hfAZywDows0944U8vUFw+A/nuVq/UCygsrmWIBnHyU01d0XJPwriEOvx/ISK6Pk4y2w0gmojZs7lU8TtakBAdne4v/aNxmMpK4VcGMp7si0yqsiolXRuOi1Z1P7SqD3Zmp0CWcyK4Ubmp2SXiXuI5nGLCieFHKHNRIlcY3Pys2dwMTYCaqlyWSITwr2oGXvyU3h1Pf8eQ3w1bnD7ilocVjYDkcXR3Oo1BXgMLTUjNw2xMVwjtp99NhSVc5aIWrDQT5DHPKtCtheBP4zHcw4dz2eRdTMamhlHhtfgqJJHI7NGDUw1XL8vsSeSHyKqDtqoAmrQqsYwvwi7HW3ojWyhIa5oz5xJTaq14NAzFLjVLR12rRNUQ6xohDnrWFb5bG9yf8aCD8d5phoackcNJp+Dw3Due3RM+5Rid7EuIgsnwgpX0rUWh/nqPtByMhMZZ69NpgvRTKZ62ViZ+Q7Dp5r4K0d7EfJuiy06KuIYauRh5Ecrhdt2QpTS1k1AscEHvapNbU3HL1F2TFyR33Wxb5MvH5iZsrn3SDcsxlnnshO8PLwmdGN+paWnQuORtZGX37uhFT64SeuPsx8UOokY6ON85WdQ1dki5zErsJGazcBOddWJEKqNPiJpsMD1GrVLrVY+AOdPWQneTyyP1hRX/lMM4ZogGGOhYuAdr7F/DOiAoc++cn5vlf0zkMUJ40Z1rlgv9BelPqVOpxKeOpzKdF8maK+1Vv23MO9k/8+qpLoxrIGH2EDQlnGmH8CD31G8QqlyQIcpmR5bwmSVw9/Ns6IHgulCRehvZ/+VrM60Cu/r3AontFfrljew74skYe2uyn7JKQtFQBQRJ9ryGic/zQOsbS4scUBctA8cPToQ3x6ZBQu6DPu5m1bnCtP8TllLYA0UTQNVqza5nfew3Mopy1GPUwG5jsl0OVXniPmAcmLqO5HG8Hv3nSLecE9oOjPDXcsTxoCBxYyzBdj4wmnyEV4kvFDunipS8SSkvdaMnTBN9brHUR8xdmmEAp/Pdqk9uextp1t+JrtXwpN/MG2w/qhRMpSNxQ1uhg/kKO30eQ/FyHUDkWHT8V6gGRU4DhDMxZu7xXij9Ui6jlpWmQCqJg3FkOTq3WKneCRYZxBXMNAVLQgHXSCGSqNdjebY94oyIpVjMYehAiFx/tqzBXFHZaL5PeeD74rW5OysFoUXY8sebUZleFTUa/+zBKVTFDopTReXNuZq47QjkWnxjirCommO4L/GrFtVV21EpMyw8wyThL5Y59d88xtlx1g1ttSICDwnof6lt/6zliPzgVUL8jWBjC0o2D6Kg+jNuThkAlaDJsq/AG2aKA//A76avw2KNqtv223P+Wq3StRDDNKFFgtsFukYt1GFDWooFVXitaNhb3RCyJi4cMeNjROiPEDb4k+G3+hD8tsg+5hhmSc/8t2JTSwYoCzAI75doq8QTHe+E/Tw0RQSUDlU+6uBeNN3h6jJGX/mH8oj0i3caCNsjvTnoh73BtyZpsflHLq6AfwJNCDX4S98h4+pCOhGKDhV3rtkKHMa3EG4J9y8zFWI4UsfNzC/Rl5midNn7gwoN9j23HGCQQ+OAZpTTPMdiVow740gIyuEtd0qVxMyNXhHcnuXRKdw5wDUSL358ktjMXmAkvIB73BLa1vfF9BAUZInPYJiwxqFWQQBVk7gQH4ojfUQ/KEjn+A/WR6EEe4CtbpoLe1mzHkajgTIoE0SLDHVauKhrq12zrAXBGbPPWKCt4DGedq3JyGRbmPFW32bE7T20+73BatV/qQhhBWfWBFHfhYWXjALts38FemnoT+9bn1jDBMcUMmYgSc0e7GQjv2MUBwLU8ionCpgV+Qrhg7iUIfUY6JFxR0Y+ZTCPM+rVuq0GNLyJXX6nrUTt8HzFBRY1E/FIm2EeVA9NcXrj7S6YYIChVQCWr/m2fYUjC4j0XLkzZ8GCSLfmkW3PB/xq+nlXsKVBOj7vTvqKCOMq7Ztqr3cQ+N8gBnPaAps+oGwWOkbuxnRYj/x/WjiDclVrs22xMK4qArE1Ztk1456kiJriw6abkNeRHogaPRBgbgF9Z8i/tbzWELN4CvbqtrqV9TtGSnmPS2F9kqOIBaazHYaJ9bi3AoDBvlZasMluxt0BDXfhp02Jn411aVt6S4TUB8ZgFDkI6TP6gwPY85w+oUQSsjIeXVminrwIdK2ZAawb8Se6XOJbOaliQxHSrnAeONDLuCnFejIbp4YDtBcQCwMsYiRZfHefuEJqJcwKTTJ8sx5hjHmJI1sPFHOr6W9AhZ2NAod38mnLQk1gOz2LCAohoQbgMbUK9RMEA3LkiF7Sr9tLZp6lkciIGhE2V546w3Mam53VtVkGbB9w0Yk2XiRnCmbpxmHr2k4eSC0RuNbjNsUfDIfc8DZvRvgUDe1IlKdZTzcT4ZGEb53dp8VtsoZlyXzLHOdAbsp1LPTVaHvLA0GYDFMbAW/WUBfUAdHwqLFAV+3uHvYWrCfhUOR2i89qvCBoOb48usAGdcF2M4aKn79k/43WzBZ+xR1L0uZfia70XP9soQReeuhZiUnXFDG1T8/OXNmssTSnYO+3kVLAgeiY719uDwL9FQycgLPessNihMZbAKG7qwPZyG11G1+ZA3jAX2yddpYfmaKBlmfcK/V0mwIRUDC0nJSOPUl2KB8h13F4dlVZiRhdGY5farwN+f9hEb1cRi41ZcGDn6Xe9MMSTOY81ULJyXIHSWFIQHstVYLiJEiUjktlHiGjntN5/btB8Fu+vp28zl2fZXN+dJDyN6EXhS+0yzqpl/LSJNEUVxmu7BsNdjAY0jVsAhkNuuY0E1G48ej25mSt+00yPbQ4SRCVkIwb6ISvYtmJRPz9Zt5dk76blf+lJwAPH5KDF+vHAmACLoCdG2Adii6dOHnNJnTmZtoOGO8Q1jy1veMw6gbLFToQmfJa7nT7Al89mRbRkZZQxJTKgK5Kc9INzmTJFp0tpAPzNmyL/F08bX3nhCumM/cR/2RPn9emZ3VljokttZD1zVWXlUIqEU7SLk5I0lFRU0AcENXBYazNaVzsVHA/sD3o9hm42wbHIRb/BBQTKzAi8s3+bMtpOOZgLdQzCYPfX3UUxKd1WYVkGH7lh/RBBgMZZwXzU9+GYxdBqlGs0LP+DZ5g2BWNh6FAcR944B+K/JTWI3t9YyVyRhlP4CCoUk/mmF7+r2pilVBjxXBHFaBfBtr9hbVn2zDuI0kEOG3kBx8CGdPOjX1ph1POOZJUO1JEGG0jzUy2tK4X0CgVNYhmkqqQysRNtKuPdCJqK3WW57kaV17vXgiyPrl4KEEWgiGF1euI4QkSFHFf0TDroQiLNKJiLbdhH0YBhriRNCHPxSqJmNNoketaioohqMglh6wLtEGWSM1EZbQg72h0UJAIPVFCAJOThpQGGdKfFovcwEeiBuZHN2Ob4uVM7+gwZLz1D9E7ta4RmMZ24OBBAg7Eh6dLXGofZ4U2TFOCQMKjwhVckjrydRS+YaqCw1kYt6UexuzbNEDyYLTZnrY1PzsHZJT4U+awO2xlqTSYu6n/U29O2wPXgGOEKDMSq+zTUtyc8+6iLp0ivav4FKx+xxVy4FxhIF/pucVDqpsVe2jFOfdZhTzLz2QjtzvsTCvDPU7bzDH2eXVKUV9TZ+qFtaSSxnYgYdXKwVreIgvWhT9eGDB2OvnWyPLfIIIfNnfIxU8nW7MbcH05nhlsYtaW9EZRsxWcKdEqInq1DiZPKCz7iGmAU9/ccnnQud2pNgIGFYOTAWjhIrd63aPDgfj8/sdlD4l+UTlcxTI9jbaMqqN0gQxSHs60IAcW3cH4p3V1aSciTKB29L1tz2eUQhRiTgTvmqc+sGtBNh4ky0mQJGsdycBREP+fAaSs1EREDVo5gvgi5+aCN7NECw30owbCc1mSpjiahyNVwJd1jiGgzSwfTpzf2c5XJvG/g1n0fH88KHNnf+u7ZiRMlXueSIsloJBUtW9ezvsx9grfsX/FNxnbxU1Lvg0hLxixypHKGFAaPu0xCD8oDTeFSyfRT6s8109GMUZL8m2xXp8X2dpPCWWdX84iga4BrTlOfqox4shqEgh/Ht4qRst52cA1xOIUuOxgfUivp6v5f8IVyaryEdpVk72ERAwdT4aoY1usBgmP+0m06Q216H/nubtNYxHaOIYjcach3A8Ez/zc0KcShhel0HCYjFsA0FjYqyJ5ZUH1aZw3+zWC0hLpM6GDfcAdn9fq2orPmZbW6XXrf+Krc9RtvII5jeD3dFoT1KwZJwxfUMvc5KLfn8rROW23Jw89sJ2a5dpB3qWDUBWF2iX8OCuKprHosJ2mflBR+Wqs86VvgI/XMnsqb97+VlKdPVysczPj8Jhzf+WCvGBHijAqYlavbF60soMWlHbvKT+ScvhprgeTln51xX0sF+Eadc/l2s2a5BgkVbHYyz0E85p0LstqH+gEGiR84nBRRFIn8hLSZrGwqjZ3E29cuGi+5Z5bp7EM8MWFa9ssS/vy4VrDfECSv7DSU84DaP0sXI3Ap4lWznQ65nQoTKRWU30gd7Nn8ZowUvGIx4aqyXGwmA/PB4qN8msJUODezUHEl0VP9uo+cZ8vPFodSIB4C7lQYjEFj8yu49C2KIV3qxMFYTevG8KqAr0TPlkbzHHnTpDpvpzziAiNFh8xiT7C/TiyH0EguUw4vxAgpnE27WIypV+uFN2zW7xniF/n75trs9IJ5amB1zXXZ1LFkJ6GbS/dFokzl4cc2mamVwhL4XU0Av5gDWAl+aEWhAP7t2VIwU+EpvfOPDcLASX7H7lZpXA2XQfbSlD4qU18NffNPoAKMNSccBfO9YVVgmlW4RydBqfHAV7+hrZ84WJGho6bNT0YMhxxLdOx/dwGj0oyak9aAkNJ8lRJzUuA8sR+fPyiyTgUHio5+Pp+YaKlHrhR41jY5NESPS3x+zTMe0S2HnLOKCOQPpdxKyviBvdHrCDRqO+l96HhhNBLXWv4yEMuEUYo8kXnYJM8oIgVM4XJ+xXOev4YbWeqsvgq0lmw4/PiYr9sYLt+W5EAuYSFnJEan8CwJwbtASBfLBBpJZiRPor/aCJBZsM+MhvS7ZepyHvU8m5WSmaZnxuLts8ojl6KkS8oSAHkq5GWlCB/NgJ5W3rO2Cj1MK7ahxsCrbTT3a0V/QQH+sErxV4XUWDHx0kkFy25bPmBMBQ6BU3HoHhhYcJB9JhP6NXUWKxnE0raXHB6U9KHpWdQCQI72qevp5fMzcm+AvC85rsynVQhruDA9fp9COe7N56cg1UKGSas89vrN+WlGLYTwi5W+0xYdKEGtGCeNJwXKDU0XqU5uQYnWsMwTENLGtbQMvoGjIFIEMzCRal4rnBAg7D/CSn8MsCvS+FDJJAzoiioJEhZJgAp9n2+1Yznr7H+6eT4YkJ9Mpj60ImcW4i4iHDLn9RydB8dx3QYm3rsX6n4VRrZDsYK6DCGwkwd5n3/INFEpk16fYpP6JtMQpqEMzcOfQGAHXBTEGzuLJ03GYQL9bmV2/7ExDlRf+Uvf1sM2frRtCWmal12pMgtonvSCtR4n1CLUZRdTHDHP1Otwqd+rcdlavnKjUB/OYXQHUJzpNyFoKpQK+2OgrEKpGyIgIBgn2y9QHnTJihZOpEvOKIoHAMGAXHmj21Lym39Mbiow4IF+77xNuewziNVBxr6KD5e+9HzZSBIlUa/AmsDFJFXeyrQakR3FwowTGcADJHcEfhGkXYNGSYo4dh4bxwLM+28xjiqkdn0/3R4UEkvcBrBfn/SzBc1XhKM2VPlJgKSorjDac96V2UnQYXl1/yZPT4DVelgO+soMjexXwYO58VLl5xInQUZI8jc3H2CPnCNb9X05nOxIy4MlecasTqGK6s2az4RjpF2cQP2G28R+7wDPsZDZC/kWtjdoHC7SpdPmqQrUAhMwKVuxCmYTiD9q/O7GHtZvPSN0CAUQN/rymXZNniYLlJDE70bsk6Xxsh4kDOdxe7A2wo7P9F5YvqqRDI6brf79yPCSp4I0jVoO4YnLYtX5nzspR5WB4AKOYtR1ujXbOQpPyYDvfRE3FN5zw0i7reehdi7yV0YDRKRllGCGRk5Yz+Uv1fYl2ZwrnGsqsjgAVo0xEUba8ohjaNMJNwTwZA/wBDWFSCpg1eUH8MYL2zdioxRTqgGQrDZxQyNzyBJPXZF0+oxITJAbj7oNC5JwgDMUJaM5GqlGCWc//KCIrI+aclEe4IA0uzv7cuj6GCdaJONpi13O544vbtIHBF+A+JeDFUQNy61Gki3rtyQ4aUywn6ru314/dkGiP8Iwjo0J/2Txs49ZkwEl4mx+iYUUO55I6pJzU4P+7RRs+DXZkyKUYZqVWrPF4I94m4Wx1tXeE74o9GuX977yvJ/jkdak8+AmoHVjI15V+WwBdARFV2IPirJgVMdsg1Pez2VNHqa7EHWdTkl3XTcyjG9BiueWFvQfXI8aWSkuuRmqi/HUuzqyvLJfNfs0txMqldYYflWB1BS31WkuPJGGwXUCpjiQSktkuBMWwHjSkQxeehqw1Kgz0Trzm7QbtgxiEPDVmWCNCAeCfROTphd1ZNOhzLy6XfJyG6Xgd5MCAZw4xie0Sj5AnY1/akDgNS9YFl3Y06vd6FAsg2gVQJtzG7LVq1OH2frbXNHWH/NY89NNZ4QUSJqL2yEcGADbT38X0bGdukqYlSoliKOcsSTuqhcaemUeYLLoI8+MZor2RxXTRThF1LrHfqf/5LcLAjdl4EERgUysYS2geE+yFdasU91UgUDsc2cSQ1ZoT9+uLOwdgAmifwQqF028INc2IQEDfTmUw3eZxvz7Ud1z3xc1PQfeCvfKsB9jOhRj7rFyb9XcDWLcYj0bByosychMezMLVkFiYcdBBQtvI6K0KRuOZQH2kBsYHJaXTkup8F0eIhO1/GcIwWKpr2mouB7g5TUDJNvORXPXa/mU8bh27TAZYBe2sKx4NSv5OjnHIWD2RuysCzBlUfeNXhDd2jxnHoUlheJ3jBApzURy0fwm2FwwsSU0caQGl0Kv8hopRQE211NnvtLRsmCNrhhpEDoNiZEzD2QdJWKbRRWnaFedXHAELSN0t0bfsCsMf0ktfBoXBoNA+nZN9+pSlmuzspFevmsqqcMllzzvkyXrzoA+Ryo1ePXpdGOoJvhyru+EBRsmOp7MXZ0vNUMUqHLUoKglg1p73sWeZmPc+KAw0pE2zIsFFE5H4192KwDvDxdxEYoDBDNZjbg2bmADTeUKK57IPD4fTYF4c6EnXx/teYMORBDtIhPJneiZny7Nv/zG+YmekIKCoxr6kauE2bZtBLufetNG0BtBY7f+/ImUypMBvdWu/Q7vTMRzw5aQGZWuc1V0HEsItFYMIBnoKGZ0xcarba/TYZq50kCaflFysYjA4EDKHqGdpYWdKYmm+a7TADmW35yfnOYpZYrkpVEtiqF0EujI00aeplNs2k+qyFZNeE3CDPL9P6b4PQ/kataHkVpLSEVGK7EX6rAa7IVNrvZtFvOA6okKvBgMtFDAGZOx88MeBcJ8AR3AgUUeIznAN6tjCUipGDZONm1FjWJp4A3QIzSaIOmZ7DvF/ysYYbM/fFDOV0jntAjRdapxJxL0eThpEhKOjCDDq2ks+3GrwxqIFKLe1WdOzII8XIOPGnwy6LKXVfpSDOTEfaRsGujhpS4hBIsMOqHbl16PJxc4EkaVu9wpEYlF/84NSv5Zum4drMfp9yXbzzAOJqqS4YkI4cBrFrC7bMPiCfgI3nNZAqkk3QOZqR+yyqx+nDQKBBBZ7QKrfGMCL+XpqFaBJU0wpkBdAhbR4hJsmT5aynlvkouoxm/NjD5oe6BzVIO9uktM+/5dEC5P7vZvarmuO/lKXz4sBabVPIATuKTrwbJP8XUkdM6uEctHKXICUJGjaZIWRbZp8czquQYfY6ynBUCfIU+gG6wqSIBmYIm9pZpXdaL121V7q0VjDjmQnXvMe7ysoEZnZL15B0SpxS1jjd83uNIOKZwu5MPzg2NhOx3xMOPYwEn2CUzbSrwAs5OAtrz3GAaUkJOU74XwjaYUmGJdZBS1NJVkGYrToINLKDjxcuIlyfVsKQSG/G4DyiO2SlQvJ0d0Ot1uOG5IFSAkq+PRVMgVMDvOIJMdqjeCFKUGRWBW9wigYvcbU7CQL/7meF2KZAaWl+4y9uhowAX7elogAvItAAxo2+SFxGRsHGEW9BnhlTuWigYxRcnVUBRQHV41LV+Fr5CJYV7sHfeywswx4XMtUx6EkBhR+q8AXXUA8uPJ73Pb49i9KG9fOljvXeyFj9ixgbo6CcbAJ7WHWqKHy/h+YjBwp6VcN7M89FGzQ04qbrQtgrOFybg3gQRTYG5xn73ArkfQWjCJROwy3J38Dx/D7jOa6BBNsitEw1wGq780EEioOeD+ZGp2J66ADiVGMayiHYucMk8nTK2zzT9CnEraAk95kQjy4k0GRElLL5YAKLQErJ5rp1eay9O4Fb6yJGm9U4FaMwPGxtKD6odIIHKoWnhKo1U8KIpFC+MVn59ZXmc7ZTBZfsg6FQ8W10YfTr4u0nYrpHZbZ1jXiLmooF0cOm0+mPnJBXQtepc7n0BqOipNCqI6yyloTeRShNKH04FIo0gcMk0H/xThyN4pPAWjDDkEp3lNNPRNVfpMI44CWRlRgViP64eK0JSRp0WUvCWYumlW/c58Vcz/yMwVcW5oYb9+26TEhwvbxiNg48hl1VI1UXTU//Eta+BMKnGUivctfL5wINDD0giQL1ipt6U7C9cd4+lgqY2lMUZ02Uv6Prs+ZEZer7ZfWBXVghlfOOrClwsoOFKzWEfz6RZu1eCs+K8fLvkts5+BX0gyrFYve0C3qHrn5U/Oh6D/CihmWIrY7HUZRhJaxde+tldu6adYJ+LeXupQw0XExC36RETdNFxcq9glMu4cNQSX9cqR/GQYp+IxUkIcNGWVU7ZtGa6P3XAyodRt0XeS3Tp01AnCh0ZbUh4VrSZeV9RWfSoWyxnY3hzcZ30G/InDq4wxRrEejreBxnhIQbkxenxkaxl+k7eLUQkUR6vKJ2iDFNGX3WmVA1yaOH+mvhBd+sE6vacQzFobwY5BqEAFmejwW5ne7HtVNolOUgJc8CsUxmc/LBi8N5mu9VsIA5HyErnS6zeCz7VLI9+n/hbT6hTokMXTVyXJRKSG2hd2labXTbtmK4fNH3IZBPreSA4FMeVouVN3zG5x9CiGpLw/3pceo4qGqp+rVp+z+7yQ98oEf+nyH4F3+J9IheDBa94Wi63zJbLBCIZm7P0asHGpIJt3PzE3m0S4YIWyXBCVXGikj8MudDPB/6Nm2v4IxJ5gU0ii0guy5SUHqGUYzTP0jIJU5E82RHUXtX4lDdrihBLdP1YaG1AGUC12rQKuIaGvCpMjZC9bWSCYnjDlvpWbkdXMTNeBHLKiuoozMGIvkczmP0aRJSJ8PYnLCVNhKHXBNckH79e8Z8Kc2wUej4sQZoH8qDRGkg86maW/ZQWGNnLcXmq3FlXM6ssR/3P6E/bHMvm6HLrv1yRixit25JsH3/IOr2UV4BWJhxXW5BJ6Xdr07n9kF3ZNAk6/Xpc5MSFmYJ2R7bdL8Kk7q1OU9Elg/tCxJ8giT27wSTySF0GOxg4PbYJdi/Nyia9Nn89CGDulfJemm1aiEr/eleGSN+5MRrVJ4K6lgyTTIW3i9cQ0dAi6FHt0YMbH3wDSAtGLSAccezzxHitt1QdhW36CQgPcA8vIIBh3/JNjf/Obmc2yzpk8edSlS4lVdwgW5vzbYEyFoF4GCBBby1keVNueHAH+evi+H7oOVfS3XuPQSNTXOONAbzJeSb5stwdQHl1ZjrGoE49I8+A9j3t+ahhQj74FCSWpZrj7wRSFJJnnwi1T9HL5qrCFW/JZq6P62XkMWTb+u4lGpKfmmwiJWx178GOG7KbrZGqyWwmuyKWPkNswkZ1q8uptUlviIi+AXh2bOOTOLsrtNkfqbQJeh24reebkINLkjut5r4d9GR/r8CBa9SU0UQhsnZp5cP+RqWCixRm7i4YRFbtZ4EAkhtNa6jHb6gPYQv7MKqkPLRmX3dFsK8XsRLVZ6IEVrCbmNDc8o5mqsogjAQfoC9Bc7R6gfw03m+lQpv6kTfhxscDIX6s0w+fBxtkhjXAXr10UouWCx3C/p/FYwJRS/AXRKkjOb5CLmK4XRe0+xeDDwVkJPZau52bzLEDHCqV0f44pPgKOkYKgTZJ33fmk3Tu8SdxJ02SHM8Fem5SMsWqRyi2F1ynfRJszcFKykdWlNqgDA/L9lKYBmc7Zu/q9ii1FPF47VJkqhirUob53zoiJtVVRVwMR34gV9iqcBaHbRu9kkvqk3yMpfRFG49pKKjIiq7h/VpRwPGTHoY4cg05X5028iHsLvUW/uz+kjPyIEhhcKUwCkJAwbR9pIEGOn8z6svAO8i89sJ3dL5qDWFYbS+HGPRMxYwJItFQN86YESeJQhn2urGiLRffQeLptDl8dAgb+Tp47UQPxWOw17OeChLN1WnzlkPL1T5O+O3Menpn4C3IY5LEepHpnPeZHbvuWfeVtPlkH4LZjPbBrkJT3NoRJzBt86CO0Xq59oQ+8dsm0ymRcmQyn8w71mhmcuEI5byuF+C88VPYly2sEzjlzAQ3vdn/1+Hzguw6qFNNbqenhZGbdiG6RwZaTG7jTA2X9RdXjDN9yj1uQpyO4Lx8KRAcZcbZMafp4wPOd5MdXoFY52V1A8M9hi3sso93+uprE0qYNMjkE22CvK4HuUxqN7oIz5pWuETq1lQAjqlSlqdD2Rnr/ggp/TVkQYjn9lMfYelk2sH5HPdopYo7MHwlV1or9Bxf+QCyLzm92vzG2wjiIjC/ZHEJzeroJl6bdFPTpZho5MV2U86fLQqxNlGIMqCGy+9WYhJ8ob1r0+Whxde9L2PdysETv97O+xVw+VNN1TZSQN5I6l9m5Ip6pLIqLm4a1B1ffH6gHyqT9p82NOjntRWGIofO3bJz5GhkvSWbsXueTAMaJDou99kGLqDlhwBZNEQ4mKPuDvVwSK4WmLluHyhA97pZiVe8g+JxmnJF8IkV/tCs4Jq/HgOoAEGR9tCDsDbDmi3OviUQpG5D8XmKcSAUaFLRXb2lmJTNYdhtYyfjBYZQmN5qT5CNuaD3BVnlkCk7bsMW3AtXkNMMTuW4HjUERSJnVQ0vsBGa1wo3Qh7115XGeTF3NTz8w0440AgU7c3bSXO/KMINaIWXd0oLpoq/0/QJxCQSJ9XnYy1W7TYLBJpHsVWD1ahsA7FjNvRd6mxCiHsm8g6Z0pnzqIpF1dHUtP2ITU5Z1hZHbu+L3BEEStBbL9XYvGfEakv1bmf+bOZGnoiuHEdlBnaChxYKNzB23b8sw8YyT7Ajxfk49eJIAvdbVkdFCe2J0gMefhQ0bIZxhx3fzMIysQNiN8PgOUKxOMur10LduigREDRMZyP4oGWrP1GFY4t6groASsZ421os48wAdnrbovNhLt7ScNULkwZ5AIZJTrbaKYTLjA1oJ3sIuN/aYocm/9uoQHEIlacF1s/TM1fLcPTL38O9fOsjMEIwoPKfvt7opuI9G2Hf/PR4aCLDQ7wNmIdEuXJ/QNL72k5q4NejAldPfe3UVVqzkys8YZ/jYOGOp6c+YzRCrCuq0M11y7TiN6qk7YXRMn/gukxrEimbMQjr3jwRM6dKVZ4RUfWQr8noPXLJq6yh5R3EH1IVOHESst/LItbG2D2vRsZRkAObzvQAAD3mb3/G4NzopI0FAiHfbpq0X72adg6SRj+8OHMShtFxxLZlf/nLgRLbClwl5WmaYSs+yEjkq48tY7Z2bE0N91mJwt+ua0NlRJIDh0HikF4UvSVorFj2YVu9YeS5tfvlVjPSoNu/Zu6dEUfBOT555hahBdN3Sa5Xuj2Rvau1lQNIaC944y0RWj9UiNDskAK1WoL+EfXcC6IbBXFRyVfX/WKXxPAwUyIAGW8ggZ08hcijKTt1YKnUO6QPvcrmDVAb0FCLIXn5id4fD/Jx4tw/gbXs7WF9b2RgXtPhLBG9vF5FEkdHAKrQHZAJC/HWvk7nvzzDzIXZlfFTJoC3JpGgLPBY7SQTjGlUvG577yNutZ1hTfs9/1nkSXK9zzKLRZ3VODeKUovJe0WCq1zVMYxCJMenmNzPIU2S8TA4E7wWmbNkxq9rI2dd6v0VpcAPVMxnDsvWTWFayyqvKZO7Z08a62i/oH2/jxf8rpmfO64in3FLiL1GX8IGtVE9M23yGsIqJbxDTy+LtaMWDaPqkymb5VrQdzOvqldeU0SUi6IirG8UZ3jcpRbwHa1C0Dww9G/SFX3gPvTJQE+kyz+g1BeMILKKO+olcHzctOWgzxYHnOD7dpCRtuZEXACjgqesZMasoPgnuDC4nUviAAxDc5pngjoAITIkvhKwg5d608pdrZcA+qn5TMT6Uo/QzBaOxBCLTJX3Mgk85rMfsnWx86oLxf7p2PX5ONqieTa/qM3tPw4ZXvlAp83NSD8F7+ZgctK1TpoYwtiU2h02HCGioH5tkVCqNVTMH5p00sRy2JU1qyDBP2CII/Dg4WDsIl+zgeX7589srx6YORRQMBfKbodbB743Tl4WLKOEnwWUVBsm94SOlCracU72MSyj068wdpYjyz1FwC2bjQnxnB6Mp/pZ+yyZXtguEaYB+kqhjQ6UUmwSFazOb+rhYjLaoiM+aN9/8KKn0zaCTFpN9eKwWy7/u4EHzO46TdFSNjMfn2iPSJwDPCFHc0I1+vjdAZw5ZjqR/uzi9Zn20oAa5JnLEk/EA3VRWE7J/XrupfFJPtCUuqHPpnlL7ISJtRpSVcB8qsZCm2QEkWoROtCKKxUh3yEcMbWYJwk6DlEBG0bZP6eg06FL3v6RPb7odGuwm7FN8fG4woqtB8e7M5klPpo97GoObNwt+ludTAmxyC5hmcFx+dIvEZKI6igFKHqLH01iY1o7903VzG9QGetyVx5RNmBYUU+zIuSva/yIcECUi4pRmE3VkF2avqulQEUY4yZ/wmNboBzPmAPey3+dSYtBZUjeWWT0pPwCz4Vozxp9xeClIU60qvEFMQCaPvPaA70WlOP9f/ey39macvpGCVa+zfa8gO44wbxpJUlC8GN/pRMTQtzY8Z8/hiNrU+Zq64ZfFGIkdj7m7abcK1EBtws1X4J/hnqvasPvvDSDYWN+QcQVGMqXalkDtTad5rYY0TIR1Eqox3czwPMjKPvF5sFv17Thujr1IZ1Ytl4VX1J0vjXKmLY4lmXipRAro0qVGEcXxEVMMEl54jQMd4J7RjgomU0j1ptjyxY+cLiSyXPfiEcIS2lWDK3ISAy6UZ3Hb5vnPncA94411jcy75ay6B6DSTzK6UTCZR9uDANtPBrvIDgjsfarMiwoax2OlLxaSoYn4iRgkpEGqEkwox5tyI8aKkLlfZ12lO11TxsqRMY89j5JaO55XfPJPDL1LGSnC88Re9Ai+Nu5bZjtwRrvFITUFHPR4ZmxGslQMecgbZO7nHk32qHxYkdvWpup07ojcMCaVrpFAyFZJJbNvBpZfdf39Hdo2kPtT7v0/f8R/B5Nz4f1t9/3zNM/7n6SUHfcWk5dfQFJvcJMgPolGCpOFb/WC0FGWU2asuQyT+rm88ZKZ78Cei/CAh939CH0JYbpZIPtxc2ufXqjS3pHH9lnWK4iJ7OjR/EESpCo2R3MYKyE7rHfhTvWho4cL1QdN4jFTyR6syMwFm124TVDDRXMNveI1Dp/ntwdz8k8kxw7iFSx6+Yx6O+1LzMVrN0BBzziZi9kneZSzgollBnVwBh6oSOPHXrglrOj+QmR/AESrhDpKrWT+8/AiMDxS/5wwRNuGQPLlJ9ovomhJWn8sMLVItQ8N/7IXvtD8kdOoHaw+vBSbFImQsv/OCAIui99E+YSIOMlMvBXkAt+NAZK8wB9Jf8CPtB+TOUOR+z71d/AFXpPBT6+A5FLjxMjLIEoJzrQfquvxEIi+WoUzGR1IzQFNvbYOnxb2PyQ0kGdyXKzW2axQL8lNAXPk6NEjqrRD1oZtKLlFoofrXw0dCNWASHzy+7PSzOUJ3XtaPZsxLDjr+o41fKuKWNmjiZtfkOzItvlV2MDGSheGF0ma04qE3TUEfqJMrXFm7DpK+27DSvCUVf7rbNoljPhha5W7KBqVq0ShUSTbRmuqPtQreVWH4JET5yMhuqMoSd4r/N8sDmeQiQQvi1tcZv7Moc7dT5X5AtCD6kNEGZOzVcNYlpX4AbTsLgSYYliiPyVoniuYYySxsBy5cgb3pD+EK0Gpb0wJg031dPgaL8JZt6sIvzNPEHfVPOjXmaXj4bd4voXzpZ5GApMhILgMbCEWZ2zwgdeQgjNHLbPIt+KqxRwWPLTN6HwZ0Ouijj4UF+Sg0Au8XuIKW0WxlexdrFrDcZJ8Shauat3X0XmHygqgL1nAu2hrJFb4wZXkcS+i36KMyU1yFvYv23bQUJi/3yQpqr/naUOoiEWOxckyq/gq43dFou1DVDaYMZK9tho7+IXXokBCs5GRfOcBK7g3A+jXQ39K4YA8PBRW4m5+yR0ZAxWJncjRVbITvIAPHYRt1EJ3YLiUbqIvoKHtzHKtUy1ddRUQ0AUO41vonZDUOW+mrszw+SW/6Q/IUgNpcXFjkM7F4CSSQ2ExZg85otsMs7kqsQD4OxYeBNDcSpifjMoLb7GEbGWTwasVObmB/bfPcUlq0wYhXCYEDWRW02TP5bBrYsKTGWjnWDDJ1F7zWai0zW/2XsCuvBQjPFcTYaQX3tSXRSm8hsAoDdjArK/OFp6vcWYOE7lizP0Yc+8p16i7/NiXIiiQTp7c7Xus925VEtlKAjUdFhyaiLT7VxDagprMFwix4wZ05u0qj7cDWFd0W9OYHIu3JbJKMXRJ1aYNovugg+QqRN7fNHSi26VSgBpn+JfMuPo3aeqPWik/wI5Rz3BWarPQX4i5+dM0npwVOsX+KsOhC7vDg+OJsz4Q5zlnIeflUWL6QYMbf9WDfLmosLF4Qev3mJiOuHjoor/dMeBpA9iKDkMjYBNbRo414HCxjsHrB4EXNbHzNMDHCLuNBG6Sf+J4MZ/ElVsDSLxjIiGsTPhw8BPjxbfQtskj+dyNMKOOcUYIRBEIqbazz3lmjlRQhplxq673VklMMY6597vu+d89ec/zq7Mi4gQvh87ehYbpOuZEXj5g/Q7S7BFDAAB9DzG35SC853xtWVcnZQoH54jeOqYLR9NDuwxsVthTV7V99n/B7HSbAytbEyVTz/5NhJ8gGIjG0E5j3griULUd5Rg7tQR+90hJgNQKQH2btbSfPcaTOfIexc1db1BxUOhM1vWCpLaYuKr3FdNTt/T3PWCpEUWDKEtzYrjpzlL/wri3MITKsFvtF8QVV/NhVo97aKIBgdliNc10dWdXVDpVtsNn+2UIolrgqdWA4EY8so0YvB4a+aLzMXiMAuOHQrXY0tr+CL10JbvZzgjJJuB1cRkdT7DUqTvnswVUp5kkUSFVtIIFYK05+tQxT6992HHNWVhWxUsD1PkceIrlXuUVRogwmfdhyrf6zzaL8+c0L7GXMZOteAhAVQVwdJh+7nrX7x4LaIIfz2F2v7Dg/uDfz2Fa+4gFm2zHAor8UqimJG3VTJtZEoFXhnDYXvxMJFc6ku2bhbCxzij2z5UNuK0jmp1mnvkVNUfR+SEmj1Lr94Lym75PO7Fs0MIr3GdsWXRXSfgLTVY0FLqba97u1In8NAcY7IC6TjWLigwKEIm43NxTdaVTv9mcKkzuzBkKd8x/xt1p/9BbP7Wyb4bpo1K1gnOpbLvKz58pWl3B55RJ/Z5mRDLPtNQg14jdOEs9+h/V5UVpwrAI8kGbX8KPVPDIMfIqKDjJD9UyDOPhjZ3vFAyecwyq4akUE9mDOtJEK1hpDyi6Ae87sWAClXGTiwPwN7PXWwjxaR79ArHRIPeYKTunVW24sPr/3HPz2IwH8oKH4OlWEmt4BLM6W5g4kMcYbLwj2usodD1088stZA7VOsUSpEVl4w7NMb1EUHMRxAxLF0CIV+0L3iZb+ekB1vSDSFjAZ3hfLJf7gFaXrOKn+mhR+rWw/eTXIcAgl4HvFuBg1LOmOAwJH3eoVEjjwheKA4icbrQCmvAtpQ0mXG0agYp5mj4Rb6mdQ+RV4QBPbxMqh9C7o8nP0Wko2ocnCHeRGhN1XVyT2b9ACsL+6ylUy+yC3QEnaKRIJK91YtaoSrcWZMMwxuM0E9J68Z+YyjA0g8p1PfHAAIROy6Sa04VXOuT6A351FOWhKfTGsFJ3RTJGWYPoLk5FVK4OaYR9hkJvezwF9vQN1126r6isMGXWTqFW+3HL3I/jurlIdDWIVvYY+s6yq7lrFSPAGRdnU7PVwY/SvWbZGpXzy3BQ2LmAJlrONUsZs4oGkly0V267xbD5KMY8woNNsmWG1VVgLCra8aQBBcI4DP2BlNwxhiCtHlaz6OWFoCW0vMR3ErrG7JyMjTSCnvRcsEHgmPnwA6iNpJ2DrFb4gLlhKJyZGaWkA97H6FFdwEcLT6DRQQL++fOkVC4cYGW1TG/3iK5dShRSuiBulmihqgjR45Vi03o2RbQbP3sxt90VxQ6vzdlGfkXmmKmjOi080JSHkLntjvsBJnv7gKscOaTOkEaRQqAnCA4HWtB4XnMtOhpRmH2FH8tTXrIjAGNWEmudQLCkcVlGTQ965Kh0H6ixXbgImQP6b42B49sO5C8pc7iRlgyvSYvcnH9FgQ3azLbQG2cUW96SDojTQStxkOJyOuDGTHAnnWkz29aEwN9FT8EJ4yhXOg+jLTrCPKeEoJ9a7lDXOjEr8AgX4BmnMQ668oW0zYPyQiVMPxKRHtpfnEEyaKhdzNVThlxxDQNdrHeZiUFb6NoY2KwvSb7BnRcpJy+/g/zAYx3fYSN5QEaVD2Y1VsNWxB0BSO12MRsRY8JLfAezRMz5lURuLUnG1ToKk6Q30FughqWN6gBNcFxP/nY/iv+iaUQOa+2Nuym46wtI/DvSfzSp1jEi4SdYBE7YhTiVV5cX9gwboVDMVgZp5YBQlHOQvaDNfcCoCJuYhf5kz5kwiIKPjzgpcRJHPbOhJajeoeRL53cuMahhV8Z7IRr6M4hW0JzT7mzaMUzQpm866zwM7Cs07fJYXuWvjAMkbe5O6V4bu71sOG6JQ4oL8zIeXHheFVavzxmlIyBkgc9IZlEDplMPr8xlcyss4pVUdwK1e7CK2kTsSdq7g5SHRAl3pYUB9Ko4fsh4qleOyJv1z3KFSTSvwEcRO/Ew8ozEDYZSqpfoVW9uhJfYrNAXR0Z3VmeoAD+rVWtwP/13sE/3ICX3HhDG3CMc476dEEC0K3umSAD4j+ZQLVdFOsWL2C1TH5+4KiSWH+lMibo+B55hR3Gq40G1n25sGcN0mEcoU2wN9FCVyQLBhYOu9aHVLWjEKx2JIUZi5ySoHUAI9b8hGzaLMxCZDMLhv8MkcpTqEwz9KFDpCpqQhVmsGQN8m24wyB82FAKNmjgfKRsXRmsSESovAwXjBIoMKSG51p6Um8b3i7GISs7kjTq/PZoioCfJzfKdJTN0Q45kQEQuh9H88M3yEs3DbtRTKALraM0YC8laiMiOOe6ADmTcCiREeAWZelBaEXRaSuj2lx0xHaRYqF65O0Lo5OCFU18A8cMDE4MLYm9w2QSr9NgQAIcRxZsNpA7UJR0e71JL+VU+ISWFk5I97lra8uGg7GlQYhGd4Gc6rxsLFRiIeGO4abP4S4ekQ1fiqDCy87GZHd52fn5aaDGuvOmIofrzpVwMvtbreZ/855OaXTRcNiNE0wzGZSxbjg26v8ko8L537v/XCCWP2MFaArJpvnkep0pA+O86MWjRAZPQRfznZiSIaTppy6m3p6HrNSsY7fDtz7Cl4V/DJAjQDoyiL2uwf1UHVd2AIrzBUSlJaTj4k6NL97a/GqhWKU9RUmjnYKpm2r+JYUcrkCuZKvcYvrg8pDoUKQywY9GDWg03DUFSirlUXBS5SWn/KAntnf0IdHGL/7mwXqDG+LZYjbEdQmqUqq4y54TNmWUP7IgcAw5816YBzwiNIJiE9M4lPCzeI/FGBeYy3p6IAmH4AjXXmvQ4Iy0Y82NTobcAggT2Cdqz6Mx4TdGoq9fn2etrWKUNFyatAHydQTVUQ2S5OWVUlugcNvoUrlA8cJJz9MqOa/W3iVno4zDHfE7zhoY5f5lRTVZDhrQbR8LS4eRLz8iPMyBL6o4PiLlp89FjdokQLaSBmKHUwWp0na5fE3v9zny2YcDXG/jfI9sctulHRbdkI5a4GOPJx4oAJQzVZ/yYAado8KNZUdEFs9ZPiBsausotXMNebEgr0dyopuqfScFJ3ODNPHgclACPdccwv0YJGQdsN2lhoV4HVGBxcEUeUX/alr4nqpcc1CCR3vR7g40zteQg/JvWmFlUE4mAiTpHlYGrB7w+U2KdSwQz2QJKBe/5eiixWipmfP15AFWrK8Sh1GBBYLgzki1wTMhGQmagXqJ2+FuqJ8f0XzXCVJFHQdMAw8xco11HhM347alrAu+wmX3pDFABOvkC+WPX0Uhg1Z5MVHKNROxaR84YV3s12UcM+70cJ460SzEaKLyh472vOMD3XnaK7zxZcXlWqenEvcjmgGNR2OKbI1s8U+iwiW+HotHalp3e1MGDy6BMVIvajnAzkFHbeVsgjmJUkrP9OAwnEHYXVBqYx3q7LvXjoVR0mY8h+ZaOnh053pdsGkmbqhyryN01eVHySr+CkDYkSMeZ1xjPNVM+gVLTDKu2VGsMUJqWO4TwPDP0VOg2/8ITbAUaMGb4LjL7L+Pi11lEVMXTYIlAZ/QHmTENjyx3kDkBdfcvvQt6tKk6jYFM4EG5UXDTaF5+1ZjRz6W7MdJPC+wTkbDUim4p5QQH3b9kGk2Bkilyeur8Bc20wm5uJSBO95GfYDI1EZipoRaH7uVveneqz43tlTZGRQ4a7CNmMHgXyOQQOL6WQkgMUTQDT8vh21aSdz7ERiZT1jK9F+v6wgFvuEmGngSvIUR2CJkc5tx1QygfZnAruONobB1idCLB1FCfO7N1ZdRocT8/Wye+EnDiO9pzqIpnLDl4bkaRKW+ekBVwHn46Shw1X0tclt/0ROijuUB4kIInrVJU4buWf4YITJtjOJ6iKdr1u+flgQeFH70GxKjhdgt/MrwfB4K/sXczQ+9zYcrD4dhY6qZhZ010rrxggWA8JaZyg2pYij8ieYEg1aZJkZK9O1Re7sB0iouf60rK0Gd+AYlp7soqCBCDGwfKeUQhCBn0E0o0GS6PdmjLi0TtCYZeqazqwN+yNINIA8Lk3iPDnWUiIPLGNcHmZDxfeK0iAdxm/T7LnN+gemRL61hHIc0NCAZaiYJR+OHnLWSe8sLrK905B5eEJHNlWq4RmEXIaFTmo49f8w61+NwfEUyuJAwVqZCLFcyHBKAcIVj3sNzfEOXzVKIndxHw+AR93owhbCxUZf6Gs8cz6/1VdrFEPrv330+9s6BtMVPJ3zl/Uf9rUi0Z/opexfdL3ykF76e999GPfVv8fJv/Y/+/5hEMon1tqNFyVRevV9y9/uIvsG3dbB8GRRrgaEXfhx+2xeOFt+cEn3RZanNxdEe2+B6MHpNbrRE53PlDifPvFcp4kO78ILR0T4xyW/WGPyBsqGdoA7zJJCu1TKbGfhnqgnRbxbB2B3UZoeQ2bz2sTVnUwokTcTU21RxN1PYPS3Sar7T0eRIsyCNowr9amwoMU/od9s2APtiKNL6ENOlyKADstAEWKA+sdKDhrJ6BOhRJmZ+QJbAaZ3/5Fq0/lumCgEzGEbu3yi0Y4I4EgVAjqxh4HbuQn0GrRhOWyAfsglQJAVL1y/6yezS2k8RE2MstJLh92NOB3GCYgFXznF4d25qiP4ZCyI4RYGesut6FXK6GwPpKK8WHEkhYui0AyEmr5Ml3uBFtPFdnioI8RiCooa7Z1G1WuyIi3nSNglutc+xY8BkeW3JJXPK6jd2VIMpaSxpVtFq+R+ySK9J6WG5Qvt+C+QH1hyYUOVK7857nFmyDBYgZ/o+AnibzNVqyYCJQvyDXDTK+iXdkA71bY7TL3bvuLxLBQ8kbTvTEY9aqkQ3+MiLWbEgjLzOH+lXgco1ERgzd80rDCymlpaRQbOYnKG/ODoFl46lzT0cjM5FYVvv0qLUbD5lyJtMUaC1pFlTkNONx6lliaX9o0i/1vws5bNKn5OuENQEKmLlcP4o2ZmJjD4zzd3Fk32uQ4uRWkPSUqb4LBe3EXHdORNB2BWsws5daRnMfNVX7isPSb1hMQdAJi1/qmDMfRUlCU74pmnzjbXfL8PVG8NsW6IQM2Ne23iCPIpryJjYbVnm5hCvKpMa7HLViNiNc+xTfDIaKm3jctViD8A1M9YPJNk003VVr4Zo2MuGW8vil8SLaGpPXqG7I4DLdtl8a4Rbx1Lt4w5Huqaa1XzZBtj208EJVGcmKYEuaeN27zT9EE6a09JerXdEbpaNgNqYJdhP1NdqiPKsbDRUi86XvvNC7rME5mrSQtrzAZVndtSjCMqd8BmaeGR4l4YFULGRBeXIV9Y4yxLFdyoUNpiy2IhePSWzBofYPP0eIa2q5JP4j9G8at/AqoSsLAUuRXtvgsqX/zYwsE+of6oSDbUOo4RMJw+DOUTJq+hnqwKim9Yy/napyZNTc2rCq6V9jHtJbxGPDwlzWj/Sk3zF/BHOlT/fSjSq7FqlPI1q6J+ru8Aku008SFINXZfOfnZNOvGPMtEmn2gLPt+H4QLA+/SYe4j398auzhKIp2Pok3mPC5q1IN1HgR+mnEfc4NeeHYwd2/kpszR3cBn7ni9NbIqhtSWFW8xbUJuUPVOeeXu3j0IGZmFNiwaNZ6rH4/zQ2ODz6tFxRLsUYZu1bfd1uIvfQDt4YD/efKYv8VF8bHGDgK22w2Wqwpi43vNCOXFJZCGMqWiPbL8mil6tsmOTXAWCyMCw73e2rADZj2IK6rqksM3EXF2cbLb4vjB14wa/yXK5vwU+05MzERJ5nXsXsW21o7M+gO0js2OyKciP5uF2iXyb2DiptwQeHeqygkrNsqVCSlldxBMpwHi1vfc8RKpP/4L3Lmpq6DZcvhDDfxTCE3splacTcOtXdK2g303dIWBVe2wD/Gvja1cClFQ67gw0t1ZUttsUgQ1Veky8oOpS6ksYEc4bqseCbZy766SvL3FodmnahlWJRgVCNjPxhL/fk2wyvlKhITH/VQCipOI0dNcRa5B1M5HmOBjTLeZQJy237e2mobwmDyJNHePhdDmiknvLKaDbShL+Is1XTCJuLQd2wmdJL7+mKvs294whXQD+vtd88KKk0DXP8B1Xu9J+xo69VOuFgexgTrcvI6SyltuLix9OPuE6/iRJYoBMEXxU4shQMf4Fjqwf1PtnJ/wWSZd29rhZjRmTGgiGTAUQqRz+nCdjeMfYhsBD5Lv60KILWEvNEHfmsDs2L0A252351eUoYxAysVaCJVLdH9QFWAmqJDCODUcdoo12+gd6bW2boY0pBVHWL6LQDK5bYWh1V8vFvi0cRpfwv7cJiMX3AZNJuTddHehTIdU0YQ/sQ1dLoF2xQPcCuHKiuCWOY30DHe1OwcClLAhqAKyqlnIbH/8u9ScJpcS4kgp6HKDUdiOgRaRGSiUCRBjzI5gSksMZKqy7Sd51aeg0tgJ+x0TH9YH2Mgsap9N7ENZdEB0bey2DMTrBA1hn56SErNHf3tKtqyL9b6yXEP97/rc+jgD2N1LNUH6RM9AzP3kSipr06RkKOolR7HO768jjWiH1X92jA7dkg7gcNcjqsZCgfqWw0tPXdLg20cF6vnQypg7gLtkazrHAodyYfENPQZsdfnjMZiNu4nJO97D1/sQE+3vNFzrSDOKw+keLECYf7RJwVHeP/j79833oZ0egonYB2FlFE5qj02B/LVOMJQlsB8uNg3Leg4qtZwntsOSNidR0abbZmAK4sCzvt8Yiuz2yrNCJoH5O8XvX/vLeR/BBYTWj0sOPYM/jyxRd5+/JziKAABaPcw/34UA3aj/gLZxZgRCWN6m4m3demanNgsx0P237/Q+Ew5VYnJPkyCY0cIVHoFn2Ay/e7U4P19APbPFXEHX94N6KhEMPG7iwB3+I+O1jd5n6VSgHegxgaSawO6iQCYFgDsPSMsNOcUj4q3sF6KzGaH/0u5PQoAj/8zq6Uc9MoNrGqhYeb2jQo0WlGlXjxtanZLS24/OIN5Gx/2g684BPDQpwlqnkFcxpmP/osnOXrFuu4PqifouQH0eF5qCkvITQbJw/Zvy5mAHWC9oU+cTiYhJmSfKsCyt1cGVxisKu+NymEQIAyaCgud/V09qT3nk/9s/SWsYtha7yNpzBIMM40rCSGaJ9u6lEkl00vXBiEt7p9P5IBCiavynEOv7FgLqPdeqxRiCwuFVMolSIUBcoyfUC2e2FJSAUgYdVGFf0b0Kn2EZlK97yyxrT2MVgvtRikfdaAW8RwEEfN+B7/eK8bBdp7URpbqn1xcrC6d2UjdsKbzCjBFqkKkoZt7Mrhg6YagE7spkqj0jOrWM+UGQ0MUlG2evP1uE1p2xSv4dMK0dna6ENcNUF+xkaJ7B764NdxLCpuvhblltVRAf7vK5qPttJ/9RYFUUSGcLdibnz6mf7WkPO3MkUUhR2mAOuGv8IWw5XG1ZvoVMnjSAZe6T7WYA99GENxoHkMiKxHlCuK5Gd0INrISImHQrQmv6F4mqU/TTQ8nHMDzCRivKySQ8dqkpQgnUMnwIkaAuc6/FGq1hw3b2Sba398BhUwUZSAIO8XZvnuLdY2n6hOXws+gq9BHUKcKFA6kz6FDnpxLPICa3qGhnc97bo1FT/XJk48LrkHJ2CAtBv0RtN97N21plfpXHvZ8gMJb7Zc4cfI6MbPwsW7AilCSXMFIEUEmir8XLEklA0ztYbGpTTGqttp5hpFTTIqUyaAIqvMT9A/x+Ji5ejA4Bhxb/cl1pUdOD6epd3yilIdO6j297xInoiBPuEDW2/UfslDyhGkQs7Wy253bVnlT+SWg89zYIK/9KXFl5fe+jow2rd5FXv8zDPrmfMXiUPt9QBO/iK4QGbX5j/7Rx1c1vzsY8ONbP3lVIaPrhL4+1QrECTN3nyKavGG0gBBtHvTKhGoBHgMXHStFowN+HKrPriYu+OZ05Frn8okQrPaaxoKP1ULCS/cmKFN3gcH7HQlVjraCeQmtjg1pSQxeuqXiSKgLpxc/1OiZsU4+n4lz4hpahGyWBURLi4642n1gn9qz9bIsaCeEPJ0uJmenMWp2tJmIwLQ6VSgDYErOeBCfSj9P4G/vI7oIF+l/n5fp956QgxGvur77ynawAu3G9MdFbJbu49NZnWnnFcQHjxRuhUYvg1U/e84N4JTecciDAKb/KYIFXzloyuE1eYXf54MmhjTq7B/yBToDzzpx3tJCTo3HCmVPYfmtBRe3mPYEE/6RlTIxbf4fSOcaKFGk4gbaUWe44hVk9SZzhW80yfW5QWBHxmtUzvMhfVQli4gZTktIOZd9mjJ5hsbmzttaHQB29Am3dZkmx3g/qvYocyhZ2PXAWsNQiIaf+Q8W/MWPIK7/TjvCx5q2XRp4lVWydMc2wIQkhadDB0xsnw/kSEyGjLKjI4coVIwtubTF3E7MJ6LS6UOsJKj82XVAVPJJcepfewbzE91ivXZvOvYfsmMevwtPpfMzGmC7WJlyW2j0jh7AF1JLmwEJSKYwIvu6DHc3YnyLH9ZdIBnQ+nOVDRiP+REpqv++typYHIvoJyICGA40d8bR7HR2k7do6UQTHF4oriYeIQbxKe4Th6+/l1BjUtS9hqORh3MbgvYrStXTfSwaBOmAVQZzpYNqsAmQyjY56MUqty3c/xH6GuhNvNaG9vGbG6cPtBM8UA3e8r51D0AR9kozKuGGSMgLz3nAHxDNnc7GTwpLj7/6HeWp1iksDeTjwCLpxejuMtpMnGJgsiku1sOACwQ9ukzESiDRN77YNESxR5LphOlcASXA5uIts1LnBIcn1J7BLWs49DMALSnuz95gdOrTZr0u1SeYHinno/pE58xYoXbVO/S+FEMMs5qyWkMnp8Q3ClyTlZP52Y9nq7b8fITPuVXUk9ohG5EFHw4gAEcjFxfKb3xuAsEjx2z1wxNbSZMcgS9GKyW3R6KwJONgtA64LTyxWm8Bvudp0M1FdJPEGopM4Fvg7G/hsptkhCfHFegv4ENwxPeXmYhxwZy7js+BeM27t9ODBMynVCLJ7RWcBMteZJtvjOYHb5lOnCLYWNEMKC59BA7covu1cANa2PXL05iGdufOzkgFqqHBOrgQVUmLEc+Mkz4Rq8O6WkNr7atNkH4M8d+SD1t/tSzt3oFql+neVs+AwEI5JaBJaxARtY2Z4mKoUqxds4UpZ0sv3zIbNoo0J4fihldQTX3XNcuNcZmcrB5LTWMdzeRuAtBk3cZHYQF6gTi3PNuDJ0nmR+4LPLoHvxQIxRgJ9iNNXqf2SYJhcvCtJiVWo85TsyFOuq7EyBPJrAdhEgE0cTq16FQXhYPJFqSfiVn0IQnPOy0LbU4BeG94QjdYNB0CiQ3QaxQqD2ebSMiNjaVaw8WaM4Z5WnzcVDsr4eGweSLa2DE3BWViaxhZFIcSTjgxNCAfelg+hznVOYoe5VqTYs1g7WtfTm3e4/WduC6p+qqAM8H4ZyrJCGpewThTDPe6H7CzX/zQ8Tm+r65HeZn+MsmxUciEWPlAVaK/VBaQBWfoG/aRL/jSZIQfep/89GjasWmbaWzeEZ2R1FOjvyJT37O9B8046SRSKVEnXWlBqbkb5XCS3qFeuE9xb9+frEknxWB5h1D/hruz2iVDEAS7+qkEz5Ot5agHJc7WCdY94Ws61sURcX5nG8UELGBAHZ3i+3VulAyT0nKNNz4K2LBHBWJcTBX1wzf+//u/j/9+//v87+9/l9Lbh/L/uyNYiTsWV2LwsjaA6MxTuzFMqmxW8Jw/+IppdX8t/Clgi1rI1SN0UC/r6tX/4lUc2VV1OQReSeCsjUpKZchw4XUcjHfw6ryCV3R8s6VXm67vp4n+lcPV9gJwmbKQEsmrJi9c2vkwrm8HFbVYNTaRGq8D91t9n5+U+aD/hNtN3HjC/nC/vUoGFSCkXP+NlRcmLUqLbiUBl4LYf1U/CCvwtd3ryCH8gUmGITAxiH1O5rnGTz7y1LuFjmnFGQ1UWuM7HwfXtWl2fPFKklYwNUpF2IL/TmaRETjQiM5SJacI+3Gv5MBU8lP5Io6gWkawpyzNEVGqOdx4YlO1dCvjbWFZWbCmeiFKPSlMKtKcMFLs/KQxtgAHi7NZNCQ32bBAW2mbHflVZ8wXKi1JKVHkW20bnYnl3dKWJeWJOiX3oKPBD6Zbi0ZvSIuWktUHB8qDR8DMMh1ZfkBL9FS9x5r0hBGLJ8pUCJv3NYH+Ae8p40mZWd5m5fhobFjQeQvqTT4VKWIYfRL0tfaXKiVl75hHReuTJEcqVlug+eOIIc4bdIydtn2K0iNZPsYWQvQio2qbO3OqAlPHDDOB7DfjGEfVF51FqqNacd6QmgFKJpMfLp5DHTv4wXlONKVXF9zTJpDV4m1sYZqJPhotcsliZM8yksKkCkzpiXt+EcRQvSQqmBS9WdWkxMTJXPSw94jqI3varCjQxTazjlMH8jTS8ilaW8014/vwA/LNa+YiFoyyx3s/KswP3O8QW1jtq45yTM/DX9a8M4voTVaO2ebvw1EooDw/yg6Y1faY+WwrdVs5Yt0hQ5EwRfYXSFxray1YvSM+kYmlpLG2/9mm1MfmbKHXr44Ih8nVKb1M537ZANUkCtdsPZ80JVKVKabVHCadaLXg+IV8i5GSwpZti0h6diTaKs9sdpUKEpd7jDUpYmHtiX33SKiO3tuydkaxA7pEc9XIQEOfWJlszj5YpL5bKeQyT7aZSBOamvSHl8xsWvgo26IP/bqk+0EJUz+gkkcvlUlyPp2kdKFtt7y5aCdks9ZJJcFp5ZWeaWKgtnXMN3ORwGLBE0PtkEIek5FY2aVssUZHtsWIvnljMVJtuVIjpZup/5VL1yPOHWWHkOMc6YySWMckczD5jUj2mlLVquFaMU8leGVaqeXis+aRRL8zm4WuBk6cyWfGMxgtr8useQEx7k/PvRoZyd9nde1GUCV84gMX8Ogu/BWezYPSR27llzQnA97oo0pYyxobYUJfsj+ysTm9zJ+S4pk0TGo9VTG0KjqYhTmALfoDZVKla2b5yhv241PxFaLJs3i05K0AAIdcGxCJZmT3ZdT7CliR7q+kur7WdQjygYtOWRL9B8E4s4LI8KpAj7bE0dg7DLOaX+MGeAi0hMMSSWZEz+RudXbZCsGYS0QqiXjH9XQbd8sCB+nIVTq7/T/FDS+zWY9q7Z2fdq1tdLb6v3hKKVDAw5gjj6o9r1wHFROdHc18MJp4SJ2Ucvu+iQ9EgkekW8VCM+psM6y+/2SBy8tNN4a3L1MzP+OLsyvESo5gS7IQOnIqMmviJBVc6zbVG1n8eXiA3j46kmvvtJlewwNDrxk4SbJOtP/TV/lIVK9ueShNbbMHfwnLTLLhbZuO79ec5XvfgRwLFK+w1r5ZWW15rVFZrE+wKqNRv5KqsLNfpGgnoUU6Y71NxEmN7MyqwqAQqoIULOw/LbuUB2+uE75gJt+kq1qY4LoxV+qR/zalupea3D5+WMeaRIn0sAI6DDWDh158fqUb4YhAxhREbUN0qyyJYkBU4V2KARXDT65gW3gRsiv7xSPYEKLwzgriWcWgPr0sbZnv7m1XHNFW6xPdGNZUdxFiUYlmXNjDVWuu7LCkX/nVkrXaJhiYktBISC2xgBXQnNEP+cptWl1eG62a7CPXrnrkTQ5BQASbEqUZWMDiZUisKyHDeLFOaJILUo5f6iDt4ZO8MlqaKLto0AmTHVVbkGuyPa1R/ywZsWRoRDoRdNMMHwYTsklMVnlAd2S0282bgMI8fiJpDh69OSL6K3qbo20KfpNMurnYGQSr/stFqZ7hYsxKlLnKAKhsmB8AIpEQ4bd/NrTLTXefsE6ChRmKWjXKVgpGoPs8GAicgKVw4K0qgDgy1A6hFq1WRat3fHF+FkU+b6H4NWpOU3KXTxrIb2qSHAb+qhm8hiSROi/9ofapjxhyKxxntPpge6KL5Z4+WBMYkAcE6+0Hd3Yh2zBsK2MV3iW0Y6cvOCroXlRb2MMJtdWx+3dkFzGh2Pe3DZ9QpSqpaR/rE1ImOrHqYYyccpiLC22amJIjRWVAherTfpQLmo6/K2pna85GrDuQPlH1Tsar8isAJbXLafSwOof4gg9RkAGm/oYpBQQiPUoyDk2BCQ1k+KILq48ErFo4WSRhHLq/y7mgw3+L85PpP6xWr6cgp9sOjYjKagOrxF148uhuaWtjet953fh1IQiEzgC+d2IgBCcUZqgTAICm2bR8oCjDLBsmg+ThyhfD+zBalsKBY1Ce54Y/t9cwfbLu9SFwEgphfopNA3yNxgyDafUM3mYTovZNgPGdd4ZFFOj1vtfFW3u7N+iHEN1HkeesDMXKPyoCDCGVMo4GCCD6PBhQ3dRZIHy0Y/3MaE5zU9mTCrwwnZojtE+qNpMSkJSpmGe0EzLyFelMJqhfFQ7a50uXxZ8pCc2wxtAKWgHoeamR2O7R+bq7IbPYItO0esdRgoTaY38hZLJ5y02oIVwoPokGIzxAMDuanQ1vn2WDQ00Rh6o5QOaCRu99fwDbQcN0XAuqkFpxT/cfz3slGRVokrNU0iqiMAJFEbKScZdmSkTUznC0U+MfwFOGdLgsewRyPKwBZYSmy6U325iUhBQNxbAC3FLKDV9VSOuQpOOukJ/GAmu/tyEbX9DgEp6dv1zoU0IqzpG6gssSjIYRVPGgU1QAQYRgIT8gEV0EXr1sqeh2I6rXjtmoCYyEDCe/PkFEi/Q48FuT29p557iN+LCwk5CK/CZ2WdAdfQZh2Z9QGrzPLSNRj5igUWzl9Vi0rCqH8G1Kp4QMLkuwMCAypdviDXyOIk0AHTM8HBYKh3b0/F+DxoNj4ZdoZfCpQVdnZarqoMaHWnMLNVcyevytGsrXQEoIbubqWYNo7NRHzdc0zvT21fWVirj7g36iy6pxogfvgHp1xH1Turbz8QyyHnXeBJicpYUctbzApwzZ1HT+FPEXMAgUZetgeGMwt4G+DHiDT2Lu+PT21fjJCAfV16a/Wu1PqOkUHSTKYhWW6PhhHUlNtWzFnA7MbY+r64vkwdpfNB2JfWgWXAvkzd42K4lN9x7Wrg4kIKgXCb4mcW595MCPJ/cTfPAMQMFWwnqwde4w8HZYJFpQwcSMhjVz4B8p6ncSCN1X4klxoIH4BN2J6taBMj6lHkAOs8JJAmXq5xsQtrPIPIIp/HG6i21xMGcFgqDXSRF0xQg14d2uy6HgKE13LSvQe52oShF5Jx1R6avyL4thhXQZHfC94oZzuPUBKFYf1VvDaxIrtV6dNGSx7DO0i1p6CzBkuAmEqyWceQY7F9+U0ObYDzoa1iKao/cOD/v6Q9gHrrr1uCeOk8fST9MG23Ul0KmM3r+Wn6Hi6WAcL7gEeaykicvgjzkjSwFsAXIR81Zx4QJ6oosVyJkCcT+4xAldCcihqvTf94HHUPXYp3REIaR4dhpQF6+FK1H0i9i7Pvh8owu3lO4PT1iuqu+DkL2Bj9+kdfGAg2TXw03iNHyobxofLE2ibjsYDPgeEQlRMR7afXbSGQcnPjI2D+sdtmuQ771dbASUsDndU7t58jrrNGRzISvwioAlHs5FA+cBE5Ccznkd8NMV6BR6ksnKLPZnMUawRDU1MZ/ib3xCdkTblHKu4blNiylH5n213yM0zubEie0o4JhzcfAy3H5qh2l17uLooBNLaO+gzonTH2uF8PQu9EyH+pjGsACTMy4cHzsPdymUSXYJOMP3yTkXqvO/lpvt0cX5ekDEu9PUfBeZODkFuAjXCaGdi6ew4qxJ8PmFfwmPpkgQjQlWqomFY6UkjmcnAtJG75EVR+NpzGpP1Ef5qUUbfowrC3zcSLX3BxgWEgEx/v9cP8H8u1Mvt9/rMDYf6sjwU1xSOPBgzFEeJLMRVFtKo5QHsUYT8ZRLCah27599EuqoC9PYjYO6aoAMHB8X1OHwEAYouHfHB3nyb2B+SnZxM/vw/bCtORjLMSy5aZoEpvgdGvlJfNPFUu/p7Z4VVK1hiI0/UTuB3ZPq4ohEbm7Mntgc1evEtknaosgZSwnDC2BdMmibpeg48X8Ixl+/8+xXdbshQXUPPvx8jT3fkELivHSmqbhblfNFShWAyQnJ3WBU6SMYSIpTDmHjdLVAdlADdz9gCplZw6mTiHqDwIsxbm9ErGusiVpg2w8Q3khKV/R9Oj8PFeF43hmW/nSd99nZzhyjCX3QOZkkB6BsH4H866WGyv9E0hVAzPYah2tkRfQZMmP2rinfOeQalge0ovhduBjJs9a1GBwReerceify49ctOh5/65ATYuMsAkVltmvTLBk4oHpdl6i+p8DoNj4Fb2vhdFYer2JSEilEwPd5n5zNoGBXEjreg/wh2NFnNRaIUHSOXa4eJRwygZoX6vnWnqVdCRT1ARxeFrNBJ+tsdooMwqnYhE7zIxnD8pZH+P0Nu1wWxCPTADfNWmqx626IBJJq6NeapcGeOmbtXvl0TeWG0Y7OGGV4+EHTtNBIT5Wd0Bujl7inXgZgfXTM5efD3qDTJ54O9v3Bkv+tdIRlq1kXcVD0BEMirmFxglNPt5pedb1AnxuCYMChUykwsTIWqT23XDpvTiKEru1cTcEMeniB+HQDehxPXNmkotFdwUPnilB/u4Nx5Xc6l8J9jH1EgKZUUt8t8cyoZleDBEt8oibDmJRAoMKJ5Oe9CSWS5ZMEJvacsGVdXDWjp/Ype5x0p9PXB2PAwt2LRD3d+ftNgpuyvxlP8pB84oB1i73vAVpwyrmXW72hfW6Dzn9Jkj4++0VQ4d0KSx1AsDA4OtXXDo63/w+GD+zC7w5SJaxsmnlYRQ4dgdjA7tTl2KNLnpJ+mvkoDxtt1a4oPaX3EVqj96o9sRKBQqU7ZOiupeAIyLMD+Y3YwHx30XWHB5CQiw7q3mj1EDlP2eBsZbz79ayUMbyHQ7s8gu4Lgip1LiGJj7NQj905/+rgUYKAA5qdrlHKIknWmqfuR+PB8RdBkDg/NgnlT89G72h2NvySnj7UyBwD+mi/IWs1xWbxuVwUIVXun5cMqBtFbrccI+DILjsVQg6eeq0itiRfedn89CvyFtpkxaauEvSANuZmB1p8FGPbU94J9medwsZ9HkUYjmI7OH5HuxendLbxTaYrPuIfE2ffXFKhoNBUp33HsFAXmCV/Vxpq5AYgFoRr5Ay93ZLRlgaIPjhZjXZZChT+aE5iWAXMX0oSFQEtwjiuhQQItTQX5IYrKfKB+queTNplR1Hoflo5/I6aPPmACwQCE2jTOYo5Dz1cs7Sod0KTG/3kEDGk3kUaUCON19xSJCab3kNpWZhSWkO8l+SpW70Wn3g0ciOIJO5JXma6dbos6jyisuxXwUUhj2+1uGhcvuliKtWwsUTw4gi1c/diEEpZHoKoxTBeMDmhPhKTx7TXWRakV8imJR355DcIHkR9IREHxohP4TbyR5LtFU24umRPRmEYHbpe1LghyxPx7YgUHjNbbQFRQhh4KeU1EabXx8FS3JAxp2rwRDoeWkJgWRUSKw6gGP5U2PuO9V4ZuiKXGGzFQuRuf+tkSSsbBtRJKhCi3ENuLlXhPbjTKD4djXVnfXFds6Zb+1XiUrRfyayGxJq1+SYBEfbKlgjiSmk0orgTqzSS+DZ5rTqsJbttiNtp+KMqGE2AHGFw6jQqM5vD6vMptmXV9OAjq49Uf/Lx9Opam+Hn5O9p8qoBBAQixzQZ4eNVkO9sPzJAMyR1y4/RCQQ1s0pV5KAU5sKLw3tkcFbI/JqrjCsK4Mw+W8aod4lioYuawUiCyVWBE/qPaFi5bnkgpfu/ae47174rI1fqQoTbW0HrU6FAejq7ByM0V4zkZTg02/YJK2N7hUQRCeZ4BIgSEqgD8XsjzG6LIsSbuHoIdz/LhFzbNn1clci1NHWJ0/6/O8HJMdIpEZbqi1RrrFfoo/rI/7ufm2MPG5lUI0IYJ4MAiHRTSOFJ2oTverFHYXThkYFIoyFx6rMYFgaOKM4xNWdlOnIcKb/suptptgTOTdVIf4YgdaAjJnIAm4qNNHNQqqAzvi53GkyRCEoseUBrHohZsjUbkR8gfKtc/+Oa72lwxJ8Mq6HDfDATbfbJhzeIuFQJSiw1uZprHlzUf90WgqG76zO0eCB1WdPv1IT6sNxxh91GEL2YpgC97ikFHyoaH92ndwduqZ6IYjkg20DX33MWdoZk7QkcKUCgisIYslOaaLyvIIqRKWQj16jE1DlQWJJaPopWTJjXfixEjRJJo8g4++wuQjbq+WVYjsqCuNIQW3YjnxKe2M5ZKEqq+cX7ZVgnkbsU3RWIyXA1rxv4kGersYJjD//auldXGmcEbcfTeF16Y1708FB1HIfmWv6dSFi6oD4E+RIjCsEZ+kY7dKnwReJJw3xCjKvi3kGN42rvyhUlIz0Bp+fNSV5xwFiuBzG296e5s/oHoFtUyUplmPulIPl+e1CQIQVtjlzLzzzbV+D/OVQtYzo5ixtMi5BmHuG4N/uKfJk5UIREp7+12oZlKtPBomXSzAY0KgtbPzzZoHQxujnREUgBU+O/jKKhgxVhRPtbqyHiUaRwRpHv7pgRPyUrnE7fYkVblGmfTY28tFCvlILC04Tz3ivkNWVazA+OsYrxvRM/hiNn8Fc4bQBeUZABGx5S/xFf9Lbbmk298X7iFg2yeimvsQqqJ+hYbt6uq+Zf9jC+Jcwiccd61NKQtFvGWrgJiHB5lwi6fR8KzYS7EaEHf/ka9EC7H8D+WEa3TEACHBkNSj/cXxFeq4RllC+fUFm2xtstYLL2nos1DfzsC9vqDDdRVcPA3Ho95aEQHvExVThXPqym65llkKlfRXbPTRiDepdylHjmV9YTWAEjlD9DdQnCem7Aj/ml58On366392214B5zrmQz/9ySG2mFqEwjq5sFl5tYJPw5hNz8lyZPUTsr5E0F2C9VMPnZckWP7+mbwp/BiN7f4kf7vtGnZF2JGvjK/sDX1RtcFY5oPQnE4lIAYV49U3C9SP0LCY/9i/WIFK9ORjzM9kG/KGrAuwFmgdEpdLaiqQNpCTGZVuAO65afkY1h33hrqyLjZy92JK3/twdj9pafFcwfXONmPQWldPlMe7jlP24Js0v9m8bIJ9TgS2IuRvE9ZVRaCwSJYOtAfL5H/YS4FfzKWKbek+GFulheyKtDNlBtrdmr+KU+ibHTdalzFUmMfxw3f36x+3cQbJLItSilW9cuvZEMjKw987jykZRlsH/UI+HlKfo2tLwemBEeBFtmxF2xmItA/dAIfQ+rXnm88dqvXa+GapOYVt/2waFimXFx3TC2MUiOi5/Ml+3rj/YU6Ihx2hXgiDXFsUeQkRAD6wF3SCPi2flk7XwKAA4zboqynuELD312EJ88lmDEVOMa1W/K/a8tGylZRMrMoILyoMQzzbDJHNZrhH77L9qSC42HVmKiZ5S0016UTp83gOhCwz9XItK9fgXfK3F5d7nZCBUekoLxrutQaPHa16Rjsa0gTrzyjqTnmcIcrxg6X6dkKiucudc0DD5W4pJPf0vuDW8r5/uw24YfMuxFRpD2ovT2mFX79xH6Jf+MVdv2TYqR6/955QgVPe3JCD/WjAYcLA9tpXgFiEjge2J5ljeI/iUzg91KQuHkII4mmHZxC3XQORLAC6G7uFn5LOmlnXkjFdoO976moNTxElS8HdxWoPAkjjocDR136m2l+f5t6xaaNgdodOvTu0rievnhNAB79WNrVs6EsPgkgfahF9gSFzzAd+rJSraw5Mllit7vUP5YxA843lUpu6/5jAR0RvH4rRXkSg3nE+O5GFyfe+L0s5r3k05FyghSFnKo4TTgs07qj4nTLqOYj6qaW9knJTDkF5OFMYbmCP+8H16Ty482OjvERV6OFyw043L9w3hoJi408sR+SGo1WviXUu8d7qS+ehKjpKwxeCthsm2LBFSFeetx0x4AaKPxtp3CxdWqCsLrB1s/j5TAhc1jNZsXWl6tjo/WDoewxzg8T8NnhZ1niUwL/nhfygLanCnRwaFGDyLw+sfZhyZ1UtYTp8TYB6dE7R3VsKKH95CUxJ8u8N+9u2/9HUNKHW3x3w5GQrfOPafk2w5qZq8MaHT0ebeY3wIsp3rN9lrpIsW9c1ws3VNV+JwNz0Lo9+V7zZr6GD56We6gWVIvtmam5GPPkVAbr74r6SwhuL+TRXtW/0pgyX16VNl4/EAD50TnUPuwrW6OcUO2VlWXS0inq872kk7GUlW6o/ozFKq+Sip6LcTtSDfDrPTcCHhx75H8BeRon+KG2wRwzfDgWhALmiWOMO6h3pm1UCZEPEjScyk7tdLx6WrdA2N1QTPENvNnhCQjW6kl057/qv7IwRryHrZBCwVSbLLnFRiHdTwk8mlYixFt1slEcPD7FVht13HyqVeyD55HOXrh2ElAxJyinGeoFzwKA91zfrdLvDxJSjzmImfvTisreI25EDcVfGsmxLVbfU8PGe/7NmWWKjXcdTJ11jAlVIY/Bv/mcxg/Q10vCHwKG1GW/XbJq5nxDhyLqiorn7Wd7VEVL8UgVzpHMjQ+Z8DUgSukiVwWAKkeTlVVeZ7t1DGnCgJVIdBPZAEK5f8CDyDNo7tK4/5DBjdD5MPV86TaEhGsLVFPQSI68KlBYy84FievdU9gWh6XZrugvtCZmi9vfd6db6V7FmoEcRHnG36VZH8N4aZaldq9zZawt1uBFgxYYx+Gs/qW1jwANeFy+LCoymyM6zgG7j8bGzUyLhvrbJkTYAEdICEb4kMKusKT9V3eIwMLsjdUdgijMc+7iKrr+TxrVWG0U+W95SGrxnxGrE4eaJFfgvAjUM4SAy8UaRwE9j6ZQH5qYAWGtXByvDiLSDfOD0yFA3UCMKSyQ30fyy1mIRg4ZcgZHLNHWl+c9SeijOvbOJxoQy7lTN2r3Y8p6ovxvUY74aOYbuVezryqXA6U+fcp6wSV9X5/OZKP18tB56Ua0gMyxJI7XyNT7IrqN8GsB9rL/kP5KMrjXxgqKLDa+V5OCH6a5hmOWemMUsea9vQl9t5Oce76PrTyTv50ExOqngE3PHPfSL//AItPdB7kGnyTRhVUUFNdJJ2z7RtktZwgmQzhBG/G7QsjZmJfCE7k75EmdIKH7xlnmDrNM/XbTT6FzldcH/rcRGxlPrv4qDScqE7JSmQABJWqRT/TUcJSwoQM+1jvDigvrjjH8oeK2in1S+/yO1j8xAws/T5u0VnIvAPqaE1atNuN0cuRliLcH2j0nTL4JpcR7w9Qya0JoaHgsOiALLCCzRkl1UUESz+ze/gIXHGtDwgYrK6pCFKJ1webSDog4zTlPkgXZqxlQDiYMjhDpwTtBW2WxthWbov9dt2X9XFLFmcF+eEc1UaQ74gqZiZsdj63pH1qcv3Vy8JYciogIVKsJ8Yy3J9w/GhjWVSQAmrS0BPOWK+RKV+0lWqXgYMnIFwpcZVD7zPSp547i9HlflB8gVnSTGmmq1ClO081OW/UH11pEQMfkEdDFzjLC1Cdo/BdL3s7cXb8J++Hzz1rhOUVZFIPehRiZ8VYu6+7Er7j5PSZu9g/GBdmNzJmyCD9wiswj9BZw+T3iBrg81re36ihMLjoVLoWc+62a1U/7qVX5CpvTVF7rocSAKwv4cBVqZm7lLDS/qoXs4fMs/VQi6BtVbNA3uSzKpQfjH1o3x4LrvkOn40zhm6hjduDglzJUwA0POabgdXIndp9fzhOo23Pe+Rk9GSLX0d71Poqry8NQDTzNlsa+JTNG9+UrEf+ngxCjGEsDCc0bz+udVRyHQI1jmEO3S+IOQycEq7XwB6z3wfMfa73m8PVRp+iOgtZfeSBl01xn03vMaQJkyj7vnhGCklsCWVRUl4y+5oNUzQ63B2dbjDF3vikd/3RUMifPYnX5Glfuk2FsV/7RqjI9yKTbE8wJY+74p7qXO8+dIYgjtLD/N8TJtRh04N9tXJA4H59IkMmLElgvr0Q5OCeVfdAt+5hkh4pQgfRMHpL74XatLQpPiOyHRs/OdmHtBf8nOZcxVKzdGclIN16lE7kJ+pVMjspOI+5+TqLRO6m0ZpNXJoZRv9MPDRcAfJUtNZHyig/s2wwReakFgPPJwCQmu1I30/tcBbji+Na53i1W1N+BqoY7Zxo+U/M9XyJ4Ok2SSkBtoOrwuhAY3a03Eu6l8wFdIG1cN+e8hopTkiKF093KuH/BcB39rMiGDLn6XVhGKEaaT/vqb/lufuAdpGExevF1+J9itkFhCfymWr9vGb3BTK4j598zRH7+e+MU9maruZqb0pkGxRDRE1CD4Z8LV4vhgPidk5w2Bq816g3nHw1//j3JStz7NR9HIWELO8TMn3QrP/zZp//+Dv9p429/ogv+GATR+n/UdF+ns9xNkXZQJXY4t9jMkJNUFygAtzndXwjss+yWH9HAnLQQfhAskdZS2l01HLWv7L7us5uTH409pqitvfSOQg/c+Zt7k879P3K9+WV68n7+3cZfuRd/dDPP/03rn+d+/nBvWfgDlt8+LzjqJ/vx3CnNOwiXhho778C96iD+1TBvRZYeP+EH81LE0vVwOOrmCLB3iKzI1x+vJEsrPH4uF0UB4TJ4X3uDfOCo3PYpYe0MF4bouh0DQ/l43fxUF7Y+dpWuvTSffB0yO2UQUETI/LwCZE3BvnevJ7c9zUlY3H58xzke6DNFDQG8n0WtDN4LAYN4nogKav1ezOfK/z+t6tsCTp+dhx4ymjWuCJk1dEUifDP+HyS4iP/Vg9B2jTo9L4NbiBuDS4nuuHW6H+JDQn2JtqRKGkEQPEYE7uzazXIkcxIAqUq1esasZBETlEZY7y7Jo+RoV/IsjY9eIMkUvr42Hc0xqtsavZvhz1OLwSxMOTuqzlhb0WbdOwBH9EYiyBjatz40bUxTHbiWxqJ0uma19qhPruvcWJlbiSSH48OLDDpaHPszvyct41ZfTu10+vjox6kOqK6v0K/gEPphEvMl/vwSv+A4Hhm36JSP9IXTyCZDm4kKsqD5ay8b1Sad/vaiyO5N/sDfEV6Z4q95E+yfjxpqBoBETW2C7xl4pIO2bDODDFurUPwE7EWC2Uplq+AHmBHvir2PSgkR12/Ry65O0aZtQPeXi9mTlF/Wj5GQ+vFkYyhXsLTjrBSP9hwk4GPqDP5rBn5/l8b0mLRAvRSzXHc293bs3s8EsdE3m2exxidWVB4joHR+S+dz5/W+v00K3TqN14CDBth8eWcsTbiwXPsygHdGid0PEdy6HHm2v/IUuV5RVapYmzGsX90mpnIdNGcOOq64Dbc5GUbYpD9M7S+6cLY//QmjxFLP5cuTFRm3vA5rkFZroFnO3bjHF35uU3s8mvL7Tp9nyTc4mymTJ5sLIp7umSnGkO23faehtz3mmTS7fbVx5rP7x3HXIjRNeq/A3xCs9JNB08c9S9BF2O3bOur0ItslFxXgRPdaapBIi4dRpKGxVz7ir69t/bc9qTxjvtOyGOfiLGDhR4fYywHv1WdOplxIV87TpLBy3Wc0QP0P9s4G7FBNOdITS/tep3o3h1TEa5XDDii7fWtqRzUEReP2fbxz7bHWWJdbIOxOUJZtItNZpTFRfj6vm9sYjRxQVO+WTdiOhdPeTJ+8YirPvoeL88l5iLYOHd3b/Imkq+1ZN1El3UikhftuteEYxf1Wujof8Pr4ICTu5ezZyZ4tHQMxlzUHLYO2VMOoNMGL/20S5i2o2obfk+8qqdR7xzbRDbgU0lnuIgz4LelQ5XS7xbLuSQtNS95v3ZUOdaUx/Qd8qxCt6xf2E62yb/HukLO6RyorV8KgYl5YNc75y+KvefrxY+lc/64y9kvWP0a0bDz/rojq+RWjO06WeruWqNFU7r3HPIcLWRql8ICZsz2Ls/qOm/CLn6++X+Qf7mGspYCrZod/lpl6Rw4xN/yuq8gqV4B6aHk1hVE1SfILxWu5gvXqbfARYQpspcxKp1F/c8XOPzkZvmoSw+vEqBLdrq1fr3wAPv5NnM9i8F+jdAuxkP5Z71c6uhK3enlnGymr7UsWZKC12qgUiG8XXGQ9mxnqz4GSIlybF9eXmbqj2sHX+a1jf0gRoONHRdRSrIq03Ty89eQ1GbV/Bk+du4+V15zls+vvERvZ4E7ZbnxWTVjDjb4o/k8jlw44pTIrUGxxuJvBeO+heuhOjpFsO6lVJ/aXnJDa/bM0Ql1cLbXE/Pbv3EZ3vj3iVrB5irjupZTzlnv677NrI9UNYNqbPgp/HZXS+lJmk87wec+7YOxTDo2aw2l3NfDr34VNlvqWJBknuK7oSlZ6/T10zuOoPZOeoIk81N+sL843WJ2Q4Z0fZ3scsqC/JV2fuhWi1jGURSKZV637lf53Xnnx16/vKEXY89aVJ0fv91jGdfG+G4+sniwHes4hS+udOr4RfhFhG/F5gUG35QaU+McuLmclb5ZWmR+sG5V6nf+PxYzlrnFGxpZaK8eqqVo0NfmAWoGfXDiT/FnUbWvzGDOTr8aktOZWg4BYvz5YH12ZbfCcGtNk+dDAZNGWvHov+PIOnY9Prjg8h/wLRrT69suaMVZ5bNuK00lSVpnqSX1NON/81FoP92rYndionwgOiA8WMf4vc8l15KqEEG4yAm2+WAN5Brfu1sq9suWYqgoajgOYt/JCk1gC8wPkK+XKCtRX6TAtgvrnuBgNRmn6I8lVDipOVB9kX6Oxkp4ZKyd1M6Gj8/v2U7k+YQBL95Kb9PQENucJb0JlW3b5tObN7m/Z1j1ev388d7o15zgXsI9CikAGAViR6lkJv7nb4Ak40M2G8TJ447kN+pvfHiOFjSUSP6PM+QfbAywKJCBaxSVxpizHseZUyUBhq59vFwrkyGoRiHbo0apweEZeSLuNiQ+HAekOnarFg00dZNXaPeoHPTRR0FmEyqYExOVaaaO8c0uFUh7U4e/UxdBmthlBDgg257Q33j1hA7HTxSeTTSuVnPZbgW1nodwmG16aKBDKxEetv7D9OjO0JhrbJTnoe+kcGoDJazFSO8/fUN9Jy/g4XK5PUkw2dgPDGpJqBfhe7GA+cjzfE/EGsMM+FV9nj9IAhrSfT/J3QE5TEIYyk5UjsI6ZZcCPr6A8FZUF4g9nnpVmjX90MLSQysIPD0nFzqwCcSJmIb5mYv2Cmk+C1MDFkZQyCBq4c/Yai9LJ6xYkGS/x2s5/frIW2vmG2Wrv0APpCdgCA9snFvfpe8uc0OwdRs4G9973PGEBnQB5qKrCQ6m6X/H7NInZ7y/1674/ZXOVp7OeuCRk8JFS516VHrnH1HkIUIlTIljjHaQtEtkJtosYul77cVwjk3gW1Ajaa6zWeyHGLlpk3VHE2VFzT2yI/EvlGUSz2H9zYE1s4nsKMtMqNyKNtL/59CpFJki5Fou6VXGm8vWATEPwrUVOLvoA8jLuwOzVBCgHB2Cr5V6OwEWtJEKokJkfc87h+sNHTvMb0KVTp5284QTPupoWvQVUwUeogZR3kBMESYo0mfukewRVPKh5+rzLQb7HKjFFIgWhj1w3yN/qCNoPI8XFiUgBNT1hCHBsAz8L7Oyt8wQWUFj92ONn/APyJFg8hzueqoJdNj57ROrFbffuS/XxrSXLTRgj5uxZjpgQYceeMc2wJrahReSKpm3QjHfqExTLAB2ipVumE8pqcZv8LYXQiPHHsgb5BMW8zM5pvQit+mQx8XGaVDcfVbLyMTlY8xcfmm/RSAT/H09UQol5gIz7rESDmnrQ4bURIB4iRXMDQwxgex1GgtDxKp2HayIkR+E/aDmCttNm2C6lytWdfOVzD6X2SpDWjQDlMRvAp1symWv4my1bPCD+E1EmGnMGWhNwmycJnDV2WrQNxO45ukEb08AAffizYKVULp15I4vbNK5DzWwCSUADfmKhfGSUqii1L2UsE8rB7mLuHuUJZOx4+WiizHBJ/hwboaBzhpNOVvgFTf5cJsHef7L1HCI9dOUUbb+YxUJWn6dYOLz+THi91kzY5dtO5c+grX7v0jEbsuoOGnoIreDIg/sFMyG+TyCLIcAWd1IZ1UNFxE8Uie13ucm40U2fcxC0u3WLvLOxwu+F7MWUsHsdtFQZ7W+nlfCASiAKyh8rnP3EyDByvtJb6Kax6/HkLzT9SyEyTMVM1zPtM0MJY14DmsWh4MgD15Ea9Hd00AdkTZ0EiG5NAGuIBzQJJ0JR0na+OB7lQA6UKxMfihIQ7GCCnVz694QvykWXTxpS2soDu+smru1UdIxSvAszBFD1c8c6ZOobA8bJiJIvuycgIXBQIXWwhyTgZDQxJTRXgEwRNAawGSXO0a1DKjdihLVNp/taE/xYhsgwe+VpKEEB4LlraQyE84gEihxCnbfoyOuJIEXy2FIYw+JjRusybKlU2g/vhTSGTydvCvXhYBdtAXtS2v7LkHtmXh/8fly1do8FI/D0f8UbzVb5h+KRhMGSAmR2mhi0YG/uj7wgxcfzCrMvdjitUIpXDX8ae2JcF/36qUWIMwN6JsjaRGNj+jEteGDcFyTUb8X/NHSucKMJp7pduxtD6KuxVlyxxwaeiC1FbGBESO84lbyrAugYxdl+2N8/6AgWpo/IeoAOcsG35IA/b3AuSyoa55L7llBLlaWlEWvuCFd8f8NfcTUgzJv6CbB+6ohWwodlk9nGWFpBAOaz5uEW5xBvmjnHFeDsb0mXwayj3mdYq5gxxNf3H3/tnCgHwjSrpSgVxLmiTtuszdRUFIsn6LiMPjL808vL1uQhDbM7aA43mISXReqjSskynIRcHCJ9qeFopJfx9tqyUoGbSwJex/0aDE3plBPGtNBYgWbdLom3+Q/bjdizR2/AS/c/dH/d3G7pyl1qDXgtOFtEqidwLqxPYtrNEveasWq3vPUUtqTeu8gpov4bdOQRI2kneFvRNMrShyVeEupK1PoLDPMSfWMIJcs267mGB8X9CehQCF0gIyhpP10mbyM7lwW1e6TGvHBV1sg/UyTghHPGRqMyaebC6pbB1WKNCQtlai1GGvmq9zUKaUzLaXsXEBYtHxmFbEZ2kJhR164LhWW2Tlp1dhsGE7ZgIWRBOx3Zcu2DxgH+G83WTPceKG0TgQKKiiNNOlWgvqNEbnrk6fVD+AqRam2OguZb0YWSTX88N+i/ELSxbaUUpPx4vJUzYg/WonSeA8xUK6u7DPHgpqWpEe6D4cXg5uK9FIYVba47V/nb+wyOtk+zG8RrS4EA0ouwa04iByRLSvoJA2FzaobbZtXnq8GdbfqEp5I2dpfpj59TCVif6+E75p665faiX8gS213RqBxTZqfHP46nF6NSenOneuT+vgbLUbdTH2/t0REFXZJOEB6DHvx6N6g9956CYrY/AYcm9gELJXYkrSi+0F0geKDZgOCIYkLU/+GOW5aGj8mvLFgtFH5+XC8hvAE3CvHRfl4ofM/Qwk4x2A+R+nyc9gNu/9Tem7XW4XRnyRymf52z09cTOdr+PG6+P/Vb4QiXlwauc5WB1z3o+IJjlbxI8MyWtSzT+k4sKVbhF3xa+vDts3NxXa87iiu+xRH9cAprnOL2h6vV54iQRXuOAj1s8nLFK8gZ70ThIQcWdF19/2xaJmT0efrkNDkWbpAQPdo92Z8+Hn/aLjbOzB9AI/k12fPs9HhUNDJ1u6ax2VxD3R6PywN7BrLJ26z6s3QoMp76qzzwetrDABKSGkfW5PwS1GvYNUbK6uRqxfyVGNyFB0E+OugMM8kKwmJmupuRWO8XkXXXQECyRVw9UyIrtCtcc4oNqXqr7AURBmKn6Khz3eBN96LwIJrAGP9mr/59uTOSx631suyT+QujDd4beUFpZ0kJEEnjlP+X/Kr2kCKhnENTg4BsMTOmMqlj2WMFLRUlVG0fzdCBgUta9odrJfpVdFomTi6ak0tFjXTcdqqvWBAzjY6hVrH9sbt3Z9gn+AVDpTcQImefbB4edirjzrsNievve4ZT4EUZWV3TxEsIW+9MT/RJoKfZZYSRGfC1CwPG/9rdMOM8qR/LUYvw5f/emUSoD7YSFuOoqchdUg2UePd1eCtFSKgxLSZ764oy4lvRCIH6bowPxZWwxNFctksLeil47pfevcBipkkBIc4ngZG+kxGZ71a72KQ7VaZ6MZOZkQJZXM6kb/Ac0/XkJx8dvyfJcWbI3zONEaEPIW8GbkYjsZcwy+eMoKrYjDmvEEixHzkCSCRPRzhOfJZuLdcbx19EL23MA8rnjTZZ787FGMnkqnpuzB5/90w1gtUSRaWcb0eta8198VEeZMUSfIhyuc4/nywFQ9uqn7jdqXh+5wwv+RK9XouNPbYdoEelNGo34KyySwigsrfCe0v/PlWPvQvQg8R0KgHO18mTVThhQrlbEQ0Kp/JxPdjHyR7E1QPw/ut0r+HDDG7BwZFm9IqEUZRpv2WpzlMkOemeLcAt5CsrzskLGaVOAxyySzZV/D2EY7ydNZMf8e8VhHcKGHAWNszf1EOq8fNstijMY4JXyATwTdncFFqcNDfDo+mWFvxJJpc4sEZtjXyBdoFcxbUmniCoKq5jydUHNjYJxMqN1KzYV62MugcELVhS3Bnd+TLLOh7dws/zSXWzxEb4Nj4aFun5x4kDWLK5TUF/yCXB/cZYvI9kPgVsG2jShtXkxfgT+xzjJofXqPEnIXIQ1lnIdmVzBOM90EXvJUW6a0nZ/7XjJGl8ToO3H/fdxnxmTNKBZxnkpXLVgLXCZywGT3YyS75w/PAH5I/jMuRspej8xZObU9kREbRA+kqjmKRFaKGWAmFQspC+QLbKPf0RaK3OXvBSWqo46p70ws/eZpu6jCtZUgQy6r4tHMPUdAgWGGUYNbuv/1a6K+MVFsd3T183+T8capSo6m0+Sh57fEeG/95dykGJBQMj09DSW2bY0mUonDy9a8trLnnL5B5LW3Nl8rJZNysO8Zb+80zXxqUGFpud3Qzwb7bf+8mq6x0TAnJU9pDQR9YQmZhlna2xuxJt0aCO/f1SU8gblOrbIyMsxTlVUW69VJPzYU2HlRXcqE2lLLxnObZuz2tT9CivfTAUYfmzJlt/lOPgsR6VN64/xQd4Jlk/RV7UKVv2Gx/AWsmTAuCWKhdwC+4HmKEKYZh2Xis4KsUR1BeObs1c13wqFRnocdmuheaTV30gvVXZcouzHKK5zwrN52jXJEuX6dGx3BCpV/++4f3hyaW/cQJLFKqasjsMuO3B3WlMq2gyYfdK1e7L2pO/tRye2mwzwZPfdUMrl5wdLqdd2Kv/wVtnpyWYhd49L6rsOV+8HXPrWH2Kup89l2tz6bf80iYSd+V4LROSOHeamvexR524q4r43rTmtFzQvArpvWfLYFZrbFspBsXNUqqenjxNNsFXatZvlIhk7teUPfK+YL32F8McTnjv0BZNppb+vshoCrtLXjIWq3EJXpVXIlG6ZNL0dh6qEm2WMwDjD3LfOfkGh1/czYc/0qhiD2ozNnH4882MVVt3JbVFkbwowNCO3KL5IoYW5wlVeGCViOuv1svZx7FbzxKzA4zGqBlRRaRWCobXaVq4yYCWbZf8eiJwt3OY+MFiSJengcFP2t0JMfzOiJ7cECvpx7neg1Rc5x+7myPJOXt2FohVRyXtD+/rDoTOyGYInJelZMjolecVHUhUNqvdZWg2J2t0jPmiLFeRD/8fOT4o+NGILb+TufCo9ceBBm3JLVn+MO2675n7qiEX/6W+188cYg3Zn5NSTjgOKfWFSAANa6raCxSoVU851oJLY11WIoYK0du0ec5E4tCnAPoKh71riTsjVIp3gKvBbEYQiNYrmH22oLQWA2AdwMnID6PX9b58dR2QKo4qag1D1Z+L/FwEKTR7osOZPWECPJIHQqPUsM5i/CH5YupVPfFA5pHUBcsesh8eO5YhyWnaVRPZn/BmdXVumZWPxMP5e28zm2uqHgFoT9CymHYNNrzrrjlXZM06HnzDxYNlI5b/QosxLmmrqDFqmogQdqk0WLkUceoAvQxHgkIyvWU69BPFr24VB6+lx75Rna6dGtrmOxDnvBojvi1/4dHjVeg8owofPe1cOnxU1ioh016s/Vudv9mhV9f35At+Sh28h1bpp8xhr09+vf47Elx3Ms6hyp6QvB3t0vnLbOhwo660cp7K0vvepabK7YJfxEWWfrC2YzJfYOjygPwfwd/1amTqa0hZ5ueebhWYVMubRTwIjj+0Oq0ohU3zfRfuL8gt59XsHdwKtxTQQ4Y2qz6gisxnm2UdlmpEkgOsZz7iEk6QOt8BuPwr+NR01LTqXmJo1C76o1N274twJvl+I069TiLpenK/miRxhyY8jvYV6W1WuSwhH9q7kuwnJMtm7IWcqs7HsnyHSqWXLSpYtZGaR1V3t0gauninFPZGtWskF65rtti48UV9uV9KM8kfDYs0pgB00S+TlzTXV6P8mxq15b9En8sz3jWSszcifZa/NuufPNnNTb031pptt0+sRSH/7UG8pzbsgtt3OG3ut7B9JzDMt2mTZuyRNIV8D54TuTrpNcHtgmMlYJeiY9XS83NYJicjRjtJSf9BZLsQv629QdDsKQhTK5CnXhpk7vMNkHzPhm0ExW/VCGApHfPyBagtZQTQmPHx7g5IXXsrQDPzIVhv2LB6Ih138iSDww1JNHrDvzUxvp73MsQBVhW8EbrReaVUcLB1R3PUXyaYG4HpJUcLVxMgDxcPkVRQpL7VTAGabDzbKcvg12t5P8TSGQkrj/gOrpnbiDHwluA73xbXts/L7u468cRWSWRtgTwlQnA47EKg0OiZDgFxAKQQUcsbGomITgeXUAAyKe03eA7Mp4gnyKQmm0LXJtEk6ddksMJCuxDmmHzmVhO+XaN2A54MIh3niw5CF7PwiXFZrnA8wOdeHLvvhdoqIDG9PDI7UnWWHq526T8y6ixJPhkuVKZnoUruOpUgOOp3iIKBjk+yi1vHo5cItHXb1PIKzGaZlRS0g5d3MV2pD8FQdGYLZ73aae/eEIUePMc4NFz8pIUfLCrrF4jVWH5gQneN3S8vANBmUXrEcKGn6hIUN95y1vpsvLwbGpzV9L0ZKTan6TDXM05236uLJcIEMKVAxKNT0K8WljuwNny3BNQRfzovA85beI9zr1AGNYnYCVkR1aGngWURUrgqR+gRrQhxW81l3CHevjvGEPzPMTxdsIfB9dfGRbZU0cg/1mcubtECX4tvaedmNAvTxCJtc2QaoUalGfENCGK7IS/O8CRpdOVca8EWCRwv2sSWE8CJPW5PCugjCXPd3h6U60cPD+bdhtXZuYB6stcoveE7Sm5MM2yvfUHXFSW7KzLmi7/EeEWL0wqcOH9MOSKjhCHHmw+JGLcYE/7SBZQCRggox0ZZTAxrlzNNXYXL5fNIjkdT4YMqVUz6p8YDt049v4OXGdg3qTrtLBUXOZf7ahPlZAY/O+7Sp0bvGSHdyQ8B1LOsplqMb9Se8VAE7gIdSZvxbRSrfl+Lk5Qaqi5QJceqjitdErcHXg/3MryljPSIAMaaloFm1cVwBJ8DNmkDqoGROSHFetrgjQ5CahuKkdH5pRPigMrgTtlFI8ufJPJSUlGgTjbBSvpRc0zypiUn6U5KZqcRoyrtzhmJ7/caeZkmVRwJQeLOG8LY6vP5ChpKhc8Js0El+n6FXqbx9ItdtLtYP92kKfaTLtCi8StLZdENJa9Ex1nOoz1kQ7qxoiZFKRyLf4O4CHRT0T/0W9F8epNKVoeyxUXhy3sQMMsJjQJEyMOjmOhMFgOmmlscV4eFi1CldU92yjwleirEKPW3bPAuEhRZV7JsKV3Lr5cETAiFuX5Nw5UlF7d2HZ96Bh0sgFIL5KGaKSoVYVlvdKpZJVP5+NZ7xDEkQhmDgsDKciazJCXJ6ZN2B3FY2f6VZyGl/t4aunGIAk/BHaS+i+SpdRfnB/OktOvyjinWNfM9Ksr6WwtCa1hCmeRI6icpFM4o8quCLsikU0tMoZI/9EqXRMpKGaWzofl4nQuVQm17d5fU5qXCQeCDqVaL9XJ9qJ08n3G3EFZS28SHEb3cdRBdtO0YcTzil3QknNKEe/smQ1fTb0XbpyNB5xAeuIlf+5KWlEY0DqJbsnzJlQxJPOVyHiKMx5Xu9FcEv1Fbg6Fhm4t+Jyy5JC1W3YO8dYLsO0PXPbxodBgttTbH3rt9Cp1lJIk2r3O1Zqu94eRbnIz2f50lWolYzuKsj4PMok4abHLO8NAC884hiXx5Fy5pWKO0bWL7uEGXaJCtznhP67SlQ4xjWIfgq6EpZ28QMtuZK7JC0RGbl9nA4XtFLug/NLMoH1pGt9IonAJqcEDLyH6TDROcbsmGPaGIxMo41IUAnQVPMPGByp4mOmh9ZQMkBAcksUK55LsZj7E5z5XuZoyWCKu6nHmDq22xI/9Z8YdxJy4kWpD16jLVrpwGLWfyOD0Wd+cBzFBxVaGv7S5k9qwh/5t/LQEXsRqI3Q9Rm3QIoaZW9GlsDaKOUyykyWuhNOprSEi0s1G4rgoiX1V743EELti+pJu5og6X0g6oTynUqlhH9k6ezyRi05NGZHz0nvp3HOJr7ebrAUFrDjbkFBObEvdQWkkUbL0pEvMU46X58vF9j9F3j6kpyetNUBItrEubW9ZvMPM4qNqLlsSBJqOH3XbNwv/cXDXNxN8iFLzUhteisYY+RlHYOuP29/Cb+L+xv+35Rv7xudnZ6ohK4cMPfCG8KI7dNmjNk/H4e84pOxn/sZHK9psfvj8ncA8qJz7O8xqbxESDivGJOZzF7o5PJLQ7g34qAWoyuA+x3btU98LT6ZyGyceIXjrqob2CAVql4VOTQPUQYvHV/g4zAuCZGvYQBtf0wmd5lilrvuEn1BXLny01B4h4SMDlYsnNpm9d7m9h578ufpef9Z4WplqWQvqo52fyUA7J24eZD5av6SyGIV9kpmHNqyvdfzcpEMw97BvknV2fq+MFHun9BT3Lsf8pbzvisWiIQvYkng+8Vxk1V+dli1u56kY50LRjaPdotvT5BwqtwyF+emo/z9J3yVUVGfKrxQtJMOAQWoQii/4dp9wgybSa5mkucmRLtEQZ/pz0tL/NVcgWAd95nEQ3Tg6tNbuyn3Iepz65L3huMUUBntllWuu4DbtOFSMSbpILV4fy6wlM0SOvi6CpLh81c1LreIvKd61uEWBcDw1lUBUW1I0Z+m/PaRlX+PQ/oxg0Ye6KUiIiTF4ADNk59Ydpt5/rkxmq9tV5Kcp/eQLUVVmBzQNVuytQCP6Ezd0G8eLxWyHpmZWJ3bAzkWTtg4lZlw42SQezEmiUPaJUuR/qklVA/87S4ArFCpALdY3QRdUw3G3XbWUp6aq9z0zUizcPa7351p9JXOZyfdZBFnqt90VzQndXB/mwf8LC9STj5kenVpNuqOQQP3mIRJj7eV21FxG8VAxKrEn3c+XfmZ800EPb9/5lIlijscUbB6da0RQaMook0zug1G0tKi/JBC4rw7/D3m4ARzAkzMcVrDcT2SyFtUdWAsFlsPDFqV3N+EjyXaoEePwroaZCiLqEzb8MW+PNE9TmTC01EzWli51PzZvUqkmyuROU+V6ik+Le/9qT6nwzUzf9tP68tYei0YaDGx6kAd7jn1cKqOCuYbiELH9zYqcc4MnRJjkeGiqaGwLImhyeKs+xKJMBlOJ05ow9gGCKZ1VpnMKoSCTbMS+X+23y042zOb5MtcY/6oBeAo1Vy89OTyhpavFP78jXCcFH0t7Gx24hMEOm2gsEfGabVpQgvFqbQKMsknFRRmuPHcZu0Su/WMFphZvB2r/EGbG72rpGGho3h+Msz0uGzJ7hNK2uqQiE1qmn0zgacKYYZBCqsxV+sjbpoVdSilW/b94n2xNb648VmNIoizqEWhBnsen+d0kbCPmRItfWqSBeOd9Wne3c6bcd6uvXOJ6WdiSsuXq0ndhqrQ4QoWUjCjYtZ0EAhnSOP1m44xkf0O7jXghrzSJWxP4a/t72jU29Vu2rvu4n7HfHkkmQOMGSS+NPeLGO5I73mC2B7+lMiBQQZRM9/9liLIfowupUFAbPBbR+lxDM6M8Ptgh1paJq5Rvs7yEuLQv/7d1oU2woFSb3FMPWQOKMuCuJ7pDDjpIclus5TeEoMBy2YdVB4fxmesaCeMNsEgTHKS5WDSGyNUOoEpcC2OFWtIRf0w27ck34/DjxRTVIcc9+kqZE6iMSiVDsiKdP/Xz5XfEhm/sBhO50p1rvJDlkyyxuJ9SPgs7YeUJBjXdeAkE+P9OQJm6SZnn1svcduI78dYmbkE2mtziPrcjVisXG78spLvbZaSFx/Rks9zP4LKn0Cdz/3JsetkT06A8f/yCgMO6Mb1Hme0JJ7b2wZz1qleqTuKBGokhPVUZ0dVu+tnQYNEY1fmkZSz6+EGZ5EzL7657mreZGR3jUfaEk458PDniBzsSmBKhDRzfXameryJv9/D5m6HIqZ0R+ouCE54Dzp4IJuuD1e4Dc5i+PpSORJfG23uVgqixAMDvchMR0nZdH5brclYwRoJRWv/rlxGRI5ffD5NPGmIDt7vDE1434pYdVZIFh89Bs94HGGJbTwrN8T6lh1HZFTOB4lWzWj6EVqxSMvC0/ljWBQ3F2kc/mO2b6tWonT2JEqEwFts8rz2h+oWNds9ceR2cb7zZvJTDppHaEhK5avWqsseWa2Dt5BBhabdWSktS80oMQrL4TvAM9b5HMmyDnO+OkkbMXfUJG7eXqTIG6lqSOEbqVR+qYdP7uWb57WEJqzyh411GAVsDinPs7KvUeXItlcMdOUWzXBH6zscymV1LLVCtc8IePojzXHF9m5b5zGwBRdzcyUJkiu938ApmAayRdJrX1PmVguWUvt2ThQ62czItTyWJMW2An/hdDfMK7SiFQlGIdAbltHz3ycoh7j9V7GxNWBpbtcSdqm4XxRwTawc3cbZ+xfSv9qQfEkDKfZTwCkqWGI/ur250ItXlMlh6vUNWEYIg9A3GzbgmbqvTN8js2YMo87CU5y6nZ4dbJLDQJj9fc7yM7tZzJDZFtqOcU8+mZjYlq4VmifI23iHb1ZoT9E+kT2dolnP1AfiOkt7PQCSykBiXy5mv637IegWSKj9IKrYZf4Lu9+I7ub+mkRdlvYzehh/jaJ9n7HUH5b2IbgeNdkY7wx1yVzxS7pbvky6+nmVUtRllEFfweUQ0/nG017WoUYSxs+j2B4FV/F62EtHlMWZXYrjGHpthnNb1x66LKZ0Qe92INWHdfR/vqp02wMS8r1G4dJqHok8KmQ7947G13a4YXbsGgHcBvRuVu1eAi4/A5+ZixmdSXM73LupB/LH7O9yxLTVXJTyBbI1S49TIROrfVCOb/czZ9pM4JsZx8kUz8dQGv7gUWKxXvTH7QM/3J2OuXXgciUhqY+cgtaOliQQVOYthBLV3xpESZT3rmfEYNZxmpBbb24CRao86prn+i9TNOh8VxRJGXJfXHATJHs1T5txgc/opYrY8XjlGQQbRcoxIBcnVsMjmU1ymmIUL4dviJXndMAJ0Yet+c7O52/p98ytlmAsGBaTAmMhimAnvp1TWNGM9BpuitGj+t810CU2UhorrjPKGtThVC8WaXw04WFnT5fTjqmPyrQ0tN3CkLsctVy2xr0ZWgiWVZ1OrlFjjxJYsOiZv2cAoOvE+7sY0I/TwWcZqMoyIKNOftwP7w++Rfg67ljfovKYa50if3fzE/8aPYVey/Nq35+nH2sLPh/fP5TsylSKGOZ4k69d2PnH43+kq++sRXHQqGArWdwhx+hpwQC6JgT2uxehYU4Zbw7oNb6/HLikPyJROGK2ouyr+vzseESp9G50T4AyFrSqOQ0rroCYP4sMDFBrHn342EyZTMlSyk47rHSq89Y9/nI3zG5lX16Z5lxphguLOcZUndL8wNcrkyjH82jqg8Bo8OYkynrxZvbFno5lUS3OPr8Ko3mX9NoRPdYOKKjD07bvgFgpZ/RF+YzkWvJ/Hs/tUbfeGzGWLxNAjfDzHHMVSDwB5SabQLsIZHiBp43FjGkaienYoDd18hu2BGwOK7U3o70K/WY/kuuKdmdrykIBUdG2mvE91L1JtTbh20mOLbk1vCAamu7utlXeGU2ooVikbU/actcgmsC1FKk2qmj3GWeIWbj4tGIxE7BLcBWUvvcnd/lYxsMV4F917fWeFB/XbINN3qGvIyTpCalz1lVewdIGqeAS/gB8Mi+sA+BqDiX3VGD2eUunTRbSY+AuDy4E3Qx3hAhwnSXX+B0zuj3eQ1miS8Vux2z/l6/BkWtjKGU72aJkOCWhGcSf3+kFkkB15vGOsQrSdFr6qTj0gBYiOlnBO41170gOWHSUoBVRU2JjwppYdhIFDfu7tIRHccSNM5KZOFDPz0TGMAjzzEpeLwTWp+kn201kU6NjbiMQJx83+LX1e1tZ10kuChJZ/XBUQ1dwaBHjTDJDqOympEk8X2M3VtVw21JksChA8w1tTefO3RJ1FMbqZ01bHHkudDB/OhLfe7P5GOHaI28ZXKTMuqo0hLWQ4HabBsGG7NbP1RiXtETz074er6w/OerJWEqjmkq2y51q1BVI+JUudnVa3ogBpzdhFE7fC7kybrAt2Z6RqDjATAUEYeYK45WMupBKQRtQlU+uNsjnzj6ZmGrezA+ASrWxQ6LMkHRXqXwNq7ftv28dUx/ZSJciDXP2SWJsWaN0FjPX9Yko6LobZ7aYW/IdUktI9apTLyHS8DyWPyuoZyxN1TK/vtfxk3HwWh6JczZC8Ftn0bIJay2g+n5wd7lm9rEsKO+svqVmi+c1j88hSCxbzrg4+HEP0Nt1/B6YW1XVm09T1CpAKjc9n18hjqsaFGdfyva1ZG0Xu3ip6N6JGpyTSqY5h4BOlpLPaOnyw45PdXTN+DtAKg7DLrLFTnWusoSBHk3s0d7YouJHq85/R09Tfc37ENXZF48eAYLnq9GLioNcwDZrC6FW6godB8JnqYUPvn0pWLfQz0lM0Yy8Mybgn84Ds3Q9bDP10bLyOV+qzxa4Rd9Dhu7cju8mMaONXK3UqmBQ9qIg7etIwEqM/kECk/Dzja4Bs1xR+Q/tCbc8IKrSGsTdJJ0vge7IG20W687uVmK6icWQ6cD3lwFzgNMGtFvO5qyJeKflGLAAcQZOrkxVwy3cWvqlGpvjmf9Qe6Ap20MPbV92DPV0OhFM4kz8Yr0ffC2zLWSQ1kqY6QdQrttR3kh1YLtQd1kCEv5hVoPIRWl5ERcUTttBIrWp6Xs5Ehh5OUUwI5aEBvuiDmUoENmnVw1FohCrbRp1A1E+XSlWVOTi7ADW+5Ohb9z1vK4qx5R5lPdGCPBJZ00mC+Ssp8VUbgpGAvXWMuWQQRbCqI6Rr2jtxZxtfP7W/8onz+yz0Gs76LaT5HX9ecyiZCB/ZR/gFtMxPsDwohoeCRtiuLxE1GM1vUEUgBv86+eehL58/P56QFGQ/MqOe/vC76L63jzmeax4exd/OKTUvkXg+fOJUHych9xt/9goJMrapSgvXrj8+8vk/N80f22Sewj6cyGqt1B6mztoeklVHHraouhvHJaG/OuBz6DHKMpFmQULU1bRWlyYE0RPXYYkUycIemN7TLtgNCJX6BqdyxDKkegO7nJK5xQ7OVYDZTMf9bVHidtk6DQX9Et+V9M7esgbsYBdEeUpsB0Xvw2kd9+rI7V+m47u+O/tq7mw7262HU1WlS9uFzsV6JxIHNmUCy0QS9e077JGRFbG65z3/dOKB/Zk+yDdKpUmdXjn/aS3N5nv4fK7bMHHmPlHd4E2+iTbV5rpzScRnxk6KARuDTJ8Q1LpK2mP8gj1EbuJ9RIyY+EWK4hCiIDBAS1Tm2IEXAFfgKPgdL9O6mAa06wjCcUAL6EsxPQWO9VNegBPm/0GgkZbDxCynxujX/92vmGcjZRMAY45puak2sFLCLSwXpEsyy5fnF0jGJBhm+fNSHKKUUfy+276A7/feLOFxxUuHRNJI2Osenxyvf8DAGObT60pfTTlhEg9u/KKkhJqm5U1/+BEcSkpFDA5XeCqxwXmPac1jcuZ3JWQ+p0NdWzb/5v1ZvF8GtMTFFEdQjpLO0bwPb0BHNWnip3liDXI2fXf05jjvfJ0NpjLCUgfTh9CMFYVFKEd4Z/OG/2C+N435mnK+9t1gvCiVcaaH7rK4+PjCvpVNiz+t2QyqH1O8x3JKZVl6Q+Lp/XK8wMjVMslOq9FdSw5FtUs/CptXH9PW+wbWHgrV17R5jTVOtGtKFu3nb80T+E0tv9QkzW3J2dbaw/8ddAKZ0pxIaEqLjlPrji3VgJ3GvdFvlqD8075woxh4fVt0JZE0KVFsAvqhe0dqN9b35jtSpnYMXkU+vZq+IAHad3IHc2s/LYrnD1anfG46IFiMIr9oNbZDWvwthqYNqOigaKd/XlLU4XHfk/PXIjPsLy/9/kAtQ+/wKH+hI/IROWj5FPvTZAT9f7j4ZXQyG4M0TujMAFXYkKvEHv1xhySekgXGGqNxWeWKlf8dDAlLuB1cb/qOD+rk7cmwt+1yKpk9cudqBanTi6zTbXRtV8qylNtjyOVKy1HTz0GW9rjt6sSjAZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg="},{}],6:[function(e,t,n){var r=e("./dictionary-browser");n.init=function(){n.dictionary=r.init()},n.offsetsByLength=new Uint32Array([0,0,0,0,0,4096,9216,21504,35840,44032,53248,63488,74752,87040,93696,100864,104704,106752,108928,113536,115968,118528,119872,121280,122016]),n.sizeBitsByLength=new Uint8Array([0,0,0,0,10,10,11,11,10,10,10,10,10,9,9,8,7,7,8,7,7,6,6,5,5]),n.minDictionaryWordLength=4,n.maxDictionaryWordLength=24},{"./dictionary-browser":4}],7:[function(e,t,n){function r(e,t){this.bits=e,this.value=t}n.HuffmanCode=r;var a=15;function s(e,t){for(var n=1<<t-1;e&n;)n>>=1;return(e&n-1)+n}function i(e,t,n,a,s){do{e[t+(a-=n)]=new r(s.bits,s.value)}while(a>0)}function o(e,t,n){for(var r=1<<t-n;t<a&&!((r-=e[t])<=0);)++t,r<<=1;return t-n}n.BrotliBuildHuffmanTable=function(e,t,n,l,c){var u,d,m,p,h,f,g,y,v,_,b=t,E=new Int32Array(a+1),w=new Int32Array(a+1);for(_=new Int32Array(c),d=0;d<c;d++)E[l[d]]++;for(w[1]=0,u=1;u<a;u++)w[u+1]=w[u]+E[u];for(d=0;d<c;d++)0!==l[d]&&(_[w[l[d]]++]=d);if(v=y=1<<(g=n),1===w[a]){for(m=0;m<v;++m)e[t+m]=new r(0,65535&_[0]);return v}for(m=0,d=0,u=1,p=2;u<=n;++u,p<<=1)for(;E[u]>0;--E[u])i(e,t+m,p,y,new r(255&u,65535&_[d++])),m=s(m,u);for(f=v-1,h=-1,u=n+1,p=2;u<=a;++u,p<<=1)for(;E[u]>0;--E[u])(m&f)!==h&&(t+=y,v+=y=1<<(g=o(E,u,n)),e[b+(h=m&f)]=new r(g+n&255,t-b-h&65535)),i(e,t+(m>>n),p,y,new r(u-n&255,65535&_[d++])),m=s(m,u);return v}},{}],8:[function(e,t,n){"use strict";n.byteLength=u,n.toByteArray=m,n.fromByteArray=f;for(var r=[],a=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=i.length;o<l;++o)r[o]=i[o],a[i.charCodeAt(o)]=o;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r}function d(e,t,n){return 3*(t+n)/4-n}function m(e){for(var t,n=c(e),r=n[0],i=n[1],o=new s(d(e,r,i)),l=0,u=i>0?r-4:r,m=0;m<u;m+=4)t=a[e.charCodeAt(m)]<<18|a[e.charCodeAt(m+1)]<<12|a[e.charCodeAt(m+2)]<<6|a[e.charCodeAt(m+3)],o[l++]=t>>16&255,o[l++]=t>>8&255,o[l++]=255&t;return 2===i&&(t=a[e.charCodeAt(m)]<<2|a[e.charCodeAt(m+1)]>>4,o[l++]=255&t),1===i&&(t=a[e.charCodeAt(m)]<<10|a[e.charCodeAt(m+1)]<<4|a[e.charCodeAt(m+2)]>>2,o[l++]=t>>8&255,o[l++]=255&t),o}function p(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function h(e,t,n){for(var r,a=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(p(r));return a.join("")}function f(e){for(var t,n=e.length,a=n%3,s=[],i=16383,o=0,l=n-a;o<l;o+=i)s.push(h(e,o,o+i>l?l:o+i));return 1===a?(t=e[n-1],s.push(r[t>>2]+r[t<<4&63]+"==")):2===a&&(t=(e[n-2]<<8)+e[n-1],s.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),s.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},{}],9:[function(e,t,n){function r(e,t){this.offset=e,this.nbits=t}n.kBlockLengthPrefixCode=[new r(1,2),new r(5,2),new r(9,2),new r(13,2),new r(17,3),new r(25,3),new r(33,3),new r(41,3),new r(49,4),new r(65,4),new r(81,4),new r(97,4),new r(113,5),new r(145,5),new r(177,5),new r(209,5),new r(241,6),new r(305,6),new r(369,7),new r(497,8),new r(753,9),new r(1265,10),new r(2289,11),new r(4337,12),new r(8433,13),new r(16625,24)],n.kInsertLengthPrefixCode=[new r(0,0),new r(1,0),new r(2,0),new r(3,0),new r(4,0),new r(5,0),new r(6,1),new r(8,1),new r(10,2),new r(14,2),new r(18,3),new r(26,3),new r(34,4),new r(50,4),new r(66,5),new r(98,5),new r(130,6),new r(194,7),new r(322,8),new r(578,9),new r(1090,10),new r(2114,12),new r(6210,14),new r(22594,24)],n.kCopyLengthPrefixCode=[new r(2,0),new r(3,0),new r(4,0),new r(5,0),new r(6,0),new r(7,0),new r(8,0),new r(9,0),new r(10,1),new r(12,1),new r(14,2),new r(18,2),new r(22,3),new r(30,3),new r(38,4),new r(54,4),new r(70,5),new r(102,5),new r(134,6),new r(198,7),new r(326,8),new r(582,9),new r(1094,10),new r(2118,24)],n.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],n.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},{}],10:[function(e,t,n){function r(e){this.buffer=e,this.pos=0}function a(e){this.buffer=e,this.pos=0}r.prototype.read=function(e,t,n){this.pos+n>this.buffer.length&&(n=this.buffer.length-this.pos);for(var r=0;r<n;r++)e[t+r]=this.buffer[this.pos+r];return this.pos+=n,n},n.BrotliInput=r,a.prototype.write=function(e,t){if(this.pos+t>this.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(e.subarray(0,t),this.pos),this.pos+=t,t},n.BrotliOutput=a},{}],11:[function(e,t,n){var r=e("./dictionary"),a=0,s=1,i=2,o=3,l=4,c=5,u=6,d=7,m=8,p=9,h=10,f=11,g=12,y=13,v=14,_=15,b=16,E=17,w=18,S=20;function x(e,t,n){this.prefix=new Uint8Array(e.length),this.transform=t,this.suffix=new Uint8Array(n.length);for(var r=0;r<e.length;r++)this.prefix[r]=e.charCodeAt(r);for(r=0;r<n.length;r++)this.suffix[r]=n.charCodeAt(r)}var C=[new x("",a,""),new x("",a," "),new x(" ",a," "),new x("",g,""),new x("",h," "),new x("",a," the "),new x(" ",a,""),new x("s ",a," "),new x("",a," of "),new x("",h,""),new x("",a," and "),new x("",y,""),new x("",s,""),new x(", ",a," "),new x("",a,", "),new x(" ",h," "),new x("",a," in "),new x("",a," to "),new x("e ",a," "),new x("",a,'"'),new x("",a,"."),new x("",a,'">'),new x("",a,"\n"),new x("",o,""),new x("",a,"]"),new x("",a," for "),new x("",v,""),new x("",i,""),new x("",a," a "),new x("",a," that "),new x(" ",h,""),new x("",a,". "),new x(".",a,""),new x(" ",a,", "),new x("",_,""),new x("",a," with "),new x("",a,"'"),new x("",a," from "),new x("",a," by "),new x("",b,""),new x("",E,""),new x(" the ",a,""),new x("",l,""),new x("",a,". The "),new x("",f,""),new x("",a," on "),new x("",a," as "),new x("",a," is "),new x("",d,""),new x("",s,"ing "),new x("",a,"\n\t"),new x("",a,":"),new x(" ",a,". "),new x("",a,"ed "),new x("",S,""),new x("",w,""),new x("",u,""),new x("",a,"("),new x("",h,", "),new x("",m,""),new x("",a," at "),new x("",a,"ly "),new x(" the ",a," of "),new x("",c,""),new x("",p,""),new x(" ",h,", "),new x("",h,'"'),new x(".",a,"("),new x("",f," "),new x("",h,'">'),new x("",a,'="'),new x(" ",a,"."),new x(".com/",a,""),new x(" the ",a," of the "),new x("",h,"'"),new x("",a,". This "),new x("",a,","),new x(".",a," "),new x("",h,"("),new x("",h,"."),new x("",a," not "),new x(" ",a,'="'),new x("",a,"er "),new x(" ",f," "),new x("",a,"al "),new x(" ",f,""),new x("",a,"='"),new x("",f,'"'),new x("",h,". "),new x(" ",a,"("),new x("",a,"ful "),new x(" ",h,". "),new x("",a,"ive "),new x("",a,"less "),new x("",f,"'"),new x("",a,"est "),new x(" ",h,"."),new x("",f,'">'),new x(" ",a,"='"),new x("",h,","),new x("",a,"ize "),new x("",f,"."),new x(" ",a,""),new x(" ",a,","),new x("",h,'="'),new x("",f,'="'),new x("",a,"ous "),new x("",f,", "),new x("",h,"='"),new x(" ",h,","),new x(" ",f,'="'),new x(" ",f,", "),new x("",f,","),new x("",f,"("),new x("",f,". "),new x(" ",f,"."),new x("",f,"='"),new x(" ",f,". "),new x(" ",h,'="'),new x(" ",f,"='"),new x(" ",h,"='")];function k(e,t){return e[t]<192?(e[t]>=97&&e[t]<=122&&(e[t]^=32),1):e[t]<224?(e[t+1]^=32,2):(e[t+2]^=5,3)}n.kTransforms=C,n.kNumTransforms=C.length,n.transformDictionaryWord=function(e,t,n,a,s){var i,o=C[s].prefix,l=C[s].suffix,c=C[s].transform,u=c<g?0:c-(g-1),d=0,m=t;u>a&&(u=a);for(var y=0;y<o.length;)e[t++]=o[y++];for(n+=u,a-=u,c<=p&&(a-=c),d=0;d<a;d++)e[t++]=r.dictionary[n+d];if(i=t-a,c===h)k(e,i);else if(c===f)for(;a>0;){var v=k(e,i);i+=v,a-=v}for(var _=0;_<l.length;)e[t++]=l[_++];return t-m}},{"./dictionary":6}],12:[function(e,t,n){t.exports=e("./dec/decode").BrotliDecompressBuffer},{"./dec/decode":3}]},{},[12])(12)},4306:function(e,t){var n,r,a;
+(()=>{var e,t,n={4660:e=>{e.exports=function(){function e(t,n,r){function a(i,o){if(!n[i]){if(!t[i]){if(s)return s(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[i]={exports:{}};t[i][0].call(c.exports,(function(e){return a(t[i][1][e]||e)}),c,c.exports,e,t,n,r)}return n[i].exports}for(var s=void 0,i=0;i<r.length;i++)a(r[i]);return a}return e}()({1:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)a(n,r)&&(e[r]=n[r])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var s={arraySet:function(e,t,n,r,a){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),a);else for(var s=0;s<r;s++)e[a+s]=t[n+s]},flattenChunks:function(e){var t,n,r,a,s,i;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(i=new Uint8Array(r),a=0,t=0,n=e.length;t<n;t++)s=e[t],i.set(s,a),a+=s.length;return i}},i={arraySet:function(e,t,n,r,a){for(var s=0;s<r;s++)e[a+s]=t[n+s]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,s)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,i))},n.setTyped(r)},{}],2:[function(e,t,n){"use strict";var r=e("./common"),a=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(e){a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){s=!1}for(var i=new r.Buf8(256),o=0;o<256;o++)i[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&s||!e.subarray&&a))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",i=0;i<t;i++)n+=String.fromCharCode(e[i]);return n}i[254]=i[254]=1,n.string2buf=function(e){var t,n,a,s,i,o=e.length,l=0;for(s=0;s<o;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(a=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(a-56320),s++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(l),i=0,s=0;i<l;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(a=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(a-56320),s++),n<128?t[i++]=n:n<2048?(t[i++]=192|n>>>6,t[i++]=128|63&n):n<65536?(t[i++]=224|n>>>12,t[i++]=128|n>>>6&63,t[i++]=128|63&n):(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63,t[i++]=128|n>>>6&63,t[i++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,a=t.length;n<a;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,r,a,s,o=t||e.length,c=new Array(2*o);for(r=0,n=0;n<o;)if((a=e[n++])<128)c[r++]=a;else if((s=i[a])>4)c[r++]=65533,n+=s-1;else{for(a&=2===s?31:3===s?15:7;s>1&&n<o;)a=a<<6|63&e[n++],s--;s>1?c[r++]=65533:a<65536?c[r++]=a:(a-=65536,c[r++]=55296|a>>10&1023,c[r++]=56320|1023&a)}return l(c,r)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+i[e[n]]>t?n:t}},{"./common":1}],3:[function(e,t,n){"use strict";function r(e,t,n,r){for(var a=65535&e|0,s=e>>>16&65535|0,i=0;0!==n;){n-=i=n>2e3?2e3:n;do{s=s+(a=a+t[r++]|0)|0}while(--i);a%=65521,s%=65521}return a|s<<16|0}t.exports=r},{}],4:[function(e,t,n){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,n){"use strict";function r(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}var a=r();function s(e,t,n,r){var s=a,i=r+n;e^=-1;for(var o=r;o<i;o++)e=e>>>8^s[255&(e^t[o])];return-1^e}t.exports=s},{}],6:[function(e,t,n){"use strict";function r(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}t.exports=r},{}],7:[function(e,t,n){"use strict";var r=30,a=12;t.exports=function(e,t){var n,s,i,o,l,c,u,d,m,p,h,f,g,y,v,b,_,E,w,S,x,C,k,T,P;n=e.state,s=e.next_in,T=e.input,i=s+(e.avail_in-5),o=e.next_out,P=e.output,l=o-(t-e.avail_out),c=o+(e.avail_out-257),u=n.dmax,d=n.wsize,m=n.whave,p=n.wnext,h=n.window,f=n.hold,g=n.bits,y=n.lencode,v=n.distcode,b=(1<<n.lenbits)-1,_=(1<<n.distbits)-1;e:do{g<15&&(f+=T[s++]<<g,g+=8,f+=T[s++]<<g,g+=8),E=y[f&b];t:for(;;){if(f>>>=w=E>>>24,g-=w,0==(w=E>>>16&255))P[o++]=65535&E;else{if(!(16&w)){if(0==(64&w)){E=y[(65535&E)+(f&(1<<w)-1)];continue t}if(32&w){n.mode=a;break e}e.msg="invalid literal/length code",n.mode=r;break e}S=65535&E,(w&=15)&&(g<w&&(f+=T[s++]<<g,g+=8),S+=f&(1<<w)-1,f>>>=w,g-=w),g<15&&(f+=T[s++]<<g,g+=8,f+=T[s++]<<g,g+=8),E=v[f&_];n:for(;;){if(f>>>=w=E>>>24,g-=w,!(16&(w=E>>>16&255))){if(0==(64&w)){E=v[(65535&E)+(f&(1<<w)-1)];continue n}e.msg="invalid distance code",n.mode=r;break e}if(x=65535&E,g<(w&=15)&&(f+=T[s++]<<g,(g+=8)<w&&(f+=T[s++]<<g,g+=8)),(x+=f&(1<<w)-1)>u){e.msg="invalid distance too far back",n.mode=r;break e}if(f>>>=w,g-=w,x>(w=o-l)){if((w=x-w)>m&&n.sane){e.msg="invalid distance too far back",n.mode=r;break e}if(C=0,k=h,0===p){if(C+=d-w,w<S){S-=w;do{P[o++]=h[C++]}while(--w);C=o-x,k=P}}else if(p<w){if(C+=d+p-w,(w-=p)<S){S-=w;do{P[o++]=h[C++]}while(--w);if(C=0,p<S){S-=w=p;do{P[o++]=h[C++]}while(--w);C=o-x,k=P}}}else if(C+=p-w,w<S){S-=w;do{P[o++]=h[C++]}while(--w);C=o-x,k=P}for(;S>2;)P[o++]=k[C++],P[o++]=k[C++],P[o++]=k[C++],S-=3;S&&(P[o++]=k[C++],S>1&&(P[o++]=k[C++]))}else{C=o-x;do{P[o++]=P[C++],P[o++]=P[C++],P[o++]=P[C++],S-=3}while(S>2);S&&(P[o++]=P[C++],S>1&&(P[o++]=P[C++]))}break}}break}}while(s<i&&o<c);s-=S=g>>3,f&=(1<<(g-=S<<3))-1,e.next_in=s,e.next_out=o,e.avail_in=s<i?i-s+5:5-(s-i),e.avail_out=o<c?c-o+257:257-(o-c),n.hold=f,n.bits=g}},{}],8:[function(e,t,n){"use strict";var r=e("../utils/common"),a=e("./adler32"),s=e("./crc32"),i=e("./inffast"),o=e("./inftrees"),l=0,c=1,u=2,d=4,m=5,p=6,h=0,f=1,g=2,y=-2,v=-3,b=-4,_=-5,E=8,w=1,S=2,x=3,C=4,k=5,T=6,P=7,I=8,M=9,A=10,O=11,N=12,F=13,R=14,D=15,V=16,L=17,B=18,z=19,H=20,G=21,U=22,W=23,j=24,Z=25,q=26,Y=27,K=28,X=29,J=30,Q=31,$=852,ee=592,te=15;function ne(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function re(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ae(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=w,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32($),t.distcode=t.distdyn=new r.Buf32(ee),t.sane=1,t.back=-1,h):y}function se(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,ae(e)):y}function ie(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?y:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,se(e))):y}function oe(e,t){var n,r;return e?(r=new re,e.state=r,r.window=null,(n=ie(e,t))!==h&&(e.state=null),n):y}function le(e){return oe(e,te)}var ce,ue,de=!0;function me(e){if(de){var t;for(ce=new r.Buf32(512),ue=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(o(c,e.lens,0,288,ce,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;o(u,e.lens,0,32,ue,0,e.work,{bits:5}),de=!1}e.lencode=ce,e.lenbits=9,e.distcode=ue,e.distbits=5}function pe(e,t,n,a){var s,i=e.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new r.Buf8(i.wsize)),a>=i.wsize?(r.arraySet(i.window,t,n-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):((s=i.wsize-i.wnext)>a&&(s=a),r.arraySet(i.window,t,n-a,s,i.wnext),(a-=s)?(r.arraySet(i.window,t,n-a,a,0),i.wnext=a,i.whave=i.wsize):(i.wnext+=s,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=s))),0}function he(e,t){var n,$,ee,te,re,ae,se,ie,oe,le,ce,ue,de,he,fe,ge,ye,ve,be,_e,Ee,we,Se,xe,Ce=0,ke=new r.Buf8(4),Te=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return y;(n=e.state).mode===N&&(n.mode=F),re=e.next_out,ee=e.output,se=e.avail_out,te=e.next_in,$=e.input,ae=e.avail_in,ie=n.hold,oe=n.bits,le=ae,ce=se,we=h;e:for(;;)switch(n.mode){case w:if(0===n.wrap){n.mode=F;break}for(;oe<16;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if(2&n.wrap&&35615===ie){n.check=0,ke[0]=255&ie,ke[1]=ie>>>8&255,n.check=s(n.check,ke,2,0),ie=0,oe=0,n.mode=S;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&ie)<<8)+(ie>>8))%31){e.msg="incorrect header check",n.mode=J;break}if((15&ie)!==E){e.msg="unknown compression method",n.mode=J;break}if(oe-=4,Ee=8+(15&(ie>>>=4)),0===n.wbits)n.wbits=Ee;else if(Ee>n.wbits){e.msg="invalid window size",n.mode=J;break}n.dmax=1<<Ee,e.adler=n.check=1,n.mode=512&ie?A:N,ie=0,oe=0;break;case S:for(;oe<16;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if(n.flags=ie,(255&n.flags)!==E){e.msg="unknown compression method",n.mode=J;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=J;break}n.head&&(n.head.text=ie>>8&1),512&n.flags&&(ke[0]=255&ie,ke[1]=ie>>>8&255,n.check=s(n.check,ke,2,0)),ie=0,oe=0,n.mode=x;case x:for(;oe<32;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}n.head&&(n.head.time=ie),512&n.flags&&(ke[0]=255&ie,ke[1]=ie>>>8&255,ke[2]=ie>>>16&255,ke[3]=ie>>>24&255,n.check=s(n.check,ke,4,0)),ie=0,oe=0,n.mode=C;case C:for(;oe<16;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}n.head&&(n.head.xflags=255&ie,n.head.os=ie>>8),512&n.flags&&(ke[0]=255&ie,ke[1]=ie>>>8&255,n.check=s(n.check,ke,2,0)),ie=0,oe=0,n.mode=k;case k:if(1024&n.flags){for(;oe<16;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}n.length=ie,n.head&&(n.head.extra_len=ie),512&n.flags&&(ke[0]=255&ie,ke[1]=ie>>>8&255,n.check=s(n.check,ke,2,0)),ie=0,oe=0}else n.head&&(n.head.extra=null);n.mode=T;case T:if(1024&n.flags&&((ue=n.length)>ae&&(ue=ae),ue&&(n.head&&(Ee=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,$,te,ue,Ee)),512&n.flags&&(n.check=s(n.check,$,ue,te)),ae-=ue,te+=ue,n.length-=ue),n.length))break e;n.length=0,n.mode=P;case P:if(2048&n.flags){if(0===ae)break e;ue=0;do{Ee=$[te+ue++],n.head&&Ee&&n.length<65536&&(n.head.name+=String.fromCharCode(Ee))}while(Ee&&ue<ae);if(512&n.flags&&(n.check=s(n.check,$,ue,te)),ae-=ue,te+=ue,Ee)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=I;case I:if(4096&n.flags){if(0===ae)break e;ue=0;do{Ee=$[te+ue++],n.head&&Ee&&n.length<65536&&(n.head.comment+=String.fromCharCode(Ee))}while(Ee&&ue<ae);if(512&n.flags&&(n.check=s(n.check,$,ue,te)),ae-=ue,te+=ue,Ee)break e}else n.head&&(n.head.comment=null);n.mode=M;case M:if(512&n.flags){for(;oe<16;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if(ie!==(65535&n.check)){e.msg="header crc mismatch",n.mode=J;break}ie=0,oe=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=N;break;case A:for(;oe<32;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}e.adler=n.check=ne(ie),ie=0,oe=0,n.mode=O;case O:if(0===n.havedict)return e.next_out=re,e.avail_out=se,e.next_in=te,e.avail_in=ae,n.hold=ie,n.bits=oe,g;e.adler=n.check=1,n.mode=N;case N:if(t===m||t===p)break e;case F:if(n.last){ie>>>=7&oe,oe-=7&oe,n.mode=Y;break}for(;oe<3;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}switch(n.last=1&ie,oe-=1,3&(ie>>>=1)){case 0:n.mode=R;break;case 1:if(me(n),n.mode=H,t===p){ie>>>=2,oe-=2;break e}break;case 2:n.mode=L;break;case 3:e.msg="invalid block type",n.mode=J}ie>>>=2,oe-=2;break;case R:for(ie>>>=7&oe,oe-=7&oe;oe<32;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if((65535&ie)!=(ie>>>16^65535)){e.msg="invalid stored block lengths",n.mode=J;break}if(n.length=65535&ie,ie=0,oe=0,n.mode=D,t===p)break e;case D:n.mode=V;case V:if(ue=n.length){if(ue>ae&&(ue=ae),ue>se&&(ue=se),0===ue)break e;r.arraySet(ee,$,te,ue,re),ae-=ue,te+=ue,se-=ue,re+=ue,n.length-=ue;break}n.mode=N;break;case L:for(;oe<14;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if(n.nlen=257+(31&ie),ie>>>=5,oe-=5,n.ndist=1+(31&ie),ie>>>=5,oe-=5,n.ncode=4+(15&ie),ie>>>=4,oe-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=J;break}n.have=0,n.mode=B;case B:for(;n.have<n.ncode;){for(;oe<3;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}n.lens[Te[n.have++]]=7&ie,ie>>>=3,oe-=3}for(;n.have<19;)n.lens[Te[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Se={bits:n.lenbits},we=o(l,n.lens,0,19,n.lencode,0,n.work,Se),n.lenbits=Se.bits,we){e.msg="invalid code lengths set",n.mode=J;break}n.have=0,n.mode=z;case z:for(;n.have<n.nlen+n.ndist;){for(;ge=(Ce=n.lencode[ie&(1<<n.lenbits)-1])>>>16&255,ye=65535&Ce,!((fe=Ce>>>24)<=oe);){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if(ye<16)ie>>>=fe,oe-=fe,n.lens[n.have++]=ye;else{if(16===ye){for(xe=fe+2;oe<xe;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if(ie>>>=fe,oe-=fe,0===n.have){e.msg="invalid bit length repeat",n.mode=J;break}Ee=n.lens[n.have-1],ue=3+(3&ie),ie>>>=2,oe-=2}else if(17===ye){for(xe=fe+3;oe<xe;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}oe-=fe,Ee=0,ue=3+(7&(ie>>>=fe)),ie>>>=3,oe-=3}else{for(xe=fe+7;oe<xe;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}oe-=fe,Ee=0,ue=11+(127&(ie>>>=fe)),ie>>>=7,oe-=7}if(n.have+ue>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=J;break}for(;ue--;)n.lens[n.have++]=Ee}}if(n.mode===J)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=J;break}if(n.lenbits=9,Se={bits:n.lenbits},we=o(c,n.lens,0,n.nlen,n.lencode,0,n.work,Se),n.lenbits=Se.bits,we){e.msg="invalid literal/lengths set",n.mode=J;break}if(n.distbits=6,n.distcode=n.distdyn,Se={bits:n.distbits},we=o(u,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Se),n.distbits=Se.bits,we){e.msg="invalid distances set",n.mode=J;break}if(n.mode=H,t===p)break e;case H:n.mode=G;case G:if(ae>=6&&se>=258){e.next_out=re,e.avail_out=se,e.next_in=te,e.avail_in=ae,n.hold=ie,n.bits=oe,i(e,ce),re=e.next_out,ee=e.output,se=e.avail_out,te=e.next_in,$=e.input,ae=e.avail_in,ie=n.hold,oe=n.bits,n.mode===N&&(n.back=-1);break}for(n.back=0;ge=(Ce=n.lencode[ie&(1<<n.lenbits)-1])>>>16&255,ye=65535&Ce,!((fe=Ce>>>24)<=oe);){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if(ge&&0==(240&ge)){for(ve=fe,be=ge,_e=ye;ge=(Ce=n.lencode[_e+((ie&(1<<ve+be)-1)>>ve)])>>>16&255,ye=65535&Ce,!(ve+(fe=Ce>>>24)<=oe);){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}ie>>>=ve,oe-=ve,n.back+=ve}if(ie>>>=fe,oe-=fe,n.back+=fe,n.length=ye,0===ge){n.mode=q;break}if(32&ge){n.back=-1,n.mode=N;break}if(64&ge){e.msg="invalid literal/length code",n.mode=J;break}n.extra=15&ge,n.mode=U;case U:if(n.extra){for(xe=n.extra;oe<xe;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}n.length+=ie&(1<<n.extra)-1,ie>>>=n.extra,oe-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=W;case W:for(;ge=(Ce=n.distcode[ie&(1<<n.distbits)-1])>>>16&255,ye=65535&Ce,!((fe=Ce>>>24)<=oe);){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if(0==(240&ge)){for(ve=fe,be=ge,_e=ye;ge=(Ce=n.distcode[_e+((ie&(1<<ve+be)-1)>>ve)])>>>16&255,ye=65535&Ce,!(ve+(fe=Ce>>>24)<=oe);){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}ie>>>=ve,oe-=ve,n.back+=ve}if(ie>>>=fe,oe-=fe,n.back+=fe,64&ge){e.msg="invalid distance code",n.mode=J;break}n.offset=ye,n.extra=15&ge,n.mode=j;case j:if(n.extra){for(xe=n.extra;oe<xe;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}n.offset+=ie&(1<<n.extra)-1,ie>>>=n.extra,oe-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=J;break}n.mode=Z;case Z:if(0===se)break e;if(ue=ce-se,n.offset>ue){if((ue=n.offset-ue)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=J;break}ue>n.wnext?(ue-=n.wnext,de=n.wsize-ue):de=n.wnext-ue,ue>n.length&&(ue=n.length),he=n.window}else he=ee,de=re-n.offset,ue=n.length;ue>se&&(ue=se),se-=ue,n.length-=ue;do{ee[re++]=he[de++]}while(--ue);0===n.length&&(n.mode=G);break;case q:if(0===se)break e;ee[re++]=n.length,se--,n.mode=G;break;case Y:if(n.wrap){for(;oe<32;){if(0===ae)break e;ae--,ie|=$[te++]<<oe,oe+=8}if(ce-=se,e.total_out+=ce,n.total+=ce,ce&&(e.adler=n.check=n.flags?s(n.check,ee,ce,re-ce):a(n.check,ee,ce,re-ce)),ce=se,(n.flags?ie:ne(ie))!==n.check){e.msg="incorrect data check",n.mode=J;break}ie=0,oe=0}n.mode=K;case K:if(n.wrap&&n.flags){for(;oe<32;){if(0===ae)break e;ae--,ie+=$[te++]<<oe,oe+=8}if(ie!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=J;break}ie=0,oe=0}n.mode=X;case X:we=f;break e;case J:we=v;break e;case Q:return b;default:return y}return e.next_out=re,e.avail_out=se,e.next_in=te,e.avail_in=ae,n.hold=ie,n.bits=oe,(n.wsize||ce!==e.avail_out&&n.mode<J&&(n.mode<Y||t!==d))&&pe(e,e.output,e.next_out,ce-e.avail_out)?(n.mode=Q,b):(le-=e.avail_in,ce-=e.avail_out,e.total_in+=le,e.total_out+=ce,n.total+=ce,n.wrap&&ce&&(e.adler=n.check=n.flags?s(n.check,ee,ce,e.next_out-ce):a(n.check,ee,ce,e.next_out-ce)),e.data_type=n.bits+(n.last?64:0)+(n.mode===N?128:0)+(n.mode===H||n.mode===D?256:0),(0===le&&0===ce||t===d)&&we===h&&(we=_),we)}function fe(e){if(!e||!e.state)return y;var t=e.state;return t.window&&(t.window=null),e.state=null,h}function ge(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?y:(n.head=t,t.done=!1,h):y}function ye(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&n.mode!==O?y:n.mode===O&&a(1,t,r,0)!==n.check?v:pe(e,t,r,r)?(n.mode=Q,b):(n.havedict=1,h):y}n.inflateReset=se,n.inflateReset2=ie,n.inflateResetKeep=ae,n.inflateInit=le,n.inflateInit2=oe,n.inflate=he,n.inflateEnd=fe,n.inflateGetHeader=ge,n.inflateSetDictionary=ye,n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,n){"use strict";var r=e("../utils/common"),a=15,s=852,i=592,o=0,l=1,c=2,u=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],d=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],p=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,h,f,g,y,v){var b,_,E,w,S,x,C,k,T,P=v.bits,I=0,M=0,A=0,O=0,N=0,F=0,R=0,D=0,V=0,L=0,B=null,z=0,H=new r.Buf16(a+1),G=new r.Buf16(a+1),U=null,W=0;for(I=0;I<=a;I++)H[I]=0;for(M=0;M<h;M++)H[t[n+M]]++;for(N=P,O=a;O>=1&&0===H[O];O--);if(N>O&&(N=O),0===O)return f[g++]=20971520,f[g++]=20971520,v.bits=1,0;for(A=1;A<O&&0===H[A];A++);for(N<A&&(N=A),D=1,I=1;I<=a;I++)if(D<<=1,(D-=H[I])<0)return-1;if(D>0&&(e===o||1!==O))return-1;for(G[1]=0,I=1;I<a;I++)G[I+1]=G[I]+H[I];for(M=0;M<h;M++)0!==t[n+M]&&(y[G[t[n+M]]++]=M);if(e===o?(B=U=y,x=19):e===l?(B=u,z-=257,U=d,W-=257,x=256):(B=m,U=p,x=-1),L=0,M=0,I=A,S=g,F=N,R=0,E=-1,w=(V=1<<N)-1,e===l&&V>s||e===c&&V>i)return 1;for(;;){C=I-R,y[M]<x?(k=0,T=y[M]):y[M]>x?(k=U[W+y[M]],T=B[z+y[M]]):(k=96,T=0),b=1<<I-R,A=_=1<<F;do{f[S+(L>>R)+(_-=b)]=C<<24|k<<16|T|0}while(0!==_);for(b=1<<I-1;L&b;)b>>=1;if(0!==b?(L&=b-1,L+=b):L=0,M++,0==--H[I]){if(I===O)break;I=t[n+y[M]]}if(I>N&&(L&w)!==E){for(0===R&&(R=N),S+=A,D=1<<(F=I-R);F+R<O&&!((D-=H[F+R])<=0);)F++,D<<=1;if(V+=1<<F,e===l&&V>s||e===c&&V>i)return 1;f[E=L&w]=N<<24|F<<16|S-g|0}}return 0!==L&&(f[S+L]=I-R<<24|64<<16|0),v.bits=N,0}},{"../utils/common":1}],10:[function(e,t,n){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,n){"use strict";function r(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=r},{}],"/lib/inflate.js":[function(e,t,n){"use strict";var r=e("./zlib/inflate"),a=e("./utils/common"),s=e("./utils/strings"),i=e("./zlib/constants"),o=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=a.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==i.Z_OK)throw new Error(o[n]);if(this.header=new c,r.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=s.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=r.inflateSetDictionary(this.strm,t.dictionary))!==i.Z_OK))throw new Error(o[n])}function m(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||o[n.err];return n.result}function p(e,t){return(t=t||{}).raw=!0,m(e,t)}d.prototype.push=function(e,t){var n,o,l,c,d,m=this.strm,p=this.options.chunkSize,h=this.options.dictionary,f=!1;if(this.ended)return!1;o=t===~~t?t:!0===t?i.Z_FINISH:i.Z_NO_FLUSH,"string"==typeof e?m.input=s.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?m.input=new Uint8Array(e):m.input=e,m.next_in=0,m.avail_in=m.input.length;do{if(0===m.avail_out&&(m.output=new a.Buf8(p),m.next_out=0,m.avail_out=p),(n=r.inflate(m,i.Z_NO_FLUSH))===i.Z_NEED_DICT&&h&&(n=r.inflateSetDictionary(this.strm,h)),n===i.Z_BUF_ERROR&&!0===f&&(n=i.Z_OK,f=!1),n!==i.Z_STREAM_END&&n!==i.Z_OK)return this.onEnd(n),this.ended=!0,!1;m.next_out&&(0!==m.avail_out&&n!==i.Z_STREAM_END&&(0!==m.avail_in||o!==i.Z_FINISH&&o!==i.Z_SYNC_FLUSH)||("string"===this.options.to?(l=s.utf8border(m.output,m.next_out),c=m.next_out-l,d=s.buf2string(m.output,l),m.next_out=c,m.avail_out=p-c,c&&a.arraySet(m.output,m.output,l,c,0),this.onData(d)):this.onData(a.shrinkBuf(m.output,m.next_out)))),0===m.avail_in&&0===m.avail_out&&(f=!0)}while((m.avail_in>0||0===m.avail_out)&&n!==i.Z_STREAM_END);return n===i.Z_STREAM_END&&(o=i.Z_FINISH),o===i.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===i.Z_OK):o!==i.Z_SYNC_FLUSH||(this.onEnd(i.Z_OK),m.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===i.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=d,n.inflate=m,n.inflateRaw=p,n.ungzip=m},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")},8572:e=>{e.exports=function(){function e(t,n,r){function a(i,o){if(!n[i]){if(!t[i]){if(s)return s(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[i]={exports:{}};t[i][0].call(c.exports,(function(e){return a(t[i][1][e]||e)}),c,c.exports,e,t,n,r)}return n[i].exports}for(var s=void 0,i=0;i<r.length;i++)a(r[i]);return a}return e}()({1:[function(e,t,n){var r=4096,a=2*r+32,s=2*r-1,i=new Uint32Array([0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215]);function o(e){this.buf_=new Uint8Array(a),this.input_=e,this.reset()}o.READ_SIZE=r,o.IBUF_MASK=s,o.prototype.reset=function(){this.buf_ptr_=0,this.val_=0,this.pos_=0,this.bit_pos_=0,this.bit_end_pos_=0,this.eos_=0,this.readMoreInput();for(var e=0;e<4;e++)this.val_|=this.buf_[this.pos_]<<8*e,++this.pos_;return this.bit_end_pos_>0},o.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var e=this.buf_ptr_,t=this.input_.read(this.buf_,e,r);if(t<0)throw new Error("Unexpected end of input");if(t<r){this.eos_=1;for(var n=0;n<32;n++)this.buf_[e+t+n]=0}if(0===e){for(n=0;n<32;n++)this.buf_[(r<<1)+n]=this.buf_[n];this.buf_ptr_=r}else this.buf_ptr_=0;this.bit_end_pos_+=t<<3}},o.prototype.fillBitWindow=function(){for(;this.bit_pos_>=8;)this.val_>>>=8,this.val_|=this.buf_[this.pos_&s]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},o.prototype.readBits=function(e){32-this.bit_pos_<e&&this.fillBitWindow();var t=this.val_>>>this.bit_pos_&i[e];return this.bit_pos_+=e,t},t.exports=o},{}],2:[function(e,t,n){n.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),n.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},{}],3:[function(e,t,n){var r=e("./streams").BrotliInput,a=e("./streams").BrotliOutput,s=e("./bit_reader"),i=e("./dictionary"),o=e("./huffman").HuffmanCode,l=e("./huffman").BrotliBuildHuffmanTable,c=e("./context"),u=e("./prefix"),d=e("./transform"),m=8,p=16,h=256,f=704,g=26,y=6,v=2,b=8,_=255,E=1080,w=18,S=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),x=16,C=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),k=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),T=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function P(e){var t;return 0===e.readBits(1)?16:(t=e.readBits(3))>0?17+t:(t=e.readBits(3))>0?8+t:17}function I(e){if(e.readBits(1)){var t=e.readBits(3);return 0===t?1:e.readBits(t)+(1<<t)}return 0}function M(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function A(e){var t,n,r,a=new M;if(a.input_end=e.readBits(1),a.input_end&&e.readBits(1))return a;if(7===(t=e.readBits(2)+4)){if(a.is_metadata=!0,0!==e.readBits(1))throw new Error("Invalid reserved bit");if(0===(n=e.readBits(2)))return a;for(r=0;r<n;r++){var s=e.readBits(8);if(r+1===n&&n>1&&0===s)throw new Error("Invalid size byte");a.meta_block_length|=s<<8*r}}else for(r=0;r<t;++r){var i=e.readBits(4);if(r+1===t&&t>4&&0===i)throw new Error("Invalid size nibble");a.meta_block_length|=i<<4*r}return++a.meta_block_length,a.input_end||a.is_metadata||(a.is_uncompressed=e.readBits(1)),a}function O(e,t,n){var r;return n.fillBitWindow(),(r=e[t+=n.val_>>>n.bit_pos_&_].bits-b)>0&&(n.bit_pos_+=b,t+=e[t].value,t+=n.val_>>>n.bit_pos_&(1<<r)-1),n.bit_pos_+=e[t].bits,e[t].value}function N(e,t,n,r){for(var a=0,s=m,i=0,c=0,u=32768,d=[],h=0;h<32;h++)d.push(new o(0,0));for(l(d,0,5,e,w);a<t&&u>0;){var f,g=0;if(r.readMoreInput(),r.fillBitWindow(),g+=r.val_>>>r.bit_pos_&31,r.bit_pos_+=d[g].bits,(f=255&d[g].value)<p)i=0,n[a++]=f,0!==f&&(s=f,u-=32768>>f);else{var y,v,b=f-14,_=0;if(f===p&&(_=s),c!==_&&(i=0,c=_),y=i,i>0&&(i-=2,i<<=b),a+(v=(i+=r.readBits(b)+3)-y)>t)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var E=0;E<v;E++)n[a+E]=c;a+=v,0!==c&&(u-=v<<15-c)}}if(0!==u)throw new Error("[ReadHuffmanCodeLengths] space = "+u);for(;a<t;a++)n[a]=0}function F(e,t,n,r){var a,s=0,i=new Uint8Array(e);if(r.readMoreInput(),1===(a=r.readBits(2))){for(var c=e-1,u=0,d=new Int32Array(4),m=r.readBits(2)+1;c;)c>>=1,++u;for(p=0;p<m;++p)d[p]=r.readBits(u)%e,i[d[p]]=2;switch(i[d[0]]=1,m){case 1:break;case 3:if(d[0]===d[1]||d[0]===d[2]||d[1]===d[2])throw new Error("[ReadHuffmanCode] invalid symbols");break;case 2:if(d[0]===d[1])throw new Error("[ReadHuffmanCode] invalid symbols");i[d[1]]=1;break;case 4:if(d[0]===d[1]||d[0]===d[2]||d[0]===d[3]||d[1]===d[2]||d[1]===d[3]||d[2]===d[3])throw new Error("[ReadHuffmanCode] invalid symbols");r.readBits(1)?(i[d[2]]=3,i[d[3]]=3):i[d[0]]=2}}else{var p,h=new Uint8Array(w),f=32,g=0,y=[new o(2,0),new o(2,4),new o(2,3),new o(3,2),new o(2,0),new o(2,4),new o(2,3),new o(4,1),new o(2,0),new o(2,4),new o(2,3),new o(3,2),new o(2,0),new o(2,4),new o(2,3),new o(4,5)];for(p=a;p<w&&f>0;++p){var v,_=S[p],E=0;r.fillBitWindow(),E+=r.val_>>>r.bit_pos_&15,r.bit_pos_+=y[E].bits,v=y[E].value,h[_]=v,0!==v&&(f-=32>>v,++g)}if(1!==g&&0!==f)throw new Error("[ReadHuffmanCode] invalid num_codes or space");N(h,e,i,r)}if(0===(s=l(t,n,b,i,e)))throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return s}function R(e,t,n){var r,a;return r=O(e,t,n),a=u.kBlockLengthPrefixCode[r].nbits,u.kBlockLengthPrefixCode[r].offset+n.readBits(a)}function D(e,t,n){var r;return e<x?(n+=C[e],r=t[n&=3]+k[e]):r=e-x+1,r}function V(e,t){for(var n=e[t],r=t;r;--r)e[r]=e[r-1];e[0]=n}function L(e,t){var n,r=new Uint8Array(256);for(n=0;n<256;++n)r[n]=n;for(n=0;n<t;++n){var a=e[n];e[n]=r[a],a&&V(r,a)}}function B(e,t){this.alphabet_size=e,this.num_htrees=t,this.codes=new Array(t+t*T[e+31>>>5]),this.htrees=new Uint32Array(t)}function z(e,t){var n,r,a={num_htrees:null,context_map:null},s=0;t.readMoreInput();var i=a.num_htrees=I(t)+1,l=a.context_map=new Uint8Array(e);if(i<=1)return a;for(t.readBits(1)&&(s=t.readBits(4)+1),n=[],r=0;r<E;r++)n[r]=new o(0,0);for(F(i+s,n,0,t),r=0;r<e;){var c;if(t.readMoreInput(),0===(c=O(n,0,t)))l[r]=0,++r;else if(c<=s)for(var u=1+(1<<c)+t.readBits(c);--u;){if(r>=e)throw new Error("[DecodeContextMap] i >= context_map_size");l[r]=0,++r}else l[r]=c-s,++r}return t.readBits(1)&&L(l,e),a}function H(e,t,n,r,a,s,i){var o,l=2*n,c=n,u=O(t,n*E,i);(o=0===u?a[l+(1&s[c])]:1===u?a[l+(s[c]-1&1)]+1:u-2)>=e&&(o-=e),r[n]=o,a[l+(1&s[c])]=o,++s[c]}function G(e,t,n,r,a,i){var o,l=a+1,c=n&a,u=i.pos_&s.IBUF_MASK;if(t<8||i.bit_pos_+(t<<3)<i.bit_end_pos_)for(;t-- >0;)i.readMoreInput(),r[c++]=i.readBits(8),c===l&&(e.write(r,l),c=0);else{if(i.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;i.bit_pos_<32;)r[c]=i.val_>>>i.bit_pos_,i.bit_pos_+=8,++c,--t;if(u+(o=i.bit_end_pos_-i.bit_pos_>>3)>s.IBUF_MASK){for(var d=s.IBUF_MASK+1-u,m=0;m<d;m++)r[c+m]=i.buf_[u+m];o-=d,c+=d,t-=d,u=0}for(m=0;m<o;m++)r[c+m]=i.buf_[u+m];if(t-=o,(c+=o)>=l)for(e.write(r,l),c-=l,m=0;m<c;m++)r[m]=r[l+m];for(;c+t>=l;){if(o=l-c,i.input_.read(r,c,o)<o)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");e.write(r,l),t-=o,c=0}if(i.input_.read(r,c,t)<t)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");i.reset()}}function U(e){var t=e.bit_pos_+7&-8;return 0==e.readBits(t-e.bit_pos_)}function W(e){var t=new r(e),n=new s(t);return P(n),A(n).meta_block_length}function j(e,t){var n=new r(e);null==t&&(t=W(e));var s=new Uint8Array(t),i=new a(s);return Z(n,i),i.pos<i.buffer.length&&(i.buffer=i.buffer.subarray(0,i.pos)),i.buffer}function Z(e,t){var n,r,a,l,m,p,b,_,w,S=0,C=0,k=0,T=0,M=[16,15,11,4],N=0,V=0,L=0,W=[new B(0,0),new B(0,0),new B(0,0)],j=128+s.READ_SIZE;r=(1<<(k=P(w=new s(e))))-16,l=(a=1<<k)-1,m=new Uint8Array(a+j+i.maxDictionaryWordLength),p=a,b=[],_=[];for(var Z=0;Z<3*E;Z++)b[Z]=new o(0,0),_[Z]=new o(0,0);for(;!C;){var q,Y,K,X,J,Q,$,ee,te,ne=0,re=[1<<28,1<<28,1<<28],ae=[0],se=[1,1,1],ie=[0,1,0,1,0,1],oe=[0],le=null,ce=null,ue=null,de=null,me=0,pe=null,he=0,fe=0,ge=0;for(n=0;n<3;++n)W[n].codes=null,W[n].htrees=null;w.readMoreInput();var ye=A(w);if(S+(ne=ye.meta_block_length)>t.buffer.length){var ve=new Uint8Array(S+ne);ve.set(t.buffer),t.buffer=ve}if(C=ye.input_end,q=ye.is_uncompressed,ye.is_metadata)for(U(w);ne>0;--ne)w.readMoreInput(),w.readBits(8);else if(0!==ne)if(q)w.bit_pos_=w.bit_pos_+7&-8,G(t,ne,S,m,l,w),S+=ne;else{for(n=0;n<3;++n)se[n]=I(w)+1,se[n]>=2&&(F(se[n]+2,b,n*E,w),F(g,_,n*E,w),re[n]=R(_,n*E,w),oe[n]=1);for(w.readMoreInput(),X=(1<<(Y=w.readBits(2)))-1,J=(K=x+(w.readBits(4)<<Y))+(48<<Y),ce=new Uint8Array(se[0]),n=0;n<se[0];++n)w.readMoreInput(),ce[n]=w.readBits(2)<<1;var be=z(se[0]<<y,w);Q=be.num_htrees,le=be.context_map;var _e=z(se[2]<<v,w);for($=_e.num_htrees,ue=_e.context_map,W[0]=new B(h,Q),W[1]=new B(f,se[1]),W[2]=new B(J,$),n=0;n<3;++n)W[n].decode(w);for(de=0,pe=0,ee=ce[ae[0]],fe=c.lookupOffsets[ee],ge=c.lookupOffsets[ee+1],te=W[1].htrees[0];ne>0;){var Ee,we,Se,xe,Ce,ke,Te,Pe,Ie,Me,Ae,Oe;for(w.readMoreInput(),0===re[1]&&(H(se[1],b,1,ae,ie,oe,w),re[1]=R(_,E,w),te=W[1].htrees[ae[1]]),--re[1],(we=(Ee=O(W[1].codes,te,w))>>6)>=2?(we-=2,Te=-1):Te=0,Se=u.kInsertRangeLut[we]+(Ee>>3&7),xe=u.kCopyRangeLut[we]+(7&Ee),Ce=u.kInsertLengthPrefixCode[Se].offset+w.readBits(u.kInsertLengthPrefixCode[Se].nbits),ke=u.kCopyLengthPrefixCode[xe].offset+w.readBits(u.kCopyLengthPrefixCode[xe].nbits),V=m[S-1&l],L=m[S-2&l],Ie=0;Ie<Ce;++Ie)w.readMoreInput(),0===re[0]&&(H(se[0],b,0,ae,ie,oe,w),re[0]=R(_,0,w),de=ae[0]<<y,ee=ce[ae[0]],fe=c.lookupOffsets[ee],ge=c.lookupOffsets[ee+1]),me=le[de+(c.lookup[fe+V]|c.lookup[ge+L])],--re[0],L=V,V=O(W[0].codes,W[0].htrees[me],w),m[S&l]=V,(S&l)===l&&t.write(m,a),++S;if((ne-=Ce)<=0)break;if(Te<0&&(w.readMoreInput(),0===re[2]&&(H(se[2],b,2,ae,ie,oe,w),re[2]=R(_,2*E,w),pe=ae[2]<<v),--re[2],he=ue[pe+(255&(ke>4?3:ke-2))],(Te=O(W[2].codes,W[2].htrees[he],w))>=K&&(Oe=(Te-=K)&X,Te=K+((Ne=(2+(1&(Te>>=Y))<<(Ae=1+(Te>>1)))-4)+w.readBits(Ae)<<Y)+Oe)),(Pe=D(Te,M,N))<0)throw new Error("[BrotliDecompress] invalid distance");if(Me=S&l,Pe>(T=S<r&&T!==r?S:r)){if(!(ke>=i.minDictionaryWordLength&&ke<=i.maxDictionaryWordLength))throw new Error("Invalid backward reference. pos: "+S+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);var Ne=i.offsetsByLength[ke],Fe=Pe-T-1,Re=i.sizeBitsByLength[ke],De=Fe>>Re;if(Ne+=(Fe&(1<<Re)-1)*ke,!(De<d.kNumTransforms))throw new Error("Invalid backward reference. pos: "+S+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);var Ve=d.transformDictionaryWord(m,Me,Ne,ke,De);if(S+=Ve,ne-=Ve,(Me+=Ve)>=p){t.write(m,a);for(var Le=0;Le<Me-p;Le++)m[Le]=m[p+Le]}}else{if(Te>0&&(M[3&N]=Pe,++N),ke>ne)throw new Error("Invalid backward reference. pos: "+S+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);for(Ie=0;Ie<ke;++Ie)m[S&l]=m[S-Pe&l],(S&l)===l&&t.write(m,a),++S,--ne}V=m[S-1&l],L=m[S-2&l]}S&=1073741823}}t.write(m,S&l)}B.prototype.decode=function(e){var t,n=0;for(t=0;t<this.num_htrees;++t)this.htrees[t]=n,n+=F(this.alphabet_size,this.codes,n,e)},n.BrotliDecompressedSize=W,n.BrotliDecompressBuffer=j,n.BrotliDecompress=Z,i.init()},{"./bit_reader":1,"./context":2,"./dictionary":6,"./huffman":7,"./prefix":9,"./streams":10,"./transform":11}],4:[function(e,t,n){var r=e("base64-js");n.init=function(){return(0,e("./decode").BrotliDecompressBuffer)(r.toByteArray(e("./dictionary.bin.js")))}},{"./decode":3,"./dictionary.bin.js":5,"base64-js":8}],5:[function(e,t,n){t.exports="W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3Q99MvKtwB6bHdERYRY0hStJoMjNeTsNX7bn+Y7e4EQ3bf8xBc7L0BsyfFPK43dGSXpL6clYC/I328h54/VYrQ5i0648FgbGtl837svJ35L3Mot/+nPlNpWgKx1gGXQYqX6n+bbZ7wuyCHKcUok12Xjqub7NXZGzqBx0SD+uziNf87t7ve42jxSKQoW3nyxVrWIGlFShhCKxjpZZ5MeGna0+lBkk+kaN8F9qFBAFgEogyMBdcX/T1W/WnMOi/7ycWUQloEBKGeC48MkiwqJkJO+12eQiOFHMmck6q/IjWW3RZlany23TBm+cNr/84/oi5GGmGBZWrZ6j+zykVozz5fT/QH/Da6WTbZYYPynVNO7kxzuNN2kxKKWche5WveitPKAecB8YcAHz/+zXLjcLzkdDSktNIDwZE9J9X+tto43oJy65wApM3mDzYtCwX9lM+N5VR3kXYo0Z3t0TtXfgBFg7gU8oN0Dgl7fZlUbhNll+0uuohRVKjrEd8egrSndy5/Tgd2gqjA4CAVuC7ESUmL3DZoGnfhQV8uwnpi8EGvAVVsowNRxPudck7+oqAUDkwZopWqFnW1riss0t1z6iCISVKreYGNvQcXv+1L9+jbP8cd/dPUiqBso2q+7ZyFBvENCkkVr44iyPbtOoOoCecWsiuqMSML5lv+vN5MzUr+Dnh73G7Q1YnRYJVYXHRJaNAOByiaK6CusgFdBPE40r0rvqXV7tksKO2DrHYXBTv8P5ysqxEx8VDXUDDqkPH6NNOV/a2WH8zlkXRELSa8P+heNyJBBP7PgsG1EtWtNef6/i+lcayzQwQCsduidpbKfhWUDgAEmyhGu/zVTacI6RS0zTABrOYueemnVa19u9fT23N/Ta6RvTpof5DWygqreCqrDAgM4LID1+1T/taU6yTFVLqXOv+/MuQOFnaF8vLMKD7tKWDoBdALgxF33zQccCcdHx8fKIVdW69O7qHtXpeGr9jbbpFA+qRMWr5hp0s67FPc7HAiLV0g0/peZlW7hJPYEhZyhpSwahnf93/tZgfqZWXFdmdXBzqxGHLrQKxoAY6fRoBhgCRPmmGueYZ5JexTVDKUIXzkG/fqp/0U3hAgQdJ9zumutK6nqWbaqvm1pgu03IYR+G+8s0jDBBz8cApZFSBeuWasyqo2OMDKAZCozS+GWSvL/HsE9rHxooe17U3s/lTE+VZAk4j3dp6uIGaC0JMiqR5CUsabPyM0dOYDR7Ea7ip4USZlya38YfPtvrX/tBlhHilj55nZ1nfN24AOAi9BVtz/Mbn8AEDJCqJgsVUa6nQnSxv2Fs7l/NlCzpfYEjmPrNyib/+t0ei2eEMjvNhLkHCZlci4WhBe7ePZTmzYqlY9+1pxtS4GB+5lM1BHT9tS270EWUDYFq1I0yY/fNiAk4bk9yBgmef/f2k6AlYQZHsNFnW8wBQxCd68iWv7/35bXfz3JZmfGligWAKRjIs3IpzxQ27vAglHSiOzCYzJ9L9A1CdiyFvyR66ucA4jKifu5ehwER26yV7HjKqn5Mfozo7Coxxt8LWWPT47BeMxX8p0Pjb7hZn+6bw7z3Lw+7653j5sI8CLu5kThpMlj1m4c2ch3jGcP1FsT13vuK3qjecKTZk2kHcOZY40UX+qdaxstZqsqQqgXz+QGF99ZJLqr3VYu4aecl1Ab5GmqS8k/GV5b95zxQ5d4EfXUJ6kTS/CXF/aiqKDOT1T7Jz5z0PwDUcwr9clLN1OJGCiKfqvah+h3XzrBOiLOW8wvn8gW6qE8vPxi+Efv+UH55T7PQFVMh6cZ1pZQlzJpKZ7P7uWvwPGJ6DTlR6wbyj3Iv2HyefnRo/dv7dNx+qaa0N38iBsR++Uil7Wd4afwDNsrzDAK4fXZwvEY/jdKuIKXlfrQd2C39dW7ntnRbIp9OtGy9pPBn/V2ASoi/2UJZfS+xuGLH8bnLuPlzdTNS6zdyk8Dt/h6sfOW5myxh1f+zf3zZ3MX/mO9cQPp5pOx967ZA6/pqHvclNfnUFF+rq+Vd7alKr6KWPcIDhpn6v2K6NlUu6LrKo8b/pYpU/Gazfvtwhn7tEOUuXht5rUJdSf6sLjYf0VTYDgwJ81yaqKTUYej/tbHckSRb/HZicwGJqh1mAHB/IuNs9dc9yuvF3D5Xocm3elWFdq5oEy70dYFit79yaLiNjPj5UUcVmZUVhQEhW5V2Z6Cm4HVH/R8qlamRYwBileuh07CbEce3TXa2JmXWBf+ozt319psboobeZhVnwhMZzOeQJzhpTDbP71Tv8HuZxxUI/+ma3XW6DFDDs4+qmpERwHGBd2edxwUKlODRdUWZ/g0GOezrbzOZauFMai4QU6GVHV6aPNBiBndHSsV4IzpvUiiYyg6OyyrL4Dj5q/Lw3N5kAwftEVl9rNd7Jk5PDij2hTH6wIXnsyXkKePxbmHYgC8A6an5Fob/KH5GtC0l4eFso+VpxedtJHdHpNm+Bvy4C79yVOkrZsLrQ3OHCeB0Ra+kBIRldUGlDCEmq2RwXnfyh6Dz+alk6eftI2n6sastRrGwbwszBeDRS/Fa/KwRJkCzTsLr/JCs5hOPE/MPLYdZ1F1fv7D+VmysX6NpOC8aU9F4Qs6HvDyUy9PvFGDKZ/P5101TYHFl8pjj6wm/qyS75etZhhfg0UEL4OYmHk6m6dO192AzoIyPSV9QedDA4Ml23rRbqxMPMxf7FJnDc5FTElVS/PyqgePzmwVZ26NWhRDQ+oaT7ly7ell4s3DypS1s0g+tOr7XHrrkZj9+x/mJBttrLx98lFIaRZzHz4aC7r52/JQ4VjHahY2/YVXZn/QC2ztQb/sY3uRlyc5vQS8nLPGT/n27495i8HPA152z7Fh5aFpyn1GPJKHuPL8Iw94DuW3KjkURAWZXn4EQy89xiKEHN1mk/tkM4gYDBxwNoYvRfE6LFqsxWJtPrDGbsnLMap3Ka3MUoytW0cvieozOmdERmhcqzG+3HmZv2yZeiIeQTKGdRT4HHNxekm1tY+/n06rGmFleqLscSERzctTKM6G9P0Pc1RmVvrascIxaO1CQCiYPE15bD7c3xSeW7gXxYjgxcrUlcbIvO0r+Yplhx0kTt3qafDOmFyMjgGxXu73rddMHpV1wMubyAGcf/v5dLr5P72Ta9lBF+fzMJrMycwv+9vnU3ANIl1cH9tfW7af8u0/HG0vV47jNFXzFTtaha1xvze/s8KMtCYucXc1nzfd/MQydUXn/b72RBt5wO/3jRcMH9BdhC/yctKBIveRYPrNpDWqBsO8VMmP+WvRaOcA4zRMR1PvSoO92rS7pYEv+fZfEfTMzEdM+6X5tLlyxExhqLRkms5EuLovLfx66de5fL2/yX02H52FPVwahrPqmN/E0oVXnsCKhbi/yRxX83nRbUKWhzYceXOntfuXn51NszJ6MO73pQf5Pl4in3ec4JU8hF7ppV34+mm9r1LY0ee/i1O1wpd8+zfLztE0cqBxggiBi5Bu95v9l3r9r/U5hweLn+TbfxowrWDqdJauKd8+q/dH8sbPkc9ttuyO94f7/XK/nHX46MPFLEb5qQlNPvhJ50/59t9ft3LXu7uVaWaO2bDrDCnRSzZyWvFKxO1+vT8MwwunR3bX0CkfPjqb4K9O19tn5X50PvmYpEwHtiW9WtzuV/s76B1zvLLNkViNd8ySxIl/3orfqP90TyTGaf7/rx8jQzeHJXdmh/N6YDvbvmTBwCdxfEQ1NcL6wNMdSIXNq7b1EUzRy1/Axsyk5p22GMG1b+GxFgbHErZh92wuvco0AuOLXct9hvw2nw/LqIcDRRmJmmZzcgUa7JpM/WV/S9IUfbF56TL2orzqwebdRD8nIYNJ41D/hz37Fo11p2Y21wzPcn713qVGhqtevStYfGH4n69OEJtPvbbLYWvscDqc3Hgnu166+tAyLnxrX0Y5zoYjV++1sI7t5kMr02KT/+uwtkc+rZLOf/qn/s3nYCf13Dg8/sB2diJgjGqjQ+TLhxbzyue2Ob7X6/9lUwW7a+lbznHzOYy8LKW1C/uRPbQY3KW/0gO9LXunHLvPL97afba9bFtc9hmz7GAttjVYlCvQAiOwAk/gC5+hkLEs6tr3AZKxLJtOEwk2dLxTYWsIB/j/ToWtIWzo906FrSG8iaqqqqqqiIiIiAgzMzMzNz+AyK+01/zi8n8S+Y1MjoRaQ80WU/G8MBlO+53VPXANrWm4wzGUVZUjjBJZVdhpcfkjsmcWaO+UEldXi1e+zq+HOsCpknYshuh8pOLISJun7TN0EIGW2xTnlOImeecnoGW4raxe2G1T3HEvfYUYMhG+gAFOAwh5nK8mZhwJMmN7r224QVsNFvZ87Z0qatvknklyPDK3Hy45PgVKXji52Wen4d4PlFVVYGnNap+fSpFbK90rYnhUc6n91Q3AY9E0tJOFrcfZtm/491XbcG/jsViUPPX76qmeuiz+qY1Hk7/1VPM405zWVuoheLUimpWYdVzCmUdKHebMdzgrYrb8mL2eeLSnRWHdonfZa8RsOU9F37w+591l5FLYHiOqWeHtE/lWrBHcRKp3uhtr8yXm8LU/5ms+NM6ZKsqu90cFZ4o58+k4rdrtB97NADFbwmEG7lXqvirhOTOqU14xuUF2myIjURcPHrPOQ4lmM3PeMg7bUuk0nnZi67bXsU6H8lhqIo8TaOrEafCO1ARK9PjC0QOoq2BxmMdgYB9G/lIb9++fqNJ2s7BHGFyBNmZAR8J3KCo012ikaSP8BCrf6VI0X5xdnbhHIO+B5rbOyB54zXkzfObyJ4ecwxfqBJMLFc7m59rNcw7hoHnFZ0b00zee+gTqvjm61Pb4xn0kcDX4jvHM0rBXZypG3DCKnD/Waa/ZtHmtFPgO5eETx+k7RrVg3aSwm2YoNXnCs3XPQDhNn+Fia6IlOOuIG6VJH7TP6ava26ehKHQa2T4N0tcZ9dPCGo3ZdnNltsHQbeYt5vPnJezV/cAeNypdml1vCHI8M81nSRP5Qi2+mI8v/sxiZru9187nRtp3f/42NemcONa+4eVC3PCZzc88aZh851CqSsshe70uPxeN/dmYwlwb3trwMrN1Gq8jbnApcVDx/yDPeYs5/7r62tsQ6lLg+DiFXTEhzR9dHqv0iT4tgj825W+H3XiRUNUZT2kR9Ri0+lp+UM3iQtS8uOE23Ly4KYtvqH13jghUntJRAewuzNLDXp8RxdcaA3cMY6TO2IeSFRXezeWIjCqyhsUdMYuCgYTZSKpBype1zRfq8FshvfBPc6BAQWl7/QxIDp3VGo1J3vn42OEs3qznws+YLRXbymyB19a9XBx6n/owcyxlEYyFWCi+kG9F+EyD/4yn80+agaZ9P7ay2Dny99aK2o91FkfEOY8hBwyfi5uwx2y5SaHmG+oq/zl1FX/8irOf8Y3vAcX/6uLP6A6nvMO24edSGPjQc827Rw2atX+z2bKq0CmW9mOtYnr5/AfDa1ZfPaXnKtlWborup7QYx+Or2uWb+N3N//2+yDcXMqIJdf55xl7/vsj4WoPPlxLxtVrkJ4w/tTe3mLdATOOYwxcq52w5Wxz5MbPdVs5O8/lhfE7dPj0bIiPQ3QV0iqm4m3YX8hRfc6jQ3fWepevMqUDJd86Z4vwM40CWHnn+WphsGHfieF02D3tmZvpWD+kBpNCFcLnZhcmmrhpGzzbdA+sQ1ar18OJD87IOKOFoRNznaHPNHUfUNhvY1iU+uhvEvpKHaUn3qK3exVVyX4joipp3um7FmYJWmA+WbIDshRpbVRx5/nqstCgy87FGbfVB8yDGCqS+2qCsnRwnSAN6zgzxfdB2nBT/vZ4/6uxb6oH8b4VBRxiIB93wLa47hG3w2SL/2Z27yOXJFwZpSJaBYyvajA7vRRYNKqljXKpt/CFD/tSMr18DKKbwB0xggBePatl1nki0yvqW5zchlyZmJ0OTxJ3D+fsYJs/mxYN5+Le5oagtcl+YsVvy8kSjI2YGvGjvmpkRS9W2dtXqWnVuxUhURm1lKtou/hdEq19VBp9OjGvHEQSmrpuf2R24mXGheil8KeiANY8fW1VERUfBImb64j12caBZmRViZHbeVMjCrPDg9A90IXrtnsYCuZtRQ0PyrKDjBNOsPfKsg1pA02gHlVr0OXiFhtp6nJqXVzcbfM0KnzC3ggOENPE9VBdmHKN6LYaijb4wXxJn5A0FSDF5j+h1ooZx885Jt3ZKzO5n7Z5WfNEOtyyPqQEnn7WLv5Fis3PdgMshjF1FRydbNyeBbyKI1oN1TRVrVK7kgsb/zjX4NDPIRMctVeaxVB38Vh1x5KbeJbU138AM5KzmZu3uny0ErygxiJF7GVXUrPzFxrlx1uFdAaZFDN9cvIb74qD9tzBMo7L7WIEYK+sla1DVMHpF0F7b3+Y6S+zjvLeDMCpapmJo1weBWuxKF3rOocih1gun4BoJh1kWnV/Jmiq6uOhK3VfKxEHEkafjLgK3oujaPzY6SXg8phhL4TNR1xvJd1Wa0aYFfPUMLrNBDCh4AuGRTbtKMc6Z1Udj8evY/ZpCuMAUefdo69DZUngoqE1P9A3PJfOf7WixCEj+Y6t7fYeHbbxUAoFV3M89cCKfma3fc1+jKRe7MFWEbQqEfyzO2x/wrO2VYH7iYdQ9BkPyI8/3kXBpLaCpU7eC0Yv/am/tEDu7HZpqg0EvHo0nf/R/gRzUWy33/HXMJQeu1GylKmOkXzlCfGFruAcPPhaGqZOtu19zsJ1SO2Jz4Ztth5cBX6mRQwWmDwryG9FUMlZzNckMdK+IoMJv1rOWnBamS2w2KHiaPMPLC15hCZm4KTpoZyj4E2TqC/P6r7/EhnDMhKicZZ1ZwxuC7DPzDGs53q8gXaI9kFTK+2LTq7bhwsTbrMV8Rsfua5lMS0FwbTitUVnVa1yTb5IX51mmYnUcP9wPr8Ji1tiYJeJV9GZTrQhF7vvdU2OTU42ogJ9FDwhmycI2LIg++03C6scYhUyUuMV5tkw6kGUoL+mjNC38+wMdWNljn6tGPpRES7veqrSn5TRuv+dh6JVL/iDHU1db4c9WK3++OrH3PqziF916UMUKn8G67nN60GfWiHrXYhUG3yVWmyYak59NHj8t1smG4UDiWz2rPHNrKnN4Zo1LBbr2/eF9YZ0n0blx2nG4X+EKFxvS3W28JESD+FWk61VCD3z/URGHiJl++7TdBwkCj6tGOH3qDb0QqcOF9Kzpj0HUb/KyFW3Yhj2VMKJqGZleFBH7vqvf7WqLC3XMuHV8q8a4sTFuxUtkD/6JIBvKaVjv96ndgruKZ1k/BHzqf2K9fLk7HGXANyLDd1vxkK/i055pnzl+zw6zLnwXlVYVtfmacJgEpRP1hbGgrYPVN6v2lG+idQNGmwcKXu/8xEj/P6qe/sB2WmwNp6pp8jaISMkwdleFXYK55NHWLTTbutSUqjBfDGWo/Yg918qQ+8BRZSAHZbfuNZz2O0sov1Ue4CWlVg3rFhM3Kljj9ksGd/NUhk4nH+a5UN2+1i8+NM3vRNp7uQ6sqexSCukEVlVZriHNqFi5rLm9TMWa4qm3idJqppQACol2l4VSuvWLfta4JcXy3bROPNbXOgdOhG47LC0CwW/dMlSx4Jf17aEU3yA1x9p+Yc0jupXgcMuYNku64iYOkGToVDuJvlbEKlJqsmiHbvNrIVZEH+yFdF8DbleZ6iNiWwMqvtMp/mSpwx5KxRrT9p3MAPTHGtMbfvdFhyj9vhaKcn3At8Lc16Ai+vBcSp1ztXi7rCJZx/ql7TXcclq6Q76UeKWDy9boS0WHIjUuWhPG8LBmW5y2rhuTpM5vsLt+HOLh1Yf0DqXa9tsfC+kaKt2htA0ai/L2i7RKoNjEwztkmRU0GfgW1TxUvPFhg0V7DdfWJk5gfrccpYv+MA9M0dkGTLECeYwUixRzjRFdmjG7zdZIl3XKB9YliNKI31lfa7i2JG5C8Ss+rHe0D7Z696/V3DEAOWHnQ9yNahMUl5kENWS6pHKKp2D1BaSrrHdE1w2qNxIztpXgUIrF0bm15YML4b6V1k+GpNysTahKMVrrS85lTVo9OGJ96I47eAy5rYWpRf/mIzeoYU1DKaQCTUVwrhHeyNoDqHel+lLxr9WKzhSYw7vrR6+V5q0pfi2k3L1zqkubY6rrd9ZLvSuWNf0uqnkY+FpTvFzSW9Fp0b9l8JA7THV9eCi/PY/SCZIUYx3BU2alj7Cm3VV6eYpios4b6WuNOJdYXUK3zTqj5CVG2FqYM4Z7CuIU0qO05XR0d71FHM0YhZmJmTRfLlXEumN82BGtzdX0S19t1e+bUieK8zRmqpa4Qc5TSjifmaQsY2ETLjhI36gMR1+7qpjdXXHiceUekfBaucHShAOiFXmv3sNmGQyU5iVgnoocuonQXEPTFwslHtS8R+A47StI9wj0iSrtbi5rMysczFiImsQ+bdFClnFjjpXXwMy6O7qfjOr8Fb0a7ODItisjnn3EQO16+ypd1cwyaAW5Yzxz5QknfMO7643fXW/I9y3U2xH27Oapqr56Z/tEzglj6IbT6HEHjopiXqeRbe5mQQvxtcbDOVverN0ZgMdzqRYRjaXtMRd56Q4cZSmdPvZJdSrhJ1D9zNXPqAEqPIavPdfubt5oke2kmv0dztIszSv2VYuoyf1UuopbsYb+uX9h6WpwjpgtZ6fNNawNJ4q8O3CFoSbioAaOSZMx2GYaPYB+rEb6qjQiNRFQ76TvwNFVKD+BhH9VhcKGsXzmMI7BptU/CNWolM7YzROvpFAntsiWJp6eR2d3GarcYShVYSUqhmYOWj5E96NK2WvmYNTeY7Zs4RUEdv9h9QT4EseKt6LzLrqEOs3hxAY1MaNWpSa6zZx8F3YOVeCYMS88W+CYHDuWe4yoc6YK+djDuEOrBR5lvh0r+Q9uM88lrjx9x9AtgpQVNE8r+3O6Gvw59D+kBF/UMXyhliYUtPjmvXGY6Dk3x+kEOW+GtdMVC4EZTqoS/jmR0P0LS75DOc/w2vnri97M4SdbZ8qeU7gg8DVbERkU5geaMQO3mYrSYyAngeUQqrN0C0/vsFmcgWNXNeidsTAj7/4MncJR0caaBUpbLK1yBCBNRjEv6KvuVSdpPnEMJdsRRtqJ+U8tN1gXA4ePHc6ZT0eviI73UOJF0fEZ8YaneAQqQdGphNvwM4nIqPnXxV0xA0fnCT+oAhJuyw/q8jO0y8CjSteZExwBpIN6SvNp6A5G/abi6egeND/1GTguhuNjaUbbnSbGd4L8937Ezm34Eyi6n1maeOBxh3PI0jzJDf5mh/BsLD7F2GOKvlA/5gtvxI3/eV4sLfKW5Wy+oio+es/u6T8UU+nsofy57Icb/JlZHPFtCgd/x+bwt3ZT+xXTtTtTrGAb4QehC6X9G+8YT+ozcLxDsdCjsuOqwPFnrdLYaFc92Ui0m4fr39lYmlCaqTit7G6O/3kWDkgtXjNH4BiEm/+jegQnihOtfffn33WxsFjhfMd48HT+f6o6X65j7XR8WLSHMFkxbvOYsrRsF1bowDuSQ18Mkxk4qz2zoGPL5fu9h2Hqmt1asl3Q3Yu3szOc+spiCmX4AETBM3pLoTYSp3sVxahyhL8eC4mPN9k2x3o0xkiixIzM3CZFzf5oR4mecQ5+ax2wCah3/crmnHoqR0+KMaOPxRif1oEFRFOO/kTPPmtww+NfMXxEK6gn6iU32U6fFruIz8Q4WgljtnaCVTBgWx7diUdshC9ZEa5yKpRBBeW12r/iNc/+EgNqmhswNB8SBoihHXeDF7rrWDLcmt3V8GYYN7pXRy4DZjj4DJuUBL5iC3DQAaoo4vkftqVTYRGLS3mHZ7gdmdTTqbgNN/PTdTCOTgXolc88MhXAEUMdX0iy1JMuk5wLsgeu0QUYlz2S4skTWwJz6pOm/8ihrmgGfFgri+ZWUK2gAPHgbWa8jaocdSuM4FJYoKicYX/ZSENkg9Q1ZzJfwScfVnR2DegOGwCvmogaWJCLQepv9WNlU6QgsmOwICquU28Mlk3d9W5E81lU/5Ez0LcX6lwKMWDNluNKfBDUy/phJgBcMnfkh9iRxrdOzgs08JdPB85Lwo+GUSb4t3nC+0byqMZtO2fQJ4U2zGIr49t/28qmmGv2RanDD7a3FEcdtutkW8twwwlUSpb8QalodddbBfNHKDQ828BdE7OBgFdiKYohLawFYqpybQoxATZrheLhdI7+0Zlu9Q1myRcd15r9UIm8K2LGJxqTegntqNVMKnf1a8zQiyUR1rxoqjiFxeHxqFcYUTHfDu7rhbWng6qOxOsI+5A1p9mRyEPdVkTlE24vY54W7bWc6jMgZvNXdfC9/9q7408KDsbdL7Utz7QFSDetz2picArzrdpL8OaCHC9V26RroemtDZ5yNM/KGkWMyTmfnInEvwtSD23UcFcjhaE3VKzkoaEMKGBft4XbIO6forTY1lmGQwVmKicBCiArDzE+1oIxE08fWeviIOD5TznqH+OoHadvoOP20drMPe5Irg3XBQziW2XDuHYzjqQQ4wySssjXUs5H+t3FWYMHppUnBHMx/nYIT5d7OmjDbgD9F6na3m4l7KdkeSO3kTEPXafiWinogag7b52taiZhL1TSvBFmEZafFq2H8khQaZXuitCewT5FBgVtPK0j4xUHPfUz3Q28eac1Z139DAP23dgki94EC8vbDPTQC97HPPSWjUNG5tWKMsaxAEMKC0665Xvo1Ntd07wCLNf8Q56mrEPVpCxlIMVlQlWRxM3oAfpgIc+8KC3rEXUog5g06vt7zgXY8grH7hhwVSaeuvC06YYRAwpbyk/Unzj9hLEZNs2oxPQB9yc+GnL6zTgq7rI++KDJwX2SP8Sd6YzTuw5lV/kU6eQxRD12omfQAW6caTR4LikYkBB1CMOrvgRr/VY75+NSB40Cni6bADAtaK+vyxVWpf9NeKJxN2KYQ8Q2xPB3K1s7fuhvWbr2XpgW044VD6DRs0qXoqKf1NFsaGvKJc47leUV3pppP/5VTKFhaGuol4Esfjf5zyCyUHmHthChcYh4hYLQF+AFWsuq4t0wJyWgdwQVOZiV0efRHPoK5+E1vjz9wTJmVkITC9oEstAsyZSgE/dbicwKr89YUxKZI+owD205Tm5lnnmDRuP/JnzxX3gMtlrcX0UesZdxyQqYQuEW4R51vmQ5xOZteUd8SJruMlTUzhtVw/Nq7eUBcqN2/HVotgfngif60yKEtoUx3WYOZlVJuJOh8u59fzSDPFYtQgqDUAGyGhQOAvKroXMcOYY0qjnStJR/G3aP+Jt1sLVlGV8POwr/6OGsqetnyF3TmTqZjENfnXh51oxe9qVUw2M78EzAJ+IM8lZ1MBPQ9ZWSVc4J3mWSrLKrMHReA5qdGoz0ODRsaA+vwxXA2cAM4qlfzBJA6581m4hzxItQw5dxrrBL3Y6kCbUcFxo1S8jyV44q//+7ASNNudZ6xeaNOSIUffqMn4A9lIjFctYn2gpEPAb3f7p3iIBN8H14FUGQ9ct2hPsL+cEsTgUrR47uJVN4n4wt/wgfwwHuOnLd4yobkofy8JvxSQTA7rMpDIc608SlZFJfZYcmbT0tAHpPE8MrtQ42siTUNWxqvWZOmvu9f0JPoQmg+6l7sZWwyfi6PXkxJnwBraUG0MYG4zYHQz3igy/XsFkx5tNQxw43qvI9dU3f0DdhOUlHKjmi1VAr2Kiy0HZwD8VeEbhh0OiDdMYspolQsYdSwjCcjeowIXNZVUPmL2wwIkYhmXKhGozdCJ4lRKbsf4NBh/XnQoS92NJEWOVOFs2YhN8c5QZFeK0pRdAG40hqvLbmoSA8xQmzOOEc7wLcme9JOsjPCEgpCwUs9E2DohMHRhUeyGIN6TFvrbny8nDuilsDpzrH5mS76APoIEJmItS67sQJ+nfwddzmjPxcBEBBCw0kWDwd0EZCkNeOD7NNQhtBm7KHL9mRxj6U1yWU2puzlIDtpYxdH4ZPeXBJkTGAJfUr/oTCz/iypY6uXaR2V1doPxJYlrw2ghH0D5gbrhFcIxzYwi4a/4hqVdf2DdxBp6vGYDjavxMAAoy+1+3aiO6S3W/QAKNVXagDtvsNtx7Ks+HKgo6U21B+QSZgIogV5Bt+BnXisdVfy9VyXV+2P5fMuvdpAjM1o/K9Z+XnE4EOCrue+kcdYHqAQ0/Y/OmNlQ6OI33jH/uD1RalPaHpJAm2av0/xtpqdXVKNDrc9F2izo23Wu7firgbURFDNX9eGGeYBhiypyXZft2j3hTvzE6PMWKsod//rEILDkzBXfi7xh0eFkfb3/1zzPK/PI5Nk3FbZyTl4mq5BfBoVoqiPHO4Q4QKZAlrQ3MdNfi3oxIjvsM3kAFv3fdufurqYR3PSwX/mpGy/GFI/B2MNPiNdOppWVbs/gjF3YH+QA9jMhlAbhvasAHstB0IJew09iAkmXHl1/TEj+jvHOpOGrPRQXbPADM+Ig2/OEcUcpgPTItMtW4DdqgfYVI/+4hAFWYjUGpOP/UwNuB7+BbKOcALbjobdgzeBQfjgNSp2GOpxzGLj70Vvq5cw2AoYENwKLUtJUX8sGRox4dVa/TN4xKwaKcl9XawQR/uNus700Hf17pyNnezrUgaY9e4MADhEDBpsJT6y1gDJs1q6wlwGhuUzGR7C8kgpjPyHWwsvrf3yn1zJEIRa5eSxoLAZOCR9xbuztxFRJW9ZmMYfCFJ0evm9F2fVnuje92Rc4Pl6A8bluN8MZyyJGZ0+sNSb//DvAFxC2BqlEsFwccWeAl6CyBcQV1bx4mQMBP1Jxqk1EUADNLeieS2dUFbQ/c/kvwItbZ7tx0st16viqd53WsRmPTKv2AD8CUnhtPWg5aUegNpsYgasaw2+EVooeNKmrW3MFtj76bYHJm5K9gpAXZXsE5U8DM8XmVOSJ1F1WnLy6nQup+jx52bAb+rCq6y9WXl2B2oZDhfDkW7H3oYfT/4xx5VncBuxMXP2lNfhUVQjSSzSRbuZFE4vFawlzveXxaYKVs8LpvAb8IRYF3ZHiRnm0ADeNPWocwxSzNseG7NrSEVZoHdKWqaGEBz1N8Pt7kFbqh3LYmAbm9i1IChIpLpM5AS6mr6OAPHMwwznVy61YpBYX8xZDN/a+lt7n+x5j4bNOVteZ8lj3hpAHSx1VR8vZHec4AHO9XFCdjZ9eRkSV65ljMmZVzaej2qFn/qt1lvWzNZEfHxK3qOJrHL6crr0CRzMox5f2e8ALBB4UGFZKA3tN6F6IXd32GTJXGQ7DTi9j/dNcLF9jCbDcWGKxoKTYblIwbLDReL00LRcDPMcQuXLMh5YzgtfjkFK1DP1iDzzYYVZz5M/kWYRlRpig1htVRjVCknm+h1M5LiEDXOyHREhvzCGpFZjHS0RsK27o2avgdilrJkalWqPW3D9gmwV37HKmfM3F8YZj2ar+vHFvf3B8CRoH4kDHIK9mrAg+owiEwNjjd9V+FsQKYR8czJrUkf7Qoi2YaW6EVDZp5zYlqiYtuXOTHk4fAcZ7qBbdLDiJq0WNV1l2+Hntk1mMWvxrYmc8kIx8G3rW36J6Ra4lLrTOCgiOihmow+YnzUT19jbV2B3RWqSHyxkhmgsBqMYWvOcUom1jDQ436+fcbu3xf2bbeqU/ca+C4DOKE+e3qvmeMqW3AxejfzBRFVcwVYPq4L0APSWWoJu+5UYX4qg5U6YTioqQGPG9XrnuZ/BkxuYpe6Li87+18EskyQW/uA+uk2rpHpr6hut2TlVbKgWkFpx+AZffweiw2+VittkEyf/ifinS/0ItRL2Jq3tQOcxPaWO2xrG68GdFoUpZgFXaP2wYVtRc6xYCfI1CaBqyWpg4bx8OHBQwsV4XWMibZZ0LYjWEy2IxQ1mZrf1/UNbYCJplWu3nZ4WpodIGVA05d+RWSS+ET9tH3RfGGmNI1cIY7evZZq7o+a0bjjygpmR3mVfalkT/SZGT27Q8QGalwGlDOS9VHCyFAIL0a1Q7JiW3saz9gqY8lqKynFrPCzxkU4SIfLc9VfCI5edgRhDXs0edO992nhTKHriREP1NJC6SROMgQ0xO5kNNZOhMOIT99AUElbxqeZF8A3xrfDJsWtDnUenAHdYWSwAbYjFqQZ+D5gi3hNK8CSxU9i6f6ClL9IGlj1OPMQAsr84YG6ijsJpCaGWj75c3yOZKBB9mNpQNPUKkK0D6wgLH8MGoyRxTX6Y05Q4AnYNXMZwXM4eij/9WpsM/9CoRnFQXGR6MEaY+FXvXEO3RO0JaStk6OXuHVATHJE+1W+TU3bSZ2ksMtqjO0zfSJCdBv7y2d8DMx6TfVme3q0ZpTKMMu4YL/t7ciTNtdDkwPogh3Cnjx7qk08SHwf+dksZ7M2vCOlfsF0hQ6J4ehPCaHTNrM/zBSOqD83dBEBCW/F/LEmeh0nOHd7oVl3/Qo/9GUDkkbj7yz+9cvvu+dDAtx8NzCDTP4iKdZvk9MWiizvtILLepysflSvTLFBZ37RLwiriqyRxYv/zrgFd/9XVHh/OmzBvDX4mitMR/lUavs2Vx6cR94lzAkplm3IRNy4TFfu47tuYs9EQPIPVta4P64tV+sZ7n3ued3cgEx2YK+QL5+xms6osk8qQbTyuKVGdaX9FQqk6qfDnT5ykxk0VK7KZ62b6DNDUfQlqGHxSMKv1P0XN5BqMeKG1P4Wp5QfZDUCEldppoX0U6ss2jIko2XpURKCIhfaOqLPfShdtS37ZrT+jFRSH2xYVV1rmT/MBtRQhxiO4MQ3iAGlaZi+9PWBEIXOVnu9jN1f921lWLZky9bqbM3J2MAAI9jmuAx3gyoEUa6P2ivs0EeNv/OR+AX6q5SW6l5HaoFuS6jr6yg9limu+P0KYKzfMXWcQSfTXzpOzKEKpwI3YGXZpSSy2LTlMgfmFA3CF6R5c9xWEtRuCg2ZPUQ2Nb6dRFTNd4TfGHrnEWSKHPuRyiJSDAZ+KX0VxmSHjGPbQTLVpqixia2uyhQ394gBMt7C3ZAmxn/DJS+l1fBsAo2Eir/C0jG9csd4+/tp12pPc/BVJGaK9mfvr7M/CeztrmCO5qY06Edi4xAGtiEhnWAbzLy2VEyazE1J5nPmgU4RpW4Sa0TnOT6w5lgt3/tMpROigHHmexBGAMY0mdcDbDxWIz41NgdD6oxgHsJRgr5RnT6wZAkTOcStU4NMOQNemSO7gxGahdEsC+NRVGxMUhQmmM0llWRbbmFGHzEqLM4Iw0H7577Kyo+Zf+2cUFIOw93gEY171vQaM0HLwpjpdRR6Jz7V0ckE7XzYJ0TmY9znLdzkva0vNrAGGT5SUZ5uaHDkcGvI0ySpwkasEgZPMseYcu85w8HPdSNi+4T6A83iAwDbxgeFcB1ZM2iGXzFcEOUlYVrEckaOyodfvaYSQ7GuB4ISE0nYJc15X/1ciDTPbPCgYJK55VkEor4LvzL9S2WDy4xj+6FOqVyTAC2ZNowheeeSI5hA/02l8UYkv4nk9iaVn+kCVEUstgk5Hyq+gJm6R9vG3rhuM904he/hFmNQaUIATB1y3vw+OmxP4X5Yi6A5I5jJufHCjF9+AGNwnEllZjUco6XhsO5T5+R3yxz5yLVOnAn0zuS+6zdj0nTJbEZCbXJdtpfYZfCeCOqJHoE2vPPFS6eRLjIJlG69X93nfR0mxSFXzp1Zc0lt/VafDaImhUMtbnqWVb9M4nGNQLN68BHP7AR8Il9dkcxzmBv8PCZlw9guY0lurbBsmNYlwJZsA/B15/HfkbjbwPddaVecls/elmDHNW2r4crAx43feNkfRwsaNq/yyJ0d/p5hZ6AZajz7DBfUok0ZU62gCzz7x8eVfJTKA8IWn45vINLSM1q+HF9CV9qF3zP6Ml21kPPL3CXzkuYUlnSqT+Ij4tI/od5KwIs+tDajDs64owN7tOAd6eucGz+KfO26iNcBFpbWA5732bBNWO4kHNpr9D955L61bvHCF/mwSrz6eQaDjfDEANqGMkFc+NGxpKZzCD2sj/JrHd+zlPQ8Iz7Q+2JVIiVCuCKoK/hlAEHzvk/Piq3mRL1rT/fEh9hoT5GJmeYswg1otiKydizJ/fS2SeKHVu6Z3JEHjiW8NaTQgP5xdBli8nC57XiN9hrquBu99hn9zqwo92+PM2JXtpeVZS0PdqR5mDyDreMMtEws+CpwaRyyzoYtfcvt9PJIW0fJVNNi/FFyRsea7peLvJrL+5b4GOXJ8tAr+ATk9f8KmiIsRhqRy0vFzwRV3Z5dZ3QqIU8JQ/uQpkJbjMUMFj2F9sCFeaBjI4+fL/oN3+LQgjI4zuAfQ+3IPIPFQBccf0clJpsfpnBxD84atwtupkGqKvrH7cGNl/QcWcSi6wcVDML6ljOgYbo+2BOAWNNjlUBPiyitUAwbnhFvLbnqw42kR3Yp2kv2dMeDdcGOX5kT4S6M44KHEB/SpCfl7xgsUvs+JNY9G3O2X/6FEt9FyAn57lrbiu+tl83sCymSvq9eZbe9mchL7MTf/Ta78e80zSf0hYY5eUU7+ff14jv7Xy8qjzfzzzvaJnrIdvFb5BLWKcWGy5/w7+vV2cvIfwHqdTB+RuJK5oj9mbt0Hy94AmjMjjwYNZlNS6uiyxNnwNyt3gdreLb64p/3+08nXkb92LTkkRgFOwk1oGEVllcOj5lv1hfAZywDows0944U8vUFw+A/nuVq/UCygsrmWIBnHyU01d0XJPwriEOvx/ISK6Pk4y2w0gmojZs7lU8TtakBAdne4v/aNxmMpK4VcGMp7si0yqsiolXRuOi1Z1P7SqD3Zmp0CWcyK4Ubmp2SXiXuI5nGLCieFHKHNRIlcY3Pys2dwMTYCaqlyWSITwr2oGXvyU3h1Pf8eQ3w1bnD7ilocVjYDkcXR3Oo1BXgMLTUjNw2xMVwjtp99NhSVc5aIWrDQT5DHPKtCtheBP4zHcw4dz2eRdTMamhlHhtfgqJJHI7NGDUw1XL8vsSeSHyKqDtqoAmrQqsYwvwi7HW3ojWyhIa5oz5xJTaq14NAzFLjVLR12rRNUQ6xohDnrWFb5bG9yf8aCD8d5phoackcNJp+Dw3Due3RM+5Rid7EuIgsnwgpX0rUWh/nqPtByMhMZZ69NpgvRTKZ62ViZ+Q7Dp5r4K0d7EfJuiy06KuIYauRh5Ecrhdt2QpTS1k1AscEHvapNbU3HL1F2TFyR33Wxb5MvH5iZsrn3SDcsxlnnshO8PLwmdGN+paWnQuORtZGX37uhFT64SeuPsx8UOokY6ON85WdQ1dki5zErsJGazcBOddWJEKqNPiJpsMD1GrVLrVY+AOdPWQneTyyP1hRX/lMM4ZogGGOhYuAdr7F/DOiAoc++cn5vlf0zkMUJ40Z1rlgv9BelPqVOpxKeOpzKdF8maK+1Vv23MO9k/8+qpLoxrIGH2EDQlnGmH8CD31G8QqlyQIcpmR5bwmSVw9/Ns6IHgulCRehvZ/+VrM60Cu/r3AontFfrljew74skYe2uyn7JKQtFQBQRJ9ryGic/zQOsbS4scUBctA8cPToQ3x6ZBQu6DPu5m1bnCtP8TllLYA0UTQNVqza5nfew3Mopy1GPUwG5jsl0OVXniPmAcmLqO5HG8Hv3nSLecE9oOjPDXcsTxoCBxYyzBdj4wmnyEV4kvFDunipS8SSkvdaMnTBN9brHUR8xdmmEAp/Pdqk9uextp1t+JrtXwpN/MG2w/qhRMpSNxQ1uhg/kKO30eQ/FyHUDkWHT8V6gGRU4DhDMxZu7xXij9Ui6jlpWmQCqJg3FkOTq3WKneCRYZxBXMNAVLQgHXSCGSqNdjebY94oyIpVjMYehAiFx/tqzBXFHZaL5PeeD74rW5OysFoUXY8sebUZleFTUa/+zBKVTFDopTReXNuZq47QjkWnxjirCommO4L/GrFtVV21EpMyw8wyThL5Y59d88xtlx1g1ttSICDwnof6lt/6zliPzgVUL8jWBjC0o2D6Kg+jNuThkAlaDJsq/AG2aKA//A76avw2KNqtv223P+Wq3StRDDNKFFgtsFukYt1GFDWooFVXitaNhb3RCyJi4cMeNjROiPEDb4k+G3+hD8tsg+5hhmSc/8t2JTSwYoCzAI75doq8QTHe+E/Tw0RQSUDlU+6uBeNN3h6jJGX/mH8oj0i3caCNsjvTnoh73BtyZpsflHLq6AfwJNCDX4S98h4+pCOhGKDhV3rtkKHMa3EG4J9y8zFWI4UsfNzC/Rl5midNn7gwoN9j23HGCQQ+OAZpTTPMdiVow740gIyuEtd0qVxMyNXhHcnuXRKdw5wDUSL358ktjMXmAkvIB73BLa1vfF9BAUZInPYJiwxqFWQQBVk7gQH4ojfUQ/KEjn+A/WR6EEe4CtbpoLe1mzHkajgTIoE0SLDHVauKhrq12zrAXBGbPPWKCt4DGedq3JyGRbmPFW32bE7T20+73BatV/qQhhBWfWBFHfhYWXjALts38FemnoT+9bn1jDBMcUMmYgSc0e7GQjv2MUBwLU8ionCpgV+Qrhg7iUIfUY6JFxR0Y+ZTCPM+rVuq0GNLyJXX6nrUTt8HzFBRY1E/FIm2EeVA9NcXrj7S6YYIChVQCWr/m2fYUjC4j0XLkzZ8GCSLfmkW3PB/xq+nlXsKVBOj7vTvqKCOMq7Ztqr3cQ+N8gBnPaAps+oGwWOkbuxnRYj/x/WjiDclVrs22xMK4qArE1Ztk1456kiJriw6abkNeRHogaPRBgbgF9Z8i/tbzWELN4CvbqtrqV9TtGSnmPS2F9kqOIBaazHYaJ9bi3AoDBvlZasMluxt0BDXfhp02Jn411aVt6S4TUB8ZgFDkI6TP6gwPY85w+oUQSsjIeXVminrwIdK2ZAawb8Se6XOJbOaliQxHSrnAeONDLuCnFejIbp4YDtBcQCwMsYiRZfHefuEJqJcwKTTJ8sx5hjHmJI1sPFHOr6W9AhZ2NAod38mnLQk1gOz2LCAohoQbgMbUK9RMEA3LkiF7Sr9tLZp6lkciIGhE2V546w3Mam53VtVkGbB9w0Yk2XiRnCmbpxmHr2k4eSC0RuNbjNsUfDIfc8DZvRvgUDe1IlKdZTzcT4ZGEb53dp8VtsoZlyXzLHOdAbsp1LPTVaHvLA0GYDFMbAW/WUBfUAdHwqLFAV+3uHvYWrCfhUOR2i89qvCBoOb48usAGdcF2M4aKn79k/43WzBZ+xR1L0uZfia70XP9soQReeuhZiUnXFDG1T8/OXNmssTSnYO+3kVLAgeiY719uDwL9FQycgLPessNihMZbAKG7qwPZyG11G1+ZA3jAX2yddpYfmaKBlmfcK/V0mwIRUDC0nJSOPUl2KB8h13F4dlVZiRhdGY5farwN+f9hEb1cRi41ZcGDn6Xe9MMSTOY81ULJyXIHSWFIQHstVYLiJEiUjktlHiGjntN5/btB8Fu+vp28zl2fZXN+dJDyN6EXhS+0yzqpl/LSJNEUVxmu7BsNdjAY0jVsAhkNuuY0E1G48ej25mSt+00yPbQ4SRCVkIwb6ISvYtmJRPz9Zt5dk76blf+lJwAPH5KDF+vHAmACLoCdG2Adii6dOHnNJnTmZtoOGO8Q1jy1veMw6gbLFToQmfJa7nT7Al89mRbRkZZQxJTKgK5Kc9INzmTJFp0tpAPzNmyL/F08bX3nhCumM/cR/2RPn9emZ3VljokttZD1zVWXlUIqEU7SLk5I0lFRU0AcENXBYazNaVzsVHA/sD3o9hm42wbHIRb/BBQTKzAi8s3+bMtpOOZgLdQzCYPfX3UUxKd1WYVkGH7lh/RBBgMZZwXzU9+GYxdBqlGs0LP+DZ5g2BWNh6FAcR944B+K/JTWI3t9YyVyRhlP4CCoUk/mmF7+r2pilVBjxXBHFaBfBtr9hbVn2zDuI0kEOG3kBx8CGdPOjX1ph1POOZJUO1JEGG0jzUy2tK4X0CgVNYhmkqqQysRNtKuPdCJqK3WW57kaV17vXgiyPrl4KEEWgiGF1euI4QkSFHFf0TDroQiLNKJiLbdhH0YBhriRNCHPxSqJmNNoketaioohqMglh6wLtEGWSM1EZbQg72h0UJAIPVFCAJOThpQGGdKfFovcwEeiBuZHN2Ob4uVM7+gwZLz1D9E7ta4RmMZ24OBBAg7Eh6dLXGofZ4U2TFOCQMKjwhVckjrydRS+YaqCw1kYt6UexuzbNEDyYLTZnrY1PzsHZJT4U+awO2xlqTSYu6n/U29O2wPXgGOEKDMSq+zTUtyc8+6iLp0ivav4FKx+xxVy4FxhIF/pucVDqpsVe2jFOfdZhTzLz2QjtzvsTCvDPU7bzDH2eXVKUV9TZ+qFtaSSxnYgYdXKwVreIgvWhT9eGDB2OvnWyPLfIIIfNnfIxU8nW7MbcH05nhlsYtaW9EZRsxWcKdEqInq1DiZPKCz7iGmAU9/ccnnQud2pNgIGFYOTAWjhIrd63aPDgfj8/sdlD4l+UTlcxTI9jbaMqqN0gQxSHs60IAcW3cH4p3V1aSciTKB29L1tz2eUQhRiTgTvmqc+sGtBNh4ky0mQJGsdycBREP+fAaSs1EREDVo5gvgi5+aCN7NECw30owbCc1mSpjiahyNVwJd1jiGgzSwfTpzf2c5XJvG/g1n0fH88KHNnf+u7ZiRMlXueSIsloJBUtW9ezvsx9grfsX/FNxnbxU1Lvg0hLxixypHKGFAaPu0xCD8oDTeFSyfRT6s8109GMUZL8m2xXp8X2dpPCWWdX84iga4BrTlOfqox4shqEgh/Ht4qRst52cA1xOIUuOxgfUivp6v5f8IVyaryEdpVk72ERAwdT4aoY1usBgmP+0m06Q216H/nubtNYxHaOIYjcach3A8Ez/zc0KcShhel0HCYjFsA0FjYqyJ5ZUH1aZw3+zWC0hLpM6GDfcAdn9fq2orPmZbW6XXrf+Krc9RtvII5jeD3dFoT1KwZJwxfUMvc5KLfn8rROW23Jw89sJ2a5dpB3qWDUBWF2iX8OCuKprHosJ2mflBR+Wqs86VvgI/XMnsqb97+VlKdPVysczPj8Jhzf+WCvGBHijAqYlavbF60soMWlHbvKT+ScvhprgeTln51xX0sF+Eadc/l2s2a5BgkVbHYyz0E85p0LstqH+gEGiR84nBRRFIn8hLSZrGwqjZ3E29cuGi+5Z5bp7EM8MWFa9ssS/vy4VrDfECSv7DSU84DaP0sXI3Ap4lWznQ65nQoTKRWU30gd7Nn8ZowUvGIx4aqyXGwmA/PB4qN8msJUODezUHEl0VP9uo+cZ8vPFodSIB4C7lQYjEFj8yu49C2KIV3qxMFYTevG8KqAr0TPlkbzHHnTpDpvpzziAiNFh8xiT7C/TiyH0EguUw4vxAgpnE27WIypV+uFN2zW7xniF/n75trs9IJ5amB1zXXZ1LFkJ6GbS/dFokzl4cc2mamVwhL4XU0Av5gDWAl+aEWhAP7t2VIwU+EpvfOPDcLASX7H7lZpXA2XQfbSlD4qU18NffNPoAKMNSccBfO9YVVgmlW4RydBqfHAV7+hrZ84WJGho6bNT0YMhxxLdOx/dwGj0oyak9aAkNJ8lRJzUuA8sR+fPyiyTgUHio5+Pp+YaKlHrhR41jY5NESPS3x+zTMe0S2HnLOKCOQPpdxKyviBvdHrCDRqO+l96HhhNBLXWv4yEMuEUYo8kXnYJM8oIgVM4XJ+xXOev4YbWeqsvgq0lmw4/PiYr9sYLt+W5EAuYSFnJEan8CwJwbtASBfLBBpJZiRPor/aCJBZsM+MhvS7ZepyHvU8m5WSmaZnxuLts8ojl6KkS8oSAHkq5GWlCB/NgJ5W3rO2Cj1MK7ahxsCrbTT3a0V/QQH+sErxV4XUWDHx0kkFy25bPmBMBQ6BU3HoHhhYcJB9JhP6NXUWKxnE0raXHB6U9KHpWdQCQI72qevp5fMzcm+AvC85rsynVQhruDA9fp9COe7N56cg1UKGSas89vrN+WlGLYTwi5W+0xYdKEGtGCeNJwXKDU0XqU5uQYnWsMwTENLGtbQMvoGjIFIEMzCRal4rnBAg7D/CSn8MsCvS+FDJJAzoiioJEhZJgAp9n2+1Yznr7H+6eT4YkJ9Mpj60ImcW4i4iHDLn9RydB8dx3QYm3rsX6n4VRrZDsYK6DCGwkwd5n3/INFEpk16fYpP6JtMQpqEMzcOfQGAHXBTEGzuLJ03GYQL9bmV2/7ExDlRf+Uvf1sM2frRtCWmal12pMgtonvSCtR4n1CLUZRdTHDHP1Otwqd+rcdlavnKjUB/OYXQHUJzpNyFoKpQK+2OgrEKpGyIgIBgn2y9QHnTJihZOpEvOKIoHAMGAXHmj21Lym39Mbiow4IF+77xNuewziNVBxr6KD5e+9HzZSBIlUa/AmsDFJFXeyrQakR3FwowTGcADJHcEfhGkXYNGSYo4dh4bxwLM+28xjiqkdn0/3R4UEkvcBrBfn/SzBc1XhKM2VPlJgKSorjDac96V2UnQYXl1/yZPT4DVelgO+soMjexXwYO58VLl5xInQUZI8jc3H2CPnCNb9X05nOxIy4MlecasTqGK6s2az4RjpF2cQP2G28R+7wDPsZDZC/kWtjdoHC7SpdPmqQrUAhMwKVuxCmYTiD9q/O7GHtZvPSN0CAUQN/rymXZNniYLlJDE70bsk6Xxsh4kDOdxe7A2wo7P9F5YvqqRDI6brf79yPCSp4I0jVoO4YnLYtX5nzspR5WB4AKOYtR1ujXbOQpPyYDvfRE3FN5zw0i7reehdi7yV0YDRKRllGCGRk5Yz+Uv1fYl2ZwrnGsqsjgAVo0xEUba8ohjaNMJNwTwZA/wBDWFSCpg1eUH8MYL2zdioxRTqgGQrDZxQyNzyBJPXZF0+oxITJAbj7oNC5JwgDMUJaM5GqlGCWc//KCIrI+aclEe4IA0uzv7cuj6GCdaJONpi13O544vbtIHBF+A+JeDFUQNy61Gki3rtyQ4aUywn6ru314/dkGiP8Iwjo0J/2Txs49ZkwEl4mx+iYUUO55I6pJzU4P+7RRs+DXZkyKUYZqVWrPF4I94m4Wx1tXeE74o9GuX977yvJ/jkdak8+AmoHVjI15V+WwBdARFV2IPirJgVMdsg1Pez2VNHqa7EHWdTkl3XTcyjG9BiueWFvQfXI8aWSkuuRmqi/HUuzqyvLJfNfs0txMqldYYflWB1BS31WkuPJGGwXUCpjiQSktkuBMWwHjSkQxeehqw1Kgz0Trzm7QbtgxiEPDVmWCNCAeCfROTphd1ZNOhzLy6XfJyG6Xgd5MCAZw4xie0Sj5AnY1/akDgNS9YFl3Y06vd6FAsg2gVQJtzG7LVq1OH2frbXNHWH/NY89NNZ4QUSJqL2yEcGADbT38X0bGdukqYlSoliKOcsSTuqhcaemUeYLLoI8+MZor2RxXTRThF1LrHfqf/5LcLAjdl4EERgUysYS2geE+yFdasU91UgUDsc2cSQ1ZoT9+uLOwdgAmifwQqF028INc2IQEDfTmUw3eZxvz7Ud1z3xc1PQfeCvfKsB9jOhRj7rFyb9XcDWLcYj0bByosychMezMLVkFiYcdBBQtvI6K0KRuOZQH2kBsYHJaXTkup8F0eIhO1/GcIwWKpr2mouB7g5TUDJNvORXPXa/mU8bh27TAZYBe2sKx4NSv5OjnHIWD2RuysCzBlUfeNXhDd2jxnHoUlheJ3jBApzURy0fwm2FwwsSU0caQGl0Kv8hopRQE211NnvtLRsmCNrhhpEDoNiZEzD2QdJWKbRRWnaFedXHAELSN0t0bfsCsMf0ktfBoXBoNA+nZN9+pSlmuzspFevmsqqcMllzzvkyXrzoA+Ryo1ePXpdGOoJvhyru+EBRsmOp7MXZ0vNUMUqHLUoKglg1p73sWeZmPc+KAw0pE2zIsFFE5H4192KwDvDxdxEYoDBDNZjbg2bmADTeUKK57IPD4fTYF4c6EnXx/teYMORBDtIhPJneiZny7Nv/zG+YmekIKCoxr6kauE2bZtBLufetNG0BtBY7f+/ImUypMBvdWu/Q7vTMRzw5aQGZWuc1V0HEsItFYMIBnoKGZ0xcarba/TYZq50kCaflFysYjA4EDKHqGdpYWdKYmm+a7TADmW35yfnOYpZYrkpVEtiqF0EujI00aeplNs2k+qyFZNeE3CDPL9P6b4PQ/kataHkVpLSEVGK7EX6rAa7IVNrvZtFvOA6okKvBgMtFDAGZOx88MeBcJ8AR3AgUUeIznAN6tjCUipGDZONm1FjWJp4A3QIzSaIOmZ7DvF/ysYYbM/fFDOV0jntAjRdapxJxL0eThpEhKOjCDDq2ks+3GrwxqIFKLe1WdOzII8XIOPGnwy6LKXVfpSDOTEfaRsGujhpS4hBIsMOqHbl16PJxc4EkaVu9wpEYlF/84NSv5Zum4drMfp9yXbzzAOJqqS4YkI4cBrFrC7bMPiCfgI3nNZAqkk3QOZqR+yyqx+nDQKBBBZ7QKrfGMCL+XpqFaBJU0wpkBdAhbR4hJsmT5aynlvkouoxm/NjD5oe6BzVIO9uktM+/5dEC5P7vZvarmuO/lKXz4sBabVPIATuKTrwbJP8XUkdM6uEctHKXICUJGjaZIWRbZp8czquQYfY6ynBUCfIU+gG6wqSIBmYIm9pZpXdaL121V7q0VjDjmQnXvMe7ysoEZnZL15B0SpxS1jjd83uNIOKZwu5MPzg2NhOx3xMOPYwEn2CUzbSrwAs5OAtrz3GAaUkJOU74XwjaYUmGJdZBS1NJVkGYrToINLKDjxcuIlyfVsKQSG/G4DyiO2SlQvJ0d0Ot1uOG5IFSAkq+PRVMgVMDvOIJMdqjeCFKUGRWBW9wigYvcbU7CQL/7meF2KZAaWl+4y9uhowAX7elogAvItAAxo2+SFxGRsHGEW9BnhlTuWigYxRcnVUBRQHV41LV+Fr5CJYV7sHfeywswx4XMtUx6EkBhR+q8AXXUA8uPJ73Pb49i9KG9fOljvXeyFj9ixgbo6CcbAJ7WHWqKHy/h+YjBwp6VcN7M89FGzQ04qbrQtgrOFybg3gQRTYG5xn73ArkfQWjCJROwy3J38Dx/D7jOa6BBNsitEw1wGq780EEioOeD+ZGp2J66ADiVGMayiHYucMk8nTK2zzT9CnEraAk95kQjy4k0GRElLL5YAKLQErJ5rp1eay9O4Fb6yJGm9U4FaMwPGxtKD6odIIHKoWnhKo1U8KIpFC+MVn59ZXmc7ZTBZfsg6FQ8W10YfTr4u0nYrpHZbZ1jXiLmooF0cOm0+mPnJBXQtepc7n0BqOipNCqI6yyloTeRShNKH04FIo0gcMk0H/xThyN4pPAWjDDkEp3lNNPRNVfpMI44CWRlRgViP64eK0JSRp0WUvCWYumlW/c58Vcz/yMwVcW5oYb9+26TEhwvbxiNg48hl1VI1UXTU//Eta+BMKnGUivctfL5wINDD0giQL1ipt6U7C9cd4+lgqY2lMUZ02Uv6Prs+ZEZer7ZfWBXVghlfOOrClwsoOFKzWEfz6RZu1eCs+K8fLvkts5+BX0gyrFYve0C3qHrn5U/Oh6D/CihmWIrY7HUZRhJaxde+tldu6adYJ+LeXupQw0XExC36RETdNFxcq9glMu4cNQSX9cqR/GQYp+IxUkIcNGWVU7ZtGa6P3XAyodRt0XeS3Tp01AnCh0ZbUh4VrSZeV9RWfSoWyxnY3hzcZ30G/InDq4wxRrEejreBxnhIQbkxenxkaxl+k7eLUQkUR6vKJ2iDFNGX3WmVA1yaOH+mvhBd+sE6vacQzFobwY5BqEAFmejwW5ne7HtVNolOUgJc8CsUxmc/LBi8N5mu9VsIA5HyErnS6zeCz7VLI9+n/hbT6hTokMXTVyXJRKSG2hd2labXTbtmK4fNH3IZBPreSA4FMeVouVN3zG5x9CiGpLw/3pceo4qGqp+rVp+z+7yQ98oEf+nyH4F3+J9IheDBa94Wi63zJbLBCIZm7P0asHGpIJt3PzE3m0S4YIWyXBCVXGikj8MudDPB/6Nm2v4IxJ5gU0ii0guy5SUHqGUYzTP0jIJU5E82RHUXtX4lDdrihBLdP1YaG1AGUC12rQKuIaGvCpMjZC9bWSCYnjDlvpWbkdXMTNeBHLKiuoozMGIvkczmP0aRJSJ8PYnLCVNhKHXBNckH79e8Z8Kc2wUej4sQZoH8qDRGkg86maW/ZQWGNnLcXmq3FlXM6ssR/3P6E/bHMvm6HLrv1yRixit25JsH3/IOr2UV4BWJhxXW5BJ6Xdr07n9kF3ZNAk6/Xpc5MSFmYJ2R7bdL8Kk7q1OU9Elg/tCxJ8giT27wSTySF0GOxg4PbYJdi/Nyia9Nn89CGDulfJemm1aiEr/eleGSN+5MRrVJ4K6lgyTTIW3i9cQ0dAi6FHt0YMbH3wDSAtGLSAccezzxHitt1QdhW36CQgPcA8vIIBh3/JNjf/Obmc2yzpk8edSlS4lVdwgW5vzbYEyFoF4GCBBby1keVNueHAH+evi+H7oOVfS3XuPQSNTXOONAbzJeSb5stwdQHl1ZjrGoE49I8+A9j3t+ahhQj74FCSWpZrj7wRSFJJnnwi1T9HL5qrCFW/JZq6P62XkMWTb+u4lGpKfmmwiJWx178GOG7KbrZGqyWwmuyKWPkNswkZ1q8uptUlviIi+AXh2bOOTOLsrtNkfqbQJeh24reebkINLkjut5r4d9GR/r8CBa9SU0UQhsnZp5cP+RqWCixRm7i4YRFbtZ4EAkhtNa6jHb6gPYQv7MKqkPLRmX3dFsK8XsRLVZ6IEVrCbmNDc8o5mqsogjAQfoC9Bc7R6gfw03m+lQpv6kTfhxscDIX6s0w+fBxtkhjXAXr10UouWCx3C/p/FYwJRS/AXRKkjOb5CLmK4XRe0+xeDDwVkJPZau52bzLEDHCqV0f44pPgKOkYKgTZJ33fmk3Tu8SdxJ02SHM8Fem5SMsWqRyi2F1ynfRJszcFKykdWlNqgDA/L9lKYBmc7Zu/q9ii1FPF47VJkqhirUob53zoiJtVVRVwMR34gV9iqcBaHbRu9kkvqk3yMpfRFG49pKKjIiq7h/VpRwPGTHoY4cg05X5028iHsLvUW/uz+kjPyIEhhcKUwCkJAwbR9pIEGOn8z6svAO8i89sJ3dL5qDWFYbS+HGPRMxYwJItFQN86YESeJQhn2urGiLRffQeLptDl8dAgb+Tp47UQPxWOw17OeChLN1WnzlkPL1T5O+O3Menpn4C3IY5LEepHpnPeZHbvuWfeVtPlkH4LZjPbBrkJT3NoRJzBt86CO0Xq59oQ+8dsm0ymRcmQyn8w71mhmcuEI5byuF+C88VPYly2sEzjlzAQ3vdn/1+Hzguw6qFNNbqenhZGbdiG6RwZaTG7jTA2X9RdXjDN9yj1uQpyO4Lx8KRAcZcbZMafp4wPOd5MdXoFY52V1A8M9hi3sso93+uprE0qYNMjkE22CvK4HuUxqN7oIz5pWuETq1lQAjqlSlqdD2Rnr/ggp/TVkQYjn9lMfYelk2sH5HPdopYo7MHwlV1or9Bxf+QCyLzm92vzG2wjiIjC/ZHEJzeroJl6bdFPTpZho5MV2U86fLQqxNlGIMqCGy+9WYhJ8ob1r0+Whxde9L2PdysETv97O+xVw+VNN1TZSQN5I6l9m5Ip6pLIqLm4a1B1ffH6gHyqT9p82NOjntRWGIofO3bJz5GhkvSWbsXueTAMaJDou99kGLqDlhwBZNEQ4mKPuDvVwSK4WmLluHyhA97pZiVe8g+JxmnJF8IkV/tCs4Jq/HgOoAEGR9tCDsDbDmi3OviUQpG5D8XmKcSAUaFLRXb2lmJTNYdhtYyfjBYZQmN5qT5CNuaD3BVnlkCk7bsMW3AtXkNMMTuW4HjUERSJnVQ0vsBGa1wo3Qh7115XGeTF3NTz8w0440AgU7c3bSXO/KMINaIWXd0oLpoq/0/QJxCQSJ9XnYy1W7TYLBJpHsVWD1ahsA7FjNvRd6mxCiHsm8g6Z0pnzqIpF1dHUtP2ITU5Z1hZHbu+L3BEEStBbL9XYvGfEakv1bmf+bOZGnoiuHEdlBnaChxYKNzB23b8sw8YyT7Ajxfk49eJIAvdbVkdFCe2J0gMefhQ0bIZxhx3fzMIysQNiN8PgOUKxOMur10LduigREDRMZyP4oGWrP1GFY4t6groASsZ421os48wAdnrbovNhLt7ScNULkwZ5AIZJTrbaKYTLjA1oJ3sIuN/aYocm/9uoQHEIlacF1s/TM1fLcPTL38O9fOsjMEIwoPKfvt7opuI9G2Hf/PR4aCLDQ7wNmIdEuXJ/QNL72k5q4NejAldPfe3UVVqzkys8YZ/jYOGOp6c+YzRCrCuq0M11y7TiN6qk7YXRMn/gukxrEimbMQjr3jwRM6dKVZ4RUfWQr8noPXLJq6yh5R3EH1IVOHESst/LItbG2D2vRsZRkAObzvQAAD3mb3/G4NzopI0FAiHfbpq0X72adg6SRj+8OHMShtFxxLZlf/nLgRLbClwl5WmaYSs+yEjkq48tY7Z2bE0N91mJwt+ua0NlRJIDh0HikF4UvSVorFj2YVu9YeS5tfvlVjPSoNu/Zu6dEUfBOT555hahBdN3Sa5Xuj2Rvau1lQNIaC944y0RWj9UiNDskAK1WoL+EfXcC6IbBXFRyVfX/WKXxPAwUyIAGW8ggZ08hcijKTt1YKnUO6QPvcrmDVAb0FCLIXn5id4fD/Jx4tw/gbXs7WF9b2RgXtPhLBG9vF5FEkdHAKrQHZAJC/HWvk7nvzzDzIXZlfFTJoC3JpGgLPBY7SQTjGlUvG577yNutZ1hTfs9/1nkSXK9zzKLRZ3VODeKUovJe0WCq1zVMYxCJMenmNzPIU2S8TA4E7wWmbNkxq9rI2dd6v0VpcAPVMxnDsvWTWFayyqvKZO7Z08a62i/oH2/jxf8rpmfO64in3FLiL1GX8IGtVE9M23yGsIqJbxDTy+LtaMWDaPqkymb5VrQdzOvqldeU0SUi6IirG8UZ3jcpRbwHa1C0Dww9G/SFX3gPvTJQE+kyz+g1BeMILKKO+olcHzctOWgzxYHnOD7dpCRtuZEXACjgqesZMasoPgnuDC4nUviAAxDc5pngjoAITIkvhKwg5d608pdrZcA+qn5TMT6Uo/QzBaOxBCLTJX3Mgk85rMfsnWx86oLxf7p2PX5ONqieTa/qM3tPw4ZXvlAp83NSD8F7+ZgctK1TpoYwtiU2h02HCGioH5tkVCqNVTMH5p00sRy2JU1qyDBP2CII/Dg4WDsIl+zgeX7589srx6YORRQMBfKbodbB743Tl4WLKOEnwWUVBsm94SOlCracU72MSyj068wdpYjyz1FwC2bjQnxnB6Mp/pZ+yyZXtguEaYB+kqhjQ6UUmwSFazOb+rhYjLaoiM+aN9/8KKn0zaCTFpN9eKwWy7/u4EHzO46TdFSNjMfn2iPSJwDPCFHc0I1+vjdAZw5ZjqR/uzi9Zn20oAa5JnLEk/EA3VRWE7J/XrupfFJPtCUuqHPpnlL7ISJtRpSVcB8qsZCm2QEkWoROtCKKxUh3yEcMbWYJwk6DlEBG0bZP6eg06FL3v6RPb7odGuwm7FN8fG4woqtB8e7M5klPpo97GoObNwt+ludTAmxyC5hmcFx+dIvEZKI6igFKHqLH01iY1o7903VzG9QGetyVx5RNmBYUU+zIuSva/yIcECUi4pRmE3VkF2avqulQEUY4yZ/wmNboBzPmAPey3+dSYtBZUjeWWT0pPwCz4Vozxp9xeClIU60qvEFMQCaPvPaA70WlOP9f/ey39macvpGCVa+zfa8gO44wbxpJUlC8GN/pRMTQtzY8Z8/hiNrU+Zq64ZfFGIkdj7m7abcK1EBtws1X4J/hnqvasPvvDSDYWN+QcQVGMqXalkDtTad5rYY0TIR1Eqox3czwPMjKPvF5sFv17Thujr1IZ1Ytl4VX1J0vjXKmLY4lmXipRAro0qVGEcXxEVMMEl54jQMd4J7RjgomU0j1ptjyxY+cLiSyXPfiEcIS2lWDK3ISAy6UZ3Hb5vnPncA94411jcy75ay6B6DSTzK6UTCZR9uDANtPBrvIDgjsfarMiwoax2OlLxaSoYn4iRgkpEGqEkwox5tyI8aKkLlfZ12lO11TxsqRMY89j5JaO55XfPJPDL1LGSnC88Re9Ai+Nu5bZjtwRrvFITUFHPR4ZmxGslQMecgbZO7nHk32qHxYkdvWpup07ojcMCaVrpFAyFZJJbNvBpZfdf39Hdo2kPtT7v0/f8R/B5Nz4f1t9/3zNM/7n6SUHfcWk5dfQFJvcJMgPolGCpOFb/WC0FGWU2asuQyT+rm88ZKZ78Cei/CAh939CH0JYbpZIPtxc2ufXqjS3pHH9lnWK4iJ7OjR/EESpCo2R3MYKyE7rHfhTvWho4cL1QdN4jFTyR6syMwFm124TVDDRXMNveI1Dp/ntwdz8k8kxw7iFSx6+Yx6O+1LzMVrN0BBzziZi9kneZSzgollBnVwBh6oSOPHXrglrOj+QmR/AESrhDpKrWT+8/AiMDxS/5wwRNuGQPLlJ9ovomhJWn8sMLVItQ8N/7IXvtD8kdOoHaw+vBSbFImQsv/OCAIui99E+YSIOMlMvBXkAt+NAZK8wB9Jf8CPtB+TOUOR+z71d/AFXpPBT6+A5FLjxMjLIEoJzrQfquvxEIi+WoUzGR1IzQFNvbYOnxb2PyQ0kGdyXKzW2axQL8lNAXPk6NEjqrRD1oZtKLlFoofrXw0dCNWASHzy+7PSzOUJ3XtaPZsxLDjr+o41fKuKWNmjiZtfkOzItvlV2MDGSheGF0ma04qE3TUEfqJMrXFm7DpK+27DSvCUVf7rbNoljPhha5W7KBqVq0ShUSTbRmuqPtQreVWH4JET5yMhuqMoSd4r/N8sDmeQiQQvi1tcZv7Moc7dT5X5AtCD6kNEGZOzVcNYlpX4AbTsLgSYYliiPyVoniuYYySxsBy5cgb3pD+EK0Gpb0wJg031dPgaL8JZt6sIvzNPEHfVPOjXmaXj4bd4voXzpZ5GApMhILgMbCEWZ2zwgdeQgjNHLbPIt+KqxRwWPLTN6HwZ0Ouijj4UF+Sg0Au8XuIKW0WxlexdrFrDcZJ8Shauat3X0XmHygqgL1nAu2hrJFb4wZXkcS+i36KMyU1yFvYv23bQUJi/3yQpqr/naUOoiEWOxckyq/gq43dFou1DVDaYMZK9tho7+IXXokBCs5GRfOcBK7g3A+jXQ39K4YA8PBRW4m5+yR0ZAxWJncjRVbITvIAPHYRt1EJ3YLiUbqIvoKHtzHKtUy1ddRUQ0AUO41vonZDUOW+mrszw+SW/6Q/IUgNpcXFjkM7F4CSSQ2ExZg85otsMs7kqsQD4OxYeBNDcSpifjMoLb7GEbGWTwasVObmB/bfPcUlq0wYhXCYEDWRW02TP5bBrYsKTGWjnWDDJ1F7zWai0zW/2XsCuvBQjPFcTYaQX3tSXRSm8hsAoDdjArK/OFp6vcWYOE7lizP0Yc+8p16i7/NiXIiiQTp7c7Xus925VEtlKAjUdFhyaiLT7VxDagprMFwix4wZ05u0qj7cDWFd0W9OYHIu3JbJKMXRJ1aYNovugg+QqRN7fNHSi26VSgBpn+JfMuPo3aeqPWik/wI5Rz3BWarPQX4i5+dM0npwVOsX+KsOhC7vDg+OJsz4Q5zlnIeflUWL6QYMbf9WDfLmosLF4Qev3mJiOuHjoor/dMeBpA9iKDkMjYBNbRo414HCxjsHrB4EXNbHzNMDHCLuNBG6Sf+J4MZ/ElVsDSLxjIiGsTPhw8BPjxbfQtskj+dyNMKOOcUYIRBEIqbazz3lmjlRQhplxq673VklMMY6597vu+d89ec/zq7Mi4gQvh87ehYbpOuZEXj5g/Q7S7BFDAAB9DzG35SC853xtWVcnZQoH54jeOqYLR9NDuwxsVthTV7V99n/B7HSbAytbEyVTz/5NhJ8gGIjG0E5j3griULUd5Rg7tQR+90hJgNQKQH2btbSfPcaTOfIexc1db1BxUOhM1vWCpLaYuKr3FdNTt/T3PWCpEUWDKEtzYrjpzlL/wri3MITKsFvtF8QVV/NhVo97aKIBgdliNc10dWdXVDpVtsNn+2UIolrgqdWA4EY8so0YvB4a+aLzMXiMAuOHQrXY0tr+CL10JbvZzgjJJuB1cRkdT7DUqTvnswVUp5kkUSFVtIIFYK05+tQxT6992HHNWVhWxUsD1PkceIrlXuUVRogwmfdhyrf6zzaL8+c0L7GXMZOteAhAVQVwdJh+7nrX7x4LaIIfz2F2v7Dg/uDfz2Fa+4gFm2zHAor8UqimJG3VTJtZEoFXhnDYXvxMJFc6ku2bhbCxzij2z5UNuK0jmp1mnvkVNUfR+SEmj1Lr94Lym75PO7Fs0MIr3GdsWXRXSfgLTVY0FLqba97u1In8NAcY7IC6TjWLigwKEIm43NxTdaVTv9mcKkzuzBkKd8x/xt1p/9BbP7Wyb4bpo1K1gnOpbLvKz58pWl3B55RJ/Z5mRDLPtNQg14jdOEs9+h/V5UVpwrAI8kGbX8KPVPDIMfIqKDjJD9UyDOPhjZ3vFAyecwyq4akUE9mDOtJEK1hpDyi6Ae87sWAClXGTiwPwN7PXWwjxaR79ArHRIPeYKTunVW24sPr/3HPz2IwH8oKH4OlWEmt4BLM6W5g4kMcYbLwj2usodD1088stZA7VOsUSpEVl4w7NMb1EUHMRxAxLF0CIV+0L3iZb+ekB1vSDSFjAZ3hfLJf7gFaXrOKn+mhR+rWw/eTXIcAgl4HvFuBg1LOmOAwJH3eoVEjjwheKA4icbrQCmvAtpQ0mXG0agYp5mj4Rb6mdQ+RV4QBPbxMqh9C7o8nP0Wko2ocnCHeRGhN1XVyT2b9ACsL+6ylUy+yC3QEnaKRIJK91YtaoSrcWZMMwxuM0E9J68Z+YyjA0g8p1PfHAAIROy6Sa04VXOuT6A351FOWhKfTGsFJ3RTJGWYPoLk5FVK4OaYR9hkJvezwF9vQN1126r6isMGXWTqFW+3HL3I/jurlIdDWIVvYY+s6yq7lrFSPAGRdnU7PVwY/SvWbZGpXzy3BQ2LmAJlrONUsZs4oGkly0V267xbD5KMY8woNNsmWG1VVgLCra8aQBBcI4DP2BlNwxhiCtHlaz6OWFoCW0vMR3ErrG7JyMjTSCnvRcsEHgmPnwA6iNpJ2DrFb4gLlhKJyZGaWkA97H6FFdwEcLT6DRQQL++fOkVC4cYGW1TG/3iK5dShRSuiBulmihqgjR45Vi03o2RbQbP3sxt90VxQ6vzdlGfkXmmKmjOi080JSHkLntjvsBJnv7gKscOaTOkEaRQqAnCA4HWtB4XnMtOhpRmH2FH8tTXrIjAGNWEmudQLCkcVlGTQ965Kh0H6ixXbgImQP6b42B49sO5C8pc7iRlgyvSYvcnH9FgQ3azLbQG2cUW96SDojTQStxkOJyOuDGTHAnnWkz29aEwN9FT8EJ4yhXOg+jLTrCPKeEoJ9a7lDXOjEr8AgX4BmnMQ668oW0zYPyQiVMPxKRHtpfnEEyaKhdzNVThlxxDQNdrHeZiUFb6NoY2KwvSb7BnRcpJy+/g/zAYx3fYSN5QEaVD2Y1VsNWxB0BSO12MRsRY8JLfAezRMz5lURuLUnG1ToKk6Q30FughqWN6gBNcFxP/nY/iv+iaUQOa+2Nuym46wtI/DvSfzSp1jEi4SdYBE7YhTiVV5cX9gwboVDMVgZp5YBQlHOQvaDNfcCoCJuYhf5kz5kwiIKPjzgpcRJHPbOhJajeoeRL53cuMahhV8Z7IRr6M4hW0JzT7mzaMUzQpm866zwM7Cs07fJYXuWvjAMkbe5O6V4bu71sOG6JQ4oL8zIeXHheFVavzxmlIyBkgc9IZlEDplMPr8xlcyss4pVUdwK1e7CK2kTsSdq7g5SHRAl3pYUB9Ko4fsh4qleOyJv1z3KFSTSvwEcRO/Ew8ozEDYZSqpfoVW9uhJfYrNAXR0Z3VmeoAD+rVWtwP/13sE/3ICX3HhDG3CMc476dEEC0K3umSAD4j+ZQLVdFOsWL2C1TH5+4KiSWH+lMibo+B55hR3Gq40G1n25sGcN0mEcoU2wN9FCVyQLBhYOu9aHVLWjEKx2JIUZi5ySoHUAI9b8hGzaLMxCZDMLhv8MkcpTqEwz9KFDpCpqQhVmsGQN8m24wyB82FAKNmjgfKRsXRmsSESovAwXjBIoMKSG51p6Um8b3i7GISs7kjTq/PZoioCfJzfKdJTN0Q45kQEQuh9H88M3yEs3DbtRTKALraM0YC8laiMiOOe6ADmTcCiREeAWZelBaEXRaSuj2lx0xHaRYqF65O0Lo5OCFU18A8cMDE4MLYm9w2QSr9NgQAIcRxZsNpA7UJR0e71JL+VU+ISWFk5I97lra8uGg7GlQYhGd4Gc6rxsLFRiIeGO4abP4S4ekQ1fiqDCy87GZHd52fn5aaDGuvOmIofrzpVwMvtbreZ/855OaXTRcNiNE0wzGZSxbjg26v8ko8L537v/XCCWP2MFaArJpvnkep0pA+O86MWjRAZPQRfznZiSIaTppy6m3p6HrNSsY7fDtz7Cl4V/DJAjQDoyiL2uwf1UHVd2AIrzBUSlJaTj4k6NL97a/GqhWKU9RUmjnYKpm2r+JYUcrkCuZKvcYvrg8pDoUKQywY9GDWg03DUFSirlUXBS5SWn/KAntnf0IdHGL/7mwXqDG+LZYjbEdQmqUqq4y54TNmWUP7IgcAw5816YBzwiNIJiE9M4lPCzeI/FGBeYy3p6IAmH4AjXXmvQ4Iy0Y82NTobcAggT2Cdqz6Mx4TdGoq9fn2etrWKUNFyatAHydQTVUQ2S5OWVUlugcNvoUrlA8cJJz9MqOa/W3iVno4zDHfE7zhoY5f5lRTVZDhrQbR8LS4eRLz8iPMyBL6o4PiLlp89FjdokQLaSBmKHUwWp0na5fE3v9zny2YcDXG/jfI9sctulHRbdkI5a4GOPJx4oAJQzVZ/yYAado8KNZUdEFs9ZPiBsausotXMNebEgr0dyopuqfScFJ3ODNPHgclACPdccwv0YJGQdsN2lhoV4HVGBxcEUeUX/alr4nqpcc1CCR3vR7g40zteQg/JvWmFlUE4mAiTpHlYGrB7w+U2KdSwQz2QJKBe/5eiixWipmfP15AFWrK8Sh1GBBYLgzki1wTMhGQmagXqJ2+FuqJ8f0XzXCVJFHQdMAw8xco11HhM347alrAu+wmX3pDFABOvkC+WPX0Uhg1Z5MVHKNROxaR84YV3s12UcM+70cJ460SzEaKLyh472vOMD3XnaK7zxZcXlWqenEvcjmgGNR2OKbI1s8U+iwiW+HotHalp3e1MGDy6BMVIvajnAzkFHbeVsgjmJUkrP9OAwnEHYXVBqYx3q7LvXjoVR0mY8h+ZaOnh053pdsGkmbqhyryN01eVHySr+CkDYkSMeZ1xjPNVM+gVLTDKu2VGsMUJqWO4TwPDP0VOg2/8ITbAUaMGb4LjL7L+Pi11lEVMXTYIlAZ/QHmTENjyx3kDkBdfcvvQt6tKk6jYFM4EG5UXDTaF5+1ZjRz6W7MdJPC+wTkbDUim4p5QQH3b9kGk2Bkilyeur8Bc20wm5uJSBO95GfYDI1EZipoRaH7uVveneqz43tlTZGRQ4a7CNmMHgXyOQQOL6WQkgMUTQDT8vh21aSdz7ERiZT1jK9F+v6wgFvuEmGngSvIUR2CJkc5tx1QygfZnAruONobB1idCLB1FCfO7N1ZdRocT8/Wye+EnDiO9pzqIpnLDl4bkaRKW+ekBVwHn46Shw1X0tclt/0ROijuUB4kIInrVJU4buWf4YITJtjOJ6iKdr1u+flgQeFH70GxKjhdgt/MrwfB4K/sXczQ+9zYcrD4dhY6qZhZ010rrxggWA8JaZyg2pYij8ieYEg1aZJkZK9O1Re7sB0iouf60rK0Gd+AYlp7soqCBCDGwfKeUQhCBn0E0o0GS6PdmjLi0TtCYZeqazqwN+yNINIA8Lk3iPDnWUiIPLGNcHmZDxfeK0iAdxm/T7LnN+gemRL61hHIc0NCAZaiYJR+OHnLWSe8sLrK905B5eEJHNlWq4RmEXIaFTmo49f8w61+NwfEUyuJAwVqZCLFcyHBKAcIVj3sNzfEOXzVKIndxHw+AR93owhbCxUZf6Gs8cz6/1VdrFEPrv330+9s6BtMVPJ3zl/Uf9rUi0Z/opexfdL3ykF76e999GPfVv8fJv/Y/+/5hEMon1tqNFyVRevV9y9/uIvsG3dbB8GRRrgaEXfhx+2xeOFt+cEn3RZanNxdEe2+B6MHpNbrRE53PlDifPvFcp4kO78ILR0T4xyW/WGPyBsqGdoA7zJJCu1TKbGfhnqgnRbxbB2B3UZoeQ2bz2sTVnUwokTcTU21RxN1PYPS3Sar7T0eRIsyCNowr9amwoMU/od9s2APtiKNL6ENOlyKADstAEWKA+sdKDhrJ6BOhRJmZ+QJbAaZ3/5Fq0/lumCgEzGEbu3yi0Y4I4EgVAjqxh4HbuQn0GrRhOWyAfsglQJAVL1y/6yezS2k8RE2MstJLh92NOB3GCYgFXznF4d25qiP4ZCyI4RYGesut6FXK6GwPpKK8WHEkhYui0AyEmr5Ml3uBFtPFdnioI8RiCooa7Z1G1WuyIi3nSNglutc+xY8BkeW3JJXPK6jd2VIMpaSxpVtFq+R+ySK9J6WG5Qvt+C+QH1hyYUOVK7857nFmyDBYgZ/o+AnibzNVqyYCJQvyDXDTK+iXdkA71bY7TL3bvuLxLBQ8kbTvTEY9aqkQ3+MiLWbEgjLzOH+lXgco1ERgzd80rDCymlpaRQbOYnKG/ODoFl46lzT0cjM5FYVvv0qLUbD5lyJtMUaC1pFlTkNONx6lliaX9o0i/1vws5bNKn5OuENQEKmLlcP4o2ZmJjD4zzd3Fk32uQ4uRWkPSUqb4LBe3EXHdORNB2BWsws5daRnMfNVX7isPSb1hMQdAJi1/qmDMfRUlCU74pmnzjbXfL8PVG8NsW6IQM2Ne23iCPIpryJjYbVnm5hCvKpMa7HLViNiNc+xTfDIaKm3jctViD8A1M9YPJNk003VVr4Zo2MuGW8vil8SLaGpPXqG7I4DLdtl8a4Rbx1Lt4w5Huqaa1XzZBtj208EJVGcmKYEuaeN27zT9EE6a09JerXdEbpaNgNqYJdhP1NdqiPKsbDRUi86XvvNC7rME5mrSQtrzAZVndtSjCMqd8BmaeGR4l4YFULGRBeXIV9Y4yxLFdyoUNpiy2IhePSWzBofYPP0eIa2q5JP4j9G8at/AqoSsLAUuRXtvgsqX/zYwsE+of6oSDbUOo4RMJw+DOUTJq+hnqwKim9Yy/napyZNTc2rCq6V9jHtJbxGPDwlzWj/Sk3zF/BHOlT/fSjSq7FqlPI1q6J+ru8Aku008SFINXZfOfnZNOvGPMtEmn2gLPt+H4QLA+/SYe4j398auzhKIp2Pok3mPC5q1IN1HgR+mnEfc4NeeHYwd2/kpszR3cBn7ni9NbIqhtSWFW8xbUJuUPVOeeXu3j0IGZmFNiwaNZ6rH4/zQ2ODz6tFxRLsUYZu1bfd1uIvfQDt4YD/efKYv8VF8bHGDgK22w2Wqwpi43vNCOXFJZCGMqWiPbL8mil6tsmOTXAWCyMCw73e2rADZj2IK6rqksM3EXF2cbLb4vjB14wa/yXK5vwU+05MzERJ5nXsXsW21o7M+gO0js2OyKciP5uF2iXyb2DiptwQeHeqygkrNsqVCSlldxBMpwHi1vfc8RKpP/4L3Lmpq6DZcvhDDfxTCE3splacTcOtXdK2g303dIWBVe2wD/Gvja1cClFQ67gw0t1ZUttsUgQ1Veky8oOpS6ksYEc4bqseCbZy766SvL3FodmnahlWJRgVCNjPxhL/fk2wyvlKhITH/VQCipOI0dNcRa5B1M5HmOBjTLeZQJy237e2mobwmDyJNHePhdDmiknvLKaDbShL+Is1XTCJuLQd2wmdJL7+mKvs294whXQD+vtd88KKk0DXP8B1Xu9J+xo69VOuFgexgTrcvI6SyltuLix9OPuE6/iRJYoBMEXxU4shQMf4Fjqwf1PtnJ/wWSZd29rhZjRmTGgiGTAUQqRz+nCdjeMfYhsBD5Lv60KILWEvNEHfmsDs2L0A252351eUoYxAysVaCJVLdH9QFWAmqJDCODUcdoo12+gd6bW2boY0pBVHWL6LQDK5bYWh1V8vFvi0cRpfwv7cJiMX3AZNJuTddHehTIdU0YQ/sQ1dLoF2xQPcCuHKiuCWOY30DHe1OwcClLAhqAKyqlnIbH/8u9ScJpcS4kgp6HKDUdiOgRaRGSiUCRBjzI5gSksMZKqy7Sd51aeg0tgJ+x0TH9YH2Mgsap9N7ENZdEB0bey2DMTrBA1hn56SErNHf3tKtqyL9b6yXEP97/rc+jgD2N1LNUH6RM9AzP3kSipr06RkKOolR7HO768jjWiH1X92jA7dkg7gcNcjqsZCgfqWw0tPXdLg20cF6vnQypg7gLtkazrHAodyYfENPQZsdfnjMZiNu4nJO97D1/sQE+3vNFzrSDOKw+keLECYf7RJwVHeP/j79833oZ0egonYB2FlFE5qj02B/LVOMJQlsB8uNg3Leg4qtZwntsOSNidR0abbZmAK4sCzvt8Yiuz2yrNCJoH5O8XvX/vLeR/BBYTWj0sOPYM/jyxRd5+/JziKAABaPcw/34UA3aj/gLZxZgRCWN6m4m3demanNgsx0P237/Q+Ew5VYnJPkyCY0cIVHoFn2Ay/e7U4P19APbPFXEHX94N6KhEMPG7iwB3+I+O1jd5n6VSgHegxgaSawO6iQCYFgDsPSMsNOcUj4q3sF6KzGaH/0u5PQoAj/8zq6Uc9MoNrGqhYeb2jQo0WlGlXjxtanZLS24/OIN5Gx/2g684BPDQpwlqnkFcxpmP/osnOXrFuu4PqifouQH0eF5qCkvITQbJw/Zvy5mAHWC9oU+cTiYhJmSfKsCyt1cGVxisKu+NymEQIAyaCgud/V09qT3nk/9s/SWsYtha7yNpzBIMM40rCSGaJ9u6lEkl00vXBiEt7p9P5IBCiavynEOv7FgLqPdeqxRiCwuFVMolSIUBcoyfUC2e2FJSAUgYdVGFf0b0Kn2EZlK97yyxrT2MVgvtRikfdaAW8RwEEfN+B7/eK8bBdp7URpbqn1xcrC6d2UjdsKbzCjBFqkKkoZt7Mrhg6YagE7spkqj0jOrWM+UGQ0MUlG2evP1uE1p2xSv4dMK0dna6ENcNUF+xkaJ7B764NdxLCpuvhblltVRAf7vK5qPttJ/9RYFUUSGcLdibnz6mf7WkPO3MkUUhR2mAOuGv8IWw5XG1ZvoVMnjSAZe6T7WYA99GENxoHkMiKxHlCuK5Gd0INrISImHQrQmv6F4mqU/TTQ8nHMDzCRivKySQ8dqkpQgnUMnwIkaAuc6/FGq1hw3b2Sba398BhUwUZSAIO8XZvnuLdY2n6hOXws+gq9BHUKcKFA6kz6FDnpxLPICa3qGhnc97bo1FT/XJk48LrkHJ2CAtBv0RtN97N21plfpXHvZ8gMJb7Zc4cfI6MbPwsW7AilCSXMFIEUEmir8XLEklA0ztYbGpTTGqttp5hpFTTIqUyaAIqvMT9A/x+Ji5ejA4Bhxb/cl1pUdOD6epd3yilIdO6j297xInoiBPuEDW2/UfslDyhGkQs7Wy253bVnlT+SWg89zYIK/9KXFl5fe+jow2rd5FXv8zDPrmfMXiUPt9QBO/iK4QGbX5j/7Rx1c1vzsY8ONbP3lVIaPrhL4+1QrECTN3nyKavGG0gBBtHvTKhGoBHgMXHStFowN+HKrPriYu+OZ05Frn8okQrPaaxoKP1ULCS/cmKFN3gcH7HQlVjraCeQmtjg1pSQxeuqXiSKgLpxc/1OiZsU4+n4lz4hpahGyWBURLi4642n1gn9qz9bIsaCeEPJ0uJmenMWp2tJmIwLQ6VSgDYErOeBCfSj9P4G/vI7oIF+l/n5fp956QgxGvur77ynawAu3G9MdFbJbu49NZnWnnFcQHjxRuhUYvg1U/e84N4JTecciDAKb/KYIFXzloyuE1eYXf54MmhjTq7B/yBToDzzpx3tJCTo3HCmVPYfmtBRe3mPYEE/6RlTIxbf4fSOcaKFGk4gbaUWe44hVk9SZzhW80yfW5QWBHxmtUzvMhfVQli4gZTktIOZd9mjJ5hsbmzttaHQB29Am3dZkmx3g/qvYocyhZ2PXAWsNQiIaf+Q8W/MWPIK7/TjvCx5q2XRp4lVWydMc2wIQkhadDB0xsnw/kSEyGjLKjI4coVIwtubTF3E7MJ6LS6UOsJKj82XVAVPJJcepfewbzE91ivXZvOvYfsmMevwtPpfMzGmC7WJlyW2j0jh7AF1JLmwEJSKYwIvu6DHc3YnyLH9ZdIBnQ+nOVDRiP+REpqv++typYHIvoJyICGA40d8bR7HR2k7do6UQTHF4oriYeIQbxKe4Th6+/l1BjUtS9hqORh3MbgvYrStXTfSwaBOmAVQZzpYNqsAmQyjY56MUqty3c/xH6GuhNvNaG9vGbG6cPtBM8UA3e8r51D0AR9kozKuGGSMgLz3nAHxDNnc7GTwpLj7/6HeWp1iksDeTjwCLpxejuMtpMnGJgsiku1sOACwQ9ukzESiDRN77YNESxR5LphOlcASXA5uIts1LnBIcn1J7BLWs49DMALSnuz95gdOrTZr0u1SeYHinno/pE58xYoXbVO/S+FEMMs5qyWkMnp8Q3ClyTlZP52Y9nq7b8fITPuVXUk9ohG5EFHw4gAEcjFxfKb3xuAsEjx2z1wxNbSZMcgS9GKyW3R6KwJONgtA64LTyxWm8Bvudp0M1FdJPEGopM4Fvg7G/hsptkhCfHFegv4ENwxPeXmYhxwZy7js+BeM27t9ODBMynVCLJ7RWcBMteZJtvjOYHb5lOnCLYWNEMKC59BA7covu1cANa2PXL05iGdufOzkgFqqHBOrgQVUmLEc+Mkz4Rq8O6WkNr7atNkH4M8d+SD1t/tSzt3oFql+neVs+AwEI5JaBJaxARtY2Z4mKoUqxds4UpZ0sv3zIbNoo0J4fihldQTX3XNcuNcZmcrB5LTWMdzeRuAtBk3cZHYQF6gTi3PNuDJ0nmR+4LPLoHvxQIxRgJ9iNNXqf2SYJhcvCtJiVWo85TsyFOuq7EyBPJrAdhEgE0cTq16FQXhYPJFqSfiVn0IQnPOy0LbU4BeG94QjdYNB0CiQ3QaxQqD2ebSMiNjaVaw8WaM4Z5WnzcVDsr4eGweSLa2DE3BWViaxhZFIcSTjgxNCAfelg+hznVOYoe5VqTYs1g7WtfTm3e4/WduC6p+qqAM8H4ZyrJCGpewThTDPe6H7CzX/zQ8Tm+r65HeZn+MsmxUciEWPlAVaK/VBaQBWfoG/aRL/jSZIQfep/89GjasWmbaWzeEZ2R1FOjvyJT37O9B8046SRSKVEnXWlBqbkb5XCS3qFeuE9xb9+frEknxWB5h1D/hruz2iVDEAS7+qkEz5Ot5agHJc7WCdY94Ws61sURcX5nG8UELGBAHZ3i+3VulAyT0nKNNz4K2LBHBWJcTBX1wzf+//u/j/9+//v87+9/l9Lbh/L/uyNYiTsWV2LwsjaA6MxTuzFMqmxW8Jw/+IppdX8t/Clgi1rI1SN0UC/r6tX/4lUc2VV1OQReSeCsjUpKZchw4XUcjHfw6ryCV3R8s6VXm67vp4n+lcPV9gJwmbKQEsmrJi9c2vkwrm8HFbVYNTaRGq8D91t9n5+U+aD/hNtN3HjC/nC/vUoGFSCkXP+NlRcmLUqLbiUBl4LYf1U/CCvwtd3ryCH8gUmGITAxiH1O5rnGTz7y1LuFjmnFGQ1UWuM7HwfXtWl2fPFKklYwNUpF2IL/TmaRETjQiM5SJacI+3Gv5MBU8lP5Io6gWkawpyzNEVGqOdx4YlO1dCvjbWFZWbCmeiFKPSlMKtKcMFLs/KQxtgAHi7NZNCQ32bBAW2mbHflVZ8wXKi1JKVHkW20bnYnl3dKWJeWJOiX3oKPBD6Zbi0ZvSIuWktUHB8qDR8DMMh1ZfkBL9FS9x5r0hBGLJ8pUCJv3NYH+Ae8p40mZWd5m5fhobFjQeQvqTT4VKWIYfRL0tfaXKiVl75hHReuTJEcqVlug+eOIIc4bdIydtn2K0iNZPsYWQvQio2qbO3OqAlPHDDOB7DfjGEfVF51FqqNacd6QmgFKJpMfLp5DHTv4wXlONKVXF9zTJpDV4m1sYZqJPhotcsliZM8yksKkCkzpiXt+EcRQvSQqmBS9WdWkxMTJXPSw94jqI3varCjQxTazjlMH8jTS8ilaW8014/vwA/LNa+YiFoyyx3s/KswP3O8QW1jtq45yTM/DX9a8M4voTVaO2ebvw1EooDw/yg6Y1faY+WwrdVs5Yt0hQ5EwRfYXSFxray1YvSM+kYmlpLG2/9mm1MfmbKHXr44Ih8nVKb1M537ZANUkCtdsPZ80JVKVKabVHCadaLXg+IV8i5GSwpZti0h6diTaKs9sdpUKEpd7jDUpYmHtiX33SKiO3tuydkaxA7pEc9XIQEOfWJlszj5YpL5bKeQyT7aZSBOamvSHl8xsWvgo26IP/bqk+0EJUz+gkkcvlUlyPp2kdKFtt7y5aCdks9ZJJcFp5ZWeaWKgtnXMN3ORwGLBE0PtkEIek5FY2aVssUZHtsWIvnljMVJtuVIjpZup/5VL1yPOHWWHkOMc6YySWMckczD5jUj2mlLVquFaMU8leGVaqeXis+aRRL8zm4WuBk6cyWfGMxgtr8useQEx7k/PvRoZyd9nde1GUCV84gMX8Ogu/BWezYPSR27llzQnA97oo0pYyxobYUJfsj+ysTm9zJ+S4pk0TGo9VTG0KjqYhTmALfoDZVKla2b5yhv241PxFaLJs3i05K0AAIdcGxCJZmT3ZdT7CliR7q+kur7WdQjygYtOWRL9B8E4s4LI8KpAj7bE0dg7DLOaX+MGeAi0hMMSSWZEz+RudXbZCsGYS0QqiXjH9XQbd8sCB+nIVTq7/T/FDS+zWY9q7Z2fdq1tdLb6v3hKKVDAw5gjj6o9r1wHFROdHc18MJp4SJ2Ucvu+iQ9EgkekW8VCM+psM6y+/2SBy8tNN4a3L1MzP+OLsyvESo5gS7IQOnIqMmviJBVc6zbVG1n8eXiA3j46kmvvtJlewwNDrxk4SbJOtP/TV/lIVK9ueShNbbMHfwnLTLLhbZuO79ec5XvfgRwLFK+w1r5ZWW15rVFZrE+wKqNRv5KqsLNfpGgnoUU6Y71NxEmN7MyqwqAQqoIULOw/LbuUB2+uE75gJt+kq1qY4LoxV+qR/zalupea3D5+WMeaRIn0sAI6DDWDh158fqUb4YhAxhREbUN0qyyJYkBU4V2KARXDT65gW3gRsiv7xSPYEKLwzgriWcWgPr0sbZnv7m1XHNFW6xPdGNZUdxFiUYlmXNjDVWuu7LCkX/nVkrXaJhiYktBISC2xgBXQnNEP+cptWl1eG62a7CPXrnrkTQ5BQASbEqUZWMDiZUisKyHDeLFOaJILUo5f6iDt4ZO8MlqaKLto0AmTHVVbkGuyPa1R/ywZsWRoRDoRdNMMHwYTsklMVnlAd2S0282bgMI8fiJpDh69OSL6K3qbo20KfpNMurnYGQSr/stFqZ7hYsxKlLnKAKhsmB8AIpEQ4bd/NrTLTXefsE6ChRmKWjXKVgpGoPs8GAicgKVw4K0qgDgy1A6hFq1WRat3fHF+FkU+b6H4NWpOU3KXTxrIb2qSHAb+qhm8hiSROi/9ofapjxhyKxxntPpge6KL5Z4+WBMYkAcE6+0Hd3Yh2zBsK2MV3iW0Y6cvOCroXlRb2MMJtdWx+3dkFzGh2Pe3DZ9QpSqpaR/rE1ImOrHqYYyccpiLC22amJIjRWVAherTfpQLmo6/K2pna85GrDuQPlH1Tsar8isAJbXLafSwOof4gg9RkAGm/oYpBQQiPUoyDk2BCQ1k+KILq48ErFo4WSRhHLq/y7mgw3+L85PpP6xWr6cgp9sOjYjKagOrxF148uhuaWtjet953fh1IQiEzgC+d2IgBCcUZqgTAICm2bR8oCjDLBsmg+ThyhfD+zBalsKBY1Ce54Y/t9cwfbLu9SFwEgphfopNA3yNxgyDafUM3mYTovZNgPGdd4ZFFOj1vtfFW3u7N+iHEN1HkeesDMXKPyoCDCGVMo4GCCD6PBhQ3dRZIHy0Y/3MaE5zU9mTCrwwnZojtE+qNpMSkJSpmGe0EzLyFelMJqhfFQ7a50uXxZ8pCc2wxtAKWgHoeamR2O7R+bq7IbPYItO0esdRgoTaY38hZLJ5y02oIVwoPokGIzxAMDuanQ1vn2WDQ00Rh6o5QOaCRu99fwDbQcN0XAuqkFpxT/cfz3slGRVokrNU0iqiMAJFEbKScZdmSkTUznC0U+MfwFOGdLgsewRyPKwBZYSmy6U325iUhBQNxbAC3FLKDV9VSOuQpOOukJ/GAmu/tyEbX9DgEp6dv1zoU0IqzpG6gssSjIYRVPGgU1QAQYRgIT8gEV0EXr1sqeh2I6rXjtmoCYyEDCe/PkFEi/Q48FuT29p557iN+LCwk5CK/CZ2WdAdfQZh2Z9QGrzPLSNRj5igUWzl9Vi0rCqH8G1Kp4QMLkuwMCAypdviDXyOIk0AHTM8HBYKh3b0/F+DxoNj4ZdoZfCpQVdnZarqoMaHWnMLNVcyevytGsrXQEoIbubqWYNo7NRHzdc0zvT21fWVirj7g36iy6pxogfvgHp1xH1Turbz8QyyHnXeBJicpYUctbzApwzZ1HT+FPEXMAgUZetgeGMwt4G+DHiDT2Lu+PT21fjJCAfV16a/Wu1PqOkUHSTKYhWW6PhhHUlNtWzFnA7MbY+r64vkwdpfNB2JfWgWXAvkzd42K4lN9x7Wrg4kIKgXCb4mcW595MCPJ/cTfPAMQMFWwnqwde4w8HZYJFpQwcSMhjVz4B8p6ncSCN1X4klxoIH4BN2J6taBMj6lHkAOs8JJAmXq5xsQtrPIPIIp/HG6i21xMGcFgqDXSRF0xQg14d2uy6HgKE13LSvQe52oShF5Jx1R6avyL4thhXQZHfC94oZzuPUBKFYf1VvDaxIrtV6dNGSx7DO0i1p6CzBkuAmEqyWceQY7F9+U0ObYDzoa1iKao/cOD/v6Q9gHrrr1uCeOk8fST9MG23Ul0KmM3r+Wn6Hi6WAcL7gEeaykicvgjzkjSwFsAXIR81Zx4QJ6oosVyJkCcT+4xAldCcihqvTf94HHUPXYp3REIaR4dhpQF6+FK1H0i9i7Pvh8owu3lO4PT1iuqu+DkL2Bj9+kdfGAg2TXw03iNHyobxofLE2ibjsYDPgeEQlRMR7afXbSGQcnPjI2D+sdtmuQ771dbASUsDndU7t58jrrNGRzISvwioAlHs5FA+cBE5Ccznkd8NMV6BR6ksnKLPZnMUawRDU1MZ/ib3xCdkTblHKu4blNiylH5n213yM0zubEie0o4JhzcfAy3H5qh2l17uLooBNLaO+gzonTH2uF8PQu9EyH+pjGsACTMy4cHzsPdymUSXYJOMP3yTkXqvO/lpvt0cX5ekDEu9PUfBeZODkFuAjXCaGdi6ew4qxJ8PmFfwmPpkgQjQlWqomFY6UkjmcnAtJG75EVR+NpzGpP1Ef5qUUbfowrC3zcSLX3BxgWEgEx/v9cP8H8u1Mvt9/rMDYf6sjwU1xSOPBgzFEeJLMRVFtKo5QHsUYT8ZRLCah27599EuqoC9PYjYO6aoAMHB8X1OHwEAYouHfHB3nyb2B+SnZxM/vw/bCtORjLMSy5aZoEpvgdGvlJfNPFUu/p7Z4VVK1hiI0/UTuB3ZPq4ohEbm7Mntgc1evEtknaosgZSwnDC2BdMmibpeg48X8Ixl+/8+xXdbshQXUPPvx8jT3fkELivHSmqbhblfNFShWAyQnJ3WBU6SMYSIpTDmHjdLVAdlADdz9gCplZw6mTiHqDwIsxbm9ErGusiVpg2w8Q3khKV/R9Oj8PFeF43hmW/nSd99nZzhyjCX3QOZkkB6BsH4H866WGyv9E0hVAzPYah2tkRfQZMmP2rinfOeQalge0ovhduBjJs9a1GBwReerceify49ctOh5/65ATYuMsAkVltmvTLBk4oHpdl6i+p8DoNj4Fb2vhdFYer2JSEilEwPd5n5zNoGBXEjreg/wh2NFnNRaIUHSOXa4eJRwygZoX6vnWnqVdCRT1ARxeFrNBJ+tsdooMwqnYhE7zIxnD8pZH+P0Nu1wWxCPTADfNWmqx626IBJJq6NeapcGeOmbtXvl0TeWG0Y7OGGV4+EHTtNBIT5Wd0Bujl7inXgZgfXTM5efD3qDTJ54O9v3Bkv+tdIRlq1kXcVD0BEMirmFxglNPt5pedb1AnxuCYMChUykwsTIWqT23XDpvTiKEru1cTcEMeniB+HQDehxPXNmkotFdwUPnilB/u4Nx5Xc6l8J9jH1EgKZUUt8t8cyoZleDBEt8oibDmJRAoMKJ5Oe9CSWS5ZMEJvacsGVdXDWjp/Ype5x0p9PXB2PAwt2LRD3d+ftNgpuyvxlP8pB84oB1i73vAVpwyrmXW72hfW6Dzn9Jkj4++0VQ4d0KSx1AsDA4OtXXDo63/w+GD+zC7w5SJaxsmnlYRQ4dgdjA7tTl2KNLnpJ+mvkoDxtt1a4oPaX3EVqj96o9sRKBQqU7ZOiupeAIyLMD+Y3YwHx30XWHB5CQiw7q3mj1EDlP2eBsZbz79ayUMbyHQ7s8gu4Lgip1LiGJj7NQj905/+rgUYKAA5qdrlHKIknWmqfuR+PB8RdBkDg/NgnlT89G72h2NvySnj7UyBwD+mi/IWs1xWbxuVwUIVXun5cMqBtFbrccI+DILjsVQg6eeq0itiRfedn89CvyFtpkxaauEvSANuZmB1p8FGPbU94J9medwsZ9HkUYjmI7OH5HuxendLbxTaYrPuIfE2ffXFKhoNBUp33HsFAXmCV/Vxpq5AYgFoRr5Ay93ZLRlgaIPjhZjXZZChT+aE5iWAXMX0oSFQEtwjiuhQQItTQX5IYrKfKB+queTNplR1Hoflo5/I6aPPmACwQCE2jTOYo5Dz1cs7Sod0KTG/3kEDGk3kUaUCON19xSJCab3kNpWZhSWkO8l+SpW70Wn3g0ciOIJO5JXma6dbos6jyisuxXwUUhj2+1uGhcvuliKtWwsUTw4gi1c/diEEpZHoKoxTBeMDmhPhKTx7TXWRakV8imJR355DcIHkR9IREHxohP4TbyR5LtFU24umRPRmEYHbpe1LghyxPx7YgUHjNbbQFRQhh4KeU1EabXx8FS3JAxp2rwRDoeWkJgWRUSKw6gGP5U2PuO9V4ZuiKXGGzFQuRuf+tkSSsbBtRJKhCi3ENuLlXhPbjTKD4djXVnfXFds6Zb+1XiUrRfyayGxJq1+SYBEfbKlgjiSmk0orgTqzSS+DZ5rTqsJbttiNtp+KMqGE2AHGFw6jQqM5vD6vMptmXV9OAjq49Uf/Lx9Opam+Hn5O9p8qoBBAQixzQZ4eNVkO9sPzJAMyR1y4/RCQQ1s0pV5KAU5sKLw3tkcFbI/JqrjCsK4Mw+W8aod4lioYuawUiCyVWBE/qPaFi5bnkgpfu/ae47174rI1fqQoTbW0HrU6FAejq7ByM0V4zkZTg02/YJK2N7hUQRCeZ4BIgSEqgD8XsjzG6LIsSbuHoIdz/LhFzbNn1clci1NHWJ0/6/O8HJMdIpEZbqi1RrrFfoo/rI/7ufm2MPG5lUI0IYJ4MAiHRTSOFJ2oTverFHYXThkYFIoyFx6rMYFgaOKM4xNWdlOnIcKb/suptptgTOTdVIf4YgdaAjJnIAm4qNNHNQqqAzvi53GkyRCEoseUBrHohZsjUbkR8gfKtc/+Oa72lwxJ8Mq6HDfDATbfbJhzeIuFQJSiw1uZprHlzUf90WgqG76zO0eCB1WdPv1IT6sNxxh91GEL2YpgC97ikFHyoaH92ndwduqZ6IYjkg20DX33MWdoZk7QkcKUCgisIYslOaaLyvIIqRKWQj16jE1DlQWJJaPopWTJjXfixEjRJJo8g4++wuQjbq+WVYjsqCuNIQW3YjnxKe2M5ZKEqq+cX7ZVgnkbsU3RWIyXA1rxv4kGersYJjD//auldXGmcEbcfTeF16Y1708FB1HIfmWv6dSFi6oD4E+RIjCsEZ+kY7dKnwReJJw3xCjKvi3kGN42rvyhUlIz0Bp+fNSV5xwFiuBzG296e5s/oHoFtUyUplmPulIPl+e1CQIQVtjlzLzzzbV+D/OVQtYzo5ixtMi5BmHuG4N/uKfJk5UIREp7+12oZlKtPBomXSzAY0KgtbPzzZoHQxujnREUgBU+O/jKKhgxVhRPtbqyHiUaRwRpHv7pgRPyUrnE7fYkVblGmfTY28tFCvlILC04Tz3ivkNWVazA+OsYrxvRM/hiNn8Fc4bQBeUZABGx5S/xFf9Lbbmk298X7iFg2yeimvsQqqJ+hYbt6uq+Zf9jC+Jcwiccd61NKQtFvGWrgJiHB5lwi6fR8KzYS7EaEHf/ka9EC7H8D+WEa3TEACHBkNSj/cXxFeq4RllC+fUFm2xtstYLL2nos1DfzsC9vqDDdRVcPA3Ho95aEQHvExVThXPqym65llkKlfRXbPTRiDepdylHjmV9YTWAEjlD9DdQnCem7Aj/ml58On366392214B5zrmQz/9ySG2mFqEwjq5sFl5tYJPw5hNz8lyZPUTsr5E0F2C9VMPnZckWP7+mbwp/BiN7f4kf7vtGnZF2JGvjK/sDX1RtcFY5oPQnE4lIAYV49U3C9SP0LCY/9i/WIFK9ORjzM9kG/KGrAuwFmgdEpdLaiqQNpCTGZVuAO65afkY1h33hrqyLjZy92JK3/twdj9pafFcwfXONmPQWldPlMe7jlP24Js0v9m8bIJ9TgS2IuRvE9ZVRaCwSJYOtAfL5H/YS4FfzKWKbek+GFulheyKtDNlBtrdmr+KU+ibHTdalzFUmMfxw3f36x+3cQbJLItSilW9cuvZEMjKw987jykZRlsH/UI+HlKfo2tLwemBEeBFtmxF2xmItA/dAIfQ+rXnm88dqvXa+GapOYVt/2waFimXFx3TC2MUiOi5/Ml+3rj/YU6Ihx2hXgiDXFsUeQkRAD6wF3SCPi2flk7XwKAA4zboqynuELD312EJ88lmDEVOMa1W/K/a8tGylZRMrMoILyoMQzzbDJHNZrhH77L9qSC42HVmKiZ5S0016UTp83gOhCwz9XItK9fgXfK3F5d7nZCBUekoLxrutQaPHa16Rjsa0gTrzyjqTnmcIcrxg6X6dkKiucudc0DD5W4pJPf0vuDW8r5/uw24YfMuxFRpD2ovT2mFX79xH6Jf+MVdv2TYqR6/955QgVPe3JCD/WjAYcLA9tpXgFiEjge2J5ljeI/iUzg91KQuHkII4mmHZxC3XQORLAC6G7uFn5LOmlnXkjFdoO976moNTxElS8HdxWoPAkjjocDR136m2l+f5t6xaaNgdodOvTu0rievnhNAB79WNrVs6EsPgkgfahF9gSFzzAd+rJSraw5Mllit7vUP5YxA843lUpu6/5jAR0RvH4rRXkSg3nE+O5GFyfe+L0s5r3k05FyghSFnKo4TTgs07qj4nTLqOYj6qaW9knJTDkF5OFMYbmCP+8H16Ty482OjvERV6OFyw043L9w3hoJi408sR+SGo1WviXUu8d7qS+ehKjpKwxeCthsm2LBFSFeetx0x4AaKPxtp3CxdWqCsLrB1s/j5TAhc1jNZsXWl6tjo/WDoewxzg8T8NnhZ1niUwL/nhfygLanCnRwaFGDyLw+sfZhyZ1UtYTp8TYB6dE7R3VsKKH95CUxJ8u8N+9u2/9HUNKHW3x3w5GQrfOPafk2w5qZq8MaHT0ebeY3wIsp3rN9lrpIsW9c1ws3VNV+JwNz0Lo9+V7zZr6GD56We6gWVIvtmam5GPPkVAbr74r6SwhuL+TRXtW/0pgyX16VNl4/EAD50TnUPuwrW6OcUO2VlWXS0inq872kk7GUlW6o/ozFKq+Sip6LcTtSDfDrPTcCHhx75H8BeRon+KG2wRwzfDgWhALmiWOMO6h3pm1UCZEPEjScyk7tdLx6WrdA2N1QTPENvNnhCQjW6kl057/qv7IwRryHrZBCwVSbLLnFRiHdTwk8mlYixFt1slEcPD7FVht13HyqVeyD55HOXrh2ElAxJyinGeoFzwKA91zfrdLvDxJSjzmImfvTisreI25EDcVfGsmxLVbfU8PGe/7NmWWKjXcdTJ11jAlVIY/Bv/mcxg/Q10vCHwKG1GW/XbJq5nxDhyLqiorn7Wd7VEVL8UgVzpHMjQ+Z8DUgSukiVwWAKkeTlVVeZ7t1DGnCgJVIdBPZAEK5f8CDyDNo7tK4/5DBjdD5MPV86TaEhGsLVFPQSI68KlBYy84FievdU9gWh6XZrugvtCZmi9vfd6db6V7FmoEcRHnG36VZH8N4aZaldq9zZawt1uBFgxYYx+Gs/qW1jwANeFy+LCoymyM6zgG7j8bGzUyLhvrbJkTYAEdICEb4kMKusKT9V3eIwMLsjdUdgijMc+7iKrr+TxrVWG0U+W95SGrxnxGrE4eaJFfgvAjUM4SAy8UaRwE9j6ZQH5qYAWGtXByvDiLSDfOD0yFA3UCMKSyQ30fyy1mIRg4ZcgZHLNHWl+c9SeijOvbOJxoQy7lTN2r3Y8p6ovxvUY74aOYbuVezryqXA6U+fcp6wSV9X5/OZKP18tB56Ua0gMyxJI7XyNT7IrqN8GsB9rL/kP5KMrjXxgqKLDa+V5OCH6a5hmOWemMUsea9vQl9t5Oce76PrTyTv50ExOqngE3PHPfSL//AItPdB7kGnyTRhVUUFNdJJ2z7RtktZwgmQzhBG/G7QsjZmJfCE7k75EmdIKH7xlnmDrNM/XbTT6FzldcH/rcRGxlPrv4qDScqE7JSmQABJWqRT/TUcJSwoQM+1jvDigvrjjH8oeK2in1S+/yO1j8xAws/T5u0VnIvAPqaE1atNuN0cuRliLcH2j0nTL4JpcR7w9Qya0JoaHgsOiALLCCzRkl1UUESz+ze/gIXHGtDwgYrK6pCFKJ1webSDog4zTlPkgXZqxlQDiYMjhDpwTtBW2WxthWbov9dt2X9XFLFmcF+eEc1UaQ74gqZiZsdj63pH1qcv3Vy8JYciogIVKsJ8Yy3J9w/GhjWVSQAmrS0BPOWK+RKV+0lWqXgYMnIFwpcZVD7zPSp547i9HlflB8gVnSTGmmq1ClO081OW/UH11pEQMfkEdDFzjLC1Cdo/BdL3s7cXb8J++Hzz1rhOUVZFIPehRiZ8VYu6+7Er7j5PSZu9g/GBdmNzJmyCD9wiswj9BZw+T3iBrg81re36ihMLjoVLoWc+62a1U/7qVX5CpvTVF7rocSAKwv4cBVqZm7lLDS/qoXs4fMs/VQi6BtVbNA3uSzKpQfjH1o3x4LrvkOn40zhm6hjduDglzJUwA0POabgdXIndp9fzhOo23Pe+Rk9GSLX0d71Poqry8NQDTzNlsa+JTNG9+UrEf+ngxCjGEsDCc0bz+udVRyHQI1jmEO3S+IOQycEq7XwB6z3wfMfa73m8PVRp+iOgtZfeSBl01xn03vMaQJkyj7vnhGCklsCWVRUl4y+5oNUzQ63B2dbjDF3vikd/3RUMifPYnX5Glfuk2FsV/7RqjI9yKTbE8wJY+74p7qXO8+dIYgjtLD/N8TJtRh04N9tXJA4H59IkMmLElgvr0Q5OCeVfdAt+5hkh4pQgfRMHpL74XatLQpPiOyHRs/OdmHtBf8nOZcxVKzdGclIN16lE7kJ+pVMjspOI+5+TqLRO6m0ZpNXJoZRv9MPDRcAfJUtNZHyig/s2wwReakFgPPJwCQmu1I30/tcBbji+Na53i1W1N+BqoY7Zxo+U/M9XyJ4Ok2SSkBtoOrwuhAY3a03Eu6l8wFdIG1cN+e8hopTkiKF093KuH/BcB39rMiGDLn6XVhGKEaaT/vqb/lufuAdpGExevF1+J9itkFhCfymWr9vGb3BTK4j598zRH7+e+MU9maruZqb0pkGxRDRE1CD4Z8LV4vhgPidk5w2Bq816g3nHw1//j3JStz7NR9HIWELO8TMn3QrP/zZp//+Dv9p429/ogv+GATR+n/UdF+ns9xNkXZQJXY4t9jMkJNUFygAtzndXwjss+yWH9HAnLQQfhAskdZS2l01HLWv7L7us5uTH409pqitvfSOQg/c+Zt7k879P3K9+WV68n7+3cZfuRd/dDPP/03rn+d+/nBvWfgDlt8+LzjqJ/vx3CnNOwiXhho778C96iD+1TBvRZYeP+EH81LE0vVwOOrmCLB3iKzI1x+vJEsrPH4uF0UB4TJ4X3uDfOCo3PYpYe0MF4bouh0DQ/l43fxUF7Y+dpWuvTSffB0yO2UQUETI/LwCZE3BvnevJ7c9zUlY3H58xzke6DNFDQG8n0WtDN4LAYN4nogKav1ezOfK/z+t6tsCTp+dhx4ymjWuCJk1dEUifDP+HyS4iP/Vg9B2jTo9L4NbiBuDS4nuuHW6H+JDQn2JtqRKGkEQPEYE7uzazXIkcxIAqUq1esasZBETlEZY7y7Jo+RoV/IsjY9eIMkUvr42Hc0xqtsavZvhz1OLwSxMOTuqzlhb0WbdOwBH9EYiyBjatz40bUxTHbiWxqJ0uma19qhPruvcWJlbiSSH48OLDDpaHPszvyct41ZfTu10+vjox6kOqK6v0K/gEPphEvMl/vwSv+A4Hhm36JSP9IXTyCZDm4kKsqD5ay8b1Sad/vaiyO5N/sDfEV6Z4q95E+yfjxpqBoBETW2C7xl4pIO2bDODDFurUPwE7EWC2Uplq+AHmBHvir2PSgkR12/Ry65O0aZtQPeXi9mTlF/Wj5GQ+vFkYyhXsLTjrBSP9hwk4GPqDP5rBn5/l8b0mLRAvRSzXHc293bs3s8EsdE3m2exxidWVB4joHR+S+dz5/W+v00K3TqN14CDBth8eWcsTbiwXPsygHdGid0PEdy6HHm2v/IUuV5RVapYmzGsX90mpnIdNGcOOq64Dbc5GUbYpD9M7S+6cLY//QmjxFLP5cuTFRm3vA5rkFZroFnO3bjHF35uU3s8mvL7Tp9nyTc4mymTJ5sLIp7umSnGkO23faehtz3mmTS7fbVx5rP7x3HXIjRNeq/A3xCs9JNB08c9S9BF2O3bOur0ItslFxXgRPdaapBIi4dRpKGxVz7ir69t/bc9qTxjvtOyGOfiLGDhR4fYywHv1WdOplxIV87TpLBy3Wc0QP0P9s4G7FBNOdITS/tep3o3h1TEa5XDDii7fWtqRzUEReP2fbxz7bHWWJdbIOxOUJZtItNZpTFRfj6vm9sYjRxQVO+WTdiOhdPeTJ+8YirPvoeL88l5iLYOHd3b/Imkq+1ZN1El3UikhftuteEYxf1Wujof8Pr4ICTu5ezZyZ4tHQMxlzUHLYO2VMOoNMGL/20S5i2o2obfk+8qqdR7xzbRDbgU0lnuIgz4LelQ5XS7xbLuSQtNS95v3ZUOdaUx/Qd8qxCt6xf2E62yb/HukLO6RyorV8KgYl5YNc75y+KvefrxY+lc/64y9kvWP0a0bDz/rojq+RWjO06WeruWqNFU7r3HPIcLWRql8ICZsz2Ls/qOm/CLn6++X+Qf7mGspYCrZod/lpl6Rw4xN/yuq8gqV4B6aHk1hVE1SfILxWu5gvXqbfARYQpspcxKp1F/c8XOPzkZvmoSw+vEqBLdrq1fr3wAPv5NnM9i8F+jdAuxkP5Z71c6uhK3enlnGymr7UsWZKC12qgUiG8XXGQ9mxnqz4GSIlybF9eXmbqj2sHX+a1jf0gRoONHRdRSrIq03Ty89eQ1GbV/Bk+du4+V15zls+vvERvZ4E7ZbnxWTVjDjb4o/k8jlw44pTIrUGxxuJvBeO+heuhOjpFsO6lVJ/aXnJDa/bM0Ql1cLbXE/Pbv3EZ3vj3iVrB5irjupZTzlnv677NrI9UNYNqbPgp/HZXS+lJmk87wec+7YOxTDo2aw2l3NfDr34VNlvqWJBknuK7oSlZ6/T10zuOoPZOeoIk81N+sL843WJ2Q4Z0fZ3scsqC/JV2fuhWi1jGURSKZV637lf53Xnnx16/vKEXY89aVJ0fv91jGdfG+G4+sniwHes4hS+udOr4RfhFhG/F5gUG35QaU+McuLmclb5ZWmR+sG5V6nf+PxYzlrnFGxpZaK8eqqVo0NfmAWoGfXDiT/FnUbWvzGDOTr8aktOZWg4BYvz5YH12ZbfCcGtNk+dDAZNGWvHov+PIOnY9Prjg8h/wLRrT69suaMVZ5bNuK00lSVpnqSX1NON/81FoP92rYndionwgOiA8WMf4vc8l15KqEEG4yAm2+WAN5Brfu1sq9suWYqgoajgOYt/JCk1gC8wPkK+XKCtRX6TAtgvrnuBgNRmn6I8lVDipOVB9kX6Oxkp4ZKyd1M6Gj8/v2U7k+YQBL95Kb9PQENucJb0JlW3b5tObN7m/Z1j1ev388d7o15zgXsI9CikAGAViR6lkJv7nb4Ak40M2G8TJ447kN+pvfHiOFjSUSP6PM+QfbAywKJCBaxSVxpizHseZUyUBhq59vFwrkyGoRiHbo0apweEZeSLuNiQ+HAekOnarFg00dZNXaPeoHPTRR0FmEyqYExOVaaaO8c0uFUh7U4e/UxdBmthlBDgg257Q33j1hA7HTxSeTTSuVnPZbgW1nodwmG16aKBDKxEetv7D9OjO0JhrbJTnoe+kcGoDJazFSO8/fUN9Jy/g4XK5PUkw2dgPDGpJqBfhe7GA+cjzfE/EGsMM+FV9nj9IAhrSfT/J3QE5TEIYyk5UjsI6ZZcCPr6A8FZUF4g9nnpVmjX90MLSQysIPD0nFzqwCcSJmIb5mYv2Cmk+C1MDFkZQyCBq4c/Yai9LJ6xYkGS/x2s5/frIW2vmG2Wrv0APpCdgCA9snFvfpe8uc0OwdRs4G9973PGEBnQB5qKrCQ6m6X/H7NInZ7y/1674/ZXOVp7OeuCRk8JFS516VHrnH1HkIUIlTIljjHaQtEtkJtosYul77cVwjk3gW1Ajaa6zWeyHGLlpk3VHE2VFzT2yI/EvlGUSz2H9zYE1s4nsKMtMqNyKNtL/59CpFJki5Fou6VXGm8vWATEPwrUVOLvoA8jLuwOzVBCgHB2Cr5V6OwEWtJEKokJkfc87h+sNHTvMb0KVTp5284QTPupoWvQVUwUeogZR3kBMESYo0mfukewRVPKh5+rzLQb7HKjFFIgWhj1w3yN/qCNoPI8XFiUgBNT1hCHBsAz8L7Oyt8wQWUFj92ONn/APyJFg8hzueqoJdNj57ROrFbffuS/XxrSXLTRgj5uxZjpgQYceeMc2wJrahReSKpm3QjHfqExTLAB2ipVumE8pqcZv8LYXQiPHHsgb5BMW8zM5pvQit+mQx8XGaVDcfVbLyMTlY8xcfmm/RSAT/H09UQol5gIz7rESDmnrQ4bURIB4iRXMDQwxgex1GgtDxKp2HayIkR+E/aDmCttNm2C6lytWdfOVzD6X2SpDWjQDlMRvAp1symWv4my1bPCD+E1EmGnMGWhNwmycJnDV2WrQNxO45ukEb08AAffizYKVULp15I4vbNK5DzWwCSUADfmKhfGSUqii1L2UsE8rB7mLuHuUJZOx4+WiizHBJ/hwboaBzhpNOVvgFTf5cJsHef7L1HCI9dOUUbb+YxUJWn6dYOLz+THi91kzY5dtO5c+grX7v0jEbsuoOGnoIreDIg/sFMyG+TyCLIcAWd1IZ1UNFxE8Uie13ucm40U2fcxC0u3WLvLOxwu+F7MWUsHsdtFQZ7W+nlfCASiAKyh8rnP3EyDByvtJb6Kax6/HkLzT9SyEyTMVM1zPtM0MJY14DmsWh4MgD15Ea9Hd00AdkTZ0EiG5NAGuIBzQJJ0JR0na+OB7lQA6UKxMfihIQ7GCCnVz694QvykWXTxpS2soDu+smru1UdIxSvAszBFD1c8c6ZOobA8bJiJIvuycgIXBQIXWwhyTgZDQxJTRXgEwRNAawGSXO0a1DKjdihLVNp/taE/xYhsgwe+VpKEEB4LlraQyE84gEihxCnbfoyOuJIEXy2FIYw+JjRusybKlU2g/vhTSGTydvCvXhYBdtAXtS2v7LkHtmXh/8fly1do8FI/D0f8UbzVb5h+KRhMGSAmR2mhi0YG/uj7wgxcfzCrMvdjitUIpXDX8ae2JcF/36qUWIMwN6JsjaRGNj+jEteGDcFyTUb8X/NHSucKMJp7pduxtD6KuxVlyxxwaeiC1FbGBESO84lbyrAugYxdl+2N8/6AgWpo/IeoAOcsG35IA/b3AuSyoa55L7llBLlaWlEWvuCFd8f8NfcTUgzJv6CbB+6ohWwodlk9nGWFpBAOaz5uEW5xBvmjnHFeDsb0mXwayj3mdYq5gxxNf3H3/tnCgHwjSrpSgVxLmiTtuszdRUFIsn6LiMPjL808vL1uQhDbM7aA43mISXReqjSskynIRcHCJ9qeFopJfx9tqyUoGbSwJex/0aDE3plBPGtNBYgWbdLom3+Q/bjdizR2/AS/c/dH/d3G7pyl1qDXgtOFtEqidwLqxPYtrNEveasWq3vPUUtqTeu8gpov4bdOQRI2kneFvRNMrShyVeEupK1PoLDPMSfWMIJcs267mGB8X9CehQCF0gIyhpP10mbyM7lwW1e6TGvHBV1sg/UyTghHPGRqMyaebC6pbB1WKNCQtlai1GGvmq9zUKaUzLaXsXEBYtHxmFbEZ2kJhR164LhWW2Tlp1dhsGE7ZgIWRBOx3Zcu2DxgH+G83WTPceKG0TgQKKiiNNOlWgvqNEbnrk6fVD+AqRam2OguZb0YWSTX88N+i/ELSxbaUUpPx4vJUzYg/WonSeA8xUK6u7DPHgpqWpEe6D4cXg5uK9FIYVba47V/nb+wyOtk+zG8RrS4EA0ouwa04iByRLSvoJA2FzaobbZtXnq8GdbfqEp5I2dpfpj59TCVif6+E75p665faiX8gS213RqBxTZqfHP46nF6NSenOneuT+vgbLUbdTH2/t0REFXZJOEB6DHvx6N6g9956CYrY/AYcm9gELJXYkrSi+0F0geKDZgOCIYkLU/+GOW5aGj8mvLFgtFH5+XC8hvAE3CvHRfl4ofM/Qwk4x2A+R+nyc9gNu/9Tem7XW4XRnyRymf52z09cTOdr+PG6+P/Vb4QiXlwauc5WB1z3o+IJjlbxI8MyWtSzT+k4sKVbhF3xa+vDts3NxXa87iiu+xRH9cAprnOL2h6vV54iQRXuOAj1s8nLFK8gZ70ThIQcWdF19/2xaJmT0efrkNDkWbpAQPdo92Z8+Hn/aLjbOzB9AI/k12fPs9HhUNDJ1u6ax2VxD3R6PywN7BrLJ26z6s3QoMp76qzzwetrDABKSGkfW5PwS1GvYNUbK6uRqxfyVGNyFB0E+OugMM8kKwmJmupuRWO8XkXXXQECyRVw9UyIrtCtcc4oNqXqr7AURBmKn6Khz3eBN96LwIJrAGP9mr/59uTOSx631suyT+QujDd4beUFpZ0kJEEnjlP+X/Kr2kCKhnENTg4BsMTOmMqlj2WMFLRUlVG0fzdCBgUta9odrJfpVdFomTi6ak0tFjXTcdqqvWBAzjY6hVrH9sbt3Z9gn+AVDpTcQImefbB4edirjzrsNievve4ZT4EUZWV3TxEsIW+9MT/RJoKfZZYSRGfC1CwPG/9rdMOM8qR/LUYvw5f/emUSoD7YSFuOoqchdUg2UePd1eCtFSKgxLSZ764oy4lvRCIH6bowPxZWwxNFctksLeil47pfevcBipkkBIc4ngZG+kxGZ71a72KQ7VaZ6MZOZkQJZXM6kb/Ac0/XkJx8dvyfJcWbI3zONEaEPIW8GbkYjsZcwy+eMoKrYjDmvEEixHzkCSCRPRzhOfJZuLdcbx19EL23MA8rnjTZZ787FGMnkqnpuzB5/90w1gtUSRaWcb0eta8198VEeZMUSfIhyuc4/nywFQ9uqn7jdqXh+5wwv+RK9XouNPbYdoEelNGo34KyySwigsrfCe0v/PlWPvQvQg8R0KgHO18mTVThhQrlbEQ0Kp/JxPdjHyR7E1QPw/ut0r+HDDG7BwZFm9IqEUZRpv2WpzlMkOemeLcAt5CsrzskLGaVOAxyySzZV/D2EY7ydNZMf8e8VhHcKGHAWNszf1EOq8fNstijMY4JXyATwTdncFFqcNDfDo+mWFvxJJpc4sEZtjXyBdoFcxbUmniCoKq5jydUHNjYJxMqN1KzYV62MugcELVhS3Bnd+TLLOh7dws/zSXWzxEb4Nj4aFun5x4kDWLK5TUF/yCXB/cZYvI9kPgVsG2jShtXkxfgT+xzjJofXqPEnIXIQ1lnIdmVzBOM90EXvJUW6a0nZ/7XjJGl8ToO3H/fdxnxmTNKBZxnkpXLVgLXCZywGT3YyS75w/PAH5I/jMuRspej8xZObU9kREbRA+kqjmKRFaKGWAmFQspC+QLbKPf0RaK3OXvBSWqo46p70ws/eZpu6jCtZUgQy6r4tHMPUdAgWGGUYNbuv/1a6K+MVFsd3T183+T8capSo6m0+Sh57fEeG/95dykGJBQMj09DSW2bY0mUonDy9a8trLnnL5B5LW3Nl8rJZNysO8Zb+80zXxqUGFpud3Qzwb7bf+8mq6x0TAnJU9pDQR9YQmZhlna2xuxJt0aCO/f1SU8gblOrbIyMsxTlVUW69VJPzYU2HlRXcqE2lLLxnObZuz2tT9CivfTAUYfmzJlt/lOPgsR6VN64/xQd4Jlk/RV7UKVv2Gx/AWsmTAuCWKhdwC+4HmKEKYZh2Xis4KsUR1BeObs1c13wqFRnocdmuheaTV30gvVXZcouzHKK5zwrN52jXJEuX6dGx3BCpV/++4f3hyaW/cQJLFKqasjsMuO3B3WlMq2gyYfdK1e7L2pO/tRye2mwzwZPfdUMrl5wdLqdd2Kv/wVtnpyWYhd49L6rsOV+8HXPrWH2Kup89l2tz6bf80iYSd+V4LROSOHeamvexR524q4r43rTmtFzQvArpvWfLYFZrbFspBsXNUqqenjxNNsFXatZvlIhk7teUPfK+YL32F8McTnjv0BZNppb+vshoCrtLXjIWq3EJXpVXIlG6ZNL0dh6qEm2WMwDjD3LfOfkGh1/czYc/0qhiD2ozNnH4882MVVt3JbVFkbwowNCO3KL5IoYW5wlVeGCViOuv1svZx7FbzxKzA4zGqBlRRaRWCobXaVq4yYCWbZf8eiJwt3OY+MFiSJengcFP2t0JMfzOiJ7cECvpx7neg1Rc5x+7myPJOXt2FohVRyXtD+/rDoTOyGYInJelZMjolecVHUhUNqvdZWg2J2t0jPmiLFeRD/8fOT4o+NGILb+TufCo9ceBBm3JLVn+MO2675n7qiEX/6W+188cYg3Zn5NSTjgOKfWFSAANa6raCxSoVU851oJLY11WIoYK0du0ec5E4tCnAPoKh71riTsjVIp3gKvBbEYQiNYrmH22oLQWA2AdwMnID6PX9b58dR2QKo4qag1D1Z+L/FwEKTR7osOZPWECPJIHQqPUsM5i/CH5YupVPfFA5pHUBcsesh8eO5YhyWnaVRPZn/BmdXVumZWPxMP5e28zm2uqHgFoT9CymHYNNrzrrjlXZM06HnzDxYNlI5b/QosxLmmrqDFqmogQdqk0WLkUceoAvQxHgkIyvWU69BPFr24VB6+lx75Rna6dGtrmOxDnvBojvi1/4dHjVeg8owofPe1cOnxU1ioh016s/Vudv9mhV9f35At+Sh28h1bpp8xhr09+vf47Elx3Ms6hyp6QvB3t0vnLbOhwo660cp7K0vvepabK7YJfxEWWfrC2YzJfYOjygPwfwd/1amTqa0hZ5ueebhWYVMubRTwIjj+0Oq0ohU3zfRfuL8gt59XsHdwKtxTQQ4Y2qz6gisxnm2UdlmpEkgOsZz7iEk6QOt8BuPwr+NR01LTqXmJo1C76o1N274twJvl+I069TiLpenK/miRxhyY8jvYV6W1WuSwhH9q7kuwnJMtm7IWcqs7HsnyHSqWXLSpYtZGaR1V3t0gauninFPZGtWskF65rtti48UV9uV9KM8kfDYs0pgB00S+TlzTXV6P8mxq15b9En8sz3jWSszcifZa/NuufPNnNTb031pptt0+sRSH/7UG8pzbsgtt3OG3ut7B9JzDMt2mTZuyRNIV8D54TuTrpNcHtgmMlYJeiY9XS83NYJicjRjtJSf9BZLsQv629QdDsKQhTK5CnXhpk7vMNkHzPhm0ExW/VCGApHfPyBagtZQTQmPHx7g5IXXsrQDPzIVhv2LB6Ih138iSDww1JNHrDvzUxvp73MsQBVhW8EbrReaVUcLB1R3PUXyaYG4HpJUcLVxMgDxcPkVRQpL7VTAGabDzbKcvg12t5P8TSGQkrj/gOrpnbiDHwluA73xbXts/L7u468cRWSWRtgTwlQnA47EKg0OiZDgFxAKQQUcsbGomITgeXUAAyKe03eA7Mp4gnyKQmm0LXJtEk6ddksMJCuxDmmHzmVhO+XaN2A54MIh3niw5CF7PwiXFZrnA8wOdeHLvvhdoqIDG9PDI7UnWWHq526T8y6ixJPhkuVKZnoUruOpUgOOp3iIKBjk+yi1vHo5cItHXb1PIKzGaZlRS0g5d3MV2pD8FQdGYLZ73aae/eEIUePMc4NFz8pIUfLCrrF4jVWH5gQneN3S8vANBmUXrEcKGn6hIUN95y1vpsvLwbGpzV9L0ZKTan6TDXM05236uLJcIEMKVAxKNT0K8WljuwNny3BNQRfzovA85beI9zr1AGNYnYCVkR1aGngWURUrgqR+gRrQhxW81l3CHevjvGEPzPMTxdsIfB9dfGRbZU0cg/1mcubtECX4tvaedmNAvTxCJtc2QaoUalGfENCGK7IS/O8CRpdOVca8EWCRwv2sSWE8CJPW5PCugjCXPd3h6U60cPD+bdhtXZuYB6stcoveE7Sm5MM2yvfUHXFSW7KzLmi7/EeEWL0wqcOH9MOSKjhCHHmw+JGLcYE/7SBZQCRggox0ZZTAxrlzNNXYXL5fNIjkdT4YMqVUz6p8YDt049v4OXGdg3qTrtLBUXOZf7ahPlZAY/O+7Sp0bvGSHdyQ8B1LOsplqMb9Se8VAE7gIdSZvxbRSrfl+Lk5Qaqi5QJceqjitdErcHXg/3MryljPSIAMaaloFm1cVwBJ8DNmkDqoGROSHFetrgjQ5CahuKkdH5pRPigMrgTtlFI8ufJPJSUlGgTjbBSvpRc0zypiUn6U5KZqcRoyrtzhmJ7/caeZkmVRwJQeLOG8LY6vP5ChpKhc8Js0El+n6FXqbx9ItdtLtYP92kKfaTLtCi8StLZdENJa9Ex1nOoz1kQ7qxoiZFKRyLf4O4CHRT0T/0W9F8epNKVoeyxUXhy3sQMMsJjQJEyMOjmOhMFgOmmlscV4eFi1CldU92yjwleirEKPW3bPAuEhRZV7JsKV3Lr5cETAiFuX5Nw5UlF7d2HZ96Bh0sgFIL5KGaKSoVYVlvdKpZJVP5+NZ7xDEkQhmDgsDKciazJCXJ6ZN2B3FY2f6VZyGl/t4aunGIAk/BHaS+i+SpdRfnB/OktOvyjinWNfM9Ksr6WwtCa1hCmeRI6icpFM4o8quCLsikU0tMoZI/9EqXRMpKGaWzofl4nQuVQm17d5fU5qXCQeCDqVaL9XJ9qJ08n3G3EFZS28SHEb3cdRBdtO0YcTzil3QknNKEe/smQ1fTb0XbpyNB5xAeuIlf+5KWlEY0DqJbsnzJlQxJPOVyHiKMx5Xu9FcEv1Fbg6Fhm4t+Jyy5JC1W3YO8dYLsO0PXPbxodBgttTbH3rt9Cp1lJIk2r3O1Zqu94eRbnIz2f50lWolYzuKsj4PMok4abHLO8NAC884hiXx5Fy5pWKO0bWL7uEGXaJCtznhP67SlQ4xjWIfgq6EpZ28QMtuZK7JC0RGbl9nA4XtFLug/NLMoH1pGt9IonAJqcEDLyH6TDROcbsmGPaGIxMo41IUAnQVPMPGByp4mOmh9ZQMkBAcksUK55LsZj7E5z5XuZoyWCKu6nHmDq22xI/9Z8YdxJy4kWpD16jLVrpwGLWfyOD0Wd+cBzFBxVaGv7S5k9qwh/5t/LQEXsRqI3Q9Rm3QIoaZW9GlsDaKOUyykyWuhNOprSEi0s1G4rgoiX1V743EELti+pJu5og6X0g6oTynUqlhH9k6ezyRi05NGZHz0nvp3HOJr7ebrAUFrDjbkFBObEvdQWkkUbL0pEvMU46X58vF9j9F3j6kpyetNUBItrEubW9ZvMPM4qNqLlsSBJqOH3XbNwv/cXDXNxN8iFLzUhteisYY+RlHYOuP29/Cb+L+xv+35Rv7xudnZ6ohK4cMPfCG8KI7dNmjNk/H4e84pOxn/sZHK9psfvj8ncA8qJz7O8xqbxESDivGJOZzF7o5PJLQ7g34qAWoyuA+x3btU98LT6ZyGyceIXjrqob2CAVql4VOTQPUQYvHV/g4zAuCZGvYQBtf0wmd5lilrvuEn1BXLny01B4h4SMDlYsnNpm9d7m9h578ufpef9Z4WplqWQvqo52fyUA7J24eZD5av6SyGIV9kpmHNqyvdfzcpEMw97BvknV2fq+MFHun9BT3Lsf8pbzvisWiIQvYkng+8Vxk1V+dli1u56kY50LRjaPdotvT5BwqtwyF+emo/z9J3yVUVGfKrxQtJMOAQWoQii/4dp9wgybSa5mkucmRLtEQZ/pz0tL/NVcgWAd95nEQ3Tg6tNbuyn3Iepz65L3huMUUBntllWuu4DbtOFSMSbpILV4fy6wlM0SOvi6CpLh81c1LreIvKd61uEWBcDw1lUBUW1I0Z+m/PaRlX+PQ/oxg0Ye6KUiIiTF4ADNk59Ydpt5/rkxmq9tV5Kcp/eQLUVVmBzQNVuytQCP6Ezd0G8eLxWyHpmZWJ3bAzkWTtg4lZlw42SQezEmiUPaJUuR/qklVA/87S4ArFCpALdY3QRdUw3G3XbWUp6aq9z0zUizcPa7351p9JXOZyfdZBFnqt90VzQndXB/mwf8LC9STj5kenVpNuqOQQP3mIRJj7eV21FxG8VAxKrEn3c+XfmZ800EPb9/5lIlijscUbB6da0RQaMook0zug1G0tKi/JBC4rw7/D3m4ARzAkzMcVrDcT2SyFtUdWAsFlsPDFqV3N+EjyXaoEePwroaZCiLqEzb8MW+PNE9TmTC01EzWli51PzZvUqkmyuROU+V6ik+Le/9qT6nwzUzf9tP68tYei0YaDGx6kAd7jn1cKqOCuYbiELH9zYqcc4MnRJjkeGiqaGwLImhyeKs+xKJMBlOJ05ow9gGCKZ1VpnMKoSCTbMS+X+23y042zOb5MtcY/6oBeAo1Vy89OTyhpavFP78jXCcFH0t7Gx24hMEOm2gsEfGabVpQgvFqbQKMsknFRRmuPHcZu0Su/WMFphZvB2r/EGbG72rpGGho3h+Msz0uGzJ7hNK2uqQiE1qmn0zgacKYYZBCqsxV+sjbpoVdSilW/b94n2xNb648VmNIoizqEWhBnsen+d0kbCPmRItfWqSBeOd9Wne3c6bcd6uvXOJ6WdiSsuXq0ndhqrQ4QoWUjCjYtZ0EAhnSOP1m44xkf0O7jXghrzSJWxP4a/t72jU29Vu2rvu4n7HfHkkmQOMGSS+NPeLGO5I73mC2B7+lMiBQQZRM9/9liLIfowupUFAbPBbR+lxDM6M8Ptgh1paJq5Rvs7yEuLQv/7d1oU2woFSb3FMPWQOKMuCuJ7pDDjpIclus5TeEoMBy2YdVB4fxmesaCeMNsEgTHKS5WDSGyNUOoEpcC2OFWtIRf0w27ck34/DjxRTVIcc9+kqZE6iMSiVDsiKdP/Xz5XfEhm/sBhO50p1rvJDlkyyxuJ9SPgs7YeUJBjXdeAkE+P9OQJm6SZnn1svcduI78dYmbkE2mtziPrcjVisXG78spLvbZaSFx/Rks9zP4LKn0Cdz/3JsetkT06A8f/yCgMO6Mb1Hme0JJ7b2wZz1qleqTuKBGokhPVUZ0dVu+tnQYNEY1fmkZSz6+EGZ5EzL7657mreZGR3jUfaEk458PDniBzsSmBKhDRzfXameryJv9/D5m6HIqZ0R+ouCE54Dzp4IJuuD1e4Dc5i+PpSORJfG23uVgqixAMDvchMR0nZdH5brclYwRoJRWv/rlxGRI5ffD5NPGmIDt7vDE1434pYdVZIFh89Bs94HGGJbTwrN8T6lh1HZFTOB4lWzWj6EVqxSMvC0/ljWBQ3F2kc/mO2b6tWonT2JEqEwFts8rz2h+oWNds9ceR2cb7zZvJTDppHaEhK5avWqsseWa2Dt5BBhabdWSktS80oMQrL4TvAM9b5HMmyDnO+OkkbMXfUJG7eXqTIG6lqSOEbqVR+qYdP7uWb57WEJqzyh411GAVsDinPs7KvUeXItlcMdOUWzXBH6zscymV1LLVCtc8IePojzXHF9m5b5zGwBRdzcyUJkiu938ApmAayRdJrX1PmVguWUvt2ThQ62czItTyWJMW2An/hdDfMK7SiFQlGIdAbltHz3ycoh7j9V7GxNWBpbtcSdqm4XxRwTawc3cbZ+xfSv9qQfEkDKfZTwCkqWGI/ur250ItXlMlh6vUNWEYIg9A3GzbgmbqvTN8js2YMo87CU5y6nZ4dbJLDQJj9fc7yM7tZzJDZFtqOcU8+mZjYlq4VmifI23iHb1ZoT9E+kT2dolnP1AfiOkt7PQCSykBiXy5mv637IegWSKj9IKrYZf4Lu9+I7ub+mkRdlvYzehh/jaJ9n7HUH5b2IbgeNdkY7wx1yVzxS7pbvky6+nmVUtRllEFfweUQ0/nG017WoUYSxs+j2B4FV/F62EtHlMWZXYrjGHpthnNb1x66LKZ0Qe92INWHdfR/vqp02wMS8r1G4dJqHok8KmQ7947G13a4YXbsGgHcBvRuVu1eAi4/A5+ZixmdSXM73LupB/LH7O9yxLTVXJTyBbI1S49TIROrfVCOb/czZ9pM4JsZx8kUz8dQGv7gUWKxXvTH7QM/3J2OuXXgciUhqY+cgtaOliQQVOYthBLV3xpESZT3rmfEYNZxmpBbb24CRao86prn+i9TNOh8VxRJGXJfXHATJHs1T5txgc/opYrY8XjlGQQbRcoxIBcnVsMjmU1ymmIUL4dviJXndMAJ0Yet+c7O52/p98ytlmAsGBaTAmMhimAnvp1TWNGM9BpuitGj+t810CU2UhorrjPKGtThVC8WaXw04WFnT5fTjqmPyrQ0tN3CkLsctVy2xr0ZWgiWVZ1OrlFjjxJYsOiZv2cAoOvE+7sY0I/TwWcZqMoyIKNOftwP7w++Rfg67ljfovKYa50if3fzE/8aPYVey/Nq35+nH2sLPh/fP5TsylSKGOZ4k69d2PnH43+kq++sRXHQqGArWdwhx+hpwQC6JgT2uxehYU4Zbw7oNb6/HLikPyJROGK2ouyr+vzseESp9G50T4AyFrSqOQ0rroCYP4sMDFBrHn342EyZTMlSyk47rHSq89Y9/nI3zG5lX16Z5lxphguLOcZUndL8wNcrkyjH82jqg8Bo8OYkynrxZvbFno5lUS3OPr8Ko3mX9NoRPdYOKKjD07bvgFgpZ/RF+YzkWvJ/Hs/tUbfeGzGWLxNAjfDzHHMVSDwB5SabQLsIZHiBp43FjGkaienYoDd18hu2BGwOK7U3o70K/WY/kuuKdmdrykIBUdG2mvE91L1JtTbh20mOLbk1vCAamu7utlXeGU2ooVikbU/actcgmsC1FKk2qmj3GWeIWbj4tGIxE7BLcBWUvvcnd/lYxsMV4F917fWeFB/XbINN3qGvIyTpCalz1lVewdIGqeAS/gB8Mi+sA+BqDiX3VGD2eUunTRbSY+AuDy4E3Qx3hAhwnSXX+B0zuj3eQ1miS8Vux2z/l6/BkWtjKGU72aJkOCWhGcSf3+kFkkB15vGOsQrSdFr6qTj0gBYiOlnBO41170gOWHSUoBVRU2JjwppYdhIFDfu7tIRHccSNM5KZOFDPz0TGMAjzzEpeLwTWp+kn201kU6NjbiMQJx83+LX1e1tZ10kuChJZ/XBUQ1dwaBHjTDJDqOympEk8X2M3VtVw21JksChA8w1tTefO3RJ1FMbqZ01bHHkudDB/OhLfe7P5GOHaI28ZXKTMuqo0hLWQ4HabBsGG7NbP1RiXtETz074er6w/OerJWEqjmkq2y51q1BVI+JUudnVa3ogBpzdhFE7fC7kybrAt2Z6RqDjATAUEYeYK45WMupBKQRtQlU+uNsjnzj6ZmGrezA+ASrWxQ6LMkHRXqXwNq7ftv28dUx/ZSJciDXP2SWJsWaN0FjPX9Yko6LobZ7aYW/IdUktI9apTLyHS8DyWPyuoZyxN1TK/vtfxk3HwWh6JczZC8Ftn0bIJay2g+n5wd7lm9rEsKO+svqVmi+c1j88hSCxbzrg4+HEP0Nt1/B6YW1XVm09T1CpAKjc9n18hjqsaFGdfyva1ZG0Xu3ip6N6JGpyTSqY5h4BOlpLPaOnyw45PdXTN+DtAKg7DLrLFTnWusoSBHk3s0d7YouJHq85/R09Tfc37ENXZF48eAYLnq9GLioNcwDZrC6FW6godB8JnqYUPvn0pWLfQz0lM0Yy8Mybgn84Ds3Q9bDP10bLyOV+qzxa4Rd9Dhu7cju8mMaONXK3UqmBQ9qIg7etIwEqM/kECk/Dzja4Bs1xR+Q/tCbc8IKrSGsTdJJ0vge7IG20W687uVmK6icWQ6cD3lwFzgNMGtFvO5qyJeKflGLAAcQZOrkxVwy3cWvqlGpvjmf9Qe6Ap20MPbV92DPV0OhFM4kz8Yr0ffC2zLWSQ1kqY6QdQrttR3kh1YLtQd1kCEv5hVoPIRWl5ERcUTttBIrWp6Xs5Ehh5OUUwI5aEBvuiDmUoENmnVw1FohCrbRp1A1E+XSlWVOTi7ADW+5Ohb9z1vK4qx5R5lPdGCPBJZ00mC+Ssp8VUbgpGAvXWMuWQQRbCqI6Rr2jtxZxtfP7W/8onz+yz0Gs76LaT5HX9ecyiZCB/ZR/gFtMxPsDwohoeCRtiuLxE1GM1vUEUgBv86+eehL58/P56QFGQ/MqOe/vC76L63jzmeax4exd/OKTUvkXg+fOJUHych9xt/9goJMrapSgvXrj8+8vk/N80f22Sewj6cyGqt1B6mztoeklVHHraouhvHJaG/OuBz6DHKMpFmQULU1bRWlyYE0RPXYYkUycIemN7TLtgNCJX6BqdyxDKkegO7nJK5xQ7OVYDZTMf9bVHidtk6DQX9Et+V9M7esgbsYBdEeUpsB0Xvw2kd9+rI7V+m47u+O/tq7mw7262HU1WlS9uFzsV6JxIHNmUCy0QS9e077JGRFbG65z3/dOKB/Zk+yDdKpUmdXjn/aS3N5nv4fK7bMHHmPlHd4E2+iTbV5rpzScRnxk6KARuDTJ8Q1LpK2mP8gj1EbuJ9RIyY+EWK4hCiIDBAS1Tm2IEXAFfgKPgdL9O6mAa06wjCcUAL6EsxPQWO9VNegBPm/0GgkZbDxCynxujX/92vmGcjZRMAY45puak2sFLCLSwXpEsyy5fnF0jGJBhm+fNSHKKUUfy+276A7/feLOFxxUuHRNJI2Osenxyvf8DAGObT60pfTTlhEg9u/KKkhJqm5U1/+BEcSkpFDA5XeCqxwXmPac1jcuZ3JWQ+p0NdWzb/5v1ZvF8GtMTFFEdQjpLO0bwPb0BHNWnip3liDXI2fXf05jjvfJ0NpjLCUgfTh9CMFYVFKEd4Z/OG/2C+N435mnK+9t1gvCiVcaaH7rK4+PjCvpVNiz+t2QyqH1O8x3JKZVl6Q+Lp/XK8wMjVMslOq9FdSw5FtUs/CptXH9PW+wbWHgrV17R5jTVOtGtKFu3nb80T+E0tv9QkzW3J2dbaw/8ddAKZ0pxIaEqLjlPrji3VgJ3GvdFvlqD8075woxh4fVt0JZE0KVFsAvqhe0dqN9b35jtSpnYMXkU+vZq+IAHad3IHc2s/LYrnD1anfG46IFiMIr9oNbZDWvwthqYNqOigaKd/XlLU4XHfk/PXIjPsLy/9/kAtQ+/wKH+hI/IROWj5FPvTZAT9f7j4ZXQyG4M0TujMAFXYkKvEHv1xhySekgXGGqNxWeWKlf8dDAlLuB1cb/qOD+rk7cmwt+1yKpk9cudqBanTi6zTbXRtV8qylNtjyOVKy1HTz0GW9rjt6sSjAZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg="},{}],6:[function(e,t,n){var r=e("./dictionary-browser");n.init=function(){n.dictionary=r.init()},n.offsetsByLength=new Uint32Array([0,0,0,0,0,4096,9216,21504,35840,44032,53248,63488,74752,87040,93696,100864,104704,106752,108928,113536,115968,118528,119872,121280,122016]),n.sizeBitsByLength=new Uint8Array([0,0,0,0,10,10,11,11,10,10,10,10,10,9,9,8,7,7,8,7,7,6,6,5,5]),n.minDictionaryWordLength=4,n.maxDictionaryWordLength=24},{"./dictionary-browser":4}],7:[function(e,t,n){function r(e,t){this.bits=e,this.value=t}n.HuffmanCode=r;var a=15;function s(e,t){for(var n=1<<t-1;e&n;)n>>=1;return(e&n-1)+n}function i(e,t,n,a,s){do{e[t+(a-=n)]=new r(s.bits,s.value)}while(a>0)}function o(e,t,n){for(var r=1<<t-n;t<a&&!((r-=e[t])<=0);)++t,r<<=1;return t-n}n.BrotliBuildHuffmanTable=function(e,t,n,l,c){var u,d,m,p,h,f,g,y,v,b,_=t,E=new Int32Array(a+1),w=new Int32Array(a+1);for(b=new Int32Array(c),d=0;d<c;d++)E[l[d]]++;for(w[1]=0,u=1;u<a;u++)w[u+1]=w[u]+E[u];for(d=0;d<c;d++)0!==l[d]&&(b[w[l[d]]++]=d);if(v=y=1<<(g=n),1===w[a]){for(m=0;m<v;++m)e[t+m]=new r(0,65535&b[0]);return v}for(m=0,d=0,u=1,p=2;u<=n;++u,p<<=1)for(;E[u]>0;--E[u])i(e,t+m,p,y,new r(255&u,65535&b[d++])),m=s(m,u);for(f=v-1,h=-1,u=n+1,p=2;u<=a;++u,p<<=1)for(;E[u]>0;--E[u])(m&f)!==h&&(t+=y,v+=y=1<<(g=o(E,u,n)),e[_+(h=m&f)]=new r(g+n&255,t-_-h&65535)),i(e,t+(m>>n),p,y,new r(u-n&255,65535&b[d++])),m=s(m,u);return v}},{}],8:[function(e,t,n){"use strict";n.byteLength=u,n.toByteArray=m,n.fromByteArray=f;for(var r=[],a=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=i.length;o<l;++o)r[o]=i[o],a[i.charCodeAt(o)]=o;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r}function d(e,t,n){return 3*(t+n)/4-n}function m(e){for(var t,n=c(e),r=n[0],i=n[1],o=new s(d(e,r,i)),l=0,u=i>0?r-4:r,m=0;m<u;m+=4)t=a[e.charCodeAt(m)]<<18|a[e.charCodeAt(m+1)]<<12|a[e.charCodeAt(m+2)]<<6|a[e.charCodeAt(m+3)],o[l++]=t>>16&255,o[l++]=t>>8&255,o[l++]=255&t;return 2===i&&(t=a[e.charCodeAt(m)]<<2|a[e.charCodeAt(m+1)]>>4,o[l++]=255&t),1===i&&(t=a[e.charCodeAt(m)]<<10|a[e.charCodeAt(m+1)]<<4|a[e.charCodeAt(m+2)]>>2,o[l++]=t>>8&255,o[l++]=255&t),o}function p(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function h(e,t,n){for(var r,a=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(p(r));return a.join("")}function f(e){for(var t,n=e.length,a=n%3,s=[],i=16383,o=0,l=n-a;o<l;o+=i)s.push(h(e,o,o+i>l?l:o+i));return 1===a?(t=e[n-1],s.push(r[t>>2]+r[t<<4&63]+"==")):2===a&&(t=(e[n-2]<<8)+e[n-1],s.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),s.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},{}],9:[function(e,t,n){function r(e,t){this.offset=e,this.nbits=t}n.kBlockLengthPrefixCode=[new r(1,2),new r(5,2),new r(9,2),new r(13,2),new r(17,3),new r(25,3),new r(33,3),new r(41,3),new r(49,4),new r(65,4),new r(81,4),new r(97,4),new r(113,5),new r(145,5),new r(177,5),new r(209,5),new r(241,6),new r(305,6),new r(369,7),new r(497,8),new r(753,9),new r(1265,10),new r(2289,11),new r(4337,12),new r(8433,13),new r(16625,24)],n.kInsertLengthPrefixCode=[new r(0,0),new r(1,0),new r(2,0),new r(3,0),new r(4,0),new r(5,0),new r(6,1),new r(8,1),new r(10,2),new r(14,2),new r(18,3),new r(26,3),new r(34,4),new r(50,4),new r(66,5),new r(98,5),new r(130,6),new r(194,7),new r(322,8),new r(578,9),new r(1090,10),new r(2114,12),new r(6210,14),new r(22594,24)],n.kCopyLengthPrefixCode=[new r(2,0),new r(3,0),new r(4,0),new r(5,0),new r(6,0),new r(7,0),new r(8,0),new r(9,0),new r(10,1),new r(12,1),new r(14,2),new r(18,2),new r(22,3),new r(30,3),new r(38,4),new r(54,4),new r(70,5),new r(102,5),new r(134,6),new r(198,7),new r(326,8),new r(582,9),new r(1094,10),new r(2118,24)],n.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],n.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},{}],10:[function(e,t,n){function r(e){this.buffer=e,this.pos=0}function a(e){this.buffer=e,this.pos=0}r.prototype.read=function(e,t,n){this.pos+n>this.buffer.length&&(n=this.buffer.length-this.pos);for(var r=0;r<n;r++)e[t+r]=this.buffer[this.pos+r];return this.pos+=n,n},n.BrotliInput=r,a.prototype.write=function(e,t){if(this.pos+t>this.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(e.subarray(0,t),this.pos),this.pos+=t,t},n.BrotliOutput=a},{}],11:[function(e,t,n){var r=e("./dictionary"),a=0,s=1,i=2,o=3,l=4,c=5,u=6,d=7,m=8,p=9,h=10,f=11,g=12,y=13,v=14,b=15,_=16,E=17,w=18,S=20;function x(e,t,n){this.prefix=new Uint8Array(e.length),this.transform=t,this.suffix=new Uint8Array(n.length);for(var r=0;r<e.length;r++)this.prefix[r]=e.charCodeAt(r);for(r=0;r<n.length;r++)this.suffix[r]=n.charCodeAt(r)}var C=[new x("",a,""),new x("",a," "),new x(" ",a," "),new x("",g,""),new x("",h," "),new x("",a," the "),new x(" ",a,""),new x("s ",a," "),new x("",a," of "),new x("",h,""),new x("",a," and "),new x("",y,""),new x("",s,""),new x(", ",a," "),new x("",a,", "),new x(" ",h," "),new x("",a," in "),new x("",a," to "),new x("e ",a," "),new x("",a,'"'),new x("",a,"."),new x("",a,'">'),new x("",a,"\n"),new x("",o,""),new x("",a,"]"),new x("",a," for "),new x("",v,""),new x("",i,""),new x("",a," a "),new x("",a," that "),new x(" ",h,""),new x("",a,". "),new x(".",a,""),new x(" ",a,", "),new x("",b,""),new x("",a," with "),new x("",a,"'"),new x("",a," from "),new x("",a," by "),new x("",_,""),new x("",E,""),new x(" the ",a,""),new x("",l,""),new x("",a,". The "),new x("",f,""),new x("",a," on "),new x("",a," as "),new x("",a," is "),new x("",d,""),new x("",s,"ing "),new x("",a,"\n\t"),new x("",a,":"),new x(" ",a,". "),new x("",a,"ed "),new x("",S,""),new x("",w,""),new x("",u,""),new x("",a,"("),new x("",h,", "),new x("",m,""),new x("",a," at "),new x("",a,"ly "),new x(" the ",a," of "),new x("",c,""),new x("",p,""),new x(" ",h,", "),new x("",h,'"'),new x(".",a,"("),new x("",f," "),new x("",h,'">'),new x("",a,'="'),new x(" ",a,"."),new x(".com/",a,""),new x(" the ",a," of the "),new x("",h,"'"),new x("",a,". This "),new x("",a,","),new x(".",a," "),new x("",h,"("),new x("",h,"."),new x("",a," not "),new x(" ",a,'="'),new x("",a,"er "),new x(" ",f," "),new x("",a,"al "),new x(" ",f,""),new x("",a,"='"),new x("",f,'"'),new x("",h,". "),new x(" ",a,"("),new x("",a,"ful "),new x(" ",h,". "),new x("",a,"ive "),new x("",a,"less "),new x("",f,"'"),new x("",a,"est "),new x(" ",h,"."),new x("",f,'">'),new x(" ",a,"='"),new x("",h,","),new x("",a,"ize "),new x("",f,"."),new x(" ",a,""),new x(" ",a,","),new x("",h,'="'),new x("",f,'="'),new x("",a,"ous "),new x("",f,", "),new x("",h,"='"),new x(" ",h,","),new x(" ",f,'="'),new x(" ",f,", "),new x("",f,","),new x("",f,"("),new x("",f,". "),new x(" ",f,"."),new x("",f,"='"),new x(" ",f,". "),new x(" ",h,'="'),new x(" ",f,"='"),new x(" ",h,"='")];function k(e,t){return e[t]<192?(e[t]>=97&&e[t]<=122&&(e[t]^=32),1):e[t]<224?(e[t+1]^=32,2):(e[t+2]^=5,3)}n.kTransforms=C,n.kNumTransforms=C.length,n.transformDictionaryWord=function(e,t,n,a,s){var i,o=C[s].prefix,l=C[s].suffix,c=C[s].transform,u=c<g?0:c-(g-1),d=0,m=t;u>a&&(u=a);for(var y=0;y<o.length;)e[t++]=o[y++];for(n+=u,a-=u,c<=p&&(a-=c),d=0;d<a;d++)e[t++]=r.dictionary[n+d];if(i=t-a,c===h)k(e,i);else if(c===f)for(;a>0;){var v=k(e,i);i+=v,a-=v}for(var b=0;b<l.length;)e[t++]=l[b++];return t-m}},{"./dictionary":6}],12:[function(e,t,n){t.exports=e("./dec/decode").BrotliDecompressBuffer},{"./dec/decode":3}]},{},[12])(12)},4306:function(e,t){var n,r,a;
/*!
autosize 4.0.4
license: MIT
@@ -27,11 +27,11 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var r=n(1609);var a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=r.useState,i=r.useEffect,o=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!a(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=s({inst:{value:n,getSnapshot:t}}),a=r[0].inst,u=r[1];return o((function(){a.value=n,a.getSnapshot=t,c(a)&&u({inst:a})}),[e,n,t]),i((function(){return c(a)&&u({inst:a}),e((function(){c(a)&&u({inst:a})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},422:(e,t,n)=>{"use strict";e.exports=n(8477)},1609:e=>{"use strict";e.exports=window.React}},r={};function a(e){var t=r[e];if(void 0!==t)return t.exports;var s=r[e]={exports:{}};return n[e].call(s.exports,s,s.exports,a),s.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var s=Object.create(null);a.r(s);var i={};e=e||[null,t({}),t([]),t(t)];for(var o=2&r&&n;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach((e=>i[e]=()=>n[e]));return i.default=()=>n,a.d(s,i),s},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};(()=>{"use strict";a.r(s),a.d(s,{PluginMoreMenuItem:()=>Mx,PluginSidebar:()=>Px,PluginSidebarMoreMenuItem:()=>Ix,PluginTemplateSettingPanel:()=>fv,initializeEditor:()=>Ax,reinitializeEditor:()=>Ox,store:()=>tr});var e={};a.r(e),a.d(e,{closeModal:()=>L,disableComplementaryArea:()=>A,enableComplementaryArea:()=>M,openModal:()=>V,pinItem:()=>O,setDefaultComplementaryArea:()=>I,setFeatureDefaults:()=>D,setFeatureValue:()=>R,toggleFeature:()=>F,unpinItem:()=>N});var t={};a.r(t),a.d(t,{getActiveComplementaryArea:()=>B,isComplementaryAreaLoading:()=>z,isFeatureActive:()=>G,isItemPinned:()=>H,isModalActive:()=>U});var n={};a.r(n),a.d(n,{removeTemplates:()=>rn,setCanvasMode:()=>tn,setEditorCanvasContainerView:()=>nn});var r={};a.r(r),a.d(r,{__experimentalSetPreviewDeviceType:()=>sn,addTemplate:()=>ln,closeGeneralSidebar:()=>Cn,openGeneralSidebar:()=>xn,openNavigationPanelToMenu:()=>yn,removeTemplate:()=>cn,revertTemplate:()=>Sn,setEditedEntity:()=>mn,setEditedPostContext:()=>hn,setHasPageContentFocus:()=>Tn,setHomeTemplateId:()=>pn,setIsInserterOpened:()=>_n,setIsListViewOpened:()=>bn,setIsNavigationPanelOpened:()=>vn,setIsSaveViewOpened:()=>wn,setNavigationMenu:()=>dn,setNavigationPanelActiveMenu:()=>gn,setPage:()=>fn,setTemplate:()=>on,setTemplatePart:()=>un,switchEditorMode:()=>kn,toggleDistractionFree:()=>Pn,toggleFeature:()=>an,updateSettings:()=>En});var i={};a.r(i),a.d(i,{__experimentalGetInsertionPoint:()=>Gn,__experimentalGetPreviewDeviceType:()=>On,getCanUserCreateMedia:()=>Nn,getCurrentTemplateNavigationPanelSubMenu:()=>qn,getCurrentTemplateTemplateParts:()=>jn,getEditedPostContext:()=>Bn,getEditedPostId:()=>Ln,getEditedPostType:()=>Vn,getEditorMode:()=>Zn,getHomeTemplateId:()=>Dn,getNavigationPanelActiveMenu:()=>Yn,getPage:()=>zn,getReusableBlocks:()=>Fn,getSettings:()=>Rn,hasPageContentFocus:()=>Jn,isFeatureActive:()=>An,isInserterOpened:()=>Hn,isListViewOpened:()=>Un,isNavigationOpened:()=>Kn,isPage:()=>Xn,isSaveViewOpened:()=>Wn});var o={};a.r(o),a.d(o,{getCanvasMode:()=>Qn,getEditorCanvasContainerView:()=>$n});var l=a(1609),c=a.t(l,2);const u=window.wp.blocks,d=window.wp.blockLibrary,m=window.wp.data,h=window.wp.deprecated;var f=a.n(h);const g=window.wp.element,y=window.wp.editor;var v=a(5755),_=a.n(v);const b=window.wp.components,E=window.wp.i18n,w=window.wp.primitives,S=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),x=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"})),C=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"})),k=window.wp.viewport,T=window.wp.preferences,P=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),I=(e,t)=>({type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e,area:t}),M=(e,t)=>({registry:n,dispatch:r})=>{if(!t)return;n.select(T.store).get(e,"isComplementaryAreaVisible")||n.dispatch(T.store).set(e,"isComplementaryAreaVisible",!0),r({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t})},A=e=>({registry:t})=>{t.select(T.store).get(e,"isComplementaryAreaVisible")&&t.dispatch(T.store).set(e,"isComplementaryAreaVisible",!1)},O=(e,t)=>({registry:n})=>{if(!t)return;const r=n.select(T.store).get(e,"pinnedItems");!0!==r?.[t]&&n.dispatch(T.store).set(e,"pinnedItems",{...r,[t]:!0})},N=(e,t)=>({registry:n})=>{if(!t)return;const r=n.select(T.store).get(e,"pinnedItems");n.dispatch(T.store).set(e,"pinnedItems",{...r,[t]:!1})};function F(e,t){return function({registry:n}){f()("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),n.dispatch(T.store).toggle(e,t)}}function R(e,t,n){return function({registry:r}){f()("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),r.dispatch(T.store).set(e,t,!!n)}}function D(e,t){return function({registry:n}){f()("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),n.dispatch(T.store).setDefaults(e,t)}}function V(e){return{type:"OPEN_MODAL",name:e}}function L(){return{type:"CLOSE_MODAL"}}const B=(0,m.createRegistrySelector)((e=>(t,n)=>{const r=e(T.store).get(n,"isComplementaryAreaVisible");if(void 0!==r)return!1===r?null:t?.complementaryAreas?.[n]})),z=(0,m.createRegistrySelector)((e=>(t,n)=>{const r=e(T.store).get(n,"isComplementaryAreaVisible"),a=t?.complementaryAreas?.[n];return r&&void 0===a})),H=(0,m.createRegistrySelector)((e=>(t,n,r)=>{var a;const s=e(T.store).get(n,"pinnedItems");return null===(a=s?.[r])||void 0===a||a})),G=(0,m.createRegistrySelector)((e=>(t,n,r)=>(f()("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(T.store).get(n,r))));function U(e,t){return e.activeModal===t}const W=(0,m.combineReducers)({complementaryAreas:function(e={},t){switch(t.type){case"SET_DEFAULT_COMPLEMENTARY_AREA":{const{scope:n,area:r}=t;return e[n]?e:{...e,[n]:r}}case"ENABLE_COMPLEMENTARY_AREA":{const{scope:n,area:r}=t;return{...e,[n]:r}}}return e},activeModal:function(e=null,t){switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e}}),j=(0,m.createReduxStore)("core/interface",{reducer:W,actions:e,selectors:t});(0,m.register)(j);const Z=window.wp.plugins,q=(0,Z.withPluginContext)(((e,t)=>({icon:t.icon||e.icon,identifier:t.identifier||`${e.name}/${t.name}`})));const Y=q((function({as:e=b.Button,scope:t,identifier:n,icon:r,selectedIcon:a,name:s,...i}){const o=e,c=(0,m.useSelect)((e=>e(j).getActiveComplementaryArea(t)===n),[n,t]),{enableComplementaryArea:u,disableComplementaryArea:d}=(0,m.useDispatch)(j);return(0,l.createElement)(o,{icon:a&&c?a:r,"aria-controls":n.replace("/",":"),onClick:()=>{c?d(t):u(t,n)},...i})})),K=({smallScreenTitle:e,children:t,className:n,toggleButtonProps:r})=>{const a=(0,l.createElement)(Y,{icon:P,...r});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"components-panel__header interface-complementary-area-header__small"},e&&(0,l.createElement)("span",{className:"interface-complementary-area-header__small-title"},e),a),(0,l.createElement)("div",{className:_()("components-panel__header","interface-complementary-area-header",n),tabIndex:-1},t,a))},X=()=>{};function J({name:e,as:t=b.Button,onClick:n,...r}){return(0,l.createElement)(b.Fill,{name:e},(({onClick:e})=>(0,l.createElement)(t,{onClick:n||e?(...t)=>{(n||X)(...t),(e||X)(...t)}:void 0,...r})))}J.Slot=function({name:e,as:t=b.ButtonGroup,fillProps:n={},bubblesVirtually:r,...a}){return(0,l.createElement)(b.Slot,{name:e,bubblesVirtually:r,fillProps:n},(e=>{if(!g.Children.toArray(e).length)return null;const n=[];g.Children.forEach(e,(({props:{__unstableExplicitMenuItem:e,__unstableTarget:t}})=>{t&&e&&n.push(t)}));const r=g.Children.map(e,(e=>!e.props.__unstableExplicitMenuItem&&n.includes(e.props.__unstableTarget)?null:e));return(0,l.createElement)(t,{...a},r)}))};const Q=J,$=({__unstableExplicitMenuItem:e,__unstableTarget:t,...n})=>(0,l.createElement)(b.MenuItem,{...n});function ee({scope:e,target:t,__unstableExplicitMenuItem:n,...r}){return(0,l.createElement)(Y,{as:r=>(0,l.createElement)(Q,{__unstableExplicitMenuItem:n,__unstableTarget:`${e}/${t}`,as:$,name:`${e}/plugin-more-menu`,...r}),role:"menuitemcheckbox",selectedIcon:S,name:t,scope:e,...r})}function te({scope:e,...t}){return(0,l.createElement)(b.Fill,{name:`PinnedItems/${e}`,...t})}te.Slot=function({scope:e,className:t,...n}){return(0,l.createElement)(b.Slot,{name:`PinnedItems/${e}`,...n},(e=>e?.length>0&&(0,l.createElement)("div",{className:_()(t,"interface-pinned-items")},e)))};const ne=te;function re({scope:e,children:t,className:n,id:r}){return(0,l.createElement)(b.Fill,{name:`ComplementaryArea/${e}`},(0,l.createElement)("div",{id:r,className:n},t))}const ae=q((function({children:e,className:t,closeLabel:n=(0,E.__)("Close plugin"),identifier:r,header:a,headerClassName:s,icon:i,isPinnable:o=!0,panelClassName:c,scope:u,name:d,smallScreenTitle:p,title:h,toggleShortcut:f,isActiveByDefault:y}){const{isLoading:v,isActive:w,isPinned:P,activeArea:I,isSmall:M,isLarge:A,showIconLabels:O}=(0,m.useSelect)((e=>{const{getActiveComplementaryArea:t,isComplementaryAreaLoading:n,isItemPinned:a}=e(j),{get:s}=e(T.store),i=t(u);return{isLoading:n(u),isActive:i===r,isPinned:a(u,r),activeArea:i,isSmall:e(k.store).isViewportMatch("< medium"),isLarge:e(k.store).isViewportMatch("large"),showIconLabels:s("core","showIconLabels")}}),[r,u]);!function(e,t,n,r,a){const s=(0,g.useRef)(!1),i=(0,g.useRef)(!1),{enableComplementaryArea:o,disableComplementaryArea:l}=(0,m.useDispatch)(j);(0,g.useEffect)((()=>{r&&a&&!s.current?(l(e),i.current=!0):i.current&&!a&&s.current?(i.current=!1,o(e,t)):i.current&&n&&n!==t&&(i.current=!1),a!==s.current&&(s.current=a)}),[r,a,e,t,n,l,o])}(u,r,I,w,M);const{enableComplementaryArea:N,disableComplementaryArea:F,pinItem:R,unpinItem:D}=(0,m.useDispatch)(j);return(0,g.useEffect)((()=>{y&&void 0===I&&!M?N(u,r):void 0===I&&M&&F(u,r)}),[I,y,u,r,M,N,F]),(0,l.createElement)(l.Fragment,null,o&&(0,l.createElement)(ne,{scope:u},P&&(0,l.createElement)(Y,{scope:u,identifier:r,isPressed:w&&(!O||A),"aria-expanded":w,"aria-disabled":v,label:h,icon:O?S:i,showTooltip:!O,variant:O?"tertiary":void 0,size:"compact"})),d&&o&&(0,l.createElement)(ee,{target:d,scope:u,icon:i},h),w&&(0,l.createElement)(re,{className:_()("interface-complementary-area",t),scope:u,id:r.replace("/",":")},(0,l.createElement)(K,{className:s,closeLabel:n,onClose:()=>F(u),smallScreenTitle:p,toggleButtonProps:{label:n,shortcut:f,scope:u,identifier:r}},a||(0,l.createElement)(l.Fragment,null,(0,l.createElement)("strong",null,h),o&&(0,l.createElement)(b.Button,{className:"interface-complementary-area__pin-unpin-item",icon:P?x:C,label:P?(0,E.__)("Unpin from toolbar"):(0,E.__)("Pin to toolbar"),onClick:()=>(P?D:R)(u,r),isPressed:P,"aria-expanded":P}))),(0,l.createElement)(b.Panel,{className:c},e)))}));ae.Slot=function({scope:e,...t}){return(0,l.createElement)(b.Slot,{name:`ComplementaryArea/${e}`,...t})};const se=ae,ie=window.wp.compose;function oe({children:e,className:t,ariaLabel:n,as:r="div",...a}){return(0,l.createElement)(r,{className:_()("interface-navigable-region",t),"aria-label":n,role:"region",tabIndex:"-1",...a},e)}const le={hidden:{opacity:0},hover:{opacity:1,transition:{type:"tween",delay:.2,delayChildren:.2}},distractionFreeInactive:{opacity:1,transition:{delay:0}}};const ce=(0,g.forwardRef)((function({isDistractionFree:e,footer:t,header:n,editorNotices:r,sidebar:a,secondarySidebar:s,notices:i,content:o,actions:c,labels:u,className:d,enableRegionNavigation:m=!0,shortcuts:p},h){const f=(0,b.__unstableUseNavigateRegions)(p);!function(e){(0,g.useEffect)((()=>{const t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}}),[e])}("interface-interface-skeleton__html-container");const y={...{header:(0,E._x)("Header","header landmark area"),body:(0,E.__)("Content"),secondarySidebar:(0,E.__)("Block Library"),sidebar:(0,E.__)("Settings"),actions:(0,E.__)("Publish"),footer:(0,E.__)("Footer")},...u};return(0,l.createElement)("div",{...m?f:{},ref:(0,ie.useMergeRefs)([h,m?f.ref:void 0]),className:_()(d,"interface-interface-skeleton",f.className,!!t&&"has-footer")},(0,l.createElement)("div",{className:"interface-interface-skeleton__editor"},!!n&&(0,l.createElement)(oe,{as:b.__unstableMotion.div,className:"interface-interface-skeleton__header","aria-label":y.header,initial:e?"hidden":"distractionFreeInactive",whileHover:e?"hover":"distractionFreeInactive",animate:e?"hidden":"distractionFreeInactive",variants:le,transition:e?{type:"tween",delay:.8}:void 0},n),e&&(0,l.createElement)("div",{className:"interface-interface-skeleton__header"},r),(0,l.createElement)("div",{className:"interface-interface-skeleton__body"},!!s&&(0,l.createElement)(oe,{className:"interface-interface-skeleton__secondary-sidebar",ariaLabel:y.secondarySidebar},s),!!i&&(0,l.createElement)("div",{className:"interface-interface-skeleton__notices"},i),(0,l.createElement)(oe,{className:"interface-interface-skeleton__content",ariaLabel:y.body},o),!!a&&(0,l.createElement)(oe,{className:"interface-interface-skeleton__sidebar",ariaLabel:y.sidebar},a),!!c&&(0,l.createElement)(oe,{className:"interface-interface-skeleton__actions",ariaLabel:y.actions},c))),!!t&&(0,l.createElement)(oe,{className:"interface-interface-skeleton__footer",ariaLabel:y.footer},t))})),ue=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));function de({as:e=b.DropdownMenu,className:t,label:n=(0,E.__)("Options"),popoverProps:r,toggleProps:a,children:s}){return(0,l.createElement)(e,{className:_()("interface-more-menu-dropdown",t),icon:ue,label:n,popoverProps:{placement:"bottom-end",...r,className:_()("interface-more-menu-dropdown__content",r?.className)},toggleProps:{tooltipPosition:"bottom",...a,size:"compact"}},(e=>s(e)))}const me=window.wp.widgets,pe=window.wp.hooks,he=window.wp.mediaUtils;(0,pe.addFilter)("editor.MediaUpload","core/edit-site/components/media-upload",(()=>he.MediaUpload));const fe=window.wp.blockEditor,ge=window.wp.notices,ye=window.wp.coreData;var ve={grad:.9,turn:360,rad:360/(2*Math.PI)},_e=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},be=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Ee=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},we=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Se=function(e){return{r:Ee(e.r,0,255),g:Ee(e.g,0,255),b:Ee(e.b,0,255),a:Ee(e.a)}},xe=function(e){return{r:be(e.r),g:be(e.g),b:be(e.b),a:be(e.a,3)}},Ce=/^#([0-9a-f]{3,8})$/i,ke=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Te=function(e){var t=e.r,n=e.g,r=e.b,a=e.a,s=Math.max(t,n,r),i=s-Math.min(t,n,r),o=i?s===t?(n-r)/i:s===n?2+(r-t)/i:4+(t-n)/i:0;return{h:60*(o<0?o+6:o),s:s?i/s*100:0,v:s/255*100,a}},Pe=function(e){var t=e.h,n=e.s,r=e.v,a=e.a;t=t/360*6,n/=100,r/=100;var s=Math.floor(t),i=r*(1-n),o=r*(1-(t-s)*n),l=r*(1-(1-t+s)*n),c=s%6;return{r:255*[r,o,i,i,l,r][c],g:255*[l,r,r,o,i,i][c],b:255*[i,i,l,r,r,o][c],a}},Ie=function(e){return{h:we(e.h),s:Ee(e.s,0,100),l:Ee(e.l,0,100),a:Ee(e.a)}},Me=function(e){return{h:be(e.h),s:be(e.s),l:be(e.l),a:be(e.a,3)}},Ae=function(e){return Pe((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},Oe=function(e){return{h:(t=Te(e)).h,s:(a=(200-(n=t.s))*(r=t.v)/100)>0&&a<200?n*r/100/(a<=100?a:200-a)*100:0,l:a/2,a:t.a};var t,n,r,a},Ne=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Fe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Re=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,De=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ve={string:[[function(e){var t=Ce.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?be(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?be(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Re.exec(e)||De.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Se({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=Ne.exec(e)||Fe.exec(e);if(!t)return null;var n,r,a=Ie({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(ve[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return Ae(a)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,a=e.a,s=void 0===a?1:a;return _e(t)&&_e(n)&&_e(r)?Se({r:Number(t),g:Number(n),b:Number(r),a:Number(s)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,a=e.a,s=void 0===a?1:a;if(!_e(t)||!_e(n)||!_e(r))return null;var i=Ie({h:Number(t),s:Number(n),l:Number(r),a:Number(s)});return Ae(i)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,a=e.a,s=void 0===a?1:a;if(!_e(t)||!_e(n)||!_e(r))return null;var i=function(e){return{h:we(e.h),s:Ee(e.s,0,100),v:Ee(e.v,0,100),a:Ee(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(s)});return Pe(i)},"hsv"]]},Le=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},Be=function(e){return"string"==typeof e?Le(e.trim(),Ve.string):"object"==typeof e&&null!==e?Le(e,Ve.object):[null,void 0]},ze=function(e,t){var n=Oe(e);return{h:n.h,s:Ee(n.s+100*t,0,100),l:n.l,a:n.a}},He=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Ge=function(e,t){var n=Oe(e);return{h:n.h,s:n.s,l:Ee(n.l+100*t,0,100),a:n.a}},Ue=function(){function e(e){this.parsed=Be(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return be(He(this.rgba),2)},e.prototype.isDark=function(){return He(this.rgba)<.5},e.prototype.isLight=function(){return He(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=xe(this.rgba)).r,n=e.g,r=e.b,s=(a=e.a)<1?ke(be(255*a)):"","#"+ke(t)+ke(n)+ke(r)+s;var e,t,n,r,a,s},e.prototype.toRgb=function(){return xe(this.rgba)},e.prototype.toRgbString=function(){return t=(e=xe(this.rgba)).r,n=e.g,r=e.b,(a=e.a)<1?"rgba("+t+", "+n+", "+r+", "+a+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,a},e.prototype.toHsl=function(){return Me(Oe(this.rgba))},e.prototype.toHslString=function(){return t=(e=Me(Oe(this.rgba))).h,n=e.s,r=e.l,(a=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+a+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,a},e.prototype.toHsv=function(){return e=Te(this.rgba),{h:be(e.h),s:be(e.s),v:be(e.v),a:be(e.a,3)};var e},e.prototype.invert=function(){return We({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),We(ze(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),We(ze(this.rgba,-e))},e.prototype.grayscale=function(){return We(ze(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),We(Ge(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),We(Ge(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?We({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):be(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Oe(this.rgba);return"number"==typeof e?We({h:e,s:t.s,l:t.l,a:t.a}):be(t.h)},e.prototype.isEqual=function(e){return this.toHex()===We(e).toHex()},e}(),We=function(e){return e instanceof Ue?e:new Ue(e)},je=[],Ze=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},qe=function(e){return.2126*Ze(e.r)+.7152*Ze(e.g)+.0722*Ze(e.b)};const Ye=window.wp.privateApis,{lock:Ke,unlock:Xe}=(0,Ye.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/edit-site"),{useGlobalSetting:Je,useGlobalStyle:Qe}=Xe(fe.privateApis);function $e(){const[e="black"]=Qe("color.text"),[t="white"]=Qe("color.background"),[n=e]=Qe("elements.h1.color.text"),[r]=Je("color.palette.core"),[a]=Je("color.palette.theme"),[s]=Je("color.palette.custom"),i=(null!=a?a:[]).concat(null!=s?s:[]).concat(null!=r?r:[]),o=i.filter((({color:e})=>e!==t&&e!==n)).slice(0,2);return{paletteColors:i,highlightedColors:o}}!function(e){e.forEach((function(e){je.indexOf(e)<0&&(e(Ue,Ve),je.push(e))}))}([function(e){e.prototype.luminance=function(){return e=qe(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,r,a,s,i,o,l,c=t instanceof e?t:new e(t);return s=this.rgba,i=c.toRgb(),n=(o=qe(s))>(l=qe(i))?(o+.05)/(l+.05):(l+.05)/(o+.05),void 0===(r=2)&&(r=0),void 0===a&&(a=Math.pow(10,r)),Math.floor(a*n)/a+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(s=(n=t).size)?"normal":s,"AAA"===(a=void 0===(r=n.level)?"AA":r)&&"normal"===i?7:"AA"===a&&"large"===i?3:4.5);var n,r,a,s,i}}]);const{cleanEmptyObject:et,GlobalStylesContext:tt}=Xe(fe.privateApis),nt={...u.__EXPERIMENTAL_STYLE_PROPERTY,blockGap:{value:["spacing","blockGap"]}},rt={"border.color":"color","color.background":"color","color.text":"color","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.caption.color.text":"color","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",blockGap:"spacing","typography.fontSize":"font-size","typography.fontFamily":"font-family"},at={"border.color":"borderColor","color.background":"backgroundColor","color.text":"textColor","color.gradient":"gradient","typography.fontSize":"fontSize","typography.fontFamily":"fontFamily"},st=["border","color","spacing","typography"],it=(e,t)=>{let n=e;return t.forEach((e=>{n=n?.[e]})),n},ot=["borderColor","borderWidth","borderStyle"],lt=["top","right","bottom","left"];function ct(e,t,n){if(!t?.[e]||n?.[e]?.style)return[];const{color:r,style:a,width:s}=t[e];return!(r||s)||a?[]:[{path:["border",e,"style"],value:"solid"}]}function ut(e,t,n){const r=function(e,t){const{supportedPanels:n}=(0,m.useSelect)((n=>({supportedPanels:Xe(n(u.store)).getSupportedStyles(e,t)})),[e,t]);return n}(e),a=n?.styles?.blocks?.[e];return(0,g.useMemo)((()=>{const e=r.flatMap((e=>{if(!nt[e])return[];const{value:n}=nt[e],r=n.join("."),a=t[at[r]],s=a?`var:preset|${rt[r]}|${a}`:it(t.style,n);if("linkColor"===e){const e=s?[{path:n,value:s}]:[],r=["elements","link",":hover","color","text"],a=it(t.style,r);return a&&e.push({path:r,value:a}),e}if(ot.includes(e)&&s){const e=[{path:n,value:s}];return lt.forEach((t=>{const r=[...n];r.splice(-1,0,t),e.push({path:r,value:s})})),e}return s?[{path:n,value:s}]:[]}));return function(e,t,n){if(!e&&!t)return[];const r=[...ct("top",e,n),...ct("right",e,n),...ct("bottom",e,n),...ct("left",e,n)],{color:a,style:s,width:i}=e||{};return(t||a||i)&&!s&&lt.forEach((e=>{n?.[e]?.style||r.push({path:["border",e,"style"],value:"solid"})})),r}(t.style?.border,t.borderColor,a?.border).forEach((t=>e.push(t))),e}),[r,t,a])}function dt(e,t,n){return e&&"object"==typeof e?(t.reduce(((e,r,a)=>(void 0===e[r]&&(Number.isInteger(t[a+1])?e[r]=[]:e[r]={}),a===t.length-1&&(e[r]=n),e[r])),e),e):e}function mt(e){return e?JSON.parse(JSON.stringify(e)):{}}function pt({name:e,attributes:t,setAttributes:n}){const{user:r,setUserConfig:a}=(0,g.useContext)(tt),s=ut(e,t,r),{__unstableMarkNextChangeAsNotPersistent:i}=(0,m.useDispatch)(fe.store),{createSuccessNotice:o}=(0,m.useDispatch)(ge.store),c=(0,g.useCallback)((()=>{if(0!==s.length&&s.length>0){const{style:l}=t,c=mt(l),d=mt(r);for(const{path:t,value:n}of s)dt(c,t,void 0),dt(d,["styles","blocks",e,...t],n);const m={borderColor:void 0,backgroundColor:void 0,textColor:void 0,gradient:void 0,fontSize:void 0,fontFamily:void 0,style:et(c)};i(),n(m),a((()=>d),{undoIgnore:!0}),o((0,E.sprintf)((0,E.__)("%s styles applied."),(0,u.getBlockType)(e).title),{type:"snackbar",actions:[{label:(0,E.__)("Undo"),onClick(){i(),n(t),a((()=>r),{undoIgnore:!0})}}]})}}),[i,t,s,o,e,n,a,r]);return(0,l.createElement)(b.BaseControl,{className:"edit-site-push-changes-to-global-styles-control",help:(0,E.sprintf)((0,E.__)("Apply this block’s typography, spacing, dimensions, and color styles to all %s blocks."),(0,u.getBlockType)(e).title)},(0,l.createElement)(b.BaseControl.VisualLabel,null,(0,E.__)("Styles")),(0,l.createElement)(b.Button,{variant:"primary",disabled:0===s.length,onClick:c},(0,E.__)("Apply globally")))}function ht(e){const t=(0,fe.useBlockEditingMode)(),n=(0,m.useSelect)((e=>e(ye.store).getCurrentTheme()?.is_block_theme),[]),r=st.some((t=>(0,u.hasBlockSupport)(e.name,t)));return"default"===t&&r&&n?(0,l.createElement)(fe.InspectorAdvancedControls,null,(0,l.createElement)(pt,{...e})):null}const ft=(0,ie.createHigherOrderComponent)((e=>t=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(e,{...t}),t.isSelected&&(0,l.createElement)(ht,{...t}))));(0,pe.addFilter)("editor.BlockEdit","core/edit-site/push-changes-to-global-styles",ft);const gt=window.wp.router,yt=window.wp.url;function vt(){return void 0!==(0,yt.getQueryArg)(window.location.href,"wp_theme_preview")}function _t(){return vt()?(0,yt.getQueryArg)(window.location.href,"wp_theme_preview"):null}const{useHistory:bt}=Xe(gt.privateApis);function Et(e,t,n=!1){const r=bt();const a=(0,yt.getQueryArgs)(window.location.href),s=(0,yt.removeQueryArgs)(window.location.href,...Object.keys(a));vt()&&(e={...e,wp_theme_preview:_t()});return{href:(0,yt.addQueryArgs)(s,e),onClick:function(a){a?.preventDefault(),n?r.replace(e,t):r.push(e,t)}}}function wt({params:e={},state:t,replace:n=!1,children:r,...a}){const{href:s,onClick:i}=Et(e,t,n);return(0,l.createElement)("a",{href:s,onClick:i,...a},r)}const St=window.wp.patterns,xt="wp_navigation",Ct="wp_template",kt="wp_template_part",Tt={custom:"custom",theme:"theme",plugin:"plugin"},Pt="uncategorized",{PATTERN_TYPES:It,PATTERN_DEFAULT_CATEGORY:Mt,PATTERN_USER_CATEGORY:At,EXCLUDED_PATTERN_SOURCES:Ot,PATTERN_SYNC_TYPES:Nt}=Xe(St.privateApis),Ft=[kt,xt,It.user],Rt={[Ct]:(0,E.__)("Template"),[kt]:(0,E.__)("Template part"),[It.user]:(0,E.__)("Pattern"),[xt]:(0,E.__)("Navigation")},Dt="grid",Vt="table",Lt="list",Bt="enumeration",zt="in",Ht="notIn",{useLocation:Gt}=Xe(gt.privateApis);function Ut({attributes:e}){const{theme:t,slug:n}=e,{params:r}=Gt(),a=(0,m.useSelect)((e=>{const{getCurrentTheme:r,getEntityRecord:a}=e(ye.store);return a("postType",kt,`${t||r()?.stylesheet}//${n}`)}),[t,n]),s=Et({postId:a?.id,postType:a?.type,canvas:"edit"},{fromTemplateId:r.postId||a?.id});return a?(0,l.createElement)(b.ToolbarButton,{...s,onClick:e=>{s.onClick(e)}},(0,E.__)("Edit")):null}const Wt=(0,ie.createHigherOrderComponent)((e=>t=>{const{attributes:n,name:r}=t,a="core/template-part"===r&&n.slug;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(e,{key:"edit",...t}),a&&(0,l.createElement)(fe.BlockControls,{group:"other"},(0,l.createElement)(Ut,{attributes:n})))}),"withEditBlockControls");(0,pe.addFilter)("editor.BlockEdit","core/edit-site/template-part-edit-button",Wt);const{useLocation:jt}=Xe(gt.privateApis);function Zt({attributes:e}){const{ref:t}=e,{params:n}=jt(),r=(0,fe.useBlockEditingMode)(),a=(0,m.useSelect)((e=>e(ye.store).getEntityRecord("postType",xt,t)),[t]),s=Et({postId:a?.id,postType:a?.type,canvas:"edit"},{fromTemplateId:n.postId||a?.id});return a&&"default"===r?(0,l.createElement)(fe.BlockControls,{group:"other"},(0,l.createElement)(b.ToolbarButton,{...s,onClick:e=>{s.onClick(e)}},(0,E.__)("Edit"))):null}const qt=(0,ie.createHigherOrderComponent)((e=>t=>{const{attributes:n,name:r}=t,a="core/navigation"===r&&n.ref;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(e,{...t}),a&&(0,l.createElement)(Zt,{attributes:n}))}),"withEditBlockControls");(0,pe.addFilter)("editor.BlockEdit","core/edit-site/navigation-edit-button",qt);const Yt=(0,m.combineReducers)({settings:function(e={},t){return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},editedPost:function(e={},t){switch(t.type){case"SET_EDITED_POST":return{postType:t.postType,id:t.id,context:t.context};case"SET_EDITED_POST_CONTEXT":return{...e,context:t.context}}return e},saveViewPanel:function(e=!1,t){switch(t.type){case"SET_IS_SAVE_VIEW_OPENED":return t.isOpen;case"SET_CANVAS_MODE":return!1}return e},canvasMode:function(e="init",t){return"SET_CANVAS_MODE"===t.type?t.mode:e},editorCanvasContainerView:function(e=void 0,t){return"SET_EDITOR_CANVAS_CONTAINER_VIEW"===t.type?t.view:e}}),Kt=window.wp.apiFetch;var Xt=a.n(Kt);const Jt=window.wp.a11y,Qt="core/edit-site";function $t(e){return!!e&&(e?.source===Tt.custom&&e?.has_theme_file)}const en=window.wp.htmlEntities,tn=e=>({registry:t,dispatch:n})=>{const r=window.matchMedia("(min-width: 782px)").matches;t.dispatch(fe.store).__unstableSetEditorMode("edit"),n({type:"SET_CANVAS_MODE",mode:e}),r&&"edit"===e&&t.select(T.store).get("core","showListViewByDefault")&&!t.select(T.store).get("core","distractionFree")?t.dispatch(y.store).setIsListViewOpened(!0):t.dispatch(y.store).setIsListViewOpened(!1),t.dispatch(y.store).setIsInserterOpened(!1)},nn=e=>({dispatch:t})=>{t({type:"SET_EDITOR_CANVAS_CONTAINER_VIEW",view:e})},rn=e=>async({registry:t})=>{const n=e[0].type===Ct,r=await Promise.allSettled(e.map((e=>t.dispatch(ye.store).deleteEntityRecord("postType",e.type,e.id,{force:!0},{throwOnError:!0}))));if(r.every((({status:e})=>"fulfilled"===e))){let r;if(1===e.length){const t="string"==typeof e[0].title?e[0].title:e[0].title?.rendered;r=(0,E.sprintf)((0,E.__)('"%s" deleted.'),(0,en.decodeEntities)(t))}else r=n?(0,E.__)("Templates deleted."):(0,E.__)("Template parts deleted.");t.dispatch(ge.store).createSuccessNotice(r,{type:"snackbar",id:"site-editor-template-deleted-success"})}else{let e;if(1===r.length)e=r[0].reason?.message?r[0].reason.message:n?(0,E.__)("An error occurred while deleting the template."):(0,E.__)("An error occurred while deleting the template part.");else{const t=new Set,a=r.filter((({status:e})=>"rejected"===e));for(const e of a)e.reason?.message&&t.add(e.reason.message);e=0===t.size?n?(0,E.__)("An error occurred while deleting the templates."):(0,E.__)("An error occurred while deleting the template parts."):1===t.size?n?(0,E.sprintf)((0,E.__)("An error occurred while deleting the templates: %s"),[...t][0]):(0,E.sprintf)((0,E.__)("An error occurred while deleting the template parts: %s"),[...t][0]):n?(0,E.sprintf)((0,E.__)("Some errors occurred while deleting the templates: %s"),[...t].join(",")):(0,E.sprintf)((0,E.__)("Some errors occurred while deleting the template parts: %s"),[...t].join(","))}t.dispatch(ge.store).createErrorNotice(e,{type:"snackbar"})}};function an(e){return function({registry:t}){f()("dispatch( 'core/edit-site' ).toggleFeature( featureName )",{since:"6.0",alternative:"dispatch( 'core/preferences').toggle( 'core/edit-site', featureName )"}),t.dispatch(T.store).toggle("core/edit-site",e)}}const sn=e=>({registry:t})=>{f()("dispatch( 'core/edit-site' ).__experimentalSetPreviewDeviceType",{since:"6.5",version:"6.7",hint:"registry.dispatch( editorStore ).setDeviceType"}),t.dispatch(y.store).setDeviceType(e)};function on(){return f()("dispatch( 'core/edit-site' ).setTemplate",{since:"6.5",version:"6.8",hint:"The setTemplate is not needed anymore, the correct entity is resolved from the URL automatically."}),{type:"NOTHING"}}const ln=e=>async({dispatch:t,registry:n})=>{f()("dispatch( 'core/edit-site' ).addTemplate",{since:"6.5",version:"6.8",hint:"use saveEntityRecord directly"});const r=await n.dispatch(ye.store).saveEntityRecord("postType",Ct,e);e.content&&n.dispatch(ye.store).editEntityRecord("postType",Ct,r.id,{blocks:(0,u.parse)(e.content)},{undoIgnore:!0}),t({type:"SET_EDITED_POST",postType:Ct,id:r.id})},cn=e=>rn([e]);function un(e){return{type:"SET_EDITED_POST",postType:kt,id:e}}function dn(e){return{type:"SET_EDITED_POST",postType:xt,id:e}}function mn(e,t,n){return{type:"SET_EDITED_POST",postType:e,id:t,context:n}}function pn(){return f()("dispatch( 'core/edit-site' ).setHomeTemplateId",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function hn(e){return{type:"SET_EDITED_POST_CONTEXT",context:e}}function fn(){return f()("dispatch( 'core/edit-site' ).setPage",{since:"6.5",version:"6.8",hint:"The setPage is not needed anymore, the correct entity is resolved from the URL automatically."}),{type:"NOTHING"}}function gn(){return f()("dispatch( 'core/edit-site' ).setNavigationPanelActiveMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function yn(){return f()("dispatch( 'core/edit-site' ).openNavigationPanelToMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function vn(){return f()("dispatch( 'core/edit-site' ).setIsNavigationPanelOpened",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}const _n=e=>({registry:t})=>{f()("dispatch( 'core/edit-site' ).setIsInserterOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsInserterOpened"}),t.dispatch(y.store).setIsInserterOpened(e)},bn=e=>({registry:t})=>{f()("dispatch( 'core/edit-site' ).setIsListViewOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsListViewOpened"}),t.dispatch(y.store).setIsListViewOpened(e)};function En(e){return{type:"UPDATE_SETTINGS",settings:e}}function wn(e){return{type:"SET_IS_SAVE_VIEW_OPENED",isOpen:e}}const Sn=(e,{allowUndo:t=!0}={})=>async({registry:n})=>{const r="edit-site-template-reverted";if(n.dispatch(ge.store).removeNotice(r),$t(e))try{const a=n.select(ye.store).getEntityConfig("postType",e.type);if(!a)return void n.dispatch(ge.store).createErrorNotice((0,E.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const s=(0,yt.addQueryArgs)(`${a.baseURL}/${e.id}`,{context:"edit",source:"theme"}),i=await Xt()({path:s});if(!i)return void n.dispatch(ge.store).createErrorNotice((0,E.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const o=({blocks:e=[]})=>(0,u.__unstableSerializeAndClean)(e),l=n.select(ye.store).getEditedEntityRecord("postType",e.type,e.id);n.dispatch(ye.store).editEntityRecord("postType",e.type,e.id,{content:o,blocks:l.blocks,source:"custom"},{undoIgnore:!0});const c=(0,u.parse)(i?.content?.raw);if(n.dispatch(ye.store).editEntityRecord("postType",e.type,i.id,{content:o,blocks:c,source:"theme"}),t){const t=()=>{n.dispatch(ye.store).editEntityRecord("postType",e.type,l.id,{content:o,blocks:l.blocks,source:"custom"})};n.dispatch(ge.store).createSuccessNotice((0,E.__)("Template reverted."),{type:"snackbar",id:r,actions:[{label:(0,E.__)("Undo"),onClick:t}]})}}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,E.__)("Template revert failed. Please reload.");n.dispatch(ge.store).createErrorNotice(t,{type:"snackbar"})}else n.dispatch(ge.store).createErrorNotice((0,E.__)("This template is not revertable."),{type:"snackbar"})},xn=e=>({dispatch:t,registry:n})=>{n.select(T.store).get("core","distractionFree")&&t.toggleDistractionFree(),n.dispatch(j).enableComplementaryArea(Qt,e)},Cn=()=>({registry:e})=>{e.dispatch(j).disableComplementaryArea(Qt)},kn=e=>({dispatch:t,registry:n})=>{if(n.dispatch("core/preferences").set("core","editorMode",e),"visual"!==e&&n.dispatch(fe.store).clearSelectedBlock(),"visual"===e)(0,Jt.speak)((0,E.__)("Visual editor selected"),"assertive");else if("text"===e){n.select(T.store).get("core","distractionFree")&&t.toggleDistractionFree(),(0,Jt.speak)((0,E.__)("Code editor selected"),"assertive")}},Tn=e=>({dispatch:t,registry:n})=>{f()("dispatch( 'core/edit-site' ).setHasPageContentFocus",{since:"6.5"}),e&&n.dispatch(fe.store).clearSelectedBlock(),t({type:"SET_HAS_PAGE_CONTENT_FOCUS",hasPageContentFocus:e})},Pn=()=>({dispatch:e,registry:t})=>{const n=t.select(T.store).get("core","distractionFree");n&&t.dispatch(T.store).set("core","fixedToolbar",!1),n||t.batch((()=>{t.dispatch(T.store).set("core","fixedToolbar",!0),t.dispatch(y.store).setIsInserterOpened(!1),t.dispatch(y.store).setIsListViewOpened(!1),e.closeGeneralSidebar()})),t.batch((()=>{t.dispatch(T.store).set("core","distractionFree",!n),t.dispatch(ge.store).createInfoNotice(n?(0,E.__)("Distraction free off."):(0,E.__)("Distraction free on."),{id:"core/edit-site/distraction-free-mode/notice",type:"snackbar",actions:[{label:(0,E.__)("Undo"),onClick:()=>{t.batch((()=>{t.dispatch(T.store).set("core","fixedToolbar",!!n),t.dispatch(T.store).toggle("core","distractionFree")}))}}]})}))};const In=[];const Mn=function(e,t){var n,r,a=0;function s(){var s,i,o=n,l=arguments.length;e:for(;o;){if(o.args.length===arguments.length){for(i=0;i<l;i++)if(o.args[i]!==arguments[i]){o=o.next;continue e}return o!==n&&(o===r&&(r=o.prev),o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=n,o.prev=null,n.prev=o,n=o),o.val}o=o.next}for(s=new Array(l),i=0;i<l;i++)s[i]=arguments[i];return o={args:s,val:e.apply(null,s)},n?(n.prev=o,o.next=n):r=o,a===t.maxSize?(r=r.prev).next=null:a++,n=o,o.val}return t=t||{},s.clear=function(){n=null,r=null,a=0},s}((function(e=In,t){const n=t?t.reduce(((e,t)=>({...e,[t.id]:t})),{}):{},r=[],a=[...e];for(;a.length;){const{innerBlocks:e,...t}=a.shift();if(a.unshift(...e),(0,u.isTemplatePart)(t)){const{attributes:{theme:e,slug:a}}=t,s=n[`${e}//${a}`];s&&r.push({templatePart:s,block:t})}}return r})),An=(0,m.createRegistrySelector)((e=>(t,n)=>(f()("select( 'core/edit-site' ).isFeatureActive",{since:"6.0",alternative:"select( 'core/preferences' ).get"}),!!e(T.store).get("core/edit-site",n)))),On=(0,m.createRegistrySelector)((e=>()=>(f()("select( 'core/edit-site' ).__experimentalGetPreviewDeviceType",{since:"6.5",version:"6.7",alternative:"select( 'core/editor' ).getDeviceType"}),e(y.store).getDeviceType()))),Nn=(0,m.createRegistrySelector)((e=>()=>e(ye.store).canUser("create","media"))),Fn=(0,m.createRegistrySelector)((e=>()=>{f()("select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )",{since:"6.5",version:"6.8"});return"web"===g.Platform.OS?e(ye.store).getEntityRecords("postType","wp_block",{per_page:-1}):[]}));function Rn(e){return e.settings}function Dn(){f()("select( 'core/edit-site' ).getHomeTemplateId",{since:"6.2",version:"6.4"})}function Vn(e){return e.editedPost.postType}function Ln(e){return e.editedPost.id}function Bn(e){return e.editedPost.context}function zn(e){return{context:e.editedPost.context}}const Hn=(0,m.createRegistrySelector)((e=>()=>(f()("select( 'core/edit-site' ).isInserterOpened",{since:"6.5",alternative:"select( 'core/editor' ).isInserterOpened"}),e(y.store).isInserterOpened()))),Gn=(0,m.createRegistrySelector)((e=>()=>(f()("select( 'core/edit-site' ).__experimentalGetInsertionPoint",{since:"6.5",version:"6.7"}),Xe(e(y.store)).getInsertionPoint()))),Un=(0,m.createRegistrySelector)((e=>()=>(f()("select( 'core/edit-site' ).isListViewOpened",{since:"6.5",alternative:"select( 'core/editor' ).isListViewOpened"}),e(y.store).isListViewOpened())));function Wn(e){return e.saveViewPanel}const jn=(0,m.createRegistrySelector)((e=>()=>{const t=e(ye.store).getEntityRecords("postType",kt,{per_page:-1}),n=e(fe.store).getBlocksByName("core/template-part"),r=e(fe.store).getBlocksByClientId(n);return Mn(r,t)})),Zn=(0,m.createRegistrySelector)((e=>()=>e(T.store).get("core","editorMode")));function qn(){f()("dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu",{since:"6.2",version:"6.4"})}function Yn(){f()("dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu",{since:"6.2",version:"6.4"})}function Kn(){f()("dispatch( 'core/edit-site' ).isNavigationOpened",{since:"6.2",version:"6.4"})}function Xn(e){return!!e.editedPost.context?.postId}function Jn(){return f()("select( 'core/edit-site' ).hasPageContentFocus",{since:"6.5"}),!1}function Qn(e){return e.canvasMode}function $n(e){return e.editorCanvasContainerView}const er={reducer:Yt,actions:r,selectors:i},tr=(0,m.createReduxStore)(Qt,er);(0,m.register)(tr),Xe(tr).registerPrivateSelectors(o),Xe(tr).registerPrivateActions(n);const nr=window.wp.keyboardShortcuts,rr=window.wp.commands,ar=window.wp.coreCommands,sr=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})),ir=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"})),or=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,l.createElement)(w.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})),lr=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.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"})),cr=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})),ur=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),dr=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));function mr(e){return(0,l.createElement)(b.Button,{...e,className:_()("edit-site-sidebar-button",e.className)})}const{useLocation:pr}=Xe(gt.privateApis);function hr({isRoot:e,title:t,actions:n,meta:r,content:a,footer:s,description:i,backPath:o}){const{dashboardLink:c,dashboardLinkText:u,previewingThemeName:d}=(0,m.useSelect)((e=>{const{getSettings:t}=Xe(e(tr)),n=_t();return{dashboardLink:t().__experimentalDashboardLink,dashboardLinkText:t().__experimentalDashboardLinkText,previewingThemeName:n?e(ye.store).getTheme(n)?.name?.rendered:void 0}}),[]),p=pr(),h=(0,b.__experimentalUseNavigator)(),f=(0,E.isRTL)()?ur:dr;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.__experimentalVStack,{className:_()("edit-site-sidebar-navigation-screen__main",{"has-footer":!!s}),spacing:0,justify:"flex-start"},(0,l.createElement)(b.__experimentalHStack,{spacing:4,alignment:"flex-start",className:"edit-site-sidebar-navigation-screen__title-icon"},!e&&(0,l.createElement)(mr,{onClick:()=>{const e=null!=o?o:p.state?.backPath;e?h.goTo(e,{isBack:!0}):h.goToParent()},icon:f,label:(0,E.__)("Back"),showTooltip:!1}),e&&(0,l.createElement)(mr,{icon:f,label:u||(0,E.__)("Go to the Dashboard"),href:c||"index.php"}),(0,l.createElement)(b.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen__title",color:"#e0e0e0",level:1,size:20},vt()?(0,E.sprintf)("Previewing %1$s: %2$s",d,t):t),n&&(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen__actions"},n)),r&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen__meta"},r)),(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen__content"},i&&(0,l.createElement)("p",{className:"edit-site-sidebar-navigation-screen__description"},i),a)),s&&(0,l.createElement)("footer",{className:"edit-site-sidebar-navigation-screen__footer"},s))}const fr=(0,g.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,g.cloneElement)(e,{width:t,height:t,...n,ref:r})})),gr=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})),yr=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));function vr({className:e,icon:t,withChevron:n=!1,suffix:r,children:a,...s}){return(0,l.createElement)(b.__experimentalItem,{className:_()("edit-site-sidebar-navigation-item",{"with-suffix":!n&&r},e),...s},(0,l.createElement)(b.__experimentalHStack,{justify:"flex-start"},t&&(0,l.createElement)(fr,{style:{fill:"currentcolor"},icon:t,size:24}),(0,l.createElement)(b.FlexBlock,null,a),n&&(0,l.createElement)(fr,{icon:(0,E.isRTL)()?gr:yr,className:"edit-site-sidebar-navigation-item__drilldown-indicator",size:24}),!n&&r))}const _r=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})),br=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})),Er=br,wr=window.wp.keycodes;var Sr=a(66),xr=a.n(Sr);
+ */var r=n(1609);var a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=r.useState,i=r.useEffect,o=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!a(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=s({inst:{value:n,getSnapshot:t}}),a=r[0].inst,u=r[1];return o((function(){a.value=n,a.getSnapshot=t,c(a)&&u({inst:a})}),[e,n,t]),i((function(){return c(a)&&u({inst:a}),e((function(){c(a)&&u({inst:a})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},422:(e,t,n)=>{"use strict";e.exports=n(8477)},1609:e=>{"use strict";e.exports=window.React}},r={};function a(e){var t=r[e];if(void 0!==t)return t.exports;var s=r[e]={exports:{}};return n[e].call(s.exports,s,s.exports,a),s.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var s=Object.create(null);a.r(s);var i={};e=e||[null,t({}),t([]),t(t)];for(var o=2&r&&n;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach((e=>i[e]=()=>n[e]));return i.default=()=>n,a.d(s,i),s},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};(()=>{"use strict";a.r(s),a.d(s,{PluginMoreMenuItem:()=>Mx,PluginSidebar:()=>Px,PluginSidebarMoreMenuItem:()=>Ix,PluginTemplateSettingPanel:()=>fv,initializeEditor:()=>Ax,reinitializeEditor:()=>Ox,store:()=>tr});var e={};a.r(e),a.d(e,{closeModal:()=>L,disableComplementaryArea:()=>A,enableComplementaryArea:()=>M,openModal:()=>V,pinItem:()=>O,setDefaultComplementaryArea:()=>I,setFeatureDefaults:()=>D,setFeatureValue:()=>R,toggleFeature:()=>F,unpinItem:()=>N});var t={};a.r(t),a.d(t,{getActiveComplementaryArea:()=>B,isComplementaryAreaLoading:()=>z,isFeatureActive:()=>G,isItemPinned:()=>H,isModalActive:()=>U});var n={};a.r(n),a.d(n,{removeTemplates:()=>rn,setCanvasMode:()=>tn,setEditorCanvasContainerView:()=>nn});var r={};a.r(r),a.d(r,{__experimentalSetPreviewDeviceType:()=>sn,addTemplate:()=>ln,closeGeneralSidebar:()=>Cn,openGeneralSidebar:()=>xn,openNavigationPanelToMenu:()=>yn,removeTemplate:()=>cn,revertTemplate:()=>Sn,setEditedEntity:()=>mn,setEditedPostContext:()=>hn,setHasPageContentFocus:()=>Tn,setHomeTemplateId:()=>pn,setIsInserterOpened:()=>bn,setIsListViewOpened:()=>_n,setIsNavigationPanelOpened:()=>vn,setIsSaveViewOpened:()=>wn,setNavigationMenu:()=>dn,setNavigationPanelActiveMenu:()=>gn,setPage:()=>fn,setTemplate:()=>on,setTemplatePart:()=>un,switchEditorMode:()=>kn,toggleDistractionFree:()=>Pn,toggleFeature:()=>an,updateSettings:()=>En});var i={};a.r(i),a.d(i,{__experimentalGetInsertionPoint:()=>Gn,__experimentalGetPreviewDeviceType:()=>On,getCanUserCreateMedia:()=>Nn,getCurrentTemplateNavigationPanelSubMenu:()=>qn,getCurrentTemplateTemplateParts:()=>jn,getEditedPostContext:()=>Bn,getEditedPostId:()=>Ln,getEditedPostType:()=>Vn,getEditorMode:()=>Zn,getHomeTemplateId:()=>Dn,getNavigationPanelActiveMenu:()=>Yn,getPage:()=>zn,getReusableBlocks:()=>Fn,getSettings:()=>Rn,hasPageContentFocus:()=>Jn,isFeatureActive:()=>An,isInserterOpened:()=>Hn,isListViewOpened:()=>Un,isNavigationOpened:()=>Kn,isPage:()=>Xn,isSaveViewOpened:()=>Wn});var o={};a.r(o),a.d(o,{getCanvasMode:()=>Qn,getEditorCanvasContainerView:()=>$n});var l=a(1609),c=a.t(l,2);const u=window.wp.blocks,d=window.wp.blockLibrary,m=window.wp.data,h=window.wp.deprecated;var f=a.n(h);const g=window.wp.element,y=window.wp.editor;var v=a(5755),b=a.n(v);const _=window.wp.components,E=window.wp.i18n,w=window.wp.primitives,S=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),x=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"})),C=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"})),k=window.wp.viewport,T=window.wp.preferences,P=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),I=(e,t)=>({type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e,area:t}),M=(e,t)=>({registry:n,dispatch:r})=>{if(!t)return;n.select(T.store).get(e,"isComplementaryAreaVisible")||n.dispatch(T.store).set(e,"isComplementaryAreaVisible",!0),r({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t})},A=e=>({registry:t})=>{t.select(T.store).get(e,"isComplementaryAreaVisible")&&t.dispatch(T.store).set(e,"isComplementaryAreaVisible",!1)},O=(e,t)=>({registry:n})=>{if(!t)return;const r=n.select(T.store).get(e,"pinnedItems");!0!==r?.[t]&&n.dispatch(T.store).set(e,"pinnedItems",{...r,[t]:!0})},N=(e,t)=>({registry:n})=>{if(!t)return;const r=n.select(T.store).get(e,"pinnedItems");n.dispatch(T.store).set(e,"pinnedItems",{...r,[t]:!1})};function F(e,t){return function({registry:n}){f()("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),n.dispatch(T.store).toggle(e,t)}}function R(e,t,n){return function({registry:r}){f()("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),r.dispatch(T.store).set(e,t,!!n)}}function D(e,t){return function({registry:n}){f()("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),n.dispatch(T.store).setDefaults(e,t)}}function V(e){return{type:"OPEN_MODAL",name:e}}function L(){return{type:"CLOSE_MODAL"}}const B=(0,m.createRegistrySelector)((e=>(t,n)=>{const r=e(T.store).get(n,"isComplementaryAreaVisible");if(void 0!==r)return!1===r?null:t?.complementaryAreas?.[n]})),z=(0,m.createRegistrySelector)((e=>(t,n)=>{const r=e(T.store).get(n,"isComplementaryAreaVisible"),a=t?.complementaryAreas?.[n];return r&&void 0===a})),H=(0,m.createRegistrySelector)((e=>(t,n,r)=>{var a;const s=e(T.store).get(n,"pinnedItems");return null===(a=s?.[r])||void 0===a||a})),G=(0,m.createRegistrySelector)((e=>(t,n,r)=>(f()("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(T.store).get(n,r))));function U(e,t){return e.activeModal===t}const W=(0,m.combineReducers)({complementaryAreas:function(e={},t){switch(t.type){case"SET_DEFAULT_COMPLEMENTARY_AREA":{const{scope:n,area:r}=t;return e[n]?e:{...e,[n]:r}}case"ENABLE_COMPLEMENTARY_AREA":{const{scope:n,area:r}=t;return{...e,[n]:r}}}return e},activeModal:function(e=null,t){switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e}}),j=(0,m.createReduxStore)("core/interface",{reducer:W,actions:e,selectors:t});(0,m.register)(j);const Z=window.wp.plugins,q=(0,Z.withPluginContext)(((e,t)=>({icon:t.icon||e.icon,identifier:t.identifier||`${e.name}/${t.name}`})));const Y=q((function({as:e=_.Button,scope:t,identifier:n,icon:r,selectedIcon:a,name:s,...i}){const o=e,c=(0,m.useSelect)((e=>e(j).getActiveComplementaryArea(t)===n),[n,t]),{enableComplementaryArea:u,disableComplementaryArea:d}=(0,m.useDispatch)(j);return(0,l.createElement)(o,{icon:a&&c?a:r,"aria-controls":n.replace("/",":"),onClick:()=>{c?d(t):u(t,n)},...i})})),K=({smallScreenTitle:e,children:t,className:n,toggleButtonProps:r})=>{const a=(0,l.createElement)(Y,{icon:P,...r});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"components-panel__header interface-complementary-area-header__small"},e&&(0,l.createElement)("span",{className:"interface-complementary-area-header__small-title"},e),a),(0,l.createElement)("div",{className:b()("components-panel__header","interface-complementary-area-header",n),tabIndex:-1},t,a))},X=()=>{};function J({name:e,as:t=_.Button,onClick:n,...r}){return(0,l.createElement)(_.Fill,{name:e},(({onClick:e})=>(0,l.createElement)(t,{onClick:n||e?(...t)=>{(n||X)(...t),(e||X)(...t)}:void 0,...r})))}J.Slot=function({name:e,as:t=_.ButtonGroup,fillProps:n={},bubblesVirtually:r,...a}){return(0,l.createElement)(_.Slot,{name:e,bubblesVirtually:r,fillProps:n},(e=>{if(!g.Children.toArray(e).length)return null;const n=[];g.Children.forEach(e,(({props:{__unstableExplicitMenuItem:e,__unstableTarget:t}})=>{t&&e&&n.push(t)}));const r=g.Children.map(e,(e=>!e.props.__unstableExplicitMenuItem&&n.includes(e.props.__unstableTarget)?null:e));return(0,l.createElement)(t,{...a},r)}))};const Q=J,$=({__unstableExplicitMenuItem:e,__unstableTarget:t,...n})=>(0,l.createElement)(_.MenuItem,{...n});function ee({scope:e,target:t,__unstableExplicitMenuItem:n,...r}){return(0,l.createElement)(Y,{as:r=>(0,l.createElement)(Q,{__unstableExplicitMenuItem:n,__unstableTarget:`${e}/${t}`,as:$,name:`${e}/plugin-more-menu`,...r}),role:"menuitemcheckbox",selectedIcon:S,name:t,scope:e,...r})}function te({scope:e,...t}){return(0,l.createElement)(_.Fill,{name:`PinnedItems/${e}`,...t})}te.Slot=function({scope:e,className:t,...n}){return(0,l.createElement)(_.Slot,{name:`PinnedItems/${e}`,...n},(e=>e?.length>0&&(0,l.createElement)("div",{className:b()(t,"interface-pinned-items")},e)))};const ne=te;function re({scope:e,children:t,className:n,id:r}){return(0,l.createElement)(_.Fill,{name:`ComplementaryArea/${e}`},(0,l.createElement)("div",{id:r,className:n},t))}const ae=q((function({children:e,className:t,closeLabel:n=(0,E.__)("Close plugin"),identifier:r,header:a,headerClassName:s,icon:i,isPinnable:o=!0,panelClassName:c,scope:u,name:d,smallScreenTitle:p,title:h,toggleShortcut:f,isActiveByDefault:y}){const{isLoading:v,isActive:w,isPinned:P,activeArea:I,isSmall:M,isLarge:A,showIconLabels:O}=(0,m.useSelect)((e=>{const{getActiveComplementaryArea:t,isComplementaryAreaLoading:n,isItemPinned:a}=e(j),{get:s}=e(T.store),i=t(u);return{isLoading:n(u),isActive:i===r,isPinned:a(u,r),activeArea:i,isSmall:e(k.store).isViewportMatch("< medium"),isLarge:e(k.store).isViewportMatch("large"),showIconLabels:s("core","showIconLabels")}}),[r,u]);!function(e,t,n,r,a){const s=(0,g.useRef)(!1),i=(0,g.useRef)(!1),{enableComplementaryArea:o,disableComplementaryArea:l}=(0,m.useDispatch)(j);(0,g.useEffect)((()=>{r&&a&&!s.current?(l(e),i.current=!0):i.current&&!a&&s.current?(i.current=!1,o(e,t)):i.current&&n&&n!==t&&(i.current=!1),a!==s.current&&(s.current=a)}),[r,a,e,t,n,l,o])}(u,r,I,w,M);const{enableComplementaryArea:N,disableComplementaryArea:F,pinItem:R,unpinItem:D}=(0,m.useDispatch)(j);return(0,g.useEffect)((()=>{y&&void 0===I&&!M?N(u,r):void 0===I&&M&&F(u,r)}),[I,y,u,r,M,N,F]),(0,l.createElement)(l.Fragment,null,o&&(0,l.createElement)(ne,{scope:u},P&&(0,l.createElement)(Y,{scope:u,identifier:r,isPressed:w&&(!O||A),"aria-expanded":w,"aria-disabled":v,label:h,icon:O?S:i,showTooltip:!O,variant:O?"tertiary":void 0,size:"compact"})),d&&o&&(0,l.createElement)(ee,{target:d,scope:u,icon:i},h),w&&(0,l.createElement)(re,{className:b()("interface-complementary-area",t),scope:u,id:r.replace("/",":")},(0,l.createElement)(K,{className:s,closeLabel:n,onClose:()=>F(u),smallScreenTitle:p,toggleButtonProps:{label:n,shortcut:f,scope:u,identifier:r}},a||(0,l.createElement)(l.Fragment,null,(0,l.createElement)("strong",null,h),o&&(0,l.createElement)(_.Button,{className:"interface-complementary-area__pin-unpin-item",icon:P?x:C,label:P?(0,E.__)("Unpin from toolbar"):(0,E.__)("Pin to toolbar"),onClick:()=>(P?D:R)(u,r),isPressed:P,"aria-expanded":P}))),(0,l.createElement)(_.Panel,{className:c},e)))}));ae.Slot=function({scope:e,...t}){return(0,l.createElement)(_.Slot,{name:`ComplementaryArea/${e}`,...t})};const se=ae,ie=window.wp.compose;function oe({children:e,className:t,ariaLabel:n,as:r="div",...a}){return(0,l.createElement)(r,{className:b()("interface-navigable-region",t),"aria-label":n,role:"region",tabIndex:"-1",...a},e)}const le={hidden:{opacity:0},hover:{opacity:1,transition:{type:"tween",delay:.2,delayChildren:.2}},distractionFreeInactive:{opacity:1,transition:{delay:0}}};const ce=(0,g.forwardRef)((function({isDistractionFree:e,footer:t,header:n,editorNotices:r,sidebar:a,secondarySidebar:s,notices:i,content:o,actions:c,labels:u,className:d,enableRegionNavigation:m=!0,shortcuts:p},h){const f=(0,_.__unstableUseNavigateRegions)(p);!function(e){(0,g.useEffect)((()=>{const t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}}),[e])}("interface-interface-skeleton__html-container");const y={...{header:(0,E._x)("Header","header landmark area"),body:(0,E.__)("Content"),secondarySidebar:(0,E.__)("Block Library"),sidebar:(0,E.__)("Settings"),actions:(0,E.__)("Publish"),footer:(0,E.__)("Footer")},...u};return(0,l.createElement)("div",{...m?f:{},ref:(0,ie.useMergeRefs)([h,m?f.ref:void 0]),className:b()(d,"interface-interface-skeleton",f.className,!!t&&"has-footer")},(0,l.createElement)("div",{className:"interface-interface-skeleton__editor"},!!n&&(0,l.createElement)(oe,{as:_.__unstableMotion.div,className:"interface-interface-skeleton__header","aria-label":y.header,initial:e?"hidden":"distractionFreeInactive",whileHover:e?"hover":"distractionFreeInactive",animate:e?"hidden":"distractionFreeInactive",variants:le,transition:e?{type:"tween",delay:.8}:void 0},n),e&&(0,l.createElement)("div",{className:"interface-interface-skeleton__header"},r),(0,l.createElement)("div",{className:"interface-interface-skeleton__body"},!!s&&(0,l.createElement)(oe,{className:"interface-interface-skeleton__secondary-sidebar",ariaLabel:y.secondarySidebar},s),!!i&&(0,l.createElement)("div",{className:"interface-interface-skeleton__notices"},i),(0,l.createElement)(oe,{className:"interface-interface-skeleton__content",ariaLabel:y.body},o),!!a&&(0,l.createElement)(oe,{className:"interface-interface-skeleton__sidebar",ariaLabel:y.sidebar},a),!!c&&(0,l.createElement)(oe,{className:"interface-interface-skeleton__actions",ariaLabel:y.actions},c))),!!t&&(0,l.createElement)(oe,{className:"interface-interface-skeleton__footer",ariaLabel:y.footer},t))})),ue=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));function de({as:e=_.DropdownMenu,className:t,label:n=(0,E.__)("Options"),popoverProps:r,toggleProps:a,children:s}){return(0,l.createElement)(e,{className:b()("interface-more-menu-dropdown",t),icon:ue,label:n,popoverProps:{placement:"bottom-end",...r,className:b()("interface-more-menu-dropdown__content",r?.className)},toggleProps:{tooltipPosition:"bottom",...a,size:"compact"}},(e=>s(e)))}const me=window.wp.widgets,pe=window.wp.hooks,he=window.wp.mediaUtils;(0,pe.addFilter)("editor.MediaUpload","core/edit-site/components/media-upload",(()=>he.MediaUpload));const fe=window.wp.blockEditor,ge=window.wp.notices,ye=window.wp.coreData;var ve={grad:.9,turn:360,rad:360/(2*Math.PI)},be=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},_e=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Ee=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},we=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Se=function(e){return{r:Ee(e.r,0,255),g:Ee(e.g,0,255),b:Ee(e.b,0,255),a:Ee(e.a)}},xe=function(e){return{r:_e(e.r),g:_e(e.g),b:_e(e.b),a:_e(e.a,3)}},Ce=/^#([0-9a-f]{3,8})$/i,ke=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Te=function(e){var t=e.r,n=e.g,r=e.b,a=e.a,s=Math.max(t,n,r),i=s-Math.min(t,n,r),o=i?s===t?(n-r)/i:s===n?2+(r-t)/i:4+(t-n)/i:0;return{h:60*(o<0?o+6:o),s:s?i/s*100:0,v:s/255*100,a}},Pe=function(e){var t=e.h,n=e.s,r=e.v,a=e.a;t=t/360*6,n/=100,r/=100;var s=Math.floor(t),i=r*(1-n),o=r*(1-(t-s)*n),l=r*(1-(1-t+s)*n),c=s%6;return{r:255*[r,o,i,i,l,r][c],g:255*[l,r,r,o,i,i][c],b:255*[i,i,l,r,r,o][c],a}},Ie=function(e){return{h:we(e.h),s:Ee(e.s,0,100),l:Ee(e.l,0,100),a:Ee(e.a)}},Me=function(e){return{h:_e(e.h),s:_e(e.s),l:_e(e.l),a:_e(e.a,3)}},Ae=function(e){return Pe((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},Oe=function(e){return{h:(t=Te(e)).h,s:(a=(200-(n=t.s))*(r=t.v)/100)>0&&a<200?n*r/100/(a<=100?a:200-a)*100:0,l:a/2,a:t.a};var t,n,r,a},Ne=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Fe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Re=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,De=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ve={string:[[function(e){var t=Ce.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?_e(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?_e(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Re.exec(e)||De.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Se({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=Ne.exec(e)||Fe.exec(e);if(!t)return null;var n,r,a=Ie({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(ve[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return Ae(a)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,a=e.a,s=void 0===a?1:a;return be(t)&&be(n)&&be(r)?Se({r:Number(t),g:Number(n),b:Number(r),a:Number(s)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,a=e.a,s=void 0===a?1:a;if(!be(t)||!be(n)||!be(r))return null;var i=Ie({h:Number(t),s:Number(n),l:Number(r),a:Number(s)});return Ae(i)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,a=e.a,s=void 0===a?1:a;if(!be(t)||!be(n)||!be(r))return null;var i=function(e){return{h:we(e.h),s:Ee(e.s,0,100),v:Ee(e.v,0,100),a:Ee(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(s)});return Pe(i)},"hsv"]]},Le=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},Be=function(e){return"string"==typeof e?Le(e.trim(),Ve.string):"object"==typeof e&&null!==e?Le(e,Ve.object):[null,void 0]},ze=function(e,t){var n=Oe(e);return{h:n.h,s:Ee(n.s+100*t,0,100),l:n.l,a:n.a}},He=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Ge=function(e,t){var n=Oe(e);return{h:n.h,s:n.s,l:Ee(n.l+100*t,0,100),a:n.a}},Ue=function(){function e(e){this.parsed=Be(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return _e(He(this.rgba),2)},e.prototype.isDark=function(){return He(this.rgba)<.5},e.prototype.isLight=function(){return He(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=xe(this.rgba)).r,n=e.g,r=e.b,s=(a=e.a)<1?ke(_e(255*a)):"","#"+ke(t)+ke(n)+ke(r)+s;var e,t,n,r,a,s},e.prototype.toRgb=function(){return xe(this.rgba)},e.prototype.toRgbString=function(){return t=(e=xe(this.rgba)).r,n=e.g,r=e.b,(a=e.a)<1?"rgba("+t+", "+n+", "+r+", "+a+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,a},e.prototype.toHsl=function(){return Me(Oe(this.rgba))},e.prototype.toHslString=function(){return t=(e=Me(Oe(this.rgba))).h,n=e.s,r=e.l,(a=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+a+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,a},e.prototype.toHsv=function(){return e=Te(this.rgba),{h:_e(e.h),s:_e(e.s),v:_e(e.v),a:_e(e.a,3)};var e},e.prototype.invert=function(){return We({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),We(ze(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),We(ze(this.rgba,-e))},e.prototype.grayscale=function(){return We(ze(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),We(Ge(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),We(Ge(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?We({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):_e(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Oe(this.rgba);return"number"==typeof e?We({h:e,s:t.s,l:t.l,a:t.a}):_e(t.h)},e.prototype.isEqual=function(e){return this.toHex()===We(e).toHex()},e}(),We=function(e){return e instanceof Ue?e:new Ue(e)},je=[],Ze=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},qe=function(e){return.2126*Ze(e.r)+.7152*Ze(e.g)+.0722*Ze(e.b)};const Ye=window.wp.privateApis,{lock:Ke,unlock:Xe}=(0,Ye.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/edit-site"),{useGlobalSetting:Je,useGlobalStyle:Qe}=Xe(fe.privateApis);function $e(){const[e="black"]=Qe("color.text"),[t="white"]=Qe("color.background"),[n=e]=Qe("elements.h1.color.text"),[r]=Je("color.palette.core"),[a]=Je("color.palette.theme"),[s]=Je("color.palette.custom"),i=(null!=a?a:[]).concat(null!=s?s:[]).concat(null!=r?r:[]),o=i.filter((({color:e})=>e!==t&&e!==n)).slice(0,2);return{paletteColors:i,highlightedColors:o}}function et(e,t,n){return e&&"object"==typeof e?(t.reduce(((e,r,a)=>(void 0===e[r]&&(Number.isInteger(t[a+1])?e[r]=[]:e[r]={}),a===t.length-1&&(e[r]=n),e[r])),e),e):e}!function(e){e.forEach((function(e){je.indexOf(e)<0&&(e(Ue,Ve),je.push(e))}))}([function(e){e.prototype.luminance=function(){return e=qe(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,r,a,s,i,o,l,c=t instanceof e?t:new e(t);return s=this.rgba,i=c.toRgb(),n=(o=qe(s))>(l=qe(i))?(o+.05)/(l+.05):(l+.05)/(o+.05),void 0===(r=2)&&(r=0),void 0===a&&(a=Math.pow(10,r)),Math.floor(a*n)/a+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(s=(n=t).size)?"normal":s,"AAA"===(a=void 0===(r=n.level)?"AA":r)&&"normal"===i?7:"AA"===a&&"large"===i?3:4.5);var n,r,a,s,i}}]);const{cleanEmptyObject:tt,GlobalStylesContext:nt}=Xe(fe.privateApis),rt={...u.__EXPERIMENTAL_STYLE_PROPERTY,blockGap:{value:["spacing","blockGap"]}},at={"border.color":"color","color.background":"color","color.text":"color","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.caption.color.text":"color","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",blockGap:"spacing","typography.fontSize":"font-size","typography.fontFamily":"font-family"},st={"border.color":"borderColor","color.background":"backgroundColor","color.text":"textColor","color.gradient":"gradient","typography.fontSize":"fontSize","typography.fontFamily":"fontFamily"},it=["border","color","spacing","typography"],ot=(e,t)=>{let n=e;return t.forEach((e=>{n=n?.[e]})),n},lt=["borderColor","borderWidth","borderStyle"],ct=["top","right","bottom","left"];function ut(e,t,n){if(!t?.[e]||n?.[e]?.style)return[];const{color:r,style:a,width:s}=t[e];return!(r||s)||a?[]:[{path:["border",e,"style"],value:"solid"}]}function dt(e,t,n){const r=function(e,t){const{supportedPanels:n}=(0,m.useSelect)((n=>({supportedPanels:Xe(n(u.store)).getSupportedStyles(e,t)})),[e,t]);return n}(e),a=n?.styles?.blocks?.[e];return(0,g.useMemo)((()=>{const e=r.flatMap((e=>{if(!rt[e])return[];const{value:n}=rt[e],r=n.join("."),a=t[st[r]],s=a?`var:preset|${at[r]}|${a}`:ot(t.style,n);if("linkColor"===e){const e=s?[{path:n,value:s}]:[],r=["elements","link",":hover","color","text"],a=ot(t.style,r);return a&&e.push({path:r,value:a}),e}if(lt.includes(e)&&s){const e=[{path:n,value:s}];return ct.forEach((t=>{const r=[...n];r.splice(-1,0,t),e.push({path:r,value:s})})),e}return s?[{path:n,value:s}]:[]}));return function(e,t,n){if(!e&&!t)return[];const r=[...ut("top",e,n),...ut("right",e,n),...ut("bottom",e,n),...ut("left",e,n)],{color:a,style:s,width:i}=e||{};return(t||a||i)&&!s&&ct.forEach((e=>{n?.[e]?.style||r.push({path:["border",e,"style"],value:"solid"})})),r}(t.style?.border,t.borderColor,a?.border).forEach((t=>e.push(t))),e}),[r,t,a])}function mt(e){return e?JSON.parse(JSON.stringify(e)):{}}function pt({name:e,attributes:t,setAttributes:n}){const{user:r,setUserConfig:a}=(0,g.useContext)(nt),s=dt(e,t,r),{__unstableMarkNextChangeAsNotPersistent:i}=(0,m.useDispatch)(fe.store),{createSuccessNotice:o}=(0,m.useDispatch)(ge.store),c=(0,g.useCallback)((()=>{if(0!==s.length&&s.length>0){const{style:l}=t,c=mt(l),d=mt(r);for(const{path:t,value:n}of s)et(c,t,void 0),et(d,["styles","blocks",e,...t],n);const m={borderColor:void 0,backgroundColor:void 0,textColor:void 0,gradient:void 0,fontSize:void 0,fontFamily:void 0,style:tt(c)};i(),n(m),a((()=>d),{undoIgnore:!0}),o((0,E.sprintf)((0,E.__)("%s styles applied."),(0,u.getBlockType)(e).title),{type:"snackbar",actions:[{label:(0,E.__)("Undo"),onClick(){i(),n(t),a((()=>r),{undoIgnore:!0})}}]})}}),[i,t,s,o,e,n,a,r]);return(0,l.createElement)(_.BaseControl,{className:"edit-site-push-changes-to-global-styles-control",help:(0,E.sprintf)((0,E.__)("Apply this block’s typography, spacing, dimensions, and color styles to all %s blocks."),(0,u.getBlockType)(e).title)},(0,l.createElement)(_.BaseControl.VisualLabel,null,(0,E.__)("Styles")),(0,l.createElement)(_.Button,{variant:"primary",disabled:0===s.length,onClick:c},(0,E.__)("Apply globally")))}function ht(e){const t=(0,fe.useBlockEditingMode)(),n=(0,m.useSelect)((e=>e(ye.store).getCurrentTheme()?.is_block_theme),[]),r=it.some((t=>(0,u.hasBlockSupport)(e.name,t)));return"default"===t&&r&&n?(0,l.createElement)(fe.InspectorAdvancedControls,null,(0,l.createElement)(pt,{...e})):null}const ft=(0,ie.createHigherOrderComponent)((e=>t=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(e,{...t}),t.isSelected&&(0,l.createElement)(ht,{...t}))));(0,pe.addFilter)("editor.BlockEdit","core/edit-site/push-changes-to-global-styles",ft);const gt=window.wp.router,yt=window.wp.url;function vt(){return void 0!==(0,yt.getQueryArg)(window.location.href,"wp_theme_preview")}function bt(){return vt()?(0,yt.getQueryArg)(window.location.href,"wp_theme_preview"):null}const{useHistory:_t}=Xe(gt.privateApis);function Et(e,t,n=!1){const r=_t();const a=(0,yt.getQueryArgs)(window.location.href),s=(0,yt.removeQueryArgs)(window.location.href,...Object.keys(a));vt()&&(e={...e,wp_theme_preview:bt()});return{href:(0,yt.addQueryArgs)(s,e),onClick:function(a){a?.preventDefault(),n?r.replace(e,t):r.push(e,t)}}}function wt({params:e={},state:t,replace:n=!1,children:r,...a}){const{href:s,onClick:i}=Et(e,t,n);return(0,l.createElement)("a",{href:s,onClick:i,...a},r)}const St=window.wp.patterns,xt="wp_navigation",Ct="wp_template",kt="wp_template_part",Tt={custom:"custom",theme:"theme",plugin:"plugin"},Pt="uncategorized",{PATTERN_TYPES:It,PATTERN_DEFAULT_CATEGORY:Mt,PATTERN_USER_CATEGORY:At,EXCLUDED_PATTERN_SOURCES:Ot,PATTERN_SYNC_TYPES:Nt}=Xe(St.privateApis),Ft=[kt,xt,It.user],Rt={[Ct]:(0,E.__)("Template"),[kt]:(0,E.__)("Template part"),[It.user]:(0,E.__)("Pattern"),[xt]:(0,E.__)("Navigation")},Dt="grid",Vt="table",Lt="list",Bt="enumeration",zt="in",Ht="notIn",{useLocation:Gt}=Xe(gt.privateApis);function Ut({attributes:e}){const{theme:t,slug:n}=e,{params:r}=Gt(),a=(0,m.useSelect)((e=>{const{getCurrentTheme:r,getEntityRecord:a}=e(ye.store);return a("postType",kt,`${t||r()?.stylesheet}//${n}`)}),[t,n]),s=Et({postId:a?.id,postType:a?.type,canvas:"edit"},{fromTemplateId:r.postId||a?.id});return a?(0,l.createElement)(_.ToolbarButton,{...s,onClick:e=>{s.onClick(e)}},(0,E.__)("Edit")):null}const Wt=(0,ie.createHigherOrderComponent)((e=>t=>{const{attributes:n,name:r}=t,a="core/template-part"===r&&n.slug;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(e,{key:"edit",...t}),a&&(0,l.createElement)(fe.BlockControls,{group:"other"},(0,l.createElement)(Ut,{attributes:n})))}),"withEditBlockControls");(0,pe.addFilter)("editor.BlockEdit","core/edit-site/template-part-edit-button",Wt);const{useLocation:jt}=Xe(gt.privateApis);function Zt({attributes:e}){const{ref:t}=e,{params:n}=jt(),r=(0,fe.useBlockEditingMode)(),a=(0,m.useSelect)((e=>e(ye.store).getEntityRecord("postType",xt,t)),[t]),s=Et({postId:a?.id,postType:a?.type,canvas:"edit"},{fromTemplateId:n.postId||a?.id});return a&&"default"===r?(0,l.createElement)(fe.BlockControls,{group:"other"},(0,l.createElement)(_.ToolbarButton,{...s,onClick:e=>{s.onClick(e)}},(0,E.__)("Edit"))):null}const qt=(0,ie.createHigherOrderComponent)((e=>t=>{const{attributes:n,name:r}=t,a="core/navigation"===r&&n.ref;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(e,{...t}),a&&(0,l.createElement)(Zt,{attributes:n}))}),"withEditBlockControls");(0,pe.addFilter)("editor.BlockEdit","core/edit-site/navigation-edit-button",qt);const Yt=(0,m.combineReducers)({settings:function(e={},t){return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},editedPost:function(e={},t){switch(t.type){case"SET_EDITED_POST":return{postType:t.postType,id:t.id,context:t.context};case"SET_EDITED_POST_CONTEXT":return{...e,context:t.context}}return e},saveViewPanel:function(e=!1,t){switch(t.type){case"SET_IS_SAVE_VIEW_OPENED":return t.isOpen;case"SET_CANVAS_MODE":return!1}return e},canvasMode:function(e="init",t){return"SET_CANVAS_MODE"===t.type?t.mode:e},editorCanvasContainerView:function(e=void 0,t){return"SET_EDITOR_CANVAS_CONTAINER_VIEW"===t.type?t.view:e}}),Kt=window.wp.apiFetch;var Xt=a.n(Kt);const Jt=window.wp.a11y,Qt="core/edit-site";function $t(e){return!!e&&(e?.source===Tt.custom&&e?.has_theme_file)}const en=window.wp.htmlEntities,tn=e=>({registry:t,dispatch:n})=>{const r=window.matchMedia("(min-width: 782px)").matches;t.dispatch(fe.store).__unstableSetEditorMode("edit"),n({type:"SET_CANVAS_MODE",mode:e}),r&&"edit"===e&&t.select(T.store).get("core","showListViewByDefault")&&!t.select(T.store).get("core","distractionFree")?t.dispatch(y.store).setIsListViewOpened(!0):t.dispatch(y.store).setIsListViewOpened(!1),t.dispatch(y.store).setIsInserterOpened(!1)},nn=e=>({dispatch:t})=>{t({type:"SET_EDITOR_CANVAS_CONTAINER_VIEW",view:e})},rn=e=>async({registry:t})=>{const n=e[0].type===Ct,r=await Promise.allSettled(e.map((e=>t.dispatch(ye.store).deleteEntityRecord("postType",e.type,e.id,{force:!0},{throwOnError:!0}))));if(r.every((({status:e})=>"fulfilled"===e))){let r;if(1===e.length){const t="string"==typeof e[0].title?e[0].title:e[0].title?.rendered;r=(0,E.sprintf)((0,E.__)('"%s" deleted.'),(0,en.decodeEntities)(t))}else r=n?(0,E.__)("Templates deleted."):(0,E.__)("Template parts deleted.");t.dispatch(ge.store).createSuccessNotice(r,{type:"snackbar",id:"site-editor-template-deleted-success"})}else{let e;if(1===r.length)e=r[0].reason?.message?r[0].reason.message:n?(0,E.__)("An error occurred while deleting the template."):(0,E.__)("An error occurred while deleting the template part.");else{const t=new Set,a=r.filter((({status:e})=>"rejected"===e));for(const e of a)e.reason?.message&&t.add(e.reason.message);e=0===t.size?n?(0,E.__)("An error occurred while deleting the templates."):(0,E.__)("An error occurred while deleting the template parts."):1===t.size?n?(0,E.sprintf)((0,E.__)("An error occurred while deleting the templates: %s"),[...t][0]):(0,E.sprintf)((0,E.__)("An error occurred while deleting the template parts: %s"),[...t][0]):n?(0,E.sprintf)((0,E.__)("Some errors occurred while deleting the templates: %s"),[...t].join(",")):(0,E.sprintf)((0,E.__)("Some errors occurred while deleting the template parts: %s"),[...t].join(","))}t.dispatch(ge.store).createErrorNotice(e,{type:"snackbar"})}};function an(e){return function({registry:t}){f()("dispatch( 'core/edit-site' ).toggleFeature( featureName )",{since:"6.0",alternative:"dispatch( 'core/preferences').toggle( 'core/edit-site', featureName )"}),t.dispatch(T.store).toggle("core/edit-site",e)}}const sn=e=>({registry:t})=>{f()("dispatch( 'core/edit-site' ).__experimentalSetPreviewDeviceType",{since:"6.5",version:"6.7",hint:"registry.dispatch( editorStore ).setDeviceType"}),t.dispatch(y.store).setDeviceType(e)};function on(){return f()("dispatch( 'core/edit-site' ).setTemplate",{since:"6.5",version:"6.8",hint:"The setTemplate is not needed anymore, the correct entity is resolved from the URL automatically."}),{type:"NOTHING"}}const ln=e=>async({dispatch:t,registry:n})=>{f()("dispatch( 'core/edit-site' ).addTemplate",{since:"6.5",version:"6.8",hint:"use saveEntityRecord directly"});const r=await n.dispatch(ye.store).saveEntityRecord("postType",Ct,e);e.content&&n.dispatch(ye.store).editEntityRecord("postType",Ct,r.id,{blocks:(0,u.parse)(e.content)},{undoIgnore:!0}),t({type:"SET_EDITED_POST",postType:Ct,id:r.id})},cn=e=>rn([e]);function un(e){return{type:"SET_EDITED_POST",postType:kt,id:e}}function dn(e){return{type:"SET_EDITED_POST",postType:xt,id:e}}function mn(e,t,n){return{type:"SET_EDITED_POST",postType:e,id:t,context:n}}function pn(){return f()("dispatch( 'core/edit-site' ).setHomeTemplateId",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function hn(e){return{type:"SET_EDITED_POST_CONTEXT",context:e}}function fn(){return f()("dispatch( 'core/edit-site' ).setPage",{since:"6.5",version:"6.8",hint:"The setPage is not needed anymore, the correct entity is resolved from the URL automatically."}),{type:"NOTHING"}}function gn(){return f()("dispatch( 'core/edit-site' ).setNavigationPanelActiveMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function yn(){return f()("dispatch( 'core/edit-site' ).openNavigationPanelToMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function vn(){return f()("dispatch( 'core/edit-site' ).setIsNavigationPanelOpened",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}const bn=e=>({registry:t})=>{f()("dispatch( 'core/edit-site' ).setIsInserterOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsInserterOpened"}),t.dispatch(y.store).setIsInserterOpened(e)},_n=e=>({registry:t})=>{f()("dispatch( 'core/edit-site' ).setIsListViewOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsListViewOpened"}),t.dispatch(y.store).setIsListViewOpened(e)};function En(e){return{type:"UPDATE_SETTINGS",settings:e}}function wn(e){return{type:"SET_IS_SAVE_VIEW_OPENED",isOpen:e}}const Sn=(e,{allowUndo:t=!0}={})=>async({registry:n})=>{const r="edit-site-template-reverted";if(n.dispatch(ge.store).removeNotice(r),$t(e))try{const a=n.select(ye.store).getEntityConfig("postType",e.type);if(!a)return void n.dispatch(ge.store).createErrorNotice((0,E.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const s=(0,yt.addQueryArgs)(`${a.baseURL}/${e.id}`,{context:"edit",source:"theme"}),i=await Xt()({path:s});if(!i)return void n.dispatch(ge.store).createErrorNotice((0,E.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const o=({blocks:e=[]})=>(0,u.__unstableSerializeAndClean)(e),l=n.select(ye.store).getEditedEntityRecord("postType",e.type,e.id);n.dispatch(ye.store).editEntityRecord("postType",e.type,e.id,{content:o,blocks:l.blocks,source:"custom"},{undoIgnore:!0});const c=(0,u.parse)(i?.content?.raw);if(n.dispatch(ye.store).editEntityRecord("postType",e.type,i.id,{content:o,blocks:c,source:"theme"}),t){const t=()=>{n.dispatch(ye.store).editEntityRecord("postType",e.type,l.id,{content:o,blocks:l.blocks,source:"custom"})};n.dispatch(ge.store).createSuccessNotice((0,E.__)("Template reverted."),{type:"snackbar",id:r,actions:[{label:(0,E.__)("Undo"),onClick:t}]})}}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,E.__)("Template revert failed. Please reload.");n.dispatch(ge.store).createErrorNotice(t,{type:"snackbar"})}else n.dispatch(ge.store).createErrorNotice((0,E.__)("This template is not revertable."),{type:"snackbar"})},xn=e=>({dispatch:t,registry:n})=>{n.select(T.store).get("core","distractionFree")&&t.toggleDistractionFree(),n.dispatch(j).enableComplementaryArea(Qt,e)},Cn=()=>({registry:e})=>{e.dispatch(j).disableComplementaryArea(Qt)},kn=e=>({dispatch:t,registry:n})=>{if(n.dispatch("core/preferences").set("core","editorMode",e),"visual"!==e&&n.dispatch(fe.store).clearSelectedBlock(),"visual"===e)(0,Jt.speak)((0,E.__)("Visual editor selected"),"assertive");else if("text"===e){n.select(T.store).get("core","distractionFree")&&t.toggleDistractionFree(),(0,Jt.speak)((0,E.__)("Code editor selected"),"assertive")}},Tn=e=>({dispatch:t,registry:n})=>{f()("dispatch( 'core/edit-site' ).setHasPageContentFocus",{since:"6.5"}),e&&n.dispatch(fe.store).clearSelectedBlock(),t({type:"SET_HAS_PAGE_CONTENT_FOCUS",hasPageContentFocus:e})},Pn=()=>({dispatch:e,registry:t})=>{const n=t.select(T.store).get("core","distractionFree");n&&t.dispatch(T.store).set("core","fixedToolbar",!1),n||t.batch((()=>{t.dispatch(T.store).set("core","fixedToolbar",!0),t.dispatch(y.store).setIsInserterOpened(!1),t.dispatch(y.store).setIsListViewOpened(!1),e.closeGeneralSidebar()})),t.batch((()=>{t.dispatch(T.store).set("core","distractionFree",!n),t.dispatch(ge.store).createInfoNotice(n?(0,E.__)("Distraction free off."):(0,E.__)("Distraction free on."),{id:"core/edit-site/distraction-free-mode/notice",type:"snackbar",actions:[{label:(0,E.__)("Undo"),onClick:()=>{t.batch((()=>{t.dispatch(T.store).set("core","fixedToolbar",!!n),t.dispatch(T.store).toggle("core","distractionFree")}))}}]})}))};const In=[];const Mn=function(e,t){var n,r,a=0;function s(){var s,i,o=n,l=arguments.length;e:for(;o;){if(o.args.length===arguments.length){for(i=0;i<l;i++)if(o.args[i]!==arguments[i]){o=o.next;continue e}return o!==n&&(o===r&&(r=o.prev),o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=n,o.prev=null,n.prev=o,n=o),o.val}o=o.next}for(s=new Array(l),i=0;i<l;i++)s[i]=arguments[i];return o={args:s,val:e.apply(null,s)},n?(n.prev=o,o.next=n):r=o,a===t.maxSize?(r=r.prev).next=null:a++,n=o,o.val}return t=t||{},s.clear=function(){n=null,r=null,a=0},s}((function(e=In,t){const n=t?t.reduce(((e,t)=>({...e,[t.id]:t})),{}):{},r=[],a=[...e];for(;a.length;){const{innerBlocks:e,...t}=a.shift();if(a.unshift(...e),(0,u.isTemplatePart)(t)){const{attributes:{theme:e,slug:a}}=t,s=n[`${e}//${a}`];s&&r.push({templatePart:s,block:t})}}return r})),An=(0,m.createRegistrySelector)((e=>(t,n)=>(f()("select( 'core/edit-site' ).isFeatureActive",{since:"6.0",alternative:"select( 'core/preferences' ).get"}),!!e(T.store).get("core/edit-site",n)))),On=(0,m.createRegistrySelector)((e=>()=>(f()("select( 'core/edit-site' ).__experimentalGetPreviewDeviceType",{since:"6.5",version:"6.7",alternative:"select( 'core/editor' ).getDeviceType"}),e(y.store).getDeviceType()))),Nn=(0,m.createRegistrySelector)((e=>()=>e(ye.store).canUser("create","media"))),Fn=(0,m.createRegistrySelector)((e=>()=>{f()("select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )",{since:"6.5",version:"6.8"});return"web"===g.Platform.OS?e(ye.store).getEntityRecords("postType","wp_block",{per_page:-1}):[]}));function Rn(e){return e.settings}function Dn(){f()("select( 'core/edit-site' ).getHomeTemplateId",{since:"6.2",version:"6.4"})}function Vn(e){return e.editedPost.postType}function Ln(e){return e.editedPost.id}function Bn(e){return e.editedPost.context}function zn(e){return{context:e.editedPost.context}}const Hn=(0,m.createRegistrySelector)((e=>()=>(f()("select( 'core/edit-site' ).isInserterOpened",{since:"6.5",alternative:"select( 'core/editor' ).isInserterOpened"}),e(y.store).isInserterOpened()))),Gn=(0,m.createRegistrySelector)((e=>()=>(f()("select( 'core/edit-site' ).__experimentalGetInsertionPoint",{since:"6.5",version:"6.7"}),Xe(e(y.store)).getInsertionPoint()))),Un=(0,m.createRegistrySelector)((e=>()=>(f()("select( 'core/edit-site' ).isListViewOpened",{since:"6.5",alternative:"select( 'core/editor' ).isListViewOpened"}),e(y.store).isListViewOpened())));function Wn(e){return e.saveViewPanel}const jn=(0,m.createRegistrySelector)((e=>()=>{const t=e(ye.store).getEntityRecords("postType",kt,{per_page:-1}),n=e(fe.store).getBlocksByName("core/template-part"),r=e(fe.store).getBlocksByClientId(n);return Mn(r,t)})),Zn=(0,m.createRegistrySelector)((e=>()=>e(T.store).get("core","editorMode")));function qn(){f()("dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu",{since:"6.2",version:"6.4"})}function Yn(){f()("dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu",{since:"6.2",version:"6.4"})}function Kn(){f()("dispatch( 'core/edit-site' ).isNavigationOpened",{since:"6.2",version:"6.4"})}function Xn(e){return!!e.editedPost.context?.postId}function Jn(){return f()("select( 'core/edit-site' ).hasPageContentFocus",{since:"6.5"}),!1}function Qn(e){return e.canvasMode}function $n(e){return e.editorCanvasContainerView}const er={reducer:Yt,actions:r,selectors:i},tr=(0,m.createReduxStore)(Qt,er);(0,m.register)(tr),Xe(tr).registerPrivateSelectors(o),Xe(tr).registerPrivateActions(n);const nr=window.wp.keyboardShortcuts,rr=window.wp.commands,ar=window.wp.coreCommands,sr=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})),ir=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"})),or=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,l.createElement)(w.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})),lr=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.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"})),cr=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})),ur=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),dr=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));function mr(e){return(0,l.createElement)(_.Button,{...e,className:b()("edit-site-sidebar-button",e.className)})}const{useLocation:pr}=Xe(gt.privateApis);function hr({isRoot:e,title:t,actions:n,meta:r,content:a,footer:s,description:i,backPath:o}){const{dashboardLink:c,dashboardLinkText:u,previewingThemeName:d}=(0,m.useSelect)((e=>{const{getSettings:t}=Xe(e(tr)),n=bt();return{dashboardLink:t().__experimentalDashboardLink,dashboardLinkText:t().__experimentalDashboardLinkText,previewingThemeName:n?e(ye.store).getTheme(n)?.name?.rendered:void 0}}),[]),p=pr(),h=(0,_.__experimentalUseNavigator)(),f=(0,E.isRTL)()?ur:dr;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalVStack,{className:b()("edit-site-sidebar-navigation-screen__main",{"has-footer":!!s}),spacing:0,justify:"flex-start"},(0,l.createElement)(_.__experimentalHStack,{spacing:4,alignment:"flex-start",className:"edit-site-sidebar-navigation-screen__title-icon"},!e&&(0,l.createElement)(mr,{onClick:()=>{const e=null!=o?o:p.state?.backPath;e?h.goTo(e,{isBack:!0}):h.goToParent()},icon:f,label:(0,E.__)("Back"),showTooltip:!1}),e&&(0,l.createElement)(mr,{icon:f,label:u||(0,E.__)("Go to the Dashboard"),href:c||"index.php"}),(0,l.createElement)(_.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen__title",color:"#e0e0e0",level:1,size:20},vt()?(0,E.sprintf)("Previewing %1$s: %2$s",d,t):t),n&&(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen__actions"},n)),r&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen__meta"},r)),(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen__content"},i&&(0,l.createElement)("p",{className:"edit-site-sidebar-navigation-screen__description"},i),a)),s&&(0,l.createElement)("footer",{className:"edit-site-sidebar-navigation-screen__footer"},s))}const fr=(0,g.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,g.cloneElement)(e,{width:t,height:t,...n,ref:r})})),gr=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})),yr=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));function vr({className:e,icon:t,withChevron:n=!1,suffix:r,children:a,...s}){return(0,l.createElement)(_.__experimentalItem,{className:b()("edit-site-sidebar-navigation-item",{"with-suffix":!n&&r},e),...s},(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start"},t&&(0,l.createElement)(fr,{style:{fill:"currentcolor"},icon:t,size:24}),(0,l.createElement)(_.FlexBlock,null,a),n&&(0,l.createElement)(fr,{icon:(0,E.isRTL)()?gr:yr,className:"edit-site-sidebar-navigation-item__drilldown-indicator",size:24}),!n&&r))}const br=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})),_r=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})),Er=_r,wr=window.wp.keycodes;var Sr=a(66),xr=a.n(Sr);
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
-function Cr(e){return"[object Object]"===Object.prototype.toString.call(e)}function kr(e){var t,n;return!1!==Cr(e)&&(void 0===(t=e.constructor)||!1!==Cr(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}const{GlobalStylesContext:Tr,cleanEmptyObject:Pr}=Xe(fe.privateApis);function Ir(e,t){return xr()(e,t,{isMergeableObject:kr})}function Mr(){const[e,t,n]=function(){const{globalStylesId:e,isReady:t,settings:n,styles:r}=(0,m.useSelect)((e=>{const{getEditedEntityRecord:t,hasFinishedResolution:n}=e(ye.store),r=e(ye.store).__experimentalGetCurrentGlobalStylesId(),a=r?t("root","globalStyles",r):void 0;let s=!1;return n("__experimentalGetCurrentGlobalStylesId")&&(s=!r||n("getEditedEntityRecord",["root","globalStyles",r])),{globalStylesId:r,isReady:s,settings:a?.settings,styles:a?.styles}}),[]),{getEditedEntityRecord:a}=(0,m.useSelect)(ye.store),{editEntityRecord:s}=(0,m.useDispatch)(ye.store);return[t,(0,g.useMemo)((()=>({settings:null!=n?n:{},styles:null!=r?r:{}})),[n,r]),(0,g.useCallback)(((t,n={})=>{var r,i;const o=a("root","globalStyles",e),l=t({styles:null!==(r=o?.styles)&&void 0!==r?r:{},settings:null!==(i=o?.settings)&&void 0!==i?i:{}});s("root","globalStyles",e,{styles:Pr(l.styles)||{},settings:Pr(l.settings)||{}},n)}),[e])]}(),[r,a]=function(){const e=(0,m.useSelect)((e=>e(ye.store).__experimentalGetCurrentThemeBaseGlobalStyles()),[]);return[!!e,e]}(),s=(0,g.useMemo)((()=>a&&t?Ir(a,t):{}),[t,a]);return(0,g.useMemo)((()=>({isReady:e&&r,user:t,base:a,merged:s,setUserConfig:n})),[s,t,a,n,e,r])}function Ar({children:e}){const t=Mr();return t.isReady?(0,l.createElement)(Tr.Provider,{value:t},e):null}const{useGlobalStyle:Or,useGlobalStylesOutput:Nr}=Xe(fe.privateApis),Fr={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},Rr={hover:{opacity:1},start:{opacity:.5}},Dr={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}},Vr={leading:!0,trailing:!0},Lr=({label:e,isFocused:t,withHoverView:n})=>{const[r]=Or("typography.fontWeight"),[a="serif"]=Or("typography.fontFamily"),[s=a]=Or("elements.h1.typography.fontFamily"),[i=r]=Or("elements.h1.typography.fontWeight"),[o="black"]=Or("color.text"),[c=o]=Or("elements.h1.color.text"),[u="white"]=Or("color.background"),[d]=Or("color.gradient"),[m]=Nr(),p=(0,ie.useReducedMotion)(),[h,f]=(0,g.useState)(!1),[y,{width:v}]=(0,ie.useResizeObserver)(),[_,E]=(0,g.useState)(v),[w,S]=(0,g.useState)(),x=(0,ie.useThrottle)(E,250,Vr);(0,g.useLayoutEffect)((()=>{v&&x(v)}),[v,x]),(0,g.useLayoutEffect)((()=>{const e=_?_/248:1,t=e-(w||0);!(Math.abs(t)>.1)&&w||S(e)}),[_,w]);const C=w||(v?v/248:1),{paletteColors:k,highlightedColors:T}=$e(),P=(0,g.useMemo)((()=>m?[...m,{css:"html{overflow:hidden}body{min-width: 0;padding: 0;border: none;}",isGlobalStyles:!0}]:m),[m]),I=!!v;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{style:{position:"relative"}},y),I&&(0,l.createElement)(fe.__unstableIframe,{className:"edit-site-global-styles-preview__iframe",style:{width:"100%",height:152*C},onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),tabIndex:-1},(0,l.createElement)(fe.__unstableEditorStyles,{styles:P}),(0,l.createElement)(b.__unstableMotion.div,{style:{height:152*C,width:"100%",background:null!=d?d:u,cursor:n?"pointer":void 0},initial:"start",animate:(h||t)&&!p&&e?"hover":"start"},(0,l.createElement)(b.__unstableMotion.div,{variants:Fr,style:{height:"100%",overflow:"hidden"}},(0,l.createElement)(b.__experimentalHStack,{spacing:10*C,justify:"center",style:{height:"100%",overflow:"hidden"}},(0,l.createElement)(b.__unstableMotion.div,{style:{fontFamily:s,fontSize:65*C,color:c,fontWeight:i},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"}},"Aa"),(0,l.createElement)(b.__experimentalVStack,{spacing:4*C},T.map((({slug:e,color:t},n)=>(0,l.createElement)(b.__unstableMotion.div,{key:e,style:{height:32*C,width:32*C,background:t,borderRadius:32*C/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:1===n?.2:.1}})))))),(0,l.createElement)(b.__unstableMotion.div,{variants:n&&Rr,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1}},(0,l.createElement)(b.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"}},k.slice(0,4).map((({color:e},t)=>(0,l.createElement)("div",{key:t,style:{height:"100%",background:e,flexGrow:1}}))))),(0,l.createElement)(b.__unstableMotion.div,{variants:Dr,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0}},(0,l.createElement)(b.__experimentalVStack,{spacing:3*C,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*C,boxSizing:"border-box"}},e&&(0,l.createElement)("div",{style:{fontSize:40*C,fontFamily:s,color:c,fontWeight:i,lineHeight:"1em",textAlign:"center"}},e))))))},{GlobalStylesContext:Br,areGlobalStyleConfigsEqual:zr}=Xe(fe.privateApis);function Hr({variation:e}){const[t,n]=(0,g.useState)(!1),{base:r,user:a,setUserConfig:s}=(0,g.useContext)(Br),i=(0,g.useMemo)((()=>{var t,n;return{user:{settings:null!==(t=e.settings)&&void 0!==t?t:{},styles:null!==(n=e.styles)&&void 0!==n?n:{}},base:r,merged:Ir(r,e),setUserConfig:()=>{}}}),[e,r]),o=()=>{s((()=>({settings:e.settings,styles:e.styles})))},c=(0,g.useMemo)((()=>zr(a,e)),[a,e]);let u=e?.title;return e?.description&&(u=(0,E.sprintf)((0,E.__)("%1$s (%2$s)"),e?.title,e?.description)),(0,l.createElement)(Br.Provider,{value:i},(0,l.createElement)("div",{className:_()("edit-site-global-styles-variations_item",{"is-active":c}),role:"button",onClick:o,onKeyDown:e=>{e.keyCode===wr.ENTER&&(e.preventDefault(),o())},tabIndex:"0","aria-label":u,"aria-current":c,onFocus:()=>n(!0),onBlur:()=>n(!1)},(0,l.createElement)("div",{className:"edit-site-global-styles-variations_item-preview"},(0,l.createElement)(Lr,{label:e?.title,isFocused:t,withHoverView:!0}))))}function Gr(){const e=(0,m.useSelect)((e=>e(ye.store).__experimentalGetCurrentThemeGlobalStylesVariations()),[]),t=(0,g.useMemo)((()=>[{title:(0,E.__)("Default"),settings:{},styles:{}},...(null!=e?e:[]).map((e=>{var t,n;return{...e,settings:null!==(t=e.settings)&&void 0!==t?t:{},styles:null!==(n=e.styles)&&void 0!==n?n:{}}}))]),[e]);return(0,l.createElement)(b.__experimentalGrid,{columns:2,className:"edit-site-global-styles-style-variations-container"},t.map(((e,t)=>(0,l.createElement)(Hr,{key:t,variation:e}))))}const Ur=20;function Wr({variation:e="default",direction:t,resizeWidthBy:n}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("button",{className:`resizable-editor__drag-handle is-${t} is-variation-${e}`,"aria-label":(0,E.__)("Drag to resize"),"aria-describedby":`resizable-editor__resize-help-${t}`,onKeyDown:function(e){const{keyCode:r}=e;"left"===t&&r===wr.LEFT||"right"===t&&r===wr.RIGHT?n(Ur):("left"===t&&r===wr.RIGHT||"right"===t&&r===wr.LEFT)&&n(-Ur)},type:"button"}),(0,l.createElement)(b.VisuallyHidden,{id:`resizable-editor__resize-help-${t}`},(0,E.__)("Use left and right arrow keys to resize the canvas.")))}const jr={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0};const Zr=function({enableResizing:e,height:t,children:n}){const[r,a]=(0,g.useState)("100%"),s=(0,g.useRef)(),i=(0,g.useCallback)((e=>{s.current&&a(s.current.offsetWidth+e)}),[]);return(0,l.createElement)(b.ResizableBox,{ref:e=>{s.current=e?.resizable},size:{width:e?r:"100%",height:e&&t?t:"100%"},onResizeStop:(e,t,n)=>{a(n.style.width)},minWidth:300,maxWidth:"100%",maxHeight:"100%",enable:{left:e,right:e},showHandle:e,resizeRatio:2,handleComponent:{left:(0,l.createElement)(Wr,{direction:"left",resizeWidthBy:i}),right:(0,l.createElement)(Wr,{direction:"right",resizeWidthBy:i})},handleClasses:void 0,handleStyles:{left:jr,right:jr}},n)};function qr(e){switch(e){case"style-book":return(0,E.__)("Style Book");case"global-styles-revisions":case"global-styles-revisions:style-book":return(0,E.__)("Style Revisions");default:return""}}const{createPrivateSlotFill:Yr}=Xe(b.privateApis),{privateKey:Kr,Slot:Xr,Fill:Jr}=Yr("EditSiteEditorCanvasContainerSlot");function Qr({children:e,closeButtonLabel:t,onClose:n,enableResizing:r=!1}){const{editorCanvasContainerView:a,showListViewByDefault:s}=(0,m.useSelect)((e=>({editorCanvasContainerView:Xe(e(tr)).getEditorCanvasContainerView(),showListViewByDefault:e(T.store).get("core","showListViewByDefault")})),[]),[i,o]=(0,g.useState)(!1),{setEditorCanvasContainerView:c}=Xe((0,m.useDispatch)(tr)),{setIsListViewOpened:u}=(0,m.useDispatch)(y.store),d=(0,ie.useFocusOnMount)("firstElement"),p=(0,ie.useFocusReturn)(),h=(0,g.useMemo)((()=>qr(a)),[a]);function f(){u(s),c(void 0),o(!0),"function"==typeof n&&n()}const v=Array.isArray(e)?g.Children.map(e,((e,t)=>0===t?(0,g.cloneElement)(e,{ref:p}):e)):(0,g.cloneElement)(e,{ref:p});if(i)return null;const _=n||t;return(0,l.createElement)(Jr,null,(0,l.createElement)(Zr,{enableResizing:r},(0,l.createElement)("section",{className:"edit-site-editor-canvas-container",ref:_?d:null,onKeyDown:function(e){e.keyCode!==wr.ESCAPE||e.defaultPrevented||(e.preventDefault(),f())},"aria-label":h},_&&(0,l.createElement)(b.Button,{className:"edit-site-editor-canvas-container__close-button",icon:P,label:t||(0,E.__)("Close"),onClick:f,showTooltip:!1}),v)))}Qr.Slot=Xr;const $r=Qr,{ExperimentalBlockEditorProvider:ea,useGlobalStyle:ta,GlobalStylesContext:na,useGlobalStylesOutputWithConfig:ra}=Xe(fe.privateApis),{CompositeV2:aa,CompositeItemV2:sa,useCompositeStoreV2:ia,Tabs:oa}=Xe(b.privateApis);function la(e){return!e||0===Object.keys(e).length}function ca(){return[{name:"core/heading",title:(0,E.__)("Headings"),category:"text",blocks:[(0,u.createBlock)("core/heading",{content:(0,E.__)("Code Is Poetry"),level:1}),(0,u.createBlock)("core/heading",{content:(0,E.__)("Code Is Poetry"),level:2}),(0,u.createBlock)("core/heading",{content:(0,E.__)("Code Is Poetry"),level:3}),(0,u.createBlock)("core/heading",{content:(0,E.__)("Code Is Poetry"),level:4}),(0,u.createBlock)("core/heading",{content:(0,E.__)("Code Is Poetry"),level:5})]},...(0,u.getBlockTypes)().filter((e=>{const{name:t,example:n,supports:r}=e;return"core/heading"!==t&&!!n&&!1!==r.inserter})).map((e=>({name:e.name,title:e.title,category:e.category,blocks:(0,u.getBlockFromExample)(e.name,e.example)})))]}const ua=({category:e,examples:t,isSelected:n,onClick:r,onSelect:a,settings:s,sizes:i,title:o})=>{const[c,u]=(0,g.useState)(!1),d={role:"button",onFocus:()=>u(!0),onBlur:()=>u(!1),onKeyDown:e=>{if(e.defaultPrevented)return;const{keyCode:t}=e;!r||t!==wr.ENTER&&t!==wr.SPACE||(e.preventDefault(),r(e))},onClick:e=>{e.defaultPrevented||r&&(e.preventDefault(),r(e))},readonly:!0},m=r?"body { cursor: pointer; } body * { pointer-events: none; }":"";return(0,l.createElement)(fe.__unstableIframe,{className:_()("edit-site-style-book__iframe",{"is-focused":c&&!!r,"is-button":!!r}),name:"style-book-canvas",tabIndex:0,...r?d:{}},(0,l.createElement)(fe.__unstableEditorStyles,{styles:s.styles}),(0,l.createElement)("style",null,'.is-root-container { display: flow-root; }\n\t\t\t\t\t\tbody { position: relative; padding: 32px !important; }\n\t.edit-site-style-book__examples {\n\t\tmax-width: 900px;\n\t\tmargin: 0 auto;\n\t}\n\n\t.edit-site-style-book__example {\n\t\tborder-radius: 2px;\n\t\tcursor: pointer;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 40px;\n\t\tmargin-bottom: 40px;\n\t\tpadding: 16px;\n\t\twidth: 100%;\n\t\tbox-sizing: border-box;\n\t\tscroll-margin-top: 32px;\n\t\tscroll-margin-bottom: 32px;\n\t}\n\n\t.edit-site-style-book__example.is-selected {\n\t\tbox-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t}\n\n\t.edit-site-style-book__example:focus:not(:disabled) {\n\t\tbox-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t\toutline: 3px solid transparent;\n\t}\n\n\t.edit-site-style-book__examples.is-wide .edit-site-style-book__example {\n\t\tflex-direction: row;\n\t}\n\n\t.edit-site-style-book__example-title {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\tfont-size: 11px;\n\t\tfont-weight: 500;\n\t\tline-height: normal;\n\t\tmargin: 0;\n\t\ttext-align: left;\n\t\ttext-transform: uppercase;\n\t}\n\n\t.edit-site-style-book__examples.is-wide .edit-site-style-book__example-title {\n\t\ttext-align: right;\n\t\twidth: 120px;\n\t}\n\n\t.edit-site-style-book__example-preview {\n\t\twidth: 100%;\n\t}\n\n\t.edit-site-style-book__example-preview .block-editor-block-list__insertion-point,\n\t.edit-site-style-book__example-preview .block-list-appender {\n\t\tdisplay: none;\n\t}\n\n\t.edit-site-style-book__example-preview .is-root-container > .wp-block:first-child {\n\t\tmargin-top: 0;\n\t}\n\t.edit-site-style-book__example-preview .is-root-container > .wp-block:last-child {\n\t\tmargin-bottom: 0;\n\t}\n'+m),(0,l.createElement)(da,{className:_()("edit-site-style-book__examples",{"is-wide":i.width>600}),examples:t,category:e,label:o?(0,E.sprintf)((0,E.__)("Examples of blocks in the %s category"),o):(0,E.__)("Examples of blocks"),isSelected:n,onSelect:a,key:e}))},da=(0,g.memo)((({className:e,examples:t,category:n,label:r,isSelected:a,onSelect:s})=>{const i=ia({orientation:"vertical"});return(0,l.createElement)(aa,{store:i,className:e,"aria-label":r,role:"grid"},t.filter((e=>!n||e.category===n)).map((e=>(0,l.createElement)(ma,{key:e.name,id:`example-${e.name}`,title:e.title,blocks:e.blocks,isSelected:a(e.name),onClick:()=>{s?.(e.name)}}))))})),ma=({id:e,title:t,blocks:n,isSelected:r,onClick:a})=>{const s=(0,m.useSelect)((e=>e(fe.store).getSettings()),[]),i=(0,g.useMemo)((()=>({...s,focusMode:!1,__unstableIsPreviewMode:!0})),[s]),o=(0,g.useMemo)((()=>Array.isArray(n)?n:[n]),[n]);return(0,l.createElement)("div",{role:"row"},(0,l.createElement)("div",{role:"gridcell"},(0,l.createElement)(sa,{className:_()("edit-site-style-book__example",{"is-selected":r}),id:e,"aria-label":(0,E.sprintf)((0,E.__)("Open %s styles in Styles panel"),t),render:(0,l.createElement)("div",null),role:"button",onClick:a},(0,l.createElement)("span",{className:"edit-site-style-book__example-title"},t),(0,l.createElement)("div",{className:"edit-site-style-book__example-preview","aria-hidden":!0},(0,l.createElement)(b.Disabled,{className:"edit-site-style-book__example-preview__content"},(0,l.createElement)(ea,{value:o,settings:i},(0,l.createElement)(fe.BlockList,{renderAppender:!1})))))))},pa=function({enableResizing:e=!0,isSelected:t,onClick:n,onSelect:r,showCloseButton:a=!0,onClose:s,showTabs:i=!0,userConfig:o={}}){const[c,d]=(0,ie.useResizeObserver)(),[p]=ta("color.text"),[h]=ta("color.background"),f=(0,g.useMemo)(ca,[]),y=(0,g.useMemo)((()=>(0,u.getCategories)().filter((e=>f.some((t=>t.category===e.slug)))).map((e=>({name:e.slug,title:e.title,icon:e.icon})))),[f]),{base:v}=(0,g.useContext)(na),b=(0,g.useMemo)((()=>la(o)||la(v)?{}:Ir(v,o)),[v,o]),w=(0,m.useSelect)((e=>e(fe.store).getSettings()),[]),S=(0,g.useMemo)((()=>({...w,__unstableIsPreviewMode:!0})),[w]),[x]=ra(b);return S.styles=la(x)||la(o)?S.styles:x,(0,l.createElement)($r,{onClose:s,enableResizing:e,closeButtonLabel:a?(0,E.__)("Close Style Book"):null},(0,l.createElement)("div",{className:_()("edit-site-style-book",{"is-wide":d.width>600,"is-button":!!n}),style:{color:p,background:h}},c,i?(0,l.createElement)("div",{className:"edit-site-style-book__tabs"},(0,l.createElement)(oa,null,(0,l.createElement)(oa.TabList,null,y.map((e=>(0,l.createElement)(oa.Tab,{tabId:e.name,key:e.name},e.title)))),y.map((e=>(0,l.createElement)(oa.TabPanel,{key:e.name,tabId:e.name,focusable:!1},(0,l.createElement)(ua,{category:e.name,examples:f,isSelected:t,onSelect:r,settings:S,sizes:d,title:e.title})))))):(0,l.createElement)(ua,{examples:f,isSelected:t,onClick:n,onSelect:r,settings:S,sizes:d})))},ha={per_page:-1,_fields:"id,name,avatar_urls",context:"view",capabilities:["edit_theme_options"]},fa={per_page:100,page:1},ga=[],{GlobalStylesContext:ya}=Xe(fe.privateApis);function va({query:e}={}){const{user:t}=(0,g.useContext)(ya),n={...fa,...e},{authors:r,currentUser:a,isDirty:s,revisions:i,isLoadingGlobalStylesRevisions:o,revisionsCount:l}=(0,m.useSelect)((e=>{var t;const{__experimentalGetDirtyEntityRecords:r,getCurrentUser:a,getUsers:s,getRevisions:i,__experimentalGetCurrentGlobalStylesId:o,getEntityRecord:l,isResolving:c}=e(ye.store),u=r(),d=a(),m=u.length>0,p=o(),h=p?l("root","globalStyles",p):void 0,f=null!==(t=h?._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0,g=i("root","globalStyles",p,n)||ga;return{authors:s(ha)||ga,currentUser:d,isDirty:m,revisions:g,isLoadingGlobalStylesRevisions:c("getRevisions",["root","globalStyles",p,n]),revisionsCount:f}}),[e]);return(0,g.useMemo)((()=>{if(!r.length||o)return{revisions:ga,hasUnsavedChanges:s,isLoading:!0,revisionsCount:l};const e=i.map((e=>({...e,author:r.find((t=>t.id===e.author))})));if(i.length){if("unsaved"!==e[0].id&&1===n.page&&(e[0].isLatest=!0),s&&t&&Object.keys(t).length>0&&a&&1===n.page){const n={id:"unsaved",styles:t?.styles,settings:t?.settings,author:{name:a?.name,avatar_urls:a?.avatar_urls},modified:new Date};e.unshift(n)}n.page===Math.ceil(l/n.per_page)&&e.push({id:"parent",styles:{},settings:{}})}return{revisions:e,hasUnsavedChanges:s,isLoading:!1,revisionsCount:l}}),[s,i,a,r,t,o])}const _a=window.wp.date,ba=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"}));function Ea({children:e}){return(0,l.createElement)(b.__experimentalText,{className:"edit-site-sidebar-navigation-details-screen-panel__label"},e)}function wa({label:e,children:t,className:n,...r}){return(0,l.createElement)(b.__experimentalHStack,{key:e,spacing:5,alignment:"left",className:_()("edit-site-sidebar-navigation-details-screen-panel__row",n),...r},t)}function Sa({children:e}){return(0,l.createElement)(b.__experimentalText,{className:"edit-site-sidebar-navigation-details-screen-panel__value"},e)}function xa({title:e,children:t,spacing:n}){return(0,l.createElement)(b.__experimentalVStack,{className:"edit-site-sidebar-navigation-details-screen-panel",spacing:n},e&&(0,l.createElement)(b.__experimentalHeading,{className:"edit-site-sidebar-navigation-details-screen-panel__heading",level:2},e),t)}function Ca({record:e,...t}){const n={};return e?._links?.["predecessor-version"]?.[0]?.id&&(n.href=(0,yt.addQueryArgs)("revision.php",{revision:e?._links["predecessor-version"][0].id}),n.as="a"),(0,l.createElement)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-details-footer"},(0,l.createElement)(vr,{"aria-label":(0,E.__)("Revisions"),...n,...t},(0,l.createElement)(wa,{justify:"space-between"},(0,l.createElement)(Ea,null,(0,E.__)("Last modified")),(0,l.createElement)(Sa,null,(0,g.createInterpolateElement)((0,E.sprintf)((0,E.__)("<time>%s</time>"),(0,_a.humanTimeDiff)(e.modified)),{time:(0,l.createElement)("time",{dateTime:e.modified})})),(0,l.createElement)(b.Icon,{className:"edit-site-sidebar-navigation-screen-details-footer__icon",icon:ba}))))}const ka=()=>{};function Ta(e){const{openGeneralSidebar:t}=(0,m.useDispatch)(tr),{setCanvasMode:n}=Xe((0,m.useDispatch)(tr));return(0,m.useSelect)((e=>!!e(ye.store).__experimentalGetCurrentThemeGlobalStylesVariations()?.length),[])?(0,l.createElement)(b.__experimentalNavigatorButton,{...e,as:vr,path:"/wp_global_styles"}):(0,l.createElement)(vr,{...e,onClick:()=>{n("edit"),t("edit-site/global-styles")}})}function Pa(){const{storedSettings:e}=(0,m.useSelect)((e=>{const{getSettings:t}=Xe(e(tr));return{storedSettings:t()}}),[]);return(0,l.createElement)(fe.BlockEditorProvider,{settings:e,onChange:ka,onInput:ka},(0,l.createElement)(Gr,null))}function Ia(){const{revisions:e,isLoading:t}=va(),{openGeneralSidebar:n}=(0,m.useDispatch)(tr),{setIsListViewOpened:r}=(0,m.useDispatch)(y.store),a=(0,ie.useViewportMatch)("medium","<"),{setCanvasMode:s,setEditorCanvasContainerView:i}=Xe((0,m.useDispatch)(tr)),{isViewMode:o,isStyleBookOpened:c,revisionsCount:u}=(0,m.useSelect)((e=>{var t;const{getCanvasMode:n,getEditorCanvasContainerView:r}=Xe(e(tr)),{getEntityRecord:a,__experimentalGetCurrentGlobalStylesId:s}=e(ye.store),i=s(),o=i?a("root","globalStyles",i):void 0;return{isViewMode:"view"===n(),isStyleBookOpened:"style-book"===r(),revisionsCount:null!==(t=o?._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0}}),[]),d=(0,g.useCallback)((async()=>Promise.all([s("edit"),n("edit-site/global-styles")])),[s,n]),p=(0,g.useCallback)((async()=>{await d(),i("style-book"),r(!1)}),[d,i,r]),h=(0,g.useCallback)((async()=>{await d(),i("global-styles-revisions")}),[d,i]),f=u>0,v=e?.[0]?.modified,_=f&&!t&&v;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(hr,{title:(0,E.__)("Styles"),description:(0,E.__)("Choose a different style combination for the theme styles."),content:(0,l.createElement)(Pa,null),footer:_&&(0,l.createElement)(Ca,{record:e?.[0],onClick:h}),actions:(0,l.createElement)(l.Fragment,null,!a&&(0,l.createElement)(mr,{icon:_r,label:(0,E.__)("Style Book"),onClick:()=>i(c?void 0:"style-book"),isPressed:c}),(0,l.createElement)(mr,{icon:Er,label:(0,E.__)("Edit styles"),onClick:async()=>await d()}))}),c&&!a&&o&&(0,l.createElement)(pa,{enableResizing:!1,isSelected:()=>!1,onClick:p,onSelect:p,showCloseButton:!1,showTabs:!1}))}const Ma="isTemplatePartMoveHintVisible";function Aa(){const e=(0,m.useSelect)((e=>{var t;return null===(t=e(T.store).get("core",Ma))||void 0===t||t}),[]),{set:t}=(0,m.useDispatch)(T.store);return e?(0,l.createElement)(b.Notice,{politeness:"polite",className:"edit-site-sidebar__notice",onRemove:()=>{t("core",Ma,!1)}},(0,E.__)('Looking for template parts? Find them in "Patterns".')):null}function Oa(){const{location:e}=(0,b.__experimentalUseNavigator)(),{setEditorCanvasContainerView:t}=Xe((0,m.useDispatch)(tr));return(0,g.useEffect)((()=>{"/"===e?.path&&t(void 0)}),[t,e?.path]),(0,l.createElement)(hr,{isRoot:!0,title:(0,E.__)("Design"),description:(0,E.__)("Customize the appearance of your website using the block editor."),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.__experimentalItemGroup,null,(0,l.createElement)(b.__experimentalNavigatorButton,{as:vr,path:"/navigation",withChevron:!0,icon:sr},(0,E.__)("Navigation")),(0,l.createElement)(Ta,{withChevron:!0,icon:ir},(0,E.__)("Styles")),(0,l.createElement)(b.__experimentalNavigatorButton,{as:vr,path:"/page",withChevron:!0,icon:or},(0,E.__)("Pages")),(0,l.createElement)(b.__experimentalNavigatorButton,{as:vr,path:"/wp_template",withChevron:!0,icon:lr},(0,E.__)("Templates")),(0,l.createElement)(b.__experimentalNavigatorButton,{as:vr,path:"/patterns",withChevron:!0,icon:cr},(0,E.__)("Patterns"))),(0,l.createElement)(Aa,null))})}const Na=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})),Fa=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})),Ra=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.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"})),Da=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"})),Va=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})),La=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v10zm-11-7.6h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-.9 3.5H6.3l1.2-1.7v1.7zm5.6-3.2c-.4-.2-.8-.4-1.2-.4-.5 0-.9.1-1.2.4-.4.2-.6.6-.8 1-.2.4-.3.9-.3 1.5s.1 1.1.3 1.6c.2.4.5.8.8 1 .4.2.8.4 1.2.4.5 0 .9-.1 1.2-.4.4-.2.6-.6.8-1 .2-.4.3-1 .3-1.6 0-.6-.1-1.1-.3-1.5-.1-.5-.4-.8-.8-1zm0 3.6c-.1.3-.3.5-.5.7-.2.1-.4.2-.7.2-.3 0-.5-.1-.7-.2-.2-.1-.4-.4-.5-.7-.1-.3-.2-.7-.2-1.2 0-.7.1-1.2.4-1.5.3-.3.6-.5 1-.5s.7.2 1 .5c.3.3.4.8.4 1.5-.1.5-.1.9-.2 1.2zm5-3.9h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-1 3.5H16l1.2-1.7v1.7z"})),Ba=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"})),za=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.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"})),Ha=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.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"})),Ga=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{fillRule:"evenodd",d:"M8.95 11.25H4v1.5h4.95v4.5H13V18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75h-2.55v-7.5H13V9c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75H8.95v4.5ZM14.5 15v3c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-3c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5Zm0-6V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5Z",clipRule:"evenodd"})),Ua=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.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"})),Wa=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})),ja=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,l.createElement)(w.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})),Za=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})),qa=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.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"})),Ya=(e,t)=>{let n=e;return t.split(".").forEach((e=>{n=n?.[e]})),n},Ka=(e,t)=>(e||[]).map((e=>({...e,name:(0,en.decodeEntities)(Ya(e,t))}))),Xa=()=>(0,m.useSelect)((e=>e(ye.store).getEntityRecords("postType",Ct,{per_page:-1})),[]),Ja=()=>(0,m.useSelect)((e=>e(y.store).__experimentalGetDefaultTemplateTypes()),[]),Qa=()=>{const e=(0,m.useSelect)((e=>e(ye.store).getPostTypes({per_page:-1})),[]);return(0,g.useMemo)((()=>{const t=["attachment"];return e?.filter((({viewable:e,slug:n})=>e&&!t.includes(n)))}),[e])};function $a(e){const t=(0,g.useMemo)((()=>e?.reduce(((e,{labels:t})=>{const n=t.singular_name.toLowerCase();return e[n]=(e[n]||0)+1,e}),{})));return(0,g.useCallback)((({labels:e,slug:n})=>{const r=e.singular_name.toLowerCase();return t[r]>1&&r!==n}),[t])}function es(){const e=Qa(),t=(0,g.useMemo)((()=>e?.filter((e=>e.has_archive))),[e]),n=Xa(),r=$a(t);return(0,g.useMemo)((()=>t?.filter((e=>!(n||[]).some((t=>t.slug==="archive-"+e.slug)))).map((e=>{let t;return t=r(e)?(0,E.sprintf)((0,E.__)("Archive: %1$s (%2$s)"),e.labels.singular_name,e.slug):(0,E.sprintf)((0,E.__)("Archive: %s"),e.labels.singular_name),{slug:"archive-"+e.slug,description:(0,E.sprintf)((0,E.__)("Displays an archive with the latest posts of type: %s."),e.labels.singular_name),title:t,icon:e.icon?.startsWith("dashicons-")?e.icon.slice(10):Da,templatePrefix:"archive"}}))||[]),[t,n,r])}const ts=e=>{const t=Qa(),n=Xa(),r=Ja(),a=$a(t),s=(0,g.useMemo)((()=>t?.reduce(((e,{slug:t})=>{let n=t;return"page"!==t&&(n=`single-${n}`),e[t]=n,e}),{})),[t]),i=is("postType",s),o=(n||[]).map((({slug:e})=>e)),l=(t||[]).reduce(((t,n)=>{const{slug:l,labels:c,icon:u}=n,d=s[l],m=r?.find((({slug:e})=>e===d)),p=o?.includes(d),h=a(n);let f=(0,E.sprintf)((0,E.__)("Single item: %s"),c.singular_name);h&&(f=(0,E.sprintf)((0,E.__)("Single item: %1$s (%2$s)"),c.singular_name,l));const g=m?{...m,templatePrefix:s[l]}:{slug:d,title:f,description:(0,E.sprintf)((0,E.__)("Displays a single item: %s."),c.singular_name),icon:u?.startsWith("dashicons-")?u.slice(10):qa,templatePrefix:s[l]},y=i?.[l]?.hasEntities;return y&&(g.onClick=t=>{e({type:"postType",slug:l,config:{recordNamePath:"title.rendered",queryArgs:({search:e})=>({_fields:"id,title,slug,link",orderBy:e?"relevance":"modified",exclude:i[l].existingEntitiesIds}),getSpecificTemplate:e=>{const t=`${s[l]}-${e.slug}`;return{title:t,slug:t,templatePrefix:s[l]}}},labels:c,hasGeneralTemplate:p,template:t})}),p&&!y||t.push(g),t}),[]),c=(0,g.useMemo)((()=>l.reduce(((e,t)=>{const{slug:n}=t;let r="postTypesMenuItems";return"page"===n&&(r="defaultPostTypesMenuItems"),e[r].push(t),e}),{defaultPostTypesMenuItems:[],postTypesMenuItems:[]})),[l]);return c},ns=e=>{const t=(()=>{const e=(0,m.useSelect)((e=>e(ye.store).getTaxonomies({per_page:-1})),[]);return(0,g.useMemo)((()=>e?.filter((({visibility:e})=>e?.publicly_queryable))),[e])})(),n=Xa(),r=Ja(),a=(0,g.useMemo)((()=>t?.reduce(((e,{slug:t})=>{let n=t;return["category","post_tag"].includes(t)||(n=`taxonomy-${n}`),"post_tag"===t&&(n="tag"),e[t]=n,e}),{})),[t]),s=t?.reduce(((e,{labels:t})=>{const n=t.singular_name.toLowerCase();return e[n]=(e[n]||0)+1,e}),{}),i=is("taxonomy",a),o=(n||[]).map((({slug:e})=>e)),l=(t||[]).reduce(((t,n)=>{const{slug:l,labels:c}=n,u=a[l],d=r?.find((({slug:e})=>e===u)),m=o?.includes(u),p=((e,t)=>{if(["category","post_tag"].includes(t))return!1;const n=e.singular_name.toLowerCase();return s[n]>1&&n!==t})(c,l);let h=c.singular_name;p&&(h=(0,E.sprintf)((0,E.__)("%1$s (%2$s)"),c.singular_name,l));const f=d?{...d,templatePrefix:a[l]}:{slug:u,title:h,description:(0,E.sprintf)((0,E.__)("Displays taxonomy: %s."),c.singular_name),icon:Ga,templatePrefix:a[l]},g=i?.[l]?.hasEntities;return g&&(f.onClick=t=>{e({type:"taxonomy",slug:l,config:{queryArgs:({search:e})=>({_fields:"id,name,slug,link",orderBy:e?"name":"count",exclude:i[l].existingEntitiesIds}),getSpecificTemplate:e=>{const t=`${a[l]}-${e.slug}`;return{title:t,slug:t,templatePrefix:a[l]}}},labels:c,hasGeneralTemplate:m,template:t})}),m&&!g||t.push(f),t}),[]);return(0,g.useMemo)((()=>l.reduce(((e,t)=>{const{slug:n}=t;let r="taxonomiesMenuItems";return["category","tag"].includes(n)&&(r="defaultTaxonomiesMenuItems"),e[r].push(t),e}),{defaultTaxonomiesMenuItems:[],taxonomiesMenuItems:[]})),[l])},rs={user:"author"},as={user:{who:"authors"}};const ss=(e,t,n={})=>{const r=(e=>{const t=Xa();return(0,g.useMemo)((()=>Object.entries(e||{}).reduce(((e,[n,r])=>{const a=(t||[]).reduce(((e,t)=>{const n=`${r}-`;return t.slug.startsWith(n)&&e.push(t.slug.substring(n.length)),e}),[]);return a.length&&(e[n]=a),e}),{})),[e,t])})(t);return(0,m.useSelect)((t=>Object.entries(r||{}).reduce(((r,[a,s])=>{const i=t(ye.store).getEntityRecords(e,a,{_fields:"id",context:"view",slug:s,...n[a]});return i?.length&&(r[a]=i),r}),{})),[r])},is=(e,t,n={})=>{const r=ss(e,t,n);return(0,m.useSelect)((a=>Object.keys(t||{}).reduce(((t,s)=>{const i=r?.[s]?.map((({id:e})=>e))||[];return t[s]={hasEntities:!!a(ye.store).getEntityRecords(e,s,{per_page:1,_fields:"id",context:"view",exclude:i,...n[s]})?.length,existingEntitiesIds:i},t}),{})),[t,r])},{CompositeV2:os,CompositeItemV2:ls,useCompositeStoreV2:cs}=Xe(b.privateApis),us=[];function ds({suggestion:e,search:t,onSelect:n,entityForSuggestions:r}){const a="edit-site-custom-template-modal__suggestions_list__list-item";return(0,l.createElement)(ls,{render:(0,l.createElement)(b.Button,{role:"option",className:a,onClick:()=>n(r.config.getSpecificTemplate(e))})},(0,l.createElement)(b.__experimentalText,{size:"body",lineHeight:1.53846153846,weight:500,className:`${a}__title`},(0,l.createElement)(b.TextHighlight,{text:(0,en.decodeEntities)(e.name),highlight:t})),e.link&&(0,l.createElement)(b.__experimentalText,{size:"body",lineHeight:1.53846153846,className:`${a}__info`},e.link))}function ms({entityForSuggestions:e,onSelect:t}){const n=cs({orientation:"vertical"}),[r,a,s]=(0,ie.useDebouncedInput)(),i=function(e,t){const{config:n}=e,r=(0,g.useMemo)((()=>({order:"asc",context:"view",search:t,per_page:t?20:10,...n.queryArgs(t)})),[t,n]),{records:a,hasResolved:s}=(0,ye.useEntityRecords)(e.type,e.slug,r),[i,o]=(0,g.useState)(us);return(0,g.useEffect)((()=>{if(!s)return;let e=us;a?.length&&(e=a,n.recordNamePath&&(e=Ka(e,n.recordNamePath))),o(e)}),[a,s]),i}(e,s),{labels:o}=e,[c,u]=(0,g.useState)(!1);return!c&&i?.length>9&&u(!0),(0,l.createElement)(l.Fragment,null,c&&(0,l.createElement)(b.SearchControl,{__nextHasNoMarginBottom:!0,onChange:a,value:r,label:o.search_items,placeholder:o.search_items}),!!i?.length&&(0,l.createElement)(os,{store:n,role:"listbox",className:"edit-site-custom-template-modal__suggestions_list","aria-label":(0,E.__)("Suggestions list")},i.map((n=>(0,l.createElement)(ds,{key:n.slug,suggestion:n,search:s,onSelect:t,entityForSuggestions:e})))),s&&!i?.length&&(0,l.createElement)(b.__experimentalText,{as:"p",className:"edit-site-custom-template-modal__no-results"},o.not_found))}const ps=function({onSelect:e,entityForSuggestions:t}){const[n,r]=(0,g.useState)(t.hasGeneralTemplate);return(0,l.createElement)(b.__experimentalVStack,{spacing:4,className:"edit-site-custom-template-modal__contents-wrapper",alignment:"left"},!n&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.__experimentalText,{as:"p"},(0,E.__)("Select whether to create a single template for all items or a specific one.")),(0,l.createElement)(b.Flex,{className:"edit-site-custom-template-modal__contents",gap:"4",align:"initial"},(0,l.createElement)(b.FlexItem,{isBlock:!0,as:b.Button,onClick:()=>{const{slug:n,title:r,description:a,templatePrefix:s}=t.template;e({slug:n,title:r,description:a,templatePrefix:s})}},(0,l.createElement)(b.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846},t.labels.all_items),(0,l.createElement)(b.__experimentalText,{as:"span",lineHeight:1.53846153846},(0,E.__)("For all items"))),(0,l.createElement)(b.FlexItem,{isBlock:!0,as:b.Button,onClick:()=>{r(!0)}},(0,l.createElement)(b.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846},t.labels.singular_name),(0,l.createElement)(b.__experimentalText,{as:"span",lineHeight:1.53846153846},(0,E.__)("For a specific item"))))),n&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.__experimentalText,{as:"p"},(0,E.__)("This template will be used only for the specific item chosen.")),(0,l.createElement)(ms,{entityForSuggestions:t,onSelect:e})))};var hs=function(){return hs=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},hs.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function fs(e){return e.toLowerCase()}var gs=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],ys=/[^A-Z0-9]+/gi;function vs(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,r=void 0===n?gs:n,a=t.stripRegexp,s=void 0===a?ys:a,i=t.transform,o=void 0===i?fs:i,l=t.delimiter,c=void 0===l?" ":l,u=_s(_s(e,r,"$1\0$2"),s,"\0"),d=0,m=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(m-1);)m--;return u.slice(d,m).split("\0").map(o).join(c)}function _s(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function bs(e,t){return void 0===t&&(t={}),function(e,t){return void 0===t&&(t={}),vs(e,hs({delimiter:"."},t))}(e,hs({delimiter:"-"},t))}const Es=function({onClose:e,createTemplate:t}){const[n,r]=(0,g.useState)(""),a=(0,E.__)("Custom Template"),[s,i]=(0,g.useState)(!1);return(0,l.createElement)("form",{onSubmit:async function(e){if(e.preventDefault(),!s){i(!0);try{await t({slug:"wp-custom-template-"+bs(n||a),title:n||a},!1)}finally{i(!1)}}}},(0,l.createElement)(b.__experimentalVStack,{spacing:6},(0,l.createElement)(b.TextControl,{__nextHasNoMarginBottom:!0,label:(0,E.__)("Name"),value:n,onChange:r,placeholder:a,disabled:s,help:(0,E.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,l.createElement)(b.__experimentalHStack,{className:"edit-site-custom-generic-template__modal-actions",justify:"right"},(0,l.createElement)(b.Button,{variant:"tertiary",onClick:()=>{e()}},(0,E.__)("Cancel")),(0,l.createElement)(b.Button,{variant:"primary",type:"submit",isBusy:s,"aria-disabled":s},(0,E.__)("Create")))))};function ws(){const e="edit-site-template-actions-loading-screen-modal";return(0,l.createElement)(b.Modal,{isFullScreen:!0,isDismissible:!1,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,onRequestClose:()=>{},__experimentalHideHeader:!0,className:e},(0,l.createElement)("div",{className:`${e}__content`},(0,l.createElement)(b.Spinner,null)))}const{useHistory:Ss}=Xe(gt.privateApis),xs=["front-page","home","single","page","index","archive","author","category","date","tag","search","404"],Cs={"front-page":Na,home:Fa,single:Ra,page:or,archive:Da,search:Va,404:La,index:Ba,category:za,author:Ha,taxonomy:Ga,date:Ua,tag:Wa,attachment:ja};function ks({title:e,direction:t,className:n,description:r,icon:a,onClick:s,children:i}){return(0,l.createElement)(b.Button,{className:n,onClick:s,label:r,showTooltip:!!r},(0,l.createElement)(b.Flex,{as:"span",spacing:2,align:"center",justify:"center",style:{width:"100%"},direction:t},(0,l.createElement)("div",{className:"edit-site-add-new-template__template-icon"},(0,l.createElement)(b.Icon,{icon:a})),(0,l.createElement)(b.__experimentalVStack,{className:"edit-site-add-new-template__template-name",alignment:"center",spacing:0},(0,l.createElement)(b.__experimentalText,{weight:500,lineHeight:1.53846153846},e),i)))}const Ts={templatesList:1,customTemplate:2,customGenericTemplate:3};function Ps({postType:e,toggleProps:t,showIcon:n=!0}){const[r,a]=(0,g.useState)(!1),[s,i]=(0,g.useState)(Ts.templatesList),[o,c]=(0,g.useState)({}),[u,d]=(0,g.useState)(!1),p=Ss(),{saveEntityRecord:h}=(0,m.useDispatch)(ye.store),{createErrorNotice:f,createSuccessNotice:y}=(0,m.useDispatch)(ge.store),{homeUrl:v}=(0,m.useSelect)((e=>{const{getUnstableBase:t}=e(ye.store);return{homeUrl:t()?.home}}),[]),w={"front-page":v,date:(0,E.sprintf)((0,E.__)("E.g. %s"),v+"/"+(new Date).getFullYear())};async function S(e,t=!0){if(!u){d(!0);try{const{title:n,description:r,slug:a}=e,s=await h("postType",Ct,{description:r,slug:a.toString(),status:"publish",title:n,is_wp_suggestion:t},{throwOnError:!0});p.push({postId:s.id,postType:s.type,canvas:"edit"}),y((0,E.sprintf)((0,E.__)('"%s" successfully created.'),(0,en.decodeEntities)(s.title?.rendered||n)),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,E.__)("An error occurred while creating the template.");f(t,{type:"snackbar"})}finally{d(!1)}}}const x=()=>{a(!1),i(Ts.templatesList)},C=function(e,t){const n=Xa(),r=Ja(),a=(n||[]).map((({slug:e})=>e)),s=(r||[]).filter((e=>xs.includes(e.slug)&&!a.includes(e.slug))),i=n=>{t?.(),e(n)},o=[...s],{defaultTaxonomiesMenuItems:l,taxonomiesMenuItems:c}=ns(i),{defaultPostTypesMenuItems:u,postTypesMenuItems:d}=ts(i),m=function(e){const t=Xa(),n=Ja(),r=is("root",rs,as);let a=n?.find((({slug:e})=>"author"===e));a||(a={description:(0,E.__)("Displays latest posts written by a single author."),slug:"author",title:"Author"});const s=!!t?.find((({slug:e})=>"author"===e));if(r.user?.hasEntities&&(a={...a,templatePrefix:"author"},a.onClick=t=>{e({type:"root",slug:"user",config:{queryArgs:({search:e})=>({_fields:"id,name,slug,link",orderBy:e?"name":"registered_date",exclude:r.user.existingEntitiesIds,who:"authors"}),getSpecificTemplate:e=>{const t=`author-${e.slug}`;return{title:t,slug:t,templatePrefix:"author"}}},labels:{singular_name:(0,E.__)("Author"),search_items:(0,E.__)("Search Authors"),not_found:(0,E.__)("No authors found."),all_items:(0,E.__)("All Authors")},hasGeneralTemplate:s,template:t})}),!s||r.user?.hasEntities)return a}(i);[...l,...u,m].forEach((e=>{if(!e)return;const t=o.findIndex((t=>t.slug===e.slug));t>-1?o[t]=e:o.push(e)})),o?.sort(((e,t)=>xs.indexOf(e.slug)-xs.indexOf(t.slug)));const p=[...o,...es(),...d,...c];return p}(c,(()=>i(Ts.customTemplate)));if(!C.length)return null;const{as:k=b.Button,...T}=null!=t?t:{};let P=(0,E.__)("Add template");return s===Ts.customTemplate?P=(0,E.sprintf)((0,E.__)("Add template: %s"),o.labels.singular_name):s===Ts.customGenericTemplate&&(P=(0,E.__)("Create custom template")),(0,l.createElement)(l.Fragment,null,u&&(0,l.createElement)(ws,null),(0,l.createElement)(k,{...T,onClick:()=>a(!0),icon:n?Za:null,label:e.labels.add_new_item},n?null:e.labels.add_new_item),r&&(0,l.createElement)(b.Modal,{title:P,className:_()("edit-site-add-new-template__modal",{"edit-site-add-new-template__modal_template_list":s===Ts.templatesList,"edit-site-custom-template-modal":s===Ts.customTemplate}),onRequestClose:x,overlayClassName:s===Ts.customGenericTemplate?"edit-site-custom-generic-template__modal":void 0},s===Ts.templatesList&&(0,l.createElement)(b.__experimentalGrid,{columns:3,gap:4,align:"flex-start",justify:"center",className:"edit-site-add-new-template__template-list__contents"},(0,l.createElement)(b.Flex,{className:"edit-site-add-new-template__template-list__prompt"},(0,E.__)("Select what the new template should apply to:")),C.map((e=>{const{title:t,slug:n,onClick:r}=e;return(0,l.createElement)(ks,{key:n,title:t,direction:"column",className:"edit-site-add-new-template__template-button",description:w[n],icon:Cs[n]||lr,onClick:()=>r?r(e):S(e)})})),(0,l.createElement)(ks,{title:(0,E.__)("Custom template"),direction:"row",className:"edit-site-add-new-template__custom-template-button",icon:Er,onClick:()=>i(Ts.customGenericTemplate)},(0,l.createElement)(b.__experimentalText,{lineHeight:1.53846153846},(0,E.__)("A custom template can be manually applied to any post or page.")))),s===Ts.customTemplate&&(0,l.createElement)(ps,{onSelect:S,entityForSuggestions:o}),s===Ts.customGenericTemplate&&(0,l.createElement)(Es,{onClose:x,createTemplate:S})))}function Is({templateType:e=Ct,...t}){const n=(0,m.useSelect)((t=>t(ye.store).getPostType(e)),[e]);return n&&e===Ct?(0,l.createElement)(Ps,{...t,postType:n}):null}const Ms=({postType:e,postId:t,...n})=>{const r=Et({postType:e,postId:t});return(0,l.createElement)(vr,{...r,...n})};function As(){const e=(0,ie.useViewportMatch)("medium","<"),{records:t,isResolving:n}=(0,ye.useEntityRecords)("postType",Ct,{per_page:-1}),r=Et({path:"/wp_template/all"}),a=!e;return(0,l.createElement)(hr,{title:(0,E.__)("Templates"),description:(0,E.__)("Express the layout of your site with templates."),actions:a&&(0,l.createElement)(Is,{templateType:Ct,toggleProps:{as:mr}}),content:(0,l.createElement)(l.Fragment,null,n&&(0,E.__)("Loading templates…"),!n&&(0,l.createElement)(Ns,{templates:t})),footer:!e&&(0,l.createElement)(vr,{withChevron:!0,...r},(0,E.__)("Manage all templates"))})}function Os({title:e,templates:t}){return(0,l.createElement)(b.__experimentalItemGroup,null,!!e&&(0,l.createElement)(b.__experimentalItem,{className:"edit-site-sidebar-navigation-screen-templates__templates-group-title"},e),t.map((e=>(0,l.createElement)(Ms,{postType:Ct,postId:e.id,key:e.id,withChevron:!0},(0,en.decodeEntities)(e.title?.rendered||e.slug)))))}function Ns({templates:e}){if(!e?.length)return(0,l.createElement)(b.__experimentalItemGroup,null,(0,l.createElement)(b.__experimentalItem,null,(0,E.__)("No templates found")));const t=e?[...e]:[];t.sort(((e,t)=>e.title.rendered.localeCompare(t.title.rendered)));const{hierarchyTemplates:n,customTemplates:r,...a}=t.reduce(((e,t)=>{const{original_source:n,author_text:r}=t;return"plugin"===n?(e[r]||(e[r]=[]),e[r].push(t)):t.is_custom?e.customTemplates.push(t):e.hierarchyTemplates.push(t),e}),{hierarchyTemplates:[],customTemplates:[]});return(0,l.createElement)(b.__experimentalVStack,{spacing:3},!!n.length&&(0,l.createElement)(Os,{templates:n}),!!r.length&&(0,l.createElement)(Os,{title:(0,E.__)("Custom"),templates:r}),Object.entries(a).map((([e,t])=>(0,l.createElement)(Os,{key:e,title:e,templates:t}))))}function Fs({postId:e,area:t,title:n}){const r=(0,m.useSelect)((e=>e(y.store).__experimentalGetDefaultTemplatePartAreas().find((e=>e.area===t))),[t]),a=Et({postType:kt,postId:e});return(0,l.createElement)(vr,{className:"edit-site-sidebar-navigation-screen-template__template-area-button",...a,icon:r?.icon,withChevron:!0},(0,l.createElement)(b.__experimentalTruncate,{limit:20,ellipsizeMode:"tail",numberOfLines:1,className:"edit-site-sidebar-navigation-screen-template__template-area-label-text"},(0,en.decodeEntities)(n)))}function Rs(){const{templatePartAreas:e,currentTemplateParts:t}=(0,m.useSelect)((e=>{const{getSettings:t,getCurrentTemplateTemplateParts:n}=Xe(e(tr));return{templatePartAreas:t()?.defaultTemplatePartAreas,currentTemplateParts:n()}}),[]),n=(0,g.useMemo)((()=>{const n=new Set;return t.length&&e?t.filter((e=>{if(!n.has(e.templatePart.id))return n.add(e.templatePart.id),e})).map((({templatePart:t,block:n})=>({...e?.find((({area:e})=>e===t?.area)),...t,clientId:n.clientId}))):[]}),[t,e]);return n.length?(0,l.createElement)(xa,{title:(0,E.__)("Areas"),spacing:3},(0,l.createElement)(b.__experimentalItemGroup,null,n.map((({clientId:e,label:t,area:n,theme:r,slug:a,title:s})=>(0,l.createElement)(wa,{key:e},(0,l.createElement)(Fs,{postId:`${r}//${a}`,title:s?.rendered||t,area:n})))))):null}function Ds(e,t){const{record:n,title:r,description:a,isLoaded:s,icon:i}=(0,m.useSelect)((n=>{const{getEditedPostType:r,getEditedPostId:a}=n(tr),{getEditedEntityRecord:s,hasFinishedResolution:i}=n(ye.store),{__experimentalGetTemplateInfo:o}=n(y.store),l=null!=e?e:r(),c=null!=t?t:a(),u=s("postType",l,c),d=c&&i("getEditedEntityRecord",["postType",l,c]),m=o(u);return{record:u,title:m.title,description:m.description,isLoaded:d,icon:m.icon}}),[e,t]);return{isLoaded:s,icon:i,record:n,getTitle:()=>r?(0,en.decodeEntities)(r):null,getDescription:()=>a?(0,en.decodeEntities)(a):null}}const Vs=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"})),Ls=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"}));function Bs(e,t){return(0,m.useSelect)((n=>{const{getEntityRecord:r,getMedia:a,getUser:s,getEditedEntityRecord:i}=n(ye.store),o=i("postType",e,t),l=o?.original_source,c=o?.author_text;switch(l){case"theme":return{type:l,icon:lr,text:c,isCustomized:o.source===Tt.custom};case"plugin":return{type:l,icon:Vs,text:c,isCustomized:o.source===Tt.custom};case"site":{const e=r("root","__unstableBase");return{type:l,icon:Ls,imageUrl:e?.site_logo?a(e.site_logo)?.source_url:void 0,text:c,isCustomized:!1}}default:{const e=s(o.author);return{type:"user",icon:Ha,imageUrl:e?.avatar_urls?.[48],text:c,isCustomized:!1}}}}),[e,t])}function zs({imageUrl:e}){const[t,n]=(0,g.useState)(!1);return(0,l.createElement)("div",{className:_()("edit-site-list-added-by__avatar",{"is-loaded":t})},(0,l.createElement)("img",{onLoad:()=>n(!0),alt:"",src:e}))}function Hs(e){return!!e&&(e.source===Tt.custom&&!e.has_theme_file)}function Gs({template:e,onClose:t}){const n=(0,en.decodeEntities)(e.title.rendered),[r,a]=(0,g.useState)(n),[s,i]=(0,g.useState)(!1),{editEntityRecord:o,__experimentalSaveSpecifiedEntityEdits:c}=(0,m.useDispatch)(ye.store),{createSuccessNotice:u,createErrorNotice:d}=(0,m.useDispatch)(ge.store);if(e.type===Ct&&!e.is_custom)return null;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.MenuItem,{onClick:()=>{i(!0),a(n)}},(0,E.__)("Rename")),s&&(0,l.createElement)(b.Modal,{title:(0,E.__)("Rename"),onRequestClose:()=>{i(!1)},overlayClassName:"edit-site-list__rename-modal"},(0,l.createElement)("form",{onSubmit:async function(n){n.preventDefault();try{await o("postType",e.type,e.id,{title:r}),a(""),i(!1),t(),await c("postType",e.type,e.id,["title"],{throwOnError:!0}),u(e.type===Ct?(0,E.__)("Template renamed."):(0,E.__)("Template part renamed."),{type:"snackbar"})}catch(t){const n=e.type===Ct?(0,E.__)("An error occurred while renaming the template."):(0,E.__)("An error occurred while renaming the template part."),r=t.message&&"unknown_error"!==t.code?t.message:n;d(r,{type:"snackbar"})}}},(0,l.createElement)(b.__experimentalVStack,{spacing:"5"},(0,l.createElement)(b.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,E.__)("Name"),value:r,onChange:a,required:!0}),(0,l.createElement)(b.__experimentalHStack,{justify:"right"},(0,l.createElement)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{i(!1)}},(0,E.__)("Cancel")),(0,l.createElement)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit"},(0,E.__)("Save")))))))}function Us({postType:e,postId:t,className:n,toggleProps:r,onRemove:a}){const s=(0,m.useSelect)((n=>n(ye.store).getEntityRecord("postType",e,t)),[e,t]),{removeTemplate:i,revertTemplate:o}=(0,m.useDispatch)(tr),{saveEditedEntityRecord:c}=(0,m.useDispatch)(ye.store),{createSuccessNotice:u,createErrorNotice:d}=(0,m.useDispatch)(ge.store),p=Hs(s),h=$t(s);if(!p&&!h)return null;return(0,l.createElement)(b.DropdownMenu,{icon:ue,label:(0,E.__)("Actions"),className:n,toggleProps:r},(({onClose:e})=>(0,l.createElement)(b.MenuGroup,null,p&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Gs,{template:s,onClose:e}),(0,l.createElement)(Ws,{onRemove:()=>{i(s),a?.(),e()},title:s.title.rendered})),h&&(0,l.createElement)(b.MenuItem,{info:(0,E.__)("Use the template as supplied by the theme."),onClick:()=>{!async function(){try{await o(s,{allowUndo:!1}),await c("postType",s.type,s.id),u((0,E.sprintf)((0,E.__)('"%s" reverted.'),(0,en.decodeEntities)(s.title.rendered)),{type:"snackbar",id:"edit-site-template-reverted"})}catch(e){const t=s.type===Ct?(0,E.__)("An error occurred while reverting the template."):(0,E.__)("An error occurred while reverting the template part."),n=e.message&&"unknown_error"!==e.code?e.message:t;d(n,{type:"snackbar"})}}(),e()}},(0,E.__)("Clear customizations")))))}function Ws({onRemove:e,title:t}){const[n,r]=(0,g.useState)(!1);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.MenuItem,{isDestructive:!0,onClick:()=>r(!0)},(0,E.__)("Delete")),(0,l.createElement)(b.__experimentalConfirmDialog,{isOpen:n,onConfirm:e,onCancel:()=>r(!1),confirmButtonText:(0,E.__)("Delete")},(0,E.sprintf)((0,E.__)('Are you sure you want to delete "%s"?'),(0,en.decodeEntities)(t))))}const js={};function Zs(){const{editEntityRecord:e}=(0,m.useDispatch)(ye.store),{allowCommentsOnNewPosts:t,postsPerPage:n,postsPageTitle:r,postsPageId:a}=(0,m.useSelect)((e=>{const{getEntityRecord:t}=e(ye.store),n=t("root","site"),r=n?.page_for_posts?t("postType","page",n?.page_for_posts):js;return{allowCommentsOnNewPosts:"open"===n?.default_comment_status,postsPageTitle:r?.title?.rendered,postsPageId:r?.id,postsPerPage:n?.posts_per_page}}),[]),[s,i]=(0,g.useState)(""),[o,c]=(0,g.useState)(1),[u,d]=(0,g.useState)("");(0,g.useEffect)((()=>{i(t),d(r),c(n)}),[r,t,n]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(xa,{spacing:6},a&&(0,l.createElement)(wa,null,(0,l.createElement)(b.__experimentalInputControl,{className:"edit-site-sidebar-navigation-screen__input-control",placeholder:(0,E.__)("No Title"),size:"__unstable-large",value:u,onChange:(0,ie.debounce)((t=>{d(t),e("postType","page",a,{title:t})}),300),label:(0,E.__)("Blog title"),help:(0,E.__)("Set the Posts Page title. Appears in search results, and when the page is shared on social media.")})),(0,l.createElement)(wa,null,(0,l.createElement)(b.__experimentalNumberControl,{className:"edit-site-sidebar-navigation-screen__input-control",placeholder:0,value:o,size:"__unstable-large",spinControls:"custom",step:"1",min:"1",onChange:t=>{c(t),e("root","site",void 0,{posts_per_page:t})},label:(0,E.__)("Posts per page"),help:(0,E.__)("Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting.")}))),(0,l.createElement)(xa,{title:(0,E.__)("Discussion"),spacing:3},(0,l.createElement)(wa,null,(0,l.createElement)(b.CheckboxControl,{className:"edit-site-sidebar-navigation-screen__input-control",label:(0,E.__)("Allow comments on new posts"),help:(0,E.__)("Changes will apply to new posts only. Individual posts may override these settings."),checked:s,onChange:t=>{i(t),e("root","site",void 0,{default_comment_status:t?"open":null})}}))))}function qs(){const e=(0,b.__experimentalUseNavigator)(),{params:{postType:t,postId:n}}=e,{setCanvasMode:r}=Xe((0,m.useDispatch)(tr)),{title:a,content:s,description:i,footer:o}=function(e,t){const{getDescription:n,getTitle:r,record:a}=Ds(e,t),s=(0,m.useSelect)((e=>e(ye.store).getCurrentTheme()),[]),i=Bs(e,t),o="theme"===i.type&&a.theme===s?.stylesheet,c=r();let u=n();!u&&i.text&&(u=(0,E.__)("This is a custom template that can be applied manually to any Post or Page."));const d="home"===a?.slug||"index"===a?.slug?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Zs,null),(0,l.createElement)(Rs,null)):(0,l.createElement)(Rs,null),p=a?.modified?(0,l.createElement)(Ca,{record:a}):null;return{title:c,description:(0,l.createElement)(l.Fragment,null,u,i.text&&!o&&(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description"},(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description-author"},(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description-author-icon"},i.imageUrl?(0,l.createElement)("img",{src:i.imageUrl,alt:"",width:"24",height:"24"}):(0,l.createElement)(b.Icon,{icon:i.icon})),i.text),i.isCustomized&&(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description-customized"},(0,E._x)("(Customized)","template")))),content:d,footer:p}}(t,n);return(0,l.createElement)(hr,{title:a,actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Us,{postType:t,postId:n,toggleProps:{as:mr},onRemove:()=>{e.goTo(`/${t}/all`)}}),(0,l.createElement)(mr,{onClick:()=>r("edit"),label:(0,E.__)("Edit"),icon:br})),description:i,content:s,footer:o})}const Ys=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})),Ks=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})),Xs=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})),Js=()=>(0,m.useSelect)((e=>e(ye.store).getEntityRecords("postType",kt,{per_page:-1})),[]),Qs=(e,t)=>{const n=e.toLowerCase(),r=t.map((e=>e.title.rendered.toLowerCase()));if(!r.includes(n))return e;let a=2;for(;r.includes(`${n} ${a}`);)a++;return`${e} ${a}`},$s=e=>bs(e).replace(/[^\w-]+/g,"")||"wp-custom-part";function ei({modalTitle:e=(0,E.__)("Create template part"),...t}){return(0,l.createElement)(b.Modal,{title:e,onRequestClose:t.closeModal,overlayClassName:"edit-site-create-template-part-modal"},(0,l.createElement)(ti,{...t}))}function ti({defaultArea:e=Pt,blocks:t=[],confirmLabel:n=(0,E.__)("Create"),closeModal:r,onCreate:a,onError:s,defaultTitle:i=""}){const{createErrorNotice:o}=(0,m.useDispatch)(ge.store),{saveEntityRecord:c}=(0,m.useDispatch)(ye.store),d=Js(),[p,h]=(0,g.useState)(i),[f,v]=(0,g.useState)(e),[_,w]=(0,g.useState)(!1),x=(0,ie.useInstanceId)(ei),C=(0,m.useSelect)((e=>e(y.store).__experimentalGetDefaultTemplatePartAreas()),[]);return(0,l.createElement)("form",{onSubmit:async e=>{e.preventDefault(),await async function(){if(p&&!_)try{w(!0);const e=Qs(p,d),n=$s(e),r=await c("postType",kt,{slug:n,title:e,content:(0,u.serialize)(t),area:f},{throwOnError:!0});await a(r)}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,E.__)("An error occurred while creating the template part.");o(t,{type:"snackbar"}),s?.()}finally{w(!1)}}()}},(0,l.createElement)(b.__experimentalVStack,{spacing:"4"},(0,l.createElement)(b.TextControl,{__nextHasNoMarginBottom:!0,label:(0,E.__)("Name"),value:p,onChange:h,required:!0}),(0,l.createElement)(b.BaseControl,{label:(0,E.__)("Area"),id:`edit-site-create-template-part-modal__area-selection-${x}`,className:"edit-site-create-template-part-modal__area-base-control"},(0,l.createElement)(b.__experimentalRadioGroup,{label:(0,E.__)("Area"),className:"edit-site-create-template-part-modal__area-radio-group",id:`edit-site-create-template-part-modal__area-selection-${x}`,onChange:v,checked:f},C.map((({icon:e,label:t,area:n,description:r})=>(0,l.createElement)(b.__experimentalRadio,{key:t,value:n,className:"edit-site-create-template-part-modal__area-radio"},(0,l.createElement)(b.Flex,{align:"start",justify:"start"},(0,l.createElement)(b.FlexItem,null,(0,l.createElement)(b.Icon,{icon:e})),(0,l.createElement)(b.FlexBlock,{className:"edit-site-create-template-part-modal__option-label"},t,(0,l.createElement)("div",null,r)),(0,l.createElement)(b.FlexItem,{className:"edit-site-create-template-part-modal__checkbox"},f===n&&(0,l.createElement)(b.Icon,{icon:S})))))))),(0,l.createElement)(b.__experimentalHStack,{justify:"right"},(0,l.createElement)(b.Button,{variant:"tertiary",onClick:()=>{r()}},(0,E.__)("Cancel")),(0,l.createElement)(b.Button,{variant:"primary",type:"submit","aria-disabled":!p||_,isBusy:_},n))))}const{useHistory:ni,useLocation:ri}=Xe(gt.privateApis),{CreatePatternModal:ai,useAddPatternCategory:si}=Xe(St.privateApis);function ii(){const e=ni(),{params:t}=ri(),[n,r]=(0,g.useState)(!1),[a,s]=(0,g.useState)(!1),i=(0,m.useSelect)((e=>e(ye.store).getCurrentTheme()?.is_block_theme),[]),{createPatternFromFile:o}=Xe((0,m.useDispatch)(St.store)),{createSuccessNotice:c,createErrorNotice:u}=(0,m.useDispatch)(ge.store),d=(0,g.useRef)();function p(){r(!1),s(!1)}const h=[{icon:cr,onClick:()=>r(!0),title:(0,E.__)("Create pattern")}];i&&h.push({icon:Ks,onClick:()=>s(!0),title:(0,E.__)("Create template part")}),h.push({icon:Xs,onClick:()=>{d.current.click()},title:(0,E.__)("Import pattern from JSON")});const{categoryMap:f,findOrCreateTerm:y}=si();return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.DropdownMenu,{controls:h,toggleProps:{as:mr},icon:Za,label:(0,E.__)("Create pattern")}),n&&(0,l.createElement)(ai,{onClose:()=>r(!1),onSuccess:function({pattern:t,categoryId:n}){r(!1),e.push({postId:t.id,postType:It.user,categoryType:It.theme,categoryId:n,canvas:"edit"})},onError:p}),a&&(0,l.createElement)(ei,{closeModal:()=>s(!1),blocks:[],onCreate:function(t){s(!1),e.push({postId:t.id,postType:kt,canvas:"edit"})},onError:p}),(0,l.createElement)("input",{type:"file",accept:".json",hidden:!0,ref:d,onChange:async n=>{const r=n.target.files?.[0];if(r)try{let n;if(t.categoryType!==kt){const e=f.values().find((e=>e.name===t.categoryId));e&&(n=e.id||await y(e.label))}const a=await o(r,n?[n]:void 0);n||"my-patterns"===t.categoryId||e.push({path:"/patterns",categoryType:It.theme,categoryId:Mt}),c((0,E.sprintf)((0,E.__)('Imported "%s" from JSON.'),a.title.raw),{type:"snackbar",id:"import-pattern-success"})}catch(e){u(e.message,{type:"snackbar",id:"import-pattern-error"})}finally{n.target.value=""}}}))}function oi({count:e,icon:t,id:n,isActive:r,label:a,type:s}){const i=Et({path:"/patterns",categoryType:s,categoryId:n});if(e)return(0,l.createElement)(vr,{...i,icon:t,suffix:(0,l.createElement)("span",null,e),"aria-current":r?"true":void 0},a)}const li=(e,t,n)=>t===n.findIndex((t=>e.name===t.name));var ci={};function ui(e){return[e]}function di(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function mi(e,t){var n,r=t||ui;function a(){n=new WeakMap}function s(){var t,a,s,i,o,l=arguments.length;for(i=new Array(l),s=0;s<l;s++)i[s]=arguments[s];for(t=function(e){var t,r,a,s,i,o=n,l=!0;for(t=0;t<e.length;t++){if(!(i=r=e[t])||"object"!=typeof i){l=!1;break}o.has(r)?o=o.get(r):(a=new WeakMap,o.set(r,a),o=a)}return o.has(ci)||((s=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=l,o.set(ci,s)),o.get(ci)}(o=r.apply(null,i)),t.isUniqueByDependants||(t.lastDependants&&!di(o,t.lastDependants,0)&&t.clear(),t.lastDependants=o),a=t.head;a;){if(di(a.args,i,1))return a!==t.head&&(a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=t.head,a.prev=null,t.head.prev=a,t.head=a),a.val;a=a.next}return a={val:e.apply(null,i)},i[0]=null,a.args=i,t.head&&(t.head.prev=a,a.next=t.head),t.head=a,a.val}return s.getDependants=r,s.clear=a,a(),s}var pi=a(9681),hi=a.n(pi);const fi=e=>e.name||"",gi=e=>e.title,yi=e=>e.description||"",vi=e=>e.keywords||[],_i=()=>!1;function bi(e=""){return vs(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 Ei(e=""){return e=(e=(e=hi()(e)).replace(/^\//,"")).toLowerCase()}const wi=(e="")=>bi(Ei(e)),Si=(e=[],t="",n={})=>{const r=wi(t),a=n.categoryId!==Mt&&!r.length,s={...n,onlyFilterByCategory:a},i=a?0:1,o=e.map((e=>[e,xi(e,t,s)])).filter((([,e])=>e>i));return 0===r.length||o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))};function xi(e,t,n){const{categoryId:r,getName:a=fi,getTitle:s=gi,getDescription:i=yi,getKeywords:o=vi,hasCategory:l=_i,onlyFilterByCategory:c}=n;let u=r===Mt||r===At&&e.type===It.user||l(e,r)?1:0;if(!u||c)return u;const d=a(e),m=s(e),p=i(e),h=o(e),f=Ei(t),g=Ei(m);if(f===g)u+=30;else if(g.startsWith(f))u+=20;else{const e=[d,m,p,...h].join(" ");0===((e,t)=>e.filter((e=>!wi(t).some((t=>t.includes(e))))))(bi(f),e).length&&(u+=10)}return u}const Ci=[],ki=(e,t)=>e&&t?e+"//"+t:null,Ti=mi(((e,t,n="")=>{var r;const{getEntityRecords:a,getIsResolving:s}=e(ye.store),{__experimentalGetDefaultTemplatePartAreas:i}=e(y.store),o={per_page:-1},l=(null!==(r=a("postType",kt,o))&&void 0!==r?r:Ci).map((e=>(e=>({blocks:(0,u.parse)(e.content.raw,{__unstableSkipMigrationLogs:!0}),categories:[e.area],description:e.description||"",isCustom:e.source===Tt.custom,keywords:e.keywords||[],id:ki(e.theme,e.slug),name:ki(e.theme,e.slug),title:(0,en.decodeEntities)(e.title.rendered),type:e.type,templatePart:e}))(e))),c=(i()||[]).map((e=>e.area)),d=s("getEntityRecords",["postType",kt,o]),m=Si(l,n,{categoryId:t,hasCategory:(e,t)=>t!==Pt?e.templatePart.area===t:e.templatePart.area===t||!c.includes(e.templatePart.area)});return{patterns:m,isResolving:d}}),(e=>[e(ye.store).getEntityRecords("postType",kt,{per_page:-1}),e(ye.store).getIsResolving("getEntityRecords",["postType",kt,{per_page:-1}]),e(y.store).__experimentalGetDefaultTemplatePartAreas()])),Pi=mi((e=>{var t;const{getSettings:n}=Xe(e(tr)),{getIsResolving:r}=e(ye.store),a=n();return{patterns:[...(null!==(t=a.__experimentalAdditionalBlockPatterns)&&void 0!==t?t:a.__experimentalBlockPatterns)||[],...e(ye.store).getBlockPatterns()||[]].filter((e=>!Ot.includes(e.source))).filter(li).filter((e=>!1!==e.inserter)).map((e=>({...e,keywords:e.keywords||[],type:It.theme,blocks:(0,u.parse)(e.content,{__unstableSkipMigrationLogs:!0})}))),isResolving:r("getBlockPatterns")}}),(e=>[e(ye.store).getBlockPatterns(),e(ye.store).getIsResolving("getBlockPatterns"),Xe(e(tr)).getSettings()])),Ii=mi(((e,t,n,r="")=>{const{patterns:a,isResolving:s}=Pi(e),{patterns:i,isResolving:o}=Mi(e);let l=[...a||[],...i||[]];return n&&(l=l.filter((e=>e.type===It.user?e.syncStatus===n:n===Nt.unsynced))),l=Si(l,r,t?{categoryId:t,hasCategory:(e,t)=>e.categories?.includes(t)}:{hasCategory:e=>!e.hasOwnProperty("categories")}),{patterns:l,isResolving:s||o}}),(e=>[Pi(e),Mi(e)])),Mi=mi(((e,t,n="")=>{const{getEntityRecords:r,getIsResolving:a,getUserPatternCategories:s}=e(ye.store),i={per_page:-1},o=r("postType",It.user,i),l=s(),c=new Map;l.forEach((e=>c.set(e.id,e)));let d=o?o.map((e=>((e,t)=>({blocks:(0,u.parse)(e.content.raw,{__unstableSkipMigrationLogs:!0}),...e.wp_pattern_category.length>0&&{categories:e.wp_pattern_category.map((e=>t&&t.get(e)?t.get(e).slug:e))},termLabels:e.wp_pattern_category.map((e=>t?.get(e)?t.get(e).label:e)),id:e.id,name:e.slug,syncStatus:e.wp_pattern_sync_status||Nt.full,title:e.title.raw,type:e.type,patternPost:e}))(e,c))):Ci;const m=a("getEntityRecords",["postType",It.user,i]);return t&&(d=d.filter((e=>e.syncStatus===t))),d=Si(d,n,{hasCategory:()=>!0}),{patterns:d,isResolving:m,categories:l}}),(e=>[e(ye.store).getEntityRecords("postType",It.user,{per_page:-1}),e(ye.store).getIsResolving("getEntityRecords",["postType",It.user,{per_page:-1}]),e(ye.store).getUserPatternCategories()])),Ai=(e,t,{search:n="",syncStatus:r}={})=>(0,m.useSelect)((a=>e===kt?Ti(a,t,n):e===It.theme?Ii(a,t,r,n):e===It.user?Mi(a,r,n):{patterns:Ci,isResolving:!1}),[t,e,n,r]);function Oi(){const e=function(){const e=(0,m.useSelect)((e=>{var t;const{getSettings:n}=Xe(e(tr)),r=n();return null!==(t=r.__experimentalAdditionalBlockPatternCategories)&&void 0!==t?t:r.__experimentalBlockPatternCategories}));return[...e||[],...(0,m.useSelect)((e=>e(ye.store).getBlockPatternCategories()))||[]]}();e.push({name:Pt,label:(0,E.__)("Uncategorized")});const t=function(){const e=(0,m.useSelect)((e=>{var t;const{getSettings:n}=Xe(e(tr));return null!==(t=n().__experimentalAdditionalBlockPatterns)&&void 0!==t?t:n().__experimentalBlockPatterns})),t=(0,m.useSelect)((e=>e(ye.store).getBlockPatterns()));return(0,g.useMemo)((()=>[...e||[],...t||[]].filter((e=>!Ot.includes(e.source))).filter(li).filter((e=>!1!==e.inserter))),[e,t])}(),{patterns:n,categories:r}=Ai(It.user),a=(0,g.useMemo)((()=>{const a={},s=[];e.forEach((e=>{a[e.name]||(a[e.name]={...e,count:0})})),r.forEach((e=>{a[e.name]||(a[e.name]={...e,count:0})})),t.forEach((e=>{e.categories?.forEach((e=>{a[e]&&(a[e].count+=1)})),e.categories?.length||(a.uncategorized.count+=1)})),n.forEach((e=>{e.categories?.forEach((e=>{a[e]&&(a[e].count+=1)})),e.categories?.length||(a.uncategorized.count+=1)})),[...e,...r].forEach((e=>{a[e.name].count&&!s.find((t=>t.name===e.name))&&s.push(a[e.name])}));const i=s.sort(((e,t)=>e.label.localeCompare(t.label)));return i.unshift({name:At,label:(0,E.__)("My patterns"),count:n.length}),i.unshift({name:Mt,label:(0,E.__)("All patterns"),description:(0,E.__)("A list of all patterns from all sources."),count:t.length+n.length}),i}),[e,t,r,n]);return{patternCategories:a,hasPatterns:!!a.length}}const Ni=e=>{const t=e||[],n=(0,m.useSelect)((e=>e(y.store).__experimentalGetDefaultTemplatePartAreas()),[]),r={header:{},footer:{},sidebar:{},uncategorized:{}};n.forEach((e=>r[e.area]={...e,templateParts:[]}));return t.reduce(((e,t)=>(e[e[t.area]?t.area:Pt].templateParts.push(t),e)),r)};function Fi({areas:e,currentArea:t,currentType:n}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-patterns__group-header"},(0,l.createElement)(b.__experimentalHeading,{level:2},(0,E.__)("Template parts"))),(0,l.createElement)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group"},Object.entries(e).map((([e,{label:r,templateParts:a}])=>(0,l.createElement)(oi,{key:e,count:a?.length,icon:(0,y.getTemplatePartIcon)(e),label:r,id:e,type:kt,isActive:t===e&&n===kt})))))}function Ri({categories:e,currentCategory:t,currentType:n}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group"},e.map((e=>(0,l.createElement)(oi,{key:e.name,count:e.count,label:e.label,icon:Ys,id:e.name,type:"pattern",isActive:t===`${e.name}`&&(n===It.theme||n===It.user)})))))}function Di(){const e=(0,ie.useViewportMatch)("medium","<"),{categoryType:t,categoryId:n}=(0,yt.getQueryArgs)(window.location.href),r=n||Mt,a=t||It.theme,{templatePartAreas:s,hasTemplateParts:i,isLoading:o}=function(){const{records:e,isResolving:t}=(0,ye.useEntityRecords)("postType",kt,{per_page:-1});return{hasTemplateParts:!!e&&!!e.length,isLoading:t,templatePartAreas:Ni(e)}}(),{patternCategories:c,hasPatterns:u}=Oi(),d=(0,m.useSelect)((e=>e(ye.store).getCurrentTheme()?.is_block_theme),[]),p=(0,m.useSelect)((e=>!!e(tr).getSettings().supportsTemplatePartsMode),[]),h=Et({path:"/wp_template_part/all",didAccessPatternsPage:!d&&p?1:void 0}),f=e?void 0:(0,l.createElement)(b.__experimentalItemGroup,null,(0,l.createElement)(vr,{as:"a",href:"edit.php?post_type=wp_block",withChevron:!0},(0,E.__)("Manage all of my patterns")),(d||p)&&(0,l.createElement)(vr,{withChevron:!0,...h},(0,E.__)("Manage all template parts")));return(0,l.createElement)(hr,{isRoot:!d,title:(0,E.__)("Patterns"),description:(0,E.__)("Manage what patterns are available when editing the site."),actions:(0,l.createElement)(ii,null),footer:f,content:(0,l.createElement)(l.Fragment,null,o&&(0,E.__)("Loading patterns…"),!o&&(0,l.createElement)(l.Fragment,null,!i&&!u&&(0,l.createElement)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group"},(0,l.createElement)(b.__experimentalItem,null,(0,E.__)("No template parts or patterns found"))),u&&(0,l.createElement)(Ri,{categories:c,currentCategory:r,currentType:a}),i&&(0,l.createElement)(Fi,{areas:s,currentArea:r,currentType:a})))})}const{useLocation:Vi}=Xe(gt.privateApis),Li=[Ct,kt,xt,It.user];function Bi(){const{params:e={}}=Vi(),{postType:t,postId:n,context:r,isReady:a}=function({path:e,postId:t,postType:n}){const{hasLoadedAllDependencies:r,homepageId:a,url:s,frontPageTemplateId:i}=(0,m.useSelect)((e=>{const{getSite:t,getUnstableBase:n,getEntityRecords:r}=e(ye.store),a=t(),s=n(),i=r("postType",Ct,{per_page:-1});let o;if(i){const e=i.find((e=>"front-page"===e.slug));o=!!e&&e.id}return{hasLoadedAllDependencies:!!s&&!!a,homepageId:"page"===a?.show_on_front&&["number","string"].includes(typeof a.page_on_front)?a.page_on_front.toString():null,url:s?.home,frontPageTemplateId:o}}),[]),o=(0,m.useSelect)((o=>{if(Li.includes(n))return;const{getEditedEntityRecord:l,getEntityRecords:c,getDefaultTemplateId:u,__experimentalGetTemplateForLink:d}=o(ye.store);function m(e,t){if("page"===e&&a===t){if(void 0===i)return;if(i)return i}const n=l("postType",e,t);if(!n)return;const r=n.template;if(r){const e=c("postType",Ct,{per_page:-1})?.find((({slug:e})=>e===r));if(e)return e.id}let s;return s=n.slug?"page"===e?`${e}-${n.slug}`:`single-${e}-${n.slug}`:"page"===e?"page":`single-${e}`,u({slug:s})}if(r){if(n&&t)return m(n,t);if("/pages"===e&&t)return m("page",t);if(a)return m("page",a);if(s){const e=d(s);return e?.id}}}),[a,r,s,t,n,e,i]),l=(0,g.useMemo)((()=>Li.includes(n)?{}:n&&t?{postType:n,postId:t}:"/pages"===e&&t?{postType:"page",postId:t}:a?{postType:"page",postId:a}:{}),[a,n,t,e]);return"/wp_template/all"===e&&t?{isReady:!0,postType:"wp_template",postId:t,context:l}:"/wp_template_part/all"===e&&t?{isReady:!0,postType:"wp_template_part",postId:t,context:l}:Li.includes(n)?{isReady:!0,postType:n,postId:t,context:l}:r?{isReady:void 0!==o,postType:Ct,postId:o,context:l}:{isReady:!1}}(e),{setEditedEntity:s}=(0,m.useDispatch)(tr);(0,g.useEffect)((()=>{a&&s(t,n,r)}),[a,t,n,r,s])}function zi(e,t){var n=e.toLowerCase();return 0===t?function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(n):n}const Hi=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),Gi=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),{useLocation:Ui,useHistory:Wi}=Xe(gt.privateApis);function ji(e){var t;let n=null!==(t=e?.path)&&void 0!==t?t:"/";if(e?.postType&&e?.postId)switch(e.postType){case It.user:case Ct:case kt:case"page":n=`/${encodeURIComponent(e.postType)}/${encodeURIComponent(e.postId)}`;break;default:n=`/navigation/${encodeURIComponent(e.postType)}/${encodeURIComponent(e.postId)}`}return n}function Zi(){const e=Wi(),{params:t}=Ui(),{location:n,params:r,goTo:a}=(0,b.__experimentalUseNavigator)(),s=(0,g.useRef)(!0);(0,g.useEffect)((()=>{function a(n){if(r=n,a=t,Object.entries(r).every((([e,t])=>a[e]===t)))return;var r,a;const s={...t,...n};e.push(s)}s.current?s.current=!1:r?.postType&&r?.postId?a({postType:r?.postType,postId:r?.postId,path:void 0,layout:void 0}):n.path.startsWith("/page/")&&r?.postId?a({postType:"page",postId:r?.postId,path:void 0,layout:void 0}):"/patterns"===n.path?a({postType:void 0,postId:void 0,canvas:void 0,path:n.path}):"/wp_template/all"!==n.path||window?.__experimentalAdminViews?"/pages"===n.path&&window?.__experimentalAdminViews||"/wp_template/all"===n.path&&window?.__experimentalAdminViews||"/wp_template_part/all"===n.path&&window?.__experimentalAdminViews?a({postType:void 0,categoryType:void 0,categoryId:void 0,path:n.path}):a({postType:void 0,postId:void 0,categoryType:void 0,categoryId:void 0,layout:void 0,path:"/"===n.path?void 0:n.path}):a({postType:void 0,categoryType:void 0,categoryId:void 0,path:n.path,layout:void 0})}),[n?.path,r]),(0,g.useEffect)((()=>{const e=ji(t);n.path!==e&&a(e)}),[t])}const qi={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},{useLocation:Yi,useHistory:Ki}=Xe(gt.privateApis);function Xi(e){const t=Yi(),n=Ki(),{block:r}=e,{clientId:a}=r,{moveBlocksDown:s,moveBlocksUp:i,removeBlocks:o}=(0,m.useDispatch)(fe.store),c=(0,E.sprintf)((0,E.__)("Remove %s"),(0,fe.BlockTitle)({clientId:a,maximumLength:25})),u=(0,E.sprintf)((0,E.__)("Go to %s"),(0,fe.BlockTitle)({clientId:a,maximumLength:25})),d=(0,m.useSelect)((e=>{const{getBlockRootClientId:t}=e(fe.store);return t(a)}),[a]),p=(0,g.useCallback)((e=>{const{attributes:r,name:a}=e;"post-type"===r.kind&&r.id&&r.type&&n&&n.push({postType:r.type,postId:r.id,...vt()&&{wp_theme_preview:_t()}},{backPath:ji(t.params)}),"core/page-list-item"===a&&r.id&&n&&n.push({postType:"page",postId:r.id,...vt()&&{wp_theme_preview:_t()}},{backPath:ji(t.params)})}),[n]);return(0,l.createElement)(b.DropdownMenu,{icon:ue,label:(0,E.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:qi,noIcons:!0,...e},(({onClose:e})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.MenuGroup,null,(0,l.createElement)(b.MenuItem,{icon:Hi,onClick:()=>{i([a],d),e()}},(0,E.__)("Move up")),(0,l.createElement)(b.MenuItem,{icon:Gi,onClick:()=>{s([a],d),e()}},(0,E.__)("Move down")),"page"===r.attributes?.type&&r.attributes?.id&&(0,l.createElement)(b.MenuItem,{onClick:()=>{p(r),e()}},u)),(0,l.createElement)(b.MenuGroup,null,(0,l.createElement)(b.MenuItem,{onClick:()=>{o([a],!1),e()}},c)))))}const{PrivateListView:Ji}=Xe(fe.privateApis),Qi=["postType","page",{per_page:100,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}];function $i({rootClientId:e}){const{listViewRootClientId:t,isLoading:n}=(0,m.useSelect)((t=>{const{areInnerBlocksControlled:n,getBlockName:r,getBlockCount:a,getBlockOrder:s}=t(fe.store),{isResolving:i}=t(ye.store),o=s(e),l=1===o.length&&"core/page-list"===r(o[0])&&a(o[0])>0,c=i("getEntityRecords",Qi);return{listViewRootClientId:l?o[0]:e,isLoading:!n(e)||c}}),[e]),{replaceBlock:r,__unstableMarkNextChangeAsNotPersistent:a}=(0,m.useDispatch)(fe.store),s=(0,g.useCallback)((e=>{"core/navigation-link"!==e.name||e.attributes.url||(a(),r(e.clientId,(0,u.createBlock)("core/navigation-link",e.attributes)))}),[a,r]);return(0,l.createElement)(l.Fragment,null,!n&&(0,l.createElement)(Ji,{rootClientId:t,onSelect:s,blockSettingsMenu:Xi,showAppender:!1}),(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor"},(0,l.createElement)(fe.BlockList,null)))}const eo=()=>{};function to({navigationMenuId:e}){const{storedSettings:t}=(0,m.useSelect)((e=>{const{getSettings:t}=Xe(e(tr));return{storedSettings:t()}}),[]),n=(0,g.useMemo)((()=>e?[(0,u.createBlock)("core/navigation",{ref:e})]:[]),[e]);return e&&n?.length?(0,l.createElement)(fe.BlockEditorProvider,{settings:t,value:n,onChange:eo,onInput:eo},(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__content"},(0,l.createElement)($i,{rootClientId:n[0].clientId}))):null}function no(e){return(0,m.useSelect)((t=>{if(!e)return;const n=t(ye.store).getEditedEntityRecord("postType",xt,e);return"trash"===n.status?void 0:n.title}),[e])}function ro({id:e}){const t=no(e);return e&&void 0!==t?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen-template-part-navigation-menu__title",size:"11",upperCase:!0,weight:500},t||(0,E.__)("Navigation")),(0,l.createElement)(to,{navigationMenuId:e})):null}function ao({id:e}){const t=no(e),n=Et({postId:e,postType:xt});return e&&void 0!==t?(0,l.createElement)(vr,{withChevron:!0,...n},t||(0,E.__)("(no title)")):null}function so({menus:e}){return(0,l.createElement)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-template-part-navigation-menu-list"},e.map((e=>(0,l.createElement)(ao,{key:e,id:e}))))}function io({menus:e}){return e.length?1===e.length?(0,l.createElement)(ro,{id:e[0]}):(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen-template-part-navigation-menu__title",size:"11",upperCase:!0,weight:500},(0,E.__)("Navigation")),(0,l.createElement)(so,{menus:e})):null}function oo(e,t){const{record:n}=Ds(e,t);if(e!==kt)return;const r=function(e){return e?.blocks?e?.blocks:e?.content&&"function"!=typeof e.content?(0,u.parse)(e.content):[]}(n),a=function(e,t){if(!e||!t?.length)return[];const n=t=>{if(!t)return[];const r=[];for(const a of t)if(a.name===e&&r.push(a),a?.innerBlocks){const e=n(a.innerBlocks);e.length&&r.push(...e)}return r};return n(t)}("core/navigation",r);if(!a.length)return;const s=a?.map((e=>e.attributes.ref)),i=[...new Set(s)].filter((e=>e));return i?.length?(0,l.createElement)(io,{menus:i}):void 0}function lo(e,t){const{getDescription:n,getTitle:r,record:a}=Ds(e,t),s=(0,m.useSelect)((e=>e(y.store).__experimentalGetDefaultTemplatePartAreas()),[]),{currentTheme:i,userPatternCategories:o}=(0,m.useSelect)((e=>{const{getCurrentTheme:t,getUserPatternCategories:n}=e(ye.store);return{currentTheme:t(),userPatternCategories:n()}}),[]),c=Bs(e,t),u="theme"===c.type&&a.theme===i?.stylesheet,d=r();let p=n();!p&&c.text&&(p=e===It.user?(0,E.sprintf)((0,E.__)("This is the %s pattern."),r()):(0,E.sprintf)((0,E.__)("This is the %s template part."),r())),!p&&e===It.user&&a?.title&&(p=(0,E.sprintf)((0,E.__)("This is the %s pattern."),a.title));const h=a?.modified?(0,l.createElement)(Ca,{record:a}):null,f=[];if((e===It.user||e===kt)&&(f.push({label:(0,E.__)("Syncing"),value:a.wp_pattern_sync_status===Nt.unsynced?(0,E._x)("Not synced","Text that indicates that the pattern is not synchronized"):(0,E._x)("Synced","Text that indicates that the pattern is synchronized")}),0===a.wp_pattern_category?.length&&f.push({label:(0,E.__)("Categories"),value:(0,E.__)("Uncategorized")}),a.wp_pattern_category?.length>0)){const e=new Map;o.forEach((t=>e.set(t.id,t)));const t=a.wp_pattern_category.filter((t=>e.get(t))).map((t=>e.get(t).label));f.push({label:(0,E.__)("Categories"),value:t.length>0?t.join(", "):""})}if(e===kt){const e=s.find((e=>e.area===a.area));let t=e?.label;t||(t=a.area?(0,E.sprintf)((0,E.__)("%s (removed)"),(g=a.area,void 0===v&&(v={}),vs(g,hs({delimiter:" ",transform:zi},v)))):(0,E.__)("None")),f.push({label:(0,E.__)("Area"),value:t})}var g,v;e===kt&&c.text&&!u&&f.push({label:(0,E.__)("Added by"),value:(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-pattern__added-by-description-author"},c.text)}),e!==kt||!c.text||a.origin!==Tt.plugin&&!0!==a.has_theme_file||f.push({label:(0,E.__)("Customized"),value:(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-pattern__added-by-description-customized"},c.isCustomized?(0,E.__)("Yes"):(0,E.__)("No"))});return{title:d,description:p,content:(0,l.createElement)(l.Fragment,null,oo(e,t),!!f.length&&(0,l.createElement)(xa,{spacing:5,title:(0,E.__)("Details")},f.map((({label:e,value:t})=>(0,l.createElement)(wa,{key:e},(0,l.createElement)(Ea,null,e),(0,l.createElement)(Sa,null,t)))))),footer:h}}function co(){const e=(0,b.__experimentalUseNavigator)(),{params:{postType:t,postId:n}}=e,{categoryType:r}=(0,yt.getQueryArgs)(window.location.href),{setCanvasMode:a}=Xe((0,m.useDispatch)(tr));Bi();const s=lo(t,n),i=r||t!==kt?"/patterns":"/wp_template_part/all";return(0,l.createElement)(hr,{actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Us,{postType:t,postId:n,toggleProps:{as:mr},onRemove:()=>{e.goTo(i)}}),(0,l.createElement)(mr,{onClick:()=>a("edit"),label:(0,E.__)("Edit"),icon:br})),backPath:i,...s})}const uo={per_page:100,status:["publish","draft"],order:"desc",orderby:"date"},mo=e=>e?.trim()?.length>0;function po({menuTitle:e,onClose:t,onSave:n}){const[r,a]=(0,g.useState)(e),s=r!==e&&mo(r);return(0,l.createElement)(b.Modal,{title:(0,E.__)("Rename"),onRequestClose:t},(0,l.createElement)("form",{className:"sidebar-navigation__rename-modal-form"},(0,l.createElement)(b.__experimentalVStack,{spacing:"3"},(0,l.createElement)(b.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:r,placeholder:(0,E.__)("Navigation title"),onChange:a}),(0,l.createElement)(b.__experimentalHStack,{justify:"right"},(0,l.createElement)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t},(0,E.__)("Cancel")),(0,l.createElement)(b.Button,{__next40pxDefaultSize:!0,disabled:!s,variant:"primary",type:"submit",onClick:e=>{e.preventDefault(),s&&(n({title:r}),t())}},(0,E.__)("Save"))))))}function ho({onClose:e,onConfirm:t}){return(0,l.createElement)(b.__experimentalConfirmDialog,{isOpen:!0,onConfirm:n=>{n.preventDefault(),t(),e()},onCancel:e,confirmButtonText:(0,E.__)("Delete")},(0,E.__)("Are you sure you want to delete this Navigation menu?"))}const fo={position:"bottom right"};function go(e){const{onDelete:t,onSave:n,onDuplicate:r,menuTitle:a}=e,[s,i]=(0,g.useState)(!1),[o,c]=(0,g.useState)(!1),u=()=>{i(!1),c(!1)};return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.DropdownMenu,{className:"sidebar-navigation__more-menu",label:(0,E.__)("Actions"),icon:ue,popoverProps:fo},(({onClose:e})=>(0,l.createElement)("div",null,(0,l.createElement)(b.MenuGroup,null,(0,l.createElement)(b.MenuItem,{onClick:()=>{i(!0),e()}},(0,E.__)("Rename")),(0,l.createElement)(b.MenuItem,{onClick:()=>{r(),e()}},(0,E.__)("Duplicate")),(0,l.createElement)(b.MenuItem,{isDestructive:!0,onClick:()=>{c(!0),e()}},(0,E.__)("Delete")))))),o&&(0,l.createElement)(ho,{onClose:u,onConfirm:t}),s&&(0,l.createElement)(po,{onClose:u,menuTitle:a,onSave:n}))}function yo(e,t,n){return e?.rendered?"publish"===n?(0,en.decodeEntities)(e?.rendered):(0,E.sprintf)((0,E.__)("%1$s (%2$s)"),(0,en.decodeEntities)(e?.rendered),n):(0,E.sprintf)((0,E.__)("(no title %s)"),t)}function vo({postId:e}){const t=Et({postId:e,postType:xt,canvas:"edit"});return(0,l.createElement)(mr,{...t,label:(0,E.__)("Edit"),icon:br})}function _o({navigationMenu:e,handleDelete:t,handleDuplicate:n,handleSave:r}){const a=e?.title?.rendered;return(0,l.createElement)(Po,{actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(go,{menuTitle:(0,en.decodeEntities)(a),onDelete:t,onSave:r,onDuplicate:n}),(0,l.createElement)(vo,{postId:e?.id})),title:yo(e?.title,e?.id,e?.status),description:(0,E.__)("Navigation menus are a curated collection of blocks that allow visitors to get around your site.")},(0,l.createElement)(to,{navigationMenuId:e?.id}))}const bo="wp_navigation";function Eo(){const{params:{postId:e}}=(0,b.__experimentalUseNavigator)(),{record:t,isResolving:n}=(0,ye.useEntityRecord)("postType",bo,e),{isSaving:r,isDeleting:a}=(0,m.useSelect)((t=>{const{isSavingEntityRecord:n,isDeletingEntityRecord:r}=t(ye.store);return{isSaving:n("postType",bo,e),isDeleting:r("postType",bo,e)}}),[e]),s=n||r||a,i=t?.title?.rendered||t?.slug,{handleSave:o,handleDelete:c,handleDuplicate:u}=Co(),d=()=>c(t),p=e=>o(t,e),h=()=>u(t);return s?(0,l.createElement)(Po,{description:(0,E.__)("Navigation menus are a curated collection of blocks that allow visitors to get around your site.")},(0,l.createElement)(b.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})):s||t?t?.content?.raw?(0,l.createElement)(_o,{navigationMenu:t,handleDelete:d,handleSave:p,handleDuplicate:h}):(0,l.createElement)(Po,{actions:(0,l.createElement)(go,{menuTitle:(0,en.decodeEntities)(i),onDelete:d,onSave:p,onDuplicate:h}),title:yo(t?.title,t?.id,t?.status),description:(0,E.__)("This Navigation Menu is empty.")}):(0,l.createElement)(Po,{description:(0,E.__)("Navigation Menu missing.")})}function wo(){const{goTo:e}=(0,b.__experimentalUseNavigator)(),{deleteEntityRecord:t}=(0,m.useDispatch)(ye.store),{createSuccessNotice:n,createErrorNotice:r}=(0,m.useDispatch)(ge.store);return async a=>{const s=a?.id;try{await t("postType",bo,s,{force:!0},{throwOnError:!0}),n((0,E.__)("Deleted Navigation menu"),{type:"snackbar"}),e("/navigation")}catch(e){r((0,E.sprintf)((0,E.__)("Unable to delete Navigation menu (%s)."),e?.message),{type:"snackbar"})}}}function So(){const{getEditedEntityRecord:e}=(0,m.useSelect)((e=>{const{getEditedEntityRecord:t}=e(ye.store);return{getEditedEntityRecord:t}}),[]),{editEntityRecord:t,__experimentalSaveSpecifiedEntityEdits:n}=(0,m.useDispatch)(ye.store),{createSuccessNotice:r,createErrorNotice:a}=(0,m.useDispatch)(ge.store);return async(s,i)=>{if(!i)return;const o=s?.id,l=e("postType",xt,o);t("postType",bo,o,i);const c=Object.keys(i);try{await n("postType",bo,o,c,{throwOnError:!0}),r((0,E.__)("Renamed Navigation menu"),{type:"snackbar"})}catch(e){t("postType",bo,o,l),a((0,E.sprintf)((0,E.__)("Unable to rename Navigation menu (%s)."),e?.message),{type:"snackbar"})}}}function xo(){const{goTo:e}=(0,b.__experimentalUseNavigator)(),{saveEntityRecord:t}=(0,m.useDispatch)(ye.store),{createSuccessNotice:n,createErrorNotice:r}=(0,m.useDispatch)(ge.store);return async a=>{const s=a?.title?.rendered||a?.slug;try{const r=await t("postType",bo,{title:(0,E.sprintf)((0,E.__)("%s (Copy)"),s),content:a?.content?.raw,status:"publish"},{throwOnError:!0});r&&(n((0,E.__)("Duplicated Navigation menu"),{type:"snackbar"}),e(`/navigation/${bo}/${r.id}`))}catch(e){r((0,E.sprintf)((0,E.__)("Unable to duplicate Navigation menu (%s)."),e?.message),{type:"snackbar"})}}}function Co(){return{handleDelete:wo(),handleSave:So(),handleDuplicate:xo()}}let ko=!1;function To(){const{records:e,isResolving:t,hasResolved:n}=(0,ye.useEntityRecords)("postType",xt,uo),r=t&&!n,{getNavigationFallbackId:a}=Xe((0,m.useSelect)(ye.store)),s=e?.[0];s&&(ko=!0),s||t||!n||ko||a();const{handleSave:i,handleDelete:o,handleDuplicate:c}=Co(),u=!!e?.length;return r?(0,l.createElement)(Po,null,(0,l.createElement)(b.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})):r||u?1===e?.length?(0,l.createElement)(_o,{navigationMenu:s,handleDelete:()=>o(s),handleDuplicate:()=>c(s),handleSave:e=>i(s,e)}):(0,l.createElement)(Po,null,(0,l.createElement)(b.__experimentalItemGroup,null,e?.map((({id:e,title:t,status:n},r)=>(0,l.createElement)(Io,{postId:e,key:e,withChevron:!0,icon:sr},function(e,t,n){return e?"publish"===n?(0,en.decodeEntities)(e):(0,E.sprintf)((0,E.__)("%1$s (%2$s)"),(0,en.decodeEntities)(e),n):(0,E.sprintf)((0,E.__)("(no title %s)"),t)}(t?.rendered,r+1,n)))))):(0,l.createElement)(Po,{description:(0,E.__)("No Navigation Menus found.")})}function Po({children:e,actions:t,title:n,description:r}){return(0,l.createElement)(hr,{title:n||(0,E.__)("Navigation"),actions:t,description:r||(0,E.__)("Manage your Navigation menus."),content:e})}const Io=({postId:e,...t})=>{const n=Et({postId:e,postType:xt});return(0,l.createElement)(vr,{...n,...t})},Mo=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.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-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})),Ao=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})),Oo=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),No=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"})),Fo=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M4.67 10.664s-2.09 1.11-2.917 1.582l.494.87 1.608-.914.002.002c.343.502.86 1.17 1.563 1.84.348.33.742.663 1.185.976L5.57 16.744l.858.515 1.02-1.701a9.1 9.1 0 0 0 4.051 1.18V19h1v-2.263a9.1 9.1 0 0 0 4.05-1.18l1.021 1.7.858-.514-1.034-1.723c.442-.313.837-.646 1.184-.977.703-.669 1.22-1.337 1.563-1.839l.002-.003 1.61.914.493-.87c-1.75-.994-2.918-1.58-2.918-1.58l-.003.005a8.29 8.29 0 0 1-.422.689 10.097 10.097 0 0 1-1.36 1.598c-1.218 1.16-3.042 2.293-5.544 2.293-2.503 0-4.327-1.132-5.546-2.293a10.099 10.099 0 0 1-1.359-1.599 8.267 8.267 0 0 1-.422-.689l-.003-.005Z"}));function Ro({selection:e,onSelectionChange:t,item:n,data:r,getItemId:a,primaryField:s,disabled:i}){const o=a(n),c=e.includes(o);let u;return u=s?.getValue&&n?(0,E.sprintf)(c?(0,E.__)("Deselect item: %s"):(0,E.__)("Select item: %s"),s.getValue({item:n})):c?(0,E.__)("Select a new item"):(0,E.__)("Deselect item"),(0,l.createElement)(b.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",__nextHasNoMarginBottom:!0,label:u,"aria-disabled":i,checked:c,onChange:()=>{i||t(c?r.filter((t=>{const n=a?.(t);return n!==o&&e.includes(n)})):r.filter((t=>{const n=a?.(t);return n===o||e.includes(n)})))}})}const{lock:Do,unlock:Vo}=(0,Ye.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/dataviews"),{DropdownMenuV2:Lo,DropdownMenuGroupV2:Bo,DropdownMenuItemV2:zo,DropdownMenuItemLabelV2:Ho,kebabCase:Go}=Vo(b.privateApis);function Uo({action:e,onClick:t}){return(0,l.createElement)(b.Button,{label:e.label,icon:e.icon,isDestructive:e.isDestructive,size:"compact",onClick:t})}function Wo({action:e,onClick:t}){return(0,l.createElement)(zo,{onClick:t,hideOnClick:!e.RenderModal},(0,l.createElement)(Ho,null,e.label))}function jo({action:e,item:t,ActionTrigger:n}){const[r,a]=(0,g.useState)(!1),s={action:e,onClick:()=>a(!0)},{RenderModal:i,hideModalHeader:o}=e;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(n,{...s}),r&&(0,l.createElement)(b.Modal,{title:e.modalHeader||e.label,__experimentalHideHeader:!!o,onRequestClose:()=>{a(!1)},overlayClassName:`dataviews-action-modal dataviews-action-modal__${Go(e.id)}`},(0,l.createElement)(i,{items:[t],closeModal:()=>a(!1)})))}function Zo({actions:e,item:t}){return(0,l.createElement)(Bo,null,e.map((e=>e.RenderModal?(0,l.createElement)(jo,{key:e.id,action:e,item:t,ActionTrigger:Wo}):(0,l.createElement)(Wo,{key:e.id,action:e,onClick:()=>e.callback([t])}))))}function qo({item:e,actions:t,isCompact:n}){const{primaryActions:r,secondaryActions:a}=(0,g.useMemo)((()=>t.reduce(((t,n)=>(n.isEligible&&!n.isEligible(e)||(n.isPrimary&&n.icon?t.primaryActions.push(n):t.secondaryActions.push(n)),t)),{primaryActions:[],secondaryActions:[]})),[t,e]);return n?(0,l.createElement)(Yo,{item:e,primaryActions:r,secondaryActions:a}):(0,l.createElement)(b.__experimentalHStack,{spacing:1,justify:"flex-end",style:{flexShrink:"0",width:"auto"}},!!r.length&&r.map((t=>t.RenderModal?(0,l.createElement)(jo,{key:t.id,action:t,item:e,ActionTrigger:Uo}):(0,l.createElement)(Uo,{key:t.id,action:t,onClick:()=>t.callback([e])}))),(0,l.createElement)(Lo,{trigger:(0,l.createElement)(b.Button,{size:"compact",icon:ue,label:(0,E.__)("Actions"),disabled:!a.length}),placement:"bottom-end"},(0,l.createElement)(Zo,{actions:a,item:e})))}function Yo({item:e,primaryActions:t,secondaryActions:n}){return(0,l.createElement)(Lo,{trigger:(0,l.createElement)(b.Button,{size:"compact",icon:ue,label:(0,E.__)("Actions"),disabled:!t.length&&!n.length}),placement:"bottom-end"},!!t.length&&(0,l.createElement)(Zo,{actions:t,item:e}),!!n.length&&(0,l.createElement)(Zo,{actions:n,item:e}))}const Ko=({data:e,view:t,fields:n,textFields:r})=>{const a=[...e],s=t.sort.field;if(r.includes(s)){const e=n.find((e=>e.id===s));a.sort(((n,r)=>{var a,s;const i=null!==(a=e.getValue({item:n}))&&void 0!==a?a:"",o=null!==(s=e.getValue({item:r}))&&void 0!==s?s:"";return"asc"===t.sort.direction?i.localeCompare(o):o.localeCompare(i)}))}return a};function Xo({data:e,view:t}){const n=(t.page-1)*t.perPage,r=e?.length||0;return e=e?.slice(n,n+t.perPage),{data:e,paginationInfo:{totalItems:r,totalPages:Math.ceil(r/t.perPage)}}}const Jo=e=>{let t=e.filterBy?.operators;return t&&Array.isArray(t)||(t=Object.keys(xl)),t.filter((e=>Object.keys(xl).includes(e)))},{DropdownMenuV2:Qo,DropdownMenuGroupV2:$o,DropdownMenuItemV2:el,DropdownMenuSeparatorV2:tl}=Vo(b.privateApis);function nl(e,t){return(0,g.useMemo)((()=>e.some((e=>e.supportsBulk&&e.isEligible(t)))),[e,t])}function rl({action:e,selectedItems:t,setActionWithModal:n,onMenuOpenChange:r}){const a=(0,g.useMemo)((()=>t.filter((t=>e.isEligible(t)))),[e,t]),{RenderModal:s,hideModalHeader:i}=e,o=(0,g.useCallback)((()=>{n(void 0)}),[n]);return(0,l.createElement)(b.Modal,{title:!i&&e.label,__experimentalHideHeader:!!i,onRequestClose:o,overlayClassName:"dataviews-action-modal"},(0,l.createElement)(s,{items:a,closeModal:o,onPerform:()=>r(!1)}))}function al({action:e,selectedItems:t,setActionWithModal:n}){const r=(0,g.useMemo)((()=>t.filter((t=>e.isEligible(t)))),[e,t]),a=!!e.RenderModal;return(0,l.createElement)(el,{key:e.id,disabled:0===r.length,hideOnClick:!a,onClick:async()=>{a?n(e):await e.callback(r)},suffix:r.length>0?r.length:void 0},e.label)}function sl({actions:e,selectedItems:t,setActionWithModal:n}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)($o,null,e.map((e=>(0,l.createElement)(al,{key:e.id,action:e,selectedItems:t,setActionWithModal:n})))),(0,l.createElement)(tl,null))}function il({data:e,actions:t,selection:n,onSelectionChange:r,getItemId:a}){const s=(0,g.useMemo)((()=>t.filter((e=>e.supportsBulk))),[t]),[i,o]=(0,g.useState)(!1),[c,u]=(0,g.useState)(),d=(0,g.useMemo)((()=>e.filter((e=>s.some((t=>t.isEligible(e)))))),[e,s]),m=d.length,p=n&&n.length===m,h=(0,g.useMemo)((()=>e.filter((e=>n.includes(a(e))))),[n,e,a]),f=(0,g.useMemo)((()=>h.some((e=>!d.includes(e)))),[h,d]);return(0,g.useEffect)((()=>{f&&r(h.filter((e=>d.some((t=>a(e)===a(t))))))}),[f,h,d,a,r]),0===s.length?null:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Qo,{open:i,onOpenChange:o,label:(0,E.__)("Bulk actions"),style:{minWidth:"240px"},trigger:(0,l.createElement)(b.Button,{className:"dataviews-bulk-edit-button",__next40pxDefaultSize:!0,variant:"tertiary",size:"compact"},n.length?(0,E.sprintf)((0,E._n)("Edit %d item","Edit %d items",n.length),n.length):(0,E.__)("Bulk edit"))},(0,l.createElement)(sl,{actions:s,setActionWithModal:u,selectedItems:h}),(0,l.createElement)($o,null,(0,l.createElement)(el,{disabled:p,hideOnClick:!1,onClick:()=>{r(d)},suffix:m},(0,E.__)("Select all")),(0,l.createElement)(el,{disabled:0===n.length,hideOnClick:!1,onClick:()=>{r([])}},(0,E.__)("Deselect")))),c&&(0,l.createElement)(rl,{action:c,selectedItems:h,setActionWithModal:u,onMenuOpenChange:o}))}const{DropdownMenuV2:ol,DropdownMenuGroupV2:ll,DropdownMenuItemV2:cl,DropdownMenuRadioItemV2:ul,DropdownMenuItemLabelV2:dl,DropdownMenuSeparatorV2:ml}=Vo(b.privateApis);function pl({children:e}){return g.Children.toArray(e).filter(Boolean).map(((e,t)=>(0,l.createElement)(g.Fragment,{key:t},t>0&&(0,l.createElement)(ml,null),e)))}const hl={asc:"↑",desc:"↓"},fl=(0,g.forwardRef)((function({field:e,view:t,onChangeView:n,onHide:r,setOpenedFilter:a},s){const i=!1!==e.enableHiding,o=!1!==e.enableSorting,c=t.sort?.field===e.id,u=Jo(e),d=!t.filters?.some((t=>e.id===t.field))&&e.type===El&&!!u.length&&!e.filterBy?.isPrimary;return o||i||d?(0,l.createElement)(ol,{align:"start",trigger:(0,l.createElement)(b.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:s,variant:"tertiary"},e.header,c&&(0,l.createElement)("span",{"aria-hidden":"true"},c&&hl[t.sort.direction])),style:{minWidth:"240px"}},(0,l.createElement)(pl,null,o&&(0,l.createElement)(ll,null,Object.entries(Cl).map((([r,a])=>{const s=c&&t.sort.direction===r,i=`${e.id}-${r}`;return(0,l.createElement)(ul,{key:i,name:"view-table-sorting",value:i,checked:s,onChange:()=>{n({...t,sort:{field:e.id,direction:r}})}},(0,l.createElement)(dl,null,a.label))}))),d&&(0,l.createElement)(ll,null,(0,l.createElement)(cl,{prefix:(0,l.createElement)(b.Icon,{icon:No}),onClick:()=>{a(e.id),n({...t,page:1,filters:[...t.filters||[],{field:e.id,value:void 0,operator:u[0]}]})}},(0,l.createElement)(dl,null,(0,E.__)("Add filter")))),i&&(0,l.createElement)(cl,{prefix:(0,l.createElement)(b.Icon,{icon:Fo}),onClick:()=>{r(e),n({...t,hiddenFields:t.hiddenFields.concat(e.id)})}},(0,l.createElement)(dl,null,(0,E.__)("Hide"))))):e.header}));function gl({selection:e,onSelectionChange:t,data:n,actions:r}){const a=(0,g.useMemo)((()=>n.filter((e=>r.some((t=>t.supportsBulk&&t.isEligible(e)))))),[n,r]),s=e.length===a.length;return(0,l.createElement)(b.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",__nextHasNoMarginBottom:!0,checked:s,indeterminate:!s&&e.length,onChange:()=>{t(s?[]:a)},label:s?(0,E.__)("Deselect all"):(0,E.__)("Select all")})}function yl({hasBulkActions:e,item:t,actions:n,id:r,visibleFields:a,primaryField:s,selection:i,getItemId:o,onSelectionChange:c,data:u}){const d=nl(n,t);return(0,l.createElement)("tr",{className:_()("dataviews-view-table__row",{"is-selected":d&&i.includes(r)})},e&&(0,l.createElement)("td",{className:"dataviews-view-table__checkbox-column",style:{width:20,minWidth:20}},(0,l.createElement)("div",{className:"dataviews-view-table__cell-content-wrapper"},(0,l.createElement)(Ro,{id:r,item:t,selection:i,onSelectionChange:c,getItemId:o,data:u,primaryField:s,disabled:!d}))),a.map((e=>(0,l.createElement)("td",{key:e.id,style:{width:e.width||void 0,minWidth:e.minWidth||void 0,maxWidth:e.maxWidth||void 0}},(0,l.createElement)("div",{className:_()("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__primary-field":s?.id===e.id})},e.render({item:t}))))),!!n?.length&&(0,l.createElement)("td",{className:"dataviews-view-table__actions-column"},(0,l.createElement)(qo,{item:t,actions:n})))}const vl=function({view:e,onChangeView:t,fields:n,actions:r,data:a,getItemId:s,isLoading:i=!1,deferredRendering:o,selection:c,onSelectionChange:u,setOpenedFilter:d}){const m=(0,g.useRef)(new Map),p=(0,g.useRef)(),[h,f]=(0,g.useState)(),y=function(e,t){return(0,g.useMemo)((()=>t.some((t=>e.some((e=>e.supportsBulk&&e.isEligible(t)))))),[e,t])}(r,a);(0,g.useEffect)((()=>{p.current&&(p.current.focus(),p.current=void 0)}));const v=(0,ie.useAsyncList)(a),b=(0,g.useId)();if(h)return p.current=h,void f();const w=e=>{const t=m.current.get(e.id),n=m.current.get(t.fallback);f(n?.node)},S=n.filter((t=>!e.hiddenFields.includes(t.id)&&![e.layout.mediaField].includes(t.id))),x=o?v:a,C=!!x?.length,k={asc:"ascending",desc:"descending"},T=n.find((t=>t.id===e.layout.primaryField));return(0,l.createElement)(g.Fragment,null,(0,l.createElement)("table",{className:"dataviews-view-table","aria-busy":i,"aria-describedby":b},(0,l.createElement)("thead",null,(0,l.createElement)("tr",{className:"dataviews-view-table__row"},y&&(0,l.createElement)("th",{className:"dataviews-view-table__checkbox-column",style:{width:20,minWidth:20},"data-field-id":"selection",scope:"col"},(0,l.createElement)(gl,{selection:c,onSelectionChange:u,data:a,actions:r})),S.map(((n,r)=>(0,l.createElement)("th",{key:n.id,style:{width:n.width||void 0,minWidth:n.minWidth||void 0,maxWidth:n.maxWidth||void 0},"data-field-id":n.id,"aria-sort":e.sort?.field===n.id&&k[e.sort.direction],scope:"col"},(0,l.createElement)(fl,{ref:e=>{e?m.current.set(n.id,{node:e,fallback:S[r>0?r-1:1]?.id}):m.current.delete(n.id)},field:n,view:e,onChangeView:t,onHide:w,setOpenedFilter:d})))),!!r?.length&&(0,l.createElement)("th",{"data-field-id":"actions",className:"dataviews-view-table__actions-column"},(0,l.createElement)("span",{className:"dataviews-view-table-header"},(0,E.__)("Actions"))))),(0,l.createElement)("tbody",null,C&&x.map(((e,t)=>(0,l.createElement)(yl,{key:s(e),item:e,hasBulkActions:y,actions:r,id:s(e)||t,visibleFields:S,primaryField:T,selection:c,getItemId:s,onSelectionChange:u,data:a}))))),(0,l.createElement)("div",{className:_()({"dataviews-loading":i,"dataviews-no-results":!C&&!i}),id:b},!C&&(0,l.createElement)("p",null,i?(0,E.__)("Loading…"):(0,E.__)("No results"))))};function _l({selection:e,data:t,onSelectionChange:n,getItemId:r,item:a,actions:s,mediaField:i,primaryField:o,visibleFields:c}){const[u,d]=(0,g.useState)(!1),m=nl(s,a),p=r(a),h=e.includes(p);return(0,l.createElement)(b.__experimentalVStack,{spacing:0,key:p,className:_()("dataviews-view-grid__card",{"is-selected":m&&h,"has-no-pointer-events":u}),onMouseDown:a=>{m&&(a.ctrlKey||a.metaKey)&&(d(!0),n(h?t.filter((t=>{const n=r?.(t);return n!==p&&e.includes(n)})):t.filter((t=>{const n=r?.(t);return n===p||e.includes(n)}))))},onClick:()=>{u&&d(!1)}},(0,l.createElement)("div",{className:"dataviews-view-grid__media"},i?.render({item:a})),(0,l.createElement)(b.__experimentalHStack,{justify:"space-between",className:"dataviews-view-grid__title-actions"},(0,l.createElement)(Ro,{id:p,item:a,selection:e,onSelectionChange:n,getItemId:r,data:t,primaryField:o,disabled:!m}),(0,l.createElement)(b.__experimentalHStack,{className:"dataviews-view-grid__primary-field"},o?.render({item:a})),(0,l.createElement)(qo,{item:a,actions:s,isCompact:!0})),(0,l.createElement)(b.__experimentalVStack,{className:"dataviews-view-grid__fields",spacing:3},c.map((e=>{const t=e.render({item:a});return t?(0,l.createElement)(b.__experimentalVStack,{className:"dataviews-view-grid__field",key:e.id,spacing:1},(0,l.createElement)(b.Tooltip,{text:e.header,placement:"left"},(0,l.createElement)("div",{className:"dataviews-view-grid__field-value"},t))):null}))))}const bl=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));const El="enumeration",wl="in",Sl="notIn",xl={[wl]:{key:"in-filter",label:(0,E.__)("Is")},[Sl]:{key:"not-in-filter",label:(0,E.__)("Is not")}},Cl={asc:{label:(0,E.__)("Sort ascending")},desc:{label:(0,E.__)("Sort descending")}},kl="table",Tl="grid",Pl=[{type:kl,label:(0,E.__)("Table"),component:vl,icon:Mo},{type:Tl,label:(0,E.__)("Grid"),component:function({data:e,fields:t,view:n,actions:r,isLoading:a,getItemId:s,deferredRendering:i,selection:o,onSelectionChange:c}){const u=t.find((e=>e.id===n.layout.mediaField)),d=t.find((e=>e.id===n.layout.primaryField)),m=t.filter((e=>!n.hiddenFields.includes(e.id)&&![n.layout.mediaField,n.layout.primaryField].includes(e.id))),p=(0,ie.useAsyncList)(e,{step:3}),h=i?p:e,f=!!h?.length;return(0,l.createElement)(l.Fragment,null,f&&(0,l.createElement)(b.__experimentalGrid,{gap:6,columns:2,alignment:"top",className:"dataviews-view-grid","aria-busy":a},h.map((t=>(0,l.createElement)(_l,{key:s(t),selection:o,data:e,onSelectionChange:c,getItemId:s,item:t,actions:r,mediaField:u,primaryField:d,visibleFields:m})))),!f&&(0,l.createElement)("div",{className:_()({"dataviews-loading":a,"dataviews-no-results":!a})},(0,l.createElement)("p",null,a?(0,E.__)("Loading…"):(0,E.__)("No results"))))},icon:za},{type:"list",label:(0,E.__)("List"),component:function({view:e,fields:t,data:n,isLoading:r,getItemId:a,onSelectionChange:s,onDetailsChange:i,selection:o,deferredRendering:c}){const u=(0,ie.useAsyncList)(n,{step:3}),d=c?u:n,m=t.find((t=>t.id===e.layout.mediaField)),p=t.find((t=>t.id===e.layout.primaryField)),h=t.filter((t=>!e.hiddenFields.includes(t.id)&&![e.layout.primaryField,e.layout.mediaField].includes(t.id))),f=e=>t=>{const{keyCode:n}=t;[wr.ENTER,wr.SPACE].includes(n)&&s([e])},g=d?.length;return g?(0,l.createElement)("ul",{className:"dataviews-view-list"},d.map((e=>(0,l.createElement)("li",{key:a(e),className:_()({"is-selected":o.includes(e.id)})},(0,l.createElement)(b.__experimentalHStack,{className:"dataviews-view-list__item-wrapper"},(0,l.createElement)("div",{role:"button",tabIndex:0,"aria-pressed":o.includes(e.id),onKeyDown:f(e),className:"dataviews-view-list__item",onClick:()=>s([e])},(0,l.createElement)(b.__experimentalHStack,{spacing:3,justify:"start",alignment:"flex-start"},(0,l.createElement)("div",{className:"dataviews-view-list__media-wrapper"},m?.render({item:e})||(0,l.createElement)("div",{className:"dataviews-view-list__media-placeholder"})),(0,l.createElement)(b.__experimentalVStack,{spacing:1},(0,l.createElement)("span",{className:"dataviews-view-list__primary-field"},p?.render({item:e})),(0,l.createElement)("div",{className:"dataviews-view-list__fields"},h.map((t=>(0,l.createElement)("span",{key:t.id,className:"dataviews-view-list__field"},t.render({item:e})))))))),i&&(0,l.createElement)(b.Button,{className:"dataviews-view-list__details-button",onClick:()=>i([e]),icon:bl,label:(0,E.__)("View details"),size:"compact"})))))):(0,l.createElement)("div",{className:_()({"dataviews-loading":r,"dataviews-no-results":!g&&!r})},!g&&(0,l.createElement)("p",null,r?(0,E.__)("Loading…"):(0,E.__)("No results")))},icon:(0,E.isRTL)()?Ao:Oo}],{useLocation:Il}=Xe(gt.privateApis);function Ml({title:e,slug:t,customViewId:n,type:r,icon:a,isActive:s,isCustom:i,suffix:o}){const{params:{path:c,layout:u}}=Il(),d=a||Pl.find((e=>e.type===r)).icon,m=Et({path:c,layout:u,activeView:"true"===i?n:t,isCustom:i});return(0,l.createElement)(b.__experimentalHStack,{justify:"flex-start",className:_()("edit-site-sidebar-dataviews-dataview-item",{"is-selected":s})},(0,l.createElement)(vr,{icon:d,...m,"aria-current":s?"true":void 0},e),o)}const Al=[];function Ol({template:e,isActive:t}){const{text:n,icon:r}=Bs(e.type,e.id);return(0,l.createElement)(Ml,{key:n,slug:n,title:n,icon:r,isActive:t,isCustom:"false"})}function Nl({activeView:e,postType:t,title:n}){const{records:r}=(0,ye.useEntityRecords)("postType",t,{per_page:-1}),a=(0,g.useMemo)((()=>{var e;const t=r?.reduce(((e,t)=>{const n=t.author_text;return n&&!e[n]&&(e[n]=t),e}),{});return null!==(e=t&&Object.values(t))&&void 0!==e?e:Al}),[r]);return(0,l.createElement)(b.__experimentalItemGroup,null,(0,l.createElement)(Ml,{slug:"all",title:n,icon:lr,isActive:"all"===e,isCustom:"false"}),a.map((t=>(0,l.createElement)(Ol,{key:t.author_text,template:t,isActive:e===t.author_text}))))}const Fl={[Ct]:{title:(0,E.__)("Manage templates"),description:(0,E.__)("Create new templates, or reset any customizations made to the templates supplied by your theme."),contentTitle:(0,E.__)("All templates")},[kt]:{title:(0,E.__)("Manage template parts"),description:(0,E.__)("Create new template parts, or reset any customizations made to the template parts supplied by your theme."),backPath:"/patterns",contentTitle:(0,E.__)("All template parts")}},{useLocation:Rl}=Xe(gt.privateApis);function Dl(){const{params:{postType:e}}=(0,b.__experimentalUseNavigator)(),{params:{didAccessPatternsPage:t,activeView:n="all"}}=Rl(),r=(0,m.useSelect)((e=>!!e(tr).getSettings().supportsTemplatePartsMode),[]);return(0,l.createElement)(hr,{isRoot:r&&!t,title:Fl[e].title,description:Fl[e].description,backPath:Fl[e].backPath,content:(0,l.createElement)(Nl,{activeView:n,postType:e,title:Fl[e].contentTitle})})}function Vl({className:e="edit-site-save-button__button",variant:t="primary",showTooltip:n=!0,defaultLabel:r,icon:a,__next40pxDefaultSize:s=!1}){const{isDirty:i,isSaving:o,isSaveViewOpen:c,previewingThemeName:u}=(0,m.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,isSavingEntityRecord:n,isResolving:r}=e(ye.store),a=t(),{isSaveViewOpened:s}=e(tr),i=r("activateTheme"),o=_t();return{isDirty:a.length>0,isSaving:a.some((e=>n(e.kind,e.name,e.key)))||i,isSaveViewOpen:s(),previewingThemeName:o?e(ye.store).getTheme(o)?.name?.rendered:void 0}}),[]),{setIsSaveViewOpened:d}=(0,m.useDispatch)(tr),p=vt()||i,h=o||!p,f=vt()?o?(0,E.sprintf)((0,E.__)("Activating %s"),u):h?(0,E.__)("Saved"):i?(0,E.sprintf)((0,E.__)("Activate %s & Save"),u):(0,E.sprintf)((0,E.__)("Activate %s"),u):o?(0,E.__)("Saving"):h?(0,E.__)("Saved"):r||(0,E.__)("Save");return(0,l.createElement)(b.Button,{variant:t,className:e,"aria-disabled":h,"aria-expanded":c,isBusy:o,onClick:h?void 0:()=>d(!0),label:f,shortcut:h?void 0:wr.displayShortcut.primary("s"),showTooltip:n,icon:a,__next40pxDefaultSize:s,size:"compact"},f)}const{useLocation:Ll}=Xe(gt.privateApis),Bl=[{kind:"postType",name:xt}];function zl(){const e="site-edit-save-notice",{params:t}=Ll(),{__unstableMarkLastChangeAsPersistent:n}=(0,m.useDispatch)(fe.store),{createSuccessNotice:r,createErrorNotice:a,removeNotice:s}=(0,m.useDispatch)(ge.store),{dirtyCurrentEntity:i,countUnsavedChanges:o,isDirty:c,isSaving:u}=(0,m.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:n,isSavingEntityRecord:r}=e(ye.store),a=n();let s=null;return 1===a.length&&(t.path?.includes("wp_global_styles")?s=a.find((e=>"globalStyles"===e.name)):t.postId&&(s=a.find((e=>e.name===t.postType&&String(e.key)===t.postId)))),{dirtyCurrentEntity:s,isDirty:a.length>0,isSaving:a.some((e=>r(e.kind,e.name,e.key))),countUnsavedChanges:a.length}}),[t.path,t.postType,t.postId]),{editEntityRecord:d,saveEditedEntityRecord:p,__experimentalSaveSpecifiedEntityEdits:h}=(0,m.useDispatch)(ye.store),f=u||!c&&!vt();let g=i?(0,E.__)("Save"):(0,E.sprintf)((0,E._n)("Review %d change…","Review %d changes…",o),o);u&&(g=(0,E.__)("Saving"));const{homeUrl:y}=(0,m.useSelect)((e=>{const{getUnstableBase:t}=e(ye.store);return{homeUrl:t()?.home}}),[]);return(0,l.createElement)(b.__experimentalHStack,{className:"edit-site-save-hub",alignment:"right",spacing:4},i?(0,l.createElement)(b.Button,{variant:"primary",onClick:async()=>{if(!i)return;s(e);const{kind:t,name:o,key:l,property:c}=i;try{"root"===i.kind&&"site"===o?await h("root","site",void 0,[c]):(Bl.some((e=>e.kind===t&&e.name===o))&&d(t,o,l,{status:"publish"}),await p(t,o,l)),n(),r((0,E.__)("Site updated."),{type:"snackbar",actions:[{label:(0,E.__)("View site"),url:y}],id:e})}catch(e){a(`${(0,E.__)("Saving failed.")} ${e}`)}},isBusy:u,disabled:u,"aria-disabled":u,className:"edit-site-save-hub__button",__next40pxDefaultSize:!0},g):(0,l.createElement)(Vl,{className:"edit-site-save-hub__button",variant:f?null:"primary",showTooltip:!1,icon:f&&!u?S:null,defaultLabel:g,__next40pxDefaultSize:!0}))}function Hl({onSave:e,onClose:t}){const[n,r]=(0,g.useState)(!1),[a,s]=(0,g.useState)(""),{saveEntityRecord:i}=(0,m.useDispatch)(ye.store),{createErrorNotice:o,createSuccessNotice:c}=(0,m.useDispatch)(ge.store);return(0,l.createElement)(b.Modal,{title:(0,E.__)("Draft a new page"),onRequestClose:t},(0,l.createElement)("form",{onSubmit:async function(t){if(t.preventDefault(),!n){r(!0);try{const t=await i("postType","page",{status:"draft",title:a,slug:a||(0,E.__)("No title")},{throwOnError:!0});e(t),c((0,E.sprintf)((0,E.__)('"%s" successfully created.'),t.title?.rendered||a),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,E.__)("An error occurred while creating the page.");o(t,{type:"snackbar"})}finally{r(!1)}}}},(0,l.createElement)(b.__experimentalVStack,{spacing:3},(0,l.createElement)(b.TextControl,{label:(0,E.__)("Page title"),onChange:s,placeholder:(0,E.__)("No title"),value:a}),(0,l.createElement)(b.__experimentalHStack,{spacing:2,justify:"end"},(0,l.createElement)(b.Button,{variant:"tertiary",onClick:t},(0,E.__)("Cancel")),(0,l.createElement)(b.Button,{variant:"primary",type:"submit",isBusy:n,"aria-disabled":n},(0,E.__)("Create draft"))))))}const{useHistory:Gl}=Xe(gt.privateApis),Ul=({postType:e="page",postId:t,...n})=>{const r=Et({postType:e,postId:t},{backPath:"/page"});return(0,l.createElement)(vr,{...r,...n})};function Wl(){const e=(0,ie.useViewportMatch)("medium","<"),{records:t,isResolving:n}=(0,ye.useEntityRecords)("postType","page",{status:"any",per_page:-1}),{records:r,isResolving:a}=(0,ye.useEntityRecords)("postType",Ct,{per_page:-1}),s=r?.filter((({slug:e})=>["404","search"].includes(e))),i=r?.find((e=>"front-page"===e.slug))||r?.find((e=>"home"===e.slug))||r?.find((e=>"index"===e.slug)),o=t?.concat(s,[i]),{frontPage:c,postsPage:u}=(0,m.useSelect)((e=>{const{getEntityRecord:t}=e(ye.store),n=t("root","site");return{frontPage:n?.page_on_front,postsPage:n?.page_for_posts}}),[]),d=c===u,p=t&&[...t];if(!d&&p?.length){const e=p.findIndex((e=>e.id===c)),t=p.splice(e,1);p?.splice(0,0,...t);const n=p.findIndex((e=>e.id===u)),r=p.splice(n,1);p.splice(1,0,...r)}const[h,f]=(0,g.useState)(!1),y=Gl(),v=e=>{let t=or;const n=u&&u===e?(r?.find((e=>"home"===e.slug))||r?.find((e=>"index"===e.slug)))?.id:null;switch(e){case c:t=Na;break;case u:t=Fa}return{icon:t,postType:n?Ct:"page",postId:n||e}},_=Et({path:"/pages"});return(0,l.createElement)(l.Fragment,null,h&&(0,l.createElement)(Hl,{onSave:({type:e,id:t})=>{y.push({postId:t,postType:e,canvas:"edit"}),f(!1)},onClose:()=>f(!1)}),(0,l.createElement)(hr,{title:(0,E.__)("Pages"),description:(0,E.__)("Browse and manage pages."),actions:(0,l.createElement)(mr,{icon:Za,label:(0,E.__)("Draft a new page"),onClick:()=>f(!0)}),content:(0,l.createElement)(l.Fragment,null,(n||a)&&(0,l.createElement)(b.__experimentalItemGroup,null,(0,l.createElement)(b.__experimentalItem,null,(0,E.__)("Loading pages…"))),!(n||a)&&(0,l.createElement)(b.__experimentalItemGroup,null,!o?.length&&(0,l.createElement)(b.__experimentalItem,null,(0,E.__)("No page found")),d&&i&&(0,l.createElement)(Ul,{postType:Ct,postId:i.id,key:i.id,icon:Na,withChevron:!0},(0,l.createElement)(b.__experimentalTruncate,{numberOfLines:1},(0,en.decodeEntities)(i.title?.rendered||(0,E.__)("(no title)")))),p?.map((({id:e,title:t})=>(0,l.createElement)(Ul,{...v(e),key:e,withChevron:!0},(0,l.createElement)(b.__experimentalTruncate,{numberOfLines:1},(0,en.decodeEntities)(t?.rendered||(0,E.__)("(no title)")))))))),footer:(0,l.createElement)(b.__experimentalVStack,{spacing:0},s?.map((e=>(0,l.createElement)(Ul,{postType:Ct,postId:e.id,key:e.id,icon:lr,withChevron:!0},(0,l.createElement)(b.__experimentalTruncate,{numberOfLines:1},(0,en.decodeEntities)(e.title?.rendered||(0,E.__)("(no title)")))))),!e&&(0,l.createElement)(vr,{className:"edit-site-sidebar-navigation-screen-pages__see-all",..._},(0,E.__)("Manage all pages")))}))}const jl=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"}),(0,l.createElement)(w.Path,{d:"M16 2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2ZM6 3.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z"}),(0,l.createElement)(w.Path,{d:"M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"})),Zl=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M8 2H6a2 2 0 0 0-2 2v2.4h1.5V4a.5.5 0 0 1 .5-.5h2V2ZM4 13.6V16a2 2 0 0 0 2 2h2v-1.5H6a.5.5 0 0 1-.5-.5v-2.4H4Zm0-1.2h1.5V7.6H4v4.8ZM9 2v1.5h4V2H9Zm5 0v1.5h2a.5.5 0 0 1 .5.5v2.4H18V4a2 2 0 0 0-2-2h-2Zm4 5.6h-1.5v4.8H18V7.6Zm0 6h-1.5V16a.5.5 0 0 1-.5.5h-2V18h2a2 2 0 0 0 2-2v-2.4ZM13 18v-1.5H9V18h4ZM7 7.25h8v-1.5H7v1.5Zm0 3.25h6V9H7v1.5ZM21.75 19V6h-1.5v13c0 .69-.56 1.25-1.25 1.25H8v1.5h11A2.75 2.75 0 0 0 21.75 19Z"})),ql=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})),Yl={[Vt]:{primaryField:"title"},[Dt]:{mediaField:"featured-image",primaryField:"title"},[Lt]:{primaryField:"title",mediaField:"featured-image"}},Kl={type:Vt,search:"",filters:[],page:1,perPage:20,sort:{field:"date",direction:"desc"},hiddenFields:["date","featured-image"],layout:{...Yl[Vt]}},Xl={page:[{title:(0,E.__)("All pages"),slug:"all",icon:jl,view:Kl},{title:(0,E.__)("Drafts"),slug:"drafts",icon:Zl,view:{...Kl,filters:[{field:"status",operator:zt,value:"draft"}]}},{title:(0,E.__)("Trash"),slug:"trash",icon:ql,view:{...Kl,filters:[{field:"status",operator:zt,value:"trash"}]}}]},{useHistory:Jl,useLocation:Ql}=Xe(gt.privateApis);function $l({type:e,setIsAdding:t}){const{params:{path:n}}=Ql(),r=Jl(),{saveEntityRecord:a}=(0,m.useDispatch)(ye.store),[s,i]=(0,g.useState)(""),[o,c]=(0,g.useState)(!1);return(0,l.createElement)("form",{onSubmit:async i=>{i.preventDefault(),c(!0);const{getEntityRecords:o}=(0,m.resolveSelect)(ye.store);let l;const u=await o("taxonomy","wp_dataviews_type",{slug:e});if(u&&u.length>0)l=u[0].id;else{const t=await a("taxonomy","wp_dataviews_type",{name:e});t&&t.id&&(l=t.id)}const d=await a("postType","wp_dataviews",{title:s,status:"publish",wp_dataviews_type:l,content:JSON.stringify(Xl[e][0].view)});r.push({path:n,activeView:d.id,isCustom:"true"}),c(!1),t(!1)}},(0,l.createElement)(b.__experimentalVStack,{spacing:"5"},(0,l.createElement)(b.TextControl,{__nextHasNoMarginBottom:!0,label:(0,E.__)("Name"),value:s,onChange:i,placeholder:(0,E.__)("My view"),className:"patterns-create-modal__name-input"}),(0,l.createElement)(b.__experimentalHStack,{justify:"right"},(0,l.createElement)(b.Button,{variant:"tertiary",onClick:()=>{t(!1)}},(0,E.__)("Cancel")),(0,l.createElement)(b.Button,{variant:"primary",type:"submit","aria-disabled":!s||o,isBusy:o},(0,E.__)("Create")))))}function ec({type:e}){const[t,n]=(0,g.useState)(!1);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(vr,{icon:Za,onClick:()=>{n(!0)},className:"dataviews__siderbar-content-add-new-item"},(0,E.__)("New view")),t&&(0,l.createElement)(b.Modal,{title:(0,E.__)("Add new view"),onRequestClose:()=>{n(!1)}},(0,l.createElement)($l,{type:e,setIsAdding:n})))}const{useHistory:tc,useLocation:nc}=Xe(gt.privateApis),rc=[];function ac({dataviewId:e,currentTitle:t,setIsRenaming:n}){const{editEntityRecord:r}=(0,m.useDispatch)(ye.store),[a,s]=(0,g.useState)(t);return(0,l.createElement)("form",{onSubmit:async t=>{t.preventDefault(),await r("postType","wp_dataviews",e,{title:a}),n(!1)}},(0,l.createElement)(b.__experimentalVStack,{spacing:"5"},(0,l.createElement)(b.TextControl,{__nextHasNoMarginBottom:!0,label:(0,E.__)("Name"),value:a,onChange:s,placeholder:(0,E.__)("My view"),className:"patterns-create-modal__name-input"}),(0,l.createElement)(b.__experimentalHStack,{justify:"right"},(0,l.createElement)(b.Button,{variant:"tertiary",onClick:()=>{n(!1)}},(0,E.__)("Cancel")),(0,l.createElement)(b.Button,{variant:"primary",type:"submit","aria-disabled":!a},(0,E.__)("Rename")))))}function sc({dataviewId:e,isActive:t}){const{params:{path:n}}=nc(),r=tc(),{dataview:a}=(0,m.useSelect)((t=>{const{getEditedEntityRecord:n}=t(ye.store);return{dataview:n("postType","wp_dataviews",e)}}),[e]),{deleteEntityRecord:s}=(0,m.useDispatch)(ye.store),i=(0,g.useMemo)((()=>JSON.parse(a.content).type),[a.content]),[o,c]=(0,g.useState)(!1);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Ml,{title:a.title,type:i,isActive:t,isCustom:"true",customViewId:e,suffix:(0,l.createElement)(b.DropdownMenu,{icon:ue,label:(0,E.__)("Actions"),className:"edit-site-sidebar-dataviews-dataview-item__dropdown-menu",toggleProps:{style:{color:"inherit"},size:"small"}},(({onClose:e})=>(0,l.createElement)(b.MenuGroup,null,(0,l.createElement)(b.MenuItem,{onClick:()=>{c(!0),e()}},(0,E.__)("Rename")),(0,l.createElement)(b.MenuItem,{onClick:async()=>{await s("postType","wp_dataviews",a.id,{force:!0}),t&&r.replace({path:n}),e()},isDestructive:!0},(0,E.__)("Delete")))))}),o&&(0,l.createElement)(b.Modal,{title:(0,E.__)("Rename view"),onRequestClose:()=>{c(!1)}},(0,l.createElement)(ac,{dataviewId:e,setIsRenaming:c,currentTitle:a.title})))}function ic({type:e,activeView:t,isCustom:n}){const r=function(e){return(0,m.useSelect)((t=>{const{getEntityRecords:n}=t(ye.store),r=n("taxonomy","wp_dataviews_type",{slug:e});if(!r||0===r.length)return rc;return n("postType","wp_dataviews",{wp_dataviews_type:r[0].id,orderby:"date",order:"asc"})||rc}))}(e);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-dataviews__group-header"},(0,l.createElement)(b.__experimentalHeading,{level:2},(0,E.__)("Custom Views"))),(0,l.createElement)(b.__experimentalItemGroup,null,r.map((e=>(0,l.createElement)(sc,{key:e.id,dataviewId:e.id,isActive:"true"===n&&Number(t)===e.id}))),(0,l.createElement)(ec,{type:e})))}const{useLocation:oc}=Xe(gt.privateApis),lc={"/pages":"page"};function cc(){const{params:{path:e,activeView:t="all",isCustom:n="false"}}=oc();if(!e||!lc[e])return null;const r=lc[e];return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.__experimentalItemGroup,null,Xl[r].map((e=>(0,l.createElement)(Ml,{key:e.slug,slug:e.slug,title:e.title,icon:e.icon,type:e.view.type,isActive:"false"===n&&e.slug===t,isCustom:"false"})))),window?.__experimentalAdminViews&&(0,l.createElement)(ic,{activeView:t,type:r,isCustom:"true"}))}const uc=window.wp.dom,dc=window.wp.escapeHtml,mc=window.wp.wordcount;function pc({status:e,date:t,short:n}){const r=(0,_a.humanTimeDiff)(t);let a=e;switch(e){case"publish":a=t?(0,g.createInterpolateElement)((0,E.sprintf)((0,E.__)("Published <time>%s</time>"),r),{time:(0,l.createElement)("time",{dateTime:t})}):(0,E.__)("Published");break;case"future":const e=(0,_a.dateI18n)(n?"M j":"F j",(0,_a.getDate)(t));a=t?(0,g.createInterpolateElement)((0,E.sprintf)((0,E.__)("Scheduled: <time>%s</time>"),e),{time:(0,l.createElement)("time",{dateTime:t})}):(0,E.__)("Scheduled");break;case"draft":a=(0,E.__)("Draft");break;case"pending":a=(0,E.__)("Pending");break;case"private":a=(0,E.__)("Private");break;case"protected":a=(0,E.__)("Password protected")}return(0,l.createElement)("div",{className:_()("edit-site-sidebar-navigation-screen-page__status",{[`has-status has-${e}-status`]:!!e})},a)}const hc=189;function fc({id:e}){const{record:t}=(0,ye.useEntityRecord)("postType","page",e),{parentTitle:n,templateTitle:r,isPostsPage:a}=(0,m.useSelect)((e=>{const{getEditedPostId:n}=Xe(e(tr)),r=e(ye.store).getEntityRecord("postType",Ct,n()),a=r?.title?.rendered,s=t?.parent?e(ye.store).getEntityRecord("postType","page",t.parent,{_fields:["title"]})?.title?.rendered:null,{getEntityRecord:i}=e(ye.store),o=i("root","site");return{parentTitle:s,templateTitle:a,isPostsPage:t?.id===o?.page_for_posts}}),[t?.parent,t?.id]);return(0,l.createElement)(xa,{spacing:5,title:(0,E.__)("Details")},function(e){if(!e)return[];const t=[{label:(0,E.__)("Status"),value:(0,l.createElement)(pc,{status:e?.password?"protected":e.status,date:e?.date,short:!0})},{label:(0,E.__)("Slug"),value:(0,l.createElement)(b.__experimentalTruncate,{numberOfLines:1},(0,yt.safeDecodeURIComponent)(e.slug||e.generated_slug))}];e?.templateTitle&&t.push({label:(0,E.__)("Template"),value:(0,en.decodeEntities)(e.templateTitle)}),e?.parentTitle&&t.push({label:(0,E.__)("Parent"),value:(0,en.decodeEntities)(e.parentTitle||(0,E.__)("(no title)"))});const n=(0,E._x)("words","Word count type. Do not translate!"),r=e?.content?.rendered?(0,mc.count)(e.content.rendered,n):0,a=Math.round(r/hc);return r&&!e?.isPostsPage&&t.push({label:(0,E.__)("Words"),value:r.toLocaleString()||(0,E.__)("Unknown")},{label:(0,E.__)("Time to read"),value:a>1?(0,E.sprintf)((0,E.__)("%s mins"),a.toLocaleString()):(0,E.__)("< 1 min")}),t}({parentTitle:n,templateTitle:r,isPostsPage:a,...t}).map((({label:e,value:t})=>(0,l.createElement)(wa,{key:e},(0,l.createElement)(Ea,null,e),(0,l.createElement)(Sa,null,t)))))}function gc({postId:e,onRemove:t}){const{createSuccessNotice:n,createErrorNotice:r}=(0,m.useDispatch)(ge.store),{deleteEntityRecord:a}=(0,m.useDispatch)(ye.store),s=(0,m.useSelect)((t=>t(ye.store).getEntityRecord("postType","page",e)),[e]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.MenuItem,{onClick:()=>async function(){try{await a("postType","page",e,{},{throwOnError:!0}),n((0,E.sprintf)((0,E.__)('"%s" moved to the Trash.'),(0,en.decodeEntities)(s.title.rendered)),{type:"snackbar",id:"edit-site-page-trashed"}),t?.()}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,E.__)("An error occurred while moving the page to the trash.");r(t,{type:"snackbar"})}}(),isDestructive:!0,variant:"secondary"},(0,E.__)("Move to Trash")))}function yc({postId:e,toggleProps:t,onRemove:n}){return(0,l.createElement)(b.DropdownMenu,{icon:ue,label:(0,E.__)("Actions"),toggleProps:t},(()=>(0,l.createElement)(b.MenuGroup,null,(0,l.createElement)(gc,{postId:e,onRemove:n}))))}const{useHistory:vc}=Xe(gt.privateApis);function _c({backPath:e}){const{setCanvasMode:t}=Xe((0,m.useDispatch)(tr)),n=vc(),{params:{postId:r},goTo:a}=(0,b.__experimentalUseNavigator)(),{record:s,hasResolved:i}=(0,ye.useEntityRecord)("postType","page",r),{featuredMediaAltText:o,featuredMediaSourceUrl:c}=(0,m.useSelect)((e=>{const{getEntityRecord:t}=e(ye.store),n=s?.featured_media?t("postType","attachment",s?.featured_media):null;return{featuredMediaSourceUrl:n?.media_details.sizes?.medium?.source_url||n?.source_url,featuredMediaAltText:(0,dc.escapeAttribute)(n?.alt_text||n?.description?.raw||"")}}),[s]);(0,g.useEffect)((()=>{i&&!s&&n.push({path:"/page",postId:void 0,postType:void 0,canvas:"view"})}),[i,n]);const u=o?(0,en.decodeEntities)(o):(0,en.decodeEntities)(s?.title?.rendered||(0,E.__)("Featured image"));return s?(0,l.createElement)(hr,{backPath:e,title:(0,en.decodeEntities)(s?.title?.rendered||(0,E.__)("(no title)")),actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(yc,{postId:r,toggleProps:{as:mr},onRemove:()=>{a("/page")}}),(0,l.createElement)(mr,{onClick:()=>t("edit"),label:(0,E.__)("Edit"),icon:br})),meta:(0,l.createElement)(b.ExternalLink,{className:"edit-site-sidebar-navigation-screen__page-link",href:s.link},(0,yt.filterURLForDisplay)((0,yt.safeDecodeURIComponent)(s.link))),content:(0,l.createElement)(l.Fragment,null,!!c&&(0,l.createElement)(b.__experimentalVStack,{className:"edit-site-sidebar-navigation-screen-page__featured-image-wrapper",alignment:"left",spacing:2},(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-page__featured-image has-image"},(0,l.createElement)("img",{alt:u,src:c}))),!!s?.excerpt?.rendered&&(0,l.createElement)(b.__experimentalTruncate,{className:"edit-site-sidebar-navigation-screen-page__excerpt",numberOfLines:3},(0,uc.__unstableStripHTML)(s.excerpt.rendered)),(0,l.createElement)(fc,{id:r})),footer:s?.modified?(0,l.createElement)(Ca,{record:s}):null}):null}const{useLocation:bc}=Xe(gt.privateApis);function Ec({className:e,...t}){return(0,l.createElement)(b.__experimentalNavigatorScreen,{className:_()("edit-site-sidebar__screen-wrapper",e),...t})}function wc(){Zi();const e=(0,ie.useViewportMatch)("medium","<");return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Ec,{path:"/"},(0,l.createElement)(Oa,null)),(0,l.createElement)(Ec,{path:"/navigation"},(0,l.createElement)(To,null)),(0,l.createElement)(Ec,{path:"/navigation/:postType/:postId"},(0,l.createElement)(Eo,null)),(0,l.createElement)(Ec,{path:"/wp_global_styles"},(0,l.createElement)(Ia,null)),(0,l.createElement)(Ec,{path:"/page"},(0,l.createElement)(Wl,null)),(0,l.createElement)(Ec,{path:"/pages"},(0,l.createElement)(hr,{title:(0,E.__)("Manage pages"),content:(0,l.createElement)(cc,null),backPath:"/page"})),(0,l.createElement)(Ec,{path:"/page/:postId"},(0,l.createElement)(_c,null)),(0,l.createElement)(Ec,{path:"/:postType(wp_template)"},(0,l.createElement)(As,null)),!e&&(0,l.createElement)(Ec,{path:"/patterns"},(0,l.createElement)(Di,null)),(0,l.createElement)(Ec,{path:"/:postType(wp_template|wp_template_part)/all"},(0,l.createElement)(Dl,null)),(0,l.createElement)(Ec,{path:"/:postType(wp_template_part|wp_block)/:postId"},(0,l.createElement)(co,null)),(0,l.createElement)(Ec,{path:"/:postType(wp_template)/:postId"},(0,l.createElement)(qs,null)))}const Sc=(0,g.memo)((function(){const{params:e}=bc(),t=(0,g.useRef)(ji(e));return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.__experimentalNavigatorProvider,{className:"edit-site-sidebar__content",initialPath:t.current},(0,l.createElement)(wc,null)),(0,l.createElement)(zl,null))}));function xc({text:e,children:t}){const n=(0,ie.useCopyToClipboard)(e);return(0,l.createElement)(b.Button,{variant:"secondary",ref:n},t)}function Cc({message:e,error:t}){const n=[(0,l.createElement)(xc,{key:"copy-error",text:t.stack},(0,E.__)("Copy Error"))];return(0,l.createElement)(fe.Warning,{className:"editor-error-boundary",actions:n},e)}class kc extends g.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,pe.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){return this.state.error?(0,l.createElement)(Cc,{message:(0,E.__)("The editor has encountered an unexpected error."),error:this.state.error}):this.props.children}}const Tc=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})),Pc=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})),Ic=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})),Mc=[{keyCombination:{modifier:"primary",character:"b"},description:(0,E.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,E.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,E.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,E.__)("Remove a link.")},{keyCombination:{character:"[["},description:(0,E.__)("Insert a link to a post or page.")},{keyCombination:{modifier:"primary",character:"u"},description:(0,E.__)("Underline the selected text.")},{keyCombination:{modifier:"access",character:"d"},description:(0,E.__)("Strikethrough the selected text.")},{keyCombination:{modifier:"access",character:"x"},description:(0,E.__)("Make the selected text inline code.")},{keyCombination:{modifier:"access",character:"0"},description:(0,E.__)("Convert the current heading to a paragraph.")},{keyCombination:{modifier:"access",character:"1-6"},description:(0,E.__)("Convert the current paragraph or heading to a heading of level 1 to 6.")}];function Ac({keyCombination:e,forceAriaLabel:t}){const n=e.modifier?wr.displayShortcutList[e.modifier](e.character):e.character,r=e.modifier?wr.shortcutAriaLabel[e.modifier](e.character):e.character;return(0,l.createElement)("kbd",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":t||r},(Array.isArray(n)?n:[n]).map(((e,t)=>"+"===e?(0,l.createElement)(g.Fragment,{key:t},e):(0,l.createElement)("kbd",{key:t,className:"edit-site-keyboard-shortcut-help-modal__shortcut-key"},e))))}function Oc({description:e,keyCombination:t,aliases:n=[],ariaLabel:r}){return(0,l.createElement)(g.Fragment,null,(0,l.createElement)("div",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-description"},e),(0,l.createElement)("div",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-term"},(0,l.createElement)(Ac,{keyCombination:t,forceAriaLabel:r}),n.map(((e,t)=>(0,l.createElement)(Ac,{keyCombination:e,forceAriaLabel:r,key:t})))))}function Nc({name:e}){const{keyCombination:t,description:n,aliases:r}=(0,m.useSelect)((t=>{const{getShortcutKeyCombination:n,getShortcutDescription:r,getShortcutAliases:a}=t(nr.store);return{keyCombination:n(e),aliases:a(e),description:r(e)}}),[e]);return t?(0,l.createElement)(Oc,{keyCombination:t,description:n,aliases:r}):null}const Fc="edit-site/keyboard-shortcut-help",Rc=({shortcuts:e})=>(0,l.createElement)("ul",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-list",role:"list"},e.map(((e,t)=>(0,l.createElement)("li",{className:"edit-site-keyboard-shortcut-help-modal__shortcut",key:t},"string"==typeof e?(0,l.createElement)(Nc,{name:e}):(0,l.createElement)(Oc,{...e}))))),Dc=({title:e,shortcuts:t,className:n})=>(0,l.createElement)("section",{className:_()("edit-site-keyboard-shortcut-help-modal__section",n)},!!e&&(0,l.createElement)("h2",{className:"edit-site-keyboard-shortcut-help-modal__section-title"},e),(0,l.createElement)(Rc,{shortcuts:t})),Vc=({title:e,categoryName:t,additionalShortcuts:n=[]})=>{const r=(0,m.useSelect)((e=>e(nr.store).getCategoryShortcuts(t)),[t]);return(0,l.createElement)(Dc,{title:e,shortcuts:r.concat(n)})};function Lc(){const e=(0,m.useSelect)((e=>e(j).isModalActive(Fc))),{closeModal:t,openModal:n}=(0,m.useDispatch)(j),r=()=>e?t():n(Fc);return(0,nr.useShortcut)("core/edit-site/keyboard-shortcuts",r),e?(0,l.createElement)(b.Modal,{className:"edit-site-keyboard-shortcut-help-modal",title:(0,E.__)("Keyboard shortcuts"),onRequestClose:r},(0,l.createElement)(Dc,{className:"edit-site-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/edit-site/keyboard-shortcuts"]}),(0,l.createElement)(Vc,{title:(0,E.__)("Global shortcuts"),categoryName:"global"}),(0,l.createElement)(Vc,{title:(0,E.__)("Selection shortcuts"),categoryName:"selection"}),(0,l.createElement)(Vc,{title:(0,E.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,E.__)("Change the block type after adding a new paragraph."),ariaLabel:(0,E.__)("Forward-slash")}]}),(0,l.createElement)(Dc,{title:(0,E.__)("Text formatting"),shortcuts:Mc})):null}const{PreferencesModal:Bc}=Xe(y.privateApis),zc="edit-site/preferences";function Hc(){const e=(0,m.useSelect)((e=>e(j).isModalActive(zc))),{closeModal:t}=(0,m.useDispatch)(j);return e?(0,l.createElement)(Bc,{isActive:e,onClose:t}):null}const{Fill:Gc,Slot:Uc}=(0,b.createSlotFill)("EditSiteToolsMoreMenuGroup");Gc.Slot=({fillProps:e})=>(0,l.createElement)(Uc,{fillProps:e},(e=>e&&e.length>0));const Wc=Gc,jc=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})),Zc=window.wp.blob;function qc(){const{createErrorNotice:e}=(0,m.useDispatch)(ge.store);return(0,l.createElement)(b.MenuItem,{role:"menuitem",icon:jc,onClick:async function(){try{const e=await Xt()({path:"/wp-block-editor/v1/export",parse:!1,headers:{Accept:"application/zip"}}),t=await e.blob(),n=e.headers.get("content-disposition").match(/=(.+)\.zip/),r=n[1]?n[1]:"edit-site-export";(0,Zc.downloadBlob)(r+".zip",t,"application/zip")}catch(t){let n={};try{n=await t.json()}catch(e){}const r=n.message&&"unknown_error"!==n.code?n.message:(0,E.__)("An error occurred while creating the site export.");e(r,{type:"snackbar"})}},info:(0,E.__)("Download your theme with updated templates and styles.")},(0,E._x)("Export","site exporter menu item"))}function Yc(){const{toggle:e}=(0,m.useDispatch)(T.store);return(0,l.createElement)(b.MenuItem,{onClick:()=>e("core/edit-site","welcomeGuide")},(0,E.__)("Welcome Guide"))}function Kc(){const{createNotice:e}=(0,m.useDispatch)(ge.store),{getEditedPostId:t,getEditedPostType:n}=(0,m.useSelect)(tr),{getEditedEntityRecord:r}=(0,m.useSelect)(ye.store);const a=(0,ie.useCopyToClipboard)((function(){const e=r("postType",n(),t());return e?"function"==typeof e.content?e.content(e):e.blocks?(0,u.__unstableSerializeAndClean)(e.blocks):e.content?e.content:void 0:""}),(function(){e("info",(0,E.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}));return(0,l.createElement)(b.MenuItem,{ref:a},(0,E.__)("Copy all blocks"))}const Xc=[{value:"visual",label:(0,E.__)("Visual editor")},{value:"text",label:(0,E.__)("Code editor")}];const Jc=function(){const{shortcut:e,mode:t}=(0,m.useSelect)((e=>({shortcut:e(nr.store).getShortcutRepresentation("core/edit-site/toggle-mode"),mode:e(tr).getEditorMode()})),[]),{switchEditorMode:n}=(0,m.useDispatch)(tr),r=Xc.map((n=>n.value!==t?{...n,shortcut:e}:n));return(0,l.createElement)(b.MenuGroup,{label:(0,E.__)("Editor")},(0,l.createElement)(b.MenuItemsChoice,{choices:r,value:t,onSelect:n}))};function Qc({showIconLabels:e}){const{openModal:t}=(0,m.useDispatch)(j),{set:n}=(0,m.useDispatch)(T.store),r=(0,m.useSelect)((e=>e(ye.store).getCurrentTheme().is_block_theme),[]),{toggleDistractionFree:a}=(0,m.useDispatch)(tr),s=()=>{n("core","distractionFree",!1)};return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(de,{toggleProps:{showTooltip:!e,...e&&{variant:"tertiary"}}},(({onClose:e})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.MenuGroup,{label:(0,E._x)("View","noun")},(0,l.createElement)(T.PreferenceToggleMenuItem,{scope:"core",name:"fixedToolbar",onToggle:s,label:(0,E.__)("Top toolbar"),info:(0,E.__)("Access all block and document tools in a single place"),messageActivated:(0,E.__)("Top toolbar activated"),messageDeactivated:(0,E.__)("Top toolbar deactivated")}),(0,l.createElement)(T.PreferenceToggleMenuItem,{scope:"core",name:"distractionFree",label:(0,E.__)("Distraction free"),info:(0,E.__)("Write with calmness"),handleToggling:!1,onToggle:a,messageActivated:(0,E.__)("Distraction free mode activated"),messageDeactivated:(0,E.__)("Distraction free mode deactivated"),shortcut:wr.displayShortcut.primaryShift("\\")}),(0,l.createElement)(T.PreferenceToggleMenuItem,{scope:"core",name:"focusMode",label:(0,E.__)("Spotlight mode"),info:(0,E.__)("Focus on one block at a time"),messageActivated:(0,E.__)("Spotlight mode activated"),messageDeactivated:(0,E.__)("Spotlight mode deactivated")})),(0,l.createElement)(Jc,null),(0,l.createElement)(Q.Slot,{name:"core/edit-site/plugin-more-menu",label:(0,E.__)("Plugins"),as:b.MenuGroup,fillProps:{onClick:e}}),(0,l.createElement)(b.MenuGroup,{label:(0,E.__)("Tools")},r&&(0,l.createElement)(qc,null),(0,l.createElement)(b.MenuItem,{onClick:()=>t(Fc),shortcut:wr.displayShortcut.access("h")},(0,E.__)("Keyboard shortcuts")),(0,l.createElement)(Yc,null),(0,l.createElement)(Kc,null),(0,l.createElement)(b.MenuItem,{icon:Ic,role:"menuitem",href:(0,E.__)("https://wordpress.org/documentation/article/site-editor/"),target:"_blank",rel:"noopener noreferrer"},(0,E.__)("Help"),(0,l.createElement)(b.VisuallyHidden,{as:"span"},(0,E.__)("(opens in a new tab)"))),(0,l.createElement)(Wc.Slot,{fillProps:{onClose:e}})),(0,l.createElement)(b.MenuGroup,null,(0,l.createElement)(b.MenuItem,{onClick:()=>t(zc)},(0,E.__)("Preferences")))))),(0,l.createElement)(Lc,null),(0,l.createElement)(Hc,null))}const $c=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"m12 20-4.5-3.6-.9 1.2L12 22l5.5-4.4-.9-1.2L12 20zm0-16 4.5 3.6.9-1.2L12 2 6.5 6.4l.9 1.2L12 4z"})),{DocumentTools:eu}=Xe(y.privateApis);function tu({blockEditorMode:e,hasFixedToolbar:t,isDistractionFree:n}){const{isVisualMode:r}=(0,m.useSelect)((e=>{const{getEditorMode:t}=e(tr);return{isVisualMode:"visual"===t()}}),[]),{__unstableSetEditorMode:a}=(0,m.useDispatch)(fe.store),{setDeviceType:s}=(0,m.useDispatch)(y.store),i=(0,ie.useViewportMatch)("medium"),o=window?.__experimentalEnableZoomedOutView&&r,c="zoom-out"===e;return(0,l.createElement)(eu,{disableBlockTools:!r,listViewLabel:(0,E.__)("List View")},o&&i&&!n&&!t&&(0,l.createElement)(b.ToolbarItem,{as:b.Button,className:"edit-site-header-edit-mode__zoom-out-view-toggle",icon:$c,isPressed:c,label:(0,E.__)("Zoom-out View"),onClick:()=>{s("Desktop"),a(c?"edit":"zoom-out")},size:"compact"}))}const{PostViewLink:nu,PreviewDropdown:ru}=Xe(y.privateApis);function au(){const{templateType:e,isDistractionFree:t,blockEditorMode:n,blockSelectionStart:r,showIconLabels:a,editorCanvasView:s,hasFixedToolbar:i,isZoomOutMode:o}=(0,m.useSelect)((e=>{const{getEditedPostType:t}=e(tr),{getBlockSelectionStart:n,__unstableGetEditorMode:r}=e(fe.store),{get:a}=e(T.store),{getDeviceType:s}=e(y.store);return{deviceType:s(),templateType:t(),blockEditorMode:r(),blockSelectionStart:n(),showIconLabels:a("core","showIconLabels"),editorCanvasView:Xe(e(tr)).getEditorCanvasContainerView(),hasFixedToolbar:a("core","fixedToolbar"),isDistractionFree:a("core","distractionFree"),isZoomOutMode:"zoom-out"===r()}}),[]),c=(0,ie.useViewportMatch)("medium"),u=!o&&i&&c,d=(0,g.useRef)(),p=(0,ie.useReducedMotion)(),h=!function(){const e=(0,b.__experimentalUseSlotFills)(Kr);return!!e?.length}(),f=Ft.includes(e),v="zoom-out"===n,[w,S]=(0,g.useState)(!0),x=!!r;(0,g.useEffect)((()=>{r&&S(!1)}),[r]);const C={isDistractionFree:{y:"-50px"},isDistractionFreeHovering:{y:0},view:{y:0},edit:{y:0}},k={type:"tween",duration:p?0:.2,ease:"easeOut"};return(0,l.createElement)("div",{className:_()("edit-site-header-edit-mode",{"show-icon-labels":a})},h&&(0,l.createElement)(b.__unstableMotion.div,{className:"edit-site-header-edit-mode__start",variants:C,transition:k},(0,l.createElement)(tu,{blockEditorMode:n,isDistractionFree:t}),u&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:_()("selected-block-tools-wrapper",{"is-collapsed":w||!x})},(0,l.createElement)(fe.BlockToolbar,{hideDragHandle:!0})),(0,l.createElement)(b.Popover.Slot,{ref:d,name:"block-toolbar"}),x&&(0,l.createElement)(b.Button,{className:"edit-site-header-edit-mode__block-tools-toggle",icon:w?Tc:Pc,onClick:()=>{S((e=>!e))},label:w?(0,E.__)("Show block tools"):(0,E.__)("Hide block tools")}))),!t&&(0,l.createElement)("div",{className:_()("edit-site-header-edit-mode__center",{"is-collapsed":!w&&c})},h?(0,l.createElement)(y.DocumentBar,null):qr(s)),(0,l.createElement)("div",{className:"edit-site-header-edit-mode__end"},(0,l.createElement)(b.__unstableMotion.div,{className:"edit-site-header-edit-mode__actions",variants:C,transition:k},c&&(0,l.createElement)("div",{className:_()("edit-site-header-edit-mode__preview-options",{"is-zoomed-out":v})},(0,l.createElement)(ru,{disabled:f||!h})),(0,l.createElement)(nu,null),(0,l.createElement)(Vl,null),!t&&(0,l.createElement)(ne.Slot,{scope:"core/edit-site"}),(0,l.createElement)(Qc,{showIconLabels:a}))))}const su=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,l.createElement)(w.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"}));const iu=function({className:e}){const{isRequestingSite:t,siteIconUrl:n}=(0,m.useSelect)((e=>{const{getEntityRecord:t}=e(ye.store),n=t("root","__unstableBase",void 0);return{isRequestingSite:!n,siteIconUrl:n?.site_icon_url}}),[]);if(t&&!n)return(0,l.createElement)("div",{className:"edit-site-site-icon__image"});const r=n?(0,l.createElement)("img",{className:"edit-site-site-icon__image",alt:(0,E.__)("Site Icon"),src:n}):(0,l.createElement)(b.Icon,{className:"edit-site-site-icon__icon",icon:su,size:48});return(0,l.createElement)("div",{className:_()(e,"edit-site-site-icon")},r)},ou=(0,g.memo)((({isTransparent:e,className:t})=>{const{canvasMode:n,dashboardLink:r,homeUrl:a,siteTitle:s}=(0,m.useSelect)((e=>{const{getCanvasMode:t,getSettings:n}=Xe(e(tr)),{getSite:r,getUnstableBase:a}=e(ye.store);return{canvasMode:t(),dashboardLink:n().__experimentalDashboardLink||"index.php",homeUrl:a()?.home,siteTitle:r()?.title}}),[]),{open:i}=(0,m.useDispatch)(rr.store),o=(0,ie.useReducedMotion)(),{setCanvasMode:c}=Xe((0,m.useDispatch)(tr)),{clearSelectedBlock:u}=(0,m.useDispatch)(fe.store),{setDeviceType:d}=(0,m.useDispatch)(y.store),p="view"===n?{href:r,label:(0,E.__)("Go to the Dashboard")}:{href:r,role:"button",label:(0,E.__)("Open Navigation"),onClick:e=>{e.preventDefault(),"edit"===n&&(u(),d("Desktop"),c("view"))}};return(0,l.createElement)(b.__unstableMotion.div,{className:_()("edit-site-site-hub",t),variants:{isDistractionFree:{x:"-100%"},isDistractionFreeHovering:{x:0},view:{x:0},edit:{x:0}},initial:!1,transition:{type:"tween",duration:o?0:.3,ease:"easeOut"}},(0,l.createElement)(b.__experimentalHStack,{justify:"space-between",alignment:"center",className:"edit-site-site-hub__container"},(0,l.createElement)(b.__experimentalHStack,{justify:"flex-start",className:"edit-site-site-hub__text-content",spacing:"0"},(0,l.createElement)(b.__unstableMotion.div,{className:_()("edit-site-site-hub__view-mode-toggle-container",{"has-transparent-background":e}),layout:!0,transition:{type:"tween",duration:o?0:.3,ease:"easeOut"}},(0,l.createElement)(b.Button,{...p,className:"edit-site-layout__view-mode-toggle"},(0,l.createElement)(b.__unstableMotion.div,{initial:!1,animate:{scale:"view"===n?.5:1},whileHover:{scale:"view"===n?.5:.96},transition:{type:"tween",duration:o?0:.3,ease:"easeOut"}},(0,l.createElement)(iu,{className:"edit-site-layout__view-mode-toggle-icon"})))),(0,l.createElement)(b.__unstableAnimatePresence,null,(0,l.createElement)(b.__unstableMotion.div,{layout:"edit"===n,animate:{opacity:"view"===n?1:0},exit:{opacity:0},className:_()("edit-site-site-hub__site-title",{"is-transparent":e}),transition:{type:"tween",duration:o?0:.2,ease:"easeOut",delay:"view"===n?.1:0}},(0,en.decodeEntities)(s))),"view"===n&&(0,l.createElement)(b.Button,{href:a,target:"_blank",label:(0,E.__)("View site (opens in a new tab)"),"aria-label":(0,E.__)("View site (opens in a new tab)"),icon:Ic,className:_()("edit-site-site-hub__site-view-link",{"is-transparent":e})})),"view"===n&&(0,l.createElement)(b.Button,{className:_()("edit-site-site-hub_toggle-command-center",{"is-transparent":e}),icon:Va,onClick:()=>i(),label:(0,E.__)("Open command palette"),shortcut:wr.displayShortcut.primary("k")})))})),lu=ou,cu={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},uu=320,du=1300,mu=9/19.5,pu={width:"100%",height:"100%"};function hu(e,t){const n=1-Math.max(0,Math.min(1,(e-uu)/(du-uu))),r=((e,t,n)=>e+(t-e)*n)(t,mu,n);return e/r}const fu=function e({isFullWidth:t,isOversized:n,setIsOversized:r,isReady:a,children:s,defaultSize:i,innerContentStyle:o}){const[c,u]=(0,g.useState)(pu),[d,p]=(0,g.useState)(),[h,f]=(0,g.useState)(!1),[y,v]=(0,g.useState)(!1),[w,S]=(0,g.useState)(1),x=(0,m.useSelect)((e=>Xe(e(tr)).getCanvasMode()),[]),{setCanvasMode:C}=Xe((0,m.useDispatch)(tr)),k={type:"tween",duration:h?0:.5},T=(0,g.useRef)(null),P=(0,ie.useInstanceId)(e,"edit-site-resizable-frame-handle-help"),I=i.width/i.height,M={default:{flexGrow:0,height:c.height},fullWidth:{flexGrow:1,height:c.height}},A=h?"active":y?"visible":"hidden";return(0,l.createElement)(b.ResizableBox,{as:b.__unstableMotion.div,ref:T,initial:!1,variants:M,animate:t?"fullWidth":"default",onAnimationComplete:e=>{"fullWidth"===e&&u({width:"100%",height:"100%"})},transition:k,size:c,enable:{top:!1,right:!1,bottom:!1,left:a,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},resizeRatio:w,handleClasses:void 0,handleStyles:{left:cu,right:cu},minWidth:uu,maxWidth:t?"100%":"150%",maxHeight:"100%",onFocus:()=>v(!0),onBlur:()=>v(!1),onMouseOver:()=>v(!0),onMouseOut:()=>v(!1),handleComponent:{left:"view"===x&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.Tooltip,{text:(0,E.__)("Drag to resize")},(0,l.createElement)(b.__unstableMotion.button,{key:"handle",role:"separator","aria-orientation":"vertical",className:_()("edit-site-resizable-frame__handle",{"is-resizing":h}),variants:{hidden:{opacity:0,left:0},visible:{opacity:1,left:-16},active:{opacity:1,left:-16,scaleY:1.3}},animate:A,"aria-label":(0,E.__)("Drag to resize"),"aria-describedby":P,"aria-valuenow":T.current?.resizable?.offsetWidth||void 0,"aria-valuemin":uu,"aria-valuemax":i.width,onKeyDown:e=>{if(!["ArrowLeft","ArrowRight"].includes(e.key))return;e.preventDefault();const t=20*(e.shiftKey?5:1)*("ArrowLeft"===e.key?1:-1),n=Math.min(Math.max(uu,T.current.resizable.offsetWidth+t),i.width);u({width:n,height:hu(n,I)})},initial:"hidden",exit:"hidden",whileFocus:"active",whileHover:"active"})),(0,l.createElement)("div",{hidden:!0,id:P},(0,E.__)("Use left and right arrow keys to resize the canvas. Hold shift to resize in larger increments.")))},onResizeStart:(e,t,n)=>{p(n.offsetWidth),f(!0)},onResize:(e,t,a,s)=>{const o=s.width/w,l=Math.abs(o),c=s.width<0?l:(i.width-d)/2,m=Math.min(l,c),p=0===l?0:m/l;S(1-p+2*p);const h=d+s.width;r(h>i.width),u({height:n?"100%":hu(h,I)})},onResizeStop:(e,t,a)=>{if(f(!1),!n)return;r(!1);a.ownerDocument.documentElement.offsetWidth-a.offsetWidth>200?u(pu):C("edit")},className:_()("edit-site-resizable-frame__inner",{"is-resizing":h}),showHandle:!1},(0,l.createElement)(b.__unstableMotion.div,{className:"edit-site-resizable-frame__inner-content",animate:{borderRadius:t?0:8},transition:k,style:o},s))},{useLocation:gu,useHistory:yu}=Xe(gt.privateApis);const{useHistory:vu,useLocation:_u}=Xe(gt.privateApis);const{EntitiesSavedStatesExtensible:bu}=Xe(y.privateApis),Eu=({onClose:e})=>{var t,n;const r=(0,y.useEntitiesSavedStatesIsDirty)();let a;a=r.isDirty?(0,E.__)("Activate & Save"):(0,E.__)("Activate");const s=function(){const[e,t]=(0,g.useState)();return(0,g.useEffect)((()=>{const e=(0,yt.addQueryArgs)("/wp/v2/themes?status=active",{context:"edit",wp_theme_preview:""});Xt()({path:e}).then((e=>t(e[0]))).catch((()=>{}))}),[]),e}(),i=(0,m.useSelect)((e=>e(ye.store).getCurrentTheme()),[]),o=(0,l.createElement)("p",null,(0,E.sprintf)((0,E.__)("Saving your changes will change your active theme from %1$s to %2$s."),null!==(t=s?.name?.rendered)&&void 0!==t?t:"...",null!==(n=i?.name?.rendered)&&void 0!==n?n:"...")),c=function(){const e=vu(),t=_u(),{startResolution:n,finishResolution:r}=(0,m.useDispatch)(ye.store);return async()=>{if(vt()){const a="themes.php?action=activate&stylesheet="+_t()+"&_wpnonce="+window.WP_BLOCK_THEME_ACTIVATE_NONCE;n("activateTheme"),await window.fetch(a),r("activateTheme");const{wp_theme_preview:s,...i}=t.params;e.replace(i)}}}();return(0,l.createElement)(bu,{...r,additionalPrompt:o,close:e,onSave:async e=>(await c(),e),saveEnabled:!0,saveLabel:a})},wu=({onClose:e})=>vt()?(0,l.createElement)(Eu,{onClose:e}):(0,l.createElement)(y.EntitiesSavedStates,{close:e});function Su(){const{isSaveViewOpen:e,canvasMode:t}=(0,m.useSelect)((e=>{const{isSaveViewOpened:t,getCanvasMode:n}=Xe(e(tr));return{isSaveViewOpen:t(),canvasMode:n()}}),[]),{setIsSaveViewOpened:n}=(0,m.useDispatch)(tr),r=()=>n(!1);return"view"===t?e?(0,l.createElement)(b.Modal,{className:"edit-site-save-panel__modal",onRequestClose:r,__experimentalHideHeader:!0,contentLabel:(0,E.__)("Save site, content, and template changes")},(0,l.createElement)(wu,{onClose:r})):null:(0,l.createElement)(oe,{className:_()("edit-site-layout__actions",{"is-entity-save-view-open":e}),ariaLabel:(0,E.__)("Save panel")},e?(0,l.createElement)(wu,{onClose:r}):(0,l.createElement)("div",{className:"edit-site-editor__toggle-save-panel"},(0,l.createElement)(b.Button,{variant:"secondary",className:"edit-site-editor__toggle-save-panel-button",onClick:()=>n(!0),"aria-expanded":!1},(0,E.__)("Open save panel"))))}const xu=function(){const{registerShortcut:e}=(0,m.useDispatch)(nr.store);return(0,g.useEffect)((()=>{e({name:"core/edit-site/save",category:"global",description:(0,E.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/edit-site/toggle-block-settings-sidebar",category:"global",description:(0,E.__)("Show or hide the Settings sidebar."),keyCombination:{modifier:"primaryShift",character:","}}),e({name:"core/edit-site/keyboard-shortcuts",category:"main",description:(0,E.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/edit-site/next-region",category:"global",description:(0,E.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/edit-site/previous-region",category:"global",description:(0,E.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"},{modifier:"ctrlShift",character:"~"}]}),e({name:"core/edit-site/toggle-mode",category:"global",description:(0,E.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),e({name:"core/edit-site/transform-heading-to-paragraph",category:"block-library",description:(0,E.__)("Transform heading to paragraph."),keyCombination:{modifier:"access",character:"0"}}),[1,2,3,4,5,6].forEach((t=>{e({name:`core/edit-site/transform-paragraph-to-heading-${t}`,category:"block-library",description:(0,E.__)("Transform paragraph to heading."),keyCombination:{modifier:"access",character:`${t}`}})})),e({name:"core/edit-site/toggle-distraction-free",category:"global",description:(0,E.__)("Toggle distraction free mode."),keyCombination:{modifier:"primaryShift",character:"\\"}})}),[e]),null};const Cu=function(){const{__experimentalGetDirtyEntityRecords:e,isSavingEntityRecord:t}=(0,m.useSelect)(ye.store),{hasNonPostEntityChanges:n}=(0,m.useSelect)(y.store),{getCanvasMode:r}=Xe((0,m.useSelect)(tr)),{setIsSaveViewOpened:a}=(0,m.useDispatch)(tr);return(0,nr.useShortcut)("core/edit-site/save",(s=>{s.preventDefault();const i=e(),o=!!i.length,l=i.some((e=>t(e.kind,e.name,e.key))),c=n(),u="view"===r();(o&&c&&!l||u)&&a(!0)})),null},ku=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z"})),Tu=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"})),Pu=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z"})),Iu=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z"}));function Mu({path:e,categoryType:t,categoryId:n},r){return["/wp_template/all","/wp_template_part/all","/pages"].includes(e)||"/patterns"===e&&(!r||!!t&&!!n)}const{useGlobalStylesReset:Au}=Xe(fe.privateApis),{useHistory:Ou,useLocation:Nu}=Xe(gt.privateApis);function Fu(){const{openGeneralSidebar:e,setCanvasMode:t}=Xe((0,m.useDispatch)(tr)),{params:n}=Nu(),r=!Mu(n,(0,ie.useViewportMatch)("medium","<")),{getCanvasMode:a}=Xe((0,m.useSelect)(tr)),s=Ou(),i=(0,m.useSelect)((e=>e(ye.store).getCurrentTheme().is_block_theme),[]);return{isLoading:!1,commands:(0,g.useMemo)((()=>i?[{name:"core/edit-site/open-styles",label:(0,E.__)("Open styles"),callback:({close:n})=>{n(),r||s.push({path:"/wp_global_styles",canvas:"edit"}),r&&"edit"!==a()&&t("edit"),e("edit-site/global-styles")},icon:ir}]:[]),[s,e,t,r,a,i])}}function Ru(){const{openGeneralSidebar:e,setCanvasMode:t}=Xe((0,m.useDispatch)(tr)),{params:n}=Nu(),r=!Mu(n,(0,ie.useViewportMatch)("medium","<")),{getCanvasMode:a}=Xe((0,m.useSelect)(tr)),{set:s}=(0,m.useDispatch)(T.store),i=Ou(),o=(0,m.useSelect)((e=>e(ye.store).getCurrentTheme().is_block_theme),[]);return{isLoading:!1,commands:(0,g.useMemo)((()=>o?[{name:"core/edit-site/toggle-styles-welcome-guide",label:(0,E.__)("Learn about styles"),callback:({close:n})=>{n(),r||i.push({path:"/wp_global_styles",canvas:"edit"}),r&&"edit"!==a()&&t("edit"),e("edit-site/global-styles"),s("core/edit-site","welcomeGuideStyles",!0),setTimeout((()=>{s("core/edit-site","welcomeGuideStyles",!0)}),500)},icon:ku}]:[]),[i,e,t,r,a,o,s])}}function Du(){const[e,t]=Au();return{isLoading:!1,commands:(0,g.useMemo)((()=>e?[{name:"core/edit-site/reset-global-styles",label:(0,E.__)("Reset styles"),icon:(0,E.isRTL)()?Tu:Pu,callback:({close:e})=>{e(),t()}}]:[]),[e,t])}}function Vu(){const{openGeneralSidebar:e,setEditorCanvasContainerView:t,setCanvasMode:n}=Xe((0,m.useDispatch)(tr)),{params:r}=Nu(),a=!Mu(r,(0,ie.useViewportMatch)("medium","<")),s=Ou(),{canEditCSS:i}=(0,m.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(ye.store),r=n(),a=r?t("root","globalStyles",r):void 0;return{canEditCSS:!!a?._links?.["wp:action-edit-css"]}}),[]),{getCanvasMode:o}=Xe((0,m.useSelect)(tr));return{isLoading:!1,commands:(0,g.useMemo)((()=>i?[{name:"core/edit-site/open-styles-css",label:(0,E.__)("Customize CSS"),icon:Iu,callback:({close:r})=>{r(),a||s.push({path:"/wp_global_styles",canvas:"edit"}),a&&"edit"!==o()&&n("edit"),e("edit-site/global-styles"),t("global-styles-css")}}]:[]),[s,e,t,i,a,o,n])}}function Lu(){const{openGeneralSidebar:e,setEditorCanvasContainerView:t,setCanvasMode:n}=Xe((0,m.useDispatch)(tr)),{getCanvasMode:r}=Xe((0,m.useSelect)(tr)),{params:a}=Nu(),s=!Mu(a,(0,ie.useViewportMatch)("medium","<")),i=Ou(),o=(0,m.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(ye.store),r=n(),a=r?t("root","globalStyles",r):void 0;return!!a?._links?.["version-history"]?.[0]?.count}),[]);return{isLoading:!1,commands:(0,g.useMemo)((()=>o?[{name:"core/edit-site/open-global-styles-revisions",label:(0,E.__)("Style revisions"),icon:ba,callback:({close:a})=>{a(),s||i.push({path:"/wp_global_styles",canvas:"edit"}),s&&"edit"!==r()&&n("edit"),e("edit-site/global-styles"),t("global-styles-revisions")}}]:[]),[o,i,e,t,s,r,n])}}const Bu=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.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"})),zu=(0,l.createElement)(w.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z"})),Hu=(0,l.createElement)(w.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"})),Gu=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.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"})),Uu=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"m16 15.5h-8v-1.5h8zm-7.5-2.5h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm-9-3h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2z"}),(0,l.createElement)(w.Path,{d:"m18.5 6.5h-13a.5.5 0 0 0 -.5.5v9.5a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-9.5a.5.5 0 0 0 -.5-.5zm-13-1.5h13a2 2 0 0 1 2 2v9.5a2 2 0 0 1 -2 2h-13a2 2 0 0 1 -2-2v-9.5a2 2 0 0 1 2-2z"})),Wu=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})),{RenamePatternModal:ju}=Xe(St.privateApis);function Zu(){const{record:e}=Ds(),{closeModal:t}=(0,m.useDispatch)(j);return(0,m.useSelect)((e=>e(j).isModalActive(Xu.rename)))?(0,l.createElement)(ju,{onClose:t,pattern:e}):null}const{DuplicatePatternModal:qu}=Xe(St.privateApis),{useHistory:Yu}=Xe(gt.privateApis);function Ku(){const{record:e}=Ds(),{categoryType:t,categoryId:n}=(0,yt.getQueryArgs)(window.location.href),{closeModal:r}=(0,m.useDispatch)(j),a=Yu();if(!(0,m.useSelect)((e=>e(j).isModalActive(Xu.duplicate))))return null;return(0,l.createElement)(qu,{onClose:r,onSuccess:function({pattern:e}){a.push({categoryType:t,categoryId:n,postType:It.user,postId:e.id}),r()},pattern:e})}const Xu={rename:"edit-site/pattern-rename",duplicate:"edit-site/pattern-duplicate"};function Ju(){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Ku,null),(0,l.createElement)(Zu,null))}const{useHistory:Qu}=Xe(gt.privateApis);function $u(){const{record:e}=Ds(),{isPage:t,canvasMode:n,templateId:r,currentPostType:a}=(0,m.useSelect)((e=>{const{isPage:t,getCanvasMode:n}=Xe(e(tr)),{getCurrentPostType:r,getCurrentTemplateId:a}=e(y.store);return{isPage:t(),canvasMode:n(),templateId:a(),currentPostType:r()}}),[]),{onClick:s}=Et({postType:"wp_template",postId:r}),{setRenderingMode:i}=(0,m.useDispatch)(y.store);if(!t||"edit"!==n)return{isLoading:!1,commands:[]};const o=[];return"wp_template"!==a?o.push({name:"core/switch-to-template-focus",label:(0,E.sprintf)((0,E.__)("Edit template: %s"),(0,en.decodeEntities)(e.title)),icon:lr,callback:({close:e})=>{s(),e()}}):o.push({name:"core/switch-to-page-focus",label:(0,E.__)("Back to page"),icon:or,callback:({close:e})=>{i("template-locked"),e()}}),{isLoading:!1,commands:o}}function ed(){const{switchEditorMode:e}=(0,m.useDispatch)(tr),{canvasMode:t,editorMode:n}=(0,m.useSelect)((e=>({canvasMode:Xe(e(tr)).getCanvasMode(),editorMode:e(tr).getEditorMode()})),[]);if("edit"!==t||"text"!==n)return{isLoading:!1,commands:[]};const r=[];return"text"===n&&r.push({name:"core/exit-code-editor",label:(0,E.__)("Exit code editor"),icon:Bu,callback:({close:t})=>{e("visual"),t()}}),{isLoading:!1,commands:r}}function td(){const{isLoaded:e,record:t}=Ds(),{removeTemplate:n,revertTemplate:r}=(0,m.useDispatch)(tr),a=Qu(),s=(0,m.useSelect)((e=>e(tr).isPage()&&"wp_template"!==e(y.store).getCurrentPostType()),[]);if(!e)return{isLoading:!0,commands:[]};const i=[];if($t(t)&&!s){const e=t.type===Ct?(0,E.sprintf)((0,E.__)("Reset template: %s"),(0,en.decodeEntities)(t.title)):(0,E.sprintf)((0,E.__)("Reset template part: %s"),(0,en.decodeEntities)(t.title));i.push({name:"core/reset-template",label:e,icon:(0,E.isRTL)()?Tu:Pu,callback:({close:e})=>{r(t),e()}})}if(Hs(t)&&!s){const e=t.type===Ct?(0,E.sprintf)((0,E.__)("Delete template: %s"),(0,en.decodeEntities)(t.title)):(0,E.sprintf)((0,E.__)("Delete template part: %s"),(0,en.decodeEntities)(t.title)),r=t.type===Ct?"/wp_template":"/wp_template_part/all";i.push({name:"core/remove-template",label:e,icon:ql,callback:({close:e})=>{n(t),a.push({path:r}),e()}})}return{isLoading:!e,commands:i}}function nd(){const{openGeneralSidebar:e,closeGeneralSidebar:t,toggleDistractionFree:n,setIsListViewOpened:r,switchEditorMode:a}=(0,m.useDispatch)(tr),{canvasMode:s,editorMode:i,activeSidebar:o,showBlockBreadcrumbs:l,isListViewOpen:c,isDistractionFree:u,isTopToolbar:d,isFocusMode:p}=(0,m.useSelect)((e=>{const{get:t}=e(T.store),{getEditorMode:n}=e(tr),{isListViewOpened:r}=e(y.store);return{canvasMode:Xe(e(tr)).getCanvasMode(),editorMode:n(),activeSidebar:e(j).getActiveComplementaryArea(tr.name),showBlockBreadcrumbs:t("core","showBlockBreadcrumbs"),isListViewOpen:r(),isDistractionFree:t("core","distractionFree"),isFocusMode:t("core","focusMode"),isTopToolbar:t("core","fixedToolbar")}}),[]),{openModal:h}=(0,m.useDispatch)(j),{toggle:f}=(0,m.useDispatch)(T.store),{createInfoNotice:g}=(0,m.useDispatch)(ge.store);if("edit"!==s)return{isLoading:!1,commands:[]};const v=[];return v.push({name:"core/open-settings-sidebar",label:(0,E.__)("Toggle settings sidebar"),icon:(0,E.isRTL)()?zu:Hu,callback:({close:n})=>{n(),"edit-site/template"===o?t():e("edit-site/template")}}),v.push({name:"core/open-block-inspector",label:(0,E.__)("Toggle block inspector"),icon:Gu,callback:({close:n})=>{n(),"edit-site/block-inspector"===o?t():e("edit-site/block-inspector")}}),v.push({name:"core/toggle-spotlight-mode",label:(0,E.__)("Toggle spotlight"),callback:({close:e})=>{f("core","focusMode"),e(),g(p?(0,E.__)("Spotlight off."):(0,E.__)("Spotlight on."),{id:"core/edit-site/toggle-spotlight-mode/notice",type:"snackbar",actions:[{label:(0,E.__)("Undo"),onClick:()=>{f("core","focusMode")}}]})}}),v.push({name:"core/toggle-distraction-free",label:u?(0,E.__)("Exit Distraction Free"):(0,E.__)("Enter Distraction Free "),callback:({close:e})=>{n(),e()}}),v.push({name:"core/toggle-top-toolbar",label:(0,E.__)("Toggle top toolbar"),callback:({close:e})=>{f("core","fixedToolbar"),u&&n(),e(),g(d?(0,E.__)("Top toolbar off."):(0,E.__)("Top toolbar on."),{id:"core/edit-site/toggle-top-toolbar/notice",type:"snackbar",actions:[{label:(0,E.__)("Undo"),onClick:()=>{f("core","fixedToolbar")}}]})}}),"visual"===i&&v.push({name:"core/toggle-code-editor",label:(0,E.__)("Open code editor"),icon:Bu,callback:({close:e})=>{a("text"),e()}}),v.push({name:"core/open-preferences",label:(0,E.__)("Editor preferences"),callback:()=>{h(zc)}}),v.push({name:"core/open-shortcut-help",label:(0,E.__)("Keyboard shortcuts"),icon:Uu,callback:()=>{h(Fc)}}),v.push({name:"core/toggle-breadcrumbs",label:l?(0,E.__)("Hide block breadcrumbs"):(0,E.__)("Show block breadcrumbs"),callback:({close:e})=>{f("core","showBlockBreadcrumbs"),e(),g(l?(0,E.__)("Breadcrumbs hidden."):(0,E.__)("Breadcrumbs visible."),{id:"core/edit-site/toggle-breadcrumbs/notice",type:"snackbar"})}}),v.push({name:"core/toggle-list-view",label:c?(0,E.__)("Close List View"):(0,E.__)("Open List View"),icon:Wu,callback:({close:e})=>{r(!c),e(),g(c?(0,E.__)("List View off."):(0,E.__)("List View on."),{id:"core/edit-site/toggle-list-view/notice",type:"snackbar"})}}),{isLoading:!1,commands:v}}function rd(){const{isLoaded:e,record:t}=Ds(),{openModal:n}=(0,m.useDispatch)(j);if(!e)return{isLoading:!0,commands:[]};const r=[];return"wp_block"===t?.type&&(r.push({name:"core/rename-pattern",label:(0,E.__)("Rename pattern"),icon:Er,callback:({close:e})=>{n(Xu.rename),e()}}),r.push({name:"core/duplicate-pattern",label:(0,E.__)("Duplicate pattern"),icon:cr,callback:({close:e})=>{n(Xu.duplicate),e()}})),{isLoading:!1,commands:r}}const ad=1e4;function sd(){const{isLoaded:e}=Ds(),[t,n]=(0,g.useState)(!1),r=(0,m.useSelect)((e=>{const n=e(ye.store).hasResolvingSelectors();return!t&&!n}),[t]);return(0,g.useEffect)((()=>{let e;return t||(e=setTimeout((()=>{n(!0)}),ad)),()=>{clearTimeout(e)}}),[t]),(0,g.useEffect)((()=>{if(r){const e=setTimeout((()=>{n(!0)}),100);return()=>{clearTimeout(e)}}}),[r]),!t||!e}function id({className:e,identifier:t,title:n,icon:r,children:a,closeLabel:s,header:i,headerClassName:o,panelClassName:c}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(se,{className:e,scope:"core/edit-site",identifier:t,title:n,smallScreenTitle:n,icon:r,closeLabel:s,header:i,headerClassName:o,panelClassName:c},a),(0,l.createElement)(ee,{scope:"core/edit-site",identifier:t,icon:r},n))}function od({className:e,...t}){return(0,l.createElement)(b.Icon,{className:_()(e,"edit-site-global-styles-icon-with-current-color"),...t})}function ld({icon:e,children:t,...n}){return(0,l.createElement)(b.__experimentalItem,{...n},e&&(0,l.createElement)(b.__experimentalHStack,{justify:"flex-start"},(0,l.createElement)(od,{icon:e,size:24}),(0,l.createElement)(b.FlexItem,null,t)),!e&&t)}function cd(e){return(0,l.createElement)(b.__experimentalNavigatorButton,{as:ld,...e})}const ud=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M6.9 7L3 17.8h1.7l1-2.8h4.1l1 2.8h1.7L8.6 7H6.9zm-.7 6.6l1.5-4.3 1.5 4.3h-3zM21.6 17c-.1.1-.2.2-.3.2-.1.1-.2.1-.4.1s-.3-.1-.4-.2c-.1-.1-.1-.3-.1-.6V12c0-.5 0-1-.1-1.4-.1-.4-.3-.7-.5-1-.2-.2-.5-.4-.9-.5-.4 0-.8-.1-1.3-.1s-1 .1-1.4.2c-.4.1-.7.3-1 .4-.2.2-.4.3-.6.5-.1.2-.2.4-.2.7 0 .3.1.5.2.8.2.2.4.3.8.3.3 0 .6-.1.8-.3.2-.2.3-.4.3-.7 0-.3-.1-.5-.2-.7-.2-.2-.4-.3-.6-.4.2-.2.4-.3.7-.4.3-.1.6-.1.8-.1.3 0 .6 0 .8.1.2.1.4.3.5.5.1.2.2.5.2.9v1.1c0 .3-.1.5-.3.6-.2.2-.5.3-.9.4-.3.1-.7.3-1.1.4-.4.1-.8.3-1.1.5-.3.2-.6.4-.8.7-.2.3-.3.7-.3 1.2 0 .6.2 1.1.5 1.4.3.4.9.5 1.6.5.5 0 1-.1 1.4-.3.4-.2.8-.6 1.1-1.1 0 .4.1.7.3 1 .2.3.6.4 1.2.4.4 0 .7-.1.9-.2.2-.1.5-.3.7-.4h-.3zm-3-.9c-.2.4-.5.7-.8.8-.3.2-.6.2-.8.2-.4 0-.6-.1-.9-.3-.2-.2-.3-.6-.3-1.1 0-.5.1-.9.3-1.2s.5-.5.8-.7c.3-.2.7-.3 1-.5.3-.1.6-.3.7-.6v3.4z"})),dd=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"})),{useHasDimensionsPanel:md,useHasTypographyPanel:pd,useHasColorPanel:hd,useGlobalSetting:fd,useSettingsForBlockElement:gd}=Xe(fe.privateApis);const yd=function(){const[e]=fd(""),t=gd(e),n=pd(t),r=hd(t),a=md(t);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.__experimentalItemGroup,null,n&&(0,l.createElement)(cd,{icon:ud,path:"/typography","aria-label":(0,E.__)("Typography styles")},(0,E.__)("Typography")),r&&(0,l.createElement)(cd,{icon:dd,path:"/colors","aria-label":(0,E.__)("Colors styles")},(0,E.__)("Colors")),a&&(0,l.createElement)(cd,{icon:lr,path:"/layout","aria-label":(0,E.__)("Layout styles")},(0,E.__)("Layout"))))},{useGlobalStyle:vd}=Xe(fe.privateApis);const _d=function(){const[e]=vd("css"),{hasVariations:t,canEditCSS:n}=(0,m.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n,__experimentalGetCurrentThemeGlobalStylesVariations:r}=e(ye.store),a=n(),s=a?t("root","globalStyles",a):void 0;return{hasVariations:!!r()?.length,canEditCSS:!!s?._links?.["wp:action-edit-css"]}}),[]);return(0,l.createElement)(b.Card,{size:"small",className:"edit-site-global-styles-screen-root"},(0,l.createElement)(b.CardBody,null,(0,l.createElement)(b.__experimentalVStack,{spacing:4},(0,l.createElement)(b.Card,null,(0,l.createElement)(b.CardMedia,null,(0,l.createElement)(Lr,null))),t&&(0,l.createElement)(b.__experimentalItemGroup,null,(0,l.createElement)(cd,{path:"/variations","aria-label":(0,E.__)("Browse styles")},(0,l.createElement)(b.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(b.FlexItem,null,(0,E.__)("Browse styles")),(0,l.createElement)(od,{icon:(0,E.isRTL)()?dr:ur})))),(0,l.createElement)(yd,null))),(0,l.createElement)(b.CardDivider,null),(0,l.createElement)(b.CardBody,null,(0,l.createElement)(b.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4},(0,E.__)("Customize the appearance of specific blocks for the whole site.")),(0,l.createElement)(b.__experimentalItemGroup,null,(0,l.createElement)(cd,{path:"/blocks","aria-label":(0,E.__)("Blocks styles")},(0,l.createElement)(b.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(b.FlexItem,null,(0,E.__)("Blocks")),(0,l.createElement)(od,{icon:(0,E.isRTL)()?dr:ur}))))),n&&!!e&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.CardDivider,null),(0,l.createElement)(b.CardBody,null,(0,l.createElement)(b.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4},(0,E.__)("Add your own CSS to customize the appearance and layout of your site.")),(0,l.createElement)(b.__experimentalItemGroup,null,(0,l.createElement)(cd,{path:"/css","aria-label":(0,E.__)("Additional CSS")},(0,l.createElement)(b.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(b.FlexItem,null,(0,E.__)("Additional CSS")),(0,l.createElement)(od,{icon:(0,E.isRTL)()?dr:ur})))))))};function bd(e){const t=function(e){return e?.filter((e=>"block"===e.source))}((0,m.useSelect)((t=>{const{getBlockStyles:n}=t(u.store);return n(e)}),[e]));return t}function Ed({name:e}){const t=bd(e);return(0,l.createElement)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},t.map(((t,n)=>t?.isDefault?null:(0,l.createElement)(cd,{key:n,path:"/blocks/"+encodeURIComponent(e)+"/variations/"+encodeURIComponent(t.name),"aria-label":t.label},t.label))))}const wd=function({title:e,description:t,onBack:n}){return(0,l.createElement)(b.__experimentalVStack,{spacing:0},(0,l.createElement)(b.__experimentalView,null,(0,l.createElement)(b.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3},(0,l.createElement)(b.__experimentalHStack,{spacing:2},(0,l.createElement)(b.__experimentalNavigatorToParentButton,{style:{minWidth:24,padding:0},icon:(0,E.isRTL)()?ur:dr,isSmall:!0,"aria-label":(0,E.__)("Navigate to the previous view"),onClick:n}),(0,l.createElement)(b.__experimentalSpacer,null,(0,l.createElement)(b.__experimentalHeading,{className:"edit-site-global-styles-header",level:2,size:13},e))))),t&&(0,l.createElement)("p",{className:"edit-site-global-styles-header__description"},t))},{useHasDimensionsPanel:Sd,useHasTypographyPanel:xd,useHasBorderPanel:Cd,useGlobalSetting:kd,useSettingsForBlockElement:Td,useHasColorPanel:Pd}=Xe(fe.privateApis);function Id(e){const[t]=kd("",e),n=Td(t,e),r=xd(n),a=Pd(n),s=Cd(n),i=Sd(n),o=s||i,l=!!bd(e)?.length;return r||a||o||l}function Md({block:e}){if(!Id(e.name))return null;const t=(0,E.sprintf)((0,E.__)("%s block styles"),e.title);return(0,l.createElement)(cd,{path:"/blocks/"+encodeURIComponent(e.name),"aria-label":t},(0,l.createElement)(b.__experimentalHStack,{justify:"flex-start"},(0,l.createElement)(fe.BlockIcon,{icon:e.icon}),(0,l.createElement)(b.FlexItem,null,e.title)))}const Ad=(0,g.memo)((function({filterValue:e}){const t=function(){const e=(0,m.useSelect)((e=>e(u.store).getBlockTypes()),[]),{core:t,noncore:n}=e.reduce(((e,t)=>{const{core:n,noncore:r}=e;return(t.name.startsWith("core/")?n:r).push(t),e}),{core:[],noncore:[]});return[...t,...n]}(),n=(0,ie.useDebounce)(Jt.speak,500),{isMatchingSearchTerm:r}=(0,m.useSelect)(u.store),a=e?t.filter((t=>r(t,e))):t,s=(0,g.useRef)();return(0,g.useEffect)((()=>{if(!e)return;const t=s.current.childElementCount,r=(0,E.sprintf)((0,E._n)("%d result found.","%d results found.",t),t);n(r,t)}),[e,n]),(0,l.createElement)("div",{ref:s,className:"edit-site-block-types-item-list"},a.map((e=>(0,l.createElement)(Md,{block:e,key:"menu-itemblock-"+e.name}))))}));const Od=function(){const[e,t]=(0,g.useState)(""),n=(0,g.useDeferredValue)(e);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{title:(0,E.__)("Blocks"),description:(0,E.__)("Customize the appearance of specific blocks and for the whole site.")}),(0,l.createElement)(b.SearchControl,{__nextHasNoMarginBottom:!0,className:"edit-site-block-types-search",onChange:t,value:e,label:(0,E.__)("Search for blocks"),placeholder:(0,E.__)("Search")}),(0,l.createElement)(Ad,{filterValue:n}))},Nd=({name:e,variation:t=""})=>{var n;const r=(0,u.getBlockType)(e)?.example,a=(0,g.useMemo)((()=>{if(!r)return null;let n=r;return t&&(n={...n,attributes:{...n.attributes,className:"is-style-"+t}}),(0,u.getBlockFromExample)(e,n)}),[e,r,t]),s=null!==(n=r?.viewportWidth)&&void 0!==n?n:null;return r?(0,l.createElement)(b.__experimentalSpacer,{marginX:4,marginBottom:4},(0,l.createElement)("div",{className:"edit-site-global-styles__block-preview-panel",style:{maxHeight:150,boxSizing:"initial"}},(0,l.createElement)(fe.BlockPreview,{blocks:a,viewportWidth:s,minHeight:150,additionalStyles:[{css:"\n\t\t\t\t\t\t\t\tbody{\n\t\t\t\t\t\t\t\t\tmin-height:150px;\n\t\t\t\t\t\t\t\t\tdisplay:flex;align-items:center;justify-content:center;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t"}]}))):null};const Fd=function({children:e,level:t}){return(0,l.createElement)(b.__experimentalHeading,{className:"edit-site-global-styles-subtitle",level:null!=t?t:2},e)};function Rd(e){if(!e)return e;const t=e.color||e.width;return!e.style&&t?{...e,style:"solid"}:!e.style||t?e:void 0}const{useHasDimensionsPanel:Dd,useHasTypographyPanel:Vd,useHasBorderPanel:Ld,useGlobalSetting:Bd,useSettingsForBlockElement:zd,useHasColorPanel:Hd,useHasFiltersPanel:Gd,useHasImageSettingsPanel:Ud,useGlobalStyle:Wd,BorderPanel:jd,ColorPanel:Zd,TypographyPanel:qd,DimensionsPanel:Yd,FiltersPanel:Kd,ImageSettingsPanel:Xd,AdvancedPanel:Jd}=Xe(fe.privateApis);const Qd=function({name:e,variation:t}){let n=[];t&&(n=["variations",t].concat(n));const r=n.join("."),[a]=Wd(r,e,"user",{shouldDecodeEncode:!1}),[s,i]=Wd(r,e,"all",{shouldDecodeEncode:!1}),[o]=Bd("",e,"user"),[c,d]=Bd("",e),p=zd(c,e),h=(0,u.getBlockType)(e);p?.spacing?.blockGap&&h?.supports?.spacing?.blockGap&&(!0===h?.supports?.spacing?.__experimentalSkipSerialization||h?.supports?.spacing?.__experimentalSkipSerialization?.some?.((e=>"blockGap"===e)))&&(p.spacing.blockGap=!1),p?.dimensions?.aspectRatio&&"core/group"===e&&(p.dimensions.aspectRatio=!1);const f=bd(e),y=Vd(p),v=Hd(p),_=Ld(p),w=Dd(p),S=Gd(p),x=Ud(e,o,p),C=!!f?.length&&!t,{canEditCSS:k}=(0,m.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(ye.store),r=n(),a=r?t("root","globalStyles",r):void 0;return{canEditCSS:!!a?._links?.["wp:action-edit-css"]}}),[]),T=t?f.find((e=>e.name===t)):null,P=(0,g.useMemo)((()=>({...s,layout:p.layout})),[s,p.layout]),I=(0,g.useMemo)((()=>({...a,layout:o.layout})),[a,o.layout]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{title:t?T.label:h.title}),(0,l.createElement)(Nd,{name:e,variation:t}),C&&(0,l.createElement)("div",{className:"edit-site-global-styles-screen-variations"},(0,l.createElement)(b.__experimentalVStack,{spacing:3},(0,l.createElement)(Fd,null,(0,E.__)("Style Variations")),(0,l.createElement)(Ed,{name:e}))),v&&(0,l.createElement)(Zd,{inheritedValue:s,value:a,onChange:i,settings:p}),y&&(0,l.createElement)(qd,{inheritedValue:s,value:a,onChange:i,settings:p}),w&&(0,l.createElement)(Yd,{inheritedValue:P,value:I,onChange:e=>{const t={...e};delete t.layout,i(t),e.layout!==o.layout&&d({...o,layout:e.layout})},settings:p,includeLayoutControls:!0}),_&&(0,l.createElement)(jd,{inheritedValue:s,value:a,onChange:e=>{if(!e?.border)return void i(e);const{radius:t,...n}=e.border,r=function(e){return e?(0,b.__experimentalHasSplitBorders)(e)?{top:Rd(e.top),right:Rd(e.right),bottom:Rd(e.bottom),left:Rd(e.left)}:Rd(e):e}(n),a=(0,b.__experimentalHasSplitBorders)(r)?{color:null,style:null,width:null,...r}:{top:r,right:r,bottom:r,left:r};i({...e,border:{...a,radius:t}})},settings:p}),S&&(0,l.createElement)(Kd,{inheritedValue:P,value:I,onChange:i,settings:p,includeLayoutControls:!0}),x&&(0,l.createElement)(Xd,{onChange:e=>{d(void 0===e?{...c,lightbox:void 0}:{...c,lightbox:{...c.lightbox,...e}})},value:o,inheritedValue:p}),k&&(0,l.createElement)(b.PanelBody,{title:(0,E.__)("Advanced"),initialOpen:!1},(0,l.createElement)("p",null,(0,E.sprintf)((0,E.__)("Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value."),h?.title)),(0,l.createElement)(Jd,{value:a,onChange:i,inheritedValue:s})))},{useGlobalStyle:$d}=Xe(fe.privateApis);function em({parentMenu:e,element:t,label:n}){const r="text"!==t&&t?`elements.${t}.`:"",a="link"===t?{textDecoration:"underline"}:{},[s]=$d(r+"typography.fontFamily"),[i]=$d(r+"typography.fontStyle"),[o]=$d(r+"typography.fontWeight"),[c]=$d(r+"typography.letterSpacing"),[u]=$d(r+"color.background"),[d]=$d(r+"color.gradient"),[m]=$d(r+"color.text"),p=(0,E.sprintf)((0,E.__)("Typography %s styles"),n);return(0,l.createElement)(cd,{path:e+"/typography/"+t,"aria-label":p},(0,l.createElement)(b.__experimentalHStack,{justify:"flex-start"},(0,l.createElement)(b.FlexItem,{className:"edit-site-global-styles-screen-typography__indicator",style:{fontFamily:null!=s?s:"serif",background:null!=d?d:u,color:m,fontStyle:i,fontWeight:o,letterSpacing:c,...a}},(0,E.__)("Aa")),(0,l.createElement)(b.FlexItem,null,n)))}const tm=function(){return(0,l.createElement)(b.__experimentalVStack,{spacing:3},(0,l.createElement)(Fd,{level:3},(0,E.__)("Elements")),(0,l.createElement)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,l.createElement)(em,{parentMenu:"",element:"text",label:(0,E.__)("Text")}),(0,l.createElement)(em,{parentMenu:"",element:"link",label:(0,E.__)("Links")}),(0,l.createElement)(em,{parentMenu:"",element:"heading",label:(0,E.__)("Headings")}),(0,l.createElement)(em,{parentMenu:"",element:"caption",label:(0,E.__)("Captions")}),(0,l.createElement)(em,{parentMenu:"",element:"button",label:(0,E.__)("Buttons")})))},nm=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,l.createElement)(w.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})),rm="/wp/v2/font-families",am="/wp/v2/font-collections";async function sm(e){const t={path:rm,method:"POST",body:e},n=await Xt()(t);return{id:n.id,...n.font_family_settings,fontFace:[]}}async function im(e,t){const n={path:`${rm}/${e}/font-faces`,method:"POST",body:t},r=await Xt()(n);return{id:r.id,...r.font_face_settings}}async function om(e){const t={path:`${rm}?slug=${e}&_embed=true`,method:"GET"},n=await Xt()(t);if(!n||0===n.length)return null;const r=n[0];return{id:r.id,...r.font_family_settings,fontFace:r?._embedded?.font_faces.map((e=>e.font_face_settings))||[]}}async function lm(e){const t={path:`${rm}/${e}?force=true`,method:"DELETE"};return await Xt()(t)}const cm=["otf","ttf","woff","woff2"],um={100:(0,E._x)("Thin","font weight"),200:(0,E._x)("Extra-light","font weight"),300:(0,E._x)("Light","font weight"),400:(0,E._x)("Normal","font weight"),500:(0,E._x)("Medium","font weight"),600:(0,E._x)("Semi-bold","font weight"),700:(0,E._x)("Bold","font weight"),800:(0,E._x)("Extra-bold","font weight"),900:(0,E._x)("Black","font weight")},dm={normal:(0,E._x)("Normal","font style"),italic:(0,E._x)("Italic","font style")};function mm(e){const t=/^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/,n=e.trim(),r=e=>(e=e.trim()).match(t)?`"${e=e.replace(/^["']|["']$/g,"")}"`:e;return n.includes(",")?n.split(",").map(r).filter((e=>""!==e)).join(", "):r(n)}function pm(e){if(!e)return"";let t=e.trim();return t.includes(",")&&(t=t.split(",").find((e=>""!==e.trim())).trim()),t=t.replace(/^["']|["']$/g,""),window.navigator.userAgent.toLowerCase().includes("firefox")&&(t=`"${t}"`),t}function hm(e){const t={fontFamily:mm(e.fontFamily)};if(!Array.isArray(e.fontFace))return t.fontWeight="400",t.fontStyle="normal",t;if(e.fontFace){const a=e.fontFace.filter((e=>"normal"===e.fontStyle.toLowerCase()));if(a.length>0){t.fontStyle="normal";const e=function(e){const t=[];return e.forEach((e=>{const n=String(e.fontWeight).split(" ");if(2===n.length){const e=parseInt(n[0]),r=parseInt(n[1]);for(let n=e;n<=r;n+=100)t.push(n)}else 1===n.length&&t.push(parseInt(n[0]))})),t}(a),s=(n=400,0===(r=e).length?null:(r.sort(((e,t)=>Math.abs(n-e)-Math.abs(n-t))),r[0]));t.fontWeight=String(s)||"400"}else t.fontStyle=e.fontFace.length&&e.fontFace[0].fontStyle||"normal",t.fontWeight=e.fontFace.length&&String(e.fontFace[0].fontWeight)||"400"}var n,r;return t}const{File:fm}=window;function gm(e,t={}){return e.name||!e.fontFamily&&!e.slug||(e.name=e.fontFamily||e.slug),{...e,...t}}function ym(e){return`${um[e.fontWeight]||e.fontWeight} ${"normal"===e.fontStyle?"":dm[e.fontStyle]||e.fontStyle}`}function vm(e=[],t=[]){const n=new Map;for(const t of e)n.set(`${t.fontWeight}${t.fontStyle}`,t);for(const e of t)n.set(`${e.fontWeight}${e.fontStyle}`,e);return Array.from(n.values())}function _m(e=[],t=[]){const n=new Map;for(const t of e)n.set(t.slug,{...t});for(const e of t)if(n.has(e.slug)){const{fontFace:t,...r}=e,a=vm(n.get(e.slug).fontFace,t);n.set(e.slug,{...r,fontFace:a})}else n.set(e.slug,{...e});return Array.from(n.values())}async function bm(e,t,n="all"){let r;if("string"==typeof t)r=`url(${t})`;else{if(!(t instanceof fm))return;r=await t.arrayBuffer()}const a=new window.FontFace(pm(e.fontFamily),r,{style:e.fontStyle,weight:e.fontWeight}),s=await a.load();if("document"!==n&&"all"!==n||document.fonts.add(s),"iframe"===n||"all"===n){document.querySelector('iframe[name="editor-canvas"]').contentDocument.fonts.add(s)}}function Em(e,t="all"){const n=t=>{t.forEach((n=>{n.family===pm(e?.fontFamily)&&n.weight===e?.fontWeight&&n.style===e?.fontStyle&&t.delete(n)}))};if("document"!==t&&"all"!==t||n(document.fonts),"iframe"===t||"all"===t){n(document.querySelector('iframe[name="editor-canvas"]').contentDocument.fonts)}}function wm(e){if(!e)return;let t;var n;return t=Array.isArray(e)?e[0]:e,t.startsWith("file:.")?void 0:(("string"!=typeof(n=t)||n===decodeURIComponent(n))&&(t=encodeURI(t)),t)}function Sm(e){const t=new FormData,{kebabCase:n}=Xe(b.privateApis),{fontFace:r,category:a,...s}=e,i={...s,slug:n(e.slug)};return t.append("font_family_settings",JSON.stringify(i)),t}function xm(e){if(e?.fontFace){const t=e.fontFace.map(((e,t)=>{const n={...e},r=new FormData;if(n.file){const e=Array.isArray(n.file)?n.file:[n.file],a=[];e.forEach(((e,n)=>{const s=`file-${t}-${n}`;r.append(s,e,e.name),a.push(s)})),n.src=1===a.length?a[0]:a,delete n.file,r.append("font_face_settings",JSON.stringify(n))}else r.append("font_face_settings",JSON.stringify(n));return r}));return t}}async function Cm(e,t){const n=[];for(const r of t)try{const t=await im(e,r);n.push({status:"fulfilled",value:t})}catch(e){n.push({status:"rejected",reason:e})}const r={errors:[],successes:[]};return n.forEach(((e,n)=>{if("fulfilled"===e.status){const a=e.value;a.id?r.successes.push(a):r.errors.push({data:t[n],message:`Error: ${a.message}`})}else r.errors.push({data:t[n],message:e.reason.message})})),r}function km(e,t){return-1!==t.findIndex((t=>t.fontWeight===e.fontWeight&&t.fontStyle===e.fontStyle))}function Tm(e,t,n){const r=t=>t.slug===e.slug,a=n.find(r);return t?(a=>{const s=e=>e.fontWeight===t.fontWeight&&e.fontStyle===t.fontStyle;if(!a)return[...n,{...e,fontFace:[t]}];let i=a.fontFace||[];return i=i.find(s)?i.filter((e=>!s(e))):[...i,t],0===i.length?n.filter((e=>!r(e))):n.map((e=>r(e)?{...e,fontFace:i}:e))})(a):(t=>t?n.filter((e=>!r(e))):[...n,e])(a)}const{useGlobalSetting:Pm}=Xe(fe.privateApis),Im=(0,g.createContext)({});const Mm=function({children:e}){const{__experimentalSaveSpecifiedEntityEdits:t}=(0,m.useDispatch)(ye.store),{globalStylesId:n}=(0,m.useSelect)((e=>{const{__experimentalGetCurrentGlobalStylesId:t}=e(ye.store);return{globalStylesId:t()}})),r=(0,ye.useEntityRecord)("root","globalStyles",n),a=!!r?.edits?.settings?.typography?.fontFamilies,[s,i]=(0,g.useState)(!1),[o,c]=(0,g.useState)(0),[u,d]=(0,g.useState)(null),p=()=>{c(Date.now())},{records:h=[],isResolving:f,hasResolved:y}=(0,ye.useEntityRecords)("postType","wp_font_family",{refreshKey:o,_embed:!0}),v=(h||[]).map((e=>({id:e.id,...e.font_family_settings,fontFace:e?._embedded?.font_faces.map((e=>e.font_face_settings))||[]})))||[],[_,b]=Pm("typography.fontFamilies"),[w]=Pm("typography.fontFamilies",void 0,"base"),[S,x]=(0,g.useState)(!1),[C,k]=(0,g.useState)(null),T=_?.theme?_.theme.map((e=>gm(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],P=new Set(T.map((e=>e.slug))),I=w?.theme?T.concat(w.theme.filter((e=>!P.has(e.slug))).map((e=>gm(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name)))):[],M=_?.custom?_.custom.map((e=>gm(e,{source:"custom"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],A=v?v.map((e=>gm(e,{source:"custom"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[];(0,g.useEffect)((()=>{S||k(null)}),[S]);const[O]=(0,g.useState)(new Set),N=e=>e.reduce(((e,t)=>{const n=t?.fontFace&&t.fontFace?.length>0?t?.fontFace.map((e=>`${e.fontStyle+e.fontWeight}`)):["normal400"];return e[t.slug]=n,e}),{}),F=e=>N("theme"===e?T:M),R=(e,t,n,r)=>t||n?!!F(r)[e]?.includes(t+n):!!F(r)[e],D=e=>{var t;const n=(null!==(t=_?.[e.source])&&void 0!==t?t:[]).filter((t=>t.slug!==e.slug));b({..._,[e.source]:n}),e.fontFace&&e.fontFace.forEach((e=>{Em(e,"all")}))},V=e=>{const t=e.map((({id:e,fontFace:t,...n})=>({...n,...t&&t.length>0?{fontFace:t.map((({id:e,...t})=>t))}:{}})));b({..._,custom:_m(_?.custom,t)}),t.forEach((e=>{e.fontFace&&e.fontFace.forEach((e=>{bm(e,wm(e.src),"all")}))}))},[L,B]=(0,g.useState)([]),z=async()=>{const e=await async function(){const e={path:`${am}?_fields=slug,name,description`,method:"GET"};return await Xt()(e)}();B(e)};return(0,g.useEffect)((()=>{z()}),[]),(0,l.createElement)(Im.Provider,{value:{libraryFontSelected:C,handleSetLibraryFontSelected:e=>{if(d(null),!e)return void k(null);const t=("theme"===e.source?T:A).find((t=>t.slug===e.slug));k({...t||e,source:e.source})},themeFonts:T,baseThemeFonts:I,customFonts:M,baseCustomFonts:A,isFontActivated:R,getFontFacesActivated:(e,t)=>F(t)[e]||[],loadFontFaceAsset:async e=>{if(!e.src)return;const t=wm(e.src);t&&!O.has(t)&&(bm(e,t,"document"),O.add(t))},installFonts:async function(e){i(!0);try{const r=[];let a=[];for(const t of e){let e=!1,n=await om(t.slug);n||(e=!0,n=await sm(Sm(t)));const s=n.fontFace&&t.fontFace?n.fontFace.filter((e=>km(e,t.fontFace))):[];n.fontFace&&t.fontFace&&(t.fontFace=t.fontFace.filter((e=>!km(e,n.fontFace))));let i=[],o=[];if(t?.fontFace?.length>0){const e=await Cm(n.id,xm(t));i=e?.successes,o=e?.errors}(i?.length>0||s?.length>0)&&(n.fontFace=[...i],r.push(n)),n&&!t?.fontFace?.length&&r.push(n),e&&t?.fontFace?.length>0&&0===i?.length&&await lm(n.id),a=a.concat(o)}if(a=a.reduce(((e,t)=>e.includes(t.message)?e:[...e,t.message]),[]),r.length>0&&(V(r),await t("root","globalStyles",n,["settings.typography.fontFamilies"]),p()),a.length>0){const e=new Error((0,E.__)("There was an error installing fonts."));throw e.installationErrors=a,e}}finally{i(!1)}},uninstallFontFamily:async function(e){try{const r=await lm(e.id);return r.deleted&&(D(e),await t("root","globalStyles",n,["settings.typography.fontFamilies"])),p(),r}catch(e){throw console.error("There was an error uninstalling the font family:",e),e}},toggleActivateFont:(e,t)=>{var n;const r=Tm(e,t,null!==(n=_?.[e.source])&&void 0!==n?n:[]);b({..._,[e.source]:r});R(e.slug,t?.fontStyle,t?.fontWeight,e.source)?bm(t,wm(t?.src),"all"):Em(t,"all")},getAvailableFontsOutline:N,modalTabOpen:S,toggleModal:e=>{x(e||null)},refreshLibrary:p,notice:u,setNotice:d,saveFontFamilies:()=>{t("root","globalStyles",n,["settings.typography.fontFamilies"])},fontFamiliesHasChanges:a,isResolvingLibrary:f,hasResolvedLibrary:y,isInstalling:s,collections:L,getFontCollection:async e=>{try{if(!!L.find((t=>t.slug===e))?.font_families)return;const t=await async function(e){const t={path:`${am}/${e}`,method:"GET"};return await Xt()(t)}(e),n=L.map((n=>n.slug===e?{...n,...t}:n));B(n)}catch(e){throw console.error(e),e}}}},e)};const Am=function({font:e,text:t}){const n=(0,g.useRef)(null),r=function(e){return e.fontStyle||e.fontWeight?e:e.fontFace&&e.fontFace.length?e.fontFace.find((e=>"normal"===e.fontStyle&&"400"===e.fontWeight))||e.fontFace[0]:{fontStyle:"normal",fontWeight:"400",fontFamily:e.fontFamily,fake:!0}}(e),a=hm(e);t=t||e.name;const s=e.preview,[i,o]=(0,g.useState)(!1),[c,u]=(0,g.useState)(!1),{loadFontFaceAsset:d}=(0,g.useContext)(Im),m=null!=s?s:function(e){return e.preview?e.preview:e.src?Array.isArray(e.src)?e.src[0]:e.src:void 0}(r),p=m&&m.match(/\.(png|jpg|jpeg|gif|svg)$/i);var h;const f={fontSize:"18px",lineHeight:1,opacity:c?"1":"0",...a,...{fontFamily:mm((h=r).fontFamily),fontStyle:h.fontStyle||"normal",fontWeight:h.fontWeight||"400"}};return(0,g.useEffect)((()=>{const e=new window.IntersectionObserver((([e])=>{o(e.isIntersecting)}),{});return e.observe(n.current),()=>e.disconnect()}),[n]),(0,g.useEffect)((()=>{(async()=>{i&&(!p&&r.src&&await d(r),u(!0))})()}),[r,i,d,p]),(0,l.createElement)("div",{ref:n},p?(0,l.createElement)("img",{src:m,loading:"lazy",alt:t,className:"font-library-modal__font-variant_demo-image"}):(0,l.createElement)(b.__experimentalText,{style:f,className:"font-library-modal__font-variant_demo-text"},t))};const Om=function({font:e,onClick:t,variantsText:n,navigatorPath:r}){const a=e.fontFace?.length||1,s={cursor:t?"pointer":"default"},i=(0,b.__experimentalUseNavigator)();return(0,l.createElement)(b.Button,{onClick:()=>{t(),r&&i.goTo(r)},style:s,className:"font-library-modal__font-card"},(0,l.createElement)(b.Flex,{justify:"space-between",wrap:!1},(0,l.createElement)(Am,{font:e}),(0,l.createElement)(b.Flex,{justify:"flex-end"},(0,l.createElement)(b.FlexItem,null,(0,l.createElement)(b.__experimentalText,{className:"font-library-modal__font-card__count"},n||(0,E.sprintf)((0,E._n)("%d variant","%d variants",a),a))),(0,l.createElement)(b.FlexItem,null,(0,l.createElement)(b.Icon,{icon:ur})))))};const Nm=function({face:e,font:t}){const{isFontActivated:n,toggleActivateFont:r}=(0,g.useContext)(Im),a=t?.fontFace?.length>0?n(t.slug,e.fontStyle,e.fontWeight,t.source):n(t.slug,null,null,t.source),s=()=>{t?.fontFace?.length>0?r(t,e):r(t)},i=t.name+" "+ym(e),{kebabCase:o}=Xe(b.privateApis),c=o(`${t.slug}-${ym(e)}`);return(0,l.createElement)("div",{className:"font-library-modal__font-card"},(0,l.createElement)(b.Flex,{justify:"flex-start",align:"center",gap:"1rem"},(0,l.createElement)(b.CheckboxControl,{checked:a,onChange:s,__nextHasNoMarginBottom:!0,id:c}),(0,l.createElement)("label",{htmlFor:c},(0,l.createElement)(Am,{font:e,text:i,onClick:s}))))};function Fm(e){switch(e){case"normal":return 400;case"bold":return 700;case"bolder":return 500;case"lighter":return 300;default:return parseInt(e,10)}}function Rm(e){return e.sort(((e,t)=>"normal"===e.fontStyle&&"normal"!==t.fontStyle?-1:"normal"===t.fontStyle&&"normal"!==e.fontStyle?1:e.fontStyle===t.fontStyle?Fm(e.fontWeight)-Fm(t.fontWeight):e.fontStyle.localeCompare(t.fontStyle)))}const{ProgressBar:Dm}=Xe(b.privateApis);function Vm({font:e,isOpen:t,setIsOpen:n,setNotice:r,uninstallFontFamily:a,handleSetLibraryFontSelected:s}){const i=(0,b.__experimentalUseNavigator)();return(0,l.createElement)(b.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,E.__)("Cancel"),confirmButtonText:(0,E.__)("Delete"),onCancel:()=>{n(!1)},onConfirm:async()=>{r(null),n(!1);try{await a(e),i.goBack(),s(null),r({type:"success",message:(0,E.__)("Font family uninstalled successfully.")})}catch(e){r({type:"error",message:(0,E.__)("There was an error uninstalling the font family. ")+e.message})}}},e&&(0,E.sprintf)((0,E.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),e.name))}const Lm=function(){const{baseCustomFonts:e,libraryFontSelected:t,baseThemeFonts:n,handleSetLibraryFontSelected:r,refreshLibrary:a,uninstallFontFamily:s,isResolvingLibrary:i,isInstalling:o,saveFontFamilies:c,getFontFacesActivated:u,fontFamiliesHasChanges:d,notice:p,setNotice:h}=(0,g.useContext)(Im),[f,y]=(0,g.useState)(!1),v="custom"===t?.source&&t?.id,_=(0,m.useSelect)((e=>{const{canUser:t}=e(ye.store);return v&&t("delete","font-families",v)}),[v]),w=!!t&&"theme"!==t?.source&&_,S=e=>{const t=e?.fontFace?.length>0?e.fontFace.length:1,n=u(e.slug,e.source).length;return(0,E.sprintf)((0,E.__)("%1$s/%2$s variants active"),n,t)};return(0,g.useEffect)((()=>{r(t),a()}),[]),(0,l.createElement)("div",{className:"font-library-modal__tabpanel-layout"},i&&(0,l.createElement)(b.__experimentalHStack,{align:"center"},(0,l.createElement)(b.__experimentalSpacer,null),(0,l.createElement)(b.Spinner,null),(0,l.createElement)(b.__experimentalSpacer,null)),(0,l.createElement)(b.__experimentalNavigatorProvider,{initialPath:t?"/fontFamily":"/"},(0,l.createElement)(b.__experimentalNavigatorScreen,{path:"/"},p&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.__experimentalSpacer,{margin:1}),(0,l.createElement)(b.Notice,{status:p.type,onRemove:()=>h(null)},p.message),(0,l.createElement)(b.__experimentalSpacer,{margin:1})),e.length>0&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.__experimentalText,{className:"font-library-modal__subtitle"},(0,E.__)("Installed Fonts")),(0,l.createElement)(b.__experimentalSpacer,{margin:2}),e.map((e=>(0,l.createElement)(Om,{font:e,key:e.slug,navigatorPath:"/fontFamily",variantsText:S(e),onClick:()=>{r(e)}}))),(0,l.createElement)(b.__experimentalSpacer,{margin:8})),n.length>0&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.__experimentalText,{className:"font-library-modal__subtitle"},(0,E.__)("Theme Fonts")),(0,l.createElement)(b.__experimentalSpacer,{margin:2}),n.map((e=>(0,l.createElement)(Om,{font:e,key:e.slug,navigatorPath:"/fontFamily",variantsText:S(e),onClick:()=>{r(e)}})))),(0,l.createElement)(b.__experimentalSpacer,{margin:16})),(0,l.createElement)(b.__experimentalNavigatorScreen,{path:"/fontFamily"},(0,l.createElement)(Vm,{font:t,isOpen:f,setIsOpen:y,setNotice:h,uninstallFontFamily:s,handleSetLibraryFontSelected:r}),(0,l.createElement)(b.Flex,{justify:"flex-start"},(0,l.createElement)(b.__experimentalNavigatorToParentButton,{icon:dr,isSmall:!0,onClick:()=>{r(null)},"aria-label":(0,E.__)("Navigate to the previous view")}),(0,l.createElement)(b.__experimentalHeading,{level:2,size:13,className:"edit-site-global-styles-header"},t?.name)),p&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.__experimentalSpacer,{margin:1}),(0,l.createElement)(b.Notice,{status:p.type,onRemove:()=>h(null)},p.message),(0,l.createElement)(b.__experimentalSpacer,{margin:1})),(0,l.createElement)(b.__experimentalSpacer,{margin:4}),(0,l.createElement)(b.__experimentalText,null,(0,E.__)("Choose font variants. Keep in mind that too many variants could make your site slower.")),(0,l.createElement)(b.__experimentalSpacer,{margin:4}),(0,l.createElement)(b.__experimentalVStack,{spacing:0},(0,l.createElement)(b.__experimentalSpacer,{margin:8}),(e=>e?e.fontFace&&e.fontFace.length?Rm(e.fontFace):[{fontFamily:e.fontFamily,fontStyle:"normal",fontWeight:"400"}]:[])(t).map(((e,n)=>(0,l.createElement)(Nm,{font:t,face:e,key:`face${n}`})))))),(0,l.createElement)(b.__experimentalHStack,{justify:"flex-end",className:"font-library-modal__tabpanel-layout__footer"},o&&(0,l.createElement)(Dm,null),w&&(0,l.createElement)(b.Button,{isDestructive:!0,variant:"tertiary",onClick:()=>{y(!0)}},(0,E.__)("Delete")),(0,l.createElement)(b.Button,{variant:"primary",onClick:c,disabled:!d,__experimentalIsFocusable:!0},(0,E.__)("Update"))))};function Bm(e,t,n){return t?!!n[e]?.[`${t.fontStyle}-${t.fontWeight}`]:!!n[e]}const zm=function(){return(0,l.createElement)("div",{className:"font-library__google-fonts-confirm"},(0,l.createElement)(b.Card,null,(0,l.createElement)(b.CardBody,null,(0,l.createElement)(b.__experimentalText,{as:"h3"},(0,E.__)("Connect to Google Fonts")),(0,l.createElement)(b.__experimentalSpacer,{margin:6}),(0,l.createElement)(b.__experimentalText,{as:"p"},(0,E.__)("To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts.")),(0,l.createElement)(b.__experimentalSpacer,{margin:3}),(0,l.createElement)(b.__experimentalText,{as:"p"},(0,E.__)("You can alternatively upload files directly on the Upload tab.")),(0,l.createElement)(b.__experimentalSpacer,{margin:6}),(0,l.createElement)(b.Button,{variant:"primary",onClick:()=>{window.localStorage.setItem("wp-font-library-google-fonts-permission","true"),window.dispatchEvent(new Event("storage"))}},(0,E.__)("Allow access to Google Fonts")))))};const Hm=function({face:e,font:t,handleToggleVariant:n,selected:r}){const a=()=>{t?.fontFace?n(t,e):n(t)},s=t.name+" "+ym(e),{kebabCase:i}=Xe(b.privateApis),o=i(`${t.slug}-${ym(e)}`);return(0,l.createElement)("div",{className:"font-library-modal__font-card"},(0,l.createElement)(b.Flex,{justify:"flex-start",align:"center",gap:"1rem"},(0,l.createElement)(b.CheckboxControl,{checked:r,onChange:a,__nextHasNoMarginBottom:!0,id:o}),(0,l.createElement)("label",{htmlFor:o},(0,l.createElement)(Am,{font:e,text:s,onClick:a}))))},Gm={slug:"all",name:(0,E._x)("All","font categories")},Um="wp-font-library-google-fonts-permission";const Wm=function({slug:e}){var t;const n="google-fonts"===e,r=()=>"true"===window.localStorage.getItem(Um),[a,s]=(0,g.useState)(null),[i,o]=(0,g.useState)([]),[c,u]=(0,g.useState)(1),[d,m]=(0,g.useState)({}),[p,h]=(0,g.useState)(n&&!r()),{collections:f,getFontCollection:y,installFonts:v,isInstalling:_,notice:w,setNotice:S}=(0,g.useContext)(Im),x=f.find((t=>t.slug===e));(0,g.useEffect)((()=>{const e=()=>{h(n&&!r())};return e(),window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[e,n]);const C=()=>{window.localStorage.setItem(Um,"false"),window.dispatchEvent(new Event("storage"))};(0,g.useEffect)((()=>{(async()=>{try{await y(e),L()}catch(e){w||S({type:"error",message:e?.message})}})()}),[e,y,S,w]),(0,g.useEffect)((()=>{s(null),S(null)}),[e,S]),(0,g.useEffect)((()=>{o([])}),[a]);const k=(0,g.useMemo)((()=>{var e;return null!==(e=x?.font_families)&&void 0!==e?e:[]}),[x]),T=null!==(t=x?.categories)&&void 0!==t?t:[],I=[Gm,...T],M=(0,g.useMemo)((()=>function(e,t){const{category:n,search:r}=t;let a=e||[];return n&&"all"!==n&&(a=a.filter((e=>-1!==e.categories.indexOf(n)))),r&&(a=a.filter((e=>e.font_family_settings.name.toLowerCase().includes(r.toLowerCase())))),a}(k,d)),[k,d]),A=Math.max(window.innerHeight,500),O=Math.floor((A-417)/61),N=Math.ceil(M.length/O),F=(c-1)*O,R=c*O,D=M.slice(F,R),V=(0,ie.debounce)((e=>{m({...d,search:e}),u(1)}),300),L=()=>{m({}),u(1)},B=(e,t)=>{const n=Tm(e,t,i);o(n)},z=function(e){return e.reduce(((e,t)=>({...e,[t.slug]:(t?.fontFace||[]).reduce(((e,t)=>({...e,[`${t.fontStyle}-${t.fontWeight}`]:!0})),{})})),{})}(i);return p?(0,l.createElement)(zm,null):(0,l.createElement)("div",{className:"font-library-modal__tabpanel-layout"},(0,l.createElement)(b.__experimentalNavigatorProvider,{initialPath:"/",className:"font-library-modal__tabpanel-layout"},(0,l.createElement)(b.__experimentalNavigatorScreen,{path:"/"},(0,l.createElement)(b.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(b.__experimentalVStack,null,(0,l.createElement)(b.__experimentalHeading,{level:2,size:13},x.name),(0,l.createElement)(b.__experimentalText,null,x.description)),(0,l.createElement)((()=>"google-fonts"!==e||p||a?null:(0,l.createElement)(b.DropdownMenu,{icon:ue,label:(0,E.__)("Actions"),popoverProps:{position:"bottom left"},controls:[{title:(0,E.__)("Revoke access to Google Fonts"),onClick:C}]})),null)),(0,l.createElement)(b.__experimentalSpacer,{margin:4}),(0,l.createElement)(b.Flex,null,(0,l.createElement)(b.FlexItem,null,(0,l.createElement)(b.__experimentalInputControl,{value:d.search,placeholder:(0,E.__)("Font name…"),label:(0,E.__)("Search"),onChange:V,prefix:(0,l.createElement)(b.Icon,{icon:Va}),suffix:d?.search?(0,l.createElement)(b.Icon,{icon:P,onClick:()=>{m({...d,search:""}),u(1)}}):null})),(0,l.createElement)(b.FlexItem,null,(0,l.createElement)(b.SelectControl,{label:(0,E.__)("Category"),value:d.category,onChange:e=>{m({...d,category:e}),u(1)}},I&&I.map((e=>(0,l.createElement)("option",{value:e.slug,key:e.slug},e.name)))))),(0,l.createElement)(b.__experimentalSpacer,{margin:4}),!x?.font_families&&!w&&(0,l.createElement)(b.Spinner,null),!!x?.font_families?.length&&!M.length&&(0,l.createElement)(b.__experimentalText,null,(0,E.__)("No fonts found. Try with a different search term")),(0,l.createElement)("div",{className:"font-library-modal__fonts-grid__main"},D.map((e=>(0,l.createElement)(Om,{key:e.font_family_settings.slug,font:e.font_family_settings,navigatorPath:"/fontFamily",onClick:()=>{s(e.font_family_settings)}}))))),(0,l.createElement)(b.__experimentalNavigatorScreen,{path:"/fontFamily"},(0,l.createElement)(b.Flex,{justify:"flex-start"},(0,l.createElement)(b.__experimentalNavigatorToParentButton,{icon:dr,isSmall:!0,onClick:()=>{s(null)},"aria-label":(0,E.__)("Navigate to the previous view")}),(0,l.createElement)(b.__experimentalHeading,{level:2,size:13,className:"edit-site-global-styles-header"},a?.name)),w&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.__experimentalSpacer,{margin:1}),(0,l.createElement)(b.Notice,{status:w.type,onRemove:()=>S(null)},w.message),(0,l.createElement)(b.__experimentalSpacer,{margin:1})),(0,l.createElement)(b.__experimentalSpacer,{margin:4}),(0,l.createElement)(b.__experimentalText,null," ",(0,E.__)("Select font variants to install.")," "),(0,l.createElement)(b.__experimentalSpacer,{margin:4}),(0,l.createElement)(b.__experimentalVStack,{spacing:0},(0,l.createElement)(b.__experimentalSpacer,{margin:8}),(H=a,H?H.fontFace&&H.fontFace.length?Rm(H.fontFace):[{fontFamily:H.fontFamily,fontStyle:"normal",fontWeight:"400"}]:[]).map(((e,t)=>(0,l.createElement)(Hm,{font:a,face:e,key:`face${t}`,handleToggleVariant:B,selected:Bm(a.slug,a.fontFace?e:null,z)})))),(0,l.createElement)(b.__experimentalSpacer,{margin:16}))),a&&(0,l.createElement)(b.Flex,{justify:"flex-end",className:"font-library-modal__tabpanel-layout__footer"},(0,l.createElement)(b.Button,{variant:"primary",onClick:async()=>{S(null);const e=i[0];try{e?.fontFace&&await Promise.all(e.fontFace.map((async e=>{e.src&&(e.file=await async function(e){e=Array.isArray(e)?e:[e];const t=await Promise.all(e.map((async e=>fetch(new Request(e)).then((t=>{if(!t.ok)throw new Error(`Error downloading font face asset from ${e}. Server responded with status: ${t.status}`);return t.blob()})).then((t=>{const n=e.split("/").pop();return new fm([t],n,{type:t.type})})))));return 1===t.length?t[0]:t}(e.src))})))}catch(e){return void S({type:"error",message:(0,E.__)("Error installing the fonts, could not be downloaded.")})}try{await v([e]),S({type:"success",message:(0,E.__)("Fonts were installed successfully.")})}catch(e){S({type:"error",message:e.message})}o([])},isBusy:_,disabled:0===i.length||_,__experimentalIsFocusable:!0},(0,E.__)("Install"))),!a&&(0,l.createElement)(b.Flex,{justify:"center",className:"font-library-modal__tabpanel-layout__footer"},(0,l.createElement)(b.Button,{label:(0,E.__)("First page"),size:"compact",onClick:()=>u(1),disabled:1===c,__experimentalIsFocusable:!0},(0,l.createElement)("span",null,"«")),(0,l.createElement)(b.Button,{label:(0,E.__)("Previous page"),size:"compact",onClick:()=>u(c-1),disabled:1===c,__experimentalIsFocusable:!0},(0,l.createElement)("span",null,"‹")),(0,l.createElement)(b.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:2},(0,g.createInterpolateElement)((0,E.sprintf)((0,E._x)("Page <CurrentPageControl /> of %s","paging"),N),{CurrentPageControl:(0,l.createElement)(b.SelectControl,{"aria-label":(0,E.__)("Current page"),value:c,options:[...Array(N)].map(((e,t)=>({label:t+1,value:t+1}))),onChange:e=>u(parseInt(e)),size:"compact",__nextHasNoMarginBottom:!0})})),(0,l.createElement)(b.Button,{label:(0,E.__)("Next page"),size:"compact",onClick:()=>u(c+1),disabled:c===N,__experimentalIsFocusable:!0},(0,l.createElement)("span",null,"›")),(0,l.createElement)(b.Button,{label:(0,E.__)("Last page"),size:"compact",onClick:()=>u(N),disabled:c===N,__experimentalIsFocusable:!0},(0,l.createElement)("span",null,"»"))));var H};var jm=a(8572),Zm=a.n(jm),qm=a(4660),Ym=a.n(qm);globalThis.fetch;class Km{constructor(e,t={},n){this.type=e,this.detail=t,this.msg=n,Object.defineProperty(this,"__mayPropagate",{enumerable:!1,writable:!0}),this.__mayPropagate=!0}preventDefault(){}stopPropagation(){this.__mayPropagate=!1}valueOf(){return this}toString(){return this.msg?`[${this.type} event]: ${this.msg}`:`[${this.type} event]`}}class Xm{constructor(){this.listeners={}}addEventListener(e,t,n){let r=this.listeners[e]||[];n?r.unshift(t):r.push(t),this.listeners[e]=r}removeEventListener(e,t){let n=this.listeners[e]||[],r=n.findIndex((e=>e===t));r>-1&&(n.splice(r,1),this.listeners[e]=n)}dispatch(e){let t=this.listeners[e.type];if(t)for(let n=0,r=t.length;n<r&&e.__mayPropagate;n++)t[n](e)}}const Jm=new Date("1904-01-01T00:00:00+0000").getTime();class Qm{constructor(e,t,n){this.name=(n||e.tag||"").trim(),this.length=e.length,this.start=e.offset,this.offset=0,this.data=t,["getInt8","getUint8","getInt16","getUint16","getInt32","getUint32","getBigInt64","getBigUint64"].forEach((e=>{let t=e.replace(/get(Big)?/,"").toLowerCase(),n=parseInt(e.replace(/[^\d]/g,""))/8;Object.defineProperty(this,t,{get:()=>this.getValue(e,n)})}))}get currentPosition(){return this.start+this.offset}set currentPosition(e){this.start=e,this.offset=0}skip(e=0,t=8){this.offset+=e*t/8}getValue(e,t){let n=this.start+this.offset;this.offset+=t;try{return this.data[e](n)}catch(n){throw console.error("parser",e,t,this),console.error("parser",this.start,this.offset),n}}flags(e){if(8===e||16===e||32===e||64===e)return this[`uint${e}`].toString(2).padStart(e,0).split("").map((e=>"1"===e));console.error("Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long"),console.trace()}get tag(){const e=this.uint32;return t=[e>>24&255,e>>16&255,e>>8&255,255&e],Array.from(t).map((e=>String.fromCharCode(e))).join("");var t}get fixed(){return this.int16+Math.round(1e3*this.uint16/65356)/1e3}get legacyFixed(){let e=this.uint16,t=this.uint16.toString(16).padStart(4,0);return parseFloat(`${e}.${t}`)}get uint24(){return(this.uint8<<16)+(this.uint8<<8)+this.uint8}get uint128(){let e=0;for(let t=0;t<5;t++){let t=this.uint8;if(e=128*e+(127&t),t<128)break}return e}get longdatetime(){return new Date(Jm+1e3*parseInt(this.int64.toString()))}get fword(){return this.int16}get ufword(){return this.uint16}get Offset16(){return this.uint16}get Offset32(){return this.uint32}get F2DOT14(){const e=p.uint16;return[0,1,-2,-1][e>>14]+(16383&e)/16384}verifyLength(){this.offset!=this.length&&console.error(`unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`)}readBytes(e=0,t=0,n=8,r=!1){if(0===(e=e||this.length))return[];t&&(this.currentPosition=t);const a=`${r?"":"u"}int${n}`,s=[];for(;e--;)s.push(this[a]);return s}}class $m{constructor(e){const t={enumerable:!1,get:()=>e};Object.defineProperty(this,"parser",t);const n=e.currentPosition,r={enumerable:!1,get:()=>n};Object.defineProperty(this,"start",r)}load(e){Object.keys(e).forEach((t=>{let n=Object.getOwnPropertyDescriptor(e,t);n.get?this[t]=n.get.bind(this):void 0!==n.value&&(this[t]=n.value)})),this.parser.length&&this.parser.verifyLength()}}class ep extends $m{constructor(e,t,n){const{parser:r,start:a}=super(new Qm(e,t,n)),s={enumerable:!1,get:()=>r};Object.defineProperty(this,"p",s);const i={enumerable:!1,get:()=>a};Object.defineProperty(this,"tableStart",i)}}function tp(e,t,n){let r;Object.defineProperty(e,t,{get:()=>r||(r=n(),r),enumerable:!0})}class np extends ep{constructor(e,t,n){const{p:r}=super({offset:0,length:12},t,"sfnt");this.version=r.uint32,this.numTables=r.uint16,this.searchRange=r.uint16,this.entrySelector=r.uint16,this.rangeShift=r.uint16,r.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new rp(r))),this.tables={},this.directory.forEach((e=>{tp(this.tables,e.tag.trim(),(()=>n(this.tables,{tag:e.tag,offset:e.offset,length:e.length},t)))}))}}class rp{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}}const ap=Ym().inflate||void 0;let sp;class ip extends ep{constructor(e,t,n){const{p:r}=super({offset:0,length:44},t,"woff");this.signature=r.tag,this.flavor=r.uint32,this.length=r.uint32,this.numTables=r.uint16,r.uint16,this.totalSfntSize=r.uint32,this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.metaOffset=r.uint32,this.metaLength=r.uint32,this.metaOrigLength=r.uint32,this.privOffset=r.uint32,this.privLength=r.uint32,r.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new op(r))),lp(this,t,n)}}class op{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}}function lp(e,t,n){e.tables={},e.directory.forEach((r=>{tp(e.tables,r.tag.trim(),(()=>{let a=0,s=t;if(r.compLength!==r.origLength){const e=t.buffer.slice(r.offset,r.offset+r.compLength);let n;if(ap)n=ap(new Uint8Array(e));else{if(!sp){const e="no brotli decoder available to decode WOFF2 font";throw font.onerror&&font.onerror(e),new Error(e)}n=sp(new Uint8Array(e))}s=new DataView(n.buffer)}else a=r.offset;return n(e.tables,{tag:r.tag,offset:a,length:r.origLength},s)}))}))}const cp=Zm();let up;class dp extends ep{constructor(e,t,n){const{p:r}=super({offset:0,length:48},t,"woff2");this.signature=r.tag,this.flavor=r.uint32,this.length=r.uint32,this.numTables=r.uint16,r.uint16,this.totalSfntSize=r.uint32,this.totalCompressedSize=r.uint32,this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.metaOffset=r.uint32,this.metaLength=r.uint32,this.metaOrigLength=r.uint32,this.privOffset=r.uint32,this.privLength=r.uint32,r.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new mp(r)));let a,s=r.currentPosition;this.directory[0].offset=0,this.directory.forEach(((e,t)=>{let n=this.directory[t+1];n&&(n.offset=e.offset+(void 0!==e.transformLength?e.transformLength:e.origLength))}));let i=t.buffer.slice(s);if(cp)a=cp(new Uint8Array(i));else{if(!up){const t="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(t),new Error(t)}a=new Uint8Array(up(i))}!function(e,t,n){e.tables={},e.directory.forEach((r=>{tp(e.tables,r.tag.trim(),(()=>{const a=r.offset,s=a+(r.transformLength?r.transformLength:r.origLength),i=new DataView(t.slice(a,s).buffer);try{return n(e.tables,{tag:r.tag,offset:0,length:r.origLength},i)}catch(e){console.error(e)}}))}))}(this,a,n)}}class mp{constructor(e){this.flags=e.uint8;const t=this.tagNumber=63&this.flags;this.tag=63===t?e.tag:["cmap","head","hhea","hmtx","maxp","name","OS/2","post","cvt ","fpgm","glyf","loca","prep","CFF ","VORG","EBDT","EBLC","gasp","hdmx","kern","LTSH","PCLT","VDMX","vhea","vmtx","BASE","GDEF","GPOS","GSUB","EBSC","JSTF","MATH","CBDT","CBLC","COLR","CPAL","SVG ","sbix","acnt","avar","bdat","bloc","bsln","cvar","fdsc","feat","fmtx","fvar","gvar","hsty","just","lcar","mort","morx","opbd","prop","trak","Zapf","Silf","Glat","Gloc","Feat","Sill"][63&t];let n=0!==(this.transformVersion=(192&this.flags)>>6);"glyf"!==this.tag&&"loca"!==this.tag||(n=3!==this.transformVersion),this.origLength=e.uint128,n&&(this.transformLength=e.uint128)}}const pp={};let hp=!1;function fp(e,t,n){let r=t.tag.replace(/[^\w\d]/g,""),a=pp[r];return a?new a(t,n,e):(console.warn(`lib-font has no definition for ${r}. The table was skipped.`),{})}function gp(){let e=0;function t(n,r){if(!hp)return e>10?r(new Error("loading took too long")):(e++,setTimeout((()=>t(n)),250));n(fp)}return new Promise(((e,n)=>t(e)))}async function yp(e,t,n={}){if(!globalThis.document)return;let r=function(e,t){let n=e.lastIndexOf("."),r=(e.substring(n+1)||"").toLowerCase(),a={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"}[r];if(a)return a;let s={eot:"The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.",svg:"The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.",fon:"The .fon format is not supported: this is an ancient Windows bitmap font format.",ttc:"Based on the current CSS specification, font collections are not (yet?) supported."}[r];if(s||(s=`${e} is not a known webfont format.`),t)throw new Error(s);console.warn(`Could not load font: ${s}`)}(t,n.errorOnStyle);if(!r)return;let a=document.createElement("style");a.className="injected-by-Font-js";let s=[];return n.styleRules&&(s=Object.entries(n.styleRules).map((([e,t])=>`${e}: ${t};`))),a.textContent=`\n@font-face {\n font-family: "${e}";\n ${s.join("\n\t")}\n src: url("${t}") format("${r}");\n}`,globalThis.document.head.appendChild(a),a}Promise.all([Promise.resolve().then((function(){return zp})),Promise.resolve().then((function(){return Hp})),Promise.resolve().then((function(){return Gp})),Promise.resolve().then((function(){return Wp})),Promise.resolve().then((function(){return jp})),Promise.resolve().then((function(){return Yp})),Promise.resolve().then((function(){return Kp})),Promise.resolve().then((function(){return Jp})),Promise.resolve().then((function(){return lh})),Promise.resolve().then((function(){return bh})),Promise.resolve().then((function(){return vf})),Promise.resolve().then((function(){return _f})),Promise.resolve().then((function(){return wf})),Promise.resolve().then((function(){return Cf})),Promise.resolve().then((function(){return kf})),Promise.resolve().then((function(){return Tf})),Promise.resolve().then((function(){return If})),Promise.resolve().then((function(){return Mf})),Promise.resolve().then((function(){return Af})),Promise.resolve().then((function(){return Of})),Promise.resolve().then((function(){return Nf})),Promise.resolve().then((function(){return Ff})),Promise.resolve().then((function(){return Df})),Promise.resolve().then((function(){return Hf})),Promise.resolve().then((function(){return Uf})),Promise.resolve().then((function(){return Wf})),Promise.resolve().then((function(){return jf})),Promise.resolve().then((function(){return Zf})),Promise.resolve().then((function(){return qf})),Promise.resolve().then((function(){return Xf})),Promise.resolve().then((function(){return tg})),Promise.resolve().then((function(){return ag})),Promise.resolve().then((function(){return ig})),Promise.resolve().then((function(){return cg})),Promise.resolve().then((function(){return ug})),Promise.resolve().then((function(){return dg})),Promise.resolve().then((function(){return pg})),Promise.resolve().then((function(){return hg})),Promise.resolve().then((function(){return vg})),Promise.resolve().then((function(){return _g})),Promise.resolve().then((function(){return Eg}))]).then((e=>{e.forEach((e=>{let t=Object.keys(e)[0];pp[t]=e[t]})),hp=!0}));const vp=[0,1,0,0],_p=[79,84,84,79],bp=[119,79,70,70],Ep=[119,79,70,50];function wp(e,t){if(e.length===t.length){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}class Sp extends Xm{constructor(e,t={}){super(),this.name=e,this.options=t,this.metrics=!1}get src(){return this.__src}set src(e){this.__src=e,(async()=>{globalThis.document&&!this.options.skipStyleSheet&&await yp(this.name,e,this.options),this.loadFont(e)})()}async loadFont(e,t){fetch(e).then((e=>function(e){if(!e.ok)throw new Error(`HTTP ${e.status} - ${e.statusText}`);return e}(e)&&e.arrayBuffer())).then((n=>this.fromDataBuffer(n,t||e))).catch((n=>{const r=new Km("error",n,`Failed to load font at ${t||e}`);this.dispatch(r),this.onerror&&this.onerror(r)}))}async fromDataBuffer(e,t){this.fontData=new DataView(e);let n=function(e){const t=[e.getUint8(0),e.getUint8(1),e.getUint8(2),e.getUint8(3)];return wp(t,vp)||wp(t,_p)?"SFNT":wp(t,bp)?"WOFF":wp(t,Ep)?"WOFF2":void 0}(this.fontData);if(!n)throw new Error(`${t} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(n);const r=new Km("load",{font:this});this.dispatch(r),this.onload&&this.onload(r)}async parseBasicData(e){return gp().then((t=>("SFNT"===e&&(this.opentype=new np(this,this.fontData,t)),"WOFF"===e&&(this.opentype=new ip(this,this.fontData,t)),"WOFF2"===e&&(this.opentype=new dp(this,this.fontData,t)),this.opentype)))}getGlyphId(e){return this.opentype.tables.cmap.getGlyphId(e)}reverse(e){return this.opentype.tables.cmap.reverse(e)}supports(e){return 0!==this.getGlyphId(e)}supportsVariation(e){return!1!==this.opentype.tables.cmap.supportsVariation(e)}measureText(e,t=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let n=document.createElement("div");n.textContent=e,n.style.fontFamily=this.name,n.style.fontSize=`${t}px`,n.style.color="transparent",n.style.background="transparent",n.style.top="0",n.style.left="0",n.style.position="absolute",document.body.appendChild(n);let r=n.getBoundingClientRect();document.body.removeChild(n);const a=this.opentype.tables["OS/2"];return r.fontSize=t,r.ascender=a.sTypoAscender,r.descender=a.sTypoDescender,r}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);const e=new Km("unload",{font:this});this.dispatch(e),this.onunload&&this.onunload(e)}this._unloaded=!0}load(){if(this.__unloaded){delete this.__unloaded,document.head.appendChild(this.styleElement);const e=new Km("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}}globalThis.Font=Sp;class xp extends $m{constructor(e,t,n){super(e),this.plaformID=t,this.encodingID=n}}class Cp extends xp{constructor(e,t,n){super(e,t,n),this.format=0,this.length=e.uint16,this.language=e.uint16,this.glyphIdArray=[...new Array(256)].map((t=>e.uint8))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=e&&e<=255}reverse(e){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}}class kp extends xp{constructor(e,t,n){super(e,t,n),this.format=2,this.length=e.uint16,this.language=e.uint16,this.subHeaderKeys=[...new Array(256)].map((t=>e.uint16));const r=Math.max(...this.subHeaderKeys),a=e.currentPosition;tp(this,"subHeaders",(()=>(e.currentPosition=a,[...new Array(r)].map((t=>new Tp(e))))));const s=a+8*r;tp(this,"glyphIndexArray",(()=>(e.currentPosition=s,[...new Array(r)].map((t=>e.uint16)))))}supports(e){e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));const t=e&&255,n=e&&65280,r=this.subHeaders[n],a=this.subHeaders[r],s=a.firstCode,i=s+a.entryCount;return s<=t&&t<=i}reverse(e){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(e=!1){return e?this.subHeaders.map((e=>({firstCode:e.firstCode,lastCode:e.lastCode}))):this.subHeaders.map((e=>({start:e.firstCode,end:e.lastCode})))}}class Tp{constructor(e){this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.first+this.entryCount,this.idDelta=e.int16,this.idRangeOffset=e.uint16}}class Pp extends xp{constructor(e,t,n){super(e,t,n),this.format=4,this.length=e.uint16,this.language=e.uint16,this.segCountX2=e.uint16,this.segCount=this.segCountX2/2,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16;const r=e.currentPosition;tp(this,"endCode",(()=>e.readBytes(this.segCount,r,16)));const a=r+2+this.segCountX2;tp(this,"startCode",(()=>e.readBytes(this.segCount,a,16)));const s=a+this.segCountX2;tp(this,"idDelta",(()=>e.readBytes(this.segCount,s,16,!0)));const i=s+this.segCountX2;tp(this,"idRangeOffset",(()=>e.readBytes(this.segCount,i,16)));const o=i+this.segCountX2,l=this.length-(o-this.tableStart);tp(this,"glyphIdArray",(()=>e.readBytes(l,o,16))),tp(this,"segments",(()=>this.buildSegments(i,o,e)))}buildSegments(e,t,n){return[...new Array(this.segCount)].map(((t,r)=>{let a=this.startCode[r],s=this.endCode[r],i=this.idDelta[r],o=this.idRangeOffset[r],l=e+2*r,c=[];if(0===o)for(let e=a+i,t=s+i;e<=t;e++)c.push(e);else for(let e=0,t=s-a;e<=t;e++)n.currentPosition=l+o+2*e,c.push(n.uint16);return{startCode:a,endCode:s,idDelta:i,idRangeOffset:o,glyphIDs:c}}))}reverse(e){let t=this.segments.find((t=>t.glyphIDs.includes(e)));if(!t)return{};const n=t.startCode+t.glyphIDs.indexOf(e);return{code:n,unicode:String.fromCodePoint(n)}}getGlyphId(e){if(e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343)return 0;if(65534==(65534&e)||65535==(65535&e))return 0;let t=this.segments.find((t=>t.startCode<=e&&e<=t.endCode));return t?t.glyphIDs[e-t.startCode]:0}supports(e){return 0!==this.getGlyphId(e)}getSupportedCharCodes(e=!1){return e?this.segments:this.segments.map((e=>({start:e.startCode,end:e.endCode})))}}class Ip extends xp{constructor(e,t,n){super(e,t,n),this.format=6,this.length=e.uint16,this.language=e.uint16,this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.firstCode+this.entryCount-1;tp(this,"glyphIdArray",(()=>[...new Array(this.entryCount)].map((t=>e.uint16))))}supports(e){if(e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.")),e<this.firstCode)return{};if(e>this.firstCode+this.entryCount)return{};const t=e-this.firstCode;return{code:t,unicode:String.fromCodePoint(t)}}reverse(e){let t=this.glyphIdArray.indexOf(e);if(t>-1)return this.firstCode+t}getSupportedCharCodes(e=!1){return e?[{firstCode:this.firstCode,lastCode:this.lastCode}]:[{start:this.firstCode,end:this.lastCode}]}}class Mp extends xp{constructor(e,t,n){super(e,t,n),this.format=8,e.uint16,this.length=e.uint32,this.language=e.uint32,this.is32=[...new Array(8192)].map((t=>e.uint8)),this.numGroups=e.uint32;tp(this,"groups",(()=>[...new Array(this.numGroups)].map((t=>new Ap(e)))))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.")),-1!==this.groups.findIndex((t=>t.startcharCode<=e&&e<=t.endcharCode))}reverse(e){return console.warn("reverse not implemented for cmap subtable format 8"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startcharCode,end:e.endcharCode})))}}class Ap{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}}class Op extends xp{constructor(e,t,n){super(e,t,n),this.format=10,e.uint16,this.length=e.uint32,this.language=e.uint32,this.startCharCode=e.uint32,this.numChars=e.uint32,this.endCharCode=this.startCharCode+this.numChars;tp(this,"glyphs",(()=>[...new Array(this.numChars)].map((t=>e.uint16))))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.")),!(e<this.startCharCode)&&(!(e>this.startCharCode+this.numChars)&&e-this.startCharCode)}reverse(e){return console.warn("reverse not implemented for cmap subtable format 10"),{}}getSupportedCharCodes(e=!1){return e?[{startCharCode:this.startCharCode,endCharCode:this.endCharCode}]:[{start:this.startCharCode,end:this.endCharCode}]}}class Np extends xp{constructor(e,t,n){super(e,t,n),this.format=12,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;tp(this,"groups",(()=>[...new Array(this.numGroups)].map((t=>new Fp(e)))))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343||65534==(65534&e)||65535==(65535&e)?0:-1!==this.groups.findIndex((t=>t.startCharCode<=e&&e<=t.endCharCode))}reverse(e){for(let t of this.groups){let n=t.startGlyphID;if(n>e)continue;if(n===e)return t.startCharCode;if(n+(t.endCharCode-t.startCharCode)<e)continue;const r=t.startCharCode+(e-n);return{code:r,unicode:String.fromCodePoint(r)}}return{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startCharCode,end:e.endCharCode})))}}class Fp{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}}class Rp extends xp{constructor(e,t,n){super(e,t,n),this.format=13,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;tp(this,"groups",[...new Array(this.numGroups)].map((t=>new Dp(e))))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),-1!==this.groups.findIndex((t=>t.startCharCode<=e&&e<=t.endCharCode))}reverse(e){return console.warn("reverse not implemented for cmap subtable format 13"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startCharCode,end:e.endCharCode})))}}class Dp{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}}class Vp extends xp{constructor(e,t,n){super(e,t,n),this.subTableStart=e.currentPosition,this.format=14,this.length=e.uint32,this.numVarSelectorRecords=e.uint32,tp(this,"varSelectors",(()=>[...new Array(this.numVarSelectorRecords)].map((t=>new Lp(e)))))}supports(){return console.warn("supports not implemented for cmap subtable format 14"),0}getSupportedCharCodes(){return console.warn("getSupportedCharCodes not implemented for cmap subtable format 14"),[]}reverse(e){return console.warn("reverse not implemented for cmap subtable format 14"),{}}supportsVariation(e){let t=this.varSelector.find((t=>t.varSelector===e));return t||!1}getSupportedVariations(){return this.varSelectors.map((e=>e.varSelector))}}class Lp{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}}class Bp{constructor(e,t){const n=this.platformID=e.uint16,r=this.encodingID=e.uint16,a=this.offset=e.Offset32;tp(this,"table",(()=>(e.currentPosition=t+a,function(e,t,n){const r=e.uint16;return 0===r?new Cp(e,t,n):2===r?new kp(e,t,n):4===r?new Pp(e,t,n):6===r?new Ip(e,t,n):8===r?new Mp(e,t,n):10===r?new Op(e,t,n):12===r?new Np(e,t,n):13===r?new Rp(e,t,n):14===r?new Vp(e,t,n):{}}(e,n,r))))}}var zp=Object.freeze({__proto__:null,cmap:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numTables=n.uint16,this.encodingRecords=[...new Array(this.numTables)].map((e=>new Bp(n,this.tableStart)))}getSubTable(e){return this.encodingRecords[e].table}getSupportedEncodings(){return this.encodingRecords.map((e=>({platformID:e.platformID,encodingId:e.encodingID})))}getSupportedCharCodes(e,t){const n=this.encodingRecords.findIndex((n=>n.platformID===e&&n.encodingID===t));if(-1===n)return!1;return this.getSubTable(n).getSupportedCharCodes()}reverse(e){for(let t=0;t<this.numTables;t++){let n=this.getSubTable(t).reverse(e);if(n)return n}}getGlyphId(e){let t=0;return this.encodingRecords.some(((n,r)=>{let a=this.getSubTable(r);return!!a.getGlyphId&&(t=a.getGlyphId(e),0!==t)})),t}supports(e){return this.encodingRecords.some(((t,n)=>{const r=this.getSubTable(n);return r.supports&&!1!==r.supports(e)}))}supportsVariation(e){return this.encodingRecords.some(((t,n)=>{const r=this.getSubTable(n);return r.supportsVariation&&!1!==r.supportsVariation(e)}))}}});var Hp=Object.freeze({__proto__:null,head:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.load({majorVersion:n.uint16,minorVersion:n.uint16,fontRevision:n.fixed,checkSumAdjustment:n.uint32,magicNumber:n.uint32,flags:n.flags(16),unitsPerEm:n.uint16,created:n.longdatetime,modified:n.longdatetime,xMin:n.int16,yMin:n.int16,xMax:n.int16,yMax:n.int16,macStyle:n.flags(16),lowestRecPPEM:n.uint16,fontDirectionHint:n.uint16,indexToLocFormat:n.uint16,glyphDataFormat:n.uint16})}}});var Gp=Object.freeze({__proto__:null,hhea:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.ascender=n.fword,this.descender=n.fword,this.lineGap=n.fword,this.advanceWidthMax=n.ufword,this.minLeftSideBearing=n.fword,this.minRightSideBearing=n.fword,this.xMaxExtent=n.fword,this.caretSlopeRise=n.int16,this.caretSlopeRun=n.int16,this.caretOffset=n.int16,n.int16,n.int16,n.int16,n.int16,this.metricDataFormat=n.int16,this.numberOfHMetrics=n.uint16,n.verifyLength()}}});class Up{constructor(e,t){this.advanceWidth=e,this.lsb=t}}var Wp=Object.freeze({__proto__:null,hmtx:class extends ep{constructor(e,t,n){const{p:r}=super(e,t),a=n.hhea.numberOfHMetrics,s=n.maxp.numGlyphs,i=r.currentPosition;if(tp(this,"hMetrics",(()=>(r.currentPosition=i,[...new Array(a)].map((e=>new Up(r.uint16,r.int16)))))),a<s){const e=i+4*a;tp(this,"leftSideBearings",(()=>(r.currentPosition=e,[...new Array(s-a)].map((e=>r.int16)))))}}}});var jp=Object.freeze({__proto__:null,maxp:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.legacyFixed,this.numGlyphs=n.uint16,1===this.version&&(this.maxPoints=n.uint16,this.maxContours=n.uint16,this.maxCompositePoints=n.uint16,this.maxCompositeContours=n.uint16,this.maxZones=n.uint16,this.maxTwilightPoints=n.uint16,this.maxStorage=n.uint16,this.maxFunctionDefs=n.uint16,this.maxInstructionDefs=n.uint16,this.maxStackElements=n.uint16,this.maxSizeOfInstructions=n.uint16,this.maxComponentElements=n.uint16,this.maxComponentDepth=n.uint16),n.verifyLength()}}});class Zp{constructor(e,t){this.length=e,this.offset=t}}class qp{constructor(e,t){this.platformID=e.uint16,this.encodingID=e.uint16,this.languageID=e.uint16,this.nameID=e.uint16,this.length=e.uint16,this.offset=e.Offset16,tp(this,"string",(()=>(e.currentPosition=t.stringStart+this.offset,function(e,t){const{platformID:n,length:r}=t;if(0===r)return"";if(0===n||3===n){const t=[];for(let n=0,a=r/2;n<a;n++)t[n]=String.fromCharCode(e.uint16);return t.join("")}const a=e.readBytes(r),s=[];return a.forEach((function(e,t){s[t]=String.fromCharCode(e)})),s.join("")}(e,this))))}}var Yp=Object.freeze({__proto__:null,name:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.format=n.uint16,this.count=n.uint16,this.stringOffset=n.Offset16,this.nameRecords=[...new Array(this.count)].map((e=>new qp(n,this))),1===this.format&&(this.langTagCount=n.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map((e=>new Zp(n.uint16,n.Offset16)))),this.stringStart=this.tableStart+this.stringOffset}get(e){let t=this.nameRecords.find((t=>t.nameID===e));if(t)return t.string}}});var Kp=Object.freeze({__proto__:null,OS2:class extends ep{constructor(e,t){const{p:n}=super(e,t);return this.version=n.uint16,this.xAvgCharWidth=n.int16,this.usWeightClass=n.uint16,this.usWidthClass=n.uint16,this.fsType=n.uint16,this.ySubscriptXSize=n.int16,this.ySubscriptYSize=n.int16,this.ySubscriptXOffset=n.int16,this.ySubscriptYOffset=n.int16,this.ySuperscriptXSize=n.int16,this.ySuperscriptYSize=n.int16,this.ySuperscriptXOffset=n.int16,this.ySuperscriptYOffset=n.int16,this.yStrikeoutSize=n.int16,this.yStrikeoutPosition=n.int16,this.sFamilyClass=n.int16,this.panose=[...new Array(10)].map((e=>n.uint8)),this.ulUnicodeRange1=n.flags(32),this.ulUnicodeRange2=n.flags(32),this.ulUnicodeRange3=n.flags(32),this.ulUnicodeRange4=n.flags(32),this.achVendID=n.tag,this.fsSelection=n.uint16,this.usFirstCharIndex=n.uint16,this.usLastCharIndex=n.uint16,this.sTypoAscender=n.int16,this.sTypoDescender=n.int16,this.sTypoLineGap=n.int16,this.usWinAscent=n.uint16,this.usWinDescent=n.uint16,0===this.version?n.verifyLength():(this.ulCodePageRange1=n.flags(32),this.ulCodePageRange2=n.flags(32),1===this.version?n.verifyLength():(this.sxHeight=n.int16,this.sCapHeight=n.int16,this.usDefaultChar=n.uint16,this.usBreakChar=n.uint16,this.usMaxContext=n.uint16,this.version<=4?n.verifyLength():(this.usLowerOpticalPointSize=n.uint16,this.usUpperOpticalPointSize=n.uint16,5===this.version?n.verifyLength():void 0)))}}});const Xp=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];var Jp=Object.freeze({__proto__:null,post:class extends ep{constructor(e,t){const{p:n}=super(e,t);if(this.version=n.legacyFixed,this.italicAngle=n.fixed,this.underlinePosition=n.fword,this.underlineThickness=n.fword,this.isFixedPitch=n.uint32,this.minMemType42=n.uint32,this.maxMemType42=n.uint32,this.minMemType1=n.uint32,this.maxMemType1=n.uint32,1===this.version||3===this.version)return n.verifyLength();if(this.numGlyphs=n.uint16,2===this.version){this.glyphNameIndex=[...new Array(this.numGlyphs)].map((e=>n.uint16)),this.namesOffset=n.currentPosition,this.glyphNameOffsets=[1];for(let e=0;e<this.numGlyphs;e++){if(this.glyphNameIndex[e]<Xp.length){this.glyphNameOffsets.push(this.glyphNameOffsets[e]);continue}let t=n.int8;n.skip(t),this.glyphNameOffsets.push(this.glyphNameOffsets[e]+t+1)}}2.5===this.version&&(this.offset=[...new Array(this.numGlyphs)].map((e=>n.int8)))}getGlyphName(e){if(2!==this.version)return console.warn(`post table version ${this.version} does not support glyph name lookups`),"";let t=this.glyphNameIndex[e];if(t<258)return Xp[t];let n=this.glyphNameOffsets[e],r=this.glyphNameOffsets[e+1]-n-1;if(0===r)return".notdef.";this.parser.currentPosition=this.namesOffset+n;return this.parser.readBytes(r,this.namesOffset+n,8,!0).map((e=>String.fromCharCode(e))).join("")}}});class Qp extends ep{constructor(e,t){const{p:n}=super(e,t,"AxisTable");this.baseTagListOffset=n.Offset16,this.baseScriptListOffset=n.Offset16,tp(this,"baseTagList",(()=>new $p({offset:e.offset+this.baseTagListOffset},t))),tp(this,"baseScriptList",(()=>new eh({offset:e.offset+this.baseScriptListOffset},t)))}}class $p extends ep{constructor(e,t){const{p:n}=super(e,t,"BaseTagListTable");this.baseTagCount=n.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map((e=>n.tag))}}class eh extends ep{constructor(e,t){const{p:n}=super(e,t,"BaseScriptListTable");this.baseScriptCount=n.uint16;const r=n.currentPosition;tp(this,"baseScriptRecords",(()=>(n.currentPosition=r,[...new Array(this.baseScriptCount)].map((e=>new th(this.start,n))))))}}class th{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,tp(this,"baseScriptTable",(()=>(t.currentPosition=e+this.baseScriptOffset,new nh(t))))}}class nh{constructor(e){this.start=e.currentPosition,this.baseValuesOffset=e.Offset16,this.defaultMinMaxOffset=e.Offset16,this.baseLangSysCount=e.uint16,this.baseLangSysRecords=[...new Array(this.baseLangSysCount)].map((t=>new rh(this.start,e))),tp(this,"baseValues",(()=>(e.currentPosition=this.start+this.baseValuesOffset,new ah(e)))),tp(this,"defaultMinMax",(()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new sh(e))))}}class rh{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,tp(this,"minMax",(()=>(t.currentPosition=e+this.minMaxOffset,new sh(t))))}}class ah{constructor(e){this.parser=e,this.start=e.currentPosition,this.defaultBaselineIndex=e.uint16,this.baseCoordCount=e.uint16,this.baseCoords=[...new Array(this.baseCoordCount)].map((t=>e.Offset16))}getTable(e){return this.parser.currentPosition=this.start+this.baseCoords[e],new oh(this.parser)}}class sh{constructor(e){this.minCoord=e.Offset16,this.maxCoord=e.Offset16,this.featMinMaxCount=e.uint16;const t=e.currentPosition;tp(this,"featMinMaxRecords",(()=>(e.currentPosition=t,[...new Array(this.featMinMaxCount)].map((t=>new ih(e))))))}}class ih{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}}class oh{constructor(e){this.baseCoordFormat=e.uint16,this.coordinate=e.int16,2===this.baseCoordFormat&&(this.referenceGlyph=e.uint16,this.baseCoordPoint=e.uint16),3===this.baseCoordFormat&&(this.deviceTable=e.Offset16)}}var lh=Object.freeze({__proto__:null,BASE:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.horizAxisOffset=n.Offset16,this.vertAxisOffset=n.Offset16,tp(this,"horizAxis",(()=>new Qp({offset:e.offset+this.horizAxisOffset},t))),tp(this,"vertAxis",(()=>new Qp({offset:e.offset+this.vertAxisOffset},t))),1===this.majorVersion&&1===this.minorVersion&&(this.itemVarStoreOffset=n.Offset32,tp(this,"itemVarStore",(()=>new Qp({offset:e.offset+this.itemVarStoreOffset},t))))}}});class ch{constructor(e){this.classFormat=e.uint16,1===this.classFormat&&(this.startGlyphID=e.uint16,this.glyphCount=e.uint16,this.classValueArray=[...new Array(this.glyphCount)].map((t=>e.uint16))),2===this.classFormat&&(this.classRangeCount=e.uint16,this.classRangeRecords=[...new Array(this.classRangeCount)].map((t=>new uh(e))))}}class uh{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}}class dh extends $m{constructor(e){super(e),this.coverageFormat=e.uint16,1===this.coverageFormat&&(this.glyphCount=e.uint16,this.glyphArray=[...new Array(this.glyphCount)].map((t=>e.uint16))),2===this.coverageFormat&&(this.rangeCount=e.uint16,this.rangeRecords=[...new Array(this.rangeCount)].map((t=>new mh(e))))}}class mh{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}}class ph{constructor(e,t){this.table=e,this.parser=t,this.start=t.currentPosition,this.format=t.uint16,this.variationRegionListOffset=t.Offset32,this.itemVariationDataCount=t.uint16,this.itemVariationDataOffsets=[...new Array(this.itemVariationDataCount)].map((e=>t.Offset32))}}class hh extends $m{constructor(e){super(e),this.coverageOffset=e.Offset16,this.glyphCount=e.uint16,this.attachPointOffsets=[...new Array(this.glyphCount)].map((t=>e.Offset16))}getPoint(e){return this.parser.currentPosition=this.start+this.attachPointOffsets[e],new fh(this.parser)}}class fh{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map((t=>e.uint16))}}class gh extends $m{constructor(e){super(e),this.coverageOffset=e.Offset16,tp(this,"coverage",(()=>(e.currentPosition=this.start+this.coverageOffset,new dh(e)))),this.ligGlyphCount=e.uint16,this.ligGlyphOffsets=[...new Array(this.ligGlyphCount)].map((t=>e.Offset16))}getLigGlyph(e){return this.parser.currentPosition=this.start+this.ligGlyphOffsets[e],new yh(this.parser)}}class yh extends $m{constructor(e){super(e),this.caretCount=e.uint16,this.caretValueOffsets=[...new Array(this.caretCount)].map((t=>e.Offset16))}getCaretValue(e){return this.parser.currentPosition=this.start+this.caretValueOffsets[e],new vh(this.parser)}}class vh{constructor(e){this.caretValueFormat=e.uint16,1===this.caretValueFormat&&(this.coordinate=e.int16),2===this.caretValueFormat&&(this.caretValuePointIndex=e.uint16),3===this.caretValueFormat&&(this.coordinate=e.int16,this.deviceOffset=e.Offset16)}}class _h extends $m{constructor(e){super(e),this.markGlyphSetTableFormat=e.uint16,this.markGlyphSetCount=e.uint16,this.coverageOffsets=[...new Array(this.markGlyphSetCount)].map((t=>e.Offset32))}getMarkGlyphSet(e){return this.parser.currentPosition=this.start+this.coverageOffsets[e],new dh(this.parser)}}var bh=Object.freeze({__proto__:null,GDEF:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.glyphClassDefOffset=n.Offset16,tp(this,"glyphClassDefs",(()=>{if(0!==this.glyphClassDefOffset)return n.currentPosition=this.tableStart+this.glyphClassDefOffset,new ch(n)})),this.attachListOffset=n.Offset16,tp(this,"attachList",(()=>{if(0!==this.attachListOffset)return n.currentPosition=this.tableStart+this.attachListOffset,new hh(n)})),this.ligCaretListOffset=n.Offset16,tp(this,"ligCaretList",(()=>{if(0!==this.ligCaretListOffset)return n.currentPosition=this.tableStart+this.ligCaretListOffset,new gh(n)})),this.markAttachClassDefOffset=n.Offset16,tp(this,"markAttachClassDef",(()=>{if(0!==this.markAttachClassDefOffset)return n.currentPosition=this.tableStart+this.markAttachClassDefOffset,new ch(n)})),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=n.Offset16,tp(this,"markGlyphSetsDef",(()=>{if(0!==this.markGlyphSetsDefOffset)return n.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new _h(n)}))),3===this.minorVersion&&(this.itemVarStoreOffset=n.Offset32,tp(this,"itemVarStore",(()=>{if(0!==this.itemVarStoreOffset)return n.currentPosition=this.tableStart+this.itemVarStoreOffset,new ph(n)})))}}});class Eh extends $m{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map((t=>new wh(e)))}}class wh{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}}class Sh extends $m{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map((t=>new xh(e)))}}class xh{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}}class Ch{constructor(e){this.lookupOrder=e.Offset16,this.requiredFeatureIndex=e.uint16,this.featureIndexCount=e.uint16,this.featureIndices=[...new Array(this.featureIndexCount)].map((t=>e.uint16))}}class kh extends $m{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map((t=>new Th(e)))}}class Th{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}}class Ph extends $m{constructor(e){super(e),this.featureParams=e.Offset16,this.lookupIndexCount=e.uint16,this.lookupListIndices=[...new Array(this.lookupIndexCount)].map((t=>e.uint16))}getFeatureParams(){if(this.featureParams>0){const e=this.parser;e.currentPosition=this.start+this.featureParams;const t=this.featureTag;if("size"===t)return new Mh(e);if(t.startsWith("cc"))return new Ih(e);if(t.startsWith("ss"))return new Ah(e)}}}class Ih{constructor(e){this.format=e.uint16,this.featUiLabelNameId=e.uint16,this.featUiTooltipTextNameId=e.uint16,this.sampleTextNameId=e.uint16,this.numNamedParameters=e.uint16,this.firstParamUiLabelNameId=e.uint16,this.charCount=e.uint16,this.character=[...new Array(this.charCount)].map((t=>e.uint24))}}class Mh{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}}class Ah{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}}function Oh(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}class Nh extends $m{constructor(e){super(e),this.substFormat=e.uint16,this.coverageOffset=e.Offset16}getCoverageTable(){let e=this.parser;return e.currentPosition=this.start+this.coverageOffset,new dh(e)}}class Fh{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}}class Rh extends Nh{constructor(e){super(e),this.deltaGlyphID=e.int16}}class Dh extends Nh{constructor(e){super(e),this.sequenceCount=e.uint16,this.sequenceOffsets=[...new Array(this.sequenceCount)].map((t=>e.Offset16))}getSequence(e){let t=this.parser;return t.currentPosition=this.start+this.sequenceOffsets[e],new Vh(t)}}class Vh{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}class Lh extends Nh{constructor(e){super(e),this.alternateSetCount=e.uint16,this.alternateSetOffsets=[...new Array(this.alternateSetCount)].map((t=>e.Offset16))}getAlternateSet(e){let t=this.parser;return t.currentPosition=this.start+this.alternateSetOffsets[e],new Bh(t)}}class Bh{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}class zh extends Nh{constructor(e){super(e),this.ligatureSetCount=e.uint16,this.ligatureSetOffsets=[...new Array(this.ligatureSetCount)].map((t=>e.Offset16))}getLigatureSet(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureSetOffsets[e],new Hh(t)}}class Hh extends $m{constructor(e){super(e),this.ligatureCount=e.uint16,this.ligatureOffsets=[...new Array(this.ligatureCount)].map((t=>e.Offset16))}getLigature(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureOffsets[e],new Gh(t)}}class Gh{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map((t=>e.uint16))}}class Uh extends Nh{constructor(e){super(e),1===this.substFormat&&(this.subRuleSetCount=e.uint16,this.subRuleSetOffsets=[...new Array(this.subRuleSetCount)].map((t=>e.Offset16))),2===this.substFormat&&(this.classDefOffset=e.Offset16,this.subClassSetCount=e.uint16,this.subClassSetOffsets=[...new Array(this.subClassSetCount)].map((t=>e.Offset16))),3===this.substFormat&&(Oh(this),this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.coverageOffsets=[...new Array(this.glyphCount)].map((t=>e.Offset16)),this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new Fh(e))))}getSubRuleSet(e){if(1!==this.substFormat)throw new Error(`lookup type 5.${this.substFormat} has no subrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.subRuleSetOffsets[e],new Wh(t)}getSubClassSet(e){if(2!==this.substFormat)throw new Error(`lookup type 5.${this.substFormat} has no subclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.subClassSetOffsets[e],new Zh(t)}getCoverageTable(e){if(3!==this.substFormat&&!e)return super.getCoverageTable();if(!e)throw new Error(`lookup type 5.${this.substFormat} requires an coverage table index.`);let t=this.parser;return t.currentPosition=this.start+this.coverageOffsets[e],new dh(t)}}class Wh extends $m{constructor(e){super(e),this.subRuleCount=e.uint16,this.subRuleOffsets=[...new Array(this.subRuleCount)].map((t=>e.Offset16))}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.subRuleOffsets[e],new jh(t)}}class jh{constructor(e){this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.inputSequence=[...new Array(this.glyphCount-1)].map((t=>e.uint16)),this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new Fh(e)))}}class Zh extends $m{constructor(e){super(e),this.subClassRuleCount=e.uint16,this.subClassRuleOffsets=[...new Array(this.subClassRuleCount)].map((t=>e.Offset16))}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.subClassRuleOffsets[e],new qh(t)}}class qh extends jh{constructor(e){super(e)}}class Yh extends Nh{constructor(e){super(e),1===this.substFormat&&(this.chainSubRuleSetCount=e.uint16,this.chainSubRuleSetOffsets=[...new Array(this.chainSubRuleSetCount)].map((t=>e.Offset16))),2===this.substFormat&&(this.backtrackClassDefOffset=e.Offset16,this.inputClassDefOffset=e.Offset16,this.lookaheadClassDefOffset=e.Offset16,this.chainSubClassSetCount=e.uint16,this.chainSubClassSetOffsets=[...new Array(this.chainSubClassSetCount)].map((t=>e.Offset16))),3===this.substFormat&&(Oh(this),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map((t=>e.Offset16)),this.inputGlyphCount=e.uint16,this.inputCoverageOffsets=[...new Array(this.inputGlyphCount)].map((t=>e.Offset16)),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[...new Array(this.lookaheadGlyphCount)].map((t=>e.Offset16)),this.seqLookupCount=e.uint16,this.seqLookupRecords=[...new Array(this.substitutionCount)].map((t=>new $h(e))))}getChainSubRuleSet(e){if(1!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} has no chainsubrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleSetOffsets[e],new Kh(t)}getChainSubClassSet(e){if(2!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} has no chainsubclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubClassSetOffsets[e],new Jh(t)}getCoverageFromOffset(e){if(3!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} does not use contextual coverage offsets.`);let t=this.parser;return t.currentPosition=this.start+e,new dh(t)}}class Kh extends $m{constructor(e){super(e),this.chainSubRuleCount=e.uint16,this.chainSubRuleOffsets=[...new Array(this.chainSubRuleCount)].map((t=>e.Offset16))}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new Xh(t)}}class Xh{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map((t=>e.uint16)),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map((t=>e.uint16)),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map((t=>e.uint16)),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.SubstCount)].map((t=>new Fh(e)))}}class Jh extends $m{constructor(e){super(e),this.chainSubClassRuleCount=e.uint16,this.chainSubClassRuleOffsets=[...new Array(this.chainSubClassRuleCount)].map((t=>e.Offset16))}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new Qh(t)}}class Qh{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map((t=>e.uint16)),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map((t=>e.uint16)),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map((t=>e.uint16)),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new $h(e)))}}class $h extends $m{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}}class ef extends $m{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}}class tf extends Nh{constructor(e){super(e),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map((t=>e.Offset16)),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[new Array(this.lookaheadGlyphCount)].map((t=>e.Offset16)),this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}var nf={buildSubtable:function(e,t){const n=new[void 0,Rh,Dh,Lh,zh,Uh,Yh,ef,tf][e](t);return n.type=e,n}};class rf extends $m{constructor(e){super(e)}}class af extends rf{constructor(e){super(e),console.log("lookup type 1")}}class sf extends rf{constructor(e){super(e),console.log("lookup type 2")}}class of extends rf{constructor(e){super(e),console.log("lookup type 3")}}class lf extends rf{constructor(e){super(e),console.log("lookup type 4")}}class cf extends rf{constructor(e){super(e),console.log("lookup type 5")}}class uf extends rf{constructor(e){super(e),console.log("lookup type 6")}}class df extends rf{constructor(e){super(e),console.log("lookup type 7")}}class mf extends rf{constructor(e){super(e),console.log("lookup type 8")}}class pf extends rf{constructor(e){super(e),console.log("lookup type 9")}}var hf={buildSubtable:function(e,t){const n=new[void 0,af,sf,of,lf,cf,uf,df,mf,pf][e](t);return n.type=e,n}};class ff extends $m{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map((t=>e.Offset16))}}class gf extends $m{constructor(e,t){super(e),this.ctType=t,this.lookupType=e.uint16,this.lookupFlag=e.uint16,this.subTableCount=e.uint16,this.subtableOffsets=[...new Array(this.subTableCount)].map((t=>e.Offset16)),this.markFilteringSet=e.uint16}get rightToLeft(){return!0&this.lookupFlag}get ignoreBaseGlyphs(){return!0&this.lookupFlag}get ignoreLigatures(){return!0&this.lookupFlag}get ignoreMarks(){return!0&this.lookupFlag}get useMarkFilteringSet(){return!0&this.lookupFlag}get markAttachmentType(){return!0&this.lookupFlag}getSubTable(e){const t="GSUB"===this.ctType?nf:hf;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}}class yf extends ep{constructor(e,t,n){const{p:r,tableStart:a}=super(e,t,n);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.scriptListOffset=r.Offset16,this.featureListOffset=r.Offset16,this.lookupListOffset=r.Offset16,1===this.majorVersion&&1===this.minorVersion&&(this.featureVariationsOffset=r.Offset32);const s=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);tp(this,"scriptList",(()=>s?Eh.EMPTY:(r.currentPosition=a+this.scriptListOffset,new Eh(r)))),tp(this,"featureList",(()=>s?kh.EMPTY:(r.currentPosition=a+this.featureListOffset,new kh(r)))),tp(this,"lookupList",(()=>s?ff.EMPTY:(r.currentPosition=a+this.lookupListOffset,new ff(r)))),this.featureVariationsOffset&&tp(this,"featureVariations",(()=>s?FeatureVariations.EMPTY:(r.currentPosition=a+this.featureVariationsOffset,new FeatureVariations(r))))}getSupportedScripts(){return this.scriptList.scriptRecords.map((e=>e.scriptTag))}getScriptTable(e){let t=this.scriptList.scriptRecords.find((t=>t.scriptTag===e));this.parser.currentPosition=this.scriptList.start+t.scriptOffset;let n=new Sh(this.parser);return n.scriptTag=e,n}ensureScriptTable(e){return"string"==typeof e?this.getScriptTable(e):e}getSupportedLangSys(e){const t=0!==(e=this.ensureScriptTable(e)).defaultLangSys,n=e.langSysRecords.map((e=>e.langSysTag));return t&&n.unshift("dflt"),n}getDefaultLangSysTable(e){let t=(e=this.ensureScriptTable(e)).defaultLangSys;if(0!==t){this.parser.currentPosition=e.start+t;let n=new Ch(this.parser);return n.langSysTag="",n.defaultForScript=e.scriptTag,n}}getLangSysTable(e,t="dflt"){if("dflt"===t)return this.getDefaultLangSysTable(e);let n=(e=this.ensureScriptTable(e)).langSysRecords.find((e=>e.langSysTag===t));this.parser.currentPosition=e.start+n.langSysOffset;let r=new Ch(this.parser);return r.langSysTag=t,r}getFeatures(e){return e.featureIndices.map((e=>this.getFeature(e)))}getFeature(e){let t;if(t=parseInt(e)==e?this.featureList.featureRecords[e]:this.featureList.featureRecords.find((t=>t.featureTag===e)),!t)return;this.parser.currentPosition=this.featureList.start+t.featureOffset;let n=new Ph(this.parser);return n.featureTag=t.featureTag,n}getLookups(e){return e.lookupListIndices.map((e=>this.getLookup(e)))}getLookup(e,t){let n=this.lookupList.lookups[e];return this.parser.currentPosition=this.lookupList.start+n,new gf(this.parser,t)}}var vf=Object.freeze({__proto__:null,GSUB:class extends yf{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}}});var _f=Object.freeze({__proto__:null,GPOS:class extends yf{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}}});class bf extends $m{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map((t=>new Ef(e)))}getDocument(e){let t=this.documentRecords[e];if(!t)return"";let n=this.start+t.svgDocOffset;return this.parser.currentPosition=n,this.parser.readBytes(t.svgDocLength)}getDocumentForGlyph(e){let t=this.documentRecords.findIndex((t=>t.startGlyphID<=e&&e<=t.endGlyphID));return-1===t?"":this.getDocument(t)}}class Ef{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}}var wf=Object.freeze({__proto__:null,SVG:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.offsetToSVGDocumentList=n.Offset32,n.currentPosition=this.tableStart+this.offsetToSVGDocumentList,this.documentList=new bf(n)}}});class Sf{constructor(e){this.tag=e.tag,this.minValue=e.fixed,this.defaultValue=e.fixed,this.maxValue=e.fixed,this.flags=e.flags(16),this.axisNameID=e.uint16}}class xf{constructor(e,t,n){let r=e.currentPosition;this.subfamilyNameID=e.uint16,e.uint16,this.coordinates=[...new Array(t)].map((t=>e.fixed)),e.currentPosition-r<n&&(this.postScriptNameID=e.uint16)}}var Cf=Object.freeze({__proto__:null,fvar:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.axesArrayOffset=n.Offset16,n.uint16,this.axisCount=n.uint16,this.axisSize=n.uint16,this.instanceCount=n.uint16,this.instanceSize=n.uint16;const r=this.tableStart+this.axesArrayOffset;tp(this,"axes",(()=>(n.currentPosition=r,[...new Array(this.axisCount)].map((e=>new Sf(n))))));const a=r+this.axisCount*this.axisSize;tp(this,"instances",(()=>{let e=[];for(let t=0;t<this.instanceCount;t++)n.currentPosition=a+t*this.instanceSize,e.push(new xf(n,this.axisCount,this.instanceSize));return e}))}getSupportedAxes(){return this.axes.map((e=>e.tag))}getAxis(e){return this.axes.find((t=>t.tag===e))}}});var kf=Object.freeze({__proto__:null,cvt:class extends ep{constructor(e,t){const{p:n}=super(e,t),r=e.length/2;tp(this,"items",(()=>[...new Array(r)].map((e=>n.fword))))}}});var Tf=Object.freeze({__proto__:null,fpgm:class extends ep{constructor(e,t){const{p:n}=super(e,t);tp(this,"instructions",(()=>[...new Array(e.length)].map((e=>n.uint8))))}}});class Pf{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}}var If=Object.freeze({__proto__:null,gasp:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numRanges=n.uint16;tp(this,"gaspRanges",(()=>[...new Array(this.numRanges)].map((e=>new Pf(n)))))}}});var Mf=Object.freeze({__proto__:null,glyf:class extends ep{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}}});var Af=Object.freeze({__proto__:null,loca:class extends ep{constructor(e,t,n){const{p:r}=super(e,t),a=n.maxp.numGlyphs+1;0===n.head.indexToLocFormat?(this.x2=!0,tp(this,"offsets",(()=>[...new Array(a)].map((e=>r.Offset16))))):tp(this,"offsets",(()=>[...new Array(a)].map((e=>r.Offset32))))}getGlyphDataOffsetAndLength(e){let t=this.offsets[e]*this.x2?2:1;return{offset:t,length:(this.offsets[e+1]*this.x2?2:1)-t}}}});var Of=Object.freeze({__proto__:null,prep:class extends ep{constructor(e,t){const{p:n}=super(e,t);tp(this,"instructions",(()=>[...new Array(e.length)].map((e=>n.uint8))))}}});var Nf=Object.freeze({__proto__:null,CFF:class extends ep{constructor(e,t){const{p:n}=super(e,t);tp(this,"data",(()=>n.readBytes()))}}});var Ff=Object.freeze({__proto__:null,CFF2:class extends ep{constructor(e,t){const{p:n}=super(e,t);tp(this,"data",(()=>n.readBytes()))}}});class Rf{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}}var Df=Object.freeze({__proto__:null,VORG:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.defaultVertOriginY=n.int16,this.numVertOriginYMetrics=n.uint16,tp(this,"vertORiginYMetrics",(()=>[...new Array(this.numVertOriginYMetrics)].map((e=>new Rf(n)))))}}});class Vf{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new Bf(e),this.vert=new Bf(e),this.startGlyphIndex=e.uint16,this.endGlyphIndex=e.uint16,this.ppemX=e.uint8,this.ppemY=e.uint8,this.bitDepth=e.uint8,this.flags=e.int8}}class Lf{constructor(e){this.hori=new Bf(e),this.vert=new Bf(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}}class Bf{constructor(e){this.ascender=e.int8,this.descender=e.int8,this.widthMax=e.uint8,this.caretSlopeNumerator=e.int8,this.caretSlopeDenominator=e.int8,this.caretOffset=e.int8,this.minOriginSB=e.int8,this.minAdvanceSB=e.int8,this.maxBeforeBL=e.int8,this.minAfterBL=e.int8,this.pad1=e.int8,this.pad2=e.int8}}class zf extends ep{constructor(e,t,n){const{p:r}=super(e,t,n);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.numSizes=r.uint32,tp(this,"bitMapSizes",(()=>[...new Array(this.numSizes)].map((e=>new Vf(r)))))}}var Hf=Object.freeze({__proto__:null,EBLC:zf});class Gf extends ep{constructor(e,t,n){const{p:r}=super(e,t,n);this.majorVersion=r.uint16,this.minorVersion=r.uint16}}var Uf=Object.freeze({__proto__:null,EBDT:Gf});var Wf=Object.freeze({__proto__:null,EBSC:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.numSizes=n.uint32,tp(this,"bitmapScales",(()=>[...new Array(this.numSizes)].map((e=>new Lf(n)))))}}});var jf=Object.freeze({__proto__:null,CBLC:class extends zf{constructor(e,t){super(e,t,"CBLC")}}});var Zf=Object.freeze({__proto__:null,CBDT:class extends Gf{constructor(e,t){super(e,t,"CBDT")}}});var qf=Object.freeze({__proto__:null,sbix:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.flags=n.flags(16),this.numStrikes=n.uint32,tp(this,"strikeOffsets",(()=>[...new Array(this.numStrikes)].map((e=>n.Offset32))))}}});class Yf{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}}class Kf{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}}var Xf=Object.freeze({__proto__:null,COLR:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numBaseGlyphRecords=n.uint16,this.baseGlyphRecordsOffset=n.Offset32,this.layerRecordsOffset=n.Offset32,this.numLayerRecords=n.uint16}getBaseGlyphRecord(e){let t=this.tableStart+this.baseGlyphRecordsOffset;this.parser.currentPosition=t;let n=new Yf(this.parser),r=n.gID,a=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=a;let s=new Yf(this.parser),i=s.gID;if(r===e)return n;if(i===e)return s;for(;t!==a;){let n=t+(a-t)/12;this.parser.currentPosition=n;let r=new Yf(this.parser),s=r.gID;if(s===e)return r;s>e?a=n:s<e&&(t=n)}return!1}getLayers(e){let t=this.getBaseGlyphRecord(e);return this.parser.currentPosition=this.tableStart+this.layerRecordsOffset+4*t.firstLayerIndex,[...new Array(t.numLayers)].map((e=>new Kf(p)))}}});class Jf{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}}class Qf{constructor(e,t){this.paletteTypes=[...new Array(t)].map((t=>e.uint32))}}class $f{constructor(e,t){this.paletteLabels=[...new Array(t)].map((t=>e.uint16))}}class eg{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map((t=>e.uint16))}}var tg=Object.freeze({__proto__:null,CPAL:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numPaletteEntries=n.uint16;const r=this.numPalettes=n.uint16;this.numColorRecords=n.uint16,this.offsetFirstColorRecord=n.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map((e=>n.uint16)),tp(this,"colorRecords",(()=>(n.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map((e=>new Jf(n)))))),1===this.version&&(this.offsetPaletteTypeArray=n.Offset32,this.offsetPaletteLabelArray=n.Offset32,this.offsetPaletteEntryLabelArray=n.Offset32,tp(this,"paletteTypeArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new Qf(n,r)))),tp(this,"paletteLabelArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new $f(n,r)))),tp(this,"paletteEntryLabelArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new eg(n,r)))))}}});class ng{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}}class rg{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}}var ag=Object.freeze({__proto__:null,DSIG:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint32,this.numSignatures=n.uint16,this.flags=n.uint16,this.signatureRecords=[...new Array(this.numSignatures)].map((e=>new ng(n)))}getData(e){const t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new rg(this.parser)}}});class sg{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}}var ig=Object.freeze({__proto__:null,hdmx:class extends ep{constructor(e,t,n){const{p:r}=super(e,t),a=n.hmtx.numGlyphs;this.version=r.uint16,this.numRecords=r.int16,this.sizeDeviceRecord=r.int32,this.records=[...new Array(numRecords)].map((e=>new sg(r,a)))}}});class og{constructor(e){this.version=e.uint16,this.length=e.uint16,this.coverage=e.flags(8),this.format=e.uint8,0===this.format&&(this.nPairs=e.uint16,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16,tp(this,"pairs",(()=>[...new Array(this.nPairs)].map((t=>new lg(e)))))),2===this.format&&console.warn("Kern subtable format 2 is not supported: this parser currently only parses universal table data.")}get horizontal(){return this.coverage[0]}get minimum(){return this.coverage[1]}get crossstream(){return this.coverage[2]}get override(){return this.coverage[3]}}class lg{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}}var cg=Object.freeze({__proto__:null,kern:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.nTables=n.uint16,tp(this,"tables",(()=>{let e=this.tableStart+4;const t=[];for(let r=0;r<this.nTables;r++){n.currentPosition=e;let r=new og(n);t.push(r),e+=r}return t}))}}});var ug=Object.freeze({__proto__:null,LTSH:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numGlyphs=n.uint16,this.yPels=n.readBytes(this.numGlyphs)}}});var dg=Object.freeze({__proto__:null,MERG:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.mergeClassCount=n.uint16,this.mergeDataOffset=n.Offset16,this.classDefCount=n.uint16,this.offsetToClassDefOffsets=n.Offset16,tp(this,"mergeEntryMatrix",(()=>[...new Array(this.mergeClassCount)].map((e=>n.readBytes(this.mergeClassCount))))),console.warn("Full MERG parsing is currently not supported."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}}});class mg{constructor(e,t){this.tableStart=e,this.parser=t,this.tag=t.tag,this.dataOffset=t.Offset32,this.dataLength=t.uint32}getData(){return this.parser.currentField=this.tableStart+this.dataOffset,this.parser.readBytes(this.dataLength)}}var pg=Object.freeze({__proto__:null,meta:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint32,this.flags=n.uint32,n.uint32,this.dataMapsCount=n.uint32,this.dataMaps=[...new Array(this.dataMapsCount)].map((e=>new mg(this.tableStart,n)))}}});var hg=Object.freeze({__proto__:null,PCLT:class extends ep{constructor(e,t){super(e,t),console.warn("This font uses a PCLT table, which is currently not supported by this parser."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}}});class fg{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}}class gg{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map((t=>new yg(e)))}}class yg{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}}var vg=Object.freeze({__proto__:null,VDMX:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numRecs=n.uint16,this.numRatios=n.uint16,this.ratRanges=[...new Array(this.numRatios)].map((e=>new fg(n))),this.offsets=[...new Array(this.numRatios)].map((e=>n.Offset16)),this.VDMXGroups=[...new Array(this.numRecs)].map((e=>new gg(n)))}}});var _g=Object.freeze({__proto__:null,vhea:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.fixed,this.ascent=this.vertTypoAscender=n.int16,this.descent=this.vertTypoDescender=n.int16,this.lineGap=this.vertTypoLineGap=n.int16,this.advanceHeightMax=n.int16,this.minTopSideBearing=n.int16,this.minBottomSideBearing=n.int16,this.yMaxExtent=n.int16,this.caretSlopeRise=n.int16,this.caretSlopeRun=n.int16,this.caretOffset=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.metricDataFormat=n.int16,this.numOfLongVerMetrics=n.uint16,n.verifyLength()}}});class bg{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}}var Eg=Object.freeze({__proto__:null,vmtx:class extends ep{constructor(e,t,n){super(e,t);const r=n.vhea.numOfLongVerMetrics,a=n.maxp.numGlyphs,s=p.currentPosition;if(lazy(this,"vMetrics",(()=>(p.currentPosition=s,[...new Array(r)].map((e=>new bg(p.uint16,p.int16)))))),r<a){const e=s+4*r;lazy(this,"topSideBearings",(()=>(p.currentPosition=e,[...new Array(a-r)].map((e=>p.int16)))))}}}});const{kebabCase:wg}=Xe(b.privateApis);const{ProgressBar:Sg}=Xe(b.privateApis);const xg=function(){const{installFonts:e,notice:t,setNotice:n}=(0,g.useContext)(Im),[r,a]=(0,g.useState)(!1),s=async e=>{n(null),a(!0);const t=new Set,r=[...e];let s=!1;const l=r.map((async e=>{const n=await async function(e){const t=new Sp("Uploaded Font");try{const n=await o(e);return await t.fromDataBuffer(n,"font"),!0}catch(e){return!1}}(e);if(!n)return s=!0,null;if(t.has(e.name))return null;const r=e.name.split(".").pop().toLowerCase();return cm.includes(r)?(t.add(e.name),e):null})),c=(await Promise.all(l)).filter((e=>null!==e));if(c.length>0)i(c);else{const e=s?(0,E.__)("Sorry, you are not allowed to upload this file type."):(0,E.__)("No fonts found to install.");n({type:"error",message:e}),a(!1)}},i=async e=>{const t=await Promise.all(e.map((async e=>{const t=await c(e);return await bm(t,t.file,"all"),t})));u(t)};async function o(e){return new Promise(((t,n)=>{const r=new window.FileReader;r.readAsArrayBuffer(e),r.onload=()=>t(r.result),r.onerror=n}))}const c=async e=>{const t=await o(e),n=new Sp("Uploaded Font");n.fromDataBuffer(t,e.name);const r=(await new Promise((e=>n.onload=e))).detail.font,{name:a}=r.opentype.tables,s=a.get(16)||a.get(1),i=a.get(2).toLowerCase().includes("italic"),l=r.opentype.tables["OS/2"].usWeightClass||"normal",c=!!r.opentype.tables.fvar&&r.opentype.tables.fvar.axes.find((({tag:e})=>"wght"===e));return{file:e,fontFamily:s,fontStyle:i?"italic":"normal",fontWeight:(c?`${c.minValue} ${c.maxValue}`:null)||l}},u=async t=>{const r=function(e){const t=e.reduce(((e,t)=>(e[t.fontFamily]||(e[t.fontFamily]={name:t.fontFamily,fontFamily:t.fontFamily,slug:wg(t.fontFamily.toLowerCase()),fontFace:[]}),e[t.fontFamily].fontFace.push(t),e)),{});return Object.values(t)}(t);try{await e(r),n({type:"success",message:(0,E.__)("Fonts were installed successfully.")})}catch(e){n({type:"error",message:e.message,errors:e?.installationErrors})}a(!1)};return(0,l.createElement)("div",{className:"font-library-modal__tabpanel-layout"},(0,l.createElement)(b.DropZone,{onFilesDrop:e=>{s(e)}}),(0,l.createElement)(b.__experimentalVStack,{className:"font-library-modal__local-fonts"},t&&(0,l.createElement)(b.Notice,{status:t.type,__unstableHTML:!0,onRemove:()=>n(null)},t.message,t.errors&&(0,l.createElement)("ul",null,t.errors.map(((e,t)=>(0,l.createElement)("li",{key:t},e))))),r&&(0,l.createElement)(b.FlexItem,null,(0,l.createElement)("div",{className:"font-library-modal__upload-area"},(0,l.createElement)(Sg,null))),!r&&(0,l.createElement)(b.FormFileUpload,{accept:cm.map((e=>`.${e}`)).join(","),multiple:!0,onChange:e=>{s(e.target.files)},render:({openFileDialog:e})=>(0,l.createElement)(b.Button,{className:"font-library-modal__upload-area",onClick:e},(0,E.__)("Upload font"))}),(0,l.createElement)(b.__experimentalSpacer,{margin:2}),(0,l.createElement)(b.__experimentalText,{className:"font-library-modal__upload-area__text"},(0,E.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2."))))},{Tabs:Cg}=Xe(b.privateApis),kg={id:"installed-fonts",title:(0,E.__)("Library")},Tg={id:"upload-fonts",title:(0,E.__)("Upload")};const Pg=function({onRequestClose:e,initialTabId:t="installed-fonts"}){const{collections:n,setNotice:r}=(0,g.useContext)(Im),a=(0,m.useSelect)((e=>{const{canUser:t}=e(ye.store);return t("create","font-families")}),[]),s=[kg];return a&&(s.push(Tg),s.push(...(e=>e.map((({slug:t,name:n})=>({id:t,title:1===e.length&&"google-fonts"===t?(0,E.__)("Install Fonts"):n}))))(n||[]))),(0,l.createElement)(b.Modal,{title:(0,E.__)("Fonts"),onRequestClose:e,isFullScreen:!0,className:"font-library-modal"},(0,l.createElement)("div",{className:"font-library-modal__tabs"},(0,l.createElement)(Cg,{initialTabId:t,onSelect:()=>{r(null)}},(0,l.createElement)(Cg.TabList,null,s.map((({id:e,title:t})=>(0,l.createElement)(Cg.Tab,{key:e,tabId:e},t)))),s.map((({id:e})=>{let t;switch(e){case"upload-fonts":t=(0,l.createElement)(xg,null);break;case"installed-fonts":t=(0,l.createElement)(Lm,null);break;default:t=(0,l.createElement)(Wm,{slug:e})}return(0,l.createElement)(Cg.TabPanel,{key:e,tabId:e,focusable:!1},t)})))))};const Ig=function({font:e}){const{handleSetLibraryFontSelected:t,toggleModal:n}=(0,g.useContext)(Im),r=e?.fontFace?.length||1,a=hm(e);return(0,l.createElement)(b.__experimentalItem,{onClick:()=>{t(e),n("installed-fonts")}},(0,l.createElement)(b.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(b.FlexItem,{style:a},e.name),(0,l.createElement)(b.FlexItem,{className:"edit-site-global-styles-screen-typography__font-variants-count"},(0,E.sprintf)((0,E._n)("%d variant","%d variants",r),r))))};function Mg(){const{modalTabOpen:e,toggleModal:t,themeFonts:n,customFonts:r}=(0,g.useContext)(Im),a=0<r.length||0<n.length;return(0,l.createElement)(l.Fragment,null,!!e&&(0,l.createElement)(Pg,{onRequestClose:()=>t(),initialTabId:e}),(0,l.createElement)(b.__experimentalVStack,{spacing:3},(0,l.createElement)(b.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(Fd,{level:3},(0,E.__)("Fonts")),(0,l.createElement)(b.__experimentalHStack,{justify:"flex-end"},(0,l.createElement)(b.Tooltip,{text:(0,E.__)("Manage fonts")},(0,l.createElement)(b.Button,{onClick:()=>t("installed-fonts"),"aria-label":(0,E.__)("Manage fonts"),icon:nm,size:"small"})))),a?(0,l.createElement)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},r.map((e=>(0,l.createElement)(Ig,{key:e.slug,font:e}))),n.map((e=>(0,l.createElement)(Ig,{key:e.slug,font:e})))):(0,l.createElement)(l.Fragment,null,(0,E.__)("No fonts installed."),(0,l.createElement)(b.Button,{className:"edit-site-global-styles-font-families__add-fonts",variant:"secondary",onClick:()=>t("upload-fonts")},(0,E.__)("Add fonts")))))}const Ag=({...e})=>(0,l.createElement)(Mm,null,(0,l.createElement)(Mg,{...e}));const Og=function(){const e=(0,m.useSelect)((e=>e(y.store).getEditorSettings().fontLibraryEnabled),[]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{title:(0,E.__)("Typography"),description:(0,E.__)("Manage the typography settings for different elements.")}),(0,l.createElement)("div",{className:"edit-site-global-styles-screen-typography"},(0,l.createElement)(b.__experimentalVStack,{spacing:6},e&&(0,l.createElement)(Ag,null),(0,l.createElement)(tm,null))))},{useGlobalStyle:Ng,useGlobalSetting:Fg,useSettingsForBlockElement:Rg,TypographyPanel:Dg}=Xe(fe.privateApis);function Vg({element:e,headingLevel:t}){let n=[];"heading"===e?n=n.concat(["elements",t]):e&&"text"!==e&&(n=n.concat(["elements",e]));const r=n.join("."),[a]=Ng(r,void 0,"user",{shouldDecodeEncode:!1}),[s,i]=Ng(r,void 0,"all",{shouldDecodeEncode:!1}),[o]=Fg(""),c=Rg(o,void 0,"heading"===e?t:e);return(0,l.createElement)(Dg,{inheritedValue:s,value:a,onChange:i,settings:c})}const{useGlobalStyle:Lg}=Xe(fe.privateApis);function Bg({name:e,element:t,headingLevel:n}){let r="";"heading"===t?r=`elements.${n}.`:t&&"text"!==t&&(r=`elements.${t}.`);const[a]=Lg(r+"typography.fontFamily",e),[s]=Lg(r+"color.gradient",e),[i]=Lg(r+"color.background",e),[o]=Lg(r+"color.text",e),[c]=Lg(r+"typography.fontSize",e),[u]=Lg(r+"typography.fontStyle",e),[d]=Lg(r+"typography.fontWeight",e),[m]=Lg(r+"typography.letterSpacing",e),p="link"===t?{textDecoration:"underline"}:{};return(0,l.createElement)("div",{className:"edit-site-typography-preview",style:{fontFamily:null!=a?a:"serif",background:null!=s?s:i,color:o,fontSize:c,fontStyle:u,fontWeight:d,letterSpacing:m,...p}},"Aa")}const zg={text:{description:(0,E.__)("Manage the fonts used on the site."),title:(0,E.__)("Text")},link:{description:(0,E.__)("Manage the fonts and typography used on the links."),title:(0,E.__)("Links")},heading:{description:(0,E.__)("Manage the fonts and typography used on headings."),title:(0,E.__)("Headings")},caption:{description:(0,E.__)("Manage the fonts and typography used on captions."),title:(0,E.__)("Captions")},button:{description:(0,E.__)("Manage the fonts and typography used on buttons."),title:(0,E.__)("Buttons")}};const Hg=function({element:e}){const[t,n]=(0,g.useState)("heading");return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{title:zg[e].title,description:zg[e].description}),(0,l.createElement)(b.__experimentalSpacer,{marginX:4},(0,l.createElement)(Bg,{element:e,headingLevel:t})),"heading"===e&&(0,l.createElement)(b.__experimentalSpacer,{marginX:4,marginBottom:"1em"},(0,l.createElement)(b.__experimentalToggleGroupControl,{label:(0,E.__)("Select heading level"),hideLabelFromVision:!0,value:t,onChange:n,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0},(0,l.createElement)(b.__experimentalToggleGroupControlOption,{value:"heading",label:(0,E._x)("All","heading levels")}),(0,l.createElement)(b.__experimentalToggleGroupControlOption,{value:"h1",label:(0,E.__)("H1")}),(0,l.createElement)(b.__experimentalToggleGroupControlOption,{value:"h2",label:(0,E.__)("H2")}),(0,l.createElement)(b.__experimentalToggleGroupControlOption,{value:"h3",label:(0,E.__)("H3")}),(0,l.createElement)(b.__experimentalToggleGroupControlOption,{value:"h4",label:(0,E.__)("H4")}),(0,l.createElement)(b.__experimentalToggleGroupControlOption,{value:"h5",label:(0,E.__)("H5")}),(0,l.createElement)(b.__experimentalToggleGroupControlOption,{value:"h6",label:(0,E.__)("H6")}))),(0,l.createElement)(Vg,{element:e,headingLevel:t}))},Gg=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/SVG"},(0,l.createElement)(w.Path,{d:"M17.192 6.75L15.47 5.03l1.06-1.06 3.537 3.53-3.537 3.53-1.06-1.06 1.723-1.72h-3.19c-.602 0-.993.202-1.28.498-.309.319-.538.792-.695 1.383-.13.488-.222 1.023-.296 1.508-.034.664-.116 1.413-.303 2.117-.193.721-.513 1.467-1.068 2.04-.575.594-1.359.954-2.357.954H4v-1.5h4.003c.601 0 .993-.202 1.28-.498.308-.319.538-.792.695-1.383.149-.557.216-1.093.288-1.662l.039-.31a9.653 9.653 0 0 1 .272-1.653c.193-.722.513-1.467 1.067-2.04.576-.594 1.36-.954 2.358-.954h3.19zM8.004 6.75c.8 0 1.46.23 1.988.628a6.24 6.24 0 0 0-.684 1.396 1.725 1.725 0 0 0-.024-.026c-.287-.296-.679-.498-1.28-.498H4v-1.5h4.003zM12.699 14.726c-.161.459-.38.94-.684 1.396.527.397 1.188.628 1.988.628h3.19l-1.722 1.72 1.06 1.06L20.067 16l-3.537-3.53-1.06 1.06 1.723 1.72h-3.19c-.602 0-.993-.202-1.28-.498a1.96 1.96 0 0 1-.024-.026z"}));const Ug=function({className:e,...t}){return(0,l.createElement)(b.Flex,{className:_()("edit-site-global-styles__color-indicator-wrapper",e),...t})},{useGlobalSetting:Wg}=Xe(fe.privateApis),jg=[];const Zg=function({name:e}){const[t]=Wg("color.palette.custom"),[n]=Wg("color.palette.theme"),[r]=Wg("color.palette.default"),[a]=Wg("color.defaultPalette",e),[s]=function(e){const[t,n]=Je("color.palette.theme",e);return window.__experimentalEnableColorRandomizer?[function(){const e=Math.floor(225*Math.random()),r=t.map((t=>{const{color:n}=t,r=We(n).rotate(e).toHex();return{...t,color:r}}));n(r)}]:[]}(),i=(0,g.useMemo)((()=>[...t||jg,...n||jg,...r&&a?r:jg]),[t,n,r,a]),o=e?"/blocks/"+encodeURIComponent(e)+"/colors/palette":"/colors/palette",c=i.length>0?(0,E.sprintf)((0,E._n)("%d color","%d colors",i.length),i.length):(0,E.__)("Add custom colors");return(0,l.createElement)(b.__experimentalVStack,{spacing:3},(0,l.createElement)(Fd,{level:3},(0,E.__)("Palette")),(0,l.createElement)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,l.createElement)(cd,{path:o,"aria-label":(0,E.__)("Color palettes")},(0,l.createElement)(b.__experimentalHStack,{direction:0===i.length?"row-reverse":"row"},(0,l.createElement)(b.__experimentalZStack,{isLayered:!1,offset:-8},i.slice(0,5).map((({color:e},t)=>(0,l.createElement)(Ug,{key:`${e}-${t}`},(0,l.createElement)(b.ColorIndicator,{colorValue:e}))))),(0,l.createElement)(b.FlexItem,null,c)))),window.__experimentalEnableColorRandomizer&&n?.length>0&&(0,l.createElement)(b.Button,{variant:"secondary",icon:Gg,onClick:s},(0,E.__)("Randomize colors")))},{useGlobalStyle:qg,useGlobalSetting:Yg,useSettingsForBlockElement:Kg,ColorPanel:Xg}=Xe(fe.privateApis);const Jg=function(){const[e]=qg("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=qg("",void 0,"all",{shouldDecodeEncode:!1}),[r]=Yg(""),a=Kg(r);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{title:(0,E.__)("Colors"),description:(0,E.__)("Manage palettes and the default color of different global elements on the site.")}),(0,l.createElement)("div",{className:"edit-site-global-styles-screen-colors"},(0,l.createElement)(b.__experimentalVStack,{spacing:10},(0,l.createElement)(Zg,null),(0,l.createElement)(Xg,{inheritedValue:t,value:e,onChange:n,settings:a}))))},{useGlobalSetting:Qg}=Xe(fe.privateApis),$g={placement:"bottom-start",offset:8};function ey({name:e}){const[t,n]=Qg("color.palette.theme",e),[r]=Qg("color.palette.theme",e,"base"),[a,s]=Qg("color.palette.default",e),[i]=Qg("color.palette.default",e,"base"),[o,c]=Qg("color.palette.custom",e),[u]=Qg("color.defaultPalette",e),d=(0,ie.useViewportMatch)("small","<")?$g:void 0;return(0,l.createElement)(b.__experimentalVStack,{className:"edit-site-global-styles-color-palette-panel",spacing:10},!!t&&!!t.length&&(0,l.createElement)(b.__experimentalPaletteEdit,{canReset:t!==r,canOnlyChangeValues:!0,colors:t,onChange:n,paletteLabel:(0,E.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:d}),!!a&&!!a.length&&!!u&&(0,l.createElement)(b.__experimentalPaletteEdit,{canReset:a!==i,canOnlyChangeValues:!0,colors:a,onChange:s,paletteLabel:(0,E.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:d}),(0,l.createElement)(b.__experimentalPaletteEdit,{colors:o,onChange:c,paletteLabel:(0,E.__)("Custom"),paletteLabelHeadingLevel:3,emptyMessage:(0,E.__)("Custom colors are empty! Add some colors to create your own color palette."),slugPrefix:"custom-",popoverProps:d}))}const{useGlobalSetting:ty}=Xe(fe.privateApis),ny={placement:"bottom-start",offset:8},ry=()=>{};function ay({name:e}){const[t,n]=ty("color.gradients.theme",e),[r]=ty("color.gradients.theme",e,"base"),[a,s]=ty("color.gradients.default",e),[i]=ty("color.gradients.default",e,"base"),[o,c]=ty("color.gradients.custom",e),[u]=ty("color.defaultGradients",e),[d]=ty("color.duotone.custom")||[],[m]=ty("color.duotone.default")||[],[p]=ty("color.duotone.theme")||[],[h]=ty("color.defaultDuotone"),f=[...d||[],...p||[],...m&&h?m:[]],g=(0,ie.useViewportMatch)("small","<")?ny:void 0;return(0,l.createElement)(b.__experimentalVStack,{className:"edit-site-global-styles-gradient-palette-panel",spacing:10},!!t&&!!t.length&&(0,l.createElement)(b.__experimentalPaletteEdit,{canReset:t!==r,canOnlyChangeValues:!0,gradients:t,onChange:n,paletteLabel:(0,E.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:g}),!!a&&!!a.length&&!!u&&(0,l.createElement)(b.__experimentalPaletteEdit,{canReset:a!==i,canOnlyChangeValues:!0,gradients:a,onChange:s,paletteLabel:(0,E.__)("Default"),paletteLabelLevel:3,popoverProps:g}),(0,l.createElement)(b.__experimentalPaletteEdit,{gradients:o,onChange:c,paletteLabel:(0,E.__)("Custom"),paletteLabelLevel:3,emptyMessage:(0,E.__)("Custom gradients are empty! Add some gradients to create your own palette."),slugPrefix:"custom-",popoverProps:g}),!!f&&!!f.length&&(0,l.createElement)("div",null,(0,l.createElement)(Fd,{level:3},(0,E.__)("Duotone")),(0,l.createElement)(b.__experimentalSpacer,{margin:3}),(0,l.createElement)(b.DuotonePicker,{duotonePalette:f,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:ry})))}const{Tabs:sy}=Xe(b.privateApis);const iy=function({name:e}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{title:(0,E.__)("Palette"),description:(0,E.__)("Palettes are used to provide default color options for blocks and various design tools. Here you can edit the colors with their labels.")}),(0,l.createElement)(sy,null,(0,l.createElement)(sy.TabList,null,(0,l.createElement)(sy.Tab,{tabId:"solid"},"Solid"),(0,l.createElement)(sy.Tab,{tabId:"gradient"},"Gradient")),(0,l.createElement)(sy.TabPanel,{tabId:"solid",focusable:!1},(0,l.createElement)(ey,{name:e})),(0,l.createElement)(sy.TabPanel,{tabId:"gradient",focusable:!1},(0,l.createElement)(ay,{name:e}))))},{useGlobalStyle:oy,useGlobalSetting:ly,useSettingsForBlockElement:cy,DimensionsPanel:uy}=Xe(fe.privateApis),dy={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,childLayout:!1};function my(){const[e]=oy("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=oy("",void 0,"all",{shouldDecodeEncode:!1}),[r]=ly("",void 0,"user"),[a,s]=ly(""),i=cy(a),o=(0,g.useMemo)((()=>({...t,layout:i.layout})),[t,i.layout]),c=(0,g.useMemo)((()=>({...e,layout:r.layout})),[e,r.layout]);return(0,l.createElement)(uy,{inheritedValue:o,value:c,onChange:e=>{const t={...e};if(delete t.layout,n(t),e.layout!==r.layout){const t={...r,layout:e.layout};t.layout?.definitions&&delete t.layout.definitions,s(t)}},settings:i,includeLayoutControls:!0,defaultControls:dy})}const{useHasDimensionsPanel:py,useGlobalSetting:hy,useSettingsForBlockElement:fy}=Xe(fe.privateApis);const gy=function(){const[e]=hy(""),t=fy(e),n=py(t);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{title:(0,E.__)("Layout")}),n&&(0,l.createElement)(my,null))};const yy=function(){const{mode:e}=(0,m.useSelect)((e=>({mode:e(fe.store).__unstableGetEditorMode()})),[]),t=(0,g.useRef)(null);(0,g.useEffect)((()=>{"zoom-out"!==e&&(t.current=!1)}),[e]),(0,g.useEffect)((()=>{if("zoom-out"!==e)return n("zoom-out"),t.current=!0,()=>{t.current&&n(e)}}),[]);const{__unstableSetEditorMode:n}=(0,m.useDispatch)(fe.store);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{back:"/",title:(0,E.__)("Browse styles"),description:(0,E.__)("Choose a variation to change the look of the site.")}),(0,l.createElement)(b.Card,{size:"small",isBorderless:!0,className:"edit-site-global-styles-screen-style-variations"},(0,l.createElement)(b.CardBody,null,(0,l.createElement)(Gr,null))))},{useGlobalStyle:vy,AdvancedPanel:_y}=Xe(fe.privateApis);const by=function(){const e=(0,E.__)("Add your own CSS to customize the appearance and layout of your site."),[t]=vy("",void 0,"user",{shouldDecodeEncode:!1}),[n,r]=vy("",void 0,"all",{shouldDecodeEncode:!1});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{title:(0,E.__)("CSS"),description:(0,l.createElement)(l.Fragment,null,e,(0,l.createElement)(b.ExternalLink,{href:"https://wordpress.org/documentation/article/css/",className:"edit-site-global-styles-screen-css-help-link"},(0,E.__)("Learn more about CSS")))}),(0,l.createElement)("div",{className:"edit-site-global-styles-screen-css"},(0,l.createElement)(_y,{value:t,onChange:r,inheritedValue:n})))},{ExperimentalBlockEditorProvider:Ey,GlobalStylesContext:wy,useGlobalStylesOutputWithConfig:Sy}=Xe(fe.privateApis);function xy(e){return!e||0===Object.keys(e).length}const Cy=function({userConfig:e,blocks:t}){const{base:n}=(0,g.useContext)(wy),r=(0,g.useMemo)((()=>xy(e)||xy(n)?{}:Ir(n,e)),[n,e]),a=(0,g.useMemo)((()=>Array.isArray(t)?t:[t]),[t]),s=(0,m.useSelect)((e=>e(fe.store).getSettings()),[]),i=(0,g.useMemo)((()=>({...s,__unstableIsPreviewMode:!0})),[s]),[o]=Sy(r),c=xy(o)||xy(e)?i.styles:o;return(0,l.createElement)($r,{title:(0,E.__)("Revisions"),closeButtonLabel:(0,E.__)("Close revisions"),enableResizing:!0},(0,l.createElement)(fe.__unstableIframe,{className:"edit-site-revisions__iframe",name:"revisions",tabIndex:0},(0,l.createElement)(fe.__unstableEditorStyles,{styles:c}),(0,l.createElement)("style",null,".is-root-container { display: flow-root; }"),(0,l.createElement)(b.Disabled,{className:"edit-site-revisions__example-preview__content"},(0,l.createElement)(Ey,{value:a,settings:i},(0,l.createElement)(fe.BlockList,{renderAppender:!1})))))},{getGlobalStylesChanges:ky}=Xe(fe.privateApis);function Ty({revision:e,previousRevision:t}){const n=ky(e,t,{maxResults:7});return n.length?(0,l.createElement)("ul",{"data-testid":"global-styles-revision-changes",className:"edit-site-global-styles-screen-revisions__changes"},n.map((e=>(0,l.createElement)("li",{key:e},e)))):null}const Py=function({userRevisions:e,selectedRevisionId:t,onChange:n,canApplyRevision:r,onApplyRevision:a}){const{currentThemeName:s,currentUser:i}=(0,m.useSelect)((e=>{const{getCurrentTheme:t,getCurrentUser:n}=e(ye.store),r=t();return{currentThemeName:r?.name?.rendered||r?.stylesheet,currentUser:n()}}),[]),o=(0,_a.getDate)().getTime(),{datetimeAbbreviated:c}=(0,_a.getSettings)().formats;return(0,l.createElement)("ol",{className:"edit-site-global-styles-screen-revisions__revisions-list","aria-label":(0,E.__)("Global styles revisions list"),role:"group"},e.map(((u,d)=>{const{id:m,author:p,modified:h}=u,f="unsaved"===m,g=f?i:p,y=g?.name||(0,E.__)("User"),v=g?.avatar_urls?.[48],w=t?t===m:0===d,S=!r&&w,x="parent"===m,C=(0,_a.getDate)(h),k=h&&o-C.getTime()>864e5?(0,_a.dateI18n)(c,C):(0,_a.humanTimeDiff)(h),T=function(e,t,n,r){return"parent"===e?(0,E.__)("Reset the styles to the theme defaults"):"unsaved"===e?(0,E.sprintf)((0,E.__)("Unsaved changes by %s"),t):r?(0,E.sprintf)((0,E.__)("Changes saved by %1$s on %2$s. This revision matches current editor styles."),t,n):(0,E.sprintf)((0,E.__)("Changes saved by %1$s on %2$s"),t,n)}(m,y,(0,_a.dateI18n)(c,C),S);return(0,l.createElement)("li",{className:_()("edit-site-global-styles-screen-revisions__revision-item",{"is-selected":w,"is-active":S,"is-reset":x}),key:m,"aria-current":w},(0,l.createElement)(b.Button,{className:"edit-site-global-styles-screen-revisions__revision-button",disabled:w,onClick:()=>{n(u)},"aria-label":T},x?(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__description"},(0,E.__)("Default styles"),(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__meta"},s)):(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__description"},f?(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__date"},(0,E.__)("(Unsaved)")):(0,l.createElement)("time",{className:"edit-site-global-styles-screen-revisions__date",dateTime:h},k),(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__meta"},(0,l.createElement)("img",{alt:y,src:v}),y),w&&(0,l.createElement)(Ty,{revision:u,previousRevision:d<e.length?e[d+1]:{}}))),w&&(S?(0,l.createElement)("p",{className:"edit-site-global-styles-screen-revisions__applied-text"},(0,E.__)("These styles are already applied to your site.")):(0,l.createElement)(b.Button,{disabled:S,size:"compact",variant:"primary",className:"edit-site-global-styles-screen-revisions__apply-button",onClick:a},x?(0,E.__)("Reset to defaults"):(0,E.__)("Apply"))))})))};function Iy({currentPage:e,numPages:t,changePage:n,totalItems:r,className:a,disabled:s=!1,buttonVariant:i="tertiary",label:o=(0,E.__)("Pagination Navigation")}){return(0,l.createElement)(b.__experimentalHStack,{expanded:!1,as:"nav","aria-label":o,spacing:3,justify:"flex-start",className:_()("edit-site-pagination",a)},(0,l.createElement)(b.__experimentalText,{variant:"muted",className:"edit-site-pagination__total"},(0,E.sprintf)((0,E._n)("%s item","%s items",r),r)),(0,l.createElement)(b.__experimentalHStack,{expanded:!1,spacing:1},(0,l.createElement)(b.Button,{variant:i,onClick:()=>n(1),disabled:s||1===e,"aria-label":(0,E.__)("First page")},"«"),(0,l.createElement)(b.Button,{variant:i,onClick:()=>n(e-1),disabled:s||1===e,"aria-label":(0,E.__)("Previous page")},"‹")),(0,l.createElement)(b.__experimentalText,{variant:"muted"},(0,E.sprintf)((0,E._x)("%1$s of %2$s","paging"),e,t)),(0,l.createElement)(b.__experimentalHStack,{expanded:!1,spacing:1},(0,l.createElement)(b.Button,{variant:i,onClick:()=>n(e+1),disabled:s||e===t,"aria-label":(0,E.__)("Next page")},"›"),(0,l.createElement)(b.Button,{variant:i,onClick:()=>n(t),disabled:s||e===t,"aria-label":(0,E.__)("Last page")},"»")))}const{GlobalStylesContext:My,areGlobalStyleConfigsEqual:Ay}=Xe(fe.privateApis);const Oy=function(){const{goTo:e}=(0,b.__experimentalUseNavigator)(),{user:t,setUserConfig:n}=(0,g.useContext)(My),{blocks:r,editorCanvasContainerView:a}=(0,m.useSelect)((e=>({editorCanvasContainerView:Xe(e(tr)).getEditorCanvasContainerView(),blocks:e(fe.store).getBlocks()})),[]),[s,i]=(0,g.useState)(1),[o,c]=(0,g.useState)([]),{revisions:u,isLoading:d,hasUnsavedChanges:p,revisionsCount:h}=va({query:{per_page:10,page:s}}),f=Math.ceil(h/10),[y,v]=(0,g.useState)(t),[_,w]=(0,g.useState)(!1),{setEditorCanvasContainerView:S}=Xe((0,m.useDispatch)(tr)),x=Ay(y,t),C=()=>{e("/");S("global-styles-revisions:style-book"===a?"style-book":void 0)},k=e=>{n((()=>({styles:e?.styles,settings:e?.settings}))),w(!1),C()};(0,g.useEffect)((()=>{a&&a.startsWith("global-styles-revisions")||e("/")}),[a]),(0,g.useEffect)((()=>{!d&&u.length&&c(u)}),[u,d]);const T=u[0],P=y?.id,I=!!T?.id&&!x&&!P;(0,g.useEffect)((()=>{I&&v({styles:T?.styles||{},settings:T?.settings||{},id:T?.id})}),[I,T]);const M=!!P&&"unsaved"!==P&&!x,A=!!o.length;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{title:h&&(0,E.sprintf)((0,E.__)("Revisions (%s)"),h),description:(0,E.__)('Click on previously saved styles to preview them. To restore a selected version to the editor, hit "Apply." When you\'re ready, use the Save button to save your changes.'),onBack:C}),!A&&(0,l.createElement)(b.Spinner,{className:"edit-site-global-styles-screen-revisions__loading"}),A&&("global-styles-revisions:style-book"===a?(0,l.createElement)(pa,{userConfig:y,isSelected:()=>{},onClose:()=>{S("global-styles-revisions")}}):(0,l.createElement)(Cy,{blocks:r,userConfig:y,closeButtonLabel:(0,E.__)("Close revisions")})),(0,l.createElement)(Py,{onChange:e=>{v({styles:e?.styles||{},settings:e?.settings||{},id:e?.id})},selectedRevisionId:P,userRevisions:o,canApplyRevision:M,onApplyRevision:()=>p?w(!0):k(y)}),f>1&&(0,l.createElement)("div",{className:"edit-site-global-styles-screen-revisions__footer"},(0,l.createElement)(Iy,{className:"edit-site-global-styles-screen-revisions__pagination",currentPage:s,numPages:f,changePage:i,totalItems:h,disabled:d,label:(0,E.__)("Global Styles pagination navigation")})),_&&(0,l.createElement)(b.__experimentalConfirmDialog,{isOpen:_,confirmButtonText:(0,E.__)("Apply"),onConfirm:()=>k(y),onCancel:()=>w(!1)},(0,E.__)("Any unsaved changes will be lost when you apply this revision.")))},{useGlobalStylesReset:Ny}=Xe(fe.privateApis),{Slot:Fy,Fill:Ry}=(0,b.createSlotFill)("GlobalStylesMenu");function Dy(){const[e,t]=Ny(),{toggle:n}=(0,m.useDispatch)(T.store),{canEditCSS:r}=(0,m.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(ye.store),r=n(),a=r?t("root","globalStyles",r):void 0;return{canEditCSS:!!a?._links?.["wp:action-edit-css"]}}),[]),{setEditorCanvasContainerView:a}=Xe((0,m.useDispatch)(tr)),{goTo:s}=(0,b.__experimentalUseNavigator)(),i=()=>{a("global-styles-css"),s("/css")};return(0,l.createElement)(Ry,null,(0,l.createElement)(b.DropdownMenu,{icon:ue,label:(0,E.__)("More")},(({onClose:a})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.MenuGroup,null,r&&(0,l.createElement)(b.MenuItem,{onClick:i},(0,E.__)("Additional CSS")),(0,l.createElement)(b.MenuItem,{onClick:()=>{n("core/edit-site","welcomeGuideStyles"),a()}},(0,E.__)("Welcome Guide"))),(0,l.createElement)(b.MenuGroup,null,(0,l.createElement)(b.MenuItem,{onClick:()=>{t(),a()},disabled:!e},(0,E.__)("Reset styles")))))))}function Vy({className:e,...t}){return(0,l.createElement)(b.__experimentalNavigatorScreen,{className:["edit-site-global-styles-sidebar__navigator-screen",e].filter(Boolean).join(" "),...t})}function Ly({parentMenu:e,blockStyles:t,blockName:n}){return t.map(((t,r)=>(0,l.createElement)(Vy,{key:r,path:e+"/variations/"+t.name},(0,l.createElement)(Qd,{name:n,variation:t.name}))))}function By({name:e,parentMenu:t=""}){const n=(0,m.useSelect)((t=>{const{getBlockStyles:n}=t(u.store);return n(e)}),[e]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Vy,{path:t+"/colors/palette"},(0,l.createElement)(iy,{name:e})),!!n?.length&&(0,l.createElement)(Ly,{parentMenu:t,blockStyles:n,blockName:e}))}function zy(){const e=(0,b.__experimentalUseNavigator)(),{path:t}=e.location;return(0,l.createElement)(pa,{isSelected:e=>t===`/blocks/${encodeURIComponent(e)}`||t.startsWith(`/blocks/${encodeURIComponent(e)}/`),onSelect:t=>{e.goTo("/blocks/"+encodeURIComponent(t))}})}function Hy(){const e=(0,b.__experimentalUseNavigator)(),{selectedBlockName:t,selectedBlockClientId:n}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n}=e(fe.store),r=t();return{selectedBlockName:n(r),selectedBlockClientId:r}}),[]),r=Id(t);(0,g.useEffect)((()=>{if(!n||!r)return;const a=e.location.path;if("/blocks"!==a&&!a.startsWith("/blocks/"))return;const s="/blocks/"+encodeURIComponent(t);s!==a&&e.goTo(s,{skipFocus:!0})}),[n,t,r])}function Gy(){const{goTo:e,location:t}=(0,b.__experimentalUseNavigator)(),n=(0,m.useSelect)((e=>Xe(e(tr)).getEditorCanvasContainerView()),[]),r=t?.path,a="/revisions"===r;(0,g.useEffect)((()=>{switch(n){case"global-styles-revisions":case"global-styles-revisions:style-book":e("/revisions");break;case"global-styles-css":e("/css");break;case"style-book":a&&e("/");break;default:if("/"!==r&&!a)return;e("/")}}),[n,a,e])}const Uy=function(){const e=(0,u.getBlockTypes)(),t=(0,m.useSelect)((e=>Xe(e(tr)).getEditorCanvasContainerView()),[]);return(0,l.createElement)(b.__experimentalNavigatorProvider,{className:"edit-site-global-styles-sidebar__navigator-provider",initialPath:"/"},(0,l.createElement)(Vy,{path:"/"},(0,l.createElement)(_d,null)),(0,l.createElement)(Vy,{path:"/variations"},(0,l.createElement)(yy,null)),(0,l.createElement)(Vy,{path:"/blocks"},(0,l.createElement)(Od,null)),(0,l.createElement)(Vy,{path:"/typography"},(0,l.createElement)(Og,null)),(0,l.createElement)(Vy,{path:"/typography/text"},(0,l.createElement)(Hg,{element:"text"})),(0,l.createElement)(Vy,{path:"/typography/link"},(0,l.createElement)(Hg,{element:"link"})),(0,l.createElement)(Vy,{path:"/typography/heading"},(0,l.createElement)(Hg,{element:"heading"})),(0,l.createElement)(Vy,{path:"/typography/caption"},(0,l.createElement)(Hg,{element:"caption"})),(0,l.createElement)(Vy,{path:"/typography/button"},(0,l.createElement)(Hg,{element:"button"})),(0,l.createElement)(Vy,{path:"/colors"},(0,l.createElement)(Jg,null)),(0,l.createElement)(Vy,{path:"/layout"},(0,l.createElement)(gy,null)),(0,l.createElement)(Vy,{path:"/css"},(0,l.createElement)(by,null)),(0,l.createElement)(Vy,{path:"/revisions"},(0,l.createElement)(Oy,null)),e.map((e=>(0,l.createElement)(Vy,{key:"menu-block-"+e.name,path:"/blocks/"+encodeURIComponent(e.name)},(0,l.createElement)(Qd,{name:e.name})))),(0,l.createElement)(By,null),e.map((e=>(0,l.createElement)(By,{key:"screens-block-"+e.name,name:e.name,parentMenu:"/blocks/"+encodeURIComponent(e.name)}))),"style-book"===t&&(0,l.createElement)(zy,null),(0,l.createElement)(Dy,null),(0,l.createElement)(Hy,null),(0,l.createElement)(Gy,null))};function Wy(){const{shouldClearCanvasContainerView:e,isStyleBookOpened:t,showListViewByDefault:n,hasRevisions:r,isRevisionsOpened:a,isRevisionsStyleBookOpened:s}=(0,m.useSelect)((e=>{const{getActiveComplementaryArea:t}=e(j),{getEditorCanvasContainerView:n,getCanvasMode:r}=Xe(e(tr)),a=n(),s="visual"===e(tr).getEditorMode(),i="edit"===r(),o=e(T.store).get("core","showListViewByDefault"),{getEntityRecord:l,__experimentalGetCurrentGlobalStylesId:c}=e(ye.store),u=c(),d=u?l("root","globalStyles",u):void 0;return{isStyleBookOpened:"style-book"===a,shouldClearCanvasContainerView:"edit-site/global-styles"!==t("core/edit-site")||!s||!i,showListViewByDefault:o,hasRevisions:!!d?._links?.["version-history"]?.[0]?.count,isRevisionsStyleBookOpened:"global-styles-revisions:style-book"===a,isRevisionsOpened:"global-styles-revisions"===a}}),[]),{setEditorCanvasContainerView:i}=Xe((0,m.useDispatch)(tr));(0,g.useEffect)((()=>{e&&i(void 0)}),[e]);const{setIsListViewOpened:o}=(0,m.useDispatch)(y.store),{goTo:c}=(0,b.__experimentalUseNavigator)();return(0,l.createElement)(id,{className:"edit-site-global-styles-sidebar",identifier:"edit-site/global-styles",title:(0,E.__)("Styles"),icon:ir,closeLabel:(0,E.__)("Close Styles"),panelClassName:"edit-site-global-styles-sidebar__panel",header:(0,l.createElement)(b.Flex,{className:"edit-site-global-styles-sidebar__header",role:"menubar","aria-label":(0,E.__)("Styles actions")},(0,l.createElement)(b.FlexBlock,{style:{minWidth:"min-content"}},(0,l.createElement)("strong",null,(0,E.__)("Styles"))),(0,l.createElement)(b.FlexItem,null,(0,l.createElement)(b.Button,{icon:_r,label:(0,E.__)("Style Book"),isPressed:t||s,disabled:e,onClick:()=>{a?i("global-styles-revisions:style-book"):s?i("global-styles-revisions"):(o(t&&n),i(t?void 0:"style-book"))}})),(0,l.createElement)(b.FlexItem,null,(0,l.createElement)(b.Button,{label:(0,E.__)("Revisions"),icon:ba,onClick:()=>(o(!1),s?(c("/"),void i("style-book")):a?(c("/"),void i(void 0)):(c("/revisions"),void i(t?"global-styles-revisions:style-book":"global-styles-revisions"))),disabled:!r,isPressed:a||s})),(0,l.createElement)(Fy,null))},(0,l.createElement)(Uy,null))}const jy="edit-site/template",Zy="edit-site/block-inspector",{Tabs:qy}=Xe(b.privateApis),Yy=(0,g.forwardRef)(((e,t)=>{const n=(0,m.useSelect)((e=>e(y.store).getPostTypeLabel()),[]);return(0,l.createElement)(qy.TabList,{ref:t},(0,l.createElement)(qy.Tab,{tabId:jy,"data-tab-id":jy},n),(0,l.createElement)(qy.Tab,{tabId:Zy,"data-tab-id":Zy},(0,E.__)("Block")))}));function Ky({className:e,title:t,icon:n,description:r,actions:a,children:s}){return(0,l.createElement)("div",{className:_()("edit-site-sidebar-card",e)},(0,l.createElement)(b.Icon,{className:"edit-site-sidebar-card__icon",icon:n}),(0,l.createElement)("div",{className:"edit-site-sidebar-card__content"},(0,l.createElement)("div",{className:"edit-site-sidebar-card__header"},(0,l.createElement)("h2",{className:"edit-site-sidebar-card__title"},t),a),(0,l.createElement)("div",{className:"edit-site-sidebar-card__description"},r),s))}const{BlockQuickNavigation:Xy}=Xe(fe.privateApis);function Jy(){const e=(0,m.useSelect)((e=>Xe(e(fe.store)).getEnabledClientIdsTree()),[]),t=(0,g.useMemo)((()=>e.map((({clientId:e})=>e))),[e]);return(0,l.createElement)(Xy,{clientIds:t})}const{PostPanelRow:Qy}=Xe(y.privateApis),$y=[{label:(0,l.createElement)(l.Fragment,null,(0,E.__)("Draft"),(0,l.createElement)(b.__experimentalText,{variant:"muted"},(0,E.__)("Not ready to publish."))),value:"draft"},{label:(0,l.createElement)(l.Fragment,null,(0,E.__)("Pending"),(0,l.createElement)(b.__experimentalText,{variant:"muted"},(0,E.__)("Waiting for review before publishing."))),value:"pending"},{label:(0,l.createElement)(l.Fragment,null,(0,E.__)("Private"),(0,l.createElement)(b.__experimentalText,{variant:"muted"},(0,E.__)("Only visible to site admins and editors."))),value:"private"},{label:(0,l.createElement)(l.Fragment,null,(0,E.__)("Scheduled"),(0,l.createElement)(b.__experimentalText,{variant:"muted"},(0,E.__)("Publish automatically on a chosen date."))),value:"future"},{label:(0,l.createElement)(l.Fragment,null,(0,E.__)("Published"),(0,l.createElement)(b.__experimentalText,{variant:"muted"},(0,E.__)("Visible to everyone."))),value:"publish"}];function ev({postType:e,postId:t,status:n,password:r,date:a}){const[s,i]=(0,g.useState)(!!r),o=(0,ie.useInstanceId)(ev),{editEntityRecord:c}=(0,m.useDispatch)(ye.store),{createErrorNotice:u}=(0,m.useDispatch)(ge.store),[d,p]=(0,g.useState)(null),h=(0,g.useMemo)((()=>({anchor:d,"aria-label":(0,E.__)("Change status"),placement:"bottom-end"})),[d]),f=async({status:s=n,password:i=r,date:o=a})=>{try{await c("postType",e,t,{status:s,date:o,password:i})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,E.__)("An error occurred while updating the status");u(t,{type:"snackbar"})}},y=e=>{i(e),e||f({password:""})},v=e=>{let t=a,n=r;"publish"===e?new Date(a)>new Date&&(t=null):"future"===e?(!a||new Date(a)<new Date)&&(t=new Date,t.setDate(t.getDate()+7)):"private"===e&&r&&(i(!1),n=""),f({status:e,date:t,password:n})};return(0,l.createElement)(Qy,{label:(0,E.__)("Status")},(0,l.createElement)(b.Dropdown,{contentClassName:"edit-site-change-status__content",popoverProps:h,focusOnMount:!0,ref:p,renderToggle:({onToggle:e})=>(0,l.createElement)(b.Button,{className:"edit-site-summary-field__trigger",variant:"tertiary",onClick:e},(0,l.createElement)(pc,{status:r?"protected":n})),renderContent:({onClose:e})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(fe.__experimentalInspectorPopoverHeader,{title:(0,E.__)("Status"),onClose:e}),(0,l.createElement)("form",null,(0,l.createElement)(b.__experimentalVStack,{spacing:5},(0,l.createElement)(b.RadioControl,{className:"edit-site-change-status__options",hideLabelFromVision:!0,label:(0,E.__)("Status"),options:$y,onChange:v,selected:n}),"private"!==n&&(0,l.createElement)("fieldset",{className:"edit-site-change-status__password-fieldset"},(0,l.createElement)(b.__experimentalText,{as:"legend",className:"edit-site-change-status__password-legend",size:"11",lineHeight:1.4,weight:500,upperCase:!0},(0,E.__)("Password")),(0,l.createElement)(b.ToggleControl,{label:(0,E.__)("Hide this page behind a password"),checked:s,onChange:y}),s&&(0,l.createElement)("div",{className:"edit-site-change-status__password-input"},(0,l.createElement)(b.VisuallyHidden,{as:"label",htmlFor:`edit-site-change-status__password-input-${o}`},(0,E.__)("Create password")),(0,l.createElement)(b.TextControl,{onChange:e=>f({password:e}),value:r,placeholder:(0,E.__)("Use a secure password"),type:"text",id:`edit-site-change-status__password-input-${o}`}))))))}))}function tv({status:e,date:t,password:n,postId:r,postType:a}){return(0,l.createElement)(b.__experimentalVStack,{spacing:0},(0,l.createElement)(ev,{status:e,date:t,password:n,postId:r,postType:a}),(0,l.createElement)(y.PostSchedulePanel,null),(0,l.createElement)(y.PostTemplatePanel,null),(0,l.createElement)(y.PostURLPanel,null),(0,l.createElement)(y.PostAuthorPanel,null))}function nv(){const{id:e,type:t,hasResolved:n,status:r,date:a,password:s,title:i,modified:o,renderingMode:c}=(0,m.useSelect)((e=>{const{getEditedPostContext:t}=e(tr),{getEditedEntityRecord:n,hasFinishedResolution:r}=e(ye.store),{getRenderingMode:a}=e(y.store),s=t(),i=["postType",s.postType,s.postId],o=n(...i);return{hasResolved:r("getEditedEntityRecord",i),title:o?.title,id:o?.id,type:o?.type,status:o?.status,date:o?.date,password:o?.password,modified:o?.modified,renderingMode:a()}}),[]);return n?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.PanelBody,null,(0,l.createElement)(Ky,{title:(0,en.decodeEntities)(i),icon:or,description:(0,l.createElement)(b.__experimentalVStack,null,(0,l.createElement)(b.__experimentalText,null,(0,E.sprintf)((0,E.__)("Last edited %s"),(0,_a.humanTimeDiff)(o))))})),(0,l.createElement)(b.PanelBody,{title:(0,E.__)("Summary")},(0,l.createElement)(tv,{status:r,date:a,password:s,postId:e,postType:t})),"post-only"!==c&&(0,l.createElement)(b.PanelBody,{title:(0,E.__)("Content")},(0,l.createElement)(Jy,null)),(0,l.createElement)(y.PostLastRevisionPanel,null),(0,l.createElement)(y.PostTaxonomiesPanel,null),(0,l.createElement)(y.PostFeaturedImagePanel,null),(0,l.createElement)(y.PostExcerptPanel,null),(0,l.createElement)(y.PostDiscussionPanel,null),(0,l.createElement)(y.PageAttributesPanel,null)):null}function rv({onClick:e,availableTemplates:t}){const{editEntityRecord:n}=(0,m.useDispatch)(ye.store),[r,a]=(0,g.useState)(!1),s=()=>{a(!1)},{postId:i,postType:o}=(0,m.useSelect)((e=>({postId:e(tr).getEditedPostId(),postType:e(tr).getEditedPostType()})),[]);return!t.length||t.length<1?null:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.MenuItem,{info:(0,E.__)("Replace the contents of this template with another."),onClick:()=>a(!0)},(0,E.__)("Replace template")),r&&(0,l.createElement)(b.Modal,{title:(0,E.__)("Choose a template"),onRequestClose:s,overlayClassName:"edit-site-template-panel__replace-template-modal",isFullScreen:!0},(0,l.createElement)("div",{className:"edit-site-template-panel__replace-template-modal__content"},(0,l.createElement)(av,{availableTemplates:t,onSelect:async t=>{s(),e(),await n("postType",o,i,{blocks:t.blocks,content:(0,u.serialize)(t.blocks)})}}))))}function av({availableTemplates:e,onSelect:t}){const n=(0,ie.useAsyncList)(e);return(0,l.createElement)(fe.__experimentalBlockPatternsList,{label:(0,E.__)("Templates"),blockPatterns:e,shownPatterns:n,onClickPattern:t})}function sv(e,t){return e.innerBlocks=e.innerBlocks.map((e=>sv(e,t))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=t),e}function iv(e,t,n){return e.filter(((e,n,r)=>(e=>!Ot.includes(e.source))(e)&&((e,t,n)=>t===n.findIndex((t=>e.name===t.name)))(e,n,r)&&(e=>e.templateTypes?.includes(t.slug))(e))).map((e=>({...e,keywords:e.keywords||[],type:It.theme,blocks:(0,u.parse)(e.content,{__unstableSkipMigrationLogs:!0}).map((e=>sv(e,n)))})))}function ov({template:e}){const t=function(e){const{blockPatterns:t,restBlockPatterns:n,currentThemeStylesheet:r}=(0,m.useSelect)((e=>{var t;const{getSettings:n}=Xe(e(tr)),r=n();return{blockPatterns:null!==(t=r.__experimentalAdditionalBlockPatterns)&&void 0!==t?t:r.__experimentalBlockPatterns,restBlockPatterns:e(ye.store).getBlockPatterns(),currentThemeStylesheet:e(ye.store).getCurrentTheme().stylesheet}}),[]);return(0,g.useMemo)((()=>iv([...t||[],...n||[]],e,r)),[t,n,e,r])}(e),{revertTemplate:n}=(0,m.useDispatch)(tr),r=$t(e);return r||t.length&&!(t.length<1)?(0,l.createElement)(b.DropdownMenu,{icon:ue,label:(0,E.__)("Actions"),className:"edit-site-template-card__actions",toggleProps:{isSmall:!0}},(({onClose:a})=>(0,l.createElement)(b.MenuGroup,null,r&&(0,l.createElement)(b.MenuItem,{info:(0,E.__)("Use the template as supplied by the theme."),onClick:()=>{n(e),a()}},(0,E.__)("Clear customizations")),(0,l.createElement)(rv,{availableTemplates:t,template:e,onClick:a})))):null}function lv({area:e,clientId:t}){const{selectBlock:n,toggleBlockHighlight:r}=(0,m.useDispatch)(fe.store),a=(0,m.useSelect)((t=>t(y.store).__experimentalGetDefaultTemplatePartAreas().find((t=>t.area===e))),[e]),s=()=>r(t,!0),i=()=>r(t,!1);return(0,l.createElement)(b.Button,{className:"edit-site-template-card__template-areas-item",icon:a?.icon,onMouseOver:s,onMouseLeave:i,onFocus:s,onBlur:i,onClick:()=>{n(t)}},a?.label)}function cv(){const e=(0,m.useSelect)((e=>e(tr).getCurrentTemplateTemplateParts()),[]);return e.length?(0,l.createElement)("section",{className:"edit-site-template-card__template-areas"},(0,l.createElement)(b.__experimentalHeading,{level:3,className:"edit-site-template-card__template-areas-title"},(0,E.__)("Areas")),(0,l.createElement)("ul",{className:"edit-site-template-card__template-areas-list"},e.map((({templatePart:e,block:t})=>(0,l.createElement)("li",{key:t.clientId},(0,l.createElement)(lv,{area:e.area,clientId:t.clientId})))))):null}const uv={wp_block:cr,wp_navigation:sr};function dv(){var e;const{title:t,description:n,icon:r,record:a}=(0,m.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n}=e(tr),{getEditedEntityRecord:r}=e(ye.store),{__experimentalGetTemplateInfo:a}=e(y.store),s=r("postType",t(),n()),i=a(s);return{title:i.title,description:i.description,icon:i.icon,record:s}}),[]);return t||n?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.PanelBody,null,(0,l.createElement)(Ky,{className:"edit-site-template-card",title:(0,en.decodeEntities)(t),icon:null!==(e=uv[a?.type])&&void 0!==e?e:r,description:(0,en.decodeEntities)(n),actions:(0,l.createElement)(ov,{template:a})},(0,l.createElement)(cv,null))),(0,l.createElement)(y.PostLastRevisionPanel,null),(0,l.createElement)(y.PostTaxonomiesPanel,null),(0,l.createElement)(y.PostFeaturedImagePanel,null),(0,l.createElement)(y.PostExcerptPanel,null),(0,l.createElement)(y.PostDiscussionPanel,null),(0,l.createElement)(y.PageAttributesPanel,null)):null}const{Fill:mv,Slot:pv}=(0,b.createSlotFill)("PluginTemplateSettingPanel"),hv=mv;hv.Slot=pv;const fv=hv,{Tabs:gv}=Xe(b.privateApis),{Slot:yv,Fill:vv}=(0,b.createSlotFill)("EditSiteSidebarInspector"),_v=vv,bv=({sidebarName:e,isEditingPage:t,supportsGlobalStyles:n})=>{const r=(0,g.useRef)(null),a=(0,g.useContext)(gv.Context);return(0,g.useEffect)((()=>{const t=Array.from(r.current?.querySelectorAll('[role="tab"]')||[]),n=t.find((t=>t.getAttribute("data-tab-id")===e)),a=n?.ownerDocument.activeElement;t.some((e=>a&&a.id===e.id))&&n&&n.id!==a?.id&&n?.focus()}),[e]),(0,l.createElement)(l.Fragment,null,(0,l.createElement)(id,{identifier:e,title:(0,E.__)("Settings"),icon:(0,E.isRTL)()?zu:Hu,closeLabel:(0,E.__)("Close Settings"),header:(0,l.createElement)(gv.Context.Provider,{value:a},(0,l.createElement)(Yy,{ref:r})),headerClassName:"edit-site-sidebar-edit-mode__panel-tabs",className:"edit-site-sidebar__panel"},(0,l.createElement)(gv.Context.Provider,{value:a},(0,l.createElement)(gv.TabPanel,{tabId:jy,focusable:!1},t?(0,l.createElement)(nv,null):(0,l.createElement)(dv,null),(0,l.createElement)(fv.Slot,null)),(0,l.createElement)(gv.TabPanel,{tabId:Zy,focusable:!1},(0,l.createElement)(yv,{bubblesVirtually:!0})))),n&&(0,l.createElement)(Wy,null))};function Ev(){const{sidebar:e,isEditorSidebarOpened:t,hasBlockSelection:n,supportsGlobalStyles:r,isEditingPage:a,isEditorOpen:s}=(0,m.useSelect)((e=>{const t=e(j).getActiveComplementaryArea(Qt),n=[Zy,jy].includes(t),{getCanvasMode:r}=Xe(e(tr));return{sidebar:t,isEditorSidebarOpened:n,hasBlockSelection:!!e(fe.store).getBlockSelectionStart(),supportsGlobalStyles:e(ye.store).getCurrentTheme()?.is_block_theme,isEditingPage:e(tr).isPage(),isEditorOpen:"edit"===r()}}),[]),{enableComplementaryArea:i}=(0,m.useDispatch)(j);(0,g.useEffect)((()=>{t&&(n?a||i(Qt,Zy):i(Qt,jy))}),[n,t,a,i]);let o=e;t||(o=n?Zy:jy);const c=(0,g.useCallback)((e=>{e&&i(Qt,e)}),[i]);return(0,l.createElement)(gv,{selectedTabId:s&&t?o:null,onSelect:c,selectOnMove:!1},(0,l.createElement)(bv,{sidebarName:o,isEditingPage:a,supportsGlobalStyles:r}))}var wv=a(4132);function Sv(){const e=(0,ie.useInstanceId)(Sv),{shortcut:t,content:n,blocks:r,type:a,id:s}=(0,m.useSelect)((e=>{const{getEditedEntityRecord:t}=e(ye.store),{getEditedPostType:n,getEditedPostId:r}=e(tr),{getShortcutRepresentation:a}=e(nr.store),s=n(),i=r(),o=t("postType",s,i);return{shortcut:a("core/edit-site/toggle-mode"),content:o?.content,blocks:o?.blocks,type:s,id:i}}),[]),{editEntityRecord:i}=(0,m.useDispatch)(ye.store),o=(0,g.useMemo)((()=>n instanceof Function?n({blocks:r}):r?(0,u.__unstableSerializeAndClean)(r):n),[n,r]),{switchEditorMode:c}=(0,m.useDispatch)(tr);return(0,l.createElement)("div",{className:"edit-site-code-editor"},(0,l.createElement)("div",{className:"edit-site-code-editor__toolbar"},(0,l.createElement)("h2",null,(0,E.__)("Editing code")),(0,l.createElement)(b.Button,{variant:"tertiary",onClick:()=>c("visual"),shortcut:t},(0,E.__)("Exit code editor"))),(0,l.createElement)("div",{className:"edit-site-code-editor__body"},(0,l.createElement)(b.VisuallyHidden,{as:"label",htmlFor:`code-editor-text-area-${e}`},(0,E.__)("Type text or HTML")),(0,l.createElement)(wv.A,{autoComplete:"off",dir:"auto",value:o,onChange:e=>{i("postType",a,s,{content:e.target.value,blocks:void 0,selection:void 0})},className:"edit-site-code-editor-text-area",id:`code-editor-text-area-${e}`,placeholder:(0,E.__)("Start writing with text or HTML")})))}const xv=function(){const{getEditorMode:e}=(0,m.useSelect)(tr),t=(0,m.useSelect)((e=>e(j).getActiveComplementaryArea(tr.name)===Zy),[]),{switchEditorMode:n,toggleDistractionFree:r}=(0,m.useDispatch)(tr),{enableComplementaryArea:a,disableComplementaryArea:s}=(0,m.useDispatch)(j),{replaceBlocks:i}=(0,m.useDispatch)(fe.store),{getBlockName:o,getSelectedBlockClientId:l,getBlockAttributes:c}=(0,m.useSelect)(fe.store),d=(e,t)=>{e.preventDefault();const n=0===t?"core/paragraph":"core/heading",r=l();if(null===r)return;const a=o(r);if("core/paragraph"!==a&&"core/heading"!==a)return;const s=c(r),d="core/paragraph"===a?"align":"textAlign",m="core/paragraph"===n?"align":"textAlign";i(r,(0,u.createBlock)(n,{level:t,content:s.content,[m]:s[d]}))};return(0,nr.useShortcut)("core/edit-site/toggle-block-settings-sidebar",(e=>{e.preventDefault(),t?s(Qt):a(Qt,Zy)})),(0,nr.useShortcut)("core/edit-site/toggle-mode",(()=>{n("visual"===e()?"text":"visual")})),(0,nr.useShortcut)("core/edit-site/transform-heading-to-paragraph",(e=>d(e,0))),[1,2,3,4,5,6].forEach((e=>{(0,nr.useShortcut)(`core/edit-site/transform-paragraph-to-heading-${e}`,(t=>d(t,e)))})),(0,nr.useShortcut)("core/edit-site/toggle-distraction-free",(()=>{r()})),null};function Cv({nonAnimatedSrc:e,animatedSrc:t}){return(0,l.createElement)("picture",{className:"edit-site-welcome-guide__image"},(0,l.createElement)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,l.createElement)("img",{src:t,width:"312",height:"240",alt:""}))}function kv(){const{toggle:e}=(0,m.useDispatch)(T.store);return(0,m.useSelect)((e=>!!e(T.store).get("core/edit-site","welcomeGuide")),[])?(0,l.createElement)(b.Guide,{className:"edit-site-welcome-guide guide-editor",contentLabel:(0,E.__)("Welcome to the site editor"),finishButtonText:(0,E.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuide"),pages:[{image:(0,l.createElement)(Cv,{nonAnimatedSrc:"https://s.w.org/images/block-editor/edit-your-site.svg?1",animatedSrc:"https://s.w.org/images/block-editor/edit-your-site.gif?1"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,E.__)("Edit your site")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,E.__)("Design everything on your site — from the header right down to the footer — using blocks.")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,g.createInterpolateElement)((0,E.__)("Click <StylesIconImage /> to start designing your blocks, and choose your typography, layout, and colors."),{StylesIconImage:(0,l.createElement)("img",{alt:(0,E.__)("styles"),src:"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z' fill='%231E1E1E'/%3E%3C/svg%3E%0A"})})))}]}):null}function Tv(){const{toggle:e}=(0,m.useDispatch)(T.store),{isActive:t,isStylesOpen:n}=(0,m.useSelect)((e=>{const t=e(j).getActiveComplementaryArea(tr.name);return{isActive:!!e(T.store).get("core/edit-site","welcomeGuideStyles"),isStylesOpen:"edit-site/global-styles"===t}}),[]);if(!t||!n)return null;const r=(0,E.__)("Welcome to Styles");return(0,l.createElement)(b.Guide,{className:"edit-site-welcome-guide guide-styles",contentLabel:r,finishButtonText:(0,E.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuideStyles"),pages:[{image:(0,l.createElement)(Cv,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.svg?1",animatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.gif?1"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},r),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,E.__)("Tweak your site, or give it a whole new look! Get creative — how about a new color palette for your buttons, or choosing a new font? Take a look at what you can do here.")))},{image:(0,l.createElement)(Cv,{nonAnimatedSrc:"https://s.w.org/images/block-editor/set-the-design.svg?1",animatedSrc:"https://s.w.org/images/block-editor/set-the-design.gif?1"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,E.__)("Set the design")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,E.__)("You can customize your site as much as you like with different colors, typography, and layouts. Or if you prefer, just leave it up to your theme to handle!")))},{image:(0,l.createElement)(Cv,{nonAnimatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.svg?1",animatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.gif?1"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,E.__)("Personalize blocks")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,E.__)("You can adjust your blocks to ensure a cohesive experience across your site — add your unique colors to a branded Button block, or adjust the Heading block to your preferred size.")))},{image:(0,l.createElement)(Cv,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,E.__)("Learn more")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,E.__)("New to block themes and styling your site?")," ",(0,l.createElement)(b.ExternalLink,{href:(0,E.__)("https://wordpress.org/documentation/article/styles-overview/")},(0,E.__)("Here’s a detailed guide to learn how to make the most of it."))))}]})}function Pv(){const{toggle:e}=(0,m.useDispatch)(T.store),t=(0,m.useSelect)((e=>{const t=!!e(T.store).get("core/edit-site","welcomeGuidePage"),n=!!e(T.store).get("core/edit-site","welcomeGuide"),{isPage:r}=e(tr);return t&&!n&&r()}),[]);if(!t)return null;const n=(0,E.__)("Editing a page");return(0,l.createElement)(b.Guide,{className:"edit-site-welcome-guide guide-page",contentLabel:n,finishButtonText:(0,E.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuidePage"),pages:[{image:(0,l.createElement)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240"},(0,l.createElement)("source",{src:"https://s.w.org/images/block-editor/editing-your-page.mp4",type:"video/mp4"})),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},n),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,E.__)("It’s now possible to edit page content in the site editor. To customise other parts of the page like the header and footer switch to editing the template using the settings sidebar.")))}]})}function Iv(){const{toggle:e}=(0,m.useDispatch)(T.store),t=(0,m.useSelect)((e=>{const t=!!e(T.store).get("core/edit-site","welcomeGuideTemplate"),n=!!e(T.store).get("core/edit-site","welcomeGuide"),{isPage:r}=e(tr),{getCurrentPostType:a}=e(y.store);return t&&!n&&r()&&"wp_template"===a()}),[]);if(!t)return null;const n=(0,E.__)("Editing a template");return(0,l.createElement)(b.Guide,{className:"edit-site-welcome-guide guide-template",contentLabel:n,finishButtonText:(0,E.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuideTemplate"),pages:[{image:(0,l.createElement)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240"},(0,l.createElement)("source",{src:"https://s.w.org/images/block-editor/editing-your-template.mp4",type:"video/mp4"})),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},n),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,E.__)("Note that the same template can be used by multiple pages, so any changes made here may affect other pages on the site. To switch back to editing the page content click the ‘Back’ button in the toolbar.")))}]})}function Mv(){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(kv,null),(0,l.createElement)(Tv,null),(0,l.createElement)(Pv,null),(0,l.createElement)(Iv,null))}function Av(e){const{slug:t,patterns:n}=(0,m.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n}=e(tr),{getEntityRecord:r,getBlockPatterns:a}=e(ye.store),s=n();return{slug:r("postType",t(),s).slug,patterns:a()}}),[]),r=(0,m.useSelect)((e=>e(ye.store).getCurrentTheme().stylesheet));return(0,g.useMemo)((()=>[{name:"fallback",blocks:(0,u.parse)(e),title:(0,E.__)("Fallback content")},...n.filter((e=>Array.isArray(e.templateTypes)&&e.templateTypes.some((e=>t.startsWith(e))))).map((e=>({...e,blocks:(0,u.parse)(e.content).map((e=>function(e){return e.innerBlocks.find((e=>"core/template-part"===e.name))&&(e.innerBlocks=e.innerBlocks.map((e=>("core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=r),e)))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=r),e}(e)))})))]),[e,t,n])}function Ov({fallbackContent:e,onChoosePattern:t,postType:n}){const[,,r]=(0,ye.useEntityBlockEditor)("postType",n),a=Av(e),s=(0,ie.useAsyncList)(a);return(0,l.createElement)(fe.__experimentalBlockPatternsList,{blockPatterns:a,shownPatterns:s,onClickPattern:(e,n)=>{r(n,{selection:void 0}),t()}})}function Nv({slug:e,isCustom:t,onClose:n,postType:r}){const a=function(e,t=!1){return(0,m.useSelect)((n=>{const{getEntityRecord:r,getDefaultTemplateId:a}=n(ye.store),s=a({slug:e,is_custom:t,ignore_empty:!0});return s?r("postType",Ct,s)?.content?.raw:void 0}),[e,t])}(e,t);return a?(0,l.createElement)(b.Modal,{className:"edit-site-start-template-options__modal",title:(0,E.__)("Choose a pattern"),closeLabel:(0,E.__)("Cancel"),focusOnMount:"firstElement",onRequestClose:n,isFullScreen:!0},(0,l.createElement)("div",{className:"edit-site-start-template-options__modal-content"},(0,l.createElement)(Ov,{fallbackContent:a,slug:e,isCustom:t,postType:r,onChoosePattern:()=>{n()}})),(0,l.createElement)(b.Flex,{className:"edit-site-start-template-options__modal__actions",justify:"flex-end",expanded:!1},(0,l.createElement)(b.FlexItem,null,(0,l.createElement)(b.Button,{variant:"tertiary",onClick:n},(0,E.__)("Skip"))))):null}const Fv={INITIAL:"INITIAL",CLOSED:"CLOSED"};function Rv(){const[e,t]=(0,g.useState)(Fv.INITIAL),{shouldOpenModal:n,slug:r,isCustom:a,postType:s}=(0,m.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n}=e(tr),r=t(),a=n(),{getEditedEntityRecord:s,hasEditsForEntityRecord:i}=e(ye.store),o=s("postType",r,a);return{shouldOpenModal:!i("postType",r,a)&&""===o.content&&Ct===r&&!e(T.store).get("core/edit-site","welcomeGuide"),slug:o.slug,isCustom:o.is_custom,postType:r}}),[]);return e===Fv.INITIAL&&!n||e===Fv.CLOSED?null:(0,l.createElement)(Nv,{slug:r,isCustom:a,postType:s,onClose:()=>t(Fv.CLOSED)})}const{useGlobalStylesOutput:Dv}=Xe(fe.privateApis);function Vv(){return function(){const[e,t]=Dv(),{getSettings:n}=(0,m.useSelect)(tr),{updateSettings:r}=(0,m.useDispatch)(tr);(0,g.useEffect)((()=>{var a;if(!e||!t)return;const s=n(),i=Object.values(null!==(a=s.styles)&&void 0!==a?a:[]).filter((e=>!e.isGlobalStyles));r({...s,styles:[...i,...e],__experimentalFeatures:t})}),[e,t,r,n])}(),null}const{useLocation:Lv}=Xe(gt.privateApis);const{ProgressBar:Bv,Theme:zv}=Xe(b.privateApis),{useGlobalStyle:Hv}=Xe(fe.privateApis);function Gv({id:e}){var t;const[n]=Hv("color.text"),[r]=Hv("color.background"),{highlightedColors:a}=$e(),s=null!==(t=a[0]?.color)&&void 0!==t?t:n,{elapsed:i,total:o}=(0,m.useSelect)((e=>{var t,n;const r=e(ye.store).countSelectorsByStatus(),a=null!==(t=r.resolving)&&void 0!==t?t:0,s=null!==(n=r.finished)&&void 0!==n?n:0;return{elapsed:s,total:s+a}}),[]);return(0,l.createElement)("div",{className:"edit-site-canvas-loader"},(0,l.createElement)(zv,{accent:s,background:r},(0,l.createElement)(Bv,{id:e,max:o,value:i})))}const{EditorCanvas:Uv}=Xe(y.privateApis);const Wv=function({enableResizing:e,settings:t,children:n,...r}){const{hasBlocks:a,isFocusMode:s,templateType:i,canvasMode:o,isZoomOutMode:c}=(0,m.useSelect)((e=>{const{getBlockCount:t,__unstableGetEditorMode:n}=e(fe.store),{getEditedPostType:r,getCanvasMode:a}=Xe(e(tr)),s=r();return{templateType:s,isFocusMode:Ft.includes(s),isZoomOutMode:"zoom-out"===n(),canvasMode:a(),hasBlocks:!!t()}}),[]),{setCanvasMode:u}=Xe((0,m.useDispatch)(tr)),[d,p]=(0,g.useState)(!1);(0,g.useEffect)((()=>{"edit"===o&&p(!1)}),[o]);const h={"aria-label":(0,E.__)("Editor Canvas"),role:"button",tabIndex:0,onFocus:()=>p(!0),onBlur:()=>p(!1),onKeyDown:e=>{const{keyCode:t}=e;t!==wr.ENTER&&t!==wr.SPACE||(e.preventDefault(),u("edit"))},onClick:()=>u("edit"),readonly:!0},f=i===xt,y=!(f&&s&&a||"view"===o)&&void 0,v=(0,g.useMemo)((()=>[...t.styles,{css:`.is-root-container{display:flow-root;${e?"min-height:0!important;":""}}body{position:relative; ${"view"===o?"cursor: pointer; min-height: 100vh;":""}}}`}]),[t.styles,e,o]);return(0,l.createElement)(Uv,{className:_()("edit-site-editor-canvas__block-list",{"is-navigation-block":f}),renderAppender:y,styles:v,iframeProps:{expand:c,scale:c?.45:void 0,frameSize:c?100:void 0,className:_()("edit-site-visual-editor__editor-canvas",{"is-focused":d&&"view"===o}),...r,..."view"===o?h:{}}},n)},{useHistory:jv}=Xe(gt.privateApis);const{useBlockEditorSettings:Zv}=Xe(y.privateApis),{useLocation:qv,useHistory:Yv}=Xe(gt.privateApis);function Kv(){const e=function(){const e=jv();return(0,g.useCallback)((t=>{e.push({...t,focusMode:!0,canvas:"edit"})}),[e])}(),{templateSlug:t,canvasMode:n,settings:r,postWithTemplate:a}=(0,m.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n,getEditedPostContext:r,getCanvasMode:a,getSettings:s}=Xe(e(tr)),{getEditedEntityRecord:i}=e(ye.store),o=i("postType",t(),n()),l=r();return{templateSlug:o.slug,canvasMode:a(),settings:s(),postWithTemplate:l?.postId}}),[]),s=function(e){const t=e?.match(/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/);let n,r,a,s=!1;if(t)t[1]?n=t[2]?t[2]:t[1]:t[3]&&(n=t[6]?t[6]:t[4],r=t[7]),n="tag"===n?"post_tag":n;else{const t=e?.match(/^(author)$|^author-(.+)$/);t&&(s=!0,t[2]&&(a=t[2]))}return(0,m.useSelect)((e=>{const{getEntityRecords:t,getTaxonomy:i,getAuthors:o}=e(ye.store);let l,c;if(n&&(l=i(n)?.labels?.singular_name),r){const e=t("taxonomy",n,{slug:r,per_page:1});e&&e[0]&&(c=e[0].name)}if(s&&(l="Author",a)){const e=o({slug:a});e&&e[0]&&(c=e[0].name)}return{archiveTypeLabel:l,archiveNameLabel:c}}),[a,s,n,r])}(t),i=a?"template-locked":"post-only",o=function(){const e=qv(),t=(0,ie.usePrevious)(e),n=Yv();return(0,g.useMemo)((()=>{const r=e.params.focusMode||e.params.postId&&Ft.includes(e.params.postType),a="edit"===t?.params.canvas;return r&&a?()=>n.back():void 0}),[e,n])}();return(0,g.useMemo)((()=>({...r,richEditingEnabled:!0,supportsTemplateMode:!0,focusMode:"view"!==n,defaultRenderingMode:i,onNavigateToEntityRecord:e,onNavigateToPreviousEntityRecord:o,__experimentalArchiveTitleTypeLabel:s.archiveTypeLabel,__experimentalArchiveTitleNameLabel:s.archiveNameLabel})),[r,n,i,e,o,s.archiveTypeLabel,s.archiveNameLabel])}const{useLocation:Xv}=Xe(gt.privateApis);function Jv(){const e=Xv(),{templateType:t,isFocusableEntity:n,isViewMode:r}=(0,m.useSelect)((e=>{const{getEditedPostType:t,getCanvasMode:n}=Xe(e(tr)),r=t();return{templateType:r,isFocusableEntity:Ft.includes(r),isViewMode:"view"===n()}}),[]),a=e.params.focusMode||n,[s,i]=(0,ie.useResizeObserver)(),o=function(){const e=Kv(),{postType:t,postId:n}=(0,m.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n}=Xe(e(tr));return{postType:t(),postId:n()}}),[]);return Zv(e,t,n)}(),c=(0,ie.useViewportMatch)("small","<"),u=a&&!r&&!c&&t!==Ct,d=t===xt&&a;return(0,l.createElement)($r.Slot,null,(([e])=>e?(0,l.createElement)("div",{className:"edit-site-visual-editor is-focus-mode"},e):(0,l.createElement)("div",{className:_()("edit-site-visual-editor",{"is-focus-mode":a||!!e,"is-view-mode":r})},(0,l.createElement)(Zr,{enableResizing:u,height:i.height&&!d?i.height:"100%"},(0,l.createElement)(Wv,{enableResizing:u,settings:o},s)))))}function Qv({clientId:e,onClose:t}){const{getBlocks:n}=(0,m.useSelect)(fe.store),{replaceBlocks:r}=(0,m.useDispatch)(fe.store);return(0,m.useSelect)((t=>t(fe.store).canRemoveBlock(e)),[e])?(0,l.createElement)(b.MenuItem,{onClick:()=>{r(e,n(e)),t()}},(0,E.__)("Detach")):null}function $v({clientIds:e,blocks:t}){const[n,r]=(0,g.useState)(!1),{replaceBlocks:a}=(0,m.useDispatch)(fe.store),{createSuccessNotice:s}=(0,m.useDispatch)(ge.store),{canCreate:i}=(0,m.useSelect)((e=>{const{supportsTemplatePartsMode:t}=e(tr).getSettings();return{canCreate:!t}}),[]);if(!i)return null;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.MenuItem,{icon:Ks,onClick:()=>{r(!0)},"aria-expanded":n,"aria-haspopup":"dialog"},(0,E.__)("Create template part")),n&&(0,l.createElement)(ei,{closeModal:()=>{r(!1)},blocks:t,onCreate:async t=>{a(e,(0,u.createBlock)("core/template-part",{slug:t.slug,theme:t.theme})),s((0,E.__)("Template part created."),{type:"snackbar"})}}))}function e_(){return(0,l.createElement)(fe.BlockSettingsMenuControls,null,(({selectedClientIds:e,onClose:t})=>(0,l.createElement)(t_,{clientIds:e,onClose:t})))}function t_({clientIds:e,onClose:t}){const n=(0,m.useSelect)((t=>t(fe.store).getBlocksByClientId(e)),[e]);return 1===n.length&&"core/template-part"===n[0]?.name?(0,l.createElement)(Qv,{clientId:e[0],onClose:t}):(0,l.createElement)($v,{clientIds:e,blocks:n})}const{BlockRemovalWarningModal:n_}=Xe(fe.privateApis),{ExperimentalEditorProvider:r_,InserterSidebar:a_,ListViewSidebar:s_}=Xe(y.privateApis),i_={body:(0,E.__)("Editor content"),sidebar:(0,E.__)("Editor settings"),actions:(0,E.__)("Editor publish"),footer:(0,E.__)("Editor footer")},o_={"core/query":(0,E.__)("Query Loop displays a list of posts or pages."),"core/post-content":(0,E.__)("Post Content displays the content of a post or page."),"core/post-template":(0,E.__)("Post Template displays each post or page in a Query Loop."),"bindings/core/pattern-overrides":(0,E.__)("Blocks from synced patterns that can have overriden content.")};function l_({isLoading:e}){const{record:t,getTitle:n,isLoaded:r}=Ds(),{type:a}=t,s=(0,ie.useViewportMatch)("medium"),{context:i,contextPost:o,editorMode:c,canvasMode:u,blockEditorMode:d,isRightSidebarOpen:p,isInserterOpen:h,isListViewOpen:f,isDistractionFree:v,showIconLabels:w,showBlockBreadcrumbs:S,postTypeLabel:x}=(0,m.useSelect)((e=>{const{get:t}=e(T.store),{getEditedPostContext:n,getEditorMode:r,getCanvasMode:a}=Xe(e(tr)),{__unstableGetEditorMode:s}=e(fe.store),{getActiveComplementaryArea:i}=e(j),{getEntityRecord:o}=e(ye.store),{isInserterOpened:l,isListViewOpened:c,getPostTypeLabel:u}=e(y.store),d=n();return{context:d,contextPost:d?.postId?o("postType",d.postType,d.postId):void 0,editorMode:r(),canvasMode:a(),blockEditorMode:s(),isInserterOpen:l(),isListViewOpen:c(),isRightSidebarOpen:i(tr.name),isDistractionFree:t("core","distractionFree"),showBlockBreadcrumbs:t("core","showBlockBreadcrumbs"),showIconLabels:t("core","showIconLabels"),postTypeLabel:u()}}),[]),C="edit"===u,k="view"===u||"visual"===c,P=!v&&S&&C&&k&&"zoom-out"!==d,I=C&&k&&h,M=C&&k&&f,A=f?(0,E.__)("List View"):(0,E.__)("Block Library"),O=!!i?.postId;let N;var F;r&&(N=(0,E.sprintf)((0,E.__)("%1$s ‹ %2$s"),n(),null!==(F=Rt[a])&&void 0!==F?F:Rt[Ct]));!function(e){const t=Lv(),n=(0,m.useSelect)((e=>e(ye.store).getEntityRecord("root","site")?.title),[]),r=(0,g.useRef)(!0);(0,g.useEffect)((()=>{r.current=!1}),[t]),(0,g.useEffect)((()=>{if(!r.current&&e&&n){const t=(0,E.sprintf)((0,E.__)("%1$s ‹ %2$s ‹ Editor — WordPress"),(0,en.decodeEntities)(e),(0,en.decodeEntities)(n));document.title=t,(0,Jt.speak)(e,"assertive")}}),[e,n,t])}(r&&N);const R=(0,ie.useInstanceId)(Gv,"edit-site-editor__loading-progress"),D=Kv(),V=!e&&(O&&!!o&&!!t||!O&&!!t);return(0,l.createElement)(l.Fragment,null,V?null:(0,l.createElement)(Gv,{id:R}),C&&(0,l.createElement)(Mv,null),r&&!t&&(0,l.createElement)(b.Notice,{status:"warning",isDismissible:!1},(0,E.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")),V&&(0,l.createElement)(r_,{post:O?o:t,__unstableTemplate:O?t:void 0,settings:D,useSubRegistry:!1},(0,l.createElement)(Ev,null),C&&(0,l.createElement)(Rv,null),(0,l.createElement)(ce,{isDistractionFree:v,enableRegionNavigation:!1,className:_()("edit-site-editor__interface-skeleton",{"show-icon-labels":w}),notices:(0,l.createElement)(y.EditorSnackbars,null),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Vv,null),C&&(0,l.createElement)(y.EditorNotices,null),k&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(e_,null),(0,l.createElement)(_v,null,(0,l.createElement)(fe.BlockInspector,null)),!s&&(0,l.createElement)(fe.BlockToolbar,{hideDragHandle:!0}),(0,l.createElement)(Jv,null),(0,l.createElement)(n_,{rules:o_}),(0,l.createElement)(Ju,null)),"text"===c&&C&&(0,l.createElement)(Sv,null),C&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(xv,null),(0,l.createElement)(y.EditorKeyboardShortcutsRegister,null),(0,l.createElement)(y.EditorKeyboardShortcuts,null))),secondarySidebar:C&&(I&&(0,l.createElement)(a_,null)||M&&(0,l.createElement)(s_,null)),sidebar:!v&&C&&p&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(se.Slot,{scope:"core/edit-site"})),footer:P&&(0,l.createElement)(fe.BlockBreadcrumb,{rootLabelText:x}),labels:{...i_,secondarySidebar:A}})))}const c_=(0,g.memo)((function({view:e,onChangeView:t,paginationInfo:{totalItems:n=0,totalPages:r}}){return n&&r?!!n&&1!==r&&(0,l.createElement)(b.__experimentalHStack,{expanded:!1,spacing:6,justify:"end",className:"dataviews-pagination"},(0,l.createElement)(b.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:2,className:"dataviews-pagination__page-selection"},(0,g.createInterpolateElement)((0,E.sprintf)((0,E._x)("Page <CurrentPageControl /> of %s","paging"),r),{CurrentPageControl:(0,l.createElement)(b.SelectControl,{"aria-label":(0,E.__)("Current page"),value:e.page,options:Array.from(Array(r)).map(((e,t)=>{const n=t+1;return{value:n,label:n}})),onChange:n=>{t({...e,page:+n})},size:"compact",__nextHasNoMarginBottom:!0})})),(0,l.createElement)(b.__experimentalHStack,{expanded:!1,spacing:1},(0,l.createElement)(b.Button,{onClick:()=>t({...e,page:e.page-1}),disabled:1===e.page,__experimentalIsFocusable:!0,label:(0,E.__)("Previous page"),icon:dr,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,l.createElement)(b.Button,{onClick:()=>t({...e,page:e.page+1}),disabled:e.page>=r,__experimentalIsFocusable:!0,label:(0,E.__)("Next page"),icon:ur,showTooltip:!0,size:"compact",tooltipPosition:"top"}))):null})),u_=c_,{DropdownMenuV2:d_,DropdownMenuGroupV2:m_,DropdownMenuItemV2:p_,DropdownMenuRadioItemV2:h_,DropdownMenuCheckboxItemV2:f_,DropdownMenuItemLabelV2:g_}=Vo(b.privateApis);function y_({view:e,onChangeView:t,supportedLayouts:n}){let r=Pl;if(n&&(r=r.filter((e=>n.includes(e.type)))),1===r.length)return null;const a=r.find((t=>e.type===t.type));return(0,l.createElement)(d_,{trigger:(0,l.createElement)(p_,{suffix:(0,l.createElement)("span",{"aria-hidden":"true"},a.label)},(0,l.createElement)(g_,null,(0,E.__)("Layout")))},r.map((n=>(0,l.createElement)(h_,{key:n.type,value:n.type,name:"view-actions-available-view",checked:n.type===e.type,hideOnClick:!0,onChange:n=>{t({...e,type:n.target.value})}},(0,l.createElement)(g_,null,n.label)))))}const v_=[10,20,50,100];function __({view:e,onChangeView:t}){return(0,l.createElement)(d_,{trigger:(0,l.createElement)(p_,{suffix:(0,l.createElement)("span",{"aria-hidden":"true"},e.perPage)},(0,l.createElement)(g_,null,(0,E.__)("Items per page")))},v_.map((n=>(0,l.createElement)(h_,{key:n,value:n,name:"view-actions-page-size",checked:e.perPage===n,onChange:()=>{t({...e,perPage:n,page:1})}},(0,l.createElement)(g_,null,n)))))}function b_({view:e,onChangeView:t,fields:n}){const r=n.filter((t=>!1!==t.enableHiding&&t.id!==e.layout.mediaField));return r?.length?(0,l.createElement)(d_,{trigger:(0,l.createElement)(p_,null,(0,l.createElement)(g_,null,(0,E.__)("Fields")))},r?.map((n=>(0,l.createElement)(f_,{key:n.id,value:n.id,checked:!e.hiddenFields?.includes(n.id),onChange:()=>{t({...e,hiddenFields:e.hiddenFields?.includes(n.id)?e.hiddenFields.filter((e=>e!==n.id)):[...e.hiddenFields||[],n.id]})}},(0,l.createElement)(g_,null,n.header))))):null}function E_({fields:e,view:t,onChangeView:n}){const r=e.filter((e=>!1!==e.enableSorting));if(!r?.length)return null;const a=e.find((e=>e.id===t.sort?.field));return(0,l.createElement)(d_,{trigger:(0,l.createElement)(p_,{suffix:(0,l.createElement)("span",{"aria-hidden":"true"},a?.header)},(0,l.createElement)(g_,null,(0,E.__)("Sort by")))},r?.map((e=>{const r=t.sort?.direction;return(0,l.createElement)(d_,{key:e.id,trigger:(0,l.createElement)(p_,null,(0,l.createElement)(g_,null,e.header)),style:{minWidth:"220px"}},Object.entries(Cl).map((([s,i])=>{const o=void 0!==a&&r===s&&e.id===a.id,c=`${e.id}-${s}`;return(0,l.createElement)(h_,{key:c,name:"view-actions-sorting",value:c,checked:o,onChange:()=>{n({...t,sort:{field:e.id,direction:s}})}},(0,l.createElement)(g_,null,i.label))})))})))}const w_=(0,g.memo)((function({fields:e,view:t,onChangeView:n,supportedLayouts:r}){return(0,l.createElement)(d_,{trigger:(0,l.createElement)(b.Button,{size:"compact",icon:nm,label:(0,E.__)("View options")})},(0,l.createElement)(m_,null,(0,l.createElement)(y_,{view:t,onChangeView:n,supportedLayouts:r}),(0,l.createElement)(E_,{fields:e,view:t,onChangeView:n}),(0,l.createElement)(b_,{fields:e,view:t,onChangeView:n}),(0,l.createElement)(__,{view:t,onChangeView:n})))}));var S_=Object.defineProperty,x_=Object.defineProperties,C_=Object.getOwnPropertyDescriptors,k_=Object.getOwnPropertySymbols,T_=Object.prototype.hasOwnProperty,P_=Object.prototype.propertyIsEnumerable,I_=(e,t,n)=>t in e?S_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,M_=(e,t)=>{for(var n in t||(t={}))T_.call(t,n)&&I_(e,n,t[n]);if(k_)for(var n of k_(t))P_.call(t,n)&&I_(e,n,t[n]);return e},A_=(e,t)=>x_(e,C_(t)),O_=(e,t)=>{var n={};for(var r in e)T_.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&k_)for(var r of k_(e))t.indexOf(r)<0&&P_.call(e,r)&&(n[r]=e[r]);return n},N_=Object.defineProperty,F_=Object.defineProperties,R_=Object.getOwnPropertyDescriptors,D_=Object.getOwnPropertySymbols,V_=Object.prototype.hasOwnProperty,L_=Object.prototype.propertyIsEnumerable,B_=(e,t,n)=>t in e?N_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,z_=(e,t)=>{for(var n in t||(t={}))V_.call(t,n)&&B_(e,n,t[n]);if(D_)for(var n of D_(t))L_.call(t,n)&&B_(e,n,t[n]);return e},H_=(e,t)=>F_(e,R_(t)),G_=(e,t)=>{var n={};for(var r in e)V_.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&D_)for(var r of D_(e))t.indexOf(r)<0&&L_.call(e,r)&&(n[r]=e[r]);return n};function U_(...e){}function W_(e,t){return"function"==typeof Object.hasOwn?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function j_(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}function Z_(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function q_(e){return e}function Y_(e,t){if(!e){if("string"!=typeof t)throw new Error("Invariant failed");throw new Error(t)}}function K_(e){return e.disabled||!0===e["aria-disabled"]||"true"===e["aria-disabled"]}function X_(...e){for(const t of e)if(void 0!==t)return t}function J_(e){return function(e){return!!e&&!!(0,l.isValidElement)(e)&&"ref"in e}(e)?e.ref:null}var Q_,$_="undefined"!=typeof window&&!!(null==(Q_=window.document)?void 0:Q_.createElement);function eb(e){return e?e.ownerDocument||e:document}function tb(e,t=!1){const{activeElement:n}=eb(e);if(!(null==n?void 0:n.nodeName))return null;if("IFRAME"===n.tagName&&n.contentDocument)return tb(n.contentDocument.body,t);if(t){const e=n.getAttribute("aria-activedescendant");if(e){const t=eb(n).getElementById(e);if(t)return t}}return n}function nb(e,t){return e===t||e.contains(t)}function rb(e){const t=e.tagName.toLowerCase();return"button"===t||!("input"!==t||!e.type)&&-1!==ab.indexOf(e.type)}var ab=["button","color","file","image","reset","submit"];function sb(e,t){return"matches"in e?e.matches(t):"msMatchesSelector"in e?e.msMatchesSelector(t):e.webkitMatchesSelector(t)}function ib(e){try{const t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName;return t||n||!1}catch(e){return!1}}function ob(e,t){const n=null==e?void 0:e.getAttribute("role");return n&&-1!==["dialog","menu","listbox","tree","grid"].indexOf(n)?n:t}function lb(e,t){var n;const r=ob(e);if(!r)return t;return null!=(n={menu:"menuitem",listbox:"option",tree:"treeitem",grid:"gridcell"}[r])?n:t}function cb(e){if(!e)return null;if(e.clientHeight&&e.scrollHeight>e.clientHeight){const{overflowY:t}=getComputedStyle(e);if("visible"!==t&&"hidden"!==t)return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){const{overflowX:t}=getComputedStyle(e);if("visible"!==t&&"hidden"!==t)return e}return cb(e.parentElement)||document.scrollingElement||document.body}function ub(e,...t){/text|search|password|tel|url/i.test(e.type)&&e.setSelectionRange(...t)}function db(){return $_&&!!navigator.maxTouchPoints}function mb(){return!!$_&&/mac|iphone|ipad|ipod/i.test(navigator.platform)}function pb(){return $_&&mb()&&/apple/i.test(navigator.vendor)}function hb(e){return Boolean(e.currentTarget&&!nb(e.currentTarget,e.target))}function fb(e){return e.target===e.currentTarget}function gb(e,t){const n=new FocusEvent("blur",t),r=e.dispatchEvent(n),a=H_(z_({},t),{bubbles:!0});return e.dispatchEvent(new FocusEvent("focusout",a)),r}function yb(e,t){const n=new MouseEvent("click",t);return e.dispatchEvent(n)}function vb(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!nb(n,r)}function _b(e,t,n){const r=requestAnimationFrame((()=>{e.removeEventListener(t,a,!0),n()})),a=()=>{cancelAnimationFrame(r),n()};return e.addEventListener(t,a,{once:!0,capture:!0}),r}function bb(e,t,n,r=window){const a=[];try{r.document.addEventListener(e,t,n);for(const s of Array.from(r.frames))a.push(bb(e,t,n,s))}catch(e){}return()=>{try{r.document.removeEventListener(e,t,n)}catch(e){}a.forEach((e=>e()))}}var Eb=M_({},c),wb=Eb.useId,Sb=(Eb.useDeferredValue,Eb.useInsertionEffect),xb=$_?l.useLayoutEffect:l.useEffect;function Cb(e){const t=(0,l.useRef)(e);return xb((()=>{t.current=e})),t}function kb(e){const t=(0,l.useRef)((()=>{throw new Error("Cannot call an event handler while rendering.")}));return Sb?Sb((()=>{t.current=e})):t.current=e,(0,l.useCallback)(((...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function Tb(...e){return(0,l.useMemo)((()=>{if(e.some(Boolean))return t=>{e.forEach((e=>function(e,t){"function"==typeof e?e(t):e&&(e.current=t)}(e,t)))}}),e)}function Pb(e){if(wb){const t=wb();return e||t}const[t,n]=(0,l.useState)(e);return xb((()=>{if(e||t)return;const r=Math.random().toString(36).substr(2,6);n(`id-${r}`)}),[e,t]),e||t}function Ib(e,t){const n=e=>{if("string"==typeof e)return e},[r,a]=(0,l.useState)((()=>n(t)));return xb((()=>{const r=e&&"current"in e?e.current:e;a((null==r?void 0:r.tagName.toLowerCase())||n(t))}),[e,t]),r}function Mb(e,t){const n=(0,l.useRef)(!1);(0,l.useEffect)((()=>{if(n.current)return e();n.current=!0}),t),(0,l.useEffect)((()=>()=>{n.current=!1}),[])}Symbol("setNextState");function Ab(e){return kb("function"==typeof e?e:()=>e)}function Ob(e,t,n=[]){const r=(0,l.useCallback)((n=>(e.wrapElement&&(n=e.wrapElement(n)),t(n))),[...n,e.wrapElement]);return A_(M_({},e),{wrapElement:r})}var Nb=!1,Fb=0,Rb=0;function Db(e){(function(e){const t=e.movementX||e.screenX-Fb,n=e.movementY||e.screenY-Rb;return Fb=e.screenX,Rb=e.screenY,t||n||!1})(e)&&(Nb=!0)}function Vb(){Nb=!1}function Lb(e,t){const n=e.__unstableInternals;return Y_(n,"Invalid store"),n[t]}function Bb(e,...t){let n=e,r=n,a=Symbol(),s=U_;const i=new Set,o=new Set,l=new Set,c=new Set,u=new Set,d=new WeakMap,m=new WeakMap,p=(e,t,n=c)=>(n.add(t),m.set(t,e),()=>{var e;null==(e=d.get(t))||e(),d.delete(t),m.delete(t),n.delete(t)}),h=(e,s,i=!1)=>{if(!W_(n,e))return;const l=function(e,t){if(function(e){return"function"==typeof e}(e))return e(function(e){return"function"==typeof e}(t)?t():t);return e}(s,n[e]);if(l===n[e])return;i||t.forEach((t=>{var n;null==(n=null==t?void 0:t.setState)||n.call(t,e,l)}));const p=n;n=H_(z_({},n),{[e]:l});const h=Symbol();a=h,o.add(e);const f=(t,r,a)=>{var s;const i=m.get(t);i&&!i.some((t=>a?a.has(t):t===e))||(null==(s=d.get(t))||s(),d.set(t,t(n,r)))};c.forEach((e=>{f(e,p)})),queueMicrotask((()=>{if(a!==h)return;const e=n;u.forEach((e=>{f(e,r,o)})),r=e,o.clear()}))},f={getState:()=>n,setState:h,__unstableInternals:{setup:e=>(l.add(e),()=>l.delete(e)),init:()=>{const e=i.size,r=Symbol();i.add(r);const a=()=>{i.delete(r),i.size||s()};if(e)return a;const o=(c=n,Object.keys(c)).map((e=>j_(...t.map((t=>{var n;const r=null==(n=null==t?void 0:t.getState)?void 0:n.call(t);if(r&&W_(r,e))return Ub(t,[e],(t=>{h(e,t[e],!0)}))})))));var c;const u=[];l.forEach((e=>u.push(e())));const d=t.map(Hb);return s=j_(...o,...u,...d),a},subscribe:(e,t)=>p(e,t),sync:(e,t)=>(d.set(t,t(n,n)),p(e,t)),batch:(e,t)=>(d.set(t,t(n,r)),p(e,t,u)),pick:e=>Bb(function(e,t){const n={};for(const r of t)W_(e,r)&&(n[r]=e[r]);return n}(n,e),f),omit:e=>Bb(function(e,t){const n=z_({},e);for(const e of t)W_(n,e)&&delete n[e];return n}(n,e),f)}};return f}function zb(e,...t){if(e)return Lb(e,"setup")(...t)}function Hb(e,...t){if(e)return Lb(e,"init")(...t)}function Gb(e,...t){if(e)return Lb(e,"subscribe")(...t)}function Ub(e,...t){if(e)return Lb(e,"sync")(...t)}function Wb(e,...t){if(e)return Lb(e,"batch")(...t)}function jb(e,...t){if(e)return Lb(e,"omit")(...t)}function Zb(...e){const t=e.reduce(((e,t)=>{var n;const r=null==(n=null==t?void 0:t.getState)?void 0:n.call(t);return r?z_(z_({},e),r):e}),{});return Bb(t,...e)}var qb=a(422),{useSyncExternalStore:Yb}=qb,Kb=()=>()=>{};function Xb(e,t=q_){const n=l.useCallback((t=>e?Gb(e,null,t):Kb()),[e]),r=()=>{const n="string"==typeof t?t:null,r="function"==typeof t?t:null,a=null==e?void 0:e.getState();return r?r(a):a&&n&&W_(a,n)?a[n]:void 0};return Yb(n,r,r)}function Jb(e,t,n,r){const a=W_(t,n)?t[n]:void 0,s=r?t[r]:void 0,i=Cb({value:a,setValue:s});xb((()=>Ub(e,[n],((e,t)=>{const{value:r,setValue:a}=i.current;a&&e[n]!==t[n]&&e[n]!==r&&a(e[n])}))),[e,n]),xb((()=>{if(void 0!==a)return e.setState(n,a),Wb(e,[n],(()=>{void 0!==a&&e.setState(n,a)}))}))}function Qb(e,t,n){return Mb(t,[n.store]),Jb(e,n,"items","setItems"),e}function $b(e,t,n){return Jb(e=Qb(e,t,n),n,"activeId","setActiveId"),Jb(e,n,"includesBaseElement"),Jb(e,n,"virtualFocus"),Jb(e,n,"orientation"),Jb(e,n,"rtl"),Jb(e,n,"focusLoop"),Jb(e,n,"focusWrap"),Jb(e,n,"focusShift"),e}function eE(e,t,n){return Mb(t,[n.store,n.disclosure]),Jb(e,n,"open","setOpen"),Jb(e,n,"mounted","setMounted"),Jb(e,n,"animated"),e}function tE(e,t,n){return eE(e,t,n)}function nE(e,t,n){return Mb(t,[n.popover]),Jb(e=tE(e,t,n),n,"placement"),e}function rE(e={}){return function(e={}){const t=Zb(e.store,jb(e.disclosure,["contentElement","disclosureElement"])),n=null==t?void 0:t.getState(),r=X_(e.open,null==n?void 0:n.open,e.defaultOpen,!1),a=X_(e.animated,null==n?void 0:n.animated,!1),s=Bb({open:r,animated:a,animating:!!a&&r,mounted:r,contentElement:X_(null==n?void 0:n.contentElement,null),disclosureElement:X_(null==n?void 0:n.disclosureElement,null)},t);return zb(s,(()=>Ub(s,["animated","animating"],(e=>{e.animated||s.setState("animating",!1)})))),zb(s,(()=>Gb(s,["open"],(()=>{s.getState().animated&&s.setState("animating",!0)})))),zb(s,(()=>Ub(s,["open","animating"],(e=>{s.setState("mounted",e.open||e.animating)})))),H_(z_({},s),{setOpen:e=>s.setState("open",e),show:()=>s.setState("open",!0),hide:()=>s.setState("open",!1),toggle:()=>s.setState("open",(e=>!e)),stopAnimation:()=>s.setState("animating",!1),setContentElement:e=>s.setState("contentElement",e),setDisclosureElement:e=>s.setState("disclosureElement",e)})}(e)}function aE(e){const t=e.map(((e,t)=>[t,e]));let n=!1;return t.sort((([e,t],[r,a])=>{const s=t.element,i=a.element;return s===i?0:s&&i?function(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}(s,i)?(e>r&&(n=!0),-1):(e<r&&(n=!0),1):0})),n?t.map((([e,t])=>t)):e}function sE(e={}){var t;e.store;const n=null==(t=e.store)?void 0:t.getState(),r=X_(e.items,null==n?void 0:n.items,e.defaultItems,[]),a=new Map(r.map((e=>[e.id,e]))),s={items:r,renderedItems:X_(null==n?void 0:n.renderedItems,[])},i=function(e){return null==e?void 0:e.__unstablePrivateStore}(e.store),o=Bb({items:r,renderedItems:s.renderedItems},i),l=Bb(s,e.store),c=e=>{const t=aE(e);o.setState("renderedItems",t),l.setState("renderedItems",t)};zb(l,(()=>Hb(o))),zb(o,(()=>Wb(o,["items"],(e=>{l.setState("items",e.items)})))),zb(o,(()=>Wb(o,["renderedItems"],(e=>{let t=!0,n=requestAnimationFrame((()=>{const{renderedItems:t}=l.getState();e.renderedItems!==t&&c(e.renderedItems)}));if("function"!=typeof IntersectionObserver)return()=>cancelAnimationFrame(n);const r=function(e){var t;const n=e.find((e=>!!e.element)),r=[...e].reverse().find((e=>!!e.element));let a=null==(t=null==n?void 0:n.element)?void 0:t.parentElement;for(;a&&(null==r?void 0:r.element);){if(r&&a.contains(r.element))return a;a=a.parentElement}return eb(a).body}(e.renderedItems),a=new IntersectionObserver((()=>{t?t=!1:(cancelAnimationFrame(n),n=requestAnimationFrame((()=>c(e.renderedItems))))}),{root:r});for(const t of e.renderedItems)t.element&&a.observe(t.element);return()=>{cancelAnimationFrame(n),a.disconnect()}}))));const u=(e,t,n=!1)=>{let r;t((t=>{const n=t.findIndex((({id:t})=>t===e.id)),s=t.slice();if(-1!==n){r=t[n];const i=z_(z_({},r),e);s[n]=i,a.set(e.id,i)}else s.push(e),a.set(e.id,e);return s}));return()=>{t((t=>{if(!r)return n&&a.delete(e.id),t.filter((({id:t})=>t!==e.id));const s=t.findIndex((({id:t})=>t===e.id));if(-1===s)return t;const i=t.slice();return i[s]=r,a.set(e.id,r),i}))}},d=e=>u(e,(e=>o.setState("items",e)),!0);return H_(z_({},l),{registerItem:d,renderItem:e=>j_(d(e),u(e,(e=>o.setState("renderedItems",e)))),item:e=>{if(!e)return null;let t=a.get(e);if(!t){const{items:n}=l.getState();t=n.find((t=>t.id===e)),t&&a.set(e,t)}return t||null},__unstablePrivateStore:o})}function iE(e){const t=[];for(const n of e)t.push(...n);return t}function oE(e){return e.slice().reverse()}var lE={id:null};function cE(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}function uE(e,t){return e.filter((e=>e.rowId===t))}function dE(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}function mE(e){let t=0;for(const{length:n}of e)n>t&&(t=n);return t}function pE(e,t,n){const r=mE(e);for(const a of e)for(let e=0;e<r;e+=1){const r=a[e];if(!r||n&&r.disabled){const r=0===e&&n?cE(a):a[e-1];a[e]=r&&t!==r.id&&n?r:{id:"__EMPTY_ITEM__",disabled:!0,rowId:null==r?void 0:r.rowId}}}return e}function hE(e){const t=dE(e),n=mE(t),r=[];for(let e=0;e<n;e+=1)for(const n of t){const t=n[e];t&&r.push(H_(z_({},t),{rowId:t.rowId?`${e}`:void 0}))}return r}function fE(e={}){var t;const n=null==(t=e.store)?void 0:t.getState(),r=sE(e),a=X_(e.activeId,null==n?void 0:n.activeId,e.defaultActiveId),s=Bb(H_(z_({},r.getState()),{activeId:a,baseElement:X_(null==n?void 0:n.baseElement,null),includesBaseElement:X_(e.includesBaseElement,null==n?void 0:n.includesBaseElement,null===a),moves:X_(null==n?void 0:n.moves,0),orientation:X_(e.orientation,null==n?void 0:n.orientation,"both"),rtl:X_(e.rtl,null==n?void 0:n.rtl,!1),virtualFocus:X_(e.virtualFocus,null==n?void 0:n.virtualFocus,!1),focusLoop:X_(e.focusLoop,null==n?void 0:n.focusLoop,!1),focusWrap:X_(e.focusWrap,null==n?void 0:n.focusWrap,!1),focusShift:X_(e.focusShift,null==n?void 0:n.focusShift,!1)}),r,e.store);zb(s,(()=>Ub(s,["renderedItems","activeId"],(e=>{s.setState("activeId",(t=>{var n;return void 0!==t?t:null==(n=cE(e.renderedItems))?void 0:n.id}))}))));const i=(e,t,n,r)=>{var a,i;const{activeId:o,rtl:l,focusLoop:c,focusWrap:u,includesBaseElement:d}=s.getState(),m=l&&"vertical"!==t?oE(e):e;if(null==o)return null==(a=cE(m))?void 0:a.id;const p=m.find((e=>e.id===o));if(!p)return null==(i=cE(m))?void 0:i.id;const h=!!p.rowId,f=m.indexOf(p),g=m.slice(f+1),y=uE(g,p.rowId);if(void 0!==r){const e=function(e,t){return e.filter((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(y,o),t=e.slice(r)[0]||e[e.length-1];return null==t?void 0:t.id}const v=function(e){return"vertical"===e?"horizontal":"horizontal"===e?"vertical":void 0}(h?t||"horizontal":t),_=c&&c!==v,b=h&&u&&u!==v;if(n=n||!h&&_&&d,_){const e=function(e,t,n=!1){const r=e.findIndex((e=>e.id===t));return[...e.slice(r+1),...n?[lE]:[],...e.slice(0,r)]}(b&&!n?m:uE(m,p.rowId),o,n),t=cE(e,o);return null==t?void 0:t.id}if(b){const e=cE(n?y:g,o);return n?(null==e?void 0:e.id)||null:null==e?void 0:e.id}const E=cE(y,o);return!E&&n?null:null==E?void 0:E.id};return H_(z_(z_({},r),s),{setBaseElement:e=>s.setState("baseElement",e),setActiveId:e=>s.setState("activeId",e),move:e=>{void 0!==e&&(s.setState("activeId",e),s.setState("moves",(e=>e+1)))},first:()=>{var e;return null==(e=cE(s.getState().renderedItems))?void 0:e.id},last:()=>{var e;return null==(e=cE(oE(s.getState().renderedItems)))?void 0:e.id},next:e=>{const{renderedItems:t,orientation:n}=s.getState();return i(t,n,!1,e)},previous:e=>{var t;const{renderedItems:n,orientation:r,includesBaseElement:a}=s.getState(),o=!!!(null==(t=cE(n))?void 0:t.rowId)&&a;return i(oE(n),r,o,e)},down:e=>{const{activeId:t,renderedItems:n,focusShift:r,focusLoop:a,includesBaseElement:o}=s.getState(),l=r&&!e,c=hE(iE(pE(dE(n),t,l)));return i(c,"vertical",a&&"horizontal"!==a&&o,e)},up:e=>{const{activeId:t,renderedItems:n,focusShift:r,includesBaseElement:a}=s.getState(),o=r&&!e,l=hE(oE(iE(pE(dE(n),t,o))));return i(l,"vertical",a,e)}})}var gE=pb()&&db();function yE(e={}){var t;e.store;const n=null==(t=e.store)?void 0:t.getState(),r=X_(e.activeId,null==n?void 0:n.activeId,e.defaultActiveId,null),a=fE(H_(z_({},e),{activeId:r,includesBaseElement:X_(e.includesBaseElement,null==n?void 0:n.includesBaseElement,!0),orientation:X_(e.orientation,null==n?void 0:n.orientation,"vertical"),focusLoop:X_(e.focusLoop,null==n?void 0:n.focusLoop,!0),focusWrap:X_(e.focusWrap,null==n?void 0:n.focusWrap,!0),virtualFocus:X_(e.virtualFocus,null==n?void 0:n.virtualFocus,!gE)})),s=function(e={}){var t=e,{popover:n}=t,r=G_(t,["popover"]);const a=Zb(r.store,jb(n,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"])),s=null==a?void 0:a.getState(),i=rE(H_(z_({},r),{store:a})),o=X_(r.placement,null==s?void 0:s.placement,"bottom"),l=Bb(H_(z_({},i.getState()),{placement:o,currentPlacement:o,anchorElement:X_(null==s?void 0:s.anchorElement,null),popoverElement:X_(null==s?void 0:s.popoverElement,null),arrowElement:X_(null==s?void 0:s.arrowElement,null),rendered:Symbol("rendered")}),i,a);return H_(z_(z_({},i),l),{setAnchorElement:e=>l.setState("anchorElement",e),setPopoverElement:e=>l.setState("popoverElement",e),setArrowElement:e=>l.setState("arrowElement",e),render:()=>l.setState("rendered",Symbol("rendered"))})}(H_(z_({},e),{placement:X_(e.placement,null==n?void 0:n.placement,"bottom-start")})),i=X_(e.value,null==n?void 0:n.value,e.defaultValue,""),o=X_(e.selectedValue,null==n?void 0:n.selectedValue,e.defaultSelectedValue,""),l=Array.isArray(o),c=Bb(H_(z_(z_({},a.getState()),s.getState()),{value:i,selectedValue:o,resetValueOnSelect:X_(e.resetValueOnSelect,null==n?void 0:n.resetValueOnSelect,l),resetValueOnHide:X_(e.resetValueOnHide,null==n?void 0:n.resetValueOnHide,l),activeValue:null==n?void 0:n.activeValue}),a,s,e.store);return zb(c,(()=>Ub(c,["resetValueOnHide","mounted"],(e=>{e.resetValueOnHide&&(e.mounted||c.setState("value",i))})))),zb(c,(()=>Ub(c,["resetValueOnSelect","selectedValue"],(e=>{e.resetValueOnSelect&&c.setState("value",i)})))),zb(c,(()=>Wb(c,["mounted"],(e=>{e.mounted||(c.setState("activeId",r),c.setState("moves",0))})))),zb(c,(()=>Ub(c,["moves","activeId"],((e,t)=>{e.moves===t.moves&&c.setState("activeValue",void 0)})))),zb(c,(()=>Wb(c,["moves","renderedItems"],((e,t)=>{if(e.moves===t.moves)return;const{activeId:n}=c.getState(),r=a.item(n);c.setState("activeValue",null==r?void 0:r.value)})))),H_(z_(z_(z_({},s),a),c),{setValue:e=>c.setState("value",e),setSelectedValue:e=>c.setState("selectedValue",e)})}function vE(e={}){const[t,n]=function(e,t){const[n,r]=l.useState((()=>e(t)));xb((()=>Hb(n)),[n]);const a=l.useCallback((e=>Xb(n,e)),[n]);return[l.useMemo((()=>A_(M_({},n),{useState:a})),[n,a]),kb((()=>{r((n=>e(M_(M_({},t),n.getState()))))}))]}(yE,e);return function(e,t,n){return Jb(e=$b(e=nE(e,t,n),t,n),n,"value","setValue"),Jb(e,n,"selectedValue","setSelectedValue"),Jb(e,n,"resetValueOnHide"),Jb(e,n,"resetValueOnSelect"),e}(t,n,e)}var _E=a(4922);function bE(e){return l.forwardRef(((t,n)=>e(M_({ref:n},t))))}function EE(e){const t=bE(e);return l.memo(t)}function wE(e,t){const n=t,{as:r,wrapElement:a,render:s}=n,i=O_(n,["as","wrapElement","render"]);let o;const c=Tb(t.ref,J_(s));if(r&&"string"!=typeof r)o=(0,_E.jsx)(r,A_(M_({},i),{render:s}));else if(l.isValidElement(s)){const e=A_(M_({},s.props),{ref:c});o=l.cloneElement(s,function(e,t){const n=M_({},e);for(const r in t){if(!W_(t,r))continue;if("className"===r){const r="className";n[r]=e[r]?`${e[r]} ${t[r]}`:t[r];continue}if("style"===r){const r="style";n[r]=e[r]?M_(M_({},e[r]),t[r]):t[r];continue}const a=t[r];if("function"==typeof a&&r.startsWith("on")){const t=e[r];if("function"==typeof t){n[r]=(...e)=>{a(...e),t(...e)};continue}}n[r]=a}return n}(i,e))}else if(s)o=s(i);else if("function"==typeof t.children){0;const e=i,{children:n}=e,r=O_(e,["children"]);o=t.children(r)}else o=r?(0,_E.jsx)(r,M_({},i)):(0,_E.jsx)(e,M_({},i));return a?a(o):o}function SE(e){return(t={})=>{const n=e(t),r={};for(const e in n)W_(n,e)&&void 0!==n[e]&&(r[e]=n[e]);return r}}function xE(e=[],t=[]){const n=l.createContext(void 0),r=l.createContext(void 0),a=()=>l.useContext(n),s=t=>e.reduceRight(((e,n)=>(0,_E.jsx)(n,A_(M_({},t),{children:e}))),(0,_E.jsx)(n.Provider,M_({},t)));return{context:n,scopedContext:r,useContext:a,useScopedContext:(e=!1)=>{const t=l.useContext(r),n=a();return e?t:t||n},useProviderContext:()=>{const e=l.useContext(r),t=a();if(!e||e!==t)return t},ContextProvider:s,ScopedContextProvider:e=>(0,_E.jsx)(s,A_(M_({},e),{children:t.reduceRight(((t,n)=>(0,_E.jsx)(n,A_(M_({},e),{children:t}))),(0,_E.jsx)(r.Provider,M_({},e)))}))}}var CE=xE(),kE=CE.useContext,TE=(CE.useScopedContext,CE.useProviderContext,xE([CE.ContextProvider],[CE.ScopedContextProvider])),PE=TE.useContext,IE=(TE.useScopedContext,TE.useProviderContext),ME=TE.ContextProvider,AE=TE.ScopedContextProvider,OE=(0,l.createContext)(void 0),NE=(0,l.createContext)(void 0),FE=xE(),RE=(FE.useContext,FE.useScopedContext,FE.useProviderContext),DE=xE([FE.ContextProvider],[FE.ScopedContextProvider]),VE=(DE.useContext,DE.useScopedContext,DE.useProviderContext,DE.ContextProvider),LE=DE.ScopedContextProvider,BE=((0,l.createContext)(void 0),(0,l.createContext)(void 0),xE([VE],[LE])),zE=(BE.useContext,BE.useScopedContext,BE.useProviderContext),HE=BE.ContextProvider,GE=BE.ScopedContextProvider,UE=xE([HE,ME],[GE,AE]),WE=(UE.useContext,UE.useScopedContext),jE=UE.useProviderContext,ZE=UE.ContextProvider,qE=UE.ScopedContextProvider,YE=(0,l.createContext)(void 0),KE=(0,l.createContext)(!1);function XE(e={}){const t=vE(e);return(0,_E.jsx)(ZE,{value:t,children:e.children})}var JE=SE((e=>{var t=e,{store:n}=t,r=O_(t,["store"]);const a=jE();Y_(n=n||a,!1);const s=n.useState((e=>{var t;return null==(t=e.baseElement)?void 0:t.id}));return r=M_({htmlFor:s},r)})),QE=EE((e=>wE("label",JE(e))));var $E=SE((e=>{var t=e,{store:n}=t,r=O_(t,["store"]);const a=zE();return n=n||a,r=A_(M_({},r),{ref:Tb(null==n?void 0:n.setAnchorElement,r.ref)})}));bE((e=>wE("div",$E(e))));function ew(e,t){return t&&e.item(t)||null}var tw=Symbol("FOCUS_SILENTLY");function nw(e,t,n){if(!t)return!1;if(t===n)return!1;const r=e.item(t.id);return!!r&&(!n||r.element!==n)}var rw=(0,l.createContext)(!0),aw="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function sw(e){return!!sb(e,aw)&&(!!function(e){const t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}(e)&&!function(e,t){if("closest"in e)return e.closest(t);do{if(sb(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}(e,"[inert]"))}function iw(e){const t=tb(e);if(!t)return!1;if(t===e)return!0;const n=t.getAttribute("aria-activedescendant");return!!n&&n===e.id}function ow(e){const t=tb(e);if(!t)return!1;if(nb(e,t))return!0;const n=t.getAttribute("aria-activedescendant");return!!n&&("id"in e&&(n===e.id||!!e.querySelector(`#${CSS.escape(n)}`)))}var lw=pb(),cw=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"];function uw(e){return!("input"!==e.tagName.toLowerCase()||!e.type)&&("radio"===e.type||"checkbox"===e.type)}function dw(e,t,n,r,a){return e?t?n&&!r?-1:void 0:n?a:a||0:a}function mw(e,t){return kb((n=>{null==e||e(n),n.defaultPrevented||t&&(n.stopPropagation(),n.preventDefault())}))}var pw=!0;function hw(e){const t=e.target;t&&"hasAttribute"in t&&(t.hasAttribute("data-focus-visible")||(pw=!1))}function fw(e){e.metaKey||e.ctrlKey||e.altKey||(pw=!0)}var gw=SE((e=>{var t=e,{focusable:n=!0,accessibleWhenDisabled:r,autoFocus:a,onFocusVisible:s}=t,i=O_(t,["focusable","accessibleWhenDisabled","autoFocus","onFocusVisible"]);const o=(0,l.useRef)(null);(0,l.useEffect)((()=>{n&&(bb("mousedown",hw,!0),bb("keydown",fw,!0))}),[n]),lw&&(0,l.useEffect)((()=>{if(!n)return;const e=o.current;if(!e)return;if(!uw(e))return;const t=function(e){return"labels"in e?e.labels:null}(e);if(!t)return;const r=()=>queueMicrotask((()=>e.focus()));return t.forEach((e=>e.addEventListener("mouseup",r))),()=>{t.forEach((e=>e.removeEventListener("mouseup",r)))}}),[n]);const c=n&&K_(i),u=!!c&&!r,[d,m]=(0,l.useState)(!1);(0,l.useEffect)((()=>{n&&u&&d&&m(!1)}),[n,u,d]),(0,l.useEffect)((()=>{if(!n)return;if(!d)return;const e=o.current;if(!e)return;if("undefined"==typeof IntersectionObserver)return;const t=new IntersectionObserver((()=>{sw(e)||m(!1)}));return t.observe(e),()=>t.disconnect()}),[n,d]);const p=mw(i.onKeyPressCapture,c),h=mw(i.onMouseDownCapture,c),f=mw(i.onClickCapture,c),g=i.onMouseDown,y=kb((e=>{if(null==g||g(e),e.defaultPrevented)return;if(!n)return;const t=e.currentTarget;if(!lw)return;if(hb(e))return;if(!rb(t)&&!uw(t))return;let r=!1;const a=()=>{r=!0};t.addEventListener("focusin",a,{capture:!0,once:!0}),_b(t,"mouseup",(()=>{t.removeEventListener("focusin",a,!0),r||function(e){!ow(e)&&sw(e)&&e.focus()}(t)}))})),v=(e,t)=>{if(t&&(e.currentTarget=t),!n)return;const r=e.currentTarget;r&&iw(r)&&(null==s||s(e),e.defaultPrevented||m(!0))},_=i.onKeyDownCapture,b=kb((e=>{if(null==_||_(e),e.defaultPrevented)return;if(!n)return;if(d)return;if(e.metaKey)return;if(e.altKey)return;if(e.ctrlKey)return;if(!fb(e))return;const t=e.currentTarget;queueMicrotask((()=>v(e,t)))})),E=i.onFocusCapture,w=kb((e=>{if(null==E||E(e),e.defaultPrevented)return;if(!n)return;if(!fb(e))return void m(!1);const t=e.currentTarget,r=()=>v(e,t);pw||function(e){const{tagName:t,readOnly:n,type:r}=e;return"TEXTAREA"===t&&!n||"SELECT"===t&&!n||("INPUT"!==t||n?!!e.isContentEditable:cw.includes(r))}(e.target)?queueMicrotask(r):!function(e){return"combobox"===e.getAttribute("role")&&!!e.dataset.name}(e.target)?m(!1):_b(e.target,"focusout",r)})),S=i.onBlur,x=kb((e=>{null==S||S(e),n&&vb(e)&&m(!1)})),C=(0,l.useContext)(rw),k=kb((e=>{n&&a&&e&&C&&queueMicrotask((()=>{iw(e)||sw(e)&&e.focus()}))})),T=Ib(o,i.as),P=n&&function(e){return!e||"button"===e||"input"===e||"select"===e||"textarea"===e||"a"===e}(T),I=n&&function(e){return!e||"button"===e||"input"===e||"select"===e||"textarea"===e}(T),M=u?M_({pointerEvents:"none"},i.style):i.style;return i=A_(M_({"data-focus-visible":n&&d?"":void 0,"data-autofocus":!!a||void 0,"aria-disabled":!!c||void 0},i),{ref:Tb(o,k,i.ref),style:M,tabIndex:dw(n,u,P,I,i.tabIndex),disabled:!(!I||!u)||void 0,contentEditable:c?void 0:i.contentEditable,onKeyPressCapture:p,onClickCapture:f,onMouseDownCapture:h,onMouseDown:y,onKeyDownCapture:b,onFocusCapture:w,onBlur:x})}));bE((e=>wE("div",e=gw(e))));function yw(e,t,n){return kb((r=>{var a;if(null==t||t(r),r.defaultPrevented)return;if(r.isPropagationStopped())return;if(!fb(r))return;if(function(e){return"Shift"===e.key||"Control"===e.key||"Alt"===e.key||"Meta"===e.key}(r))return;if(function(e){const t=e.target;return!(t&&!ib(t)||1!==e.key.length||e.ctrlKey||e.metaKey)}(r))return;const s=e.getState(),i=null==(a=ew(e,s.activeId))?void 0:a.element;if(!i)return;const o=r,{view:l}=o,c=O_(o,["view"]);i!==(null==n?void 0:n.current)&&i.focus(),function(e,t,n){const r=new KeyboardEvent(t,n);return e.dispatchEvent(r)}(i,r.type,c)||r.preventDefault(),r.currentTarget.contains(i)&&r.stopPropagation()}))}var vw=SE((e=>{var t=e,{store:n,composite:r=!0,focusOnMove:a=r,moveOnKeyPress:s=!0}=t,i=O_(t,["store","composite","focusOnMove","moveOnKeyPress"]);const o=IE();Y_(n=n||o,!1);const c=(0,l.useRef)(null),u=function(e){const[t,n]=(0,l.useState)(!1),r=(0,l.useCallback)((()=>n(!0)),[]),a=e.useState((t=>ew(e,t.activeId)));return(0,l.useEffect)((()=>{const e=null==a?void 0:a.element;t&&e&&(n(!1),e.focus({preventScroll:!0}))}),[a,t]),r}(n),d=n.useState("moves");(0,l.useEffect)((()=>{var e;if(!n)return;if(!d)return;if(!r)return;if(!a)return;const{activeId:t}=n.getState(),s=null==(e=ew(n,t))?void 0:e.element;var i,o;s&&("scrollIntoView"in(i=s)?(i.focus({preventScroll:!0}),i.scrollIntoView(z_({block:"nearest",inline:"nearest"},o))):i.focus())}),[n,d,r,a]),xb((()=>{if(!n)return;if(!d)return;if(!r)return;const{baseElement:e,activeId:t}=n.getState();if(!(null===t))return;if(!e)return;const a=c.current;c.current=null,a&&gb(a,{relatedTarget:e}),iw(e)||e.focus()}),[n,d,r]);const m=n.useState("activeId"),p=n.useState("virtualFocus");xb((()=>{var e;if(!n)return;if(!r)return;if(!p)return;const t=c.current;if(c.current=null,!t)return;const a=(null==(e=ew(n,m))?void 0:e.element)||tb(t);a!==t&&gb(t,{relatedTarget:a})}),[n,m,p,r]);const h=yw(n,i.onKeyDownCapture,c),f=yw(n,i.onKeyUpCapture,c),g=i.onFocusCapture,y=kb((e=>{if(null==g||g(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:t}=n.getState();if(!t)return;const r=e.relatedTarget,a=function(e){const t=e[tw];return delete e[tw],t}(e.currentTarget);fb(e)&&a&&(e.stopPropagation(),c.current=r)})),v=i.onFocus,_=kb((e=>{if(null==v||v(e),e.defaultPrevented)return;if(!r)return;if(!n)return;const{relatedTarget:t}=e,{virtualFocus:a}=n.getState();a?fb(e)&&!nw(n,t)&&queueMicrotask(u):fb(e)&&n.setActiveId(null)})),b=i.onBlurCapture,E=kb((e=>{var t;if(null==b||b(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:r,activeId:a}=n.getState();if(!r)return;const s=null==(t=ew(n,a))?void 0:t.element,i=e.relatedTarget,o=nw(n,i),l=c.current;if(c.current=null,fb(e)&&o)i===s?l&&l!==i&&gb(l,e):s?gb(s,e):l&&gb(l,e),e.stopPropagation();else{!nw(n,e.target)&&s&&gb(s,e)}})),w=i.onKeyDown,S=Ab(s),x=kb((e=>{var t;if(null==w||w(e),e.defaultPrevented)return;if(!n)return;if(!fb(e))return;const{orientation:r,items:a,renderedItems:s,activeId:i}=n.getState(),o=ew(n,i);if(null==(t=null==o?void 0:o.element)?void 0:t.isConnected)return;const l="horizontal"!==r,c="vertical"!==r,u=function(e){return e.some((e=>!!e.rowId))}(s);if(("ArrowLeft"===e.key||"ArrowRight"===e.key||"Home"===e.key||"End"===e.key)&&ib(e.currentTarget))return;const d={ArrowUp:(u||l)&&(()=>{if(u){const e=a&&function(e){return function(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(iE(oE(function(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}(e))))}(a);return null==e?void 0:e.id}return null==n?void 0:n.last()}),ArrowRight:(u||c)&&n.first,ArrowDown:(u||l)&&n.first,ArrowLeft:(u||c)&&n.last,Home:n.first,End:n.last,PageUp:n.first,PageDown:n.last},m=d[e.key];if(m){const t=m();if(void 0!==t){if(!S(e))return;e.preventDefault(),n.move(t)}}}));i=Ob(i,(e=>(0,_E.jsx)(ME,{value:n,children:e})),[n]);const C=n.useState((e=>{var t;if(n&&r&&e.virtualFocus)return null==(t=ew(n,e.activeId))?void 0:t.id}));i=A_(M_({"aria-activedescendant":C},i),{ref:Tb(r?n.setBaseElement:null,i.ref),onKeyDownCapture:h,onKeyUpCapture:f,onFocusCapture:y,onFocus:_,onBlurCapture:E,onKeyDown:x});const k=n.useState((e=>r&&(e.virtualFocus||null===e.activeId)));return i=gw(M_({focusable:k},i))}));bE((e=>wE("div",vw(e))));const _w=window.ReactDOM;function bw(e,t,n){if(!n)return!1;const r=e.find((e=>!e.disabled&&e.value));return(null==r?void 0:r.value)===t}function Ew(e,t){return!!t&&(null!=e&&(e=Z_(e),t.length>e.length&&0===t.toLowerCase().indexOf(e.toLowerCase())))}var ww=SE((e=>{var t=e,{store:n,focusable:r=!0,autoSelect:a=!1,getAutoSelectId:s,showOnChange:i=!0,setValueOnChange:o=!0,showOnMouseDown:c=!0,setValueOnClick:u=!0,showOnKeyDown:d=!0,moveOnKeyPress:m=!0,autoComplete:p="list"}=t,h=O_(t,["store","focusable","autoSelect","getAutoSelectId","showOnChange","setValueOnChange","showOnMouseDown","setValueOnClick","showOnKeyDown","moveOnKeyPress","autoComplete"]);const f=jE();Y_(n=n||f,!1);const g=(0,l.useRef)(null),[y,v]=(0,l.useReducer)((()=>[]),[]),_=(0,l.useRef)(!1),b=(0,l.useRef)(!1),E=n.useState((e=>!!a&&e.virtualFocus)),w="inline"===p||"both"===p,[S,x]=(0,l.useState)(w);!function(e,t){const n=(0,l.useRef)(!1);xb((()=>{if(n.current)return e();n.current=!0}),t),xb((()=>()=>{n.current=!1}),[])}((()=>{w&&x(!0)}),[w]);const C=n.useState("value"),k=n.useState((e=>w&&S?e.activeValue:void 0)),T=n.useState("renderedItems"),P=n.useState("open"),I=n.useState("contentElement"),M=(0,l.useMemo)((()=>{if(!w)return C;if(!S)return C;if(bw(T,k,E)){if(Ew(C,k)){const e=(null==k?void 0:k.slice(C.length))||"";return C+e}return C}return k||C}),[w,S,T,k,E,C]);(0,l.useEffect)((()=>{const e=g.current;if(!e)return;const t=()=>x(!0);return e.addEventListener("combobox-item-move",t),()=>{e.removeEventListener("combobox-item-move",t)}}),[]),(0,l.useEffect)((()=>{if(!w)return;if(!S)return;if(!k)return;bw(T,k,E)&&Ew(C,k)&&queueMicrotask((()=>{const e=g.current;e&&ub(e,C.length,k.length)}))}),[y,w,S,k,T,E,C]);const A=(0,l.useRef)(null),O=kb(s),N=(0,l.useRef)(null);(0,l.useEffect)((()=>{if(!P)return;if(!I)return;const e=cb(I);if(!e)return;A.current=e;const t=()=>{_.current=!1},r=()=>{if(!n)return;if(!_.current)return;const{activeId:e}=n.getState();null!==e&&e!==N.current&&(_.current=!1)},a={passive:!0,capture:!0};return e.addEventListener("wheel",t,a),e.addEventListener("scroll",r,a),()=>{e.removeEventListener("wheel",t,!0),e.removeEventListener("scroll",r,!0)}}),[P,I,n]),xb((()=>{C&&(b.current||(_.current=!0))}),[C]),xb((()=>{P||(_.current=!1)}),[P]);const F=n.useState("resetValueOnSelect");Mb((()=>{var e;const t=_.current;if(!n)return;if(!(E&&t||F))return;const{baseElement:r,contentElement:a,activeId:s}=n.getState();if(!r||iw(r)){if(null==a?void 0:a.hasAttribute("data-placing")){const e=new MutationObserver(v);return e.observe(a,{attributeFilter:["data-placing"]}),()=>e.disconnect()}if(E&&t){const e=O(T),t=void 0!==e?e:n.first();N.current=t,n.move(null!=t?t:null)}else{const t=null==(e=n.item(s))?void 0:e.element;t&&"scrollIntoView"in t&&t.scrollIntoView({block:"nearest",inline:"nearest"})}}}),[n,y,C,E,F,O,T]),(0,l.useEffect)((()=>{if(!w)return;const e=g.current;if(!e)return;const t=[e,I].filter((e=>!!e)),r=e=>{t.every((t=>vb(e,t)))&&(null==n||n.setValue(M))};return t.forEach((e=>e.addEventListener("focusout",r))),()=>{t.forEach((e=>e.removeEventListener("focusout",r)))}}),[w,I,n,M]);const R=h.onChange,D=Ab(i),V=Ab(o),L=kb((e=>{if(null==R||R(e),e.defaultPrevented)return;if(!n)return;const{value:t,selectionStart:r,selectionEnd:a}=e.target,s=e.nativeEvent;if(_.current=!0,function(e){return"input"===e.type}(s)&&(s.isComposing&&(_.current=!1,b.current=!0),w)){const e="insertText"===s.inputType||"insertCompositionText"===s.inputType,n=r===t.length;x(e&&n)}if(V(e)){const s=t===n.getState().value;(0,_w.flushSync)((()=>null==n?void 0:n.setValue(t))),ub(e.currentTarget,r,a),w&&E&&s&&v()}D(e)&&n.show(),E&&_.current||n.setActiveId(null)})),B=h.onCompositionEnd,z=kb((e=>{_.current=!0,b.current=!1,null==B||B(e),e.defaultPrevented||E&&v()})),H=h.onMouseDown,G=Ab(u),U=Ab(c),W=kb((e=>{null==H||H(e),e.defaultPrevented||e.button||e.ctrlKey||n&&(n.setActiveId(null),G(e)&&n.setValue(M),U(e)&&_b(e.currentTarget,"mouseup",n.show))})),j=h.onKeyDown,Z=Ab(d),q=kb((e=>{if(null==j||j(e),e.repeat||(_.current=!1),e.defaultPrevented)return;if(e.ctrlKey)return;if(e.altKey)return;if(e.shiftKey)return;if(e.metaKey)return;if(!n)return;const{open:t,activeId:r}=n.getState();t||null===r&&("ArrowUp"!==e.key&&"ArrowDown"!==e.key||Z(e)&&(e.preventDefault(),n.show()))})),Y=h.onBlur,K=kb((e=>{_.current=!1,null==Y||Y(e),e.defaultPrevented})),X=Pb(h.id),J=function(e){return"inline"===e||"list"===e||"both"===e||"none"===e}(p)?p:void 0,Q=n.useState((e=>null===e.activeId));return h=A_(M_({id:X,role:"combobox","aria-autocomplete":J,"aria-haspopup":ob(I,"listbox"),"aria-expanded":P,"aria-controls":null==I?void 0:I.id,"data-active-item":Q||void 0,value:M},h),{ref:Tb(g,h.ref),onChange:L,onCompositionEnd:z,onMouseDown:W,onKeyDown:q,onBlur:K}),h=vw(A_(M_({store:n,focusable:r},h),{moveOnKeyPress:e=>!function(e,...t){const n="function"==typeof e?e(...t):e;return null!=n&&!n}(m,e)&&(w&&x(!0),!0)})),h=$E(M_({store:n},h)),M_({autoComplete:"off"},h)})),Sw=bE((e=>wE("input",ww(e))));function xw(e,t){const n=setTimeout(t,e);return()=>clearTimeout(n)}function Cw(...e){return e.join(", ").split(", ").reduce(((e,t)=>{const n=1e3*parseFloat(t||"0s");return n>e?n:e}),0)}function kw(e,t,n){return!(n||!1===t||e&&!t)}var Tw=SE((e=>{var t=e,{store:n,alwaysVisible:r}=t,a=O_(t,["store","alwaysVisible"]);const s=RE();Y_(n=n||s,!1);const i=Pb(a.id),[o,c]=(0,l.useState)(null),u=n.useState("open"),d=n.useState("mounted"),m=n.useState("animated"),p=n.useState("contentElement");xb((()=>{if(m){if(null==p?void 0:p.isConnected)return function(e){let t=requestAnimationFrame((()=>{t=requestAnimationFrame(e)}));return()=>cancelAnimationFrame(t)}((()=>{c(u?"enter":"leave")}));c(null)}}),[m,p,u]),xb((()=>{if(!n)return;if(!m)return;if(!p)return;if(!o)return;if("enter"===o&&!u)return;if("leave"===o&&u)return;if("number"==typeof m){return xw(m,n.stopAnimation)}const{transitionDuration:e,animationDuration:t,transitionDelay:r,animationDelay:a}=getComputedStyle(p),s=Cw(r,a)+Cw(e,t);return s?xw(s,n.stopAnimation):void 0}),[n,m,p,u,o]);const h=kw(d,(a=Ob(a,(e=>(0,_E.jsx)(LE,{value:n,children:e})),[n])).hidden,r),f=h?A_(M_({},a.style),{display:"none"}):a.style;return a=A_(M_({id:i,"data-enter":"enter"===o?"":void 0,"data-leave":"leave"===o?"":void 0,hidden:h},a),{ref:Tb(i?n.setContentElement:null,a.ref),style:f})})),Pw=bE((e=>wE("div",Tw(e))));bE((e=>{var t=e,{unmountOnHide:n}=t,r=O_(t,["unmountOnHide"]);const a=RE();return!1===Xb(r.store||a,(e=>!n||(null==e?void 0:e.mounted)))?null:(0,_E.jsx)(Pw,M_({},r))}));var Iw=SE((e=>{var t=e,{store:n,focusable:r=!0,alwaysVisible:a}=t,s=O_(t,["store","focusable","alwaysVisible"]);const i=jE();Y_(n=n||i,!1);const o=(0,l.useRef)(null),c=Pb(s.id),u=s.onKeyDown,d=kb((e=>{null==u||u(e),e.defaultPrevented||"Escape"===e.key&&(null==n||n.move(null))})),m=(0,l.useRef)(!1),p=s.onFocusVisible,h=kb((e=>{if(null==p||p(e),e.defaultPrevented)return;if("focus"!==e.type)return;if(!n)return;const{virtualFocus:t}=n.getState();if(!t)return;const{relatedTarget:r,currentTarget:a}=e;r&&a.contains(r)||(m.current=!0,n.setState("virtualFocus",!1))})),f=s.onBlur,g=kb((e=>{null==f||f(e),e.defaultPrevented||m.current&&vb(e)&&(m.current=!1,null==n||n.setState("virtualFocus",!0))}));s=Ob(s,(e=>(0,_E.jsx)(qE,{value:n,children:e})),[n]);const y=kw(n.useState("mounted"),s.hidden,a),v=y?A_(M_({},s.style),{display:"none"}):s.style,_=n.useState((e=>Array.isArray(e.selectedValue))),b=function(e,t,n){const[r,a]=(0,l.useState)(n);return xb((()=>{const n=e&&"current"in e?e.current:e,r=null==n?void 0:n.getAttribute(t);null!=r&&a(r)}),[e,t]),r}(o,"role",s.role);return s=A_(M_({id:c,hidden:y,role:"listbox",tabIndex:r?-1:void 0,"aria-multiselectable":("listbox"===b||"tree"===b||"grid"===b)&&_||void 0},s),{ref:Tb(c?n.setContentElement:null,o,s.ref),style:v,onKeyDown:d,onFocusVisible:h,onBlur:g}),s=gw(M_({focusable:r},s))})),Mw=bE((e=>wE("div",Iw(e))));function Aw(e){const t=e.relatedTarget;return(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null}var Ow=Symbol("composite-hover");var Nw=SE((e=>{var t=e,{store:n,focusOnHover:r=!0,blurOnHoverEnd:a=!!r}=t,s=O_(t,["store","focusOnHover","blurOnHoverEnd"]);const i=PE();Y_(n=n||i,!1);const o=((0,l.useEffect)((()=>{bb("mousemove",Db,!0),bb("mousedown",Vb,!0),bb("mouseup",Vb,!0),bb("keydown",Vb,!0),bb("scroll",Vb,!0)}),[]),kb((()=>Nb))),c=s.onMouseMove,u=Ab(r),d=kb((e=>{if(null==c||c(e),!e.defaultPrevented&&o()&&u(e)){if(!ow(e.currentTarget)){const e=null==n?void 0:n.getState().baseElement;e&&!iw(e)&&e.focus()}null==n||n.setActiveId(e.currentTarget.id)}})),m=s.onMouseLeave,p=Ab(a),h=kb((e=>{var t;null==m||m(e),e.defaultPrevented||o()&&(function(e){const t=Aw(e);return!!t&&nb(e.currentTarget,t)}(e)||function(e){let t=Aw(e);if(!t)return!1;do{if(W_(t,Ow)&&t[Ow])return!0;t=t.parentElement}while(t);return!1}(e)||u(e)&&p(e)&&(null==n||n.setActiveId(null),null==(t=null==n?void 0:n.getState().baseElement)||t.focus()))})),f=(0,l.useCallback)((e=>{e&&(e[Ow]=!0)}),[]);return s=A_(M_({},s),{ref:Tb(f,s.ref),onMouseMove:d,onMouseLeave:h})}));EE((e=>wE("div",Nw(e))));function Fw(e){if(!e.isTrusted)return!1;const t=e.currentTarget;return"Enter"===e.key?rb(t)||"SUMMARY"===t.tagName||"A"===t.tagName:" "===e.key&&(rb(t)||"SUMMARY"===t.tagName||"INPUT"===t.tagName||"SELECT"===t.tagName)}var Rw=Symbol("command"),Dw=SE((e=>{var t=e,{clickOnEnter:n=!0,clickOnSpace:r=!0}=t,a=O_(t,["clickOnEnter","clickOnSpace"]);const s=(0,l.useRef)(null),i=Ib(s,a.as),o=a.type,[c,u]=(0,l.useState)((()=>!!i&&rb({tagName:i,type:o})));(0,l.useEffect)((()=>{s.current&&u(rb(s.current))}),[]);const[d,m]=(0,l.useState)(!1),p=(0,l.useRef)(!1),h=K_(a),[f,g]=function(e,t,n){const r=e.onLoadedMetadataCapture,a=(0,l.useMemo)((()=>Object.assign((()=>{}),A_(M_({},r),{[t]:n}))),[r,t,n]);return[null==r?void 0:r[t],{onLoadedMetadataCapture:a}]}(a,Rw,!0),y=a.onKeyDown,v=kb((e=>{null==y||y(e);const t=e.currentTarget;if(e.defaultPrevented)return;if(f)return;if(h)return;if(!fb(e))return;if(ib(t))return;if(t.isContentEditable)return;const a=n&&"Enter"===e.key,s=r&&" "===e.key,i="Enter"===e.key&&!n,o=" "===e.key&&!r;if(i||o)e.preventDefault();else if(a||s){const n=Fw(e);if(a){if(!n){e.preventDefault();const n=e,{view:r}=n,a=O_(n,["view"]),s=()=>yb(t,a);$_&&/firefox\//i.test(navigator.userAgent)?_b(t,"keyup",s):queueMicrotask(s)}}else s&&(p.current=!0,n||(e.preventDefault(),m(!0)))}})),_=a.onKeyUp,b=kb((e=>{if(null==_||_(e),e.defaultPrevented)return;if(f)return;if(h)return;if(e.metaKey)return;const t=r&&" "===e.key;if(p.current&&t&&(p.current=!1,!Fw(e))){e.preventDefault(),m(!1);const t=e.currentTarget,n=e,{view:r}=n,a=O_(n,["view"]);queueMicrotask((()=>yb(t,a)))}}));return a=A_(M_(M_({"data-active":d?"":void 0,type:c?"button":void 0},g),a),{ref:Tb(s,a.ref),onKeyDown:v,onKeyUp:b}),a=gw(a)}));bE((e=>wE("button",e=Dw(e))));var Vw=SE((e=>{var t=e,{store:n,shouldRegisterItem:r=!0,getItem:a=q_,element:s}=t,i=O_(t,["store","shouldRegisterItem","getItem","element"]);const o=kE();n=n||o;const c=Pb(i.id),u=(0,l.useRef)(s);return(0,l.useEffect)((()=>{const e=u.current;if(!c)return;if(!e)return;if(!r)return;const t=a({id:c,element:e});return null==n?void 0:n.renderItem(t)}),[c,r,a,n]),i=A_(M_({},i),{ref:Tb(u,i.ref)})}));bE((e=>wE("div",Vw(e))));function Lw(e,t=!1){const{top:n}=e.getBoundingClientRect();return t?n+e.clientHeight:n}function Bw(e,t,n,r=!1){var a;if(!t)return;if(!n)return;const{renderedItems:s}=t.getState(),i=cb(e);if(!i)return;const o=function(e,t=!1){const n=e.clientHeight,{top:r}=e.getBoundingClientRect(),a=1.5*Math.max(.875*n,n-40),s=t?n-a+r:a+r;return"HTML"===e.tagName?s+e.scrollTop:s}(i,r);let l,c;for(let e=0;e<s.length;e+=1){const s=l;if(l=n(e),!l)break;if(l===s)continue;const i=null==(a=ew(t,l))?void 0:a.element;if(!i)continue;const u=Lw(i,r)-o,d=Math.abs(u);if(r&&u<=0||!r&&u>=0){void 0!==c&&c<d&&(l=s);break}c=d}return l}var zw=SE((e=>{var t=e,{store:n,rowId:r,preventScrollOnKeyDown:a=!1,moveOnKeyPress:s=!0,tabbable:i=!1,getItem:o,"aria-setsize":c,"aria-posinset":u}=t,d=O_(t,["store","rowId","preventScrollOnKeyDown","moveOnKeyPress","tabbable","getItem","aria-setsize","aria-posinset"]);const m=PE();n=n||m;const p=Pb(d.id),h=(0,l.useRef)(null),f=(0,l.useContext)(NE),g=Xb(n,(e=>r||(e&&(null==f?void 0:f.baseElement)&&f.baseElement===e.baseElement?f.id:void 0))),y=K_(d)&&!d.accessibleWhenDisabled,v=(0,l.useCallback)((e=>{const t=A_(M_({},e),{id:p||e.id,rowId:g,disabled:!!y});return o?o(t):t}),[p,g,y,o]),_=d.onFocus,b=(0,l.useRef)(!1),E=kb((e=>{if(null==_||_(e),e.defaultPrevented)return;if(hb(e))return;if(!p)return;if(!n)return;const{activeId:t,virtualFocus:r,baseElement:a}=n.getState();if(function(e,t){return!fb(e)&&nw(t,e.target)}(e,n))return;if(t!==p&&n.setActiveId(p),!r)return;if(!fb(e))return;if((s=e.currentTarget).isContentEditable||ib(s)||"INPUT"===s.tagName&&!rb(s))return;var s;if(!(null==a?void 0:a.isConnected))return;b.current=!0;e.relatedTarget===a||nw(n,e.relatedTarget)?function(e){e[tw]=!0,e.focus({preventScroll:!0})}(a):a.focus()})),w=d.onBlurCapture,S=kb((e=>{if(null==w||w(e),e.defaultPrevented)return;const t=null==n?void 0:n.getState();(null==t?void 0:t.virtualFocus)&&b.current&&(b.current=!1,e.preventDefault(),e.stopPropagation())})),x=d.onKeyDown,C=Ab(a),k=Ab(s),T=kb((e=>{if(null==x||x(e),e.defaultPrevented)return;if(!fb(e))return;if(!n)return;const{currentTarget:t}=e,r=n.getState(),a=n.item(p),s=!!(null==a?void 0:a.rowId),i="horizontal"!==r.orientation,o="vertical"!==r.orientation,l=()=>!!s||(!!o||(!r.baseElement||!ib(r.baseElement))),c={ArrowUp:(s||i)&&n.up,ArrowRight:(s||o)&&n.next,ArrowDown:(s||i)&&n.down,ArrowLeft:(s||o)&&n.previous,Home:()=>{if(l())return!s||e.ctrlKey?null==n?void 0:n.first():null==n?void 0:n.previous(-1)},End:()=>{if(l())return!s||e.ctrlKey?null==n?void 0:n.last():null==n?void 0:n.next(-1)},PageUp:()=>Bw(t,n,null==n?void 0:n.up,!0),PageDown:()=>Bw(t,n,null==n?void 0:n.down)}[e.key];if(c){const t=c();if(C(e)||void 0!==t){if(!k(e))return;e.preventDefault(),n.move(t)}}})),P=Xb(n,(e=>(null==e?void 0:e.baseElement)||void 0)),I=(0,l.useMemo)((()=>({id:p,baseElement:P})),[p,P]);d=Ob(d,(e=>(0,_E.jsx)(OE.Provider,{value:I,children:e})),[I]);const M=Xb(n,(e=>!!e&&e.activeId===p)),A=Xb(n,"virtualFocus"),O=function(e,t){const n=t.role,[r,a]=(0,l.useState)(n);return xb((()=>{const t=e.current;t&&a(t.getAttribute("role")||n)}),[n]),r}(h,d);let N;M&&(!function(e){return"option"===e||"treeitem"===e}(O)?A&&function(e){return"option"===e||"tab"===e||"treeitem"===e||"gridcell"===e||"row"===e||"columnheader"===e||"rowheader"===e}(O)&&(N=!0):N=!0);const F=Xb(n,(e=>null!=c?c:e&&(null==f?void 0:f.ariaSetSize)&&f.baseElement===e.baseElement?f.ariaSetSize:void 0)),R=Xb(n,(e=>{if(null!=u)return u;if(!e)return;if(!(null==f?void 0:f.ariaPosInSet))return;if(f.baseElement!==e.baseElement)return;const t=e.renderedItems.filter((e=>e.rowId===g));return f.ariaPosInSet+t.findIndex((e=>e.id===p))})),D=Xb(n,(e=>!(null==e?void 0:e.renderedItems.length)||!e.virtualFocus&&(!!i||e.activeId===p)));return d=A_(M_({id:p,"aria-selected":N,"data-active-item":M?"":void 0},d),{ref:Tb(h,d.ref),tabIndex:D?d.tabIndex:-1,onFocus:E,onBlurCapture:S,onKeyDown:T}),d=Dw(d),d=Vw(A_(M_({store:n},d),{getItem:v,shouldRegisterItem:!!p&&d.shouldRegisterItem})),A_(M_({},d),{"aria-setsize":F,"aria-posinset":R})}));EE((e=>wE("button",zw(e))));var Hw=SE((e=>{var t=e,{store:n,value:r,hideOnClick:a,selectValueOnClick:s=!0,setValueOnClick:i,focusOnHover:o=!1,moveOnKeyPress:c=!0,getItem:u}=t,d=O_(t,["store","value","hideOnClick","selectValueOnClick","setValueOnClick","focusOnHover","moveOnKeyPress","getItem"]);const m=WE();Y_(n=n||m,!1);const p=(0,l.useCallback)((e=>{const t=A_(M_({},e),{value:r});return u?u(t):t}),[r,u]),h=n.useState((e=>Array.isArray(e.selectedValue)));i=null!=i?i:!h,a=null!=a?a:null!=r&&!h;const f=d.onClick,g=Ab(i),y=Ab(s),v=Ab(a),_=kb((e=>{null==f||f(e),e.defaultPrevented||function(e){const t=e.currentTarget;if(!t)return!1;const n=t.tagName.toLowerCase();return!!e.altKey&&("a"===n||"button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type)}(e)||function(e){const t=e.currentTarget;if(!t)return!1;const n=mb();if(n&&!e.metaKey)return!1;if(!n&&!e.ctrlKey)return!1;const r=t.tagName.toLowerCase();return"a"===r||"button"===r&&"submit"===t.type||"input"===r&&"submit"===t.type}(e)||(null!=r&&(y(e)&&(null==n||n.setSelectedValue((e=>Array.isArray(e)?e.includes(r)?e.filter((e=>e!==r)):[...e,r]:r))),g(e)&&(null==n||n.setValue(r))),v(e)&&(null==n||n.move(null),null==n||n.hide()))})),b=d.onKeyDown,E=kb((e=>{if(null==b||b(e),e.defaultPrevented)return;const t=null==n?void 0:n.getState().baseElement;if(!t)return;if(iw(t))return;(1===e.key.length||"Backspace"===e.key||"Delete"===e.key)&&(queueMicrotask((()=>t.focus())),ib(t)&&(null==n||n.setValue(t.value)))})),w=n.useState((e=>function(e,t){if(null!=t)return null!=e&&(Array.isArray(e)?e.includes(t):e===t)}(e.selectedValue,r)));h&&null!=w&&(d=M_({"aria-selected":w},d)),d=Ob(d,(e=>(0,_E.jsx)(YE.Provider,{value:r,children:(0,_E.jsx)(KE.Provider,{value:null!=w&&w,children:e})})),[r,w]);const S=n.useState("contentElement");d=A_(M_({role:lb(S),children:r},d),{onClick:_,onKeyDown:E});const x=Ab(c);return d=zw(A_(M_({store:n},d),{getItem:p,moveOnKeyPress:e=>{if(!x(e))return!1;const t=new Event("combobox-item-move"),r=null==n?void 0:n.getState().baseElement;return null==r||r.dispatchEvent(t),!0}})),d=Nw(M_({store:n,focusOnHover:o},d))})),Gw=EE((e=>wE("div",Hw(e))));function Uw(e){return Z_(e).toLowerCase()}var Ww=SE((e=>{var t=e,{store:n,value:r}=t,a=O_(t,["store","value"]);const s=WE();n=n||s;const i=(0,l.useContext)(YE),o=null!=r?r:i;Y_(n,!1);const c=n.useState((e=>o&&e.value?e.value:void 0)),u=(0,l.useMemo)((()=>o&&c?function(e,t){t=Uw(t);let n=Uw(e).indexOf(t);const r=[];for(;-1!==n;)0!==n&&r.push((0,_E.jsx)("span",{"data-autocomplete-value":"",children:e.substr(0,n)},r.length)),r.push((0,_E.jsx)("span",{"data-user-value":"",children:e.substr(n,t.length)},r.length)),n=Uw(e=e.substr(n+t.length)).indexOf(t);return e&&r.push((0,_E.jsx)("span",{"data-autocomplete-value":"",children:e},r.length)),r}(o,c):o),[o,c]);return a=M_({children:u},a)})),jw=bE((e=>wE("span",Ww(e))));const Zw=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Circle,{cx:12,cy:12,r:3}));function qw(e=""){return hi()(e.trim().toLowerCase())}function Yw({filter:e,view:t,onChangeView:n}){const[r,a]=(0,g.useState)(""),s=(0,g.useDeferredValue)(r),i=t.filters.find((t=>t.field===e.field)),o=i?.value,c=(0,g.useMemo)((()=>{const t=qw(s);return e.elements.filter((e=>qw(e.label).includes(t)))}),[e.elements,s]);return(0,l.createElement)(XE,{value:r,setSelectedValue:r=>{const a=t.filters.find((t=>t.field===e.field)),s=a?[...t.filters.map((t=>t.field===e.field?{...t,operator:a.operator||e.operators[0],value:r}:t))]:[...t.filters,{field:e.field,operator:e.operators[0],value:r}];n({...t,page:1,filters:s})},setValue:a},(0,l.createElement)("div",{className:"dataviews-search-widget-filter-combobox__wrapper"},(0,l.createElement)(QE,{render:(0,l.createElement)(b.VisuallyHidden,null)},(0,E.__)("Search items")),(0,l.createElement)(Sw,{autoSelect:"always",placeholder:(0,E.__)("Search"),className:"dataviews-search-widget-filter-combobox__input"}),(0,l.createElement)("div",{className:"dataviews-search-widget-filter-combobox__icon"},(0,l.createElement)(b.Icon,{icon:Va}))),(0,l.createElement)(Mw,{className:"dataviews-search-widget-filter-combobox-list",alwaysVisible:!0},c.map((e=>(0,l.createElement)(Gw,{key:e.value,value:e.value,className:"dataviews-search-widget-filter-combobox-item",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0},(0,l.createElement)("span",{className:"dataviews-search-widget-filter-combobox-item-check"},o===e.value&&(0,l.createElement)(b.Icon,{icon:Zw})),(0,l.createElement)("span",null,(0,l.createElement)(jw,{className:"dataviews-search-widget-filter-combobox-item-value",value:e.label}),!!e.description&&(0,l.createElement)("span",{className:"dataviews-search-widget-filter-combobox-item-description"},e.description))))),!c.length&&(0,l.createElement)("p",null,(0,E.__)("No results found"))))}const Kw=({activeElement:e,filterInView:t,filter:n})=>{if(void 0===e)return n.name;const r={Span1:(0,l.createElement)("span",{className:"dataviews-filter-summary__filter-text-name"}),Span2:(0,l.createElement)("span",{className:"dataviews-filter-summary__filter-text-value"})};return void 0!==e&&t?.operator===wl?(0,g.createInterpolateElement)((0,E.sprintf)((0,E.__)("<Span1>%1$s </Span1><Span2>is %2$s</Span2>"),n.name,e.label),r):void 0!==e&&t?.operator===Sl?(0,g.createInterpolateElement)((0,E.sprintf)((0,E.__)("<Span1>%1$s </Span1><Span2>is not %2$s</Span2>"),n.name,e.label),r):(0,E.sprintf)((0,E.__)("Unknown status for %1$s"),n.name)};function Xw({filter:e,view:t,onChangeView:n}){const r=e.operators?.map((e=>({value:e,label:xl[e]?.label}))),a=t.filters.find((t=>t.field===e.field)),s=a?.operator||e.operators[0];return r.length>1&&(0,l.createElement)(b.__experimentalHStack,{spacing:2,justify:"flex-start",className:"dataviews-filter-summary__operators-container"},(0,l.createElement)(b.FlexItem,{className:"dataviews-filter-summary__operators-filter-name"},e.name),(0,l.createElement)(b.SelectControl,{label:(0,E.__)("Conditions"),value:s,options:r,onChange:r=>{const s=a?[...t.filters.map((t=>t.field===e.field?{...t,operator:r}:t))]:[...t.filters,{field:e.field,operator:r}];n({...t,page:1,filters:s})},size:"small",__nextHasNoMarginBottom:!0,hideLabelFromVision:!0}))}function Jw({addFilterRef:e,openedFilter:t,...n}){const r=(0,g.useRef)(),{filter:a,view:s,onChangeView:i}=n,o=s.filters.find((e=>e.field===a.field)),c=a.elements.find((e=>e.value===o?.value)),u=a.isPrimary,d=void 0!==o?.value,m=!u||d;return(0,l.createElement)(b.Dropdown,{defaultOpen:t===a.field,contentClassName:"dataviews-filter-summary__popover",popoverProps:{placement:"bottom-start",role:"dialog"},onClose:()=>{r.current?.focus()},renderToggle:({isOpen:t,onToggle:n})=>(0,l.createElement)("div",{className:"dataviews-filter-summary__chip-container"},(0,l.createElement)(b.Tooltip,{text:(0,E.sprintf)((0,E.__)("Filter by: %1$s"),a.name.toLowerCase()),placement:"top"},(0,l.createElement)("div",{className:_()("dataviews-filter-summary__chip",{"has-reset":m,"has-values":d}),role:"button",tabIndex:0,onClick:n,onKeyDown:e=>{[wr.ENTER,wr.SPACE].includes(e.keyCode)&&(n(),e.preventDefault())},"aria-pressed":t,"aria-expanded":t,ref:r},(0,l.createElement)(Kw,{activeElement:c,filterInView:o,filter:a}))),m&&(0,l.createElement)(b.Tooltip,{text:u?(0,E.__)("Reset"):(0,E.__)("Remove"),placement:"top"},(0,l.createElement)("button",{className:_()("dataviews-filter-summary__chip-remove",{"has-values":d}),onClick:()=>{i({...s,page:1,filters:s.filters.filter((e=>e.field!==a.field))}),u?r.current?.focus():e.current?.focus()}},(0,l.createElement)(b.Icon,{icon:P})))),renderContent:()=>(0,l.createElement)(b.__experimentalVStack,{spacing:0,justify:"flex-start"},(0,l.createElement)(Xw,{...n}),(0,l.createElement)(Yw,{...n}))})}const{DropdownMenuV2:Qw,DropdownMenuItemV2:$w,DropdownMenuItemLabelV2:eS}=Vo(b.privateApis);const tS=(0,g.forwardRef)((function({filters:e,view:t,onChangeView:n,setOpenedFilter:r},a){if(!e.length||e.every((({isPrimary:e})=>e)))return null;const s=e.filter((e=>!e.isVisible));return(0,l.createElement)(Qw,{trigger:(0,l.createElement)(b.Button,{__experimentalIsFocusable:!0,size:"compact",icon:Za,className:"dataviews-filters-button",variant:"tertiary",disabled:!s.length,ref:a},(0,E.__)("Add filter"))},s.map((e=>(0,l.createElement)($w,{key:e.field,onClick:()=>{r(e.field),n({...t,page:1,filters:[...t.filters||[],{field:e.field,value:void 0,operator:e.operators[0]}]})}},(0,l.createElement)(eS,null,e.name)))))}));function nS({filters:e,view:t,onChangeView:n}){const r=!t.search&&!t.filters?.some((t=>{return void 0!==t.value||(n=t.field,!e.some((e=>e.field===n&&e.isPrimary)));var n}));return(0,l.createElement)(b.Button,{disabled:r,__experimentalIsFocusable:!0,size:"compact",variant:"tertiary",onClick:()=>{n({...t,page:1,search:"",filters:[]})}},(0,E.__)("Reset filters"))}const rS=(0,g.memo)((function({fields:e,view:t,onChangeView:n,openedFilter:r,setOpenedFilter:a}){const s=(0,g.useRef)(),i=[];e.forEach((e=>{if(!e.type)return;const n=Jo(e);if(0!==n.length&&e.type===El){if(!e.elements?.length)return;const r=!!e.filterBy?.isPrimary;i.push({field:e.id,name:e.header,elements:e.elements,operators:n,isVisible:r||t.filters.some((t=>t.field===e.id&&[wl,Sl].includes(t.operator))),isPrimary:r})}})),i.sort(((e,t)=>e.isPrimary&&!t.isPrimary?-1:!e.isPrimary&&t.isPrimary?1:e.name.localeCompare(t.name)));const o=(0,l.createElement)(tS,{key:"add-filter",filters:i,view:t,onChangeView:n,ref:s,setOpenedFilter:a}),c=[...i.map((e=>e.isVisible?(0,l.createElement)(Jw,{key:e.field,filter:e,view:t,onChangeView:n,addFilterRef:s,openedFilter:r}):null)),o];return c.length>1&&c.push((0,l.createElement)(nS,{key:"reset-filters",filters:i,view:t,onChangeView:n})),(0,l.createElement)(b.__experimentalHStack,{justify:"flex-start",style:{width:"fit-content"},wrap:!0},c)})),aS=rS,sS=(0,g.memo)((function({label:e,view:t,onChangeView:n}){const[r,a,s]=(0,ie.useDebouncedInput)(t.search);(0,g.useEffect)((()=>{a(t.search)}),[t]);const i=(0,g.useRef)(n);(0,g.useEffect)((()=>{i.current=n}),[n]),(0,g.useEffect)((()=>{i.current({...t,page:1,search:s})}),[s]);const o=e||(0,E.__)("Search");return(0,l.createElement)(b.SearchControl,{__nextHasNoMarginBottom:!0,onChange:a,value:r,label:o,placeholder:o,size:"compact"})})),iS=sS,oS=e=>e.id,lS=()=>{};function cS({view:e,onChangeView:t,fields:n,search:r=!0,searchLabel:a,actions:s,data:i,getItemId:o=oS,isLoading:c=!1,paginationInfo:u,supportedLayouts:d,onSelectionChange:m=lS,onDetailsChange:p=null,deferredRendering:h=!1}){const[f,y]=(0,g.useState)([]),[v,_]=(0,g.useState)(null);(0,g.useEffect)((()=>{if(f.length>0&&f.some((e=>!i.some((t=>o(t)===e))))){const e=f.filter((e=>i.some((t=>o(t)===e))));y(e),m(i.filter((t=>e.includes(o(t)))))}}),[f,i,o,m]);const E=(0,g.useCallback)((e=>{y(e.map((e=>o(e)))),m(e)}),[y,o,m]),w=Pl.find((t=>t.type===e.type)).component,S=(0,g.useMemo)((()=>n.map((e=>({...e,render:e.render||e.getValue})))),[n]),x=function(e,t){return(0,g.useMemo)((()=>t.some((t=>e.some((e=>e.supportsBulk&&e.isEligible(t)))))),[e,t])}(s,i);return(0,l.createElement)("div",{className:"dataviews-wrapper"},(0,l.createElement)(b.__experimentalHStack,{alignment:"top",justify:"start",className:"dataviews-filters__view-actions"},(0,l.createElement)(b.__experimentalHStack,{justify:"start",className:"dataviews-filters__container",wrap:!0},r&&(0,l.createElement)(iS,{label:a,view:e,onChangeView:t}),(0,l.createElement)(aS,{fields:S,view:e,onChangeView:t,openedFilter:v,setOpenedFilter:_})),[kl,Tl].includes(e.type)&&x&&(0,l.createElement)(il,{actions:s,data:i,onSelectionChange:E,selection:f,getItemId:o}),(0,l.createElement)(w_,{fields:S,view:e,onChangeView:t,supportedLayouts:d})),(0,l.createElement)(w,{fields:S,view:e,onChangeView:t,actions:s,data:i,getItemId:o,isLoading:c,onSelectionChange:E,onDetailsChange:p,selection:f,deferredRendering:h,setOpenedFilter:_}),(0,l.createElement)(u_,{view:e,onChangeView:t,paginationInfo:u}))}function uS({title:e,subTitle:t,actions:n}){return(0,l.createElement)(b.__experimentalHStack,{as:"header",alignment:"left",className:"edit-site-page-header"},(0,l.createElement)(b.FlexBlock,{className:"edit-site-page-header__page-title"},(0,l.createElement)(b.__experimentalHeading,{as:"h2",level:3,weight:500,className:"edit-site-page-header__title"},e),t&&(0,l.createElement)(b.__experimentalText,{as:"p",className:"edit-site-page-header__sub-title"},t)),(0,l.createElement)(b.FlexItem,{className:"edit-site-page-header__actions"},n))}function dS({title:e,subTitle:t,actions:n,children:r,className:a,hideTitleFromUI:s=!1}){const i=_()("edit-site-page",a);return(0,l.createElement)(oe,{className:i,ariaLabel:e},(0,l.createElement)("div",{className:"edit-site-page-content"},!s&&e&&(0,l.createElement)(uS,{title:e,subTitle:t,actions:n}),r),(0,l.createElement)(y.EditorSnackbars,null))}const{useHistory:mS}=Xe(gt.privateApis),pS={id:"move-to-trash",label:(0,E.__)("Move to Trash"),isPrimary:!0,icon:ql,isEligible:({status:e})=>"trash"!==e,supportsBulk:!0,hideModalHeader:!0,RenderModal:({items:e,closeModal:t,onPerform:n})=>{const{createSuccessNotice:r,createErrorNotice:a}=(0,m.useDispatch)(ge.store),{deleteEntityRecord:s}=(0,m.useDispatch)(ye.store);return(0,l.createElement)(b.__experimentalVStack,{spacing:"5"},(0,l.createElement)(b.__experimentalText,null,1===e.length?(0,E.sprintf)((0,E.__)('Are you sure you want to delete "%s"?'),(0,en.decodeEntities)(e[0].title.rendered)):(0,E.sprintf)((0,E.__)("Are you sure you want to delete %d pages?"),e.length)),(0,l.createElement)(b.__experimentalHStack,{justify:"right"},(0,l.createElement)(b.Button,{variant:"tertiary",onClick:t},(0,E.__)("Cancel")),(0,l.createElement)(b.Button,{variant:"primary",onClick:async()=>{const i=await Promise.allSettled(e.map((e=>s("postType",e.type,e.id,{},{throwOnError:!0}))));if(i.every((({status:e})=>"fulfilled"===e))){let t;t=1===i.length?(0,E.sprintf)((0,E.__)('"%s" moved to the Trash.'),(0,en.decodeEntities)(e[0].title.rendered)):(0,E.__)("Pages moved to the Trash."),r(t,{type:"snackbar",id:"edit-site-page-trashed"})}else{let e;if(1===i.length)e=i[0].reason?.message?i[0].reason.message:(0,E.__)("An error occurred while moving the post to the trash.");else{const t=new Set,n=i.filter((({status:e})=>"rejected"===e));for(const e of n)e.reason?.message&&t.add(e.reason.message);e=0===t.size?(0,E.__)("An error occurred while moving the posts to the trash."):1===t.size?(0,E.sprintf)((0,E.__)("An error occurred while moving the posts to the trash: %s"),[...t][0]):(0,E.sprintf)((0,E.__)("Some errors occurred while moving the pages to the trash: %s"),[...t].join(",")),a(e,{type:"snackbar"})}}n&&n(),t()}},(0,E.__)("Delete"))))}};const hS={id:"view-post",label:(0,E.__)("View"),isPrimary:!0,icon:Ic,isEligible:e=>"trash"!==e.status,callback(e){const t=e[0];document.location.href=t.link}};const fS={id:"view-post-revisions",label:(0,E.__)("View revisions"),isPrimary:!1,isEligible:e=>{var t,n;if("trash"===e.status)return!1;const r=null!==(t=e?._links?.["predecessor-version"]?.[0]?.id)&&void 0!==t?t:null,a=null!==(n=e?._links?.["version-history"]?.[0]?.count)&&void 0!==n?n:0;return r&&a>1},callback(e){const t=e[0],n=(0,yt.addQueryArgs)("revision.php",{revision:t?._links?.["predecessor-version"]?.[0]?.id});document.location.href=n}};const gS=function({id:e,size:t=["large","medium","thumbnail"],...n}){const{record:r}=(0,ye.useEntityRecord)("root","media",e),a=t.find((e=>!!r?.media_details?.sizes[e])),s=r?.media_details?.sizes[a]?.source_url||r?.source_url;return s?(0,l.createElement)("img",{...n,src:s,alt:r.alt_text}):null},{useLocation:yS,useHistory:vS}=Xe(gt.privateApis),_S=[],bS=window?.__experimentalAdminViews?[Dt,Vt,Lt]:[Dt,Vt];const ES=[{value:"draft",label:(0,E.__)("Draft")},{value:"future",label:(0,E.__)("Scheduled")},{value:"pending",label:(0,E.__)("Pending Review")},{value:"private",label:(0,E.__)("Private")},{value:"publish",label:(0,E.__)("Published")},{value:"trash",label:(0,E.__)("Trash")}],wS="draft,future,pending,private,publish";function SS({item:e,viewType:t}){const{onClick:n}=Et({postId:e.id,postType:e.type,canvas:"edit"}),r=!!e.featured_media,a=t===Dt?["large","full","medium","thumbnail"]:["thumbnail","medium","large","full"],s=r?(0,l.createElement)(gS,{className:"edit-site-page-pages__featured-image",id:e.featured_media,size:a}):null;return t===Lt?s:(0,l.createElement)("button",{className:_()("page-pages-preview-field__button",{"edit-site-page-pages__media-wrapper":t===Vt}),type:"button",onClick:n,"aria-label":e.title?.rendered||(0,E.__)("(no title)")},s)}function xS(){const e="page",[t,n]=function(e){const{params:t}=yS(),{activeView:n="all",isCustom:r="false",layout:a}=t,s=vS(),i=(0,g.useMemo)((()=>{const t="false"===r&&Xl[e].find((({slug:e})=>e===n))?.view;return"false"===r&&a?{...t,type:a,layout:{...Yl[a]||{}}}:t}),[r,n,a,e]),[o,l]=(0,g.useState)(i);(0,g.useEffect)((()=>{i&&l(i)}),[i]);const c=(0,m.useSelect)((e=>{if("true"!==r)return;const{getEditedEntityRecord:t}=e(ye.store);return t("postType","wp_dataviews",Number(n))}),[n,r]),{editEntityRecord:u}=(0,m.useDispatch)(ye.store),d=(0,g.useMemo)((()=>{const e=c?.content&&JSON.parse(c?.content);return e?{...e,layout:{...Yl[e?.type]||{}}}:e}),[c?.content]),p=(0,g.useCallback)((e=>{u("postType","wp_dataviews",c?.id,{content:JSON.stringify(e)})}),[u,c?.id]),h=(0,g.useCallback)((e=>{e.type!==o?.type&&s.push({...t,layout:e.type}),l(e)}),[t,o?.type,s]);return"false"===r?[o,h]:"true"===r&&d?[d,p]:[Xl[e][0].view,h]}(e),r=vS(),{params:a}=yS(),{isCustom:s="false"}=a,i=(0,g.useCallback)((e=>{"false"===s&&t?.type===Lt&&r.push({...a,postId:1===e.length?e[0].id:void 0})}),[r,a,t?.type,s]),o=(0,g.useMemo)((()=>{const e={};return t.filters.forEach((t=>{"status"===t.field&&t.operator===zt&&(e.status=t.value),"author"===t.field&&t.operator===zt?e.author=t.value:"author"===t.field&&t.operator===Ht&&(e.author_exclude=t.value)})),e.status&&""!==e.status||(e.status=wS),{per_page:t.perPage,page:t.page,_embed:"author",order:t.sort?.direction,orderby:t.sort?.field,search:t.search,...e}}),[t]),{records:c,isResolving:u,totalItems:d,totalPages:p}=(0,ye.useEntityRecords)("postType",e,o),{records:h,isResolving:f}=(0,ye.useEntityRecords)("root","user"),y=(0,g.useMemo)((()=>({totalItems:d,totalPages:p})),[d,p]),v=(0,g.useMemo)((()=>[{id:"featured-image",header:(0,E.__)("Featured Image"),getValue:({item:e})=>e.featured_media,render:({item:e})=>(0,l.createElement)(SS,{item:e,viewType:t.type}),enableSorting:!1,width:"1%"},{header:(0,E.__)("Title"),id:"title",getValue:({item:e})=>e.title?.rendered,render:({item:e})=>[Vt,Dt].includes(t.type)?(0,l.createElement)(wt,{params:{postId:e.id,postType:e.type,canvas:"edit"}},(0,en.decodeEntities)(e.title?.rendered)||(0,E.__)("(no title)")):(0,en.decodeEntities)(e.title?.rendered)||(0,E.__)("(no title)"),maxWidth:300,enableHiding:!1},{header:(0,E.__)("Author"),id:"author",getValue:({item:e})=>e._embedded?.author[0]?.name,type:Bt,elements:h?.map((({id:e,name:t})=>({value:e,label:t})))||[]},{header:(0,E.__)("Status"),id:"status",getValue:({item:e})=>{var t;return null!==(t=ES.find((({value:t})=>t===e.status))?.label)&&void 0!==t?t:e.status},type:Bt,elements:ES,enableSorting:!1,filterBy:{operators:[zt]}},{header:(0,E.__)("Date"),id:"date",getValue:({item:e})=>e.date,render:({item:e})=>{const t=(0,_a.dateI18n)((0,_a.getSettings)().formats.datetimeAbbreviated,(0,_a.getDate)(e.date));return(0,l.createElement)("time",null,t)}}]),[h,t.type]),_=function(){const{createSuccessNotice:e,createErrorNotice:t}=(0,m.useDispatch)(ge.store),{deleteEntityRecord:n}=(0,m.useDispatch)(ye.store);return(0,g.useMemo)((()=>({id:"permanently-delete",label:(0,E.__)("Permanently delete"),isPrimary:!0,icon:ql,supportsBulk:!0,isEligible:({status:e})=>"trash"===e,async callback(r){const a=await Promise.allSettled(r.map((e=>n("postType",e.type,e.id,{force:!0},{throwOnError:!0}))));if(a.every((({status:e})=>"fulfilled"===e))){let t;t=1===a.length?(0,E.sprintf)((0,E.__)('"%s" permanently deleted.'),(0,en.decodeEntities)(r[0].title.rendered)):(0,E.__)("The posts were permanently deleted."),e(t,{type:"snackbar",id:"edit-site-post-permanently-deleted"})}else{let e;if(1===a.length)e=a[0].reason?.message?a[0].reason.message:(0,E.__)("An error occurred while permanently deleting the post.");else{const n=new Set,r=a.filter((({status:e})=>"rejected"===e));for(const e of r)e.reason?.message&&n.add(e.reason.message);e=0===n.size?(0,E.__)("An error occurred while permanently deleting the posts."):1===n.size?(0,E.sprintf)((0,E.__)("An error occurred while permanently deleting the posts: %s"),[...n][0]):(0,E.sprintf)((0,E.__)("Some errors occurred while permanently deleting the posts: %s"),[...n].join(",")),t(e,{type:"snackbar"})}}}})),[e,t,n])}(),w=function(){const{createSuccessNotice:e,createErrorNotice:t}=(0,m.useDispatch)(ge.store),{editEntityRecord:n,saveEditedEntityRecord:r}=(0,m.useDispatch)(ye.store);return(0,g.useMemo)((()=>({id:"restore",label:(0,E.__)("Restore"),isPrimary:!0,icon:ba,supportsBulk:!0,isEligible:({status:e})=>"trash"===e,async callback(a){try{for(const e of a)await n("postType",e.type,e.id,{status:"draft"}),await r("postType",e.type,e.id,{throwOnError:!0});e(a.length>1?(0,E.sprintf)((0,E.__)("%d posts have been restored."),a.length):(0,E.sprintf)((0,E.__)('"%s" has been restored.'),(0,en.decodeEntities)(a[0].title.rendered)),{type:"snackbar",id:"edit-site-post-restored"})}catch(e){let n;n=e.message&&"unknown_error"!==e.code&&e.message?e.message:a.length>1?(0,E.__)("An error occurred while restoring the posts."):(0,E.__)("An error occurred while restoring the post."),t(n,{type:"snackbar"})}}})),[e,t,n,r])}(),S=function(){const e=mS();return(0,g.useMemo)((()=>({id:"edit-post",label:(0,E.__)("Edit"),isEligible:({status:e})=>"trash"!==e,callback(t){const n=t[0];e.push({postId:n.id,postType:n.type,canvas:"edit"})}})),[e])}(),x=(0,g.useMemo)((()=>[hS,pS,w,_,S,fS]),[_,w,S]),C=(0,g.useCallback)((e=>{e.type!==t.type&&(e={...e,layout:{...Yl[e.type]}}),n(e)}),[t.type,n]),[k,T]=(0,g.useState)(!1),P=(0,g.useCallback)((()=>{k||T(!0)}),[k]),I=(0,g.useCallback)((()=>{k&&T(!1)}),[k]),M=(0,g.useCallback)((({type:e,id:t})=>{r.push({postId:t,postType:e,canvas:"edit"}),I()}),[r]);return(0,l.createElement)(dS,{title:(0,E.__)("Pages"),actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.Button,{variant:"primary",onClick:P},(0,E.__)("Add new page")),k&&(0,l.createElement)(Hl,{onSave:M,onClose:I}))},(0,l.createElement)(cS,{paginationInfo:y,fields:v,actions:x,data:c||_S,isLoading:u||f,view:t,onChangeView:C,onSelectionChange:i,supportedLayouts:bS}))}const CS=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M18.5 10.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"})),kS=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),TS=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.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"})),PS=window.wp.reusableBlocks,{useHistory:IS}=Xe(gt.privateApis),{CreatePatternModalContents:MS,useDuplicatePatternProps:AS}=Xe(St.privateApis),OS={id:"export-pattern",label:(0,E.__)("Export as JSON"),isEligible:e=>e.type===It.user,callback:([e])=>{const t={__file:e.type,title:e.title||e.name,content:e.patternPost.content.raw,syncStatus:e.patternPost.wp_pattern_sync_status};return(0,Zc.downloadBlob)(`${bs(e.title||e.name)}.json`,JSON.stringify(t,null,2),"application/json")}},NS={id:"rename-pattern",label:(0,E.__)("Rename"),isEligible:e=>{const t=e.type===kt,n=e.type===It.user||t&&e.isCustom,r=t&&e.templatePart.has_theme_file;return n&&!r},RenderModal:({items:e,closeModal:t})=>{const[n]=e,[r,a]=(0,g.useState)((()=>n.title)),{editEntityRecord:s,saveEditedEntityRecord:i}=(0,m.useDispatch)(ye.store),{createSuccessNotice:o,createErrorNotice:c}=(0,m.useDispatch)(ge.store);return(0,l.createElement)("form",{onSubmit:async function(e){e.preventDefault();try{await s("postType",n.type,n.id,{title:r}),a(""),t(),await i("postType",n.type,n.id,{throwOnError:!0}),o(n.type===kt?(0,E.__)("Template part renamed."):(0,E.__)("Pattern renamed."),{type:"snackbar"})}catch(e){const t=n.type===kt?(0,E.__)("An error occurred while renaming the template part."):(0,E.__)("An error occurred while renaming the pattern."),r=e.message&&"unknown_error"!==e.code?e.message:t;c(r,{type:"snackbar"})}}},(0,l.createElement)(b.__experimentalVStack,{spacing:"5"},(0,l.createElement)(b.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,E.__)("Name"),value:r,onChange:a,required:!0}),(0,l.createElement)(b.__experimentalHStack,{justify:"right"},(0,l.createElement)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t()}},(0,E.__)("Cancel")),(0,l.createElement)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit"},(0,E.__)("Save")))))}},FS=e=>{const t=e.type===kt;return e.type===It.user||t&&e.isCustom},RS={id:"delete-pattern",label:(0,E.__)("Delete"),isEligible:e=>{const t=e.type===kt&&e.templatePart.has_theme_file;return FS(e)&&!t},hideModalHeader:!0,supportsBulk:!0,RenderModal:({items:e,closeModal:t,onPerform:n})=>{const{__experimentalDeleteReusableBlock:r}=(0,m.useDispatch)(PS.store),{createErrorNotice:a,createSuccessNotice:s}=(0,m.useDispatch)(ge.store),{removeTemplates:i}=Xe((0,m.useDispatch)(tr));let o;return o=1===e.length?(0,E.sprintf)((0,E.__)('Are you sure you want to delete "%s"?'),(0,en.decodeEntities)(e[0].title||e[0].name)):e.length>1&&e[0].type===kt?(0,E.sprintf)((0,E.__)("Are you sure you want to delete %d template parts?"),e.length):(0,E.sprintf)((0,E.__)("Are you sure you want to delete %d patterns?"),e.length),(0,l.createElement)(b.__experimentalVStack,{spacing:"5"},(0,l.createElement)(b.__experimentalText,null,o),(0,l.createElement)(b.__experimentalHStack,{justify:"right"},(0,l.createElement)(b.Button,{variant:"tertiary",onClick:t},(0,E.__)("Cancel")),(0,l.createElement)(b.Button,{variant:"primary",onClick:()=>{e[0].type===kt?i(e):(async()=>{const t=await Promise.allSettled(e.map((e=>r(e.id))));if(t.every((({status:e})=>"fulfilled"===e))){let n;n=1===t.length?(0,E.sprintf)((0,E.__)('"%s" deleted.'),e[0].title):(0,E.__)("The patterns were deleted."),s(n,{type:"snackbar",id:"edit-site-page-trashed"})}else{let e;if(1===t.length)e=t[0].reason?.message?t[0].reason.message:(0,E.__)("An error occurred while deleting the pattern.");else{const n=new Set,r=t.filter((({status:e})=>"rejected"===e));for(const e of r)e.reason?.message&&n.add(e.reason.message);e=0===n.size?(0,E.__)("An error occurred while deleting the patterns."):1===n.size?(0,E.sprintf)((0,E.__)("An error occurred while deleting the patterns: %s"),[...n][0]):(0,E.sprintf)((0,E.__)("Some errors occurred while deleting the patterns: %s"),[...n].join(",")),a(e,{type:"snackbar"})}}})(),n&&n(),t()}},(0,E.__)("Delete"))))}},DS={id:"reset-action",label:(0,E.__)("Clear customizations"),isEligible:e=>{const t=e.type===kt&&e.templatePart.has_theme_file;return FS(e)&&t},hideModalHeader:!0,RenderModal:({items:e,closeModal:t})=>{const[n]=e,{removeTemplate:r}=(0,m.useDispatch)(tr);return(0,l.createElement)(b.__experimentalVStack,{spacing:"5"},(0,l.createElement)(b.__experimentalText,null,(0,E.__)("Are you sure you want to clear these customizations?")),(0,l.createElement)(b.__experimentalHStack,{justify:"right"},(0,l.createElement)(b.Button,{variant:"tertiary",onClick:t},(0,E.__)("Cancel")),(0,l.createElement)(b.Button,{variant:"primary",onClick:()=>r(n)},(0,E.__)("Clear"))))}},VS={id:"duplicate-pattern",label:(0,E._x)("Duplicate","action label"),isEligible:e=>e.type!==kt,modalHeader:(0,E._x)("Duplicate pattern","action label"),RenderModal:({items:e,closeModal:t})=>{const[n]=e,{categoryId:r=Mt}=(0,yt.getQueryArgs)(window.location.href),a=n.type===It.theme,s=IS();const i=AS({pattern:a?n:n.patternPost,onSuccess:function({pattern:e}){s.push({categoryType:It.theme,categoryId:r,postType:It.user,postId:e.id}),t()}});return(0,l.createElement)(MS,{onClose:t,confirmLabel:(0,E._x)("Duplicate","action label"),...i})}},LS={id:"duplicate-template-part",label:(0,E._x)("Duplicate","action label"),isEligible:e=>e.type===kt,modalHeader:(0,E._x)("Duplicate template part","action label"),RenderModal:({items:e,closeModal:t})=>{const[n]=e,{createSuccessNotice:r}=(0,m.useDispatch)(ge.store),{categoryId:a=Mt}=(0,yt.getQueryArgs)(window.location.href),s=IS();return(0,l.createElement)(ti,{blocks:n.blocks,defaultArea:n.templatePart.area,defaultTitle:(0,E.sprintf)((0,E.__)("%s (Copy)"),n.title),onCreate:async function(e){r((0,E.sprintf)((0,E.__)('"%s" duplicated.'),n.title),{type:"snackbar",id:"edit-site-patterns-success"}),s.push({postType:kt,postId:e?.id,categoryType:kt,categoryId:a}),t()},onError:t,confirmLabel:(0,E._x)("Duplicate","action label")})}};function BS(){var e;const t=(0,m.useSelect)((e=>{const{getSettings:t}=Xe(e(tr));return t()}),[]),n=null!==(e=t.__experimentalAdditionalBlockPatterns)&&void 0!==e?e:t.__experimentalBlockPatterns,r=(0,m.useSelect)((e=>e(ye.store).getBlockPatterns()),[]),a=(0,g.useMemo)((()=>[...n||[],...r||[]].filter(li)),[n,r]);return(0,g.useMemo)((()=>{const{__experimentalAdditionalBlockPatterns:e,...n}=t;return{...n,__experimentalBlockPatterns:a,__unstableIsPreviewMode:!0}}),[t,a])}const{RenamePatternCategoryModal:zS}=Xe(St.privateApis);function HS({category:e,onClose:t}){const[n,r]=(0,g.useState)(!1);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.MenuItem,{onClick:()=>r(!0)},(0,E.__)("Rename")),n&&(0,l.createElement)(GS,{category:e,onClose:()=>{r(!1),t()}}))}function GS({category:e,onClose:t}){const n={id:e.id,slug:e.slug,name:e.label},r=Oi();return(0,l.createElement)(zS,{category:n,existingCategories:r,onClose:t,overlayClassName:"edit-site-list__rename-modal"})}const{useHistory:US}=Xe(gt.privateApis);function WS({category:e,onClose:t}){const[n,r]=(0,g.useState)(!1),a=US(),{createSuccessNotice:s,createErrorNotice:i}=(0,m.useDispatch)(ge.store),{deleteEntityRecord:o,invalidateResolution:c}=(0,m.useDispatch)(ye.store);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.MenuItem,{isDestructive:!0,onClick:()=>r(!0)},(0,E.__)("Delete")),(0,l.createElement)(b.__experimentalConfirmDialog,{isOpen:n,onConfirm:async()=>{try{await o("taxonomy","wp_pattern_category",e.id,{force:!0},{throwOnError:!0}),c("getUserPatternCategories"),c("getEntityRecords",["postType",It.user,{per_page:-1}]),s((0,E.sprintf)((0,E.__)('"%s" deleted.'),e.label),{type:"snackbar",id:"pattern-category-delete"}),t?.(),a.push({path:"/patterns",categoryType:It.theme,categoryId:Mt})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,E.__)("An error occurred while deleting the pattern category.");i(t,{type:"snackbar",id:"pattern-category-delete"})}},onCancel:()=>r(!1),confirmButtonText:(0,E.__)("Delete"),className:"edit-site-patterns__delete-modal"},(0,E.sprintf)((0,E.__)('Are you sure you want to delete the category "%s"? The patterns will not be deleted.'),(0,en.decodeEntities)(e.label))))}function jS({categoryId:e,type:t,titleId:n,descriptionId:r}){const{patternCategories:a}=Oi(),s=(0,m.useSelect)((e=>e(y.store).__experimentalGetDefaultTemplatePartAreas()),[]);let i,o,c;if(t===kt){const t=s.find((t=>t.area===e));i=t?.label,o=t?.description}else t===It.theme&&(c=a.find((t=>t.name===e)),i=c?.label,o=c?.description);return i?(0,l.createElement)(b.__experimentalVStack,{className:"edit-site-patterns__section-header"},(0,l.createElement)(b.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(b.__experimentalHeading,{as:"h2",level:4,id:n},i),!!c?.id&&(0,l.createElement)(b.DropdownMenu,{icon:ue,label:(0,E.__)("Actions"),toggleProps:{className:"edit-site-patterns__button",describedBy:(0,E.sprintf)((0,E.__)("Action menu for %s pattern category"),i)}},(({onClose:e})=>(0,l.createElement)(b.MenuGroup,null,(0,l.createElement)(HS,{category:c,onClose:e}),(0,l.createElement)(WS,{category:c,onClose:e}))))),o?(0,l.createElement)(b.__experimentalText,{variant:"muted",as:"p",id:r},o):null):null}const{ExperimentalBlockEditorProvider:ZS,useGlobalStyle:qS}=Xe(fe.privateApis),YS={header:CS,footer:kS,uncategorized:Ks},KS=[],XS={[Dt]:{mediaField:"preview",primaryField:"title"}},JS={type:Dt,search:"",page:1,perPage:20,hiddenFields:["sync-status"],layout:{...XS[Dt]},filters:[]},QS=[{value:Nt.full,label:(0,E._x)("Synced","Option that shows all synchronized patterns"),description:(0,E.__)("Patterns that are kept in sync across the site.")},{value:Nt.unsynced,label:(0,E._x)("Not synced","Option that shows all patterns that are not synchronized"),description:(0,E.__)("Patterns that can be changed freely without affecting the site.")}];function $S({item:e,onClick:t,ariaDescribedBy:n,children:r}){return e.type===It.theme?r:(0,l.createElement)("button",{className:"page-patterns-preview-field__button",type:"button",onClick:t,"aria-label":e.title,"aria-describedby":n},r)}function ex({item:e,categoryId:t,viewType:n}){const r=(0,g.useId)(),a=e.type===It.user,s=e.type===It.theme,i=e.type===kt,o=!e.blocks?.length,c=[];a||i&&e.isCustom?c.push((0,E.__)("Press Enter to edit, or Delete to delete the pattern.")):e.description&&c.push(e.description),s&&c.push((0,E.__)("Theme & plugin patterns cannot be edited."));const[u]=qS("color.background"),{onClick:d}=Et({postType:e.type,postId:a?e.id:e.name,categoryId:t,categoryType:i?e.type:It.theme});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:`page-patterns-preview-field is-viewtype-${n}`,style:{backgroundColor:u}},(0,l.createElement)($S,{item:e,onClick:d,ariaDescribedBy:c.length?c.map(((e,t)=>`${r}-${t}`)).join(" "):void 0},o&&i&&(0,E.__)("Empty template part"),o&&!i&&(0,E.__)("Empty pattern"),!o&&(0,l.createElement)(fe.BlockPreview,{blocks:e.blocks}))),c.map(((e,t)=>(0,l.createElement)("div",{key:t,hidden:!0,id:`${r}-${t}`},e))))}function tx({item:e,categoryId:t}){const n=e.type===It.user,r=e.type===It.theme,a=e.type===kt;let s;const{onClick:i}=Et({postType:e.type,postId:n?e.id:e.name,categoryId:t,categoryType:a?e.type:It.theme});return s=!n&&YS[t]?YS[t]:e.syncStatus===Nt.full?cr:void 0,(0,l.createElement)(b.__experimentalHStack,{alignment:"center",justify:"flex-start",spacing:2},(0,l.createElement)(b.Flex,{as:"div",gap:0,justify:"left",className:"edit-site-patterns__pattern-title"},e.type===It.theme?e.title:(0,l.createElement)(b.Button,{variant:"link",onClick:i,tabIndex:"-1"},e.title||e.name)),s&&!r&&(0,l.createElement)(b.Tooltip,{placement:"top",text:(0,E.__)("Editing this pattern will also update anywhere it is used")},(0,l.createElement)(fr,{className:"edit-site-patterns__pattern-icon",icon:s})),e.type===It.theme&&(0,l.createElement)(b.Tooltip,{placement:"top",text:(0,E.__)("This pattern cannot be edited.")},(0,l.createElement)(fr,{className:"edit-site-patterns__pattern-lock-icon",icon:TS,size:24})))}function nx(){const{categoryType:e,categoryId:t=Mt}=(0,yt.getQueryArgs)(window.location.href),n=e||It.theme,[r,a]=(0,g.useState)(JS),s=n===It.theme&&"uncategorized"===t,i=(0,ie.usePrevious)(t),o=r.filters?.find((({field:e})=>"sync-status"===e))?.value,{patterns:c,isResolving:u}=Ai(n,s?"":t,{search:r.search,syncStatus:o}),d=(0,g.useMemo)((()=>{const e=[{header:(0,E.__)("Preview"),id:"preview",render:({item:e})=>(0,l.createElement)(ex,{item:e,categoryId:t,viewType:r.type}),enableSorting:!1,enableHiding:!1},{header:(0,E.__)("Title"),id:"title",getValue:({item:e})=>e.title,render:({item:e})=>(0,l.createElement)(tx,{item:e,categoryId:t}),enableHiding:!1}];return n===It.theme&&e.push({header:(0,E.__)("Sync Status"),id:"sync-status",render:({item:e})=>QS.find((({value:t})=>t===e.syncStatus))?.label||QS.find((({value:e})=>e===Nt.unsynced)).label,type:Bt,elements:QS,filterBy:{operators:[zt],isPrimary:!0},enableSorting:!1}),e}),[r.type,t,n]);(0,g.useEffect)((()=>{i!==t&&a(JS)}),[t,i]);const{data:m,paginationInfo:p}=(0,g.useMemo)((()=>{if(!c)return{data:KS,paginationInfo:{totalItems:0,totalPages:0}};let e=[...c];return r.sort&&(e=Ko({data:e,view:r,fields:d,textFields:["title","author"]})),Xo({data:e,view:r})}),[c,r,d]),h=(0,g.useMemo)((()=>[NS,VS,LS,OS,DS,RS]),[]),f=(0,g.useCallback)((e=>{e.type!==r.type&&(e={...e,layout:{...XS[e.type]}}),a(e)}),[r.type,a]),y=(0,g.useId)(),v=BS();return(0,l.createElement)(ZS,{settings:v},(0,l.createElement)(dS,{title:(0,E.__)("Patterns content"),className:"edit-site-page-patterns-dataviews",hideTitleFromUI:!0},(0,l.createElement)(jS,{categoryId:t,type:n,titleId:`${y}-title`,descriptionId:`${y}-description`}),(0,l.createElement)(cS,{paginationInfo:p,fields:d,actions:h,data:m||KS,getItemId:e=>e.name,isLoading:u,view:r,onChangeView:f,deferredRendering:!0,supportedLayouts:[Dt]})))}const rx={id:"delete-template",label:(0,E.__)("Delete"),isPrimary:!0,icon:ql,isEligible:Hs,supportsBulk:!0,hideModalHeader:!0,RenderModal:({items:e,closeModal:t,onPerform:n})=>{const{removeTemplates:r}=Xe((0,m.useDispatch)(tr));return(0,l.createElement)(b.__experimentalVStack,{spacing:"5"},(0,l.createElement)(b.__experimentalText,null,e.length>1?(0,E.sprintf)((0,E._n)("Delete %d item?","Delete %d items?",e.length),e.length):(0,E.sprintf)((0,E.__)('Delete "%s"?'),(0,en.decodeEntities)(e?.[0]?.title?.rendered))),(0,l.createElement)(b.__experimentalHStack,{justify:"right"},(0,l.createElement)(b.Button,{variant:"tertiary",onClick:t},(0,E.__)("Cancel")),(0,l.createElement)(b.Button,{variant:"primary",onClick:async()=>{await r(e,{allowUndo:!1}),n&&n(),t()}},(0,E.__)("Delete"))))}},ax={id:"rename-template",label:(0,E.__)("Rename"),isEligible:e=>!(!Hs(e)||e.type===Ct&&!e.is_custom),RenderModal:({items:e,closeModal:t})=>{const n=e[0],r=(0,en.decodeEntities)(n.title.rendered),[a,s]=(0,g.useState)(r),{editEntityRecord:i,__experimentalSaveSpecifiedEntityEdits:o}=(0,m.useDispatch)(ye.store),{createSuccessNotice:c,createErrorNotice:u}=(0,m.useDispatch)(ge.store);return(0,l.createElement)("form",{onSubmit:async function(e){e.preventDefault();try{await i("postType",n.type,n.id,{title:a}),s(""),t(),await o("postType",n.type,n.id,["title"],{throwOnError:!0}),c(n.type===Ct?(0,E.__)("Template renamed."):(0,E.__)("Template part renamed."),{type:"snackbar"})}catch(e){const t=n.type===Ct?(0,E.__)("An error occurred while renaming the template."):(0,E.__)("An error occurred while renaming the template part."),r=e.message&&"unknown_error"!==e.code?e.message:t;u(r,{type:"snackbar"})}}},(0,l.createElement)(b.__experimentalVStack,{spacing:"5"},(0,l.createElement)(b.TextControl,{__nextHasNoMarginBottom:!0,label:(0,E.__)("Name"),value:a,onChange:s,required:!0}),(0,l.createElement)(b.__experimentalHStack,{justify:"right"},(0,l.createElement)(b.Button,{variant:"tertiary",onClick:t},(0,E.__)("Cancel")),(0,l.createElement)(b.Button,{variant:"primary",type:"submit"},(0,E.__)("Save")))))}},{useHistory:sx}=Xe(gt.privateApis);function ix(){const{canCreate:e,postType:t}=(0,m.useSelect)((e=>{const{supportsTemplatePartsMode:t}=e(tr).getSettings();return{canCreate:!t,postType:e(ye.store).getPostType(kt)}}),[]),[n,r]=(0,g.useState)(!1),a=sx();return e&&t?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.Button,{variant:"primary",onClick:()=>r(!0)},t.labels.add_new_item),n&&(0,l.createElement)(ei,{closeModal:()=>r(!1),blocks:[],onCreate:e=>{r(!1),a.push({postId:e.id,postType:kt,canvas:"edit"})},onError:()=>r(!1)})):null}const{ExperimentalBlockEditorProvider:ox,useGlobalStyle:lx}=Xe(fe.privateApis),{useHistory:cx,useLocation:ux}=Xe(gt.privateApis),dx=[],mx=window?.__experimentalAdminViews?[Vt,Dt,Lt]:[Vt,Dt],px={[Vt]:{primaryField:"title"},[Dt]:{mediaField:"preview",primaryField:"title"},[Lt]:{primaryField:"title",mediaField:"preview"}},hx={type:Vt,search:"",page:1,perPage:20,sort:{field:"title",direction:"asc"},hiddenFields:["preview"],layout:px[Vt],filters:[]};function fx(e=""){return hi()(e.trim().toLowerCase())}function gx({item:e,viewType:t}){if(t===Lt)return(0,en.decodeEntities)(e.title?.rendered)||(0,E.__)("(no title)");const n={params:{postId:e.id,postType:e.type,canvas:"edit"}};return e.type===kt&&(n.state={backPath:"/wp_template_part/all"}),(0,l.createElement)(wt,{...n},(0,en.decodeEntities)(e.title?.rendered)||(0,E.__)("(no title)"))}function yx({item:e,viewType:t}){const{text:n,icon:r,imageUrl:a}=Bs(e.type,e.id),s=t!==Lt;return(0,l.createElement)(b.__experimentalHStack,{alignment:"left",spacing:1},s&&a&&(0,l.createElement)(zs,{imageUrl:a}),s&&!a&&(0,l.createElement)("div",{className:"edit-site-list-added-by__icon"},(0,l.createElement)(b.Icon,{icon:r})),(0,l.createElement)("span",null,n))}function vx({item:e,viewType:t}){const n=BS(),[r="white"]=lx("color.background"),a=(0,g.useMemo)((()=>(0,u.parse)(e.content.raw)),[e.content.raw]),{onClick:s}=Et({postId:e.id,postType:e.type,canvas:"edit"}),i=!a?.length;return(0,l.createElement)(ox,{settings:n},(0,l.createElement)("div",{className:`page-templates-preview-field is-viewtype-${t}`,style:{backgroundColor:r}},t===Lt&&!i&&(0,l.createElement)(fe.BlockPreview,{blocks:a}),t!==Lt&&(0,l.createElement)("button",{className:"page-templates-preview-field__button",type:"button",onClick:s,"aria-label":e.title?.rendered||e.title},i&&(e.type===Ct?(0,E.__)("Empty template"):(0,E.__)("Empty template part")),!i&&(0,l.createElement)(fe.BlockPreview,{blocks:a}))))}function _x({postType:e}){const{params:t}=ux(),{activeView:n="all",layout:r}=t,a=(0,g.useMemo)((()=>{const e=window?.__experimentalAdminViews&&null!=r?r:hx.type;return{...hx,type:e,layout:px[e],filters:"all"!==n?[{field:"author",operator:"in",value:n}]:[]}}),[r,n]),[s,i]=(0,g.useState)(a);(0,g.useEffect)((()=>{i((e=>({...e,filters:"all"!==n?[{field:"author",operator:"in",value:n}]:[]})))}),[n]);const{records:o,isResolving:c}=(0,ye.useEntityRecords)("postType",e,{per_page:-1}),u=cx(),d=(0,g.useCallback)((e=>{s?.type===Lt&&u.push({...t,postId:1===e.length?e[0].id:void 0})}),[u,t,s?.type]),p=(0,g.useMemo)((()=>{if(!o)return dx;const e=new Set;return o.forEach((t=>{e.add(t.author_text)})),Array.from(e).map((e=>({value:e,label:e})))}),[o]),h=(0,g.useMemo)((()=>{const t=[{header:(0,E.__)("Preview"),id:"preview",render:({item:e})=>(0,l.createElement)(vx,{item:e,viewType:s.type}),minWidth:120,maxWidth:120,enableSorting:!1},{header:e===Ct?(0,E.__)("Template"):(0,E.__)("Template Part"),id:"title",getValue:({item:e})=>e.title?.rendered,render:({item:e})=>(0,l.createElement)(gx,{item:e,viewType:s.type}),maxWidth:400,enableHiding:!1}];return e===Ct&&t.push({header:(0,E.__)("Description"),id:"description",getValue:({item:e})=>e.description,render:({item:e})=>e.description?(0,l.createElement)("span",{className:"page-templates-description"},(0,en.decodeEntities)(e.description)):s.type===Vt&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.__experimentalText,{variant:"muted","aria-hidden":"true"},"—"),(0,l.createElement)(b.VisuallyHidden,null,(0,E.__)("No description."))),maxWidth:400,minWidth:320,enableSorting:!1}),t.push({header:(0,E.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:({item:e})=>(0,l.createElement)(yx,{viewType:s.type,item:e}),type:Bt,elements:p,width:"1%"}),t}),[e,p,s.type]),{data:f,paginationInfo:y}=(0,g.useMemo)((()=>{if(!o)return{data:dx,paginationInfo:{totalItems:0,totalPages:0}};let e=[...o];if(s.search){const t=fx(s.search);e=e.filter((e=>fx(e.title?.rendered||e.slug).includes(t)||fx(e.description).includes(t)))}return s.filters.length>0&&s.filters.forEach((t=>{"author"===t.field&&t.operator===zt&&t.value?e=e.filter((e=>e.author_text===t.value)):"author"===t.field&&t.operator===Ht&&t.value&&(e=e.filter((e=>e.author_text!==t.value)))})),s.sort&&(e=Ko({data:e,view:s,fields:h,textFields:["title","author"]})),Xo({data:e,view:s})}),[o,s,h]),v=function(){const{revertTemplate:e}=(0,m.useDispatch)(tr),{saveEditedEntityRecord:t}=(0,m.useDispatch)(ye.store),{createSuccessNotice:n,createErrorNotice:r}=(0,m.useDispatch)(ge.store);return(0,g.useMemo)((()=>({id:"reset-template",label:(0,E.__)("Reset"),isPrimary:!0,icon:ba,isEligible:$t,supportsBulk:!0,async callback(a){try{for(const n of a)await e(n,{allowUndo:!1}),await t("postType",n.type,n.id);n(a.length>1?(0,E.sprintf)((0,E.__)("%s items reverted."),a.length):(0,E.sprintf)((0,E.__)('"%s" reverted.'),(0,en.decodeEntities)(a[0].title.rendered)),{type:"snackbar",id:"edit-site-template-reverted"})}catch(e){let t;t=a[0].type===Ct?1===a.length?(0,E.__)("An error occurred while reverting the template."):(0,E.__)("An error occurred while reverting the templates."):1===a.length?(0,E.__)("An error occurred while reverting the template part."):(0,E.__)("An error occurred while reverting the template parts.");const n=e.message&&"unknown_error"!==e.code?e.message:t;r(n,{type:"snackbar"})}}})),[r,n,e,t])}(),_=(0,g.useMemo)((()=>[v,rx,ax,fS]),[v]),w=(0,g.useCallback)((e=>{e.type!==s.type&&(e={...e,layout:{...px[e.type]}},u.push({...t,layout:e.type})),i(e)}),[s.type,i,u,t]);return(0,l.createElement)(dS,{className:"edit-site-page-template-template-parts-dataviews",title:e===Ct?(0,E.__)("Templates"):(0,E.__)("Template Parts"),actions:e===Ct?(0,l.createElement)(Is,{templateType:e,showIcon:!1,toggleProps:{variant:"primary"}}):(0,l.createElement)(ix,null)},(0,l.createElement)(cS,{paginationInfo:y,fields:h,actions:_,data:f,isLoading:c,view:s,onChangeView:w,onSelectionChange:d,deferredRendering:!s.hiddenFields?.includes("preview"),supportedLayouts:mx}))}const{useLocation:bx}=Xe(gt.privateApis);const{useCommands:Ex}=Xe(ar.privateApis),{useCommandContext:wx}=Xe(rr.privateApis),{useGlobalStyle:Sx}=Xe(fe.privateApis),xx=.5;function Cx(){Bi(),function(){const e=yu(),{params:t}=gu(),n=(0,m.useSelect)((e=>Xe(e(tr)).getCanvasMode()),[]),{setCanvasMode:r}=Xe((0,m.useDispatch)(tr)),a=(0,g.useRef)(n),{canvas:s}=t,i=(0,g.useRef)(s),o=(0,g.useRef)(t);(0,g.useEffect)((()=>{o.current=t}),[t]),(0,g.useEffect)((()=>{a.current=n,"init"!==n&&("edit"===n&&i.current!==n&&e.push({...o.current,canvas:"edit"}),"view"===n&&void 0!==i.current&&e.push({...o.current,canvas:void 0}))}),[n,e]),(0,g.useEffect)((()=>{i.current=s,"edit"!==s&&"view"!==a.current?r("view"):"edit"===s&&"edit"!==a.current&&r("edit")}),[s,r])}(),Ex(),(0,rr.useCommandLoader)({name:"core/exit-code-editor",hook:ed,context:"site-editor-edit"}),(0,rr.useCommandLoader)({name:"core/edit-site/page-content-focus",hook:$u,context:"site-editor-edit"}),(0,rr.useCommandLoader)({name:"core/edit-site/manipulate-document",hook:td}),(0,rr.useCommandLoader)({name:"core/edit-site/patterns",hook:rd,context:"site-editor-edit"}),(0,rr.useCommandLoader)({name:"core/edit-site/edit-ui",hook:nd}),function(){const e=(0,m.useSelect)((e=>{const{getUnstableBase:t}=e(ye.store);return t()?.home}),[]);(0,rr.useCommand)({name:"core/edit-site/view-site",label:(0,E.__)("View site"),callback:({close:t})=>{t(),window.open(e,"_blank")},icon:Ic}),(0,rr.useCommandLoader)({name:"core/edit-site/open-styles",hook:Fu}),(0,rr.useCommandLoader)({name:"core/edit-site/toggle-styles-welcome-guide",hook:Ru}),(0,rr.useCommandLoader)({name:"core/edit-site/reset-global-styles",hook:Du}),(0,rr.useCommandLoader)({name:"core/edit-site/open-styles-css",hook:Vu}),(0,rr.useCommandLoader)({name:"core/edit-site/open-styles-revisions",hook:Lu})}(),(0,fe.useBlockCommands)();const e=(0,ie.useViewportMatch)("medium","<"),{isDistractionFree:t,hasFixedToolbar:n,hasBlockSelected:r,canvasMode:a,previousShortcut:s,nextShortcut:i}=(0,m.useSelect)((e=>{const{getAllShortcutKeyCombinations:t}=e(nr.store),{getCanvasMode:n}=Xe(e(tr));return{canvasMode:n(),previousShortcut:t("core/edit-site/previous-region"),nextShortcut:t("core/edit-site/next-region"),hasFixedToolbar:e(T.store).get("core","fixedToolbar"),isDistractionFree:e(T.store).get("core","distractionFree"),hasBlockSelected:e(fe.store).getBlockSelectionStart()}}),[]),o=(0,b.__unstableUseNavigateRegions)({previous:s,next:i}),c=(0,ie.useReducedMotion)(),[u,d]=(0,ie.useResizeObserver)(),[p]=(0,ie.useResizeObserver)(),h=sd(),[f,y]=(0,g.useState)(!1),{areas:v,widths:w}=function(){const e=sd(),{params:t}=bx(),{postType:n,postId:r,path:a,layout:s,isCustom:i,canvas:o}=null!=t?t:{};if("/page"===a)return{areas:{content:void 0,preview:(0,l.createElement)(l_,{isLoading:e}),mobile:"edit"===o?(0,l.createElement)(l_,{isLoading:e}):void 0},widths:{content:void 0}};const c="true"!==i&&"list"===s&&window?.__experimentalAdminViews;return"/pages"===a?{areas:{content:(0,l.createElement)(xS,null),preview:c&&(0,l.createElement)(l_,{isLoading:e})},widths:{content:c?380:void 0}}:n&&r?{areas:{preview:(0,l.createElement)(l_,{isLoading:e}),mobile:"edit"===o?(0,l.createElement)(l_,{isLoading:e}):void 0}}:"/wp_template/all"===a?{areas:{content:(0,l.createElement)(_x,{postType:Ct}),preview:c&&(0,l.createElement)(l_,{isLoading:e}),mobile:(0,l.createElement)(_x,{postType:Ct})},widths:{content:c?380:void 0}}:"/wp_template_part/all"===a?{areas:{content:(0,l.createElement)(_x,{postType:kt}),preview:c&&(0,l.createElement)(l_,{isLoading:e}),mobile:(0,l.createElement)(_x,{postType:kt})},widths:{content:c?380:void 0}}:"/patterns"===a?{areas:{content:(0,l.createElement)(nx,null),mobile:(0,l.createElement)(nx,null)}}:{areas:{preview:(0,l.createElement)(l_,{isLoading:e}),mobile:"edit"===o?(0,l.createElement)(l_,{isLoading:e}):void 0}}}();let S;S="view"===a?"view":t?"isDistractionFree":a;let x="site-editor";"edit"===a&&(x="site-editor-edit"),r&&(x="block-selection-edit"),wx(x);const[C]=Sx("color.background"),[k]=Sx("color.gradient");return"init"===a?null:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(rr.CommandMenu,null),(0,l.createElement)(xu,null),(0,l.createElement)(Cu,null),p,(0,l.createElement)("div",{...o,ref:o.ref,className:_()("edit-site-layout",o.className,{"is-distraction-free":t&&"edit"===a,"is-full-canvas":"edit"===a,"has-fixed-toolbar":n,"is-block-toolbar-visible":r})},(0,l.createElement)(b.__unstableMotion.div,{className:"edit-site-layout__header-container",variants:{isDistractionFree:{opacity:0,transition:{type:"tween",delay:.8,delayChildren:.8}},isDistractionFreeHovering:{opacity:1,transition:{type:"tween",delay:.2,delayChildren:.2}},view:{opacity:1},edit:{opacity:1}},whileHover:t?"isDistractionFreeHovering":void 0,animate:S},(0,l.createElement)(lu,{isTransparent:f,className:"edit-site-layout__hub"}),(0,l.createElement)(b.__unstableAnimatePresence,{initial:!1},"edit"===a&&(0,l.createElement)(oe,{key:"header",className:"edit-site-layout__header",ariaLabel:(0,E.__)("Editor top bar"),as:b.__unstableMotion.div,variants:{isDistractionFree:{opacity:0,y:0},isDistractionFreeHovering:{opacity:1,y:0},view:{opacity:1,y:"-100%"},edit:{opacity:1,y:0}},exit:{y:"-100%"},initial:{opacity:t?1:0,y:t?0:"-100%"},transition:{type:"tween",duration:c?0:.2,ease:"easeOut"}},(0,l.createElement)(au,null)))),(0,l.createElement)("div",{className:"edit-site-layout__content"},(!e||e&&!v.mobile)&&(0,l.createElement)(oe,{ariaLabel:(0,E.__)("Navigation"),className:"edit-site-layout__sidebar-region"},(0,l.createElement)(b.__unstableAnimatePresence,null,"view"===a&&(0,l.createElement)(b.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{type:"tween",duration:c||e?0:xx,ease:"easeOut"},className:"edit-site-layout__sidebar"},(0,l.createElement)(Sc,null)))),(0,l.createElement)(Su,null),e&&v.mobile&&(0,l.createElement)("div",{className:"edit-site-layout__mobile",style:{maxWidth:w?.content}},v.mobile),!e&&v.content&&"edit"!==a&&(0,l.createElement)("div",{className:"edit-site-layout__area",style:{maxWidth:w?.content}},v.content),!e&&v.preview&&(0,l.createElement)("div",{className:"edit-site-layout__canvas-container"},u,!!d.width&&(0,l.createElement)(b.__unstableMotion.div,{whileHover:"view"===a?{scale:1.005,transition:{duration:c?0:.5,ease:"easeOut"}}:{},initial:!1,layout:"position",className:_()("edit-site-layout__canvas",{"is-right-aligned":f}),transition:{type:"tween",duration:c?0:xx,ease:"easeOut"}},(0,l.createElement)(kc,null,(0,l.createElement)(fu,{isReady:!h,isFullWidth:"edit"===a,defaultSize:{width:d.width-24,height:d.height},isOversized:f,setIsOversized:y,innerContentStyle:{background:null!=k?k:C}},v.preview)))))))}const{RouterProvider:kx}=Xe(gt.privateApis);function Tx(){const{createErrorNotice:e}=(0,m.useDispatch)(ge.store);return(0,l.createElement)(b.SlotFillProvider,null,(0,l.createElement)(Ar,null,(0,l.createElement)(y.UnsavedChangesWarning,null),(0,l.createElement)(kx,null,(0,l.createElement)(Cx,null),(0,l.createElement)(Z.PluginArea,{onError:function(t){e((0,E.sprintf)((0,E.__)('The "%s" plugin has encountered an error and cannot be rendered.'),t))}}))))}function Px({className:e,...t}){return(0,l.createElement)(se,{panelClassName:e,className:"edit-site-sidebar-edit-mode",scope:"core/edit-site",...t})}function Ix(e){return(0,l.createElement)(ee,{__unstableExplicitMenuItem:!0,scope:"core/edit-site",...e})}const Mx=(0,ie.compose)((0,Z.withPluginContext)(((e,t)=>{var n;return{as:null!==(n=t.as)&&void 0!==n?n:b.MenuItem,icon:t.icon||e.icon,name:"core/edit-site/plugin-more-menu"}})))(Q);function Ax(e,t){const n=document.getElementById(e),r=(0,g.createRoot)(n);(0,m.dispatch)(u.store).reapplyBlockTypeFilters();const a=(0,d.__experimentalGetCoreBlocks)().filter((({name:e})=>"core/freeform"!==e));return(0,d.registerCoreBlocks)(a),(0,m.dispatch)(u.store).setFreeformFallbackBlockName("core/html"),(0,me.registerLegacyWidgetBlock)({inserter:!1}),(0,me.registerWidgetGroupBlock)({inserter:!1}),(0,m.dispatch)(T.store).setDefaults("core/edit-site",{welcomeGuide:!0,welcomeGuideStyles:!0,welcomeGuidePage:!0,welcomeGuideTemplate:!0}),(0,m.dispatch)(T.store).setDefaults("core",{allowRightClickOverrides:!0,distractionFree:!1,editorMode:"visual",fixedToolbar:!1,focusMode:!1,inactivePanels:[],keepCaretInsideBlock:!1,openPanels:["post-status"],showBlockBreadcrumbs:!0,showListViewByDefault:!1}),(0,m.dispatch)(j).setDefaultComplementaryArea("core/edit-site","edit-site/template"),(0,m.dispatch)(tr).updateSettings(t),(0,m.dispatch)(y.store).updateEditorSettings({defaultTemplateTypes:t.defaultTemplateTypes,defaultTemplatePartAreas:t.defaultTemplatePartAreas}),window.addEventListener("dragover",(e=>e.preventDefault()),!1),window.addEventListener("drop",(e=>e.preventDefault()),!1),r.render((0,l.createElement)(Tx,null)),r}function Ox(){f()("wp.editSite.reinitializeEditor",{since:"6.2",version:"6.3"})}})(),(window.wp=window.wp||{}).editSite=s})(); \ No newline at end of file
+function Cr(e){return"[object Object]"===Object.prototype.toString.call(e)}function kr(e){var t,n;return!1!==Cr(e)&&(void 0===(t=e.constructor)||!1!==Cr(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}const{GlobalStylesContext:Tr,cleanEmptyObject:Pr}=Xe(fe.privateApis);function Ir(e,t){return xr()(e,t,{isMergeableObject:kr})}function Mr(){const[e,t,n]=function(){const{globalStylesId:e,isReady:t,settings:n,styles:r}=(0,m.useSelect)((e=>{const{getEditedEntityRecord:t,hasFinishedResolution:n}=e(ye.store),r=e(ye.store).__experimentalGetCurrentGlobalStylesId(),a=r?t("root","globalStyles",r):void 0;let s=!1;return n("__experimentalGetCurrentGlobalStylesId")&&(s=!r||n("getEditedEntityRecord",["root","globalStyles",r])),{globalStylesId:r,isReady:s,settings:a?.settings,styles:a?.styles}}),[]),{getEditedEntityRecord:a}=(0,m.useSelect)(ye.store),{editEntityRecord:s}=(0,m.useDispatch)(ye.store);return[t,(0,g.useMemo)((()=>({settings:null!=n?n:{},styles:null!=r?r:{}})),[n,r]),(0,g.useCallback)(((t,n={})=>{var r,i;const o=a("root","globalStyles",e),l=t({styles:null!==(r=o?.styles)&&void 0!==r?r:{},settings:null!==(i=o?.settings)&&void 0!==i?i:{}});s("root","globalStyles",e,{styles:Pr(l.styles)||{},settings:Pr(l.settings)||{}},n)}),[e])]}(),[r,a]=function(){const e=(0,m.useSelect)((e=>e(ye.store).__experimentalGetCurrentThemeBaseGlobalStyles()),[]);return[!!e,e]}(),s=(0,g.useMemo)((()=>a&&t?Ir(a,t):{}),[t,a]);return(0,g.useMemo)((()=>({isReady:e&&r,user:t,base:a,merged:s,setUserConfig:n})),[s,t,a,n,e,r])}function Ar({children:e}){const t=Mr();return t.isReady?(0,l.createElement)(Tr.Provider,{value:t},e):null}const{useGlobalStyle:Or,useGlobalStylesOutput:Nr}=Xe(fe.privateApis),Fr={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},Rr={hover:{opacity:1},start:{opacity:.5}},Dr={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}},Vr={leading:!0,trailing:!0},Lr=({label:e,isFocused:t,withHoverView:n})=>{const[r]=Or("typography.fontWeight"),[a="serif"]=Or("typography.fontFamily"),[s=a]=Or("elements.h1.typography.fontFamily"),[i=r]=Or("elements.h1.typography.fontWeight"),[o="black"]=Or("color.text"),[c=o]=Or("elements.h1.color.text"),[u="white"]=Or("color.background"),[d]=Or("color.gradient"),[m]=Nr(),p=(0,ie.useReducedMotion)(),[h,f]=(0,g.useState)(!1),[y,{width:v}]=(0,ie.useResizeObserver)(),[b,E]=(0,g.useState)(v),[w,S]=(0,g.useState)(),x=(0,ie.useThrottle)(E,250,Vr);(0,g.useLayoutEffect)((()=>{v&&x(v)}),[v,x]),(0,g.useLayoutEffect)((()=>{const e=b?b/248:1,t=e-(w||0);!(Math.abs(t)>.1)&&w||S(e)}),[b,w]);const C=w||(v?v/248:1),{paletteColors:k,highlightedColors:T}=$e(),P=(0,g.useMemo)((()=>m?[...m,{css:"html{overflow:hidden}body{min-width: 0;padding: 0;border: none;}",isGlobalStyles:!0}]:m),[m]),I=!!v;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{style:{position:"relative"}},y),I&&(0,l.createElement)(fe.__unstableIframe,{className:"edit-site-global-styles-preview__iframe",style:{width:"100%",height:152*C},onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),tabIndex:-1},(0,l.createElement)(fe.__unstableEditorStyles,{styles:P}),(0,l.createElement)(_.__unstableMotion.div,{style:{height:152*C,width:"100%",background:null!=d?d:u,cursor:n?"pointer":void 0},initial:"start",animate:(h||t)&&!p&&e?"hover":"start"},(0,l.createElement)(_.__unstableMotion.div,{variants:Fr,style:{height:"100%",overflow:"hidden"}},(0,l.createElement)(_.__experimentalHStack,{spacing:10*C,justify:"center",style:{height:"100%",overflow:"hidden"}},(0,l.createElement)(_.__unstableMotion.div,{style:{fontFamily:s,fontSize:65*C,color:c,fontWeight:i},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"}},"Aa"),(0,l.createElement)(_.__experimentalVStack,{spacing:4*C},T.map((({slug:e,color:t},n)=>(0,l.createElement)(_.__unstableMotion.div,{key:e,style:{height:32*C,width:32*C,background:t,borderRadius:32*C/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:1===n?.2:.1}})))))),(0,l.createElement)(_.__unstableMotion.div,{variants:n&&Rr,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1}},(0,l.createElement)(_.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"}},k.slice(0,4).map((({color:e},t)=>(0,l.createElement)("div",{key:t,style:{height:"100%",background:e,flexGrow:1}}))))),(0,l.createElement)(_.__unstableMotion.div,{variants:Dr,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0}},(0,l.createElement)(_.__experimentalVStack,{spacing:3*C,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*C,boxSizing:"border-box"}},e&&(0,l.createElement)("div",{style:{fontSize:40*C,fontFamily:s,color:c,fontWeight:i,lineHeight:"1em",textAlign:"center"}},e))))))},{GlobalStylesContext:Br,areGlobalStyleConfigsEqual:zr}=Xe(fe.privateApis);function Hr({variation:e}){const[t,n]=(0,g.useState)(!1),{base:r,user:a,setUserConfig:s}=(0,g.useContext)(Br),i=(0,g.useMemo)((()=>{var t,n;return{user:{settings:null!==(t=e.settings)&&void 0!==t?t:{},styles:null!==(n=e.styles)&&void 0!==n?n:{}},base:r,merged:Ir(r,e),setUserConfig:()=>{}}}),[e,r]),o=()=>{s((()=>({settings:e.settings,styles:e.styles})))},c=(0,g.useMemo)((()=>zr(a,e)),[a,e]);let u=e?.title;return e?.description&&(u=(0,E.sprintf)((0,E.__)("%1$s (%2$s)"),e?.title,e?.description)),(0,l.createElement)(Br.Provider,{value:i},(0,l.createElement)("div",{className:b()("edit-site-global-styles-variations_item",{"is-active":c}),role:"button",onClick:o,onKeyDown:e=>{e.keyCode===wr.ENTER&&(e.preventDefault(),o())},tabIndex:"0","aria-label":u,"aria-current":c,onFocus:()=>n(!0),onBlur:()=>n(!1)},(0,l.createElement)("div",{className:"edit-site-global-styles-variations_item-preview"},(0,l.createElement)(Lr,{label:e?.title,isFocused:t,withHoverView:!0}))))}function Gr(){const e=(0,m.useSelect)((e=>e(ye.store).__experimentalGetCurrentThemeGlobalStylesVariations()),[]),t=(0,g.useMemo)((()=>[{title:(0,E.__)("Default"),settings:{},styles:{}},...(null!=e?e:[]).map((e=>{var t,n;return{...e,settings:null!==(t=e.settings)&&void 0!==t?t:{},styles:null!==(n=e.styles)&&void 0!==n?n:{}}}))]),[e]);return(0,l.createElement)(_.__experimentalGrid,{columns:2,className:"edit-site-global-styles-style-variations-container"},t.map(((e,t)=>(0,l.createElement)(Hr,{key:t,variation:e}))))}const Ur=20;function Wr({variation:e="default",direction:t,resizeWidthBy:n}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("button",{className:`resizable-editor__drag-handle is-${t} is-variation-${e}`,"aria-label":(0,E.__)("Drag to resize"),"aria-describedby":`resizable-editor__resize-help-${t}`,onKeyDown:function(e){const{keyCode:r}=e;"left"===t&&r===wr.LEFT||"right"===t&&r===wr.RIGHT?n(Ur):("left"===t&&r===wr.RIGHT||"right"===t&&r===wr.LEFT)&&n(-Ur)},type:"button"}),(0,l.createElement)(_.VisuallyHidden,{id:`resizable-editor__resize-help-${t}`},(0,E.__)("Use left and right arrow keys to resize the canvas.")))}const jr={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0};const Zr=function({enableResizing:e,height:t,children:n}){const[r,a]=(0,g.useState)("100%"),s=(0,g.useRef)(),i=(0,g.useCallback)((e=>{s.current&&a(s.current.offsetWidth+e)}),[]);return(0,l.createElement)(_.ResizableBox,{ref:e=>{s.current=e?.resizable},size:{width:e?r:"100%",height:e&&t?t:"100%"},onResizeStop:(e,t,n)=>{a(n.style.width)},minWidth:300,maxWidth:"100%",maxHeight:"100%",enable:{left:e,right:e},showHandle:e,resizeRatio:2,handleComponent:{left:(0,l.createElement)(Wr,{direction:"left",resizeWidthBy:i}),right:(0,l.createElement)(Wr,{direction:"right",resizeWidthBy:i})},handleClasses:void 0,handleStyles:{left:jr,right:jr}},n)};function qr(e){switch(e){case"style-book":return(0,E.__)("Style Book");case"global-styles-revisions":case"global-styles-revisions:style-book":return(0,E.__)("Style Revisions");default:return""}}const{createPrivateSlotFill:Yr}=Xe(_.privateApis),{privateKey:Kr,Slot:Xr,Fill:Jr}=Yr("EditSiteEditorCanvasContainerSlot");function Qr({children:e,closeButtonLabel:t,onClose:n,enableResizing:r=!1}){const{editorCanvasContainerView:a,showListViewByDefault:s}=(0,m.useSelect)((e=>({editorCanvasContainerView:Xe(e(tr)).getEditorCanvasContainerView(),showListViewByDefault:e(T.store).get("core","showListViewByDefault")})),[]),[i,o]=(0,g.useState)(!1),{setEditorCanvasContainerView:c}=Xe((0,m.useDispatch)(tr)),{setIsListViewOpened:u}=(0,m.useDispatch)(y.store),d=(0,ie.useFocusOnMount)("firstElement"),p=(0,ie.useFocusReturn)(),h=(0,g.useMemo)((()=>qr(a)),[a]);function f(){u(s),c(void 0),o(!0),"function"==typeof n&&n()}const v=Array.isArray(e)?g.Children.map(e,((e,t)=>0===t?(0,g.cloneElement)(e,{ref:p}):e)):(0,g.cloneElement)(e,{ref:p});if(i)return null;const b=n||t;return(0,l.createElement)(Jr,null,(0,l.createElement)(Zr,{enableResizing:r},(0,l.createElement)("section",{className:"edit-site-editor-canvas-container",ref:b?d:null,onKeyDown:function(e){e.keyCode!==wr.ESCAPE||e.defaultPrevented||(e.preventDefault(),f())},"aria-label":h},b&&(0,l.createElement)(_.Button,{className:"edit-site-editor-canvas-container__close-button",icon:P,label:t||(0,E.__)("Close"),onClick:f,showTooltip:!1}),v)))}Qr.Slot=Xr;const $r=Qr,{ExperimentalBlockEditorProvider:ea,useGlobalStyle:ta,GlobalStylesContext:na,useGlobalStylesOutputWithConfig:ra}=Xe(fe.privateApis),{CompositeV2:aa,CompositeItemV2:sa,useCompositeStoreV2:ia,Tabs:oa}=Xe(_.privateApis);function la(e){return!e||0===Object.keys(e).length}function ca(){return[{name:"core/heading",title:(0,E.__)("Headings"),category:"text",blocks:[(0,u.createBlock)("core/heading",{content:(0,E.__)("Code Is Poetry"),level:1}),(0,u.createBlock)("core/heading",{content:(0,E.__)("Code Is Poetry"),level:2}),(0,u.createBlock)("core/heading",{content:(0,E.__)("Code Is Poetry"),level:3}),(0,u.createBlock)("core/heading",{content:(0,E.__)("Code Is Poetry"),level:4}),(0,u.createBlock)("core/heading",{content:(0,E.__)("Code Is Poetry"),level:5})]},...(0,u.getBlockTypes)().filter((e=>{const{name:t,example:n,supports:r}=e;return"core/heading"!==t&&!!n&&!1!==r.inserter})).map((e=>({name:e.name,title:e.title,category:e.category,blocks:(0,u.getBlockFromExample)(e.name,e.example)})))]}const ua=({category:e,examples:t,isSelected:n,onClick:r,onSelect:a,settings:s,sizes:i,title:o})=>{const[c,u]=(0,g.useState)(!1),d={role:"button",onFocus:()=>u(!0),onBlur:()=>u(!1),onKeyDown:e=>{if(e.defaultPrevented)return;const{keyCode:t}=e;!r||t!==wr.ENTER&&t!==wr.SPACE||(e.preventDefault(),r(e))},onClick:e=>{e.defaultPrevented||r&&(e.preventDefault(),r(e))},readonly:!0},m=r?"body { cursor: pointer; } body * { pointer-events: none; }":"";return(0,l.createElement)(fe.__unstableIframe,{className:b()("edit-site-style-book__iframe",{"is-focused":c&&!!r,"is-button":!!r}),name:"style-book-canvas",tabIndex:0,...r?d:{}},(0,l.createElement)(fe.__unstableEditorStyles,{styles:s.styles}),(0,l.createElement)("style",null,'.is-root-container { display: flow-root; }\n\t\t\t\t\t\tbody { position: relative; padding: 32px !important; }\n\t.edit-site-style-book__examples {\n\t\tmax-width: 900px;\n\t\tmargin: 0 auto;\n\t}\n\n\t.edit-site-style-book__example {\n\t\tborder-radius: 2px;\n\t\tcursor: pointer;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 40px;\n\t\tmargin-bottom: 40px;\n\t\tpadding: 16px;\n\t\twidth: 100%;\n\t\tbox-sizing: border-box;\n\t\tscroll-margin-top: 32px;\n\t\tscroll-margin-bottom: 32px;\n\t}\n\n\t.edit-site-style-book__example.is-selected {\n\t\tbox-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t}\n\n\t.edit-site-style-book__example:focus:not(:disabled) {\n\t\tbox-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t\toutline: 3px solid transparent;\n\t}\n\n\t.edit-site-style-book__examples.is-wide .edit-site-style-book__example {\n\t\tflex-direction: row;\n\t}\n\n\t.edit-site-style-book__example-title {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\tfont-size: 11px;\n\t\tfont-weight: 500;\n\t\tline-height: normal;\n\t\tmargin: 0;\n\t\ttext-align: left;\n\t\ttext-transform: uppercase;\n\t}\n\n\t.edit-site-style-book__examples.is-wide .edit-site-style-book__example-title {\n\t\ttext-align: right;\n\t\twidth: 120px;\n\t}\n\n\t.edit-site-style-book__example-preview {\n\t\twidth: 100%;\n\t}\n\n\t.edit-site-style-book__example-preview .block-editor-block-list__insertion-point,\n\t.edit-site-style-book__example-preview .block-list-appender {\n\t\tdisplay: none;\n\t}\n\n\t.edit-site-style-book__example-preview .is-root-container > .wp-block:first-child {\n\t\tmargin-top: 0;\n\t}\n\t.edit-site-style-book__example-preview .is-root-container > .wp-block:last-child {\n\t\tmargin-bottom: 0;\n\t}\n'+m),(0,l.createElement)(da,{className:b()("edit-site-style-book__examples",{"is-wide":i.width>600}),examples:t,category:e,label:o?(0,E.sprintf)((0,E.__)("Examples of blocks in the %s category"),o):(0,E.__)("Examples of blocks"),isSelected:n,onSelect:a,key:e}))},da=(0,g.memo)((({className:e,examples:t,category:n,label:r,isSelected:a,onSelect:s})=>{const i=ia({orientation:"vertical"});return(0,l.createElement)(aa,{store:i,className:e,"aria-label":r,role:"grid"},t.filter((e=>!n||e.category===n)).map((e=>(0,l.createElement)(ma,{key:e.name,id:`example-${e.name}`,title:e.title,blocks:e.blocks,isSelected:a(e.name),onClick:()=>{s?.(e.name)}}))))})),ma=({id:e,title:t,blocks:n,isSelected:r,onClick:a})=>{const s=(0,m.useSelect)((e=>e(fe.store).getSettings()),[]),i=(0,g.useMemo)((()=>({...s,focusMode:!1,__unstableIsPreviewMode:!0})),[s]),o=(0,g.useMemo)((()=>Array.isArray(n)?n:[n]),[n]);return(0,l.createElement)("div",{role:"row"},(0,l.createElement)("div",{role:"gridcell"},(0,l.createElement)(sa,{className:b()("edit-site-style-book__example",{"is-selected":r}),id:e,"aria-label":(0,E.sprintf)((0,E.__)("Open %s styles in Styles panel"),t),render:(0,l.createElement)("div",null),role:"button",onClick:a},(0,l.createElement)("span",{className:"edit-site-style-book__example-title"},t),(0,l.createElement)("div",{className:"edit-site-style-book__example-preview","aria-hidden":!0},(0,l.createElement)(_.Disabled,{className:"edit-site-style-book__example-preview__content"},(0,l.createElement)(ea,{value:o,settings:i},(0,l.createElement)(fe.BlockList,{renderAppender:!1})))))))},pa=function({enableResizing:e=!0,isSelected:t,onClick:n,onSelect:r,showCloseButton:a=!0,onClose:s,showTabs:i=!0,userConfig:o={}}){const[c,d]=(0,ie.useResizeObserver)(),[p]=ta("color.text"),[h]=ta("color.background"),f=(0,g.useMemo)(ca,[]),y=(0,g.useMemo)((()=>(0,u.getCategories)().filter((e=>f.some((t=>t.category===e.slug)))).map((e=>({name:e.slug,title:e.title,icon:e.icon})))),[f]),{base:v}=(0,g.useContext)(na),_=(0,g.useMemo)((()=>la(o)||la(v)?{}:Ir(v,o)),[v,o]),w=(0,m.useSelect)((e=>e(fe.store).getSettings()),[]),S=(0,g.useMemo)((()=>({...w,__unstableIsPreviewMode:!0})),[w]),[x]=ra(_);return S.styles=la(x)||la(o)?S.styles:x,(0,l.createElement)($r,{onClose:s,enableResizing:e,closeButtonLabel:a?(0,E.__)("Close Style Book"):null},(0,l.createElement)("div",{className:b()("edit-site-style-book",{"is-wide":d.width>600,"is-button":!!n}),style:{color:p,background:h}},c,i?(0,l.createElement)("div",{className:"edit-site-style-book__tabs"},(0,l.createElement)(oa,null,(0,l.createElement)(oa.TabList,null,y.map((e=>(0,l.createElement)(oa.Tab,{tabId:e.name,key:e.name},e.title)))),y.map((e=>(0,l.createElement)(oa.TabPanel,{key:e.name,tabId:e.name,focusable:!1},(0,l.createElement)(ua,{category:e.name,examples:f,isSelected:t,onSelect:r,settings:S,sizes:d,title:e.title})))))):(0,l.createElement)(ua,{examples:f,isSelected:t,onClick:n,onSelect:r,settings:S,sizes:d})))},ha={per_page:-1,_fields:"id,name,avatar_urls",context:"view",capabilities:["edit_theme_options"]},fa={per_page:100,page:1},ga=[],{GlobalStylesContext:ya}=Xe(fe.privateApis);function va({query:e}={}){const{user:t}=(0,g.useContext)(ya),n={...fa,...e},{authors:r,currentUser:a,isDirty:s,revisions:i,isLoadingGlobalStylesRevisions:o,revisionsCount:l}=(0,m.useSelect)((e=>{var t;const{__experimentalGetDirtyEntityRecords:r,getCurrentUser:a,getUsers:s,getRevisions:i,__experimentalGetCurrentGlobalStylesId:o,getEntityRecord:l,isResolving:c}=e(ye.store),u=r(),d=a(),m=u.length>0,p=o(),h=p?l("root","globalStyles",p):void 0,f=null!==(t=h?._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0,g=i("root","globalStyles",p,n)||ga;return{authors:s(ha)||ga,currentUser:d,isDirty:m,revisions:g,isLoadingGlobalStylesRevisions:c("getRevisions",["root","globalStyles",p,n]),revisionsCount:f}}),[e]);return(0,g.useMemo)((()=>{if(!r.length||o)return{revisions:ga,hasUnsavedChanges:s,isLoading:!0,revisionsCount:l};const e=i.map((e=>({...e,author:r.find((t=>t.id===e.author))})));if(i.length){if("unsaved"!==e[0].id&&1===n.page&&(e[0].isLatest=!0),s&&t&&Object.keys(t).length>0&&a&&1===n.page){const n={id:"unsaved",styles:t?.styles,settings:t?.settings,author:{name:a?.name,avatar_urls:a?.avatar_urls},modified:new Date};e.unshift(n)}n.page===Math.ceil(l/n.per_page)&&e.push({id:"parent",styles:{},settings:{}})}return{revisions:e,hasUnsavedChanges:s,isLoading:!1,revisionsCount:l}}),[s,i,a,r,t,o])}const ba=window.wp.date,_a=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"}));function Ea({children:e}){return(0,l.createElement)(_.__experimentalText,{className:"edit-site-sidebar-navigation-details-screen-panel__label"},e)}function wa({label:e,children:t,className:n,...r}){return(0,l.createElement)(_.__experimentalHStack,{key:e,spacing:5,alignment:"left",className:b()("edit-site-sidebar-navigation-details-screen-panel__row",n),...r},t)}function Sa({children:e}){return(0,l.createElement)(_.__experimentalText,{className:"edit-site-sidebar-navigation-details-screen-panel__value"},e)}function xa({title:e,children:t,spacing:n}){return(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-sidebar-navigation-details-screen-panel",spacing:n},e&&(0,l.createElement)(_.__experimentalHeading,{className:"edit-site-sidebar-navigation-details-screen-panel__heading",level:2},e),t)}function Ca({record:e,...t}){const n={};return e?._links?.["predecessor-version"]?.[0]?.id&&(n.href=(0,yt.addQueryArgs)("revision.php",{revision:e?._links["predecessor-version"][0].id}),n.as="a"),(0,l.createElement)(_.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-details-footer"},(0,l.createElement)(vr,{"aria-label":(0,E.__)("Revisions"),...n,...t},(0,l.createElement)(wa,{justify:"space-between"},(0,l.createElement)(Ea,null,(0,E.__)("Last modified")),(0,l.createElement)(Sa,null,(0,g.createInterpolateElement)((0,E.sprintf)((0,E.__)("<time>%s</time>"),(0,ba.humanTimeDiff)(e.modified)),{time:(0,l.createElement)("time",{dateTime:e.modified})})),(0,l.createElement)(_.Icon,{className:"edit-site-sidebar-navigation-screen-details-footer__icon",icon:_a}))))}const ka=()=>{};function Ta(e){const{openGeneralSidebar:t}=(0,m.useDispatch)(tr),{setCanvasMode:n}=Xe((0,m.useDispatch)(tr));return(0,m.useSelect)((e=>!!e(ye.store).__experimentalGetCurrentThemeGlobalStylesVariations()?.length),[])?(0,l.createElement)(_.__experimentalNavigatorButton,{...e,as:vr,path:"/wp_global_styles"}):(0,l.createElement)(vr,{...e,onClick:()=>{n("edit"),t("edit-site/global-styles")}})}function Pa(){const{storedSettings:e}=(0,m.useSelect)((e=>{const{getSettings:t}=Xe(e(tr));return{storedSettings:t()}}),[]);return(0,l.createElement)(fe.BlockEditorProvider,{settings:e,onChange:ka,onInput:ka},(0,l.createElement)(Gr,null))}function Ia(){const{revisions:e,isLoading:t}=va(),{openGeneralSidebar:n}=(0,m.useDispatch)(tr),{setIsListViewOpened:r}=(0,m.useDispatch)(y.store),a=(0,ie.useViewportMatch)("medium","<"),{setCanvasMode:s,setEditorCanvasContainerView:i}=Xe((0,m.useDispatch)(tr)),{isViewMode:o,isStyleBookOpened:c,revisionsCount:u}=(0,m.useSelect)((e=>{var t;const{getCanvasMode:n,getEditorCanvasContainerView:r}=Xe(e(tr)),{getEntityRecord:a,__experimentalGetCurrentGlobalStylesId:s}=e(ye.store),i=s(),o=i?a("root","globalStyles",i):void 0;return{isViewMode:"view"===n(),isStyleBookOpened:"style-book"===r(),revisionsCount:null!==(t=o?._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0}}),[]),d=(0,g.useCallback)((async()=>Promise.all([s("edit"),n("edit-site/global-styles")])),[s,n]),p=(0,g.useCallback)((async()=>{await d(),i("style-book"),r(!1)}),[d,i,r]),h=(0,g.useCallback)((async()=>{await d(),i("global-styles-revisions")}),[d,i]),f=u>0,v=e?.[0]?.modified,b=f&&!t&&v;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(hr,{title:(0,E.__)("Styles"),description:(0,E.__)("Choose a different style combination for the theme styles."),content:(0,l.createElement)(Pa,null),footer:b&&(0,l.createElement)(Ca,{record:e?.[0],onClick:h}),actions:(0,l.createElement)(l.Fragment,null,!a&&(0,l.createElement)(mr,{icon:br,label:(0,E.__)("Style Book"),onClick:()=>i(c?void 0:"style-book"),isPressed:c}),(0,l.createElement)(mr,{icon:Er,label:(0,E.__)("Edit styles"),onClick:async()=>await d()}))}),c&&!a&&o&&(0,l.createElement)(pa,{enableResizing:!1,isSelected:()=>!1,onClick:p,onSelect:p,showCloseButton:!1,showTabs:!1}))}const Ma="isTemplatePartMoveHintVisible";function Aa(){const e=(0,m.useSelect)((e=>{var t;return null===(t=e(T.store).get("core",Ma))||void 0===t||t}),[]),{set:t}=(0,m.useDispatch)(T.store);return e?(0,l.createElement)(_.Notice,{politeness:"polite",className:"edit-site-sidebar__notice",onRemove:()=>{t("core",Ma,!1)}},(0,E.__)('Looking for template parts? Find them in "Patterns".')):null}function Oa(){const{location:e}=(0,_.__experimentalUseNavigator)(),{setEditorCanvasContainerView:t}=Xe((0,m.useDispatch)(tr));return(0,g.useEffect)((()=>{"/"===e?.path&&t(void 0)}),[t,e?.path]),(0,l.createElement)(hr,{isRoot:!0,title:(0,E.__)("Design"),description:(0,E.__)("Customize the appearance of your website using the block editor."),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(_.__experimentalNavigatorButton,{as:vr,path:"/navigation",withChevron:!0,icon:sr},(0,E.__)("Navigation")),(0,l.createElement)(Ta,{withChevron:!0,icon:ir},(0,E.__)("Styles")),(0,l.createElement)(_.__experimentalNavigatorButton,{as:vr,path:"/page",withChevron:!0,icon:or},(0,E.__)("Pages")),(0,l.createElement)(_.__experimentalNavigatorButton,{as:vr,path:"/wp_template",withChevron:!0,icon:lr},(0,E.__)("Templates")),(0,l.createElement)(_.__experimentalNavigatorButton,{as:vr,path:"/patterns",withChevron:!0,icon:cr},(0,E.__)("Patterns"))),(0,l.createElement)(Aa,null))})}const Na=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})),Fa=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})),Ra=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.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"})),Da=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"})),Va=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})),La=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v10zm-11-7.6h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-.9 3.5H6.3l1.2-1.7v1.7zm5.6-3.2c-.4-.2-.8-.4-1.2-.4-.5 0-.9.1-1.2.4-.4.2-.6.6-.8 1-.2.4-.3.9-.3 1.5s.1 1.1.3 1.6c.2.4.5.8.8 1 .4.2.8.4 1.2.4.5 0 .9-.1 1.2-.4.4-.2.6-.6.8-1 .2-.4.3-1 .3-1.6 0-.6-.1-1.1-.3-1.5-.1-.5-.4-.8-.8-1zm0 3.6c-.1.3-.3.5-.5.7-.2.1-.4.2-.7.2-.3 0-.5-.1-.7-.2-.2-.1-.4-.4-.5-.7-.1-.3-.2-.7-.2-1.2 0-.7.1-1.2.4-1.5.3-.3.6-.5 1-.5s.7.2 1 .5c.3.3.4.8.4 1.5-.1.5-.1.9-.2 1.2zm5-3.9h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-1 3.5H16l1.2-1.7v1.7z"})),Ba=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"})),za=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.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"})),Ha=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.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"})),Ga=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{fillRule:"evenodd",d:"M8.95 11.25H4v1.5h4.95v4.5H13V18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75h-2.55v-7.5H13V9c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75H8.95v4.5ZM14.5 15v3c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-3c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5Zm0-6V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5Z",clipRule:"evenodd"})),Ua=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.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"})),Wa=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})),ja=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,l.createElement)(w.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})),Za=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})),qa=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.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"})),Ya=(e,t)=>{let n=e;return t.split(".").forEach((e=>{n=n?.[e]})),n},Ka=(e,t)=>(e||[]).map((e=>({...e,name:(0,en.decodeEntities)(Ya(e,t))}))),Xa=()=>(0,m.useSelect)((e=>e(ye.store).getEntityRecords("postType",Ct,{per_page:-1})),[]),Ja=()=>(0,m.useSelect)((e=>e(y.store).__experimentalGetDefaultTemplateTypes()),[]),Qa=()=>{const e=(0,m.useSelect)((e=>e(ye.store).getPostTypes({per_page:-1})),[]);return(0,g.useMemo)((()=>{const t=["attachment"];return e?.filter((({viewable:e,slug:n})=>e&&!t.includes(n)))}),[e])};function $a(e){const t=(0,g.useMemo)((()=>e?.reduce(((e,{labels:t})=>{const n=t.singular_name.toLowerCase();return e[n]=(e[n]||0)+1,e}),{})));return(0,g.useCallback)((({labels:e,slug:n})=>{const r=e.singular_name.toLowerCase();return t[r]>1&&r!==n}),[t])}function es(){const e=Qa(),t=(0,g.useMemo)((()=>e?.filter((e=>e.has_archive))),[e]),n=Xa(),r=$a(t);return(0,g.useMemo)((()=>t?.filter((e=>!(n||[]).some((t=>t.slug==="archive-"+e.slug)))).map((e=>{let t;return t=r(e)?(0,E.sprintf)((0,E.__)("Archive: %1$s (%2$s)"),e.labels.singular_name,e.slug):(0,E.sprintf)((0,E.__)("Archive: %s"),e.labels.singular_name),{slug:"archive-"+e.slug,description:(0,E.sprintf)((0,E.__)("Displays an archive with the latest posts of type: %s."),e.labels.singular_name),title:t,icon:e.icon?.startsWith("dashicons-")?e.icon.slice(10):Da,templatePrefix:"archive"}}))||[]),[t,n,r])}const ts=e=>{const t=Qa(),n=Xa(),r=Ja(),a=$a(t),s=(0,g.useMemo)((()=>t?.reduce(((e,{slug:t})=>{let n=t;return"page"!==t&&(n=`single-${n}`),e[t]=n,e}),{})),[t]),i=is("postType",s),o=(n||[]).map((({slug:e})=>e)),l=(t||[]).reduce(((t,n)=>{const{slug:l,labels:c,icon:u}=n,d=s[l],m=r?.find((({slug:e})=>e===d)),p=o?.includes(d),h=a(n);let f=(0,E.sprintf)((0,E.__)("Single item: %s"),c.singular_name);h&&(f=(0,E.sprintf)((0,E.__)("Single item: %1$s (%2$s)"),c.singular_name,l));const g=m?{...m,templatePrefix:s[l]}:{slug:d,title:f,description:(0,E.sprintf)((0,E.__)("Displays a single item: %s."),c.singular_name),icon:u?.startsWith("dashicons-")?u.slice(10):qa,templatePrefix:s[l]},y=i?.[l]?.hasEntities;return y&&(g.onClick=t=>{e({type:"postType",slug:l,config:{recordNamePath:"title.rendered",queryArgs:({search:e})=>({_fields:"id,title,slug,link",orderBy:e?"relevance":"modified",exclude:i[l].existingEntitiesIds}),getSpecificTemplate:e=>{const t=`${s[l]}-${e.slug}`;return{title:t,slug:t,templatePrefix:s[l]}}},labels:c,hasGeneralTemplate:p,template:t})}),p&&!y||t.push(g),t}),[]),c=(0,g.useMemo)((()=>l.reduce(((e,t)=>{const{slug:n}=t;let r="postTypesMenuItems";return"page"===n&&(r="defaultPostTypesMenuItems"),e[r].push(t),e}),{defaultPostTypesMenuItems:[],postTypesMenuItems:[]})),[l]);return c},ns=e=>{const t=(()=>{const e=(0,m.useSelect)((e=>e(ye.store).getTaxonomies({per_page:-1})),[]);return(0,g.useMemo)((()=>e?.filter((({visibility:e})=>e?.publicly_queryable))),[e])})(),n=Xa(),r=Ja(),a=(0,g.useMemo)((()=>t?.reduce(((e,{slug:t})=>{let n=t;return["category","post_tag"].includes(t)||(n=`taxonomy-${n}`),"post_tag"===t&&(n="tag"),e[t]=n,e}),{})),[t]),s=t?.reduce(((e,{labels:t})=>{const n=t.singular_name.toLowerCase();return e[n]=(e[n]||0)+1,e}),{}),i=is("taxonomy",a),o=(n||[]).map((({slug:e})=>e)),l=(t||[]).reduce(((t,n)=>{const{slug:l,labels:c}=n,u=a[l],d=r?.find((({slug:e})=>e===u)),m=o?.includes(u),p=((e,t)=>{if(["category","post_tag"].includes(t))return!1;const n=e.singular_name.toLowerCase();return s[n]>1&&n!==t})(c,l);let h=c.singular_name;p&&(h=(0,E.sprintf)((0,E.__)("%1$s (%2$s)"),c.singular_name,l));const f=d?{...d,templatePrefix:a[l]}:{slug:u,title:h,description:(0,E.sprintf)((0,E.__)("Displays taxonomy: %s."),c.singular_name),icon:Ga,templatePrefix:a[l]},g=i?.[l]?.hasEntities;return g&&(f.onClick=t=>{e({type:"taxonomy",slug:l,config:{queryArgs:({search:e})=>({_fields:"id,name,slug,link",orderBy:e?"name":"count",exclude:i[l].existingEntitiesIds}),getSpecificTemplate:e=>{const t=`${a[l]}-${e.slug}`;return{title:t,slug:t,templatePrefix:a[l]}}},labels:c,hasGeneralTemplate:m,template:t})}),m&&!g||t.push(f),t}),[]);return(0,g.useMemo)((()=>l.reduce(((e,t)=>{const{slug:n}=t;let r="taxonomiesMenuItems";return["category","tag"].includes(n)&&(r="defaultTaxonomiesMenuItems"),e[r].push(t),e}),{defaultTaxonomiesMenuItems:[],taxonomiesMenuItems:[]})),[l])},rs={user:"author"},as={user:{who:"authors"}};const ss=(e,t,n={})=>{const r=(e=>{const t=Xa();return(0,g.useMemo)((()=>Object.entries(e||{}).reduce(((e,[n,r])=>{const a=(t||[]).reduce(((e,t)=>{const n=`${r}-`;return t.slug.startsWith(n)&&e.push(t.slug.substring(n.length)),e}),[]);return a.length&&(e[n]=a),e}),{})),[e,t])})(t);return(0,m.useSelect)((t=>Object.entries(r||{}).reduce(((r,[a,s])=>{const i=t(ye.store).getEntityRecords(e,a,{_fields:"id",context:"view",slug:s,...n[a]});return i?.length&&(r[a]=i),r}),{})),[r])},is=(e,t,n={})=>{const r=ss(e,t,n);return(0,m.useSelect)((a=>Object.keys(t||{}).reduce(((t,s)=>{const i=r?.[s]?.map((({id:e})=>e))||[];return t[s]={hasEntities:!!a(ye.store).getEntityRecords(e,s,{per_page:1,_fields:"id",context:"view",exclude:i,...n[s]})?.length,existingEntitiesIds:i},t}),{})),[t,r])},{CompositeV2:os,CompositeItemV2:ls,useCompositeStoreV2:cs}=Xe(_.privateApis),us=[];function ds({suggestion:e,search:t,onSelect:n,entityForSuggestions:r}){const a="edit-site-custom-template-modal__suggestions_list__list-item";return(0,l.createElement)(ls,{render:(0,l.createElement)(_.Button,{role:"option",className:a,onClick:()=>n(r.config.getSpecificTemplate(e))})},(0,l.createElement)(_.__experimentalText,{size:"body",lineHeight:1.53846153846,weight:500,className:`${a}__title`},(0,l.createElement)(_.TextHighlight,{text:(0,en.decodeEntities)(e.name),highlight:t})),e.link&&(0,l.createElement)(_.__experimentalText,{size:"body",lineHeight:1.53846153846,className:`${a}__info`},e.link))}function ms({entityForSuggestions:e,onSelect:t}){const n=cs({orientation:"vertical"}),[r,a,s]=(0,ie.useDebouncedInput)(),i=function(e,t){const{config:n}=e,r=(0,g.useMemo)((()=>({order:"asc",context:"view",search:t,per_page:t?20:10,...n.queryArgs(t)})),[t,n]),{records:a,hasResolved:s}=(0,ye.useEntityRecords)(e.type,e.slug,r),[i,o]=(0,g.useState)(us);return(0,g.useEffect)((()=>{if(!s)return;let e=us;a?.length&&(e=a,n.recordNamePath&&(e=Ka(e,n.recordNamePath))),o(e)}),[a,s]),i}(e,s),{labels:o}=e,[c,u]=(0,g.useState)(!1);return!c&&i?.length>9&&u(!0),(0,l.createElement)(l.Fragment,null,c&&(0,l.createElement)(_.SearchControl,{__nextHasNoMarginBottom:!0,onChange:a,value:r,label:o.search_items,placeholder:o.search_items}),!!i?.length&&(0,l.createElement)(os,{store:n,role:"listbox",className:"edit-site-custom-template-modal__suggestions_list","aria-label":(0,E.__)("Suggestions list")},i.map((n=>(0,l.createElement)(ds,{key:n.slug,suggestion:n,search:s,onSelect:t,entityForSuggestions:e})))),s&&!i?.length&&(0,l.createElement)(_.__experimentalText,{as:"p",className:"edit-site-custom-template-modal__no-results"},o.not_found))}const ps=function({onSelect:e,entityForSuggestions:t}){const[n,r]=(0,g.useState)(t.hasGeneralTemplate);return(0,l.createElement)(_.__experimentalVStack,{spacing:4,className:"edit-site-custom-template-modal__contents-wrapper",alignment:"left"},!n&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalText,{as:"p"},(0,E.__)("Select whether to create a single template for all items or a specific one.")),(0,l.createElement)(_.Flex,{className:"edit-site-custom-template-modal__contents",gap:"4",align:"initial"},(0,l.createElement)(_.FlexItem,{isBlock:!0,as:_.Button,onClick:()=>{const{slug:n,title:r,description:a,templatePrefix:s}=t.template;e({slug:n,title:r,description:a,templatePrefix:s})}},(0,l.createElement)(_.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846},t.labels.all_items),(0,l.createElement)(_.__experimentalText,{as:"span",lineHeight:1.53846153846},(0,E.__)("For all items"))),(0,l.createElement)(_.FlexItem,{isBlock:!0,as:_.Button,onClick:()=>{r(!0)}},(0,l.createElement)(_.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846},t.labels.singular_name),(0,l.createElement)(_.__experimentalText,{as:"span",lineHeight:1.53846153846},(0,E.__)("For a specific item"))))),n&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalText,{as:"p"},(0,E.__)("This template will be used only for the specific item chosen.")),(0,l.createElement)(ms,{entityForSuggestions:t,onSelect:e})))};var hs=function(){return hs=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},hs.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function fs(e){return e.toLowerCase()}var gs=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],ys=/[^A-Z0-9]+/gi;function vs(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,r=void 0===n?gs:n,a=t.stripRegexp,s=void 0===a?ys:a,i=t.transform,o=void 0===i?fs:i,l=t.delimiter,c=void 0===l?" ":l,u=bs(bs(e,r,"$1\0$2"),s,"\0"),d=0,m=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(m-1);)m--;return u.slice(d,m).split("\0").map(o).join(c)}function bs(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function _s(e,t){return void 0===t&&(t={}),function(e,t){return void 0===t&&(t={}),vs(e,hs({delimiter:"."},t))}(e,hs({delimiter:"-"},t))}const Es=function({onClose:e,createTemplate:t}){const[n,r]=(0,g.useState)(""),a=(0,E.__)("Custom Template"),[s,i]=(0,g.useState)(!1);return(0,l.createElement)("form",{onSubmit:async function(e){if(e.preventDefault(),!s){i(!0);try{await t({slug:"wp-custom-template-"+_s(n||a),title:n||a},!1)}finally{i(!1)}}}},(0,l.createElement)(_.__experimentalVStack,{spacing:6},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,label:(0,E.__)("Name"),value:n,onChange:r,placeholder:a,disabled:s,help:(0,E.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,l.createElement)(_.__experimentalHStack,{className:"edit-site-custom-generic-template__modal-actions",justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:()=>{e()}},(0,E.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",type:"submit",isBusy:s,"aria-disabled":s},(0,E.__)("Create")))))};function ws(){const e="edit-site-template-actions-loading-screen-modal";return(0,l.createElement)(_.Modal,{isFullScreen:!0,isDismissible:!1,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,onRequestClose:()=>{},__experimentalHideHeader:!0,className:e},(0,l.createElement)("div",{className:`${e}__content`},(0,l.createElement)(_.Spinner,null)))}const{useHistory:Ss}=Xe(gt.privateApis),xs=["front-page","home","single","page","index","archive","author","category","date","tag","search","404"],Cs={"front-page":Na,home:Fa,single:Ra,page:or,archive:Da,search:Va,404:La,index:Ba,category:za,author:Ha,taxonomy:Ga,date:Ua,tag:Wa,attachment:ja};function ks({title:e,direction:t,className:n,description:r,icon:a,onClick:s,children:i}){return(0,l.createElement)(_.Button,{className:n,onClick:s,label:r,showTooltip:!!r},(0,l.createElement)(_.Flex,{as:"span",spacing:2,align:"center",justify:"center",style:{width:"100%"},direction:t},(0,l.createElement)("div",{className:"edit-site-add-new-template__template-icon"},(0,l.createElement)(_.Icon,{icon:a})),(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-add-new-template__template-name",alignment:"center",spacing:0},(0,l.createElement)(_.__experimentalText,{weight:500,lineHeight:1.53846153846},e),i)))}const Ts={templatesList:1,customTemplate:2,customGenericTemplate:3};function Ps({postType:e,toggleProps:t,showIcon:n=!0}){const[r,a]=(0,g.useState)(!1),[s,i]=(0,g.useState)(Ts.templatesList),[o,c]=(0,g.useState)({}),[u,d]=(0,g.useState)(!1),p=Ss(),{saveEntityRecord:h}=(0,m.useDispatch)(ye.store),{createErrorNotice:f,createSuccessNotice:y}=(0,m.useDispatch)(ge.store),{homeUrl:v}=(0,m.useSelect)((e=>{const{getUnstableBase:t}=e(ye.store);return{homeUrl:t()?.home}}),[]),w={"front-page":v,date:(0,E.sprintf)((0,E.__)("E.g. %s"),v+"/"+(new Date).getFullYear())};async function S(e,t=!0){if(!u){d(!0);try{const{title:n,description:r,slug:a}=e,s=await h("postType",Ct,{description:r,slug:a.toString(),status:"publish",title:n,is_wp_suggestion:t},{throwOnError:!0});p.push({postId:s.id,postType:s.type,canvas:"edit"}),y((0,E.sprintf)((0,E.__)('"%s" successfully created.'),(0,en.decodeEntities)(s.title?.rendered||n)),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,E.__)("An error occurred while creating the template.");f(t,{type:"snackbar"})}finally{d(!1)}}}const x=()=>{a(!1),i(Ts.templatesList)},C=function(e,t){const n=Xa(),r=Ja(),a=(n||[]).map((({slug:e})=>e)),s=(r||[]).filter((e=>xs.includes(e.slug)&&!a.includes(e.slug))),i=n=>{t?.(),e(n)},o=[...s],{defaultTaxonomiesMenuItems:l,taxonomiesMenuItems:c}=ns(i),{defaultPostTypesMenuItems:u,postTypesMenuItems:d}=ts(i),m=function(e){const t=Xa(),n=Ja(),r=is("root",rs,as);let a=n?.find((({slug:e})=>"author"===e));a||(a={description:(0,E.__)("Displays latest posts written by a single author."),slug:"author",title:"Author"});const s=!!t?.find((({slug:e})=>"author"===e));if(r.user?.hasEntities&&(a={...a,templatePrefix:"author"},a.onClick=t=>{e({type:"root",slug:"user",config:{queryArgs:({search:e})=>({_fields:"id,name,slug,link",orderBy:e?"name":"registered_date",exclude:r.user.existingEntitiesIds,who:"authors"}),getSpecificTemplate:e=>{const t=`author-${e.slug}`;return{title:t,slug:t,templatePrefix:"author"}}},labels:{singular_name:(0,E.__)("Author"),search_items:(0,E.__)("Search Authors"),not_found:(0,E.__)("No authors found."),all_items:(0,E.__)("All Authors")},hasGeneralTemplate:s,template:t})}),!s||r.user?.hasEntities)return a}(i);[...l,...u,m].forEach((e=>{if(!e)return;const t=o.findIndex((t=>t.slug===e.slug));t>-1?o[t]=e:o.push(e)})),o?.sort(((e,t)=>xs.indexOf(e.slug)-xs.indexOf(t.slug)));const p=[...o,...es(),...d,...c];return p}(c,(()=>i(Ts.customTemplate)));if(!C.length)return null;const{as:k=_.Button,...T}=null!=t?t:{};let P=(0,E.__)("Add template");return s===Ts.customTemplate?P=(0,E.sprintf)((0,E.__)("Add template: %s"),o.labels.singular_name):s===Ts.customGenericTemplate&&(P=(0,E.__)("Create custom template")),(0,l.createElement)(l.Fragment,null,u&&(0,l.createElement)(ws,null),(0,l.createElement)(k,{...T,onClick:()=>a(!0),icon:n?Za:null,label:e.labels.add_new_item},n?null:e.labels.add_new_item),r&&(0,l.createElement)(_.Modal,{title:P,className:b()("edit-site-add-new-template__modal",{"edit-site-add-new-template__modal_template_list":s===Ts.templatesList,"edit-site-custom-template-modal":s===Ts.customTemplate}),onRequestClose:x,overlayClassName:s===Ts.customGenericTemplate?"edit-site-custom-generic-template__modal":void 0},s===Ts.templatesList&&(0,l.createElement)(_.__experimentalGrid,{columns:3,gap:4,align:"flex-start",justify:"center",className:"edit-site-add-new-template__template-list__contents"},(0,l.createElement)(_.Flex,{className:"edit-site-add-new-template__template-list__prompt"},(0,E.__)("Select what the new template should apply to:")),C.map((e=>{const{title:t,slug:n,onClick:r}=e;return(0,l.createElement)(ks,{key:n,title:t,direction:"column",className:"edit-site-add-new-template__template-button",description:w[n],icon:Cs[n]||lr,onClick:()=>r?r(e):S(e)})})),(0,l.createElement)(ks,{title:(0,E.__)("Custom template"),direction:"row",className:"edit-site-add-new-template__custom-template-button",icon:Er,onClick:()=>i(Ts.customGenericTemplate)},(0,l.createElement)(_.__experimentalText,{lineHeight:1.53846153846},(0,E.__)("A custom template can be manually applied to any post or page.")))),s===Ts.customTemplate&&(0,l.createElement)(ps,{onSelect:S,entityForSuggestions:o}),s===Ts.customGenericTemplate&&(0,l.createElement)(Es,{onClose:x,createTemplate:S})))}function Is({templateType:e=Ct,...t}){const n=(0,m.useSelect)((t=>t(ye.store).getPostType(e)),[e]);return n&&e===Ct?(0,l.createElement)(Ps,{...t,postType:n}):null}const Ms=({postType:e,postId:t,...n})=>{const r=Et({postType:e,postId:t});return(0,l.createElement)(vr,{...r,...n})};function As(){const e=(0,ie.useViewportMatch)("medium","<"),{records:t,isResolving:n}=(0,ye.useEntityRecords)("postType",Ct,{per_page:-1}),r=Et({path:"/wp_template/all"}),a=!e;return(0,l.createElement)(hr,{title:(0,E.__)("Templates"),description:(0,E.__)("Express the layout of your site with templates."),actions:a&&(0,l.createElement)(Is,{templateType:Ct,toggleProps:{as:mr}}),content:(0,l.createElement)(l.Fragment,null,n&&(0,E.__)("Loading templates…"),!n&&(0,l.createElement)(Ns,{templates:t})),footer:!e&&(0,l.createElement)(vr,{withChevron:!0,...r},(0,E.__)("Manage all templates"))})}function Os({title:e,templates:t}){return(0,l.createElement)(_.__experimentalItemGroup,null,!!e&&(0,l.createElement)(_.__experimentalItem,{className:"edit-site-sidebar-navigation-screen-templates__templates-group-title"},e),t.map((e=>(0,l.createElement)(Ms,{postType:Ct,postId:e.id,key:e.id,withChevron:!0},(0,en.decodeEntities)(e.title?.rendered||e.slug)))))}function Ns({templates:e}){if(!e?.length)return(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(_.__experimentalItem,null,(0,E.__)("No templates found")));const t=e?[...e]:[];t.sort(((e,t)=>e.title.rendered.localeCompare(t.title.rendered)));const{hierarchyTemplates:n,customTemplates:r,...a}=t.reduce(((e,t)=>{const{original_source:n,author_text:r}=t;return"plugin"===n?(e[r]||(e[r]=[]),e[r].push(t)):t.is_custom?e.customTemplates.push(t):e.hierarchyTemplates.push(t),e}),{hierarchyTemplates:[],customTemplates:[]});return(0,l.createElement)(_.__experimentalVStack,{spacing:3},!!n.length&&(0,l.createElement)(Os,{templates:n}),!!r.length&&(0,l.createElement)(Os,{title:(0,E.__)("Custom"),templates:r}),Object.entries(a).map((([e,t])=>(0,l.createElement)(Os,{key:e,title:e,templates:t}))))}function Fs({postId:e,area:t,title:n}){const r=(0,m.useSelect)((e=>e(y.store).__experimentalGetDefaultTemplatePartAreas().find((e=>e.area===t))),[t]),a=Et({postType:kt,postId:e});return(0,l.createElement)(vr,{className:"edit-site-sidebar-navigation-screen-template__template-area-button",...a,icon:r?.icon,withChevron:!0},(0,l.createElement)(_.__experimentalTruncate,{limit:20,ellipsizeMode:"tail",numberOfLines:1,className:"edit-site-sidebar-navigation-screen-template__template-area-label-text"},(0,en.decodeEntities)(n)))}function Rs(){const{templatePartAreas:e,currentTemplateParts:t}=(0,m.useSelect)((e=>{const{getSettings:t,getCurrentTemplateTemplateParts:n}=Xe(e(tr));return{templatePartAreas:t()?.defaultTemplatePartAreas,currentTemplateParts:n()}}),[]),n=(0,g.useMemo)((()=>{const n=new Set;return t.length&&e?t.filter((e=>{if(!n.has(e.templatePart.id))return n.add(e.templatePart.id),e})).map((({templatePart:t,block:n})=>({...e?.find((({area:e})=>e===t?.area)),...t,clientId:n.clientId}))):[]}),[t,e]);return n.length?(0,l.createElement)(xa,{title:(0,E.__)("Areas"),spacing:3},(0,l.createElement)(_.__experimentalItemGroup,null,n.map((({clientId:e,label:t,area:n,theme:r,slug:a,title:s})=>(0,l.createElement)(wa,{key:e},(0,l.createElement)(Fs,{postId:`${r}//${a}`,title:s?.rendered||t,area:n})))))):null}function Ds(e,t){const{record:n,title:r,description:a,isLoaded:s,icon:i}=(0,m.useSelect)((n=>{const{getEditedPostType:r,getEditedPostId:a}=n(tr),{getEditedEntityRecord:s,hasFinishedResolution:i}=n(ye.store),{__experimentalGetTemplateInfo:o}=n(y.store),l=null!=e?e:r(),c=null!=t?t:a(),u=s("postType",l,c),d=c&&i("getEditedEntityRecord",["postType",l,c]),m=o(u);return{record:u,title:m.title,description:m.description,isLoaded:d,icon:m.icon}}),[e,t]);return{isLoaded:s,icon:i,record:n,getTitle:()=>r?(0,en.decodeEntities)(r):null,getDescription:()=>a?(0,en.decodeEntities)(a):null}}const Vs=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"})),Ls=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"}));function Bs(e,t){return(0,m.useSelect)((n=>{const{getEntityRecord:r,getMedia:a,getUser:s,getEditedEntityRecord:i}=n(ye.store),o=i("postType",e,t),l=o?.original_source,c=o?.author_text;switch(l){case"theme":return{type:l,icon:lr,text:c,isCustomized:o.source===Tt.custom};case"plugin":return{type:l,icon:Vs,text:c,isCustomized:o.source===Tt.custom};case"site":{const e=r("root","__unstableBase");return{type:l,icon:Ls,imageUrl:e?.site_logo?a(e.site_logo)?.source_url:void 0,text:c,isCustomized:!1}}default:{const e=s(o.author);return{type:"user",icon:Ha,imageUrl:e?.avatar_urls?.[48],text:c,isCustomized:!1}}}}),[e,t])}function zs({imageUrl:e}){const[t,n]=(0,g.useState)(!1);return(0,l.createElement)("div",{className:b()("edit-site-list-added-by__avatar",{"is-loaded":t})},(0,l.createElement)("img",{onLoad:()=>n(!0),alt:"",src:e}))}function Hs(e){return!!e&&(e.source===Tt.custom&&!e.has_theme_file)}function Gs({template:e,onClose:t}){const n=(0,en.decodeEntities)(e.title.rendered),[r,a]=(0,g.useState)(n),[s,i]=(0,g.useState)(!1),{editEntityRecord:o,__experimentalSaveSpecifiedEntityEdits:c}=(0,m.useDispatch)(ye.store),{createSuccessNotice:u,createErrorNotice:d}=(0,m.useDispatch)(ge.store);if(e.type===Ct&&!e.is_custom)return null;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{onClick:()=>{i(!0),a(n)}},(0,E.__)("Rename")),s&&(0,l.createElement)(_.Modal,{title:(0,E.__)("Rename"),onRequestClose:()=>{i(!1)},overlayClassName:"edit-site-list__rename-modal"},(0,l.createElement)("form",{onSubmit:async function(n){n.preventDefault();try{await o("postType",e.type,e.id,{title:r}),a(""),i(!1),t(),await c("postType",e.type,e.id,["title"],{throwOnError:!0}),u(e.type===Ct?(0,E.__)("Template renamed."):(0,E.__)("Template part renamed."),{type:"snackbar"})}catch(t){const n=e.type===Ct?(0,E.__)("An error occurred while renaming the template."):(0,E.__)("An error occurred while renaming the template part."),r=t.message&&"unknown_error"!==t.code?t.message:n;d(r,{type:"snackbar"})}}},(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,E.__)("Name"),value:r,onChange:a,required:!0}),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{i(!1)}},(0,E.__)("Cancel")),(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit"},(0,E.__)("Save")))))))}function Us({postType:e,postId:t,className:n,toggleProps:r,onRemove:a}){const s=(0,m.useSelect)((n=>n(ye.store).getEntityRecord("postType",e,t)),[e,t]),{removeTemplate:i,revertTemplate:o}=(0,m.useDispatch)(tr),{saveEditedEntityRecord:c}=(0,m.useDispatch)(ye.store),{createSuccessNotice:u,createErrorNotice:d}=(0,m.useDispatch)(ge.store),p=Hs(s),h=$t(s);if(!p&&!h)return null;return(0,l.createElement)(_.DropdownMenu,{icon:ue,label:(0,E.__)("Actions"),className:n,toggleProps:r},(({onClose:e})=>(0,l.createElement)(_.MenuGroup,null,p&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Gs,{template:s,onClose:e}),(0,l.createElement)(Ws,{onRemove:()=>{i(s),a?.(),e()},title:s.title.rendered})),h&&(0,l.createElement)(_.MenuItem,{info:(0,E.__)("Use the template as supplied by the theme."),onClick:()=>{!async function(){try{await o(s,{allowUndo:!1}),await c("postType",s.type,s.id),u((0,E.sprintf)((0,E.__)('"%s" reverted.'),(0,en.decodeEntities)(s.title.rendered)),{type:"snackbar",id:"edit-site-template-reverted"})}catch(e){const t=s.type===Ct?(0,E.__)("An error occurred while reverting the template."):(0,E.__)("An error occurred while reverting the template part."),n=e.message&&"unknown_error"!==e.code?e.message:t;d(n,{type:"snackbar"})}}(),e()}},(0,E.__)("Clear customizations")))))}function Ws({onRemove:e,title:t}){const[n,r]=(0,g.useState)(!1);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{isDestructive:!0,onClick:()=>r(!0)},(0,E.__)("Delete")),(0,l.createElement)(_.__experimentalConfirmDialog,{isOpen:n,onConfirm:e,onCancel:()=>r(!1),confirmButtonText:(0,E.__)("Delete")},(0,E.sprintf)((0,E.__)('Are you sure you want to delete "%s"?'),(0,en.decodeEntities)(t))))}const js={};function Zs(){const{editEntityRecord:e}=(0,m.useDispatch)(ye.store),{allowCommentsOnNewPosts:t,postsPerPage:n,postsPageTitle:r,postsPageId:a}=(0,m.useSelect)((e=>{const{getEntityRecord:t}=e(ye.store),n=t("root","site"),r=n?.page_for_posts?t("postType","page",n?.page_for_posts):js;return{allowCommentsOnNewPosts:"open"===n?.default_comment_status,postsPageTitle:r?.title?.rendered,postsPageId:r?.id,postsPerPage:n?.posts_per_page}}),[]),[s,i]=(0,g.useState)(""),[o,c]=(0,g.useState)(1),[u,d]=(0,g.useState)("");(0,g.useEffect)((()=>{i(t),d(r),c(n)}),[r,t,n]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(xa,{spacing:6},a&&(0,l.createElement)(wa,null,(0,l.createElement)(_.__experimentalInputControl,{className:"edit-site-sidebar-navigation-screen__input-control",placeholder:(0,E.__)("No Title"),size:"__unstable-large",value:u,onChange:(0,ie.debounce)((t=>{d(t),e("postType","page",a,{title:t})}),300),label:(0,E.__)("Blog title"),help:(0,E.__)("Set the Posts Page title. Appears in search results, and when the page is shared on social media.")})),(0,l.createElement)(wa,null,(0,l.createElement)(_.__experimentalNumberControl,{className:"edit-site-sidebar-navigation-screen__input-control",placeholder:0,value:o,size:"__unstable-large",spinControls:"custom",step:"1",min:"1",onChange:t=>{c(t),e("root","site",void 0,{posts_per_page:t})},label:(0,E.__)("Posts per page"),help:(0,E.__)("Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting.")}))),(0,l.createElement)(xa,{title:(0,E.__)("Discussion"),spacing:3},(0,l.createElement)(wa,null,(0,l.createElement)(_.CheckboxControl,{className:"edit-site-sidebar-navigation-screen__input-control",label:(0,E.__)("Allow comments on new posts"),help:(0,E.__)("Changes will apply to new posts only. Individual posts may override these settings."),checked:s,onChange:t=>{i(t),e("root","site",void 0,{default_comment_status:t?"open":null})}}))))}function qs(){const e=(0,_.__experimentalUseNavigator)(),{params:{postType:t,postId:n}}=e,{setCanvasMode:r}=Xe((0,m.useDispatch)(tr)),{title:a,content:s,description:i,footer:o}=function(e,t){const{getDescription:n,getTitle:r,record:a}=Ds(e,t),s=(0,m.useSelect)((e=>e(ye.store).getCurrentTheme()),[]),i=Bs(e,t),o="theme"===i.type&&a.theme===s?.stylesheet,c=r();let u=n();!u&&i.text&&(u=(0,E.__)("This is a custom template that can be applied manually to any Post or Page."));const d="home"===a?.slug||"index"===a?.slug?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Zs,null),(0,l.createElement)(Rs,null)):(0,l.createElement)(Rs,null),p=a?.modified?(0,l.createElement)(Ca,{record:a}):null;return{title:c,description:(0,l.createElement)(l.Fragment,null,u,i.text&&!o&&(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description"},(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description-author"},(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description-author-icon"},i.imageUrl?(0,l.createElement)("img",{src:i.imageUrl,alt:"",width:"24",height:"24"}):(0,l.createElement)(_.Icon,{icon:i.icon})),i.text),i.isCustomized&&(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description-customized"},(0,E._x)("(Customized)","template")))),content:d,footer:p}}(t,n);return(0,l.createElement)(hr,{title:a,actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Us,{postType:t,postId:n,toggleProps:{as:mr},onRemove:()=>{e.goTo(`/${t}/all`)}}),(0,l.createElement)(mr,{onClick:()=>r("edit"),label:(0,E.__)("Edit"),icon:_r})),description:i,content:s,footer:o})}const Ys=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})),Ks=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})),Xs=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})),Js=()=>(0,m.useSelect)((e=>e(ye.store).getEntityRecords("postType",kt,{per_page:-1})),[]),Qs=(e,t)=>{const n=e.toLowerCase(),r=t.map((e=>e.title.rendered.toLowerCase()));if(!r.includes(n))return e;let a=2;for(;r.includes(`${n} ${a}`);)a++;return`${e} ${a}`},$s=e=>_s(e).replace(/[^\w-]+/g,"")||"wp-custom-part";function ei({modalTitle:e=(0,E.__)("Create template part"),...t}){return(0,l.createElement)(_.Modal,{title:e,onRequestClose:t.closeModal,overlayClassName:"edit-site-create-template-part-modal"},(0,l.createElement)(ti,{...t}))}function ti({defaultArea:e=Pt,blocks:t=[],confirmLabel:n=(0,E.__)("Create"),closeModal:r,onCreate:a,onError:s,defaultTitle:i=""}){const{createErrorNotice:o}=(0,m.useDispatch)(ge.store),{saveEntityRecord:c}=(0,m.useDispatch)(ye.store),d=Js(),[p,h]=(0,g.useState)(i),[f,v]=(0,g.useState)(e),[b,w]=(0,g.useState)(!1),x=(0,ie.useInstanceId)(ei),C=(0,m.useSelect)((e=>e(y.store).__experimentalGetDefaultTemplatePartAreas()),[]);return(0,l.createElement)("form",{onSubmit:async e=>{e.preventDefault(),await async function(){if(p&&!b)try{w(!0);const e=Qs(p,d),n=$s(e),r=await c("postType",kt,{slug:n,title:e,content:(0,u.serialize)(t),area:f},{throwOnError:!0});await a(r)}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,E.__)("An error occurred while creating the template part.");o(t,{type:"snackbar"}),s?.()}finally{w(!1)}}()}},(0,l.createElement)(_.__experimentalVStack,{spacing:"4"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,label:(0,E.__)("Name"),value:p,onChange:h,required:!0}),(0,l.createElement)(_.BaseControl,{label:(0,E.__)("Area"),id:`edit-site-create-template-part-modal__area-selection-${x}`,className:"edit-site-create-template-part-modal__area-base-control"},(0,l.createElement)(_.__experimentalRadioGroup,{label:(0,E.__)("Area"),className:"edit-site-create-template-part-modal__area-radio-group",id:`edit-site-create-template-part-modal__area-selection-${x}`,onChange:v,checked:f},C.map((({icon:e,label:t,area:n,description:r})=>(0,l.createElement)(_.__experimentalRadio,{key:t,value:n,className:"edit-site-create-template-part-modal__area-radio"},(0,l.createElement)(_.Flex,{align:"start",justify:"start"},(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.Icon,{icon:e})),(0,l.createElement)(_.FlexBlock,{className:"edit-site-create-template-part-modal__option-label"},t,(0,l.createElement)("div",null,r)),(0,l.createElement)(_.FlexItem,{className:"edit-site-create-template-part-modal__checkbox"},f===n&&(0,l.createElement)(_.Icon,{icon:S})))))))),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:()=>{r()}},(0,E.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",type:"submit","aria-disabled":!p||b,isBusy:b},n))))}const{useHistory:ni,useLocation:ri}=Xe(gt.privateApis),{CreatePatternModal:ai,useAddPatternCategory:si}=Xe(St.privateApis);function ii(){const e=ni(),{params:t}=ri(),[n,r]=(0,g.useState)(!1),[a,s]=(0,g.useState)(!1),i=(0,m.useSelect)((e=>e(ye.store).getCurrentTheme()?.is_block_theme),[]),{createPatternFromFile:o}=Xe((0,m.useDispatch)(St.store)),{createSuccessNotice:c,createErrorNotice:u}=(0,m.useDispatch)(ge.store),d=(0,g.useRef)();function p(){r(!1),s(!1)}const h=[{icon:cr,onClick:()=>r(!0),title:(0,E.__)("Create pattern")}];i&&h.push({icon:Ks,onClick:()=>s(!0),title:(0,E.__)("Create template part")}),h.push({icon:Xs,onClick:()=>{d.current.click()},title:(0,E.__)("Import pattern from JSON")});const{categoryMap:f,findOrCreateTerm:y}=si();return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.DropdownMenu,{controls:h,toggleProps:{as:mr},icon:Za,label:(0,E.__)("Create pattern")}),n&&(0,l.createElement)(ai,{onClose:()=>r(!1),onSuccess:function({pattern:t,categoryId:n}){r(!1),e.push({postId:t.id,postType:It.user,categoryType:It.theme,categoryId:n,canvas:"edit"})},onError:p}),a&&(0,l.createElement)(ei,{closeModal:()=>s(!1),blocks:[],onCreate:function(t){s(!1),e.push({postId:t.id,postType:kt,canvas:"edit"})},onError:p}),(0,l.createElement)("input",{type:"file",accept:".json",hidden:!0,ref:d,onChange:async n=>{const r=n.target.files?.[0];if(r)try{let n;if(t.categoryType!==kt){const e=f.values().find((e=>e.name===t.categoryId));e&&(n=e.id||await y(e.label))}const a=await o(r,n?[n]:void 0);n||"my-patterns"===t.categoryId||e.push({path:"/patterns",categoryType:It.theme,categoryId:Mt}),c((0,E.sprintf)((0,E.__)('Imported "%s" from JSON.'),a.title.raw),{type:"snackbar",id:"import-pattern-success"})}catch(e){u(e.message,{type:"snackbar",id:"import-pattern-error"})}finally{n.target.value=""}}}))}function oi({count:e,icon:t,id:n,isActive:r,label:a,type:s}){const i=Et({path:"/patterns",categoryType:s,categoryId:n});if(e)return(0,l.createElement)(vr,{...i,icon:t,suffix:(0,l.createElement)("span",null,e),"aria-current":r?"true":void 0},a)}const li=(e,t,n)=>t===n.findIndex((t=>e.name===t.name));var ci={};function ui(e){return[e]}function di(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function mi(e,t){var n,r=t||ui;function a(){n=new WeakMap}function s(){var t,a,s,i,o,l=arguments.length;for(i=new Array(l),s=0;s<l;s++)i[s]=arguments[s];for(t=function(e){var t,r,a,s,i,o=n,l=!0;for(t=0;t<e.length;t++){if(!(i=r=e[t])||"object"!=typeof i){l=!1;break}o.has(r)?o=o.get(r):(a=new WeakMap,o.set(r,a),o=a)}return o.has(ci)||((s=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=l,o.set(ci,s)),o.get(ci)}(o=r.apply(null,i)),t.isUniqueByDependants||(t.lastDependants&&!di(o,t.lastDependants,0)&&t.clear(),t.lastDependants=o),a=t.head;a;){if(di(a.args,i,1))return a!==t.head&&(a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=t.head,a.prev=null,t.head.prev=a,t.head=a),a.val;a=a.next}return a={val:e.apply(null,i)},i[0]=null,a.args=i,t.head&&(t.head.prev=a,a.next=t.head),t.head=a,a.val}return s.getDependants=r,s.clear=a,a(),s}var pi=a(9681),hi=a.n(pi);const fi=e=>e.name||"",gi=e=>e.title,yi=e=>e.description||"",vi=e=>e.keywords||[],bi=()=>!1;function _i(e=""){return vs(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 Ei(e=""){return e=(e=(e=hi()(e)).replace(/^\//,"")).toLowerCase()}const wi=(e="")=>_i(Ei(e)),Si=(e=[],t="",n={})=>{const r=wi(t),a=n.categoryId!==Mt&&!r.length,s={...n,onlyFilterByCategory:a},i=a?0:1,o=e.map((e=>[e,xi(e,t,s)])).filter((([,e])=>e>i));return 0===r.length||o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))};function xi(e,t,n){const{categoryId:r,getName:a=fi,getTitle:s=gi,getDescription:i=yi,getKeywords:o=vi,hasCategory:l=bi,onlyFilterByCategory:c}=n;let u=r===Mt||r===At&&e.type===It.user||l(e,r)?1:0;if(!u||c)return u;const d=a(e),m=s(e),p=i(e),h=o(e),f=Ei(t),g=Ei(m);if(f===g)u+=30;else if(g.startsWith(f))u+=20;else{const e=[d,m,p,...h].join(" ");0===((e,t)=>e.filter((e=>!wi(t).some((t=>t.includes(e))))))(_i(f),e).length&&(u+=10)}return u}const Ci=[],ki=(e,t)=>e&&t?e+"//"+t:null,Ti=mi(((e,t,n="")=>{var r;const{getEntityRecords:a,getIsResolving:s}=e(ye.store),{__experimentalGetDefaultTemplatePartAreas:i}=e(y.store),o={per_page:-1},l=(null!==(r=a("postType",kt,o))&&void 0!==r?r:Ci).map((e=>(e=>({blocks:(0,u.parse)(e.content.raw,{__unstableSkipMigrationLogs:!0}),categories:[e.area],description:e.description||"",isCustom:e.source===Tt.custom,keywords:e.keywords||[],id:ki(e.theme,e.slug),name:ki(e.theme,e.slug),title:(0,en.decodeEntities)(e.title.rendered),type:e.type,templatePart:e}))(e))),c=(i()||[]).map((e=>e.area)),d=s("getEntityRecords",["postType",kt,o]),m=Si(l,n,{categoryId:t,hasCategory:(e,t)=>t!==Pt?e.templatePart.area===t:e.templatePart.area===t||!c.includes(e.templatePart.area)});return{patterns:m,isResolving:d}}),(e=>[e(ye.store).getEntityRecords("postType",kt,{per_page:-1}),e(ye.store).getIsResolving("getEntityRecords",["postType",kt,{per_page:-1}]),e(y.store).__experimentalGetDefaultTemplatePartAreas()])),Pi=mi((e=>{var t;const{getSettings:n}=Xe(e(tr)),{getIsResolving:r}=e(ye.store),a=n();return{patterns:[...(null!==(t=a.__experimentalAdditionalBlockPatterns)&&void 0!==t?t:a.__experimentalBlockPatterns)||[],...e(ye.store).getBlockPatterns()||[]].filter((e=>!Ot.includes(e.source))).filter(li).filter((e=>!1!==e.inserter)).map((e=>({...e,keywords:e.keywords||[],type:It.theme,blocks:(0,u.parse)(e.content,{__unstableSkipMigrationLogs:!0})}))),isResolving:r("getBlockPatterns")}}),(e=>[e(ye.store).getBlockPatterns(),e(ye.store).getIsResolving("getBlockPatterns"),Xe(e(tr)).getSettings()])),Ii=mi(((e,t,n,r="")=>{const{patterns:a,isResolving:s}=Pi(e),{patterns:i,isResolving:o}=Mi(e);let l=[...a||[],...i||[]];return n&&(l=l.filter((e=>e.type===It.user?e.syncStatus===n:n===Nt.unsynced))),l=Si(l,r,t?{categoryId:t,hasCategory:(e,t)=>e.categories?.includes(t)}:{hasCategory:e=>!e.hasOwnProperty("categories")}),{patterns:l,isResolving:s||o}}),(e=>[Pi(e),Mi(e)])),Mi=mi(((e,t,n="")=>{const{getEntityRecords:r,getIsResolving:a,getUserPatternCategories:s}=e(ye.store),i={per_page:-1},o=r("postType",It.user,i),l=s(),c=new Map;l.forEach((e=>c.set(e.id,e)));let d=o?o.map((e=>((e,t)=>({blocks:(0,u.parse)(e.content.raw,{__unstableSkipMigrationLogs:!0}),...e.wp_pattern_category.length>0&&{categories:e.wp_pattern_category.map((e=>t&&t.get(e)?t.get(e).slug:e))},termLabels:e.wp_pattern_category.map((e=>t?.get(e)?t.get(e).label:e)),id:e.id,name:e.slug,syncStatus:e.wp_pattern_sync_status||Nt.full,title:e.title.raw,type:e.type,patternPost:e}))(e,c))):Ci;const m=a("getEntityRecords",["postType",It.user,i]);return t&&(d=d.filter((e=>e.syncStatus===t))),d=Si(d,n,{hasCategory:()=>!0}),{patterns:d,isResolving:m,categories:l}}),(e=>[e(ye.store).getEntityRecords("postType",It.user,{per_page:-1}),e(ye.store).getIsResolving("getEntityRecords",["postType",It.user,{per_page:-1}]),e(ye.store).getUserPatternCategories()])),Ai=(e,t,{search:n="",syncStatus:r}={})=>(0,m.useSelect)((a=>e===kt?Ti(a,t,n):e===It.theme?Ii(a,t,r,n):e===It.user?Mi(a,r,n):{patterns:Ci,isResolving:!1}),[t,e,n,r]);function Oi(){const e=function(){const e=(0,m.useSelect)((e=>{var t;const{getSettings:n}=Xe(e(tr)),r=n();return null!==(t=r.__experimentalAdditionalBlockPatternCategories)&&void 0!==t?t:r.__experimentalBlockPatternCategories}));return[...e||[],...(0,m.useSelect)((e=>e(ye.store).getBlockPatternCategories()))||[]]}();e.push({name:Pt,label:(0,E.__)("Uncategorized")});const t=function(){const e=(0,m.useSelect)((e=>{var t;const{getSettings:n}=Xe(e(tr));return null!==(t=n().__experimentalAdditionalBlockPatterns)&&void 0!==t?t:n().__experimentalBlockPatterns})),t=(0,m.useSelect)((e=>e(ye.store).getBlockPatterns()));return(0,g.useMemo)((()=>[...e||[],...t||[]].filter((e=>!Ot.includes(e.source))).filter(li).filter((e=>!1!==e.inserter))),[e,t])}(),{patterns:n,categories:r}=Ai(It.user),a=(0,g.useMemo)((()=>{const a={},s=[];e.forEach((e=>{a[e.name]||(a[e.name]={...e,count:0})})),r.forEach((e=>{a[e.name]||(a[e.name]={...e,count:0})})),t.forEach((e=>{e.categories?.forEach((e=>{a[e]&&(a[e].count+=1)})),e.categories?.length||(a.uncategorized.count+=1)})),n.forEach((e=>{e.categories?.forEach((e=>{a[e]&&(a[e].count+=1)})),e.categories?.length||(a.uncategorized.count+=1)})),[...e,...r].forEach((e=>{a[e.name].count&&!s.find((t=>t.name===e.name))&&s.push(a[e.name])}));const i=s.sort(((e,t)=>e.label.localeCompare(t.label)));return i.unshift({name:At,label:(0,E.__)("My patterns"),count:n.length}),i.unshift({name:Mt,label:(0,E.__)("All patterns"),description:(0,E.__)("A list of all patterns from all sources."),count:t.length+n.length}),i}),[e,t,r,n]);return{patternCategories:a,hasPatterns:!!a.length}}const Ni=e=>{const t=e||[],n=(0,m.useSelect)((e=>e(y.store).__experimentalGetDefaultTemplatePartAreas()),[]),r={header:{},footer:{},sidebar:{},uncategorized:{}};n.forEach((e=>r[e.area]={...e,templateParts:[]}));return t.reduce(((e,t)=>(e[e[t.area]?t.area:Pt].templateParts.push(t),e)),r)};function Fi({areas:e,currentArea:t,currentType:n}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-patterns__group-header"},(0,l.createElement)(_.__experimentalHeading,{level:2},(0,E.__)("Template parts"))),(0,l.createElement)(_.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group"},Object.entries(e).map((([e,{label:r,templateParts:a}])=>(0,l.createElement)(oi,{key:e,count:a?.length,icon:(0,y.getTemplatePartIcon)(e),label:r,id:e,type:kt,isActive:t===e&&n===kt})))))}function Ri({categories:e,currentCategory:t,currentType:n}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group"},e.map((e=>(0,l.createElement)(oi,{key:e.name,count:e.count,label:e.label,icon:Ys,id:e.name,type:"pattern",isActive:t===`${e.name}`&&(n===It.theme||n===It.user)})))))}function Di(){const e=(0,ie.useViewportMatch)("medium","<"),{categoryType:t,categoryId:n}=(0,yt.getQueryArgs)(window.location.href),r=n||Mt,a=t||It.theme,{templatePartAreas:s,hasTemplateParts:i,isLoading:o}=function(){const{records:e,isResolving:t}=(0,ye.useEntityRecords)("postType",kt,{per_page:-1});return{hasTemplateParts:!!e&&!!e.length,isLoading:t,templatePartAreas:Ni(e)}}(),{patternCategories:c,hasPatterns:u}=Oi(),d=(0,m.useSelect)((e=>e(ye.store).getCurrentTheme()?.is_block_theme),[]),p=(0,m.useSelect)((e=>!!e(tr).getSettings().supportsTemplatePartsMode),[]),h=Et({path:"/wp_template_part/all",didAccessPatternsPage:!d&&p?1:void 0}),f=e?void 0:(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(vr,{as:"a",href:"edit.php?post_type=wp_block",withChevron:!0},(0,E.__)("Manage all of my patterns")),(d||p)&&(0,l.createElement)(vr,{withChevron:!0,...h},(0,E.__)("Manage all template parts")));return(0,l.createElement)(hr,{isRoot:!d,title:(0,E.__)("Patterns"),description:(0,E.__)("Manage what patterns are available when editing the site."),actions:(0,l.createElement)(ii,null),footer:f,content:(0,l.createElement)(l.Fragment,null,o&&(0,E.__)("Loading patterns…"),!o&&(0,l.createElement)(l.Fragment,null,!i&&!u&&(0,l.createElement)(_.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group"},(0,l.createElement)(_.__experimentalItem,null,(0,E.__)("No template parts or patterns found"))),u&&(0,l.createElement)(Ri,{categories:c,currentCategory:r,currentType:a}),i&&(0,l.createElement)(Fi,{areas:s,currentArea:r,currentType:a})))})}const{useLocation:Vi}=Xe(gt.privateApis),Li=[Ct,kt,xt,It.user];function Bi(){const{params:e={}}=Vi(),{postType:t,postId:n,context:r,isReady:a}=function({path:e,postId:t,postType:n}){const{hasLoadedAllDependencies:r,homepageId:a,url:s,frontPageTemplateId:i}=(0,m.useSelect)((e=>{const{getSite:t,getUnstableBase:n,getEntityRecords:r}=e(ye.store),a=t(),s=n(),i=r("postType",Ct,{per_page:-1});let o;if(i){const e=i.find((e=>"front-page"===e.slug));o=!!e&&e.id}return{hasLoadedAllDependencies:!!s&&!!a,homepageId:"page"===a?.show_on_front&&["number","string"].includes(typeof a.page_on_front)?a.page_on_front.toString():null,url:s?.home,frontPageTemplateId:o}}),[]),o=(0,m.useSelect)((o=>{if(Li.includes(n))return;const{getEditedEntityRecord:l,getEntityRecords:c,getDefaultTemplateId:u,__experimentalGetTemplateForLink:d}=o(ye.store);function m(e,t){if("page"===e&&a===t){if(void 0===i)return;if(i)return i}const n=l("postType",e,t);if(!n)return;const r=n.template;if(r){const e=c("postType",Ct,{per_page:-1})?.find((({slug:e})=>e===r));if(e)return e.id}let s;return s=n.slug?"page"===e?`${e}-${n.slug}`:`single-${e}-${n.slug}`:"page"===e?"page":`single-${e}`,u({slug:s})}if(r){if(n&&t)return m(n,t);if("/pages"===e&&t)return m("page",t);if(a)return m("page",a);if(s){const e=d(s);return e?.id}}}),[a,r,s,t,n,e,i]),l=(0,g.useMemo)((()=>Li.includes(n)?{}:n&&t?{postType:n,postId:t}:"/pages"===e&&t?{postType:"page",postId:t}:a?{postType:"page",postId:a}:{}),[a,n,t,e]);return"/wp_template/all"===e&&t?{isReady:!0,postType:"wp_template",postId:t,context:l}:"/wp_template_part/all"===e&&t?{isReady:!0,postType:"wp_template_part",postId:t,context:l}:Li.includes(n)?{isReady:!0,postType:n,postId:t,context:l}:r?{isReady:void 0!==o,postType:Ct,postId:o,context:l}:{isReady:!1}}(e),{setEditedEntity:s}=(0,m.useDispatch)(tr);(0,g.useEffect)((()=>{a&&s(t,n,r)}),[a,t,n,r,s])}function zi(e,t){var n=e.toLowerCase();return 0===t?function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(n):n}const Hi=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),Gi=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),{useLocation:Ui,useHistory:Wi}=Xe(gt.privateApis);function ji(e){var t;let n=null!==(t=e?.path)&&void 0!==t?t:"/";if(e?.postType&&e?.postId)switch(e.postType){case It.user:case Ct:case kt:case"page":n=`/${encodeURIComponent(e.postType)}/${encodeURIComponent(e.postId)}`;break;default:n=`/navigation/${encodeURIComponent(e.postType)}/${encodeURIComponent(e.postId)}`}return n}function Zi(){const e=Wi(),{params:t}=Ui(),{location:n,params:r,goTo:a}=(0,_.__experimentalUseNavigator)(),s=(0,g.useRef)(!0);(0,g.useEffect)((()=>{function a(n){if(r=n,a=t,Object.entries(r).every((([e,t])=>a[e]===t)))return;var r,a;const s={...t,...n};e.push(s)}s.current?s.current=!1:r?.postType&&r?.postId?a({postType:r?.postType,postId:r?.postId,path:void 0,layout:void 0}):n.path.startsWith("/page/")&&r?.postId?a({postType:"page",postId:r?.postId,path:void 0,layout:void 0}):"/patterns"===n.path?a({postType:void 0,postId:void 0,canvas:void 0,path:n.path}):"/wp_template/all"!==n.path||window?.__experimentalAdminViews?"/pages"===n.path&&window?.__experimentalAdminViews||"/wp_template/all"===n.path&&window?.__experimentalAdminViews||"/wp_template_part/all"===n.path&&window?.__experimentalAdminViews?a({postType:void 0,categoryType:void 0,categoryId:void 0,path:n.path}):a({postType:void 0,postId:void 0,categoryType:void 0,categoryId:void 0,layout:void 0,path:"/"===n.path?void 0:n.path}):a({postType:void 0,categoryType:void 0,categoryId:void 0,path:n.path,layout:void 0})}),[n?.path,r]),(0,g.useEffect)((()=>{const e=ji(t);n.path!==e&&a(e)}),[t])}const qi={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},{useLocation:Yi,useHistory:Ki}=Xe(gt.privateApis);function Xi(e){const t=Yi(),n=Ki(),{block:r}=e,{clientId:a}=r,{moveBlocksDown:s,moveBlocksUp:i,removeBlocks:o}=(0,m.useDispatch)(fe.store),c=(0,E.sprintf)((0,E.__)("Remove %s"),(0,fe.BlockTitle)({clientId:a,maximumLength:25})),u=(0,E.sprintf)((0,E.__)("Go to %s"),(0,fe.BlockTitle)({clientId:a,maximumLength:25})),d=(0,m.useSelect)((e=>{const{getBlockRootClientId:t}=e(fe.store);return t(a)}),[a]),p=(0,g.useCallback)((e=>{const{attributes:r,name:a}=e;"post-type"===r.kind&&r.id&&r.type&&n&&n.push({postType:r.type,postId:r.id,...vt()&&{wp_theme_preview:bt()}},{backPath:ji(t.params)}),"core/page-list-item"===a&&r.id&&n&&n.push({postType:"page",postId:r.id,...vt()&&{wp_theme_preview:bt()}},{backPath:ji(t.params)})}),[n]);return(0,l.createElement)(_.DropdownMenu,{icon:ue,label:(0,E.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:qi,noIcons:!0,...e},(({onClose:e})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(_.MenuItem,{icon:Hi,onClick:()=>{i([a],d),e()}},(0,E.__)("Move up")),(0,l.createElement)(_.MenuItem,{icon:Gi,onClick:()=>{s([a],d),e()}},(0,E.__)("Move down")),"page"===r.attributes?.type&&r.attributes?.id&&(0,l.createElement)(_.MenuItem,{onClick:()=>{p(r),e()}},u)),(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(_.MenuItem,{onClick:()=>{o([a],!1),e()}},c)))))}const{PrivateListView:Ji}=Xe(fe.privateApis),Qi=["postType","page",{per_page:100,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}];function $i({rootClientId:e}){const{listViewRootClientId:t,isLoading:n}=(0,m.useSelect)((t=>{const{areInnerBlocksControlled:n,getBlockName:r,getBlockCount:a,getBlockOrder:s}=t(fe.store),{isResolving:i}=t(ye.store),o=s(e),l=1===o.length&&"core/page-list"===r(o[0])&&a(o[0])>0,c=i("getEntityRecords",Qi);return{listViewRootClientId:l?o[0]:e,isLoading:!n(e)||c}}),[e]),{replaceBlock:r,__unstableMarkNextChangeAsNotPersistent:a}=(0,m.useDispatch)(fe.store),s=(0,g.useCallback)((e=>{"core/navigation-link"!==e.name||e.attributes.url||(a(),r(e.clientId,(0,u.createBlock)("core/navigation-link",e.attributes)))}),[a,r]);return(0,l.createElement)(l.Fragment,null,!n&&(0,l.createElement)(Ji,{rootClientId:t,onSelect:s,blockSettingsMenu:Xi,showAppender:!1}),(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor"},(0,l.createElement)(fe.BlockList,null)))}const eo=()=>{};function to({navigationMenuId:e}){const{storedSettings:t}=(0,m.useSelect)((e=>{const{getSettings:t}=Xe(e(tr));return{storedSettings:t()}}),[]),n=(0,g.useMemo)((()=>e?[(0,u.createBlock)("core/navigation",{ref:e})]:[]),[e]);return e&&n?.length?(0,l.createElement)(fe.BlockEditorProvider,{settings:t,value:n,onChange:eo,onInput:eo},(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__content"},(0,l.createElement)($i,{rootClientId:n[0].clientId}))):null}function no(e){return(0,m.useSelect)((t=>{if(!e)return;const n=t(ye.store).getEditedEntityRecord("postType",xt,e);return"trash"===n.status?void 0:n.title}),[e])}function ro({id:e}){const t=no(e);return e&&void 0!==t?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen-template-part-navigation-menu__title",size:"11",upperCase:!0,weight:500},t||(0,E.__)("Navigation")),(0,l.createElement)(to,{navigationMenuId:e})):null}function ao({id:e}){const t=no(e),n=Et({postId:e,postType:xt});return e&&void 0!==t?(0,l.createElement)(vr,{withChevron:!0,...n},t||(0,E.__)("(no title)")):null}function so({menus:e}){return(0,l.createElement)(_.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-template-part-navigation-menu-list"},e.map((e=>(0,l.createElement)(ao,{key:e,id:e}))))}function io({menus:e}){return e.length?1===e.length?(0,l.createElement)(ro,{id:e[0]}):(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen-template-part-navigation-menu__title",size:"11",upperCase:!0,weight:500},(0,E.__)("Navigation")),(0,l.createElement)(so,{menus:e})):null}function oo(e,t){const{record:n}=Ds(e,t);if(e!==kt)return;const r=function(e){return e?.blocks?e?.blocks:e?.content&&"function"!=typeof e.content?(0,u.parse)(e.content):[]}(n),a=function(e,t){if(!e||!t?.length)return[];const n=t=>{if(!t)return[];const r=[];for(const a of t)if(a.name===e&&r.push(a),a?.innerBlocks){const e=n(a.innerBlocks);e.length&&r.push(...e)}return r};return n(t)}("core/navigation",r);if(!a.length)return;const s=a?.map((e=>e.attributes.ref)),i=[...new Set(s)].filter((e=>e));return i?.length?(0,l.createElement)(io,{menus:i}):void 0}function lo(e,t){const{getDescription:n,getTitle:r,record:a}=Ds(e,t),s=(0,m.useSelect)((e=>e(y.store).__experimentalGetDefaultTemplatePartAreas()),[]),{currentTheme:i,userPatternCategories:o}=(0,m.useSelect)((e=>{const{getCurrentTheme:t,getUserPatternCategories:n}=e(ye.store);return{currentTheme:t(),userPatternCategories:n()}}),[]),c=Bs(e,t),u="theme"===c.type&&a.theme===i?.stylesheet,d=r();let p=n();!p&&c.text&&(p=e===It.user?(0,E.sprintf)((0,E.__)("This is the %s pattern."),r()):(0,E.sprintf)((0,E.__)("This is the %s template part."),r())),!p&&e===It.user&&a?.title&&(p=(0,E.sprintf)((0,E.__)("This is the %s pattern."),a.title));const h=a?.modified?(0,l.createElement)(Ca,{record:a}):null,f=[];if((e===It.user||e===kt)&&(f.push({label:(0,E.__)("Syncing"),value:a.wp_pattern_sync_status===Nt.unsynced?(0,E._x)("Not synced","Text that indicates that the pattern is not synchronized"):(0,E._x)("Synced","Text that indicates that the pattern is synchronized")}),0===a.wp_pattern_category?.length&&f.push({label:(0,E.__)("Categories"),value:(0,E.__)("Uncategorized")}),a.wp_pattern_category?.length>0)){const e=new Map;o.forEach((t=>e.set(t.id,t)));const t=a.wp_pattern_category.filter((t=>e.get(t))).map((t=>e.get(t).label));f.push({label:(0,E.__)("Categories"),value:t.length>0?t.join(", "):""})}if(e===kt){const e=s.find((e=>e.area===a.area));let t=e?.label;t||(t=a.area?(0,E.sprintf)((0,E.__)("%s (removed)"),(g=a.area,void 0===v&&(v={}),vs(g,hs({delimiter:" ",transform:zi},v)))):(0,E.__)("None")),f.push({label:(0,E.__)("Area"),value:t})}var g,v;e===kt&&c.text&&!u&&f.push({label:(0,E.__)("Added by"),value:(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-pattern__added-by-description-author"},c.text)}),e!==kt||!c.text||a.origin!==Tt.plugin&&!0!==a.has_theme_file||f.push({label:(0,E.__)("Customized"),value:(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-pattern__added-by-description-customized"},c.isCustomized?(0,E.__)("Yes"):(0,E.__)("No"))});return{title:d,description:p,content:(0,l.createElement)(l.Fragment,null,oo(e,t),!!f.length&&(0,l.createElement)(xa,{spacing:5,title:(0,E.__)("Details")},f.map((({label:e,value:t})=>(0,l.createElement)(wa,{key:e},(0,l.createElement)(Ea,null,e),(0,l.createElement)(Sa,null,t)))))),footer:h}}function co(){const e=(0,_.__experimentalUseNavigator)(),{params:{postType:t,postId:n}}=e,{categoryType:r}=(0,yt.getQueryArgs)(window.location.href),{setCanvasMode:a}=Xe((0,m.useDispatch)(tr));Bi();const s=lo(t,n),i=r||t!==kt?"/patterns":"/wp_template_part/all";return(0,l.createElement)(hr,{actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Us,{postType:t,postId:n,toggleProps:{as:mr},onRemove:()=>{e.goTo(i)}}),(0,l.createElement)(mr,{onClick:()=>a("edit"),label:(0,E.__)("Edit"),icon:_r})),backPath:i,...s})}const uo={per_page:100,status:["publish","draft"],order:"desc",orderby:"date"},mo=e=>e?.trim()?.length>0;function po({menuTitle:e,onClose:t,onSave:n}){const[r,a]=(0,g.useState)(e),s=r!==e&&mo(r);return(0,l.createElement)(_.Modal,{title:(0,E.__)("Rename"),onRequestClose:t},(0,l.createElement)("form",{className:"sidebar-navigation__rename-modal-form"},(0,l.createElement)(_.__experimentalVStack,{spacing:"3"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:r,placeholder:(0,E.__)("Navigation title"),onChange:a}),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t},(0,E.__)("Cancel")),(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,disabled:!s,variant:"primary",type:"submit",onClick:e=>{e.preventDefault(),s&&(n({title:r}),t())}},(0,E.__)("Save"))))))}function ho({onClose:e,onConfirm:t}){return(0,l.createElement)(_.__experimentalConfirmDialog,{isOpen:!0,onConfirm:n=>{n.preventDefault(),t(),e()},onCancel:e,confirmButtonText:(0,E.__)("Delete")},(0,E.__)("Are you sure you want to delete this Navigation menu?"))}const fo={position:"bottom right"};function go(e){const{onDelete:t,onSave:n,onDuplicate:r,menuTitle:a}=e,[s,i]=(0,g.useState)(!1),[o,c]=(0,g.useState)(!1),u=()=>{i(!1),c(!1)};return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.DropdownMenu,{className:"sidebar-navigation__more-menu",label:(0,E.__)("Actions"),icon:ue,popoverProps:fo},(({onClose:e})=>(0,l.createElement)("div",null,(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(_.MenuItem,{onClick:()=>{i(!0),e()}},(0,E.__)("Rename")),(0,l.createElement)(_.MenuItem,{onClick:()=>{r(),e()}},(0,E.__)("Duplicate")),(0,l.createElement)(_.MenuItem,{isDestructive:!0,onClick:()=>{c(!0),e()}},(0,E.__)("Delete")))))),o&&(0,l.createElement)(ho,{onClose:u,onConfirm:t}),s&&(0,l.createElement)(po,{onClose:u,menuTitle:a,onSave:n}))}function yo(e,t,n){return e?.rendered?"publish"===n?(0,en.decodeEntities)(e?.rendered):(0,E.sprintf)((0,E.__)("%1$s (%2$s)"),(0,en.decodeEntities)(e?.rendered),n):(0,E.sprintf)((0,E.__)("(no title %s)"),t)}function vo({postId:e}){const t=Et({postId:e,postType:xt,canvas:"edit"});return(0,l.createElement)(mr,{...t,label:(0,E.__)("Edit"),icon:_r})}function bo({navigationMenu:e,handleDelete:t,handleDuplicate:n,handleSave:r}){const a=e?.title?.rendered;return(0,l.createElement)(Po,{actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(go,{menuTitle:(0,en.decodeEntities)(a),onDelete:t,onSave:r,onDuplicate:n}),(0,l.createElement)(vo,{postId:e?.id})),title:yo(e?.title,e?.id,e?.status),description:(0,E.__)("Navigation menus are a curated collection of blocks that allow visitors to get around your site.")},(0,l.createElement)(to,{navigationMenuId:e?.id}))}const _o="wp_navigation";function Eo(){const{params:{postId:e}}=(0,_.__experimentalUseNavigator)(),{record:t,isResolving:n}=(0,ye.useEntityRecord)("postType",_o,e),{isSaving:r,isDeleting:a}=(0,m.useSelect)((t=>{const{isSavingEntityRecord:n,isDeletingEntityRecord:r}=t(ye.store);return{isSaving:n("postType",_o,e),isDeleting:r("postType",_o,e)}}),[e]),s=n||r||a,i=t?.title?.rendered||t?.slug,{handleSave:o,handleDelete:c,handleDuplicate:u}=Co(),d=()=>c(t),p=e=>o(t,e),h=()=>u(t);return s?(0,l.createElement)(Po,{description:(0,E.__)("Navigation menus are a curated collection of blocks that allow visitors to get around your site.")},(0,l.createElement)(_.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})):s||t?t?.content?.raw?(0,l.createElement)(bo,{navigationMenu:t,handleDelete:d,handleSave:p,handleDuplicate:h}):(0,l.createElement)(Po,{actions:(0,l.createElement)(go,{menuTitle:(0,en.decodeEntities)(i),onDelete:d,onSave:p,onDuplicate:h}),title:yo(t?.title,t?.id,t?.status),description:(0,E.__)("This Navigation Menu is empty.")}):(0,l.createElement)(Po,{description:(0,E.__)("Navigation Menu missing.")})}function wo(){const{goTo:e}=(0,_.__experimentalUseNavigator)(),{deleteEntityRecord:t}=(0,m.useDispatch)(ye.store),{createSuccessNotice:n,createErrorNotice:r}=(0,m.useDispatch)(ge.store);return async a=>{const s=a?.id;try{await t("postType",_o,s,{force:!0},{throwOnError:!0}),n((0,E.__)("Deleted Navigation menu"),{type:"snackbar"}),e("/navigation")}catch(e){r((0,E.sprintf)((0,E.__)("Unable to delete Navigation menu (%s)."),e?.message),{type:"snackbar"})}}}function So(){const{getEditedEntityRecord:e}=(0,m.useSelect)((e=>{const{getEditedEntityRecord:t}=e(ye.store);return{getEditedEntityRecord:t}}),[]),{editEntityRecord:t,__experimentalSaveSpecifiedEntityEdits:n}=(0,m.useDispatch)(ye.store),{createSuccessNotice:r,createErrorNotice:a}=(0,m.useDispatch)(ge.store);return async(s,i)=>{if(!i)return;const o=s?.id,l=e("postType",xt,o);t("postType",_o,o,i);const c=Object.keys(i);try{await n("postType",_o,o,c,{throwOnError:!0}),r((0,E.__)("Renamed Navigation menu"),{type:"snackbar"})}catch(e){t("postType",_o,o,l),a((0,E.sprintf)((0,E.__)("Unable to rename Navigation menu (%s)."),e?.message),{type:"snackbar"})}}}function xo(){const{goTo:e}=(0,_.__experimentalUseNavigator)(),{saveEntityRecord:t}=(0,m.useDispatch)(ye.store),{createSuccessNotice:n,createErrorNotice:r}=(0,m.useDispatch)(ge.store);return async a=>{const s=a?.title?.rendered||a?.slug;try{const r=await t("postType",_o,{title:(0,E.sprintf)((0,E.__)("%s (Copy)"),s),content:a?.content?.raw,status:"publish"},{throwOnError:!0});r&&(n((0,E.__)("Duplicated Navigation menu"),{type:"snackbar"}),e(`/navigation/${_o}/${r.id}`))}catch(e){r((0,E.sprintf)((0,E.__)("Unable to duplicate Navigation menu (%s)."),e?.message),{type:"snackbar"})}}}function Co(){return{handleDelete:wo(),handleSave:So(),handleDuplicate:xo()}}let ko=!1;function To(){const{records:e,isResolving:t,hasResolved:n}=(0,ye.useEntityRecords)("postType",xt,uo),r=t&&!n,{getNavigationFallbackId:a}=Xe((0,m.useSelect)(ye.store)),s=e?.[0];s&&(ko=!0),s||t||!n||ko||a();const{handleSave:i,handleDelete:o,handleDuplicate:c}=Co(),u=!!e?.length;return r?(0,l.createElement)(Po,null,(0,l.createElement)(_.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})):r||u?1===e?.length?(0,l.createElement)(bo,{navigationMenu:s,handleDelete:()=>o(s),handleDuplicate:()=>c(s),handleSave:e=>i(s,e)}):(0,l.createElement)(Po,null,(0,l.createElement)(_.__experimentalItemGroup,null,e?.map((({id:e,title:t,status:n},r)=>(0,l.createElement)(Io,{postId:e,key:e,withChevron:!0,icon:sr},function(e,t,n){return e?"publish"===n?(0,en.decodeEntities)(e):(0,E.sprintf)((0,E.__)("%1$s (%2$s)"),(0,en.decodeEntities)(e),n):(0,E.sprintf)((0,E.__)("(no title %s)"),t)}(t?.rendered,r+1,n)))))):(0,l.createElement)(Po,{description:(0,E.__)("No Navigation Menus found.")})}function Po({children:e,actions:t,title:n,description:r}){return(0,l.createElement)(hr,{title:n||(0,E.__)("Navigation"),actions:t,description:r||(0,E.__)("Manage your Navigation menus."),content:e})}const Io=({postId:e,...t})=>{const n=Et({postId:e,postType:xt});return(0,l.createElement)(vr,{...n,...t})},Mo=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.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-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})),Ao=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})),Oo=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),No=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"})),Fo=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M4.67 10.664s-2.09 1.11-2.917 1.582l.494.87 1.608-.914.002.002c.343.502.86 1.17 1.563 1.84.348.33.742.663 1.185.976L5.57 16.744l.858.515 1.02-1.701a9.1 9.1 0 0 0 4.051 1.18V19h1v-2.263a9.1 9.1 0 0 0 4.05-1.18l1.021 1.7.858-.514-1.034-1.723c.442-.313.837-.646 1.184-.977.703-.669 1.22-1.337 1.563-1.839l.002-.003 1.61.914.493-.87c-1.75-.994-2.918-1.58-2.918-1.58l-.003.005a8.29 8.29 0 0 1-.422.689 10.097 10.097 0 0 1-1.36 1.598c-1.218 1.16-3.042 2.293-5.544 2.293-2.503 0-4.327-1.132-5.546-2.293a10.099 10.099 0 0 1-1.359-1.599 8.267 8.267 0 0 1-.422-.689l-.003-.005Z"}));function Ro({selection:e,onSelectionChange:t,item:n,data:r,getItemId:a,primaryField:s,disabled:i}){const o=a(n),c=e.includes(o);let u;return u=s?.getValue&&n?(0,E.sprintf)(c?(0,E.__)("Deselect item: %s"):(0,E.__)("Select item: %s"),s.getValue({item:n})):c?(0,E.__)("Select a new item"):(0,E.__)("Deselect item"),(0,l.createElement)(_.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",__nextHasNoMarginBottom:!0,label:u,"aria-disabled":i,checked:c,onChange:()=>{i||t(c?r.filter((t=>{const n=a?.(t);return n!==o&&e.includes(n)})):r.filter((t=>{const n=a?.(t);return n===o||e.includes(n)})))}})}const{lock:Do,unlock:Vo}=(0,Ye.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/dataviews"),{DropdownMenuV2:Lo,DropdownMenuGroupV2:Bo,DropdownMenuItemV2:zo,DropdownMenuItemLabelV2:Ho,kebabCase:Go}=Vo(_.privateApis);function Uo({action:e,onClick:t}){return(0,l.createElement)(_.Button,{label:e.label,icon:e.icon,isDestructive:e.isDestructive,size:"compact",onClick:t})}function Wo({action:e,onClick:t}){return(0,l.createElement)(zo,{onClick:t,hideOnClick:!e.RenderModal},(0,l.createElement)(Ho,null,e.label))}function jo({action:e,item:t,ActionTrigger:n}){const[r,a]=(0,g.useState)(!1),s={action:e,onClick:()=>a(!0)},{RenderModal:i,hideModalHeader:o}=e;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(n,{...s}),r&&(0,l.createElement)(_.Modal,{title:e.modalHeader||e.label,__experimentalHideHeader:!!o,onRequestClose:()=>{a(!1)},overlayClassName:`dataviews-action-modal dataviews-action-modal__${Go(e.id)}`},(0,l.createElement)(i,{items:[t],closeModal:()=>a(!1)})))}function Zo({actions:e,item:t}){return(0,l.createElement)(Bo,null,e.map((e=>e.RenderModal?(0,l.createElement)(jo,{key:e.id,action:e,item:t,ActionTrigger:Wo}):(0,l.createElement)(Wo,{key:e.id,action:e,onClick:()=>e.callback([t])}))))}function qo({item:e,actions:t,isCompact:n}){const{primaryActions:r,secondaryActions:a}=(0,g.useMemo)((()=>t.reduce(((t,n)=>(n.isEligible&&!n.isEligible(e)||(n.isPrimary&&n.icon?t.primaryActions.push(n):t.secondaryActions.push(n)),t)),{primaryActions:[],secondaryActions:[]})),[t,e]);return n?(0,l.createElement)(Yo,{item:e,primaryActions:r,secondaryActions:a}):(0,l.createElement)(_.__experimentalHStack,{spacing:1,justify:"flex-end",style:{flexShrink:"0",width:"auto"}},!!r.length&&r.map((t=>t.RenderModal?(0,l.createElement)(jo,{key:t.id,action:t,item:e,ActionTrigger:Uo}):(0,l.createElement)(Uo,{key:t.id,action:t,onClick:()=>t.callback([e])}))),(0,l.createElement)(Lo,{trigger:(0,l.createElement)(_.Button,{size:"compact",icon:ue,label:(0,E.__)("Actions"),disabled:!a.length}),placement:"bottom-end"},(0,l.createElement)(Zo,{actions:a,item:e})))}function Yo({item:e,primaryActions:t,secondaryActions:n}){return(0,l.createElement)(Lo,{trigger:(0,l.createElement)(_.Button,{size:"compact",icon:ue,label:(0,E.__)("Actions"),disabled:!t.length&&!n.length}),placement:"bottom-end"},!!t.length&&(0,l.createElement)(Zo,{actions:t,item:e}),!!n.length&&(0,l.createElement)(Zo,{actions:n,item:e}))}const Ko=({data:e,view:t,fields:n,textFields:r})=>{const a=[...e],s=t.sort.field;if(r.includes(s)){const e=n.find((e=>e.id===s));a.sort(((n,r)=>{var a,s;const i=null!==(a=e.getValue({item:n}))&&void 0!==a?a:"",o=null!==(s=e.getValue({item:r}))&&void 0!==s?s:"";return"asc"===t.sort.direction?i.localeCompare(o):o.localeCompare(i)}))}return a};function Xo({data:e,view:t}){const n=(t.page-1)*t.perPage,r=e?.length||0;return e=e?.slice(n,n+t.perPage),{data:e,paginationInfo:{totalItems:r,totalPages:Math.ceil(r/t.perPage)}}}const Jo=e=>{let t=e.filterBy?.operators;return t&&Array.isArray(t)||(t=Object.keys(xl)),t.filter((e=>Object.keys(xl).includes(e)))},{DropdownMenuV2:Qo,DropdownMenuGroupV2:$o,DropdownMenuItemV2:el,DropdownMenuSeparatorV2:tl}=Vo(_.privateApis);function nl(e,t){return(0,g.useMemo)((()=>e.some((e=>e.supportsBulk&&e.isEligible(t)))),[e,t])}function rl({action:e,selectedItems:t,setActionWithModal:n,onMenuOpenChange:r}){const a=(0,g.useMemo)((()=>t.filter((t=>e.isEligible(t)))),[e,t]),{RenderModal:s,hideModalHeader:i}=e,o=(0,g.useCallback)((()=>{n(void 0)}),[n]);return(0,l.createElement)(_.Modal,{title:!i&&e.label,__experimentalHideHeader:!!i,onRequestClose:o,overlayClassName:"dataviews-action-modal"},(0,l.createElement)(s,{items:a,closeModal:o,onPerform:()=>r(!1)}))}function al({action:e,selectedItems:t,setActionWithModal:n}){const r=(0,g.useMemo)((()=>t.filter((t=>e.isEligible(t)))),[e,t]),a=!!e.RenderModal;return(0,l.createElement)(el,{key:e.id,disabled:0===r.length,hideOnClick:!a,onClick:async()=>{a?n(e):await e.callback(r)},suffix:r.length>0?r.length:void 0},e.label)}function sl({actions:e,selectedItems:t,setActionWithModal:n}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)($o,null,e.map((e=>(0,l.createElement)(al,{key:e.id,action:e,selectedItems:t,setActionWithModal:n})))),(0,l.createElement)(tl,null))}function il({data:e,actions:t,selection:n,onSelectionChange:r,getItemId:a}){const s=(0,g.useMemo)((()=>t.filter((e=>e.supportsBulk))),[t]),[i,o]=(0,g.useState)(!1),[c,u]=(0,g.useState)(),d=(0,g.useMemo)((()=>e.filter((e=>s.some((t=>t.isEligible(e)))))),[e,s]),m=d.length,p=n&&n.length===m,h=(0,g.useMemo)((()=>e.filter((e=>n.includes(a(e))))),[n,e,a]),f=(0,g.useMemo)((()=>h.some((e=>!d.includes(e)))),[h,d]);return(0,g.useEffect)((()=>{f&&r(h.filter((e=>d.some((t=>a(e)===a(t))))))}),[f,h,d,a,r]),0===s.length?null:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Qo,{open:i,onOpenChange:o,label:(0,E.__)("Bulk actions"),style:{minWidth:"240px"},trigger:(0,l.createElement)(_.Button,{className:"dataviews-bulk-edit-button",__next40pxDefaultSize:!0,variant:"tertiary",size:"compact"},n.length?(0,E.sprintf)((0,E._n)("Edit %d item","Edit %d items",n.length),n.length):(0,E.__)("Bulk edit"))},(0,l.createElement)(sl,{actions:s,setActionWithModal:u,selectedItems:h}),(0,l.createElement)($o,null,(0,l.createElement)(el,{disabled:p,hideOnClick:!1,onClick:()=>{r(d)},suffix:m},(0,E.__)("Select all")),(0,l.createElement)(el,{disabled:0===n.length,hideOnClick:!1,onClick:()=>{r([])}},(0,E.__)("Deselect")))),c&&(0,l.createElement)(rl,{action:c,selectedItems:h,setActionWithModal:u,onMenuOpenChange:o}))}const{DropdownMenuV2:ol,DropdownMenuGroupV2:ll,DropdownMenuItemV2:cl,DropdownMenuRadioItemV2:ul,DropdownMenuItemLabelV2:dl,DropdownMenuSeparatorV2:ml}=Vo(_.privateApis);function pl({children:e}){return g.Children.toArray(e).filter(Boolean).map(((e,t)=>(0,l.createElement)(g.Fragment,{key:t},t>0&&(0,l.createElement)(ml,null),e)))}const hl={asc:"↑",desc:"↓"},fl=(0,g.forwardRef)((function({field:e,view:t,onChangeView:n,onHide:r,setOpenedFilter:a},s){const i=!1!==e.enableHiding,o=!1!==e.enableSorting,c=t.sort?.field===e.id,u=Jo(e),d=!t.filters?.some((t=>e.id===t.field))&&e.type===El&&!!u.length&&!e.filterBy?.isPrimary;return o||i||d?(0,l.createElement)(ol,{align:"start",trigger:(0,l.createElement)(_.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:s,variant:"tertiary"},e.header,c&&(0,l.createElement)("span",{"aria-hidden":"true"},c&&hl[t.sort.direction])),style:{minWidth:"240px"}},(0,l.createElement)(pl,null,o&&(0,l.createElement)(ll,null,Object.entries(Cl).map((([r,a])=>{const s=c&&t.sort.direction===r,i=`${e.id}-${r}`;return(0,l.createElement)(ul,{key:i,name:"view-table-sorting",value:i,checked:s,onChange:()=>{n({...t,sort:{field:e.id,direction:r}})}},(0,l.createElement)(dl,null,a.label))}))),d&&(0,l.createElement)(ll,null,(0,l.createElement)(cl,{prefix:(0,l.createElement)(_.Icon,{icon:No}),onClick:()=>{a(e.id),n({...t,page:1,filters:[...t.filters||[],{field:e.id,value:void 0,operator:u[0]}]})}},(0,l.createElement)(dl,null,(0,E.__)("Add filter")))),i&&(0,l.createElement)(cl,{prefix:(0,l.createElement)(_.Icon,{icon:Fo}),onClick:()=>{r(e),n({...t,hiddenFields:t.hiddenFields.concat(e.id)})}},(0,l.createElement)(dl,null,(0,E.__)("Hide"))))):e.header}));function gl({selection:e,onSelectionChange:t,data:n,actions:r}){const a=(0,g.useMemo)((()=>n.filter((e=>r.some((t=>t.supportsBulk&&t.isEligible(e)))))),[n,r]),s=e.length===a.length;return(0,l.createElement)(_.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",__nextHasNoMarginBottom:!0,checked:s,indeterminate:!s&&e.length,onChange:()=>{t(s?[]:a)},label:s?(0,E.__)("Deselect all"):(0,E.__)("Select all")})}function yl({hasBulkActions:e,item:t,actions:n,id:r,visibleFields:a,primaryField:s,selection:i,getItemId:o,onSelectionChange:c,data:u}){const d=nl(n,t);return(0,l.createElement)("tr",{className:b()("dataviews-view-table__row",{"is-selected":d&&i.includes(r)})},e&&(0,l.createElement)("td",{className:"dataviews-view-table__checkbox-column",style:{width:20,minWidth:20}},(0,l.createElement)("div",{className:"dataviews-view-table__cell-content-wrapper"},(0,l.createElement)(Ro,{id:r,item:t,selection:i,onSelectionChange:c,getItemId:o,data:u,primaryField:s,disabled:!d}))),a.map((e=>(0,l.createElement)("td",{key:e.id,style:{width:e.width||void 0,minWidth:e.minWidth||void 0,maxWidth:e.maxWidth||void 0}},(0,l.createElement)("div",{className:b()("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__primary-field":s?.id===e.id})},e.render({item:t}))))),!!n?.length&&(0,l.createElement)("td",{className:"dataviews-view-table__actions-column"},(0,l.createElement)(qo,{item:t,actions:n})))}const vl=function({view:e,onChangeView:t,fields:n,actions:r,data:a,getItemId:s,isLoading:i=!1,deferredRendering:o,selection:c,onSelectionChange:u,setOpenedFilter:d}){const m=(0,g.useRef)(new Map),p=(0,g.useRef)(),[h,f]=(0,g.useState)(),y=function(e,t){return(0,g.useMemo)((()=>t.some((t=>e.some((e=>e.supportsBulk&&e.isEligible(t)))))),[e,t])}(r,a);(0,g.useEffect)((()=>{p.current&&(p.current.focus(),p.current=void 0)}));const v=(0,ie.useAsyncList)(a),_=(0,g.useId)();if(h)return p.current=h,void f();const w=e=>{const t=m.current.get(e.id),n=m.current.get(t.fallback);f(n?.node)},S=n.filter((t=>!e.hiddenFields.includes(t.id)&&![e.layout.mediaField].includes(t.id))),x=o?v:a,C=!!x?.length,k={asc:"ascending",desc:"descending"},T=n.find((t=>t.id===e.layout.primaryField));return(0,l.createElement)(g.Fragment,null,(0,l.createElement)("table",{className:"dataviews-view-table","aria-busy":i,"aria-describedby":_},(0,l.createElement)("thead",null,(0,l.createElement)("tr",{className:"dataviews-view-table__row"},y&&(0,l.createElement)("th",{className:"dataviews-view-table__checkbox-column",style:{width:20,minWidth:20},"data-field-id":"selection",scope:"col"},(0,l.createElement)(gl,{selection:c,onSelectionChange:u,data:a,actions:r})),S.map(((n,r)=>(0,l.createElement)("th",{key:n.id,style:{width:n.width||void 0,minWidth:n.minWidth||void 0,maxWidth:n.maxWidth||void 0},"data-field-id":n.id,"aria-sort":e.sort?.field===n.id&&k[e.sort.direction],scope:"col"},(0,l.createElement)(fl,{ref:e=>{e?m.current.set(n.id,{node:e,fallback:S[r>0?r-1:1]?.id}):m.current.delete(n.id)},field:n,view:e,onChangeView:t,onHide:w,setOpenedFilter:d})))),!!r?.length&&(0,l.createElement)("th",{"data-field-id":"actions",className:"dataviews-view-table__actions-column"},(0,l.createElement)("span",{className:"dataviews-view-table-header"},(0,E.__)("Actions"))))),(0,l.createElement)("tbody",null,C&&x.map(((e,t)=>(0,l.createElement)(yl,{key:s(e),item:e,hasBulkActions:y,actions:r,id:s(e)||t,visibleFields:S,primaryField:T,selection:c,getItemId:s,onSelectionChange:u,data:a}))))),(0,l.createElement)("div",{className:b()({"dataviews-loading":i,"dataviews-no-results":!C&&!i}),id:_},!C&&(0,l.createElement)("p",null,i?(0,E.__)("Loading…"):(0,E.__)("No results"))))};function bl({selection:e,data:t,onSelectionChange:n,getItemId:r,item:a,actions:s,mediaField:i,primaryField:o,visibleFields:c}){const[u,d]=(0,g.useState)(!1),m=nl(s,a),p=r(a),h=e.includes(p);return(0,l.createElement)(_.__experimentalVStack,{spacing:0,key:p,className:b()("dataviews-view-grid__card",{"is-selected":m&&h,"has-no-pointer-events":u}),onMouseDown:a=>{m&&(a.ctrlKey||a.metaKey)&&(d(!0),n(h?t.filter((t=>{const n=r?.(t);return n!==p&&e.includes(n)})):t.filter((t=>{const n=r?.(t);return n===p||e.includes(n)}))))},onClick:()=>{u&&d(!1)}},(0,l.createElement)("div",{className:"dataviews-view-grid__media"},i?.render({item:a})),(0,l.createElement)(_.__experimentalHStack,{justify:"space-between",className:"dataviews-view-grid__title-actions"},(0,l.createElement)(Ro,{id:p,item:a,selection:e,onSelectionChange:n,getItemId:r,data:t,primaryField:o,disabled:!m}),(0,l.createElement)(_.__experimentalHStack,{className:"dataviews-view-grid__primary-field"},o?.render({item:a})),(0,l.createElement)(qo,{item:a,actions:s,isCompact:!0})),(0,l.createElement)(_.__experimentalVStack,{className:"dataviews-view-grid__fields",spacing:3},c.map((e=>{const t=e.render({item:a});return t?(0,l.createElement)(_.__experimentalVStack,{className:"dataviews-view-grid__field",key:e.id,spacing:1},(0,l.createElement)(_.Tooltip,{text:e.header,placement:"left"},(0,l.createElement)("div",{className:"dataviews-view-grid__field-value"},t))):null}))))}const _l=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));const El="enumeration",wl="in",Sl="notIn",xl={[wl]:{key:"in-filter",label:(0,E.__)("Is")},[Sl]:{key:"not-in-filter",label:(0,E.__)("Is not")}},Cl={asc:{label:(0,E.__)("Sort ascending")},desc:{label:(0,E.__)("Sort descending")}},kl="table",Tl="grid",Pl=[{type:kl,label:(0,E.__)("Table"),component:vl,icon:Mo},{type:Tl,label:(0,E.__)("Grid"),component:function({data:e,fields:t,view:n,actions:r,isLoading:a,getItemId:s,deferredRendering:i,selection:o,onSelectionChange:c}){const u=t.find((e=>e.id===n.layout.mediaField)),d=t.find((e=>e.id===n.layout.primaryField)),m=t.filter((e=>!n.hiddenFields.includes(e.id)&&![n.layout.mediaField,n.layout.primaryField].includes(e.id))),p=(0,ie.useAsyncList)(e,{step:3}),h=i?p:e,f=!!h?.length;return(0,l.createElement)(l.Fragment,null,f&&(0,l.createElement)(_.__experimentalGrid,{gap:6,columns:2,alignment:"top",className:"dataviews-view-grid","aria-busy":a},h.map((t=>(0,l.createElement)(bl,{key:s(t),selection:o,data:e,onSelectionChange:c,getItemId:s,item:t,actions:r,mediaField:u,primaryField:d,visibleFields:m})))),!f&&(0,l.createElement)("div",{className:b()({"dataviews-loading":a,"dataviews-no-results":!a})},(0,l.createElement)("p",null,a?(0,E.__)("Loading…"):(0,E.__)("No results"))))},icon:za},{type:"list",label:(0,E.__)("List"),component:function({view:e,fields:t,data:n,isLoading:r,getItemId:a,onSelectionChange:s,onDetailsChange:i,selection:o,deferredRendering:c}){const u=(0,ie.useAsyncList)(n,{step:3}),d=c?u:n,m=t.find((t=>t.id===e.layout.mediaField)),p=t.find((t=>t.id===e.layout.primaryField)),h=t.filter((t=>!e.hiddenFields.includes(t.id)&&![e.layout.primaryField,e.layout.mediaField].includes(t.id))),f=e=>t=>{const{keyCode:n}=t;[wr.ENTER,wr.SPACE].includes(n)&&s([e])},g=d?.length;return g?(0,l.createElement)("ul",{className:"dataviews-view-list"},d.map((e=>(0,l.createElement)("li",{key:a(e),className:b()({"is-selected":o.includes(e.id)})},(0,l.createElement)(_.__experimentalHStack,{className:"dataviews-view-list__item-wrapper"},(0,l.createElement)("div",{role:"button",tabIndex:0,"aria-pressed":o.includes(e.id),onKeyDown:f(e),className:"dataviews-view-list__item",onClick:()=>s([e])},(0,l.createElement)(_.__experimentalHStack,{spacing:3,justify:"start",alignment:"flex-start"},(0,l.createElement)("div",{className:"dataviews-view-list__media-wrapper"},m?.render({item:e})||(0,l.createElement)("div",{className:"dataviews-view-list__media-placeholder"})),(0,l.createElement)(_.__experimentalVStack,{spacing:1},(0,l.createElement)("span",{className:"dataviews-view-list__primary-field"},p?.render({item:e})),(0,l.createElement)("div",{className:"dataviews-view-list__fields"},h.map((t=>(0,l.createElement)("span",{key:t.id,className:"dataviews-view-list__field"},t.render({item:e})))))))),i&&(0,l.createElement)(_.Button,{className:"dataviews-view-list__details-button",onClick:()=>i([e]),icon:_l,label:(0,E.__)("View details"),size:"compact"})))))):(0,l.createElement)("div",{className:b()({"dataviews-loading":r,"dataviews-no-results":!g&&!r})},!g&&(0,l.createElement)("p",null,r?(0,E.__)("Loading…"):(0,E.__)("No results")))},icon:(0,E.isRTL)()?Ao:Oo}],{useLocation:Il}=Xe(gt.privateApis);function Ml({title:e,slug:t,customViewId:n,type:r,icon:a,isActive:s,isCustom:i,suffix:o}){const{params:{path:c,layout:u}}=Il(),d=a||Pl.find((e=>e.type===r)).icon,m=Et({path:c,layout:u,activeView:"true"===i?n:t,isCustom:i});return(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start",className:b()("edit-site-sidebar-dataviews-dataview-item",{"is-selected":s})},(0,l.createElement)(vr,{icon:d,...m,"aria-current":s?"true":void 0},e),o)}const Al=[];function Ol({template:e,isActive:t}){const{text:n,icon:r}=Bs(e.type,e.id);return(0,l.createElement)(Ml,{key:n,slug:n,title:n,icon:r,isActive:t,isCustom:"false"})}function Nl({activeView:e,postType:t,title:n}){const{records:r}=(0,ye.useEntityRecords)("postType",t,{per_page:-1}),a=(0,g.useMemo)((()=>{var e;const t=r?.reduce(((e,t)=>{const n=t.author_text;return n&&!e[n]&&(e[n]=t),e}),{});return null!==(e=t&&Object.values(t))&&void 0!==e?e:Al}),[r]);return(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(Ml,{slug:"all",title:n,icon:lr,isActive:"all"===e,isCustom:"false"}),a.map((t=>(0,l.createElement)(Ol,{key:t.author_text,template:t,isActive:e===t.author_text}))))}const Fl={[Ct]:{title:(0,E.__)("Manage templates"),description:(0,E.__)("Create new templates, or reset any customizations made to the templates supplied by your theme."),contentTitle:(0,E.__)("All templates")},[kt]:{title:(0,E.__)("Manage template parts"),description:(0,E.__)("Create new template parts, or reset any customizations made to the template parts supplied by your theme."),backPath:"/patterns",contentTitle:(0,E.__)("All template parts")}},{useLocation:Rl}=Xe(gt.privateApis);function Dl(){const{params:{postType:e}}=(0,_.__experimentalUseNavigator)(),{params:{didAccessPatternsPage:t,activeView:n="all"}}=Rl(),r=(0,m.useSelect)((e=>!!e(tr).getSettings().supportsTemplatePartsMode),[]);return(0,l.createElement)(hr,{isRoot:r&&!t,title:Fl[e].title,description:Fl[e].description,backPath:Fl[e].backPath,content:(0,l.createElement)(Nl,{activeView:n,postType:e,title:Fl[e].contentTitle})})}function Vl({className:e="edit-site-save-button__button",variant:t="primary",showTooltip:n=!0,defaultLabel:r,icon:a,__next40pxDefaultSize:s=!1}){const{isDirty:i,isSaving:o,isSaveViewOpen:c,previewingThemeName:u}=(0,m.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,isSavingEntityRecord:n,isResolving:r}=e(ye.store),a=t(),{isSaveViewOpened:s}=e(tr),i=r("activateTheme"),o=bt();return{isDirty:a.length>0,isSaving:a.some((e=>n(e.kind,e.name,e.key)))||i,isSaveViewOpen:s(),previewingThemeName:o?e(ye.store).getTheme(o)?.name?.rendered:void 0}}),[]),{setIsSaveViewOpened:d}=(0,m.useDispatch)(tr),p=vt()||i,h=o||!p,f=vt()?o?(0,E.sprintf)((0,E.__)("Activating %s"),u):h?(0,E.__)("Saved"):i?(0,E.sprintf)((0,E.__)("Activate %s & Save"),u):(0,E.sprintf)((0,E.__)("Activate %s"),u):o?(0,E.__)("Saving"):h?(0,E.__)("Saved"):r||(0,E.__)("Save");return(0,l.createElement)(_.Button,{variant:t,className:e,"aria-disabled":h,"aria-expanded":c,isBusy:o,onClick:h?void 0:()=>d(!0),label:f,shortcut:h?void 0:wr.displayShortcut.primary("s"),showTooltip:n,icon:a,__next40pxDefaultSize:s,size:"compact"},f)}const{useLocation:Ll}=Xe(gt.privateApis),Bl=[{kind:"postType",name:xt}];function zl(){const e="site-edit-save-notice",{params:t}=Ll(),{__unstableMarkLastChangeAsPersistent:n}=(0,m.useDispatch)(fe.store),{createSuccessNotice:r,createErrorNotice:a,removeNotice:s}=(0,m.useDispatch)(ge.store),{dirtyCurrentEntity:i,countUnsavedChanges:o,isDirty:c,isSaving:u}=(0,m.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:n,isSavingEntityRecord:r}=e(ye.store),a=n();let s=null;return 1===a.length&&(t.path?.includes("wp_global_styles")?s=a.find((e=>"globalStyles"===e.name)):t.postId&&(s=a.find((e=>e.name===t.postType&&String(e.key)===t.postId)))),{dirtyCurrentEntity:s,isDirty:a.length>0,isSaving:a.some((e=>r(e.kind,e.name,e.key))),countUnsavedChanges:a.length}}),[t.path,t.postType,t.postId]),{editEntityRecord:d,saveEditedEntityRecord:p,__experimentalSaveSpecifiedEntityEdits:h}=(0,m.useDispatch)(ye.store),f=u||!c&&!vt();let g=i?(0,E.__)("Save"):(0,E.sprintf)((0,E._n)("Review %d change…","Review %d changes…",o),o);u&&(g=(0,E.__)("Saving"));const{homeUrl:y}=(0,m.useSelect)((e=>{const{getUnstableBase:t}=e(ye.store);return{homeUrl:t()?.home}}),[]);return(0,l.createElement)(_.__experimentalHStack,{className:"edit-site-save-hub",alignment:"right",spacing:4},i?(0,l.createElement)(_.Button,{variant:"primary",onClick:async()=>{if(!i)return;s(e);const{kind:t,name:o,key:l,property:c}=i;try{"root"===i.kind&&"site"===o?await h("root","site",void 0,[c]):(Bl.some((e=>e.kind===t&&e.name===o))&&d(t,o,l,{status:"publish"}),await p(t,o,l)),n(),r((0,E.__)("Site updated."),{type:"snackbar",actions:[{label:(0,E.__)("View site"),url:y}],id:e})}catch(e){a(`${(0,E.__)("Saving failed.")} ${e}`)}},isBusy:u,disabled:u,"aria-disabled":u,className:"edit-site-save-hub__button",__next40pxDefaultSize:!0},g):(0,l.createElement)(Vl,{className:"edit-site-save-hub__button",variant:f?null:"primary",showTooltip:!1,icon:f&&!u?S:null,defaultLabel:g,__next40pxDefaultSize:!0}))}function Hl({onSave:e,onClose:t}){const[n,r]=(0,g.useState)(!1),[a,s]=(0,g.useState)(""),{saveEntityRecord:i}=(0,m.useDispatch)(ye.store),{createErrorNotice:o,createSuccessNotice:c}=(0,m.useDispatch)(ge.store);return(0,l.createElement)(_.Modal,{title:(0,E.__)("Draft a new page"),onRequestClose:t},(0,l.createElement)("form",{onSubmit:async function(t){if(t.preventDefault(),!n){r(!0);try{const t=await i("postType","page",{status:"draft",title:a,slug:a||(0,E.__)("No title")},{throwOnError:!0});e(t),c((0,E.sprintf)((0,E.__)('"%s" successfully created.'),t.title?.rendered||a),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,E.__)("An error occurred while creating the page.");o(t,{type:"snackbar"})}finally{r(!1)}}}},(0,l.createElement)(_.__experimentalVStack,{spacing:3},(0,l.createElement)(_.TextControl,{label:(0,E.__)("Page title"),onChange:s,placeholder:(0,E.__)("No title"),value:a}),(0,l.createElement)(_.__experimentalHStack,{spacing:2,justify:"end"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,E.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",type:"submit",isBusy:n,"aria-disabled":n},(0,E.__)("Create draft"))))))}const{useHistory:Gl}=Xe(gt.privateApis),Ul=({postType:e="page",postId:t,...n})=>{const r=Et({postType:e,postId:t},{backPath:"/page"});return(0,l.createElement)(vr,{...r,...n})};function Wl(){const e=(0,ie.useViewportMatch)("medium","<"),{records:t,isResolving:n}=(0,ye.useEntityRecords)("postType","page",{status:"any",per_page:-1}),{records:r,isResolving:a}=(0,ye.useEntityRecords)("postType",Ct,{per_page:-1}),s=r?.filter((({slug:e})=>["404","search"].includes(e))),i=r?.find((e=>"front-page"===e.slug))||r?.find((e=>"home"===e.slug))||r?.find((e=>"index"===e.slug)),o=t?.concat(s,[i]),{frontPage:c,postsPage:u}=(0,m.useSelect)((e=>{const{getEntityRecord:t}=e(ye.store),n=t("root","site");return{frontPage:n?.page_on_front,postsPage:n?.page_for_posts}}),[]),d=c===u,p=t&&[...t];if(!d&&p?.length){const e=p.findIndex((e=>e.id===c)),t=p.splice(e,1);p?.splice(0,0,...t);const n=p.findIndex((e=>e.id===u)),r=p.splice(n,1);p.splice(1,0,...r)}const[h,f]=(0,g.useState)(!1),y=Gl(),v=e=>{let t=or;const n=u&&u===e?(r?.find((e=>"home"===e.slug))||r?.find((e=>"index"===e.slug)))?.id:null;switch(e){case c:t=Na;break;case u:t=Fa}return{icon:t,postType:n?Ct:"page",postId:n||e}},b=Et({path:"/pages"});return(0,l.createElement)(l.Fragment,null,h&&(0,l.createElement)(Hl,{onSave:({type:e,id:t})=>{y.push({postId:t,postType:e,canvas:"edit"}),f(!1)},onClose:()=>f(!1)}),(0,l.createElement)(hr,{title:(0,E.__)("Pages"),description:(0,E.__)("Browse and manage pages."),actions:(0,l.createElement)(mr,{icon:Za,label:(0,E.__)("Draft a new page"),onClick:()=>f(!0)}),content:(0,l.createElement)(l.Fragment,null,(n||a)&&(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(_.__experimentalItem,null,(0,E.__)("Loading pages…"))),!(n||a)&&(0,l.createElement)(_.__experimentalItemGroup,null,!o?.length&&(0,l.createElement)(_.__experimentalItem,null,(0,E.__)("No page found")),d&&i&&(0,l.createElement)(Ul,{postType:Ct,postId:i.id,key:i.id,icon:Na,withChevron:!0},(0,l.createElement)(_.__experimentalTruncate,{numberOfLines:1},(0,en.decodeEntities)(i.title?.rendered||(0,E.__)("(no title)")))),p?.map((({id:e,title:t})=>(0,l.createElement)(Ul,{...v(e),key:e,withChevron:!0},(0,l.createElement)(_.__experimentalTruncate,{numberOfLines:1},(0,en.decodeEntities)(t?.rendered||(0,E.__)("(no title)")))))))),footer:(0,l.createElement)(_.__experimentalVStack,{spacing:0},s?.map((e=>(0,l.createElement)(Ul,{postType:Ct,postId:e.id,key:e.id,icon:lr,withChevron:!0},(0,l.createElement)(_.__experimentalTruncate,{numberOfLines:1},(0,en.decodeEntities)(e.title?.rendered||(0,E.__)("(no title)")))))),!e&&(0,l.createElement)(vr,{className:"edit-site-sidebar-navigation-screen-pages__see-all",...b},(0,E.__)("Manage all pages")))}))}const jl=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"}),(0,l.createElement)(w.Path,{d:"M16 2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2ZM6 3.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z"}),(0,l.createElement)(w.Path,{d:"M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"})),Zl=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M8 2H6a2 2 0 0 0-2 2v2.4h1.5V4a.5.5 0 0 1 .5-.5h2V2ZM4 13.6V16a2 2 0 0 0 2 2h2v-1.5H6a.5.5 0 0 1-.5-.5v-2.4H4Zm0-1.2h1.5V7.6H4v4.8ZM9 2v1.5h4V2H9Zm5 0v1.5h2a.5.5 0 0 1 .5.5v2.4H18V4a2 2 0 0 0-2-2h-2Zm4 5.6h-1.5v4.8H18V7.6Zm0 6h-1.5V16a.5.5 0 0 1-.5.5h-2V18h2a2 2 0 0 0 2-2v-2.4ZM13 18v-1.5H9V18h4ZM7 7.25h8v-1.5H7v1.5Zm0 3.25h6V9H7v1.5ZM21.75 19V6h-1.5v13c0 .69-.56 1.25-1.25 1.25H8v1.5h11A2.75 2.75 0 0 0 21.75 19Z"})),ql=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})),Yl={[Vt]:{primaryField:"title"},[Dt]:{mediaField:"featured-image",primaryField:"title"},[Lt]:{primaryField:"title",mediaField:"featured-image"}},Kl={type:Vt,search:"",filters:[],page:1,perPage:20,sort:{field:"date",direction:"desc"},hiddenFields:["date","featured-image"],layout:{...Yl[Vt]}},Xl={page:[{title:(0,E.__)("All pages"),slug:"all",icon:jl,view:Kl},{title:(0,E.__)("Drafts"),slug:"drafts",icon:Zl,view:{...Kl,filters:[{field:"status",operator:zt,value:"draft"}]}},{title:(0,E.__)("Trash"),slug:"trash",icon:ql,view:{...Kl,filters:[{field:"status",operator:zt,value:"trash"}]}}]},{useHistory:Jl,useLocation:Ql}=Xe(gt.privateApis);function $l({type:e,setIsAdding:t}){const{params:{path:n}}=Ql(),r=Jl(),{saveEntityRecord:a}=(0,m.useDispatch)(ye.store),[s,i]=(0,g.useState)(""),[o,c]=(0,g.useState)(!1);return(0,l.createElement)("form",{onSubmit:async i=>{i.preventDefault(),c(!0);const{getEntityRecords:o}=(0,m.resolveSelect)(ye.store);let l;const u=await o("taxonomy","wp_dataviews_type",{slug:e});if(u&&u.length>0)l=u[0].id;else{const t=await a("taxonomy","wp_dataviews_type",{name:e});t&&t.id&&(l=t.id)}const d=await a("postType","wp_dataviews",{title:s,status:"publish",wp_dataviews_type:l,content:JSON.stringify(Xl[e][0].view)});r.push({path:n,activeView:d.id,isCustom:"true"}),c(!1),t(!1)}},(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,label:(0,E.__)("Name"),value:s,onChange:i,placeholder:(0,E.__)("My view"),className:"patterns-create-modal__name-input"}),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:()=>{t(!1)}},(0,E.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",type:"submit","aria-disabled":!s||o,isBusy:o},(0,E.__)("Create")))))}function ec({type:e}){const[t,n]=(0,g.useState)(!1);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(vr,{icon:Za,onClick:()=>{n(!0)},className:"dataviews__siderbar-content-add-new-item"},(0,E.__)("New view")),t&&(0,l.createElement)(_.Modal,{title:(0,E.__)("Add new view"),onRequestClose:()=>{n(!1)}},(0,l.createElement)($l,{type:e,setIsAdding:n})))}const{useHistory:tc,useLocation:nc}=Xe(gt.privateApis),rc=[];function ac({dataviewId:e,currentTitle:t,setIsRenaming:n}){const{editEntityRecord:r}=(0,m.useDispatch)(ye.store),[a,s]=(0,g.useState)(t);return(0,l.createElement)("form",{onSubmit:async t=>{t.preventDefault(),await r("postType","wp_dataviews",e,{title:a}),n(!1)}},(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,label:(0,E.__)("Name"),value:a,onChange:s,placeholder:(0,E.__)("My view"),className:"patterns-create-modal__name-input"}),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:()=>{n(!1)}},(0,E.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",type:"submit","aria-disabled":!a},(0,E.__)("Rename")))))}function sc({dataviewId:e,isActive:t}){const{params:{path:n}}=nc(),r=tc(),{dataview:a}=(0,m.useSelect)((t=>{const{getEditedEntityRecord:n}=t(ye.store);return{dataview:n("postType","wp_dataviews",e)}}),[e]),{deleteEntityRecord:s}=(0,m.useDispatch)(ye.store),i=(0,g.useMemo)((()=>JSON.parse(a.content).type),[a.content]),[o,c]=(0,g.useState)(!1);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Ml,{title:a.title,type:i,isActive:t,isCustom:"true",customViewId:e,suffix:(0,l.createElement)(_.DropdownMenu,{icon:ue,label:(0,E.__)("Actions"),className:"edit-site-sidebar-dataviews-dataview-item__dropdown-menu",toggleProps:{style:{color:"inherit"},size:"small"}},(({onClose:e})=>(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(_.MenuItem,{onClick:()=>{c(!0),e()}},(0,E.__)("Rename")),(0,l.createElement)(_.MenuItem,{onClick:async()=>{await s("postType","wp_dataviews",a.id,{force:!0}),t&&r.replace({path:n}),e()},isDestructive:!0},(0,E.__)("Delete")))))}),o&&(0,l.createElement)(_.Modal,{title:(0,E.__)("Rename view"),onRequestClose:()=>{c(!1)}},(0,l.createElement)(ac,{dataviewId:e,setIsRenaming:c,currentTitle:a.title})))}function ic({type:e,activeView:t,isCustom:n}){const r=function(e){return(0,m.useSelect)((t=>{const{getEntityRecords:n}=t(ye.store),r=n("taxonomy","wp_dataviews_type",{slug:e});if(!r||0===r.length)return rc;return n("postType","wp_dataviews",{wp_dataviews_type:r[0].id,orderby:"date",order:"asc"})||rc}))}(e);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-dataviews__group-header"},(0,l.createElement)(_.__experimentalHeading,{level:2},(0,E.__)("Custom Views"))),(0,l.createElement)(_.__experimentalItemGroup,null,r.map((e=>(0,l.createElement)(sc,{key:e.id,dataviewId:e.id,isActive:"true"===n&&Number(t)===e.id}))),(0,l.createElement)(ec,{type:e})))}const{useLocation:oc}=Xe(gt.privateApis),lc={"/pages":"page"};function cc(){const{params:{path:e,activeView:t="all",isCustom:n="false"}}=oc();if(!e||!lc[e])return null;const r=lc[e];return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalItemGroup,null,Xl[r].map((e=>(0,l.createElement)(Ml,{key:e.slug,slug:e.slug,title:e.title,icon:e.icon,type:e.view.type,isActive:"false"===n&&e.slug===t,isCustom:"false"})))),window?.__experimentalAdminViews&&(0,l.createElement)(ic,{activeView:t,type:r,isCustom:"true"}))}const uc=window.wp.dom,dc=window.wp.escapeHtml,mc=window.wp.wordcount;function pc({status:e,date:t,short:n}){const r=(0,ba.humanTimeDiff)(t);let a=e;switch(e){case"publish":a=t?(0,g.createInterpolateElement)((0,E.sprintf)((0,E.__)("Published <time>%s</time>"),r),{time:(0,l.createElement)("time",{dateTime:t})}):(0,E.__)("Published");break;case"future":const e=(0,ba.dateI18n)(n?"M j":"F j",(0,ba.getDate)(t));a=t?(0,g.createInterpolateElement)((0,E.sprintf)((0,E.__)("Scheduled: <time>%s</time>"),e),{time:(0,l.createElement)("time",{dateTime:t})}):(0,E.__)("Scheduled");break;case"draft":a=(0,E.__)("Draft");break;case"pending":a=(0,E.__)("Pending");break;case"private":a=(0,E.__)("Private");break;case"protected":a=(0,E.__)("Password protected")}return(0,l.createElement)("div",{className:b()("edit-site-sidebar-navigation-screen-page__status",{[`has-status has-${e}-status`]:!!e})},a)}const hc=189;function fc({id:e}){const{record:t}=(0,ye.useEntityRecord)("postType","page",e),{parentTitle:n,templateTitle:r,isPostsPage:a}=(0,m.useSelect)((e=>{const{getEditedPostId:n}=Xe(e(tr)),r=e(ye.store).getEntityRecord("postType",Ct,n()),a=r?.title?.rendered,s=t?.parent?e(ye.store).getEntityRecord("postType","page",t.parent,{_fields:["title"]})?.title?.rendered:null,{getEntityRecord:i}=e(ye.store),o=i("root","site");return{parentTitle:s,templateTitle:a,isPostsPage:t?.id===o?.page_for_posts}}),[t?.parent,t?.id]);return(0,l.createElement)(xa,{spacing:5,title:(0,E.__)("Details")},function(e){if(!e)return[];const t=[{label:(0,E.__)("Status"),value:(0,l.createElement)(pc,{status:e?.password?"protected":e.status,date:e?.date,short:!0})},{label:(0,E.__)("Slug"),value:(0,l.createElement)(_.__experimentalTruncate,{numberOfLines:1},(0,yt.safeDecodeURIComponent)(e.slug||e.generated_slug))}];e?.templateTitle&&t.push({label:(0,E.__)("Template"),value:(0,en.decodeEntities)(e.templateTitle)}),e?.parentTitle&&t.push({label:(0,E.__)("Parent"),value:(0,en.decodeEntities)(e.parentTitle||(0,E.__)("(no title)"))});const n=(0,E._x)("words","Word count type. Do not translate!"),r=e?.content?.rendered?(0,mc.count)(e.content.rendered,n):0,a=Math.round(r/hc);return r&&!e?.isPostsPage&&t.push({label:(0,E.__)("Words"),value:r.toLocaleString()||(0,E.__)("Unknown")},{label:(0,E.__)("Time to read"),value:a>1?(0,E.sprintf)((0,E.__)("%s mins"),a.toLocaleString()):(0,E.__)("< 1 min")}),t}({parentTitle:n,templateTitle:r,isPostsPage:a,...t}).map((({label:e,value:t})=>(0,l.createElement)(wa,{key:e},(0,l.createElement)(Ea,null,e),(0,l.createElement)(Sa,null,t)))))}function gc({postId:e,onRemove:t}){const{createSuccessNotice:n,createErrorNotice:r}=(0,m.useDispatch)(ge.store),{deleteEntityRecord:a}=(0,m.useDispatch)(ye.store),s=(0,m.useSelect)((t=>t(ye.store).getEntityRecord("postType","page",e)),[e]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{onClick:()=>async function(){try{await a("postType","page",e,{},{throwOnError:!0}),n((0,E.sprintf)((0,E.__)('"%s" moved to the Trash.'),(0,en.decodeEntities)(s.title.rendered)),{type:"snackbar",id:"edit-site-page-trashed"}),t?.()}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,E.__)("An error occurred while moving the page to the trash.");r(t,{type:"snackbar"})}}(),isDestructive:!0,variant:"secondary"},(0,E.__)("Move to Trash")))}function yc({postId:e,toggleProps:t,onRemove:n}){return(0,l.createElement)(_.DropdownMenu,{icon:ue,label:(0,E.__)("Actions"),toggleProps:t},(()=>(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(gc,{postId:e,onRemove:n}))))}const{useHistory:vc}=Xe(gt.privateApis);function bc({backPath:e}){const{setCanvasMode:t}=Xe((0,m.useDispatch)(tr)),n=vc(),{params:{postId:r},goTo:a}=(0,_.__experimentalUseNavigator)(),{record:s,hasResolved:i}=(0,ye.useEntityRecord)("postType","page",r),{featuredMediaAltText:o,featuredMediaSourceUrl:c}=(0,m.useSelect)((e=>{const{getEntityRecord:t}=e(ye.store),n=s?.featured_media?t("postType","attachment",s?.featured_media):null;return{featuredMediaSourceUrl:n?.media_details.sizes?.medium?.source_url||n?.source_url,featuredMediaAltText:(0,dc.escapeAttribute)(n?.alt_text||n?.description?.raw||"")}}),[s]);(0,g.useEffect)((()=>{i&&!s&&n.push({path:"/page",postId:void 0,postType:void 0,canvas:"view"})}),[i,n]);const u=o?(0,en.decodeEntities)(o):(0,en.decodeEntities)(s?.title?.rendered||(0,E.__)("Featured image"));return s?(0,l.createElement)(hr,{backPath:e,title:(0,en.decodeEntities)(s?.title?.rendered||(0,E.__)("(no title)")),actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(yc,{postId:r,toggleProps:{as:mr},onRemove:()=>{a("/page")}}),(0,l.createElement)(mr,{onClick:()=>t("edit"),label:(0,E.__)("Edit"),icon:_r})),meta:(0,l.createElement)(_.ExternalLink,{className:"edit-site-sidebar-navigation-screen__page-link",href:s.link},(0,yt.filterURLForDisplay)((0,yt.safeDecodeURIComponent)(s.link))),content:(0,l.createElement)(l.Fragment,null,!!c&&(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-sidebar-navigation-screen-page__featured-image-wrapper",alignment:"left",spacing:2},(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-page__featured-image has-image"},(0,l.createElement)("img",{alt:u,src:c}))),!!s?.excerpt?.rendered&&(0,l.createElement)(_.__experimentalTruncate,{className:"edit-site-sidebar-navigation-screen-page__excerpt",numberOfLines:3},(0,uc.__unstableStripHTML)(s.excerpt.rendered)),(0,l.createElement)(fc,{id:r})),footer:s?.modified?(0,l.createElement)(Ca,{record:s}):null}):null}const{useLocation:_c}=Xe(gt.privateApis);function Ec({className:e,...t}){return(0,l.createElement)(_.__experimentalNavigatorScreen,{className:b()("edit-site-sidebar__screen-wrapper",e),...t})}function wc(){Zi();const e=(0,ie.useViewportMatch)("medium","<");return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Ec,{path:"/"},(0,l.createElement)(Oa,null)),(0,l.createElement)(Ec,{path:"/navigation"},(0,l.createElement)(To,null)),(0,l.createElement)(Ec,{path:"/navigation/:postType/:postId"},(0,l.createElement)(Eo,null)),(0,l.createElement)(Ec,{path:"/wp_global_styles"},(0,l.createElement)(Ia,null)),(0,l.createElement)(Ec,{path:"/page"},(0,l.createElement)(Wl,null)),(0,l.createElement)(Ec,{path:"/pages"},(0,l.createElement)(hr,{title:(0,E.__)("Manage pages"),content:(0,l.createElement)(cc,null),backPath:"/page"})),(0,l.createElement)(Ec,{path:"/page/:postId"},(0,l.createElement)(bc,null)),(0,l.createElement)(Ec,{path:"/:postType(wp_template)"},(0,l.createElement)(As,null)),!e&&(0,l.createElement)(Ec,{path:"/patterns"},(0,l.createElement)(Di,null)),(0,l.createElement)(Ec,{path:"/:postType(wp_template|wp_template_part)/all"},(0,l.createElement)(Dl,null)),(0,l.createElement)(Ec,{path:"/:postType(wp_template_part|wp_block)/:postId"},(0,l.createElement)(co,null)),(0,l.createElement)(Ec,{path:"/:postType(wp_template)/:postId"},(0,l.createElement)(qs,null)))}const Sc=(0,g.memo)((function(){const{params:e}=_c(),t=(0,g.useRef)(ji(e));return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalNavigatorProvider,{className:"edit-site-sidebar__content",initialPath:t.current},(0,l.createElement)(wc,null)),(0,l.createElement)(zl,null))}));function xc({text:e,children:t}){const n=(0,ie.useCopyToClipboard)(e);return(0,l.createElement)(_.Button,{variant:"secondary",ref:n},t)}function Cc({message:e,error:t}){const n=[(0,l.createElement)(xc,{key:"copy-error",text:t.stack},(0,E.__)("Copy Error"))];return(0,l.createElement)(fe.Warning,{className:"editor-error-boundary",actions:n},e)}class kc extends g.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,pe.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){return this.state.error?(0,l.createElement)(Cc,{message:(0,E.__)("The editor has encountered an unexpected error."),error:this.state.error}):this.props.children}}const Tc=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})),Pc=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})),Ic=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})),Mc=[{keyCombination:{modifier:"primary",character:"b"},description:(0,E.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,E.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,E.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,E.__)("Remove a link.")},{keyCombination:{character:"[["},description:(0,E.__)("Insert a link to a post or page.")},{keyCombination:{modifier:"primary",character:"u"},description:(0,E.__)("Underline the selected text.")},{keyCombination:{modifier:"access",character:"d"},description:(0,E.__)("Strikethrough the selected text.")},{keyCombination:{modifier:"access",character:"x"},description:(0,E.__)("Make the selected text inline code.")},{keyCombination:{modifier:"access",character:"0"},description:(0,E.__)("Convert the current heading to a paragraph.")},{keyCombination:{modifier:"access",character:"1-6"},description:(0,E.__)("Convert the current paragraph or heading to a heading of level 1 to 6.")}];function Ac({keyCombination:e,forceAriaLabel:t}){const n=e.modifier?wr.displayShortcutList[e.modifier](e.character):e.character,r=e.modifier?wr.shortcutAriaLabel[e.modifier](e.character):e.character;return(0,l.createElement)("kbd",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":t||r},(Array.isArray(n)?n:[n]).map(((e,t)=>"+"===e?(0,l.createElement)(g.Fragment,{key:t},e):(0,l.createElement)("kbd",{key:t,className:"edit-site-keyboard-shortcut-help-modal__shortcut-key"},e))))}function Oc({description:e,keyCombination:t,aliases:n=[],ariaLabel:r}){return(0,l.createElement)(g.Fragment,null,(0,l.createElement)("div",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-description"},e),(0,l.createElement)("div",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-term"},(0,l.createElement)(Ac,{keyCombination:t,forceAriaLabel:r}),n.map(((e,t)=>(0,l.createElement)(Ac,{keyCombination:e,forceAriaLabel:r,key:t})))))}function Nc({name:e}){const{keyCombination:t,description:n,aliases:r}=(0,m.useSelect)((t=>{const{getShortcutKeyCombination:n,getShortcutDescription:r,getShortcutAliases:a}=t(nr.store);return{keyCombination:n(e),aliases:a(e),description:r(e)}}),[e]);return t?(0,l.createElement)(Oc,{keyCombination:t,description:n,aliases:r}):null}const Fc="edit-site/keyboard-shortcut-help",Rc=({shortcuts:e})=>(0,l.createElement)("ul",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-list",role:"list"},e.map(((e,t)=>(0,l.createElement)("li",{className:"edit-site-keyboard-shortcut-help-modal__shortcut",key:t},"string"==typeof e?(0,l.createElement)(Nc,{name:e}):(0,l.createElement)(Oc,{...e}))))),Dc=({title:e,shortcuts:t,className:n})=>(0,l.createElement)("section",{className:b()("edit-site-keyboard-shortcut-help-modal__section",n)},!!e&&(0,l.createElement)("h2",{className:"edit-site-keyboard-shortcut-help-modal__section-title"},e),(0,l.createElement)(Rc,{shortcuts:t})),Vc=({title:e,categoryName:t,additionalShortcuts:n=[]})=>{const r=(0,m.useSelect)((e=>e(nr.store).getCategoryShortcuts(t)),[t]);return(0,l.createElement)(Dc,{title:e,shortcuts:r.concat(n)})};function Lc(){const e=(0,m.useSelect)((e=>e(j).isModalActive(Fc))),{closeModal:t,openModal:n}=(0,m.useDispatch)(j),r=()=>e?t():n(Fc);return(0,nr.useShortcut)("core/edit-site/keyboard-shortcuts",r),e?(0,l.createElement)(_.Modal,{className:"edit-site-keyboard-shortcut-help-modal",title:(0,E.__)("Keyboard shortcuts"),onRequestClose:r},(0,l.createElement)(Dc,{className:"edit-site-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/edit-site/keyboard-shortcuts"]}),(0,l.createElement)(Vc,{title:(0,E.__)("Global shortcuts"),categoryName:"global"}),(0,l.createElement)(Vc,{title:(0,E.__)("Selection shortcuts"),categoryName:"selection"}),(0,l.createElement)(Vc,{title:(0,E.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,E.__)("Change the block type after adding a new paragraph."),ariaLabel:(0,E.__)("Forward-slash")}]}),(0,l.createElement)(Dc,{title:(0,E.__)("Text formatting"),shortcuts:Mc})):null}const{PreferencesModal:Bc}=Xe(y.privateApis),zc="edit-site/preferences";function Hc(){const e=(0,m.useSelect)((e=>e(j).isModalActive(zc))),{closeModal:t}=(0,m.useDispatch)(j);return e?(0,l.createElement)(Bc,{isActive:e,onClose:t}):null}const{Fill:Gc,Slot:Uc}=(0,_.createSlotFill)("EditSiteToolsMoreMenuGroup");Gc.Slot=({fillProps:e})=>(0,l.createElement)(Uc,{fillProps:e},(e=>e&&e.length>0));const Wc=Gc,jc=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})),Zc=window.wp.blob;function qc(){const{createErrorNotice:e}=(0,m.useDispatch)(ge.store);return(0,l.createElement)(_.MenuItem,{role:"menuitem",icon:jc,onClick:async function(){try{const e=await Xt()({path:"/wp-block-editor/v1/export",parse:!1,headers:{Accept:"application/zip"}}),t=await e.blob(),n=e.headers.get("content-disposition").match(/=(.+)\.zip/),r=n[1]?n[1]:"edit-site-export";(0,Zc.downloadBlob)(r+".zip",t,"application/zip")}catch(t){let n={};try{n=await t.json()}catch(e){}const r=n.message&&"unknown_error"!==n.code?n.message:(0,E.__)("An error occurred while creating the site export.");e(r,{type:"snackbar"})}},info:(0,E.__)("Download your theme with updated templates and styles.")},(0,E._x)("Export","site exporter menu item"))}function Yc(){const{toggle:e}=(0,m.useDispatch)(T.store);return(0,l.createElement)(_.MenuItem,{onClick:()=>e("core/edit-site","welcomeGuide")},(0,E.__)("Welcome Guide"))}function Kc(){const{createNotice:e}=(0,m.useDispatch)(ge.store),{getEditedPostId:t,getEditedPostType:n}=(0,m.useSelect)(tr),{getEditedEntityRecord:r}=(0,m.useSelect)(ye.store);const a=(0,ie.useCopyToClipboard)((function(){const e=r("postType",n(),t());return e?"function"==typeof e.content?e.content(e):e.blocks?(0,u.__unstableSerializeAndClean)(e.blocks):e.content?e.content:void 0:""}),(function(){e("info",(0,E.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}));return(0,l.createElement)(_.MenuItem,{ref:a},(0,E.__)("Copy all blocks"))}const Xc=[{value:"visual",label:(0,E.__)("Visual editor")},{value:"text",label:(0,E.__)("Code editor")}];const Jc=function(){const{shortcut:e,mode:t}=(0,m.useSelect)((e=>({shortcut:e(nr.store).getShortcutRepresentation("core/edit-site/toggle-mode"),mode:e(tr).getEditorMode()})),[]),{switchEditorMode:n}=(0,m.useDispatch)(tr),r=Xc.map((n=>n.value!==t?{...n,shortcut:e}:n));return(0,l.createElement)(_.MenuGroup,{label:(0,E.__)("Editor")},(0,l.createElement)(_.MenuItemsChoice,{choices:r,value:t,onSelect:n}))};function Qc({showIconLabels:e}){const{openModal:t}=(0,m.useDispatch)(j),{set:n}=(0,m.useDispatch)(T.store),r=(0,m.useSelect)((e=>e(ye.store).getCurrentTheme().is_block_theme),[]),{toggleDistractionFree:a}=(0,m.useDispatch)(tr),s=()=>{n("core","distractionFree",!1)};return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(de,{toggleProps:{showTooltip:!e,...e&&{variant:"tertiary"}}},(({onClose:e})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuGroup,{label:(0,E._x)("View","noun")},(0,l.createElement)(T.PreferenceToggleMenuItem,{scope:"core",name:"fixedToolbar",onToggle:s,label:(0,E.__)("Top toolbar"),info:(0,E.__)("Access all block and document tools in a single place"),messageActivated:(0,E.__)("Top toolbar activated"),messageDeactivated:(0,E.__)("Top toolbar deactivated")}),(0,l.createElement)(T.PreferenceToggleMenuItem,{scope:"core",name:"distractionFree",label:(0,E.__)("Distraction free"),info:(0,E.__)("Write with calmness"),handleToggling:!1,onToggle:a,messageActivated:(0,E.__)("Distraction free mode activated"),messageDeactivated:(0,E.__)("Distraction free mode deactivated"),shortcut:wr.displayShortcut.primaryShift("\\")}),(0,l.createElement)(T.PreferenceToggleMenuItem,{scope:"core",name:"focusMode",label:(0,E.__)("Spotlight mode"),info:(0,E.__)("Focus on one block at a time"),messageActivated:(0,E.__)("Spotlight mode activated"),messageDeactivated:(0,E.__)("Spotlight mode deactivated")})),(0,l.createElement)(Jc,null),(0,l.createElement)(Q.Slot,{name:"core/edit-site/plugin-more-menu",label:(0,E.__)("Plugins"),as:_.MenuGroup,fillProps:{onClick:e}}),(0,l.createElement)(_.MenuGroup,{label:(0,E.__)("Tools")},r&&(0,l.createElement)(qc,null),(0,l.createElement)(_.MenuItem,{onClick:()=>t(Fc),shortcut:wr.displayShortcut.access("h")},(0,E.__)("Keyboard shortcuts")),(0,l.createElement)(Yc,null),(0,l.createElement)(Kc,null),(0,l.createElement)(_.MenuItem,{icon:Ic,role:"menuitem",href:(0,E.__)("https://wordpress.org/documentation/article/site-editor/"),target:"_blank",rel:"noopener noreferrer"},(0,E.__)("Help"),(0,l.createElement)(_.VisuallyHidden,{as:"span"},(0,E.__)("(opens in a new tab)"))),(0,l.createElement)(Wc.Slot,{fillProps:{onClose:e}})),(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(_.MenuItem,{onClick:()=>t(zc)},(0,E.__)("Preferences")))))),(0,l.createElement)(Lc,null),(0,l.createElement)(Hc,null))}const $c=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"m12 20-4.5-3.6-.9 1.2L12 22l5.5-4.4-.9-1.2L12 20zm0-16 4.5 3.6.9-1.2L12 2 6.5 6.4l.9 1.2L12 4z"})),{DocumentTools:eu}=Xe(y.privateApis);function tu({blockEditorMode:e,hasFixedToolbar:t,isDistractionFree:n}){const{isVisualMode:r}=(0,m.useSelect)((e=>{const{getEditorMode:t}=e(tr);return{isVisualMode:"visual"===t()}}),[]),{__unstableSetEditorMode:a}=(0,m.useDispatch)(fe.store),{setDeviceType:s}=(0,m.useDispatch)(y.store),i=(0,ie.useViewportMatch)("medium"),o=window?.__experimentalEnableZoomedOutView&&r,c="zoom-out"===e;return(0,l.createElement)(eu,{disableBlockTools:!r,listViewLabel:(0,E.__)("List View")},o&&i&&!n&&!t&&(0,l.createElement)(_.ToolbarItem,{as:_.Button,className:"edit-site-header-edit-mode__zoom-out-view-toggle",icon:$c,isPressed:c,label:(0,E.__)("Zoom-out View"),onClick:()=>{s("Desktop"),a(c?"edit":"zoom-out")},size:"compact"}))}const{PostViewLink:nu,PreviewDropdown:ru}=Xe(y.privateApis);function au(){const{templateType:e,isDistractionFree:t,blockEditorMode:n,blockSelectionStart:r,showIconLabels:a,editorCanvasView:s,hasFixedToolbar:i,isZoomOutMode:o}=(0,m.useSelect)((e=>{const{getEditedPostType:t}=e(tr),{getBlockSelectionStart:n,__unstableGetEditorMode:r}=e(fe.store),{get:a}=e(T.store),{getDeviceType:s}=e(y.store);return{deviceType:s(),templateType:t(),blockEditorMode:r(),blockSelectionStart:n(),showIconLabels:a("core","showIconLabels"),editorCanvasView:Xe(e(tr)).getEditorCanvasContainerView(),hasFixedToolbar:a("core","fixedToolbar"),isDistractionFree:a("core","distractionFree"),isZoomOutMode:"zoom-out"===r()}}),[]),c=(0,ie.useViewportMatch)("medium"),u=!o&&i&&c,d=(0,g.useRef)(),p=(0,ie.useReducedMotion)(),h=!function(){const e=(0,_.__experimentalUseSlotFills)(Kr);return!!e?.length}(),f=Ft.includes(e),v="zoom-out"===n,[w,S]=(0,g.useState)(!0),x=!!r;(0,g.useEffect)((()=>{r&&S(!1)}),[r]);const C={isDistractionFree:{y:"-50px"},isDistractionFreeHovering:{y:0},view:{y:0},edit:{y:0}},k={type:"tween",duration:p?0:.2,ease:"easeOut"};return(0,l.createElement)("div",{className:b()("edit-site-header-edit-mode",{"show-icon-labels":a})},h&&(0,l.createElement)(_.__unstableMotion.div,{className:"edit-site-header-edit-mode__start",variants:C,transition:k},(0,l.createElement)(tu,{blockEditorMode:n,isDistractionFree:t}),u&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:b()("selected-block-tools-wrapper",{"is-collapsed":w||!x})},(0,l.createElement)(fe.BlockToolbar,{hideDragHandle:!0})),(0,l.createElement)(_.Popover.Slot,{ref:d,name:"block-toolbar"}),x&&(0,l.createElement)(_.Button,{className:"edit-site-header-edit-mode__block-tools-toggle",icon:w?Tc:Pc,onClick:()=>{S((e=>!e))},label:w?(0,E.__)("Show block tools"):(0,E.__)("Hide block tools")}))),!t&&(0,l.createElement)("div",{className:b()("edit-site-header-edit-mode__center",{"is-collapsed":!w&&c})},h?(0,l.createElement)(y.DocumentBar,null):qr(s)),(0,l.createElement)("div",{className:"edit-site-header-edit-mode__end"},(0,l.createElement)(_.__unstableMotion.div,{className:"edit-site-header-edit-mode__actions",variants:C,transition:k},c&&(0,l.createElement)("div",{className:b()("edit-site-header-edit-mode__preview-options",{"is-zoomed-out":v})},(0,l.createElement)(ru,{disabled:f||!h})),(0,l.createElement)(nu,null),(0,l.createElement)(Vl,null),!t&&(0,l.createElement)(ne.Slot,{scope:"core/edit-site"}),(0,l.createElement)(Qc,{showIconLabels:a}))))}const su=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,l.createElement)(w.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"}));const iu=function({className:e}){const{isRequestingSite:t,siteIconUrl:n}=(0,m.useSelect)((e=>{const{getEntityRecord:t}=e(ye.store),n=t("root","__unstableBase",void 0);return{isRequestingSite:!n,siteIconUrl:n?.site_icon_url}}),[]);if(t&&!n)return(0,l.createElement)("div",{className:"edit-site-site-icon__image"});const r=n?(0,l.createElement)("img",{className:"edit-site-site-icon__image",alt:(0,E.__)("Site Icon"),src:n}):(0,l.createElement)(_.Icon,{className:"edit-site-site-icon__icon",icon:su,size:48});return(0,l.createElement)("div",{className:b()(e,"edit-site-site-icon")},r)},ou=(0,g.memo)((({isTransparent:e,className:t})=>{const{canvasMode:n,dashboardLink:r,homeUrl:a,siteTitle:s}=(0,m.useSelect)((e=>{const{getCanvasMode:t,getSettings:n}=Xe(e(tr)),{getSite:r,getUnstableBase:a}=e(ye.store);return{canvasMode:t(),dashboardLink:n().__experimentalDashboardLink||"index.php",homeUrl:a()?.home,siteTitle:r()?.title}}),[]),{open:i}=(0,m.useDispatch)(rr.store),o=(0,ie.useReducedMotion)(),{setCanvasMode:c}=Xe((0,m.useDispatch)(tr)),{clearSelectedBlock:u}=(0,m.useDispatch)(fe.store),{setDeviceType:d}=(0,m.useDispatch)(y.store),p="view"===n?{href:r,label:(0,E.__)("Go to the Dashboard")}:{href:r,role:"button",label:(0,E.__)("Open Navigation"),onClick:e=>{e.preventDefault(),"edit"===n&&(u(),d("Desktop"),c("view"))}};return(0,l.createElement)(_.__unstableMotion.div,{className:b()("edit-site-site-hub",t),variants:{isDistractionFree:{x:"-100%"},isDistractionFreeHovering:{x:0},view:{x:0},edit:{x:0}},initial:!1,transition:{type:"tween",duration:o?0:.3,ease:"easeOut"}},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between",alignment:"center",className:"edit-site-site-hub__container"},(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start",className:"edit-site-site-hub__text-content",spacing:"0"},(0,l.createElement)(_.__unstableMotion.div,{className:b()("edit-site-site-hub__view-mode-toggle-container",{"has-transparent-background":e}),layout:!0,transition:{type:"tween",duration:o?0:.3,ease:"easeOut"}},(0,l.createElement)(_.Button,{...p,className:"edit-site-layout__view-mode-toggle"},(0,l.createElement)(_.__unstableMotion.div,{initial:!1,animate:{scale:"view"===n?.5:1},whileHover:{scale:"view"===n?.5:.96},transition:{type:"tween",duration:o?0:.3,ease:"easeOut"}},(0,l.createElement)(iu,{className:"edit-site-layout__view-mode-toggle-icon"})))),(0,l.createElement)(_.__unstableAnimatePresence,null,(0,l.createElement)(_.__unstableMotion.div,{layout:"edit"===n,animate:{opacity:"view"===n?1:0},exit:{opacity:0},className:b()("edit-site-site-hub__site-title",{"is-transparent":e}),transition:{type:"tween",duration:o?0:.2,ease:"easeOut",delay:"view"===n?.1:0}},(0,en.decodeEntities)(s))),"view"===n&&(0,l.createElement)(_.Button,{href:a,target:"_blank",label:(0,E.__)("View site (opens in a new tab)"),"aria-label":(0,E.__)("View site (opens in a new tab)"),icon:Ic,className:b()("edit-site-site-hub__site-view-link",{"is-transparent":e})})),"view"===n&&(0,l.createElement)(_.Button,{className:b()("edit-site-site-hub_toggle-command-center",{"is-transparent":e}),icon:Va,onClick:()=>i(),label:(0,E.__)("Open command palette"),shortcut:wr.displayShortcut.primary("k")})))})),lu=ou,cu={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},uu=320,du=1300,mu=9/19.5,pu={width:"100%",height:"100%"};function hu(e,t){const n=1-Math.max(0,Math.min(1,(e-uu)/(du-uu))),r=((e,t,n)=>e+(t-e)*n)(t,mu,n);return e/r}const fu=function e({isFullWidth:t,isOversized:n,setIsOversized:r,isReady:a,children:s,defaultSize:i,innerContentStyle:o}){const[c,u]=(0,g.useState)(pu),[d,p]=(0,g.useState)(),[h,f]=(0,g.useState)(!1),[y,v]=(0,g.useState)(!1),[w,S]=(0,g.useState)(1),x=(0,m.useSelect)((e=>Xe(e(tr)).getCanvasMode()),[]),{setCanvasMode:C}=Xe((0,m.useDispatch)(tr)),k={type:"tween",duration:h?0:.5},T=(0,g.useRef)(null),P=(0,ie.useInstanceId)(e,"edit-site-resizable-frame-handle-help"),I=i.width/i.height,M={default:{flexGrow:0,height:c.height},fullWidth:{flexGrow:1,height:c.height}},A=h?"active":y?"visible":"hidden";return(0,l.createElement)(_.ResizableBox,{as:_.__unstableMotion.div,ref:T,initial:!1,variants:M,animate:t?"fullWidth":"default",onAnimationComplete:e=>{"fullWidth"===e&&u({width:"100%",height:"100%"})},transition:k,size:c,enable:{top:!1,right:!1,bottom:!1,left:a,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},resizeRatio:w,handleClasses:void 0,handleStyles:{left:cu,right:cu},minWidth:uu,maxWidth:t?"100%":"150%",maxHeight:"100%",onFocus:()=>v(!0),onBlur:()=>v(!1),onMouseOver:()=>v(!0),onMouseOut:()=>v(!1),handleComponent:{left:"view"===x&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.Tooltip,{text:(0,E.__)("Drag to resize")},(0,l.createElement)(_.__unstableMotion.button,{key:"handle",role:"separator","aria-orientation":"vertical",className:b()("edit-site-resizable-frame__handle",{"is-resizing":h}),variants:{hidden:{opacity:0,left:0},visible:{opacity:1,left:-16},active:{opacity:1,left:-16,scaleY:1.3}},animate:A,"aria-label":(0,E.__)("Drag to resize"),"aria-describedby":P,"aria-valuenow":T.current?.resizable?.offsetWidth||void 0,"aria-valuemin":uu,"aria-valuemax":i.width,onKeyDown:e=>{if(!["ArrowLeft","ArrowRight"].includes(e.key))return;e.preventDefault();const t=20*(e.shiftKey?5:1)*("ArrowLeft"===e.key?1:-1),n=Math.min(Math.max(uu,T.current.resizable.offsetWidth+t),i.width);u({width:n,height:hu(n,I)})},initial:"hidden",exit:"hidden",whileFocus:"active",whileHover:"active"})),(0,l.createElement)("div",{hidden:!0,id:P},(0,E.__)("Use left and right arrow keys to resize the canvas. Hold shift to resize in larger increments.")))},onResizeStart:(e,t,n)=>{p(n.offsetWidth),f(!0)},onResize:(e,t,a,s)=>{const o=s.width/w,l=Math.abs(o),c=s.width<0?l:(i.width-d)/2,m=Math.min(l,c),p=0===l?0:m/l;S(1-p+2*p);const h=d+s.width;r(h>i.width),u({height:n?"100%":hu(h,I)})},onResizeStop:(e,t,a)=>{if(f(!1),!n)return;r(!1);a.ownerDocument.documentElement.offsetWidth-a.offsetWidth>200?u(pu):C("edit")},className:b()("edit-site-resizable-frame__inner",{"is-resizing":h}),showHandle:!1},(0,l.createElement)(_.__unstableMotion.div,{className:"edit-site-resizable-frame__inner-content",animate:{borderRadius:t?0:8},transition:k,style:o},s))},{useLocation:gu,useHistory:yu}=Xe(gt.privateApis);const{useHistory:vu,useLocation:bu}=Xe(gt.privateApis);const{EntitiesSavedStatesExtensible:_u}=Xe(y.privateApis),Eu=({onClose:e})=>{var t,n;const r=(0,y.useEntitiesSavedStatesIsDirty)();let a;a=r.isDirty?(0,E.__)("Activate & Save"):(0,E.__)("Activate");const s=function(){const[e,t]=(0,g.useState)();return(0,g.useEffect)((()=>{const e=(0,yt.addQueryArgs)("/wp/v2/themes?status=active",{context:"edit",wp_theme_preview:""});Xt()({path:e}).then((e=>t(e[0]))).catch((()=>{}))}),[]),e}(),i=(0,m.useSelect)((e=>e(ye.store).getCurrentTheme()),[]),o=(0,l.createElement)("p",null,(0,E.sprintf)((0,E.__)("Saving your changes will change your active theme from %1$s to %2$s."),null!==(t=s?.name?.rendered)&&void 0!==t?t:"...",null!==(n=i?.name?.rendered)&&void 0!==n?n:"...")),c=function(){const e=vu(),t=bu(),{startResolution:n,finishResolution:r}=(0,m.useDispatch)(ye.store);return async()=>{if(vt()){const a="themes.php?action=activate&stylesheet="+bt()+"&_wpnonce="+window.WP_BLOCK_THEME_ACTIVATE_NONCE;n("activateTheme"),await window.fetch(a),r("activateTheme");const{wp_theme_preview:s,...i}=t.params;e.replace(i)}}}();return(0,l.createElement)(_u,{...r,additionalPrompt:o,close:e,onSave:async e=>(await c(),e),saveEnabled:!0,saveLabel:a})},wu=({onClose:e})=>vt()?(0,l.createElement)(Eu,{onClose:e}):(0,l.createElement)(y.EntitiesSavedStates,{close:e});function Su(){const{isSaveViewOpen:e,canvasMode:t}=(0,m.useSelect)((e=>{const{isSaveViewOpened:t,getCanvasMode:n}=Xe(e(tr));return{isSaveViewOpen:t(),canvasMode:n()}}),[]),{setIsSaveViewOpened:n}=(0,m.useDispatch)(tr),r=()=>n(!1);return"view"===t?e?(0,l.createElement)(_.Modal,{className:"edit-site-save-panel__modal",onRequestClose:r,__experimentalHideHeader:!0,contentLabel:(0,E.__)("Save site, content, and template changes")},(0,l.createElement)(wu,{onClose:r})):null:(0,l.createElement)(oe,{className:b()("edit-site-layout__actions",{"is-entity-save-view-open":e}),ariaLabel:(0,E.__)("Save panel")},e?(0,l.createElement)(wu,{onClose:r}):(0,l.createElement)("div",{className:"edit-site-editor__toggle-save-panel"},(0,l.createElement)(_.Button,{variant:"secondary",className:"edit-site-editor__toggle-save-panel-button",onClick:()=>n(!0),"aria-expanded":!1},(0,E.__)("Open save panel"))))}const xu=function(){const{registerShortcut:e}=(0,m.useDispatch)(nr.store);return(0,g.useEffect)((()=>{e({name:"core/edit-site/save",category:"global",description:(0,E.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/edit-site/toggle-block-settings-sidebar",category:"global",description:(0,E.__)("Show or hide the Settings sidebar."),keyCombination:{modifier:"primaryShift",character:","}}),e({name:"core/edit-site/keyboard-shortcuts",category:"main",description:(0,E.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/edit-site/next-region",category:"global",description:(0,E.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/edit-site/previous-region",category:"global",description:(0,E.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"},{modifier:"ctrlShift",character:"~"}]}),e({name:"core/edit-site/toggle-mode",category:"global",description:(0,E.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),e({name:"core/edit-site/transform-heading-to-paragraph",category:"block-library",description:(0,E.__)("Transform heading to paragraph."),keyCombination:{modifier:"access",character:"0"}}),[1,2,3,4,5,6].forEach((t=>{e({name:`core/edit-site/transform-paragraph-to-heading-${t}`,category:"block-library",description:(0,E.__)("Transform paragraph to heading."),keyCombination:{modifier:"access",character:`${t}`}})})),e({name:"core/edit-site/toggle-distraction-free",category:"global",description:(0,E.__)("Toggle distraction free mode."),keyCombination:{modifier:"primaryShift",character:"\\"}})}),[e]),null};const Cu=function(){const{__experimentalGetDirtyEntityRecords:e,isSavingEntityRecord:t}=(0,m.useSelect)(ye.store),{hasNonPostEntityChanges:n}=(0,m.useSelect)(y.store),{getCanvasMode:r}=Xe((0,m.useSelect)(tr)),{setIsSaveViewOpened:a}=(0,m.useDispatch)(tr);return(0,nr.useShortcut)("core/edit-site/save",(s=>{s.preventDefault();const i=e(),o=!!i.length,l=i.some((e=>t(e.kind,e.name,e.key))),c=n(),u="view"===r();(o&&c&&!l||u)&&a(!0)})),null},ku=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z"})),Tu=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"})),Pu=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z"})),Iu=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z"}));function Mu({path:e,categoryType:t,categoryId:n},r){return["/wp_template/all","/wp_template_part/all","/pages"].includes(e)||"/patterns"===e&&(!r||!!t&&!!n)}const{useGlobalStylesReset:Au}=Xe(fe.privateApis),{useHistory:Ou,useLocation:Nu}=Xe(gt.privateApis);function Fu(){const{openGeneralSidebar:e,setCanvasMode:t}=Xe((0,m.useDispatch)(tr)),{params:n}=Nu(),r=!Mu(n,(0,ie.useViewportMatch)("medium","<")),{getCanvasMode:a}=Xe((0,m.useSelect)(tr)),s=Ou(),i=(0,m.useSelect)((e=>e(ye.store).getCurrentTheme().is_block_theme),[]);return{isLoading:!1,commands:(0,g.useMemo)((()=>i?[{name:"core/edit-site/open-styles",label:(0,E.__)("Open styles"),callback:({close:n})=>{n(),r||s.push({path:"/wp_global_styles",canvas:"edit"}),r&&"edit"!==a()&&t("edit"),e("edit-site/global-styles")},icon:ir}]:[]),[s,e,t,r,a,i])}}function Ru(){const{openGeneralSidebar:e,setCanvasMode:t}=Xe((0,m.useDispatch)(tr)),{params:n}=Nu(),r=!Mu(n,(0,ie.useViewportMatch)("medium","<")),{getCanvasMode:a}=Xe((0,m.useSelect)(tr)),{set:s}=(0,m.useDispatch)(T.store),i=Ou(),o=(0,m.useSelect)((e=>e(ye.store).getCurrentTheme().is_block_theme),[]);return{isLoading:!1,commands:(0,g.useMemo)((()=>o?[{name:"core/edit-site/toggle-styles-welcome-guide",label:(0,E.__)("Learn about styles"),callback:({close:n})=>{n(),r||i.push({path:"/wp_global_styles",canvas:"edit"}),r&&"edit"!==a()&&t("edit"),e("edit-site/global-styles"),s("core/edit-site","welcomeGuideStyles",!0),setTimeout((()=>{s("core/edit-site","welcomeGuideStyles",!0)}),500)},icon:ku}]:[]),[i,e,t,r,a,o,s])}}function Du(){const[e,t]=Au();return{isLoading:!1,commands:(0,g.useMemo)((()=>e?[{name:"core/edit-site/reset-global-styles",label:(0,E.__)("Reset styles"),icon:(0,E.isRTL)()?Tu:Pu,callback:({close:e})=>{e(),t()}}]:[]),[e,t])}}function Vu(){const{openGeneralSidebar:e,setEditorCanvasContainerView:t,setCanvasMode:n}=Xe((0,m.useDispatch)(tr)),{params:r}=Nu(),a=!Mu(r,(0,ie.useViewportMatch)("medium","<")),s=Ou(),{canEditCSS:i}=(0,m.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(ye.store),r=n(),a=r?t("root","globalStyles",r):void 0;return{canEditCSS:!!a?._links?.["wp:action-edit-css"]}}),[]),{getCanvasMode:o}=Xe((0,m.useSelect)(tr));return{isLoading:!1,commands:(0,g.useMemo)((()=>i?[{name:"core/edit-site/open-styles-css",label:(0,E.__)("Customize CSS"),icon:Iu,callback:({close:r})=>{r(),a||s.push({path:"/wp_global_styles",canvas:"edit"}),a&&"edit"!==o()&&n("edit"),e("edit-site/global-styles"),t("global-styles-css")}}]:[]),[s,e,t,i,a,o,n])}}function Lu(){const{openGeneralSidebar:e,setEditorCanvasContainerView:t,setCanvasMode:n}=Xe((0,m.useDispatch)(tr)),{getCanvasMode:r}=Xe((0,m.useSelect)(tr)),{params:a}=Nu(),s=!Mu(a,(0,ie.useViewportMatch)("medium","<")),i=Ou(),o=(0,m.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(ye.store),r=n(),a=r?t("root","globalStyles",r):void 0;return!!a?._links?.["version-history"]?.[0]?.count}),[]);return{isLoading:!1,commands:(0,g.useMemo)((()=>o?[{name:"core/edit-site/open-global-styles-revisions",label:(0,E.__)("Style revisions"),icon:_a,callback:({close:a})=>{a(),s||i.push({path:"/wp_global_styles",canvas:"edit"}),s&&"edit"!==r()&&n("edit"),e("edit-site/global-styles"),t("global-styles-revisions")}}]:[]),[o,i,e,t,s,r,n])}}const Bu=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.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"})),zu=(0,l.createElement)(w.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z"})),Hu=(0,l.createElement)(w.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"})),Gu=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.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"})),Uu=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"m16 15.5h-8v-1.5h8zm-7.5-2.5h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm-9-3h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2z"}),(0,l.createElement)(w.Path,{d:"m18.5 6.5h-13a.5.5 0 0 0 -.5.5v9.5a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-9.5a.5.5 0 0 0 -.5-.5zm-13-1.5h13a2 2 0 0 1 2 2v9.5a2 2 0 0 1 -2 2h-13a2 2 0 0 1 -2-2v-9.5a2 2 0 0 1 2-2z"})),Wu=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})),{RenamePatternModal:ju}=Xe(St.privateApis);function Zu(){const{record:e}=Ds(),{closeModal:t}=(0,m.useDispatch)(j);return(0,m.useSelect)((e=>e(j).isModalActive(Xu.rename)))?(0,l.createElement)(ju,{onClose:t,pattern:e}):null}const{DuplicatePatternModal:qu}=Xe(St.privateApis),{useHistory:Yu}=Xe(gt.privateApis);function Ku(){const{record:e}=Ds(),{categoryType:t,categoryId:n}=(0,yt.getQueryArgs)(window.location.href),{closeModal:r}=(0,m.useDispatch)(j),a=Yu();if(!(0,m.useSelect)((e=>e(j).isModalActive(Xu.duplicate))))return null;return(0,l.createElement)(qu,{onClose:r,onSuccess:function({pattern:e}){a.push({categoryType:t,categoryId:n,postType:It.user,postId:e.id}),r()},pattern:e})}const Xu={rename:"edit-site/pattern-rename",duplicate:"edit-site/pattern-duplicate"};function Ju(){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Ku,null),(0,l.createElement)(Zu,null))}const{useHistory:Qu}=Xe(gt.privateApis);function $u(){const{record:e}=Ds(),{isPage:t,canvasMode:n,templateId:r,currentPostType:a}=(0,m.useSelect)((e=>{const{isPage:t,getCanvasMode:n}=Xe(e(tr)),{getCurrentPostType:r,getCurrentTemplateId:a}=e(y.store);return{isPage:t(),canvasMode:n(),templateId:a(),currentPostType:r()}}),[]),{onClick:s}=Et({postType:"wp_template",postId:r}),{setRenderingMode:i}=(0,m.useDispatch)(y.store);if(!t||"edit"!==n)return{isLoading:!1,commands:[]};const o=[];return"wp_template"!==a?o.push({name:"core/switch-to-template-focus",label:(0,E.sprintf)((0,E.__)("Edit template: %s"),(0,en.decodeEntities)(e.title)),icon:lr,callback:({close:e})=>{s(),e()}}):o.push({name:"core/switch-to-page-focus",label:(0,E.__)("Back to page"),icon:or,callback:({close:e})=>{i("template-locked"),e()}}),{isLoading:!1,commands:o}}function ed(){const{switchEditorMode:e}=(0,m.useDispatch)(tr),{canvasMode:t,editorMode:n}=(0,m.useSelect)((e=>({canvasMode:Xe(e(tr)).getCanvasMode(),editorMode:e(tr).getEditorMode()})),[]);if("edit"!==t||"text"!==n)return{isLoading:!1,commands:[]};const r=[];return"text"===n&&r.push({name:"core/exit-code-editor",label:(0,E.__)("Exit code editor"),icon:Bu,callback:({close:t})=>{e("visual"),t()}}),{isLoading:!1,commands:r}}function td(){const{isLoaded:e,record:t}=Ds(),{removeTemplate:n,revertTemplate:r}=(0,m.useDispatch)(tr),a=Qu(),s=(0,m.useSelect)((e=>e(tr).isPage()&&"wp_template"!==e(y.store).getCurrentPostType()),[]);if(!e)return{isLoading:!0,commands:[]};const i=[];if($t(t)&&!s){const e=t.type===Ct?(0,E.sprintf)((0,E.__)("Reset template: %s"),(0,en.decodeEntities)(t.title)):(0,E.sprintf)((0,E.__)("Reset template part: %s"),(0,en.decodeEntities)(t.title));i.push({name:"core/reset-template",label:e,icon:(0,E.isRTL)()?Tu:Pu,callback:({close:e})=>{r(t),e()}})}if(Hs(t)&&!s){const e=t.type===Ct?(0,E.sprintf)((0,E.__)("Delete template: %s"),(0,en.decodeEntities)(t.title)):(0,E.sprintf)((0,E.__)("Delete template part: %s"),(0,en.decodeEntities)(t.title)),r=t.type===Ct?"/wp_template":"/wp_template_part/all";i.push({name:"core/remove-template",label:e,icon:ql,callback:({close:e})=>{n(t),a.push({path:r}),e()}})}return{isLoading:!e,commands:i}}function nd(){const{openGeneralSidebar:e,closeGeneralSidebar:t,toggleDistractionFree:n,setIsListViewOpened:r,switchEditorMode:a}=(0,m.useDispatch)(tr),{canvasMode:s,editorMode:i,activeSidebar:o,showBlockBreadcrumbs:l,isListViewOpen:c,isDistractionFree:u,isTopToolbar:d,isFocusMode:p}=(0,m.useSelect)((e=>{const{get:t}=e(T.store),{getEditorMode:n}=e(tr),{isListViewOpened:r}=e(y.store);return{canvasMode:Xe(e(tr)).getCanvasMode(),editorMode:n(),activeSidebar:e(j).getActiveComplementaryArea(tr.name),showBlockBreadcrumbs:t("core","showBlockBreadcrumbs"),isListViewOpen:r(),isDistractionFree:t("core","distractionFree"),isFocusMode:t("core","focusMode"),isTopToolbar:t("core","fixedToolbar")}}),[]),{openModal:h}=(0,m.useDispatch)(j),{toggle:f}=(0,m.useDispatch)(T.store),{createInfoNotice:g}=(0,m.useDispatch)(ge.store);if("edit"!==s)return{isLoading:!1,commands:[]};const v=[];return v.push({name:"core/open-settings-sidebar",label:(0,E.__)("Toggle settings sidebar"),icon:(0,E.isRTL)()?zu:Hu,callback:({close:n})=>{n(),"edit-site/template"===o?t():e("edit-site/template")}}),v.push({name:"core/open-block-inspector",label:(0,E.__)("Toggle block inspector"),icon:Gu,callback:({close:n})=>{n(),"edit-site/block-inspector"===o?t():e("edit-site/block-inspector")}}),v.push({name:"core/toggle-spotlight-mode",label:(0,E.__)("Toggle spotlight"),callback:({close:e})=>{f("core","focusMode"),e(),g(p?(0,E.__)("Spotlight off."):(0,E.__)("Spotlight on."),{id:"core/edit-site/toggle-spotlight-mode/notice",type:"snackbar",actions:[{label:(0,E.__)("Undo"),onClick:()=>{f("core","focusMode")}}]})}}),v.push({name:"core/toggle-distraction-free",label:u?(0,E.__)("Exit Distraction Free"):(0,E.__)("Enter Distraction Free "),callback:({close:e})=>{n(),e()}}),v.push({name:"core/toggle-top-toolbar",label:(0,E.__)("Toggle top toolbar"),callback:({close:e})=>{f("core","fixedToolbar"),u&&n(),e(),g(d?(0,E.__)("Top toolbar off."):(0,E.__)("Top toolbar on."),{id:"core/edit-site/toggle-top-toolbar/notice",type:"snackbar",actions:[{label:(0,E.__)("Undo"),onClick:()=>{f("core","fixedToolbar")}}]})}}),"visual"===i&&v.push({name:"core/toggle-code-editor",label:(0,E.__)("Open code editor"),icon:Bu,callback:({close:e})=>{a("text"),e()}}),v.push({name:"core/open-preferences",label:(0,E.__)("Editor preferences"),callback:()=>{h(zc)}}),v.push({name:"core/open-shortcut-help",label:(0,E.__)("Keyboard shortcuts"),icon:Uu,callback:()=>{h(Fc)}}),v.push({name:"core/toggle-breadcrumbs",label:l?(0,E.__)("Hide block breadcrumbs"):(0,E.__)("Show block breadcrumbs"),callback:({close:e})=>{f("core","showBlockBreadcrumbs"),e(),g(l?(0,E.__)("Breadcrumbs hidden."):(0,E.__)("Breadcrumbs visible."),{id:"core/edit-site/toggle-breadcrumbs/notice",type:"snackbar"})}}),v.push({name:"core/toggle-list-view",label:c?(0,E.__)("Close List View"):(0,E.__)("Open List View"),icon:Wu,callback:({close:e})=>{r(!c),e(),g(c?(0,E.__)("List View off."):(0,E.__)("List View on."),{id:"core/edit-site/toggle-list-view/notice",type:"snackbar"})}}),{isLoading:!1,commands:v}}function rd(){const{isLoaded:e,record:t}=Ds(),{openModal:n}=(0,m.useDispatch)(j);if(!e)return{isLoading:!0,commands:[]};const r=[];return"wp_block"===t?.type&&(r.push({name:"core/rename-pattern",label:(0,E.__)("Rename pattern"),icon:Er,callback:({close:e})=>{n(Xu.rename),e()}}),r.push({name:"core/duplicate-pattern",label:(0,E.__)("Duplicate pattern"),icon:cr,callback:({close:e})=>{n(Xu.duplicate),e()}})),{isLoading:!1,commands:r}}const ad=1e4;function sd(){const{isLoaded:e}=Ds(),[t,n]=(0,g.useState)(!1),r=(0,m.useSelect)((e=>{const n=e(ye.store).hasResolvingSelectors();return!t&&!n}),[t]);return(0,g.useEffect)((()=>{let e;return t||(e=setTimeout((()=>{n(!0)}),ad)),()=>{clearTimeout(e)}}),[t]),(0,g.useEffect)((()=>{if(r){const e=setTimeout((()=>{n(!0)}),100);return()=>{clearTimeout(e)}}}),[r]),!t||!e}function id({className:e,identifier:t,title:n,icon:r,children:a,closeLabel:s,header:i,headerClassName:o,panelClassName:c}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(se,{className:e,scope:"core/edit-site",identifier:t,title:n,smallScreenTitle:n,icon:r,closeLabel:s,header:i,headerClassName:o,panelClassName:c},a),(0,l.createElement)(ee,{scope:"core/edit-site",identifier:t,icon:r},n))}function od({className:e,...t}){return(0,l.createElement)(_.Icon,{className:b()(e,"edit-site-global-styles-icon-with-current-color"),...t})}function ld({icon:e,children:t,...n}){return(0,l.createElement)(_.__experimentalItem,{...n},e&&(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start"},(0,l.createElement)(od,{icon:e,size:24}),(0,l.createElement)(_.FlexItem,null,t)),!e&&t)}function cd(e){return(0,l.createElement)(_.__experimentalNavigatorButton,{as:ld,...e})}const ud=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M6.9 7L3 17.8h1.7l1-2.8h4.1l1 2.8h1.7L8.6 7H6.9zm-.7 6.6l1.5-4.3 1.5 4.3h-3zM21.6 17c-.1.1-.2.2-.3.2-.1.1-.2.1-.4.1s-.3-.1-.4-.2c-.1-.1-.1-.3-.1-.6V12c0-.5 0-1-.1-1.4-.1-.4-.3-.7-.5-1-.2-.2-.5-.4-.9-.5-.4 0-.8-.1-1.3-.1s-1 .1-1.4.2c-.4.1-.7.3-1 .4-.2.2-.4.3-.6.5-.1.2-.2.4-.2.7 0 .3.1.5.2.8.2.2.4.3.8.3.3 0 .6-.1.8-.3.2-.2.3-.4.3-.7 0-.3-.1-.5-.2-.7-.2-.2-.4-.3-.6-.4.2-.2.4-.3.7-.4.3-.1.6-.1.8-.1.3 0 .6 0 .8.1.2.1.4.3.5.5.1.2.2.5.2.9v1.1c0 .3-.1.5-.3.6-.2.2-.5.3-.9.4-.3.1-.7.3-1.1.4-.4.1-.8.3-1.1.5-.3.2-.6.4-.8.7-.2.3-.3.7-.3 1.2 0 .6.2 1.1.5 1.4.3.4.9.5 1.6.5.5 0 1-.1 1.4-.3.4-.2.8-.6 1.1-1.1 0 .4.1.7.3 1 .2.3.6.4 1.2.4.4 0 .7-.1.9-.2.2-.1.5-.3.7-.4h-.3zm-3-.9c-.2.4-.5.7-.8.8-.3.2-.6.2-.8.2-.4 0-.6-.1-.9-.3-.2-.2-.3-.6-.3-1.1 0-.5.1-.9.3-1.2s.5-.5.8-.7c.3-.2.7-.3 1-.5.3-.1.6-.3.7-.6v3.4z"})),dd=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"})),{useHasDimensionsPanel:md,useHasTypographyPanel:pd,useHasColorPanel:hd,useGlobalSetting:fd,useSettingsForBlockElement:gd}=Xe(fe.privateApis);const yd=function(){const[e]=fd(""),t=gd(e),n=pd(t),r=hd(t),a=md(t);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalItemGroup,null,n&&(0,l.createElement)(cd,{icon:ud,path:"/typography","aria-label":(0,E.__)("Typography styles")},(0,E.__)("Typography")),r&&(0,l.createElement)(cd,{icon:dd,path:"/colors","aria-label":(0,E.__)("Colors styles")},(0,E.__)("Colors")),a&&(0,l.createElement)(cd,{icon:lr,path:"/layout","aria-label":(0,E.__)("Layout styles")},(0,E.__)("Layout"))))},{useGlobalStyle:vd}=Xe(fe.privateApis);const bd=function(){const[e]=vd("css"),{hasVariations:t,canEditCSS:n}=(0,m.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n,__experimentalGetCurrentThemeGlobalStylesVariations:r}=e(ye.store),a=n(),s=a?t("root","globalStyles",a):void 0;return{hasVariations:!!r()?.length,canEditCSS:!!s?._links?.["wp:action-edit-css"]}}),[]);return(0,l.createElement)(_.Card,{size:"small",className:"edit-site-global-styles-screen-root"},(0,l.createElement)(_.CardBody,null,(0,l.createElement)(_.__experimentalVStack,{spacing:4},(0,l.createElement)(_.Card,null,(0,l.createElement)(_.CardMedia,null,(0,l.createElement)(Lr,null))),t&&(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(cd,{path:"/variations","aria-label":(0,E.__)("Browse styles")},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(_.FlexItem,null,(0,E.__)("Browse styles")),(0,l.createElement)(od,{icon:(0,E.isRTL)()?dr:ur})))),(0,l.createElement)(yd,null))),(0,l.createElement)(_.CardDivider,null),(0,l.createElement)(_.CardBody,null,(0,l.createElement)(_.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4},(0,E.__)("Customize the appearance of specific blocks for the whole site.")),(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(cd,{path:"/blocks","aria-label":(0,E.__)("Blocks styles")},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(_.FlexItem,null,(0,E.__)("Blocks")),(0,l.createElement)(od,{icon:(0,E.isRTL)()?dr:ur}))))),n&&!!e&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.CardDivider,null),(0,l.createElement)(_.CardBody,null,(0,l.createElement)(_.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4},(0,E.__)("Add your own CSS to customize the appearance and layout of your site.")),(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(cd,{path:"/css","aria-label":(0,E.__)("Additional CSS")},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(_.FlexItem,null,(0,E.__)("Additional CSS")),(0,l.createElement)(od,{icon:(0,E.isRTL)()?dr:ur})))))))};function _d(e){const t=function(e){return e?.filter((e=>"block"===e.source))}((0,m.useSelect)((t=>{const{getBlockStyles:n}=t(u.store);return n(e)}),[e]));return t}function Ed({name:e}){const t=_d(e);return(0,l.createElement)(_.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},t.map(((t,n)=>t?.isDefault?null:(0,l.createElement)(cd,{key:n,path:"/blocks/"+encodeURIComponent(e)+"/variations/"+encodeURIComponent(t.name),"aria-label":t.label},t.label))))}const wd=function({title:e,description:t,onBack:n}){return(0,l.createElement)(_.__experimentalVStack,{spacing:0},(0,l.createElement)(_.__experimentalView,null,(0,l.createElement)(_.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3},(0,l.createElement)(_.__experimentalHStack,{spacing:2},(0,l.createElement)(_.__experimentalNavigatorToParentButton,{style:{minWidth:24,padding:0},icon:(0,E.isRTL)()?ur:dr,isSmall:!0,"aria-label":(0,E.__)("Navigate to the previous view"),onClick:n}),(0,l.createElement)(_.__experimentalSpacer,null,(0,l.createElement)(_.__experimentalHeading,{className:"edit-site-global-styles-header",level:2,size:13},e))))),t&&(0,l.createElement)("p",{className:"edit-site-global-styles-header__description"},t))},{useHasDimensionsPanel:Sd,useHasTypographyPanel:xd,useHasBorderPanel:Cd,useGlobalSetting:kd,useSettingsForBlockElement:Td,useHasColorPanel:Pd}=Xe(fe.privateApis);function Id(e){const[t]=kd("",e),n=Td(t,e),r=xd(n),a=Pd(n),s=Cd(n),i=Sd(n),o=s||i,l=!!_d(e)?.length;return r||a||o||l}function Md({block:e}){if(!Id(e.name))return null;const t=(0,E.sprintf)((0,E.__)("%s block styles"),e.title);return(0,l.createElement)(cd,{path:"/blocks/"+encodeURIComponent(e.name),"aria-label":t},(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start"},(0,l.createElement)(fe.BlockIcon,{icon:e.icon}),(0,l.createElement)(_.FlexItem,null,e.title)))}const Ad=(0,g.memo)((function({filterValue:e}){const t=function(){const e=(0,m.useSelect)((e=>e(u.store).getBlockTypes()),[]),{core:t,noncore:n}=e.reduce(((e,t)=>{const{core:n,noncore:r}=e;return(t.name.startsWith("core/")?n:r).push(t),e}),{core:[],noncore:[]});return[...t,...n]}(),n=(0,ie.useDebounce)(Jt.speak,500),{isMatchingSearchTerm:r}=(0,m.useSelect)(u.store),a=e?t.filter((t=>r(t,e))):t,s=(0,g.useRef)();return(0,g.useEffect)((()=>{if(!e)return;const t=s.current.childElementCount,r=(0,E.sprintf)((0,E._n)("%d result found.","%d results found.",t),t);n(r,t)}),[e,n]),(0,l.createElement)("div",{ref:s,className:"edit-site-block-types-item-list"},a.map((e=>(0,l.createElement)(Md,{block:e,key:"menu-itemblock-"+e.name}))))}));const Od=function(){const[e,t]=(0,g.useState)(""),n=(0,g.useDeferredValue)(e);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{title:(0,E.__)("Blocks"),description:(0,E.__)("Customize the appearance of specific blocks and for the whole site.")}),(0,l.createElement)(_.SearchControl,{__nextHasNoMarginBottom:!0,className:"edit-site-block-types-search",onChange:t,value:e,label:(0,E.__)("Search for blocks"),placeholder:(0,E.__)("Search")}),(0,l.createElement)(Ad,{filterValue:n}))},Nd=({name:e,variation:t=""})=>{var n;const r=(0,u.getBlockType)(e)?.example,a=(0,g.useMemo)((()=>{if(!r)return null;let n=r;return t&&(n={...n,attributes:{...n.attributes,className:"is-style-"+t}}),(0,u.getBlockFromExample)(e,n)}),[e,r,t]),s=null!==(n=r?.viewportWidth)&&void 0!==n?n:null;return r?(0,l.createElement)(_.__experimentalSpacer,{marginX:4,marginBottom:4},(0,l.createElement)("div",{className:"edit-site-global-styles__block-preview-panel",style:{maxHeight:150,boxSizing:"initial"}},(0,l.createElement)(fe.BlockPreview,{blocks:a,viewportWidth:s,minHeight:150,additionalStyles:[{css:"\n\t\t\t\t\t\t\t\tbody{\n\t\t\t\t\t\t\t\t\tmin-height:150px;\n\t\t\t\t\t\t\t\t\tdisplay:flex;align-items:center;justify-content:center;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t"}]}))):null};const Fd=function({children:e,level:t}){return(0,l.createElement)(_.__experimentalHeading,{className:"edit-site-global-styles-subtitle",level:null!=t?t:2},e)};function Rd(e){if(!e)return e;const t=e.color||e.width;return!e.style&&t?{...e,style:"solid"}:!e.style||t?e:void 0}const{useHasDimensionsPanel:Dd,useHasTypographyPanel:Vd,useHasBorderPanel:Ld,useGlobalSetting:Bd,useSettingsForBlockElement:zd,useHasColorPanel:Hd,useHasFiltersPanel:Gd,useHasImageSettingsPanel:Ud,useGlobalStyle:Wd,BorderPanel:jd,ColorPanel:Zd,TypographyPanel:qd,DimensionsPanel:Yd,FiltersPanel:Kd,ImageSettingsPanel:Xd,AdvancedPanel:Jd}=Xe(fe.privateApis);const Qd=function({name:e,variation:t}){let n=[];t&&(n=["variations",t].concat(n));const r=n.join("."),[a]=Wd(r,e,"user",{shouldDecodeEncode:!1}),[s,i]=Wd(r,e,"all",{shouldDecodeEncode:!1}),[o]=Bd("",e,"user"),[c,d]=Bd("",e),p=zd(c,e),h=(0,u.getBlockType)(e);p?.spacing?.blockGap&&h?.supports?.spacing?.blockGap&&(!0===h?.supports?.spacing?.__experimentalSkipSerialization||h?.supports?.spacing?.__experimentalSkipSerialization?.some?.((e=>"blockGap"===e)))&&(p.spacing.blockGap=!1),p?.dimensions?.aspectRatio&&"core/group"===e&&(p.dimensions.aspectRatio=!1);const f=_d(e),y=Vd(p),v=Hd(p),b=Ld(p),w=Dd(p),S=Gd(p),x=Ud(e,o,p),C=!!f?.length&&!t,{canEditCSS:k}=(0,m.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(ye.store),r=n(),a=r?t("root","globalStyles",r):void 0;return{canEditCSS:!!a?._links?.["wp:action-edit-css"]}}),[]),T=t?f.find((e=>e.name===t)):null,P=(0,g.useMemo)((()=>({...s,layout:p.layout})),[s,p.layout]),I=(0,g.useMemo)((()=>({...a,layout:o.layout})),[a,o.layout]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{title:t?T.label:h.title}),(0,l.createElement)(Nd,{name:e,variation:t}),C&&(0,l.createElement)("div",{className:"edit-site-global-styles-screen-variations"},(0,l.createElement)(_.__experimentalVStack,{spacing:3},(0,l.createElement)(Fd,null,(0,E.__)("Style Variations")),(0,l.createElement)(Ed,{name:e}))),v&&(0,l.createElement)(Zd,{inheritedValue:s,value:a,onChange:i,settings:p}),y&&(0,l.createElement)(qd,{inheritedValue:s,value:a,onChange:i,settings:p}),w&&(0,l.createElement)(Yd,{inheritedValue:P,value:I,onChange:e=>{const t={...e};delete t.layout,i(t),e.layout!==o.layout&&d({...o,layout:e.layout})},settings:p,includeLayoutControls:!0}),b&&(0,l.createElement)(jd,{inheritedValue:s,value:a,onChange:e=>{if(!e?.border)return void i(e);const{radius:t,...n}=e.border,r=function(e){return e?(0,_.__experimentalHasSplitBorders)(e)?{top:Rd(e.top),right:Rd(e.right),bottom:Rd(e.bottom),left:Rd(e.left)}:Rd(e):e}(n),a=(0,_.__experimentalHasSplitBorders)(r)?{color:null,style:null,width:null,...r}:{top:r,right:r,bottom:r,left:r};i({...e,border:{...a,radius:t}})},settings:p}),S&&(0,l.createElement)(Kd,{inheritedValue:P,value:I,onChange:i,settings:p,includeLayoutControls:!0}),x&&(0,l.createElement)(Xd,{onChange:e=>{d(void 0===e?{...c,lightbox:void 0}:{...c,lightbox:{...c.lightbox,...e}})},value:o,inheritedValue:p}),k&&(0,l.createElement)(_.PanelBody,{title:(0,E.__)("Advanced"),initialOpen:!1},(0,l.createElement)("p",null,(0,E.sprintf)((0,E.__)("Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value."),h?.title)),(0,l.createElement)(Jd,{value:a,onChange:i,inheritedValue:s})))},{useGlobalStyle:$d}=Xe(fe.privateApis);function em({parentMenu:e,element:t,label:n}){const r="text"!==t&&t?`elements.${t}.`:"",a="link"===t?{textDecoration:"underline"}:{},[s]=$d(r+"typography.fontFamily"),[i]=$d(r+"typography.fontStyle"),[o]=$d(r+"typography.fontWeight"),[c]=$d(r+"typography.letterSpacing"),[u]=$d(r+"color.background"),[d]=$d(r+"color.gradient"),[m]=$d(r+"color.text"),p=(0,E.sprintf)((0,E.__)("Typography %s styles"),n);return(0,l.createElement)(cd,{path:e+"/typography/"+t,"aria-label":p},(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start"},(0,l.createElement)(_.FlexItem,{className:"edit-site-global-styles-screen-typography__indicator",style:{fontFamily:null!=s?s:"serif",background:null!=d?d:u,color:m,fontStyle:i,fontWeight:o,letterSpacing:c,...a}},(0,E.__)("Aa")),(0,l.createElement)(_.FlexItem,null,n)))}const tm=function(){return(0,l.createElement)(_.__experimentalVStack,{spacing:3},(0,l.createElement)(Fd,{level:3},(0,E.__)("Elements")),(0,l.createElement)(_.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,l.createElement)(em,{parentMenu:"",element:"text",label:(0,E.__)("Text")}),(0,l.createElement)(em,{parentMenu:"",element:"link",label:(0,E.__)("Links")}),(0,l.createElement)(em,{parentMenu:"",element:"heading",label:(0,E.__)("Headings")}),(0,l.createElement)(em,{parentMenu:"",element:"caption",label:(0,E.__)("Captions")}),(0,l.createElement)(em,{parentMenu:"",element:"button",label:(0,E.__)("Buttons")})))},nm=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,l.createElement)(w.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})),rm="/wp/v2/font-families",am="/wp/v2/font-collections";async function sm(e){const t={path:rm,method:"POST",body:e},n=await Xt()(t);return{id:n.id,...n.font_family_settings,fontFace:[]}}async function im(e,t){const n={path:`${rm}/${e}/font-faces`,method:"POST",body:t},r=await Xt()(n);return{id:r.id,...r.font_face_settings}}async function om(e){const t={path:`${rm}?slug=${e}&_embed=true`,method:"GET"},n=await Xt()(t);if(!n||0===n.length)return null;const r=n[0];return{id:r.id,...r.font_family_settings,fontFace:r?._embedded?.font_faces.map((e=>e.font_face_settings))||[]}}async function lm(e){const t={path:`${rm}/${e}?force=true`,method:"DELETE"};return await Xt()(t)}const cm=["otf","ttf","woff","woff2"],um={100:(0,E._x)("Thin","font weight"),200:(0,E._x)("Extra-light","font weight"),300:(0,E._x)("Light","font weight"),400:(0,E._x)("Normal","font weight"),500:(0,E._x)("Medium","font weight"),600:(0,E._x)("Semi-bold","font weight"),700:(0,E._x)("Bold","font weight"),800:(0,E._x)("Extra-bold","font weight"),900:(0,E._x)("Black","font weight")},dm={normal:(0,E._x)("Normal","font style"),italic:(0,E._x)("Italic","font style")};function mm(e){const t=/^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/,n=e.trim(),r=e=>(e=e.trim()).match(t)?`"${e=e.replace(/^["']|["']$/g,"")}"`:e;return n.includes(",")?n.split(",").map(r).filter((e=>""!==e)).join(", "):r(n)}function pm(e){if(!e)return"";let t=e.trim();return t.includes(",")&&(t=t.split(",").find((e=>""!==e.trim())).trim()),t=t.replace(/^["']|["']$/g,""),window.navigator.userAgent.toLowerCase().includes("firefox")&&(t=`"${t}"`),t}function hm(e){const t={fontFamily:mm(e.fontFamily)};if(!Array.isArray(e.fontFace))return t.fontWeight="400",t.fontStyle="normal",t;if(e.fontFace){const a=e.fontFace.filter((e=>"normal"===e.fontStyle.toLowerCase()));if(a.length>0){t.fontStyle="normal";const e=function(e){const t=[];return e.forEach((e=>{const n=String(e.fontWeight).split(" ");if(2===n.length){const e=parseInt(n[0]),r=parseInt(n[1]);for(let n=e;n<=r;n+=100)t.push(n)}else 1===n.length&&t.push(parseInt(n[0]))})),t}(a),s=(n=400,0===(r=e).length?null:(r.sort(((e,t)=>Math.abs(n-e)-Math.abs(n-t))),r[0]));t.fontWeight=String(s)||"400"}else t.fontStyle=e.fontFace.length&&e.fontFace[0].fontStyle||"normal",t.fontWeight=e.fontFace.length&&String(e.fontFace[0].fontWeight)||"400"}var n,r;return t}const{File:fm}=window;function gm(e,t={}){return e.name||!e.fontFamily&&!e.slug||(e.name=e.fontFamily||e.slug),{...e,...t}}function ym(e){return`${um[e.fontWeight]||e.fontWeight} ${"normal"===e.fontStyle?"":dm[e.fontStyle]||e.fontStyle}`}function vm(e=[],t=[]){const n=new Map;for(const t of e)n.set(`${t.fontWeight}${t.fontStyle}`,t);for(const e of t)n.set(`${e.fontWeight}${e.fontStyle}`,e);return Array.from(n.values())}function bm(e=[],t=[]){const n=new Map;for(const t of e)n.set(t.slug,{...t});for(const e of t)if(n.has(e.slug)){const{fontFace:t,...r}=e,a=vm(n.get(e.slug).fontFace,t);n.set(e.slug,{...r,fontFace:a})}else n.set(e.slug,{...e});return Array.from(n.values())}async function _m(e,t,n="all"){let r;if("string"==typeof t)r=`url(${t})`;else{if(!(t instanceof fm))return;r=await t.arrayBuffer()}const a=new window.FontFace(pm(e.fontFamily),r,{style:e.fontStyle,weight:e.fontWeight}),s=await a.load();if("document"!==n&&"all"!==n||document.fonts.add(s),"iframe"===n||"all"===n){document.querySelector('iframe[name="editor-canvas"]').contentDocument.fonts.add(s)}}function Em(e,t="all"){const n=t=>{t.forEach((n=>{n.family===pm(e?.fontFamily)&&n.weight===e?.fontWeight&&n.style===e?.fontStyle&&t.delete(n)}))};if("document"!==t&&"all"!==t||n(document.fonts),"iframe"===t||"all"===t){n(document.querySelector('iframe[name="editor-canvas"]').contentDocument.fonts)}}function wm(e){if(!e)return;let t;var n;return t=Array.isArray(e)?e[0]:e,t.startsWith("file:.")?void 0:(("string"!=typeof(n=t)||n===decodeURIComponent(n))&&(t=encodeURI(t)),t)}function Sm(e){const t=new FormData,{kebabCase:n}=Xe(_.privateApis),{fontFace:r,category:a,...s}=e,i={...s,slug:n(e.slug)};return t.append("font_family_settings",JSON.stringify(i)),t}function xm(e){if(e?.fontFace){const t=e.fontFace.map(((e,t)=>{const n={...e},r=new FormData;if(n.file){const e=Array.isArray(n.file)?n.file:[n.file],a=[];e.forEach(((e,n)=>{const s=`file-${t}-${n}`;r.append(s,e,e.name),a.push(s)})),n.src=1===a.length?a[0]:a,delete n.file,r.append("font_face_settings",JSON.stringify(n))}else r.append("font_face_settings",JSON.stringify(n));return r}));return t}}async function Cm(e,t){const n=[];for(const r of t)try{const t=await im(e,r);n.push({status:"fulfilled",value:t})}catch(e){n.push({status:"rejected",reason:e})}const r={errors:[],successes:[]};return n.forEach(((e,n)=>{if("fulfilled"===e.status){const a=e.value;a.id?r.successes.push(a):r.errors.push({data:t[n],message:`Error: ${a.message}`})}else r.errors.push({data:t[n],message:e.reason.message})})),r}function km(e,t){return-1!==t.findIndex((t=>t.fontWeight===e.fontWeight&&t.fontStyle===e.fontStyle))}function Tm(e,t,n){const r=t=>t.slug===e.slug,a=n.find(r);return t?(a=>{const s=e=>e.fontWeight===t.fontWeight&&e.fontStyle===t.fontStyle;if(!a)return[...n,{...e,fontFace:[t]}];let i=a.fontFace||[];return i=i.find(s)?i.filter((e=>!s(e))):[...i,t],0===i.length?n.filter((e=>!r(e))):n.map((e=>r(e)?{...e,fontFace:i}:e))})(a):(t=>t?n.filter((e=>!r(e))):[...n,e])(a)}const{useGlobalSetting:Pm}=Xe(fe.privateApis),Im=(0,g.createContext)({});const Mm=function({children:e}){const{saveEntityRecord:t}=(0,m.useDispatch)(ye.store),{globalStylesId:n}=(0,m.useSelect)((e=>{const{__experimentalGetCurrentGlobalStylesId:t}=e(ye.store);return{globalStylesId:t()}})),r=(0,ye.useEntityRecord)("root","globalStyles",n),a=!!r?.edits?.settings?.typography?.fontFamilies,[s,i]=(0,g.useState)(!1),[o,c]=(0,g.useState)(0),[u,d]=(0,g.useState)(null),p=()=>{c(Date.now())},{records:h=[],isResolving:f,hasResolved:y}=(0,ye.useEntityRecords)("postType","wp_font_family",{refreshKey:o,_embed:!0}),v=(h||[]).map((e=>({id:e.id,...e.font_family_settings,fontFace:e?._embedded?.font_faces.map((e=>e.font_face_settings))||[]})))||[],[b,_]=Pm("typography.fontFamilies"),[w]=Pm("typography.fontFamilies",void 0,"base"),S=async e=>{const n=r.record;et(n,["settings","typography","fontFamilies"],e),await t("root","globalStyles",n)},[x,C]=(0,g.useState)(!1),[k,T]=(0,g.useState)(null),P=b?.theme?b.theme.map((e=>gm(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],I=new Set(P.map((e=>e.slug))),M=w?.theme?P.concat(w.theme.filter((e=>!I.has(e.slug))).map((e=>gm(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name)))):[],A=b?.custom?b.custom.map((e=>gm(e,{source:"custom"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],O=v?v.map((e=>gm(e,{source:"custom"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[];(0,g.useEffect)((()=>{x||T(null)}),[x]);const[N]=(0,g.useState)(new Set),F=e=>e.reduce(((e,t)=>{const n=t?.fontFace&&t.fontFace?.length>0?t?.fontFace.map((e=>`${e.fontStyle+e.fontWeight}`)):["normal400"];return e[t.slug]=n,e}),{}),R=e=>F("theme"===e?P:A),D=(e,t,n,r)=>t||n?!!R(r)[e]?.includes(t+n):!!R(r)[e],V=e=>{var t;const n=(null!==(t=b?.[e.source])&&void 0!==t?t:[]).filter((t=>t.slug!==e.slug)),r={...b,[e.source]:n};return _(r),e.fontFace&&e.fontFace.forEach((e=>{Em(e,"all")})),r},L=e=>{const t=B(e),n={...b,custom:bm(b?.custom,t)};return _(n),z(t),n},B=e=>e.map((({id:e,fontFace:t,...n})=>({...n,...t&&t.length>0?{fontFace:t.map((({id:e,...t})=>t))}:{}}))),z=e=>{e.forEach((e=>{e.fontFace&&e.fontFace.forEach((e=>{_m(e,wm(e.src),"all")}))}))},[H,G]=(0,g.useState)([]),U=async()=>{const e=await async function(){const e={path:`${am}?_fields=slug,name,description`,method:"GET"};return await Xt()(e)}();G(e)};return(0,g.useEffect)((()=>{U()}),[]),(0,l.createElement)(Im.Provider,{value:{libraryFontSelected:k,handleSetLibraryFontSelected:e=>{if(d(null),!e)return void T(null);const t=("theme"===e.source?P:O).find((t=>t.slug===e.slug));T({...t||e,source:e.source})},fontFamilies:b,themeFonts:P,baseThemeFonts:M,customFonts:A,baseCustomFonts:O,isFontActivated:D,getFontFacesActivated:(e,t)=>R(t)[e]||[],loadFontFaceAsset:async e=>{if(!e.src)return;const t=wm(e.src);t&&!N.has(t)&&(_m(e,t,"document"),N.add(t))},installFonts:async function(e){i(!0);try{const t=[];let n=[];for(const r of e){let e=!1,a=await om(r.slug);a||(e=!0,a=await sm(Sm(r)));const s=a.fontFace&&r.fontFace?a.fontFace.filter((e=>km(e,r.fontFace))):[];a.fontFace&&r.fontFace&&(r.fontFace=r.fontFace.filter((e=>!km(e,a.fontFace))));let i=[],o=[];if(r?.fontFace?.length>0){const e=await Cm(a.id,xm(r));i=e?.successes,o=e?.errors}(i?.length>0||s?.length>0)&&(a.fontFace=[...i],t.push(a)),a&&!r?.fontFace?.length&&t.push(a),e&&r?.fontFace?.length>0&&0===i?.length&&await lm(a.id),n=n.concat(o)}if(n=n.reduce(((e,t)=>e.includes(t.message)?e:[...e,t.message]),[]),t.length>0){const e=L(t);await S(e),p()}if(n.length>0){const e=new Error((0,E.__)("There was an error installing fonts."));throw e.installationErrors=n,e}}finally{i(!1)}},uninstallFontFamily:async function(e){try{const t=await lm(e.id);if(t.deleted){const t=V(e);await S(t)}return p(),t}catch(e){throw console.error("There was an error uninstalling the font family:",e),e}},toggleActivateFont:(e,t)=>{var n;const r=Tm(e,t,null!==(n=b?.[e.source])&&void 0!==n?n:[]);_({...b,[e.source]:r});D(e.slug,t?.fontStyle,t?.fontWeight,e.source)?_m(t,wm(t?.src),"all"):Em(t,"all")},getAvailableFontsOutline:F,modalTabOpen:x,toggleModal:e=>{C(e||null)},refreshLibrary:p,notice:u,setNotice:d,saveFontFamilies:S,fontFamiliesHasChanges:a,isResolvingLibrary:f,hasResolvedLibrary:y,isInstalling:s,collections:H,getFontCollection:async e=>{try{if(!!H.find((t=>t.slug===e))?.font_families)return;const t=await async function(e){const t={path:`${am}/${e}`,method:"GET"};return await Xt()(t)}(e),n=H.map((n=>n.slug===e?{...n,...t}:n));G(n)}catch(e){throw console.error(e),e}}}},e)};const Am=function({font:e,text:t}){const n=(0,g.useRef)(null),r=function(e){return e.fontStyle||e.fontWeight?e:e.fontFace&&e.fontFace.length?e.fontFace.find((e=>"normal"===e.fontStyle&&"400"===e.fontWeight))||e.fontFace[0]:{fontStyle:"normal",fontWeight:"400",fontFamily:e.fontFamily,fake:!0}}(e),a=hm(e);t=t||e.name;const s=e.preview,[i,o]=(0,g.useState)(!1),[c,u]=(0,g.useState)(!1),{loadFontFaceAsset:d}=(0,g.useContext)(Im),m=null!=s?s:function(e){return e.preview?e.preview:e.src?Array.isArray(e.src)?e.src[0]:e.src:void 0}(r),p=m&&m.match(/\.(png|jpg|jpeg|gif|svg)$/i);var h;const f={fontSize:"18px",lineHeight:1,opacity:c?"1":"0",...a,...{fontFamily:mm((h=r).fontFamily),fontStyle:h.fontStyle||"normal",fontWeight:h.fontWeight||"400"}};return(0,g.useEffect)((()=>{const e=new window.IntersectionObserver((([e])=>{o(e.isIntersecting)}),{});return e.observe(n.current),()=>e.disconnect()}),[n]),(0,g.useEffect)((()=>{(async()=>{i&&(!p&&r.src&&await d(r),u(!0))})()}),[r,i,d,p]),(0,l.createElement)("div",{ref:n},p?(0,l.createElement)("img",{src:m,loading:"lazy",alt:t,className:"font-library-modal__font-variant_demo-image"}):(0,l.createElement)(_.__experimentalText,{style:f,className:"font-library-modal__font-variant_demo-text"},t))};const Om=function({font:e,onClick:t,variantsText:n,navigatorPath:r}){const a=e.fontFace?.length||1,s={cursor:t?"pointer":"default"},i=(0,_.__experimentalUseNavigator)();return(0,l.createElement)(_.Button,{onClick:()=>{t(),r&&i.goTo(r)},style:s,className:"font-library-modal__font-card"},(0,l.createElement)(_.Flex,{justify:"space-between",wrap:!1},(0,l.createElement)(Am,{font:e}),(0,l.createElement)(_.Flex,{justify:"flex-end"},(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.__experimentalText,{className:"font-library-modal__font-card__count"},n||(0,E.sprintf)((0,E._n)("%d variant","%d variants",a),a))),(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.Icon,{icon:ur})))))};const Nm=function({face:e,font:t}){const{isFontActivated:n,toggleActivateFont:r}=(0,g.useContext)(Im),a=t?.fontFace?.length>0?n(t.slug,e.fontStyle,e.fontWeight,t.source):n(t.slug,null,null,t.source),s=()=>{t?.fontFace?.length>0?r(t,e):r(t)},i=t.name+" "+ym(e),{kebabCase:o}=Xe(_.privateApis),c=o(`${t.slug}-${ym(e)}`);return(0,l.createElement)("div",{className:"font-library-modal__font-card"},(0,l.createElement)(_.Flex,{justify:"flex-start",align:"center",gap:"1rem"},(0,l.createElement)(_.CheckboxControl,{checked:a,onChange:s,__nextHasNoMarginBottom:!0,id:c}),(0,l.createElement)("label",{htmlFor:c},(0,l.createElement)(Am,{font:e,text:i,onClick:s}))))};function Fm(e){switch(e){case"normal":return 400;case"bold":return 700;case"bolder":return 500;case"lighter":return 300;default:return parseInt(e,10)}}function Rm(e){return e.sort(((e,t)=>"normal"===e.fontStyle&&"normal"!==t.fontStyle?-1:"normal"===t.fontStyle&&"normal"!==e.fontStyle?1:e.fontStyle===t.fontStyle?Fm(e.fontWeight)-Fm(t.fontWeight):e.fontStyle.localeCompare(t.fontStyle)))}const{ProgressBar:Dm}=Xe(_.privateApis);function Vm({font:e,isOpen:t,setIsOpen:n,setNotice:r,uninstallFontFamily:a,handleSetLibraryFontSelected:s}){const i=(0,_.__experimentalUseNavigator)();return(0,l.createElement)(_.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,E.__)("Cancel"),confirmButtonText:(0,E.__)("Delete"),onCancel:()=>{n(!1)},onConfirm:async()=>{r(null),n(!1);try{await a(e),i.goBack(),s(null),r({type:"success",message:(0,E.__)("Font family uninstalled successfully.")})}catch(e){r({type:"error",message:(0,E.__)("There was an error uninstalling the font family. ")+e.message})}}},e&&(0,E.sprintf)((0,E.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),e.name))}const Lm=function(){const{baseCustomFonts:e,libraryFontSelected:t,baseThemeFonts:n,handleSetLibraryFontSelected:r,refreshLibrary:a,uninstallFontFamily:s,isResolvingLibrary:i,isInstalling:o,saveFontFamilies:c,getFontFacesActivated:u,fontFamiliesHasChanges:d,notice:p,setNotice:h,fontFamilies:f}=(0,g.useContext)(Im),[y,v]=(0,g.useState)(!1),b="custom"===t?.source&&t?.id,w=(0,m.useSelect)((e=>{const{canUser:t}=e(ye.store);return b&&t("delete","font-families",b)}),[b]),S=!!t&&"theme"!==t?.source&&w,x=e=>{const t=e?.fontFace?.length>0?e.fontFace.length:1,n=u(e.slug,e.source).length;return(0,E.sprintf)((0,E.__)("%1$s/%2$s variants active"),n,t)};return(0,g.useEffect)((()=>{r(t),a()}),[]),(0,l.createElement)("div",{className:"font-library-modal__tabpanel-layout"},i&&(0,l.createElement)(_.__experimentalHStack,{align:"center"},(0,l.createElement)(_.__experimentalSpacer,null),(0,l.createElement)(_.Spinner,null),(0,l.createElement)(_.__experimentalSpacer,null)),(0,l.createElement)(_.__experimentalNavigatorProvider,{initialPath:t?"/fontFamily":"/"},(0,l.createElement)(_.__experimentalNavigatorScreen,{path:"/"},p&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalSpacer,{margin:1}),(0,l.createElement)(_.Notice,{status:p.type,onRemove:()=>h(null)},p.message),(0,l.createElement)(_.__experimentalSpacer,{margin:1})),e.length>0&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalText,{className:"font-library-modal__subtitle"},(0,E.__)("Installed Fonts")),(0,l.createElement)(_.__experimentalSpacer,{margin:2}),e.map((e=>(0,l.createElement)(Om,{font:e,key:e.slug,navigatorPath:"/fontFamily",variantsText:x(e),onClick:()=>{r(e)}}))),(0,l.createElement)(_.__experimentalSpacer,{margin:8})),n.length>0&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalText,{className:"font-library-modal__subtitle"},(0,E.__)("Theme Fonts")),(0,l.createElement)(_.__experimentalSpacer,{margin:2}),n.map((e=>(0,l.createElement)(Om,{font:e,key:e.slug,navigatorPath:"/fontFamily",variantsText:x(e),onClick:()=>{r(e)}})))),(0,l.createElement)(_.__experimentalSpacer,{margin:16})),(0,l.createElement)(_.__experimentalNavigatorScreen,{path:"/fontFamily"},(0,l.createElement)(Vm,{font:t,isOpen:y,setIsOpen:v,setNotice:h,uninstallFontFamily:s,handleSetLibraryFontSelected:r}),(0,l.createElement)(_.Flex,{justify:"flex-start"},(0,l.createElement)(_.__experimentalNavigatorToParentButton,{icon:dr,isSmall:!0,onClick:()=>{r(null)},"aria-label":(0,E.__)("Navigate to the previous view")}),(0,l.createElement)(_.__experimentalHeading,{level:2,size:13,className:"edit-site-global-styles-header"},t?.name)),p&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalSpacer,{margin:1}),(0,l.createElement)(_.Notice,{status:p.type,onRemove:()=>h(null)},p.message),(0,l.createElement)(_.__experimentalSpacer,{margin:1})),(0,l.createElement)(_.__experimentalSpacer,{margin:4}),(0,l.createElement)(_.__experimentalText,null,(0,E.__)("Choose font variants. Keep in mind that too many variants could make your site slower.")),(0,l.createElement)(_.__experimentalSpacer,{margin:4}),(0,l.createElement)(_.__experimentalVStack,{spacing:0},(0,l.createElement)(_.__experimentalSpacer,{margin:8}),(e=>e?e.fontFace&&e.fontFace.length?Rm(e.fontFace):[{fontFamily:e.fontFamily,fontStyle:"normal",fontWeight:"400"}]:[])(t).map(((e,n)=>(0,l.createElement)(Nm,{font:t,face:e,key:`face${n}`})))))),(0,l.createElement)(_.__experimentalHStack,{justify:"flex-end",className:"font-library-modal__tabpanel-layout__footer"},o&&(0,l.createElement)(Dm,null),S&&(0,l.createElement)(_.Button,{isDestructive:!0,variant:"tertiary",onClick:()=>{v(!0)}},(0,E.__)("Delete")),(0,l.createElement)(_.Button,{variant:"primary",onClick:()=>{c(f)},disabled:!d,__experimentalIsFocusable:!0},(0,E.__)("Update"))))};function Bm(e,t,n){return t?!!n[e]?.[`${t.fontStyle}-${t.fontWeight}`]:!!n[e]}const zm=function(){return(0,l.createElement)("div",{className:"font-library__google-fonts-confirm"},(0,l.createElement)(_.Card,null,(0,l.createElement)(_.CardBody,null,(0,l.createElement)(_.__experimentalText,{as:"h3"},(0,E.__)("Connect to Google Fonts")),(0,l.createElement)(_.__experimentalSpacer,{margin:6}),(0,l.createElement)(_.__experimentalText,{as:"p"},(0,E.__)("To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts.")),(0,l.createElement)(_.__experimentalSpacer,{margin:3}),(0,l.createElement)(_.__experimentalText,{as:"p"},(0,E.__)("You can alternatively upload files directly on the Upload tab.")),(0,l.createElement)(_.__experimentalSpacer,{margin:6}),(0,l.createElement)(_.Button,{variant:"primary",onClick:()=>{window.localStorage.setItem("wp-font-library-google-fonts-permission","true"),window.dispatchEvent(new Event("storage"))}},(0,E.__)("Allow access to Google Fonts")))))};const Hm=function({face:e,font:t,handleToggleVariant:n,selected:r}){const a=()=>{t?.fontFace?n(t,e):n(t)},s=t.name+" "+ym(e),{kebabCase:i}=Xe(_.privateApis),o=i(`${t.slug}-${ym(e)}`);return(0,l.createElement)("div",{className:"font-library-modal__font-card"},(0,l.createElement)(_.Flex,{justify:"flex-start",align:"center",gap:"1rem"},(0,l.createElement)(_.CheckboxControl,{checked:r,onChange:a,__nextHasNoMarginBottom:!0,id:o}),(0,l.createElement)("label",{htmlFor:o},(0,l.createElement)(Am,{font:e,text:s,onClick:a}))))},Gm={slug:"all",name:(0,E._x)("All","font categories")},Um="wp-font-library-google-fonts-permission";const Wm=function({slug:e}){var t;const n="google-fonts"===e,r=()=>"true"===window.localStorage.getItem(Um),[a,s]=(0,g.useState)(null),[i,o]=(0,g.useState)([]),[c,u]=(0,g.useState)(1),[d,m]=(0,g.useState)({}),[p,h]=(0,g.useState)(n&&!r()),{collections:f,getFontCollection:y,installFonts:v,isInstalling:b,notice:w,setNotice:S}=(0,g.useContext)(Im),x=f.find((t=>t.slug===e));(0,g.useEffect)((()=>{const e=()=>{h(n&&!r())};return e(),window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[e,n]);const C=()=>{window.localStorage.setItem(Um,"false"),window.dispatchEvent(new Event("storage"))};(0,g.useEffect)((()=>{(async()=>{try{await y(e),L()}catch(e){w||S({type:"error",message:e?.message})}})()}),[e,y,S,w]),(0,g.useEffect)((()=>{s(null),S(null)}),[e,S]),(0,g.useEffect)((()=>{o([])}),[a]);const k=(0,g.useMemo)((()=>{var e;return null!==(e=x?.font_families)&&void 0!==e?e:[]}),[x]),T=null!==(t=x?.categories)&&void 0!==t?t:[],I=[Gm,...T],M=(0,g.useMemo)((()=>function(e,t){const{category:n,search:r}=t;let a=e||[];return n&&"all"!==n&&(a=a.filter((e=>-1!==e.categories.indexOf(n)))),r&&(a=a.filter((e=>e.font_family_settings.name.toLowerCase().includes(r.toLowerCase())))),a}(k,d)),[k,d]),A=Math.max(window.innerHeight,500),O=Math.floor((A-417)/61),N=Math.ceil(M.length/O),F=(c-1)*O,R=c*O,D=M.slice(F,R),V=(0,ie.debounce)((e=>{m({...d,search:e}),u(1)}),300),L=()=>{m({}),u(1)},B=(e,t)=>{const n=Tm(e,t,i);o(n)},z=function(e){return e.reduce(((e,t)=>({...e,[t.slug]:(t?.fontFace||[]).reduce(((e,t)=>({...e,[`${t.fontStyle}-${t.fontWeight}`]:!0})),{})})),{})}(i);return p?(0,l.createElement)(zm,null):(0,l.createElement)("div",{className:"font-library-modal__tabpanel-layout"},(0,l.createElement)(_.__experimentalNavigatorProvider,{initialPath:"/",className:"font-library-modal__tabpanel-layout"},(0,l.createElement)(_.__experimentalNavigatorScreen,{path:"/"},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(_.__experimentalVStack,null,(0,l.createElement)(_.__experimentalHeading,{level:2,size:13},x.name),(0,l.createElement)(_.__experimentalText,null,x.description)),(0,l.createElement)((()=>"google-fonts"!==e||p||a?null:(0,l.createElement)(_.DropdownMenu,{icon:ue,label:(0,E.__)("Actions"),popoverProps:{position:"bottom left"},controls:[{title:(0,E.__)("Revoke access to Google Fonts"),onClick:C}]})),null)),(0,l.createElement)(_.__experimentalSpacer,{margin:4}),(0,l.createElement)(_.Flex,null,(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.__experimentalInputControl,{value:d.search,placeholder:(0,E.__)("Font name…"),label:(0,E.__)("Search"),onChange:V,prefix:(0,l.createElement)(_.Icon,{icon:Va}),suffix:d?.search?(0,l.createElement)(_.Icon,{icon:P,onClick:()=>{m({...d,search:""}),u(1)}}):null})),(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.SelectControl,{label:(0,E.__)("Category"),value:d.category,onChange:e=>{m({...d,category:e}),u(1)}},I&&I.map((e=>(0,l.createElement)("option",{value:e.slug,key:e.slug},e.name)))))),(0,l.createElement)(_.__experimentalSpacer,{margin:4}),!x?.font_families&&!w&&(0,l.createElement)(_.Spinner,null),!!x?.font_families?.length&&!M.length&&(0,l.createElement)(_.__experimentalText,null,(0,E.__)("No fonts found. Try with a different search term")),(0,l.createElement)("div",{className:"font-library-modal__fonts-grid__main"},D.map((e=>(0,l.createElement)(Om,{key:e.font_family_settings.slug,font:e.font_family_settings,navigatorPath:"/fontFamily",onClick:()=>{s(e.font_family_settings)}}))))),(0,l.createElement)(_.__experimentalNavigatorScreen,{path:"/fontFamily"},(0,l.createElement)(_.Flex,{justify:"flex-start"},(0,l.createElement)(_.__experimentalNavigatorToParentButton,{icon:dr,isSmall:!0,onClick:()=>{s(null),S(null)},"aria-label":(0,E.__)("Navigate to the previous view")}),(0,l.createElement)(_.__experimentalHeading,{level:2,size:13,className:"edit-site-global-styles-header"},a?.name)),w&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalSpacer,{margin:1}),(0,l.createElement)(_.Notice,{status:w.type,onRemove:()=>S(null)},w.message),(0,l.createElement)(_.__experimentalSpacer,{margin:1})),(0,l.createElement)(_.__experimentalSpacer,{margin:4}),(0,l.createElement)(_.__experimentalText,null," ",(0,E.__)("Select font variants to install.")," "),(0,l.createElement)(_.__experimentalSpacer,{margin:4}),(0,l.createElement)(_.__experimentalVStack,{spacing:0},(0,l.createElement)(_.__experimentalSpacer,{margin:8}),(H=a,H?H.fontFace&&H.fontFace.length?Rm(H.fontFace):[{fontFamily:H.fontFamily,fontStyle:"normal",fontWeight:"400"}]:[]).map(((e,t)=>(0,l.createElement)(Hm,{font:a,face:e,key:`face${t}`,handleToggleVariant:B,selected:Bm(a.slug,a.fontFace?e:null,z)})))),(0,l.createElement)(_.__experimentalSpacer,{margin:16}))),a&&(0,l.createElement)(_.Flex,{justify:"flex-end",className:"font-library-modal__tabpanel-layout__footer"},(0,l.createElement)(_.Button,{variant:"primary",onClick:async()=>{S(null);const e=i[0];try{e?.fontFace&&await Promise.all(e.fontFace.map((async e=>{e.src&&(e.file=await async function(e){e=Array.isArray(e)?e:[e];const t=await Promise.all(e.map((async e=>fetch(new Request(e)).then((t=>{if(!t.ok)throw new Error(`Error downloading font face asset from ${e}. Server responded with status: ${t.status}`);return t.blob()})).then((t=>{const n=e.split("/").pop();return new fm([t],n,{type:t.type})})))));return 1===t.length?t[0]:t}(e.src))})))}catch(e){return void S({type:"error",message:(0,E.__)("Error installing the fonts, could not be downloaded.")})}try{await v([e]),S({type:"success",message:(0,E.__)("Fonts were installed successfully.")})}catch(e){S({type:"error",message:e.message})}o([])},isBusy:b,disabled:0===i.length||b,__experimentalIsFocusable:!0},(0,E.__)("Install"))),!a&&(0,l.createElement)(_.Flex,{justify:"center",className:"font-library-modal__tabpanel-layout__footer"},(0,l.createElement)(_.Button,{label:(0,E.__)("First page"),size:"compact",onClick:()=>u(1),disabled:1===c,__experimentalIsFocusable:!0},(0,l.createElement)("span",null,"«")),(0,l.createElement)(_.Button,{label:(0,E.__)("Previous page"),size:"compact",onClick:()=>u(c-1),disabled:1===c,__experimentalIsFocusable:!0},(0,l.createElement)("span",null,"‹")),(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:2},(0,g.createInterpolateElement)((0,E.sprintf)((0,E._x)("Page <CurrentPageControl /> of %s","paging"),N),{CurrentPageControl:(0,l.createElement)(_.SelectControl,{"aria-label":(0,E.__)("Current page"),value:c,options:[...Array(N)].map(((e,t)=>({label:t+1,value:t+1}))),onChange:e=>u(parseInt(e)),size:"compact",__nextHasNoMarginBottom:!0})})),(0,l.createElement)(_.Button,{label:(0,E.__)("Next page"),size:"compact",onClick:()=>u(c+1),disabled:c===N,__experimentalIsFocusable:!0},(0,l.createElement)("span",null,"›")),(0,l.createElement)(_.Button,{label:(0,E.__)("Last page"),size:"compact",onClick:()=>u(N),disabled:c===N,__experimentalIsFocusable:!0},(0,l.createElement)("span",null,"»"))));var H};var jm=a(8572),Zm=a.n(jm),qm=a(4660),Ym=a.n(qm);globalThis.fetch;class Km{constructor(e,t={},n){this.type=e,this.detail=t,this.msg=n,Object.defineProperty(this,"__mayPropagate",{enumerable:!1,writable:!0}),this.__mayPropagate=!0}preventDefault(){}stopPropagation(){this.__mayPropagate=!1}valueOf(){return this}toString(){return this.msg?`[${this.type} event]: ${this.msg}`:`[${this.type} event]`}}class Xm{constructor(){this.listeners={}}addEventListener(e,t,n){let r=this.listeners[e]||[];n?r.unshift(t):r.push(t),this.listeners[e]=r}removeEventListener(e,t){let n=this.listeners[e]||[],r=n.findIndex((e=>e===t));r>-1&&(n.splice(r,1),this.listeners[e]=n)}dispatch(e){let t=this.listeners[e.type];if(t)for(let n=0,r=t.length;n<r&&e.__mayPropagate;n++)t[n](e)}}const Jm=new Date("1904-01-01T00:00:00+0000").getTime();class Qm{constructor(e,t,n){this.name=(n||e.tag||"").trim(),this.length=e.length,this.start=e.offset,this.offset=0,this.data=t,["getInt8","getUint8","getInt16","getUint16","getInt32","getUint32","getBigInt64","getBigUint64"].forEach((e=>{let t=e.replace(/get(Big)?/,"").toLowerCase(),n=parseInt(e.replace(/[^\d]/g,""))/8;Object.defineProperty(this,t,{get:()=>this.getValue(e,n)})}))}get currentPosition(){return this.start+this.offset}set currentPosition(e){this.start=e,this.offset=0}skip(e=0,t=8){this.offset+=e*t/8}getValue(e,t){let n=this.start+this.offset;this.offset+=t;try{return this.data[e](n)}catch(n){throw console.error("parser",e,t,this),console.error("parser",this.start,this.offset),n}}flags(e){if(8===e||16===e||32===e||64===e)return this[`uint${e}`].toString(2).padStart(e,0).split("").map((e=>"1"===e));console.error("Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long"),console.trace()}get tag(){const e=this.uint32;return t=[e>>24&255,e>>16&255,e>>8&255,255&e],Array.from(t).map((e=>String.fromCharCode(e))).join("");var t}get fixed(){return this.int16+Math.round(1e3*this.uint16/65356)/1e3}get legacyFixed(){let e=this.uint16,t=this.uint16.toString(16).padStart(4,0);return parseFloat(`${e}.${t}`)}get uint24(){return(this.uint8<<16)+(this.uint8<<8)+this.uint8}get uint128(){let e=0;for(let t=0;t<5;t++){let t=this.uint8;if(e=128*e+(127&t),t<128)break}return e}get longdatetime(){return new Date(Jm+1e3*parseInt(this.int64.toString()))}get fword(){return this.int16}get ufword(){return this.uint16}get Offset16(){return this.uint16}get Offset32(){return this.uint32}get F2DOT14(){const e=p.uint16;return[0,1,-2,-1][e>>14]+(16383&e)/16384}verifyLength(){this.offset!=this.length&&console.error(`unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`)}readBytes(e=0,t=0,n=8,r=!1){if(0===(e=e||this.length))return[];t&&(this.currentPosition=t);const a=`${r?"":"u"}int${n}`,s=[];for(;e--;)s.push(this[a]);return s}}class $m{constructor(e){const t={enumerable:!1,get:()=>e};Object.defineProperty(this,"parser",t);const n=e.currentPosition,r={enumerable:!1,get:()=>n};Object.defineProperty(this,"start",r)}load(e){Object.keys(e).forEach((t=>{let n=Object.getOwnPropertyDescriptor(e,t);n.get?this[t]=n.get.bind(this):void 0!==n.value&&(this[t]=n.value)})),this.parser.length&&this.parser.verifyLength()}}class ep extends $m{constructor(e,t,n){const{parser:r,start:a}=super(new Qm(e,t,n)),s={enumerable:!1,get:()=>r};Object.defineProperty(this,"p",s);const i={enumerable:!1,get:()=>a};Object.defineProperty(this,"tableStart",i)}}function tp(e,t,n){let r;Object.defineProperty(e,t,{get:()=>r||(r=n(),r),enumerable:!0})}class np extends ep{constructor(e,t,n){const{p:r}=super({offset:0,length:12},t,"sfnt");this.version=r.uint32,this.numTables=r.uint16,this.searchRange=r.uint16,this.entrySelector=r.uint16,this.rangeShift=r.uint16,r.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new rp(r))),this.tables={},this.directory.forEach((e=>{tp(this.tables,e.tag.trim(),(()=>n(this.tables,{tag:e.tag,offset:e.offset,length:e.length},t)))}))}}class rp{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}}const ap=Ym().inflate||void 0;let sp;class ip extends ep{constructor(e,t,n){const{p:r}=super({offset:0,length:44},t,"woff");this.signature=r.tag,this.flavor=r.uint32,this.length=r.uint32,this.numTables=r.uint16,r.uint16,this.totalSfntSize=r.uint32,this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.metaOffset=r.uint32,this.metaLength=r.uint32,this.metaOrigLength=r.uint32,this.privOffset=r.uint32,this.privLength=r.uint32,r.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new op(r))),lp(this,t,n)}}class op{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}}function lp(e,t,n){e.tables={},e.directory.forEach((r=>{tp(e.tables,r.tag.trim(),(()=>{let a=0,s=t;if(r.compLength!==r.origLength){const e=t.buffer.slice(r.offset,r.offset+r.compLength);let n;if(ap)n=ap(new Uint8Array(e));else{if(!sp){const e="no brotli decoder available to decode WOFF2 font";throw font.onerror&&font.onerror(e),new Error(e)}n=sp(new Uint8Array(e))}s=new DataView(n.buffer)}else a=r.offset;return n(e.tables,{tag:r.tag,offset:a,length:r.origLength},s)}))}))}const cp=Zm();let up;class dp extends ep{constructor(e,t,n){const{p:r}=super({offset:0,length:48},t,"woff2");this.signature=r.tag,this.flavor=r.uint32,this.length=r.uint32,this.numTables=r.uint16,r.uint16,this.totalSfntSize=r.uint32,this.totalCompressedSize=r.uint32,this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.metaOffset=r.uint32,this.metaLength=r.uint32,this.metaOrigLength=r.uint32,this.privOffset=r.uint32,this.privLength=r.uint32,r.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new mp(r)));let a,s=r.currentPosition;this.directory[0].offset=0,this.directory.forEach(((e,t)=>{let n=this.directory[t+1];n&&(n.offset=e.offset+(void 0!==e.transformLength?e.transformLength:e.origLength))}));let i=t.buffer.slice(s);if(cp)a=cp(new Uint8Array(i));else{if(!up){const t="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(t),new Error(t)}a=new Uint8Array(up(i))}!function(e,t,n){e.tables={},e.directory.forEach((r=>{tp(e.tables,r.tag.trim(),(()=>{const a=r.offset,s=a+(r.transformLength?r.transformLength:r.origLength),i=new DataView(t.slice(a,s).buffer);try{return n(e.tables,{tag:r.tag,offset:0,length:r.origLength},i)}catch(e){console.error(e)}}))}))}(this,a,n)}}class mp{constructor(e){this.flags=e.uint8;const t=this.tagNumber=63&this.flags;this.tag=63===t?e.tag:["cmap","head","hhea","hmtx","maxp","name","OS/2","post","cvt ","fpgm","glyf","loca","prep","CFF ","VORG","EBDT","EBLC","gasp","hdmx","kern","LTSH","PCLT","VDMX","vhea","vmtx","BASE","GDEF","GPOS","GSUB","EBSC","JSTF","MATH","CBDT","CBLC","COLR","CPAL","SVG ","sbix","acnt","avar","bdat","bloc","bsln","cvar","fdsc","feat","fmtx","fvar","gvar","hsty","just","lcar","mort","morx","opbd","prop","trak","Zapf","Silf","Glat","Gloc","Feat","Sill"][63&t];let n=0!==(this.transformVersion=(192&this.flags)>>6);"glyf"!==this.tag&&"loca"!==this.tag||(n=3!==this.transformVersion),this.origLength=e.uint128,n&&(this.transformLength=e.uint128)}}const pp={};let hp=!1;function fp(e,t,n){let r=t.tag.replace(/[^\w\d]/g,""),a=pp[r];return a?new a(t,n,e):(console.warn(`lib-font has no definition for ${r}. The table was skipped.`),{})}function gp(){let e=0;function t(n,r){if(!hp)return e>10?r(new Error("loading took too long")):(e++,setTimeout((()=>t(n)),250));n(fp)}return new Promise(((e,n)=>t(e)))}async function yp(e,t,n={}){if(!globalThis.document)return;let r=function(e,t){let n=e.lastIndexOf("."),r=(e.substring(n+1)||"").toLowerCase(),a={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"}[r];if(a)return a;let s={eot:"The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.",svg:"The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.",fon:"The .fon format is not supported: this is an ancient Windows bitmap font format.",ttc:"Based on the current CSS specification, font collections are not (yet?) supported."}[r];if(s||(s=`${e} is not a known webfont format.`),t)throw new Error(s);console.warn(`Could not load font: ${s}`)}(t,n.errorOnStyle);if(!r)return;let a=document.createElement("style");a.className="injected-by-Font-js";let s=[];return n.styleRules&&(s=Object.entries(n.styleRules).map((([e,t])=>`${e}: ${t};`))),a.textContent=`\n@font-face {\n font-family: "${e}";\n ${s.join("\n\t")}\n src: url("${t}") format("${r}");\n}`,globalThis.document.head.appendChild(a),a}Promise.all([Promise.resolve().then((function(){return zp})),Promise.resolve().then((function(){return Hp})),Promise.resolve().then((function(){return Gp})),Promise.resolve().then((function(){return Wp})),Promise.resolve().then((function(){return jp})),Promise.resolve().then((function(){return Yp})),Promise.resolve().then((function(){return Kp})),Promise.resolve().then((function(){return Jp})),Promise.resolve().then((function(){return lh})),Promise.resolve().then((function(){return _h})),Promise.resolve().then((function(){return vf})),Promise.resolve().then((function(){return bf})),Promise.resolve().then((function(){return wf})),Promise.resolve().then((function(){return Cf})),Promise.resolve().then((function(){return kf})),Promise.resolve().then((function(){return Tf})),Promise.resolve().then((function(){return If})),Promise.resolve().then((function(){return Mf})),Promise.resolve().then((function(){return Af})),Promise.resolve().then((function(){return Of})),Promise.resolve().then((function(){return Nf})),Promise.resolve().then((function(){return Ff})),Promise.resolve().then((function(){return Df})),Promise.resolve().then((function(){return Hf})),Promise.resolve().then((function(){return Uf})),Promise.resolve().then((function(){return Wf})),Promise.resolve().then((function(){return jf})),Promise.resolve().then((function(){return Zf})),Promise.resolve().then((function(){return qf})),Promise.resolve().then((function(){return Xf})),Promise.resolve().then((function(){return tg})),Promise.resolve().then((function(){return ag})),Promise.resolve().then((function(){return ig})),Promise.resolve().then((function(){return cg})),Promise.resolve().then((function(){return ug})),Promise.resolve().then((function(){return dg})),Promise.resolve().then((function(){return pg})),Promise.resolve().then((function(){return hg})),Promise.resolve().then((function(){return vg})),Promise.resolve().then((function(){return bg})),Promise.resolve().then((function(){return Eg}))]).then((e=>{e.forEach((e=>{let t=Object.keys(e)[0];pp[t]=e[t]})),hp=!0}));const vp=[0,1,0,0],bp=[79,84,84,79],_p=[119,79,70,70],Ep=[119,79,70,50];function wp(e,t){if(e.length===t.length){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}class Sp extends Xm{constructor(e,t={}){super(),this.name=e,this.options=t,this.metrics=!1}get src(){return this.__src}set src(e){this.__src=e,(async()=>{globalThis.document&&!this.options.skipStyleSheet&&await yp(this.name,e,this.options),this.loadFont(e)})()}async loadFont(e,t){fetch(e).then((e=>function(e){if(!e.ok)throw new Error(`HTTP ${e.status} - ${e.statusText}`);return e}(e)&&e.arrayBuffer())).then((n=>this.fromDataBuffer(n,t||e))).catch((n=>{const r=new Km("error",n,`Failed to load font at ${t||e}`);this.dispatch(r),this.onerror&&this.onerror(r)}))}async fromDataBuffer(e,t){this.fontData=new DataView(e);let n=function(e){const t=[e.getUint8(0),e.getUint8(1),e.getUint8(2),e.getUint8(3)];return wp(t,vp)||wp(t,bp)?"SFNT":wp(t,_p)?"WOFF":wp(t,Ep)?"WOFF2":void 0}(this.fontData);if(!n)throw new Error(`${t} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(n);const r=new Km("load",{font:this});this.dispatch(r),this.onload&&this.onload(r)}async parseBasicData(e){return gp().then((t=>("SFNT"===e&&(this.opentype=new np(this,this.fontData,t)),"WOFF"===e&&(this.opentype=new ip(this,this.fontData,t)),"WOFF2"===e&&(this.opentype=new dp(this,this.fontData,t)),this.opentype)))}getGlyphId(e){return this.opentype.tables.cmap.getGlyphId(e)}reverse(e){return this.opentype.tables.cmap.reverse(e)}supports(e){return 0!==this.getGlyphId(e)}supportsVariation(e){return!1!==this.opentype.tables.cmap.supportsVariation(e)}measureText(e,t=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let n=document.createElement("div");n.textContent=e,n.style.fontFamily=this.name,n.style.fontSize=`${t}px`,n.style.color="transparent",n.style.background="transparent",n.style.top="0",n.style.left="0",n.style.position="absolute",document.body.appendChild(n);let r=n.getBoundingClientRect();document.body.removeChild(n);const a=this.opentype.tables["OS/2"];return r.fontSize=t,r.ascender=a.sTypoAscender,r.descender=a.sTypoDescender,r}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);const e=new Km("unload",{font:this});this.dispatch(e),this.onunload&&this.onunload(e)}this._unloaded=!0}load(){if(this.__unloaded){delete this.__unloaded,document.head.appendChild(this.styleElement);const e=new Km("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}}globalThis.Font=Sp;class xp extends $m{constructor(e,t,n){super(e),this.plaformID=t,this.encodingID=n}}class Cp extends xp{constructor(e,t,n){super(e,t,n),this.format=0,this.length=e.uint16,this.language=e.uint16,this.glyphIdArray=[...new Array(256)].map((t=>e.uint8))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=e&&e<=255}reverse(e){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}}class kp extends xp{constructor(e,t,n){super(e,t,n),this.format=2,this.length=e.uint16,this.language=e.uint16,this.subHeaderKeys=[...new Array(256)].map((t=>e.uint16));const r=Math.max(...this.subHeaderKeys),a=e.currentPosition;tp(this,"subHeaders",(()=>(e.currentPosition=a,[...new Array(r)].map((t=>new Tp(e))))));const s=a+8*r;tp(this,"glyphIndexArray",(()=>(e.currentPosition=s,[...new Array(r)].map((t=>e.uint16)))))}supports(e){e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));const t=e&&255,n=e&&65280,r=this.subHeaders[n],a=this.subHeaders[r],s=a.firstCode,i=s+a.entryCount;return s<=t&&t<=i}reverse(e){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(e=!1){return e?this.subHeaders.map((e=>({firstCode:e.firstCode,lastCode:e.lastCode}))):this.subHeaders.map((e=>({start:e.firstCode,end:e.lastCode})))}}class Tp{constructor(e){this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.first+this.entryCount,this.idDelta=e.int16,this.idRangeOffset=e.uint16}}class Pp extends xp{constructor(e,t,n){super(e,t,n),this.format=4,this.length=e.uint16,this.language=e.uint16,this.segCountX2=e.uint16,this.segCount=this.segCountX2/2,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16;const r=e.currentPosition;tp(this,"endCode",(()=>e.readBytes(this.segCount,r,16)));const a=r+2+this.segCountX2;tp(this,"startCode",(()=>e.readBytes(this.segCount,a,16)));const s=a+this.segCountX2;tp(this,"idDelta",(()=>e.readBytes(this.segCount,s,16,!0)));const i=s+this.segCountX2;tp(this,"idRangeOffset",(()=>e.readBytes(this.segCount,i,16)));const o=i+this.segCountX2,l=this.length-(o-this.tableStart);tp(this,"glyphIdArray",(()=>e.readBytes(l,o,16))),tp(this,"segments",(()=>this.buildSegments(i,o,e)))}buildSegments(e,t,n){return[...new Array(this.segCount)].map(((t,r)=>{let a=this.startCode[r],s=this.endCode[r],i=this.idDelta[r],o=this.idRangeOffset[r],l=e+2*r,c=[];if(0===o)for(let e=a+i,t=s+i;e<=t;e++)c.push(e);else for(let e=0,t=s-a;e<=t;e++)n.currentPosition=l+o+2*e,c.push(n.uint16);return{startCode:a,endCode:s,idDelta:i,idRangeOffset:o,glyphIDs:c}}))}reverse(e){let t=this.segments.find((t=>t.glyphIDs.includes(e)));if(!t)return{};const n=t.startCode+t.glyphIDs.indexOf(e);return{code:n,unicode:String.fromCodePoint(n)}}getGlyphId(e){if(e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343)return 0;if(65534==(65534&e)||65535==(65535&e))return 0;let t=this.segments.find((t=>t.startCode<=e&&e<=t.endCode));return t?t.glyphIDs[e-t.startCode]:0}supports(e){return 0!==this.getGlyphId(e)}getSupportedCharCodes(e=!1){return e?this.segments:this.segments.map((e=>({start:e.startCode,end:e.endCode})))}}class Ip extends xp{constructor(e,t,n){super(e,t,n),this.format=6,this.length=e.uint16,this.language=e.uint16,this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.firstCode+this.entryCount-1;tp(this,"glyphIdArray",(()=>[...new Array(this.entryCount)].map((t=>e.uint16))))}supports(e){if(e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.")),e<this.firstCode)return{};if(e>this.firstCode+this.entryCount)return{};const t=e-this.firstCode;return{code:t,unicode:String.fromCodePoint(t)}}reverse(e){let t=this.glyphIdArray.indexOf(e);if(t>-1)return this.firstCode+t}getSupportedCharCodes(e=!1){return e?[{firstCode:this.firstCode,lastCode:this.lastCode}]:[{start:this.firstCode,end:this.lastCode}]}}class Mp extends xp{constructor(e,t,n){super(e,t,n),this.format=8,e.uint16,this.length=e.uint32,this.language=e.uint32,this.is32=[...new Array(8192)].map((t=>e.uint8)),this.numGroups=e.uint32;tp(this,"groups",(()=>[...new Array(this.numGroups)].map((t=>new Ap(e)))))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.")),-1!==this.groups.findIndex((t=>t.startcharCode<=e&&e<=t.endcharCode))}reverse(e){return console.warn("reverse not implemented for cmap subtable format 8"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startcharCode,end:e.endcharCode})))}}class Ap{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}}class Op extends xp{constructor(e,t,n){super(e,t,n),this.format=10,e.uint16,this.length=e.uint32,this.language=e.uint32,this.startCharCode=e.uint32,this.numChars=e.uint32,this.endCharCode=this.startCharCode+this.numChars;tp(this,"glyphs",(()=>[...new Array(this.numChars)].map((t=>e.uint16))))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.")),!(e<this.startCharCode)&&(!(e>this.startCharCode+this.numChars)&&e-this.startCharCode)}reverse(e){return console.warn("reverse not implemented for cmap subtable format 10"),{}}getSupportedCharCodes(e=!1){return e?[{startCharCode:this.startCharCode,endCharCode:this.endCharCode}]:[{start:this.startCharCode,end:this.endCharCode}]}}class Np extends xp{constructor(e,t,n){super(e,t,n),this.format=12,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;tp(this,"groups",(()=>[...new Array(this.numGroups)].map((t=>new Fp(e)))))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343||65534==(65534&e)||65535==(65535&e)?0:-1!==this.groups.findIndex((t=>t.startCharCode<=e&&e<=t.endCharCode))}reverse(e){for(let t of this.groups){let n=t.startGlyphID;if(n>e)continue;if(n===e)return t.startCharCode;if(n+(t.endCharCode-t.startCharCode)<e)continue;const r=t.startCharCode+(e-n);return{code:r,unicode:String.fromCodePoint(r)}}return{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startCharCode,end:e.endCharCode})))}}class Fp{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}}class Rp extends xp{constructor(e,t,n){super(e,t,n),this.format=13,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;tp(this,"groups",[...new Array(this.numGroups)].map((t=>new Dp(e))))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),-1!==this.groups.findIndex((t=>t.startCharCode<=e&&e<=t.endCharCode))}reverse(e){return console.warn("reverse not implemented for cmap subtable format 13"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startCharCode,end:e.endCharCode})))}}class Dp{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}}class Vp extends xp{constructor(e,t,n){super(e,t,n),this.subTableStart=e.currentPosition,this.format=14,this.length=e.uint32,this.numVarSelectorRecords=e.uint32,tp(this,"varSelectors",(()=>[...new Array(this.numVarSelectorRecords)].map((t=>new Lp(e)))))}supports(){return console.warn("supports not implemented for cmap subtable format 14"),0}getSupportedCharCodes(){return console.warn("getSupportedCharCodes not implemented for cmap subtable format 14"),[]}reverse(e){return console.warn("reverse not implemented for cmap subtable format 14"),{}}supportsVariation(e){let t=this.varSelector.find((t=>t.varSelector===e));return t||!1}getSupportedVariations(){return this.varSelectors.map((e=>e.varSelector))}}class Lp{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}}class Bp{constructor(e,t){const n=this.platformID=e.uint16,r=this.encodingID=e.uint16,a=this.offset=e.Offset32;tp(this,"table",(()=>(e.currentPosition=t+a,function(e,t,n){const r=e.uint16;return 0===r?new Cp(e,t,n):2===r?new kp(e,t,n):4===r?new Pp(e,t,n):6===r?new Ip(e,t,n):8===r?new Mp(e,t,n):10===r?new Op(e,t,n):12===r?new Np(e,t,n):13===r?new Rp(e,t,n):14===r?new Vp(e,t,n):{}}(e,n,r))))}}var zp=Object.freeze({__proto__:null,cmap:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numTables=n.uint16,this.encodingRecords=[...new Array(this.numTables)].map((e=>new Bp(n,this.tableStart)))}getSubTable(e){return this.encodingRecords[e].table}getSupportedEncodings(){return this.encodingRecords.map((e=>({platformID:e.platformID,encodingId:e.encodingID})))}getSupportedCharCodes(e,t){const n=this.encodingRecords.findIndex((n=>n.platformID===e&&n.encodingID===t));if(-1===n)return!1;return this.getSubTable(n).getSupportedCharCodes()}reverse(e){for(let t=0;t<this.numTables;t++){let n=this.getSubTable(t).reverse(e);if(n)return n}}getGlyphId(e){let t=0;return this.encodingRecords.some(((n,r)=>{let a=this.getSubTable(r);return!!a.getGlyphId&&(t=a.getGlyphId(e),0!==t)})),t}supports(e){return this.encodingRecords.some(((t,n)=>{const r=this.getSubTable(n);return r.supports&&!1!==r.supports(e)}))}supportsVariation(e){return this.encodingRecords.some(((t,n)=>{const r=this.getSubTable(n);return r.supportsVariation&&!1!==r.supportsVariation(e)}))}}});var Hp=Object.freeze({__proto__:null,head:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.load({majorVersion:n.uint16,minorVersion:n.uint16,fontRevision:n.fixed,checkSumAdjustment:n.uint32,magicNumber:n.uint32,flags:n.flags(16),unitsPerEm:n.uint16,created:n.longdatetime,modified:n.longdatetime,xMin:n.int16,yMin:n.int16,xMax:n.int16,yMax:n.int16,macStyle:n.flags(16),lowestRecPPEM:n.uint16,fontDirectionHint:n.uint16,indexToLocFormat:n.uint16,glyphDataFormat:n.uint16})}}});var Gp=Object.freeze({__proto__:null,hhea:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.ascender=n.fword,this.descender=n.fword,this.lineGap=n.fword,this.advanceWidthMax=n.ufword,this.minLeftSideBearing=n.fword,this.minRightSideBearing=n.fword,this.xMaxExtent=n.fword,this.caretSlopeRise=n.int16,this.caretSlopeRun=n.int16,this.caretOffset=n.int16,n.int16,n.int16,n.int16,n.int16,this.metricDataFormat=n.int16,this.numberOfHMetrics=n.uint16,n.verifyLength()}}});class Up{constructor(e,t){this.advanceWidth=e,this.lsb=t}}var Wp=Object.freeze({__proto__:null,hmtx:class extends ep{constructor(e,t,n){const{p:r}=super(e,t),a=n.hhea.numberOfHMetrics,s=n.maxp.numGlyphs,i=r.currentPosition;if(tp(this,"hMetrics",(()=>(r.currentPosition=i,[...new Array(a)].map((e=>new Up(r.uint16,r.int16)))))),a<s){const e=i+4*a;tp(this,"leftSideBearings",(()=>(r.currentPosition=e,[...new Array(s-a)].map((e=>r.int16)))))}}}});var jp=Object.freeze({__proto__:null,maxp:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.legacyFixed,this.numGlyphs=n.uint16,1===this.version&&(this.maxPoints=n.uint16,this.maxContours=n.uint16,this.maxCompositePoints=n.uint16,this.maxCompositeContours=n.uint16,this.maxZones=n.uint16,this.maxTwilightPoints=n.uint16,this.maxStorage=n.uint16,this.maxFunctionDefs=n.uint16,this.maxInstructionDefs=n.uint16,this.maxStackElements=n.uint16,this.maxSizeOfInstructions=n.uint16,this.maxComponentElements=n.uint16,this.maxComponentDepth=n.uint16),n.verifyLength()}}});class Zp{constructor(e,t){this.length=e,this.offset=t}}class qp{constructor(e,t){this.platformID=e.uint16,this.encodingID=e.uint16,this.languageID=e.uint16,this.nameID=e.uint16,this.length=e.uint16,this.offset=e.Offset16,tp(this,"string",(()=>(e.currentPosition=t.stringStart+this.offset,function(e,t){const{platformID:n,length:r}=t;if(0===r)return"";if(0===n||3===n){const t=[];for(let n=0,a=r/2;n<a;n++)t[n]=String.fromCharCode(e.uint16);return t.join("")}const a=e.readBytes(r),s=[];return a.forEach((function(e,t){s[t]=String.fromCharCode(e)})),s.join("")}(e,this))))}}var Yp=Object.freeze({__proto__:null,name:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.format=n.uint16,this.count=n.uint16,this.stringOffset=n.Offset16,this.nameRecords=[...new Array(this.count)].map((e=>new qp(n,this))),1===this.format&&(this.langTagCount=n.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map((e=>new Zp(n.uint16,n.Offset16)))),this.stringStart=this.tableStart+this.stringOffset}get(e){let t=this.nameRecords.find((t=>t.nameID===e));if(t)return t.string}}});var Kp=Object.freeze({__proto__:null,OS2:class extends ep{constructor(e,t){const{p:n}=super(e,t);return this.version=n.uint16,this.xAvgCharWidth=n.int16,this.usWeightClass=n.uint16,this.usWidthClass=n.uint16,this.fsType=n.uint16,this.ySubscriptXSize=n.int16,this.ySubscriptYSize=n.int16,this.ySubscriptXOffset=n.int16,this.ySubscriptYOffset=n.int16,this.ySuperscriptXSize=n.int16,this.ySuperscriptYSize=n.int16,this.ySuperscriptXOffset=n.int16,this.ySuperscriptYOffset=n.int16,this.yStrikeoutSize=n.int16,this.yStrikeoutPosition=n.int16,this.sFamilyClass=n.int16,this.panose=[...new Array(10)].map((e=>n.uint8)),this.ulUnicodeRange1=n.flags(32),this.ulUnicodeRange2=n.flags(32),this.ulUnicodeRange3=n.flags(32),this.ulUnicodeRange4=n.flags(32),this.achVendID=n.tag,this.fsSelection=n.uint16,this.usFirstCharIndex=n.uint16,this.usLastCharIndex=n.uint16,this.sTypoAscender=n.int16,this.sTypoDescender=n.int16,this.sTypoLineGap=n.int16,this.usWinAscent=n.uint16,this.usWinDescent=n.uint16,0===this.version?n.verifyLength():(this.ulCodePageRange1=n.flags(32),this.ulCodePageRange2=n.flags(32),1===this.version?n.verifyLength():(this.sxHeight=n.int16,this.sCapHeight=n.int16,this.usDefaultChar=n.uint16,this.usBreakChar=n.uint16,this.usMaxContext=n.uint16,this.version<=4?n.verifyLength():(this.usLowerOpticalPointSize=n.uint16,this.usUpperOpticalPointSize=n.uint16,5===this.version?n.verifyLength():void 0)))}}});const Xp=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];var Jp=Object.freeze({__proto__:null,post:class extends ep{constructor(e,t){const{p:n}=super(e,t);if(this.version=n.legacyFixed,this.italicAngle=n.fixed,this.underlinePosition=n.fword,this.underlineThickness=n.fword,this.isFixedPitch=n.uint32,this.minMemType42=n.uint32,this.maxMemType42=n.uint32,this.minMemType1=n.uint32,this.maxMemType1=n.uint32,1===this.version||3===this.version)return n.verifyLength();if(this.numGlyphs=n.uint16,2===this.version){this.glyphNameIndex=[...new Array(this.numGlyphs)].map((e=>n.uint16)),this.namesOffset=n.currentPosition,this.glyphNameOffsets=[1];for(let e=0;e<this.numGlyphs;e++){if(this.glyphNameIndex[e]<Xp.length){this.glyphNameOffsets.push(this.glyphNameOffsets[e]);continue}let t=n.int8;n.skip(t),this.glyphNameOffsets.push(this.glyphNameOffsets[e]+t+1)}}2.5===this.version&&(this.offset=[...new Array(this.numGlyphs)].map((e=>n.int8)))}getGlyphName(e){if(2!==this.version)return console.warn(`post table version ${this.version} does not support glyph name lookups`),"";let t=this.glyphNameIndex[e];if(t<258)return Xp[t];let n=this.glyphNameOffsets[e],r=this.glyphNameOffsets[e+1]-n-1;if(0===r)return".notdef.";this.parser.currentPosition=this.namesOffset+n;return this.parser.readBytes(r,this.namesOffset+n,8,!0).map((e=>String.fromCharCode(e))).join("")}}});class Qp extends ep{constructor(e,t){const{p:n}=super(e,t,"AxisTable");this.baseTagListOffset=n.Offset16,this.baseScriptListOffset=n.Offset16,tp(this,"baseTagList",(()=>new $p({offset:e.offset+this.baseTagListOffset},t))),tp(this,"baseScriptList",(()=>new eh({offset:e.offset+this.baseScriptListOffset},t)))}}class $p extends ep{constructor(e,t){const{p:n}=super(e,t,"BaseTagListTable");this.baseTagCount=n.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map((e=>n.tag))}}class eh extends ep{constructor(e,t){const{p:n}=super(e,t,"BaseScriptListTable");this.baseScriptCount=n.uint16;const r=n.currentPosition;tp(this,"baseScriptRecords",(()=>(n.currentPosition=r,[...new Array(this.baseScriptCount)].map((e=>new th(this.start,n))))))}}class th{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,tp(this,"baseScriptTable",(()=>(t.currentPosition=e+this.baseScriptOffset,new nh(t))))}}class nh{constructor(e){this.start=e.currentPosition,this.baseValuesOffset=e.Offset16,this.defaultMinMaxOffset=e.Offset16,this.baseLangSysCount=e.uint16,this.baseLangSysRecords=[...new Array(this.baseLangSysCount)].map((t=>new rh(this.start,e))),tp(this,"baseValues",(()=>(e.currentPosition=this.start+this.baseValuesOffset,new ah(e)))),tp(this,"defaultMinMax",(()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new sh(e))))}}class rh{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,tp(this,"minMax",(()=>(t.currentPosition=e+this.minMaxOffset,new sh(t))))}}class ah{constructor(e){this.parser=e,this.start=e.currentPosition,this.defaultBaselineIndex=e.uint16,this.baseCoordCount=e.uint16,this.baseCoords=[...new Array(this.baseCoordCount)].map((t=>e.Offset16))}getTable(e){return this.parser.currentPosition=this.start+this.baseCoords[e],new oh(this.parser)}}class sh{constructor(e){this.minCoord=e.Offset16,this.maxCoord=e.Offset16,this.featMinMaxCount=e.uint16;const t=e.currentPosition;tp(this,"featMinMaxRecords",(()=>(e.currentPosition=t,[...new Array(this.featMinMaxCount)].map((t=>new ih(e))))))}}class ih{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}}class oh{constructor(e){this.baseCoordFormat=e.uint16,this.coordinate=e.int16,2===this.baseCoordFormat&&(this.referenceGlyph=e.uint16,this.baseCoordPoint=e.uint16),3===this.baseCoordFormat&&(this.deviceTable=e.Offset16)}}var lh=Object.freeze({__proto__:null,BASE:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.horizAxisOffset=n.Offset16,this.vertAxisOffset=n.Offset16,tp(this,"horizAxis",(()=>new Qp({offset:e.offset+this.horizAxisOffset},t))),tp(this,"vertAxis",(()=>new Qp({offset:e.offset+this.vertAxisOffset},t))),1===this.majorVersion&&1===this.minorVersion&&(this.itemVarStoreOffset=n.Offset32,tp(this,"itemVarStore",(()=>new Qp({offset:e.offset+this.itemVarStoreOffset},t))))}}});class ch{constructor(e){this.classFormat=e.uint16,1===this.classFormat&&(this.startGlyphID=e.uint16,this.glyphCount=e.uint16,this.classValueArray=[...new Array(this.glyphCount)].map((t=>e.uint16))),2===this.classFormat&&(this.classRangeCount=e.uint16,this.classRangeRecords=[...new Array(this.classRangeCount)].map((t=>new uh(e))))}}class uh{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}}class dh extends $m{constructor(e){super(e),this.coverageFormat=e.uint16,1===this.coverageFormat&&(this.glyphCount=e.uint16,this.glyphArray=[...new Array(this.glyphCount)].map((t=>e.uint16))),2===this.coverageFormat&&(this.rangeCount=e.uint16,this.rangeRecords=[...new Array(this.rangeCount)].map((t=>new mh(e))))}}class mh{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}}class ph{constructor(e,t){this.table=e,this.parser=t,this.start=t.currentPosition,this.format=t.uint16,this.variationRegionListOffset=t.Offset32,this.itemVariationDataCount=t.uint16,this.itemVariationDataOffsets=[...new Array(this.itemVariationDataCount)].map((e=>t.Offset32))}}class hh extends $m{constructor(e){super(e),this.coverageOffset=e.Offset16,this.glyphCount=e.uint16,this.attachPointOffsets=[...new Array(this.glyphCount)].map((t=>e.Offset16))}getPoint(e){return this.parser.currentPosition=this.start+this.attachPointOffsets[e],new fh(this.parser)}}class fh{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map((t=>e.uint16))}}class gh extends $m{constructor(e){super(e),this.coverageOffset=e.Offset16,tp(this,"coverage",(()=>(e.currentPosition=this.start+this.coverageOffset,new dh(e)))),this.ligGlyphCount=e.uint16,this.ligGlyphOffsets=[...new Array(this.ligGlyphCount)].map((t=>e.Offset16))}getLigGlyph(e){return this.parser.currentPosition=this.start+this.ligGlyphOffsets[e],new yh(this.parser)}}class yh extends $m{constructor(e){super(e),this.caretCount=e.uint16,this.caretValueOffsets=[...new Array(this.caretCount)].map((t=>e.Offset16))}getCaretValue(e){return this.parser.currentPosition=this.start+this.caretValueOffsets[e],new vh(this.parser)}}class vh{constructor(e){this.caretValueFormat=e.uint16,1===this.caretValueFormat&&(this.coordinate=e.int16),2===this.caretValueFormat&&(this.caretValuePointIndex=e.uint16),3===this.caretValueFormat&&(this.coordinate=e.int16,this.deviceOffset=e.Offset16)}}class bh extends $m{constructor(e){super(e),this.markGlyphSetTableFormat=e.uint16,this.markGlyphSetCount=e.uint16,this.coverageOffsets=[...new Array(this.markGlyphSetCount)].map((t=>e.Offset32))}getMarkGlyphSet(e){return this.parser.currentPosition=this.start+this.coverageOffsets[e],new dh(this.parser)}}var _h=Object.freeze({__proto__:null,GDEF:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.glyphClassDefOffset=n.Offset16,tp(this,"glyphClassDefs",(()=>{if(0!==this.glyphClassDefOffset)return n.currentPosition=this.tableStart+this.glyphClassDefOffset,new ch(n)})),this.attachListOffset=n.Offset16,tp(this,"attachList",(()=>{if(0!==this.attachListOffset)return n.currentPosition=this.tableStart+this.attachListOffset,new hh(n)})),this.ligCaretListOffset=n.Offset16,tp(this,"ligCaretList",(()=>{if(0!==this.ligCaretListOffset)return n.currentPosition=this.tableStart+this.ligCaretListOffset,new gh(n)})),this.markAttachClassDefOffset=n.Offset16,tp(this,"markAttachClassDef",(()=>{if(0!==this.markAttachClassDefOffset)return n.currentPosition=this.tableStart+this.markAttachClassDefOffset,new ch(n)})),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=n.Offset16,tp(this,"markGlyphSetsDef",(()=>{if(0!==this.markGlyphSetsDefOffset)return n.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new bh(n)}))),3===this.minorVersion&&(this.itemVarStoreOffset=n.Offset32,tp(this,"itemVarStore",(()=>{if(0!==this.itemVarStoreOffset)return n.currentPosition=this.tableStart+this.itemVarStoreOffset,new ph(n)})))}}});class Eh extends $m{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map((t=>new wh(e)))}}class wh{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}}class Sh extends $m{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map((t=>new xh(e)))}}class xh{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}}class Ch{constructor(e){this.lookupOrder=e.Offset16,this.requiredFeatureIndex=e.uint16,this.featureIndexCount=e.uint16,this.featureIndices=[...new Array(this.featureIndexCount)].map((t=>e.uint16))}}class kh extends $m{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map((t=>new Th(e)))}}class Th{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}}class Ph extends $m{constructor(e){super(e),this.featureParams=e.Offset16,this.lookupIndexCount=e.uint16,this.lookupListIndices=[...new Array(this.lookupIndexCount)].map((t=>e.uint16))}getFeatureParams(){if(this.featureParams>0){const e=this.parser;e.currentPosition=this.start+this.featureParams;const t=this.featureTag;if("size"===t)return new Mh(e);if(t.startsWith("cc"))return new Ih(e);if(t.startsWith("ss"))return new Ah(e)}}}class Ih{constructor(e){this.format=e.uint16,this.featUiLabelNameId=e.uint16,this.featUiTooltipTextNameId=e.uint16,this.sampleTextNameId=e.uint16,this.numNamedParameters=e.uint16,this.firstParamUiLabelNameId=e.uint16,this.charCount=e.uint16,this.character=[...new Array(this.charCount)].map((t=>e.uint24))}}class Mh{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}}class Ah{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}}function Oh(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}class Nh extends $m{constructor(e){super(e),this.substFormat=e.uint16,this.coverageOffset=e.Offset16}getCoverageTable(){let e=this.parser;return e.currentPosition=this.start+this.coverageOffset,new dh(e)}}class Fh{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}}class Rh extends Nh{constructor(e){super(e),this.deltaGlyphID=e.int16}}class Dh extends Nh{constructor(e){super(e),this.sequenceCount=e.uint16,this.sequenceOffsets=[...new Array(this.sequenceCount)].map((t=>e.Offset16))}getSequence(e){let t=this.parser;return t.currentPosition=this.start+this.sequenceOffsets[e],new Vh(t)}}class Vh{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}class Lh extends Nh{constructor(e){super(e),this.alternateSetCount=e.uint16,this.alternateSetOffsets=[...new Array(this.alternateSetCount)].map((t=>e.Offset16))}getAlternateSet(e){let t=this.parser;return t.currentPosition=this.start+this.alternateSetOffsets[e],new Bh(t)}}class Bh{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}class zh extends Nh{constructor(e){super(e),this.ligatureSetCount=e.uint16,this.ligatureSetOffsets=[...new Array(this.ligatureSetCount)].map((t=>e.Offset16))}getLigatureSet(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureSetOffsets[e],new Hh(t)}}class Hh extends $m{constructor(e){super(e),this.ligatureCount=e.uint16,this.ligatureOffsets=[...new Array(this.ligatureCount)].map((t=>e.Offset16))}getLigature(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureOffsets[e],new Gh(t)}}class Gh{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map((t=>e.uint16))}}class Uh extends Nh{constructor(e){super(e),1===this.substFormat&&(this.subRuleSetCount=e.uint16,this.subRuleSetOffsets=[...new Array(this.subRuleSetCount)].map((t=>e.Offset16))),2===this.substFormat&&(this.classDefOffset=e.Offset16,this.subClassSetCount=e.uint16,this.subClassSetOffsets=[...new Array(this.subClassSetCount)].map((t=>e.Offset16))),3===this.substFormat&&(Oh(this),this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.coverageOffsets=[...new Array(this.glyphCount)].map((t=>e.Offset16)),this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new Fh(e))))}getSubRuleSet(e){if(1!==this.substFormat)throw new Error(`lookup type 5.${this.substFormat} has no subrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.subRuleSetOffsets[e],new Wh(t)}getSubClassSet(e){if(2!==this.substFormat)throw new Error(`lookup type 5.${this.substFormat} has no subclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.subClassSetOffsets[e],new Zh(t)}getCoverageTable(e){if(3!==this.substFormat&&!e)return super.getCoverageTable();if(!e)throw new Error(`lookup type 5.${this.substFormat} requires an coverage table index.`);let t=this.parser;return t.currentPosition=this.start+this.coverageOffsets[e],new dh(t)}}class Wh extends $m{constructor(e){super(e),this.subRuleCount=e.uint16,this.subRuleOffsets=[...new Array(this.subRuleCount)].map((t=>e.Offset16))}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.subRuleOffsets[e],new jh(t)}}class jh{constructor(e){this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.inputSequence=[...new Array(this.glyphCount-1)].map((t=>e.uint16)),this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new Fh(e)))}}class Zh extends $m{constructor(e){super(e),this.subClassRuleCount=e.uint16,this.subClassRuleOffsets=[...new Array(this.subClassRuleCount)].map((t=>e.Offset16))}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.subClassRuleOffsets[e],new qh(t)}}class qh extends jh{constructor(e){super(e)}}class Yh extends Nh{constructor(e){super(e),1===this.substFormat&&(this.chainSubRuleSetCount=e.uint16,this.chainSubRuleSetOffsets=[...new Array(this.chainSubRuleSetCount)].map((t=>e.Offset16))),2===this.substFormat&&(this.backtrackClassDefOffset=e.Offset16,this.inputClassDefOffset=e.Offset16,this.lookaheadClassDefOffset=e.Offset16,this.chainSubClassSetCount=e.uint16,this.chainSubClassSetOffsets=[...new Array(this.chainSubClassSetCount)].map((t=>e.Offset16))),3===this.substFormat&&(Oh(this),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map((t=>e.Offset16)),this.inputGlyphCount=e.uint16,this.inputCoverageOffsets=[...new Array(this.inputGlyphCount)].map((t=>e.Offset16)),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[...new Array(this.lookaheadGlyphCount)].map((t=>e.Offset16)),this.seqLookupCount=e.uint16,this.seqLookupRecords=[...new Array(this.substitutionCount)].map((t=>new $h(e))))}getChainSubRuleSet(e){if(1!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} has no chainsubrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleSetOffsets[e],new Kh(t)}getChainSubClassSet(e){if(2!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} has no chainsubclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubClassSetOffsets[e],new Jh(t)}getCoverageFromOffset(e){if(3!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} does not use contextual coverage offsets.`);let t=this.parser;return t.currentPosition=this.start+e,new dh(t)}}class Kh extends $m{constructor(e){super(e),this.chainSubRuleCount=e.uint16,this.chainSubRuleOffsets=[...new Array(this.chainSubRuleCount)].map((t=>e.Offset16))}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new Xh(t)}}class Xh{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map((t=>e.uint16)),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map((t=>e.uint16)),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map((t=>e.uint16)),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.SubstCount)].map((t=>new Fh(e)))}}class Jh extends $m{constructor(e){super(e),this.chainSubClassRuleCount=e.uint16,this.chainSubClassRuleOffsets=[...new Array(this.chainSubClassRuleCount)].map((t=>e.Offset16))}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new Qh(t)}}class Qh{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map((t=>e.uint16)),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map((t=>e.uint16)),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map((t=>e.uint16)),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new $h(e)))}}class $h extends $m{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}}class ef extends $m{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}}class tf extends Nh{constructor(e){super(e),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map((t=>e.Offset16)),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[new Array(this.lookaheadGlyphCount)].map((t=>e.Offset16)),this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}var nf={buildSubtable:function(e,t){const n=new[void 0,Rh,Dh,Lh,zh,Uh,Yh,ef,tf][e](t);return n.type=e,n}};class rf extends $m{constructor(e){super(e)}}class af extends rf{constructor(e){super(e),console.log("lookup type 1")}}class sf extends rf{constructor(e){super(e),console.log("lookup type 2")}}class of extends rf{constructor(e){super(e),console.log("lookup type 3")}}class lf extends rf{constructor(e){super(e),console.log("lookup type 4")}}class cf extends rf{constructor(e){super(e),console.log("lookup type 5")}}class uf extends rf{constructor(e){super(e),console.log("lookup type 6")}}class df extends rf{constructor(e){super(e),console.log("lookup type 7")}}class mf extends rf{constructor(e){super(e),console.log("lookup type 8")}}class pf extends rf{constructor(e){super(e),console.log("lookup type 9")}}var hf={buildSubtable:function(e,t){const n=new[void 0,af,sf,of,lf,cf,uf,df,mf,pf][e](t);return n.type=e,n}};class ff extends $m{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map((t=>e.Offset16))}}class gf extends $m{constructor(e,t){super(e),this.ctType=t,this.lookupType=e.uint16,this.lookupFlag=e.uint16,this.subTableCount=e.uint16,this.subtableOffsets=[...new Array(this.subTableCount)].map((t=>e.Offset16)),this.markFilteringSet=e.uint16}get rightToLeft(){return!0&this.lookupFlag}get ignoreBaseGlyphs(){return!0&this.lookupFlag}get ignoreLigatures(){return!0&this.lookupFlag}get ignoreMarks(){return!0&this.lookupFlag}get useMarkFilteringSet(){return!0&this.lookupFlag}get markAttachmentType(){return!0&this.lookupFlag}getSubTable(e){const t="GSUB"===this.ctType?nf:hf;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}}class yf extends ep{constructor(e,t,n){const{p:r,tableStart:a}=super(e,t,n);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.scriptListOffset=r.Offset16,this.featureListOffset=r.Offset16,this.lookupListOffset=r.Offset16,1===this.majorVersion&&1===this.minorVersion&&(this.featureVariationsOffset=r.Offset32);const s=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);tp(this,"scriptList",(()=>s?Eh.EMPTY:(r.currentPosition=a+this.scriptListOffset,new Eh(r)))),tp(this,"featureList",(()=>s?kh.EMPTY:(r.currentPosition=a+this.featureListOffset,new kh(r)))),tp(this,"lookupList",(()=>s?ff.EMPTY:(r.currentPosition=a+this.lookupListOffset,new ff(r)))),this.featureVariationsOffset&&tp(this,"featureVariations",(()=>s?FeatureVariations.EMPTY:(r.currentPosition=a+this.featureVariationsOffset,new FeatureVariations(r))))}getSupportedScripts(){return this.scriptList.scriptRecords.map((e=>e.scriptTag))}getScriptTable(e){let t=this.scriptList.scriptRecords.find((t=>t.scriptTag===e));this.parser.currentPosition=this.scriptList.start+t.scriptOffset;let n=new Sh(this.parser);return n.scriptTag=e,n}ensureScriptTable(e){return"string"==typeof e?this.getScriptTable(e):e}getSupportedLangSys(e){const t=0!==(e=this.ensureScriptTable(e)).defaultLangSys,n=e.langSysRecords.map((e=>e.langSysTag));return t&&n.unshift("dflt"),n}getDefaultLangSysTable(e){let t=(e=this.ensureScriptTable(e)).defaultLangSys;if(0!==t){this.parser.currentPosition=e.start+t;let n=new Ch(this.parser);return n.langSysTag="",n.defaultForScript=e.scriptTag,n}}getLangSysTable(e,t="dflt"){if("dflt"===t)return this.getDefaultLangSysTable(e);let n=(e=this.ensureScriptTable(e)).langSysRecords.find((e=>e.langSysTag===t));this.parser.currentPosition=e.start+n.langSysOffset;let r=new Ch(this.parser);return r.langSysTag=t,r}getFeatures(e){return e.featureIndices.map((e=>this.getFeature(e)))}getFeature(e){let t;if(t=parseInt(e)==e?this.featureList.featureRecords[e]:this.featureList.featureRecords.find((t=>t.featureTag===e)),!t)return;this.parser.currentPosition=this.featureList.start+t.featureOffset;let n=new Ph(this.parser);return n.featureTag=t.featureTag,n}getLookups(e){return e.lookupListIndices.map((e=>this.getLookup(e)))}getLookup(e,t){let n=this.lookupList.lookups[e];return this.parser.currentPosition=this.lookupList.start+n,new gf(this.parser,t)}}var vf=Object.freeze({__proto__:null,GSUB:class extends yf{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}}});var bf=Object.freeze({__proto__:null,GPOS:class extends yf{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}}});class _f extends $m{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map((t=>new Ef(e)))}getDocument(e){let t=this.documentRecords[e];if(!t)return"";let n=this.start+t.svgDocOffset;return this.parser.currentPosition=n,this.parser.readBytes(t.svgDocLength)}getDocumentForGlyph(e){let t=this.documentRecords.findIndex((t=>t.startGlyphID<=e&&e<=t.endGlyphID));return-1===t?"":this.getDocument(t)}}class Ef{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}}var wf=Object.freeze({__proto__:null,SVG:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.offsetToSVGDocumentList=n.Offset32,n.currentPosition=this.tableStart+this.offsetToSVGDocumentList,this.documentList=new _f(n)}}});class Sf{constructor(e){this.tag=e.tag,this.minValue=e.fixed,this.defaultValue=e.fixed,this.maxValue=e.fixed,this.flags=e.flags(16),this.axisNameID=e.uint16}}class xf{constructor(e,t,n){let r=e.currentPosition;this.subfamilyNameID=e.uint16,e.uint16,this.coordinates=[...new Array(t)].map((t=>e.fixed)),e.currentPosition-r<n&&(this.postScriptNameID=e.uint16)}}var Cf=Object.freeze({__proto__:null,fvar:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.axesArrayOffset=n.Offset16,n.uint16,this.axisCount=n.uint16,this.axisSize=n.uint16,this.instanceCount=n.uint16,this.instanceSize=n.uint16;const r=this.tableStart+this.axesArrayOffset;tp(this,"axes",(()=>(n.currentPosition=r,[...new Array(this.axisCount)].map((e=>new Sf(n))))));const a=r+this.axisCount*this.axisSize;tp(this,"instances",(()=>{let e=[];for(let t=0;t<this.instanceCount;t++)n.currentPosition=a+t*this.instanceSize,e.push(new xf(n,this.axisCount,this.instanceSize));return e}))}getSupportedAxes(){return this.axes.map((e=>e.tag))}getAxis(e){return this.axes.find((t=>t.tag===e))}}});var kf=Object.freeze({__proto__:null,cvt:class extends ep{constructor(e,t){const{p:n}=super(e,t),r=e.length/2;tp(this,"items",(()=>[...new Array(r)].map((e=>n.fword))))}}});var Tf=Object.freeze({__proto__:null,fpgm:class extends ep{constructor(e,t){const{p:n}=super(e,t);tp(this,"instructions",(()=>[...new Array(e.length)].map((e=>n.uint8))))}}});class Pf{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}}var If=Object.freeze({__proto__:null,gasp:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numRanges=n.uint16;tp(this,"gaspRanges",(()=>[...new Array(this.numRanges)].map((e=>new Pf(n)))))}}});var Mf=Object.freeze({__proto__:null,glyf:class extends ep{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}}});var Af=Object.freeze({__proto__:null,loca:class extends ep{constructor(e,t,n){const{p:r}=super(e,t),a=n.maxp.numGlyphs+1;0===n.head.indexToLocFormat?(this.x2=!0,tp(this,"offsets",(()=>[...new Array(a)].map((e=>r.Offset16))))):tp(this,"offsets",(()=>[...new Array(a)].map((e=>r.Offset32))))}getGlyphDataOffsetAndLength(e){let t=this.offsets[e]*this.x2?2:1;return{offset:t,length:(this.offsets[e+1]*this.x2?2:1)-t}}}});var Of=Object.freeze({__proto__:null,prep:class extends ep{constructor(e,t){const{p:n}=super(e,t);tp(this,"instructions",(()=>[...new Array(e.length)].map((e=>n.uint8))))}}});var Nf=Object.freeze({__proto__:null,CFF:class extends ep{constructor(e,t){const{p:n}=super(e,t);tp(this,"data",(()=>n.readBytes()))}}});var Ff=Object.freeze({__proto__:null,CFF2:class extends ep{constructor(e,t){const{p:n}=super(e,t);tp(this,"data",(()=>n.readBytes()))}}});class Rf{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}}var Df=Object.freeze({__proto__:null,VORG:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.defaultVertOriginY=n.int16,this.numVertOriginYMetrics=n.uint16,tp(this,"vertORiginYMetrics",(()=>[...new Array(this.numVertOriginYMetrics)].map((e=>new Rf(n)))))}}});class Vf{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new Bf(e),this.vert=new Bf(e),this.startGlyphIndex=e.uint16,this.endGlyphIndex=e.uint16,this.ppemX=e.uint8,this.ppemY=e.uint8,this.bitDepth=e.uint8,this.flags=e.int8}}class Lf{constructor(e){this.hori=new Bf(e),this.vert=new Bf(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}}class Bf{constructor(e){this.ascender=e.int8,this.descender=e.int8,this.widthMax=e.uint8,this.caretSlopeNumerator=e.int8,this.caretSlopeDenominator=e.int8,this.caretOffset=e.int8,this.minOriginSB=e.int8,this.minAdvanceSB=e.int8,this.maxBeforeBL=e.int8,this.minAfterBL=e.int8,this.pad1=e.int8,this.pad2=e.int8}}class zf extends ep{constructor(e,t,n){const{p:r}=super(e,t,n);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.numSizes=r.uint32,tp(this,"bitMapSizes",(()=>[...new Array(this.numSizes)].map((e=>new Vf(r)))))}}var Hf=Object.freeze({__proto__:null,EBLC:zf});class Gf extends ep{constructor(e,t,n){const{p:r}=super(e,t,n);this.majorVersion=r.uint16,this.minorVersion=r.uint16}}var Uf=Object.freeze({__proto__:null,EBDT:Gf});var Wf=Object.freeze({__proto__:null,EBSC:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.numSizes=n.uint32,tp(this,"bitmapScales",(()=>[...new Array(this.numSizes)].map((e=>new Lf(n)))))}}});var jf=Object.freeze({__proto__:null,CBLC:class extends zf{constructor(e,t){super(e,t,"CBLC")}}});var Zf=Object.freeze({__proto__:null,CBDT:class extends Gf{constructor(e,t){super(e,t,"CBDT")}}});var qf=Object.freeze({__proto__:null,sbix:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.flags=n.flags(16),this.numStrikes=n.uint32,tp(this,"strikeOffsets",(()=>[...new Array(this.numStrikes)].map((e=>n.Offset32))))}}});class Yf{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}}class Kf{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}}var Xf=Object.freeze({__proto__:null,COLR:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numBaseGlyphRecords=n.uint16,this.baseGlyphRecordsOffset=n.Offset32,this.layerRecordsOffset=n.Offset32,this.numLayerRecords=n.uint16}getBaseGlyphRecord(e){let t=this.tableStart+this.baseGlyphRecordsOffset;this.parser.currentPosition=t;let n=new Yf(this.parser),r=n.gID,a=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=a;let s=new Yf(this.parser),i=s.gID;if(r===e)return n;if(i===e)return s;for(;t!==a;){let n=t+(a-t)/12;this.parser.currentPosition=n;let r=new Yf(this.parser),s=r.gID;if(s===e)return r;s>e?a=n:s<e&&(t=n)}return!1}getLayers(e){let t=this.getBaseGlyphRecord(e);return this.parser.currentPosition=this.tableStart+this.layerRecordsOffset+4*t.firstLayerIndex,[...new Array(t.numLayers)].map((e=>new Kf(p)))}}});class Jf{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}}class Qf{constructor(e,t){this.paletteTypes=[...new Array(t)].map((t=>e.uint32))}}class $f{constructor(e,t){this.paletteLabels=[...new Array(t)].map((t=>e.uint16))}}class eg{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map((t=>e.uint16))}}var tg=Object.freeze({__proto__:null,CPAL:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numPaletteEntries=n.uint16;const r=this.numPalettes=n.uint16;this.numColorRecords=n.uint16,this.offsetFirstColorRecord=n.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map((e=>n.uint16)),tp(this,"colorRecords",(()=>(n.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map((e=>new Jf(n)))))),1===this.version&&(this.offsetPaletteTypeArray=n.Offset32,this.offsetPaletteLabelArray=n.Offset32,this.offsetPaletteEntryLabelArray=n.Offset32,tp(this,"paletteTypeArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new Qf(n,r)))),tp(this,"paletteLabelArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new $f(n,r)))),tp(this,"paletteEntryLabelArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new eg(n,r)))))}}});class ng{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}}class rg{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}}var ag=Object.freeze({__proto__:null,DSIG:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint32,this.numSignatures=n.uint16,this.flags=n.uint16,this.signatureRecords=[...new Array(this.numSignatures)].map((e=>new ng(n)))}getData(e){const t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new rg(this.parser)}}});class sg{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}}var ig=Object.freeze({__proto__:null,hdmx:class extends ep{constructor(e,t,n){const{p:r}=super(e,t),a=n.hmtx.numGlyphs;this.version=r.uint16,this.numRecords=r.int16,this.sizeDeviceRecord=r.int32,this.records=[...new Array(numRecords)].map((e=>new sg(r,a)))}}});class og{constructor(e){this.version=e.uint16,this.length=e.uint16,this.coverage=e.flags(8),this.format=e.uint8,0===this.format&&(this.nPairs=e.uint16,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16,tp(this,"pairs",(()=>[...new Array(this.nPairs)].map((t=>new lg(e)))))),2===this.format&&console.warn("Kern subtable format 2 is not supported: this parser currently only parses universal table data.")}get horizontal(){return this.coverage[0]}get minimum(){return this.coverage[1]}get crossstream(){return this.coverage[2]}get override(){return this.coverage[3]}}class lg{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}}var cg=Object.freeze({__proto__:null,kern:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.nTables=n.uint16,tp(this,"tables",(()=>{let e=this.tableStart+4;const t=[];for(let r=0;r<this.nTables;r++){n.currentPosition=e;let r=new og(n);t.push(r),e+=r}return t}))}}});var ug=Object.freeze({__proto__:null,LTSH:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numGlyphs=n.uint16,this.yPels=n.readBytes(this.numGlyphs)}}});var dg=Object.freeze({__proto__:null,MERG:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.mergeClassCount=n.uint16,this.mergeDataOffset=n.Offset16,this.classDefCount=n.uint16,this.offsetToClassDefOffsets=n.Offset16,tp(this,"mergeEntryMatrix",(()=>[...new Array(this.mergeClassCount)].map((e=>n.readBytes(this.mergeClassCount))))),console.warn("Full MERG parsing is currently not supported."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}}});class mg{constructor(e,t){this.tableStart=e,this.parser=t,this.tag=t.tag,this.dataOffset=t.Offset32,this.dataLength=t.uint32}getData(){return this.parser.currentField=this.tableStart+this.dataOffset,this.parser.readBytes(this.dataLength)}}var pg=Object.freeze({__proto__:null,meta:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint32,this.flags=n.uint32,n.uint32,this.dataMapsCount=n.uint32,this.dataMaps=[...new Array(this.dataMapsCount)].map((e=>new mg(this.tableStart,n)))}}});var hg=Object.freeze({__proto__:null,PCLT:class extends ep{constructor(e,t){super(e,t),console.warn("This font uses a PCLT table, which is currently not supported by this parser."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}}});class fg{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}}class gg{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map((t=>new yg(e)))}}class yg{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}}var vg=Object.freeze({__proto__:null,VDMX:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numRecs=n.uint16,this.numRatios=n.uint16,this.ratRanges=[...new Array(this.numRatios)].map((e=>new fg(n))),this.offsets=[...new Array(this.numRatios)].map((e=>n.Offset16)),this.VDMXGroups=[...new Array(this.numRecs)].map((e=>new gg(n)))}}});var bg=Object.freeze({__proto__:null,vhea:class extends ep{constructor(e,t){const{p:n}=super(e,t);this.version=n.fixed,this.ascent=this.vertTypoAscender=n.int16,this.descent=this.vertTypoDescender=n.int16,this.lineGap=this.vertTypoLineGap=n.int16,this.advanceHeightMax=n.int16,this.minTopSideBearing=n.int16,this.minBottomSideBearing=n.int16,this.yMaxExtent=n.int16,this.caretSlopeRise=n.int16,this.caretSlopeRun=n.int16,this.caretOffset=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.metricDataFormat=n.int16,this.numOfLongVerMetrics=n.uint16,n.verifyLength()}}});class _g{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}}var Eg=Object.freeze({__proto__:null,vmtx:class extends ep{constructor(e,t,n){super(e,t);const r=n.vhea.numOfLongVerMetrics,a=n.maxp.numGlyphs,s=p.currentPosition;if(lazy(this,"vMetrics",(()=>(p.currentPosition=s,[...new Array(r)].map((e=>new _g(p.uint16,p.int16)))))),r<a){const e=s+4*r;lazy(this,"topSideBearings",(()=>(p.currentPosition=e,[...new Array(a-r)].map((e=>p.int16)))))}}}});const{kebabCase:wg}=Xe(_.privateApis);const{ProgressBar:Sg}=Xe(_.privateApis);const xg=function(){const{installFonts:e,notice:t,setNotice:n}=(0,g.useContext)(Im),[r,a]=(0,g.useState)(!1),s=async e=>{n(null),a(!0);const t=new Set,r=[...e];let s=!1;const l=r.map((async e=>{const n=await async function(e){const t=new Sp("Uploaded Font");try{const n=await o(e);return await t.fromDataBuffer(n,"font"),!0}catch(e){return!1}}(e);if(!n)return s=!0,null;if(t.has(e.name))return null;const r=e.name.split(".").pop().toLowerCase();return cm.includes(r)?(t.add(e.name),e):null})),c=(await Promise.all(l)).filter((e=>null!==e));if(c.length>0)i(c);else{const e=s?(0,E.__)("Sorry, you are not allowed to upload this file type."):(0,E.__)("No fonts found to install.");n({type:"error",message:e}),a(!1)}},i=async e=>{const t=await Promise.all(e.map((async e=>{const t=await c(e);return await _m(t,t.file,"all"),t})));u(t)};async function o(e){return new Promise(((t,n)=>{const r=new window.FileReader;r.readAsArrayBuffer(e),r.onload=()=>t(r.result),r.onerror=n}))}const c=async e=>{const t=await o(e),n=new Sp("Uploaded Font");n.fromDataBuffer(t,e.name);const r=(await new Promise((e=>n.onload=e))).detail.font,{name:a}=r.opentype.tables,s=a.get(16)||a.get(1),i=a.get(2).toLowerCase().includes("italic"),l=r.opentype.tables["OS/2"].usWeightClass||"normal",c=!!r.opentype.tables.fvar&&r.opentype.tables.fvar.axes.find((({tag:e})=>"wght"===e));return{file:e,fontFamily:s,fontStyle:i?"italic":"normal",fontWeight:(c?`${c.minValue} ${c.maxValue}`:null)||l}},u=async t=>{const r=function(e){const t=e.reduce(((e,t)=>(e[t.fontFamily]||(e[t.fontFamily]={name:t.fontFamily,fontFamily:t.fontFamily,slug:wg(t.fontFamily.toLowerCase()),fontFace:[]}),e[t.fontFamily].fontFace.push(t),e)),{});return Object.values(t)}(t);try{await e(r),n({type:"success",message:(0,E.__)("Fonts were installed successfully.")})}catch(e){n({type:"error",message:e.message,errors:e?.installationErrors})}a(!1)};return(0,l.createElement)("div",{className:"font-library-modal__tabpanel-layout"},(0,l.createElement)(_.DropZone,{onFilesDrop:e=>{s(e)}}),(0,l.createElement)(_.__experimentalVStack,{className:"font-library-modal__local-fonts"},t&&(0,l.createElement)(_.Notice,{status:t.type,__unstableHTML:!0,onRemove:()=>n(null)},t.message,t.errors&&(0,l.createElement)("ul",null,t.errors.map(((e,t)=>(0,l.createElement)("li",{key:t},e))))),r&&(0,l.createElement)(_.FlexItem,null,(0,l.createElement)("div",{className:"font-library-modal__upload-area"},(0,l.createElement)(Sg,null))),!r&&(0,l.createElement)(_.FormFileUpload,{accept:cm.map((e=>`.${e}`)).join(","),multiple:!0,onChange:e=>{s(e.target.files)},render:({openFileDialog:e})=>(0,l.createElement)(_.Button,{className:"font-library-modal__upload-area",onClick:e},(0,E.__)("Upload font"))}),(0,l.createElement)(_.__experimentalSpacer,{margin:2}),(0,l.createElement)(_.__experimentalText,{className:"font-library-modal__upload-area__text"},(0,E.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2."))))},{Tabs:Cg}=Xe(_.privateApis),kg={id:"installed-fonts",title:(0,E._x)("Library","Font library")},Tg={id:"upload-fonts",title:(0,E.__)("Upload")};const Pg=function({onRequestClose:e,initialTabId:t="installed-fonts"}){const{collections:n,setNotice:r}=(0,g.useContext)(Im),a=(0,m.useSelect)((e=>{const{canUser:t}=e(ye.store);return t("create","font-families")}),[]),s=[kg];return a&&(s.push(Tg),s.push(...(e=>e.map((({slug:t,name:n})=>({id:t,title:1===e.length&&"google-fonts"===t?(0,E.__)("Install Fonts"):n}))))(n||[]))),(0,l.createElement)(_.Modal,{title:(0,E.__)("Fonts"),onRequestClose:e,isFullScreen:!0,className:"font-library-modal"},(0,l.createElement)("div",{className:"font-library-modal__tabs"},(0,l.createElement)(Cg,{initialTabId:t,onSelect:()=>{r(null)}},(0,l.createElement)(Cg.TabList,null,s.map((({id:e,title:t})=>(0,l.createElement)(Cg.Tab,{key:e,tabId:e},t)))),s.map((({id:e})=>{let t;switch(e){case"upload-fonts":t=(0,l.createElement)(xg,null);break;case"installed-fonts":t=(0,l.createElement)(Lm,null);break;default:t=(0,l.createElement)(Wm,{slug:e})}return(0,l.createElement)(Cg.TabPanel,{key:e,tabId:e,focusable:!1},t)})))))};const Ig=function({font:e}){const{handleSetLibraryFontSelected:t,toggleModal:n}=(0,g.useContext)(Im),r=e?.fontFace?.length||1,a=hm(e);return(0,l.createElement)(_.__experimentalItem,{onClick:()=>{t(e),n("installed-fonts")}},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(_.FlexItem,{style:a},e.name),(0,l.createElement)(_.FlexItem,{className:"edit-site-global-styles-screen-typography__font-variants-count"},(0,E.sprintf)((0,E._n)("%d variant","%d variants",r),r))))};function Mg(){const{modalTabOpen:e,toggleModal:t,themeFonts:n,customFonts:r}=(0,g.useContext)(Im),a=0<r.length||0<n.length;return(0,l.createElement)(l.Fragment,null,!!e&&(0,l.createElement)(Pg,{onRequestClose:()=>t(),initialTabId:e}),(0,l.createElement)(_.__experimentalVStack,{spacing:3},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(Fd,{level:3},(0,E.__)("Fonts")),(0,l.createElement)(_.__experimentalHStack,{justify:"flex-end"},(0,l.createElement)(_.Tooltip,{text:(0,E.__)("Manage fonts")},(0,l.createElement)(_.Button,{onClick:()=>t("installed-fonts"),"aria-label":(0,E.__)("Manage fonts"),icon:nm,size:"small"})))),a?(0,l.createElement)(_.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},r.map((e=>(0,l.createElement)(Ig,{key:e.slug,font:e}))),n.map((e=>(0,l.createElement)(Ig,{key:e.slug,font:e})))):(0,l.createElement)(l.Fragment,null,(0,E.__)("No fonts installed."),(0,l.createElement)(_.Button,{className:"edit-site-global-styles-font-families__add-fonts",variant:"secondary",onClick:()=>t("upload-fonts")},(0,E.__)("Add fonts")))))}const Ag=({...e})=>(0,l.createElement)(Mm,null,(0,l.createElement)(Mg,{...e}));const Og=function(){const e=(0,m.useSelect)((e=>e(y.store).getEditorSettings().fontLibraryEnabled),[]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{title:(0,E.__)("Typography"),description:(0,E.__)("Manage the typography settings for different elements.")}),(0,l.createElement)("div",{className:"edit-site-global-styles-screen-typography"},(0,l.createElement)(_.__experimentalVStack,{spacing:6},e&&(0,l.createElement)(Ag,null),(0,l.createElement)(tm,null))))},{useGlobalStyle:Ng,useGlobalSetting:Fg,useSettingsForBlockElement:Rg,TypographyPanel:Dg}=Xe(fe.privateApis);function Vg({element:e,headingLevel:t}){let n=[];"heading"===e?n=n.concat(["elements",t]):e&&"text"!==e&&(n=n.concat(["elements",e]));const r=n.join("."),[a]=Ng(r,void 0,"user",{shouldDecodeEncode:!1}),[s,i]=Ng(r,void 0,"all",{shouldDecodeEncode:!1}),[o]=Fg(""),c=Rg(o,void 0,"heading"===e?t:e);return(0,l.createElement)(Dg,{inheritedValue:s,value:a,onChange:i,settings:c})}const{useGlobalStyle:Lg}=Xe(fe.privateApis);function Bg({name:e,element:t,headingLevel:n}){let r="";"heading"===t?r=`elements.${n}.`:t&&"text"!==t&&(r=`elements.${t}.`);const[a]=Lg(r+"typography.fontFamily",e),[s]=Lg(r+"color.gradient",e),[i]=Lg(r+"color.background",e),[o]=Lg(r+"color.text",e),[c]=Lg(r+"typography.fontSize",e),[u]=Lg(r+"typography.fontStyle",e),[d]=Lg(r+"typography.fontWeight",e),[m]=Lg(r+"typography.letterSpacing",e),p="link"===t?{textDecoration:"underline"}:{};return(0,l.createElement)("div",{className:"edit-site-typography-preview",style:{fontFamily:null!=a?a:"serif",background:null!=s?s:i,color:o,fontSize:c,fontStyle:u,fontWeight:d,letterSpacing:m,...p}},"Aa")}const zg={text:{description:(0,E.__)("Manage the fonts used on the site."),title:(0,E.__)("Text")},link:{description:(0,E.__)("Manage the fonts and typography used on the links."),title:(0,E.__)("Links")},heading:{description:(0,E.__)("Manage the fonts and typography used on headings."),title:(0,E.__)("Headings")},caption:{description:(0,E.__)("Manage the fonts and typography used on captions."),title:(0,E.__)("Captions")},button:{description:(0,E.__)("Manage the fonts and typography used on buttons."),title:(0,E.__)("Buttons")}};const Hg=function({element:e}){const[t,n]=(0,g.useState)("heading");return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{title:zg[e].title,description:zg[e].description}),(0,l.createElement)(_.__experimentalSpacer,{marginX:4},(0,l.createElement)(Bg,{element:e,headingLevel:t})),"heading"===e&&(0,l.createElement)(_.__experimentalSpacer,{marginX:4,marginBottom:"1em"},(0,l.createElement)(_.__experimentalToggleGroupControl,{label:(0,E.__)("Select heading level"),hideLabelFromVision:!0,value:t,onChange:n,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0},(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"heading",label:(0,E._x)("All","heading levels")}),(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"h1",label:(0,E.__)("H1")}),(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"h2",label:(0,E.__)("H2")}),(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"h3",label:(0,E.__)("H3")}),(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"h4",label:(0,E.__)("H4")}),(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"h5",label:(0,E.__)("H5")}),(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"h6",label:(0,E.__)("H6")}))),(0,l.createElement)(Vg,{element:e,headingLevel:t}))},Gg=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/SVG"},(0,l.createElement)(w.Path,{d:"M17.192 6.75L15.47 5.03l1.06-1.06 3.537 3.53-3.537 3.53-1.06-1.06 1.723-1.72h-3.19c-.602 0-.993.202-1.28.498-.309.319-.538.792-.695 1.383-.13.488-.222 1.023-.296 1.508-.034.664-.116 1.413-.303 2.117-.193.721-.513 1.467-1.068 2.04-.575.594-1.359.954-2.357.954H4v-1.5h4.003c.601 0 .993-.202 1.28-.498.308-.319.538-.792.695-1.383.149-.557.216-1.093.288-1.662l.039-.31a9.653 9.653 0 0 1 .272-1.653c.193-.722.513-1.467 1.067-2.04.576-.594 1.36-.954 2.358-.954h3.19zM8.004 6.75c.8 0 1.46.23 1.988.628a6.24 6.24 0 0 0-.684 1.396 1.725 1.725 0 0 0-.024-.026c-.287-.296-.679-.498-1.28-.498H4v-1.5h4.003zM12.699 14.726c-.161.459-.38.94-.684 1.396.527.397 1.188.628 1.988.628h3.19l-1.722 1.72 1.06 1.06L20.067 16l-3.537-3.53-1.06 1.06 1.723 1.72h-3.19c-.602 0-.993-.202-1.28-.498a1.96 1.96 0 0 1-.024-.026z"}));const Ug=function({className:e,...t}){return(0,l.createElement)(_.Flex,{className:b()("edit-site-global-styles__color-indicator-wrapper",e),...t})},{useGlobalSetting:Wg}=Xe(fe.privateApis),jg=[];const Zg=function({name:e}){const[t]=Wg("color.palette.custom"),[n]=Wg("color.palette.theme"),[r]=Wg("color.palette.default"),[a]=Wg("color.defaultPalette",e),[s]=function(e){const[t,n]=Je("color.palette.theme",e);return window.__experimentalEnableColorRandomizer?[function(){const e=Math.floor(225*Math.random()),r=t.map((t=>{const{color:n}=t,r=We(n).rotate(e).toHex();return{...t,color:r}}));n(r)}]:[]}(),i=(0,g.useMemo)((()=>[...t||jg,...n||jg,...r&&a?r:jg]),[t,n,r,a]),o=e?"/blocks/"+encodeURIComponent(e)+"/colors/palette":"/colors/palette",c=i.length>0?(0,E.sprintf)((0,E._n)("%d color","%d colors",i.length),i.length):(0,E.__)("Add custom colors");return(0,l.createElement)(_.__experimentalVStack,{spacing:3},(0,l.createElement)(Fd,{level:3},(0,E.__)("Palette")),(0,l.createElement)(_.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,l.createElement)(cd,{path:o,"aria-label":(0,E.__)("Color palettes")},(0,l.createElement)(_.__experimentalHStack,{direction:0===i.length?"row-reverse":"row"},(0,l.createElement)(_.__experimentalZStack,{isLayered:!1,offset:-8},i.slice(0,5).map((({color:e},t)=>(0,l.createElement)(Ug,{key:`${e}-${t}`},(0,l.createElement)(_.ColorIndicator,{colorValue:e}))))),(0,l.createElement)(_.FlexItem,null,c)))),window.__experimentalEnableColorRandomizer&&n?.length>0&&(0,l.createElement)(_.Button,{variant:"secondary",icon:Gg,onClick:s},(0,E.__)("Randomize colors")))},{useGlobalStyle:qg,useGlobalSetting:Yg,useSettingsForBlockElement:Kg,ColorPanel:Xg}=Xe(fe.privateApis);const Jg=function(){const[e]=qg("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=qg("",void 0,"all",{shouldDecodeEncode:!1}),[r]=Yg(""),a=Kg(r);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{title:(0,E.__)("Colors"),description:(0,E.__)("Manage palettes and the default color of different global elements on the site.")}),(0,l.createElement)("div",{className:"edit-site-global-styles-screen-colors"},(0,l.createElement)(_.__experimentalVStack,{spacing:10},(0,l.createElement)(Zg,null),(0,l.createElement)(Xg,{inheritedValue:t,value:e,onChange:n,settings:a}))))},{useGlobalSetting:Qg}=Xe(fe.privateApis),$g={placement:"bottom-start",offset:8};function ey({name:e}){const[t,n]=Qg("color.palette.theme",e),[r]=Qg("color.palette.theme",e,"base"),[a,s]=Qg("color.palette.default",e),[i]=Qg("color.palette.default",e,"base"),[o,c]=Qg("color.palette.custom",e),[u]=Qg("color.defaultPalette",e),d=(0,ie.useViewportMatch)("small","<")?$g:void 0;return(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-global-styles-color-palette-panel",spacing:10},!!t&&!!t.length&&(0,l.createElement)(_.__experimentalPaletteEdit,{canReset:t!==r,canOnlyChangeValues:!0,colors:t,onChange:n,paletteLabel:(0,E.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:d}),!!a&&!!a.length&&!!u&&(0,l.createElement)(_.__experimentalPaletteEdit,{canReset:a!==i,canOnlyChangeValues:!0,colors:a,onChange:s,paletteLabel:(0,E.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:d}),(0,l.createElement)(_.__experimentalPaletteEdit,{colors:o,onChange:c,paletteLabel:(0,E.__)("Custom"),paletteLabelHeadingLevel:3,emptyMessage:(0,E.__)("Custom colors are empty! Add some colors to create your own color palette."),slugPrefix:"custom-",popoverProps:d}))}const{useGlobalSetting:ty}=Xe(fe.privateApis),ny={placement:"bottom-start",offset:8},ry=()=>{};function ay({name:e}){const[t,n]=ty("color.gradients.theme",e),[r]=ty("color.gradients.theme",e,"base"),[a,s]=ty("color.gradients.default",e),[i]=ty("color.gradients.default",e,"base"),[o,c]=ty("color.gradients.custom",e),[u]=ty("color.defaultGradients",e),[d]=ty("color.duotone.custom")||[],[m]=ty("color.duotone.default")||[],[p]=ty("color.duotone.theme")||[],[h]=ty("color.defaultDuotone"),f=[...d||[],...p||[],...m&&h?m:[]],g=(0,ie.useViewportMatch)("small","<")?ny:void 0;return(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-global-styles-gradient-palette-panel",spacing:10},!!t&&!!t.length&&(0,l.createElement)(_.__experimentalPaletteEdit,{canReset:t!==r,canOnlyChangeValues:!0,gradients:t,onChange:n,paletteLabel:(0,E.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:g}),!!a&&!!a.length&&!!u&&(0,l.createElement)(_.__experimentalPaletteEdit,{canReset:a!==i,canOnlyChangeValues:!0,gradients:a,onChange:s,paletteLabel:(0,E.__)("Default"),paletteLabelLevel:3,popoverProps:g}),(0,l.createElement)(_.__experimentalPaletteEdit,{gradients:o,onChange:c,paletteLabel:(0,E.__)("Custom"),paletteLabelLevel:3,emptyMessage:(0,E.__)("Custom gradients are empty! Add some gradients to create your own palette."),slugPrefix:"custom-",popoverProps:g}),!!f&&!!f.length&&(0,l.createElement)("div",null,(0,l.createElement)(Fd,{level:3},(0,E.__)("Duotone")),(0,l.createElement)(_.__experimentalSpacer,{margin:3}),(0,l.createElement)(_.DuotonePicker,{duotonePalette:f,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:ry})))}const{Tabs:sy}=Xe(_.privateApis);const iy=function({name:e}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{title:(0,E.__)("Palette"),description:(0,E.__)("Palettes are used to provide default color options for blocks and various design tools. Here you can edit the colors with their labels.")}),(0,l.createElement)(sy,null,(0,l.createElement)(sy.TabList,null,(0,l.createElement)(sy.Tab,{tabId:"solid"},"Solid"),(0,l.createElement)(sy.Tab,{tabId:"gradient"},"Gradient")),(0,l.createElement)(sy.TabPanel,{tabId:"solid",focusable:!1},(0,l.createElement)(ey,{name:e})),(0,l.createElement)(sy.TabPanel,{tabId:"gradient",focusable:!1},(0,l.createElement)(ay,{name:e}))))},{useGlobalStyle:oy,useGlobalSetting:ly,useSettingsForBlockElement:cy,DimensionsPanel:uy}=Xe(fe.privateApis),dy={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,childLayout:!1};function my(){const[e]=oy("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=oy("",void 0,"all",{shouldDecodeEncode:!1}),[r]=ly("",void 0,"user"),[a,s]=ly(""),i=cy(a),o=(0,g.useMemo)((()=>({...t,layout:i.layout})),[t,i.layout]),c=(0,g.useMemo)((()=>({...e,layout:r.layout})),[e,r.layout]);return(0,l.createElement)(uy,{inheritedValue:o,value:c,onChange:e=>{const t={...e};if(delete t.layout,n(t),e.layout!==r.layout){const t={...r,layout:e.layout};t.layout?.definitions&&delete t.layout.definitions,s(t)}},settings:i,includeLayoutControls:!0,defaultControls:dy})}const{useHasDimensionsPanel:py,useGlobalSetting:hy,useSettingsForBlockElement:fy}=Xe(fe.privateApis);const gy=function(){const[e]=hy(""),t=fy(e),n=py(t);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{title:(0,E.__)("Layout")}),n&&(0,l.createElement)(my,null))};const yy=function(){const{mode:e}=(0,m.useSelect)((e=>({mode:e(fe.store).__unstableGetEditorMode()})),[]),t=(0,g.useRef)(null);(0,g.useEffect)((()=>{"zoom-out"!==e&&(t.current=!1)}),[e]),(0,g.useEffect)((()=>{if("zoom-out"!==e)return n("zoom-out"),t.current=!0,()=>{t.current&&n(e)}}),[]);const{__unstableSetEditorMode:n}=(0,m.useDispatch)(fe.store);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{back:"/",title:(0,E.__)("Browse styles"),description:(0,E.__)("Choose a variation to change the look of the site.")}),(0,l.createElement)(_.Card,{size:"small",isBorderless:!0,className:"edit-site-global-styles-screen-style-variations"},(0,l.createElement)(_.CardBody,null,(0,l.createElement)(Gr,null))))},{useGlobalStyle:vy,AdvancedPanel:by}=Xe(fe.privateApis);const _y=function(){const e=(0,E.__)("Add your own CSS to customize the appearance and layout of your site."),[t]=vy("",void 0,"user",{shouldDecodeEncode:!1}),[n,r]=vy("",void 0,"all",{shouldDecodeEncode:!1});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{title:(0,E.__)("CSS"),description:(0,l.createElement)(l.Fragment,null,e,(0,l.createElement)(_.ExternalLink,{href:"https://wordpress.org/documentation/article/css/",className:"edit-site-global-styles-screen-css-help-link"},(0,E.__)("Learn more about CSS")))}),(0,l.createElement)("div",{className:"edit-site-global-styles-screen-css"},(0,l.createElement)(by,{value:t,onChange:r,inheritedValue:n})))},{ExperimentalBlockEditorProvider:Ey,GlobalStylesContext:wy,useGlobalStylesOutputWithConfig:Sy}=Xe(fe.privateApis);function xy(e){return!e||0===Object.keys(e).length}const Cy=function({userConfig:e,blocks:t}){const{base:n}=(0,g.useContext)(wy),r=(0,g.useMemo)((()=>xy(e)||xy(n)?{}:Ir(n,e)),[n,e]),a=(0,g.useMemo)((()=>Array.isArray(t)?t:[t]),[t]),s=(0,m.useSelect)((e=>e(fe.store).getSettings()),[]),i=(0,g.useMemo)((()=>({...s,__unstableIsPreviewMode:!0})),[s]),[o]=Sy(r),c=xy(o)||xy(e)?i.styles:o;return(0,l.createElement)($r,{title:(0,E.__)("Revisions"),closeButtonLabel:(0,E.__)("Close revisions"),enableResizing:!0},(0,l.createElement)(fe.__unstableIframe,{className:"edit-site-revisions__iframe",name:"revisions",tabIndex:0},(0,l.createElement)(fe.__unstableEditorStyles,{styles:c}),(0,l.createElement)("style",null,".is-root-container { display: flow-root; }"),(0,l.createElement)(_.Disabled,{className:"edit-site-revisions__example-preview__content"},(0,l.createElement)(Ey,{value:a,settings:i},(0,l.createElement)(fe.BlockList,{renderAppender:!1})))))},{getGlobalStylesChanges:ky}=Xe(fe.privateApis);function Ty({revision:e,previousRevision:t}){const n=ky(e,t,{maxResults:7});return n.length?(0,l.createElement)("ul",{"data-testid":"global-styles-revision-changes",className:"edit-site-global-styles-screen-revisions__changes"},n.map((e=>(0,l.createElement)("li",{key:e},e)))):null}const Py=function({userRevisions:e,selectedRevisionId:t,onChange:n,canApplyRevision:r,onApplyRevision:a}){const{currentThemeName:s,currentUser:i}=(0,m.useSelect)((e=>{const{getCurrentTheme:t,getCurrentUser:n}=e(ye.store),r=t();return{currentThemeName:r?.name?.rendered||r?.stylesheet,currentUser:n()}}),[]),o=(0,ba.getDate)().getTime(),{datetimeAbbreviated:c}=(0,ba.getSettings)().formats;return(0,l.createElement)("ol",{className:"edit-site-global-styles-screen-revisions__revisions-list","aria-label":(0,E.__)("Global styles revisions list"),role:"group"},e.map(((u,d)=>{const{id:m,author:p,modified:h}=u,f="unsaved"===m,g=f?i:p,y=g?.name||(0,E.__)("User"),v=g?.avatar_urls?.[48],w=t?t===m:0===d,S=!r&&w,x="parent"===m,C=(0,ba.getDate)(h),k=h&&o-C.getTime()>864e5?(0,ba.dateI18n)(c,C):(0,ba.humanTimeDiff)(h),T=function(e,t,n,r){return"parent"===e?(0,E.__)("Reset the styles to the theme defaults"):"unsaved"===e?(0,E.sprintf)((0,E.__)("Unsaved changes by %s"),t):r?(0,E.sprintf)((0,E.__)("Changes saved by %1$s on %2$s. This revision matches current editor styles."),t,n):(0,E.sprintf)((0,E.__)("Changes saved by %1$s on %2$s"),t,n)}(m,y,(0,ba.dateI18n)(c,C),S);return(0,l.createElement)("li",{className:b()("edit-site-global-styles-screen-revisions__revision-item",{"is-selected":w,"is-active":S,"is-reset":x}),key:m,"aria-current":w},(0,l.createElement)(_.Button,{className:"edit-site-global-styles-screen-revisions__revision-button",disabled:w,onClick:()=>{n(u)},"aria-label":T},x?(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__description"},(0,E.__)("Default styles"),(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__meta"},s)):(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__description"},f?(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__date"},(0,E.__)("(Unsaved)")):(0,l.createElement)("time",{className:"edit-site-global-styles-screen-revisions__date",dateTime:h},k),(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__meta"},(0,l.createElement)("img",{alt:y,src:v}),y),w&&(0,l.createElement)(Ty,{revision:u,previousRevision:d<e.length?e[d+1]:{}}))),w&&(S?(0,l.createElement)("p",{className:"edit-site-global-styles-screen-revisions__applied-text"},(0,E.__)("These styles are already applied to your site.")):(0,l.createElement)(_.Button,{disabled:S,size:"compact",variant:"primary",className:"edit-site-global-styles-screen-revisions__apply-button",onClick:a},x?(0,E.__)("Reset to defaults"):(0,E.__)("Apply"))))})))};function Iy({currentPage:e,numPages:t,changePage:n,totalItems:r,className:a,disabled:s=!1,buttonVariant:i="tertiary",label:o=(0,E.__)("Pagination Navigation")}){return(0,l.createElement)(_.__experimentalHStack,{expanded:!1,as:"nav","aria-label":o,spacing:3,justify:"flex-start",className:b()("edit-site-pagination",a)},(0,l.createElement)(_.__experimentalText,{variant:"muted",className:"edit-site-pagination__total"},(0,E.sprintf)((0,E._n)("%s item","%s items",r),r)),(0,l.createElement)(_.__experimentalHStack,{expanded:!1,spacing:1},(0,l.createElement)(_.Button,{variant:i,onClick:()=>n(1),disabled:s||1===e,"aria-label":(0,E.__)("First page")},"«"),(0,l.createElement)(_.Button,{variant:i,onClick:()=>n(e-1),disabled:s||1===e,"aria-label":(0,E.__)("Previous page")},"‹")),(0,l.createElement)(_.__experimentalText,{variant:"muted"},(0,E.sprintf)((0,E._x)("%1$s of %2$s","paging"),e,t)),(0,l.createElement)(_.__experimentalHStack,{expanded:!1,spacing:1},(0,l.createElement)(_.Button,{variant:i,onClick:()=>n(e+1),disabled:s||e===t,"aria-label":(0,E.__)("Next page")},"›"),(0,l.createElement)(_.Button,{variant:i,onClick:()=>n(t),disabled:s||e===t,"aria-label":(0,E.__)("Last page")},"»")))}const{GlobalStylesContext:My,areGlobalStyleConfigsEqual:Ay}=Xe(fe.privateApis);const Oy=function(){const{goTo:e}=(0,_.__experimentalUseNavigator)(),{user:t,setUserConfig:n}=(0,g.useContext)(My),{blocks:r,editorCanvasContainerView:a}=(0,m.useSelect)((e=>({editorCanvasContainerView:Xe(e(tr)).getEditorCanvasContainerView(),blocks:e(fe.store).getBlocks()})),[]),[s,i]=(0,g.useState)(1),[o,c]=(0,g.useState)([]),{revisions:u,isLoading:d,hasUnsavedChanges:p,revisionsCount:h}=va({query:{per_page:10,page:s}}),f=Math.ceil(h/10),[y,v]=(0,g.useState)(t),[b,w]=(0,g.useState)(!1),{setEditorCanvasContainerView:S}=Xe((0,m.useDispatch)(tr)),x=Ay(y,t),C=()=>{e("/");S("global-styles-revisions:style-book"===a?"style-book":void 0)},k=e=>{n((()=>({styles:e?.styles,settings:e?.settings}))),w(!1),C()};(0,g.useEffect)((()=>{a&&a.startsWith("global-styles-revisions")||e("/")}),[a]),(0,g.useEffect)((()=>{!d&&u.length&&c(u)}),[u,d]);const T=u[0],P=y?.id,I=!!T?.id&&!x&&!P;(0,g.useEffect)((()=>{I&&v({styles:T?.styles||{},settings:T?.settings||{},id:T?.id})}),[I,T]);const M=!!P&&"unsaved"!==P&&!x,A=!!o.length;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(wd,{title:h&&(0,E.sprintf)((0,E.__)("Revisions (%s)"),h),description:(0,E.__)('Click on previously saved styles to preview them. To restore a selected version to the editor, hit "Apply." When you\'re ready, use the Save button to save your changes.'),onBack:C}),!A&&(0,l.createElement)(_.Spinner,{className:"edit-site-global-styles-screen-revisions__loading"}),A&&("global-styles-revisions:style-book"===a?(0,l.createElement)(pa,{userConfig:y,isSelected:()=>{},onClose:()=>{S("global-styles-revisions")}}):(0,l.createElement)(Cy,{blocks:r,userConfig:y,closeButtonLabel:(0,E.__)("Close revisions")})),(0,l.createElement)(Py,{onChange:e=>{v({styles:e?.styles||{},settings:e?.settings||{},id:e?.id})},selectedRevisionId:P,userRevisions:o,canApplyRevision:M,onApplyRevision:()=>p?w(!0):k(y)}),f>1&&(0,l.createElement)("div",{className:"edit-site-global-styles-screen-revisions__footer"},(0,l.createElement)(Iy,{className:"edit-site-global-styles-screen-revisions__pagination",currentPage:s,numPages:f,changePage:i,totalItems:h,disabled:d,label:(0,E.__)("Global Styles pagination navigation")})),b&&(0,l.createElement)(_.__experimentalConfirmDialog,{isOpen:b,confirmButtonText:(0,E.__)("Apply"),onConfirm:()=>k(y),onCancel:()=>w(!1)},(0,E.__)("Any unsaved changes will be lost when you apply this revision.")))},{useGlobalStylesReset:Ny}=Xe(fe.privateApis),{Slot:Fy,Fill:Ry}=(0,_.createSlotFill)("GlobalStylesMenu");function Dy(){const[e,t]=Ny(),{toggle:n}=(0,m.useDispatch)(T.store),{canEditCSS:r}=(0,m.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(ye.store),r=n(),a=r?t("root","globalStyles",r):void 0;return{canEditCSS:!!a?._links?.["wp:action-edit-css"]}}),[]),{setEditorCanvasContainerView:a}=Xe((0,m.useDispatch)(tr)),{goTo:s}=(0,_.__experimentalUseNavigator)(),i=()=>{a("global-styles-css"),s("/css")};return(0,l.createElement)(Ry,null,(0,l.createElement)(_.DropdownMenu,{icon:ue,label:(0,E.__)("More")},(({onClose:a})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuGroup,null,r&&(0,l.createElement)(_.MenuItem,{onClick:i},(0,E.__)("Additional CSS")),(0,l.createElement)(_.MenuItem,{onClick:()=>{n("core/edit-site","welcomeGuideStyles"),a()}},(0,E.__)("Welcome Guide"))),(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(_.MenuItem,{onClick:()=>{t(),a()},disabled:!e},(0,E.__)("Reset styles")))))))}function Vy({className:e,...t}){return(0,l.createElement)(_.__experimentalNavigatorScreen,{className:["edit-site-global-styles-sidebar__navigator-screen",e].filter(Boolean).join(" "),...t})}function Ly({parentMenu:e,blockStyles:t,blockName:n}){return t.map(((t,r)=>(0,l.createElement)(Vy,{key:r,path:e+"/variations/"+t.name},(0,l.createElement)(Qd,{name:n,variation:t.name}))))}function By({name:e,parentMenu:t=""}){const n=(0,m.useSelect)((t=>{const{getBlockStyles:n}=t(u.store);return n(e)}),[e]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Vy,{path:t+"/colors/palette"},(0,l.createElement)(iy,{name:e})),!!n?.length&&(0,l.createElement)(Ly,{parentMenu:t,blockStyles:n,blockName:e}))}function zy(){const e=(0,_.__experimentalUseNavigator)(),{path:t}=e.location;return(0,l.createElement)(pa,{isSelected:e=>t===`/blocks/${encodeURIComponent(e)}`||t.startsWith(`/blocks/${encodeURIComponent(e)}/`),onSelect:t=>{e.goTo("/blocks/"+encodeURIComponent(t))}})}function Hy(){const e=(0,_.__experimentalUseNavigator)(),{selectedBlockName:t,selectedBlockClientId:n}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n}=e(fe.store),r=t();return{selectedBlockName:n(r),selectedBlockClientId:r}}),[]),r=Id(t);(0,g.useEffect)((()=>{if(!n||!r)return;const a=e.location.path;if("/blocks"!==a&&!a.startsWith("/blocks/"))return;const s="/blocks/"+encodeURIComponent(t);s!==a&&e.goTo(s,{skipFocus:!0})}),[n,t,r])}function Gy(){const{goTo:e,location:t}=(0,_.__experimentalUseNavigator)(),n=(0,m.useSelect)((e=>Xe(e(tr)).getEditorCanvasContainerView()),[]),r=t?.path,a="/revisions"===r;(0,g.useEffect)((()=>{switch(n){case"global-styles-revisions":case"global-styles-revisions:style-book":e("/revisions");break;case"global-styles-css":e("/css");break;case"style-book":a&&e("/");break;default:if("/"!==r&&!a)return;e("/")}}),[n,a,e])}const Uy=function(){const e=(0,u.getBlockTypes)(),t=(0,m.useSelect)((e=>Xe(e(tr)).getEditorCanvasContainerView()),[]);return(0,l.createElement)(_.__experimentalNavigatorProvider,{className:"edit-site-global-styles-sidebar__navigator-provider",initialPath:"/"},(0,l.createElement)(Vy,{path:"/"},(0,l.createElement)(bd,null)),(0,l.createElement)(Vy,{path:"/variations"},(0,l.createElement)(yy,null)),(0,l.createElement)(Vy,{path:"/blocks"},(0,l.createElement)(Od,null)),(0,l.createElement)(Vy,{path:"/typography"},(0,l.createElement)(Og,null)),(0,l.createElement)(Vy,{path:"/typography/text"},(0,l.createElement)(Hg,{element:"text"})),(0,l.createElement)(Vy,{path:"/typography/link"},(0,l.createElement)(Hg,{element:"link"})),(0,l.createElement)(Vy,{path:"/typography/heading"},(0,l.createElement)(Hg,{element:"heading"})),(0,l.createElement)(Vy,{path:"/typography/caption"},(0,l.createElement)(Hg,{element:"caption"})),(0,l.createElement)(Vy,{path:"/typography/button"},(0,l.createElement)(Hg,{element:"button"})),(0,l.createElement)(Vy,{path:"/colors"},(0,l.createElement)(Jg,null)),(0,l.createElement)(Vy,{path:"/layout"},(0,l.createElement)(gy,null)),(0,l.createElement)(Vy,{path:"/css"},(0,l.createElement)(_y,null)),(0,l.createElement)(Vy,{path:"/revisions"},(0,l.createElement)(Oy,null)),e.map((e=>(0,l.createElement)(Vy,{key:"menu-block-"+e.name,path:"/blocks/"+encodeURIComponent(e.name)},(0,l.createElement)(Qd,{name:e.name})))),(0,l.createElement)(By,null),e.map((e=>(0,l.createElement)(By,{key:"screens-block-"+e.name,name:e.name,parentMenu:"/blocks/"+encodeURIComponent(e.name)}))),"style-book"===t&&(0,l.createElement)(zy,null),(0,l.createElement)(Dy,null),(0,l.createElement)(Hy,null),(0,l.createElement)(Gy,null))};function Wy(){const{shouldClearCanvasContainerView:e,isStyleBookOpened:t,showListViewByDefault:n,hasRevisions:r,isRevisionsOpened:a,isRevisionsStyleBookOpened:s}=(0,m.useSelect)((e=>{const{getActiveComplementaryArea:t}=e(j),{getEditorCanvasContainerView:n,getCanvasMode:r}=Xe(e(tr)),a=n(),s="visual"===e(tr).getEditorMode(),i="edit"===r(),o=e(T.store).get("core","showListViewByDefault"),{getEntityRecord:l,__experimentalGetCurrentGlobalStylesId:c}=e(ye.store),u=c(),d=u?l("root","globalStyles",u):void 0;return{isStyleBookOpened:"style-book"===a,shouldClearCanvasContainerView:"edit-site/global-styles"!==t("core/edit-site")||!s||!i,showListViewByDefault:o,hasRevisions:!!d?._links?.["version-history"]?.[0]?.count,isRevisionsStyleBookOpened:"global-styles-revisions:style-book"===a,isRevisionsOpened:"global-styles-revisions"===a}}),[]),{setEditorCanvasContainerView:i}=Xe((0,m.useDispatch)(tr));(0,g.useEffect)((()=>{e&&i(void 0)}),[e]);const{setIsListViewOpened:o}=(0,m.useDispatch)(y.store),{goTo:c}=(0,_.__experimentalUseNavigator)();return(0,l.createElement)(id,{className:"edit-site-global-styles-sidebar",identifier:"edit-site/global-styles",title:(0,E.__)("Styles"),icon:ir,closeLabel:(0,E.__)("Close Styles"),panelClassName:"edit-site-global-styles-sidebar__panel",header:(0,l.createElement)(_.Flex,{className:"edit-site-global-styles-sidebar__header",role:"menubar","aria-label":(0,E.__)("Styles actions")},(0,l.createElement)(_.FlexBlock,{style:{minWidth:"min-content"}},(0,l.createElement)("strong",null,(0,E.__)("Styles"))),(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.Button,{icon:br,label:(0,E.__)("Style Book"),isPressed:t||s,disabled:e,onClick:()=>{a?i("global-styles-revisions:style-book"):s?i("global-styles-revisions"):(o(t&&n),i(t?void 0:"style-book"))}})),(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.Button,{label:(0,E.__)("Revisions"),icon:_a,onClick:()=>(o(!1),s?(c("/"),void i("style-book")):a?(c("/"),void i(void 0)):(c("/revisions"),void i(t?"global-styles-revisions:style-book":"global-styles-revisions"))),disabled:!r,isPressed:a||s})),(0,l.createElement)(Fy,null))},(0,l.createElement)(Uy,null))}const jy="edit-site/template",Zy="edit-site/block-inspector",{Tabs:qy}=Xe(_.privateApis),Yy=(0,g.forwardRef)(((e,t)=>{const n=(0,m.useSelect)((e=>e(y.store).getPostTypeLabel()),[]);return(0,l.createElement)(qy.TabList,{ref:t},(0,l.createElement)(qy.Tab,{tabId:jy,"data-tab-id":jy},n),(0,l.createElement)(qy.Tab,{tabId:Zy,"data-tab-id":Zy},(0,E.__)("Block")))}));function Ky({className:e,title:t,icon:n,description:r,actions:a,children:s}){return(0,l.createElement)("div",{className:b()("edit-site-sidebar-card",e)},(0,l.createElement)(_.Icon,{className:"edit-site-sidebar-card__icon",icon:n}),(0,l.createElement)("div",{className:"edit-site-sidebar-card__content"},(0,l.createElement)("div",{className:"edit-site-sidebar-card__header"},(0,l.createElement)("h2",{className:"edit-site-sidebar-card__title"},t),a),(0,l.createElement)("div",{className:"edit-site-sidebar-card__description"},r),s))}const{BlockQuickNavigation:Xy}=Xe(fe.privateApis);function Jy(){const e=(0,m.useSelect)((e=>Xe(e(fe.store)).getEnabledClientIdsTree()),[]),t=(0,g.useMemo)((()=>e.map((({clientId:e})=>e))),[e]);return(0,l.createElement)(Xy,{clientIds:t})}const{PostPanelRow:Qy}=Xe(y.privateApis),$y=[{label:(0,l.createElement)(l.Fragment,null,(0,E.__)("Draft"),(0,l.createElement)(_.__experimentalText,{variant:"muted"},(0,E.__)("Not ready to publish."))),value:"draft"},{label:(0,l.createElement)(l.Fragment,null,(0,E.__)("Pending"),(0,l.createElement)(_.__experimentalText,{variant:"muted"},(0,E.__)("Waiting for review before publishing."))),value:"pending"},{label:(0,l.createElement)(l.Fragment,null,(0,E.__)("Private"),(0,l.createElement)(_.__experimentalText,{variant:"muted"},(0,E.__)("Only visible to site admins and editors."))),value:"private"},{label:(0,l.createElement)(l.Fragment,null,(0,E.__)("Scheduled"),(0,l.createElement)(_.__experimentalText,{variant:"muted"},(0,E.__)("Publish automatically on a chosen date."))),value:"future"},{label:(0,l.createElement)(l.Fragment,null,(0,E.__)("Published"),(0,l.createElement)(_.__experimentalText,{variant:"muted"},(0,E.__)("Visible to everyone."))),value:"publish"}];function ev({postType:e,postId:t,status:n,password:r,date:a}){const[s,i]=(0,g.useState)(!!r),o=(0,ie.useInstanceId)(ev),{editEntityRecord:c}=(0,m.useDispatch)(ye.store),{createErrorNotice:u}=(0,m.useDispatch)(ge.store),[d,p]=(0,g.useState)(null),h=(0,g.useMemo)((()=>({anchor:d,"aria-label":(0,E.__)("Change status"),placement:"bottom-end"})),[d]),f=async({status:s=n,password:i=r,date:o=a})=>{try{await c("postType",e,t,{status:s,date:o,password:i})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,E.__)("An error occurred while updating the status");u(t,{type:"snackbar"})}},y=e=>{i(e),e||f({password:""})},v=e=>{let t=a,n=r;"publish"===e?new Date(a)>new Date&&(t=null):"future"===e?(!a||new Date(a)<new Date)&&(t=new Date,t.setDate(t.getDate()+7)):"private"===e&&r&&(i(!1),n=""),f({status:e,date:t,password:n})};return(0,l.createElement)(Qy,{label:(0,E.__)("Status")},(0,l.createElement)(_.Dropdown,{contentClassName:"edit-site-change-status__content",popoverProps:h,focusOnMount:!0,ref:p,renderToggle:({onToggle:e})=>(0,l.createElement)(_.Button,{className:"edit-site-summary-field__trigger",variant:"tertiary",onClick:e},(0,l.createElement)(pc,{status:r?"protected":n})),renderContent:({onClose:e})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(fe.__experimentalInspectorPopoverHeader,{title:(0,E.__)("Status"),onClose:e}),(0,l.createElement)("form",null,(0,l.createElement)(_.__experimentalVStack,{spacing:5},(0,l.createElement)(_.RadioControl,{className:"edit-site-change-status__options",hideLabelFromVision:!0,label:(0,E.__)("Status"),options:$y,onChange:v,selected:n}),"private"!==n&&(0,l.createElement)("fieldset",{className:"edit-site-change-status__password-fieldset"},(0,l.createElement)(_.__experimentalText,{as:"legend",className:"edit-site-change-status__password-legend",size:"11",lineHeight:1.4,weight:500,upperCase:!0},(0,E.__)("Password")),(0,l.createElement)(_.ToggleControl,{label:(0,E.__)("Hide this page behind a password"),checked:s,onChange:y}),s&&(0,l.createElement)("div",{className:"edit-site-change-status__password-input"},(0,l.createElement)(_.VisuallyHidden,{as:"label",htmlFor:`edit-site-change-status__password-input-${o}`},(0,E.__)("Create password")),(0,l.createElement)(_.TextControl,{onChange:e=>f({password:e}),value:r,placeholder:(0,E.__)("Use a secure password"),type:"text",id:`edit-site-change-status__password-input-${o}`}))))))}))}function tv({status:e,date:t,password:n,postId:r,postType:a}){return(0,l.createElement)(_.__experimentalVStack,{spacing:0},(0,l.createElement)(ev,{status:e,date:t,password:n,postId:r,postType:a}),(0,l.createElement)(y.PostSchedulePanel,null),(0,l.createElement)(y.PostTemplatePanel,null),(0,l.createElement)(y.PostURLPanel,null),(0,l.createElement)(y.PostAuthorPanel,null))}function nv(){const{id:e,type:t,hasResolved:n,status:r,date:a,password:s,title:i,modified:o,renderingMode:c}=(0,m.useSelect)((e=>{const{getEditedPostContext:t}=e(tr),{getEditedEntityRecord:n,hasFinishedResolution:r}=e(ye.store),{getRenderingMode:a}=e(y.store),s=t(),i=["postType",s.postType,s.postId],o=n(...i);return{hasResolved:r("getEditedEntityRecord",i),title:o?.title,id:o?.id,type:o?.type,status:o?.status,date:o?.date,password:o?.password,modified:o?.modified,renderingMode:a()}}),[]);return n?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.PanelBody,null,(0,l.createElement)(Ky,{title:(0,en.decodeEntities)(i),icon:or,description:(0,l.createElement)(_.__experimentalVStack,null,(0,l.createElement)(_.__experimentalText,null,(0,E.sprintf)((0,E.__)("Last edited %s"),(0,ba.humanTimeDiff)(o))))})),(0,l.createElement)(_.PanelBody,{title:(0,E.__)("Summary")},(0,l.createElement)(tv,{status:r,date:a,password:s,postId:e,postType:t})),"post-only"!==c&&(0,l.createElement)(_.PanelBody,{title:(0,E.__)("Content")},(0,l.createElement)(Jy,null)),(0,l.createElement)(y.PostLastRevisionPanel,null),(0,l.createElement)(y.PostTaxonomiesPanel,null),(0,l.createElement)(y.PostFeaturedImagePanel,null),(0,l.createElement)(y.PostExcerptPanel,null),(0,l.createElement)(y.PostDiscussionPanel,null),(0,l.createElement)(y.PageAttributesPanel,null)):null}function rv({onClick:e,availableTemplates:t}){const{editEntityRecord:n}=(0,m.useDispatch)(ye.store),[r,a]=(0,g.useState)(!1),s=()=>{a(!1)},{postId:i,postType:o}=(0,m.useSelect)((e=>({postId:e(tr).getEditedPostId(),postType:e(tr).getEditedPostType()})),[]);return!t.length||t.length<1?null:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{info:(0,E.__)("Replace the contents of this template with another."),onClick:()=>a(!0)},(0,E.__)("Replace template")),r&&(0,l.createElement)(_.Modal,{title:(0,E.__)("Choose a template"),onRequestClose:s,overlayClassName:"edit-site-template-panel__replace-template-modal",isFullScreen:!0},(0,l.createElement)("div",{className:"edit-site-template-panel__replace-template-modal__content"},(0,l.createElement)(av,{availableTemplates:t,onSelect:async t=>{s(),e(),await n("postType",o,i,{blocks:t.blocks,content:(0,u.serialize)(t.blocks)})}}))))}function av({availableTemplates:e,onSelect:t}){const n=(0,ie.useAsyncList)(e);return(0,l.createElement)(fe.__experimentalBlockPatternsList,{label:(0,E.__)("Templates"),blockPatterns:e,shownPatterns:n,onClickPattern:t})}function sv(e,t){return e.innerBlocks=e.innerBlocks.map((e=>sv(e,t))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=t),e}function iv(e,t,n){return e.filter(((e,n,r)=>(e=>!Ot.includes(e.source))(e)&&((e,t,n)=>t===n.findIndex((t=>e.name===t.name)))(e,n,r)&&(e=>e.templateTypes?.includes(t.slug))(e))).map((e=>({...e,keywords:e.keywords||[],type:It.theme,blocks:(0,u.parse)(e.content,{__unstableSkipMigrationLogs:!0}).map((e=>sv(e,n)))})))}function ov({template:e}){const t=function(e){const{blockPatterns:t,restBlockPatterns:n,currentThemeStylesheet:r}=(0,m.useSelect)((e=>{var t;const{getSettings:n}=Xe(e(tr)),r=n();return{blockPatterns:null!==(t=r.__experimentalAdditionalBlockPatterns)&&void 0!==t?t:r.__experimentalBlockPatterns,restBlockPatterns:e(ye.store).getBlockPatterns(),currentThemeStylesheet:e(ye.store).getCurrentTheme().stylesheet}}),[]);return(0,g.useMemo)((()=>iv([...t||[],...n||[]],e,r)),[t,n,e,r])}(e),{revertTemplate:n}=(0,m.useDispatch)(tr),r=$t(e);return r||t.length&&!(t.length<1)?(0,l.createElement)(_.DropdownMenu,{icon:ue,label:(0,E.__)("Actions"),className:"edit-site-template-card__actions",toggleProps:{isSmall:!0}},(({onClose:a})=>(0,l.createElement)(_.MenuGroup,null,r&&(0,l.createElement)(_.MenuItem,{info:(0,E.__)("Use the template as supplied by the theme."),onClick:()=>{n(e),a()}},(0,E.__)("Clear customizations")),(0,l.createElement)(rv,{availableTemplates:t,template:e,onClick:a})))):null}function lv({area:e,clientId:t}){const{selectBlock:n,toggleBlockHighlight:r}=(0,m.useDispatch)(fe.store),a=(0,m.useSelect)((t=>t(y.store).__experimentalGetDefaultTemplatePartAreas().find((t=>t.area===e))),[e]),s=()=>r(t,!0),i=()=>r(t,!1);return(0,l.createElement)(_.Button,{className:"edit-site-template-card__template-areas-item",icon:a?.icon,onMouseOver:s,onMouseLeave:i,onFocus:s,onBlur:i,onClick:()=>{n(t)}},a?.label)}function cv(){const e=(0,m.useSelect)((e=>e(tr).getCurrentTemplateTemplateParts()),[]);return e.length?(0,l.createElement)("section",{className:"edit-site-template-card__template-areas"},(0,l.createElement)(_.__experimentalHeading,{level:3,className:"edit-site-template-card__template-areas-title"},(0,E.__)("Areas")),(0,l.createElement)("ul",{className:"edit-site-template-card__template-areas-list"},e.map((({templatePart:e,block:t})=>(0,l.createElement)("li",{key:t.clientId},(0,l.createElement)(lv,{area:e.area,clientId:t.clientId})))))):null}const uv={wp_block:cr,wp_navigation:sr};function dv(){var e;const{title:t,description:n,icon:r,record:a}=(0,m.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n}=e(tr),{getEditedEntityRecord:r}=e(ye.store),{__experimentalGetTemplateInfo:a}=e(y.store),s=r("postType",t(),n()),i=a(s);return{title:i.title,description:i.description,icon:i.icon,record:s}}),[]);return t||n?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.PanelBody,null,(0,l.createElement)(Ky,{className:"edit-site-template-card",title:(0,en.decodeEntities)(t),icon:null!==(e=uv[a?.type])&&void 0!==e?e:r,description:(0,en.decodeEntities)(n),actions:(0,l.createElement)(ov,{template:a})},(0,l.createElement)(cv,null))),(0,l.createElement)(y.PostLastRevisionPanel,null),(0,l.createElement)(y.PostTaxonomiesPanel,null),(0,l.createElement)(y.PostFeaturedImagePanel,null),(0,l.createElement)(y.PostExcerptPanel,null),(0,l.createElement)(y.PostDiscussionPanel,null),(0,l.createElement)(y.PageAttributesPanel,null)):null}const{Fill:mv,Slot:pv}=(0,_.createSlotFill)("PluginTemplateSettingPanel"),hv=mv;hv.Slot=pv;const fv=hv,{Tabs:gv}=Xe(_.privateApis),{Slot:yv,Fill:vv}=(0,_.createSlotFill)("EditSiteSidebarInspector"),bv=vv,_v=({sidebarName:e,isEditingPage:t,supportsGlobalStyles:n})=>{const r=(0,g.useRef)(null),a=(0,g.useContext)(gv.Context);return(0,g.useEffect)((()=>{const t=Array.from(r.current?.querySelectorAll('[role="tab"]')||[]),n=t.find((t=>t.getAttribute("data-tab-id")===e)),a=n?.ownerDocument.activeElement;t.some((e=>a&&a.id===e.id))&&n&&n.id!==a?.id&&n?.focus()}),[e]),(0,l.createElement)(l.Fragment,null,(0,l.createElement)(id,{identifier:e,title:(0,E.__)("Settings"),icon:(0,E.isRTL)()?zu:Hu,closeLabel:(0,E.__)("Close Settings"),header:(0,l.createElement)(gv.Context.Provider,{value:a},(0,l.createElement)(Yy,{ref:r})),headerClassName:"edit-site-sidebar-edit-mode__panel-tabs",className:"edit-site-sidebar__panel"},(0,l.createElement)(gv.Context.Provider,{value:a},(0,l.createElement)(gv.TabPanel,{tabId:jy,focusable:!1},t?(0,l.createElement)(nv,null):(0,l.createElement)(dv,null),(0,l.createElement)(fv.Slot,null)),(0,l.createElement)(gv.TabPanel,{tabId:Zy,focusable:!1},(0,l.createElement)(yv,{bubblesVirtually:!0})))),n&&(0,l.createElement)(Wy,null))};function Ev(){const{sidebar:e,isEditorSidebarOpened:t,hasBlockSelection:n,supportsGlobalStyles:r,isEditingPage:a,isEditorOpen:s}=(0,m.useSelect)((e=>{const t=e(j).getActiveComplementaryArea(Qt),n=[Zy,jy].includes(t),{getCanvasMode:r}=Xe(e(tr));return{sidebar:t,isEditorSidebarOpened:n,hasBlockSelection:!!e(fe.store).getBlockSelectionStart(),supportsGlobalStyles:e(ye.store).getCurrentTheme()?.is_block_theme,isEditingPage:e(tr).isPage(),isEditorOpen:"edit"===r()}}),[]),{enableComplementaryArea:i}=(0,m.useDispatch)(j);(0,g.useEffect)((()=>{t&&(n?a||i(Qt,Zy):i(Qt,jy))}),[n,t,a,i]);let o=e;t||(o=n?Zy:jy);const c=(0,g.useCallback)((e=>{e&&i(Qt,e)}),[i]);return(0,l.createElement)(gv,{selectedTabId:s&&t?o:null,onSelect:c,selectOnMove:!1},(0,l.createElement)(_v,{sidebarName:o,isEditingPage:a,supportsGlobalStyles:r}))}var wv=a(4132);function Sv(){const e=(0,ie.useInstanceId)(Sv),{shortcut:t,content:n,blocks:r,type:a,id:s}=(0,m.useSelect)((e=>{const{getEditedEntityRecord:t}=e(ye.store),{getEditedPostType:n,getEditedPostId:r}=e(tr),{getShortcutRepresentation:a}=e(nr.store),s=n(),i=r(),o=t("postType",s,i);return{shortcut:a("core/edit-site/toggle-mode"),content:o?.content,blocks:o?.blocks,type:s,id:i}}),[]),{editEntityRecord:i}=(0,m.useDispatch)(ye.store),o=(0,g.useMemo)((()=>n instanceof Function?n({blocks:r}):r?(0,u.__unstableSerializeAndClean)(r):n),[n,r]),{switchEditorMode:c}=(0,m.useDispatch)(tr);return(0,l.createElement)("div",{className:"edit-site-code-editor"},(0,l.createElement)("div",{className:"edit-site-code-editor__toolbar"},(0,l.createElement)("h2",null,(0,E.__)("Editing code")),(0,l.createElement)(_.Button,{variant:"tertiary",onClick:()=>c("visual"),shortcut:t},(0,E.__)("Exit code editor"))),(0,l.createElement)("div",{className:"edit-site-code-editor__body"},(0,l.createElement)(_.VisuallyHidden,{as:"label",htmlFor:`code-editor-text-area-${e}`},(0,E.__)("Type text or HTML")),(0,l.createElement)(wv.A,{autoComplete:"off",dir:"auto",value:o,onChange:e=>{i("postType",a,s,{content:e.target.value,blocks:void 0,selection:void 0})},className:"edit-site-code-editor-text-area",id:`code-editor-text-area-${e}`,placeholder:(0,E.__)("Start writing with text or HTML")})))}const xv=function(){const{getEditorMode:e}=(0,m.useSelect)(tr),t=(0,m.useSelect)((e=>e(j).getActiveComplementaryArea(tr.name)===Zy),[]),{switchEditorMode:n,toggleDistractionFree:r}=(0,m.useDispatch)(tr),{enableComplementaryArea:a,disableComplementaryArea:s}=(0,m.useDispatch)(j),{replaceBlocks:i}=(0,m.useDispatch)(fe.store),{getBlockName:o,getSelectedBlockClientId:l,getBlockAttributes:c}=(0,m.useSelect)(fe.store),d=(e,t)=>{e.preventDefault();const n=0===t?"core/paragraph":"core/heading",r=l();if(null===r)return;const a=o(r);if("core/paragraph"!==a&&"core/heading"!==a)return;const s=c(r),d="core/paragraph"===a?"align":"textAlign",m="core/paragraph"===n?"align":"textAlign";i(r,(0,u.createBlock)(n,{level:t,content:s.content,[m]:s[d]}))};return(0,nr.useShortcut)("core/edit-site/toggle-block-settings-sidebar",(e=>{e.preventDefault(),t?s(Qt):a(Qt,Zy)})),(0,nr.useShortcut)("core/edit-site/toggle-mode",(()=>{n("visual"===e()?"text":"visual")})),(0,nr.useShortcut)("core/edit-site/transform-heading-to-paragraph",(e=>d(e,0))),[1,2,3,4,5,6].forEach((e=>{(0,nr.useShortcut)(`core/edit-site/transform-paragraph-to-heading-${e}`,(t=>d(t,e)))})),(0,nr.useShortcut)("core/edit-site/toggle-distraction-free",(()=>{r()})),null};function Cv({nonAnimatedSrc:e,animatedSrc:t}){return(0,l.createElement)("picture",{className:"edit-site-welcome-guide__image"},(0,l.createElement)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,l.createElement)("img",{src:t,width:"312",height:"240",alt:""}))}function kv(){const{toggle:e}=(0,m.useDispatch)(T.store);return(0,m.useSelect)((e=>!!e(T.store).get("core/edit-site","welcomeGuide")),[])?(0,l.createElement)(_.Guide,{className:"edit-site-welcome-guide guide-editor",contentLabel:(0,E.__)("Welcome to the site editor"),finishButtonText:(0,E.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuide"),pages:[{image:(0,l.createElement)(Cv,{nonAnimatedSrc:"https://s.w.org/images/block-editor/edit-your-site.svg?1",animatedSrc:"https://s.w.org/images/block-editor/edit-your-site.gif?1"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,E.__)("Edit your site")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,E.__)("Design everything on your site — from the header right down to the footer — using blocks.")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,g.createInterpolateElement)((0,E.__)("Click <StylesIconImage /> to start designing your blocks, and choose your typography, layout, and colors."),{StylesIconImage:(0,l.createElement)("img",{alt:(0,E.__)("styles"),src:"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z' fill='%231E1E1E'/%3E%3C/svg%3E%0A"})})))}]}):null}function Tv(){const{toggle:e}=(0,m.useDispatch)(T.store),{isActive:t,isStylesOpen:n}=(0,m.useSelect)((e=>{const t=e(j).getActiveComplementaryArea(tr.name);return{isActive:!!e(T.store).get("core/edit-site","welcomeGuideStyles"),isStylesOpen:"edit-site/global-styles"===t}}),[]);if(!t||!n)return null;const r=(0,E.__)("Welcome to Styles");return(0,l.createElement)(_.Guide,{className:"edit-site-welcome-guide guide-styles",contentLabel:r,finishButtonText:(0,E.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuideStyles"),pages:[{image:(0,l.createElement)(Cv,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.svg?1",animatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.gif?1"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},r),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,E.__)("Tweak your site, or give it a whole new look! Get creative — how about a new color palette for your buttons, or choosing a new font? Take a look at what you can do here.")))},{image:(0,l.createElement)(Cv,{nonAnimatedSrc:"https://s.w.org/images/block-editor/set-the-design.svg?1",animatedSrc:"https://s.w.org/images/block-editor/set-the-design.gif?1"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,E.__)("Set the design")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,E.__)("You can customize your site as much as you like with different colors, typography, and layouts. Or if you prefer, just leave it up to your theme to handle!")))},{image:(0,l.createElement)(Cv,{nonAnimatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.svg?1",animatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.gif?1"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,E.__)("Personalize blocks")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,E.__)("You can adjust your blocks to ensure a cohesive experience across your site — add your unique colors to a branded Button block, or adjust the Heading block to your preferred size.")))},{image:(0,l.createElement)(Cv,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,E.__)("Learn more")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,E.__)("New to block themes and styling your site?")," ",(0,l.createElement)(_.ExternalLink,{href:(0,E.__)("https://wordpress.org/documentation/article/styles-overview/")},(0,E.__)("Here’s a detailed guide to learn how to make the most of it."))))}]})}function Pv(){const{toggle:e}=(0,m.useDispatch)(T.store),t=(0,m.useSelect)((e=>{const t=!!e(T.store).get("core/edit-site","welcomeGuidePage"),n=!!e(T.store).get("core/edit-site","welcomeGuide"),{isPage:r}=e(tr);return t&&!n&&r()}),[]);if(!t)return null;const n=(0,E.__)("Editing a page");return(0,l.createElement)(_.Guide,{className:"edit-site-welcome-guide guide-page",contentLabel:n,finishButtonText:(0,E.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuidePage"),pages:[{image:(0,l.createElement)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240"},(0,l.createElement)("source",{src:"https://s.w.org/images/block-editor/editing-your-page.mp4",type:"video/mp4"})),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},n),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,E.__)("It’s now possible to edit page content in the site editor. To customise other parts of the page like the header and footer switch to editing the template using the settings sidebar.")))}]})}function Iv(){const{toggle:e}=(0,m.useDispatch)(T.store),t=(0,m.useSelect)((e=>{const t=!!e(T.store).get("core/edit-site","welcomeGuideTemplate"),n=!!e(T.store).get("core/edit-site","welcomeGuide"),{isPage:r}=e(tr),{getCurrentPostType:a}=e(y.store);return t&&!n&&r()&&"wp_template"===a()}),[]);if(!t)return null;const n=(0,E.__)("Editing a template");return(0,l.createElement)(_.Guide,{className:"edit-site-welcome-guide guide-template",contentLabel:n,finishButtonText:(0,E.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuideTemplate"),pages:[{image:(0,l.createElement)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240"},(0,l.createElement)("source",{src:"https://s.w.org/images/block-editor/editing-your-template.mp4",type:"video/mp4"})),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},n),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,E.__)("Note that the same template can be used by multiple pages, so any changes made here may affect other pages on the site. To switch back to editing the page content click the ‘Back’ button in the toolbar.")))}]})}function Mv(){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(kv,null),(0,l.createElement)(Tv,null),(0,l.createElement)(Pv,null),(0,l.createElement)(Iv,null))}function Av(e){const{slug:t,patterns:n}=(0,m.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n}=e(tr),{getEntityRecord:r,getBlockPatterns:a}=e(ye.store),s=n();return{slug:r("postType",t(),s).slug,patterns:a()}}),[]),r=(0,m.useSelect)((e=>e(ye.store).getCurrentTheme().stylesheet));return(0,g.useMemo)((()=>[{name:"fallback",blocks:(0,u.parse)(e),title:(0,E.__)("Fallback content")},...n.filter((e=>Array.isArray(e.templateTypes)&&e.templateTypes.some((e=>t.startsWith(e))))).map((e=>({...e,blocks:(0,u.parse)(e.content).map((e=>function(e){return e.innerBlocks.find((e=>"core/template-part"===e.name))&&(e.innerBlocks=e.innerBlocks.map((e=>("core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=r),e)))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=r),e}(e)))})))]),[e,t,n])}function Ov({fallbackContent:e,onChoosePattern:t,postType:n}){const[,,r]=(0,ye.useEntityBlockEditor)("postType",n),a=Av(e),s=(0,ie.useAsyncList)(a);return(0,l.createElement)(fe.__experimentalBlockPatternsList,{blockPatterns:a,shownPatterns:s,onClickPattern:(e,n)=>{r(n,{selection:void 0}),t()}})}function Nv({slug:e,isCustom:t,onClose:n,postType:r}){const a=function(e,t=!1){return(0,m.useSelect)((n=>{const{getEntityRecord:r,getDefaultTemplateId:a}=n(ye.store),s=a({slug:e,is_custom:t,ignore_empty:!0});return s?r("postType",Ct,s)?.content?.raw:void 0}),[e,t])}(e,t);return a?(0,l.createElement)(_.Modal,{className:"edit-site-start-template-options__modal",title:(0,E.__)("Choose a pattern"),closeLabel:(0,E.__)("Cancel"),focusOnMount:"firstElement",onRequestClose:n,isFullScreen:!0},(0,l.createElement)("div",{className:"edit-site-start-template-options__modal-content"},(0,l.createElement)(Ov,{fallbackContent:a,slug:e,isCustom:t,postType:r,onChoosePattern:()=>{n()}})),(0,l.createElement)(_.Flex,{className:"edit-site-start-template-options__modal__actions",justify:"flex-end",expanded:!1},(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.Button,{variant:"tertiary",onClick:n},(0,E.__)("Skip"))))):null}const Fv={INITIAL:"INITIAL",CLOSED:"CLOSED"};function Rv(){const[e,t]=(0,g.useState)(Fv.INITIAL),{shouldOpenModal:n,slug:r,isCustom:a,postType:s}=(0,m.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n}=e(tr),r=t(),a=n(),{getEditedEntityRecord:s,hasEditsForEntityRecord:i}=e(ye.store),o=s("postType",r,a);return{shouldOpenModal:!i("postType",r,a)&&""===o.content&&Ct===r&&!e(T.store).get("core/edit-site","welcomeGuide"),slug:o.slug,isCustom:o.is_custom,postType:r}}),[]);return e===Fv.INITIAL&&!n||e===Fv.CLOSED?null:(0,l.createElement)(Nv,{slug:r,isCustom:a,postType:s,onClose:()=>t(Fv.CLOSED)})}const{useGlobalStylesOutput:Dv}=Xe(fe.privateApis);function Vv(){return function(){const[e,t]=Dv(),{getSettings:n}=(0,m.useSelect)(tr),{updateSettings:r}=(0,m.useDispatch)(tr);(0,g.useEffect)((()=>{var a;if(!e||!t)return;const s=n(),i=Object.values(null!==(a=s.styles)&&void 0!==a?a:[]).filter((e=>!e.isGlobalStyles));r({...s,styles:[...i,...e],__experimentalFeatures:t})}),[e,t,r,n])}(),null}const{useLocation:Lv}=Xe(gt.privateApis);const{ProgressBar:Bv,Theme:zv}=Xe(_.privateApis),{useGlobalStyle:Hv}=Xe(fe.privateApis);function Gv({id:e}){var t;const[n]=Hv("color.text"),[r]=Hv("color.background"),{highlightedColors:a}=$e(),s=null!==(t=a[0]?.color)&&void 0!==t?t:n,{elapsed:i,total:o}=(0,m.useSelect)((e=>{var t,n;const r=e(ye.store).countSelectorsByStatus(),a=null!==(t=r.resolving)&&void 0!==t?t:0,s=null!==(n=r.finished)&&void 0!==n?n:0;return{elapsed:s,total:s+a}}),[]);return(0,l.createElement)("div",{className:"edit-site-canvas-loader"},(0,l.createElement)(zv,{accent:s,background:r},(0,l.createElement)(Bv,{id:e,max:o,value:i})))}const{EditorCanvas:Uv}=Xe(y.privateApis);const Wv=function({enableResizing:e,settings:t,children:n,...r}){const{hasBlocks:a,isFocusMode:s,templateType:i,canvasMode:o,isZoomOutMode:c}=(0,m.useSelect)((e=>{const{getBlockCount:t,__unstableGetEditorMode:n}=e(fe.store),{getEditedPostType:r,getCanvasMode:a}=Xe(e(tr)),s=r();return{templateType:s,isFocusMode:Ft.includes(s),isZoomOutMode:"zoom-out"===n(),canvasMode:a(),hasBlocks:!!t()}}),[]),{setCanvasMode:u}=Xe((0,m.useDispatch)(tr)),[d,p]=(0,g.useState)(!1);(0,g.useEffect)((()=>{"edit"===o&&p(!1)}),[o]);const h={"aria-label":(0,E.__)("Editor Canvas"),role:"button",tabIndex:0,onFocus:()=>p(!0),onBlur:()=>p(!1),onKeyDown:e=>{const{keyCode:t}=e;t!==wr.ENTER&&t!==wr.SPACE||(e.preventDefault(),u("edit"))},onClick:()=>u("edit"),readonly:!0},f=i===xt,y=!(f&&s&&a||"view"===o)&&void 0,v=(0,g.useMemo)((()=>[...t.styles,{css:`.is-root-container{display:flow-root;${e?"min-height:0!important;":""}}body{position:relative; ${"view"===o?"cursor: pointer; min-height: 100vh;":""}}}`}]),[t.styles,e,o]);return(0,l.createElement)(Uv,{className:b()("edit-site-editor-canvas__block-list",{"is-navigation-block":f}),renderAppender:y,styles:v,iframeProps:{expand:c,scale:c?.45:void 0,frameSize:c?100:void 0,className:b()("edit-site-visual-editor__editor-canvas",{"is-focused":d&&"view"===o}),...r,..."view"===o?h:{}}},n)},{useHistory:jv}=Xe(gt.privateApis);const{useBlockEditorSettings:Zv}=Xe(y.privateApis),{useLocation:qv,useHistory:Yv}=Xe(gt.privateApis);function Kv(){const e=function(){const e=jv();return(0,g.useCallback)((t=>{e.push({...t,focusMode:!0,canvas:"edit"})}),[e])}(),{templateSlug:t,canvasMode:n,settings:r,postWithTemplate:a}=(0,m.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n,getEditedPostContext:r,getCanvasMode:a,getSettings:s}=Xe(e(tr)),{getEditedEntityRecord:i}=e(ye.store),o=i("postType",t(),n()),l=r();return{templateSlug:o.slug,canvasMode:a(),settings:s(),postWithTemplate:l?.postId}}),[]),s=function(e){const t=e?.match(/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/);let n,r,a,s=!1;if(t)t[1]?n=t[2]?t[2]:t[1]:t[3]&&(n=t[6]?t[6]:t[4],r=t[7]),n="tag"===n?"post_tag":n;else{const t=e?.match(/^(author)$|^author-(.+)$/);t&&(s=!0,t[2]&&(a=t[2]))}return(0,m.useSelect)((e=>{const{getEntityRecords:t,getTaxonomy:i,getAuthors:o}=e(ye.store);let l,c;if(n&&(l=i(n)?.labels?.singular_name),r){const e=t("taxonomy",n,{slug:r,per_page:1});e&&e[0]&&(c=e[0].name)}if(s&&(l="Author",a)){const e=o({slug:a});e&&e[0]&&(c=e[0].name)}return{archiveTypeLabel:l,archiveNameLabel:c}}),[a,s,n,r])}(t),i=a?"template-locked":"post-only",o=function(){const e=qv(),t=(0,ie.usePrevious)(e),n=Yv();return(0,g.useMemo)((()=>{const r=e.params.focusMode||e.params.postId&&Ft.includes(e.params.postType),a="edit"===t?.params.canvas;return r&&a?()=>n.back():void 0}),[e,n])}();return(0,g.useMemo)((()=>({...r,richEditingEnabled:!0,supportsTemplateMode:!0,focusMode:"view"!==n,defaultRenderingMode:i,onNavigateToEntityRecord:e,onNavigateToPreviousEntityRecord:o,__experimentalArchiveTitleTypeLabel:s.archiveTypeLabel,__experimentalArchiveTitleNameLabel:s.archiveNameLabel})),[r,n,i,e,o,s.archiveTypeLabel,s.archiveNameLabel])}const{useLocation:Xv}=Xe(gt.privateApis);function Jv(){const e=Xv(),{templateType:t,isFocusableEntity:n,isViewMode:r}=(0,m.useSelect)((e=>{const{getEditedPostType:t,getCanvasMode:n}=Xe(e(tr)),r=t();return{templateType:r,isFocusableEntity:Ft.includes(r),isViewMode:"view"===n()}}),[]),a=e.params.focusMode||n,[s,i]=(0,ie.useResizeObserver)(),o=function(){const e=Kv(),{postType:t,postId:n}=(0,m.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n}=Xe(e(tr));return{postType:t(),postId:n()}}),[]);return Zv(e,t,n)}(),c=(0,ie.useViewportMatch)("small","<"),u=a&&!r&&!c&&t!==Ct,d=t===xt&&a;return(0,l.createElement)($r.Slot,null,(([e])=>e?(0,l.createElement)("div",{className:"edit-site-visual-editor is-focus-mode"},e):(0,l.createElement)("div",{className:b()("edit-site-visual-editor",{"is-focus-mode":a||!!e,"is-view-mode":r})},(0,l.createElement)(Zr,{enableResizing:u,height:i.height&&!d?i.height:"100%"},(0,l.createElement)(Wv,{enableResizing:u,settings:o},s)))))}function Qv({clientId:e,onClose:t}){const{getBlocks:n}=(0,m.useSelect)(fe.store),{replaceBlocks:r}=(0,m.useDispatch)(fe.store);return(0,m.useSelect)((t=>t(fe.store).canRemoveBlock(e)),[e])?(0,l.createElement)(_.MenuItem,{onClick:()=>{r(e,n(e)),t()}},(0,E.__)("Detach")):null}function $v({clientIds:e,blocks:t}){const[n,r]=(0,g.useState)(!1),{replaceBlocks:a}=(0,m.useDispatch)(fe.store),{createSuccessNotice:s}=(0,m.useDispatch)(ge.store),{canCreate:i}=(0,m.useSelect)((e=>{const{supportsTemplatePartsMode:t}=e(tr).getSettings();return{canCreate:!t}}),[]);if(!i)return null;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{icon:Ks,onClick:()=>{r(!0)},"aria-expanded":n,"aria-haspopup":"dialog"},(0,E.__)("Create template part")),n&&(0,l.createElement)(ei,{closeModal:()=>{r(!1)},blocks:t,onCreate:async t=>{a(e,(0,u.createBlock)("core/template-part",{slug:t.slug,theme:t.theme})),s((0,E.__)("Template part created."),{type:"snackbar"})}}))}function eb(){return(0,l.createElement)(fe.BlockSettingsMenuControls,null,(({selectedClientIds:e,onClose:t})=>(0,l.createElement)(tb,{clientIds:e,onClose:t})))}function tb({clientIds:e,onClose:t}){const n=(0,m.useSelect)((t=>t(fe.store).getBlocksByClientId(e)),[e]);return 1===n.length&&"core/template-part"===n[0]?.name?(0,l.createElement)(Qv,{clientId:e[0],onClose:t}):(0,l.createElement)($v,{clientIds:e,blocks:n})}const{BlockRemovalWarningModal:nb}=Xe(fe.privateApis),{ExperimentalEditorProvider:rb,InserterSidebar:ab,ListViewSidebar:sb}=Xe(y.privateApis),ib={body:(0,E.__)("Editor content"),sidebar:(0,E.__)("Editor settings"),actions:(0,E.__)("Editor publish"),footer:(0,E.__)("Editor footer")},ob={"core/query":(0,E.__)("Query Loop displays a list of posts or pages."),"core/post-content":(0,E.__)("Post Content displays the content of a post or page."),"core/post-template":(0,E.__)("Post Template displays each post or page in a Query Loop."),"bindings/core/pattern-overrides":(0,E.__)("Blocks from synced patterns that can have overriden content.")};function lb({isLoading:e}){const{record:t,getTitle:n,isLoaded:r}=Ds(),{type:a}=t,s=(0,ie.useViewportMatch)("medium"),{context:i,contextPost:o,editorMode:c,canvasMode:u,blockEditorMode:d,isRightSidebarOpen:p,isInserterOpen:h,isListViewOpen:f,isDistractionFree:v,showIconLabels:w,showBlockBreadcrumbs:S,postTypeLabel:x}=(0,m.useSelect)((e=>{const{get:t}=e(T.store),{getEditedPostContext:n,getEditorMode:r,getCanvasMode:a}=Xe(e(tr)),{__unstableGetEditorMode:s}=e(fe.store),{getActiveComplementaryArea:i}=e(j),{getEntityRecord:o}=e(ye.store),{isInserterOpened:l,isListViewOpened:c,getPostTypeLabel:u}=e(y.store),d=n();return{context:d,contextPost:d?.postId?o("postType",d.postType,d.postId):void 0,editorMode:r(),canvasMode:a(),blockEditorMode:s(),isInserterOpen:l(),isListViewOpen:c(),isRightSidebarOpen:i(tr.name),isDistractionFree:t("core","distractionFree"),showBlockBreadcrumbs:t("core","showBlockBreadcrumbs"),showIconLabels:t("core","showIconLabels"),postTypeLabel:u()}}),[]),C="edit"===u,k="view"===u||"visual"===c,P=!v&&S&&C&&k&&"zoom-out"!==d,I=C&&k&&h,M=C&&k&&f,A=f?(0,E.__)("List View"):(0,E.__)("Block Library"),O=!!i?.postId;let N;var F;r&&(N=(0,E.sprintf)((0,E.__)("%1$s ‹ %2$s"),n(),null!==(F=Rt[a])&&void 0!==F?F:Rt[Ct]));!function(e){const t=Lv(),n=(0,m.useSelect)((e=>e(ye.store).getEntityRecord("root","site")?.title),[]),r=(0,g.useRef)(!0);(0,g.useEffect)((()=>{r.current=!1}),[t]),(0,g.useEffect)((()=>{if(!r.current&&e&&n){const t=(0,E.sprintf)((0,E.__)("%1$s ‹ %2$s ‹ Editor — WordPress"),(0,en.decodeEntities)(e),(0,en.decodeEntities)(n));document.title=t,(0,Jt.speak)(e,"assertive")}}),[e,n,t])}(r&&N);const R=(0,ie.useInstanceId)(Gv,"edit-site-editor__loading-progress"),D=Kv(),V=!e&&(O&&!!o&&!!t||!O&&!!t);return(0,l.createElement)(l.Fragment,null,V?null:(0,l.createElement)(Gv,{id:R}),C&&(0,l.createElement)(Mv,null),r&&!t&&(0,l.createElement)(_.Notice,{status:"warning",isDismissible:!1},(0,E.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")),V&&(0,l.createElement)(rb,{post:O?o:t,__unstableTemplate:O?t:void 0,settings:D,useSubRegistry:!1},(0,l.createElement)(Ev,null),C&&(0,l.createElement)(Rv,null),(0,l.createElement)(ce,{isDistractionFree:v,enableRegionNavigation:!1,className:b()("edit-site-editor__interface-skeleton",{"show-icon-labels":w}),notices:(0,l.createElement)(y.EditorSnackbars,null),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Vv,null),C&&(0,l.createElement)(y.EditorNotices,null),k&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(eb,null),(0,l.createElement)(bv,null,(0,l.createElement)(fe.BlockInspector,null)),!s&&(0,l.createElement)(fe.BlockToolbar,{hideDragHandle:!0}),(0,l.createElement)(Jv,null),(0,l.createElement)(nb,{rules:ob}),(0,l.createElement)(Ju,null)),"text"===c&&C&&(0,l.createElement)(Sv,null),C&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(xv,null),(0,l.createElement)(y.EditorKeyboardShortcutsRegister,null),(0,l.createElement)(y.EditorKeyboardShortcuts,null))),secondarySidebar:C&&(I&&(0,l.createElement)(ab,null)||M&&(0,l.createElement)(sb,null)),sidebar:!v&&C&&p&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(se.Slot,{scope:"core/edit-site"})),footer:P&&(0,l.createElement)(fe.BlockBreadcrumb,{rootLabelText:x}),labels:{...ib,secondarySidebar:A}})))}const cb=(0,g.memo)((function({view:e,onChangeView:t,paginationInfo:{totalItems:n=0,totalPages:r}}){return n&&r?!!n&&1!==r&&(0,l.createElement)(_.__experimentalHStack,{expanded:!1,spacing:6,justify:"end",className:"dataviews-pagination"},(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:2,className:"dataviews-pagination__page-selection"},(0,g.createInterpolateElement)((0,E.sprintf)((0,E._x)("Page <CurrentPageControl /> of %s","paging"),r),{CurrentPageControl:(0,l.createElement)(_.SelectControl,{"aria-label":(0,E.__)("Current page"),value:e.page,options:Array.from(Array(r)).map(((e,t)=>{const n=t+1;return{value:n,label:n}})),onChange:n=>{t({...e,page:+n})},size:"compact",__nextHasNoMarginBottom:!0})})),(0,l.createElement)(_.__experimentalHStack,{expanded:!1,spacing:1},(0,l.createElement)(_.Button,{onClick:()=>t({...e,page:e.page-1}),disabled:1===e.page,__experimentalIsFocusable:!0,label:(0,E.__)("Previous page"),icon:dr,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,l.createElement)(_.Button,{onClick:()=>t({...e,page:e.page+1}),disabled:e.page>=r,__experimentalIsFocusable:!0,label:(0,E.__)("Next page"),icon:ur,showTooltip:!0,size:"compact",tooltipPosition:"top"}))):null})),ub=cb,{DropdownMenuV2:db,DropdownMenuGroupV2:mb,DropdownMenuItemV2:pb,DropdownMenuRadioItemV2:hb,DropdownMenuCheckboxItemV2:fb,DropdownMenuItemLabelV2:gb}=Vo(_.privateApis);function yb({view:e,onChangeView:t,supportedLayouts:n}){let r=Pl;if(n&&(r=r.filter((e=>n.includes(e.type)))),1===r.length)return null;const a=r.find((t=>e.type===t.type));return(0,l.createElement)(db,{trigger:(0,l.createElement)(pb,{suffix:(0,l.createElement)("span",{"aria-hidden":"true"},a.label)},(0,l.createElement)(gb,null,(0,E.__)("Layout")))},r.map((n=>(0,l.createElement)(hb,{key:n.type,value:n.type,name:"view-actions-available-view",checked:n.type===e.type,hideOnClick:!0,onChange:n=>{t({...e,type:n.target.value})}},(0,l.createElement)(gb,null,n.label)))))}const vb=[10,20,50,100];function bb({view:e,onChangeView:t}){return(0,l.createElement)(db,{trigger:(0,l.createElement)(pb,{suffix:(0,l.createElement)("span",{"aria-hidden":"true"},e.perPage)},(0,l.createElement)(gb,null,(0,E.__)("Items per page")))},vb.map((n=>(0,l.createElement)(hb,{key:n,value:n,name:"view-actions-page-size",checked:e.perPage===n,onChange:()=>{t({...e,perPage:n,page:1})}},(0,l.createElement)(gb,null,n)))))}function _b({view:e,onChangeView:t,fields:n}){const r=n.filter((t=>!1!==t.enableHiding&&t.id!==e.layout.mediaField));return r?.length?(0,l.createElement)(db,{trigger:(0,l.createElement)(pb,null,(0,l.createElement)(gb,null,(0,E.__)("Fields")))},r?.map((n=>(0,l.createElement)(fb,{key:n.id,value:n.id,checked:!e.hiddenFields?.includes(n.id),onChange:()=>{t({...e,hiddenFields:e.hiddenFields?.includes(n.id)?e.hiddenFields.filter((e=>e!==n.id)):[...e.hiddenFields||[],n.id]})}},(0,l.createElement)(gb,null,n.header))))):null}function Eb({fields:e,view:t,onChangeView:n}){const r=e.filter((e=>!1!==e.enableSorting));if(!r?.length)return null;const a=e.find((e=>e.id===t.sort?.field));return(0,l.createElement)(db,{trigger:(0,l.createElement)(pb,{suffix:(0,l.createElement)("span",{"aria-hidden":"true"},a?.header)},(0,l.createElement)(gb,null,(0,E.__)("Sort by")))},r?.map((e=>{const r=t.sort?.direction;return(0,l.createElement)(db,{key:e.id,trigger:(0,l.createElement)(pb,null,(0,l.createElement)(gb,null,e.header)),style:{minWidth:"220px"}},Object.entries(Cl).map((([s,i])=>{const o=void 0!==a&&r===s&&e.id===a.id,c=`${e.id}-${s}`;return(0,l.createElement)(hb,{key:c,name:"view-actions-sorting",value:c,checked:o,onChange:()=>{n({...t,sort:{field:e.id,direction:s}})}},(0,l.createElement)(gb,null,i.label))})))})))}const wb=(0,g.memo)((function({fields:e,view:t,onChangeView:n,supportedLayouts:r}){return(0,l.createElement)(db,{trigger:(0,l.createElement)(_.Button,{size:"compact",icon:nm,label:(0,E.__)("View options")})},(0,l.createElement)(mb,null,(0,l.createElement)(yb,{view:t,onChangeView:n,supportedLayouts:r}),(0,l.createElement)(Eb,{fields:e,view:t,onChangeView:n}),(0,l.createElement)(_b,{fields:e,view:t,onChangeView:n}),(0,l.createElement)(bb,{view:t,onChangeView:n})))}));var Sb=Object.defineProperty,xb=Object.defineProperties,Cb=Object.getOwnPropertyDescriptors,kb=Object.getOwnPropertySymbols,Tb=Object.prototype.hasOwnProperty,Pb=Object.prototype.propertyIsEnumerable,Ib=(e,t,n)=>t in e?Sb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mb=(e,t)=>{for(var n in t||(t={}))Tb.call(t,n)&&Ib(e,n,t[n]);if(kb)for(var n of kb(t))Pb.call(t,n)&&Ib(e,n,t[n]);return e},Ab=(e,t)=>xb(e,Cb(t)),Ob=(e,t)=>{var n={};for(var r in e)Tb.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&kb)for(var r of kb(e))t.indexOf(r)<0&&Pb.call(e,r)&&(n[r]=e[r]);return n},Nb=Object.defineProperty,Fb=Object.defineProperties,Rb=Object.getOwnPropertyDescriptors,Db=Object.getOwnPropertySymbols,Vb=Object.prototype.hasOwnProperty,Lb=Object.prototype.propertyIsEnumerable,Bb=(e,t,n)=>t in e?Nb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zb=(e,t)=>{for(var n in t||(t={}))Vb.call(t,n)&&Bb(e,n,t[n]);if(Db)for(var n of Db(t))Lb.call(t,n)&&Bb(e,n,t[n]);return e},Hb=(e,t)=>Fb(e,Rb(t)),Gb=(e,t)=>{var n={};for(var r in e)Vb.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Db)for(var r of Db(e))t.indexOf(r)<0&&Lb.call(e,r)&&(n[r]=e[r]);return n};function Ub(...e){}function Wb(e,t){return"function"==typeof Object.hasOwn?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function jb(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}function Zb(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function qb(e){return e}function Yb(e,t){if(!e){if("string"!=typeof t)throw new Error("Invariant failed");throw new Error(t)}}function Kb(e){return e.disabled||!0===e["aria-disabled"]||"true"===e["aria-disabled"]}function Xb(...e){for(const t of e)if(void 0!==t)return t}function Jb(e){return function(e){return!!e&&!!(0,l.isValidElement)(e)&&"ref"in e}(e)?e.ref:null}var Qb,$b="undefined"!=typeof window&&!!(null==(Qb=window.document)?void 0:Qb.createElement);function e_(e){return e?e.ownerDocument||e:document}function t_(e,t=!1){const{activeElement:n}=e_(e);if(!(null==n?void 0:n.nodeName))return null;if("IFRAME"===n.tagName&&n.contentDocument)return t_(n.contentDocument.body,t);if(t){const e=n.getAttribute("aria-activedescendant");if(e){const t=e_(n).getElementById(e);if(t)return t}}return n}function n_(e,t){return e===t||e.contains(t)}function r_(e){const t=e.tagName.toLowerCase();return"button"===t||!("input"!==t||!e.type)&&-1!==a_.indexOf(e.type)}var a_=["button","color","file","image","reset","submit"];function s_(e,t){return"matches"in e?e.matches(t):"msMatchesSelector"in e?e.msMatchesSelector(t):e.webkitMatchesSelector(t)}function i_(e){try{const t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName;return t||n||!1}catch(e){return!1}}function o_(e,t){const n=null==e?void 0:e.getAttribute("role");return n&&-1!==["dialog","menu","listbox","tree","grid"].indexOf(n)?n:t}function l_(e,t){var n;const r=o_(e);if(!r)return t;return null!=(n={menu:"menuitem",listbox:"option",tree:"treeitem",grid:"gridcell"}[r])?n:t}function c_(e){if(!e)return null;if(e.clientHeight&&e.scrollHeight>e.clientHeight){const{overflowY:t}=getComputedStyle(e);if("visible"!==t&&"hidden"!==t)return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){const{overflowX:t}=getComputedStyle(e);if("visible"!==t&&"hidden"!==t)return e}return c_(e.parentElement)||document.scrollingElement||document.body}function u_(e,...t){/text|search|password|tel|url/i.test(e.type)&&e.setSelectionRange(...t)}function d_(){return $b&&!!navigator.maxTouchPoints}function m_(){return!!$b&&/mac|iphone|ipad|ipod/i.test(navigator.platform)}function p_(){return $b&&m_()&&/apple/i.test(navigator.vendor)}function h_(e){return Boolean(e.currentTarget&&!n_(e.currentTarget,e.target))}function f_(e){return e.target===e.currentTarget}function g_(e,t){const n=new FocusEvent("blur",t),r=e.dispatchEvent(n),a=Hb(zb({},t),{bubbles:!0});return e.dispatchEvent(new FocusEvent("focusout",a)),r}function y_(e,t){const n=new MouseEvent("click",t);return e.dispatchEvent(n)}function v_(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!n_(n,r)}function b_(e,t,n){const r=requestAnimationFrame((()=>{e.removeEventListener(t,a,!0),n()})),a=()=>{cancelAnimationFrame(r),n()};return e.addEventListener(t,a,{once:!0,capture:!0}),r}function __(e,t,n,r=window){const a=[];try{r.document.addEventListener(e,t,n);for(const s of Array.from(r.frames))a.push(__(e,t,n,s))}catch(e){}return()=>{try{r.document.removeEventListener(e,t,n)}catch(e){}a.forEach((e=>e()))}}var E_=Mb({},c),w_=E_.useId,S_=(E_.useDeferredValue,E_.useInsertionEffect),x_=$b?l.useLayoutEffect:l.useEffect;function C_(e){const t=(0,l.useRef)(e);return x_((()=>{t.current=e})),t}function k_(e){const t=(0,l.useRef)((()=>{throw new Error("Cannot call an event handler while rendering.")}));return S_?S_((()=>{t.current=e})):t.current=e,(0,l.useCallback)(((...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function T_(...e){return(0,l.useMemo)((()=>{if(e.some(Boolean))return t=>{e.forEach((e=>function(e,t){"function"==typeof e?e(t):e&&(e.current=t)}(e,t)))}}),e)}function P_(e){if(w_){const t=w_();return e||t}const[t,n]=(0,l.useState)(e);return x_((()=>{if(e||t)return;const r=Math.random().toString(36).substr(2,6);n(`id-${r}`)}),[e,t]),e||t}function I_(e,t){const n=e=>{if("string"==typeof e)return e},[r,a]=(0,l.useState)((()=>n(t)));return x_((()=>{const r=e&&"current"in e?e.current:e;a((null==r?void 0:r.tagName.toLowerCase())||n(t))}),[e,t]),r}function M_(e,t){const n=(0,l.useRef)(!1);(0,l.useEffect)((()=>{if(n.current)return e();n.current=!0}),t),(0,l.useEffect)((()=>()=>{n.current=!1}),[])}Symbol("setNextState");function A_(e){return k_("function"==typeof e?e:()=>e)}function O_(e,t,n=[]){const r=(0,l.useCallback)((n=>(e.wrapElement&&(n=e.wrapElement(n)),t(n))),[...n,e.wrapElement]);return Ab(Mb({},e),{wrapElement:r})}var N_=!1,F_=0,R_=0;function D_(e){(function(e){const t=e.movementX||e.screenX-F_,n=e.movementY||e.screenY-R_;return F_=e.screenX,R_=e.screenY,t||n||!1})(e)&&(N_=!0)}function V_(){N_=!1}function L_(e,t){const n=e.__unstableInternals;return Yb(n,"Invalid store"),n[t]}function B_(e,...t){let n=e,r=n,a=Symbol(),s=Ub;const i=new Set,o=new Set,l=new Set,c=new Set,u=new Set,d=new WeakMap,m=new WeakMap,p=(e,t,n=c)=>(n.add(t),m.set(t,e),()=>{var e;null==(e=d.get(t))||e(),d.delete(t),m.delete(t),n.delete(t)}),h=(e,s,i=!1)=>{if(!Wb(n,e))return;const l=function(e,t){if(function(e){return"function"==typeof e}(e))return e(function(e){return"function"==typeof e}(t)?t():t);return e}(s,n[e]);if(l===n[e])return;i||t.forEach((t=>{var n;null==(n=null==t?void 0:t.setState)||n.call(t,e,l)}));const p=n;n=Hb(zb({},n),{[e]:l});const h=Symbol();a=h,o.add(e);const f=(t,r,a)=>{var s;const i=m.get(t);i&&!i.some((t=>a?a.has(t):t===e))||(null==(s=d.get(t))||s(),d.set(t,t(n,r)))};c.forEach((e=>{f(e,p)})),queueMicrotask((()=>{if(a!==h)return;const e=n;u.forEach((e=>{f(e,r,o)})),r=e,o.clear()}))},f={getState:()=>n,setState:h,__unstableInternals:{setup:e=>(l.add(e),()=>l.delete(e)),init:()=>{const e=i.size,r=Symbol();i.add(r);const a=()=>{i.delete(r),i.size||s()};if(e)return a;const o=(c=n,Object.keys(c)).map((e=>jb(...t.map((t=>{var n;const r=null==(n=null==t?void 0:t.getState)?void 0:n.call(t);if(r&&Wb(r,e))return U_(t,[e],(t=>{h(e,t[e],!0)}))})))));var c;const u=[];l.forEach((e=>u.push(e())));const d=t.map(H_);return s=jb(...o,...u,...d),a},subscribe:(e,t)=>p(e,t),sync:(e,t)=>(d.set(t,t(n,n)),p(e,t)),batch:(e,t)=>(d.set(t,t(n,r)),p(e,t,u)),pick:e=>B_(function(e,t){const n={};for(const r of t)Wb(e,r)&&(n[r]=e[r]);return n}(n,e),f),omit:e=>B_(function(e,t){const n=zb({},e);for(const e of t)Wb(n,e)&&delete n[e];return n}(n,e),f)}};return f}function z_(e,...t){if(e)return L_(e,"setup")(...t)}function H_(e,...t){if(e)return L_(e,"init")(...t)}function G_(e,...t){if(e)return L_(e,"subscribe")(...t)}function U_(e,...t){if(e)return L_(e,"sync")(...t)}function W_(e,...t){if(e)return L_(e,"batch")(...t)}function j_(e,...t){if(e)return L_(e,"omit")(...t)}function Z_(...e){const t=e.reduce(((e,t)=>{var n;const r=null==(n=null==t?void 0:t.getState)?void 0:n.call(t);return r?zb(zb({},e),r):e}),{});return B_(t,...e)}var q_=a(422),{useSyncExternalStore:Y_}=q_,K_=()=>()=>{};function X_(e,t=qb){const n=l.useCallback((t=>e?G_(e,null,t):K_()),[e]),r=()=>{const n="string"==typeof t?t:null,r="function"==typeof t?t:null,a=null==e?void 0:e.getState();return r?r(a):a&&n&&Wb(a,n)?a[n]:void 0};return Y_(n,r,r)}function J_(e,t,n,r){const a=Wb(t,n)?t[n]:void 0,s=r?t[r]:void 0,i=C_({value:a,setValue:s});x_((()=>U_(e,[n],((e,t)=>{const{value:r,setValue:a}=i.current;a&&e[n]!==t[n]&&e[n]!==r&&a(e[n])}))),[e,n]),x_((()=>{if(void 0!==a)return e.setState(n,a),W_(e,[n],(()=>{void 0!==a&&e.setState(n,a)}))}))}function Q_(e,t,n){return M_(t,[n.store]),J_(e,n,"items","setItems"),e}function $_(e,t,n){return J_(e=Q_(e,t,n),n,"activeId","setActiveId"),J_(e,n,"includesBaseElement"),J_(e,n,"virtualFocus"),J_(e,n,"orientation"),J_(e,n,"rtl"),J_(e,n,"focusLoop"),J_(e,n,"focusWrap"),J_(e,n,"focusShift"),e}function eE(e,t,n){return M_(t,[n.store,n.disclosure]),J_(e,n,"open","setOpen"),J_(e,n,"mounted","setMounted"),J_(e,n,"animated"),e}function tE(e,t,n){return eE(e,t,n)}function nE(e,t,n){return M_(t,[n.popover]),J_(e=tE(e,t,n),n,"placement"),e}function rE(e={}){return function(e={}){const t=Z_(e.store,j_(e.disclosure,["contentElement","disclosureElement"])),n=null==t?void 0:t.getState(),r=Xb(e.open,null==n?void 0:n.open,e.defaultOpen,!1),a=Xb(e.animated,null==n?void 0:n.animated,!1),s=B_({open:r,animated:a,animating:!!a&&r,mounted:r,contentElement:Xb(null==n?void 0:n.contentElement,null),disclosureElement:Xb(null==n?void 0:n.disclosureElement,null)},t);return z_(s,(()=>U_(s,["animated","animating"],(e=>{e.animated||s.setState("animating",!1)})))),z_(s,(()=>G_(s,["open"],(()=>{s.getState().animated&&s.setState("animating",!0)})))),z_(s,(()=>U_(s,["open","animating"],(e=>{s.setState("mounted",e.open||e.animating)})))),Hb(zb({},s),{setOpen:e=>s.setState("open",e),show:()=>s.setState("open",!0),hide:()=>s.setState("open",!1),toggle:()=>s.setState("open",(e=>!e)),stopAnimation:()=>s.setState("animating",!1),setContentElement:e=>s.setState("contentElement",e),setDisclosureElement:e=>s.setState("disclosureElement",e)})}(e)}function aE(e){const t=e.map(((e,t)=>[t,e]));let n=!1;return t.sort((([e,t],[r,a])=>{const s=t.element,i=a.element;return s===i?0:s&&i?function(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}(s,i)?(e>r&&(n=!0),-1):(e<r&&(n=!0),1):0})),n?t.map((([e,t])=>t)):e}function sE(e={}){var t;e.store;const n=null==(t=e.store)?void 0:t.getState(),r=Xb(e.items,null==n?void 0:n.items,e.defaultItems,[]),a=new Map(r.map((e=>[e.id,e]))),s={items:r,renderedItems:Xb(null==n?void 0:n.renderedItems,[])},i=function(e){return null==e?void 0:e.__unstablePrivateStore}(e.store),o=B_({items:r,renderedItems:s.renderedItems},i),l=B_(s,e.store),c=e=>{const t=aE(e);o.setState("renderedItems",t),l.setState("renderedItems",t)};z_(l,(()=>H_(o))),z_(o,(()=>W_(o,["items"],(e=>{l.setState("items",e.items)})))),z_(o,(()=>W_(o,["renderedItems"],(e=>{let t=!0,n=requestAnimationFrame((()=>{const{renderedItems:t}=l.getState();e.renderedItems!==t&&c(e.renderedItems)}));if("function"!=typeof IntersectionObserver)return()=>cancelAnimationFrame(n);const r=function(e){var t;const n=e.find((e=>!!e.element)),r=[...e].reverse().find((e=>!!e.element));let a=null==(t=null==n?void 0:n.element)?void 0:t.parentElement;for(;a&&(null==r?void 0:r.element);){if(r&&a.contains(r.element))return a;a=a.parentElement}return e_(a).body}(e.renderedItems),a=new IntersectionObserver((()=>{t?t=!1:(cancelAnimationFrame(n),n=requestAnimationFrame((()=>c(e.renderedItems))))}),{root:r});for(const t of e.renderedItems)t.element&&a.observe(t.element);return()=>{cancelAnimationFrame(n),a.disconnect()}}))));const u=(e,t,n=!1)=>{let r;t((t=>{const n=t.findIndex((({id:t})=>t===e.id)),s=t.slice();if(-1!==n){r=t[n];const i=zb(zb({},r),e);s[n]=i,a.set(e.id,i)}else s.push(e),a.set(e.id,e);return s}));return()=>{t((t=>{if(!r)return n&&a.delete(e.id),t.filter((({id:t})=>t!==e.id));const s=t.findIndex((({id:t})=>t===e.id));if(-1===s)return t;const i=t.slice();return i[s]=r,a.set(e.id,r),i}))}},d=e=>u(e,(e=>o.setState("items",e)),!0);return Hb(zb({},l),{registerItem:d,renderItem:e=>jb(d(e),u(e,(e=>o.setState("renderedItems",e)))),item:e=>{if(!e)return null;let t=a.get(e);if(!t){const{items:n}=l.getState();t=n.find((t=>t.id===e)),t&&a.set(e,t)}return t||null},__unstablePrivateStore:o})}function iE(e){const t=[];for(const n of e)t.push(...n);return t}function oE(e){return e.slice().reverse()}var lE={id:null};function cE(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}function uE(e,t){return e.filter((e=>e.rowId===t))}function dE(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}function mE(e){let t=0;for(const{length:n}of e)n>t&&(t=n);return t}function pE(e,t,n){const r=mE(e);for(const a of e)for(let e=0;e<r;e+=1){const r=a[e];if(!r||n&&r.disabled){const r=0===e&&n?cE(a):a[e-1];a[e]=r&&t!==r.id&&n?r:{id:"__EMPTY_ITEM__",disabled:!0,rowId:null==r?void 0:r.rowId}}}return e}function hE(e){const t=dE(e),n=mE(t),r=[];for(let e=0;e<n;e+=1)for(const n of t){const t=n[e];t&&r.push(Hb(zb({},t),{rowId:t.rowId?`${e}`:void 0}))}return r}function fE(e={}){var t;const n=null==(t=e.store)?void 0:t.getState(),r=sE(e),a=Xb(e.activeId,null==n?void 0:n.activeId,e.defaultActiveId),s=B_(Hb(zb({},r.getState()),{activeId:a,baseElement:Xb(null==n?void 0:n.baseElement,null),includesBaseElement:Xb(e.includesBaseElement,null==n?void 0:n.includesBaseElement,null===a),moves:Xb(null==n?void 0:n.moves,0),orientation:Xb(e.orientation,null==n?void 0:n.orientation,"both"),rtl:Xb(e.rtl,null==n?void 0:n.rtl,!1),virtualFocus:Xb(e.virtualFocus,null==n?void 0:n.virtualFocus,!1),focusLoop:Xb(e.focusLoop,null==n?void 0:n.focusLoop,!1),focusWrap:Xb(e.focusWrap,null==n?void 0:n.focusWrap,!1),focusShift:Xb(e.focusShift,null==n?void 0:n.focusShift,!1)}),r,e.store);z_(s,(()=>U_(s,["renderedItems","activeId"],(e=>{s.setState("activeId",(t=>{var n;return void 0!==t?t:null==(n=cE(e.renderedItems))?void 0:n.id}))}))));const i=(e,t,n,r)=>{var a,i;const{activeId:o,rtl:l,focusLoop:c,focusWrap:u,includesBaseElement:d}=s.getState(),m=l&&"vertical"!==t?oE(e):e;if(null==o)return null==(a=cE(m))?void 0:a.id;const p=m.find((e=>e.id===o));if(!p)return null==(i=cE(m))?void 0:i.id;const h=!!p.rowId,f=m.indexOf(p),g=m.slice(f+1),y=uE(g,p.rowId);if(void 0!==r){const e=function(e,t){return e.filter((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(y,o),t=e.slice(r)[0]||e[e.length-1];return null==t?void 0:t.id}const v=function(e){return"vertical"===e?"horizontal":"horizontal"===e?"vertical":void 0}(h?t||"horizontal":t),b=c&&c!==v,_=h&&u&&u!==v;if(n=n||!h&&b&&d,b){const e=function(e,t,n=!1){const r=e.findIndex((e=>e.id===t));return[...e.slice(r+1),...n?[lE]:[],...e.slice(0,r)]}(_&&!n?m:uE(m,p.rowId),o,n),t=cE(e,o);return null==t?void 0:t.id}if(_){const e=cE(n?y:g,o);return n?(null==e?void 0:e.id)||null:null==e?void 0:e.id}const E=cE(y,o);return!E&&n?null:null==E?void 0:E.id};return Hb(zb(zb({},r),s),{setBaseElement:e=>s.setState("baseElement",e),setActiveId:e=>s.setState("activeId",e),move:e=>{void 0!==e&&(s.setState("activeId",e),s.setState("moves",(e=>e+1)))},first:()=>{var e;return null==(e=cE(s.getState().renderedItems))?void 0:e.id},last:()=>{var e;return null==(e=cE(oE(s.getState().renderedItems)))?void 0:e.id},next:e=>{const{renderedItems:t,orientation:n}=s.getState();return i(t,n,!1,e)},previous:e=>{var t;const{renderedItems:n,orientation:r,includesBaseElement:a}=s.getState(),o=!!!(null==(t=cE(n))?void 0:t.rowId)&&a;return i(oE(n),r,o,e)},down:e=>{const{activeId:t,renderedItems:n,focusShift:r,focusLoop:a,includesBaseElement:o}=s.getState(),l=r&&!e,c=hE(iE(pE(dE(n),t,l)));return i(c,"vertical",a&&"horizontal"!==a&&o,e)},up:e=>{const{activeId:t,renderedItems:n,focusShift:r,includesBaseElement:a}=s.getState(),o=r&&!e,l=hE(oE(iE(pE(dE(n),t,o))));return i(l,"vertical",a,e)}})}var gE=p_()&&d_();function yE(e={}){var t;e.store;const n=null==(t=e.store)?void 0:t.getState(),r=Xb(e.activeId,null==n?void 0:n.activeId,e.defaultActiveId,null),a=fE(Hb(zb({},e),{activeId:r,includesBaseElement:Xb(e.includesBaseElement,null==n?void 0:n.includesBaseElement,!0),orientation:Xb(e.orientation,null==n?void 0:n.orientation,"vertical"),focusLoop:Xb(e.focusLoop,null==n?void 0:n.focusLoop,!0),focusWrap:Xb(e.focusWrap,null==n?void 0:n.focusWrap,!0),virtualFocus:Xb(e.virtualFocus,null==n?void 0:n.virtualFocus,!gE)})),s=function(e={}){var t=e,{popover:n}=t,r=Gb(t,["popover"]);const a=Z_(r.store,j_(n,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"])),s=null==a?void 0:a.getState(),i=rE(Hb(zb({},r),{store:a})),o=Xb(r.placement,null==s?void 0:s.placement,"bottom"),l=B_(Hb(zb({},i.getState()),{placement:o,currentPlacement:o,anchorElement:Xb(null==s?void 0:s.anchorElement,null),popoverElement:Xb(null==s?void 0:s.popoverElement,null),arrowElement:Xb(null==s?void 0:s.arrowElement,null),rendered:Symbol("rendered")}),i,a);return Hb(zb(zb({},i),l),{setAnchorElement:e=>l.setState("anchorElement",e),setPopoverElement:e=>l.setState("popoverElement",e),setArrowElement:e=>l.setState("arrowElement",e),render:()=>l.setState("rendered",Symbol("rendered"))})}(Hb(zb({},e),{placement:Xb(e.placement,null==n?void 0:n.placement,"bottom-start")})),i=Xb(e.value,null==n?void 0:n.value,e.defaultValue,""),o=Xb(e.selectedValue,null==n?void 0:n.selectedValue,e.defaultSelectedValue,""),l=Array.isArray(o),c=B_(Hb(zb(zb({},a.getState()),s.getState()),{value:i,selectedValue:o,resetValueOnSelect:Xb(e.resetValueOnSelect,null==n?void 0:n.resetValueOnSelect,l),resetValueOnHide:Xb(e.resetValueOnHide,null==n?void 0:n.resetValueOnHide,l),activeValue:null==n?void 0:n.activeValue}),a,s,e.store);return z_(c,(()=>U_(c,["resetValueOnHide","mounted"],(e=>{e.resetValueOnHide&&(e.mounted||c.setState("value",i))})))),z_(c,(()=>U_(c,["resetValueOnSelect","selectedValue"],(e=>{e.resetValueOnSelect&&c.setState("value",i)})))),z_(c,(()=>W_(c,["mounted"],(e=>{e.mounted||(c.setState("activeId",r),c.setState("moves",0))})))),z_(c,(()=>U_(c,["moves","activeId"],((e,t)=>{e.moves===t.moves&&c.setState("activeValue",void 0)})))),z_(c,(()=>W_(c,["moves","renderedItems"],((e,t)=>{if(e.moves===t.moves)return;const{activeId:n}=c.getState(),r=a.item(n);c.setState("activeValue",null==r?void 0:r.value)})))),Hb(zb(zb(zb({},s),a),c),{setValue:e=>c.setState("value",e),setSelectedValue:e=>c.setState("selectedValue",e)})}function vE(e={}){const[t,n]=function(e,t){const[n,r]=l.useState((()=>e(t)));x_((()=>H_(n)),[n]);const a=l.useCallback((e=>X_(n,e)),[n]);return[l.useMemo((()=>Ab(Mb({},n),{useState:a})),[n,a]),k_((()=>{r((n=>e(Mb(Mb({},t),n.getState()))))}))]}(yE,e);return function(e,t,n){return J_(e=$_(e=nE(e,t,n),t,n),n,"value","setValue"),J_(e,n,"selectedValue","setSelectedValue"),J_(e,n,"resetValueOnHide"),J_(e,n,"resetValueOnSelect"),e}(t,n,e)}var bE=a(4922);function _E(e){return l.forwardRef(((t,n)=>e(Mb({ref:n},t))))}function EE(e){const t=_E(e);return l.memo(t)}function wE(e,t){const n=t,{as:r,wrapElement:a,render:s}=n,i=Ob(n,["as","wrapElement","render"]);let o;const c=T_(t.ref,Jb(s));if(r&&"string"!=typeof r)o=(0,bE.jsx)(r,Ab(Mb({},i),{render:s}));else if(l.isValidElement(s)){const e=Ab(Mb({},s.props),{ref:c});o=l.cloneElement(s,function(e,t){const n=Mb({},e);for(const r in t){if(!Wb(t,r))continue;if("className"===r){const r="className";n[r]=e[r]?`${e[r]} ${t[r]}`:t[r];continue}if("style"===r){const r="style";n[r]=e[r]?Mb(Mb({},e[r]),t[r]):t[r];continue}const a=t[r];if("function"==typeof a&&r.startsWith("on")){const t=e[r];if("function"==typeof t){n[r]=(...e)=>{a(...e),t(...e)};continue}}n[r]=a}return n}(i,e))}else if(s)o=s(i);else if("function"==typeof t.children){0;const e=i,{children:n}=e,r=Ob(e,["children"]);o=t.children(r)}else o=r?(0,bE.jsx)(r,Mb({},i)):(0,bE.jsx)(e,Mb({},i));return a?a(o):o}function SE(e){return(t={})=>{const n=e(t),r={};for(const e in n)Wb(n,e)&&void 0!==n[e]&&(r[e]=n[e]);return r}}function xE(e=[],t=[]){const n=l.createContext(void 0),r=l.createContext(void 0),a=()=>l.useContext(n),s=t=>e.reduceRight(((e,n)=>(0,bE.jsx)(n,Ab(Mb({},t),{children:e}))),(0,bE.jsx)(n.Provider,Mb({},t)));return{context:n,scopedContext:r,useContext:a,useScopedContext:(e=!1)=>{const t=l.useContext(r),n=a();return e?t:t||n},useProviderContext:()=>{const e=l.useContext(r),t=a();if(!e||e!==t)return t},ContextProvider:s,ScopedContextProvider:e=>(0,bE.jsx)(s,Ab(Mb({},e),{children:t.reduceRight(((t,n)=>(0,bE.jsx)(n,Ab(Mb({},e),{children:t}))),(0,bE.jsx)(r.Provider,Mb({},e)))}))}}var CE=xE(),kE=CE.useContext,TE=(CE.useScopedContext,CE.useProviderContext,xE([CE.ContextProvider],[CE.ScopedContextProvider])),PE=TE.useContext,IE=(TE.useScopedContext,TE.useProviderContext),ME=TE.ContextProvider,AE=TE.ScopedContextProvider,OE=(0,l.createContext)(void 0),NE=(0,l.createContext)(void 0),FE=xE(),RE=(FE.useContext,FE.useScopedContext,FE.useProviderContext),DE=xE([FE.ContextProvider],[FE.ScopedContextProvider]),VE=(DE.useContext,DE.useScopedContext,DE.useProviderContext,DE.ContextProvider),LE=DE.ScopedContextProvider,BE=((0,l.createContext)(void 0),(0,l.createContext)(void 0),xE([VE],[LE])),zE=(BE.useContext,BE.useScopedContext,BE.useProviderContext),HE=BE.ContextProvider,GE=BE.ScopedContextProvider,UE=xE([HE,ME],[GE,AE]),WE=(UE.useContext,UE.useScopedContext),jE=UE.useProviderContext,ZE=UE.ContextProvider,qE=UE.ScopedContextProvider,YE=(0,l.createContext)(void 0),KE=(0,l.createContext)(!1);function XE(e={}){const t=vE(e);return(0,bE.jsx)(ZE,{value:t,children:e.children})}var JE=SE((e=>{var t=e,{store:n}=t,r=Ob(t,["store"]);const a=jE();Yb(n=n||a,!1);const s=n.useState((e=>{var t;return null==(t=e.baseElement)?void 0:t.id}));return r=Mb({htmlFor:s},r)})),QE=EE((e=>wE("label",JE(e))));var $E=SE((e=>{var t=e,{store:n}=t,r=Ob(t,["store"]);const a=zE();return n=n||a,r=Ab(Mb({},r),{ref:T_(null==n?void 0:n.setAnchorElement,r.ref)})}));_E((e=>wE("div",$E(e))));function ew(e,t){return t&&e.item(t)||null}var tw=Symbol("FOCUS_SILENTLY");function nw(e,t,n){if(!t)return!1;if(t===n)return!1;const r=e.item(t.id);return!!r&&(!n||r.element!==n)}var rw=(0,l.createContext)(!0),aw="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function sw(e){return!!s_(e,aw)&&(!!function(e){const t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}(e)&&!function(e,t){if("closest"in e)return e.closest(t);do{if(s_(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}(e,"[inert]"))}function iw(e){const t=t_(e);if(!t)return!1;if(t===e)return!0;const n=t.getAttribute("aria-activedescendant");return!!n&&n===e.id}function ow(e){const t=t_(e);if(!t)return!1;if(n_(e,t))return!0;const n=t.getAttribute("aria-activedescendant");return!!n&&("id"in e&&(n===e.id||!!e.querySelector(`#${CSS.escape(n)}`)))}var lw=p_(),cw=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"];function uw(e){return!("input"!==e.tagName.toLowerCase()||!e.type)&&("radio"===e.type||"checkbox"===e.type)}function dw(e,t,n,r,a){return e?t?n&&!r?-1:void 0:n?a:a||0:a}function mw(e,t){return k_((n=>{null==e||e(n),n.defaultPrevented||t&&(n.stopPropagation(),n.preventDefault())}))}var pw=!0;function hw(e){const t=e.target;t&&"hasAttribute"in t&&(t.hasAttribute("data-focus-visible")||(pw=!1))}function fw(e){e.metaKey||e.ctrlKey||e.altKey||(pw=!0)}var gw=SE((e=>{var t=e,{focusable:n=!0,accessibleWhenDisabled:r,autoFocus:a,onFocusVisible:s}=t,i=Ob(t,["focusable","accessibleWhenDisabled","autoFocus","onFocusVisible"]);const o=(0,l.useRef)(null);(0,l.useEffect)((()=>{n&&(__("mousedown",hw,!0),__("keydown",fw,!0))}),[n]),lw&&(0,l.useEffect)((()=>{if(!n)return;const e=o.current;if(!e)return;if(!uw(e))return;const t=function(e){return"labels"in e?e.labels:null}(e);if(!t)return;const r=()=>queueMicrotask((()=>e.focus()));return t.forEach((e=>e.addEventListener("mouseup",r))),()=>{t.forEach((e=>e.removeEventListener("mouseup",r)))}}),[n]);const c=n&&Kb(i),u=!!c&&!r,[d,m]=(0,l.useState)(!1);(0,l.useEffect)((()=>{n&&u&&d&&m(!1)}),[n,u,d]),(0,l.useEffect)((()=>{if(!n)return;if(!d)return;const e=o.current;if(!e)return;if("undefined"==typeof IntersectionObserver)return;const t=new IntersectionObserver((()=>{sw(e)||m(!1)}));return t.observe(e),()=>t.disconnect()}),[n,d]);const p=mw(i.onKeyPressCapture,c),h=mw(i.onMouseDownCapture,c),f=mw(i.onClickCapture,c),g=i.onMouseDown,y=k_((e=>{if(null==g||g(e),e.defaultPrevented)return;if(!n)return;const t=e.currentTarget;if(!lw)return;if(h_(e))return;if(!r_(t)&&!uw(t))return;let r=!1;const a=()=>{r=!0};t.addEventListener("focusin",a,{capture:!0,once:!0}),b_(t,"mouseup",(()=>{t.removeEventListener("focusin",a,!0),r||function(e){!ow(e)&&sw(e)&&e.focus()}(t)}))})),v=(e,t)=>{if(t&&(e.currentTarget=t),!n)return;const r=e.currentTarget;r&&iw(r)&&(null==s||s(e),e.defaultPrevented||m(!0))},b=i.onKeyDownCapture,_=k_((e=>{if(null==b||b(e),e.defaultPrevented)return;if(!n)return;if(d)return;if(e.metaKey)return;if(e.altKey)return;if(e.ctrlKey)return;if(!f_(e))return;const t=e.currentTarget;queueMicrotask((()=>v(e,t)))})),E=i.onFocusCapture,w=k_((e=>{if(null==E||E(e),e.defaultPrevented)return;if(!n)return;if(!f_(e))return void m(!1);const t=e.currentTarget,r=()=>v(e,t);pw||function(e){const{tagName:t,readOnly:n,type:r}=e;return"TEXTAREA"===t&&!n||"SELECT"===t&&!n||("INPUT"!==t||n?!!e.isContentEditable:cw.includes(r))}(e.target)?queueMicrotask(r):!function(e){return"combobox"===e.getAttribute("role")&&!!e.dataset.name}(e.target)?m(!1):b_(e.target,"focusout",r)})),S=i.onBlur,x=k_((e=>{null==S||S(e),n&&v_(e)&&m(!1)})),C=(0,l.useContext)(rw),k=k_((e=>{n&&a&&e&&C&&queueMicrotask((()=>{iw(e)||sw(e)&&e.focus()}))})),T=I_(o,i.as),P=n&&function(e){return!e||"button"===e||"input"===e||"select"===e||"textarea"===e||"a"===e}(T),I=n&&function(e){return!e||"button"===e||"input"===e||"select"===e||"textarea"===e}(T),M=u?Mb({pointerEvents:"none"},i.style):i.style;return i=Ab(Mb({"data-focus-visible":n&&d?"":void 0,"data-autofocus":!!a||void 0,"aria-disabled":!!c||void 0},i),{ref:T_(o,k,i.ref),style:M,tabIndex:dw(n,u,P,I,i.tabIndex),disabled:!(!I||!u)||void 0,contentEditable:c?void 0:i.contentEditable,onKeyPressCapture:p,onClickCapture:f,onMouseDownCapture:h,onMouseDown:y,onKeyDownCapture:_,onFocusCapture:w,onBlur:x})}));_E((e=>wE("div",e=gw(e))));function yw(e,t,n){return k_((r=>{var a;if(null==t||t(r),r.defaultPrevented)return;if(r.isPropagationStopped())return;if(!f_(r))return;if(function(e){return"Shift"===e.key||"Control"===e.key||"Alt"===e.key||"Meta"===e.key}(r))return;if(function(e){const t=e.target;return!(t&&!i_(t)||1!==e.key.length||e.ctrlKey||e.metaKey)}(r))return;const s=e.getState(),i=null==(a=ew(e,s.activeId))?void 0:a.element;if(!i)return;const o=r,{view:l}=o,c=Ob(o,["view"]);i!==(null==n?void 0:n.current)&&i.focus(),function(e,t,n){const r=new KeyboardEvent(t,n);return e.dispatchEvent(r)}(i,r.type,c)||r.preventDefault(),r.currentTarget.contains(i)&&r.stopPropagation()}))}var vw=SE((e=>{var t=e,{store:n,composite:r=!0,focusOnMove:a=r,moveOnKeyPress:s=!0}=t,i=Ob(t,["store","composite","focusOnMove","moveOnKeyPress"]);const o=IE();Yb(n=n||o,!1);const c=(0,l.useRef)(null),u=function(e){const[t,n]=(0,l.useState)(!1),r=(0,l.useCallback)((()=>n(!0)),[]),a=e.useState((t=>ew(e,t.activeId)));return(0,l.useEffect)((()=>{const e=null==a?void 0:a.element;t&&e&&(n(!1),e.focus({preventScroll:!0}))}),[a,t]),r}(n),d=n.useState("moves");(0,l.useEffect)((()=>{var e;if(!n)return;if(!d)return;if(!r)return;if(!a)return;const{activeId:t}=n.getState(),s=null==(e=ew(n,t))?void 0:e.element;var i,o;s&&("scrollIntoView"in(i=s)?(i.focus({preventScroll:!0}),i.scrollIntoView(zb({block:"nearest",inline:"nearest"},o))):i.focus())}),[n,d,r,a]),x_((()=>{if(!n)return;if(!d)return;if(!r)return;const{baseElement:e,activeId:t}=n.getState();if(!(null===t))return;if(!e)return;const a=c.current;c.current=null,a&&g_(a,{relatedTarget:e}),iw(e)||e.focus()}),[n,d,r]);const m=n.useState("activeId"),p=n.useState("virtualFocus");x_((()=>{var e;if(!n)return;if(!r)return;if(!p)return;const t=c.current;if(c.current=null,!t)return;const a=(null==(e=ew(n,m))?void 0:e.element)||t_(t);a!==t&&g_(t,{relatedTarget:a})}),[n,m,p,r]);const h=yw(n,i.onKeyDownCapture,c),f=yw(n,i.onKeyUpCapture,c),g=i.onFocusCapture,y=k_((e=>{if(null==g||g(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:t}=n.getState();if(!t)return;const r=e.relatedTarget,a=function(e){const t=e[tw];return delete e[tw],t}(e.currentTarget);f_(e)&&a&&(e.stopPropagation(),c.current=r)})),v=i.onFocus,b=k_((e=>{if(null==v||v(e),e.defaultPrevented)return;if(!r)return;if(!n)return;const{relatedTarget:t}=e,{virtualFocus:a}=n.getState();a?f_(e)&&!nw(n,t)&&queueMicrotask(u):f_(e)&&n.setActiveId(null)})),_=i.onBlurCapture,E=k_((e=>{var t;if(null==_||_(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:r,activeId:a}=n.getState();if(!r)return;const s=null==(t=ew(n,a))?void 0:t.element,i=e.relatedTarget,o=nw(n,i),l=c.current;if(c.current=null,f_(e)&&o)i===s?l&&l!==i&&g_(l,e):s?g_(s,e):l&&g_(l,e),e.stopPropagation();else{!nw(n,e.target)&&s&&g_(s,e)}})),w=i.onKeyDown,S=A_(s),x=k_((e=>{var t;if(null==w||w(e),e.defaultPrevented)return;if(!n)return;if(!f_(e))return;const{orientation:r,items:a,renderedItems:s,activeId:i}=n.getState(),o=ew(n,i);if(null==(t=null==o?void 0:o.element)?void 0:t.isConnected)return;const l="horizontal"!==r,c="vertical"!==r,u=function(e){return e.some((e=>!!e.rowId))}(s);if(("ArrowLeft"===e.key||"ArrowRight"===e.key||"Home"===e.key||"End"===e.key)&&i_(e.currentTarget))return;const d={ArrowUp:(u||l)&&(()=>{if(u){const e=a&&function(e){return function(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(iE(oE(function(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}(e))))}(a);return null==e?void 0:e.id}return null==n?void 0:n.last()}),ArrowRight:(u||c)&&n.first,ArrowDown:(u||l)&&n.first,ArrowLeft:(u||c)&&n.last,Home:n.first,End:n.last,PageUp:n.first,PageDown:n.last},m=d[e.key];if(m){const t=m();if(void 0!==t){if(!S(e))return;e.preventDefault(),n.move(t)}}}));i=O_(i,(e=>(0,bE.jsx)(ME,{value:n,children:e})),[n]);const C=n.useState((e=>{var t;if(n&&r&&e.virtualFocus)return null==(t=ew(n,e.activeId))?void 0:t.id}));i=Ab(Mb({"aria-activedescendant":C},i),{ref:T_(r?n.setBaseElement:null,i.ref),onKeyDownCapture:h,onKeyUpCapture:f,onFocusCapture:y,onFocus:b,onBlurCapture:E,onKeyDown:x});const k=n.useState((e=>r&&(e.virtualFocus||null===e.activeId)));return i=gw(Mb({focusable:k},i))}));_E((e=>wE("div",vw(e))));const bw=window.ReactDOM;function _w(e,t,n){if(!n)return!1;const r=e.find((e=>!e.disabled&&e.value));return(null==r?void 0:r.value)===t}function Ew(e,t){return!!t&&(null!=e&&(e=Zb(e),t.length>e.length&&0===t.toLowerCase().indexOf(e.toLowerCase())))}var ww=SE((e=>{var t=e,{store:n,focusable:r=!0,autoSelect:a=!1,getAutoSelectId:s,showOnChange:i=!0,setValueOnChange:o=!0,showOnMouseDown:c=!0,setValueOnClick:u=!0,showOnKeyDown:d=!0,moveOnKeyPress:m=!0,autoComplete:p="list"}=t,h=Ob(t,["store","focusable","autoSelect","getAutoSelectId","showOnChange","setValueOnChange","showOnMouseDown","setValueOnClick","showOnKeyDown","moveOnKeyPress","autoComplete"]);const f=jE();Yb(n=n||f,!1);const g=(0,l.useRef)(null),[y,v]=(0,l.useReducer)((()=>[]),[]),b=(0,l.useRef)(!1),_=(0,l.useRef)(!1),E=n.useState((e=>!!a&&e.virtualFocus)),w="inline"===p||"both"===p,[S,x]=(0,l.useState)(w);!function(e,t){const n=(0,l.useRef)(!1);x_((()=>{if(n.current)return e();n.current=!0}),t),x_((()=>()=>{n.current=!1}),[])}((()=>{w&&x(!0)}),[w]);const C=n.useState("value"),k=n.useState((e=>w&&S?e.activeValue:void 0)),T=n.useState("renderedItems"),P=n.useState("open"),I=n.useState("contentElement"),M=(0,l.useMemo)((()=>{if(!w)return C;if(!S)return C;if(_w(T,k,E)){if(Ew(C,k)){const e=(null==k?void 0:k.slice(C.length))||"";return C+e}return C}return k||C}),[w,S,T,k,E,C]);(0,l.useEffect)((()=>{const e=g.current;if(!e)return;const t=()=>x(!0);return e.addEventListener("combobox-item-move",t),()=>{e.removeEventListener("combobox-item-move",t)}}),[]),(0,l.useEffect)((()=>{if(!w)return;if(!S)return;if(!k)return;_w(T,k,E)&&Ew(C,k)&&queueMicrotask((()=>{const e=g.current;e&&u_(e,C.length,k.length)}))}),[y,w,S,k,T,E,C]);const A=(0,l.useRef)(null),O=k_(s),N=(0,l.useRef)(null);(0,l.useEffect)((()=>{if(!P)return;if(!I)return;const e=c_(I);if(!e)return;A.current=e;const t=()=>{b.current=!1},r=()=>{if(!n)return;if(!b.current)return;const{activeId:e}=n.getState();null!==e&&e!==N.current&&(b.current=!1)},a={passive:!0,capture:!0};return e.addEventListener("wheel",t,a),e.addEventListener("scroll",r,a),()=>{e.removeEventListener("wheel",t,!0),e.removeEventListener("scroll",r,!0)}}),[P,I,n]),x_((()=>{C&&(_.current||(b.current=!0))}),[C]),x_((()=>{P||(b.current=!1)}),[P]);const F=n.useState("resetValueOnSelect");M_((()=>{var e;const t=b.current;if(!n)return;if(!(E&&t||F))return;const{baseElement:r,contentElement:a,activeId:s}=n.getState();if(!r||iw(r)){if(null==a?void 0:a.hasAttribute("data-placing")){const e=new MutationObserver(v);return e.observe(a,{attributeFilter:["data-placing"]}),()=>e.disconnect()}if(E&&t){const e=O(T),t=void 0!==e?e:n.first();N.current=t,n.move(null!=t?t:null)}else{const t=null==(e=n.item(s))?void 0:e.element;t&&"scrollIntoView"in t&&t.scrollIntoView({block:"nearest",inline:"nearest"})}}}),[n,y,C,E,F,O,T]),(0,l.useEffect)((()=>{if(!w)return;const e=g.current;if(!e)return;const t=[e,I].filter((e=>!!e)),r=e=>{t.every((t=>v_(e,t)))&&(null==n||n.setValue(M))};return t.forEach((e=>e.addEventListener("focusout",r))),()=>{t.forEach((e=>e.removeEventListener("focusout",r)))}}),[w,I,n,M]);const R=h.onChange,D=A_(i),V=A_(o),L=k_((e=>{if(null==R||R(e),e.defaultPrevented)return;if(!n)return;const{value:t,selectionStart:r,selectionEnd:a}=e.target,s=e.nativeEvent;if(b.current=!0,function(e){return"input"===e.type}(s)&&(s.isComposing&&(b.current=!1,_.current=!0),w)){const e="insertText"===s.inputType||"insertCompositionText"===s.inputType,n=r===t.length;x(e&&n)}if(V(e)){const s=t===n.getState().value;(0,bw.flushSync)((()=>null==n?void 0:n.setValue(t))),u_(e.currentTarget,r,a),w&&E&&s&&v()}D(e)&&n.show(),E&&b.current||n.setActiveId(null)})),B=h.onCompositionEnd,z=k_((e=>{b.current=!0,_.current=!1,null==B||B(e),e.defaultPrevented||E&&v()})),H=h.onMouseDown,G=A_(u),U=A_(c),W=k_((e=>{null==H||H(e),e.defaultPrevented||e.button||e.ctrlKey||n&&(n.setActiveId(null),G(e)&&n.setValue(M),U(e)&&b_(e.currentTarget,"mouseup",n.show))})),j=h.onKeyDown,Z=A_(d),q=k_((e=>{if(null==j||j(e),e.repeat||(b.current=!1),e.defaultPrevented)return;if(e.ctrlKey)return;if(e.altKey)return;if(e.shiftKey)return;if(e.metaKey)return;if(!n)return;const{open:t,activeId:r}=n.getState();t||null===r&&("ArrowUp"!==e.key&&"ArrowDown"!==e.key||Z(e)&&(e.preventDefault(),n.show()))})),Y=h.onBlur,K=k_((e=>{b.current=!1,null==Y||Y(e),e.defaultPrevented})),X=P_(h.id),J=function(e){return"inline"===e||"list"===e||"both"===e||"none"===e}(p)?p:void 0,Q=n.useState((e=>null===e.activeId));return h=Ab(Mb({id:X,role:"combobox","aria-autocomplete":J,"aria-haspopup":o_(I,"listbox"),"aria-expanded":P,"aria-controls":null==I?void 0:I.id,"data-active-item":Q||void 0,value:M},h),{ref:T_(g,h.ref),onChange:L,onCompositionEnd:z,onMouseDown:W,onKeyDown:q,onBlur:K}),h=vw(Ab(Mb({store:n,focusable:r},h),{moveOnKeyPress:e=>!function(e,...t){const n="function"==typeof e?e(...t):e;return null!=n&&!n}(m,e)&&(w&&x(!0),!0)})),h=$E(Mb({store:n},h)),Mb({autoComplete:"off"},h)})),Sw=_E((e=>wE("input",ww(e))));function xw(e,t){const n=setTimeout(t,e);return()=>clearTimeout(n)}function Cw(...e){return e.join(", ").split(", ").reduce(((e,t)=>{const n=1e3*parseFloat(t||"0s");return n>e?n:e}),0)}function kw(e,t,n){return!(n||!1===t||e&&!t)}var Tw=SE((e=>{var t=e,{store:n,alwaysVisible:r}=t,a=Ob(t,["store","alwaysVisible"]);const s=RE();Yb(n=n||s,!1);const i=P_(a.id),[o,c]=(0,l.useState)(null),u=n.useState("open"),d=n.useState("mounted"),m=n.useState("animated"),p=n.useState("contentElement");x_((()=>{if(m){if(null==p?void 0:p.isConnected)return function(e){let t=requestAnimationFrame((()=>{t=requestAnimationFrame(e)}));return()=>cancelAnimationFrame(t)}((()=>{c(u?"enter":"leave")}));c(null)}}),[m,p,u]),x_((()=>{if(!n)return;if(!m)return;if(!p)return;if(!o)return;if("enter"===o&&!u)return;if("leave"===o&&u)return;if("number"==typeof m){return xw(m,n.stopAnimation)}const{transitionDuration:e,animationDuration:t,transitionDelay:r,animationDelay:a}=getComputedStyle(p),s=Cw(r,a)+Cw(e,t);return s?xw(s,n.stopAnimation):void 0}),[n,m,p,u,o]);const h=kw(d,(a=O_(a,(e=>(0,bE.jsx)(LE,{value:n,children:e})),[n])).hidden,r),f=h?Ab(Mb({},a.style),{display:"none"}):a.style;return a=Ab(Mb({id:i,"data-enter":"enter"===o?"":void 0,"data-leave":"leave"===o?"":void 0,hidden:h},a),{ref:T_(i?n.setContentElement:null,a.ref),style:f})})),Pw=_E((e=>wE("div",Tw(e))));_E((e=>{var t=e,{unmountOnHide:n}=t,r=Ob(t,["unmountOnHide"]);const a=RE();return!1===X_(r.store||a,(e=>!n||(null==e?void 0:e.mounted)))?null:(0,bE.jsx)(Pw,Mb({},r))}));var Iw=SE((e=>{var t=e,{store:n,focusable:r=!0,alwaysVisible:a}=t,s=Ob(t,["store","focusable","alwaysVisible"]);const i=jE();Yb(n=n||i,!1);const o=(0,l.useRef)(null),c=P_(s.id),u=s.onKeyDown,d=k_((e=>{null==u||u(e),e.defaultPrevented||"Escape"===e.key&&(null==n||n.move(null))})),m=(0,l.useRef)(!1),p=s.onFocusVisible,h=k_((e=>{if(null==p||p(e),e.defaultPrevented)return;if("focus"!==e.type)return;if(!n)return;const{virtualFocus:t}=n.getState();if(!t)return;const{relatedTarget:r,currentTarget:a}=e;r&&a.contains(r)||(m.current=!0,n.setState("virtualFocus",!1))})),f=s.onBlur,g=k_((e=>{null==f||f(e),e.defaultPrevented||m.current&&v_(e)&&(m.current=!1,null==n||n.setState("virtualFocus",!0))}));s=O_(s,(e=>(0,bE.jsx)(qE,{value:n,children:e})),[n]);const y=kw(n.useState("mounted"),s.hidden,a),v=y?Ab(Mb({},s.style),{display:"none"}):s.style,b=n.useState((e=>Array.isArray(e.selectedValue))),_=function(e,t,n){const[r,a]=(0,l.useState)(n);return x_((()=>{const n=e&&"current"in e?e.current:e,r=null==n?void 0:n.getAttribute(t);null!=r&&a(r)}),[e,t]),r}(o,"role",s.role);return s=Ab(Mb({id:c,hidden:y,role:"listbox",tabIndex:r?-1:void 0,"aria-multiselectable":("listbox"===_||"tree"===_||"grid"===_)&&b||void 0},s),{ref:T_(c?n.setContentElement:null,o,s.ref),style:v,onKeyDown:d,onFocusVisible:h,onBlur:g}),s=gw(Mb({focusable:r},s))})),Mw=_E((e=>wE("div",Iw(e))));function Aw(e){const t=e.relatedTarget;return(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null}var Ow=Symbol("composite-hover");var Nw=SE((e=>{var t=e,{store:n,focusOnHover:r=!0,blurOnHoverEnd:a=!!r}=t,s=Ob(t,["store","focusOnHover","blurOnHoverEnd"]);const i=PE();Yb(n=n||i,!1);const o=((0,l.useEffect)((()=>{__("mousemove",D_,!0),__("mousedown",V_,!0),__("mouseup",V_,!0),__("keydown",V_,!0),__("scroll",V_,!0)}),[]),k_((()=>N_))),c=s.onMouseMove,u=A_(r),d=k_((e=>{if(null==c||c(e),!e.defaultPrevented&&o()&&u(e)){if(!ow(e.currentTarget)){const e=null==n?void 0:n.getState().baseElement;e&&!iw(e)&&e.focus()}null==n||n.setActiveId(e.currentTarget.id)}})),m=s.onMouseLeave,p=A_(a),h=k_((e=>{var t;null==m||m(e),e.defaultPrevented||o()&&(function(e){const t=Aw(e);return!!t&&n_(e.currentTarget,t)}(e)||function(e){let t=Aw(e);if(!t)return!1;do{if(Wb(t,Ow)&&t[Ow])return!0;t=t.parentElement}while(t);return!1}(e)||u(e)&&p(e)&&(null==n||n.setActiveId(null),null==(t=null==n?void 0:n.getState().baseElement)||t.focus()))})),f=(0,l.useCallback)((e=>{e&&(e[Ow]=!0)}),[]);return s=Ab(Mb({},s),{ref:T_(f,s.ref),onMouseMove:d,onMouseLeave:h})}));EE((e=>wE("div",Nw(e))));function Fw(e){if(!e.isTrusted)return!1;const t=e.currentTarget;return"Enter"===e.key?r_(t)||"SUMMARY"===t.tagName||"A"===t.tagName:" "===e.key&&(r_(t)||"SUMMARY"===t.tagName||"INPUT"===t.tagName||"SELECT"===t.tagName)}var Rw=Symbol("command"),Dw=SE((e=>{var t=e,{clickOnEnter:n=!0,clickOnSpace:r=!0}=t,a=Ob(t,["clickOnEnter","clickOnSpace"]);const s=(0,l.useRef)(null),i=I_(s,a.as),o=a.type,[c,u]=(0,l.useState)((()=>!!i&&r_({tagName:i,type:o})));(0,l.useEffect)((()=>{s.current&&u(r_(s.current))}),[]);const[d,m]=(0,l.useState)(!1),p=(0,l.useRef)(!1),h=Kb(a),[f,g]=function(e,t,n){const r=e.onLoadedMetadataCapture,a=(0,l.useMemo)((()=>Object.assign((()=>{}),Ab(Mb({},r),{[t]:n}))),[r,t,n]);return[null==r?void 0:r[t],{onLoadedMetadataCapture:a}]}(a,Rw,!0),y=a.onKeyDown,v=k_((e=>{null==y||y(e);const t=e.currentTarget;if(e.defaultPrevented)return;if(f)return;if(h)return;if(!f_(e))return;if(i_(t))return;if(t.isContentEditable)return;const a=n&&"Enter"===e.key,s=r&&" "===e.key,i="Enter"===e.key&&!n,o=" "===e.key&&!r;if(i||o)e.preventDefault();else if(a||s){const n=Fw(e);if(a){if(!n){e.preventDefault();const n=e,{view:r}=n,a=Ob(n,["view"]),s=()=>y_(t,a);$b&&/firefox\//i.test(navigator.userAgent)?b_(t,"keyup",s):queueMicrotask(s)}}else s&&(p.current=!0,n||(e.preventDefault(),m(!0)))}})),b=a.onKeyUp,_=k_((e=>{if(null==b||b(e),e.defaultPrevented)return;if(f)return;if(h)return;if(e.metaKey)return;const t=r&&" "===e.key;if(p.current&&t&&(p.current=!1,!Fw(e))){e.preventDefault(),m(!1);const t=e.currentTarget,n=e,{view:r}=n,a=Ob(n,["view"]);queueMicrotask((()=>y_(t,a)))}}));return a=Ab(Mb(Mb({"data-active":d?"":void 0,type:c?"button":void 0},g),a),{ref:T_(s,a.ref),onKeyDown:v,onKeyUp:_}),a=gw(a)}));_E((e=>wE("button",e=Dw(e))));var Vw=SE((e=>{var t=e,{store:n,shouldRegisterItem:r=!0,getItem:a=qb,element:s}=t,i=Ob(t,["store","shouldRegisterItem","getItem","element"]);const o=kE();n=n||o;const c=P_(i.id),u=(0,l.useRef)(s);return(0,l.useEffect)((()=>{const e=u.current;if(!c)return;if(!e)return;if(!r)return;const t=a({id:c,element:e});return null==n?void 0:n.renderItem(t)}),[c,r,a,n]),i=Ab(Mb({},i),{ref:T_(u,i.ref)})}));_E((e=>wE("div",Vw(e))));function Lw(e,t=!1){const{top:n}=e.getBoundingClientRect();return t?n+e.clientHeight:n}function Bw(e,t,n,r=!1){var a;if(!t)return;if(!n)return;const{renderedItems:s}=t.getState(),i=c_(e);if(!i)return;const o=function(e,t=!1){const n=e.clientHeight,{top:r}=e.getBoundingClientRect(),a=1.5*Math.max(.875*n,n-40),s=t?n-a+r:a+r;return"HTML"===e.tagName?s+e.scrollTop:s}(i,r);let l,c;for(let e=0;e<s.length;e+=1){const s=l;if(l=n(e),!l)break;if(l===s)continue;const i=null==(a=ew(t,l))?void 0:a.element;if(!i)continue;const u=Lw(i,r)-o,d=Math.abs(u);if(r&&u<=0||!r&&u>=0){void 0!==c&&c<d&&(l=s);break}c=d}return l}var zw=SE((e=>{var t=e,{store:n,rowId:r,preventScrollOnKeyDown:a=!1,moveOnKeyPress:s=!0,tabbable:i=!1,getItem:o,"aria-setsize":c,"aria-posinset":u}=t,d=Ob(t,["store","rowId","preventScrollOnKeyDown","moveOnKeyPress","tabbable","getItem","aria-setsize","aria-posinset"]);const m=PE();n=n||m;const p=P_(d.id),h=(0,l.useRef)(null),f=(0,l.useContext)(NE),g=X_(n,(e=>r||(e&&(null==f?void 0:f.baseElement)&&f.baseElement===e.baseElement?f.id:void 0))),y=Kb(d)&&!d.accessibleWhenDisabled,v=(0,l.useCallback)((e=>{const t=Ab(Mb({},e),{id:p||e.id,rowId:g,disabled:!!y});return o?o(t):t}),[p,g,y,o]),b=d.onFocus,_=(0,l.useRef)(!1),E=k_((e=>{if(null==b||b(e),e.defaultPrevented)return;if(h_(e))return;if(!p)return;if(!n)return;const{activeId:t,virtualFocus:r,baseElement:a}=n.getState();if(function(e,t){return!f_(e)&&nw(t,e.target)}(e,n))return;if(t!==p&&n.setActiveId(p),!r)return;if(!f_(e))return;if((s=e.currentTarget).isContentEditable||i_(s)||"INPUT"===s.tagName&&!r_(s))return;var s;if(!(null==a?void 0:a.isConnected))return;_.current=!0;e.relatedTarget===a||nw(n,e.relatedTarget)?function(e){e[tw]=!0,e.focus({preventScroll:!0})}(a):a.focus()})),w=d.onBlurCapture,S=k_((e=>{if(null==w||w(e),e.defaultPrevented)return;const t=null==n?void 0:n.getState();(null==t?void 0:t.virtualFocus)&&_.current&&(_.current=!1,e.preventDefault(),e.stopPropagation())})),x=d.onKeyDown,C=A_(a),k=A_(s),T=k_((e=>{if(null==x||x(e),e.defaultPrevented)return;if(!f_(e))return;if(!n)return;const{currentTarget:t}=e,r=n.getState(),a=n.item(p),s=!!(null==a?void 0:a.rowId),i="horizontal"!==r.orientation,o="vertical"!==r.orientation,l=()=>!!s||(!!o||(!r.baseElement||!i_(r.baseElement))),c={ArrowUp:(s||i)&&n.up,ArrowRight:(s||o)&&n.next,ArrowDown:(s||i)&&n.down,ArrowLeft:(s||o)&&n.previous,Home:()=>{if(l())return!s||e.ctrlKey?null==n?void 0:n.first():null==n?void 0:n.previous(-1)},End:()=>{if(l())return!s||e.ctrlKey?null==n?void 0:n.last():null==n?void 0:n.next(-1)},PageUp:()=>Bw(t,n,null==n?void 0:n.up,!0),PageDown:()=>Bw(t,n,null==n?void 0:n.down)}[e.key];if(c){const t=c();if(C(e)||void 0!==t){if(!k(e))return;e.preventDefault(),n.move(t)}}})),P=X_(n,(e=>(null==e?void 0:e.baseElement)||void 0)),I=(0,l.useMemo)((()=>({id:p,baseElement:P})),[p,P]);d=O_(d,(e=>(0,bE.jsx)(OE.Provider,{value:I,children:e})),[I]);const M=X_(n,(e=>!!e&&e.activeId===p)),A=X_(n,"virtualFocus"),O=function(e,t){const n=t.role,[r,a]=(0,l.useState)(n);return x_((()=>{const t=e.current;t&&a(t.getAttribute("role")||n)}),[n]),r}(h,d);let N;M&&(!function(e){return"option"===e||"treeitem"===e}(O)?A&&function(e){return"option"===e||"tab"===e||"treeitem"===e||"gridcell"===e||"row"===e||"columnheader"===e||"rowheader"===e}(O)&&(N=!0):N=!0);const F=X_(n,(e=>null!=c?c:e&&(null==f?void 0:f.ariaSetSize)&&f.baseElement===e.baseElement?f.ariaSetSize:void 0)),R=X_(n,(e=>{if(null!=u)return u;if(!e)return;if(!(null==f?void 0:f.ariaPosInSet))return;if(f.baseElement!==e.baseElement)return;const t=e.renderedItems.filter((e=>e.rowId===g));return f.ariaPosInSet+t.findIndex((e=>e.id===p))})),D=X_(n,(e=>!(null==e?void 0:e.renderedItems.length)||!e.virtualFocus&&(!!i||e.activeId===p)));return d=Ab(Mb({id:p,"aria-selected":N,"data-active-item":M?"":void 0},d),{ref:T_(h,d.ref),tabIndex:D?d.tabIndex:-1,onFocus:E,onBlurCapture:S,onKeyDown:T}),d=Dw(d),d=Vw(Ab(Mb({store:n},d),{getItem:v,shouldRegisterItem:!!p&&d.shouldRegisterItem})),Ab(Mb({},d),{"aria-setsize":F,"aria-posinset":R})}));EE((e=>wE("button",zw(e))));var Hw=SE((e=>{var t=e,{store:n,value:r,hideOnClick:a,selectValueOnClick:s=!0,setValueOnClick:i,focusOnHover:o=!1,moveOnKeyPress:c=!0,getItem:u}=t,d=Ob(t,["store","value","hideOnClick","selectValueOnClick","setValueOnClick","focusOnHover","moveOnKeyPress","getItem"]);const m=WE();Yb(n=n||m,!1);const p=(0,l.useCallback)((e=>{const t=Ab(Mb({},e),{value:r});return u?u(t):t}),[r,u]),h=n.useState((e=>Array.isArray(e.selectedValue)));i=null!=i?i:!h,a=null!=a?a:null!=r&&!h;const f=d.onClick,g=A_(i),y=A_(s),v=A_(a),b=k_((e=>{null==f||f(e),e.defaultPrevented||function(e){const t=e.currentTarget;if(!t)return!1;const n=t.tagName.toLowerCase();return!!e.altKey&&("a"===n||"button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type)}(e)||function(e){const t=e.currentTarget;if(!t)return!1;const n=m_();if(n&&!e.metaKey)return!1;if(!n&&!e.ctrlKey)return!1;const r=t.tagName.toLowerCase();return"a"===r||"button"===r&&"submit"===t.type||"input"===r&&"submit"===t.type}(e)||(null!=r&&(y(e)&&(null==n||n.setSelectedValue((e=>Array.isArray(e)?e.includes(r)?e.filter((e=>e!==r)):[...e,r]:r))),g(e)&&(null==n||n.setValue(r))),v(e)&&(null==n||n.move(null),null==n||n.hide()))})),_=d.onKeyDown,E=k_((e=>{if(null==_||_(e),e.defaultPrevented)return;const t=null==n?void 0:n.getState().baseElement;if(!t)return;if(iw(t))return;(1===e.key.length||"Backspace"===e.key||"Delete"===e.key)&&(queueMicrotask((()=>t.focus())),i_(t)&&(null==n||n.setValue(t.value)))})),w=n.useState((e=>function(e,t){if(null!=t)return null!=e&&(Array.isArray(e)?e.includes(t):e===t)}(e.selectedValue,r)));h&&null!=w&&(d=Mb({"aria-selected":w},d)),d=O_(d,(e=>(0,bE.jsx)(YE.Provider,{value:r,children:(0,bE.jsx)(KE.Provider,{value:null!=w&&w,children:e})})),[r,w]);const S=n.useState("contentElement");d=Ab(Mb({role:l_(S),children:r},d),{onClick:b,onKeyDown:E});const x=A_(c);return d=zw(Ab(Mb({store:n},d),{getItem:p,moveOnKeyPress:e=>{if(!x(e))return!1;const t=new Event("combobox-item-move"),r=null==n?void 0:n.getState().baseElement;return null==r||r.dispatchEvent(t),!0}})),d=Nw(Mb({store:n,focusOnHover:o},d))})),Gw=EE((e=>wE("div",Hw(e))));function Uw(e){return Zb(e).toLowerCase()}var Ww=SE((e=>{var t=e,{store:n,value:r}=t,a=Ob(t,["store","value"]);const s=WE();n=n||s;const i=(0,l.useContext)(YE),o=null!=r?r:i;Yb(n,!1);const c=n.useState((e=>o&&e.value?e.value:void 0)),u=(0,l.useMemo)((()=>o&&c?function(e,t){t=Uw(t);let n=Uw(e).indexOf(t);const r=[];for(;-1!==n;)0!==n&&r.push((0,bE.jsx)("span",{"data-autocomplete-value":"",children:e.substr(0,n)},r.length)),r.push((0,bE.jsx)("span",{"data-user-value":"",children:e.substr(n,t.length)},r.length)),n=Uw(e=e.substr(n+t.length)).indexOf(t);return e&&r.push((0,bE.jsx)("span",{"data-autocomplete-value":"",children:e},r.length)),r}(o,c):o),[o,c]);return a=Mb({children:u},a)})),jw=_E((e=>wE("span",Ww(e))));const Zw=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Circle,{cx:12,cy:12,r:3}));function qw(e=""){return hi()(e.trim().toLowerCase())}function Yw({filter:e,view:t,onChangeView:n}){const[r,a]=(0,g.useState)(""),s=(0,g.useDeferredValue)(r),i=t.filters.find((t=>t.field===e.field)),o=i?.value,c=(0,g.useMemo)((()=>{const t=qw(s);return e.elements.filter((e=>qw(e.label).includes(t)))}),[e.elements,s]);return(0,l.createElement)(XE,{value:r,setSelectedValue:r=>{const a=t.filters.find((t=>t.field===e.field)),s=a?[...t.filters.map((t=>t.field===e.field?{...t,operator:a.operator||e.operators[0],value:r}:t))]:[...t.filters,{field:e.field,operator:e.operators[0],value:r}];n({...t,page:1,filters:s})},setValue:a},(0,l.createElement)("div",{className:"dataviews-search-widget-filter-combobox__wrapper"},(0,l.createElement)(QE,{render:(0,l.createElement)(_.VisuallyHidden,null)},(0,E.__)("Search items")),(0,l.createElement)(Sw,{autoSelect:"always",placeholder:(0,E.__)("Search"),className:"dataviews-search-widget-filter-combobox__input"}),(0,l.createElement)("div",{className:"dataviews-search-widget-filter-combobox__icon"},(0,l.createElement)(_.Icon,{icon:Va}))),(0,l.createElement)(Mw,{className:"dataviews-search-widget-filter-combobox-list",alwaysVisible:!0},c.map((e=>(0,l.createElement)(Gw,{key:e.value,value:e.value,className:"dataviews-search-widget-filter-combobox-item",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0},(0,l.createElement)("span",{className:"dataviews-search-widget-filter-combobox-item-check"},o===e.value&&(0,l.createElement)(_.Icon,{icon:Zw})),(0,l.createElement)("span",null,(0,l.createElement)(jw,{className:"dataviews-search-widget-filter-combobox-item-value",value:e.label}),!!e.description&&(0,l.createElement)("span",{className:"dataviews-search-widget-filter-combobox-item-description"},e.description))))),!c.length&&(0,l.createElement)("p",null,(0,E.__)("No results found"))))}const Kw=({activeElement:e,filterInView:t,filter:n})=>{if(void 0===e)return n.name;const r={Span1:(0,l.createElement)("span",{className:"dataviews-filter-summary__filter-text-name"}),Span2:(0,l.createElement)("span",{className:"dataviews-filter-summary__filter-text-value"})};return void 0!==e&&t?.operator===wl?(0,g.createInterpolateElement)((0,E.sprintf)((0,E.__)("<Span1>%1$s </Span1><Span2>is %2$s</Span2>"),n.name,e.label),r):void 0!==e&&t?.operator===Sl?(0,g.createInterpolateElement)((0,E.sprintf)((0,E.__)("<Span1>%1$s </Span1><Span2>is not %2$s</Span2>"),n.name,e.label),r):(0,E.sprintf)((0,E.__)("Unknown status for %1$s"),n.name)};function Xw({filter:e,view:t,onChangeView:n}){const r=e.operators?.map((e=>({value:e,label:xl[e]?.label}))),a=t.filters.find((t=>t.field===e.field)),s=a?.operator||e.operators[0];return r.length>1&&(0,l.createElement)(_.__experimentalHStack,{spacing:2,justify:"flex-start",className:"dataviews-filter-summary__operators-container"},(0,l.createElement)(_.FlexItem,{className:"dataviews-filter-summary__operators-filter-name"},e.name),(0,l.createElement)(_.SelectControl,{label:(0,E.__)("Conditions"),value:s,options:r,onChange:r=>{const s=a?[...t.filters.map((t=>t.field===e.field?{...t,operator:r}:t))]:[...t.filters,{field:e.field,operator:r}];n({...t,page:1,filters:s})},size:"small",__nextHasNoMarginBottom:!0,hideLabelFromVision:!0}))}function Jw({addFilterRef:e,openedFilter:t,...n}){const r=(0,g.useRef)(),{filter:a,view:s,onChangeView:i}=n,o=s.filters.find((e=>e.field===a.field)),c=a.elements.find((e=>e.value===o?.value)),u=a.isPrimary,d=void 0!==o?.value,m=!u||d;return(0,l.createElement)(_.Dropdown,{defaultOpen:t===a.field,contentClassName:"dataviews-filter-summary__popover",popoverProps:{placement:"bottom-start",role:"dialog"},onClose:()=>{r.current?.focus()},renderToggle:({isOpen:t,onToggle:n})=>(0,l.createElement)("div",{className:"dataviews-filter-summary__chip-container"},(0,l.createElement)(_.Tooltip,{text:(0,E.sprintf)((0,E.__)("Filter by: %1$s"),a.name.toLowerCase()),placement:"top"},(0,l.createElement)("div",{className:b()("dataviews-filter-summary__chip",{"has-reset":m,"has-values":d}),role:"button",tabIndex:0,onClick:n,onKeyDown:e=>{[wr.ENTER,wr.SPACE].includes(e.keyCode)&&(n(),e.preventDefault())},"aria-pressed":t,"aria-expanded":t,ref:r},(0,l.createElement)(Kw,{activeElement:c,filterInView:o,filter:a}))),m&&(0,l.createElement)(_.Tooltip,{text:u?(0,E.__)("Reset"):(0,E.__)("Remove"),placement:"top"},(0,l.createElement)("button",{className:b()("dataviews-filter-summary__chip-remove",{"has-values":d}),onClick:()=>{i({...s,page:1,filters:s.filters.filter((e=>e.field!==a.field))}),u?r.current?.focus():e.current?.focus()}},(0,l.createElement)(_.Icon,{icon:P})))),renderContent:()=>(0,l.createElement)(_.__experimentalVStack,{spacing:0,justify:"flex-start"},(0,l.createElement)(Xw,{...n}),(0,l.createElement)(Yw,{...n}))})}const{DropdownMenuV2:Qw,DropdownMenuItemV2:$w,DropdownMenuItemLabelV2:eS}=Vo(_.privateApis);const tS=(0,g.forwardRef)((function({filters:e,view:t,onChangeView:n,setOpenedFilter:r},a){if(!e.length||e.every((({isPrimary:e})=>e)))return null;const s=e.filter((e=>!e.isVisible));return(0,l.createElement)(Qw,{trigger:(0,l.createElement)(_.Button,{__experimentalIsFocusable:!0,size:"compact",icon:Za,className:"dataviews-filters-button",variant:"tertiary",disabled:!s.length,ref:a},(0,E.__)("Add filter"))},s.map((e=>(0,l.createElement)($w,{key:e.field,onClick:()=>{r(e.field),n({...t,page:1,filters:[...t.filters||[],{field:e.field,value:void 0,operator:e.operators[0]}]})}},(0,l.createElement)(eS,null,e.name)))))}));function nS({filters:e,view:t,onChangeView:n}){const r=!t.search&&!t.filters?.some((t=>{return void 0!==t.value||(n=t.field,!e.some((e=>e.field===n&&e.isPrimary)));var n}));return(0,l.createElement)(_.Button,{disabled:r,__experimentalIsFocusable:!0,size:"compact",variant:"tertiary",onClick:()=>{n({...t,page:1,search:"",filters:[]})}},(0,E.__)("Reset filters"))}const rS=(0,g.memo)((function({fields:e,view:t,onChangeView:n,openedFilter:r,setOpenedFilter:a}){const s=(0,g.useRef)(),i=[];e.forEach((e=>{if(!e.type)return;const n=Jo(e);if(0!==n.length&&e.type===El){if(!e.elements?.length)return;const r=!!e.filterBy?.isPrimary;i.push({field:e.id,name:e.header,elements:e.elements,operators:n,isVisible:r||t.filters.some((t=>t.field===e.id&&[wl,Sl].includes(t.operator))),isPrimary:r})}})),i.sort(((e,t)=>e.isPrimary&&!t.isPrimary?-1:!e.isPrimary&&t.isPrimary?1:e.name.localeCompare(t.name)));const o=(0,l.createElement)(tS,{key:"add-filter",filters:i,view:t,onChangeView:n,ref:s,setOpenedFilter:a}),c=[...i.map((e=>e.isVisible?(0,l.createElement)(Jw,{key:e.field,filter:e,view:t,onChangeView:n,addFilterRef:s,openedFilter:r}):null)),o];return c.length>1&&c.push((0,l.createElement)(nS,{key:"reset-filters",filters:i,view:t,onChangeView:n})),(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start",style:{width:"fit-content"},wrap:!0},c)})),aS=rS,sS=(0,g.memo)((function({label:e,view:t,onChangeView:n}){const[r,a,s]=(0,ie.useDebouncedInput)(t.search);(0,g.useEffect)((()=>{a(t.search)}),[t]);const i=(0,g.useRef)(n);(0,g.useEffect)((()=>{i.current=n}),[n]),(0,g.useEffect)((()=>{i.current({...t,page:1,search:s})}),[s]);const o=e||(0,E.__)("Search");return(0,l.createElement)(_.SearchControl,{__nextHasNoMarginBottom:!0,onChange:a,value:r,label:o,placeholder:o,size:"compact"})})),iS=sS,oS=e=>e.id,lS=()=>{};function cS({view:e,onChangeView:t,fields:n,search:r=!0,searchLabel:a,actions:s,data:i,getItemId:o=oS,isLoading:c=!1,paginationInfo:u,supportedLayouts:d,onSelectionChange:m=lS,onDetailsChange:p=null,deferredRendering:h=!1}){const[f,y]=(0,g.useState)([]),[v,b]=(0,g.useState)(null);(0,g.useEffect)((()=>{if(f.length>0&&f.some((e=>!i.some((t=>o(t)===e))))){const e=f.filter((e=>i.some((t=>o(t)===e))));y(e),m(i.filter((t=>e.includes(o(t)))))}}),[f,i,o,m]);const E=(0,g.useCallback)((e=>{y(e.map((e=>o(e)))),m(e)}),[y,o,m]),w=Pl.find((t=>t.type===e.type)).component,S=(0,g.useMemo)((()=>n.map((e=>({...e,render:e.render||e.getValue})))),[n]),x=function(e,t){return(0,g.useMemo)((()=>t.some((t=>e.some((e=>e.supportsBulk&&e.isEligible(t)))))),[e,t])}(s,i);return(0,l.createElement)("div",{className:"dataviews-wrapper"},(0,l.createElement)(_.__experimentalHStack,{alignment:"top",justify:"start",className:"dataviews-filters__view-actions"},(0,l.createElement)(_.__experimentalHStack,{justify:"start",className:"dataviews-filters__container",wrap:!0},r&&(0,l.createElement)(iS,{label:a,view:e,onChangeView:t}),(0,l.createElement)(aS,{fields:S,view:e,onChangeView:t,openedFilter:v,setOpenedFilter:b})),[kl,Tl].includes(e.type)&&x&&(0,l.createElement)(il,{actions:s,data:i,onSelectionChange:E,selection:f,getItemId:o}),(0,l.createElement)(wb,{fields:S,view:e,onChangeView:t,supportedLayouts:d})),(0,l.createElement)(w,{fields:S,view:e,onChangeView:t,actions:s,data:i,getItemId:o,isLoading:c,onSelectionChange:E,onDetailsChange:p,selection:f,deferredRendering:h,setOpenedFilter:b}),(0,l.createElement)(ub,{view:e,onChangeView:t,paginationInfo:u}))}function uS({title:e,subTitle:t,actions:n}){return(0,l.createElement)(_.__experimentalHStack,{as:"header",alignment:"left",className:"edit-site-page-header"},(0,l.createElement)(_.FlexBlock,{className:"edit-site-page-header__page-title"},(0,l.createElement)(_.__experimentalHeading,{as:"h2",level:3,weight:500,className:"edit-site-page-header__title"},e),t&&(0,l.createElement)(_.__experimentalText,{as:"p",className:"edit-site-page-header__sub-title"},t)),(0,l.createElement)(_.FlexItem,{className:"edit-site-page-header__actions"},n))}function dS({title:e,subTitle:t,actions:n,children:r,className:a,hideTitleFromUI:s=!1}){const i=b()("edit-site-page",a);return(0,l.createElement)(oe,{className:i,ariaLabel:e},(0,l.createElement)("div",{className:"edit-site-page-content"},!s&&e&&(0,l.createElement)(uS,{title:e,subTitle:t,actions:n}),r),(0,l.createElement)(y.EditorSnackbars,null))}const{useHistory:mS}=Xe(gt.privateApis),pS={id:"move-to-trash",label:(0,E.__)("Move to Trash"),isPrimary:!0,icon:ql,isEligible:({status:e})=>"trash"!==e,supportsBulk:!0,hideModalHeader:!0,RenderModal:({items:e,closeModal:t,onPerform:n})=>{const{createSuccessNotice:r,createErrorNotice:a}=(0,m.useDispatch)(ge.store),{deleteEntityRecord:s}=(0,m.useDispatch)(ye.store);return(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.__experimentalText,null,1===e.length?(0,E.sprintf)((0,E.__)('Are you sure you want to delete "%s"?'),(0,en.decodeEntities)(e[0].title.rendered)):(0,E.sprintf)((0,E.__)("Are you sure you want to delete %d pages?"),e.length)),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,E.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",onClick:async()=>{const i=await Promise.allSettled(e.map((e=>s("postType",e.type,e.id,{},{throwOnError:!0}))));if(i.every((({status:e})=>"fulfilled"===e))){let t;t=1===i.length?(0,E.sprintf)((0,E.__)('"%s" moved to the Trash.'),(0,en.decodeEntities)(e[0].title.rendered)):(0,E.__)("Pages moved to the Trash."),r(t,{type:"snackbar",id:"edit-site-page-trashed"})}else{let e;if(1===i.length)e=i[0].reason?.message?i[0].reason.message:(0,E.__)("An error occurred while moving the post to the trash.");else{const t=new Set,n=i.filter((({status:e})=>"rejected"===e));for(const e of n)e.reason?.message&&t.add(e.reason.message);e=0===t.size?(0,E.__)("An error occurred while moving the posts to the trash."):1===t.size?(0,E.sprintf)((0,E.__)("An error occurred while moving the posts to the trash: %s"),[...t][0]):(0,E.sprintf)((0,E.__)("Some errors occurred while moving the pages to the trash: %s"),[...t].join(",")),a(e,{type:"snackbar"})}}n&&n(),t()}},(0,E.__)("Delete"))))}};const hS={id:"view-post",label:(0,E.__)("View"),isPrimary:!0,icon:Ic,isEligible:e=>"trash"!==e.status,callback(e){const t=e[0];document.location.href=t.link}};const fS={id:"view-post-revisions",label:(0,E.__)("View revisions"),isPrimary:!1,isEligible:e=>{var t,n;if("trash"===e.status)return!1;const r=null!==(t=e?._links?.["predecessor-version"]?.[0]?.id)&&void 0!==t?t:null,a=null!==(n=e?._links?.["version-history"]?.[0]?.count)&&void 0!==n?n:0;return r&&a>1},callback(e){const t=e[0],n=(0,yt.addQueryArgs)("revision.php",{revision:t?._links?.["predecessor-version"]?.[0]?.id});document.location.href=n}};const gS=function({id:e,size:t=["large","medium","thumbnail"],...n}){const{record:r}=(0,ye.useEntityRecord)("root","media",e),a=t.find((e=>!!r?.media_details?.sizes[e])),s=r?.media_details?.sizes[a]?.source_url||r?.source_url;return s?(0,l.createElement)("img",{...n,src:s,alt:r.alt_text}):null},{useLocation:yS,useHistory:vS}=Xe(gt.privateApis),bS=[],_S=window?.__experimentalAdminViews?[Dt,Vt,Lt]:[Dt,Vt];const ES=[{value:"draft",label:(0,E.__)("Draft")},{value:"future",label:(0,E.__)("Scheduled")},{value:"pending",label:(0,E.__)("Pending Review")},{value:"private",label:(0,E.__)("Private")},{value:"publish",label:(0,E.__)("Published")},{value:"trash",label:(0,E.__)("Trash")}],wS="draft,future,pending,private,publish";function SS({item:e,viewType:t}){const{onClick:n}=Et({postId:e.id,postType:e.type,canvas:"edit"}),r=!!e.featured_media,a=t===Dt?["large","full","medium","thumbnail"]:["thumbnail","medium","large","full"],s=r?(0,l.createElement)(gS,{className:"edit-site-page-pages__featured-image",id:e.featured_media,size:a}):null;return t===Lt?s:(0,l.createElement)("button",{className:b()("page-pages-preview-field__button",{"edit-site-page-pages__media-wrapper":t===Vt}),type:"button",onClick:n,"aria-label":e.title?.rendered||(0,E.__)("(no title)")},s)}function xS(){const e="page",[t,n]=function(e){const{params:t}=yS(),{activeView:n="all",isCustom:r="false",layout:a}=t,s=vS(),i=(0,g.useMemo)((()=>{const t="false"===r&&Xl[e].find((({slug:e})=>e===n))?.view;return"false"===r&&a?{...t,type:a,layout:{...Yl[a]||{}}}:t}),[r,n,a,e]),[o,l]=(0,g.useState)(i);(0,g.useEffect)((()=>{i&&l(i)}),[i]);const c=(0,m.useSelect)((e=>{if("true"!==r)return;const{getEditedEntityRecord:t}=e(ye.store);return t("postType","wp_dataviews",Number(n))}),[n,r]),{editEntityRecord:u}=(0,m.useDispatch)(ye.store),d=(0,g.useMemo)((()=>{const e=c?.content&&JSON.parse(c?.content);return e?{...e,layout:{...Yl[e?.type]||{}}}:e}),[c?.content]),p=(0,g.useCallback)((e=>{u("postType","wp_dataviews",c?.id,{content:JSON.stringify(e)})}),[u,c?.id]),h=(0,g.useCallback)((e=>{e.type!==o?.type&&s.push({...t,layout:e.type}),l(e)}),[t,o?.type,s]);return"false"===r?[o,h]:"true"===r&&d?[d,p]:[Xl[e][0].view,h]}(e),r=vS(),{params:a}=yS(),{isCustom:s="false"}=a,i=(0,g.useCallback)((e=>{"false"===s&&t?.type===Lt&&r.push({...a,postId:1===e.length?e[0].id:void 0})}),[r,a,t?.type,s]),o=(0,g.useMemo)((()=>{const e={};return t.filters.forEach((t=>{"status"===t.field&&t.operator===zt&&(e.status=t.value),"author"===t.field&&t.operator===zt?e.author=t.value:"author"===t.field&&t.operator===Ht&&(e.author_exclude=t.value)})),e.status&&""!==e.status||(e.status=wS),{per_page:t.perPage,page:t.page,_embed:"author",order:t.sort?.direction,orderby:t.sort?.field,search:t.search,...e}}),[t]),{records:c,isResolving:u,totalItems:d,totalPages:p}=(0,ye.useEntityRecords)("postType",e,o),{records:h,isResolving:f}=(0,ye.useEntityRecords)("root","user"),y=(0,g.useMemo)((()=>({totalItems:d,totalPages:p})),[d,p]),v=(0,g.useMemo)((()=>[{id:"featured-image",header:(0,E.__)("Featured Image"),getValue:({item:e})=>e.featured_media,render:({item:e})=>(0,l.createElement)(SS,{item:e,viewType:t.type}),enableSorting:!1,width:"1%"},{header:(0,E.__)("Title"),id:"title",getValue:({item:e})=>e.title?.rendered,render:({item:e})=>[Vt,Dt].includes(t.type)?(0,l.createElement)(wt,{params:{postId:e.id,postType:e.type,canvas:"edit"}},(0,en.decodeEntities)(e.title?.rendered)||(0,E.__)("(no title)")):(0,en.decodeEntities)(e.title?.rendered)||(0,E.__)("(no title)"),maxWidth:300,enableHiding:!1},{header:(0,E.__)("Author"),id:"author",getValue:({item:e})=>e._embedded?.author[0]?.name,type:Bt,elements:h?.map((({id:e,name:t})=>({value:e,label:t})))||[]},{header:(0,E.__)("Status"),id:"status",getValue:({item:e})=>{var t;return null!==(t=ES.find((({value:t})=>t===e.status))?.label)&&void 0!==t?t:e.status},type:Bt,elements:ES,enableSorting:!1,filterBy:{operators:[zt]}},{header:(0,E.__)("Date"),id:"date",getValue:({item:e})=>e.date,render:({item:e})=>{const t=(0,ba.dateI18n)((0,ba.getSettings)().formats.datetimeAbbreviated,(0,ba.getDate)(e.date));return(0,l.createElement)("time",null,t)}}]),[h,t.type]),b=function(){const{createSuccessNotice:e,createErrorNotice:t}=(0,m.useDispatch)(ge.store),{deleteEntityRecord:n}=(0,m.useDispatch)(ye.store);return(0,g.useMemo)((()=>({id:"permanently-delete",label:(0,E.__)("Permanently delete"),isPrimary:!0,icon:ql,supportsBulk:!0,isEligible:({status:e})=>"trash"===e,async callback(r){const a=await Promise.allSettled(r.map((e=>n("postType",e.type,e.id,{force:!0},{throwOnError:!0}))));if(a.every((({status:e})=>"fulfilled"===e))){let t;t=1===a.length?(0,E.sprintf)((0,E.__)('"%s" permanently deleted.'),(0,en.decodeEntities)(r[0].title.rendered)):(0,E.__)("The posts were permanently deleted."),e(t,{type:"snackbar",id:"edit-site-post-permanently-deleted"})}else{let e;if(1===a.length)e=a[0].reason?.message?a[0].reason.message:(0,E.__)("An error occurred while permanently deleting the post.");else{const n=new Set,r=a.filter((({status:e})=>"rejected"===e));for(const e of r)e.reason?.message&&n.add(e.reason.message);e=0===n.size?(0,E.__)("An error occurred while permanently deleting the posts."):1===n.size?(0,E.sprintf)((0,E.__)("An error occurred while permanently deleting the posts: %s"),[...n][0]):(0,E.sprintf)((0,E.__)("Some errors occurred while permanently deleting the posts: %s"),[...n].join(",")),t(e,{type:"snackbar"})}}}})),[e,t,n])}(),w=function(){const{createSuccessNotice:e,createErrorNotice:t}=(0,m.useDispatch)(ge.store),{editEntityRecord:n,saveEditedEntityRecord:r}=(0,m.useDispatch)(ye.store);return(0,g.useMemo)((()=>({id:"restore",label:(0,E.__)("Restore"),isPrimary:!0,icon:_a,supportsBulk:!0,isEligible:({status:e})=>"trash"===e,async callback(a){try{for(const e of a)await n("postType",e.type,e.id,{status:"draft"}),await r("postType",e.type,e.id,{throwOnError:!0});e(a.length>1?(0,E.sprintf)((0,E.__)("%d posts have been restored."),a.length):(0,E.sprintf)((0,E.__)('"%s" has been restored.'),(0,en.decodeEntities)(a[0].title.rendered)),{type:"snackbar",id:"edit-site-post-restored"})}catch(e){let n;n=e.message&&"unknown_error"!==e.code&&e.message?e.message:a.length>1?(0,E.__)("An error occurred while restoring the posts."):(0,E.__)("An error occurred while restoring the post."),t(n,{type:"snackbar"})}}})),[e,t,n,r])}(),S=function(){const e=mS();return(0,g.useMemo)((()=>({id:"edit-post",label:(0,E.__)("Edit"),isEligible:({status:e})=>"trash"!==e,callback(t){const n=t[0];e.push({postId:n.id,postType:n.type,canvas:"edit"})}})),[e])}(),x=(0,g.useMemo)((()=>[hS,pS,w,b,S,fS]),[b,w,S]),C=(0,g.useCallback)((e=>{e.type!==t.type&&(e={...e,layout:{...Yl[e.type]}}),n(e)}),[t.type,n]),[k,T]=(0,g.useState)(!1),P=(0,g.useCallback)((()=>{k||T(!0)}),[k]),I=(0,g.useCallback)((()=>{k&&T(!1)}),[k]),M=(0,g.useCallback)((({type:e,id:t})=>{r.push({postId:t,postType:e,canvas:"edit"}),I()}),[r]);return(0,l.createElement)(dS,{title:(0,E.__)("Pages"),actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.Button,{variant:"primary",onClick:P},(0,E.__)("Add new page")),k&&(0,l.createElement)(Hl,{onSave:M,onClose:I}))},(0,l.createElement)(cS,{paginationInfo:y,fields:v,actions:x,data:c||bS,isLoading:u||f,view:t,onChangeView:C,onSelectionChange:i,supportedLayouts:_S}))}const CS=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{d:"M18.5 10.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"})),kS=(0,l.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(w.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),TS=(0,l.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(w.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"})),PS=window.wp.reusableBlocks,{useHistory:IS}=Xe(gt.privateApis),{CreatePatternModalContents:MS,useDuplicatePatternProps:AS}=Xe(St.privateApis),OS={id:"export-pattern",label:(0,E.__)("Export as JSON"),isEligible:e=>e.type===It.user,callback:([e])=>{const t={__file:e.type,title:e.title||e.name,content:e.patternPost.content.raw,syncStatus:e.patternPost.wp_pattern_sync_status};return(0,Zc.downloadBlob)(`${_s(e.title||e.name)}.json`,JSON.stringify(t,null,2),"application/json")}},NS={id:"rename-pattern",label:(0,E.__)("Rename"),isEligible:e=>{const t=e.type===kt,n=e.type===It.user||t&&e.isCustom,r=t&&e.templatePart.has_theme_file;return n&&!r},RenderModal:({items:e,closeModal:t})=>{const[n]=e,[r,a]=(0,g.useState)((()=>n.title)),{editEntityRecord:s,saveEditedEntityRecord:i}=(0,m.useDispatch)(ye.store),{createSuccessNotice:o,createErrorNotice:c}=(0,m.useDispatch)(ge.store);return(0,l.createElement)("form",{onSubmit:async function(e){e.preventDefault();try{await s("postType",n.type,n.id,{title:r}),a(""),t(),await i("postType",n.type,n.id,{throwOnError:!0}),o(n.type===kt?(0,E.__)("Template part renamed."):(0,E.__)("Pattern renamed."),{type:"snackbar"})}catch(e){const t=n.type===kt?(0,E.__)("An error occurred while renaming the template part."):(0,E.__)("An error occurred while renaming the pattern."),r=e.message&&"unknown_error"!==e.code?e.message:t;c(r,{type:"snackbar"})}}},(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,E.__)("Name"),value:r,onChange:a,required:!0}),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t()}},(0,E.__)("Cancel")),(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit"},(0,E.__)("Save")))))}},FS=e=>{const t=e.type===kt;return e.type===It.user||t&&e.isCustom},RS={id:"delete-pattern",label:(0,E.__)("Delete"),isEligible:e=>{const t=e.type===kt&&e.templatePart.has_theme_file;return FS(e)&&!t},hideModalHeader:!0,supportsBulk:!0,RenderModal:({items:e,closeModal:t,onPerform:n})=>{const{__experimentalDeleteReusableBlock:r}=(0,m.useDispatch)(PS.store),{createErrorNotice:a,createSuccessNotice:s}=(0,m.useDispatch)(ge.store),{removeTemplates:i}=Xe((0,m.useDispatch)(tr));let o;return o=1===e.length?(0,E.sprintf)((0,E.__)('Are you sure you want to delete "%s"?'),(0,en.decodeEntities)(e[0].title||e[0].name)):e.length>1&&e[0].type===kt?(0,E.sprintf)((0,E.__)("Are you sure you want to delete %d template parts?"),e.length):(0,E.sprintf)((0,E.__)("Are you sure you want to delete %d patterns?"),e.length),(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.__experimentalText,null,o),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,E.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",onClick:()=>{e[0].type===kt?i(e):(async()=>{const t=await Promise.allSettled(e.map((e=>r(e.id))));if(t.every((({status:e})=>"fulfilled"===e))){let n;n=1===t.length?(0,E.sprintf)((0,E.__)('"%s" deleted.'),e[0].title):(0,E.__)("The patterns were deleted."),s(n,{type:"snackbar",id:"edit-site-page-trashed"})}else{let e;if(1===t.length)e=t[0].reason?.message?t[0].reason.message:(0,E.__)("An error occurred while deleting the pattern.");else{const n=new Set,r=t.filter((({status:e})=>"rejected"===e));for(const e of r)e.reason?.message&&n.add(e.reason.message);e=0===n.size?(0,E.__)("An error occurred while deleting the patterns."):1===n.size?(0,E.sprintf)((0,E.__)("An error occurred while deleting the patterns: %s"),[...n][0]):(0,E.sprintf)((0,E.__)("Some errors occurred while deleting the patterns: %s"),[...n].join(",")),a(e,{type:"snackbar"})}}})(),n&&n(),t()}},(0,E.__)("Delete"))))}},DS={id:"reset-action",label:(0,E.__)("Clear customizations"),isEligible:e=>{const t=e.type===kt&&e.templatePart.has_theme_file;return FS(e)&&t},hideModalHeader:!0,RenderModal:({items:e,closeModal:t})=>{const[n]=e,{removeTemplate:r}=(0,m.useDispatch)(tr);return(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.__experimentalText,null,(0,E.__)("Are you sure you want to clear these customizations?")),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,E.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",onClick:()=>r(n)},(0,E.__)("Clear"))))}},VS={id:"duplicate-pattern",label:(0,E._x)("Duplicate","action label"),isEligible:e=>e.type!==kt,modalHeader:(0,E._x)("Duplicate pattern","action label"),RenderModal:({items:e,closeModal:t})=>{const[n]=e,{categoryId:r=Mt}=(0,yt.getQueryArgs)(window.location.href),a=n.type===It.theme,s=IS();const i=AS({pattern:a?n:n.patternPost,onSuccess:function({pattern:e}){s.push({categoryType:It.theme,categoryId:r,postType:It.user,postId:e.id}),t()}});return(0,l.createElement)(MS,{onClose:t,confirmLabel:(0,E._x)("Duplicate","action label"),...i})}},LS={id:"duplicate-template-part",label:(0,E._x)("Duplicate","action label"),isEligible:e=>e.type===kt,modalHeader:(0,E._x)("Duplicate template part","action label"),RenderModal:({items:e,closeModal:t})=>{const[n]=e,{createSuccessNotice:r}=(0,m.useDispatch)(ge.store),{categoryId:a=Mt}=(0,yt.getQueryArgs)(window.location.href),s=IS();return(0,l.createElement)(ti,{blocks:n.blocks,defaultArea:n.templatePart.area,defaultTitle:(0,E.sprintf)((0,E.__)("%s (Copy)"),n.title),onCreate:async function(e){r((0,E.sprintf)((0,E.__)('"%s" duplicated.'),n.title),{type:"snackbar",id:"edit-site-patterns-success"}),s.push({postType:kt,postId:e?.id,categoryType:kt,categoryId:a}),t()},onError:t,confirmLabel:(0,E._x)("Duplicate","action label")})}};function BS(){var e;const t=(0,m.useSelect)((e=>{const{getSettings:t}=Xe(e(tr));return t()}),[]),n=null!==(e=t.__experimentalAdditionalBlockPatterns)&&void 0!==e?e:t.__experimentalBlockPatterns,r=(0,m.useSelect)((e=>e(ye.store).getBlockPatterns()),[]),a=(0,g.useMemo)((()=>[...n||[],...r||[]].filter(li)),[n,r]);return(0,g.useMemo)((()=>{const{__experimentalAdditionalBlockPatterns:e,...n}=t;return{...n,__experimentalBlockPatterns:a,__unstableIsPreviewMode:!0}}),[t,a])}const{RenamePatternCategoryModal:zS}=Xe(St.privateApis);function HS({category:e,onClose:t}){const[n,r]=(0,g.useState)(!1);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{onClick:()=>r(!0)},(0,E.__)("Rename")),n&&(0,l.createElement)(GS,{category:e,onClose:()=>{r(!1),t()}}))}function GS({category:e,onClose:t}){const n={id:e.id,slug:e.slug,name:e.label},r=Oi();return(0,l.createElement)(zS,{category:n,existingCategories:r,onClose:t,overlayClassName:"edit-site-list__rename-modal"})}const{useHistory:US}=Xe(gt.privateApis);function WS({category:e,onClose:t}){const[n,r]=(0,g.useState)(!1),a=US(),{createSuccessNotice:s,createErrorNotice:i}=(0,m.useDispatch)(ge.store),{deleteEntityRecord:o,invalidateResolution:c}=(0,m.useDispatch)(ye.store);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{isDestructive:!0,onClick:()=>r(!0)},(0,E.__)("Delete")),(0,l.createElement)(_.__experimentalConfirmDialog,{isOpen:n,onConfirm:async()=>{try{await o("taxonomy","wp_pattern_category",e.id,{force:!0},{throwOnError:!0}),c("getUserPatternCategories"),c("getEntityRecords",["postType",It.user,{per_page:-1}]),s((0,E.sprintf)((0,E.__)('"%s" deleted.'),e.label),{type:"snackbar",id:"pattern-category-delete"}),t?.(),a.push({path:"/patterns",categoryType:It.theme,categoryId:Mt})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,E.__)("An error occurred while deleting the pattern category.");i(t,{type:"snackbar",id:"pattern-category-delete"})}},onCancel:()=>r(!1),confirmButtonText:(0,E.__)("Delete"),className:"edit-site-patterns__delete-modal"},(0,E.sprintf)((0,E.__)('Are you sure you want to delete the category "%s"? The patterns will not be deleted.'),(0,en.decodeEntities)(e.label))))}function jS({categoryId:e,type:t,titleId:n,descriptionId:r}){const{patternCategories:a}=Oi(),s=(0,m.useSelect)((e=>e(y.store).__experimentalGetDefaultTemplatePartAreas()),[]);let i,o,c;if(t===kt){const t=s.find((t=>t.area===e));i=t?.label,o=t?.description}else t===It.theme&&(c=a.find((t=>t.name===e)),i=c?.label,o=c?.description);return i?(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-patterns__section-header"},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(_.__experimentalHeading,{as:"h2",level:4,id:n},i),!!c?.id&&(0,l.createElement)(_.DropdownMenu,{icon:ue,label:(0,E.__)("Actions"),toggleProps:{className:"edit-site-patterns__button",describedBy:(0,E.sprintf)((0,E.__)("Action menu for %s pattern category"),i)}},(({onClose:e})=>(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(HS,{category:c,onClose:e}),(0,l.createElement)(WS,{category:c,onClose:e}))))),o?(0,l.createElement)(_.__experimentalText,{variant:"muted",as:"p",id:r},o):null):null}const{ExperimentalBlockEditorProvider:ZS,useGlobalStyle:qS}=Xe(fe.privateApis),YS={header:CS,footer:kS,uncategorized:Ks},KS=[],XS={[Dt]:{mediaField:"preview",primaryField:"title"}},JS={type:Dt,search:"",page:1,perPage:20,hiddenFields:["sync-status"],layout:{...XS[Dt]},filters:[]},QS=[{value:Nt.full,label:(0,E._x)("Synced","Option that shows all synchronized patterns"),description:(0,E.__)("Patterns that are kept in sync across the site.")},{value:Nt.unsynced,label:(0,E._x)("Not synced","Option that shows all patterns that are not synchronized"),description:(0,E.__)("Patterns that can be changed freely without affecting the site.")}];function $S({item:e,onClick:t,ariaDescribedBy:n,children:r}){return e.type===It.theme?r:(0,l.createElement)("button",{className:"page-patterns-preview-field__button",type:"button",onClick:t,"aria-label":e.title,"aria-describedby":n},r)}function ex({item:e,categoryId:t,viewType:n}){const r=(0,g.useId)(),a=e.type===It.user,s=e.type===It.theme,i=e.type===kt,o=!e.blocks?.length,c=[];a||i&&e.isCustom?c.push((0,E.__)("Press Enter to edit, or Delete to delete the pattern.")):e.description&&c.push(e.description),s&&c.push((0,E.__)("Theme & plugin patterns cannot be edited."));const[u]=qS("color.background"),{onClick:d}=Et({postType:e.type,postId:a?e.id:e.name,categoryId:t,categoryType:i?e.type:It.theme});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:`page-patterns-preview-field is-viewtype-${n}`,style:{backgroundColor:u}},(0,l.createElement)($S,{item:e,onClick:d,ariaDescribedBy:c.length?c.map(((e,t)=>`${r}-${t}`)).join(" "):void 0},o&&i&&(0,E.__)("Empty template part"),o&&!i&&(0,E.__)("Empty pattern"),!o&&(0,l.createElement)(fe.BlockPreview,{blocks:e.blocks}))),c.map(((e,t)=>(0,l.createElement)("div",{key:t,hidden:!0,id:`${r}-${t}`},e))))}function tx({item:e,categoryId:t}){const n=e.type===It.user,r=e.type===It.theme,a=e.type===kt;let s;const{onClick:i}=Et({postType:e.type,postId:n?e.id:e.name,categoryId:t,categoryType:a?e.type:It.theme});return s=!n&&YS[t]?YS[t]:e.syncStatus===Nt.full?cr:void 0,(0,l.createElement)(_.__experimentalHStack,{alignment:"center",justify:"flex-start",spacing:2},(0,l.createElement)(_.Flex,{as:"div",gap:0,justify:"left",className:"edit-site-patterns__pattern-title"},e.type===It.theme?e.title:(0,l.createElement)(_.Button,{variant:"link",onClick:i,tabIndex:"-1"},e.title||e.name)),s&&!r&&(0,l.createElement)(_.Tooltip,{placement:"top",text:(0,E.__)("Editing this pattern will also update anywhere it is used")},(0,l.createElement)(fr,{className:"edit-site-patterns__pattern-icon",icon:s})),e.type===It.theme&&(0,l.createElement)(_.Tooltip,{placement:"top",text:(0,E.__)("This pattern cannot be edited.")},(0,l.createElement)(fr,{className:"edit-site-patterns__pattern-lock-icon",icon:TS,size:24})))}function nx(){const{categoryType:e,categoryId:t=Mt}=(0,yt.getQueryArgs)(window.location.href),n=e||It.theme,[r,a]=(0,g.useState)(JS),s=n===It.theme&&"uncategorized"===t,i=(0,ie.usePrevious)(t),o=r.filters?.find((({field:e})=>"sync-status"===e))?.value,{patterns:c,isResolving:u}=Ai(n,s?"":t,{search:r.search,syncStatus:o}),d=(0,g.useMemo)((()=>{const e=[{header:(0,E.__)("Preview"),id:"preview",render:({item:e})=>(0,l.createElement)(ex,{item:e,categoryId:t,viewType:r.type}),enableSorting:!1,enableHiding:!1},{header:(0,E.__)("Title"),id:"title",getValue:({item:e})=>e.title,render:({item:e})=>(0,l.createElement)(tx,{item:e,categoryId:t}),enableHiding:!1}];return n===It.theme&&e.push({header:(0,E.__)("Sync Status"),id:"sync-status",render:({item:e})=>QS.find((({value:t})=>t===e.syncStatus))?.label||QS.find((({value:e})=>e===Nt.unsynced)).label,type:Bt,elements:QS,filterBy:{operators:[zt],isPrimary:!0},enableSorting:!1}),e}),[r.type,t,n]);(0,g.useEffect)((()=>{i!==t&&a(JS)}),[t,i]);const{data:m,paginationInfo:p}=(0,g.useMemo)((()=>{if(!c)return{data:KS,paginationInfo:{totalItems:0,totalPages:0}};let e=[...c];return r.sort&&(e=Ko({data:e,view:r,fields:d,textFields:["title","author"]})),Xo({data:e,view:r})}),[c,r,d]),h=(0,g.useMemo)((()=>[NS,VS,LS,OS,DS,RS]),[]),f=(0,g.useCallback)((e=>{e.type!==r.type&&(e={...e,layout:{...XS[e.type]}}),a(e)}),[r.type,a]),y=(0,g.useId)(),v=BS();return(0,l.createElement)(ZS,{settings:v},(0,l.createElement)(dS,{title:(0,E.__)("Patterns content"),className:"edit-site-page-patterns-dataviews",hideTitleFromUI:!0},(0,l.createElement)(jS,{categoryId:t,type:n,titleId:`${y}-title`,descriptionId:`${y}-description`}),(0,l.createElement)(cS,{paginationInfo:p,fields:d,actions:h,data:m||KS,getItemId:e=>e.name,isLoading:u,view:r,onChangeView:f,deferredRendering:!0,supportedLayouts:[Dt]})))}const rx={id:"delete-template",label:(0,E.__)("Delete"),isPrimary:!0,icon:ql,isEligible:Hs,supportsBulk:!0,hideModalHeader:!0,RenderModal:({items:e,closeModal:t,onPerform:n})=>{const{removeTemplates:r}=Xe((0,m.useDispatch)(tr));return(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.__experimentalText,null,e.length>1?(0,E.sprintf)((0,E._n)("Delete %d item?","Delete %d items?",e.length),e.length):(0,E.sprintf)((0,E.__)('Delete "%s"?'),(0,en.decodeEntities)(e?.[0]?.title?.rendered))),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,E.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",onClick:async()=>{await r(e,{allowUndo:!1}),n&&n(),t()}},(0,E.__)("Delete"))))}},ax={id:"rename-template",label:(0,E.__)("Rename"),isEligible:e=>!(!Hs(e)||e.type===Ct&&!e.is_custom),RenderModal:({items:e,closeModal:t})=>{const n=e[0],r=(0,en.decodeEntities)(n.title.rendered),[a,s]=(0,g.useState)(r),{editEntityRecord:i,__experimentalSaveSpecifiedEntityEdits:o}=(0,m.useDispatch)(ye.store),{createSuccessNotice:c,createErrorNotice:u}=(0,m.useDispatch)(ge.store);return(0,l.createElement)("form",{onSubmit:async function(e){e.preventDefault();try{await i("postType",n.type,n.id,{title:a}),s(""),t(),await o("postType",n.type,n.id,["title"],{throwOnError:!0}),c(n.type===Ct?(0,E.__)("Template renamed."):(0,E.__)("Template part renamed."),{type:"snackbar"})}catch(e){const t=n.type===Ct?(0,E.__)("An error occurred while renaming the template."):(0,E.__)("An error occurred while renaming the template part."),r=e.message&&"unknown_error"!==e.code?e.message:t;u(r,{type:"snackbar"})}}},(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,label:(0,E.__)("Name"),value:a,onChange:s,required:!0}),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,E.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",type:"submit"},(0,E.__)("Save")))))}},{useHistory:sx}=Xe(gt.privateApis);function ix(){const{canCreate:e,postType:t}=(0,m.useSelect)((e=>{const{supportsTemplatePartsMode:t}=e(tr).getSettings();return{canCreate:!t,postType:e(ye.store).getPostType(kt)}}),[]),[n,r]=(0,g.useState)(!1),a=sx();return e&&t?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.Button,{variant:"primary",onClick:()=>r(!0)},t.labels.add_new_item),n&&(0,l.createElement)(ei,{closeModal:()=>r(!1),blocks:[],onCreate:e=>{r(!1),a.push({postId:e.id,postType:kt,canvas:"edit"})},onError:()=>r(!1)})):null}const{ExperimentalBlockEditorProvider:ox,useGlobalStyle:lx}=Xe(fe.privateApis),{useHistory:cx,useLocation:ux}=Xe(gt.privateApis),dx=[],mx=window?.__experimentalAdminViews?[Vt,Dt,Lt]:[Vt,Dt],px={[Vt]:{primaryField:"title"},[Dt]:{mediaField:"preview",primaryField:"title"},[Lt]:{primaryField:"title",mediaField:"preview"}},hx={type:Vt,search:"",page:1,perPage:20,sort:{field:"title",direction:"asc"},hiddenFields:["preview"],layout:px[Vt],filters:[]};function fx(e=""){return hi()(e.trim().toLowerCase())}function gx({item:e,viewType:t}){if(t===Lt)return(0,en.decodeEntities)(e.title?.rendered)||(0,E.__)("(no title)");const n={params:{postId:e.id,postType:e.type,canvas:"edit"}};return e.type===kt&&(n.state={backPath:"/wp_template_part/all"}),(0,l.createElement)(wt,{...n},(0,en.decodeEntities)(e.title?.rendered)||(0,E.__)("(no title)"))}function yx({item:e,viewType:t}){const{text:n,icon:r,imageUrl:a}=Bs(e.type,e.id),s=t!==Lt;return(0,l.createElement)(_.__experimentalHStack,{alignment:"left",spacing:1},s&&a&&(0,l.createElement)(zs,{imageUrl:a}),s&&!a&&(0,l.createElement)("div",{className:"edit-site-list-added-by__icon"},(0,l.createElement)(_.Icon,{icon:r})),(0,l.createElement)("span",null,n))}function vx({item:e,viewType:t}){const n=BS(),[r="white"]=lx("color.background"),a=(0,g.useMemo)((()=>(0,u.parse)(e.content.raw)),[e.content.raw]),{onClick:s}=Et({postId:e.id,postType:e.type,canvas:"edit"}),i=!a?.length;return(0,l.createElement)(ox,{settings:n},(0,l.createElement)("div",{className:`page-templates-preview-field is-viewtype-${t}`,style:{backgroundColor:r}},t===Lt&&!i&&(0,l.createElement)(fe.BlockPreview,{blocks:a}),t!==Lt&&(0,l.createElement)("button",{className:"page-templates-preview-field__button",type:"button",onClick:s,"aria-label":e.title?.rendered||e.title},i&&(e.type===Ct?(0,E.__)("Empty template"):(0,E.__)("Empty template part")),!i&&(0,l.createElement)(fe.BlockPreview,{blocks:a}))))}function bx({postType:e}){const{params:t}=ux(),{activeView:n="all",layout:r}=t,a=(0,g.useMemo)((()=>{const e=window?.__experimentalAdminViews&&null!=r?r:hx.type;return{...hx,type:e,layout:px[e],filters:"all"!==n?[{field:"author",operator:"in",value:n}]:[]}}),[r,n]),[s,i]=(0,g.useState)(a);(0,g.useEffect)((()=>{i((e=>({...e,filters:"all"!==n?[{field:"author",operator:"in",value:n}]:[]})))}),[n]);const{records:o,isResolving:c}=(0,ye.useEntityRecords)("postType",e,{per_page:-1}),u=cx(),d=(0,g.useCallback)((e=>{s?.type===Lt&&u.push({...t,postId:1===e.length?e[0].id:void 0})}),[u,t,s?.type]),p=(0,g.useMemo)((()=>{if(!o)return dx;const e=new Set;return o.forEach((t=>{e.add(t.author_text)})),Array.from(e).map((e=>({value:e,label:e})))}),[o]),h=(0,g.useMemo)((()=>{const t=[{header:(0,E.__)("Preview"),id:"preview",render:({item:e})=>(0,l.createElement)(vx,{item:e,viewType:s.type}),minWidth:120,maxWidth:120,enableSorting:!1},{header:e===Ct?(0,E.__)("Template"):(0,E.__)("Template Part"),id:"title",getValue:({item:e})=>e.title?.rendered,render:({item:e})=>(0,l.createElement)(gx,{item:e,viewType:s.type}),maxWidth:400,enableHiding:!1}];return e===Ct&&t.push({header:(0,E.__)("Description"),id:"description",getValue:({item:e})=>e.description,render:({item:e})=>e.description?(0,l.createElement)("span",{className:"page-templates-description"},(0,en.decodeEntities)(e.description)):s.type===Vt&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalText,{variant:"muted","aria-hidden":"true"},"—"),(0,l.createElement)(_.VisuallyHidden,null,(0,E.__)("No description."))),maxWidth:400,minWidth:320,enableSorting:!1}),t.push({header:(0,E.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:({item:e})=>(0,l.createElement)(yx,{viewType:s.type,item:e}),type:Bt,elements:p,width:"1%"}),t}),[e,p,s.type]),{data:f,paginationInfo:y}=(0,g.useMemo)((()=>{if(!o)return{data:dx,paginationInfo:{totalItems:0,totalPages:0}};let e=[...o];if(s.search){const t=fx(s.search);e=e.filter((e=>fx(e.title?.rendered||e.slug).includes(t)||fx(e.description).includes(t)))}return s.filters.length>0&&s.filters.forEach((t=>{"author"===t.field&&t.operator===zt&&t.value?e=e.filter((e=>e.author_text===t.value)):"author"===t.field&&t.operator===Ht&&t.value&&(e=e.filter((e=>e.author_text!==t.value)))})),s.sort&&(e=Ko({data:e,view:s,fields:h,textFields:["title","author"]})),Xo({data:e,view:s})}),[o,s,h]),v=function(){const{revertTemplate:e}=(0,m.useDispatch)(tr),{saveEditedEntityRecord:t}=(0,m.useDispatch)(ye.store),{createSuccessNotice:n,createErrorNotice:r}=(0,m.useDispatch)(ge.store);return(0,g.useMemo)((()=>({id:"reset-template",label:(0,E.__)("Reset"),isPrimary:!0,icon:_a,isEligible:$t,supportsBulk:!0,async callback(a){try{for(const n of a)await e(n,{allowUndo:!1}),await t("postType",n.type,n.id);n(a.length>1?(0,E.sprintf)((0,E.__)("%s items reverted."),a.length):(0,E.sprintf)((0,E.__)('"%s" reverted.'),(0,en.decodeEntities)(a[0].title.rendered)),{type:"snackbar",id:"edit-site-template-reverted"})}catch(e){let t;t=a[0].type===Ct?1===a.length?(0,E.__)("An error occurred while reverting the template."):(0,E.__)("An error occurred while reverting the templates."):1===a.length?(0,E.__)("An error occurred while reverting the template part."):(0,E.__)("An error occurred while reverting the template parts.");const n=e.message&&"unknown_error"!==e.code?e.message:t;r(n,{type:"snackbar"})}}})),[r,n,e,t])}(),b=(0,g.useMemo)((()=>[v,rx,ax,fS]),[v]),w=(0,g.useCallback)((e=>{e.type!==s.type&&(e={...e,layout:{...px[e.type]}},u.push({...t,layout:e.type})),i(e)}),[s.type,i,u,t]);return(0,l.createElement)(dS,{className:"edit-site-page-template-template-parts-dataviews",title:e===Ct?(0,E.__)("Templates"):(0,E.__)("Template Parts"),actions:e===Ct?(0,l.createElement)(Is,{templateType:e,showIcon:!1,toggleProps:{variant:"primary"}}):(0,l.createElement)(ix,null)},(0,l.createElement)(cS,{paginationInfo:y,fields:h,actions:b,data:f,isLoading:c,view:s,onChangeView:w,onSelectionChange:d,deferredRendering:!s.hiddenFields?.includes("preview"),supportedLayouts:mx}))}const{useLocation:_x}=Xe(gt.privateApis);const{useCommands:Ex}=Xe(ar.privateApis),{useCommandContext:wx}=Xe(rr.privateApis),{useGlobalStyle:Sx}=Xe(fe.privateApis),xx=.5;function Cx(){Bi(),function(){const e=yu(),{params:t}=gu(),n=(0,m.useSelect)((e=>Xe(e(tr)).getCanvasMode()),[]),{setCanvasMode:r}=Xe((0,m.useDispatch)(tr)),a=(0,g.useRef)(n),{canvas:s}=t,i=(0,g.useRef)(s),o=(0,g.useRef)(t);(0,g.useEffect)((()=>{o.current=t}),[t]),(0,g.useEffect)((()=>{a.current=n,"init"!==n&&("edit"===n&&i.current!==n&&e.push({...o.current,canvas:"edit"}),"view"===n&&void 0!==i.current&&e.push({...o.current,canvas:void 0}))}),[n,e]),(0,g.useEffect)((()=>{i.current=s,"edit"!==s&&"view"!==a.current?r("view"):"edit"===s&&"edit"!==a.current&&r("edit")}),[s,r])}(),Ex(),(0,rr.useCommandLoader)({name:"core/exit-code-editor",hook:ed,context:"site-editor-edit"}),(0,rr.useCommandLoader)({name:"core/edit-site/page-content-focus",hook:$u,context:"site-editor-edit"}),(0,rr.useCommandLoader)({name:"core/edit-site/manipulate-document",hook:td}),(0,rr.useCommandLoader)({name:"core/edit-site/patterns",hook:rd,context:"site-editor-edit"}),(0,rr.useCommandLoader)({name:"core/edit-site/edit-ui",hook:nd}),function(){const e=(0,m.useSelect)((e=>{const{getUnstableBase:t}=e(ye.store);return t()?.home}),[]);(0,rr.useCommand)({name:"core/edit-site/view-site",label:(0,E.__)("View site"),callback:({close:t})=>{t(),window.open(e,"_blank")},icon:Ic}),(0,rr.useCommandLoader)({name:"core/edit-site/open-styles",hook:Fu}),(0,rr.useCommandLoader)({name:"core/edit-site/toggle-styles-welcome-guide",hook:Ru}),(0,rr.useCommandLoader)({name:"core/edit-site/reset-global-styles",hook:Du}),(0,rr.useCommandLoader)({name:"core/edit-site/open-styles-css",hook:Vu}),(0,rr.useCommandLoader)({name:"core/edit-site/open-styles-revisions",hook:Lu})}(),(0,fe.useBlockCommands)();const e=(0,ie.useViewportMatch)("medium","<"),{isDistractionFree:t,hasFixedToolbar:n,hasBlockSelected:r,canvasMode:a,previousShortcut:s,nextShortcut:i}=(0,m.useSelect)((e=>{const{getAllShortcutKeyCombinations:t}=e(nr.store),{getCanvasMode:n}=Xe(e(tr));return{canvasMode:n(),previousShortcut:t("core/edit-site/previous-region"),nextShortcut:t("core/edit-site/next-region"),hasFixedToolbar:e(T.store).get("core","fixedToolbar"),isDistractionFree:e(T.store).get("core","distractionFree"),hasBlockSelected:e(fe.store).getBlockSelectionStart()}}),[]),o=(0,_.__unstableUseNavigateRegions)({previous:s,next:i}),c=(0,ie.useReducedMotion)(),[u,d]=(0,ie.useResizeObserver)(),[p]=(0,ie.useResizeObserver)(),h=sd(),[f,y]=(0,g.useState)(!1),{areas:v,widths:w}=function(){const e=sd(),{params:t}=_x(),{postType:n,postId:r,path:a,layout:s,isCustom:i,canvas:o}=null!=t?t:{};if("/page"===a)return{areas:{content:void 0,preview:(0,l.createElement)(lb,{isLoading:e}),mobile:"edit"===o?(0,l.createElement)(lb,{isLoading:e}):void 0},widths:{content:void 0}};const c="true"!==i&&"list"===s&&window?.__experimentalAdminViews;return"/pages"===a?{areas:{content:(0,l.createElement)(xS,null),preview:c&&(0,l.createElement)(lb,{isLoading:e})},widths:{content:c?380:void 0}}:n&&r?{areas:{preview:(0,l.createElement)(lb,{isLoading:e}),mobile:"edit"===o?(0,l.createElement)(lb,{isLoading:e}):void 0}}:"/wp_template/all"===a?{areas:{content:(0,l.createElement)(bx,{postType:Ct}),preview:c&&(0,l.createElement)(lb,{isLoading:e}),mobile:(0,l.createElement)(bx,{postType:Ct})},widths:{content:c?380:void 0}}:"/wp_template_part/all"===a?{areas:{content:(0,l.createElement)(bx,{postType:kt}),preview:c&&(0,l.createElement)(lb,{isLoading:e}),mobile:(0,l.createElement)(bx,{postType:kt})},widths:{content:c?380:void 0}}:"/patterns"===a?{areas:{content:(0,l.createElement)(nx,null),mobile:(0,l.createElement)(nx,null)}}:{areas:{preview:(0,l.createElement)(lb,{isLoading:e}),mobile:"edit"===o?(0,l.createElement)(lb,{isLoading:e}):void 0}}}();let S;S="view"===a?"view":t?"isDistractionFree":a;let x="site-editor";"edit"===a&&(x="site-editor-edit"),r&&(x="block-selection-edit"),wx(x);const[C]=Sx("color.background"),[k]=Sx("color.gradient");return"init"===a?null:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(rr.CommandMenu,null),(0,l.createElement)(xu,null),(0,l.createElement)(Cu,null),p,(0,l.createElement)("div",{...o,ref:o.ref,className:b()("edit-site-layout",o.className,{"is-distraction-free":t&&"edit"===a,"is-full-canvas":"edit"===a,"has-fixed-toolbar":n,"is-block-toolbar-visible":r})},(0,l.createElement)(_.__unstableMotion.div,{className:"edit-site-layout__header-container",variants:{isDistractionFree:{opacity:0,transition:{type:"tween",delay:.8,delayChildren:.8}},isDistractionFreeHovering:{opacity:1,transition:{type:"tween",delay:.2,delayChildren:.2}},view:{opacity:1},edit:{opacity:1}},whileHover:t?"isDistractionFreeHovering":void 0,animate:S},(0,l.createElement)(lu,{isTransparent:f,className:"edit-site-layout__hub"}),(0,l.createElement)(_.__unstableAnimatePresence,{initial:!1},"edit"===a&&(0,l.createElement)(oe,{key:"header",className:"edit-site-layout__header",ariaLabel:(0,E.__)("Editor top bar"),as:_.__unstableMotion.div,variants:{isDistractionFree:{opacity:0,y:0},isDistractionFreeHovering:{opacity:1,y:0},view:{opacity:1,y:"-100%"},edit:{opacity:1,y:0}},exit:{y:"-100%"},initial:{opacity:t?1:0,y:t?0:"-100%"},transition:{type:"tween",duration:c?0:.2,ease:"easeOut"}},(0,l.createElement)(au,null)))),(0,l.createElement)("div",{className:"edit-site-layout__content"},(!e||e&&!v.mobile)&&(0,l.createElement)(oe,{ariaLabel:(0,E.__)("Navigation"),className:"edit-site-layout__sidebar-region"},(0,l.createElement)(_.__unstableAnimatePresence,null,"view"===a&&(0,l.createElement)(_.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{type:"tween",duration:c||e?0:xx,ease:"easeOut"},className:"edit-site-layout__sidebar"},(0,l.createElement)(Sc,null)))),(0,l.createElement)(Su,null),e&&v.mobile&&(0,l.createElement)("div",{className:"edit-site-layout__mobile",style:{maxWidth:w?.content}},v.mobile),!e&&v.content&&"edit"!==a&&(0,l.createElement)("div",{className:"edit-site-layout__area",style:{maxWidth:w?.content}},v.content),!e&&v.preview&&(0,l.createElement)("div",{className:"edit-site-layout__canvas-container"},u,!!d.width&&(0,l.createElement)(_.__unstableMotion.div,{whileHover:"view"===a?{scale:1.005,transition:{duration:c?0:.5,ease:"easeOut"}}:{},initial:!1,layout:"position",className:b()("edit-site-layout__canvas",{"is-right-aligned":f}),transition:{type:"tween",duration:c?0:xx,ease:"easeOut"}},(0,l.createElement)(kc,null,(0,l.createElement)(fu,{isReady:!h,isFullWidth:"edit"===a,defaultSize:{width:d.width-24,height:d.height},isOversized:f,setIsOversized:y,innerContentStyle:{background:null!=k?k:C}},v.preview)))))))}const{RouterProvider:kx}=Xe(gt.privateApis);function Tx(){const{createErrorNotice:e}=(0,m.useDispatch)(ge.store);return(0,l.createElement)(_.SlotFillProvider,null,(0,l.createElement)(Ar,null,(0,l.createElement)(y.UnsavedChangesWarning,null),(0,l.createElement)(kx,null,(0,l.createElement)(Cx,null),(0,l.createElement)(Z.PluginArea,{onError:function(t){e((0,E.sprintf)((0,E.__)('The "%s" plugin has encountered an error and cannot be rendered.'),t))}}))))}function Px({className:e,...t}){return(0,l.createElement)(se,{panelClassName:e,className:"edit-site-sidebar-edit-mode",scope:"core/edit-site",...t})}function Ix(e){return(0,l.createElement)(ee,{__unstableExplicitMenuItem:!0,scope:"core/edit-site",...e})}const Mx=(0,ie.compose)((0,Z.withPluginContext)(((e,t)=>{var n;return{as:null!==(n=t.as)&&void 0!==n?n:_.MenuItem,icon:t.icon||e.icon,name:"core/edit-site/plugin-more-menu"}})))(Q);function Ax(e,t){const n=document.getElementById(e),r=(0,g.createRoot)(n);(0,m.dispatch)(u.store).reapplyBlockTypeFilters();const a=(0,d.__experimentalGetCoreBlocks)().filter((({name:e})=>"core/freeform"!==e));return(0,d.registerCoreBlocks)(a),(0,m.dispatch)(u.store).setFreeformFallbackBlockName("core/html"),(0,me.registerLegacyWidgetBlock)({inserter:!1}),(0,me.registerWidgetGroupBlock)({inserter:!1}),(0,m.dispatch)(T.store).setDefaults("core/edit-site",{welcomeGuide:!0,welcomeGuideStyles:!0,welcomeGuidePage:!0,welcomeGuideTemplate:!0}),(0,m.dispatch)(T.store).setDefaults("core",{allowRightClickOverrides:!0,distractionFree:!1,editorMode:"visual",fixedToolbar:!1,focusMode:!1,inactivePanels:[],keepCaretInsideBlock:!1,openPanels:["post-status"],showBlockBreadcrumbs:!0,showListViewByDefault:!1}),(0,m.dispatch)(j).setDefaultComplementaryArea("core/edit-site","edit-site/template"),(0,m.dispatch)(tr).updateSettings(t),(0,m.dispatch)(y.store).updateEditorSettings({defaultTemplateTypes:t.defaultTemplateTypes,defaultTemplatePartAreas:t.defaultTemplatePartAreas}),window.addEventListener("dragover",(e=>e.preventDefault()),!1),window.addEventListener("drop",(e=>e.preventDefault()),!1),r.render((0,l.createElement)(Tx,null)),r}function Ox(){f()("wp.editSite.reinitializeEditor",{since:"6.2",version:"6.3"})}})(),(window.wp=window.wp||{}).editSite=s})(); \ No newline at end of file
diff --git a/wp-includes/js/dist/editor.js b/wp-includes/js/dist/editor.js
index f04b571..609c9c0 100644
--- a/wp-includes/js/dist/editor.js
+++ b/wp-includes/js/dist/editor.js
@@ -15925,7 +15925,7 @@ function DocumentTools({
variant: "unstyled"
}, (0,external_React_.createElement)("div", {
className: "editor-document-tools__left"
- }, (0,external_React_.createElement)(external_wp_components_namespaceObject.ToolbarItem, {
+ }, !isDistractionFree && (0,external_React_.createElement)(external_wp_components_namespaceObject.ToolbarItem, {
ref: inserterButton,
as: external_wp_components_namespaceObject.Button,
className: "editor-document-tools__inserter-toggle",
diff --git a/wp-includes/js/dist/editor.min.js b/wp-includes/js/dist/editor.min.js
index 1fb818d..cfa0a67 100644
--- a/wp-includes/js/dist/editor.min.js
+++ b/wp-includes/js/dist/editor.min.js
@@ -9,4 +9,4 @@
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
-*/!function(){"use strict";var o={}.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var i=s.apply(null,n);i&&e.push(i)}}else if("object"===r){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var a in n)o.call(n,a)&&n[a]&&e.push(a)}}}return e.join(" ")}e.exports?(s.default=s,e.exports=s):void 0===(n=function(){return s}.apply(t,[]))||(e.exports=n)}()},6109:e=>{e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},461:(e,t,n)=>{var o=n(6109);e.exports=function(e){var t=o(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var s=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),n=parseFloat(t,10),s?e.style.lineHeight=s:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var r=e.nodeName,i=document.createElement(r);i.innerHTML="&nbsp;","TEXTAREA"===r.toUpperCase()&&i.setAttribute("rows","1");var a=o(e,"font-size");i.style.fontSize=a,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i),n=i.offsetHeight,l.removeChild(i)}return n}},628:(e,t,n)=>{"use strict";var o=n(4067);function s(){}function r(){}r.resetWarningCache=s,e.exports=function(){function e(e,t,n,s,r,i){if(i!==o){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:r,resetWarningCache:s};return n.PropTypes=n,n}},5826:(e,t,n)=>{e.exports=n(628)()},4067:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4462:function(e,t,n){"use strict";var o,s=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},i=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(o=Object.getOwnPropertySymbols(e);s<o.length;s++)t.indexOf(o[s])<0&&(n[o[s]]=e[o[s]])}return n};t.__esModule=!0;var a=n(1609),l=n(5826),c=n(4306),u=n(461),d="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return s(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,o=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||o?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),o=(t.onChange,t.style),s=(t.innerRef,t.children),l=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return a.createElement("textarea",r({},l,{onChange:this.onChange,style:u?r({},o,{maxHeight:u}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),s)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(a.Component);t.TextareaAutosize=a.forwardRef((function(e,t){return a.createElement(p,r({},e,{innerRef:t}))}))},4132:(e,t,n)=>{"use strict";var o=n(4462);t.A=o.TextareaAutosize},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),o=new RegExp(n,"g"),s=new RegExp(n,"");function r(e){return t[e]}var i=function(e){return e.replace(o,r)};e.exports=i,e.exports.has=function(e){return!!e.match(s)},e.exports.remove=i},1609:e=>{"use strict";e.exports=window.React}},t={};function n(o){var s=t[o];if(void 0!==s)return s.exports;var r=t[o]={exports:{}};return e[o].call(r.exports,r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{AlignmentToolbar:()=>Zl,Autocomplete:()=>Kl,AutosaveMonitor:()=>Wo,BlockAlignmentToolbar:()=>Yl,BlockControls:()=>ql,BlockEdit:()=>Ql,BlockEditorKeyboardShortcuts:()=>Xl,BlockFormatControls:()=>Jl,BlockIcon:()=>ec,BlockInspector:()=>tc,BlockList:()=>nc,BlockMover:()=>oc,BlockNavigationDropdown:()=>sc,BlockSelectionClearer:()=>rc,BlockSettingsMenu:()=>ic,BlockTitle:()=>ac,BlockToolbar:()=>lc,CharacterCount:()=>fl,ColorPalette:()=>cc,ContrastChecker:()=>uc,CopyHandler:()=>dc,DefaultBlockAppender:()=>pc,DocumentBar:()=>ss,DocumentOutline:()=>hs,DocumentOutlineCheck:()=>_s,EditorHistoryRedo:()=>vs,EditorHistoryUndo:()=>ys,EditorKeyboardShortcuts:()=>Go,EditorKeyboardShortcutsRegister:()=>fs,EditorNotices:()=>ks,EditorProvider:()=>Hl,EditorSnackbars:()=>Ps,EntitiesSavedStates:()=>Ms,ErrorBoundary:()=>zs,FontSizePicker:()=>mc,InnerBlocks:()=>hc,Inserter:()=>gc,InspectorAdvancedControls:()=>_c,InspectorControls:()=>fc,LocalAutosaveMonitor:()=>$s,MediaPlaceholder:()=>kc,MediaUpload:()=>Sc,MediaUploadCheck:()=>Pc,MultiSelectScrollIntoView:()=>Cc,NavigableToolbar:()=>Tc,ObserveTyping:()=>xc,PageAttributesCheck:()=>Ks,PageAttributesOrder:()=>qs,PageAttributesPanel:()=>ar,PageAttributesParent:()=>rr,PageTemplate:()=>br,PanelColorSettings:()=>Ec,PlainText:()=>bc,PostAuthor:()=>Or,PostAuthorCheck:()=>Lr,PostAuthorPanel:()=>Mr,PostComments:()=>Fr,PostDiscussionPanel:()=>Hr,PostExcerpt:()=>zr,PostExcerptCheck:()=>Gr,PostExcerptPanel:()=>Yr,PostFeaturedImage:()=>ri,PostFeaturedImageCheck:()=>Xr,PostFeaturedImagePanel:()=>ai,PostFormat:()=>ui,PostFormatCheck:()=>li,PostLastRevision:()=>mi,PostLastRevisionCheck:()=>pi,PostLastRevisionPanel:()=>gi,PostLockedModal:()=>hi,PostPendingStatus:()=>fi,PostPendingStatusCheck:()=>_i,PostPingbacks:()=>Vr,PostPreviewButton:()=>Ei,PostPublishButton:()=>wi,PostPublishButtonLabel:()=>bi,PostPublishPanel:()=>Ba,PostSavedState:()=>Aa,PostSchedule:()=>$i,PostScheduleCheck:()=>Ra,PostScheduleLabel:()=>Ki,PostSchedulePanel:()=>Oa,PostSlug:()=>Fa,PostSlugCheck:()=>La,PostSticky:()=>Ua,PostStickyCheck:()=>Va,PostSwitchToDraftButton:()=>Ha,PostSyncStatus:()=>za,PostTaxonomies:()=>ja,PostTaxonomiesCheck:()=>Wa,PostTaxonomiesFlatTermSelector:()=>ia,PostTaxonomiesHierarchicalTermSelector:()=>_a,PostTaxonomiesPanel:()=>Ka,PostTemplatePanel:()=>Br,PostTextEditor:()=>Ya,PostTitle:()=>tl,PostTitleRaw:()=>nl,PostTrash:()=>ol,PostTrashCheck:()=>sl,PostTypeSupportCheck:()=>Zs,PostURL:()=>rl,PostURLCheck:()=>il,PostURLLabel:()=>al,PostURLPanel:()=>cl,PostVisibility:()=>Ci,PostVisibilityCheck:()=>dl,PostVisibilityLabel:()=>xi,RichText:()=>$l,RichTextShortcut:()=>vc,RichTextToolbarButton:()=>yc,ServerSideRender:()=>Gl(),SkipToSelectedBlock:()=>Bc,TableOfContents:()=>bl,TextEditorGlobalKeyboardShortcuts:()=>Wc,ThemeSupportCheck:()=>Qr,TimeToRead:()=>_l,URLInput:()=>Ic,URLInputButton:()=>Nc,URLPopover:()=>Dc,UnsavedChangesWarning:()=>vl,VisualEditorGlobalKeyboardShortcuts:()=>jc,Warning:()=>Ac,WordCount:()=>gl,WritingFlow:()=>Rc,__unstableRichTextInputEvent:()=>wc,cleanForSlug:()=>$c,createCustomColorsHOC:()=>Oc,getColorClassName:()=>Lc,getColorObjectByAttributeValues:()=>Mc,getColorObjectByColorValue:()=>Fc,getFontSize:()=>Vc,getFontSizeClass:()=>Uc,getTemplatePartIcon:()=>U,mediaUpload:()=>Bl,privateApis:()=>Bu,store:()=>xo,storeConfig:()=>To,transformStyles:()=>m.transformStyles,useEntitiesSavedStatesIsDirty:()=>Rs,usePostScheduleLabel:()=>Zi,usePostURLLabel:()=>ll,usePostVisibilityLabel:()=>Bi,userAutocompleter:()=>Ao,withColorContext:()=>Hc,withColors:()=>zc,withFontSizes:()=>Gc});var e={};n.r(e),n.d(e,{__experimentalGetDefaultTemplatePartAreas:()=>Jt,__experimentalGetDefaultTemplateType:()=>en,__experimentalGetDefaultTemplateTypes:()=>Xt,__experimentalGetTemplateInfo:()=>tn,__unstableIsEditorReady:()=>$e,canInsertBlockType:()=>Zt,canUserUseUnfilteredHTML:()=>Me,didPostSaveRequestFail:()=>ve,didPostSaveRequestSucceed:()=>be,getActivePostLock:()=>Le,getAdjacentBlockClientId:()=>bt,getAutosaveAttribute:()=>re,getBlock:()=>st,getBlockAttributes:()=>ot,getBlockCount:()=>ut,getBlockHierarchyRootClientId:()=>Et,getBlockIndex:()=>At,getBlockInsertionPoint:()=>Gt,getBlockListSettings:()=>Qt,getBlockMode:()=>Ut,getBlockName:()=>tt,getBlockOrder:()=>Dt,getBlockRootClientId:()=>ft,getBlockSelectionEnd:()=>pt,getBlockSelectionStart:()=>dt,getBlocks:()=>rt,getBlocksByClientId:()=>ct,getClientIdsOfDescendants:()=>it,getClientIdsWithDescendants:()=>at,getCurrentPost:()=>Y,getCurrentPostAttribute:()=>ne,getCurrentPostId:()=>Q,getCurrentPostLastRevisionId:()=>ee,getCurrentPostRevisionsCount:()=>J,getCurrentPostType:()=>q,getCurrentTemplateId:()=>X,getDeviceType:()=>Ye,getEditedPostAttribute:()=>se,getEditedPostContent:()=>Pe,getEditedPostPreviewLink:()=>ke,getEditedPostSlug:()=>Be,getEditedPostVisibility:()=>ie,getEditorBlocks:()=>Ve,getEditorSelection:()=>We,getEditorSelectionEnd:()=>je,getEditorSelectionStart:()=>Ge,getEditorSettings:()=>Ke,getFirstMultiSelectedBlockClientId:()=>Pt,getGlobalBlockCount:()=>lt,getInserterItems:()=>Yt,getLastMultiSelectedBlockClientId:()=>Ct,getMultiSelectedBlockClientIds:()=>kt,getMultiSelectedBlocks:()=>St,getMultiSelectedBlocksEndClientId:()=>Nt,getMultiSelectedBlocksStartClientId:()=>It,getNextBlockClientId:()=>yt,getPermalink:()=>xe,getPermalinkParts:()=>Ie,getPostEdits:()=>te,getPostLockUser:()=>Oe,getPostTypeLabel:()=>nn,getPreviousBlockClientId:()=>vt,getRenderingMode:()=>Ze,getSelectedBlock:()=>_t,getSelectedBlockClientId:()=>ht,getSelectedBlockCount:()=>mt,getSelectedBlocksInitialCaretPosition:()=>wt,getStateBeforeOptimisticTransaction:()=>Xe,getSuggestedPostFormat:()=>Se,getTemplate:()=>$t,getTemplateLock:()=>Kt,hasChangedContent:()=>W,hasEditorRedo:()=>G,hasEditorUndo:()=>z,hasInserterItems:()=>qt,hasMultiSelection:()=>Mt,hasNonPostEntityChanges:()=>K,hasSelectedBlock:()=>gt,hasSelectedInnerBlock:()=>Ot,inSomeHistory:()=>Je,isAncestorMultiSelected:()=>Bt,isAutosavingPost:()=>ye,isBlockInsertionPointVisible:()=>jt,isBlockMultiSelected:()=>xt,isBlockSelected:()=>Rt,isBlockValid:()=>nt,isBlockWithinSelection:()=>Lt,isCaretWithinFormattedText:()=>zt,isCleanNewPost:()=>Z,isCurrentPostPending:()=>ae,isCurrentPostPublished:()=>le,isCurrentPostScheduled:()=>ce,isDeletingPost:()=>_e,isEditedPostAutosaveable:()=>me,isEditedPostBeingScheduled:()=>ge,isEditedPostDateFloating:()=>he,isEditedPostDirty:()=>$,isEditedPostEmpty:()=>pe,isEditedPostNew:()=>j,isEditedPostPublishable:()=>ue,isEditedPostSaveable:()=>de,isEditorPanelEnabled:()=>He,isEditorPanelOpened:()=>ze,isEditorPanelRemoved:()=>Ue,isFirstMultiSelectedBlock:()=>Tt,isInserterOpened:()=>Qe,isListViewOpened:()=>qe,isMultiSelecting:()=>Ft,isPermalinkEditable:()=>Te,isPostAutosavingLocked:()=>Ae,isPostLockTakeover:()=>Re,isPostLocked:()=>Ne,isPostSavingLocked:()=>De,isPreviewingPost:()=>we,isPublishSidebarEnabled:()=>Fe,isPublishingPost:()=>Ce,isSavingNonPostEntityChanges:()=>Ee,isSavingPost:()=>fe,isSelectionEnabled:()=>Vt,isTyping:()=>Ht,isValidTemplate:()=>Wt});var t={};n.r(t),n.d(t,{__experimentalTearDownEditor:()=>dn,__unstableSaveForPreview:()=>yn,autosave:()=>vn,clearSelectedBlock:()=>qn,createUndoLevel:()=>Sn,disablePublishSidebar:()=>Tn,editPost:()=>_n,enablePublishSidebar:()=>Cn,enterFormattedText:()=>_o,exitFormattedText:()=>fo,hideInsertionPoint:()=>io,insertBlock:()=>oo,insertBlocks:()=>so,insertDefaultBlock:()=>Eo,lockPostAutosaving:()=>In,lockPostSaving:()=>xn,mergeBlocks:()=>co,moveBlockToPosition:()=>no,moveBlocksDown:()=>eo,moveBlocksUp:()=>to,multiSelect:()=>Yn,receiveBlocks:()=>Gn,redo:()=>wn,refreshPost:()=>En,removeBlock:()=>po,removeBlocks:()=>uo,removeEditorPanel:()=>Fn,replaceBlock:()=>Jn,replaceBlocks:()=>Xn,resetBlocks:()=>zn,resetEditorBlocks:()=>Dn,resetPost:()=>pn,savePost:()=>fn,selectBlock:()=>$n,setDeviceType:()=>On,setEditedPost:()=>hn,setIsInserterOpened:()=>Vn,setIsListViewOpened:()=>Un,setRenderingMode:()=>Rn,setTemplateValidity:()=>ao,setupEditor:()=>un,setupEditorState:()=>gn,showInsertionPoint:()=>ro,startMultiSelect:()=>Kn,startTyping:()=>go,stopMultiSelect:()=>Zn,stopTyping:()=>ho,synchronizeTemplate:()=>lo,toggleBlockMode:()=>mo,toggleEditorPanelEnabled:()=>Ln,toggleEditorPanelOpened:()=>Mn,toggleSelection:()=>Qn,trashPost:()=>bn,undo:()=>kn,unlockPostAutosaving:()=>Nn,unlockPostSaving:()=>Bn,updateBlock:()=>jn,updateBlockAttributes:()=>Wn,updateBlockListSettings:()=>bo,updateEditorSettings:()=>An,updatePost:()=>mn,updatePostLock:()=>Pn});var s={};n.r(s),n.d(s,{createTemplate:()=>yo,hideBlockTypes:()=>ko,setCurrentTemplateId:()=>vo,showBlockTypes:()=>wo});var r={};n.r(r),n.d(r,{getInsertionPoint:()=>Po,getListViewToggleRef:()=>Co});const i=window.wp.blocks,a=window.wp.data,l=window.wp.privateApis,{lock:c,unlock:u}=(0,l.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/editor"),d=window.wp.i18n,p=((0,d._x)("Pattern Overrides","block bindings source"),window.wp.coreData),m=window.wp.blockEditor,g={...m.SETTINGS_DEFAULTS,richEditingEnabled:!0,codeEditingEnabled:!0,fontLibraryEnabled:!0,enableCustomFields:void 0,defaultRenderingMode:"post-only"};function h(e){return e&&"object"==typeof e&&"raw"in e?e.raw:e}const _=(0,a.combineReducers)({postId:function(e=null,t){return"SET_EDITED_POST"===t.type?t.postId:e},postType:function(e=null,t){return"SET_EDITED_POST"===t.type?t.postType:e},templateId:function(e=null,t){return"SET_CURRENT_TEMPLATE_ID"===t.type?t.id:e},saving:function(e={},t){switch(t.type){case"REQUEST_POST_UPDATE_START":case"REQUEST_POST_UPDATE_FINISH":return{pending:"REQUEST_POST_UPDATE_START"===t.type,options:t.options||{}}}return e},deleting:function(e={},t){switch(t.type){case"REQUEST_POST_DELETE_START":case"REQUEST_POST_DELETE_FINISH":return{pending:"REQUEST_POST_DELETE_START"===t.type}}return e},postLock:function(e={isLocked:!1},t){return"UPDATE_POST_LOCK"===t.type?t.lock:e},template:function(e={isValid:!0},t){return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},postSavingLock:function(e={},t){switch(t.type){case"LOCK_POST_SAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_SAVING":{const{[t.lockName]:n,...o}=e;return o}}return e},editorSettings:function(e=g,t){return"UPDATE_EDITOR_SETTINGS"===t.type?{...e,...t.settings}:e},postAutosavingLock:function(e={},t){switch(t.type){case"LOCK_POST_AUTOSAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_AUTOSAVING":{const{[t.lockName]:n,...o}=e;return o}}return e},renderingMode:function(e="post-only",t){return"SET_RENDERING_MODE"===t.type?t.mode:e},deviceType:function(e="Desktop",t){return"SET_DEVICE_TYPE"===t.type?t.deviceType:e},removedPanels:function(e=[],t){if("REMOVE_PANEL"===t.type)if(!e.includes(t.panelName))return[...e,t.panelName];return e},blockInserterPanel:function(e=!1,t){switch(t.type){case"SET_IS_LIST_VIEW_OPENED":return!t.isOpen&&e;case"SET_IS_INSERTER_OPENED":return t.value}return e},listViewPanel:function(e=!1,t){switch(t.type){case"SET_IS_INSERTER_OPENED":return!t.value&&e;case"SET_IS_LIST_VIEW_OPENED":return t.isOpen}return e},listViewToggleRef:function(e={current:null}){return e}});var f={};function E(e){return[e]}function b(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}function v(e,t){var n,o=t||E;function s(){n=new WeakMap}function r(){var t,s,r,i,a,l=arguments.length;for(i=new Array(l),r=0;r<l;r++)i[r]=arguments[r];for(t=function(e){var t,o,s,r,i,a=n,l=!0;for(t=0;t<e.length;t++){if(!(i=o=e[t])||"object"!=typeof i){l=!1;break}a.has(o)?a=a.get(o):(s=new WeakMap,a.set(o,s),a=s)}return a.has(f)||((r=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=l,a.set(f,r)),a.get(f)}(a=o.apply(null,i)),t.isUniqueByDependants||(t.lastDependants&&!b(a,t.lastDependants,0)&&t.clear(),t.lastDependants=a),s=t.head;s;){if(b(s.args,i,1))return s!==t.head&&(s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=t.head,s.prev=null,t.head.prev=s,t.head=s),s.val;s=s.next}return s={val:e.apply(null,i)},i[0]=null,s.args=i,t.head&&(t.head.prev=s,s.next=t.head),t.head=s,s.val}return r.getDependants=o,r.clear=s,s(),r}const y=window.wp.date,w=window.wp.url,k=window.wp.deprecated;var S=n.n(k);const P=window.wp.element;var C=n(1609);const T=window.wp.primitives,x=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.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"})),B=window.wp.preferences,I=new Set(["meta"]),N="SAVE_POST_NOTICE_ID",D="TRASH_POST_NOTICE_ID",A=/%(?:postname|pagename)%/,R=6e4,O=["title","excerpt","content"],L=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M18.5 10.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"})),M=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),F=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.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.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),V=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}));function U(e){return"header"===e?L:"footer"===e?M:"sidebar"===e?F:V}const H={},z=(0,a.createRegistrySelector)((e=>()=>e(p.store).hasUndo())),G=(0,a.createRegistrySelector)((e=>()=>e(p.store).hasRedo()));function j(e){return"auto-draft"===Y(e).status}function W(e){return"content"in te(e)}const $=(0,a.createRegistrySelector)((e=>t=>{const n=q(t),o=Q(t);return!!e(p.store).hasEditsForEntityRecord("postType",n,o)})),K=(0,a.createRegistrySelector)((e=>t=>{const n=e(p.store).__experimentalGetDirtyEntityRecords(),{type:o,id:s}=Y(t);return n.some((e=>"postType"!==e.kind||e.name!==o||e.key!==s))}));function Z(e){return!$(e)&&j(e)}const Y=(0,a.createRegistrySelector)((e=>t=>{const n=Q(t),o=q(t),s=e(p.store).getRawEntityRecord("postType",o,n);return s||H}));function q(e){return e.postType}function Q(e){return e.postId}function X(e){return e.templateId}function J(e){var t;return null!==(t=Y(e)._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0}function ee(e){var t;return null!==(t=Y(e)._links?.["predecessor-version"]?.[0]?.id)&&void 0!==t?t:null}const te=(0,a.createRegistrySelector)((e=>t=>{const n=q(t),o=Q(t);return e(p.store).getEntityRecordEdits("postType",n,o)||H}));function ne(e,t){switch(t){case"type":return q(e);case"id":return Q(e);default:const n=Y(e);if(!n.hasOwnProperty(t))break;return h(n[t])}}const oe=v(((e,t)=>{const n=te(e);return n.hasOwnProperty(t)?{...ne(e,t),...n[t]}:ne(e,t)}),((e,t)=>[ne(e,t),te(e)[t]]));function se(e,t){if("content"===t)return Pe(e);const n=te(e);return n.hasOwnProperty(t)?I.has(t)?oe(e,t):n[t]:ne(e,t)}const re=(0,a.createRegistrySelector)((e=>(t,n)=>{if(!O.includes(n)&&"preview_link"!==n)return;const o=q(t);if("wp_template"===o)return!1;const s=Q(t),r=e(p.store).getCurrentUser()?.id,i=e(p.store).getAutosave(o,s,r);return i?h(i[n]):void 0}));function ie(e){if("private"===se(e,"status"))return"private";return se(e,"password")?"password":"public"}function ae(e){return"pending"===Y(e).status}function le(e,t){const n=t||Y(e);return-1!==["publish","private"].indexOf(n.status)||"future"===n.status&&!(0,y.isInTheFuture)(new Date(Number((0,y.getDate)(n.date))-R))}function ce(e){return"future"===Y(e).status&&!le(e)}function ue(e){const t=Y(e);return $(e)||-1===["publish","private","future"].indexOf(t.status)}function de(e){return!fe(e)&&(!!se(e,"title")||!!se(e,"excerpt")||!pe(e)||"native"===P.Platform.OS)}const pe=(0,a.createRegistrySelector)((e=>t=>{const n=Q(t),o=q(t),s=e(p.store).getEditedEntityRecord("postType",o,n);if("function"!=typeof s.content)return!s.content;const r=se(t,"blocks");if(0===r.length)return!0;if(r.length>1)return!1;const a=r[0].name;return(a===(0,i.getDefaultBlockName)()||a===(0,i.getFreeformContentHandlerName)())&&!Pe(t)})),me=(0,a.createRegistrySelector)((e=>t=>{if(!de(t))return!1;if(Ae(t))return!1;const n=q(t);if("wp_template"===n)return!1;const o=Q(t),s=e(p.store).hasFetchedAutosaves(n,o),r=e(p.store).getCurrentUser()?.id,i=e(p.store).getAutosave(n,o,r);return!!s&&(!i||(!!W(t)||["title","excerpt","meta"].some((e=>h(i[e])!==se(t,e)))))}));function ge(e){const t=se(e,"date"),n=new Date(Number((0,y.getDate)(t))-R);return(0,y.isInTheFuture)(n)}function he(e){const t=se(e,"date"),n=se(e,"modified"),o=Y(e).status;return("draft"===o||"auto-draft"===o||"pending"===o)&&(t===n||null===t)}function _e(e){return!!e.deleting.pending}function fe(e){return!!e.saving.pending}const Ee=(0,a.createRegistrySelector)((e=>t=>{const n=e(p.store).__experimentalGetEntitiesBeingSaved(),{type:o,id:s}=Y(t);return n.some((e=>"postType"!==e.kind||e.name!==o||e.key!==s))})),be=(0,a.createRegistrySelector)((e=>t=>{const n=q(t),o=Q(t);return!e(p.store).getLastEntitySaveError("postType",n,o)})),ve=(0,a.createRegistrySelector)((e=>t=>{const n=q(t),o=Q(t);return!!e(p.store).getLastEntitySaveError("postType",n,o)}));function ye(e){return fe(e)&&Boolean(e.saving.options?.isAutosave)}function we(e){return fe(e)&&Boolean(e.saving.options?.isPreview)}function ke(e){if(e.saving.pending||fe(e))return;let t=re(e,"preview_link");t&&"draft"!==Y(e).status||(t=se(e,"link"),t&&(t=(0,w.addQueryArgs)(t,{preview:!0})));const n=se(e,"featured_media");return t&&n?(0,w.addQueryArgs)(t,{_thumbnail_id:n}):t}const Se=(0,a.createRegistrySelector)((e=>()=>{const t=e(m.store).getBlocks();if(t.length>2)return null;let n;if(1===t.length&&(n=t[0].name,"core/embed"===n)){const e=t[0].attributes?.providerNameSlug;["youtube","vimeo"].includes(e)?n="core/video":["spotify","soundcloud"].includes(e)&&(n="core/audio")}switch(2===t.length&&"core/paragraph"===t[1].name&&(n=t[0].name),n){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":return"video";case"core/audio":return"audio";default:return null}})),Pe=(0,a.createRegistrySelector)((e=>t=>{const n=Q(t),o=q(t),s=e(p.store).getEditedEntityRecord("postType",o,n);if(s){if("function"==typeof s.content)return s.content(s);if(s.blocks)return(0,i.__unstableSerializeAndClean)(s.blocks);if(s.content)return s.content}return""}));function Ce(e){return fe(e)&&!le(e)&&"publish"===se(e,"status")}function Te(e){const t=se(e,"permalink_template");return A.test(t)}function xe(e){const t=Ie(e);if(!t)return null;const{prefix:n,postName:o,suffix:s}=t;return Te(e)?n+o+s:n}function Be(e){return se(e,"slug")||(0,w.cleanForSlug)(se(e,"title"))||Q(e)}function Ie(e){const t=se(e,"permalink_template");if(!t)return null;const n=se(e,"slug")||se(e,"generated_slug"),[o,s]=t.split(A);return{prefix:o,postName:n,suffix:s}}function Ne(e){return e.postLock.isLocked}function De(e){return Object.keys(e.postSavingLock).length>0}function Ae(e){return Object.keys(e.postAutosavingLock).length>0}function Re(e){return e.postLock.isTakeover}function Oe(e){return e.postLock.user}function Le(e){return e.postLock.activePostLock}function Me(e){return Boolean(Y(e)._links?.hasOwnProperty("wp:action-unfiltered-html"))}const Fe=(0,a.createRegistrySelector)((e=>()=>!!e(B.store).get("core/edit-post","isPublishSidebarEnabled"))),Ve=v((e=>se(e,"blocks")||(0,i.parse)(Pe(e))),(e=>[se(e,"blocks"),Pe(e)]));function Ue(e,t){return e.removedPanels.includes(t)}const He=(0,a.createRegistrySelector)((e=>(t,n)=>{const o=e(B.store).get("core","inactivePanels");return!Ue(t,n)&&!o?.includes(n)})),ze=(0,a.createRegistrySelector)((e=>(t,n)=>{const o=e(B.store).get("core","openPanels");return!!o?.includes(n)}));function Ge(e){return S()("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),se(e,"selection")?.selectionStart}function je(e){return S()("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),se(e,"selection")?.selectionEnd}function We(e){return se(e,"selection")}function $e(e){return!!e.postId}function Ke(e){return e.editorSettings}function Ze(e){return e.renderingMode}function Ye(e){return e.deviceType}function qe(e){return e.listViewPanel}function Qe(e){return!!e.blockInserterPanel}function Xe(){return S()("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function Je(){return S()("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function et(e){return(0,a.createRegistrySelector)((t=>(n,...o)=>(S()("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`",version:"6.2"}),t(m.store)[e](...o))))}const tt=et("getBlockName"),nt=et("isBlockValid"),ot=et("getBlockAttributes"),st=et("getBlock"),rt=et("getBlocks"),it=et("getClientIdsOfDescendants"),at=et("getClientIdsWithDescendants"),lt=et("getGlobalBlockCount"),ct=et("getBlocksByClientId"),ut=et("getBlockCount"),dt=et("getBlockSelectionStart"),pt=et("getBlockSelectionEnd"),mt=et("getSelectedBlockCount"),gt=et("hasSelectedBlock"),ht=et("getSelectedBlockClientId"),_t=et("getSelectedBlock"),ft=et("getBlockRootClientId"),Et=et("getBlockHierarchyRootClientId"),bt=et("getAdjacentBlockClientId"),vt=et("getPreviousBlockClientId"),yt=et("getNextBlockClientId"),wt=et("getSelectedBlocksInitialCaretPosition"),kt=et("getMultiSelectedBlockClientIds"),St=et("getMultiSelectedBlocks"),Pt=et("getFirstMultiSelectedBlockClientId"),Ct=et("getLastMultiSelectedBlockClientId"),Tt=et("isFirstMultiSelectedBlock"),xt=et("isBlockMultiSelected"),Bt=et("isAncestorMultiSelected"),It=et("getMultiSelectedBlocksStartClientId"),Nt=et("getMultiSelectedBlocksEndClientId"),Dt=et("getBlockOrder"),At=et("getBlockIndex"),Rt=et("isBlockSelected"),Ot=et("hasSelectedInnerBlock"),Lt=et("isBlockWithinSelection"),Mt=et("hasMultiSelection"),Ft=et("isMultiSelecting"),Vt=et("isSelectionEnabled"),Ut=et("getBlockMode"),Ht=et("isTyping"),zt=et("isCaretWithinFormattedText"),Gt=et("getBlockInsertionPoint"),jt=et("isBlockInsertionPointVisible"),Wt=et("isValidTemplate"),$t=et("getTemplate"),Kt=et("getTemplateLock"),Zt=et("canInsertBlockType"),Yt=et("getInserterItems"),qt=et("hasInserterItems"),Qt=et("getBlockListSettings");function Xt(e){return Ke(e)?.defaultTemplateTypes}const Jt=v((e=>{const t=Ke(e)?.defaultTemplatePartAreas||[];return t?.map((e=>({...e,icon:U(e.icon)})))}),(e=>[Ke(e)?.defaultTemplatePartAreas])),en=v(((e,t)=>{var n;const o=Xt(e);return o&&null!==(n=Object.values(o).find((e=>e.slug===t)))&&void 0!==n?n:H}),((e,t)=>[Xt(e),t]));function tn(e,t){if(!t)return H;const{description:n,slug:o,title:s,area:r}=t,{title:i,description:a}=en(e,o),l="string"==typeof s?s:s?.rendered;return{title:l&&l!==o?l:i||o,description:("string"==typeof n?n:n?.raw)||a,icon:Jt(e).find((e=>r===e.area))?.icon||x}}const nn=(0,a.createRegistrySelector)((e=>t=>{const n=q(t),o=e(p.store).getPostType(n);return o?.labels?.singular_name})),on=window.wp.apiFetch;var sn=n.n(on);const rn=window.wp.notices,an=window.wp.hooks;function ln(e,t){return`wp-autosave-block-editor-post-${t?"auto-draft":e}`}function cn(e,t){window.sessionStorage.removeItem(ln(e,t))}const un=(e,t,n)=>({dispatch:o})=>{o.setEditedPost(e.type,e.id);if("auto-draft"===e.status&&n){let s;s="content"in t?t.content:e.content.raw;let r=(0,i.parse)(s);r=(0,i.synchronizeBlocksWithTemplate)(r,n),o.resetEditorBlocks(r,{__unstableShouldCreateUndoLevel:!1})}t&&Object.values(t).some((([t,n])=>{var o;return n!==(null!==(o=e[t]?.raw)&&void 0!==o?o:e[t])}))&&o.editPost(t)};function dn(){return S()("wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor",{since:"6.5"}),{type:"DO_NOTHING"}}function pn(){return S()("wp.data.dispatch( 'core/editor' ).resetPost",{since:"6.0",version:"6.3",alternative:"Initialize the editor with the setupEditorState action"}),{type:"DO_NOTHING"}}function mn(){return S()("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function gn(e){return S()("wp.data.dispatch( 'core/editor' ).setupEditorState",{since:"6.5",alternative:"wp.data.dispatch( 'core/editor' ).setEditedPost"}),hn(e.type,e.id)}function hn(e,t){return{type:"SET_EDITED_POST",postType:e,postId:t}}const _n=(e,t)=>({select:n,registry:o})=>{const{id:s,type:r}=n.getCurrentPost();o.dispatch(p.store).editEntityRecord("postType",r,s,e,t)},fn=(e={})=>async({select:t,dispatch:n,registry:o})=>{if(!t.isEditedPostSaveable())return;const s=t.getEditedPostContent();e.isAutosave||n.editPost({content:s},{undoIgnore:!0});const r=t.getCurrentPost(),i={id:r.id,...o.select(p.store).getEntityRecordNonTransientEdits("postType",r.type,r.id),content:s};n({type:"REQUEST_POST_UPDATE_START",options:e}),await o.dispatch(p.store).saveEntityRecord("postType",r.type,i,e);let a=o.select(p.store).getLastEntitySaveError("postType",r.type,r.id);if(a||await(0,an.applyFilters)("editor.__unstableSavePost",Promise.resolve(),e).catch((e=>{a=e})),n({type:"REQUEST_POST_UPDATE_FINISH",options:e}),a){const e=function(e){const{post:t,edits:n,error:o}=e;if(o&&"rest_autosave_no_changes"===o.code)return[];const s=["publish","private","future"],r=-1!==s.indexOf(t.status),i={publish:(0,d.__)("Publishing failed."),private:(0,d.__)("Publishing failed."),future:(0,d.__)("Scheduling failed.")};let a=r||-1===s.indexOf(n.status)?(0,d.__)("Updating failed."):i[n.status];return o.message&&!/<\/?[^>]*>/.test(o.message)&&(a=[a,o.message].join(" ")),[a,{id:N}]}({post:r,edits:i,error:a});e.length&&o.dispatch(rn.store).createErrorNotice(...e)}else{const n=t.getCurrentPost(),s=function(e){var t;const{previousPost:n,post:o,postType:s}=e;if(e.options?.isAutosave)return[];const r=["publish","private","future"],i=r.includes(n.status),a=r.includes(o.status),l="trash"===o.status&&"trash"!==n.status;let c,u,p=null!==(t=s?.viewable)&&void 0!==t&&t;l?(c=s.labels.item_trashed,p=!1):i||a?i&&!a?(c=s.labels.item_reverted_to_draft,p=!1):c=!i&&a?{publish:s.labels.item_published,private:s.labels.item_published_privately,future:s.labels.item_scheduled}[o.status]:s.labels.item_updated:(c=(0,d.__)("Draft saved."),u=!0);const m=[];return p&&m.push({label:u?(0,d.__)("View Preview"):s.labels.view_item,url:o.link}),[c,{id:N,type:"snackbar",actions:m}]}({previousPost:r,post:n,postType:await o.resolveSelect(p.store).getPostType(n.type),options:e});s.length&&o.dispatch(rn.store).createSuccessNotice(...s),e.isAutosave||o.dispatch(m.store).__unstableMarkLastChangeAsPersistent()}};function En(){return S()("wp.data.dispatch( 'core/editor' ).refreshPost",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}const bn=()=>async({select:e,dispatch:t,registry:n})=>{const o=e.getCurrentPostType(),s=await n.resolveSelect(p.store).getPostType(o);n.dispatch(rn.store).removeNotice(D);const{rest_base:r,rest_namespace:i="wp/v2"}=s;t({type:"REQUEST_POST_DELETE_START"});try{const n=e.getCurrentPost();await sn()({path:`/${i}/${r}/${n.id}`,method:"DELETE"}),await t.savePost()}catch(e){n.dispatch(rn.store).createErrorNotice(...(a={error:e},[a.error.message&&"unknown_error"!==a.error.code?a.error.message:(0,d.__)("Trashing failed"),{id:D}]))}var a;t({type:"REQUEST_POST_DELETE_FINISH"})},vn=({local:e=!1,...t}={})=>async({select:n,dispatch:o})=>{const s=n.getCurrentPost();if("wp_template"!==s.type)if(e){const e=n.isEditedPostNew(),t=n.getEditedPostAttribute("title"),o=n.getEditedPostAttribute("content"),r=n.getEditedPostAttribute("excerpt");!function(e,t,n,o,s){window.sessionStorage.setItem(ln(e,t),JSON.stringify({post_title:n,content:o,excerpt:s}))}(s.id,e,t,o,r)}else await o.savePost({isAutosave:!0,...t})},yn=({forceIsAutosaveable:e}={})=>async({select:t,dispatch:n})=>{if((e||t.isEditedPostAutosaveable())&&!t.isPostLocked()){["draft","auto-draft"].includes(t.getEditedPostAttribute("status"))?await n.savePost({isPreview:!0}):await n.autosave({isPreview:!0})}return t.getEditedPostPreviewLink()},wn=()=>({registry:e})=>{e.dispatch(p.store).redo()},kn=()=>({registry:e})=>{e.dispatch(p.store).undo()};function Sn(){return S()("wp.data.dispatch( 'core/editor' ).createUndoLevel",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function Pn(e){return{type:"UPDATE_POST_LOCK",lock:e}}const Cn=()=>({registry:e})=>{e.dispatch(B.store).set("core/edit-post","isPublishSidebarEnabled",!0)},Tn=()=>({registry:e})=>{e.dispatch(B.store).set("core/edit-post","isPublishSidebarEnabled",!1)};function xn(e){return{type:"LOCK_POST_SAVING",lockName:e}}function Bn(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function In(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function Nn(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}const Dn=(e,t={})=>({select:n,dispatch:o,registry:s})=>{const{__unstableShouldCreateUndoLevel:r,selection:a}=t,l={blocks:e,selection:a};if(!1!==r){const{id:e,type:t}=n.getCurrentPost();if(s.select(p.store).getEditedEntityRecord("postType",t,e).blocks===l.blocks)return void s.dispatch(p.store).__unstableCreateUndoLevel("postType",t,e);l.content=({blocks:e=[]})=>(0,i.__unstableSerializeAndClean)(e)}o.editPost(l)};function An(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}const Rn=e=>({dispatch:t,registry:n,select:o})=>{o.__unstableIsEditorReady()&&(n.dispatch(m.store).clearSelectedBlock(),t.editPost({selection:void 0},{undoIgnore:!0})),t({type:"SET_RENDERING_MODE",mode:e})};function On(e){return{type:"SET_DEVICE_TYPE",deviceType:e}}const Ln=e=>({registry:t})=>{var n;const o=null!==(n=t.select(B.store).get("core","inactivePanels"))&&void 0!==n?n:[];let s;s=!!o?.includes(e)?o.filter((t=>t!==e)):[...o,e],t.dispatch(B.store).set("core","inactivePanels",s)},Mn=e=>({registry:t})=>{var n;const o=null!==(n=t.select(B.store).get("core","openPanels"))&&void 0!==n?n:[];let s;s=!!o?.includes(e)?o.filter((t=>t!==e)):[...o,e],t.dispatch(B.store).set("core","openPanels",s)};function Fn(e){return{type:"REMOVE_PANEL",panelName:e}}function Vn(e){return{type:"SET_IS_INSERTER_OPENED",value:e}}function Un(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}const Hn=e=>(...t)=>({registry:n})=>{S()("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`",version:"6.2"}),n.dispatch(m.store)[e](...t)},zn=Hn("resetBlocks"),Gn=Hn("receiveBlocks"),jn=Hn("updateBlock"),Wn=Hn("updateBlockAttributes"),$n=Hn("selectBlock"),Kn=Hn("startMultiSelect"),Zn=Hn("stopMultiSelect"),Yn=Hn("multiSelect"),qn=Hn("clearSelectedBlock"),Qn=Hn("toggleSelection"),Xn=Hn("replaceBlocks"),Jn=Hn("replaceBlock"),eo=Hn("moveBlocksDown"),to=Hn("moveBlocksUp"),no=Hn("moveBlockToPosition"),oo=Hn("insertBlock"),so=Hn("insertBlocks"),ro=Hn("showInsertionPoint"),io=Hn("hideInsertionPoint"),ao=Hn("setTemplateValidity"),lo=Hn("synchronizeTemplate"),co=Hn("mergeBlocks"),uo=Hn("removeBlocks"),po=Hn("removeBlock"),mo=Hn("toggleBlockMode"),go=Hn("startTyping"),ho=Hn("stopTyping"),_o=Hn("enterFormattedText"),fo=Hn("exitFormattedText"),Eo=Hn("insertDefaultBlock"),bo=Hn("updateBlockListSettings");function vo(e){return{type:"SET_CURRENT_TEMPLATE_ID",id:e}}const yo=e=>async({select:t,dispatch:n,registry:o})=>{const s=await o.dispatch(p.store).saveEntityRecord("postType","wp_template",e);return o.dispatch(p.store).editEntityRecord("postType",t.getCurrentPostType(),t.getCurrentPostId(),{template:s.slug}),o.dispatch(rn.store).createSuccessNotice((0,d.__)("Custom template created. You're in template mode now."),{type:"snackbar",actions:[{label:(0,d.__)("Go back"),onClick:()=>n.setRenderingMode(t.getEditorSettings().defaultRenderingMode)}]}),s},wo=e=>({registry:t})=>{var n;const o=(null!==(n=t.select(B.store).get("core","hiddenBlockTypes"))&&void 0!==n?n:[]).filter((t=>!(Array.isArray(e)?e:[e]).includes(t)));t.dispatch(B.store).set("core","hiddenBlockTypes",o)},ko=e=>({registry:t})=>{var n;const o=null!==(n=t.select(B.store).get("core","hiddenBlockTypes"))&&void 0!==n?n:[],s=new Set([...o,...Array.isArray(e)?e:[e]]);t.dispatch(B.store).set("core","hiddenBlockTypes",[...s])},So={rootClientId:void 0,insertionIndex:void 0,filterValue:void 0},Po=(0,a.createRegistrySelector)((e=>t=>{if("object"==typeof t.blockInserterPanel)return t.blockInserterPanel;if("template-locked"===Ze(t)){const[t]=e(m.store).getBlocksByName("core/post-content");if(t)return{rootClientId:t,insertionIndex:void 0,filterValue:void 0}}return So}));function Co(e){return e.listViewToggleRef}const To={reducer:_,selectors:e,actions:t},xo=(0,a.createReduxStore)("core/editor",{...To});(0,a.register)(xo),u(xo).registerPrivateActions(s),u(xo).registerPrivateSelectors(r);const Bo={name:"core/post-meta",label:(0,d._x)("Post Meta","block bindings source"),useSource(e,t){const{getCurrentPostType:n}=(0,a.useSelect)(xo),{context:o}=e,{key:s}=t,r=o.postType?o.postType:n(),[i,l]=(0,p.useEntityProp)("postType",o.postType,"meta",o.postId);if("wp_template"===r)return{placeholder:s};const c=i[s];return{placeholder:s,value:c,updateValue:e=>{l({...i,[s]:e})}}}},{registerBlockBindingsSource:Io}=u((0,a.dispatch)(i.store));Io(Bo);const No=window.wp.compose;function Do(e){const t=e.avatar_urls&&e.avatar_urls[24]?(0,C.createElement)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,C.createElement)("span",{className:"editor-autocompleters__no-avatar"});return(0,C.createElement)(C.Fragment,null,t,(0,C.createElement)("span",{className:"editor-autocompleters__user-name"},e.name),(0,C.createElement)("span",{className:"editor-autocompleters__user-slug"},e.slug))}(0,an.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",(function(e){var t;const n=Object.fromEntries(Object.entries(null!==(t=e.attributes)&&void 0!==t?t:{}).filter((([,{source:e}])=>"meta"===e)).map((([e,{meta:t}])=>[e,t])));return Object.entries(n).length&&(e.edit=(e=>(0,No.createHigherOrderComponent)((t=>({attributes:n,setAttributes:o,...s})=>{const r=(0,a.useSelect)((e=>e(xo).getCurrentPostType()),[]),[i,l]=(0,p.useEntityProp)("postType",r,"meta"),c=(0,P.useMemo)((()=>({...n,...Object.fromEntries(Object.entries(e).map((([e,t])=>[e,i[t]])))})),[n,i]);return(0,C.createElement)(t,{attributes:c,setAttributes:t=>{const n=Object.fromEntries(Object.entries(null!=t?t:{}).filter((([t])=>t in e)).map((([t,n])=>[e[t],n])));Object.entries(n).length&&l(n),o(t)},...s})}),"withMetaAttributeSource"))(n)(e.edit)),e}));const Ao={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){const t=(0,a.useSelect)((t=>{const{getUsers:n}=t(p.store);return n({context:"view",search:encodeURIComponent(e)})}),[e]),n=(0,P.useMemo)((()=>t?t.map((e=>({key:`user-${e.slug}`,value:e,label:Do(e)}))):[]),[t]);return[n]},getOptionCompletion:e=>`@${e.slug}`};(0,an.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",(function(e=[]){return e.push({...Ao}),e}));const Ro=window.wp.patterns,{useSetPatternBindings:Oo,ResetOverridesControl:Lo,PATTERN_TYPES:Mo,PARTIAL_SYNCING_SUPPORTED_BLOCKS:Fo}=u(Ro.privateApis),Vo=(0,No.createHigherOrderComponent)((e=>t=>{const n=Object.keys(Fo).includes(t.name);return(0,C.createElement)(C.Fragment,null,(0,C.createElement)(e,{...t}),n&&(0,C.createElement)(Uo,{...t}),t.isSelected&&n&&(0,C.createElement)(Ho,{...t}))}));function Uo(e){const t=(0,a.useSelect)((e=>e(xo).getCurrentPostType()),[]);return Oo(e,t),null}function Ho(e){const t=(0,m.useBlockEditingMode)(),n=(0,a.useSelect)((e=>e(xo).getCurrentPostType()===Mo.user),[]),o=e.attributes.metadata?.bindings,s=!!o&&Object.values(o).some((e=>"core/pattern-overrides"===e.source)),r=!n&&!!e.attributes.metadata?.name&&"disabled"!==t&&s;return(0,C.createElement)(C.Fragment,null,r&&(0,C.createElement)(Lo,{...e}))}(0,an.addFilter)("editor.BlockEdit","core/editor/with-pattern-override-controls",Vo);const zo=window.wp.keyboardShortcuts;function Go(){const{redo:e,undo:t,savePost:n,setIsListViewOpened:o}=(0,a.useDispatch)(xo),{isEditedPostDirty:s,isPostSavingLocked:r,isListViewOpened:i}=(0,a.useSelect)(xo);return(0,zo.useShortcut)("core/editor/undo",(e=>{t(),e.preventDefault()})),(0,zo.useShortcut)("core/editor/redo",(t=>{e(),t.preventDefault()})),(0,zo.useShortcut)("core/editor/save",(e=>{e.preventDefault(),r()||s()&&n()})),(0,zo.useShortcut)("core/editor/toggle-list-view",(e=>{i()||(e.preventDefault(),o(!0))})),null}class jo extends P.Component{constructor(e){super(e),this.needsAutosave=!(!e.isDirty||!e.isAutosaveable)}componentDidMount(){this.props.disableIntervalChecks||this.setAutosaveTimer()}componentDidUpdate(e){this.props.disableIntervalChecks?this.props.editsReference!==e.editsReference&&this.props.autosave():(this.props.interval!==e.interval&&(clearTimeout(this.timerId),this.setAutosaveTimer()),this.props.isDirty&&(!this.props.isAutosaving||e.isAutosaving)?this.props.editsReference!==e.editsReference&&(this.needsAutosave=!0):this.needsAutosave=!1)}componentWillUnmount(){clearTimeout(this.timerId)}setAutosaveTimer(e=1e3*this.props.interval){this.timerId=setTimeout((()=>{this.autosaveTimerHandler()}),e)}autosaveTimerHandler(){this.props.isAutosaveable?(this.needsAutosave&&(this.needsAutosave=!1,this.props.autosave()),this.setAutosaveTimer()):this.setAutosaveTimer(1e3)}render(){return null}}const Wo=(0,No.compose)([(0,a.withSelect)(((e,t)=>{const{getReferenceByDistinctEdits:n}=e(p.store),{isEditedPostDirty:o,isEditedPostAutosaveable:s,isAutosavingPost:r,getEditorSettings:i}=e(xo),{interval:a=i().autosaveInterval}=t;return{editsReference:n(),isDirty:o(),isAutosaveable:s(),isAutosaving:r(),interval:a}})),(0,a.withDispatch)(((e,t)=>({autosave(){const{autosave:n=e(xo).autosave}=t;n()}})))])(jo);var $o=n(5755),Ko=n.n($o);const Zo=window.wp.components,Yo=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})),qo=(0,C.createElement)(T.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,C.createElement)(T.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})),Qo=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,C.createElement)(T.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})),Xo=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})),Jo=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})),es=window.wp.keycodes,ts=window.wp.commands,ns={wp_pattern:(0,d.__)("Editing pattern: %s"),wp_navigation:(0,d.__)("Editing navigation menu: %s"),wp_template:(0,d.__)("Editing template: %s"),wp_template_part:(0,d.__)("Editing template part: %s")},os={wp_block:Yo,wp_navigation:qo};function ss(){const{postType:e,postId:t,onNavigateToPreviousEntityRecord:n}=(0,a.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:n,getEditorSettings:o}=e(xo);return{postType:n(),postId:t(),onNavigateToPreviousEntityRecord:o().onNavigateToPreviousEntityRecord,getEditorSettings:o}}),[]);return(0,C.createElement)(rs,{postType:e,postId:t,onBack:n?()=>{n&&n()}:void 0})}function rs({postType:e,postId:t,onBack:n}){var o;const{open:s}=(0,a.useDispatch)(ts.store),{editedRecord:r,isResolving:i}=(0,p.useEntityRecord)("postType",e,t),{templateIcon:l,templateTitle:c}=(0,a.useSelect)((e=>{const{__experimentalGetTemplateInfo:t}=e(xo),n=t(r);return{templateIcon:n.icon,templateTitle:n.title}})),u=!r&&!i,g=null!==(o=os[e])&&void 0!==o?o:Qo,[h,_]=(0,P.useState)(!1),f=(0,P.useRef)(!0),E=["wp_template","wp_template_part"].includes(e),b=["wp_template","wp_navigation","wp_template_part","wp_block"].includes(e);(0,P.useEffect)((()=>{f.current||_(!0),f.current=!1}),[e,t]);const v=E?c:r.title;return(0,C.createElement)("div",{className:Ko()("editor-document-bar",{"has-back-button":!!n,"is-animated":h,"is-global":b})},n&&(0,C.createElement)(Zo.Button,{className:"editor-document-bar__back",icon:(0,d.isRTL)()?Xo:Jo,onClick:e=>{e.stopPropagation(),n()},size:"compact"},(0,d.__)("Back")),u&&(0,C.createElement)(Zo.__experimentalText,null,(0,d.__)("Document not found")),!u&&(0,C.createElement)(Zo.Button,{className:"editor-document-bar__command",onClick:()=>s(),size:"compact"},(0,C.createElement)(Zo.__experimentalHStack,{className:"editor-document-bar__title",spacing:1,justify:"center"},(0,C.createElement)(m.BlockIcon,{icon:E?l:g}),(0,C.createElement)(Zo.__experimentalText,{size:"body",as:"h1","aria-label":ns[e]?(0,d.sprintf)(ns[e],v):void 0},v)),(0,C.createElement)("span",{className:"editor-document-bar__shortcut"},es.displayShortcut.primary("k"))))}const is=window.wp.richText,as=({children:e,isValid:t,level:n,href:o,onSelect:s})=>(0,C.createElement)("li",{className:Ko()("document-outline__item",`is-${n.toLowerCase()}`,{"is-invalid":!t})},(0,C.createElement)("a",{href:o,className:"document-outline__button",onClick:s},(0,C.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,C.createElement)("strong",{className:"document-outline__level"},n),(0,C.createElement)("span",{className:"document-outline__item-content"},e))),ls=(0,C.createElement)("em",null,(0,d.__)("(Empty heading)")),cs=[(0,C.createElement)("br",{key:"incorrect-break"}),(0,C.createElement)("em",{key:"incorrect-message"},(0,d.__)("(Incorrect heading level)"))],us=[(0,C.createElement)("br",{key:"incorrect-break-h1"}),(0,C.createElement)("em",{key:"incorrect-message-h1"},(0,d.__)("(Your theme may already use a H1 for the post title)"))],ds=[(0,C.createElement)("br",{key:"incorrect-break-multiple-h1"}),(0,C.createElement)("em",{key:"incorrect-message-multiple-h1"},(0,d.__)("(Multiple H1 headings are not recommended)"))];function ps(){return(0,C.createElement)(Zo.SVG,{width:"138",height:"148",viewBox:"0 0 138 148",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,C.createElement)(Zo.Rect,{width:"138",height:"148",rx:"4",fill:"#F0F6FC"}),(0,C.createElement)(Zo.Line,{x1:"44",y1:"28",x2:"24",y2:"28",stroke:"#DDDDDD"}),(0,C.createElement)(Zo.Rect,{x:"48",y:"16",width:"27",height:"23",rx:"4",fill:"#DDDDDD"}),(0,C.createElement)(Zo.Path,{d:"M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z",fill:"black"}),(0,C.createElement)(Zo.Line,{x1:"55",y1:"59",x2:"24",y2:"59",stroke:"#DDDDDD"}),(0,C.createElement)(Zo.Rect,{x:"59",y:"47",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,C.createElement)(Zo.Path,{d:"M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z",fill:"black"}),(0,C.createElement)(Zo.Line,{x1:"80",y1:"90",x2:"24",y2:"90",stroke:"#DDDDDD"}),(0,C.createElement)(Zo.Rect,{x:"84",y:"78",width:"30",height:"23",rx:"4",fill:"#F0B849"}),(0,C.createElement)(Zo.Path,{d:"M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z",fill:"black"}),(0,C.createElement)(Zo.Line,{x1:"66",y1:"121",x2:"24",y2:"121",stroke:"#DDDDDD"}),(0,C.createElement)(Zo.Rect,{x:"70",y:"109",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,C.createElement)(Zo.Path,{d:"M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z",fill:"black"}))}const ms=(e=[])=>e.flatMap(((e={})=>"core/heading"===e.name?{...e,level:e.attributes.level,isEmpty:gs(e)}:ms(e.innerBlocks))),gs=e=>!e.attributes.content||0===e.attributes.content.length,hs=(0,No.compose)((0,a.withSelect)((e=>{var t;const{getBlocks:n}=e(m.store),{getEditedPostAttribute:o}=e(xo),{getPostType:s}=e(p.store),r=s(o("type"));return{title:o("title"),blocks:n(),isTitleSupported:null!==(t=r?.supports?.title)&&void 0!==t&&t}})))((({blocks:e=[],title:t,onSelect:n,isTitleSupported:o,hasOutlineItemsDisabled:s})=>{const r=ms(e),{selectBlock:i}=(0,a.useDispatch)(m.store);if(r.length<1)return(0,C.createElement)("div",{className:"editor-document-outline has-no-headings"},(0,C.createElement)(ps,null),(0,C.createElement)("p",null,(0,d.__)("Navigate the structure of your document and address issues like empty or incorrect heading levels.")));let l=1;const c=document.querySelector(".editor-post-title__input"),u=o&&t&&c,p=r.reduce(((e,t)=>({...e,[t.level]:(e[t.level]||0)+1})),{})[1]>1;return(0,C.createElement)("div",{className:"document-outline"},(0,C.createElement)("ul",null,u&&(0,C.createElement)(as,{level:(0,d.__)("Title"),isValid:!0,onSelect:n,href:`#${c.id}`,isDisabled:s},t),r.map(((e,t)=>{const o=e.level>l+1,r=!(e.isEmpty||o||!e.level||1===e.level&&(p||u));return l=e.level,(0,C.createElement)(as,{key:t,level:`H${e.level}`,isValid:r,isDisabled:s,href:`#block-${e.clientId}`,onSelect:()=>{i(e.clientId),n?.()}},e.isEmpty?ls:(0,is.getTextContent)((0,is.create)({html:e.attributes.content})),o&&cs,1===e.level&&p&&ds,u&&1===e.level&&!p&&us)}))))}));const _s=(0,a.withSelect)((e=>({blocks:e(m.store).getBlocks()})))((function({blocks:e,children:t}){return e.filter((e=>"core/heading"===e.name)).length<1?null:t}));const fs=function(){const{registerShortcut:e}=(0,a.useDispatch)(zo.store);return(0,P.useEffect)((()=>{e({name:"core/editor/save",category:"global",description:(0,d.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:(0,d.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:(0,d.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,es.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]}),e({name:"core/editor/toggle-list-view",category:"global",description:(0,d.__)("Open the block list view."),keyCombination:{modifier:"access",character:"o"}})}),[e]),(0,C.createElement)(m.BlockEditorKeyboardShortcuts.Register,null)},Es=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"})),bs=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"}));const vs=(0,P.forwardRef)((function(e,t){const n=(0,es.isAppleOS)()?es.displayShortcut.primaryShift("z"):es.displayShortcut.primary("y"),o=(0,a.useSelect)((e=>e(xo).hasEditorRedo()),[]),{redo:s}=(0,a.useDispatch)(xo);return(0,C.createElement)(Zo.Button,{...e,ref:t,icon:(0,d.isRTL)()?bs:Es,label:(0,d.__)("Redo"),shortcut:n,"aria-disabled":!o,onClick:o?s:void 0,className:"editor-history__redo"})}));const ys=(0,P.forwardRef)((function(e,t){const n=(0,a.useSelect)((e=>e(xo).hasEditorUndo()),[]),{undo:o}=(0,a.useDispatch)(xo);return(0,C.createElement)(Zo.Button,{...e,ref:t,icon:(0,d.isRTL)()?Es:bs,label:(0,d.__)("Undo"),shortcut:es.displayShortcut.primary("z"),"aria-disabled":!n,onClick:n?o:void 0,className:"editor-history__undo"})}));const ws=(0,No.compose)([(0,a.withSelect)((e=>({isValid:e(m.store).isValidTemplate()}))),(0,a.withDispatch)((e=>{const{setTemplateValidity:t,synchronizeTemplate:n}=e(m.store);return{resetTemplateValidity:()=>t(!0),synchronizeTemplate:n}}))])((function({isValid:e,...t}){return e?null:(0,C.createElement)(Zo.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:(0,d.__)("Keep it as is"),onClick:t.resetTemplateValidity},{label:(0,d.__)("Reset the template"),onClick:()=>{window.confirm((0,d.__)("Resetting the template may result in loss of content, do you want to continue?"))&&t.synchronizeTemplate()}}]},(0,d.__)("The content of your post doesn’t match the template assigned to your post type."))}));const ks=function(){const{notices:e}=(0,a.useSelect)((e=>({notices:e(rn.store).getNotices()})),[]),{removeNotice:t}=(0,a.useDispatch)(rn.store),n=e.filter((({isDismissible:e,type:t})=>e&&"default"===t)),o=e.filter((({isDismissible:e,type:t})=>!e&&"default"===t));return(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.NoticeList,{notices:o,className:"components-editor-notices__pinned"}),(0,C.createElement)(Zo.NoticeList,{notices:n,className:"components-editor-notices__dismissible",onRemove:t},(0,C.createElement)(ws,null)))},Ss=-3;function Ps(){const e=(0,a.useSelect)((e=>e(rn.store).getNotices()),[]),{removeNotice:t}=(0,a.useDispatch)(rn.store),n=e.filter((({type:e})=>"snackbar"===e)).slice(Ss);return(0,C.createElement)(Zo.SnackbarList,{notices:n,className:"components-editor-notices__snackbar",onRemove:t})}const Cs=window.wp.htmlEntities;function Ts({record:e,checked:t,onChange:n}){const{name:o,kind:s,title:r,key:i}=e,l=(0,a.useSelect)((e=>{if("postType"!==s||"wp_template"!==o)return r;const t=e(p.store).getEditedEntityRecord(s,o,i);return e(xo).__experimentalGetTemplateInfo(t).title}),[o,s,r,i]);return(0,C.createElement)(Zo.PanelRow,null,(0,C.createElement)(Zo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,Cs.decodeEntities)(l)||(0,d.__)("Untitled"),checked:t,onChange:n}))}const{getGlobalStylesChanges:xs,GlobalStylesContext:Bs}=u(m.privateApis);function Is({record:e}){const{user:t}=(0,P.useContext)(Bs),n=(0,a.useSelect)((t=>t(p.store).getEntityRecord(e.kind,e.name,e.key)),[e.kind,e.name,e.key]),o=xs(t,n,{maxResults:10});return o.length?(0,C.createElement)("ul",{className:"entities-saved-states__changes"},o.map((e=>(0,C.createElement)("li",{key:e},e)))):null}function Ns({record:e,count:t}){if("globalStyles"===e?.name)return null;const n=function(e,t){switch(e){case"site":return 1===t?(0,d.__)("This change will affect your whole site."):(0,d.__)("These changes will affect your whole site.");case"wp_template":return(0,d.__)("This change will affect pages and posts that use this template.");case"page":case"post":return(0,d.__)("The following has been modified.")}}(e?.name,t);return n?(0,C.createElement)(Zo.PanelRow,null,n):null}function Ds({list:e,unselectedEntities:t,setUnselectedEntities:n}){const o=e.length,s=e[0];let r=(0,a.useSelect)((e=>e(p.store).getEntityConfig(s.kind,s.name)),[s.kind,s.name]).label;return"wp_template_part"===s?.name&&(r=1===o?(0,d.__)("Template Part"):(0,d.__)("Template Parts")),(0,C.createElement)(Zo.PanelBody,{title:r,initialOpen:!0},(0,C.createElement)(Ns,{record:s,count:o}),e.map((e=>(0,C.createElement)(Ts,{key:e.key||e.property,record:e,checked:!t.some((t=>t.kind===e.kind&&t.name===e.name&&t.key===e.key&&t.property===e.property)),onChange:t=>n(e,t)}))),"globalStyles"===s?.name&&(0,C.createElement)(Is,{record:s}))}const As={title:(0,d.__)("Title"),description:(0,d.__)("Tagline"),site_logo:(0,d.__)("Logo"),site_icon:(0,d.__)("Icon"),show_on_front:(0,d.__)("Show on front"),page_on_front:(0,d.__)("Page on front"),posts_per_page:(0,d.__)("Maximum posts per page"),default_comment_status:(0,d.__)("Allow comments on new posts")},Rs=()=>{const{editedEntities:e,siteEdits:t}=(0,a.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,getEntityRecordEdits:n}=e(p.store);return{editedEntities:t(),siteEdits:n("root","site")}}),[]),n=(0,P.useMemo)((()=>{const n=e.filter((e=>!("root"===e.kind&&"site"===e.name))),o=[];for(const e in t)o.push({kind:"root",name:"site",title:As[e]||e,property:e});return[...n,...o]}),[e,t]),[o,s]=(0,P.useState)([]);return{dirtyEntityRecords:n,isDirty:n.length-o.length>0,setUnselectedEntities:({kind:e,name:t,key:n,property:r},i)=>{s(i?o.filter((o=>o.kind!==e||o.name!==t||o.key!==n||o.property!==r)):[...o,{kind:e,name:t,key:n,property:r}])},unselectedEntities:o}},Os=[{kind:"postType",name:"wp_navigation"}];function Ls(e){return e}function Ms({close:e}){const t=Rs();return(0,C.createElement)(Fs,{close:e,...t})}function Fs({additionalPrompt:e,close:t,onSave:n=Ls,saveEnabled:o,saveLabel:s=(0,d.__)("Save"),dirtyEntityRecords:r,isDirty:i,setUnselectedEntities:l,unselectedEntities:c}){const u=(0,P.useRef)(),{editEntityRecord:g,saveEditedEntityRecord:h,__experimentalSaveSpecifiedEntityEdits:_}=(0,a.useDispatch)(p.store),{__unstableMarkLastChangeAsPersistent:f}=(0,a.useDispatch)(m.store),{createSuccessNotice:E,createErrorNotice:b,removeNotice:v}=(0,a.useDispatch)(rn.store),y=r.reduce(((e,t)=>{const{name:n}=t;return e[n]||(e[n]=[]),e[n].push(t),e}),{}),{site:w,wp_template:k,wp_template_part:S,...T}=y,x=[w,k,S,...Object.values(T)].filter(Array.isArray),B=null!=o?o:i,{homeUrl:I}=(0,a.useSelect)((e=>{const{getUnstableBase:t}=e(p.store);return{homeUrl:t()?.home}}),[]),N=(0,P.useCallback)((()=>t()),[t]),[D,A]=(0,No.__experimentalUseDialog)({onClose:()=>N()});return(0,C.createElement)("div",{ref:D,...A,className:"entities-saved-states__panel"},(0,C.createElement)(Zo.Flex,{className:"entities-saved-states__panel-header",gap:2},(0,C.createElement)(Zo.FlexItem,{isBlock:!0,as:Zo.Button,ref:u,variant:"primary",disabled:!B,onClick:()=>{const e="site-editor-save-success";v(e);const o=r.filter((({kind:e,name:t,key:n,property:o})=>!c.some((s=>s.kind===e&&s.name===t&&s.key===n&&s.property===o))));t(o);const s=[],i=[];o.forEach((({kind:e,name:t,key:n,property:o})=>{"root"===e&&"site"===t?s.push(o):(Os.some((n=>n.kind===e&&n.name===t))&&g(e,t,n,{status:"publish"}),i.push(h(e,t,n)))})),s.length&&i.push(_("root","site",void 0,s)),f(),Promise.all(i).then((e=>n(e))).then((t=>{t.some((e=>void 0===e))?b((0,d.__)("Saving failed.")):E((0,d.__)("Site updated."),{type:"snackbar",id:e,actions:[{label:(0,d.__)("View site"),url:I}]})})).catch((e=>b(`${(0,d.__)("Saving failed.")} ${e}`)))},className:"editor-entities-saved-states__save-button"},s),(0,C.createElement)(Zo.FlexItem,{isBlock:!0,as:Zo.Button,variant:"secondary",onClick:N},(0,d.__)("Cancel"))),(0,C.createElement)("div",{className:"entities-saved-states__text-prompt"},(0,C.createElement)("strong",{className:"entities-saved-states__text-prompt--header"},(0,d.__)("Are you ready to save?")),e,(0,C.createElement)("p",null,i?(0,P.createInterpolateElement)((0,d.sprintf)((0,d._n)("There is <strong>%d site change</strong> waiting to be saved.","There are <strong>%d site changes</strong> waiting to be saved.",x.length),x.length),{strong:(0,C.createElement)("strong",null)}):(0,d.__)("Select the items you want to save."))),x.map((e=>(0,C.createElement)(Ds,{key:e[0].name,list:e,unselectedEntities:c,setUnselectedEntities:l}))))}function Vs(){try{return(0,a.select)(xo).getEditedPostContent()}catch(e){}}function Us({text:e,children:t}){const n=(0,No.useCopyToClipboard)(e);return(0,C.createElement)(Zo.Button,{variant:"secondary",ref:n},t)}class Hs extends P.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,an.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){const{error:e}=this.state;if(!e)return this.props.children;const t=[(0,C.createElement)(Us,{key:"copy-post",text:Vs},(0,d.__)("Copy Post Text")),(0,C.createElement)(Us,{key:"copy-error",text:e.stack},(0,d.__)("Copy Error"))];return(0,C.createElement)(m.Warning,{className:"editor-error-boundary",actions:t},(0,d.__)("The editor has encountered an unexpected error."))}}const zs=Hs,Gs=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame;let js;function Ws(){const{postId:e,isEditedPostNew:t,hasRemoteAutosave:n}=(0,a.useSelect)((e=>({postId:e(xo).getCurrentPostId(),isEditedPostNew:e(xo).isEditedPostNew(),hasRemoteAutosave:!!e(xo).getEditorSettings().autosave})),[]),{getEditedPostAttribute:o}=(0,a.useSelect)(xo),{createWarningNotice:s,removeNotice:r}=(0,a.useDispatch)(rn.store),{editPost:l,resetEditorBlocks:c}=(0,a.useDispatch)(xo);(0,P.useEffect)((()=>{let a=function(e,t){return window.sessionStorage.getItem(ln(e,t))}(e,t);if(!a)return;try{a=JSON.parse(a)}catch{return}const{post_title:u,content:p,excerpt:m}=a,g={title:u,content:p,excerpt:m};if(!Object.keys(g).some((e=>g[e]!==o(e))))return void cn(e,t);if(n)return;const h="wpEditorAutosaveRestore";s((0,d.__)("The backup of this post in your browser is different from the version below."),{id:h,actions:[{label:(0,d.__)("Restore the backup"),onClick(){const{content:e,...t}=g;l(t),c((0,i.parse)(g.content)),r(h)}}]})}),[t,e])}const $s=(0,No.ifCondition)((()=>{if(void 0!==js)return js;try{window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),js=!0}catch{js=!1}return js}))((function(){const{autosave:e}=(0,a.useDispatch)(xo),t=(0,P.useCallback)((()=>{Gs((()=>e({local:!0})))}),[]);Ws(),function(){const{postId:e,isEditedPostNew:t,isDirty:n,isAutosaving:o,didError:s}=(0,a.useSelect)((e=>({postId:e(xo).getCurrentPostId(),isEditedPostNew:e(xo).isEditedPostNew(),isDirty:e(xo).isEditedPostDirty(),isAutosaving:e(xo).isAutosavingPost(),didError:e(xo).didPostSaveRequestFail()})),[]),r=(0,P.useRef)(n),i=(0,P.useRef)(o);(0,P.useEffect)((()=>{!s&&(i.current&&!o||r.current&&!n)&&cn(e,t),r.current=n,i.current=o}),[n,o,s]);const l=(0,No.usePrevious)(t),c=(0,No.usePrevious)(e);(0,P.useEffect)((()=>{c===e&&l&&!t&&cn(e,!0)}),[t,e])}();const n=(0,a.useSelect)((e=>e(xo).getEditorSettings().localAutosaveInterval),[]);return(0,C.createElement)(Wo,{interval:n,autosave:t})}));const Ks=function({children:e}){const t=(0,a.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xo),{getPostType:n}=e(p.store),o=n(t("type"));return!!o?.supports?.["page-attributes"]}),[]);return t?e:null};const Zs=function({children:e,supportKeys:t}){const n=(0,a.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xo),{getPostType:n}=e(p.store);return n(t("type"))}),[]);let o=!0;return n&&(o=(Array.isArray(t)?t:[t]).some((e=>!!n.supports[e]))),o?e:null};function Ys(){const e=(0,a.useSelect)((e=>{var t;return null!==(t=e(xo).getEditedPostAttribute("menu_order"))&&void 0!==t?t:0}),[]),{editPost:t}=(0,a.useDispatch)(xo),[n,o]=(0,P.useState)(null),s=null!=n?n:e;return(0,C.createElement)(Zo.Flex,null,(0,C.createElement)(Zo.FlexBlock,null,(0,C.createElement)(Zo.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,d.__)("Order"),value:s,onChange:e=>{o(e);const n=Number(e);Number.isInteger(n)&&""!==e.trim?.()&&t({menu_order:n})},labelPosition:"side",onBlur:()=>{o(null)}})))}function qs(){return(0,C.createElement)(Zs,{supportKeys:"page-attributes"},(0,C.createElement)(Ys,null))}var Qs=n(9681),Xs=n.n(Qs);function Js(e){const t=e.map((e=>({children:[],parent:null,...e})));if(t.some((({parent:e})=>null===e)))return t;const n=t.reduce(((e,t)=>{const{parent:n}=t;return e[n]||(e[n]=[]),e[n].push(t),e}),{}),o=e=>e.map((e=>{const t=n[e.id];return{...e,children:t&&t.length?o(t):[]}}));return o(n[0]||[])}const er=e=>(0,Cs.decodeEntities)(e),tr=e=>({...e,name:er(e.name)}),nr=e=>(null!=e?e:[]).map(tr);function or(e){return e?.title?.rendered?(0,Cs.decodeEntities)(e.title.rendered):`#${e.id} (${(0,d.__)("no title")})`}const sr=(e,t)=>{const n=Xs()(e||"").toLowerCase(),o=Xs()(t||"").toLowerCase();return n===o?0:n.startsWith(o)?n.length:1/0};const rr=function(){const{editPost:e}=(0,a.useDispatch)(xo),[t,n]=(0,P.useState)(!1),{isHierarchical:o,parentPostId:s,parentPostTitle:r,pageItems:i}=(0,a.useSelect)((e=>{var n;const{getPostType:o,getEntityRecords:s,getEntityRecord:r}=e(p.store),{getCurrentPostId:i,getEditedPostAttribute:a}=e(xo),l=a("type"),c=a("parent"),u=o(l),d=i(),m=null!==(n=u?.hierarchical)&&void 0!==n&&n,g={per_page:100,exclude:d,parent_exclude:d,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};t&&(g.search=t);const h=c?r("postType",l,c):null;return{isHierarchical:m,parentPostId:c,parentPostTitle:h?or(h):"",pageItems:m?s("postType",l,g):null}}),[t]),l=(0,P.useMemo)((()=>{const e=(n,o=0)=>n.map((t=>[{value:t.id,label:"— ".repeat(o)+(0,Cs.decodeEntities)(t.name),rawName:t.name},...e(t.children||[],o+1)])).sort((([e],[n])=>sr(e.rawName,t)>=sr(n.rawName,t)?1:-1)).flat();if(!i)return[];let n=i.map((e=>({id:e.id,parent:e.parent,name:or(e)})));t||(n=Js(n));const o=e(n),a=o.find((e=>e.value===s));return r&&!a&&o.unshift({value:s,label:r}),o}),[i,t,r,s]);return o?(0,C.createElement)(Zo.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,d.__)("Parent"),value:s,options:l,onFilterValueChange:(0,No.debounce)((e=>{n(e)}),300),onChange:t=>{e({parent:t})}}):null},ir="page-attributes";const ar=function(){var e;const{isEnabled:t,isOpened:n,postType:o}=(0,a.useSelect)((e=>{const{getEditedPostAttribute:t,isEditorPanelEnabled:n,isEditorPanelOpened:o}=e(xo),{getPostType:s}=e(p.store);return{isEnabled:n(ir),isOpened:o(ir),postType:s(t("type"))}}),[]),{toggleEditorPanelOpened:s}=(0,a.useDispatch)(xo);return t&&o?(0,C.createElement)(Ks,null,(0,C.createElement)(Zo.PanelBody,{title:null!==(e=o?.labels?.attributes)&&void 0!==e?e:(0,d.__)("Page attributes"),opened:n,onToggle:(...e)=>s(ir,...e)},(0,C.createElement)(rr,null),(0,C.createElement)(Zo.PanelRow,null,(0,C.createElement)(qs,null)))):null},lr=(0,C.createElement)(T.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,C.createElement)(T.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5 5.5V8H20V5.5H22.5V4H20V1.5H18.5V4H16V5.5H18.5ZM13.9624 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V10.0391H18.5V18C18.5 18.2761 18.2761 18.5 18 18.5H10L10 10.4917L16.4589 10.5139L16.4641 9.01389L5.5 8.97618V6C5.5 5.72386 5.72386 5.5 6 5.5H13.9624V4ZM5.5 10.4762V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 10.4865L5.5 10.4762Z"})),cr=(0,d.__)("Custom Template");function ur({onClose:e}){const{defaultBlockTemplate:t,onNavigateToEntityRecord:n}=(0,a.useSelect)((e=>{const{getEditorSettings:t,getCurrentTemplateId:n}=e(xo);return{defaultBlockTemplate:t().defaultBlockTemplate,onNavigateToEntityRecord:t().onNavigateToEntityRecord,getTemplateId:n}})),{createTemplate:o}=u((0,a.useDispatch)(xo)),[s,r]=(0,P.useState)(""),[l,c]=(0,P.useState)(!1),p=()=>{r(""),e()};return(0,C.createElement)(Zo.Modal,{title:(0,d.__)("Create custom template"),onRequestClose:p},(0,C.createElement)("form",{className:"editor-post-template__create-form",onSubmit:async e=>{if(e.preventDefault(),l)return;c(!0);const r=null!=t?t:(0,i.serialize)([(0,i.createBlock)("core/group",{tagName:"header",layout:{inherit:!0}},[(0,i.createBlock)("core/site-title"),(0,i.createBlock)("core/site-tagline")]),(0,i.createBlock)("core/separator"),(0,i.createBlock)("core/group",{tagName:"main"},[(0,i.createBlock)("core/group",{layout:{inherit:!0}},[(0,i.createBlock)("core/post-title")]),(0,i.createBlock)("core/post-content",{layout:{inherit:!0}})])]),a=await o({slug:(0,w.cleanForSlug)(s||cr),content:r,title:s||cr});c(!1),n({postId:a.id,postType:"wp_template"}),p()}},(0,C.createElement)(Zo.__experimentalVStack,{spacing:"3"},(0,C.createElement)(Zo.TextControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Name"),value:s,onChange:r,placeholder:cr,disabled:l,help:(0,d.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,C.createElement)(Zo.__experimentalHStack,{justify:"right"},(0,C.createElement)(Zo.Button,{variant:"tertiary",onClick:p},(0,d.__)("Cancel")),(0,C.createElement)(Zo.Button,{variant:"primary",type:"submit",isBusy:l,"aria-disabled":l},(0,d.__)("Create"))))))}function dr(){return(0,a.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:n}=e(xo);return{postId:t(),postType:n()}}),[])}function pr(){const{postType:e,postId:t}=dr();return(0,a.useSelect)((n=>{const{getEntityRecord:o,getEntityRecords:s}=n(p.store),r=o("root","site"),i=s("postType","wp_template",{per_page:-1}),a=+t===r?.page_for_posts,l="page"===e&&+t===r?.page_on_front&&i?.some((({slug:e})=>"front-page"===e));return!a&&!l}),[t,e])}function mr(e){return(0,a.useSelect)((t=>t(p.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:e})),[e])}function gr(e){const t=hr(),n=pr(),o=mr(e);return(0,P.useMemo)((()=>n&&o?.filter((e=>e.is_custom&&e.slug!==t&&!!e.content.raw))),[o,t,n])}function hr(){const{postType:e,postId:t}=dr(),n=mr(e),o=(0,a.useSelect)((n=>{const o=n(p.store).getEditedEntityRecord("postType",e,t);return o?.template}),[e,t]);if(o)return n?.find((e=>e.slug===o))?.slug}const _r={className:"editor-post-template__dropdown",placement:"bottom-start"};function fr({isOpen:e,onClick:t}){const n=(0,a.useSelect)((e=>{const t=e(xo).getEditedPostAttribute("template"),{supportsTemplateMode:n,availableTemplates:o}=e(xo).getEditorSettings();if(!n&&o[t])return o[t];const s=e(p.store).canUser("create","templates")&&e(xo).getCurrentTemplateId();return s?.title||s?.slug||o?.[t]}),[]);return(0,C.createElement)(Zo.Button,{__next40pxDefaultSize:!0,className:"edit-post-post-template__toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,d.__)("Template options"),onClick:t},null!=n?n:(0,d.__)("Default template"))}function Er({onClose:e}){var t,n;const o=pr(),{availableTemplates:s,fetchedTemplates:r,selectedTemplateSlug:i,canCreate:l,canEdit:c,currentTemplateId:u,onNavigateToEntityRecord:g,getEditorSettings:h}=(0,a.useSelect)((e=>{const{canUser:t,getEntityRecords:n}=e(p.store),s=e(xo).getEditorSettings(),r=t("create","templates"),i=e(xo).getCurrentTemplateId();return{availableTemplates:s.availableTemplates,fetchedTemplates:r?n("postType","wp_template",{post_type:e(xo).getCurrentPostType(),per_page:-1}):void 0,selectedTemplateSlug:e(xo).getEditedPostAttribute("template"),canCreate:o&&r&&s.supportsTemplateMode,canEdit:o&&r&&s.supportsTemplateMode&&!!i,currentTemplateId:i,onNavigateToEntityRecord:s.onNavigateToEntityRecord,getEditorSettings:e(xo).getEditorSettings}}),[o]),_=(0,P.useMemo)((()=>Object.entries({...s,...Object.fromEntries((null!=r?r:[]).map((({slug:e,title:t})=>[e,t.rendered])))}).map((([e,t])=>({value:e,label:t})))),[s,r]),f=null!==(t=_.find((e=>e.value===i)))&&void 0!==t?t:_.find((e=>!e.value)),{editPost:E}=(0,a.useDispatch)(xo),{createSuccessNotice:b}=(0,a.useDispatch)(rn.store),[v,y]=(0,P.useState)(!1);return(0,C.createElement)("div",{className:"editor-post-template__classic-theme-dropdown"},(0,C.createElement)(m.__experimentalInspectorPopoverHeader,{title:(0,d.__)("Template"),help:(0,d.__)("Templates define the way content is displayed when viewing your site."),actions:l?[{icon:lr,label:(0,d.__)("Add template"),onClick:()=>y(!0)}]:[],onClose:e}),o?(0,C.createElement)(Zo.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:!0,label:(0,d.__)("Template"),value:null!==(n=f?.value)&&void 0!==n?n:"",options:_,onChange:e=>E({template:e||""})}):(0,C.createElement)(Zo.Notice,{status:"warning",isDismissible:!1},(0,d.__)("The posts page template cannot be changed.")),c&&g&&(0,C.createElement)("p",null,(0,C.createElement)(Zo.Button,{variant:"link",onClick:()=>{g({postId:u,postType:"wp_template"}),e(),b((0,d.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:[{label:(0,d.__)("Go back"),onClick:()=>h().onNavigateToPreviousEntityRecord()}]})}},(0,d.__)("Edit template"))),v&&(0,C.createElement)(ur,{onClose:()=>y(!1)}))}const br=function(){return(0,C.createElement)(Zo.Dropdown,{popoverProps:_r,focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,C.createElement)(fr,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,C.createElement)(Er,{onClose:e})})},vr=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));function yr({onClick:e}){const[t,n]=(0,P.useState)(!1),o=(0,P.useCallback)((()=>{n(!1)}),[]),{postType:s,postId:r}=dr(),i=gr(s),{editEntityRecord:l}=(0,a.useDispatch)(p.store);if(!i?.length)return null;return(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.MenuItem,{onClick:()=>n(!0)},(0,d.__)("Swap template")),t&&(0,C.createElement)(Zo.Modal,{title:(0,d.__)("Choose a template"),onRequestClose:o,overlayClassName:"editor-post-template__swap-template-modal",isFullScreen:!0},(0,C.createElement)("div",{className:"editor-post-template__swap-template-modal-content"},(0,C.createElement)(wr,{postType:s,onSelect:async t=>{l("postType",s,r,{template:t.name},{undoIgnore:!0}),o(),e()}}))))}function wr({postType:e,onSelect:t}){const n=gr(e),o=(0,P.useMemo)((()=>n.map((e=>({name:e.slug,blocks:(0,i.parse)(e.content.raw),title:(0,Cs.decodeEntities)(e.title.rendered),id:e.id})))),[n]),s=(0,No.useAsyncList)(o);return(0,C.createElement)(m.__experimentalBlockPatternsList,{label:(0,d.__)("Templates"),blockPatterns:o,shownPatterns:s,onClickPattern:t})}function kr({onClick:e}){const t=hr(),n=pr(),{postType:o,postId:s}=dr(),{editEntityRecord:r}=(0,a.useDispatch)(p.store);return t&&n?(0,C.createElement)(Zo.MenuItem,{onClick:()=>{r("postType",o,s,{template:""},{undoIgnore:!0}),e()}},(0,d.__)("Use default template")):null}function Sr({onClick:e}){const{canCreateTemplates:t}=(0,a.useSelect)((e=>{const{canUser:t}=e(p.store);return{canCreateTemplates:t("create","templates")}}),[]),[n,o]=(0,P.useState)(!1),s=pr();return t&&s?(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.MenuItem,{onClick:()=>{o(!0)}},(0,d.__)("Create new template")),n&&(0,C.createElement)(ur,{onClose:()=>{o(!1),e()}})):null}const Pr={className:"editor-post-template__dropdown",placement:"bottom-start"};function Cr({id:e}){const{isTemplateHidden:t,onNavigateToEntityRecord:n,getEditorSettings:o,hasGoBack:s}=(0,a.useSelect)((e=>{const{getRenderingMode:t,getEditorSettings:n}=u(e(xo)),o=n();return{isTemplateHidden:"post-only"===t(),onNavigateToEntityRecord:o.onNavigateToEntityRecord,getEditorSettings:n,hasGoBack:o.hasOwnProperty("onNavigateToPreviousEntityRecord")}}),[]),{editedRecord:r,hasResolved:i}=(0,p.useEntityRecord)("postType","wp_template",e),{createSuccessNotice:l}=(0,a.useDispatch)(rn.store),{setRenderingMode:c}=(0,a.useDispatch)(xo);if(!i)return null;const m=s?[{label:(0,d.__)("Go back"),onClick:()=>o().onNavigateToPreviousEntityRecord()}]:void 0;return(0,C.createElement)(Zo.DropdownMenu,{popoverProps:Pr,focusOnMount:!0,toggleProps:{__next40pxDefaultSize:!0,variant:"tertiary"},label:(0,d.__)("Template options"),text:(0,Cs.decodeEntities)(r.title),icon:null},(({onClose:e})=>(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.MenuGroup,null,(0,C.createElement)(Zo.MenuItem,{onClick:()=>{n({postId:r.id,postType:"wp_template"}),e(),l((0,d.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:m})}},(0,d.__)("Edit template")),(0,C.createElement)(yr,{onClick:e}),(0,C.createElement)(kr,{onClick:e}),(0,C.createElement)(Sr,{onClick:e})),(0,C.createElement)(Zo.MenuGroup,null,(0,C.createElement)(Zo.MenuItem,{icon:t?void 0:vr,isSelected:!t,role:"menuitemcheckbox",onClick:()=>{c(t?"template-locked":"post-only")}},(0,d.__)("Template preview"))))))}const Tr=(0,P.forwardRef)((({className:e,label:t,children:n},o)=>(0,C.createElement)(Zo.__experimentalHStack,{className:Ko()("editor-post-panel__row",e),ref:o},t&&(0,C.createElement)("div",{className:"editor-post-panel__row-label"},t),(0,C.createElement)("div",{className:"editor-post-panel__row-control"},n)))),xr=Tr;function Br(){const{templateId:e,isBlockTheme:t}=(0,a.useSelect)((e=>{const{getCurrentTemplateId:t,getEditorSettings:n}=e(xo);return{templateId:t(),isBlockTheme:n().__unstableIsBlockBasedTheme}}),[]),n=(0,a.useSelect)((e=>{var t;const n=e(xo).getCurrentPostType(),o=e(p.store).getPostType(n);if(!o?.viewable)return!1;const s=e(xo).getEditorSettings();if(!!s.availableTemplates&&Object.keys(s.availableTemplates).length>0)return!0;if(!s.supportsTemplateMode)return!1;return null!==(t=e(p.store).canUser("create","templates"))&&void 0!==t&&t}),[]),o=(0,a.useSelect)((e=>{var t;return null!==(t=e(p.store).canUser("read","templates"))&&void 0!==t&&t}),[]);return t&&o||!n?t&&e?(0,C.createElement)(xr,{label:(0,d.__)("Template")},(0,C.createElement)(Cr,{id:e})):null:(0,C.createElement)(xr,{label:(0,d.__)("Template")},(0,C.createElement)(br,null))}const Ir={_fields:"id,name",context:"view"},Nr={who:"authors",per_page:50,...Ir};function Dr(e){const{authorId:t,authors:n,postAuthor:o}=(0,a.useSelect)((t=>{const{getUser:n,getUsers:o}=t(p.store),{getEditedPostAttribute:s}=t(xo),r=s("author"),i={...Nr};return e&&(i.search=e),{authorId:r,authors:o(i),postAuthor:n(r,Ir)}}),[e]);return{authorId:t,authorOptions:(0,P.useMemo)((()=>{const e=(null!=n?n:[]).map((e=>({value:e.id,label:(0,Cs.decodeEntities)(e.name)})));return e.findIndex((({value:e})=>o?.id===e))<0&&o?[{value:o.id,label:(0,Cs.decodeEntities)(o.name)},...e]:e}),[n,o])}}function Ar(){const[e,t]=(0,P.useState)(),{editPost:n}=(0,a.useDispatch)(xo),{authorId:o,authorOptions:s}=Dr(e);return(0,C.createElement)(Zo.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,d.__)("Author"),options:s,value:o,onFilterValueChange:(0,No.debounce)((e=>{t(e)}),300),onChange:e=>{e&&n({author:e})},allowReset:!1})}function Rr(){const{editPost:e}=(0,a.useDispatch)(xo),{authorId:t,authorOptions:n}=Dr();return(0,C.createElement)(Zo.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"post-author-selector",label:(0,d.__)("Author"),options:n,onChange:t=>{const n=Number(t);e({author:n})},value:t})}const Or=function(){return(0,a.useSelect)((e=>{const t=e(p.store).getUsers(Nr);return t?.length>=25}),[])?(0,C.createElement)(Ar,null):(0,C.createElement)(Rr,null)};function Lr({children:e}){const{hasAssignAuthorAction:t,hasAuthors:n}=(0,a.useSelect)((e=>{var t;const n=e(xo).getCurrentPost(),o=e(p.store).getUsers(Nr);return{hasAssignAuthorAction:null!==(t=n._links?.["wp:action-assign-author"])&&void 0!==t&&t,hasAuthors:o?.length>=1}}),[]);return t&&n?(0,C.createElement)(Zs,{supportKeys:"author"},e):null}const Mr=function(){return(0,C.createElement)(Lr,null,(0,C.createElement)(xr,{className:"editor-post-author__panel"},(0,C.createElement)(Or,null)))};const Fr=function(){const e=(0,a.useSelect)((e=>{var t;return null!==(t=e(xo).getEditedPostAttribute("comment_status"))&&void 0!==t?t:"open"}),[]),{editPost:t}=(0,a.useDispatch)(xo);return(0,C.createElement)(Zo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Allow comments"),checked:"open"===e,onChange:()=>t({comment_status:"open"===e?"closed":"open"})})};const Vr=function(){const e=(0,a.useSelect)((e=>{var t;return null!==(t=e(xo).getEditedPostAttribute("ping_status"))&&void 0!==t?t:"open"}),[]),{editPost:t}=(0,a.useDispatch)(xo);return(0,C.createElement)(Zo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Allow pingbacks & trackbacks"),checked:"open"===e,onChange:()=>t({ping_status:"open"===e?"closed":"open"})})},Ur="discussion-panel";const Hr=function(){const{isEnabled:e,isOpened:t}=(0,a.useSelect)((e=>{const{isEditorPanelEnabled:t,isEditorPanelOpened:n}=e(xo);return{isEnabled:t(Ur),isOpened:n(Ur)}}),[]),{toggleEditorPanelOpened:n}=(0,a.useDispatch)(xo);return e?(0,C.createElement)(Zs,{supportKeys:["comments","trackbacks"]},(0,C.createElement)(Zo.PanelBody,{title:(0,d.__)("Discussion"),opened:t,onToggle:()=>n(Ur)},(0,C.createElement)(Zs,{supportKeys:"comments"},(0,C.createElement)(Zo.PanelRow,null,(0,C.createElement)(Fr,null))),(0,C.createElement)(Zs,{supportKeys:"trackbacks"},(0,C.createElement)(Zo.PanelRow,null,(0,C.createElement)(Vr,null))))):null};const zr=function(){const e=(0,a.useSelect)((e=>e(xo).getEditedPostAttribute("excerpt")),[]),{editPost:t}=(0,a.useDispatch)(xo);return(0,C.createElement)("div",{className:"editor-post-excerpt"},(0,C.createElement)(Zo.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:e=>t({excerpt:e}),value:e}),(0,C.createElement)(Zo.ExternalLink,{href:(0,d.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt")},(0,d.__)("Learn more about manual excerpts")))};const Gr=function({children:e}){const t=(0,a.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xo);return t("type")}),[]);return["wp_template","wp_template_part"].includes(t)?null:(0,C.createElement)(Zs,{supportKeys:"excerpt"},e)},{Fill:jr,Slot:Wr}=(0,Zo.createSlotFill)("PluginPostExcerpt"),$r=({children:e,className:t})=>(0,C.createElement)(jr,null,(0,C.createElement)(Zo.PanelRow,{className:t},e));$r.Slot=Wr;const Kr=$r,Zr="post-excerpt";function Yr(){const{isOpened:e,isEnabled:t}=(0,a.useSelect)((e=>{const{isEditorPanelOpened:t,isEditorPanelEnabled:n}=e(xo);return{isOpened:t(Zr),isEnabled:n(Zr)}}),[]),{toggleEditorPanelOpened:n}=(0,a.useDispatch)(xo);return t?(0,C.createElement)(Gr,null,(0,C.createElement)(Zo.PanelBody,{title:(0,d.__)("Excerpt"),opened:e,onToggle:()=>n(Zr)},(0,C.createElement)(Kr.Slot,null,(e=>(0,C.createElement)(C.Fragment,null,(0,C.createElement)(zr,null),e))))):null}const qr=window.wp.blob;const Qr=(0,a.withSelect)((e=>{const{getThemeSupports:t}=e(p.store),{getEditedPostAttribute:n}=e(xo);return{postType:n("type"),themeSupports:t()}}))((function({themeSupports:e,children:t,postType:n,supportKeys:o}){return(Array.isArray(o)?o:[o]).some((t=>{var o;const s=null!==(o=e?.[t])&&void 0!==o&&o;return"post-thumbnails"===t&&Array.isArray(s)?s.includes(n):s}))?t:null}));const Xr=function({children:e}){return(0,C.createElement)(Qr,{supportKeys:"post-thumbnails"},(0,C.createElement)(Zs,{supportKeys:"thumbnail"},e))},Jr=["image"],ei=(0,d.__)("Featured image"),ti=(0,d.__)("Set featured image"),ni=(0,C.createElement)("p",null,(0,d.__)("To edit the featured image, you need permission to upload media."));const oi=(0,a.withSelect)((e=>{const{getMedia:t,getPostType:n}=e(p.store),{getCurrentPostId:o,getEditedPostAttribute:s}=e(xo),r=s("featured_media");return{media:r?t(r,{context:"view"}):null,currentPostId:o(),postType:n(s("type")),featuredImageId:r}})),si=(0,a.withDispatch)(((e,{noticeOperations:t},{select:n})=>{const{editPost:o}=e(xo);return{onUpdateImage(e){o({featured_media:e.id})},onDropImage(e){n(m.store).getSettings().mediaUpload({allowedTypes:["image"],filesList:e,onFileChange([e]){o({featured_media:e.id})},onError(e){t.removeAllNotices(),t.createErrorNotice(e)}})},onRemoveImage(){o({featured_media:0})}}})),ri=(0,No.compose)(Zo.withNotices,oi,si,(0,Zo.withFilters)("editor.PostFeaturedImage"))((function({currentPostId:e,featuredImageId:t,onUpdateImage:n,onRemoveImage:o,media:s,postType:r,noticeUI:i,noticeOperations:l}){const c=(0,P.useRef)(),[u,p]=(0,P.useState)(!1),{getSettings:g}=(0,a.useSelect)(m.store),{mediaWidth:h,mediaHeight:_,mediaSourceUrl:f}=function(e,t){var n,o;if(!e)return{};const s=(0,an.applyFilters)("editor.PostFeaturedImage.imageSize","large",e.id,t);if(s in(null!==(n=e?.media_details?.sizes)&&void 0!==n?n:{}))return{mediaWidth:e.media_details.sizes[s].width,mediaHeight:e.media_details.sizes[s].height,mediaSourceUrl:e.media_details.sizes[s].source_url};const r=(0,an.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",e.id,t);return r in(null!==(o=e?.media_details?.sizes)&&void 0!==o?o:{})?{mediaWidth:e.media_details.sizes[r].width,mediaHeight:e.media_details.sizes[r].height,mediaSourceUrl:e.media_details.sizes[r].source_url}:{mediaWidth:e.media_details.width,mediaHeight:e.media_details.height,mediaSourceUrl:e.source_url}}(s,e);function E(e){g().mediaUpload({allowedTypes:Jr,filesList:e,onFileChange([e]){(0,qr.isBlobURL)(e?.url)?p(!0):(e&&n(e),p(!1))},onError(e){l.removeAllNotices(),l.createErrorNotice(e)}})}return(0,C.createElement)(Xr,null,i,(0,C.createElement)("div",{className:"editor-post-featured-image"},s&&(0,C.createElement)("div",{id:`editor-post-featured-image-${t}-describedby`,className:"hidden"},s.alt_text&&(0,d.sprintf)((0,d.__)("Current image: %s"),s.alt_text),!s.alt_text&&(0,d.sprintf)((0,d.__)("The current image has no alternative text. The file name is: %s"),s.media_details.sizes?.full?.file||s.slug)),(0,C.createElement)(m.MediaUploadCheck,{fallback:ni},(0,C.createElement)(m.MediaUpload,{title:r?.labels?.featured_image||ei,onSelect:n,unstableFeaturedImageFlow:!0,allowedTypes:Jr,modalClass:"editor-post-featured-image__media-modal",render:({open:e})=>(0,C.createElement)("div",{className:"editor-post-featured-image__container"},(0,C.createElement)(Zo.Button,{ref:c,className:t?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:e,"aria-label":t?(0,d.__)("Edit or replace the image"):null,"aria-describedby":t?`editor-post-featured-image-${t}-describedby`:null},!!t&&s&&(0,C.createElement)(Zo.ResponsiveWrapper,{naturalWidth:h,naturalHeight:_,isInline:!0},(0,C.createElement)("img",{src:f,alt:""})),u&&(0,C.createElement)(Zo.Spinner,null),!t&&!u&&(r?.labels?.set_featured_image||ti)),!!t&&(0,C.createElement)(Zo.__experimentalHStack,{className:"editor-post-featured-image__actions"},(0,C.createElement)(Zo.Button,{className:"editor-post-featured-image__action",onClick:e},(0,d.__)("Replace")),(0,C.createElement)(Zo.Button,{className:"editor-post-featured-image__action",onClick:()=>{o(),c.current.focus()}},(0,d.__)("Remove"))),(0,C.createElement)(Zo.DropZone,{onFilesDrop:E})),value:t}))))})),ii="featured-image";const ai=function(){var e;const{postType:t,isEnabled:n,isOpened:o}=(0,a.useSelect)((e=>{const{getEditedPostAttribute:t,isEditorPanelEnabled:n,isEditorPanelOpened:o}=e(xo),{getPostType:s}=e(p.store);return{postType:s(t("type")),isEnabled:n(ii),isOpened:o(ii)}}),[]),{toggleEditorPanelOpened:s}=(0,a.useDispatch)(xo);return n?(0,C.createElement)(Xr,null,(0,C.createElement)(Zo.PanelBody,{title:null!==(e=t?.labels?.featured_image)&&void 0!==e?e:(0,d.__)("Featured image"),opened:o,onToggle:()=>s(ii)},(0,C.createElement)(ri,null))):null};const li=function({children:e}){return(0,a.useSelect)((e=>e(xo).getEditorSettings().disablePostFormats),[])?null:(0,C.createElement)(Zs,{supportKeys:"post-formats"},e)},ci=[{id:"aside",caption:(0,d.__)("Aside")},{id:"audio",caption:(0,d.__)("Audio")},{id:"chat",caption:(0,d.__)("Chat")},{id:"gallery",caption:(0,d.__)("Gallery")},{id:"image",caption:(0,d.__)("Image")},{id:"link",caption:(0,d.__)("Link")},{id:"quote",caption:(0,d.__)("Quote")},{id:"standard",caption:(0,d.__)("Standard")},{id:"status",caption:(0,d.__)("Status")},{id:"video",caption:(0,d.__)("Video")}].sort(((e,t)=>{const n=e.caption.toUpperCase(),o=t.caption.toUpperCase();return n<o?-1:n>o?1:0}));function ui(){const e=`post-format-selector-${(0,No.useInstanceId)(ui)}`,{postFormat:t,suggestedFormat:n,supportedFormats:o}=(0,a.useSelect)((e=>{const{getEditedPostAttribute:t,getSuggestedPostFormat:n}=e(xo),o=t("format"),s=e(p.store).getThemeSupports();return{postFormat:null!=o?o:"standard",suggestedFormat:n(),supportedFormats:s.formats}}),[]),s=ci.filter((e=>o?.includes(e.id)||t===e.id)),r=s.find((e=>e.id===n)),{editPost:i}=(0,a.useDispatch)(xo),l=e=>i({format:e});return(0,C.createElement)(li,null,(0,C.createElement)("div",{className:"editor-post-format"},(0,C.createElement)(Zo.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Post Format"),value:t,onChange:e=>l(e),id:e,options:s.map((e=>({label:e.caption,value:e.id})))}),r&&r.id!==t&&(0,C.createElement)("p",{className:"editor-post-format__suggestion"},(0,C.createElement)(Zo.Button,{variant:"link",onClick:()=>l(r.id)},(0,d.sprintf)((0,d.__)("Apply suggested format: %s"),r.caption)))))}const di=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"}));const pi=function({children:e}){const{lastRevisionId:t,revisionsCount:n}=(0,a.useSelect)((e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:n}=e(xo);return{lastRevisionId:t(),revisionsCount:n()}}),[]);return!t||n<2?null:(0,C.createElement)(Zs,{supportKeys:"revisions"},e)};const mi=function(){const{lastRevisionId:e,revisionsCount:t}=(0,a.useSelect)((e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:n}=e(xo);return{lastRevisionId:t(),revisionsCount:n()}}),[]);return(0,C.createElement)(pi,null,(0,C.createElement)(Zo.Button,{href:(0,w.addQueryArgs)("revision.php",{revision:e}),className:"editor-post-last-revision__title",icon:di,iconPosition:"right",text:(0,d.sprintf)((0,d.__)("Revisions (%s)"),t)}))};const gi=function(){return(0,C.createElement)(pi,null,(0,C.createElement)(Zo.PanelBody,{className:"editor-post-last-revision__panel"},(0,C.createElement)(mi,null)))};function hi(){const e="core/editor/post-locked-modal-"+(0,No.useInstanceId)(hi),{autosave:t,updatePostLock:n}=(0,a.useDispatch)(xo),{isLocked:o,isTakeover:s,user:r,postId:i,postLockUtils:l,activePostLock:c,postType:u,previewLink:m}=(0,a.useSelect)((e=>{const{isPostLocked:t,isPostLockTakeover:n,getPostLockUser:o,getCurrentPostId:s,getActivePostLock:r,getEditedPostAttribute:i,getEditedPostPreviewLink:a,getEditorSettings:l}=e(xo),{getPostType:c}=e(p.store);return{isLocked:t(),isTakeover:n(),user:o(),postId:s(),postLockUtils:l().postLockUtils,activePostLock:r(),postType:c(i("type")),previewLink:a()}}),[]);if((0,P.useEffect)((()=>{function s(){if(o||!c)return;const e=new window.FormData;if(e.append("action","wp-remove-post-lock"),e.append("_wpnonce",l.unlockNonce),e.append("post_ID",i),e.append("active_post_lock",c),window.navigator.sendBeacon)window.navigator.sendBeacon(l.ajaxUrl,e);else{const t=new window.XMLHttpRequest;t.open("POST",l.ajaxUrl,!1),t.send(e)}}return(0,an.addAction)("heartbeat.send",e,(function(e){o||(e["wp-refresh-post-lock"]={lock:c,post_id:i})})),(0,an.addAction)("heartbeat.tick",e,(function(e){if(!e["wp-refresh-post-lock"])return;const o=e["wp-refresh-post-lock"];o.lock_error?(t(),n({isLocked:!0,isTakeover:!0,user:{name:o.lock_error.name,avatar:o.lock_error.avatar_src_2x}})):o.new_lock&&n({isLocked:!1,activePostLock:o.new_lock})})),window.addEventListener("beforeunload",s),()=>{(0,an.removeAction)("heartbeat.send",e),(0,an.removeAction)("heartbeat.tick",e),window.removeEventListener("beforeunload",s)}}),[]),!o)return null;const g=r.name,h=r.avatar,_=(0,w.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:i,action:"edit",_wpnonce:l.nonce}),f=(0,w.addQueryArgs)("edit.php",{post_type:u?.slug}),E=(0,d.__)("Exit editor");return(0,C.createElement)(Zo.Modal,{title:s?(0,d.__)("Someone else has taken over this post"):(0,d.__)("This post is already being edited"),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,size:"medium"},(0,C.createElement)(Zo.__experimentalHStack,{alignment:"top",spacing:6},!!h&&(0,C.createElement)("img",{src:h,alt:(0,d.__)("Avatar"),className:"editor-post-locked-modal__avatar",width:64,height:64}),(0,C.createElement)("div",null,!!s&&(0,C.createElement)("p",null,(0,P.createInterpolateElement)(g?(0,d.sprintf)((0,d.__)("<strong>%s</strong> now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved."),g):(0,d.__)("Another user now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved."),{strong:(0,C.createElement)("strong",null),PreviewLink:(0,C.createElement)(Zo.ExternalLink,{href:m},(0,d.__)("preview"))})),!s&&(0,C.createElement)(C.Fragment,null,(0,C.createElement)("p",null,(0,P.createInterpolateElement)(g?(0,d.sprintf)((0,d.__)("<strong>%s</strong> is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),g):(0,d.__)("Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),{strong:(0,C.createElement)("strong",null),PreviewLink:(0,C.createElement)(Zo.ExternalLink,{href:m},(0,d.__)("preview"))})),(0,C.createElement)("p",null,(0,d.__)("If you take over, the other user will lose editing control to the post, but their changes will be saved."))),(0,C.createElement)(Zo.__experimentalHStack,{className:"editor-post-locked-modal__buttons",justify:"flex-end"},!s&&(0,C.createElement)(Zo.Button,{variant:"tertiary",href:_},(0,d.__)("Take over")),(0,C.createElement)(Zo.Button,{variant:"primary",href:f},E)))))}const _i=function({children:e}){const{hasPublishAction:t,isPublished:n}=(0,a.useSelect)((e=>{var t;const{isCurrentPostPublished:n,getCurrentPost:o}=e(xo);return{hasPublishAction:null!==(t=o()._links?.["wp:action-publish"])&&void 0!==t&&t,isPublished:n()}}),[]);return n||!t?null:e};const fi=function(){const e=(0,a.useSelect)((e=>e(xo).getEditedPostAttribute("status")),[]),{editPost:t}=(0,a.useDispatch)(xo);return(0,C.createElement)(_i,null,(0,C.createElement)(Zo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Pending review"),checked:"pending"===e,onChange:()=>{t({status:"pending"===e?"draft":"pending"})}}))};function Ei({className:e,textContent:t,forceIsAutosaveable:n,role:o,onPreview:s}){const{postId:r,currentPostLink:i,previewLink:l,isSaveable:c,isViewable:u}=(0,a.useSelect)((e=>{var t;const n=e(xo),o=e(p.store).getPostType(n.getCurrentPostType("type"));return{postId:n.getCurrentPostId(),currentPostLink:n.getCurrentPostAttribute("link"),previewLink:n.getEditedPostPreviewLink(),isSaveable:n.isEditedPostSaveable(),isViewable:null!==(t=o?.viewable)&&void 0!==t&&t}}),[]),{__unstableSaveForPreview:m}=(0,a.useDispatch)(xo);if(!u)return null;const g=`wp-preview-${r}`,h=l||i;return(0,C.createElement)(Zo.Button,{variant:e?void 0:"tertiary",className:e||"editor-post-preview",href:h,target:g,disabled:!c,onClick:async e=>{e.preventDefault();const t=window.open("",g);t.focus(),function(e){let t=(0,P.renderToString)((0,C.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},(0,C.createElement)(Zo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},(0,C.createElement)(Zo.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),(0,C.createElement)(Zo.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})),(0,C.createElement)("p",null,(0,d.__)("Generating preview…"))));t+='\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\t\t}\n\t\t</style>\n\t',t=(0,an.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=(0,d.__)("Generating preview…"),e.close()}(t.document);const o=await m({forceIsAutosaveable:n});t.location=o,s?.()},role:o},t||(0,C.createElement)(C.Fragment,null,(0,d._x)("Preview","imperative verb"),(0,C.createElement)(Zo.VisuallyHidden,{as:"span"},(0,d.__)("(opens in a new tab)"))))}const bi=(0,No.compose)([(0,a.withSelect)((e=>{var t;const{isCurrentPostPublished:n,isEditedPostBeingScheduled:o,isSavingPost:s,isPublishingPost:r,getCurrentPost:i,getCurrentPostType:a,isAutosavingPost:l}=e(xo);return{isPublished:n(),isBeingScheduled:o(),isSaving:s(),isPublishing:r(),hasPublishAction:null!==(t=i()._links?.["wp:action-publish"])&&void 0!==t&&t,postType:a(),isAutosaving:l()}}))])((function({isPublished:e,isBeingScheduled:t,isSaving:n,isPublishing:o,hasPublishAction:s,isAutosaving:r,hasNonPostEntityChanges:i}){return o?(0,d.__)("Publishing…"):e&&n&&!r?(0,d.__)("Updating…"):t&&n&&!r?(0,d.__)("Scheduling…"):s?e?i?(0,d.__)("Update…"):(0,d.__)("Update"):t?i?(0,d.__)("Schedule…"):(0,d.__)("Schedule"):(0,d.__)("Publish"):i?(0,d.__)("Submit for Review…"):(0,d.__)("Submit for Review")})),vi=()=>{};class yi extends P.Component{constructor(e){super(e),this.buttonNode=(0,P.createRef)(),this.createOnClick=this.createOnClick.bind(this),this.closeEntitiesSavedStates=this.closeEntitiesSavedStates.bind(this),this.state={entitiesSavedStatesCallback:!1}}componentDidMount(){this.props.focusOnMount&&(this.timeoutID=setTimeout((()=>{this.buttonNode.current.focus()}),0))}componentWillUnmount(){clearTimeout(this.timeoutID)}createOnClick(e){return(...t)=>{const{hasNonPostEntityChanges:n,setEntitiesSavedStatesCallback:o}=this.props;return n&&o?(this.setState({entitiesSavedStatesCallback:()=>e(...t)}),o((()=>this.closeEntitiesSavedStates)),vi):e(...t)}}closeEntitiesSavedStates(e){const{postType:t,postId:n}=this.props,{entitiesSavedStatesCallback:o}=this.state;this.setState({entitiesSavedStatesCallback:!1},(()=>{e&&e.some((e=>"postType"===e.kind&&e.name===t&&e.key===n))&&o()}))}render(){const{forceIsDirty:e,hasPublishAction:t,isBeingScheduled:n,isOpen:o,isPostSavingLocked:s,isPublishable:r,isPublished:i,isSaveable:a,isSaving:l,isAutoSaving:c,isToggle:u,onSave:p,onStatusChange:m,onSubmit:g=vi,onToggle:h,visibility:_,hasNonPostEntityChanges:f,isSavingNonPostEntityChanges:E}=this.props,b=(l||!a||s||!r&&!e)&&(!f||E),v=(i||l||!a||!r&&!e)&&(!f||E);let y;y=t?"private"===_?"private":n?"future":"publish":"pending";const w={"aria-disabled":b,className:"editor-post-publish-button",isBusy:!c&&l,variant:"primary",onClick:this.createOnClick((()=>{b||(g(),m(y),p())}))},k={"aria-disabled":v,"aria-expanded":o,className:"editor-post-publish-panel__toggle",isBusy:l&&i,variant:"primary",size:"compact",onClick:this.createOnClick((()=>{v||h()}))},S=n?(0,d.__)("Schedule…"):(0,d.__)("Publish"),P=(0,C.createElement)(bi,{hasNonPostEntityChanges:f}),T=u?k:w,x=u?S:P;return(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.Button,{ref:this.buttonNode,...T,className:Ko()(T.className,"editor-post-publish-button__button",{"has-changes-dot":f})},x))}}const wi=(0,No.compose)([(0,a.withSelect)((e=>{var t;const{isSavingPost:n,isAutosavingPost:o,isEditedPostBeingScheduled:s,getEditedPostVisibility:r,isCurrentPostPublished:i,isEditedPostSaveable:a,isEditedPostPublishable:l,isPostSavingLocked:c,getCurrentPost:u,getCurrentPostType:d,getCurrentPostId:p,hasNonPostEntityChanges:m,isSavingNonPostEntityChanges:g}=e(xo);return{isSaving:n(),isAutoSaving:o(),isBeingScheduled:s(),visibility:r(),isSaveable:a(),isPostSavingLocked:c(),isPublishable:l(),isPublished:i(),hasPublishAction:null!==(t=u()._links?.["wp:action-publish"])&&void 0!==t&&t,postType:d(),postId:p(),hasNonPostEntityChanges:m(),isSavingNonPostEntityChanges:g()}})),(0,a.withDispatch)((e=>{const{editPost:t,savePost:n}=e(xo);return{onStatusChange:e=>t({status:e},{undoIgnore:!0}),onSave:n}}))])(yi),ki=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),Si=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,C.createElement)(T.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})),Pi={public:{label:(0,d.__)("Public"),info:(0,d.__)("Visible to everyone.")},private:{label:(0,d.__)("Private"),info:(0,d.__)("Only visible to site admins and editors.")},password:{label:(0,d.__)("Password protected"),info:(0,d.__)("Only those with the password can view this post.")}};function Ci({onClose:e}){const t=(0,No.useInstanceId)(Ci),{status:n,visibility:o,password:s}=(0,a.useSelect)((e=>({status:e(xo).getEditedPostAttribute("status"),visibility:e(xo).getEditedPostVisibility(),password:e(xo).getEditedPostAttribute("password")}))),{editPost:r,savePost:i}=(0,a.useDispatch)(xo),[l,c]=(0,P.useState)(!!s),[u,p]=(0,P.useState)(!1);return(0,C.createElement)("div",{className:"editor-post-visibility"},(0,C.createElement)(m.__experimentalInspectorPopoverHeader,{title:(0,d.__)("Visibility"),help:(0,d.__)("Control how this post is viewed."),onClose:e}),(0,C.createElement)("fieldset",{className:"editor-post-visibility__fieldset"},(0,C.createElement)(Zo.VisuallyHidden,{as:"legend"},(0,d.__)("Visibility")),(0,C.createElement)(Ti,{instanceId:t,value:"public",label:Pi.public.label,info:Pi.public.info,checked:"public"===o&&!l,onChange:()=>{r({status:"private"===o?"draft":n,password:""}),c(!1)}}),(0,C.createElement)(Ti,{instanceId:t,value:"private",label:Pi.private.label,info:Pi.private.info,checked:"private"===o,onChange:()=>{p(!0)}}),(0,C.createElement)(Ti,{instanceId:t,value:"password",label:Pi.password.label,info:Pi.password.info,checked:l,onChange:()=>{r({status:"private"===o?"draft":n,password:s||""}),c(!0)}}),l&&(0,C.createElement)("div",{className:"editor-post-visibility__password"},(0,C.createElement)(Zo.VisuallyHidden,{as:"label",htmlFor:`editor-post-visibility__password-input-${t}`},(0,d.__)("Create password")),(0,C.createElement)("input",{className:"editor-post-visibility__password-input",id:`editor-post-visibility__password-input-${t}`,type:"text",onChange:e=>{r({password:e.target.value})},value:s,placeholder:(0,d.__)("Use a secure password")}))),(0,C.createElement)(Zo.__experimentalConfirmDialog,{isOpen:u,onConfirm:()=>{r({status:"private",password:""}),c(!1),p(!1),i()},onCancel:()=>{p(!1)}},(0,d.__)("Would you like to privately publish this post now?")))}function Ti({instanceId:e,value:t,label:n,info:o,...s}){return(0,C.createElement)("div",{className:"editor-post-visibility__choice"},(0,C.createElement)("input",{type:"radio",name:`editor-post-visibility__setting-${e}`,value:t,id:`editor-post-${t}-${e}`,"aria-describedby":`editor-post-${t}-${e}-description`,className:"editor-post-visibility__radio",...s}),(0,C.createElement)("label",{htmlFor:`editor-post-${t}-${e}`,className:"editor-post-visibility__label"},n),(0,C.createElement)("p",{id:`editor-post-${t}-${e}-description`,className:"editor-post-visibility__info"},o))}function xi(){return Bi()}function Bi(){const e=(0,a.useSelect)((e=>e(xo).getEditedPostVisibility()));return Pi[e]?.label}function Ii(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Ni(e){return Ni="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ni(e)}function Di(e){Ii(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===Ni(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Ai(e){Ii(1,arguments);var t=Di(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Ri(e){Ii(1,arguments);var t=Di(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}Math.pow(10,8);var Oi=6e4,Li=36e5;function Mi(e,t){var n;Ii(1,arguments);var o=function(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}(null!==(n=null==t?void 0:t.additionalDigits)&&void 0!==n?n:2);if(2!==o&&1!==o&&0!==o)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var s,r=function(e){var t,n={},o=e.split(Fi.dateTimeDelimiter);if(o.length>2)return n;/:/.test(o[0])?t=o[0]:(n.date=o[0],t=o[1],Fi.timeZoneDelimiter.test(n.date)&&(n.date=e.split(Fi.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length)));if(t){var s=Fi.timezone.exec(t);s?(n.time=t.replace(s[1],""),n.timezone=s[1]):n.time=t}return n}(e);if(r.date){var i=function(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),o=e.match(n);if(!o)return{year:NaN,restDateString:""};var s=o[1]?parseInt(o[1]):null,r=o[2]?parseInt(o[2]):null;return{year:null===r?s:100*r,restDateString:e.slice((o[1]||o[2]).length)}}(r.date,o);s=function(e,t){if(null===t)return new Date(NaN);var n=e.match(Vi);if(!n)return new Date(NaN);var o=!!n[4],s=zi(n[1]),r=zi(n[2])-1,i=zi(n[3]),a=zi(n[4]),l=zi(n[5])-1;if(o)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,a,l)?function(e,t,n){var o=new Date(0);o.setUTCFullYear(e,0,4);var s=o.getUTCDay()||7,r=7*(t-1)+n+1-s;return o.setUTCDate(o.getUTCDate()+r),o}(t,a,l):new Date(NaN);var c=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(ji[t]||(Wi(e)?29:28))}(t,r,i)&&function(e,t){return t>=1&&t<=(Wi(e)?366:365)}(t,s)?(c.setUTCFullYear(t,r,Math.max(s,i)),c):new Date(NaN)}(i.restDateString,i.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);var a,l=s.getTime(),c=0;if(r.time&&(c=function(e){var t=e.match(Ui);if(!t)return NaN;var n=Gi(t[1]),o=Gi(t[2]),s=Gi(t[3]);if(!function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,o,s))return NaN;return n*Li+o*Oi+1e3*s}(r.time),isNaN(c)))return new Date(NaN);if(!r.timezone){var u=new Date(l+c),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return a=function(e){if("Z"===e)return 0;var t=e.match(Hi);if(!t)return 0;var n="+"===t[1]?-1:1,o=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,s))return NaN;return n*(o*Li+s*Oi)}(r.timezone),isNaN(a)?new Date(NaN):new Date(l+c+a)}var Fi={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Vi=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Ui=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Hi=/^([+-])(\d{2})(?::?(\d{2}))?$/;function zi(e){return e?parseInt(e):1}function Gi(e){return e&&parseFloat(e.replace(",","."))||0}var ji=[31,null,31,30,31,30,31,31,30,31,30,31];function Wi(e){return e%400==0||e%4==0&&e%100!=0}function $i({onClose:e}){const{postDate:t,postType:n}=(0,a.useSelect)((e=>({postDate:e(xo).getEditedPostAttribute("date"),postType:e(xo).getCurrentPostType()})),[]),{editPost:o}=(0,a.useDispatch)(xo),[s,r]=(0,P.useState)(Ai(new Date(t))),i=(0,a.useSelect)((e=>e(p.store).getEntityRecords("postType",n,{status:"publish,future",after:Ai(s).toISOString(),before:Ri(s).toISOString(),exclude:[e(xo).getCurrentPostId()],per_page:100,_fields:"id,date"})),[s,n]),l=(0,P.useMemo)((()=>(i||[]).map((({date:e})=>({date:new Date(e)})))),[i]),c=(0,y.getSettings)(),u=/a(?!\\)/i.test(c.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,C.createElement)(m.__experimentalPublishDateTimePicker,{currentDate:t,onChange:e=>o({date:e}),is12Hour:u,events:l,onMonthPreviewed:e=>r(Mi(e)),onClose:e})}function Ki(e){return Zi(e)}function Zi({full:e=!1}={}){const{date:t,isFloating:n}=(0,a.useSelect)((e=>({date:e(xo).getEditedPostAttribute("date"),isFloating:e(xo).isEditedPostDateFloating()})),[]);return e?Yi(t):function(e,{isFloating:t=!1,now:n=new Date}={}){if(!e||t)return(0,d.__)("Immediately");if(!function(e){const{timezone:t}=(0,y.getSettings)(),n=Number(t.offset),o=e.getTimezoneOffset()/60*-1;return n===o}(n))return Yi(e);const o=(0,y.getDate)(e);if(qi(o,n))return(0,d.sprintf)((0,d.__)("Today at %s"),(0,y.dateI18n)((0,d._x)("g:i a","post schedule time format"),o));const s=new Date(n);if(s.setDate(s.getDate()+1),qi(o,s))return(0,d.sprintf)((0,d.__)("Tomorrow at %s"),(0,y.dateI18n)((0,d._x)("g:i a","post schedule time format"),o));if(o.getFullYear()===n.getFullYear())return(0,y.dateI18n)((0,d._x)("F j g:i a","post schedule date format without year"),o);return(0,y.dateI18n)((0,d._x)("F j, Y g:i a","post schedule full date format"),o)}(t,{isFloating:n})}function Yi(e){const t=(0,y.getDate)(e),n=function(){const{timezone:e}=(0,y.getSettings)();if(e.abbr&&isNaN(Number(e.abbr)))return e.abbr;const t=e.offset<0?"":"+";return`UTC${t}${e.offsetFormatted}`}(),o=(0,y.dateI18n)((0,d._x)("F j, Y g:i a","post schedule full date format"),t);return(0,d.isRTL)()?`${n} ${o}`:`${o} ${n}`}function qi(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}const Qi=window.wp.a11y,Xi=3,Ji={per_page:10,orderby:"count",order:"desc",hide_empty:!0,_fields:"id,name,count",context:"view"};function ea({onSelect:e,taxonomy:t}){const{_terms:n,showTerms:o}=(0,a.useSelect)((e=>{const n=e(p.store).getEntityRecords("taxonomy",t.slug,Ji);return{_terms:n,showTerms:n?.length>=Xi}}),[t.slug]);if(!o)return null;const s=nr(n);return(0,C.createElement)("div",{className:"editor-post-taxonomies__flat-term-most-used"},(0,C.createElement)(Zo.BaseControl.VisualLabel,{as:"h3",className:"editor-post-taxonomies__flat-term-most-used-label"},t.labels.most_used),(0,C.createElement)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list"},s.map((t=>(0,C.createElement)("li",{key:t.id},(0,C.createElement)(Zo.Button,{variant:"link",onClick:()=>e(t)},t.name))))))}const ta=[],na=20,oa={per_page:na,_fields:"id,name",context:"view"},sa=(e,t)=>er(e).toLowerCase()===er(t).toLowerCase(),ra=(e,t)=>e.map((e=>t.find((t=>sa(t.name,e))).id));function ia({slug:e}){var t,n;const[o,s]=(0,P.useState)([]),[r,i]=(0,P.useState)(""),l=(0,No.useDebounce)(i,500),{terms:c,termIds:u,taxonomy:m,hasAssignAction:g,hasCreateAction:h,hasResolvedTerms:_}=(0,a.useSelect)((t=>{var n,o;const{getCurrentPost:s,getEditedPostAttribute:r}=t(xo),{getEntityRecords:i,getTaxonomy:a,hasFinishedResolution:l}=t(p.store),c=s(),u=a(e),d=u?r(u.rest_base):ta,m={...oa,include:d.join(","),per_page:-1};return{hasCreateAction:!!u&&(null!==(n=c._links?.["wp:action-create-"+u.rest_base])&&void 0!==n&&n),hasAssignAction:!!u&&(null!==(o=c._links?.["wp:action-assign-"+u.rest_base])&&void 0!==o&&o),taxonomy:u,termIds:d,terms:d.length?i("taxonomy",e,m):ta,hasResolvedTerms:l("getEntityRecords",["taxonomy",e,m])}}),[e]),{searchResults:f}=(0,a.useSelect)((t=>{const{getEntityRecords:n}=t(p.store);return{searchResults:r?n("taxonomy",e,{...oa,search:r}):ta}}),[r,e]);(0,P.useEffect)((()=>{if(_){const e=(null!=c?c:[]).map((e=>er(e.name)));s(e)}}),[c,_]);const E=(0,P.useMemo)((()=>(null!=f?f:[]).map((e=>er(e.name)))),[f]),{editPost:b}=(0,a.useDispatch)(xo),{saveEntityRecord:v}=(0,a.useDispatch)(p.store),{createErrorNotice:y}=(0,a.useDispatch)(rn.store);if(!g)return null;function w(e){b({[m.rest_base]:e})}const k=null!==(t=m?.labels?.add_new_item)&&void 0!==t?t:"post_tag"===e?(0,d.__)("Add new tag"):(0,d.__)("Add new Term"),S=null!==(n=m?.labels?.singular_name)&&void 0!==n?n:"post_tag"===e?(0,d.__)("Tag"):(0,d.__)("Term"),T=(0,d.sprintf)((0,d._x)("%s added","term"),S),x=(0,d.sprintf)((0,d._x)("%s removed","term"),S),B=(0,d.sprintf)((0,d._x)("Remove %s","term"),S);return(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.FormTokenField,{__next40pxDefaultSize:!0,value:o,suggestions:E,onChange:function(t){const n=[...null!=c?c:[],...null!=f?f:[]],o=t.reduce(((e,t)=>(e.some((e=>e.toLowerCase()===t.toLowerCase()))||e.push(t),e)),[]),r=o.filter((e=>!n.find((t=>sa(t.name,e)))));if(s(o),0===r.length)return w(ra(o,n));h&&Promise.all(r.map((t=>async function(t){try{const n=await v("taxonomy",e,t,{throwOnError:!0});return tr(n)}catch(e){if("term_exists"!==e.code)throw e;return{id:e.data.term_id,name:t.name}}}({name:t})))).then((e=>{const t=n.concat(e);return w(ra(o,t))})).catch((e=>{y(e.message,{type:"snackbar"})}))},onInputChange:l,maxSuggestions:na,label:k,messages:{added:T,removed:x,remove:B}}),(0,C.createElement)(ea,{taxonomy:m,onSelect:function(t){var n;if(u.includes(t.id))return;const o=[...u,t.id],s="post_tag"===e?(0,d.__)("Tag"):(0,d.__)("Term"),r=(0,d.sprintf)((0,d._x)("%s added","term"),null!==(n=m?.labels?.singular_name)&&void 0!==n?n:s);(0,Qi.speak)(r,"assertive"),w(o)}}))}const aa=(0,Zo.withFilters)("editor.PostTaxonomyType")(ia),la=()=>{const e=[(0,d.__)("Suggestion:"),(0,C.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,d.__)("Add tags"))];return(0,C.createElement)(Zo.PanelBody,{initialOpen:!1,title:e},(0,C.createElement)("p",null,(0,d.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),(0,C.createElement)(aa,{slug:"post_tag"}))},ca=()=>{const{hasTags:e,isPostTypeSupported:t}=(0,a.useSelect)((e=>{const t=e(xo).getCurrentPostType(),n=e(p.store).getTaxonomy("post_tag"),o=n?.types?.includes(t),s=void 0!==n,r=n&&e(xo).getEditedPostAttribute(n.rest_base);return{hasTags:!!r?.length,isPostTypeSupported:s&&o}}),[]),[n]=(0,P.useState)(e);return t?n?null:(0,C.createElement)(la,null):null},ua=(e,t)=>ci.filter((t=>e?.includes(t.id))).find((e=>e.id===t)),da=({suggestedPostFormat:e,suggestionText:t,onUpdatePostFormat:n})=>(0,C.createElement)(Zo.Button,{variant:"link",onClick:()=>n(e)},t);function pa(){const{currentPostFormat:e,suggestion:t}=(0,a.useSelect)((e=>{var t;const{getEditedPostAttribute:n,getSuggestedPostFormat:o}=e(xo),s=null!==(t=e(p.store).getThemeSupports().formats)&&void 0!==t?t:[];return{currentPostFormat:n("format"),suggestion:ua(s,o())}}),[]),{editPost:n}=(0,a.useDispatch)(xo),o=[(0,d.__)("Suggestion:"),(0,C.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,d.__)("Use a post format"))];return t&&t.id!==e?(0,C.createElement)(Zo.PanelBody,{initialOpen:!1,title:o},(0,C.createElement)("p",null,(0,d.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")),(0,C.createElement)("p",null,(0,C.createElement)(da,{onUpdatePostFormat:e=>n({format:e}),suggestedPostFormat:t.id,suggestionText:(0,d.sprintf)((0,d.__)('Apply the "%1$s" format.'),t.caption)}))):null}const ma={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view"},ga=8,ha=[];function _a({slug:e}){var t,n;const[o,s]=(0,P.useState)(!1),[r,i]=(0,P.useState)(""),[l,c]=(0,P.useState)(""),[u,m]=(0,P.useState)(!1),[g,h]=(0,P.useState)(""),[_,f]=(0,P.useState)([]),E=(0,No.useDebounce)(Qi.speak,500),{hasCreateAction:b,hasAssignAction:v,terms:y,loading:w,availableTerms:k,taxonomy:S}=(0,a.useSelect)((t=>{var n,o;const{getCurrentPost:s,getEditedPostAttribute:r}=t(xo),{getTaxonomy:i,getEntityRecords:a,isResolving:l}=t(p.store),c=i(e),u=s();return{hasCreateAction:!!c&&(null!==(n=u._links?.["wp:action-create-"+c.rest_base])&&void 0!==n&&n),hasAssignAction:!!c&&(null!==(o=u._links?.["wp:action-assign-"+c.rest_base])&&void 0!==o&&o),terms:c?r(c.rest_base):ha,loading:l("getEntityRecords",["taxonomy",e,ma]),availableTerms:a("taxonomy",e,ma)||ha,taxonomy:c}}),[e]),{editPost:T}=(0,a.useDispatch)(xo),{saveEntityRecord:x}=(0,a.useDispatch)(p.store),B=(0,P.useMemo)((()=>function(e,t){const n=e=>-1!==t.indexOf(e.id)||void 0!==e.children&&e.children.map(n).filter((e=>e)).length>0,o=[...e];return o.sort(((e,t)=>{const o=n(e),s=n(t);return o===s?0:o&&!s?-1:!o&&s?1:0})),o}(Js(k),y)),[k]),{createErrorNotice:I}=(0,a.useDispatch)(rn.store);if(!v)return null;const N=e=>{T({[S.rest_base]:e})},D=e=>e.map((e=>(0,C.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},(0,C.createElement)(Zo.CheckboxControl,{__nextHasNoMarginBottom:!0,checked:-1!==y.indexOf(e.id),onChange:()=>{(e=>{const t=y.includes(e)?y.filter((t=>t!==e)):[...y,e];N(t)})(parseInt(e.id,10))},label:(0,Cs.decodeEntities)(e.name)}),!!e.children.length&&(0,C.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices"},D(e.children))))),A=(t,n,o)=>{var s;return null!==(s=S?.labels?.[t])&&void 0!==s?s:"category"===e?n:o},R=A("add_new_item",(0,d.__)("Add new category"),(0,d.__)("Add new term")),O=A("new_item_name",(0,d.__)("Add new category"),(0,d.__)("Add new term")),L=A("parent_item",(0,d.__)("Parent Category"),(0,d.__)("Parent Term")),M=`— ${L} —`,F=R,V=null!==(t=S?.labels?.search_items)&&void 0!==t?t:(0,d.__)("Search Terms"),U=null!==(n=S?.name)&&void 0!==n?n:(0,d.__)("Terms"),H=k.length>=ga;return(0,C.createElement)(Zo.Flex,{direction:"column",gap:"4"},H&&(0,C.createElement)(Zo.TextControl,{__nextHasNoMarginBottom:!0,label:V,value:g,onChange:e=>{const t=B.map(function(e){const t=n=>{if(""===e)return n;const o={...n};return o.children.length>0&&(o.children=o.children.map(t).filter((e=>e))),(-1!==o.name.toLowerCase().indexOf(e.toLowerCase())||o.children.length>0)&&o};return t}(e)).filter((e=>e)),n=e=>{let t=0;for(let o=0;o<e.length;o++)t++,void 0!==e[o].children&&(t+=n(e[o].children));return t};h(e),f(t);const o=n(t),s=(0,d.sprintf)((0,d._n)("%d result found.","%d results found.",o),o);E(s,"assertive")}}),(0,C.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",tabIndex:"0",role:"group","aria-label":U},D(""!==g?_:B)),!w&&b&&(0,C.createElement)(Zo.FlexItem,null,(0,C.createElement)(Zo.Button,{onClick:()=>{m(!u)},className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":u,variant:"link"},R)),u&&(0,C.createElement)("form",{onSubmit:async t=>{var n;if(t.preventDefault(),""===r||o)return;const a=function(e,t,n){return e.find((e=>(!e.parent&&!t||parseInt(e.parent)===parseInt(t))&&e.name.toLowerCase()===n.toLowerCase()))}(k,l,r);if(a)return y.some((e=>e===a.id))||N([...y,a.id]),i(""),void c("");let u;s(!0);try{u=await(p={name:r,parent:l||void 0},x("taxonomy",e,p,{throwOnError:!0}))}catch(e){return void I(e.message,{type:"snackbar"})}var p;const m="category"===e?(0,d.__)("Category"):(0,d.__)("Term"),g=(0,d.sprintf)((0,d._x)("%s added","term"),null!==(n=S?.labels?.singular_name)&&void 0!==n?n:m);(0,Qi.speak)(g,"assertive"),s(!1),i(""),c(""),N([...y,u.id])}},(0,C.createElement)(Zo.Flex,{direction:"column",gap:"4"},(0,C.createElement)(Zo.TextControl,{__nextHasNoMarginBottom:!0,className:"editor-post-taxonomies__hierarchical-terms-input",label:O,value:r,onChange:e=>{i(e)},required:!0}),!!k.length&&(0,C.createElement)(Zo.TreeSelect,{__nextHasNoMarginBottom:!0,label:L,noOptionLabel:M,onChange:e=>{c(e)},selectedId:l,tree:B}),(0,C.createElement)(Zo.FlexItem,null,(0,C.createElement)(Zo.Button,{variant:"secondary",type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},F)))))}const fa=(0,Zo.withFilters)("editor.PostTaxonomyType")(_a);const Ea=function(){const e=(0,a.useSelect)((e=>{const t=e(xo).getCurrentPostType(),{canUser:n,getEntityRecord:o,getTaxonomy:s}=e(p.store),r=s("category"),i=n("read","settings")?o("root","site")?.default_category:void 0,a=i?o("taxonomy","category",i):void 0,l=r&&r.types.some((e=>e===t)),c=r&&e(xo).getEditedPostAttribute(r.rest_base);return!!r&&!!a&&l&&(0===c?.length||1===c?.length&&a?.id===c[0])}),[]),[t,n]=(0,P.useState)(!1);if((0,P.useEffect)((()=>{e&&n(!0)}),[e]),!t)return null;const o=[(0,d.__)("Suggestion:"),(0,C.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,d.__)("Assign a category"))];return(0,C.createElement)(Zo.PanelBody,{initialOpen:!1,title:o},(0,C.createElement)("p",null,(0,d.__)("Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.")),(0,C.createElement)(fa,{slug:"category"}))};function ba(e){const t=[];return e.forEach((e=>{t.push(e),t.push(...ba(e.innerBlocks))})),t}function va(e){const{selectBlock:t}=(0,a.useDispatch)(m.store);return(0,C.createElement)(Zo.__unstableMotion.img,{tabIndex:0,role:"button","aria-label":(0,d.__)("Select image block."),onClick:()=>{t(e.clientId)},onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(t(e.clientId),n.preventDefault())},key:e.clientId,alt:e.attributes.alt,src:e.attributes.url,animate:{opacity:1},exit:{opacity:0,scale:0},style:{width:"36px",height:"36px",objectFit:"cover",borderRadius:"2px",cursor:"pointer"},whileHover:{scale:1.08}})}function ya(){const[e,t]=(0,P.useState)(!1),{editorBlocks:n,mediaUpload:o}=(0,a.useSelect)((e=>({editorBlocks:e(xo).getEditorBlocks(),mediaUpload:e(m.store).getSettings().mediaUpload})),[]),s=ba(n).filter((e=>"core/image"===e.name&&e.attributes.url&&!e.attributes.id)),{updateBlockAttributes:r}=(0,a.useDispatch)(m.store);if(!o||!s.length)return null;const i=[(0,d.__)("Suggestion:"),(0,C.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,d.__)("External media"))];return(0,C.createElement)(Zo.PanelBody,{initialOpen:!0,title:i},(0,C.createElement)("p",null,(0,d.__)("Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.")),(0,C.createElement)("div",{style:{display:"inline-flex",flexWrap:"wrap",gap:"8px"}},(0,C.createElement)(Zo.__unstableAnimatePresence,null,s.map((e=>(0,C.createElement)(va,{key:e.clientId,...e})))),e?(0,C.createElement)(Zo.Spinner,null):(0,C.createElement)(Zo.Button,{variant:"primary",onClick:function(){t(!0),Promise.all(s.map((e=>window.fetch(e.attributes.url.includes("?")?e.attributes.url:e.attributes.url+"?").then((e=>e.blob())).then((t=>new Promise(((n,s)=>{o({filesList:[t],onFileChange:([t])=>{(0,qr.isBlobURL)(t.url)||(r(e.clientId,{id:t.id,url:t.url}),n())},onError(){s()}})}))))))).finally((()=>{t(!1)}))}},(0,d.__)("Upload"))))}const wa=function({children:e}){const{isBeingScheduled:t,isRequestingSiteIcon:n,hasPublishAction:o,siteIconUrl:s,siteTitle:r,siteHome:i}=(0,a.useSelect)((e=>{var t;const{getCurrentPost:n,isEditedPostBeingScheduled:o}=e(xo),{getEntityRecord:s,isResolving:r}=e(p.store),i=s("root","__unstableBase",void 0)||{};return{hasPublishAction:null!==(t=n()._links?.["wp:action-publish"])&&void 0!==t&&t,isBeingScheduled:o(),isRequestingSiteIcon:r("getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:i.site_icon_url,siteTitle:i.name,siteHome:i.home&&(0,w.filterURLForDisplay)(i.home)}}),[]);let l,c,u=(0,C.createElement)(Zo.Icon,{className:"components-site-icon",size:"36px",icon:Si});return s&&(u=(0,C.createElement)("img",{alt:(0,d.__)("Site Icon"),className:"components-site-icon",src:s})),n&&(u=null),o?t?(l=(0,d.__)("Are you ready to schedule?"),c=(0,d.__)("Your work will be published at the specified date and time.")):(l=(0,d.__)("Are you ready to publish?"),c=(0,d.__)("Double-check your settings before publishing.")):(l=(0,d.__)("Are you ready to submit for review?"),c=(0,d.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),(0,C.createElement)("div",{className:"editor-post-publish-panel__prepublish"},(0,C.createElement)("div",null,(0,C.createElement)("strong",null,l)),(0,C.createElement)("p",null,c),(0,C.createElement)("div",{className:"components-site-card"},u,(0,C.createElement)("div",{className:"components-site-info"},(0,C.createElement)("span",{className:"components-site-name"},(0,Cs.decodeEntities)(r)||(0,d.__)("(Untitled)")),(0,C.createElement)("span",{className:"components-site-home"},i))),(0,C.createElement)(ya,null),o&&(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.PanelBody,{initialOpen:!1,title:[(0,d.__)("Visibility:"),(0,C.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,C.createElement)(xi,null))]},(0,C.createElement)(Ci,null)),(0,C.createElement)(Zo.PanelBody,{initialOpen:!1,title:[(0,d.__)("Publish:"),(0,C.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,C.createElement)(Ki,null))]},(0,C.createElement)($i,null))),(0,C.createElement)(pa,null),(0,C.createElement)(ca,null),(0,C.createElement)(Ea,null),e)},ka="%postname%",Sa="%pagename%";function Pa({text:e,onCopy:t,children:n}){const o=(0,No.useCopyToClipboard)(e,t);return(0,C.createElement)(Zo.Button,{variant:"secondary",ref:o},n)}class Ca extends P.Component{constructor(){super(...arguments),this.state={showCopyConfirmation:!1},this.onCopy=this.onCopy.bind(this),this.onSelectInput=this.onSelectInput.bind(this),this.postLink=(0,P.createRef)()}componentDidMount(){this.props.focusOnMount&&this.postLink.current.focus()}componentWillUnmount(){clearTimeout(this.dismissCopyConfirmation)}onCopy(){this.setState({showCopyConfirmation:!0}),clearTimeout(this.dismissCopyConfirmation),this.dismissCopyConfirmation=setTimeout((()=>{this.setState({showCopyConfirmation:!1})}),4e3)}onSelectInput(e){e.target.select()}render(){const{children:e,isScheduled:t,post:n,postType:o}=this.props,s=o?.labels?.singular_name,r=o?.labels?.view_item,i=o?.labels?.add_new_item,a="future"===n.status?(e=>{const{slug:t}=e;return e.permalink_template.includes(ka)?e.permalink_template.replace(ka,t):e.permalink_template.includes(Sa)?e.permalink_template.replace(Sa,t):e.permalink_template})(n):n.link,l=(0,w.addQueryArgs)("post-new.php",{post_type:n.type}),c=t?(0,C.createElement)(C.Fragment,null,(0,d.__)("is now scheduled. It will go live on")," ",(0,C.createElement)(Ki,null),"."):(0,d.__)("is now live.");return(0,C.createElement)("div",{className:"post-publish-panel__postpublish"},(0,C.createElement)(Zo.PanelBody,{className:"post-publish-panel__postpublish-header"},(0,C.createElement)("a",{ref:this.postLink,href:a},(0,Cs.decodeEntities)(n.title)||(0,d.__)("(no title)"))," ",c),(0,C.createElement)(Zo.PanelBody,null,(0,C.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},(0,C.createElement)("strong",null,(0,d.__)("What’s next?"))),(0,C.createElement)("div",{className:"post-publish-panel__postpublish-post-address-container"},(0,C.createElement)(Zo.TextControl,{__nextHasNoMarginBottom:!0,className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:(0,d.sprintf)((0,d.__)("%s address"),s),value:(0,w.safeDecodeURIComponent)(a),onFocus:this.onSelectInput}),(0,C.createElement)("div",{className:"post-publish-panel__postpublish-post-address__copy-button-wrap"},(0,C.createElement)(Pa,{text:a,onCopy:this.onCopy},this.state.showCopyConfirmation?(0,d.__)("Copied!"):(0,d.__)("Copy")))),(0,C.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!t&&(0,C.createElement)(Zo.Button,{variant:"primary",href:a},r),(0,C.createElement)(Zo.Button,{variant:t?"primary":"secondary",href:l},i))),e)}}const Ta=(0,a.withSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPost:n,isCurrentPostScheduled:o}=e(xo),{getPostType:s}=e(p.store);return{post:n(),postType:s(t("type")),isScheduled:o()}}))(Ca);class xa extends P.Component{constructor(){super(...arguments),this.onSubmit=this.onSubmit.bind(this)}componentDidUpdate(e){e.isPublished&&!this.props.isSaving&&this.props.isDirty&&this.props.onClose()}onSubmit(){const{onClose:e,hasPublishAction:t,isPostTypeViewable:n}=this.props;t&&n||e()}render(){const{forceIsDirty:e,isBeingScheduled:t,isPublished:n,isPublishSidebarEnabled:o,isScheduled:s,isSaving:r,isSavingNonPostEntityChanges:i,onClose:a,onTogglePublishSidebar:l,PostPublishExtension:c,PrePublishExtension:u,...p}=this.props,{hasPublishAction:m,isDirty:g,isPostTypeViewable:h,..._}=p,f=n||s&&t,E=!f&&!r,b=f&&!r;return(0,C.createElement)("div",{className:"editor-post-publish-panel",..._},(0,C.createElement)("div",{className:"editor-post-publish-panel__header"},b?(0,C.createElement)(Zo.Button,{onClick:a,icon:ki,label:(0,d.__)("Close panel")}):(0,C.createElement)(C.Fragment,null,(0,C.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},(0,C.createElement)(wi,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:e})),(0,C.createElement)("div",{className:"editor-post-publish-panel__header-cancel-button"},(0,C.createElement)(Zo.Button,{disabled:i,onClick:a,variant:"secondary"},(0,d.__)("Cancel"))))),(0,C.createElement)("div",{className:"editor-post-publish-panel__content"},E&&(0,C.createElement)(wa,null,u&&(0,C.createElement)(u,null)),b&&(0,C.createElement)(Ta,{focusOnMount:!0},c&&(0,C.createElement)(c,null)),r&&(0,C.createElement)(Zo.Spinner,null)),(0,C.createElement)("div",{className:"editor-post-publish-panel__footer"},(0,C.createElement)(Zo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Always show pre-publish checks."),checked:o,onChange:l})))}}const Ba=(0,No.compose)([(0,a.withSelect)((e=>{var t;const{getPostType:n}=e(p.store),{getCurrentPost:o,getEditedPostAttribute:s,isCurrentPostPublished:r,isCurrentPostScheduled:i,isEditedPostBeingScheduled:a,isEditedPostDirty:l,isAutosavingPost:c,isSavingPost:u,isSavingNonPostEntityChanges:d}=e(xo),{isPublishSidebarEnabled:m}=e(xo),g=n(s("type"));return{hasPublishAction:null!==(t=o()._links?.["wp:action-publish"])&&void 0!==t&&t,isPostTypeViewable:g?.viewable,isBeingScheduled:a(),isDirty:l(),isPublished:r(),isPublishSidebarEnabled:m(),isSaving:u()&&!c(),isSavingNonPostEntityChanges:d(),isScheduled:i()}})),(0,a.withDispatch)(((e,{isPublishSidebarEnabled:t})=>{const{disablePublishSidebar:n,enablePublishSidebar:o}=e(xo);return{onTogglePublishSidebar:()=>{t?n():o()}}})),Zo.withFocusReturn,Zo.withConstrainedTabbing])(xa),Ia=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-4v-2.4L14 14l1-1-3-3-3 3 1 1 1.2-1.2v2.4H7.7c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4H9l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8 0 1-.8 1.8-1.7 1.8z"}));const Na=(0,P.forwardRef)((function({icon:e,size:t=24,...n},o){return(0,P.cloneElement)(e,{width:t,height:t,...n,ref:o})})),Da=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z"}));function Aa({forceIsDirty:e}){const[t,n]=(0,P.useState)(!1),o=(0,No.useViewportMatch)("small"),{isAutosaving:s,isDirty:r,isNew:i,isPending:l,isPublished:c,isSaveable:u,isSaving:p,isScheduled:m,hasPublishAction:g,showIconLabels:h}=(0,a.useSelect)((t=>{var n;const{isEditedPostNew:o,isCurrentPostPublished:s,isCurrentPostScheduled:r,isEditedPostDirty:i,isSavingPost:a,isEditedPostSaveable:l,getCurrentPost:c,isAutosavingPost:u,getEditedPostAttribute:d}=t(xo),{get:p}=t(B.store);return{isAutosaving:u(),isDirty:e||i(),isNew:o(),isPending:"pending"===d("status"),isPublished:s(),isSaving:a(),isSaveable:l(),isScheduled:r(),hasPublishAction:null!==(n=c()?._links?.["wp:action-publish"])&&void 0!==n&&n,showIconLabels:p("core","showIconLabels")}}),[e]),{savePost:_}=(0,a.useDispatch)(xo),f=(0,No.usePrevious)(p);if((0,P.useEffect)((()=>{let e;return f&&!p&&(n(!0),e=setTimeout((()=>{n(!1)}),1e3)),()=>clearTimeout(e)}),[p]),!g&&l)return null;if(c||m)return null;const E=l?(0,d.__)("Save as pending"):(0,d.__)("Save draft"),b=(0,d.__)("Save"),v=t||!i&&!r,y=p||v,w=p||v||!u;let k;return p?k=s?(0,d.__)("Autosaving"):(0,d.__)("Saving"):v?k=(0,d.__)("Saved"):o?k=E:h&&(k=b),(0,C.createElement)(Zo.Button,{className:u||p?Ko()({"editor-post-save-draft":!y,"editor-post-saved-state":y,"is-saving":p,"is-autosaving":s,"is-saved":v,[(0,Zo.__unstableGetAnimateClassName)({type:"loading"})]:p}):void 0,onClick:w?void 0:()=>_(),shortcut:w?void 0:es.displayShortcut.primary("s"),variant:"tertiary",size:"compact",icon:o?void 0:Ia,label:k||E,"aria-disabled":w},y&&(0,C.createElement)(Na,{icon:v?vr:Da}),k)}function Ra({children:e}){return(0,a.useSelect)((e=>{var t;return null!==(t=e(xo).getCurrentPost()._links?.["wp:action-publish"])&&void 0!==t&&t}),[])?e:null}function Oa(){const[e,t]=(0,P.useState)(null),n=(0,P.useMemo)((()=>({anchor:e,"aria-label":(0,d.__)("Change publish date"),placement:"bottom-end"})),[e]),o=Zi(),s=Zi({full:!0});return(0,C.createElement)(Ra,null,(0,C.createElement)(xr,{label:(0,d.__)("Publish"),ref:t},(0,C.createElement)(Zo.Dropdown,{popoverProps:n,focusOnMount:!0,className:"editor-post-schedule__panel-dropdown",contentClassName:"editor-post-schedule__dialog",renderToggle:({onToggle:e,isOpen:t})=>(0,C.createElement)(Zo.Button,{__next40pxDefaultSize:!0,className:"editor-post-schedule__dialog-toggle",variant:"tertiary",onClick:e,"aria-label":(0,d.sprintf)((0,d.__)("Change date: %s"),o),label:s,showTooltip:o!==s,"aria-expanded":t},o),renderContent:({onClose:e})=>(0,C.createElement)($i,{onClose:e})})))}function La({children:e}){return(0,C.createElement)(Zs,{supportKeys:"slug"},e)}class Ma extends P.Component{constructor({postSlug:e,postTitle:t,postID:n}){super(...arguments),this.state={editedSlug:(0,w.safeDecodeURIComponent)(e)||(0,w.cleanForSlug)(t)||n},this.setSlug=this.setSlug.bind(this)}setSlug(e){const{postSlug:t,onUpdateSlug:n}=this.props,{value:o}=e.target,s=(0,w.cleanForSlug)(o);s!==t&&n(s)}render(){const{editedSlug:e}=this.state;return(0,C.createElement)(La,null,(0,C.createElement)(Zo.TextControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Slug"),autoComplete:"off",spellCheck:"false",value:e,onChange:e=>this.setState({editedSlug:e}),onBlur:this.setSlug,className:"editor-post-slug"}))}}const Fa=(0,No.compose)([(0,a.withSelect)((e=>{const{getCurrentPost:t,getEditedPostAttribute:n}=e(xo),{id:o}=t();return{postSlug:n("slug"),postTitle:n("title"),postID:o}})),(0,a.withDispatch)((e=>{const{editPost:t}=e(xo);return{onUpdateSlug(e){t({slug:e})}}}))])(Ma);function Va({children:e}){const{hasStickyAction:t,postType:n}=(0,a.useSelect)((e=>{var t;const n=e(xo).getCurrentPost();return{hasStickyAction:null!==(t=n._links?.["wp:action-sticky"])&&void 0!==t&&t,postType:e(xo).getCurrentPostType()}}),[]);return"post"===n&&t?e:null}function Ua(){const e=(0,a.useSelect)((e=>{var t;return null!==(t=e(xo).getEditedPostAttribute("sticky"))&&void 0!==t&&t}),[]),{editPost:t}=(0,a.useDispatch)(xo);return(0,C.createElement)(Va,null,(0,C.createElement)(Zo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Stick to the top of the blog"),checked:e,onChange:()=>t({sticky:!e})}))}function Ha(){const[e,t]=(0,P.useState)(!1),{editPost:n,savePost:o}=(0,a.useDispatch)(xo),{isSaving:s,isPublished:r,isScheduled:i}=(0,a.useSelect)((e=>{const{isSavingPost:t,isCurrentPostPublished:n,isCurrentPostScheduled:o}=e(xo);return{isSaving:t(),isPublished:n(),isScheduled:o()}}),[]),l=s||!r&&!i;let c;r?c=(0,d.__)("Are you sure you want to unpublish this post?"):i&&(c=(0,d.__)("Are you sure you want to unschedule this post?"));return(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.Button,{__next40pxDefaultSize:!0,className:"editor-post-switch-to-draft",onClick:()=>{l||t(!0)},"aria-disabled":l,variant:"secondary",style:{flexGrow:"1",justifyContent:"center"}},(0,d.__)("Switch to draft")),(0,C.createElement)(Zo.__experimentalConfirmDialog,{isOpen:e,onConfirm:()=>{t(!1),n({status:"draft"}),o()},onCancel:()=>t(!1)},c))}function za(){const{syncStatus:e,postType:t}=(0,a.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xo),n=t("meta");return{syncStatus:"unsynced"===n?.wp_pattern_sync_status?"unsynced":t("wp_pattern_sync_status"),postType:t("type")}}));return"wp_block"!==t?null:(0,C.createElement)(xr,{label:(0,d.__)("Sync status")},(0,C.createElement)("div",{className:"editor-post-sync-status__value"},"unsynced"===e?(0,d._x)("Not synced","Text that indicates that the pattern is not synchronized"):(0,d._x)("Synced","Text that indicates that the pattern is synchronized")))}const Ga=e=>e;const ja=function({taxonomyWrapper:e=Ga}){const{postType:t,taxonomies:n}=(0,a.useSelect)((e=>({postType:e(xo).getCurrentPostType(),taxonomies:e(p.store).getTaxonomies({per_page:-1})})),[]);return(null!=n?n:[]).filter((e=>e.types.includes(t)&&e.visibility?.show_ui)).map((t=>{const n=t.hierarchical?fa:aa;return(0,C.createElement)(P.Fragment,{key:`taxonomy-${t.slug}`},e((0,C.createElement)(n,{slug:t.slug}),t))}))};function Wa({children:e}){const t=(0,a.useSelect)((e=>{const t=e(xo).getCurrentPostType(),n=e(p.store).getTaxonomies({per_page:-1});return n?.some((e=>e.types.includes(t)))}),[]);return t?e:null}function $a({taxonomy:e,children:t}){const n=e?.slug,o=n?`taxonomy-panel-${n}`:"",{isEnabled:s,isOpened:r}=(0,a.useSelect)((e=>{const{isEditorPanelEnabled:t,isEditorPanelOpened:s}=e(xo);return{isEnabled:!!n&&t(o),isOpened:!!n&&s(o)}}),[o,n]),{toggleEditorPanelOpened:i}=(0,a.useDispatch)(xo);if(!s)return null;const l=e?.labels?.menu_name;return l?(0,C.createElement)(Zo.PanelBody,{title:l,opened:r,onToggle:()=>i(o)},t):null}const Ka=function(){return(0,C.createElement)(Wa,null,(0,C.createElement)(ja,{taxonomyWrapper:(e,t)=>(0,C.createElement)($a,{taxonomy:t},e)}))};var Za=n(4132);function Ya(){const e=(0,No.useInstanceId)(Ya),{content:t,blocks:n,type:o,id:s}=(0,a.useSelect)((e=>{const{getEditedEntityRecord:t}=e(p.store),{getCurrentPostType:n,getCurrentPostId:o}=e(xo),s=n(),r=o(),i=t("postType",s,r);return{content:i?.content,blocks:i?.blocks,type:s,id:r}}),[]),{editEntityRecord:r}=(0,a.useDispatch)(p.store),l=(0,P.useMemo)((()=>t instanceof Function?t({blocks:n}):n?(0,i.__unstableSerializeAndClean)(n):t),[t,n]);return(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.VisuallyHidden,{as:"label",htmlFor:`post-content-${e}`},(0,d.__)("Type text or HTML")),(0,C.createElement)(Za.A,{autoComplete:"off",dir:"auto",value:l,onChange:e=>{r("postType",o,s,{content:e.target.value,blocks:void 0,selection:void 0})},className:"editor-post-text-editor",id:`post-content-${e}`,placeholder:(0,d.__)("Start writing with text or HTML")}))}const qa=window.wp.dom,Qa="wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text",Xa=/[\r\n]+/g;function Ja(e){const t=(0,P.useRef)(),{isCleanNewPost:n}=(0,a.useSelect)((e=>{const{isCleanNewPost:t}=e(xo);return{isCleanNewPost:t()}}),[]);return(0,P.useImperativeHandle)(e,(()=>({focus:()=>{t?.current?.focus()}}))),(0,P.useEffect)((()=>{if(!t.current)return;const{defaultView:e}=t.current.ownerDocument,{name:o,parent:s}=e,r="editor-canvas"===o?s.document:e.document,{activeElement:i,body:a}=r;!n||i&&a!==i||t.current.focus()}),[n]),{ref:t}}function el(){const{editPost:e}=(0,a.useDispatch)(xo),{title:t}=(0,a.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xo);return{title:t("title")}}),[]);return{title:t,setTitle:function(t){e({title:t})}}}const tl=(0,P.forwardRef)((function(e,t){const{placeholder:n,hasFixedToolbar:o}=(0,a.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xo),{getSettings:n}=e(m.store),{titlePlaceholder:o,hasFixedToolbar:s}=n();return{title:t("title"),placeholder:o,hasFixedToolbar:s}}),[]),[s,r]=(0,P.useState)(!1),{ref:l}=Ja(t),{title:c,setTitle:u}=el(),[p,g]=(0,P.useState)({}),{clearSelectedBlock:h,insertBlocks:_,insertDefaultBlock:f}=(0,a.useDispatch)(m.store);function E(e){_(e,0)}function b(){r(!1),g({})}const v=(0,Cs.decodeEntities)(n)||(0,d.__)("Add title"),{ref:y}=(0,is.__unstableUseRichText)({value:c,onChange:function(e){u(e.replace(Xa," "))},placeholder:v,selectionStart:p.start,selectionEnd:p.end,onSelectionChange(e,t){g((n=>{const{start:o,end:s}=n;return o===e&&s===t?n:{start:e,end:t}}))},__unstableDisableFormats:!1}),w=Ko()(Qa,{"is-selected":s,"has-fixed-toolbar":o});return(0,C.createElement)(Zs,{supportKeys:"title"},(0,C.createElement)("h1",{ref:(0,No.useMergeRefs)([y,l]),contentEditable:!0,className:w,"aria-label":v,role:"textbox","aria-multiline":"true",onFocus:function(){r(!0),h()},onBlur:b,onKeyDown:function(e){e.keyCode===es.ENTER&&(e.preventDefault(),f(void 0,void 0,0))},onKeyPress:b,onPaste:function(e){const t=e.clipboardData;let n="",o="";try{n=t.getData("text/plain"),o=t.getData("text/html")}catch(e){try{o=t.getData("Text")}catch(e){return}}window.console.log("Received HTML:\n\n",o),window.console.log("Received plain text:\n\n",n);const s=(0,i.pasteHandler)({HTML:o,plainText:n});if(e.preventDefault(),s.length)if("string"!=typeof s){const[e]=s;if(c||"core/heading"!==e.name&&"core/paragraph"!==e.name)E(s);else{const t=(0,qa.__unstableStripHTML)(e.attributes.content);u(t),E(s.slice(1))}}else{const e={...(0,is.create)({html:c}),...p},t=(0,qa.__unstableStripHTML)(s),n=(0,is.insert)(e,(0,is.create)({html:t}));u((0,is.toHTMLString)({value:n})),g({start:n.start,end:n.end})}}}))}));const nl=(0,P.forwardRef)((function(e,t){const{placeholder:n,hasFixedToolbar:o}=(0,a.useSelect)((e=>{const{getSettings:t}=e(m.store),{titlePlaceholder:n,hasFixedToolbar:o}=t();return{placeholder:n,hasFixedToolbar:o}}),[]),[s,r]=(0,P.useState)(!1),{title:i,setTitle:l}=el(),{ref:c}=Ja(t),u=Ko()(Qa,{"is-selected":s,"has-fixed-toolbar":o,"is-raw-text":!0}),p=(0,Cs.decodeEntities)(n)||(0,d.__)("Add title");return(0,C.createElement)(Zo.TextareaControl,{ref:c,value:i,onChange:function(e){l(e.replace(Xa," "))},onFocus:function(){r(!0)},onBlur:function(){r(!1)},label:n,className:u,placeholder:p,hideLabelFromVision:!0,autoComplete:"off",dir:"auto",rows:1,__nextHasNoMarginBottom:!0})}));function ol(){const{isNew:e,isDeleting:t,postId:n}=(0,a.useSelect)((e=>{const t=e(xo);return{isNew:t.isEditedPostNew(),isDeleting:t.isDeletingPost(),postId:t.getCurrentPostId()}}),[]),{trashPost:o}=(0,a.useDispatch)(xo),[s,r]=(0,P.useState)(!1);if(e||!n)return null;return(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.Button,{__next40pxDefaultSize:!0,className:"editor-post-trash",isDestructive:!0,variant:"secondary",isBusy:t,"aria-disabled":t,onClick:t?void 0:()=>r(!0)},(0,d.__)("Move to trash")),(0,C.createElement)(Zo.__experimentalConfirmDialog,{isOpen:s,onConfirm:()=>{r(!1),o()},onCancel:()=>r(!1)},(0,d.__)("Are you sure you want to move this post to the trash?")))}const sl=(0,a.withSelect)((e=>{const{isEditedPostNew:t,getCurrentPostId:n,getCurrentPostType:o}=e(xo),{getPostType:s,canUser:r}=e(p.store),i=n(),a=s(o()),l=a?.rest_base||"";return{isNew:t(),postId:i,canUserDelete:!(!i||!l)&&r("delete",l,i)}}))((function({isNew:e,postId:t,canUserDelete:n,children:o}){return!e&&t&&n?o:null}));function rl({onClose:e}){const{isEditable:t,postSlug:n,viewPostLabel:o,postLink:s,permalinkPrefix:r,permalinkSuffix:i}=(0,a.useSelect)((e=>{var t;const n=e(xo).getCurrentPost(),o=e(xo).getCurrentPostType(),s=e(p.store).getPostType(o),r=e(xo).getPermalinkParts(),i=null!==(t=n?._links?.["wp:action-publish"])&&void 0!==t&&t;return{isEditable:e(xo).isPermalinkEditable()&&i,postSlug:(0,w.safeDecodeURIComponent)(e(xo).getEditedPostSlug()),viewPostLabel:s?.labels.view_item,postLink:n.link,permalinkPrefix:r?.prefix,permalinkSuffix:r?.suffix}}),[]),{editPost:l}=(0,a.useDispatch)(xo),[c,u]=(0,P.useState)(!1);return(0,C.createElement)("div",{className:"editor-post-url"},(0,C.createElement)(m.__experimentalInspectorPopoverHeader,{title:(0,d.__)("URL"),onClose:e}),t&&(0,C.createElement)(Zo.TextControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Permalink"),value:c?"":n,autoComplete:"off",spellCheck:"false",help:(0,C.createElement)(C.Fragment,null,(0,d.__)("The last part of the URL.")," ",(0,C.createElement)(Zo.ExternalLink,{href:(0,d.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink")},(0,d.__)("Learn more."))),onChange:e=>{l({slug:e}),e?c&&u(!1):c||u(!0)},onBlur:e=>{l({slug:(0,w.cleanForSlug)(e.target.value)}),c&&u(!1)}}),t&&(0,C.createElement)("h3",{className:"editor-post-url__link-label"},null!=o?o:(0,d.__)("View post")),(0,C.createElement)("p",null,(0,C.createElement)(Zo.ExternalLink,{className:"editor-post-url__link",href:s,target:"_blank"},t?(0,C.createElement)(C.Fragment,null,(0,C.createElement)("span",{className:"editor-post-url__link-prefix"},r),(0,C.createElement)("span",{className:"editor-post-url__link-slug"},n),(0,C.createElement)("span",{className:"editor-post-url__link-suffix"},i)):s)))}function il({children:e}){const t=(0,a.useSelect)((e=>{const t=e(xo).getCurrentPostType(),n=e(p.store).getPostType(t);if(!n?.viewable)return!1;if(!e(xo).getCurrentPost().link)return!1;return!!e(xo).getPermalinkParts()}),[]);return t?e:null}function al(){return ll()}function ll(){const e=(0,a.useSelect)((e=>e(xo).getPermalink()),[]);return(0,w.filterURLForDisplay)((0,w.safeDecodeURIComponent)(e))}function cl(){const[e,t]=(0,P.useState)(null),n=(0,P.useMemo)((()=>({anchor:e,placement:"bottom-end"})),[e]);return(0,C.createElement)(il,null,(0,C.createElement)(xr,{label:(0,d.__)("URL"),ref:t},(0,C.createElement)(Zo.Dropdown,{popoverProps:n,className:"editor-post-url__panel-dropdown",contentClassName:"editor-post-url__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,C.createElement)(ul,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,C.createElement)(rl,{onClose:e})})))}function ul({isOpen:e,onClick:t}){const n=ll();return(0,C.createElement)(Zo.Button,{__next40pxDefaultSize:!0,className:"editor-post-url__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,d.sprintf)((0,d.__)("Change URL: %s"),n),onClick:t},n)}function dl({render:e}){return e({canEdit:(0,a.useSelect)((e=>{var t;return null!==(t=e(xo).getCurrentPost()._links?.["wp:action-publish"])&&void 0!==t&&t}))})}const pl=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})),ml=window.wp.wordcount;function gl(){const e=(0,a.useSelect)((e=>e(xo).getEditedPostAttribute("content")),[]),t=(0,d._x)("words","Word count type. Do not translate!");return(0,C.createElement)("span",{className:"word-count"},(0,ml.count)(e,t))}const hl=189;function _l(){const e=(0,a.useSelect)((e=>e(xo).getEditedPostAttribute("content")),[]),t=(0,d._x)("words","Word count type. Do not translate!"),n=Math.round((0,ml.count)(e,t)/hl),o=0===n?(0,P.createInterpolateElement)((0,d.__)("<span>< 1</span> minute"),{span:(0,C.createElement)("span",null)}):(0,P.createInterpolateElement)((0,d.sprintf)((0,d._n)("<span>%d</span> minute","<span>%d</span> minutes",n),n),{span:(0,C.createElement)("span",null)});return(0,C.createElement)("span",{className:"time-to-read"},o)}function fl(){const e=(0,a.useSelect)((e=>e(xo).getEditedPostAttribute("content")),[]);return(0,ml.count)(e,"characters_including_spaces")}const El=function({hasOutlineItemsDisabled:e,onRequestClose:t}){const{headingCount:n,paragraphCount:o,numberOfBlocks:s}=(0,a.useSelect)((e=>{const{getGlobalBlockCount:t}=e(m.store);return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}}),[]);return(0,C.createElement)(C.Fragment,null,(0,C.createElement)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":(0,d.__)("Document Statistics"),tabIndex:"0"},(0,C.createElement)("ul",{role:"list",className:"table-of-contents__counts"},(0,C.createElement)("li",{className:"table-of-contents__count"},(0,d.__)("Words"),(0,C.createElement)(gl,null)),(0,C.createElement)("li",{className:"table-of-contents__count"},(0,d.__)("Characters"),(0,C.createElement)("span",{className:"table-of-contents__number"},(0,C.createElement)(fl,null))),(0,C.createElement)("li",{className:"table-of-contents__count"},(0,d.__)("Time to read"),(0,C.createElement)(_l,null)),(0,C.createElement)("li",{className:"table-of-contents__count"},(0,d.__)("Headings"),(0,C.createElement)("span",{className:"table-of-contents__number"},n)),(0,C.createElement)("li",{className:"table-of-contents__count"},(0,d.__)("Paragraphs"),(0,C.createElement)("span",{className:"table-of-contents__number"},o)),(0,C.createElement)("li",{className:"table-of-contents__count"},(0,d.__)("Blocks"),(0,C.createElement)("span",{className:"table-of-contents__number"},s)))),n>0&&(0,C.createElement)(C.Fragment,null,(0,C.createElement)("hr",null),(0,C.createElement)("h2",{className:"table-of-contents__title"},(0,d.__)("Document Outline")),(0,C.createElement)(hs,{onSelect:t,hasOutlineItemsDisabled:e})))};const bl=(0,P.forwardRef)((function({hasOutlineItemsDisabled:e,repositionDropdown:t,...n},o){const s=(0,a.useSelect)((e=>!!e(m.store).getBlockCount()),[]);return(0,C.createElement)(Zo.Dropdown,{popoverProps:{placement:t?"right":"bottom"},className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:({isOpen:e,onToggle:t})=>(0,C.createElement)(Zo.Button,{...n,ref:o,onClick:s?t:void 0,icon:pl,"aria-expanded":e,"aria-haspopup":"true",label:(0,d.__)("Details"),tooltipPosition:"bottom","aria-disabled":!s}),renderContent:({onClose:t})=>(0,C.createElement)(El,{onRequestClose:t,hasOutlineItemsDisabled:e})})}));function vl(){const{__experimentalGetDirtyEntityRecords:e}=(0,a.useSelect)(p.store);return(0,P.useEffect)((()=>{const t=t=>{if(e().length>0)return t.returnValue=(0,d.__)("You have unsaved changes. If you proceed, they will be lost."),t.returnValue};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}}),[e]),null}const yl=(0,No.createHigherOrderComponent)((e=>(0,a.withRegistry)((t=>{const{useSubRegistry:n=!0,registry:o,...s}=t;if(!n)return(0,C.createElement)(e,{...s});const[r,i]=(0,P.useState)(null);return(0,P.useEffect)((()=>{const e=(0,a.createRegistry)({"core/block-editor":m.storeConfig},o);e.registerStore("core/editor",To),i(e)}),[o]),r?(0,C.createElement)(a.RegistryProvider,{value:r},(0,C.createElement)(e,{...s})):null}))),"withRegistryProvider"),wl=(e,t)=>`<a ${kl(e)}>${t}</a>`,kl=e=>`href="${e}" target="_blank" rel="noreferrer noopener"`,Sl=e=>{const{title:t,foreign_landing_url:n,creator:o,creator_url:s,license:r,license_version:i,license_url:a}=e,l=((e,t)=>{let n=e.trim();return"pdm"!==e&&(n=e.toUpperCase().replace("SAMPLING","Sampling")),t&&(n+=` ${t}`),["pdm","cc0"].includes(e)||(n=`CC ${n}`),n})(r,i),c=(0,Cs.decodeEntities)(o);let u;return u=c?t?(0,d.sprintf)((0,d._x)('"%1$s" by %2$s/ %3$s',"caption"),wl(n,(0,Cs.decodeEntities)(t)),s?wl(s,c):c,a?wl(`${a}?ref=openverse`,l):l):(0,d.sprintf)((0,d._x)("<a %1$s>Work</a> by %2$s/ %3$s","caption"),kl(n),s?wl(s,c):c,a?wl(`${a}?ref=openverse`,l):l):t?(0,d.sprintf)((0,d._x)('"%1$s"/ %2$s',"caption"),wl(n,(0,Cs.decodeEntities)(t)),a?wl(`${a}?ref=openverse`,l):l):(0,d.sprintf)((0,d._x)("<a %1$s>Work</a>/ %2$s","caption"),kl(n),a?wl(`${a}?ref=openverse`,l):l),u.replace(/\s{2}/g," ")},Pl=async(e={})=>(await(0,a.resolveSelect)(p.store).getMediaItems({...e,orderBy:e?.search?"relevance":"date"})).map((e=>({...e,alt:e.alt_text,url:e.source_url,previewUrl:e.media_details?.sizes?.medium?.source_url,caption:e.caption?.raw}))),Cl=[{name:"images",labels:{name:(0,d.__)("Images"),search_items:(0,d.__)("Search images")},mediaType:"image",fetch:async(e={})=>Pl({...e,media_type:"image"})},{name:"videos",labels:{name:(0,d.__)("Videos"),search_items:(0,d.__)("Search videos")},mediaType:"video",fetch:async(e={})=>Pl({...e,media_type:"video"})},{name:"audio",labels:{name:(0,d.__)("Audio"),search_items:(0,d.__)("Search audio")},mediaType:"audio",fetch:async(e={})=>Pl({...e,media_type:"audio"})},{name:"openverse",labels:{name:(0,d.__)("Openverse"),search_items:(0,d.__)("Search Openverse")},mediaType:"image",async fetch(e={}){const t={...e,mature:!1,excluded_source:"flickr,inaturalist,wikimedia",license:"pdm,cc0"},n={per_page:"page_size",search:"q"},o=new URL("https://api.openverse.engineering/v1/images/");Object.entries(t).forEach((([e,t])=>{const s=n[e]||e;o.searchParams.set(s,t)}));const s=await window.fetch(o,{headers:{"User-Agent":"WordPress/inserter-media-fetch"}});return(await s.json()).results.map((e=>({...e,title:e.title?.toLowerCase().startsWith("file:")?e.title.slice(5):e.title,sourceId:e.id,id:void 0,caption:Sl(e),previewUrl:e.thumbnail})))},getReportUrl:({sourceId:e})=>`https://wordpress.org/openverse/image/${e}/report/`,isExternalResource:!0}],Tl=window.wp.mediaUtils,xl=()=>{};function Bl({additionalData:e={},allowedTypes:t,filesList:n,maxUploadFileSize:o,onError:s=xl,onFileChange:r}){const{getCurrentPost:i,getEditorSettings:l}=(0,a.select)(xo),c=l().allowedMimeTypes;o=o||l().maxUploadFileSize;const u=i(),d="number"==typeof u?.id?u.id:u?.wp_id,p=d?{post:d}:{};(0,Tl.uploadMedia)({allowedTypes:t,filesList:n,onFileChange:r,additionalData:{...p,...e},maxUploadFileSize:o,onError:({message:e})=>s(e),wpAllowedMimeTypes:c})}const Il=[],Nl=["__experimentalBlockDirectory","__experimentalDiscussionSettings","__experimentalFeatures","__experimentalGlobalStylesBaseStyles","__experimentalPreferredStyleVariations","__unstableGalleryWithImageBlocks","alignWide","blockInspectorTabs","allowedMimeTypes","bodyPlaceholder","canLockBlocks","capabilities","clearBlockSelection","codeEditingEnabled","colors","disableCustomColors","disableCustomFontSizes","disableCustomSpacingSizes","disableCustomGradients","disableLayoutStyles","enableCustomLineHeight","enableCustomSpacing","enableCustomUnits","enableOpenverseMediaCategory","fontSizes","gradients","generateAnchors","onNavigateToEntityRecord","hasInlineToolbar","imageDefaultSize","imageDimensions","imageEditing","imageSizes","isRTL","locale","maxWidth","onUpdateDefaultBlockStyles","postContentAttributes","postsPerPage","readOnly","styles","titlePlaceholder","supportsLayout","widgetTypesToHideFromLegacyWidgetBlock","__unstableHasCustomAppender","__unstableIsPreviewMode","__unstableResolvedAssets","__unstableIsBlockBasedTheme","__experimentalArchiveTitleTypeLabel","__experimentalArchiveTitleNameLabel"];const Dl=function(e,t,n){var o,s;const r=(0,No.useViewportMatch)("medium"),{allowRightClickOverrides:l,blockTypes:c,focusMode:g,hasFixedToolbar:h,isDistractionFree:_,keepCaretInsideBlock:f,reusableBlocks:E,hasUploadPermissions:b,hiddenBlockTypes:v,canUseUnfilteredHTML:y,userCanCreatePages:w,pageOnFront:k,pageForPosts:S,userPatternCategories:C,restBlockPatternCategories:T}=(0,a.useSelect)((e=>{var o;const s="web"===P.Platform.OS,{canUser:a,getRawEntityRecord:l,getEntityRecord:c,getUserPatternCategories:u,getEntityRecords:d,getBlockPatternCategories:m}=e(p.store),{get:g}=e(B.store),{getBlockTypes:h}=e(i.store),_=a("read","settings")?c("root","site"):void 0;return{allowRightClickOverrides:g("core","allowRightClickOverrides"),blockTypes:h(),canUseUnfilteredHTML:l("postType",t,n)?._links?.hasOwnProperty("wp:action-unfiltered-html"),focusMode:g("core","focusMode"),hasFixedToolbar:g("core","fixedToolbar")||!r,hiddenBlockTypes:g("core","hiddenBlockTypes"),isDistractionFree:g("core","distractionFree"),keepCaretInsideBlock:g("core","keepCaretInsideBlock"),reusableBlocks:s?d("postType","wp_block",{per_page:-1}):Il,hasUploadPermissions:null===(o=a("create","media"))||void 0===o||o,userCanCreatePages:a("create","pages"),pageOnFront:_?.page_on_front,pageForPosts:_?.page_for_posts,userPatternCategories:u(),restBlockPatternCategories:m()}}),[t,n,r]),x=null!==(o=e.__experimentalAdditionalBlockPatterns)&&void 0!==o?o:e.__experimentalBlockPatterns,I=null!==(s=e.__experimentalAdditionalBlockPatternCategories)&&void 0!==s?s:e.__experimentalBlockPatternCategories,N=(0,P.useMemo)((()=>[...x||[]].filter((({postTypes:e})=>!e||Array.isArray(e)&&e.includes(t)))),[x,t]),D=(0,P.useMemo)((()=>[...I||[],...T||[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name))))),[I,T]),{undo:A,setIsInserterOpened:R}=(0,a.useDispatch)(xo),{saveEntityRecord:O}=(0,a.useDispatch)(p.store),L=(0,P.useCallback)((e=>w?O("postType","page",e):Promise.reject({message:(0,d.__)("You do not have permission to create Pages.")})),[O,w]),M=(0,P.useMemo)((()=>{if(v&&v.length>0){return(!0===e.allowedBlockTypes?c.map((({name:e})=>e)):e.allowedBlockTypes||[]).filter((e=>!v.includes(e)))}return e.allowedBlockTypes}),[e.allowedBlockTypes,v,c]),F=!1===e.focusMode;return(0,P.useMemo)((()=>({...Object.fromEntries(Object.entries(e).filter((([e])=>Nl.includes(e)))),allowedBlockTypes:M,allowRightClickOverrides:l,focusMode:g&&!F,hasFixedToolbar:h,isDistractionFree:_,keepCaretInsideBlock:f,mediaUpload:b?Bl:void 0,__experimentalBlockPatterns:N,[u(m.privateApis).selectBlockPatternsKey]:e=>u(e(p.store)).getBlockPatternsForPostType(t),__experimentalReusableBlocks:E,__experimentalBlockPatternCategories:D,__experimentalUserPatternCategories:C,__experimentalFetchLinkSuggestions:(t,n)=>(0,p.__experimentalFetchLinkSuggestions)(t,n,e),inserterMediaCategories:Cl,__experimentalFetchRichUrlData:p.__experimentalFetchUrlData,__experimentalCanUserUseUnfilteredHTML:y,__experimentalUndo:A,outlineMode:"wp_template"===t,__experimentalCreatePageEntity:L,__experimentalUserCanCreatePages:w,pageOnFront:k,pageForPosts:S,__experimentalPreferPatternsOnRoot:"wp_template"===t,templateLock:"wp_navigation"===t?"insert":e.templateLock,template:"wp_navigation"===t?[["core/navigation",{},[]]]:e.template,__experimentalSetIsInserterOpened:R})),[M,l,g,F,h,_,f,e,b,E,C,N,D,y,A,L,w,k,S,t,R])},Al=["core/post-title","core/post-featured-image","core/post-content"];function Rl(){!function(){const e=(0,a.useSelect)((e=>{const{getBlocksByName:t,getBlockParents:n,getBlockName:o}=e(m.store);return t(Al).filter((e=>n(e).every((e=>{const t=o(e);return"core/query"!==t&&!Al.includes(t)}))))}),[]),{setBlockEditingMode:t,unsetBlockEditingMode:n}=(0,a.useDispatch)(m.store);(0,P.useEffect)((()=>{t("","disabled");for(const n of e)t(n,"contentOnly");return()=>{n("");for(const t of e)n(t)}}),[e,t,n])}()}function Ol(){const e=(0,a.useSelect)((e=>e(m.store).getBlockOrder()?.[0]),[]),{setBlockEditingMode:t,unsetBlockEditingMode:n}=(0,a.useDispatch)(m.store);(0,P.useEffect)((()=>{if(e)return t(e,"contentOnly"),()=>{n(e)}}),[e,n,t])}const{ExperimentalBlockEditorProvider:Ll}=u(m.privateApis),{PatternsMenuItems:Ml}=u(Ro.privateApis),Fl=()=>{},Vl=["wp_block","wp_template","wp_navigation","wp_template_part"];const Ul=yl((({post:e,settings:t,recovery:n,initialEdits:o,children:s,BlockEditorProviderComponent:r=Ll,__unstableTemplate:l})=>{const c=(0,a.useSelect)((e=>e(xo).getRenderingMode()),[]),g=!!l&&"post-only"!==c,h=g?l:e,_=(0,P.useMemo)((()=>({...!Vl.includes(h.type)||g?{postId:e.id,postType:e.type}:{},templateSlug:"wp_template"===h.type?h.slug:void 0})),[g,e.id,e.type,h.type,h.slug]),{editorSettings:f,selection:E,isReady:b}=(0,a.useSelect)((e=>{const{getEditorSettings:t,getEditorSelection:n,__unstableIsEditorReady:o}=e(xo);return{editorSettings:t(),isReady:o(),selection:n()}}),[]),{id:v,type:y}=h,w=Dl(f,y,v),[k,S,T]=function(e,t,n){const o="post-only"!==n&&t?"template":"post",[s,r,a]=(0,p.useEntityBlockEditor)("postType",e.type,{id:e.id}),[l,c,u]=(0,p.useEntityBlockEditor)("postType",t?.type,{id:t?.id}),d=(0,P.useMemo)((()=>{if("wp_navigation"===e.type)return[(0,i.createBlock)("core/navigation",{ref:e.id,templateLock:!1})]}),[e.type,e.id]),m=(0,P.useMemo)((()=>d||("template"===o?l:s)),[d,o,l,s]);return t&&"template-locked"===n||"wp_navigation"===e.type?[m,Fl,Fl]:[m,"post"===o?r:c,"post"===o?a:u]}(e,l,c),{updatePostLock:x,setupEditor:B,updateEditorSettings:I,setCurrentTemplateId:N,setEditedPost:D,setRenderingMode:A}=u((0,a.useDispatch)(xo)),{createWarningNotice:R}=(0,a.useDispatch)(rn.store);return(0,P.useLayoutEffect)((()=>{n||(x(t.postLock),B(e,o,t.template),t.autosave&&R((0,d.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:(0,d.__)("View the autosave"),url:t.autosave.editLink}]}))}),[]),(0,P.useEffect)((()=>{D(e.type,e.id)}),[e.type,e.id,D]),(0,P.useEffect)((()=>{I(t)}),[t,I]),(0,P.useEffect)((()=>{N(l?.id)}),[l?.id,N]),(0,P.useEffect)((()=>{var e;A(null!==(e=t.defaultRenderingMode)&&void 0!==e?e:"post-only")}),[t.defaultRenderingMode,A]),b?(0,C.createElement)(p.EntityProvider,{kind:"root",type:"site"},(0,C.createElement)(p.EntityProvider,{kind:"postType",type:e.type,id:e.id},(0,C.createElement)(m.BlockContextProvider,{value:_},(0,C.createElement)(r,{value:k,onChange:T,onInput:S,selection:E,settings:w,useSubRegistry:!1},s,(0,C.createElement)(Ml,null),"template-locked"===c&&(0,C.createElement)(Rl,null),"wp_navigation"===y&&(0,C.createElement)(Ol,null))))):null}));const Hl=function(e){return(0,C.createElement)(Ul,{...e,BlockEditorProviderComponent:m.BlockEditorProvider},e.children)},zl=window.wp.serverSideRender;var Gl=n.n(zl);function jl(e,t,n=[]){const o=(0,P.forwardRef)(((n,o)=>(S()("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),(0,C.createElement)(t,{ref:o,...n}))));return n.forEach((n=>{o[n]=jl(e+"."+n,t[n])})),o}function Wl(e,t){return(...n)=>(S()("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),t(...n))}const $l=jl("RichText",m.RichText,["Content"]);$l.isEmpty=Wl("RichText.isEmpty",m.RichText.isEmpty);const Kl=jl("Autocomplete",m.Autocomplete),Zl=jl("AlignmentToolbar",m.AlignmentToolbar),Yl=jl("BlockAlignmentToolbar",m.BlockAlignmentToolbar),ql=jl("BlockControls",m.BlockControls,["Slot"]),Ql=jl("BlockEdit",m.BlockEdit),Xl=jl("BlockEditorKeyboardShortcuts",m.BlockEditorKeyboardShortcuts),Jl=jl("BlockFormatControls",m.BlockFormatControls,["Slot"]),ec=jl("BlockIcon",m.BlockIcon),tc=jl("BlockInspector",m.BlockInspector),nc=jl("BlockList",m.BlockList),oc=jl("BlockMover",m.BlockMover),sc=jl("BlockNavigationDropdown",m.BlockNavigationDropdown),rc=jl("BlockSelectionClearer",m.BlockSelectionClearer),ic=jl("BlockSettingsMenu",m.BlockSettingsMenu),ac=jl("BlockTitle",m.BlockTitle),lc=jl("BlockToolbar",m.BlockToolbar),cc=jl("ColorPalette",m.ColorPalette),uc=jl("ContrastChecker",m.ContrastChecker),dc=jl("CopyHandler",m.CopyHandler),pc=jl("DefaultBlockAppender",m.DefaultBlockAppender),mc=jl("FontSizePicker",m.FontSizePicker),gc=jl("Inserter",m.Inserter),hc=jl("InnerBlocks",m.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),_c=jl("InspectorAdvancedControls",m.InspectorAdvancedControls,["Slot"]),fc=jl("InspectorControls",m.InspectorControls,["Slot"]),Ec=jl("PanelColorSettings",m.PanelColorSettings),bc=jl("PlainText",m.PlainText),vc=jl("RichTextShortcut",m.RichTextShortcut),yc=jl("RichTextToolbarButton",m.RichTextToolbarButton),wc=jl("__unstableRichTextInputEvent",m.__unstableRichTextInputEvent),kc=jl("MediaPlaceholder",m.MediaPlaceholder),Sc=jl("MediaUpload",m.MediaUpload),Pc=jl("MediaUploadCheck",m.MediaUploadCheck),Cc=jl("MultiSelectScrollIntoView",m.MultiSelectScrollIntoView),Tc=jl("NavigableToolbar",m.NavigableToolbar),xc=jl("ObserveTyping",m.ObserveTyping),Bc=jl("SkipToSelectedBlock",m.SkipToSelectedBlock),Ic=jl("URLInput",m.URLInput),Nc=jl("URLInputButton",m.URLInputButton),Dc=jl("URLPopover",m.URLPopover),Ac=jl("Warning",m.Warning),Rc=jl("WritingFlow",m.WritingFlow),Oc=Wl("createCustomColorsHOC",m.createCustomColorsHOC),Lc=Wl("getColorClassName",m.getColorClassName),Mc=Wl("getColorObjectByAttributeValues",m.getColorObjectByAttributeValues),Fc=Wl("getColorObjectByColorValue",m.getColorObjectByColorValue),Vc=Wl("getFontSize",m.getFontSize),Uc=Wl("getFontSizeClass",m.getFontSizeClass),Hc=Wl("withColorContext",m.withColorContext),zc=Wl("withColors",m.withColors),Gc=Wl("withFontSizes",m.withFontSizes),jc=Go,Wc=Go;function $c(e){return S()("wp.editor.cleanForSlug",{since:"12.7",plugin:"Gutenberg",alternative:"wp.url.cleanForSlug"}),(0,w.cleanForSlug)(e)}function Kc({contentRef:e}){const{onNavigateToEntityRecord:t,templateId:n}=(0,a.useSelect)((e=>{const{getEditorSettings:t,getCurrentTemplateId:n}=e(xo);return{onNavigateToEntityRecord:t().onNavigateToEntityRecord,templateId:n()}}),[]),{getNotices:o}=(0,a.useSelect)(rn.store),{createInfoNotice:s,removeNotice:r}=(0,a.useDispatch)(rn.store),[i,l]=(0,P.useState)(!1),c=(0,P.useRef)(0);return(0,P.useEffect)((()=>{const i=async e=>{if(!e.target.classList.contains("is-root-container"))return;const r=o().some((e=>e.id===c.current));if(r)return;const{notice:i}=await s((0,d.__)("Edit your template to edit this block."),{isDismissible:!0,type:"snackbar",actions:[{label:(0,d.__)("Edit template"),onClick:()=>t({postId:n,postType:"wp_template"})}]});c.current=i.id},a=e=>{e.target.classList.contains("is-root-container")&&(c.current&&r(c.current),l(!0))},u=e.current;return u?.addEventListener("click",i),u?.addEventListener("dblclick",a),()=>{u?.removeEventListener("click",i),u?.removeEventListener("dblclick",a)}}),[c,e,o,s,t,n,r]),(0,C.createElement)(Zo.__experimentalConfirmDialog,{isOpen:i,confirmButtonText:(0,d.__)("Edit template"),onConfirm:()=>{l(!1),t({postId:n,postType:"wp_template"})},onCancel:()=>l(!1)},(0,d.__)("Edit your template to edit this block."))}const{LayoutStyle:Zc,useLayoutClasses:Yc,useLayoutStyles:qc,ExperimentalBlockCanvas:Qc,useFlashEditableBlocks:Xc}=u(m.privateApis),Jc=()=>{},eu=["wp_block","wp_template","wp_navigation","wp_template_part"];function tu(e){for(let t=0;t<e.length;t++){if("core/post-content"===e[t].name)return e[t].attributes;if(e[t].innerBlocks.length){const n=tu(e[t].innerBlocks);if(n)return n}}}function nu(e){for(let t=0;t<e.length;t++)if("core/post-content"===e[t].name)return!0;return!1}const ou=function({autoFocus:e,className:t,renderAppender:n,styles:o,disableIframe:s=!1,iframeProps:r,children:l}){const{renderingMode:c,postContentAttributes:u,editedPostTemplate:d={},wrapperBlockName:g,wrapperUniqueId:h,deviceType:_,showEditorPadding:f,isDesignPostType:E}=(0,a.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:n,getCurrentTemplateId:o,getEditorSettings:s,getRenderingMode:r,getDeviceType:i}=e(xo),{getPostType:a,canUser:l,getEditedEntityRecord:c}=e(p.store),u=n(),d=r();let m;"wp_block"===u?m="core/block":"post-only"===d&&(m="core/post-content");const g=s(),h=g.supportsTemplateMode,_=a(u),f=l("create","templates"),E=o(),b=E?c("postType","wp_template",E):void 0;return{renderingMode:d,postContentAttributes:g.postContentAttributes,isDesignPostType:eu.includes(u),editedPostTemplate:_?.viewable&&h&&f?b:void 0,wrapperBlockName:m,wrapperUniqueId:t(),deviceType:i(),showEditorPadding:!!g.onNavigateToPreviousEntityRecord}}),[]),{isCleanNewPost:b}=(0,a.useSelect)(xo),{hasRootPaddingAwareAlignments:v,themeHasDisabledLayoutStyles:y,themeSupportsLayout:w}=(0,a.useSelect)((e=>{const t=e(m.store).getSettings();return{themeHasDisabledLayoutStyles:t.disableLayoutStyles,themeSupportsLayout:t.supportsLayout,hasRootPaddingAwareAlignments:t.__experimentalFeatures?.useRootPaddingAwareAlignments}}),[]),k=(0,m.__experimentalUseResizeCanvas)(_),[S]=(0,m.useSettings)("layout"),T=(0,P.useMemo)((()=>"post-only"!==c||E?{type:"default"}:w?{...S,type:"constrained"}:{type:"default"}),[c,w,S,E]),x=(0,P.useMemo)((()=>{if(!d?.content&&!d?.blocks&&u)return u;if(d?.blocks)return tu(d?.blocks);const e="string"==typeof d?.content?d?.content:"";return tu((0,i.parse)(e))||{}}),[d?.content,d?.blocks,u]),B=(0,P.useMemo)((()=>{if(!d?.content&&!d?.blocks)return!1;if(d?.blocks)return nu(d?.blocks);const e="string"==typeof d?.content?d?.content:"";return nu((0,i.parse)(e))||!1}),[d?.content,d?.blocks]),{layout:I={},align:N=""}=x||{},D=Yc(x,"core/post-content"),A=Ko()({"is-layout-flow":!w},w&&D,N&&`align${N}`),R=qc(x,"core/post-content",".block-editor-block-list__layout.is-root-container"),O=(0,P.useMemo)((()=>I&&("constrained"===I?.type||I?.inherit||I?.contentSize||I?.wideSize)?{...S,...I,type:"constrained"}:{...S,...I,type:"default"}),[I?.type,I?.inherit,I?.contentSize,I?.wideSize,S]),L=u?O:T,M="default"!==L?.type||B?L:T,F=(0,m.__unstableUseTypingObserver)(),V=(0,P.useRef)();(0,P.useEffect)((()=>{e&&b()&&V?.current?.focus()}),[e,b]);const U=(0,P.useRef)(),H=(0,m.__unstableUseTypewriter)(),z=(0,No.useMergeRefs)([U,"post-only"===c?H:Jc,Xc({isEnabled:"template-locked"===c})]);return(0,C.createElement)(Qc,{shouldIframe:!s||["Tablet","Mobile"].includes(_),contentRef:z,styles:o,height:"100%",iframeProps:{className:Ko()("editor-canvas__iframe",{"has-editor-padding":f}),...r,style:{...r?.style,...k}}},w&&!y&&"post-only"===c&&!E&&(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zc,{selector:".editor-editor-canvas__post-title-wrapper",layout:T}),(0,C.createElement)(Zc,{selector:".block-editor-block-list__layout.is-root-container",layout:M}),N&&(0,C.createElement)(Zc,{css:".is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;}\n\t\t.is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}\n\t\t.is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}\n\t\t.is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}"}),R&&(0,C.createElement)(Zc,{layout:O,css:R})),"post-only"===c&&!E&&(0,C.createElement)("div",{className:Ko()("editor-editor-canvas__post-title-wrapper","edit-post-visual-editor__post-title-wrapper",{"has-global-padding":v}),contentEditable:!1,ref:F,style:{marginTop:"4rem"}},(0,C.createElement)(tl,{ref:V})),(0,C.createElement)(m.RecursionProvider,{blockName:g,uniqueId:h},(0,C.createElement)(m.BlockList,{className:Ko()(t,"is-"+_.toLowerCase()+"-preview","post-only"!==c||E?"wp-site-blocks":`${A} wp-block-post-content`),layout:L,dropZoneElement:s?U.current:U.current?.parentNode,renderAppender:n,__unstableDisableDropZone:"template-locked"===c}),"template-locked"===c&&(0,C.createElement)(Kc,{contentRef:U})),l)},{PreferenceBaseOption:su}=u(B.privateApis),ru=(0,No.compose)((0,a.withSelect)(((e,{panelName:t})=>{const{isEditorPanelEnabled:n,isEditorPanelRemoved:o}=e(xo);return{isRemoved:o(t),isChecked:n(t)}})),(0,No.ifCondition)((({isRemoved:e})=>!e)),(0,a.withDispatch)(((e,{panelName:t})=>({onChange:()=>e(xo).toggleEditorPanelEnabled(t)}))))(su),{Fill:iu,Slot:au}=(0,Zo.createSlotFill)("EnablePluginDocumentSettingPanelOption"),lu=({label:e,panelName:t})=>(0,C.createElement)(iu,null,(0,C.createElement)(ru,{label:e,panelName:t}));lu.Slot=au;const cu=lu,uu=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})),du=(0,C.createElement)(T.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,C.createElement)(T.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})),{useCanBlockToolbarBeFocused:pu}=u(m.privateApis),mu=e=>{e.preventDefault()};const gu=function({className:e,disableBlockTools:t=!1,children:n,listViewLabel:o=(0,d.__)("Document Overview")}){const s=(0,P.useRef)(),{setIsInserterOpened:r,setIsListViewOpened:i}=(0,a.useDispatch)(xo),{isDistractionFree:l,isInserterOpened:c,isListViewOpen:p,listViewShortcut:g,listViewToggleRef:h,hasFixedToolbar:_,showIconLabels:f}=(0,a.useSelect)((e=>{const{getSettings:t}=e(m.store),{get:n}=e(B.store),{isListViewOpened:o,getListViewToggleRef:s}=u(e(xo)),{getShortcutRepresentation:r}=e(zo.store);return{isInserterOpened:e(xo).isInserterOpened(),isListViewOpen:o(),listViewShortcut:r("core/editor/toggle-list-view"),listViewToggleRef:s(),hasFixedToolbar:t().hasFixedToolbar,showIconLabels:n("core","showIconLabels"),isDistractionFree:n("core","distractionFree")}}),[]),E=(0,No.useViewportMatch)("medium"),b=(0,No.useViewportMatch)("wide"),v=pu(),y=(0,d.__)("Document tools"),w=(0,P.useCallback)((()=>i(!p)),[i,p]),k=(0,P.useCallback)((()=>{c?(s.current.focus(),r(!1)):r(!0)}),[c,r]),S=(0,d._x)("Toggle block inserter","Generic label for block inserter button"),T=c?(0,d.__)("Close"):(0,d.__)("Add");return(0,C.createElement)(m.NavigableToolbar,{className:Ko()("editor-document-tools","edit-post-header-toolbar",e),"aria-label":y,shouldUseKeyboardFocusShortcut:!v,variant:"unstyled"},(0,C.createElement)("div",{className:"editor-document-tools__left"},(0,C.createElement)(Zo.ToolbarItem,{ref:s,as:Zo.Button,className:"editor-document-tools__inserter-toggle",variant:"primary",isPressed:c,onMouseDown:mu,onClick:k,disabled:t,icon:uu,label:f?T:S,showTooltip:!f,"aria-expanded":c}),(b||!f)&&(0,C.createElement)(C.Fragment,null,E&&!_&&(0,C.createElement)(Zo.ToolbarItem,{as:m.ToolSelector,showTooltip:!f,variant:f?"tertiary":void 0,disabled:t,size:"compact"}),(0,C.createElement)(Zo.ToolbarItem,{as:ys,showTooltip:!f,variant:f?"tertiary":void 0,size:"compact"}),(0,C.createElement)(Zo.ToolbarItem,{as:vs,showTooltip:!f,variant:f?"tertiary":void 0,size:"compact"}),!l&&(0,C.createElement)(Zo.ToolbarItem,{as:Zo.Button,className:"editor-document-tools__document-overview-toggle",icon:du,disabled:t,isPressed:p,label:o,onClick:w,shortcut:g,showTooltip:!f,variant:f?"tertiary":void 0,"aria-expanded":p,ref:h,size:"compact"})),n))},hu=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));function _u(){return(0,C.createElement)(C.Fragment,null,(0,C.createElement)("div",{className:"editor-list-view-sidebar__outline"},(0,C.createElement)("div",null,(0,C.createElement)(Zo.__experimentalText,null,(0,d.__)("Characters:")),(0,C.createElement)(Zo.__experimentalText,null,(0,C.createElement)(fl,null))),(0,C.createElement)("div",null,(0,C.createElement)(Zo.__experimentalText,null,(0,d.__)("Words:")),(0,C.createElement)(gl,null)),(0,C.createElement)("div",null,(0,C.createElement)(Zo.__experimentalText,null,(0,d.__)("Time to read:")),(0,C.createElement)(_l,null))),(0,C.createElement)(hs,null))}const{Tabs:fu}=u(Zo.privateApis);const Eu=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"}));const bu=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})),vu=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"})),yu=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"}));const wu=function({blockTypes:e,value:t,onItemChange:n}){return(0,C.createElement)("ul",{className:"editor-block-manager__checklist"},e.map((e=>(0,C.createElement)("li",{key:e.name,className:"editor-block-manager__checklist-item"},(0,C.createElement)(Zo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:e.title,checked:t.includes(e.name),onChange:(...t)=>n(e.name,...t)}),(0,C.createElement)(m.BlockIcon,{icon:e.icon})))))};const ku=function e({title:t,blockTypes:n}){const o=(0,No.useInstanceId)(e),{allowedBlockTypes:s,hiddenBlockTypes:r}=(0,a.useSelect)((e=>{const{getEditorSettings:t}=e(xo),{get:n}=e(B.store);return{allowedBlockTypes:t().allowedBlockTypes,hiddenBlockTypes:n("core","hiddenBlockTypes")}}),[]),i=(0,P.useMemo)((()=>!0===s?n:n.filter((({name:e})=>s?.includes(e)))),[s,n]),{showBlockTypes:l,hideBlockTypes:c}=u((0,a.useDispatch)(xo)),d=(0,P.useCallback)(((e,t)=>{t?l(e):c(e)}),[l,c]),p=(0,P.useCallback)((e=>{const t=n.map((({name:e})=>e));e?l(t):c(t)}),[n,l,c]);if(!i.length)return null;const m=i.map((({name:e})=>e)).filter((e=>!(null!=r?r:[]).includes(e))),g="editor-block-manager__category-title-"+o,h=m.length===i.length,_=!h&&m.length>0;return(0,C.createElement)("div",{role:"group","aria-labelledby":g,className:"editor-block-manager__category"},(0,C.createElement)(Zo.CheckboxControl,{__nextHasNoMarginBottom:!0,checked:h,onChange:p,className:"editor-block-manager__category-title",indeterminate:_,label:(0,C.createElement)("span",{id:g},t)}),(0,C.createElement)(wu,{blockTypes:i,value:m,onItemChange:d}))};const Su=(0,No.compose)([(0,a.withSelect)((e=>{var t;const{getBlockTypes:n,getCategories:o,hasBlockSupport:s,isMatchingSearchTerm:r}=e(i.store),{get:a}=e(B.store),l=n(),c=(null!==(t=a("core","hiddenBlockTypes"))&&void 0!==t?t:[]).filter((e=>l.some((t=>t.name===e)))),u=Array.isArray(c)&&c.length;return{blockTypes:l,categories:o(),hasBlockSupport:s,isMatchingSearchTerm:r,numberOfHiddenBlocks:u}})),(0,a.withDispatch)((e=>{const{showBlockTypes:t}=u(e(xo));return{enableAllBlockTypes:e=>{const n=e.map((({name:e})=>e));t(n)}}}))])((function({blockTypes:e,categories:t,hasBlockSupport:n,isMatchingSearchTerm:o,numberOfHiddenBlocks:s,enableAllBlockTypes:r}){const i=(0,No.useDebounce)(Qi.speak,500),[a,l]=(0,P.useState)("");return e=e.filter((e=>n(e,"inserter",!0)&&(!a||o(e,a))&&(!e.parent||e.parent.includes("core/post-content")))),(0,P.useEffect)((()=>{if(!a)return;const t=e.length,n=(0,d.sprintf)((0,d._n)("%d result found.","%d results found.",t),t);i(n)}),[e.length,a,i]),(0,C.createElement)("div",{className:"editor-block-manager__content"},!!s&&(0,C.createElement)("div",{className:"editor-block-manager__disabled-blocks-count"},(0,d.sprintf)((0,d._n)("%d block is hidden.","%d blocks are hidden.",s),s),(0,C.createElement)(Zo.Button,{variant:"link",onClick:()=>r(e)},(0,d.__)("Reset"))),(0,C.createElement)(Zo.SearchControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Search for a block"),placeholder:(0,d.__)("Search for a block"),value:a,onChange:e=>l(e),className:"editor-block-manager__search"}),(0,C.createElement)("div",{tabIndex:"0",role:"region","aria-label":(0,d.__)("Available block types"),className:"editor-block-manager__results"},0===e.length&&(0,C.createElement)("p",{className:"editor-block-manager__no-results"},(0,d.__)("No blocks found.")),t.map((t=>(0,C.createElement)(ku,{key:t.slug,title:t.title,blockTypes:e.filter((e=>e.category===t.slug))}))),(0,C.createElement)(ku,{title:(0,d.__)("Uncategorized"),blockTypes:e.filter((({category:e})=>!e))})))})),{PreferencesModal:Pu,PreferencesModalTabs:Cu,PreferencesModalSection:Tu,PreferenceToggleControl:xu}=u(B.privateApis);const Bu={};c(Bu,{DocumentTools:gu,EditorCanvas:ou,ExperimentalEditorProvider:Ul,EnablePluginDocumentSettingPanelOption:cu,EntitiesSavedStatesExtensible:Fs,InserterSidebar:function(){const{insertionPoint:e,showMostUsedBlocks:t}=(0,a.useSelect)((e=>{const{getInsertionPoint:t}=u(e(xo)),{get:n}=e(B.store);return{insertionPoint:t(),showMostUsedBlocks:n("core","mostUsedBlocks")}}),[]),{setIsInserterOpened:n}=(0,a.useDispatch)(xo),o=(0,No.useViewportMatch)("medium","<"),s=o?"div":Zo.VisuallyHidden,[r,i]=(0,No.__experimentalUseDialog)({onClose:()=>n(!1),focusOnMount:null}),l=(0,P.useRef)();return(0,P.useEffect)((()=>{l.current.focusSearch()}),[]),(0,C.createElement)("div",{ref:r,...i,className:"editor-inserter-sidebar"},(0,C.createElement)(s,{className:"editor-inserter-sidebar__header"},(0,C.createElement)(Zo.Button,{icon:hu,label:(0,d.__)("Close block inserter"),onClick:()=>n(!1)})),(0,C.createElement)("div",{className:"editor-inserter-sidebar__content"},(0,C.createElement)(m.__experimentalLibrary,{showMostUsedBlocks:t,showInserterHelpPanel:!0,shouldFocusBlock:o,rootClientId:e.rootClientId,__experimentalInsertionIndex:e.insertionIndex,__experimentalFilterValue:e.filterValue,ref:l})))},ListViewSidebar:function(){const{setIsListViewOpened:e}=(0,a.useDispatch)(xo),{getListViewToggleRef:t}=u((0,a.useSelect)(xo)),n=(0,No.useFocusOnMount)("firstElement"),o=(0,P.useCallback)((()=>{e(!1),t().current?.focus()}),[t,e]),s=(0,P.useCallback)((e=>{e.keyCode!==es.ESCAPE||e.defaultPrevented||(e.preventDefault(),o())}),[o]),[r,i]=(0,P.useState)(null),[l,c]=(0,P.useState)("list-view"),p=(0,P.useRef)(),g=(0,P.useRef)(),h=(0,P.useRef)(),_=(0,No.useMergeRefs)([n,h,i]),f=(0,P.useCallback)((()=>{p.current.contains(p.current.ownerDocument.activeElement)?o():function(e){const t=qa.focus.tabbable.find(g.current)[0];if("list-view"===e){const e=qa.focus.tabbable.find(h.current)[0];(p.current.contains(e)?e:t).focus()}else t.focus()}(l)}),[o,l]);return(0,zo.useShortcut)("core/editor/toggle-list-view",f),(0,C.createElement)("div",{className:"editor-list-view-sidebar",onKeyDown:s,ref:p},(0,C.createElement)(fu,{onSelect:e=>c(e),selectOnMove:!1,initialTabId:"list-view"},(0,C.createElement)("div",{className:"edit-post-editor__document-overview-panel__header"},(0,C.createElement)(Zo.Button,{className:"editor-list-view-sidebar__close-button",icon:ki,label:(0,d.__)("Close"),onClick:o}),(0,C.createElement)(fu.TabList,{className:"editor-list-view-sidebar__tabs-tablist",ref:g},(0,C.createElement)(fu.Tab,{className:"editor-list-view-sidebar__tabs-tab",tabId:"list-view"},(0,d._x)("List View","Post overview")),(0,C.createElement)(fu.Tab,{className:"editor-list-view-sidebar__tabs-tab",tabId:"outline"},(0,d._x)("Outline","Post overview")))),(0,C.createElement)(fu.TabPanel,{ref:_,className:"editor-list-view-sidebar__tabs-tabpanel",tabId:"list-view",focusable:!1},(0,C.createElement)("div",{className:"editor-list-view-sidebar__list-view-container"},(0,C.createElement)("div",{className:"editor-list-view-sidebar__list-view-panel-content"},(0,C.createElement)(m.__experimentalListView,{dropZoneElement:r})))),(0,C.createElement)(fu.TabPanel,{className:"editor-list-view-sidebar__tabs-tabpanel",tabId:"outline",focusable:!1},(0,C.createElement)("div",{className:"editor-list-view-sidebar__list-view-container"},(0,C.createElement)(_u,null)))))},PluginPostExcerpt:Kr,PostPanelRow:xr,PostViewLink:function(){const{hasLoaded:e,permalink:t,isPublished:n,label:o,showIconLabels:s}=(0,a.useSelect)((e=>{const t=e(xo).getCurrentPostType(),n=e(p.store).getPostType(t),{get:o}=e(B.store);return{permalink:e(xo).getPermalink(),isPublished:e(xo).isCurrentPostPublished(),label:n?.labels.view_item,hasLoaded:!!n,showIconLabels:o("core","showIconLabels")}}),[]);return n&&t&&e?(0,C.createElement)(Zo.Button,{icon:Eu,label:o||(0,d.__)("View post"),href:t,target:"_blank",showTooltip:!s}):null},PreviewDropdown:function({forceIsAutosaveable:e,disabled:t}){const{deviceType:n,homeUrl:o,isTemplate:s,isViewable:r,showIconLabels:i}=(0,a.useSelect)((e=>{var t;const{getDeviceType:n,getCurrentPostType:o}=e(xo),{getUnstableBase:s,getPostType:r}=e(p.store),{get:i}=e(B.store),a=o();return{deviceType:n(),homeUrl:s()?.home,isTemplate:"wp_template"===a,isViewable:null!==(t=r(a)?.viewable)&&void 0!==t&&t,showIconLabels:i("core","showIconLabels")}}),[]),{setDeviceType:l}=(0,a.useDispatch)(xo);if((0,No.useViewportMatch)("medium","<"))return null;const c={className:"editor-preview-dropdown__toggle",size:"compact",showTooltip:!i,disabled:t,__experimentalIsFocusable:t},u={"aria-label":(0,d.__)("View options")},m={mobile:bu,tablet:vu,desktop:yu};return(0,C.createElement)(Zo.DropdownMenu,{className:"editor-preview-dropdown",popoverProps:{placement:"bottom-end"},toggleProps:c,menuProps:u,icon:m[n.toLowerCase()],label:(0,d.__)("View"),disableOpenOnArrowDown:t},(({onClose:t})=>(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.MenuGroup,null,(0,C.createElement)(Zo.MenuItem,{onClick:()=>l("Desktop"),icon:"Desktop"===n&&vr},(0,d.__)("Desktop")),(0,C.createElement)(Zo.MenuItem,{onClick:()=>l("Tablet"),icon:"Tablet"===n&&vr},(0,d.__)("Tablet")),(0,C.createElement)(Zo.MenuItem,{onClick:()=>l("Mobile"),icon:"Mobile"===n&&vr},(0,d.__)("Mobile"))),s&&(0,C.createElement)(Zo.MenuGroup,null,(0,C.createElement)(Zo.MenuItem,{href:o,target:"_blank",icon:Eu,onClick:t},(0,d.__)("View site"),(0,C.createElement)(Zo.VisuallyHidden,{as:"span"},(0,d.__)("(opens in a new tab)")))),r&&(0,C.createElement)(Zo.MenuGroup,null,(0,C.createElement)(Ei,{className:"editor-preview-dropdown__button-external",role:"menuitem",forceIsAutosaveable:e,textContent:(0,C.createElement)(C.Fragment,null,(0,d.__)("Preview in new tab"),(0,C.createElement)(Zo.Icon,{icon:Eu})),onPreview:t})))))},PreferencesModal:function({extraSections:e={},isActive:t,onClose:n}){const o=(0,No.useViewportMatch)("medium"),{showBlockBreadcrumbsOption:s}=(0,a.useSelect)((e=>{const{getEditorSettings:t}=e(xo),{get:n}=e(B.store),s=t().richEditingEnabled;return{showBlockBreadcrumbsOption:!n("core","distractionFree")&&o&&s}}),[o]),{setIsListViewOpened:r,setIsInserterOpened:i}=(0,a.useDispatch)(xo),{set:l}=(0,a.useDispatch)(B.store),c=()=>{l("core","fixedToolbar",!0),i(!1),r(!1)},u=()=>{l("core","distractionFree",!1)},p=(0,P.useMemo)((()=>[{name:"general",tabLabel:(0,d.__)("General"),content:(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Tu,{title:(0,d.__)("Interface")},(0,C.createElement)(xu,{scope:"core",featureName:"showListViewByDefault",help:(0,d.__)("Opens the block list view sidebar by default."),label:(0,d.__)("Always open list view")}),s&&(0,C.createElement)(xu,{scope:"core",featureName:"showBlockBreadcrumbs",help:(0,d.__)("Display the block hierarchy trail at the bottom of the editor."),label:(0,d.__)("Show block breadcrumbs")}),(0,C.createElement)(xu,{scope:"core",featureName:"allowRightClickOverrides",help:(0,d.__)("Allows contextual list view menus via right-click, overriding browser defaults."),label:(0,d.__)("Allow right-click contextual menus")})),(0,C.createElement)(Tu,{title:(0,d.__)("Document settings"),description:(0,d.__)("Select what settings are shown in the document panel.")},(0,C.createElement)(cu.Slot,null),(0,C.createElement)(ja,{taxonomyWrapper:(e,t)=>(0,C.createElement)(ru,{label:t.labels.menu_name,panelName:`taxonomy-panel-${t.slug}`})}),(0,C.createElement)(Xr,null,(0,C.createElement)(ru,{label:(0,d.__)("Featured image"),panelName:"featured-image"})),(0,C.createElement)(Gr,null,(0,C.createElement)(ru,{label:(0,d.__)("Excerpt"),panelName:"post-excerpt"})),(0,C.createElement)(Zs,{supportKeys:["comments","trackbacks"]},(0,C.createElement)(ru,{label:(0,d.__)("Discussion"),panelName:"discussion-panel"})),(0,C.createElement)(Ks,null,(0,C.createElement)(ru,{label:(0,d.__)("Page attributes"),panelName:"page-attributes"}))),e?.general)},{name:"appearance",tabLabel:(0,d.__)("Appearance"),content:(0,C.createElement)(Tu,{title:(0,d.__)("Appearance"),description:(0,d.__)("Customize the editor interface to suit your needs.")},(0,C.createElement)(xu,{scope:"core",featureName:"fixedToolbar",onToggle:u,help:(0,d.__)("Access all block and document tools in a single place."),label:(0,d.__)("Top toolbar")}),(0,C.createElement)(xu,{scope:"core",featureName:"distractionFree",onToggle:c,help:(0,d.__)("Reduce visual distractions by hiding the toolbar and other elements to focus on writing."),label:(0,d.__)("Distraction free")}),(0,C.createElement)(xu,{scope:"core",featureName:"focusMode",help:(0,d.__)("Highlights the current block and fades other content."),label:(0,d.__)("Spotlight mode")}),e?.appearance)},{name:"accessibility",tabLabel:(0,d.__)("Accessibility"),content:(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Tu,{title:(0,d.__)("Navigation"),description:(0,d.__)("Optimize the editing experience for enhanced control.")},(0,C.createElement)(xu,{scope:"core",featureName:"keepCaretInsideBlock",help:(0,d.__)("Keeps the text cursor within the block boundaries, aiding users with screen readers by preventing unintentional cursor movement outside the block."),label:(0,d.__)("Contain text cursor inside block")})),(0,C.createElement)(Tu,{title:(0,d.__)("Interface")},(0,C.createElement)(xu,{scope:"core",featureName:"showIconLabels",label:(0,d.__)("Show button text labels"),help:(0,d.__)("Show text instead of icons on buttons across the interface.")})))},{name:"blocks",tabLabel:(0,d.__)("Blocks"),content:(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Tu,{title:(0,d.__)("Inserter")},(0,C.createElement)(xu,{scope:"core",featureName:"mostUsedBlocks",help:(0,d.__)("Adds a category with the most frequently used blocks in the inserter."),label:(0,d.__)("Show most used blocks")})),(0,C.createElement)(Tu,{title:(0,d.__)("Manage block visibility"),description:(0,d.__)("Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later.")},(0,C.createElement)(Su,null)))}]),[o,s,e]);return t?(0,C.createElement)(Pu,{closeModal:n},(0,C.createElement)(Cu,{sections:p})):null},useBlockEditorSettings:Dl})})(),(window.wp=window.wp||{}).editor=o})(); \ No newline at end of file
+*/!function(){"use strict";var o={}.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var i=s.apply(null,n);i&&e.push(i)}}else if("object"===r){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var a in n)o.call(n,a)&&n[a]&&e.push(a)}}}return e.join(" ")}e.exports?(s.default=s,e.exports=s):void 0===(n=function(){return s}.apply(t,[]))||(e.exports=n)}()},6109:e=>{e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},461:(e,t,n)=>{var o=n(6109);e.exports=function(e){var t=o(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var s=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),n=parseFloat(t,10),s?e.style.lineHeight=s:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var r=e.nodeName,i=document.createElement(r);i.innerHTML="&nbsp;","TEXTAREA"===r.toUpperCase()&&i.setAttribute("rows","1");var a=o(e,"font-size");i.style.fontSize=a,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i),n=i.offsetHeight,l.removeChild(i)}return n}},628:(e,t,n)=>{"use strict";var o=n(4067);function s(){}function r(){}r.resetWarningCache=s,e.exports=function(){function e(e,t,n,s,r,i){if(i!==o){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:r,resetWarningCache:s};return n.PropTypes=n,n}},5826:(e,t,n)=>{e.exports=n(628)()},4067:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4462:function(e,t,n){"use strict";var o,s=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},i=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(o=Object.getOwnPropertySymbols(e);s<o.length;s++)t.indexOf(o[s])<0&&(n[o[s]]=e[o[s]])}return n};t.__esModule=!0;var a=n(1609),l=n(5826),c=n(4306),u=n(461),d="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return s(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,o=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||o?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),o=(t.onChange,t.style),s=(t.innerRef,t.children),l=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return a.createElement("textarea",r({},l,{onChange:this.onChange,style:u?r({},o,{maxHeight:u}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),s)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(a.Component);t.TextareaAutosize=a.forwardRef((function(e,t){return a.createElement(p,r({},e,{innerRef:t}))}))},4132:(e,t,n)=>{"use strict";var o=n(4462);t.A=o.TextareaAutosize},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),o=new RegExp(n,"g"),s=new RegExp(n,"");function r(e){return t[e]}var i=function(e){return e.replace(o,r)};e.exports=i,e.exports.has=function(e){return!!e.match(s)},e.exports.remove=i},1609:e=>{"use strict";e.exports=window.React}},t={};function n(o){var s=t[o];if(void 0!==s)return s.exports;var r=t[o]={exports:{}};return e[o].call(r.exports,r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{AlignmentToolbar:()=>Zl,Autocomplete:()=>Kl,AutosaveMonitor:()=>Wo,BlockAlignmentToolbar:()=>Yl,BlockControls:()=>ql,BlockEdit:()=>Ql,BlockEditorKeyboardShortcuts:()=>Xl,BlockFormatControls:()=>Jl,BlockIcon:()=>ec,BlockInspector:()=>tc,BlockList:()=>nc,BlockMover:()=>oc,BlockNavigationDropdown:()=>sc,BlockSelectionClearer:()=>rc,BlockSettingsMenu:()=>ic,BlockTitle:()=>ac,BlockToolbar:()=>lc,CharacterCount:()=>fl,ColorPalette:()=>cc,ContrastChecker:()=>uc,CopyHandler:()=>dc,DefaultBlockAppender:()=>pc,DocumentBar:()=>ss,DocumentOutline:()=>hs,DocumentOutlineCheck:()=>_s,EditorHistoryRedo:()=>vs,EditorHistoryUndo:()=>ys,EditorKeyboardShortcuts:()=>Go,EditorKeyboardShortcutsRegister:()=>fs,EditorNotices:()=>ks,EditorProvider:()=>Hl,EditorSnackbars:()=>Ps,EntitiesSavedStates:()=>Ms,ErrorBoundary:()=>zs,FontSizePicker:()=>mc,InnerBlocks:()=>hc,Inserter:()=>gc,InspectorAdvancedControls:()=>_c,InspectorControls:()=>fc,LocalAutosaveMonitor:()=>$s,MediaPlaceholder:()=>kc,MediaUpload:()=>Sc,MediaUploadCheck:()=>Pc,MultiSelectScrollIntoView:()=>Cc,NavigableToolbar:()=>Tc,ObserveTyping:()=>xc,PageAttributesCheck:()=>Ks,PageAttributesOrder:()=>qs,PageAttributesPanel:()=>ar,PageAttributesParent:()=>rr,PageTemplate:()=>br,PanelColorSettings:()=>Ec,PlainText:()=>bc,PostAuthor:()=>Or,PostAuthorCheck:()=>Lr,PostAuthorPanel:()=>Mr,PostComments:()=>Fr,PostDiscussionPanel:()=>Hr,PostExcerpt:()=>zr,PostExcerptCheck:()=>Gr,PostExcerptPanel:()=>Yr,PostFeaturedImage:()=>ri,PostFeaturedImageCheck:()=>Xr,PostFeaturedImagePanel:()=>ai,PostFormat:()=>ui,PostFormatCheck:()=>li,PostLastRevision:()=>mi,PostLastRevisionCheck:()=>pi,PostLastRevisionPanel:()=>gi,PostLockedModal:()=>hi,PostPendingStatus:()=>fi,PostPendingStatusCheck:()=>_i,PostPingbacks:()=>Vr,PostPreviewButton:()=>Ei,PostPublishButton:()=>wi,PostPublishButtonLabel:()=>bi,PostPublishPanel:()=>Ba,PostSavedState:()=>Aa,PostSchedule:()=>$i,PostScheduleCheck:()=>Ra,PostScheduleLabel:()=>Ki,PostSchedulePanel:()=>Oa,PostSlug:()=>Fa,PostSlugCheck:()=>La,PostSticky:()=>Ua,PostStickyCheck:()=>Va,PostSwitchToDraftButton:()=>Ha,PostSyncStatus:()=>za,PostTaxonomies:()=>ja,PostTaxonomiesCheck:()=>Wa,PostTaxonomiesFlatTermSelector:()=>ia,PostTaxonomiesHierarchicalTermSelector:()=>_a,PostTaxonomiesPanel:()=>Ka,PostTemplatePanel:()=>Br,PostTextEditor:()=>Ya,PostTitle:()=>tl,PostTitleRaw:()=>nl,PostTrash:()=>ol,PostTrashCheck:()=>sl,PostTypeSupportCheck:()=>Zs,PostURL:()=>rl,PostURLCheck:()=>il,PostURLLabel:()=>al,PostURLPanel:()=>cl,PostVisibility:()=>Ci,PostVisibilityCheck:()=>dl,PostVisibilityLabel:()=>xi,RichText:()=>$l,RichTextShortcut:()=>vc,RichTextToolbarButton:()=>yc,ServerSideRender:()=>Gl(),SkipToSelectedBlock:()=>Bc,TableOfContents:()=>bl,TextEditorGlobalKeyboardShortcuts:()=>Wc,ThemeSupportCheck:()=>Qr,TimeToRead:()=>_l,URLInput:()=>Ic,URLInputButton:()=>Nc,URLPopover:()=>Dc,UnsavedChangesWarning:()=>vl,VisualEditorGlobalKeyboardShortcuts:()=>jc,Warning:()=>Ac,WordCount:()=>gl,WritingFlow:()=>Rc,__unstableRichTextInputEvent:()=>wc,cleanForSlug:()=>$c,createCustomColorsHOC:()=>Oc,getColorClassName:()=>Lc,getColorObjectByAttributeValues:()=>Mc,getColorObjectByColorValue:()=>Fc,getFontSize:()=>Vc,getFontSizeClass:()=>Uc,getTemplatePartIcon:()=>U,mediaUpload:()=>Bl,privateApis:()=>Bu,store:()=>xo,storeConfig:()=>To,transformStyles:()=>m.transformStyles,useEntitiesSavedStatesIsDirty:()=>Rs,usePostScheduleLabel:()=>Zi,usePostURLLabel:()=>ll,usePostVisibilityLabel:()=>Bi,userAutocompleter:()=>Ao,withColorContext:()=>Hc,withColors:()=>zc,withFontSizes:()=>Gc});var e={};n.r(e),n.d(e,{__experimentalGetDefaultTemplatePartAreas:()=>Jt,__experimentalGetDefaultTemplateType:()=>en,__experimentalGetDefaultTemplateTypes:()=>Xt,__experimentalGetTemplateInfo:()=>tn,__unstableIsEditorReady:()=>$e,canInsertBlockType:()=>Zt,canUserUseUnfilteredHTML:()=>Me,didPostSaveRequestFail:()=>ve,didPostSaveRequestSucceed:()=>be,getActivePostLock:()=>Le,getAdjacentBlockClientId:()=>bt,getAutosaveAttribute:()=>re,getBlock:()=>st,getBlockAttributes:()=>ot,getBlockCount:()=>ut,getBlockHierarchyRootClientId:()=>Et,getBlockIndex:()=>At,getBlockInsertionPoint:()=>Gt,getBlockListSettings:()=>Qt,getBlockMode:()=>Ut,getBlockName:()=>tt,getBlockOrder:()=>Dt,getBlockRootClientId:()=>ft,getBlockSelectionEnd:()=>pt,getBlockSelectionStart:()=>dt,getBlocks:()=>rt,getBlocksByClientId:()=>ct,getClientIdsOfDescendants:()=>it,getClientIdsWithDescendants:()=>at,getCurrentPost:()=>Y,getCurrentPostAttribute:()=>ne,getCurrentPostId:()=>Q,getCurrentPostLastRevisionId:()=>ee,getCurrentPostRevisionsCount:()=>J,getCurrentPostType:()=>q,getCurrentTemplateId:()=>X,getDeviceType:()=>Ye,getEditedPostAttribute:()=>se,getEditedPostContent:()=>Pe,getEditedPostPreviewLink:()=>ke,getEditedPostSlug:()=>Be,getEditedPostVisibility:()=>ie,getEditorBlocks:()=>Ve,getEditorSelection:()=>We,getEditorSelectionEnd:()=>je,getEditorSelectionStart:()=>Ge,getEditorSettings:()=>Ke,getFirstMultiSelectedBlockClientId:()=>Pt,getGlobalBlockCount:()=>lt,getInserterItems:()=>Yt,getLastMultiSelectedBlockClientId:()=>Ct,getMultiSelectedBlockClientIds:()=>kt,getMultiSelectedBlocks:()=>St,getMultiSelectedBlocksEndClientId:()=>Nt,getMultiSelectedBlocksStartClientId:()=>It,getNextBlockClientId:()=>yt,getPermalink:()=>xe,getPermalinkParts:()=>Ie,getPostEdits:()=>te,getPostLockUser:()=>Oe,getPostTypeLabel:()=>nn,getPreviousBlockClientId:()=>vt,getRenderingMode:()=>Ze,getSelectedBlock:()=>_t,getSelectedBlockClientId:()=>ht,getSelectedBlockCount:()=>mt,getSelectedBlocksInitialCaretPosition:()=>wt,getStateBeforeOptimisticTransaction:()=>Xe,getSuggestedPostFormat:()=>Se,getTemplate:()=>$t,getTemplateLock:()=>Kt,hasChangedContent:()=>W,hasEditorRedo:()=>G,hasEditorUndo:()=>z,hasInserterItems:()=>qt,hasMultiSelection:()=>Mt,hasNonPostEntityChanges:()=>K,hasSelectedBlock:()=>gt,hasSelectedInnerBlock:()=>Ot,inSomeHistory:()=>Je,isAncestorMultiSelected:()=>Bt,isAutosavingPost:()=>ye,isBlockInsertionPointVisible:()=>jt,isBlockMultiSelected:()=>xt,isBlockSelected:()=>Rt,isBlockValid:()=>nt,isBlockWithinSelection:()=>Lt,isCaretWithinFormattedText:()=>zt,isCleanNewPost:()=>Z,isCurrentPostPending:()=>ae,isCurrentPostPublished:()=>le,isCurrentPostScheduled:()=>ce,isDeletingPost:()=>_e,isEditedPostAutosaveable:()=>me,isEditedPostBeingScheduled:()=>ge,isEditedPostDateFloating:()=>he,isEditedPostDirty:()=>$,isEditedPostEmpty:()=>pe,isEditedPostNew:()=>j,isEditedPostPublishable:()=>ue,isEditedPostSaveable:()=>de,isEditorPanelEnabled:()=>He,isEditorPanelOpened:()=>ze,isEditorPanelRemoved:()=>Ue,isFirstMultiSelectedBlock:()=>Tt,isInserterOpened:()=>Qe,isListViewOpened:()=>qe,isMultiSelecting:()=>Ft,isPermalinkEditable:()=>Te,isPostAutosavingLocked:()=>Ae,isPostLockTakeover:()=>Re,isPostLocked:()=>Ne,isPostSavingLocked:()=>De,isPreviewingPost:()=>we,isPublishSidebarEnabled:()=>Fe,isPublishingPost:()=>Ce,isSavingNonPostEntityChanges:()=>Ee,isSavingPost:()=>fe,isSelectionEnabled:()=>Vt,isTyping:()=>Ht,isValidTemplate:()=>Wt});var t={};n.r(t),n.d(t,{__experimentalTearDownEditor:()=>dn,__unstableSaveForPreview:()=>yn,autosave:()=>vn,clearSelectedBlock:()=>qn,createUndoLevel:()=>Sn,disablePublishSidebar:()=>Tn,editPost:()=>_n,enablePublishSidebar:()=>Cn,enterFormattedText:()=>_o,exitFormattedText:()=>fo,hideInsertionPoint:()=>io,insertBlock:()=>oo,insertBlocks:()=>so,insertDefaultBlock:()=>Eo,lockPostAutosaving:()=>In,lockPostSaving:()=>xn,mergeBlocks:()=>co,moveBlockToPosition:()=>no,moveBlocksDown:()=>eo,moveBlocksUp:()=>to,multiSelect:()=>Yn,receiveBlocks:()=>Gn,redo:()=>wn,refreshPost:()=>En,removeBlock:()=>po,removeBlocks:()=>uo,removeEditorPanel:()=>Fn,replaceBlock:()=>Jn,replaceBlocks:()=>Xn,resetBlocks:()=>zn,resetEditorBlocks:()=>Dn,resetPost:()=>pn,savePost:()=>fn,selectBlock:()=>$n,setDeviceType:()=>On,setEditedPost:()=>hn,setIsInserterOpened:()=>Vn,setIsListViewOpened:()=>Un,setRenderingMode:()=>Rn,setTemplateValidity:()=>ao,setupEditor:()=>un,setupEditorState:()=>gn,showInsertionPoint:()=>ro,startMultiSelect:()=>Kn,startTyping:()=>go,stopMultiSelect:()=>Zn,stopTyping:()=>ho,synchronizeTemplate:()=>lo,toggleBlockMode:()=>mo,toggleEditorPanelEnabled:()=>Ln,toggleEditorPanelOpened:()=>Mn,toggleSelection:()=>Qn,trashPost:()=>bn,undo:()=>kn,unlockPostAutosaving:()=>Nn,unlockPostSaving:()=>Bn,updateBlock:()=>jn,updateBlockAttributes:()=>Wn,updateBlockListSettings:()=>bo,updateEditorSettings:()=>An,updatePost:()=>mn,updatePostLock:()=>Pn});var s={};n.r(s),n.d(s,{createTemplate:()=>yo,hideBlockTypes:()=>ko,setCurrentTemplateId:()=>vo,showBlockTypes:()=>wo});var r={};n.r(r),n.d(r,{getInsertionPoint:()=>Po,getListViewToggleRef:()=>Co});const i=window.wp.blocks,a=window.wp.data,l=window.wp.privateApis,{lock:c,unlock:u}=(0,l.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/editor"),d=window.wp.i18n,p=((0,d._x)("Pattern Overrides","block bindings source"),window.wp.coreData),m=window.wp.blockEditor,g={...m.SETTINGS_DEFAULTS,richEditingEnabled:!0,codeEditingEnabled:!0,fontLibraryEnabled:!0,enableCustomFields:void 0,defaultRenderingMode:"post-only"};function h(e){return e&&"object"==typeof e&&"raw"in e?e.raw:e}const _=(0,a.combineReducers)({postId:function(e=null,t){return"SET_EDITED_POST"===t.type?t.postId:e},postType:function(e=null,t){return"SET_EDITED_POST"===t.type?t.postType:e},templateId:function(e=null,t){return"SET_CURRENT_TEMPLATE_ID"===t.type?t.id:e},saving:function(e={},t){switch(t.type){case"REQUEST_POST_UPDATE_START":case"REQUEST_POST_UPDATE_FINISH":return{pending:"REQUEST_POST_UPDATE_START"===t.type,options:t.options||{}}}return e},deleting:function(e={},t){switch(t.type){case"REQUEST_POST_DELETE_START":case"REQUEST_POST_DELETE_FINISH":return{pending:"REQUEST_POST_DELETE_START"===t.type}}return e},postLock:function(e={isLocked:!1},t){return"UPDATE_POST_LOCK"===t.type?t.lock:e},template:function(e={isValid:!0},t){return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},postSavingLock:function(e={},t){switch(t.type){case"LOCK_POST_SAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_SAVING":{const{[t.lockName]:n,...o}=e;return o}}return e},editorSettings:function(e=g,t){return"UPDATE_EDITOR_SETTINGS"===t.type?{...e,...t.settings}:e},postAutosavingLock:function(e={},t){switch(t.type){case"LOCK_POST_AUTOSAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_AUTOSAVING":{const{[t.lockName]:n,...o}=e;return o}}return e},renderingMode:function(e="post-only",t){return"SET_RENDERING_MODE"===t.type?t.mode:e},deviceType:function(e="Desktop",t){return"SET_DEVICE_TYPE"===t.type?t.deviceType:e},removedPanels:function(e=[],t){if("REMOVE_PANEL"===t.type)if(!e.includes(t.panelName))return[...e,t.panelName];return e},blockInserterPanel:function(e=!1,t){switch(t.type){case"SET_IS_LIST_VIEW_OPENED":return!t.isOpen&&e;case"SET_IS_INSERTER_OPENED":return t.value}return e},listViewPanel:function(e=!1,t){switch(t.type){case"SET_IS_INSERTER_OPENED":return!t.value&&e;case"SET_IS_LIST_VIEW_OPENED":return t.isOpen}return e},listViewToggleRef:function(e={current:null}){return e}});var f={};function E(e){return[e]}function b(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}function v(e,t){var n,o=t||E;function s(){n=new WeakMap}function r(){var t,s,r,i,a,l=arguments.length;for(i=new Array(l),r=0;r<l;r++)i[r]=arguments[r];for(t=function(e){var t,o,s,r,i,a=n,l=!0;for(t=0;t<e.length;t++){if(!(i=o=e[t])||"object"!=typeof i){l=!1;break}a.has(o)?a=a.get(o):(s=new WeakMap,a.set(o,s),a=s)}return a.has(f)||((r=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=l,a.set(f,r)),a.get(f)}(a=o.apply(null,i)),t.isUniqueByDependants||(t.lastDependants&&!b(a,t.lastDependants,0)&&t.clear(),t.lastDependants=a),s=t.head;s;){if(b(s.args,i,1))return s!==t.head&&(s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=t.head,s.prev=null,t.head.prev=s,t.head=s),s.val;s=s.next}return s={val:e.apply(null,i)},i[0]=null,s.args=i,t.head&&(t.head.prev=s,s.next=t.head),t.head=s,s.val}return r.getDependants=o,r.clear=s,s(),r}const y=window.wp.date,w=window.wp.url,k=window.wp.deprecated;var S=n.n(k);const P=window.wp.element;var C=n(1609);const T=window.wp.primitives,x=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.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"})),B=window.wp.preferences,I=new Set(["meta"]),N="SAVE_POST_NOTICE_ID",D="TRASH_POST_NOTICE_ID",A=/%(?:postname|pagename)%/,R=6e4,O=["title","excerpt","content"],L=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M18.5 10.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"})),M=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),F=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.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.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),V=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}));function U(e){return"header"===e?L:"footer"===e?M:"sidebar"===e?F:V}const H={},z=(0,a.createRegistrySelector)((e=>()=>e(p.store).hasUndo())),G=(0,a.createRegistrySelector)((e=>()=>e(p.store).hasRedo()));function j(e){return"auto-draft"===Y(e).status}function W(e){return"content"in te(e)}const $=(0,a.createRegistrySelector)((e=>t=>{const n=q(t),o=Q(t);return!!e(p.store).hasEditsForEntityRecord("postType",n,o)})),K=(0,a.createRegistrySelector)((e=>t=>{const n=e(p.store).__experimentalGetDirtyEntityRecords(),{type:o,id:s}=Y(t);return n.some((e=>"postType"!==e.kind||e.name!==o||e.key!==s))}));function Z(e){return!$(e)&&j(e)}const Y=(0,a.createRegistrySelector)((e=>t=>{const n=Q(t),o=q(t),s=e(p.store).getRawEntityRecord("postType",o,n);return s||H}));function q(e){return e.postType}function Q(e){return e.postId}function X(e){return e.templateId}function J(e){var t;return null!==(t=Y(e)._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0}function ee(e){var t;return null!==(t=Y(e)._links?.["predecessor-version"]?.[0]?.id)&&void 0!==t?t:null}const te=(0,a.createRegistrySelector)((e=>t=>{const n=q(t),o=Q(t);return e(p.store).getEntityRecordEdits("postType",n,o)||H}));function ne(e,t){switch(t){case"type":return q(e);case"id":return Q(e);default:const n=Y(e);if(!n.hasOwnProperty(t))break;return h(n[t])}}const oe=v(((e,t)=>{const n=te(e);return n.hasOwnProperty(t)?{...ne(e,t),...n[t]}:ne(e,t)}),((e,t)=>[ne(e,t),te(e)[t]]));function se(e,t){if("content"===t)return Pe(e);const n=te(e);return n.hasOwnProperty(t)?I.has(t)?oe(e,t):n[t]:ne(e,t)}const re=(0,a.createRegistrySelector)((e=>(t,n)=>{if(!O.includes(n)&&"preview_link"!==n)return;const o=q(t);if("wp_template"===o)return!1;const s=Q(t),r=e(p.store).getCurrentUser()?.id,i=e(p.store).getAutosave(o,s,r);return i?h(i[n]):void 0}));function ie(e){if("private"===se(e,"status"))return"private";return se(e,"password")?"password":"public"}function ae(e){return"pending"===Y(e).status}function le(e,t){const n=t||Y(e);return-1!==["publish","private"].indexOf(n.status)||"future"===n.status&&!(0,y.isInTheFuture)(new Date(Number((0,y.getDate)(n.date))-R))}function ce(e){return"future"===Y(e).status&&!le(e)}function ue(e){const t=Y(e);return $(e)||-1===["publish","private","future"].indexOf(t.status)}function de(e){return!fe(e)&&(!!se(e,"title")||!!se(e,"excerpt")||!pe(e)||"native"===P.Platform.OS)}const pe=(0,a.createRegistrySelector)((e=>t=>{const n=Q(t),o=q(t),s=e(p.store).getEditedEntityRecord("postType",o,n);if("function"!=typeof s.content)return!s.content;const r=se(t,"blocks");if(0===r.length)return!0;if(r.length>1)return!1;const a=r[0].name;return(a===(0,i.getDefaultBlockName)()||a===(0,i.getFreeformContentHandlerName)())&&!Pe(t)})),me=(0,a.createRegistrySelector)((e=>t=>{if(!de(t))return!1;if(Ae(t))return!1;const n=q(t);if("wp_template"===n)return!1;const o=Q(t),s=e(p.store).hasFetchedAutosaves(n,o),r=e(p.store).getCurrentUser()?.id,i=e(p.store).getAutosave(n,o,r);return!!s&&(!i||(!!W(t)||["title","excerpt","meta"].some((e=>h(i[e])!==se(t,e)))))}));function ge(e){const t=se(e,"date"),n=new Date(Number((0,y.getDate)(t))-R);return(0,y.isInTheFuture)(n)}function he(e){const t=se(e,"date"),n=se(e,"modified"),o=Y(e).status;return("draft"===o||"auto-draft"===o||"pending"===o)&&(t===n||null===t)}function _e(e){return!!e.deleting.pending}function fe(e){return!!e.saving.pending}const Ee=(0,a.createRegistrySelector)((e=>t=>{const n=e(p.store).__experimentalGetEntitiesBeingSaved(),{type:o,id:s}=Y(t);return n.some((e=>"postType"!==e.kind||e.name!==o||e.key!==s))})),be=(0,a.createRegistrySelector)((e=>t=>{const n=q(t),o=Q(t);return!e(p.store).getLastEntitySaveError("postType",n,o)})),ve=(0,a.createRegistrySelector)((e=>t=>{const n=q(t),o=Q(t);return!!e(p.store).getLastEntitySaveError("postType",n,o)}));function ye(e){return fe(e)&&Boolean(e.saving.options?.isAutosave)}function we(e){return fe(e)&&Boolean(e.saving.options?.isPreview)}function ke(e){if(e.saving.pending||fe(e))return;let t=re(e,"preview_link");t&&"draft"!==Y(e).status||(t=se(e,"link"),t&&(t=(0,w.addQueryArgs)(t,{preview:!0})));const n=se(e,"featured_media");return t&&n?(0,w.addQueryArgs)(t,{_thumbnail_id:n}):t}const Se=(0,a.createRegistrySelector)((e=>()=>{const t=e(m.store).getBlocks();if(t.length>2)return null;let n;if(1===t.length&&(n=t[0].name,"core/embed"===n)){const e=t[0].attributes?.providerNameSlug;["youtube","vimeo"].includes(e)?n="core/video":["spotify","soundcloud"].includes(e)&&(n="core/audio")}switch(2===t.length&&"core/paragraph"===t[1].name&&(n=t[0].name),n){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":return"video";case"core/audio":return"audio";default:return null}})),Pe=(0,a.createRegistrySelector)((e=>t=>{const n=Q(t),o=q(t),s=e(p.store).getEditedEntityRecord("postType",o,n);if(s){if("function"==typeof s.content)return s.content(s);if(s.blocks)return(0,i.__unstableSerializeAndClean)(s.blocks);if(s.content)return s.content}return""}));function Ce(e){return fe(e)&&!le(e)&&"publish"===se(e,"status")}function Te(e){const t=se(e,"permalink_template");return A.test(t)}function xe(e){const t=Ie(e);if(!t)return null;const{prefix:n,postName:o,suffix:s}=t;return Te(e)?n+o+s:n}function Be(e){return se(e,"slug")||(0,w.cleanForSlug)(se(e,"title"))||Q(e)}function Ie(e){const t=se(e,"permalink_template");if(!t)return null;const n=se(e,"slug")||se(e,"generated_slug"),[o,s]=t.split(A);return{prefix:o,postName:n,suffix:s}}function Ne(e){return e.postLock.isLocked}function De(e){return Object.keys(e.postSavingLock).length>0}function Ae(e){return Object.keys(e.postAutosavingLock).length>0}function Re(e){return e.postLock.isTakeover}function Oe(e){return e.postLock.user}function Le(e){return e.postLock.activePostLock}function Me(e){return Boolean(Y(e)._links?.hasOwnProperty("wp:action-unfiltered-html"))}const Fe=(0,a.createRegistrySelector)((e=>()=>!!e(B.store).get("core/edit-post","isPublishSidebarEnabled"))),Ve=v((e=>se(e,"blocks")||(0,i.parse)(Pe(e))),(e=>[se(e,"blocks"),Pe(e)]));function Ue(e,t){return e.removedPanels.includes(t)}const He=(0,a.createRegistrySelector)((e=>(t,n)=>{const o=e(B.store).get("core","inactivePanels");return!Ue(t,n)&&!o?.includes(n)})),ze=(0,a.createRegistrySelector)((e=>(t,n)=>{const o=e(B.store).get("core","openPanels");return!!o?.includes(n)}));function Ge(e){return S()("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),se(e,"selection")?.selectionStart}function je(e){return S()("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),se(e,"selection")?.selectionEnd}function We(e){return se(e,"selection")}function $e(e){return!!e.postId}function Ke(e){return e.editorSettings}function Ze(e){return e.renderingMode}function Ye(e){return e.deviceType}function qe(e){return e.listViewPanel}function Qe(e){return!!e.blockInserterPanel}function Xe(){return S()("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function Je(){return S()("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function et(e){return(0,a.createRegistrySelector)((t=>(n,...o)=>(S()("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`",version:"6.2"}),t(m.store)[e](...o))))}const tt=et("getBlockName"),nt=et("isBlockValid"),ot=et("getBlockAttributes"),st=et("getBlock"),rt=et("getBlocks"),it=et("getClientIdsOfDescendants"),at=et("getClientIdsWithDescendants"),lt=et("getGlobalBlockCount"),ct=et("getBlocksByClientId"),ut=et("getBlockCount"),dt=et("getBlockSelectionStart"),pt=et("getBlockSelectionEnd"),mt=et("getSelectedBlockCount"),gt=et("hasSelectedBlock"),ht=et("getSelectedBlockClientId"),_t=et("getSelectedBlock"),ft=et("getBlockRootClientId"),Et=et("getBlockHierarchyRootClientId"),bt=et("getAdjacentBlockClientId"),vt=et("getPreviousBlockClientId"),yt=et("getNextBlockClientId"),wt=et("getSelectedBlocksInitialCaretPosition"),kt=et("getMultiSelectedBlockClientIds"),St=et("getMultiSelectedBlocks"),Pt=et("getFirstMultiSelectedBlockClientId"),Ct=et("getLastMultiSelectedBlockClientId"),Tt=et("isFirstMultiSelectedBlock"),xt=et("isBlockMultiSelected"),Bt=et("isAncestorMultiSelected"),It=et("getMultiSelectedBlocksStartClientId"),Nt=et("getMultiSelectedBlocksEndClientId"),Dt=et("getBlockOrder"),At=et("getBlockIndex"),Rt=et("isBlockSelected"),Ot=et("hasSelectedInnerBlock"),Lt=et("isBlockWithinSelection"),Mt=et("hasMultiSelection"),Ft=et("isMultiSelecting"),Vt=et("isSelectionEnabled"),Ut=et("getBlockMode"),Ht=et("isTyping"),zt=et("isCaretWithinFormattedText"),Gt=et("getBlockInsertionPoint"),jt=et("isBlockInsertionPointVisible"),Wt=et("isValidTemplate"),$t=et("getTemplate"),Kt=et("getTemplateLock"),Zt=et("canInsertBlockType"),Yt=et("getInserterItems"),qt=et("hasInserterItems"),Qt=et("getBlockListSettings");function Xt(e){return Ke(e)?.defaultTemplateTypes}const Jt=v((e=>{const t=Ke(e)?.defaultTemplatePartAreas||[];return t?.map((e=>({...e,icon:U(e.icon)})))}),(e=>[Ke(e)?.defaultTemplatePartAreas])),en=v(((e,t)=>{var n;const o=Xt(e);return o&&null!==(n=Object.values(o).find((e=>e.slug===t)))&&void 0!==n?n:H}),((e,t)=>[Xt(e),t]));function tn(e,t){if(!t)return H;const{description:n,slug:o,title:s,area:r}=t,{title:i,description:a}=en(e,o),l="string"==typeof s?s:s?.rendered;return{title:l&&l!==o?l:i||o,description:("string"==typeof n?n:n?.raw)||a,icon:Jt(e).find((e=>r===e.area))?.icon||x}}const nn=(0,a.createRegistrySelector)((e=>t=>{const n=q(t),o=e(p.store).getPostType(n);return o?.labels?.singular_name})),on=window.wp.apiFetch;var sn=n.n(on);const rn=window.wp.notices,an=window.wp.hooks;function ln(e,t){return`wp-autosave-block-editor-post-${t?"auto-draft":e}`}function cn(e,t){window.sessionStorage.removeItem(ln(e,t))}const un=(e,t,n)=>({dispatch:o})=>{o.setEditedPost(e.type,e.id);if("auto-draft"===e.status&&n){let s;s="content"in t?t.content:e.content.raw;let r=(0,i.parse)(s);r=(0,i.synchronizeBlocksWithTemplate)(r,n),o.resetEditorBlocks(r,{__unstableShouldCreateUndoLevel:!1})}t&&Object.values(t).some((([t,n])=>{var o;return n!==(null!==(o=e[t]?.raw)&&void 0!==o?o:e[t])}))&&o.editPost(t)};function dn(){return S()("wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor",{since:"6.5"}),{type:"DO_NOTHING"}}function pn(){return S()("wp.data.dispatch( 'core/editor' ).resetPost",{since:"6.0",version:"6.3",alternative:"Initialize the editor with the setupEditorState action"}),{type:"DO_NOTHING"}}function mn(){return S()("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function gn(e){return S()("wp.data.dispatch( 'core/editor' ).setupEditorState",{since:"6.5",alternative:"wp.data.dispatch( 'core/editor' ).setEditedPost"}),hn(e.type,e.id)}function hn(e,t){return{type:"SET_EDITED_POST",postType:e,postId:t}}const _n=(e,t)=>({select:n,registry:o})=>{const{id:s,type:r}=n.getCurrentPost();o.dispatch(p.store).editEntityRecord("postType",r,s,e,t)},fn=(e={})=>async({select:t,dispatch:n,registry:o})=>{if(!t.isEditedPostSaveable())return;const s=t.getEditedPostContent();e.isAutosave||n.editPost({content:s},{undoIgnore:!0});const r=t.getCurrentPost(),i={id:r.id,...o.select(p.store).getEntityRecordNonTransientEdits("postType",r.type,r.id),content:s};n({type:"REQUEST_POST_UPDATE_START",options:e}),await o.dispatch(p.store).saveEntityRecord("postType",r.type,i,e);let a=o.select(p.store).getLastEntitySaveError("postType",r.type,r.id);if(a||await(0,an.applyFilters)("editor.__unstableSavePost",Promise.resolve(),e).catch((e=>{a=e})),n({type:"REQUEST_POST_UPDATE_FINISH",options:e}),a){const e=function(e){const{post:t,edits:n,error:o}=e;if(o&&"rest_autosave_no_changes"===o.code)return[];const s=["publish","private","future"],r=-1!==s.indexOf(t.status),i={publish:(0,d.__)("Publishing failed."),private:(0,d.__)("Publishing failed."),future:(0,d.__)("Scheduling failed.")};let a=r||-1===s.indexOf(n.status)?(0,d.__)("Updating failed."):i[n.status];return o.message&&!/<\/?[^>]*>/.test(o.message)&&(a=[a,o.message].join(" ")),[a,{id:N}]}({post:r,edits:i,error:a});e.length&&o.dispatch(rn.store).createErrorNotice(...e)}else{const n=t.getCurrentPost(),s=function(e){var t;const{previousPost:n,post:o,postType:s}=e;if(e.options?.isAutosave)return[];const r=["publish","private","future"],i=r.includes(n.status),a=r.includes(o.status),l="trash"===o.status&&"trash"!==n.status;let c,u,p=null!==(t=s?.viewable)&&void 0!==t&&t;l?(c=s.labels.item_trashed,p=!1):i||a?i&&!a?(c=s.labels.item_reverted_to_draft,p=!1):c=!i&&a?{publish:s.labels.item_published,private:s.labels.item_published_privately,future:s.labels.item_scheduled}[o.status]:s.labels.item_updated:(c=(0,d.__)("Draft saved."),u=!0);const m=[];return p&&m.push({label:u?(0,d.__)("View Preview"):s.labels.view_item,url:o.link}),[c,{id:N,type:"snackbar",actions:m}]}({previousPost:r,post:n,postType:await o.resolveSelect(p.store).getPostType(n.type),options:e});s.length&&o.dispatch(rn.store).createSuccessNotice(...s),e.isAutosave||o.dispatch(m.store).__unstableMarkLastChangeAsPersistent()}};function En(){return S()("wp.data.dispatch( 'core/editor' ).refreshPost",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}const bn=()=>async({select:e,dispatch:t,registry:n})=>{const o=e.getCurrentPostType(),s=await n.resolveSelect(p.store).getPostType(o);n.dispatch(rn.store).removeNotice(D);const{rest_base:r,rest_namespace:i="wp/v2"}=s;t({type:"REQUEST_POST_DELETE_START"});try{const n=e.getCurrentPost();await sn()({path:`/${i}/${r}/${n.id}`,method:"DELETE"}),await t.savePost()}catch(e){n.dispatch(rn.store).createErrorNotice(...(a={error:e},[a.error.message&&"unknown_error"!==a.error.code?a.error.message:(0,d.__)("Trashing failed"),{id:D}]))}var a;t({type:"REQUEST_POST_DELETE_FINISH"})},vn=({local:e=!1,...t}={})=>async({select:n,dispatch:o})=>{const s=n.getCurrentPost();if("wp_template"!==s.type)if(e){const e=n.isEditedPostNew(),t=n.getEditedPostAttribute("title"),o=n.getEditedPostAttribute("content"),r=n.getEditedPostAttribute("excerpt");!function(e,t,n,o,s){window.sessionStorage.setItem(ln(e,t),JSON.stringify({post_title:n,content:o,excerpt:s}))}(s.id,e,t,o,r)}else await o.savePost({isAutosave:!0,...t})},yn=({forceIsAutosaveable:e}={})=>async({select:t,dispatch:n})=>{if((e||t.isEditedPostAutosaveable())&&!t.isPostLocked()){["draft","auto-draft"].includes(t.getEditedPostAttribute("status"))?await n.savePost({isPreview:!0}):await n.autosave({isPreview:!0})}return t.getEditedPostPreviewLink()},wn=()=>({registry:e})=>{e.dispatch(p.store).redo()},kn=()=>({registry:e})=>{e.dispatch(p.store).undo()};function Sn(){return S()("wp.data.dispatch( 'core/editor' ).createUndoLevel",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function Pn(e){return{type:"UPDATE_POST_LOCK",lock:e}}const Cn=()=>({registry:e})=>{e.dispatch(B.store).set("core/edit-post","isPublishSidebarEnabled",!0)},Tn=()=>({registry:e})=>{e.dispatch(B.store).set("core/edit-post","isPublishSidebarEnabled",!1)};function xn(e){return{type:"LOCK_POST_SAVING",lockName:e}}function Bn(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function In(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function Nn(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}const Dn=(e,t={})=>({select:n,dispatch:o,registry:s})=>{const{__unstableShouldCreateUndoLevel:r,selection:a}=t,l={blocks:e,selection:a};if(!1!==r){const{id:e,type:t}=n.getCurrentPost();if(s.select(p.store).getEditedEntityRecord("postType",t,e).blocks===l.blocks)return void s.dispatch(p.store).__unstableCreateUndoLevel("postType",t,e);l.content=({blocks:e=[]})=>(0,i.__unstableSerializeAndClean)(e)}o.editPost(l)};function An(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}const Rn=e=>({dispatch:t,registry:n,select:o})=>{o.__unstableIsEditorReady()&&(n.dispatch(m.store).clearSelectedBlock(),t.editPost({selection:void 0},{undoIgnore:!0})),t({type:"SET_RENDERING_MODE",mode:e})};function On(e){return{type:"SET_DEVICE_TYPE",deviceType:e}}const Ln=e=>({registry:t})=>{var n;const o=null!==(n=t.select(B.store).get("core","inactivePanels"))&&void 0!==n?n:[];let s;s=!!o?.includes(e)?o.filter((t=>t!==e)):[...o,e],t.dispatch(B.store).set("core","inactivePanels",s)},Mn=e=>({registry:t})=>{var n;const o=null!==(n=t.select(B.store).get("core","openPanels"))&&void 0!==n?n:[];let s;s=!!o?.includes(e)?o.filter((t=>t!==e)):[...o,e],t.dispatch(B.store).set("core","openPanels",s)};function Fn(e){return{type:"REMOVE_PANEL",panelName:e}}function Vn(e){return{type:"SET_IS_INSERTER_OPENED",value:e}}function Un(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}const Hn=e=>(...t)=>({registry:n})=>{S()("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`",version:"6.2"}),n.dispatch(m.store)[e](...t)},zn=Hn("resetBlocks"),Gn=Hn("receiveBlocks"),jn=Hn("updateBlock"),Wn=Hn("updateBlockAttributes"),$n=Hn("selectBlock"),Kn=Hn("startMultiSelect"),Zn=Hn("stopMultiSelect"),Yn=Hn("multiSelect"),qn=Hn("clearSelectedBlock"),Qn=Hn("toggleSelection"),Xn=Hn("replaceBlocks"),Jn=Hn("replaceBlock"),eo=Hn("moveBlocksDown"),to=Hn("moveBlocksUp"),no=Hn("moveBlockToPosition"),oo=Hn("insertBlock"),so=Hn("insertBlocks"),ro=Hn("showInsertionPoint"),io=Hn("hideInsertionPoint"),ao=Hn("setTemplateValidity"),lo=Hn("synchronizeTemplate"),co=Hn("mergeBlocks"),uo=Hn("removeBlocks"),po=Hn("removeBlock"),mo=Hn("toggleBlockMode"),go=Hn("startTyping"),ho=Hn("stopTyping"),_o=Hn("enterFormattedText"),fo=Hn("exitFormattedText"),Eo=Hn("insertDefaultBlock"),bo=Hn("updateBlockListSettings");function vo(e){return{type:"SET_CURRENT_TEMPLATE_ID",id:e}}const yo=e=>async({select:t,dispatch:n,registry:o})=>{const s=await o.dispatch(p.store).saveEntityRecord("postType","wp_template",e);return o.dispatch(p.store).editEntityRecord("postType",t.getCurrentPostType(),t.getCurrentPostId(),{template:s.slug}),o.dispatch(rn.store).createSuccessNotice((0,d.__)("Custom template created. You're in template mode now."),{type:"snackbar",actions:[{label:(0,d.__)("Go back"),onClick:()=>n.setRenderingMode(t.getEditorSettings().defaultRenderingMode)}]}),s},wo=e=>({registry:t})=>{var n;const o=(null!==(n=t.select(B.store).get("core","hiddenBlockTypes"))&&void 0!==n?n:[]).filter((t=>!(Array.isArray(e)?e:[e]).includes(t)));t.dispatch(B.store).set("core","hiddenBlockTypes",o)},ko=e=>({registry:t})=>{var n;const o=null!==(n=t.select(B.store).get("core","hiddenBlockTypes"))&&void 0!==n?n:[],s=new Set([...o,...Array.isArray(e)?e:[e]]);t.dispatch(B.store).set("core","hiddenBlockTypes",[...s])},So={rootClientId:void 0,insertionIndex:void 0,filterValue:void 0},Po=(0,a.createRegistrySelector)((e=>t=>{if("object"==typeof t.blockInserterPanel)return t.blockInserterPanel;if("template-locked"===Ze(t)){const[t]=e(m.store).getBlocksByName("core/post-content");if(t)return{rootClientId:t,insertionIndex:void 0,filterValue:void 0}}return So}));function Co(e){return e.listViewToggleRef}const To={reducer:_,selectors:e,actions:t},xo=(0,a.createReduxStore)("core/editor",{...To});(0,a.register)(xo),u(xo).registerPrivateActions(s),u(xo).registerPrivateSelectors(r);const Bo={name:"core/post-meta",label:(0,d._x)("Post Meta","block bindings source"),useSource(e,t){const{getCurrentPostType:n}=(0,a.useSelect)(xo),{context:o}=e,{key:s}=t,r=o.postType?o.postType:n(),[i,l]=(0,p.useEntityProp)("postType",o.postType,"meta",o.postId);if("wp_template"===r)return{placeholder:s};const c=i[s];return{placeholder:s,value:c,updateValue:e=>{l({...i,[s]:e})}}}},{registerBlockBindingsSource:Io}=u((0,a.dispatch)(i.store));Io(Bo);const No=window.wp.compose;function Do(e){const t=e.avatar_urls&&e.avatar_urls[24]?(0,C.createElement)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,C.createElement)("span",{className:"editor-autocompleters__no-avatar"});return(0,C.createElement)(C.Fragment,null,t,(0,C.createElement)("span",{className:"editor-autocompleters__user-name"},e.name),(0,C.createElement)("span",{className:"editor-autocompleters__user-slug"},e.slug))}(0,an.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",(function(e){var t;const n=Object.fromEntries(Object.entries(null!==(t=e.attributes)&&void 0!==t?t:{}).filter((([,{source:e}])=>"meta"===e)).map((([e,{meta:t}])=>[e,t])));return Object.entries(n).length&&(e.edit=(e=>(0,No.createHigherOrderComponent)((t=>({attributes:n,setAttributes:o,...s})=>{const r=(0,a.useSelect)((e=>e(xo).getCurrentPostType()),[]),[i,l]=(0,p.useEntityProp)("postType",r,"meta"),c=(0,P.useMemo)((()=>({...n,...Object.fromEntries(Object.entries(e).map((([e,t])=>[e,i[t]])))})),[n,i]);return(0,C.createElement)(t,{attributes:c,setAttributes:t=>{const n=Object.fromEntries(Object.entries(null!=t?t:{}).filter((([t])=>t in e)).map((([t,n])=>[e[t],n])));Object.entries(n).length&&l(n),o(t)},...s})}),"withMetaAttributeSource"))(n)(e.edit)),e}));const Ao={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){const t=(0,a.useSelect)((t=>{const{getUsers:n}=t(p.store);return n({context:"view",search:encodeURIComponent(e)})}),[e]),n=(0,P.useMemo)((()=>t?t.map((e=>({key:`user-${e.slug}`,value:e,label:Do(e)}))):[]),[t]);return[n]},getOptionCompletion:e=>`@${e.slug}`};(0,an.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",(function(e=[]){return e.push({...Ao}),e}));const Ro=window.wp.patterns,{useSetPatternBindings:Oo,ResetOverridesControl:Lo,PATTERN_TYPES:Mo,PARTIAL_SYNCING_SUPPORTED_BLOCKS:Fo}=u(Ro.privateApis),Vo=(0,No.createHigherOrderComponent)((e=>t=>{const n=Object.keys(Fo).includes(t.name);return(0,C.createElement)(C.Fragment,null,(0,C.createElement)(e,{...t}),n&&(0,C.createElement)(Uo,{...t}),t.isSelected&&n&&(0,C.createElement)(Ho,{...t}))}));function Uo(e){const t=(0,a.useSelect)((e=>e(xo).getCurrentPostType()),[]);return Oo(e,t),null}function Ho(e){const t=(0,m.useBlockEditingMode)(),n=(0,a.useSelect)((e=>e(xo).getCurrentPostType()===Mo.user),[]),o=e.attributes.metadata?.bindings,s=!!o&&Object.values(o).some((e=>"core/pattern-overrides"===e.source)),r=!n&&!!e.attributes.metadata?.name&&"disabled"!==t&&s;return(0,C.createElement)(C.Fragment,null,r&&(0,C.createElement)(Lo,{...e}))}(0,an.addFilter)("editor.BlockEdit","core/editor/with-pattern-override-controls",Vo);const zo=window.wp.keyboardShortcuts;function Go(){const{redo:e,undo:t,savePost:n,setIsListViewOpened:o}=(0,a.useDispatch)(xo),{isEditedPostDirty:s,isPostSavingLocked:r,isListViewOpened:i}=(0,a.useSelect)(xo);return(0,zo.useShortcut)("core/editor/undo",(e=>{t(),e.preventDefault()})),(0,zo.useShortcut)("core/editor/redo",(t=>{e(),t.preventDefault()})),(0,zo.useShortcut)("core/editor/save",(e=>{e.preventDefault(),r()||s()&&n()})),(0,zo.useShortcut)("core/editor/toggle-list-view",(e=>{i()||(e.preventDefault(),o(!0))})),null}class jo extends P.Component{constructor(e){super(e),this.needsAutosave=!(!e.isDirty||!e.isAutosaveable)}componentDidMount(){this.props.disableIntervalChecks||this.setAutosaveTimer()}componentDidUpdate(e){this.props.disableIntervalChecks?this.props.editsReference!==e.editsReference&&this.props.autosave():(this.props.interval!==e.interval&&(clearTimeout(this.timerId),this.setAutosaveTimer()),this.props.isDirty&&(!this.props.isAutosaving||e.isAutosaving)?this.props.editsReference!==e.editsReference&&(this.needsAutosave=!0):this.needsAutosave=!1)}componentWillUnmount(){clearTimeout(this.timerId)}setAutosaveTimer(e=1e3*this.props.interval){this.timerId=setTimeout((()=>{this.autosaveTimerHandler()}),e)}autosaveTimerHandler(){this.props.isAutosaveable?(this.needsAutosave&&(this.needsAutosave=!1,this.props.autosave()),this.setAutosaveTimer()):this.setAutosaveTimer(1e3)}render(){return null}}const Wo=(0,No.compose)([(0,a.withSelect)(((e,t)=>{const{getReferenceByDistinctEdits:n}=e(p.store),{isEditedPostDirty:o,isEditedPostAutosaveable:s,isAutosavingPost:r,getEditorSettings:i}=e(xo),{interval:a=i().autosaveInterval}=t;return{editsReference:n(),isDirty:o(),isAutosaveable:s(),isAutosaving:r(),interval:a}})),(0,a.withDispatch)(((e,t)=>({autosave(){const{autosave:n=e(xo).autosave}=t;n()}})))])(jo);var $o=n(5755),Ko=n.n($o);const Zo=window.wp.components,Yo=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})),qo=(0,C.createElement)(T.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,C.createElement)(T.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})),Qo=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,C.createElement)(T.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})),Xo=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})),Jo=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})),es=window.wp.keycodes,ts=window.wp.commands,ns={wp_pattern:(0,d.__)("Editing pattern: %s"),wp_navigation:(0,d.__)("Editing navigation menu: %s"),wp_template:(0,d.__)("Editing template: %s"),wp_template_part:(0,d.__)("Editing template part: %s")},os={wp_block:Yo,wp_navigation:qo};function ss(){const{postType:e,postId:t,onNavigateToPreviousEntityRecord:n}=(0,a.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:n,getEditorSettings:o}=e(xo);return{postType:n(),postId:t(),onNavigateToPreviousEntityRecord:o().onNavigateToPreviousEntityRecord,getEditorSettings:o}}),[]);return(0,C.createElement)(rs,{postType:e,postId:t,onBack:n?()=>{n&&n()}:void 0})}function rs({postType:e,postId:t,onBack:n}){var o;const{open:s}=(0,a.useDispatch)(ts.store),{editedRecord:r,isResolving:i}=(0,p.useEntityRecord)("postType",e,t),{templateIcon:l,templateTitle:c}=(0,a.useSelect)((e=>{const{__experimentalGetTemplateInfo:t}=e(xo),n=t(r);return{templateIcon:n.icon,templateTitle:n.title}})),u=!r&&!i,g=null!==(o=os[e])&&void 0!==o?o:Qo,[h,_]=(0,P.useState)(!1),f=(0,P.useRef)(!0),E=["wp_template","wp_template_part"].includes(e),b=["wp_template","wp_navigation","wp_template_part","wp_block"].includes(e);(0,P.useEffect)((()=>{f.current||_(!0),f.current=!1}),[e,t]);const v=E?c:r.title;return(0,C.createElement)("div",{className:Ko()("editor-document-bar",{"has-back-button":!!n,"is-animated":h,"is-global":b})},n&&(0,C.createElement)(Zo.Button,{className:"editor-document-bar__back",icon:(0,d.isRTL)()?Xo:Jo,onClick:e=>{e.stopPropagation(),n()},size:"compact"},(0,d.__)("Back")),u&&(0,C.createElement)(Zo.__experimentalText,null,(0,d.__)("Document not found")),!u&&(0,C.createElement)(Zo.Button,{className:"editor-document-bar__command",onClick:()=>s(),size:"compact"},(0,C.createElement)(Zo.__experimentalHStack,{className:"editor-document-bar__title",spacing:1,justify:"center"},(0,C.createElement)(m.BlockIcon,{icon:E?l:g}),(0,C.createElement)(Zo.__experimentalText,{size:"body",as:"h1","aria-label":ns[e]?(0,d.sprintf)(ns[e],v):void 0},v)),(0,C.createElement)("span",{className:"editor-document-bar__shortcut"},es.displayShortcut.primary("k"))))}const is=window.wp.richText,as=({children:e,isValid:t,level:n,href:o,onSelect:s})=>(0,C.createElement)("li",{className:Ko()("document-outline__item",`is-${n.toLowerCase()}`,{"is-invalid":!t})},(0,C.createElement)("a",{href:o,className:"document-outline__button",onClick:s},(0,C.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,C.createElement)("strong",{className:"document-outline__level"},n),(0,C.createElement)("span",{className:"document-outline__item-content"},e))),ls=(0,C.createElement)("em",null,(0,d.__)("(Empty heading)")),cs=[(0,C.createElement)("br",{key:"incorrect-break"}),(0,C.createElement)("em",{key:"incorrect-message"},(0,d.__)("(Incorrect heading level)"))],us=[(0,C.createElement)("br",{key:"incorrect-break-h1"}),(0,C.createElement)("em",{key:"incorrect-message-h1"},(0,d.__)("(Your theme may already use a H1 for the post title)"))],ds=[(0,C.createElement)("br",{key:"incorrect-break-multiple-h1"}),(0,C.createElement)("em",{key:"incorrect-message-multiple-h1"},(0,d.__)("(Multiple H1 headings are not recommended)"))];function ps(){return(0,C.createElement)(Zo.SVG,{width:"138",height:"148",viewBox:"0 0 138 148",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,C.createElement)(Zo.Rect,{width:"138",height:"148",rx:"4",fill:"#F0F6FC"}),(0,C.createElement)(Zo.Line,{x1:"44",y1:"28",x2:"24",y2:"28",stroke:"#DDDDDD"}),(0,C.createElement)(Zo.Rect,{x:"48",y:"16",width:"27",height:"23",rx:"4",fill:"#DDDDDD"}),(0,C.createElement)(Zo.Path,{d:"M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z",fill:"black"}),(0,C.createElement)(Zo.Line,{x1:"55",y1:"59",x2:"24",y2:"59",stroke:"#DDDDDD"}),(0,C.createElement)(Zo.Rect,{x:"59",y:"47",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,C.createElement)(Zo.Path,{d:"M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z",fill:"black"}),(0,C.createElement)(Zo.Line,{x1:"80",y1:"90",x2:"24",y2:"90",stroke:"#DDDDDD"}),(0,C.createElement)(Zo.Rect,{x:"84",y:"78",width:"30",height:"23",rx:"4",fill:"#F0B849"}),(0,C.createElement)(Zo.Path,{d:"M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z",fill:"black"}),(0,C.createElement)(Zo.Line,{x1:"66",y1:"121",x2:"24",y2:"121",stroke:"#DDDDDD"}),(0,C.createElement)(Zo.Rect,{x:"70",y:"109",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,C.createElement)(Zo.Path,{d:"M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z",fill:"black"}))}const ms=(e=[])=>e.flatMap(((e={})=>"core/heading"===e.name?{...e,level:e.attributes.level,isEmpty:gs(e)}:ms(e.innerBlocks))),gs=e=>!e.attributes.content||0===e.attributes.content.length,hs=(0,No.compose)((0,a.withSelect)((e=>{var t;const{getBlocks:n}=e(m.store),{getEditedPostAttribute:o}=e(xo),{getPostType:s}=e(p.store),r=s(o("type"));return{title:o("title"),blocks:n(),isTitleSupported:null!==(t=r?.supports?.title)&&void 0!==t&&t}})))((({blocks:e=[],title:t,onSelect:n,isTitleSupported:o,hasOutlineItemsDisabled:s})=>{const r=ms(e),{selectBlock:i}=(0,a.useDispatch)(m.store);if(r.length<1)return(0,C.createElement)("div",{className:"editor-document-outline has-no-headings"},(0,C.createElement)(ps,null),(0,C.createElement)("p",null,(0,d.__)("Navigate the structure of your document and address issues like empty or incorrect heading levels.")));let l=1;const c=document.querySelector(".editor-post-title__input"),u=o&&t&&c,p=r.reduce(((e,t)=>({...e,[t.level]:(e[t.level]||0)+1})),{})[1]>1;return(0,C.createElement)("div",{className:"document-outline"},(0,C.createElement)("ul",null,u&&(0,C.createElement)(as,{level:(0,d.__)("Title"),isValid:!0,onSelect:n,href:`#${c.id}`,isDisabled:s},t),r.map(((e,t)=>{const o=e.level>l+1,r=!(e.isEmpty||o||!e.level||1===e.level&&(p||u));return l=e.level,(0,C.createElement)(as,{key:t,level:`H${e.level}`,isValid:r,isDisabled:s,href:`#block-${e.clientId}`,onSelect:()=>{i(e.clientId),n?.()}},e.isEmpty?ls:(0,is.getTextContent)((0,is.create)({html:e.attributes.content})),o&&cs,1===e.level&&p&&ds,u&&1===e.level&&!p&&us)}))))}));const _s=(0,a.withSelect)((e=>({blocks:e(m.store).getBlocks()})))((function({blocks:e,children:t}){return e.filter((e=>"core/heading"===e.name)).length<1?null:t}));const fs=function(){const{registerShortcut:e}=(0,a.useDispatch)(zo.store);return(0,P.useEffect)((()=>{e({name:"core/editor/save",category:"global",description:(0,d.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:(0,d.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:(0,d.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,es.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]}),e({name:"core/editor/toggle-list-view",category:"global",description:(0,d.__)("Open the block list view."),keyCombination:{modifier:"access",character:"o"}})}),[e]),(0,C.createElement)(m.BlockEditorKeyboardShortcuts.Register,null)},Es=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"})),bs=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"}));const vs=(0,P.forwardRef)((function(e,t){const n=(0,es.isAppleOS)()?es.displayShortcut.primaryShift("z"):es.displayShortcut.primary("y"),o=(0,a.useSelect)((e=>e(xo).hasEditorRedo()),[]),{redo:s}=(0,a.useDispatch)(xo);return(0,C.createElement)(Zo.Button,{...e,ref:t,icon:(0,d.isRTL)()?bs:Es,label:(0,d.__)("Redo"),shortcut:n,"aria-disabled":!o,onClick:o?s:void 0,className:"editor-history__redo"})}));const ys=(0,P.forwardRef)((function(e,t){const n=(0,a.useSelect)((e=>e(xo).hasEditorUndo()),[]),{undo:o}=(0,a.useDispatch)(xo);return(0,C.createElement)(Zo.Button,{...e,ref:t,icon:(0,d.isRTL)()?Es:bs,label:(0,d.__)("Undo"),shortcut:es.displayShortcut.primary("z"),"aria-disabled":!n,onClick:n?o:void 0,className:"editor-history__undo"})}));const ws=(0,No.compose)([(0,a.withSelect)((e=>({isValid:e(m.store).isValidTemplate()}))),(0,a.withDispatch)((e=>{const{setTemplateValidity:t,synchronizeTemplate:n}=e(m.store);return{resetTemplateValidity:()=>t(!0),synchronizeTemplate:n}}))])((function({isValid:e,...t}){return e?null:(0,C.createElement)(Zo.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:(0,d.__)("Keep it as is"),onClick:t.resetTemplateValidity},{label:(0,d.__)("Reset the template"),onClick:()=>{window.confirm((0,d.__)("Resetting the template may result in loss of content, do you want to continue?"))&&t.synchronizeTemplate()}}]},(0,d.__)("The content of your post doesn’t match the template assigned to your post type."))}));const ks=function(){const{notices:e}=(0,a.useSelect)((e=>({notices:e(rn.store).getNotices()})),[]),{removeNotice:t}=(0,a.useDispatch)(rn.store),n=e.filter((({isDismissible:e,type:t})=>e&&"default"===t)),o=e.filter((({isDismissible:e,type:t})=>!e&&"default"===t));return(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.NoticeList,{notices:o,className:"components-editor-notices__pinned"}),(0,C.createElement)(Zo.NoticeList,{notices:n,className:"components-editor-notices__dismissible",onRemove:t},(0,C.createElement)(ws,null)))},Ss=-3;function Ps(){const e=(0,a.useSelect)((e=>e(rn.store).getNotices()),[]),{removeNotice:t}=(0,a.useDispatch)(rn.store),n=e.filter((({type:e})=>"snackbar"===e)).slice(Ss);return(0,C.createElement)(Zo.SnackbarList,{notices:n,className:"components-editor-notices__snackbar",onRemove:t})}const Cs=window.wp.htmlEntities;function Ts({record:e,checked:t,onChange:n}){const{name:o,kind:s,title:r,key:i}=e,l=(0,a.useSelect)((e=>{if("postType"!==s||"wp_template"!==o)return r;const t=e(p.store).getEditedEntityRecord(s,o,i);return e(xo).__experimentalGetTemplateInfo(t).title}),[o,s,r,i]);return(0,C.createElement)(Zo.PanelRow,null,(0,C.createElement)(Zo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,Cs.decodeEntities)(l)||(0,d.__)("Untitled"),checked:t,onChange:n}))}const{getGlobalStylesChanges:xs,GlobalStylesContext:Bs}=u(m.privateApis);function Is({record:e}){const{user:t}=(0,P.useContext)(Bs),n=(0,a.useSelect)((t=>t(p.store).getEntityRecord(e.kind,e.name,e.key)),[e.kind,e.name,e.key]),o=xs(t,n,{maxResults:10});return o.length?(0,C.createElement)("ul",{className:"entities-saved-states__changes"},o.map((e=>(0,C.createElement)("li",{key:e},e)))):null}function Ns({record:e,count:t}){if("globalStyles"===e?.name)return null;const n=function(e,t){switch(e){case"site":return 1===t?(0,d.__)("This change will affect your whole site."):(0,d.__)("These changes will affect your whole site.");case"wp_template":return(0,d.__)("This change will affect pages and posts that use this template.");case"page":case"post":return(0,d.__)("The following has been modified.")}}(e?.name,t);return n?(0,C.createElement)(Zo.PanelRow,null,n):null}function Ds({list:e,unselectedEntities:t,setUnselectedEntities:n}){const o=e.length,s=e[0];let r=(0,a.useSelect)((e=>e(p.store).getEntityConfig(s.kind,s.name)),[s.kind,s.name]).label;return"wp_template_part"===s?.name&&(r=1===o?(0,d.__)("Template Part"):(0,d.__)("Template Parts")),(0,C.createElement)(Zo.PanelBody,{title:r,initialOpen:!0},(0,C.createElement)(Ns,{record:s,count:o}),e.map((e=>(0,C.createElement)(Ts,{key:e.key||e.property,record:e,checked:!t.some((t=>t.kind===e.kind&&t.name===e.name&&t.key===e.key&&t.property===e.property)),onChange:t=>n(e,t)}))),"globalStyles"===s?.name&&(0,C.createElement)(Is,{record:s}))}const As={title:(0,d.__)("Title"),description:(0,d.__)("Tagline"),site_logo:(0,d.__)("Logo"),site_icon:(0,d.__)("Icon"),show_on_front:(0,d.__)("Show on front"),page_on_front:(0,d.__)("Page on front"),posts_per_page:(0,d.__)("Maximum posts per page"),default_comment_status:(0,d.__)("Allow comments on new posts")},Rs=()=>{const{editedEntities:e,siteEdits:t}=(0,a.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,getEntityRecordEdits:n}=e(p.store);return{editedEntities:t(),siteEdits:n("root","site")}}),[]),n=(0,P.useMemo)((()=>{const n=e.filter((e=>!("root"===e.kind&&"site"===e.name))),o=[];for(const e in t)o.push({kind:"root",name:"site",title:As[e]||e,property:e});return[...n,...o]}),[e,t]),[o,s]=(0,P.useState)([]);return{dirtyEntityRecords:n,isDirty:n.length-o.length>0,setUnselectedEntities:({kind:e,name:t,key:n,property:r},i)=>{s(i?o.filter((o=>o.kind!==e||o.name!==t||o.key!==n||o.property!==r)):[...o,{kind:e,name:t,key:n,property:r}])},unselectedEntities:o}},Os=[{kind:"postType",name:"wp_navigation"}];function Ls(e){return e}function Ms({close:e}){const t=Rs();return(0,C.createElement)(Fs,{close:e,...t})}function Fs({additionalPrompt:e,close:t,onSave:n=Ls,saveEnabled:o,saveLabel:s=(0,d.__)("Save"),dirtyEntityRecords:r,isDirty:i,setUnselectedEntities:l,unselectedEntities:c}){const u=(0,P.useRef)(),{editEntityRecord:g,saveEditedEntityRecord:h,__experimentalSaveSpecifiedEntityEdits:_}=(0,a.useDispatch)(p.store),{__unstableMarkLastChangeAsPersistent:f}=(0,a.useDispatch)(m.store),{createSuccessNotice:E,createErrorNotice:b,removeNotice:v}=(0,a.useDispatch)(rn.store),y=r.reduce(((e,t)=>{const{name:n}=t;return e[n]||(e[n]=[]),e[n].push(t),e}),{}),{site:w,wp_template:k,wp_template_part:S,...T}=y,x=[w,k,S,...Object.values(T)].filter(Array.isArray),B=null!=o?o:i,{homeUrl:I}=(0,a.useSelect)((e=>{const{getUnstableBase:t}=e(p.store);return{homeUrl:t()?.home}}),[]),N=(0,P.useCallback)((()=>t()),[t]),[D,A]=(0,No.__experimentalUseDialog)({onClose:()=>N()});return(0,C.createElement)("div",{ref:D,...A,className:"entities-saved-states__panel"},(0,C.createElement)(Zo.Flex,{className:"entities-saved-states__panel-header",gap:2},(0,C.createElement)(Zo.FlexItem,{isBlock:!0,as:Zo.Button,ref:u,variant:"primary",disabled:!B,onClick:()=>{const e="site-editor-save-success";v(e);const o=r.filter((({kind:e,name:t,key:n,property:o})=>!c.some((s=>s.kind===e&&s.name===t&&s.key===n&&s.property===o))));t(o);const s=[],i=[];o.forEach((({kind:e,name:t,key:n,property:o})=>{"root"===e&&"site"===t?s.push(o):(Os.some((n=>n.kind===e&&n.name===t))&&g(e,t,n,{status:"publish"}),i.push(h(e,t,n)))})),s.length&&i.push(_("root","site",void 0,s)),f(),Promise.all(i).then((e=>n(e))).then((t=>{t.some((e=>void 0===e))?b((0,d.__)("Saving failed.")):E((0,d.__)("Site updated."),{type:"snackbar",id:e,actions:[{label:(0,d.__)("View site"),url:I}]})})).catch((e=>b(`${(0,d.__)("Saving failed.")} ${e}`)))},className:"editor-entities-saved-states__save-button"},s),(0,C.createElement)(Zo.FlexItem,{isBlock:!0,as:Zo.Button,variant:"secondary",onClick:N},(0,d.__)("Cancel"))),(0,C.createElement)("div",{className:"entities-saved-states__text-prompt"},(0,C.createElement)("strong",{className:"entities-saved-states__text-prompt--header"},(0,d.__)("Are you ready to save?")),e,(0,C.createElement)("p",null,i?(0,P.createInterpolateElement)((0,d.sprintf)((0,d._n)("There is <strong>%d site change</strong> waiting to be saved.","There are <strong>%d site changes</strong> waiting to be saved.",x.length),x.length),{strong:(0,C.createElement)("strong",null)}):(0,d.__)("Select the items you want to save."))),x.map((e=>(0,C.createElement)(Ds,{key:e[0].name,list:e,unselectedEntities:c,setUnselectedEntities:l}))))}function Vs(){try{return(0,a.select)(xo).getEditedPostContent()}catch(e){}}function Us({text:e,children:t}){const n=(0,No.useCopyToClipboard)(e);return(0,C.createElement)(Zo.Button,{variant:"secondary",ref:n},t)}class Hs extends P.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,an.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){const{error:e}=this.state;if(!e)return this.props.children;const t=[(0,C.createElement)(Us,{key:"copy-post",text:Vs},(0,d.__)("Copy Post Text")),(0,C.createElement)(Us,{key:"copy-error",text:e.stack},(0,d.__)("Copy Error"))];return(0,C.createElement)(m.Warning,{className:"editor-error-boundary",actions:t},(0,d.__)("The editor has encountered an unexpected error."))}}const zs=Hs,Gs=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame;let js;function Ws(){const{postId:e,isEditedPostNew:t,hasRemoteAutosave:n}=(0,a.useSelect)((e=>({postId:e(xo).getCurrentPostId(),isEditedPostNew:e(xo).isEditedPostNew(),hasRemoteAutosave:!!e(xo).getEditorSettings().autosave})),[]),{getEditedPostAttribute:o}=(0,a.useSelect)(xo),{createWarningNotice:s,removeNotice:r}=(0,a.useDispatch)(rn.store),{editPost:l,resetEditorBlocks:c}=(0,a.useDispatch)(xo);(0,P.useEffect)((()=>{let a=function(e,t){return window.sessionStorage.getItem(ln(e,t))}(e,t);if(!a)return;try{a=JSON.parse(a)}catch{return}const{post_title:u,content:p,excerpt:m}=a,g={title:u,content:p,excerpt:m};if(!Object.keys(g).some((e=>g[e]!==o(e))))return void cn(e,t);if(n)return;const h="wpEditorAutosaveRestore";s((0,d.__)("The backup of this post in your browser is different from the version below."),{id:h,actions:[{label:(0,d.__)("Restore the backup"),onClick(){const{content:e,...t}=g;l(t),c((0,i.parse)(g.content)),r(h)}}]})}),[t,e])}const $s=(0,No.ifCondition)((()=>{if(void 0!==js)return js;try{window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),js=!0}catch{js=!1}return js}))((function(){const{autosave:e}=(0,a.useDispatch)(xo),t=(0,P.useCallback)((()=>{Gs((()=>e({local:!0})))}),[]);Ws(),function(){const{postId:e,isEditedPostNew:t,isDirty:n,isAutosaving:o,didError:s}=(0,a.useSelect)((e=>({postId:e(xo).getCurrentPostId(),isEditedPostNew:e(xo).isEditedPostNew(),isDirty:e(xo).isEditedPostDirty(),isAutosaving:e(xo).isAutosavingPost(),didError:e(xo).didPostSaveRequestFail()})),[]),r=(0,P.useRef)(n),i=(0,P.useRef)(o);(0,P.useEffect)((()=>{!s&&(i.current&&!o||r.current&&!n)&&cn(e,t),r.current=n,i.current=o}),[n,o,s]);const l=(0,No.usePrevious)(t),c=(0,No.usePrevious)(e);(0,P.useEffect)((()=>{c===e&&l&&!t&&cn(e,!0)}),[t,e])}();const n=(0,a.useSelect)((e=>e(xo).getEditorSettings().localAutosaveInterval),[]);return(0,C.createElement)(Wo,{interval:n,autosave:t})}));const Ks=function({children:e}){const t=(0,a.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xo),{getPostType:n}=e(p.store),o=n(t("type"));return!!o?.supports?.["page-attributes"]}),[]);return t?e:null};const Zs=function({children:e,supportKeys:t}){const n=(0,a.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xo),{getPostType:n}=e(p.store);return n(t("type"))}),[]);let o=!0;return n&&(o=(Array.isArray(t)?t:[t]).some((e=>!!n.supports[e]))),o?e:null};function Ys(){const e=(0,a.useSelect)((e=>{var t;return null!==(t=e(xo).getEditedPostAttribute("menu_order"))&&void 0!==t?t:0}),[]),{editPost:t}=(0,a.useDispatch)(xo),[n,o]=(0,P.useState)(null),s=null!=n?n:e;return(0,C.createElement)(Zo.Flex,null,(0,C.createElement)(Zo.FlexBlock,null,(0,C.createElement)(Zo.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,d.__)("Order"),value:s,onChange:e=>{o(e);const n=Number(e);Number.isInteger(n)&&""!==e.trim?.()&&t({menu_order:n})},labelPosition:"side",onBlur:()=>{o(null)}})))}function qs(){return(0,C.createElement)(Zs,{supportKeys:"page-attributes"},(0,C.createElement)(Ys,null))}var Qs=n(9681),Xs=n.n(Qs);function Js(e){const t=e.map((e=>({children:[],parent:null,...e})));if(t.some((({parent:e})=>null===e)))return t;const n=t.reduce(((e,t)=>{const{parent:n}=t;return e[n]||(e[n]=[]),e[n].push(t),e}),{}),o=e=>e.map((e=>{const t=n[e.id];return{...e,children:t&&t.length?o(t):[]}}));return o(n[0]||[])}const er=e=>(0,Cs.decodeEntities)(e),tr=e=>({...e,name:er(e.name)}),nr=e=>(null!=e?e:[]).map(tr);function or(e){return e?.title?.rendered?(0,Cs.decodeEntities)(e.title.rendered):`#${e.id} (${(0,d.__)("no title")})`}const sr=(e,t)=>{const n=Xs()(e||"").toLowerCase(),o=Xs()(t||"").toLowerCase();return n===o?0:n.startsWith(o)?n.length:1/0};const rr=function(){const{editPost:e}=(0,a.useDispatch)(xo),[t,n]=(0,P.useState)(!1),{isHierarchical:o,parentPostId:s,parentPostTitle:r,pageItems:i}=(0,a.useSelect)((e=>{var n;const{getPostType:o,getEntityRecords:s,getEntityRecord:r}=e(p.store),{getCurrentPostId:i,getEditedPostAttribute:a}=e(xo),l=a("type"),c=a("parent"),u=o(l),d=i(),m=null!==(n=u?.hierarchical)&&void 0!==n&&n,g={per_page:100,exclude:d,parent_exclude:d,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};t&&(g.search=t);const h=c?r("postType",l,c):null;return{isHierarchical:m,parentPostId:c,parentPostTitle:h?or(h):"",pageItems:m?s("postType",l,g):null}}),[t]),l=(0,P.useMemo)((()=>{const e=(n,o=0)=>n.map((t=>[{value:t.id,label:"— ".repeat(o)+(0,Cs.decodeEntities)(t.name),rawName:t.name},...e(t.children||[],o+1)])).sort((([e],[n])=>sr(e.rawName,t)>=sr(n.rawName,t)?1:-1)).flat();if(!i)return[];let n=i.map((e=>({id:e.id,parent:e.parent,name:or(e)})));t||(n=Js(n));const o=e(n),a=o.find((e=>e.value===s));return r&&!a&&o.unshift({value:s,label:r}),o}),[i,t,r,s]);return o?(0,C.createElement)(Zo.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,d.__)("Parent"),value:s,options:l,onFilterValueChange:(0,No.debounce)((e=>{n(e)}),300),onChange:t=>{e({parent:t})}}):null},ir="page-attributes";const ar=function(){var e;const{isEnabled:t,isOpened:n,postType:o}=(0,a.useSelect)((e=>{const{getEditedPostAttribute:t,isEditorPanelEnabled:n,isEditorPanelOpened:o}=e(xo),{getPostType:s}=e(p.store);return{isEnabled:n(ir),isOpened:o(ir),postType:s(t("type"))}}),[]),{toggleEditorPanelOpened:s}=(0,a.useDispatch)(xo);return t&&o?(0,C.createElement)(Ks,null,(0,C.createElement)(Zo.PanelBody,{title:null!==(e=o?.labels?.attributes)&&void 0!==e?e:(0,d.__)("Page attributes"),opened:n,onToggle:(...e)=>s(ir,...e)},(0,C.createElement)(rr,null),(0,C.createElement)(Zo.PanelRow,null,(0,C.createElement)(qs,null)))):null},lr=(0,C.createElement)(T.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,C.createElement)(T.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5 5.5V8H20V5.5H22.5V4H20V1.5H18.5V4H16V5.5H18.5ZM13.9624 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V10.0391H18.5V18C18.5 18.2761 18.2761 18.5 18 18.5H10L10 10.4917L16.4589 10.5139L16.4641 9.01389L5.5 8.97618V6C5.5 5.72386 5.72386 5.5 6 5.5H13.9624V4ZM5.5 10.4762V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 10.4865L5.5 10.4762Z"})),cr=(0,d.__)("Custom Template");function ur({onClose:e}){const{defaultBlockTemplate:t,onNavigateToEntityRecord:n}=(0,a.useSelect)((e=>{const{getEditorSettings:t,getCurrentTemplateId:n}=e(xo);return{defaultBlockTemplate:t().defaultBlockTemplate,onNavigateToEntityRecord:t().onNavigateToEntityRecord,getTemplateId:n}})),{createTemplate:o}=u((0,a.useDispatch)(xo)),[s,r]=(0,P.useState)(""),[l,c]=(0,P.useState)(!1),p=()=>{r(""),e()};return(0,C.createElement)(Zo.Modal,{title:(0,d.__)("Create custom template"),onRequestClose:p},(0,C.createElement)("form",{className:"editor-post-template__create-form",onSubmit:async e=>{if(e.preventDefault(),l)return;c(!0);const r=null!=t?t:(0,i.serialize)([(0,i.createBlock)("core/group",{tagName:"header",layout:{inherit:!0}},[(0,i.createBlock)("core/site-title"),(0,i.createBlock)("core/site-tagline")]),(0,i.createBlock)("core/separator"),(0,i.createBlock)("core/group",{tagName:"main"},[(0,i.createBlock)("core/group",{layout:{inherit:!0}},[(0,i.createBlock)("core/post-title")]),(0,i.createBlock)("core/post-content",{layout:{inherit:!0}})])]),a=await o({slug:(0,w.cleanForSlug)(s||cr),content:r,title:s||cr});c(!1),n({postId:a.id,postType:"wp_template"}),p()}},(0,C.createElement)(Zo.__experimentalVStack,{spacing:"3"},(0,C.createElement)(Zo.TextControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Name"),value:s,onChange:r,placeholder:cr,disabled:l,help:(0,d.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,C.createElement)(Zo.__experimentalHStack,{justify:"right"},(0,C.createElement)(Zo.Button,{variant:"tertiary",onClick:p},(0,d.__)("Cancel")),(0,C.createElement)(Zo.Button,{variant:"primary",type:"submit",isBusy:l,"aria-disabled":l},(0,d.__)("Create"))))))}function dr(){return(0,a.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:n}=e(xo);return{postId:t(),postType:n()}}),[])}function pr(){const{postType:e,postId:t}=dr();return(0,a.useSelect)((n=>{const{getEntityRecord:o,getEntityRecords:s}=n(p.store),r=o("root","site"),i=s("postType","wp_template",{per_page:-1}),a=+t===r?.page_for_posts,l="page"===e&&+t===r?.page_on_front&&i?.some((({slug:e})=>"front-page"===e));return!a&&!l}),[t,e])}function mr(e){return(0,a.useSelect)((t=>t(p.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:e})),[e])}function gr(e){const t=hr(),n=pr(),o=mr(e);return(0,P.useMemo)((()=>n&&o?.filter((e=>e.is_custom&&e.slug!==t&&!!e.content.raw))),[o,t,n])}function hr(){const{postType:e,postId:t}=dr(),n=mr(e),o=(0,a.useSelect)((n=>{const o=n(p.store).getEditedEntityRecord("postType",e,t);return o?.template}),[e,t]);if(o)return n?.find((e=>e.slug===o))?.slug}const _r={className:"editor-post-template__dropdown",placement:"bottom-start"};function fr({isOpen:e,onClick:t}){const n=(0,a.useSelect)((e=>{const t=e(xo).getEditedPostAttribute("template"),{supportsTemplateMode:n,availableTemplates:o}=e(xo).getEditorSettings();if(!n&&o[t])return o[t];const s=e(p.store).canUser("create","templates")&&e(xo).getCurrentTemplateId();return s?.title||s?.slug||o?.[t]}),[]);return(0,C.createElement)(Zo.Button,{__next40pxDefaultSize:!0,className:"edit-post-post-template__toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,d.__)("Template options"),onClick:t},null!=n?n:(0,d.__)("Default template"))}function Er({onClose:e}){var t,n;const o=pr(),{availableTemplates:s,fetchedTemplates:r,selectedTemplateSlug:i,canCreate:l,canEdit:c,currentTemplateId:u,onNavigateToEntityRecord:g,getEditorSettings:h}=(0,a.useSelect)((e=>{const{canUser:t,getEntityRecords:n}=e(p.store),s=e(xo).getEditorSettings(),r=t("create","templates"),i=e(xo).getCurrentTemplateId();return{availableTemplates:s.availableTemplates,fetchedTemplates:r?n("postType","wp_template",{post_type:e(xo).getCurrentPostType(),per_page:-1}):void 0,selectedTemplateSlug:e(xo).getEditedPostAttribute("template"),canCreate:o&&r&&s.supportsTemplateMode,canEdit:o&&r&&s.supportsTemplateMode&&!!i,currentTemplateId:i,onNavigateToEntityRecord:s.onNavigateToEntityRecord,getEditorSettings:e(xo).getEditorSettings}}),[o]),_=(0,P.useMemo)((()=>Object.entries({...s,...Object.fromEntries((null!=r?r:[]).map((({slug:e,title:t})=>[e,t.rendered])))}).map((([e,t])=>({value:e,label:t})))),[s,r]),f=null!==(t=_.find((e=>e.value===i)))&&void 0!==t?t:_.find((e=>!e.value)),{editPost:E}=(0,a.useDispatch)(xo),{createSuccessNotice:b}=(0,a.useDispatch)(rn.store),[v,y]=(0,P.useState)(!1);return(0,C.createElement)("div",{className:"editor-post-template__classic-theme-dropdown"},(0,C.createElement)(m.__experimentalInspectorPopoverHeader,{title:(0,d.__)("Template"),help:(0,d.__)("Templates define the way content is displayed when viewing your site."),actions:l?[{icon:lr,label:(0,d.__)("Add template"),onClick:()=>y(!0)}]:[],onClose:e}),o?(0,C.createElement)(Zo.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:!0,label:(0,d.__)("Template"),value:null!==(n=f?.value)&&void 0!==n?n:"",options:_,onChange:e=>E({template:e||""})}):(0,C.createElement)(Zo.Notice,{status:"warning",isDismissible:!1},(0,d.__)("The posts page template cannot be changed.")),c&&g&&(0,C.createElement)("p",null,(0,C.createElement)(Zo.Button,{variant:"link",onClick:()=>{g({postId:u,postType:"wp_template"}),e(),b((0,d.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:[{label:(0,d.__)("Go back"),onClick:()=>h().onNavigateToPreviousEntityRecord()}]})}},(0,d.__)("Edit template"))),v&&(0,C.createElement)(ur,{onClose:()=>y(!1)}))}const br=function(){return(0,C.createElement)(Zo.Dropdown,{popoverProps:_r,focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,C.createElement)(fr,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,C.createElement)(Er,{onClose:e})})},vr=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));function yr({onClick:e}){const[t,n]=(0,P.useState)(!1),o=(0,P.useCallback)((()=>{n(!1)}),[]),{postType:s,postId:r}=dr(),i=gr(s),{editEntityRecord:l}=(0,a.useDispatch)(p.store);if(!i?.length)return null;return(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.MenuItem,{onClick:()=>n(!0)},(0,d.__)("Swap template")),t&&(0,C.createElement)(Zo.Modal,{title:(0,d.__)("Choose a template"),onRequestClose:o,overlayClassName:"editor-post-template__swap-template-modal",isFullScreen:!0},(0,C.createElement)("div",{className:"editor-post-template__swap-template-modal-content"},(0,C.createElement)(wr,{postType:s,onSelect:async t=>{l("postType",s,r,{template:t.name},{undoIgnore:!0}),o(),e()}}))))}function wr({postType:e,onSelect:t}){const n=gr(e),o=(0,P.useMemo)((()=>n.map((e=>({name:e.slug,blocks:(0,i.parse)(e.content.raw),title:(0,Cs.decodeEntities)(e.title.rendered),id:e.id})))),[n]),s=(0,No.useAsyncList)(o);return(0,C.createElement)(m.__experimentalBlockPatternsList,{label:(0,d.__)("Templates"),blockPatterns:o,shownPatterns:s,onClickPattern:t})}function kr({onClick:e}){const t=hr(),n=pr(),{postType:o,postId:s}=dr(),{editEntityRecord:r}=(0,a.useDispatch)(p.store);return t&&n?(0,C.createElement)(Zo.MenuItem,{onClick:()=>{r("postType",o,s,{template:""},{undoIgnore:!0}),e()}},(0,d.__)("Use default template")):null}function Sr({onClick:e}){const{canCreateTemplates:t}=(0,a.useSelect)((e=>{const{canUser:t}=e(p.store);return{canCreateTemplates:t("create","templates")}}),[]),[n,o]=(0,P.useState)(!1),s=pr();return t&&s?(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.MenuItem,{onClick:()=>{o(!0)}},(0,d.__)("Create new template")),n&&(0,C.createElement)(ur,{onClose:()=>{o(!1),e()}})):null}const Pr={className:"editor-post-template__dropdown",placement:"bottom-start"};function Cr({id:e}){const{isTemplateHidden:t,onNavigateToEntityRecord:n,getEditorSettings:o,hasGoBack:s}=(0,a.useSelect)((e=>{const{getRenderingMode:t,getEditorSettings:n}=u(e(xo)),o=n();return{isTemplateHidden:"post-only"===t(),onNavigateToEntityRecord:o.onNavigateToEntityRecord,getEditorSettings:n,hasGoBack:o.hasOwnProperty("onNavigateToPreviousEntityRecord")}}),[]),{editedRecord:r,hasResolved:i}=(0,p.useEntityRecord)("postType","wp_template",e),{createSuccessNotice:l}=(0,a.useDispatch)(rn.store),{setRenderingMode:c}=(0,a.useDispatch)(xo);if(!i)return null;const m=s?[{label:(0,d.__)("Go back"),onClick:()=>o().onNavigateToPreviousEntityRecord()}]:void 0;return(0,C.createElement)(Zo.DropdownMenu,{popoverProps:Pr,focusOnMount:!0,toggleProps:{__next40pxDefaultSize:!0,variant:"tertiary"},label:(0,d.__)("Template options"),text:(0,Cs.decodeEntities)(r.title),icon:null},(({onClose:e})=>(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.MenuGroup,null,(0,C.createElement)(Zo.MenuItem,{onClick:()=>{n({postId:r.id,postType:"wp_template"}),e(),l((0,d.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:m})}},(0,d.__)("Edit template")),(0,C.createElement)(yr,{onClick:e}),(0,C.createElement)(kr,{onClick:e}),(0,C.createElement)(Sr,{onClick:e})),(0,C.createElement)(Zo.MenuGroup,null,(0,C.createElement)(Zo.MenuItem,{icon:t?void 0:vr,isSelected:!t,role:"menuitemcheckbox",onClick:()=>{c(t?"template-locked":"post-only")}},(0,d.__)("Template preview"))))))}const Tr=(0,P.forwardRef)((({className:e,label:t,children:n},o)=>(0,C.createElement)(Zo.__experimentalHStack,{className:Ko()("editor-post-panel__row",e),ref:o},t&&(0,C.createElement)("div",{className:"editor-post-panel__row-label"},t),(0,C.createElement)("div",{className:"editor-post-panel__row-control"},n)))),xr=Tr;function Br(){const{templateId:e,isBlockTheme:t}=(0,a.useSelect)((e=>{const{getCurrentTemplateId:t,getEditorSettings:n}=e(xo);return{templateId:t(),isBlockTheme:n().__unstableIsBlockBasedTheme}}),[]),n=(0,a.useSelect)((e=>{var t;const n=e(xo).getCurrentPostType(),o=e(p.store).getPostType(n);if(!o?.viewable)return!1;const s=e(xo).getEditorSettings();if(!!s.availableTemplates&&Object.keys(s.availableTemplates).length>0)return!0;if(!s.supportsTemplateMode)return!1;return null!==(t=e(p.store).canUser("create","templates"))&&void 0!==t&&t}),[]),o=(0,a.useSelect)((e=>{var t;return null!==(t=e(p.store).canUser("read","templates"))&&void 0!==t&&t}),[]);return t&&o||!n?t&&e?(0,C.createElement)(xr,{label:(0,d.__)("Template")},(0,C.createElement)(Cr,{id:e})):null:(0,C.createElement)(xr,{label:(0,d.__)("Template")},(0,C.createElement)(br,null))}const Ir={_fields:"id,name",context:"view"},Nr={who:"authors",per_page:50,...Ir};function Dr(e){const{authorId:t,authors:n,postAuthor:o}=(0,a.useSelect)((t=>{const{getUser:n,getUsers:o}=t(p.store),{getEditedPostAttribute:s}=t(xo),r=s("author"),i={...Nr};return e&&(i.search=e),{authorId:r,authors:o(i),postAuthor:n(r,Ir)}}),[e]);return{authorId:t,authorOptions:(0,P.useMemo)((()=>{const e=(null!=n?n:[]).map((e=>({value:e.id,label:(0,Cs.decodeEntities)(e.name)})));return e.findIndex((({value:e})=>o?.id===e))<0&&o?[{value:o.id,label:(0,Cs.decodeEntities)(o.name)},...e]:e}),[n,o])}}function Ar(){const[e,t]=(0,P.useState)(),{editPost:n}=(0,a.useDispatch)(xo),{authorId:o,authorOptions:s}=Dr(e);return(0,C.createElement)(Zo.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,d.__)("Author"),options:s,value:o,onFilterValueChange:(0,No.debounce)((e=>{t(e)}),300),onChange:e=>{e&&n({author:e})},allowReset:!1})}function Rr(){const{editPost:e}=(0,a.useDispatch)(xo),{authorId:t,authorOptions:n}=Dr();return(0,C.createElement)(Zo.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"post-author-selector",label:(0,d.__)("Author"),options:n,onChange:t=>{const n=Number(t);e({author:n})},value:t})}const Or=function(){return(0,a.useSelect)((e=>{const t=e(p.store).getUsers(Nr);return t?.length>=25}),[])?(0,C.createElement)(Ar,null):(0,C.createElement)(Rr,null)};function Lr({children:e}){const{hasAssignAuthorAction:t,hasAuthors:n}=(0,a.useSelect)((e=>{var t;const n=e(xo).getCurrentPost(),o=e(p.store).getUsers(Nr);return{hasAssignAuthorAction:null!==(t=n._links?.["wp:action-assign-author"])&&void 0!==t&&t,hasAuthors:o?.length>=1}}),[]);return t&&n?(0,C.createElement)(Zs,{supportKeys:"author"},e):null}const Mr=function(){return(0,C.createElement)(Lr,null,(0,C.createElement)(xr,{className:"editor-post-author__panel"},(0,C.createElement)(Or,null)))};const Fr=function(){const e=(0,a.useSelect)((e=>{var t;return null!==(t=e(xo).getEditedPostAttribute("comment_status"))&&void 0!==t?t:"open"}),[]),{editPost:t}=(0,a.useDispatch)(xo);return(0,C.createElement)(Zo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Allow comments"),checked:"open"===e,onChange:()=>t({comment_status:"open"===e?"closed":"open"})})};const Vr=function(){const e=(0,a.useSelect)((e=>{var t;return null!==(t=e(xo).getEditedPostAttribute("ping_status"))&&void 0!==t?t:"open"}),[]),{editPost:t}=(0,a.useDispatch)(xo);return(0,C.createElement)(Zo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Allow pingbacks & trackbacks"),checked:"open"===e,onChange:()=>t({ping_status:"open"===e?"closed":"open"})})},Ur="discussion-panel";const Hr=function(){const{isEnabled:e,isOpened:t}=(0,a.useSelect)((e=>{const{isEditorPanelEnabled:t,isEditorPanelOpened:n}=e(xo);return{isEnabled:t(Ur),isOpened:n(Ur)}}),[]),{toggleEditorPanelOpened:n}=(0,a.useDispatch)(xo);return e?(0,C.createElement)(Zs,{supportKeys:["comments","trackbacks"]},(0,C.createElement)(Zo.PanelBody,{title:(0,d.__)("Discussion"),opened:t,onToggle:()=>n(Ur)},(0,C.createElement)(Zs,{supportKeys:"comments"},(0,C.createElement)(Zo.PanelRow,null,(0,C.createElement)(Fr,null))),(0,C.createElement)(Zs,{supportKeys:"trackbacks"},(0,C.createElement)(Zo.PanelRow,null,(0,C.createElement)(Vr,null))))):null};const zr=function(){const e=(0,a.useSelect)((e=>e(xo).getEditedPostAttribute("excerpt")),[]),{editPost:t}=(0,a.useDispatch)(xo);return(0,C.createElement)("div",{className:"editor-post-excerpt"},(0,C.createElement)(Zo.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:e=>t({excerpt:e}),value:e}),(0,C.createElement)(Zo.ExternalLink,{href:(0,d.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt")},(0,d.__)("Learn more about manual excerpts")))};const Gr=function({children:e}){const t=(0,a.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xo);return t("type")}),[]);return["wp_template","wp_template_part"].includes(t)?null:(0,C.createElement)(Zs,{supportKeys:"excerpt"},e)},{Fill:jr,Slot:Wr}=(0,Zo.createSlotFill)("PluginPostExcerpt"),$r=({children:e,className:t})=>(0,C.createElement)(jr,null,(0,C.createElement)(Zo.PanelRow,{className:t},e));$r.Slot=Wr;const Kr=$r,Zr="post-excerpt";function Yr(){const{isOpened:e,isEnabled:t}=(0,a.useSelect)((e=>{const{isEditorPanelOpened:t,isEditorPanelEnabled:n}=e(xo);return{isOpened:t(Zr),isEnabled:n(Zr)}}),[]),{toggleEditorPanelOpened:n}=(0,a.useDispatch)(xo);return t?(0,C.createElement)(Gr,null,(0,C.createElement)(Zo.PanelBody,{title:(0,d.__)("Excerpt"),opened:e,onToggle:()=>n(Zr)},(0,C.createElement)(Kr.Slot,null,(e=>(0,C.createElement)(C.Fragment,null,(0,C.createElement)(zr,null),e))))):null}const qr=window.wp.blob;const Qr=(0,a.withSelect)((e=>{const{getThemeSupports:t}=e(p.store),{getEditedPostAttribute:n}=e(xo);return{postType:n("type"),themeSupports:t()}}))((function({themeSupports:e,children:t,postType:n,supportKeys:o}){return(Array.isArray(o)?o:[o]).some((t=>{var o;const s=null!==(o=e?.[t])&&void 0!==o&&o;return"post-thumbnails"===t&&Array.isArray(s)?s.includes(n):s}))?t:null}));const Xr=function({children:e}){return(0,C.createElement)(Qr,{supportKeys:"post-thumbnails"},(0,C.createElement)(Zs,{supportKeys:"thumbnail"},e))},Jr=["image"],ei=(0,d.__)("Featured image"),ti=(0,d.__)("Set featured image"),ni=(0,C.createElement)("p",null,(0,d.__)("To edit the featured image, you need permission to upload media."));const oi=(0,a.withSelect)((e=>{const{getMedia:t,getPostType:n}=e(p.store),{getCurrentPostId:o,getEditedPostAttribute:s}=e(xo),r=s("featured_media");return{media:r?t(r,{context:"view"}):null,currentPostId:o(),postType:n(s("type")),featuredImageId:r}})),si=(0,a.withDispatch)(((e,{noticeOperations:t},{select:n})=>{const{editPost:o}=e(xo);return{onUpdateImage(e){o({featured_media:e.id})},onDropImage(e){n(m.store).getSettings().mediaUpload({allowedTypes:["image"],filesList:e,onFileChange([e]){o({featured_media:e.id})},onError(e){t.removeAllNotices(),t.createErrorNotice(e)}})},onRemoveImage(){o({featured_media:0})}}})),ri=(0,No.compose)(Zo.withNotices,oi,si,(0,Zo.withFilters)("editor.PostFeaturedImage"))((function({currentPostId:e,featuredImageId:t,onUpdateImage:n,onRemoveImage:o,media:s,postType:r,noticeUI:i,noticeOperations:l}){const c=(0,P.useRef)(),[u,p]=(0,P.useState)(!1),{getSettings:g}=(0,a.useSelect)(m.store),{mediaWidth:h,mediaHeight:_,mediaSourceUrl:f}=function(e,t){var n,o;if(!e)return{};const s=(0,an.applyFilters)("editor.PostFeaturedImage.imageSize","large",e.id,t);if(s in(null!==(n=e?.media_details?.sizes)&&void 0!==n?n:{}))return{mediaWidth:e.media_details.sizes[s].width,mediaHeight:e.media_details.sizes[s].height,mediaSourceUrl:e.media_details.sizes[s].source_url};const r=(0,an.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",e.id,t);return r in(null!==(o=e?.media_details?.sizes)&&void 0!==o?o:{})?{mediaWidth:e.media_details.sizes[r].width,mediaHeight:e.media_details.sizes[r].height,mediaSourceUrl:e.media_details.sizes[r].source_url}:{mediaWidth:e.media_details.width,mediaHeight:e.media_details.height,mediaSourceUrl:e.source_url}}(s,e);function E(e){g().mediaUpload({allowedTypes:Jr,filesList:e,onFileChange([e]){(0,qr.isBlobURL)(e?.url)?p(!0):(e&&n(e),p(!1))},onError(e){l.removeAllNotices(),l.createErrorNotice(e)}})}return(0,C.createElement)(Xr,null,i,(0,C.createElement)("div",{className:"editor-post-featured-image"},s&&(0,C.createElement)("div",{id:`editor-post-featured-image-${t}-describedby`,className:"hidden"},s.alt_text&&(0,d.sprintf)((0,d.__)("Current image: %s"),s.alt_text),!s.alt_text&&(0,d.sprintf)((0,d.__)("The current image has no alternative text. The file name is: %s"),s.media_details.sizes?.full?.file||s.slug)),(0,C.createElement)(m.MediaUploadCheck,{fallback:ni},(0,C.createElement)(m.MediaUpload,{title:r?.labels?.featured_image||ei,onSelect:n,unstableFeaturedImageFlow:!0,allowedTypes:Jr,modalClass:"editor-post-featured-image__media-modal",render:({open:e})=>(0,C.createElement)("div",{className:"editor-post-featured-image__container"},(0,C.createElement)(Zo.Button,{ref:c,className:t?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:e,"aria-label":t?(0,d.__)("Edit or replace the image"):null,"aria-describedby":t?`editor-post-featured-image-${t}-describedby`:null},!!t&&s&&(0,C.createElement)(Zo.ResponsiveWrapper,{naturalWidth:h,naturalHeight:_,isInline:!0},(0,C.createElement)("img",{src:f,alt:""})),u&&(0,C.createElement)(Zo.Spinner,null),!t&&!u&&(r?.labels?.set_featured_image||ti)),!!t&&(0,C.createElement)(Zo.__experimentalHStack,{className:"editor-post-featured-image__actions"},(0,C.createElement)(Zo.Button,{className:"editor-post-featured-image__action",onClick:e},(0,d.__)("Replace")),(0,C.createElement)(Zo.Button,{className:"editor-post-featured-image__action",onClick:()=>{o(),c.current.focus()}},(0,d.__)("Remove"))),(0,C.createElement)(Zo.DropZone,{onFilesDrop:E})),value:t}))))})),ii="featured-image";const ai=function(){var e;const{postType:t,isEnabled:n,isOpened:o}=(0,a.useSelect)((e=>{const{getEditedPostAttribute:t,isEditorPanelEnabled:n,isEditorPanelOpened:o}=e(xo),{getPostType:s}=e(p.store);return{postType:s(t("type")),isEnabled:n(ii),isOpened:o(ii)}}),[]),{toggleEditorPanelOpened:s}=(0,a.useDispatch)(xo);return n?(0,C.createElement)(Xr,null,(0,C.createElement)(Zo.PanelBody,{title:null!==(e=t?.labels?.featured_image)&&void 0!==e?e:(0,d.__)("Featured image"),opened:o,onToggle:()=>s(ii)},(0,C.createElement)(ri,null))):null};const li=function({children:e}){return(0,a.useSelect)((e=>e(xo).getEditorSettings().disablePostFormats),[])?null:(0,C.createElement)(Zs,{supportKeys:"post-formats"},e)},ci=[{id:"aside",caption:(0,d.__)("Aside")},{id:"audio",caption:(0,d.__)("Audio")},{id:"chat",caption:(0,d.__)("Chat")},{id:"gallery",caption:(0,d.__)("Gallery")},{id:"image",caption:(0,d.__)("Image")},{id:"link",caption:(0,d.__)("Link")},{id:"quote",caption:(0,d.__)("Quote")},{id:"standard",caption:(0,d.__)("Standard")},{id:"status",caption:(0,d.__)("Status")},{id:"video",caption:(0,d.__)("Video")}].sort(((e,t)=>{const n=e.caption.toUpperCase(),o=t.caption.toUpperCase();return n<o?-1:n>o?1:0}));function ui(){const e=`post-format-selector-${(0,No.useInstanceId)(ui)}`,{postFormat:t,suggestedFormat:n,supportedFormats:o}=(0,a.useSelect)((e=>{const{getEditedPostAttribute:t,getSuggestedPostFormat:n}=e(xo),o=t("format"),s=e(p.store).getThemeSupports();return{postFormat:null!=o?o:"standard",suggestedFormat:n(),supportedFormats:s.formats}}),[]),s=ci.filter((e=>o?.includes(e.id)||t===e.id)),r=s.find((e=>e.id===n)),{editPost:i}=(0,a.useDispatch)(xo),l=e=>i({format:e});return(0,C.createElement)(li,null,(0,C.createElement)("div",{className:"editor-post-format"},(0,C.createElement)(Zo.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Post Format"),value:t,onChange:e=>l(e),id:e,options:s.map((e=>({label:e.caption,value:e.id})))}),r&&r.id!==t&&(0,C.createElement)("p",{className:"editor-post-format__suggestion"},(0,C.createElement)(Zo.Button,{variant:"link",onClick:()=>l(r.id)},(0,d.sprintf)((0,d.__)("Apply suggested format: %s"),r.caption)))))}const di=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"}));const pi=function({children:e}){const{lastRevisionId:t,revisionsCount:n}=(0,a.useSelect)((e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:n}=e(xo);return{lastRevisionId:t(),revisionsCount:n()}}),[]);return!t||n<2?null:(0,C.createElement)(Zs,{supportKeys:"revisions"},e)};const mi=function(){const{lastRevisionId:e,revisionsCount:t}=(0,a.useSelect)((e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:n}=e(xo);return{lastRevisionId:t(),revisionsCount:n()}}),[]);return(0,C.createElement)(pi,null,(0,C.createElement)(Zo.Button,{href:(0,w.addQueryArgs)("revision.php",{revision:e}),className:"editor-post-last-revision__title",icon:di,iconPosition:"right",text:(0,d.sprintf)((0,d.__)("Revisions (%s)"),t)}))};const gi=function(){return(0,C.createElement)(pi,null,(0,C.createElement)(Zo.PanelBody,{className:"editor-post-last-revision__panel"},(0,C.createElement)(mi,null)))};function hi(){const e="core/editor/post-locked-modal-"+(0,No.useInstanceId)(hi),{autosave:t,updatePostLock:n}=(0,a.useDispatch)(xo),{isLocked:o,isTakeover:s,user:r,postId:i,postLockUtils:l,activePostLock:c,postType:u,previewLink:m}=(0,a.useSelect)((e=>{const{isPostLocked:t,isPostLockTakeover:n,getPostLockUser:o,getCurrentPostId:s,getActivePostLock:r,getEditedPostAttribute:i,getEditedPostPreviewLink:a,getEditorSettings:l}=e(xo),{getPostType:c}=e(p.store);return{isLocked:t(),isTakeover:n(),user:o(),postId:s(),postLockUtils:l().postLockUtils,activePostLock:r(),postType:c(i("type")),previewLink:a()}}),[]);if((0,P.useEffect)((()=>{function s(){if(o||!c)return;const e=new window.FormData;if(e.append("action","wp-remove-post-lock"),e.append("_wpnonce",l.unlockNonce),e.append("post_ID",i),e.append("active_post_lock",c),window.navigator.sendBeacon)window.navigator.sendBeacon(l.ajaxUrl,e);else{const t=new window.XMLHttpRequest;t.open("POST",l.ajaxUrl,!1),t.send(e)}}return(0,an.addAction)("heartbeat.send",e,(function(e){o||(e["wp-refresh-post-lock"]={lock:c,post_id:i})})),(0,an.addAction)("heartbeat.tick",e,(function(e){if(!e["wp-refresh-post-lock"])return;const o=e["wp-refresh-post-lock"];o.lock_error?(t(),n({isLocked:!0,isTakeover:!0,user:{name:o.lock_error.name,avatar:o.lock_error.avatar_src_2x}})):o.new_lock&&n({isLocked:!1,activePostLock:o.new_lock})})),window.addEventListener("beforeunload",s),()=>{(0,an.removeAction)("heartbeat.send",e),(0,an.removeAction)("heartbeat.tick",e),window.removeEventListener("beforeunload",s)}}),[]),!o)return null;const g=r.name,h=r.avatar,_=(0,w.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:i,action:"edit",_wpnonce:l.nonce}),f=(0,w.addQueryArgs)("edit.php",{post_type:u?.slug}),E=(0,d.__)("Exit editor");return(0,C.createElement)(Zo.Modal,{title:s?(0,d.__)("Someone else has taken over this post"):(0,d.__)("This post is already being edited"),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,size:"medium"},(0,C.createElement)(Zo.__experimentalHStack,{alignment:"top",spacing:6},!!h&&(0,C.createElement)("img",{src:h,alt:(0,d.__)("Avatar"),className:"editor-post-locked-modal__avatar",width:64,height:64}),(0,C.createElement)("div",null,!!s&&(0,C.createElement)("p",null,(0,P.createInterpolateElement)(g?(0,d.sprintf)((0,d.__)("<strong>%s</strong> now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved."),g):(0,d.__)("Another user now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved."),{strong:(0,C.createElement)("strong",null),PreviewLink:(0,C.createElement)(Zo.ExternalLink,{href:m},(0,d.__)("preview"))})),!s&&(0,C.createElement)(C.Fragment,null,(0,C.createElement)("p",null,(0,P.createInterpolateElement)(g?(0,d.sprintf)((0,d.__)("<strong>%s</strong> is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),g):(0,d.__)("Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),{strong:(0,C.createElement)("strong",null),PreviewLink:(0,C.createElement)(Zo.ExternalLink,{href:m},(0,d.__)("preview"))})),(0,C.createElement)("p",null,(0,d.__)("If you take over, the other user will lose editing control to the post, but their changes will be saved."))),(0,C.createElement)(Zo.__experimentalHStack,{className:"editor-post-locked-modal__buttons",justify:"flex-end"},!s&&(0,C.createElement)(Zo.Button,{variant:"tertiary",href:_},(0,d.__)("Take over")),(0,C.createElement)(Zo.Button,{variant:"primary",href:f},E)))))}const _i=function({children:e}){const{hasPublishAction:t,isPublished:n}=(0,a.useSelect)((e=>{var t;const{isCurrentPostPublished:n,getCurrentPost:o}=e(xo);return{hasPublishAction:null!==(t=o()._links?.["wp:action-publish"])&&void 0!==t&&t,isPublished:n()}}),[]);return n||!t?null:e};const fi=function(){const e=(0,a.useSelect)((e=>e(xo).getEditedPostAttribute("status")),[]),{editPost:t}=(0,a.useDispatch)(xo);return(0,C.createElement)(_i,null,(0,C.createElement)(Zo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Pending review"),checked:"pending"===e,onChange:()=>{t({status:"pending"===e?"draft":"pending"})}}))};function Ei({className:e,textContent:t,forceIsAutosaveable:n,role:o,onPreview:s}){const{postId:r,currentPostLink:i,previewLink:l,isSaveable:c,isViewable:u}=(0,a.useSelect)((e=>{var t;const n=e(xo),o=e(p.store).getPostType(n.getCurrentPostType("type"));return{postId:n.getCurrentPostId(),currentPostLink:n.getCurrentPostAttribute("link"),previewLink:n.getEditedPostPreviewLink(),isSaveable:n.isEditedPostSaveable(),isViewable:null!==(t=o?.viewable)&&void 0!==t&&t}}),[]),{__unstableSaveForPreview:m}=(0,a.useDispatch)(xo);if(!u)return null;const g=`wp-preview-${r}`,h=l||i;return(0,C.createElement)(Zo.Button,{variant:e?void 0:"tertiary",className:e||"editor-post-preview",href:h,target:g,disabled:!c,onClick:async e=>{e.preventDefault();const t=window.open("",g);t.focus(),function(e){let t=(0,P.renderToString)((0,C.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},(0,C.createElement)(Zo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},(0,C.createElement)(Zo.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),(0,C.createElement)(Zo.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})),(0,C.createElement)("p",null,(0,d.__)("Generating preview…"))));t+='\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\t\t}\n\t\t</style>\n\t',t=(0,an.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=(0,d.__)("Generating preview…"),e.close()}(t.document);const o=await m({forceIsAutosaveable:n});t.location=o,s?.()},role:o},t||(0,C.createElement)(C.Fragment,null,(0,d._x)("Preview","imperative verb"),(0,C.createElement)(Zo.VisuallyHidden,{as:"span"},(0,d.__)("(opens in a new tab)"))))}const bi=(0,No.compose)([(0,a.withSelect)((e=>{var t;const{isCurrentPostPublished:n,isEditedPostBeingScheduled:o,isSavingPost:s,isPublishingPost:r,getCurrentPost:i,getCurrentPostType:a,isAutosavingPost:l}=e(xo);return{isPublished:n(),isBeingScheduled:o(),isSaving:s(),isPublishing:r(),hasPublishAction:null!==(t=i()._links?.["wp:action-publish"])&&void 0!==t&&t,postType:a(),isAutosaving:l()}}))])((function({isPublished:e,isBeingScheduled:t,isSaving:n,isPublishing:o,hasPublishAction:s,isAutosaving:r,hasNonPostEntityChanges:i}){return o?(0,d.__)("Publishing…"):e&&n&&!r?(0,d.__)("Updating…"):t&&n&&!r?(0,d.__)("Scheduling…"):s?e?i?(0,d.__)("Update…"):(0,d.__)("Update"):t?i?(0,d.__)("Schedule…"):(0,d.__)("Schedule"):(0,d.__)("Publish"):i?(0,d.__)("Submit for Review…"):(0,d.__)("Submit for Review")})),vi=()=>{};class yi extends P.Component{constructor(e){super(e),this.buttonNode=(0,P.createRef)(),this.createOnClick=this.createOnClick.bind(this),this.closeEntitiesSavedStates=this.closeEntitiesSavedStates.bind(this),this.state={entitiesSavedStatesCallback:!1}}componentDidMount(){this.props.focusOnMount&&(this.timeoutID=setTimeout((()=>{this.buttonNode.current.focus()}),0))}componentWillUnmount(){clearTimeout(this.timeoutID)}createOnClick(e){return(...t)=>{const{hasNonPostEntityChanges:n,setEntitiesSavedStatesCallback:o}=this.props;return n&&o?(this.setState({entitiesSavedStatesCallback:()=>e(...t)}),o((()=>this.closeEntitiesSavedStates)),vi):e(...t)}}closeEntitiesSavedStates(e){const{postType:t,postId:n}=this.props,{entitiesSavedStatesCallback:o}=this.state;this.setState({entitiesSavedStatesCallback:!1},(()=>{e&&e.some((e=>"postType"===e.kind&&e.name===t&&e.key===n))&&o()}))}render(){const{forceIsDirty:e,hasPublishAction:t,isBeingScheduled:n,isOpen:o,isPostSavingLocked:s,isPublishable:r,isPublished:i,isSaveable:a,isSaving:l,isAutoSaving:c,isToggle:u,onSave:p,onStatusChange:m,onSubmit:g=vi,onToggle:h,visibility:_,hasNonPostEntityChanges:f,isSavingNonPostEntityChanges:E}=this.props,b=(l||!a||s||!r&&!e)&&(!f||E),v=(i||l||!a||!r&&!e)&&(!f||E);let y;y=t?"private"===_?"private":n?"future":"publish":"pending";const w={"aria-disabled":b,className:"editor-post-publish-button",isBusy:!c&&l,variant:"primary",onClick:this.createOnClick((()=>{b||(g(),m(y),p())}))},k={"aria-disabled":v,"aria-expanded":o,className:"editor-post-publish-panel__toggle",isBusy:l&&i,variant:"primary",size:"compact",onClick:this.createOnClick((()=>{v||h()}))},S=n?(0,d.__)("Schedule…"):(0,d.__)("Publish"),P=(0,C.createElement)(bi,{hasNonPostEntityChanges:f}),T=u?k:w,x=u?S:P;return(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.Button,{ref:this.buttonNode,...T,className:Ko()(T.className,"editor-post-publish-button__button",{"has-changes-dot":f})},x))}}const wi=(0,No.compose)([(0,a.withSelect)((e=>{var t;const{isSavingPost:n,isAutosavingPost:o,isEditedPostBeingScheduled:s,getEditedPostVisibility:r,isCurrentPostPublished:i,isEditedPostSaveable:a,isEditedPostPublishable:l,isPostSavingLocked:c,getCurrentPost:u,getCurrentPostType:d,getCurrentPostId:p,hasNonPostEntityChanges:m,isSavingNonPostEntityChanges:g}=e(xo);return{isSaving:n(),isAutoSaving:o(),isBeingScheduled:s(),visibility:r(),isSaveable:a(),isPostSavingLocked:c(),isPublishable:l(),isPublished:i(),hasPublishAction:null!==(t=u()._links?.["wp:action-publish"])&&void 0!==t&&t,postType:d(),postId:p(),hasNonPostEntityChanges:m(),isSavingNonPostEntityChanges:g()}})),(0,a.withDispatch)((e=>{const{editPost:t,savePost:n}=e(xo);return{onStatusChange:e=>t({status:e},{undoIgnore:!0}),onSave:n}}))])(yi),ki=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),Si=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,C.createElement)(T.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})),Pi={public:{label:(0,d.__)("Public"),info:(0,d.__)("Visible to everyone.")},private:{label:(0,d.__)("Private"),info:(0,d.__)("Only visible to site admins and editors.")},password:{label:(0,d.__)("Password protected"),info:(0,d.__)("Only those with the password can view this post.")}};function Ci({onClose:e}){const t=(0,No.useInstanceId)(Ci),{status:n,visibility:o,password:s}=(0,a.useSelect)((e=>({status:e(xo).getEditedPostAttribute("status"),visibility:e(xo).getEditedPostVisibility(),password:e(xo).getEditedPostAttribute("password")}))),{editPost:r,savePost:i}=(0,a.useDispatch)(xo),[l,c]=(0,P.useState)(!!s),[u,p]=(0,P.useState)(!1);return(0,C.createElement)("div",{className:"editor-post-visibility"},(0,C.createElement)(m.__experimentalInspectorPopoverHeader,{title:(0,d.__)("Visibility"),help:(0,d.__)("Control how this post is viewed."),onClose:e}),(0,C.createElement)("fieldset",{className:"editor-post-visibility__fieldset"},(0,C.createElement)(Zo.VisuallyHidden,{as:"legend"},(0,d.__)("Visibility")),(0,C.createElement)(Ti,{instanceId:t,value:"public",label:Pi.public.label,info:Pi.public.info,checked:"public"===o&&!l,onChange:()=>{r({status:"private"===o?"draft":n,password:""}),c(!1)}}),(0,C.createElement)(Ti,{instanceId:t,value:"private",label:Pi.private.label,info:Pi.private.info,checked:"private"===o,onChange:()=>{p(!0)}}),(0,C.createElement)(Ti,{instanceId:t,value:"password",label:Pi.password.label,info:Pi.password.info,checked:l,onChange:()=>{r({status:"private"===o?"draft":n,password:s||""}),c(!0)}}),l&&(0,C.createElement)("div",{className:"editor-post-visibility__password"},(0,C.createElement)(Zo.VisuallyHidden,{as:"label",htmlFor:`editor-post-visibility__password-input-${t}`},(0,d.__)("Create password")),(0,C.createElement)("input",{className:"editor-post-visibility__password-input",id:`editor-post-visibility__password-input-${t}`,type:"text",onChange:e=>{r({password:e.target.value})},value:s,placeholder:(0,d.__)("Use a secure password")}))),(0,C.createElement)(Zo.__experimentalConfirmDialog,{isOpen:u,onConfirm:()=>{r({status:"private",password:""}),c(!1),p(!1),i()},onCancel:()=>{p(!1)}},(0,d.__)("Would you like to privately publish this post now?")))}function Ti({instanceId:e,value:t,label:n,info:o,...s}){return(0,C.createElement)("div",{className:"editor-post-visibility__choice"},(0,C.createElement)("input",{type:"radio",name:`editor-post-visibility__setting-${e}`,value:t,id:`editor-post-${t}-${e}`,"aria-describedby":`editor-post-${t}-${e}-description`,className:"editor-post-visibility__radio",...s}),(0,C.createElement)("label",{htmlFor:`editor-post-${t}-${e}`,className:"editor-post-visibility__label"},n),(0,C.createElement)("p",{id:`editor-post-${t}-${e}-description`,className:"editor-post-visibility__info"},o))}function xi(){return Bi()}function Bi(){const e=(0,a.useSelect)((e=>e(xo).getEditedPostVisibility()));return Pi[e]?.label}function Ii(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Ni(e){return Ni="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ni(e)}function Di(e){Ii(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===Ni(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Ai(e){Ii(1,arguments);var t=Di(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Ri(e){Ii(1,arguments);var t=Di(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}Math.pow(10,8);var Oi=6e4,Li=36e5;function Mi(e,t){var n;Ii(1,arguments);var o=function(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}(null!==(n=null==t?void 0:t.additionalDigits)&&void 0!==n?n:2);if(2!==o&&1!==o&&0!==o)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var s,r=function(e){var t,n={},o=e.split(Fi.dateTimeDelimiter);if(o.length>2)return n;/:/.test(o[0])?t=o[0]:(n.date=o[0],t=o[1],Fi.timeZoneDelimiter.test(n.date)&&(n.date=e.split(Fi.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length)));if(t){var s=Fi.timezone.exec(t);s?(n.time=t.replace(s[1],""),n.timezone=s[1]):n.time=t}return n}(e);if(r.date){var i=function(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),o=e.match(n);if(!o)return{year:NaN,restDateString:""};var s=o[1]?parseInt(o[1]):null,r=o[2]?parseInt(o[2]):null;return{year:null===r?s:100*r,restDateString:e.slice((o[1]||o[2]).length)}}(r.date,o);s=function(e,t){if(null===t)return new Date(NaN);var n=e.match(Vi);if(!n)return new Date(NaN);var o=!!n[4],s=zi(n[1]),r=zi(n[2])-1,i=zi(n[3]),a=zi(n[4]),l=zi(n[5])-1;if(o)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,a,l)?function(e,t,n){var o=new Date(0);o.setUTCFullYear(e,0,4);var s=o.getUTCDay()||7,r=7*(t-1)+n+1-s;return o.setUTCDate(o.getUTCDate()+r),o}(t,a,l):new Date(NaN);var c=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(ji[t]||(Wi(e)?29:28))}(t,r,i)&&function(e,t){return t>=1&&t<=(Wi(e)?366:365)}(t,s)?(c.setUTCFullYear(t,r,Math.max(s,i)),c):new Date(NaN)}(i.restDateString,i.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);var a,l=s.getTime(),c=0;if(r.time&&(c=function(e){var t=e.match(Ui);if(!t)return NaN;var n=Gi(t[1]),o=Gi(t[2]),s=Gi(t[3]);if(!function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,o,s))return NaN;return n*Li+o*Oi+1e3*s}(r.time),isNaN(c)))return new Date(NaN);if(!r.timezone){var u=new Date(l+c),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return a=function(e){if("Z"===e)return 0;var t=e.match(Hi);if(!t)return 0;var n="+"===t[1]?-1:1,o=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,s))return NaN;return n*(o*Li+s*Oi)}(r.timezone),isNaN(a)?new Date(NaN):new Date(l+c+a)}var Fi={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Vi=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Ui=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Hi=/^([+-])(\d{2})(?::?(\d{2}))?$/;function zi(e){return e?parseInt(e):1}function Gi(e){return e&&parseFloat(e.replace(",","."))||0}var ji=[31,null,31,30,31,30,31,31,30,31,30,31];function Wi(e){return e%400==0||e%4==0&&e%100!=0}function $i({onClose:e}){const{postDate:t,postType:n}=(0,a.useSelect)((e=>({postDate:e(xo).getEditedPostAttribute("date"),postType:e(xo).getCurrentPostType()})),[]),{editPost:o}=(0,a.useDispatch)(xo),[s,r]=(0,P.useState)(Ai(new Date(t))),i=(0,a.useSelect)((e=>e(p.store).getEntityRecords("postType",n,{status:"publish,future",after:Ai(s).toISOString(),before:Ri(s).toISOString(),exclude:[e(xo).getCurrentPostId()],per_page:100,_fields:"id,date"})),[s,n]),l=(0,P.useMemo)((()=>(i||[]).map((({date:e})=>({date:new Date(e)})))),[i]),c=(0,y.getSettings)(),u=/a(?!\\)/i.test(c.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,C.createElement)(m.__experimentalPublishDateTimePicker,{currentDate:t,onChange:e=>o({date:e}),is12Hour:u,events:l,onMonthPreviewed:e=>r(Mi(e)),onClose:e})}function Ki(e){return Zi(e)}function Zi({full:e=!1}={}){const{date:t,isFloating:n}=(0,a.useSelect)((e=>({date:e(xo).getEditedPostAttribute("date"),isFloating:e(xo).isEditedPostDateFloating()})),[]);return e?Yi(t):function(e,{isFloating:t=!1,now:n=new Date}={}){if(!e||t)return(0,d.__)("Immediately");if(!function(e){const{timezone:t}=(0,y.getSettings)(),n=Number(t.offset),o=e.getTimezoneOffset()/60*-1;return n===o}(n))return Yi(e);const o=(0,y.getDate)(e);if(qi(o,n))return(0,d.sprintf)((0,d.__)("Today at %s"),(0,y.dateI18n)((0,d._x)("g:i a","post schedule time format"),o));const s=new Date(n);if(s.setDate(s.getDate()+1),qi(o,s))return(0,d.sprintf)((0,d.__)("Tomorrow at %s"),(0,y.dateI18n)((0,d._x)("g:i a","post schedule time format"),o));if(o.getFullYear()===n.getFullYear())return(0,y.dateI18n)((0,d._x)("F j g:i a","post schedule date format without year"),o);return(0,y.dateI18n)((0,d._x)("F j, Y g:i a","post schedule full date format"),o)}(t,{isFloating:n})}function Yi(e){const t=(0,y.getDate)(e),n=function(){const{timezone:e}=(0,y.getSettings)();if(e.abbr&&isNaN(Number(e.abbr)))return e.abbr;const t=e.offset<0?"":"+";return`UTC${t}${e.offsetFormatted}`}(),o=(0,y.dateI18n)((0,d._x)("F j, Y g:i a","post schedule full date format"),t);return(0,d.isRTL)()?`${n} ${o}`:`${o} ${n}`}function qi(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}const Qi=window.wp.a11y,Xi=3,Ji={per_page:10,orderby:"count",order:"desc",hide_empty:!0,_fields:"id,name,count",context:"view"};function ea({onSelect:e,taxonomy:t}){const{_terms:n,showTerms:o}=(0,a.useSelect)((e=>{const n=e(p.store).getEntityRecords("taxonomy",t.slug,Ji);return{_terms:n,showTerms:n?.length>=Xi}}),[t.slug]);if(!o)return null;const s=nr(n);return(0,C.createElement)("div",{className:"editor-post-taxonomies__flat-term-most-used"},(0,C.createElement)(Zo.BaseControl.VisualLabel,{as:"h3",className:"editor-post-taxonomies__flat-term-most-used-label"},t.labels.most_used),(0,C.createElement)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list"},s.map((t=>(0,C.createElement)("li",{key:t.id},(0,C.createElement)(Zo.Button,{variant:"link",onClick:()=>e(t)},t.name))))))}const ta=[],na=20,oa={per_page:na,_fields:"id,name",context:"view"},sa=(e,t)=>er(e).toLowerCase()===er(t).toLowerCase(),ra=(e,t)=>e.map((e=>t.find((t=>sa(t.name,e))).id));function ia({slug:e}){var t,n;const[o,s]=(0,P.useState)([]),[r,i]=(0,P.useState)(""),l=(0,No.useDebounce)(i,500),{terms:c,termIds:u,taxonomy:m,hasAssignAction:g,hasCreateAction:h,hasResolvedTerms:_}=(0,a.useSelect)((t=>{var n,o;const{getCurrentPost:s,getEditedPostAttribute:r}=t(xo),{getEntityRecords:i,getTaxonomy:a,hasFinishedResolution:l}=t(p.store),c=s(),u=a(e),d=u?r(u.rest_base):ta,m={...oa,include:d.join(","),per_page:-1};return{hasCreateAction:!!u&&(null!==(n=c._links?.["wp:action-create-"+u.rest_base])&&void 0!==n&&n),hasAssignAction:!!u&&(null!==(o=c._links?.["wp:action-assign-"+u.rest_base])&&void 0!==o&&o),taxonomy:u,termIds:d,terms:d.length?i("taxonomy",e,m):ta,hasResolvedTerms:l("getEntityRecords",["taxonomy",e,m])}}),[e]),{searchResults:f}=(0,a.useSelect)((t=>{const{getEntityRecords:n}=t(p.store);return{searchResults:r?n("taxonomy",e,{...oa,search:r}):ta}}),[r,e]);(0,P.useEffect)((()=>{if(_){const e=(null!=c?c:[]).map((e=>er(e.name)));s(e)}}),[c,_]);const E=(0,P.useMemo)((()=>(null!=f?f:[]).map((e=>er(e.name)))),[f]),{editPost:b}=(0,a.useDispatch)(xo),{saveEntityRecord:v}=(0,a.useDispatch)(p.store),{createErrorNotice:y}=(0,a.useDispatch)(rn.store);if(!g)return null;function w(e){b({[m.rest_base]:e})}const k=null!==(t=m?.labels?.add_new_item)&&void 0!==t?t:"post_tag"===e?(0,d.__)("Add new tag"):(0,d.__)("Add new Term"),S=null!==(n=m?.labels?.singular_name)&&void 0!==n?n:"post_tag"===e?(0,d.__)("Tag"):(0,d.__)("Term"),T=(0,d.sprintf)((0,d._x)("%s added","term"),S),x=(0,d.sprintf)((0,d._x)("%s removed","term"),S),B=(0,d.sprintf)((0,d._x)("Remove %s","term"),S);return(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.FormTokenField,{__next40pxDefaultSize:!0,value:o,suggestions:E,onChange:function(t){const n=[...null!=c?c:[],...null!=f?f:[]],o=t.reduce(((e,t)=>(e.some((e=>e.toLowerCase()===t.toLowerCase()))||e.push(t),e)),[]),r=o.filter((e=>!n.find((t=>sa(t.name,e)))));if(s(o),0===r.length)return w(ra(o,n));h&&Promise.all(r.map((t=>async function(t){try{const n=await v("taxonomy",e,t,{throwOnError:!0});return tr(n)}catch(e){if("term_exists"!==e.code)throw e;return{id:e.data.term_id,name:t.name}}}({name:t})))).then((e=>{const t=n.concat(e);return w(ra(o,t))})).catch((e=>{y(e.message,{type:"snackbar"})}))},onInputChange:l,maxSuggestions:na,label:k,messages:{added:T,removed:x,remove:B}}),(0,C.createElement)(ea,{taxonomy:m,onSelect:function(t){var n;if(u.includes(t.id))return;const o=[...u,t.id],s="post_tag"===e?(0,d.__)("Tag"):(0,d.__)("Term"),r=(0,d.sprintf)((0,d._x)("%s added","term"),null!==(n=m?.labels?.singular_name)&&void 0!==n?n:s);(0,Qi.speak)(r,"assertive"),w(o)}}))}const aa=(0,Zo.withFilters)("editor.PostTaxonomyType")(ia),la=()=>{const e=[(0,d.__)("Suggestion:"),(0,C.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,d.__)("Add tags"))];return(0,C.createElement)(Zo.PanelBody,{initialOpen:!1,title:e},(0,C.createElement)("p",null,(0,d.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),(0,C.createElement)(aa,{slug:"post_tag"}))},ca=()=>{const{hasTags:e,isPostTypeSupported:t}=(0,a.useSelect)((e=>{const t=e(xo).getCurrentPostType(),n=e(p.store).getTaxonomy("post_tag"),o=n?.types?.includes(t),s=void 0!==n,r=n&&e(xo).getEditedPostAttribute(n.rest_base);return{hasTags:!!r?.length,isPostTypeSupported:s&&o}}),[]),[n]=(0,P.useState)(e);return t?n?null:(0,C.createElement)(la,null):null},ua=(e,t)=>ci.filter((t=>e?.includes(t.id))).find((e=>e.id===t)),da=({suggestedPostFormat:e,suggestionText:t,onUpdatePostFormat:n})=>(0,C.createElement)(Zo.Button,{variant:"link",onClick:()=>n(e)},t);function pa(){const{currentPostFormat:e,suggestion:t}=(0,a.useSelect)((e=>{var t;const{getEditedPostAttribute:n,getSuggestedPostFormat:o}=e(xo),s=null!==(t=e(p.store).getThemeSupports().formats)&&void 0!==t?t:[];return{currentPostFormat:n("format"),suggestion:ua(s,o())}}),[]),{editPost:n}=(0,a.useDispatch)(xo),o=[(0,d.__)("Suggestion:"),(0,C.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,d.__)("Use a post format"))];return t&&t.id!==e?(0,C.createElement)(Zo.PanelBody,{initialOpen:!1,title:o},(0,C.createElement)("p",null,(0,d.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")),(0,C.createElement)("p",null,(0,C.createElement)(da,{onUpdatePostFormat:e=>n({format:e}),suggestedPostFormat:t.id,suggestionText:(0,d.sprintf)((0,d.__)('Apply the "%1$s" format.'),t.caption)}))):null}const ma={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view"},ga=8,ha=[];function _a({slug:e}){var t,n;const[o,s]=(0,P.useState)(!1),[r,i]=(0,P.useState)(""),[l,c]=(0,P.useState)(""),[u,m]=(0,P.useState)(!1),[g,h]=(0,P.useState)(""),[_,f]=(0,P.useState)([]),E=(0,No.useDebounce)(Qi.speak,500),{hasCreateAction:b,hasAssignAction:v,terms:y,loading:w,availableTerms:k,taxonomy:S}=(0,a.useSelect)((t=>{var n,o;const{getCurrentPost:s,getEditedPostAttribute:r}=t(xo),{getTaxonomy:i,getEntityRecords:a,isResolving:l}=t(p.store),c=i(e),u=s();return{hasCreateAction:!!c&&(null!==(n=u._links?.["wp:action-create-"+c.rest_base])&&void 0!==n&&n),hasAssignAction:!!c&&(null!==(o=u._links?.["wp:action-assign-"+c.rest_base])&&void 0!==o&&o),terms:c?r(c.rest_base):ha,loading:l("getEntityRecords",["taxonomy",e,ma]),availableTerms:a("taxonomy",e,ma)||ha,taxonomy:c}}),[e]),{editPost:T}=(0,a.useDispatch)(xo),{saveEntityRecord:x}=(0,a.useDispatch)(p.store),B=(0,P.useMemo)((()=>function(e,t){const n=e=>-1!==t.indexOf(e.id)||void 0!==e.children&&e.children.map(n).filter((e=>e)).length>0,o=[...e];return o.sort(((e,t)=>{const o=n(e),s=n(t);return o===s?0:o&&!s?-1:!o&&s?1:0})),o}(Js(k),y)),[k]),{createErrorNotice:I}=(0,a.useDispatch)(rn.store);if(!v)return null;const N=e=>{T({[S.rest_base]:e})},D=e=>e.map((e=>(0,C.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},(0,C.createElement)(Zo.CheckboxControl,{__nextHasNoMarginBottom:!0,checked:-1!==y.indexOf(e.id),onChange:()=>{(e=>{const t=y.includes(e)?y.filter((t=>t!==e)):[...y,e];N(t)})(parseInt(e.id,10))},label:(0,Cs.decodeEntities)(e.name)}),!!e.children.length&&(0,C.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices"},D(e.children))))),A=(t,n,o)=>{var s;return null!==(s=S?.labels?.[t])&&void 0!==s?s:"category"===e?n:o},R=A("add_new_item",(0,d.__)("Add new category"),(0,d.__)("Add new term")),O=A("new_item_name",(0,d.__)("Add new category"),(0,d.__)("Add new term")),L=A("parent_item",(0,d.__)("Parent Category"),(0,d.__)("Parent Term")),M=`— ${L} —`,F=R,V=null!==(t=S?.labels?.search_items)&&void 0!==t?t:(0,d.__)("Search Terms"),U=null!==(n=S?.name)&&void 0!==n?n:(0,d.__)("Terms"),H=k.length>=ga;return(0,C.createElement)(Zo.Flex,{direction:"column",gap:"4"},H&&(0,C.createElement)(Zo.TextControl,{__nextHasNoMarginBottom:!0,label:V,value:g,onChange:e=>{const t=B.map(function(e){const t=n=>{if(""===e)return n;const o={...n};return o.children.length>0&&(o.children=o.children.map(t).filter((e=>e))),(-1!==o.name.toLowerCase().indexOf(e.toLowerCase())||o.children.length>0)&&o};return t}(e)).filter((e=>e)),n=e=>{let t=0;for(let o=0;o<e.length;o++)t++,void 0!==e[o].children&&(t+=n(e[o].children));return t};h(e),f(t);const o=n(t),s=(0,d.sprintf)((0,d._n)("%d result found.","%d results found.",o),o);E(s,"assertive")}}),(0,C.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",tabIndex:"0",role:"group","aria-label":U},D(""!==g?_:B)),!w&&b&&(0,C.createElement)(Zo.FlexItem,null,(0,C.createElement)(Zo.Button,{onClick:()=>{m(!u)},className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":u,variant:"link"},R)),u&&(0,C.createElement)("form",{onSubmit:async t=>{var n;if(t.preventDefault(),""===r||o)return;const a=function(e,t,n){return e.find((e=>(!e.parent&&!t||parseInt(e.parent)===parseInt(t))&&e.name.toLowerCase()===n.toLowerCase()))}(k,l,r);if(a)return y.some((e=>e===a.id))||N([...y,a.id]),i(""),void c("");let u;s(!0);try{u=await(p={name:r,parent:l||void 0},x("taxonomy",e,p,{throwOnError:!0}))}catch(e){return void I(e.message,{type:"snackbar"})}var p;const m="category"===e?(0,d.__)("Category"):(0,d.__)("Term"),g=(0,d.sprintf)((0,d._x)("%s added","term"),null!==(n=S?.labels?.singular_name)&&void 0!==n?n:m);(0,Qi.speak)(g,"assertive"),s(!1),i(""),c(""),N([...y,u.id])}},(0,C.createElement)(Zo.Flex,{direction:"column",gap:"4"},(0,C.createElement)(Zo.TextControl,{__nextHasNoMarginBottom:!0,className:"editor-post-taxonomies__hierarchical-terms-input",label:O,value:r,onChange:e=>{i(e)},required:!0}),!!k.length&&(0,C.createElement)(Zo.TreeSelect,{__nextHasNoMarginBottom:!0,label:L,noOptionLabel:M,onChange:e=>{c(e)},selectedId:l,tree:B}),(0,C.createElement)(Zo.FlexItem,null,(0,C.createElement)(Zo.Button,{variant:"secondary",type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},F)))))}const fa=(0,Zo.withFilters)("editor.PostTaxonomyType")(_a);const Ea=function(){const e=(0,a.useSelect)((e=>{const t=e(xo).getCurrentPostType(),{canUser:n,getEntityRecord:o,getTaxonomy:s}=e(p.store),r=s("category"),i=n("read","settings")?o("root","site")?.default_category:void 0,a=i?o("taxonomy","category",i):void 0,l=r&&r.types.some((e=>e===t)),c=r&&e(xo).getEditedPostAttribute(r.rest_base);return!!r&&!!a&&l&&(0===c?.length||1===c?.length&&a?.id===c[0])}),[]),[t,n]=(0,P.useState)(!1);if((0,P.useEffect)((()=>{e&&n(!0)}),[e]),!t)return null;const o=[(0,d.__)("Suggestion:"),(0,C.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,d.__)("Assign a category"))];return(0,C.createElement)(Zo.PanelBody,{initialOpen:!1,title:o},(0,C.createElement)("p",null,(0,d.__)("Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.")),(0,C.createElement)(fa,{slug:"category"}))};function ba(e){const t=[];return e.forEach((e=>{t.push(e),t.push(...ba(e.innerBlocks))})),t}function va(e){const{selectBlock:t}=(0,a.useDispatch)(m.store);return(0,C.createElement)(Zo.__unstableMotion.img,{tabIndex:0,role:"button","aria-label":(0,d.__)("Select image block."),onClick:()=>{t(e.clientId)},onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(t(e.clientId),n.preventDefault())},key:e.clientId,alt:e.attributes.alt,src:e.attributes.url,animate:{opacity:1},exit:{opacity:0,scale:0},style:{width:"36px",height:"36px",objectFit:"cover",borderRadius:"2px",cursor:"pointer"},whileHover:{scale:1.08}})}function ya(){const[e,t]=(0,P.useState)(!1),{editorBlocks:n,mediaUpload:o}=(0,a.useSelect)((e=>({editorBlocks:e(xo).getEditorBlocks(),mediaUpload:e(m.store).getSettings().mediaUpload})),[]),s=ba(n).filter((e=>"core/image"===e.name&&e.attributes.url&&!e.attributes.id)),{updateBlockAttributes:r}=(0,a.useDispatch)(m.store);if(!o||!s.length)return null;const i=[(0,d.__)("Suggestion:"),(0,C.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,d.__)("External media"))];return(0,C.createElement)(Zo.PanelBody,{initialOpen:!0,title:i},(0,C.createElement)("p",null,(0,d.__)("Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.")),(0,C.createElement)("div",{style:{display:"inline-flex",flexWrap:"wrap",gap:"8px"}},(0,C.createElement)(Zo.__unstableAnimatePresence,null,s.map((e=>(0,C.createElement)(va,{key:e.clientId,...e})))),e?(0,C.createElement)(Zo.Spinner,null):(0,C.createElement)(Zo.Button,{variant:"primary",onClick:function(){t(!0),Promise.all(s.map((e=>window.fetch(e.attributes.url.includes("?")?e.attributes.url:e.attributes.url+"?").then((e=>e.blob())).then((t=>new Promise(((n,s)=>{o({filesList:[t],onFileChange:([t])=>{(0,qr.isBlobURL)(t.url)||(r(e.clientId,{id:t.id,url:t.url}),n())},onError(){s()}})}))))))).finally((()=>{t(!1)}))}},(0,d.__)("Upload"))))}const wa=function({children:e}){const{isBeingScheduled:t,isRequestingSiteIcon:n,hasPublishAction:o,siteIconUrl:s,siteTitle:r,siteHome:i}=(0,a.useSelect)((e=>{var t;const{getCurrentPost:n,isEditedPostBeingScheduled:o}=e(xo),{getEntityRecord:s,isResolving:r}=e(p.store),i=s("root","__unstableBase",void 0)||{};return{hasPublishAction:null!==(t=n()._links?.["wp:action-publish"])&&void 0!==t&&t,isBeingScheduled:o(),isRequestingSiteIcon:r("getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:i.site_icon_url,siteTitle:i.name,siteHome:i.home&&(0,w.filterURLForDisplay)(i.home)}}),[]);let l,c,u=(0,C.createElement)(Zo.Icon,{className:"components-site-icon",size:"36px",icon:Si});return s&&(u=(0,C.createElement)("img",{alt:(0,d.__)("Site Icon"),className:"components-site-icon",src:s})),n&&(u=null),o?t?(l=(0,d.__)("Are you ready to schedule?"),c=(0,d.__)("Your work will be published at the specified date and time.")):(l=(0,d.__)("Are you ready to publish?"),c=(0,d.__)("Double-check your settings before publishing.")):(l=(0,d.__)("Are you ready to submit for review?"),c=(0,d.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),(0,C.createElement)("div",{className:"editor-post-publish-panel__prepublish"},(0,C.createElement)("div",null,(0,C.createElement)("strong",null,l)),(0,C.createElement)("p",null,c),(0,C.createElement)("div",{className:"components-site-card"},u,(0,C.createElement)("div",{className:"components-site-info"},(0,C.createElement)("span",{className:"components-site-name"},(0,Cs.decodeEntities)(r)||(0,d.__)("(Untitled)")),(0,C.createElement)("span",{className:"components-site-home"},i))),(0,C.createElement)(ya,null),o&&(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.PanelBody,{initialOpen:!1,title:[(0,d.__)("Visibility:"),(0,C.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,C.createElement)(xi,null))]},(0,C.createElement)(Ci,null)),(0,C.createElement)(Zo.PanelBody,{initialOpen:!1,title:[(0,d.__)("Publish:"),(0,C.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,C.createElement)(Ki,null))]},(0,C.createElement)($i,null))),(0,C.createElement)(pa,null),(0,C.createElement)(ca,null),(0,C.createElement)(Ea,null),e)},ka="%postname%",Sa="%pagename%";function Pa({text:e,onCopy:t,children:n}){const o=(0,No.useCopyToClipboard)(e,t);return(0,C.createElement)(Zo.Button,{variant:"secondary",ref:o},n)}class Ca extends P.Component{constructor(){super(...arguments),this.state={showCopyConfirmation:!1},this.onCopy=this.onCopy.bind(this),this.onSelectInput=this.onSelectInput.bind(this),this.postLink=(0,P.createRef)()}componentDidMount(){this.props.focusOnMount&&this.postLink.current.focus()}componentWillUnmount(){clearTimeout(this.dismissCopyConfirmation)}onCopy(){this.setState({showCopyConfirmation:!0}),clearTimeout(this.dismissCopyConfirmation),this.dismissCopyConfirmation=setTimeout((()=>{this.setState({showCopyConfirmation:!1})}),4e3)}onSelectInput(e){e.target.select()}render(){const{children:e,isScheduled:t,post:n,postType:o}=this.props,s=o?.labels?.singular_name,r=o?.labels?.view_item,i=o?.labels?.add_new_item,a="future"===n.status?(e=>{const{slug:t}=e;return e.permalink_template.includes(ka)?e.permalink_template.replace(ka,t):e.permalink_template.includes(Sa)?e.permalink_template.replace(Sa,t):e.permalink_template})(n):n.link,l=(0,w.addQueryArgs)("post-new.php",{post_type:n.type}),c=t?(0,C.createElement)(C.Fragment,null,(0,d.__)("is now scheduled. It will go live on")," ",(0,C.createElement)(Ki,null),"."):(0,d.__)("is now live.");return(0,C.createElement)("div",{className:"post-publish-panel__postpublish"},(0,C.createElement)(Zo.PanelBody,{className:"post-publish-panel__postpublish-header"},(0,C.createElement)("a",{ref:this.postLink,href:a},(0,Cs.decodeEntities)(n.title)||(0,d.__)("(no title)"))," ",c),(0,C.createElement)(Zo.PanelBody,null,(0,C.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},(0,C.createElement)("strong",null,(0,d.__)("What’s next?"))),(0,C.createElement)("div",{className:"post-publish-panel__postpublish-post-address-container"},(0,C.createElement)(Zo.TextControl,{__nextHasNoMarginBottom:!0,className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:(0,d.sprintf)((0,d.__)("%s address"),s),value:(0,w.safeDecodeURIComponent)(a),onFocus:this.onSelectInput}),(0,C.createElement)("div",{className:"post-publish-panel__postpublish-post-address__copy-button-wrap"},(0,C.createElement)(Pa,{text:a,onCopy:this.onCopy},this.state.showCopyConfirmation?(0,d.__)("Copied!"):(0,d.__)("Copy")))),(0,C.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!t&&(0,C.createElement)(Zo.Button,{variant:"primary",href:a},r),(0,C.createElement)(Zo.Button,{variant:t?"primary":"secondary",href:l},i))),e)}}const Ta=(0,a.withSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPost:n,isCurrentPostScheduled:o}=e(xo),{getPostType:s}=e(p.store);return{post:n(),postType:s(t("type")),isScheduled:o()}}))(Ca);class xa extends P.Component{constructor(){super(...arguments),this.onSubmit=this.onSubmit.bind(this)}componentDidUpdate(e){e.isPublished&&!this.props.isSaving&&this.props.isDirty&&this.props.onClose()}onSubmit(){const{onClose:e,hasPublishAction:t,isPostTypeViewable:n}=this.props;t&&n||e()}render(){const{forceIsDirty:e,isBeingScheduled:t,isPublished:n,isPublishSidebarEnabled:o,isScheduled:s,isSaving:r,isSavingNonPostEntityChanges:i,onClose:a,onTogglePublishSidebar:l,PostPublishExtension:c,PrePublishExtension:u,...p}=this.props,{hasPublishAction:m,isDirty:g,isPostTypeViewable:h,..._}=p,f=n||s&&t,E=!f&&!r,b=f&&!r;return(0,C.createElement)("div",{className:"editor-post-publish-panel",..._},(0,C.createElement)("div",{className:"editor-post-publish-panel__header"},b?(0,C.createElement)(Zo.Button,{onClick:a,icon:ki,label:(0,d.__)("Close panel")}):(0,C.createElement)(C.Fragment,null,(0,C.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},(0,C.createElement)(wi,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:e})),(0,C.createElement)("div",{className:"editor-post-publish-panel__header-cancel-button"},(0,C.createElement)(Zo.Button,{disabled:i,onClick:a,variant:"secondary"},(0,d.__)("Cancel"))))),(0,C.createElement)("div",{className:"editor-post-publish-panel__content"},E&&(0,C.createElement)(wa,null,u&&(0,C.createElement)(u,null)),b&&(0,C.createElement)(Ta,{focusOnMount:!0},c&&(0,C.createElement)(c,null)),r&&(0,C.createElement)(Zo.Spinner,null)),(0,C.createElement)("div",{className:"editor-post-publish-panel__footer"},(0,C.createElement)(Zo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Always show pre-publish checks."),checked:o,onChange:l})))}}const Ba=(0,No.compose)([(0,a.withSelect)((e=>{var t;const{getPostType:n}=e(p.store),{getCurrentPost:o,getEditedPostAttribute:s,isCurrentPostPublished:r,isCurrentPostScheduled:i,isEditedPostBeingScheduled:a,isEditedPostDirty:l,isAutosavingPost:c,isSavingPost:u,isSavingNonPostEntityChanges:d}=e(xo),{isPublishSidebarEnabled:m}=e(xo),g=n(s("type"));return{hasPublishAction:null!==(t=o()._links?.["wp:action-publish"])&&void 0!==t&&t,isPostTypeViewable:g?.viewable,isBeingScheduled:a(),isDirty:l(),isPublished:r(),isPublishSidebarEnabled:m(),isSaving:u()&&!c(),isSavingNonPostEntityChanges:d(),isScheduled:i()}})),(0,a.withDispatch)(((e,{isPublishSidebarEnabled:t})=>{const{disablePublishSidebar:n,enablePublishSidebar:o}=e(xo);return{onTogglePublishSidebar:()=>{t?n():o()}}})),Zo.withFocusReturn,Zo.withConstrainedTabbing])(xa),Ia=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-4v-2.4L14 14l1-1-3-3-3 3 1 1 1.2-1.2v2.4H7.7c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4H9l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8 0 1-.8 1.8-1.7 1.8z"}));const Na=(0,P.forwardRef)((function({icon:e,size:t=24,...n},o){return(0,P.cloneElement)(e,{width:t,height:t,...n,ref:o})})),Da=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z"}));function Aa({forceIsDirty:e}){const[t,n]=(0,P.useState)(!1),o=(0,No.useViewportMatch)("small"),{isAutosaving:s,isDirty:r,isNew:i,isPending:l,isPublished:c,isSaveable:u,isSaving:p,isScheduled:m,hasPublishAction:g,showIconLabels:h}=(0,a.useSelect)((t=>{var n;const{isEditedPostNew:o,isCurrentPostPublished:s,isCurrentPostScheduled:r,isEditedPostDirty:i,isSavingPost:a,isEditedPostSaveable:l,getCurrentPost:c,isAutosavingPost:u,getEditedPostAttribute:d}=t(xo),{get:p}=t(B.store);return{isAutosaving:u(),isDirty:e||i(),isNew:o(),isPending:"pending"===d("status"),isPublished:s(),isSaving:a(),isSaveable:l(),isScheduled:r(),hasPublishAction:null!==(n=c()?._links?.["wp:action-publish"])&&void 0!==n&&n,showIconLabels:p("core","showIconLabels")}}),[e]),{savePost:_}=(0,a.useDispatch)(xo),f=(0,No.usePrevious)(p);if((0,P.useEffect)((()=>{let e;return f&&!p&&(n(!0),e=setTimeout((()=>{n(!1)}),1e3)),()=>clearTimeout(e)}),[p]),!g&&l)return null;if(c||m)return null;const E=l?(0,d.__)("Save as pending"):(0,d.__)("Save draft"),b=(0,d.__)("Save"),v=t||!i&&!r,y=p||v,w=p||v||!u;let k;return p?k=s?(0,d.__)("Autosaving"):(0,d.__)("Saving"):v?k=(0,d.__)("Saved"):o?k=E:h&&(k=b),(0,C.createElement)(Zo.Button,{className:u||p?Ko()({"editor-post-save-draft":!y,"editor-post-saved-state":y,"is-saving":p,"is-autosaving":s,"is-saved":v,[(0,Zo.__unstableGetAnimateClassName)({type:"loading"})]:p}):void 0,onClick:w?void 0:()=>_(),shortcut:w?void 0:es.displayShortcut.primary("s"),variant:"tertiary",size:"compact",icon:o?void 0:Ia,label:k||E,"aria-disabled":w},y&&(0,C.createElement)(Na,{icon:v?vr:Da}),k)}function Ra({children:e}){return(0,a.useSelect)((e=>{var t;return null!==(t=e(xo).getCurrentPost()._links?.["wp:action-publish"])&&void 0!==t&&t}),[])?e:null}function Oa(){const[e,t]=(0,P.useState)(null),n=(0,P.useMemo)((()=>({anchor:e,"aria-label":(0,d.__)("Change publish date"),placement:"bottom-end"})),[e]),o=Zi(),s=Zi({full:!0});return(0,C.createElement)(Ra,null,(0,C.createElement)(xr,{label:(0,d.__)("Publish"),ref:t},(0,C.createElement)(Zo.Dropdown,{popoverProps:n,focusOnMount:!0,className:"editor-post-schedule__panel-dropdown",contentClassName:"editor-post-schedule__dialog",renderToggle:({onToggle:e,isOpen:t})=>(0,C.createElement)(Zo.Button,{__next40pxDefaultSize:!0,className:"editor-post-schedule__dialog-toggle",variant:"tertiary",onClick:e,"aria-label":(0,d.sprintf)((0,d.__)("Change date: %s"),o),label:s,showTooltip:o!==s,"aria-expanded":t},o),renderContent:({onClose:e})=>(0,C.createElement)($i,{onClose:e})})))}function La({children:e}){return(0,C.createElement)(Zs,{supportKeys:"slug"},e)}class Ma extends P.Component{constructor({postSlug:e,postTitle:t,postID:n}){super(...arguments),this.state={editedSlug:(0,w.safeDecodeURIComponent)(e)||(0,w.cleanForSlug)(t)||n},this.setSlug=this.setSlug.bind(this)}setSlug(e){const{postSlug:t,onUpdateSlug:n}=this.props,{value:o}=e.target,s=(0,w.cleanForSlug)(o);s!==t&&n(s)}render(){const{editedSlug:e}=this.state;return(0,C.createElement)(La,null,(0,C.createElement)(Zo.TextControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Slug"),autoComplete:"off",spellCheck:"false",value:e,onChange:e=>this.setState({editedSlug:e}),onBlur:this.setSlug,className:"editor-post-slug"}))}}const Fa=(0,No.compose)([(0,a.withSelect)((e=>{const{getCurrentPost:t,getEditedPostAttribute:n}=e(xo),{id:o}=t();return{postSlug:n("slug"),postTitle:n("title"),postID:o}})),(0,a.withDispatch)((e=>{const{editPost:t}=e(xo);return{onUpdateSlug(e){t({slug:e})}}}))])(Ma);function Va({children:e}){const{hasStickyAction:t,postType:n}=(0,a.useSelect)((e=>{var t;const n=e(xo).getCurrentPost();return{hasStickyAction:null!==(t=n._links?.["wp:action-sticky"])&&void 0!==t&&t,postType:e(xo).getCurrentPostType()}}),[]);return"post"===n&&t?e:null}function Ua(){const e=(0,a.useSelect)((e=>{var t;return null!==(t=e(xo).getEditedPostAttribute("sticky"))&&void 0!==t&&t}),[]),{editPost:t}=(0,a.useDispatch)(xo);return(0,C.createElement)(Va,null,(0,C.createElement)(Zo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Stick to the top of the blog"),checked:e,onChange:()=>t({sticky:!e})}))}function Ha(){const[e,t]=(0,P.useState)(!1),{editPost:n,savePost:o}=(0,a.useDispatch)(xo),{isSaving:s,isPublished:r,isScheduled:i}=(0,a.useSelect)((e=>{const{isSavingPost:t,isCurrentPostPublished:n,isCurrentPostScheduled:o}=e(xo);return{isSaving:t(),isPublished:n(),isScheduled:o()}}),[]),l=s||!r&&!i;let c;r?c=(0,d.__)("Are you sure you want to unpublish this post?"):i&&(c=(0,d.__)("Are you sure you want to unschedule this post?"));return(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.Button,{__next40pxDefaultSize:!0,className:"editor-post-switch-to-draft",onClick:()=>{l||t(!0)},"aria-disabled":l,variant:"secondary",style:{flexGrow:"1",justifyContent:"center"}},(0,d.__)("Switch to draft")),(0,C.createElement)(Zo.__experimentalConfirmDialog,{isOpen:e,onConfirm:()=>{t(!1),n({status:"draft"}),o()},onCancel:()=>t(!1)},c))}function za(){const{syncStatus:e,postType:t}=(0,a.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xo),n=t("meta");return{syncStatus:"unsynced"===n?.wp_pattern_sync_status?"unsynced":t("wp_pattern_sync_status"),postType:t("type")}}));return"wp_block"!==t?null:(0,C.createElement)(xr,{label:(0,d.__)("Sync status")},(0,C.createElement)("div",{className:"editor-post-sync-status__value"},"unsynced"===e?(0,d._x)("Not synced","Text that indicates that the pattern is not synchronized"):(0,d._x)("Synced","Text that indicates that the pattern is synchronized")))}const Ga=e=>e;const ja=function({taxonomyWrapper:e=Ga}){const{postType:t,taxonomies:n}=(0,a.useSelect)((e=>({postType:e(xo).getCurrentPostType(),taxonomies:e(p.store).getTaxonomies({per_page:-1})})),[]);return(null!=n?n:[]).filter((e=>e.types.includes(t)&&e.visibility?.show_ui)).map((t=>{const n=t.hierarchical?fa:aa;return(0,C.createElement)(P.Fragment,{key:`taxonomy-${t.slug}`},e((0,C.createElement)(n,{slug:t.slug}),t))}))};function Wa({children:e}){const t=(0,a.useSelect)((e=>{const t=e(xo).getCurrentPostType(),n=e(p.store).getTaxonomies({per_page:-1});return n?.some((e=>e.types.includes(t)))}),[]);return t?e:null}function $a({taxonomy:e,children:t}){const n=e?.slug,o=n?`taxonomy-panel-${n}`:"",{isEnabled:s,isOpened:r}=(0,a.useSelect)((e=>{const{isEditorPanelEnabled:t,isEditorPanelOpened:s}=e(xo);return{isEnabled:!!n&&t(o),isOpened:!!n&&s(o)}}),[o,n]),{toggleEditorPanelOpened:i}=(0,a.useDispatch)(xo);if(!s)return null;const l=e?.labels?.menu_name;return l?(0,C.createElement)(Zo.PanelBody,{title:l,opened:r,onToggle:()=>i(o)},t):null}const Ka=function(){return(0,C.createElement)(Wa,null,(0,C.createElement)(ja,{taxonomyWrapper:(e,t)=>(0,C.createElement)($a,{taxonomy:t},e)}))};var Za=n(4132);function Ya(){const e=(0,No.useInstanceId)(Ya),{content:t,blocks:n,type:o,id:s}=(0,a.useSelect)((e=>{const{getEditedEntityRecord:t}=e(p.store),{getCurrentPostType:n,getCurrentPostId:o}=e(xo),s=n(),r=o(),i=t("postType",s,r);return{content:i?.content,blocks:i?.blocks,type:s,id:r}}),[]),{editEntityRecord:r}=(0,a.useDispatch)(p.store),l=(0,P.useMemo)((()=>t instanceof Function?t({blocks:n}):n?(0,i.__unstableSerializeAndClean)(n):t),[t,n]);return(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.VisuallyHidden,{as:"label",htmlFor:`post-content-${e}`},(0,d.__)("Type text or HTML")),(0,C.createElement)(Za.A,{autoComplete:"off",dir:"auto",value:l,onChange:e=>{r("postType",o,s,{content:e.target.value,blocks:void 0,selection:void 0})},className:"editor-post-text-editor",id:`post-content-${e}`,placeholder:(0,d.__)("Start writing with text or HTML")}))}const qa=window.wp.dom,Qa="wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text",Xa=/[\r\n]+/g;function Ja(e){const t=(0,P.useRef)(),{isCleanNewPost:n}=(0,a.useSelect)((e=>{const{isCleanNewPost:t}=e(xo);return{isCleanNewPost:t()}}),[]);return(0,P.useImperativeHandle)(e,(()=>({focus:()=>{t?.current?.focus()}}))),(0,P.useEffect)((()=>{if(!t.current)return;const{defaultView:e}=t.current.ownerDocument,{name:o,parent:s}=e,r="editor-canvas"===o?s.document:e.document,{activeElement:i,body:a}=r;!n||i&&a!==i||t.current.focus()}),[n]),{ref:t}}function el(){const{editPost:e}=(0,a.useDispatch)(xo),{title:t}=(0,a.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xo);return{title:t("title")}}),[]);return{title:t,setTitle:function(t){e({title:t})}}}const tl=(0,P.forwardRef)((function(e,t){const{placeholder:n,hasFixedToolbar:o}=(0,a.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xo),{getSettings:n}=e(m.store),{titlePlaceholder:o,hasFixedToolbar:s}=n();return{title:t("title"),placeholder:o,hasFixedToolbar:s}}),[]),[s,r]=(0,P.useState)(!1),{ref:l}=Ja(t),{title:c,setTitle:u}=el(),[p,g]=(0,P.useState)({}),{clearSelectedBlock:h,insertBlocks:_,insertDefaultBlock:f}=(0,a.useDispatch)(m.store);function E(e){_(e,0)}function b(){r(!1),g({})}const v=(0,Cs.decodeEntities)(n)||(0,d.__)("Add title"),{ref:y}=(0,is.__unstableUseRichText)({value:c,onChange:function(e){u(e.replace(Xa," "))},placeholder:v,selectionStart:p.start,selectionEnd:p.end,onSelectionChange(e,t){g((n=>{const{start:o,end:s}=n;return o===e&&s===t?n:{start:e,end:t}}))},__unstableDisableFormats:!1}),w=Ko()(Qa,{"is-selected":s,"has-fixed-toolbar":o});return(0,C.createElement)(Zs,{supportKeys:"title"},(0,C.createElement)("h1",{ref:(0,No.useMergeRefs)([y,l]),contentEditable:!0,className:w,"aria-label":v,role:"textbox","aria-multiline":"true",onFocus:function(){r(!0),h()},onBlur:b,onKeyDown:function(e){e.keyCode===es.ENTER&&(e.preventDefault(),f(void 0,void 0,0))},onKeyPress:b,onPaste:function(e){const t=e.clipboardData;let n="",o="";try{n=t.getData("text/plain"),o=t.getData("text/html")}catch(e){try{o=t.getData("Text")}catch(e){return}}window.console.log("Received HTML:\n\n",o),window.console.log("Received plain text:\n\n",n);const s=(0,i.pasteHandler)({HTML:o,plainText:n});if(e.preventDefault(),s.length)if("string"!=typeof s){const[e]=s;if(c||"core/heading"!==e.name&&"core/paragraph"!==e.name)E(s);else{const t=(0,qa.__unstableStripHTML)(e.attributes.content);u(t),E(s.slice(1))}}else{const e={...(0,is.create)({html:c}),...p},t=(0,qa.__unstableStripHTML)(s),n=(0,is.insert)(e,(0,is.create)({html:t}));u((0,is.toHTMLString)({value:n})),g({start:n.start,end:n.end})}}}))}));const nl=(0,P.forwardRef)((function(e,t){const{placeholder:n,hasFixedToolbar:o}=(0,a.useSelect)((e=>{const{getSettings:t}=e(m.store),{titlePlaceholder:n,hasFixedToolbar:o}=t();return{placeholder:n,hasFixedToolbar:o}}),[]),[s,r]=(0,P.useState)(!1),{title:i,setTitle:l}=el(),{ref:c}=Ja(t),u=Ko()(Qa,{"is-selected":s,"has-fixed-toolbar":o,"is-raw-text":!0}),p=(0,Cs.decodeEntities)(n)||(0,d.__)("Add title");return(0,C.createElement)(Zo.TextareaControl,{ref:c,value:i,onChange:function(e){l(e.replace(Xa," "))},onFocus:function(){r(!0)},onBlur:function(){r(!1)},label:n,className:u,placeholder:p,hideLabelFromVision:!0,autoComplete:"off",dir:"auto",rows:1,__nextHasNoMarginBottom:!0})}));function ol(){const{isNew:e,isDeleting:t,postId:n}=(0,a.useSelect)((e=>{const t=e(xo);return{isNew:t.isEditedPostNew(),isDeleting:t.isDeletingPost(),postId:t.getCurrentPostId()}}),[]),{trashPost:o}=(0,a.useDispatch)(xo),[s,r]=(0,P.useState)(!1);if(e||!n)return null;return(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.Button,{__next40pxDefaultSize:!0,className:"editor-post-trash",isDestructive:!0,variant:"secondary",isBusy:t,"aria-disabled":t,onClick:t?void 0:()=>r(!0)},(0,d.__)("Move to trash")),(0,C.createElement)(Zo.__experimentalConfirmDialog,{isOpen:s,onConfirm:()=>{r(!1),o()},onCancel:()=>r(!1)},(0,d.__)("Are you sure you want to move this post to the trash?")))}const sl=(0,a.withSelect)((e=>{const{isEditedPostNew:t,getCurrentPostId:n,getCurrentPostType:o}=e(xo),{getPostType:s,canUser:r}=e(p.store),i=n(),a=s(o()),l=a?.rest_base||"";return{isNew:t(),postId:i,canUserDelete:!(!i||!l)&&r("delete",l,i)}}))((function({isNew:e,postId:t,canUserDelete:n,children:o}){return!e&&t&&n?o:null}));function rl({onClose:e}){const{isEditable:t,postSlug:n,viewPostLabel:o,postLink:s,permalinkPrefix:r,permalinkSuffix:i}=(0,a.useSelect)((e=>{var t;const n=e(xo).getCurrentPost(),o=e(xo).getCurrentPostType(),s=e(p.store).getPostType(o),r=e(xo).getPermalinkParts(),i=null!==(t=n?._links?.["wp:action-publish"])&&void 0!==t&&t;return{isEditable:e(xo).isPermalinkEditable()&&i,postSlug:(0,w.safeDecodeURIComponent)(e(xo).getEditedPostSlug()),viewPostLabel:s?.labels.view_item,postLink:n.link,permalinkPrefix:r?.prefix,permalinkSuffix:r?.suffix}}),[]),{editPost:l}=(0,a.useDispatch)(xo),[c,u]=(0,P.useState)(!1);return(0,C.createElement)("div",{className:"editor-post-url"},(0,C.createElement)(m.__experimentalInspectorPopoverHeader,{title:(0,d.__)("URL"),onClose:e}),t&&(0,C.createElement)(Zo.TextControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Permalink"),value:c?"":n,autoComplete:"off",spellCheck:"false",help:(0,C.createElement)(C.Fragment,null,(0,d.__)("The last part of the URL.")," ",(0,C.createElement)(Zo.ExternalLink,{href:(0,d.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink")},(0,d.__)("Learn more."))),onChange:e=>{l({slug:e}),e?c&&u(!1):c||u(!0)},onBlur:e=>{l({slug:(0,w.cleanForSlug)(e.target.value)}),c&&u(!1)}}),t&&(0,C.createElement)("h3",{className:"editor-post-url__link-label"},null!=o?o:(0,d.__)("View post")),(0,C.createElement)("p",null,(0,C.createElement)(Zo.ExternalLink,{className:"editor-post-url__link",href:s,target:"_blank"},t?(0,C.createElement)(C.Fragment,null,(0,C.createElement)("span",{className:"editor-post-url__link-prefix"},r),(0,C.createElement)("span",{className:"editor-post-url__link-slug"},n),(0,C.createElement)("span",{className:"editor-post-url__link-suffix"},i)):s)))}function il({children:e}){const t=(0,a.useSelect)((e=>{const t=e(xo).getCurrentPostType(),n=e(p.store).getPostType(t);if(!n?.viewable)return!1;if(!e(xo).getCurrentPost().link)return!1;return!!e(xo).getPermalinkParts()}),[]);return t?e:null}function al(){return ll()}function ll(){const e=(0,a.useSelect)((e=>e(xo).getPermalink()),[]);return(0,w.filterURLForDisplay)((0,w.safeDecodeURIComponent)(e))}function cl(){const[e,t]=(0,P.useState)(null),n=(0,P.useMemo)((()=>({anchor:e,placement:"bottom-end"})),[e]);return(0,C.createElement)(il,null,(0,C.createElement)(xr,{label:(0,d.__)("URL"),ref:t},(0,C.createElement)(Zo.Dropdown,{popoverProps:n,className:"editor-post-url__panel-dropdown",contentClassName:"editor-post-url__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,C.createElement)(ul,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,C.createElement)(rl,{onClose:e})})))}function ul({isOpen:e,onClick:t}){const n=ll();return(0,C.createElement)(Zo.Button,{__next40pxDefaultSize:!0,className:"editor-post-url__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,d.sprintf)((0,d.__)("Change URL: %s"),n),onClick:t},n)}function dl({render:e}){return e({canEdit:(0,a.useSelect)((e=>{var t;return null!==(t=e(xo).getCurrentPost()._links?.["wp:action-publish"])&&void 0!==t&&t}))})}const pl=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})),ml=window.wp.wordcount;function gl(){const e=(0,a.useSelect)((e=>e(xo).getEditedPostAttribute("content")),[]),t=(0,d._x)("words","Word count type. Do not translate!");return(0,C.createElement)("span",{className:"word-count"},(0,ml.count)(e,t))}const hl=189;function _l(){const e=(0,a.useSelect)((e=>e(xo).getEditedPostAttribute("content")),[]),t=(0,d._x)("words","Word count type. Do not translate!"),n=Math.round((0,ml.count)(e,t)/hl),o=0===n?(0,P.createInterpolateElement)((0,d.__)("<span>< 1</span> minute"),{span:(0,C.createElement)("span",null)}):(0,P.createInterpolateElement)((0,d.sprintf)((0,d._n)("<span>%d</span> minute","<span>%d</span> minutes",n),n),{span:(0,C.createElement)("span",null)});return(0,C.createElement)("span",{className:"time-to-read"},o)}function fl(){const e=(0,a.useSelect)((e=>e(xo).getEditedPostAttribute("content")),[]);return(0,ml.count)(e,"characters_including_spaces")}const El=function({hasOutlineItemsDisabled:e,onRequestClose:t}){const{headingCount:n,paragraphCount:o,numberOfBlocks:s}=(0,a.useSelect)((e=>{const{getGlobalBlockCount:t}=e(m.store);return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}}),[]);return(0,C.createElement)(C.Fragment,null,(0,C.createElement)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":(0,d.__)("Document Statistics"),tabIndex:"0"},(0,C.createElement)("ul",{role:"list",className:"table-of-contents__counts"},(0,C.createElement)("li",{className:"table-of-contents__count"},(0,d.__)("Words"),(0,C.createElement)(gl,null)),(0,C.createElement)("li",{className:"table-of-contents__count"},(0,d.__)("Characters"),(0,C.createElement)("span",{className:"table-of-contents__number"},(0,C.createElement)(fl,null))),(0,C.createElement)("li",{className:"table-of-contents__count"},(0,d.__)("Time to read"),(0,C.createElement)(_l,null)),(0,C.createElement)("li",{className:"table-of-contents__count"},(0,d.__)("Headings"),(0,C.createElement)("span",{className:"table-of-contents__number"},n)),(0,C.createElement)("li",{className:"table-of-contents__count"},(0,d.__)("Paragraphs"),(0,C.createElement)("span",{className:"table-of-contents__number"},o)),(0,C.createElement)("li",{className:"table-of-contents__count"},(0,d.__)("Blocks"),(0,C.createElement)("span",{className:"table-of-contents__number"},s)))),n>0&&(0,C.createElement)(C.Fragment,null,(0,C.createElement)("hr",null),(0,C.createElement)("h2",{className:"table-of-contents__title"},(0,d.__)("Document Outline")),(0,C.createElement)(hs,{onSelect:t,hasOutlineItemsDisabled:e})))};const bl=(0,P.forwardRef)((function({hasOutlineItemsDisabled:e,repositionDropdown:t,...n},o){const s=(0,a.useSelect)((e=>!!e(m.store).getBlockCount()),[]);return(0,C.createElement)(Zo.Dropdown,{popoverProps:{placement:t?"right":"bottom"},className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:({isOpen:e,onToggle:t})=>(0,C.createElement)(Zo.Button,{...n,ref:o,onClick:s?t:void 0,icon:pl,"aria-expanded":e,"aria-haspopup":"true",label:(0,d.__)("Details"),tooltipPosition:"bottom","aria-disabled":!s}),renderContent:({onClose:t})=>(0,C.createElement)(El,{onRequestClose:t,hasOutlineItemsDisabled:e})})}));function vl(){const{__experimentalGetDirtyEntityRecords:e}=(0,a.useSelect)(p.store);return(0,P.useEffect)((()=>{const t=t=>{if(e().length>0)return t.returnValue=(0,d.__)("You have unsaved changes. If you proceed, they will be lost."),t.returnValue};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}}),[e]),null}const yl=(0,No.createHigherOrderComponent)((e=>(0,a.withRegistry)((t=>{const{useSubRegistry:n=!0,registry:o,...s}=t;if(!n)return(0,C.createElement)(e,{...s});const[r,i]=(0,P.useState)(null);return(0,P.useEffect)((()=>{const e=(0,a.createRegistry)({"core/block-editor":m.storeConfig},o);e.registerStore("core/editor",To),i(e)}),[o]),r?(0,C.createElement)(a.RegistryProvider,{value:r},(0,C.createElement)(e,{...s})):null}))),"withRegistryProvider"),wl=(e,t)=>`<a ${kl(e)}>${t}</a>`,kl=e=>`href="${e}" target="_blank" rel="noreferrer noopener"`,Sl=e=>{const{title:t,foreign_landing_url:n,creator:o,creator_url:s,license:r,license_version:i,license_url:a}=e,l=((e,t)=>{let n=e.trim();return"pdm"!==e&&(n=e.toUpperCase().replace("SAMPLING","Sampling")),t&&(n+=` ${t}`),["pdm","cc0"].includes(e)||(n=`CC ${n}`),n})(r,i),c=(0,Cs.decodeEntities)(o);let u;return u=c?t?(0,d.sprintf)((0,d._x)('"%1$s" by %2$s/ %3$s',"caption"),wl(n,(0,Cs.decodeEntities)(t)),s?wl(s,c):c,a?wl(`${a}?ref=openverse`,l):l):(0,d.sprintf)((0,d._x)("<a %1$s>Work</a> by %2$s/ %3$s","caption"),kl(n),s?wl(s,c):c,a?wl(`${a}?ref=openverse`,l):l):t?(0,d.sprintf)((0,d._x)('"%1$s"/ %2$s',"caption"),wl(n,(0,Cs.decodeEntities)(t)),a?wl(`${a}?ref=openverse`,l):l):(0,d.sprintf)((0,d._x)("<a %1$s>Work</a>/ %2$s","caption"),kl(n),a?wl(`${a}?ref=openverse`,l):l),u.replace(/\s{2}/g," ")},Pl=async(e={})=>(await(0,a.resolveSelect)(p.store).getMediaItems({...e,orderBy:e?.search?"relevance":"date"})).map((e=>({...e,alt:e.alt_text,url:e.source_url,previewUrl:e.media_details?.sizes?.medium?.source_url,caption:e.caption?.raw}))),Cl=[{name:"images",labels:{name:(0,d.__)("Images"),search_items:(0,d.__)("Search images")},mediaType:"image",fetch:async(e={})=>Pl({...e,media_type:"image"})},{name:"videos",labels:{name:(0,d.__)("Videos"),search_items:(0,d.__)("Search videos")},mediaType:"video",fetch:async(e={})=>Pl({...e,media_type:"video"})},{name:"audio",labels:{name:(0,d.__)("Audio"),search_items:(0,d.__)("Search audio")},mediaType:"audio",fetch:async(e={})=>Pl({...e,media_type:"audio"})},{name:"openverse",labels:{name:(0,d.__)("Openverse"),search_items:(0,d.__)("Search Openverse")},mediaType:"image",async fetch(e={}){const t={...e,mature:!1,excluded_source:"flickr,inaturalist,wikimedia",license:"pdm,cc0"},n={per_page:"page_size",search:"q"},o=new URL("https://api.openverse.engineering/v1/images/");Object.entries(t).forEach((([e,t])=>{const s=n[e]||e;o.searchParams.set(s,t)}));const s=await window.fetch(o,{headers:{"User-Agent":"WordPress/inserter-media-fetch"}});return(await s.json()).results.map((e=>({...e,title:e.title?.toLowerCase().startsWith("file:")?e.title.slice(5):e.title,sourceId:e.id,id:void 0,caption:Sl(e),previewUrl:e.thumbnail})))},getReportUrl:({sourceId:e})=>`https://wordpress.org/openverse/image/${e}/report/`,isExternalResource:!0}],Tl=window.wp.mediaUtils,xl=()=>{};function Bl({additionalData:e={},allowedTypes:t,filesList:n,maxUploadFileSize:o,onError:s=xl,onFileChange:r}){const{getCurrentPost:i,getEditorSettings:l}=(0,a.select)(xo),c=l().allowedMimeTypes;o=o||l().maxUploadFileSize;const u=i(),d="number"==typeof u?.id?u.id:u?.wp_id,p=d?{post:d}:{};(0,Tl.uploadMedia)({allowedTypes:t,filesList:n,onFileChange:r,additionalData:{...p,...e},maxUploadFileSize:o,onError:({message:e})=>s(e),wpAllowedMimeTypes:c})}const Il=[],Nl=["__experimentalBlockDirectory","__experimentalDiscussionSettings","__experimentalFeatures","__experimentalGlobalStylesBaseStyles","__experimentalPreferredStyleVariations","__unstableGalleryWithImageBlocks","alignWide","blockInspectorTabs","allowedMimeTypes","bodyPlaceholder","canLockBlocks","capabilities","clearBlockSelection","codeEditingEnabled","colors","disableCustomColors","disableCustomFontSizes","disableCustomSpacingSizes","disableCustomGradients","disableLayoutStyles","enableCustomLineHeight","enableCustomSpacing","enableCustomUnits","enableOpenverseMediaCategory","fontSizes","gradients","generateAnchors","onNavigateToEntityRecord","hasInlineToolbar","imageDefaultSize","imageDimensions","imageEditing","imageSizes","isRTL","locale","maxWidth","onUpdateDefaultBlockStyles","postContentAttributes","postsPerPage","readOnly","styles","titlePlaceholder","supportsLayout","widgetTypesToHideFromLegacyWidgetBlock","__unstableHasCustomAppender","__unstableIsPreviewMode","__unstableResolvedAssets","__unstableIsBlockBasedTheme","__experimentalArchiveTitleTypeLabel","__experimentalArchiveTitleNameLabel"];const Dl=function(e,t,n){var o,s;const r=(0,No.useViewportMatch)("medium"),{allowRightClickOverrides:l,blockTypes:c,focusMode:g,hasFixedToolbar:h,isDistractionFree:_,keepCaretInsideBlock:f,reusableBlocks:E,hasUploadPermissions:b,hiddenBlockTypes:v,canUseUnfilteredHTML:y,userCanCreatePages:w,pageOnFront:k,pageForPosts:S,userPatternCategories:C,restBlockPatternCategories:T}=(0,a.useSelect)((e=>{var o;const s="web"===P.Platform.OS,{canUser:a,getRawEntityRecord:l,getEntityRecord:c,getUserPatternCategories:u,getEntityRecords:d,getBlockPatternCategories:m}=e(p.store),{get:g}=e(B.store),{getBlockTypes:h}=e(i.store),_=a("read","settings")?c("root","site"):void 0;return{allowRightClickOverrides:g("core","allowRightClickOverrides"),blockTypes:h(),canUseUnfilteredHTML:l("postType",t,n)?._links?.hasOwnProperty("wp:action-unfiltered-html"),focusMode:g("core","focusMode"),hasFixedToolbar:g("core","fixedToolbar")||!r,hiddenBlockTypes:g("core","hiddenBlockTypes"),isDistractionFree:g("core","distractionFree"),keepCaretInsideBlock:g("core","keepCaretInsideBlock"),reusableBlocks:s?d("postType","wp_block",{per_page:-1}):Il,hasUploadPermissions:null===(o=a("create","media"))||void 0===o||o,userCanCreatePages:a("create","pages"),pageOnFront:_?.page_on_front,pageForPosts:_?.page_for_posts,userPatternCategories:u(),restBlockPatternCategories:m()}}),[t,n,r]),x=null!==(o=e.__experimentalAdditionalBlockPatterns)&&void 0!==o?o:e.__experimentalBlockPatterns,I=null!==(s=e.__experimentalAdditionalBlockPatternCategories)&&void 0!==s?s:e.__experimentalBlockPatternCategories,N=(0,P.useMemo)((()=>[...x||[]].filter((({postTypes:e})=>!e||Array.isArray(e)&&e.includes(t)))),[x,t]),D=(0,P.useMemo)((()=>[...I||[],...T||[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name))))),[I,T]),{undo:A,setIsInserterOpened:R}=(0,a.useDispatch)(xo),{saveEntityRecord:O}=(0,a.useDispatch)(p.store),L=(0,P.useCallback)((e=>w?O("postType","page",e):Promise.reject({message:(0,d.__)("You do not have permission to create Pages.")})),[O,w]),M=(0,P.useMemo)((()=>{if(v&&v.length>0){return(!0===e.allowedBlockTypes?c.map((({name:e})=>e)):e.allowedBlockTypes||[]).filter((e=>!v.includes(e)))}return e.allowedBlockTypes}),[e.allowedBlockTypes,v,c]),F=!1===e.focusMode;return(0,P.useMemo)((()=>({...Object.fromEntries(Object.entries(e).filter((([e])=>Nl.includes(e)))),allowedBlockTypes:M,allowRightClickOverrides:l,focusMode:g&&!F,hasFixedToolbar:h,isDistractionFree:_,keepCaretInsideBlock:f,mediaUpload:b?Bl:void 0,__experimentalBlockPatterns:N,[u(m.privateApis).selectBlockPatternsKey]:e=>u(e(p.store)).getBlockPatternsForPostType(t),__experimentalReusableBlocks:E,__experimentalBlockPatternCategories:D,__experimentalUserPatternCategories:C,__experimentalFetchLinkSuggestions:(t,n)=>(0,p.__experimentalFetchLinkSuggestions)(t,n,e),inserterMediaCategories:Cl,__experimentalFetchRichUrlData:p.__experimentalFetchUrlData,__experimentalCanUserUseUnfilteredHTML:y,__experimentalUndo:A,outlineMode:"wp_template"===t,__experimentalCreatePageEntity:L,__experimentalUserCanCreatePages:w,pageOnFront:k,pageForPosts:S,__experimentalPreferPatternsOnRoot:"wp_template"===t,templateLock:"wp_navigation"===t?"insert":e.templateLock,template:"wp_navigation"===t?[["core/navigation",{},[]]]:e.template,__experimentalSetIsInserterOpened:R})),[M,l,g,F,h,_,f,e,b,E,C,N,D,y,A,L,w,k,S,t,R])},Al=["core/post-title","core/post-featured-image","core/post-content"];function Rl(){!function(){const e=(0,a.useSelect)((e=>{const{getBlocksByName:t,getBlockParents:n,getBlockName:o}=e(m.store);return t(Al).filter((e=>n(e).every((e=>{const t=o(e);return"core/query"!==t&&!Al.includes(t)}))))}),[]),{setBlockEditingMode:t,unsetBlockEditingMode:n}=(0,a.useDispatch)(m.store);(0,P.useEffect)((()=>{t("","disabled");for(const n of e)t(n,"contentOnly");return()=>{n("");for(const t of e)n(t)}}),[e,t,n])}()}function Ol(){const e=(0,a.useSelect)((e=>e(m.store).getBlockOrder()?.[0]),[]),{setBlockEditingMode:t,unsetBlockEditingMode:n}=(0,a.useDispatch)(m.store);(0,P.useEffect)((()=>{if(e)return t(e,"contentOnly"),()=>{n(e)}}),[e,n,t])}const{ExperimentalBlockEditorProvider:Ll}=u(m.privateApis),{PatternsMenuItems:Ml}=u(Ro.privateApis),Fl=()=>{},Vl=["wp_block","wp_template","wp_navigation","wp_template_part"];const Ul=yl((({post:e,settings:t,recovery:n,initialEdits:o,children:s,BlockEditorProviderComponent:r=Ll,__unstableTemplate:l})=>{const c=(0,a.useSelect)((e=>e(xo).getRenderingMode()),[]),g=!!l&&"post-only"!==c,h=g?l:e,_=(0,P.useMemo)((()=>({...!Vl.includes(h.type)||g?{postId:e.id,postType:e.type}:{},templateSlug:"wp_template"===h.type?h.slug:void 0})),[g,e.id,e.type,h.type,h.slug]),{editorSettings:f,selection:E,isReady:b}=(0,a.useSelect)((e=>{const{getEditorSettings:t,getEditorSelection:n,__unstableIsEditorReady:o}=e(xo);return{editorSettings:t(),isReady:o(),selection:n()}}),[]),{id:v,type:y}=h,w=Dl(f,y,v),[k,S,T]=function(e,t,n){const o="post-only"!==n&&t?"template":"post",[s,r,a]=(0,p.useEntityBlockEditor)("postType",e.type,{id:e.id}),[l,c,u]=(0,p.useEntityBlockEditor)("postType",t?.type,{id:t?.id}),d=(0,P.useMemo)((()=>{if("wp_navigation"===e.type)return[(0,i.createBlock)("core/navigation",{ref:e.id,templateLock:!1})]}),[e.type,e.id]),m=(0,P.useMemo)((()=>d||("template"===o?l:s)),[d,o,l,s]);return t&&"template-locked"===n||"wp_navigation"===e.type?[m,Fl,Fl]:[m,"post"===o?r:c,"post"===o?a:u]}(e,l,c),{updatePostLock:x,setupEditor:B,updateEditorSettings:I,setCurrentTemplateId:N,setEditedPost:D,setRenderingMode:A}=u((0,a.useDispatch)(xo)),{createWarningNotice:R}=(0,a.useDispatch)(rn.store);return(0,P.useLayoutEffect)((()=>{n||(x(t.postLock),B(e,o,t.template),t.autosave&&R((0,d.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:(0,d.__)("View the autosave"),url:t.autosave.editLink}]}))}),[]),(0,P.useEffect)((()=>{D(e.type,e.id)}),[e.type,e.id,D]),(0,P.useEffect)((()=>{I(t)}),[t,I]),(0,P.useEffect)((()=>{N(l?.id)}),[l?.id,N]),(0,P.useEffect)((()=>{var e;A(null!==(e=t.defaultRenderingMode)&&void 0!==e?e:"post-only")}),[t.defaultRenderingMode,A]),b?(0,C.createElement)(p.EntityProvider,{kind:"root",type:"site"},(0,C.createElement)(p.EntityProvider,{kind:"postType",type:e.type,id:e.id},(0,C.createElement)(m.BlockContextProvider,{value:_},(0,C.createElement)(r,{value:k,onChange:T,onInput:S,selection:E,settings:w,useSubRegistry:!1},s,(0,C.createElement)(Ml,null),"template-locked"===c&&(0,C.createElement)(Rl,null),"wp_navigation"===y&&(0,C.createElement)(Ol,null))))):null}));const Hl=function(e){return(0,C.createElement)(Ul,{...e,BlockEditorProviderComponent:m.BlockEditorProvider},e.children)},zl=window.wp.serverSideRender;var Gl=n.n(zl);function jl(e,t,n=[]){const o=(0,P.forwardRef)(((n,o)=>(S()("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),(0,C.createElement)(t,{ref:o,...n}))));return n.forEach((n=>{o[n]=jl(e+"."+n,t[n])})),o}function Wl(e,t){return(...n)=>(S()("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),t(...n))}const $l=jl("RichText",m.RichText,["Content"]);$l.isEmpty=Wl("RichText.isEmpty",m.RichText.isEmpty);const Kl=jl("Autocomplete",m.Autocomplete),Zl=jl("AlignmentToolbar",m.AlignmentToolbar),Yl=jl("BlockAlignmentToolbar",m.BlockAlignmentToolbar),ql=jl("BlockControls",m.BlockControls,["Slot"]),Ql=jl("BlockEdit",m.BlockEdit),Xl=jl("BlockEditorKeyboardShortcuts",m.BlockEditorKeyboardShortcuts),Jl=jl("BlockFormatControls",m.BlockFormatControls,["Slot"]),ec=jl("BlockIcon",m.BlockIcon),tc=jl("BlockInspector",m.BlockInspector),nc=jl("BlockList",m.BlockList),oc=jl("BlockMover",m.BlockMover),sc=jl("BlockNavigationDropdown",m.BlockNavigationDropdown),rc=jl("BlockSelectionClearer",m.BlockSelectionClearer),ic=jl("BlockSettingsMenu",m.BlockSettingsMenu),ac=jl("BlockTitle",m.BlockTitle),lc=jl("BlockToolbar",m.BlockToolbar),cc=jl("ColorPalette",m.ColorPalette),uc=jl("ContrastChecker",m.ContrastChecker),dc=jl("CopyHandler",m.CopyHandler),pc=jl("DefaultBlockAppender",m.DefaultBlockAppender),mc=jl("FontSizePicker",m.FontSizePicker),gc=jl("Inserter",m.Inserter),hc=jl("InnerBlocks",m.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),_c=jl("InspectorAdvancedControls",m.InspectorAdvancedControls,["Slot"]),fc=jl("InspectorControls",m.InspectorControls,["Slot"]),Ec=jl("PanelColorSettings",m.PanelColorSettings),bc=jl("PlainText",m.PlainText),vc=jl("RichTextShortcut",m.RichTextShortcut),yc=jl("RichTextToolbarButton",m.RichTextToolbarButton),wc=jl("__unstableRichTextInputEvent",m.__unstableRichTextInputEvent),kc=jl("MediaPlaceholder",m.MediaPlaceholder),Sc=jl("MediaUpload",m.MediaUpload),Pc=jl("MediaUploadCheck",m.MediaUploadCheck),Cc=jl("MultiSelectScrollIntoView",m.MultiSelectScrollIntoView),Tc=jl("NavigableToolbar",m.NavigableToolbar),xc=jl("ObserveTyping",m.ObserveTyping),Bc=jl("SkipToSelectedBlock",m.SkipToSelectedBlock),Ic=jl("URLInput",m.URLInput),Nc=jl("URLInputButton",m.URLInputButton),Dc=jl("URLPopover",m.URLPopover),Ac=jl("Warning",m.Warning),Rc=jl("WritingFlow",m.WritingFlow),Oc=Wl("createCustomColorsHOC",m.createCustomColorsHOC),Lc=Wl("getColorClassName",m.getColorClassName),Mc=Wl("getColorObjectByAttributeValues",m.getColorObjectByAttributeValues),Fc=Wl("getColorObjectByColorValue",m.getColorObjectByColorValue),Vc=Wl("getFontSize",m.getFontSize),Uc=Wl("getFontSizeClass",m.getFontSizeClass),Hc=Wl("withColorContext",m.withColorContext),zc=Wl("withColors",m.withColors),Gc=Wl("withFontSizes",m.withFontSizes),jc=Go,Wc=Go;function $c(e){return S()("wp.editor.cleanForSlug",{since:"12.7",plugin:"Gutenberg",alternative:"wp.url.cleanForSlug"}),(0,w.cleanForSlug)(e)}function Kc({contentRef:e}){const{onNavigateToEntityRecord:t,templateId:n}=(0,a.useSelect)((e=>{const{getEditorSettings:t,getCurrentTemplateId:n}=e(xo);return{onNavigateToEntityRecord:t().onNavigateToEntityRecord,templateId:n()}}),[]),{getNotices:o}=(0,a.useSelect)(rn.store),{createInfoNotice:s,removeNotice:r}=(0,a.useDispatch)(rn.store),[i,l]=(0,P.useState)(!1),c=(0,P.useRef)(0);return(0,P.useEffect)((()=>{const i=async e=>{if(!e.target.classList.contains("is-root-container"))return;const r=o().some((e=>e.id===c.current));if(r)return;const{notice:i}=await s((0,d.__)("Edit your template to edit this block."),{isDismissible:!0,type:"snackbar",actions:[{label:(0,d.__)("Edit template"),onClick:()=>t({postId:n,postType:"wp_template"})}]});c.current=i.id},a=e=>{e.target.classList.contains("is-root-container")&&(c.current&&r(c.current),l(!0))},u=e.current;return u?.addEventListener("click",i),u?.addEventListener("dblclick",a),()=>{u?.removeEventListener("click",i),u?.removeEventListener("dblclick",a)}}),[c,e,o,s,t,n,r]),(0,C.createElement)(Zo.__experimentalConfirmDialog,{isOpen:i,confirmButtonText:(0,d.__)("Edit template"),onConfirm:()=>{l(!1),t({postId:n,postType:"wp_template"})},onCancel:()=>l(!1)},(0,d.__)("Edit your template to edit this block."))}const{LayoutStyle:Zc,useLayoutClasses:Yc,useLayoutStyles:qc,ExperimentalBlockCanvas:Qc,useFlashEditableBlocks:Xc}=u(m.privateApis),Jc=()=>{},eu=["wp_block","wp_template","wp_navigation","wp_template_part"];function tu(e){for(let t=0;t<e.length;t++){if("core/post-content"===e[t].name)return e[t].attributes;if(e[t].innerBlocks.length){const n=tu(e[t].innerBlocks);if(n)return n}}}function nu(e){for(let t=0;t<e.length;t++)if("core/post-content"===e[t].name)return!0;return!1}const ou=function({autoFocus:e,className:t,renderAppender:n,styles:o,disableIframe:s=!1,iframeProps:r,children:l}){const{renderingMode:c,postContentAttributes:u,editedPostTemplate:d={},wrapperBlockName:g,wrapperUniqueId:h,deviceType:_,showEditorPadding:f,isDesignPostType:E}=(0,a.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:n,getCurrentTemplateId:o,getEditorSettings:s,getRenderingMode:r,getDeviceType:i}=e(xo),{getPostType:a,canUser:l,getEditedEntityRecord:c}=e(p.store),u=n(),d=r();let m;"wp_block"===u?m="core/block":"post-only"===d&&(m="core/post-content");const g=s(),h=g.supportsTemplateMode,_=a(u),f=l("create","templates"),E=o(),b=E?c("postType","wp_template",E):void 0;return{renderingMode:d,postContentAttributes:g.postContentAttributes,isDesignPostType:eu.includes(u),editedPostTemplate:_?.viewable&&h&&f?b:void 0,wrapperBlockName:m,wrapperUniqueId:t(),deviceType:i(),showEditorPadding:!!g.onNavigateToPreviousEntityRecord}}),[]),{isCleanNewPost:b}=(0,a.useSelect)(xo),{hasRootPaddingAwareAlignments:v,themeHasDisabledLayoutStyles:y,themeSupportsLayout:w}=(0,a.useSelect)((e=>{const t=e(m.store).getSettings();return{themeHasDisabledLayoutStyles:t.disableLayoutStyles,themeSupportsLayout:t.supportsLayout,hasRootPaddingAwareAlignments:t.__experimentalFeatures?.useRootPaddingAwareAlignments}}),[]),k=(0,m.__experimentalUseResizeCanvas)(_),[S]=(0,m.useSettings)("layout"),T=(0,P.useMemo)((()=>"post-only"!==c||E?{type:"default"}:w?{...S,type:"constrained"}:{type:"default"}),[c,w,S,E]),x=(0,P.useMemo)((()=>{if(!d?.content&&!d?.blocks&&u)return u;if(d?.blocks)return tu(d?.blocks);const e="string"==typeof d?.content?d?.content:"";return tu((0,i.parse)(e))||{}}),[d?.content,d?.blocks,u]),B=(0,P.useMemo)((()=>{if(!d?.content&&!d?.blocks)return!1;if(d?.blocks)return nu(d?.blocks);const e="string"==typeof d?.content?d?.content:"";return nu((0,i.parse)(e))||!1}),[d?.content,d?.blocks]),{layout:I={},align:N=""}=x||{},D=Yc(x,"core/post-content"),A=Ko()({"is-layout-flow":!w},w&&D,N&&`align${N}`),R=qc(x,"core/post-content",".block-editor-block-list__layout.is-root-container"),O=(0,P.useMemo)((()=>I&&("constrained"===I?.type||I?.inherit||I?.contentSize||I?.wideSize)?{...S,...I,type:"constrained"}:{...S,...I,type:"default"}),[I?.type,I?.inherit,I?.contentSize,I?.wideSize,S]),L=u?O:T,M="default"!==L?.type||B?L:T,F=(0,m.__unstableUseTypingObserver)(),V=(0,P.useRef)();(0,P.useEffect)((()=>{e&&b()&&V?.current?.focus()}),[e,b]);const U=(0,P.useRef)(),H=(0,m.__unstableUseTypewriter)(),z=(0,No.useMergeRefs)([U,"post-only"===c?H:Jc,Xc({isEnabled:"template-locked"===c})]);return(0,C.createElement)(Qc,{shouldIframe:!s||["Tablet","Mobile"].includes(_),contentRef:z,styles:o,height:"100%",iframeProps:{className:Ko()("editor-canvas__iframe",{"has-editor-padding":f}),...r,style:{...r?.style,...k}}},w&&!y&&"post-only"===c&&!E&&(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zc,{selector:".editor-editor-canvas__post-title-wrapper",layout:T}),(0,C.createElement)(Zc,{selector:".block-editor-block-list__layout.is-root-container",layout:M}),N&&(0,C.createElement)(Zc,{css:".is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;}\n\t\t.is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}\n\t\t.is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}\n\t\t.is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}"}),R&&(0,C.createElement)(Zc,{layout:O,css:R})),"post-only"===c&&!E&&(0,C.createElement)("div",{className:Ko()("editor-editor-canvas__post-title-wrapper","edit-post-visual-editor__post-title-wrapper",{"has-global-padding":v}),contentEditable:!1,ref:F,style:{marginTop:"4rem"}},(0,C.createElement)(tl,{ref:V})),(0,C.createElement)(m.RecursionProvider,{blockName:g,uniqueId:h},(0,C.createElement)(m.BlockList,{className:Ko()(t,"is-"+_.toLowerCase()+"-preview","post-only"!==c||E?"wp-site-blocks":`${A} wp-block-post-content`),layout:L,dropZoneElement:s?U.current:U.current?.parentNode,renderAppender:n,__unstableDisableDropZone:"template-locked"===c}),"template-locked"===c&&(0,C.createElement)(Kc,{contentRef:U})),l)},{PreferenceBaseOption:su}=u(B.privateApis),ru=(0,No.compose)((0,a.withSelect)(((e,{panelName:t})=>{const{isEditorPanelEnabled:n,isEditorPanelRemoved:o}=e(xo);return{isRemoved:o(t),isChecked:n(t)}})),(0,No.ifCondition)((({isRemoved:e})=>!e)),(0,a.withDispatch)(((e,{panelName:t})=>({onChange:()=>e(xo).toggleEditorPanelEnabled(t)}))))(su),{Fill:iu,Slot:au}=(0,Zo.createSlotFill)("EnablePluginDocumentSettingPanelOption"),lu=({label:e,panelName:t})=>(0,C.createElement)(iu,null,(0,C.createElement)(ru,{label:e,panelName:t}));lu.Slot=au;const cu=lu,uu=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})),du=(0,C.createElement)(T.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,C.createElement)(T.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})),{useCanBlockToolbarBeFocused:pu}=u(m.privateApis),mu=e=>{e.preventDefault()};const gu=function({className:e,disableBlockTools:t=!1,children:n,listViewLabel:o=(0,d.__)("Document Overview")}){const s=(0,P.useRef)(),{setIsInserterOpened:r,setIsListViewOpened:i}=(0,a.useDispatch)(xo),{isDistractionFree:l,isInserterOpened:c,isListViewOpen:p,listViewShortcut:g,listViewToggleRef:h,hasFixedToolbar:_,showIconLabels:f}=(0,a.useSelect)((e=>{const{getSettings:t}=e(m.store),{get:n}=e(B.store),{isListViewOpened:o,getListViewToggleRef:s}=u(e(xo)),{getShortcutRepresentation:r}=e(zo.store);return{isInserterOpened:e(xo).isInserterOpened(),isListViewOpen:o(),listViewShortcut:r("core/editor/toggle-list-view"),listViewToggleRef:s(),hasFixedToolbar:t().hasFixedToolbar,showIconLabels:n("core","showIconLabels"),isDistractionFree:n("core","distractionFree")}}),[]),E=(0,No.useViewportMatch)("medium"),b=(0,No.useViewportMatch)("wide"),v=pu(),y=(0,d.__)("Document tools"),w=(0,P.useCallback)((()=>i(!p)),[i,p]),k=(0,P.useCallback)((()=>{c?(s.current.focus(),r(!1)):r(!0)}),[c,r]),S=(0,d._x)("Toggle block inserter","Generic label for block inserter button"),T=c?(0,d.__)("Close"):(0,d.__)("Add");return(0,C.createElement)(m.NavigableToolbar,{className:Ko()("editor-document-tools","edit-post-header-toolbar",e),"aria-label":y,shouldUseKeyboardFocusShortcut:!v,variant:"unstyled"},(0,C.createElement)("div",{className:"editor-document-tools__left"},!l&&(0,C.createElement)(Zo.ToolbarItem,{ref:s,as:Zo.Button,className:"editor-document-tools__inserter-toggle",variant:"primary",isPressed:c,onMouseDown:mu,onClick:k,disabled:t,icon:uu,label:f?T:S,showTooltip:!f,"aria-expanded":c}),(b||!f)&&(0,C.createElement)(C.Fragment,null,E&&!_&&(0,C.createElement)(Zo.ToolbarItem,{as:m.ToolSelector,showTooltip:!f,variant:f?"tertiary":void 0,disabled:t,size:"compact"}),(0,C.createElement)(Zo.ToolbarItem,{as:ys,showTooltip:!f,variant:f?"tertiary":void 0,size:"compact"}),(0,C.createElement)(Zo.ToolbarItem,{as:vs,showTooltip:!f,variant:f?"tertiary":void 0,size:"compact"}),!l&&(0,C.createElement)(Zo.ToolbarItem,{as:Zo.Button,className:"editor-document-tools__document-overview-toggle",icon:du,disabled:t,isPressed:p,label:o,onClick:w,shortcut:g,showTooltip:!f,variant:f?"tertiary":void 0,"aria-expanded":p,ref:h,size:"compact"})),n))},hu=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));function _u(){return(0,C.createElement)(C.Fragment,null,(0,C.createElement)("div",{className:"editor-list-view-sidebar__outline"},(0,C.createElement)("div",null,(0,C.createElement)(Zo.__experimentalText,null,(0,d.__)("Characters:")),(0,C.createElement)(Zo.__experimentalText,null,(0,C.createElement)(fl,null))),(0,C.createElement)("div",null,(0,C.createElement)(Zo.__experimentalText,null,(0,d.__)("Words:")),(0,C.createElement)(gl,null)),(0,C.createElement)("div",null,(0,C.createElement)(Zo.__experimentalText,null,(0,d.__)("Time to read:")),(0,C.createElement)(_l,null))),(0,C.createElement)(hs,null))}const{Tabs:fu}=u(Zo.privateApis);const Eu=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"}));const bu=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})),vu=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"})),yu=(0,C.createElement)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,C.createElement)(T.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"}));const wu=function({blockTypes:e,value:t,onItemChange:n}){return(0,C.createElement)("ul",{className:"editor-block-manager__checklist"},e.map((e=>(0,C.createElement)("li",{key:e.name,className:"editor-block-manager__checklist-item"},(0,C.createElement)(Zo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:e.title,checked:t.includes(e.name),onChange:(...t)=>n(e.name,...t)}),(0,C.createElement)(m.BlockIcon,{icon:e.icon})))))};const ku=function e({title:t,blockTypes:n}){const o=(0,No.useInstanceId)(e),{allowedBlockTypes:s,hiddenBlockTypes:r}=(0,a.useSelect)((e=>{const{getEditorSettings:t}=e(xo),{get:n}=e(B.store);return{allowedBlockTypes:t().allowedBlockTypes,hiddenBlockTypes:n("core","hiddenBlockTypes")}}),[]),i=(0,P.useMemo)((()=>!0===s?n:n.filter((({name:e})=>s?.includes(e)))),[s,n]),{showBlockTypes:l,hideBlockTypes:c}=u((0,a.useDispatch)(xo)),d=(0,P.useCallback)(((e,t)=>{t?l(e):c(e)}),[l,c]),p=(0,P.useCallback)((e=>{const t=n.map((({name:e})=>e));e?l(t):c(t)}),[n,l,c]);if(!i.length)return null;const m=i.map((({name:e})=>e)).filter((e=>!(null!=r?r:[]).includes(e))),g="editor-block-manager__category-title-"+o,h=m.length===i.length,_=!h&&m.length>0;return(0,C.createElement)("div",{role:"group","aria-labelledby":g,className:"editor-block-manager__category"},(0,C.createElement)(Zo.CheckboxControl,{__nextHasNoMarginBottom:!0,checked:h,onChange:p,className:"editor-block-manager__category-title",indeterminate:_,label:(0,C.createElement)("span",{id:g},t)}),(0,C.createElement)(wu,{blockTypes:i,value:m,onItemChange:d}))};const Su=(0,No.compose)([(0,a.withSelect)((e=>{var t;const{getBlockTypes:n,getCategories:o,hasBlockSupport:s,isMatchingSearchTerm:r}=e(i.store),{get:a}=e(B.store),l=n(),c=(null!==(t=a("core","hiddenBlockTypes"))&&void 0!==t?t:[]).filter((e=>l.some((t=>t.name===e)))),u=Array.isArray(c)&&c.length;return{blockTypes:l,categories:o(),hasBlockSupport:s,isMatchingSearchTerm:r,numberOfHiddenBlocks:u}})),(0,a.withDispatch)((e=>{const{showBlockTypes:t}=u(e(xo));return{enableAllBlockTypes:e=>{const n=e.map((({name:e})=>e));t(n)}}}))])((function({blockTypes:e,categories:t,hasBlockSupport:n,isMatchingSearchTerm:o,numberOfHiddenBlocks:s,enableAllBlockTypes:r}){const i=(0,No.useDebounce)(Qi.speak,500),[a,l]=(0,P.useState)("");return e=e.filter((e=>n(e,"inserter",!0)&&(!a||o(e,a))&&(!e.parent||e.parent.includes("core/post-content")))),(0,P.useEffect)((()=>{if(!a)return;const t=e.length,n=(0,d.sprintf)((0,d._n)("%d result found.","%d results found.",t),t);i(n)}),[e.length,a,i]),(0,C.createElement)("div",{className:"editor-block-manager__content"},!!s&&(0,C.createElement)("div",{className:"editor-block-manager__disabled-blocks-count"},(0,d.sprintf)((0,d._n)("%d block is hidden.","%d blocks are hidden.",s),s),(0,C.createElement)(Zo.Button,{variant:"link",onClick:()=>r(e)},(0,d.__)("Reset"))),(0,C.createElement)(Zo.SearchControl,{__nextHasNoMarginBottom:!0,label:(0,d.__)("Search for a block"),placeholder:(0,d.__)("Search for a block"),value:a,onChange:e=>l(e),className:"editor-block-manager__search"}),(0,C.createElement)("div",{tabIndex:"0",role:"region","aria-label":(0,d.__)("Available block types"),className:"editor-block-manager__results"},0===e.length&&(0,C.createElement)("p",{className:"editor-block-manager__no-results"},(0,d.__)("No blocks found.")),t.map((t=>(0,C.createElement)(ku,{key:t.slug,title:t.title,blockTypes:e.filter((e=>e.category===t.slug))}))),(0,C.createElement)(ku,{title:(0,d.__)("Uncategorized"),blockTypes:e.filter((({category:e})=>!e))})))})),{PreferencesModal:Pu,PreferencesModalTabs:Cu,PreferencesModalSection:Tu,PreferenceToggleControl:xu}=u(B.privateApis);const Bu={};c(Bu,{DocumentTools:gu,EditorCanvas:ou,ExperimentalEditorProvider:Ul,EnablePluginDocumentSettingPanelOption:cu,EntitiesSavedStatesExtensible:Fs,InserterSidebar:function(){const{insertionPoint:e,showMostUsedBlocks:t}=(0,a.useSelect)((e=>{const{getInsertionPoint:t}=u(e(xo)),{get:n}=e(B.store);return{insertionPoint:t(),showMostUsedBlocks:n("core","mostUsedBlocks")}}),[]),{setIsInserterOpened:n}=(0,a.useDispatch)(xo),o=(0,No.useViewportMatch)("medium","<"),s=o?"div":Zo.VisuallyHidden,[r,i]=(0,No.__experimentalUseDialog)({onClose:()=>n(!1),focusOnMount:null}),l=(0,P.useRef)();return(0,P.useEffect)((()=>{l.current.focusSearch()}),[]),(0,C.createElement)("div",{ref:r,...i,className:"editor-inserter-sidebar"},(0,C.createElement)(s,{className:"editor-inserter-sidebar__header"},(0,C.createElement)(Zo.Button,{icon:hu,label:(0,d.__)("Close block inserter"),onClick:()=>n(!1)})),(0,C.createElement)("div",{className:"editor-inserter-sidebar__content"},(0,C.createElement)(m.__experimentalLibrary,{showMostUsedBlocks:t,showInserterHelpPanel:!0,shouldFocusBlock:o,rootClientId:e.rootClientId,__experimentalInsertionIndex:e.insertionIndex,__experimentalFilterValue:e.filterValue,ref:l})))},ListViewSidebar:function(){const{setIsListViewOpened:e}=(0,a.useDispatch)(xo),{getListViewToggleRef:t}=u((0,a.useSelect)(xo)),n=(0,No.useFocusOnMount)("firstElement"),o=(0,P.useCallback)((()=>{e(!1),t().current?.focus()}),[t,e]),s=(0,P.useCallback)((e=>{e.keyCode!==es.ESCAPE||e.defaultPrevented||(e.preventDefault(),o())}),[o]),[r,i]=(0,P.useState)(null),[l,c]=(0,P.useState)("list-view"),p=(0,P.useRef)(),g=(0,P.useRef)(),h=(0,P.useRef)(),_=(0,No.useMergeRefs)([n,h,i]),f=(0,P.useCallback)((()=>{p.current.contains(p.current.ownerDocument.activeElement)?o():function(e){const t=qa.focus.tabbable.find(g.current)[0];if("list-view"===e){const e=qa.focus.tabbable.find(h.current)[0];(p.current.contains(e)?e:t).focus()}else t.focus()}(l)}),[o,l]);return(0,zo.useShortcut)("core/editor/toggle-list-view",f),(0,C.createElement)("div",{className:"editor-list-view-sidebar",onKeyDown:s,ref:p},(0,C.createElement)(fu,{onSelect:e=>c(e),selectOnMove:!1,initialTabId:"list-view"},(0,C.createElement)("div",{className:"edit-post-editor__document-overview-panel__header"},(0,C.createElement)(Zo.Button,{className:"editor-list-view-sidebar__close-button",icon:ki,label:(0,d.__)("Close"),onClick:o}),(0,C.createElement)(fu.TabList,{className:"editor-list-view-sidebar__tabs-tablist",ref:g},(0,C.createElement)(fu.Tab,{className:"editor-list-view-sidebar__tabs-tab",tabId:"list-view"},(0,d._x)("List View","Post overview")),(0,C.createElement)(fu.Tab,{className:"editor-list-view-sidebar__tabs-tab",tabId:"outline"},(0,d._x)("Outline","Post overview")))),(0,C.createElement)(fu.TabPanel,{ref:_,className:"editor-list-view-sidebar__tabs-tabpanel",tabId:"list-view",focusable:!1},(0,C.createElement)("div",{className:"editor-list-view-sidebar__list-view-container"},(0,C.createElement)("div",{className:"editor-list-view-sidebar__list-view-panel-content"},(0,C.createElement)(m.__experimentalListView,{dropZoneElement:r})))),(0,C.createElement)(fu.TabPanel,{className:"editor-list-view-sidebar__tabs-tabpanel",tabId:"outline",focusable:!1},(0,C.createElement)("div",{className:"editor-list-view-sidebar__list-view-container"},(0,C.createElement)(_u,null)))))},PluginPostExcerpt:Kr,PostPanelRow:xr,PostViewLink:function(){const{hasLoaded:e,permalink:t,isPublished:n,label:o,showIconLabels:s}=(0,a.useSelect)((e=>{const t=e(xo).getCurrentPostType(),n=e(p.store).getPostType(t),{get:o}=e(B.store);return{permalink:e(xo).getPermalink(),isPublished:e(xo).isCurrentPostPublished(),label:n?.labels.view_item,hasLoaded:!!n,showIconLabels:o("core","showIconLabels")}}),[]);return n&&t&&e?(0,C.createElement)(Zo.Button,{icon:Eu,label:o||(0,d.__)("View post"),href:t,target:"_blank",showTooltip:!s}):null},PreviewDropdown:function({forceIsAutosaveable:e,disabled:t}){const{deviceType:n,homeUrl:o,isTemplate:s,isViewable:r,showIconLabels:i}=(0,a.useSelect)((e=>{var t;const{getDeviceType:n,getCurrentPostType:o}=e(xo),{getUnstableBase:s,getPostType:r}=e(p.store),{get:i}=e(B.store),a=o();return{deviceType:n(),homeUrl:s()?.home,isTemplate:"wp_template"===a,isViewable:null!==(t=r(a)?.viewable)&&void 0!==t&&t,showIconLabels:i("core","showIconLabels")}}),[]),{setDeviceType:l}=(0,a.useDispatch)(xo);if((0,No.useViewportMatch)("medium","<"))return null;const c={className:"editor-preview-dropdown__toggle",size:"compact",showTooltip:!i,disabled:t,__experimentalIsFocusable:t},u={"aria-label":(0,d.__)("View options")},m={mobile:bu,tablet:vu,desktop:yu};return(0,C.createElement)(Zo.DropdownMenu,{className:"editor-preview-dropdown",popoverProps:{placement:"bottom-end"},toggleProps:c,menuProps:u,icon:m[n.toLowerCase()],label:(0,d.__)("View"),disableOpenOnArrowDown:t},(({onClose:t})=>(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Zo.MenuGroup,null,(0,C.createElement)(Zo.MenuItem,{onClick:()=>l("Desktop"),icon:"Desktop"===n&&vr},(0,d.__)("Desktop")),(0,C.createElement)(Zo.MenuItem,{onClick:()=>l("Tablet"),icon:"Tablet"===n&&vr},(0,d.__)("Tablet")),(0,C.createElement)(Zo.MenuItem,{onClick:()=>l("Mobile"),icon:"Mobile"===n&&vr},(0,d.__)("Mobile"))),s&&(0,C.createElement)(Zo.MenuGroup,null,(0,C.createElement)(Zo.MenuItem,{href:o,target:"_blank",icon:Eu,onClick:t},(0,d.__)("View site"),(0,C.createElement)(Zo.VisuallyHidden,{as:"span"},(0,d.__)("(opens in a new tab)")))),r&&(0,C.createElement)(Zo.MenuGroup,null,(0,C.createElement)(Ei,{className:"editor-preview-dropdown__button-external",role:"menuitem",forceIsAutosaveable:e,textContent:(0,C.createElement)(C.Fragment,null,(0,d.__)("Preview in new tab"),(0,C.createElement)(Zo.Icon,{icon:Eu})),onPreview:t})))))},PreferencesModal:function({extraSections:e={},isActive:t,onClose:n}){const o=(0,No.useViewportMatch)("medium"),{showBlockBreadcrumbsOption:s}=(0,a.useSelect)((e=>{const{getEditorSettings:t}=e(xo),{get:n}=e(B.store),s=t().richEditingEnabled;return{showBlockBreadcrumbsOption:!n("core","distractionFree")&&o&&s}}),[o]),{setIsListViewOpened:r,setIsInserterOpened:i}=(0,a.useDispatch)(xo),{set:l}=(0,a.useDispatch)(B.store),c=()=>{l("core","fixedToolbar",!0),i(!1),r(!1)},u=()=>{l("core","distractionFree",!1)},p=(0,P.useMemo)((()=>[{name:"general",tabLabel:(0,d.__)("General"),content:(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Tu,{title:(0,d.__)("Interface")},(0,C.createElement)(xu,{scope:"core",featureName:"showListViewByDefault",help:(0,d.__)("Opens the block list view sidebar by default."),label:(0,d.__)("Always open list view")}),s&&(0,C.createElement)(xu,{scope:"core",featureName:"showBlockBreadcrumbs",help:(0,d.__)("Display the block hierarchy trail at the bottom of the editor."),label:(0,d.__)("Show block breadcrumbs")}),(0,C.createElement)(xu,{scope:"core",featureName:"allowRightClickOverrides",help:(0,d.__)("Allows contextual list view menus via right-click, overriding browser defaults."),label:(0,d.__)("Allow right-click contextual menus")})),(0,C.createElement)(Tu,{title:(0,d.__)("Document settings"),description:(0,d.__)("Select what settings are shown in the document panel.")},(0,C.createElement)(cu.Slot,null),(0,C.createElement)(ja,{taxonomyWrapper:(e,t)=>(0,C.createElement)(ru,{label:t.labels.menu_name,panelName:`taxonomy-panel-${t.slug}`})}),(0,C.createElement)(Xr,null,(0,C.createElement)(ru,{label:(0,d.__)("Featured image"),panelName:"featured-image"})),(0,C.createElement)(Gr,null,(0,C.createElement)(ru,{label:(0,d.__)("Excerpt"),panelName:"post-excerpt"})),(0,C.createElement)(Zs,{supportKeys:["comments","trackbacks"]},(0,C.createElement)(ru,{label:(0,d.__)("Discussion"),panelName:"discussion-panel"})),(0,C.createElement)(Ks,null,(0,C.createElement)(ru,{label:(0,d.__)("Page attributes"),panelName:"page-attributes"}))),e?.general)},{name:"appearance",tabLabel:(0,d.__)("Appearance"),content:(0,C.createElement)(Tu,{title:(0,d.__)("Appearance"),description:(0,d.__)("Customize the editor interface to suit your needs.")},(0,C.createElement)(xu,{scope:"core",featureName:"fixedToolbar",onToggle:u,help:(0,d.__)("Access all block and document tools in a single place."),label:(0,d.__)("Top toolbar")}),(0,C.createElement)(xu,{scope:"core",featureName:"distractionFree",onToggle:c,help:(0,d.__)("Reduce visual distractions by hiding the toolbar and other elements to focus on writing."),label:(0,d.__)("Distraction free")}),(0,C.createElement)(xu,{scope:"core",featureName:"focusMode",help:(0,d.__)("Highlights the current block and fades other content."),label:(0,d.__)("Spotlight mode")}),e?.appearance)},{name:"accessibility",tabLabel:(0,d.__)("Accessibility"),content:(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Tu,{title:(0,d.__)("Navigation"),description:(0,d.__)("Optimize the editing experience for enhanced control.")},(0,C.createElement)(xu,{scope:"core",featureName:"keepCaretInsideBlock",help:(0,d.__)("Keeps the text cursor within the block boundaries, aiding users with screen readers by preventing unintentional cursor movement outside the block."),label:(0,d.__)("Contain text cursor inside block")})),(0,C.createElement)(Tu,{title:(0,d.__)("Interface")},(0,C.createElement)(xu,{scope:"core",featureName:"showIconLabels",label:(0,d.__)("Show button text labels"),help:(0,d.__)("Show text instead of icons on buttons across the interface.")})))},{name:"blocks",tabLabel:(0,d.__)("Blocks"),content:(0,C.createElement)(C.Fragment,null,(0,C.createElement)(Tu,{title:(0,d.__)("Inserter")},(0,C.createElement)(xu,{scope:"core",featureName:"mostUsedBlocks",help:(0,d.__)("Adds a category with the most frequently used blocks in the inserter."),label:(0,d.__)("Show most used blocks")})),(0,C.createElement)(Tu,{title:(0,d.__)("Manage block visibility"),description:(0,d.__)("Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later.")},(0,C.createElement)(Su,null)))}]),[o,s,e]);return t?(0,C.createElement)(Pu,{closeModal:n},(0,C.createElement)(Cu,{sections:p})):null},useBlockEditorSettings:Dl})})(),(window.wp=window.wp||{}).editor=o})(); \ No newline at end of file
diff --git a/wp-includes/version.php b/wp-includes/version.php
index dea1b63..7fac17c 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '6.5';
+$wp_version = '6.5.2';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.