[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

   1  (function() {
   2  var wp;
   3  (wp ||= {}).customizeWidgets = (() => {
   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 name in all)
  15        __defProp(target, name, { get: all[name], 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/element
  36    var require_element = __commonJS({
  37      "package-external:@wordpress/element"(exports, module) {
  38        module.exports = window.wp.element;
  39      }
  40    });
  41  
  42    // package-external:@wordpress/block-library
  43    var require_block_library = __commonJS({
  44      "package-external:@wordpress/block-library"(exports, module) {
  45        module.exports = window.wp.blockLibrary;
  46      }
  47    });
  48  
  49    // package-external:@wordpress/widgets
  50    var require_widgets = __commonJS({
  51      "package-external:@wordpress/widgets"(exports, module) {
  52        module.exports = window.wp.widgets;
  53      }
  54    });
  55  
  56    // package-external:@wordpress/blocks
  57    var require_blocks = __commonJS({
  58      "package-external:@wordpress/blocks"(exports, module) {
  59        module.exports = window.wp.blocks;
  60      }
  61    });
  62  
  63    // package-external:@wordpress/data
  64    var require_data = __commonJS({
  65      "package-external:@wordpress/data"(exports, module) {
  66        module.exports = window.wp.data;
  67      }
  68    });
  69  
  70    // package-external:@wordpress/preferences
  71    var require_preferences = __commonJS({
  72      "package-external:@wordpress/preferences"(exports, module) {
  73        module.exports = window.wp.preferences;
  74      }
  75    });
  76  
  77    // package-external:@wordpress/i18n
  78    var require_i18n = __commonJS({
  79      "package-external:@wordpress/i18n"(exports, module) {
  80        module.exports = window.wp.i18n;
  81      }
  82    });
  83  
  84    // vendor-external:react
  85    var require_react = __commonJS({
  86      "vendor-external:react"(exports, module) {
  87        module.exports = window.React;
  88      }
  89    });
  90  
  91    // vendor-external:react/jsx-runtime
  92    var require_jsx_runtime = __commonJS({
  93      "vendor-external:react/jsx-runtime"(exports, module) {
  94        module.exports = window.ReactJSXRuntime;
  95      }
  96    });
  97  
  98    // vendor-external:react-dom
  99    var require_react_dom = __commonJS({
 100      "vendor-external:react-dom"(exports, module) {
 101        module.exports = window.ReactDOM;
 102      }
 103    });
 104  
 105    // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
 106    var require_use_sync_external_store_shim_development = __commonJS({
 107      "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
 108        "use strict";
 109        (function() {
 110          function is(x, y) {
 111            return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
 112          }
 113          function useSyncExternalStore$2(subscribe, getSnapshot) {
 114            didWarnOld18Alpha || void 0 === React59.startTransition || (didWarnOld18Alpha = true, console.error(
 115              "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."
 116            ));
 117            var value = getSnapshot();
 118            if (!didWarnUncachedGetSnapshot) {
 119              var cachedValue = getSnapshot();
 120              objectIs(value, cachedValue) || (console.error(
 121                "The result of getSnapshot should be cached to avoid an infinite loop"
 122              ), didWarnUncachedGetSnapshot = true);
 123            }
 124            cachedValue = useState21({
 125              inst: { value, getSnapshot }
 126            });
 127            var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
 128            useLayoutEffect3(
 129              function() {
 130                inst.value = value;
 131                inst.getSnapshot = getSnapshot;
 132                checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 133              },
 134              [subscribe, value, getSnapshot]
 135            );
 136            useEffect28(
 137              function() {
 138                checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 139                return subscribe(function() {
 140                  checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 141                });
 142              },
 143              [subscribe]
 144            );
 145            useDebugValue2(value);
 146            return value;
 147          }
 148          function checkIfSnapshotChanged(inst) {
 149            var latestGetSnapshot = inst.getSnapshot;
 150            inst = inst.value;
 151            try {
 152              var nextValue = latestGetSnapshot();
 153              return !objectIs(inst, nextValue);
 154            } catch (error2) {
 155              return true;
 156            }
 157          }
 158          function useSyncExternalStore$1(subscribe, getSnapshot) {
 159            return getSnapshot();
 160          }
 161          "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
 162          var React59 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState21 = React59.useState, useEffect28 = React59.useEffect, useLayoutEffect3 = 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;
 163          exports.useSyncExternalStore = void 0 !== React59.useSyncExternalStore ? React59.useSyncExternalStore : shim;
 164          "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
 165        })();
 166      }
 167    });
 168  
 169    // node_modules/use-sync-external-store/shim/index.js
 170    var require_shim = __commonJS({
 171      "node_modules/use-sync-external-store/shim/index.js"(exports, module) {
 172        "use strict";
 173        if (false) {
 174          module.exports = null;
 175        } else {
 176          module.exports = require_use_sync_external_store_shim_development();
 177        }
 178      }
 179    });
 180  
 181    // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
 182    var require_with_selector_development = __commonJS({
 183      "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) {
 184        "use strict";
 185        (function() {
 186          function is(x, y) {
 187            return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
 188          }
 189          "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
 190          var React59 = require_react(), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore3 = shim.useSyncExternalStore, useRef25 = React59.useRef, useEffect28 = React59.useEffect, useMemo25 = React59.useMemo, useDebugValue2 = React59.useDebugValue;
 191          exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
 192            var instRef = useRef25(null);
 193            if (null === instRef.current) {
 194              var inst = { hasValue: false, value: null };
 195              instRef.current = inst;
 196            } else inst = instRef.current;
 197            instRef = useMemo25(
 198              function() {
 199                function memoizedSelector(nextSnapshot) {
 200                  if (!hasMemo) {
 201                    hasMemo = true;
 202                    memoizedSnapshot = nextSnapshot;
 203                    nextSnapshot = selector(nextSnapshot);
 204                    if (void 0 !== isEqual && inst.hasValue) {
 205                      var currentSelection = inst.value;
 206                      if (isEqual(currentSelection, nextSnapshot))
 207                        return memoizedSelection = currentSelection;
 208                    }
 209                    return memoizedSelection = nextSnapshot;
 210                  }
 211                  currentSelection = memoizedSelection;
 212                  if (objectIs(memoizedSnapshot, nextSnapshot))
 213                    return currentSelection;
 214                  var nextSelection = selector(nextSnapshot);
 215                  if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
 216                    return memoizedSnapshot = nextSnapshot, currentSelection;
 217                  memoizedSnapshot = nextSnapshot;
 218                  return memoizedSelection = nextSelection;
 219                }
 220                var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
 221                return [
 222                  function() {
 223                    return memoizedSelector(getSnapshot());
 224                  },
 225                  null === maybeGetServerSnapshot ? void 0 : function() {
 226                    return memoizedSelector(maybeGetServerSnapshot());
 227                  }
 228                ];
 229              },
 230              [getSnapshot, getServerSnapshot, selector, isEqual]
 231            );
 232            var value = useSyncExternalStore3(subscribe, instRef[0], instRef[1]);
 233            useEffect28(
 234              function() {
 235                inst.hasValue = true;
 236                inst.value = value;
 237              },
 238              [value]
 239            );
 240            useDebugValue2(value);
 241            return value;
 242          };
 243          "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
 244        })();
 245      }
 246    });
 247  
 248    // node_modules/use-sync-external-store/shim/with-selector.js
 249    var require_with_selector = __commonJS({
 250      "node_modules/use-sync-external-store/shim/with-selector.js"(exports, module) {
 251        "use strict";
 252        if (false) {
 253          module.exports = null;
 254        } else {
 255          module.exports = require_with_selector_development();
 256        }
 257      }
 258    });
 259  
 260    // package-external:@wordpress/compose
 261    var require_compose = __commonJS({
 262      "package-external:@wordpress/compose"(exports, module) {
 263        module.exports = window.wp.compose;
 264      }
 265    });
 266  
 267    // package-external:@wordpress/theme
 268    var require_theme = __commonJS({
 269      "package-external:@wordpress/theme"(exports, module) {
 270        module.exports = window.wp.theme;
 271      }
 272    });
 273  
 274    // package-external:@wordpress/private-apis
 275    var require_private_apis = __commonJS({
 276      "package-external:@wordpress/private-apis"(exports, module) {
 277        module.exports = window.wp.privateApis;
 278      }
 279    });
 280  
 281    // package-external:@wordpress/primitives
 282    var require_primitives = __commonJS({
 283      "package-external:@wordpress/primitives"(exports, module) {
 284        module.exports = window.wp.primitives;
 285      }
 286    });
 287  
 288    // package-external:@wordpress/a11y
 289    var require_a11y = __commonJS({
 290      "package-external:@wordpress/a11y"(exports, module) {
 291        module.exports = window.wp.a11y;
 292      }
 293    });
 294  
 295    // package-external:@wordpress/components
 296    var require_components = __commonJS({
 297      "package-external:@wordpress/components"(exports, module) {
 298        module.exports = window.wp.components;
 299      }
 300    });
 301  
 302    // package-external:@wordpress/hooks
 303    var require_hooks = __commonJS({
 304      "package-external:@wordpress/hooks"(exports, module) {
 305        module.exports = window.wp.hooks;
 306      }
 307    });
 308  
 309    // package-external:@wordpress/core-data
 310    var require_core_data = __commonJS({
 311      "package-external:@wordpress/core-data"(exports, module) {
 312        module.exports = window.wp.coreData;
 313      }
 314    });
 315  
 316    // package-external:@wordpress/block-editor
 317    var require_block_editor = __commonJS({
 318      "package-external:@wordpress/block-editor"(exports, module) {
 319        module.exports = window.wp.blockEditor;
 320      }
 321    });
 322  
 323    // package-external:@wordpress/media-utils
 324    var require_media_utils = __commonJS({
 325      "package-external:@wordpress/media-utils"(exports, module) {
 326        module.exports = window.wp.mediaUtils;
 327      }
 328    });
 329  
 330    // package-external:@wordpress/keycodes
 331    var require_keycodes = __commonJS({
 332      "package-external:@wordpress/keycodes"(exports, module) {
 333        module.exports = window.wp.keycodes;
 334      }
 335    });
 336  
 337    // package-external:@wordpress/keyboard-shortcuts
 338    var require_keyboard_shortcuts = __commonJS({
 339      "package-external:@wordpress/keyboard-shortcuts"(exports, module) {
 340        module.exports = window.wp.keyboardShortcuts;
 341      }
 342    });
 343  
 344    // node_modules/fast-deep-equal/es6/index.js
 345    var require_es6 = __commonJS({
 346      "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
 347        "use strict";
 348        module.exports = function equal(a, b) {
 349          if (a === b) return true;
 350          if (a && b && typeof a == "object" && typeof b == "object") {
 351            if (a.constructor !== b.constructor) return false;
 352            var length, i, keys;
 353            if (Array.isArray(a)) {
 354              length = a.length;
 355              if (length != b.length) return false;
 356              for (i = length; i-- !== 0; )
 357                if (!equal(a[i], b[i])) return false;
 358              return true;
 359            }
 360            if (a instanceof Map && b instanceof Map) {
 361              if (a.size !== b.size) return false;
 362              for (i of a.entries())
 363                if (!b.has(i[0])) return false;
 364              for (i of a.entries())
 365                if (!equal(i[1], b.get(i[0]))) return false;
 366              return true;
 367            }
 368            if (a instanceof Set && b instanceof Set) {
 369              if (a.size !== b.size) return false;
 370              for (i of a.entries())
 371                if (!b.has(i[0])) return false;
 372              return true;
 373            }
 374            if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
 375              length = a.length;
 376              if (length != b.length) return false;
 377              for (i = length; i-- !== 0; )
 378                if (a[i] !== b[i]) return false;
 379              return true;
 380            }
 381            if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
 382            if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
 383            if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
 384            keys = Object.keys(a);
 385            length = keys.length;
 386            if (length !== Object.keys(b).length) return false;
 387            for (i = length; i-- !== 0; )
 388              if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
 389            for (i = length; i-- !== 0; ) {
 390              var key = keys[i];
 391              if (!equal(a[key], b[key])) return false;
 392            }
 393            return true;
 394          }
 395          return a !== a && b !== b;
 396        };
 397      }
 398    });
 399  
 400    // package-external:@wordpress/is-shallow-equal
 401    var require_is_shallow_equal = __commonJS({
 402      "package-external:@wordpress/is-shallow-equal"(exports, module) {
 403        module.exports = window.wp.isShallowEqual;
 404      }
 405    });
 406  
 407    // package-external:@wordpress/dom
 408    var require_dom = __commonJS({
 409      "package-external:@wordpress/dom"(exports, module) {
 410        module.exports = window.wp.dom;
 411      }
 412    });
 413  
 414    // packages/customize-widgets/build-module/index.mjs
 415    var index_exports = {};
 416    __export(index_exports, {
 417      initialize: () => initialize,
 418      store: () => store
 419    });
 420    var import_element60 = __toESM(require_element(), 1);
 421    var import_block_library = __toESM(require_block_library(), 1);
 422    var import_widgets5 = __toESM(require_widgets(), 1);
 423    var import_blocks2 = __toESM(require_blocks(), 1);
 424    var import_data17 = __toESM(require_data(), 1);
 425    var import_preferences4 = __toESM(require_preferences(), 1);
 426  
 427    // node_modules/clsx/dist/clsx.mjs
 428    function r(e) {
 429      var t, f, n = "";
 430      if ("string" == typeof e || "number" == typeof e) n += e;
 431      else if ("object" == typeof e) if (Array.isArray(e)) {
 432        var o = e.length;
 433        for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
 434      } else for (f in e) e[f] && (n && (n += " "), n += f);
 435      return n;
 436    }
 437    function clsx() {
 438      for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
 439      return n;
 440    }
 441    var clsx_default = clsx;
 442  
 443    // node_modules/@base-ui/utils/useControlled.mjs
 444    var React = __toESM(require_react(), 1);
 445  
 446    // node_modules/@base-ui/utils/error.mjs
 447    var set;
 448    if (true) {
 449      set = /* @__PURE__ */ new Set();
 450    }
 451    function error(...messages) {
 452      if (true) {
 453        const messageKey = messages.join(" ");
 454        if (!set.has(messageKey)) {
 455          set.add(messageKey);
 456          console.error(`Base UI: $messageKey}`);
 457        }
 458      }
 459    }
 460  
 461    // node_modules/@base-ui/utils/useControlled.mjs
 462    function useControlled({
 463      controlled,
 464      default: defaultProp,
 465      name,
 466      state = "value"
 467    }) {
 468      const {
 469        current: isControlled
 470      } = React.useRef(controlled !== void 0);
 471      const [valueState, setValue] = React.useState(defaultProp);
 472      const value = isControlled ? controlled : valueState;
 473      if (true) {
 474        React.useEffect(() => {
 475          if (isControlled !== (controlled !== void 0)) {
 476            error([`A component is changing the $isControlled ? "" : "un"}controlled $state} state of $name} to be $isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled $name} 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"));
 477          }
 478        }, [state, name, controlled]);
 479        const {
 480          current: defaultValue
 481        } = React.useRef(defaultProp);
 482        React.useEffect(() => {
 483          if (!isControlled && serializeToDevModeString(defaultValue) !== serializeToDevModeString(defaultProp)) {
 484            error([`A component is changing the default $state} state of an uncontrolled $name} after being initialized. To suppress this warning opt to use a controlled $name}.`].join("\n"));
 485          }
 486        }, [defaultProp]);
 487      }
 488      const setValueIfUncontrolled = React.useCallback((newValue) => {
 489        if (!isControlled) {
 490          setValue(newValue);
 491        }
 492      }, []);
 493      return [value, setValueIfUncontrolled];
 494    }
 495    function serializeToDevModeString(input) {
 496      let nextId = 0;
 497      const seen = /* @__PURE__ */ new WeakMap();
 498      try {
 499        const result = JSON.stringify(input, function replacer(key, value) {
 500          if (key === "_owner" && this != null && typeof this === "object" && "$$typeof" in this) {
 501            return void 0;
 502          }
 503          if (typeof value === "bigint") {
 504            return `__bigint__:$value}`;
 505          }
 506          if (value !== null && typeof value === "object") {
 507            const id = seen.get(value);
 508            if (id !== void 0) {
 509              return `__object__:$id}`;
 510            }
 511            seen.set(value, nextId);
 512            nextId += 1;
 513          }
 514          return value;
 515        });
 516        return result ?? `__top__:$typeof input}`;
 517      } catch {
 518        return "__unserializable__";
 519      }
 520    }
 521  
 522    // node_modules/@base-ui/utils/safeReact.mjs
 523    var React2 = __toESM(require_react(), 1);
 524    var SafeReact = {
 525      ...React2
 526    };
 527  
 528    // node_modules/@base-ui/utils/useRefWithInit.mjs
 529    var React3 = __toESM(require_react(), 1);
 530    var UNINITIALIZED = {};
 531    function useRefWithInit(init, initArg) {
 532      const ref = React3.useRef(UNINITIALIZED);
 533      if (ref.current === UNINITIALIZED) {
 534        ref.current = init(initArg);
 535      }
 536      return ref;
 537    }
 538  
 539    // node_modules/@base-ui/utils/useStableCallback.mjs
 540    var useInsertionEffect = SafeReact.useInsertionEffect;
 541    var useSafeInsertionEffect = (
 542      // React 17 doesn't have useInsertionEffect.
 543      useInsertionEffect && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late.
 544      useInsertionEffect !== SafeReact.useLayoutEffect ? useInsertionEffect : (fn) => fn()
 545    );
 546    function useStableCallback(callback) {
 547      const stable = useRefWithInit(createStableCallback).current;
 548      stable.next = callback;
 549      useSafeInsertionEffect(stable.effect);
 550      return stable.trampoline;
 551    }
 552    function createStableCallback() {
 553      const stable = {
 554        next: void 0,
 555        callback: assertNotCalled,
 556        trampoline: (...args) => stable.callback?.(...args),
 557        effect: () => {
 558          stable.callback = stable.next;
 559        }
 560      };
 561      return stable;
 562    }
 563    function assertNotCalled() {
 564      if (true) {
 565        throw (
 566          /* minify-error-disabled */
 567          new Error("Base UI: Cannot call an event handler while rendering.")
 568        );
 569      }
 570    }
 571  
 572    // node_modules/@base-ui/utils/warn.mjs
 573    var set2;
 574    if (true) {
 575      set2 = /* @__PURE__ */ new Set();
 576    }
 577    function warn(...messages) {
 578      if (true) {
 579        const messageKey = messages.join(" ");
 580        if (!set2.has(messageKey)) {
 581          set2.add(messageKey);
 582          console.warn(`Base UI: $messageKey}`);
 583        }
 584      }
 585    }
 586  
 587    // node_modules/@base-ui/utils/useIsoLayoutEffect.mjs
 588    var React4 = __toESM(require_react(), 1);
 589    var noop = () => {
 590    };
 591    var useIsoLayoutEffect = typeof document !== "undefined" ? React4.useLayoutEffect : noop;
 592  
 593    // node_modules/@base-ui/react/internals/useRenderElement.mjs
 594    var React7 = __toESM(require_react(), 1);
 595  
 596    // node_modules/@base-ui/utils/useMergedRefs.mjs
 597    function useMergedRefs(a, b, c, d) {
 598      const forkRef = useRefWithInit(createForkRef).current;
 599      if (didChange(forkRef, a, b, c, d)) {
 600        update(forkRef, [a, b, c, d]);
 601      }
 602      return forkRef.callback;
 603    }
 604    function useMergedRefsN(refs) {
 605      const forkRef = useRefWithInit(createForkRef).current;
 606      if (didChangeN(forkRef, refs)) {
 607        update(forkRef, refs);
 608      }
 609      return forkRef.callback;
 610    }
 611    function createForkRef() {
 612      return {
 613        callback: null,
 614        cleanup: null,
 615        refs: []
 616      };
 617    }
 618    function didChange(forkRef, a, b, c, d) {
 619      return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
 620    }
 621    function didChangeN(forkRef, newRefs) {
 622      return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index2) => ref !== newRefs[index2]);
 623    }
 624    function update(forkRef, refs) {
 625      forkRef.refs = refs;
 626      if (refs.every((ref) => ref == null)) {
 627        forkRef.callback = null;
 628        return;
 629      }
 630      forkRef.callback = (instance) => {
 631        if (forkRef.cleanup) {
 632          forkRef.cleanup();
 633          forkRef.cleanup = null;
 634        }
 635        if (instance != null) {
 636          const cleanupCallbacks = Array(refs.length).fill(null);
 637          for (let i = 0; i < refs.length; i += 1) {
 638            const ref = refs[i];
 639            if (ref == null) {
 640              continue;
 641            }
 642            switch (typeof ref) {
 643              case "function": {
 644                const refCleanup = ref(instance);
 645                if (typeof refCleanup === "function") {
 646                  cleanupCallbacks[i] = refCleanup;
 647                }
 648                break;
 649              }
 650              case "object": {
 651                ref.current = instance;
 652                break;
 653              }
 654              default:
 655            }
 656          }
 657          forkRef.cleanup = () => {
 658            for (let i = 0; i < refs.length; i += 1) {
 659              const ref = refs[i];
 660              if (ref == null) {
 661                continue;
 662              }
 663              switch (typeof ref) {
 664                case "function": {
 665                  const cleanupCallback = cleanupCallbacks[i];
 666                  if (typeof cleanupCallback === "function") {
 667                    cleanupCallback();
 668                  } else {
 669                    void ref(null);
 670                  }
 671                  break;
 672                }
 673                case "object": {
 674                  ref.current = null;
 675                  break;
 676                }
 677                default:
 678              }
 679            }
 680          };
 681        }
 682      };
 683    }
 684  
 685    // node_modules/@base-ui/utils/getReactElementRef.mjs
 686    var React6 = __toESM(require_react(), 1);
 687  
 688    // node_modules/@base-ui/utils/reactVersion.mjs
 689    var React5 = __toESM(require_react(), 1);
 690    var majorVersion = parseInt(React5.version, 10);
 691    function isReactVersionAtLeast(reactVersionToCheck) {
 692      return majorVersion >= reactVersionToCheck;
 693    }
 694  
 695    // node_modules/@base-ui/utils/getReactElementRef.mjs
 696    function getReactElementRef(element) {
 697      if (!/* @__PURE__ */ React6.isValidElement(element)) {
 698        return null;
 699      }
 700      const reactElement = element;
 701      const propsWithRef = reactElement.props;
 702      return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
 703    }
 704  
 705    // node_modules/@base-ui/utils/mergeObjects.mjs
 706    function mergeObjects(a, b) {
 707      if (a && !b) {
 708        return a;
 709      }
 710      if (!a && b) {
 711        return b;
 712      }
 713      if (a || b) {
 714        return {
 715          ...a,
 716          ...b
 717        };
 718      }
 719      return void 0;
 720    }
 721  
 722    // node_modules/@base-ui/utils/empty.mjs
 723    function NOOP() {
 724    }
 725    var EMPTY_ARRAY = Object.freeze([]);
 726    var EMPTY_OBJECT = Object.freeze({});
 727  
 728    // node_modules/@base-ui/react/internals/getStateAttributesProps.mjs
 729    function getStateAttributesProps(state, customMapping) {
 730      const props = {};
 731      for (const key in state) {
 732        const value = state[key];
 733        if (customMapping?.hasOwnProperty(key)) {
 734          const customProps = customMapping[key](value);
 735          if (customProps != null) {
 736            Object.assign(props, customProps);
 737          }
 738          continue;
 739        }
 740        if (value === true) {
 741          props[`data-$key.toLowerCase()}`] = "";
 742        } else if (value) {
 743          props[`data-$key.toLowerCase()}`] = value.toString();
 744        }
 745      }
 746      return props;
 747    }
 748  
 749    // node_modules/@base-ui/react/utils/resolveClassName.mjs
 750    function resolveClassName(className, state) {
 751      return typeof className === "function" ? className(state) : className;
 752    }
 753  
 754    // node_modules/@base-ui/react/utils/resolveStyle.mjs
 755    function resolveStyle(style, state) {
 756      return typeof style === "function" ? style(state) : style;
 757    }
 758  
 759    // node_modules/@base-ui/react/merge-props/mergeProps.mjs
 760    var EMPTY_PROPS = {};
 761    function mergeProps(a, b, c, d, e) {
 762      if (!c && !d && !e && !a) {
 763        return createInitialMergedProps(b);
 764      }
 765      let merged = createInitialMergedProps(a);
 766      if (b) {
 767        merged = mergeInto(merged, b);
 768      }
 769      if (c) {
 770        merged = mergeInto(merged, c);
 771      }
 772      if (d) {
 773        merged = mergeInto(merged, d);
 774      }
 775      if (e) {
 776        merged = mergeInto(merged, e);
 777      }
 778      return merged;
 779    }
 780    function mergePropsN(props) {
 781      if (props.length === 0) {
 782        return EMPTY_PROPS;
 783      }
 784      if (props.length === 1) {
 785        return createInitialMergedProps(props[0]);
 786      }
 787      let merged = createInitialMergedProps(props[0]);
 788      for (let i = 1; i < props.length; i += 1) {
 789        merged = mergeInto(merged, props[i]);
 790      }
 791      return merged;
 792    }
 793    function createInitialMergedProps(inputProps) {
 794      if (isPropsGetter(inputProps)) {
 795        return {
 796          ...resolvePropsGetter(inputProps, EMPTY_PROPS)
 797        };
 798      }
 799      return copyInitialProps(inputProps);
 800    }
 801    function mergeInto(merged, inputProps) {
 802      if (isPropsGetter(inputProps)) {
 803        return resolvePropsGetter(inputProps, merged);
 804      }
 805      return mutablyMergeInto(merged, inputProps);
 806    }
 807    function copyInitialProps(inputProps) {
 808      const copiedProps = {
 809        ...inputProps
 810      };
 811      for (const propName in copiedProps) {
 812        const propValue = copiedProps[propName];
 813        if (isEventHandler(propName, propValue)) {
 814          copiedProps[propName] = wrapEventHandler(propValue);
 815        }
 816      }
 817      return copiedProps;
 818    }
 819    function mutablyMergeInto(mergedProps, externalProps) {
 820      if (!externalProps) {
 821        return mergedProps;
 822      }
 823      for (const propName in externalProps) {
 824        const externalPropValue = externalProps[propName];
 825        switch (propName) {
 826          case "style": {
 827            mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
 828            break;
 829          }
 830          case "className": {
 831            mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
 832            break;
 833          }
 834          default: {
 835            if (isEventHandler(propName, externalPropValue)) {
 836              mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
 837            } else {
 838              mergedProps[propName] = externalPropValue;
 839            }
 840          }
 841        }
 842      }
 843      return mergedProps;
 844    }
 845    function isEventHandler(key, value) {
 846      const code0 = key.charCodeAt(0);
 847      const code1 = key.charCodeAt(1);
 848      const code2 = key.charCodeAt(2);
 849      return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
 850    }
 851    function isPropsGetter(inputProps) {
 852      return typeof inputProps === "function";
 853    }
 854    function resolvePropsGetter(inputProps, previousProps) {
 855      if (isPropsGetter(inputProps)) {
 856        return inputProps(previousProps);
 857      }
 858      return inputProps ?? EMPTY_PROPS;
 859    }
 860    function mergeEventHandlers(ourHandler, theirHandler) {
 861      if (!theirHandler) {
 862        return ourHandler;
 863      }
 864      if (!ourHandler) {
 865        return wrapEventHandler(theirHandler);
 866      }
 867      return (...args) => {
 868        const event = args[0];
 869        if (isSyntheticEvent(event)) {
 870          const baseUIEvent = event;
 871          makeEventPreventable(baseUIEvent);
 872          const result2 = theirHandler(...args);
 873          if (!baseUIEvent.baseUIHandlerPrevented) {
 874            ourHandler?.(...args);
 875          }
 876          return result2;
 877        }
 878        const result = theirHandler(...args);
 879        ourHandler?.(...args);
 880        return result;
 881      };
 882    }
 883    function wrapEventHandler(handler) {
 884      if (!handler) {
 885        return handler;
 886      }
 887      return (...args) => {
 888        const event = args[0];
 889        if (isSyntheticEvent(event)) {
 890          makeEventPreventable(event);
 891        }
 892        return handler(...args);
 893      };
 894    }
 895    function makeEventPreventable(event) {
 896      event.preventBaseUIHandler = () => {
 897        event.baseUIHandlerPrevented = true;
 898      };
 899      return event;
 900    }
 901    function mergeClassNames(ourClassName, theirClassName) {
 902      if (theirClassName) {
 903        if (ourClassName) {
 904          return theirClassName + " " + ourClassName;
 905        }
 906        return theirClassName;
 907      }
 908      return ourClassName;
 909    }
 910    function isSyntheticEvent(event) {
 911      return event != null && typeof event === "object" && "nativeEvent" in event;
 912    }
 913  
 914    // node_modules/@base-ui/react/internals/useRenderElement.mjs
 915    var import_react = __toESM(require_react(), 1);
 916    function useRenderElement(element, componentProps, params = {}) {
 917      const renderProp = componentProps.render;
 918      const outProps = useRenderElementProps(componentProps, params);
 919      if (params.enabled === false) {
 920        return null;
 921      }
 922      const state = params.state ?? EMPTY_OBJECT;
 923      return evaluateRenderProp(element, renderProp, outProps, state);
 924    }
 925    function useRenderElementProps(componentProps, params = {}) {
 926      const {
 927        className: classNameProp,
 928        style: styleProp,
 929        render: renderProp
 930      } = componentProps;
 931      const {
 932        state = EMPTY_OBJECT,
 933        ref,
 934        props,
 935        stateAttributesMapping: stateAttributesMapping2,
 936        enabled = true
 937      } = params;
 938      const className = enabled ? resolveClassName(classNameProp, state) : void 0;
 939      const style = enabled ? resolveStyle(styleProp, state) : void 0;
 940      const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping2) : EMPTY_OBJECT;
 941      const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
 942      const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
 943      if (typeof document !== "undefined") {
 944        if (!enabled) {
 945          void useMergedRefs(null, null);
 946        } else if (Array.isArray(ref)) {
 947          outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
 948        } else {
 949          outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
 950        }
 951      }
 952      if (!enabled) {
 953        return EMPTY_OBJECT;
 954      }
 955      if (className !== void 0) {
 956        outProps.className = mergeClassNames(outProps.className, className);
 957      }
 958      if (style !== void 0) {
 959        outProps.style = mergeObjects(outProps.style, style);
 960      }
 961      return outProps;
 962    }
 963    function resolveRenderFunctionProps(props) {
 964      if (Array.isArray(props)) {
 965        return mergePropsN(props);
 966      }
 967      return mergeProps(void 0, props);
 968    }
 969    var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
 970    var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
 971    var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
 972    function evaluateRenderProp(element, render, props, state) {
 973      if (render) {
 974        if (typeof render === "function") {
 975          if (true) {
 976            warnIfRenderPropLooksLikeComponent(render);
 977          }
 978          return render(props, state);
 979        }
 980        const mergedProps = mergeProps(props, render.props);
 981        mergedProps.ref = props.ref;
 982        let newElement = render;
 983        if (newElement?.$$typeof === REACT_LAZY_TYPE) {
 984          const children = React7.Children.toArray(render);
 985          newElement = children[0];
 986        }
 987        if (true) {
 988          if (!/* @__PURE__ */ React7.isValidElement(newElement)) {
 989            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"));
 990          }
 991        }
 992        return /* @__PURE__ */ React7.cloneElement(newElement, mergedProps);
 993      }
 994      if (element) {
 995        if (typeof element === "string") {
 996          return renderTag(element, props);
 997        }
 998      }
 999      throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8));
1000    }
1001    function warnIfRenderPropLooksLikeComponent(renderFn) {
1002      const functionName = renderFn.name;
1003      if (functionName.length === 0) {
1004        return;
1005      }
1006      if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {
1007        return;
1008      }
1009      if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {
1010        return;
1011      }
1012      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");
1013    }
1014    function renderTag(Tag, props) {
1015      if (Tag === "button") {
1016        return /* @__PURE__ */ (0, import_react.createElement)("button", {
1017          type: "button",
1018          ...props,
1019          key: props.key
1020        });
1021      }
1022      if (Tag === "img") {
1023        return /* @__PURE__ */ (0, import_react.createElement)("img", {
1024          alt: "",
1025          ...props,
1026          key: props.key
1027        });
1028      }
1029      return /* @__PURE__ */ React7.createElement(Tag, props);
1030    }
1031  
1032    // node_modules/@base-ui/utils/useId.mjs
1033    var React8 = __toESM(require_react(), 1);
1034    var globalId = 0;
1035    function useGlobalId(idOverride, prefix = "mui") {
1036      const [defaultId, setDefaultId] = React8.useState(idOverride);
1037      const id = idOverride || defaultId;
1038      React8.useEffect(() => {
1039        if (defaultId == null) {
1040          globalId += 1;
1041          setDefaultId(`$prefix}-$globalId}`);
1042        }
1043      }, [defaultId, prefix]);
1044      return id;
1045    }
1046    var maybeReactUseId = SafeReact.useId;
1047    function useId(idOverride, prefix) {
1048      if (maybeReactUseId !== void 0) {
1049        const reactId = maybeReactUseId();
1050        return idOverride ?? (prefix ? `$prefix}-$reactId}` : reactId);
1051      }
1052      return useGlobalId(idOverride, prefix);
1053    }
1054  
1055    // node_modules/@base-ui/react/internals/useBaseUiId.mjs
1056    function useBaseUiId(idOverride) {
1057      return useId(idOverride, "base-ui");
1058    }
1059  
1060    // node_modules/@base-ui/react/collapsible/root/useCollapsibleRoot.mjs
1061    var React11 = __toESM(require_react(), 1);
1062  
1063    // node_modules/@base-ui/react/internals/reason-parts.mjs
1064    var reason_parts_exports = {};
1065    __export(reason_parts_exports, {
1066      cancelOpen: () => cancelOpen,
1067      chipRemovePress: () => chipRemovePress,
1068      clearPress: () => clearPress,
1069      closePress: () => closePress,
1070      closeWatcher: () => closeWatcher,
1071      decrementPress: () => decrementPress,
1072      disabled: () => disabled,
1073      drag: () => drag,
1074      escapeKey: () => escapeKey,
1075      focusOut: () => focusOut,
1076      imperativeAction: () => imperativeAction,
1077      incrementPress: () => incrementPress,
1078      initial: () => initial,
1079      inputBlur: () => inputBlur,
1080      inputChange: () => inputChange,
1081      inputClear: () => inputClear,
1082      inputPaste: () => inputPaste,
1083      inputPress: () => inputPress,
1084      itemPress: () => itemPress,
1085      keyboard: () => keyboard,
1086      linkPress: () => linkPress,
1087      listNavigation: () => listNavigation,
1088      missing: () => missing,
1089      none: () => none,
1090      outsidePress: () => outsidePress,
1091      pointer: () => pointer,
1092      scrub: () => scrub,
1093      siblingOpen: () => siblingOpen,
1094      swipe: () => swipe,
1095      trackPress: () => trackPress,
1096      triggerFocus: () => triggerFocus,
1097      triggerHover: () => triggerHover,
1098      triggerPress: () => triggerPress,
1099      wheel: () => wheel,
1100      windowResize: () => windowResize
1101    });
1102    var none = "none";
1103    var triggerPress = "trigger-press";
1104    var triggerHover = "trigger-hover";
1105    var triggerFocus = "trigger-focus";
1106    var outsidePress = "outside-press";
1107    var itemPress = "item-press";
1108    var closePress = "close-press";
1109    var linkPress = "link-press";
1110    var clearPress = "clear-press";
1111    var chipRemovePress = "chip-remove-press";
1112    var trackPress = "track-press";
1113    var incrementPress = "increment-press";
1114    var decrementPress = "decrement-press";
1115    var inputChange = "input-change";
1116    var inputClear = "input-clear";
1117    var inputBlur = "input-blur";
1118    var inputPaste = "input-paste";
1119    var inputPress = "input-press";
1120    var focusOut = "focus-out";
1121    var escapeKey = "escape-key";
1122    var closeWatcher = "close-watcher";
1123    var listNavigation = "list-navigation";
1124    var keyboard = "keyboard";
1125    var pointer = "pointer";
1126    var drag = "drag";
1127    var wheel = "wheel";
1128    var scrub = "scrub";
1129    var cancelOpen = "cancel-open";
1130    var siblingOpen = "sibling-open";
1131    var disabled = "disabled";
1132    var missing = "missing";
1133    var initial = "initial";
1134    var imperativeAction = "imperative-action";
1135    var swipe = "swipe";
1136    var windowResize = "window-resize";
1137  
1138    // node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs
1139    function createChangeEventDetails(reason, event, trigger, customProperties) {
1140      let canceled = false;
1141      let allowPropagation = false;
1142      const custom = customProperties ?? EMPTY_OBJECT;
1143      const details = {
1144        reason,
1145        event: event ?? new Event("base-ui"),
1146        cancel() {
1147          canceled = true;
1148        },
1149        allowPropagation() {
1150          allowPropagation = true;
1151        },
1152        get isCanceled() {
1153          return canceled;
1154        },
1155        get isPropagationAllowed() {
1156          return allowPropagation;
1157        },
1158        trigger,
1159        ...custom
1160      };
1161      return details;
1162    }
1163  
1164    // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
1165    var React10 = __toESM(require_react(), 1);
1166  
1167    // node_modules/@base-ui/utils/useOnMount.mjs
1168    var React9 = __toESM(require_react(), 1);
1169    function useOnMount(fn) {
1170      React9.useEffect(fn, EMPTY_ARRAY);
1171    }
1172  
1173    // node_modules/@base-ui/utils/useAnimationFrame.mjs
1174    var EMPTY = null;
1175    var LAST_RAF = globalThis.requestAnimationFrame;
1176    var Scheduler = class {
1177      /* This implementation uses an array as a backing data-structure for frame callbacks.
1178       * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it
1179       * never calls the native `cancelAnimationFrame` if there are no frames left. This can
1180       * be much more efficient if there is a call pattern that alterns as
1181       * "request-cancel-request-cancel-…".
1182       * But in the case of "request-request-…-cancel-cancel-…", it leaves the final animation
1183       * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */
1184      callbacks = [];
1185      callbacksCount = 0;
1186      nextId = 1;
1187      startId = 1;
1188      isScheduled = false;
1189      tick = (timestamp) => {
1190        this.isScheduled = false;
1191        const currentCallbacks = this.callbacks;
1192        const currentCallbacksCount = this.callbacksCount;
1193        this.callbacks = [];
1194        this.callbacksCount = 0;
1195        this.startId = this.nextId;
1196        if (currentCallbacksCount > 0) {
1197          for (let i = 0; i < currentCallbacks.length; i += 1) {
1198            currentCallbacks[i]?.(timestamp);
1199          }
1200        }
1201      };
1202      request(fn) {
1203        const id = this.nextId;
1204        this.nextId += 1;
1205        this.callbacks.push(fn);
1206        this.callbacksCount += 1;
1207        const didRAFChange = LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);
1208        if (!this.isScheduled || didRAFChange) {
1209          requestAnimationFrame(this.tick);
1210          this.isScheduled = true;
1211        }
1212        return id;
1213      }
1214      cancel(id) {
1215        const index2 = id - this.startId;
1216        if (index2 < 0 || index2 >= this.callbacks.length) {
1217          return;
1218        }
1219        this.callbacks[index2] = null;
1220        this.callbacksCount -= 1;
1221      }
1222    };
1223    var scheduler = new Scheduler();
1224    var AnimationFrame = class _AnimationFrame {
1225      static create() {
1226        return new _AnimationFrame();
1227      }
1228      static request(fn) {
1229        return scheduler.request(fn);
1230      }
1231      static cancel(id) {
1232        return scheduler.cancel(id);
1233      }
1234      currentId = EMPTY;
1235      /**
1236       * Executes `fn` after `delay`, clearing any previously scheduled call.
1237       */
1238      request(fn) {
1239        this.cancel();
1240        this.currentId = scheduler.request(() => {
1241          this.currentId = EMPTY;
1242          fn();
1243        });
1244      }
1245      cancel = () => {
1246        if (this.currentId !== EMPTY) {
1247          scheduler.cancel(this.currentId);
1248          this.currentId = EMPTY;
1249        }
1250      };
1251      disposeEffect = () => {
1252        return this.cancel;
1253      };
1254    };
1255    function useAnimationFrame() {
1256      const timeout = useRefWithInit(AnimationFrame.create).current;
1257      useOnMount(timeout.disposeEffect);
1258      return timeout;
1259    }
1260  
1261    // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
1262    function useTransitionStatus(open, enableIdleState = false, deferEndingState = false) {
1263      const [transitionStatus, setTransitionStatus] = React10.useState(open && enableIdleState ? "idle" : void 0);
1264      const [mounted, setMounted] = React10.useState(open);
1265      if (open && !mounted) {
1266        setMounted(true);
1267        setTransitionStatus("starting");
1268      }
1269      if (!open && mounted && transitionStatus !== "ending" && !deferEndingState) {
1270        setTransitionStatus("ending");
1271      }
1272      if (!open && !mounted && transitionStatus === "ending") {
1273        setTransitionStatus(void 0);
1274      }
1275      useIsoLayoutEffect(() => {
1276        if (!open && mounted && transitionStatus !== "ending" && deferEndingState) {
1277          const frame = AnimationFrame.request(() => {
1278            setTransitionStatus("ending");
1279          });
1280          return () => {
1281            AnimationFrame.cancel(frame);
1282          };
1283        }
1284        return void 0;
1285      }, [open, mounted, transitionStatus, deferEndingState]);
1286      useIsoLayoutEffect(() => {
1287        if (!open || enableIdleState) {
1288          return void 0;
1289        }
1290        const frame = AnimationFrame.request(() => {
1291          setTransitionStatus(void 0);
1292        });
1293        return () => {
1294          AnimationFrame.cancel(frame);
1295        };
1296      }, [enableIdleState, open]);
1297      useIsoLayoutEffect(() => {
1298        if (!open || !enableIdleState) {
1299          return void 0;
1300        }
1301        if (open && mounted && transitionStatus !== "idle") {
1302          setTransitionStatus("starting");
1303        }
1304        const frame = AnimationFrame.request(() => {
1305          setTransitionStatus("idle");
1306        });
1307        return () => {
1308          AnimationFrame.cancel(frame);
1309        };
1310      }, [enableIdleState, open, mounted, transitionStatus]);
1311      return {
1312        mounted,
1313        setMounted,
1314        transitionStatus
1315      };
1316    }
1317  
1318    // node_modules/@base-ui/react/collapsible/root/useCollapsibleRoot.mjs
1319    function useCollapsibleRoot(parameters) {
1320      const {
1321        open: openParam,
1322        defaultOpen,
1323        onOpenChange,
1324        disabled: disabled2
1325      } = parameters;
1326      const [open, setOpen] = useControlled({
1327        controlled: openParam,
1328        default: defaultOpen,
1329        name: "Collapsible",
1330        state: "open"
1331      });
1332      const {
1333        mounted,
1334        setMounted,
1335        transitionStatus
1336      } = useTransitionStatus(open, true, true);
1337      const defaultPanelId = useBaseUiId();
1338      const [registeredPanelId, setPanelIdState] = React11.useState();
1339      const panelId = registeredPanelId === null ? void 0 : registeredPanelId ?? defaultPanelId;
1340      const handleTrigger = useStableCallback((event) => {
1341        const nextOpen = !open;
1342        const eventDetails = createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent);
1343        onOpenChange(nextOpen, eventDetails);
1344        if (eventDetails.isCanceled) {
1345          return;
1346        }
1347        setOpen(nextOpen);
1348      });
1349      return React11.useMemo(() => ({
1350        defaultPanelId,
1351        disabled: disabled2,
1352        handleTrigger,
1353        mounted,
1354        open,
1355        panelId,
1356        setMounted,
1357        setOpen,
1358        setPanelIdState,
1359        transitionStatus
1360      }), [defaultPanelId, disabled2, handleTrigger, mounted, open, panelId, setMounted, setOpen, setPanelIdState, transitionStatus]);
1361    }
1362  
1363    // node_modules/@base-ui/react/collapsible/root/CollapsibleRootContext.mjs
1364    var React12 = __toESM(require_react(), 1);
1365    var CollapsibleRootContext = /* @__PURE__ */ React12.createContext(void 0);
1366    if (true) CollapsibleRootContext.displayName = "CollapsibleRootContext";
1367    function useCollapsibleRootContext() {
1368      const context = React12.useContext(CollapsibleRootContext);
1369      if (context === void 0) {
1370        throw new Error(true ? "Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>." : formatErrorMessage_default(15));
1371      }
1372      return context;
1373    }
1374  
1375    // node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
1376    var TransitionStatusDataAttributes = /* @__PURE__ */ (function(TransitionStatusDataAttributes2) {
1377      TransitionStatusDataAttributes2["startingStyle"] = "data-starting-style";
1378      TransitionStatusDataAttributes2["endingStyle"] = "data-ending-style";
1379      return TransitionStatusDataAttributes2;
1380    })({});
1381    var STARTING_HOOK = {
1382      "data-starting-style": ""
1383    };
1384    var ENDING_HOOK = {
1385      "data-ending-style": ""
1386    };
1387    var transitionStatusMapping = {
1388      transitionStatus(value) {
1389        if (value === "starting") {
1390          return STARTING_HOOK;
1391        }
1392        if (value === "ending") {
1393          return ENDING_HOOK;
1394        }
1395        return null;
1396      }
1397    };
1398  
1399    // node_modules/@base-ui/react/collapsible/panel/CollapsiblePanelDataAttributes.mjs
1400    var CollapsiblePanelDataAttributes = (function(CollapsiblePanelDataAttributes2) {
1401      CollapsiblePanelDataAttributes2["open"] = "data-open";
1402      CollapsiblePanelDataAttributes2["closed"] = "data-closed";
1403      CollapsiblePanelDataAttributes2[CollapsiblePanelDataAttributes2["startingStyle"] = TransitionStatusDataAttributes.startingStyle] = "startingStyle";
1404      CollapsiblePanelDataAttributes2[CollapsiblePanelDataAttributes2["endingStyle"] = TransitionStatusDataAttributes.endingStyle] = "endingStyle";
1405      return CollapsiblePanelDataAttributes2;
1406    })({});
1407  
1408    // node_modules/@base-ui/react/collapsible/trigger/CollapsibleTriggerDataAttributes.mjs
1409    var CollapsibleTriggerDataAttributes = /* @__PURE__ */ (function(CollapsibleTriggerDataAttributes2) {
1410      CollapsibleTriggerDataAttributes2["panelOpen"] = "data-panel-open";
1411      return CollapsibleTriggerDataAttributes2;
1412    })({});
1413  
1414    // node_modules/@base-ui/react/utils/collapsibleOpenStateMapping.mjs
1415    var PANEL_OPEN_HOOK = {
1416      [CollapsiblePanelDataAttributes.open]: ""
1417    };
1418    var PANEL_CLOSED_HOOK = {
1419      [CollapsiblePanelDataAttributes.closed]: ""
1420    };
1421    var triggerOpenStateMapping = {
1422      open(value) {
1423        if (value) {
1424          return {
1425            [CollapsibleTriggerDataAttributes.panelOpen]: ""
1426          };
1427        }
1428        return null;
1429      }
1430    };
1431    var collapsibleOpenStateMapping = {
1432      open(value) {
1433        if (value) {
1434          return PANEL_OPEN_HOOK;
1435        }
1436        return PANEL_CLOSED_HOOK;
1437      }
1438    };
1439  
1440    // node_modules/@base-ui/react/internals/use-button/useButton.mjs
1441    var React15 = __toESM(require_react(), 1);
1442  
1443    // node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
1444    function hasWindow() {
1445      return typeof window !== "undefined";
1446    }
1447    function getNodeName(node) {
1448      if (isNode(node)) {
1449        return (node.nodeName || "").toLowerCase();
1450      }
1451      return "#document";
1452    }
1453    function getWindow(node) {
1454      var _node$ownerDocument;
1455      return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1456    }
1457    function getDocumentElement(node) {
1458      var _ref;
1459      return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1460    }
1461    function isNode(value) {
1462      if (!hasWindow()) {
1463        return false;
1464      }
1465      return value instanceof Node || value instanceof getWindow(value).Node;
1466    }
1467    function isElement(value) {
1468      if (!hasWindow()) {
1469        return false;
1470      }
1471      return value instanceof Element || value instanceof getWindow(value).Element;
1472    }
1473    function isHTMLElement(value) {
1474      if (!hasWindow()) {
1475        return false;
1476      }
1477      return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1478    }
1479    function isShadowRoot(value) {
1480      if (!hasWindow() || typeof ShadowRoot === "undefined") {
1481        return false;
1482      }
1483      return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1484    }
1485    function isOverflowElement(element) {
1486      const {
1487        overflow,
1488        overflowX,
1489        overflowY,
1490        display
1491      } = getComputedStyle2(element);
1492      return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
1493    }
1494    function isTableElement(element) {
1495      return /^(table|td|th)$/.test(getNodeName(element));
1496    }
1497    function isTopLayer(element) {
1498      try {
1499        if (element.matches(":popover-open")) {
1500          return true;
1501        }
1502      } catch (_e) {
1503      }
1504      try {
1505        return element.matches(":modal");
1506      } catch (_e) {
1507        return false;
1508      }
1509    }
1510    var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
1511    var containRe = /paint|layout|strict|content/;
1512    var isNotNone = (value) => !!value && value !== "none";
1513    var isWebKitValue;
1514    function isContainingBlock(elementOrCss) {
1515      const css = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
1516      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 || "");
1517    }
1518    function getContainingBlock(element) {
1519      let currentNode = getParentNode(element);
1520      while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1521        if (isContainingBlock(currentNode)) {
1522          return currentNode;
1523        } else if (isTopLayer(currentNode)) {
1524          return null;
1525        }
1526        currentNode = getParentNode(currentNode);
1527      }
1528      return null;
1529    }
1530    function isWebKit() {
1531      if (isWebKitValue == null) {
1532        isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
1533      }
1534      return isWebKitValue;
1535    }
1536    function isLastTraversableNode(node) {
1537      return /^(html|body|#document)$/.test(getNodeName(node));
1538    }
1539    function getComputedStyle2(element) {
1540      return getWindow(element).getComputedStyle(element);
1541    }
1542    function getNodeScroll(element) {
1543      if (isElement(element)) {
1544        return {
1545          scrollLeft: element.scrollLeft,
1546          scrollTop: element.scrollTop
1547        };
1548      }
1549      return {
1550        scrollLeft: element.scrollX,
1551        scrollTop: element.scrollY
1552      };
1553    }
1554    function getParentNode(node) {
1555      if (getNodeName(node) === "html") {
1556        return node;
1557      }
1558      const result = (
1559        // Step into the shadow DOM of the parent of a slotted node.
1560        node.assignedSlot || // DOM Element detected.
1561        node.parentNode || // ShadowRoot detected.
1562        isShadowRoot(node) && node.host || // Fallback.
1563        getDocumentElement(node)
1564      );
1565      return isShadowRoot(result) ? result.host : result;
1566    }
1567    function getNearestOverflowAncestor(node) {
1568      const parentNode = getParentNode(node);
1569      if (isLastTraversableNode(parentNode)) {
1570        return (node.ownerDocument || node).body;
1571      }
1572      if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1573        return parentNode;
1574      }
1575      return getNearestOverflowAncestor(parentNode);
1576    }
1577    function getOverflowAncestors(node, list, traverseIframes) {
1578      var _node$ownerDocument2;
1579      if (list === void 0) {
1580        list = [];
1581      }
1582      if (traverseIframes === void 0) {
1583        traverseIframes = true;
1584      }
1585      const scrollableAncestor = getNearestOverflowAncestor(node);
1586      const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1587      const win = getWindow(scrollableAncestor);
1588      if (isBody) {
1589        const frameElement = getFrameElement(win);
1590        return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
1591      } else {
1592        return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1593      }
1594    }
1595    function getFrameElement(win) {
1596      return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
1597    }
1598  
1599    // node_modules/@base-ui/react/internals/composite/root/CompositeRootContext.mjs
1600    var React13 = __toESM(require_react(), 1);
1601    var CompositeRootContext = /* @__PURE__ */ React13.createContext(void 0);
1602    if (true) CompositeRootContext.displayName = "CompositeRootContext";
1603    function useCompositeRootContext(optional = false) {
1604      const context = React13.useContext(CompositeRootContext);
1605      if (context === void 0 && !optional) {
1606        throw new Error(true ? "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>." : formatErrorMessage_default(16));
1607      }
1608      return context;
1609    }
1610  
1611    // node_modules/@base-ui/react/utils/useFocusableWhenDisabled.mjs
1612    var React14 = __toESM(require_react(), 1);
1613    function useFocusableWhenDisabled(parameters) {
1614      const {
1615        focusableWhenDisabled,
1616        disabled: disabled2,
1617        composite = false,
1618        tabIndex: tabIndexProp = 0,
1619        isNativeButton
1620      } = parameters;
1621      const isFocusableComposite = composite && focusableWhenDisabled !== false;
1622      const isNonFocusableComposite = composite && focusableWhenDisabled === false;
1623      const props = React14.useMemo(() => {
1624        const additionalProps = {
1625          // allow Tabbing away from focusableWhenDisabled elements
1626          onKeyDown(event) {
1627            if (disabled2 && focusableWhenDisabled && event.key !== "Tab") {
1628              event.preventDefault();
1629            }
1630          }
1631        };
1632        if (!composite) {
1633          additionalProps.tabIndex = tabIndexProp;
1634          if (!isNativeButton && disabled2) {
1635            additionalProps.tabIndex = focusableWhenDisabled ? tabIndexProp : -1;
1636          }
1637        }
1638        if (isNativeButton && (focusableWhenDisabled || isFocusableComposite) || !isNativeButton && disabled2) {
1639          additionalProps["aria-disabled"] = disabled2;
1640        }
1641        if (isNativeButton && (!focusableWhenDisabled || isNonFocusableComposite)) {
1642          additionalProps.disabled = disabled2;
1643        }
1644        return additionalProps;
1645      }, [composite, disabled2, focusableWhenDisabled, isFocusableComposite, isNonFocusableComposite, isNativeButton, tabIndexProp]);
1646      return {
1647        props
1648      };
1649    }
1650  
1651    // node_modules/@base-ui/utils/owner.mjs
1652    function ownerDocument(node) {
1653      return node?.ownerDocument || document;
1654    }
1655  
1656    // node_modules/@base-ui/react/utils/dispatchClickWithModifiers.mjs
1657    function dispatchClickWithModifiers(target, sourceEvent, {
1658      detail = 0
1659    } = {}) {
1660      target.dispatchEvent(new (getWindow(target)).PointerEvent("click", {
1661        bubbles: true,
1662        cancelable: true,
1663        composed: true,
1664        detail,
1665        shiftKey: sourceEvent.shiftKey,
1666        ctrlKey: sourceEvent.ctrlKey,
1667        altKey: sourceEvent.altKey,
1668        metaKey: sourceEvent.metaKey
1669      }));
1670    }
1671  
1672    // node_modules/@base-ui/react/internals/use-button/useButton.mjs
1673    function useButton(parameters = {}) {
1674      const {
1675        disabled: disabled2 = false,
1676        focusableWhenDisabled,
1677        tabIndex = 0,
1678        native: isNativeButton = true,
1679        composite: compositeProp
1680      } = parameters;
1681      const elementRef = React15.useRef(null);
1682      const compositeRootContext = useCompositeRootContext(true);
1683      const isCompositeItem = compositeProp ?? compositeRootContext !== void 0;
1684      const {
1685        props: focusableWhenDisabledProps
1686      } = useFocusableWhenDisabled({
1687        focusableWhenDisabled,
1688        disabled: disabled2,
1689        composite: isCompositeItem,
1690        tabIndex,
1691        isNativeButton
1692      });
1693      if (true) {
1694        React15.useEffect(() => {
1695          if (!elementRef.current) {
1696            return;
1697          }
1698          const isButtonTag = isButtonElement(elementRef.current);
1699          if (isNativeButton) {
1700            if (!isButtonTag) {
1701              const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
1702              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`.";
1703              error(`$message}$ownerStackMessage}`);
1704            }
1705          } else if (isButtonTag) {
1706            const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
1707            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`.";
1708            error(`$message}$ownerStackMessage}`);
1709          }
1710        }, [isNativeButton]);
1711      }
1712      const updateDisabled = React15.useCallback(() => {
1713        const element = elementRef.current;
1714        if (!isButtonElement(element)) {
1715          return;
1716        }
1717        if (isCompositeItem && disabled2 && focusableWhenDisabledProps.disabled === void 0 && element.disabled) {
1718          element.disabled = false;
1719        }
1720      }, [disabled2, focusableWhenDisabledProps.disabled, isCompositeItem]);
1721      useIsoLayoutEffect(updateDisabled, [updateDisabled]);
1722      const getButtonProps = React15.useCallback((externalProps = {}) => {
1723        const {
1724          onClick: externalOnClick,
1725          onMouseDown: externalOnMouseDown,
1726          onKeyUp: externalOnKeyUp,
1727          onKeyDown: externalOnKeyDown,
1728          onPointerDown: externalOnPointerDown,
1729          ...otherExternalProps
1730        } = externalProps;
1731        return mergeProps({
1732          onClick(event) {
1733            if (disabled2) {
1734              event.preventDefault();
1735              return;
1736            }
1737            externalOnClick?.(event);
1738          },
1739          onMouseDown(event) {
1740            if (!disabled2) {
1741              externalOnMouseDown?.(event);
1742            }
1743          },
1744          onKeyDown(event) {
1745            if (disabled2) {
1746              return;
1747            }
1748            makeEventPreventable(event);
1749            externalOnKeyDown?.(event);
1750            if (event.baseUIHandlerPrevented) {
1751              return;
1752            }
1753            const isCurrentTarget = event.target === event.currentTarget;
1754            const currentTarget = event.currentTarget;
1755            const isButton = isButtonElement(currentTarget);
1756            const isLink = !isNativeButton && isValidLinkElement(currentTarget);
1757            const shouldClick = isCurrentTarget && (isNativeButton ? isButton : !isLink);
1758            const isEnterKey = event.key === "Enter";
1759            const isSpaceKey = event.key === " ";
1760            const role = currentTarget.getAttribute("role");
1761            const isTextNavigationRole = role?.startsWith("menuitem") || role === "option" || role === "gridcell";
1762            if (isCurrentTarget && isCompositeItem && isSpaceKey) {
1763              if (event.defaultPrevented && isTextNavigationRole) {
1764                return;
1765              }
1766              event.preventDefault();
1767              if (!isNativeButton || isButton) {
1768                event.preventBaseUIHandler();
1769                dispatchClickWithModifiers(currentTarget, event);
1770              }
1771              return;
1772            }
1773            if (!shouldClick || isNativeButton || !isSpaceKey && !isEnterKey) {
1774              if (isCurrentTarget && isLink && isSpaceKey) {
1775                event.preventDefault();
1776              }
1777              return;
1778            }
1779            if (event.defaultPrevented) {
1780              return;
1781            }
1782            event.preventDefault();
1783            if (isEnterKey) {
1784              event.preventBaseUIHandler();
1785              dispatchClickWithModifiers(currentTarget, event);
1786            }
1787          },
1788          onKeyUp(event) {
1789            if (disabled2) {
1790              return;
1791            }
1792            makeEventPreventable(event);
1793            externalOnKeyUp?.(event);
1794            if (event.target === event.currentTarget && isNativeButton && isCompositeItem && isButtonElement(event.currentTarget) && event.key === " ") {
1795              event.preventDefault();
1796              return;
1797            }
1798            if (event.baseUIHandlerPrevented) {
1799              return;
1800            }
1801            if (event.target === event.currentTarget && !isNativeButton && !isCompositeItem && !event.defaultPrevented && event.key === " ") {
1802              event.preventBaseUIHandler();
1803              dispatchClickWithModifiers(event.currentTarget, event);
1804            }
1805          },
1806          onPointerDown(event) {
1807            if (disabled2) {
1808              event.preventDefault();
1809              return;
1810            }
1811            externalOnPointerDown?.(event);
1812          }
1813        }, isNativeButton ? {
1814          type: "button"
1815        } : {
1816          role: "button"
1817        }, focusableWhenDisabledProps, otherExternalProps);
1818      }, [disabled2, focusableWhenDisabledProps, isCompositeItem, isNativeButton]);
1819      const buttonRef = useStableCallback((element) => {
1820        elementRef.current = element;
1821        updateDisabled();
1822      });
1823      return {
1824        getButtonProps,
1825        buttonRef
1826      };
1827    }
1828    function isButtonElement(elem) {
1829      return isHTMLElement(elem) && elem.tagName === "BUTTON";
1830    }
1831    function isValidLinkElement(elem) {
1832      return isHTMLElement(elem) && elem.tagName === "A" && Boolean(elem.href);
1833    }
1834  
1835    // node_modules/@base-ui/react/collapsible/panel/useCollapsiblePanel.mjs
1836    var React17 = __toESM(require_react(), 1);
1837  
1838    // node_modules/@base-ui/utils/addEventListener.mjs
1839    function addEventListener(target, type, listener, options) {
1840      target.addEventListener(type, listener, options);
1841      return () => {
1842        target.removeEventListener(type, listener, options);
1843      };
1844    }
1845  
1846    // node_modules/@base-ui/utils/useValueAsRef.mjs
1847    function useValueAsRef(value) {
1848      const latest = useRefWithInit(createLatestRef, value).current;
1849      latest.next = value;
1850      useIsoLayoutEffect(latest.effect);
1851      return latest;
1852    }
1853    function createLatestRef(value) {
1854      const latest = {
1855        current: value,
1856        next: value,
1857        effect: () => {
1858          latest.current = latest.next;
1859        }
1860      };
1861      return latest;
1862    }
1863  
1864    // node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
1865    var React16 = __toESM(require_react(), 1);
1866  
1867    // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
1868    var ReactDOM = __toESM(require_react_dom(), 1);
1869  
1870    // node_modules/@base-ui/react/utils/resolveRef.mjs
1871    function resolveRef(maybeRef) {
1872      if (maybeRef == null) {
1873        return maybeRef;
1874      }
1875      return "current" in maybeRef ? maybeRef.current : maybeRef;
1876    }
1877  
1878    // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
1879    function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false) {
1880      const frame = useAnimationFrame();
1881      return useStableCallback((fnToExecute, signal = null) => {
1882        frame.cancel();
1883        const element = resolveRef(elementOrRef);
1884        if (element == null) {
1885          return;
1886        }
1887        const resolvedElement = element;
1888        const done = () => {
1889          ReactDOM.flushSync(fnToExecute);
1890        };
1891        if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
1892          fnToExecute();
1893          return;
1894        }
1895        function exec() {
1896          Promise.all(resolvedElement.getAnimations().map((animation) => animation.finished)).then(() => {
1897            if (!signal?.aborted) {
1898              done();
1899            }
1900          }, () => {
1901            if (signal?.aborted) {
1902              return;
1903            }
1904            const currentAnimations = resolvedElement.getAnimations();
1905            if (currentAnimations.some((animation) => animation.pending || animation.playState !== "finished")) {
1906              exec();
1907              return;
1908            }
1909            done();
1910          });
1911        }
1912        if (waitForStartingStyleRemoved) {
1913          const startingStyleAttribute = "data-starting-style";
1914          if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1915            frame.request(exec);
1916            return;
1917          }
1918          const attributeObserver = new MutationObserver(() => {
1919            if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1920              attributeObserver.disconnect();
1921              exec();
1922            }
1923          });
1924          attributeObserver.observe(resolvedElement, {
1925            attributes: true,
1926            attributeFilter: [startingStyleAttribute]
1927          });
1928          signal?.addEventListener("abort", () => attributeObserver.disconnect(), {
1929            once: true
1930          });
1931          return;
1932        }
1933        frame.request(exec);
1934      });
1935    }
1936  
1937    // node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
1938    function useOpenChangeComplete(parameters) {
1939      const {
1940        enabled = true,
1941        open,
1942        ref,
1943        onComplete: onCompleteParam
1944      } = parameters;
1945      const onComplete = useStableCallback(onCompleteParam);
1946      const runOnceAnimationsFinish = useAnimationsFinished(ref, open);
1947      React16.useEffect(() => {
1948        if (!enabled) {
1949          return void 0;
1950        }
1951        const abortController = new AbortController();
1952        runOnceAnimationsFinish(onComplete, abortController.signal);
1953        return () => {
1954          abortController.abort();
1955        };
1956      }, [enabled, open, onComplete, runOnceAnimationsFinish]);
1957    }
1958  
1959    // node_modules/@base-ui/react/collapsible/panel/useCollapsiblePanel.mjs
1960    var EMPTY_DIMENSIONS = {
1961      height: void 0,
1962      width: void 0
1963    };
1964    function useCollapsiblePanel(parameters) {
1965      const {
1966        externalRef,
1967        hiddenUntilFound,
1968        id: idParam,
1969        keepMounted,
1970        mounted,
1971        onOpenChange,
1972        open,
1973        setMounted,
1974        setOpen,
1975        transitionStatus
1976      } = parameters;
1977      const panelRef = React17.useRef(null);
1978      const animationTypeRef = React17.useRef(null);
1979      const [dimensions, setDimensionsUnwrapped] = React17.useState(EMPTY_DIMENSIONS);
1980      const lastMeasuredDimensionsRef = React17.useRef(EMPTY_DIMENSIONS);
1981      const shouldSkipNextOpenRef = React17.useRef(false);
1982      const shouldPreventMountAnimationRef = React17.useRef(open);
1983      const shouldPreventActivityResumeAnimationRef = React17.useRef(false);
1984      const [forcePanelIdle, setForcePanelIdle] = React17.useState(false);
1985      const pendingTemporaryStyleRestoreRef = React17.useRef(null);
1986      const mergedPanelRef = useMergedRefs(externalRef, panelRef);
1987      const latestOpenRef = useValueAsRef(open);
1988      const runOnceCloseAnimationsFinish = useAnimationsFinished(panelRef);
1989      const hidden = !open && !mounted;
1990      const panelTransitionStatus = forcePanelIdle ? "idle" : transitionStatus;
1991      const shouldPreventOpenAnimation = open && // These 2 refs are safe to read in render, they are only written from committed
1992      // layout/effect paths and gate one-shot motion suppression for the next open
1993      // lifecycle. They intentionally expose the last committed motion snapshot.
1994      (shouldPreventMountAnimationRef.current || shouldPreventActivityResumeAnimationRef.current);
1995      const renderedDimensions = !open && mounted && // These 2 refs are also safe to read in render, both hold the last committed
1996      // animation mode and measurement. This fallback only restores a previously
1997      // measured pixel size after the live dimensions state has been reset back to `auto`.
1998      animationTypeRef.current === "css-animation" && dimensions.height === void 0 && dimensions.width === void 0 ? lastMeasuredDimensionsRef.current : dimensions;
1999      const shouldPersistHiddenTransitionStyles = hiddenUntilFound && hidden && animationTypeRef.current !== "css-animation";
2000      const setDimensions = useStableCallback((nextDimensions, shouldCacheMeasurement = true) => {
2001        if (shouldCacheMeasurement) {
2002          lastMeasuredDimensionsRef.current = nextDimensions;
2003        }
2004        setDimensionsUnwrapped(nextDimensions);
2005      });
2006      const restorePendingTemporaryStyle = useStableCallback(() => {
2007        pendingTemporaryStyleRestoreRef.current?.();
2008        pendingTemporaryStyleRestoreRef.current = null;
2009      });
2010      const setPendingTemporaryStyleRestore = useStableCallback((restore) => {
2011        restorePendingTemporaryStyle();
2012        pendingTemporaryStyleRestoreRef.current = () => {
2013          pendingTemporaryStyleRestoreRef.current = null;
2014          restore();
2015        };
2016      });
2017      const markActivityResumeAnimationSuppressed = useStableCallback(() => {
2018        if (open && mounted && animationTypeRef.current === "css-animation") {
2019          shouldPreventActivityResumeAnimationRef.current = true;
2020        }
2021      });
2022      useIsoLayoutEffect(() => {
2023        if (!forcePanelIdle || transitionStatus === "starting") {
2024          return;
2025        }
2026        setForcePanelIdle(false);
2027      }, [forcePanelIdle, transitionStatus]);
2028      React17.useEffect(() => {
2029        return () => {
2030          markActivityResumeAnimationSuppressed();
2031          restorePendingTemporaryStyle();
2032        };
2033      }, [markActivityResumeAnimationSuppressed, restorePendingTemporaryStyle]);
2034      useIsoLayoutEffect(() => {
2035        const panel = panelRef.current;
2036        if (!panel) {
2037          return void 0;
2038        }
2039        if (!open && pendingTemporaryStyleRestoreRef.current) {
2040          restorePendingTemporaryStyle();
2041        }
2042        const animationType = getAnimationType(panel, shouldPreventOpenAnimation);
2043        animationTypeRef.current = animationType;
2044        if (open && transitionStatus === "idle" && shouldPreventMountAnimationRef.current && animationType === "css-animation") {
2045          lastMeasuredDimensionsRef.current = getDimensions(panel);
2046          return void 0;
2047        }
2048        if (open && transitionStatus === "starting") {
2049          const skipNextOpen = shouldSkipNextOpenRef.current;
2050          shouldSkipNextOpenRef.current = false;
2051          if (animationType === "none") {
2052            setDimensions(getDimensions(panel));
2053            setForcePanelIdle(true);
2054            return void 0;
2055          }
2056          if (animationType === "css-transition") {
2057            const restoreLayoutStyles = resetLayoutStyles(panel);
2058            setDimensions(getDimensions(panel));
2059            if (!skipNextOpen) {
2060              return restoreLayoutStyles;
2061            }
2062            const restoreTransitionDuration = setTemporaryStyle(panel, "transition-duration", "0s");
2063            setPendingTemporaryStyleRestore(restoreTransitionDuration);
2064            setForcePanelIdle(true);
2065            return restoreLayoutStyles;
2066          }
2067          setDimensions(getDimensions(panel));
2068          const restoreAnimationName = setTemporaryStyle(panel, "animation-name", "none");
2069          if (!skipNextOpen) {
2070            restoreAnimationName();
2071            return void 0;
2072          }
2073          const restoreAnimationDuration = setTemporaryStyle(panel, "animation-duration", "0s");
2074          restoreAnimationName();
2075          setPendingTemporaryStyleRestore(restoreAnimationDuration);
2076          setForcePanelIdle(true);
2077          return void 0;
2078        }
2079        if (!open && mounted && (transitionStatus === "idle" || transitionStatus === "starting")) {
2080          shouldPreventMountAnimationRef.current = false;
2081          shouldPreventActivityResumeAnimationRef.current = false;
2082          if (animationType === "none") {
2083            setDimensions(EMPTY_DIMENSIONS, false);
2084            setMounted(false);
2085            return void 0;
2086          }
2087          setDimensions(getDimensions(panel));
2088          return void 0;
2089        }
2090        if (transitionStatus !== "ending") {
2091          return void 0;
2092        }
2093        if (animationType === "none") {
2094          setMounted(false);
2095          return void 0;
2096        }
2097        const nextDimensions = getDimensions(panel);
2098        const hasMeasuredSize = nextDimensions.height > 0 || nextDimensions.width > 0;
2099        if (!hasMeasuredSize) {
2100          setMounted(false);
2101          return void 0;
2102        }
2103        setDimensions(nextDimensions);
2104        if (animationType === "css-animation") {
2105          const restoreAnimationName = setTemporaryStyle(panel, "animation-name", "none");
2106          restoreAnimationName();
2107        }
2108        return void 0;
2109      }, [mounted, open, restorePendingTemporaryStyle, setDimensions, setMounted, setPendingTemporaryStyleRestore, shouldPreventOpenAnimation, transitionStatus]);
2110      useOpenChangeComplete({
2111        enabled: open && mounted && panelTransitionStatus === "idle",
2112        open: true,
2113        ref: panelRef,
2114        onComplete() {
2115          if (!open) {
2116            return;
2117          }
2118          setDimensions(EMPTY_DIMENSIONS, false);
2119        }
2120      });
2121      React17.useEffect(() => {
2122        if (open || !mounted || panelTransitionStatus !== "ending") {
2123          return void 0;
2124        }
2125        const panel = panelRef.current;
2126        if (!panel) {
2127          return void 0;
2128        }
2129        const abortController = new AbortController();
2130        let endingStyleFrame = -1;
2131        function handleComplete() {
2132          if (latestOpenRef.current) {
2133            return;
2134          }
2135          setMounted(false);
2136          setDimensions(EMPTY_DIMENSIONS, false);
2137        }
2138        endingStyleFrame = AnimationFrame.request(() => {
2139          runOnceCloseAnimationsFinish(handleComplete, abortController.signal);
2140        });
2141        return () => {
2142          AnimationFrame.cancel(endingStyleFrame);
2143          abortController.abort();
2144        };
2145      }, [latestOpenRef, mounted, open, panelTransitionStatus, runOnceCloseAnimationsFinish, setDimensions, setMounted]);
2146      useIsoLayoutEffect(() => {
2147        const panel = panelRef.current;
2148        if (!panel || !hiddenUntilFound || !hidden) {
2149          return;
2150        }
2151        panel.setAttribute("hidden", "until-found");
2152      }, [hidden, hiddenUntilFound]);
2153      React17.useEffect(function registerBeforeMatchListener() {
2154        const panel = panelRef.current;
2155        if (!panel) {
2156          return void 0;
2157        }
2158        function handleBeforeMatch(event) {
2159          const eventDetails = createChangeEventDetails(reason_parts_exports.none, event);
2160          onOpenChange(true, eventDetails);
2161          if (eventDetails.isCanceled) {
2162            return;
2163          }
2164          shouldSkipNextOpenRef.current = true;
2165          setOpen(true);
2166        }
2167        return addEventListener(panel, "beforematch", handleBeforeMatch);
2168      }, [onOpenChange, setOpen]);
2169      const shouldRender = keepMounted || hiddenUntilFound || mounted || open;
2170      return {
2171        height: renderedDimensions.height,
2172        props: {
2173          ...shouldPersistHiddenTransitionStyles ? {
2174            [CollapsiblePanelDataAttributes.startingStyle]: ""
2175          } : void 0,
2176          hidden,
2177          id: idParam
2178        },
2179        ref: mergedPanelRef,
2180        shouldPreventOpenAnimation,
2181        shouldRender,
2182        transitionStatus: panelTransitionStatus,
2183        width: renderedDimensions.width
2184      };
2185    }
2186    function getDimensions(element) {
2187      return {
2188        height: element.scrollHeight,
2189        width: element.scrollWidth
2190      };
2191    }
2192    function getAnimationType(element, hasSuppressedMountAnimation) {
2193      const panelStyles = getWindow(element).getComputedStyle(element);
2194      const hasAnimation = (panelStyles.animationName.split(",").map((name) => name.trim()).some((name) => name !== "" && name !== "none") || hasSuppressedMountAnimation) && hasNonZeroDuration(panelStyles.animationDuration);
2195      const hasTransition = hasNonZeroDuration(panelStyles.transitionDuration);
2196      if (hasAnimation && hasTransition) {
2197        if (true) {
2198          warn("CSS transitions and CSS animations both detected on Collapsible or Accordion panel.", "Only one of either animation type should be used.");
2199        }
2200        return "css-transition";
2201      }
2202      if (hasTransition) {
2203        return "css-transition";
2204      }
2205      if (hasAnimation) {
2206        return "css-animation";
2207      }
2208      return "none";
2209    }
2210    function hasNonZeroDuration(value) {
2211      return value.split(",").map((part) => part.trim()).some((part) => part !== "" && Number.parseFloat(part) > 0);
2212    }
2213    function setTemporaryStyle(element, property, value) {
2214      const previousValue = element.style.getPropertyValue(property);
2215      const previousPriority = element.style.getPropertyPriority(property);
2216      element.style.setProperty(property, value);
2217      return () => {
2218        if (previousValue === "") {
2219          element.style.removeProperty(property);
2220          return;
2221        }
2222        element.style.setProperty(property, previousValue, previousPriority);
2223      };
2224    }
2225    function resetLayoutStyles(element) {
2226      const originalLayoutStyles = {
2227        "justify-content": element.style.justifyContent,
2228        "align-items": element.style.alignItems,
2229        "align-content": element.style.alignContent,
2230        "justify-items": element.style.justifyItems
2231      };
2232      Object.keys(originalLayoutStyles).forEach((key) => {
2233        element.style.setProperty(key, "initial", "important");
2234      });
2235      function restoreLayoutStyles() {
2236        Object.entries(originalLayoutStyles).forEach(([key, value]) => {
2237          if (value === "") {
2238            element.style.removeProperty(key);
2239            return;
2240          }
2241          element.style.setProperty(key, value);
2242        });
2243      }
2244      const frame = AnimationFrame.request(restoreLayoutStyles);
2245      return () => {
2246        AnimationFrame.cancel(frame);
2247        restoreLayoutStyles();
2248      };
2249    }
2250  
2251    // node_modules/@base-ui/utils/platform/parts.mjs
2252    var parts_exports = {};
2253    __export(parts_exports, {
2254      engine: () => engine_exports,
2255      env: () => env_exports,
2256      os: () => os_exports,
2257      screenReader: () => screen_reader_exports
2258    });
2259  
2260    // node_modules/@base-ui/utils/platform/os.mjs
2261    var os_exports = {};
2262    __export(os_exports, {
2263      android: () => android,
2264      apple: () => apple,
2265      ios: () => ios,
2266      linux: () => linux,
2267      mac: () => mac,
2268      windows: () => windows
2269    });
2270  
2271    // node_modules/@base-ui/utils/platform/shared.mjs
2272    function readRawData() {
2273      if (typeof navigator === "undefined") {
2274        return {
2275          userAgent: "",
2276          platform: "",
2277          maxTouchPoints: 0
2278        };
2279      }
2280      if (true) {
2281        const uaData = navigator.userAgentData;
2282        if (uaData && Array.isArray(uaData.brands)) {
2283          return {
2284            userAgent: uaData.brands.map(({
2285              brand,
2286              version: version2
2287            }) => `$brand}/$version2}`).join(" "),
2288            platform: uaData.platform ?? navigator.platform ?? "",
2289            maxTouchPoints: navigator.maxTouchPoints ?? 0
2290          };
2291        }
2292      }
2293      return {
2294        userAgent: navigator.userAgent,
2295        platform: navigator.platform ?? "",
2296        maxTouchPoints: navigator.maxTouchPoints ?? 0
2297      };
2298    }
2299    var {
2300      userAgent,
2301      platform,
2302      maxTouchPoints
2303    } = readRawData();
2304    var lowerUserAgent = userAgent.toLowerCase();
2305    var lowerPlatform = platform.toLowerCase();
2306  
2307    // node_modules/@base-ui/utils/platform/os.mjs
2308    var ios = /^i(os$|p)/.test(lowerPlatform) || lowerPlatform === "macintel" && maxTouchPoints > 1;
2309    var ANDROID_STRING = "android";
2310    var android = lowerPlatform === ANDROID_STRING || lowerUserAgent.includes(ANDROID_STRING);
2311    var mac = !ios && lowerPlatform.startsWith("mac");
2312    var windows = lowerPlatform.startsWith("win");
2313    var linux = !android && /^(linux|chrome os)/.test(lowerPlatform);
2314    var apple = mac || ios;
2315  
2316    // node_modules/@base-ui/utils/platform/engine.mjs
2317    var engine_exports = {};
2318    __export(engine_exports, {
2319      blink: () => blink,
2320      gecko: () => gecko,
2321      webkit: () => webkit
2322    });
2323    var webkit = typeof CSS !== "undefined" && !!CSS.supports?.("-webkit-backdrop-filter:none");
2324    var gecko = !webkit && lowerUserAgent.includes("firefox");
2325    var blink = !webkit && lowerUserAgent.includes("chrom");
2326  
2327    // node_modules/@base-ui/utils/platform/screen-reader.mjs
2328    var screen_reader_exports = {};
2329    __export(screen_reader_exports, {
2330      voiceOver: () => voiceOver
2331    });
2332    var voiceOver = apple;
2333  
2334    // node_modules/@base-ui/utils/platform/env.mjs
2335    var env_exports = {};
2336    __export(env_exports, {
2337      jsdom: () => jsdom
2338    });
2339    var jsdom = /jsdom|happydom/.test(lowerUserAgent);
2340  
2341    // node_modules/@base-ui/utils/useTimeout.mjs
2342    var EMPTY2 = 0;
2343    var Timeout = class _Timeout {
2344      static create() {
2345        return new _Timeout();
2346      }
2347      currentId = EMPTY2;
2348      /**
2349       * Executes `fn` after `delay`, clearing any previously scheduled call.
2350       */
2351      start(delay, fn) {
2352        this.clear();
2353        this.currentId = setTimeout(() => {
2354          this.currentId = EMPTY2;
2355          fn();
2356        }, delay);
2357      }
2358      isStarted() {
2359        return this.currentId !== EMPTY2;
2360      }
2361      clear = () => {
2362        if (this.currentId !== EMPTY2) {
2363          clearTimeout(this.currentId);
2364          this.currentId = EMPTY2;
2365        }
2366      };
2367      disposeEffect = () => {
2368        return this.clear;
2369      };
2370    };
2371    function useTimeout() {
2372      const timeout = useRefWithInit(Timeout.create).current;
2373      useOnMount(timeout.disposeEffect);
2374      return timeout;
2375    }
2376  
2377    // node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
2378    var React18 = __toESM(require_react(), 1);
2379  
2380    // node_modules/@base-ui/react/floating-ui-react/utils/event.mjs
2381    function isReactEvent(event) {
2382      return "nativeEvent" in event;
2383    }
2384    function isMouseLikePointerType(pointerType, strict) {
2385      const values = ["mouse", "pen"];
2386      if (!strict) {
2387        values.push("", void 0);
2388      }
2389      return values.includes(pointerType);
2390    }
2391    function isClickLikeEvent(event) {
2392      const type = event.type;
2393      return type === "click" || type === "mousedown" || type === "keydown" || type === "keyup";
2394    }
2395  
2396    // node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs
2397    var FOCUSABLE_ATTRIBUTE = "data-base-ui-focusable";
2398    var TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
2399  
2400    // node_modules/@base-ui/react/internals/shadowDom.mjs
2401    function activeElement(doc) {
2402      let element = doc.activeElement;
2403      while (element?.shadowRoot?.activeElement != null) {
2404        element = element.shadowRoot.activeElement;
2405      }
2406      return element;
2407    }
2408    function contains(parent, child) {
2409      if (!parent || !child) {
2410        return false;
2411      }
2412      const rootNode = child.getRootNode?.();
2413      if (parent.contains(child)) {
2414        return true;
2415      }
2416      if (rootNode && isShadowRoot(rootNode)) {
2417        let next = child;
2418        while (next) {
2419          if (parent === next) {
2420            return true;
2421          }
2422          next = next.parentNode || next.host;
2423        }
2424      }
2425      return false;
2426    }
2427    function getTarget(event) {
2428      if ("composedPath" in event) {
2429        return event.composedPath()[0];
2430      }
2431      return event.target;
2432    }
2433  
2434    // node_modules/@base-ui/react/floating-ui-react/utils/element.mjs
2435    function isTargetInsideEnabledTrigger(target, triggerElements) {
2436      if (!isElement(target)) {
2437        return false;
2438      }
2439      const targetElement = target;
2440      if (triggerElements.hasElement(targetElement)) {
2441        return !targetElement.hasAttribute("data-trigger-disabled");
2442      }
2443      for (const [, trigger] of triggerElements.entries()) {
2444        if (contains(trigger, targetElement)) {
2445          return !trigger.hasAttribute("data-trigger-disabled");
2446        }
2447      }
2448      return false;
2449    }
2450    function isEventTargetWithin(event, node) {
2451      if (node == null) {
2452        return false;
2453      }
2454      if ("composedPath" in event) {
2455        return event.composedPath().includes(node);
2456      }
2457      const eventAgain = event;
2458      return eventAgain.target != null && node.contains(eventAgain.target);
2459    }
2460    function isRootElement(element) {
2461      return element.matches("html,body");
2462    }
2463    function isTypeableElement(element) {
2464      return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);
2465    }
2466    function isInteractiveElement(element) {
2467      return element?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),$TYPEABLE_SELECTOR}`) != null;
2468    }
2469    function matchesFocusVisible(element) {
2470      if (!element || parts_exports.env.jsdom) {
2471        return true;
2472      }
2473      try {
2474        return element.matches(":focus-visible");
2475      } catch (_e) {
2476        return true;
2477      }
2478    }
2479  
2480    // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverShared.mjs
2481    function resolveValue(value, pointerType) {
2482      if (pointerType != null && !isMouseLikePointerType(pointerType)) {
2483        return 0;
2484      }
2485      if (typeof value === "function") {
2486        return value();
2487      }
2488      return value;
2489    }
2490    function getDelay(value, prop, pointerType) {
2491      const result = resolveValue(value, pointerType);
2492      if (typeof result === "number") {
2493        return result;
2494      }
2495      return result?.[prop];
2496    }
2497    function getRestMs(value) {
2498      if (typeof value === "function") {
2499        return value();
2500      }
2501      return value;
2502    }
2503    function isClickLikeOpenEvent(openEventType, interactedInside) {
2504      return interactedInside || openEventType === "click" || openEventType === "mousedown";
2505    }
2506    function isHoverOpenEvent(openEventType) {
2507      return openEventType?.includes("mouse") && openEventType !== "mousedown";
2508    }
2509  
2510    // node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
2511    var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
2512    var FloatingDelayGroupContext = /* @__PURE__ */ React18.createContext({
2513      hasProvider: false,
2514      timeoutMs: 0,
2515      delayRef: {
2516        current: 0
2517      },
2518      initialDelayRef: {
2519        current: 0
2520      },
2521      timeout: new Timeout(),
2522      currentIdRef: {
2523        current: null
2524      },
2525      currentContextRef: {
2526        current: null
2527      }
2528    });
2529    if (true) FloatingDelayGroupContext.displayName = "FloatingDelayGroupContext";
2530    function resetDelayRef(delayRef, initialDelayRef) {
2531      delayRef.current = initialDelayRef.current;
2532    }
2533    function FloatingDelayGroup(props) {
2534      const {
2535        children,
2536        delay,
2537        timeoutMs = 0
2538      } = props;
2539      const delayRef = React18.useRef(delay);
2540      const initialDelayRef = React18.useRef(delay);
2541      const currentIdRef = React18.useRef(null);
2542      const currentContextRef = React18.useRef(null);
2543      const timeout = useTimeout();
2544      useIsoLayoutEffect(() => {
2545        initialDelayRef.current = delay;
2546        if (!currentIdRef.current) {
2547          delayRef.current = delay;
2548          return;
2549        }
2550        delayRef.current = {
2551          open: getDelay(delayRef.current, "open"),
2552          close: getDelay(delay, "close")
2553        };
2554      }, [delay, currentIdRef, delayRef, initialDelayRef]);
2555      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FloatingDelayGroupContext.Provider, {
2556        value: React18.useMemo(() => ({
2557          hasProvider: true,
2558          delayRef,
2559          initialDelayRef,
2560          currentIdRef,
2561          timeoutMs,
2562          currentContextRef,
2563          timeout
2564        }), [timeoutMs, timeout]),
2565        children
2566      });
2567    }
2568    function useDelayGroup(context, options = {
2569      open: false
2570    }) {
2571      const {
2572        open
2573      } = options;
2574      const store2 = "rootStore" in context ? context.rootStore : context;
2575      const floatingId = store2.useState("floatingId");
2576      const groupContext = React18.useContext(FloatingDelayGroupContext);
2577      const {
2578        currentIdRef,
2579        delayRef,
2580        timeoutMs,
2581        initialDelayRef,
2582        currentContextRef,
2583        hasProvider,
2584        timeout
2585      } = groupContext;
2586      const [isInstantPhase, setIsInstantPhase] = React18.useState(false);
2587      const openRef = React18.useRef(open);
2588      useIsoLayoutEffect(() => {
2589        openRef.current = open;
2590      }, [open]);
2591      useIsoLayoutEffect(() => {
2592        function unset() {
2593          currentContextRef.current?.setIsInstantPhase(false);
2594          currentIdRef.current = null;
2595          currentContextRef.current = null;
2596          delayRef.current = initialDelayRef.current;
2597          timeout.clear();
2598        }
2599        if (!currentIdRef.current) {
2600          return void 0;
2601        }
2602        if (!open && currentIdRef.current === floatingId) {
2603          setIsInstantPhase(false);
2604          if (timeoutMs) {
2605            const closingId = floatingId;
2606            timeout.start(timeoutMs, () => {
2607              if (store2.select("open") || currentIdRef.current && currentIdRef.current !== closingId) {
2608                return;
2609              }
2610              unset();
2611            });
2612            return () => {
2613              if (openRef.current || currentIdRef.current !== closingId) {
2614                timeout.clear();
2615              }
2616            };
2617          }
2618          unset();
2619        }
2620        return void 0;
2621      }, [open, floatingId, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeout, store2]);
2622      useIsoLayoutEffect(() => {
2623        if (!open) {
2624          return;
2625        }
2626        const prevContext = currentContextRef.current;
2627        const prevId = currentIdRef.current;
2628        timeout.clear();
2629        currentContextRef.current = {
2630          onOpenChange: store2.setOpen,
2631          setIsInstantPhase
2632        };
2633        currentIdRef.current = floatingId;
2634        delayRef.current = {
2635          open: 0,
2636          close: getDelay(initialDelayRef.current, "close")
2637        };
2638        if (prevId !== null && prevId !== floatingId) {
2639          setIsInstantPhase(true);
2640          prevContext?.setIsInstantPhase(true);
2641          prevContext?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.none));
2642        } else {
2643          setIsInstantPhase(false);
2644          prevContext?.setIsInstantPhase(false);
2645        }
2646      }, [open, floatingId, store2, currentIdRef, delayRef, initialDelayRef, currentContextRef, timeout]);
2647      useIsoLayoutEffect(() => {
2648        return () => {
2649          if (currentIdRef.current === floatingId) {
2650            currentContextRef.current = null;
2651            if (!openRef.current) {
2652              return;
2653            }
2654            currentIdRef.current = null;
2655            resetDelayRef(delayRef, initialDelayRef);
2656            timeout.clear();
2657          }
2658        };
2659      }, [currentContextRef, currentIdRef, delayRef, floatingId, initialDelayRef, timeout]);
2660      return React18.useMemo(() => ({
2661        hasProvider,
2662        delayRef,
2663        isInstantPhase
2664      }), [hasProvider, delayRef, isInstantPhase]);
2665    }
2666  
2667    // node_modules/@base-ui/utils/mergeCleanups.mjs
2668    function mergeCleanups(...cleanups) {
2669      return () => {
2670        for (let i = 0; i < cleanups.length; i += 1) {
2671          const cleanup = cleanups[i];
2672          if (cleanup) {
2673            cleanup();
2674          }
2675        }
2676      };
2677    }
2678  
2679    // node_modules/@base-ui/react/utils/FocusGuard.mjs
2680    var React19 = __toESM(require_react(), 1);
2681  
2682    // node_modules/@base-ui/utils/visuallyHidden.mjs
2683    var visuallyHiddenBase = {
2684      clipPath: "inset(50%)",
2685      overflow: "hidden",
2686      whiteSpace: "nowrap",
2687      border: 0,
2688      padding: 0,
2689      width: 1,
2690      height: 1,
2691      margin: -1
2692    };
2693    var visuallyHidden = {
2694      ...visuallyHiddenBase,
2695      position: "fixed",
2696      top: 0,
2697      left: 0
2698    };
2699    var visuallyHiddenInput = {
2700      ...visuallyHiddenBase,
2701      position: "absolute"
2702    };
2703  
2704    // node_modules/@base-ui/react/utils/FocusGuard.mjs
2705    var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
2706    var FocusGuard = /* @__PURE__ */ React19.forwardRef(function FocusGuard2(props, ref) {
2707      const [role, setRole] = React19.useState();
2708      useIsoLayoutEffect(() => {
2709        if (parts_exports.screenReader.voiceOver && parts_exports.engine.webkit) {
2710          setRole("button");
2711        }
2712      }, []);
2713      const restProps = {
2714        tabIndex: 0,
2715        // Role is only for VoiceOver
2716        role
2717      };
2718      return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", {
2719        ...props,
2720        ref,
2721        style: visuallyHidden,
2722        "aria-hidden": role ? void 0 : true,
2723        ...restProps,
2724        "data-base-ui-focus-guard": ""
2725      });
2726    });
2727    if (true) FocusGuard.displayName = "FocusGuard";
2728  
2729    // node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
2730    var min = Math.min;
2731    var max = Math.max;
2732    var round = Math.round;
2733    var floor = Math.floor;
2734    var createCoords = (v) => ({
2735      x: v,
2736      y: v
2737    });
2738    var oppositeSideMap = {
2739      left: "right",
2740      right: "left",
2741      bottom: "top",
2742      top: "bottom"
2743    };
2744    function clamp(start, value, end) {
2745      return max(start, min(value, end));
2746    }
2747    function evaluate(value, param) {
2748      return typeof value === "function" ? value(param) : value;
2749    }
2750    function getSide(placement) {
2751      return placement.split("-")[0];
2752    }
2753    function getAlignment(placement) {
2754      return placement.split("-")[1];
2755    }
2756    function getOppositeAxis(axis) {
2757      return axis === "x" ? "y" : "x";
2758    }
2759    function getAxisLength(axis) {
2760      return axis === "y" ? "height" : "width";
2761    }
2762    function getSideAxis(placement) {
2763      const firstChar = placement[0];
2764      return firstChar === "t" || firstChar === "b" ? "y" : "x";
2765    }
2766    function getAlignmentAxis(placement) {
2767      return getOppositeAxis(getSideAxis(placement));
2768    }
2769    function getAlignmentSides(placement, rects, rtl) {
2770      if (rtl === void 0) {
2771        rtl = false;
2772      }
2773      const alignment = getAlignment(placement);
2774      const alignmentAxis = getAlignmentAxis(placement);
2775      const length = getAxisLength(alignmentAxis);
2776      let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
2777      if (rects.reference[length] > rects.floating[length]) {
2778        mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
2779      }
2780      return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
2781    }
2782    function getExpandedPlacements(placement) {
2783      const oppositePlacement = getOppositePlacement(placement);
2784      return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
2785    }
2786    function getOppositeAlignmentPlacement(placement) {
2787      return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
2788    }
2789    var lrPlacement = ["left", "right"];
2790    var rlPlacement = ["right", "left"];
2791    var tbPlacement = ["top", "bottom"];
2792    var btPlacement = ["bottom", "top"];
2793    function getSideList(side, isStart, rtl) {
2794      switch (side) {
2795        case "top":
2796        case "bottom":
2797          if (rtl) return isStart ? rlPlacement : lrPlacement;
2798          return isStart ? lrPlacement : rlPlacement;
2799        case "left":
2800        case "right":
2801          return isStart ? tbPlacement : btPlacement;
2802        default:
2803          return [];
2804      }
2805    }
2806    function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
2807      const alignment = getAlignment(placement);
2808      let list = getSideList(getSide(placement), direction === "start", rtl);
2809      if (alignment) {
2810        list = list.map((side) => side + "-" + alignment);
2811        if (flipAlignment) {
2812          list = list.concat(list.map(getOppositeAlignmentPlacement));
2813        }
2814      }
2815      return list;
2816    }
2817    function getOppositePlacement(placement) {
2818      const side = getSide(placement);
2819      return oppositeSideMap[side] + placement.slice(side.length);
2820    }
2821    function expandPaddingObject(padding) {
2822      var _padding$top, _padding$right, _padding$bottom, _padding$left;
2823      return {
2824        top: (_padding$top = padding.top) != null ? _padding$top : 0,
2825        right: (_padding$right = padding.right) != null ? _padding$right : 0,
2826        bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
2827        left: (_padding$left = padding.left) != null ? _padding$left : 0
2828      };
2829    }
2830    function getPaddingObject(padding) {
2831      return typeof padding !== "number" ? expandPaddingObject(padding) : {
2832        top: padding,
2833        right: padding,
2834        bottom: padding,
2835        left: padding
2836      };
2837    }
2838    function rectToClientRect(rect) {
2839      const {
2840        x,
2841        y,
2842        width,
2843        height
2844      } = rect;
2845      return {
2846        width,
2847        height,
2848        top: y,
2849        left: x,
2850        right: x + width,
2851        bottom: y + height,
2852        x,
2853        y
2854      };
2855    }
2856  
2857    // node_modules/@base-ui/react/floating-ui-react/utils/composite.mjs
2858    function isHiddenByStyles(styles) {
2859      return styles.visibility === "hidden" || styles.visibility === "collapse";
2860    }
2861    function isElementVisible(element, styles = element ? getComputedStyle2(element) : null) {
2862      if (!element || !element.isConnected || !styles || isHiddenByStyles(styles)) {
2863        return false;
2864      }
2865      if (typeof element.checkVisibility === "function") {
2866        return element.checkVisibility();
2867      }
2868      return styles.display !== "none" && styles.display !== "contents";
2869    }
2870  
2871    // node_modules/@base-ui/react/floating-ui-react/utils/tabbable.mjs
2872    var CANDIDATE_SELECTOR = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';
2873    function getParentElement(element) {
2874      const assignedSlot = element.assignedSlot;
2875      if (assignedSlot) {
2876        return assignedSlot;
2877      }
2878      if (element.parentElement) {
2879        return element.parentElement;
2880      }
2881      const rootNode = element.getRootNode();
2882      return isShadowRoot(rootNode) ? rootNode.host : null;
2883    }
2884    function getDetailsSummary(details) {
2885      for (const child of Array.from(details.children)) {
2886        if (getNodeName(child) === "summary") {
2887          return child;
2888        }
2889      }
2890      return null;
2891    }
2892    function isWithinOpenDetailsSummary(element, details) {
2893      const summary = getDetailsSummary(details);
2894      return !!summary && (element === summary || contains(summary, element));
2895    }
2896    function isFocusableCandidate(element) {
2897      const nodeName = element ? getNodeName(element) : "";
2898      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");
2899    }
2900    function isFocusableElement(element) {
2901      if (!isFocusableCandidate(element) || !element.isConnected || element.matches(":disabled")) {
2902        return false;
2903      }
2904      for (let current = element; current; current = getParentElement(current)) {
2905        const isAncestor = current !== element;
2906        const isSlot = getNodeName(current) === "slot";
2907        if (current.hasAttribute("inert")) {
2908          return false;
2909        }
2910        if (isAncestor && getNodeName(current) === "details" && !current.open && !isWithinOpenDetailsSummary(element, current) || current.hasAttribute("hidden") || !isSlot && !isVisibleInTabbableTree(current, isAncestor)) {
2911          return false;
2912        }
2913      }
2914      return true;
2915    }
2916    function isVisibleInTabbableTree(element, isAncestor) {
2917      const styles = getComputedStyle2(element);
2918      if (!isAncestor) {
2919        return isElementVisible(element, styles);
2920      }
2921      return styles.display !== "none";
2922    }
2923    function getTabIndex(element) {
2924      const tabIndex = element.tabIndex;
2925      if (tabIndex < 0) {
2926        const nodeName = getNodeName(element);
2927        if (nodeName === "details" || nodeName === "audio" || nodeName === "video" || isHTMLElement(element) && element.isContentEditable) {
2928          return 0;
2929        }
2930      }
2931      return tabIndex;
2932    }
2933    function getNamedRadioInput(element) {
2934      if (getNodeName(element) !== "input") {
2935        return null;
2936      }
2937      const input = element;
2938      return input.type === "radio" && input.name !== "" ? input : null;
2939    }
2940    function isTabbableRadio(element, candidates) {
2941      const input = getNamedRadioInput(element);
2942      if (!input) {
2943        return true;
2944      }
2945      const checkedRadio = candidates.find((candidate) => {
2946        const radio = getNamedRadioInput(candidate);
2947        return radio?.name === input.name && radio.form === input.form && radio.checked;
2948      });
2949      if (checkedRadio) {
2950        return checkedRadio === input;
2951      }
2952      return candidates.find((candidate) => {
2953        const radio = getNamedRadioInput(candidate);
2954        return radio?.name === input.name && radio.form === input.form;
2955      }) === input;
2956    }
2957    function getComposedChildren(container) {
2958      if (isHTMLElement(container) && getNodeName(container) === "slot") {
2959        const assignedElements = container.assignedElements({
2960          flatten: true
2961        });
2962        if (assignedElements.length > 0) {
2963          return assignedElements;
2964        }
2965      }
2966      if (isHTMLElement(container) && container.shadowRoot) {
2967        return Array.from(container.shadowRoot.children);
2968      }
2969      return Array.from(container.children);
2970    }
2971    function appendCandidates(container, list) {
2972      getComposedChildren(container).forEach((child) => {
2973        if (isFocusableCandidate(child)) {
2974          list.push(child);
2975        }
2976        appendCandidates(child, list);
2977      });
2978    }
2979    function appendMatchingElements(container, selector, list) {
2980      getComposedChildren(container).forEach((child) => {
2981        if (isHTMLElement(child) && child.matches(selector)) {
2982          list.push(child);
2983        }
2984        appendMatchingElements(child, selector, list);
2985      });
2986    }
2987    function focusable(container) {
2988      const candidates = [];
2989      appendCandidates(container, candidates);
2990      return candidates.filter(isFocusableElement);
2991    }
2992    function tabbable(container) {
2993      const candidates = focusable(container);
2994      return candidates.filter((element) => getTabIndex(element) >= 0 && isTabbableRadio(element, candidates));
2995    }
2996    function getTabbableIn(container, dir) {
2997      const list = tabbable(container);
2998      const len = list.length;
2999      if (len === 0) {
3000        return void 0;
3001      }
3002      const active = activeElement(ownerDocument(container));
3003      const index2 = list.indexOf(active);
3004      const nextIndex = index2 === -1 ? dir === 1 ? 0 : len - 1 : index2 + dir;
3005      return list[nextIndex];
3006    }
3007    function getNextTabbable(referenceElement) {
3008      return getTabbableIn(ownerDocument(referenceElement).body, 1) || referenceElement;
3009    }
3010    function getPreviousTabbable(referenceElement) {
3011      return getTabbableIn(ownerDocument(referenceElement).body, -1) || referenceElement;
3012    }
3013    function isOutsideEvent(event, container) {
3014      const containerElement = container || event.currentTarget;
3015      const relatedTarget = event.relatedTarget;
3016      return !relatedTarget || !contains(containerElement, relatedTarget);
3017    }
3018    function disableFocusInside(container) {
3019      const tabbableElements = tabbable(container);
3020      tabbableElements.forEach((element) => {
3021        element.dataset.tabindex = element.getAttribute("tabindex") || "";
3022        element.setAttribute("tabindex", "-1");
3023      });
3024    }
3025    function enableFocusInside(container) {
3026      const elements = [];
3027      appendMatchingElements(container, "[data-tabindex]", elements);
3028      elements.forEach((element) => {
3029        const tabindex = element.dataset.tabindex;
3030        delete element.dataset.tabindex;
3031        if (tabindex) {
3032          element.setAttribute("tabindex", tabindex);
3033        } else {
3034          element.removeAttribute("tabindex");
3035        }
3036      });
3037    }
3038  
3039    // node_modules/@base-ui/react/floating-ui-react/utils/nodes.mjs
3040    function getNodeChildren(nodes, id, onlyOpenChildren = true) {
3041      const directChildren = nodes.filter((node) => node.parentId === id);
3042      return directChildren.flatMap((child) => [...!onlyOpenChildren || child.context?.open ? [child] : [], ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);
3043    }
3044  
3045    // node_modules/@base-ui/react/floating-ui-react/utils/createAttribute.mjs
3046    function createAttribute(name) {
3047      return `data-base-ui-$name}`;
3048    }
3049  
3050    // node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
3051    var React20 = __toESM(require_react(), 1);
3052    var ReactDOM2 = __toESM(require_react_dom(), 1);
3053  
3054    // node_modules/@base-ui/react/internals/constants.mjs
3055    var DISABLED_TRANSITIONS_STYLE = {
3056      style: {
3057        transition: "none"
3058      }
3059    };
3060    var BASE_UI_SWIPE_IGNORE_ATTRIBUTE = "data-base-ui-swipe-ignore";
3061    var LEGACY_SWIPE_IGNORE_ATTRIBUTE = "data-swipe-ignore";
3062    var BASE_UI_SWIPE_IGNORE_SELECTOR = `[$BASE_UI_SWIPE_IGNORE_ATTRIBUTE}]`;
3063    var LEGACY_SWIPE_IGNORE_SELECTOR = `[$LEGACY_SWIPE_IGNORE_ATTRIBUTE}]`;
3064    var POPUP_COLLISION_AVOIDANCE = {
3065      fallbackAxisSide: "end"
3066    };
3067    var ownerVisuallyHidden = {
3068      clipPath: "inset(50%)",
3069      position: "fixed",
3070      top: 0,
3071      left: 0
3072    };
3073  
3074    // node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
3075    var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
3076    var PortalContext = /* @__PURE__ */ React20.createContext(null);
3077    if (true) PortalContext.displayName = "PortalContext";
3078    var usePortalContext = () => React20.useContext(PortalContext);
3079    var attr = createAttribute("portal");
3080    function useFloatingPortalNode(props = {}) {
3081      const {
3082        ref,
3083        container: containerProp,
3084        componentProps = EMPTY_OBJECT,
3085        elementProps
3086      } = props;
3087      const uniqueId = useId();
3088      const portalContext = usePortalContext();
3089      const parentPortalNode = portalContext?.portalNode;
3090      const [containerElement, setContainerElement] = React20.useState(null);
3091      const [portalNode, setPortalNode] = React20.useState(null);
3092      const setPortalNodeRef = useStableCallback((node) => {
3093        if (node !== null) {
3094          setPortalNode(node);
3095        }
3096      });
3097      const containerRef = React20.useRef(null);
3098      useIsoLayoutEffect(() => {
3099        if (containerProp === null) {
3100          if (containerRef.current) {
3101            containerRef.current = null;
3102            setPortalNode(null);
3103            setContainerElement(null);
3104          }
3105          return;
3106        }
3107        const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;
3108        if (resolvedContainer == null) {
3109          if (containerRef.current) {
3110            containerRef.current = null;
3111            setPortalNode(null);
3112            setContainerElement(null);
3113          }
3114          return;
3115        }
3116        if (containerRef.current !== resolvedContainer) {
3117          containerRef.current = resolvedContainer;
3118          setPortalNode(null);
3119          setContainerElement(resolvedContainer);
3120        }
3121      }, [containerProp, parentPortalNode]);
3122      const portalElement = useRenderElement("div", componentProps, {
3123        ref: [ref, setPortalNodeRef],
3124        props: [{
3125          id: uniqueId,
3126          [attr]: ""
3127        }, elementProps]
3128      });
3129      const portalSubtree = containerElement && portalElement ? /* @__PURE__ */ ReactDOM2.createPortal(portalElement, containerElement) : null;
3130      return {
3131        node: portalNode,
3132        // `id` and `render` props can override or remove the generated ID. Use the exact
3133        // rendered value so `aria-owns` never points at an ID absent from the DOM.
3134        nodeId: /* @__PURE__ */ React20.isValidElement(portalElement) ? portalElement.props.id : void 0,
3135        subtree: portalSubtree
3136      };
3137    }
3138    var FloatingPortal = /* @__PURE__ */ React20.forwardRef(function FloatingPortal2(componentProps, forwardedRef) {
3139      const {
3140        render,
3141        className,
3142        style,
3143        children,
3144        container,
3145        ...elementProps
3146      } = componentProps;
3147      const {
3148        node: portalNode,
3149        nodeId: portalNodeId,
3150        subtree: portalSubtree
3151      } = useFloatingPortalNode({
3152        container,
3153        ref: forwardedRef,
3154        componentProps,
3155        elementProps
3156      });
3157      const beforeOutsideRef = React20.useRef(null);
3158      const afterOutsideRef = React20.useRef(null);
3159      const beforeInsideRef = React20.useRef(null);
3160      const afterInsideRef = React20.useRef(null);
3161      const [focusManagerState, setFocusManagerState] = React20.useState(null);
3162      const focusInsideDisabledRef = React20.useRef(false);
3163      const modal = focusManagerState?.modal;
3164      const open = focusManagerState?.open;
3165      const shouldRenderGuards = !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode;
3166      React20.useEffect(() => {
3167        if (!portalNode || modal) {
3168          return void 0;
3169        }
3170        function onFocus(event) {
3171          if (portalNode && event.relatedTarget && isOutsideEvent(event)) {
3172            if (event.type === "focusin") {
3173              if (focusInsideDisabledRef.current) {
3174                enableFocusInside(portalNode);
3175                focusInsideDisabledRef.current = false;
3176              }
3177            } else {
3178              disableFocusInside(portalNode);
3179              focusInsideDisabledRef.current = true;
3180            }
3181          }
3182        }
3183        return mergeCleanups(addEventListener(portalNode, "focusin", onFocus, true), addEventListener(portalNode, "focusout", onFocus, true));
3184      }, [portalNode, modal]);
3185      useIsoLayoutEffect(() => {
3186        if (!portalNode || open !== true || !focusInsideDisabledRef.current) {
3187          return;
3188        }
3189        enableFocusInside(portalNode);
3190        focusInsideDisabledRef.current = false;
3191      }, [open, portalNode]);
3192      const portalContextValue = React20.useMemo(() => ({
3193        beforeOutsideRef,
3194        afterOutsideRef,
3195        beforeInsideRef,
3196        afterInsideRef,
3197        portalNode,
3198        setFocusManagerState
3199      }), [portalNode]);
3200      return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(React20.Fragment, {
3201        children: [portalSubtree, /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(PortalContext.Provider, {
3202          value: portalContextValue,
3203          children: [shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FocusGuard, {
3204            "data-type": "outside",
3205            ref: beforeOutsideRef,
3206            onFocus: (event) => {
3207              if (isOutsideEvent(event, portalNode)) {
3208                beforeInsideRef.current?.focus();
3209              } else {
3210                const domReference = focusManagerState ? focusManagerState.domReference : null;
3211                const prevTabbable = getPreviousTabbable(domReference);
3212                prevTabbable?.focus();
3213              }
3214            }
3215          }), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", {
3216            "aria-owns": portalNodeId,
3217            style: ownerVisuallyHidden
3218          }), portalNode && /* @__PURE__ */ ReactDOM2.createPortal(children, portalNode), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FocusGuard, {
3219            "data-type": "outside",
3220            ref: afterOutsideRef,
3221            onFocus: (event) => {
3222              if (isOutsideEvent(event, portalNode)) {
3223                afterInsideRef.current?.focus();
3224              } else {
3225                const domReference = focusManagerState ? focusManagerState.domReference : null;
3226                const nextTabbable = getNextTabbable(domReference);
3227                nextTabbable?.focus();
3228                if (focusManagerState?.closeOnFocusOut) {
3229                  focusManagerState?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.focusOut, event.nativeEvent));
3230                }
3231              }
3232            }
3233          })]
3234        })]
3235      });
3236    });
3237    if (true) FloatingPortal.displayName = "FloatingPortal";
3238  
3239    // node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
3240    var React21 = __toESM(require_react(), 1);
3241  
3242    // node_modules/@base-ui/react/floating-ui-react/utils/createEventEmitter.mjs
3243    function createEventEmitter() {
3244      const map = /* @__PURE__ */ new Map();
3245      return {
3246        emit(event, data) {
3247          map.get(event)?.forEach((listener) => listener(data));
3248        },
3249        on(event, listener) {
3250          if (!map.has(event)) {
3251            map.set(event, /* @__PURE__ */ new Set());
3252          }
3253          map.get(event).add(listener);
3254        },
3255        off(event, listener) {
3256          map.get(event)?.delete(listener);
3257        }
3258      };
3259    }
3260  
3261    // node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
3262    var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
3263    var FloatingNodeContext = /* @__PURE__ */ React21.createContext(null);
3264    if (true) FloatingNodeContext.displayName = "FloatingNodeContext";
3265    var FloatingTreeContext = /* @__PURE__ */ React21.createContext(null);
3266    if (true) FloatingTreeContext.displayName = "FloatingTreeContext";
3267    var useFloatingParentNodeId = () => React21.useContext(FloatingNodeContext)?.id || null;
3268    var useFloatingTree = (externalTree) => {
3269      const contextTree = React21.useContext(FloatingTreeContext);
3270      return externalTree ?? contextTree;
3271    };
3272  
3273    // node_modules/@base-ui/react/floating-ui-react/hooks/useClientPoint.mjs
3274    var React22 = __toESM(require_react(), 1);
3275    function createVirtualElement(domElement, data) {
3276      let offsetX = null;
3277      let offsetY = null;
3278      let isAutoUpdateEvent = false;
3279      return {
3280        contextElement: domElement || void 0,
3281        getBoundingClientRect() {
3282          const domRect = domElement?.getBoundingClientRect() || {
3283            width: 0,
3284            height: 0,
3285            x: 0,
3286            y: 0
3287          };
3288          const isXAxis = data.axis === "x" || data.axis === "both";
3289          const isYAxis = data.axis === "y" || data.axis === "both";
3290          const canTrackCursorOnAutoUpdate = ["mouseenter", "mousemove"].includes(data.dataRef.current.openEvent?.type || "") && data.pointerType !== "touch";
3291          let width = domRect.width;
3292          let height = domRect.height;
3293          let x = domRect.x;
3294          let y = domRect.y;
3295          if (offsetX == null && data.x && isXAxis) {
3296            offsetX = domRect.x - data.x;
3297          }
3298          if (offsetY == null && data.y && isYAxis) {
3299            offsetY = domRect.y - data.y;
3300          }
3301          x -= offsetX || 0;
3302          y -= offsetY || 0;
3303          width = 0;
3304          height = 0;
3305          if (!isAutoUpdateEvent || canTrackCursorOnAutoUpdate) {
3306            width = data.axis === "y" ? domRect.width : 0;
3307            height = data.axis === "x" ? domRect.height : 0;
3308            x = isXAxis && data.x != null ? data.x : x;
3309            y = isYAxis && data.y != null ? data.y : y;
3310          } else if (isAutoUpdateEvent && !canTrackCursorOnAutoUpdate) {
3311            height = data.axis === "x" ? domRect.height : height;
3312            width = data.axis === "y" ? domRect.width : width;
3313          }
3314          isAutoUpdateEvent = true;
3315          return {
3316            width,
3317            height,
3318            x,
3319            y,
3320            top: y,
3321            right: x + width,
3322            bottom: y + height,
3323            left: x
3324          };
3325        }
3326      };
3327    }
3328    function isMouseBasedEvent(event) {
3329      return event != null && event.clientX != null;
3330    }
3331    function useClientPoint(context, props = {}) {
3332      const {
3333        enabled = true,
3334        axis = "both"
3335      } = props;
3336      const store2 = "rootStore" in context ? context.rootStore : context;
3337      const open = store2.useState("open");
3338      const floating = store2.useState("floatingElement");
3339      const domReference = store2.useState("domReferenceElement");
3340      const dataRef = store2.context.dataRef;
3341      const initialRef = React22.useRef(false);
3342      const cleanupListenerRef = React22.useRef(null);
3343      const [pointerType, setPointerType] = React22.useState();
3344      const [reactive, setReactive] = React22.useState([]);
3345      const resetReference = useStableCallback((reference2) => {
3346        store2.set("positionReference", reference2);
3347      });
3348      const setReference = useStableCallback((newX, newY, referenceElement) => {
3349        if (initialRef.current) {
3350          return;
3351        }
3352        if (dataRef.current.openEvent && !isMouseBasedEvent(dataRef.current.openEvent)) {
3353          return;
3354        }
3355        store2.set("positionReference", createVirtualElement(referenceElement ?? domReference, {
3356          x: newX,
3357          y: newY,
3358          axis,
3359          dataRef,
3360          pointerType
3361        }));
3362      });
3363      const handleReferenceEnterOrMove = useStableCallback((event) => {
3364        if (!open) {
3365          setReference(event.clientX, event.clientY, event.currentTarget);
3366        } else if (!cleanupListenerRef.current) {
3367          setReference(event.clientX, event.clientY, event.currentTarget);
3368          setReactive([]);
3369        }
3370      });
3371      const openCheck = isMouseLikePointerType(pointerType) ? floating : open;
3372      React22.useEffect(() => {
3373        if (!enabled) {
3374          resetReference(domReference);
3375          return void 0;
3376        }
3377        if (!openCheck) {
3378          return void 0;
3379        }
3380        function cleanupListener() {
3381          cleanupListenerRef.current?.();
3382          cleanupListenerRef.current = null;
3383        }
3384        const win = getWindow(floating);
3385        function handleMouseMove(event) {
3386          const target = getTarget(event);
3387          if (!contains(floating, target)) {
3388            setReference(event.clientX, event.clientY);
3389          } else {
3390            cleanupListener();
3391          }
3392        }
3393        if (!dataRef.current.openEvent || isMouseBasedEvent(dataRef.current.openEvent)) {
3394          cleanupListenerRef.current = addEventListener(win, "mousemove", handleMouseMove);
3395        } else {
3396          resetReference(domReference);
3397        }
3398        return cleanupListener;
3399      }, [openCheck, enabled, floating, dataRef, domReference, store2, setReference, resetReference, reactive]);
3400      React22.useEffect(() => () => {
3401        store2.set("positionReference", null);
3402      }, [store2]);
3403      React22.useEffect(() => {
3404        if (enabled && !floating) {
3405          initialRef.current = false;
3406        }
3407      }, [enabled, floating]);
3408      React22.useEffect(() => {
3409        if (!enabled && open) {
3410          initialRef.current = true;
3411        }
3412      }, [enabled, open]);
3413      const reference = React22.useMemo(() => {
3414        function setPointerTypeRef(event) {
3415          setPointerType(event.pointerType);
3416        }
3417        return {
3418          onPointerDown: setPointerTypeRef,
3419          onPointerEnter: setPointerTypeRef,
3420          onMouseMove: handleReferenceEnterOrMove,
3421          onMouseEnter: handleReferenceEnterOrMove
3422        };
3423      }, [handleReferenceEnterOrMove]);
3424      return React22.useMemo(() => enabled ? {
3425        reference,
3426        trigger: reference
3427      } : {}, [enabled, reference]);
3428    }
3429  
3430    // node_modules/@base-ui/react/floating-ui-react/hooks/useDismiss.mjs
3431    var React23 = __toESM(require_react(), 1);
3432    function alwaysFalse() {
3433      return false;
3434    }
3435    function normalizeProp(normalizable) {
3436      return {
3437        escapeKey: typeof normalizable === "boolean" ? normalizable : normalizable?.escapeKey ?? false,
3438        outsidePress: typeof normalizable === "boolean" ? normalizable : normalizable?.outsidePress ?? true
3439      };
3440    }
3441    function useDismiss(context, props = {}) {
3442      const {
3443        enabled = true,
3444        escapeKey: escapeKey2 = true,
3445        outsidePress: outsidePressProp = true,
3446        outsidePressEvent = "sloppy",
3447        referencePress = alwaysFalse,
3448        bubbles,
3449        externalTree
3450      } = props;
3451      const store2 = "rootStore" in context ? context.rootStore : context;
3452      const open = store2.useState("open");
3453      const floatingElement = store2.useState("floatingElement");
3454      const {
3455        dataRef
3456      } = store2.context;
3457      const tree = useFloatingTree(externalTree);
3458      const outsidePressFn = useStableCallback(typeof outsidePressProp === "function" ? outsidePressProp : () => false);
3459      const outsidePress2 = typeof outsidePressProp === "function" ? outsidePressFn : outsidePressProp;
3460      const outsidePressEnabled = outsidePress2 !== false;
3461      const getOutsidePressEventProp = useStableCallback(() => outsidePressEvent);
3462      const {
3463        escapeKey: escapeKeyBubbles,
3464        outsidePress: outsidePressBubbles
3465      } = normalizeProp(bubbles);
3466      const pressStartedInsideRef = React23.useRef(false);
3467      const pressStartPreventedRef = React23.useRef(false);
3468      const suppressNextOutsideClickRef = React23.useRef(false);
3469      const isComposingRef = React23.useRef(false);
3470      const currentPointerTypeRef = React23.useRef("");
3471      const touchStateRef = React23.useRef(null);
3472      const cancelDismissOnEndTimeout = useTimeout();
3473      const clearInsideReactTreeTimeout = useTimeout();
3474      const clearInsideReactTree = useStableCallback(() => {
3475        clearInsideReactTreeTimeout.clear();
3476        dataRef.current.insideReactTree = false;
3477      });
3478      const hasBlockingChild = useStableCallback((bubbleKey) => {
3479        const nodeId = dataRef.current.floatingContext?.nodeId;
3480        const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];
3481        return children.some((child) => child.context?.open && !child.context.dataRef.current[bubbleKey]);
3482      });
3483      const isEventWithinOwnElements = useStableCallback((event) => {
3484        return isEventTargetWithin(event, store2.select("floatingElement")) || isEventTargetWithin(event, store2.select("domReferenceElement"));
3485      });
3486      const closeOnReferencePress = useStableCallback((event) => {
3487        if (!referencePress()) {
3488          return;
3489        }
3490        store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent));
3491      });
3492      const closeOnEscapeKeyDown = useStableCallback((event) => {
3493        if (!open || !enabled || !escapeKey2 || event.key !== "Escape") {
3494          return;
3495        }
3496        if (isComposingRef.current) {
3497          return;
3498        }
3499        if (!escapeKeyBubbles && hasBlockingChild("__escapeKeyBubbles")) {
3500          return;
3501        }
3502        const native = isReactEvent(event) ? event.nativeEvent : event;
3503        const eventDetails = createChangeEventDetails(reason_parts_exports.escapeKey, native);
3504        store2.setOpen(false, eventDetails);
3505        if (!eventDetails.isCanceled) {
3506          event.preventDefault();
3507        }
3508        if (!escapeKeyBubbles && !eventDetails.isPropagationAllowed) {
3509          event.stopPropagation();
3510        }
3511      });
3512      const markInsideReactTree = useStableCallback(() => {
3513        dataRef.current.insideReactTree = true;
3514        clearInsideReactTreeTimeout.start(0, clearInsideReactTree);
3515      });
3516      const markPressStartedInsideReactTree = useStableCallback((event) => {
3517        if (!open || !enabled || event.button !== 0) {
3518          return;
3519        }
3520        const target = getTarget(event.nativeEvent);
3521        if (!contains(store2.select("floatingElement"), target)) {
3522          return;
3523        }
3524        if (!pressStartedInsideRef.current) {
3525          pressStartedInsideRef.current = true;
3526          pressStartPreventedRef.current = false;
3527        }
3528      });
3529      const markInsidePressStartPrevented = useStableCallback((event) => {
3530        if (!open || !enabled) {
3531          return;
3532        }
3533        if (!(event.defaultPrevented || event.nativeEvent.defaultPrevented)) {
3534          return;
3535        }
3536        if (pressStartedInsideRef.current) {
3537          pressStartPreventedRef.current = true;
3538        }
3539      });
3540      React23.useEffect(() => {
3541        if (!open || !enabled) {
3542          return clearInsideReactTree;
3543        }
3544        dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;
3545        dataRef.current.__outsidePressBubbles = outsidePressBubbles;
3546        const compositionTimeout = new Timeout();
3547        const preventedPressSuppressionTimeout = new Timeout();
3548        function handleCompositionStart() {
3549          compositionTimeout.clear();
3550          isComposingRef.current = true;
3551        }
3552        function handleCompositionEnd() {
3553          compositionTimeout.start(
3554            // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
3555            // Only apply to WebKit for the test to remain 0ms.
3556            parts_exports.engine.webkit ? 5 : 0,
3557            () => {
3558              isComposingRef.current = false;
3559            }
3560          );
3561        }
3562        function suppressImmediateOutsideClickAfterPreventedStart() {
3563          suppressNextOutsideClickRef.current = true;
3564          preventedPressSuppressionTimeout.start(0, () => {
3565            suppressNextOutsideClickRef.current = false;
3566          });
3567        }
3568        function resetPressStartState() {
3569          pressStartedInsideRef.current = false;
3570          pressStartPreventedRef.current = false;
3571        }
3572        function getOutsidePressEvent() {
3573          const type = currentPointerTypeRef.current;
3574          const computedType = type === "pen" || !type ? "mouse" : type;
3575          const outsidePressEventValue = getOutsidePressEventProp();
3576          const resolved = typeof outsidePressEventValue === "function" ? outsidePressEventValue() : outsidePressEventValue;
3577          if (typeof resolved === "string") {
3578            return resolved;
3579          }
3580          return resolved[computedType];
3581        }
3582        function shouldIgnoreEvent(event) {
3583          const computedOutsidePressEvent = getOutsidePressEvent();
3584          return computedOutsidePressEvent === "intentional" && event.type !== "click" || computedOutsidePressEvent === "sloppy" && event.type === "click";
3585        }
3586        function isEventWithinFloatingTree(event) {
3587          const nodeId = dataRef.current.floatingContext?.nodeId;
3588          const targetIsInsideChildren = tree && getNodeChildren(tree.nodesRef.current, nodeId).some((node) => isEventTargetWithin(event, node.context?.elements.floating));
3589          return isEventWithinOwnElements(event) || targetIsInsideChildren;
3590        }
3591        function closeOnPressOutside(event) {
3592          if (shouldIgnoreEvent(event)) {
3593            if (event.type !== "click" && !isEventWithinOwnElements(event)) {
3594              preventedPressSuppressionTimeout.clear();
3595              suppressNextOutsideClickRef.current = false;
3596            }
3597            clearInsideReactTree();
3598            return;
3599          }
3600          if (dataRef.current.insideReactTree) {
3601            clearInsideReactTree();
3602            return;
3603          }
3604          const target = getTarget(event);
3605          const inertSelector = `[$createAttribute("inert")}]`;
3606          const targetRoot = isElement(target) ? target.getRootNode() : null;
3607          const markers = Array.from((isShadowRoot(targetRoot) ? targetRoot : ownerDocument(store2.select("floatingElement"))).querySelectorAll(inertSelector));
3608          const triggers = store2.context.triggerElements;
3609          if (target && (triggers.hasElement(target) || triggers.hasMatchingElement((trigger) => contains(trigger, target)))) {
3610            return;
3611          }
3612          let targetRootAncestor = isElement(target) ? target : null;
3613          while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {
3614            const nextParent = getParentNode(targetRootAncestor);
3615            if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {
3616              break;
3617            }
3618            targetRootAncestor = nextParent;
3619          }
3620          if (markers.length && isElement(target) && !isRootElement(target) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
3621          !contains(target, store2.select("floatingElement")) && // If the target root element contains none of the markers, then the
3622          // element was injected after the floating element rendered.
3623          markers.every((marker) => !contains(targetRootAncestor, marker))) {
3624            return;
3625          }
3626          if (isHTMLElement(target) && !("touches" in event)) {
3627            const lastTraversableNode = isLastTraversableNode(target);
3628            const style = getComputedStyle2(target);
3629            const scrollRe = /auto|scroll/;
3630            const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);
3631            const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);
3632            const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;
3633            const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;
3634            const isRTL4 = style.direction === "rtl";
3635            const pressedVerticalScrollbar = canScrollY && (isRTL4 ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);
3636            const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;
3637            if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {
3638              return;
3639            }
3640          }
3641          if (isEventWithinFloatingTree(event)) {
3642            return;
3643          }
3644          if (getOutsidePressEvent() === "intentional" && suppressNextOutsideClickRef.current) {
3645            preventedPressSuppressionTimeout.clear();
3646            suppressNextOutsideClickRef.current = false;
3647            return;
3648          }
3649          if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
3650            return;
3651          }
3652          if (hasBlockingChild("__outsidePressBubbles")) {
3653            return;
3654          }
3655          store2.setOpen(false, createChangeEventDetails(reason_parts_exports.outsidePress, event));
3656          clearInsideReactTree();
3657        }
3658        function handlePointerDown(event) {
3659          if (getOutsidePressEvent() !== "sloppy" || event.pointerType === "touch" || !store2.select("open") || !enabled || isEventWithinOwnElements(event)) {
3660            return;
3661          }
3662          closeOnPressOutside(event);
3663        }
3664        function handleTouchStart(event) {
3665          if (getOutsidePressEvent() !== "sloppy" || !store2.select("open") || !enabled || isEventWithinOwnElements(event)) {
3666            return;
3667          }
3668          const touch = event.touches[0];
3669          if (touch) {
3670            touchStateRef.current = {
3671              startTime: Date.now(),
3672              startX: touch.clientX,
3673              startY: touch.clientY,
3674              dismissOnTouchEnd: false,
3675              dismissOnMouseDown: true
3676            };
3677            cancelDismissOnEndTimeout.start(1e3, () => {
3678              if (touchStateRef.current) {
3679                touchStateRef.current.dismissOnTouchEnd = false;
3680                touchStateRef.current.dismissOnMouseDown = false;
3681              }
3682            });
3683          }
3684        }
3685        function addTargetEventListenerOnce(event, listener) {
3686          const target = getTarget(event);
3687          if (!target) {
3688            return;
3689          }
3690          const unsubscribe2 = addEventListener(target, event.type, () => {
3691            listener(event);
3692            unsubscribe2();
3693          });
3694        }
3695        function handleTouchStartCapture(event) {
3696          currentPointerTypeRef.current = "touch";
3697          addTargetEventListenerOnce(event, handleTouchStart);
3698        }
3699        function closeOnPressOutsideCapture(event) {
3700          cancelDismissOnEndTimeout.clear();
3701          if (event.type === "pointerdown") {
3702            currentPointerTypeRef.current = event.pointerType;
3703          }
3704          if (event.type === "mousedown" && touchStateRef.current && !touchStateRef.current.dismissOnMouseDown) {
3705            return;
3706          }
3707          addTargetEventListenerOnce(event, (targetEvent) => {
3708            if (targetEvent.type === "pointerdown") {
3709              handlePointerDown(targetEvent);
3710            } else {
3711              closeOnPressOutside(targetEvent);
3712            }
3713          });
3714        }
3715        function handlePressEndCapture(event) {
3716          if (!pressStartedInsideRef.current) {
3717            return;
3718          }
3719          const pressStartedInsideDefaultPrevented = pressStartPreventedRef.current;
3720          resetPressStartState();
3721          if (getOutsidePressEvent() !== "intentional") {
3722            return;
3723          }
3724          if (event.type === "pointercancel") {
3725            if (pressStartedInsideDefaultPrevented) {
3726              suppressImmediateOutsideClickAfterPreventedStart();
3727            }
3728            return;
3729          }
3730          if (isEventWithinFloatingTree(event)) {
3731            return;
3732          }
3733          if (pressStartedInsideDefaultPrevented) {
3734            suppressImmediateOutsideClickAfterPreventedStart();
3735            return;
3736          }
3737          if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
3738            return;
3739          }
3740          preventedPressSuppressionTimeout.clear();
3741          suppressNextOutsideClickRef.current = true;
3742          clearInsideReactTree();
3743        }
3744        function handleTouchMove(event) {
3745          if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
3746            return;
3747          }
3748          const touch = event.touches[0];
3749          if (!touch) {
3750            return;
3751          }
3752          const deltaX = Math.abs(touch.clientX - touchStateRef.current.startX);
3753          const deltaY = Math.abs(touch.clientY - touchStateRef.current.startY);
3754          const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
3755          if (distance > 5) {
3756            touchStateRef.current.dismissOnTouchEnd = true;
3757          }
3758          if (distance > 10) {
3759            closeOnPressOutside(event);
3760            cancelDismissOnEndTimeout.clear();
3761            touchStateRef.current = null;
3762          }
3763        }
3764        function handleTouchMoveCapture(event) {
3765          addTargetEventListenerOnce(event, handleTouchMove);
3766        }
3767        function handleTouchEnd(event) {
3768          if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
3769            return;
3770          }
3771          if (touchStateRef.current.dismissOnTouchEnd) {
3772            closeOnPressOutside(event);
3773          }
3774          cancelDismissOnEndTimeout.clear();
3775          touchStateRef.current = null;
3776        }
3777        function handleTouchEndCapture(event) {
3778          addTargetEventListenerOnce(event, handleTouchEnd);
3779        }
3780        const doc = ownerDocument(floatingElement);
3781        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)));
3782        return () => {
3783          unsubscribe();
3784          compositionTimeout.clear();
3785          preventedPressSuppressionTimeout.clear();
3786          resetPressStartState();
3787          suppressNextOutsideClickRef.current = false;
3788          clearInsideReactTree();
3789        };
3790      }, [dataRef, floatingElement, escapeKey2, outsidePressEnabled, outsidePress2, open, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, clearInsideReactTree, getOutsidePressEventProp, hasBlockingChild, isEventWithinOwnElements, tree, store2, cancelDismissOnEndTimeout]);
3791      const reference = React23.useMemo(() => ({
3792        onKeyDown: closeOnEscapeKeyDown,
3793        onPointerDown: closeOnReferencePress,
3794        onClick: closeOnReferencePress
3795      }), [closeOnEscapeKeyDown, closeOnReferencePress]);
3796      const floating = React23.useMemo(() => ({
3797        onKeyDown: closeOnEscapeKeyDown,
3798        // `onMouseDown` may be blocked if `event.preventDefault()` is called in
3799        // `onPointerDown`, such as with <NumberField.ScrubArea>.
3800        // See https://github.com/mui/base-ui/pull/3379
3801        onPointerDown: markInsidePressStartPrevented,
3802        onMouseDown: markInsidePressStartPrevented,
3803        onClickCapture: markInsideReactTree,
3804        onMouseDownCapture(event) {
3805          markInsideReactTree();
3806          markPressStartedInsideReactTree(event);
3807        },
3808        onPointerDownCapture(event) {
3809          markInsideReactTree();
3810          markPressStartedInsideReactTree(event);
3811        },
3812        onMouseUpCapture: markInsideReactTree,
3813        onTouchEndCapture: markInsideReactTree,
3814        onTouchMoveCapture: markInsideReactTree
3815      }), [closeOnEscapeKeyDown, markInsideReactTree, markPressStartedInsideReactTree, markInsidePressStartPrevented]);
3816      return React23.useMemo(() => enabled ? {
3817        reference,
3818        floating,
3819        trigger: reference
3820      } : {}, [enabled, reference, floating]);
3821    }
3822  
3823    // node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
3824    var React31 = __toESM(require_react(), 1);
3825  
3826    // node_modules/@floating-ui/core/dist/floating-ui.core.mjs
3827    function computeCoordsFromPlacement(_ref, placement, rtl) {
3828      let {
3829        reference,
3830        floating
3831      } = _ref;
3832      const sideAxis = getSideAxis(placement);
3833      const alignmentAxis = getAlignmentAxis(placement);
3834      const alignLength = getAxisLength(alignmentAxis);
3835      const side = getSide(placement);
3836      const isVertical = sideAxis === "y";
3837      const commonX = reference.x + reference.width / 2 - floating.width / 2;
3838      const commonY = reference.y + reference.height / 2 - floating.height / 2;
3839      const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
3840      let coords;
3841      switch (side) {
3842        case "top":
3843          coords = {
3844            x: commonX,
3845            y: reference.y - floating.height
3846          };
3847          break;
3848        case "bottom":
3849          coords = {
3850            x: commonX,
3851            y: reference.y + reference.height
3852          };
3853          break;
3854        case "right":
3855          coords = {
3856            x: reference.x + reference.width,
3857            y: commonY
3858          };
3859          break;
3860        case "left":
3861          coords = {
3862            x: reference.x - floating.width,
3863            y: commonY
3864          };
3865          break;
3866        default:
3867          coords = {
3868            x: reference.x,
3869            y: reference.y
3870          };
3871      }
3872      const alignment = getAlignment(placement);
3873      if (alignment) {
3874        coords[alignmentAxis] += commonAlign * (alignment === "end" ? 1 : -1) * (rtl && isVertical ? -1 : 1);
3875      }
3876      return coords;
3877    }
3878    async function detectOverflow(state, options) {
3879      var _await$platform$isEle;
3880      if (options === void 0) {
3881        options = {};
3882      }
3883      const {
3884        x,
3885        y,
3886        platform: platform3,
3887        rects,
3888        elements,
3889        strategy
3890      } = state;
3891      const {
3892        boundary = "clippingAncestors",
3893        rootBoundary = "viewport",
3894        elementContext = "floating",
3895        altBoundary = false,
3896        padding = 0
3897      } = evaluate(options, state);
3898      const paddingObject = getPaddingObject(padding);
3899      const altContext = elementContext === "floating" ? "reference" : "floating";
3900      const element = elements[altBoundary ? altContext : elementContext];
3901      const clippingClientRect = rectToClientRect(await platform3.getClippingRect({
3902        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)),
3903        boundary,
3904        rootBoundary,
3905        strategy
3906      }));
3907      const rect = elementContext === "floating" ? {
3908        x,
3909        y,
3910        width: rects.floating.width,
3911        height: rects.floating.height
3912      } : rects.reference;
3913      const offsetParent = await (platform3.getOffsetParent == null ? void 0 : platform3.getOffsetParent(elements.floating));
3914      const offsetScale = await (platform3.isElement == null ? void 0 : platform3.isElement(offsetParent)) && await (platform3.getScale == null ? void 0 : platform3.getScale(offsetParent)) || {
3915        x: 1,
3916        y: 1
3917      };
3918      const elementClientRect = rectToClientRect(platform3.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform3.convertOffsetParentRelativeRectToViewportRelativeRect({
3919        elements,
3920        rect,
3921        offsetParent,
3922        strategy
3923      }) : rect);
3924      return {
3925        top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
3926        bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
3927        left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
3928        right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
3929      };
3930    }
3931    var MAX_RESET_COUNT = 50;
3932    var computePosition = async (reference, floating, config) => {
3933      const {
3934        placement = "bottom",
3935        strategy = "absolute",
3936        middleware = [],
3937        platform: platform3
3938      } = config;
3939      const platformWithDetectOverflow = platform3.detectOverflow ? platform3 : {
3940        ...platform3,
3941        detectOverflow
3942      };
3943      const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(floating));
3944      let rects = await platform3.getElementRects({
3945        reference,
3946        floating,
3947        strategy
3948      });
3949      let {
3950        x,
3951        y
3952      } = computeCoordsFromPlacement(rects, placement, rtl);
3953      let statefulPlacement = placement;
3954      let resetCount = 0;
3955      const middlewareData = {};
3956      for (let i = 0; i < middleware.length; i++) {
3957        const currentMiddleware = middleware[i];
3958        if (!currentMiddleware) {
3959          continue;
3960        }
3961        const {
3962          name,
3963          fn
3964        } = currentMiddleware;
3965        const {
3966          x: nextX,
3967          y: nextY,
3968          data,
3969          reset
3970        } = await fn({
3971          x,
3972          y,
3973          initialPlacement: placement,
3974          placement: statefulPlacement,
3975          strategy,
3976          middlewareData,
3977          rects,
3978          platform: platformWithDetectOverflow,
3979          elements: {
3980            reference,
3981            floating
3982          }
3983        });
3984        x = nextX != null ? nextX : x;
3985        y = nextY != null ? nextY : y;
3986        middlewareData[name] = {
3987          ...middlewareData[name],
3988          ...data
3989        };
3990        if (reset && resetCount < MAX_RESET_COUNT) {
3991          resetCount++;
3992          if (typeof reset === "object") {
3993            if (reset.placement) {
3994              statefulPlacement = reset.placement;
3995            }
3996            if (reset.rects) {
3997              rects = reset.rects === true ? await platform3.getElementRects({
3998                reference,
3999                floating,
4000                strategy
4001              }) : reset.rects;
4002            }
4003            ({
4004              x,
4005              y
4006            } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
4007          }
4008          i = -1;
4009        }
4010      }
4011      return {
4012        x,
4013        y,
4014        placement: statefulPlacement,
4015        strategy,
4016        middlewareData
4017      };
4018    };
4019    var flip = function(options) {
4020      if (options === void 0) {
4021        options = {};
4022      }
4023      return {
4024        name: "flip",
4025        options,
4026        async fn(state) {
4027          var _middlewareData$arrow, _middlewareData$flip;
4028          const {
4029            placement,
4030            middlewareData,
4031            rects,
4032            initialPlacement,
4033            platform: platform3,
4034            elements
4035          } = state;
4036          const {
4037            mainAxis: checkMainAxis = true,
4038            crossAxis: checkCrossAxis = true,
4039            fallbackPlacements: specifiedFallbackPlacements,
4040            fallbackStrategy = "bestFit",
4041            fallbackAxisSideDirection = "none",
4042            flipAlignment = true,
4043            ...detectOverflowOptions
4044          } = evaluate(options, state);
4045          if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
4046            return {};
4047          }
4048          const side = getSide(placement);
4049          const initialSideAxis = getSideAxis(initialPlacement);
4050          const isBasePlacement = getSide(initialPlacement) === initialPlacement;
4051          const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating));
4052          const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
4053          const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
4054          if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
4055            fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
4056          }
4057          const placements2 = [initialPlacement, ...fallbackPlacements];
4058          const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
4059          const overflows = [];
4060          let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
4061          if (checkMainAxis) {
4062            overflows.push(overflow[side]);
4063          }
4064          if (checkCrossAxis) {
4065            const sides2 = getAlignmentSides(placement, rects, rtl);
4066            overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
4067          }
4068          overflowsData = [...overflowsData, {
4069            placement,
4070            overflows
4071          }];
4072          if (!overflows.every((side2) => side2 <= 0)) {
4073            var _middlewareData$flip2, _overflowsData$filter;
4074            const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
4075            const nextPlacement = placements2[nextIndex];
4076            if (nextPlacement) {
4077              const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
4078              if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
4079              // overflows the main axis.
4080              overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
4081                return {
4082                  data: {
4083                    index: nextIndex,
4084                    overflows: overflowsData
4085                  },
4086                  reset: {
4087                    placement: nextPlacement
4088                  }
4089                };
4090              }
4091            }
4092            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;
4093            if (!resetPlacement) {
4094              switch (fallbackStrategy) {
4095                case "bestFit": {
4096                  var _overflowsData$filter2;
4097                  const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => {
4098                    if (hasFallbackAxisSideDirection) {
4099                      const currentSideAxis = getSideAxis(d.placement);
4100                      return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
4101                      // reading directions favoring greater width.
4102                      currentSideAxis === "y";
4103                    }
4104                    return true;
4105                  }).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];
4106                  if (placement2) {
4107                    resetPlacement = placement2;
4108                  }
4109                  break;
4110                }
4111                case "initialPlacement":
4112                  resetPlacement = initialPlacement;
4113                  break;
4114              }
4115            }
4116            if (placement !== resetPlacement) {
4117              return {
4118                reset: {
4119                  placement: resetPlacement
4120                }
4121              };
4122            }
4123          }
4124          return {};
4125        }
4126      };
4127    };
4128    var originSides = /* @__PURE__ */ new Set(["left", "top"]);
4129    async function convertValueToCoords(state, options) {
4130      const {
4131        placement,
4132        platform: platform3,
4133        elements
4134      } = state;
4135      const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating));
4136      const side = getSide(placement);
4137      const alignment = getAlignment(placement);
4138      const isVertical = getSideAxis(placement) === "y";
4139      const mainAxisMulti = originSides.has(side) ? -1 : 1;
4140      const crossAxisMulti = rtl && isVertical ? -1 : 1;
4141      const rawValue = evaluate(options, state);
4142      let {
4143        mainAxis,
4144        crossAxis,
4145        alignmentAxis
4146      } = typeof rawValue === "number" ? {
4147        mainAxis: rawValue,
4148        crossAxis: 0,
4149        alignmentAxis: null
4150      } : {
4151        mainAxis: rawValue.mainAxis || 0,
4152        crossAxis: rawValue.crossAxis || 0,
4153        alignmentAxis: rawValue.alignmentAxis
4154      };
4155      if (alignment && typeof alignmentAxis === "number") {
4156        crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
4157      }
4158      return isVertical ? {
4159        x: crossAxis * crossAxisMulti,
4160        y: mainAxis * mainAxisMulti
4161      } : {
4162        x: mainAxis * mainAxisMulti,
4163        y: crossAxis * crossAxisMulti
4164      };
4165    }
4166    var offset = function(options) {
4167      if (options === void 0) {
4168        options = 0;
4169      }
4170      return {
4171        name: "offset",
4172        options,
4173        async fn(state) {
4174          var _middlewareData$offse, _middlewareData$arrow;
4175          const {
4176            x,
4177            y,
4178            placement,
4179            middlewareData
4180          } = state;
4181          const diffCoords = await convertValueToCoords(state, options);
4182          if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
4183            return {};
4184          }
4185          return {
4186            x: x + diffCoords.x,
4187            y: y + diffCoords.y,
4188            data: {
4189              ...diffCoords,
4190              placement
4191            }
4192          };
4193        }
4194      };
4195    };
4196    var shift = function(options) {
4197      if (options === void 0) {
4198        options = {};
4199      }
4200      return {
4201        name: "shift",
4202        options,
4203        async fn(state) {
4204          const {
4205            x,
4206            y,
4207            placement,
4208            platform: platform3
4209          } = state;
4210          const {
4211            mainAxis: checkMainAxis = true,
4212            crossAxis: checkCrossAxis = false,
4213            limiter = {
4214              fn: (_ref) => {
4215                let {
4216                  x: x2,
4217                  y: y2
4218                } = _ref;
4219                return {
4220                  x: x2,
4221                  y: y2
4222                };
4223              }
4224            },
4225            ...detectOverflowOptions
4226          } = evaluate(options, state);
4227          const coords = {
4228            x,
4229            y
4230          };
4231          const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
4232          const crossAxis = getSideAxis(placement);
4233          const mainAxis = getOppositeAxis(crossAxis);
4234          let mainAxisCoord = coords[mainAxis];
4235          let crossAxisCoord = coords[crossAxis];
4236          const clampCoord = (axis, coord) => clamp(coord + overflow[axis === "y" ? "top" : "left"], coord, coord - overflow[axis === "y" ? "bottom" : "right"]);
4237          if (checkMainAxis) {
4238            mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
4239          }
4240          if (checkCrossAxis) {
4241            crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
4242          }
4243          const limitedCoords = limiter.fn({
4244            ...state,
4245            [mainAxis]: mainAxisCoord,
4246            [crossAxis]: crossAxisCoord
4247          });
4248          return {
4249            ...limitedCoords,
4250            data: {
4251              x: limitedCoords.x - x,
4252              y: limitedCoords.y - y,
4253              enabled: {
4254                [mainAxis]: checkMainAxis,
4255                [crossAxis]: checkCrossAxis
4256              }
4257            }
4258          };
4259        }
4260      };
4261    };
4262    var limitShift = function(options) {
4263      if (options === void 0) {
4264        options = {};
4265      }
4266      return {
4267        options,
4268        fn(state) {
4269          var _rawOffset$mainAxis, _rawOffset$crossAxis;
4270          const {
4271            x,
4272            y,
4273            placement,
4274            rects,
4275            middlewareData
4276          } = state;
4277          const {
4278            offset: offset4 = 0,
4279            mainAxis: checkMainAxis = true,
4280            crossAxis: checkCrossAxis = true
4281          } = evaluate(options, state);
4282          const coords = {
4283            x,
4284            y
4285          };
4286          const crossAxis = getSideAxis(placement);
4287          const mainAxis = getOppositeAxis(crossAxis);
4288          let mainAxisCoord = coords[mainAxis];
4289          let crossAxisCoord = coords[crossAxis];
4290          const rawOffset = evaluate(offset4, state);
4291          const computedOffset = typeof rawOffset === "number" ? {
4292            mainAxis: rawOffset,
4293            crossAxis: 0
4294          } : {
4295            mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,
4296            crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0
4297          };
4298          if (checkMainAxis) {
4299            const len = mainAxis === "y" ? "height" : "width";
4300            const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
4301            const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
4302            if (mainAxisCoord < limitMin) {
4303              mainAxisCoord = limitMin;
4304            } else if (mainAxisCoord > limitMax) {
4305              mainAxisCoord = limitMax;
4306            }
4307          }
4308          if (checkCrossAxis) {
4309            var _middlewareData$offse, _middlewareData$offse2;
4310            const len = mainAxis === "y" ? "width" : "height";
4311            const isOriginSide = originSides.has(getSide(placement));
4312            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);
4313            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);
4314            if (crossAxisCoord < limitMin) {
4315              crossAxisCoord = limitMin;
4316            } else if (crossAxisCoord > limitMax) {
4317              crossAxisCoord = limitMax;
4318            }
4319          }
4320          return {
4321            [mainAxis]: mainAxisCoord,
4322            [crossAxis]: crossAxisCoord
4323          };
4324        }
4325      };
4326    };
4327    var size = function(options) {
4328      if (options === void 0) {
4329        options = {};
4330      }
4331      return {
4332        name: "size",
4333        options,
4334        async fn(state) {
4335          const {
4336            placement,
4337            rects,
4338            platform: platform3,
4339            elements
4340          } = state;
4341          const {
4342            apply = () => {
4343            },
4344            ...detectOverflowOptions
4345          } = evaluate(options, state);
4346          const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
4347          const side = getSide(placement);
4348          const alignment = getAlignment(placement);
4349          const isYAxis = getSideAxis(placement) === "y";
4350          const {
4351            width,
4352            height
4353          } = rects.floating;
4354          let heightSide;
4355          let widthSide;
4356          if (side === "top" || side === "bottom") {
4357            heightSide = side;
4358            widthSide = alignment === (await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
4359          } else {
4360            widthSide = side;
4361            heightSide = alignment === "end" ? "top" : "bottom";
4362          }
4363          const maximumClippingHeight = height - overflow.top - overflow.bottom;
4364          const maximumClippingWidth = width - overflow.left - overflow.right;
4365          const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
4366          const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
4367          const shiftData = state.middlewareData.shift;
4368          const noShift = !shiftData;
4369          let availableHeight = overflowAvailableHeight;
4370          let availableWidth = overflowAvailableWidth;
4371          if (shiftData != null && shiftData.enabled.x) {
4372            availableWidth = maximumClippingWidth;
4373          }
4374          if (shiftData != null && shiftData.enabled.y) {
4375            availableHeight = maximumClippingHeight;
4376          }
4377          if (noShift && !alignment) {
4378            if (isYAxis) {
4379              availableWidth = width - 2 * max(overflow.left, overflow.right);
4380            } else {
4381              availableHeight = height - 2 * max(overflow.top, overflow.bottom);
4382            }
4383          }
4384          await apply({
4385            ...state,
4386            availableWidth,
4387            availableHeight
4388          });
4389          const nextDimensions = await platform3.getDimensions(elements.floating);
4390          if (width !== nextDimensions.width || height !== nextDimensions.height) {
4391            return {
4392              reset: {
4393                rects: true
4394              }
4395            };
4396          }
4397          return {};
4398        }
4399      };
4400    };
4401  
4402    // node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
4403    function getCssDimensions(element) {
4404      const css = getComputedStyle2(element);
4405      let width = parseFloat(css.width) || 0;
4406      let height = parseFloat(css.height) || 0;
4407      const hasOffset = isHTMLElement(element);
4408      const offsetWidth = hasOffset ? element.offsetWidth : width;
4409      const offsetHeight = hasOffset ? element.offsetHeight : height;
4410      const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
4411      if (shouldFallback) {
4412        width = offsetWidth;
4413        height = offsetHeight;
4414      }
4415      return {
4416        width,
4417        height,
4418        $: shouldFallback
4419      };
4420    }
4421    function unwrapElement(element) {
4422      return !isElement(element) ? element.contextElement : element;
4423    }
4424    function getScale(element) {
4425      const domElement = unwrapElement(element);
4426      if (!isHTMLElement(domElement)) {
4427        return createCoords(1);
4428      }
4429      const rect = domElement.getBoundingClientRect();
4430      const {
4431        width,
4432        height,
4433        $
4434      } = getCssDimensions(domElement);
4435      let x = ($ ? round(rect.width) : rect.width) / width;
4436      let y = ($ ? round(rect.height) : rect.height) / height;
4437      if (!x || !Number.isFinite(x)) {
4438        x = 1;
4439      }
4440      if (!y || !Number.isFinite(y)) {
4441        y = 1;
4442      }
4443      return {
4444        x,
4445        y
4446      };
4447    }
4448    var noOffsets = /* @__PURE__ */ createCoords(0);
4449    function getVisualOffsets(element) {
4450      const win = getWindow(element);
4451      if (!isWebKit() || !win.visualViewport) {
4452        return noOffsets;
4453      }
4454      return {
4455        x: win.visualViewport.offsetLeft,
4456        y: win.visualViewport.offsetTop
4457      };
4458    }
4459    function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
4460      if (isFixed === void 0) {
4461        isFixed = false;
4462      }
4463      return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
4464    }
4465    function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
4466      if (includeScale === void 0) {
4467        includeScale = false;
4468      }
4469      if (isFixedStrategy === void 0) {
4470        isFixedStrategy = false;
4471      }
4472      const clientRect = element.getBoundingClientRect();
4473      const domElement = unwrapElement(element);
4474      let scale = createCoords(1);
4475      if (includeScale) {
4476        if (offsetParent) {
4477          if (isElement(offsetParent)) {
4478            scale = getScale(offsetParent);
4479          }
4480        } else {
4481          scale = getScale(element);
4482        }
4483      }
4484      const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
4485      let x = (clientRect.left + visualOffsets.x) / scale.x;
4486      let y = (clientRect.top + visualOffsets.y) / scale.y;
4487      let width = clientRect.width / scale.x;
4488      let height = clientRect.height / scale.y;
4489      if (domElement && offsetParent) {
4490        const win = getWindow(domElement);
4491        const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
4492        let currentWin = win;
4493        let currentIFrame = getFrameElement(currentWin);
4494        while (currentIFrame && offsetWin !== currentWin) {
4495          const iframeScale = getScale(currentIFrame);
4496          const iframeRect = currentIFrame.getBoundingClientRect();
4497          const css = getComputedStyle2(currentIFrame);
4498          const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
4499          const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
4500          x *= iframeScale.x;
4501          y *= iframeScale.y;
4502          width *= iframeScale.x;
4503          height *= iframeScale.y;
4504          x += left;
4505          y += top;
4506          currentWin = getWindow(currentIFrame);
4507          currentIFrame = getFrameElement(currentWin);
4508        }
4509      }
4510      return rectToClientRect({
4511        width,
4512        height,
4513        x,
4514        y
4515      });
4516    }
4517    function getWindowScrollBarX(element, rect) {
4518      const leftScroll = getNodeScroll(element).scrollLeft;
4519      if (!rect) {
4520        return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
4521      }
4522      return rect.left + leftScroll;
4523    }
4524    function getHTMLOffset(documentElement, scroll) {
4525      const htmlRect = documentElement.getBoundingClientRect();
4526      const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
4527      const y = htmlRect.top + scroll.scrollTop;
4528      return {
4529        x,
4530        y
4531      };
4532    }
4533    function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
4534      let {
4535        elements,
4536        rect,
4537        offsetParent,
4538        strategy
4539      } = _ref;
4540      const isFixed = strategy === "fixed";
4541      const documentElement = getDocumentElement(offsetParent);
4542      const topLayer = elements ? isTopLayer(elements.floating) : false;
4543      if (offsetParent === documentElement || topLayer && isFixed) {
4544        return rect;
4545      }
4546      let scroll = {
4547        scrollLeft: 0,
4548        scrollTop: 0
4549      };
4550      let scale = createCoords(1);
4551      const offsets = createCoords(0);
4552      const isOffsetParentAnElement = isHTMLElement(offsetParent);
4553      if (isOffsetParentAnElement || !isFixed) {
4554        if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
4555          scroll = getNodeScroll(offsetParent);
4556        }
4557        if (isOffsetParentAnElement) {
4558          const offsetRect = getBoundingClientRect(offsetParent);
4559          scale = getScale(offsetParent);
4560          offsets.x = offsetRect.x + offsetParent.clientLeft;
4561          offsets.y = offsetRect.y + offsetParent.clientTop;
4562        }
4563      }
4564      const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
4565      return {
4566        width: rect.width * scale.x,
4567        height: rect.height * scale.y,
4568        x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
4569        y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
4570      };
4571    }
4572    function getClientRects(element) {
4573      return element.getClientRects ? Array.from(element.getClientRects()) : [];
4574    }
4575    function getDocumentRect(html) {
4576      const scroll = getNodeScroll(html);
4577      const body = html.ownerDocument.body;
4578      const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
4579      const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
4580      let x = -scroll.scrollLeft + getWindowScrollBarX(html);
4581      const y = -scroll.scrollTop;
4582      if (getComputedStyle2(body).direction === "rtl") {
4583        x += max(html.clientWidth, body.clientWidth) - width;
4584      }
4585      return {
4586        width,
4587        height,
4588        x,
4589        y
4590      };
4591    }
4592    var SCROLLBAR_MAX = 25;
4593    function getViewportRect(element, strategy, rootBoundary) {
4594      if (rootBoundary === void 0) {
4595        rootBoundary = "viewport";
4596      }
4597      const isLayoutViewport = rootBoundary === "layoutViewport";
4598      const win = getWindow(element);
4599      const html = getDocumentElement(element);
4600      const visualViewport = win.visualViewport;
4601      let width = html.clientWidth;
4602      let height = html.clientHeight;
4603      let x = 0;
4604      let y = 0;
4605      if (visualViewport) {
4606        const layoutRelativeClientCoords = !isWebKit() || strategy === "fixed";
4607        if (isLayoutViewport) {
4608          if (!layoutRelativeClientCoords) {
4609            x = -visualViewport.offsetLeft;
4610            y = -visualViewport.offsetTop;
4611          }
4612        } else {
4613          width = visualViewport.width;
4614          height = visualViewport.height;
4615          if (layoutRelativeClientCoords) {
4616            x = visualViewport.offsetLeft;
4617            y = visualViewport.offsetTop;
4618          }
4619        }
4620      }
4621      const windowScrollbarX = getWindowScrollBarX(html);
4622      if (windowScrollbarX <= 0) {
4623        const doc = html.ownerDocument;
4624        const body = doc.body;
4625        const bodyStyles = getComputedStyle(body);
4626        const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
4627        const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
4628        const gutter = getComputedStyle(html).scrollbarGutter === "stable both-edges" ? reservedWidth / 2 : reservedWidth;
4629        if (gutter <= SCROLLBAR_MAX) {
4630          width -= gutter;
4631        }
4632      }
4633      return {
4634        width,
4635        height,
4636        x,
4637        y
4638      };
4639    }
4640    function getInnerBoundingClientRect(element, strategy) {
4641      const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
4642      const top = clientRect.top + element.clientTop;
4643      const left = clientRect.left + element.clientLeft;
4644      const scale = getScale(element);
4645      const width = element.clientWidth * scale.x;
4646      const height = element.clientHeight * scale.y;
4647      const x = left * scale.x;
4648      const y = top * scale.y;
4649      return {
4650        width,
4651        height,
4652        x,
4653        y
4654      };
4655    }
4656    function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
4657      let rect;
4658      if (clippingAncestor === "viewport" || clippingAncestor === "layoutViewport") {
4659        rect = getViewportRect(element, strategy, clippingAncestor);
4660      } else if (clippingAncestor === "document") {
4661        rect = getDocumentRect(getDocumentElement(element));
4662      } else if (isElement(clippingAncestor)) {
4663        rect = getInnerBoundingClientRect(clippingAncestor, strategy);
4664      } else {
4665        const visualOffsets = getVisualOffsets(element);
4666        rect = {
4667          x: clippingAncestor.x - visualOffsets.x,
4668          y: clippingAncestor.y - visualOffsets.y,
4669          width: clippingAncestor.width,
4670          height: clippingAncestor.height
4671        };
4672      }
4673      return rectToClientRect(rect);
4674    }
4675    function getClippingElementAncestors(element, cache) {
4676      const cachedResult = cache.get(element);
4677      if (cachedResult) {
4678        return cachedResult;
4679      }
4680      let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
4681      let lastKeptComputedStyle = null;
4682      const elementIsFixed = getComputedStyle2(element).position === "fixed";
4683      let currentNode = elementIsFixed ? getParentNode(element) : element;
4684      while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
4685        const computedStyle = getComputedStyle2(currentNode);
4686        const currentNodeIsContaining = isContainingBlock(currentNode);
4687        const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? "fixed" : "";
4688        const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === "fixed" || lastPosition === "absolute" && computedStyle.position === "static");
4689        if (shouldDropCurrentNode) {
4690          result = result.filter((ancestor) => ancestor !== currentNode);
4691        } else {
4692          lastKeptComputedStyle = computedStyle;
4693        }
4694        currentNode = getParentNode(currentNode);
4695      }
4696      cache.set(element, result);
4697      return result;
4698    }
4699    function getClippingRect(_ref) {
4700      let {
4701        element,
4702        boundary,
4703        rootBoundary,
4704        strategy
4705      } = _ref;
4706      const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
4707      const clippingAncestors = [...elementClippingAncestors, rootBoundary];
4708      const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
4709      let top = firstRect.top;
4710      let right = firstRect.right;
4711      let bottom = firstRect.bottom;
4712      let left = firstRect.left;
4713      for (let i = 1; i < clippingAncestors.length; i++) {
4714        const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
4715        top = max(rect.top, top);
4716        right = min(rect.right, right);
4717        bottom = min(rect.bottom, bottom);
4718        left = max(rect.left, left);
4719      }
4720      return {
4721        width: right - left,
4722        height: bottom - top,
4723        x: left,
4724        y: top
4725      };
4726    }
4727    function getDimensions2(element) {
4728      const {
4729        width,
4730        height
4731      } = getCssDimensions(element);
4732      return {
4733        width,
4734        height
4735      };
4736    }
4737    function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
4738      const isOffsetParentAnElement = isHTMLElement(offsetParent);
4739      const documentElement = getDocumentElement(offsetParent);
4740      const isFixed = strategy === "fixed";
4741      const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
4742      let scroll = {
4743        scrollLeft: 0,
4744        scrollTop: 0
4745      };
4746      const offsets = createCoords(0);
4747      if (isOffsetParentAnElement || !isFixed) {
4748        if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
4749          scroll = getNodeScroll(offsetParent);
4750        }
4751        if (isOffsetParentAnElement) {
4752          const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
4753          offsets.x = offsetRect.x + offsetParent.clientLeft;
4754          offsets.y = offsetRect.y + offsetParent.clientTop;
4755        }
4756      }
4757      if (!isOffsetParentAnElement && documentElement) {
4758        offsets.x = getWindowScrollBarX(documentElement);
4759      }
4760      const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
4761      const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
4762      const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
4763      return {
4764        x,
4765        y,
4766        width: rect.width,
4767        height: rect.height
4768      };
4769    }
4770    function isStaticPositioned(element) {
4771      return getComputedStyle2(element).position === "static";
4772    }
4773    function getTrueOffsetParent(element, polyfill) {
4774      if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") {
4775        return null;
4776      }
4777      if (polyfill) {
4778        return polyfill(element);
4779      }
4780      let rawOffsetParent = element.offsetParent;
4781      if (getDocumentElement(element) === rawOffsetParent) {
4782        rawOffsetParent = rawOffsetParent.ownerDocument.body;
4783      }
4784      return rawOffsetParent;
4785    }
4786    function getOffsetParent(element, polyfill) {
4787      const win = getWindow(element);
4788      if (isTopLayer(element)) {
4789        return win;
4790      }
4791      if (!isHTMLElement(element)) {
4792        let svgOffsetParent = getParentNode(element);
4793        while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
4794          if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
4795            return svgOffsetParent;
4796          }
4797          svgOffsetParent = getParentNode(svgOffsetParent);
4798        }
4799        return win;
4800      }
4801      let offsetParent = getTrueOffsetParent(element, polyfill);
4802      while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
4803        offsetParent = getTrueOffsetParent(offsetParent, polyfill);
4804      }
4805      if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
4806        return win;
4807      }
4808      return offsetParent || getContainingBlock(element) || win;
4809    }
4810    var getElementRects = async function(data) {
4811      const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
4812      const getDimensionsFn = this.getDimensions;
4813      const floatingDimensions = await getDimensionsFn(data.floating);
4814      return {
4815        reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
4816        floating: {
4817          x: 0,
4818          y: 0,
4819          width: floatingDimensions.width,
4820          height: floatingDimensions.height
4821        }
4822      };
4823    };
4824    function isRTL(element) {
4825      return getComputedStyle2(element).direction === "rtl";
4826    }
4827    var platform2 = {
4828      convertOffsetParentRelativeRectToViewportRelativeRect,
4829      getDocumentElement,
4830      getClippingRect,
4831      getOffsetParent,
4832      getElementRects,
4833      getClientRects,
4834      getDimensions: getDimensions2,
4835      getScale,
4836      isElement,
4837      isRTL
4838    };
4839    function rectsAreEqual(a, b) {
4840      return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
4841    }
4842    function observeMove(element, onMove, ancestorResize) {
4843      let io = null;
4844      let timeoutId;
4845      const root = getDocumentElement(element);
4846      function cleanup() {
4847        var _io;
4848        clearTimeout(timeoutId);
4849        (_io = io) == null || _io.disconnect();
4850        io = null;
4851      }
4852      function refresh(skip, threshold) {
4853        if (skip === void 0) {
4854          skip = false;
4855        }
4856        if (threshold === void 0) {
4857          threshold = 1;
4858        }
4859        cleanup();
4860        const elementRectForRootMargin = element.getBoundingClientRect();
4861        const {
4862          left,
4863          top,
4864          width,
4865          height
4866        } = elementRectForRootMargin;
4867        if (!skip) {
4868          onMove();
4869        }
4870        if (!width || !height) {
4871          return;
4872        }
4873        const insetTop = floor(top);
4874        const insetRight = floor(root.clientWidth - (left + width));
4875        const insetBottom = floor(root.clientHeight - (top + height));
4876        const insetLeft = floor(left);
4877        const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
4878        const options = {
4879          rootMargin,
4880          threshold: max(0, min(1, threshold)) || 1
4881        };
4882        let isFirstUpdate = true;
4883        function handleObserve(entries) {
4884          const ratio = entries[0].intersectionRatio;
4885          if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
4886            return refresh();
4887          }
4888          if (ratio !== threshold) {
4889            if (!isFirstUpdate) {
4890              return refresh();
4891            }
4892            if (!ratio) {
4893              timeoutId = setTimeout(() => {
4894                refresh(false, 1e-7);
4895              }, 1e3);
4896            } else {
4897              refresh(false, ratio);
4898            }
4899          }
4900          isFirstUpdate = false;
4901        }
4902        try {
4903          io = new IntersectionObserver(handleObserve, {
4904            ...options,
4905            // Handle <iframe>s
4906            root: root.ownerDocument
4907          });
4908        } catch (_e) {
4909          io = new IntersectionObserver(handleObserve, options);
4910        }
4911        io.observe(element);
4912      }
4913      const win = getWindow(element);
4914      const handleResize = () => refresh(ancestorResize);
4915      win.addEventListener("resize", handleResize);
4916      refresh(true);
4917      return () => {
4918        win.removeEventListener("resize", handleResize);
4919        cleanup();
4920      };
4921    }
4922    function autoUpdate(reference, floating, update2, options) {
4923      if (options === void 0) {
4924        options = {};
4925      }
4926      const {
4927        ancestorScroll = true,
4928        ancestorResize = true,
4929        elementResize = typeof ResizeObserver === "function",
4930        layoutShift = typeof IntersectionObserver === "function",
4931        animationFrame = false
4932      } = options;
4933      const referenceEl = unwrapElement(reference);
4934      const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
4935      ancestors.forEach((ancestor) => {
4936        ancestorScroll && ancestor.addEventListener("scroll", update2);
4937        ancestorResize && ancestor.addEventListener("resize", update2);
4938      });
4939      const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update2, ancestorResize) : null;
4940      let reobserveFrame = -1;
4941      let resizeObserver = null;
4942      if (elementResize) {
4943        resizeObserver = new ResizeObserver((_ref) => {
4944          let [firstEntry] = _ref;
4945          if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
4946            resizeObserver.unobserve(floating);
4947            cancelAnimationFrame(reobserveFrame);
4948            reobserveFrame = requestAnimationFrame(() => {
4949              var _resizeObserver;
4950              (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
4951            });
4952          }
4953          update2();
4954        });
4955        if (referenceEl && !animationFrame) {
4956          resizeObserver.observe(referenceEl);
4957        }
4958        if (floating) {
4959          resizeObserver.observe(floating);
4960        }
4961      }
4962      let frameId;
4963      let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
4964      if (animationFrame) {
4965        frameLoop();
4966      }
4967      function frameLoop() {
4968        const nextRefRect = getBoundingClientRect(reference);
4969        if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
4970          update2();
4971        }
4972        prevRefRect = nextRefRect;
4973        frameId = requestAnimationFrame(frameLoop);
4974      }
4975      update2();
4976      return () => {
4977        var _resizeObserver2;
4978        ancestors.forEach((ancestor) => {
4979          ancestorScroll && ancestor.removeEventListener("scroll", update2);
4980          ancestorResize && ancestor.removeEventListener("resize", update2);
4981        });
4982        cleanupIo == null || cleanupIo();
4983        (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
4984        resizeObserver = null;
4985        if (animationFrame) {
4986          cancelAnimationFrame(frameId);
4987        }
4988      };
4989    }
4990    var offset2 = offset;
4991    var shift2 = shift;
4992    var flip2 = flip;
4993    var size2 = size;
4994    var limitShift2 = limitShift;
4995    var computePosition2 = (reference, floating, options) => {
4996      const cache = /* @__PURE__ */ new Map();
4997      const mergedOptions = options != null ? options : {};
4998      const platformWithCache = {
4999        ...platform2,
5000        ...mergedOptions.platform,
5001        _c: cache
5002      };
5003      return computePosition(reference, floating, {
5004        ...mergedOptions,
5005        platform: platformWithCache
5006      });
5007    };
5008  
5009    // node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
5010    var React24 = __toESM(require_react(), 1);
5011    var import_react2 = __toESM(require_react(), 1);
5012    var ReactDOM3 = __toESM(require_react_dom(), 1);
5013    var isClient = typeof document !== "undefined";
5014    var noop2 = function noop3() {
5015    };
5016    var index = isClient ? import_react2.useLayoutEffect : noop2;
5017    function deepEqual(a, b) {
5018      if (a === b) {
5019        return true;
5020      }
5021      if (typeof a !== typeof b) {
5022        return false;
5023      }
5024      if (typeof a === "function" && a.toString() === b.toString()) {
5025        return true;
5026      }
5027      let length;
5028      let i;
5029      let keys;
5030      if (a && b && typeof a === "object") {
5031        if (Array.isArray(a)) {
5032          length = a.length;
5033          if (length !== b.length) return false;
5034          for (i = length; i-- !== 0; ) {
5035            if (!deepEqual(a[i], b[i])) {
5036              return false;
5037            }
5038          }
5039          return true;
5040        }
5041        keys = Object.keys(a);
5042        length = keys.length;
5043        if (length !== Object.keys(b).length) {
5044          return false;
5045        }
5046        for (i = length; i-- !== 0; ) {
5047          if (!{}.hasOwnProperty.call(b, keys[i])) {
5048            return false;
5049          }
5050        }
5051        for (i = length; i-- !== 0; ) {
5052          const key = keys[i];
5053          if (key === "_owner" && a.$$typeof) {
5054            continue;
5055          }
5056          if (!deepEqual(a[key], b[key])) {
5057            return false;
5058          }
5059        }
5060        return true;
5061      }
5062      return a !== a && b !== b;
5063    }
5064    function getDPR(element) {
5065      if (typeof window === "undefined") {
5066        return 1;
5067      }
5068      const win = element.ownerDocument.defaultView || window;
5069      return win.devicePixelRatio || 1;
5070    }
5071    function roundByDPR(element, value) {
5072      const dpr = getDPR(element);
5073      return Math.round(value * dpr) / dpr;
5074    }
5075    function useLatestRef(value) {
5076      const ref = React24.useRef(value);
5077      index(() => {
5078        ref.current = value;
5079      });
5080      return ref;
5081    }
5082    function useFloating(options) {
5083      if (options === void 0) {
5084        options = {};
5085      }
5086      const {
5087        placement = "bottom",
5088        strategy = "absolute",
5089        middleware = [],
5090        platform: platform3,
5091        elements: {
5092          reference: externalReference,
5093          floating: externalFloating
5094        } = {},
5095        transform = true,
5096        whileElementsMounted,
5097        open
5098      } = options;
5099      const [data, setData] = React24.useState({
5100        x: 0,
5101        y: 0,
5102        strategy,
5103        placement,
5104        middlewareData: {},
5105        isPositioned: false
5106      });
5107      const [latestMiddleware, setLatestMiddleware] = React24.useState(middleware);
5108      if (!deepEqual(latestMiddleware, middleware)) {
5109        setLatestMiddleware(middleware);
5110      }
5111      const [_reference, _setReference] = React24.useState(null);
5112      const [_floating, _setFloating] = React24.useState(null);
5113      const setReference = React24.useCallback((node) => {
5114        if (node !== referenceRef.current) {
5115          referenceRef.current = node;
5116          _setReference(node);
5117        }
5118      }, []);
5119      const setFloating = React24.useCallback((node) => {
5120        if (node !== floatingRef.current) {
5121          floatingRef.current = node;
5122          _setFloating(node);
5123        }
5124      }, []);
5125      const referenceEl = externalReference || _reference;
5126      const floatingEl = externalFloating || _floating;
5127      const referenceRef = React24.useRef(null);
5128      const floatingRef = React24.useRef(null);
5129      const dataRef = React24.useRef(data);
5130      const hasWhileElementsMounted = whileElementsMounted != null;
5131      const whileElementsMountedRef = useLatestRef(whileElementsMounted);
5132      const platformRef = useLatestRef(platform3);
5133      const openRef = useLatestRef(open);
5134      const update2 = React24.useCallback(() => {
5135        if (!referenceRef.current || !floatingRef.current) {
5136          return;
5137        }
5138        const config = {
5139          placement,
5140          strategy,
5141          middleware: latestMiddleware
5142        };
5143        if (platformRef.current) {
5144          config.platform = platformRef.current;
5145        }
5146        computePosition2(referenceRef.current, floatingRef.current, config).then((data2) => {
5147          const fullData = {
5148            ...data2,
5149            // The floating element's position may be recomputed while it's closed
5150            // but still mounted (such as when transitioning out). To ensure
5151            // `isPositioned` will be `false` initially on the next open, avoid
5152            // setting it to `true` when `open === false` (must be specified).
5153            isPositioned: openRef.current !== false
5154          };
5155          if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
5156            dataRef.current = fullData;
5157            ReactDOM3.flushSync(() => {
5158              setData(fullData);
5159            });
5160          }
5161        });
5162      }, [latestMiddleware, placement, strategy, platformRef, openRef]);
5163      index(() => {
5164        if (open === false && dataRef.current.isPositioned) {
5165          dataRef.current.isPositioned = false;
5166          setData((data2) => ({
5167            ...data2,
5168            isPositioned: false
5169          }));
5170        }
5171      }, [open]);
5172      const isMountedRef = React24.useRef(false);
5173      index(() => {
5174        isMountedRef.current = true;
5175        return () => {
5176          isMountedRef.current = false;
5177        };
5178      }, []);
5179      index(() => {
5180        if (referenceEl) referenceRef.current = referenceEl;
5181        if (floatingEl) floatingRef.current = floatingEl;
5182        if (referenceEl && floatingEl) {
5183          if (whileElementsMountedRef.current) {
5184            return whileElementsMountedRef.current(referenceEl, floatingEl, update2);
5185          }
5186          update2();
5187        }
5188      }, [referenceEl, floatingEl, update2, whileElementsMountedRef, hasWhileElementsMounted]);
5189      const refs = React24.useMemo(() => ({
5190        reference: referenceRef,
5191        floating: floatingRef,
5192        setReference,
5193        setFloating
5194      }), [setReference, setFloating]);
5195      const elements = React24.useMemo(() => ({
5196        reference: referenceEl,
5197        floating: floatingEl
5198      }), [referenceEl, floatingEl]);
5199      const floatingStyles = React24.useMemo(() => {
5200        const initialStyles = {
5201          position: strategy,
5202          left: 0,
5203          top: 0
5204        };
5205        if (!elements.floating) {
5206          return initialStyles;
5207        }
5208        const x = roundByDPR(elements.floating, data.x);
5209        const y = roundByDPR(elements.floating, data.y);
5210        if (transform) {
5211          return {
5212            ...initialStyles,
5213            transform: "translate(" + x + "px, " + y + "px)",
5214            ...getDPR(elements.floating) >= 1.5 && {
5215              willChange: "transform"
5216            }
5217          };
5218        }
5219        return {
5220          position: strategy,
5221          left: x,
5222          top: y
5223        };
5224      }, [strategy, transform, elements.floating, data.x, data.y]);
5225      return React24.useMemo(() => ({
5226        ...data,
5227        update: update2,
5228        refs,
5229        elements,
5230        floatingStyles
5231      }), [data, update2, refs, elements, floatingStyles]);
5232    }
5233    var offset3 = (options, deps) => {
5234      const result = offset2(options);
5235      return {
5236        name: result.name,
5237        fn: result.fn,
5238        options: [options, deps]
5239      };
5240    };
5241    var shift3 = (options, deps) => {
5242      const result = shift2(options);
5243      return {
5244        name: result.name,
5245        fn: result.fn,
5246        options: [options, deps]
5247      };
5248    };
5249    var limitShift3 = (options, deps) => {
5250      const result = limitShift2(options);
5251      return {
5252        fn: result.fn,
5253        options: [options, deps]
5254      };
5255    };
5256    var flip3 = (options, deps) => {
5257      const result = flip2(options);
5258      return {
5259        name: result.name,
5260        fn: result.fn,
5261        options: [options, deps]
5262      };
5263    };
5264    var size3 = (options, deps) => {
5265      const result = size2(options);
5266      return {
5267        name: result.name,
5268        fn: result.fn,
5269        options: [options, deps]
5270      };
5271    };
5272  
5273    // node_modules/@base-ui/react/utils/popups/popupHandle.mjs
5274    var BasePopupHandle = class {
5275      /**
5276       * Stores of every root currently using this handle, in attach order. A handle is meant to be used
5277       * by a single mounted root, but roots can transiently overlap (e.g. during an animated route
5278       * transition), so this stack lets `attachStore`'s cleanup restore the previous root instead of
5279       * leaving a still-mounted root uncontrollable when a newer overlapping root detaches first.
5280       */
5281      attachedStores = [];
5282      /**
5283       * Store of the root that currently controls the handle: the most recently attached one still
5284       * mounted, or `null` when no root is attached. Imperative methods are no-ops while this is `null`.
5285       */
5286      attachedStoreValue = null;
5287      /**
5288       * Listeners notified when `attachedStore` changes, so detached triggers can follow the store pointer.
5289       */
5290      storeListeners = /* @__PURE__ */ new Set();
5291      /**
5292       * Creates a handle backed by the store used while no root is attached.
5293       *
5294       * @param fallbackStore Inert, closed store handed to detached triggers while no root is attached,
5295       * so they can render and register without a mounted root. Triggers register into whichever store
5296       * `store` currently resolves to, so while detached they live in this store's trigger map and
5297       * migrate themselves to the root's store (and back) as it attaches/detaches.
5298       * @param componentName Component name used to prefix dev warnings, e.g. `'Menu'` produces
5299       * `MenuHandle.open()` in warning text.
5300       * @param throwOnMissingTrigger Whether `open(triggerId)` throws when no trigger with that id is
5301       * registered. Anchored popups (Menu, Popover, Tooltip, PreviewCard) need a trigger to anchor to,
5302       * so they throw; Dialog is not anchored and instead opens unassociated with a dev warning.
5303       */
5304      constructor(fallbackStore, componentName, throwOnMissingTrigger = true) {
5305        this.fallbackStore = fallbackStore;
5306        this.componentName = componentName;
5307        this.throwOnMissingTrigger = throwOnMissingTrigger;
5308      }
5309      get attachedStore() {
5310        return this.attachedStoreValue;
5311      }
5312      /**
5313       * Store that detached triggers read from: the attached root's store, or an inert fallback store
5314       * used while no root is attached.
5315       * @internal
5316       */
5317      get store() {
5318        return this.attachedStoreValue ?? this.fallbackStore;
5319      }
5320      /**
5321       * Stable fallback store used for server rendering and hydration. Root stores cannot be recorded on
5322       * the handle during render because a handle can be shared by concurrent server-rendered requests.
5323       * @internal
5324       */
5325      get serverStore() {
5326        return this.fallbackStore;
5327      }
5328      /**
5329       * Subscribes to changes of the attached store pointer so detached triggers re-render and re-bind
5330       * when a root attaches or detaches. Returns a function that removes the listener.
5331       * @internal
5332       */
5333      subscribeStore(listener) {
5334        this.storeListeners.add(listener);
5335        return () => {
5336          this.storeListeners.delete(listener);
5337        };
5338      }
5339      /**
5340       * Points the handle at a root's store and notifies subscribers so detached triggers re-render and
5341       * re-register into it (their registration ref re-fires on the store-pointer change). Returns a
5342       * cleanup function that detaches the store again.
5343       * @internal
5344       */
5345      attachStore(newStore) {
5346        this.attachedStores.push(newStore);
5347        this.setActiveStore(newStore);
5348        if (true) {
5349          if (this.attachedStores.length > 1) {
5350            const dev = this;
5351            (dev.overlapWarningFrame ??= AnimationFrame.create()).request(() => {
5352              if (this.attachedStores.length > 1) {
5353                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.");
5354              }
5355            });
5356          }
5357        }
5358        return () => {
5359          const index2 = this.attachedStores.lastIndexOf(newStore);
5360          if (index2 !== -1) {
5361            this.attachedStores.splice(index2, 1);
5362          }
5363          this.setActiveStore(this.attachedStores[this.attachedStores.length - 1] ?? null);
5364        };
5365      }
5366      /**
5367       * Sets the store that currently controls the handle and notifies subscribers when it changes, so
5368       * detached triggers re-render and migrate their registration to the new store.
5369       */
5370      setActiveStore(store2) {
5371        if (this.attachedStoreValue !== store2) {
5372          this.attachedStoreValue = store2;
5373          this.storeListeners.forEach((listener) => {
5374            listener();
5375          });
5376        }
5377      }
5378      /**
5379       * Opens the attached root's store and associates it with the trigger with the given id, or a
5380       * no-op (with a dev warning) while no root is attached. Shared by every concrete handle's public
5381       * `open()` method, which only narrows the parameter type.
5382       *
5383       * When a trigger id is given but no matching trigger is registered, anchored popups throw (see
5384       * `throwOnMissingTrigger`); Dialog opens unassociated with a dev warning instead.
5385       *
5386       * This method should only be called in an event handler or an effect (not during rendering).
5387       *
5388       * @param triggerId ID of the trigger to associate with the popup, or `null`/`undefined` to open
5389       * without associating any trigger.
5390       */
5391      openByTrigger(triggerId) {
5392        const attachedStore = this.attachedStore;
5393        if (attachedStore === null) {
5394          if (true) {
5395            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.`);
5396          }
5397          return;
5398        }
5399        let triggerElement;
5400        if (triggerId) {
5401          for (let i = this.attachedStores.length - 1; i >= 0 && !triggerElement; i -= 1) {
5402            triggerElement = this.attachedStores[i].context.triggerElements.getById(triggerId);
5403          }
5404          triggerElement ??= this.fallbackStore.context.triggerElements.getById(triggerId);
5405        }
5406        if (triggerId && !triggerElement) {
5407          if (this.throwOnMissingTrigger) {
5408            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));
5409          }
5410          if (true) {
5411            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.`);
5412          }
5413        }
5414        attachedStore.setOpen(true, createChangeEventDetails(reason_parts_exports.imperativeAction, void 0, triggerElement));
5415      }
5416      /**
5417       * Closes the popup by setting the attached root's store to closed, or a no-op (with a dev warning)
5418       * while no root is attached. Shared by every concrete handle's public `close()` method.
5419       *
5420       * This method should only be called in an event handler or an effect (not during rendering).
5421       */
5422      closePopup() {
5423        const attachedStore = this.attachedStore;
5424        if (attachedStore === null) {
5425          if (true) {
5426            console.warn(`Base UI: $this.componentName}Handle.close() was called while no root using this handle is mounted. The call was ignored.`);
5427          }
5428          return;
5429        }
5430        attachedStore.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction));
5431      }
5432    };
5433  
5434    // node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
5435    var React29 = __toESM(require_react(), 1);
5436    var ReactDOM4 = __toESM(require_react_dom(), 1);
5437  
5438    // node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
5439    var React28 = __toESM(require_react(), 1);
5440  
5441    // node_modules/@base-ui/utils/store/useStore.mjs
5442    var React26 = __toESM(require_react(), 1);
5443    var import_shim = __toESM(require_shim(), 1);
5444    var import_with_selector = __toESM(require_with_selector(), 1);
5445  
5446    // node_modules/@base-ui/utils/fastHooks.mjs
5447    var React25 = __toESM(require_react(), 1);
5448    var hooks = [];
5449    var currentInstance = void 0;
5450    function getInstance() {
5451      return currentInstance;
5452    }
5453    function register(hook) {
5454      hooks.push(hook);
5455    }
5456    function fastComponent(fn) {
5457      const FastComponent = (props, forwardedRef) => {
5458        const instance = useRefWithInit(createInstance).current;
5459        let result;
5460        try {
5461          currentInstance = instance;
5462          for (const hook of hooks) {
5463            hook.before(instance);
5464          }
5465          result = fn(props, forwardedRef);
5466          for (const hook of hooks) {
5467            hook.after(instance);
5468          }
5469          instance.didInitialize = true;
5470        } finally {
5471          currentInstance = void 0;
5472        }
5473        return result;
5474      };
5475      FastComponent.displayName = fn.displayName || fn.name;
5476      return FastComponent;
5477    }
5478    function fastComponentRef(fn) {
5479      return /* @__PURE__ */ React25.forwardRef(fastComponent(fn));
5480    }
5481    function createInstance() {
5482      return {
5483        didInitialize: false
5484      };
5485    }
5486  
5487    // node_modules/@base-ui/utils/store/useStore.mjs
5488    var canUseRawUseSyncExternalStore = isReactVersionAtLeast(19);
5489    var useStoreImplementation = canUseRawUseSyncExternalStore ? useStoreFast : useStoreLegacy;
5490    function useStore(store2, selector, a1, a2, a3) {
5491      return useStoreImplementation(store2, selector, a1, a2, a3);
5492    }
5493    function useStoreR19(store2, selector, a1, a2, a3) {
5494      const getSelection = React26.useCallback(() => selector(store2.getSnapshot(), a1, a2, a3), [store2, selector, a1, a2, a3]);
5495      return (0, import_shim.useSyncExternalStore)(store2.subscribe, getSelection, getSelection);
5496    }
5497    register({
5498      before(instance) {
5499        instance.syncIndex = 0;
5500        if (!instance.didInitialize) {
5501          instance.syncTick = 1;
5502          instance.syncHooks = [];
5503          instance.didChangeStore = true;
5504          instance.getSnapshot = () => {
5505            let didChange2 = false;
5506            for (let i = 0; i < instance.syncHooks.length; i += 1) {
5507              const hook = instance.syncHooks[i];
5508              const value = hook.selector(hook.store.state, hook.a1, hook.a2, hook.a3);
5509              if (!Object.is(hook.value, value)) {
5510                didChange2 = true;
5511                hook.value = value;
5512              }
5513            }
5514            if (didChange2) {
5515              instance.syncTick += 1;
5516            }
5517            return instance.syncTick;
5518          };
5519        }
5520      },
5521      after(instance) {
5522        if (instance.syncHooks.length > 0) {
5523          if (instance.didChangeStore) {
5524            instance.didChangeStore = false;
5525            instance.subscribe = (onStoreChange) => {
5526              const stores = /* @__PURE__ */ new Set();
5527              for (const hook of instance.syncHooks) {
5528                stores.add(hook.store);
5529              }
5530              const unsubscribes = [];
5531              for (const store2 of stores) {
5532                unsubscribes.push(store2.subscribe(onStoreChange));
5533              }
5534              return () => {
5535                for (const unsubscribe of unsubscribes) {
5536                  unsubscribe();
5537                }
5538              };
5539            };
5540          }
5541          (0, import_shim.useSyncExternalStore)(instance.subscribe, instance.getSnapshot, instance.getSnapshot);
5542        }
5543      }
5544    });
5545    function useStoreFast(store2, selector, a1, a2, a3) {
5546      const instance = getInstance();
5547      if (!instance) {
5548        return useStoreR19(store2, selector, a1, a2, a3);
5549      }
5550      const index2 = instance.syncIndex;
5551      instance.syncIndex += 1;
5552      let hook;
5553      if (!instance.didInitialize) {
5554        hook = {
5555          store: store2,
5556          selector,
5557          a1,
5558          a2,
5559          a3,
5560          value: selector(store2.getSnapshot(), a1, a2, a3)
5561        };
5562        instance.syncHooks.push(hook);
5563      } else {
5564        hook = instance.syncHooks[index2];
5565        if (hook.store !== store2 || hook.selector !== selector || !Object.is(hook.a1, a1) || !Object.is(hook.a2, a2) || !Object.is(hook.a3, a3)) {
5566          if (hook.store !== store2) {
5567            instance.didChangeStore = true;
5568          }
5569          hook.store = store2;
5570          hook.selector = selector;
5571          hook.a1 = a1;
5572          hook.a2 = a2;
5573          hook.a3 = a3;
5574          hook.value = selector(store2.getSnapshot(), a1, a2, a3);
5575        }
5576      }
5577      return hook.value;
5578    }
5579    function useStoreLegacy(store2, selector, a1, a2, a3) {
5580      return (0, import_with_selector.useSyncExternalStoreWithSelector)(store2.subscribe, store2.getSnapshot, store2.getSnapshot, (state) => selector(state, a1, a2, a3));
5581    }
5582  
5583    // node_modules/@base-ui/utils/store/Store.mjs
5584    var Store = class {
5585      /**
5586       * The current state of the store.
5587       * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.
5588       * 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).
5589       * The values can be used directly (to avoid subscribing to the store) in effects or event handlers.
5590       *
5591       * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.
5592       */
5593      // Internal state to handle recursive `setState()` calls
5594      constructor(state) {
5595        this.state = state;
5596        this.listeners = /* @__PURE__ */ new Set();
5597        this.updateTick = 0;
5598      }
5599      /**
5600       * Registers a listener that will be called whenever the store's state changes.
5601       *
5602       * @param fn The listener function to be called on state changes.
5603       * @returns A function to unsubscribe the listener.
5604       */
5605      subscribe = (fn) => {
5606        this.listeners.add(fn);
5607        return () => {
5608          this.listeners.delete(fn);
5609        };
5610      };
5611      /**
5612       * Returns the current state of the store.
5613       */
5614      getSnapshot = () => {
5615        return this.state;
5616      };
5617      /**
5618       * Updates the entire store's state and notifies all registered listeners.
5619       *
5620       * @param newState The new state to set for the store.
5621       */
5622      setState(newState) {
5623        if (this.state === newState) {
5624          return;
5625        }
5626        this.state = newState;
5627        this.updateTick += 1;
5628        const currentTick = this.updateTick;
5629        for (const listener of this.listeners) {
5630          if (currentTick !== this.updateTick) {
5631            return;
5632          }
5633          listener(newState);
5634        }
5635      }
5636      /**
5637       * Merges the provided changes into the current state and notifies listeners if there are changes.
5638       *
5639       * @param changes An object containing the changes to apply to the current state.
5640       */
5641      update(changes) {
5642        for (const key in changes) {
5643          if (!Object.is(this.state[key], changes[key])) {
5644            this.setState({
5645              ...this.state,
5646              ...changes
5647            });
5648            return;
5649          }
5650        }
5651      }
5652      /**
5653       * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.
5654       *
5655       * @param key The key in the store's state to update.
5656       * @param value The new value to set for the specified key.
5657       */
5658      set(key, value) {
5659        if (!Object.is(this.state[key], value)) {
5660          this.setState({
5661            ...this.state,
5662            [key]: value
5663          });
5664        }
5665      }
5666      /**
5667       * Gives the state a new reference and updates all registered listeners.
5668       */
5669      notifyAll() {
5670        const newState = {
5671          ...this.state
5672        };
5673        this.setState(newState);
5674      }
5675      use(selector, a1, a2, a3) {
5676        return useStore(this, selector, a1, a2, a3);
5677      }
5678    };
5679  
5680    // node_modules/@base-ui/utils/store/ReactStore.mjs
5681    var React27 = __toESM(require_react(), 1);
5682    var ReactStore = class extends Store {
5683      /**
5684       * Creates a new ReactStore instance.
5685       *
5686       * @param state Initial state of the store.
5687       * @param context Non-reactive context values.
5688       * @param selectors Optional selectors for use with `useState`.
5689       */
5690      constructor(state, context = {}, selectors3) {
5691        super(state);
5692        this.context = context;
5693        this.selectors = selectors3;
5694      }
5695      /**
5696       * Non-reactive values such as refs, callbacks, etc.
5697       */
5698      /**
5699       * Synchronizes a single external value into the store.
5700       *
5701       * Note that the while the value in `state` is updated immediately, the value returned
5702       * by `useState` is updated before the next render (similarly to React's `useState`).
5703       */
5704      useSyncedValue(key, value) {
5705        React27.useDebugValue(key);
5706        const store2 = this;
5707        useIsoLayoutEffect(() => {
5708          if (store2.state[key] !== value) {
5709            store2.set(key, value);
5710          }
5711        }, [store2, key, value]);
5712      }
5713      /**
5714       * Synchronizes a single external value into the store and
5715       * cleans it up (sets to `undefined`) on unmount.
5716       *
5717       * Note that the while the value in `state` is updated immediately, the value returned
5718       * by `useState` is updated before the next render (similarly to React's `useState`).
5719       */
5720      useSyncedValueWithCleanup(key, value) {
5721        const store2 = this;
5722        useIsoLayoutEffect(() => {
5723          if (store2.state[key] !== value) {
5724            store2.set(key, value);
5725          }
5726          return () => {
5727            store2.set(key, void 0);
5728          };
5729        }, [store2, key, value]);
5730      }
5731      /**
5732       * Synchronizes multiple external values into the store.
5733       *
5734       * Note that the while the values in `state` are updated immediately, the values returned
5735       * by `useState` are updated before the next render (similarly to React's `useState`).
5736       */
5737      useSyncedValues(statePart) {
5738        const store2 = this;
5739        if (true) {
5740          React27.useDebugValue(statePart, (p) => Object.keys(p));
5741          const keys = React27.useRef(Object.keys(statePart)).current;
5742          const nextKeys = Object.keys(statePart);
5743          if (keys.length !== nextKeys.length || keys.some((key, index2) => key !== nextKeys[index2])) {
5744            console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
5745          }
5746        }
5747        const dependencies = Object.values(statePart);
5748        useIsoLayoutEffect(() => {
5749          store2.update(statePart);
5750        }, [store2, ...dependencies]);
5751      }
5752      /**
5753       * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`
5754       * is non-undefined, the store's state at `key` is updated to match `controlled`.
5755       */
5756      useControlledProp(key, controlled) {
5757        React27.useDebugValue(key);
5758        const store2 = this;
5759        const isControlled = controlled !== void 0;
5760        useIsoLayoutEffect(() => {
5761          if (isControlled && !Object.is(store2.state[key], controlled)) {
5762            store2.setState({
5763              ...store2.state,
5764              [key]: controlled
5765            });
5766          }
5767        }, [store2, key, controlled, isControlled]);
5768        if (true) {
5769          const cache = this.controlledValues ??= /* @__PURE__ */ new Map();
5770          if (!cache.has(key)) {
5771            cache.set(key, isControlled);
5772          }
5773          const previouslyControlled = cache.get(key);
5774          if (previouslyControlled !== void 0 && previouslyControlled !== isControlled) {
5775            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).`);
5776          }
5777        }
5778      }
5779      /** Gets the current value from the store using a selector with the provided key.
5780       *
5781       * @param key Key of the selector to use.
5782       */
5783      select(key, a1, a2, a3) {
5784        const selector = this.selectors[key];
5785        return selector(this.state, a1, a2, a3);
5786      }
5787      /**
5788       * Returns a value from the store's state using a selector function.
5789       * Used to subscribe to specific parts of the state.
5790       * This methods causes a rerender whenever the selected state changes.
5791       *
5792       * @param key Key of the selector to use.
5793       */
5794      useState(key, a1, a2, a3) {
5795        React27.useDebugValue(key);
5796        return useStore(this, this.selectors[key], a1, a2, a3);
5797      }
5798      /**
5799       * Wraps a function with `useStableCallback` to ensure it has a stable reference
5800       * and assigns it to the context.
5801       *
5802       * @param key Key of the event callback. Must be a function in the context.
5803       * @param fn Function to assign.
5804       */
5805      useContextCallback(key, fn) {
5806        React27.useDebugValue(key);
5807        const stableFunction = useStableCallback(fn ?? NOOP);
5808        this.context[key] = stableFunction;
5809      }
5810      /**
5811       * Returns a stable setter function for a specific key in the store's state.
5812       * It's commonly used to pass as a ref callback to React elements.
5813       *
5814       * @param key Key of the state to set.
5815       */
5816      useStateSetter(key) {
5817        const ref = React27.useRef(void 0);
5818        if (ref.current === void 0) {
5819          ref.current = (value) => {
5820            this.set(key, value);
5821          };
5822        }
5823        return ref.current;
5824      }
5825      /**
5826       * Observes changes derived from the store's selectors and calls the listener when the selected value changes.
5827       *
5828       * @param key Key of the selector to observe.
5829       * @param listener Listener function called when the selector result changes.
5830       */
5831      observe(selector, listener) {
5832        let selectFn;
5833        if (typeof selector === "function") {
5834          selectFn = selector;
5835        } else {
5836          selectFn = this.selectors[selector];
5837        }
5838        let prevValue = selectFn(this.state);
5839        listener(prevValue, prevValue, this);
5840        return this.subscribe((nextState) => {
5841          const nextValue = selectFn(nextState);
5842          if (!Object.is(prevValue, nextValue)) {
5843            const oldValue = prevValue;
5844            prevValue = nextValue;
5845            listener(nextValue, oldValue, this);
5846          }
5847        });
5848      }
5849    };
5850  
5851    // node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs
5852    var selectors = {
5853      open: (state) => state.open,
5854      transitionStatus: (state) => state.transitionStatus,
5855      domReferenceElement: (state) => state.domReferenceElement,
5856      referenceElement: (state) => state.positionReference ?? state.referenceElement,
5857      floatingElement: (state) => state.floatingElement,
5858      floatingId: (state) => state.floatingId
5859    };
5860    var FloatingRootStore = class extends ReactStore {
5861      constructor(options) {
5862        const {
5863          syncOnly,
5864          nested,
5865          onOpenChange,
5866          triggerElements,
5867          ...initialState
5868        } = options;
5869        super({
5870          ...initialState,
5871          positionReference: initialState.referenceElement,
5872          domReferenceElement: initialState.referenceElement
5873        }, {
5874          onOpenChange,
5875          dataRef: {
5876            current: {}
5877          },
5878          events: createEventEmitter(),
5879          nested,
5880          triggerElements
5881        }, selectors);
5882        this.syncOnly = syncOnly;
5883      }
5884      /**
5885       * Syncs the event used by hover logic to distinguish hover-open from click-like interaction.
5886       */
5887      syncOpenEvent = (newOpen, event) => {
5888        if (!newOpen || !this.state.open || // Prevent a pending hover-open from overwriting a click-open event, while allowing
5889        // click events to upgrade a hover-open.
5890        event != null && isClickLikeEvent(event)) {
5891          this.context.dataRef.current.openEvent = newOpen ? event : void 0;
5892        }
5893      };
5894      /**
5895       * Runs the root-owned side effects for an open state change.
5896       */
5897      dispatchOpenChange = (newOpen, eventDetails) => {
5898        this.syncOpenEvent(newOpen, eventDetails.event);
5899        const details = {
5900          open: newOpen,
5901          reason: eventDetails.reason,
5902          nativeEvent: eventDetails.event,
5903          nested: this.context.nested,
5904          triggerElement: eventDetails.trigger
5905        };
5906        this.context.events.emit("openchange", details);
5907      };
5908      /**
5909       * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.
5910       *
5911       * @param newOpen The new open state.
5912       * @param eventDetails Details about the event that triggered the open state change.
5913       */
5914      setOpen = (newOpen, eventDetails) => {
5915        if (this.syncOnly) {
5916          this.context.onOpenChange?.(newOpen, eventDetails);
5917          return;
5918        }
5919        this.dispatchOpenChange(newOpen, eventDetails);
5920        this.context.onOpenChange?.(newOpen, eventDetails);
5921      };
5922    };
5923  
5924    // node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
5925    function useSyncedFloatingRootContext(options) {
5926      const {
5927        popupStore,
5928        treatPopupAsFloatingElement = false,
5929        floatingRootContext: floatingRootContextProp,
5930        floatingId,
5931        nested,
5932        onOpenChange
5933      } = options;
5934      const open = popupStore.useState("open");
5935      const referenceElement = popupStore.useState("activeTriggerElement");
5936      const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? "popupElement" : "positionerElement");
5937      const triggerElements = popupStore.context.triggerElements;
5938      const handleOpenChange = onOpenChange;
5939      const internalStoreRef = React28.useRef(null);
5940      if (floatingRootContextProp === void 0 && internalStoreRef.current === null) {
5941        internalStoreRef.current = new FloatingRootStore({
5942          open,
5943          transitionStatus: void 0,
5944          referenceElement,
5945          floatingElement,
5946          triggerElements,
5947          onOpenChange: handleOpenChange,
5948          floatingId,
5949          syncOnly: true,
5950          nested
5951        });
5952      }
5953      const store2 = floatingRootContextProp ?? internalStoreRef.current;
5954      popupStore.useSyncedValue("floatingId", floatingId);
5955      useIsoLayoutEffect(() => {
5956        const valuesToSync = {
5957          open,
5958          floatingId,
5959          referenceElement,
5960          floatingElement
5961        };
5962        if (isElement(referenceElement)) {
5963          valuesToSync.domReferenceElement = referenceElement;
5964        }
5965        if (store2.state.positionReference === store2.state.referenceElement) {
5966          valuesToSync.positionReference = referenceElement;
5967        }
5968        store2.update(valuesToSync);
5969      }, [open, floatingId, referenceElement, floatingElement, store2]);
5970      store2.context.onOpenChange = handleOpenChange;
5971      store2.context.nested = nested;
5972      return store2;
5973    }
5974  
5975    // node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
5976    var FOCUSABLE_POPUP_PROPS = {
5977      tabIndex: -1,
5978      [FOCUSABLE_ATTRIBUTE]: ""
5979    };
5980    function usePopupRootStore(createStore, treatPopupAsFloatingElement = false) {
5981      const floatingId = useId();
5982      const nested = useFloatingParentNodeId() != null;
5983      const store2 = useRefWithInit(() => createStore(floatingId, nested)).current;
5984      useSyncedFloatingRootContext({
5985        popupStore: store2,
5986        treatPopupAsFloatingElement,
5987        floatingRootContext: store2.state.floatingRootContext,
5988        floatingId,
5989        nested,
5990        onOpenChange: store2.setOpen
5991      });
5992      return store2;
5993    }
5994    function PopupHandleAttachment({
5995      handle,
5996      store: store2
5997    }) {
5998      useIsoLayoutEffect(() => {
5999        return handle.attachStore(store2);
6000      }, [handle, store2]);
6001      return null;
6002    }
6003    function useTriggerRegistration(id, store2) {
6004      const registeredElementIdRef = React29.useRef(null);
6005      const registeredElementRef = React29.useRef(null);
6006      return React29.useCallback((element) => {
6007        if (id === void 0) {
6008          return;
6009        }
6010        let shouldSyncTriggerCount = false;
6011        if (registeredElementIdRef.current !== null) {
6012          const registeredId = registeredElementIdRef.current;
6013          const registeredElement = registeredElementRef.current;
6014          const currentElement = store2.context.triggerElements.getById(registeredId);
6015          if (registeredElement && currentElement === registeredElement) {
6016            store2.context.triggerElements.delete(registeredId);
6017            shouldSyncTriggerCount = true;
6018          }
6019          registeredElementIdRef.current = null;
6020          registeredElementRef.current = null;
6021        }
6022        if (element !== null) {
6023          registeredElementIdRef.current = id;
6024          registeredElementRef.current = element;
6025          store2.context.triggerElements.add(id, element);
6026          shouldSyncTriggerCount = true;
6027        }
6028        if (shouldSyncTriggerCount) {
6029          const triggerCount = store2.context.triggerElements.size;
6030          if (store2.select("open") && store2.state.triggerCount !== triggerCount) {
6031            store2.set("triggerCount", triggerCount);
6032          }
6033        }
6034      }, [store2, id]);
6035    }
6036    function setPopupOpenState(state, open, trigger, preventUnmountOnClose = false) {
6037      if (open) {
6038        state.preventUnmountingOnClose = false;
6039      } else if (preventUnmountOnClose) {
6040        state.preventUnmountingOnClose = true;
6041      }
6042      const triggerId = trigger?.id ?? null;
6043      if (triggerId || open) {
6044        state.activeTriggerId = triggerId;
6045        state.activeTriggerElement = trigger ?? null;
6046      }
6047    }
6048    function attachPreventUnmountOnClose(eventDetails) {
6049      let preventUnmountOnClose = false;
6050      eventDetails.preventUnmountOnClose = () => {
6051        preventUnmountOnClose = true;
6052      };
6053      return () => preventUnmountOnClose;
6054    }
6055    function applyPopupOpenChange(store2, nextOpen, eventDetails, options = {}) {
6056      const reason = eventDetails.reason;
6057      const isHover = reason === reason_parts_exports.triggerHover;
6058      const isFocusOpen = nextOpen && reason === reason_parts_exports.triggerFocus;
6059      const isDismissClose = !nextOpen && (reason === reason_parts_exports.triggerPress || reason === reason_parts_exports.escapeKey);
6060      const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);
6061      store2.context.onOpenChange?.(nextOpen, eventDetails);
6062      if (eventDetails.isCanceled) {
6063        return;
6064      }
6065      options.onBeforeDispatch?.();
6066      store2.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);
6067      const changeState = () => {
6068        const updatedState = {
6069          ...options.extraState,
6070          open: nextOpen
6071        };
6072        if (isFocusOpen) {
6073          updatedState.instantType = "focus";
6074        } else if (isDismissClose) {
6075          updatedState.instantType = "dismiss";
6076        } else if (isHover) {
6077          updatedState.instantType = void 0;
6078        }
6079        setPopupOpenState(updatedState, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());
6080        store2.update(updatedState);
6081      };
6082      if (isHover) {
6083        ReactDOM4.flushSync(changeState);
6084      } else {
6085        changeState();
6086      }
6087    }
6088    function useTriggerDataForwarding(triggerId, triggerElementRef, store2, stateUpdates) {
6089      const isMountedByThisTrigger = store2.useState("isMountedByTrigger", triggerId);
6090      const baseRegisterTrigger = useTriggerRegistration(triggerId, store2);
6091      const applyTriggerData = useStableCallback((element) => {
6092        const open = store2.select("open");
6093        const activeTriggerId = store2.select("activeTriggerId");
6094        if (activeTriggerId === triggerId) {
6095          store2.update({
6096            activeTriggerElement: element,
6097            ...open ? stateUpdates : null
6098          });
6099          return;
6100        }
6101        if (activeTriggerId == null && open) {
6102          store2.update({
6103            activeTriggerId: triggerId,
6104            activeTriggerElement: element,
6105            ...stateUpdates
6106          });
6107        }
6108      });
6109      const registerTrigger = React29.useCallback((element) => {
6110        baseRegisterTrigger(element);
6111        if (element) {
6112          applyTriggerData(element);
6113        }
6114      }, [baseRegisterTrigger, applyTriggerData]);
6115      useIsoLayoutEffect(() => {
6116        if (isMountedByThisTrigger) {
6117          store2.update({
6118            activeTriggerElement: triggerElementRef.current,
6119            ...stateUpdates
6120          });
6121        }
6122      }, [isMountedByThisTrigger, store2, triggerElementRef, ...Object.values(stateUpdates)]);
6123      return {
6124        registerTrigger,
6125        isMountedByThisTrigger
6126      };
6127    }
6128    function useImplicitActiveTrigger(store2, options = {}) {
6129      const {
6130        closeOnActiveTriggerUnmount = false
6131      } = options;
6132      const resolvedActiveTriggerIdRef = React29.useRef(null);
6133      const open = store2.useState("open");
6134      const reactiveTriggerCount = store2.useState("triggerCount");
6135      const activeTriggerId = store2.useState("activeTriggerId");
6136      const reactiveActiveTriggerElement = store2.useState("activeTriggerElement");
6137      useIsoLayoutEffect(() => {
6138        if (!open) {
6139          resolvedActiveTriggerIdRef.current = null;
6140          if (store2.state.triggerCount !== 0) {
6141            store2.set("triggerCount", 0);
6142          }
6143          return;
6144        }
6145        const triggerCount = store2.context.triggerElements.size;
6146        const stateUpdates = {};
6147        if (store2.state.triggerCount !== triggerCount) {
6148          stateUpdates.triggerCount = triggerCount;
6149        }
6150        const currentActiveTriggerId = store2.select("activeTriggerId");
6151        let lostActiveTriggerId = null;
6152        if (currentActiveTriggerId) {
6153          const activeTriggerElement = store2.context.triggerElements.getById(currentActiveTriggerId);
6154          if (!activeTriggerElement) {
6155            for (const [triggerId, triggerElement] of store2.context.triggerElements.entries()) {
6156              if (triggerElement === store2.state.activeTriggerElement) {
6157                stateUpdates.activeTriggerId = triggerId;
6158                stateUpdates.activeTriggerElement = triggerElement;
6159                resolvedActiveTriggerIdRef.current = triggerId;
6160                break;
6161              }
6162            }
6163            if (stateUpdates.activeTriggerId === void 0) {
6164              if (resolvedActiveTriggerIdRef.current === currentActiveTriggerId) {
6165                lostActiveTriggerId = currentActiveTriggerId;
6166              } else {
6167                resolvedActiveTriggerIdRef.current = null;
6168              }
6169            }
6170          } else {
6171            resolvedActiveTriggerIdRef.current = currentActiveTriggerId;
6172            if (activeTriggerElement !== store2.state.activeTriggerElement) {
6173              stateUpdates.activeTriggerElement = activeTriggerElement;
6174            }
6175          }
6176        } else {
6177          resolvedActiveTriggerIdRef.current = null;
6178        }
6179        if (!lostActiveTriggerId && !currentActiveTriggerId && triggerCount === 1) {
6180          const iteratorResult = store2.context.triggerElements.entries().next();
6181          if (!iteratorResult.done) {
6182            const [implicitTriggerId, implicitTriggerElement] = iteratorResult.value;
6183            stateUpdates.activeTriggerId = implicitTriggerId;
6184            stateUpdates.activeTriggerElement = implicitTriggerElement;
6185            resolvedActiveTriggerIdRef.current = implicitTriggerId;
6186          }
6187        }
6188        if (stateUpdates.triggerCount !== void 0 || stateUpdates.activeTriggerId !== void 0 || stateUpdates.activeTriggerElement !== void 0) {
6189          store2.update(stateUpdates);
6190        }
6191        if (lostActiveTriggerId) {
6192          if (closeOnActiveTriggerUnmount) {
6193            queueMicrotask(() => {
6194              if (store2.select("open") && store2.select("activeTriggerId") === lostActiveTriggerId && !store2.context.triggerElements.getById(lostActiveTriggerId)) {
6195                const eventDetails = createChangeEventDetails(reason_parts_exports.none);
6196                store2.setOpen(false, eventDetails);
6197                if (!eventDetails.isCanceled) {
6198                  store2.update({
6199                    activeTriggerId: null,
6200                    activeTriggerElement: null
6201                  });
6202                }
6203              }
6204            });
6205          }
6206        }
6207      }, [open, store2, reactiveTriggerCount, activeTriggerId, reactiveActiveTriggerElement, closeOnActiveTriggerUnmount]);
6208    }
6209    function useOpenStateTransitions(open, store2, onUnmount) {
6210      const {
6211        mounted,
6212        setMounted,
6213        transitionStatus
6214      } = useTransitionStatus(open);
6215      const preventUnmountingOnClose = store2.useState("preventUnmountingOnClose");
6216      const syncedPreventUnmountingOnClose = open ? false : preventUnmountingOnClose;
6217      store2.useSyncedValues({
6218        mounted,
6219        transitionStatus,
6220        preventUnmountingOnClose: syncedPreventUnmountingOnClose
6221      });
6222      const forceUnmount = useStableCallback(() => {
6223        setMounted(false);
6224        store2.update({
6225          activeTriggerId: null,
6226          activeTriggerElement: null,
6227          mounted: false,
6228          preventUnmountingOnClose: false
6229        });
6230        onUnmount?.();
6231        store2.context.onOpenChangeComplete?.(false);
6232      });
6233      useOpenChangeComplete({
6234        enabled: mounted && !open && !syncedPreventUnmountingOnClose,
6235        open,
6236        ref: store2.context.popupRef,
6237        onComplete() {
6238          if (!open) {
6239            forceUnmount();
6240          }
6241        }
6242      });
6243      return {
6244        forceUnmount,
6245        transitionStatus
6246      };
6247    }
6248    function usePopupInteractionProps(store2, statePart) {
6249      store2.useSyncedValues(statePart);
6250      useIsoLayoutEffect(() => () => {
6251        store2.update({
6252          activeTriggerProps: EMPTY_OBJECT,
6253          inactiveTriggerProps: EMPTY_OBJECT,
6254          popupProps: EMPTY_OBJECT
6255        });
6256      }, [store2]);
6257    }
6258  
6259    // node_modules/@base-ui/react/utils/popups/popupTriggerMap.mjs
6260    var devElementIdsByMap;
6261    function getDevElementIds(map) {
6262      devElementIdsByMap ??= /* @__PURE__ */ new WeakMap();
6263      let elementIds = devElementIdsByMap.get(map);
6264      if (!elementIds) {
6265        elementIds = /* @__PURE__ */ new WeakMap();
6266        devElementIdsByMap.set(map, elementIds);
6267      }
6268      return elementIds;
6269    }
6270    var PopupTriggerMap = class {
6271      constructor() {
6272        this.idMap = /* @__PURE__ */ new Map();
6273      }
6274      /**
6275       * Adds a trigger element with the given ID.
6276       *
6277       * Note: The provided element is assumed to not be registered under multiple IDs.
6278       */
6279      add(id, element) {
6280        if (true) {
6281          const elementIds = getDevElementIds(this);
6282          const existingId = elementIds.get(element);
6283          if (existingId !== void 0 && existingId !== id) {
6284            throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");
6285          }
6286          const previousElement = this.idMap.get(id);
6287          if (previousElement !== void 0 && previousElement !== element) {
6288            elementIds.delete(previousElement);
6289          }
6290          elementIds.set(element, id);
6291        }
6292        this.idMap.set(id, element);
6293      }
6294      /**
6295       * Removes the trigger element with the given ID.
6296       */
6297      delete(id) {
6298        if (true) {
6299          const element = this.idMap.get(id);
6300          if (element !== void 0) {
6301            devElementIdsByMap?.get(this)?.delete(element);
6302          }
6303        }
6304        this.idMap.delete(id);
6305      }
6306      /**
6307       * Whether the given element is registered as a trigger.
6308       */
6309      hasElement(element) {
6310        for (const registered of this.idMap.values()) {
6311          if (registered === element) {
6312            return true;
6313          }
6314        }
6315        return false;
6316      }
6317      /**
6318       * Whether there is a registered trigger element matching the given predicate.
6319       */
6320      hasMatchingElement(predicate) {
6321        for (const element of this.idMap.values()) {
6322          if (predicate(element)) {
6323            return true;
6324          }
6325        }
6326        return false;
6327      }
6328      /**
6329       * Returns the trigger element associated with the given ID, or undefined if no such element exists.
6330       */
6331      getById(id) {
6332        return this.idMap.get(id);
6333      }
6334      /**
6335       * Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element].
6336       */
6337      entries() {
6338        return this.idMap.entries();
6339      }
6340      /**
6341       * Returns an iterable of all registered trigger elements.
6342       */
6343      elements() {
6344        return this.idMap.values();
6345      }
6346      /**
6347       * Returns the number of registered trigger elements.
6348       */
6349      get size() {
6350        return this.idMap.size;
6351      }
6352    };
6353  
6354    // node_modules/@base-ui/react/floating-ui-react/utils/getEmptyRootContext.mjs
6355    function getEmptyRootContext() {
6356      return new FloatingRootStore({
6357        open: false,
6358        transitionStatus: void 0,
6359        floatingElement: null,
6360        referenceElement: null,
6361        triggerElements: new PopupTriggerMap(),
6362        floatingId: void 0,
6363        syncOnly: false,
6364        nested: false,
6365        onOpenChange: void 0
6366      });
6367    }
6368  
6369    // node_modules/@base-ui/react/utils/popups/store.mjs
6370    function createInitialPopupStoreState() {
6371      return {
6372        open: false,
6373        openProp: void 0,
6374        mounted: false,
6375        transitionStatus: void 0,
6376        floatingRootContext: getEmptyRootContext(),
6377        floatingId: void 0,
6378        triggerCount: 0,
6379        preventUnmountingOnClose: false,
6380        payload: void 0,
6381        activeTriggerId: null,
6382        activeTriggerElement: null,
6383        triggerIdProp: void 0,
6384        popupElement: null,
6385        positionerElement: null,
6386        activeTriggerProps: EMPTY_OBJECT,
6387        inactiveTriggerProps: EMPTY_OBJECT,
6388        popupProps: EMPTY_OBJECT
6389      };
6390    }
6391    function createPopupFloatingRootContext(triggerElements, floatingId, nested = false) {
6392      return new FloatingRootStore({
6393        open: false,
6394        transitionStatus: void 0,
6395        floatingElement: null,
6396        referenceElement: null,
6397        triggerElements,
6398        floatingId,
6399        syncOnly: true,
6400        nested,
6401        onOpenChange: void 0
6402      });
6403    }
6404    var activeTriggerIdSelector = (state) => state.triggerIdProp ?? state.activeTriggerId;
6405    var openSelector = (state) => state.openProp ?? state.open;
6406    var popupIdSelector = (state) => {
6407      const popupId = state.popupElement?.id ?? state.floatingId;
6408      return popupId || void 0;
6409    };
6410    function triggerOwnsOpenPopup(state, triggerId) {
6411      return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) === triggerId;
6412    }
6413    function triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) {
6414      if (triggerOwnsOpenPopup(state, triggerId)) {
6415        return true;
6416      }
6417      return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) == null && state.triggerCount === 1;
6418    }
6419    var popupStoreSelectors = {
6420      open: openSelector,
6421      mounted: (state) => state.mounted,
6422      transitionStatus: (state) => state.transitionStatus,
6423      floatingRootContext: (state) => state.floatingRootContext,
6424      triggerCount: (state) => state.triggerCount,
6425      preventUnmountingOnClose: (state) => state.preventUnmountingOnClose,
6426      payload: (state) => state.payload,
6427      activeTriggerId: activeTriggerIdSelector,
6428      activeTriggerElement: (state) => state.mounted ? state.activeTriggerElement : null,
6429      popupId: popupIdSelector,
6430      /**
6431       * Whether the trigger with the given ID was used to open the popup.
6432       */
6433      isTriggerActive: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId,
6434      /**
6435       * Whether the popup is open and was activated by a trigger with the given ID.
6436       */
6437      isOpenedByTrigger: (state, triggerId) => triggerOwnsOpenPopup(state, triggerId),
6438      /**
6439       * Whether the popup is mounted and was activated by a trigger with the given ID.
6440       */
6441      isMountedByTrigger: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId && state.mounted,
6442      triggerProps: (state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps,
6443      /**
6444       * Popup id for the trigger that currently owns the open popup.
6445       */
6446      triggerPopupId: (state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : void 0,
6447      popupProps: (state) => state.popupProps,
6448      popupElement: (state) => state.popupElement,
6449      positionerElement: (state) => state.positionerElement
6450    };
6451  
6452    // node_modules/@base-ui/react/utils/popups/usePopupHandleStore.mjs
6453    var React30 = __toESM(require_react(), 1);
6454    var import_shim2 = __toESM(require_shim(), 1);
6455    function usePopupHandleStore(handle) {
6456      const subscribe = React30.useCallback((listener) => {
6457        if (handle === void 0) {
6458          return NOOP;
6459        }
6460        return handle.subscribeStore(listener);
6461      }, [handle]);
6462      const getSnapshot = React30.useCallback(() => {
6463        return handle === void 0 ? void 0 : handle.store;
6464      }, [handle]);
6465      return (0, import_shim2.useSyncExternalStore)(subscribe, getSnapshot, () => handle?.serverStore);
6466    }
6467  
6468    // node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
6469    function useBaseUIFloating(options) {
6470      return useFloatingWithStore(options, options.rootContext);
6471    }
6472    function useFloatingWithStore(options, store2) {
6473      const {
6474        nodeId,
6475        externalTree
6476      } = options;
6477      const referenceElement = store2.useState("referenceElement");
6478      const floatingElement = store2.useState("floatingElement");
6479      const domReferenceElement = store2.useState("domReferenceElement");
6480      const open = store2.useState("open");
6481      const floatingId = store2.useState("floatingId");
6482      const [positionReference, setPositionReferenceRaw] = React31.useState(null);
6483      const [localDomReference, setLocalDomReference] = React31.useState(void 0);
6484      const [localFloatingElement, setLocalFloatingElement] = React31.useState(void 0);
6485      const domReferenceRef = React31.useRef(null);
6486      const tree = useFloatingTree(externalTree);
6487      const storeElements = React31.useMemo(() => ({
6488        reference: referenceElement,
6489        floating: floatingElement,
6490        domReference: domReferenceElement
6491      }), [referenceElement, floatingElement, domReferenceElement]);
6492      const position = useFloating({
6493        ...options,
6494        elements: {
6495          ...storeElements,
6496          ...positionReference && {
6497            reference: positionReference
6498          }
6499        }
6500      });
6501      const localDomReferenceElement = isElement(localDomReference) ? localDomReference : null;
6502      const syncedFloatingElement = localFloatingElement === void 0 ? store2.state.floatingElement : localFloatingElement;
6503      store2.useSyncedValue("referenceElement", localDomReference ?? null);
6504      store2.useSyncedValue("domReferenceElement", localDomReference === void 0 ? domReferenceElement : localDomReferenceElement);
6505      store2.useSyncedValue("floatingElement", syncedFloatingElement);
6506      const setPositionReference = React31.useCallback((node) => {
6507        const computedPositionReference = isElement(node) ? {
6508          getBoundingClientRect: () => node.getBoundingClientRect(),
6509          getClientRects: () => node.getClientRects(),
6510          contextElement: node
6511        } : node;
6512        setPositionReferenceRaw(computedPositionReference);
6513        position.refs.setReference(computedPositionReference);
6514      }, [position.refs]);
6515      const setReference = React31.useCallback((node) => {
6516        if (isElement(node) || node === null) {
6517          domReferenceRef.current = node;
6518          setLocalDomReference(node);
6519        }
6520        if (isElement(position.refs.reference.current) || position.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
6521        // `null` to support `positionReference` + an unstable `reference`
6522        // callback ref.
6523        node !== null && !isElement(node)) {
6524          position.refs.setReference(node);
6525        }
6526      }, [position.refs, setLocalDomReference]);
6527      const setFloating = React31.useCallback((node) => {
6528        setLocalFloatingElement(node);
6529        position.refs.setFloating(node);
6530      }, [position.refs]);
6531      const refs = React31.useMemo(() => ({
6532        ...position.refs,
6533        setReference,
6534        setFloating,
6535        setPositionReference,
6536        domReference: domReferenceRef
6537      }), [position.refs, setReference, setFloating, setPositionReference]);
6538      const elements = React31.useMemo(() => ({
6539        ...position.elements,
6540        domReference: domReferenceElement
6541      }), [position.elements, domReferenceElement]);
6542      const context = React31.useMemo(() => ({
6543        ...position,
6544        dataRef: store2.context.dataRef,
6545        open,
6546        onOpenChange: store2.setOpen,
6547        events: store2.context.events,
6548        floatingId,
6549        refs,
6550        elements,
6551        nodeId,
6552        rootStore: store2
6553      }), [position, refs, elements, nodeId, store2, open, floatingId]);
6554      useIsoLayoutEffect(() => {
6555        if (domReferenceElement) {
6556          domReferenceRef.current = domReferenceElement;
6557        }
6558      }, [domReferenceElement]);
6559      useIsoLayoutEffect(() => {
6560        store2.context.dataRef.current.floatingContext = context;
6561        const node = tree?.nodesRef.current.find((n) => n.id === nodeId);
6562        if (node) {
6563          node.context = context;
6564        }
6565      });
6566      return React31.useMemo(() => ({
6567        ...position,
6568        context,
6569        refs,
6570        elements,
6571        rootStore: store2
6572      }), [position, refs, elements, context, store2]);
6573    }
6574  
6575    // node_modules/@base-ui/react/floating-ui-react/hooks/useFocus.mjs
6576    var React32 = __toESM(require_react(), 1);
6577    var isMacSafari = parts_exports.os.mac && parts_exports.engine.webkit;
6578    function useFocus(context, props = {}) {
6579      const {
6580        enabled = true,
6581        delay
6582      } = props;
6583      const store2 = "rootStore" in context ? context.rootStore : context;
6584      const {
6585        events,
6586        dataRef
6587      } = store2.context;
6588      const blockFocusRef = React32.useRef(false);
6589      const blockedReferenceRef = React32.useRef(null);
6590      const keyboardModalityRef = React32.useRef(true);
6591      const timeout = useTimeout();
6592      React32.useEffect(() => {
6593        const domReference = store2.select("domReferenceElement");
6594        if (!enabled) {
6595          return void 0;
6596        }
6597        const win = getWindow(domReference);
6598        function onBlur() {
6599          const currentDomReference = store2.select("domReferenceElement");
6600          if (!store2.select("open") && isHTMLElement(currentDomReference) && currentDomReference === activeElement(ownerDocument(currentDomReference))) {
6601            blockFocusRef.current = true;
6602          }
6603        }
6604        function onKeyDown() {
6605          keyboardModalityRef.current = true;
6606        }
6607        function onPointerDown() {
6608          keyboardModalityRef.current = false;
6609        }
6610        return mergeCleanups(addEventListener(win, "blur", onBlur), isMacSafari && addEventListener(win, "keydown", onKeyDown, true), isMacSafari && addEventListener(win, "pointerdown", onPointerDown, true));
6611      }, [store2, enabled]);
6612      React32.useEffect(() => {
6613        if (!enabled) {
6614          return void 0;
6615        }
6616        function onOpenChangeLocal(details) {
6617          if (details.reason === reason_parts_exports.triggerPress || details.reason === reason_parts_exports.escapeKey) {
6618            const referenceElement = store2.select("domReferenceElement");
6619            if (isElement(referenceElement)) {
6620              blockedReferenceRef.current = referenceElement;
6621              blockFocusRef.current = true;
6622            }
6623          }
6624        }
6625        events.on("openchange", onOpenChangeLocal);
6626        return () => {
6627          events.off("openchange", onOpenChangeLocal);
6628        };
6629      }, [events, enabled, store2]);
6630      const reference = React32.useMemo(() => {
6631        function resetBlockedFocus() {
6632          blockFocusRef.current = false;
6633          blockedReferenceRef.current = null;
6634        }
6635        return {
6636          onMouseLeave() {
6637            resetBlockedFocus();
6638          },
6639          onFocus(event) {
6640            const focusTarget = event.currentTarget;
6641            if (blockFocusRef.current) {
6642              if (blockedReferenceRef.current === focusTarget) {
6643                return;
6644              }
6645              resetBlockedFocus();
6646            }
6647            const target = getTarget(event.nativeEvent);
6648            if (isElement(target)) {
6649              if (isMacSafari && !event.relatedTarget) {
6650                if (!keyboardModalityRef.current && !isTypeableElement(target)) {
6651                  return;
6652                }
6653              } else if (!matchesFocusVisible(target)) {
6654                return;
6655              }
6656            }
6657            const movedFromOtherEnabledTrigger = isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements);
6658            const {
6659              nativeEvent,
6660              currentTarget
6661            } = event;
6662            const delayValue = typeof delay === "function" ? delay() : delay;
6663            if (store2.select("open") && movedFromOtherEnabledTrigger || delayValue === 0 || delayValue === void 0) {
6664              store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
6665              return;
6666            }
6667            timeout.start(delayValue, () => {
6668              if (blockFocusRef.current) {
6669                return;
6670              }
6671              store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
6672            });
6673          },
6674          onBlur(event) {
6675            resetBlockedFocus();
6676            const relatedTarget = event.relatedTarget;
6677            const nativeEvent = event.nativeEvent;
6678            const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute("focus-guard")) && relatedTarget.getAttribute("data-type") === "outside";
6679            timeout.start(0, () => {
6680              const domReference = store2.select("domReferenceElement");
6681              const activeEl = activeElement(ownerDocument(domReference));
6682              if (!relatedTarget && activeEl === domReference) {
6683                return;
6684              }
6685              if (contains(dataRef.current.floatingContext?.refs.floating.current, activeEl) || contains(domReference, activeEl) || movedToFocusGuard) {
6686                return;
6687              }
6688              const nextFocusedElement = relatedTarget ?? activeEl;
6689              if (isTargetInsideEnabledTrigger(nextFocusedElement, store2.context.triggerElements)) {
6690                return;
6691              }
6692              store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent));
6693            });
6694          }
6695        };
6696      }, [dataRef, delay, store2, timeout]);
6697      return React32.useMemo(() => enabled ? {
6698        reference,
6699        trigger: reference
6700      } : {}, [enabled, reference]);
6701    }
6702  
6703    // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
6704    var React33 = __toESM(require_react(), 1);
6705  
6706    // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverInteractionSharedState.mjs
6707    var HoverInteraction = class _HoverInteraction {
6708      constructor() {
6709        this.pointerType = void 0;
6710        this.interactedInside = false;
6711        this.handler = void 0;
6712        this.blockMouseMove = true;
6713        this.performedPointerEventsMutation = false;
6714        this.pointerEventsScopeElement = null;
6715        this.pointerEventsReferenceElement = null;
6716        this.pointerEventsFloatingElement = null;
6717        this.restTimeoutPending = false;
6718        this.openChangeTimeout = new Timeout();
6719        this.restTimeout = new Timeout();
6720        this.handleCloseOptions = void 0;
6721      }
6722      static create() {
6723        return new _HoverInteraction();
6724      }
6725      dispose = () => {
6726        this.openChangeTimeout.clear();
6727        this.restTimeout.clear();
6728      };
6729      disposeEffect = () => {
6730        return this.dispose;
6731      };
6732    };
6733    var pointerEventsMutationOwnerByScopeElement = /* @__PURE__ */ new WeakMap();
6734    function clearSafePolygonPointerEventsMutation(instance) {
6735      if (!instance.performedPointerEventsMutation) {
6736        return;
6737      }
6738      const scopeElement = instance.pointerEventsScopeElement;
6739      if (scopeElement && pointerEventsMutationOwnerByScopeElement.get(scopeElement) === instance) {
6740        instance.pointerEventsScopeElement?.style.removeProperty("pointer-events");
6741        instance.pointerEventsReferenceElement?.style.removeProperty("pointer-events");
6742        instance.pointerEventsFloatingElement?.style.removeProperty("pointer-events");
6743        pointerEventsMutationOwnerByScopeElement.delete(scopeElement);
6744      }
6745      instance.performedPointerEventsMutation = false;
6746      instance.pointerEventsScopeElement = null;
6747      instance.pointerEventsReferenceElement = null;
6748      instance.pointerEventsFloatingElement = null;
6749    }
6750    function applySafePolygonPointerEventsMutation(instance, options) {
6751      const {
6752        scopeElement,
6753        referenceElement,
6754        floatingElement
6755      } = options;
6756      const existingOwner = pointerEventsMutationOwnerByScopeElement.get(scopeElement);
6757      if (existingOwner && existingOwner !== instance) {
6758        clearSafePolygonPointerEventsMutation(existingOwner);
6759      }
6760      clearSafePolygonPointerEventsMutation(instance);
6761      instance.performedPointerEventsMutation = true;
6762      instance.pointerEventsScopeElement = scopeElement;
6763      instance.pointerEventsReferenceElement = referenceElement;
6764      instance.pointerEventsFloatingElement = floatingElement;
6765      pointerEventsMutationOwnerByScopeElement.set(scopeElement, instance);
6766      scopeElement.style.pointerEvents = "none";
6767      referenceElement.style.pointerEvents = "auto";
6768      floatingElement.style.pointerEvents = "auto";
6769    }
6770    function useHoverInteractionSharedState(store2) {
6771      const data = store2.context.dataRef.current;
6772      const instance = useRefWithInit(() => data.hoverInteractionState ?? HoverInteraction.create()).current;
6773      if (!data.hoverInteractionState) {
6774        data.hoverInteractionState = instance;
6775      }
6776      useOnMount(data.hoverInteractionState.disposeEffect);
6777      return data.hoverInteractionState;
6778    }
6779  
6780    // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
6781    function useHoverFloatingInteraction(context, parameters = {}) {
6782      const {
6783        enabled = true,
6784        closeDelay: closeDelayProp = 0,
6785        nodeId: nodeIdProp
6786      } = parameters;
6787      const store2 = "rootStore" in context ? context.rootStore : context;
6788      const open = store2.useState("open");
6789      const floatingElement = store2.useState("floatingElement");
6790      const domReferenceElement = store2.useState("domReferenceElement");
6791      const {
6792        dataRef
6793      } = store2.context;
6794      const tree = useFloatingTree();
6795      const parentId = useFloatingParentNodeId();
6796      const instance = useHoverInteractionSharedState(store2);
6797      const childClosedTimeout = useTimeout();
6798      const isClickLikeOpenEvent2 = useStableCallback(() => {
6799        return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
6800      });
6801      const isHoverOpen = useStableCallback(() => {
6802        return isHoverOpenEvent(dataRef.current.openEvent?.type);
6803      });
6804      const clearPointerEvents = useStableCallback(() => {
6805        clearSafePolygonPointerEventsMutation(instance);
6806      });
6807      useIsoLayoutEffect(() => {
6808        if (!open) {
6809          instance.pointerType = void 0;
6810          instance.restTimeoutPending = false;
6811          instance.interactedInside = false;
6812          clearPointerEvents();
6813        }
6814      }, [open, instance, clearPointerEvents]);
6815      React33.useEffect(() => {
6816        return clearPointerEvents;
6817      }, [clearPointerEvents]);
6818      useIsoLayoutEffect(() => {
6819        if (!enabled) {
6820          return void 0;
6821        }
6822        if (open && instance.handleCloseOptions?.blockPointerEvents && isHoverOpen() && isElement(domReferenceElement) && floatingElement) {
6823          const ref = domReferenceElement;
6824          const floatingEl = floatingElement;
6825          const doc = ownerDocument(floatingElement);
6826          const parentFloating = tree?.nodesRef.current.find((node) => node.id === parentId)?.context?.elements.floating;
6827          if (parentFloating) {
6828            parentFloating.style.pointerEvents = "";
6829          }
6830          const cachedScopeElement = instance.pointerEventsScopeElement !== floatingEl ? instance.pointerEventsScopeElement : null;
6831          const parentScopeElement = parentFloating !== floatingEl ? parentFloating : null;
6832          const scopeElement = instance.handleCloseOptions?.getScope?.() ?? cachedScopeElement ?? parentScopeElement ?? ref.closest("[data-rootownerid]") ?? doc.body;
6833          applySafePolygonPointerEventsMutation(instance, {
6834            scopeElement,
6835            referenceElement: ref,
6836            floatingElement: floatingEl
6837          });
6838          return () => {
6839            clearPointerEvents();
6840          };
6841        }
6842        return void 0;
6843      }, [enabled, open, domReferenceElement, floatingElement, instance, isHoverOpen, tree, parentId, clearPointerEvents]);
6844      React33.useEffect(() => {
6845        if (!enabled) {
6846          return void 0;
6847        }
6848        function hasParentChildren() {
6849          return !!(tree && parentId && getNodeChildren(tree.nodesRef.current, parentId).length > 0);
6850        }
6851        function closeWithDelay(event) {
6852          const closeDelay = getDelay(closeDelayProp, "close", instance.pointerType);
6853          const close = () => {
6854            store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6855            tree?.events.emit("floating.closed", event);
6856          };
6857          if (closeDelay) {
6858            instance.openChangeTimeout.start(closeDelay, close);
6859          } else {
6860            instance.openChangeTimeout.clear();
6861            close();
6862          }
6863        }
6864        function handleInteractInside(event) {
6865          const target = getTarget(event);
6866          if (!isInteractiveElement(target)) {
6867            instance.interactedInside = false;
6868            return;
6869          }
6870          instance.interactedInside = target?.closest("[aria-haspopup]") != null;
6871        }
6872        function onFloatingMouseEnter() {
6873          instance.openChangeTimeout.clear();
6874          childClosedTimeout.clear();
6875          tree?.events.off("floating.closed", onNodeClosed);
6876          clearPointerEvents();
6877        }
6878        function onFloatingMouseLeave(event) {
6879          if (hasParentChildren() && tree) {
6880            tree.events.on("floating.closed", onNodeClosed);
6881            return;
6882          }
6883          if (isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements)) {
6884            return;
6885          }
6886          const currentNodeId = dataRef.current.floatingContext?.nodeId ?? nodeIdProp;
6887          const relatedTarget = event.relatedTarget;
6888          const isMovingIntoDescendantFloating = tree && currentNodeId && isElement(relatedTarget) && getNodeChildren(tree.nodesRef.current, currentNodeId, false).some((node) => contains(node.context?.elements.floating, relatedTarget));
6889          if (isMovingIntoDescendantFloating) {
6890            return;
6891          }
6892          if (instance.handler) {
6893            instance.handler(event);
6894            return;
6895          }
6896          clearPointerEvents();
6897          if (isHoverOpen() && !isClickLikeOpenEvent2()) {
6898            closeWithDelay(event);
6899          }
6900        }
6901        function onNodeClosed(event) {
6902          if (!tree || !parentId || hasParentChildren()) {
6903            return;
6904          }
6905          childClosedTimeout.start(0, () => {
6906            tree.events.off("floating.closed", onNodeClosed);
6907            store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6908            tree.events.emit("floating.closed", event);
6909          });
6910        }
6911        const floating = floatingElement;
6912        return mergeCleanups(floating && addEventListener(floating, "mouseenter", onFloatingMouseEnter), floating && addEventListener(floating, "mouseleave", onFloatingMouseLeave), floating && addEventListener(floating, "pointerdown", handleInteractInside, true), () => {
6913          tree?.events.off("floating.closed", onNodeClosed);
6914        });
6915      }, [enabled, floatingElement, store2, dataRef, closeDelayProp, nodeIdProp, isHoverOpen, isClickLikeOpenEvent2, clearPointerEvents, instance, tree, parentId, childClosedTimeout]);
6916    }
6917  
6918    // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverReferenceInteraction.mjs
6919    var React34 = __toESM(require_react(), 1);
6920    var ReactDOM5 = __toESM(require_react_dom(), 1);
6921    var EMPTY_REF = {
6922      current: null
6923    };
6924    function useHoverReferenceInteraction(context, props = {}) {
6925      const {
6926        enabled = true,
6927        delay = 0,
6928        handleClose = null,
6929        mouseOnly = false,
6930        restMs = 0,
6931        move = true,
6932        triggerElementRef = EMPTY_REF,
6933        externalTree,
6934        isActiveTrigger = true,
6935        getHandleCloseContext,
6936        isClosing,
6937        shouldOpen: shouldOpenProp,
6938        guardStaleOpen = false
6939      } = props;
6940      const store2 = "rootStore" in context ? context.rootStore : context;
6941      const {
6942        dataRef,
6943        events
6944      } = store2.context;
6945      const tree = useFloatingTree(externalTree);
6946      const instance = useHoverInteractionSharedState(store2);
6947      const isHoverCloseActiveRef = React34.useRef(false);
6948      const handleCloseRef = useValueAsRef(handleClose);
6949      const delayRef = useValueAsRef(delay);
6950      const restMsRef = useValueAsRef(restMs);
6951      const enabledRef = useValueAsRef(enabled);
6952      const shouldOpenRef = useValueAsRef(shouldOpenProp);
6953      const isClosingRef = useValueAsRef(isClosing);
6954      const isClickLikeOpenEvent2 = useStableCallback(() => {
6955        return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
6956      });
6957      const checkShouldOpen = useStableCallback(() => {
6958        return shouldOpenRef.current?.() !== false;
6959      });
6960      const isOverInactiveTrigger = useStableCallback((currentDomReference, currentTarget, target) => {
6961        const allTriggers = store2.context.triggerElements;
6962        if (allTriggers.hasElement(currentTarget)) {
6963          return !currentDomReference || !contains(currentDomReference, currentTarget);
6964        }
6965        if (!isElement(target)) {
6966          return false;
6967        }
6968        const targetElement = target;
6969        return allTriggers.hasMatchingElement((trigger) => contains(trigger, targetElement)) && (!currentDomReference || !contains(currentDomReference, targetElement));
6970      });
6971      const cleanupMouseMoveHandler = useStableCallback(() => {
6972        if (!instance.handler) {
6973          return;
6974        }
6975        const doc = ownerDocument(store2.select("domReferenceElement"));
6976        doc.removeEventListener("mousemove", instance.handler);
6977        instance.handler = void 0;
6978      });
6979      const clearPointerEvents = useStableCallback(() => {
6980        clearSafePolygonPointerEventsMutation(instance);
6981      });
6982      if (isActiveTrigger) {
6983        instance.handleCloseOptions = handleCloseRef.current?.__options;
6984      }
6985      React34.useEffect(() => cleanupMouseMoveHandler, [cleanupMouseMoveHandler]);
6986      React34.useEffect(() => {
6987        if (!enabled) {
6988          return void 0;
6989        }
6990        function onOpenChangeLocal(details) {
6991          if (!details.open) {
6992            isHoverCloseActiveRef.current = details.reason === reason_parts_exports.triggerHover;
6993            cleanupMouseMoveHandler();
6994            instance.openChangeTimeout.clear();
6995            instance.restTimeout.clear();
6996            instance.blockMouseMove = true;
6997            instance.restTimeoutPending = false;
6998          } else {
6999            isHoverCloseActiveRef.current = false;
7000          }
7001        }
7002        events.on("openchange", onOpenChangeLocal);
7003        return () => {
7004          events.off("openchange", onOpenChangeLocal);
7005        };
7006      }, [enabled, events, instance, cleanupMouseMoveHandler]);
7007      React34.useEffect(() => {
7008        if (!enabled) {
7009          return void 0;
7010        }
7011        function closeWithDelay(event, runElseBranch = true) {
7012          const closeDelay = getDelay(delayRef.current, "close", instance.pointerType);
7013          if (closeDelay) {
7014            instance.openChangeTimeout.start(closeDelay, () => {
7015              store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
7016              tree?.events.emit("floating.closed", event);
7017            });
7018          } else if (runElseBranch) {
7019            instance.openChangeTimeout.clear();
7020            store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
7021            tree?.events.emit("floating.closed", event);
7022          }
7023        }
7024        const trigger = triggerElementRef.current ?? (isActiveTrigger ? store2.select("domReferenceElement") : null);
7025        if (!isElement(trigger)) {
7026          return void 0;
7027        }
7028        function onMouseEnter(event) {
7029          instance.openChangeTimeout.clear();
7030          instance.blockMouseMove = false;
7031          if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
7032            return;
7033          }
7034          const restMsValue = getRestMs(restMsRef.current);
7035          const openDelay = getDelay(delayRef.current, "open", instance.pointerType);
7036          const eventTarget = getTarget(event);
7037          const currentTarget = event.currentTarget ?? null;
7038          const currentDomReference = store2.select("domReferenceElement");
7039          let triggerNode = currentTarget;
7040          if (isElement(eventTarget) && !store2.context.triggerElements.hasElement(eventTarget)) {
7041            for (const triggerElement of store2.context.triggerElements.elements()) {
7042              if (contains(triggerElement, eventTarget)) {
7043                triggerNode = triggerElement;
7044                break;
7045              }
7046            }
7047          }
7048          if (isElement(currentTarget) && isElement(currentDomReference) && !store2.context.triggerElements.hasElement(currentTarget) && contains(currentTarget, currentDomReference)) {
7049            triggerNode = currentDomReference;
7050          }
7051          const isOverInactive = triggerNode == null ? false : isOverInactiveTrigger(currentDomReference, triggerNode, eventTarget);
7052          const isOpen = store2.select("open");
7053          const isInClosingTransition = isClosingRef.current?.() ?? store2.select("transitionStatus") === "ending";
7054          const isHoverCloseTransition = !isOpen && isInClosingTransition && isHoverCloseActiveRef.current;
7055          const isReenteringSameTriggerDuringCloseTransition = !isOverInactive && isElement(triggerNode) && isElement(currentDomReference) && contains(currentDomReference, triggerNode) && isHoverCloseTransition;
7056          const isRestOnlyDelay = restMsValue > 0 && !openDelay;
7057          const shouldOpenImmediately = isOverInactive && (isOpen || isHoverCloseTransition) || isReenteringSameTriggerDuringCloseTransition;
7058          const shouldOpen = !isOpen || isOverInactive;
7059          if (shouldOpenImmediately) {
7060            if (checkShouldOpen()) {
7061              store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
7062            }
7063            return;
7064          }
7065          if (isRestOnlyDelay) {
7066            return;
7067          }
7068          if (openDelay) {
7069            instance.openChangeTimeout.start(openDelay, () => {
7070              if (shouldOpen && checkShouldOpen()) {
7071                store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
7072              }
7073            });
7074          } else if (shouldOpen) {
7075            if (checkShouldOpen()) {
7076              store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
7077            }
7078          }
7079        }
7080        function onMouseLeave(event) {
7081          if (isClickLikeOpenEvent2()) {
7082            clearPointerEvents();
7083            return;
7084          }
7085          cleanupMouseMoveHandler();
7086          const domReferenceElement = store2.select("domReferenceElement");
7087          const doc = ownerDocument(domReferenceElement);
7088          instance.restTimeout.clear();
7089          instance.restTimeoutPending = false;
7090          const handleCloseContextBase = dataRef.current.floatingContext ?? getHandleCloseContext?.();
7091          if (isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements)) {
7092            return;
7093          }
7094          if (handleCloseRef.current && handleCloseContextBase) {
7095            if (!store2.select("open")) {
7096              instance.openChangeTimeout.clear();
7097            }
7098            const currentTrigger = triggerElementRef.current;
7099            instance.handler = handleCloseRef.current({
7100              ...handleCloseContextBase,
7101              tree,
7102              x: event.clientX,
7103              y: event.clientY,
7104              onClose() {
7105                clearPointerEvents();
7106                cleanupMouseMoveHandler();
7107                if (enabledRef.current && !isClickLikeOpenEvent2() && currentTrigger === store2.select("domReferenceElement")) {
7108                  closeWithDelay(event, true);
7109                }
7110              }
7111            });
7112            doc.addEventListener("mousemove", instance.handler);
7113            instance.handler(event);
7114            return;
7115          }
7116          const shouldClose = instance.pointerType === "touch" ? !contains(store2.select("floatingElement"), event.relatedTarget) : true;
7117          if (shouldClose) {
7118            closeWithDelay(event);
7119          }
7120        }
7121        function onMouseOut(event) {
7122          if (contains(trigger, event.relatedTarget)) {
7123            return;
7124          }
7125          instance.openChangeTimeout.clear();
7126          instance.restTimeout.clear();
7127          instance.restTimeoutPending = false;
7128        }
7129        const staleOpenGuard = guardStaleOpen ? addEventListener(trigger, "mouseout", onMouseOut) : void 0;
7130        if (move) {
7131          return mergeCleanups(addEventListener(trigger, "mousemove", onMouseEnter, {
7132            once: true
7133          }), addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
7134        }
7135        return mergeCleanups(addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
7136      }, [cleanupMouseMoveHandler, clearPointerEvents, dataRef, delayRef, store2, enabled, handleCloseRef, instance, isActiveTrigger, isOverInactiveTrigger, isClickLikeOpenEvent2, mouseOnly, move, restMsRef, triggerElementRef, tree, enabledRef, getHandleCloseContext, isClosingRef, checkShouldOpen, guardStaleOpen]);
7137      return React34.useMemo(() => {
7138        if (!enabled) {
7139          return void 0;
7140        }
7141        function setPointerRef(event) {
7142          instance.pointerType = event.pointerType;
7143        }
7144        return {
7145          onPointerDown: setPointerRef,
7146          onPointerEnter: setPointerRef,
7147          onMouseMove(event) {
7148            const {
7149              nativeEvent
7150            } = event;
7151            const trigger = event.currentTarget;
7152            const currentDomReference = store2.select("domReferenceElement");
7153            const currentOpen = store2.select("open");
7154            const isOverInactive = isOverInactiveTrigger(currentDomReference, trigger, event.target);
7155            if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
7156              return;
7157            }
7158            if (currentOpen && isOverInactive && instance.handleCloseOptions?.blockPointerEvents) {
7159              const floatingElement = store2.select("floatingElement");
7160              if (floatingElement) {
7161                const scopeElement = instance.handleCloseOptions?.getScope?.() ?? trigger.ownerDocument.body;
7162                applySafePolygonPointerEventsMutation(instance, {
7163                  scopeElement,
7164                  referenceElement: trigger,
7165                  floatingElement
7166                });
7167              }
7168            }
7169            const restMsValue = getRestMs(restMsRef.current);
7170            if (currentOpen && !isOverInactive || restMsValue === 0) {
7171              return;
7172            }
7173            if (!isOverInactive && instance.restTimeoutPending && event.movementX ** 2 + event.movementY ** 2 < 2) {
7174              return;
7175            }
7176            instance.restTimeout.clear();
7177            function handleMouseMove() {
7178              instance.restTimeoutPending = false;
7179              if (isClickLikeOpenEvent2()) {
7180                return;
7181              }
7182              const latestOpen = store2.select("open");
7183              if (!instance.blockMouseMove && (!latestOpen || isOverInactive) && checkShouldOpen()) {
7184                store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, nativeEvent, trigger));
7185              }
7186            }
7187            if (instance.pointerType === "touch") {
7188              ReactDOM5.flushSync(() => {
7189                handleMouseMove();
7190              });
7191            } else if (isOverInactive && currentOpen) {
7192              handleMouseMove();
7193            } else {
7194              instance.restTimeoutPending = true;
7195              instance.restTimeout.start(restMsValue, handleMouseMove);
7196            }
7197          }
7198        };
7199      }, [enabled, instance, isClickLikeOpenEvent2, isOverInactiveTrigger, mouseOnly, store2, restMsRef, checkShouldOpen]);
7200    }
7201  
7202    // node_modules/@base-ui/react/floating-ui-react/safePolygon.mjs
7203    var CURSOR_SPEED_THRESHOLD = 0.1;
7204    var CURSOR_SPEED_THRESHOLD_SQUARED = CURSOR_SPEED_THRESHOLD * CURSOR_SPEED_THRESHOLD;
7205    var POLYGON_BUFFER = 0.5;
7206    function hasIntersectingEdge(pointX, pointY, xi, yi, xj, yj) {
7207      return yi >= pointY !== yj >= pointY && pointX <= (xj - xi) * (pointY - yi) / (yj - yi) + xi;
7208    }
7209    function isPointInQuadrilateral(pointX, pointY, x1, y1, x2, y2, x3, y3, x4, y4) {
7210      let isInsideValue = false;
7211      if (hasIntersectingEdge(pointX, pointY, x1, y1, x2, y2)) {
7212        isInsideValue = !isInsideValue;
7213      }
7214      if (hasIntersectingEdge(pointX, pointY, x2, y2, x3, y3)) {
7215        isInsideValue = !isInsideValue;
7216      }
7217      if (hasIntersectingEdge(pointX, pointY, x3, y3, x4, y4)) {
7218        isInsideValue = !isInsideValue;
7219      }
7220      if (hasIntersectingEdge(pointX, pointY, x4, y4, x1, y1)) {
7221        isInsideValue = !isInsideValue;
7222      }
7223      return isInsideValue;
7224    }
7225    function isInsideRect(pointX, pointY, rect) {
7226      return pointX >= rect.x && pointX <= rect.x + rect.width && pointY >= rect.y && pointY <= rect.y + rect.height;
7227    }
7228    function isInsideAxisAlignedRect(pointX, pointY, x1, y1, x2, y2) {
7229      const minX = Math.min(x1, x2);
7230      const maxX = Math.max(x1, x2);
7231      const minY = Math.min(y1, y2);
7232      const maxY = Math.max(y1, y2);
7233      return pointX >= minX && pointX <= maxX && pointY >= minY && pointY <= maxY;
7234    }
7235    function safePolygon(options = {}) {
7236      const {
7237        blockPointerEvents = false
7238      } = options;
7239      const timeout = new Timeout();
7240      const fn = ({
7241        x,
7242        y,
7243        placement,
7244        elements,
7245        onClose,
7246        nodeId,
7247        tree
7248      }) => {
7249        const side = placement?.split("-")[0];
7250        let hasLanded = false;
7251        let lastX = null;
7252        let lastY = null;
7253        let lastCursorTime = typeof performance !== "undefined" ? performance.now() : 0;
7254        function isCursorMovingSlowly(nextX, nextY) {
7255          const currentTime = performance.now();
7256          const elapsedTime = currentTime - lastCursorTime;
7257          if (lastX === null || lastY === null || elapsedTime === 0) {
7258            lastX = nextX;
7259            lastY = nextY;
7260            lastCursorTime = currentTime;
7261            return false;
7262          }
7263          const deltaX = nextX - lastX;
7264          const deltaY = nextY - lastY;
7265          const distanceSquared = deltaX * deltaX + deltaY * deltaY;
7266          const thresholdSquared = elapsedTime * elapsedTime * CURSOR_SPEED_THRESHOLD_SQUARED;
7267          lastX = nextX;
7268          lastY = nextY;
7269          lastCursorTime = currentTime;
7270          return distanceSquared < thresholdSquared;
7271        }
7272        function close() {
7273          timeout.clear();
7274          onClose();
7275        }
7276        return function onMouseMove(event) {
7277          timeout.clear();
7278          const domReference = elements.domReference;
7279          const floating = elements.floating;
7280          if (!domReference || !floating || side == null || x == null || y == null) {
7281            return void 0;
7282          }
7283          const {
7284            clientX,
7285            clientY
7286          } = event;
7287          const target = getTarget(event);
7288          const isLeave = event.type === "mouseleave";
7289          const isOverFloatingEl = contains(floating, target);
7290          const isOverReferenceEl = contains(domReference, target);
7291          if (isOverFloatingEl) {
7292            hasLanded = true;
7293            if (!isLeave) {
7294              return void 0;
7295            }
7296          }
7297          if (isOverReferenceEl) {
7298            hasLanded = false;
7299            if (!isLeave) {
7300              hasLanded = true;
7301              return void 0;
7302            }
7303          }
7304          if (isLeave && isElement(event.relatedTarget) && contains(floating, event.relatedTarget)) {
7305            return void 0;
7306          }
7307          function hasOpenChildNode() {
7308            return Boolean(tree && getNodeChildren(tree.nodesRef.current, nodeId).length > 0);
7309          }
7310          function closeIfNoOpenChild() {
7311            if (!hasOpenChildNode()) {
7312              close();
7313            }
7314          }
7315          if (hasOpenChildNode()) {
7316            return void 0;
7317          }
7318          const refRect = domReference.getBoundingClientRect();
7319          const rect = floating.getBoundingClientRect();
7320          const cursorLeaveFromRight = x > rect.right - rect.width / 2;
7321          const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;
7322          const isFloatingWider = rect.width > refRect.width;
7323          const isFloatingTaller = rect.height > refRect.height;
7324          const left = (isFloatingWider ? refRect : rect).left;
7325          const right = (isFloatingWider ? refRect : rect).right;
7326          const top = (isFloatingTaller ? refRect : rect).top;
7327          const bottom = (isFloatingTaller ? refRect : rect).bottom;
7328          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) {
7329            closeIfNoOpenChild();
7330            return void 0;
7331          }
7332          let isInsideTroughRect = false;
7333          switch (side) {
7334            case "top":
7335              isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, refRect.top + 1, right, rect.bottom - 1);
7336              break;
7337            case "bottom":
7338              isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, rect.top + 1, right, refRect.bottom - 1);
7339              break;
7340            case "left":
7341              isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, rect.right - 1, bottom, refRect.left + 1, top);
7342              break;
7343            case "right":
7344              isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, refRect.right - 1, bottom, rect.left + 1, top);
7345              break;
7346            default:
7347          }
7348          if (isInsideTroughRect) {
7349            return void 0;
7350          }
7351          if (hasLanded && !isInsideRect(clientX, clientY, refRect)) {
7352            closeIfNoOpenChild();
7353            return void 0;
7354          }
7355          if (!isLeave && isCursorMovingSlowly(clientX, clientY)) {
7356            closeIfNoOpenChild();
7357            return void 0;
7358          }
7359          let isInsidePolygon = false;
7360          switch (side) {
7361            case "top": {
7362              const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
7363              const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
7364              const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
7365              const cursorPointY = y + POLYGON_BUFFER + 1;
7366              const commonYLeft = cursorLeaveFromRight ? rect.bottom - POLYGON_BUFFER : isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top;
7367              const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top : rect.bottom - POLYGON_BUFFER;
7368              isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
7369              break;
7370            }
7371            case "bottom": {
7372              const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
7373              const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
7374              const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
7375              const cursorPointY = y - POLYGON_BUFFER;
7376              const commonYLeft = cursorLeaveFromRight ? rect.top + POLYGON_BUFFER : isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom;
7377              const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom : rect.top + POLYGON_BUFFER;
7378              isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
7379              break;
7380            }
7381            case "left": {
7382              const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
7383              const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
7384              const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
7385              const cursorPointX = x + POLYGON_BUFFER + 1;
7386              const commonXTop = cursorLeaveFromBottom ? rect.right - POLYGON_BUFFER : isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left;
7387              const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left : rect.right - POLYGON_BUFFER;
7388              isInsidePolygon = isPointInQuadrilateral(clientX, clientY, commonXTop, rect.top, commonXBottom, rect.bottom, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY);
7389              break;
7390            }
7391            case "right": {
7392              const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
7393              const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
7394              const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
7395              const cursorPointX = x - POLYGON_BUFFER;
7396              const commonXTop = cursorLeaveFromBottom ? rect.left + POLYGON_BUFFER : isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right;
7397              const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right : rect.left + POLYGON_BUFFER;
7398              isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY, commonXTop, rect.top, commonXBottom, rect.bottom);
7399              break;
7400            }
7401            default:
7402          }
7403          if (!isInsidePolygon) {
7404            closeIfNoOpenChild();
7405          } else if (!hasLanded) {
7406            timeout.start(40, closeIfNoOpenChild);
7407          }
7408          return void 0;
7409        };
7410      };
7411      fn.__options = {
7412        ...options,
7413        blockPointerEvents
7414      };
7415      return fn;
7416    }
7417  
7418    // node_modules/@base-ui/react/utils/NullStore.mjs
7419    var NullStore = class extends ReactStore {
7420      // `update`/`set`/`notifyAll` funnel through `setState` in the base `Store`, so overriding
7421      // `setState` alone would neutralize them today. They are overridden explicitly so the store stays
7422      // inert even if a future base-class change stops routing a mutator through `setState`.
7423      setState(_newState) {
7424      }
7425      update(_changes) {
7426      }
7427      set(_key, _value) {
7428      }
7429      notifyAll() {
7430      }
7431    };
7432  
7433    // node_modules/@base-ui/react/utils/popupStateMapping.mjs
7434    var CommonPopupDataAttributes = (function(CommonPopupDataAttributes2) {
7435      CommonPopupDataAttributes2["open"] = "data-open";
7436      CommonPopupDataAttributes2["closed"] = "data-closed";
7437      CommonPopupDataAttributes2[CommonPopupDataAttributes2["startingStyle"] = TransitionStatusDataAttributes.startingStyle] = "startingStyle";
7438      CommonPopupDataAttributes2[CommonPopupDataAttributes2["endingStyle"] = TransitionStatusDataAttributes.endingStyle] = "endingStyle";
7439      CommonPopupDataAttributes2["anchorHidden"] = "data-anchor-hidden";
7440      CommonPopupDataAttributes2["side"] = "data-side";
7441      CommonPopupDataAttributes2["align"] = "data-align";
7442      return CommonPopupDataAttributes2;
7443    })({});
7444    var TRIGGER_HOOK = {
7445      "data-popup-open": ""
7446    };
7447    var POPUP_OPEN_HOOK = {
7448      "data-open": ""
7449    };
7450    var POPUP_CLOSED_HOOK = {
7451      "data-closed": ""
7452    };
7453    var ANCHOR_HIDDEN_HOOK = {
7454      "data-anchor-hidden": ""
7455    };
7456    var triggerOpenStateMapping2 = {
7457      open(value) {
7458        if (value) {
7459          return TRIGGER_HOOK;
7460        }
7461        return null;
7462      }
7463    };
7464    var popupStateMapping = {
7465      open(value) {
7466        if (value) {
7467          return POPUP_OPEN_HOOK;
7468        }
7469        return POPUP_CLOSED_HOOK;
7470      },
7471      anchorHidden(value) {
7472        if (value) {
7473          return ANCHOR_HIDDEN_HOOK;
7474        }
7475        return null;
7476      }
7477    };
7478    var popupTransitionStateMapping = {
7479      ...popupStateMapping,
7480      ...transitionStatusMapping
7481    };
7482  
7483    // node_modules/@base-ui/utils/inertValue.mjs
7484    function inertValue(value) {
7485      if (isReactVersionAtLeast(19)) {
7486        return value;
7487      }
7488      return value ? "true" : void 0;
7489    }
7490  
7491    // node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs
7492    var React35 = __toESM(require_react(), 1);
7493    var DirectionContext = /* @__PURE__ */ React35.createContext(void 0);
7494    if (true) DirectionContext.displayName = "DirectionContext";
7495    function useDirection() {
7496      const context = React35.useContext(DirectionContext);
7497      return context?.direction ?? "ltr";
7498    }
7499  
7500    // node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
7501    var React36 = __toESM(require_react(), 1);
7502  
7503    // node_modules/@base-ui/react/floating-ui-react/middleware/arrow.mjs
7504    var baseArrow = (options) => ({
7505      name: "arrow",
7506      options,
7507      async fn(state) {
7508        const {
7509          x,
7510          y,
7511          placement,
7512          rects,
7513          platform: platform3,
7514          elements,
7515          middlewareData
7516        } = state;
7517        const {
7518          element,
7519          padding = 0,
7520          offsetParent = "real"
7521        } = evaluate(options, state) || {};
7522        if (element == null) {
7523          return {};
7524        }
7525        const paddingObject = getPaddingObject(padding);
7526        const coords = {
7527          x,
7528          y
7529        };
7530        const axis = getAlignmentAxis(placement);
7531        const length = getAxisLength(axis);
7532        const arrowDimensions = await platform3.getDimensions(element);
7533        const isYAxis = axis === "y";
7534        const minProp = isYAxis ? "top" : "left";
7535        const maxProp = isYAxis ? "bottom" : "right";
7536        const clientProp = isYAxis ? "clientHeight" : "clientWidth";
7537        const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
7538        const startDiff = coords[axis] - rects.reference[axis];
7539        const arrowOffsetParent = offsetParent === "real" ? await platform3.getOffsetParent?.(element) : elements.floating;
7540        let clientSize = elements.floating[clientProp] || rects.floating[length];
7541        if (!clientSize || !await platform3.isElement?.(arrowOffsetParent)) {
7542          clientSize = elements.floating[clientProp] || rects.floating[length];
7543        }
7544        const centerToReference = endDiff / 2 - startDiff / 2;
7545        const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
7546        const minPadding = Math.min(paddingObject[minProp], largestPossiblePadding);
7547        const maxPadding = Math.min(paddingObject[maxProp], largestPossiblePadding);
7548        const min2 = minPadding;
7549        const max2 = clientSize - arrowDimensions[length] - maxPadding;
7550        const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
7551        const offset4 = clamp(min2, center, max2);
7552        const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset4 && rects.reference[length] / 2 - (center < min2 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
7553        const alignmentOffset = shouldAddOffset ? center < min2 ? center - min2 : center - max2 : 0;
7554        return {
7555          [axis]: coords[axis] + alignmentOffset,
7556          data: {
7557            [axis]: offset4,
7558            centerOffset: center - offset4 - alignmentOffset,
7559            ...shouldAddOffset && {
7560              alignmentOffset
7561            }
7562          },
7563          reset: shouldAddOffset
7564        };
7565      }
7566    });
7567    var arrow4 = (options, deps) => ({
7568      ...baseArrow(options),
7569      options: [options, deps]
7570    });
7571  
7572    // node_modules/@base-ui/react/utils/hideMiddleware.mjs
7573    var hide4 = {
7574      name: "hide",
7575      async fn(state) {
7576        const {
7577          width,
7578          height,
7579          x,
7580          y
7581        } = state.rects.reference;
7582        const anchorHidden = width === 0 && height === 0 && x === 0 && y === 0;
7583        const overflow = await state.platform.detectOverflow(state, {
7584          elementContext: "reference"
7585        });
7586        const referenceHidden = overflow.top - height >= 0 || overflow.right - width >= 0 || overflow.bottom - height >= 0 || overflow.left - width >= 0;
7587        return {
7588          data: {
7589            referenceHidden: referenceHidden || anchorHidden
7590          }
7591        };
7592      }
7593    };
7594  
7595    // node_modules/@base-ui/react/utils/adaptiveOriginConstants.mjs
7596    var DEFAULT_SIDES = {
7597      sideX: "left",
7598      sideY: "top"
7599    };
7600  
7601    // node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
7602    var AVAILABLE_WIDTH_VAR = "--available-width";
7603    var AVAILABLE_HEIGHT_VAR = "--available-height";
7604    function getLogicalSide(sideParam, renderedSide, isRtl) {
7605      const isLogicalSideParam = sideParam === "inline-start" || sideParam === "inline-end";
7606      const logicalRight = isRtl ? "inline-start" : "inline-end";
7607      const logicalLeft = isRtl ? "inline-end" : "inline-start";
7608      return {
7609        top: "top",
7610        right: isLogicalSideParam ? logicalRight : "right",
7611        bottom: "bottom",
7612        left: isLogicalSideParam ? logicalLeft : "left"
7613      }[renderedSide];
7614    }
7615    function getOffsetData(state, sideParam, isRtl) {
7616      const {
7617        rects,
7618        placement
7619      } = state;
7620      const data = {
7621        side: getLogicalSide(sideParam, getSide(placement), isRtl),
7622        align: getAlignment(placement) || "center",
7623        anchor: {
7624          width: rects.reference.width,
7625          height: rects.reference.height
7626        },
7627        positioner: {
7628          width: rects.floating.width,
7629          height: rects.floating.height
7630        }
7631      };
7632      return data;
7633    }
7634    function useAnchorPositioning(params) {
7635      return useAnchorPositioningWithHook(params, useBaseUIFloating);
7636    }
7637    function useAnchorPositioningWithHook(params, useFloatingHook) {
7638      const {
7639        // Public parameters
7640        anchor,
7641        positionMethod = "absolute",
7642        side: sideParam = "bottom",
7643        sideOffset = 0,
7644        align = "center",
7645        alignOffset = 0,
7646        collisionBoundary,
7647        collisionPadding: collisionPaddingParam = 5,
7648        sticky = false,
7649        arrowPadding = 5,
7650        disableAnchorTracking = false,
7651        inline: inlineMiddleware,
7652        // Private parameters
7653        keepMounted = false,
7654        floatingRootContext,
7655        mounted,
7656        collisionAvoidance,
7657        shift: shift4,
7658        nodeId,
7659        adaptiveOrigin: adaptiveOrigin2,
7660        lazyFlip = false,
7661        externalTree
7662      } = params;
7663      const [mountSide, setMountSide] = React36.useState(null);
7664      if (!mounted && mountSide !== null) {
7665        setMountSide(null);
7666      }
7667      const collisionAvoidanceSide = collisionAvoidance.side || "flip";
7668      const collisionAvoidanceAlign = collisionAvoidance.align || "flip";
7669      const collisionAvoidanceFallbackAxisSide = collisionAvoidance.fallbackAxisSide || "end";
7670      const shiftCrossAxis = shift4?.crossAxis ?? false;
7671      const shiftRootBoundary = shift4?.rootBoundary;
7672      const anchorFn = typeof anchor === "function" ? anchor : void 0;
7673      const anchorFnCallback = useStableCallback(anchorFn);
7674      const anchorDep = anchorFn ? anchorFnCallback : anchor;
7675      const anchorValueRef = useValueAsRef(anchor);
7676      const mountedRef = useValueAsRef(mounted);
7677      const direction = useDirection();
7678      const isRtl = direction === "rtl";
7679      const side = mountSide || {
7680        top: "top",
7681        right: "right",
7682        bottom: "bottom",
7683        left: "left",
7684        "inline-end": isRtl ? "left" : "right",
7685        "inline-start": isRtl ? "right" : "left"
7686      }[sideParam];
7687      const placement = align === "center" ? side : `$side}-$align}`;
7688      let collisionPadding = collisionPaddingParam;
7689      if (typeof collisionPadding === "number") {
7690        collisionPadding = {
7691          top: collisionPadding,
7692          right: collisionPadding,
7693          bottom: collisionPadding,
7694          left: collisionPadding
7695        };
7696      } else if (collisionPadding) {
7697        collisionPadding = {
7698          top: collisionPadding.top || 0,
7699          right: collisionPadding.right || 0,
7700          bottom: collisionPadding.bottom || 0,
7701          left: collisionPadding.left || 0
7702        };
7703      }
7704      const bias = 1;
7705      const biasTop = sideParam === "bottom" ? bias : 0;
7706      const biasBottom = sideParam === "top" ? bias : 0;
7707      const biasLeft = sideParam === "right" ? bias : 0;
7708      const biasRight = sideParam === "left" ? bias : 0;
7709      const commonCollisionProps = {
7710        boundary: collisionBoundary === "clipping-ancestors" ? "clippingAncestors" : collisionBoundary,
7711        padding: collisionPadding
7712      };
7713      const arrowRef = React36.useRef(null);
7714      const sideOffsetRef = useValueAsRef(sideOffset);
7715      const alignOffsetRef = useValueAsRef(alignOffset);
7716      const sideOffsetDep = typeof sideOffset !== "function" ? sideOffset : 0;
7717      const alignOffsetDep = typeof alignOffset !== "function" ? alignOffset : 0;
7718      const middleware = [];
7719      if (inlineMiddleware) {
7720        middleware.push(inlineMiddleware);
7721      }
7722      middleware.push(offset3((state) => {
7723        const data = getOffsetData(state, sideParam, isRtl);
7724        const sideAxis = typeof sideOffsetRef.current === "function" ? sideOffsetRef.current(data) : sideOffsetRef.current;
7725        const alignAxis = typeof alignOffsetRef.current === "function" ? alignOffsetRef.current(data) : alignOffsetRef.current;
7726        return {
7727          mainAxis: sideAxis,
7728          crossAxis: alignAxis,
7729          alignmentAxis: alignAxis
7730        };
7731      }, [sideOffsetDep, alignOffsetDep, isRtl, sideParam]));
7732      const shiftDisabled = collisionAvoidanceAlign === "none" && collisionAvoidanceSide !== "shift";
7733      const crossAxisShiftEnabled = !shiftDisabled && (sticky || shiftCrossAxis || collisionAvoidanceSide === "shift");
7734      const flipMiddleware = collisionAvoidanceSide === "none" ? null : flip3({
7735        ...commonCollisionProps,
7736        // Ensure the popup flips if it's been limited by its --available-height and it resizes.
7737        // Since the size() padding is smaller than the flip() padding, flip() will take precedence.
7738        padding: {
7739          top: collisionPadding.top + bias + biasTop,
7740          right: collisionPadding.right + bias + biasRight,
7741          bottom: collisionPadding.bottom + bias + biasBottom,
7742          left: collisionPadding.left + bias + biasLeft
7743        },
7744        mainAxis: !shiftCrossAxis && collisionAvoidanceSide === "flip",
7745        crossAxis: collisionAvoidanceAlign === "flip" ? "alignment" : false,
7746        fallbackAxisSideDirection: collisionAvoidanceFallbackAxisSide
7747      });
7748      const shiftMiddleware = shiftDisabled ? null : shift3({
7749        ...commonCollisionProps,
7750        // Use the Layout Viewport to avoid shifting around when pinch-zooming.
7751        rootBoundary: shiftRootBoundary,
7752        mainAxis: collisionAvoidanceAlign !== "none",
7753        crossAxis: crossAxisShiftEnabled,
7754        limiter: sticky || shiftCrossAxis ? void 0 : limitShift3((limitData) => {
7755          if (!arrowRef.current) {
7756            return {};
7757          }
7758          const {
7759            width,
7760            height
7761          } = arrowRef.current.getBoundingClientRect();
7762          const sideAxis = getSideAxis(getSide(limitData.placement));
7763          const arrowSize = sideAxis === "y" ? width : height;
7764          const offsetAmount = sideAxis === "y" ? collisionPadding.left + collisionPadding.right : collisionPadding.top + collisionPadding.bottom;
7765          return {
7766            offset: arrowSize / 2 + offsetAmount / 2
7767          };
7768        })
7769      }, [commonCollisionProps, sticky, shiftCrossAxis, shiftRootBoundary, collisionPadding, collisionAvoidanceAlign]);
7770      if (collisionAvoidanceSide === "shift" || collisionAvoidanceAlign === "shift" || align === "center") {
7771        middleware.push(shiftMiddleware, flipMiddleware);
7772      } else {
7773        middleware.push(flipMiddleware, shiftMiddleware);
7774      }
7775      middleware.push(size3({
7776        ...commonCollisionProps,
7777        apply({
7778          elements: {
7779            floating
7780          },
7781          availableWidth,
7782          availableHeight,
7783          rects
7784        }) {
7785          if (!mountedRef.current) {
7786            return;
7787          }
7788          const floatingStyle = floating.style;
7789          floatingStyle.setProperty(AVAILABLE_WIDTH_VAR, `$availableWidth}px`);
7790          floatingStyle.setProperty(AVAILABLE_HEIGHT_VAR, `$availableHeight}px`);
7791          const dpr = getWindow(floating).devicePixelRatio || 1;
7792          const {
7793            x: x2,
7794            y: y2,
7795            width,
7796            height
7797          } = rects.reference;
7798          const anchorWidth = (Math.round((x2 + width) * dpr) - Math.round(x2 * dpr)) / dpr;
7799          const anchorHeight = (Math.round((y2 + height) * dpr) - Math.round(y2 * dpr)) / dpr;
7800          floatingStyle.setProperty("--anchor-width", `$anchorWidth}px`);
7801          floatingStyle.setProperty("--anchor-height", `$anchorHeight}px`);
7802        }
7803      }), arrow4((state) => ({
7804        // `transform-origin` calculations rely on an element existing. If the arrow hasn't been set,
7805        // we'll create a fake element.
7806        element: arrowRef.current || ownerDocument(state.elements.floating).createElement("div"),
7807        padding: arrowPadding,
7808        offsetParent: "floating"
7809      }), [arrowPadding]), {
7810        name: "transformOrigin",
7811        fn(state) {
7812          const {
7813            elements: elements2,
7814            middlewareData: middlewareData2,
7815            placement: renderedPlacement2,
7816            rects,
7817            y: y2
7818          } = state;
7819          const currentRenderedSide = getSide(renderedPlacement2);
7820          const currentRenderedAxis = getSideAxis(currentRenderedSide);
7821          const arrowEl = arrowRef.current;
7822          const arrowX = middlewareData2.arrow?.x || 0;
7823          const arrowY = middlewareData2.arrow?.y || 0;
7824          const arrowWidth = arrowEl?.clientWidth || 0;
7825          const arrowHeight = arrowEl?.clientHeight || 0;
7826          const transformX = arrowX + arrowWidth / 2;
7827          const transformY = arrowY + arrowHeight / 2;
7828          const shiftY = Math.abs(middlewareData2.shift?.y || 0);
7829          const halfAnchorHeight = rects.reference.height / 2;
7830          const sideOffsetValue = typeof sideOffset === "function" ? sideOffset(getOffsetData(state, sideParam, isRtl)) : sideOffset;
7831          const isOverlappingAnchor = shiftY > sideOffsetValue;
7832          const adjacentTransformOrigin = {
7833            top: `$transformX}px calc(100% + $sideOffsetValue}px)`,
7834            bottom: `$transformX}px ${-sideOffsetValue}px`,
7835            left: `calc(100% + $sideOffsetValue}px) $transformY}px`,
7836            right: `${-sideOffsetValue}px $transformY}px`
7837          }[currentRenderedSide];
7838          const overlapTransformOrigin = `$transformX}px $rects.reference.y + halfAnchorHeight - y2}px`;
7839          elements2.floating.style.setProperty("--transform-origin", crossAxisShiftEnabled && currentRenderedAxis === "y" && isOverlappingAnchor ? overlapTransformOrigin : adjacentTransformOrigin);
7840          return {};
7841        }
7842      }, hide4, adaptiveOrigin2);
7843      useIsoLayoutEffect(() => {
7844        if (!mounted && floatingRootContext) {
7845          floatingRootContext.update({
7846            referenceElement: null,
7847            floatingElement: null,
7848            domReferenceElement: null,
7849            positionReference: null
7850          });
7851        }
7852      }, [mounted, floatingRootContext]);
7853      const autoUpdateOptions = React36.useMemo(() => ({
7854        elementResize: !disableAnchorTracking && typeof ResizeObserver !== "undefined",
7855        layoutShift: !disableAnchorTracking && typeof IntersectionObserver !== "undefined"
7856      }), [disableAnchorTracking]);
7857      const {
7858        refs,
7859        elements,
7860        x,
7861        y,
7862        middlewareData,
7863        update: update2,
7864        placement: renderedPlacement,
7865        context,
7866        isPositioned,
7867        floatingStyles: originalFloatingStyles
7868      } = useFloatingHook({
7869        rootContext: floatingRootContext,
7870        open: keepMounted ? mounted : void 0,
7871        placement,
7872        middleware,
7873        strategy: positionMethod,
7874        whileElementsMounted: keepMounted ? void 0 : (...args) => autoUpdate(...args, autoUpdateOptions),
7875        nodeId,
7876        externalTree
7877      });
7878      const {
7879        sideX,
7880        sideY
7881      } = middlewareData.adaptiveOrigin || DEFAULT_SIDES;
7882      const resolvedPosition = isPositioned ? positionMethod : "fixed";
7883      const floatingStyles = React36.useMemo(() => {
7884        let base;
7885        if (!isPositioned) {
7886          base = {
7887            position: resolvedPosition,
7888            top: 0,
7889            left: 0
7890          };
7891        } else if (adaptiveOrigin2) {
7892          base = {
7893            position: resolvedPosition,
7894            [sideX]: x,
7895            [sideY]: y
7896          };
7897        } else {
7898          base = {
7899            ...originalFloatingStyles,
7900            position: resolvedPosition
7901          };
7902        }
7903        base[AVAILABLE_WIDTH_VAR] = "100vw";
7904        base[AVAILABLE_HEIGHT_VAR] = "100vh";
7905        if (!isPositioned) {
7906          base.opacity = 0;
7907        }
7908        return base;
7909      }, [adaptiveOrigin2, resolvedPosition, sideX, x, sideY, y, originalFloatingStyles, isPositioned]);
7910      const registeredPositionReferenceRef = React36.useRef(null);
7911      useIsoLayoutEffect(() => {
7912        if (!mounted) {
7913          return;
7914        }
7915        const anchorValue = anchorValueRef.current;
7916        const resolvedAnchor = typeof anchorValue === "function" ? anchorValue() : anchorValue;
7917        const unwrappedElement = (isRef(resolvedAnchor) ? resolvedAnchor.current : resolvedAnchor) || null;
7918        const finalAnchor = unwrappedElement || null;
7919        if (finalAnchor !== registeredPositionReferenceRef.current) {
7920          refs.setPositionReference(finalAnchor);
7921          registeredPositionReferenceRef.current = finalAnchor;
7922        }
7923      }, [mounted, refs, anchorDep, anchorValueRef]);
7924      React36.useEffect(() => {
7925        if (!mounted) {
7926          return;
7927        }
7928        const anchorValue = anchorValueRef.current;
7929        if (typeof anchorValue === "function") {
7930          return;
7931        }
7932        if (isRef(anchorValue) && anchorValue.current !== registeredPositionReferenceRef.current) {
7933          refs.setPositionReference(anchorValue.current);
7934          registeredPositionReferenceRef.current = anchorValue.current;
7935        }
7936      }, [mounted, refs, anchorDep, anchorValueRef]);
7937      React36.useEffect(() => {
7938        if (keepMounted && mounted && elements.reference && elements.floating) {
7939          return autoUpdate(elements.reference, elements.floating, update2, autoUpdateOptions);
7940        }
7941        return void 0;
7942      }, [keepMounted, mounted, elements, update2, autoUpdateOptions]);
7943      const renderedSide = getSide(renderedPlacement);
7944      const logicalRenderedSide = getLogicalSide(sideParam, renderedSide, isRtl);
7945      const renderedAlign = getAlignment(renderedPlacement) || "center";
7946      const anchorHidden = Boolean(middlewareData.hide?.referenceHidden);
7947      useIsoLayoutEffect(() => {
7948        if (lazyFlip && mounted && isPositioned && renderedSide !== side) {
7949          setMountSide(renderedSide);
7950        }
7951      }, [lazyFlip, mounted, isPositioned, renderedSide, side]);
7952      const arrowStyles = React36.useMemo(() => ({
7953        position: "absolute",
7954        top: middlewareData.arrow?.y,
7955        left: middlewareData.arrow?.x
7956      }), [middlewareData.arrow]);
7957      const arrowUncentered = middlewareData.arrow?.centerOffset !== 0;
7958      return React36.useMemo(() => ({
7959        positionerStyles: floatingStyles,
7960        arrowStyles,
7961        arrowRef,
7962        arrowUncentered,
7963        side: logicalRenderedSide,
7964        align: renderedAlign,
7965        physicalSide: renderedSide,
7966        anchorHidden,
7967        refs,
7968        context,
7969        isPositioned,
7970        update: update2
7971      }), [floatingStyles, arrowStyles, arrowRef, arrowUncentered, logicalRenderedSide, renderedAlign, renderedSide, anchorHidden, refs, context, isPositioned, update2]);
7972    }
7973    function isRef(param) {
7974      return param != null && "current" in param;
7975    }
7976  
7977    // node_modules/@base-ui/react/internals/getDisabledMountTransitionStyles.mjs
7978    function getDisabledMountTransitionStyles(transitionStatus) {
7979      return transitionStatus === "starting" ? DISABLED_TRANSITIONS_STYLE : EMPTY_OBJECT;
7980    }
7981  
7982    // node_modules/@base-ui/react/utils/usePositioner.mjs
7983    function usePositioner(componentProps, state, {
7984      styles,
7985      transitionStatus,
7986      props,
7987      refs,
7988      hidden,
7989      inert = false
7990    }) {
7991      const style = {
7992        ...styles
7993      };
7994      if (inert) {
7995        style.pointerEvents = "none";
7996      }
7997      return useRenderElement("div", componentProps, {
7998        state,
7999        ref: refs,
8000        props: [{
8001          role: "presentation",
8002          hidden,
8003          style
8004        }, getDisabledMountTransitionStyles(transitionStatus), props],
8005        stateAttributesMapping: popupStateMapping
8006      });
8007    }
8008  
8009    // node_modules/@base-ui/react/button/Button.mjs
8010    var React37 = __toESM(require_react(), 1);
8011    var Button = /* @__PURE__ */ React37.forwardRef(function Button2(componentProps, forwardedRef) {
8012      const {
8013        render,
8014        className,
8015        disabled: disabled2 = false,
8016        focusableWhenDisabled = false,
8017        nativeButton = true,
8018        style,
8019        ...elementProps
8020      } = componentProps;
8021      const {
8022        getButtonProps,
8023        buttonRef
8024      } = useButton({
8025        disabled: disabled2,
8026        focusableWhenDisabled,
8027        native: nativeButton
8028      });
8029      const state = {
8030        disabled: disabled2
8031      };
8032      return useRenderElement("button", componentProps, {
8033        state,
8034        ref: [forwardedRef, buttonRef],
8035        props: [elementProps, getButtonProps]
8036      });
8037    });
8038    if (true) Button.displayName = "Button";
8039  
8040    // node_modules/@base-ui/react/collapsible/index.parts.mjs
8041    var index_parts_exports = {};
8042    __export(index_parts_exports, {
8043      Panel: () => CollapsiblePanel,
8044      Root: () => CollapsibleRoot,
8045      Trigger: () => CollapsibleTrigger
8046    });
8047  
8048    // node_modules/@base-ui/react/collapsible/root/CollapsibleRoot.mjs
8049    var React38 = __toESM(require_react(), 1);
8050  
8051    // node_modules/@base-ui/react/collapsible/root/stateAttributesMapping.mjs
8052    var collapsibleStateAttributesMapping = {
8053      ...collapsibleOpenStateMapping,
8054      ...transitionStatusMapping
8055    };
8056  
8057    // node_modules/@base-ui/react/collapsible/root/CollapsibleRoot.mjs
8058    var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
8059    var CollapsibleRoot = /* @__PURE__ */ React38.forwardRef(function CollapsibleRoot2(componentProps, forwardedRef) {
8060      const {
8061        render,
8062        className,
8063        defaultOpen = false,
8064        disabled: disabled2 = false,
8065        onOpenChange: onOpenChangeProp,
8066        open,
8067        style,
8068        ...elementProps
8069      } = componentProps;
8070      const onOpenChange = useStableCallback(onOpenChangeProp);
8071      const collapsible = useCollapsibleRoot({
8072        open,
8073        defaultOpen,
8074        onOpenChange,
8075        disabled: disabled2
8076      });
8077      const state = React38.useMemo(() => ({
8078        open: collapsible.open,
8079        disabled: collapsible.disabled,
8080        transitionStatus: collapsible.transitionStatus
8081      }), [collapsible.open, collapsible.disabled, collapsible.transitionStatus]);
8082      const contextValue = React38.useMemo(() => ({
8083        ...collapsible,
8084        onOpenChange,
8085        state
8086      }), [collapsible, onOpenChange, state]);
8087      const element = useRenderElement("div", componentProps, {
8088        state,
8089        ref: forwardedRef,
8090        props: elementProps,
8091        stateAttributesMapping: collapsibleStateAttributesMapping
8092      });
8093      return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CollapsibleRootContext.Provider, {
8094        value: contextValue,
8095        children: element
8096      });
8097    });
8098    if (true) CollapsibleRoot.displayName = "CollapsibleRoot";
8099  
8100    // node_modules/@base-ui/react/collapsible/trigger/CollapsibleTrigger.mjs
8101    var React39 = __toESM(require_react(), 1);
8102    var stateAttributesMapping = {
8103      ...triggerOpenStateMapping,
8104      ...transitionStatusMapping
8105    };
8106    var CollapsibleTrigger = /* @__PURE__ */ React39.forwardRef(function CollapsibleTrigger2(componentProps, forwardedRef) {
8107      const {
8108        panelId,
8109        open,
8110        handleTrigger,
8111        state,
8112        disabled: contextDisabled
8113      } = useCollapsibleRootContext();
8114      const {
8115        className,
8116        disabled: disabled2 = contextDisabled,
8117        render,
8118        nativeButton = true,
8119        style,
8120        ...elementProps
8121      } = componentProps;
8122      const {
8123        getButtonProps,
8124        buttonRef
8125      } = useButton({
8126        disabled: disabled2,
8127        focusableWhenDisabled: true,
8128        native: nativeButton
8129      });
8130      const element = useRenderElement("button", componentProps, {
8131        state,
8132        ref: [forwardedRef, buttonRef],
8133        props: [{
8134          "aria-controls": open ? panelId : void 0,
8135          "aria-expanded": open,
8136          onClick: handleTrigger
8137        }, elementProps, getButtonProps],
8138        stateAttributesMapping
8139      });
8140      return element;
8141    });
8142    if (true) CollapsibleTrigger.displayName = "CollapsibleTrigger";
8143  
8144    // node_modules/@base-ui/react/collapsible/panel/CollapsiblePanel.mjs
8145    var React40 = __toESM(require_react(), 1);
8146  
8147    // node_modules/@base-ui/react/collapsible/panel/CollapsiblePanelCssVars.mjs
8148    var CollapsiblePanelCssVars = /* @__PURE__ */ (function(CollapsiblePanelCssVars2) {
8149      CollapsiblePanelCssVars2["collapsiblePanelHeight"] = "--collapsible-panel-height";
8150      CollapsiblePanelCssVars2["collapsiblePanelWidth"] = "--collapsible-panel-width";
8151      return CollapsiblePanelCssVars2;
8152    })({});
8153  
8154    // node_modules/@base-ui/react/collapsible/panel/CollapsiblePanel.mjs
8155    var CollapsiblePanel = /* @__PURE__ */ React40.forwardRef(function CollapsiblePanel2(componentProps, forwardedRef) {
8156      const {
8157        className,
8158        hiddenUntilFound: hiddenUntilFoundProp,
8159        keepMounted: keepMountedProp,
8160        render,
8161        id: idProp,
8162        style,
8163        ...elementProps
8164      } = componentProps;
8165      if (true) {
8166        React40.useEffect(() => {
8167          if (hiddenUntilFoundProp && keepMountedProp === false) {
8168            warn("The `keepMounted={false}` prop on `Collapsible.Panel` is ignored when `hiddenUntilFound` is enabled, since the panel must remain mounted while closed.");
8169          }
8170        }, [hiddenUntilFoundProp, keepMountedProp]);
8171      }
8172      const {
8173        defaultPanelId,
8174        mounted,
8175        onOpenChange,
8176        open,
8177        setMounted,
8178        setPanelIdState,
8179        setOpen,
8180        state,
8181        transitionStatus
8182      } = useCollapsibleRootContext();
8183      const hiddenUntilFound = hiddenUntilFoundProp ?? false;
8184      const keepMounted = keepMountedProp ?? false;
8185      const registeredId = idProp || void 0;
8186      const id = registeredId ?? defaultPanelId;
8187      useIsoLayoutEffect(() => {
8188        setPanelIdState((currentId) => registeredId ?? (currentId === null ? void 0 : currentId));
8189        return () => {
8190          setPanelIdState((currentId) => currentId === registeredId ? null : currentId);
8191        };
8192      }, [registeredId, setPanelIdState]);
8193      const {
8194        height,
8195        props,
8196        ref,
8197        shouldPreventOpenAnimation,
8198        shouldRender,
8199        transitionStatus: panelTransitionStatus,
8200        width
8201      } = useCollapsiblePanel({
8202        externalRef: forwardedRef,
8203        hiddenUntilFound,
8204        id,
8205        keepMounted,
8206        mounted,
8207        onOpenChange,
8208        open,
8209        setMounted,
8210        setOpen,
8211        transitionStatus
8212      });
8213      const panelState = {
8214        ...state,
8215        transitionStatus: panelTransitionStatus
8216      };
8217      const resolvedStyle = resolveStyle(style, panelState);
8218      const element = useRenderElement("div", {
8219        ...componentProps,
8220        style: void 0
8221      }, {
8222        state: panelState,
8223        ref,
8224        props: [
8225          props,
8226          {
8227            style: {
8228              [CollapsiblePanelCssVars.collapsiblePanelHeight]: height === void 0 ? "auto" : `$height}px`,
8229              [CollapsiblePanelCssVars.collapsiblePanelWidth]: width === void 0 ? "auto" : `$width}px`
8230            }
8231          },
8232          elementProps,
8233          resolvedStyle ? {
8234            style: resolvedStyle
8235          } : void 0,
8236          // Resolve the public `style` prop so temporary `animationName: 'none'`
8237          // can still win after user's inline styles have been merged.
8238          shouldPreventOpenAnimation ? {
8239            style: {
8240              animationName: "none"
8241            }
8242          } : void 0
8243        ],
8244        stateAttributesMapping: collapsibleStateAttributesMapping
8245      });
8246      if (!shouldRender) {
8247        return null;
8248      }
8249      return element;
8250    });
8251    if (true) CollapsiblePanel.displayName = "CollapsiblePanel";
8252  
8253    // node_modules/@base-ui/react/utils/usePopupViewport.mjs
8254    var React44 = __toESM(require_react(), 1);
8255    var ReactDOM6 = __toESM(require_react_dom(), 1);
8256  
8257    // node_modules/@base-ui/utils/usePreviousValue.mjs
8258    var React41 = __toESM(require_react(), 1);
8259    function usePreviousValue(value) {
8260      const [state, setState] = React41.useState({
8261        current: value,
8262        previous: null
8263      });
8264      if (!Object.is(value, state.current)) {
8265        setState({
8266          current: value,
8267          previous: state.current
8268        });
8269      }
8270      return state.previous;
8271    }
8272  
8273    // node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
8274    var React42 = __toESM(require_react(), 1);
8275  
8276    // node_modules/@base-ui/react/utils/getCssDimensions.mjs
8277    function getCssDimensions2(element) {
8278      const css = getComputedStyle2(element);
8279      let width = parseFloat(css.width) || 0;
8280      let height = parseFloat(css.height) || 0;
8281      const hasOffset = isHTMLElement(element);
8282      const offsetWidth = hasOffset ? element.offsetWidth : width;
8283      const offsetHeight = hasOffset ? element.offsetHeight : height;
8284      const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
8285      if (shouldFallback) {
8286        width = offsetWidth;
8287        height = offsetHeight;
8288      }
8289      return {
8290        width,
8291        height
8292      };
8293    }
8294  
8295    // node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
8296    function usePopupAutoResize(parameters) {
8297      const {
8298        popupElement,
8299        positionerElement,
8300        content,
8301        mounted,
8302        onMeasureLayout: onMeasureLayoutParam,
8303        onMeasureLayoutComplete: onMeasureLayoutCompleteParam,
8304        side,
8305        direction
8306      } = parameters;
8307      const runOnceAnimationsFinish = useAnimationsFinished(popupElement, true);
8308      const animationFrame = useAnimationFrame();
8309      const committedDimensionsRef = React42.useRef(null);
8310      const isInitialRenderRef = React42.useRef(true);
8311      const restoreAnchoringStylesRef = React42.useRef(NOOP);
8312      const onMeasureLayout = useStableCallback(onMeasureLayoutParam);
8313      const onMeasureLayoutComplete = useStableCallback(onMeasureLayoutCompleteParam);
8314      const anchoringStyles = React42.useMemo(() => getPopupAnchoringStyles(side, direction), [side, direction]);
8315      useIsoLayoutEffect(() => {
8316        if (!mounted) {
8317          restoreAnchoringStylesRef.current = NOOP;
8318          isInitialRenderRef.current = true;
8319          committedDimensionsRef.current = null;
8320          return void 0;
8321        }
8322        if (!popupElement || !positionerElement) {
8323          return void 0;
8324        }
8325        restoreAnchoringStylesRef.current = applyElementStyles(popupElement, anchoringStyles);
8326        setPopupCssSize(popupElement, "auto");
8327        const restorePopupPosition = overrideElementStyle(popupElement, "position", "static");
8328        const restorePopupTransform = overrideElementStyle(popupElement, "transform", "none");
8329        const restorePopupScale = overrideElementStyle(popupElement, "scale", "1");
8330        const restorePositionerAvailableSize = applyElementStyles(positionerElement, {
8331          "--available-width": "max-content",
8332          "--available-height": "max-content"
8333        });
8334        function restoreMeasurementOverrides() {
8335          restorePopupPosition();
8336          restorePopupTransform();
8337          restorePositionerAvailableSize();
8338        }
8339        function restoreMeasurementOverridesIncludingScale() {
8340          restoreMeasurementOverrides();
8341          restorePopupScale();
8342        }
8343        onMeasureLayout?.();
8344        if (isInitialRenderRef.current || committedDimensionsRef.current === null) {
8345          setPositionerCssSize(positionerElement, "max-content");
8346          const dimensions = getCssDimensions2(popupElement);
8347          committedDimensionsRef.current = dimensions;
8348          setPositionerCssSize(positionerElement, dimensions);
8349          restoreMeasurementOverridesIncludingScale();
8350          onMeasureLayoutComplete?.(null, dimensions);
8351          isInitialRenderRef.current = false;
8352          return () => {
8353            restoreAnchoringStylesRef.current();
8354            restoreAnchoringStylesRef.current = NOOP;
8355          };
8356        }
8357        setPositionerCssSize(positionerElement, "max-content");
8358        const previousDimensions = committedDimensionsRef.current;
8359        const newDimensions = getCssDimensions2(popupElement);
8360        committedDimensionsRef.current = newDimensions;
8361        setPopupCssSize(popupElement, previousDimensions);
8362        restoreMeasurementOverridesIncludingScale();
8363        onMeasureLayoutComplete?.(previousDimensions, newDimensions);
8364        setPositionerCssSize(positionerElement, newDimensions);
8365        const abortController = new AbortController();
8366        animationFrame.request(() => {
8367          setPopupCssSize(popupElement, newDimensions);
8368          runOnceAnimationsFinish(() => {
8369            popupElement.style.setProperty("--popup-width", "auto");
8370            popupElement.style.setProperty("--popup-height", "auto");
8371          }, abortController.signal);
8372        });
8373        return () => {
8374          abortController.abort();
8375          animationFrame.cancel();
8376          restoreAnchoringStylesRef.current();
8377          restoreAnchoringStylesRef.current = NOOP;
8378        };
8379      }, [content, popupElement, positionerElement, runOnceAnimationsFinish, animationFrame, mounted, onMeasureLayout, onMeasureLayoutComplete, anchoringStyles]);
8380    }
8381    function getPopupAnchoringStyles(side, direction) {
8382      const isPhysicalTop = side === "top";
8383      const isPhysicalLeft = side === "left" || side === (direction === "rtl" ? "inline-end" : "inline-start");
8384      if (!isPhysicalTop && !isPhysicalLeft) {
8385        return EMPTY_OBJECT;
8386      }
8387      return {
8388        position: "absolute",
8389        [isPhysicalTop ? "bottom" : "top"]: "0",
8390        [isPhysicalLeft ? "right" : "left"]: "0"
8391      };
8392    }
8393    function overrideElementStyle(element, property, value) {
8394      const originalValue = element.style.getPropertyValue(property);
8395      element.style.setProperty(property, value);
8396      return () => {
8397        element.style.setProperty(property, originalValue);
8398      };
8399    }
8400    function applyElementStyles(element, styles) {
8401      const restorers = [];
8402      for (const [key, value] of Object.entries(styles)) {
8403        restorers.push(overrideElementStyle(element, key, value));
8404      }
8405      return restorers.length ? () => {
8406        restorers.forEach((restore) => restore());
8407      } : NOOP;
8408    }
8409    function setPopupCssSize(popupElement, size4) {
8410      const width = size4 === "auto" ? "auto" : `$size4.width}px`;
8411      const height = size4 === "auto" ? "auto" : `$size4.height}px`;
8412      popupElement.style.setProperty("--popup-width", width);
8413      popupElement.style.setProperty("--popup-height", height);
8414    }
8415    function setPositionerCssSize(positionerElement, size4) {
8416      const width = size4 === "max-content" ? "max-content" : `$size4.width}px`;
8417      const height = size4 === "max-content" ? "max-content" : `$size4.height}px`;
8418      positionerElement.style.setProperty("--positioner-width", width);
8419      positionerElement.style.setProperty("--positioner-height", height);
8420    }
8421  
8422    // node_modules/@base-ui/react/direction-provider/DirectionProvider.mjs
8423    var React43 = __toESM(require_react(), 1);
8424    var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
8425    var DirectionProvider = function DirectionProvider2(props) {
8426      const {
8427        direction = "ltr"
8428      } = props;
8429      const contextValue = React43.useMemo(() => ({
8430        direction
8431      }), [direction]);
8432      return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DirectionContext.Provider, {
8433        value: contextValue,
8434        children: props.children
8435      });
8436    };
8437    if (true) DirectionProvider.displayName = "DirectionProvider";
8438  
8439    // node_modules/@base-ui/react/utils/adaptiveOriginMiddleware.mjs
8440    var adaptiveOrigin = {
8441      name: "adaptiveOrigin",
8442      async fn(state) {
8443        const {
8444          x: rawX,
8445          y: rawY,
8446          rects: {
8447            floating: floatRect
8448          },
8449          elements: {
8450            floating
8451          },
8452          platform: platform3,
8453          strategy,
8454          placement
8455        } = state;
8456        const win = getWindow(floating);
8457        const styles = win.getComputedStyle(floating);
8458        const hasTransition = styles.transitionDuration !== "0s" && styles.transitionDuration !== "";
8459        if (!hasTransition) {
8460          return {
8461            x: rawX,
8462            y: rawY,
8463            data: DEFAULT_SIDES
8464          };
8465        }
8466        const offsetParent = await platform3.getOffsetParent?.(floating);
8467        let offsetDimensions = {
8468          width: 0,
8469          height: 0
8470        };
8471        if (strategy === "fixed" && win?.visualViewport) {
8472          offsetDimensions = {
8473            width: win.visualViewport.width,
8474            height: win.visualViewport.height
8475          };
8476        } else if (offsetParent === win) {
8477          const doc = ownerDocument(floating);
8478          offsetDimensions = {
8479            width: doc.documentElement.clientWidth,
8480            height: doc.documentElement.clientHeight
8481          };
8482        } else if (await platform3.isElement?.(offsetParent)) {
8483          offsetDimensions = await platform3.getDimensions(offsetParent);
8484        }
8485        const currentSide = getSide(placement);
8486        let x = rawX;
8487        let y = rawY;
8488        if (currentSide === "left") {
8489          x = offsetDimensions.width - (rawX + floatRect.width);
8490        }
8491        if (currentSide === "top") {
8492          y = offsetDimensions.height - (rawY + floatRect.height);
8493        }
8494        const sideX = currentSide === "left" ? "right" : DEFAULT_SIDES.sideX;
8495        const sideY = currentSide === "top" ? "bottom" : DEFAULT_SIDES.sideY;
8496        return {
8497          x,
8498          y,
8499          data: {
8500            sideX,
8501            sideY
8502          }
8503        };
8504      }
8505    };
8506  
8507    // node_modules/@base-ui/react/utils/usePopupViewport.mjs
8508    var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
8509    var popupViewportStateMapping = {
8510      activationDirection: (value) => value ? {
8511        "data-activation-direction": value
8512      } : null
8513    };
8514    function usePopupViewport(parameters) {
8515      const {
8516        store: store2,
8517        side,
8518        children
8519      } = parameters;
8520      const direction = useDirection();
8521      const activeTrigger = store2.useState("activeTriggerElement");
8522      const activeTriggerId = store2.useState("activeTriggerId");
8523      const open = store2.useState("open");
8524      const payload = store2.useState("payload");
8525      const mounted = store2.useState("mounted");
8526      const popupElement = store2.useState("popupElement");
8527      const positionerElement = store2.useState("positionerElement");
8528      const previousActiveTrigger = usePreviousValue(open ? activeTrigger : null);
8529      const currentContentKey = usePopupContentKey(activeTriggerId, payload);
8530      const capturedNodeRef = React44.useRef(null);
8531      const [previousContentNode, setPreviousContentNode] = React44.useState(null);
8532      const [newTriggerOffset, setNewTriggerOffset] = React44.useState(null);
8533      const currentContainerRef = React44.useRef(null);
8534      const previousContainerRef = React44.useRef(null);
8535      const onAnimationsFinished = useAnimationsFinished(currentContainerRef, true);
8536      const cleanupFrame = useAnimationFrame();
8537      const cleanupControllerRef = React44.useRef(null);
8538      const [previousContentDimensions, setPreviousContentDimensions] = React44.useState(null);
8539      const [showStartingStyleAttribute, setShowStartingStyleAttribute] = React44.useState(false);
8540      useIsoLayoutEffect(() => {
8541        store2.set("adaptiveOrigin", adaptiveOrigin);
8542        return () => {
8543          store2.set("adaptiveOrigin", void 0);
8544        };
8545      }, [store2]);
8546      const handleMeasureLayout = useStableCallback(() => {
8547        currentContainerRef.current?.style.setProperty("animation", "none");
8548        currentContainerRef.current?.style.setProperty("transition", "none");
8549        previousContainerRef.current?.style.setProperty("display", "none");
8550      });
8551      const handleMeasureLayoutComplete = useStableCallback((previousDimensions) => {
8552        currentContainerRef.current?.style.removeProperty("animation");
8553        currentContainerRef.current?.style.removeProperty("transition");
8554        previousContainerRef.current?.style.removeProperty("display");
8555        if (previousDimensions) {
8556          setPreviousContentDimensions(previousDimensions);
8557        }
8558      });
8559      const armViewportCleanup = useStableCallback(() => {
8560        cleanupControllerRef.current?.abort();
8561        const controller = new AbortController();
8562        cleanupControllerRef.current = controller;
8563        onAnimationsFinished(() => {
8564          setPreviousContentNode(null);
8565          setPreviousContentDimensions(null);
8566          capturedNodeRef.current = null;
8567        }, controller.signal);
8568      });
8569      const lastHandledTriggerRef = React44.useRef(null);
8570      useIsoLayoutEffect(() => {
8571        if (!open || !mounted) {
8572          lastHandledTriggerRef.current = null;
8573        }
8574      }, [open, mounted]);
8575      useIsoLayoutEffect(() => {
8576        if (activeTrigger && previousActiveTrigger && activeTrigger !== previousActiveTrigger && lastHandledTriggerRef.current !== activeTrigger && capturedNodeRef.current) {
8577          setPreviousContentNode(capturedNodeRef.current);
8578          setShowStartingStyleAttribute(true);
8579          const offset4 = calculateRelativePosition(previousActiveTrigger, activeTrigger);
8580          setNewTriggerOffset(offset4);
8581          lastHandledTriggerRef.current = activeTrigger;
8582        }
8583      }, [activeTrigger, previousActiveTrigger]);
8584      useIsoLayoutEffect(() => {
8585        if (previousContentNode == null) {
8586          return;
8587        }
8588        cleanupControllerRef.current?.abort();
8589        setShowStartingStyleAttribute(true);
8590        cleanupFrame.request(() => {
8591          ReactDOM6.flushSync(() => {
8592            setShowStartingStyleAttribute(false);
8593          });
8594          armViewportCleanup();
8595        });
8596      }, [currentContentKey, previousContentNode, armViewportCleanup, cleanupFrame]);
8597      useIsoLayoutEffect(() => {
8598        const source = currentContainerRef.current;
8599        if (!source) {
8600          return;
8601        }
8602        const wrapper = ownerDocument(source).createElement("div");
8603        for (const child of Array.from(source.childNodes)) {
8604          wrapper.appendChild(child.cloneNode(true));
8605        }
8606        capturedNodeRef.current = wrapper;
8607      });
8608      const isTransitioning = previousContentNode != null;
8609      let childrenToRender;
8610      if (!isTransitioning) {
8611        childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", {
8612          "data-current": true,
8613          ref: currentContainerRef,
8614          children
8615        }, currentContentKey);
8616      } else {
8617        childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(React44.Fragment, {
8618          children: [/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", {
8619            "data-previous": true,
8620            inert: inertValue(true),
8621            ref: previousContainerRef,
8622            style: {
8623              ...previousContentDimensions ? {
8624                "--popup-width": `$previousContentDimensions.width}px`,
8625                "--popup-height": `$previousContentDimensions.height}px`
8626              } : null,
8627              position: "absolute"
8628            },
8629            "data-ending-style": showStartingStyleAttribute ? void 0 : ""
8630          }, "previous"), /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", {
8631            "data-current": true,
8632            ref: currentContainerRef,
8633            "data-starting-style": showStartingStyleAttribute ? "" : void 0,
8634            children
8635          }, currentContentKey)]
8636        });
8637      }
8638      useIsoLayoutEffect(() => {
8639        const container = previousContainerRef.current;
8640        if (!container || !previousContentNode) {
8641          return;
8642        }
8643        container.replaceChildren(...Array.from(previousContentNode.childNodes));
8644      }, [previousContentNode]);
8645      usePopupAutoResize({
8646        popupElement,
8647        positionerElement,
8648        mounted,
8649        content: payload,
8650        onMeasureLayout: handleMeasureLayout,
8651        onMeasureLayoutComplete: handleMeasureLayoutComplete,
8652        side,
8653        direction
8654      });
8655      const state = {
8656        activationDirection: getActivationDirection(newTriggerOffset),
8657        transitioning: isTransitioning
8658      };
8659      return {
8660        children: childrenToRender,
8661        state
8662      };
8663    }
8664    function getActivationDirection(offset4) {
8665      if (!offset4) {
8666        return void 0;
8667      }
8668      return `$getValueWithTolerance(offset4.horizontal, 5, "right", "left")} $getValueWithTolerance(offset4.vertical, 5, "down", "up")}`;
8669    }
8670    function getValueWithTolerance(value, tolerance, positiveLabel, negativeLabel) {
8671      if (value > tolerance) {
8672        return positiveLabel;
8673      }
8674      if (value < -tolerance) {
8675        return negativeLabel;
8676      }
8677      return "";
8678    }
8679    function calculateRelativePosition(from, to) {
8680      const fromRect = from.getBoundingClientRect();
8681      const toRect = to.getBoundingClientRect();
8682      const fromCenter = {
8683        x: fromRect.left + fromRect.width / 2,
8684        y: fromRect.top + fromRect.height / 2
8685      };
8686      const toCenter = {
8687        x: toRect.left + toRect.width / 2,
8688        y: toRect.top + toRect.height / 2
8689      };
8690      return {
8691        horizontal: toCenter.x - fromCenter.x,
8692        vertical: toCenter.y - fromCenter.y
8693      };
8694    }
8695    function usePopupContentKey(activeTriggerId, payload) {
8696      const [contentKey, setContentKey] = React44.useState(0);
8697      const previousActiveTriggerIdRef = React44.useRef(activeTriggerId);
8698      const previousPayloadRef = React44.useRef(payload);
8699      const pendingPayloadUpdateRef = React44.useRef(false);
8700      useIsoLayoutEffect(() => {
8701        const previousActiveTriggerId = previousActiveTriggerIdRef.current;
8702        const previousPayload = previousPayloadRef.current;
8703        const triggerIdChanged = activeTriggerId !== previousActiveTriggerId;
8704        const payloadChanged = payload !== previousPayload;
8705        if (triggerIdChanged) {
8706          setContentKey((value) => value + 1);
8707          pendingPayloadUpdateRef.current = !payloadChanged;
8708        } else if (pendingPayloadUpdateRef.current && payloadChanged) {
8709          setContentKey((value) => value + 1);
8710          pendingPayloadUpdateRef.current = false;
8711        }
8712        previousActiveTriggerIdRef.current = activeTriggerId;
8713        previousPayloadRef.current = payload;
8714      }, [activeTriggerId, payload]);
8715      return `$activeTriggerId ?? "current"}-$contentKey}`;
8716    }
8717  
8718    // node_modules/@base-ui/react/utils/FloatingPortalLite.mjs
8719    var React45 = __toESM(require_react(), 1);
8720    var ReactDOM7 = __toESM(require_react_dom(), 1);
8721    var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
8722    var FloatingPortalLite = /* @__PURE__ */ React45.forwardRef(function FloatingPortalLite2(componentProps, forwardedRef) {
8723      const {
8724        children,
8725        container,
8726        className,
8727        render,
8728        style,
8729        ...elementProps
8730      } = componentProps;
8731      const {
8732        node: portalNode,
8733        subtree: portalSubtree
8734      } = useFloatingPortalNode({
8735        container,
8736        ref: forwardedRef,
8737        componentProps,
8738        elementProps
8739      });
8740      if (!portalSubtree && !portalNode) {
8741        return null;
8742      }
8743      return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(React45.Fragment, {
8744        children: [portalSubtree, portalNode && /* @__PURE__ */ ReactDOM7.createPortal(children, portalNode)]
8745      });
8746    });
8747    if (true) FloatingPortalLite.displayName = "FloatingPortalLite";
8748  
8749    // node_modules/@base-ui/react/tooltip/index.parts.mjs
8750    var index_parts_exports2 = {};
8751    __export(index_parts_exports2, {
8752      Arrow: () => TooltipArrow,
8753      Handle: () => TooltipHandle,
8754      Popup: () => TooltipPopup,
8755      Portal: () => TooltipPortal,
8756      Positioner: () => TooltipPositioner,
8757      Provider: () => TooltipProvider,
8758      Root: () => TooltipRoot,
8759      Trigger: () => TooltipTrigger,
8760      Viewport: () => TooltipViewport,
8761      createHandle: () => createTooltipHandle
8762    });
8763  
8764    // node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
8765    var React48 = __toESM(require_react(), 1);
8766  
8767    // node_modules/@base-ui/react/tooltip/root/TooltipRootContext.mjs
8768    var React46 = __toESM(require_react(), 1);
8769    var TooltipRootContext = /* @__PURE__ */ React46.createContext(void 0);
8770    if (true) TooltipRootContext.displayName = "TooltipRootContext";
8771    function useTooltipRootContext(optional) {
8772      const context = React46.useContext(TooltipRootContext);
8773      if (context === void 0 && !optional) {
8774        throw new Error(true ? "Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>." : formatErrorMessage_default(72));
8775      }
8776      return context;
8777    }
8778  
8779    // node_modules/@base-ui/react/tooltip/store/TooltipStore.mjs
8780    var React47 = __toESM(require_react(), 1);
8781    var selectors2 = {
8782      ...popupStoreSelectors,
8783      disabled: (state) => state.disabled,
8784      instantType: (state) => state.instantType,
8785      isInstantPhase: (state) => state.isInstantPhase,
8786      trackCursorAxis: (state) => state.trackCursorAxis,
8787      disableHoverablePopup: (state) => state.disableHoverablePopup,
8788      lastOpenChangeReason: (state) => state.openChangeReason,
8789      closeOnClick: (state) => state.closeOnClick,
8790      closeDelay: (state) => state.closeDelay,
8791      adaptiveOrigin: (state) => state.adaptiveOrigin
8792    };
8793    var TooltipStore = class extends ReactStore {
8794      constructor(initialState, floatingId, nested) {
8795        const triggerElements = new PopupTriggerMap();
8796        super(createInitialState(initialState, triggerElements, floatingId, nested), createInitialContext(triggerElements), selectors2);
8797      }
8798      setOpen = (nextOpen, eventDetails) => {
8799        applyPopupOpenChange(this, nextOpen, eventDetails, {
8800          extraState: {
8801            openChangeReason: eventDetails.reason
8802          }
8803        });
8804      };
8805      // Used by trigger clicks to clear a delayed hover open without reporting a public open-state change.
8806      cancelPendingOpen(event) {
8807        this.state.floatingRootContext.dispatchOpenChange(false, createChangeEventDetails(reason_parts_exports.triggerPress, event));
8808      }
8809    };
8810    function createNullTooltipStore() {
8811      const triggerElements = new PopupTriggerMap();
8812      const store2 = new NullStore(Object.freeze(createInitialState(void 0, triggerElements)), Object.freeze(createInitialContext(triggerElements)), selectors2);
8813      return Object.assign(store2, {
8814        setOpen: NOOP,
8815        cancelPendingOpen: NOOP
8816      });
8817    }
8818    function createInitialState(initialState, triggerElements, floatingId, nested = false) {
8819      const state = {
8820        ...createInitialPopupStoreState(),
8821        disabled: false,
8822        instantType: void 0,
8823        isInstantPhase: false,
8824        trackCursorAxis: "none",
8825        disableHoverablePopup: false,
8826        openChangeReason: null,
8827        closeOnClick: true,
8828        closeDelay: 0,
8829        adaptiveOrigin: void 0,
8830        ...initialState
8831      };
8832      state.floatingRootContext = createPopupFloatingRootContext(triggerElements, floatingId, nested);
8833      return state;
8834    }
8835    function createInitialContext(triggerElements) {
8836      return {
8837        popupRef: /* @__PURE__ */ React47.createRef(),
8838        onOpenChange: void 0,
8839        onOpenChangeComplete: void 0,
8840        triggerElements
8841      };
8842    }
8843  
8844    // node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
8845    var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
8846    var TooltipRoot = fastComponent(function TooltipRoot2(props) {
8847      const {
8848        disabled: disabled2 = false,
8849        defaultOpen = false,
8850        open: openProp,
8851        disableHoverablePopup = false,
8852        trackCursorAxis = "none",
8853        actionsRef,
8854        onOpenChange,
8855        onOpenChangeComplete,
8856        handle,
8857        triggerId: triggerIdProp,
8858        defaultTriggerId: defaultTriggerIdProp = null,
8859        children
8860      } = props;
8861      const store2 = usePopupRootStore((floatingId, nested) => new TooltipStore({
8862        open: defaultOpen,
8863        openProp,
8864        activeTriggerId: defaultTriggerIdProp,
8865        triggerIdProp
8866      }, floatingId, nested));
8867      store2.useControlledProp("openProp", openProp);
8868      store2.useControlledProp("triggerIdProp", triggerIdProp);
8869      store2.useContextCallback("onOpenChange", onOpenChange);
8870      store2.useContextCallback("onOpenChangeComplete", onOpenChangeComplete);
8871      const openState = store2.useState("open");
8872      const open = !disabled2 && openState;
8873      const activeTriggerId = store2.useState("activeTriggerId");
8874      const mounted = store2.useState("mounted");
8875      const payload = store2.useState("payload");
8876      store2.useSyncedValues({
8877        trackCursorAxis,
8878        disableHoverablePopup,
8879        disabled: disabled2
8880      });
8881      useImplicitActiveTrigger(store2, {
8882        closeOnActiveTriggerUnmount: true
8883      });
8884      const {
8885        forceUnmount,
8886        transitionStatus
8887      } = useOpenStateTransitions(open, store2);
8888      const isInstantPhase = store2.useState("isInstantPhase");
8889      const instantType = store2.useState("instantType");
8890      const lastOpenChangeReason = store2.useState("lastOpenChangeReason");
8891      const previousInstantTypeRef = React48.useRef(null);
8892      useIsoLayoutEffect(() => {
8893        if (openState && disabled2) {
8894          store2.setOpen(false, createChangeEventDetails(reason_parts_exports.disabled));
8895        }
8896      }, [openState, disabled2, store2]);
8897      useIsoLayoutEffect(() => {
8898        if (transitionStatus === "ending" && lastOpenChangeReason === reason_parts_exports.none || transitionStatus !== "ending" && isInstantPhase) {
8899          if (instantType !== "delay") {
8900            previousInstantTypeRef.current = instantType;
8901          }
8902          store2.set("instantType", "delay");
8903        } else if (previousInstantTypeRef.current !== null) {
8904          store2.set("instantType", previousInstantTypeRef.current);
8905          previousInstantTypeRef.current = null;
8906        }
8907      }, [transitionStatus, isInstantPhase, lastOpenChangeReason, instantType, store2]);
8908      useIsoLayoutEffect(() => {
8909        if (open) {
8910          if (activeTriggerId == null) {
8911            store2.set("payload", void 0);
8912          }
8913        }
8914      }, [store2, activeTriggerId, open]);
8915      React48.useImperativeHandle(actionsRef, () => ({
8916        unmount: forceUnmount,
8917        close: () => store2.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction))
8918      }), [forceUnmount, store2]);
8919      const shouldRenderInteractions = open || mounted || !disabled2 && trackCursorAxis !== "none";
8920      return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(TooltipRootContext.Provider, {
8921        value: store2,
8922        children: [handle && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(PopupHandleAttachment, {
8923          handle,
8924          store: store2
8925        }), shouldRenderInteractions && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TooltipInteractions, {
8926          store: store2,
8927          disabled: disabled2,
8928          trackCursorAxis
8929        }), typeof children === "function" ? children({
8930          payload
8931        }) : children]
8932      });
8933    });
8934    if (true) TooltipRoot.displayName = "TooltipRoot";
8935    function TooltipInteractions({
8936      store: store2,
8937      disabled: disabled2,
8938      trackCursorAxis
8939    }) {
8940      const floatingRootContext = store2.useState("floatingRootContext");
8941      const dismiss = useDismiss(floatingRootContext, {
8942        enabled: !disabled2,
8943        referencePress: () => store2.select("closeOnClick")
8944      });
8945      const clientPoint = useClientPoint(floatingRootContext, {
8946        enabled: !disabled2 && trackCursorAxis !== "none",
8947        axis: trackCursorAxis === "none" ? void 0 : trackCursorAxis
8948      });
8949      const triggerProps = React48.useMemo(() => mergeProps(clientPoint.reference, dismiss.reference), [clientPoint.reference, dismiss.reference]);
8950      usePopupInteractionProps(store2, {
8951        activeTriggerProps: triggerProps,
8952        inactiveTriggerProps: triggerProps,
8953        popupProps: dismiss.floating ?? EMPTY_OBJECT
8954      });
8955      return null;
8956    }
8957  
8958    // node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
8959    var React50 = __toESM(require_react(), 1);
8960  
8961    // node_modules/@base-ui/react/tooltip/provider/TooltipProviderContext.mjs
8962    var React49 = __toESM(require_react(), 1);
8963    var TooltipProviderContext = /* @__PURE__ */ React49.createContext(void 0);
8964    if (true) TooltipProviderContext.displayName = "TooltipProviderContext";
8965    function useTooltipProviderContext() {
8966      return React49.useContext(TooltipProviderContext);
8967    }
8968  
8969    // node_modules/@base-ui/react/tooltip/utils/constants.mjs
8970    var OPEN_DELAY = 600;
8971  
8972    // node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
8973    var TOOLTIP_TRIGGER_IDENTIFIER = "data-base-ui-tooltip-trigger";
8974    function getTargetElement(event) {
8975      if ("composedPath" in event) {
8976        const path = event.composedPath();
8977        for (let i = 0; i < path.length; i += 1) {
8978          const element = path[i];
8979          if (isElement(element)) {
8980            return element;
8981          }
8982        }
8983      }
8984      const target = event.target;
8985      if (isElement(target)) {
8986        return target;
8987      }
8988      return null;
8989    }
8990    function closestEnabledTooltipTrigger(element) {
8991      let current = element;
8992      while (current) {
8993        const trigger = current.closest(`[$TOOLTIP_TRIGGER_IDENTIFIER}]`);
8994        if (trigger) {
8995          return trigger;
8996        }
8997        const root = current.getRootNode();
8998        current = "host" in root && isElement(root.host) ? root.host : null;
8999      }
9000      return null;
9001    }
9002    var TooltipTrigger = fastComponentRef(function TooltipTrigger2(componentProps, forwardedRef) {
9003      const {
9004        render,
9005        className,
9006        style,
9007        handle,
9008        payload,
9009        disabled: disabledProp,
9010        delay,
9011        closeOnClick = true,
9012        closeDelay,
9013        id: idProp,
9014        ...elementProps
9015      } = componentProps;
9016      const rootContext = useTooltipRootContext(true);
9017      const handleStore = usePopupHandleStore(handle);
9018      const store2 = handleStore ?? rootContext;
9019      if (!store2) {
9020        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));
9021      }
9022      const thisTriggerId = useBaseUiId(idProp);
9023      const isTriggerActive = store2.useState("isTriggerActive", thisTriggerId);
9024      const isOpenedByThisTrigger = store2.useState("isOpenedByTrigger", thisTriggerId);
9025      const floatingRootContext = store2.useState("floatingRootContext");
9026      const triggerElementRef = React50.useRef(null);
9027      const delayWithDefault = delay ?? OPEN_DELAY;
9028      const closeDelayWithDefault = closeDelay ?? 0;
9029      const {
9030        registerTrigger,
9031        isMountedByThisTrigger
9032      } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store2, {
9033        payload,
9034        closeOnClick,
9035        closeDelay: closeDelayWithDefault
9036      });
9037      const providerDelay = useTooltipProviderContext();
9038      const {
9039        delayRef,
9040        isInstantPhase,
9041        hasProvider
9042      } = useDelayGroup(floatingRootContext, {
9043        open: isOpenedByThisTrigger
9044      });
9045      const hoverInteraction = useHoverInteractionSharedState(floatingRootContext);
9046      store2.useSyncedValue("isInstantPhase", isInstantPhase);
9047      const rootDisabled = store2.useState("disabled");
9048      const disabled2 = disabledProp ?? rootDisabled;
9049      const disabledRef = useValueAsRef(disabled2);
9050      const trackCursorAxis = store2.useState("trackCursorAxis");
9051      const disableHoverablePopup = store2.useState("disableHoverablePopup");
9052      const isNestedTriggerHoveredRef = React50.useRef(false);
9053      const nestedTriggerOpenTimeout = useTimeout();
9054      const pointerTypeRef = React50.useRef(void 0);
9055      function getOpenDelay() {
9056        if (!hasProvider) {
9057          return delayWithDefault;
9058        }
9059        return getDelay(delayRef.current, "open") === 0 ? 0 : delay ?? providerDelay ?? OPEN_DELAY;
9060      }
9061      function isEnabledNestedTriggerTarget(target) {
9062        const triggerEl = triggerElementRef.current;
9063        if (!triggerEl || !target) {
9064          return false;
9065        }
9066        const nearestTrigger = closestEnabledTooltipTrigger(target);
9067        return nearestTrigger !== null && nearestTrigger !== triggerEl && contains(triggerEl, nearestTrigger);
9068      }
9069      function detectNestedTriggerHover(target) {
9070        const nestedTriggerHovered = isEnabledNestedTriggerTarget(target);
9071        isNestedTriggerHoveredRef.current = nestedTriggerHovered;
9072        if (nestedTriggerHovered) {
9073          hoverInteraction.openChangeTimeout.clear();
9074          hoverInteraction.restTimeout.clear();
9075          hoverInteraction.restTimeoutPending = false;
9076          nestedTriggerOpenTimeout.clear();
9077        }
9078        return nestedTriggerHovered;
9079      }
9080      const hoverProps = useHoverReferenceInteraction(floatingRootContext, {
9081        enabled: !disabled2,
9082        mouseOnly: true,
9083        move: false,
9084        handleClose: !disableHoverablePopup && trackCursorAxis !== "both" ? safePolygon() : null,
9085        restMs: getOpenDelay,
9086        delay() {
9087          if (closeDelay == null && hasProvider) {
9088            return {
9089              close: getDelay(delayRef.current, "close")
9090            };
9091          }
9092          return {
9093            close: closeDelayWithDefault
9094          };
9095        },
9096        triggerElementRef,
9097        isActiveTrigger: isTriggerActive,
9098        isClosing: () => store2.select("transitionStatus") === "ending",
9099        shouldOpen() {
9100          return !isNestedTriggerHoveredRef.current;
9101        }
9102      });
9103      const focusProps = useFocus(floatingRootContext, {
9104        enabled: !disabled2
9105      }).reference;
9106      const handleNestedTriggerHover = (event) => {
9107        const wasNestedTriggerHovered = isNestedTriggerHoveredRef.current;
9108        const target = getTargetElement(event);
9109        const nestedTriggerHovered = detectNestedTriggerHover(target);
9110        const triggerEl = triggerElementRef.current;
9111        const targetInsideTrigger = triggerEl && target && contains(triggerEl, target);
9112        if (nestedTriggerHovered && store2.select("open") && store2.select("lastOpenChangeReason") === reason_parts_exports.triggerHover) {
9113          store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
9114          return;
9115        }
9116        if (wasNestedTriggerHovered && !nestedTriggerHovered && targetInsideTrigger && !disabledRef.current && !store2.select("open") && triggerEl && // Match the hover hook's non-strict mouse fallback for mouse-only event sequences.
9117        isMouseLikePointerType(pointerTypeRef.current)) {
9118          const open = () => {
9119            if (!isNestedTriggerHoveredRef.current && !disabledRef.current && !store2.select("open")) {
9120              store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerEl));
9121            }
9122          };
9123          const openDelay = getOpenDelay();
9124          if (openDelay === 0) {
9125            nestedTriggerOpenTimeout.clear();
9126            open();
9127          } else {
9128            nestedTriggerOpenTimeout.start(openDelay, open);
9129          }
9130        }
9131      };
9132      const rootTriggerProps = store2.useState("triggerProps", isMountedByThisTrigger);
9133      const shouldApplyRootTriggerProps = isMountedByThisTrigger || trackCursorAxis !== "none";
9134      const state = {
9135        open: isOpenedByThisTrigger
9136      };
9137      const element = useRenderElement("button", componentProps, {
9138        state,
9139        ref: [forwardedRef, registerTrigger, triggerElementRef],
9140        props: [hoverProps, focusProps, shouldApplyRootTriggerProps ? rootTriggerProps : void 0, {
9141          onMouseOver(event) {
9142            handleNestedTriggerHover(event.nativeEvent);
9143          },
9144          onFocus(event) {
9145            if (isEnabledNestedTriggerTarget(getTargetElement(event.nativeEvent))) {
9146              event.preventBaseUIHandler();
9147            }
9148          },
9149          onMouseLeave() {
9150            isNestedTriggerHoveredRef.current = false;
9151            nestedTriggerOpenTimeout.clear();
9152            pointerTypeRef.current = void 0;
9153          },
9154          onPointerEnter(event) {
9155            pointerTypeRef.current = event.pointerType;
9156          },
9157          onPointerDown(event) {
9158            pointerTypeRef.current = event.pointerType;
9159            store2.set("closeOnClick", closeOnClick);
9160            if (closeOnClick && !store2.select("open")) {
9161              store2.cancelPendingOpen(event.nativeEvent);
9162            }
9163          },
9164          onClick(event) {
9165            if (closeOnClick && !store2.select("open")) {
9166              store2.cancelPendingOpen(event.nativeEvent);
9167            }
9168          },
9169          id: thisTriggerId,
9170          "data-trigger-disabled": disabled2 ? "" : void 0,
9171          [TOOLTIP_TRIGGER_IDENTIFIER]: disabled2 ? void 0 : ""
9172        }, elementProps],
9173        stateAttributesMapping: triggerOpenStateMapping2
9174      });
9175      return element;
9176    });
9177    if (true) TooltipTrigger.displayName = "TooltipTrigger";
9178  
9179    // node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
9180    var React52 = __toESM(require_react(), 1);
9181  
9182    // node_modules/@base-ui/react/tooltip/portal/TooltipPortalContext.mjs
9183    var React51 = __toESM(require_react(), 1);
9184    var TooltipPortalContext = /* @__PURE__ */ React51.createContext(void 0);
9185    if (true) TooltipPortalContext.displayName = "TooltipPortalContext";
9186    function useTooltipPortalContext() {
9187      const value = React51.useContext(TooltipPortalContext);
9188      if (value === void 0) {
9189        throw new Error(true ? "Base UI: <Tooltip.Portal> is missing." : formatErrorMessage_default(70));
9190      }
9191      return value;
9192    }
9193  
9194    // node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
9195    var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
9196    var TooltipPortal = /* @__PURE__ */ React52.forwardRef(function TooltipPortal2(props, forwardedRef) {
9197      const {
9198        keepMounted = false,
9199        ...portalProps
9200      } = props;
9201      const store2 = useTooltipRootContext();
9202      const mounted = store2.useState("mounted");
9203      const shouldRender = mounted || keepMounted;
9204      if (!shouldRender) {
9205        return null;
9206      }
9207      return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TooltipPortalContext.Provider, {
9208        value: keepMounted,
9209        children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FloatingPortalLite, {
9210          ref: forwardedRef,
9211          ...portalProps
9212        })
9213      });
9214    });
9215    if (true) TooltipPortal.displayName = "TooltipPortal";
9216  
9217    // node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
9218    var React54 = __toESM(require_react(), 1);
9219  
9220    // node_modules/@base-ui/react/tooltip/positioner/TooltipPositionerContext.mjs
9221    var React53 = __toESM(require_react(), 1);
9222    var TooltipPositionerContext = /* @__PURE__ */ React53.createContext(void 0);
9223    if (true) TooltipPositionerContext.displayName = "TooltipPositionerContext";
9224    function useTooltipPositionerContext() {
9225      const context = React53.useContext(TooltipPositionerContext);
9226      if (context === void 0) {
9227        throw new Error(true ? "Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>." : formatErrorMessage_default(71));
9228      }
9229      return context;
9230    }
9231  
9232    // node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
9233    var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
9234    var TooltipPositioner = /* @__PURE__ */ React54.forwardRef(function TooltipPositioner2(componentProps, forwardedRef) {
9235      const {
9236        render,
9237        className,
9238        anchor,
9239        positionMethod = "absolute",
9240        side = "top",
9241        align = "center",
9242        sideOffset = 0,
9243        alignOffset = 0,
9244        collisionBoundary = "clipping-ancestors",
9245        collisionPadding = 5,
9246        arrowPadding = 5,
9247        sticky = false,
9248        disableAnchorTracking = false,
9249        collisionAvoidance = POPUP_COLLISION_AVOIDANCE,
9250        style,
9251        ...elementProps
9252      } = componentProps;
9253      const store2 = useTooltipRootContext();
9254      const keepMounted = useTooltipPortalContext();
9255      const open = store2.useState("open");
9256      const mounted = store2.useState("mounted");
9257      const trackCursorAxis = store2.useState("trackCursorAxis");
9258      const disableHoverablePopup = store2.useState("disableHoverablePopup");
9259      const floatingRootContext = store2.useState("floatingRootContext");
9260      const instantType = store2.useState("instantType");
9261      const transitionStatus = store2.useState("transitionStatus");
9262      const adaptiveOrigin2 = store2.useState("adaptiveOrigin");
9263      const positioning = useAnchorPositioning({
9264        anchor,
9265        positionMethod,
9266        floatingRootContext,
9267        mounted,
9268        side,
9269        sideOffset,
9270        align,
9271        alignOffset,
9272        collisionBoundary,
9273        collisionPadding,
9274        sticky,
9275        arrowPadding,
9276        disableAnchorTracking,
9277        keepMounted,
9278        collisionAvoidance,
9279        adaptiveOrigin: adaptiveOrigin2
9280      });
9281      const state = React54.useMemo(() => ({
9282        open,
9283        side: positioning.side,
9284        align: positioning.align,
9285        anchorHidden: positioning.anchorHidden,
9286        instant: trackCursorAxis !== "none" ? "tracking-cursor" : instantType
9287      }), [open, positioning.side, positioning.align, positioning.anchorHidden, trackCursorAxis, instantType]);
9288      const element = usePositioner(componentProps, state, {
9289        styles: positioning.positionerStyles,
9290        transitionStatus,
9291        props: elementProps,
9292        refs: [forwardedRef, store2.useStateSetter("positionerElement")],
9293        hidden: !mounted,
9294        inert: !open || trackCursorAxis === "both" || disableHoverablePopup
9295      });
9296      return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TooltipPositionerContext.Provider, {
9297        value: positioning,
9298        children: element
9299      });
9300    });
9301    if (true) TooltipPositioner.displayName = "TooltipPositioner";
9302  
9303    // node_modules/@base-ui/react/tooltip/popup/TooltipPopup.mjs
9304    var React55 = __toESM(require_react(), 1);
9305    var TooltipPopup = /* @__PURE__ */ React55.forwardRef(function TooltipPopup2(componentProps, forwardedRef) {
9306      const {
9307        render,
9308        className,
9309        style,
9310        ...elementProps
9311      } = componentProps;
9312      const store2 = useTooltipRootContext();
9313      const {
9314        side,
9315        align
9316      } = useTooltipPositionerContext();
9317      const open = store2.useState("open");
9318      const instantType = store2.useState("instantType");
9319      const transitionStatus = store2.useState("transitionStatus");
9320      const popupProps = store2.useState("popupProps");
9321      const floatingContext = store2.useState("floatingRootContext");
9322      const disabled2 = store2.useState("disabled");
9323      const closeDelay = store2.useState("closeDelay");
9324      useOpenChangeComplete({
9325        open,
9326        ref: store2.context.popupRef,
9327        onComplete() {
9328          if (open) {
9329            store2.context.onOpenChangeComplete?.(true);
9330          }
9331        }
9332      });
9333      useHoverFloatingInteraction(floatingContext, {
9334        enabled: !disabled2,
9335        closeDelay
9336      });
9337      const setPopupElement = store2.useStateSetter("popupElement");
9338      const state = {
9339        open,
9340        side,
9341        align,
9342        instant: instantType,
9343        transitionStatus
9344      };
9345      const element = useRenderElement("div", componentProps, {
9346        state,
9347        ref: [forwardedRef, store2.context.popupRef, setPopupElement],
9348        props: [FOCUSABLE_POPUP_PROPS, popupProps, getDisabledMountTransitionStyles(transitionStatus), elementProps],
9349        stateAttributesMapping: popupTransitionStateMapping
9350      });
9351      return element;
9352    });
9353    if (true) TooltipPopup.displayName = "TooltipPopup";
9354  
9355    // node_modules/@base-ui/react/tooltip/arrow/TooltipArrow.mjs
9356    var React56 = __toESM(require_react(), 1);
9357    var TooltipArrow = /* @__PURE__ */ React56.forwardRef(function TooltipArrow2(componentProps, forwardedRef) {
9358      const {
9359        render,
9360        className,
9361        style,
9362        ...elementProps
9363      } = componentProps;
9364      const store2 = useTooltipRootContext();
9365      const {
9366        arrowRef,
9367        side,
9368        align,
9369        arrowUncentered,
9370        arrowStyles
9371      } = useTooltipPositionerContext();
9372      const open = store2.useState("open");
9373      const instantType = store2.useState("instantType");
9374      const state = {
9375        open,
9376        side,
9377        align,
9378        uncentered: arrowUncentered,
9379        instant: instantType
9380      };
9381      const element = useRenderElement("div", componentProps, {
9382        state,
9383        ref: [forwardedRef, arrowRef],
9384        props: [{
9385          style: arrowStyles,
9386          "aria-hidden": true
9387        }, elementProps],
9388        stateAttributesMapping: popupStateMapping
9389      });
9390      return element;
9391    });
9392    if (true) TooltipArrow.displayName = "TooltipArrow";
9393  
9394    // node_modules/@base-ui/react/tooltip/provider/TooltipProvider.mjs
9395    var React57 = __toESM(require_react(), 1);
9396    var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
9397    var TooltipProvider = function TooltipProvider2(props) {
9398      const {
9399        delay,
9400        closeDelay,
9401        timeout = 400
9402      } = props;
9403      const delayValue = React57.useMemo(() => ({
9404        open: delay,
9405        close: closeDelay
9406      }), [delay, closeDelay]);
9407      return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TooltipProviderContext.Provider, {
9408        value: delay,
9409        children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FloatingDelayGroup, {
9410          delay: delayValue,
9411          timeoutMs: timeout,
9412          children: props.children
9413        })
9414      });
9415    };
9416    if (true) TooltipProvider.displayName = "TooltipProvider";
9417  
9418    // node_modules/@base-ui/react/tooltip/viewport/TooltipViewport.mjs
9419    var React58 = __toESM(require_react(), 1);
9420    var TooltipViewport = /* @__PURE__ */ React58.forwardRef(function TooltipViewport2(componentProps, forwardedRef) {
9421      const {
9422        render,
9423        className,
9424        style,
9425        children,
9426        ...elementProps
9427      } = componentProps;
9428      const store2 = useTooltipRootContext();
9429      const positioner = useTooltipPositionerContext();
9430      const instantType = store2.useState("instantType");
9431      const {
9432        children: childrenToRender,
9433        state: viewportState
9434      } = usePopupViewport({
9435        store: store2,
9436        side: positioner.side,
9437        children
9438      });
9439      const state = {
9440        activationDirection: viewportState.activationDirection,
9441        transitioning: viewportState.transitioning,
9442        instant: instantType
9443      };
9444      return useRenderElement("div", componentProps, {
9445        state,
9446        ref: forwardedRef,
9447        props: [elementProps, {
9448          children: childrenToRender
9449        }],
9450        stateAttributesMapping: popupViewportStateMapping
9451      });
9452    });
9453    if (true) TooltipViewport.displayName = "TooltipViewport";
9454  
9455    // node_modules/@base-ui/react/tooltip/store/TooltipHandle.mjs
9456    var TooltipHandle = class extends BasePopupHandle {
9457      constructor() {
9458        super(createNullTooltipStore(), "Tooltip");
9459      }
9460      /**
9461       * Opens the tooltip and associates it with the trigger with the given id.
9462       *
9463       * This method should only be called in an event handler or an effect (not during rendering).
9464       *
9465       * @param triggerId ID of the trigger to associate with the tooltip. The trigger must be a matching
9466       * `Tooltip.Trigger` with this handle passed as a prop.
9467       */
9468      open(triggerId) {
9469        this.openByTrigger(triggerId);
9470      }
9471      /**
9472       * Closes the tooltip.
9473       *
9474       * This method should only be called in an event handler or an effect (not during rendering).
9475       */
9476      close() {
9477        this.closePopup();
9478      }
9479      /**
9480       * Whether the tooltip is currently open. Returns `false` while no root is attached to the handle.
9481       */
9482      get isOpen() {
9483        return this.attachedStore?.select("open") ?? false;
9484      }
9485    };
9486    function createTooltipHandle() {
9487      return new TooltipHandle();
9488    }
9489  
9490    // node_modules/@base-ui/react/use-render/useRender.mjs
9491    function useRender(params) {
9492      return useRenderElement(params.defaultTagName ?? "div", params, params);
9493    }
9494  
9495    // packages/ui/build-module/text/text.mjs
9496    var import_element10 = __toESM(require_element(), 1);
9497    var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
9498    function getRuntime() {
9499      const globalScope = globalThis;
9500      if (globalScope.__wpStyleRuntime) {
9501        return globalScope.__wpStyleRuntime;
9502      }
9503      globalScope.__wpStyleRuntime = {
9504        documents: /* @__PURE__ */ new Map(),
9505        styles: /* @__PURE__ */ new Map(),
9506        injectedStyles: /* @__PURE__ */ new WeakMap()
9507      };
9508      if (typeof document !== "undefined") {
9509        registerDocument(document);
9510      }
9511      return globalScope.__wpStyleRuntime;
9512    }
9513    function documentContainsStyleHash(targetDocument, hash) {
9514      if (!targetDocument.head) {
9515        return false;
9516      }
9517      for (const style of targetDocument.head.querySelectorAll(
9518        `style[$STYLE_HASH_ATTRIBUTE}]`
9519      )) {
9520        if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
9521          return true;
9522        }
9523      }
9524      return false;
9525    }
9526    function injectStyle(targetDocument, hash, css) {
9527      if (!targetDocument.head) {
9528        return;
9529      }
9530      const runtime = getRuntime();
9531      let injectedStyles = runtime.injectedStyles.get(targetDocument);
9532      if (!injectedStyles) {
9533        injectedStyles = /* @__PURE__ */ new Set();
9534        runtime.injectedStyles.set(targetDocument, injectedStyles);
9535      }
9536      if (injectedStyles.has(hash)) {
9537        return;
9538      }
9539      if (documentContainsStyleHash(targetDocument, hash)) {
9540        injectedStyles.add(hash);
9541        return;
9542      }
9543      const style = targetDocument.createElement("style");
9544      style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
9545      style.appendChild(targetDocument.createTextNode(css));
9546      targetDocument.head.appendChild(style);
9547      injectedStyles.add(hash);
9548    }
9549    function registerDocument(targetDocument) {
9550      const runtime = getRuntime();
9551      runtime.documents.set(
9552        targetDocument,
9553        (runtime.documents.get(targetDocument) ?? 0) + 1
9554      );
9555      for (const [hash, css] of runtime.styles) {
9556        injectStyle(targetDocument, hash, css);
9557      }
9558      return () => {
9559        const count = runtime.documents.get(targetDocument);
9560        if (count === void 0) {
9561          return;
9562        }
9563        if (count <= 1) {
9564          runtime.documents.delete(targetDocument);
9565          return;
9566        }
9567        runtime.documents.set(targetDocument, count - 1);
9568      };
9569    }
9570    function registerStyle(hash, css) {
9571      const runtime = getRuntime();
9572      runtime.styles.set(hash, css);
9573      for (const targetDocument of runtime.documents.keys()) {
9574        injectStyle(targetDocument, hash, css);
9575      }
9576    }
9577    if (typeof process === "undefined" || true) {
9578      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)}}}');
9579    }
9580    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" };
9581    if (typeof process === "undefined" || true) {
9582      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)}");
9583    }
9584    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" };
9585    var Text = (0, import_element10.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) {
9586      const element = useRender({
9587        render,
9588        defaultTagName: "span",
9589        ref,
9590        props: mergeProps(props, {
9591          className: clsx_default(
9592            style_default.text,
9593            global_css_defense_default.heading,
9594            global_css_defense_default.p,
9595            style_default[variant],
9596            className
9597          )
9598        })
9599      });
9600      return element;
9601    });
9602  
9603    // packages/ui/build-module/tooltip/popup.mjs
9604    var import_element14 = __toESM(require_element(), 1);
9605  
9606    // packages/ui/build-module/tooltip/portal.mjs
9607    var import_element11 = __toESM(require_element(), 1);
9608  
9609    // packages/ui/build-module/utils/wp-compat-overlay-slot.mjs
9610    var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
9611    function getRuntime2() {
9612      const globalScope = globalThis;
9613      if (globalScope.__wpStyleRuntime) {
9614        return globalScope.__wpStyleRuntime;
9615      }
9616      globalScope.__wpStyleRuntime = {
9617        documents: /* @__PURE__ */ new Map(),
9618        styles: /* @__PURE__ */ new Map(),
9619        injectedStyles: /* @__PURE__ */ new WeakMap()
9620      };
9621      if (typeof document !== "undefined") {
9622        registerDocument2(document);
9623      }
9624      return globalScope.__wpStyleRuntime;
9625    }
9626    function documentContainsStyleHash2(targetDocument, hash) {
9627      if (!targetDocument.head) {
9628        return false;
9629      }
9630      for (const style of targetDocument.head.querySelectorAll(
9631        `style[$STYLE_HASH_ATTRIBUTE2}]`
9632      )) {
9633        if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) {
9634          return true;
9635        }
9636      }
9637      return false;
9638    }
9639    function injectStyle2(targetDocument, hash, css) {
9640      if (!targetDocument.head) {
9641        return;
9642      }
9643      const runtime = getRuntime2();
9644      let injectedStyles = runtime.injectedStyles.get(targetDocument);
9645      if (!injectedStyles) {
9646        injectedStyles = /* @__PURE__ */ new Set();
9647        runtime.injectedStyles.set(targetDocument, injectedStyles);
9648      }
9649      if (injectedStyles.has(hash)) {
9650        return;
9651      }
9652      if (documentContainsStyleHash2(targetDocument, hash)) {
9653        injectedStyles.add(hash);
9654        return;
9655      }
9656      const style = targetDocument.createElement("style");
9657      style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash);
9658      style.appendChild(targetDocument.createTextNode(css));
9659      targetDocument.head.appendChild(style);
9660      injectedStyles.add(hash);
9661    }
9662    function registerDocument2(targetDocument) {
9663      const runtime = getRuntime2();
9664      runtime.documents.set(
9665        targetDocument,
9666        (runtime.documents.get(targetDocument) ?? 0) + 1
9667      );
9668      for (const [hash, css] of runtime.styles) {
9669        injectStyle2(targetDocument, hash, css);
9670      }
9671      return () => {
9672        const count = runtime.documents.get(targetDocument);
9673        if (count === void 0) {
9674          return;
9675        }
9676        if (count <= 1) {
9677          runtime.documents.delete(targetDocument);
9678          return;
9679        }
9680        runtime.documents.set(targetDocument, count - 1);
9681      };
9682    }
9683    function registerStyle2(hash, css) {
9684      const runtime = getRuntime2();
9685      runtime.styles.set(hash, css);
9686      for (const targetDocument of runtime.documents.keys()) {
9687        injectStyle2(targetDocument, hash, css);
9688      }
9689    }
9690    if (typeof process === "undefined" || true) {
9691      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}}}");
9692    }
9693    var wp_compat_overlay_slot_default = { "slot": "_11fc52b637ff8a7e__slot" };
9694    var WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE = "data-wp-compat-overlay-slot";
9695    function resolveOwnerDocument() {
9696      return typeof document === "undefined" ? null : document;
9697    }
9698    function isInWordPressEnvironment() {
9699      let topWp;
9700      try {
9701        topWp = window.top?.wp;
9702      } catch {
9703      }
9704      const wp4 = topWp ?? window.wp;
9705      return typeof wp4?.components === "object" && wp4.components !== null;
9706    }
9707    var cachedSlot = null;
9708    function ensureSlotIsAccessible(element) {
9709      element.setAttribute("aria-hidden", "false");
9710      return element;
9711    }
9712    function createSlot(ownerDocument2) {
9713      const element = ownerDocument2.createElement("div");
9714      element.setAttribute(WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE, "");
9715      if (wp_compat_overlay_slot_default.slot) {
9716        element.classList.add(wp_compat_overlay_slot_default.slot);
9717      }
9718      ownerDocument2.body.appendChild(element);
9719      return element;
9720    }
9721    function getWpCompatOverlaySlot() {
9722      if (typeof window === "undefined") {
9723        return void 0;
9724      }
9725      if (!isInWordPressEnvironment() && window.__wpUiCompatOverlaySlotEnabled !== true) {
9726        return void 0;
9727      }
9728      const ownerDocument2 = resolveOwnerDocument();
9729      if (!ownerDocument2 || !ownerDocument2.body) {
9730        return void 0;
9731      }
9732      if (cachedSlot && cachedSlot.ownerDocument === ownerDocument2 && cachedSlot.isConnected) {
9733        return ensureSlotIsAccessible(cachedSlot);
9734      }
9735      const existing = ownerDocument2.querySelector(
9736        `[$WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE}]`
9737      );
9738      if (existing instanceof HTMLDivElement) {
9739        cachedSlot = ensureSlotIsAccessible(existing);
9740        return cachedSlot;
9741      }
9742      if (cachedSlot?.isConnected) {
9743        cachedSlot.remove();
9744      }
9745      cachedSlot = ensureSlotIsAccessible(createSlot(ownerDocument2));
9746      return cachedSlot;
9747    }
9748  
9749    // packages/ui/build-module/tooltip/portal.mjs
9750    var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
9751    var Portal = (0, import_element11.forwardRef)(
9752      function TooltipPortal3({ container, ...restProps }, ref) {
9753        return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
9754          index_parts_exports2.Portal,
9755          {
9756            container: container ?? getWpCompatOverlaySlot(),
9757            ...restProps,
9758            ref
9759          }
9760        );
9761      }
9762    );
9763  
9764    // packages/ui/build-module/tooltip/positioner.mjs
9765    var import_element12 = __toESM(require_element(), 1);
9766    var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
9767    var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
9768    function getRuntime3() {
9769      const globalScope = globalThis;
9770      if (globalScope.__wpStyleRuntime) {
9771        return globalScope.__wpStyleRuntime;
9772      }
9773      globalScope.__wpStyleRuntime = {
9774        documents: /* @__PURE__ */ new Map(),
9775        styles: /* @__PURE__ */ new Map(),
9776        injectedStyles: /* @__PURE__ */ new WeakMap()
9777      };
9778      if (typeof document !== "undefined") {
9779        registerDocument3(document);
9780      }
9781      return globalScope.__wpStyleRuntime;
9782    }
9783    function documentContainsStyleHash3(targetDocument, hash) {
9784      if (!targetDocument.head) {
9785        return false;
9786      }
9787      for (const style of targetDocument.head.querySelectorAll(
9788        `style[$STYLE_HASH_ATTRIBUTE3}]`
9789      )) {
9790        if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) {
9791          return true;
9792        }
9793      }
9794      return false;
9795    }
9796    function injectStyle3(targetDocument, hash, css) {
9797      if (!targetDocument.head) {
9798        return;
9799      }
9800      const runtime = getRuntime3();
9801      let injectedStyles = runtime.injectedStyles.get(targetDocument);
9802      if (!injectedStyles) {
9803        injectedStyles = /* @__PURE__ */ new Set();
9804        runtime.injectedStyles.set(targetDocument, injectedStyles);
9805      }
9806      if (injectedStyles.has(hash)) {
9807        return;
9808      }
9809      if (documentContainsStyleHash3(targetDocument, hash)) {
9810        injectedStyles.add(hash);
9811        return;
9812      }
9813      const style = targetDocument.createElement("style");
9814      style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash);
9815      style.appendChild(targetDocument.createTextNode(css));
9816      targetDocument.head.appendChild(style);
9817      injectedStyles.add(hash);
9818    }
9819    function registerDocument3(targetDocument) {
9820      const runtime = getRuntime3();
9821      runtime.documents.set(
9822        targetDocument,
9823        (runtime.documents.get(targetDocument) ?? 0) + 1
9824      );
9825      for (const [hash, css] of runtime.styles) {
9826        injectStyle3(targetDocument, hash, css);
9827      }
9828      return () => {
9829        const count = runtime.documents.get(targetDocument);
9830        if (count === void 0) {
9831          return;
9832        }
9833        if (count <= 1) {
9834          runtime.documents.delete(targetDocument);
9835          return;
9836        }
9837        runtime.documents.set(targetDocument, count - 1);
9838      };
9839    }
9840    function registerStyle3(hash, css) {
9841      const runtime = getRuntime3();
9842      runtime.styles.set(hash, css);
9843      for (const targetDocument of runtime.documents.keys()) {
9844        injectStyle3(targetDocument, hash, css);
9845      }
9846    }
9847    if (typeof process === "undefined" || true) {
9848      registerStyle3("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
9849    }
9850    var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
9851    if (typeof process === "undefined" || true) {
9852      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}}}}');
9853    }
9854    var style_default2 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
9855    var Positioner = (0, import_element12.forwardRef)(
9856      function TooltipPositioner3({ align = "center", className, side = "top", sideOffset = 4, ...props }, ref) {
9857        return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
9858          index_parts_exports2.Positioner,
9859          {
9860            ref,
9861            align,
9862            side,
9863            sideOffset,
9864            ...props,
9865            className: clsx_default(
9866              resets_default["box-sizing"],
9867              style_default2.positioner,
9868              className
9869            )
9870          }
9871        );
9872      }
9873    );
9874  
9875    // packages/ui/build-module/utils/render-slot-with-children.mjs
9876    var import_element13 = __toESM(require_element(), 1);
9877    function renderSlotWithChildren(slot, defaultSlot, children) {
9878      return (0, import_element13.cloneElement)(slot ?? defaultSlot, { children });
9879    }
9880  
9881    // packages/ui/build-module/utils/theme-provider.mjs
9882    var theme = __toESM(require_theme(), 1);
9883  
9884    // packages/ui/build-module/lock-unlock.mjs
9885    var import_private_apis = __toESM(require_private_apis(), 1);
9886    var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
9887      "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
9888      "@wordpress/ui"
9889    );
9890  
9891    // packages/ui/build-module/utils/theme-provider.mjs
9892    function getThemeProvider() {
9893      const themePackage = theme;
9894      if (themePackage.ThemeProvider) {
9895        return themePackage.ThemeProvider;
9896      }
9897      if (!themePackage.privateApis) {
9898        throw new Error(
9899          "@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`."
9900        );
9901      }
9902      return unlock(
9903        themePackage.privateApis
9904      ).ThemeProvider;
9905    }
9906    var ThemeProvider = getThemeProvider();
9907  
9908    // packages/ui/build-module/tooltip/popup.mjs
9909    var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
9910    var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
9911    function getRuntime4() {
9912      const globalScope = globalThis;
9913      if (globalScope.__wpStyleRuntime) {
9914        return globalScope.__wpStyleRuntime;
9915      }
9916      globalScope.__wpStyleRuntime = {
9917        documents: /* @__PURE__ */ new Map(),
9918        styles: /* @__PURE__ */ new Map(),
9919        injectedStyles: /* @__PURE__ */ new WeakMap()
9920      };
9921      if (typeof document !== "undefined") {
9922        registerDocument4(document);
9923      }
9924      return globalScope.__wpStyleRuntime;
9925    }
9926    function documentContainsStyleHash4(targetDocument, hash) {
9927      if (!targetDocument.head) {
9928        return false;
9929      }
9930      for (const style of targetDocument.head.querySelectorAll(
9931        `style[$STYLE_HASH_ATTRIBUTE4}]`
9932      )) {
9933        if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
9934          return true;
9935        }
9936      }
9937      return false;
9938    }
9939    function injectStyle4(targetDocument, hash, css) {
9940      if (!targetDocument.head) {
9941        return;
9942      }
9943      const runtime = getRuntime4();
9944      let injectedStyles = runtime.injectedStyles.get(targetDocument);
9945      if (!injectedStyles) {
9946        injectedStyles = /* @__PURE__ */ new Set();
9947        runtime.injectedStyles.set(targetDocument, injectedStyles);
9948      }
9949      if (injectedStyles.has(hash)) {
9950        return;
9951      }
9952      if (documentContainsStyleHash4(targetDocument, hash)) {
9953        injectedStyles.add(hash);
9954        return;
9955      }
9956      const style = targetDocument.createElement("style");
9957      style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
9958      style.appendChild(targetDocument.createTextNode(css));
9959      targetDocument.head.appendChild(style);
9960      injectedStyles.add(hash);
9961    }
9962    function registerDocument4(targetDocument) {
9963      const runtime = getRuntime4();
9964      runtime.documents.set(
9965        targetDocument,
9966        (runtime.documents.get(targetDocument) ?? 0) + 1
9967      );
9968      for (const [hash, css] of runtime.styles) {
9969        injectStyle4(targetDocument, hash, css);
9970      }
9971      return () => {
9972        const count = runtime.documents.get(targetDocument);
9973        if (count === void 0) {
9974          return;
9975        }
9976        if (count <= 1) {
9977          runtime.documents.delete(targetDocument);
9978          return;
9979        }
9980        runtime.documents.set(targetDocument, count - 1);
9981      };
9982    }
9983    function registerStyle4(hash, css) {
9984      const runtime = getRuntime4();
9985      runtime.styles.set(hash, css);
9986      for (const targetDocument of runtime.documents.keys()) {
9987        injectStyle4(targetDocument, hash, css);
9988      }
9989    }
9990    if (typeof process === "undefined" || true) {
9991      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}}}}');
9992    }
9993    var style_default3 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
9994    var POPUP_COLOR = { background: "#1e1e1e" };
9995    var Popup = (0, import_element14.forwardRef)(function TooltipPopup3({ portal, positioner, children, className, ...props }, ref) {
9996      const popupContent = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ThemeProvider, { color: POPUP_COLOR, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
9997        index_parts_exports2.Popup,
9998        {
9999          ref,
10000          className: clsx_default(style_default3.popup, className),
10001          ...props,
10002          children
10003        }
10004      ) });
10005      const positionedPopup = renderSlotWithChildren(
10006        positioner,
10007        /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Positioner, {}),
10008        popupContent
10009      );
10010      return renderSlotWithChildren(portal, /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Portal, {}), positionedPopup);
10011    });
10012  
10013    // packages/ui/build-module/tooltip/trigger.mjs
10014    var import_element15 = __toESM(require_element(), 1);
10015    var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
10016    var Trigger = (0, import_element15.forwardRef)(
10017      function TooltipTrigger3(props, ref) {
10018        return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(index_parts_exports2.Trigger, { ref, ...props });
10019      }
10020    );
10021  
10022    // packages/ui/build-module/utils/direction-provider.mjs
10023    var import_i18n = __toESM(require_i18n(), 1);
10024    var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
10025    function DirectionProvider3({ children }) {
10026      return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DirectionProvider, { direction: (0, import_i18n.isRTL)() ? "rtl" : "ltr", children });
10027    }
10028  
10029    // packages/ui/build-module/tooltip/root.mjs
10030    var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
10031    function Root(props) {
10032      return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DirectionProvider3, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(index_parts_exports2.Root, { ...props }) });
10033    }
10034  
10035    // packages/ui/build-module/link/link.mjs
10036    var import_element16 = __toESM(require_element(), 1);
10037    var import_i18n2 = __toESM(require_i18n(), 1);
10038    var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
10039    var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash";
10040    function getRuntime5() {
10041      const globalScope = globalThis;
10042      if (globalScope.__wpStyleRuntime) {
10043        return globalScope.__wpStyleRuntime;
10044      }
10045      globalScope.__wpStyleRuntime = {
10046        documents: /* @__PURE__ */ new Map(),
10047        styles: /* @__PURE__ */ new Map(),
10048        injectedStyles: /* @__PURE__ */ new WeakMap()
10049      };
10050      if (typeof document !== "undefined") {
10051        registerDocument5(document);
10052      }
10053      return globalScope.__wpStyleRuntime;
10054    }
10055    function documentContainsStyleHash5(targetDocument, hash) {
10056      if (!targetDocument.head) {
10057        return false;
10058      }
10059      for (const style of targetDocument.head.querySelectorAll(
10060        `style[$STYLE_HASH_ATTRIBUTE5}]`
10061      )) {
10062        if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) {
10063          return true;
10064        }
10065      }
10066      return false;
10067    }
10068    function injectStyle5(targetDocument, hash, css) {
10069      if (!targetDocument.head) {
10070        return;
10071      }
10072      const runtime = getRuntime5();
10073      let injectedStyles = runtime.injectedStyles.get(targetDocument);
10074      if (!injectedStyles) {
10075        injectedStyles = /* @__PURE__ */ new Set();
10076        runtime.injectedStyles.set(targetDocument, injectedStyles);
10077      }
10078      if (injectedStyles.has(hash)) {
10079        return;
10080      }
10081      if (documentContainsStyleHash5(targetDocument, hash)) {
10082        injectedStyles.add(hash);
10083        return;
10084      }
10085      const style = targetDocument.createElement("style");
10086      style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash);
10087      style.appendChild(targetDocument.createTextNode(css));
10088      targetDocument.head.appendChild(style);
10089      injectedStyles.add(hash);
10090    }
10091    function registerDocument5(targetDocument) {
10092      const runtime = getRuntime5();
10093      runtime.documents.set(
10094        targetDocument,
10095        (runtime.documents.get(targetDocument) ?? 0) + 1
10096      );
10097      for (const [hash, css] of runtime.styles) {
10098        injectStyle5(targetDocument, hash, css);
10099      }
10100      return () => {
10101        const count = runtime.documents.get(targetDocument);
10102        if (count === void 0) {
10103          return;
10104        }
10105        if (count <= 1) {
10106          runtime.documents.delete(targetDocument);
10107          return;
10108        }
10109        runtime.documents.set(targetDocument, count - 1);
10110      };
10111    }
10112    function registerStyle5(hash, css) {
10113      const runtime = getRuntime5();
10114      runtime.styles.set(hash, css);
10115      for (const targetDocument of runtime.documents.keys()) {
10116        injectStyle5(targetDocument, hash, css);
10117      }
10118    }
10119    if (typeof process === "undefined" || true) {
10120      registerStyle5("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
10121    }
10122    var resets_default2 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
10123    if (typeof process === "undefined" || true) {
10124      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))}}}");
10125    }
10126    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" };
10127    if (typeof process === "undefined" || true) {
10128      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"}}}');
10129    }
10130    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" };
10131    if (typeof process === "undefined" || true) {
10132      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)}");
10133    }
10134    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" };
10135    var Link = (0, import_element16.forwardRef)(function Link2({
10136      children,
10137      variant = "default",
10138      tone = "brand",
10139      openInNewTab = false,
10140      target,
10141      render,
10142      className,
10143      ...props
10144    }, ref) {
10145      const shouldShowNewTabIndicator = openInNewTab || /^_blank$/i.test(target ?? "");
10146      const element = useRender({
10147        render,
10148        defaultTagName: "a",
10149        ref,
10150        props: mergeProps(props, {
10151          className: clsx_default(
10152            global_css_defense_default2.a,
10153            resets_default2["box-sizing"],
10154            focus_module_default["outset-ring--focus-except-active"],
10155            variant !== "unstyled" && style_default4.link,
10156            variant !== "unstyled" && style_default4[`is-$tone}`],
10157            variant === "unstyled" && style_default4["is-unstyled"],
10158            className
10159          ),
10160          target: target ?? (openInNewTab ? "_blank" : void 0),
10161          children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
10162            children,
10163            shouldShowNewTabIndicator && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
10164              "span",
10165              {
10166                className: style_default4["link-icon"],
10167                role: "img",
10168                "aria-label": (
10169                  /* translators: accessibility text appended to link text */
10170                  (0, import_i18n2.__)("(opens in a new tab)")
10171                )
10172              }
10173            )
10174          ] })
10175        })
10176      });
10177      return element;
10178    });
10179  
10180    // packages/icons/build-module/library/caution.mjs
10181    var import_primitives = __toESM(require_primitives(), 1);
10182    var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
10183    var caution_default = /* @__PURE__ */ (0, import_jsx_runtime20.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_runtime20.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" }) });
10184  
10185    // packages/icons/build-module/library/chevron-down.mjs
10186    var import_primitives2 = __toESM(require_primitives(), 1);
10187    var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
10188    var chevron_down_default = /* @__PURE__ */ (0, import_jsx_runtime21.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_runtime21.jsx)(import_primitives2.Path, { d: "M7 11L12 15L17 11", vectorEffect: "non-scaling-stroke" }) });
10189  
10190    // packages/icons/build-module/library/close-small.mjs
10191    var import_primitives3 = __toESM(require_primitives(), 1);
10192    var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
10193    var close_small_default = /* @__PURE__ */ (0, import_jsx_runtime22.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_runtime22.jsx)(import_primitives3.Path, { d: "M7.75 16.25L16.25 7.75M16.25 16.25L7.75 7.75", vectorEffect: "non-scaling-stroke" }) });
10194  
10195    // packages/icons/build-module/library/error.mjs
10196    var import_primitives4 = __toESM(require_primitives(), 1);
10197    var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
10198    var error_default = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives4.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" }) });
10199  
10200    // packages/icons/build-module/library/external.mjs
10201    var import_primitives5 = __toESM(require_primitives(), 1);
10202    var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
10203    var external_default = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives5.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" }) });
10204  
10205    // packages/icons/build-module/library/info.mjs
10206    var import_primitives6 = __toESM(require_primitives(), 1);
10207    var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
10208    var info_default = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_primitives6.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_runtime25.jsx)(import_primitives6.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" }) });
10209  
10210    // packages/icons/build-module/library/more-vertical.mjs
10211    var import_primitives7 = __toESM(require_primitives(), 1);
10212    var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
10213    var more_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_primitives7.Path, { d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" }) });
10214  
10215    // packages/icons/build-module/library/plus.mjs
10216    var import_primitives8 = __toESM(require_primitives(), 1);
10217    var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
10218    var plus_default = /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_primitives8.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_runtime27.jsx)(import_primitives8.Path, { d: "M12 18V6M18 12H6", vectorEffect: "non-scaling-stroke" }) });
10219  
10220    // packages/icons/build-module/library/published.mjs
10221    var import_primitives9 = __toESM(require_primitives(), 1);
10222    var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
10223    var published_default = /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
10224      /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_primitives9.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" }),
10225      /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_primitives9.Path, { d: "M9 12L11 14L15 10", vectorEffect: "non-scaling-stroke" })
10226    ] });
10227  
10228    // packages/icons/build-module/library/redo.mjs
10229    var import_primitives10 = __toESM(require_primitives(), 1);
10230    var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
10231    var redo_default = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_primitives10.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" }) });
10232  
10233    // packages/icons/build-module/library/undo.mjs
10234    var import_primitives11 = __toESM(require_primitives(), 1);
10235    var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
10236    var undo_default = /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_primitives11.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_primitives11.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" }) });
10237  
10238    // packages/ui/build-module/icon/icon.mjs
10239    var import_element17 = __toESM(require_element(), 1);
10240    var import_primitives12 = __toESM(require_primitives(), 1);
10241    var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
10242    var Icon = (0, import_element17.forwardRef)(function Icon2({ icon, size: size4 = 24, style, ...restProps }, ref) {
10243      const mergedStyle = icon.props.style || style ? { ...icon.props.style, ...style } : void 0;
10244      return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
10245        import_primitives12.SVG,
10246        {
10247          ref,
10248          ...icon.props,
10249          ...restProps,
10250          ...mergedStyle ? { style: mergedStyle } : {},
10251          width: size4,
10252          height: size4
10253        }
10254      );
10255    });
10256  
10257    // packages/ui/build-module/utils/keyboard-shortcut.mjs
10258    var import_element19 = __toESM(require_element(), 1);
10259    var import_i18n3 = __toESM(require_i18n(), 1);
10260  
10261    // packages/ui/build-module/visually-hidden/visually-hidden.mjs
10262    var import_element18 = __toESM(require_element(), 1);
10263    var STYLE_HASH_ATTRIBUTE6 = "data-wp-hash";
10264    function getRuntime6() {
10265      const globalScope = globalThis;
10266      if (globalScope.__wpStyleRuntime) {
10267        return globalScope.__wpStyleRuntime;
10268      }
10269      globalScope.__wpStyleRuntime = {
10270        documents: /* @__PURE__ */ new Map(),
10271        styles: /* @__PURE__ */ new Map(),
10272        injectedStyles: /* @__PURE__ */ new WeakMap()
10273      };
10274      if (typeof document !== "undefined") {
10275        registerDocument6(document);
10276      }
10277      return globalScope.__wpStyleRuntime;
10278    }
10279    function documentContainsStyleHash6(targetDocument, hash) {
10280      if (!targetDocument.head) {
10281        return false;
10282      }
10283      for (const style of targetDocument.head.querySelectorAll(
10284        `style[$STYLE_HASH_ATTRIBUTE6}]`
10285      )) {
10286        if (style.getAttribute(STYLE_HASH_ATTRIBUTE6) === hash) {
10287          return true;
10288        }
10289      }
10290      return false;
10291    }
10292    function injectStyle6(targetDocument, hash, css) {
10293      if (!targetDocument.head) {
10294        return;
10295      }
10296      const runtime = getRuntime6();
10297      let injectedStyles = runtime.injectedStyles.get(targetDocument);
10298      if (!injectedStyles) {
10299        injectedStyles = /* @__PURE__ */ new Set();
10300        runtime.injectedStyles.set(targetDocument, injectedStyles);
10301      }
10302      if (injectedStyles.has(hash)) {
10303        return;
10304      }
10305      if (documentContainsStyleHash6(targetDocument, hash)) {
10306        injectedStyles.add(hash);
10307        return;
10308      }
10309      const style = targetDocument.createElement("style");
10310      style.setAttribute(STYLE_HASH_ATTRIBUTE6, hash);
10311      style.appendChild(targetDocument.createTextNode(css));
10312      targetDocument.head.appendChild(style);
10313      injectedStyles.add(hash);
10314    }
10315    function registerDocument6(targetDocument) {
10316      const runtime = getRuntime6();
10317      runtime.documents.set(
10318        targetDocument,
10319        (runtime.documents.get(targetDocument) ?? 0) + 1
10320      );
10321      for (const [hash, css] of runtime.styles) {
10322        injectStyle6(targetDocument, hash, css);
10323      }
10324      return () => {
10325        const count = runtime.documents.get(targetDocument);
10326        if (count === void 0) {
10327          return;
10328        }
10329        if (count <= 1) {
10330          runtime.documents.delete(targetDocument);
10331          return;
10332        }
10333        runtime.documents.set(targetDocument, count - 1);
10334      };
10335    }
10336    function registerStyle6(hash, css) {
10337      const runtime = getRuntime6();
10338      runtime.styles.set(hash, css);
10339      for (const targetDocument of runtime.documents.keys()) {
10340        injectStyle6(targetDocument, hash, css);
10341      }
10342    }
10343    if (typeof process === "undefined" || true) {
10344      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}}}");
10345    }
10346    var style_default5 = { "visually-hidden": "f37b9e2e191ebd66__visually-hidden" };
10347    var VisuallyHidden = (0, import_element18.forwardRef)(
10348      function VisuallyHidden2({ render, ...restProps }, ref) {
10349        const element = useRender({
10350          render,
10351          ref,
10352          props: mergeProps(
10353            { className: style_default5["visually-hidden"] },
10354            restProps,
10355            {
10356              // @ts-expect-error Arbitrary data-* attributes aren't indexable on the typed div props. Kept hardcoded so consumers can't change or remove it.
10357              "data-visually-hidden": ""
10358            }
10359          )
10360        });
10361        return element;
10362      }
10363    );
10364  
10365    // packages/ui/build-module/utils/keyboard-shortcut.mjs
10366    var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
10367    function useKeyboardShortcutProps({
10368      "aria-describedby": ariaDescribedBy,
10369      "aria-keyshortcuts": ariaKeyShortcuts,
10370      shortcut
10371    }) {
10372      const generatedDescriptionId = (0, import_element19.useId)();
10373      const descriptionId = shortcut ? generatedDescriptionId : void 0;
10374      const describedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ");
10375      return {
10376        descriptionId,
10377        targetProps: {
10378          "aria-describedby": describedBy || void 0,
10379          "aria-keyshortcuts": shortcut?.ariaKeyShortcut ?? ariaKeyShortcuts
10380        }
10381      };
10382    }
10383    var KeyboardShortcutDescription = (0, import_element19.forwardRef)(function KeyboardShortcutDescription2({ descriptionId, shortcut }, ref) {
10384      return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
10385        VisuallyHidden,
10386        {
10387          id: descriptionId,
10388          "aria-hidden": "true",
10389          render: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { ref }),
10390          children: (0, import_i18n3.sprintf)(
10391            /* translators: %s: keyboard shortcut. */
10392            (0, import_i18n3.__)("Keyboard shortcut: %s"),
10393            shortcut.label ?? shortcut.ariaKeyShortcut
10394          )
10395        }
10396      );
10397    });
10398    var KeyboardShortcutDisplay = (0, import_element19.forwardRef)(function KeyboardShortcutDisplay2({ className, shortcut }, ref) {
10399      return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { ref, "aria-hidden": "true", className, dir: "ltr", children: shortcut.displayShortcut });
10400    });
10401  
10402    // packages/ui/build-module/button/button.mjs
10403    var import_a11y = __toESM(require_a11y(), 1);
10404    var import_element20 = __toESM(require_element(), 1);
10405    var import_i18n4 = __toESM(require_i18n(), 1);
10406    var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
10407    var STYLE_HASH_ATTRIBUTE7 = "data-wp-hash";
10408    function getRuntime7() {
10409      const globalScope = globalThis;
10410      if (globalScope.__wpStyleRuntime) {
10411        return globalScope.__wpStyleRuntime;
10412      }
10413      globalScope.__wpStyleRuntime = {
10414        documents: /* @__PURE__ */ new Map(),
10415        styles: /* @__PURE__ */ new Map(),
10416        injectedStyles: /* @__PURE__ */ new WeakMap()
10417      };
10418      if (typeof document !== "undefined") {
10419        registerDocument7(document);
10420      }
10421      return globalScope.__wpStyleRuntime;
10422    }
10423    function documentContainsStyleHash7(targetDocument, hash) {
10424      if (!targetDocument.head) {
10425        return false;
10426      }
10427      for (const style of targetDocument.head.querySelectorAll(
10428        `style[$STYLE_HASH_ATTRIBUTE7}]`
10429      )) {
10430        if (style.getAttribute(STYLE_HASH_ATTRIBUTE7) === hash) {
10431          return true;
10432        }
10433      }
10434      return false;
10435    }
10436    function injectStyle7(targetDocument, hash, css) {
10437      if (!targetDocument.head) {
10438        return;
10439      }
10440      const runtime = getRuntime7();
10441      let injectedStyles = runtime.injectedStyles.get(targetDocument);
10442      if (!injectedStyles) {
10443        injectedStyles = /* @__PURE__ */ new Set();
10444        runtime.injectedStyles.set(targetDocument, injectedStyles);
10445      }
10446      if (injectedStyles.has(hash)) {
10447        return;
10448      }
10449      if (documentContainsStyleHash7(targetDocument, hash)) {
10450        injectedStyles.add(hash);
10451        return;
10452      }
10453      const style = targetDocument.createElement("style");
10454      style.setAttribute(STYLE_HASH_ATTRIBUTE7, hash);
10455      style.appendChild(targetDocument.createTextNode(css));
10456      targetDocument.head.appendChild(style);
10457      injectedStyles.add(hash);
10458    }
10459    function registerDocument7(targetDocument) {
10460      const runtime = getRuntime7();
10461      runtime.documents.set(
10462        targetDocument,
10463        (runtime.documents.get(targetDocument) ?? 0) + 1
10464      );
10465      for (const [hash, css] of runtime.styles) {
10466        injectStyle7(targetDocument, hash, css);
10467      }
10468      return () => {
10469        const count = runtime.documents.get(targetDocument);
10470        if (count === void 0) {
10471          return;
10472        }
10473        if (count <= 1) {
10474          runtime.documents.delete(targetDocument);
10475          return;
10476        }
10477        runtime.documents.set(targetDocument, count - 1);
10478      };
10479    }
10480    function registerStyle7(hash, css) {
10481      const runtime = getRuntime7();
10482      runtime.styles.set(hash, css);
10483      for (const targetDocument of runtime.documents.keys()) {
10484        injectStyle7(targetDocument, hash, css);
10485      }
10486    }
10487    if (typeof process === "undefined" || true) {
10488      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)}}}');
10489    }
10490    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" };
10491    if (typeof process === "undefined" || true) {
10492      registerStyle7("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
10493    }
10494    var resets_default3 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
10495    if (typeof process === "undefined" || true) {
10496      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))}}}");
10497    }
10498    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" };
10499    if (typeof process === "undefined" || true) {
10500      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)}");
10501    }
10502    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" };
10503    var Button3 = (0, import_element20.forwardRef)(
10504      function Button22({
10505        tone = "brand",
10506        variant = "solid",
10507        size: size4 = "default",
10508        className,
10509        focusableWhenDisabled = true,
10510        disabled: disabled2,
10511        loading,
10512        loadingAnnouncement = (0, import_i18n4.__)("Loading"),
10513        children,
10514        ...props
10515      }, ref) {
10516        const mergedClassName = clsx_default(
10517          global_css_defense_default3.button,
10518          resets_default3["box-sizing"],
10519          focus_module_default2["outset-ring--focus-except-active"],
10520          variant !== "unstyled" && style_default6.button,
10521          style_default6[`is-$tone}`],
10522          style_default6[`is-$variant}`],
10523          style_default6[`is-$size4}`],
10524          loading && style_default6["is-loading"],
10525          className
10526        );
10527        (0, import_element20.useEffect)(() => {
10528          if (loading && loadingAnnouncement) {
10529            (0, import_a11y.speak)(loadingAnnouncement);
10530          }
10531        }, [loading, loadingAnnouncement]);
10532        return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
10533          Button,
10534          {
10535            ref,
10536            className: mergedClassName,
10537            focusableWhenDisabled,
10538            disabled: disabled2 ?? loading,
10539            ...props,
10540            children
10541          }
10542        );
10543      }
10544    );
10545  
10546    // packages/ui/build-module/button/icon.mjs
10547    var import_element21 = __toESM(require_element(), 1);
10548    var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
10549    var STYLE_HASH_ATTRIBUTE8 = "data-wp-hash";
10550    function getRuntime8() {
10551      const globalScope = globalThis;
10552      if (globalScope.__wpStyleRuntime) {
10553        return globalScope.__wpStyleRuntime;
10554      }
10555      globalScope.__wpStyleRuntime = {
10556        documents: /* @__PURE__ */ new Map(),
10557        styles: /* @__PURE__ */ new Map(),
10558        injectedStyles: /* @__PURE__ */ new WeakMap()
10559      };
10560      if (typeof document !== "undefined") {
10561        registerDocument8(document);
10562      }
10563      return globalScope.__wpStyleRuntime;
10564    }
10565    function documentContainsStyleHash8(targetDocument, hash) {
10566      if (!targetDocument.head) {
10567        return false;
10568      }
10569      for (const style of targetDocument.head.querySelectorAll(
10570        `style[$STYLE_HASH_ATTRIBUTE8}]`
10571      )) {
10572        if (style.getAttribute(STYLE_HASH_ATTRIBUTE8) === hash) {
10573          return true;
10574        }
10575      }
10576      return false;
10577    }
10578    function injectStyle8(targetDocument, hash, css) {
10579      if (!targetDocument.head) {
10580        return;
10581      }
10582      const runtime = getRuntime8();
10583      let injectedStyles = runtime.injectedStyles.get(targetDocument);
10584      if (!injectedStyles) {
10585        injectedStyles = /* @__PURE__ */ new Set();
10586        runtime.injectedStyles.set(targetDocument, injectedStyles);
10587      }
10588      if (injectedStyles.has(hash)) {
10589        return;
10590      }
10591      if (documentContainsStyleHash8(targetDocument, hash)) {
10592        injectedStyles.add(hash);
10593        return;
10594      }
10595      const style = targetDocument.createElement("style");
10596      style.setAttribute(STYLE_HASH_ATTRIBUTE8, hash);
10597      style.appendChild(targetDocument.createTextNode(css));
10598      targetDocument.head.appendChild(style);
10599      injectedStyles.add(hash);
10600    }
10601    function registerDocument8(targetDocument) {
10602      const runtime = getRuntime8();
10603      runtime.documents.set(
10604        targetDocument,
10605        (runtime.documents.get(targetDocument) ?? 0) + 1
10606      );
10607      for (const [hash, css] of runtime.styles) {
10608        injectStyle8(targetDocument, hash, css);
10609      }
10610      return () => {
10611        const count = runtime.documents.get(targetDocument);
10612        if (count === void 0) {
10613          return;
10614        }
10615        if (count <= 1) {
10616          runtime.documents.delete(targetDocument);
10617          return;
10618        }
10619        runtime.documents.set(targetDocument, count - 1);
10620      };
10621    }
10622    function registerStyle8(hash, css) {
10623      const runtime = getRuntime8();
10624      runtime.styles.set(hash, css);
10625      for (const targetDocument of runtime.documents.keys()) {
10626        injectStyle8(targetDocument, hash, css);
10627      }
10628    }
10629    if (typeof process === "undefined" || true) {
10630      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)}}}');
10631    }
10632    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" };
10633    var ButtonIcon = (0, import_element21.forwardRef)(
10634      function ButtonIcon2({ className, icon, ...props }, ref) {
10635        return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10636          Icon,
10637          {
10638            ref,
10639            icon,
10640            className: clsx_default(style_default7.icon, className),
10641            size: 24,
10642            ...props
10643          }
10644        );
10645      }
10646    );
10647  
10648    // packages/ui/build-module/button/index.mjs
10649    ButtonIcon.displayName = "Button.Icon";
10650    var Button4 = Object.assign(Button3, {
10651      /**
10652       * An icon component specifically designed to work well when rendered inside
10653       * a `Button` component.
10654       */
10655      Icon: ButtonIcon
10656    });
10657  
10658    // packages/ui/build-module/icon-button/icon-button.mjs
10659    var import_element22 = __toESM(require_element(), 1);
10660    var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
10661    var STYLE_HASH_ATTRIBUTE9 = "data-wp-hash";
10662    function getRuntime9() {
10663      const globalScope = globalThis;
10664      if (globalScope.__wpStyleRuntime) {
10665        return globalScope.__wpStyleRuntime;
10666      }
10667      globalScope.__wpStyleRuntime = {
10668        documents: /* @__PURE__ */ new Map(),
10669        styles: /* @__PURE__ */ new Map(),
10670        injectedStyles: /* @__PURE__ */ new WeakMap()
10671      };
10672      if (typeof document !== "undefined") {
10673        registerDocument9(document);
10674      }
10675      return globalScope.__wpStyleRuntime;
10676    }
10677    function documentContainsStyleHash9(targetDocument, hash) {
10678      if (!targetDocument.head) {
10679        return false;
10680      }
10681      for (const style of targetDocument.head.querySelectorAll(
10682        `style[$STYLE_HASH_ATTRIBUTE9}]`
10683      )) {
10684        if (style.getAttribute(STYLE_HASH_ATTRIBUTE9) === hash) {
10685          return true;
10686        }
10687      }
10688      return false;
10689    }
10690    function injectStyle9(targetDocument, hash, css) {
10691      if (!targetDocument.head) {
10692        return;
10693      }
10694      const runtime = getRuntime9();
10695      let injectedStyles = runtime.injectedStyles.get(targetDocument);
10696      if (!injectedStyles) {
10697        injectedStyles = /* @__PURE__ */ new Set();
10698        runtime.injectedStyles.set(targetDocument, injectedStyles);
10699      }
10700      if (injectedStyles.has(hash)) {
10701        return;
10702      }
10703      if (documentContainsStyleHash9(targetDocument, hash)) {
10704        injectedStyles.add(hash);
10705        return;
10706      }
10707      const style = targetDocument.createElement("style");
10708      style.setAttribute(STYLE_HASH_ATTRIBUTE9, hash);
10709      style.appendChild(targetDocument.createTextNode(css));
10710      targetDocument.head.appendChild(style);
10711      injectedStyles.add(hash);
10712    }
10713    function registerDocument9(targetDocument) {
10714      const runtime = getRuntime9();
10715      runtime.documents.set(
10716        targetDocument,
10717        (runtime.documents.get(targetDocument) ?? 0) + 1
10718      );
10719      for (const [hash, css] of runtime.styles) {
10720        injectStyle9(targetDocument, hash, css);
10721      }
10722      return () => {
10723        const count = runtime.documents.get(targetDocument);
10724        if (count === void 0) {
10725          return;
10726        }
10727        if (count <= 1) {
10728          runtime.documents.delete(targetDocument);
10729          return;
10730        }
10731        runtime.documents.set(targetDocument, count - 1);
10732      };
10733    }
10734    function registerStyle9(hash, css) {
10735      const runtime = getRuntime9();
10736      runtime.styles.set(hash, css);
10737      for (const targetDocument of runtime.documents.keys()) {
10738        injectStyle9(targetDocument, hash, css);
10739      }
10740    }
10741    if (typeof process === "undefined" || true) {
10742      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}}}");
10743    }
10744    var style_default8 = { "icon-button": "_28cfdc260e755391__icon-button", "icon": "f1c70d719989a85a__icon" };
10745    var IconButton = (0, import_element22.forwardRef)(
10746      function IconButton2({
10747        label,
10748        className,
10749        // Prevent accidental forwarding of `children`
10750        children: _children,
10751        disabled: disabled2,
10752        focusableWhenDisabled = true,
10753        icon,
10754        size: size4,
10755        shortcut,
10756        positioner,
10757        "aria-describedby": ariaDescribedBy,
10758        "aria-keyshortcuts": ariaKeyShortcuts,
10759        ...restProps
10760      }, ref) {
10761        const classes = clsx_default(style_default8["icon-button"], className);
10762        const { descriptionId, targetProps } = useKeyboardShortcutProps({
10763          "aria-describedby": ariaDescribedBy,
10764          "aria-keyshortcuts": ariaKeyShortcuts,
10765          shortcut
10766        });
10767        return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Root, { children: [
10768          /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
10769            Trigger,
10770            {
10771              ref,
10772              ...targetProps,
10773              disabled: disabled2 && !focusableWhenDisabled,
10774              render: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10775                Button4,
10776                {
10777                  ...restProps,
10778                  size: size4,
10779                  "aria-label": label,
10780                  disabled: disabled2,
10781                  focusableWhenDisabled
10782                }
10783              ),
10784              className: classes,
10785              children: [
10786                /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon, { icon, size: 24, className: style_default8.icon }),
10787                shortcut && descriptionId && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10788                  KeyboardShortcutDescription,
10789                  {
10790                    descriptionId,
10791                    shortcut
10792                  }
10793                )
10794              ]
10795            }
10796          ),
10797          /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Popup, { positioner, children: [
10798            label,
10799            shortcut && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
10800              " ",
10801              /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(KeyboardShortcutDisplay, { shortcut })
10802            ] })
10803          ] })
10804        ] });
10805      }
10806    );
10807  
10808    // packages/ui/build-module/card/index.mjs
10809    var card_exports = {};
10810    __export(card_exports, {
10811      Content: () => Content,
10812      FullBleed: () => FullBleed,
10813      Header: () => Header,
10814      Root: () => Root2,
10815      Title: () => Title
10816    });
10817  
10818    // packages/ui/build-module/card/root.mjs
10819    var import_element23 = __toESM(require_element(), 1);
10820    var STYLE_HASH_ATTRIBUTE10 = "data-wp-hash";
10821    function getRuntime10() {
10822      const globalScope = globalThis;
10823      if (globalScope.__wpStyleRuntime) {
10824        return globalScope.__wpStyleRuntime;
10825      }
10826      globalScope.__wpStyleRuntime = {
10827        documents: /* @__PURE__ */ new Map(),
10828        styles: /* @__PURE__ */ new Map(),
10829        injectedStyles: /* @__PURE__ */ new WeakMap()
10830      };
10831      if (typeof document !== "undefined") {
10832        registerDocument10(document);
10833      }
10834      return globalScope.__wpStyleRuntime;
10835    }
10836    function documentContainsStyleHash10(targetDocument, hash) {
10837      if (!targetDocument.head) {
10838        return false;
10839      }
10840      for (const style of targetDocument.head.querySelectorAll(
10841        `style[$STYLE_HASH_ATTRIBUTE10}]`
10842      )) {
10843        if (style.getAttribute(STYLE_HASH_ATTRIBUTE10) === hash) {
10844          return true;
10845        }
10846      }
10847      return false;
10848    }
10849    function injectStyle10(targetDocument, hash, css) {
10850      if (!targetDocument.head) {
10851        return;
10852      }
10853      const runtime = getRuntime10();
10854      let injectedStyles = runtime.injectedStyles.get(targetDocument);
10855      if (!injectedStyles) {
10856        injectedStyles = /* @__PURE__ */ new Set();
10857        runtime.injectedStyles.set(targetDocument, injectedStyles);
10858      }
10859      if (injectedStyles.has(hash)) {
10860        return;
10861      }
10862      if (documentContainsStyleHash10(targetDocument, hash)) {
10863        injectedStyles.add(hash);
10864        return;
10865      }
10866      const style = targetDocument.createElement("style");
10867      style.setAttribute(STYLE_HASH_ATTRIBUTE10, hash);
10868      style.appendChild(targetDocument.createTextNode(css));
10869      targetDocument.head.appendChild(style);
10870      injectedStyles.add(hash);
10871    }
10872    function registerDocument10(targetDocument) {
10873      const runtime = getRuntime10();
10874      runtime.documents.set(
10875        targetDocument,
10876        (runtime.documents.get(targetDocument) ?? 0) + 1
10877      );
10878      for (const [hash, css] of runtime.styles) {
10879        injectStyle10(targetDocument, hash, css);
10880      }
10881      return () => {
10882        const count = runtime.documents.get(targetDocument);
10883        if (count === void 0) {
10884          return;
10885        }
10886        if (count <= 1) {
10887          runtime.documents.delete(targetDocument);
10888          return;
10889        }
10890        runtime.documents.set(targetDocument, count - 1);
10891      };
10892    }
10893    function registerStyle10(hash, css) {
10894      const runtime = getRuntime10();
10895      runtime.styles.set(hash, css);
10896      for (const targetDocument of runtime.documents.keys()) {
10897        injectStyle10(targetDocument, hash, css);
10898      }
10899    }
10900    if (typeof process === "undefined" || true) {
10901      registerStyle10("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
10902    }
10903    var resets_default4 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
10904    if (typeof process === "undefined" || true) {
10905      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)}}}");
10906    }
10907    var style_default9 = { "root": "_02872bf298eadc43__root", "header": "bbccc92e6ba5662d__header", "content": "_5dffdaf2a6e669ac__content", "fullbleed": "c1fa192587e1b4a6__fullbleed" };
10908    var Root2 = (0, import_element23.forwardRef)(function Card({ render, ...restProps }, ref) {
10909      const mergedClassName = clsx_default(style_default9.root, resets_default4["box-sizing"]);
10910      const element = useRender({
10911        defaultTagName: "div",
10912        render,
10913        ref,
10914        props: mergeProps({ className: mergedClassName }, restProps)
10915      });
10916      return element;
10917    });
10918  
10919    // packages/ui/build-module/card/header.mjs
10920    var import_element24 = __toESM(require_element(), 1);
10921    var STYLE_HASH_ATTRIBUTE11 = "data-wp-hash";
10922    function getRuntime11() {
10923      const globalScope = globalThis;
10924      if (globalScope.__wpStyleRuntime) {
10925        return globalScope.__wpStyleRuntime;
10926      }
10927      globalScope.__wpStyleRuntime = {
10928        documents: /* @__PURE__ */ new Map(),
10929        styles: /* @__PURE__ */ new Map(),
10930        injectedStyles: /* @__PURE__ */ new WeakMap()
10931      };
10932      if (typeof document !== "undefined") {
10933        registerDocument11(document);
10934      }
10935      return globalScope.__wpStyleRuntime;
10936    }
10937    function documentContainsStyleHash11(targetDocument, hash) {
10938      if (!targetDocument.head) {
10939        return false;
10940      }
10941      for (const style of targetDocument.head.querySelectorAll(
10942        `style[$STYLE_HASH_ATTRIBUTE11}]`
10943      )) {
10944        if (style.getAttribute(STYLE_HASH_ATTRIBUTE11) === hash) {
10945          return true;
10946        }
10947      }
10948      return false;
10949    }
10950    function injectStyle11(targetDocument, hash, css) {
10951      if (!targetDocument.head) {
10952        return;
10953      }
10954      const runtime = getRuntime11();
10955      let injectedStyles = runtime.injectedStyles.get(targetDocument);
10956      if (!injectedStyles) {
10957        injectedStyles = /* @__PURE__ */ new Set();
10958        runtime.injectedStyles.set(targetDocument, injectedStyles);
10959      }
10960      if (injectedStyles.has(hash)) {
10961        return;
10962      }
10963      if (documentContainsStyleHash11(targetDocument, hash)) {
10964        injectedStyles.add(hash);
10965        return;
10966      }
10967      const style = targetDocument.createElement("style");
10968      style.setAttribute(STYLE_HASH_ATTRIBUTE11, hash);
10969      style.appendChild(targetDocument.createTextNode(css));
10970      targetDocument.head.appendChild(style);
10971      injectedStyles.add(hash);
10972    }
10973    function registerDocument11(targetDocument) {
10974      const runtime = getRuntime11();
10975      runtime.documents.set(
10976        targetDocument,
10977        (runtime.documents.get(targetDocument) ?? 0) + 1
10978      );
10979      for (const [hash, css] of runtime.styles) {
10980        injectStyle11(targetDocument, hash, css);
10981      }
10982      return () => {
10983        const count = runtime.documents.get(targetDocument);
10984        if (count === void 0) {
10985          return;
10986        }
10987        if (count <= 1) {
10988          runtime.documents.delete(targetDocument);
10989          return;
10990        }
10991        runtime.documents.set(targetDocument, count - 1);
10992      };
10993    }
10994    function registerStyle11(hash, css) {
10995      const runtime = getRuntime11();
10996      runtime.styles.set(hash, css);
10997      for (const targetDocument of runtime.documents.keys()) {
10998        injectStyle11(targetDocument, hash, css);
10999      }
11000    }
11001    if (typeof process === "undefined" || true) {
11002      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)}}}");
11003    }
11004    var style_default10 = { "root": "_02872bf298eadc43__root", "header": "bbccc92e6ba5662d__header", "content": "_5dffdaf2a6e669ac__content", "fullbleed": "c1fa192587e1b4a6__fullbleed" };
11005    var Header = (0, import_element24.forwardRef)(
11006      function CardHeader({ render, ...props }, ref) {
11007        const element = useRender({
11008          defaultTagName: "div",
11009          render,
11010          ref,
11011          props: mergeProps({ className: style_default10.header }, props)
11012        });
11013        return element;
11014      }
11015    );
11016  
11017    // packages/ui/build-module/card/content.mjs
11018    var import_element25 = __toESM(require_element(), 1);
11019    var STYLE_HASH_ATTRIBUTE12 = "data-wp-hash";
11020    function getRuntime12() {
11021      const globalScope = globalThis;
11022      if (globalScope.__wpStyleRuntime) {
11023        return globalScope.__wpStyleRuntime;
11024      }
11025      globalScope.__wpStyleRuntime = {
11026        documents: /* @__PURE__ */ new Map(),
11027        styles: /* @__PURE__ */ new Map(),
11028        injectedStyles: /* @__PURE__ */ new WeakMap()
11029      };
11030      if (typeof document !== "undefined") {
11031        registerDocument12(document);
11032      }
11033      return globalScope.__wpStyleRuntime;
11034    }
11035    function documentContainsStyleHash12(targetDocument, hash) {
11036      if (!targetDocument.head) {
11037        return false;
11038      }
11039      for (const style of targetDocument.head.querySelectorAll(
11040        `style[$STYLE_HASH_ATTRIBUTE12}]`
11041      )) {
11042        if (style.getAttribute(STYLE_HASH_ATTRIBUTE12) === hash) {
11043          return true;
11044        }
11045      }
11046      return false;
11047    }
11048    function injectStyle12(targetDocument, hash, css) {
11049      if (!targetDocument.head) {
11050        return;
11051      }
11052      const runtime = getRuntime12();
11053      let injectedStyles = runtime.injectedStyles.get(targetDocument);
11054      if (!injectedStyles) {
11055        injectedStyles = /* @__PURE__ */ new Set();
11056        runtime.injectedStyles.set(targetDocument, injectedStyles);
11057      }
11058      if (injectedStyles.has(hash)) {
11059        return;
11060      }
11061      if (documentContainsStyleHash12(targetDocument, hash)) {
11062        injectedStyles.add(hash);
11063        return;
11064      }
11065      const style = targetDocument.createElement("style");
11066      style.setAttribute(STYLE_HASH_ATTRIBUTE12, hash);
11067      style.appendChild(targetDocument.createTextNode(css));
11068      targetDocument.head.appendChild(style);
11069      injectedStyles.add(hash);
11070    }
11071    function registerDocument12(targetDocument) {
11072      const runtime = getRuntime12();
11073      runtime.documents.set(
11074        targetDocument,
11075        (runtime.documents.get(targetDocument) ?? 0) + 1
11076      );
11077      for (const [hash, css] of runtime.styles) {
11078        injectStyle12(targetDocument, hash, css);
11079      }
11080      return () => {
11081        const count = runtime.documents.get(targetDocument);
11082        if (count === void 0) {
11083          return;
11084        }
11085        if (count <= 1) {
11086          runtime.documents.delete(targetDocument);
11087          return;
11088        }
11089        runtime.documents.set(targetDocument, count - 1);
11090      };
11091    }
11092    function registerStyle12(hash, css) {
11093      const runtime = getRuntime12();
11094      runtime.styles.set(hash, css);
11095      for (const targetDocument of runtime.documents.keys()) {
11096        injectStyle12(targetDocument, hash, css);
11097      }
11098    }
11099    if (typeof process === "undefined" || true) {
11100      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)}}}");
11101    }
11102    var style_default11 = { "root": "_02872bf298eadc43__root", "header": "bbccc92e6ba5662d__header", "content": "_5dffdaf2a6e669ac__content", "fullbleed": "c1fa192587e1b4a6__fullbleed" };
11103    var Content = (0, import_element25.forwardRef)(
11104      function CardContent({ render, ...props }, ref) {
11105        const element = useRender({
11106          defaultTagName: "div",
11107          render,
11108          ref,
11109          props: mergeProps({ className: style_default11.content }, props)
11110        });
11111        return element;
11112      }
11113    );
11114  
11115    // packages/ui/build-module/card/full-bleed.mjs
11116    var import_element26 = __toESM(require_element(), 1);
11117    var STYLE_HASH_ATTRIBUTE13 = "data-wp-hash";
11118    function getRuntime13() {
11119      const globalScope = globalThis;
11120      if (globalScope.__wpStyleRuntime) {
11121        return globalScope.__wpStyleRuntime;
11122      }
11123      globalScope.__wpStyleRuntime = {
11124        documents: /* @__PURE__ */ new Map(),
11125        styles: /* @__PURE__ */ new Map(),
11126        injectedStyles: /* @__PURE__ */ new WeakMap()
11127      };
11128      if (typeof document !== "undefined") {
11129        registerDocument13(document);
11130      }
11131      return globalScope.__wpStyleRuntime;
11132    }
11133    function documentContainsStyleHash13(targetDocument, hash) {
11134      if (!targetDocument.head) {
11135        return false;
11136      }
11137      for (const style of targetDocument.head.querySelectorAll(
11138        `style[$STYLE_HASH_ATTRIBUTE13}]`
11139      )) {
11140        if (style.getAttribute(STYLE_HASH_ATTRIBUTE13) === hash) {
11141          return true;
11142        }
11143      }
11144      return false;
11145    }
11146    function injectStyle13(targetDocument, hash, css) {
11147      if (!targetDocument.head) {
11148        return;
11149      }
11150      const runtime = getRuntime13();
11151      let injectedStyles = runtime.injectedStyles.get(targetDocument);
11152      if (!injectedStyles) {
11153        injectedStyles = /* @__PURE__ */ new Set();
11154        runtime.injectedStyles.set(targetDocument, injectedStyles);
11155      }
11156      if (injectedStyles.has(hash)) {
11157        return;
11158      }
11159      if (documentContainsStyleHash13(targetDocument, hash)) {
11160        injectedStyles.add(hash);
11161        return;
11162      }
11163      const style = targetDocument.createElement("style");
11164      style.setAttribute(STYLE_HASH_ATTRIBUTE13, hash);
11165      style.appendChild(targetDocument.createTextNode(css));
11166      targetDocument.head.appendChild(style);
11167      injectedStyles.add(hash);
11168    }
11169    function registerDocument13(targetDocument) {
11170      const runtime = getRuntime13();
11171      runtime.documents.set(
11172        targetDocument,
11173        (runtime.documents.get(targetDocument) ?? 0) + 1
11174      );
11175      for (const [hash, css] of runtime.styles) {
11176        injectStyle13(targetDocument, hash, css);
11177      }
11178      return () => {
11179        const count = runtime.documents.get(targetDocument);
11180        if (count === void 0) {
11181          return;
11182        }
11183        if (count <= 1) {
11184          runtime.documents.delete(targetDocument);
11185          return;
11186        }
11187        runtime.documents.set(targetDocument, count - 1);
11188      };
11189    }
11190    function registerStyle13(hash, css) {
11191      const runtime = getRuntime13();
11192      runtime.styles.set(hash, css);
11193      for (const targetDocument of runtime.documents.keys()) {
11194        injectStyle13(targetDocument, hash, css);
11195      }
11196    }
11197    if (typeof process === "undefined" || true) {
11198      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)}}}");
11199    }
11200    var style_default12 = { "root": "_02872bf298eadc43__root", "header": "bbccc92e6ba5662d__header", "content": "_5dffdaf2a6e669ac__content", "fullbleed": "c1fa192587e1b4a6__fullbleed" };
11201    var FullBleed = (0, import_element26.forwardRef)(
11202      function CardFullBleed({ render, ...props }, ref) {
11203        const element = useRender({
11204          defaultTagName: "div",
11205          render,
11206          ref,
11207          props: mergeProps(
11208            { className: style_default12.fullbleed },
11209            props
11210          )
11211        });
11212        return element;
11213      }
11214    );
11215  
11216    // packages/ui/build-module/card/title.mjs
11217    var import_element27 = __toESM(require_element(), 1);
11218    var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
11219    var DEFAULT_TAG = /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", {});
11220    var Title = (0, import_element27.forwardRef)(
11221      function CardTitle({ render = DEFAULT_TAG, children, ...props }, ref) {
11222        return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
11223          Text,
11224          {
11225            ref,
11226            variant: "heading-lg",
11227            render,
11228            ...props,
11229            children
11230          }
11231        );
11232      }
11233    );
11234  
11235    // packages/ui/build-module/collapsible/panel.mjs
11236    var import_element28 = __toESM(require_element(), 1);
11237    var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
11238    var Panel = (0, import_element28.forwardRef)(
11239      function CollapsiblePanel3(props, forwardedRef) {
11240        return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(index_parts_exports.Panel, { ref: forwardedRef, ...props });
11241      }
11242    );
11243  
11244    // packages/ui/build-module/collapsible/root.mjs
11245    var import_element29 = __toESM(require_element(), 1);
11246    var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
11247    var Root3 = (0, import_element29.forwardRef)(
11248      function CollapsibleRoot3(props, forwardedRef) {
11249        return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(index_parts_exports.Root, { ref: forwardedRef, ...props });
11250      }
11251    );
11252  
11253    // packages/ui/build-module/collapsible/trigger.mjs
11254    var import_element30 = __toESM(require_element(), 1);
11255    var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
11256    var Trigger2 = (0, import_element30.forwardRef)(
11257      function CollapsibleTrigger3(props, forwardedRef) {
11258        return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(index_parts_exports.Trigger, { ref: forwardedRef, ...props });
11259      }
11260    );
11261  
11262    // packages/ui/build-module/collapsible-card/index.mjs
11263    var collapsible_card_exports = {};
11264    __export(collapsible_card_exports, {
11265      Content: () => Content2,
11266      Header: () => Header2,
11267      HeaderDescription: () => HeaderDescription,
11268      Root: () => Root32
11269    });
11270  
11271    // packages/ui/build-module/collapsible-card/root.mjs
11272    var import_element31 = __toESM(require_element(), 1);
11273    var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
11274    var Root32 = (0, import_element31.forwardRef)(
11275      function CollapsibleCardRoot({ render, ...restProps }, ref) {
11276        return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11277          Root3,
11278          {
11279            ref,
11280            render: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Root2, { render }),
11281            ...restProps
11282          }
11283        );
11284      }
11285    );
11286  
11287    // packages/ui/build-module/collapsible-card/header.mjs
11288    var import_compose = __toESM(require_compose(), 1);
11289    var import_element33 = __toESM(require_element(), 1);
11290  
11291    // packages/ui/build-module/collapsible-card/context.mjs
11292    var import_element32 = __toESM(require_element(), 1);
11293    var HeaderDescriptionIdContext = (0, import_element32.createContext)(null);
11294  
11295    // packages/ui/build-module/collapsible-card/header.mjs
11296    var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
11297    var STYLE_HASH_ATTRIBUTE14 = "data-wp-hash";
11298    function getRuntime14() {
11299      const globalScope = globalThis;
11300      if (globalScope.__wpStyleRuntime) {
11301        return globalScope.__wpStyleRuntime;
11302      }
11303      globalScope.__wpStyleRuntime = {
11304        documents: /* @__PURE__ */ new Map(),
11305        styles: /* @__PURE__ */ new Map(),
11306        injectedStyles: /* @__PURE__ */ new WeakMap()
11307      };
11308      if (typeof document !== "undefined") {
11309        registerDocument14(document);
11310      }
11311      return globalScope.__wpStyleRuntime;
11312    }
11313    function documentContainsStyleHash14(targetDocument, hash) {
11314      if (!targetDocument.head) {
11315        return false;
11316      }
11317      for (const style of targetDocument.head.querySelectorAll(
11318        `style[$STYLE_HASH_ATTRIBUTE14}]`
11319      )) {
11320        if (style.getAttribute(STYLE_HASH_ATTRIBUTE14) === hash) {
11321          return true;
11322        }
11323      }
11324      return false;
11325    }
11326    function injectStyle14(targetDocument, hash, css) {
11327      if (!targetDocument.head) {
11328        return;
11329      }
11330      const runtime = getRuntime14();
11331      let injectedStyles = runtime.injectedStyles.get(targetDocument);
11332      if (!injectedStyles) {
11333        injectedStyles = /* @__PURE__ */ new Set();
11334        runtime.injectedStyles.set(targetDocument, injectedStyles);
11335      }
11336      if (injectedStyles.has(hash)) {
11337        return;
11338      }
11339      if (documentContainsStyleHash14(targetDocument, hash)) {
11340        injectedStyles.add(hash);
11341        return;
11342      }
11343      const style = targetDocument.createElement("style");
11344      style.setAttribute(STYLE_HASH_ATTRIBUTE14, hash);
11345      style.appendChild(targetDocument.createTextNode(css));
11346      targetDocument.head.appendChild(style);
11347      injectedStyles.add(hash);
11348    }
11349    function registerDocument14(targetDocument) {
11350      const runtime = getRuntime14();
11351      runtime.documents.set(
11352        targetDocument,
11353        (runtime.documents.get(targetDocument) ?? 0) + 1
11354      );
11355      for (const [hash, css] of runtime.styles) {
11356        injectStyle14(targetDocument, hash, css);
11357      }
11358      return () => {
11359        const count = runtime.documents.get(targetDocument);
11360        if (count === void 0) {
11361          return;
11362        }
11363        if (count <= 1) {
11364          runtime.documents.delete(targetDocument);
11365          return;
11366        }
11367        runtime.documents.set(targetDocument, count - 1);
11368      };
11369    }
11370    function registerStyle14(hash, css) {
11371      const runtime = getRuntime14();
11372      runtime.styles.set(hash, css);
11373      for (const targetDocument of runtime.documents.keys()) {
11374        injectStyle14(targetDocument, hash, css);
11375      }
11376    }
11377    if (typeof process === "undefined" || true) {
11378      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)}}}}");
11379    }
11380    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" };
11381    if (typeof process === "undefined" || true) {
11382      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)}");
11383    }
11384    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" };
11385    if (typeof process === "undefined" || true) {
11386      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))}}}");
11387    }
11388    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" };
11389    var Header2 = (0, import_element33.forwardRef)(
11390      function CollapsibleCardHeader({
11391        children,
11392        className,
11393        render,
11394        "aria-describedby": ariaDescribedByProp,
11395        ...restProps
11396      }, ref) {
11397        const [descriptionIds, setDescriptionIds] = (0, import_element33.useState)(
11398          []
11399        );
11400        const [orderedDescriptionIds, setOrderedDescriptionIds] = (0, import_element33.useState)([]);
11401        const headerContentRef = (0, import_element33.useRef)(null);
11402        const registerDescriptionId = (0, import_element33.useCallback)((id) => {
11403          setDescriptionIds((currentDescriptionIds) => {
11404            if (currentDescriptionIds.includes(id)) {
11405              return currentDescriptionIds;
11406            }
11407            return [...currentDescriptionIds, id];
11408          });
11409          return () => {
11410            setDescriptionIds(
11411              (currentDescriptionIds) => currentDescriptionIds.filter(
11412                (descriptionId) => descriptionId !== id
11413              )
11414            );
11415          };
11416        }, []);
11417        const contextValue = (0, import_element33.useMemo)(
11418          () => ({ registerDescriptionId }),
11419          [registerDescriptionId]
11420        );
11421        (0, import_compose.useIsomorphicLayoutEffect)(() => {
11422          const registeredDescriptionIds = new Set(descriptionIds);
11423          const nextDescriptionIds = Array.from(
11424            headerContentRef.current?.querySelectorAll("[id]") ?? []
11425          ).map((element) => element.id).filter((id) => registeredDescriptionIds.has(id));
11426          setOrderedDescriptionIds((currentDescriptionIds) => {
11427            if (currentDescriptionIds.length === nextDescriptionIds.length && currentDescriptionIds.every(
11428              (id, index2) => id === nextDescriptionIds[index2]
11429            )) {
11430              return currentDescriptionIds;
11431            }
11432            return nextDescriptionIds;
11433          });
11434        });
11435        const ariaDescribedBy = Array.from(
11436          /* @__PURE__ */ new Set([
11437            ...ariaDescribedByProp?.split(/\s+/).filter(Boolean) ?? [],
11438            ...orderedDescriptionIds
11439          ])
11440        ).join(" ") || void 0;
11441        return useRender({
11442          defaultTagName: "div",
11443          render,
11444          ref,
11445          props: mergeProps(restProps, {
11446            className: clsx_default(
11447              global_css_defense_default4.heading,
11448              style_default13["heading-wrapper"],
11449              className
11450            ),
11451            children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(HeaderDescriptionIdContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
11452              Trigger2,
11453              {
11454                className: style_default13.header,
11455                render: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Header, {}),
11456                nativeButton: false,
11457                "aria-describedby": ariaDescribedBy,
11458                children: [
11459                  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11460                    "div",
11461                    {
11462                      ref: headerContentRef,
11463                      className: style_default13["header-content"],
11464                      children
11465                    }
11466                  ),
11467                  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11468                    "div",
11469                    {
11470                      className: clsx_default(
11471                        style_default13["header-trigger-positioner"]
11472                      ),
11473                      children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11474                        "div",
11475                        {
11476                          className: clsx_default(
11477                            style_default13["header-trigger-wrapper"],
11478                            global_css_defense_default4.div,
11479                            // While the interactive trigger element is the whole header,
11480                            // the focus ring will be displayed only on the icon to visually
11481                            // emulate it being the button.
11482                            focus_module_default3["outset-ring--focus-parent-visible"]
11483                          ),
11484                          children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11485                            Icon,
11486                            {
11487                              icon: chevron_down_default,
11488                              className: style_default13["header-trigger"]
11489                            }
11490                          )
11491                        }
11492                      )
11493                    }
11494                  )
11495                ]
11496              }
11497            ) })
11498          })
11499        });
11500      }
11501    );
11502  
11503    // packages/ui/build-module/collapsible-card/header-description.mjs
11504    var import_element34 = __toESM(require_element(), 1);
11505    var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
11506    var STYLE_HASH_ATTRIBUTE15 = "data-wp-hash";
11507    function getRuntime15() {
11508      const globalScope = globalThis;
11509      if (globalScope.__wpStyleRuntime) {
11510        return globalScope.__wpStyleRuntime;
11511      }
11512      globalScope.__wpStyleRuntime = {
11513        documents: /* @__PURE__ */ new Map(),
11514        styles: /* @__PURE__ */ new Map(),
11515        injectedStyles: /* @__PURE__ */ new WeakMap()
11516      };
11517      if (typeof document !== "undefined") {
11518        registerDocument15(document);
11519      }
11520      return globalScope.__wpStyleRuntime;
11521    }
11522    function documentContainsStyleHash15(targetDocument, hash) {
11523      if (!targetDocument.head) {
11524        return false;
11525      }
11526      for (const style of targetDocument.head.querySelectorAll(
11527        `style[$STYLE_HASH_ATTRIBUTE15}]`
11528      )) {
11529        if (style.getAttribute(STYLE_HASH_ATTRIBUTE15) === hash) {
11530          return true;
11531        }
11532      }
11533      return false;
11534    }
11535    function injectStyle15(targetDocument, hash, css) {
11536      if (!targetDocument.head) {
11537        return;
11538      }
11539      const runtime = getRuntime15();
11540      let injectedStyles = runtime.injectedStyles.get(targetDocument);
11541      if (!injectedStyles) {
11542        injectedStyles = /* @__PURE__ */ new Set();
11543        runtime.injectedStyles.set(targetDocument, injectedStyles);
11544      }
11545      if (injectedStyles.has(hash)) {
11546        return;
11547      }
11548      if (documentContainsStyleHash15(targetDocument, hash)) {
11549        injectedStyles.add(hash);
11550        return;
11551      }
11552      const style = targetDocument.createElement("style");
11553      style.setAttribute(STYLE_HASH_ATTRIBUTE15, hash);
11554      style.appendChild(targetDocument.createTextNode(css));
11555      targetDocument.head.appendChild(style);
11556      injectedStyles.add(hash);
11557    }
11558    function registerDocument15(targetDocument) {
11559      const runtime = getRuntime15();
11560      runtime.documents.set(
11561        targetDocument,
11562        (runtime.documents.get(targetDocument) ?? 0) + 1
11563      );
11564      for (const [hash, css] of runtime.styles) {
11565        injectStyle15(targetDocument, hash, css);
11566      }
11567      return () => {
11568        const count = runtime.documents.get(targetDocument);
11569        if (count === void 0) {
11570          return;
11571        }
11572        if (count <= 1) {
11573          runtime.documents.delete(targetDocument);
11574          return;
11575        }
11576        runtime.documents.set(targetDocument, count - 1);
11577      };
11578    }
11579    function registerStyle15(hash, css) {
11580      const runtime = getRuntime15();
11581      runtime.styles.set(hash, css);
11582      for (const targetDocument of runtime.documents.keys()) {
11583        injectStyle15(targetDocument, hash, css);
11584      }
11585    }
11586    if (typeof process === "undefined" || true) {
11587      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)}}}}");
11588    }
11589    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" };
11590    var DEFAULT_TAG2 = /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", {});
11591    var HeaderDescription = (0, import_element34.forwardRef)(function CollapsibleCardHeaderDescription({ children, className, id: idProp, render = DEFAULT_TAG2, ...restProps }, ref) {
11592      const generatedId = (0, import_element34.useId)();
11593      const descriptionId = idProp ?? generatedId;
11594      const context = (0, import_element34.useContext)(HeaderDescriptionIdContext);
11595      if (!context) {
11596        throw new Error(
11597          "CollapsibleCard.HeaderDescription: Missing parent <CollapsibleCard.Header>. Render <CollapsibleCard.HeaderDescription> inside <CollapsibleCard.Header>."
11598        );
11599      }
11600      (0, import_element34.useEffect)(() => {
11601        return context?.registerDescriptionId(descriptionId);
11602      }, [context, descriptionId]);
11603      return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
11604        Text,
11605        {
11606          ref,
11607          variant: "body-md",
11608          render,
11609          id: descriptionId,
11610          "aria-hidden": "true",
11611          className: clsx_default(style_default14["header-description"], className),
11612          ...restProps,
11613          children
11614        }
11615      );
11616    });
11617  
11618    // packages/ui/build-module/collapsible-card/content.mjs
11619    var import_element35 = __toESM(require_element(), 1);
11620    var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
11621    var STYLE_HASH_ATTRIBUTE16 = "data-wp-hash";
11622    function getRuntime16() {
11623      const globalScope = globalThis;
11624      if (globalScope.__wpStyleRuntime) {
11625        return globalScope.__wpStyleRuntime;
11626      }
11627      globalScope.__wpStyleRuntime = {
11628        documents: /* @__PURE__ */ new Map(),
11629        styles: /* @__PURE__ */ new Map(),
11630        injectedStyles: /* @__PURE__ */ new WeakMap()
11631      };
11632      if (typeof document !== "undefined") {
11633        registerDocument16(document);
11634      }
11635      return globalScope.__wpStyleRuntime;
11636    }
11637    function documentContainsStyleHash16(targetDocument, hash) {
11638      if (!targetDocument.head) {
11639        return false;
11640      }
11641      for (const style of targetDocument.head.querySelectorAll(
11642        `style[$STYLE_HASH_ATTRIBUTE16}]`
11643      )) {
11644        if (style.getAttribute(STYLE_HASH_ATTRIBUTE16) === hash) {
11645          return true;
11646        }
11647      }
11648      return false;
11649    }
11650    function injectStyle16(targetDocument, hash, css) {
11651      if (!targetDocument.head) {
11652        return;
11653      }
11654      const runtime = getRuntime16();
11655      let injectedStyles = runtime.injectedStyles.get(targetDocument);
11656      if (!injectedStyles) {
11657        injectedStyles = /* @__PURE__ */ new Set();
11658        runtime.injectedStyles.set(targetDocument, injectedStyles);
11659      }
11660      if (injectedStyles.has(hash)) {
11661        return;
11662      }
11663      if (documentContainsStyleHash16(targetDocument, hash)) {
11664        injectedStyles.add(hash);
11665        return;
11666      }
11667      const style = targetDocument.createElement("style");
11668      style.setAttribute(STYLE_HASH_ATTRIBUTE16, hash);
11669      style.appendChild(targetDocument.createTextNode(css));
11670      targetDocument.head.appendChild(style);
11671      injectedStyles.add(hash);
11672    }
11673    function registerDocument16(targetDocument) {
11674      const runtime = getRuntime16();
11675      runtime.documents.set(
11676        targetDocument,
11677        (runtime.documents.get(targetDocument) ?? 0) + 1
11678      );
11679      for (const [hash, css] of runtime.styles) {
11680        injectStyle16(targetDocument, hash, css);
11681      }
11682      return () => {
11683        const count = runtime.documents.get(targetDocument);
11684        if (count === void 0) {
11685          return;
11686        }
11687        if (count <= 1) {
11688          runtime.documents.delete(targetDocument);
11689          return;
11690        }
11691        runtime.documents.set(targetDocument, count - 1);
11692      };
11693    }
11694    function registerStyle16(hash, css) {
11695      const runtime = getRuntime16();
11696      runtime.styles.set(hash, css);
11697      for (const targetDocument of runtime.documents.keys()) {
11698        injectStyle16(targetDocument, hash, css);
11699      }
11700    }
11701    if (typeof process === "undefined" || true) {
11702      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)}}}}");
11703    }
11704    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" };
11705    var Content2 = (0, import_element35.forwardRef)(
11706      function CollapsibleCardContent({ className, render, children, hiddenUntilFound = true, ...restProps }, ref) {
11707        return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
11708          Panel,
11709          {
11710            ref,
11711            className: (state) => clsx_default(
11712              style_default15.content,
11713              state.open && state.transitionStatus === "idle" && style_default15["overflow-visible"],
11714              className
11715            ),
11716            hiddenUntilFound,
11717            ...restProps,
11718            children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
11719              Content,
11720              {
11721                className: style_default15["content-inner"],
11722                render,
11723                children
11724              }
11725            )
11726          }
11727        );
11728      }
11729    );
11730  
11731    // packages/ui/build-module/stack/stack.mjs
11732    var import_element36 = __toESM(require_element(), 1);
11733    var STYLE_HASH_ATTRIBUTE17 = "data-wp-hash";
11734    function getRuntime17() {
11735      const globalScope = globalThis;
11736      if (globalScope.__wpStyleRuntime) {
11737        return globalScope.__wpStyleRuntime;
11738      }
11739      globalScope.__wpStyleRuntime = {
11740        documents: /* @__PURE__ */ new Map(),
11741        styles: /* @__PURE__ */ new Map(),
11742        injectedStyles: /* @__PURE__ */ new WeakMap()
11743      };
11744      if (typeof document !== "undefined") {
11745        registerDocument17(document);
11746      }
11747      return globalScope.__wpStyleRuntime;
11748    }
11749    function documentContainsStyleHash17(targetDocument, hash) {
11750      if (!targetDocument.head) {
11751        return false;
11752      }
11753      for (const style of targetDocument.head.querySelectorAll(
11754        `style[$STYLE_HASH_ATTRIBUTE17}]`
11755      )) {
11756        if (style.getAttribute(STYLE_HASH_ATTRIBUTE17) === hash) {
11757          return true;
11758        }
11759      }
11760      return false;
11761    }
11762    function injectStyle17(targetDocument, hash, css) {
11763      if (!targetDocument.head) {
11764        return;
11765      }
11766      const runtime = getRuntime17();
11767      let injectedStyles = runtime.injectedStyles.get(targetDocument);
11768      if (!injectedStyles) {
11769        injectedStyles = /* @__PURE__ */ new Set();
11770        runtime.injectedStyles.set(targetDocument, injectedStyles);
11771      }
11772      if (injectedStyles.has(hash)) {
11773        return;
11774      }
11775      if (documentContainsStyleHash17(targetDocument, hash)) {
11776        injectedStyles.add(hash);
11777        return;
11778      }
11779      const style = targetDocument.createElement("style");
11780      style.setAttribute(STYLE_HASH_ATTRIBUTE17, hash);
11781      style.appendChild(targetDocument.createTextNode(css));
11782      targetDocument.head.appendChild(style);
11783      injectedStyles.add(hash);
11784    }
11785    function registerDocument17(targetDocument) {
11786      const runtime = getRuntime17();
11787      runtime.documents.set(
11788        targetDocument,
11789        (runtime.documents.get(targetDocument) ?? 0) + 1
11790      );
11791      for (const [hash, css] of runtime.styles) {
11792        injectStyle17(targetDocument, hash, css);
11793      }
11794      return () => {
11795        const count = runtime.documents.get(targetDocument);
11796        if (count === void 0) {
11797          return;
11798        }
11799        if (count <= 1) {
11800          runtime.documents.delete(targetDocument);
11801          return;
11802        }
11803        runtime.documents.set(targetDocument, count - 1);
11804      };
11805    }
11806    function registerStyle17(hash, css) {
11807      const runtime = getRuntime17();
11808      runtime.styles.set(hash, css);
11809      for (const targetDocument of runtime.documents.keys()) {
11810        injectStyle17(targetDocument, hash, css);
11811      }
11812    }
11813    if (typeof process === "undefined" || true) {
11814      registerStyle17("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
11815    }
11816    var style_default16 = { "stack": "_19ce0419607e1896__stack" };
11817    var gapTokens = {
11818      xs: "var(--wpds-dimension-gap-xs, 4px)",
11819      sm: "var(--wpds-dimension-gap-sm, 8px)",
11820      md: "var(--wpds-dimension-gap-md, 12px)",
11821      lg: "var(--wpds-dimension-gap-lg, 16px)",
11822      xl: "var(--wpds-dimension-gap-xl, 24px)",
11823      "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
11824      "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
11825    };
11826    var Stack = (0, import_element36.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
11827      const style = {
11828        gap: gap && gapTokens[gap],
11829        alignItems: align,
11830        justifyContent: justify,
11831        flexDirection: direction,
11832        flexWrap: wrap
11833      };
11834      const element = useRender({
11835        render,
11836        ref,
11837        props: mergeProps(props, { style, className: style_default16.stack })
11838      });
11839      return element;
11840    });
11841  
11842    // packages/ui/build-module/notice/index.mjs
11843    var notice_exports = {};
11844    __export(notice_exports, {
11845      ActionButton: () => ActionButton,
11846      ActionLink: () => ActionLink,
11847      Actions: () => Actions,
11848      CloseIcon: () => CloseIcon,
11849      Description: () => Description,
11850      Root: () => Root4,
11851      Title: () => Title2
11852    });
11853  
11854    // packages/ui/build-module/notice/root.mjs
11855    var import_a11y2 = __toESM(require_a11y(), 1);
11856    var import_element37 = __toESM(require_element(), 1);
11857    var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
11858    var STYLE_HASH_ATTRIBUTE18 = "data-wp-hash";
11859    function getRuntime18() {
11860      const globalScope = globalThis;
11861      if (globalScope.__wpStyleRuntime) {
11862        return globalScope.__wpStyleRuntime;
11863      }
11864      globalScope.__wpStyleRuntime = {
11865        documents: /* @__PURE__ */ new Map(),
11866        styles: /* @__PURE__ */ new Map(),
11867        injectedStyles: /* @__PURE__ */ new WeakMap()
11868      };
11869      if (typeof document !== "undefined") {
11870        registerDocument18(document);
11871      }
11872      return globalScope.__wpStyleRuntime;
11873    }
11874    function documentContainsStyleHash18(targetDocument, hash) {
11875      if (!targetDocument.head) {
11876        return false;
11877      }
11878      for (const style of targetDocument.head.querySelectorAll(
11879        `style[$STYLE_HASH_ATTRIBUTE18}]`
11880      )) {
11881        if (style.getAttribute(STYLE_HASH_ATTRIBUTE18) === hash) {
11882          return true;
11883        }
11884      }
11885      return false;
11886    }
11887    function injectStyle18(targetDocument, hash, css) {
11888      if (!targetDocument.head) {
11889        return;
11890      }
11891      const runtime = getRuntime18();
11892      let injectedStyles = runtime.injectedStyles.get(targetDocument);
11893      if (!injectedStyles) {
11894        injectedStyles = /* @__PURE__ */ new Set();
11895        runtime.injectedStyles.set(targetDocument, injectedStyles);
11896      }
11897      if (injectedStyles.has(hash)) {
11898        return;
11899      }
11900      if (documentContainsStyleHash18(targetDocument, hash)) {
11901        injectedStyles.add(hash);
11902        return;
11903      }
11904      const style = targetDocument.createElement("style");
11905      style.setAttribute(STYLE_HASH_ATTRIBUTE18, hash);
11906      style.appendChild(targetDocument.createTextNode(css));
11907      targetDocument.head.appendChild(style);
11908      injectedStyles.add(hash);
11909    }
11910    function registerDocument18(targetDocument) {
11911      const runtime = getRuntime18();
11912      runtime.documents.set(
11913        targetDocument,
11914        (runtime.documents.get(targetDocument) ?? 0) + 1
11915      );
11916      for (const [hash, css] of runtime.styles) {
11917        injectStyle18(targetDocument, hash, css);
11918      }
11919      return () => {
11920        const count = runtime.documents.get(targetDocument);
11921        if (count === void 0) {
11922          return;
11923        }
11924        if (count <= 1) {
11925          runtime.documents.delete(targetDocument);
11926          return;
11927        }
11928        runtime.documents.set(targetDocument, count - 1);
11929      };
11930    }
11931    function registerStyle18(hash, css) {
11932      const runtime = getRuntime18();
11933      runtime.styles.set(hash, css);
11934      for (const targetDocument of runtime.documents.keys()) {
11935        injectStyle18(targetDocument, hash, css);
11936      }
11937    }
11938    if (typeof process === "undefined" || true) {
11939      registerStyle18("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
11940    }
11941    var resets_default5 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
11942    if (typeof process === "undefined" || true) {
11943      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))}}}");
11944    }
11945    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" };
11946    var icons = {
11947      neutral: null,
11948      info: info_default,
11949      warning: caution_default,
11950      success: published_default,
11951      error: error_default
11952    };
11953    function getDefaultPoliteness(intent) {
11954      return intent === "error" ? "assertive" : "polite";
11955    }
11956    function safeRenderToString(message) {
11957      if (!message) {
11958        return void 0;
11959      }
11960      if (typeof message === "string") {
11961        return message;
11962      }
11963      try {
11964        return (0, import_element37.renderToString)(message);
11965      } catch {
11966        return void 0;
11967      }
11968    }
11969    function useSpokenMessage(message, politeness) {
11970      const spokenMessage = safeRenderToString(message);
11971      (0, import_element37.useEffect)(() => {
11972        if (spokenMessage) {
11973          (0, import_a11y2.speak)(spokenMessage, politeness);
11974        }
11975      }, [spokenMessage, politeness]);
11976    }
11977    var Root4 = (0, import_element37.forwardRef)(function Notice({
11978      intent = "neutral",
11979      children,
11980      icon,
11981      spokenMessage = children,
11982      politeness = getDefaultPoliteness(intent),
11983      render,
11984      ...restProps
11985    }, ref) {
11986      useSpokenMessage(spokenMessage, politeness);
11987      const iconElement = icon === null ? null : icon ?? icons[intent];
11988      const mergedClassName = clsx_default(
11989        style_default17.notice,
11990        style_default17[`is-$intent}`],
11991        resets_default5["box-sizing"]
11992      );
11993      const element = useRender({
11994        defaultTagName: "div",
11995        render,
11996        ref,
11997        props: mergeProps(
11998          {
11999            className: mergedClassName,
12000            children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
12001              children,
12002              iconElement && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12003                Icon,
12004                {
12005                  className: style_default17.icon,
12006                  icon: iconElement
12007                }
12008              )
12009            ] })
12010          },
12011          restProps
12012        )
12013      });
12014      return element;
12015    });
12016  
12017    // packages/ui/build-module/notice/title.mjs
12018    var import_element38 = __toESM(require_element(), 1);
12019    var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
12020    var STYLE_HASH_ATTRIBUTE19 = "data-wp-hash";
12021    function getRuntime19() {
12022      const globalScope = globalThis;
12023      if (globalScope.__wpStyleRuntime) {
12024        return globalScope.__wpStyleRuntime;
12025      }
12026      globalScope.__wpStyleRuntime = {
12027        documents: /* @__PURE__ */ new Map(),
12028        styles: /* @__PURE__ */ new Map(),
12029        injectedStyles: /* @__PURE__ */ new WeakMap()
12030      };
12031      if (typeof document !== "undefined") {
12032        registerDocument19(document);
12033      }
12034      return globalScope.__wpStyleRuntime;
12035    }
12036    function documentContainsStyleHash19(targetDocument, hash) {
12037      if (!targetDocument.head) {
12038        return false;
12039      }
12040      for (const style of targetDocument.head.querySelectorAll(
12041        `style[$STYLE_HASH_ATTRIBUTE19}]`
12042      )) {
12043        if (style.getAttribute(STYLE_HASH_ATTRIBUTE19) === hash) {
12044          return true;
12045        }
12046      }
12047      return false;
12048    }
12049    function injectStyle19(targetDocument, hash, css) {
12050      if (!targetDocument.head) {
12051        return;
12052      }
12053      const runtime = getRuntime19();
12054      let injectedStyles = runtime.injectedStyles.get(targetDocument);
12055      if (!injectedStyles) {
12056        injectedStyles = /* @__PURE__ */ new Set();
12057        runtime.injectedStyles.set(targetDocument, injectedStyles);
12058      }
12059      if (injectedStyles.has(hash)) {
12060        return;
12061      }
12062      if (documentContainsStyleHash19(targetDocument, hash)) {
12063        injectedStyles.add(hash);
12064        return;
12065      }
12066      const style = targetDocument.createElement("style");
12067      style.setAttribute(STYLE_HASH_ATTRIBUTE19, hash);
12068      style.appendChild(targetDocument.createTextNode(css));
12069      targetDocument.head.appendChild(style);
12070      injectedStyles.add(hash);
12071    }
12072    function registerDocument19(targetDocument) {
12073      const runtime = getRuntime19();
12074      runtime.documents.set(
12075        targetDocument,
12076        (runtime.documents.get(targetDocument) ?? 0) + 1
12077      );
12078      for (const [hash, css] of runtime.styles) {
12079        injectStyle19(targetDocument, hash, css);
12080      }
12081      return () => {
12082        const count = runtime.documents.get(targetDocument);
12083        if (count === void 0) {
12084          return;
12085        }
12086        if (count <= 1) {
12087          runtime.documents.delete(targetDocument);
12088          return;
12089        }
12090        runtime.documents.set(targetDocument, count - 1);
12091      };
12092    }
12093    function registerStyle19(hash, css) {
12094      const runtime = getRuntime19();
12095      runtime.styles.set(hash, css);
12096      for (const targetDocument of runtime.documents.keys()) {
12097        injectStyle19(targetDocument, hash, css);
12098      }
12099    }
12100    if (typeof process === "undefined" || true) {
12101      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))}}}");
12102    }
12103    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" };
12104    var Title2 = (0, import_element38.forwardRef)(
12105      function NoticeTitle({ className, ...props }, ref) {
12106        return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12107          Text,
12108          {
12109            ref,
12110            variant: "heading-md",
12111            className: clsx_default(style_default18.title, className),
12112            ...props
12113          }
12114        );
12115      }
12116    );
12117  
12118    // packages/ui/build-module/notice/description.mjs
12119    var import_element39 = __toESM(require_element(), 1);
12120    var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
12121    var STYLE_HASH_ATTRIBUTE20 = "data-wp-hash";
12122    function getRuntime20() {
12123      const globalScope = globalThis;
12124      if (globalScope.__wpStyleRuntime) {
12125        return globalScope.__wpStyleRuntime;
12126      }
12127      globalScope.__wpStyleRuntime = {
12128        documents: /* @__PURE__ */ new Map(),
12129        styles: /* @__PURE__ */ new Map(),
12130        injectedStyles: /* @__PURE__ */ new WeakMap()
12131      };
12132      if (typeof document !== "undefined") {
12133        registerDocument20(document);
12134      }
12135      return globalScope.__wpStyleRuntime;
12136    }
12137    function documentContainsStyleHash20(targetDocument, hash) {
12138      if (!targetDocument.head) {
12139        return false;
12140      }
12141      for (const style of targetDocument.head.querySelectorAll(
12142        `style[$STYLE_HASH_ATTRIBUTE20}]`
12143      )) {
12144        if (style.getAttribute(STYLE_HASH_ATTRIBUTE20) === hash) {
12145          return true;
12146        }
12147      }
12148      return false;
12149    }
12150    function injectStyle20(targetDocument, hash, css) {
12151      if (!targetDocument.head) {
12152        return;
12153      }
12154      const runtime = getRuntime20();
12155      let injectedStyles = runtime.injectedStyles.get(targetDocument);
12156      if (!injectedStyles) {
12157        injectedStyles = /* @__PURE__ */ new Set();
12158        runtime.injectedStyles.set(targetDocument, injectedStyles);
12159      }
12160      if (injectedStyles.has(hash)) {
12161        return;
12162      }
12163      if (documentContainsStyleHash20(targetDocument, hash)) {
12164        injectedStyles.add(hash);
12165        return;
12166      }
12167      const style = targetDocument.createElement("style");
12168      style.setAttribute(STYLE_HASH_ATTRIBUTE20, hash);
12169      style.appendChild(targetDocument.createTextNode(css));
12170      targetDocument.head.appendChild(style);
12171      injectedStyles.add(hash);
12172    }
12173    function registerDocument20(targetDocument) {
12174      const runtime = getRuntime20();
12175      runtime.documents.set(
12176        targetDocument,
12177        (runtime.documents.get(targetDocument) ?? 0) + 1
12178      );
12179      for (const [hash, css] of runtime.styles) {
12180        injectStyle20(targetDocument, hash, css);
12181      }
12182      return () => {
12183        const count = runtime.documents.get(targetDocument);
12184        if (count === void 0) {
12185          return;
12186        }
12187        if (count <= 1) {
12188          runtime.documents.delete(targetDocument);
12189          return;
12190        }
12191        runtime.documents.set(targetDocument, count - 1);
12192      };
12193    }
12194    function registerStyle20(hash, css) {
12195      const runtime = getRuntime20();
12196      runtime.styles.set(hash, css);
12197      for (const targetDocument of runtime.documents.keys()) {
12198        injectStyle20(targetDocument, hash, css);
12199      }
12200    }
12201    if (typeof process === "undefined" || true) {
12202      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))}}}");
12203    }
12204    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" };
12205    var Description = (0, import_element39.forwardRef)(
12206      function NoticeDescription({ className, ...props }, ref) {
12207        return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12208          Text,
12209          {
12210            ref,
12211            variant: "body-md",
12212            className: clsx_default(style_default19.description, className),
12213            ...props
12214          }
12215        );
12216      }
12217    );
12218  
12219    // packages/ui/build-module/notice/actions.mjs
12220    var import_element40 = __toESM(require_element(), 1);
12221    var STYLE_HASH_ATTRIBUTE21 = "data-wp-hash";
12222    function getRuntime21() {
12223      const globalScope = globalThis;
12224      if (globalScope.__wpStyleRuntime) {
12225        return globalScope.__wpStyleRuntime;
12226      }
12227      globalScope.__wpStyleRuntime = {
12228        documents: /* @__PURE__ */ new Map(),
12229        styles: /* @__PURE__ */ new Map(),
12230        injectedStyles: /* @__PURE__ */ new WeakMap()
12231      };
12232      if (typeof document !== "undefined") {
12233        registerDocument21(document);
12234      }
12235      return globalScope.__wpStyleRuntime;
12236    }
12237    function documentContainsStyleHash21(targetDocument, hash) {
12238      if (!targetDocument.head) {
12239        return false;
12240      }
12241      for (const style of targetDocument.head.querySelectorAll(
12242        `style[$STYLE_HASH_ATTRIBUTE21}]`
12243      )) {
12244        if (style.getAttribute(STYLE_HASH_ATTRIBUTE21) === hash) {
12245          return true;
12246        }
12247      }
12248      return false;
12249    }
12250    function injectStyle21(targetDocument, hash, css) {
12251      if (!targetDocument.head) {
12252        return;
12253      }
12254      const runtime = getRuntime21();
12255      let injectedStyles = runtime.injectedStyles.get(targetDocument);
12256      if (!injectedStyles) {
12257        injectedStyles = /* @__PURE__ */ new Set();
12258        runtime.injectedStyles.set(targetDocument, injectedStyles);
12259      }
12260      if (injectedStyles.has(hash)) {
12261        return;
12262      }
12263      if (documentContainsStyleHash21(targetDocument, hash)) {
12264        injectedStyles.add(hash);
12265        return;
12266      }
12267      const style = targetDocument.createElement("style");
12268      style.setAttribute(STYLE_HASH_ATTRIBUTE21, hash);
12269      style.appendChild(targetDocument.createTextNode(css));
12270      targetDocument.head.appendChild(style);
12271      injectedStyles.add(hash);
12272    }
12273    function registerDocument21(targetDocument) {
12274      const runtime = getRuntime21();
12275      runtime.documents.set(
12276        targetDocument,
12277        (runtime.documents.get(targetDocument) ?? 0) + 1
12278      );
12279      for (const [hash, css] of runtime.styles) {
12280        injectStyle21(targetDocument, hash, css);
12281      }
12282      return () => {
12283        const count = runtime.documents.get(targetDocument);
12284        if (count === void 0) {
12285          return;
12286        }
12287        if (count <= 1) {
12288          runtime.documents.delete(targetDocument);
12289          return;
12290        }
12291        runtime.documents.set(targetDocument, count - 1);
12292      };
12293    }
12294    function registerStyle21(hash, css) {
12295      const runtime = getRuntime21();
12296      runtime.styles.set(hash, css);
12297      for (const targetDocument of runtime.documents.keys()) {
12298        injectStyle21(targetDocument, hash, css);
12299      }
12300    }
12301    if (typeof process === "undefined" || true) {
12302      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))}}}");
12303    }
12304    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" };
12305    var Actions = (0, import_element40.forwardRef)(
12306      function NoticeActions({ render, ...props }, ref) {
12307        const element = useRender({
12308          defaultTagName: "div",
12309          render,
12310          ref,
12311          props: mergeProps(
12312            {
12313              className: style_default20.actions
12314            },
12315            props
12316          )
12317        });
12318        return element;
12319      }
12320    );
12321  
12322    // packages/ui/build-module/notice/close-icon.mjs
12323    var import_element41 = __toESM(require_element(), 1);
12324    var import_i18n5 = __toESM(require_i18n(), 1);
12325    var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
12326    var STYLE_HASH_ATTRIBUTE22 = "data-wp-hash";
12327    function getRuntime22() {
12328      const globalScope = globalThis;
12329      if (globalScope.__wpStyleRuntime) {
12330        return globalScope.__wpStyleRuntime;
12331      }
12332      globalScope.__wpStyleRuntime = {
12333        documents: /* @__PURE__ */ new Map(),
12334        styles: /* @__PURE__ */ new Map(),
12335        injectedStyles: /* @__PURE__ */ new WeakMap()
12336      };
12337      if (typeof document !== "undefined") {
12338        registerDocument22(document);
12339      }
12340      return globalScope.__wpStyleRuntime;
12341    }
12342    function documentContainsStyleHash22(targetDocument, hash) {
12343      if (!targetDocument.head) {
12344        return false;
12345      }
12346      for (const style of targetDocument.head.querySelectorAll(
12347        `style[$STYLE_HASH_ATTRIBUTE22}]`
12348      )) {
12349        if (style.getAttribute(STYLE_HASH_ATTRIBUTE22) === hash) {
12350          return true;
12351        }
12352      }
12353      return false;
12354    }
12355    function injectStyle22(targetDocument, hash, css) {
12356      if (!targetDocument.head) {
12357        return;
12358      }
12359      const runtime = getRuntime22();
12360      let injectedStyles = runtime.injectedStyles.get(targetDocument);
12361      if (!injectedStyles) {
12362        injectedStyles = /* @__PURE__ */ new Set();
12363        runtime.injectedStyles.set(targetDocument, injectedStyles);
12364      }
12365      if (injectedStyles.has(hash)) {
12366        return;
12367      }
12368      if (documentContainsStyleHash22(targetDocument, hash)) {
12369        injectedStyles.add(hash);
12370        return;
12371      }
12372      const style = targetDocument.createElement("style");
12373      style.setAttribute(STYLE_HASH_ATTRIBUTE22, hash);
12374      style.appendChild(targetDocument.createTextNode(css));
12375      targetDocument.head.appendChild(style);
12376      injectedStyles.add(hash);
12377    }
12378    function registerDocument22(targetDocument) {
12379      const runtime = getRuntime22();
12380      runtime.documents.set(
12381        targetDocument,
12382        (runtime.documents.get(targetDocument) ?? 0) + 1
12383      );
12384      for (const [hash, css] of runtime.styles) {
12385        injectStyle22(targetDocument, hash, css);
12386      }
12387      return () => {
12388        const count = runtime.documents.get(targetDocument);
12389        if (count === void 0) {
12390          return;
12391        }
12392        if (count <= 1) {
12393          runtime.documents.delete(targetDocument);
12394          return;
12395        }
12396        runtime.documents.set(targetDocument, count - 1);
12397      };
12398    }
12399    function registerStyle22(hash, css) {
12400      const runtime = getRuntime22();
12401      runtime.styles.set(hash, css);
12402      for (const targetDocument of runtime.documents.keys()) {
12403        injectStyle22(targetDocument, hash, css);
12404      }
12405    }
12406    if (typeof process === "undefined" || true) {
12407      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))}}}");
12408    }
12409    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" };
12410    var CloseIcon = (0, import_element41.forwardRef)(
12411      function NoticeCloseIcon({ className, icon = close_small_default, label = (0, import_i18n5.__)("Dismiss"), ...props }, ref) {
12412        return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
12413          IconButton,
12414          {
12415            ...props,
12416            ref,
12417            className: clsx_default(style_default21["close-icon"], className),
12418            variant: "minimal",
12419            size: "small",
12420            tone: "neutral",
12421            icon,
12422            label
12423          }
12424        );
12425      }
12426    );
12427  
12428    // packages/ui/build-module/notice/action-button.mjs
12429    var import_element42 = __toESM(require_element(), 1);
12430    var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
12431    var STYLE_HASH_ATTRIBUTE23 = "data-wp-hash";
12432    function getRuntime23() {
12433      const globalScope = globalThis;
12434      if (globalScope.__wpStyleRuntime) {
12435        return globalScope.__wpStyleRuntime;
12436      }
12437      globalScope.__wpStyleRuntime = {
12438        documents: /* @__PURE__ */ new Map(),
12439        styles: /* @__PURE__ */ new Map(),
12440        injectedStyles: /* @__PURE__ */ new WeakMap()
12441      };
12442      if (typeof document !== "undefined") {
12443        registerDocument23(document);
12444      }
12445      return globalScope.__wpStyleRuntime;
12446    }
12447    function documentContainsStyleHash23(targetDocument, hash) {
12448      if (!targetDocument.head) {
12449        return false;
12450      }
12451      for (const style of targetDocument.head.querySelectorAll(
12452        `style[$STYLE_HASH_ATTRIBUTE23}]`
12453      )) {
12454        if (style.getAttribute(STYLE_HASH_ATTRIBUTE23) === hash) {
12455          return true;
12456        }
12457      }
12458      return false;
12459    }
12460    function injectStyle23(targetDocument, hash, css) {
12461      if (!targetDocument.head) {
12462        return;
12463      }
12464      const runtime = getRuntime23();
12465      let injectedStyles = runtime.injectedStyles.get(targetDocument);
12466      if (!injectedStyles) {
12467        injectedStyles = /* @__PURE__ */ new Set();
12468        runtime.injectedStyles.set(targetDocument, injectedStyles);
12469      }
12470      if (injectedStyles.has(hash)) {
12471        return;
12472      }
12473      if (documentContainsStyleHash23(targetDocument, hash)) {
12474        injectedStyles.add(hash);
12475        return;
12476      }
12477      const style = targetDocument.createElement("style");
12478      style.setAttribute(STYLE_HASH_ATTRIBUTE23, hash);
12479      style.appendChild(targetDocument.createTextNode(css));
12480      targetDocument.head.appendChild(style);
12481      injectedStyles.add(hash);
12482    }
12483    function registerDocument23(targetDocument) {
12484      const runtime = getRuntime23();
12485      runtime.documents.set(
12486        targetDocument,
12487        (runtime.documents.get(targetDocument) ?? 0) + 1
12488      );
12489      for (const [hash, css] of runtime.styles) {
12490        injectStyle23(targetDocument, hash, css);
12491      }
12492      return () => {
12493        const count = runtime.documents.get(targetDocument);
12494        if (count === void 0) {
12495          return;
12496        }
12497        if (count <= 1) {
12498          runtime.documents.delete(targetDocument);
12499          return;
12500        }
12501        runtime.documents.set(targetDocument, count - 1);
12502      };
12503    }
12504    function registerStyle23(hash, css) {
12505      const runtime = getRuntime23();
12506      runtime.styles.set(hash, css);
12507      for (const targetDocument of runtime.documents.keys()) {
12508        injectStyle23(targetDocument, hash, css);
12509      }
12510    }
12511    if (typeof process === "undefined" || true) {
12512      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))}}}");
12513    }
12514    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" };
12515    var ActionButton = (0, import_element42.forwardRef)(
12516      function NoticeActionButton({ className, loading, loadingAnnouncement, variant, ...props }, ref) {
12517        const loadingProps = loading !== void 0 ? { loading, loadingAnnouncement: loadingAnnouncement ?? "" } : {};
12518        return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
12519          Button4,
12520          {
12521            ...props,
12522            ...loadingProps,
12523            ref,
12524            size: "compact",
12525            tone: "neutral",
12526            variant,
12527            className: clsx_default(
12528              style_default22["action-button"],
12529              style_default22[`is-action-button-$variant}`],
12530              className
12531            )
12532          }
12533        );
12534      }
12535    );
12536  
12537    // packages/ui/build-module/notice/action-link.mjs
12538    var import_element43 = __toESM(require_element(), 1);
12539    var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
12540    var STYLE_HASH_ATTRIBUTE24 = "data-wp-hash";
12541    function getRuntime24() {
12542      const globalScope = globalThis;
12543      if (globalScope.__wpStyleRuntime) {
12544        return globalScope.__wpStyleRuntime;
12545      }
12546      globalScope.__wpStyleRuntime = {
12547        documents: /* @__PURE__ */ new Map(),
12548        styles: /* @__PURE__ */ new Map(),
12549        injectedStyles: /* @__PURE__ */ new WeakMap()
12550      };
12551      if (typeof document !== "undefined") {
12552        registerDocument24(document);
12553      }
12554      return globalScope.__wpStyleRuntime;
12555    }
12556    function documentContainsStyleHash24(targetDocument, hash) {
12557      if (!targetDocument.head) {
12558        return false;
12559      }
12560      for (const style of targetDocument.head.querySelectorAll(
12561        `style[$STYLE_HASH_ATTRIBUTE24}]`
12562      )) {
12563        if (style.getAttribute(STYLE_HASH_ATTRIBUTE24) === hash) {
12564          return true;
12565        }
12566      }
12567      return false;
12568    }
12569    function injectStyle24(targetDocument, hash, css) {
12570      if (!targetDocument.head) {
12571        return;
12572      }
12573      const runtime = getRuntime24();
12574      let injectedStyles = runtime.injectedStyles.get(targetDocument);
12575      if (!injectedStyles) {
12576        injectedStyles = /* @__PURE__ */ new Set();
12577        runtime.injectedStyles.set(targetDocument, injectedStyles);
12578      }
12579      if (injectedStyles.has(hash)) {
12580        return;
12581      }
12582      if (documentContainsStyleHash24(targetDocument, hash)) {
12583        injectedStyles.add(hash);
12584        return;
12585      }
12586      const style = targetDocument.createElement("style");
12587      style.setAttribute(STYLE_HASH_ATTRIBUTE24, hash);
12588      style.appendChild(targetDocument.createTextNode(css));
12589      targetDocument.head.appendChild(style);
12590      injectedStyles.add(hash);
12591    }
12592    function registerDocument24(targetDocument) {
12593      const runtime = getRuntime24();
12594      runtime.documents.set(
12595        targetDocument,
12596        (runtime.documents.get(targetDocument) ?? 0) + 1
12597      );
12598      for (const [hash, css] of runtime.styles) {
12599        injectStyle24(targetDocument, hash, css);
12600      }
12601      return () => {
12602        const count = runtime.documents.get(targetDocument);
12603        if (count === void 0) {
12604          return;
12605        }
12606        if (count <= 1) {
12607          runtime.documents.delete(targetDocument);
12608          return;
12609        }
12610        runtime.documents.set(targetDocument, count - 1);
12611      };
12612    }
12613    function registerStyle24(hash, css) {
12614      const runtime = getRuntime24();
12615      runtime.styles.set(hash, css);
12616      for (const targetDocument of runtime.documents.keys()) {
12617        injectStyle24(targetDocument, hash, css);
12618      }
12619    }
12620    if (typeof process === "undefined" || true) {
12621      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))}}}");
12622    }
12623    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" };
12624    var ActionLink = (0, import_element43.forwardRef)(
12625      function NoticeActionLink({ className, render, ...props }, ref) {
12626        return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
12627          Text,
12628          {
12629            ref,
12630            className: clsx_default(style_default23["action-link"], className),
12631            ...props,
12632            variant: "body-md",
12633            render: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Link, { tone: "neutral", variant: "default", render })
12634          }
12635        );
12636      }
12637    );
12638  
12639    // packages/admin-ui/build-module/admin-theme-colors/index.mjs
12640    var DEFAULT_THEME_COLORS = {
12641      primary: "#3858e9",
12642      background: "#222524"
12643    };
12644    var ADMIN_THEME_COLORS = /* @__PURE__ */ new Map([
12645      ["modern", DEFAULT_THEME_COLORS],
12646      ["fresh", { primary: "#007cba", background: "#25292b" }],
12647      ["midnight", { primary: "#cf4339", background: "#3d4042" }],
12648      ["coffee", { primary: "#916745", background: "#5b534d" }],
12649      ["ocean", { primary: "#567958", background: "#5f787f" }],
12650      ["blue", { primary: "#437aa8", background: "#3876a8" }],
12651      ["ectoplasm", { primary: "#646c3e", background: "#4f386e" }],
12652      ["sunrise", { primary: "#ad631e", background: "#cc4541" }],
12653      ["light", { primary: "#007cba", background: "#eaeeed" }]
12654    ]);
12655    function getAdminThemeColors() {
12656      const scheme = document.body.className.match(/admin-color-([\w-]+)/)?.[1] ?? "modern";
12657      return ADMIN_THEME_COLORS.get(scheme) ?? DEFAULT_THEME_COLORS;
12658    }
12659  
12660    // packages/customize-widgets/build-module/components/customize-widgets/index.mjs
12661    var import_element59 = __toESM(require_element(), 1);
12662    var import_components7 = __toESM(require_components(), 1);
12663    var import_theme = __toESM(require_theme(), 1);
12664  
12665    // packages/customize-widgets/build-module/components/error-boundary/index.mjs
12666    var import_element44 = __toESM(require_element(), 1);
12667    var import_i18n6 = __toESM(require_i18n(), 1);
12668    var import_compose2 = __toESM(require_compose(), 1);
12669    var import_hooks = __toESM(require_hooks(), 1);
12670    var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
12671    function getErrorName(error2) {
12672      return error2 instanceof Error && error2.name || "Error";
12673    }
12674    function getErrorMessage(error2) {
12675      if (typeof error2 === "string" && error2) {
12676        return error2;
12677      }
12678      if (typeof error2?.message === "string" && error2.message) {
12679        return error2.message;
12680      }
12681      return "An unknown error occurred.";
12682    }
12683    function getErrorSections(error2, componentStack) {
12684      const sections = [
12685        { label: getErrorName(error2), content: getErrorMessage(error2) }
12686      ];
12687      if (error2?.stack) {
12688        sections.push({
12689          label: "Stack",
12690          content: error2.stack.trim(),
12691          preformatted: true
12692        });
12693      }
12694      if (componentStack) {
12695        sections.push({
12696          label: "Component stack",
12697          content: componentStack.trim(),
12698          preformatted: true
12699        });
12700      }
12701      sections.push({
12702        label: "Environment",
12703        content: `User agent: $window.navigator.userAgent}`,
12704        preformatted: true
12705      });
12706      return sections;
12707    }
12708    function getErrorReport(error2, componentStack) {
12709      const sections = getErrorSections(error2, componentStack).map(
12710        ({ label, content, preformatted }) => `**$label}**
12711  
12712  $preformatted ? `\`\`\`
12713  $content}
12714  \`\`\`` : content}`
12715      );
12716      return ["### Error report", ...sections].join("\n\n");
12717    }
12718    function CopyButton({ text, children, variant = "outline" }) {
12719      const ref = (0, import_compose2.useCopyToClipboard)(text);
12720      return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(notice_exports.ActionButton, { variant, ref, children });
12721    }
12722    function ErrorReport({ error: error2, componentStack }) {
12723      return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
12724        Stack,
12725        {
12726          className: "customize-widgets-error-boundary__report",
12727          direction: "column",
12728          gap: "md",
12729          children: getErrorSections(error2, componentStack).map(
12730            ({ label, content }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Stack, { direction: "column", gap: "xs", children: [
12731              /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { variant: "heading-md", children: label }),
12732              /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("pre", { className: "customize-widgets-error-boundary__report-section", children: content })
12733            ] }, label)
12734          )
12735        }
12736      );
12737    }
12738    function ErrorDetails({ error: error2, componentStack }) {
12739      return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(collapsible_card_exports.Root, { className: "customize-widgets-error-boundary__details", children: [
12740        /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(collapsible_card_exports.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(card_exports.Title, { children: (0, import_i18n6.__)("Error details") }) }),
12741        /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(collapsible_card_exports.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
12742          ErrorReport,
12743          {
12744            error: error2,
12745            componentStack
12746          }
12747        ) })
12748      ] });
12749    }
12750    var ErrorBoundary = class extends import_element44.Component {
12751      constructor() {
12752        super(...arguments);
12753        this.state = {
12754          error: null,
12755          componentStack: null
12756        };
12757      }
12758      componentDidCatch(error2, errorInfo) {
12759        this.setState({ componentStack: errorInfo?.componentStack });
12760        (0, import_hooks.doAction)("editor.ErrorBoundary.errorLogged", error2, errorInfo);
12761      }
12762      static getDerivedStateFromError(error2) {
12763        return { error: error2 };
12764      }
12765      render() {
12766        const { error: error2, componentStack } = this.state;
12767        if (!error2) {
12768          return this.props.children;
12769        }
12770        return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
12771          Stack,
12772          {
12773            className: "customize-widgets-error-boundary",
12774            direction: "column",
12775            gap: "lg",
12776            children: [
12777              /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(notice_exports.Root, { intent: "error", children: [
12778                /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(notice_exports.Title, { children: (0, import_i18n6.__)("The editor has crashed") }),
12779                /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(notice_exports.Description, { children: (0, import_i18n6.__)(
12780                  "An unknown error occurred. Reload your browser to try again, or copy the error to report the problem or search."
12781                ) }),
12782                /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(notice_exports.Actions, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
12783                  CopyButton,
12784                  {
12785                    variant: "solid",
12786                    text: () => getErrorReport(error2, componentStack),
12787                    children: (0, import_i18n6.__)("Copy error")
12788                  }
12789                ) })
12790              ] }),
12791              true ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
12792                ErrorDetails,
12793                {
12794                  error: error2,
12795                  componentStack
12796                }
12797              ) : null
12798            ]
12799          }
12800        );
12801      }
12802    };
12803  
12804    // packages/customize-widgets/build-module/components/sidebar-block-editor/index.mjs
12805    var import_compose4 = __toESM(require_compose(), 1);
12806    var import_core_data = __toESM(require_core_data(), 1);
12807    var import_data12 = __toESM(require_data(), 1);
12808    var import_element56 = __toESM(require_element(), 1);
12809    var import_block_editor8 = __toESM(require_block_editor(), 1);
12810    var import_media_utils = __toESM(require_media_utils(), 1);
12811    var import_preferences3 = __toESM(require_preferences(), 1);
12812  
12813    // packages/customize-widgets/build-module/components/block-inspector-button/index.mjs
12814    var import_element45 = __toESM(require_element(), 1);
12815    var import_i18n7 = __toESM(require_i18n(), 1);
12816    var import_components = __toESM(require_components(), 1);
12817    var import_data = __toESM(require_data(), 1);
12818    var import_block_editor = __toESM(require_block_editor(), 1);
12819    var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
12820    function BlockInspectorButton({ inspector, closeMenu, ...props }) {
12821      const selectedBlockClientId = (0, import_data.useSelect)(
12822        (select) => select(import_block_editor.store).getSelectedBlockClientId(),
12823        []
12824      );
12825      const selectedBlock = (0, import_element45.useMemo)(
12826        () => document.getElementById(`block-$selectedBlockClientId}`),
12827        [selectedBlockClientId]
12828      );
12829      return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12830        import_components.MenuItem,
12831        {
12832          onClick: () => {
12833            inspector.open({
12834              returnFocusWhenClose: selectedBlock
12835            });
12836            closeMenu();
12837          },
12838          ...props,
12839          children: (0, import_i18n7.__)("Show more settings")
12840        }
12841      );
12842    }
12843    var block_inspector_button_default = BlockInspectorButton;
12844  
12845    // packages/customize-widgets/build-module/components/header/index.mjs
12846    var import_components5 = __toESM(require_components(), 1);
12847    var import_block_editor3 = __toESM(require_block_editor(), 1);
12848    var import_element49 = __toESM(require_element(), 1);
12849    var import_keycodes3 = __toESM(require_keycodes(), 1);
12850    var import_i18n12 = __toESM(require_i18n(), 1);
12851  
12852    // packages/customize-widgets/build-module/components/inserter/index.mjs
12853    var import_i18n8 = __toESM(require_i18n(), 1);
12854    var import_block_editor2 = __toESM(require_block_editor(), 1);
12855    var import_components2 = __toESM(require_components(), 1);
12856    var import_compose3 = __toESM(require_compose(), 1);
12857    var import_data4 = __toESM(require_data(), 1);
12858  
12859    // packages/customize-widgets/build-module/store/index.mjs
12860    var import_data3 = __toESM(require_data(), 1);
12861  
12862    // packages/customize-widgets/build-module/store/reducer.mjs
12863    var import_data2 = __toESM(require_data(), 1);
12864    function blockInserterPanel(state = false, action) {
12865      switch (action.type) {
12866        case "SET_IS_INSERTER_OPENED":
12867          return action.value;
12868      }
12869      return state;
12870    }
12871    var reducer_default = (0, import_data2.combineReducers)({
12872      blockInserterPanel
12873    });
12874  
12875    // packages/customize-widgets/build-module/store/selectors.mjs
12876    var selectors_exports = {};
12877    __export(selectors_exports, {
12878      __experimentalGetInsertionPoint: () => __experimentalGetInsertionPoint,
12879      isInserterOpened: () => isInserterOpened
12880    });
12881    var EMPTY_INSERTION_POINT = {
12882      rootClientId: void 0,
12883      insertionIndex: void 0
12884    };
12885    function isInserterOpened(state) {
12886      return !!state.blockInserterPanel;
12887    }
12888    function __experimentalGetInsertionPoint(state) {
12889      if (typeof state.blockInserterPanel === "boolean") {
12890        return EMPTY_INSERTION_POINT;
12891      }
12892      return state.blockInserterPanel;
12893    }
12894  
12895    // packages/customize-widgets/build-module/store/actions.mjs
12896    var actions_exports = {};
12897    __export(actions_exports, {
12898      setIsInserterOpened: () => setIsInserterOpened
12899    });
12900    function setIsInserterOpened(value) {
12901      return {
12902        type: "SET_IS_INSERTER_OPENED",
12903        value
12904      };
12905    }
12906  
12907    // packages/customize-widgets/build-module/store/constants.mjs
12908    var STORE_NAME = "core/customize-widgets";
12909  
12910    // packages/customize-widgets/build-module/store/index.mjs
12911    var storeConfig = {
12912      reducer: reducer_default,
12913      selectors: selectors_exports,
12914      actions: actions_exports
12915    };
12916    var store = (0, import_data3.createReduxStore)(STORE_NAME, storeConfig);
12917    (0, import_data3.register)(store);
12918  
12919    // packages/customize-widgets/build-module/components/inserter/index.mjs
12920    var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
12921    function Inserter({ setIsOpened }) {
12922      const inserterTitleId = (0, import_compose3.useInstanceId)(
12923        Inserter,
12924        "customize-widget-layout__inserter-panel-title"
12925      );
12926      const insertionPoint = (0, import_data4.useSelect)(
12927        (select) => select(store).__experimentalGetInsertionPoint(),
12928        []
12929      );
12930      return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
12931        "div",
12932        {
12933          className: "customize-widgets-layout__inserter-panel",
12934          "aria-labelledby": inserterTitleId,
12935          children: [
12936            /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "customize-widgets-layout__inserter-panel-header", children: [
12937              /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12938                "h2",
12939                {
12940                  id: inserterTitleId,
12941                  className: "customize-widgets-layout__inserter-panel-header-title",
12942                  children: (0, import_i18n8.__)("Add a block")
12943                }
12944              ),
12945              /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12946                import_components2.Button,
12947                {
12948                  size: "small",
12949                  icon: close_small_default,
12950                  onClick: () => setIsOpened(false),
12951                  "aria-label": (0, import_i18n8.__)("Close inserter")
12952                }
12953              )
12954            ] }),
12955            /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "customize-widgets-layout__inserter-panel-content", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12956              import_block_editor2.__experimentalLibrary,
12957              {
12958                rootClientId: insertionPoint.rootClientId,
12959                __experimentalInsertionIndex: insertionPoint.insertionIndex,
12960                showInserterHelpPanel: true,
12961                onSelect: () => setIsOpened(false)
12962              }
12963            ) })
12964          ]
12965        }
12966      );
12967    }
12968    var inserter_default = Inserter;
12969  
12970    // packages/customize-widgets/build-module/components/more-menu/index.mjs
12971    var import_components4 = __toESM(require_components(), 1);
12972    var import_element48 = __toESM(require_element(), 1);
12973    var import_i18n11 = __toESM(require_i18n(), 1);
12974    var import_keycodes2 = __toESM(require_keycodes(), 1);
12975    var import_keyboard_shortcuts3 = __toESM(require_keyboard_shortcuts(), 1);
12976    var import_preferences = __toESM(require_preferences(), 1);
12977  
12978    // packages/customize-widgets/build-module/components/keyboard-shortcut-help-modal/index.mjs
12979    var import_components3 = __toESM(require_components(), 1);
12980    var import_i18n10 = __toESM(require_i18n(), 1);
12981    var import_keyboard_shortcuts2 = __toESM(require_keyboard_shortcuts(), 1);
12982    var import_data6 = __toESM(require_data(), 1);
12983    var import_element47 = __toESM(require_element(), 1);
12984  
12985    // packages/customize-widgets/build-module/components/keyboard-shortcut-help-modal/config.mjs
12986    var import_i18n9 = __toESM(require_i18n(), 1);
12987    var textFormattingShortcuts = [
12988      {
12989        keyCombination: { modifier: "primary", character: "b" },
12990        description: (0, import_i18n9.__)("Make the selected text bold.")
12991      },
12992      {
12993        keyCombination: { modifier: "primary", character: "i" },
12994        description: (0, import_i18n9.__)("Make the selected text italic.")
12995      },
12996      {
12997        keyCombination: { modifier: "primary", character: "k" },
12998        description: (0, import_i18n9.__)("Convert the selected text into a link.")
12999      },
13000      {
13001        keyCombination: { modifier: "primaryShift", character: "k" },
13002        description: (0, import_i18n9.__)("Remove a link.")
13003      },
13004      {
13005        keyCombination: { character: "[[" },
13006        description: (0, import_i18n9.__)("Insert a link to a post or page.")
13007      },
13008      {
13009        keyCombination: { modifier: "primary", character: "u" },
13010        description: (0, import_i18n9.__)("Underline the selected text.")
13011      },
13012      {
13013        keyCombination: { modifier: "access", character: "d" },
13014        description: (0, import_i18n9.__)("Strikethrough the selected text.")
13015      },
13016      {
13017        keyCombination: { modifier: "access", character: "x" },
13018        description: (0, import_i18n9.__)("Make the selected text inline code.")
13019      },
13020      {
13021        keyCombination: {
13022          modifier: "access",
13023          character: "0"
13024        },
13025        aliases: [
13026          {
13027            modifier: "access",
13028            character: "7"
13029          }
13030        ],
13031        description: (0, import_i18n9.__)("Convert the current heading to a paragraph.")
13032      },
13033      {
13034        keyCombination: { modifier: "access", character: "1-6" },
13035        description: (0, import_i18n9.__)(
13036          "Convert the current paragraph or heading to a heading of level 1 to 6."
13037        )
13038      },
13039      {
13040        keyCombination: { modifier: "primaryShift", character: "SPACE" },
13041        description: (0, import_i18n9.__)("Add non breaking space.")
13042      }
13043    ];
13044  
13045    // packages/customize-widgets/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs
13046    var import_element46 = __toESM(require_element(), 1);
13047    var import_keycodes = __toESM(require_keycodes(), 1);
13048    var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
13049    function KeyCombination({ keyCombination, forceAriaLabel }) {
13050      const shortcut = keyCombination.modifier ? import_keycodes.displayShortcutList[keyCombination.modifier](
13051        keyCombination.character
13052      ) : keyCombination.character;
13053      const ariaLabel = keyCombination.modifier ? import_keycodes.shortcutAriaLabel[keyCombination.modifier](
13054        keyCombination.character
13055      ) : keyCombination.character;
13056      return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
13057        "kbd",
13058        {
13059          className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination",
13060          "aria-label": forceAriaLabel || ariaLabel,
13061          children: (Array.isArray(shortcut) ? shortcut : [shortcut]).map(
13062            (character, index2) => {
13063              if (character === "+") {
13064                return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_element46.Fragment, { children: character }, index2);
13065              }
13066              return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
13067                "kbd",
13068                {
13069                  className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key",
13070                  children: character
13071                },
13072                index2
13073              );
13074            }
13075          )
13076        }
13077      );
13078    }
13079    function Shortcut({ description, keyCombination, aliases = [], ariaLabel }) {
13080      return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
13081        /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-description", children: description }),
13082        /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-term", children: [
13083          /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
13084            KeyCombination,
13085            {
13086              keyCombination,
13087              forceAriaLabel: ariaLabel
13088            }
13089          ),
13090          aliases.map((alias, index2) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
13091            KeyCombination,
13092            {
13093              keyCombination: alias,
13094              forceAriaLabel: ariaLabel
13095            },
13096            index2
13097          ))
13098        ] })
13099      ] });
13100    }
13101    var shortcut_default = Shortcut;
13102  
13103    // packages/customize-widgets/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs
13104    var import_data5 = __toESM(require_data(), 1);
13105    var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);
13106    var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
13107    function DynamicShortcut({ name }) {
13108      const { keyCombination, description, aliases } = (0, import_data5.useSelect)(
13109        (select) => {
13110          const {
13111            getShortcutKeyCombination,
13112            getShortcutDescription,
13113            getShortcutAliases
13114          } = select(import_keyboard_shortcuts.store);
13115          return {
13116            keyCombination: getShortcutKeyCombination(name),
13117            aliases: getShortcutAliases(name),
13118            description: getShortcutDescription(name)
13119          };
13120        },
13121        [name]
13122      );
13123      if (!keyCombination) {
13124        return null;
13125      }
13126      return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
13127        shortcut_default,
13128        {
13129          keyCombination,
13130          description,
13131          aliases
13132        }
13133      );
13134    }
13135    var dynamic_shortcut_default = DynamicShortcut;
13136  
13137    // packages/customize-widgets/build-module/components/keyboard-shortcut-help-modal/index.mjs
13138    var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
13139    var ShortcutList = ({ shortcuts }) => (
13140      /*
13141       * Disable reason: The `list` ARIA role is redundant but
13142       * Safari+VoiceOver won't announce the list otherwise.
13143       */
13144      /* eslint-disable jsx-a11y/no-redundant-roles */
13145      /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
13146        "ul",
13147        {
13148          className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-list",
13149          role: "list",
13150          children: shortcuts.map((shortcut, index2) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
13151            "li",
13152            {
13153              className: "customize-widgets-keyboard-shortcut-help-modal__shortcut",
13154              children: typeof shortcut === "string" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(dynamic_shortcut_default, { name: shortcut }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(shortcut_default, { ...shortcut })
13155            },
13156            index2
13157          ))
13158        }
13159      )
13160    );
13161    var ShortcutSection = ({ title, shortcuts, className }) => /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
13162      "section",
13163      {
13164        className: clsx_default(
13165          "customize-widgets-keyboard-shortcut-help-modal__section",
13166          className
13167        ),
13168        children: [
13169          !!title && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("h2", { className: "customize-widgets-keyboard-shortcut-help-modal__section-title", children: title }),
13170          /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ShortcutList, { shortcuts })
13171        ]
13172      }
13173    );
13174    var ShortcutCategorySection = ({
13175      title,
13176      categoryName,
13177      additionalShortcuts = []
13178    }) => {
13179      const categoryShortcuts = (0, import_data6.useSelect)(
13180        (select) => {
13181          return select(import_keyboard_shortcuts2.store).getCategoryShortcuts(
13182            categoryName
13183          );
13184        },
13185        [categoryName]
13186      );
13187      return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
13188        ShortcutSection,
13189        {
13190          title,
13191          shortcuts: categoryShortcuts.concat(additionalShortcuts)
13192        }
13193      );
13194    };
13195    function KeyboardShortcutHelpModal({
13196      isModalActive,
13197      toggleModal
13198    }) {
13199      const { registerShortcut } = (0, import_data6.useDispatch)(import_keyboard_shortcuts2.store);
13200      (0, import_element47.useEffect)(() => {
13201        registerShortcut({
13202          name: "core/customize-widgets/keyboard-shortcuts",
13203          category: "main",
13204          description: (0, import_i18n10.__)("Display these keyboard shortcuts."),
13205          keyCombination: {
13206            modifier: "access",
13207            character: "h"
13208          }
13209        });
13210      }, [registerShortcut]);
13211      (0, import_keyboard_shortcuts2.useShortcut)("core/customize-widgets/keyboard-shortcuts", toggleModal);
13212      if (!isModalActive) {
13213        return null;
13214      }
13215      return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
13216        import_components3.Modal,
13217        {
13218          className: "customize-widgets-keyboard-shortcut-help-modal",
13219          title: (0, import_i18n10.__)("Keyboard shortcuts"),
13220          onRequestClose: toggleModal,
13221          children: [
13222            /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
13223              ShortcutSection,
13224              {
13225                className: "customize-widgets-keyboard-shortcut-help-modal__main-shortcuts",
13226                shortcuts: ["core/customize-widgets/keyboard-shortcuts"]
13227              }
13228            ),
13229            /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
13230              ShortcutCategorySection,
13231              {
13232                title: (0, import_i18n10.__)("Global shortcuts"),
13233                categoryName: "global"
13234              }
13235            ),
13236            /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
13237              ShortcutCategorySection,
13238              {
13239                title: (0, import_i18n10.__)("Selection shortcuts"),
13240                categoryName: "selection"
13241              }
13242            ),
13243            /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
13244              ShortcutCategorySection,
13245              {
13246                title: (0, import_i18n10.__)("Block shortcuts"),
13247                categoryName: "block",
13248                additionalShortcuts: [
13249                  {
13250                    keyCombination: { character: "/" },
13251                    description: (0, import_i18n10.__)(
13252                      "Change the block type after adding a new paragraph."
13253                    ),
13254                    /* translators: The forward-slash character. e.g. '/'. */
13255                    ariaLabel: (0, import_i18n10.__)("Forward-slash")
13256                  }
13257                ]
13258              }
13259            ),
13260            /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
13261              ShortcutSection,
13262              {
13263                title: (0, import_i18n10.__)("Text formatting"),
13264                shortcuts: textFormattingShortcuts
13265              }
13266            )
13267          ]
13268        }
13269      );
13270    }
13271  
13272    // packages/customize-widgets/build-module/components/more-menu/index.mjs
13273    var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
13274    function MoreMenu() {
13275      const [
13276        isKeyboardShortcutsModalActive,
13277        setIsKeyboardShortcutsModalVisible
13278      ] = (0, import_element48.useState)(false);
13279      const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive);
13280      (0, import_keyboard_shortcuts3.useShortcut)(
13281        "core/customize-widgets/keyboard-shortcuts",
13282        toggleKeyboardShortcutsModal
13283      );
13284      return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
13285        /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
13286          import_components4.ToolbarDropdownMenu,
13287          {
13288            icon: more_vertical_default,
13289            label: (0, import_i18n11.__)("Options"),
13290            popoverProps: {
13291              placement: "bottom-end",
13292              className: "more-menu-dropdown__content"
13293            },
13294            toggleProps: {
13295              tooltipPosition: "bottom",
13296              size: "compact"
13297            },
13298            children: () => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
13299              /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components4.MenuGroup, { label: (0, import_i18n11._x)("View", "noun"), children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
13300                import_preferences.PreferenceToggleMenuItem,
13301                {
13302                  scope: "core/customize-widgets",
13303                  name: "fixedToolbar",
13304                  label: (0, import_i18n11.__)("Top toolbar"),
13305                  info: (0, import_i18n11.__)(
13306                    "Access all block and document tools in a single place"
13307                  ),
13308                  messageActivated: (0, import_i18n11.__)(
13309                    "Top toolbar activated"
13310                  ),
13311                  messageDeactivated: (0, import_i18n11.__)(
13312                    "Top toolbar deactivated"
13313                  )
13314                }
13315              ) }),
13316              /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_components4.MenuGroup, { label: (0, import_i18n11.__)("Tools"), children: [
13317                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
13318                  import_components4.MenuItem,
13319                  {
13320                    onClick: () => {
13321                      setIsKeyboardShortcutsModalVisible(true);
13322                    },
13323                    shortcut: import_keycodes2.displayShortcut.access("h"),
13324                    children: (0, import_i18n11.__)("Keyboard shortcuts")
13325                  }
13326                ),
13327                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
13328                  import_preferences.PreferenceToggleMenuItem,
13329                  {
13330                    scope: "core/customize-widgets",
13331                    name: "welcomeGuide",
13332                    label: (0, import_i18n11.__)("Welcome Guide")
13333                  }
13334                ),
13335                /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
13336                  import_components4.MenuItem,
13337                  {
13338                    role: "menuitem",
13339                    icon: external_default,
13340                    href: (0, import_i18n11.__)(
13341                      "https://wordpress.org/documentation/article/block-based-widgets-editor/"
13342                    ),
13343                    target: "_blank",
13344                    rel: "noopener",
13345                    children: [
13346                      (0, import_i18n11.__)("Help"),
13347                      /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(VisuallyHidden, {
13348                        render: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", {}),
13349                        /* translators: accessibility text */
13350                        children: (0, import_i18n11.__)("(opens in a new tab)")
13351                      })
13352                    ]
13353                  }
13354                )
13355              ] }),
13356              /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components4.MenuGroup, { label: (0, import_i18n11.__)("Preferences"), children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
13357                import_preferences.PreferenceToggleMenuItem,
13358                {
13359                  scope: "core/customize-widgets",
13360                  name: "keepCaretInsideBlock",
13361                  label: (0, import_i18n11.__)(
13362                    "Contain text cursor inside block"
13363                  ),
13364                  info: (0, import_i18n11.__)(
13365                    "Aids screen readers by stopping text caret from leaving blocks."
13366                  ),
13367                  messageActivated: (0, import_i18n11.__)(
13368                    "Contain text cursor inside block activated"
13369                  ),
13370                  messageDeactivated: (0, import_i18n11.__)(
13371                    "Contain text cursor inside block deactivated"
13372                  )
13373                }
13374              ) })
13375            ] })
13376          }
13377        ),
13378        /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
13379          KeyboardShortcutHelpModal,
13380          {
13381            isModalActive: isKeyboardShortcutsModalActive,
13382            toggleModal: toggleKeyboardShortcutsModal
13383          }
13384        )
13385      ] });
13386    }
13387  
13388    // packages/customize-widgets/build-module/components/header/index.mjs
13389    var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
13390    function Header3({
13391      sidebar,
13392      inserter,
13393      isInserterOpened: isInserterOpened2,
13394      setIsInserterOpened: setIsInserterOpened2,
13395      isFixedToolbarActive
13396    }) {
13397      const [[hasUndo, hasRedo], setUndoRedo] = (0, import_element49.useState)([
13398        sidebar.hasUndo(),
13399        sidebar.hasRedo()
13400      ]);
13401      const shortcut = (0, import_keycodes3.isAppleOS)() ? import_keycodes3.displayShortcut.primaryShift("z") : import_keycodes3.displayShortcut.primary("y");
13402      (0, import_element49.useEffect)(() => {
13403        return sidebar.subscribeHistory(() => {
13404          setUndoRedo([sidebar.hasUndo(), sidebar.hasRedo()]);
13405        });
13406      }, [sidebar]);
13407      return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
13408        /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
13409          "div",
13410          {
13411            className: clsx_default("customize-widgets-header", {
13412              "is-fixed-toolbar-active": isFixedToolbarActive
13413            }),
13414            children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
13415              import_block_editor3.NavigableToolbar,
13416              {
13417                className: "customize-widgets-header-toolbar",
13418                "aria-label": (0, import_i18n12.__)("Document tools"),
13419                children: [
13420                  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
13421                    import_components5.ToolbarButton,
13422                    {
13423                      icon: !(0, import_i18n12.isRTL)() ? undo_default : redo_default,
13424                      label: (0, import_i18n12.__)("Undo"),
13425                      shortcut: import_keycodes3.displayShortcut.primary("z"),
13426                      disabled: !hasUndo,
13427                      onClick: sidebar.undo,
13428                      className: "customize-widgets-editor-history-button undo-button"
13429                    }
13430                  ),
13431                  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
13432                    import_components5.ToolbarButton,
13433                    {
13434                      icon: !(0, import_i18n12.isRTL)() ? redo_default : undo_default,
13435                      label: (0, import_i18n12.__)("Redo"),
13436                      shortcut,
13437                      disabled: !hasRedo,
13438                      onClick: sidebar.redo,
13439                      className: "customize-widgets-editor-history-button redo-button"
13440                    }
13441                  ),
13442                  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
13443                    import_components5.ToolbarButton,
13444                    {
13445                      className: "customize-widgets-header-toolbar__inserter-toggle",
13446                      isPressed: isInserterOpened2,
13447                      variant: "primary",
13448                      icon: plus_default,
13449                      label: (0, import_i18n12._x)(
13450                        "Add block",
13451                        "Generic label for block inserter button"
13452                      ),
13453                      onClick: () => {
13454                        setIsInserterOpened2((isOpen) => !isOpen);
13455                      }
13456                    }
13457                  ),
13458                  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(MoreMenu, {})
13459                ]
13460              }
13461            )
13462          }
13463        ),
13464        (0, import_element49.createPortal)(
13465          /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(inserter_default, { setIsOpened: setIsInserterOpened2 }),
13466          inserter.contentContainer[0]
13467        )
13468      ] });
13469    }
13470    var header_default = Header3;
13471  
13472    // packages/customize-widgets/build-module/components/inserter/use-inserter.mjs
13473    var import_element50 = __toESM(require_element(), 1);
13474    var import_data7 = __toESM(require_data(), 1);
13475    function useInserter(inserter) {
13476      const isInserterOpened2 = (0, import_data7.useSelect)(
13477        (select) => select(store).isInserterOpened(),
13478        []
13479      );
13480      const { setIsInserterOpened: setIsInserterOpened2 } = (0, import_data7.useDispatch)(store);
13481      (0, import_element50.useEffect)(() => {
13482        if (isInserterOpened2) {
13483          inserter.open();
13484        } else {
13485          inserter.close();
13486        }
13487      }, [inserter, isInserterOpened2]);
13488      return [
13489        isInserterOpened2,
13490        (0, import_element50.useCallback)(
13491          (updater) => {
13492            let isOpen = updater;
13493            if (typeof updater === "function") {
13494              isOpen = updater(
13495                (0, import_data7.select)(store).isInserterOpened()
13496              );
13497            }
13498            setIsInserterOpened2(isOpen);
13499          },
13500          [setIsInserterOpened2]
13501        )
13502      ];
13503    }
13504  
13505    // packages/customize-widgets/build-module/components/sidebar-block-editor/sidebar-editor-provider.mjs
13506    var import_block_editor5 = __toESM(require_block_editor(), 1);
13507  
13508    // packages/customize-widgets/build-module/components/sidebar-block-editor/use-sidebar-block-editor.mjs
13509    var import_es6 = __toESM(require_es6(), 1);
13510    var import_element51 = __toESM(require_element(), 1);
13511    var import_is_shallow_equal = __toESM(require_is_shallow_equal(), 1);
13512    var import_widgets2 = __toESM(require_widgets(), 1);
13513  
13514    // packages/customize-widgets/build-module/utils.mjs
13515    var import_blocks = __toESM(require_blocks(), 1);
13516    var import_widgets = __toESM(require_widgets(), 1);
13517    function settingIdToWidgetId(settingId) {
13518      const matches = settingId.match(/^widget_(.+)(?:\[(\d+)\])$/);
13519      if (matches) {
13520        const idBase = matches[1];
13521        const number = parseInt(matches[2], 10);
13522        return `$idBase}-$number}`;
13523      }
13524      return settingId;
13525    }
13526    function blockToWidget(block, existingWidget = null) {
13527      let widget;
13528      const isValidLegacyWidgetBlock = block.name === "core/legacy-widget" && (block.attributes.id || block.attributes.instance);
13529      if (isValidLegacyWidgetBlock) {
13530        if (block.attributes.id) {
13531          widget = {
13532            id: block.attributes.id
13533          };
13534        } else {
13535          const { encoded, hash, raw, ...rest } = block.attributes.instance;
13536          widget = {
13537            idBase: block.attributes.idBase,
13538            instance: {
13539              ...existingWidget?.instance,
13540              // Required only for the customizer.
13541              is_widget_customizer_js_value: true,
13542              encoded_serialized_instance: encoded,
13543              instance_hash_key: hash,
13544              raw_instance: raw,
13545              ...rest
13546            }
13547          };
13548        }
13549      } else {
13550        const instance = {
13551          content: (0, import_blocks.serialize)(block)
13552        };
13553        widget = {
13554          idBase: "block",
13555          widgetClass: "WP_Widget_Block",
13556          instance: {
13557            raw_instance: instance
13558          }
13559        };
13560      }
13561      const { form, rendered, ...restExistingWidget } = existingWidget || {};
13562      return {
13563        ...restExistingWidget,
13564        ...widget
13565      };
13566    }
13567    function widgetToBlock({ id, idBase, number, instance }) {
13568      let block;
13569      const {
13570        encoded_serialized_instance: encoded,
13571        instance_hash_key: hash,
13572        raw_instance: raw,
13573        ...rest
13574      } = instance;
13575      if (idBase === "block") {
13576        const parsedBlocks = (0, import_blocks.parse)(raw.content ?? "", {
13577          __unstableSkipAutop: true
13578        });
13579        block = parsedBlocks.length ? parsedBlocks[0] : (0, import_blocks.createBlock)("core/paragraph", {});
13580      } else if (number) {
13581        block = (0, import_blocks.createBlock)("core/legacy-widget", {
13582          idBase,
13583          instance: {
13584            encoded,
13585            hash,
13586            raw,
13587            ...rest
13588          }
13589        });
13590      } else {
13591        block = (0, import_blocks.createBlock)("core/legacy-widget", {
13592          id
13593        });
13594      }
13595      return (0, import_widgets.addWidgetIdToBlock)(block, id);
13596    }
13597  
13598    // packages/customize-widgets/build-module/components/sidebar-block-editor/use-sidebar-block-editor.mjs
13599    function widgetsToBlocks(widgets) {
13600      return widgets.map((widget) => widgetToBlock(widget));
13601    }
13602    function useSidebarBlockEditor(sidebar) {
13603      const [blocks, setBlocks] = (0, import_element51.useState)(
13604        () => widgetsToBlocks(sidebar.getWidgets())
13605      );
13606      (0, import_element51.useEffect)(() => {
13607        return sidebar.subscribe((prevWidgets, nextWidgets) => {
13608          setBlocks((prevBlocks) => {
13609            const prevWidgetsMap = new Map(
13610              prevWidgets.map((widget) => [widget.id, widget])
13611            );
13612            const prevBlocksMap = new Map(
13613              prevBlocks.map((block) => [
13614                (0, import_widgets2.getWidgetIdFromBlock)(block),
13615                block
13616              ])
13617            );
13618            const nextBlocks = nextWidgets.map((nextWidget) => {
13619              const prevWidget = prevWidgetsMap.get(nextWidget.id);
13620              if (prevWidget && prevWidget === nextWidget) {
13621                return prevBlocksMap.get(nextWidget.id);
13622              }
13623              return widgetToBlock(nextWidget);
13624            });
13625            if ((0, import_is_shallow_equal.isShallowEqual)(prevBlocks, nextBlocks)) {
13626              return prevBlocks;
13627            }
13628            return nextBlocks;
13629          });
13630        });
13631      }, [sidebar]);
13632      const onChangeBlocks = (0, import_element51.useCallback)(
13633        (nextBlocks) => {
13634          setBlocks((prevBlocks) => {
13635            if ((0, import_is_shallow_equal.isShallowEqual)(prevBlocks, nextBlocks)) {
13636              return prevBlocks;
13637            }
13638            const prevBlocksMap = new Map(
13639              prevBlocks.map((block) => [
13640                (0, import_widgets2.getWidgetIdFromBlock)(block),
13641                block
13642              ])
13643            );
13644            const nextWidgets = nextBlocks.map((nextBlock) => {
13645              const widgetId = (0, import_widgets2.getWidgetIdFromBlock)(nextBlock);
13646              if (widgetId && prevBlocksMap.has(widgetId)) {
13647                const prevBlock = prevBlocksMap.get(widgetId);
13648                const prevWidget = sidebar.getWidget(widgetId);
13649                if ((0, import_es6.default)(nextBlock, prevBlock) && prevWidget) {
13650                  return prevWidget;
13651                }
13652                return blockToWidget(nextBlock, prevWidget);
13653              }
13654              return blockToWidget(nextBlock);
13655            });
13656            if ((0, import_is_shallow_equal.isShallowEqual)(sidebar.getWidgets(), nextWidgets)) {
13657              return prevBlocks;
13658            }
13659            const addedWidgetIds = sidebar.setWidgets(nextWidgets);
13660            return nextBlocks.reduce(
13661              (updatedNextBlocks, nextBlock, index2) => {
13662                const addedWidgetId = addedWidgetIds[index2];
13663                if (addedWidgetId !== null) {
13664                  if (updatedNextBlocks === nextBlocks) {
13665                    updatedNextBlocks = nextBlocks.slice();
13666                  }
13667                  updatedNextBlocks[index2] = (0, import_widgets2.addWidgetIdToBlock)(
13668                    nextBlock,
13669                    addedWidgetId
13670                  );
13671                }
13672                return updatedNextBlocks;
13673              },
13674              nextBlocks
13675            );
13676          });
13677        },
13678        [sidebar]
13679      );
13680      return [blocks, onChangeBlocks, onChangeBlocks];
13681    }
13682  
13683    // packages/customize-widgets/build-module/components/focus-control/use-blocks-focus-control.mjs
13684    var import_element53 = __toESM(require_element(), 1);
13685    var import_data8 = __toESM(require_data(), 1);
13686    var import_block_editor4 = __toESM(require_block_editor(), 1);
13687    var import_widgets3 = __toESM(require_widgets(), 1);
13688  
13689    // packages/customize-widgets/build-module/components/focus-control/index.mjs
13690    var import_element52 = __toESM(require_element(), 1);
13691    var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
13692    var FocusControlContext = (0, import_element52.createContext)();
13693    FocusControlContext.displayName = "FocusControlContext";
13694    function FocusControl({ api, sidebarControls, children }) {
13695      const [focusedWidgetIdRef, setFocusedWidgetIdRef] = (0, import_element52.useState)({
13696        current: null
13697      });
13698      const focusWidget = (0, import_element52.useCallback)(
13699        (widgetId) => {
13700          for (const sidebarControl of sidebarControls) {
13701            const widgets = sidebarControl.setting.get();
13702            if (widgets.includes(widgetId)) {
13703              sidebarControl.sectionInstance.expand({
13704                // Schedule it after the complete callback so that
13705                // it won't be overridden by the "Back" button focus.
13706                completeCallback() {
13707                  setFocusedWidgetIdRef({ current: widgetId });
13708                }
13709              });
13710              break;
13711            }
13712          }
13713        },
13714        [sidebarControls]
13715      );
13716      (0, import_element52.useEffect)(() => {
13717        function handleFocus(settingId) {
13718          const widgetId = settingIdToWidgetId(settingId);
13719          focusWidget(widgetId);
13720        }
13721        let previewBound = false;
13722        function handleReady() {
13723          api.previewer.preview.bind(
13724            "focus-control-for-setting",
13725            handleFocus
13726          );
13727          previewBound = true;
13728        }
13729        api.previewer.bind("ready", handleReady);
13730        return () => {
13731          api.previewer.unbind("ready", handleReady);
13732          if (previewBound) {
13733            api.previewer.preview.unbind(
13734              "focus-control-for-setting",
13735              handleFocus
13736            );
13737          }
13738        };
13739      }, [api, focusWidget]);
13740      const context = (0, import_element52.useMemo)(
13741        () => [focusedWidgetIdRef, focusWidget],
13742        [focusedWidgetIdRef, focusWidget]
13743      );
13744      return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(FocusControlContext.Provider, { value: context, children });
13745    }
13746    var useFocusControl = () => (0, import_element52.useContext)(FocusControlContext);
13747  
13748    // packages/customize-widgets/build-module/components/focus-control/use-blocks-focus-control.mjs
13749    function useBlocksFocusControl(blocks) {
13750      const { selectBlock } = (0, import_data8.useDispatch)(import_block_editor4.store);
13751      const [focusedWidgetIdRef] = useFocusControl();
13752      const blocksRef = (0, import_element53.useRef)(blocks);
13753      (0, import_element53.useEffect)(() => {
13754        blocksRef.current = blocks;
13755      }, [blocks]);
13756      (0, import_element53.useEffect)(() => {
13757        if (focusedWidgetIdRef.current) {
13758          const focusedBlock = blocksRef.current.find(
13759            (block) => (0, import_widgets3.getWidgetIdFromBlock)(block) === focusedWidgetIdRef.current
13760          );
13761          if (focusedBlock) {
13762            selectBlock(focusedBlock.clientId);
13763            const blockNode = document.querySelector(
13764              `[data-block="$focusedBlock.clientId}"]`
13765            );
13766            blockNode?.focus();
13767          }
13768        }
13769      }, [focusedWidgetIdRef, selectBlock]);
13770    }
13771  
13772    // packages/customize-widgets/build-module/lock-unlock.mjs
13773    var import_private_apis2 = __toESM(require_private_apis(), 1);
13774    var { lock: lock2, unlock: unlock2 } = (0, import_private_apis2.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
13775      "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
13776      "@wordpress/customize-widgets"
13777    );
13778  
13779    // packages/customize-widgets/build-module/components/sidebar-block-editor/sidebar-editor-provider.mjs
13780    var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
13781    var { ExperimentalBlockEditorProvider } = unlock2(import_block_editor5.privateApis);
13782    function SidebarEditorProvider({
13783      sidebar,
13784      settings,
13785      children
13786    }) {
13787      const [blocks, onInput, onChange] = useSidebarBlockEditor(sidebar);
13788      useBlocksFocusControl(blocks);
13789      return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
13790        ExperimentalBlockEditorProvider,
13791        {
13792          value: blocks,
13793          onInput,
13794          onChange,
13795          settings,
13796          useSubRegistry: false,
13797          children
13798        }
13799      );
13800    }
13801  
13802    // packages/customize-widgets/build-module/components/welcome-guide/index.mjs
13803    var import_i18n13 = __toESM(require_i18n(), 1);
13804    var import_components6 = __toESM(require_components(), 1);
13805    var import_data9 = __toESM(require_data(), 1);
13806    var import_preferences2 = __toESM(require_preferences(), 1);
13807    var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
13808    function WelcomeGuide({ sidebar }) {
13809      const { toggle } = (0, import_data9.useDispatch)(import_preferences2.store);
13810      const isEntirelyBlockWidgets = sidebar.getWidgets().every((widget) => widget.id.startsWith("block-"));
13811      return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "customize-widgets-welcome-guide", children: [
13812        /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "customize-widgets-welcome-guide__image__wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("picture", { children: [
13813          /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13814            "source",
13815            {
13816              srcSet: "https://s.w.org/images/block-editor/welcome-editor.svg",
13817              media: "(prefers-reduced-motion: reduce)"
13818            }
13819          ),
13820          /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13821            "img",
13822            {
13823              className: "customize-widgets-welcome-guide__image",
13824              src: "https://s.w.org/images/block-editor/welcome-editor.gif",
13825              width: "312",
13826              height: "240",
13827              alt: ""
13828            }
13829          )
13830        ] }) }),
13831        /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("h1", { className: "customize-widgets-welcome-guide__heading", children: (0, import_i18n13.__)("Welcome to block Widgets") }),
13832        /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "customize-widgets-welcome-guide__text", children: isEntirelyBlockWidgets ? (0, import_i18n13.__)(
13833          "Your theme provides 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."
13834        ) : (0, import_i18n13.__)(
13835          "You can now add any block to your site\u2019s widget areas. Don\u2019t worry, all of your favorite widgets still work flawlessly."
13836        ) }),
13837        /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13838          import_components6.Button,
13839          {
13840            size: "compact",
13841            variant: "primary",
13842            onClick: () => toggle("core/customize-widgets", "welcomeGuide"),
13843            children: (0, import_i18n13.__)("Got it")
13844          }
13845        ),
13846        /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("hr", { className: "customize-widgets-welcome-guide__separator" }),
13847        !isEntirelyBlockWidgets && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("p", { className: "customize-widgets-welcome-guide__more-info", children: [
13848          (0, import_i18n13.__)("Want to stick with the old widgets?"),
13849          /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("br", {}),
13850          /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13851            import_components6.ExternalLink,
13852            {
13853              href: (0, import_i18n13.__)(
13854                "https://wordpress.org/plugins/classic-widgets/"
13855              ),
13856              children: (0, import_i18n13.__)("Get the Classic Widgets plugin.")
13857            }
13858          )
13859        ] }),
13860        /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("p", { className: "customize-widgets-welcome-guide__more-info", children: [
13861          (0, import_i18n13.__)("New to the block editor?"),
13862          /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("br", {}),
13863          /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13864            import_components6.ExternalLink,
13865            {
13866              href: (0, import_i18n13.__)(
13867                "https://wordpress.org/documentation/article/wordpress-block-editor/"
13868              ),
13869              children: (0, import_i18n13.__)("Here's a detailed guide.")
13870            }
13871          )
13872        ] })
13873      ] });
13874    }
13875  
13876    // packages/customize-widgets/build-module/components/keyboard-shortcuts/index.mjs
13877    var import_element54 = __toESM(require_element(), 1);
13878    var import_keyboard_shortcuts4 = __toESM(require_keyboard_shortcuts(), 1);
13879    var import_keycodes4 = __toESM(require_keycodes(), 1);
13880    var import_data10 = __toESM(require_data(), 1);
13881    var import_i18n14 = __toESM(require_i18n(), 1);
13882    var import_block_editor6 = __toESM(require_block_editor(), 1);
13883    var { usesNativeUndo } = unlock2(import_block_editor6.privateApis);
13884    function KeyboardShortcuts({ undo, redo, save }) {
13885      (0, import_keyboard_shortcuts4.useShortcut)("core/customize-widgets/undo", (event) => {
13886        if (usesNativeUndo(event)) {
13887          return;
13888        }
13889        undo();
13890        event.preventDefault();
13891      });
13892      (0, import_keyboard_shortcuts4.useShortcut)("core/customize-widgets/redo", (event) => {
13893        if (usesNativeUndo(event)) {
13894          return;
13895        }
13896        redo();
13897        event.preventDefault();
13898      });
13899      (0, import_keyboard_shortcuts4.useShortcut)("core/customize-widgets/save", (event) => {
13900        event.preventDefault();
13901        save();
13902      });
13903      return null;
13904    }
13905    function KeyboardShortcutsRegister() {
13906      const { registerShortcut, unregisterShortcut } = (0, import_data10.useDispatch)(
13907        import_keyboard_shortcuts4.store
13908      );
13909      (0, import_element54.useEffect)(() => {
13910        registerShortcut({
13911          name: "core/customize-widgets/undo",
13912          category: "global",
13913          description: (0, import_i18n14.__)("Undo your last changes."),
13914          keyCombination: {
13915            modifier: "primary",
13916            character: "z"
13917          }
13918        });
13919        registerShortcut({
13920          name: "core/customize-widgets/redo",
13921          category: "global",
13922          description: (0, import_i18n14.__)("Redo your last undo."),
13923          keyCombination: {
13924            modifier: "primaryShift",
13925            character: "z"
13926          },
13927          // Disable on Apple OS because it conflicts with the browser's
13928          // history shortcut. It's a fine alias for both Windows and Linux.
13929          // Since there's no conflict for Ctrl+Shift+Z on both Windows and
13930          // Linux, we keep it as the default for consistency.
13931          aliases: (0, import_keycodes4.isAppleOS)() ? [] : [
13932            {
13933              modifier: "primary",
13934              character: "y"
13935            }
13936          ]
13937        });
13938        registerShortcut({
13939          name: "core/customize-widgets/save",
13940          category: "global",
13941          description: (0, import_i18n14.__)("Save your changes."),
13942          keyCombination: {
13943            modifier: "primary",
13944            character: "s"
13945          }
13946        });
13947        return () => {
13948          unregisterShortcut("core/customize-widgets/undo");
13949          unregisterShortcut("core/customize-widgets/redo");
13950          unregisterShortcut("core/customize-widgets/save");
13951        };
13952      }, [registerShortcut]);
13953      return null;
13954    }
13955    KeyboardShortcuts.Register = KeyboardShortcutsRegister;
13956    var keyboard_shortcuts_default = KeyboardShortcuts;
13957  
13958    // packages/customize-widgets/build-module/components/block-appender/index.mjs
13959    var import_element55 = __toESM(require_element(), 1);
13960    var import_block_editor7 = __toESM(require_block_editor(), 1);
13961    var import_data11 = __toESM(require_data(), 1);
13962    var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
13963    function BlockAppender(props) {
13964      const ref = (0, import_element55.useRef)();
13965      const isBlocksListEmpty = (0, import_data11.useSelect)(
13966        (select) => select(import_block_editor7.store).getBlockCount() === 0
13967      );
13968      (0, import_element55.useEffect)(() => {
13969        if (isBlocksListEmpty && ref.current) {
13970          const { ownerDocument: ownerDocument2 } = ref.current;
13971          if (!ownerDocument2.activeElement || ownerDocument2.activeElement === ownerDocument2.body) {
13972            ref.current.focus();
13973          }
13974        }
13975      }, [isBlocksListEmpty]);
13976      return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_block_editor7.ButtonBlockAppender, { ...props, ref });
13977    }
13978  
13979    // packages/customize-widgets/build-module/components/sidebar-block-editor/index.mjs
13980    var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
13981    var { ExperimentalBlockCanvas: BlockCanvas } = unlock2(
13982      import_block_editor8.privateApis
13983    );
13984    function SidebarBlockEditor({
13985      blockEditorSettings,
13986      sidebar,
13987      inserter,
13988      inspector
13989    }) {
13990      const [isInserterOpened2, setIsInserterOpened2] = useInserter(inserter);
13991      const isMediumViewport = (0, import_compose4.useViewportMatch)("small");
13992      const {
13993        hasUploadPermissions,
13994        isFixedToolbarActive,
13995        keepCaretInsideBlock,
13996        isWelcomeGuideActive
13997      } = (0, import_data12.useSelect)((select) => {
13998        const { get } = select(import_preferences3.store);
13999        return {
14000          hasUploadPermissions: select(import_core_data.store).canUser("create", {
14001            kind: "postType",
14002            name: "attachment"
14003          }) ?? true,
14004          isFixedToolbarActive: !!get(
14005            "core/customize-widgets",
14006            "fixedToolbar"
14007          ),
14008          keepCaretInsideBlock: !!get(
14009            "core/customize-widgets",
14010            "keepCaretInsideBlock"
14011          ),
14012          isWelcomeGuideActive: !!get(
14013            "core/customize-widgets",
14014            "welcomeGuide"
14015          )
14016        };
14017      }, []);
14018      const settings = (0, import_element56.useMemo)(() => {
14019        let mediaUploadBlockEditor;
14020        if (hasUploadPermissions) {
14021          mediaUploadBlockEditor = ({ onError, ...argumentsObject }) => {
14022            (0, import_media_utils.uploadMedia)({
14023              wpAllowedMimeTypes: blockEditorSettings.allowedMimeTypes,
14024              onError: ({ message }) => onError(message),
14025              ...argumentsObject
14026            });
14027          };
14028        }
14029        return {
14030          ...blockEditorSettings,
14031          __experimentalSetIsInserterOpened: setIsInserterOpened2,
14032          mediaUpload: mediaUploadBlockEditor,
14033          hasFixedToolbar: isFixedToolbarActive || !isMediumViewport,
14034          keepCaretInsideBlock,
14035          editorTool: "edit",
14036          __unstableHasCustomAppender: true
14037        };
14038      }, [
14039        hasUploadPermissions,
14040        blockEditorSettings,
14041        isFixedToolbarActive,
14042        isMediumViewport,
14043        keepCaretInsideBlock,
14044        setIsInserterOpened2
14045      ]);
14046      if (isWelcomeGuideActive) {
14047        return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(WelcomeGuide, { sidebar });
14048      }
14049      return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
14050        /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(keyboard_shortcuts_default.Register, {}),
14051        /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(SidebarEditorProvider, { sidebar, settings, children: [
14052          /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
14053            keyboard_shortcuts_default,
14054            {
14055              undo: sidebar.undo,
14056              redo: sidebar.redo,
14057              save: sidebar.save
14058            }
14059          ),
14060          /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
14061            header_default,
14062            {
14063              sidebar,
14064              inserter,
14065              isInserterOpened: isInserterOpened2,
14066              setIsInserterOpened: setIsInserterOpened2,
14067              isFixedToolbarActive: isFixedToolbarActive || !isMediumViewport
14068            }
14069          ),
14070          (isFixedToolbarActive || !isMediumViewport) && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_block_editor8.BlockToolbar, { hideDragHandle: true }),
14071          /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
14072            BlockCanvas,
14073            {
14074              shouldIframe: false,
14075              styles: settings.defaultEditorStyles,
14076              height: "100%",
14077              children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_block_editor8.BlockList, { renderAppender: BlockAppender })
14078            }
14079          ),
14080          (0, import_element56.createPortal)(
14081            // This is a temporary hack to prevent button component inside <BlockInspector>
14082            // from submitting form when type="button" is not specified.
14083            /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("form", { onSubmit: (event) => event.preventDefault(), children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_block_editor8.BlockInspector, {}) }),
14084            inspector.contentContainer[0]
14085          )
14086        ] }),
14087        /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_block_editor8.__unstableBlockSettingsMenuFirstItem, { children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
14088          block_inspector_button_default,
14089          {
14090            inspector,
14091            closeMenu: onClose
14092          }
14093        ) })
14094      ] });
14095    }
14096  
14097    // packages/customize-widgets/build-module/components/sidebar-controls/index.mjs
14098    var import_element57 = __toESM(require_element(), 1);
14099    var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
14100    var SidebarControlsContext = (0, import_element57.createContext)();
14101    SidebarControlsContext.displayName = "SidebarControlsContext";
14102    function SidebarControls({
14103      sidebarControls,
14104      activeSidebarControl,
14105      children
14106    }) {
14107      const context = (0, import_element57.useMemo)(
14108        () => ({
14109          sidebarControls,
14110          activeSidebarControl
14111        }),
14112        [sidebarControls, activeSidebarControl]
14113      );
14114      return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(SidebarControlsContext.Provider, { value: context, children });
14115    }
14116    function useSidebarControls() {
14117      const { sidebarControls } = (0, import_element57.useContext)(SidebarControlsContext);
14118      return sidebarControls;
14119    }
14120    function useActiveSidebarControl() {
14121      const { activeSidebarControl } = (0, import_element57.useContext)(SidebarControlsContext);
14122      return activeSidebarControl;
14123    }
14124  
14125    // packages/customize-widgets/build-module/components/customize-widgets/use-clear-selected-block.mjs
14126    var import_element58 = __toESM(require_element(), 1);
14127    var import_data13 = __toESM(require_data(), 1);
14128    var import_block_editor9 = __toESM(require_block_editor(), 1);
14129    function useClearSelectedBlock(sidebarControl, popoverRef) {
14130      const { hasSelectedBlock, hasMultiSelection } = (0, import_data13.useSelect)(import_block_editor9.store);
14131      const { clearSelectedBlock } = (0, import_data13.useDispatch)(import_block_editor9.store);
14132      (0, import_element58.useEffect)(() => {
14133        if (popoverRef.current && sidebarControl) {
14134          let handleClearSelectedBlock = function(element) {
14135            if (
14136              // 1. Make sure there are blocks being selected.
14137              (hasSelectedBlock() || hasMultiSelection()) && // 2. The element should exist in the DOM (not deleted).
14138              element && ownerDocument2.contains(element) && // 3. It should also not exist in the container, the popover, nor the dialog.
14139              !container.contains(element) && !popoverRef.current.contains(element) && !element.closest('[role="dialog"]') && // 4. The inspector should not be opened.
14140              !inspector.expanded()
14141            ) {
14142              clearSelectedBlock();
14143            }
14144          }, handleMouseDown = function(event) {
14145            handleClearSelectedBlock(event.target);
14146          }, handleBlur = function() {
14147            handleClearSelectedBlock(ownerDocument2.activeElement);
14148          };
14149          const inspector = sidebarControl.inspector;
14150          const container = sidebarControl.container[0];
14151          const ownerDocument2 = container.ownerDocument;
14152          const ownerWindow = ownerDocument2.defaultView;
14153          ownerDocument2.addEventListener("mousedown", handleMouseDown);
14154          ownerWindow.addEventListener("blur", handleBlur);
14155          return () => {
14156            ownerDocument2.removeEventListener(
14157              "mousedown",
14158              handleMouseDown
14159            );
14160            ownerWindow.removeEventListener("blur", handleBlur);
14161          };
14162        }
14163      }, [
14164        popoverRef,
14165        sidebarControl,
14166        hasSelectedBlock,
14167        hasMultiSelection,
14168        clearSelectedBlock
14169      ]);
14170    }
14171  
14172    // packages/customize-widgets/build-module/components/customize-widgets/index.mjs
14173    var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
14174    function CustomizeWidgets({
14175      api,
14176      sidebarControls,
14177      blockEditorSettings
14178    }) {
14179      const [activeSidebarControl, setActiveSidebarControl] = (0, import_element59.useState)(null);
14180      const parentContainer = document.getElementById(
14181        "customize-theme-controls"
14182      );
14183      const popoverRef = (0, import_element59.useRef)();
14184      const adminPrimary = (0, import_element59.useMemo)(() => getAdminThemeColors().primary, []);
14185      useClearSelectedBlock(activeSidebarControl, popoverRef);
14186      (0, import_element59.useEffect)(() => {
14187        const unsubscribers = sidebarControls.map(
14188          (sidebarControl) => sidebarControl.subscribe((expanded) => {
14189            if (expanded) {
14190              setActiveSidebarControl(sidebarControl);
14191            }
14192          })
14193        );
14194        return () => {
14195          unsubscribers.forEach((unsubscriber) => unsubscriber());
14196        };
14197      }, [sidebarControls]);
14198      const activeSidebar = activeSidebarControl && (0, import_element59.createPortal)(
14199        /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(ErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
14200          SidebarBlockEditor,
14201          {
14202            blockEditorSettings,
14203            sidebar: activeSidebarControl.sidebarAdapter,
14204            inserter: activeSidebarControl.inserter,
14205            inspector: activeSidebarControl.inspector
14206          },
14207          activeSidebarControl.id
14208        ) }),
14209        activeSidebarControl.container[0]
14210      );
14211      const popover = parentContainer && (0, import_element59.createPortal)(
14212        /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "customize-widgets-popover", ref: popoverRef, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components7.Popover.Slot, {}) }),
14213        parentContainer
14214      );
14215      return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components7.SlotFillProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_theme.ThemeProvider, { isRoot: true, color: { primary: adminPrimary }, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
14216        SidebarControls,
14217        {
14218          sidebarControls,
14219          activeSidebarControl,
14220          children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
14221            FocusControl,
14222            {
14223              api,
14224              sidebarControls,
14225              children: [
14226                activeSidebar,
14227                popover
14228              ]
14229            }
14230          )
14231        }
14232      ) }) });
14233    }
14234  
14235    // packages/customize-widgets/build-module/controls/sidebar-section.mjs
14236    var import_i18n15 = __toESM(require_i18n(), 1);
14237  
14238    // packages/customize-widgets/build-module/controls/inspector-section.mjs
14239    function getInspectorSection() {
14240      const {
14241        wp: { customize }
14242      } = window;
14243      return class InspectorSection extends customize.Section {
14244        constructor(id, options) {
14245          super(id, options);
14246          this.parentSection = options.parentSection;
14247          this.returnFocusWhenClose = null;
14248          this._isOpen = false;
14249        }
14250        get isOpen() {
14251          return this._isOpen;
14252        }
14253        set isOpen(value) {
14254          this._isOpen = value;
14255          this.triggerActiveCallbacks();
14256        }
14257        ready() {
14258          this.contentContainer[0].classList.add(
14259            "customize-widgets-layout__inspector"
14260          );
14261        }
14262        isContextuallyActive() {
14263          return this.isOpen;
14264        }
14265        onChangeExpanded(expanded, args) {
14266          super.onChangeExpanded(expanded, args);
14267          if (this.parentSection && !args.unchanged) {
14268            if (expanded) {
14269              this.parentSection.collapse({
14270                manualTransition: true
14271              });
14272            } else {
14273              this.parentSection.expand({
14274                manualTransition: true,
14275                completeCallback: () => {
14276                  if (this.returnFocusWhenClose && !this.contentContainer[0].contains(
14277                    this.returnFocusWhenClose
14278                  )) {
14279                    this.returnFocusWhenClose.focus();
14280                  }
14281                }
14282              });
14283            }
14284          }
14285        }
14286        open({ returnFocusWhenClose } = {}) {
14287          this.isOpen = true;
14288          this.returnFocusWhenClose = returnFocusWhenClose;
14289          this.expand({
14290            allowMultiple: true
14291          });
14292        }
14293        close() {
14294          this.collapse({
14295            allowMultiple: true
14296          });
14297        }
14298        collapse(options) {
14299          this.isOpen = false;
14300          super.collapse(options);
14301        }
14302        triggerActiveCallbacks() {
14303          this.active.callbacks.fireWith(this.active, [false, true]);
14304        }
14305      };
14306    }
14307  
14308    // packages/customize-widgets/build-module/controls/sidebar-section.mjs
14309    var getInspectorSectionId = (sidebarId) => `widgets-inspector-$sidebarId}`;
14310    function getSidebarSection() {
14311      const {
14312        wp: { customize }
14313      } = window;
14314      const reduceMotionMediaQuery = window.matchMedia(
14315        "(prefers-reduced-motion: reduce)"
14316      );
14317      let isReducedMotion = reduceMotionMediaQuery.matches;
14318      reduceMotionMediaQuery.addEventListener("change", (event) => {
14319        isReducedMotion = event.matches;
14320      });
14321      return class SidebarSection extends customize.Section {
14322        ready() {
14323          const InspectorSection = getInspectorSection();
14324          this.inspector = new InspectorSection(
14325            getInspectorSectionId(this.id),
14326            {
14327              title: (0, import_i18n15.__)("Block Settings"),
14328              parentSection: this,
14329              customizeAction: [
14330                (0, import_i18n15.__)("Customizing"),
14331                (0, import_i18n15.__)("Widgets"),
14332                this.params.title
14333              ].join(" \u25B8 ")
14334            }
14335          );
14336          customize.section.add(this.inspector);
14337          this.contentContainer[0].classList.add(
14338            "customize-widgets__sidebar-section"
14339          );
14340        }
14341        hasSubSectionOpened() {
14342          return this.inspector.expanded();
14343        }
14344        onChangeExpanded(expanded, _args) {
14345          const controls = this.controls();
14346          const args = {
14347            ..._args,
14348            completeCallback() {
14349              controls.forEach((control) => {
14350                control.onChangeSectionExpanded?.(expanded, args);
14351              });
14352              _args.completeCallback?.();
14353            }
14354          };
14355          if (args.manualTransition) {
14356            if (expanded) {
14357              this.contentContainer.addClass(["busy", "open"]);
14358              this.contentContainer.removeClass("is-sub-section-open");
14359              this.contentContainer.closest(".wp-full-overlay").addClass("section-open");
14360            } else {
14361              this.contentContainer.addClass([
14362                "busy",
14363                "is-sub-section-open"
14364              ]);
14365              this.contentContainer.closest(".wp-full-overlay").addClass("section-open");
14366              this.contentContainer.removeClass("open");
14367            }
14368            const handleTransitionEnd = () => {
14369              this.contentContainer.removeClass("busy");
14370              args.completeCallback();
14371            };
14372            if (isReducedMotion) {
14373              handleTransitionEnd();
14374            } else {
14375              this.contentContainer.one(
14376                "transitionend",
14377                handleTransitionEnd
14378              );
14379            }
14380          } else {
14381            super.onChangeExpanded(expanded, args);
14382          }
14383        }
14384      };
14385    }
14386  
14387    // packages/customize-widgets/build-module/controls/sidebar-control.mjs
14388    var import_data15 = __toESM(require_data(), 1);
14389  
14390    // packages/customize-widgets/build-module/components/sidebar-block-editor/sidebar-adapter.mjs
14391    var { wp } = window;
14392    function parseWidgetId(widgetId) {
14393      const matches = widgetId.match(/^(.+)-(\d+)$/);
14394      if (matches) {
14395        return {
14396          idBase: matches[1],
14397          number: parseInt(matches[2], 10)
14398        };
14399      }
14400      return { idBase: widgetId };
14401    }
14402    function widgetIdToSettingId(widgetId) {
14403      const { idBase, number } = parseWidgetId(widgetId);
14404      if (number) {
14405        return `widget_$idBase}[$number}]`;
14406      }
14407      return `widget_$idBase}`;
14408    }
14409    function debounce(leading, callback, timeout) {
14410      let isLeading = false;
14411      let timerID;
14412      function debounced(...args) {
14413        const result = (isLeading ? callback : leading).apply(this, args);
14414        isLeading = true;
14415        clearTimeout(timerID);
14416        timerID = setTimeout(() => {
14417          isLeading = false;
14418        }, timeout);
14419        return result;
14420      }
14421      debounced.cancel = () => {
14422        isLeading = false;
14423        clearTimeout(timerID);
14424      };
14425      return debounced;
14426    }
14427    var SidebarAdapter = class {
14428      constructor(setting, api) {
14429        this.setting = setting;
14430        this.api = api;
14431        this.locked = false;
14432        this.widgetsCache = /* @__PURE__ */ new WeakMap();
14433        this.subscribers = /* @__PURE__ */ new Set();
14434        this.history = [
14435          this._getWidgetIds().map(
14436            (widgetId) => this.getWidget(widgetId)
14437          )
14438        ];
14439        this.historyIndex = 0;
14440        this.historySubscribers = /* @__PURE__ */ new Set();
14441        this._debounceSetHistory = debounce(
14442          this._pushHistory,
14443          this._replaceHistory,
14444          1e3
14445        );
14446        this.setting.bind(this._handleSettingChange.bind(this));
14447        this.api.bind("change", this._handleAllSettingsChange.bind(this));
14448        this.undo = this.undo.bind(this);
14449        this.redo = this.redo.bind(this);
14450        this.save = this.save.bind(this);
14451      }
14452      subscribe(callback) {
14453        this.subscribers.add(callback);
14454        return () => {
14455          this.subscribers.delete(callback);
14456        };
14457      }
14458      getWidgets() {
14459        return this.history[this.historyIndex];
14460      }
14461      _emit(...args) {
14462        for (const callback of this.subscribers) {
14463          callback(...args);
14464        }
14465      }
14466      _getWidgetIds() {
14467        return this.setting.get();
14468      }
14469      _pushHistory() {
14470        this.history = [
14471          ...this.history.slice(0, this.historyIndex + 1),
14472          this._getWidgetIds().map(
14473            (widgetId) => this.getWidget(widgetId)
14474          )
14475        ];
14476        this.historyIndex += 1;
14477        this.historySubscribers.forEach((listener) => listener());
14478      }
14479      _replaceHistory() {
14480        this.history[this.historyIndex] = this._getWidgetIds().map(
14481          (widgetId) => this.getWidget(widgetId)
14482        );
14483      }
14484      _handleSettingChange() {
14485        if (this.locked) {
14486          return;
14487        }
14488        const prevWidgets = this.getWidgets();
14489        this._pushHistory();
14490        this._emit(prevWidgets, this.getWidgets());
14491      }
14492      _handleAllSettingsChange(setting) {
14493        if (this.locked) {
14494          return;
14495        }
14496        if (!setting.id.startsWith("widget_")) {
14497          return;
14498        }
14499        const widgetId = settingIdToWidgetId(setting.id);
14500        if (!this.setting.get().includes(widgetId)) {
14501          return;
14502        }
14503        const prevWidgets = this.getWidgets();
14504        this._pushHistory();
14505        this._emit(prevWidgets, this.getWidgets());
14506      }
14507      _createWidget(widget) {
14508        const widgetModel = wp.customize.Widgets.availableWidgets.findWhere({
14509          id_base: widget.idBase
14510        });
14511        let number = widget.number;
14512        if (widgetModel.get("is_multi") && !number) {
14513          widgetModel.set(
14514            "multi_number",
14515            widgetModel.get("multi_number") + 1
14516          );
14517          number = widgetModel.get("multi_number");
14518        }
14519        const settingId = number ? `widget_$widget.idBase}[$number}]` : `widget_$widget.idBase}`;
14520        const settingArgs = {
14521          transport: wp.customize.Widgets.data.selectiveRefreshableWidgets[widgetModel.get("id_base")] ? "postMessage" : "refresh",
14522          previewer: this.setting.previewer
14523        };
14524        const setting = this.api.create(
14525          settingId,
14526          settingId,
14527          "",
14528          settingArgs
14529        );
14530        setting.set(widget.instance);
14531        const widgetId = settingIdToWidgetId(settingId);
14532        return widgetId;
14533      }
14534      _removeWidget(widget) {
14535        const settingId = widgetIdToSettingId(widget.id);
14536        const setting = this.api(settingId);
14537        if (setting) {
14538          const instance = setting.get();
14539          this.widgetsCache.delete(instance);
14540        }
14541        this.api.remove(settingId);
14542      }
14543      _updateWidget(widget) {
14544        const prevWidget = this.getWidget(widget.id);
14545        if (prevWidget === widget) {
14546          return widget.id;
14547        }
14548        if (prevWidget.idBase && widget.idBase && prevWidget.idBase === widget.idBase) {
14549          const settingId = widgetIdToSettingId(widget.id);
14550          this.api(settingId).set(widget.instance);
14551          return widget.id;
14552        }
14553        this._removeWidget(widget);
14554        return this._createWidget(widget);
14555      }
14556      getWidget(widgetId) {
14557        if (!widgetId) {
14558          return null;
14559        }
14560        const { idBase, number } = parseWidgetId(widgetId);
14561        const settingId = widgetIdToSettingId(widgetId);
14562        const setting = this.api(settingId);
14563        if (!setting) {
14564          return null;
14565        }
14566        const instance = setting.get();
14567        if (this.widgetsCache.has(instance)) {
14568          return this.widgetsCache.get(instance);
14569        }
14570        const widget = {
14571          id: widgetId,
14572          idBase,
14573          number,
14574          instance
14575        };
14576        this.widgetsCache.set(instance, widget);
14577        return widget;
14578      }
14579      _updateWidgets(nextWidgets) {
14580        this.locked = true;
14581        const addedWidgetIds = [];
14582        const nextWidgetIds = nextWidgets.map((nextWidget) => {
14583          if (nextWidget.id && this.getWidget(nextWidget.id)) {
14584            addedWidgetIds.push(null);
14585            return this._updateWidget(nextWidget);
14586          }
14587          const widgetId = this._createWidget(nextWidget);
14588          addedWidgetIds.push(widgetId);
14589          return widgetId;
14590        });
14591        const deletedWidgets = this.getWidgets().filter(
14592          (widget) => !nextWidgetIds.includes(widget.id)
14593        );
14594        deletedWidgets.forEach((widget) => this._removeWidget(widget));
14595        this.setting.set(nextWidgetIds);
14596        this.locked = false;
14597        return addedWidgetIds;
14598      }
14599      setWidgets(nextWidgets) {
14600        const addedWidgetIds = this._updateWidgets(nextWidgets);
14601        this._debounceSetHistory();
14602        return addedWidgetIds;
14603      }
14604      /**
14605       * Undo/Redo related features
14606       */
14607      hasUndo() {
14608        return this.historyIndex > 0;
14609      }
14610      hasRedo() {
14611        return this.historyIndex < this.history.length - 1;
14612      }
14613      _seek(historyIndex) {
14614        const currentWidgets = this.getWidgets();
14615        this.historyIndex = historyIndex;
14616        const widgets = this.history[this.historyIndex];
14617        this._updateWidgets(widgets);
14618        this._emit(currentWidgets, this.getWidgets());
14619        this.historySubscribers.forEach((listener) => listener());
14620        this._debounceSetHistory.cancel();
14621      }
14622      undo() {
14623        if (!this.hasUndo()) {
14624          return;
14625        }
14626        this._seek(this.historyIndex - 1);
14627      }
14628      redo() {
14629        if (!this.hasRedo()) {
14630          return;
14631        }
14632        this._seek(this.historyIndex + 1);
14633      }
14634      subscribeHistory(listener) {
14635        this.historySubscribers.add(listener);
14636        return () => {
14637          this.historySubscribers.delete(listener);
14638        };
14639      }
14640      save() {
14641        this.api.previewer.save();
14642      }
14643    };
14644  
14645    // packages/customize-widgets/build-module/controls/inserter-outer-section.mjs
14646    var import_keycodes5 = __toESM(require_keycodes(), 1);
14647    var import_dom21 = __toESM(require_dom(), 1);
14648    var import_data14 = __toESM(require_data(), 1);
14649    function getInserterOuterSection() {
14650      const {
14651        wp: { customize }
14652      } = window;
14653      const OuterSection = customize.OuterSection;
14654      customize.OuterSection = class extends OuterSection {
14655        onChangeExpanded(expanded, args) {
14656          if (expanded) {
14657            customize.section.each((section) => {
14658              if (section.params.type === "outer" && section.id !== this.id) {
14659                if (section.expanded()) {
14660                  section.collapse();
14661                }
14662              }
14663            });
14664          }
14665          return super.onChangeExpanded(expanded, args);
14666        }
14667      };
14668      customize.sectionConstructor.outer = customize.OuterSection;
14669      return class InserterOuterSection extends customize.OuterSection {
14670        constructor(...args) {
14671          super(...args);
14672          this.params.type = "outer";
14673          this.activeElementBeforeExpanded = null;
14674          const ownerWindow = this.contentContainer[0].ownerDocument.defaultView;
14675          ownerWindow.addEventListener(
14676            "keydown",
14677            (event) => {
14678              if (this.expanded() && (event.keyCode === import_keycodes5.ESCAPE || event.code === "Escape") && !event.defaultPrevented) {
14679                event.preventDefault();
14680                event.stopPropagation();
14681                (0, import_data14.dispatch)(store).setIsInserterOpened(
14682                  false
14683                );
14684              }
14685            },
14686            // Use capture mode to make this run before other event listeners.
14687            true
14688          );
14689          this.contentContainer.addClass("widgets-inserter");
14690          this.isFromInternalAction = false;
14691          this.expanded.bind(() => {
14692            if (!this.isFromInternalAction) {
14693              (0, import_data14.dispatch)(store).setIsInserterOpened(
14694                this.expanded()
14695              );
14696            }
14697            this.isFromInternalAction = false;
14698          });
14699        }
14700        open() {
14701          if (!this.expanded()) {
14702            const contentContainer = this.contentContainer[0];
14703            this.activeElementBeforeExpanded = contentContainer.ownerDocument.activeElement;
14704            this.isFromInternalAction = true;
14705            this.expand({
14706              completeCallback() {
14707                const searchBox = import_dom21.focus.tabbable.find(contentContainer)[1];
14708                if (searchBox) {
14709                  searchBox.focus();
14710                }
14711              }
14712            });
14713          }
14714        }
14715        close() {
14716          if (this.expanded()) {
14717            const contentContainer = this.contentContainer[0];
14718            const activeElement2 = contentContainer.ownerDocument.activeElement;
14719            this.isFromInternalAction = true;
14720            this.collapse({
14721              completeCallback() {
14722                if (contentContainer.contains(activeElement2)) {
14723                  if (this.activeElementBeforeExpanded) {
14724                    this.activeElementBeforeExpanded.focus();
14725                  }
14726                }
14727              }
14728            });
14729          }
14730        }
14731      };
14732    }
14733  
14734    // packages/customize-widgets/build-module/controls/sidebar-control.mjs
14735    var getInserterId = (controlId) => `widgets-inserter-$controlId}`;
14736    function getSidebarControl() {
14737      const {
14738        wp: { customize }
14739      } = window;
14740      return class SidebarControl extends customize.Control {
14741        constructor(...args) {
14742          super(...args);
14743          this.subscribers = /* @__PURE__ */ new Set();
14744        }
14745        ready() {
14746          const InserterOuterSection = getInserterOuterSection();
14747          this.inserter = new InserterOuterSection(
14748            getInserterId(this.id),
14749            {}
14750          );
14751          customize.section.add(this.inserter);
14752          this.sectionInstance = customize.section(this.section());
14753          this.inspector = this.sectionInstance.inspector;
14754          this.sidebarAdapter = new SidebarAdapter(this.setting, customize);
14755        }
14756        subscribe(callback) {
14757          this.subscribers.add(callback);
14758          return () => {
14759            this.subscribers.delete(callback);
14760          };
14761        }
14762        onChangeSectionExpanded(expanded, args) {
14763          if (!args.unchanged) {
14764            if (!expanded) {
14765              (0, import_data15.dispatch)(store).setIsInserterOpened(
14766                false
14767              );
14768            }
14769            this.subscribers.forEach(
14770              (subscriber) => subscriber(expanded, args)
14771            );
14772          }
14773        }
14774      };
14775    }
14776  
14777    // packages/customize-widgets/build-module/filters/move-to-sidebar.mjs
14778    var import_block_editor10 = __toESM(require_block_editor(), 1);
14779    var import_compose5 = __toESM(require_compose(), 1);
14780    var import_data16 = __toESM(require_data(), 1);
14781    var import_hooks2 = __toESM(require_hooks(), 1);
14782    var import_widgets4 = __toESM(require_widgets(), 1);
14783    var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
14784    var withMoveToSidebarToolbarItem = (0, import_compose5.createHigherOrderComponent)(
14785      (BlockEdit) => (props) => {
14786        let widgetId = (0, import_widgets4.getWidgetIdFromBlock)(props);
14787        const sidebarControls = useSidebarControls();
14788        const activeSidebarControl = useActiveSidebarControl();
14789        const hasMultipleSidebars = sidebarControls?.length > 1;
14790        const blockName = props.name;
14791        const clientId = props.clientId;
14792        const canInsertBlockInSidebar = (0, import_data16.useSelect)(
14793          (select) => {
14794            return select(import_block_editor10.store).canInsertBlockType(
14795              blockName,
14796              ""
14797            );
14798          },
14799          [blockName]
14800        );
14801        const block = (0, import_data16.useSelect)(
14802          (select) => select(import_block_editor10.store).getBlock(clientId),
14803          [clientId]
14804        );
14805        const { removeBlock } = (0, import_data16.useDispatch)(import_block_editor10.store);
14806        const [, focusWidget] = useFocusControl();
14807        function moveToSidebar(sidebarControlId) {
14808          const newSidebarControl = sidebarControls.find(
14809            (sidebarControl) => sidebarControl.id === sidebarControlId
14810          );
14811          if (widgetId) {
14812            const oldSetting = activeSidebarControl.setting;
14813            const newSetting = newSidebarControl.setting;
14814            oldSetting(oldSetting().filter((id) => id !== widgetId));
14815            newSetting([...newSetting(), widgetId]);
14816          } else {
14817            const sidebarAdapter = newSidebarControl.sidebarAdapter;
14818            removeBlock(clientId);
14819            const addedWidgetIds = sidebarAdapter.setWidgets([
14820              ...sidebarAdapter.getWidgets(),
14821              blockToWidget(block)
14822            ]);
14823            widgetId = addedWidgetIds.reverse().find((id) => !!id);
14824          }
14825          focusWidget(widgetId);
14826        }
14827        return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
14828          /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(BlockEdit, { ...props }, "edit"),
14829          hasMultipleSidebars && canInsertBlockInSidebar && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_block_editor10.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
14830            import_widgets4.MoveToWidgetArea,
14831            {
14832              widgetAreas: sidebarControls.map(
14833                (sidebarControl) => ({
14834                  id: sidebarControl.id,
14835                  name: sidebarControl.params.label,
14836                  description: sidebarControl.params.description
14837                })
14838              ),
14839              currentWidgetAreaId: activeSidebarControl?.id,
14840              onSelect: moveToSidebar
14841            }
14842          ) })
14843        ] });
14844      },
14845      "withMoveToSidebarToolbarItem"
14846    );
14847    (0, import_hooks2.addFilter)(
14848      "editor.BlockEdit",
14849      "core/customize-widgets/block-edit",
14850      withMoveToSidebarToolbarItem
14851    );
14852  
14853    // packages/customize-widgets/build-module/filters/replace-media-upload.mjs
14854    var import_hooks3 = __toESM(require_hooks(), 1);
14855    var import_media_utils2 = __toESM(require_media_utils(), 1);
14856    var replaceMediaUpload = () => import_media_utils2.MediaUpload;
14857    (0, import_hooks3.addFilter)(
14858      "editor.MediaUpload",
14859      "core/edit-widgets/replace-media-upload",
14860      replaceMediaUpload
14861    );
14862  
14863    // packages/customize-widgets/build-module/filters/wide-widget-display.mjs
14864    var import_compose6 = __toESM(require_compose(), 1);
14865    var import_hooks4 = __toESM(require_hooks(), 1);
14866    var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
14867    var { wp: wp2 } = window;
14868    var withWideWidgetDisplay = (0, import_compose6.createHigherOrderComponent)(
14869      (BlockEdit) => (props) => {
14870        const { idBase } = props.attributes;
14871        const isWide = wp2.customize.Widgets.data.availableWidgets.find(
14872          (widget) => widget.id_base === idBase
14873        )?.is_wide ?? false;
14874        return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(BlockEdit, { ...props, isWide }, "edit");
14875      },
14876      "withWideWidgetDisplay"
14877    );
14878    (0, import_hooks4.addFilter)(
14879      "editor.BlockEdit",
14880      "core/customize-widgets/wide-widget-display",
14881      withWideWidgetDisplay
14882    );
14883  
14884    // packages/customize-widgets/build-module/index.mjs
14885    var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
14886    var { wp: wp3 } = window;
14887    var DISABLED_BLOCKS = [
14888      "core/more",
14889      "core/block",
14890      "core/freeform",
14891      "core/template-part"
14892    ];
14893    function initialize(editorName, blockEditorSettings) {
14894      (0, import_data17.dispatch)(import_preferences4.store).setDefaults("core/customize-widgets", {
14895        fixedToolbar: false,
14896        welcomeGuide: true
14897      });
14898      (0, import_data17.dispatch)(import_blocks2.store).reapplyBlockTypeFilters();
14899      const coreBlocks = (0, import_block_library.__experimentalGetCoreBlocks)().filter((block) => {
14900        return !(DISABLED_BLOCKS.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"));
14901      });
14902      (0, import_block_library.registerCoreBlocks)(coreBlocks);
14903      (0, import_widgets5.registerLegacyWidgetBlock)();
14904      if (false) {
14905        (0, import_block_library.__experimentalRegisterExperimentalCoreBlocks)({
14906          enableFSEBlocks: ENABLE_EXPERIMENTAL_FSE_BLOCKS
14907        });
14908      }
14909      (0, import_widgets5.registerLegacyWidgetVariations)(blockEditorSettings);
14910      (0, import_widgets5.registerWidgetGroupBlock)();
14911      (0, import_blocks2.setFreeformContentHandlerName)("core/html");
14912      const SidebarControl = getSidebarControl(blockEditorSettings);
14913      wp3.customize.sectionConstructor.sidebar = getSidebarSection();
14914      wp3.customize.controlConstructor.sidebar_block_editor = SidebarControl;
14915      const container = document.createElement("div");
14916      document.body.appendChild(container);
14917      wp3.customize.bind("ready", () => {
14918        const sidebarControls = [];
14919        wp3.customize.control.each((control) => {
14920          if (control instanceof SidebarControl) {
14921            sidebarControls.push(control);
14922          }
14923        });
14924        (0, import_element60.createRoot)(container).render(
14925          /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_element60.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
14926            CustomizeWidgets,
14927            {
14928              api: wp3.customize,
14929              sidebarControls,
14930              blockEditorSettings
14931            }
14932          ) })
14933        );
14934      });
14935    }
14936    return __toCommonJS(index_exports);
14937  })();
14938  /*! Bundled license information:
14939  
14940  use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
14941    (**
14942     * @license React
14943     * use-sync-external-store-shim.development.js
14944     *
14945     * Copyright (c) Meta Platforms, Inc. and affiliates.
14946     *
14947     * This source code is licensed under the MIT license found in the
14948     * LICENSE file in the root directory of this source tree.
14949     *)
14950  
14951  use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
14952    (**
14953     * @license React
14954     * use-sync-external-store-shim/with-selector.development.js
14955     *
14956     * Copyright (c) Meta Platforms, Inc. and affiliates.
14957     *
14958     * This source code is licensed under the MIT license found in the
14959     * LICENSE file in the root directory of this source tree.
14960     *)
14961  */
14962  (window.wp ||= {}).customizeWidgets = wp.customizeWidgets;
14963  })();


Generated : Wed Sep 16 08:20:31 2026 Cross-referenced by PHPXref