[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/dist/ -> edit-widgets.js (source)

   1  (function() {
   2  var wp;
   3  (wp ||= {}).editWidgets = (() => {
   4    var __create = Object.create;
   5    var __defProp = Object.defineProperty;
   6    var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
   7    var __getOwnPropNames = Object.getOwnPropertyNames;
   8    var __getProtoOf = Object.getPrototypeOf;
   9    var __hasOwnProp = Object.prototype.hasOwnProperty;
  10    var __commonJS = (cb, mod) => function __require() {
  11      return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  12    };
  13    var __export = (target, all) => {
  14      for (var name2 in all)
  15        __defProp(target, name2, { get: all[name2], enumerable: true });
  16    };
  17    var __copyProps = (to, from, except, desc) => {
  18      if (from && typeof from === "object" || typeof from === "function") {
  19        for (let key of __getOwnPropNames(from))
  20          if (!__hasOwnProp.call(to, key) && key !== except)
  21            __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  22      }
  23      return to;
  24    };
  25    var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  26      // If the importer is in node compatibility mode or this is not an ESM
  27      // file that has been converted to a CommonJS file using a Babel-
  28      // compatible transform (i.e. "__esModule" has not been set), then set
  29      // "default" to the CommonJS "module.exports" for node compatibility.
  30      isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  31      mod
  32    ));
  33    var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
  34  
  35    // package-external:@wordpress/blocks
  36    var require_blocks = __commonJS({
  37      "package-external:@wordpress/blocks"(exports, module) {
  38        module.exports = window.wp.blocks;
  39      }
  40    });
  41  
  42    // package-external:@wordpress/data
  43    var require_data = __commonJS({
  44      "package-external:@wordpress/data"(exports, module) {
  45        module.exports = window.wp.data;
  46      }
  47    });
  48  
  49    // package-external:@wordpress/deprecated
  50    var require_deprecated = __commonJS({
  51      "package-external:@wordpress/deprecated"(exports, module) {
  52        module.exports = window.wp.deprecated;
  53      }
  54    });
  55  
  56    // package-external:@wordpress/element
  57    var require_element = __commonJS({
  58      "package-external:@wordpress/element"(exports, module) {
  59        module.exports = window.wp.element;
  60      }
  61    });
  62  
  63    // package-external:@wordpress/block-library
  64    var require_block_library = __commonJS({
  65      "package-external:@wordpress/block-library"(exports, module) {
  66        module.exports = window.wp.blockLibrary;
  67      }
  68    });
  69  
  70    // package-external:@wordpress/core-data
  71    var require_core_data = __commonJS({
  72      "package-external:@wordpress/core-data"(exports, module) {
  73        module.exports = window.wp.coreData;
  74      }
  75    });
  76  
  77    // package-external:@wordpress/widgets
  78    var require_widgets = __commonJS({
  79      "package-external:@wordpress/widgets"(exports, module) {
  80        module.exports = window.wp.widgets;
  81      }
  82    });
  83  
  84    // package-external:@wordpress/preferences
  85    var require_preferences = __commonJS({
  86      "package-external:@wordpress/preferences"(exports, module) {
  87        module.exports = window.wp.preferences;
  88      }
  89    });
  90  
  91    // package-external:@wordpress/api-fetch
  92    var require_api_fetch = __commonJS({
  93      "package-external:@wordpress/api-fetch"(exports, module) {
  94        module.exports = window.wp.apiFetch;
  95      }
  96    });
  97  
  98    // package-external:@wordpress/i18n
  99    var require_i18n = __commonJS({
 100      "package-external:@wordpress/i18n"(exports, module) {
 101        module.exports = window.wp.i18n;
 102      }
 103    });
 104  
 105    // package-external:@wordpress/notices
 106    var require_notices = __commonJS({
 107      "package-external:@wordpress/notices"(exports, module) {
 108        module.exports = window.wp.notices;
 109      }
 110    });
 111  
 112    // package-external:@wordpress/components
 113    var require_components = __commonJS({
 114      "package-external:@wordpress/components"(exports, module) {
 115        module.exports = window.wp.components;
 116      }
 117    });
 118  
 119    // package-external:@wordpress/primitives
 120    var require_primitives = __commonJS({
 121      "package-external:@wordpress/primitives"(exports, module) {
 122        module.exports = window.wp.primitives;
 123      }
 124    });
 125  
 126    // vendor-external:react/jsx-runtime
 127    var require_jsx_runtime = __commonJS({
 128      "vendor-external:react/jsx-runtime"(exports, module) {
 129        module.exports = window.ReactJSXRuntime;
 130      }
 131    });
 132  
 133    // package-external:@wordpress/viewport
 134    var require_viewport = __commonJS({
 135      "package-external:@wordpress/viewport"(exports, module) {
 136        module.exports = window.wp.viewport;
 137      }
 138    });
 139  
 140    // package-external:@wordpress/compose
 141    var require_compose = __commonJS({
 142      "package-external:@wordpress/compose"(exports, module) {
 143        module.exports = window.wp.compose;
 144      }
 145    });
 146  
 147    // package-external:@wordpress/plugins
 148    var require_plugins = __commonJS({
 149      "package-external:@wordpress/plugins"(exports, module) {
 150        module.exports = window.wp.plugins;
 151      }
 152    });
 153  
 154    // vendor-external:react
 155    var require_react = __commonJS({
 156      "vendor-external:react"(exports, module) {
 157        module.exports = window.React;
 158      }
 159    });
 160  
 161    // vendor-external:react-dom
 162    var require_react_dom = __commonJS({
 163      "vendor-external:react-dom"(exports, module) {
 164        module.exports = window.ReactDOM;
 165      }
 166    });
 167  
 168    // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
 169    var require_use_sync_external_store_shim_development = __commonJS({
 170      "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
 171        "use strict";
 172        (function() {
 173          function is(x, y) {
 174            return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
 175          }
 176          function useSyncExternalStore$2(subscribe, getSnapshot) {
 177            didWarnOld18Alpha || void 0 === React59.startTransition || (didWarnOld18Alpha = true, console.error(
 178              "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
 179            ));
 180            var value = getSnapshot();
 181            if (!didWarnUncachedGetSnapshot) {
 182              var cachedValue = getSnapshot();
 183              objectIs(value, cachedValue) || (console.error(
 184                "The result of getSnapshot should be cached to avoid an infinite loop"
 185              ), didWarnUncachedGetSnapshot = true);
 186            }
 187            cachedValue = useState21({
 188              inst: { value, getSnapshot }
 189            });
 190            var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
 191            useLayoutEffect4(
 192              function() {
 193                inst.value = value;
 194                inst.getSnapshot = getSnapshot;
 195                checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 196              },
 197              [subscribe, value, getSnapshot]
 198            );
 199            useEffect26(
 200              function() {
 201                checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 202                return subscribe(function() {
 203                  checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 204                });
 205              },
 206              [subscribe]
 207            );
 208            useDebugValue2(value);
 209            return value;
 210          }
 211          function checkIfSnapshotChanged(inst) {
 212            var latestGetSnapshot = inst.getSnapshot;
 213            inst = inst.value;
 214            try {
 215              var nextValue = latestGetSnapshot();
 216              return !objectIs(inst, nextValue);
 217            } catch (error2) {
 218              return true;
 219            }
 220          }
 221          function useSyncExternalStore$1(subscribe, getSnapshot) {
 222            return getSnapshot();
 223          }
 224          "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
 225          var React59 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState21 = React59.useState, useEffect26 = React59.useEffect, useLayoutEffect4 = React59.useLayoutEffect, useDebugValue2 = React59.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
 226          exports.useSyncExternalStore = void 0 !== React59.useSyncExternalStore ? React59.useSyncExternalStore : shim;
 227          "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
 228        })();
 229      }
 230    });
 231  
 232    // node_modules/use-sync-external-store/shim/index.js
 233    var require_shim = __commonJS({
 234      "node_modules/use-sync-external-store/shim/index.js"(exports, module) {
 235        "use strict";
 236        if (false) {
 237          module.exports = null;
 238        } else {
 239          module.exports = require_use_sync_external_store_shim_development();
 240        }
 241      }
 242    });
 243  
 244    // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
 245    var require_with_selector_development = __commonJS({
 246      "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) {
 247        "use strict";
 248        (function() {
 249          function is(x, y) {
 250            return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
 251          }
 252          "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
 253          var React59 = require_react(), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore3 = shim.useSyncExternalStore, useRef27 = React59.useRef, useEffect26 = React59.useEffect, useMemo24 = React59.useMemo, useDebugValue2 = React59.useDebugValue;
 254          exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
 255            var instRef = useRef27(null);
 256            if (null === instRef.current) {
 257              var inst = { hasValue: false, value: null };
 258              instRef.current = inst;
 259            } else inst = instRef.current;
 260            instRef = useMemo24(
 261              function() {
 262                function memoizedSelector(nextSnapshot) {
 263                  if (!hasMemo) {
 264                    hasMemo = true;
 265                    memoizedSnapshot = nextSnapshot;
 266                    nextSnapshot = selector(nextSnapshot);
 267                    if (void 0 !== isEqual && inst.hasValue) {
 268                      var currentSelection = inst.value;
 269                      if (isEqual(currentSelection, nextSnapshot))
 270                        return memoizedSelection = currentSelection;
 271                    }
 272                    return memoizedSelection = nextSnapshot;
 273                  }
 274                  currentSelection = memoizedSelection;
 275                  if (objectIs(memoizedSnapshot, nextSnapshot))
 276                    return currentSelection;
 277                  var nextSelection = selector(nextSnapshot);
 278                  if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
 279                    return memoizedSnapshot = nextSnapshot, currentSelection;
 280                  memoizedSnapshot = nextSnapshot;
 281                  return memoizedSelection = nextSelection;
 282                }
 283                var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
 284                return [
 285                  function() {
 286                    return memoizedSelector(getSnapshot());
 287                  },
 288                  null === maybeGetServerSnapshot ? void 0 : function() {
 289                    return memoizedSelector(maybeGetServerSnapshot());
 290                  }
 291                ];
 292              },
 293              [getSnapshot, getServerSnapshot, selector, isEqual]
 294            );
 295            var value = useSyncExternalStore3(subscribe, instRef[0], instRef[1]);
 296            useEffect26(
 297              function() {
 298                inst.hasValue = true;
 299                inst.value = value;
 300              },
 301              [value]
 302            );
 303            useDebugValue2(value);
 304            return value;
 305          };
 306          "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
 307        })();
 308      }
 309    });
 310  
 311    // node_modules/use-sync-external-store/shim/with-selector.js
 312    var require_with_selector = __commonJS({
 313      "node_modules/use-sync-external-store/shim/with-selector.js"(exports, module) {
 314        "use strict";
 315        if (false) {
 316          module.exports = null;
 317        } else {
 318          module.exports = require_with_selector_development();
 319        }
 320      }
 321    });
 322  
 323    // package-external:@wordpress/theme
 324    var require_theme = __commonJS({
 325      "package-external:@wordpress/theme"(exports, module) {
 326        module.exports = window.wp.theme;
 327      }
 328    });
 329  
 330    // package-external:@wordpress/private-apis
 331    var require_private_apis = __commonJS({
 332      "package-external:@wordpress/private-apis"(exports, module) {
 333        module.exports = window.wp.privateApis;
 334      }
 335    });
 336  
 337    // package-external:@wordpress/a11y
 338    var require_a11y = __commonJS({
 339      "package-external:@wordpress/a11y"(exports, module) {
 340        module.exports = window.wp.a11y;
 341      }
 342    });
 343  
 344    // package-external:@wordpress/block-editor
 345    var require_block_editor = __commonJS({
 346      "package-external:@wordpress/block-editor"(exports, module) {
 347        module.exports = window.wp.blockEditor;
 348      }
 349    });
 350  
 351    // package-external:@wordpress/hooks
 352    var require_hooks = __commonJS({
 353      "package-external:@wordpress/hooks"(exports, module) {
 354        module.exports = window.wp.hooks;
 355      }
 356    });
 357  
 358    // package-external:@wordpress/media-utils
 359    var require_media_utils = __commonJS({
 360      "package-external:@wordpress/media-utils"(exports, module) {
 361        module.exports = window.wp.mediaUtils;
 362      }
 363    });
 364  
 365    // package-external:@wordpress/patterns
 366    var require_patterns = __commonJS({
 367      "package-external:@wordpress/patterns"(exports, module) {
 368        module.exports = window.wp.patterns;
 369      }
 370    });
 371  
 372    // package-external:@wordpress/keyboard-shortcuts
 373    var require_keyboard_shortcuts = __commonJS({
 374      "package-external:@wordpress/keyboard-shortcuts"(exports, module) {
 375        module.exports = window.wp.keyboardShortcuts;
 376      }
 377    });
 378  
 379    // package-external:@wordpress/keycodes
 380    var require_keycodes = __commonJS({
 381      "package-external:@wordpress/keycodes"(exports, module) {
 382        module.exports = window.wp.keycodes;
 383      }
 384    });
 385  
 386    // package-external:@wordpress/url
 387    var require_url = __commonJS({
 388      "package-external:@wordpress/url"(exports, module) {
 389        module.exports = window.wp.url;
 390      }
 391    });
 392  
 393    // package-external:@wordpress/dom
 394    var require_dom = __commonJS({
 395      "package-external:@wordpress/dom"(exports, module) {
 396        module.exports = window.wp.dom;
 397      }
 398    });
 399  
 400    // packages/edit-widgets/build-module/index.mjs
 401    var index_exports = {};
 402    __export(index_exports, {
 403      initialize: () => initialize,
 404      initializeEditor: () => initializeEditor,
 405      reinitializeEditor: () => reinitializeEditor,
 406      store: () => store2
 407    });
 408    var import_blocks3 = __toESM(require_blocks(), 1);
 409    var import_data32 = __toESM(require_data(), 1);
 410    var import_deprecated6 = __toESM(require_deprecated(), 1);
 411    var import_element70 = __toESM(require_element(), 1);
 412    var import_block_library = __toESM(require_block_library(), 1);
 413    var import_core_data12 = __toESM(require_core_data(), 1);
 414    var import_widgets5 = __toESM(require_widgets(), 1);
 415    var import_preferences10 = __toESM(require_preferences(), 1);
 416  
 417    // packages/edit-widgets/build-module/store/index.mjs
 418    var import_api_fetch = __toESM(require_api_fetch(), 1);
 419    var import_data8 = __toESM(require_data(), 1);
 420  
 421    // packages/edit-widgets/build-module/store/reducer.mjs
 422    var import_data = __toESM(require_data(), 1);
 423    function widgetAreasOpenState(state = {}, action) {
 424      const { type } = action;
 425      switch (type) {
 426        case "SET_WIDGET_AREAS_OPEN_STATE": {
 427          return action.widgetAreasOpenState;
 428        }
 429        case "SET_IS_WIDGET_AREA_OPEN": {
 430          const { clientId, isOpen } = action;
 431          return {
 432            ...state,
 433            [clientId]: isOpen
 434          };
 435        }
 436        default: {
 437          return state;
 438        }
 439      }
 440    }
 441    function blockInserterPanel(state = false, action) {
 442      switch (action.type) {
 443        case "SET_IS_LIST_VIEW_OPENED":
 444          return action.isOpen ? false : state;
 445        case "SET_IS_INSERTER_OPENED":
 446          return action.value;
 447      }
 448      return state;
 449    }
 450    function listViewPanel(state = false, action) {
 451      switch (action.type) {
 452        case "SET_IS_INSERTER_OPENED":
 453          return action.value ? false : state;
 454        case "SET_IS_LIST_VIEW_OPENED":
 455          return action.isOpen;
 456      }
 457      return state;
 458    }
 459    function listViewToggleRef(state = { current: null }) {
 460      return state;
 461    }
 462    function inserterSidebarToggleRef(state = { current: null }) {
 463      return state;
 464    }
 465    function widgetSavingLock(state = {}, action) {
 466      switch (action.type) {
 467        case "LOCK_WIDGET_SAVING":
 468          return { ...state, [action.lockName]: true };
 469        case "UNLOCK_WIDGET_SAVING": {
 470          const { [action.lockName]: removedLockName, ...restState } = state;
 471          return restState;
 472        }
 473      }
 474      return state;
 475    }
 476    var reducer_default = (0, import_data.combineReducers)({
 477      blockInserterPanel,
 478      inserterSidebarToggleRef,
 479      listViewPanel,
 480      listViewToggleRef,
 481      widgetAreasOpenState,
 482      widgetSavingLock
 483    });
 484  
 485    // packages/edit-widgets/build-module/store/resolvers.mjs
 486    var resolvers_exports = {};
 487    __export(resolvers_exports, {
 488      getWidgetAreas: () => getWidgetAreas,
 489      getWidgets: () => getWidgets
 490    });
 491    var import_blocks2 = __toESM(require_blocks(), 1);
 492    var import_core_data2 = __toESM(require_core_data(), 1);
 493  
 494    // packages/edit-widgets/build-module/store/actions.mjs
 495    var actions_exports2 = {};
 496    __export(actions_exports2, {
 497      closeGeneralSidebar: () => closeGeneralSidebar,
 498      lockWidgetSaving: () => lockWidgetSaving,
 499      moveBlockToWidgetArea: () => moveBlockToWidgetArea,
 500      persistStubPost: () => persistStubPost,
 501      saveEditedWidgetAreas: () => saveEditedWidgetAreas,
 502      saveWidgetArea: () => saveWidgetArea,
 503      saveWidgetAreas: () => saveWidgetAreas,
 504      setIsInserterOpened: () => setIsInserterOpened,
 505      setIsListViewOpened: () => setIsListViewOpened,
 506      setIsWidgetAreaOpen: () => setIsWidgetAreaOpen,
 507      setWidgetAreasOpenState: () => setWidgetAreasOpenState,
 508      setWidgetIdForClientId: () => setWidgetIdForClientId,
 509      unlockWidgetSaving: () => unlockWidgetSaving
 510    });
 511    var import_i18n8 = __toESM(require_i18n(), 1);
 512    var import_notices = __toESM(require_notices(), 1);
 513  
 514    // node_modules/clsx/dist/clsx.mjs
 515    function r(e) {
 516      var t, f, n = "";
 517      if ("string" == typeof e || "number" == typeof e) n += e;
 518      else if ("object" == typeof e) if (Array.isArray(e)) {
 519        var o = e.length;
 520        for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
 521      } else for (f in e) e[f] && (n && (n += " "), n += f);
 522      return n;
 523    }
 524    function clsx() {
 525      for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
 526      return n;
 527    }
 528    var clsx_default = clsx;
 529  
 530    // packages/interface/build-module/components/complementary-area/index.mjs
 531    var import_components4 = __toESM(require_components(), 1);
 532    var import_data6 = __toESM(require_data(), 1);
 533    var import_i18n = __toESM(require_i18n(), 1);
 534  
 535    // packages/icons/build-module/library/caution.mjs
 536    var import_primitives = __toESM(require_primitives(), 1);
 537    var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
 538    var caution_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M12 8L12 13M12 14.5L12 16M4.75 12C4.75 7.99593 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12C19.25 16.0041 16.0041 19.25 12 19.25C7.99594 19.25 4.75 16.0041 4.75 12Z", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) });
 539  
 540    // packages/icons/build-module/library/check.mjs
 541    var import_primitives2 = __toESM(require_primitives(), 1);
 542    var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
 543    var check_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "M7 12L10 15L17 8", vectorEffect: "non-scaling-stroke" }) });
 544  
 545    // packages/icons/build-module/library/chevron-down.mjs
 546    var import_primitives3 = __toESM(require_primitives(), 1);
 547    var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
 548    var chevron_down_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { d: "M7 11L12 15L17 11", vectorEffect: "non-scaling-stroke" }) });
 549  
 550    // packages/icons/build-module/library/close-small.mjs
 551    var import_primitives4 = __toESM(require_primitives(), 1);
 552    var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
 553    var close_small_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { d: "M7.75 16.25L16.25 7.75M16.25 16.25L7.75 7.75", vectorEffect: "non-scaling-stroke" }) });
 554  
 555    // packages/icons/build-module/library/drawer-left.mjs
 556    var import_primitives5 = __toESM(require_primitives(), 1);
 557    var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
 558    var drawer_left_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.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" }) });
 559  
 560    // packages/icons/build-module/library/drawer-right.mjs
 561    var import_primitives6 = __toESM(require_primitives(), 1);
 562    var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
 563    var drawer_right_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.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" }) });
 564  
 565    // packages/icons/build-module/library/error.mjs
 566    var import_primitives7 = __toESM(require_primitives(), 1);
 567    var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
 568    var error_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z" }) });
 569  
 570    // packages/icons/build-module/library/external.mjs
 571    var import_primitives8 = __toESM(require_primitives(), 1);
 572    var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
 573    var external_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.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" }) });
 574  
 575    // packages/icons/build-module/library/info.mjs
 576    var import_primitives9 = __toESM(require_primitives(), 1);
 577    var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
 578    var info_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.Path, { d: "M12 16V11M12 9.5V8M19.25 12C19.25 16.0041 16.0041 19.25 12 19.25C7.99594 19.25 4.75 16.0041 4.75 12C4.75 7.99594 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12Z", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) });
 579  
 580    // packages/icons/build-module/library/layout.mjs
 581    var import_primitives10 = __toESM(require_primitives(), 1);
 582    var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
 583    var layout_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.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" }) });
 584  
 585    // packages/icons/build-module/library/list-view.mjs
 586    var import_primitives11 = __toESM(require_primitives(), 1);
 587    var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
 588    var list_view_default = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.Path, { d: "M10 17.5H21M6.5 12H17.5M3 6.5H14", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) });
 589  
 590    // packages/icons/build-module/library/more-vertical.mjs
 591    var import_primitives12 = __toESM(require_primitives(), 1);
 592    var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
 593    var more_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.Path, { d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" }) });
 594  
 595    // packages/icons/build-module/library/plus.mjs
 596    var import_primitives13 = __toESM(require_primitives(), 1);
 597    var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
 598    var plus_default = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.Path, { d: "M12 18V6M18 12H6", vectorEffect: "non-scaling-stroke" }) });
 599  
 600    // packages/icons/build-module/library/published.mjs
 601    var import_primitives14 = __toESM(require_primitives(), 1);
 602    var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
 603    var published_default = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_primitives14.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
 604      /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives14.Path, { d: "M12 19.25C16.0041 19.25 19.25 16.0041 19.25 12C19.25 7.99594 16.0041 4.75 12 4.75C7.99594 4.75 4.75 7.99594 4.75 12C4.75 16.0041 7.99594 19.25 12 19.25Z", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }),
 605      /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives14.Path, { d: "M9 12L11 14L15 10", vectorEffect: "non-scaling-stroke" })
 606    ] });
 607  
 608    // packages/icons/build-module/library/redo.mjs
 609    var import_primitives15 = __toESM(require_primitives(), 1);
 610    var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
 611    var redo_default = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives15.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives15.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" }) });
 612  
 613    // packages/icons/build-module/library/star-empty.mjs
 614    var import_primitives16 = __toESM(require_primitives(), 1);
 615    var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
 616    var star_empty_default = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives16.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives16.Path, { d: "M12 5.71576L13.6106 8.97924C13.7563 9.27438 14.0379 9.47895 14.3636 9.52628L17.965 10.0496L15.359 12.5899C15.1233 12.8196 15.0157 13.1506 15.0714 13.475L15.6866 17.0619L12.4653 15.3684C12.174 15.2152 11.826 15.2152 11.5347 15.3684L8.31341 17.0619L8.92861 13.475C8.98425 13.1506 8.8767 12.8196 8.64102 12.5899L6.03497 10.0496L9.63644 9.52628C9.96215 9.47895 10.2437 9.27438 10.3894 8.97924L12 5.71576Z", vectorEffect: "non-scaling-stroke" }) });
 617  
 618    // packages/icons/build-module/library/star-filled.mjs
 619    var import_primitives17 = __toESM(require_primitives(), 1);
 620    var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
 621    var star_filled_default = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives17.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives17.Path, { d: "M12 5.71576L13.6106 8.97924C13.7563 9.27438 14.0379 9.47895 14.3636 9.52628L17.965 10.0496L15.359 12.5899C15.1233 12.8196 15.0157 13.1506 15.0714 13.475L15.6866 17.0619L12.4653 15.3684C12.174 15.2152 11.826 15.2152 11.5347 15.3684L8.31341 17.0619L8.92861 13.475C8.98425 13.1506 8.8767 12.8196 8.64102 12.5899L6.03497 10.0496L9.63644 9.52628C9.96215 9.47895 10.2437 9.27438 10.3894 8.97924L12 5.71576Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" }) });
 622  
 623    // packages/icons/build-module/library/undo.mjs
 624    var import_primitives18 = __toESM(require_primitives(), 1);
 625    var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
 626    var undo_default = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives18.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives18.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" }) });
 627  
 628    // packages/interface/build-module/components/complementary-area/index.mjs
 629    var import_element3 = __toESM(require_element(), 1);
 630    var import_viewport = __toESM(require_viewport(), 1);
 631    var import_preferences3 = __toESM(require_preferences(), 1);
 632    var import_compose2 = __toESM(require_compose(), 1);
 633    var import_plugins2 = __toESM(require_plugins(), 1);
 634  
 635    // packages/interface/build-module/components/complementary-area-toggle/index.mjs
 636    var import_components = __toESM(require_components(), 1);
 637    var import_data5 = __toESM(require_data(), 1);
 638    var import_plugins = __toESM(require_plugins(), 1);
 639  
 640    // packages/interface/build-module/store/index.mjs
 641    var import_data4 = __toESM(require_data(), 1);
 642  
 643    // packages/interface/build-module/store/actions.mjs
 644    var actions_exports = {};
 645    __export(actions_exports, {
 646      closeModal: () => closeModal,
 647      disableComplementaryArea: () => disableComplementaryArea,
 648      enableComplementaryArea: () => enableComplementaryArea,
 649      openModal: () => openModal,
 650      pinItem: () => pinItem,
 651      setDefaultComplementaryArea: () => setDefaultComplementaryArea,
 652      setFeatureDefaults: () => setFeatureDefaults,
 653      setFeatureValue: () => setFeatureValue,
 654      toggleFeature: () => toggleFeature,
 655      unpinItem: () => unpinItem
 656    });
 657    var import_deprecated2 = __toESM(require_deprecated(), 1);
 658    var import_preferences = __toESM(require_preferences(), 1);
 659  
 660    // packages/interface/build-module/store/deprecated.mjs
 661    var import_deprecated = __toESM(require_deprecated(), 1);
 662    function normalizeComplementaryAreaScope(scope) {
 663      if (["core/edit-post", "core/edit-site"].includes(scope)) {
 664        (0, import_deprecated.default)(`$scope} interface scope`, {
 665          alternative: "core interface scope",
 666          hint: "core/edit-post and core/edit-site are merging.",
 667          version: "6.6"
 668        });
 669        return "core";
 670      }
 671      return scope;
 672    }
 673    function normalizeComplementaryAreaName(scope, name2) {
 674      if (scope === "core" && name2 === "edit-site/template") {
 675        (0, import_deprecated.default)(`edit-site/template sidebar`, {
 676          alternative: "edit-post/document",
 677          version: "6.6"
 678        });
 679        return "edit-post/document";
 680      }
 681      if (scope === "core" && name2 === "edit-site/block-inspector") {
 682        (0, import_deprecated.default)(`edit-site/block-inspector sidebar`, {
 683          alternative: "edit-post/block",
 684          version: "6.6"
 685        });
 686        return "edit-post/block";
 687      }
 688      return name2;
 689    }
 690  
 691    // packages/interface/build-module/store/actions.mjs
 692    var setDefaultComplementaryArea = (scope, area) => {
 693      scope = normalizeComplementaryAreaScope(scope);
 694      area = normalizeComplementaryAreaName(scope, area);
 695      return {
 696        type: "SET_DEFAULT_COMPLEMENTARY_AREA",
 697        scope,
 698        area
 699      };
 700    };
 701    var enableComplementaryArea = (scope, area) => ({ registry, dispatch: dispatch2 }) => {
 702      if (!area) {
 703        return;
 704      }
 705      scope = normalizeComplementaryAreaScope(scope);
 706      area = normalizeComplementaryAreaName(scope, area);
 707      const isComplementaryAreaVisible = registry.select(import_preferences.store).get(scope, "isComplementaryAreaVisible");
 708      if (!isComplementaryAreaVisible) {
 709        registry.dispatch(import_preferences.store).set(scope, "isComplementaryAreaVisible", true);
 710      }
 711      dispatch2({
 712        type: "ENABLE_COMPLEMENTARY_AREA",
 713        scope,
 714        area
 715      });
 716    };
 717    var disableComplementaryArea = (scope) => ({ registry }) => {
 718      scope = normalizeComplementaryAreaScope(scope);
 719      const isComplementaryAreaVisible = registry.select(import_preferences.store).get(scope, "isComplementaryAreaVisible");
 720      if (isComplementaryAreaVisible) {
 721        registry.dispatch(import_preferences.store).set(scope, "isComplementaryAreaVisible", false);
 722      }
 723    };
 724    var pinItem = (scope, item) => ({ registry }) => {
 725      if (!item) {
 726        return;
 727      }
 728      scope = normalizeComplementaryAreaScope(scope);
 729      item = normalizeComplementaryAreaName(scope, item);
 730      const pinnedItems = registry.select(import_preferences.store).get(scope, "pinnedItems");
 731      if (pinnedItems?.[item] === true) {
 732        return;
 733      }
 734      registry.dispatch(import_preferences.store).set(scope, "pinnedItems", {
 735        ...pinnedItems,
 736        [item]: true
 737      });
 738    };
 739    var unpinItem = (scope, item) => ({ registry }) => {
 740      if (!item) {
 741        return;
 742      }
 743      scope = normalizeComplementaryAreaScope(scope);
 744      item = normalizeComplementaryAreaName(scope, item);
 745      const pinnedItems = registry.select(import_preferences.store).get(scope, "pinnedItems");
 746      registry.dispatch(import_preferences.store).set(scope, "pinnedItems", {
 747        ...pinnedItems,
 748        [item]: false
 749      });
 750    };
 751    function toggleFeature(scope, featureName) {
 752      return function({ registry }) {
 753        (0, import_deprecated2.default)(`dispatch( 'core/interface' ).toggleFeature`, {
 754          since: "6.0",
 755          alternative: `dispatch( 'core/preferences' ).toggle`
 756        });
 757        registry.dispatch(import_preferences.store).toggle(scope, featureName);
 758      };
 759    }
 760    function setFeatureValue(scope, featureName, value) {
 761      return function({ registry }) {
 762        (0, import_deprecated2.default)(`dispatch( 'core/interface' ).setFeatureValue`, {
 763          since: "6.0",
 764          alternative: `dispatch( 'core/preferences' ).set`
 765        });
 766        registry.dispatch(import_preferences.store).set(scope, featureName, !!value);
 767      };
 768    }
 769    function setFeatureDefaults(scope, defaults) {
 770      return function({ registry }) {
 771        (0, import_deprecated2.default)(`dispatch( 'core/interface' ).setFeatureDefaults`, {
 772          since: "6.0",
 773          alternative: `dispatch( 'core/preferences' ).setDefaults`
 774        });
 775        registry.dispatch(import_preferences.store).setDefaults(scope, defaults);
 776      };
 777    }
 778    function openModal(name2) {
 779      return {
 780        type: "OPEN_MODAL",
 781        name: name2
 782      };
 783    }
 784    function closeModal() {
 785      return {
 786        type: "CLOSE_MODAL"
 787      };
 788    }
 789  
 790    // packages/interface/build-module/store/selectors.mjs
 791    var selectors_exports = {};
 792    __export(selectors_exports, {
 793      getActiveComplementaryArea: () => getActiveComplementaryArea,
 794      isComplementaryAreaLoading: () => isComplementaryAreaLoading,
 795      isFeatureActive: () => isFeatureActive,
 796      isItemPinned: () => isItemPinned,
 797      isModalActive: () => isModalActive
 798    });
 799    var import_data2 = __toESM(require_data(), 1);
 800    var import_deprecated4 = __toESM(require_deprecated(), 1);
 801    var import_preferences2 = __toESM(require_preferences(), 1);
 802    var getActiveComplementaryArea = (0, import_data2.createRegistrySelector)(
 803      (select) => (state, scope) => {
 804        scope = normalizeComplementaryAreaScope(scope);
 805        const isComplementaryAreaVisible = select(import_preferences2.store).get(
 806          scope,
 807          "isComplementaryAreaVisible"
 808        );
 809        if (isComplementaryAreaVisible === void 0) {
 810          return void 0;
 811        }
 812        if (isComplementaryAreaVisible === false) {
 813          return null;
 814        }
 815        return state?.complementaryAreas?.[scope];
 816      }
 817    );
 818    var isComplementaryAreaLoading = (0, import_data2.createRegistrySelector)(
 819      (select) => (state, scope) => {
 820        scope = normalizeComplementaryAreaScope(scope);
 821        const isVisible = select(import_preferences2.store).get(
 822          scope,
 823          "isComplementaryAreaVisible"
 824        );
 825        const identifier = state?.complementaryAreas?.[scope];
 826        return isVisible && identifier === void 0;
 827      }
 828    );
 829    var isItemPinned = (0, import_data2.createRegistrySelector)(
 830      (select) => (state, scope, item) => {
 831        scope = normalizeComplementaryAreaScope(scope);
 832        item = normalizeComplementaryAreaName(scope, item);
 833        const pinnedItems = select(import_preferences2.store).get(
 834          scope,
 835          "pinnedItems"
 836        );
 837        return pinnedItems?.[item] ?? true;
 838      }
 839    );
 840    var isFeatureActive = (0, import_data2.createRegistrySelector)(
 841      (select) => (state, scope, featureName) => {
 842        (0, import_deprecated4.default)(
 843          `select( 'core/interface' ).isFeatureActive( scope, featureName )`,
 844          {
 845            since: "6.0",
 846            alternative: `select( 'core/preferences' ).get( scope, featureName )`
 847          }
 848        );
 849        return !!select(import_preferences2.store).get(scope, featureName);
 850      }
 851    );
 852    function isModalActive(state, modalName) {
 853      return state.activeModal === modalName;
 854    }
 855  
 856    // packages/interface/build-module/store/reducer.mjs
 857    var import_data3 = __toESM(require_data(), 1);
 858    function complementaryAreas(state = {}, action) {
 859      switch (action.type) {
 860        case "SET_DEFAULT_COMPLEMENTARY_AREA": {
 861          const { scope, area } = action;
 862          if (state[scope]) {
 863            return state;
 864          }
 865          return {
 866            ...state,
 867            [scope]: area
 868          };
 869        }
 870        case "ENABLE_COMPLEMENTARY_AREA": {
 871          const { scope, area } = action;
 872          return {
 873            ...state,
 874            [scope]: area
 875          };
 876        }
 877      }
 878      return state;
 879    }
 880    function activeModal(state = null, action) {
 881      switch (action.type) {
 882        case "OPEN_MODAL":
 883          return action.name;
 884        case "CLOSE_MODAL":
 885          return null;
 886      }
 887      return state;
 888    }
 889    var reducer_default2 = (0, import_data3.combineReducers)({
 890      complementaryAreas,
 891      activeModal
 892    });
 893  
 894    // packages/interface/build-module/store/constants.mjs
 895    var STORE_NAME = "core/interface";
 896  
 897    // packages/interface/build-module/store/index.mjs
 898    var store = (0, import_data4.createReduxStore)(STORE_NAME, {
 899      reducer: reducer_default2,
 900      actions: actions_exports,
 901      selectors: selectors_exports
 902    });
 903    (0, import_data4.register)(store);
 904  
 905    // packages/interface/build-module/components/complementary-area-toggle/index.mjs
 906    var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
 907    function roleSupportsCheckedState(role) {
 908      return [
 909        "checkbox",
 910        "option",
 911        "radio",
 912        "switch",
 913        "menuitemcheckbox",
 914        "menuitemradio",
 915        "treeitem"
 916      ].includes(role);
 917    }
 918    function ComplementaryAreaToggle({
 919      as = import_components.Button,
 920      scope,
 921      identifier: identifierProp,
 922      icon: iconProp,
 923      selectedIcon,
 924      name: name2,
 925      shortcut,
 926      ...props
 927    }) {
 928      const ComponentToUse = as;
 929      const context = (0, import_plugins.usePluginContext)();
 930      const icon = iconProp || context.icon;
 931      const identifier = identifierProp || `$context.name}/$name2}`;
 932      const isSelected = (0, import_data5.useSelect)(
 933        (select) => select(store).getActiveComplementaryArea(scope) === identifier,
 934        [identifier, scope]
 935      );
 936      const { enableComplementaryArea: enableComplementaryArea2, disableComplementaryArea: disableComplementaryArea2 } = (0, import_data5.useDispatch)(store);
 937      return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
 938        ComponentToUse,
 939        {
 940          icon: selectedIcon && isSelected ? selectedIcon : icon,
 941          "aria-controls": identifier.replace("/", ":"),
 942          "aria-checked": roleSupportsCheckedState(props.role) ? isSelected : void 0,
 943          onClick: () => {
 944            if (isSelected) {
 945              disableComplementaryArea2(scope);
 946            } else {
 947              enableComplementaryArea2(scope, identifier);
 948            }
 949          },
 950          shortcut,
 951          ...props
 952        }
 953      );
 954    }
 955  
 956    // packages/interface/build-module/components/complementary-area-header/index.mjs
 957    var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
 958    var ComplementaryAreaHeader = ({
 959      children,
 960      className,
 961      toggleButtonProps
 962    }) => {
 963      const toggleButton = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ComplementaryAreaToggle, { icon: close_small_default, ...toggleButtonProps });
 964      return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
 965        "div",
 966        {
 967          className: clsx_default(
 968            "components-panel__header",
 969            "interface-complementary-area-header",
 970            className
 971          ),
 972          tabIndex: -1,
 973          children: [
 974            children,
 975            toggleButton
 976          ]
 977        }
 978      );
 979    };
 980    var complementary_area_header_default = ComplementaryAreaHeader;
 981  
 982    // packages/interface/build-module/components/complementary-area-more-menu-item/index.mjs
 983    var import_compose = __toESM(require_compose(), 1);
 984    var import_element2 = __toESM(require_element(), 1);
 985  
 986    // packages/interface/build-module/components/action-item/index.mjs
 987    var import_components2 = __toESM(require_components(), 1);
 988    var import_element = __toESM(require_element(), 1);
 989    var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
 990    function ActionItemSlot({
 991      name: name2,
 992      as: Component2 = import_components2.MenuGroup,
 993      fillProps = {},
 994      children,
 995      ...props
 996    }) {
 997      return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components2.Slot, { name: name2, fillProps, children: (fills) => {
 998        const items = import_element.Children.toArray(fills);
 999        if (!items.length) {
1000          return null;
1001        }
1002        if (typeof children === "function") {
1003          return children(items);
1004        }
1005        return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Component2, { ...props, children: items });
1006      } });
1007    }
1008    function ActionItem({ name: name2, as, onClick, ...props }) {
1009      return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components2.Fill, { name: name2, children: ({ as: slotAs = import_components2.MenuItem, onClick: slotOnClick }) => {
1010        const Component2 = as ?? slotAs;
1011        const handlers = [onClick, slotOnClick].filter(Boolean);
1012        return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1013          Component2,
1014          {
1015            onClick: handlers.length ? (...args) => handlers.forEach(
1016              (handler) => handler(...args)
1017            ) : void 0,
1018            ...props
1019          }
1020        );
1021      } });
1022    }
1023    ActionItem.Slot = ActionItemSlot;
1024    var action_item_default = ActionItem;
1025  
1026    // packages/interface/build-module/components/complementary-area-more-menu-item/index.mjs
1027    var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
1028    var menuItems = (0, import_compose.observableMap)();
1029    function useHasComplementaryAreaMenuItem(scope, target) {
1030      return !!(0, import_compose.useObservableValue)(menuItems, `$scope}/$target}`);
1031    }
1032    function DefaultComplementaryAreaMoreMenuItem({
1033      scope,
1034      target,
1035      ...props
1036    }) {
1037      return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1038        ComplementaryAreaToggle,
1039        {
1040          as: (toggleProps) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1041            action_item_default,
1042            {
1043              name: `$scope}/plugin-more-menu`,
1044              ...toggleProps
1045            }
1046          ),
1047          role: "menuitemcheckbox",
1048          name: target,
1049          scope,
1050          ...props
1051        }
1052      );
1053    }
1054  
1055    // packages/interface/build-module/components/pinned-items/index.mjs
1056    var import_components3 = __toESM(require_components(), 1);
1057    var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
1058    function PinnedItems({ scope, ...props }) {
1059      return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components3.Fill, { name: `PinnedItems/$scope}`, ...props });
1060    }
1061    function PinnedItemsSlot({ scope, className, ...props }) {
1062      return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components3.Slot, { name: `PinnedItems/$scope}`, ...props, children: (fills) => fills?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1063        "div",
1064        {
1065          className: clsx_default(
1066            className,
1067            "interface-pinned-items"
1068          ),
1069          children: fills
1070        }
1071      ) });
1072    }
1073    PinnedItems.Slot = PinnedItemsSlot;
1074    var pinned_items_default = PinnedItems;
1075  
1076    // packages/interface/build-module/components/complementary-area/index.mjs
1077    var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
1078    var ANIMATION_DURATION = 0.3;
1079    function ComplementaryAreaSlot({ scope, ...props }) {
1080      return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components4.Slot, { name: `ComplementaryArea/$scope}`, ...props });
1081    }
1082    var variants = {
1083      // `auto` leaves the width to the area's own stylesheet, so it stays in one
1084      // place. framer-motion measures the element to animate, then restores
1085      // `auto`.
1086      open: { width: "auto" },
1087      // Resolved with the `custom` value passed to `AnimatePresence`, which is
1088      // the only way an already removed element can be given a fresh transition.
1089      closed: (transition) => ({ width: 0, transition })
1090    };
1091    function renderContainer(render, props) {
1092      if ((0, import_element3.isValidElement)(render)) {
1093        return (0, import_element3.cloneElement)(render, {
1094          ...props,
1095          className: clsx_default(render.props.className, props.className),
1096          style: { ...render.props.style, ...props.style }
1097        });
1098      }
1099      return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ...props });
1100    }
1101    function ComplementaryAreaFill({
1102      activeArea,
1103      isActive,
1104      scope,
1105      children,
1106      className,
1107      id,
1108      render
1109    }) {
1110      const disableMotion = (0, import_compose2.useReducedMotion)();
1111      const isMobileViewport = (0, import_compose2.useViewportMatch)("medium", "<");
1112      const previousActiveArea = (0, import_compose2.usePrevious)(activeArea);
1113      const isSwitchingAreas = !!previousActiveArea && !!activeArea && activeArea !== previousActiveArea;
1114      const transition = {
1115        type: "tween",
1116        duration: disableMotion || isMobileViewport || isSwitchingAreas ? 0 : ANIMATION_DURATION,
1117        ease: [0.6, 0, 0.4, 1]
1118      };
1119      return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components4.Fill, { name: `ComplementaryArea/$scope}`, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components4.__unstableAnimatePresence, { initial: false, custom: transition, children: isActive && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1120        import_components4.__unstableMotion.div,
1121        {
1122          variants,
1123          initial: "closed",
1124          animate: "open",
1125          exit: "closed",
1126          transition,
1127          className: "interface-complementary-area__fill",
1128          children: renderContainer(render, {
1129            id,
1130            className,
1131            children
1132          })
1133        }
1134      ) }) });
1135    }
1136    function useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall) {
1137      const previousIsSmallRef = (0, import_element3.useRef)(false);
1138      const shouldOpenWhenNotSmallRef = (0, import_element3.useRef)(false);
1139      const { enableComplementaryArea: enableComplementaryArea2, disableComplementaryArea: disableComplementaryArea2 } = (0, import_data6.useDispatch)(store);
1140      (0, import_element3.useEffect)(() => {
1141        if (isActive && isSmall && !previousIsSmallRef.current) {
1142          disableComplementaryArea2(scope);
1143          shouldOpenWhenNotSmallRef.current = true;
1144        } else if (
1145          // If there is a flag indicating the complementary area should be
1146          // enabled when we go from small to big window size and we are going
1147          // from a small to big window size.
1148          shouldOpenWhenNotSmallRef.current && !isSmall && previousIsSmallRef.current
1149        ) {
1150          shouldOpenWhenNotSmallRef.current = false;
1151          enableComplementaryArea2(scope, identifier);
1152        } else if (
1153          // If the flag is indicating the current complementary should be
1154          // reopened but another complementary area becomes active, remove
1155          // the flag.
1156          shouldOpenWhenNotSmallRef.current && activeArea && activeArea !== identifier
1157        ) {
1158          shouldOpenWhenNotSmallRef.current = false;
1159        }
1160        if (isSmall !== previousIsSmallRef.current) {
1161          previousIsSmallRef.current = isSmall;
1162        }
1163      }, [
1164        isActive,
1165        isSmall,
1166        scope,
1167        identifier,
1168        activeArea,
1169        disableComplementaryArea2,
1170        enableComplementaryArea2
1171      ]);
1172    }
1173    function ComplementaryArea({
1174      children,
1175      className,
1176      closeLabel = (0, import_i18n.__)("Close plugin"),
1177      identifier: identifierProp,
1178      header,
1179      headerClassName,
1180      icon: iconProp,
1181      isPinnable = true,
1182      panelClassName,
1183      render,
1184      scope,
1185      name: name2,
1186      title,
1187      toggleShortcut,
1188      isActiveByDefault
1189    }) {
1190      const context = (0, import_plugins2.usePluginContext)();
1191      const icon = iconProp || context.icon;
1192      const identifier = identifierProp || `$context.name}/$name2}`;
1193      const [isReady, setIsReady] = (0, import_element3.useState)(false);
1194      const {
1195        isLoading,
1196        isActive,
1197        isPinned,
1198        activeArea,
1199        isSmall,
1200        isLarge,
1201        showIconLabels
1202      } = (0, import_data6.useSelect)(
1203        (select) => {
1204          const {
1205            getActiveComplementaryArea: getActiveComplementaryArea2,
1206            isComplementaryAreaLoading: isComplementaryAreaLoading2,
1207            isItemPinned: isItemPinned2
1208          } = select(store);
1209          const { get } = select(import_preferences3.store);
1210          const _activeArea = getActiveComplementaryArea2(scope);
1211          return {
1212            isLoading: isComplementaryAreaLoading2(scope),
1213            isActive: _activeArea === identifier,
1214            isPinned: isItemPinned2(scope, identifier),
1215            activeArea: _activeArea,
1216            isSmall: select(import_viewport.store).isViewportMatch("< medium"),
1217            isLarge: select(import_viewport.store).isViewportMatch("large"),
1218            showIconLabels: get("core", "showIconLabels")
1219          };
1220        },
1221        [identifier, scope]
1222      );
1223      const hasMenuItem = useHasComplementaryAreaMenuItem(scope, name2);
1224      const isMobileViewport = (0, import_compose2.useViewportMatch)("medium", "<");
1225      useAdjustComplementaryListener(
1226        scope,
1227        identifier,
1228        activeArea,
1229        isActive,
1230        isSmall
1231      );
1232      const {
1233        enableComplementaryArea: enableComplementaryArea2,
1234        disableComplementaryArea: disableComplementaryArea2,
1235        pinItem: pinItem2,
1236        unpinItem: unpinItem2
1237      } = (0, import_data6.useDispatch)(store);
1238      (0, import_element3.useEffect)(() => {
1239        if (isActiveByDefault && activeArea === void 0 && !isSmall) {
1240          enableComplementaryArea2(scope, identifier);
1241        } else if (activeArea === void 0 && isSmall) {
1242          disableComplementaryArea2(scope, identifier);
1243        }
1244        setIsReady(true);
1245      }, [
1246        activeArea,
1247        isActiveByDefault,
1248        scope,
1249        identifier,
1250        isSmall,
1251        enableComplementaryArea2,
1252        disableComplementaryArea2
1253      ]);
1254      if (!isReady) {
1255        return;
1256      }
1257      return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
1258        isPinnable && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(pinned_items_default, { scope, children: isPinned && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1259          ComplementaryAreaToggle,
1260          {
1261            scope,
1262            identifier,
1263            isPressed: isActive && (!showIconLabels || isLarge),
1264            "aria-expanded": isActive,
1265            "aria-disabled": isLoading,
1266            label: title,
1267            icon: showIconLabels ? check_default : icon,
1268            showTooltip: !showIconLabels,
1269            variant: showIconLabels ? "tertiary" : void 0,
1270            size: "compact",
1271            shortcut: toggleShortcut
1272          }
1273        ) }),
1274        name2 && isPinnable && !hasMenuItem && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1275          DefaultComplementaryAreaMoreMenuItem,
1276          {
1277            target: name2,
1278            scope,
1279            icon,
1280            identifier,
1281            children: title
1282          }
1283        ),
1284        /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1285          ComplementaryAreaFill,
1286          {
1287            activeArea,
1288            isActive,
1289            className: clsx_default("interface-complementary-area", className),
1290            scope,
1291            id: identifier.replace("/", ":"),
1292            render,
1293            children: [
1294              /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1295                complementary_area_header_default,
1296                {
1297                  className: headerClassName,
1298                  closeLabel,
1299                  onClose: () => disableComplementaryArea2(scope),
1300                  toggleButtonProps: {
1301                    label: closeLabel,
1302                    size: "compact",
1303                    shortcut: toggleShortcut,
1304                    scope,
1305                    identifier
1306                  },
1307                  children: header || /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
1308                    /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h2", { className: "interface-complementary-area-header__title", children: title }),
1309                    isPinnable && !isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1310                      import_components4.Button,
1311                      {
1312                        className: "interface-complementary-area__pin-unpin-item",
1313                        icon: isPinned ? star_filled_default : star_empty_default,
1314                        label: isPinned ? (0, import_i18n.__)("Unpin from toolbar") : (0, import_i18n.__)("Pin to toolbar"),
1315                        onClick: () => (isPinned ? unpinItem2 : pinItem2)(
1316                          scope,
1317                          identifier
1318                        ),
1319                        isPressed: isPinned,
1320                        size: "compact"
1321                      }
1322                    )
1323                  ] })
1324                }
1325              ),
1326              /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components4.Panel, { className: panelClassName, children })
1327            ]
1328          }
1329        )
1330      ] });
1331    }
1332    ComplementaryArea.Slot = ComplementaryAreaSlot;
1333    var complementary_area_default = ComplementaryArea;
1334  
1335    // node_modules/@base-ui/utils/useControlled.mjs
1336    var React = __toESM(require_react(), 1);
1337  
1338    // node_modules/@base-ui/utils/error.mjs
1339    var set;
1340    if (true) {
1341      set = /* @__PURE__ */ new Set();
1342    }
1343    function error(...messages) {
1344      if (true) {
1345        const messageKey = messages.join(" ");
1346        if (!set.has(messageKey)) {
1347          set.add(messageKey);
1348          console.error(`Base UI: $messageKey}`);
1349        }
1350      }
1351    }
1352  
1353    // node_modules/@base-ui/utils/useControlled.mjs
1354    function useControlled({
1355      controlled,
1356      default: defaultProp,
1357      name: name2,
1358      state = "value"
1359    }) {
1360      const {
1361        current: isControlled
1362      } = React.useRef(controlled !== void 0);
1363      const [valueState, setValue] = React.useState(defaultProp);
1364      const value = isControlled ? controlled : valueState;
1365      if (true) {
1366        React.useEffect(() => {
1367          if (isControlled !== (controlled !== void 0)) {
1368            error([`A component is changing the $isControlled ? "" : "un"}controlled $state} state of $name2} to be $isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled $name2} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join("\n"));
1369          }
1370        }, [state, name2, controlled]);
1371        const {
1372          current: defaultValue
1373        } = React.useRef(defaultProp);
1374        React.useEffect(() => {
1375          if (!isControlled && serializeToDevModeString(defaultValue) !== serializeToDevModeString(defaultProp)) {
1376            error([`A component is changing the default $state} state of an uncontrolled $name2} after being initialized. To suppress this warning opt to use a controlled $name2}.`].join("\n"));
1377          }
1378        }, [defaultProp]);
1379      }
1380      const setValueIfUncontrolled = React.useCallback((newValue) => {
1381        if (!isControlled) {
1382          setValue(newValue);
1383        }
1384      }, []);
1385      return [value, setValueIfUncontrolled];
1386    }
1387    function serializeToDevModeString(input) {
1388      let nextId = 0;
1389      const seen = /* @__PURE__ */ new WeakMap();
1390      try {
1391        const result = JSON.stringify(input, function replacer(key, value) {
1392          if (key === "_owner" && this != null && typeof this === "object" && "$$typeof" in this) {
1393            return void 0;
1394          }
1395          if (typeof value === "bigint") {
1396            return `__bigint__:$value}`;
1397          }
1398          if (value !== null && typeof value === "object") {
1399            const id = seen.get(value);
1400            if (id !== void 0) {
1401              return `__object__:$id}`;
1402            }
1403            seen.set(value, nextId);
1404            nextId += 1;
1405          }
1406          return value;
1407        });
1408        return result ?? `__top__:$typeof input}`;
1409      } catch {
1410        return "__unserializable__";
1411      }
1412    }
1413  
1414    // node_modules/@base-ui/utils/safeReact.mjs
1415    var React2 = __toESM(require_react(), 1);
1416    var SafeReact = {
1417      ...React2
1418    };
1419  
1420    // node_modules/@base-ui/utils/useRefWithInit.mjs
1421    var React3 = __toESM(require_react(), 1);
1422    var UNINITIALIZED = {};
1423    function useRefWithInit(init, initArg) {
1424      const ref = React3.useRef(UNINITIALIZED);
1425      if (ref.current === UNINITIALIZED) {
1426        ref.current = init(initArg);
1427      }
1428      return ref;
1429    }
1430  
1431    // node_modules/@base-ui/utils/useStableCallback.mjs
1432    var useInsertionEffect = SafeReact.useInsertionEffect;
1433    var useSafeInsertionEffect = (
1434      // React 17 doesn't have useInsertionEffect.
1435      useInsertionEffect && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late.
1436      useInsertionEffect !== SafeReact.useLayoutEffect ? useInsertionEffect : (fn) => fn()
1437    );
1438    function useStableCallback(callback) {
1439      const stable = useRefWithInit(createStableCallback).current;
1440      stable.next = callback;
1441      useSafeInsertionEffect(stable.effect);
1442      return stable.trampoline;
1443    }
1444    function createStableCallback() {
1445      const stable = {
1446        next: void 0,
1447        callback: assertNotCalled,
1448        trampoline: (...args) => stable.callback?.(...args),
1449        effect: () => {
1450          stable.callback = stable.next;
1451        }
1452      };
1453      return stable;
1454    }
1455    function assertNotCalled() {
1456      if (true) {
1457        throw (
1458          /* minify-error-disabled */
1459          new Error("Base UI: Cannot call an event handler while rendering.")
1460        );
1461      }
1462    }
1463  
1464    // node_modules/@base-ui/utils/warn.mjs
1465    var set2;
1466    if (true) {
1467      set2 = /* @__PURE__ */ new Set();
1468    }
1469    function warn(...messages) {
1470      if (true) {
1471        const messageKey = messages.join(" ");
1472        if (!set2.has(messageKey)) {
1473          set2.add(messageKey);
1474          console.warn(`Base UI: $messageKey}`);
1475        }
1476      }
1477    }
1478  
1479    // node_modules/@base-ui/utils/useIsoLayoutEffect.mjs
1480    var React4 = __toESM(require_react(), 1);
1481    var noop = () => {
1482    };
1483    var useIsoLayoutEffect = typeof document !== "undefined" ? React4.useLayoutEffect : noop;
1484  
1485    // node_modules/@base-ui/react/internals/useRenderElement.mjs
1486    var React7 = __toESM(require_react(), 1);
1487  
1488    // node_modules/@base-ui/utils/useMergedRefs.mjs
1489    function useMergedRefs(a, b, c, d) {
1490      const forkRef = useRefWithInit(createForkRef).current;
1491      if (didChange(forkRef, a, b, c, d)) {
1492        update(forkRef, [a, b, c, d]);
1493      }
1494      return forkRef.callback;
1495    }
1496    function useMergedRefsN(refs) {
1497      const forkRef = useRefWithInit(createForkRef).current;
1498      if (didChangeN(forkRef, refs)) {
1499        update(forkRef, refs);
1500      }
1501      return forkRef.callback;
1502    }
1503    function createForkRef() {
1504      return {
1505        callback: null,
1506        cleanup: null,
1507        refs: []
1508      };
1509    }
1510    function didChange(forkRef, a, b, c, d) {
1511      return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
1512    }
1513    function didChangeN(forkRef, newRefs) {
1514      return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index2) => ref !== newRefs[index2]);
1515    }
1516    function update(forkRef, refs) {
1517      forkRef.refs = refs;
1518      if (refs.every((ref) => ref == null)) {
1519        forkRef.callback = null;
1520        return;
1521      }
1522      forkRef.callback = (instance) => {
1523        if (forkRef.cleanup) {
1524          forkRef.cleanup();
1525          forkRef.cleanup = null;
1526        }
1527        if (instance != null) {
1528          const cleanupCallbacks = Array(refs.length).fill(null);
1529          for (let i = 0; i < refs.length; i += 1) {
1530            const ref = refs[i];
1531            if (ref == null) {
1532              continue;
1533            }
1534            switch (typeof ref) {
1535              case "function": {
1536                const refCleanup = ref(instance);
1537                if (typeof refCleanup === "function") {
1538                  cleanupCallbacks[i] = refCleanup;
1539                }
1540                break;
1541              }
1542              case "object": {
1543                ref.current = instance;
1544                break;
1545              }
1546              default:
1547            }
1548          }
1549          forkRef.cleanup = () => {
1550            for (let i = 0; i < refs.length; i += 1) {
1551              const ref = refs[i];
1552              if (ref == null) {
1553                continue;
1554              }
1555              switch (typeof ref) {
1556                case "function": {
1557                  const cleanupCallback = cleanupCallbacks[i];
1558                  if (typeof cleanupCallback === "function") {
1559                    cleanupCallback();
1560                  } else {
1561                    void ref(null);
1562                  }
1563                  break;
1564                }
1565                case "object": {
1566                  ref.current = null;
1567                  break;
1568                }
1569                default:
1570              }
1571            }
1572          };
1573        }
1574      };
1575    }
1576  
1577    // node_modules/@base-ui/utils/getReactElementRef.mjs
1578    var React6 = __toESM(require_react(), 1);
1579  
1580    // node_modules/@base-ui/utils/reactVersion.mjs
1581    var React5 = __toESM(require_react(), 1);
1582    var majorVersion = parseInt(React5.version, 10);
1583    function isReactVersionAtLeast(reactVersionToCheck) {
1584      return majorVersion >= reactVersionToCheck;
1585    }
1586  
1587    // node_modules/@base-ui/utils/getReactElementRef.mjs
1588    function getReactElementRef(element) {
1589      if (!/* @__PURE__ */ React6.isValidElement(element)) {
1590        return null;
1591      }
1592      const reactElement = element;
1593      const propsWithRef = reactElement.props;
1594      return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
1595    }
1596  
1597    // node_modules/@base-ui/utils/mergeObjects.mjs
1598    function mergeObjects(a, b) {
1599      if (a && !b) {
1600        return a;
1601      }
1602      if (!a && b) {
1603        return b;
1604      }
1605      if (a || b) {
1606        return {
1607          ...a,
1608          ...b
1609        };
1610      }
1611      return void 0;
1612    }
1613  
1614    // node_modules/@base-ui/utils/empty.mjs
1615    function NOOP() {
1616    }
1617    var EMPTY_ARRAY = Object.freeze([]);
1618    var EMPTY_OBJECT = Object.freeze({});
1619  
1620    // node_modules/@base-ui/react/internals/getStateAttributesProps.mjs
1621    function getStateAttributesProps(state, customMapping) {
1622      const props = {};
1623      for (const key in state) {
1624        const value = state[key];
1625        if (customMapping?.hasOwnProperty(key)) {
1626          const customProps = customMapping[key](value);
1627          if (customProps != null) {
1628            Object.assign(props, customProps);
1629          }
1630          continue;
1631        }
1632        if (value === true) {
1633          props[`data-$key.toLowerCase()}`] = "";
1634        } else if (value) {
1635          props[`data-$key.toLowerCase()}`] = value.toString();
1636        }
1637      }
1638      return props;
1639    }
1640  
1641    // node_modules/@base-ui/react/utils/resolveClassName.mjs
1642    function resolveClassName(className, state) {
1643      return typeof className === "function" ? className(state) : className;
1644    }
1645  
1646    // node_modules/@base-ui/react/utils/resolveStyle.mjs
1647    function resolveStyle(style, state) {
1648      return typeof style === "function" ? style(state) : style;
1649    }
1650  
1651    // node_modules/@base-ui/react/merge-props/mergeProps.mjs
1652    var EMPTY_PROPS = {};
1653    function mergeProps(a, b, c, d, e) {
1654      if (!c && !d && !e && !a) {
1655        return createInitialMergedProps(b);
1656      }
1657      let merged = createInitialMergedProps(a);
1658      if (b) {
1659        merged = mergeInto(merged, b);
1660      }
1661      if (c) {
1662        merged = mergeInto(merged, c);
1663      }
1664      if (d) {
1665        merged = mergeInto(merged, d);
1666      }
1667      if (e) {
1668        merged = mergeInto(merged, e);
1669      }
1670      return merged;
1671    }
1672    function mergePropsN(props) {
1673      if (props.length === 0) {
1674        return EMPTY_PROPS;
1675      }
1676      if (props.length === 1) {
1677        return createInitialMergedProps(props[0]);
1678      }
1679      let merged = createInitialMergedProps(props[0]);
1680      for (let i = 1; i < props.length; i += 1) {
1681        merged = mergeInto(merged, props[i]);
1682      }
1683      return merged;
1684    }
1685    function createInitialMergedProps(inputProps) {
1686      if (isPropsGetter(inputProps)) {
1687        return {
1688          ...resolvePropsGetter(inputProps, EMPTY_PROPS)
1689        };
1690      }
1691      return copyInitialProps(inputProps);
1692    }
1693    function mergeInto(merged, inputProps) {
1694      if (isPropsGetter(inputProps)) {
1695        return resolvePropsGetter(inputProps, merged);
1696      }
1697      return mutablyMergeInto(merged, inputProps);
1698    }
1699    function copyInitialProps(inputProps) {
1700      const copiedProps = {
1701        ...inputProps
1702      };
1703      for (const propName in copiedProps) {
1704        const propValue = copiedProps[propName];
1705        if (isEventHandler(propName, propValue)) {
1706          copiedProps[propName] = wrapEventHandler(propValue);
1707        }
1708      }
1709      return copiedProps;
1710    }
1711    function mutablyMergeInto(mergedProps, externalProps) {
1712      if (!externalProps) {
1713        return mergedProps;
1714      }
1715      for (const propName in externalProps) {
1716        const externalPropValue = externalProps[propName];
1717        switch (propName) {
1718          case "style": {
1719            mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
1720            break;
1721          }
1722          case "className": {
1723            mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
1724            break;
1725          }
1726          default: {
1727            if (isEventHandler(propName, externalPropValue)) {
1728              mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
1729            } else {
1730              mergedProps[propName] = externalPropValue;
1731            }
1732          }
1733        }
1734      }
1735      return mergedProps;
1736    }
1737    function isEventHandler(key, value) {
1738      const code0 = key.charCodeAt(0);
1739      const code1 = key.charCodeAt(1);
1740      const code2 = key.charCodeAt(2);
1741      return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
1742    }
1743    function isPropsGetter(inputProps) {
1744      return typeof inputProps === "function";
1745    }
1746    function resolvePropsGetter(inputProps, previousProps) {
1747      if (isPropsGetter(inputProps)) {
1748        return inputProps(previousProps);
1749      }
1750      return inputProps ?? EMPTY_PROPS;
1751    }
1752    function mergeEventHandlers(ourHandler, theirHandler) {
1753      if (!theirHandler) {
1754        return ourHandler;
1755      }
1756      if (!ourHandler) {
1757        return wrapEventHandler(theirHandler);
1758      }
1759      return (...args) => {
1760        const event = args[0];
1761        if (isSyntheticEvent(event)) {
1762          const baseUIEvent = event;
1763          makeEventPreventable(baseUIEvent);
1764          const result2 = theirHandler(...args);
1765          if (!baseUIEvent.baseUIHandlerPrevented) {
1766            ourHandler?.(...args);
1767          }
1768          return result2;
1769        }
1770        const result = theirHandler(...args);
1771        ourHandler?.(...args);
1772        return result;
1773      };
1774    }
1775    function wrapEventHandler(handler) {
1776      if (!handler) {
1777        return handler;
1778      }
1779      return (...args) => {
1780        const event = args[0];
1781        if (isSyntheticEvent(event)) {
1782          makeEventPreventable(event);
1783        }
1784        return handler(...args);
1785      };
1786    }
1787    function makeEventPreventable(event) {
1788      event.preventBaseUIHandler = () => {
1789        event.baseUIHandlerPrevented = true;
1790      };
1791      return event;
1792    }
1793    function mergeClassNames(ourClassName, theirClassName) {
1794      if (theirClassName) {
1795        if (ourClassName) {
1796          return theirClassName + " " + ourClassName;
1797        }
1798        return theirClassName;
1799      }
1800      return ourClassName;
1801    }
1802    function isSyntheticEvent(event) {
1803      return event != null && typeof event === "object" && "nativeEvent" in event;
1804    }
1805  
1806    // node_modules/@base-ui/react/internals/useRenderElement.mjs
1807    var import_react = __toESM(require_react(), 1);
1808    function useRenderElement(element, componentProps, params = {}) {
1809      const renderProp = componentProps.render;
1810      const outProps = useRenderElementProps(componentProps, params);
1811      if (params.enabled === false) {
1812        return null;
1813      }
1814      const state = params.state ?? EMPTY_OBJECT;
1815      return evaluateRenderProp(element, renderProp, outProps, state);
1816    }
1817    function useRenderElementProps(componentProps, params = {}) {
1818      const {
1819        className: classNameProp,
1820        style: styleProp,
1821        render: renderProp
1822      } = componentProps;
1823      const {
1824        state = EMPTY_OBJECT,
1825        ref,
1826        props,
1827        stateAttributesMapping: stateAttributesMapping2,
1828        enabled = true
1829      } = params;
1830      const className = enabled ? resolveClassName(classNameProp, state) : void 0;
1831      const style = enabled ? resolveStyle(styleProp, state) : void 0;
1832      const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping2) : EMPTY_OBJECT;
1833      const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
1834      const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
1835      if (typeof document !== "undefined") {
1836        if (!enabled) {
1837          void useMergedRefs(null, null);
1838        } else if (Array.isArray(ref)) {
1839          outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
1840        } else {
1841          outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
1842        }
1843      }
1844      if (!enabled) {
1845        return EMPTY_OBJECT;
1846      }
1847      if (className !== void 0) {
1848        outProps.className = mergeClassNames(outProps.className, className);
1849      }
1850      if (style !== void 0) {
1851        outProps.style = mergeObjects(outProps.style, style);
1852      }
1853      return outProps;
1854    }
1855    function resolveRenderFunctionProps(props) {
1856      if (Array.isArray(props)) {
1857        return mergePropsN(props);
1858      }
1859      return mergeProps(void 0, props);
1860    }
1861    var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
1862    var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
1863    var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
1864    function evaluateRenderProp(element, render, props, state) {
1865      if (render) {
1866        if (typeof render === "function") {
1867          if (true) {
1868            warnIfRenderPropLooksLikeComponent(render);
1869          }
1870          return render(props, state);
1871        }
1872        const mergedProps = mergeProps(props, render.props);
1873        mergedProps.ref = props.ref;
1874        let newElement = render;
1875        if (newElement?.$$typeof === REACT_LAZY_TYPE) {
1876          const children = React7.Children.toArray(render);
1877          newElement = children[0];
1878        }
1879        if (true) {
1880          if (!/* @__PURE__ */ React7.isValidElement(newElement)) {
1881            throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.", "A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.", "https://base-ui.com/r/invalid-render-prop"].join("\n"));
1882          }
1883        }
1884        return /* @__PURE__ */ React7.cloneElement(newElement, mergedProps);
1885      }
1886      if (element) {
1887        if (typeof element === "string") {
1888          return renderTag(element, props);
1889        }
1890      }
1891      throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8));
1892    }
1893    function warnIfRenderPropLooksLikeComponent(renderFn) {
1894      const functionName = renderFn.name;
1895      if (functionName.length === 0) {
1896        return;
1897      }
1898      if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {
1899        return;
1900      }
1901      if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {
1902        return;
1903      }
1904      warn(`The \`render\` prop received a function named \`$functionName}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop");
1905    }
1906    function renderTag(Tag, props) {
1907      if (Tag === "button") {
1908        return /* @__PURE__ */ (0, import_react.createElement)("button", {
1909          type: "button",
1910          ...props,
1911          key: props.key
1912        });
1913      }
1914      if (Tag === "img") {
1915        return /* @__PURE__ */ (0, import_react.createElement)("img", {
1916          alt: "",
1917          ...props,
1918          key: props.key
1919        });
1920      }
1921      return /* @__PURE__ */ React7.createElement(Tag, props);
1922    }
1923  
1924    // node_modules/@base-ui/utils/useId.mjs
1925    var React8 = __toESM(require_react(), 1);
1926    var globalId = 0;
1927    function useGlobalId(idOverride, prefix = "mui") {
1928      const [defaultId, setDefaultId] = React8.useState(idOverride);
1929      const id = idOverride || defaultId;
1930      React8.useEffect(() => {
1931        if (defaultId == null) {
1932          globalId += 1;
1933          setDefaultId(`$prefix}-$globalId}`);
1934        }
1935      }, [defaultId, prefix]);
1936      return id;
1937    }
1938    var maybeReactUseId = SafeReact.useId;
1939    function useId(idOverride, prefix) {
1940      if (maybeReactUseId !== void 0) {
1941        const reactId = maybeReactUseId();
1942        return idOverride ?? (prefix ? `$prefix}-$reactId}` : reactId);
1943      }
1944      return useGlobalId(idOverride, prefix);
1945    }
1946  
1947    // node_modules/@base-ui/react/internals/useBaseUiId.mjs
1948    function useBaseUiId(idOverride) {
1949      return useId(idOverride, "base-ui");
1950    }
1951  
1952    // node_modules/@base-ui/react/collapsible/root/useCollapsibleRoot.mjs
1953    var React11 = __toESM(require_react(), 1);
1954  
1955    // node_modules/@base-ui/react/internals/reason-parts.mjs
1956    var reason_parts_exports = {};
1957    __export(reason_parts_exports, {
1958      cancelOpen: () => cancelOpen,
1959      chipRemovePress: () => chipRemovePress,
1960      clearPress: () => clearPress,
1961      closePress: () => closePress,
1962      closeWatcher: () => closeWatcher,
1963      decrementPress: () => decrementPress,
1964      disabled: () => disabled,
1965      drag: () => drag,
1966      escapeKey: () => escapeKey,
1967      focusOut: () => focusOut,
1968      imperativeAction: () => imperativeAction,
1969      incrementPress: () => incrementPress,
1970      initial: () => initial,
1971      inputBlur: () => inputBlur,
1972      inputChange: () => inputChange,
1973      inputClear: () => inputClear,
1974      inputPaste: () => inputPaste,
1975      inputPress: () => inputPress,
1976      itemPress: () => itemPress,
1977      keyboard: () => keyboard,
1978      linkPress: () => linkPress,
1979      listNavigation: () => listNavigation,
1980      missing: () => missing,
1981      none: () => none,
1982      outsidePress: () => outsidePress,
1983      pointer: () => pointer,
1984      scrub: () => scrub,
1985      siblingOpen: () => siblingOpen,
1986      swipe: () => swipe,
1987      trackPress: () => trackPress,
1988      triggerFocus: () => triggerFocus,
1989      triggerHover: () => triggerHover,
1990      triggerPress: () => triggerPress,
1991      wheel: () => wheel,
1992      windowResize: () => windowResize
1993    });
1994    var none = "none";
1995    var triggerPress = "trigger-press";
1996    var triggerHover = "trigger-hover";
1997    var triggerFocus = "trigger-focus";
1998    var outsidePress = "outside-press";
1999    var itemPress = "item-press";
2000    var closePress = "close-press";
2001    var linkPress = "link-press";
2002    var clearPress = "clear-press";
2003    var chipRemovePress = "chip-remove-press";
2004    var trackPress = "track-press";
2005    var incrementPress = "increment-press";
2006    var decrementPress = "decrement-press";
2007    var inputChange = "input-change";
2008    var inputClear = "input-clear";
2009    var inputBlur = "input-blur";
2010    var inputPaste = "input-paste";
2011    var inputPress = "input-press";
2012    var focusOut = "focus-out";
2013    var escapeKey = "escape-key";
2014    var closeWatcher = "close-watcher";
2015    var listNavigation = "list-navigation";
2016    var keyboard = "keyboard";
2017    var pointer = "pointer";
2018    var drag = "drag";
2019    var wheel = "wheel";
2020    var scrub = "scrub";
2021    var cancelOpen = "cancel-open";
2022    var siblingOpen = "sibling-open";
2023    var disabled = "disabled";
2024    var missing = "missing";
2025    var initial = "initial";
2026    var imperativeAction = "imperative-action";
2027    var swipe = "swipe";
2028    var windowResize = "window-resize";
2029  
2030    // node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs
2031    function createChangeEventDetails(reason, event, trigger, customProperties) {
2032      let canceled = false;
2033      let allowPropagation = false;
2034      const custom = customProperties ?? EMPTY_OBJECT;
2035      const details = {
2036        reason,
2037        event: event ?? new Event("base-ui"),
2038        cancel() {
2039          canceled = true;
2040        },
2041        allowPropagation() {
2042          allowPropagation = true;
2043        },
2044        get isCanceled() {
2045          return canceled;
2046        },
2047        get isPropagationAllowed() {
2048          return allowPropagation;
2049        },
2050        trigger,
2051        ...custom
2052      };
2053      return details;
2054    }
2055  
2056    // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
2057    var React10 = __toESM(require_react(), 1);
2058  
2059    // node_modules/@base-ui/utils/useOnMount.mjs
2060    var React9 = __toESM(require_react(), 1);
2061    function useOnMount(fn) {
2062      React9.useEffect(fn, EMPTY_ARRAY);
2063    }
2064  
2065    // node_modules/@base-ui/utils/useAnimationFrame.mjs
2066    var EMPTY = null;
2067    var LAST_RAF = globalThis.requestAnimationFrame;
2068    var Scheduler = class {
2069      /* This implementation uses an array as a backing data-structure for frame callbacks.
2070       * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it
2071       * never calls the native `cancelAnimationFrame` if there are no frames left. This can
2072       * be much more efficient if there is a call pattern that alterns as
2073       * "request-cancel-request-cancel-…".
2074       * But in the case of "request-request-…-cancel-cancel-…", it leaves the final animation
2075       * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */
2076      callbacks = [];
2077      callbacksCount = 0;
2078      nextId = 1;
2079      startId = 1;
2080      isScheduled = false;
2081      tick = (timestamp) => {
2082        this.isScheduled = false;
2083        const currentCallbacks = this.callbacks;
2084        const currentCallbacksCount = this.callbacksCount;
2085        this.callbacks = [];
2086        this.callbacksCount = 0;
2087        this.startId = this.nextId;
2088        if (currentCallbacksCount > 0) {
2089          for (let i = 0; i < currentCallbacks.length; i += 1) {
2090            currentCallbacks[i]?.(timestamp);
2091          }
2092        }
2093      };
2094      request(fn) {
2095        const id = this.nextId;
2096        this.nextId += 1;
2097        this.callbacks.push(fn);
2098        this.callbacksCount += 1;
2099        const didRAFChange = LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);
2100        if (!this.isScheduled || didRAFChange) {
2101          requestAnimationFrame(this.tick);
2102          this.isScheduled = true;
2103        }
2104        return id;
2105      }
2106      cancel(id) {
2107        const index2 = id - this.startId;
2108        if (index2 < 0 || index2 >= this.callbacks.length) {
2109          return;
2110        }
2111        this.callbacks[index2] = null;
2112        this.callbacksCount -= 1;
2113      }
2114    };
2115    var scheduler = new Scheduler();
2116    var AnimationFrame = class _AnimationFrame {
2117      static create() {
2118        return new _AnimationFrame();
2119      }
2120      static request(fn) {
2121        return scheduler.request(fn);
2122      }
2123      static cancel(id) {
2124        return scheduler.cancel(id);
2125      }
2126      currentId = EMPTY;
2127      /**
2128       * Executes `fn` after `delay`, clearing any previously scheduled call.
2129       */
2130      request(fn) {
2131        this.cancel();
2132        this.currentId = scheduler.request(() => {
2133          this.currentId = EMPTY;
2134          fn();
2135        });
2136      }
2137      cancel = () => {
2138        if (this.currentId !== EMPTY) {
2139          scheduler.cancel(this.currentId);
2140          this.currentId = EMPTY;
2141        }
2142      };
2143      disposeEffect = () => {
2144        return this.cancel;
2145      };
2146    };
2147    function useAnimationFrame() {
2148      const timeout = useRefWithInit(AnimationFrame.create).current;
2149      useOnMount(timeout.disposeEffect);
2150      return timeout;
2151    }
2152  
2153    // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
2154    function useTransitionStatus(open, enableIdleState = false, deferEndingState = false) {
2155      const [transitionStatus, setTransitionStatus] = React10.useState(open && enableIdleState ? "idle" : void 0);
2156      const [mounted, setMounted] = React10.useState(open);
2157      if (open && !mounted) {
2158        setMounted(true);
2159        setTransitionStatus("starting");
2160      }
2161      if (!open && mounted && transitionStatus !== "ending" && !deferEndingState) {
2162        setTransitionStatus("ending");
2163      }
2164      if (!open && !mounted && transitionStatus === "ending") {
2165        setTransitionStatus(void 0);
2166      }
2167      useIsoLayoutEffect(() => {
2168        if (!open && mounted && transitionStatus !== "ending" && deferEndingState) {
2169          const frame = AnimationFrame.request(() => {
2170            setTransitionStatus("ending");
2171          });
2172          return () => {
2173            AnimationFrame.cancel(frame);
2174          };
2175        }
2176        return void 0;
2177      }, [open, mounted, transitionStatus, deferEndingState]);
2178      useIsoLayoutEffect(() => {
2179        if (!open || enableIdleState) {
2180          return void 0;
2181        }
2182        const frame = AnimationFrame.request(() => {
2183          setTransitionStatus(void 0);
2184        });
2185        return () => {
2186          AnimationFrame.cancel(frame);
2187        };
2188      }, [enableIdleState, open]);
2189      useIsoLayoutEffect(() => {
2190        if (!open || !enableIdleState) {
2191          return void 0;
2192        }
2193        if (open && mounted && transitionStatus !== "idle") {
2194          setTransitionStatus("starting");
2195        }
2196        const frame = AnimationFrame.request(() => {
2197          setTransitionStatus("idle");
2198        });
2199        return () => {
2200          AnimationFrame.cancel(frame);
2201        };
2202      }, [enableIdleState, open, mounted, transitionStatus]);
2203      return {
2204        mounted,
2205        setMounted,
2206        transitionStatus
2207      };
2208    }
2209  
2210    // node_modules/@base-ui/react/collapsible/root/useCollapsibleRoot.mjs
2211    function useCollapsibleRoot(parameters) {
2212      const {
2213        open: openParam,
2214        defaultOpen,
2215        onOpenChange,
2216        disabled: disabled2
2217      } = parameters;
2218      const [open, setOpen] = useControlled({
2219        controlled: openParam,
2220        default: defaultOpen,
2221        name: "Collapsible",
2222        state: "open"
2223      });
2224      const {
2225        mounted,
2226        setMounted,
2227        transitionStatus
2228      } = useTransitionStatus(open, true, true);
2229      const defaultPanelId = useBaseUiId();
2230      const [registeredPanelId, setPanelIdState] = React11.useState();
2231      const panelId = registeredPanelId === null ? void 0 : registeredPanelId ?? defaultPanelId;
2232      const handleTrigger = useStableCallback((event) => {
2233        const nextOpen = !open;
2234        const eventDetails = createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent);
2235        onOpenChange(nextOpen, eventDetails);
2236        if (eventDetails.isCanceled) {
2237          return;
2238        }
2239        setOpen(nextOpen);
2240      });
2241      return React11.useMemo(() => ({
2242        defaultPanelId,
2243        disabled: disabled2,
2244        handleTrigger,
2245        mounted,
2246        open,
2247        panelId,
2248        setMounted,
2249        setOpen,
2250        setPanelIdState,
2251        transitionStatus
2252      }), [defaultPanelId, disabled2, handleTrigger, mounted, open, panelId, setMounted, setOpen, setPanelIdState, transitionStatus]);
2253    }
2254  
2255    // node_modules/@base-ui/react/collapsible/root/CollapsibleRootContext.mjs
2256    var React12 = __toESM(require_react(), 1);
2257    var CollapsibleRootContext = /* @__PURE__ */ React12.createContext(void 0);
2258    if (true) CollapsibleRootContext.displayName = "CollapsibleRootContext";
2259    function useCollapsibleRootContext() {
2260      const context = React12.useContext(CollapsibleRootContext);
2261      if (context === void 0) {
2262        throw new Error(true ? "Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>." : formatErrorMessage_default(15));
2263      }
2264      return context;
2265    }
2266  
2267    // node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
2268    var TransitionStatusDataAttributes = /* @__PURE__ */ (function(TransitionStatusDataAttributes2) {
2269      TransitionStatusDataAttributes2["startingStyle"] = "data-starting-style";
2270      TransitionStatusDataAttributes2["endingStyle"] = "data-ending-style";
2271      return TransitionStatusDataAttributes2;
2272    })({});
2273    var STARTING_HOOK = {
2274      "data-starting-style": ""
2275    };
2276    var ENDING_HOOK = {
2277      "data-ending-style": ""
2278    };
2279    var transitionStatusMapping = {
2280      transitionStatus(value) {
2281        if (value === "starting") {
2282          return STARTING_HOOK;
2283        }
2284        if (value === "ending") {
2285          return ENDING_HOOK;
2286        }
2287        return null;
2288      }
2289    };
2290  
2291    // node_modules/@base-ui/react/collapsible/panel/CollapsiblePanelDataAttributes.mjs
2292    var CollapsiblePanelDataAttributes = (function(CollapsiblePanelDataAttributes2) {
2293      CollapsiblePanelDataAttributes2["open"] = "data-open";
2294      CollapsiblePanelDataAttributes2["closed"] = "data-closed";
2295      CollapsiblePanelDataAttributes2[CollapsiblePanelDataAttributes2["startingStyle"] = TransitionStatusDataAttributes.startingStyle] = "startingStyle";
2296      CollapsiblePanelDataAttributes2[CollapsiblePanelDataAttributes2["endingStyle"] = TransitionStatusDataAttributes.endingStyle] = "endingStyle";
2297      return CollapsiblePanelDataAttributes2;
2298    })({});
2299  
2300    // node_modules/@base-ui/react/collapsible/trigger/CollapsibleTriggerDataAttributes.mjs
2301    var CollapsibleTriggerDataAttributes = /* @__PURE__ */ (function(CollapsibleTriggerDataAttributes2) {
2302      CollapsibleTriggerDataAttributes2["panelOpen"] = "data-panel-open";
2303      return CollapsibleTriggerDataAttributes2;
2304    })({});
2305  
2306    // node_modules/@base-ui/react/utils/collapsibleOpenStateMapping.mjs
2307    var PANEL_OPEN_HOOK = {
2308      [CollapsiblePanelDataAttributes.open]: ""
2309    };
2310    var PANEL_CLOSED_HOOK = {
2311      [CollapsiblePanelDataAttributes.closed]: ""
2312    };
2313    var triggerOpenStateMapping = {
2314      open(value) {
2315        if (value) {
2316          return {
2317            [CollapsibleTriggerDataAttributes.panelOpen]: ""
2318          };
2319        }
2320        return null;
2321      }
2322    };
2323    var collapsibleOpenStateMapping = {
2324      open(value) {
2325        if (value) {
2326          return PANEL_OPEN_HOOK;
2327        }
2328        return PANEL_CLOSED_HOOK;
2329      }
2330    };
2331  
2332    // node_modules/@base-ui/react/internals/use-button/useButton.mjs
2333    var React15 = __toESM(require_react(), 1);
2334  
2335    // node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
2336    function hasWindow() {
2337      return typeof window !== "undefined";
2338    }
2339    function getNodeName(node) {
2340      if (isNode(node)) {
2341        return (node.nodeName || "").toLowerCase();
2342      }
2343      return "#document";
2344    }
2345    function getWindow(node) {
2346      var _node$ownerDocument;
2347      return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
2348    }
2349    function getDocumentElement(node) {
2350      var _ref;
2351      return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
2352    }
2353    function isNode(value) {
2354      if (!hasWindow()) {
2355        return false;
2356      }
2357      return value instanceof Node || value instanceof getWindow(value).Node;
2358    }
2359    function isElement(value) {
2360      if (!hasWindow()) {
2361        return false;
2362      }
2363      return value instanceof Element || value instanceof getWindow(value).Element;
2364    }
2365    function isHTMLElement(value) {
2366      if (!hasWindow()) {
2367        return false;
2368      }
2369      return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
2370    }
2371    function isShadowRoot(value) {
2372      if (!hasWindow() || typeof ShadowRoot === "undefined") {
2373        return false;
2374      }
2375      return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
2376    }
2377    function isOverflowElement(element) {
2378      const {
2379        overflow,
2380        overflowX,
2381        overflowY,
2382        display
2383      } = getComputedStyle2(element);
2384      return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
2385    }
2386    function isTableElement(element) {
2387      return /^(table|td|th)$/.test(getNodeName(element));
2388    }
2389    function isTopLayer(element) {
2390      try {
2391        if (element.matches(":popover-open")) {
2392          return true;
2393        }
2394      } catch (_e) {
2395      }
2396      try {
2397        return element.matches(":modal");
2398      } catch (_e) {
2399        return false;
2400      }
2401    }
2402    var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
2403    var containRe = /paint|layout|strict|content/;
2404    var isNotNone = (value) => !!value && value !== "none";
2405    var isWebKitValue;
2406    function isContainingBlock(elementOrCss) {
2407      const css = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
2408      return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
2409    }
2410    function getContainingBlock(element) {
2411      let currentNode = getParentNode(element);
2412      while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
2413        if (isContainingBlock(currentNode)) {
2414          return currentNode;
2415        } else if (isTopLayer(currentNode)) {
2416          return null;
2417        }
2418        currentNode = getParentNode(currentNode);
2419      }
2420      return null;
2421    }
2422    function isWebKit() {
2423      if (isWebKitValue == null) {
2424        isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
2425      }
2426      return isWebKitValue;
2427    }
2428    function isLastTraversableNode(node) {
2429      return /^(html|body|#document)$/.test(getNodeName(node));
2430    }
2431    function getComputedStyle2(element) {
2432      return getWindow(element).getComputedStyle(element);
2433    }
2434    function getNodeScroll(element) {
2435      if (isElement(element)) {
2436        return {
2437          scrollLeft: element.scrollLeft,
2438          scrollTop: element.scrollTop
2439        };
2440      }
2441      return {
2442        scrollLeft: element.scrollX,
2443        scrollTop: element.scrollY
2444      };
2445    }
2446    function getParentNode(node) {
2447      if (getNodeName(node) === "html") {
2448        return node;
2449      }
2450      const result = (
2451        // Step into the shadow DOM of the parent of a slotted node.
2452        node.assignedSlot || // DOM Element detected.
2453        node.parentNode || // ShadowRoot detected.
2454        isShadowRoot(node) && node.host || // Fallback.
2455        getDocumentElement(node)
2456      );
2457      return isShadowRoot(result) ? result.host : result;
2458    }
2459    function getNearestOverflowAncestor(node) {
2460      const parentNode = getParentNode(node);
2461      if (isLastTraversableNode(parentNode)) {
2462        return (node.ownerDocument || node).body;
2463      }
2464      if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
2465        return parentNode;
2466      }
2467      return getNearestOverflowAncestor(parentNode);
2468    }
2469    function getOverflowAncestors(node, list, traverseIframes) {
2470      var _node$ownerDocument2;
2471      if (list === void 0) {
2472        list = [];
2473      }
2474      if (traverseIframes === void 0) {
2475        traverseIframes = true;
2476      }
2477      const scrollableAncestor = getNearestOverflowAncestor(node);
2478      const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
2479      const win = getWindow(scrollableAncestor);
2480      if (isBody) {
2481        const frameElement = getFrameElement(win);
2482        return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
2483      } else {
2484        return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
2485      }
2486    }
2487    function getFrameElement(win) {
2488      return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
2489    }
2490  
2491    // node_modules/@base-ui/react/internals/composite/root/CompositeRootContext.mjs
2492    var React13 = __toESM(require_react(), 1);
2493    var CompositeRootContext = /* @__PURE__ */ React13.createContext(void 0);
2494    if (true) CompositeRootContext.displayName = "CompositeRootContext";
2495    function useCompositeRootContext(optional = false) {
2496      const context = React13.useContext(CompositeRootContext);
2497      if (context === void 0 && !optional) {
2498        throw new Error(true ? "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>." : formatErrorMessage_default(16));
2499      }
2500      return context;
2501    }
2502  
2503    // node_modules/@base-ui/react/utils/useFocusableWhenDisabled.mjs
2504    var React14 = __toESM(require_react(), 1);
2505    function useFocusableWhenDisabled(parameters) {
2506      const {
2507        focusableWhenDisabled,
2508        disabled: disabled2,
2509        composite = false,
2510        tabIndex: tabIndexProp = 0,
2511        isNativeButton
2512      } = parameters;
2513      const isFocusableComposite = composite && focusableWhenDisabled !== false;
2514      const isNonFocusableComposite = composite && focusableWhenDisabled === false;
2515      const props = React14.useMemo(() => {
2516        const additionalProps = {
2517          // allow Tabbing away from focusableWhenDisabled elements
2518          onKeyDown(event) {
2519            if (disabled2 && focusableWhenDisabled && event.key !== "Tab") {
2520              event.preventDefault();
2521            }
2522          }
2523        };
2524        if (!composite) {
2525          additionalProps.tabIndex = tabIndexProp;
2526          if (!isNativeButton && disabled2) {
2527            additionalProps.tabIndex = focusableWhenDisabled ? tabIndexProp : -1;
2528          }
2529        }
2530        if (isNativeButton && (focusableWhenDisabled || isFocusableComposite) || !isNativeButton && disabled2) {
2531          additionalProps["aria-disabled"] = disabled2;
2532        }
2533        if (isNativeButton && (!focusableWhenDisabled || isNonFocusableComposite)) {
2534          additionalProps.disabled = disabled2;
2535        }
2536        return additionalProps;
2537      }, [composite, disabled2, focusableWhenDisabled, isFocusableComposite, isNonFocusableComposite, isNativeButton, tabIndexProp]);
2538      return {
2539        props
2540      };
2541    }
2542  
2543    // node_modules/@base-ui/utils/owner.mjs
2544    function ownerDocument(node) {
2545      return node?.ownerDocument || document;
2546    }
2547  
2548    // node_modules/@base-ui/react/utils/dispatchClickWithModifiers.mjs
2549    function dispatchClickWithModifiers(target, sourceEvent, {
2550      detail = 0
2551    } = {}) {
2552      target.dispatchEvent(new (getWindow(target)).PointerEvent("click", {
2553        bubbles: true,
2554        cancelable: true,
2555        composed: true,
2556        detail,
2557        shiftKey: sourceEvent.shiftKey,
2558        ctrlKey: sourceEvent.ctrlKey,
2559        altKey: sourceEvent.altKey,
2560        metaKey: sourceEvent.metaKey
2561      }));
2562    }
2563  
2564    // node_modules/@base-ui/react/internals/use-button/useButton.mjs
2565    function useButton(parameters = {}) {
2566      const {
2567        disabled: disabled2 = false,
2568        focusableWhenDisabled,
2569        tabIndex = 0,
2570        native: isNativeButton = true,
2571        composite: compositeProp
2572      } = parameters;
2573      const elementRef = React15.useRef(null);
2574      const compositeRootContext = useCompositeRootContext(true);
2575      const isCompositeItem = compositeProp ?? compositeRootContext !== void 0;
2576      const {
2577        props: focusableWhenDisabledProps
2578      } = useFocusableWhenDisabled({
2579        focusableWhenDisabled,
2580        disabled: disabled2,
2581        composite: isCompositeItem,
2582        tabIndex,
2583        isNativeButton
2584      });
2585      if (true) {
2586        React15.useEffect(() => {
2587          if (!elementRef.current) {
2588            return;
2589          }
2590          const isButtonTag = isButtonElement(elementRef.current);
2591          if (isNativeButton) {
2592            if (!isButtonTag) {
2593              const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
2594              const message = "A component that acts as a button expected a native <button> because the `nativeButton` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the `render` prop, or set `nativeButton` to `false`.";
2595              error(`$message}$ownerStackMessage}`);
2596            }
2597          } else if (isButtonTag) {
2598            const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
2599            const message = "A component that acts as a button expected a non-<button> because the `nativeButton` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as `role` or `aria-disabled`). Use a non-<button> in the `render` prop, or set `nativeButton` to `true`.";
2600            error(`$message}$ownerStackMessage}`);
2601          }
2602        }, [isNativeButton]);
2603      }
2604      const updateDisabled = React15.useCallback(() => {
2605        const element = elementRef.current;
2606        if (!isButtonElement(element)) {
2607          return;
2608        }
2609        if (isCompositeItem && disabled2 && focusableWhenDisabledProps.disabled === void 0 && element.disabled) {
2610          element.disabled = false;
2611        }
2612      }, [disabled2, focusableWhenDisabledProps.disabled, isCompositeItem]);
2613      useIsoLayoutEffect(updateDisabled, [updateDisabled]);
2614      const getButtonProps = React15.useCallback((externalProps = {}) => {
2615        const {
2616          onClick: externalOnClick,
2617          onMouseDown: externalOnMouseDown,
2618          onKeyUp: externalOnKeyUp,
2619          onKeyDown: externalOnKeyDown,
2620          onPointerDown: externalOnPointerDown,
2621          ...otherExternalProps
2622        } = externalProps;
2623        return mergeProps({
2624          onClick(event) {
2625            if (disabled2) {
2626              event.preventDefault();
2627              return;
2628            }
2629            externalOnClick?.(event);
2630          },
2631          onMouseDown(event) {
2632            if (!disabled2) {
2633              externalOnMouseDown?.(event);
2634            }
2635          },
2636          onKeyDown(event) {
2637            if (disabled2) {
2638              return;
2639            }
2640            makeEventPreventable(event);
2641            externalOnKeyDown?.(event);
2642            if (event.baseUIHandlerPrevented) {
2643              return;
2644            }
2645            const isCurrentTarget = event.target === event.currentTarget;
2646            const currentTarget = event.currentTarget;
2647            const isButton = isButtonElement(currentTarget);
2648            const isLink = !isNativeButton && isValidLinkElement(currentTarget);
2649            const shouldClick = isCurrentTarget && (isNativeButton ? isButton : !isLink);
2650            const isEnterKey = event.key === "Enter";
2651            const isSpaceKey = event.key === " ";
2652            const role = currentTarget.getAttribute("role");
2653            const isTextNavigationRole = role?.startsWith("menuitem") || role === "option" || role === "gridcell";
2654            if (isCurrentTarget && isCompositeItem && isSpaceKey) {
2655              if (event.defaultPrevented && isTextNavigationRole) {
2656                return;
2657              }
2658              event.preventDefault();
2659              if (!isNativeButton || isButton) {
2660                event.preventBaseUIHandler();
2661                dispatchClickWithModifiers(currentTarget, event);
2662              }
2663              return;
2664            }
2665            if (!shouldClick || isNativeButton || !isSpaceKey && !isEnterKey) {
2666              if (isCurrentTarget && isLink && isSpaceKey) {
2667                event.preventDefault();
2668              }
2669              return;
2670            }
2671            if (event.defaultPrevented) {
2672              return;
2673            }
2674            event.preventDefault();
2675            if (isEnterKey) {
2676              event.preventBaseUIHandler();
2677              dispatchClickWithModifiers(currentTarget, event);
2678            }
2679          },
2680          onKeyUp(event) {
2681            if (disabled2) {
2682              return;
2683            }
2684            makeEventPreventable(event);
2685            externalOnKeyUp?.(event);
2686            if (event.target === event.currentTarget && isNativeButton && isCompositeItem && isButtonElement(event.currentTarget) && event.key === " ") {
2687              event.preventDefault();
2688              return;
2689            }
2690            if (event.baseUIHandlerPrevented) {
2691              return;
2692            }
2693            if (event.target === event.currentTarget && !isNativeButton && !isCompositeItem && !event.defaultPrevented && event.key === " ") {
2694              event.preventBaseUIHandler();
2695              dispatchClickWithModifiers(event.currentTarget, event);
2696            }
2697          },
2698          onPointerDown(event) {
2699            if (disabled2) {
2700              event.preventDefault();
2701              return;
2702            }
2703            externalOnPointerDown?.(event);
2704          }
2705        }, isNativeButton ? {
2706          type: "button"
2707        } : {
2708          role: "button"
2709        }, focusableWhenDisabledProps, otherExternalProps);
2710      }, [disabled2, focusableWhenDisabledProps, isCompositeItem, isNativeButton]);
2711      const buttonRef = useStableCallback((element) => {
2712        elementRef.current = element;
2713        updateDisabled();
2714      });
2715      return {
2716        getButtonProps,
2717        buttonRef
2718      };
2719    }
2720    function isButtonElement(elem) {
2721      return isHTMLElement(elem) && elem.tagName === "BUTTON";
2722    }
2723    function isValidLinkElement(elem) {
2724      return isHTMLElement(elem) && elem.tagName === "A" && Boolean(elem.href);
2725    }
2726  
2727    // node_modules/@base-ui/react/collapsible/panel/useCollapsiblePanel.mjs
2728    var React17 = __toESM(require_react(), 1);
2729  
2730    // node_modules/@base-ui/utils/addEventListener.mjs
2731    function addEventListener(target, type, listener, options) {
2732      target.addEventListener(type, listener, options);
2733      return () => {
2734        target.removeEventListener(type, listener, options);
2735      };
2736    }
2737  
2738    // node_modules/@base-ui/utils/useValueAsRef.mjs
2739    function useValueAsRef(value) {
2740      const latest = useRefWithInit(createLatestRef, value).current;
2741      latest.next = value;
2742      useIsoLayoutEffect(latest.effect);
2743      return latest;
2744    }
2745    function createLatestRef(value) {
2746      const latest = {
2747        current: value,
2748        next: value,
2749        effect: () => {
2750          latest.current = latest.next;
2751        }
2752      };
2753      return latest;
2754    }
2755  
2756    // node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
2757    var React16 = __toESM(require_react(), 1);
2758  
2759    // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
2760    var ReactDOM = __toESM(require_react_dom(), 1);
2761  
2762    // node_modules/@base-ui/react/utils/resolveRef.mjs
2763    function resolveRef(maybeRef) {
2764      if (maybeRef == null) {
2765        return maybeRef;
2766      }
2767      return "current" in maybeRef ? maybeRef.current : maybeRef;
2768    }
2769  
2770    // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
2771    function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false) {
2772      const frame = useAnimationFrame();
2773      return useStableCallback((fnToExecute, signal = null) => {
2774        frame.cancel();
2775        const element = resolveRef(elementOrRef);
2776        if (element == null) {
2777          return;
2778        }
2779        const resolvedElement = element;
2780        const done = () => {
2781          ReactDOM.flushSync(fnToExecute);
2782        };
2783        if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
2784          fnToExecute();
2785          return;
2786        }
2787        function exec() {
2788          Promise.all(resolvedElement.getAnimations().map((animation) => animation.finished)).then(() => {
2789            if (!signal?.aborted) {
2790              done();
2791            }
2792          }, () => {
2793            if (signal?.aborted) {
2794              return;
2795            }
2796            const currentAnimations = resolvedElement.getAnimations();
2797            if (currentAnimations.some((animation) => animation.pending || animation.playState !== "finished")) {
2798              exec();
2799              return;
2800            }
2801            done();
2802          });
2803        }
2804        if (waitForStartingStyleRemoved) {
2805          const startingStyleAttribute = "data-starting-style";
2806          if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
2807            frame.request(exec);
2808            return;
2809          }
2810          const attributeObserver = new MutationObserver(() => {
2811            if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
2812              attributeObserver.disconnect();
2813              exec();
2814            }
2815          });
2816          attributeObserver.observe(resolvedElement, {
2817            attributes: true,
2818            attributeFilter: [startingStyleAttribute]
2819          });
2820          signal?.addEventListener("abort", () => attributeObserver.disconnect(), {
2821            once: true
2822          });
2823          return;
2824        }
2825        frame.request(exec);
2826      });
2827    }
2828  
2829    // node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
2830    function useOpenChangeComplete(parameters) {
2831      const {
2832        enabled = true,
2833        open,
2834        ref,
2835        onComplete: onCompleteParam
2836      } = parameters;
2837      const onComplete = useStableCallback(onCompleteParam);
2838      const runOnceAnimationsFinish = useAnimationsFinished(ref, open);
2839      React16.useEffect(() => {
2840        if (!enabled) {
2841          return void 0;
2842        }
2843        const abortController = new AbortController();
2844        runOnceAnimationsFinish(onComplete, abortController.signal);
2845        return () => {
2846          abortController.abort();
2847        };
2848      }, [enabled, open, onComplete, runOnceAnimationsFinish]);
2849    }
2850  
2851    // node_modules/@base-ui/react/collapsible/panel/useCollapsiblePanel.mjs
2852    var EMPTY_DIMENSIONS = {
2853      height: void 0,
2854      width: void 0
2855    };
2856    function useCollapsiblePanel(parameters) {
2857      const {
2858        externalRef,
2859        hiddenUntilFound,
2860        id: idParam,
2861        keepMounted,
2862        mounted,
2863        onOpenChange,
2864        open,
2865        setMounted,
2866        setOpen,
2867        transitionStatus
2868      } = parameters;
2869      const panelRef = React17.useRef(null);
2870      const animationTypeRef = React17.useRef(null);
2871      const [dimensions, setDimensionsUnwrapped] = React17.useState(EMPTY_DIMENSIONS);
2872      const lastMeasuredDimensionsRef = React17.useRef(EMPTY_DIMENSIONS);
2873      const shouldSkipNextOpenRef = React17.useRef(false);
2874      const shouldPreventMountAnimationRef = React17.useRef(open);
2875      const shouldPreventActivityResumeAnimationRef = React17.useRef(false);
2876      const [forcePanelIdle, setForcePanelIdle] = React17.useState(false);
2877      const pendingTemporaryStyleRestoreRef = React17.useRef(null);
2878      const mergedPanelRef = useMergedRefs(externalRef, panelRef);
2879      const latestOpenRef = useValueAsRef(open);
2880      const runOnceCloseAnimationsFinish = useAnimationsFinished(panelRef);
2881      const hidden = !open && !mounted;
2882      const panelTransitionStatus = forcePanelIdle ? "idle" : transitionStatus;
2883      const shouldPreventOpenAnimation = open && // These 2 refs are safe to read in render, they are only written from committed
2884      // layout/effect paths and gate one-shot motion suppression for the next open
2885      // lifecycle. They intentionally expose the last committed motion snapshot.
2886      (shouldPreventMountAnimationRef.current || shouldPreventActivityResumeAnimationRef.current);
2887      const renderedDimensions = !open && mounted && // These 2 refs are also safe to read in render, both hold the last committed
2888      // animation mode and measurement. This fallback only restores a previously
2889      // measured pixel size after the live dimensions state has been reset back to `auto`.
2890      animationTypeRef.current === "css-animation" && dimensions.height === void 0 && dimensions.width === void 0 ? lastMeasuredDimensionsRef.current : dimensions;
2891      const shouldPersistHiddenTransitionStyles = hiddenUntilFound && hidden && animationTypeRef.current !== "css-animation";
2892      const setDimensions = useStableCallback((nextDimensions, shouldCacheMeasurement = true) => {
2893        if (shouldCacheMeasurement) {
2894          lastMeasuredDimensionsRef.current = nextDimensions;
2895        }
2896        setDimensionsUnwrapped(nextDimensions);
2897      });
2898      const restorePendingTemporaryStyle = useStableCallback(() => {
2899        pendingTemporaryStyleRestoreRef.current?.();
2900        pendingTemporaryStyleRestoreRef.current = null;
2901      });
2902      const setPendingTemporaryStyleRestore = useStableCallback((restore) => {
2903        restorePendingTemporaryStyle();
2904        pendingTemporaryStyleRestoreRef.current = () => {
2905          pendingTemporaryStyleRestoreRef.current = null;
2906          restore();
2907        };
2908      });
2909      const markActivityResumeAnimationSuppressed = useStableCallback(() => {
2910        if (open && mounted && animationTypeRef.current === "css-animation") {
2911          shouldPreventActivityResumeAnimationRef.current = true;
2912        }
2913      });
2914      useIsoLayoutEffect(() => {
2915        if (!forcePanelIdle || transitionStatus === "starting") {
2916          return;
2917        }
2918        setForcePanelIdle(false);
2919      }, [forcePanelIdle, transitionStatus]);
2920      React17.useEffect(() => {
2921        return () => {
2922          markActivityResumeAnimationSuppressed();
2923          restorePendingTemporaryStyle();
2924        };
2925      }, [markActivityResumeAnimationSuppressed, restorePendingTemporaryStyle]);
2926      useIsoLayoutEffect(() => {
2927        const panel = panelRef.current;
2928        if (!panel) {
2929          return void 0;
2930        }
2931        if (!open && pendingTemporaryStyleRestoreRef.current) {
2932          restorePendingTemporaryStyle();
2933        }
2934        const animationType = getAnimationType(panel, shouldPreventOpenAnimation);
2935        animationTypeRef.current = animationType;
2936        if (open && transitionStatus === "idle" && shouldPreventMountAnimationRef.current && animationType === "css-animation") {
2937          lastMeasuredDimensionsRef.current = getDimensions(panel);
2938          return void 0;
2939        }
2940        if (open && transitionStatus === "starting") {
2941          const skipNextOpen = shouldSkipNextOpenRef.current;
2942          shouldSkipNextOpenRef.current = false;
2943          if (animationType === "none") {
2944            setDimensions(getDimensions(panel));
2945            setForcePanelIdle(true);
2946            return void 0;
2947          }
2948          if (animationType === "css-transition") {
2949            const restoreLayoutStyles = resetLayoutStyles(panel);
2950            setDimensions(getDimensions(panel));
2951            if (!skipNextOpen) {
2952              return restoreLayoutStyles;
2953            }
2954            const restoreTransitionDuration = setTemporaryStyle(panel, "transition-duration", "0s");
2955            setPendingTemporaryStyleRestore(restoreTransitionDuration);
2956            setForcePanelIdle(true);
2957            return restoreLayoutStyles;
2958          }
2959          setDimensions(getDimensions(panel));
2960          const restoreAnimationName = setTemporaryStyle(panel, "animation-name", "none");
2961          if (!skipNextOpen) {
2962            restoreAnimationName();
2963            return void 0;
2964          }
2965          const restoreAnimationDuration = setTemporaryStyle(panel, "animation-duration", "0s");
2966          restoreAnimationName();
2967          setPendingTemporaryStyleRestore(restoreAnimationDuration);
2968          setForcePanelIdle(true);
2969          return void 0;
2970        }
2971        if (!open && mounted && (transitionStatus === "idle" || transitionStatus === "starting")) {
2972          shouldPreventMountAnimationRef.current = false;
2973          shouldPreventActivityResumeAnimationRef.current = false;
2974          if (animationType === "none") {
2975            setDimensions(EMPTY_DIMENSIONS, false);
2976            setMounted(false);
2977            return void 0;
2978          }
2979          setDimensions(getDimensions(panel));
2980          return void 0;
2981        }
2982        if (transitionStatus !== "ending") {
2983          return void 0;
2984        }
2985        if (animationType === "none") {
2986          setMounted(false);
2987          return void 0;
2988        }
2989        const nextDimensions = getDimensions(panel);
2990        const hasMeasuredSize = nextDimensions.height > 0 || nextDimensions.width > 0;
2991        if (!hasMeasuredSize) {
2992          setMounted(false);
2993          return void 0;
2994        }
2995        setDimensions(nextDimensions);
2996        if (animationType === "css-animation") {
2997          const restoreAnimationName = setTemporaryStyle(panel, "animation-name", "none");
2998          restoreAnimationName();
2999        }
3000        return void 0;
3001      }, [mounted, open, restorePendingTemporaryStyle, setDimensions, setMounted, setPendingTemporaryStyleRestore, shouldPreventOpenAnimation, transitionStatus]);
3002      useOpenChangeComplete({
3003        enabled: open && mounted && panelTransitionStatus === "idle",
3004        open: true,
3005        ref: panelRef,
3006        onComplete() {
3007          if (!open) {
3008            return;
3009          }
3010          setDimensions(EMPTY_DIMENSIONS, false);
3011        }
3012      });
3013      React17.useEffect(() => {
3014        if (open || !mounted || panelTransitionStatus !== "ending") {
3015          return void 0;
3016        }
3017        const panel = panelRef.current;
3018        if (!panel) {
3019          return void 0;
3020        }
3021        const abortController = new AbortController();
3022        let endingStyleFrame = -1;
3023        function handleComplete() {
3024          if (latestOpenRef.current) {
3025            return;
3026          }
3027          setMounted(false);
3028          setDimensions(EMPTY_DIMENSIONS, false);
3029        }
3030        endingStyleFrame = AnimationFrame.request(() => {
3031          runOnceCloseAnimationsFinish(handleComplete, abortController.signal);
3032        });
3033        return () => {
3034          AnimationFrame.cancel(endingStyleFrame);
3035          abortController.abort();
3036        };
3037      }, [latestOpenRef, mounted, open, panelTransitionStatus, runOnceCloseAnimationsFinish, setDimensions, setMounted]);
3038      useIsoLayoutEffect(() => {
3039        const panel = panelRef.current;
3040        if (!panel || !hiddenUntilFound || !hidden) {
3041          return;
3042        }
3043        panel.setAttribute("hidden", "until-found");
3044      }, [hidden, hiddenUntilFound]);
3045      React17.useEffect(function registerBeforeMatchListener() {
3046        const panel = panelRef.current;
3047        if (!panel) {
3048          return void 0;
3049        }
3050        function handleBeforeMatch(event) {
3051          const eventDetails = createChangeEventDetails(reason_parts_exports.none, event);
3052          onOpenChange(true, eventDetails);
3053          if (eventDetails.isCanceled) {
3054            return;
3055          }
3056          shouldSkipNextOpenRef.current = true;
3057          setOpen(true);
3058        }
3059        return addEventListener(panel, "beforematch", handleBeforeMatch);
3060      }, [onOpenChange, setOpen]);
3061      const shouldRender = keepMounted || hiddenUntilFound || mounted || open;
3062      return {
3063        height: renderedDimensions.height,
3064        props: {
3065          ...shouldPersistHiddenTransitionStyles ? {
3066            [CollapsiblePanelDataAttributes.startingStyle]: ""
3067          } : void 0,
3068          hidden,
3069          id: idParam
3070        },
3071        ref: mergedPanelRef,
3072        shouldPreventOpenAnimation,
3073        shouldRender,
3074        transitionStatus: panelTransitionStatus,
3075        width: renderedDimensions.width
3076      };
3077    }
3078    function getDimensions(element) {
3079      return {
3080        height: element.scrollHeight,
3081        width: element.scrollWidth
3082      };
3083    }
3084    function getAnimationType(element, hasSuppressedMountAnimation) {
3085      const panelStyles = getWindow(element).getComputedStyle(element);
3086      const hasAnimation = (panelStyles.animationName.split(",").map((name2) => name2.trim()).some((name2) => name2 !== "" && name2 !== "none") || hasSuppressedMountAnimation) && hasNonZeroDuration(panelStyles.animationDuration);
3087      const hasTransition = hasNonZeroDuration(panelStyles.transitionDuration);
3088      if (hasAnimation && hasTransition) {
3089        if (true) {
3090          warn("CSS transitions and CSS animations both detected on Collapsible or Accordion panel.", "Only one of either animation type should be used.");
3091        }
3092        return "css-transition";
3093      }
3094      if (hasTransition) {
3095        return "css-transition";
3096      }
3097      if (hasAnimation) {
3098        return "css-animation";
3099      }
3100      return "none";
3101    }
3102    function hasNonZeroDuration(value) {
3103      return value.split(",").map((part) => part.trim()).some((part) => part !== "" && Number.parseFloat(part) > 0);
3104    }
3105    function setTemporaryStyle(element, property, value) {
3106      const previousValue = element.style.getPropertyValue(property);
3107      const previousPriority = element.style.getPropertyPriority(property);
3108      element.style.setProperty(property, value);
3109      return () => {
3110        if (previousValue === "") {
3111          element.style.removeProperty(property);
3112          return;
3113        }
3114        element.style.setProperty(property, previousValue, previousPriority);
3115      };
3116    }
3117    function resetLayoutStyles(element) {
3118      const originalLayoutStyles = {
3119        "justify-content": element.style.justifyContent,
3120        "align-items": element.style.alignItems,
3121        "align-content": element.style.alignContent,
3122        "justify-items": element.style.justifyItems
3123      };
3124      Object.keys(originalLayoutStyles).forEach((key) => {
3125        element.style.setProperty(key, "initial", "important");
3126      });
3127      function restoreLayoutStyles() {
3128        Object.entries(originalLayoutStyles).forEach(([key, value]) => {
3129          if (value === "") {
3130            element.style.removeProperty(key);
3131            return;
3132          }
3133          element.style.setProperty(key, value);
3134        });
3135      }
3136      const frame = AnimationFrame.request(restoreLayoutStyles);
3137      return () => {
3138        AnimationFrame.cancel(frame);
3139        restoreLayoutStyles();
3140      };
3141    }
3142  
3143    // node_modules/@base-ui/utils/platform/parts.mjs
3144    var parts_exports = {};
3145    __export(parts_exports, {
3146      engine: () => engine_exports,
3147      env: () => env_exports,
3148      os: () => os_exports,
3149      screenReader: () => screen_reader_exports
3150    });
3151  
3152    // node_modules/@base-ui/utils/platform/os.mjs
3153    var os_exports = {};
3154    __export(os_exports, {
3155      android: () => android,
3156      apple: () => apple,
3157      ios: () => ios,
3158      linux: () => linux,
3159      mac: () => mac,
3160      windows: () => windows
3161    });
3162  
3163    // node_modules/@base-ui/utils/platform/shared.mjs
3164    function readRawData() {
3165      if (typeof navigator === "undefined") {
3166        return {
3167          userAgent: "",
3168          platform: "",
3169          maxTouchPoints: 0
3170        };
3171      }
3172      if (true) {
3173        const uaData = navigator.userAgentData;
3174        if (uaData && Array.isArray(uaData.brands)) {
3175          return {
3176            userAgent: uaData.brands.map(({
3177              brand,
3178              version: version2
3179            }) => `$brand}/$version2}`).join(" "),
3180            platform: uaData.platform ?? navigator.platform ?? "",
3181            maxTouchPoints: navigator.maxTouchPoints ?? 0
3182          };
3183        }
3184      }
3185      return {
3186        userAgent: navigator.userAgent,
3187        platform: navigator.platform ?? "",
3188        maxTouchPoints: navigator.maxTouchPoints ?? 0
3189      };
3190    }
3191    var {
3192      userAgent,
3193      platform,
3194      maxTouchPoints
3195    } = readRawData();
3196    var lowerUserAgent = userAgent.toLowerCase();
3197    var lowerPlatform = platform.toLowerCase();
3198  
3199    // node_modules/@base-ui/utils/platform/os.mjs
3200    var ios = /^i(os$|p)/.test(lowerPlatform) || lowerPlatform === "macintel" && maxTouchPoints > 1;
3201    var ANDROID_STRING = "android";
3202    var android = lowerPlatform === ANDROID_STRING || lowerUserAgent.includes(ANDROID_STRING);
3203    var mac = !ios && lowerPlatform.startsWith("mac");
3204    var windows = lowerPlatform.startsWith("win");
3205    var linux = !android && /^(linux|chrome os)/.test(lowerPlatform);
3206    var apple = mac || ios;
3207  
3208    // node_modules/@base-ui/utils/platform/engine.mjs
3209    var engine_exports = {};
3210    __export(engine_exports, {
3211      blink: () => blink,
3212      gecko: () => gecko,
3213      webkit: () => webkit
3214    });
3215    var webkit = typeof CSS !== "undefined" && !!CSS.supports?.("-webkit-backdrop-filter:none");
3216    var gecko = !webkit && lowerUserAgent.includes("firefox");
3217    var blink = !webkit && lowerUserAgent.includes("chrom");
3218  
3219    // node_modules/@base-ui/utils/platform/screen-reader.mjs
3220    var screen_reader_exports = {};
3221    __export(screen_reader_exports, {
3222      voiceOver: () => voiceOver
3223    });
3224    var voiceOver = apple;
3225  
3226    // node_modules/@base-ui/utils/platform/env.mjs
3227    var env_exports = {};
3228    __export(env_exports, {
3229      jsdom: () => jsdom
3230    });
3231    var jsdom = /jsdom|happydom/.test(lowerUserAgent);
3232  
3233    // node_modules/@base-ui/utils/useTimeout.mjs
3234    var EMPTY2 = 0;
3235    var Timeout = class _Timeout {
3236      static create() {
3237        return new _Timeout();
3238      }
3239      currentId = EMPTY2;
3240      /**
3241       * Executes `fn` after `delay`, clearing any previously scheduled call.
3242       */
3243      start(delay, fn) {
3244        this.clear();
3245        this.currentId = setTimeout(() => {
3246          this.currentId = EMPTY2;
3247          fn();
3248        }, delay);
3249      }
3250      isStarted() {
3251        return this.currentId !== EMPTY2;
3252      }
3253      clear = () => {
3254        if (this.currentId !== EMPTY2) {
3255          clearTimeout(this.currentId);
3256          this.currentId = EMPTY2;
3257        }
3258      };
3259      disposeEffect = () => {
3260        return this.clear;
3261      };
3262    };
3263    function useTimeout() {
3264      const timeout = useRefWithInit(Timeout.create).current;
3265      useOnMount(timeout.disposeEffect);
3266      return timeout;
3267    }
3268  
3269    // node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
3270    var React18 = __toESM(require_react(), 1);
3271  
3272    // node_modules/@base-ui/react/floating-ui-react/utils/event.mjs
3273    function isReactEvent(event) {
3274      return "nativeEvent" in event;
3275    }
3276    function isMouseLikePointerType(pointerType, strict) {
3277      const values = ["mouse", "pen"];
3278      if (!strict) {
3279        values.push("", void 0);
3280      }
3281      return values.includes(pointerType);
3282    }
3283    function isClickLikeEvent(event) {
3284      const type = event.type;
3285      return type === "click" || type === "mousedown" || type === "keydown" || type === "keyup";
3286    }
3287  
3288    // node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs
3289    var FOCUSABLE_ATTRIBUTE = "data-base-ui-focusable";
3290    var TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
3291  
3292    // node_modules/@base-ui/react/internals/shadowDom.mjs
3293    function activeElement(doc) {
3294      let element = doc.activeElement;
3295      while (element?.shadowRoot?.activeElement != null) {
3296        element = element.shadowRoot.activeElement;
3297      }
3298      return element;
3299    }
3300    function contains(parent, child) {
3301      if (!parent || !child) {
3302        return false;
3303      }
3304      const rootNode = child.getRootNode?.();
3305      if (parent.contains(child)) {
3306        return true;
3307      }
3308      if (rootNode && isShadowRoot(rootNode)) {
3309        let next = child;
3310        while (next) {
3311          if (parent === next) {
3312            return true;
3313          }
3314          next = next.parentNode || next.host;
3315        }
3316      }
3317      return false;
3318    }
3319    function getTarget(event) {
3320      if ("composedPath" in event) {
3321        return event.composedPath()[0];
3322      }
3323      return event.target;
3324    }
3325  
3326    // node_modules/@base-ui/react/floating-ui-react/utils/element.mjs
3327    function isTargetInsideEnabledTrigger(target, triggerElements) {
3328      if (!isElement(target)) {
3329        return false;
3330      }
3331      const targetElement = target;
3332      if (triggerElements.hasElement(targetElement)) {
3333        return !targetElement.hasAttribute("data-trigger-disabled");
3334      }
3335      for (const [, trigger] of triggerElements.entries()) {
3336        if (contains(trigger, targetElement)) {
3337          return !trigger.hasAttribute("data-trigger-disabled");
3338        }
3339      }
3340      return false;
3341    }
3342    function isEventTargetWithin(event, node) {
3343      if (node == null) {
3344        return false;
3345      }
3346      if ("composedPath" in event) {
3347        return event.composedPath().includes(node);
3348      }
3349      const eventAgain = event;
3350      return eventAgain.target != null && node.contains(eventAgain.target);
3351    }
3352    function isRootElement(element) {
3353      return element.matches("html,body");
3354    }
3355    function isTypeableElement(element) {
3356      return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);
3357    }
3358    function isInteractiveElement(element) {
3359      return element?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),$TYPEABLE_SELECTOR}`) != null;
3360    }
3361    function matchesFocusVisible(element) {
3362      if (!element || parts_exports.env.jsdom) {
3363        return true;
3364      }
3365      try {
3366        return element.matches(":focus-visible");
3367      } catch (_e) {
3368        return true;
3369      }
3370    }
3371  
3372    // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverShared.mjs
3373    function resolveValue(value, pointerType) {
3374      if (pointerType != null && !isMouseLikePointerType(pointerType)) {
3375        return 0;
3376      }
3377      if (typeof value === "function") {
3378        return value();
3379      }
3380      return value;
3381    }
3382    function getDelay(value, prop, pointerType) {
3383      const result = resolveValue(value, pointerType);
3384      if (typeof result === "number") {
3385        return result;
3386      }
3387      return result?.[prop];
3388    }
3389    function getRestMs(value) {
3390      if (typeof value === "function") {
3391        return value();
3392      }
3393      return value;
3394    }
3395    function isClickLikeOpenEvent(openEventType, interactedInside) {
3396      return interactedInside || openEventType === "click" || openEventType === "mousedown";
3397    }
3398    function isHoverOpenEvent(openEventType) {
3399      return openEventType?.includes("mouse") && openEventType !== "mousedown";
3400    }
3401  
3402    // node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
3403    var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
3404    var FloatingDelayGroupContext = /* @__PURE__ */ React18.createContext({
3405      hasProvider: false,
3406      timeoutMs: 0,
3407      delayRef: {
3408        current: 0
3409      },
3410      initialDelayRef: {
3411        current: 0
3412      },
3413      timeout: new Timeout(),
3414      currentIdRef: {
3415        current: null
3416      },
3417      currentContextRef: {
3418        current: null
3419      }
3420    });
3421    if (true) FloatingDelayGroupContext.displayName = "FloatingDelayGroupContext";
3422    function resetDelayRef(delayRef, initialDelayRef) {
3423      delayRef.current = initialDelayRef.current;
3424    }
3425    function FloatingDelayGroup(props) {
3426      const {
3427        children,
3428        delay,
3429        timeoutMs = 0
3430      } = props;
3431      const delayRef = React18.useRef(delay);
3432      const initialDelayRef = React18.useRef(delay);
3433      const currentIdRef = React18.useRef(null);
3434      const currentContextRef = React18.useRef(null);
3435      const timeout = useTimeout();
3436      useIsoLayoutEffect(() => {
3437        initialDelayRef.current = delay;
3438        if (!currentIdRef.current) {
3439          delayRef.current = delay;
3440          return;
3441        }
3442        delayRef.current = {
3443          open: getDelay(delayRef.current, "open"),
3444          close: getDelay(delay, "close")
3445        };
3446      }, [delay, currentIdRef, delayRef, initialDelayRef]);
3447      return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FloatingDelayGroupContext.Provider, {
3448        value: React18.useMemo(() => ({
3449          hasProvider: true,
3450          delayRef,
3451          initialDelayRef,
3452          currentIdRef,
3453          timeoutMs,
3454          currentContextRef,
3455          timeout
3456        }), [timeoutMs, timeout]),
3457        children
3458      });
3459    }
3460    function useDelayGroup(context, options = {
3461      open: false
3462    }) {
3463      const {
3464        open
3465      } = options;
3466      const store3 = "rootStore" in context ? context.rootStore : context;
3467      const floatingId = store3.useState("floatingId");
3468      const groupContext = React18.useContext(FloatingDelayGroupContext);
3469      const {
3470        currentIdRef,
3471        delayRef,
3472        timeoutMs,
3473        initialDelayRef,
3474        currentContextRef,
3475        hasProvider,
3476        timeout
3477      } = groupContext;
3478      const [isInstantPhase, setIsInstantPhase] = React18.useState(false);
3479      const openRef = React18.useRef(open);
3480      useIsoLayoutEffect(() => {
3481        openRef.current = open;
3482      }, [open]);
3483      useIsoLayoutEffect(() => {
3484        function unset() {
3485          currentContextRef.current?.setIsInstantPhase(false);
3486          currentIdRef.current = null;
3487          currentContextRef.current = null;
3488          delayRef.current = initialDelayRef.current;
3489          timeout.clear();
3490        }
3491        if (!currentIdRef.current) {
3492          return void 0;
3493        }
3494        if (!open && currentIdRef.current === floatingId) {
3495          setIsInstantPhase(false);
3496          if (timeoutMs) {
3497            const closingId = floatingId;
3498            timeout.start(timeoutMs, () => {
3499              if (store3.select("open") || currentIdRef.current && currentIdRef.current !== closingId) {
3500                return;
3501              }
3502              unset();
3503            });
3504            return () => {
3505              if (openRef.current || currentIdRef.current !== closingId) {
3506                timeout.clear();
3507              }
3508            };
3509          }
3510          unset();
3511        }
3512        return void 0;
3513      }, [open, floatingId, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeout, store3]);
3514      useIsoLayoutEffect(() => {
3515        if (!open) {
3516          return;
3517        }
3518        const prevContext = currentContextRef.current;
3519        const prevId = currentIdRef.current;
3520        timeout.clear();
3521        currentContextRef.current = {
3522          onOpenChange: store3.setOpen,
3523          setIsInstantPhase
3524        };
3525        currentIdRef.current = floatingId;
3526        delayRef.current = {
3527          open: 0,
3528          close: getDelay(initialDelayRef.current, "close")
3529        };
3530        if (prevId !== null && prevId !== floatingId) {
3531          setIsInstantPhase(true);
3532          prevContext?.setIsInstantPhase(true);
3533          prevContext?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.none));
3534        } else {
3535          setIsInstantPhase(false);
3536          prevContext?.setIsInstantPhase(false);
3537        }
3538      }, [open, floatingId, store3, currentIdRef, delayRef, initialDelayRef, currentContextRef, timeout]);
3539      useIsoLayoutEffect(() => {
3540        return () => {
3541          if (currentIdRef.current === floatingId) {
3542            currentContextRef.current = null;
3543            if (!openRef.current) {
3544              return;
3545            }
3546            currentIdRef.current = null;
3547            resetDelayRef(delayRef, initialDelayRef);
3548            timeout.clear();
3549          }
3550        };
3551      }, [currentContextRef, currentIdRef, delayRef, floatingId, initialDelayRef, timeout]);
3552      return React18.useMemo(() => ({
3553        hasProvider,
3554        delayRef,
3555        isInstantPhase
3556      }), [hasProvider, delayRef, isInstantPhase]);
3557    }
3558  
3559    // node_modules/@base-ui/utils/mergeCleanups.mjs
3560    function mergeCleanups(...cleanups) {
3561      return () => {
3562        for (let i = 0; i < cleanups.length; i += 1) {
3563          const cleanup = cleanups[i];
3564          if (cleanup) {
3565            cleanup();
3566          }
3567        }
3568      };
3569    }
3570  
3571    // node_modules/@base-ui/react/utils/FocusGuard.mjs
3572    var React19 = __toESM(require_react(), 1);
3573  
3574    // node_modules/@base-ui/utils/visuallyHidden.mjs
3575    var visuallyHiddenBase = {
3576      clipPath: "inset(50%)",
3577      overflow: "hidden",
3578      whiteSpace: "nowrap",
3579      border: 0,
3580      padding: 0,
3581      width: 1,
3582      height: 1,
3583      margin: -1
3584    };
3585    var visuallyHidden = {
3586      ...visuallyHiddenBase,
3587      position: "fixed",
3588      top: 0,
3589      left: 0
3590    };
3591    var visuallyHiddenInput = {
3592      ...visuallyHiddenBase,
3593      position: "absolute"
3594    };
3595  
3596    // node_modules/@base-ui/react/utils/FocusGuard.mjs
3597    var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
3598    var FocusGuard = /* @__PURE__ */ React19.forwardRef(function FocusGuard2(props, ref) {
3599      const [role, setRole] = React19.useState();
3600      useIsoLayoutEffect(() => {
3601        if (parts_exports.screenReader.voiceOver && parts_exports.engine.webkit) {
3602          setRole("button");
3603        }
3604      }, []);
3605      const restProps = {
3606        tabIndex: 0,
3607        // Role is only for VoiceOver
3608        role
3609      };
3610      return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", {
3611        ...props,
3612        ref,
3613        style: visuallyHidden,
3614        "aria-hidden": role ? void 0 : true,
3615        ...restProps,
3616        "data-base-ui-focus-guard": ""
3617      });
3618    });
3619    if (true) FocusGuard.displayName = "FocusGuard";
3620  
3621    // node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
3622    var min = Math.min;
3623    var max = Math.max;
3624    var round = Math.round;
3625    var floor = Math.floor;
3626    var createCoords = (v) => ({
3627      x: v,
3628      y: v
3629    });
3630    var oppositeSideMap = {
3631      left: "right",
3632      right: "left",
3633      bottom: "top",
3634      top: "bottom"
3635    };
3636    function clamp(start, value, end) {
3637      return max(start, min(value, end));
3638    }
3639    function evaluate(value, param) {
3640      return typeof value === "function" ? value(param) : value;
3641    }
3642    function getSide(placement) {
3643      return placement.split("-")[0];
3644    }
3645    function getAlignment(placement) {
3646      return placement.split("-")[1];
3647    }
3648    function getOppositeAxis(axis) {
3649      return axis === "x" ? "y" : "x";
3650    }
3651    function getAxisLength(axis) {
3652      return axis === "y" ? "height" : "width";
3653    }
3654    function getSideAxis(placement) {
3655      const firstChar = placement[0];
3656      return firstChar === "t" || firstChar === "b" ? "y" : "x";
3657    }
3658    function getAlignmentAxis(placement) {
3659      return getOppositeAxis(getSideAxis(placement));
3660    }
3661    function getAlignmentSides(placement, rects, rtl) {
3662      if (rtl === void 0) {
3663        rtl = false;
3664      }
3665      const alignment = getAlignment(placement);
3666      const alignmentAxis = getAlignmentAxis(placement);
3667      const length = getAxisLength(alignmentAxis);
3668      let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
3669      if (rects.reference[length] > rects.floating[length]) {
3670        mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
3671      }
3672      return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
3673    }
3674    function getExpandedPlacements(placement) {
3675      const oppositePlacement = getOppositePlacement(placement);
3676      return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
3677    }
3678    function getOppositeAlignmentPlacement(placement) {
3679      return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
3680    }
3681    var lrPlacement = ["left", "right"];
3682    var rlPlacement = ["right", "left"];
3683    var tbPlacement = ["top", "bottom"];
3684    var btPlacement = ["bottom", "top"];
3685    function getSideList(side, isStart, rtl) {
3686      switch (side) {
3687        case "top":
3688        case "bottom":
3689          if (rtl) return isStart ? rlPlacement : lrPlacement;
3690          return isStart ? lrPlacement : rlPlacement;
3691        case "left":
3692        case "right":
3693          return isStart ? tbPlacement : btPlacement;
3694        default:
3695          return [];
3696      }
3697    }
3698    function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
3699      const alignment = getAlignment(placement);
3700      let list = getSideList(getSide(placement), direction === "start", rtl);
3701      if (alignment) {
3702        list = list.map((side) => side + "-" + alignment);
3703        if (flipAlignment) {
3704          list = list.concat(list.map(getOppositeAlignmentPlacement));
3705        }
3706      }
3707      return list;
3708    }
3709    function getOppositePlacement(placement) {
3710      const side = getSide(placement);
3711      return oppositeSideMap[side] + placement.slice(side.length);
3712    }
3713    function expandPaddingObject(padding) {
3714      var _padding$top, _padding$right, _padding$bottom, _padding$left;
3715      return {
3716        top: (_padding$top = padding.top) != null ? _padding$top : 0,
3717        right: (_padding$right = padding.right) != null ? _padding$right : 0,
3718        bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
3719        left: (_padding$left = padding.left) != null ? _padding$left : 0
3720      };
3721    }
3722    function getPaddingObject(padding) {
3723      return typeof padding !== "number" ? expandPaddingObject(padding) : {
3724        top: padding,
3725        right: padding,
3726        bottom: padding,
3727        left: padding
3728      };
3729    }
3730    function rectToClientRect(rect) {
3731      const {
3732        x,
3733        y,
3734        width,
3735        height
3736      } = rect;
3737      return {
3738        width,
3739        height,
3740        top: y,
3741        left: x,
3742        right: x + width,
3743        bottom: y + height,
3744        x,
3745        y
3746      };
3747    }
3748  
3749    // node_modules/@base-ui/react/floating-ui-react/utils/composite.mjs
3750    function isHiddenByStyles(styles) {
3751      return styles.visibility === "hidden" || styles.visibility === "collapse";
3752    }
3753    function isElementVisible(element, styles = element ? getComputedStyle2(element) : null) {
3754      if (!element || !element.isConnected || !styles || isHiddenByStyles(styles)) {
3755        return false;
3756      }
3757      if (typeof element.checkVisibility === "function") {
3758        return element.checkVisibility();
3759      }
3760      return styles.display !== "none" && styles.display !== "contents";
3761    }
3762  
3763    // node_modules/@base-ui/react/floating-ui-react/utils/tabbable.mjs
3764    var CANDIDATE_SELECTOR = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';
3765    function getParentElement(element) {
3766      const assignedSlot = element.assignedSlot;
3767      if (assignedSlot) {
3768        return assignedSlot;
3769      }
3770      if (element.parentElement) {
3771        return element.parentElement;
3772      }
3773      const rootNode = element.getRootNode();
3774      return isShadowRoot(rootNode) ? rootNode.host : null;
3775    }
3776    function getDetailsSummary(details) {
3777      for (const child of Array.from(details.children)) {
3778        if (getNodeName(child) === "summary") {
3779          return child;
3780        }
3781      }
3782      return null;
3783    }
3784    function isWithinOpenDetailsSummary(element, details) {
3785      const summary = getDetailsSummary(details);
3786      return !!summary && (element === summary || contains(summary, element));
3787    }
3788    function isFocusableCandidate(element) {
3789      const nodeName = element ? getNodeName(element) : "";
3790      return element != null && element.matches(CANDIDATE_SELECTOR) && (nodeName !== "summary" || element.parentElement != null && getNodeName(element.parentElement) === "details" && getDetailsSummary(element.parentElement) === element) && (nodeName !== "details" || getDetailsSummary(element) == null) && (nodeName !== "input" || element.type !== "hidden");
3791    }
3792    function isFocusableElement(element) {
3793      if (!isFocusableCandidate(element) || !element.isConnected || element.matches(":disabled")) {
3794        return false;
3795      }
3796      for (let current = element; current; current = getParentElement(current)) {
3797        const isAncestor = current !== element;
3798        const isSlot = getNodeName(current) === "slot";
3799        if (current.hasAttribute("inert")) {
3800          return false;
3801        }
3802        if (isAncestor && getNodeName(current) === "details" && !current.open && !isWithinOpenDetailsSummary(element, current) || current.hasAttribute("hidden") || !isSlot && !isVisibleInTabbableTree(current, isAncestor)) {
3803          return false;
3804        }
3805      }
3806      return true;
3807    }
3808    function isVisibleInTabbableTree(element, isAncestor) {
3809      const styles = getComputedStyle2(element);
3810      if (!isAncestor) {
3811        return isElementVisible(element, styles);
3812      }
3813      return styles.display !== "none";
3814    }
3815    function getTabIndex(element) {
3816      const tabIndex = element.tabIndex;
3817      if (tabIndex < 0) {
3818        const nodeName = getNodeName(element);
3819        if (nodeName === "details" || nodeName === "audio" || nodeName === "video" || isHTMLElement(element) && element.isContentEditable) {
3820          return 0;
3821        }
3822      }
3823      return tabIndex;
3824    }
3825    function getNamedRadioInput(element) {
3826      if (getNodeName(element) !== "input") {
3827        return null;
3828      }
3829      const input = element;
3830      return input.type === "radio" && input.name !== "" ? input : null;
3831    }
3832    function isTabbableRadio(element, candidates) {
3833      const input = getNamedRadioInput(element);
3834      if (!input) {
3835        return true;
3836      }
3837      const checkedRadio = candidates.find((candidate) => {
3838        const radio = getNamedRadioInput(candidate);
3839        return radio?.name === input.name && radio.form === input.form && radio.checked;
3840      });
3841      if (checkedRadio) {
3842        return checkedRadio === input;
3843      }
3844      return candidates.find((candidate) => {
3845        const radio = getNamedRadioInput(candidate);
3846        return radio?.name === input.name && radio.form === input.form;
3847      }) === input;
3848    }
3849    function getComposedChildren(container) {
3850      if (isHTMLElement(container) && getNodeName(container) === "slot") {
3851        const assignedElements = container.assignedElements({
3852          flatten: true
3853        });
3854        if (assignedElements.length > 0) {
3855          return assignedElements;
3856        }
3857      }
3858      if (isHTMLElement(container) && container.shadowRoot) {
3859        return Array.from(container.shadowRoot.children);
3860      }
3861      return Array.from(container.children);
3862    }
3863    function appendCandidates(container, list) {
3864      getComposedChildren(container).forEach((child) => {
3865        if (isFocusableCandidate(child)) {
3866          list.push(child);
3867        }
3868        appendCandidates(child, list);
3869      });
3870    }
3871    function appendMatchingElements(container, selector, list) {
3872      getComposedChildren(container).forEach((child) => {
3873        if (isHTMLElement(child) && child.matches(selector)) {
3874          list.push(child);
3875        }
3876        appendMatchingElements(child, selector, list);
3877      });
3878    }
3879    function focusable(container) {
3880      const candidates = [];
3881      appendCandidates(container, candidates);
3882      return candidates.filter(isFocusableElement);
3883    }
3884    function tabbable(container) {
3885      const candidates = focusable(container);
3886      return candidates.filter((element) => getTabIndex(element) >= 0 && isTabbableRadio(element, candidates));
3887    }
3888    function getTabbableIn(container, dir) {
3889      const list = tabbable(container);
3890      const len = list.length;
3891      if (len === 0) {
3892        return void 0;
3893      }
3894      const active = activeElement(ownerDocument(container));
3895      const index2 = list.indexOf(active);
3896      const nextIndex = index2 === -1 ? dir === 1 ? 0 : len - 1 : index2 + dir;
3897      return list[nextIndex];
3898    }
3899    function getNextTabbable(referenceElement) {
3900      return getTabbableIn(ownerDocument(referenceElement).body, 1) || referenceElement;
3901    }
3902    function getPreviousTabbable(referenceElement) {
3903      return getTabbableIn(ownerDocument(referenceElement).body, -1) || referenceElement;
3904    }
3905    function isOutsideEvent(event, container) {
3906      const containerElement = container || event.currentTarget;
3907      const relatedTarget = event.relatedTarget;
3908      return !relatedTarget || !contains(containerElement, relatedTarget);
3909    }
3910    function disableFocusInside(container) {
3911      const tabbableElements = tabbable(container);
3912      tabbableElements.forEach((element) => {
3913        element.dataset.tabindex = element.getAttribute("tabindex") || "";
3914        element.setAttribute("tabindex", "-1");
3915      });
3916    }
3917    function enableFocusInside(container) {
3918      const elements = [];
3919      appendMatchingElements(container, "[data-tabindex]", elements);
3920      elements.forEach((element) => {
3921        const tabindex = element.dataset.tabindex;
3922        delete element.dataset.tabindex;
3923        if (tabindex) {
3924          element.setAttribute("tabindex", tabindex);
3925        } else {
3926          element.removeAttribute("tabindex");
3927        }
3928      });
3929    }
3930  
3931    // node_modules/@base-ui/react/floating-ui-react/utils/nodes.mjs
3932    function getNodeChildren(nodes, id, onlyOpenChildren = true) {
3933      const directChildren = nodes.filter((node) => node.parentId === id);
3934      return directChildren.flatMap((child) => [...!onlyOpenChildren || child.context?.open ? [child] : [], ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);
3935    }
3936  
3937    // node_modules/@base-ui/react/floating-ui-react/utils/createAttribute.mjs
3938    function createAttribute(name2) {
3939      return `data-base-ui-$name2}`;
3940    }
3941  
3942    // node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
3943    var React20 = __toESM(require_react(), 1);
3944    var ReactDOM2 = __toESM(require_react_dom(), 1);
3945  
3946    // node_modules/@base-ui/react/internals/constants.mjs
3947    var DISABLED_TRANSITIONS_STYLE = {
3948      style: {
3949        transition: "none"
3950      }
3951    };
3952    var BASE_UI_SWIPE_IGNORE_ATTRIBUTE = "data-base-ui-swipe-ignore";
3953    var LEGACY_SWIPE_IGNORE_ATTRIBUTE = "data-swipe-ignore";
3954    var BASE_UI_SWIPE_IGNORE_SELECTOR = `[$BASE_UI_SWIPE_IGNORE_ATTRIBUTE}]`;
3955    var LEGACY_SWIPE_IGNORE_SELECTOR = `[$LEGACY_SWIPE_IGNORE_ATTRIBUTE}]`;
3956    var POPUP_COLLISION_AVOIDANCE = {
3957      fallbackAxisSide: "end"
3958    };
3959    var ownerVisuallyHidden = {
3960      clipPath: "inset(50%)",
3961      position: "fixed",
3962      top: 0,
3963      left: 0
3964    };
3965  
3966    // node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
3967    var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
3968    var PortalContext = /* @__PURE__ */ React20.createContext(null);
3969    if (true) PortalContext.displayName = "PortalContext";
3970    var usePortalContext = () => React20.useContext(PortalContext);
3971    var attr = createAttribute("portal");
3972    function useFloatingPortalNode(props = {}) {
3973      const {
3974        ref,
3975        container: containerProp,
3976        componentProps = EMPTY_OBJECT,
3977        elementProps
3978      } = props;
3979      const uniqueId = useId();
3980      const portalContext = usePortalContext();
3981      const parentPortalNode = portalContext?.portalNode;
3982      const [containerElement, setContainerElement] = React20.useState(null);
3983      const [portalNode, setPortalNode] = React20.useState(null);
3984      const setPortalNodeRef = useStableCallback((node) => {
3985        if (node !== null) {
3986          setPortalNode(node);
3987        }
3988      });
3989      const containerRef = React20.useRef(null);
3990      useIsoLayoutEffect(() => {
3991        if (containerProp === null) {
3992          if (containerRef.current) {
3993            containerRef.current = null;
3994            setPortalNode(null);
3995            setContainerElement(null);
3996          }
3997          return;
3998        }
3999        const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;
4000        if (resolvedContainer == null) {
4001          if (containerRef.current) {
4002            containerRef.current = null;
4003            setPortalNode(null);
4004            setContainerElement(null);
4005          }
4006          return;
4007        }
4008        if (containerRef.current !== resolvedContainer) {
4009          containerRef.current = resolvedContainer;
4010          setPortalNode(null);
4011          setContainerElement(resolvedContainer);
4012        }
4013      }, [containerProp, parentPortalNode]);
4014      const portalElement = useRenderElement("div", componentProps, {
4015        ref: [ref, setPortalNodeRef],
4016        props: [{
4017          id: uniqueId,
4018          [attr]: ""
4019        }, elementProps]
4020      });
4021      const portalSubtree = containerElement && portalElement ? /* @__PURE__ */ ReactDOM2.createPortal(portalElement, containerElement) : null;
4022      return {
4023        node: portalNode,
4024        // `id` and `render` props can override or remove the generated ID. Use the exact
4025        // rendered value so `aria-owns` never points at an ID absent from the DOM.
4026        nodeId: /* @__PURE__ */ React20.isValidElement(portalElement) ? portalElement.props.id : void 0,
4027        subtree: portalSubtree
4028      };
4029    }
4030    var FloatingPortal = /* @__PURE__ */ React20.forwardRef(function FloatingPortal2(componentProps, forwardedRef) {
4031      const {
4032        render,
4033        className,
4034        style,
4035        children,
4036        container,
4037        ...elementProps
4038      } = componentProps;
4039      const {
4040        node: portalNode,
4041        nodeId: portalNodeId,
4042        subtree: portalSubtree
4043      } = useFloatingPortalNode({
4044        container,
4045        ref: forwardedRef,
4046        componentProps,
4047        elementProps
4048      });
4049      const beforeOutsideRef = React20.useRef(null);
4050      const afterOutsideRef = React20.useRef(null);
4051      const beforeInsideRef = React20.useRef(null);
4052      const afterInsideRef = React20.useRef(null);
4053      const [focusManagerState, setFocusManagerState] = React20.useState(null);
4054      const focusInsideDisabledRef = React20.useRef(false);
4055      const modal = focusManagerState?.modal;
4056      const open = focusManagerState?.open;
4057      const shouldRenderGuards = !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode;
4058      React20.useEffect(() => {
4059        if (!portalNode || modal) {
4060          return void 0;
4061        }
4062        function onFocus(event) {
4063          if (portalNode && event.relatedTarget && isOutsideEvent(event)) {
4064            if (event.type === "focusin") {
4065              if (focusInsideDisabledRef.current) {
4066                enableFocusInside(portalNode);
4067                focusInsideDisabledRef.current = false;
4068              }
4069            } else {
4070              disableFocusInside(portalNode);
4071              focusInsideDisabledRef.current = true;
4072            }
4073          }
4074        }
4075        return mergeCleanups(addEventListener(portalNode, "focusin", onFocus, true), addEventListener(portalNode, "focusout", onFocus, true));
4076      }, [portalNode, modal]);
4077      useIsoLayoutEffect(() => {
4078        if (!portalNode || open !== true || !focusInsideDisabledRef.current) {
4079          return;
4080        }
4081        enableFocusInside(portalNode);
4082        focusInsideDisabledRef.current = false;
4083      }, [open, portalNode]);
4084      const portalContextValue = React20.useMemo(() => ({
4085        beforeOutsideRef,
4086        afterOutsideRef,
4087        beforeInsideRef,
4088        afterInsideRef,
4089        portalNode,
4090        setFocusManagerState
4091      }), [portalNode]);
4092      return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(React20.Fragment, {
4093        children: [portalSubtree, /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(PortalContext.Provider, {
4094          value: portalContextValue,
4095          children: [shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(FocusGuard, {
4096            "data-type": "outside",
4097            ref: beforeOutsideRef,
4098            onFocus: (event) => {
4099              if (isOutsideEvent(event, portalNode)) {
4100                beforeInsideRef.current?.focus();
4101              } else {
4102                const domReference = focusManagerState ? focusManagerState.domReference : null;
4103                const prevTabbable = getPreviousTabbable(domReference);
4104                prevTabbable?.focus();
4105              }
4106            }
4107          }), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", {
4108            "aria-owns": portalNodeId,
4109            style: ownerVisuallyHidden
4110          }), portalNode && /* @__PURE__ */ ReactDOM2.createPortal(children, portalNode), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(FocusGuard, {
4111            "data-type": "outside",
4112            ref: afterOutsideRef,
4113            onFocus: (event) => {
4114              if (isOutsideEvent(event, portalNode)) {
4115                afterInsideRef.current?.focus();
4116              } else {
4117                const domReference = focusManagerState ? focusManagerState.domReference : null;
4118                const nextTabbable = getNextTabbable(domReference);
4119                nextTabbable?.focus();
4120                if (focusManagerState?.closeOnFocusOut) {
4121                  focusManagerState?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.focusOut, event.nativeEvent));
4122                }
4123              }
4124            }
4125          })]
4126        })]
4127      });
4128    });
4129    if (true) FloatingPortal.displayName = "FloatingPortal";
4130  
4131    // node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
4132    var React21 = __toESM(require_react(), 1);
4133  
4134    // node_modules/@base-ui/react/floating-ui-react/utils/createEventEmitter.mjs
4135    function createEventEmitter() {
4136      const map = /* @__PURE__ */ new Map();
4137      return {
4138        emit(event, data) {
4139          map.get(event)?.forEach((listener) => listener(data));
4140        },
4141        on(event, listener) {
4142          if (!map.has(event)) {
4143            map.set(event, /* @__PURE__ */ new Set());
4144          }
4145          map.get(event).add(listener);
4146        },
4147        off(event, listener) {
4148          map.get(event)?.delete(listener);
4149        }
4150      };
4151    }
4152  
4153    // node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
4154    var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
4155    var FloatingNodeContext = /* @__PURE__ */ React21.createContext(null);
4156    if (true) FloatingNodeContext.displayName = "FloatingNodeContext";
4157    var FloatingTreeContext = /* @__PURE__ */ React21.createContext(null);
4158    if (true) FloatingTreeContext.displayName = "FloatingTreeContext";
4159    var useFloatingParentNodeId = () => React21.useContext(FloatingNodeContext)?.id || null;
4160    var useFloatingTree = (externalTree) => {
4161      const contextTree = React21.useContext(FloatingTreeContext);
4162      return externalTree ?? contextTree;
4163    };
4164  
4165    // node_modules/@base-ui/react/floating-ui-react/hooks/useClientPoint.mjs
4166    var React22 = __toESM(require_react(), 1);
4167    function createVirtualElement(domElement, data) {
4168      let offsetX = null;
4169      let offsetY = null;
4170      let isAutoUpdateEvent = false;
4171      return {
4172        contextElement: domElement || void 0,
4173        getBoundingClientRect() {
4174          const domRect = domElement?.getBoundingClientRect() || {
4175            width: 0,
4176            height: 0,
4177            x: 0,
4178            y: 0
4179          };
4180          const isXAxis = data.axis === "x" || data.axis === "both";
4181          const isYAxis = data.axis === "y" || data.axis === "both";
4182          const canTrackCursorOnAutoUpdate = ["mouseenter", "mousemove"].includes(data.dataRef.current.openEvent?.type || "") && data.pointerType !== "touch";
4183          let width = domRect.width;
4184          let height = domRect.height;
4185          let x = domRect.x;
4186          let y = domRect.y;
4187          if (offsetX == null && data.x && isXAxis) {
4188            offsetX = domRect.x - data.x;
4189          }
4190          if (offsetY == null && data.y && isYAxis) {
4191            offsetY = domRect.y - data.y;
4192          }
4193          x -= offsetX || 0;
4194          y -= offsetY || 0;
4195          width = 0;
4196          height = 0;
4197          if (!isAutoUpdateEvent || canTrackCursorOnAutoUpdate) {
4198            width = data.axis === "y" ? domRect.width : 0;
4199            height = data.axis === "x" ? domRect.height : 0;
4200            x = isXAxis && data.x != null ? data.x : x;
4201            y = isYAxis && data.y != null ? data.y : y;
4202          } else if (isAutoUpdateEvent && !canTrackCursorOnAutoUpdate) {
4203            height = data.axis === "x" ? domRect.height : height;
4204            width = data.axis === "y" ? domRect.width : width;
4205          }
4206          isAutoUpdateEvent = true;
4207          return {
4208            width,
4209            height,
4210            x,
4211            y,
4212            top: y,
4213            right: x + width,
4214            bottom: y + height,
4215            left: x
4216          };
4217        }
4218      };
4219    }
4220    function isMouseBasedEvent(event) {
4221      return event != null && event.clientX != null;
4222    }
4223    function useClientPoint(context, props = {}) {
4224      const {
4225        enabled = true,
4226        axis = "both"
4227      } = props;
4228      const store3 = "rootStore" in context ? context.rootStore : context;
4229      const open = store3.useState("open");
4230      const floating = store3.useState("floatingElement");
4231      const domReference = store3.useState("domReferenceElement");
4232      const dataRef = store3.context.dataRef;
4233      const initialRef = React22.useRef(false);
4234      const cleanupListenerRef = React22.useRef(null);
4235      const [pointerType, setPointerType] = React22.useState();
4236      const [reactive, setReactive] = React22.useState([]);
4237      const resetReference = useStableCallback((reference2) => {
4238        store3.set("positionReference", reference2);
4239      });
4240      const setReference = useStableCallback((newX, newY, referenceElement) => {
4241        if (initialRef.current) {
4242          return;
4243        }
4244        if (dataRef.current.openEvent && !isMouseBasedEvent(dataRef.current.openEvent)) {
4245          return;
4246        }
4247        store3.set("positionReference", createVirtualElement(referenceElement ?? domReference, {
4248          x: newX,
4249          y: newY,
4250          axis,
4251          dataRef,
4252          pointerType
4253        }));
4254      });
4255      const handleReferenceEnterOrMove = useStableCallback((event) => {
4256        if (!open) {
4257          setReference(event.clientX, event.clientY, event.currentTarget);
4258        } else if (!cleanupListenerRef.current) {
4259          setReference(event.clientX, event.clientY, event.currentTarget);
4260          setReactive([]);
4261        }
4262      });
4263      const openCheck = isMouseLikePointerType(pointerType) ? floating : open;
4264      React22.useEffect(() => {
4265        if (!enabled) {
4266          resetReference(domReference);
4267          return void 0;
4268        }
4269        if (!openCheck) {
4270          return void 0;
4271        }
4272        function cleanupListener() {
4273          cleanupListenerRef.current?.();
4274          cleanupListenerRef.current = null;
4275        }
4276        const win = getWindow(floating);
4277        function handleMouseMove(event) {
4278          const target = getTarget(event);
4279          if (!contains(floating, target)) {
4280            setReference(event.clientX, event.clientY);
4281          } else {
4282            cleanupListener();
4283          }
4284        }
4285        if (!dataRef.current.openEvent || isMouseBasedEvent(dataRef.current.openEvent)) {
4286          cleanupListenerRef.current = addEventListener(win, "mousemove", handleMouseMove);
4287        } else {
4288          resetReference(domReference);
4289        }
4290        return cleanupListener;
4291      }, [openCheck, enabled, floating, dataRef, domReference, store3, setReference, resetReference, reactive]);
4292      React22.useEffect(() => () => {
4293        store3.set("positionReference", null);
4294      }, [store3]);
4295      React22.useEffect(() => {
4296        if (enabled && !floating) {
4297          initialRef.current = false;
4298        }
4299      }, [enabled, floating]);
4300      React22.useEffect(() => {
4301        if (!enabled && open) {
4302          initialRef.current = true;
4303        }
4304      }, [enabled, open]);
4305      const reference = React22.useMemo(() => {
4306        function setPointerTypeRef(event) {
4307          setPointerType(event.pointerType);
4308        }
4309        return {
4310          onPointerDown: setPointerTypeRef,
4311          onPointerEnter: setPointerTypeRef,
4312          onMouseMove: handleReferenceEnterOrMove,
4313          onMouseEnter: handleReferenceEnterOrMove
4314        };
4315      }, [handleReferenceEnterOrMove]);
4316      return React22.useMemo(() => enabled ? {
4317        reference,
4318        trigger: reference
4319      } : {}, [enabled, reference]);
4320    }
4321  
4322    // node_modules/@base-ui/react/floating-ui-react/hooks/useDismiss.mjs
4323    var React23 = __toESM(require_react(), 1);
4324    function alwaysFalse() {
4325      return false;
4326    }
4327    function normalizeProp(normalizable) {
4328      return {
4329        escapeKey: typeof normalizable === "boolean" ? normalizable : normalizable?.escapeKey ?? false,
4330        outsidePress: typeof normalizable === "boolean" ? normalizable : normalizable?.outsidePress ?? true
4331      };
4332    }
4333    function useDismiss(context, props = {}) {
4334      const {
4335        enabled = true,
4336        escapeKey: escapeKey2 = true,
4337        outsidePress: outsidePressProp = true,
4338        outsidePressEvent = "sloppy",
4339        referencePress = alwaysFalse,
4340        bubbles,
4341        externalTree
4342      } = props;
4343      const store3 = "rootStore" in context ? context.rootStore : context;
4344      const open = store3.useState("open");
4345      const floatingElement = store3.useState("floatingElement");
4346      const {
4347        dataRef
4348      } = store3.context;
4349      const tree = useFloatingTree(externalTree);
4350      const outsidePressFn = useStableCallback(typeof outsidePressProp === "function" ? outsidePressProp : () => false);
4351      const outsidePress2 = typeof outsidePressProp === "function" ? outsidePressFn : outsidePressProp;
4352      const outsidePressEnabled = outsidePress2 !== false;
4353      const getOutsidePressEventProp = useStableCallback(() => outsidePressEvent);
4354      const {
4355        escapeKey: escapeKeyBubbles,
4356        outsidePress: outsidePressBubbles
4357      } = normalizeProp(bubbles);
4358      const pressStartedInsideRef = React23.useRef(false);
4359      const pressStartPreventedRef = React23.useRef(false);
4360      const suppressNextOutsideClickRef = React23.useRef(false);
4361      const isComposingRef = React23.useRef(false);
4362      const currentPointerTypeRef = React23.useRef("");
4363      const touchStateRef = React23.useRef(null);
4364      const cancelDismissOnEndTimeout = useTimeout();
4365      const clearInsideReactTreeTimeout = useTimeout();
4366      const clearInsideReactTree = useStableCallback(() => {
4367        clearInsideReactTreeTimeout.clear();
4368        dataRef.current.insideReactTree = false;
4369      });
4370      const hasBlockingChild = useStableCallback((bubbleKey) => {
4371        const nodeId = dataRef.current.floatingContext?.nodeId;
4372        const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];
4373        return children.some((child) => child.context?.open && !child.context.dataRef.current[bubbleKey]);
4374      });
4375      const isEventWithinOwnElements = useStableCallback((event) => {
4376        return isEventTargetWithin(event, store3.select("floatingElement")) || isEventTargetWithin(event, store3.select("domReferenceElement"));
4377      });
4378      const closeOnReferencePress = useStableCallback((event) => {
4379        if (!referencePress()) {
4380          return;
4381        }
4382        store3.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent));
4383      });
4384      const closeOnEscapeKeyDown = useStableCallback((event) => {
4385        if (!open || !enabled || !escapeKey2 || event.key !== "Escape") {
4386          return;
4387        }
4388        if (isComposingRef.current) {
4389          return;
4390        }
4391        if (!escapeKeyBubbles && hasBlockingChild("__escapeKeyBubbles")) {
4392          return;
4393        }
4394        const native = isReactEvent(event) ? event.nativeEvent : event;
4395        const eventDetails = createChangeEventDetails(reason_parts_exports.escapeKey, native);
4396        store3.setOpen(false, eventDetails);
4397        if (!eventDetails.isCanceled) {
4398          event.preventDefault();
4399        }
4400        if (!escapeKeyBubbles && !eventDetails.isPropagationAllowed) {
4401          event.stopPropagation();
4402        }
4403      });
4404      const markInsideReactTree = useStableCallback(() => {
4405        dataRef.current.insideReactTree = true;
4406        clearInsideReactTreeTimeout.start(0, clearInsideReactTree);
4407      });
4408      const markPressStartedInsideReactTree = useStableCallback((event) => {
4409        if (!open || !enabled || event.button !== 0) {
4410          return;
4411        }
4412        const target = getTarget(event.nativeEvent);
4413        if (!contains(store3.select("floatingElement"), target)) {
4414          return;
4415        }
4416        if (!pressStartedInsideRef.current) {
4417          pressStartedInsideRef.current = true;
4418          pressStartPreventedRef.current = false;
4419        }
4420      });
4421      const markInsidePressStartPrevented = useStableCallback((event) => {
4422        if (!open || !enabled) {
4423          return;
4424        }
4425        if (!(event.defaultPrevented || event.nativeEvent.defaultPrevented)) {
4426          return;
4427        }
4428        if (pressStartedInsideRef.current) {
4429          pressStartPreventedRef.current = true;
4430        }
4431      });
4432      React23.useEffect(() => {
4433        if (!open || !enabled) {
4434          return clearInsideReactTree;
4435        }
4436        dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;
4437        dataRef.current.__outsidePressBubbles = outsidePressBubbles;
4438        const compositionTimeout = new Timeout();
4439        const preventedPressSuppressionTimeout = new Timeout();
4440        function handleCompositionStart() {
4441          compositionTimeout.clear();
4442          isComposingRef.current = true;
4443        }
4444        function handleCompositionEnd() {
4445          compositionTimeout.start(
4446            // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
4447            // Only apply to WebKit for the test to remain 0ms.
4448            parts_exports.engine.webkit ? 5 : 0,
4449            () => {
4450              isComposingRef.current = false;
4451            }
4452          );
4453        }
4454        function suppressImmediateOutsideClickAfterPreventedStart() {
4455          suppressNextOutsideClickRef.current = true;
4456          preventedPressSuppressionTimeout.start(0, () => {
4457            suppressNextOutsideClickRef.current = false;
4458          });
4459        }
4460        function resetPressStartState() {
4461          pressStartedInsideRef.current = false;
4462          pressStartPreventedRef.current = false;
4463        }
4464        function getOutsidePressEvent() {
4465          const type = currentPointerTypeRef.current;
4466          const computedType = type === "pen" || !type ? "mouse" : type;
4467          const outsidePressEventValue = getOutsidePressEventProp();
4468          const resolved = typeof outsidePressEventValue === "function" ? outsidePressEventValue() : outsidePressEventValue;
4469          if (typeof resolved === "string") {
4470            return resolved;
4471          }
4472          return resolved[computedType];
4473        }
4474        function shouldIgnoreEvent(event) {
4475          const computedOutsidePressEvent = getOutsidePressEvent();
4476          return computedOutsidePressEvent === "intentional" && event.type !== "click" || computedOutsidePressEvent === "sloppy" && event.type === "click";
4477        }
4478        function isEventWithinFloatingTree(event) {
4479          const nodeId = dataRef.current.floatingContext?.nodeId;
4480          const targetIsInsideChildren = tree && getNodeChildren(tree.nodesRef.current, nodeId).some((node) => isEventTargetWithin(event, node.context?.elements.floating));
4481          return isEventWithinOwnElements(event) || targetIsInsideChildren;
4482        }
4483        function closeOnPressOutside(event) {
4484          if (shouldIgnoreEvent(event)) {
4485            if (event.type !== "click" && !isEventWithinOwnElements(event)) {
4486              preventedPressSuppressionTimeout.clear();
4487              suppressNextOutsideClickRef.current = false;
4488            }
4489            clearInsideReactTree();
4490            return;
4491          }
4492          if (dataRef.current.insideReactTree) {
4493            clearInsideReactTree();
4494            return;
4495          }
4496          const target = getTarget(event);
4497          const inertSelector = `[$createAttribute("inert")}]`;
4498          const targetRoot = isElement(target) ? target.getRootNode() : null;
4499          const markers = Array.from((isShadowRoot(targetRoot) ? targetRoot : ownerDocument(store3.select("floatingElement"))).querySelectorAll(inertSelector));
4500          const triggers = store3.context.triggerElements;
4501          if (target && (triggers.hasElement(target) || triggers.hasMatchingElement((trigger) => contains(trigger, target)))) {
4502            return;
4503          }
4504          let targetRootAncestor = isElement(target) ? target : null;
4505          while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {
4506            const nextParent = getParentNode(targetRootAncestor);
4507            if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {
4508              break;
4509            }
4510            targetRootAncestor = nextParent;
4511          }
4512          if (markers.length && isElement(target) && !isRootElement(target) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
4513          !contains(target, store3.select("floatingElement")) && // If the target root element contains none of the markers, then the
4514          // element was injected after the floating element rendered.
4515          markers.every((marker) => !contains(targetRootAncestor, marker))) {
4516            return;
4517          }
4518          if (isHTMLElement(target) && !("touches" in event)) {
4519            const lastTraversableNode = isLastTraversableNode(target);
4520            const style = getComputedStyle2(target);
4521            const scrollRe = /auto|scroll/;
4522            const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);
4523            const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);
4524            const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;
4525            const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;
4526            const isRTL6 = style.direction === "rtl";
4527            const pressedVerticalScrollbar = canScrollY && (isRTL6 ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);
4528            const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;
4529            if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {
4530              return;
4531            }
4532          }
4533          if (isEventWithinFloatingTree(event)) {
4534            return;
4535          }
4536          if (getOutsidePressEvent() === "intentional" && suppressNextOutsideClickRef.current) {
4537            preventedPressSuppressionTimeout.clear();
4538            suppressNextOutsideClickRef.current = false;
4539            return;
4540          }
4541          if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
4542            return;
4543          }
4544          if (hasBlockingChild("__outsidePressBubbles")) {
4545            return;
4546          }
4547          store3.setOpen(false, createChangeEventDetails(reason_parts_exports.outsidePress, event));
4548          clearInsideReactTree();
4549        }
4550        function handlePointerDown(event) {
4551          if (getOutsidePressEvent() !== "sloppy" || event.pointerType === "touch" || !store3.select("open") || !enabled || isEventWithinOwnElements(event)) {
4552            return;
4553          }
4554          closeOnPressOutside(event);
4555        }
4556        function handleTouchStart(event) {
4557          if (getOutsidePressEvent() !== "sloppy" || !store3.select("open") || !enabled || isEventWithinOwnElements(event)) {
4558            return;
4559          }
4560          const touch = event.touches[0];
4561          if (touch) {
4562            touchStateRef.current = {
4563              startTime: Date.now(),
4564              startX: touch.clientX,
4565              startY: touch.clientY,
4566              dismissOnTouchEnd: false,
4567              dismissOnMouseDown: true
4568            };
4569            cancelDismissOnEndTimeout.start(1e3, () => {
4570              if (touchStateRef.current) {
4571                touchStateRef.current.dismissOnTouchEnd = false;
4572                touchStateRef.current.dismissOnMouseDown = false;
4573              }
4574            });
4575          }
4576        }
4577        function addTargetEventListenerOnce(event, listener) {
4578          const target = getTarget(event);
4579          if (!target) {
4580            return;
4581          }
4582          const unsubscribe2 = addEventListener(target, event.type, () => {
4583            listener(event);
4584            unsubscribe2();
4585          });
4586        }
4587        function handleTouchStartCapture(event) {
4588          currentPointerTypeRef.current = "touch";
4589          addTargetEventListenerOnce(event, handleTouchStart);
4590        }
4591        function closeOnPressOutsideCapture(event) {
4592          cancelDismissOnEndTimeout.clear();
4593          if (event.type === "pointerdown") {
4594            currentPointerTypeRef.current = event.pointerType;
4595          }
4596          if (event.type === "mousedown" && touchStateRef.current && !touchStateRef.current.dismissOnMouseDown) {
4597            return;
4598          }
4599          addTargetEventListenerOnce(event, (targetEvent) => {
4600            if (targetEvent.type === "pointerdown") {
4601              handlePointerDown(targetEvent);
4602            } else {
4603              closeOnPressOutside(targetEvent);
4604            }
4605          });
4606        }
4607        function handlePressEndCapture(event) {
4608          if (!pressStartedInsideRef.current) {
4609            return;
4610          }
4611          const pressStartedInsideDefaultPrevented = pressStartPreventedRef.current;
4612          resetPressStartState();
4613          if (getOutsidePressEvent() !== "intentional") {
4614            return;
4615          }
4616          if (event.type === "pointercancel") {
4617            if (pressStartedInsideDefaultPrevented) {
4618              suppressImmediateOutsideClickAfterPreventedStart();
4619            }
4620            return;
4621          }
4622          if (isEventWithinFloatingTree(event)) {
4623            return;
4624          }
4625          if (pressStartedInsideDefaultPrevented) {
4626            suppressImmediateOutsideClickAfterPreventedStart();
4627            return;
4628          }
4629          if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
4630            return;
4631          }
4632          preventedPressSuppressionTimeout.clear();
4633          suppressNextOutsideClickRef.current = true;
4634          clearInsideReactTree();
4635        }
4636        function handleTouchMove(event) {
4637          if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
4638            return;
4639          }
4640          const touch = event.touches[0];
4641          if (!touch) {
4642            return;
4643          }
4644          const deltaX = Math.abs(touch.clientX - touchStateRef.current.startX);
4645          const deltaY = Math.abs(touch.clientY - touchStateRef.current.startY);
4646          const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
4647          if (distance > 5) {
4648            touchStateRef.current.dismissOnTouchEnd = true;
4649          }
4650          if (distance > 10) {
4651            closeOnPressOutside(event);
4652            cancelDismissOnEndTimeout.clear();
4653            touchStateRef.current = null;
4654          }
4655        }
4656        function handleTouchMoveCapture(event) {
4657          addTargetEventListenerOnce(event, handleTouchMove);
4658        }
4659        function handleTouchEnd(event) {
4660          if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
4661            return;
4662          }
4663          if (touchStateRef.current.dismissOnTouchEnd) {
4664            closeOnPressOutside(event);
4665          }
4666          cancelDismissOnEndTimeout.clear();
4667          touchStateRef.current = null;
4668        }
4669        function handleTouchEndCapture(event) {
4670          addTargetEventListenerOnce(event, handleTouchEnd);
4671        }
4672        const doc = ownerDocument(floatingElement);
4673        const unsubscribe = mergeCleanups(escapeKey2 && mergeCleanups(addEventListener(doc, "keydown", closeOnEscapeKeyDown), addEventListener(doc, "compositionstart", handleCompositionStart), addEventListener(doc, "compositionend", handleCompositionEnd)), outsidePressEnabled && mergeCleanups(addEventListener(doc, "click", closeOnPressOutsideCapture, true), addEventListener(doc, "pointerdown", closeOnPressOutsideCapture, true), addEventListener(doc, "pointerup", handlePressEndCapture, true), addEventListener(doc, "pointercancel", handlePressEndCapture, true), addEventListener(doc, "mousedown", closeOnPressOutsideCapture, true), addEventListener(doc, "mouseup", handlePressEndCapture, true), addEventListener(doc, "touchstart", handleTouchStartCapture, true), addEventListener(doc, "touchmove", handleTouchMoveCapture, true), addEventListener(doc, "touchend", handleTouchEndCapture, true)));
4674        return () => {
4675          unsubscribe();
4676          compositionTimeout.clear();
4677          preventedPressSuppressionTimeout.clear();
4678          resetPressStartState();
4679          suppressNextOutsideClickRef.current = false;
4680          clearInsideReactTree();
4681        };
4682      }, [dataRef, floatingElement, escapeKey2, outsidePressEnabled, outsidePress2, open, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, clearInsideReactTree, getOutsidePressEventProp, hasBlockingChild, isEventWithinOwnElements, tree, store3, cancelDismissOnEndTimeout]);
4683      const reference = React23.useMemo(() => ({
4684        onKeyDown: closeOnEscapeKeyDown,
4685        onPointerDown: closeOnReferencePress,
4686        onClick: closeOnReferencePress
4687      }), [closeOnEscapeKeyDown, closeOnReferencePress]);
4688      const floating = React23.useMemo(() => ({
4689        onKeyDown: closeOnEscapeKeyDown,
4690        // `onMouseDown` may be blocked if `event.preventDefault()` is called in
4691        // `onPointerDown`, such as with <NumberField.ScrubArea>.
4692        // See https://github.com/mui/base-ui/pull/3379
4693        onPointerDown: markInsidePressStartPrevented,
4694        onMouseDown: markInsidePressStartPrevented,
4695        onClickCapture: markInsideReactTree,
4696        onMouseDownCapture(event) {
4697          markInsideReactTree();
4698          markPressStartedInsideReactTree(event);
4699        },
4700        onPointerDownCapture(event) {
4701          markInsideReactTree();
4702          markPressStartedInsideReactTree(event);
4703        },
4704        onMouseUpCapture: markInsideReactTree,
4705        onTouchEndCapture: markInsideReactTree,
4706        onTouchMoveCapture: markInsideReactTree
4707      }), [closeOnEscapeKeyDown, markInsideReactTree, markPressStartedInsideReactTree, markInsidePressStartPrevented]);
4708      return React23.useMemo(() => enabled ? {
4709        reference,
4710        floating,
4711        trigger: reference
4712      } : {}, [enabled, reference, floating]);
4713    }
4714  
4715    // node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
4716    var React31 = __toESM(require_react(), 1);
4717  
4718    // node_modules/@floating-ui/core/dist/floating-ui.core.mjs
4719    function computeCoordsFromPlacement(_ref, placement, rtl) {
4720      let {
4721        reference,
4722        floating
4723      } = _ref;
4724      const sideAxis = getSideAxis(placement);
4725      const alignmentAxis = getAlignmentAxis(placement);
4726      const alignLength = getAxisLength(alignmentAxis);
4727      const side = getSide(placement);
4728      const isVertical = sideAxis === "y";
4729      const commonX = reference.x + reference.width / 2 - floating.width / 2;
4730      const commonY = reference.y + reference.height / 2 - floating.height / 2;
4731      const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
4732      let coords;
4733      switch (side) {
4734        case "top":
4735          coords = {
4736            x: commonX,
4737            y: reference.y - floating.height
4738          };
4739          break;
4740        case "bottom":
4741          coords = {
4742            x: commonX,
4743            y: reference.y + reference.height
4744          };
4745          break;
4746        case "right":
4747          coords = {
4748            x: reference.x + reference.width,
4749            y: commonY
4750          };
4751          break;
4752        case "left":
4753          coords = {
4754            x: reference.x - floating.width,
4755            y: commonY
4756          };
4757          break;
4758        default:
4759          coords = {
4760            x: reference.x,
4761            y: reference.y
4762          };
4763      }
4764      const alignment = getAlignment(placement);
4765      if (alignment) {
4766        coords[alignmentAxis] += commonAlign * (alignment === "end" ? 1 : -1) * (rtl && isVertical ? -1 : 1);
4767      }
4768      return coords;
4769    }
4770    async function detectOverflow(state, options) {
4771      var _await$platform$isEle;
4772      if (options === void 0) {
4773        options = {};
4774      }
4775      const {
4776        x,
4777        y,
4778        platform: platform3,
4779        rects,
4780        elements,
4781        strategy
4782      } = state;
4783      const {
4784        boundary = "clippingAncestors",
4785        rootBoundary = "viewport",
4786        elementContext = "floating",
4787        altBoundary = false,
4788        padding = 0
4789      } = evaluate(options, state);
4790      const paddingObject = getPaddingObject(padding);
4791      const altContext = elementContext === "floating" ? "reference" : "floating";
4792      const element = elements[altBoundary ? altContext : elementContext];
4793      const clippingClientRect = rectToClientRect(await platform3.getClippingRect({
4794        element: ((_await$platform$isEle = await (platform3.isElement == null ? void 0 : platform3.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform3.getDocumentElement == null ? void 0 : platform3.getDocumentElement(elements.floating)),
4795        boundary,
4796        rootBoundary,
4797        strategy
4798      }));
4799      const rect = elementContext === "floating" ? {
4800        x,
4801        y,
4802        width: rects.floating.width,
4803        height: rects.floating.height
4804      } : rects.reference;
4805      const offsetParent = await (platform3.getOffsetParent == null ? void 0 : platform3.getOffsetParent(elements.floating));
4806      const offsetScale = await (platform3.isElement == null ? void 0 : platform3.isElement(offsetParent)) && await (platform3.getScale == null ? void 0 : platform3.getScale(offsetParent)) || {
4807        x: 1,
4808        y: 1
4809      };
4810      const elementClientRect = rectToClientRect(platform3.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform3.convertOffsetParentRelativeRectToViewportRelativeRect({
4811        elements,
4812        rect,
4813        offsetParent,
4814        strategy
4815      }) : rect);
4816      return {
4817        top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
4818        bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
4819        left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
4820        right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
4821      };
4822    }
4823    var MAX_RESET_COUNT = 50;
4824    var computePosition = async (reference, floating, config) => {
4825      const {
4826        placement = "bottom",
4827        strategy = "absolute",
4828        middleware = [],
4829        platform: platform3
4830      } = config;
4831      const platformWithDetectOverflow = platform3.detectOverflow ? platform3 : {
4832        ...platform3,
4833        detectOverflow
4834      };
4835      const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(floating));
4836      let rects = await platform3.getElementRects({
4837        reference,
4838        floating,
4839        strategy
4840      });
4841      let {
4842        x,
4843        y
4844      } = computeCoordsFromPlacement(rects, placement, rtl);
4845      let statefulPlacement = placement;
4846      let resetCount = 0;
4847      const middlewareData = {};
4848      for (let i = 0; i < middleware.length; i++) {
4849        const currentMiddleware = middleware[i];
4850        if (!currentMiddleware) {
4851          continue;
4852        }
4853        const {
4854          name: name2,
4855          fn
4856        } = currentMiddleware;
4857        const {
4858          x: nextX,
4859          y: nextY,
4860          data,
4861          reset
4862        } = await fn({
4863          x,
4864          y,
4865          initialPlacement: placement,
4866          placement: statefulPlacement,
4867          strategy,
4868          middlewareData,
4869          rects,
4870          platform: platformWithDetectOverflow,
4871          elements: {
4872            reference,
4873            floating
4874          }
4875        });
4876        x = nextX != null ? nextX : x;
4877        y = nextY != null ? nextY : y;
4878        middlewareData[name2] = {
4879          ...middlewareData[name2],
4880          ...data
4881        };
4882        if (reset && resetCount < MAX_RESET_COUNT) {
4883          resetCount++;
4884          if (typeof reset === "object") {
4885            if (reset.placement) {
4886              statefulPlacement = reset.placement;
4887            }
4888            if (reset.rects) {
4889              rects = reset.rects === true ? await platform3.getElementRects({
4890                reference,
4891                floating,
4892                strategy
4893              }) : reset.rects;
4894            }
4895            ({
4896              x,
4897              y
4898            } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
4899          }
4900          i = -1;
4901        }
4902      }
4903      return {
4904        x,
4905        y,
4906        placement: statefulPlacement,
4907        strategy,
4908        middlewareData
4909      };
4910    };
4911    var flip = function(options) {
4912      if (options === void 0) {
4913        options = {};
4914      }
4915      return {
4916        name: "flip",
4917        options,
4918        async fn(state) {
4919          var _middlewareData$arrow, _middlewareData$flip;
4920          const {
4921            placement,
4922            middlewareData,
4923            rects,
4924            initialPlacement,
4925            platform: platform3,
4926            elements
4927          } = state;
4928          const {
4929            mainAxis: checkMainAxis = true,
4930            crossAxis: checkCrossAxis = true,
4931            fallbackPlacements: specifiedFallbackPlacements,
4932            fallbackStrategy = "bestFit",
4933            fallbackAxisSideDirection = "none",
4934            flipAlignment = true,
4935            ...detectOverflowOptions
4936          } = evaluate(options, state);
4937          if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
4938            return {};
4939          }
4940          const side = getSide(placement);
4941          const initialSideAxis = getSideAxis(initialPlacement);
4942          const isBasePlacement = getSide(initialPlacement) === initialPlacement;
4943          const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating));
4944          const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
4945          const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
4946          if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
4947            fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
4948          }
4949          const placements2 = [initialPlacement, ...fallbackPlacements];
4950          const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
4951          const overflows = [];
4952          let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
4953          if (checkMainAxis) {
4954            overflows.push(overflow[side]);
4955          }
4956          if (checkCrossAxis) {
4957            const sides2 = getAlignmentSides(placement, rects, rtl);
4958            overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
4959          }
4960          overflowsData = [...overflowsData, {
4961            placement,
4962            overflows
4963          }];
4964          if (!overflows.every((side2) => side2 <= 0)) {
4965            var _middlewareData$flip2, _overflowsData$filter;
4966            const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
4967            const nextPlacement = placements2[nextIndex];
4968            if (nextPlacement) {
4969              const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
4970              if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
4971              // overflows the main axis.
4972              overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
4973                return {
4974                  data: {
4975                    index: nextIndex,
4976                    overflows: overflowsData
4977                  },
4978                  reset: {
4979                    placement: nextPlacement
4980                  }
4981                };
4982              }
4983            }
4984            let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
4985            if (!resetPlacement) {
4986              switch (fallbackStrategy) {
4987                case "bestFit": {
4988                  var _overflowsData$filter2;
4989                  const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => {
4990                    if (hasFallbackAxisSideDirection) {
4991                      const currentSideAxis = getSideAxis(d.placement);
4992                      return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
4993                      // reading directions favoring greater width.
4994                      currentSideAxis === "y";
4995                    }
4996                    return true;
4997                  }).map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
4998                  if (placement2) {
4999                    resetPlacement = placement2;
5000                  }
5001                  break;
5002                }
5003                case "initialPlacement":
5004                  resetPlacement = initialPlacement;
5005                  break;
5006              }
5007            }
5008            if (placement !== resetPlacement) {
5009              return {
5010                reset: {
5011                  placement: resetPlacement
5012                }
5013              };
5014            }
5015          }
5016          return {};
5017        }
5018      };
5019    };
5020    var originSides = /* @__PURE__ */ new Set(["left", "top"]);
5021    async function convertValueToCoords(state, options) {
5022      const {
5023        placement,
5024        platform: platform3,
5025        elements
5026      } = state;
5027      const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating));
5028      const side = getSide(placement);
5029      const alignment = getAlignment(placement);
5030      const isVertical = getSideAxis(placement) === "y";
5031      const mainAxisMulti = originSides.has(side) ? -1 : 1;
5032      const crossAxisMulti = rtl && isVertical ? -1 : 1;
5033      const rawValue = evaluate(options, state);
5034      let {
5035        mainAxis,
5036        crossAxis,
5037        alignmentAxis
5038      } = typeof rawValue === "number" ? {
5039        mainAxis: rawValue,
5040        crossAxis: 0,
5041        alignmentAxis: null
5042      } : {
5043        mainAxis: rawValue.mainAxis || 0,
5044        crossAxis: rawValue.crossAxis || 0,
5045        alignmentAxis: rawValue.alignmentAxis
5046      };
5047      if (alignment && typeof alignmentAxis === "number") {
5048        crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
5049      }
5050      return isVertical ? {
5051        x: crossAxis * crossAxisMulti,
5052        y: mainAxis * mainAxisMulti
5053      } : {
5054        x: mainAxis * mainAxisMulti,
5055        y: crossAxis * crossAxisMulti
5056      };
5057    }
5058    var offset = function(options) {
5059      if (options === void 0) {
5060        options = 0;
5061      }
5062      return {
5063        name: "offset",
5064        options,
5065        async fn(state) {
5066          var _middlewareData$offse, _middlewareData$arrow;
5067          const {
5068            x,
5069            y,
5070            placement,
5071            middlewareData
5072          } = state;
5073          const diffCoords = await convertValueToCoords(state, options);
5074          if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
5075            return {};
5076          }
5077          return {
5078            x: x + diffCoords.x,
5079            y: y + diffCoords.y,
5080            data: {
5081              ...diffCoords,
5082              placement
5083            }
5084          };
5085        }
5086      };
5087    };
5088    var shift = function(options) {
5089      if (options === void 0) {
5090        options = {};
5091      }
5092      return {
5093        name: "shift",
5094        options,
5095        async fn(state) {
5096          const {
5097            x,
5098            y,
5099            placement,
5100            platform: platform3
5101          } = state;
5102          const {
5103            mainAxis: checkMainAxis = true,
5104            crossAxis: checkCrossAxis = false,
5105            limiter = {
5106              fn: (_ref) => {
5107                let {
5108                  x: x2,
5109                  y: y2
5110                } = _ref;
5111                return {
5112                  x: x2,
5113                  y: y2
5114                };
5115              }
5116            },
5117            ...detectOverflowOptions
5118          } = evaluate(options, state);
5119          const coords = {
5120            x,
5121            y
5122          };
5123          const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
5124          const crossAxis = getSideAxis(placement);
5125          const mainAxis = getOppositeAxis(crossAxis);
5126          let mainAxisCoord = coords[mainAxis];
5127          let crossAxisCoord = coords[crossAxis];
5128          const clampCoord = (axis, coord) => clamp(coord + overflow[axis === "y" ? "top" : "left"], coord, coord - overflow[axis === "y" ? "bottom" : "right"]);
5129          if (checkMainAxis) {
5130            mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
5131          }
5132          if (checkCrossAxis) {
5133            crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
5134          }
5135          const limitedCoords = limiter.fn({
5136            ...state,
5137            [mainAxis]: mainAxisCoord,
5138            [crossAxis]: crossAxisCoord
5139          });
5140          return {
5141            ...limitedCoords,
5142            data: {
5143              x: limitedCoords.x - x,
5144              y: limitedCoords.y - y,
5145              enabled: {
5146                [mainAxis]: checkMainAxis,
5147                [crossAxis]: checkCrossAxis
5148              }
5149            }
5150          };
5151        }
5152      };
5153    };
5154    var limitShift = function(options) {
5155      if (options === void 0) {
5156        options = {};
5157      }
5158      return {
5159        options,
5160        fn(state) {
5161          var _rawOffset$mainAxis, _rawOffset$crossAxis;
5162          const {
5163            x,
5164            y,
5165            placement,
5166            rects,
5167            middlewareData
5168          } = state;
5169          const {
5170            offset: offset4 = 0,
5171            mainAxis: checkMainAxis = true,
5172            crossAxis: checkCrossAxis = true
5173          } = evaluate(options, state);
5174          const coords = {
5175            x,
5176            y
5177          };
5178          const crossAxis = getSideAxis(placement);
5179          const mainAxis = getOppositeAxis(crossAxis);
5180          let mainAxisCoord = coords[mainAxis];
5181          let crossAxisCoord = coords[crossAxis];
5182          const rawOffset = evaluate(offset4, state);
5183          const computedOffset = typeof rawOffset === "number" ? {
5184            mainAxis: rawOffset,
5185            crossAxis: 0
5186          } : {
5187            mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,
5188            crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0
5189          };
5190          if (checkMainAxis) {
5191            const len = mainAxis === "y" ? "height" : "width";
5192            const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
5193            const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
5194            if (mainAxisCoord < limitMin) {
5195              mainAxisCoord = limitMin;
5196            } else if (mainAxisCoord > limitMax) {
5197              mainAxisCoord = limitMax;
5198            }
5199          }
5200          if (checkCrossAxis) {
5201            var _middlewareData$offse, _middlewareData$offse2;
5202            const len = mainAxis === "y" ? "width" : "height";
5203            const isOriginSide = originSides.has(getSide(placement));
5204            const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
5205            const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
5206            if (crossAxisCoord < limitMin) {
5207              crossAxisCoord = limitMin;
5208            } else if (crossAxisCoord > limitMax) {
5209              crossAxisCoord = limitMax;
5210            }
5211          }
5212          return {
5213            [mainAxis]: mainAxisCoord,
5214            [crossAxis]: crossAxisCoord
5215          };
5216        }
5217      };
5218    };
5219    var size = function(options) {
5220      if (options === void 0) {
5221        options = {};
5222      }
5223      return {
5224        name: "size",
5225        options,
5226        async fn(state) {
5227          const {
5228            placement,
5229            rects,
5230            platform: platform3,
5231            elements
5232          } = state;
5233          const {
5234            apply = () => {
5235            },
5236            ...detectOverflowOptions
5237          } = evaluate(options, state);
5238          const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
5239          const side = getSide(placement);
5240          const alignment = getAlignment(placement);
5241          const isYAxis = getSideAxis(placement) === "y";
5242          const {
5243            width,
5244            height
5245          } = rects.floating;
5246          let heightSide;
5247          let widthSide;
5248          if (side === "top" || side === "bottom") {
5249            heightSide = side;
5250            widthSide = alignment === (await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
5251          } else {
5252            widthSide = side;
5253            heightSide = alignment === "end" ? "top" : "bottom";
5254          }
5255          const maximumClippingHeight = height - overflow.top - overflow.bottom;
5256          const maximumClippingWidth = width - overflow.left - overflow.right;
5257          const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
5258          const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
5259          const shiftData = state.middlewareData.shift;
5260          const noShift = !shiftData;
5261          let availableHeight = overflowAvailableHeight;
5262          let availableWidth = overflowAvailableWidth;
5263          if (shiftData != null && shiftData.enabled.x) {
5264            availableWidth = maximumClippingWidth;
5265          }
5266          if (shiftData != null && shiftData.enabled.y) {
5267            availableHeight = maximumClippingHeight;
5268          }
5269          if (noShift && !alignment) {
5270            if (isYAxis) {
5271              availableWidth = width - 2 * max(overflow.left, overflow.right);
5272            } else {
5273              availableHeight = height - 2 * max(overflow.top, overflow.bottom);
5274            }
5275          }
5276          await apply({
5277            ...state,
5278            availableWidth,
5279            availableHeight
5280          });
5281          const nextDimensions = await platform3.getDimensions(elements.floating);
5282          if (width !== nextDimensions.width || height !== nextDimensions.height) {
5283            return {
5284              reset: {
5285                rects: true
5286              }
5287            };
5288          }
5289          return {};
5290        }
5291      };
5292    };
5293  
5294    // node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
5295    function getCssDimensions(element) {
5296      const css = getComputedStyle2(element);
5297      let width = parseFloat(css.width) || 0;
5298      let height = parseFloat(css.height) || 0;
5299      const hasOffset = isHTMLElement(element);
5300      const offsetWidth = hasOffset ? element.offsetWidth : width;
5301      const offsetHeight = hasOffset ? element.offsetHeight : height;
5302      const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
5303      if (shouldFallback) {
5304        width = offsetWidth;
5305        height = offsetHeight;
5306      }
5307      return {
5308        width,
5309        height,
5310        $: shouldFallback
5311      };
5312    }
5313    function unwrapElement(element) {
5314      return !isElement(element) ? element.contextElement : element;
5315    }
5316    function getScale(element) {
5317      const domElement = unwrapElement(element);
5318      if (!isHTMLElement(domElement)) {
5319        return createCoords(1);
5320      }
5321      const rect = domElement.getBoundingClientRect();
5322      const {
5323        width,
5324        height,
5325        $
5326      } = getCssDimensions(domElement);
5327      let x = ($ ? round(rect.width) : rect.width) / width;
5328      let y = ($ ? round(rect.height) : rect.height) / height;
5329      if (!x || !Number.isFinite(x)) {
5330        x = 1;
5331      }
5332      if (!y || !Number.isFinite(y)) {
5333        y = 1;
5334      }
5335      return {
5336        x,
5337        y
5338      };
5339    }
5340    var noOffsets = /* @__PURE__ */ createCoords(0);
5341    function getVisualOffsets(element) {
5342      const win = getWindow(element);
5343      if (!isWebKit() || !win.visualViewport) {
5344        return noOffsets;
5345      }
5346      return {
5347        x: win.visualViewport.offsetLeft,
5348        y: win.visualViewport.offsetTop
5349      };
5350    }
5351    function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
5352      if (isFixed === void 0) {
5353        isFixed = false;
5354      }
5355      return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
5356    }
5357    function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
5358      if (includeScale === void 0) {
5359        includeScale = false;
5360      }
5361      if (isFixedStrategy === void 0) {
5362        isFixedStrategy = false;
5363      }
5364      const clientRect = element.getBoundingClientRect();
5365      const domElement = unwrapElement(element);
5366      let scale = createCoords(1);
5367      if (includeScale) {
5368        if (offsetParent) {
5369          if (isElement(offsetParent)) {
5370            scale = getScale(offsetParent);
5371          }
5372        } else {
5373          scale = getScale(element);
5374        }
5375      }
5376      const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
5377      let x = (clientRect.left + visualOffsets.x) / scale.x;
5378      let y = (clientRect.top + visualOffsets.y) / scale.y;
5379      let width = clientRect.width / scale.x;
5380      let height = clientRect.height / scale.y;
5381      if (domElement && offsetParent) {
5382        const win = getWindow(domElement);
5383        const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
5384        let currentWin = win;
5385        let currentIFrame = getFrameElement(currentWin);
5386        while (currentIFrame && offsetWin !== currentWin) {
5387          const iframeScale = getScale(currentIFrame);
5388          const iframeRect = currentIFrame.getBoundingClientRect();
5389          const css = getComputedStyle2(currentIFrame);
5390          const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
5391          const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
5392          x *= iframeScale.x;
5393          y *= iframeScale.y;
5394          width *= iframeScale.x;
5395          height *= iframeScale.y;
5396          x += left;
5397          y += top;
5398          currentWin = getWindow(currentIFrame);
5399          currentIFrame = getFrameElement(currentWin);
5400        }
5401      }
5402      return rectToClientRect({
5403        width,
5404        height,
5405        x,
5406        y
5407      });
5408    }
5409    function getWindowScrollBarX(element, rect) {
5410      const leftScroll = getNodeScroll(element).scrollLeft;
5411      if (!rect) {
5412        return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
5413      }
5414      return rect.left + leftScroll;
5415    }
5416    function getHTMLOffset(documentElement, scroll) {
5417      const htmlRect = documentElement.getBoundingClientRect();
5418      const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
5419      const y = htmlRect.top + scroll.scrollTop;
5420      return {
5421        x,
5422        y
5423      };
5424    }
5425    function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
5426      let {
5427        elements,
5428        rect,
5429        offsetParent,
5430        strategy
5431      } = _ref;
5432      const isFixed = strategy === "fixed";
5433      const documentElement = getDocumentElement(offsetParent);
5434      const topLayer = elements ? isTopLayer(elements.floating) : false;
5435      if (offsetParent === documentElement || topLayer && isFixed) {
5436        return rect;
5437      }
5438      let scroll = {
5439        scrollLeft: 0,
5440        scrollTop: 0
5441      };
5442      let scale = createCoords(1);
5443      const offsets = createCoords(0);
5444      const isOffsetParentAnElement = isHTMLElement(offsetParent);
5445      if (isOffsetParentAnElement || !isFixed) {
5446        if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
5447          scroll = getNodeScroll(offsetParent);
5448        }
5449        if (isOffsetParentAnElement) {
5450          const offsetRect = getBoundingClientRect(offsetParent);
5451          scale = getScale(offsetParent);
5452          offsets.x = offsetRect.x + offsetParent.clientLeft;
5453          offsets.y = offsetRect.y + offsetParent.clientTop;
5454        }
5455      }
5456      const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
5457      return {
5458        width: rect.width * scale.x,
5459        height: rect.height * scale.y,
5460        x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
5461        y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
5462      };
5463    }
5464    function getClientRects(element) {
5465      return element.getClientRects ? Array.from(element.getClientRects()) : [];
5466    }
5467    function getDocumentRect(html) {
5468      const scroll = getNodeScroll(html);
5469      const body = html.ownerDocument.body;
5470      const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
5471      const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
5472      let x = -scroll.scrollLeft + getWindowScrollBarX(html);
5473      const y = -scroll.scrollTop;
5474      if (getComputedStyle2(body).direction === "rtl") {
5475        x += max(html.clientWidth, body.clientWidth) - width;
5476      }
5477      return {
5478        width,
5479        height,
5480        x,
5481        y
5482      };
5483    }
5484    var SCROLLBAR_MAX = 25;
5485    function getViewportRect(element, strategy, rootBoundary) {
5486      if (rootBoundary === void 0) {
5487        rootBoundary = "viewport";
5488      }
5489      const isLayoutViewport = rootBoundary === "layoutViewport";
5490      const win = getWindow(element);
5491      const html = getDocumentElement(element);
5492      const visualViewport = win.visualViewport;
5493      let width = html.clientWidth;
5494      let height = html.clientHeight;
5495      let x = 0;
5496      let y = 0;
5497      if (visualViewport) {
5498        const layoutRelativeClientCoords = !isWebKit() || strategy === "fixed";
5499        if (isLayoutViewport) {
5500          if (!layoutRelativeClientCoords) {
5501            x = -visualViewport.offsetLeft;
5502            y = -visualViewport.offsetTop;
5503          }
5504        } else {
5505          width = visualViewport.width;
5506          height = visualViewport.height;
5507          if (layoutRelativeClientCoords) {
5508            x = visualViewport.offsetLeft;
5509            y = visualViewport.offsetTop;
5510          }
5511        }
5512      }
5513      const windowScrollbarX = getWindowScrollBarX(html);
5514      if (windowScrollbarX <= 0) {
5515        const doc = html.ownerDocument;
5516        const body = doc.body;
5517        const bodyStyles = getComputedStyle(body);
5518        const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
5519        const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
5520        const gutter = getComputedStyle(html).scrollbarGutter === "stable both-edges" ? reservedWidth / 2 : reservedWidth;
5521        if (gutter <= SCROLLBAR_MAX) {
5522          width -= gutter;
5523        }
5524      }
5525      return {
5526        width,
5527        height,
5528        x,
5529        y
5530      };
5531    }
5532    function getInnerBoundingClientRect(element, strategy) {
5533      const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
5534      const top = clientRect.top + element.clientTop;
5535      const left = clientRect.left + element.clientLeft;
5536      const scale = getScale(element);
5537      const width = element.clientWidth * scale.x;
5538      const height = element.clientHeight * scale.y;
5539      const x = left * scale.x;
5540      const y = top * scale.y;
5541      return {
5542        width,
5543        height,
5544        x,
5545        y
5546      };
5547    }
5548    function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
5549      let rect;
5550      if (clippingAncestor === "viewport" || clippingAncestor === "layoutViewport") {
5551        rect = getViewportRect(element, strategy, clippingAncestor);
5552      } else if (clippingAncestor === "document") {
5553        rect = getDocumentRect(getDocumentElement(element));
5554      } else if (isElement(clippingAncestor)) {
5555        rect = getInnerBoundingClientRect(clippingAncestor, strategy);
5556      } else {
5557        const visualOffsets = getVisualOffsets(element);
5558        rect = {
5559          x: clippingAncestor.x - visualOffsets.x,
5560          y: clippingAncestor.y - visualOffsets.y,
5561          width: clippingAncestor.width,
5562          height: clippingAncestor.height
5563        };
5564      }
5565      return rectToClientRect(rect);
5566    }
5567    function getClippingElementAncestors(element, cache) {
5568      const cachedResult = cache.get(element);
5569      if (cachedResult) {
5570        return cachedResult;
5571      }
5572      let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
5573      let lastKeptComputedStyle = null;
5574      const elementIsFixed = getComputedStyle2(element).position === "fixed";
5575      let currentNode = elementIsFixed ? getParentNode(element) : element;
5576      while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
5577        const computedStyle = getComputedStyle2(currentNode);
5578        const currentNodeIsContaining = isContainingBlock(currentNode);
5579        const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? "fixed" : "";
5580        const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === "fixed" || lastPosition === "absolute" && computedStyle.position === "static");
5581        if (shouldDropCurrentNode) {
5582          result = result.filter((ancestor) => ancestor !== currentNode);
5583        } else {
5584          lastKeptComputedStyle = computedStyle;
5585        }
5586        currentNode = getParentNode(currentNode);
5587      }
5588      cache.set(element, result);
5589      return result;
5590    }
5591    function getClippingRect(_ref) {
5592      let {
5593        element,
5594        boundary,
5595        rootBoundary,
5596        strategy
5597      } = _ref;
5598      const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
5599      const clippingAncestors = [...elementClippingAncestors, rootBoundary];
5600      const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
5601      let top = firstRect.top;
5602      let right = firstRect.right;
5603      let bottom = firstRect.bottom;
5604      let left = firstRect.left;
5605      for (let i = 1; i < clippingAncestors.length; i++) {
5606        const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
5607        top = max(rect.top, top);
5608        right = min(rect.right, right);
5609        bottom = min(rect.bottom, bottom);
5610        left = max(rect.left, left);
5611      }
5612      return {
5613        width: right - left,
5614        height: bottom - top,
5615        x: left,
5616        y: top
5617      };
5618    }
5619    function getDimensions2(element) {
5620      const {
5621        width,
5622        height
5623      } = getCssDimensions(element);
5624      return {
5625        width,
5626        height
5627      };
5628    }
5629    function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
5630      const isOffsetParentAnElement = isHTMLElement(offsetParent);
5631      const documentElement = getDocumentElement(offsetParent);
5632      const isFixed = strategy === "fixed";
5633      const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
5634      let scroll = {
5635        scrollLeft: 0,
5636        scrollTop: 0
5637      };
5638      const offsets = createCoords(0);
5639      if (isOffsetParentAnElement || !isFixed) {
5640        if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
5641          scroll = getNodeScroll(offsetParent);
5642        }
5643        if (isOffsetParentAnElement) {
5644          const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
5645          offsets.x = offsetRect.x + offsetParent.clientLeft;
5646          offsets.y = offsetRect.y + offsetParent.clientTop;
5647        }
5648      }
5649      if (!isOffsetParentAnElement && documentElement) {
5650        offsets.x = getWindowScrollBarX(documentElement);
5651      }
5652      const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
5653      const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
5654      const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
5655      return {
5656        x,
5657        y,
5658        width: rect.width,
5659        height: rect.height
5660      };
5661    }
5662    function isStaticPositioned(element) {
5663      return getComputedStyle2(element).position === "static";
5664    }
5665    function getTrueOffsetParent(element, polyfill) {
5666      if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") {
5667        return null;
5668      }
5669      if (polyfill) {
5670        return polyfill(element);
5671      }
5672      let rawOffsetParent = element.offsetParent;
5673      if (getDocumentElement(element) === rawOffsetParent) {
5674        rawOffsetParent = rawOffsetParent.ownerDocument.body;
5675      }
5676      return rawOffsetParent;
5677    }
5678    function getOffsetParent(element, polyfill) {
5679      const win = getWindow(element);
5680      if (isTopLayer(element)) {
5681        return win;
5682      }
5683      if (!isHTMLElement(element)) {
5684        let svgOffsetParent = getParentNode(element);
5685        while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
5686          if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
5687            return svgOffsetParent;
5688          }
5689          svgOffsetParent = getParentNode(svgOffsetParent);
5690        }
5691        return win;
5692      }
5693      let offsetParent = getTrueOffsetParent(element, polyfill);
5694      while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
5695        offsetParent = getTrueOffsetParent(offsetParent, polyfill);
5696      }
5697      if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
5698        return win;
5699      }
5700      return offsetParent || getContainingBlock(element) || win;
5701    }
5702    var getElementRects = async function(data) {
5703      const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
5704      const getDimensionsFn = this.getDimensions;
5705      const floatingDimensions = await getDimensionsFn(data.floating);
5706      return {
5707        reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
5708        floating: {
5709          x: 0,
5710          y: 0,
5711          width: floatingDimensions.width,
5712          height: floatingDimensions.height
5713        }
5714      };
5715    };
5716    function isRTL(element) {
5717      return getComputedStyle2(element).direction === "rtl";
5718    }
5719    var platform2 = {
5720      convertOffsetParentRelativeRectToViewportRelativeRect,
5721      getDocumentElement,
5722      getClippingRect,
5723      getOffsetParent,
5724      getElementRects,
5725      getClientRects,
5726      getDimensions: getDimensions2,
5727      getScale,
5728      isElement,
5729      isRTL
5730    };
5731    function rectsAreEqual(a, b) {
5732      return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
5733    }
5734    function observeMove(element, onMove, ancestorResize) {
5735      let io = null;
5736      let timeoutId;
5737      const root = getDocumentElement(element);
5738      function cleanup() {
5739        var _io;
5740        clearTimeout(timeoutId);
5741        (_io = io) == null || _io.disconnect();
5742        io = null;
5743      }
5744      function refresh(skip, threshold) {
5745        if (skip === void 0) {
5746          skip = false;
5747        }
5748        if (threshold === void 0) {
5749          threshold = 1;
5750        }
5751        cleanup();
5752        const elementRectForRootMargin = element.getBoundingClientRect();
5753        const {
5754          left,
5755          top,
5756          width,
5757          height
5758        } = elementRectForRootMargin;
5759        if (!skip) {
5760          onMove();
5761        }
5762        if (!width || !height) {
5763          return;
5764        }
5765        const insetTop = floor(top);
5766        const insetRight = floor(root.clientWidth - (left + width));
5767        const insetBottom = floor(root.clientHeight - (top + height));
5768        const insetLeft = floor(left);
5769        const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
5770        const options = {
5771          rootMargin,
5772          threshold: max(0, min(1, threshold)) || 1
5773        };
5774        let isFirstUpdate = true;
5775        function handleObserve(entries) {
5776          const ratio = entries[0].intersectionRatio;
5777          if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
5778            return refresh();
5779          }
5780          if (ratio !== threshold) {
5781            if (!isFirstUpdate) {
5782              return refresh();
5783            }
5784            if (!ratio) {
5785              timeoutId = setTimeout(() => {
5786                refresh(false, 1e-7);
5787              }, 1e3);
5788            } else {
5789              refresh(false, ratio);
5790            }
5791          }
5792          isFirstUpdate = false;
5793        }
5794        try {
5795          io = new IntersectionObserver(handleObserve, {
5796            ...options,
5797            // Handle <iframe>s
5798            root: root.ownerDocument
5799          });
5800        } catch (_e) {
5801          io = new IntersectionObserver(handleObserve, options);
5802        }
5803        io.observe(element);
5804      }
5805      const win = getWindow(element);
5806      const handleResize = () => refresh(ancestorResize);
5807      win.addEventListener("resize", handleResize);
5808      refresh(true);
5809      return () => {
5810        win.removeEventListener("resize", handleResize);
5811        cleanup();
5812      };
5813    }
5814    function autoUpdate(reference, floating, update2, options) {
5815      if (options === void 0) {
5816        options = {};
5817      }
5818      const {
5819        ancestorScroll = true,
5820        ancestorResize = true,
5821        elementResize = typeof ResizeObserver === "function",
5822        layoutShift = typeof IntersectionObserver === "function",
5823        animationFrame = false
5824      } = options;
5825      const referenceEl = unwrapElement(reference);
5826      const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
5827      ancestors.forEach((ancestor) => {
5828        ancestorScroll && ancestor.addEventListener("scroll", update2);
5829        ancestorResize && ancestor.addEventListener("resize", update2);
5830      });
5831      const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update2, ancestorResize) : null;
5832      let reobserveFrame = -1;
5833      let resizeObserver = null;
5834      if (elementResize) {
5835        resizeObserver = new ResizeObserver((_ref) => {
5836          let [firstEntry] = _ref;
5837          if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
5838            resizeObserver.unobserve(floating);
5839            cancelAnimationFrame(reobserveFrame);
5840            reobserveFrame = requestAnimationFrame(() => {
5841              var _resizeObserver;
5842              (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
5843            });
5844          }
5845          update2();
5846        });
5847        if (referenceEl && !animationFrame) {
5848          resizeObserver.observe(referenceEl);
5849        }
5850        if (floating) {
5851          resizeObserver.observe(floating);
5852        }
5853      }
5854      let frameId;
5855      let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
5856      if (animationFrame) {
5857        frameLoop();
5858      }
5859      function frameLoop() {
5860        const nextRefRect = getBoundingClientRect(reference);
5861        if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
5862          update2();
5863        }
5864        prevRefRect = nextRefRect;
5865        frameId = requestAnimationFrame(frameLoop);
5866      }
5867      update2();
5868      return () => {
5869        var _resizeObserver2;
5870        ancestors.forEach((ancestor) => {
5871          ancestorScroll && ancestor.removeEventListener("scroll", update2);
5872          ancestorResize && ancestor.removeEventListener("resize", update2);
5873        });
5874        cleanupIo == null || cleanupIo();
5875        (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
5876        resizeObserver = null;
5877        if (animationFrame) {
5878          cancelAnimationFrame(frameId);
5879        }
5880      };
5881    }
5882    var offset2 = offset;
5883    var shift2 = shift;
5884    var flip2 = flip;
5885    var size2 = size;
5886    var limitShift2 = limitShift;
5887    var computePosition2 = (reference, floating, options) => {
5888      const cache = /* @__PURE__ */ new Map();
5889      const mergedOptions = options != null ? options : {};
5890      const platformWithCache = {
5891        ...platform2,
5892        ...mergedOptions.platform,
5893        _c: cache
5894      };
5895      return computePosition(reference, floating, {
5896        ...mergedOptions,
5897        platform: platformWithCache
5898      });
5899    };
5900  
5901    // node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
5902    var React24 = __toESM(require_react(), 1);
5903    var import_react2 = __toESM(require_react(), 1);
5904    var ReactDOM3 = __toESM(require_react_dom(), 1);
5905    var isClient = typeof document !== "undefined";
5906    var noop2 = function noop3() {
5907    };
5908    var index = isClient ? import_react2.useLayoutEffect : noop2;
5909    function deepEqual(a, b) {
5910      if (a === b) {
5911        return true;
5912      }
5913      if (typeof a !== typeof b) {
5914        return false;
5915      }
5916      if (typeof a === "function" && a.toString() === b.toString()) {
5917        return true;
5918      }
5919      let length;
5920      let i;
5921      let keys;
5922      if (a && b && typeof a === "object") {
5923        if (Array.isArray(a)) {
5924          length = a.length;
5925          if (length !== b.length) return false;
5926          for (i = length; i-- !== 0; ) {
5927            if (!deepEqual(a[i], b[i])) {
5928              return false;
5929            }
5930          }
5931          return true;
5932        }
5933        keys = Object.keys(a);
5934        length = keys.length;
5935        if (length !== Object.keys(b).length) {
5936          return false;
5937        }
5938        for (i = length; i-- !== 0; ) {
5939          if (!{}.hasOwnProperty.call(b, keys[i])) {
5940            return false;
5941          }
5942        }
5943        for (i = length; i-- !== 0; ) {
5944          const key = keys[i];
5945          if (key === "_owner" && a.$$typeof) {
5946            continue;
5947          }
5948          if (!deepEqual(a[key], b[key])) {
5949            return false;
5950          }
5951        }
5952        return true;
5953      }
5954      return a !== a && b !== b;
5955    }
5956    function getDPR(element) {
5957      if (typeof window === "undefined") {
5958        return 1;
5959      }
5960      const win = element.ownerDocument.defaultView || window;
5961      return win.devicePixelRatio || 1;
5962    }
5963    function roundByDPR(element, value) {
5964      const dpr = getDPR(element);
5965      return Math.round(value * dpr) / dpr;
5966    }
5967    function useLatestRef(value) {
5968      const ref = React24.useRef(value);
5969      index(() => {
5970        ref.current = value;
5971      });
5972      return ref;
5973    }
5974    function useFloating(options) {
5975      if (options === void 0) {
5976        options = {};
5977      }
5978      const {
5979        placement = "bottom",
5980        strategy = "absolute",
5981        middleware = [],
5982        platform: platform3,
5983        elements: {
5984          reference: externalReference,
5985          floating: externalFloating
5986        } = {},
5987        transform = true,
5988        whileElementsMounted,
5989        open
5990      } = options;
5991      const [data, setData] = React24.useState({
5992        x: 0,
5993        y: 0,
5994        strategy,
5995        placement,
5996        middlewareData: {},
5997        isPositioned: false
5998      });
5999      const [latestMiddleware, setLatestMiddleware] = React24.useState(middleware);
6000      if (!deepEqual(latestMiddleware, middleware)) {
6001        setLatestMiddleware(middleware);
6002      }
6003      const [_reference, _setReference] = React24.useState(null);
6004      const [_floating, _setFloating] = React24.useState(null);
6005      const setReference = React24.useCallback((node) => {
6006        if (node !== referenceRef.current) {
6007          referenceRef.current = node;
6008          _setReference(node);
6009        }
6010      }, []);
6011      const setFloating = React24.useCallback((node) => {
6012        if (node !== floatingRef.current) {
6013          floatingRef.current = node;
6014          _setFloating(node);
6015        }
6016      }, []);
6017      const referenceEl = externalReference || _reference;
6018      const floatingEl = externalFloating || _floating;
6019      const referenceRef = React24.useRef(null);
6020      const floatingRef = React24.useRef(null);
6021      const dataRef = React24.useRef(data);
6022      const hasWhileElementsMounted = whileElementsMounted != null;
6023      const whileElementsMountedRef = useLatestRef(whileElementsMounted);
6024      const platformRef = useLatestRef(platform3);
6025      const openRef = useLatestRef(open);
6026      const update2 = React24.useCallback(() => {
6027        if (!referenceRef.current || !floatingRef.current) {
6028          return;
6029        }
6030        const config = {
6031          placement,
6032          strategy,
6033          middleware: latestMiddleware
6034        };
6035        if (platformRef.current) {
6036          config.platform = platformRef.current;
6037        }
6038        computePosition2(referenceRef.current, floatingRef.current, config).then((data2) => {
6039          const fullData = {
6040            ...data2,
6041            // The floating element's position may be recomputed while it's closed
6042            // but still mounted (such as when transitioning out). To ensure
6043            // `isPositioned` will be `false` initially on the next open, avoid
6044            // setting it to `true` when `open === false` (must be specified).
6045            isPositioned: openRef.current !== false
6046          };
6047          if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
6048            dataRef.current = fullData;
6049            ReactDOM3.flushSync(() => {
6050              setData(fullData);
6051            });
6052          }
6053        });
6054      }, [latestMiddleware, placement, strategy, platformRef, openRef]);
6055      index(() => {
6056        if (open === false && dataRef.current.isPositioned) {
6057          dataRef.current.isPositioned = false;
6058          setData((data2) => ({
6059            ...data2,
6060            isPositioned: false
6061          }));
6062        }
6063      }, [open]);
6064      const isMountedRef = React24.useRef(false);
6065      index(() => {
6066        isMountedRef.current = true;
6067        return () => {
6068          isMountedRef.current = false;
6069        };
6070      }, []);
6071      index(() => {
6072        if (referenceEl) referenceRef.current = referenceEl;
6073        if (floatingEl) floatingRef.current = floatingEl;
6074        if (referenceEl && floatingEl) {
6075          if (whileElementsMountedRef.current) {
6076            return whileElementsMountedRef.current(referenceEl, floatingEl, update2);
6077          }
6078          update2();
6079        }
6080      }, [referenceEl, floatingEl, update2, whileElementsMountedRef, hasWhileElementsMounted]);
6081      const refs = React24.useMemo(() => ({
6082        reference: referenceRef,
6083        floating: floatingRef,
6084        setReference,
6085        setFloating
6086      }), [setReference, setFloating]);
6087      const elements = React24.useMemo(() => ({
6088        reference: referenceEl,
6089        floating: floatingEl
6090      }), [referenceEl, floatingEl]);
6091      const floatingStyles = React24.useMemo(() => {
6092        const initialStyles = {
6093          position: strategy,
6094          left: 0,
6095          top: 0
6096        };
6097        if (!elements.floating) {
6098          return initialStyles;
6099        }
6100        const x = roundByDPR(elements.floating, data.x);
6101        const y = roundByDPR(elements.floating, data.y);
6102        if (transform) {
6103          return {
6104            ...initialStyles,
6105            transform: "translate(" + x + "px, " + y + "px)",
6106            ...getDPR(elements.floating) >= 1.5 && {
6107              willChange: "transform"
6108            }
6109          };
6110        }
6111        return {
6112          position: strategy,
6113          left: x,
6114          top: y
6115        };
6116      }, [strategy, transform, elements.floating, data.x, data.y]);
6117      return React24.useMemo(() => ({
6118        ...data,
6119        update: update2,
6120        refs,
6121        elements,
6122        floatingStyles
6123      }), [data, update2, refs, elements, floatingStyles]);
6124    }
6125    var offset3 = (options, deps) => {
6126      const result = offset2(options);
6127      return {
6128        name: result.name,
6129        fn: result.fn,
6130        options: [options, deps]
6131      };
6132    };
6133    var shift3 = (options, deps) => {
6134      const result = shift2(options);
6135      return {
6136        name: result.name,
6137        fn: result.fn,
6138        options: [options, deps]
6139      };
6140    };
6141    var limitShift3 = (options, deps) => {
6142      const result = limitShift2(options);
6143      return {
6144        fn: result.fn,
6145        options: [options, deps]
6146      };
6147    };
6148    var flip3 = (options, deps) => {
6149      const result = flip2(options);
6150      return {
6151        name: result.name,
6152        fn: result.fn,
6153        options: [options, deps]
6154      };
6155    };
6156    var size3 = (options, deps) => {
6157      const result = size2(options);
6158      return {
6159        name: result.name,
6160        fn: result.fn,
6161        options: [options, deps]
6162      };
6163    };
6164  
6165    // node_modules/@base-ui/react/utils/popups/popupHandle.mjs
6166    var BasePopupHandle = class {
6167      /**
6168       * Stores of every root currently using this handle, in attach order. A handle is meant to be used
6169       * by a single mounted root, but roots can transiently overlap (e.g. during an animated route
6170       * transition), so this stack lets `attachStore`'s cleanup restore the previous root instead of
6171       * leaving a still-mounted root uncontrollable when a newer overlapping root detaches first.
6172       */
6173      attachedStores = [];
6174      /**
6175       * Store of the root that currently controls the handle: the most recently attached one still
6176       * mounted, or `null` when no root is attached. Imperative methods are no-ops while this is `null`.
6177       */
6178      attachedStoreValue = null;
6179      /**
6180       * Listeners notified when `attachedStore` changes, so detached triggers can follow the store pointer.
6181       */
6182      storeListeners = /* @__PURE__ */ new Set();
6183      /**
6184       * Creates a handle backed by the store used while no root is attached.
6185       *
6186       * @param fallbackStore Inert, closed store handed to detached triggers while no root is attached,
6187       * so they can render and register without a mounted root. Triggers register into whichever store
6188       * `store` currently resolves to, so while detached they live in this store's trigger map and
6189       * migrate themselves to the root's store (and back) as it attaches/detaches.
6190       * @param componentName Component name used to prefix dev warnings, e.g. `'Menu'` produces
6191       * `MenuHandle.open()` in warning text.
6192       * @param throwOnMissingTrigger Whether `open(triggerId)` throws when no trigger with that id is
6193       * registered. Anchored popups (Menu, Popover, Tooltip, PreviewCard) need a trigger to anchor to,
6194       * so they throw; Dialog is not anchored and instead opens unassociated with a dev warning.
6195       */
6196      constructor(fallbackStore, componentName, throwOnMissingTrigger = true) {
6197        this.fallbackStore = fallbackStore;
6198        this.componentName = componentName;
6199        this.throwOnMissingTrigger = throwOnMissingTrigger;
6200      }
6201      get attachedStore() {
6202        return this.attachedStoreValue;
6203      }
6204      /**
6205       * Store that detached triggers read from: the attached root's store, or an inert fallback store
6206       * used while no root is attached.
6207       * @internal
6208       */
6209      get store() {
6210        return this.attachedStoreValue ?? this.fallbackStore;
6211      }
6212      /**
6213       * Stable fallback store used for server rendering and hydration. Root stores cannot be recorded on
6214       * the handle during render because a handle can be shared by concurrent server-rendered requests.
6215       * @internal
6216       */
6217      get serverStore() {
6218        return this.fallbackStore;
6219      }
6220      /**
6221       * Subscribes to changes of the attached store pointer so detached triggers re-render and re-bind
6222       * when a root attaches or detaches. Returns a function that removes the listener.
6223       * @internal
6224       */
6225      subscribeStore(listener) {
6226        this.storeListeners.add(listener);
6227        return () => {
6228          this.storeListeners.delete(listener);
6229        };
6230      }
6231      /**
6232       * Points the handle at a root's store and notifies subscribers so detached triggers re-render and
6233       * re-register into it (their registration ref re-fires on the store-pointer change). Returns a
6234       * cleanup function that detaches the store again.
6235       * @internal
6236       */
6237      attachStore(newStore) {
6238        this.attachedStores.push(newStore);
6239        this.setActiveStore(newStore);
6240        if (true) {
6241          if (this.attachedStores.length > 1) {
6242            const dev = this;
6243            (dev.overlapWarningFrame ??= AnimationFrame.create()).request(() => {
6244              if (this.attachedStores.length > 1) {
6245                console.warn("Base UI: A handle is attached to more than one mounted root at the same time. The most recently mounted root takes over and the previous one stops being controlled by the handle. A handle should be used by a single root that stays mounted for the lifetime of the handle.");
6246              }
6247            });
6248          }
6249        }
6250        return () => {
6251          const index2 = this.attachedStores.lastIndexOf(newStore);
6252          if (index2 !== -1) {
6253            this.attachedStores.splice(index2, 1);
6254          }
6255          this.setActiveStore(this.attachedStores[this.attachedStores.length - 1] ?? null);
6256        };
6257      }
6258      /**
6259       * Sets the store that currently controls the handle and notifies subscribers when it changes, so
6260       * detached triggers re-render and migrate their registration to the new store.
6261       */
6262      setActiveStore(store3) {
6263        if (this.attachedStoreValue !== store3) {
6264          this.attachedStoreValue = store3;
6265          this.storeListeners.forEach((listener) => {
6266            listener();
6267          });
6268        }
6269      }
6270      /**
6271       * Opens the attached root's store and associates it with the trigger with the given id, or a
6272       * no-op (with a dev warning) while no root is attached. Shared by every concrete handle's public
6273       * `open()` method, which only narrows the parameter type.
6274       *
6275       * When a trigger id is given but no matching trigger is registered, anchored popups throw (see
6276       * `throwOnMissingTrigger`); Dialog opens unassociated with a dev warning instead.
6277       *
6278       * This method should only be called in an event handler or an effect (not during rendering).
6279       *
6280       * @param triggerId ID of the trigger to associate with the popup, or `null`/`undefined` to open
6281       * without associating any trigger.
6282       */
6283      openByTrigger(triggerId) {
6284        const attachedStore = this.attachedStore;
6285        if (attachedStore === null) {
6286          if (true) {
6287            console.warn(`Base UI: $this.componentName}Handle.open() was called while no root using this handle is mounted. The call was ignored; mount a root with this handle before opening it imperatively.`);
6288          }
6289          return;
6290        }
6291        let triggerElement;
6292        if (triggerId) {
6293          for (let i = this.attachedStores.length - 1; i >= 0 && !triggerElement; i -= 1) {
6294            triggerElement = this.attachedStores[i].context.triggerElements.getById(triggerId);
6295          }
6296          triggerElement ??= this.fallbackStore.context.triggerElements.getById(triggerId);
6297        }
6298        if (triggerId && !triggerElement) {
6299          if (this.throwOnMissingTrigger) {
6300            throw new Error(true ? `Base UI: $this.componentName}Handle.open() was called with the trigger id "$triggerId}", but no matching trigger is registered with this handle. An anchored popup cannot open without a trigger to anchor to. Pass the id of a mounted $this.componentName}.Trigger that has this handle set on its "handle" prop.` : formatErrorMessage_default(99, this.componentName, triggerId, this.componentName));
6301          }
6302          if (true) {
6303            console.warn(`Base UI: $this.componentName}Handle.open: No trigger found with id "$triggerId}". The popup will open, but the trigger will not be associated with it.`);
6304          }
6305        }
6306        attachedStore.setOpen(true, createChangeEventDetails(reason_parts_exports.imperativeAction, void 0, triggerElement));
6307      }
6308      /**
6309       * Closes the popup by setting the attached root's store to closed, or a no-op (with a dev warning)
6310       * while no root is attached. Shared by every concrete handle's public `close()` method.
6311       *
6312       * This method should only be called in an event handler or an effect (not during rendering).
6313       */
6314      closePopup() {
6315        const attachedStore = this.attachedStore;
6316        if (attachedStore === null) {
6317          if (true) {
6318            console.warn(`Base UI: $this.componentName}Handle.close() was called while no root using this handle is mounted. The call was ignored.`);
6319          }
6320          return;
6321        }
6322        attachedStore.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction));
6323      }
6324    };
6325  
6326    // node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
6327    var React29 = __toESM(require_react(), 1);
6328    var ReactDOM4 = __toESM(require_react_dom(), 1);
6329  
6330    // node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
6331    var React28 = __toESM(require_react(), 1);
6332  
6333    // node_modules/@base-ui/utils/store/useStore.mjs
6334    var React26 = __toESM(require_react(), 1);
6335    var import_shim = __toESM(require_shim(), 1);
6336    var import_with_selector = __toESM(require_with_selector(), 1);
6337  
6338    // node_modules/@base-ui/utils/fastHooks.mjs
6339    var React25 = __toESM(require_react(), 1);
6340    var hooks = [];
6341    var currentInstance = void 0;
6342    function getInstance() {
6343      return currentInstance;
6344    }
6345    function register2(hook) {
6346      hooks.push(hook);
6347    }
6348    function fastComponent(fn) {
6349      const FastComponent = (props, forwardedRef) => {
6350        const instance = useRefWithInit(createInstance).current;
6351        let result;
6352        try {
6353          currentInstance = instance;
6354          for (const hook of hooks) {
6355            hook.before(instance);
6356          }
6357          result = fn(props, forwardedRef);
6358          for (const hook of hooks) {
6359            hook.after(instance);
6360          }
6361          instance.didInitialize = true;
6362        } finally {
6363          currentInstance = void 0;
6364        }
6365        return result;
6366      };
6367      FastComponent.displayName = fn.displayName || fn.name;
6368      return FastComponent;
6369    }
6370    function fastComponentRef(fn) {
6371      return /* @__PURE__ */ React25.forwardRef(fastComponent(fn));
6372    }
6373    function createInstance() {
6374      return {
6375        didInitialize: false
6376      };
6377    }
6378  
6379    // node_modules/@base-ui/utils/store/useStore.mjs
6380    var canUseRawUseSyncExternalStore = isReactVersionAtLeast(19);
6381    var useStoreImplementation = canUseRawUseSyncExternalStore ? useStoreFast : useStoreLegacy;
6382    function useStore(store3, selector, a1, a2, a3) {
6383      return useStoreImplementation(store3, selector, a1, a2, a3);
6384    }
6385    function useStoreR19(store3, selector, a1, a2, a3) {
6386      const getSelection = React26.useCallback(() => selector(store3.getSnapshot(), a1, a2, a3), [store3, selector, a1, a2, a3]);
6387      return (0, import_shim.useSyncExternalStore)(store3.subscribe, getSelection, getSelection);
6388    }
6389    register2({
6390      before(instance) {
6391        instance.syncIndex = 0;
6392        if (!instance.didInitialize) {
6393          instance.syncTick = 1;
6394          instance.syncHooks = [];
6395          instance.didChangeStore = true;
6396          instance.getSnapshot = () => {
6397            let didChange2 = false;
6398            for (let i = 0; i < instance.syncHooks.length; i += 1) {
6399              const hook = instance.syncHooks[i];
6400              const value = hook.selector(hook.store.state, hook.a1, hook.a2, hook.a3);
6401              if (!Object.is(hook.value, value)) {
6402                didChange2 = true;
6403                hook.value = value;
6404              }
6405            }
6406            if (didChange2) {
6407              instance.syncTick += 1;
6408            }
6409            return instance.syncTick;
6410          };
6411        }
6412      },
6413      after(instance) {
6414        if (instance.syncHooks.length > 0) {
6415          if (instance.didChangeStore) {
6416            instance.didChangeStore = false;
6417            instance.subscribe = (onStoreChange) => {
6418              const stores = /* @__PURE__ */ new Set();
6419              for (const hook of instance.syncHooks) {
6420                stores.add(hook.store);
6421              }
6422              const unsubscribes = [];
6423              for (const store3 of stores) {
6424                unsubscribes.push(store3.subscribe(onStoreChange));
6425              }
6426              return () => {
6427                for (const unsubscribe of unsubscribes) {
6428                  unsubscribe();
6429                }
6430              };
6431            };
6432          }
6433          (0, import_shim.useSyncExternalStore)(instance.subscribe, instance.getSnapshot, instance.getSnapshot);
6434        }
6435      }
6436    });
6437    function useStoreFast(store3, selector, a1, a2, a3) {
6438      const instance = getInstance();
6439      if (!instance) {
6440        return useStoreR19(store3, selector, a1, a2, a3);
6441      }
6442      const index2 = instance.syncIndex;
6443      instance.syncIndex += 1;
6444      let hook;
6445      if (!instance.didInitialize) {
6446        hook = {
6447          store: store3,
6448          selector,
6449          a1,
6450          a2,
6451          a3,
6452          value: selector(store3.getSnapshot(), a1, a2, a3)
6453        };
6454        instance.syncHooks.push(hook);
6455      } else {
6456        hook = instance.syncHooks[index2];
6457        if (hook.store !== store3 || hook.selector !== selector || !Object.is(hook.a1, a1) || !Object.is(hook.a2, a2) || !Object.is(hook.a3, a3)) {
6458          if (hook.store !== store3) {
6459            instance.didChangeStore = true;
6460          }
6461          hook.store = store3;
6462          hook.selector = selector;
6463          hook.a1 = a1;
6464          hook.a2 = a2;
6465          hook.a3 = a3;
6466          hook.value = selector(store3.getSnapshot(), a1, a2, a3);
6467        }
6468      }
6469      return hook.value;
6470    }
6471    function useStoreLegacy(store3, selector, a1, a2, a3) {
6472      return (0, import_with_selector.useSyncExternalStoreWithSelector)(store3.subscribe, store3.getSnapshot, store3.getSnapshot, (state) => selector(state, a1, a2, a3));
6473    }
6474  
6475    // node_modules/@base-ui/utils/store/Store.mjs
6476    var Store = class {
6477      /**
6478       * The current state of the store.
6479       * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.
6480       * To subscribe to state changes, use the {@link useState} method. The value returned by {@link useState} is updated after the component renders (similarly to React's useState).
6481       * The values can be used directly (to avoid subscribing to the store) in effects or event handlers.
6482       *
6483       * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.
6484       */
6485      // Internal state to handle recursive `setState()` calls
6486      constructor(state) {
6487        this.state = state;
6488        this.listeners = /* @__PURE__ */ new Set();
6489        this.updateTick = 0;
6490      }
6491      /**
6492       * Registers a listener that will be called whenever the store's state changes.
6493       *
6494       * @param fn The listener function to be called on state changes.
6495       * @returns A function to unsubscribe the listener.
6496       */
6497      subscribe = (fn) => {
6498        this.listeners.add(fn);
6499        return () => {
6500          this.listeners.delete(fn);
6501        };
6502      };
6503      /**
6504       * Returns the current state of the store.
6505       */
6506      getSnapshot = () => {
6507        return this.state;
6508      };
6509      /**
6510       * Updates the entire store's state and notifies all registered listeners.
6511       *
6512       * @param newState The new state to set for the store.
6513       */
6514      setState(newState) {
6515        if (this.state === newState) {
6516          return;
6517        }
6518        this.state = newState;
6519        this.updateTick += 1;
6520        const currentTick = this.updateTick;
6521        for (const listener of this.listeners) {
6522          if (currentTick !== this.updateTick) {
6523            return;
6524          }
6525          listener(newState);
6526        }
6527      }
6528      /**
6529       * Merges the provided changes into the current state and notifies listeners if there are changes.
6530       *
6531       * @param changes An object containing the changes to apply to the current state.
6532       */
6533      update(changes) {
6534        for (const key in changes) {
6535          if (!Object.is(this.state[key], changes[key])) {
6536            this.setState({
6537              ...this.state,
6538              ...changes
6539            });
6540            return;
6541          }
6542        }
6543      }
6544      /**
6545       * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.
6546       *
6547       * @param key The key in the store's state to update.
6548       * @param value The new value to set for the specified key.
6549       */
6550      set(key, value) {
6551        if (!Object.is(this.state[key], value)) {
6552          this.setState({
6553            ...this.state,
6554            [key]: value
6555          });
6556        }
6557      }
6558      /**
6559       * Gives the state a new reference and updates all registered listeners.
6560       */
6561      notifyAll() {
6562        const newState = {
6563          ...this.state
6564        };
6565        this.setState(newState);
6566      }
6567      use(selector, a1, a2, a3) {
6568        return useStore(this, selector, a1, a2, a3);
6569      }
6570    };
6571  
6572    // node_modules/@base-ui/utils/store/ReactStore.mjs
6573    var React27 = __toESM(require_react(), 1);
6574    var ReactStore = class extends Store {
6575      /**
6576       * Creates a new ReactStore instance.
6577       *
6578       * @param state Initial state of the store.
6579       * @param context Non-reactive context values.
6580       * @param selectors Optional selectors for use with `useState`.
6581       */
6582      constructor(state, context = {}, selectors3) {
6583        super(state);
6584        this.context = context;
6585        this.selectors = selectors3;
6586      }
6587      /**
6588       * Non-reactive values such as refs, callbacks, etc.
6589       */
6590      /**
6591       * Synchronizes a single external value into the store.
6592       *
6593       * Note that the while the value in `state` is updated immediately, the value returned
6594       * by `useState` is updated before the next render (similarly to React's `useState`).
6595       */
6596      useSyncedValue(key, value) {
6597        React27.useDebugValue(key);
6598        const store3 = this;
6599        useIsoLayoutEffect(() => {
6600          if (store3.state[key] !== value) {
6601            store3.set(key, value);
6602          }
6603        }, [store3, key, value]);
6604      }
6605      /**
6606       * Synchronizes a single external value into the store and
6607       * cleans it up (sets to `undefined`) on unmount.
6608       *
6609       * Note that the while the value in `state` is updated immediately, the value returned
6610       * by `useState` is updated before the next render (similarly to React's `useState`).
6611       */
6612      useSyncedValueWithCleanup(key, value) {
6613        const store3 = this;
6614        useIsoLayoutEffect(() => {
6615          if (store3.state[key] !== value) {
6616            store3.set(key, value);
6617          }
6618          return () => {
6619            store3.set(key, void 0);
6620          };
6621        }, [store3, key, value]);
6622      }
6623      /**
6624       * Synchronizes multiple external values into the store.
6625       *
6626       * Note that the while the values in `state` are updated immediately, the values returned
6627       * by `useState` are updated before the next render (similarly to React's `useState`).
6628       */
6629      useSyncedValues(statePart) {
6630        const store3 = this;
6631        if (true) {
6632          React27.useDebugValue(statePart, (p) => Object.keys(p));
6633          const keys = React27.useRef(Object.keys(statePart)).current;
6634          const nextKeys = Object.keys(statePart);
6635          if (keys.length !== nextKeys.length || keys.some((key, index2) => key !== nextKeys[index2])) {
6636            console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
6637          }
6638        }
6639        const dependencies = Object.values(statePart);
6640        useIsoLayoutEffect(() => {
6641          store3.update(statePart);
6642        }, [store3, ...dependencies]);
6643      }
6644      /**
6645       * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`
6646       * is non-undefined, the store's state at `key` is updated to match `controlled`.
6647       */
6648      useControlledProp(key, controlled) {
6649        React27.useDebugValue(key);
6650        const store3 = this;
6651        const isControlled = controlled !== void 0;
6652        useIsoLayoutEffect(() => {
6653          if (isControlled && !Object.is(store3.state[key], controlled)) {
6654            store3.setState({
6655              ...store3.state,
6656              [key]: controlled
6657            });
6658          }
6659        }, [store3, key, controlled, isControlled]);
6660        if (true) {
6661          const cache = this.controlledValues ??= /* @__PURE__ */ new Map();
6662          if (!cache.has(key)) {
6663            cache.set(key, isControlled);
6664          }
6665          const previouslyControlled = cache.get(key);
6666          if (previouslyControlled !== void 0 && previouslyControlled !== isControlled) {
6667            console.error(`A component is changing the $isControlled ? "" : "un"}controlled state of $key.toString()} to be $isControlled ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);
6668          }
6669        }
6670      }
6671      /** Gets the current value from the store using a selector with the provided key.
6672       *
6673       * @param key Key of the selector to use.
6674       */
6675      select(key, a1, a2, a3) {
6676        const selector = this.selectors[key];
6677        return selector(this.state, a1, a2, a3);
6678      }
6679      /**
6680       * Returns a value from the store's state using a selector function.
6681       * Used to subscribe to specific parts of the state.
6682       * This methods causes a rerender whenever the selected state changes.
6683       *
6684       * @param key Key of the selector to use.
6685       */
6686      useState(key, a1, a2, a3) {
6687        React27.useDebugValue(key);
6688        return useStore(this, this.selectors[key], a1, a2, a3);
6689      }
6690      /**
6691       * Wraps a function with `useStableCallback` to ensure it has a stable reference
6692       * and assigns it to the context.
6693       *
6694       * @param key Key of the event callback. Must be a function in the context.
6695       * @param fn Function to assign.
6696       */
6697      useContextCallback(key, fn) {
6698        React27.useDebugValue(key);
6699        const stableFunction = useStableCallback(fn ?? NOOP);
6700        this.context[key] = stableFunction;
6701      }
6702      /**
6703       * Returns a stable setter function for a specific key in the store's state.
6704       * It's commonly used to pass as a ref callback to React elements.
6705       *
6706       * @param key Key of the state to set.
6707       */
6708      useStateSetter(key) {
6709        const ref = React27.useRef(void 0);
6710        if (ref.current === void 0) {
6711          ref.current = (value) => {
6712            this.set(key, value);
6713          };
6714        }
6715        return ref.current;
6716      }
6717      /**
6718       * Observes changes derived from the store's selectors and calls the listener when the selected value changes.
6719       *
6720       * @param key Key of the selector to observe.
6721       * @param listener Listener function called when the selector result changes.
6722       */
6723      observe(selector, listener) {
6724        let selectFn;
6725        if (typeof selector === "function") {
6726          selectFn = selector;
6727        } else {
6728          selectFn = this.selectors[selector];
6729        }
6730        let prevValue = selectFn(this.state);
6731        listener(prevValue, prevValue, this);
6732        return this.subscribe((nextState) => {
6733          const nextValue = selectFn(nextState);
6734          if (!Object.is(prevValue, nextValue)) {
6735            const oldValue = prevValue;
6736            prevValue = nextValue;
6737            listener(nextValue, oldValue, this);
6738          }
6739        });
6740      }
6741    };
6742  
6743    // node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs
6744    var selectors = {
6745      open: (state) => state.open,
6746      transitionStatus: (state) => state.transitionStatus,
6747      domReferenceElement: (state) => state.domReferenceElement,
6748      referenceElement: (state) => state.positionReference ?? state.referenceElement,
6749      floatingElement: (state) => state.floatingElement,
6750      floatingId: (state) => state.floatingId
6751    };
6752    var FloatingRootStore = class extends ReactStore {
6753      constructor(options) {
6754        const {
6755          syncOnly,
6756          nested,
6757          onOpenChange,
6758          triggerElements,
6759          ...initialState
6760        } = options;
6761        super({
6762          ...initialState,
6763          positionReference: initialState.referenceElement,
6764          domReferenceElement: initialState.referenceElement
6765        }, {
6766          onOpenChange,
6767          dataRef: {
6768            current: {}
6769          },
6770          events: createEventEmitter(),
6771          nested,
6772          triggerElements
6773        }, selectors);
6774        this.syncOnly = syncOnly;
6775      }
6776      /**
6777       * Syncs the event used by hover logic to distinguish hover-open from click-like interaction.
6778       */
6779      syncOpenEvent = (newOpen, event) => {
6780        if (!newOpen || !this.state.open || // Prevent a pending hover-open from overwriting a click-open event, while allowing
6781        // click events to upgrade a hover-open.
6782        event != null && isClickLikeEvent(event)) {
6783          this.context.dataRef.current.openEvent = newOpen ? event : void 0;
6784        }
6785      };
6786      /**
6787       * Runs the root-owned side effects for an open state change.
6788       */
6789      dispatchOpenChange = (newOpen, eventDetails) => {
6790        this.syncOpenEvent(newOpen, eventDetails.event);
6791        const details = {
6792          open: newOpen,
6793          reason: eventDetails.reason,
6794          nativeEvent: eventDetails.event,
6795          nested: this.context.nested,
6796          triggerElement: eventDetails.trigger
6797        };
6798        this.context.events.emit("openchange", details);
6799      };
6800      /**
6801       * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.
6802       *
6803       * @param newOpen The new open state.
6804       * @param eventDetails Details about the event that triggered the open state change.
6805       */
6806      setOpen = (newOpen, eventDetails) => {
6807        if (this.syncOnly) {
6808          this.context.onOpenChange?.(newOpen, eventDetails);
6809          return;
6810        }
6811        this.dispatchOpenChange(newOpen, eventDetails);
6812        this.context.onOpenChange?.(newOpen, eventDetails);
6813      };
6814    };
6815  
6816    // node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
6817    function useSyncedFloatingRootContext(options) {
6818      const {
6819        popupStore,
6820        treatPopupAsFloatingElement = false,
6821        floatingRootContext: floatingRootContextProp,
6822        floatingId,
6823        nested,
6824        onOpenChange
6825      } = options;
6826      const open = popupStore.useState("open");
6827      const referenceElement = popupStore.useState("activeTriggerElement");
6828      const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? "popupElement" : "positionerElement");
6829      const triggerElements = popupStore.context.triggerElements;
6830      const handleOpenChange = onOpenChange;
6831      const internalStoreRef = React28.useRef(null);
6832      if (floatingRootContextProp === void 0 && internalStoreRef.current === null) {
6833        internalStoreRef.current = new FloatingRootStore({
6834          open,
6835          transitionStatus: void 0,
6836          referenceElement,
6837          floatingElement,
6838          triggerElements,
6839          onOpenChange: handleOpenChange,
6840          floatingId,
6841          syncOnly: true,
6842          nested
6843        });
6844      }
6845      const store3 = floatingRootContextProp ?? internalStoreRef.current;
6846      popupStore.useSyncedValue("floatingId", floatingId);
6847      useIsoLayoutEffect(() => {
6848        const valuesToSync = {
6849          open,
6850          floatingId,
6851          referenceElement,
6852          floatingElement
6853        };
6854        if (isElement(referenceElement)) {
6855          valuesToSync.domReferenceElement = referenceElement;
6856        }
6857        if (store3.state.positionReference === store3.state.referenceElement) {
6858          valuesToSync.positionReference = referenceElement;
6859        }
6860        store3.update(valuesToSync);
6861      }, [open, floatingId, referenceElement, floatingElement, store3]);
6862      store3.context.onOpenChange = handleOpenChange;
6863      store3.context.nested = nested;
6864      return store3;
6865    }
6866  
6867    // node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
6868    var FOCUSABLE_POPUP_PROPS = {
6869      tabIndex: -1,
6870      [FOCUSABLE_ATTRIBUTE]: ""
6871    };
6872    function usePopupRootStore(createStore, treatPopupAsFloatingElement = false) {
6873      const floatingId = useId();
6874      const nested = useFloatingParentNodeId() != null;
6875      const store3 = useRefWithInit(() => createStore(floatingId, nested)).current;
6876      useSyncedFloatingRootContext({
6877        popupStore: store3,
6878        treatPopupAsFloatingElement,
6879        floatingRootContext: store3.state.floatingRootContext,
6880        floatingId,
6881        nested,
6882        onOpenChange: store3.setOpen
6883      });
6884      return store3;
6885    }
6886    function PopupHandleAttachment({
6887      handle,
6888      store: store3
6889    }) {
6890      useIsoLayoutEffect(() => {
6891        return handle.attachStore(store3);
6892      }, [handle, store3]);
6893      return null;
6894    }
6895    function useTriggerRegistration(id, store3) {
6896      const registeredElementIdRef = React29.useRef(null);
6897      const registeredElementRef = React29.useRef(null);
6898      return React29.useCallback((element) => {
6899        if (id === void 0) {
6900          return;
6901        }
6902        let shouldSyncTriggerCount = false;
6903        if (registeredElementIdRef.current !== null) {
6904          const registeredId = registeredElementIdRef.current;
6905          const registeredElement = registeredElementRef.current;
6906          const currentElement = store3.context.triggerElements.getById(registeredId);
6907          if (registeredElement && currentElement === registeredElement) {
6908            store3.context.triggerElements.delete(registeredId);
6909            shouldSyncTriggerCount = true;
6910          }
6911          registeredElementIdRef.current = null;
6912          registeredElementRef.current = null;
6913        }
6914        if (element !== null) {
6915          registeredElementIdRef.current = id;
6916          registeredElementRef.current = element;
6917          store3.context.triggerElements.add(id, element);
6918          shouldSyncTriggerCount = true;
6919        }
6920        if (shouldSyncTriggerCount) {
6921          const triggerCount = store3.context.triggerElements.size;
6922          if (store3.select("open") && store3.state.triggerCount !== triggerCount) {
6923            store3.set("triggerCount", triggerCount);
6924          }
6925        }
6926      }, [store3, id]);
6927    }
6928    function setPopupOpenState(state, open, trigger, preventUnmountOnClose = false) {
6929      if (open) {
6930        state.preventUnmountingOnClose = false;
6931      } else if (preventUnmountOnClose) {
6932        state.preventUnmountingOnClose = true;
6933      }
6934      const triggerId = trigger?.id ?? null;
6935      if (triggerId || open) {
6936        state.activeTriggerId = triggerId;
6937        state.activeTriggerElement = trigger ?? null;
6938      }
6939    }
6940    function attachPreventUnmountOnClose(eventDetails) {
6941      let preventUnmountOnClose = false;
6942      eventDetails.preventUnmountOnClose = () => {
6943        preventUnmountOnClose = true;
6944      };
6945      return () => preventUnmountOnClose;
6946    }
6947    function applyPopupOpenChange(store3, nextOpen, eventDetails, options = {}) {
6948      const reason = eventDetails.reason;
6949      const isHover = reason === reason_parts_exports.triggerHover;
6950      const isFocusOpen = nextOpen && reason === reason_parts_exports.triggerFocus;
6951      const isDismissClose = !nextOpen && (reason === reason_parts_exports.triggerPress || reason === reason_parts_exports.escapeKey);
6952      const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);
6953      store3.context.onOpenChange?.(nextOpen, eventDetails);
6954      if (eventDetails.isCanceled) {
6955        return;
6956      }
6957      options.onBeforeDispatch?.();
6958      store3.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);
6959      const changeState = () => {
6960        const updatedState = {
6961          ...options.extraState,
6962          open: nextOpen
6963        };
6964        if (isFocusOpen) {
6965          updatedState.instantType = "focus";
6966        } else if (isDismissClose) {
6967          updatedState.instantType = "dismiss";
6968        } else if (isHover) {
6969          updatedState.instantType = void 0;
6970        }
6971        setPopupOpenState(updatedState, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());
6972        store3.update(updatedState);
6973      };
6974      if (isHover) {
6975        ReactDOM4.flushSync(changeState);
6976      } else {
6977        changeState();
6978      }
6979    }
6980    function useTriggerDataForwarding(triggerId, triggerElementRef, store3, stateUpdates) {
6981      const isMountedByThisTrigger = store3.useState("isMountedByTrigger", triggerId);
6982      const baseRegisterTrigger = useTriggerRegistration(triggerId, store3);
6983      const applyTriggerData = useStableCallback((element) => {
6984        const open = store3.select("open");
6985        const activeTriggerId = store3.select("activeTriggerId");
6986        if (activeTriggerId === triggerId) {
6987          store3.update({
6988            activeTriggerElement: element,
6989            ...open ? stateUpdates : null
6990          });
6991          return;
6992        }
6993        if (activeTriggerId == null && open) {
6994          store3.update({
6995            activeTriggerId: triggerId,
6996            activeTriggerElement: element,
6997            ...stateUpdates
6998          });
6999        }
7000      });
7001      const registerTrigger = React29.useCallback((element) => {
7002        baseRegisterTrigger(element);
7003        if (element) {
7004          applyTriggerData(element);
7005        }
7006      }, [baseRegisterTrigger, applyTriggerData]);
7007      useIsoLayoutEffect(() => {
7008        if (isMountedByThisTrigger) {
7009          store3.update({
7010            activeTriggerElement: triggerElementRef.current,
7011            ...stateUpdates
7012          });
7013        }
7014      }, [isMountedByThisTrigger, store3, triggerElementRef, ...Object.values(stateUpdates)]);
7015      return {
7016        registerTrigger,
7017        isMountedByThisTrigger
7018      };
7019    }
7020    function useImplicitActiveTrigger(store3, options = {}) {
7021      const {
7022        closeOnActiveTriggerUnmount = false
7023      } = options;
7024      const resolvedActiveTriggerIdRef = React29.useRef(null);
7025      const open = store3.useState("open");
7026      const reactiveTriggerCount = store3.useState("triggerCount");
7027      const activeTriggerId = store3.useState("activeTriggerId");
7028      const reactiveActiveTriggerElement = store3.useState("activeTriggerElement");
7029      useIsoLayoutEffect(() => {
7030        if (!open) {
7031          resolvedActiveTriggerIdRef.current = null;
7032          if (store3.state.triggerCount !== 0) {
7033            store3.set("triggerCount", 0);
7034          }
7035          return;
7036        }
7037        const triggerCount = store3.context.triggerElements.size;
7038        const stateUpdates = {};
7039        if (store3.state.triggerCount !== triggerCount) {
7040          stateUpdates.triggerCount = triggerCount;
7041        }
7042        const currentActiveTriggerId = store3.select("activeTriggerId");
7043        let lostActiveTriggerId = null;
7044        if (currentActiveTriggerId) {
7045          const activeTriggerElement = store3.context.triggerElements.getById(currentActiveTriggerId);
7046          if (!activeTriggerElement) {
7047            for (const [triggerId, triggerElement] of store3.context.triggerElements.entries()) {
7048              if (triggerElement === store3.state.activeTriggerElement) {
7049                stateUpdates.activeTriggerId = triggerId;
7050                stateUpdates.activeTriggerElement = triggerElement;
7051                resolvedActiveTriggerIdRef.current = triggerId;
7052                break;
7053              }
7054            }
7055            if (stateUpdates.activeTriggerId === void 0) {
7056              if (resolvedActiveTriggerIdRef.current === currentActiveTriggerId) {
7057                lostActiveTriggerId = currentActiveTriggerId;
7058              } else {
7059                resolvedActiveTriggerIdRef.current = null;
7060              }
7061            }
7062          } else {
7063            resolvedActiveTriggerIdRef.current = currentActiveTriggerId;
7064            if (activeTriggerElement !== store3.state.activeTriggerElement) {
7065              stateUpdates.activeTriggerElement = activeTriggerElement;
7066            }
7067          }
7068        } else {
7069          resolvedActiveTriggerIdRef.current = null;
7070        }
7071        if (!lostActiveTriggerId && !currentActiveTriggerId && triggerCount === 1) {
7072          const iteratorResult = store3.context.triggerElements.entries().next();
7073          if (!iteratorResult.done) {
7074            const [implicitTriggerId, implicitTriggerElement] = iteratorResult.value;
7075            stateUpdates.activeTriggerId = implicitTriggerId;
7076            stateUpdates.activeTriggerElement = implicitTriggerElement;
7077            resolvedActiveTriggerIdRef.current = implicitTriggerId;
7078          }
7079        }
7080        if (stateUpdates.triggerCount !== void 0 || stateUpdates.activeTriggerId !== void 0 || stateUpdates.activeTriggerElement !== void 0) {
7081          store3.update(stateUpdates);
7082        }
7083        if (lostActiveTriggerId) {
7084          if (closeOnActiveTriggerUnmount) {
7085            queueMicrotask(() => {
7086              if (store3.select("open") && store3.select("activeTriggerId") === lostActiveTriggerId && !store3.context.triggerElements.getById(lostActiveTriggerId)) {
7087                const eventDetails = createChangeEventDetails(reason_parts_exports.none);
7088                store3.setOpen(false, eventDetails);
7089                if (!eventDetails.isCanceled) {
7090                  store3.update({
7091                    activeTriggerId: null,
7092                    activeTriggerElement: null
7093                  });
7094                }
7095              }
7096            });
7097          }
7098        }
7099      }, [open, store3, reactiveTriggerCount, activeTriggerId, reactiveActiveTriggerElement, closeOnActiveTriggerUnmount]);
7100    }
7101    function useOpenStateTransitions(open, store3, onUnmount) {
7102      const {
7103        mounted,
7104        setMounted,
7105        transitionStatus
7106      } = useTransitionStatus(open);
7107      const preventUnmountingOnClose = store3.useState("preventUnmountingOnClose");
7108      const syncedPreventUnmountingOnClose = open ? false : preventUnmountingOnClose;
7109      store3.useSyncedValues({
7110        mounted,
7111        transitionStatus,
7112        preventUnmountingOnClose: syncedPreventUnmountingOnClose
7113      });
7114      const forceUnmount = useStableCallback(() => {
7115        setMounted(false);
7116        store3.update({
7117          activeTriggerId: null,
7118          activeTriggerElement: null,
7119          mounted: false,
7120          preventUnmountingOnClose: false
7121        });
7122        onUnmount?.();
7123        store3.context.onOpenChangeComplete?.(false);
7124      });
7125      useOpenChangeComplete({
7126        enabled: mounted && !open && !syncedPreventUnmountingOnClose,
7127        open,
7128        ref: store3.context.popupRef,
7129        onComplete() {
7130          if (!open) {
7131            forceUnmount();
7132          }
7133        }
7134      });
7135      return {
7136        forceUnmount,
7137        transitionStatus
7138      };
7139    }
7140    function usePopupInteractionProps(store3, statePart) {
7141      store3.useSyncedValues(statePart);
7142      useIsoLayoutEffect(() => () => {
7143        store3.update({
7144          activeTriggerProps: EMPTY_OBJECT,
7145          inactiveTriggerProps: EMPTY_OBJECT,
7146          popupProps: EMPTY_OBJECT
7147        });
7148      }, [store3]);
7149    }
7150  
7151    // node_modules/@base-ui/react/utils/popups/popupTriggerMap.mjs
7152    var devElementIdsByMap;
7153    function getDevElementIds(map) {
7154      devElementIdsByMap ??= /* @__PURE__ */ new WeakMap();
7155      let elementIds = devElementIdsByMap.get(map);
7156      if (!elementIds) {
7157        elementIds = /* @__PURE__ */ new WeakMap();
7158        devElementIdsByMap.set(map, elementIds);
7159      }
7160      return elementIds;
7161    }
7162    var PopupTriggerMap = class {
7163      constructor() {
7164        this.idMap = /* @__PURE__ */ new Map();
7165      }
7166      /**
7167       * Adds a trigger element with the given ID.
7168       *
7169       * Note: The provided element is assumed to not be registered under multiple IDs.
7170       */
7171      add(id, element) {
7172        if (true) {
7173          const elementIds = getDevElementIds(this);
7174          const existingId = elementIds.get(element);
7175          if (existingId !== void 0 && existingId !== id) {
7176            throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");
7177          }
7178          const previousElement = this.idMap.get(id);
7179          if (previousElement !== void 0 && previousElement !== element) {
7180            elementIds.delete(previousElement);
7181          }
7182          elementIds.set(element, id);
7183        }
7184        this.idMap.set(id, element);
7185      }
7186      /**
7187       * Removes the trigger element with the given ID.
7188       */
7189      delete(id) {
7190        if (true) {
7191          const element = this.idMap.get(id);
7192          if (element !== void 0) {
7193            devElementIdsByMap?.get(this)?.delete(element);
7194          }
7195        }
7196        this.idMap.delete(id);
7197      }
7198      /**
7199       * Whether the given element is registered as a trigger.
7200       */
7201      hasElement(element) {
7202        for (const registered of this.idMap.values()) {
7203          if (registered === element) {
7204            return true;
7205          }
7206        }
7207        return false;
7208      }
7209      /**
7210       * Whether there is a registered trigger element matching the given predicate.
7211       */
7212      hasMatchingElement(predicate) {
7213        for (const element of this.idMap.values()) {
7214          if (predicate(element)) {
7215            return true;
7216          }
7217        }
7218        return false;
7219      }
7220      /**
7221       * Returns the trigger element associated with the given ID, or undefined if no such element exists.
7222       */
7223      getById(id) {
7224        return this.idMap.get(id);
7225      }
7226      /**
7227       * Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element].
7228       */
7229      entries() {
7230        return this.idMap.entries();
7231      }
7232      /**
7233       * Returns an iterable of all registered trigger elements.
7234       */
7235      elements() {
7236        return this.idMap.values();
7237      }
7238      /**
7239       * Returns the number of registered trigger elements.
7240       */
7241      get size() {
7242        return this.idMap.size;
7243      }
7244    };
7245  
7246    // node_modules/@base-ui/react/floating-ui-react/utils/getEmptyRootContext.mjs
7247    function getEmptyRootContext() {
7248      return new FloatingRootStore({
7249        open: false,
7250        transitionStatus: void 0,
7251        floatingElement: null,
7252        referenceElement: null,
7253        triggerElements: new PopupTriggerMap(),
7254        floatingId: void 0,
7255        syncOnly: false,
7256        nested: false,
7257        onOpenChange: void 0
7258      });
7259    }
7260  
7261    // node_modules/@base-ui/react/utils/popups/store.mjs
7262    function createInitialPopupStoreState() {
7263      return {
7264        open: false,
7265        openProp: void 0,
7266        mounted: false,
7267        transitionStatus: void 0,
7268        floatingRootContext: getEmptyRootContext(),
7269        floatingId: void 0,
7270        triggerCount: 0,
7271        preventUnmountingOnClose: false,
7272        payload: void 0,
7273        activeTriggerId: null,
7274        activeTriggerElement: null,
7275        triggerIdProp: void 0,
7276        popupElement: null,
7277        positionerElement: null,
7278        activeTriggerProps: EMPTY_OBJECT,
7279        inactiveTriggerProps: EMPTY_OBJECT,
7280        popupProps: EMPTY_OBJECT
7281      };
7282    }
7283    function createPopupFloatingRootContext(triggerElements, floatingId, nested = false) {
7284      return new FloatingRootStore({
7285        open: false,
7286        transitionStatus: void 0,
7287        floatingElement: null,
7288        referenceElement: null,
7289        triggerElements,
7290        floatingId,
7291        syncOnly: true,
7292        nested,
7293        onOpenChange: void 0
7294      });
7295    }
7296    var activeTriggerIdSelector = (state) => state.triggerIdProp ?? state.activeTriggerId;
7297    var openSelector = (state) => state.openProp ?? state.open;
7298    var popupIdSelector = (state) => {
7299      const popupId = state.popupElement?.id ?? state.floatingId;
7300      return popupId || void 0;
7301    };
7302    function triggerOwnsOpenPopup(state, triggerId) {
7303      return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) === triggerId;
7304    }
7305    function triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) {
7306      if (triggerOwnsOpenPopup(state, triggerId)) {
7307        return true;
7308      }
7309      return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) == null && state.triggerCount === 1;
7310    }
7311    var popupStoreSelectors = {
7312      open: openSelector,
7313      mounted: (state) => state.mounted,
7314      transitionStatus: (state) => state.transitionStatus,
7315      floatingRootContext: (state) => state.floatingRootContext,
7316      triggerCount: (state) => state.triggerCount,
7317      preventUnmountingOnClose: (state) => state.preventUnmountingOnClose,
7318      payload: (state) => state.payload,
7319      activeTriggerId: activeTriggerIdSelector,
7320      activeTriggerElement: (state) => state.mounted ? state.activeTriggerElement : null,
7321      popupId: popupIdSelector,
7322      /**
7323       * Whether the trigger with the given ID was used to open the popup.
7324       */
7325      isTriggerActive: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId,
7326      /**
7327       * Whether the popup is open and was activated by a trigger with the given ID.
7328       */
7329      isOpenedByTrigger: (state, triggerId) => triggerOwnsOpenPopup(state, triggerId),
7330      /**
7331       * Whether the popup is mounted and was activated by a trigger with the given ID.
7332       */
7333      isMountedByTrigger: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId && state.mounted,
7334      triggerProps: (state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps,
7335      /**
7336       * Popup id for the trigger that currently owns the open popup.
7337       */
7338      triggerPopupId: (state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : void 0,
7339      popupProps: (state) => state.popupProps,
7340      popupElement: (state) => state.popupElement,
7341      positionerElement: (state) => state.positionerElement
7342    };
7343  
7344    // node_modules/@base-ui/react/utils/popups/usePopupHandleStore.mjs
7345    var React30 = __toESM(require_react(), 1);
7346    var import_shim2 = __toESM(require_shim(), 1);
7347    function usePopupHandleStore(handle) {
7348      const subscribe = React30.useCallback((listener) => {
7349        if (handle === void 0) {
7350          return NOOP;
7351        }
7352        return handle.subscribeStore(listener);
7353      }, [handle]);
7354      const getSnapshot = React30.useCallback(() => {
7355        return handle === void 0 ? void 0 : handle.store;
7356      }, [handle]);
7357      return (0, import_shim2.useSyncExternalStore)(subscribe, getSnapshot, () => handle?.serverStore);
7358    }
7359  
7360    // node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
7361    function useBaseUIFloating(options) {
7362      return useFloatingWithStore(options, options.rootContext);
7363    }
7364    function useFloatingWithStore(options, store3) {
7365      const {
7366        nodeId,
7367        externalTree
7368      } = options;
7369      const referenceElement = store3.useState("referenceElement");
7370      const floatingElement = store3.useState("floatingElement");
7371      const domReferenceElement = store3.useState("domReferenceElement");
7372      const open = store3.useState("open");
7373      const floatingId = store3.useState("floatingId");
7374      const [positionReference, setPositionReferenceRaw] = React31.useState(null);
7375      const [localDomReference, setLocalDomReference] = React31.useState(void 0);
7376      const [localFloatingElement, setLocalFloatingElement] = React31.useState(void 0);
7377      const domReferenceRef = React31.useRef(null);
7378      const tree = useFloatingTree(externalTree);
7379      const storeElements = React31.useMemo(() => ({
7380        reference: referenceElement,
7381        floating: floatingElement,
7382        domReference: domReferenceElement
7383      }), [referenceElement, floatingElement, domReferenceElement]);
7384      const position = useFloating({
7385        ...options,
7386        elements: {
7387          ...storeElements,
7388          ...positionReference && {
7389            reference: positionReference
7390          }
7391        }
7392      });
7393      const localDomReferenceElement = isElement(localDomReference) ? localDomReference : null;
7394      const syncedFloatingElement = localFloatingElement === void 0 ? store3.state.floatingElement : localFloatingElement;
7395      store3.useSyncedValue("referenceElement", localDomReference ?? null);
7396      store3.useSyncedValue("domReferenceElement", localDomReference === void 0 ? domReferenceElement : localDomReferenceElement);
7397      store3.useSyncedValue("floatingElement", syncedFloatingElement);
7398      const setPositionReference = React31.useCallback((node) => {
7399        const computedPositionReference = isElement(node) ? {
7400          getBoundingClientRect: () => node.getBoundingClientRect(),
7401          getClientRects: () => node.getClientRects(),
7402          contextElement: node
7403        } : node;
7404        setPositionReferenceRaw(computedPositionReference);
7405        position.refs.setReference(computedPositionReference);
7406      }, [position.refs]);
7407      const setReference = React31.useCallback((node) => {
7408        if (isElement(node) || node === null) {
7409          domReferenceRef.current = node;
7410          setLocalDomReference(node);
7411        }
7412        if (isElement(position.refs.reference.current) || position.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
7413        // `null` to support `positionReference` + an unstable `reference`
7414        // callback ref.
7415        node !== null && !isElement(node)) {
7416          position.refs.setReference(node);
7417        }
7418      }, [position.refs, setLocalDomReference]);
7419      const setFloating = React31.useCallback((node) => {
7420        setLocalFloatingElement(node);
7421        position.refs.setFloating(node);
7422      }, [position.refs]);
7423      const refs = React31.useMemo(() => ({
7424        ...position.refs,
7425        setReference,
7426        setFloating,
7427        setPositionReference,
7428        domReference: domReferenceRef
7429      }), [position.refs, setReference, setFloating, setPositionReference]);
7430      const elements = React31.useMemo(() => ({
7431        ...position.elements,
7432        domReference: domReferenceElement
7433      }), [position.elements, domReferenceElement]);
7434      const context = React31.useMemo(() => ({
7435        ...position,
7436        dataRef: store3.context.dataRef,
7437        open,
7438        onOpenChange: store3.setOpen,
7439        events: store3.context.events,
7440        floatingId,
7441        refs,
7442        elements,
7443        nodeId,
7444        rootStore: store3
7445      }), [position, refs, elements, nodeId, store3, open, floatingId]);
7446      useIsoLayoutEffect(() => {
7447        if (domReferenceElement) {
7448          domReferenceRef.current = domReferenceElement;
7449        }
7450      }, [domReferenceElement]);
7451      useIsoLayoutEffect(() => {
7452        store3.context.dataRef.current.floatingContext = context;
7453        const node = tree?.nodesRef.current.find((n) => n.id === nodeId);
7454        if (node) {
7455          node.context = context;
7456        }
7457      });
7458      return React31.useMemo(() => ({
7459        ...position,
7460        context,
7461        refs,
7462        elements,
7463        rootStore: store3
7464      }), [position, refs, elements, context, store3]);
7465    }
7466  
7467    // node_modules/@base-ui/react/floating-ui-react/hooks/useFocus.mjs
7468    var React32 = __toESM(require_react(), 1);
7469    var isMacSafari = parts_exports.os.mac && parts_exports.engine.webkit;
7470    function useFocus(context, props = {}) {
7471      const {
7472        enabled = true,
7473        delay
7474      } = props;
7475      const store3 = "rootStore" in context ? context.rootStore : context;
7476      const {
7477        events,
7478        dataRef
7479      } = store3.context;
7480      const blockFocusRef = React32.useRef(false);
7481      const blockedReferenceRef = React32.useRef(null);
7482      const keyboardModalityRef = React32.useRef(true);
7483      const timeout = useTimeout();
7484      React32.useEffect(() => {
7485        const domReference = store3.select("domReferenceElement");
7486        if (!enabled) {
7487          return void 0;
7488        }
7489        const win = getWindow(domReference);
7490        function onBlur() {
7491          const currentDomReference = store3.select("domReferenceElement");
7492          if (!store3.select("open") && isHTMLElement(currentDomReference) && currentDomReference === activeElement(ownerDocument(currentDomReference))) {
7493            blockFocusRef.current = true;
7494          }
7495        }
7496        function onKeyDown() {
7497          keyboardModalityRef.current = true;
7498        }
7499        function onPointerDown() {
7500          keyboardModalityRef.current = false;
7501        }
7502        return mergeCleanups(addEventListener(win, "blur", onBlur), isMacSafari && addEventListener(win, "keydown", onKeyDown, true), isMacSafari && addEventListener(win, "pointerdown", onPointerDown, true));
7503      }, [store3, enabled]);
7504      React32.useEffect(() => {
7505        if (!enabled) {
7506          return void 0;
7507        }
7508        function onOpenChangeLocal(details) {
7509          if (details.reason === reason_parts_exports.triggerPress || details.reason === reason_parts_exports.escapeKey) {
7510            const referenceElement = store3.select("domReferenceElement");
7511            if (isElement(referenceElement)) {
7512              blockedReferenceRef.current = referenceElement;
7513              blockFocusRef.current = true;
7514            }
7515          }
7516        }
7517        events.on("openchange", onOpenChangeLocal);
7518        return () => {
7519          events.off("openchange", onOpenChangeLocal);
7520        };
7521      }, [events, enabled, store3]);
7522      const reference = React32.useMemo(() => {
7523        function resetBlockedFocus() {
7524          blockFocusRef.current = false;
7525          blockedReferenceRef.current = null;
7526        }
7527        return {
7528          onMouseLeave() {
7529            resetBlockedFocus();
7530          },
7531          onFocus(event) {
7532            const focusTarget = event.currentTarget;
7533            if (blockFocusRef.current) {
7534              if (blockedReferenceRef.current === focusTarget) {
7535                return;
7536              }
7537              resetBlockedFocus();
7538            }
7539            const target = getTarget(event.nativeEvent);
7540            if (isElement(target)) {
7541              if (isMacSafari && !event.relatedTarget) {
7542                if (!keyboardModalityRef.current && !isTypeableElement(target)) {
7543                  return;
7544                }
7545              } else if (!matchesFocusVisible(target)) {
7546                return;
7547              }
7548            }
7549            const movedFromOtherEnabledTrigger = isTargetInsideEnabledTrigger(event.relatedTarget, store3.context.triggerElements);
7550            const {
7551              nativeEvent,
7552              currentTarget
7553            } = event;
7554            const delayValue = typeof delay === "function" ? delay() : delay;
7555            if (store3.select("open") && movedFromOtherEnabledTrigger || delayValue === 0 || delayValue === void 0) {
7556              store3.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
7557              return;
7558            }
7559            timeout.start(delayValue, () => {
7560              if (blockFocusRef.current) {
7561                return;
7562              }
7563              store3.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
7564            });
7565          },
7566          onBlur(event) {
7567            resetBlockedFocus();
7568            const relatedTarget = event.relatedTarget;
7569            const nativeEvent = event.nativeEvent;
7570            const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute("focus-guard")) && relatedTarget.getAttribute("data-type") === "outside";
7571            timeout.start(0, () => {
7572              const domReference = store3.select("domReferenceElement");
7573              const activeEl = activeElement(ownerDocument(domReference));
7574              if (!relatedTarget && activeEl === domReference) {
7575                return;
7576              }
7577              if (contains(dataRef.current.floatingContext?.refs.floating.current, activeEl) || contains(domReference, activeEl) || movedToFocusGuard) {
7578                return;
7579              }
7580              const nextFocusedElement = relatedTarget ?? activeEl;
7581              if (isTargetInsideEnabledTrigger(nextFocusedElement, store3.context.triggerElements)) {
7582                return;
7583              }
7584              store3.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent));
7585            });
7586          }
7587        };
7588      }, [dataRef, delay, store3, timeout]);
7589      return React32.useMemo(() => enabled ? {
7590        reference,
7591        trigger: reference
7592      } : {}, [enabled, reference]);
7593    }
7594  
7595    // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
7596    var React33 = __toESM(require_react(), 1);
7597  
7598    // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverInteractionSharedState.mjs
7599    var HoverInteraction = class _HoverInteraction {
7600      constructor() {
7601        this.pointerType = void 0;
7602        this.interactedInside = false;
7603        this.handler = void 0;
7604        this.blockMouseMove = true;
7605        this.performedPointerEventsMutation = false;
7606        this.pointerEventsScopeElement = null;
7607        this.pointerEventsReferenceElement = null;
7608        this.pointerEventsFloatingElement = null;
7609        this.restTimeoutPending = false;
7610        this.openChangeTimeout = new Timeout();
7611        this.restTimeout = new Timeout();
7612        this.handleCloseOptions = void 0;
7613      }
7614      static create() {
7615        return new _HoverInteraction();
7616      }
7617      dispose = () => {
7618        this.openChangeTimeout.clear();
7619        this.restTimeout.clear();
7620      };
7621      disposeEffect = () => {
7622        return this.dispose;
7623      };
7624    };
7625    var pointerEventsMutationOwnerByScopeElement = /* @__PURE__ */ new WeakMap();
7626    function clearSafePolygonPointerEventsMutation(instance) {
7627      if (!instance.performedPointerEventsMutation) {
7628        return;
7629      }
7630      const scopeElement = instance.pointerEventsScopeElement;
7631      if (scopeElement && pointerEventsMutationOwnerByScopeElement.get(scopeElement) === instance) {
7632        instance.pointerEventsScopeElement?.style.removeProperty("pointer-events");
7633        instance.pointerEventsReferenceElement?.style.removeProperty("pointer-events");
7634        instance.pointerEventsFloatingElement?.style.removeProperty("pointer-events");
7635        pointerEventsMutationOwnerByScopeElement.delete(scopeElement);
7636      }
7637      instance.performedPointerEventsMutation = false;
7638      instance.pointerEventsScopeElement = null;
7639      instance.pointerEventsReferenceElement = null;
7640      instance.pointerEventsFloatingElement = null;
7641    }
7642    function applySafePolygonPointerEventsMutation(instance, options) {
7643      const {
7644        scopeElement,
7645        referenceElement,
7646        floatingElement
7647      } = options;
7648      const existingOwner = pointerEventsMutationOwnerByScopeElement.get(scopeElement);
7649      if (existingOwner && existingOwner !== instance) {
7650        clearSafePolygonPointerEventsMutation(existingOwner);
7651      }
7652      clearSafePolygonPointerEventsMutation(instance);
7653      instance.performedPointerEventsMutation = true;
7654      instance.pointerEventsScopeElement = scopeElement;
7655      instance.pointerEventsReferenceElement = referenceElement;
7656      instance.pointerEventsFloatingElement = floatingElement;
7657      pointerEventsMutationOwnerByScopeElement.set(scopeElement, instance);
7658      scopeElement.style.pointerEvents = "none";
7659      referenceElement.style.pointerEvents = "auto";
7660      floatingElement.style.pointerEvents = "auto";
7661    }
7662    function useHoverInteractionSharedState(store3) {
7663      const data = store3.context.dataRef.current;
7664      const instance = useRefWithInit(() => data.hoverInteractionState ?? HoverInteraction.create()).current;
7665      if (!data.hoverInteractionState) {
7666        data.hoverInteractionState = instance;
7667      }
7668      useOnMount(data.hoverInteractionState.disposeEffect);
7669      return data.hoverInteractionState;
7670    }
7671  
7672    // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
7673    function useHoverFloatingInteraction(context, parameters = {}) {
7674      const {
7675        enabled = true,
7676        closeDelay: closeDelayProp = 0,
7677        nodeId: nodeIdProp
7678      } = parameters;
7679      const store3 = "rootStore" in context ? context.rootStore : context;
7680      const open = store3.useState("open");
7681      const floatingElement = store3.useState("floatingElement");
7682      const domReferenceElement = store3.useState("domReferenceElement");
7683      const {
7684        dataRef
7685      } = store3.context;
7686      const tree = useFloatingTree();
7687      const parentId = useFloatingParentNodeId();
7688      const instance = useHoverInteractionSharedState(store3);
7689      const childClosedTimeout = useTimeout();
7690      const isClickLikeOpenEvent2 = useStableCallback(() => {
7691        return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
7692      });
7693      const isHoverOpen = useStableCallback(() => {
7694        return isHoverOpenEvent(dataRef.current.openEvent?.type);
7695      });
7696      const clearPointerEvents = useStableCallback(() => {
7697        clearSafePolygonPointerEventsMutation(instance);
7698      });
7699      useIsoLayoutEffect(() => {
7700        if (!open) {
7701          instance.pointerType = void 0;
7702          instance.restTimeoutPending = false;
7703          instance.interactedInside = false;
7704          clearPointerEvents();
7705        }
7706      }, [open, instance, clearPointerEvents]);
7707      React33.useEffect(() => {
7708        return clearPointerEvents;
7709      }, [clearPointerEvents]);
7710      useIsoLayoutEffect(() => {
7711        if (!enabled) {
7712          return void 0;
7713        }
7714        if (open && instance.handleCloseOptions?.blockPointerEvents && isHoverOpen() && isElement(domReferenceElement) && floatingElement) {
7715          const ref = domReferenceElement;
7716          const floatingEl = floatingElement;
7717          const doc = ownerDocument(floatingElement);
7718          const parentFloating = tree?.nodesRef.current.find((node) => node.id === parentId)?.context?.elements.floating;
7719          if (parentFloating) {
7720            parentFloating.style.pointerEvents = "";
7721          }
7722          const cachedScopeElement = instance.pointerEventsScopeElement !== floatingEl ? instance.pointerEventsScopeElement : null;
7723          const parentScopeElement = parentFloating !== floatingEl ? parentFloating : null;
7724          const scopeElement = instance.handleCloseOptions?.getScope?.() ?? cachedScopeElement ?? parentScopeElement ?? ref.closest("[data-rootownerid]") ?? doc.body;
7725          applySafePolygonPointerEventsMutation(instance, {
7726            scopeElement,
7727            referenceElement: ref,
7728            floatingElement: floatingEl
7729          });
7730          return () => {
7731            clearPointerEvents();
7732          };
7733        }
7734        return void 0;
7735      }, [enabled, open, domReferenceElement, floatingElement, instance, isHoverOpen, tree, parentId, clearPointerEvents]);
7736      React33.useEffect(() => {
7737        if (!enabled) {
7738          return void 0;
7739        }
7740        function hasParentChildren() {
7741          return !!(tree && parentId && getNodeChildren(tree.nodesRef.current, parentId).length > 0);
7742        }
7743        function closeWithDelay(event) {
7744          const closeDelay = getDelay(closeDelayProp, "close", instance.pointerType);
7745          const close = () => {
7746            store3.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
7747            tree?.events.emit("floating.closed", event);
7748          };
7749          if (closeDelay) {
7750            instance.openChangeTimeout.start(closeDelay, close);
7751          } else {
7752            instance.openChangeTimeout.clear();
7753            close();
7754          }
7755        }
7756        function handleInteractInside(event) {
7757          const target = getTarget(event);
7758          if (!isInteractiveElement(target)) {
7759            instance.interactedInside = false;
7760            return;
7761          }
7762          instance.interactedInside = target?.closest("[aria-haspopup]") != null;
7763        }
7764        function onFloatingMouseEnter() {
7765          instance.openChangeTimeout.clear();
7766          childClosedTimeout.clear();
7767          tree?.events.off("floating.closed", onNodeClosed);
7768          clearPointerEvents();
7769        }
7770        function onFloatingMouseLeave(event) {
7771          if (hasParentChildren() && tree) {
7772            tree.events.on("floating.closed", onNodeClosed);
7773            return;
7774          }
7775          if (isTargetInsideEnabledTrigger(event.relatedTarget, store3.context.triggerElements)) {
7776            return;
7777          }
7778          const currentNodeId = dataRef.current.floatingContext?.nodeId ?? nodeIdProp;
7779          const relatedTarget = event.relatedTarget;
7780          const isMovingIntoDescendantFloating = tree && currentNodeId && isElement(relatedTarget) && getNodeChildren(tree.nodesRef.current, currentNodeId, false).some((node) => contains(node.context?.elements.floating, relatedTarget));
7781          if (isMovingIntoDescendantFloating) {
7782            return;
7783          }
7784          if (instance.handler) {
7785            instance.handler(event);
7786            return;
7787          }
7788          clearPointerEvents();
7789          if (isHoverOpen() && !isClickLikeOpenEvent2()) {
7790            closeWithDelay(event);
7791          }
7792        }
7793        function onNodeClosed(event) {
7794          if (!tree || !parentId || hasParentChildren()) {
7795            return;
7796          }
7797          childClosedTimeout.start(0, () => {
7798            tree.events.off("floating.closed", onNodeClosed);
7799            store3.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
7800            tree.events.emit("floating.closed", event);
7801          });
7802        }
7803        const floating = floatingElement;
7804        return mergeCleanups(floating && addEventListener(floating, "mouseenter", onFloatingMouseEnter), floating && addEventListener(floating, "mouseleave", onFloatingMouseLeave), floating && addEventListener(floating, "pointerdown", handleInteractInside, true), () => {
7805          tree?.events.off("floating.closed", onNodeClosed);
7806        });
7807      }, [enabled, floatingElement, store3, dataRef, closeDelayProp, nodeIdProp, isHoverOpen, isClickLikeOpenEvent2, clearPointerEvents, instance, tree, parentId, childClosedTimeout]);
7808    }
7809  
7810    // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverReferenceInteraction.mjs
7811    var React34 = __toESM(require_react(), 1);
7812    var ReactDOM5 = __toESM(require_react_dom(), 1);
7813    var EMPTY_REF = {
7814      current: null
7815    };
7816    function useHoverReferenceInteraction(context, props = {}) {
7817      const {
7818        enabled = true,
7819        delay = 0,
7820        handleClose = null,
7821        mouseOnly = false,
7822        restMs = 0,
7823        move = true,
7824        triggerElementRef = EMPTY_REF,
7825        externalTree,
7826        isActiveTrigger = true,
7827        getHandleCloseContext,
7828        isClosing,
7829        shouldOpen: shouldOpenProp,
7830        guardStaleOpen = false
7831      } = props;
7832      const store3 = "rootStore" in context ? context.rootStore : context;
7833      const {
7834        dataRef,
7835        events
7836      } = store3.context;
7837      const tree = useFloatingTree(externalTree);
7838      const instance = useHoverInteractionSharedState(store3);
7839      const isHoverCloseActiveRef = React34.useRef(false);
7840      const handleCloseRef = useValueAsRef(handleClose);
7841      const delayRef = useValueAsRef(delay);
7842      const restMsRef = useValueAsRef(restMs);
7843      const enabledRef = useValueAsRef(enabled);
7844      const shouldOpenRef = useValueAsRef(shouldOpenProp);
7845      const isClosingRef = useValueAsRef(isClosing);
7846      const isClickLikeOpenEvent2 = useStableCallback(() => {
7847        return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
7848      });
7849      const checkShouldOpen = useStableCallback(() => {
7850        return shouldOpenRef.current?.() !== false;
7851      });
7852      const isOverInactiveTrigger = useStableCallback((currentDomReference, currentTarget, target) => {
7853        const allTriggers = store3.context.triggerElements;
7854        if (allTriggers.hasElement(currentTarget)) {
7855          return !currentDomReference || !contains(currentDomReference, currentTarget);
7856        }
7857        if (!isElement(target)) {
7858          return false;
7859        }
7860        const targetElement = target;
7861        return allTriggers.hasMatchingElement((trigger) => contains(trigger, targetElement)) && (!currentDomReference || !contains(currentDomReference, targetElement));
7862      });
7863      const cleanupMouseMoveHandler = useStableCallback(() => {
7864        if (!instance.handler) {
7865          return;
7866        }
7867        const doc = ownerDocument(store3.select("domReferenceElement"));
7868        doc.removeEventListener("mousemove", instance.handler);
7869        instance.handler = void 0;
7870      });
7871      const clearPointerEvents = useStableCallback(() => {
7872        clearSafePolygonPointerEventsMutation(instance);
7873      });
7874      if (isActiveTrigger) {
7875        instance.handleCloseOptions = handleCloseRef.current?.__options;
7876      }
7877      React34.useEffect(() => cleanupMouseMoveHandler, [cleanupMouseMoveHandler]);
7878      React34.useEffect(() => {
7879        if (!enabled) {
7880          return void 0;
7881        }
7882        function onOpenChangeLocal(details) {
7883          if (!details.open) {
7884            isHoverCloseActiveRef.current = details.reason === reason_parts_exports.triggerHover;
7885            cleanupMouseMoveHandler();
7886            instance.openChangeTimeout.clear();
7887            instance.restTimeout.clear();
7888            instance.blockMouseMove = true;
7889            instance.restTimeoutPending = false;
7890          } else {
7891            isHoverCloseActiveRef.current = false;
7892          }
7893        }
7894        events.on("openchange", onOpenChangeLocal);
7895        return () => {
7896          events.off("openchange", onOpenChangeLocal);
7897        };
7898      }, [enabled, events, instance, cleanupMouseMoveHandler]);
7899      React34.useEffect(() => {
7900        if (!enabled) {
7901          return void 0;
7902        }
7903        function closeWithDelay(event, runElseBranch = true) {
7904          const closeDelay = getDelay(delayRef.current, "close", instance.pointerType);
7905          if (closeDelay) {
7906            instance.openChangeTimeout.start(closeDelay, () => {
7907              store3.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
7908              tree?.events.emit("floating.closed", event);
7909            });
7910          } else if (runElseBranch) {
7911            instance.openChangeTimeout.clear();
7912            store3.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
7913            tree?.events.emit("floating.closed", event);
7914          }
7915        }
7916        const trigger = triggerElementRef.current ?? (isActiveTrigger ? store3.select("domReferenceElement") : null);
7917        if (!isElement(trigger)) {
7918          return void 0;
7919        }
7920        function onMouseEnter(event) {
7921          instance.openChangeTimeout.clear();
7922          instance.blockMouseMove = false;
7923          if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
7924            return;
7925          }
7926          const restMsValue = getRestMs(restMsRef.current);
7927          const openDelay = getDelay(delayRef.current, "open", instance.pointerType);
7928          const eventTarget = getTarget(event);
7929          const currentTarget = event.currentTarget ?? null;
7930          const currentDomReference = store3.select("domReferenceElement");
7931          let triggerNode = currentTarget;
7932          if (isElement(eventTarget) && !store3.context.triggerElements.hasElement(eventTarget)) {
7933            for (const triggerElement of store3.context.triggerElements.elements()) {
7934              if (contains(triggerElement, eventTarget)) {
7935                triggerNode = triggerElement;
7936                break;
7937              }
7938            }
7939          }
7940          if (isElement(currentTarget) && isElement(currentDomReference) && !store3.context.triggerElements.hasElement(currentTarget) && contains(currentTarget, currentDomReference)) {
7941            triggerNode = currentDomReference;
7942          }
7943          const isOverInactive = triggerNode == null ? false : isOverInactiveTrigger(currentDomReference, triggerNode, eventTarget);
7944          const isOpen = store3.select("open");
7945          const isInClosingTransition = isClosingRef.current?.() ?? store3.select("transitionStatus") === "ending";
7946          const isHoverCloseTransition = !isOpen && isInClosingTransition && isHoverCloseActiveRef.current;
7947          const isReenteringSameTriggerDuringCloseTransition = !isOverInactive && isElement(triggerNode) && isElement(currentDomReference) && contains(currentDomReference, triggerNode) && isHoverCloseTransition;
7948          const isRestOnlyDelay = restMsValue > 0 && !openDelay;
7949          const shouldOpenImmediately = isOverInactive && (isOpen || isHoverCloseTransition) || isReenteringSameTriggerDuringCloseTransition;
7950          const shouldOpen = !isOpen || isOverInactive;
7951          if (shouldOpenImmediately) {
7952            if (checkShouldOpen()) {
7953              store3.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
7954            }
7955            return;
7956          }
7957          if (isRestOnlyDelay) {
7958            return;
7959          }
7960          if (openDelay) {
7961            instance.openChangeTimeout.start(openDelay, () => {
7962              if (shouldOpen && checkShouldOpen()) {
7963                store3.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
7964              }
7965            });
7966          } else if (shouldOpen) {
7967            if (checkShouldOpen()) {
7968              store3.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
7969            }
7970          }
7971        }
7972        function onMouseLeave(event) {
7973          if (isClickLikeOpenEvent2()) {
7974            clearPointerEvents();
7975            return;
7976          }
7977          cleanupMouseMoveHandler();
7978          const domReferenceElement = store3.select("domReferenceElement");
7979          const doc = ownerDocument(domReferenceElement);
7980          instance.restTimeout.clear();
7981          instance.restTimeoutPending = false;
7982          const handleCloseContextBase = dataRef.current.floatingContext ?? getHandleCloseContext?.();
7983          if (isTargetInsideEnabledTrigger(event.relatedTarget, store3.context.triggerElements)) {
7984            return;
7985          }
7986          if (handleCloseRef.current && handleCloseContextBase) {
7987            if (!store3.select("open")) {
7988              instance.openChangeTimeout.clear();
7989            }
7990            const currentTrigger = triggerElementRef.current;
7991            instance.handler = handleCloseRef.current({
7992              ...handleCloseContextBase,
7993              tree,
7994              x: event.clientX,
7995              y: event.clientY,
7996              onClose() {
7997                clearPointerEvents();
7998                cleanupMouseMoveHandler();
7999                if (enabledRef.current && !isClickLikeOpenEvent2() && currentTrigger === store3.select("domReferenceElement")) {
8000                  closeWithDelay(event, true);
8001                }
8002              }
8003            });
8004            doc.addEventListener("mousemove", instance.handler);
8005            instance.handler(event);
8006            return;
8007          }
8008          const shouldClose = instance.pointerType === "touch" ? !contains(store3.select("floatingElement"), event.relatedTarget) : true;
8009          if (shouldClose) {
8010            closeWithDelay(event);
8011          }
8012        }
8013        function onMouseOut(event) {
8014          if (contains(trigger, event.relatedTarget)) {
8015            return;
8016          }
8017          instance.openChangeTimeout.clear();
8018          instance.restTimeout.clear();
8019          instance.restTimeoutPending = false;
8020        }
8021        const staleOpenGuard = guardStaleOpen ? addEventListener(trigger, "mouseout", onMouseOut) : void 0;
8022        if (move) {
8023          return mergeCleanups(addEventListener(trigger, "mousemove", onMouseEnter, {
8024            once: true
8025          }), addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
8026        }
8027        return mergeCleanups(addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
8028      }, [cleanupMouseMoveHandler, clearPointerEvents, dataRef, delayRef, store3, enabled, handleCloseRef, instance, isActiveTrigger, isOverInactiveTrigger, isClickLikeOpenEvent2, mouseOnly, move, restMsRef, triggerElementRef, tree, enabledRef, getHandleCloseContext, isClosingRef, checkShouldOpen, guardStaleOpen]);
8029      return React34.useMemo(() => {
8030        if (!enabled) {
8031          return void 0;
8032        }
8033        function setPointerRef(event) {
8034          instance.pointerType = event.pointerType;
8035        }
8036        return {
8037          onPointerDown: setPointerRef,
8038          onPointerEnter: setPointerRef,
8039          onMouseMove(event) {
8040            const {
8041              nativeEvent
8042            } = event;
8043            const trigger = event.currentTarget;
8044            const currentDomReference = store3.select("domReferenceElement");
8045            const currentOpen = store3.select("open");
8046            const isOverInactive = isOverInactiveTrigger(currentDomReference, trigger, event.target);
8047            if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
8048              return;
8049            }
8050            if (currentOpen && isOverInactive && instance.handleCloseOptions?.blockPointerEvents) {
8051              const floatingElement = store3.select("floatingElement");
8052              if (floatingElement) {
8053                const scopeElement = instance.handleCloseOptions?.getScope?.() ?? trigger.ownerDocument.body;
8054                applySafePolygonPointerEventsMutation(instance, {
8055                  scopeElement,
8056                  referenceElement: trigger,
8057                  floatingElement
8058                });
8059              }
8060            }
8061            const restMsValue = getRestMs(restMsRef.current);
8062            if (currentOpen && !isOverInactive || restMsValue === 0) {
8063              return;
8064            }
8065            if (!isOverInactive && instance.restTimeoutPending && event.movementX ** 2 + event.movementY ** 2 < 2) {
8066              return;
8067            }
8068            instance.restTimeout.clear();
8069            function handleMouseMove() {
8070              instance.restTimeoutPending = false;
8071              if (isClickLikeOpenEvent2()) {
8072                return;
8073              }
8074              const latestOpen = store3.select("open");
8075              if (!instance.blockMouseMove && (!latestOpen || isOverInactive) && checkShouldOpen()) {
8076                store3.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, nativeEvent, trigger));
8077              }
8078            }
8079            if (instance.pointerType === "touch") {
8080              ReactDOM5.flushSync(() => {
8081                handleMouseMove();
8082              });
8083            } else if (isOverInactive && currentOpen) {
8084              handleMouseMove();
8085            } else {
8086              instance.restTimeoutPending = true;
8087              instance.restTimeout.start(restMsValue, handleMouseMove);
8088            }
8089          }
8090        };
8091      }, [enabled, instance, isClickLikeOpenEvent2, isOverInactiveTrigger, mouseOnly, store3, restMsRef, checkShouldOpen]);
8092    }
8093  
8094    // node_modules/@base-ui/react/floating-ui-react/safePolygon.mjs
8095    var CURSOR_SPEED_THRESHOLD = 0.1;
8096    var CURSOR_SPEED_THRESHOLD_SQUARED = CURSOR_SPEED_THRESHOLD * CURSOR_SPEED_THRESHOLD;
8097    var POLYGON_BUFFER = 0.5;
8098    function hasIntersectingEdge(pointX, pointY, xi, yi, xj, yj) {
8099      return yi >= pointY !== yj >= pointY && pointX <= (xj - xi) * (pointY - yi) / (yj - yi) + xi;
8100    }
8101    function isPointInQuadrilateral(pointX, pointY, x1, y1, x2, y2, x3, y3, x4, y4) {
8102      let isInsideValue = false;
8103      if (hasIntersectingEdge(pointX, pointY, x1, y1, x2, y2)) {
8104        isInsideValue = !isInsideValue;
8105      }
8106      if (hasIntersectingEdge(pointX, pointY, x2, y2, x3, y3)) {
8107        isInsideValue = !isInsideValue;
8108      }
8109      if (hasIntersectingEdge(pointX, pointY, x3, y3, x4, y4)) {
8110        isInsideValue = !isInsideValue;
8111      }
8112      if (hasIntersectingEdge(pointX, pointY, x4, y4, x1, y1)) {
8113        isInsideValue = !isInsideValue;
8114      }
8115      return isInsideValue;
8116    }
8117    function isInsideRect(pointX, pointY, rect) {
8118      return pointX >= rect.x && pointX <= rect.x + rect.width && pointY >= rect.y && pointY <= rect.y + rect.height;
8119    }
8120    function isInsideAxisAlignedRect(pointX, pointY, x1, y1, x2, y2) {
8121      const minX = Math.min(x1, x2);
8122      const maxX = Math.max(x1, x2);
8123      const minY = Math.min(y1, y2);
8124      const maxY = Math.max(y1, y2);
8125      return pointX >= minX && pointX <= maxX && pointY >= minY && pointY <= maxY;
8126    }
8127    function safePolygon(options = {}) {
8128      const {
8129        blockPointerEvents = false
8130      } = options;
8131      const timeout = new Timeout();
8132      const fn = ({
8133        x,
8134        y,
8135        placement,
8136        elements,
8137        onClose,
8138        nodeId,
8139        tree
8140      }) => {
8141        const side = placement?.split("-")[0];
8142        let hasLanded = false;
8143        let lastX = null;
8144        let lastY = null;
8145        let lastCursorTime = typeof performance !== "undefined" ? performance.now() : 0;
8146        function isCursorMovingSlowly(nextX, nextY) {
8147          const currentTime = performance.now();
8148          const elapsedTime = currentTime - lastCursorTime;
8149          if (lastX === null || lastY === null || elapsedTime === 0) {
8150            lastX = nextX;
8151            lastY = nextY;
8152            lastCursorTime = currentTime;
8153            return false;
8154          }
8155          const deltaX = nextX - lastX;
8156          const deltaY = nextY - lastY;
8157          const distanceSquared = deltaX * deltaX + deltaY * deltaY;
8158          const thresholdSquared = elapsedTime * elapsedTime * CURSOR_SPEED_THRESHOLD_SQUARED;
8159          lastX = nextX;
8160          lastY = nextY;
8161          lastCursorTime = currentTime;
8162          return distanceSquared < thresholdSquared;
8163        }
8164        function close() {
8165          timeout.clear();
8166          onClose();
8167        }
8168        return function onMouseMove(event) {
8169          timeout.clear();
8170          const domReference = elements.domReference;
8171          const floating = elements.floating;
8172          if (!domReference || !floating || side == null || x == null || y == null) {
8173            return void 0;
8174          }
8175          const {
8176            clientX,
8177            clientY
8178          } = event;
8179          const target = getTarget(event);
8180          const isLeave = event.type === "mouseleave";
8181          const isOverFloatingEl = contains(floating, target);
8182          const isOverReferenceEl = contains(domReference, target);
8183          if (isOverFloatingEl) {
8184            hasLanded = true;
8185            if (!isLeave) {
8186              return void 0;
8187            }
8188          }
8189          if (isOverReferenceEl) {
8190            hasLanded = false;
8191            if (!isLeave) {
8192              hasLanded = true;
8193              return void 0;
8194            }
8195          }
8196          if (isLeave && isElement(event.relatedTarget) && contains(floating, event.relatedTarget)) {
8197            return void 0;
8198          }
8199          function hasOpenChildNode() {
8200            return Boolean(tree && getNodeChildren(tree.nodesRef.current, nodeId).length > 0);
8201          }
8202          function closeIfNoOpenChild() {
8203            if (!hasOpenChildNode()) {
8204              close();
8205            }
8206          }
8207          if (hasOpenChildNode()) {
8208            return void 0;
8209          }
8210          const refRect = domReference.getBoundingClientRect();
8211          const rect = floating.getBoundingClientRect();
8212          const cursorLeaveFromRight = x > rect.right - rect.width / 2;
8213          const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;
8214          const isFloatingWider = rect.width > refRect.width;
8215          const isFloatingTaller = rect.height > refRect.height;
8216          const left = (isFloatingWider ? refRect : rect).left;
8217          const right = (isFloatingWider ? refRect : rect).right;
8218          const top = (isFloatingTaller ? refRect : rect).top;
8219          const bottom = (isFloatingTaller ? refRect : rect).bottom;
8220          if (side === "top" && y >= refRect.bottom - 1 || side === "bottom" && y <= refRect.top + 1 || side === "left" && x >= refRect.right - 1 || side === "right" && x <= refRect.left + 1) {
8221            closeIfNoOpenChild();
8222            return void 0;
8223          }
8224          let isInsideTroughRect = false;
8225          switch (side) {
8226            case "top":
8227              isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, refRect.top + 1, right, rect.bottom - 1);
8228              break;
8229            case "bottom":
8230              isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, rect.top + 1, right, refRect.bottom - 1);
8231              break;
8232            case "left":
8233              isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, rect.right - 1, bottom, refRect.left + 1, top);
8234              break;
8235            case "right":
8236              isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, refRect.right - 1, bottom, rect.left + 1, top);
8237              break;
8238            default:
8239          }
8240          if (isInsideTroughRect) {
8241            return void 0;
8242          }
8243          if (hasLanded && !isInsideRect(clientX, clientY, refRect)) {
8244            closeIfNoOpenChild();
8245            return void 0;
8246          }
8247          if (!isLeave && isCursorMovingSlowly(clientX, clientY)) {
8248            closeIfNoOpenChild();
8249            return void 0;
8250          }
8251          let isInsidePolygon = false;
8252          switch (side) {
8253            case "top": {
8254              const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
8255              const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
8256              const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
8257              const cursorPointY = y + POLYGON_BUFFER + 1;
8258              const commonYLeft = cursorLeaveFromRight ? rect.bottom - POLYGON_BUFFER : isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top;
8259              const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top : rect.bottom - POLYGON_BUFFER;
8260              isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
8261              break;
8262            }
8263            case "bottom": {
8264              const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
8265              const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
8266              const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
8267              const cursorPointY = y - POLYGON_BUFFER;
8268              const commonYLeft = cursorLeaveFromRight ? rect.top + POLYGON_BUFFER : isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom;
8269              const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom : rect.top + POLYGON_BUFFER;
8270              isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
8271              break;
8272            }
8273            case "left": {
8274              const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
8275              const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
8276              const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
8277              const cursorPointX = x + POLYGON_BUFFER + 1;
8278              const commonXTop = cursorLeaveFromBottom ? rect.right - POLYGON_BUFFER : isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left;
8279              const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left : rect.right - POLYGON_BUFFER;
8280              isInsidePolygon = isPointInQuadrilateral(clientX, clientY, commonXTop, rect.top, commonXBottom, rect.bottom, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY);
8281              break;
8282            }
8283            case "right": {
8284              const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
8285              const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
8286              const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
8287              const cursorPointX = x - POLYGON_BUFFER;
8288              const commonXTop = cursorLeaveFromBottom ? rect.left + POLYGON_BUFFER : isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right;
8289              const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right : rect.left + POLYGON_BUFFER;
8290              isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY, commonXTop, rect.top, commonXBottom, rect.bottom);
8291              break;
8292            }
8293            default:
8294          }
8295          if (!isInsidePolygon) {
8296            closeIfNoOpenChild();
8297          } else if (!hasLanded) {
8298            timeout.start(40, closeIfNoOpenChild);
8299          }
8300          return void 0;
8301        };
8302      };
8303      fn.__options = {
8304        ...options,
8305        blockPointerEvents
8306      };
8307      return fn;
8308    }
8309  
8310    // node_modules/@base-ui/react/utils/NullStore.mjs
8311    var NullStore = class extends ReactStore {
8312      // `update`/`set`/`notifyAll` funnel through `setState` in the base `Store`, so overriding
8313      // `setState` alone would neutralize them today. They are overridden explicitly so the store stays
8314      // inert even if a future base-class change stops routing a mutator through `setState`.
8315      setState(_newState) {
8316      }
8317      update(_changes) {
8318      }
8319      set(_key, _value) {
8320      }
8321      notifyAll() {
8322      }
8323    };
8324  
8325    // node_modules/@base-ui/react/utils/popupStateMapping.mjs
8326    var CommonPopupDataAttributes = (function(CommonPopupDataAttributes2) {
8327      CommonPopupDataAttributes2["open"] = "data-open";
8328      CommonPopupDataAttributes2["closed"] = "data-closed";
8329      CommonPopupDataAttributes2[CommonPopupDataAttributes2["startingStyle"] = TransitionStatusDataAttributes.startingStyle] = "startingStyle";
8330      CommonPopupDataAttributes2[CommonPopupDataAttributes2["endingStyle"] = TransitionStatusDataAttributes.endingStyle] = "endingStyle";
8331      CommonPopupDataAttributes2["anchorHidden"] = "data-anchor-hidden";
8332      CommonPopupDataAttributes2["side"] = "data-side";
8333      CommonPopupDataAttributes2["align"] = "data-align";
8334      return CommonPopupDataAttributes2;
8335    })({});
8336    var TRIGGER_HOOK = {
8337      "data-popup-open": ""
8338    };
8339    var POPUP_OPEN_HOOK = {
8340      "data-open": ""
8341    };
8342    var POPUP_CLOSED_HOOK = {
8343      "data-closed": ""
8344    };
8345    var ANCHOR_HIDDEN_HOOK = {
8346      "data-anchor-hidden": ""
8347    };
8348    var triggerOpenStateMapping2 = {
8349      open(value) {
8350        if (value) {
8351          return TRIGGER_HOOK;
8352        }
8353        return null;
8354      }
8355    };
8356    var popupStateMapping = {
8357      open(value) {
8358        if (value) {
8359          return POPUP_OPEN_HOOK;
8360        }
8361        return POPUP_CLOSED_HOOK;
8362      },
8363      anchorHidden(value) {
8364        if (value) {
8365          return ANCHOR_HIDDEN_HOOK;
8366        }
8367        return null;
8368      }
8369    };
8370    var popupTransitionStateMapping = {
8371      ...popupStateMapping,
8372      ...transitionStatusMapping
8373    };
8374  
8375    // node_modules/@base-ui/utils/inertValue.mjs
8376    function inertValue(value) {
8377      if (isReactVersionAtLeast(19)) {
8378        return value;
8379      }
8380      return value ? "true" : void 0;
8381    }
8382  
8383    // node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs
8384    var React35 = __toESM(require_react(), 1);
8385    var DirectionContext = /* @__PURE__ */ React35.createContext(void 0);
8386    if (true) DirectionContext.displayName = "DirectionContext";
8387    function useDirection() {
8388      const context = React35.useContext(DirectionContext);
8389      return context?.direction ?? "ltr";
8390    }
8391  
8392    // node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
8393    var React36 = __toESM(require_react(), 1);
8394  
8395    // node_modules/@base-ui/react/floating-ui-react/middleware/arrow.mjs
8396    var baseArrow = (options) => ({
8397      name: "arrow",
8398      options,
8399      async fn(state) {
8400        const {
8401          x,
8402          y,
8403          placement,
8404          rects,
8405          platform: platform3,
8406          elements,
8407          middlewareData
8408        } = state;
8409        const {
8410          element,
8411          padding = 0,
8412          offsetParent = "real"
8413        } = evaluate(options, state) || {};
8414        if (element == null) {
8415          return {};
8416        }
8417        const paddingObject = getPaddingObject(padding);
8418        const coords = {
8419          x,
8420          y
8421        };
8422        const axis = getAlignmentAxis(placement);
8423        const length = getAxisLength(axis);
8424        const arrowDimensions = await platform3.getDimensions(element);
8425        const isYAxis = axis === "y";
8426        const minProp = isYAxis ? "top" : "left";
8427        const maxProp = isYAxis ? "bottom" : "right";
8428        const clientProp = isYAxis ? "clientHeight" : "clientWidth";
8429        const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
8430        const startDiff = coords[axis] - rects.reference[axis];
8431        const arrowOffsetParent = offsetParent === "real" ? await platform3.getOffsetParent?.(element) : elements.floating;
8432        let clientSize = elements.floating[clientProp] || rects.floating[length];
8433        if (!clientSize || !await platform3.isElement?.(arrowOffsetParent)) {
8434          clientSize = elements.floating[clientProp] || rects.floating[length];
8435        }
8436        const centerToReference = endDiff / 2 - startDiff / 2;
8437        const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
8438        const minPadding = Math.min(paddingObject[minProp], largestPossiblePadding);
8439        const maxPadding = Math.min(paddingObject[maxProp], largestPossiblePadding);
8440        const min2 = minPadding;
8441        const max2 = clientSize - arrowDimensions[length] - maxPadding;
8442        const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
8443        const offset4 = clamp(min2, center, max2);
8444        const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset4 && rects.reference[length] / 2 - (center < min2 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
8445        const alignmentOffset = shouldAddOffset ? center < min2 ? center - min2 : center - max2 : 0;
8446        return {
8447          [axis]: coords[axis] + alignmentOffset,
8448          data: {
8449            [axis]: offset4,
8450            centerOffset: center - offset4 - alignmentOffset,
8451            ...shouldAddOffset && {
8452              alignmentOffset
8453            }
8454          },
8455          reset: shouldAddOffset
8456        };
8457      }
8458    });
8459    var arrow4 = (options, deps) => ({
8460      ...baseArrow(options),
8461      options: [options, deps]
8462    });
8463  
8464    // node_modules/@base-ui/react/utils/hideMiddleware.mjs
8465    var hide4 = {
8466      name: "hide",
8467      async fn(state) {
8468        const {
8469          width,
8470          height,
8471          x,
8472          y
8473        } = state.rects.reference;
8474        const anchorHidden = width === 0 && height === 0 && x === 0 && y === 0;
8475        const overflow = await state.platform.detectOverflow(state, {
8476          elementContext: "reference"
8477        });
8478        const referenceHidden = overflow.top - height >= 0 || overflow.right - width >= 0 || overflow.bottom - height >= 0 || overflow.left - width >= 0;
8479        return {
8480          data: {
8481            referenceHidden: referenceHidden || anchorHidden
8482          }
8483        };
8484      }
8485    };
8486  
8487    // node_modules/@base-ui/react/utils/adaptiveOriginConstants.mjs
8488    var DEFAULT_SIDES = {
8489      sideX: "left",
8490      sideY: "top"
8491    };
8492  
8493    // node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
8494    var AVAILABLE_WIDTH_VAR = "--available-width";
8495    var AVAILABLE_HEIGHT_VAR = "--available-height";
8496    function getLogicalSide(sideParam, renderedSide, isRtl) {
8497      const isLogicalSideParam = sideParam === "inline-start" || sideParam === "inline-end";
8498      const logicalRight = isRtl ? "inline-start" : "inline-end";
8499      const logicalLeft = isRtl ? "inline-end" : "inline-start";
8500      return {
8501        top: "top",
8502        right: isLogicalSideParam ? logicalRight : "right",
8503        bottom: "bottom",
8504        left: isLogicalSideParam ? logicalLeft : "left"
8505      }[renderedSide];
8506    }
8507    function getOffsetData(state, sideParam, isRtl) {
8508      const {
8509        rects,
8510        placement
8511      } = state;
8512      const data = {
8513        side: getLogicalSide(sideParam, getSide(placement), isRtl),
8514        align: getAlignment(placement) || "center",
8515        anchor: {
8516          width: rects.reference.width,
8517          height: rects.reference.height
8518        },
8519        positioner: {
8520          width: rects.floating.width,
8521          height: rects.floating.height
8522        }
8523      };
8524      return data;
8525    }
8526    function useAnchorPositioning(params) {
8527      return useAnchorPositioningWithHook(params, useBaseUIFloating);
8528    }
8529    function useAnchorPositioningWithHook(params, useFloatingHook) {
8530      const {
8531        // Public parameters
8532        anchor,
8533        positionMethod = "absolute",
8534        side: sideParam = "bottom",
8535        sideOffset = 0,
8536        align = "center",
8537        alignOffset = 0,
8538        collisionBoundary,
8539        collisionPadding: collisionPaddingParam = 5,
8540        sticky = false,
8541        arrowPadding = 5,
8542        disableAnchorTracking = false,
8543        inline: inlineMiddleware,
8544        // Private parameters
8545        keepMounted = false,
8546        floatingRootContext,
8547        mounted,
8548        collisionAvoidance,
8549        shift: shift4,
8550        nodeId,
8551        adaptiveOrigin: adaptiveOrigin2,
8552        lazyFlip = false,
8553        externalTree
8554      } = params;
8555      const [mountSide, setMountSide] = React36.useState(null);
8556      if (!mounted && mountSide !== null) {
8557        setMountSide(null);
8558      }
8559      const collisionAvoidanceSide = collisionAvoidance.side || "flip";
8560      const collisionAvoidanceAlign = collisionAvoidance.align || "flip";
8561      const collisionAvoidanceFallbackAxisSide = collisionAvoidance.fallbackAxisSide || "end";
8562      const shiftCrossAxis = shift4?.crossAxis ?? false;
8563      const shiftRootBoundary = shift4?.rootBoundary;
8564      const anchorFn = typeof anchor === "function" ? anchor : void 0;
8565      const anchorFnCallback = useStableCallback(anchorFn);
8566      const anchorDep = anchorFn ? anchorFnCallback : anchor;
8567      const anchorValueRef = useValueAsRef(anchor);
8568      const mountedRef = useValueAsRef(mounted);
8569      const direction = useDirection();
8570      const isRtl = direction === "rtl";
8571      const side = mountSide || {
8572        top: "top",
8573        right: "right",
8574        bottom: "bottom",
8575        left: "left",
8576        "inline-end": isRtl ? "left" : "right",
8577        "inline-start": isRtl ? "right" : "left"
8578      }[sideParam];
8579      const placement = align === "center" ? side : `$side}-$align}`;
8580      let collisionPadding = collisionPaddingParam;
8581      if (typeof collisionPadding === "number") {
8582        collisionPadding = {
8583          top: collisionPadding,
8584          right: collisionPadding,
8585          bottom: collisionPadding,
8586          left: collisionPadding
8587        };
8588      } else if (collisionPadding) {
8589        collisionPadding = {
8590          top: collisionPadding.top || 0,
8591          right: collisionPadding.right || 0,
8592          bottom: collisionPadding.bottom || 0,
8593          left: collisionPadding.left || 0
8594        };
8595      }
8596      const bias = 1;
8597      const biasTop = sideParam === "bottom" ? bias : 0;
8598      const biasBottom = sideParam === "top" ? bias : 0;
8599      const biasLeft = sideParam === "right" ? bias : 0;
8600      const biasRight = sideParam === "left" ? bias : 0;
8601      const commonCollisionProps = {
8602        boundary: collisionBoundary === "clipping-ancestors" ? "clippingAncestors" : collisionBoundary,
8603        padding: collisionPadding
8604      };
8605      const arrowRef = React36.useRef(null);
8606      const sideOffsetRef = useValueAsRef(sideOffset);
8607      const alignOffsetRef = useValueAsRef(alignOffset);
8608      const sideOffsetDep = typeof sideOffset !== "function" ? sideOffset : 0;
8609      const alignOffsetDep = typeof alignOffset !== "function" ? alignOffset : 0;
8610      const middleware = [];
8611      if (inlineMiddleware) {
8612        middleware.push(inlineMiddleware);
8613      }
8614      middleware.push(offset3((state) => {
8615        const data = getOffsetData(state, sideParam, isRtl);
8616        const sideAxis = typeof sideOffsetRef.current === "function" ? sideOffsetRef.current(data) : sideOffsetRef.current;
8617        const alignAxis = typeof alignOffsetRef.current === "function" ? alignOffsetRef.current(data) : alignOffsetRef.current;
8618        return {
8619          mainAxis: sideAxis,
8620          crossAxis: alignAxis,
8621          alignmentAxis: alignAxis
8622        };
8623      }, [sideOffsetDep, alignOffsetDep, isRtl, sideParam]));
8624      const shiftDisabled = collisionAvoidanceAlign === "none" && collisionAvoidanceSide !== "shift";
8625      const crossAxisShiftEnabled = !shiftDisabled && (sticky || shiftCrossAxis || collisionAvoidanceSide === "shift");
8626      const flipMiddleware = collisionAvoidanceSide === "none" ? null : flip3({
8627        ...commonCollisionProps,
8628        // Ensure the popup flips if it's been limited by its --available-height and it resizes.
8629        // Since the size() padding is smaller than the flip() padding, flip() will take precedence.
8630        padding: {
8631          top: collisionPadding.top + bias + biasTop,
8632          right: collisionPadding.right + bias + biasRight,
8633          bottom: collisionPadding.bottom + bias + biasBottom,
8634          left: collisionPadding.left + bias + biasLeft
8635        },
8636        mainAxis: !shiftCrossAxis && collisionAvoidanceSide === "flip",
8637        crossAxis: collisionAvoidanceAlign === "flip" ? "alignment" : false,
8638        fallbackAxisSideDirection: collisionAvoidanceFallbackAxisSide
8639      });
8640      const shiftMiddleware = shiftDisabled ? null : shift3({
8641        ...commonCollisionProps,
8642        // Use the Layout Viewport to avoid shifting around when pinch-zooming.
8643        rootBoundary: shiftRootBoundary,
8644        mainAxis: collisionAvoidanceAlign !== "none",
8645        crossAxis: crossAxisShiftEnabled,
8646        limiter: sticky || shiftCrossAxis ? void 0 : limitShift3((limitData) => {
8647          if (!arrowRef.current) {
8648            return {};
8649          }
8650          const {
8651            width,
8652            height
8653          } = arrowRef.current.getBoundingClientRect();
8654          const sideAxis = getSideAxis(getSide(limitData.placement));
8655          const arrowSize = sideAxis === "y" ? width : height;
8656          const offsetAmount = sideAxis === "y" ? collisionPadding.left + collisionPadding.right : collisionPadding.top + collisionPadding.bottom;
8657          return {
8658            offset: arrowSize / 2 + offsetAmount / 2
8659          };
8660        })
8661      }, [commonCollisionProps, sticky, shiftCrossAxis, shiftRootBoundary, collisionPadding, collisionAvoidanceAlign]);
8662      if (collisionAvoidanceSide === "shift" || collisionAvoidanceAlign === "shift" || align === "center") {
8663        middleware.push(shiftMiddleware, flipMiddleware);
8664      } else {
8665        middleware.push(flipMiddleware, shiftMiddleware);
8666      }
8667      middleware.push(size3({
8668        ...commonCollisionProps,
8669        apply({
8670          elements: {
8671            floating
8672          },
8673          availableWidth,
8674          availableHeight,
8675          rects
8676        }) {
8677          if (!mountedRef.current) {
8678            return;
8679          }
8680          const floatingStyle = floating.style;
8681          floatingStyle.setProperty(AVAILABLE_WIDTH_VAR, `$availableWidth}px`);
8682          floatingStyle.setProperty(AVAILABLE_HEIGHT_VAR, `$availableHeight}px`);
8683          const dpr = getWindow(floating).devicePixelRatio || 1;
8684          const {
8685            x: x2,
8686            y: y2,
8687            width,
8688            height
8689          } = rects.reference;
8690          const anchorWidth = (Math.round((x2 + width) * dpr) - Math.round(x2 * dpr)) / dpr;
8691          const anchorHeight = (Math.round((y2 + height) * dpr) - Math.round(y2 * dpr)) / dpr;
8692          floatingStyle.setProperty("--anchor-width", `$anchorWidth}px`);
8693          floatingStyle.setProperty("--anchor-height", `$anchorHeight}px`);
8694        }
8695      }), arrow4((state) => ({
8696        // `transform-origin` calculations rely on an element existing. If the arrow hasn't been set,
8697        // we'll create a fake element.
8698        element: arrowRef.current || ownerDocument(state.elements.floating).createElement("div"),
8699        padding: arrowPadding,
8700        offsetParent: "floating"
8701      }), [arrowPadding]), {
8702        name: "transformOrigin",
8703        fn(state) {
8704          const {
8705            elements: elements2,
8706            middlewareData: middlewareData2,
8707            placement: renderedPlacement2,
8708            rects,
8709            y: y2
8710          } = state;
8711          const currentRenderedSide = getSide(renderedPlacement2);
8712          const currentRenderedAxis = getSideAxis(currentRenderedSide);
8713          const arrowEl = arrowRef.current;
8714          const arrowX = middlewareData2.arrow?.x || 0;
8715          const arrowY = middlewareData2.arrow?.y || 0;
8716          const arrowWidth = arrowEl?.clientWidth || 0;
8717          const arrowHeight = arrowEl?.clientHeight || 0;
8718          const transformX = arrowX + arrowWidth / 2;
8719          const transformY = arrowY + arrowHeight / 2;
8720          const shiftY = Math.abs(middlewareData2.shift?.y || 0);
8721          const halfAnchorHeight = rects.reference.height / 2;
8722          const sideOffsetValue = typeof sideOffset === "function" ? sideOffset(getOffsetData(state, sideParam, isRtl)) : sideOffset;
8723          const isOverlappingAnchor = shiftY > sideOffsetValue;
8724          const adjacentTransformOrigin = {
8725            top: `$transformX}px calc(100% + $sideOffsetValue}px)`,
8726            bottom: `$transformX}px ${-sideOffsetValue}px`,
8727            left: `calc(100% + $sideOffsetValue}px) $transformY}px`,
8728            right: `${-sideOffsetValue}px $transformY}px`
8729          }[currentRenderedSide];
8730          const overlapTransformOrigin = `$transformX}px $rects.reference.y + halfAnchorHeight - y2}px`;
8731          elements2.floating.style.setProperty("--transform-origin", crossAxisShiftEnabled && currentRenderedAxis === "y" && isOverlappingAnchor ? overlapTransformOrigin : adjacentTransformOrigin);
8732          return {};
8733        }
8734      }, hide4, adaptiveOrigin2);
8735      useIsoLayoutEffect(() => {
8736        if (!mounted && floatingRootContext) {
8737          floatingRootContext.update({
8738            referenceElement: null,
8739            floatingElement: null,
8740            domReferenceElement: null,
8741            positionReference: null
8742          });
8743        }
8744      }, [mounted, floatingRootContext]);
8745      const autoUpdateOptions = React36.useMemo(() => ({
8746        elementResize: !disableAnchorTracking && typeof ResizeObserver !== "undefined",
8747        layoutShift: !disableAnchorTracking && typeof IntersectionObserver !== "undefined"
8748      }), [disableAnchorTracking]);
8749      const {
8750        refs,
8751        elements,
8752        x,
8753        y,
8754        middlewareData,
8755        update: update2,
8756        placement: renderedPlacement,
8757        context,
8758        isPositioned,
8759        floatingStyles: originalFloatingStyles
8760      } = useFloatingHook({
8761        rootContext: floatingRootContext,
8762        open: keepMounted ? mounted : void 0,
8763        placement,
8764        middleware,
8765        strategy: positionMethod,
8766        whileElementsMounted: keepMounted ? void 0 : (...args) => autoUpdate(...args, autoUpdateOptions),
8767        nodeId,
8768        externalTree
8769      });
8770      const {
8771        sideX,
8772        sideY
8773      } = middlewareData.adaptiveOrigin || DEFAULT_SIDES;
8774      const resolvedPosition = isPositioned ? positionMethod : "fixed";
8775      const floatingStyles = React36.useMemo(() => {
8776        let base;
8777        if (!isPositioned) {
8778          base = {
8779            position: resolvedPosition,
8780            top: 0,
8781            left: 0
8782          };
8783        } else if (adaptiveOrigin2) {
8784          base = {
8785            position: resolvedPosition,
8786            [sideX]: x,
8787            [sideY]: y
8788          };
8789        } else {
8790          base = {
8791            ...originalFloatingStyles,
8792            position: resolvedPosition
8793          };
8794        }
8795        base[AVAILABLE_WIDTH_VAR] = "100vw";
8796        base[AVAILABLE_HEIGHT_VAR] = "100vh";
8797        if (!isPositioned) {
8798          base.opacity = 0;
8799        }
8800        return base;
8801      }, [adaptiveOrigin2, resolvedPosition, sideX, x, sideY, y, originalFloatingStyles, isPositioned]);
8802      const registeredPositionReferenceRef = React36.useRef(null);
8803      useIsoLayoutEffect(() => {
8804        if (!mounted) {
8805          return;
8806        }
8807        const anchorValue = anchorValueRef.current;
8808        const resolvedAnchor = typeof anchorValue === "function" ? anchorValue() : anchorValue;
8809        const unwrappedElement = (isRef(resolvedAnchor) ? resolvedAnchor.current : resolvedAnchor) || null;
8810        const finalAnchor = unwrappedElement || null;
8811        if (finalAnchor !== registeredPositionReferenceRef.current) {
8812          refs.setPositionReference(finalAnchor);
8813          registeredPositionReferenceRef.current = finalAnchor;
8814        }
8815      }, [mounted, refs, anchorDep, anchorValueRef]);
8816      React36.useEffect(() => {
8817        if (!mounted) {
8818          return;
8819        }
8820        const anchorValue = anchorValueRef.current;
8821        if (typeof anchorValue === "function") {
8822          return;
8823        }
8824        if (isRef(anchorValue) && anchorValue.current !== registeredPositionReferenceRef.current) {
8825          refs.setPositionReference(anchorValue.current);
8826          registeredPositionReferenceRef.current = anchorValue.current;
8827        }
8828      }, [mounted, refs, anchorDep, anchorValueRef]);
8829      React36.useEffect(() => {
8830        if (keepMounted && mounted && elements.reference && elements.floating) {
8831          return autoUpdate(elements.reference, elements.floating, update2, autoUpdateOptions);
8832        }
8833        return void 0;
8834      }, [keepMounted, mounted, elements, update2, autoUpdateOptions]);
8835      const renderedSide = getSide(renderedPlacement);
8836      const logicalRenderedSide = getLogicalSide(sideParam, renderedSide, isRtl);
8837      const renderedAlign = getAlignment(renderedPlacement) || "center";
8838      const anchorHidden = Boolean(middlewareData.hide?.referenceHidden);
8839      useIsoLayoutEffect(() => {
8840        if (lazyFlip && mounted && isPositioned && renderedSide !== side) {
8841          setMountSide(renderedSide);
8842        }
8843      }, [lazyFlip, mounted, isPositioned, renderedSide, side]);
8844      const arrowStyles = React36.useMemo(() => ({
8845        position: "absolute",
8846        top: middlewareData.arrow?.y,
8847        left: middlewareData.arrow?.x
8848      }), [middlewareData.arrow]);
8849      const arrowUncentered = middlewareData.arrow?.centerOffset !== 0;
8850      return React36.useMemo(() => ({
8851        positionerStyles: floatingStyles,
8852        arrowStyles,
8853        arrowRef,
8854        arrowUncentered,
8855        side: logicalRenderedSide,
8856        align: renderedAlign,
8857        physicalSide: renderedSide,
8858        anchorHidden,
8859        refs,
8860        context,
8861        isPositioned,
8862        update: update2
8863      }), [floatingStyles, arrowStyles, arrowRef, arrowUncentered, logicalRenderedSide, renderedAlign, renderedSide, anchorHidden, refs, context, isPositioned, update2]);
8864    }
8865    function isRef(param) {
8866      return param != null && "current" in param;
8867    }
8868  
8869    // node_modules/@base-ui/react/internals/getDisabledMountTransitionStyles.mjs
8870    function getDisabledMountTransitionStyles(transitionStatus) {
8871      return transitionStatus === "starting" ? DISABLED_TRANSITIONS_STYLE : EMPTY_OBJECT;
8872    }
8873  
8874    // node_modules/@base-ui/react/utils/usePositioner.mjs
8875    function usePositioner(componentProps, state, {
8876      styles,
8877      transitionStatus,
8878      props,
8879      refs,
8880      hidden,
8881      inert = false
8882    }) {
8883      const style = {
8884        ...styles
8885      };
8886      if (inert) {
8887        style.pointerEvents = "none";
8888      }
8889      return useRenderElement("div", componentProps, {
8890        state,
8891        ref: refs,
8892        props: [{
8893          role: "presentation",
8894          hidden,
8895          style
8896        }, getDisabledMountTransitionStyles(transitionStatus), props],
8897        stateAttributesMapping: popupStateMapping
8898      });
8899    }
8900  
8901    // node_modules/@base-ui/react/button/Button.mjs
8902    var React37 = __toESM(require_react(), 1);
8903    var Button3 = /* @__PURE__ */ React37.forwardRef(function Button4(componentProps, forwardedRef) {
8904      const {
8905        render,
8906        className,
8907        disabled: disabled2 = false,
8908        focusableWhenDisabled = false,
8909        nativeButton = true,
8910        style,
8911        ...elementProps
8912      } = componentProps;
8913      const {
8914        getButtonProps,
8915        buttonRef
8916      } = useButton({
8917        disabled: disabled2,
8918        focusableWhenDisabled,
8919        native: nativeButton
8920      });
8921      const state = {
8922        disabled: disabled2
8923      };
8924      return useRenderElement("button", componentProps, {
8925        state,
8926        ref: [forwardedRef, buttonRef],
8927        props: [elementProps, getButtonProps]
8928      });
8929    });
8930    if (true) Button3.displayName = "Button";
8931  
8932    // node_modules/@base-ui/react/collapsible/index.parts.mjs
8933    var index_parts_exports = {};
8934    __export(index_parts_exports, {
8935      Panel: () => CollapsiblePanel,
8936      Root: () => CollapsibleRoot,
8937      Trigger: () => CollapsibleTrigger
8938    });
8939  
8940    // node_modules/@base-ui/react/collapsible/root/CollapsibleRoot.mjs
8941    var React38 = __toESM(require_react(), 1);
8942  
8943    // node_modules/@base-ui/react/collapsible/root/stateAttributesMapping.mjs
8944    var collapsibleStateAttributesMapping = {
8945      ...collapsibleOpenStateMapping,
8946      ...transitionStatusMapping
8947    };
8948  
8949    // node_modules/@base-ui/react/collapsible/root/CollapsibleRoot.mjs
8950    var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
8951    var CollapsibleRoot = /* @__PURE__ */ React38.forwardRef(function CollapsibleRoot2(componentProps, forwardedRef) {
8952      const {
8953        render,
8954        className,
8955        defaultOpen = false,
8956        disabled: disabled2 = false,
8957        onOpenChange: onOpenChangeProp,
8958        open,
8959        style,
8960        ...elementProps
8961      } = componentProps;
8962      const onOpenChange = useStableCallback(onOpenChangeProp);
8963      const collapsible = useCollapsibleRoot({
8964        open,
8965        defaultOpen,
8966        onOpenChange,
8967        disabled: disabled2
8968      });
8969      const state = React38.useMemo(() => ({
8970        open: collapsible.open,
8971        disabled: collapsible.disabled,
8972        transitionStatus: collapsible.transitionStatus
8973      }), [collapsible.open, collapsible.disabled, collapsible.transitionStatus]);
8974      const contextValue = React38.useMemo(() => ({
8975        ...collapsible,
8976        onOpenChange,
8977        state
8978      }), [collapsible, onOpenChange, state]);
8979      const element = useRenderElement("div", componentProps, {
8980        state,
8981        ref: forwardedRef,
8982        props: elementProps,
8983        stateAttributesMapping: collapsibleStateAttributesMapping
8984      });
8985      return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CollapsibleRootContext.Provider, {
8986        value: contextValue,
8987        children: element
8988      });
8989    });
8990    if (true) CollapsibleRoot.displayName = "CollapsibleRoot";
8991  
8992    // node_modules/@base-ui/react/collapsible/trigger/CollapsibleTrigger.mjs
8993    var React39 = __toESM(require_react(), 1);
8994    var stateAttributesMapping = {
8995      ...triggerOpenStateMapping,
8996      ...transitionStatusMapping
8997    };
8998    var CollapsibleTrigger = /* @__PURE__ */ React39.forwardRef(function CollapsibleTrigger2(componentProps, forwardedRef) {
8999      const {
9000        panelId,
9001        open,
9002        handleTrigger,
9003        state,
9004        disabled: contextDisabled
9005      } = useCollapsibleRootContext();
9006      const {
9007        className,
9008        disabled: disabled2 = contextDisabled,
9009        render,
9010        nativeButton = true,
9011        style,
9012        ...elementProps
9013      } = componentProps;
9014      const {
9015        getButtonProps,
9016        buttonRef
9017      } = useButton({
9018        disabled: disabled2,
9019        focusableWhenDisabled: true,
9020        native: nativeButton
9021      });
9022      const element = useRenderElement("button", componentProps, {
9023        state,
9024        ref: [forwardedRef, buttonRef],
9025        props: [{
9026          "aria-controls": open ? panelId : void 0,
9027          "aria-expanded": open,
9028          onClick: handleTrigger
9029        }, elementProps, getButtonProps],
9030        stateAttributesMapping
9031      });
9032      return element;
9033    });
9034    if (true) CollapsibleTrigger.displayName = "CollapsibleTrigger";
9035  
9036    // node_modules/@base-ui/react/collapsible/panel/CollapsiblePanel.mjs
9037    var React40 = __toESM(require_react(), 1);
9038  
9039    // node_modules/@base-ui/react/collapsible/panel/CollapsiblePanelCssVars.mjs
9040    var CollapsiblePanelCssVars = /* @__PURE__ */ (function(CollapsiblePanelCssVars2) {
9041      CollapsiblePanelCssVars2["collapsiblePanelHeight"] = "--collapsible-panel-height";
9042      CollapsiblePanelCssVars2["collapsiblePanelWidth"] = "--collapsible-panel-width";
9043      return CollapsiblePanelCssVars2;
9044    })({});
9045  
9046    // node_modules/@base-ui/react/collapsible/panel/CollapsiblePanel.mjs
9047    var CollapsiblePanel = /* @__PURE__ */ React40.forwardRef(function CollapsiblePanel2(componentProps, forwardedRef) {
9048      const {
9049        className,
9050        hiddenUntilFound: hiddenUntilFoundProp,
9051        keepMounted: keepMountedProp,
9052        render,
9053        id: idProp,
9054        style,
9055        ...elementProps
9056      } = componentProps;
9057      if (true) {
9058        React40.useEffect(() => {
9059          if (hiddenUntilFoundProp && keepMountedProp === false) {
9060            warn("The `keepMounted={false}` prop on `Collapsible.Panel` is ignored when `hiddenUntilFound` is enabled, since the panel must remain mounted while closed.");
9061          }
9062        }, [hiddenUntilFoundProp, keepMountedProp]);
9063      }
9064      const {
9065        defaultPanelId,
9066        mounted,
9067        onOpenChange,
9068        open,
9069        setMounted,
9070        setPanelIdState,
9071        setOpen,
9072        state,
9073        transitionStatus
9074      } = useCollapsibleRootContext();
9075      const hiddenUntilFound = hiddenUntilFoundProp ?? false;
9076      const keepMounted = keepMountedProp ?? false;
9077      const registeredId = idProp || void 0;
9078      const id = registeredId ?? defaultPanelId;
9079      useIsoLayoutEffect(() => {
9080        setPanelIdState((currentId) => registeredId ?? (currentId === null ? void 0 : currentId));
9081        return () => {
9082          setPanelIdState((currentId) => currentId === registeredId ? null : currentId);
9083        };
9084      }, [registeredId, setPanelIdState]);
9085      const {
9086        height,
9087        props,
9088        ref,
9089        shouldPreventOpenAnimation,
9090        shouldRender,
9091        transitionStatus: panelTransitionStatus,
9092        width
9093      } = useCollapsiblePanel({
9094        externalRef: forwardedRef,
9095        hiddenUntilFound,
9096        id,
9097        keepMounted,
9098        mounted,
9099        onOpenChange,
9100        open,
9101        setMounted,
9102        setOpen,
9103        transitionStatus
9104      });
9105      const panelState = {
9106        ...state,
9107        transitionStatus: panelTransitionStatus
9108      };
9109      const resolvedStyle = resolveStyle(style, panelState);
9110      const element = useRenderElement("div", {
9111        ...componentProps,
9112        style: void 0
9113      }, {
9114        state: panelState,
9115        ref,
9116        props: [
9117          props,
9118          {
9119            style: {
9120              [CollapsiblePanelCssVars.collapsiblePanelHeight]: height === void 0 ? "auto" : `$height}px`,
9121              [CollapsiblePanelCssVars.collapsiblePanelWidth]: width === void 0 ? "auto" : `$width}px`
9122            }
9123          },
9124          elementProps,
9125          resolvedStyle ? {
9126            style: resolvedStyle
9127          } : void 0,
9128          // Resolve the public `style` prop so temporary `animationName: 'none'`
9129          // can still win after user's inline styles have been merged.
9130          shouldPreventOpenAnimation ? {
9131            style: {
9132              animationName: "none"
9133            }
9134          } : void 0
9135        ],
9136        stateAttributesMapping: collapsibleStateAttributesMapping
9137      });
9138      if (!shouldRender) {
9139        return null;
9140      }
9141      return element;
9142    });
9143    if (true) CollapsiblePanel.displayName = "CollapsiblePanel";
9144  
9145    // node_modules/@base-ui/react/utils/usePopupViewport.mjs
9146    var React44 = __toESM(require_react(), 1);
9147    var ReactDOM6 = __toESM(require_react_dom(), 1);
9148  
9149    // node_modules/@base-ui/utils/usePreviousValue.mjs
9150    var React41 = __toESM(require_react(), 1);
9151    function usePreviousValue(value) {
9152      const [state, setState] = React41.useState({
9153        current: value,
9154        previous: null
9155      });
9156      if (!Object.is(value, state.current)) {
9157        setState({
9158          current: value,
9159          previous: state.current
9160        });
9161      }
9162      return state.previous;
9163    }
9164  
9165    // node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
9166    var React42 = __toESM(require_react(), 1);
9167  
9168    // node_modules/@base-ui/react/utils/getCssDimensions.mjs
9169    function getCssDimensions2(element) {
9170      const css = getComputedStyle2(element);
9171      let width = parseFloat(css.width) || 0;
9172      let height = parseFloat(css.height) || 0;
9173      const hasOffset = isHTMLElement(element);
9174      const offsetWidth = hasOffset ? element.offsetWidth : width;
9175      const offsetHeight = hasOffset ? element.offsetHeight : height;
9176      const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
9177      if (shouldFallback) {
9178        width = offsetWidth;
9179        height = offsetHeight;
9180      }
9181      return {
9182        width,
9183        height
9184      };
9185    }
9186  
9187    // node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
9188    function usePopupAutoResize(parameters) {
9189      const {
9190        popupElement,
9191        positionerElement,
9192        content,
9193        mounted,
9194        onMeasureLayout: onMeasureLayoutParam,
9195        onMeasureLayoutComplete: onMeasureLayoutCompleteParam,
9196        side,
9197        direction
9198      } = parameters;
9199      const runOnceAnimationsFinish = useAnimationsFinished(popupElement, true);
9200      const animationFrame = useAnimationFrame();
9201      const committedDimensionsRef = React42.useRef(null);
9202      const isInitialRenderRef = React42.useRef(true);
9203      const restoreAnchoringStylesRef = React42.useRef(NOOP);
9204      const onMeasureLayout = useStableCallback(onMeasureLayoutParam);
9205      const onMeasureLayoutComplete = useStableCallback(onMeasureLayoutCompleteParam);
9206      const anchoringStyles = React42.useMemo(() => getPopupAnchoringStyles(side, direction), [side, direction]);
9207      useIsoLayoutEffect(() => {
9208        if (!mounted) {
9209          restoreAnchoringStylesRef.current = NOOP;
9210          isInitialRenderRef.current = true;
9211          committedDimensionsRef.current = null;
9212          return void 0;
9213        }
9214        if (!popupElement || !positionerElement) {
9215          return void 0;
9216        }
9217        restoreAnchoringStylesRef.current = applyElementStyles(popupElement, anchoringStyles);
9218        setPopupCssSize(popupElement, "auto");
9219        const restorePopupPosition = overrideElementStyle(popupElement, "position", "static");
9220        const restorePopupTransform = overrideElementStyle(popupElement, "transform", "none");
9221        const restorePopupScale = overrideElementStyle(popupElement, "scale", "1");
9222        const restorePositionerAvailableSize = applyElementStyles(positionerElement, {
9223          "--available-width": "max-content",
9224          "--available-height": "max-content"
9225        });
9226        function restoreMeasurementOverrides() {
9227          restorePopupPosition();
9228          restorePopupTransform();
9229          restorePositionerAvailableSize();
9230        }
9231        function restoreMeasurementOverridesIncludingScale() {
9232          restoreMeasurementOverrides();
9233          restorePopupScale();
9234        }
9235        onMeasureLayout?.();
9236        if (isInitialRenderRef.current || committedDimensionsRef.current === null) {
9237          setPositionerCssSize(positionerElement, "max-content");
9238          const dimensions = getCssDimensions2(popupElement);
9239          committedDimensionsRef.current = dimensions;
9240          setPositionerCssSize(positionerElement, dimensions);
9241          restoreMeasurementOverridesIncludingScale();
9242          onMeasureLayoutComplete?.(null, dimensions);
9243          isInitialRenderRef.current = false;
9244          return () => {
9245            restoreAnchoringStylesRef.current();
9246            restoreAnchoringStylesRef.current = NOOP;
9247          };
9248        }
9249        setPositionerCssSize(positionerElement, "max-content");
9250        const previousDimensions = committedDimensionsRef.current;
9251        const newDimensions = getCssDimensions2(popupElement);
9252        committedDimensionsRef.current = newDimensions;
9253        setPopupCssSize(popupElement, previousDimensions);
9254        restoreMeasurementOverridesIncludingScale();
9255        onMeasureLayoutComplete?.(previousDimensions, newDimensions);
9256        setPositionerCssSize(positionerElement, newDimensions);
9257        const abortController = new AbortController();
9258        animationFrame.request(() => {
9259          setPopupCssSize(popupElement, newDimensions);
9260          runOnceAnimationsFinish(() => {
9261            popupElement.style.setProperty("--popup-width", "auto");
9262            popupElement.style.setProperty("--popup-height", "auto");
9263          }, abortController.signal);
9264        });
9265        return () => {
9266          abortController.abort();
9267          animationFrame.cancel();
9268          restoreAnchoringStylesRef.current();
9269          restoreAnchoringStylesRef.current = NOOP;
9270        };
9271      }, [content, popupElement, positionerElement, runOnceAnimationsFinish, animationFrame, mounted, onMeasureLayout, onMeasureLayoutComplete, anchoringStyles]);
9272    }
9273    function getPopupAnchoringStyles(side, direction) {
9274      const isPhysicalTop = side === "top";
9275      const isPhysicalLeft = side === "left" || side === (direction === "rtl" ? "inline-end" : "inline-start");
9276      if (!isPhysicalTop && !isPhysicalLeft) {
9277        return EMPTY_OBJECT;
9278      }
9279      return {
9280        position: "absolute",
9281        [isPhysicalTop ? "bottom" : "top"]: "0",
9282        [isPhysicalLeft ? "right" : "left"]: "0"
9283      };
9284    }
9285    function overrideElementStyle(element, property, value) {
9286      const originalValue = element.style.getPropertyValue(property);
9287      element.style.setProperty(property, value);
9288      return () => {
9289        element.style.setProperty(property, originalValue);
9290      };
9291    }
9292    function applyElementStyles(element, styles) {
9293      const restorers = [];
9294      for (const [key, value] of Object.entries(styles)) {
9295        restorers.push(overrideElementStyle(element, key, value));
9296      }
9297      return restorers.length ? () => {
9298        restorers.forEach((restore) => restore());
9299      } : NOOP;
9300    }
9301    function setPopupCssSize(popupElement, size4) {
9302      const width = size4 === "auto" ? "auto" : `$size4.width}px`;
9303      const height = size4 === "auto" ? "auto" : `$size4.height}px`;
9304      popupElement.style.setProperty("--popup-width", width);
9305      popupElement.style.setProperty("--popup-height", height);
9306    }
9307    function setPositionerCssSize(positionerElement, size4) {
9308      const width = size4 === "max-content" ? "max-content" : `$size4.width}px`;
9309      const height = size4 === "max-content" ? "max-content" : `$size4.height}px`;
9310      positionerElement.style.setProperty("--positioner-width", width);
9311      positionerElement.style.setProperty("--positioner-height", height);
9312    }
9313  
9314    // node_modules/@base-ui/react/direction-provider/DirectionProvider.mjs
9315    var React43 = __toESM(require_react(), 1);
9316    var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
9317    var DirectionProvider = function DirectionProvider2(props) {
9318      const {
9319        direction = "ltr"
9320      } = props;
9321      const contextValue = React43.useMemo(() => ({
9322        direction
9323      }), [direction]);
9324      return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DirectionContext.Provider, {
9325        value: contextValue,
9326        children: props.children
9327      });
9328    };
9329    if (true) DirectionProvider.displayName = "DirectionProvider";
9330  
9331    // node_modules/@base-ui/react/utils/adaptiveOriginMiddleware.mjs
9332    var adaptiveOrigin = {
9333      name: "adaptiveOrigin",
9334      async fn(state) {
9335        const {
9336          x: rawX,
9337          y: rawY,
9338          rects: {
9339            floating: floatRect
9340          },
9341          elements: {
9342            floating
9343          },
9344          platform: platform3,
9345          strategy,
9346          placement
9347        } = state;
9348        const win = getWindow(floating);
9349        const styles = win.getComputedStyle(floating);
9350        const hasTransition = styles.transitionDuration !== "0s" && styles.transitionDuration !== "";
9351        if (!hasTransition) {
9352          return {
9353            x: rawX,
9354            y: rawY,
9355            data: DEFAULT_SIDES
9356          };
9357        }
9358        const offsetParent = await platform3.getOffsetParent?.(floating);
9359        let offsetDimensions = {
9360          width: 0,
9361          height: 0
9362        };
9363        if (strategy === "fixed" && win?.visualViewport) {
9364          offsetDimensions = {
9365            width: win.visualViewport.width,
9366            height: win.visualViewport.height
9367          };
9368        } else if (offsetParent === win) {
9369          const doc = ownerDocument(floating);
9370          offsetDimensions = {
9371            width: doc.documentElement.clientWidth,
9372            height: doc.documentElement.clientHeight
9373          };
9374        } else if (await platform3.isElement?.(offsetParent)) {
9375          offsetDimensions = await platform3.getDimensions(offsetParent);
9376        }
9377        const currentSide = getSide(placement);
9378        let x = rawX;
9379        let y = rawY;
9380        if (currentSide === "left") {
9381          x = offsetDimensions.width - (rawX + floatRect.width);
9382        }
9383        if (currentSide === "top") {
9384          y = offsetDimensions.height - (rawY + floatRect.height);
9385        }
9386        const sideX = currentSide === "left" ? "right" : DEFAULT_SIDES.sideX;
9387        const sideY = currentSide === "top" ? "bottom" : DEFAULT_SIDES.sideY;
9388        return {
9389          x,
9390          y,
9391          data: {
9392            sideX,
9393            sideY
9394          }
9395        };
9396      }
9397    };
9398  
9399    // node_modules/@base-ui/react/utils/usePopupViewport.mjs
9400    var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
9401    var popupViewportStateMapping = {
9402      activationDirection: (value) => value ? {
9403        "data-activation-direction": value
9404      } : null
9405    };
9406    function usePopupViewport(parameters) {
9407      const {
9408        store: store3,
9409        side,
9410        children
9411      } = parameters;
9412      const direction = useDirection();
9413      const activeTrigger = store3.useState("activeTriggerElement");
9414      const activeTriggerId = store3.useState("activeTriggerId");
9415      const open = store3.useState("open");
9416      const payload = store3.useState("payload");
9417      const mounted = store3.useState("mounted");
9418      const popupElement = store3.useState("popupElement");
9419      const positionerElement = store3.useState("positionerElement");
9420      const previousActiveTrigger = usePreviousValue(open ? activeTrigger : null);
9421      const currentContentKey = usePopupContentKey(activeTriggerId, payload);
9422      const capturedNodeRef = React44.useRef(null);
9423      const [previousContentNode, setPreviousContentNode] = React44.useState(null);
9424      const [newTriggerOffset, setNewTriggerOffset] = React44.useState(null);
9425      const currentContainerRef = React44.useRef(null);
9426      const previousContainerRef = React44.useRef(null);
9427      const onAnimationsFinished = useAnimationsFinished(currentContainerRef, true);
9428      const cleanupFrame = useAnimationFrame();
9429      const cleanupControllerRef = React44.useRef(null);
9430      const [previousContentDimensions, setPreviousContentDimensions] = React44.useState(null);
9431      const [showStartingStyleAttribute, setShowStartingStyleAttribute] = React44.useState(false);
9432      useIsoLayoutEffect(() => {
9433        store3.set("adaptiveOrigin", adaptiveOrigin);
9434        return () => {
9435          store3.set("adaptiveOrigin", void 0);
9436        };
9437      }, [store3]);
9438      const handleMeasureLayout = useStableCallback(() => {
9439        currentContainerRef.current?.style.setProperty("animation", "none");
9440        currentContainerRef.current?.style.setProperty("transition", "none");
9441        previousContainerRef.current?.style.setProperty("display", "none");
9442      });
9443      const handleMeasureLayoutComplete = useStableCallback((previousDimensions) => {
9444        currentContainerRef.current?.style.removeProperty("animation");
9445        currentContainerRef.current?.style.removeProperty("transition");
9446        previousContainerRef.current?.style.removeProperty("display");
9447        if (previousDimensions) {
9448          setPreviousContentDimensions(previousDimensions);
9449        }
9450      });
9451      const armViewportCleanup = useStableCallback(() => {
9452        cleanupControllerRef.current?.abort();
9453        const controller = new AbortController();
9454        cleanupControllerRef.current = controller;
9455        onAnimationsFinished(() => {
9456          setPreviousContentNode(null);
9457          setPreviousContentDimensions(null);
9458          capturedNodeRef.current = null;
9459        }, controller.signal);
9460      });
9461      const lastHandledTriggerRef = React44.useRef(null);
9462      useIsoLayoutEffect(() => {
9463        if (!open || !mounted) {
9464          lastHandledTriggerRef.current = null;
9465        }
9466      }, [open, mounted]);
9467      useIsoLayoutEffect(() => {
9468        if (activeTrigger && previousActiveTrigger && activeTrigger !== previousActiveTrigger && lastHandledTriggerRef.current !== activeTrigger && capturedNodeRef.current) {
9469          setPreviousContentNode(capturedNodeRef.current);
9470          setShowStartingStyleAttribute(true);
9471          const offset4 = calculateRelativePosition(previousActiveTrigger, activeTrigger);
9472          setNewTriggerOffset(offset4);
9473          lastHandledTriggerRef.current = activeTrigger;
9474        }
9475      }, [activeTrigger, previousActiveTrigger]);
9476      useIsoLayoutEffect(() => {
9477        if (previousContentNode == null) {
9478          return;
9479        }
9480        cleanupControllerRef.current?.abort();
9481        setShowStartingStyleAttribute(true);
9482        cleanupFrame.request(() => {
9483          ReactDOM6.flushSync(() => {
9484            setShowStartingStyleAttribute(false);
9485          });
9486          armViewportCleanup();
9487        });
9488      }, [currentContentKey, previousContentNode, armViewportCleanup, cleanupFrame]);
9489      useIsoLayoutEffect(() => {
9490        const source = currentContainerRef.current;
9491        if (!source) {
9492          return;
9493        }
9494        const wrapper = ownerDocument(source).createElement("div");
9495        for (const child of Array.from(source.childNodes)) {
9496          wrapper.appendChild(child.cloneNode(true));
9497        }
9498        capturedNodeRef.current = wrapper;
9499      });
9500      const isTransitioning = previousContentNode != null;
9501      let childrenToRender;
9502      if (!isTransitioning) {
9503        childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
9504          "data-current": true,
9505          ref: currentContainerRef,
9506          children
9507        }, currentContentKey);
9508      } else {
9509        childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(React44.Fragment, {
9510          children: [/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
9511            "data-previous": true,
9512            inert: inertValue(true),
9513            ref: previousContainerRef,
9514            style: {
9515              ...previousContentDimensions ? {
9516                "--popup-width": `$previousContentDimensions.width}px`,
9517                "--popup-height": `$previousContentDimensions.height}px`
9518              } : null,
9519              position: "absolute"
9520            },
9521            "data-ending-style": showStartingStyleAttribute ? void 0 : ""
9522          }, "previous"), /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
9523            "data-current": true,
9524            ref: currentContainerRef,
9525            "data-starting-style": showStartingStyleAttribute ? "" : void 0,
9526            children
9527          }, currentContentKey)]
9528        });
9529      }
9530      useIsoLayoutEffect(() => {
9531        const container = previousContainerRef.current;
9532        if (!container || !previousContentNode) {
9533          return;
9534        }
9535        container.replaceChildren(...Array.from(previousContentNode.childNodes));
9536      }, [previousContentNode]);
9537      usePopupAutoResize({
9538        popupElement,
9539        positionerElement,
9540        mounted,
9541        content: payload,
9542        onMeasureLayout: handleMeasureLayout,
9543        onMeasureLayoutComplete: handleMeasureLayoutComplete,
9544        side,
9545        direction
9546      });
9547      const state = {
9548        activationDirection: getActivationDirection(newTriggerOffset),
9549        transitioning: isTransitioning
9550      };
9551      return {
9552        children: childrenToRender,
9553        state
9554      };
9555    }
9556    function getActivationDirection(offset4) {
9557      if (!offset4) {
9558        return void 0;
9559      }
9560      return `$getValueWithTolerance(offset4.horizontal, 5, "right", "left")} $getValueWithTolerance(offset4.vertical, 5, "down", "up")}`;
9561    }
9562    function getValueWithTolerance(value, tolerance, positiveLabel, negativeLabel) {
9563      if (value > tolerance) {
9564        return positiveLabel;
9565      }
9566      if (value < -tolerance) {
9567        return negativeLabel;
9568      }
9569      return "";
9570    }
9571    function calculateRelativePosition(from, to) {
9572      const fromRect = from.getBoundingClientRect();
9573      const toRect = to.getBoundingClientRect();
9574      const fromCenter = {
9575        x: fromRect.left + fromRect.width / 2,
9576        y: fromRect.top + fromRect.height / 2
9577      };
9578      const toCenter = {
9579        x: toRect.left + toRect.width / 2,
9580        y: toRect.top + toRect.height / 2
9581      };
9582      return {
9583        horizontal: toCenter.x - fromCenter.x,
9584        vertical: toCenter.y - fromCenter.y
9585      };
9586    }
9587    function usePopupContentKey(activeTriggerId, payload) {
9588      const [contentKey, setContentKey] = React44.useState(0);
9589      const previousActiveTriggerIdRef = React44.useRef(activeTriggerId);
9590      const previousPayloadRef = React44.useRef(payload);
9591      const pendingPayloadUpdateRef = React44.useRef(false);
9592      useIsoLayoutEffect(() => {
9593        const previousActiveTriggerId = previousActiveTriggerIdRef.current;
9594        const previousPayload = previousPayloadRef.current;
9595        const triggerIdChanged = activeTriggerId !== previousActiveTriggerId;
9596        const payloadChanged = payload !== previousPayload;
9597        if (triggerIdChanged) {
9598          setContentKey((value) => value + 1);
9599          pendingPayloadUpdateRef.current = !payloadChanged;
9600        } else if (pendingPayloadUpdateRef.current && payloadChanged) {
9601          setContentKey((value) => value + 1);
9602          pendingPayloadUpdateRef.current = false;
9603        }
9604        previousActiveTriggerIdRef.current = activeTriggerId;
9605        previousPayloadRef.current = payload;
9606      }, [activeTriggerId, payload]);
9607      return `$activeTriggerId ?? "current"}-$contentKey}`;
9608    }
9609  
9610    // node_modules/@base-ui/react/utils/FloatingPortalLite.mjs
9611    var React45 = __toESM(require_react(), 1);
9612    var ReactDOM7 = __toESM(require_react_dom(), 1);
9613    var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
9614    var FloatingPortalLite = /* @__PURE__ */ React45.forwardRef(function FloatingPortalLite2(componentProps, forwardedRef) {
9615      const {
9616        children,
9617        container,
9618        className,
9619        render,
9620        style,
9621        ...elementProps
9622      } = componentProps;
9623      const {
9624        node: portalNode,
9625        subtree: portalSubtree
9626      } = useFloatingPortalNode({
9627        container,
9628        ref: forwardedRef,
9629        componentProps,
9630        elementProps
9631      });
9632      if (!portalSubtree && !portalNode) {
9633        return null;
9634      }
9635      return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(React45.Fragment, {
9636        children: [portalSubtree, portalNode && /* @__PURE__ */ ReactDOM7.createPortal(children, portalNode)]
9637      });
9638    });
9639    if (true) FloatingPortalLite.displayName = "FloatingPortalLite";
9640  
9641    // node_modules/@base-ui/react/tooltip/index.parts.mjs
9642    var index_parts_exports2 = {};
9643    __export(index_parts_exports2, {
9644      Arrow: () => TooltipArrow,
9645      Handle: () => TooltipHandle,
9646      Popup: () => TooltipPopup,
9647      Portal: () => TooltipPortal,
9648      Positioner: () => TooltipPositioner,
9649      Provider: () => TooltipProvider,
9650      Root: () => TooltipRoot,
9651      Trigger: () => TooltipTrigger,
9652      Viewport: () => TooltipViewport,
9653      createHandle: () => createTooltipHandle
9654    });
9655  
9656    // node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
9657    var React48 = __toESM(require_react(), 1);
9658  
9659    // node_modules/@base-ui/react/tooltip/root/TooltipRootContext.mjs
9660    var React46 = __toESM(require_react(), 1);
9661    var TooltipRootContext = /* @__PURE__ */ React46.createContext(void 0);
9662    if (true) TooltipRootContext.displayName = "TooltipRootContext";
9663    function useTooltipRootContext(optional) {
9664      const context = React46.useContext(TooltipRootContext);
9665      if (context === void 0 && !optional) {
9666        throw new Error(true ? "Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>." : formatErrorMessage_default(72));
9667      }
9668      return context;
9669    }
9670  
9671    // node_modules/@base-ui/react/tooltip/store/TooltipStore.mjs
9672    var React47 = __toESM(require_react(), 1);
9673    var selectors2 = {
9674      ...popupStoreSelectors,
9675      disabled: (state) => state.disabled,
9676      instantType: (state) => state.instantType,
9677      isInstantPhase: (state) => state.isInstantPhase,
9678      trackCursorAxis: (state) => state.trackCursorAxis,
9679      disableHoverablePopup: (state) => state.disableHoverablePopup,
9680      lastOpenChangeReason: (state) => state.openChangeReason,
9681      closeOnClick: (state) => state.closeOnClick,
9682      closeDelay: (state) => state.closeDelay,
9683      adaptiveOrigin: (state) => state.adaptiveOrigin
9684    };
9685    var TooltipStore = class extends ReactStore {
9686      constructor(initialState, floatingId, nested) {
9687        const triggerElements = new PopupTriggerMap();
9688        super(createInitialState(initialState, triggerElements, floatingId, nested), createInitialContext(triggerElements), selectors2);
9689      }
9690      setOpen = (nextOpen, eventDetails) => {
9691        applyPopupOpenChange(this, nextOpen, eventDetails, {
9692          extraState: {
9693            openChangeReason: eventDetails.reason
9694          }
9695        });
9696      };
9697      // Used by trigger clicks to clear a delayed hover open without reporting a public open-state change.
9698      cancelPendingOpen(event) {
9699        this.state.floatingRootContext.dispatchOpenChange(false, createChangeEventDetails(reason_parts_exports.triggerPress, event));
9700      }
9701    };
9702    function createNullTooltipStore() {
9703      const triggerElements = new PopupTriggerMap();
9704      const store3 = new NullStore(Object.freeze(createInitialState(void 0, triggerElements)), Object.freeze(createInitialContext(triggerElements)), selectors2);
9705      return Object.assign(store3, {
9706        setOpen: NOOP,
9707        cancelPendingOpen: NOOP
9708      });
9709    }
9710    function createInitialState(initialState, triggerElements, floatingId, nested = false) {
9711      const state = {
9712        ...createInitialPopupStoreState(),
9713        disabled: false,
9714        instantType: void 0,
9715        isInstantPhase: false,
9716        trackCursorAxis: "none",
9717        disableHoverablePopup: false,
9718        openChangeReason: null,
9719        closeOnClick: true,
9720        closeDelay: 0,
9721        adaptiveOrigin: void 0,
9722        ...initialState
9723      };
9724      state.floatingRootContext = createPopupFloatingRootContext(triggerElements, floatingId, nested);
9725      return state;
9726    }
9727    function createInitialContext(triggerElements) {
9728      return {
9729        popupRef: /* @__PURE__ */ React47.createRef(),
9730        onOpenChange: void 0,
9731        onOpenChangeComplete: void 0,
9732        triggerElements
9733      };
9734    }
9735  
9736    // node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
9737    var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
9738    var TooltipRoot = fastComponent(function TooltipRoot2(props) {
9739      const {
9740        disabled: disabled2 = false,
9741        defaultOpen = false,
9742        open: openProp,
9743        disableHoverablePopup = false,
9744        trackCursorAxis = "none",
9745        actionsRef,
9746        onOpenChange,
9747        onOpenChangeComplete,
9748        handle,
9749        triggerId: triggerIdProp,
9750        defaultTriggerId: defaultTriggerIdProp = null,
9751        children
9752      } = props;
9753      const store3 = usePopupRootStore((floatingId, nested) => new TooltipStore({
9754        open: defaultOpen,
9755        openProp,
9756        activeTriggerId: defaultTriggerIdProp,
9757        triggerIdProp
9758      }, floatingId, nested));
9759      store3.useControlledProp("openProp", openProp);
9760      store3.useControlledProp("triggerIdProp", triggerIdProp);
9761      store3.useContextCallback("onOpenChange", onOpenChange);
9762      store3.useContextCallback("onOpenChangeComplete", onOpenChangeComplete);
9763      const openState = store3.useState("open");
9764      const open = !disabled2 && openState;
9765      const activeTriggerId = store3.useState("activeTriggerId");
9766      const mounted = store3.useState("mounted");
9767      const payload = store3.useState("payload");
9768      store3.useSyncedValues({
9769        trackCursorAxis,
9770        disableHoverablePopup,
9771        disabled: disabled2
9772      });
9773      useImplicitActiveTrigger(store3, {
9774        closeOnActiveTriggerUnmount: true
9775      });
9776      const {
9777        forceUnmount,
9778        transitionStatus
9779      } = useOpenStateTransitions(open, store3);
9780      const isInstantPhase = store3.useState("isInstantPhase");
9781      const instantType = store3.useState("instantType");
9782      const lastOpenChangeReason = store3.useState("lastOpenChangeReason");
9783      const previousInstantTypeRef = React48.useRef(null);
9784      useIsoLayoutEffect(() => {
9785        if (openState && disabled2) {
9786          store3.setOpen(false, createChangeEventDetails(reason_parts_exports.disabled));
9787        }
9788      }, [openState, disabled2, store3]);
9789      useIsoLayoutEffect(() => {
9790        if (transitionStatus === "ending" && lastOpenChangeReason === reason_parts_exports.none || transitionStatus !== "ending" && isInstantPhase) {
9791          if (instantType !== "delay") {
9792            previousInstantTypeRef.current = instantType;
9793          }
9794          store3.set("instantType", "delay");
9795        } else if (previousInstantTypeRef.current !== null) {
9796          store3.set("instantType", previousInstantTypeRef.current);
9797          previousInstantTypeRef.current = null;
9798        }
9799      }, [transitionStatus, isInstantPhase, lastOpenChangeReason, instantType, store3]);
9800      useIsoLayoutEffect(() => {
9801        if (open) {
9802          if (activeTriggerId == null) {
9803            store3.set("payload", void 0);
9804          }
9805        }
9806      }, [store3, activeTriggerId, open]);
9807      React48.useImperativeHandle(actionsRef, () => ({
9808        unmount: forceUnmount,
9809        close: () => store3.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction))
9810      }), [forceUnmount, store3]);
9811      const shouldRenderInteractions = open || mounted || !disabled2 && trackCursorAxis !== "none";
9812      return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(TooltipRootContext.Provider, {
9813        value: store3,
9814        children: [handle && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PopupHandleAttachment, {
9815          handle,
9816          store: store3
9817        }), shouldRenderInteractions && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TooltipInteractions, {
9818          store: store3,
9819          disabled: disabled2,
9820          trackCursorAxis
9821        }), typeof children === "function" ? children({
9822          payload
9823        }) : children]
9824      });
9825    });
9826    if (true) TooltipRoot.displayName = "TooltipRoot";
9827    function TooltipInteractions({
9828      store: store3,
9829      disabled: disabled2,
9830      trackCursorAxis
9831    }) {
9832      const floatingRootContext = store3.useState("floatingRootContext");
9833      const dismiss = useDismiss(floatingRootContext, {
9834        enabled: !disabled2,
9835        referencePress: () => store3.select("closeOnClick")
9836      });
9837      const clientPoint = useClientPoint(floatingRootContext, {
9838        enabled: !disabled2 && trackCursorAxis !== "none",
9839        axis: trackCursorAxis === "none" ? void 0 : trackCursorAxis
9840      });
9841      const triggerProps = React48.useMemo(() => mergeProps(clientPoint.reference, dismiss.reference), [clientPoint.reference, dismiss.reference]);
9842      usePopupInteractionProps(store3, {
9843        activeTriggerProps: triggerProps,
9844        inactiveTriggerProps: triggerProps,
9845        popupProps: dismiss.floating ?? EMPTY_OBJECT
9846      });
9847      return null;
9848    }
9849  
9850    // node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
9851    var React50 = __toESM(require_react(), 1);
9852  
9853    // node_modules/@base-ui/react/tooltip/provider/TooltipProviderContext.mjs
9854    var React49 = __toESM(require_react(), 1);
9855    var TooltipProviderContext = /* @__PURE__ */ React49.createContext(void 0);
9856    if (true) TooltipProviderContext.displayName = "TooltipProviderContext";
9857    function useTooltipProviderContext() {
9858      return React49.useContext(TooltipProviderContext);
9859    }
9860  
9861    // node_modules/@base-ui/react/tooltip/utils/constants.mjs
9862    var OPEN_DELAY = 600;
9863  
9864    // node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
9865    var TOOLTIP_TRIGGER_IDENTIFIER = "data-base-ui-tooltip-trigger";
9866    function getTargetElement(event) {
9867      if ("composedPath" in event) {
9868        const path = event.composedPath();
9869        for (let i = 0; i < path.length; i += 1) {
9870          const element = path[i];
9871          if (isElement(element)) {
9872            return element;
9873          }
9874        }
9875      }
9876      const target = event.target;
9877      if (isElement(target)) {
9878        return target;
9879      }
9880      return null;
9881    }
9882    function closestEnabledTooltipTrigger(element) {
9883      let current = element;
9884      while (current) {
9885        const trigger = current.closest(`[$TOOLTIP_TRIGGER_IDENTIFIER}]`);
9886        if (trigger) {
9887          return trigger;
9888        }
9889        const root = current.getRootNode();
9890        current = "host" in root && isElement(root.host) ? root.host : null;
9891      }
9892      return null;
9893    }
9894    var TooltipTrigger = fastComponentRef(function TooltipTrigger2(componentProps, forwardedRef) {
9895      const {
9896        render,
9897        className,
9898        style,
9899        handle,
9900        payload,
9901        disabled: disabledProp,
9902        delay,
9903        closeOnClick = true,
9904        closeDelay,
9905        id: idProp,
9906        ...elementProps
9907      } = componentProps;
9908      const rootContext = useTooltipRootContext(true);
9909      const handleStore = usePopupHandleStore(handle);
9910      const store3 = handleStore ?? rootContext;
9911      if (!store3) {
9912        throw new Error(true ? "Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle." : formatErrorMessage_default(82));
9913      }
9914      const thisTriggerId = useBaseUiId(idProp);
9915      const isTriggerActive = store3.useState("isTriggerActive", thisTriggerId);
9916      const isOpenedByThisTrigger = store3.useState("isOpenedByTrigger", thisTriggerId);
9917      const floatingRootContext = store3.useState("floatingRootContext");
9918      const triggerElementRef = React50.useRef(null);
9919      const delayWithDefault = delay ?? OPEN_DELAY;
9920      const closeDelayWithDefault = closeDelay ?? 0;
9921      const {
9922        registerTrigger,
9923        isMountedByThisTrigger
9924      } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store3, {
9925        payload,
9926        closeOnClick,
9927        closeDelay: closeDelayWithDefault
9928      });
9929      const providerDelay = useTooltipProviderContext();
9930      const {
9931        delayRef,
9932        isInstantPhase,
9933        hasProvider
9934      } = useDelayGroup(floatingRootContext, {
9935        open: isOpenedByThisTrigger
9936      });
9937      const hoverInteraction = useHoverInteractionSharedState(floatingRootContext);
9938      store3.useSyncedValue("isInstantPhase", isInstantPhase);
9939      const rootDisabled = store3.useState("disabled");
9940      const disabled2 = disabledProp ?? rootDisabled;
9941      const disabledRef = useValueAsRef(disabled2);
9942      const trackCursorAxis = store3.useState("trackCursorAxis");
9943      const disableHoverablePopup = store3.useState("disableHoverablePopup");
9944      const isNestedTriggerHoveredRef = React50.useRef(false);
9945      const nestedTriggerOpenTimeout = useTimeout();
9946      const pointerTypeRef = React50.useRef(void 0);
9947      function getOpenDelay() {
9948        if (!hasProvider) {
9949          return delayWithDefault;
9950        }
9951        return getDelay(delayRef.current, "open") === 0 ? 0 : delay ?? providerDelay ?? OPEN_DELAY;
9952      }
9953      function isEnabledNestedTriggerTarget(target) {
9954        const triggerEl = triggerElementRef.current;
9955        if (!triggerEl || !target) {
9956          return false;
9957        }
9958        const nearestTrigger = closestEnabledTooltipTrigger(target);
9959        return nearestTrigger !== null && nearestTrigger !== triggerEl && contains(triggerEl, nearestTrigger);
9960      }
9961      function detectNestedTriggerHover(target) {
9962        const nestedTriggerHovered = isEnabledNestedTriggerTarget(target);
9963        isNestedTriggerHoveredRef.current = nestedTriggerHovered;
9964        if (nestedTriggerHovered) {
9965          hoverInteraction.openChangeTimeout.clear();
9966          hoverInteraction.restTimeout.clear();
9967          hoverInteraction.restTimeoutPending = false;
9968          nestedTriggerOpenTimeout.clear();
9969        }
9970        return nestedTriggerHovered;
9971      }
9972      const hoverProps = useHoverReferenceInteraction(floatingRootContext, {
9973        enabled: !disabled2,
9974        mouseOnly: true,
9975        move: false,
9976        handleClose: !disableHoverablePopup && trackCursorAxis !== "both" ? safePolygon() : null,
9977        restMs: getOpenDelay,
9978        delay() {
9979          if (closeDelay == null && hasProvider) {
9980            return {
9981              close: getDelay(delayRef.current, "close")
9982            };
9983          }
9984          return {
9985            close: closeDelayWithDefault
9986          };
9987        },
9988        triggerElementRef,
9989        isActiveTrigger: isTriggerActive,
9990        isClosing: () => store3.select("transitionStatus") === "ending",
9991        shouldOpen() {
9992          return !isNestedTriggerHoveredRef.current;
9993        }
9994      });
9995      const focusProps = useFocus(floatingRootContext, {
9996        enabled: !disabled2
9997      }).reference;
9998      const handleNestedTriggerHover = (event) => {
9999        const wasNestedTriggerHovered = isNestedTriggerHoveredRef.current;
10000        const target = getTargetElement(event);
10001        const nestedTriggerHovered = detectNestedTriggerHover(target);
10002        const triggerEl = triggerElementRef.current;
10003        const targetInsideTrigger = triggerEl && target && contains(triggerEl, target);
10004        if (nestedTriggerHovered && store3.select("open") && store3.select("lastOpenChangeReason") === reason_parts_exports.triggerHover) {
10005          store3.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
10006          return;
10007        }
10008        if (wasNestedTriggerHovered && !nestedTriggerHovered && targetInsideTrigger && !disabledRef.current && !store3.select("open") && triggerEl && // Match the hover hook's non-strict mouse fallback for mouse-only event sequences.
10009        isMouseLikePointerType(pointerTypeRef.current)) {
10010          const open = () => {
10011            if (!isNestedTriggerHoveredRef.current && !disabledRef.current && !store3.select("open")) {
10012              store3.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerEl));
10013            }
10014          };
10015          const openDelay = getOpenDelay();
10016          if (openDelay === 0) {
10017            nestedTriggerOpenTimeout.clear();
10018            open();
10019          } else {
10020            nestedTriggerOpenTimeout.start(openDelay, open);
10021          }
10022        }
10023      };
10024      const rootTriggerProps = store3.useState("triggerProps", isMountedByThisTrigger);
10025      const shouldApplyRootTriggerProps = isMountedByThisTrigger || trackCursorAxis !== "none";
10026      const state = {
10027        open: isOpenedByThisTrigger
10028      };
10029      const element = useRenderElement("button", componentProps, {
10030        state,
10031        ref: [forwardedRef, registerTrigger, triggerElementRef],
10032        props: [hoverProps, focusProps, shouldApplyRootTriggerProps ? rootTriggerProps : void 0, {
10033          onMouseOver(event) {
10034            handleNestedTriggerHover(event.nativeEvent);
10035          },
10036          onFocus(event) {
10037            if (isEnabledNestedTriggerTarget(getTargetElement(event.nativeEvent))) {
10038              event.preventBaseUIHandler();
10039            }
10040          },
10041          onMouseLeave() {
10042            isNestedTriggerHoveredRef.current = false;
10043            nestedTriggerOpenTimeout.clear();
10044            pointerTypeRef.current = void 0;
10045          },
10046          onPointerEnter(event) {
10047            pointerTypeRef.current = event.pointerType;
10048          },
10049          onPointerDown(event) {
10050            pointerTypeRef.current = event.pointerType;
10051            store3.set("closeOnClick", closeOnClick);
10052            if (closeOnClick && !store3.select("open")) {
10053              store3.cancelPendingOpen(event.nativeEvent);
10054            }
10055          },
10056          onClick(event) {
10057            if (closeOnClick && !store3.select("open")) {
10058              store3.cancelPendingOpen(event.nativeEvent);
10059            }
10060          },
10061          id: thisTriggerId,
10062          "data-trigger-disabled": disabled2 ? "" : void 0,
10063          [TOOLTIP_TRIGGER_IDENTIFIER]: disabled2 ? void 0 : ""
10064        }, elementProps],
10065        stateAttributesMapping: triggerOpenStateMapping2
10066      });
10067      return element;
10068    });
10069    if (true) TooltipTrigger.displayName = "TooltipTrigger";
10070  
10071    // node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
10072    var React52 = __toESM(require_react(), 1);
10073  
10074    // node_modules/@base-ui/react/tooltip/portal/TooltipPortalContext.mjs
10075    var React51 = __toESM(require_react(), 1);
10076    var TooltipPortalContext = /* @__PURE__ */ React51.createContext(void 0);
10077    if (true) TooltipPortalContext.displayName = "TooltipPortalContext";
10078    function useTooltipPortalContext() {
10079      const value = React51.useContext(TooltipPortalContext);
10080      if (value === void 0) {
10081        throw new Error(true ? "Base UI: <Tooltip.Portal> is missing." : formatErrorMessage_default(70));
10082      }
10083      return value;
10084    }
10085  
10086    // node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
10087    var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
10088    var TooltipPortal = /* @__PURE__ */ React52.forwardRef(function TooltipPortal2(props, forwardedRef) {
10089      const {
10090        keepMounted = false,
10091        ...portalProps
10092      } = props;
10093      const store3 = useTooltipRootContext();
10094      const mounted = store3.useState("mounted");
10095      const shouldRender = mounted || keepMounted;
10096      if (!shouldRender) {
10097        return null;
10098      }
10099      return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TooltipPortalContext.Provider, {
10100        value: keepMounted,
10101        children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(FloatingPortalLite, {
10102          ref: forwardedRef,
10103          ...portalProps
10104        })
10105      });
10106    });
10107    if (true) TooltipPortal.displayName = "TooltipPortal";
10108  
10109    // node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
10110    var React54 = __toESM(require_react(), 1);
10111  
10112    // node_modules/@base-ui/react/tooltip/positioner/TooltipPositionerContext.mjs
10113    var React53 = __toESM(require_react(), 1);
10114    var TooltipPositionerContext = /* @__PURE__ */ React53.createContext(void 0);
10115    if (true) TooltipPositionerContext.displayName = "TooltipPositionerContext";
10116    function useTooltipPositionerContext() {
10117      const context = React53.useContext(TooltipPositionerContext);
10118      if (context === void 0) {
10119        throw new Error(true ? "Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>." : formatErrorMessage_default(71));
10120      }
10121      return context;
10122    }
10123  
10124    // node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
10125    var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
10126    var TooltipPositioner = /* @__PURE__ */ React54.forwardRef(function TooltipPositioner2(componentProps, forwardedRef) {
10127      const {
10128        render,
10129        className,
10130        anchor,
10131        positionMethod = "absolute",
10132        side = "top",
10133        align = "center",
10134        sideOffset = 0,
10135        alignOffset = 0,
10136        collisionBoundary = "clipping-ancestors",
10137        collisionPadding = 5,
10138        arrowPadding = 5,
10139        sticky = false,
10140        disableAnchorTracking = false,
10141        collisionAvoidance = POPUP_COLLISION_AVOIDANCE,
10142        style,
10143        ...elementProps
10144      } = componentProps;
10145      const store3 = useTooltipRootContext();
10146      const keepMounted = useTooltipPortalContext();
10147      const open = store3.useState("open");
10148      const mounted = store3.useState("mounted");
10149      const trackCursorAxis = store3.useState("trackCursorAxis");
10150      const disableHoverablePopup = store3.useState("disableHoverablePopup");
10151      const floatingRootContext = store3.useState("floatingRootContext");
10152      const instantType = store3.useState("instantType");
10153      const transitionStatus = store3.useState("transitionStatus");
10154      const adaptiveOrigin2 = store3.useState("adaptiveOrigin");
10155      const positioning = useAnchorPositioning({
10156        anchor,
10157        positionMethod,
10158        floatingRootContext,
10159        mounted,
10160        side,
10161        sideOffset,
10162        align,
10163        alignOffset,
10164        collisionBoundary,
10165        collisionPadding,
10166        sticky,
10167        arrowPadding,
10168        disableAnchorTracking,
10169        keepMounted,
10170        collisionAvoidance,
10171        adaptiveOrigin: adaptiveOrigin2
10172      });
10173      const state = React54.useMemo(() => ({
10174        open,
10175        side: positioning.side,
10176        align: positioning.align,
10177        anchorHidden: positioning.anchorHidden,
10178        instant: trackCursorAxis !== "none" ? "tracking-cursor" : instantType
10179      }), [open, positioning.side, positioning.align, positioning.anchorHidden, trackCursorAxis, instantType]);
10180      const element = usePositioner(componentProps, state, {
10181        styles: positioning.positionerStyles,
10182        transitionStatus,
10183        props: elementProps,
10184        refs: [forwardedRef, store3.useStateSetter("positionerElement")],
10185        hidden: !mounted,
10186        inert: !open || trackCursorAxis === "both" || disableHoverablePopup
10187      });
10188      return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipPositionerContext.Provider, {
10189        value: positioning,
10190        children: element
10191      });
10192    });
10193    if (true) TooltipPositioner.displayName = "TooltipPositioner";
10194  
10195    // node_modules/@base-ui/react/tooltip/popup/TooltipPopup.mjs
10196    var React55 = __toESM(require_react(), 1);
10197    var TooltipPopup = /* @__PURE__ */ React55.forwardRef(function TooltipPopup2(componentProps, forwardedRef) {
10198      const {
10199        render,
10200        className,
10201        style,
10202        ...elementProps
10203      } = componentProps;
10204      const store3 = useTooltipRootContext();
10205      const {
10206        side,
10207        align
10208      } = useTooltipPositionerContext();
10209      const open = store3.useState("open");
10210      const instantType = store3.useState("instantType");
10211      const transitionStatus = store3.useState("transitionStatus");
10212      const popupProps = store3.useState("popupProps");
10213      const floatingContext = store3.useState("floatingRootContext");
10214      const disabled2 = store3.useState("disabled");
10215      const closeDelay = store3.useState("closeDelay");
10216      useOpenChangeComplete({
10217        open,
10218        ref: store3.context.popupRef,
10219        onComplete() {
10220          if (open) {
10221            store3.context.onOpenChangeComplete?.(true);
10222          }
10223        }
10224      });
10225      useHoverFloatingInteraction(floatingContext, {
10226        enabled: !disabled2,
10227        closeDelay
10228      });
10229      const setPopupElement = store3.useStateSetter("popupElement");
10230      const state = {
10231        open,
10232        side,
10233        align,
10234        instant: instantType,
10235        transitionStatus
10236      };
10237      const element = useRenderElement("div", componentProps, {
10238        state,
10239        ref: [forwardedRef, store3.context.popupRef, setPopupElement],
10240        props: [FOCUSABLE_POPUP_PROPS, popupProps, getDisabledMountTransitionStyles(transitionStatus), elementProps],
10241        stateAttributesMapping: popupTransitionStateMapping
10242      });
10243      return element;
10244    });
10245    if (true) TooltipPopup.displayName = "TooltipPopup";
10246  
10247    // node_modules/@base-ui/react/tooltip/arrow/TooltipArrow.mjs
10248    var React56 = __toESM(require_react(), 1);
10249    var TooltipArrow = /* @__PURE__ */ React56.forwardRef(function TooltipArrow2(componentProps, forwardedRef) {
10250      const {
10251        render,
10252        className,
10253        style,
10254        ...elementProps
10255      } = componentProps;
10256      const store3 = useTooltipRootContext();
10257      const {
10258        arrowRef,
10259        side,
10260        align,
10261        arrowUncentered,
10262        arrowStyles
10263      } = useTooltipPositionerContext();
10264      const open = store3.useState("open");
10265      const instantType = store3.useState("instantType");
10266      const state = {
10267        open,
10268        side,
10269        align,
10270        uncentered: arrowUncentered,
10271        instant: instantType
10272      };
10273      const element = useRenderElement("div", componentProps, {
10274        state,
10275        ref: [forwardedRef, arrowRef],
10276        props: [{
10277          style: arrowStyles,
10278          "aria-hidden": true
10279        }, elementProps],
10280        stateAttributesMapping: popupStateMapping
10281      });
10282      return element;
10283    });
10284    if (true) TooltipArrow.displayName = "TooltipArrow";
10285  
10286    // node_modules/@base-ui/react/tooltip/provider/TooltipProvider.mjs
10287    var React57 = __toESM(require_react(), 1);
10288    var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
10289    var TooltipProvider = function TooltipProvider2(props) {
10290      const {
10291        delay,
10292        closeDelay,
10293        timeout = 400
10294      } = props;
10295      const delayValue = React57.useMemo(() => ({
10296        open: delay,
10297        close: closeDelay
10298      }), [delay, closeDelay]);
10299      return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipProviderContext.Provider, {
10300        value: delay,
10301        children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(FloatingDelayGroup, {
10302          delay: delayValue,
10303          timeoutMs: timeout,
10304          children: props.children
10305        })
10306      });
10307    };
10308    if (true) TooltipProvider.displayName = "TooltipProvider";
10309  
10310    // node_modules/@base-ui/react/tooltip/viewport/TooltipViewport.mjs
10311    var React58 = __toESM(require_react(), 1);
10312    var TooltipViewport = /* @__PURE__ */ React58.forwardRef(function TooltipViewport2(componentProps, forwardedRef) {
10313      const {
10314        render,
10315        className,
10316        style,
10317        children,
10318        ...elementProps
10319      } = componentProps;
10320      const store3 = useTooltipRootContext();
10321      const positioner = useTooltipPositionerContext();
10322      const instantType = store3.useState("instantType");
10323      const {
10324        children: childrenToRender,
10325        state: viewportState
10326      } = usePopupViewport({
10327        store: store3,
10328        side: positioner.side,
10329        children
10330      });
10331      const state = {
10332        activationDirection: viewportState.activationDirection,
10333        transitioning: viewportState.transitioning,
10334        instant: instantType
10335      };
10336      return useRenderElement("div", componentProps, {
10337        state,
10338        ref: forwardedRef,
10339        props: [elementProps, {
10340          children: childrenToRender
10341        }],
10342        stateAttributesMapping: popupViewportStateMapping
10343      });
10344    });
10345    if (true) TooltipViewport.displayName = "TooltipViewport";
10346  
10347    // node_modules/@base-ui/react/tooltip/store/TooltipHandle.mjs
10348    var TooltipHandle = class extends BasePopupHandle {
10349      constructor() {
10350        super(createNullTooltipStore(), "Tooltip");
10351      }
10352      /**
10353       * Opens the tooltip and associates it with the trigger with the given id.
10354       *
10355       * This method should only be called in an event handler or an effect (not during rendering).
10356       *
10357       * @param triggerId ID of the trigger to associate with the tooltip. The trigger must be a matching
10358       * `Tooltip.Trigger` with this handle passed as a prop.
10359       */
10360      open(triggerId) {
10361        this.openByTrigger(triggerId);
10362      }
10363      /**
10364       * Closes the tooltip.
10365       *
10366       * This method should only be called in an event handler or an effect (not during rendering).
10367       */
10368      close() {
10369        this.closePopup();
10370      }
10371      /**
10372       * Whether the tooltip is currently open. Returns `false` while no root is attached to the handle.
10373       */
10374      get isOpen() {
10375        return this.attachedStore?.select("open") ?? false;
10376      }
10377    };
10378    function createTooltipHandle() {
10379      return new TooltipHandle();
10380    }
10381  
10382    // node_modules/@base-ui/react/use-render/useRender.mjs
10383    function useRender(params) {
10384      return useRenderElement(params.defaultTagName ?? "div", params, params);
10385    }
10386  
10387    // packages/ui/build-module/text/text.mjs
10388    var import_element13 = __toESM(require_element(), 1);
10389    var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
10390    function getRuntime() {
10391      const globalScope = globalThis;
10392      if (globalScope.__wpStyleRuntime) {
10393        return globalScope.__wpStyleRuntime;
10394      }
10395      globalScope.__wpStyleRuntime = {
10396        documents: /* @__PURE__ */ new Map(),
10397        styles: /* @__PURE__ */ new Map(),
10398        injectedStyles: /* @__PURE__ */ new WeakMap()
10399      };
10400      if (typeof document !== "undefined") {
10401        registerDocument(document);
10402      }
10403      return globalScope.__wpStyleRuntime;
10404    }
10405    function documentContainsStyleHash(targetDocument, hash) {
10406      if (!targetDocument.head) {
10407        return false;
10408      }
10409      for (const style of targetDocument.head.querySelectorAll(
10410        `style[$STYLE_HASH_ATTRIBUTE}]`
10411      )) {
10412        if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
10413          return true;
10414        }
10415      }
10416      return false;
10417    }
10418    function injectStyle(targetDocument, hash, css) {
10419      if (!targetDocument.head) {
10420        return;
10421      }
10422      const runtime = getRuntime();
10423      let injectedStyles = runtime.injectedStyles.get(targetDocument);
10424      if (!injectedStyles) {
10425        injectedStyles = /* @__PURE__ */ new Set();
10426        runtime.injectedStyles.set(targetDocument, injectedStyles);
10427      }
10428      if (injectedStyles.has(hash)) {
10429        return;
10430      }
10431      if (documentContainsStyleHash(targetDocument, hash)) {
10432        injectedStyles.add(hash);
10433        return;
10434      }
10435      const style = targetDocument.createElement("style");
10436      style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
10437      style.appendChild(targetDocument.createTextNode(css));
10438      targetDocument.head.appendChild(style);
10439      injectedStyles.add(hash);
10440    }
10441    function registerDocument(targetDocument) {
10442      const runtime = getRuntime();
10443      runtime.documents.set(
10444        targetDocument,
10445        (runtime.documents.get(targetDocument) ?? 0) + 1
10446      );
10447      for (const [hash, css] of runtime.styles) {
10448        injectStyle(targetDocument, hash, css);
10449      }
10450      return () => {
10451        const count = runtime.documents.get(targetDocument);
10452        if (count === void 0) {
10453          return;
10454        }
10455        if (count <= 1) {
10456          runtime.documents.delete(targetDocument);
10457          return;
10458        }
10459        runtime.documents.set(targetDocument, count - 1);
10460      };
10461    }
10462    function registerStyle(hash, css) {
10463      const runtime = getRuntime();
10464      runtime.styles.set(hash, css);
10465      for (const targetDocument of runtime.documents.keys()) {
10466        injectStyle(targetDocument, hash, css);
10467      }
10468    }
10469    if (typeof process === "undefined" || true) {
10470      registerStyle("3167e7d116", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{text-wrap:pretty;margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
10471    }
10472    var style_default = { "text": "_83ed8a8da5dd50ea__text", "heading-2xl": "_14437cfb77831647__heading-2xl", "heading-xl": "_3c78b7fa9b4072dd__heading-xl", "heading-lg": "aa58f227716bcde2__heading-lg", "heading-md": "fc4da56d8dfe52c4__heading-md", "heading-sm": "a9b78c7c82e8dff7__heading-sm", "body-xl": "_305ff559e52180d5__body-xl", "body-lg": "ca1aa3fc2029e958__body-lg", "body-md": "_131101940be12424__body-md", "body-sm": "_0e8d87a42c1f75fa__body-sm" };
10473    if (typeof process === "undefined" || true) {
10474      registerStyle("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
10475    }
10476    var global_css_defense_default = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
10477    var Text = (0, import_element13.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) {
10478      const element = useRender({
10479        render,
10480        defaultTagName: "span",
10481        ref,
10482        props: mergeProps(props, {
10483          className: clsx_default(
10484            style_default.text,
10485            global_css_defense_default.heading,
10486            global_css_defense_default.p,
10487            style_default[variant],
10488            className
10489          )
10490        })
10491      });
10492      return element;
10493    });
10494  
10495    // packages/ui/build-module/tooltip/popup.mjs
10496    var import_element17 = __toESM(require_element(), 1);
10497  
10498    // packages/ui/build-module/tooltip/portal.mjs
10499    var import_element14 = __toESM(require_element(), 1);
10500  
10501    // packages/ui/build-module/utils/wp-compat-overlay-slot.mjs
10502    var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
10503    function getRuntime2() {
10504      const globalScope = globalThis;
10505      if (globalScope.__wpStyleRuntime) {
10506        return globalScope.__wpStyleRuntime;
10507      }
10508      globalScope.__wpStyleRuntime = {
10509        documents: /* @__PURE__ */ new Map(),
10510        styles: /* @__PURE__ */ new Map(),
10511        injectedStyles: /* @__PURE__ */ new WeakMap()
10512      };
10513      if (typeof document !== "undefined") {
10514        registerDocument2(document);
10515      }
10516      return globalScope.__wpStyleRuntime;
10517    }
10518    function documentContainsStyleHash2(targetDocument, hash) {
10519      if (!targetDocument.head) {
10520        return false;
10521      }
10522      for (const style of targetDocument.head.querySelectorAll(
10523        `style[$STYLE_HASH_ATTRIBUTE2}]`
10524      )) {
10525        if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) {
10526          return true;
10527        }
10528      }
10529      return false;
10530    }
10531    function injectStyle2(targetDocument, hash, css) {
10532      if (!targetDocument.head) {
10533        return;
10534      }
10535      const runtime = getRuntime2();
10536      let injectedStyles = runtime.injectedStyles.get(targetDocument);
10537      if (!injectedStyles) {
10538        injectedStyles = /* @__PURE__ */ new Set();
10539        runtime.injectedStyles.set(targetDocument, injectedStyles);
10540      }
10541      if (injectedStyles.has(hash)) {
10542        return;
10543      }
10544      if (documentContainsStyleHash2(targetDocument, hash)) {
10545        injectedStyles.add(hash);
10546        return;
10547      }
10548      const style = targetDocument.createElement("style");
10549      style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash);
10550      style.appendChild(targetDocument.createTextNode(css));
10551      targetDocument.head.appendChild(style);
10552      injectedStyles.add(hash);
10553    }
10554    function registerDocument2(targetDocument) {
10555      const runtime = getRuntime2();
10556      runtime.documents.set(
10557        targetDocument,
10558        (runtime.documents.get(targetDocument) ?? 0) + 1
10559      );
10560      for (const [hash, css] of runtime.styles) {
10561        injectStyle2(targetDocument, hash, css);
10562      }
10563      return () => {
10564        const count = runtime.documents.get(targetDocument);
10565        if (count === void 0) {
10566          return;
10567        }
10568        if (count <= 1) {
10569          runtime.documents.delete(targetDocument);
10570          return;
10571        }
10572        runtime.documents.set(targetDocument, count - 1);
10573      };
10574    }
10575    function registerStyle2(hash, css) {
10576      const runtime = getRuntime2();
10577      runtime.styles.set(hash, css);
10578      for (const targetDocument of runtime.documents.keys()) {
10579        injectStyle2(targetDocument, hash, css);
10580      }
10581    }
10582    if (typeof process === "undefined" || true) {
10583      registerStyle2("be37f31c1e", "._11fc52b637ff8a7e__slot{inset:0;isolation:isolate;pointer-events:none;position:fixed;z-index:1000000003}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._11fc52b637ff8a7e__slot>*{pointer-events:auto}}}");
10584    }
10585    var wp_compat_overlay_slot_default = { "slot": "_11fc52b637ff8a7e__slot" };
10586    var WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE = "data-wp-compat-overlay-slot";
10587    function resolveOwnerDocument() {
10588      return typeof document === "undefined" ? null : document;
10589    }
10590    function isInWordPressEnvironment() {
10591      let topWp;
10592      try {
10593        topWp = window.top?.wp;
10594      } catch {
10595      }
10596      const wp = topWp ?? window.wp;
10597      return typeof wp?.components === "object" && wp.components !== null;
10598    }
10599    var cachedSlot = null;
10600    function ensureSlotIsAccessible(element) {
10601      element.setAttribute("aria-hidden", "false");
10602      return element;
10603    }
10604    function createSlot(ownerDocument2) {
10605      const element = ownerDocument2.createElement("div");
10606      element.setAttribute(WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE, "");
10607      if (wp_compat_overlay_slot_default.slot) {
10608        element.classList.add(wp_compat_overlay_slot_default.slot);
10609      }
10610      ownerDocument2.body.appendChild(element);
10611      return element;
10612    }
10613    function getWpCompatOverlaySlot() {
10614      if (typeof window === "undefined") {
10615        return void 0;
10616      }
10617      if (!isInWordPressEnvironment() && window.__wpUiCompatOverlaySlotEnabled !== true) {
10618        return void 0;
10619      }
10620      const ownerDocument2 = resolveOwnerDocument();
10621      if (!ownerDocument2 || !ownerDocument2.body) {
10622        return void 0;
10623      }
10624      if (cachedSlot && cachedSlot.ownerDocument === ownerDocument2 && cachedSlot.isConnected) {
10625        return ensureSlotIsAccessible(cachedSlot);
10626      }
10627      const existing = ownerDocument2.querySelector(
10628        `[$WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE}]`
10629      );
10630      if (existing instanceof HTMLDivElement) {
10631        cachedSlot = ensureSlotIsAccessible(existing);
10632        return cachedSlot;
10633      }
10634      if (cachedSlot?.isConnected) {
10635        cachedSlot.remove();
10636      }
10637      cachedSlot = ensureSlotIsAccessible(createSlot(ownerDocument2));
10638      return cachedSlot;
10639    }
10640  
10641    // packages/ui/build-module/tooltip/portal.mjs
10642    var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
10643    var Portal = (0, import_element14.forwardRef)(
10644      function TooltipPortal3({ container, ...restProps }, ref) {
10645        return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10646          index_parts_exports2.Portal,
10647          {
10648            container: container ?? getWpCompatOverlaySlot(),
10649            ...restProps,
10650            ref
10651          }
10652        );
10653      }
10654    );
10655  
10656    // packages/ui/build-module/tooltip/positioner.mjs
10657    var import_element15 = __toESM(require_element(), 1);
10658    var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
10659    var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
10660    function getRuntime3() {
10661      const globalScope = globalThis;
10662      if (globalScope.__wpStyleRuntime) {
10663        return globalScope.__wpStyleRuntime;
10664      }
10665      globalScope.__wpStyleRuntime = {
10666        documents: /* @__PURE__ */ new Map(),
10667        styles: /* @__PURE__ */ new Map(),
10668        injectedStyles: /* @__PURE__ */ new WeakMap()
10669      };
10670      if (typeof document !== "undefined") {
10671        registerDocument3(document);
10672      }
10673      return globalScope.__wpStyleRuntime;
10674    }
10675    function documentContainsStyleHash3(targetDocument, hash) {
10676      if (!targetDocument.head) {
10677        return false;
10678      }
10679      for (const style of targetDocument.head.querySelectorAll(
10680        `style[$STYLE_HASH_ATTRIBUTE3}]`
10681      )) {
10682        if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) {
10683          return true;
10684        }
10685      }
10686      return false;
10687    }
10688    function injectStyle3(targetDocument, hash, css) {
10689      if (!targetDocument.head) {
10690        return;
10691      }
10692      const runtime = getRuntime3();
10693      let injectedStyles = runtime.injectedStyles.get(targetDocument);
10694      if (!injectedStyles) {
10695        injectedStyles = /* @__PURE__ */ new Set();
10696        runtime.injectedStyles.set(targetDocument, injectedStyles);
10697      }
10698      if (injectedStyles.has(hash)) {
10699        return;
10700      }
10701      if (documentContainsStyleHash3(targetDocument, hash)) {
10702        injectedStyles.add(hash);
10703        return;
10704      }
10705      const style = targetDocument.createElement("style");
10706      style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash);
10707      style.appendChild(targetDocument.createTextNode(css));
10708      targetDocument.head.appendChild(style);
10709      injectedStyles.add(hash);
10710    }
10711    function registerDocument3(targetDocument) {
10712      const runtime = getRuntime3();
10713      runtime.documents.set(
10714        targetDocument,
10715        (runtime.documents.get(targetDocument) ?? 0) + 1
10716      );
10717      for (const [hash, css] of runtime.styles) {
10718        injectStyle3(targetDocument, hash, css);
10719      }
10720      return () => {
10721        const count = runtime.documents.get(targetDocument);
10722        if (count === void 0) {
10723          return;
10724        }
10725        if (count <= 1) {
10726          runtime.documents.delete(targetDocument);
10727          return;
10728        }
10729        runtime.documents.set(targetDocument, count - 1);
10730      };
10731    }
10732    function registerStyle3(hash, css) {
10733      const runtime = getRuntime3();
10734      runtime.styles.set(hash, css);
10735      for (const targetDocument of runtime.documents.keys()) {
10736        injectStyle3(targetDocument, hash, css);
10737      }
10738    }
10739    if (typeof process === "undefined" || true) {
10740      registerStyle3("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
10741    }
10742    var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
10743    if (typeof process === "undefined" || true) {
10744      registerStyle3("19fcc06039", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');
10745    }
10746    var style_default2 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
10747    var Positioner = (0, import_element15.forwardRef)(
10748      function TooltipPositioner3({ align = "center", className, side = "top", sideOffset = 4, ...props }, ref) {
10749        return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
10750          index_parts_exports2.Positioner,
10751          {
10752            ref,
10753            align,
10754            side,
10755            sideOffset,
10756            ...props,
10757            className: clsx_default(
10758              resets_default["box-sizing"],
10759              style_default2.positioner,
10760              className
10761            )
10762          }
10763        );
10764      }
10765    );
10766  
10767    // packages/ui/build-module/utils/render-slot-with-children.mjs
10768    var import_element16 = __toESM(require_element(), 1);
10769    function renderSlotWithChildren(slot, defaultSlot, children) {
10770      return (0, import_element16.cloneElement)(slot ?? defaultSlot, { children });
10771    }
10772  
10773    // packages/ui/build-module/utils/theme-provider.mjs
10774    var theme = __toESM(require_theme(), 1);
10775  
10776    // packages/ui/build-module/lock-unlock.mjs
10777    var import_private_apis = __toESM(require_private_apis(), 1);
10778    var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
10779      "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
10780      "@wordpress/ui"
10781    );
10782  
10783    // packages/ui/build-module/utils/theme-provider.mjs
10784    function getThemeProvider() {
10785      const themePackage = theme;
10786      if (themePackage.ThemeProvider) {
10787        return themePackage.ThemeProvider;
10788      }
10789      if (!themePackage.privateApis) {
10790        throw new Error(
10791          "@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`."
10792        );
10793      }
10794      return unlock(
10795        themePackage.privateApis
10796      ).ThemeProvider;
10797    }
10798    var ThemeProvider = getThemeProvider();
10799  
10800    // packages/ui/build-module/tooltip/popup.mjs
10801    var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
10802    var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
10803    function getRuntime4() {
10804      const globalScope = globalThis;
10805      if (globalScope.__wpStyleRuntime) {
10806        return globalScope.__wpStyleRuntime;
10807      }
10808      globalScope.__wpStyleRuntime = {
10809        documents: /* @__PURE__ */ new Map(),
10810        styles: /* @__PURE__ */ new Map(),
10811        injectedStyles: /* @__PURE__ */ new WeakMap()
10812      };
10813      if (typeof document !== "undefined") {
10814        registerDocument4(document);
10815      }
10816      return globalScope.__wpStyleRuntime;
10817    }
10818    function documentContainsStyleHash4(targetDocument, hash) {
10819      if (!targetDocument.head) {
10820        return false;
10821      }
10822      for (const style of targetDocument.head.querySelectorAll(
10823        `style[$STYLE_HASH_ATTRIBUTE4}]`
10824      )) {
10825        if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
10826          return true;
10827        }
10828      }
10829      return false;
10830    }
10831    function injectStyle4(targetDocument, hash, css) {
10832      if (!targetDocument.head) {
10833        return;
10834      }
10835      const runtime = getRuntime4();
10836      let injectedStyles = runtime.injectedStyles.get(targetDocument);
10837      if (!injectedStyles) {
10838        injectedStyles = /* @__PURE__ */ new Set();
10839        runtime.injectedStyles.set(targetDocument, injectedStyles);
10840      }
10841      if (injectedStyles.has(hash)) {
10842        return;
10843      }
10844      if (documentContainsStyleHash4(targetDocument, hash)) {
10845        injectedStyles.add(hash);
10846        return;
10847      }
10848      const style = targetDocument.createElement("style");
10849      style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
10850      style.appendChild(targetDocument.createTextNode(css));
10851      targetDocument.head.appendChild(style);
10852      injectedStyles.add(hash);
10853    }
10854    function registerDocument4(targetDocument) {
10855      const runtime = getRuntime4();
10856      runtime.documents.set(
10857        targetDocument,
10858        (runtime.documents.get(targetDocument) ?? 0) + 1
10859      );
10860      for (const [hash, css] of runtime.styles) {
10861        injectStyle4(targetDocument, hash, css);
10862      }
10863      return () => {
10864        const count = runtime.documents.get(targetDocument);
10865        if (count === void 0) {
10866          return;
10867        }
10868        if (count <= 1) {
10869          runtime.documents.delete(targetDocument);
10870          return;
10871        }
10872        runtime.documents.set(targetDocument, count - 1);
10873      };
10874    }
10875    function registerStyle4(hash, css) {
10876      const runtime = getRuntime4();
10877      runtime.styles.set(hash, css);
10878      for (const targetDocument of runtime.documents.keys()) {
10879        injectStyle4(targetDocument, hash, css);
10880      }
10881    }
10882    if (typeof process === "undefined" || true) {
10883      registerStyle4("19fcc06039", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');
10884    }
10885    var style_default3 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
10886    var POPUP_COLOR = { background: "#1e1e1e" };
10887    var Popup = (0, import_element17.forwardRef)(function TooltipPopup3({ portal, positioner, children, className, ...props }, ref) {
10888      const popupContent = /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ThemeProvider, { color: POPUP_COLOR, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
10889        index_parts_exports2.Popup,
10890        {
10891          ref,
10892          className: clsx_default(style_default3.popup, className),
10893          ...props,
10894          children
10895        }
10896      ) });
10897      const positionedPopup = renderSlotWithChildren(
10898        positioner,
10899        /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Positioner, {}),
10900        popupContent
10901      );
10902      return renderSlotWithChildren(portal, /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Portal, {}), positionedPopup);
10903    });
10904  
10905    // packages/ui/build-module/tooltip/trigger.mjs
10906    var import_element18 = __toESM(require_element(), 1);
10907    var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
10908    var Trigger = (0, import_element18.forwardRef)(
10909      function TooltipTrigger3(props, ref) {
10910        return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(index_parts_exports2.Trigger, { ref, ...props });
10911      }
10912    );
10913  
10914    // packages/ui/build-module/utils/direction-provider.mjs
10915    var import_i18n2 = __toESM(require_i18n(), 1);
10916    var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
10917    function DirectionProvider3({ children }) {
10918      return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DirectionProvider, { direction: (0, import_i18n2.isRTL)() ? "rtl" : "ltr", children });
10919    }
10920  
10921    // packages/ui/build-module/tooltip/root.mjs
10922    var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
10923    function Root(props) {
10924      return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DirectionProvider3, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(index_parts_exports2.Root, { ...props }) });
10925    }
10926  
10927    // packages/ui/build-module/link/link.mjs
10928    var import_element19 = __toESM(require_element(), 1);
10929    var import_i18n3 = __toESM(require_i18n(), 1);
10930    var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
10931    var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash";
10932    function getRuntime5() {
10933      const globalScope = globalThis;
10934      if (globalScope.__wpStyleRuntime) {
10935        return globalScope.__wpStyleRuntime;
10936      }
10937      globalScope.__wpStyleRuntime = {
10938        documents: /* @__PURE__ */ new Map(),
10939        styles: /* @__PURE__ */ new Map(),
10940        injectedStyles: /* @__PURE__ */ new WeakMap()
10941      };
10942      if (typeof document !== "undefined") {
10943        registerDocument5(document);
10944      }
10945      return globalScope.__wpStyleRuntime;
10946    }
10947    function documentContainsStyleHash5(targetDocument, hash) {
10948      if (!targetDocument.head) {
10949        return false;
10950      }
10951      for (const style of targetDocument.head.querySelectorAll(
10952        `style[$STYLE_HASH_ATTRIBUTE5}]`
10953      )) {
10954        if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) {
10955          return true;
10956        }
10957      }
10958      return false;
10959    }
10960    function injectStyle5(targetDocument, hash, css) {
10961      if (!targetDocument.head) {
10962        return;
10963      }
10964      const runtime = getRuntime5();
10965      let injectedStyles = runtime.injectedStyles.get(targetDocument);
10966      if (!injectedStyles) {
10967        injectedStyles = /* @__PURE__ */ new Set();
10968        runtime.injectedStyles.set(targetDocument, injectedStyles);
10969      }
10970      if (injectedStyles.has(hash)) {
10971        return;
10972      }
10973      if (documentContainsStyleHash5(targetDocument, hash)) {
10974        injectedStyles.add(hash);
10975        return;
10976      }
10977      const style = targetDocument.createElement("style");
10978      style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash);
10979      style.appendChild(targetDocument.createTextNode(css));
10980      targetDocument.head.appendChild(style);
10981      injectedStyles.add(hash);
10982    }
10983    function registerDocument5(targetDocument) {
10984      const runtime = getRuntime5();
10985      runtime.documents.set(
10986        targetDocument,
10987        (runtime.documents.get(targetDocument) ?? 0) + 1
10988      );
10989      for (const [hash, css] of runtime.styles) {
10990        injectStyle5(targetDocument, hash, css);
10991      }
10992      return () => {
10993        const count = runtime.documents.get(targetDocument);
10994        if (count === void 0) {
10995          return;
10996        }
10997        if (count <= 1) {
10998          runtime.documents.delete(targetDocument);
10999          return;
11000        }
11001        runtime.documents.set(targetDocument, count - 1);
11002      };
11003    }
11004    function registerStyle5(hash, css) {
11005      const runtime = getRuntime5();
11006      runtime.styles.set(hash, css);
11007      for (const targetDocument of runtime.documents.keys()) {
11008        injectStyle5(targetDocument, hash, css);
11009      }
11010    }
11011    if (typeof process === "undefined" || true) {
11012      registerStyle5("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
11013    }
11014    var resets_default2 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
11015    if (typeof process === "undefined" || true) {
11016      registerStyle5("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
11017    }
11018    var focus_module_default = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
11019    if (typeof process === "undefined" || true) {
11020      registerStyle5("e8e6a9be37", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{text-decoration-thickness:from-font;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}}');
11021    }
11022    var style_default4 = { "link": "d4250949359b05ce__link", "is-brand": "c6055659b8e2cd2c__is-brand", "is-neutral": "_92e0dfcaeee15b88__is-neutral", "is-unstyled": "cf122a9bf1035d42__is-unstyled", "link-icon": "_0cb411afac4c86c7__link-icon" };
11023    if (typeof process === "undefined" || true) {
11024      registerStyle5("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
11025    }
11026    var global_css_defense_default2 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
11027    var Link = (0, import_element19.forwardRef)(function Link2({
11028      children,
11029      variant = "default",
11030      tone = "brand",
11031      openInNewTab = false,
11032      target,
11033      render,
11034      className,
11035      ...props
11036    }, ref) {
11037      const shouldShowNewTabIndicator = openInNewTab || /^_blank$/i.test(target ?? "");
11038      const element = useRender({
11039        render,
11040        defaultTagName: "a",
11041        ref,
11042        props: mergeProps(props, {
11043          className: clsx_default(
11044            global_css_defense_default2.a,
11045            resets_default2["box-sizing"],
11046            focus_module_default["outset-ring--focus-except-active"],
11047            variant !== "unstyled" && style_default4.link,
11048            variant !== "unstyled" && style_default4[`is-$tone}`],
11049            variant === "unstyled" && style_default4["is-unstyled"],
11050            className
11051          ),
11052          target: target ?? (openInNewTab ? "_blank" : void 0),
11053          children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
11054            children,
11055            shouldShowNewTabIndicator && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
11056              "span",
11057              {
11058                className: style_default4["link-icon"],
11059                role: "img",
11060                "aria-label": (
11061                  /* translators: accessibility text appended to link text */
11062                  (0, import_i18n3.__)("(opens in a new tab)")
11063                )
11064              }
11065            )
11066          ] })
11067        })
11068      });
11069      return element;
11070    });
11071  
11072    // packages/ui/build-module/icon/icon.mjs
11073    var import_element20 = __toESM(require_element(), 1);
11074    var import_primitives19 = __toESM(require_primitives(), 1);
11075    var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
11076    var Icon = (0, import_element20.forwardRef)(function Icon2({ icon, size: size4 = 24, style, ...restProps }, ref) {
11077      const mergedStyle = icon.props.style || style ? { ...icon.props.style, ...style } : void 0;
11078      return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11079        import_primitives19.SVG,
11080        {
11081          ref,
11082          ...icon.props,
11083          ...restProps,
11084          ...mergedStyle ? { style: mergedStyle } : {},
11085          width: size4,
11086          height: size4
11087        }
11088      );
11089    });
11090  
11091    // packages/ui/build-module/utils/keyboard-shortcut.mjs
11092    var import_element22 = __toESM(require_element(), 1);
11093    var import_i18n4 = __toESM(require_i18n(), 1);
11094  
11095    // packages/ui/build-module/visually-hidden/visually-hidden.mjs
11096    var import_element21 = __toESM(require_element(), 1);
11097    var STYLE_HASH_ATTRIBUTE6 = "data-wp-hash";
11098    function getRuntime6() {
11099      const globalScope = globalThis;
11100      if (globalScope.__wpStyleRuntime) {
11101        return globalScope.__wpStyleRuntime;
11102      }
11103      globalScope.__wpStyleRuntime = {
11104        documents: /* @__PURE__ */ new Map(),
11105        styles: /* @__PURE__ */ new Map(),
11106        injectedStyles: /* @__PURE__ */ new WeakMap()
11107      };
11108      if (typeof document !== "undefined") {
11109        registerDocument6(document);
11110      }
11111      return globalScope.__wpStyleRuntime;
11112    }
11113    function documentContainsStyleHash6(targetDocument, hash) {
11114      if (!targetDocument.head) {
11115        return false;
11116      }
11117      for (const style of targetDocument.head.querySelectorAll(
11118        `style[$STYLE_HASH_ATTRIBUTE6}]`
11119      )) {
11120        if (style.getAttribute(STYLE_HASH_ATTRIBUTE6) === hash) {
11121          return true;
11122        }
11123      }
11124      return false;
11125    }
11126    function injectStyle6(targetDocument, hash, css) {
11127      if (!targetDocument.head) {
11128        return;
11129      }
11130      const runtime = getRuntime6();
11131      let injectedStyles = runtime.injectedStyles.get(targetDocument);
11132      if (!injectedStyles) {
11133        injectedStyles = /* @__PURE__ */ new Set();
11134        runtime.injectedStyles.set(targetDocument, injectedStyles);
11135      }
11136      if (injectedStyles.has(hash)) {
11137        return;
11138      }
11139      if (documentContainsStyleHash6(targetDocument, hash)) {
11140        injectedStyles.add(hash);
11141        return;
11142      }
11143      const style = targetDocument.createElement("style");
11144      style.setAttribute(STYLE_HASH_ATTRIBUTE6, hash);
11145      style.appendChild(targetDocument.createTextNode(css));
11146      targetDocument.head.appendChild(style);
11147      injectedStyles.add(hash);
11148    }
11149    function registerDocument6(targetDocument) {
11150      const runtime = getRuntime6();
11151      runtime.documents.set(
11152        targetDocument,
11153        (runtime.documents.get(targetDocument) ?? 0) + 1
11154      );
11155      for (const [hash, css] of runtime.styles) {
11156        injectStyle6(targetDocument, hash, css);
11157      }
11158      return () => {
11159        const count = runtime.documents.get(targetDocument);
11160        if (count === void 0) {
11161          return;
11162        }
11163        if (count <= 1) {
11164          runtime.documents.delete(targetDocument);
11165          return;
11166        }
11167        runtime.documents.set(targetDocument, count - 1);
11168      };
11169    }
11170    function registerStyle6(hash, css) {
11171      const runtime = getRuntime6();
11172      runtime.styles.set(hash, css);
11173      for (const targetDocument of runtime.documents.keys()) {
11174        injectStyle6(targetDocument, hash, css);
11175      }
11176    }
11177    if (typeof process === "undefined" || true) {
11178      registerStyle6("fa606a57ae", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.f37b9e2e191ebd66__visually-hidden{word-wrap:normal;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-break:normal}}}");
11179    }
11180    var style_default5 = { "visually-hidden": "f37b9e2e191ebd66__visually-hidden" };
11181    var VisuallyHidden = (0, import_element21.forwardRef)(
11182      function VisuallyHidden2({ render, ...restProps }, ref) {
11183        const element = useRender({
11184          render,
11185          ref,
11186          props: mergeProps(
11187            { className: style_default5["visually-hidden"] },
11188            restProps,
11189            {
11190              // @ts-expect-error Arbitrary data-* attributes aren't indexable on the typed div props. Kept hardcoded so consumers can't change or remove it.
11191              "data-visually-hidden": ""
11192            }
11193          )
11194        });
11195        return element;
11196      }
11197    );
11198  
11199    // packages/ui/build-module/utils/keyboard-shortcut.mjs
11200    var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
11201    function useKeyboardShortcutProps({
11202      "aria-describedby": ariaDescribedBy,
11203      "aria-keyshortcuts": ariaKeyShortcuts,
11204      shortcut
11205    }) {
11206      const generatedDescriptionId = (0, import_element22.useId)();
11207      const descriptionId = shortcut ? generatedDescriptionId : void 0;
11208      const describedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ");
11209      return {
11210        descriptionId,
11211        targetProps: {
11212          "aria-describedby": describedBy || void 0,
11213          "aria-keyshortcuts": shortcut?.ariaKeyShortcut ?? ariaKeyShortcuts
11214        }
11215      };
11216    }
11217    var KeyboardShortcutDescription = (0, import_element22.forwardRef)(function KeyboardShortcutDescription2({ descriptionId, shortcut }, ref) {
11218      return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
11219        VisuallyHidden,
11220        {
11221          id: descriptionId,
11222          "aria-hidden": "true",
11223          render: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { ref }),
11224          children: (0, import_i18n4.sprintf)(
11225            /* translators: %s: keyboard shortcut. */
11226            (0, import_i18n4.__)("Keyboard shortcut: %s"),
11227            shortcut.label ?? shortcut.ariaKeyShortcut
11228          )
11229        }
11230      );
11231    });
11232    var KeyboardShortcutDisplay = (0, import_element22.forwardRef)(function KeyboardShortcutDisplay2({ className, shortcut }, ref) {
11233      return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { ref, "aria-hidden": "true", className, dir: "ltr", children: shortcut.displayShortcut });
11234    });
11235  
11236    // packages/ui/build-module/button/button.mjs
11237    var import_a11y = __toESM(require_a11y(), 1);
11238    var import_element23 = __toESM(require_element(), 1);
11239    var import_i18n5 = __toESM(require_i18n(), 1);
11240    var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
11241    var STYLE_HASH_ATTRIBUTE7 = "data-wp-hash";
11242    function getRuntime7() {
11243      const globalScope = globalThis;
11244      if (globalScope.__wpStyleRuntime) {
11245        return globalScope.__wpStyleRuntime;
11246      }
11247      globalScope.__wpStyleRuntime = {
11248        documents: /* @__PURE__ */ new Map(),
11249        styles: /* @__PURE__ */ new Map(),
11250        injectedStyles: /* @__PURE__ */ new WeakMap()
11251      };
11252      if (typeof document !== "undefined") {
11253        registerDocument7(document);
11254      }
11255      return globalScope.__wpStyleRuntime;
11256    }
11257    function documentContainsStyleHash7(targetDocument, hash) {
11258      if (!targetDocument.head) {
11259        return false;
11260      }
11261      for (const style of targetDocument.head.querySelectorAll(
11262        `style[$STYLE_HASH_ATTRIBUTE7}]`
11263      )) {
11264        if (style.getAttribute(STYLE_HASH_ATTRIBUTE7) === hash) {
11265          return true;
11266        }
11267      }
11268      return false;
11269    }
11270    function injectStyle7(targetDocument, hash, css) {
11271      if (!targetDocument.head) {
11272        return;
11273      }
11274      const runtime = getRuntime7();
11275      let injectedStyles = runtime.injectedStyles.get(targetDocument);
11276      if (!injectedStyles) {
11277        injectedStyles = /* @__PURE__ */ new Set();
11278        runtime.injectedStyles.set(targetDocument, injectedStyles);
11279      }
11280      if (injectedStyles.has(hash)) {
11281        return;
11282      }
11283      if (documentContainsStyleHash7(targetDocument, hash)) {
11284        injectedStyles.add(hash);
11285        return;
11286      }
11287      const style = targetDocument.createElement("style");
11288      style.setAttribute(STYLE_HASH_ATTRIBUTE7, hash);
11289      style.appendChild(targetDocument.createTextNode(css));
11290      targetDocument.head.appendChild(style);
11291      injectedStyles.add(hash);
11292    }
11293    function registerDocument7(targetDocument) {
11294      const runtime = getRuntime7();
11295      runtime.documents.set(
11296        targetDocument,
11297        (runtime.documents.get(targetDocument) ?? 0) + 1
11298      );
11299      for (const [hash, css] of runtime.styles) {
11300        injectStyle7(targetDocument, hash, css);
11301      }
11302      return () => {
11303        const count = runtime.documents.get(targetDocument);
11304        if (count === void 0) {
11305          return;
11306        }
11307        if (count <= 1) {
11308          runtime.documents.delete(targetDocument);
11309          return;
11310        }
11311        runtime.documents.set(targetDocument, count - 1);
11312      };
11313    }
11314    function registerStyle7(hash, css) {
11315      const runtime = getRuntime7();
11316      runtime.styles.set(hash, css);
11317      for (const targetDocument of runtime.documents.keys()) {
11318        injectStyle7(targetDocument, hash, css);
11319      }
11320    }
11321    if (typeof process === "undefined" || true) {
11322      registerStyle7("effc4e3032", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}');
11323    }
11324    var style_default6 = { "button": "_97b0fc33c028be1a__button", "is-unstyled": "abbb272e2ce49bd6__is-unstyled", "is-loading": "_914b42f315c0e580__is-loading", "is-small": "_908205475f9f2a92__is-small", "icon": "_9f6fc6553aeb36fe__icon", "is-brand": "dd460c965226cc77__is-brand", "is-outline": "_62d5a778b7b258ee__is-outline", "is-minimal": "ad0619a3217c6a5b__is-minimal", "is-neutral": "e722a8f96726aa99__is-neutral", "is-solid": "b50b3358c5fb4d0b__is-solid", "is-compact": "cf59cf1b69629838__is-compact", "loading-animation": "_5a1d53da6f830c8d__loading-animation" };
11325    if (typeof process === "undefined" || true) {
11326      registerStyle7("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
11327    }
11328    var resets_default3 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
11329    if (typeof process === "undefined" || true) {
11330      registerStyle7("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
11331    }
11332    var focus_module_default2 = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
11333    if (typeof process === "undefined" || true) {
11334      registerStyle7("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
11335    }
11336    var global_css_defense_default3 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
11337    var Button5 = (0, import_element23.forwardRef)(
11338      function Button22({
11339        tone = "brand",
11340        variant = "solid",
11341        size: size4 = "default",
11342        className,
11343        focusableWhenDisabled = true,
11344        disabled: disabled2,
11345        loading,
11346        loadingAnnouncement = (0, import_i18n5.__)("Loading"),
11347        children,
11348        ...props
11349      }, ref) {
11350        const mergedClassName = clsx_default(
11351          global_css_defense_default3.button,
11352          resets_default3["box-sizing"],
11353          focus_module_default2["outset-ring--focus-except-active"],
11354          variant !== "unstyled" && style_default6.button,
11355          style_default6[`is-$tone}`],
11356          style_default6[`is-$variant}`],
11357          style_default6[`is-$size4}`],
11358          loading && style_default6["is-loading"],
11359          className
11360        );
11361        (0, import_element23.useEffect)(() => {
11362          if (loading && loadingAnnouncement) {
11363            (0, import_a11y.speak)(loadingAnnouncement);
11364          }
11365        }, [loading, loadingAnnouncement]);
11366        return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
11367          Button3,
11368          {
11369            ref,
11370            className: mergedClassName,
11371            focusableWhenDisabled,
11372            disabled: disabled2 ?? loading,
11373            ...props,
11374            children
11375          }
11376        );
11377      }
11378    );
11379  
11380    // packages/ui/build-module/button/icon.mjs
11381    var import_element24 = __toESM(require_element(), 1);
11382    var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
11383    var STYLE_HASH_ATTRIBUTE8 = "data-wp-hash";
11384    function getRuntime8() {
11385      const globalScope = globalThis;
11386      if (globalScope.__wpStyleRuntime) {
11387        return globalScope.__wpStyleRuntime;
11388      }
11389      globalScope.__wpStyleRuntime = {
11390        documents: /* @__PURE__ */ new Map(),
11391        styles: /* @__PURE__ */ new Map(),
11392        injectedStyles: /* @__PURE__ */ new WeakMap()
11393      };
11394      if (typeof document !== "undefined") {
11395        registerDocument8(document);
11396      }
11397      return globalScope.__wpStyleRuntime;
11398    }
11399    function documentContainsStyleHash8(targetDocument, hash) {
11400      if (!targetDocument.head) {
11401        return false;
11402      }
11403      for (const style of targetDocument.head.querySelectorAll(
11404        `style[$STYLE_HASH_ATTRIBUTE8}]`
11405      )) {
11406        if (style.getAttribute(STYLE_HASH_ATTRIBUTE8) === hash) {
11407          return true;
11408        }
11409      }
11410      return false;
11411    }
11412    function injectStyle8(targetDocument, hash, css) {
11413      if (!targetDocument.head) {
11414        return;
11415      }
11416      const runtime = getRuntime8();
11417      let injectedStyles = runtime.injectedStyles.get(targetDocument);
11418      if (!injectedStyles) {
11419        injectedStyles = /* @__PURE__ */ new Set();
11420        runtime.injectedStyles.set(targetDocument, injectedStyles);
11421      }
11422      if (injectedStyles.has(hash)) {
11423        return;
11424      }
11425      if (documentContainsStyleHash8(targetDocument, hash)) {
11426        injectedStyles.add(hash);
11427        return;
11428      }
11429      const style = targetDocument.createElement("style");
11430      style.setAttribute(STYLE_HASH_ATTRIBUTE8, hash);
11431      style.appendChild(targetDocument.createTextNode(css));
11432      targetDocument.head.appendChild(style);
11433      injectedStyles.add(hash);
11434    }
11435    function registerDocument8(targetDocument) {
11436      const runtime = getRuntime8();
11437      runtime.documents.set(
11438        targetDocument,
11439        (runtime.documents.get(targetDocument) ?? 0) + 1
11440      );
11441      for (const [hash, css] of runtime.styles) {
11442        injectStyle8(targetDocument, hash, css);
11443      }
11444      return () => {
11445        const count = runtime.documents.get(targetDocument);
11446        if (count === void 0) {
11447          return;
11448        }
11449        if (count <= 1) {
11450          runtime.documents.delete(targetDocument);
11451          return;
11452        }
11453        runtime.documents.set(targetDocument, count - 1);
11454      };
11455    }
11456    function registerStyle8(hash, css) {
11457      const runtime = getRuntime8();
11458      runtime.styles.set(hash, css);
11459      for (const targetDocument of runtime.documents.keys()) {
11460        injectStyle8(targetDocument, hash, css);
11461      }
11462    }
11463    if (typeof process === "undefined" || true) {
11464      registerStyle8("effc4e3032", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}');
11465    }
11466    var style_default7 = { "button": "_97b0fc33c028be1a__button", "is-unstyled": "abbb272e2ce49bd6__is-unstyled", "is-loading": "_914b42f315c0e580__is-loading", "is-small": "_908205475f9f2a92__is-small", "icon": "_9f6fc6553aeb36fe__icon", "is-brand": "dd460c965226cc77__is-brand", "is-outline": "_62d5a778b7b258ee__is-outline", "is-minimal": "ad0619a3217c6a5b__is-minimal", "is-neutral": "e722a8f96726aa99__is-neutral", "is-solid": "b50b3358c5fb4d0b__is-solid", "is-compact": "cf59cf1b69629838__is-compact", "loading-animation": "_5a1d53da6f830c8d__loading-animation" };
11467    var ButtonIcon = (0, import_element24.forwardRef)(
11468      function ButtonIcon2({ className, icon, ...props }, ref) {
11469        return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
11470          Icon,
11471          {
11472            ref,
11473            icon,
11474            className: clsx_default(style_default7.icon, className),
11475            size: 24,
11476            ...props
11477          }
11478        );
11479      }
11480    );
11481  
11482    // packages/ui/build-module/button/index.mjs
11483    ButtonIcon.displayName = "Button.Icon";
11484    var Button6 = Object.assign(Button5, {
11485      /**
11486       * An icon component specifically designed to work well when rendered inside
11487       * a `Button` component.
11488       */
11489      Icon: ButtonIcon
11490    });
11491  
11492    // packages/ui/build-module/icon-button/icon-button.mjs
11493    var import_element25 = __toESM(require_element(), 1);
11494    var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
11495    var STYLE_HASH_ATTRIBUTE9 = "data-wp-hash";
11496    function getRuntime9() {
11497      const globalScope = globalThis;
11498      if (globalScope.__wpStyleRuntime) {
11499        return globalScope.__wpStyleRuntime;
11500      }
11501      globalScope.__wpStyleRuntime = {
11502        documents: /* @__PURE__ */ new Map(),
11503        styles: /* @__PURE__ */ new Map(),
11504        injectedStyles: /* @__PURE__ */ new WeakMap()
11505      };
11506      if (typeof document !== "undefined") {
11507        registerDocument9(document);
11508      }
11509      return globalScope.__wpStyleRuntime;
11510    }
11511    function documentContainsStyleHash9(targetDocument, hash) {
11512      if (!targetDocument.head) {
11513        return false;
11514      }
11515      for (const style of targetDocument.head.querySelectorAll(
11516        `style[$STYLE_HASH_ATTRIBUTE9}]`
11517      )) {
11518        if (style.getAttribute(STYLE_HASH_ATTRIBUTE9) === hash) {
11519          return true;
11520        }
11521      }
11522      return false;
11523    }
11524    function injectStyle9(targetDocument, hash, css) {
11525      if (!targetDocument.head) {
11526        return;
11527      }
11528      const runtime = getRuntime9();
11529      let injectedStyles = runtime.injectedStyles.get(targetDocument);
11530      if (!injectedStyles) {
11531        injectedStyles = /* @__PURE__ */ new Set();
11532        runtime.injectedStyles.set(targetDocument, injectedStyles);
11533      }
11534      if (injectedStyles.has(hash)) {
11535        return;
11536      }
11537      if (documentContainsStyleHash9(targetDocument, hash)) {
11538        injectedStyles.add(hash);
11539        return;
11540      }
11541      const style = targetDocument.createElement("style");
11542      style.setAttribute(STYLE_HASH_ATTRIBUTE9, hash);
11543      style.appendChild(targetDocument.createTextNode(css));
11544      targetDocument.head.appendChild(style);
11545      injectedStyles.add(hash);
11546    }
11547    function registerDocument9(targetDocument) {
11548      const runtime = getRuntime9();
11549      runtime.documents.set(
11550        targetDocument,
11551        (runtime.documents.get(targetDocument) ?? 0) + 1
11552      );
11553      for (const [hash, css] of runtime.styles) {
11554        injectStyle9(targetDocument, hash, css);
11555      }
11556      return () => {
11557        const count = runtime.documents.get(targetDocument);
11558        if (count === void 0) {
11559          return;
11560        }
11561        if (count <= 1) {
11562          runtime.documents.delete(targetDocument);
11563          return;
11564        }
11565        runtime.documents.set(targetDocument, count - 1);
11566      };
11567    }
11568    function registerStyle9(hash, css) {
11569      const runtime = getRuntime9();
11570      runtime.styles.set(hash, css);
11571      for (const targetDocument of runtime.documents.keys()) {
11572        injectStyle9(targetDocument, hash, css);
11573      }
11574    }
11575    if (typeof process === "undefined" || true) {
11576      registerStyle9("c5cdafb1bc", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer compositions{._28cfdc260e755391__icon-button{--wp-ui-button-aspect-ratio:1;--wp-ui-button-padding-inline:0px;--wp-ui-button-min-width:unset}.f1c70d719989a85a__icon{margin:-1px}}}");
11577    }
11578    var style_default8 = { "icon-button": "_28cfdc260e755391__icon-button", "icon": "f1c70d719989a85a__icon" };
11579    var IconButton = (0, import_element25.forwardRef)(
11580      function IconButton2({
11581        label,
11582        className,
11583        // Prevent accidental forwarding of `children`
11584        children: _children,
11585        disabled: disabled2,
11586        focusableWhenDisabled = true,
11587        icon,
11588        size: size4,
11589        shortcut,
11590        positioner,
11591        "aria-describedby": ariaDescribedBy,
11592        "aria-keyshortcuts": ariaKeyShortcuts,
11593        ...restProps
11594      }, ref) {
11595        const classes = clsx_default(style_default8["icon-button"], className);
11596        const { descriptionId, targetProps } = useKeyboardShortcutProps({
11597          "aria-describedby": ariaDescribedBy,
11598          "aria-keyshortcuts": ariaKeyShortcuts,
11599          shortcut
11600        });
11601        return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Root, { children: [
11602          /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
11603            Trigger,
11604            {
11605              ref,
11606              ...targetProps,
11607              disabled: disabled2 && !focusableWhenDisabled,
11608              render: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11609                Button6,
11610                {
11611                  ...restProps,
11612                  size: size4,
11613                  "aria-label": label,
11614                  disabled: disabled2,
11615                  focusableWhenDisabled
11616                }
11617              ),
11618              className: classes,
11619              children: [
11620                /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, { icon, size: 24, className: style_default8.icon }),
11621                shortcut && descriptionId && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11622                  KeyboardShortcutDescription,
11623                  {
11624                    descriptionId,
11625                    shortcut
11626                  }
11627                )
11628              ]
11629            }
11630          ),
11631          /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Popup, { positioner, children: [
11632            label,
11633            shortcut && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
11634              " ",
11635              /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(KeyboardShortcutDisplay, { shortcut })
11636            ] })
11637          ] })
11638        ] });
11639      }
11640    );
11641  
11642    // packages/ui/build-module/card/index.mjs
11643    var card_exports = {};
11644    __export(card_exports, {
11645      Content: () => Content,
11646      FullBleed: () => FullBleed,
11647      Header: () => Header,
11648      Root: () => Root2,
11649      Title: () => Title
11650    });
11651  
11652    // packages/ui/build-module/card/root.mjs
11653    var import_element26 = __toESM(require_element(), 1);
11654    var STYLE_HASH_ATTRIBUTE10 = "data-wp-hash";
11655    function getRuntime10() {
11656      const globalScope = globalThis;
11657      if (globalScope.__wpStyleRuntime) {
11658        return globalScope.__wpStyleRuntime;
11659      }
11660      globalScope.__wpStyleRuntime = {
11661        documents: /* @__PURE__ */ new Map(),
11662        styles: /* @__PURE__ */ new Map(),
11663        injectedStyles: /* @__PURE__ */ new WeakMap()
11664      };
11665      if (typeof document !== "undefined") {
11666        registerDocument10(document);
11667      }
11668      return globalScope.__wpStyleRuntime;
11669    }
11670    function documentContainsStyleHash10(targetDocument, hash) {
11671      if (!targetDocument.head) {
11672        return false;
11673      }
11674      for (const style of targetDocument.head.querySelectorAll(
11675        `style[$STYLE_HASH_ATTRIBUTE10}]`
11676      )) {
11677        if (style.getAttribute(STYLE_HASH_ATTRIBUTE10) === hash) {
11678          return true;
11679        }
11680      }
11681      return false;
11682    }
11683    function injectStyle10(targetDocument, hash, css) {
11684      if (!targetDocument.head) {
11685        return;
11686      }
11687      const runtime = getRuntime10();
11688      let injectedStyles = runtime.injectedStyles.get(targetDocument);
11689      if (!injectedStyles) {
11690        injectedStyles = /* @__PURE__ */ new Set();
11691        runtime.injectedStyles.set(targetDocument, injectedStyles);
11692      }
11693      if (injectedStyles.has(hash)) {
11694        return;
11695      }
11696      if (documentContainsStyleHash10(targetDocument, hash)) {
11697        injectedStyles.add(hash);
11698        return;
11699      }
11700      const style = targetDocument.createElement("style");
11701      style.setAttribute(STYLE_HASH_ATTRIBUTE10, hash);
11702      style.appendChild(targetDocument.createTextNode(css));
11703      targetDocument.head.appendChild(style);
11704      injectedStyles.add(hash);
11705    }
11706    function registerDocument10(targetDocument) {
11707      const runtime = getRuntime10();
11708      runtime.documents.set(
11709        targetDocument,
11710        (runtime.documents.get(targetDocument) ?? 0) + 1
11711      );
11712      for (const [hash, css] of runtime.styles) {
11713        injectStyle10(targetDocument, hash, css);
11714      }
11715      return () => {
11716        const count = runtime.documents.get(targetDocument);
11717        if (count === void 0) {
11718          return;
11719        }
11720        if (count <= 1) {
11721          runtime.documents.delete(targetDocument);
11722          return;
11723        }
11724        runtime.documents.set(targetDocument, count - 1);
11725      };
11726    }
11727    function registerStyle10(hash, css) {
11728      const runtime = getRuntime10();
11729      runtime.styles.set(hash, css);
11730      for (const targetDocument of runtime.documents.keys()) {
11731        injectStyle10(targetDocument, hash, css);
11732      }
11733    }
11734    if (typeof process === "undefined" || true) {
11735      registerStyle10("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
11736    }
11737    var resets_default4 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
11738    if (typeof process === "undefined" || true) {
11739      registerStyle10("cb866dcef6", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");
11740    }
11741    var style_default9 = { "root": "_02872bf298eadc43__root", "header": "bbccc92e6ba5662d__header", "content": "_5dffdaf2a6e669ac__content", "fullbleed": "c1fa192587e1b4a6__fullbleed" };
11742    var Root2 = (0, import_element26.forwardRef)(function Card({ render, ...restProps }, ref) {
11743      const mergedClassName = clsx_default(style_default9.root, resets_default4["box-sizing"]);
11744      const element = useRender({
11745        defaultTagName: "div",
11746        render,
11747        ref,
11748        props: mergeProps({ className: mergedClassName }, restProps)
11749      });
11750      return element;
11751    });
11752  
11753    // packages/ui/build-module/card/header.mjs
11754    var import_element27 = __toESM(require_element(), 1);
11755    var STYLE_HASH_ATTRIBUTE11 = "data-wp-hash";
11756    function getRuntime11() {
11757      const globalScope = globalThis;
11758      if (globalScope.__wpStyleRuntime) {
11759        return globalScope.__wpStyleRuntime;
11760      }
11761      globalScope.__wpStyleRuntime = {
11762        documents: /* @__PURE__ */ new Map(),
11763        styles: /* @__PURE__ */ new Map(),
11764        injectedStyles: /* @__PURE__ */ new WeakMap()
11765      };
11766      if (typeof document !== "undefined") {
11767        registerDocument11(document);
11768      }
11769      return globalScope.__wpStyleRuntime;
11770    }
11771    function documentContainsStyleHash11(targetDocument, hash) {
11772      if (!targetDocument.head) {
11773        return false;
11774      }
11775      for (const style of targetDocument.head.querySelectorAll(
11776        `style[$STYLE_HASH_ATTRIBUTE11}]`
11777      )) {
11778        if (style.getAttribute(STYLE_HASH_ATTRIBUTE11) === hash) {
11779          return true;
11780        }
11781      }
11782      return false;
11783    }
11784    function injectStyle11(targetDocument, hash, css) {
11785      if (!targetDocument.head) {
11786        return;
11787      }
11788      const runtime = getRuntime11();
11789      let injectedStyles = runtime.injectedStyles.get(targetDocument);
11790      if (!injectedStyles) {
11791        injectedStyles = /* @__PURE__ */ new Set();
11792        runtime.injectedStyles.set(targetDocument, injectedStyles);
11793      }
11794      if (injectedStyles.has(hash)) {
11795        return;
11796      }
11797      if (documentContainsStyleHash11(targetDocument, hash)) {
11798        injectedStyles.add(hash);
11799        return;
11800      }
11801      const style = targetDocument.createElement("style");
11802      style.setAttribute(STYLE_HASH_ATTRIBUTE11, hash);
11803      style.appendChild(targetDocument.createTextNode(css));
11804      targetDocument.head.appendChild(style);
11805      injectedStyles.add(hash);
11806    }
11807    function registerDocument11(targetDocument) {
11808      const runtime = getRuntime11();
11809      runtime.documents.set(
11810        targetDocument,
11811        (runtime.documents.get(targetDocument) ?? 0) + 1
11812      );
11813      for (const [hash, css] of runtime.styles) {
11814        injectStyle11(targetDocument, hash, css);
11815      }
11816      return () => {
11817        const count = runtime.documents.get(targetDocument);
11818        if (count === void 0) {
11819          return;
11820        }
11821        if (count <= 1) {
11822          runtime.documents.delete(targetDocument);
11823          return;
11824        }
11825        runtime.documents.set(targetDocument, count - 1);
11826      };
11827    }
11828    function registerStyle11(hash, css) {
11829      const runtime = getRuntime11();
11830      runtime.styles.set(hash, css);
11831      for (const targetDocument of runtime.documents.keys()) {
11832        injectStyle11(targetDocument, hash, css);
11833      }
11834    }
11835    if (typeof process === "undefined" || true) {
11836      registerStyle11("cb866dcef6", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");
11837    }
11838    var style_default10 = { "root": "_02872bf298eadc43__root", "header": "bbccc92e6ba5662d__header", "content": "_5dffdaf2a6e669ac__content", "fullbleed": "c1fa192587e1b4a6__fullbleed" };
11839    var Header = (0, import_element27.forwardRef)(
11840      function CardHeader({ render, ...props }, ref) {
11841        const element = useRender({
11842          defaultTagName: "div",
11843          render,
11844          ref,
11845          props: mergeProps({ className: style_default10.header }, props)
11846        });
11847        return element;
11848      }
11849    );
11850  
11851    // packages/ui/build-module/card/content.mjs
11852    var import_element28 = __toESM(require_element(), 1);
11853    var STYLE_HASH_ATTRIBUTE12 = "data-wp-hash";
11854    function getRuntime12() {
11855      const globalScope = globalThis;
11856      if (globalScope.__wpStyleRuntime) {
11857        return globalScope.__wpStyleRuntime;
11858      }
11859      globalScope.__wpStyleRuntime = {
11860        documents: /* @__PURE__ */ new Map(),
11861        styles: /* @__PURE__ */ new Map(),
11862        injectedStyles: /* @__PURE__ */ new WeakMap()
11863      };
11864      if (typeof document !== "undefined") {
11865        registerDocument12(document);
11866      }
11867      return globalScope.__wpStyleRuntime;
11868    }
11869    function documentContainsStyleHash12(targetDocument, hash) {
11870      if (!targetDocument.head) {
11871        return false;
11872      }
11873      for (const style of targetDocument.head.querySelectorAll(
11874        `style[$STYLE_HASH_ATTRIBUTE12}]`
11875      )) {
11876        if (style.getAttribute(STYLE_HASH_ATTRIBUTE12) === hash) {
11877          return true;
11878        }
11879      }
11880      return false;
11881    }
11882    function injectStyle12(targetDocument, hash, css) {
11883      if (!targetDocument.head) {
11884        return;
11885      }
11886      const runtime = getRuntime12();
11887      let injectedStyles = runtime.injectedStyles.get(targetDocument);
11888      if (!injectedStyles) {
11889        injectedStyles = /* @__PURE__ */ new Set();
11890        runtime.injectedStyles.set(targetDocument, injectedStyles);
11891      }
11892      if (injectedStyles.has(hash)) {
11893        return;
11894      }
11895      if (documentContainsStyleHash12(targetDocument, hash)) {
11896        injectedStyles.add(hash);
11897        return;
11898      }
11899      const style = targetDocument.createElement("style");
11900      style.setAttribute(STYLE_HASH_ATTRIBUTE12, hash);
11901      style.appendChild(targetDocument.createTextNode(css));
11902      targetDocument.head.appendChild(style);
11903      injectedStyles.add(hash);
11904    }
11905    function registerDocument12(targetDocument) {
11906      const runtime = getRuntime12();
11907      runtime.documents.set(
11908        targetDocument,
11909        (runtime.documents.get(targetDocument) ?? 0) + 1
11910      );
11911      for (const [hash, css] of runtime.styles) {
11912        injectStyle12(targetDocument, hash, css);
11913      }
11914      return () => {
11915        const count = runtime.documents.get(targetDocument);
11916        if (count === void 0) {
11917          return;
11918        }
11919        if (count <= 1) {
11920          runtime.documents.delete(targetDocument);
11921          return;
11922        }
11923        runtime.documents.set(targetDocument, count - 1);
11924      };
11925    }
11926    function registerStyle12(hash, css) {
11927      const runtime = getRuntime12();
11928      runtime.styles.set(hash, css);
11929      for (const targetDocument of runtime.documents.keys()) {
11930        injectStyle12(targetDocument, hash, css);
11931      }
11932    }
11933    if (typeof process === "undefined" || true) {
11934      registerStyle12("cb866dcef6", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");
11935    }
11936    var style_default11 = { "root": "_02872bf298eadc43__root", "header": "bbccc92e6ba5662d__header", "content": "_5dffdaf2a6e669ac__content", "fullbleed": "c1fa192587e1b4a6__fullbleed" };
11937    var Content = (0, import_element28.forwardRef)(
11938      function CardContent({ render, ...props }, ref) {
11939        const element = useRender({
11940          defaultTagName: "div",
11941          render,
11942          ref,
11943          props: mergeProps({ className: style_default11.content }, props)
11944        });
11945        return element;
11946      }
11947    );
11948  
11949    // packages/ui/build-module/card/full-bleed.mjs
11950    var import_element29 = __toESM(require_element(), 1);
11951    var STYLE_HASH_ATTRIBUTE13 = "data-wp-hash";
11952    function getRuntime13() {
11953      const globalScope = globalThis;
11954      if (globalScope.__wpStyleRuntime) {
11955        return globalScope.__wpStyleRuntime;
11956      }
11957      globalScope.__wpStyleRuntime = {
11958        documents: /* @__PURE__ */ new Map(),
11959        styles: /* @__PURE__ */ new Map(),
11960        injectedStyles: /* @__PURE__ */ new WeakMap()
11961      };
11962      if (typeof document !== "undefined") {
11963        registerDocument13(document);
11964      }
11965      return globalScope.__wpStyleRuntime;
11966    }
11967    function documentContainsStyleHash13(targetDocument, hash) {
11968      if (!targetDocument.head) {
11969        return false;
11970      }
11971      for (const style of targetDocument.head.querySelectorAll(
11972        `style[$STYLE_HASH_ATTRIBUTE13}]`
11973      )) {
11974        if (style.getAttribute(STYLE_HASH_ATTRIBUTE13) === hash) {
11975          return true;
11976        }
11977      }
11978      return false;
11979    }
11980    function injectStyle13(targetDocument, hash, css) {
11981      if (!targetDocument.head) {
11982        return;
11983      }
11984      const runtime = getRuntime13();
11985      let injectedStyles = runtime.injectedStyles.get(targetDocument);
11986      if (!injectedStyles) {
11987        injectedStyles = /* @__PURE__ */ new Set();
11988        runtime.injectedStyles.set(targetDocument, injectedStyles);
11989      }
11990      if (injectedStyles.has(hash)) {
11991        return;
11992      }
11993      if (documentContainsStyleHash13(targetDocument, hash)) {
11994        injectedStyles.add(hash);
11995        return;
11996      }
11997      const style = targetDocument.createElement("style");
11998      style.setAttribute(STYLE_HASH_ATTRIBUTE13, hash);
11999      style.appendChild(targetDocument.createTextNode(css));
12000      targetDocument.head.appendChild(style);
12001      injectedStyles.add(hash);
12002    }
12003    function registerDocument13(targetDocument) {
12004      const runtime = getRuntime13();
12005      runtime.documents.set(
12006        targetDocument,
12007        (runtime.documents.get(targetDocument) ?? 0) + 1
12008      );
12009      for (const [hash, css] of runtime.styles) {
12010        injectStyle13(targetDocument, hash, css);
12011      }
12012      return () => {
12013        const count = runtime.documents.get(targetDocument);
12014        if (count === void 0) {
12015          return;
12016        }
12017        if (count <= 1) {
12018          runtime.documents.delete(targetDocument);
12019          return;
12020        }
12021        runtime.documents.set(targetDocument, count - 1);
12022      };
12023    }
12024    function registerStyle13(hash, css) {
12025      const runtime = getRuntime13();
12026      runtime.styles.set(hash, css);
12027      for (const targetDocument of runtime.documents.keys()) {
12028        injectStyle13(targetDocument, hash, css);
12029      }
12030    }
12031    if (typeof process === "undefined" || true) {
12032      registerStyle13("cb866dcef6", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");
12033    }
12034    var style_default12 = { "root": "_02872bf298eadc43__root", "header": "bbccc92e6ba5662d__header", "content": "_5dffdaf2a6e669ac__content", "fullbleed": "c1fa192587e1b4a6__fullbleed" };
12035    var FullBleed = (0, import_element29.forwardRef)(
12036      function CardFullBleed({ render, ...props }, ref) {
12037        const element = useRender({
12038          defaultTagName: "div",
12039          render,
12040          ref,
12041          props: mergeProps(
12042            { className: style_default12.fullbleed },
12043            props
12044          )
12045        });
12046        return element;
12047      }
12048    );
12049  
12050    // packages/ui/build-module/card/title.mjs
12051    var import_element30 = __toESM(require_element(), 1);
12052    var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
12053    var DEFAULT_TAG = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", {});
12054    var Title = (0, import_element30.forwardRef)(
12055      function CardTitle({ render = DEFAULT_TAG, children, ...props }, ref) {
12056        return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
12057          Text,
12058          {
12059            ref,
12060            variant: "heading-lg",
12061            render,
12062            ...props,
12063            children
12064          }
12065        );
12066      }
12067    );
12068  
12069    // packages/ui/build-module/collapsible/panel.mjs
12070    var import_element31 = __toESM(require_element(), 1);
12071    var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
12072    var Panel2 = (0, import_element31.forwardRef)(
12073      function CollapsiblePanel3(props, forwardedRef) {
12074        return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(index_parts_exports.Panel, { ref: forwardedRef, ...props });
12075      }
12076    );
12077  
12078    // packages/ui/build-module/collapsible/root.mjs
12079    var import_element32 = __toESM(require_element(), 1);
12080    var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
12081    var Root3 = (0, import_element32.forwardRef)(
12082      function CollapsibleRoot3(props, forwardedRef) {
12083        return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(index_parts_exports.Root, { ref: forwardedRef, ...props });
12084      }
12085    );
12086  
12087    // packages/ui/build-module/collapsible/trigger.mjs
12088    var import_element33 = __toESM(require_element(), 1);
12089    var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
12090    var Trigger2 = (0, import_element33.forwardRef)(
12091      function CollapsibleTrigger3(props, forwardedRef) {
12092        return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(index_parts_exports.Trigger, { ref: forwardedRef, ...props });
12093      }
12094    );
12095  
12096    // packages/ui/build-module/collapsible-card/index.mjs
12097    var collapsible_card_exports = {};
12098    __export(collapsible_card_exports, {
12099      Content: () => Content2,
12100      Header: () => Header2,
12101      HeaderDescription: () => HeaderDescription,
12102      Root: () => Root32
12103    });
12104  
12105    // packages/ui/build-module/collapsible-card/root.mjs
12106    var import_element34 = __toESM(require_element(), 1);
12107    var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
12108    var Root32 = (0, import_element34.forwardRef)(
12109      function CollapsibleCardRoot({ render, ...restProps }, ref) {
12110        return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12111          Root3,
12112          {
12113            ref,
12114            render: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Root2, { render }),
12115            ...restProps
12116          }
12117        );
12118      }
12119    );
12120  
12121    // packages/ui/build-module/collapsible-card/header.mjs
12122    var import_compose3 = __toESM(require_compose(), 1);
12123    var import_element36 = __toESM(require_element(), 1);
12124  
12125    // packages/ui/build-module/collapsible-card/context.mjs
12126    var import_element35 = __toESM(require_element(), 1);
12127    var HeaderDescriptionIdContext = (0, import_element35.createContext)(null);
12128  
12129    // packages/ui/build-module/collapsible-card/header.mjs
12130    var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
12131    var STYLE_HASH_ATTRIBUTE14 = "data-wp-hash";
12132    function getRuntime14() {
12133      const globalScope = globalThis;
12134      if (globalScope.__wpStyleRuntime) {
12135        return globalScope.__wpStyleRuntime;
12136      }
12137      globalScope.__wpStyleRuntime = {
12138        documents: /* @__PURE__ */ new Map(),
12139        styles: /* @__PURE__ */ new Map(),
12140        injectedStyles: /* @__PURE__ */ new WeakMap()
12141      };
12142      if (typeof document !== "undefined") {
12143        registerDocument14(document);
12144      }
12145      return globalScope.__wpStyleRuntime;
12146    }
12147    function documentContainsStyleHash14(targetDocument, hash) {
12148      if (!targetDocument.head) {
12149        return false;
12150      }
12151      for (const style of targetDocument.head.querySelectorAll(
12152        `style[$STYLE_HASH_ATTRIBUTE14}]`
12153      )) {
12154        if (style.getAttribute(STYLE_HASH_ATTRIBUTE14) === hash) {
12155          return true;
12156        }
12157      }
12158      return false;
12159    }
12160    function injectStyle14(targetDocument, hash, css) {
12161      if (!targetDocument.head) {
12162        return;
12163      }
12164      const runtime = getRuntime14();
12165      let injectedStyles = runtime.injectedStyles.get(targetDocument);
12166      if (!injectedStyles) {
12167        injectedStyles = /* @__PURE__ */ new Set();
12168        runtime.injectedStyles.set(targetDocument, injectedStyles);
12169      }
12170      if (injectedStyles.has(hash)) {
12171        return;
12172      }
12173      if (documentContainsStyleHash14(targetDocument, hash)) {
12174        injectedStyles.add(hash);
12175        return;
12176      }
12177      const style = targetDocument.createElement("style");
12178      style.setAttribute(STYLE_HASH_ATTRIBUTE14, hash);
12179      style.appendChild(targetDocument.createTextNode(css));
12180      targetDocument.head.appendChild(style);
12181      injectedStyles.add(hash);
12182    }
12183    function registerDocument14(targetDocument) {
12184      const runtime = getRuntime14();
12185      runtime.documents.set(
12186        targetDocument,
12187        (runtime.documents.get(targetDocument) ?? 0) + 1
12188      );
12189      for (const [hash, css] of runtime.styles) {
12190        injectStyle14(targetDocument, hash, css);
12191      }
12192      return () => {
12193        const count = runtime.documents.get(targetDocument);
12194        if (count === void 0) {
12195          return;
12196        }
12197        if (count <= 1) {
12198          runtime.documents.delete(targetDocument);
12199          return;
12200        }
12201        runtime.documents.set(targetDocument, count - 1);
12202      };
12203    }
12204    function registerStyle14(hash, css) {
12205      const runtime = getRuntime14();
12206      runtime.styles.set(hash, css);
12207      for (const targetDocument of runtime.documents.keys()) {
12208        injectStyle14(targetDocument, hash, css);
12209      }
12210    }
12211    if (typeof process === "undefined" || true) {
12212      registerStyle14("64bdb4d46e", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._626190151275d6d3__heading-wrapper{--_gcd-heading-color:inherit;--_gcd-heading-font-size:inherit;--_gcd-heading-font-weight:inherit;--_gcd-heading-margin:0;font-family:inherit;line-height:inherit}.cab17c7a373cb60d__header-content{flex:1;min-width:0}._92ebbaa30c8a1d05__header-description{color:var(--wpds-color-foreground-content-neutral-weak,#707070)}.dd89d27c4f15912d__header-trigger-positioner{align-self:flex-start;flex-shrink:0;margin-block-start:calc(var(--wpds-typography-line-height-sm, 20px)/2);max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._03cfdbcd710393c9__overflow-visible{overflow:visible}&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}}");
12213    }
12214    var style_default13 = { "heading-wrapper": "_626190151275d6d3__heading-wrapper", "header-content": "cab17c7a373cb60d__header-content", "header-description": "_92ebbaa30c8a1d05__header-description", "header-trigger-positioner": "dd89d27c4f15912d__header-trigger-positioner", "header-trigger-wrapper": "bcfab5f2448bafef__header-trigger-wrapper", "header-trigger": "_3106f8d2b0330faa__header-trigger", "header": "_5d2dfcb4085c6d0f__header", "content": "e34cf37ccd0d81e0__content", "overflow-visible": "_03cfdbcd710393c9__overflow-visible", "content-inner": "_41bfdbf7b6c087c2__content-inner" };
12215    if (typeof process === "undefined" || true) {
12216      registerStyle14("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
12217    }
12218    var global_css_defense_default4 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
12219    if (typeof process === "undefined" || true) {
12220      registerStyle14("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
12221    }
12222    var focus_module_default3 = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
12223    var Header2 = (0, import_element36.forwardRef)(
12224      function CollapsibleCardHeader({
12225        children,
12226        className,
12227        render,
12228        "aria-describedby": ariaDescribedByProp,
12229        ...restProps
12230      }, ref) {
12231        const [descriptionIds, setDescriptionIds] = (0, import_element36.useState)(
12232          []
12233        );
12234        const [orderedDescriptionIds, setOrderedDescriptionIds] = (0, import_element36.useState)([]);
12235        const headerContentRef = (0, import_element36.useRef)(null);
12236        const registerDescriptionId = (0, import_element36.useCallback)((id) => {
12237          setDescriptionIds((currentDescriptionIds) => {
12238            if (currentDescriptionIds.includes(id)) {
12239              return currentDescriptionIds;
12240            }
12241            return [...currentDescriptionIds, id];
12242          });
12243          return () => {
12244            setDescriptionIds(
12245              (currentDescriptionIds) => currentDescriptionIds.filter(
12246                (descriptionId) => descriptionId !== id
12247              )
12248            );
12249          };
12250        }, []);
12251        const contextValue = (0, import_element36.useMemo)(
12252          () => ({ registerDescriptionId }),
12253          [registerDescriptionId]
12254        );
12255        (0, import_compose3.useIsomorphicLayoutEffect)(() => {
12256          const registeredDescriptionIds = new Set(descriptionIds);
12257          const nextDescriptionIds = Array.from(
12258            headerContentRef.current?.querySelectorAll("[id]") ?? []
12259          ).map((element) => element.id).filter((id) => registeredDescriptionIds.has(id));
12260          setOrderedDescriptionIds((currentDescriptionIds) => {
12261            if (currentDescriptionIds.length === nextDescriptionIds.length && currentDescriptionIds.every(
12262              (id, index2) => id === nextDescriptionIds[index2]
12263            )) {
12264              return currentDescriptionIds;
12265            }
12266            return nextDescriptionIds;
12267          });
12268        });
12269        const ariaDescribedBy = Array.from(
12270          /* @__PURE__ */ new Set([
12271            ...ariaDescribedByProp?.split(/\s+/).filter(Boolean) ?? [],
12272            ...orderedDescriptionIds
12273          ])
12274        ).join(" ") || void 0;
12275        return useRender({
12276          defaultTagName: "div",
12277          render,
12278          ref,
12279          props: mergeProps(restProps, {
12280            className: clsx_default(
12281              global_css_defense_default4.heading,
12282              style_default13["heading-wrapper"],
12283              className
12284            ),
12285            children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(HeaderDescriptionIdContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
12286              Trigger2,
12287              {
12288                className: style_default13.header,
12289                render: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Header, {}),
12290                nativeButton: false,
12291                "aria-describedby": ariaDescribedBy,
12292                children: [
12293                  /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
12294                    "div",
12295                    {
12296                      ref: headerContentRef,
12297                      className: style_default13["header-content"],
12298                      children
12299                    }
12300                  ),
12301                  /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
12302                    "div",
12303                    {
12304                      className: clsx_default(
12305                        style_default13["header-trigger-positioner"]
12306                      ),
12307                      children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
12308                        "div",
12309                        {
12310                          className: clsx_default(
12311                            style_default13["header-trigger-wrapper"],
12312                            global_css_defense_default4.div,
12313                            // While the interactive trigger element is the whole header,
12314                            // the focus ring will be displayed only on the icon to visually
12315                            // emulate it being the button.
12316                            focus_module_default3["outset-ring--focus-parent-visible"]
12317                          ),
12318                          children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
12319                            Icon,
12320                            {
12321                              icon: chevron_down_default,
12322                              className: style_default13["header-trigger"]
12323                            }
12324                          )
12325                        }
12326                      )
12327                    }
12328                  )
12329                ]
12330              }
12331            ) })
12332          })
12333        });
12334      }
12335    );
12336  
12337    // packages/ui/build-module/collapsible-card/header-description.mjs
12338    var import_element37 = __toESM(require_element(), 1);
12339    var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
12340    var STYLE_HASH_ATTRIBUTE15 = "data-wp-hash";
12341    function getRuntime15() {
12342      const globalScope = globalThis;
12343      if (globalScope.__wpStyleRuntime) {
12344        return globalScope.__wpStyleRuntime;
12345      }
12346      globalScope.__wpStyleRuntime = {
12347        documents: /* @__PURE__ */ new Map(),
12348        styles: /* @__PURE__ */ new Map(),
12349        injectedStyles: /* @__PURE__ */ new WeakMap()
12350      };
12351      if (typeof document !== "undefined") {
12352        registerDocument15(document);
12353      }
12354      return globalScope.__wpStyleRuntime;
12355    }
12356    function documentContainsStyleHash15(targetDocument, hash) {
12357      if (!targetDocument.head) {
12358        return false;
12359      }
12360      for (const style of targetDocument.head.querySelectorAll(
12361        `style[$STYLE_HASH_ATTRIBUTE15}]`
12362      )) {
12363        if (style.getAttribute(STYLE_HASH_ATTRIBUTE15) === hash) {
12364          return true;
12365        }
12366      }
12367      return false;
12368    }
12369    function injectStyle15(targetDocument, hash, css) {
12370      if (!targetDocument.head) {
12371        return;
12372      }
12373      const runtime = getRuntime15();
12374      let injectedStyles = runtime.injectedStyles.get(targetDocument);
12375      if (!injectedStyles) {
12376        injectedStyles = /* @__PURE__ */ new Set();
12377        runtime.injectedStyles.set(targetDocument, injectedStyles);
12378      }
12379      if (injectedStyles.has(hash)) {
12380        return;
12381      }
12382      if (documentContainsStyleHash15(targetDocument, hash)) {
12383        injectedStyles.add(hash);
12384        return;
12385      }
12386      const style = targetDocument.createElement("style");
12387      style.setAttribute(STYLE_HASH_ATTRIBUTE15, hash);
12388      style.appendChild(targetDocument.createTextNode(css));
12389      targetDocument.head.appendChild(style);
12390      injectedStyles.add(hash);
12391    }
12392    function registerDocument15(targetDocument) {
12393      const runtime = getRuntime15();
12394      runtime.documents.set(
12395        targetDocument,
12396        (runtime.documents.get(targetDocument) ?? 0) + 1
12397      );
12398      for (const [hash, css] of runtime.styles) {
12399        injectStyle15(targetDocument, hash, css);
12400      }
12401      return () => {
12402        const count = runtime.documents.get(targetDocument);
12403        if (count === void 0) {
12404          return;
12405        }
12406        if (count <= 1) {
12407          runtime.documents.delete(targetDocument);
12408          return;
12409        }
12410        runtime.documents.set(targetDocument, count - 1);
12411      };
12412    }
12413    function registerStyle15(hash, css) {
12414      const runtime = getRuntime15();
12415      runtime.styles.set(hash, css);
12416      for (const targetDocument of runtime.documents.keys()) {
12417        injectStyle15(targetDocument, hash, css);
12418      }
12419    }
12420    if (typeof process === "undefined" || true) {
12421      registerStyle15("64bdb4d46e", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._626190151275d6d3__heading-wrapper{--_gcd-heading-color:inherit;--_gcd-heading-font-size:inherit;--_gcd-heading-font-weight:inherit;--_gcd-heading-margin:0;font-family:inherit;line-height:inherit}.cab17c7a373cb60d__header-content{flex:1;min-width:0}._92ebbaa30c8a1d05__header-description{color:var(--wpds-color-foreground-content-neutral-weak,#707070)}.dd89d27c4f15912d__header-trigger-positioner{align-self:flex-start;flex-shrink:0;margin-block-start:calc(var(--wpds-typography-line-height-sm, 20px)/2);max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._03cfdbcd710393c9__overflow-visible{overflow:visible}&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}}");
12422    }
12423    var style_default14 = { "heading-wrapper": "_626190151275d6d3__heading-wrapper", "header-content": "cab17c7a373cb60d__header-content", "header-description": "_92ebbaa30c8a1d05__header-description", "header-trigger-positioner": "dd89d27c4f15912d__header-trigger-positioner", "header-trigger-wrapper": "bcfab5f2448bafef__header-trigger-wrapper", "header-trigger": "_3106f8d2b0330faa__header-trigger", "header": "_5d2dfcb4085c6d0f__header", "content": "e34cf37ccd0d81e0__content", "overflow-visible": "_03cfdbcd710393c9__overflow-visible", "content-inner": "_41bfdbf7b6c087c2__content-inner" };
12424    var DEFAULT_TAG2 = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", {});
12425    var HeaderDescription = (0, import_element37.forwardRef)(function CollapsibleCardHeaderDescription({ children, className, id: idProp, render = DEFAULT_TAG2, ...restProps }, ref) {
12426      const generatedId = (0, import_element37.useId)();
12427      const descriptionId = idProp ?? generatedId;
12428      const context = (0, import_element37.useContext)(HeaderDescriptionIdContext);
12429      if (!context) {
12430        throw new Error(
12431          "CollapsibleCard.HeaderDescription: Missing parent <CollapsibleCard.Header>. Render <CollapsibleCard.HeaderDescription> inside <CollapsibleCard.Header>."
12432        );
12433      }
12434      (0, import_element37.useEffect)(() => {
12435        return context?.registerDescriptionId(descriptionId);
12436      }, [context, descriptionId]);
12437      return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
12438        Text,
12439        {
12440          ref,
12441          variant: "body-md",
12442          render,
12443          id: descriptionId,
12444          "aria-hidden": "true",
12445          className: clsx_default(style_default14["header-description"], className),
12446          ...restProps,
12447          children
12448        }
12449      );
12450    });
12451  
12452    // packages/ui/build-module/collapsible-card/content.mjs
12453    var import_element38 = __toESM(require_element(), 1);
12454    var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
12455    var STYLE_HASH_ATTRIBUTE16 = "data-wp-hash";
12456    function getRuntime16() {
12457      const globalScope = globalThis;
12458      if (globalScope.__wpStyleRuntime) {
12459        return globalScope.__wpStyleRuntime;
12460      }
12461      globalScope.__wpStyleRuntime = {
12462        documents: /* @__PURE__ */ new Map(),
12463        styles: /* @__PURE__ */ new Map(),
12464        injectedStyles: /* @__PURE__ */ new WeakMap()
12465      };
12466      if (typeof document !== "undefined") {
12467        registerDocument16(document);
12468      }
12469      return globalScope.__wpStyleRuntime;
12470    }
12471    function documentContainsStyleHash16(targetDocument, hash) {
12472      if (!targetDocument.head) {
12473        return false;
12474      }
12475      for (const style of targetDocument.head.querySelectorAll(
12476        `style[$STYLE_HASH_ATTRIBUTE16}]`
12477      )) {
12478        if (style.getAttribute(STYLE_HASH_ATTRIBUTE16) === hash) {
12479          return true;
12480        }
12481      }
12482      return false;
12483    }
12484    function injectStyle16(targetDocument, hash, css) {
12485      if (!targetDocument.head) {
12486        return;
12487      }
12488      const runtime = getRuntime16();
12489      let injectedStyles = runtime.injectedStyles.get(targetDocument);
12490      if (!injectedStyles) {
12491        injectedStyles = /* @__PURE__ */ new Set();
12492        runtime.injectedStyles.set(targetDocument, injectedStyles);
12493      }
12494      if (injectedStyles.has(hash)) {
12495        return;
12496      }
12497      if (documentContainsStyleHash16(targetDocument, hash)) {
12498        injectedStyles.add(hash);
12499        return;
12500      }
12501      const style = targetDocument.createElement("style");
12502      style.setAttribute(STYLE_HASH_ATTRIBUTE16, hash);
12503      style.appendChild(targetDocument.createTextNode(css));
12504      targetDocument.head.appendChild(style);
12505      injectedStyles.add(hash);
12506    }
12507    function registerDocument16(targetDocument) {
12508      const runtime = getRuntime16();
12509      runtime.documents.set(
12510        targetDocument,
12511        (runtime.documents.get(targetDocument) ?? 0) + 1
12512      );
12513      for (const [hash, css] of runtime.styles) {
12514        injectStyle16(targetDocument, hash, css);
12515      }
12516      return () => {
12517        const count = runtime.documents.get(targetDocument);
12518        if (count === void 0) {
12519          return;
12520        }
12521        if (count <= 1) {
12522          runtime.documents.delete(targetDocument);
12523          return;
12524        }
12525        runtime.documents.set(targetDocument, count - 1);
12526      };
12527    }
12528    function registerStyle16(hash, css) {
12529      const runtime = getRuntime16();
12530      runtime.styles.set(hash, css);
12531      for (const targetDocument of runtime.documents.keys()) {
12532        injectStyle16(targetDocument, hash, css);
12533      }
12534    }
12535    if (typeof process === "undefined" || true) {
12536      registerStyle16("64bdb4d46e", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._626190151275d6d3__heading-wrapper{--_gcd-heading-color:inherit;--_gcd-heading-font-size:inherit;--_gcd-heading-font-weight:inherit;--_gcd-heading-margin:0;font-family:inherit;line-height:inherit}.cab17c7a373cb60d__header-content{flex:1;min-width:0}._92ebbaa30c8a1d05__header-description{color:var(--wpds-color-foreground-content-neutral-weak,#707070)}.dd89d27c4f15912d__header-trigger-positioner{align-self:flex-start;flex-shrink:0;margin-block-start:calc(var(--wpds-typography-line-height-sm, 20px)/2);max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._03cfdbcd710393c9__overflow-visible{overflow:visible}&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}}");
12537    }
12538    var style_default15 = { "heading-wrapper": "_626190151275d6d3__heading-wrapper", "header-content": "cab17c7a373cb60d__header-content", "header-description": "_92ebbaa30c8a1d05__header-description", "header-trigger-positioner": "dd89d27c4f15912d__header-trigger-positioner", "header-trigger-wrapper": "bcfab5f2448bafef__header-trigger-wrapper", "header-trigger": "_3106f8d2b0330faa__header-trigger", "header": "_5d2dfcb4085c6d0f__header", "content": "e34cf37ccd0d81e0__content", "overflow-visible": "_03cfdbcd710393c9__overflow-visible", "content-inner": "_41bfdbf7b6c087c2__content-inner" };
12539    var Content2 = (0, import_element38.forwardRef)(
12540      function CollapsibleCardContent({ className, render, children, hiddenUntilFound = true, ...restProps }, ref) {
12541        return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
12542          Panel2,
12543          {
12544            ref,
12545            className: (state) => clsx_default(
12546              style_default15.content,
12547              state.open && state.transitionStatus === "idle" && style_default15["overflow-visible"],
12548              className
12549            ),
12550            hiddenUntilFound,
12551            ...restProps,
12552            children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
12553              Content,
12554              {
12555                className: style_default15["content-inner"],
12556                render,
12557                children
12558              }
12559            )
12560          }
12561        );
12562      }
12563    );
12564  
12565    // packages/ui/build-module/stack/stack.mjs
12566    var import_element39 = __toESM(require_element(), 1);
12567    var STYLE_HASH_ATTRIBUTE17 = "data-wp-hash";
12568    function getRuntime17() {
12569      const globalScope = globalThis;
12570      if (globalScope.__wpStyleRuntime) {
12571        return globalScope.__wpStyleRuntime;
12572      }
12573      globalScope.__wpStyleRuntime = {
12574        documents: /* @__PURE__ */ new Map(),
12575        styles: /* @__PURE__ */ new Map(),
12576        injectedStyles: /* @__PURE__ */ new WeakMap()
12577      };
12578      if (typeof document !== "undefined") {
12579        registerDocument17(document);
12580      }
12581      return globalScope.__wpStyleRuntime;
12582    }
12583    function documentContainsStyleHash17(targetDocument, hash) {
12584      if (!targetDocument.head) {
12585        return false;
12586      }
12587      for (const style of targetDocument.head.querySelectorAll(
12588        `style[$STYLE_HASH_ATTRIBUTE17}]`
12589      )) {
12590        if (style.getAttribute(STYLE_HASH_ATTRIBUTE17) === hash) {
12591          return true;
12592        }
12593      }
12594      return false;
12595    }
12596    function injectStyle17(targetDocument, hash, css) {
12597      if (!targetDocument.head) {
12598        return;
12599      }
12600      const runtime = getRuntime17();
12601      let injectedStyles = runtime.injectedStyles.get(targetDocument);
12602      if (!injectedStyles) {
12603        injectedStyles = /* @__PURE__ */ new Set();
12604        runtime.injectedStyles.set(targetDocument, injectedStyles);
12605      }
12606      if (injectedStyles.has(hash)) {
12607        return;
12608      }
12609      if (documentContainsStyleHash17(targetDocument, hash)) {
12610        injectedStyles.add(hash);
12611        return;
12612      }
12613      const style = targetDocument.createElement("style");
12614      style.setAttribute(STYLE_HASH_ATTRIBUTE17, hash);
12615      style.appendChild(targetDocument.createTextNode(css));
12616      targetDocument.head.appendChild(style);
12617      injectedStyles.add(hash);
12618    }
12619    function registerDocument17(targetDocument) {
12620      const runtime = getRuntime17();
12621      runtime.documents.set(
12622        targetDocument,
12623        (runtime.documents.get(targetDocument) ?? 0) + 1
12624      );
12625      for (const [hash, css] of runtime.styles) {
12626        injectStyle17(targetDocument, hash, css);
12627      }
12628      return () => {
12629        const count = runtime.documents.get(targetDocument);
12630        if (count === void 0) {
12631          return;
12632        }
12633        if (count <= 1) {
12634          runtime.documents.delete(targetDocument);
12635          return;
12636        }
12637        runtime.documents.set(targetDocument, count - 1);
12638      };
12639    }
12640    function registerStyle17(hash, css) {
12641      const runtime = getRuntime17();
12642      runtime.styles.set(hash, css);
12643      for (const targetDocument of runtime.documents.keys()) {
12644        injectStyle17(targetDocument, hash, css);
12645      }
12646    }
12647    if (typeof process === "undefined" || true) {
12648      registerStyle17("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
12649    }
12650    var style_default16 = { "stack": "_19ce0419607e1896__stack" };
12651    var gapTokens = {
12652      xs: "var(--wpds-dimension-gap-xs, 4px)",
12653      sm: "var(--wpds-dimension-gap-sm, 8px)",
12654      md: "var(--wpds-dimension-gap-md, 12px)",
12655      lg: "var(--wpds-dimension-gap-lg, 16px)",
12656      xl: "var(--wpds-dimension-gap-xl, 24px)",
12657      "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
12658      "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
12659    };
12660    var Stack = (0, import_element39.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
12661      const style = {
12662        gap: gap && gapTokens[gap],
12663        alignItems: align,
12664        justifyContent: justify,
12665        flexDirection: direction,
12666        flexWrap: wrap
12667      };
12668      const element = useRender({
12669        render,
12670        ref,
12671        props: mergeProps(props, { style, className: style_default16.stack })
12672      });
12673      return element;
12674    });
12675  
12676    // packages/ui/build-module/notice/index.mjs
12677    var notice_exports = {};
12678    __export(notice_exports, {
12679      ActionButton: () => ActionButton,
12680      ActionLink: () => ActionLink,
12681      Actions: () => Actions,
12682      CloseIcon: () => CloseIcon,
12683      Description: () => Description,
12684      Root: () => Root4,
12685      Title: () => Title2
12686    });
12687  
12688    // packages/ui/build-module/notice/root.mjs
12689    var import_a11y2 = __toESM(require_a11y(), 1);
12690    var import_element40 = __toESM(require_element(), 1);
12691    var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
12692    var STYLE_HASH_ATTRIBUTE18 = "data-wp-hash";
12693    function getRuntime18() {
12694      const globalScope = globalThis;
12695      if (globalScope.__wpStyleRuntime) {
12696        return globalScope.__wpStyleRuntime;
12697      }
12698      globalScope.__wpStyleRuntime = {
12699        documents: /* @__PURE__ */ new Map(),
12700        styles: /* @__PURE__ */ new Map(),
12701        injectedStyles: /* @__PURE__ */ new WeakMap()
12702      };
12703      if (typeof document !== "undefined") {
12704        registerDocument18(document);
12705      }
12706      return globalScope.__wpStyleRuntime;
12707    }
12708    function documentContainsStyleHash18(targetDocument, hash) {
12709      if (!targetDocument.head) {
12710        return false;
12711      }
12712      for (const style of targetDocument.head.querySelectorAll(
12713        `style[$STYLE_HASH_ATTRIBUTE18}]`
12714      )) {
12715        if (style.getAttribute(STYLE_HASH_ATTRIBUTE18) === hash) {
12716          return true;
12717        }
12718      }
12719      return false;
12720    }
12721    function injectStyle18(targetDocument, hash, css) {
12722      if (!targetDocument.head) {
12723        return;
12724      }
12725      const runtime = getRuntime18();
12726      let injectedStyles = runtime.injectedStyles.get(targetDocument);
12727      if (!injectedStyles) {
12728        injectedStyles = /* @__PURE__ */ new Set();
12729        runtime.injectedStyles.set(targetDocument, injectedStyles);
12730      }
12731      if (injectedStyles.has(hash)) {
12732        return;
12733      }
12734      if (documentContainsStyleHash18(targetDocument, hash)) {
12735        injectedStyles.add(hash);
12736        return;
12737      }
12738      const style = targetDocument.createElement("style");
12739      style.setAttribute(STYLE_HASH_ATTRIBUTE18, hash);
12740      style.appendChild(targetDocument.createTextNode(css));
12741      targetDocument.head.appendChild(style);
12742      injectedStyles.add(hash);
12743    }
12744    function registerDocument18(targetDocument) {
12745      const runtime = getRuntime18();
12746      runtime.documents.set(
12747        targetDocument,
12748        (runtime.documents.get(targetDocument) ?? 0) + 1
12749      );
12750      for (const [hash, css] of runtime.styles) {
12751        injectStyle18(targetDocument, hash, css);
12752      }
12753      return () => {
12754        const count = runtime.documents.get(targetDocument);
12755        if (count === void 0) {
12756          return;
12757        }
12758        if (count <= 1) {
12759          runtime.documents.delete(targetDocument);
12760          return;
12761        }
12762        runtime.documents.set(targetDocument, count - 1);
12763      };
12764    }
12765    function registerStyle18(hash, css) {
12766      const runtime = getRuntime18();
12767      runtime.styles.set(hash, css);
12768      for (const targetDocument of runtime.documents.keys()) {
12769        injectStyle18(targetDocument, hash, css);
12770      }
12771    }
12772    if (typeof process === "undefined" || true) {
12773      registerStyle18("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
12774    }
12775    var resets_default5 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
12776    if (typeof process === "undefined" || true) {
12777      registerStyle18("42aad93a67", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#aac6e5);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1be80);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936400)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d19d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#007f2f)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dfafa8);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
12778    }
12779    var style_default17 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
12780    var icons = {
12781      neutral: null,
12782      info: info_default,
12783      warning: caution_default,
12784      success: published_default,
12785      error: error_default
12786    };
12787    function getDefaultPoliteness(intent) {
12788      return intent === "error" ? "assertive" : "polite";
12789    }
12790    function safeRenderToString(message) {
12791      if (!message) {
12792        return void 0;
12793      }
12794      if (typeof message === "string") {
12795        return message;
12796      }
12797      try {
12798        return (0, import_element40.renderToString)(message);
12799      } catch {
12800        return void 0;
12801      }
12802    }
12803    function useSpokenMessage(message, politeness) {
12804      const spokenMessage = safeRenderToString(message);
12805      (0, import_element40.useEffect)(() => {
12806        if (spokenMessage) {
12807          (0, import_a11y2.speak)(spokenMessage, politeness);
12808        }
12809      }, [spokenMessage, politeness]);
12810    }
12811    var Root4 = (0, import_element40.forwardRef)(function Notice({
12812      intent = "neutral",
12813      children,
12814      icon,
12815      spokenMessage = children,
12816      politeness = getDefaultPoliteness(intent),
12817      render,
12818      ...restProps
12819    }, ref) {
12820      useSpokenMessage(spokenMessage, politeness);
12821      const iconElement = icon === null ? null : icon ?? icons[intent];
12822      const mergedClassName = clsx_default(
12823        style_default17.notice,
12824        style_default17[`is-$intent}`],
12825        resets_default5["box-sizing"]
12826      );
12827      const element = useRender({
12828        defaultTagName: "div",
12829        render,
12830        ref,
12831        props: mergeProps(
12832          {
12833            className: mergedClassName,
12834            children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
12835              children,
12836              iconElement && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
12837                Icon,
12838                {
12839                  className: style_default17.icon,
12840                  icon: iconElement
12841                }
12842              )
12843            ] })
12844          },
12845          restProps
12846        )
12847      });
12848      return element;
12849    });
12850  
12851    // packages/ui/build-module/notice/title.mjs
12852    var import_element41 = __toESM(require_element(), 1);
12853    var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
12854    var STYLE_HASH_ATTRIBUTE19 = "data-wp-hash";
12855    function getRuntime19() {
12856      const globalScope = globalThis;
12857      if (globalScope.__wpStyleRuntime) {
12858        return globalScope.__wpStyleRuntime;
12859      }
12860      globalScope.__wpStyleRuntime = {
12861        documents: /* @__PURE__ */ new Map(),
12862        styles: /* @__PURE__ */ new Map(),
12863        injectedStyles: /* @__PURE__ */ new WeakMap()
12864      };
12865      if (typeof document !== "undefined") {
12866        registerDocument19(document);
12867      }
12868      return globalScope.__wpStyleRuntime;
12869    }
12870    function documentContainsStyleHash19(targetDocument, hash) {
12871      if (!targetDocument.head) {
12872        return false;
12873      }
12874      for (const style of targetDocument.head.querySelectorAll(
12875        `style[$STYLE_HASH_ATTRIBUTE19}]`
12876      )) {
12877        if (style.getAttribute(STYLE_HASH_ATTRIBUTE19) === hash) {
12878          return true;
12879        }
12880      }
12881      return false;
12882    }
12883    function injectStyle19(targetDocument, hash, css) {
12884      if (!targetDocument.head) {
12885        return;
12886      }
12887      const runtime = getRuntime19();
12888      let injectedStyles = runtime.injectedStyles.get(targetDocument);
12889      if (!injectedStyles) {
12890        injectedStyles = /* @__PURE__ */ new Set();
12891        runtime.injectedStyles.set(targetDocument, injectedStyles);
12892      }
12893      if (injectedStyles.has(hash)) {
12894        return;
12895      }
12896      if (documentContainsStyleHash19(targetDocument, hash)) {
12897        injectedStyles.add(hash);
12898        return;
12899      }
12900      const style = targetDocument.createElement("style");
12901      style.setAttribute(STYLE_HASH_ATTRIBUTE19, hash);
12902      style.appendChild(targetDocument.createTextNode(css));
12903      targetDocument.head.appendChild(style);
12904      injectedStyles.add(hash);
12905    }
12906    function registerDocument19(targetDocument) {
12907      const runtime = getRuntime19();
12908      runtime.documents.set(
12909        targetDocument,
12910        (runtime.documents.get(targetDocument) ?? 0) + 1
12911      );
12912      for (const [hash, css] of runtime.styles) {
12913        injectStyle19(targetDocument, hash, css);
12914      }
12915      return () => {
12916        const count = runtime.documents.get(targetDocument);
12917        if (count === void 0) {
12918          return;
12919        }
12920        if (count <= 1) {
12921          runtime.documents.delete(targetDocument);
12922          return;
12923        }
12924        runtime.documents.set(targetDocument, count - 1);
12925      };
12926    }
12927    function registerStyle19(hash, css) {
12928      const runtime = getRuntime19();
12929      runtime.styles.set(hash, css);
12930      for (const targetDocument of runtime.documents.keys()) {
12931        injectStyle19(targetDocument, hash, css);
12932      }
12933    }
12934    if (typeof process === "undefined" || true) {
12935      registerStyle19("42aad93a67", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#aac6e5);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1be80);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936400)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d19d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#007f2f)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dfafa8);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
12936    }
12937    var style_default18 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
12938    var Title2 = (0, import_element41.forwardRef)(
12939      function NoticeTitle({ className, ...props }, ref) {
12940        return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
12941          Text,
12942          {
12943            ref,
12944            variant: "heading-md",
12945            className: clsx_default(style_default18.title, className),
12946            ...props
12947          }
12948        );
12949      }
12950    );
12951  
12952    // packages/ui/build-module/notice/description.mjs
12953    var import_element42 = __toESM(require_element(), 1);
12954    var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
12955    var STYLE_HASH_ATTRIBUTE20 = "data-wp-hash";
12956    function getRuntime20() {
12957      const globalScope = globalThis;
12958      if (globalScope.__wpStyleRuntime) {
12959        return globalScope.__wpStyleRuntime;
12960      }
12961      globalScope.__wpStyleRuntime = {
12962        documents: /* @__PURE__ */ new Map(),
12963        styles: /* @__PURE__ */ new Map(),
12964        injectedStyles: /* @__PURE__ */ new WeakMap()
12965      };
12966      if (typeof document !== "undefined") {
12967        registerDocument20(document);
12968      }
12969      return globalScope.__wpStyleRuntime;
12970    }
12971    function documentContainsStyleHash20(targetDocument, hash) {
12972      if (!targetDocument.head) {
12973        return false;
12974      }
12975      for (const style of targetDocument.head.querySelectorAll(
12976        `style[$STYLE_HASH_ATTRIBUTE20}]`
12977      )) {
12978        if (style.getAttribute(STYLE_HASH_ATTRIBUTE20) === hash) {
12979          return true;
12980        }
12981      }
12982      return false;
12983    }
12984    function injectStyle20(targetDocument, hash, css) {
12985      if (!targetDocument.head) {
12986        return;
12987      }
12988      const runtime = getRuntime20();
12989      let injectedStyles = runtime.injectedStyles.get(targetDocument);
12990      if (!injectedStyles) {
12991        injectedStyles = /* @__PURE__ */ new Set();
12992        runtime.injectedStyles.set(targetDocument, injectedStyles);
12993      }
12994      if (injectedStyles.has(hash)) {
12995        return;
12996      }
12997      if (documentContainsStyleHash20(targetDocument, hash)) {
12998        injectedStyles.add(hash);
12999        return;
13000      }
13001      const style = targetDocument.createElement("style");
13002      style.setAttribute(STYLE_HASH_ATTRIBUTE20, hash);
13003      style.appendChild(targetDocument.createTextNode(css));
13004      targetDocument.head.appendChild(style);
13005      injectedStyles.add(hash);
13006    }
13007    function registerDocument20(targetDocument) {
13008      const runtime = getRuntime20();
13009      runtime.documents.set(
13010        targetDocument,
13011        (runtime.documents.get(targetDocument) ?? 0) + 1
13012      );
13013      for (const [hash, css] of runtime.styles) {
13014        injectStyle20(targetDocument, hash, css);
13015      }
13016      return () => {
13017        const count = runtime.documents.get(targetDocument);
13018        if (count === void 0) {
13019          return;
13020        }
13021        if (count <= 1) {
13022          runtime.documents.delete(targetDocument);
13023          return;
13024        }
13025        runtime.documents.set(targetDocument, count - 1);
13026      };
13027    }
13028    function registerStyle20(hash, css) {
13029      const runtime = getRuntime20();
13030      runtime.styles.set(hash, css);
13031      for (const targetDocument of runtime.documents.keys()) {
13032        injectStyle20(targetDocument, hash, css);
13033      }
13034    }
13035    if (typeof process === "undefined" || true) {
13036      registerStyle20("42aad93a67", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#aac6e5);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1be80);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936400)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d19d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#007f2f)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dfafa8);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
13037    }
13038    var style_default19 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
13039    var Description = (0, import_element42.forwardRef)(
13040      function NoticeDescription({ className, ...props }, ref) {
13041        return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
13042          Text,
13043          {
13044            ref,
13045            variant: "body-md",
13046            className: clsx_default(style_default19.description, className),
13047            ...props
13048          }
13049        );
13050      }
13051    );
13052  
13053    // packages/ui/build-module/notice/actions.mjs
13054    var import_element43 = __toESM(require_element(), 1);
13055    var STYLE_HASH_ATTRIBUTE21 = "data-wp-hash";
13056    function getRuntime21() {
13057      const globalScope = globalThis;
13058      if (globalScope.__wpStyleRuntime) {
13059        return globalScope.__wpStyleRuntime;
13060      }
13061      globalScope.__wpStyleRuntime = {
13062        documents: /* @__PURE__ */ new Map(),
13063        styles: /* @__PURE__ */ new Map(),
13064        injectedStyles: /* @__PURE__ */ new WeakMap()
13065      };
13066      if (typeof document !== "undefined") {
13067        registerDocument21(document);
13068      }
13069      return globalScope.__wpStyleRuntime;
13070    }
13071    function documentContainsStyleHash21(targetDocument, hash) {
13072      if (!targetDocument.head) {
13073        return false;
13074      }
13075      for (const style of targetDocument.head.querySelectorAll(
13076        `style[$STYLE_HASH_ATTRIBUTE21}]`
13077      )) {
13078        if (style.getAttribute(STYLE_HASH_ATTRIBUTE21) === hash) {
13079          return true;
13080        }
13081      }
13082      return false;
13083    }
13084    function injectStyle21(targetDocument, hash, css) {
13085      if (!targetDocument.head) {
13086        return;
13087      }
13088      const runtime = getRuntime21();
13089      let injectedStyles = runtime.injectedStyles.get(targetDocument);
13090      if (!injectedStyles) {
13091        injectedStyles = /* @__PURE__ */ new Set();
13092        runtime.injectedStyles.set(targetDocument, injectedStyles);
13093      }
13094      if (injectedStyles.has(hash)) {
13095        return;
13096      }
13097      if (documentContainsStyleHash21(targetDocument, hash)) {
13098        injectedStyles.add(hash);
13099        return;
13100      }
13101      const style = targetDocument.createElement("style");
13102      style.setAttribute(STYLE_HASH_ATTRIBUTE21, hash);
13103      style.appendChild(targetDocument.createTextNode(css));
13104      targetDocument.head.appendChild(style);
13105      injectedStyles.add(hash);
13106    }
13107    function registerDocument21(targetDocument) {
13108      const runtime = getRuntime21();
13109      runtime.documents.set(
13110        targetDocument,
13111        (runtime.documents.get(targetDocument) ?? 0) + 1
13112      );
13113      for (const [hash, css] of runtime.styles) {
13114        injectStyle21(targetDocument, hash, css);
13115      }
13116      return () => {
13117        const count = runtime.documents.get(targetDocument);
13118        if (count === void 0) {
13119          return;
13120        }
13121        if (count <= 1) {
13122          runtime.documents.delete(targetDocument);
13123          return;
13124        }
13125        runtime.documents.set(targetDocument, count - 1);
13126      };
13127    }
13128    function registerStyle21(hash, css) {
13129      const runtime = getRuntime21();
13130      runtime.styles.set(hash, css);
13131      for (const targetDocument of runtime.documents.keys()) {
13132        injectStyle21(targetDocument, hash, css);
13133      }
13134    }
13135    if (typeof process === "undefined" || true) {
13136      registerStyle21("42aad93a67", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#aac6e5);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1be80);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936400)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d19d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#007f2f)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dfafa8);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
13137    }
13138    var style_default20 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
13139    var Actions = (0, import_element43.forwardRef)(
13140      function NoticeActions({ render, ...props }, ref) {
13141        const element = useRender({
13142          defaultTagName: "div",
13143          render,
13144          ref,
13145          props: mergeProps(
13146            {
13147              className: style_default20.actions
13148            },
13149            props
13150          )
13151        });
13152        return element;
13153      }
13154    );
13155  
13156    // packages/ui/build-module/notice/close-icon.mjs
13157    var import_element44 = __toESM(require_element(), 1);
13158    var import_i18n6 = __toESM(require_i18n(), 1);
13159    var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
13160    var STYLE_HASH_ATTRIBUTE22 = "data-wp-hash";
13161    function getRuntime22() {
13162      const globalScope = globalThis;
13163      if (globalScope.__wpStyleRuntime) {
13164        return globalScope.__wpStyleRuntime;
13165      }
13166      globalScope.__wpStyleRuntime = {
13167        documents: /* @__PURE__ */ new Map(),
13168        styles: /* @__PURE__ */ new Map(),
13169        injectedStyles: /* @__PURE__ */ new WeakMap()
13170      };
13171      if (typeof document !== "undefined") {
13172        registerDocument22(document);
13173      }
13174      return globalScope.__wpStyleRuntime;
13175    }
13176    function documentContainsStyleHash22(targetDocument, hash) {
13177      if (!targetDocument.head) {
13178        return false;
13179      }
13180      for (const style of targetDocument.head.querySelectorAll(
13181        `style[$STYLE_HASH_ATTRIBUTE22}]`
13182      )) {
13183        if (style.getAttribute(STYLE_HASH_ATTRIBUTE22) === hash) {
13184          return true;
13185        }
13186      }
13187      return false;
13188    }
13189    function injectStyle22(targetDocument, hash, css) {
13190      if (!targetDocument.head) {
13191        return;
13192      }
13193      const runtime = getRuntime22();
13194      let injectedStyles = runtime.injectedStyles.get(targetDocument);
13195      if (!injectedStyles) {
13196        injectedStyles = /* @__PURE__ */ new Set();
13197        runtime.injectedStyles.set(targetDocument, injectedStyles);
13198      }
13199      if (injectedStyles.has(hash)) {
13200        return;
13201      }
13202      if (documentContainsStyleHash22(targetDocument, hash)) {
13203        injectedStyles.add(hash);
13204        return;
13205      }
13206      const style = targetDocument.createElement("style");
13207      style.setAttribute(STYLE_HASH_ATTRIBUTE22, hash);
13208      style.appendChild(targetDocument.createTextNode(css));
13209      targetDocument.head.appendChild(style);
13210      injectedStyles.add(hash);
13211    }
13212    function registerDocument22(targetDocument) {
13213      const runtime = getRuntime22();
13214      runtime.documents.set(
13215        targetDocument,
13216        (runtime.documents.get(targetDocument) ?? 0) + 1
13217      );
13218      for (const [hash, css] of runtime.styles) {
13219        injectStyle22(targetDocument, hash, css);
13220      }
13221      return () => {
13222        const count = runtime.documents.get(targetDocument);
13223        if (count === void 0) {
13224          return;
13225        }
13226        if (count <= 1) {
13227          runtime.documents.delete(targetDocument);
13228          return;
13229        }
13230        runtime.documents.set(targetDocument, count - 1);
13231      };
13232    }
13233    function registerStyle22(hash, css) {
13234      const runtime = getRuntime22();
13235      runtime.styles.set(hash, css);
13236      for (const targetDocument of runtime.documents.keys()) {
13237        injectStyle22(targetDocument, hash, css);
13238      }
13239    }
13240    if (typeof process === "undefined" || true) {
13241      registerStyle22("42aad93a67", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#aac6e5);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1be80);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936400)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d19d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#007f2f)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dfafa8);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
13242    }
13243    var style_default21 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
13244    var CloseIcon = (0, import_element44.forwardRef)(
13245      function NoticeCloseIcon({ className, icon = close_small_default, label = (0, import_i18n6.__)("Dismiss"), ...props }, ref) {
13246        return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13247          IconButton,
13248          {
13249            ...props,
13250            ref,
13251            className: clsx_default(style_default21["close-icon"], className),
13252            variant: "minimal",
13253            size: "small",
13254            tone: "neutral",
13255            icon,
13256            label
13257          }
13258        );
13259      }
13260    );
13261  
13262    // packages/ui/build-module/notice/action-button.mjs
13263    var import_element45 = __toESM(require_element(), 1);
13264    var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
13265    var STYLE_HASH_ATTRIBUTE23 = "data-wp-hash";
13266    function getRuntime23() {
13267      const globalScope = globalThis;
13268      if (globalScope.__wpStyleRuntime) {
13269        return globalScope.__wpStyleRuntime;
13270      }
13271      globalScope.__wpStyleRuntime = {
13272        documents: /* @__PURE__ */ new Map(),
13273        styles: /* @__PURE__ */ new Map(),
13274        injectedStyles: /* @__PURE__ */ new WeakMap()
13275      };
13276      if (typeof document !== "undefined") {
13277        registerDocument23(document);
13278      }
13279      return globalScope.__wpStyleRuntime;
13280    }
13281    function documentContainsStyleHash23(targetDocument, hash) {
13282      if (!targetDocument.head) {
13283        return false;
13284      }
13285      for (const style of targetDocument.head.querySelectorAll(
13286        `style[$STYLE_HASH_ATTRIBUTE23}]`
13287      )) {
13288        if (style.getAttribute(STYLE_HASH_ATTRIBUTE23) === hash) {
13289          return true;
13290        }
13291      }
13292      return false;
13293    }
13294    function injectStyle23(targetDocument, hash, css) {
13295      if (!targetDocument.head) {
13296        return;
13297      }
13298      const runtime = getRuntime23();
13299      let injectedStyles = runtime.injectedStyles.get(targetDocument);
13300      if (!injectedStyles) {
13301        injectedStyles = /* @__PURE__ */ new Set();
13302        runtime.injectedStyles.set(targetDocument, injectedStyles);
13303      }
13304      if (injectedStyles.has(hash)) {
13305        return;
13306      }
13307      if (documentContainsStyleHash23(targetDocument, hash)) {
13308        injectedStyles.add(hash);
13309        return;
13310      }
13311      const style = targetDocument.createElement("style");
13312      style.setAttribute(STYLE_HASH_ATTRIBUTE23, hash);
13313      style.appendChild(targetDocument.createTextNode(css));
13314      targetDocument.head.appendChild(style);
13315      injectedStyles.add(hash);
13316    }
13317    function registerDocument23(targetDocument) {
13318      const runtime = getRuntime23();
13319      runtime.documents.set(
13320        targetDocument,
13321        (runtime.documents.get(targetDocument) ?? 0) + 1
13322      );
13323      for (const [hash, css] of runtime.styles) {
13324        injectStyle23(targetDocument, hash, css);
13325      }
13326      return () => {
13327        const count = runtime.documents.get(targetDocument);
13328        if (count === void 0) {
13329          return;
13330        }
13331        if (count <= 1) {
13332          runtime.documents.delete(targetDocument);
13333          return;
13334        }
13335        runtime.documents.set(targetDocument, count - 1);
13336      };
13337    }
13338    function registerStyle23(hash, css) {
13339      const runtime = getRuntime23();
13340      runtime.styles.set(hash, css);
13341      for (const targetDocument of runtime.documents.keys()) {
13342        injectStyle23(targetDocument, hash, css);
13343      }
13344    }
13345    if (typeof process === "undefined" || true) {
13346      registerStyle23("42aad93a67", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#aac6e5);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1be80);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936400)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d19d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#007f2f)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dfafa8);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
13347    }
13348    var style_default22 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
13349    var ActionButton = (0, import_element45.forwardRef)(
13350      function NoticeActionButton({ className, loading, loadingAnnouncement, variant, ...props }, ref) {
13351        const loadingProps = loading !== void 0 ? { loading, loadingAnnouncement: loadingAnnouncement ?? "" } : {};
13352        return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
13353          Button6,
13354          {
13355            ...props,
13356            ...loadingProps,
13357            ref,
13358            size: "compact",
13359            tone: "neutral",
13360            variant,
13361            className: clsx_default(
13362              style_default22["action-button"],
13363              style_default22[`is-action-button-$variant}`],
13364              className
13365            )
13366          }
13367        );
13368      }
13369    );
13370  
13371    // packages/ui/build-module/notice/action-link.mjs
13372    var import_element46 = __toESM(require_element(), 1);
13373    var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
13374    var STYLE_HASH_ATTRIBUTE24 = "data-wp-hash";
13375    function getRuntime24() {
13376      const globalScope = globalThis;
13377      if (globalScope.__wpStyleRuntime) {
13378        return globalScope.__wpStyleRuntime;
13379      }
13380      globalScope.__wpStyleRuntime = {
13381        documents: /* @__PURE__ */ new Map(),
13382        styles: /* @__PURE__ */ new Map(),
13383        injectedStyles: /* @__PURE__ */ new WeakMap()
13384      };
13385      if (typeof document !== "undefined") {
13386        registerDocument24(document);
13387      }
13388      return globalScope.__wpStyleRuntime;
13389    }
13390    function documentContainsStyleHash24(targetDocument, hash) {
13391      if (!targetDocument.head) {
13392        return false;
13393      }
13394      for (const style of targetDocument.head.querySelectorAll(
13395        `style[$STYLE_HASH_ATTRIBUTE24}]`
13396      )) {
13397        if (style.getAttribute(STYLE_HASH_ATTRIBUTE24) === hash) {
13398          return true;
13399        }
13400      }
13401      return false;
13402    }
13403    function injectStyle24(targetDocument, hash, css) {
13404      if (!targetDocument.head) {
13405        return;
13406      }
13407      const runtime = getRuntime24();
13408      let injectedStyles = runtime.injectedStyles.get(targetDocument);
13409      if (!injectedStyles) {
13410        injectedStyles = /* @__PURE__ */ new Set();
13411        runtime.injectedStyles.set(targetDocument, injectedStyles);
13412      }
13413      if (injectedStyles.has(hash)) {
13414        return;
13415      }
13416      if (documentContainsStyleHash24(targetDocument, hash)) {
13417        injectedStyles.add(hash);
13418        return;
13419      }
13420      const style = targetDocument.createElement("style");
13421      style.setAttribute(STYLE_HASH_ATTRIBUTE24, hash);
13422      style.appendChild(targetDocument.createTextNode(css));
13423      targetDocument.head.appendChild(style);
13424      injectedStyles.add(hash);
13425    }
13426    function registerDocument24(targetDocument) {
13427      const runtime = getRuntime24();
13428      runtime.documents.set(
13429        targetDocument,
13430        (runtime.documents.get(targetDocument) ?? 0) + 1
13431      );
13432      for (const [hash, css] of runtime.styles) {
13433        injectStyle24(targetDocument, hash, css);
13434      }
13435      return () => {
13436        const count = runtime.documents.get(targetDocument);
13437        if (count === void 0) {
13438          return;
13439        }
13440        if (count <= 1) {
13441          runtime.documents.delete(targetDocument);
13442          return;
13443        }
13444        runtime.documents.set(targetDocument, count - 1);
13445      };
13446    }
13447    function registerStyle24(hash, css) {
13448      const runtime = getRuntime24();
13449      runtime.styles.set(hash, css);
13450      for (const targetDocument of runtime.documents.keys()) {
13451        injectStyle24(targetDocument, hash, css);
13452      }
13453    }
13454    if (typeof process === "undefined" || true) {
13455      registerStyle24("42aad93a67", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#aac6e5);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1be80);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936400)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d19d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#007f2f)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#f8f8f8);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dfafa8);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
13456    }
13457    var style_default23 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
13458    var ActionLink = (0, import_element46.forwardRef)(
13459      function NoticeActionLink({ className, render, ...props }, ref) {
13460        return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
13461          Text,
13462          {
13463            ref,
13464            className: clsx_default(style_default23["action-link"], className),
13465            ...props,
13466            variant: "body-md",
13467            render: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Link, { tone: "neutral", variant: "default", render })
13468          }
13469        );
13470      }
13471    );
13472  
13473    // packages/admin-ui/build-module/navigable-region/index.mjs
13474    var import_element47 = __toESM(require_element(), 1);
13475    var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
13476    var NavigableRegion = (0, import_element47.forwardRef)(
13477      ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
13478        return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
13479          Tag,
13480          {
13481            ref,
13482            className: clsx_default("admin-ui-navigable-region", className),
13483            "aria-label": ariaLabel,
13484            role: "region",
13485            tabIndex: "-1",
13486            ...props,
13487            children
13488          }
13489        );
13490      }
13491    );
13492    NavigableRegion.displayName = "NavigableRegion";
13493    var navigable_region_default = NavigableRegion;
13494  
13495    // packages/admin-ui/build-module/admin-theme-colors/index.mjs
13496    var DEFAULT_THEME_COLORS = {
13497      primary: "#3858e9",
13498      background: "#222524"
13499    };
13500    var ADMIN_THEME_COLORS = /* @__PURE__ */ new Map([
13501      ["modern", DEFAULT_THEME_COLORS],
13502      ["fresh", { primary: "#007cba", background: "#25292b" }],
13503      ["midnight", { primary: "#cf4339", background: "#3d4042" }],
13504      ["coffee", { primary: "#916745", background: "#5b534d" }],
13505      ["ocean", { primary: "#567958", background: "#5f787f" }],
13506      ["blue", { primary: "#437aa8", background: "#3876a8" }],
13507      ["ectoplasm", { primary: "#646c3e", background: "#4f386e" }],
13508      ["sunrise", { primary: "#ad631e", background: "#cc4541" }],
13509      ["light", { primary: "#007cba", background: "#eaeeed" }]
13510    ]);
13511    function getAdminThemeColors() {
13512      const scheme = document.body.className.match(/admin-color-([\w-]+)/)?.[1] ?? "modern";
13513      return ADMIN_THEME_COLORS.get(scheme) ?? DEFAULT_THEME_COLORS;
13514    }
13515  
13516    // packages/interface/build-module/components/interface-skeleton/index.mjs
13517    var import_element48 = __toESM(require_element(), 1);
13518    var import_components5 = __toESM(require_components(), 1);
13519    var import_i18n7 = __toESM(require_i18n(), 1);
13520    var import_compose4 = __toESM(require_compose(), 1);
13521    var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
13522    var ANIMATION_DURATION2 = 0.25;
13523    var commonTransition = {
13524      type: "tween",
13525      duration: ANIMATION_DURATION2,
13526      ease: [0.6, 0, 0.4, 1]
13527    };
13528    function useHTMLClass(className) {
13529      (0, import_element48.useEffect)(() => {
13530        const element = document && document.querySelector(`html:not(.$className})`);
13531        if (!element) {
13532          return;
13533        }
13534        element.classList.toggle(className);
13535        return () => {
13536          element.classList.toggle(className);
13537        };
13538      }, [className]);
13539    }
13540    var headerVariants = {
13541      hidden: { opacity: 1, marginTop: -60 },
13542      visible: { opacity: 1, marginTop: 0 },
13543      distractionFreeHover: {
13544        opacity: 1,
13545        marginTop: 0,
13546        transition: {
13547          ...commonTransition,
13548          delay: 0.2,
13549          delayChildren: 0.2
13550        }
13551      },
13552      distractionFreeHidden: {
13553        opacity: 0,
13554        marginTop: -60
13555      },
13556      distractionFreeDisabled: {
13557        opacity: 0,
13558        marginTop: 0,
13559        transition: {
13560          ...commonTransition,
13561          delay: 0.8,
13562          delayChildren: 0.8
13563        }
13564      }
13565    };
13566    function InterfaceSkeleton({
13567      isDistractionFree,
13568      footer,
13569      header,
13570      editorNotices,
13571      sidebar,
13572      secondarySidebar,
13573      content,
13574      actions,
13575      labels,
13576      className
13577    }, ref) {
13578      const isMobileViewport = (0, import_compose4.useViewportMatch)("medium", "<");
13579      const disableMotion = (0, import_compose4.useReducedMotion)();
13580      const defaultTransition = {
13581        type: "tween",
13582        duration: disableMotion ? 0 : ANIMATION_DURATION2,
13583        ease: [0.6, 0, 0.4, 1]
13584      };
13585      useHTMLClass("interface-interface-skeleton__html-container");
13586      const defaultLabels = {
13587        /* translators: accessibility text for the top bar landmark region. */
13588        header: (0, import_i18n7._x)("Header", "header landmark area"),
13589        /* translators: accessibility text for the content landmark region. */
13590        body: (0, import_i18n7.__)("Content"),
13591        /* translators: accessibility text for the secondary sidebar landmark region. */
13592        secondarySidebar: (0, import_i18n7.__)("Block Library"),
13593        /* translators: accessibility text for the settings landmark region. */
13594        sidebar: (0, import_i18n7._x)("Settings", "settings landmark area"),
13595        /* translators: accessibility text for the publish landmark region. */
13596        actions: (0, import_i18n7.__)("Publish"),
13597        /* translators: accessibility text for the footer landmark region. */
13598        footer: (0, import_i18n7.__)("Footer")
13599      };
13600      const mergedLabels = { ...defaultLabels, ...labels };
13601      return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
13602        "div",
13603        {
13604          ref,
13605          className: clsx_default(
13606            className,
13607            "interface-interface-skeleton",
13608            !!footer && "has-footer"
13609          ),
13610          children: [
13611            /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "interface-interface-skeleton__editor", children: [
13612              /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components5.__unstableAnimatePresence, { initial: false, children: !!header && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
13613                navigable_region_default,
13614                {
13615                  as: import_components5.__unstableMotion.div,
13616                  className: "interface-interface-skeleton__header",
13617                  ariaLabel: mergedLabels.header,
13618                  initial: isDistractionFree && !isMobileViewport ? "distractionFreeHidden" : "hidden",
13619                  whileHover: isDistractionFree && !isMobileViewport ? "distractionFreeHover" : "visible",
13620                  animate: isDistractionFree && !isMobileViewport ? "distractionFreeDisabled" : "visible",
13621                  exit: isDistractionFree && !isMobileViewport ? "distractionFreeHidden" : "hidden",
13622                  variants: headerVariants,
13623                  transition: defaultTransition,
13624                  children: header
13625                }
13626              ) }),
13627              isDistractionFree && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "interface-interface-skeleton__header", children: editorNotices }),
13628              /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "interface-interface-skeleton__body", children: [
13629                /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components5.__unstableAnimatePresence, { initial: false, children: !!secondarySidebar && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
13630                  navigable_region_default,
13631                  {
13632                    className: "interface-interface-skeleton__secondary-sidebar",
13633                    ariaLabel: mergedLabels.secondarySidebar,
13634                    as: import_components5.__unstableMotion.div,
13635                    initial: "closed",
13636                    animate: "open",
13637                    exit: "closed",
13638                    variants: {
13639                      open: { width: "auto" },
13640                      closed: { width: 0 }
13641                    },
13642                    transition: defaultTransition,
13643                    children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
13644                      import_components5.__unstableMotion.div,
13645                      {
13646                        style: {
13647                          width: isMobileViewport ? "100vw" : "max-content",
13648                          height: "100%"
13649                        },
13650                        variants: {
13651                          open: { x: 0 },
13652                          closed: { x: "-100%" }
13653                        },
13654                        transition: defaultTransition,
13655                        children: secondarySidebar
13656                      }
13657                    )
13658                  }
13659                ) }),
13660                /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
13661                  navigable_region_default,
13662                  {
13663                    className: "interface-interface-skeleton__content",
13664                    ariaLabel: mergedLabels.body,
13665                    children: content
13666                  }
13667                ),
13668                !!sidebar && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
13669                  navigable_region_default,
13670                  {
13671                    className: "interface-interface-skeleton__sidebar",
13672                    ariaLabel: mergedLabels.sidebar,
13673                    children: sidebar
13674                  }
13675                ),
13676                !!actions && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
13677                  navigable_region_default,
13678                  {
13679                    className: "interface-interface-skeleton__actions",
13680                    ariaLabel: mergedLabels.actions,
13681                    children: actions
13682                  }
13683                )
13684              ] })
13685            ] }),
13686            !!footer && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
13687              navigable_region_default,
13688              {
13689                className: "interface-interface-skeleton__footer",
13690                ariaLabel: mergedLabels.footer,
13691                children: footer
13692              }
13693            )
13694          ]
13695        }
13696      );
13697    }
13698    var interface_skeleton_default = (0, import_element48.forwardRef)(InterfaceSkeleton);
13699  
13700    // packages/edit-widgets/build-module/store/actions.mjs
13701    var import_widgets2 = __toESM(require_widgets(), 1);
13702    var import_core_data = __toESM(require_core_data(), 1);
13703    var import_block_editor = __toESM(require_block_editor(), 1);
13704  
13705    // packages/edit-widgets/build-module/store/transformers.mjs
13706    var import_blocks = __toESM(require_blocks(), 1);
13707    var import_widgets = __toESM(require_widgets(), 1);
13708    function transformWidgetToBlock(widget) {
13709      if (widget.id_base === "block") {
13710        const parsedBlocks = (0, import_blocks.parse)(widget.instance.raw.content, {
13711          __unstableSkipAutop: true
13712        });
13713        if (!parsedBlocks.length) {
13714          return (0, import_widgets.addWidgetIdToBlock)(
13715            (0, import_blocks.createBlock)("core/paragraph", {}, []),
13716            widget.id
13717          );
13718        }
13719        return (0, import_widgets.addWidgetIdToBlock)(parsedBlocks[0], widget.id);
13720      }
13721      let attributes;
13722      if (widget._embedded.about[0].is_multi) {
13723        attributes = {
13724          idBase: widget.id_base,
13725          instance: widget.instance
13726        };
13727      } else {
13728        attributes = {
13729          id: widget.id
13730        };
13731      }
13732      return (0, import_widgets.addWidgetIdToBlock)(
13733        (0, import_blocks.createBlock)("core/legacy-widget", attributes, []),
13734        widget.id
13735      );
13736    }
13737    function transformBlockToWidget(block, relatedWidget = {}) {
13738      let widget;
13739      const isValidLegacyWidgetBlock = block.name === "core/legacy-widget" && (block.attributes.id || block.attributes.instance);
13740      if (isValidLegacyWidgetBlock) {
13741        widget = {
13742          ...relatedWidget,
13743          id: block.attributes.id ?? relatedWidget.id,
13744          id_base: block.attributes.idBase ?? relatedWidget.id_base,
13745          instance: block.attributes.instance ?? relatedWidget.instance
13746        };
13747      } else {
13748        widget = {
13749          ...relatedWidget,
13750          id_base: "block",
13751          instance: {
13752            raw: {
13753              content: (0, import_blocks.serialize)(block)
13754            }
13755          }
13756        };
13757      }
13758      delete widget.rendered;
13759      delete widget.rendered_form;
13760      return widget;
13761    }
13762  
13763    // packages/edit-widgets/build-module/store/utils.mjs
13764    var KIND = "root";
13765    var WIDGET_AREA_ENTITY_TYPE = "sidebar";
13766    var POST_TYPE = "postType";
13767    var buildWidgetAreaPostId = (widgetAreaId) => `widget-area-$widgetAreaId}`;
13768    var buildWidgetAreasPostId = () => `widget-areas`;
13769    function buildWidgetAreasQuery() {
13770      return {
13771        per_page: -1
13772      };
13773    }
13774    function buildWidgetsQuery() {
13775      return {
13776        per_page: -1,
13777        _embed: "about"
13778      };
13779    }
13780    var createStubPost = (id, blocks) => ({
13781      id,
13782      slug: id,
13783      status: "draft",
13784      type: "page",
13785      blocks,
13786      meta: {
13787        widgetAreaId: id
13788      }
13789    });
13790  
13791    // packages/edit-widgets/build-module/store/constants.mjs
13792    var STORE_NAME2 = "core/edit-widgets";
13793  
13794    // packages/edit-widgets/build-module/store/actions.mjs
13795    var persistStubPost = (id, blocks) => ({ registry }) => {
13796      const stubPost = createStubPost(id, blocks);
13797      registry.dispatch(import_core_data.store).receiveEntityRecords(
13798        KIND,
13799        POST_TYPE,
13800        stubPost,
13801        { id: stubPost.id },
13802        false
13803      );
13804      return stubPost;
13805    };
13806    var saveEditedWidgetAreas = () => async ({ select, dispatch: dispatch2, registry }) => {
13807      const editedWidgetAreas = select.getEditedWidgetAreas();
13808      if (!editedWidgetAreas?.length) {
13809        return;
13810      }
13811      try {
13812        await dispatch2.saveWidgetAreas(editedWidgetAreas);
13813        registry.dispatch(import_notices.store).createSuccessNotice((0, import_i18n8.__)("Widgets saved."), {
13814          type: "snackbar"
13815        });
13816      } catch (e) {
13817        registry.dispatch(import_notices.store).createErrorNotice(
13818          /* translators: %s: The error message. */
13819          (0, import_i18n8.sprintf)((0, import_i18n8.__)("There was an error. %s"), e.message),
13820          {
13821            type: "snackbar"
13822          }
13823        );
13824      }
13825    };
13826    var saveWidgetAreas = (widgetAreas) => async ({ dispatch: dispatch2, registry }) => {
13827      try {
13828        for (const widgetArea of widgetAreas) {
13829          await dispatch2.saveWidgetArea(widgetArea.id);
13830        }
13831      } finally {
13832        await registry.dispatch(import_core_data.store).finishResolution(
13833          "getEntityRecord",
13834          KIND,
13835          WIDGET_AREA_ENTITY_TYPE,
13836          buildWidgetAreasQuery()
13837        );
13838      }
13839    };
13840    var saveWidgetArea = (widgetAreaId) => async ({ dispatch: dispatch2, select, registry }) => {
13841      const widgets = select.getWidgets();
13842      const post = registry.select(import_core_data.store).getEditedEntityRecord(
13843        KIND,
13844        POST_TYPE,
13845        buildWidgetAreaPostId(widgetAreaId)
13846      );
13847      const areaWidgets = Object.values(widgets).filter(
13848        ({ sidebar }) => sidebar === widgetAreaId
13849      );
13850      const usedReferenceWidgets = [];
13851      const widgetsBlocks = post.blocks.filter((block) => {
13852        const { id } = block.attributes;
13853        if (block.name === "core/legacy-widget" && id) {
13854          if (usedReferenceWidgets.includes(id)) {
13855            return false;
13856          }
13857          usedReferenceWidgets.push(id);
13858        }
13859        return true;
13860      });
13861      const deletedWidgets = [];
13862      for (const widget of areaWidgets) {
13863        const widgetsNewArea = select.getWidgetAreaForWidgetId(widget.id);
13864        if (!widgetsNewArea) {
13865          deletedWidgets.push(widget);
13866        }
13867      }
13868      const batchMeta = [];
13869      const batchTasks = [];
13870      const sidebarWidgetsIds = [];
13871      for (let i = 0; i < widgetsBlocks.length; i++) {
13872        const block = widgetsBlocks[i];
13873        const widgetId = (0, import_widgets2.getWidgetIdFromBlock)(block);
13874        const oldWidget = widgets[widgetId];
13875        const widget = transformBlockToWidget(block, oldWidget);
13876        sidebarWidgetsIds.push(widgetId);
13877        if (oldWidget) {
13878          registry.dispatch(import_core_data.store).editEntityRecord(
13879            "root",
13880            "widget",
13881            widgetId,
13882            {
13883              ...widget,
13884              sidebar: widgetAreaId
13885            },
13886            { undoIgnore: true }
13887          );
13888          const hasEdits = registry.select(import_core_data.store).hasEditsForEntityRecord("root", "widget", widgetId);
13889          if (!hasEdits) {
13890            continue;
13891          }
13892          batchTasks.push(
13893            ({ saveEditedEntityRecord }) => saveEditedEntityRecord("root", "widget", widgetId)
13894          );
13895        } else {
13896          batchTasks.push(
13897            ({ saveEntityRecord }) => saveEntityRecord("root", "widget", {
13898              ...widget,
13899              sidebar: widgetAreaId
13900            })
13901          );
13902        }
13903        batchMeta.push({
13904          block,
13905          position: i,
13906          clientId: block.clientId
13907        });
13908      }
13909      for (const widget of deletedWidgets) {
13910        batchTasks.push(
13911          ({ deleteEntityRecord }) => deleteEntityRecord("root", "widget", widget.id, {
13912            force: true
13913          })
13914        );
13915      }
13916      const records = await registry.dispatch(import_core_data.store).__experimentalBatch(batchTasks);
13917      const preservedRecords = records.filter(
13918        (record) => !record.hasOwnProperty("deleted")
13919      );
13920      const failedWidgetNames = [];
13921      for (let i = 0; i < preservedRecords.length; i++) {
13922        const widget = preservedRecords[i];
13923        const { block, position } = batchMeta[i];
13924        post.blocks[position].attributes.__internalWidgetId = widget.id;
13925        const error2 = registry.select(import_core_data.store).getLastEntitySaveError("root", "widget", widget.id);
13926        if (error2) {
13927          failedWidgetNames.push(block.attributes?.name || block?.name);
13928        }
13929        if (!sidebarWidgetsIds[position]) {
13930          sidebarWidgetsIds[position] = widget.id;
13931        }
13932      }
13933      if (failedWidgetNames.length) {
13934        throw new Error(
13935          (0, import_i18n8.sprintf)(
13936            /* translators: %s: List of widget names */
13937            (0, import_i18n8.__)("Could not save the following widgets: %s."),
13938            failedWidgetNames.join(", ")
13939          )
13940        );
13941      }
13942      registry.dispatch(import_core_data.store).editEntityRecord(
13943        KIND,
13944        WIDGET_AREA_ENTITY_TYPE,
13945        widgetAreaId,
13946        {
13947          widgets: sidebarWidgetsIds
13948        },
13949        { undoIgnore: true }
13950      );
13951      dispatch2(trySaveWidgetArea(widgetAreaId));
13952      registry.dispatch(import_core_data.store).receiveEntityRecords(KIND, POST_TYPE, post, void 0);
13953    };
13954    var trySaveWidgetArea = (widgetAreaId) => ({ registry }) => {
13955      registry.dispatch(import_core_data.store).saveEditedEntityRecord(
13956        KIND,
13957        WIDGET_AREA_ENTITY_TYPE,
13958        widgetAreaId,
13959        {
13960          throwOnError: true
13961        }
13962      );
13963    };
13964    function setWidgetIdForClientId(clientId, widgetId) {
13965      return {
13966        type: "SET_WIDGET_ID_FOR_CLIENT_ID",
13967        clientId,
13968        widgetId
13969      };
13970    }
13971    function setWidgetAreasOpenState(widgetAreasOpenState2) {
13972      return {
13973        type: "SET_WIDGET_AREAS_OPEN_STATE",
13974        widgetAreasOpenState: widgetAreasOpenState2
13975      };
13976    }
13977    function setIsWidgetAreaOpen(clientId, isOpen) {
13978      return {
13979        type: "SET_IS_WIDGET_AREA_OPEN",
13980        clientId,
13981        isOpen
13982      };
13983    }
13984    function setIsInserterOpened(value) {
13985      return {
13986        type: "SET_IS_INSERTER_OPENED",
13987        value
13988      };
13989    }
13990    function setIsListViewOpened(isOpen) {
13991      return {
13992        type: "SET_IS_LIST_VIEW_OPENED",
13993        isOpen
13994      };
13995    }
13996    var closeGeneralSidebar = () => ({ registry }) => {
13997      registry.dispatch(store).disableComplementaryArea(STORE_NAME2);
13998    };
13999    var moveBlockToWidgetArea = (clientId, widgetAreaId) => async ({ dispatch: dispatch2, select, registry }) => {
14000      const sourceRootClientId = registry.select(import_block_editor.store).getBlockRootClientId(clientId);
14001      const widgetAreas = registry.select(import_block_editor.store).getBlocks();
14002      const destinationWidgetAreaBlock = widgetAreas.find(
14003        ({ attributes }) => attributes.id === widgetAreaId
14004      );
14005      const destinationRootClientId = destinationWidgetAreaBlock.clientId;
14006      const destinationInnerBlocksClientIds = registry.select(import_block_editor.store).getBlockOrder(destinationRootClientId);
14007      const destinationIndex = destinationInnerBlocksClientIds.length;
14008      const isDestinationWidgetAreaOpen = select.getIsWidgetAreaOpen(
14009        destinationRootClientId
14010      );
14011      if (!isDestinationWidgetAreaOpen) {
14012        dispatch2.setIsWidgetAreaOpen(destinationRootClientId, true);
14013      }
14014      registry.dispatch(import_block_editor.store).moveBlocksToPosition(
14015        [clientId],
14016        sourceRootClientId,
14017        destinationRootClientId,
14018        destinationIndex
14019      );
14020    };
14021    function unlockWidgetSaving(lockName) {
14022      return {
14023        type: "UNLOCK_WIDGET_SAVING",
14024        lockName
14025      };
14026    }
14027    function lockWidgetSaving(lockName) {
14028      return {
14029        type: "LOCK_WIDGET_SAVING",
14030        lockName
14031      };
14032    }
14033  
14034    // packages/edit-widgets/build-module/store/resolvers.mjs
14035    var getWidgetAreas = () => async ({ dispatch: dispatch2, registry }) => {
14036      const query = buildWidgetAreasQuery();
14037      const widgetAreas = await registry.resolveSelect(import_core_data2.store).getEntityRecords(KIND, WIDGET_AREA_ENTITY_TYPE, query);
14038      const widgetAreaBlocks = [];
14039      const sortedWidgetAreas = widgetAreas.sort((a, b) => {
14040        if (a.id === "wp_inactive_widgets") {
14041          return 1;
14042        }
14043        if (b.id === "wp_inactive_widgets") {
14044          return -1;
14045        }
14046        return 0;
14047      });
14048      for (const widgetArea of sortedWidgetAreas) {
14049        widgetAreaBlocks.push(
14050          (0, import_blocks2.createBlock)("core/widget-area", {
14051            id: widgetArea.id,
14052            name: widgetArea.name
14053          })
14054        );
14055        if (!widgetArea.widgets.length) {
14056          dispatch2(
14057            persistStubPost(
14058              buildWidgetAreaPostId(widgetArea.id),
14059              []
14060            )
14061          );
14062        }
14063      }
14064      const widgetAreasOpenState2 = {};
14065      widgetAreaBlocks.forEach((widgetAreaBlock, index2) => {
14066        widgetAreasOpenState2[widgetAreaBlock.clientId] = index2 === 0;
14067      });
14068      dispatch2(setWidgetAreasOpenState(widgetAreasOpenState2));
14069      dispatch2(
14070        persistStubPost(buildWidgetAreasPostId(), widgetAreaBlocks)
14071      );
14072    };
14073    var getWidgets = () => async ({ dispatch: dispatch2, registry }) => {
14074      const query = buildWidgetsQuery();
14075      const widgets = await registry.resolveSelect(import_core_data2.store).getEntityRecords("root", "widget", query);
14076      const groupedBySidebar = {};
14077      for (const widget of widgets) {
14078        const block = transformWidgetToBlock(widget);
14079        groupedBySidebar[widget.sidebar] = groupedBySidebar[widget.sidebar] || [];
14080        groupedBySidebar[widget.sidebar].push(block);
14081      }
14082      for (const sidebarId in groupedBySidebar) {
14083        if (groupedBySidebar.hasOwnProperty(sidebarId)) {
14084          dispatch2(
14085            persistStubPost(
14086              buildWidgetAreaPostId(sidebarId),
14087              groupedBySidebar[sidebarId]
14088            )
14089          );
14090        }
14091      }
14092    };
14093  
14094    // packages/edit-widgets/build-module/store/selectors.mjs
14095    var selectors_exports2 = {};
14096    __export(selectors_exports2, {
14097      __experimentalGetInsertionPoint: () => __experimentalGetInsertionPoint,
14098      canInsertBlockInWidgetArea: () => canInsertBlockInWidgetArea,
14099      getEditedWidgetAreas: () => getEditedWidgetAreas,
14100      getIsWidgetAreaOpen: () => getIsWidgetAreaOpen,
14101      getParentWidgetAreaBlock: () => getParentWidgetAreaBlock,
14102      getReferenceWidgetBlocks: () => getReferenceWidgetBlocks,
14103      getWidget: () => getWidget,
14104      getWidgetAreaForWidgetId: () => getWidgetAreaForWidgetId,
14105      getWidgetAreas: () => getWidgetAreas2,
14106      getWidgets: () => getWidgets2,
14107      isInserterOpened: () => isInserterOpened,
14108      isListViewOpened: () => isListViewOpened,
14109      isSavingWidgetAreas: () => isSavingWidgetAreas,
14110      isWidgetSavingLocked: () => isWidgetSavingLocked
14111    });
14112    var import_data7 = __toESM(require_data(), 1);
14113    var import_widgets3 = __toESM(require_widgets(), 1);
14114    var import_core_data3 = __toESM(require_core_data(), 1);
14115    var import_block_editor2 = __toESM(require_block_editor(), 1);
14116    var EMPTY_INSERTION_POINT = {
14117      rootClientId: void 0,
14118      insertionIndex: void 0
14119    };
14120    var getWidgets2 = (0, import_data7.createRegistrySelector)(
14121      (select) => (0, import_data7.createSelector)(
14122        () => {
14123          const widgets = select(import_core_data3.store).getEntityRecords(
14124            "root",
14125            "widget",
14126            buildWidgetsQuery()
14127          );
14128          return (
14129            // Key widgets by their ID.
14130            widgets?.reduce(
14131              (allWidgets, widget) => ({
14132                ...allWidgets,
14133                [widget.id]: widget
14134              }),
14135              {}
14136            ) ?? {}
14137          );
14138        },
14139        () => [
14140          select(import_core_data3.store).getEntityRecords(
14141            "root",
14142            "widget",
14143            buildWidgetsQuery()
14144          )
14145        ]
14146      )
14147    );
14148    var getWidget = (0, import_data7.createRegistrySelector)(
14149      (select) => (state, id) => {
14150        const widgets = select(STORE_NAME2).getWidgets();
14151        return widgets[id];
14152      }
14153    );
14154    var getWidgetAreas2 = (0, import_data7.createRegistrySelector)((select) => () => {
14155      const query = buildWidgetAreasQuery();
14156      return select(import_core_data3.store).getEntityRecords(
14157        KIND,
14158        WIDGET_AREA_ENTITY_TYPE,
14159        query
14160      );
14161    });
14162    var getWidgetAreaForWidgetId = (0, import_data7.createRegistrySelector)(
14163      (select) => (state, widgetId) => {
14164        const widgetAreas = select(STORE_NAME2).getWidgetAreas();
14165        return widgetAreas.find((widgetArea) => {
14166          const post = select(import_core_data3.store).getEditedEntityRecord(
14167            KIND,
14168            POST_TYPE,
14169            buildWidgetAreaPostId(widgetArea.id)
14170          );
14171          const blockWidgetIds = post.blocks.map(
14172            (block) => (0, import_widgets3.getWidgetIdFromBlock)(block)
14173          );
14174          return blockWidgetIds.includes(widgetId);
14175        });
14176      }
14177    );
14178    var getParentWidgetAreaBlock = (0, import_data7.createRegistrySelector)(
14179      (select) => (state, clientId) => {
14180        const { getBlock, getBlockName, getBlockParents } = select(import_block_editor2.store);
14181        const blockParents = getBlockParents(clientId);
14182        const widgetAreaClientId = blockParents.find(
14183          (parentClientId) => getBlockName(parentClientId) === "core/widget-area"
14184        );
14185        return getBlock(widgetAreaClientId);
14186      }
14187    );
14188    var getEditedWidgetAreas = (0, import_data7.createRegistrySelector)(
14189      (select) => (state, ids) => {
14190        let widgetAreas = select(STORE_NAME2).getWidgetAreas();
14191        if (!widgetAreas) {
14192          return [];
14193        }
14194        if (ids) {
14195          widgetAreas = widgetAreas.filter(
14196            ({ id }) => ids.includes(id)
14197          );
14198        }
14199        return widgetAreas.filter(
14200          ({ id }) => select(import_core_data3.store).hasEditsForEntityRecord(
14201            KIND,
14202            POST_TYPE,
14203            buildWidgetAreaPostId(id)
14204          )
14205        ).map(
14206          ({ id }) => select(import_core_data3.store).getEditedEntityRecord(
14207            KIND,
14208            WIDGET_AREA_ENTITY_TYPE,
14209            id
14210          )
14211        );
14212      }
14213    );
14214    var getReferenceWidgetBlocks = (0, import_data7.createRegistrySelector)(
14215      (select) => (state, referenceWidgetName = null) => {
14216        const results = [];
14217        const widgetAreas = select(STORE_NAME2).getWidgetAreas();
14218        for (const _widgetArea of widgetAreas) {
14219          const post = select(import_core_data3.store).getEditedEntityRecord(
14220            KIND,
14221            POST_TYPE,
14222            buildWidgetAreaPostId(_widgetArea.id)
14223          );
14224          for (const block of post.blocks) {
14225            if (block.name === "core/legacy-widget" && (!referenceWidgetName || block.attributes?.referenceWidgetName === referenceWidgetName)) {
14226              results.push(block);
14227            }
14228          }
14229        }
14230        return results;
14231      }
14232    );
14233    var isSavingWidgetAreas = (0, import_data7.createRegistrySelector)((select) => () => {
14234      const widgetAreasIds = select(STORE_NAME2).getWidgetAreas()?.map(({ id }) => id);
14235      if (!widgetAreasIds) {
14236        return false;
14237      }
14238      for (const id of widgetAreasIds) {
14239        const isSaving = select(import_core_data3.store).isSavingEntityRecord(
14240          KIND,
14241          WIDGET_AREA_ENTITY_TYPE,
14242          id
14243        );
14244        if (isSaving) {
14245          return true;
14246        }
14247      }
14248      const widgetIds = [
14249        ...Object.keys(select(STORE_NAME2).getWidgets()),
14250        void 0
14251        // account for new widgets without an ID
14252      ];
14253      for (const id of widgetIds) {
14254        const isSaving = select(import_core_data3.store).isSavingEntityRecord(
14255          "root",
14256          "widget",
14257          id
14258        );
14259        if (isSaving) {
14260          return true;
14261        }
14262      }
14263      return false;
14264    });
14265    var getIsWidgetAreaOpen = (state, clientId) => {
14266      const { widgetAreasOpenState: widgetAreasOpenState2 } = state;
14267      return !!widgetAreasOpenState2[clientId];
14268    };
14269    function isInserterOpened(state) {
14270      return !!state.blockInserterPanel;
14271    }
14272    function __experimentalGetInsertionPoint(state) {
14273      if (typeof state.blockInserterPanel === "boolean") {
14274        return EMPTY_INSERTION_POINT;
14275      }
14276      return state.blockInserterPanel;
14277    }
14278    var canInsertBlockInWidgetArea = (0, import_data7.createRegistrySelector)(
14279      (select) => (state, blockName) => {
14280        const widgetAreas = select(import_block_editor2.store).getBlocks();
14281        const [firstWidgetArea] = widgetAreas;
14282        if (!firstWidgetArea) {
14283          return false;
14284        }
14285        return select(import_block_editor2.store).canInsertBlockType(
14286          blockName,
14287          firstWidgetArea.clientId
14288        );
14289      }
14290    );
14291    function isListViewOpened(state) {
14292      return state.listViewPanel;
14293    }
14294    function isWidgetSavingLocked(state) {
14295      return Object.keys(state.widgetSavingLock).length > 0;
14296    }
14297  
14298    // packages/edit-widgets/build-module/store/private-selectors.mjs
14299    var private_selectors_exports = {};
14300    __export(private_selectors_exports, {
14301      getInserterSidebarToggleRef: () => getInserterSidebarToggleRef,
14302      getListViewToggleRef: () => getListViewToggleRef
14303    });
14304    function getListViewToggleRef(state) {
14305      return state.listViewToggleRef;
14306    }
14307    function getInserterSidebarToggleRef(state) {
14308      return state.inserterSidebarToggleRef;
14309    }
14310  
14311    // packages/edit-widgets/build-module/lock-unlock.mjs
14312    var import_private_apis2 = __toESM(require_private_apis(), 1);
14313    var { lock: lock2, unlock: unlock2 } = (0, import_private_apis2.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
14314      "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
14315      "@wordpress/edit-widgets"
14316    );
14317  
14318    // packages/edit-widgets/build-module/store/index.mjs
14319    var storeConfig = {
14320      reducer: reducer_default,
14321      selectors: selectors_exports2,
14322      resolvers: resolvers_exports,
14323      actions: actions_exports2
14324    };
14325    var store2 = (0, import_data8.createReduxStore)(STORE_NAME2, storeConfig);
14326    (0, import_data8.register)(store2);
14327    import_api_fetch.default.use(function(options, next) {
14328      if (options.path?.indexOf("/wp/v2/types/widget-area") === 0) {
14329        return Promise.resolve({});
14330      }
14331      return next(options);
14332    });
14333    unlock2(store2).registerPrivateSelectors(private_selectors_exports);
14334  
14335    // packages/edit-widgets/build-module/filters/move-to-widget-area.mjs
14336    var import_block_editor3 = __toESM(require_block_editor(), 1);
14337    var import_compose5 = __toESM(require_compose(), 1);
14338    var import_data9 = __toESM(require_data(), 1);
14339    var import_hooks = __toESM(require_hooks(), 1);
14340    var import_widgets4 = __toESM(require_widgets(), 1);
14341    var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
14342    var withMoveToWidgetAreaToolbarItem = (0, import_compose5.createHigherOrderComponent)(
14343      (BlockEdit) => (props) => {
14344        const { clientId, name: blockName } = props;
14345        const { widgetAreas, currentWidgetAreaId, canInsertBlockInWidgetArea: canInsertBlockInWidgetArea2 } = (0, import_data9.useSelect)(
14346          (select) => {
14347            if (blockName === "core/widget-area") {
14348              return {};
14349            }
14350            const selectors3 = select(store2);
14351            const widgetAreaBlock = selectors3.getParentWidgetAreaBlock(clientId);
14352            return {
14353              widgetAreas: selectors3.getWidgetAreas(),
14354              currentWidgetAreaId: widgetAreaBlock?.attributes?.id,
14355              canInsertBlockInWidgetArea: selectors3.canInsertBlockInWidgetArea(blockName)
14356            };
14357          },
14358          [clientId, blockName]
14359        );
14360        const { moveBlockToWidgetArea: moveBlockToWidgetArea2 } = (0, import_data9.useDispatch)(store2);
14361        const hasMultipleWidgetAreas = widgetAreas?.length > 1;
14362        const isMoveToWidgetAreaVisible = blockName !== "core/widget-area" && hasMultipleWidgetAreas && canInsertBlockInWidgetArea2;
14363        return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
14364          /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(BlockEdit, { ...props }, "edit"),
14365          isMoveToWidgetAreaVisible && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_block_editor3.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
14366            import_widgets4.MoveToWidgetArea,
14367            {
14368              widgetAreas,
14369              currentWidgetAreaId,
14370              onSelect: (widgetAreaId) => {
14371                moveBlockToWidgetArea2(
14372                  props.clientId,
14373                  widgetAreaId
14374                );
14375              }
14376            }
14377          ) })
14378        ] });
14379      },
14380      "withMoveToWidgetAreaToolbarItem"
14381    );
14382    (0, import_hooks.addFilter)(
14383      "editor.BlockEdit",
14384      "core/edit-widgets/block-edit",
14385      withMoveToWidgetAreaToolbarItem
14386    );
14387  
14388    // packages/edit-widgets/build-module/filters/replace-media-upload.mjs
14389    var import_hooks2 = __toESM(require_hooks(), 1);
14390    var import_media_utils = __toESM(require_media_utils(), 1);
14391    var replaceMediaUpload = () => import_media_utils.MediaUpload;
14392    (0, import_hooks2.addFilter)(
14393      "editor.MediaUpload",
14394      "core/edit-widgets/replace-media-upload",
14395      replaceMediaUpload
14396    );
14397  
14398    // packages/edit-widgets/build-module/blocks/widget-area/index.mjs
14399    var widget_area_exports = {};
14400    __export(widget_area_exports, {
14401      metadata: () => block_default,
14402      name: () => name,
14403      settings: () => settings
14404    });
14405    var import_i18n9 = __toESM(require_i18n(), 1);
14406  
14407    // packages/edit-widgets/build-module/blocks/widget-area/block.json
14408    var block_default = {
14409      $schema: "https://schemas.wp.org/trunk/block.json",
14410      apiVersion: 3,
14411      name: "core/widget-area",
14412      title: "Widget Area",
14413      category: "widgets",
14414      attributes: {
14415        id: {
14416          type: "string"
14417        },
14418        name: {
14419          type: "string"
14420        }
14421      },
14422      supports: {
14423        html: false,
14424        inserter: false,
14425        customClassName: false,
14426        reusable: false,
14427        renaming: false,
14428        visibility: false,
14429        __experimentalToolbar: false,
14430        __experimentalParentSelector: false,
14431        __experimentalDisableBlockOverlay: true
14432      },
14433      editorStyle: "wp-block-widget-area-editor",
14434      style: "wp-block-widget-area"
14435    };
14436  
14437    // packages/edit-widgets/build-module/blocks/widget-area/edit/index.mjs
14438    var import_element51 = __toESM(require_element(), 1);
14439    var import_data10 = __toESM(require_data(), 1);
14440    var import_core_data5 = __toESM(require_core_data(), 1);
14441    var import_components6 = __toESM(require_components(), 1);
14442    var import_block_editor5 = __toESM(require_block_editor(), 1);
14443  
14444    // packages/edit-widgets/build-module/blocks/widget-area/edit/inner-blocks.mjs
14445    var import_core_data4 = __toESM(require_core_data(), 1);
14446    var import_block_editor4 = __toESM(require_block_editor(), 1);
14447    var import_element50 = __toESM(require_element(), 1);
14448  
14449    // packages/edit-widgets/build-module/blocks/widget-area/edit/use-is-dragging-within.mjs
14450    var import_element49 = __toESM(require_element(), 1);
14451    var useIsDraggingWithin = (elementRef) => {
14452      const [isDraggingWithin, setIsDraggingWithin] = (0, import_element49.useState)(false);
14453      (0, import_element49.useEffect)(() => {
14454        const { ownerDocument: ownerDocument2 } = elementRef.current;
14455        function handleDragStart(event) {
14456          handleDragEnter(event);
14457        }
14458        function handleDragEnd() {
14459          setIsDraggingWithin(false);
14460        }
14461        function handleDragEnter(event) {
14462          if (elementRef.current.contains(event.target)) {
14463            setIsDraggingWithin(true);
14464          } else {
14465            setIsDraggingWithin(false);
14466          }
14467        }
14468        ownerDocument2.addEventListener("dragstart", handleDragStart);
14469        ownerDocument2.addEventListener("dragend", handleDragEnd);
14470        ownerDocument2.addEventListener("dragenter", handleDragEnter);
14471        return () => {
14472          ownerDocument2.removeEventListener("dragstart", handleDragStart);
14473          ownerDocument2.removeEventListener("dragend", handleDragEnd);
14474          ownerDocument2.removeEventListener("dragenter", handleDragEnter);
14475        };
14476      }, []);
14477      return isDraggingWithin;
14478    };
14479    var use_is_dragging_within_default = useIsDraggingWithin;
14480  
14481    // packages/edit-widgets/build-module/blocks/widget-area/edit/inner-blocks.mjs
14482    var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
14483    function WidgetAreaInnerBlocks({ id }) {
14484      const [blocks, onInput, onChange] = (0, import_core_data4.useEntityBlockEditor)(
14485        "root",
14486        "postType"
14487      );
14488      const innerBlocksRef = (0, import_element50.useRef)();
14489      const isDraggingWithinInnerBlocks = use_is_dragging_within_default(innerBlocksRef);
14490      const shouldHighlightDropZone = isDraggingWithinInnerBlocks;
14491      const innerBlocksProps = (0, import_block_editor4.useInnerBlocksProps)(
14492        { ref: innerBlocksRef },
14493        {
14494          value: blocks,
14495          onInput,
14496          onChange,
14497          templateLock: false,
14498          renderAppender: import_block_editor4.InnerBlocks.ButtonBlockAppender
14499        }
14500      );
14501      return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
14502        "div",
14503        {
14504          "data-widget-area-id": id,
14505          className: clsx_default(
14506            "wp-block-widget-area__inner-blocks block-editor-inner-blocks editor-styles-wrapper",
14507            {
14508              "wp-block-widget-area__highlight-drop-zone": shouldHighlightDropZone
14509            }
14510          ),
14511          children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { ...innerBlocksProps })
14512        }
14513      );
14514    }
14515  
14516    // packages/edit-widgets/build-module/blocks/widget-area/edit/index.mjs
14517    var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
14518    function WidgetAreaEdit({
14519      clientId,
14520      attributes: { id, name: name2 }
14521    }) {
14522      const isOpen = (0, import_data10.useSelect)(
14523        (select) => select(store2).getIsWidgetAreaOpen(clientId),
14524        [clientId]
14525      );
14526      const { setIsWidgetAreaOpen: setIsWidgetAreaOpen2 } = (0, import_data10.useDispatch)(store2);
14527      const wrapper = (0, import_element51.useRef)();
14528      const setOpen = (0, import_element51.useCallback)(
14529        (openState) => setIsWidgetAreaOpen2(clientId, openState),
14530        [clientId]
14531      );
14532      const isDragging = useIsDragging(wrapper);
14533      const isDraggingWithin = use_is_dragging_within_default(wrapper);
14534      const [openedWhileDragging, setOpenedWhileDragging] = (0, import_element51.useState)(false);
14535      (0, import_element51.useEffect)(() => {
14536        if (!isDragging) {
14537          setOpenedWhileDragging(false);
14538          return;
14539        }
14540        if (isDraggingWithin && !isOpen) {
14541          setOpen(true);
14542          setOpenedWhileDragging(true);
14543        } else if (!isDraggingWithin && isOpen && openedWhileDragging) {
14544          setOpen(false);
14545        }
14546      }, [isOpen, isDragging, isDraggingWithin, openedWhileDragging]);
14547      const blockProps = (0, import_block_editor5.useBlockProps)();
14548      return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_components6.Panel, { ref: wrapper, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
14549        import_components6.PanelBody,
14550        {
14551          title: name2,
14552          opened: isOpen,
14553          onToggle: () => {
14554            setIsWidgetAreaOpen2(clientId, !isOpen);
14555          },
14556          scrollAfterOpen: !isDragging,
14557          children: ({ opened }) => (
14558            // This is required to ensure LegacyWidget blocks are not
14559            // unmounted when the panel is collapsed. Unmounting legacy
14560            // widgets may have unintended consequences (e.g.  TinyMCE
14561            // not being properly reinitialized)
14562            /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
14563              import_components6.__unstableDisclosureContent,
14564              {
14565                className: "wp-block-widget-area__panel-body-content",
14566                visible: opened,
14567                children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
14568                  import_core_data5.EntityProvider,
14569                  {
14570                    kind: "root",
14571                    type: "postType",
14572                    id: `widget-area-$id}`,
14573                    children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(WidgetAreaInnerBlocks, { id })
14574                  }
14575                )
14576              }
14577            )
14578          )
14579        }
14580      ) }) });
14581    }
14582    var useIsDragging = (elementRef) => {
14583      const [isDragging, setIsDragging] = (0, import_element51.useState)(false);
14584      (0, import_element51.useEffect)(() => {
14585        const { ownerDocument: ownerDocument2 } = elementRef.current;
14586        function handleDragStart() {
14587          setIsDragging(true);
14588        }
14589        function handleDragEnd() {
14590          setIsDragging(false);
14591        }
14592        ownerDocument2.addEventListener("dragstart", handleDragStart);
14593        ownerDocument2.addEventListener("dragend", handleDragEnd);
14594        return () => {
14595          ownerDocument2.removeEventListener("dragstart", handleDragStart);
14596          ownerDocument2.removeEventListener("dragend", handleDragEnd);
14597        };
14598      }, []);
14599      return isDragging;
14600    };
14601  
14602    // packages/edit-widgets/build-module/blocks/widget-area/index.mjs
14603    var { name } = block_default;
14604    var settings = {
14605      title: (0, import_i18n9.__)("Widget Area"),
14606      description: (0, import_i18n9.__)("A widget area container."),
14607      __experimentalLabel: ({ name: label }) => label,
14608      icon: layout_default,
14609      edit: WidgetAreaEdit
14610    };
14611  
14612    // packages/edit-widgets/build-module/components/layout/index.mjs
14613    var import_i18n26 = __toESM(require_i18n(), 1);
14614    var import_element69 = __toESM(require_element(), 1);
14615    var import_data31 = __toESM(require_data(), 1);
14616    var import_plugins3 = __toESM(require_plugins(), 1);
14617    var import_notices4 = __toESM(require_notices(), 1);
14618    var import_components20 = __toESM(require_components(), 1);
14619    var import_theme2 = __toESM(require_theme(), 1);
14620  
14621    // packages/edit-widgets/build-module/components/error-boundary/index.mjs
14622    var import_element52 = __toESM(require_element(), 1);
14623    var import_i18n10 = __toESM(require_i18n(), 1);
14624    var import_compose6 = __toESM(require_compose(), 1);
14625    var import_hooks3 = __toESM(require_hooks(), 1);
14626    var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
14627    function getErrorName(error2) {
14628      return error2 instanceof Error && error2.name || "Error";
14629    }
14630    function getErrorMessage(error2) {
14631      if (typeof error2 === "string" && error2) {
14632        return error2;
14633      }
14634      if (typeof error2?.message === "string" && error2.message) {
14635        return error2.message;
14636      }
14637      return "An unknown error occurred.";
14638    }
14639    function getErrorSections(error2, componentStack) {
14640      const sections = [
14641        { label: getErrorName(error2), content: getErrorMessage(error2) }
14642      ];
14643      if (error2?.stack) {
14644        sections.push({
14645          label: "Stack",
14646          content: error2.stack.trim(),
14647          preformatted: true
14648        });
14649      }
14650      if (componentStack) {
14651        sections.push({
14652          label: "Component stack",
14653          content: componentStack.trim(),
14654          preformatted: true
14655        });
14656      }
14657      sections.push({
14658        label: "Environment",
14659        content: `User agent: $window.navigator.userAgent}`,
14660        preformatted: true
14661      });
14662      return sections;
14663    }
14664    function getErrorReport(error2, componentStack) {
14665      const sections = getErrorSections(error2, componentStack).map(
14666        ({ label, content, preformatted }) => `**$label}**
14667  
14668  $preformatted ? `\`\`\`
14669  $content}
14670  \`\`\`` : content}`
14671      );
14672      return ["### Error report", ...sections].join("\n\n");
14673    }
14674    function CopyButton({ text, children, variant = "outline" }) {
14675      const ref = (0, import_compose6.useCopyToClipboard)(text);
14676      return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(notice_exports.ActionButton, { variant, ref, children });
14677    }
14678    function ErrorReport({ error: error2, componentStack }) {
14679      return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
14680        Stack,
14681        {
14682          className: "edit-widgets-error-boundary__report",
14683          direction: "column",
14684          gap: "md",
14685          children: getErrorSections(error2, componentStack).map(
14686            ({ label, content }) => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(Stack, { direction: "column", gap: "xs", children: [
14687              /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Text, { variant: "heading-md", children: label }),
14688              /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("pre", { className: "edit-widgets-error-boundary__report-section", children: content })
14689            ] }, label)
14690          )
14691        }
14692      );
14693    }
14694    function ErrorDetails({ error: error2, componentStack }) {
14695      return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(collapsible_card_exports.Root, { className: "edit-widgets-error-boundary__details", children: [
14696        /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(collapsible_card_exports.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(card_exports.Title, { children: (0, import_i18n10.__)("Error details") }) }),
14697        /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(collapsible_card_exports.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
14698          ErrorReport,
14699          {
14700            error: error2,
14701            componentStack
14702          }
14703        ) })
14704      ] });
14705    }
14706    var ErrorBoundary = class extends import_element52.Component {
14707      constructor() {
14708        super(...arguments);
14709        this.state = {
14710          error: null,
14711          componentStack: null
14712        };
14713      }
14714      componentDidCatch(error2, errorInfo) {
14715        this.setState({ componentStack: errorInfo?.componentStack });
14716        (0, import_hooks3.doAction)("editor.ErrorBoundary.errorLogged", error2, errorInfo);
14717      }
14718      static getDerivedStateFromError(error2) {
14719        return { error: error2 };
14720      }
14721      render() {
14722        const { error: error2, componentStack } = this.state;
14723        if (!error2) {
14724          return this.props.children;
14725        }
14726        return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
14727          Stack,
14728          {
14729            className: "edit-widgets-error-boundary",
14730            direction: "column",
14731            gap: "lg",
14732            children: [
14733              /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(notice_exports.Root, { intent: "error", children: [
14734                /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(notice_exports.Title, { children: (0, import_i18n10.__)("The editor has crashed") }),
14735                /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(notice_exports.Description, { children: (0, import_i18n10.__)(
14736                  "An unknown error occurred. Reload your browser to try again, or copy the error to report the problem or search."
14737                ) }),
14738                /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(notice_exports.Actions, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
14739                  CopyButton,
14740                  {
14741                    variant: "solid",
14742                    text: () => getErrorReport(error2, componentStack),
14743                    children: (0, import_i18n10.__)("Copy error")
14744                  }
14745                ) })
14746              ] }),
14747              true ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
14748                ErrorDetails,
14749                {
14750                  error: error2,
14751                  componentStack
14752                }
14753              ) : null
14754            ]
14755          }
14756        );
14757      }
14758    };
14759  
14760    // packages/edit-widgets/build-module/components/widget-areas-block-editor-provider/index.mjs
14761    var import_components7 = __toESM(require_components(), 1);
14762    var import_compose7 = __toESM(require_compose(), 1);
14763    var import_media_utils2 = __toESM(require_media_utils(), 1);
14764    var import_data13 = __toESM(require_data(), 1);
14765    var import_core_data8 = __toESM(require_core_data(), 1);
14766    var import_element54 = __toESM(require_element(), 1);
14767    var import_block_editor8 = __toESM(require_block_editor(), 1);
14768    var import_patterns = __toESM(require_patterns(), 1);
14769    var import_preferences4 = __toESM(require_preferences(), 1);
14770  
14771    // packages/edit-widgets/build-module/components/keyboard-shortcuts/index.mjs
14772    var import_element53 = __toESM(require_element(), 1);
14773    var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);
14774    var import_keycodes = __toESM(require_keycodes(), 1);
14775    var import_data11 = __toESM(require_data(), 1);
14776    var import_i18n11 = __toESM(require_i18n(), 1);
14777    var import_core_data6 = __toESM(require_core_data(), 1);
14778    var import_block_editor6 = __toESM(require_block_editor(), 1);
14779    var { usesNativeUndo } = unlock2(import_block_editor6.privateApis);
14780    function KeyboardShortcuts() {
14781      const { redo, undo } = (0, import_data11.useDispatch)(import_core_data6.store);
14782      const { saveEditedWidgetAreas: saveEditedWidgetAreas2 } = (0, import_data11.useDispatch)(store2);
14783      (0, import_keyboard_shortcuts.useShortcut)("core/edit-widgets/undo", (event) => {
14784        if (usesNativeUndo(event)) {
14785          return;
14786        }
14787        undo();
14788        event.preventDefault();
14789      });
14790      (0, import_keyboard_shortcuts.useShortcut)("core/edit-widgets/redo", (event) => {
14791        if (usesNativeUndo(event)) {
14792          return;
14793        }
14794        redo();
14795        event.preventDefault();
14796      });
14797      (0, import_keyboard_shortcuts.useShortcut)("core/edit-widgets/save", (event) => {
14798        event.preventDefault();
14799        saveEditedWidgetAreas2();
14800      });
14801      return null;
14802    }
14803    function KeyboardShortcutsRegister() {
14804      const { registerShortcut } = (0, import_data11.useDispatch)(import_keyboard_shortcuts.store);
14805      (0, import_element53.useEffect)(() => {
14806        registerShortcut({
14807          name: "core/edit-widgets/undo",
14808          category: "global",
14809          description: (0, import_i18n11.__)("Undo your last changes."),
14810          keyCombination: {
14811            modifier: "primary",
14812            character: "z"
14813          }
14814        });
14815        registerShortcut({
14816          name: "core/edit-widgets/redo",
14817          category: "global",
14818          description: (0, import_i18n11.__)("Redo your last undo."),
14819          keyCombination: {
14820            modifier: "primaryShift",
14821            character: "z"
14822          },
14823          // Disable on Apple OS because it conflicts with the browser's
14824          // history shortcut. It's a fine alias for both Windows and Linux.
14825          // Since there's no conflict for Ctrl+Shift+Z on both Windows and
14826          // Linux, we keep it as the default for consistency.
14827          aliases: (0, import_keycodes.isAppleOS)() ? [] : [
14828            {
14829              modifier: "primary",
14830              character: "y"
14831            }
14832          ]
14833        });
14834        registerShortcut({
14835          name: "core/edit-widgets/save",
14836          category: "global",
14837          description: (0, import_i18n11.__)("Save your changes."),
14838          keyCombination: {
14839            modifier: "primary",
14840            character: "s"
14841          }
14842        });
14843        registerShortcut({
14844          name: "core/edit-widgets/keyboard-shortcuts",
14845          category: "main",
14846          description: (0, import_i18n11.__)("Display these keyboard shortcuts."),
14847          keyCombination: {
14848            modifier: "access",
14849            character: "h"
14850          }
14851        });
14852        registerShortcut({
14853          name: "core/edit-widgets/next-region",
14854          category: "global",
14855          description: (0, import_i18n11.__)("Navigate to the next part of the editor."),
14856          keyCombination: {
14857            modifier: "ctrl",
14858            character: "`"
14859          },
14860          aliases: [
14861            {
14862              modifier: "access",
14863              character: "n"
14864            }
14865          ]
14866        });
14867        registerShortcut({
14868          name: "core/edit-widgets/previous-region",
14869          category: "global",
14870          description: (0, import_i18n11.__)("Navigate to the previous part of the editor."),
14871          keyCombination: {
14872            modifier: "ctrlShift",
14873            character: "`"
14874          },
14875          aliases: [
14876            {
14877              modifier: "access",
14878              character: "p"
14879            },
14880            {
14881              modifier: "ctrlShift",
14882              character: "~"
14883            }
14884          ]
14885        });
14886      }, [registerShortcut]);
14887      return null;
14888    }
14889    KeyboardShortcuts.Register = KeyboardShortcutsRegister;
14890    var keyboard_shortcuts_default = KeyboardShortcuts;
14891  
14892    // packages/edit-widgets/build-module/hooks/use-last-selected-widget-area.mjs
14893    var import_data12 = __toESM(require_data(), 1);
14894    var import_block_editor7 = __toESM(require_block_editor(), 1);
14895    var import_core_data7 = __toESM(require_core_data(), 1);
14896    var useLastSelectedWidgetArea = () => (0, import_data12.useSelect)((select) => {
14897      const { getBlockSelectionEnd, getBlockName } = select(import_block_editor7.store);
14898      const selectionEndClientId = getBlockSelectionEnd();
14899      if (getBlockName(selectionEndClientId) === "core/widget-area") {
14900        return selectionEndClientId;
14901      }
14902      const { getParentWidgetAreaBlock: getParentWidgetAreaBlock2 } = select(store2);
14903      const widgetAreaBlock = getParentWidgetAreaBlock2(selectionEndClientId);
14904      const widgetAreaBlockClientId = widgetAreaBlock?.clientId;
14905      if (widgetAreaBlockClientId) {
14906        return widgetAreaBlockClientId;
14907      }
14908      const { getEntityRecord } = select(import_core_data7.store);
14909      const widgetAreasPost = getEntityRecord(
14910        KIND,
14911        POST_TYPE,
14912        buildWidgetAreasPostId()
14913      );
14914      return widgetAreasPost?.blocks[0]?.clientId;
14915    }, []);
14916    var use_last_selected_widget_area_default = useLastSelectedWidgetArea;
14917  
14918    // packages/edit-widgets/build-module/constants.mjs
14919    var ALLOW_REUSABLE_BLOCKS = false;
14920  
14921    // packages/edit-widgets/build-module/components/widget-areas-block-editor-provider/index.mjs
14922    var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
14923    var { ExperimentalBlockEditorProvider } = unlock2(import_block_editor8.privateApis);
14924    var { PatternsMenuItems } = unlock2(import_patterns.privateApis);
14925    var EMPTY_ARRAY2 = [];
14926    function WidgetAreasBlockEditorProvider({
14927      blockEditorSettings,
14928      children,
14929      ...props
14930    }) {
14931      const isLargeViewport = (0, import_compose7.useViewportMatch)("medium");
14932      const {
14933        hasUploadPermissions,
14934        reusableBlocks,
14935        isFixedToolbarActive,
14936        keepCaretInsideBlock,
14937        pageOnFront,
14938        pageForPosts
14939      } = (0, import_data13.useSelect)((select) => {
14940        const { canUser, getEntityRecord, getEntityRecords } = select(import_core_data8.store);
14941        const siteSettings = canUser("read", {
14942          kind: "root",
14943          name: "site"
14944        }) ? getEntityRecord("root", "site") : void 0;
14945        return {
14946          hasUploadPermissions: canUser("create", {
14947            kind: "postType",
14948            name: "attachment"
14949          }) ?? true,
14950          reusableBlocks: ALLOW_REUSABLE_BLOCKS ? getEntityRecords("postType", "wp_block") : EMPTY_ARRAY2,
14951          isFixedToolbarActive: !!select(import_preferences4.store).get(
14952            "core/edit-widgets",
14953            "fixedToolbar"
14954          ),
14955          keepCaretInsideBlock: !!select(import_preferences4.store).get(
14956            "core/edit-widgets",
14957            "keepCaretInsideBlock"
14958          ),
14959          pageOnFront: siteSettings?.page_on_front,
14960          pageForPosts: siteSettings?.page_for_posts
14961        };
14962      }, []);
14963      const { setIsInserterOpened: setIsInserterOpened2 } = (0, import_data13.useDispatch)(store2);
14964      const settings2 = (0, import_element54.useMemo)(() => {
14965        let mediaUploadBlockEditor;
14966        if (hasUploadPermissions) {
14967          mediaUploadBlockEditor = ({ onError, ...argumentsObject }) => {
14968            (0, import_media_utils2.uploadMedia)({
14969              wpAllowedMimeTypes: blockEditorSettings.allowedMimeTypes,
14970              onError: ({ message }) => onError(message),
14971              ...argumentsObject
14972            });
14973          };
14974        }
14975        return {
14976          ...blockEditorSettings,
14977          __experimentalReusableBlocks: reusableBlocks,
14978          hasFixedToolbar: isFixedToolbarActive || !isLargeViewport,
14979          keepCaretInsideBlock,
14980          mediaUpload: mediaUploadBlockEditor,
14981          templateLock: "all",
14982          __experimentalSetIsInserterOpened: setIsInserterOpened2,
14983          pageOnFront,
14984          pageForPosts,
14985          editorTool: "edit"
14986        };
14987      }, [
14988        hasUploadPermissions,
14989        blockEditorSettings,
14990        isFixedToolbarActive,
14991        isLargeViewport,
14992        keepCaretInsideBlock,
14993        reusableBlocks,
14994        setIsInserterOpened2,
14995        pageOnFront,
14996        pageForPosts
14997      ]);
14998      const widgetAreaId = use_last_selected_widget_area_default();
14999      const [blocks, onInput, onChange] = (0, import_core_data8.useEntityBlockEditor)(
15000        KIND,
15001        POST_TYPE,
15002        { id: buildWidgetAreasPostId() }
15003      );
15004      return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_components7.SlotFillProvider, { children: [
15005        /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(keyboard_shortcuts_default.Register, {}),
15006        /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
15007          ExperimentalBlockEditorProvider,
15008          {
15009            value: blocks,
15010            onInput,
15011            onChange,
15012            settings: settings2,
15013            useSubRegistry: false,
15014            ...props,
15015            children: [
15016              children,
15017              /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PatternsMenuItems, { rootClientId: widgetAreaId })
15018            ]
15019          }
15020        )
15021      ] });
15022    }
15023  
15024    // packages/edit-widgets/build-module/components/sidebar/index.mjs
15025    var import_element56 = __toESM(require_element(), 1);
15026    var import_i18n13 = __toESM(require_i18n(), 1);
15027    var import_block_editor10 = __toESM(require_block_editor(), 1);
15028    var import_components9 = __toESM(require_components(), 1);
15029    var import_data15 = __toESM(require_data(), 1);
15030  
15031    // packages/edit-widgets/build-module/components/sidebar/widget-areas.mjs
15032    var import_data14 = __toESM(require_data(), 1);
15033    var import_element55 = __toESM(require_element(), 1);
15034    var import_block_editor9 = __toESM(require_block_editor(), 1);
15035    var import_components8 = __toESM(require_components(), 1);
15036    var import_i18n12 = __toESM(require_i18n(), 1);
15037    var import_url = __toESM(require_url(), 1);
15038    var import_dom21 = __toESM(require_dom(), 1);
15039    var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
15040    function WidgetAreas({ selectedWidgetAreaId }) {
15041      const widgetAreas = (0, import_data14.useSelect)(
15042        (select) => select(store2).getWidgetAreas(),
15043        []
15044      );
15045      const selectedWidgetArea = (0, import_element55.useMemo)(
15046        () => selectedWidgetAreaId && widgetAreas?.find(
15047          (widgetArea) => widgetArea.id === selectedWidgetAreaId
15048        ),
15049        [selectedWidgetAreaId, widgetAreas]
15050      );
15051      let description;
15052      if (!selectedWidgetArea) {
15053        description = (0, import_i18n12.__)(
15054          // eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts
15055          "Widget Areas are global parts in your site\u2019s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer."
15056        );
15057      } else if (selectedWidgetAreaId === "wp_inactive_widgets") {
15058        description = (0, import_i18n12.__)(
15059          "Blocks in this Widget Area will not be displayed in your site."
15060        );
15061      } else {
15062        description = selectedWidgetArea.description;
15063      }
15064      return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "edit-widgets-widget-areas", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "edit-widgets-widget-areas__top-container", children: [
15065        /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_block_editor9.BlockIcon, { icon: layout_default }),
15066        /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { children: [
15067          /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
15068            "p",
15069            {
15070              dangerouslySetInnerHTML: {
15071                __html: (0, import_dom21.safeHTML)(description)
15072              }
15073            }
15074          ),
15075          widgetAreas?.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { children: (0, import_i18n12.__)(
15076            "Your theme does not contain any Widget Areas."
15077          ) }),
15078          !selectedWidgetArea && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
15079            import_components8.Button,
15080            {
15081              __next40pxDefaultSize: true,
15082              href: (0, import_url.addQueryArgs)("customize.php", {
15083                "autofocus[panel]": "widgets",
15084                return: window.location.pathname
15085              }),
15086              variant: "tertiary",
15087              children: (0, import_i18n12.__)("Manage with live preview")
15088            }
15089          )
15090        ] })
15091      ] }) });
15092    }
15093  
15094    // packages/edit-widgets/build-module/components/sidebar/index.mjs
15095    var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
15096    var SIDEBAR_ACTIVE_BY_DEFAULT = true;
15097    var BLOCK_INSPECTOR_IDENTIFIER = "edit-widgets/block-inspector";
15098    var WIDGET_AREAS_IDENTIFIER = "edit-widgets/block-areas";
15099    var { Tabs } = unlock2(import_components9.privateApis);
15100    function SidebarHeader({ selectedWidgetAreaBlock }) {
15101      return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(Tabs.TabList, { children: [
15102        /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Tabs.Tab, { tabId: WIDGET_AREAS_IDENTIFIER, children: selectedWidgetAreaBlock ? selectedWidgetAreaBlock.attributes.name : (0, import_i18n13.__)("Widget Areas") }),
15103        /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Tabs.Tab, { tabId: BLOCK_INSPECTOR_IDENTIFIER, children: (0, import_i18n13.__)("Block") })
15104      ] });
15105    }
15106    function SidebarContent({
15107      hasSelectedNonAreaBlock,
15108      currentArea,
15109      isGeneralSidebarOpen,
15110      selectedWidgetAreaBlock
15111    }) {
15112      const { enableComplementaryArea: enableComplementaryArea2 } = (0, import_data15.useDispatch)(store);
15113      (0, import_element56.useEffect)(() => {
15114        if (hasSelectedNonAreaBlock && currentArea === WIDGET_AREAS_IDENTIFIER && isGeneralSidebarOpen) {
15115          enableComplementaryArea2(
15116            "core/edit-widgets",
15117            BLOCK_INSPECTOR_IDENTIFIER
15118          );
15119        }
15120        if (!hasSelectedNonAreaBlock && currentArea === BLOCK_INSPECTOR_IDENTIFIER && isGeneralSidebarOpen) {
15121          enableComplementaryArea2(
15122            "core/edit-widgets",
15123            WIDGET_AREAS_IDENTIFIER
15124          );
15125        }
15126      }, [hasSelectedNonAreaBlock, enableComplementaryArea2]);
15127      const tabsContextValue = (0, import_element56.useContext)(Tabs.Context);
15128      return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
15129        complementary_area_default,
15130        {
15131          className: "edit-widgets-sidebar",
15132          header: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Tabs.Context.Provider, { value: tabsContextValue, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
15133            SidebarHeader,
15134            {
15135              selectedWidgetAreaBlock
15136            }
15137          ) }),
15138          headerClassName: "edit-widgets-sidebar__panel-tabs",
15139          title: (0, import_i18n13.__)("Settings"),
15140          closeLabel: (0, import_i18n13.__)("Close Settings"),
15141          scope: "core/edit-widgets",
15142          identifier: currentArea,
15143          icon: (0, import_i18n13.isRTL)() ? drawer_left_default : drawer_right_default,
15144          isActiveByDefault: SIDEBAR_ACTIVE_BY_DEFAULT,
15145          children: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(Tabs.Context.Provider, { value: tabsContextValue, children: [
15146            /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
15147              Tabs.TabPanel,
15148              {
15149                tabId: WIDGET_AREAS_IDENTIFIER,
15150                focusable: false,
15151                children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
15152                  WidgetAreas,
15153                  {
15154                    selectedWidgetAreaId: selectedWidgetAreaBlock?.attributes.id
15155                  }
15156                )
15157              }
15158            ),
15159            /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
15160              Tabs.TabPanel,
15161              {
15162                tabId: BLOCK_INSPECTOR_IDENTIFIER,
15163                focusable: false,
15164                children: hasSelectedNonAreaBlock ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_block_editor10.BlockInspector, {}) : (
15165                  // Pretend that Widget Areas are part of the UI by not
15166                  // showing the Block Inspector when one is selected.
15167                  /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "block-editor-block-inspector__no-blocks", children: (0, import_i18n13.__)("No block selected.") })
15168                )
15169              }
15170            )
15171          ] })
15172        }
15173      );
15174    }
15175    function Sidebar() {
15176      const {
15177        currentArea,
15178        hasSelectedNonAreaBlock,
15179        isGeneralSidebarOpen,
15180        selectedWidgetAreaBlock
15181      } = (0, import_data15.useSelect)((select) => {
15182        const { getSelectedBlock, getBlock, getBlockParentsByBlockName } = select(import_block_editor10.store);
15183        const { getActiveComplementaryArea: getActiveComplementaryArea2 } = select(store);
15184        const selectedBlock = getSelectedBlock();
15185        const activeArea = getActiveComplementaryArea2(store2.name);
15186        let currentSelection = activeArea;
15187        if (!currentSelection) {
15188          if (selectedBlock) {
15189            currentSelection = BLOCK_INSPECTOR_IDENTIFIER;
15190          } else {
15191            currentSelection = WIDGET_AREAS_IDENTIFIER;
15192          }
15193        }
15194        let widgetAreaBlock;
15195        if (selectedBlock) {
15196          if (selectedBlock.name === "core/widget-area") {
15197            widgetAreaBlock = selectedBlock;
15198          } else {
15199            widgetAreaBlock = getBlock(
15200              getBlockParentsByBlockName(
15201                selectedBlock.clientId,
15202                "core/widget-area"
15203              )[0]
15204            );
15205          }
15206        }
15207        return {
15208          currentArea: currentSelection,
15209          hasSelectedNonAreaBlock: !!(selectedBlock && selectedBlock.name !== "core/widget-area"),
15210          isGeneralSidebarOpen: !!activeArea,
15211          selectedWidgetAreaBlock: widgetAreaBlock
15212        };
15213      }, []);
15214      const { enableComplementaryArea: enableComplementaryArea2 } = (0, import_data15.useDispatch)(store);
15215      const onTabSelect = (0, import_element56.useCallback)(
15216        (newSelectedTabId) => {
15217          if (!!newSelectedTabId) {
15218            enableComplementaryArea2(
15219              store2.name,
15220              newSelectedTabId
15221            );
15222          }
15223        },
15224        [enableComplementaryArea2]
15225      );
15226      return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
15227        Tabs,
15228        {
15229          selectedTabId: isGeneralSidebarOpen ? currentArea : null,
15230          onSelect: onTabSelect,
15231          selectOnMove: false,
15232          children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
15233            SidebarContent,
15234            {
15235              hasSelectedNonAreaBlock,
15236              currentArea,
15237              isGeneralSidebarOpen,
15238              selectedWidgetAreaBlock
15239            }
15240          )
15241        }
15242      );
15243    }
15244  
15245    // packages/edit-widgets/build-module/components/layout/interface.mjs
15246    var import_compose13 = __toESM(require_compose(), 1);
15247    var import_block_editor17 = __toESM(require_block_editor(), 1);
15248    var import_element66 = __toESM(require_element(), 1);
15249    var import_data28 = __toESM(require_data(), 1);
15250    var import_i18n23 = __toESM(require_i18n(), 1);
15251    var import_preferences8 = __toESM(require_preferences(), 1);
15252  
15253    // packages/edit-widgets/build-module/components/header/index.mjs
15254    var import_block_editor12 = __toESM(require_block_editor(), 1);
15255    var import_data22 = __toESM(require_data(), 1);
15256    var import_element62 = __toESM(require_element(), 1);
15257    var import_i18n21 = __toESM(require_i18n(), 1);
15258    var import_components17 = __toESM(require_components(), 1);
15259    var import_compose10 = __toESM(require_compose(), 1);
15260    var import_preferences6 = __toESM(require_preferences(), 1);
15261  
15262    // packages/edit-widgets/build-module/components/header/document-tools/index.mjs
15263    var import_data18 = __toESM(require_data(), 1);
15264    var import_i18n16 = __toESM(require_i18n(), 1);
15265    var import_components12 = __toESM(require_components(), 1);
15266    var import_block_editor11 = __toESM(require_block_editor(), 1);
15267    var import_element59 = __toESM(require_element(), 1);
15268    var import_compose8 = __toESM(require_compose(), 1);
15269  
15270    // packages/edit-widgets/build-module/components/header/undo-redo/undo.mjs
15271    var import_i18n14 = __toESM(require_i18n(), 1);
15272    var import_components10 = __toESM(require_components(), 1);
15273    var import_data16 = __toESM(require_data(), 1);
15274    var import_keycodes2 = __toESM(require_keycodes(), 1);
15275    var import_core_data9 = __toESM(require_core_data(), 1);
15276    var import_element57 = __toESM(require_element(), 1);
15277    var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1);
15278    function UndoButton(props, ref) {
15279      const hasUndo = (0, import_data16.useSelect)(
15280        (select) => select(import_core_data9.store).hasUndo(),
15281        []
15282      );
15283      const { undo } = (0, import_data16.useDispatch)(import_core_data9.store);
15284      return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
15285        import_components10.Button,
15286        {
15287          ...props,
15288          ref,
15289          icon: !(0, import_i18n14.isRTL)() ? undo_default : redo_default,
15290          label: (0, import_i18n14.__)("Undo"),
15291          shortcut: import_keycodes2.displayShortcut.primary("z"),
15292          "aria-disabled": !hasUndo,
15293          onClick: hasUndo ? undo : void 0,
15294          size: "compact"
15295        }
15296      );
15297    }
15298    var undo_default2 = (0, import_element57.forwardRef)(UndoButton);
15299  
15300    // packages/edit-widgets/build-module/components/header/undo-redo/redo.mjs
15301    var import_i18n15 = __toESM(require_i18n(), 1);
15302    var import_components11 = __toESM(require_components(), 1);
15303    var import_data17 = __toESM(require_data(), 1);
15304    var import_keycodes3 = __toESM(require_keycodes(), 1);
15305    var import_core_data10 = __toESM(require_core_data(), 1);
15306    var import_element58 = __toESM(require_element(), 1);
15307    var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
15308    function RedoButton(props, ref) {
15309      const shortcut = (0, import_keycodes3.isAppleOS)() ? import_keycodes3.displayShortcut.primaryShift("z") : import_keycodes3.displayShortcut.primary("y");
15310      const hasRedo = (0, import_data17.useSelect)(
15311        (select) => select(import_core_data10.store).hasRedo(),
15312        []
15313      );
15314      const { redo } = (0, import_data17.useDispatch)(import_core_data10.store);
15315      return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
15316        import_components11.Button,
15317        {
15318          ...props,
15319          ref,
15320          icon: !(0, import_i18n15.isRTL)() ? redo_default : undo_default,
15321          label: (0, import_i18n15.__)("Redo"),
15322          shortcut,
15323          "aria-disabled": !hasRedo,
15324          onClick: hasRedo ? redo : void 0,
15325          size: "compact"
15326        }
15327      );
15328    }
15329    var redo_default2 = (0, import_element58.forwardRef)(RedoButton);
15330  
15331    // packages/edit-widgets/build-module/components/header/document-tools/index.mjs
15332    var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1);
15333    function DocumentTools() {
15334      const isMediumViewport = (0, import_compose8.useViewportMatch)("medium");
15335      const {
15336        isInserterOpen,
15337        isListViewOpen,
15338        inserterSidebarToggleRef: inserterSidebarToggleRef2,
15339        listViewToggleRef: listViewToggleRef2
15340      } = (0, import_data18.useSelect)((select) => {
15341        const {
15342          isInserterOpened: isInserterOpened2,
15343          getInserterSidebarToggleRef: getInserterSidebarToggleRef2,
15344          isListViewOpened: isListViewOpened2,
15345          getListViewToggleRef: getListViewToggleRef2
15346        } = unlock2(select(store2));
15347        return {
15348          isInserterOpen: isInserterOpened2(),
15349          isListViewOpen: isListViewOpened2(),
15350          inserterSidebarToggleRef: getInserterSidebarToggleRef2(),
15351          listViewToggleRef: getListViewToggleRef2()
15352        };
15353      }, []);
15354      const { setIsInserterOpened: setIsInserterOpened2, setIsListViewOpened: setIsListViewOpened2 } = (0, import_data18.useDispatch)(store2);
15355      const toggleListView = (0, import_element59.useCallback)(
15356        () => setIsListViewOpened2(!isListViewOpen),
15357        [setIsListViewOpened2, isListViewOpen]
15358      );
15359      const toggleInserterSidebar = (0, import_element59.useCallback)(
15360        () => setIsInserterOpened2(!isInserterOpen),
15361        [setIsInserterOpened2, isInserterOpen]
15362      );
15363      return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
15364        import_block_editor11.NavigableToolbar,
15365        {
15366          className: "edit-widgets-header-toolbar",
15367          "aria-label": (0, import_i18n16.__)("Document tools"),
15368          variant: "unstyled",
15369          children: [
15370            /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15371              import_components12.ToolbarItem,
15372              {
15373                ref: inserterSidebarToggleRef2,
15374                as: import_components12.Button,
15375                className: "edit-widgets-header-toolbar__inserter-toggle",
15376                variant: "primary",
15377                isPressed: isInserterOpen,
15378                onMouseDown: (event) => {
15379                  event.preventDefault();
15380                },
15381                onClick: toggleInserterSidebar,
15382                icon: plus_default,
15383                label: (0, import_i18n16._x)(
15384                  "Block Inserter",
15385                  "Generic label for block inserter button"
15386                ),
15387                size: "compact"
15388              }
15389            ),
15390            isMediumViewport && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
15391              /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components12.ToolbarItem, { as: undo_default2 }),
15392              /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components12.ToolbarItem, { as: redo_default2 }),
15393              /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
15394                import_components12.ToolbarItem,
15395                {
15396                  as: import_components12.Button,
15397                  className: "edit-widgets-header-toolbar__list-view-toggle",
15398                  icon: list_view_default,
15399                  isPressed: isListViewOpen,
15400                  label: (0, import_i18n16.__)("List View"),
15401                  onClick: toggleListView,
15402                  ref: listViewToggleRef2,
15403                  size: "compact"
15404                }
15405              )
15406            ] })
15407          ]
15408        }
15409      );
15410    }
15411    var document_tools_default = DocumentTools;
15412  
15413    // packages/edit-widgets/build-module/components/save-button/index.mjs
15414    var import_components13 = __toESM(require_components(), 1);
15415    var import_i18n17 = __toESM(require_i18n(), 1);
15416    var import_data19 = __toESM(require_data(), 1);
15417    var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1);
15418    function SaveButton() {
15419      const { hasEditedWidgetAreaIds, isSaving, isWidgetSaveLocked } = (0, import_data19.useSelect)(
15420        (select) => {
15421          const {
15422            getEditedWidgetAreas: getEditedWidgetAreas2,
15423            isSavingWidgetAreas: isSavingWidgetAreas2,
15424            isWidgetSavingLocked: isWidgetSavingLocked2
15425          } = select(store2);
15426          return {
15427            hasEditedWidgetAreaIds: getEditedWidgetAreas2()?.length > 0,
15428            isSaving: isSavingWidgetAreas2(),
15429            isWidgetSaveLocked: isWidgetSavingLocked2()
15430          };
15431        },
15432        []
15433      );
15434      const { saveEditedWidgetAreas: saveEditedWidgetAreas2 } = (0, import_data19.useDispatch)(store2);
15435      const isDisabled = isWidgetSaveLocked || isSaving || !hasEditedWidgetAreaIds;
15436      return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
15437        import_components13.Button,
15438        {
15439          variant: "primary",
15440          isBusy: isSaving,
15441          "aria-disabled": isDisabled,
15442          onClick: isDisabled ? void 0 : saveEditedWidgetAreas2,
15443          size: "compact",
15444          children: isSaving ? (0, import_i18n17.__)("Saving\u2026") : (0, import_i18n17.__)("Update")
15445        }
15446      );
15447    }
15448    var save_button_default = SaveButton;
15449  
15450    // packages/edit-widgets/build-module/components/more-menu/index.mjs
15451    var import_components16 = __toESM(require_components(), 1);
15452    var import_element61 = __toESM(require_element(), 1);
15453    var import_i18n20 = __toESM(require_i18n(), 1);
15454    var import_preferences5 = __toESM(require_preferences(), 1);
15455    var import_keycodes5 = __toESM(require_keycodes(), 1);
15456    var import_keyboard_shortcuts5 = __toESM(require_keyboard_shortcuts(), 1);
15457    var import_compose9 = __toESM(require_compose(), 1);
15458  
15459    // packages/edit-widgets/build-module/components/keyboard-shortcut-help-modal/index.mjs
15460    var import_components14 = __toESM(require_components(), 1);
15461    var import_i18n19 = __toESM(require_i18n(), 1);
15462    var import_keyboard_shortcuts4 = __toESM(require_keyboard_shortcuts(), 1);
15463    var import_data21 = __toESM(require_data(), 1);
15464  
15465    // packages/edit-widgets/build-module/components/keyboard-shortcut-help-modal/config.mjs
15466    var import_i18n18 = __toESM(require_i18n(), 1);
15467    var textFormattingShortcuts = [
15468      {
15469        keyCombination: { modifier: "primary", character: "b" },
15470        description: (0, import_i18n18.__)("Make the selected text bold.")
15471      },
15472      {
15473        keyCombination: { modifier: "primary", character: "i" },
15474        description: (0, import_i18n18.__)("Make the selected text italic.")
15475      },
15476      {
15477        keyCombination: { modifier: "primary", character: "k" },
15478        description: (0, import_i18n18.__)("Convert the selected text into a link.")
15479      },
15480      {
15481        keyCombination: { modifier: "primaryShift", character: "k" },
15482        description: (0, import_i18n18.__)("Remove a link.")
15483      },
15484      {
15485        keyCombination: { character: "[[" },
15486        description: (0, import_i18n18.__)("Insert a link to a post or page.")
15487      },
15488      {
15489        keyCombination: { modifier: "primary", character: "u" },
15490        description: (0, import_i18n18.__)("Underline the selected text.")
15491      },
15492      {
15493        keyCombination: { modifier: "access", character: "d" },
15494        description: (0, import_i18n18.__)("Strikethrough the selected text.")
15495      },
15496      {
15497        keyCombination: { modifier: "access", character: "x" },
15498        description: (0, import_i18n18.__)("Make the selected text inline code.")
15499      },
15500      {
15501        keyCombination: {
15502          modifier: "access",
15503          character: "0"
15504        },
15505        aliases: [
15506          {
15507            modifier: "access",
15508            character: "7"
15509          }
15510        ],
15511        description: (0, import_i18n18.__)("Convert the current heading to a paragraph.")
15512      },
15513      {
15514        keyCombination: { modifier: "access", character: "1-6" },
15515        description: (0, import_i18n18.__)(
15516          "Convert the current paragraph or heading to a heading of level 1 to 6."
15517        )
15518      },
15519      {
15520        keyCombination: { modifier: "primaryShift", character: "SPACE" },
15521        description: (0, import_i18n18.__)("Add non breaking space.")
15522      }
15523    ];
15524  
15525    // packages/edit-widgets/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs
15526    var import_element60 = __toESM(require_element(), 1);
15527    var import_keycodes4 = __toESM(require_keycodes(), 1);
15528    var import_jsx_runtime76 = __toESM(require_jsx_runtime(), 1);
15529    function KeyCombination({ keyCombination, forceAriaLabel }) {
15530      const shortcut = keyCombination.modifier ? import_keycodes4.displayShortcutList[keyCombination.modifier](
15531        keyCombination.character
15532      ) : keyCombination.character;
15533      const ariaLabel = keyCombination.modifier ? import_keycodes4.shortcutAriaLabel[keyCombination.modifier](
15534        keyCombination.character
15535      ) : keyCombination.character;
15536      const shortcuts = Array.isArray(shortcut) ? shortcut : [shortcut];
15537      return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
15538        "kbd",
15539        {
15540          className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-key-combination",
15541          "aria-label": forceAriaLabel || ariaLabel,
15542          children: shortcuts.map((character, index2) => {
15543            if (character === "+") {
15544              return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_element60.Fragment, { children: character }, index2);
15545            }
15546            return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
15547              "kbd",
15548              {
15549                className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-key",
15550                children: character
15551              },
15552              index2
15553            );
15554          })
15555        }
15556      );
15557    }
15558    function Shortcut({ description, keyCombination, aliases = [], ariaLabel }) {
15559      return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
15560        /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-description", children: description }),
15561        /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-term", children: [
15562          /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
15563            KeyCombination,
15564            {
15565              keyCombination,
15566              forceAriaLabel: ariaLabel
15567            }
15568          ),
15569          aliases.map((alias, index2) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
15570            KeyCombination,
15571            {
15572              keyCombination: alias,
15573              forceAriaLabel: ariaLabel
15574            },
15575            index2
15576          ))
15577        ] })
15578      ] });
15579    }
15580    var shortcut_default = Shortcut;
15581  
15582    // packages/edit-widgets/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs
15583    var import_data20 = __toESM(require_data(), 1);
15584    var import_keyboard_shortcuts3 = __toESM(require_keyboard_shortcuts(), 1);
15585    var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
15586    function DynamicShortcut({ name: name2 }) {
15587      const { keyCombination, description, aliases } = (0, import_data20.useSelect)(
15588        (select) => {
15589          const {
15590            getShortcutKeyCombination,
15591            getShortcutDescription,
15592            getShortcutAliases
15593          } = select(import_keyboard_shortcuts3.store);
15594          return {
15595            keyCombination: getShortcutKeyCombination(name2),
15596            aliases: getShortcutAliases(name2),
15597            description: getShortcutDescription(name2)
15598          };
15599        },
15600        [name2]
15601      );
15602      if (!keyCombination) {
15603        return null;
15604      }
15605      return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
15606        shortcut_default,
15607        {
15608          keyCombination,
15609          description,
15610          aliases
15611        }
15612      );
15613    }
15614    var dynamic_shortcut_default = DynamicShortcut;
15615  
15616    // packages/edit-widgets/build-module/components/keyboard-shortcut-help-modal/index.mjs
15617    var import_jsx_runtime78 = __toESM(require_jsx_runtime(), 1);
15618    var ShortcutList = ({ shortcuts }) => (
15619      /*
15620       * Disable reason: The `list` ARIA role is redundant but
15621       * Safari+VoiceOver won't announce the list otherwise.
15622       */
15623      /* eslint-disable jsx-a11y/no-redundant-roles */
15624      /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15625        "ul",
15626        {
15627          className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-list",
15628          role: "list",
15629          children: shortcuts.map((shortcut, index2) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15630            "li",
15631            {
15632              className: "edit-widgets-keyboard-shortcut-help-modal__shortcut",
15633              children: typeof shortcut === "string" ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(dynamic_shortcut_default, { name: shortcut }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(shortcut_default, { ...shortcut })
15634            },
15635            index2
15636          ))
15637        }
15638      )
15639    );
15640    var ShortcutSection = ({ title, shortcuts, className }) => /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
15641      "section",
15642      {
15643        className: clsx_default(
15644          "edit-widgets-keyboard-shortcut-help-modal__section",
15645          className
15646        ),
15647        children: [
15648          !!title && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("h2", { className: "edit-widgets-keyboard-shortcut-help-modal__section-title", children: title }),
15649          /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ShortcutList, { shortcuts })
15650        ]
15651      }
15652    );
15653    var ShortcutCategorySection = ({
15654      title,
15655      categoryName,
15656      additionalShortcuts = []
15657    }) => {
15658      const categoryShortcuts = (0, import_data21.useSelect)(
15659        (select) => {
15660          return select(import_keyboard_shortcuts4.store).getCategoryShortcuts(
15661            categoryName
15662          );
15663        },
15664        [categoryName]
15665      );
15666      return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15667        ShortcutSection,
15668        {
15669          title,
15670          shortcuts: categoryShortcuts.concat(additionalShortcuts)
15671        }
15672      );
15673    };
15674    function KeyboardShortcutHelpModal({
15675      isModalActive: isModalActive2,
15676      toggleModal
15677    }) {
15678      (0, import_keyboard_shortcuts4.useShortcut)("core/edit-widgets/keyboard-shortcuts", toggleModal, {
15679        bindGlobal: true
15680      });
15681      if (!isModalActive2) {
15682        return null;
15683      }
15684      return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
15685        import_components14.Modal,
15686        {
15687          className: "edit-widgets-keyboard-shortcut-help-modal",
15688          title: (0, import_i18n19.__)("Keyboard shortcuts"),
15689          onRequestClose: toggleModal,
15690          children: [
15691            /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15692              ShortcutSection,
15693              {
15694                className: "edit-widgets-keyboard-shortcut-help-modal__main-shortcuts",
15695                shortcuts: ["core/edit-widgets/keyboard-shortcuts"]
15696              }
15697            ),
15698            /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15699              ShortcutCategorySection,
15700              {
15701                title: (0, import_i18n19.__)("Global shortcuts"),
15702                categoryName: "global"
15703              }
15704            ),
15705            /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15706              ShortcutCategorySection,
15707              {
15708                title: (0, import_i18n19.__)("Selection shortcuts"),
15709                categoryName: "selection"
15710              }
15711            ),
15712            /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15713              ShortcutCategorySection,
15714              {
15715                title: (0, import_i18n19.__)("Block shortcuts"),
15716                categoryName: "block",
15717                additionalShortcuts: [
15718                  {
15719                    keyCombination: { character: "/" },
15720                    description: (0, import_i18n19.__)(
15721                      "Change the block type after adding a new paragraph."
15722                    ),
15723                    /* translators: The forward-slash character. e.g. '/'. */
15724                    ariaLabel: (0, import_i18n19.__)("Forward-slash")
15725                  }
15726                ]
15727              }
15728            ),
15729            /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15730              ShortcutSection,
15731              {
15732                title: (0, import_i18n19.__)("Text formatting"),
15733                shortcuts: textFormattingShortcuts
15734              }
15735            ),
15736            /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15737              ShortcutCategorySection,
15738              {
15739                title: (0, import_i18n19.__)("List View shortcuts"),
15740                categoryName: "list-view"
15741              }
15742            )
15743          ]
15744        }
15745      );
15746    }
15747  
15748    // packages/edit-widgets/build-module/components/more-menu/tools-more-menu-group.mjs
15749    var import_components15 = __toESM(require_components(), 1);
15750    var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1);
15751    var { Fill: ToolsMoreMenuGroup, Slot: Slot4 } = (0, import_components15.createSlotFill)(
15752      "EditWidgetsToolsMoreMenuGroup"
15753    );
15754    ToolsMoreMenuGroup.Slot = ({ fillProps }) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Slot4, { fillProps, children: (fills) => fills.length > 0 && fills });
15755    var tools_more_menu_group_default = ToolsMoreMenuGroup;
15756  
15757    // packages/edit-widgets/build-module/components/more-menu/index.mjs
15758    var import_jsx_runtime80 = __toESM(require_jsx_runtime(), 1);
15759    function MoreMenu() {
15760      const [
15761        isKeyboardShortcutsModalActive,
15762        setIsKeyboardShortcutsModalVisible
15763      ] = (0, import_element61.useState)(false);
15764      const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive);
15765      (0, import_keyboard_shortcuts5.useShortcut)(
15766        "core/edit-widgets/keyboard-shortcuts",
15767        toggleKeyboardShortcutsModal
15768      );
15769      const isLargeViewport = (0, import_compose9.useViewportMatch)("medium");
15770      return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
15771        /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15772          import_components16.DropdownMenu,
15773          {
15774            icon: more_vertical_default,
15775            label: (0, import_i18n20.__)("Options"),
15776            popoverProps: {
15777              placement: "bottom-end",
15778              className: "more-menu-dropdown__content"
15779            },
15780            toggleProps: {
15781              tooltipPosition: "bottom",
15782              size: "compact"
15783            },
15784            children: (onClose) => /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
15785              isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components16.MenuGroup, { label: (0, import_i18n20._x)("View", "noun"), children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15786                import_preferences5.PreferenceToggleMenuItem,
15787                {
15788                  scope: "core/edit-widgets",
15789                  name: "fixedToolbar",
15790                  label: (0, import_i18n20.__)("Top toolbar"),
15791                  info: (0, import_i18n20.__)(
15792                    "Access all block and document tools in a single place"
15793                  ),
15794                  messageActivated: (0, import_i18n20.__)(
15795                    "Top toolbar activated"
15796                  ),
15797                  messageDeactivated: (0, import_i18n20.__)(
15798                    "Top toolbar deactivated"
15799                  )
15800                }
15801              ) }),
15802              /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_components16.MenuGroup, { label: (0, import_i18n20.__)("Tools"), children: [
15803                /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15804                  import_components16.MenuItem,
15805                  {
15806                    onClick: () => {
15807                      setIsKeyboardShortcutsModalVisible(true);
15808                    },
15809                    shortcut: import_keycodes5.displayShortcut.access("h"),
15810                    children: (0, import_i18n20.__)("Keyboard shortcuts")
15811                  }
15812                ),
15813                /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15814                  import_preferences5.PreferenceToggleMenuItem,
15815                  {
15816                    scope: "core/edit-widgets",
15817                    name: "welcomeGuide",
15818                    label: (0, import_i18n20.__)("Welcome Guide")
15819                  }
15820                ),
15821                /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
15822                  import_components16.MenuItem,
15823                  {
15824                    role: "menuitem",
15825                    icon: external_default,
15826                    href: (0, import_i18n20.__)(
15827                      "https://wordpress.org/documentation/article/block-based-widgets-editor/"
15828                    ),
15829                    target: "_blank",
15830                    rel: "noopener",
15831                    children: [
15832                      (0, import_i18n20.__)("Help"),
15833                      /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(VisuallyHidden, {
15834                        render: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", {}),
15835                        /* translators: accessibility text */
15836                        children: (0, import_i18n20.__)("(opens in a new tab)")
15837                      })
15838                    ]
15839                  }
15840                ),
15841                /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15842                  tools_more_menu_group_default.Slot,
15843                  {
15844                    fillProps: { onClose }
15845                  }
15846                )
15847              ] }),
15848              /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_components16.MenuGroup, { label: (0, import_i18n20.__)("Preferences"), children: [
15849                /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15850                  import_preferences5.PreferenceToggleMenuItem,
15851                  {
15852                    scope: "core/edit-widgets",
15853                    name: "keepCaretInsideBlock",
15854                    label: (0, import_i18n20.__)(
15855                      "Contain text cursor inside block"
15856                    ),
15857                    info: (0, import_i18n20.__)(
15858                      "Aids screen readers by stopping text caret from leaving blocks."
15859                    ),
15860                    messageActivated: (0, import_i18n20.__)(
15861                      "Contain text cursor inside block activated"
15862                    ),
15863                    messageDeactivated: (0, import_i18n20.__)(
15864                      "Contain text cursor inside block deactivated"
15865                    )
15866                  }
15867                ),
15868                /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15869                  import_preferences5.PreferenceToggleMenuItem,
15870                  {
15871                    scope: "core/edit-widgets",
15872                    name: "themeStyles",
15873                    info: (0, import_i18n20.__)(
15874                      "Make the editor look like your theme."
15875                    ),
15876                    label: (0, import_i18n20.__)("Use theme styles")
15877                  }
15878                ),
15879                isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15880                  import_preferences5.PreferenceToggleMenuItem,
15881                  {
15882                    scope: "core/edit-widgets",
15883                    name: "showBlockBreadcrumbs",
15884                    label: (0, import_i18n20.__)("Display block breadcrumbs"),
15885                    info: (0, import_i18n20.__)(
15886                      "Shows block breadcrumbs at the bottom of the editor."
15887                    ),
15888                    messageActivated: (0, import_i18n20.__)(
15889                      "Display block breadcrumbs activated"
15890                    ),
15891                    messageDeactivated: (0, import_i18n20.__)(
15892                      "Display block breadcrumbs deactivated"
15893                    )
15894                  }
15895                )
15896              ] })
15897            ] })
15898          }
15899        ),
15900        /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
15901          KeyboardShortcutHelpModal,
15902          {
15903            isModalActive: isKeyboardShortcutsModalActive,
15904            toggleModal: toggleKeyboardShortcutsModal
15905          }
15906        )
15907      ] });
15908    }
15909  
15910    // packages/edit-widgets/build-module/components/header/index.mjs
15911    var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1);
15912    function Header3() {
15913      const isLargeViewport = (0, import_compose10.useViewportMatch)("medium");
15914      const blockToolbarRef = (0, import_element62.useRef)();
15915      const { hasFixedToolbar } = (0, import_data22.useSelect)(
15916        (select) => ({
15917          hasFixedToolbar: !!select(import_preferences6.store).get(
15918            "core/edit-widgets",
15919            "fixedToolbar"
15920          )
15921        }),
15922        []
15923      );
15924      return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_jsx_runtime81.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "edit-widgets-header", children: [
15925        /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "edit-widgets-header__navigable-toolbar-wrapper", children: [
15926          isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("h1", { className: "edit-widgets-header__title", children: (0, import_i18n21.__)("Widgets") }),
15927          !isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
15928            VisuallyHidden,
15929            {
15930              className: "edit-widgets-header__title",
15931              render: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("h1", {}),
15932              children: (0, import_i18n21.__)("Widgets")
15933            }
15934          ),
15935          /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(document_tools_default, {}),
15936          hasFixedToolbar && isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
15937            /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "selected-block-tools-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_block_editor12.BlockToolbar, { hideDragHandle: true }) }),
15938            /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
15939              import_components17.Popover.Slot,
15940              {
15941                ref: blockToolbarRef,
15942                name: "block-toolbar"
15943              }
15944            )
15945          ] })
15946        ] }),
15947        /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "edit-widgets-header__actions", children: [
15948          /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(pinned_items_default.Slot, { scope: "core/edit-widgets" }),
15949          /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(save_button_default, {}),
15950          /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(MoreMenu, {})
15951        ] })
15952      ] }) });
15953    }
15954    var header_default = Header3;
15955  
15956    // packages/edit-widgets/build-module/components/widget-areas-block-editor-content/index.mjs
15957    var import_block_editor13 = __toESM(require_block_editor(), 1);
15958    var import_compose11 = __toESM(require_compose(), 1);
15959    var import_data23 = __toESM(require_data(), 1);
15960    var import_element63 = __toESM(require_element(), 1);
15961    var import_preferences7 = __toESM(require_preferences(), 1);
15962  
15963    // packages/edit-widgets/build-module/components/notices/index.mjs
15964    var import_notices2 = __toESM(require_notices(), 1);
15965    var import_theme = __toESM(require_theme(), 1);
15966    var import_jsx_runtime82 = __toESM(require_jsx_runtime(), 1);
15967    function Notices() {
15968      return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_theme.ThemeProvider, { cornerRadius: "none", children: [
15969        /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
15970          import_notices2.InlineNotices,
15971          {
15972            className: "edit-widgets-notices",
15973            pinnedNoticesClassName: "edit-widgets-notices__pinned",
15974            dismissibleNoticesClassName: "edit-widgets-notices__dismissible"
15975          }
15976        ),
15977        /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_notices2.SnackbarNotices, { className: "edit-widgets-notices__snackbar" })
15978      ] });
15979    }
15980    var notices_default = Notices;
15981  
15982    // packages/edit-widgets/build-module/components/widget-areas-block-editor-content/index.mjs
15983    var import_jsx_runtime83 = __toESM(require_jsx_runtime(), 1);
15984    function WidgetAreasBlockEditorContent({
15985      blockEditorSettings
15986    }) {
15987      const hasThemeStyles = (0, import_data23.useSelect)(
15988        (select) => !!select(import_preferences7.store).get(
15989          "core/edit-widgets",
15990          "themeStyles"
15991        ),
15992        []
15993      );
15994      const isLargeViewport = (0, import_compose11.useViewportMatch)("medium");
15995      const styles = (0, import_element63.useMemo)(() => {
15996        return hasThemeStyles ? blockEditorSettings.styles : [];
15997      }, [blockEditorSettings, hasThemeStyles]);
15998      return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "edit-widgets-block-editor", children: [
15999        /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(notices_default, {}),
16000        !isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_block_editor13.BlockToolbar, { hideDragHandle: true }),
16001        /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_block_editor13.BlockTools, { children: [
16002          /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(keyboard_shortcuts_default, {}),
16003          /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
16004            import_block_editor13.__unstableEditorStyles,
16005            {
16006              styles,
16007              scope: ":where(.editor-styles-wrapper)"
16008            }
16009          ),
16010          /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_block_editor13.BlockSelectionClearer, { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_block_editor13.WritingFlow, { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_block_editor13.BlockList, { className: "edit-widgets-main-block-list" }) }) })
16011        ] })
16012      ] });
16013    }
16014  
16015    // packages/edit-widgets/build-module/components/secondary-sidebar/index.mjs
16016    var import_data27 = __toESM(require_data(), 1);
16017  
16018    // packages/edit-widgets/build-module/components/secondary-sidebar/inserter-sidebar.mjs
16019    var import_block_editor15 = __toESM(require_block_editor(), 1);
16020    var import_compose12 = __toESM(require_compose(), 1);
16021    var import_element64 = __toESM(require_element(), 1);
16022    var import_data25 = __toESM(require_data(), 1);
16023  
16024    // packages/edit-widgets/build-module/hooks/use-widget-library-insertion-point.mjs
16025    var import_data24 = __toESM(require_data(), 1);
16026    var import_block_editor14 = __toESM(require_block_editor(), 1);
16027    var import_core_data11 = __toESM(require_core_data(), 1);
16028    var useWidgetLibraryInsertionPoint = () => {
16029      const firstRootId = (0, import_data24.useSelect)((select) => {
16030        const { getEntityRecord } = select(import_core_data11.store);
16031        const widgetAreasPost = getEntityRecord(
16032          KIND,
16033          POST_TYPE,
16034          buildWidgetAreasPostId()
16035        );
16036        return widgetAreasPost?.blocks[0]?.clientId;
16037      }, []);
16038      return (0, import_data24.useSelect)(
16039        (select) => {
16040          const {
16041            getBlockRootClientId,
16042            getBlockSelectionEnd,
16043            getBlockOrder,
16044            getBlockIndex
16045          } = select(import_block_editor14.store);
16046          const insertionPoint = select(store2).__experimentalGetInsertionPoint();
16047          if (insertionPoint.rootClientId) {
16048            return insertionPoint;
16049          }
16050          const clientId = getBlockSelectionEnd() || firstRootId;
16051          const rootClientId = getBlockRootClientId(clientId);
16052          if (clientId && rootClientId === "") {
16053            return {
16054              rootClientId: clientId,
16055              insertionIndex: getBlockOrder(clientId).length
16056            };
16057          }
16058          return {
16059            rootClientId,
16060            insertionIndex: getBlockIndex(clientId) + 1
16061          };
16062        },
16063        [firstRootId]
16064      );
16065    };
16066    var use_widget_library_insertion_point_default = useWidgetLibraryInsertionPoint;
16067  
16068    // packages/edit-widgets/build-module/components/secondary-sidebar/inserter-sidebar.mjs
16069    var import_jsx_runtime84 = __toESM(require_jsx_runtime(), 1);
16070    function InserterSidebar() {
16071      const isMobileViewport = (0, import_compose12.useViewportMatch)("medium", "<");
16072      const { rootClientId, insertionIndex } = use_widget_library_insertion_point_default();
16073      const { setIsInserterOpened: setIsInserterOpened2 } = (0, import_data25.useDispatch)(store2);
16074      const closeInserter = (0, import_element64.useCallback)(() => {
16075        return setIsInserterOpened2(false);
16076      }, [setIsInserterOpened2]);
16077      const libraryRef = (0, import_element64.useRef)();
16078      return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "edit-widgets-layout__inserter-panel", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "edit-widgets-layout__inserter-panel-content", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
16079        import_block_editor15.__experimentalLibrary,
16080        {
16081          showInserterHelpPanel: true,
16082          shouldFocusBlock: isMobileViewport,
16083          rootClientId,
16084          __experimentalInsertionIndex: insertionIndex,
16085          ref: libraryRef,
16086          onClose: closeInserter
16087        }
16088      ) }) });
16089    }
16090  
16091    // packages/edit-widgets/build-module/components/secondary-sidebar/list-view-sidebar.mjs
16092    var import_block_editor16 = __toESM(require_block_editor(), 1);
16093    var import_components18 = __toESM(require_components(), 1);
16094    var import_data26 = __toESM(require_data(), 1);
16095    var import_element65 = __toESM(require_element(), 1);
16096    var import_i18n22 = __toESM(require_i18n(), 1);
16097    var import_keycodes6 = __toESM(require_keycodes(), 1);
16098    var import_jsx_runtime85 = __toESM(require_jsx_runtime(), 1);
16099    function ListViewSidebar() {
16100      const { setIsListViewOpened: setIsListViewOpened2 } = (0, import_data26.useDispatch)(store2);
16101      const { getListViewToggleRef: getListViewToggleRef2 } = unlock2((0, import_data26.useSelect)(store2));
16102      const [dropZoneElement, setDropZoneElement] = (0, import_element65.useState)(null);
16103      const closeListView = (0, import_element65.useCallback)(() => {
16104        setIsListViewOpened2(false);
16105        getListViewToggleRef2().current?.focus();
16106      }, [getListViewToggleRef2, setIsListViewOpened2]);
16107      const closeOnEscape = (0, import_element65.useCallback)(
16108        (event) => {
16109          if (event.keyCode === import_keycodes6.ESCAPE && !event.defaultPrevented) {
16110            event.preventDefault();
16111            closeListView();
16112          }
16113        },
16114        [closeListView]
16115      );
16116      return (
16117        // eslint-disable-next-line jsx-a11y/no-static-element-interactions
16118        /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
16119          "div",
16120          {
16121            className: "edit-widgets-editor__list-view-panel",
16122            onKeyDown: closeOnEscape,
16123            children: [
16124              /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "edit-widgets-editor__list-view-panel-header", children: [
16125                /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("strong", { children: (0, import_i18n22.__)("List View") }),
16126                /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
16127                  import_components18.Button,
16128                  {
16129                    icon: close_small_default,
16130                    label: (0, import_i18n22.__)("Close"),
16131                    onClick: closeListView,
16132                    size: "compact"
16133                  }
16134                )
16135              ] }),
16136              /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
16137                "div",
16138                {
16139                  className: "edit-widgets-editor__list-view-panel-content",
16140                  ref: setDropZoneElement,
16141                  children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_block_editor16.__experimentalListView, { dropZoneElement, focusOnMount: true })
16142                }
16143              )
16144            ]
16145          }
16146        )
16147      );
16148    }
16149  
16150    // packages/edit-widgets/build-module/components/secondary-sidebar/index.mjs
16151    var import_jsx_runtime86 = __toESM(require_jsx_runtime(), 1);
16152    function SecondarySidebar() {
16153      const { isInserterOpen, isListViewOpen } = (0, import_data27.useSelect)((select) => {
16154        const { isInserterOpened: isInserterOpened2, isListViewOpened: isListViewOpened2 } = select(store2);
16155        return {
16156          isInserterOpen: isInserterOpened2(),
16157          isListViewOpen: isListViewOpened2()
16158        };
16159      }, []);
16160      if (isInserterOpen) {
16161        return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(InserterSidebar, {});
16162      }
16163      if (isListViewOpen) {
16164        return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ListViewSidebar, {});
16165      }
16166      return null;
16167    }
16168  
16169    // packages/edit-widgets/build-module/components/layout/interface.mjs
16170    var import_jsx_runtime87 = __toESM(require_jsx_runtime(), 1);
16171    var interfaceLabels = {
16172      /* translators: accessibility text for the widgets screen top bar landmark region. */
16173      header: (0, import_i18n23.__)("Widgets top bar"),
16174      /* translators: accessibility text for the widgets screen content landmark region. */
16175      body: (0, import_i18n23.__)("Widgets and blocks"),
16176      /* translators: accessibility text for the widgets screen settings landmark region. */
16177      sidebar: (0, import_i18n23.__)("Widgets settings"),
16178      /* translators: accessibility text for the widgets screen footer landmark region. */
16179      footer: (0, import_i18n23.__)("Widgets footer")
16180    };
16181    function Interface({ blockEditorSettings }) {
16182      const isMobileViewport = (0, import_compose13.useViewportMatch)("medium", "<");
16183      const isHugeViewport = (0, import_compose13.useViewportMatch)("huge", ">=");
16184      const { setIsInserterOpened: setIsInserterOpened2, setIsListViewOpened: setIsListViewOpened2, closeGeneralSidebar: closeGeneralSidebar2 } = (0, import_data28.useDispatch)(store2);
16185      const {
16186        hasBlockBreadCrumbsEnabled,
16187        hasSidebarEnabled,
16188        isInserterOpened: isInserterOpened2,
16189        isListViewOpened: isListViewOpened2
16190      } = (0, import_data28.useSelect)(
16191        (select) => ({
16192          hasSidebarEnabled: !!select(
16193            store
16194          ).getActiveComplementaryArea(store2.name),
16195          isInserterOpened: !!select(store2).isInserterOpened(),
16196          isListViewOpened: !!select(store2).isListViewOpened(),
16197          hasBlockBreadCrumbsEnabled: !!select(import_preferences8.store).get(
16198            "core/edit-widgets",
16199            "showBlockBreadcrumbs"
16200          )
16201        }),
16202        []
16203      );
16204      (0, import_element66.useEffect)(() => {
16205        if (hasSidebarEnabled && !isHugeViewport) {
16206          setIsInserterOpened2(false);
16207          setIsListViewOpened2(false);
16208        }
16209      }, [hasSidebarEnabled, isHugeViewport]);
16210      (0, import_element66.useEffect)(() => {
16211        if ((isInserterOpened2 || isListViewOpened2) && !isHugeViewport) {
16212          closeGeneralSidebar2();
16213        }
16214      }, [isInserterOpened2, isListViewOpened2, isHugeViewport]);
16215      const secondarySidebarLabel = isListViewOpened2 ? (0, import_i18n23.__)("List View") : (0, import_i18n23.__)("Block Library");
16216      const hasSecondarySidebar = isListViewOpened2 || isInserterOpened2;
16217      return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
16218        interface_skeleton_default,
16219        {
16220          labels: {
16221            ...interfaceLabels,
16222            secondarySidebar: secondarySidebarLabel
16223          },
16224          header: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(header_default, {}),
16225          secondarySidebar: hasSecondarySidebar && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(SecondarySidebar, {}),
16226          sidebar: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(complementary_area_default.Slot, { scope: "core/edit-widgets" }),
16227          content: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_jsx_runtime87.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
16228            WidgetAreasBlockEditorContent,
16229            {
16230              blockEditorSettings
16231            }
16232          ) }),
16233          footer: hasBlockBreadCrumbsEnabled && !isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "edit-widgets-layout__footer", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_block_editor17.BlockBreadcrumb, { rootLabelText: (0, import_i18n23.__)("Widgets") }) })
16234        }
16235      );
16236    }
16237    var interface_default = Interface;
16238  
16239    // packages/edit-widgets/build-module/components/layout/unsaved-changes-warning.mjs
16240    var import_i18n24 = __toESM(require_i18n(), 1);
16241    var import_element67 = __toESM(require_element(), 1);
16242    var import_data29 = __toESM(require_data(), 1);
16243    function UnsavedChangesWarning() {
16244      const isDirty = (0, import_data29.useSelect)((select) => {
16245        const { getEditedWidgetAreas: getEditedWidgetAreas2 } = select(store2);
16246        const editedWidgetAreas = getEditedWidgetAreas2();
16247        return editedWidgetAreas?.length > 0;
16248      }, []);
16249      (0, import_element67.useEffect)(() => {
16250        const warnIfUnsavedChanges = (event) => {
16251          if (isDirty) {
16252            event.returnValue = (0, import_i18n24.__)(
16253              "You have unsaved changes. If you proceed, they will be lost."
16254            );
16255            return event.returnValue;
16256          }
16257        };
16258        window.addEventListener("beforeunload", warnIfUnsavedChanges);
16259        return () => {
16260          window.removeEventListener("beforeunload", warnIfUnsavedChanges);
16261        };
16262      }, [isDirty]);
16263      return null;
16264    }
16265  
16266    // packages/edit-widgets/build-module/components/welcome-guide/index.mjs
16267    var import_data30 = __toESM(require_data(), 1);
16268    var import_components19 = __toESM(require_components(), 1);
16269    var import_i18n25 = __toESM(require_i18n(), 1);
16270    var import_element68 = __toESM(require_element(), 1);
16271    var import_preferences9 = __toESM(require_preferences(), 1);
16272    var import_jsx_runtime88 = __toESM(require_jsx_runtime(), 1);
16273    function WelcomeGuide() {
16274      const isActive = (0, import_data30.useSelect)(
16275        (select) => !!select(import_preferences9.store).get(
16276          "core/edit-widgets",
16277          "welcomeGuide"
16278        ),
16279        []
16280      );
16281      const { toggle } = (0, import_data30.useDispatch)(import_preferences9.store);
16282      const widgetAreas = (0, import_data30.useSelect)(
16283        (select) => select(store2).getWidgetAreas({ per_page: -1 }),
16284        []
16285      );
16286      if (!isActive) {
16287        return null;
16288      }
16289      const isEntirelyBlockWidgets = widgetAreas?.every(
16290        (widgetArea) => widgetArea.id === "wp_inactive_widgets" || widgetArea.widgets.every(
16291          (widgetId) => widgetId.startsWith("block-")
16292        )
16293      );
16294      const numWidgetAreas = widgetAreas?.filter(
16295        (widgetArea) => widgetArea.id !== "wp_inactive_widgets"
16296      ).length ?? 0;
16297      return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
16298        import_components19.Guide,
16299        {
16300          className: "edit-widgets-welcome-guide",
16301          contentLabel: (0, import_i18n25.__)("Welcome to block Widgets"),
16302          finishButtonText: (0, import_i18n25.__)("Get started"),
16303          onFinish: () => toggle("core/edit-widgets", "welcomeGuide"),
16304          pages: [
16305            {
16306              image: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
16307                WelcomeGuideImage,
16308                {
16309                  nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.svg",
16310                  animatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.gif"
16311                }
16312              ),
16313              content: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
16314                /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("h1", { className: "edit-widgets-welcome-guide__heading", children: (0, import_i18n25.__)("Welcome to block Widgets") }),
16315                isEntirelyBlockWidgets ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_jsx_runtime88.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_i18n25.sprintf)(
16316                  // Translators: %s: Number of block areas in the current theme.
16317                  (0, import_i18n25._n)(
16318                    "Your theme provides %s \u201Cblock\u201D area for you to add and edit content.\xA0Try adding a search bar, social icons, or other types of blocks here and see how they\u2019ll look on your site.",
16319                    "Your theme provides %s different \u201Cblock\u201D areas for you to add and edit content.\xA0Try adding a search bar, social icons, or other types of blocks here and see how they\u2019ll look on your site.",
16320                    numWidgetAreas
16321                  ),
16322                  numWidgetAreas
16323                ) }) }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
16324                  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_i18n25.__)(
16325                    "You can now add any block to your site\u2019s widget areas. Don\u2019t worry, all of your favorite widgets still work flawlessly."
16326                  ) }),
16327                  /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("p", { className: "edit-widgets-welcome-guide__text", children: [
16328                    /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("strong", { children: (0, import_i18n25.__)(
16329                      "Want to stick with the old widgets?"
16330                    ) }),
16331                    " ",
16332                    /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
16333                      import_components19.ExternalLink,
16334                      {
16335                        href: (0, import_i18n25.__)(
16336                          "https://wordpress.org/plugins/classic-widgets/"
16337                        ),
16338                        children: (0, import_i18n25.__)(
16339                          "Get the Classic Widgets plugin."
16340                        )
16341                      }
16342                    )
16343                  ] })
16344                ] })
16345              ] })
16346            },
16347            {
16348              image: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
16349                WelcomeGuideImage,
16350                {
16351                  nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-editor.svg",
16352                  animatedSrc: "https://s.w.org/images/block-editor/welcome-editor.gif"
16353                }
16354              ),
16355              content: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
16356                /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("h1", { className: "edit-widgets-welcome-guide__heading", children: (0, import_i18n25.__)("Customize each block") }),
16357                /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_i18n25.__)(
16358                  "Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected."
16359                ) })
16360              ] })
16361            },
16362            {
16363              image: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
16364                WelcomeGuideImage,
16365                {
16366                  nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-library.svg",
16367                  animatedSrc: "https://s.w.org/images/block-editor/welcome-library.gif"
16368                }
16369              ),
16370              content: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
16371                /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("h1", { className: "edit-widgets-welcome-guide__heading", children: (0, import_i18n25.__)("Explore all blocks") }),
16372                /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_element68.createInterpolateElement)(
16373                  (0, import_i18n25.__)(
16374                    "All of the blocks available to you live in the block library. You\u2019ll find it wherever you see the <InserterIconImage /> icon."
16375                  ),
16376                  {
16377                    InserterIconImage: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
16378                      "img",
16379                      {
16380                        className: "edit-widgets-welcome-guide__inserter-icon",
16381                        alt: (0, import_i18n25.__)("inserter"),
16382                        src: "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"
16383                      }
16384                    )
16385                  }
16386                ) })
16387              ] })
16388            },
16389            {
16390              image: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
16391                WelcomeGuideImage,
16392                {
16393                  nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.svg",
16394                  animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif"
16395                }
16396              ),
16397              content: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
16398                /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("h1", { className: "edit-widgets-welcome-guide__heading", children: (0, import_i18n25.__)("Learn more") }),
16399                /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_element68.createInterpolateElement)(
16400                  (0, import_i18n25.__)(
16401                    "New to the block editor? Want to learn more about using it? <a>Here's a detailed guide.</a>"
16402                  ),
16403                  {
16404                    a: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
16405                      import_components19.ExternalLink,
16406                      {
16407                        href: (0, import_i18n25.__)(
16408                          "https://wordpress.org/documentation/article/wordpress-block-editor/"
16409                        )
16410                      }
16411                    )
16412                  }
16413                ) })
16414              ] })
16415            }
16416          ]
16417        }
16418      );
16419    }
16420    function WelcomeGuideImage({ nonAnimatedSrc, animatedSrc }) {
16421      return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("picture", { className: "edit-widgets-welcome-guide__image", children: [
16422        /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
16423          "source",
16424          {
16425            srcSet: nonAnimatedSrc,
16426            media: "(prefers-reduced-motion: reduce)"
16427          }
16428        ),
16429        /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("img", { src: animatedSrc, width: "312", height: "240", alt: "" })
16430      ] });
16431    }
16432  
16433    // packages/edit-widgets/build-module/components/layout/index.mjs
16434    var import_jsx_runtime89 = __toESM(require_jsx_runtime(), 1);
16435    function Layout({ blockEditorSettings }) {
16436      const { createErrorNotice } = (0, import_data31.useDispatch)(import_notices4.store);
16437      function onPluginAreaError(name2) {
16438        createErrorNotice(
16439          (0, import_i18n26.sprintf)(
16440            /* translators: %s: plugin name */
16441            (0, import_i18n26.__)(
16442              'The "%s" plugin has encountered an error and cannot be rendered.'
16443            ),
16444            name2
16445          )
16446        );
16447      }
16448      const navigateRegionsProps = (0, import_components20.__unstableUseNavigateRegions)();
16449      const adminPrimary = (0, import_element69.useMemo)(() => getAdminThemeColors().primary, []);
16450      return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_theme2.ThemeProvider, { isRoot: true, color: { primary: adminPrimary }, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { ...navigateRegionsProps, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
16451        WidgetAreasBlockEditorProvider,
16452        {
16453          blockEditorSettings,
16454          children: [
16455            /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
16456              interface_default,
16457              {
16458                blockEditorSettings
16459              }
16460            ),
16461            /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Sidebar, {}),
16462            /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_plugins3.PluginArea, { onError: onPluginAreaError }),
16463            /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(UnsavedChangesWarning, {}),
16464            /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(WelcomeGuide, {})
16465          ]
16466        }
16467      ) }) }) });
16468    }
16469    var layout_default2 = Layout;
16470  
16471    // packages/edit-widgets/build-module/index.mjs
16472    var import_jsx_runtime90 = __toESM(require_jsx_runtime(), 1);
16473    var disabledBlocks = [
16474      "core/more",
16475      "core/freeform",
16476      "core/template-part",
16477      ...ALLOW_REUSABLE_BLOCKS ? [] : ["core/block"]
16478    ];
16479    function initializeEditor(id, settings2) {
16480      const target = document.getElementById(id);
16481      const root = (0, import_element70.createRoot)(target);
16482      const coreBlocks = (0, import_block_library.__experimentalGetCoreBlocks)().filter((block) => {
16483        return !(disabledBlocks.includes(block.name) || block.name.startsWith("core/post") || block.name.startsWith("core/query") || block.name.startsWith("core/site") || block.name.startsWith("core/navigation") || block.name.startsWith("core/term"));
16484      });
16485      (0, import_data32.dispatch)(import_preferences10.store).setDefaults("core/edit-widgets", {
16486        fixedToolbar: false,
16487        welcomeGuide: true,
16488        showBlockBreadcrumbs: true,
16489        themeStyles: true
16490      });
16491      (0, import_data32.dispatch)(import_blocks3.store).reapplyBlockTypeFilters();
16492      (0, import_block_library.registerCoreBlocks)(coreBlocks);
16493      (0, import_widgets5.registerLegacyWidgetBlock)();
16494      if (false) {
16495        (0, import_block_library.__experimentalRegisterExperimentalCoreBlocks)({
16496          enableFSEBlocks: ENABLE_EXPERIMENTAL_FSE_BLOCKS
16497        });
16498      }
16499      (0, import_widgets5.registerLegacyWidgetVariations)(settings2);
16500      registerBlock(widget_area_exports);
16501      (0, import_widgets5.registerWidgetGroupBlock)();
16502      settings2.__experimentalFetchLinkSuggestions = (search, searchOptions) => (0, import_core_data12.__experimentalFetchLinkSuggestions)(search, searchOptions, settings2);
16503      (0, import_blocks3.setFreeformContentHandlerName)("core/html");
16504      root.render(
16505        /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_element70.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(layout_default2, { blockEditorSettings: settings2 }) })
16506      );
16507      return root;
16508    }
16509    var initialize = initializeEditor;
16510    function reinitializeEditor() {
16511      (0, import_deprecated6.default)("wp.editWidgets.reinitializeEditor", {
16512        since: "6.2",
16513        version: "6.3"
16514      });
16515    }
16516    var registerBlock = (block) => {
16517      if (!block) {
16518        return;
16519      }
16520      const { metadata, settings: settings2, name: name2 } = block;
16521      if (metadata) {
16522        (0, import_blocks3.unstable__bootstrapServerSideBlockDefinitions)({ [name2]: metadata });
16523      }
16524      (0, import_blocks3.registerBlockType)(name2, settings2);
16525    };
16526    return __toCommonJS(index_exports);
16527  })();
16528  /*! Bundled license information:
16529  
16530  use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
16531    (**
16532     * @license React
16533     * use-sync-external-store-shim.development.js
16534     *
16535     * Copyright (c) Meta Platforms, Inc. and affiliates.
16536     *
16537     * This source code is licensed under the MIT license found in the
16538     * LICENSE file in the root directory of this source tree.
16539     *)
16540  
16541  use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
16542    (**
16543     * @license React
16544     * use-sync-external-store-shim/with-selector.development.js
16545     *
16546     * Copyright (c) Meta Platforms, Inc. and affiliates.
16547     *
16548     * This source code is licensed under the MIT license found in the
16549     * LICENSE file in the root directory of this source tree.
16550     *)
16551  */
16552  (window.wp ||= {}).editWidgets = wp.editWidgets;
16553  })();


Generated : Sun Sep 13 08:20:28 2026 Cross-referenced by PHPXref