[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/build/routes/connectors-home/ -> content.js (source)

   1  var __create = Object.create;
   2  var __defProp = Object.defineProperty;
   3  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
   4  var __getOwnPropNames = Object.getOwnPropertyNames;
   5  var __getProtoOf = Object.getPrototypeOf;
   6  var __hasOwnProp = Object.prototype.hasOwnProperty;
   7  var __commonJS = (cb, mod) => function __require() {
   8    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
   9  };
  10  var __export = (target, all) => {
  11    for (var name in all)
  12      __defProp(target, name, { get: all[name], enumerable: true });
  13  };
  14  var __copyProps = (to, from, except, desc) => {
  15    if (from && typeof from === "object" || typeof from === "function") {
  16      for (let key of __getOwnPropNames(from))
  17        if (!__hasOwnProp.call(to, key) && key !== except)
  18          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  19    }
  20    return to;
  21  };
  22  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  23    // If the importer is in node compatibility mode or this is not an ESM
  24    // file that has been converted to a CommonJS file using a Babel-
  25    // compatible transform (i.e. "__esModule" has not been set), then set
  26    // "default" to the CommonJS "module.exports" for node compatibility.
  27    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  28    mod
  29  ));
  30  
  31  // package-external:@wordpress/i18n
  32  var require_i18n = __commonJS({
  33    "package-external:@wordpress/i18n"(exports, module) {
  34      module.exports = window.wp.i18n;
  35    }
  36  });
  37  
  38  // package-external:@wordpress/element
  39  var require_element = __commonJS({
  40    "package-external:@wordpress/element"(exports, module) {
  41      module.exports = window.wp.element;
  42    }
  43  });
  44  
  45  // vendor-external:react
  46  var require_react = __commonJS({
  47    "vendor-external:react"(exports, module) {
  48      module.exports = window.React;
  49    }
  50  });
  51  
  52  // vendor-external:react/jsx-runtime
  53  var require_jsx_runtime = __commonJS({
  54    "vendor-external:react/jsx-runtime"(exports, module) {
  55      module.exports = window.ReactJSXRuntime;
  56    }
  57  });
  58  
  59  // vendor-external:react-dom
  60  var require_react_dom = __commonJS({
  61    "vendor-external:react-dom"(exports, module) {
  62      module.exports = window.ReactDOM;
  63    }
  64  });
  65  
  66  // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
  67  var require_use_sync_external_store_shim_development = __commonJS({
  68    "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
  69      "use strict";
  70      (function() {
  71        function is(x, y) {
  72          return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
  73        }
  74        function useSyncExternalStore$2(subscribe, getSnapshot) {
  75          didWarnOld18Alpha || void 0 === React52.startTransition || (didWarnOld18Alpha = true, console.error(
  76            "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."
  77          ));
  78          var value = getSnapshot();
  79          if (!didWarnUncachedGetSnapshot) {
  80            var cachedValue = getSnapshot();
  81            objectIs(value, cachedValue) || (console.error(
  82              "The result of getSnapshot should be cached to avoid an infinite loop"
  83            ), didWarnUncachedGetSnapshot = true);
  84          }
  85          cachedValue = useState14({
  86            inst: { value, getSnapshot }
  87          });
  88          var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
  89          useLayoutEffect3(
  90            function() {
  91              inst.value = value;
  92              inst.getSnapshot = getSnapshot;
  93              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
  94            },
  95            [subscribe, value, getSnapshot]
  96          );
  97          useEffect15(
  98            function() {
  99              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 100              return subscribe(function() {
 101                checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 102              });
 103            },
 104            [subscribe]
 105          );
 106          useDebugValue2(value);
 107          return value;
 108        }
 109        function checkIfSnapshotChanged(inst) {
 110          var latestGetSnapshot = inst.getSnapshot;
 111          inst = inst.value;
 112          try {
 113            var nextValue = latestGetSnapshot();
 114            return !objectIs(inst, nextValue);
 115          } catch (error2) {
 116            return true;
 117          }
 118        }
 119        function useSyncExternalStore$1(subscribe, getSnapshot) {
 120          return getSnapshot();
 121        }
 122        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
 123        var React52 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState14 = React52.useState, useEffect15 = React52.useEffect, useLayoutEffect3 = React52.useLayoutEffect, useDebugValue2 = React52.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
 124        exports.useSyncExternalStore = void 0 !== React52.useSyncExternalStore ? React52.useSyncExternalStore : shim;
 125        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
 126      })();
 127    }
 128  });
 129  
 130  // node_modules/use-sync-external-store/shim/index.js
 131  var require_shim = __commonJS({
 132    "node_modules/use-sync-external-store/shim/index.js"(exports, module) {
 133      "use strict";
 134      if (false) {
 135        module.exports = null;
 136      } else {
 137        module.exports = require_use_sync_external_store_shim_development();
 138      }
 139    }
 140  });
 141  
 142  // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
 143  var require_with_selector_development = __commonJS({
 144    "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) {
 145      "use strict";
 146      (function() {
 147        function is(x, y) {
 148          return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
 149        }
 150        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
 151        var React52 = require_react(), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore3 = shim.useSyncExternalStore, useRef21 = React52.useRef, useEffect15 = React52.useEffect, useMemo17 = React52.useMemo, useDebugValue2 = React52.useDebugValue;
 152        exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
 153          var instRef = useRef21(null);
 154          if (null === instRef.current) {
 155            var inst = { hasValue: false, value: null };
 156            instRef.current = inst;
 157          } else inst = instRef.current;
 158          instRef = useMemo17(
 159            function() {
 160              function memoizedSelector(nextSnapshot) {
 161                if (!hasMemo) {
 162                  hasMemo = true;
 163                  memoizedSnapshot = nextSnapshot;
 164                  nextSnapshot = selector(nextSnapshot);
 165                  if (void 0 !== isEqual && inst.hasValue) {
 166                    var currentSelection = inst.value;
 167                    if (isEqual(currentSelection, nextSnapshot))
 168                      return memoizedSelection = currentSelection;
 169                  }
 170                  return memoizedSelection = nextSnapshot;
 171                }
 172                currentSelection = memoizedSelection;
 173                if (objectIs(memoizedSnapshot, nextSnapshot))
 174                  return currentSelection;
 175                var nextSelection = selector(nextSnapshot);
 176                if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
 177                  return memoizedSnapshot = nextSnapshot, currentSelection;
 178                memoizedSnapshot = nextSnapshot;
 179                return memoizedSelection = nextSelection;
 180              }
 181              var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
 182              return [
 183                function() {
 184                  return memoizedSelector(getSnapshot());
 185                },
 186                null === maybeGetServerSnapshot ? void 0 : function() {
 187                  return memoizedSelector(maybeGetServerSnapshot());
 188                }
 189              ];
 190            },
 191            [getSnapshot, getServerSnapshot, selector, isEqual]
 192          );
 193          var value = useSyncExternalStore3(subscribe, instRef[0], instRef[1]);
 194          useEffect15(
 195            function() {
 196              inst.hasValue = true;
 197              inst.value = value;
 198            },
 199            [value]
 200          );
 201          useDebugValue2(value);
 202          return value;
 203        };
 204        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
 205      })();
 206    }
 207  });
 208  
 209  // node_modules/use-sync-external-store/shim/with-selector.js
 210  var require_with_selector = __commonJS({
 211    "node_modules/use-sync-external-store/shim/with-selector.js"(exports, module) {
 212      "use strict";
 213      if (false) {
 214        module.exports = null;
 215      } else {
 216        module.exports = require_with_selector_development();
 217      }
 218    }
 219  });
 220  
 221  // package-external:@wordpress/theme
 222  var require_theme = __commonJS({
 223    "package-external:@wordpress/theme"(exports, module) {
 224      module.exports = window.wp.theme;
 225    }
 226  });
 227  
 228  // package-external:@wordpress/private-apis
 229  var require_private_apis = __commonJS({
 230    "package-external:@wordpress/private-apis"(exports, module) {
 231      module.exports = window.wp.privateApis;
 232    }
 233  });
 234  
 235  // package-external:@wordpress/primitives
 236  var require_primitives = __commonJS({
 237    "package-external:@wordpress/primitives"(exports, module) {
 238      module.exports = window.wp.primitives;
 239    }
 240  });
 241  
 242  // package-external:@wordpress/components
 243  var require_components = __commonJS({
 244    "package-external:@wordpress/components"(exports, module) {
 245      module.exports = window.wp.components;
 246    }
 247  });
 248  
 249  // package-external:@wordpress/data
 250  var require_data = __commonJS({
 251    "package-external:@wordpress/data"(exports, module) {
 252      module.exports = window.wp.data;
 253    }
 254  });
 255  
 256  // package-external:@wordpress/core-data
 257  var require_core_data = __commonJS({
 258    "package-external:@wordpress/core-data"(exports, module) {
 259      module.exports = window.wp.coreData;
 260    }
 261  });
 262  
 263  // package-external:@wordpress/notices
 264  var require_notices = __commonJS({
 265    "package-external:@wordpress/notices"(exports, module) {
 266      module.exports = window.wp.notices;
 267    }
 268  });
 269  
 270  // package-external:@wordpress/url
 271  var require_url = __commonJS({
 272    "package-external:@wordpress/url"(exports, module) {
 273      module.exports = window.wp.url;
 274    }
 275  });
 276  
 277  // node_modules/clsx/dist/clsx.mjs
 278  function r(e) {
 279    var t, f, n = "";
 280    if ("string" == typeof e || "number" == typeof e) n += e;
 281    else if ("object" == typeof e) if (Array.isArray(e)) {
 282      var o = e.length;
 283      for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
 284    } else for (f in e) e[f] && (n && (n += " "), n += f);
 285    return n;
 286  }
 287  function clsx() {
 288    for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
 289    return n;
 290  }
 291  var clsx_default = clsx;
 292  
 293  // packages/ui/build-module/badge/badge.mjs
 294  var import_element11 = __toESM(require_element(), 1);
 295  
 296  // node_modules/@base-ui/utils/error.mjs
 297  var set;
 298  if (true) {
 299    set = /* @__PURE__ */ new Set();
 300  }
 301  function error(...messages) {
 302    if (true) {
 303      const messageKey = messages.join(" ");
 304      if (!set.has(messageKey)) {
 305        set.add(messageKey);
 306        console.error(`Base UI: $messageKey}`);
 307      }
 308    }
 309  }
 310  
 311  // node_modules/@base-ui/utils/safeReact.mjs
 312  var React = __toESM(require_react(), 1);
 313  var SafeReact = {
 314    ...React
 315  };
 316  
 317  // node_modules/@base-ui/utils/useRefWithInit.mjs
 318  var React2 = __toESM(require_react(), 1);
 319  var UNINITIALIZED = {};
 320  function useRefWithInit(init, initArg) {
 321    const ref = React2.useRef(UNINITIALIZED);
 322    if (ref.current === UNINITIALIZED) {
 323      ref.current = init(initArg);
 324    }
 325    return ref;
 326  }
 327  
 328  // node_modules/@base-ui/utils/useStableCallback.mjs
 329  var useInsertionEffect = SafeReact.useInsertionEffect;
 330  var useSafeInsertionEffect = (
 331    // React 17 doesn't have useInsertionEffect.
 332    useInsertionEffect && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late.
 333    useInsertionEffect !== SafeReact.useLayoutEffect ? useInsertionEffect : (fn) => fn()
 334  );
 335  function useStableCallback(callback) {
 336    const stable = useRefWithInit(createStableCallback).current;
 337    stable.next = callback;
 338    useSafeInsertionEffect(stable.effect);
 339    return stable.trampoline;
 340  }
 341  function createStableCallback() {
 342    const stable = {
 343      next: void 0,
 344      callback: assertNotCalled,
 345      trampoline: (...args) => stable.callback?.(...args),
 346      effect: () => {
 347        stable.callback = stable.next;
 348      }
 349    };
 350    return stable;
 351  }
 352  function assertNotCalled() {
 353    if (true) {
 354      throw (
 355        /* minify-error-disabled */
 356        new Error("Base UI: Cannot call an event handler while rendering.")
 357      );
 358    }
 359  }
 360  
 361  // node_modules/@base-ui/utils/warn.mjs
 362  var set2;
 363  if (true) {
 364    set2 = /* @__PURE__ */ new Set();
 365  }
 366  function warn(...messages) {
 367    if (true) {
 368      const messageKey = messages.join(" ");
 369      if (!set2.has(messageKey)) {
 370        set2.add(messageKey);
 371        console.warn(`Base UI: $messageKey}`);
 372      }
 373    }
 374  }
 375  
 376  // node_modules/@base-ui/utils/useIsoLayoutEffect.mjs
 377  var React3 = __toESM(require_react(), 1);
 378  var noop = () => {
 379  };
 380  var useIsoLayoutEffect = typeof document !== "undefined" ? React3.useLayoutEffect : noop;
 381  
 382  // node_modules/@base-ui/react/internals/useRenderElement.mjs
 383  var React6 = __toESM(require_react(), 1);
 384  
 385  // node_modules/@base-ui/utils/useMergedRefs.mjs
 386  function useMergedRefs(a, b, c, d) {
 387    const forkRef = useRefWithInit(createForkRef).current;
 388    if (didChange(forkRef, a, b, c, d)) {
 389      update(forkRef, [a, b, c, d]);
 390    }
 391    return forkRef.callback;
 392  }
 393  function useMergedRefsN(refs) {
 394    const forkRef = useRefWithInit(createForkRef).current;
 395    if (didChangeN(forkRef, refs)) {
 396      update(forkRef, refs);
 397    }
 398    return forkRef.callback;
 399  }
 400  function createForkRef() {
 401    return {
 402      callback: null,
 403      cleanup: null,
 404      refs: []
 405    };
 406  }
 407  function didChange(forkRef, a, b, c, d) {
 408    return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
 409  }
 410  function didChangeN(forkRef, newRefs) {
 411    return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index2) => ref !== newRefs[index2]);
 412  }
 413  function update(forkRef, refs) {
 414    forkRef.refs = refs;
 415    if (refs.every((ref) => ref == null)) {
 416      forkRef.callback = null;
 417      return;
 418    }
 419    forkRef.callback = (instance) => {
 420      if (forkRef.cleanup) {
 421        forkRef.cleanup();
 422        forkRef.cleanup = null;
 423      }
 424      if (instance != null) {
 425        const cleanupCallbacks = Array(refs.length).fill(null);
 426        for (let i = 0; i < refs.length; i += 1) {
 427          const ref = refs[i];
 428          if (ref == null) {
 429            continue;
 430          }
 431          switch (typeof ref) {
 432            case "function": {
 433              const refCleanup = ref(instance);
 434              if (typeof refCleanup === "function") {
 435                cleanupCallbacks[i] = refCleanup;
 436              }
 437              break;
 438            }
 439            case "object": {
 440              ref.current = instance;
 441              break;
 442            }
 443            default:
 444          }
 445        }
 446        forkRef.cleanup = () => {
 447          for (let i = 0; i < refs.length; i += 1) {
 448            const ref = refs[i];
 449            if (ref == null) {
 450              continue;
 451            }
 452            switch (typeof ref) {
 453              case "function": {
 454                const cleanupCallback = cleanupCallbacks[i];
 455                if (typeof cleanupCallback === "function") {
 456                  cleanupCallback();
 457                } else {
 458                  void ref(null);
 459                }
 460                break;
 461              }
 462              case "object": {
 463                ref.current = null;
 464                break;
 465              }
 466              default:
 467            }
 468          }
 469        };
 470      }
 471    };
 472  }
 473  
 474  // node_modules/@base-ui/utils/getReactElementRef.mjs
 475  var React5 = __toESM(require_react(), 1);
 476  
 477  // node_modules/@base-ui/utils/reactVersion.mjs
 478  var React4 = __toESM(require_react(), 1);
 479  var majorVersion = parseInt(React4.version, 10);
 480  function isReactVersionAtLeast(reactVersionToCheck) {
 481    return majorVersion >= reactVersionToCheck;
 482  }
 483  
 484  // node_modules/@base-ui/utils/getReactElementRef.mjs
 485  function getReactElementRef(element) {
 486    if (!/* @__PURE__ */ React5.isValidElement(element)) {
 487      return null;
 488    }
 489    const reactElement = element;
 490    const propsWithRef = reactElement.props;
 491    return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
 492  }
 493  
 494  // node_modules/@base-ui/utils/mergeObjects.mjs
 495  function mergeObjects(a, b) {
 496    if (a && !b) {
 497      return a;
 498    }
 499    if (!a && b) {
 500      return b;
 501    }
 502    if (a || b) {
 503      return {
 504        ...a,
 505        ...b
 506      };
 507    }
 508    return void 0;
 509  }
 510  
 511  // node_modules/@base-ui/utils/empty.mjs
 512  function NOOP() {
 513  }
 514  var EMPTY_ARRAY = Object.freeze([]);
 515  var EMPTY_OBJECT = Object.freeze({});
 516  
 517  // node_modules/@base-ui/react/internals/getStateAttributesProps.mjs
 518  function getStateAttributesProps(state, customMapping) {
 519    const props = {};
 520    for (const key in state) {
 521      const value = state[key];
 522      if (customMapping?.hasOwnProperty(key)) {
 523        const customProps = customMapping[key](value);
 524        if (customProps != null) {
 525          Object.assign(props, customProps);
 526        }
 527        continue;
 528      }
 529      if (value === true) {
 530        props[`data-$key.toLowerCase()}`] = "";
 531      } else if (value) {
 532        props[`data-$key.toLowerCase()}`] = value.toString();
 533      }
 534    }
 535    return props;
 536  }
 537  
 538  // node_modules/@base-ui/react/utils/resolveClassName.mjs
 539  function resolveClassName(className, state) {
 540    return typeof className === "function" ? className(state) : className;
 541  }
 542  
 543  // node_modules/@base-ui/react/utils/resolveStyle.mjs
 544  function resolveStyle(style, state) {
 545    return typeof style === "function" ? style(state) : style;
 546  }
 547  
 548  // node_modules/@base-ui/react/merge-props/mergeProps.mjs
 549  var EMPTY_PROPS = {};
 550  function mergeProps(a, b, c, d, e) {
 551    if (!c && !d && !e && !a) {
 552      return createInitialMergedProps(b);
 553    }
 554    let merged = createInitialMergedProps(a);
 555    if (b) {
 556      merged = mergeInto(merged, b);
 557    }
 558    if (c) {
 559      merged = mergeInto(merged, c);
 560    }
 561    if (d) {
 562      merged = mergeInto(merged, d);
 563    }
 564    if (e) {
 565      merged = mergeInto(merged, e);
 566    }
 567    return merged;
 568  }
 569  function mergePropsN(props) {
 570    if (props.length === 0) {
 571      return EMPTY_PROPS;
 572    }
 573    if (props.length === 1) {
 574      return createInitialMergedProps(props[0]);
 575    }
 576    let merged = createInitialMergedProps(props[0]);
 577    for (let i = 1; i < props.length; i += 1) {
 578      merged = mergeInto(merged, props[i]);
 579    }
 580    return merged;
 581  }
 582  function createInitialMergedProps(inputProps) {
 583    if (isPropsGetter(inputProps)) {
 584      return {
 585        ...resolvePropsGetter(inputProps, EMPTY_PROPS)
 586      };
 587    }
 588    return copyInitialProps(inputProps);
 589  }
 590  function mergeInto(merged, inputProps) {
 591    if (isPropsGetter(inputProps)) {
 592      return resolvePropsGetter(inputProps, merged);
 593    }
 594    return mutablyMergeInto(merged, inputProps);
 595  }
 596  function copyInitialProps(inputProps) {
 597    const copiedProps = {
 598      ...inputProps
 599    };
 600    for (const propName in copiedProps) {
 601      const propValue = copiedProps[propName];
 602      if (isEventHandler(propName, propValue)) {
 603        copiedProps[propName] = wrapEventHandler(propValue);
 604      }
 605    }
 606    return copiedProps;
 607  }
 608  function mutablyMergeInto(mergedProps, externalProps) {
 609    if (!externalProps) {
 610      return mergedProps;
 611    }
 612    for (const propName in externalProps) {
 613      const externalPropValue = externalProps[propName];
 614      switch (propName) {
 615        case "style": {
 616          mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
 617          break;
 618        }
 619        case "className": {
 620          mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
 621          break;
 622        }
 623        default: {
 624          if (isEventHandler(propName, externalPropValue)) {
 625            mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
 626          } else {
 627            mergedProps[propName] = externalPropValue;
 628          }
 629        }
 630      }
 631    }
 632    return mergedProps;
 633  }
 634  function isEventHandler(key, value) {
 635    const code0 = key.charCodeAt(0);
 636    const code1 = key.charCodeAt(1);
 637    const code2 = key.charCodeAt(2);
 638    return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
 639  }
 640  function isPropsGetter(inputProps) {
 641    return typeof inputProps === "function";
 642  }
 643  function resolvePropsGetter(inputProps, previousProps) {
 644    if (isPropsGetter(inputProps)) {
 645      return inputProps(previousProps);
 646    }
 647    return inputProps ?? EMPTY_PROPS;
 648  }
 649  function mergeEventHandlers(ourHandler, theirHandler) {
 650    if (!theirHandler) {
 651      return ourHandler;
 652    }
 653    if (!ourHandler) {
 654      return wrapEventHandler(theirHandler);
 655    }
 656    return (...args) => {
 657      const event = args[0];
 658      if (isSyntheticEvent(event)) {
 659        const baseUIEvent = event;
 660        makeEventPreventable(baseUIEvent);
 661        const result2 = theirHandler(...args);
 662        if (!baseUIEvent.baseUIHandlerPrevented) {
 663          ourHandler?.(...args);
 664        }
 665        return result2;
 666      }
 667      const result = theirHandler(...args);
 668      ourHandler?.(...args);
 669      return result;
 670    };
 671  }
 672  function wrapEventHandler(handler) {
 673    if (!handler) {
 674      return handler;
 675    }
 676    return (...args) => {
 677      const event = args[0];
 678      if (isSyntheticEvent(event)) {
 679        makeEventPreventable(event);
 680      }
 681      return handler(...args);
 682    };
 683  }
 684  function makeEventPreventable(event) {
 685    event.preventBaseUIHandler = () => {
 686      event.baseUIHandlerPrevented = true;
 687    };
 688    return event;
 689  }
 690  function mergeClassNames(ourClassName, theirClassName) {
 691    if (theirClassName) {
 692      if (ourClassName) {
 693        return theirClassName + " " + ourClassName;
 694      }
 695      return theirClassName;
 696    }
 697    return ourClassName;
 698  }
 699  function isSyntheticEvent(event) {
 700    return event != null && typeof event === "object" && "nativeEvent" in event;
 701  }
 702  
 703  // node_modules/@base-ui/react/internals/useRenderElement.mjs
 704  var import_react = __toESM(require_react(), 1);
 705  function useRenderElement(element, componentProps, params = {}) {
 706    const renderProp = componentProps.render;
 707    const outProps = useRenderElementProps(componentProps, params);
 708    if (params.enabled === false) {
 709      return null;
 710    }
 711    const state = params.state ?? EMPTY_OBJECT;
 712    return evaluateRenderProp(element, renderProp, outProps, state);
 713  }
 714  function useRenderElementProps(componentProps, params = {}) {
 715    const {
 716      className: classNameProp,
 717      style: styleProp,
 718      render: renderProp
 719    } = componentProps;
 720    const {
 721      state = EMPTY_OBJECT,
 722      ref,
 723      props,
 724      stateAttributesMapping,
 725      enabled = true
 726    } = params;
 727    const className = enabled ? resolveClassName(classNameProp, state) : void 0;
 728    const style = enabled ? resolveStyle(styleProp, state) : void 0;
 729    const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;
 730    const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
 731    const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
 732    if (typeof document !== "undefined") {
 733      if (!enabled) {
 734        void useMergedRefs(null, null);
 735      } else if (Array.isArray(ref)) {
 736        outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
 737      } else {
 738        outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
 739      }
 740    }
 741    if (!enabled) {
 742      return EMPTY_OBJECT;
 743    }
 744    if (className !== void 0) {
 745      outProps.className = mergeClassNames(outProps.className, className);
 746    }
 747    if (style !== void 0) {
 748      outProps.style = mergeObjects(outProps.style, style);
 749    }
 750    return outProps;
 751  }
 752  function resolveRenderFunctionProps(props) {
 753    if (Array.isArray(props)) {
 754      return mergePropsN(props);
 755    }
 756    return mergeProps(void 0, props);
 757  }
 758  var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
 759  var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
 760  var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
 761  function evaluateRenderProp(element, render, props, state) {
 762    if (render) {
 763      if (typeof render === "function") {
 764        if (true) {
 765          warnIfRenderPropLooksLikeComponent(render);
 766        }
 767        return render(props, state);
 768      }
 769      const mergedProps = mergeProps(props, render.props);
 770      mergedProps.ref = props.ref;
 771      let newElement = render;
 772      if (newElement?.$$typeof === REACT_LAZY_TYPE) {
 773        const children = React6.Children.toArray(render);
 774        newElement = children[0];
 775      }
 776      if (true) {
 777        if (!/* @__PURE__ */ React6.isValidElement(newElement)) {
 778          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"));
 779        }
 780      }
 781      return /* @__PURE__ */ React6.cloneElement(newElement, mergedProps);
 782    }
 783    if (element) {
 784      if (typeof element === "string") {
 785        return renderTag(element, props);
 786      }
 787    }
 788    throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8));
 789  }
 790  function warnIfRenderPropLooksLikeComponent(renderFn) {
 791    const functionName = renderFn.name;
 792    if (functionName.length === 0) {
 793      return;
 794    }
 795    if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {
 796      return;
 797    }
 798    if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {
 799      return;
 800    }
 801    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");
 802  }
 803  function renderTag(Tag, props) {
 804    if (Tag === "button") {
 805      return /* @__PURE__ */ (0, import_react.createElement)("button", {
 806        type: "button",
 807        ...props,
 808        key: props.key
 809      });
 810    }
 811    if (Tag === "img") {
 812      return /* @__PURE__ */ (0, import_react.createElement)("img", {
 813        alt: "",
 814        ...props,
 815        key: props.key
 816      });
 817    }
 818    return /* @__PURE__ */ React6.createElement(Tag, props);
 819  }
 820  
 821  // node_modules/@base-ui/utils/useId.mjs
 822  var React7 = __toESM(require_react(), 1);
 823  var globalId = 0;
 824  function useGlobalId(idOverride, prefix = "mui") {
 825    const [defaultId, setDefaultId] = React7.useState(idOverride);
 826    const id = idOverride || defaultId;
 827    React7.useEffect(() => {
 828      if (defaultId == null) {
 829        globalId += 1;
 830        setDefaultId(`$prefix}-$globalId}`);
 831      }
 832    }, [defaultId, prefix]);
 833    return id;
 834  }
 835  var maybeReactUseId = SafeReact.useId;
 836  function useId(idOverride, prefix) {
 837    if (maybeReactUseId !== void 0) {
 838      const reactId = maybeReactUseId();
 839      return idOverride ?? (prefix ? `$prefix}-$reactId}` : reactId);
 840    }
 841    return useGlobalId(idOverride, prefix);
 842  }
 843  
 844  // node_modules/@base-ui/react/internals/useBaseUiId.mjs
 845  function useBaseUiId(idOverride) {
 846    return useId(idOverride, "base-ui");
 847  }
 848  
 849  // node_modules/@base-ui/react/internals/reason-parts.mjs
 850  var reason_parts_exports = {};
 851  __export(reason_parts_exports, {
 852    cancelOpen: () => cancelOpen,
 853    chipRemovePress: () => chipRemovePress,
 854    clearPress: () => clearPress,
 855    closePress: () => closePress,
 856    closeWatcher: () => closeWatcher,
 857    decrementPress: () => decrementPress,
 858    disabled: () => disabled,
 859    drag: () => drag,
 860    escapeKey: () => escapeKey,
 861    focusOut: () => focusOut,
 862    imperativeAction: () => imperativeAction,
 863    incrementPress: () => incrementPress,
 864    initial: () => initial,
 865    inputBlur: () => inputBlur,
 866    inputChange: () => inputChange,
 867    inputClear: () => inputClear,
 868    inputPaste: () => inputPaste,
 869    inputPress: () => inputPress,
 870    itemPress: () => itemPress,
 871    keyboard: () => keyboard,
 872    linkPress: () => linkPress,
 873    listNavigation: () => listNavigation,
 874    missing: () => missing,
 875    none: () => none,
 876    outsidePress: () => outsidePress,
 877    pointer: () => pointer,
 878    scrub: () => scrub,
 879    siblingOpen: () => siblingOpen,
 880    swipe: () => swipe,
 881    trackPress: () => trackPress,
 882    triggerFocus: () => triggerFocus,
 883    triggerHover: () => triggerHover,
 884    triggerPress: () => triggerPress,
 885    wheel: () => wheel,
 886    windowResize: () => windowResize
 887  });
 888  var none = "none";
 889  var triggerPress = "trigger-press";
 890  var triggerHover = "trigger-hover";
 891  var triggerFocus = "trigger-focus";
 892  var outsidePress = "outside-press";
 893  var itemPress = "item-press";
 894  var closePress = "close-press";
 895  var linkPress = "link-press";
 896  var clearPress = "clear-press";
 897  var chipRemovePress = "chip-remove-press";
 898  var trackPress = "track-press";
 899  var incrementPress = "increment-press";
 900  var decrementPress = "decrement-press";
 901  var inputChange = "input-change";
 902  var inputClear = "input-clear";
 903  var inputBlur = "input-blur";
 904  var inputPaste = "input-paste";
 905  var inputPress = "input-press";
 906  var focusOut = "focus-out";
 907  var escapeKey = "escape-key";
 908  var closeWatcher = "close-watcher";
 909  var listNavigation = "list-navigation";
 910  var keyboard = "keyboard";
 911  var pointer = "pointer";
 912  var drag = "drag";
 913  var wheel = "wheel";
 914  var scrub = "scrub";
 915  var cancelOpen = "cancel-open";
 916  var siblingOpen = "sibling-open";
 917  var disabled = "disabled";
 918  var missing = "missing";
 919  var initial = "initial";
 920  var imperativeAction = "imperative-action";
 921  var swipe = "swipe";
 922  var windowResize = "window-resize";
 923  
 924  // node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs
 925  function createChangeEventDetails(reason, event, trigger, customProperties) {
 926    let canceled = false;
 927    let allowPropagation = false;
 928    const custom = customProperties ?? EMPTY_OBJECT;
 929    const details = {
 930      reason,
 931      event: event ?? new Event("base-ui"),
 932      cancel() {
 933        canceled = true;
 934      },
 935      allowPropagation() {
 936        allowPropagation = true;
 937      },
 938      get isCanceled() {
 939        return canceled;
 940      },
 941      get isPropagationAllowed() {
 942        return allowPropagation;
 943      },
 944      trigger,
 945      ...custom
 946    };
 947    return details;
 948  }
 949  
 950  // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
 951  var React9 = __toESM(require_react(), 1);
 952  
 953  // node_modules/@base-ui/utils/useOnMount.mjs
 954  var React8 = __toESM(require_react(), 1);
 955  function useOnMount(fn) {
 956    React8.useEffect(fn, EMPTY_ARRAY);
 957  }
 958  
 959  // node_modules/@base-ui/utils/useAnimationFrame.mjs
 960  var EMPTY = null;
 961  var LAST_RAF = globalThis.requestAnimationFrame;
 962  var Scheduler = class {
 963    /* This implementation uses an array as a backing data-structure for frame callbacks.
 964     * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it
 965     * never calls the native `cancelAnimationFrame` if there are no frames left. This can
 966     * be much more efficient if there is a call pattern that alterns as
 967     * "request-cancel-request-cancel-…".
 968     * But in the case of "request-request-…-cancel-cancel-…", it leaves the final animation
 969     * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */
 970    callbacks = [];
 971    callbacksCount = 0;
 972    nextId = 1;
 973    startId = 1;
 974    isScheduled = false;
 975    tick = (timestamp) => {
 976      this.isScheduled = false;
 977      const currentCallbacks = this.callbacks;
 978      const currentCallbacksCount = this.callbacksCount;
 979      this.callbacks = [];
 980      this.callbacksCount = 0;
 981      this.startId = this.nextId;
 982      if (currentCallbacksCount > 0) {
 983        for (let i = 0; i < currentCallbacks.length; i += 1) {
 984          currentCallbacks[i]?.(timestamp);
 985        }
 986      }
 987    };
 988    request(fn) {
 989      const id = this.nextId;
 990      this.nextId += 1;
 991      this.callbacks.push(fn);
 992      this.callbacksCount += 1;
 993      const didRAFChange = LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);
 994      if (!this.isScheduled || didRAFChange) {
 995        requestAnimationFrame(this.tick);
 996        this.isScheduled = true;
 997      }
 998      return id;
 999    }
1000    cancel(id) {
1001      const index2 = id - this.startId;
1002      if (index2 < 0 || index2 >= this.callbacks.length) {
1003        return;
1004      }
1005      this.callbacks[index2] = null;
1006      this.callbacksCount -= 1;
1007    }
1008  };
1009  var scheduler = new Scheduler();
1010  var AnimationFrame = class _AnimationFrame {
1011    static create() {
1012      return new _AnimationFrame();
1013    }
1014    static request(fn) {
1015      return scheduler.request(fn);
1016    }
1017    static cancel(id) {
1018      return scheduler.cancel(id);
1019    }
1020    currentId = EMPTY;
1021    /**
1022     * Executes `fn` after `delay`, clearing any previously scheduled call.
1023     */
1024    request(fn) {
1025      this.cancel();
1026      this.currentId = scheduler.request(() => {
1027        this.currentId = EMPTY;
1028        fn();
1029      });
1030    }
1031    cancel = () => {
1032      if (this.currentId !== EMPTY) {
1033        scheduler.cancel(this.currentId);
1034        this.currentId = EMPTY;
1035      }
1036    };
1037    disposeEffect = () => {
1038      return this.cancel;
1039    };
1040  };
1041  function useAnimationFrame() {
1042    const timeout = useRefWithInit(AnimationFrame.create).current;
1043    useOnMount(timeout.disposeEffect);
1044    return timeout;
1045  }
1046  
1047  // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
1048  function useTransitionStatus(open, enableIdleState = false, deferEndingState = false) {
1049    const [transitionStatus, setTransitionStatus] = React9.useState(open && enableIdleState ? "idle" : void 0);
1050    const [mounted, setMounted] = React9.useState(open);
1051    if (open && !mounted) {
1052      setMounted(true);
1053      setTransitionStatus("starting");
1054    }
1055    if (!open && mounted && transitionStatus !== "ending" && !deferEndingState) {
1056      setTransitionStatus("ending");
1057    }
1058    if (!open && !mounted && transitionStatus === "ending") {
1059      setTransitionStatus(void 0);
1060    }
1061    useIsoLayoutEffect(() => {
1062      if (!open && mounted && transitionStatus !== "ending" && deferEndingState) {
1063        const frame = AnimationFrame.request(() => {
1064          setTransitionStatus("ending");
1065        });
1066        return () => {
1067          AnimationFrame.cancel(frame);
1068        };
1069      }
1070      return void 0;
1071    }, [open, mounted, transitionStatus, deferEndingState]);
1072    useIsoLayoutEffect(() => {
1073      if (!open || enableIdleState) {
1074        return void 0;
1075      }
1076      const frame = AnimationFrame.request(() => {
1077        setTransitionStatus(void 0);
1078      });
1079      return () => {
1080        AnimationFrame.cancel(frame);
1081      };
1082    }, [enableIdleState, open]);
1083    useIsoLayoutEffect(() => {
1084      if (!open || !enableIdleState) {
1085        return void 0;
1086      }
1087      if (open && mounted && transitionStatus !== "idle") {
1088        setTransitionStatus("starting");
1089      }
1090      const frame = AnimationFrame.request(() => {
1091        setTransitionStatus("idle");
1092      });
1093      return () => {
1094        AnimationFrame.cancel(frame);
1095      };
1096    }, [enableIdleState, open, mounted, transitionStatus]);
1097    return {
1098      mounted,
1099      setMounted,
1100      transitionStatus
1101    };
1102  }
1103  
1104  // node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
1105  var TransitionStatusDataAttributes = /* @__PURE__ */ (function(TransitionStatusDataAttributes2) {
1106    TransitionStatusDataAttributes2["startingStyle"] = "data-starting-style";
1107    TransitionStatusDataAttributes2["endingStyle"] = "data-ending-style";
1108    return TransitionStatusDataAttributes2;
1109  })({});
1110  var STARTING_HOOK = {
1111    "data-starting-style": ""
1112  };
1113  var ENDING_HOOK = {
1114    "data-ending-style": ""
1115  };
1116  var transitionStatusMapping = {
1117    transitionStatus(value) {
1118      if (value === "starting") {
1119        return STARTING_HOOK;
1120      }
1121      if (value === "ending") {
1122        return ENDING_HOOK;
1123      }
1124      return null;
1125    }
1126  };
1127  
1128  // node_modules/@base-ui/react/internals/use-button/useButton.mjs
1129  var React12 = __toESM(require_react(), 1);
1130  
1131  // node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
1132  function hasWindow() {
1133    return typeof window !== "undefined";
1134  }
1135  function getNodeName(node) {
1136    if (isNode(node)) {
1137      return (node.nodeName || "").toLowerCase();
1138    }
1139    return "#document";
1140  }
1141  function getWindow(node) {
1142    var _node$ownerDocument;
1143    return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1144  }
1145  function getDocumentElement(node) {
1146    var _ref;
1147    return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1148  }
1149  function isNode(value) {
1150    if (!hasWindow()) {
1151      return false;
1152    }
1153    return value instanceof Node || value instanceof getWindow(value).Node;
1154  }
1155  function isElement(value) {
1156    if (!hasWindow()) {
1157      return false;
1158    }
1159    return value instanceof Element || value instanceof getWindow(value).Element;
1160  }
1161  function isHTMLElement(value) {
1162    if (!hasWindow()) {
1163      return false;
1164    }
1165    return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1166  }
1167  function isShadowRoot(value) {
1168    if (!hasWindow() || typeof ShadowRoot === "undefined") {
1169      return false;
1170    }
1171    return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1172  }
1173  function isOverflowElement(element) {
1174    const {
1175      overflow,
1176      overflowX,
1177      overflowY,
1178      display
1179    } = getComputedStyle2(element);
1180    return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
1181  }
1182  function isTableElement(element) {
1183    return /^(table|td|th)$/.test(getNodeName(element));
1184  }
1185  function isTopLayer(element) {
1186    try {
1187      if (element.matches(":popover-open")) {
1188        return true;
1189      }
1190    } catch (_e) {
1191    }
1192    try {
1193      return element.matches(":modal");
1194    } catch (_e) {
1195      return false;
1196    }
1197  }
1198  var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
1199  var containRe = /paint|layout|strict|content/;
1200  var isNotNone = (value) => !!value && value !== "none";
1201  var isWebKitValue;
1202  function isContainingBlock(elementOrCss) {
1203    const css = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
1204    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 || "");
1205  }
1206  function getContainingBlock(element) {
1207    let currentNode = getParentNode(element);
1208    while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1209      if (isContainingBlock(currentNode)) {
1210        return currentNode;
1211      } else if (isTopLayer(currentNode)) {
1212        return null;
1213      }
1214      currentNode = getParentNode(currentNode);
1215    }
1216    return null;
1217  }
1218  function isWebKit() {
1219    if (isWebKitValue == null) {
1220      isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
1221    }
1222    return isWebKitValue;
1223  }
1224  function isLastTraversableNode(node) {
1225    return /^(html|body|#document)$/.test(getNodeName(node));
1226  }
1227  function getComputedStyle2(element) {
1228    return getWindow(element).getComputedStyle(element);
1229  }
1230  function getNodeScroll(element) {
1231    if (isElement(element)) {
1232      return {
1233        scrollLeft: element.scrollLeft,
1234        scrollTop: element.scrollTop
1235      };
1236    }
1237    return {
1238      scrollLeft: element.scrollX,
1239      scrollTop: element.scrollY
1240    };
1241  }
1242  function getParentNode(node) {
1243    if (getNodeName(node) === "html") {
1244      return node;
1245    }
1246    const result = (
1247      // Step into the shadow DOM of the parent of a slotted node.
1248      node.assignedSlot || // DOM Element detected.
1249      node.parentNode || // ShadowRoot detected.
1250      isShadowRoot(node) && node.host || // Fallback.
1251      getDocumentElement(node)
1252    );
1253    return isShadowRoot(result) ? result.host : result;
1254  }
1255  function getNearestOverflowAncestor(node) {
1256    const parentNode = getParentNode(node);
1257    if (isLastTraversableNode(parentNode)) {
1258      return (node.ownerDocument || node).body;
1259    }
1260    if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1261      return parentNode;
1262    }
1263    return getNearestOverflowAncestor(parentNode);
1264  }
1265  function getOverflowAncestors(node, list, traverseIframes) {
1266    var _node$ownerDocument2;
1267    if (list === void 0) {
1268      list = [];
1269    }
1270    if (traverseIframes === void 0) {
1271      traverseIframes = true;
1272    }
1273    const scrollableAncestor = getNearestOverflowAncestor(node);
1274    const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1275    const win = getWindow(scrollableAncestor);
1276    if (isBody) {
1277      const frameElement = getFrameElement(win);
1278      return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
1279    } else {
1280      return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1281    }
1282  }
1283  function getFrameElement(win) {
1284    return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
1285  }
1286  
1287  // node_modules/@base-ui/react/internals/composite/root/CompositeRootContext.mjs
1288  var React10 = __toESM(require_react(), 1);
1289  var CompositeRootContext = /* @__PURE__ */ React10.createContext(void 0);
1290  if (true) CompositeRootContext.displayName = "CompositeRootContext";
1291  function useCompositeRootContext(optional = false) {
1292    const context = React10.useContext(CompositeRootContext);
1293    if (context === void 0 && !optional) {
1294      throw new Error(true ? "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>." : formatErrorMessage_default(16));
1295    }
1296    return context;
1297  }
1298  
1299  // node_modules/@base-ui/react/utils/useFocusableWhenDisabled.mjs
1300  var React11 = __toESM(require_react(), 1);
1301  function useFocusableWhenDisabled(parameters) {
1302    const {
1303      focusableWhenDisabled,
1304      disabled: disabled2,
1305      composite = false,
1306      tabIndex: tabIndexProp = 0,
1307      isNativeButton
1308    } = parameters;
1309    const isFocusableComposite = composite && focusableWhenDisabled !== false;
1310    const isNonFocusableComposite = composite && focusableWhenDisabled === false;
1311    const props = React11.useMemo(() => {
1312      const additionalProps = {
1313        // allow Tabbing away from focusableWhenDisabled elements
1314        onKeyDown(event) {
1315          if (disabled2 && focusableWhenDisabled && event.key !== "Tab") {
1316            event.preventDefault();
1317          }
1318        }
1319      };
1320      if (!composite) {
1321        additionalProps.tabIndex = tabIndexProp;
1322        if (!isNativeButton && disabled2) {
1323          additionalProps.tabIndex = focusableWhenDisabled ? tabIndexProp : -1;
1324        }
1325      }
1326      if (isNativeButton && (focusableWhenDisabled || isFocusableComposite) || !isNativeButton && disabled2) {
1327        additionalProps["aria-disabled"] = disabled2;
1328      }
1329      if (isNativeButton && (!focusableWhenDisabled || isNonFocusableComposite)) {
1330        additionalProps.disabled = disabled2;
1331      }
1332      return additionalProps;
1333    }, [composite, disabled2, focusableWhenDisabled, isFocusableComposite, isNonFocusableComposite, isNativeButton, tabIndexProp]);
1334    return {
1335      props
1336    };
1337  }
1338  
1339  // node_modules/@base-ui/utils/owner.mjs
1340  function ownerDocument(node) {
1341    return node?.ownerDocument || document;
1342  }
1343  
1344  // node_modules/@base-ui/react/utils/dispatchClickWithModifiers.mjs
1345  function dispatchClickWithModifiers(target, sourceEvent, {
1346    detail = 0
1347  } = {}) {
1348    target.dispatchEvent(new (getWindow(target)).PointerEvent("click", {
1349      bubbles: true,
1350      cancelable: true,
1351      composed: true,
1352      detail,
1353      shiftKey: sourceEvent.shiftKey,
1354      ctrlKey: sourceEvent.ctrlKey,
1355      altKey: sourceEvent.altKey,
1356      metaKey: sourceEvent.metaKey
1357    }));
1358  }
1359  
1360  // node_modules/@base-ui/react/internals/use-button/useButton.mjs
1361  function useButton(parameters = {}) {
1362    const {
1363      disabled: disabled2 = false,
1364      focusableWhenDisabled,
1365      tabIndex = 0,
1366      native: isNativeButton = true,
1367      composite: compositeProp
1368    } = parameters;
1369    const elementRef = React12.useRef(null);
1370    const compositeRootContext = useCompositeRootContext(true);
1371    const isCompositeItem = compositeProp ?? compositeRootContext !== void 0;
1372    const {
1373      props: focusableWhenDisabledProps
1374    } = useFocusableWhenDisabled({
1375      focusableWhenDisabled,
1376      disabled: disabled2,
1377      composite: isCompositeItem,
1378      tabIndex,
1379      isNativeButton
1380    });
1381    if (true) {
1382      React12.useEffect(() => {
1383        if (!elementRef.current) {
1384          return;
1385        }
1386        const isButtonTag = isButtonElement(elementRef.current);
1387        if (isNativeButton) {
1388          if (!isButtonTag) {
1389            const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
1390            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`.";
1391            error(`$message}$ownerStackMessage}`);
1392          }
1393        } else if (isButtonTag) {
1394          const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
1395          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`.";
1396          error(`$message}$ownerStackMessage}`);
1397        }
1398      }, [isNativeButton]);
1399    }
1400    const updateDisabled = React12.useCallback(() => {
1401      const element = elementRef.current;
1402      if (!isButtonElement(element)) {
1403        return;
1404      }
1405      if (isCompositeItem && disabled2 && focusableWhenDisabledProps.disabled === void 0 && element.disabled) {
1406        element.disabled = false;
1407      }
1408    }, [disabled2, focusableWhenDisabledProps.disabled, isCompositeItem]);
1409    useIsoLayoutEffect(updateDisabled, [updateDisabled]);
1410    const getButtonProps = React12.useCallback((externalProps = {}) => {
1411      const {
1412        onClick: externalOnClick,
1413        onMouseDown: externalOnMouseDown,
1414        onKeyUp: externalOnKeyUp,
1415        onKeyDown: externalOnKeyDown,
1416        onPointerDown: externalOnPointerDown,
1417        ...otherExternalProps
1418      } = externalProps;
1419      return mergeProps({
1420        onClick(event) {
1421          if (disabled2) {
1422            event.preventDefault();
1423            return;
1424          }
1425          externalOnClick?.(event);
1426        },
1427        onMouseDown(event) {
1428          if (!disabled2) {
1429            externalOnMouseDown?.(event);
1430          }
1431        },
1432        onKeyDown(event) {
1433          if (disabled2) {
1434            return;
1435          }
1436          makeEventPreventable(event);
1437          externalOnKeyDown?.(event);
1438          if (event.baseUIHandlerPrevented) {
1439            return;
1440          }
1441          const isCurrentTarget = event.target === event.currentTarget;
1442          const currentTarget = event.currentTarget;
1443          const isButton = isButtonElement(currentTarget);
1444          const isLink = !isNativeButton && isValidLinkElement(currentTarget);
1445          const shouldClick = isCurrentTarget && (isNativeButton ? isButton : !isLink);
1446          const isEnterKey = event.key === "Enter";
1447          const isSpaceKey = event.key === " ";
1448          const role = currentTarget.getAttribute("role");
1449          const isTextNavigationRole = role?.startsWith("menuitem") || role === "option" || role === "gridcell";
1450          if (isCurrentTarget && isCompositeItem && isSpaceKey) {
1451            if (event.defaultPrevented && isTextNavigationRole) {
1452              return;
1453            }
1454            event.preventDefault();
1455            if (!isNativeButton || isButton) {
1456              event.preventBaseUIHandler();
1457              dispatchClickWithModifiers(currentTarget, event);
1458            }
1459            return;
1460          }
1461          if (!shouldClick || isNativeButton || !isSpaceKey && !isEnterKey) {
1462            if (isCurrentTarget && isLink && isSpaceKey) {
1463              event.preventDefault();
1464            }
1465            return;
1466          }
1467          if (event.defaultPrevented) {
1468            return;
1469          }
1470          event.preventDefault();
1471          if (isEnterKey) {
1472            event.preventBaseUIHandler();
1473            dispatchClickWithModifiers(currentTarget, event);
1474          }
1475        },
1476        onKeyUp(event) {
1477          if (disabled2) {
1478            return;
1479          }
1480          makeEventPreventable(event);
1481          externalOnKeyUp?.(event);
1482          if (event.target === event.currentTarget && isNativeButton && isCompositeItem && isButtonElement(event.currentTarget) && event.key === " ") {
1483            event.preventDefault();
1484            return;
1485          }
1486          if (event.baseUIHandlerPrevented) {
1487            return;
1488          }
1489          if (event.target === event.currentTarget && !isNativeButton && !isCompositeItem && !event.defaultPrevented && event.key === " ") {
1490            event.preventBaseUIHandler();
1491            dispatchClickWithModifiers(event.currentTarget, event);
1492          }
1493        },
1494        onPointerDown(event) {
1495          if (disabled2) {
1496            event.preventDefault();
1497            return;
1498          }
1499          externalOnPointerDown?.(event);
1500        }
1501      }, isNativeButton ? {
1502        type: "button"
1503      } : {
1504        role: "button"
1505      }, focusableWhenDisabledProps, otherExternalProps);
1506    }, [disabled2, focusableWhenDisabledProps, isCompositeItem, isNativeButton]);
1507    const buttonRef = useStableCallback((element) => {
1508      elementRef.current = element;
1509      updateDisabled();
1510    });
1511    return {
1512      getButtonProps,
1513      buttonRef
1514    };
1515  }
1516  function isButtonElement(elem) {
1517    return isHTMLElement(elem) && elem.tagName === "BUTTON";
1518  }
1519  function isValidLinkElement(elem) {
1520    return isHTMLElement(elem) && elem.tagName === "A" && Boolean(elem.href);
1521  }
1522  
1523  // node_modules/@base-ui/utils/addEventListener.mjs
1524  function addEventListener(target, type, listener, options) {
1525    target.addEventListener(type, listener, options);
1526    return () => {
1527      target.removeEventListener(type, listener, options);
1528    };
1529  }
1530  
1531  // node_modules/@base-ui/utils/useValueAsRef.mjs
1532  function useValueAsRef(value) {
1533    const latest = useRefWithInit(createLatestRef, value).current;
1534    latest.next = value;
1535    useIsoLayoutEffect(latest.effect);
1536    return latest;
1537  }
1538  function createLatestRef(value) {
1539    const latest = {
1540      current: value,
1541      next: value,
1542      effect: () => {
1543        latest.current = latest.next;
1544      }
1545    };
1546    return latest;
1547  }
1548  
1549  // node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
1550  var React13 = __toESM(require_react(), 1);
1551  
1552  // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
1553  var ReactDOM = __toESM(require_react_dom(), 1);
1554  
1555  // node_modules/@base-ui/react/utils/resolveRef.mjs
1556  function resolveRef(maybeRef) {
1557    if (maybeRef == null) {
1558      return maybeRef;
1559    }
1560    return "current" in maybeRef ? maybeRef.current : maybeRef;
1561  }
1562  
1563  // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
1564  function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false) {
1565    const frame = useAnimationFrame();
1566    return useStableCallback((fnToExecute, signal = null) => {
1567      frame.cancel();
1568      const element = resolveRef(elementOrRef);
1569      if (element == null) {
1570        return;
1571      }
1572      const resolvedElement = element;
1573      const done = () => {
1574        ReactDOM.flushSync(fnToExecute);
1575      };
1576      if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
1577        fnToExecute();
1578        return;
1579      }
1580      function exec() {
1581        Promise.all(resolvedElement.getAnimations().map((animation) => animation.finished)).then(() => {
1582          if (!signal?.aborted) {
1583            done();
1584          }
1585        }, () => {
1586          if (signal?.aborted) {
1587            return;
1588          }
1589          const currentAnimations = resolvedElement.getAnimations();
1590          if (currentAnimations.some((animation) => animation.pending || animation.playState !== "finished")) {
1591            exec();
1592            return;
1593          }
1594          done();
1595        });
1596      }
1597      if (waitForStartingStyleRemoved) {
1598        const startingStyleAttribute = "data-starting-style";
1599        if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1600          frame.request(exec);
1601          return;
1602        }
1603        const attributeObserver = new MutationObserver(() => {
1604          if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1605            attributeObserver.disconnect();
1606            exec();
1607          }
1608        });
1609        attributeObserver.observe(resolvedElement, {
1610          attributes: true,
1611          attributeFilter: [startingStyleAttribute]
1612        });
1613        signal?.addEventListener("abort", () => attributeObserver.disconnect(), {
1614          once: true
1615        });
1616        return;
1617      }
1618      frame.request(exec);
1619    });
1620  }
1621  
1622  // node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
1623  function useOpenChangeComplete(parameters) {
1624    const {
1625      enabled = true,
1626      open,
1627      ref,
1628      onComplete: onCompleteParam
1629    } = parameters;
1630    const onComplete = useStableCallback(onCompleteParam);
1631    const runOnceAnimationsFinish = useAnimationsFinished(ref, open);
1632    React13.useEffect(() => {
1633      if (!enabled) {
1634        return void 0;
1635      }
1636      const abortController = new AbortController();
1637      runOnceAnimationsFinish(onComplete, abortController.signal);
1638      return () => {
1639        abortController.abort();
1640      };
1641    }, [enabled, open, onComplete, runOnceAnimationsFinish]);
1642  }
1643  
1644  // node_modules/@base-ui/utils/platform/parts.mjs
1645  var parts_exports = {};
1646  __export(parts_exports, {
1647    engine: () => engine_exports,
1648    env: () => env_exports,
1649    os: () => os_exports,
1650    screenReader: () => screen_reader_exports
1651  });
1652  
1653  // node_modules/@base-ui/utils/platform/os.mjs
1654  var os_exports = {};
1655  __export(os_exports, {
1656    android: () => android,
1657    apple: () => apple,
1658    ios: () => ios,
1659    linux: () => linux,
1660    mac: () => mac,
1661    windows: () => windows
1662  });
1663  
1664  // node_modules/@base-ui/utils/platform/shared.mjs
1665  function readRawData() {
1666    if (typeof navigator === "undefined") {
1667      return {
1668        userAgent: "",
1669        platform: "",
1670        maxTouchPoints: 0
1671      };
1672    }
1673    if (true) {
1674      const uaData = navigator.userAgentData;
1675      if (uaData && Array.isArray(uaData.brands)) {
1676        return {
1677          userAgent: uaData.brands.map(({
1678            brand,
1679            version: version2
1680          }) => `$brand}/$version2}`).join(" "),
1681          platform: uaData.platform ?? navigator.platform ?? "",
1682          maxTouchPoints: navigator.maxTouchPoints ?? 0
1683        };
1684      }
1685    }
1686    return {
1687      userAgent: navigator.userAgent,
1688      platform: navigator.platform ?? "",
1689      maxTouchPoints: navigator.maxTouchPoints ?? 0
1690    };
1691  }
1692  var {
1693    userAgent,
1694    platform,
1695    maxTouchPoints
1696  } = readRawData();
1697  var lowerUserAgent = userAgent.toLowerCase();
1698  var lowerPlatform = platform.toLowerCase();
1699  
1700  // node_modules/@base-ui/utils/platform/os.mjs
1701  var ios = /^i(os$|p)/.test(lowerPlatform) || lowerPlatform === "macintel" && maxTouchPoints > 1;
1702  var ANDROID_STRING = "android";
1703  var android = lowerPlatform === ANDROID_STRING || lowerUserAgent.includes(ANDROID_STRING);
1704  var mac = !ios && lowerPlatform.startsWith("mac");
1705  var windows = lowerPlatform.startsWith("win");
1706  var linux = !android && /^(linux|chrome os)/.test(lowerPlatform);
1707  var apple = mac || ios;
1708  
1709  // node_modules/@base-ui/utils/platform/engine.mjs
1710  var engine_exports = {};
1711  __export(engine_exports, {
1712    blink: () => blink,
1713    gecko: () => gecko,
1714    webkit: () => webkit
1715  });
1716  var webkit = typeof CSS !== "undefined" && !!CSS.supports?.("-webkit-backdrop-filter:none");
1717  var gecko = !webkit && lowerUserAgent.includes("firefox");
1718  var blink = !webkit && lowerUserAgent.includes("chrom");
1719  
1720  // node_modules/@base-ui/utils/platform/screen-reader.mjs
1721  var screen_reader_exports = {};
1722  __export(screen_reader_exports, {
1723    voiceOver: () => voiceOver
1724  });
1725  var voiceOver = apple;
1726  
1727  // node_modules/@base-ui/utils/platform/env.mjs
1728  var env_exports = {};
1729  __export(env_exports, {
1730    jsdom: () => jsdom
1731  });
1732  var jsdom = /jsdom|happydom/.test(lowerUserAgent);
1733  
1734  // node_modules/@base-ui/utils/useTimeout.mjs
1735  var EMPTY2 = 0;
1736  var Timeout = class _Timeout {
1737    static create() {
1738      return new _Timeout();
1739    }
1740    currentId = EMPTY2;
1741    /**
1742     * Executes `fn` after `delay`, clearing any previously scheduled call.
1743     */
1744    start(delay, fn) {
1745      this.clear();
1746      this.currentId = setTimeout(() => {
1747        this.currentId = EMPTY2;
1748        fn();
1749      }, delay);
1750    }
1751    isStarted() {
1752      return this.currentId !== EMPTY2;
1753    }
1754    clear = () => {
1755      if (this.currentId !== EMPTY2) {
1756        clearTimeout(this.currentId);
1757        this.currentId = EMPTY2;
1758      }
1759    };
1760    disposeEffect = () => {
1761      return this.clear;
1762    };
1763  };
1764  function useTimeout() {
1765    const timeout = useRefWithInit(Timeout.create).current;
1766    useOnMount(timeout.disposeEffect);
1767    return timeout;
1768  }
1769  
1770  // node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
1771  var React14 = __toESM(require_react(), 1);
1772  
1773  // node_modules/@base-ui/react/floating-ui-react/utils/event.mjs
1774  function isReactEvent(event) {
1775    return "nativeEvent" in event;
1776  }
1777  function isMouseLikePointerType(pointerType, strict) {
1778    const values = ["mouse", "pen"];
1779    if (!strict) {
1780      values.push("", void 0);
1781    }
1782    return values.includes(pointerType);
1783  }
1784  function isClickLikeEvent(event) {
1785    const type = event.type;
1786    return type === "click" || type === "mousedown" || type === "keydown" || type === "keyup";
1787  }
1788  
1789  // node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs
1790  var FOCUSABLE_ATTRIBUTE = "data-base-ui-focusable";
1791  var TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
1792  
1793  // node_modules/@base-ui/react/internals/shadowDom.mjs
1794  function activeElement(doc) {
1795    let element = doc.activeElement;
1796    while (element?.shadowRoot?.activeElement != null) {
1797      element = element.shadowRoot.activeElement;
1798    }
1799    return element;
1800  }
1801  function contains(parent, child) {
1802    if (!parent || !child) {
1803      return false;
1804    }
1805    const rootNode = child.getRootNode?.();
1806    if (parent.contains(child)) {
1807      return true;
1808    }
1809    if (rootNode && isShadowRoot(rootNode)) {
1810      let next = child;
1811      while (next) {
1812        if (parent === next) {
1813          return true;
1814        }
1815        next = next.parentNode || next.host;
1816      }
1817    }
1818    return false;
1819  }
1820  function getTarget(event) {
1821    if ("composedPath" in event) {
1822      return event.composedPath()[0];
1823    }
1824    return event.target;
1825  }
1826  
1827  // node_modules/@base-ui/react/floating-ui-react/utils/element.mjs
1828  function isTargetInsideEnabledTrigger(target, triggerElements) {
1829    if (!isElement(target)) {
1830      return false;
1831    }
1832    const targetElement = target;
1833    if (triggerElements.hasElement(targetElement)) {
1834      return !targetElement.hasAttribute("data-trigger-disabled");
1835    }
1836    for (const [, trigger] of triggerElements.entries()) {
1837      if (contains(trigger, targetElement)) {
1838        return !trigger.hasAttribute("data-trigger-disabled");
1839      }
1840    }
1841    return false;
1842  }
1843  function isEventTargetWithin(event, node) {
1844    if (node == null) {
1845      return false;
1846    }
1847    if ("composedPath" in event) {
1848      return event.composedPath().includes(node);
1849    }
1850    const eventAgain = event;
1851    return eventAgain.target != null && node.contains(eventAgain.target);
1852  }
1853  function isRootElement(element) {
1854    return element.matches("html,body");
1855  }
1856  function isTypeableElement(element) {
1857    return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);
1858  }
1859  function isInteractiveElement(element) {
1860    return element?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),$TYPEABLE_SELECTOR}`) != null;
1861  }
1862  function matchesFocusVisible(element) {
1863    if (!element || parts_exports.env.jsdom) {
1864      return true;
1865    }
1866    try {
1867      return element.matches(":focus-visible");
1868    } catch (_e) {
1869      return true;
1870    }
1871  }
1872  
1873  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverShared.mjs
1874  function resolveValue(value, pointerType) {
1875    if (pointerType != null && !isMouseLikePointerType(pointerType)) {
1876      return 0;
1877    }
1878    if (typeof value === "function") {
1879      return value();
1880    }
1881    return value;
1882  }
1883  function getDelay(value, prop, pointerType) {
1884    const result = resolveValue(value, pointerType);
1885    if (typeof result === "number") {
1886      return result;
1887    }
1888    return result?.[prop];
1889  }
1890  function getRestMs(value) {
1891    if (typeof value === "function") {
1892      return value();
1893    }
1894    return value;
1895  }
1896  function isClickLikeOpenEvent(openEventType, interactedInside) {
1897    return interactedInside || openEventType === "click" || openEventType === "mousedown";
1898  }
1899  function isHoverOpenEvent(openEventType) {
1900    return openEventType?.includes("mouse") && openEventType !== "mousedown";
1901  }
1902  
1903  // node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
1904  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
1905  var FloatingDelayGroupContext = /* @__PURE__ */ React14.createContext({
1906    hasProvider: false,
1907    timeoutMs: 0,
1908    delayRef: {
1909      current: 0
1910    },
1911    initialDelayRef: {
1912      current: 0
1913    },
1914    timeout: new Timeout(),
1915    currentIdRef: {
1916      current: null
1917    },
1918    currentContextRef: {
1919      current: null
1920    }
1921  });
1922  if (true) FloatingDelayGroupContext.displayName = "FloatingDelayGroupContext";
1923  function resetDelayRef(delayRef, initialDelayRef) {
1924    delayRef.current = initialDelayRef.current;
1925  }
1926  function FloatingDelayGroup(props) {
1927    const {
1928      children,
1929      delay,
1930      timeoutMs = 0
1931    } = props;
1932    const delayRef = React14.useRef(delay);
1933    const initialDelayRef = React14.useRef(delay);
1934    const currentIdRef = React14.useRef(null);
1935    const currentContextRef = React14.useRef(null);
1936    const timeout = useTimeout();
1937    useIsoLayoutEffect(() => {
1938      initialDelayRef.current = delay;
1939      if (!currentIdRef.current) {
1940        delayRef.current = delay;
1941        return;
1942      }
1943      delayRef.current = {
1944        open: getDelay(delayRef.current, "open"),
1945        close: getDelay(delay, "close")
1946      };
1947    }, [delay, currentIdRef, delayRef, initialDelayRef]);
1948    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FloatingDelayGroupContext.Provider, {
1949      value: React14.useMemo(() => ({
1950        hasProvider: true,
1951        delayRef,
1952        initialDelayRef,
1953        currentIdRef,
1954        timeoutMs,
1955        currentContextRef,
1956        timeout
1957      }), [timeoutMs, timeout]),
1958      children
1959    });
1960  }
1961  function useDelayGroup(context, options = {
1962    open: false
1963  }) {
1964    const {
1965      open
1966    } = options;
1967    const store2 = "rootStore" in context ? context.rootStore : context;
1968    const floatingId = store2.useState("floatingId");
1969    const groupContext = React14.useContext(FloatingDelayGroupContext);
1970    const {
1971      currentIdRef,
1972      delayRef,
1973      timeoutMs,
1974      initialDelayRef,
1975      currentContextRef,
1976      hasProvider,
1977      timeout
1978    } = groupContext;
1979    const [isInstantPhase, setIsInstantPhase] = React14.useState(false);
1980    const openRef = React14.useRef(open);
1981    useIsoLayoutEffect(() => {
1982      openRef.current = open;
1983    }, [open]);
1984    useIsoLayoutEffect(() => {
1985      function unset() {
1986        currentContextRef.current?.setIsInstantPhase(false);
1987        currentIdRef.current = null;
1988        currentContextRef.current = null;
1989        delayRef.current = initialDelayRef.current;
1990        timeout.clear();
1991      }
1992      if (!currentIdRef.current) {
1993        return void 0;
1994      }
1995      if (!open && currentIdRef.current === floatingId) {
1996        setIsInstantPhase(false);
1997        if (timeoutMs) {
1998          const closingId = floatingId;
1999          timeout.start(timeoutMs, () => {
2000            if (store2.select("open") || currentIdRef.current && currentIdRef.current !== closingId) {
2001              return;
2002            }
2003            unset();
2004          });
2005          return () => {
2006            if (openRef.current || currentIdRef.current !== closingId) {
2007              timeout.clear();
2008            }
2009          };
2010        }
2011        unset();
2012      }
2013      return void 0;
2014    }, [open, floatingId, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeout, store2]);
2015    useIsoLayoutEffect(() => {
2016      if (!open) {
2017        return;
2018      }
2019      const prevContext = currentContextRef.current;
2020      const prevId = currentIdRef.current;
2021      timeout.clear();
2022      currentContextRef.current = {
2023        onOpenChange: store2.setOpen,
2024        setIsInstantPhase
2025      };
2026      currentIdRef.current = floatingId;
2027      delayRef.current = {
2028        open: 0,
2029        close: getDelay(initialDelayRef.current, "close")
2030      };
2031      if (prevId !== null && prevId !== floatingId) {
2032        setIsInstantPhase(true);
2033        prevContext?.setIsInstantPhase(true);
2034        prevContext?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.none));
2035      } else {
2036        setIsInstantPhase(false);
2037        prevContext?.setIsInstantPhase(false);
2038      }
2039    }, [open, floatingId, store2, currentIdRef, delayRef, initialDelayRef, currentContextRef, timeout]);
2040    useIsoLayoutEffect(() => {
2041      return () => {
2042        if (currentIdRef.current === floatingId) {
2043          currentContextRef.current = null;
2044          if (!openRef.current) {
2045            return;
2046          }
2047          currentIdRef.current = null;
2048          resetDelayRef(delayRef, initialDelayRef);
2049          timeout.clear();
2050        }
2051      };
2052    }, [currentContextRef, currentIdRef, delayRef, floatingId, initialDelayRef, timeout]);
2053    return React14.useMemo(() => ({
2054      hasProvider,
2055      delayRef,
2056      isInstantPhase
2057    }), [hasProvider, delayRef, isInstantPhase]);
2058  }
2059  
2060  // node_modules/@base-ui/utils/mergeCleanups.mjs
2061  function mergeCleanups(...cleanups) {
2062    return () => {
2063      for (let i = 0; i < cleanups.length; i += 1) {
2064        const cleanup = cleanups[i];
2065        if (cleanup) {
2066          cleanup();
2067        }
2068      }
2069    };
2070  }
2071  
2072  // node_modules/@base-ui/react/utils/FocusGuard.mjs
2073  var React15 = __toESM(require_react(), 1);
2074  
2075  // node_modules/@base-ui/utils/visuallyHidden.mjs
2076  var visuallyHiddenBase = {
2077    clipPath: "inset(50%)",
2078    overflow: "hidden",
2079    whiteSpace: "nowrap",
2080    border: 0,
2081    padding: 0,
2082    width: 1,
2083    height: 1,
2084    margin: -1
2085  };
2086  var visuallyHidden = {
2087    ...visuallyHiddenBase,
2088    position: "fixed",
2089    top: 0,
2090    left: 0
2091  };
2092  var visuallyHiddenInput = {
2093    ...visuallyHiddenBase,
2094    position: "absolute"
2095  };
2096  
2097  // node_modules/@base-ui/react/utils/FocusGuard.mjs
2098  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
2099  var FocusGuard = /* @__PURE__ */ React15.forwardRef(function FocusGuard2(props, ref) {
2100    const [role, setRole] = React15.useState();
2101    useIsoLayoutEffect(() => {
2102      if (parts_exports.screenReader.voiceOver && parts_exports.engine.webkit) {
2103        setRole("button");
2104      }
2105    }, []);
2106    const restProps = {
2107      tabIndex: 0,
2108      // Role is only for VoiceOver
2109      role
2110    };
2111    return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", {
2112      ...props,
2113      ref,
2114      style: visuallyHidden,
2115      "aria-hidden": role ? void 0 : true,
2116      ...restProps,
2117      "data-base-ui-focus-guard": ""
2118    });
2119  });
2120  if (true) FocusGuard.displayName = "FocusGuard";
2121  
2122  // node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
2123  var min = Math.min;
2124  var max = Math.max;
2125  var round = Math.round;
2126  var floor = Math.floor;
2127  var createCoords = (v) => ({
2128    x: v,
2129    y: v
2130  });
2131  var oppositeSideMap = {
2132    left: "right",
2133    right: "left",
2134    bottom: "top",
2135    top: "bottom"
2136  };
2137  function clamp(start, value, end) {
2138    return max(start, min(value, end));
2139  }
2140  function evaluate(value, param) {
2141    return typeof value === "function" ? value(param) : value;
2142  }
2143  function getSide(placement) {
2144    return placement.split("-")[0];
2145  }
2146  function getAlignment(placement) {
2147    return placement.split("-")[1];
2148  }
2149  function getOppositeAxis(axis) {
2150    return axis === "x" ? "y" : "x";
2151  }
2152  function getAxisLength(axis) {
2153    return axis === "y" ? "height" : "width";
2154  }
2155  function getSideAxis(placement) {
2156    const firstChar = placement[0];
2157    return firstChar === "t" || firstChar === "b" ? "y" : "x";
2158  }
2159  function getAlignmentAxis(placement) {
2160    return getOppositeAxis(getSideAxis(placement));
2161  }
2162  function getAlignmentSides(placement, rects, rtl) {
2163    if (rtl === void 0) {
2164      rtl = false;
2165    }
2166    const alignment = getAlignment(placement);
2167    const alignmentAxis = getAlignmentAxis(placement);
2168    const length = getAxisLength(alignmentAxis);
2169    let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
2170    if (rects.reference[length] > rects.floating[length]) {
2171      mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
2172    }
2173    return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
2174  }
2175  function getExpandedPlacements(placement) {
2176    const oppositePlacement = getOppositePlacement(placement);
2177    return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
2178  }
2179  function getOppositeAlignmentPlacement(placement) {
2180    return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
2181  }
2182  var lrPlacement = ["left", "right"];
2183  var rlPlacement = ["right", "left"];
2184  var tbPlacement = ["top", "bottom"];
2185  var btPlacement = ["bottom", "top"];
2186  function getSideList(side, isStart, rtl) {
2187    switch (side) {
2188      case "top":
2189      case "bottom":
2190        if (rtl) return isStart ? rlPlacement : lrPlacement;
2191        return isStart ? lrPlacement : rlPlacement;
2192      case "left":
2193      case "right":
2194        return isStart ? tbPlacement : btPlacement;
2195      default:
2196        return [];
2197    }
2198  }
2199  function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
2200    const alignment = getAlignment(placement);
2201    let list = getSideList(getSide(placement), direction === "start", rtl);
2202    if (alignment) {
2203      list = list.map((side) => side + "-" + alignment);
2204      if (flipAlignment) {
2205        list = list.concat(list.map(getOppositeAlignmentPlacement));
2206      }
2207    }
2208    return list;
2209  }
2210  function getOppositePlacement(placement) {
2211    const side = getSide(placement);
2212    return oppositeSideMap[side] + placement.slice(side.length);
2213  }
2214  function expandPaddingObject(padding) {
2215    var _padding$top, _padding$right, _padding$bottom, _padding$left;
2216    return {
2217      top: (_padding$top = padding.top) != null ? _padding$top : 0,
2218      right: (_padding$right = padding.right) != null ? _padding$right : 0,
2219      bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
2220      left: (_padding$left = padding.left) != null ? _padding$left : 0
2221    };
2222  }
2223  function getPaddingObject(padding) {
2224    return typeof padding !== "number" ? expandPaddingObject(padding) : {
2225      top: padding,
2226      right: padding,
2227      bottom: padding,
2228      left: padding
2229    };
2230  }
2231  function rectToClientRect(rect) {
2232    const {
2233      x,
2234      y,
2235      width,
2236      height
2237    } = rect;
2238    return {
2239      width,
2240      height,
2241      top: y,
2242      left: x,
2243      right: x + width,
2244      bottom: y + height,
2245      x,
2246      y
2247    };
2248  }
2249  
2250  // node_modules/@base-ui/react/floating-ui-react/utils/composite.mjs
2251  function isHiddenByStyles(styles) {
2252    return styles.visibility === "hidden" || styles.visibility === "collapse";
2253  }
2254  function isElementVisible(element, styles = element ? getComputedStyle2(element) : null) {
2255    if (!element || !element.isConnected || !styles || isHiddenByStyles(styles)) {
2256      return false;
2257    }
2258    if (typeof element.checkVisibility === "function") {
2259      return element.checkVisibility();
2260    }
2261    return styles.display !== "none" && styles.display !== "contents";
2262  }
2263  
2264  // node_modules/@base-ui/react/floating-ui-react/utils/tabbable.mjs
2265  var CANDIDATE_SELECTOR = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';
2266  function getParentElement(element) {
2267    const assignedSlot = element.assignedSlot;
2268    if (assignedSlot) {
2269      return assignedSlot;
2270    }
2271    if (element.parentElement) {
2272      return element.parentElement;
2273    }
2274    const rootNode = element.getRootNode();
2275    return isShadowRoot(rootNode) ? rootNode.host : null;
2276  }
2277  function getDetailsSummary(details) {
2278    for (const child of Array.from(details.children)) {
2279      if (getNodeName(child) === "summary") {
2280        return child;
2281      }
2282    }
2283    return null;
2284  }
2285  function isWithinOpenDetailsSummary(element, details) {
2286    const summary = getDetailsSummary(details);
2287    return !!summary && (element === summary || contains(summary, element));
2288  }
2289  function isFocusableCandidate(element) {
2290    const nodeName = element ? getNodeName(element) : "";
2291    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");
2292  }
2293  function isFocusableElement(element) {
2294    if (!isFocusableCandidate(element) || !element.isConnected || element.matches(":disabled")) {
2295      return false;
2296    }
2297    for (let current = element; current; current = getParentElement(current)) {
2298      const isAncestor = current !== element;
2299      const isSlot = getNodeName(current) === "slot";
2300      if (current.hasAttribute("inert")) {
2301        return false;
2302      }
2303      if (isAncestor && getNodeName(current) === "details" && !current.open && !isWithinOpenDetailsSummary(element, current) || current.hasAttribute("hidden") || !isSlot && !isVisibleInTabbableTree(current, isAncestor)) {
2304        return false;
2305      }
2306    }
2307    return true;
2308  }
2309  function isVisibleInTabbableTree(element, isAncestor) {
2310    const styles = getComputedStyle2(element);
2311    if (!isAncestor) {
2312      return isElementVisible(element, styles);
2313    }
2314    return styles.display !== "none";
2315  }
2316  function getTabIndex(element) {
2317    const tabIndex = element.tabIndex;
2318    if (tabIndex < 0) {
2319      const nodeName = getNodeName(element);
2320      if (nodeName === "details" || nodeName === "audio" || nodeName === "video" || isHTMLElement(element) && element.isContentEditable) {
2321        return 0;
2322      }
2323    }
2324    return tabIndex;
2325  }
2326  function getNamedRadioInput(element) {
2327    if (getNodeName(element) !== "input") {
2328      return null;
2329    }
2330    const input = element;
2331    return input.type === "radio" && input.name !== "" ? input : null;
2332  }
2333  function isTabbableRadio(element, candidates) {
2334    const input = getNamedRadioInput(element);
2335    if (!input) {
2336      return true;
2337    }
2338    const checkedRadio = candidates.find((candidate) => {
2339      const radio = getNamedRadioInput(candidate);
2340      return radio?.name === input.name && radio.form === input.form && radio.checked;
2341    });
2342    if (checkedRadio) {
2343      return checkedRadio === input;
2344    }
2345    return candidates.find((candidate) => {
2346      const radio = getNamedRadioInput(candidate);
2347      return radio?.name === input.name && radio.form === input.form;
2348    }) === input;
2349  }
2350  function getComposedChildren(container) {
2351    if (isHTMLElement(container) && getNodeName(container) === "slot") {
2352      const assignedElements = container.assignedElements({
2353        flatten: true
2354      });
2355      if (assignedElements.length > 0) {
2356        return assignedElements;
2357      }
2358    }
2359    if (isHTMLElement(container) && container.shadowRoot) {
2360      return Array.from(container.shadowRoot.children);
2361    }
2362    return Array.from(container.children);
2363  }
2364  function appendCandidates(container, list) {
2365    getComposedChildren(container).forEach((child) => {
2366      if (isFocusableCandidate(child)) {
2367        list.push(child);
2368      }
2369      appendCandidates(child, list);
2370    });
2371  }
2372  function appendMatchingElements(container, selector, list) {
2373    getComposedChildren(container).forEach((child) => {
2374      if (isHTMLElement(child) && child.matches(selector)) {
2375        list.push(child);
2376      }
2377      appendMatchingElements(child, selector, list);
2378    });
2379  }
2380  function focusable(container) {
2381    const candidates = [];
2382    appendCandidates(container, candidates);
2383    return candidates.filter(isFocusableElement);
2384  }
2385  function tabbable(container) {
2386    const candidates = focusable(container);
2387    return candidates.filter((element) => getTabIndex(element) >= 0 && isTabbableRadio(element, candidates));
2388  }
2389  function getTabbableIn(container, dir) {
2390    const list = tabbable(container);
2391    const len = list.length;
2392    if (len === 0) {
2393      return void 0;
2394    }
2395    const active = activeElement(ownerDocument(container));
2396    const index2 = list.indexOf(active);
2397    const nextIndex = index2 === -1 ? dir === 1 ? 0 : len - 1 : index2 + dir;
2398    return list[nextIndex];
2399  }
2400  function getNextTabbable(referenceElement) {
2401    return getTabbableIn(ownerDocument(referenceElement).body, 1) || referenceElement;
2402  }
2403  function getPreviousTabbable(referenceElement) {
2404    return getTabbableIn(ownerDocument(referenceElement).body, -1) || referenceElement;
2405  }
2406  function isOutsideEvent(event, container) {
2407    const containerElement = container || event.currentTarget;
2408    const relatedTarget = event.relatedTarget;
2409    return !relatedTarget || !contains(containerElement, relatedTarget);
2410  }
2411  function disableFocusInside(container) {
2412    const tabbableElements = tabbable(container);
2413    tabbableElements.forEach((element) => {
2414      element.dataset.tabindex = element.getAttribute("tabindex") || "";
2415      element.setAttribute("tabindex", "-1");
2416    });
2417  }
2418  function enableFocusInside(container) {
2419    const elements = [];
2420    appendMatchingElements(container, "[data-tabindex]", elements);
2421    elements.forEach((element) => {
2422      const tabindex = element.dataset.tabindex;
2423      delete element.dataset.tabindex;
2424      if (tabindex) {
2425        element.setAttribute("tabindex", tabindex);
2426      } else {
2427        element.removeAttribute("tabindex");
2428      }
2429    });
2430  }
2431  
2432  // node_modules/@base-ui/react/floating-ui-react/utils/nodes.mjs
2433  function getNodeChildren(nodes, id, onlyOpenChildren = true) {
2434    const directChildren = nodes.filter((node) => node.parentId === id);
2435    return directChildren.flatMap((child) => [...!onlyOpenChildren || child.context?.open ? [child] : [], ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);
2436  }
2437  
2438  // node_modules/@base-ui/react/floating-ui-react/utils/createAttribute.mjs
2439  function createAttribute(name) {
2440    return `data-base-ui-$name}`;
2441  }
2442  
2443  // node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
2444  var React16 = __toESM(require_react(), 1);
2445  var ReactDOM2 = __toESM(require_react_dom(), 1);
2446  
2447  // node_modules/@base-ui/react/internals/constants.mjs
2448  var DISABLED_TRANSITIONS_STYLE = {
2449    style: {
2450      transition: "none"
2451    }
2452  };
2453  var BASE_UI_SWIPE_IGNORE_ATTRIBUTE = "data-base-ui-swipe-ignore";
2454  var LEGACY_SWIPE_IGNORE_ATTRIBUTE = "data-swipe-ignore";
2455  var BASE_UI_SWIPE_IGNORE_SELECTOR = `[$BASE_UI_SWIPE_IGNORE_ATTRIBUTE}]`;
2456  var LEGACY_SWIPE_IGNORE_SELECTOR = `[$LEGACY_SWIPE_IGNORE_ATTRIBUTE}]`;
2457  var POPUP_COLLISION_AVOIDANCE = {
2458    fallbackAxisSide: "end"
2459  };
2460  var ownerVisuallyHidden = {
2461    clipPath: "inset(50%)",
2462    position: "fixed",
2463    top: 0,
2464    left: 0
2465  };
2466  
2467  // node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
2468  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
2469  var PortalContext = /* @__PURE__ */ React16.createContext(null);
2470  if (true) PortalContext.displayName = "PortalContext";
2471  var usePortalContext = () => React16.useContext(PortalContext);
2472  var attr = createAttribute("portal");
2473  function useFloatingPortalNode(props = {}) {
2474    const {
2475      ref,
2476      container: containerProp,
2477      componentProps = EMPTY_OBJECT,
2478      elementProps
2479    } = props;
2480    const uniqueId = useId();
2481    const portalContext = usePortalContext();
2482    const parentPortalNode = portalContext?.portalNode;
2483    const [containerElement, setContainerElement] = React16.useState(null);
2484    const [portalNode, setPortalNode] = React16.useState(null);
2485    const setPortalNodeRef = useStableCallback((node) => {
2486      if (node !== null) {
2487        setPortalNode(node);
2488      }
2489    });
2490    const containerRef = React16.useRef(null);
2491    useIsoLayoutEffect(() => {
2492      if (containerProp === null) {
2493        if (containerRef.current) {
2494          containerRef.current = null;
2495          setPortalNode(null);
2496          setContainerElement(null);
2497        }
2498        return;
2499      }
2500      const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;
2501      if (resolvedContainer == null) {
2502        if (containerRef.current) {
2503          containerRef.current = null;
2504          setPortalNode(null);
2505          setContainerElement(null);
2506        }
2507        return;
2508      }
2509      if (containerRef.current !== resolvedContainer) {
2510        containerRef.current = resolvedContainer;
2511        setPortalNode(null);
2512        setContainerElement(resolvedContainer);
2513      }
2514    }, [containerProp, parentPortalNode]);
2515    const portalElement = useRenderElement("div", componentProps, {
2516      ref: [ref, setPortalNodeRef],
2517      props: [{
2518        id: uniqueId,
2519        [attr]: ""
2520      }, elementProps]
2521    });
2522    const portalSubtree = containerElement && portalElement ? /* @__PURE__ */ ReactDOM2.createPortal(portalElement, containerElement) : null;
2523    return {
2524      node: portalNode,
2525      // `id` and `render` props can override or remove the generated ID. Use the exact
2526      // rendered value so `aria-owns` never points at an ID absent from the DOM.
2527      nodeId: /* @__PURE__ */ React16.isValidElement(portalElement) ? portalElement.props.id : void 0,
2528      subtree: portalSubtree
2529    };
2530  }
2531  var FloatingPortal = /* @__PURE__ */ React16.forwardRef(function FloatingPortal2(componentProps, forwardedRef) {
2532    const {
2533      render,
2534      className,
2535      style,
2536      children,
2537      container,
2538      ...elementProps
2539    } = componentProps;
2540    const {
2541      node: portalNode,
2542      nodeId: portalNodeId,
2543      subtree: portalSubtree
2544    } = useFloatingPortalNode({
2545      container,
2546      ref: forwardedRef,
2547      componentProps,
2548      elementProps
2549    });
2550    const beforeOutsideRef = React16.useRef(null);
2551    const afterOutsideRef = React16.useRef(null);
2552    const beforeInsideRef = React16.useRef(null);
2553    const afterInsideRef = React16.useRef(null);
2554    const [focusManagerState, setFocusManagerState] = React16.useState(null);
2555    const focusInsideDisabledRef = React16.useRef(false);
2556    const modal = focusManagerState?.modal;
2557    const open = focusManagerState?.open;
2558    const shouldRenderGuards = !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode;
2559    React16.useEffect(() => {
2560      if (!portalNode || modal) {
2561        return void 0;
2562      }
2563      function onFocus(event) {
2564        if (portalNode && event.relatedTarget && isOutsideEvent(event)) {
2565          if (event.type === "focusin") {
2566            if (focusInsideDisabledRef.current) {
2567              enableFocusInside(portalNode);
2568              focusInsideDisabledRef.current = false;
2569            }
2570          } else {
2571            disableFocusInside(portalNode);
2572            focusInsideDisabledRef.current = true;
2573          }
2574        }
2575      }
2576      return mergeCleanups(addEventListener(portalNode, "focusin", onFocus, true), addEventListener(portalNode, "focusout", onFocus, true));
2577    }, [portalNode, modal]);
2578    useIsoLayoutEffect(() => {
2579      if (!portalNode || open !== true || !focusInsideDisabledRef.current) {
2580        return;
2581      }
2582      enableFocusInside(portalNode);
2583      focusInsideDisabledRef.current = false;
2584    }, [open, portalNode]);
2585    const portalContextValue = React16.useMemo(() => ({
2586      beforeOutsideRef,
2587      afterOutsideRef,
2588      beforeInsideRef,
2589      afterInsideRef,
2590      portalNode,
2591      setFocusManagerState
2592    }), [portalNode]);
2593    return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(React16.Fragment, {
2594      children: [portalSubtree, /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(PortalContext.Provider, {
2595        value: portalContextValue,
2596        children: [shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FocusGuard, {
2597          "data-type": "outside",
2598          ref: beforeOutsideRef,
2599          onFocus: (event) => {
2600            if (isOutsideEvent(event, portalNode)) {
2601              beforeInsideRef.current?.focus();
2602            } else {
2603              const domReference = focusManagerState ? focusManagerState.domReference : null;
2604              const prevTabbable = getPreviousTabbable(domReference);
2605              prevTabbable?.focus();
2606            }
2607          }
2608        }), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", {
2609          "aria-owns": portalNodeId,
2610          style: ownerVisuallyHidden
2611        }), portalNode && /* @__PURE__ */ ReactDOM2.createPortal(children, portalNode), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FocusGuard, {
2612          "data-type": "outside",
2613          ref: afterOutsideRef,
2614          onFocus: (event) => {
2615            if (isOutsideEvent(event, portalNode)) {
2616              afterInsideRef.current?.focus();
2617            } else {
2618              const domReference = focusManagerState ? focusManagerState.domReference : null;
2619              const nextTabbable = getNextTabbable(domReference);
2620              nextTabbable?.focus();
2621              if (focusManagerState?.closeOnFocusOut) {
2622                focusManagerState?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.focusOut, event.nativeEvent));
2623              }
2624            }
2625          }
2626        })]
2627      })]
2628    });
2629  });
2630  if (true) FloatingPortal.displayName = "FloatingPortal";
2631  
2632  // node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
2633  var React17 = __toESM(require_react(), 1);
2634  
2635  // node_modules/@base-ui/react/floating-ui-react/utils/createEventEmitter.mjs
2636  function createEventEmitter() {
2637    const map = /* @__PURE__ */ new Map();
2638    return {
2639      emit(event, data) {
2640        map.get(event)?.forEach((listener) => listener(data));
2641      },
2642      on(event, listener) {
2643        if (!map.has(event)) {
2644          map.set(event, /* @__PURE__ */ new Set());
2645        }
2646        map.get(event).add(listener);
2647      },
2648      off(event, listener) {
2649        map.get(event)?.delete(listener);
2650      }
2651    };
2652  }
2653  
2654  // node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
2655  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
2656  var FloatingNodeContext = /* @__PURE__ */ React17.createContext(null);
2657  if (true) FloatingNodeContext.displayName = "FloatingNodeContext";
2658  var FloatingTreeContext = /* @__PURE__ */ React17.createContext(null);
2659  if (true) FloatingTreeContext.displayName = "FloatingTreeContext";
2660  var useFloatingParentNodeId = () => React17.useContext(FloatingNodeContext)?.id || null;
2661  var useFloatingTree = (externalTree) => {
2662    const contextTree = React17.useContext(FloatingTreeContext);
2663    return externalTree ?? contextTree;
2664  };
2665  
2666  // node_modules/@base-ui/react/floating-ui-react/hooks/useClientPoint.mjs
2667  var React18 = __toESM(require_react(), 1);
2668  function createVirtualElement(domElement, data) {
2669    let offsetX = null;
2670    let offsetY = null;
2671    let isAutoUpdateEvent = false;
2672    return {
2673      contextElement: domElement || void 0,
2674      getBoundingClientRect() {
2675        const domRect = domElement?.getBoundingClientRect() || {
2676          width: 0,
2677          height: 0,
2678          x: 0,
2679          y: 0
2680        };
2681        const isXAxis = data.axis === "x" || data.axis === "both";
2682        const isYAxis = data.axis === "y" || data.axis === "both";
2683        const canTrackCursorOnAutoUpdate = ["mouseenter", "mousemove"].includes(data.dataRef.current.openEvent?.type || "") && data.pointerType !== "touch";
2684        let width = domRect.width;
2685        let height = domRect.height;
2686        let x = domRect.x;
2687        let y = domRect.y;
2688        if (offsetX == null && data.x && isXAxis) {
2689          offsetX = domRect.x - data.x;
2690        }
2691        if (offsetY == null && data.y && isYAxis) {
2692          offsetY = domRect.y - data.y;
2693        }
2694        x -= offsetX || 0;
2695        y -= offsetY || 0;
2696        width = 0;
2697        height = 0;
2698        if (!isAutoUpdateEvent || canTrackCursorOnAutoUpdate) {
2699          width = data.axis === "y" ? domRect.width : 0;
2700          height = data.axis === "x" ? domRect.height : 0;
2701          x = isXAxis && data.x != null ? data.x : x;
2702          y = isYAxis && data.y != null ? data.y : y;
2703        } else if (isAutoUpdateEvent && !canTrackCursorOnAutoUpdate) {
2704          height = data.axis === "x" ? domRect.height : height;
2705          width = data.axis === "y" ? domRect.width : width;
2706        }
2707        isAutoUpdateEvent = true;
2708        return {
2709          width,
2710          height,
2711          x,
2712          y,
2713          top: y,
2714          right: x + width,
2715          bottom: y + height,
2716          left: x
2717        };
2718      }
2719    };
2720  }
2721  function isMouseBasedEvent(event) {
2722    return event != null && event.clientX != null;
2723  }
2724  function useClientPoint(context, props = {}) {
2725    const {
2726      enabled = true,
2727      axis = "both"
2728    } = props;
2729    const store2 = "rootStore" in context ? context.rootStore : context;
2730    const open = store2.useState("open");
2731    const floating = store2.useState("floatingElement");
2732    const domReference = store2.useState("domReferenceElement");
2733    const dataRef = store2.context.dataRef;
2734    const initialRef = React18.useRef(false);
2735    const cleanupListenerRef = React18.useRef(null);
2736    const [pointerType, setPointerType] = React18.useState();
2737    const [reactive, setReactive] = React18.useState([]);
2738    const resetReference = useStableCallback((reference2) => {
2739      store2.set("positionReference", reference2);
2740    });
2741    const setReference = useStableCallback((newX, newY, referenceElement) => {
2742      if (initialRef.current) {
2743        return;
2744      }
2745      if (dataRef.current.openEvent && !isMouseBasedEvent(dataRef.current.openEvent)) {
2746        return;
2747      }
2748      store2.set("positionReference", createVirtualElement(referenceElement ?? domReference, {
2749        x: newX,
2750        y: newY,
2751        axis,
2752        dataRef,
2753        pointerType
2754      }));
2755    });
2756    const handleReferenceEnterOrMove = useStableCallback((event) => {
2757      if (!open) {
2758        setReference(event.clientX, event.clientY, event.currentTarget);
2759      } else if (!cleanupListenerRef.current) {
2760        setReference(event.clientX, event.clientY, event.currentTarget);
2761        setReactive([]);
2762      }
2763    });
2764    const openCheck = isMouseLikePointerType(pointerType) ? floating : open;
2765    React18.useEffect(() => {
2766      if (!enabled) {
2767        resetReference(domReference);
2768        return void 0;
2769      }
2770      if (!openCheck) {
2771        return void 0;
2772      }
2773      function cleanupListener() {
2774        cleanupListenerRef.current?.();
2775        cleanupListenerRef.current = null;
2776      }
2777      const win = getWindow(floating);
2778      function handleMouseMove(event) {
2779        const target = getTarget(event);
2780        if (!contains(floating, target)) {
2781          setReference(event.clientX, event.clientY);
2782        } else {
2783          cleanupListener();
2784        }
2785      }
2786      if (!dataRef.current.openEvent || isMouseBasedEvent(dataRef.current.openEvent)) {
2787        cleanupListenerRef.current = addEventListener(win, "mousemove", handleMouseMove);
2788      } else {
2789        resetReference(domReference);
2790      }
2791      return cleanupListener;
2792    }, [openCheck, enabled, floating, dataRef, domReference, store2, setReference, resetReference, reactive]);
2793    React18.useEffect(() => () => {
2794      store2.set("positionReference", null);
2795    }, [store2]);
2796    React18.useEffect(() => {
2797      if (enabled && !floating) {
2798        initialRef.current = false;
2799      }
2800    }, [enabled, floating]);
2801    React18.useEffect(() => {
2802      if (!enabled && open) {
2803        initialRef.current = true;
2804      }
2805    }, [enabled, open]);
2806    const reference = React18.useMemo(() => {
2807      function setPointerTypeRef(event) {
2808        setPointerType(event.pointerType);
2809      }
2810      return {
2811        onPointerDown: setPointerTypeRef,
2812        onPointerEnter: setPointerTypeRef,
2813        onMouseMove: handleReferenceEnterOrMove,
2814        onMouseEnter: handleReferenceEnterOrMove
2815      };
2816    }, [handleReferenceEnterOrMove]);
2817    return React18.useMemo(() => enabled ? {
2818      reference,
2819      trigger: reference
2820    } : {}, [enabled, reference]);
2821  }
2822  
2823  // node_modules/@base-ui/react/floating-ui-react/hooks/useDismiss.mjs
2824  var React19 = __toESM(require_react(), 1);
2825  function alwaysFalse() {
2826    return false;
2827  }
2828  function normalizeProp(normalizable) {
2829    return {
2830      escapeKey: typeof normalizable === "boolean" ? normalizable : normalizable?.escapeKey ?? false,
2831      outsidePress: typeof normalizable === "boolean" ? normalizable : normalizable?.outsidePress ?? true
2832    };
2833  }
2834  function useDismiss(context, props = {}) {
2835    const {
2836      enabled = true,
2837      escapeKey: escapeKey2 = true,
2838      outsidePress: outsidePressProp = true,
2839      outsidePressEvent = "sloppy",
2840      referencePress = alwaysFalse,
2841      bubbles,
2842      externalTree
2843    } = props;
2844    const store2 = "rootStore" in context ? context.rootStore : context;
2845    const open = store2.useState("open");
2846    const floatingElement = store2.useState("floatingElement");
2847    const {
2848      dataRef
2849    } = store2.context;
2850    const tree = useFloatingTree(externalTree);
2851    const outsidePressFn = useStableCallback(typeof outsidePressProp === "function" ? outsidePressProp : () => false);
2852    const outsidePress2 = typeof outsidePressProp === "function" ? outsidePressFn : outsidePressProp;
2853    const outsidePressEnabled = outsidePress2 !== false;
2854    const getOutsidePressEventProp = useStableCallback(() => outsidePressEvent);
2855    const {
2856      escapeKey: escapeKeyBubbles,
2857      outsidePress: outsidePressBubbles
2858    } = normalizeProp(bubbles);
2859    const pressStartedInsideRef = React19.useRef(false);
2860    const pressStartPreventedRef = React19.useRef(false);
2861    const suppressNextOutsideClickRef = React19.useRef(false);
2862    const isComposingRef = React19.useRef(false);
2863    const currentPointerTypeRef = React19.useRef("");
2864    const touchStateRef = React19.useRef(null);
2865    const cancelDismissOnEndTimeout = useTimeout();
2866    const clearInsideReactTreeTimeout = useTimeout();
2867    const clearInsideReactTree = useStableCallback(() => {
2868      clearInsideReactTreeTimeout.clear();
2869      dataRef.current.insideReactTree = false;
2870    });
2871    const hasBlockingChild = useStableCallback((bubbleKey) => {
2872      const nodeId = dataRef.current.floatingContext?.nodeId;
2873      const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];
2874      return children.some((child) => child.context?.open && !child.context.dataRef.current[bubbleKey]);
2875    });
2876    const isEventWithinOwnElements = useStableCallback((event) => {
2877      return isEventTargetWithin(event, store2.select("floatingElement")) || isEventTargetWithin(event, store2.select("domReferenceElement"));
2878    });
2879    const closeOnReferencePress = useStableCallback((event) => {
2880      if (!referencePress()) {
2881        return;
2882      }
2883      store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent));
2884    });
2885    const closeOnEscapeKeyDown = useStableCallback((event) => {
2886      if (!open || !enabled || !escapeKey2 || event.key !== "Escape") {
2887        return;
2888      }
2889      if (isComposingRef.current) {
2890        return;
2891      }
2892      if (!escapeKeyBubbles && hasBlockingChild("__escapeKeyBubbles")) {
2893        return;
2894      }
2895      const native = isReactEvent(event) ? event.nativeEvent : event;
2896      const eventDetails = createChangeEventDetails(reason_parts_exports.escapeKey, native);
2897      store2.setOpen(false, eventDetails);
2898      if (!eventDetails.isCanceled) {
2899        event.preventDefault();
2900      }
2901      if (!escapeKeyBubbles && !eventDetails.isPropagationAllowed) {
2902        event.stopPropagation();
2903      }
2904    });
2905    const markInsideReactTree = useStableCallback(() => {
2906      dataRef.current.insideReactTree = true;
2907      clearInsideReactTreeTimeout.start(0, clearInsideReactTree);
2908    });
2909    const markPressStartedInsideReactTree = useStableCallback((event) => {
2910      if (!open || !enabled || event.button !== 0) {
2911        return;
2912      }
2913      const target = getTarget(event.nativeEvent);
2914      if (!contains(store2.select("floatingElement"), target)) {
2915        return;
2916      }
2917      if (!pressStartedInsideRef.current) {
2918        pressStartedInsideRef.current = true;
2919        pressStartPreventedRef.current = false;
2920      }
2921    });
2922    const markInsidePressStartPrevented = useStableCallback((event) => {
2923      if (!open || !enabled) {
2924        return;
2925      }
2926      if (!(event.defaultPrevented || event.nativeEvent.defaultPrevented)) {
2927        return;
2928      }
2929      if (pressStartedInsideRef.current) {
2930        pressStartPreventedRef.current = true;
2931      }
2932    });
2933    React19.useEffect(() => {
2934      if (!open || !enabled) {
2935        return clearInsideReactTree;
2936      }
2937      dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;
2938      dataRef.current.__outsidePressBubbles = outsidePressBubbles;
2939      const compositionTimeout = new Timeout();
2940      const preventedPressSuppressionTimeout = new Timeout();
2941      function handleCompositionStart() {
2942        compositionTimeout.clear();
2943        isComposingRef.current = true;
2944      }
2945      function handleCompositionEnd() {
2946        compositionTimeout.start(
2947          // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
2948          // Only apply to WebKit for the test to remain 0ms.
2949          parts_exports.engine.webkit ? 5 : 0,
2950          () => {
2951            isComposingRef.current = false;
2952          }
2953        );
2954      }
2955      function suppressImmediateOutsideClickAfterPreventedStart() {
2956        suppressNextOutsideClickRef.current = true;
2957        preventedPressSuppressionTimeout.start(0, () => {
2958          suppressNextOutsideClickRef.current = false;
2959        });
2960      }
2961      function resetPressStartState() {
2962        pressStartedInsideRef.current = false;
2963        pressStartPreventedRef.current = false;
2964      }
2965      function getOutsidePressEvent() {
2966        const type = currentPointerTypeRef.current;
2967        const computedType = type === "pen" || !type ? "mouse" : type;
2968        const outsidePressEventValue = getOutsidePressEventProp();
2969        const resolved = typeof outsidePressEventValue === "function" ? outsidePressEventValue() : outsidePressEventValue;
2970        if (typeof resolved === "string") {
2971          return resolved;
2972        }
2973        return resolved[computedType];
2974      }
2975      function shouldIgnoreEvent(event) {
2976        const computedOutsidePressEvent = getOutsidePressEvent();
2977        return computedOutsidePressEvent === "intentional" && event.type !== "click" || computedOutsidePressEvent === "sloppy" && event.type === "click";
2978      }
2979      function isEventWithinFloatingTree(event) {
2980        const nodeId = dataRef.current.floatingContext?.nodeId;
2981        const targetIsInsideChildren = tree && getNodeChildren(tree.nodesRef.current, nodeId).some((node) => isEventTargetWithin(event, node.context?.elements.floating));
2982        return isEventWithinOwnElements(event) || targetIsInsideChildren;
2983      }
2984      function closeOnPressOutside(event) {
2985        if (shouldIgnoreEvent(event)) {
2986          if (event.type !== "click" && !isEventWithinOwnElements(event)) {
2987            preventedPressSuppressionTimeout.clear();
2988            suppressNextOutsideClickRef.current = false;
2989          }
2990          clearInsideReactTree();
2991          return;
2992        }
2993        if (dataRef.current.insideReactTree) {
2994          clearInsideReactTree();
2995          return;
2996        }
2997        const target = getTarget(event);
2998        const inertSelector = `[$createAttribute("inert")}]`;
2999        const targetRoot = isElement(target) ? target.getRootNode() : null;
3000        const markers = Array.from((isShadowRoot(targetRoot) ? targetRoot : ownerDocument(store2.select("floatingElement"))).querySelectorAll(inertSelector));
3001        const triggers = store2.context.triggerElements;
3002        if (target && (triggers.hasElement(target) || triggers.hasMatchingElement((trigger) => contains(trigger, target)))) {
3003          return;
3004        }
3005        let targetRootAncestor = isElement(target) ? target : null;
3006        while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {
3007          const nextParent = getParentNode(targetRootAncestor);
3008          if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {
3009            break;
3010          }
3011          targetRootAncestor = nextParent;
3012        }
3013        if (markers.length && isElement(target) && !isRootElement(target) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
3014        !contains(target, store2.select("floatingElement")) && // If the target root element contains none of the markers, then the
3015        // element was injected after the floating element rendered.
3016        markers.every((marker) => !contains(targetRootAncestor, marker))) {
3017          return;
3018        }
3019        if (isHTMLElement(target) && !("touches" in event)) {
3020          const lastTraversableNode = isLastTraversableNode(target);
3021          const style = getComputedStyle2(target);
3022          const scrollRe = /auto|scroll/;
3023          const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);
3024          const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);
3025          const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;
3026          const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;
3027          const isRTL3 = style.direction === "rtl";
3028          const pressedVerticalScrollbar = canScrollY && (isRTL3 ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);
3029          const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;
3030          if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {
3031            return;
3032          }
3033        }
3034        if (isEventWithinFloatingTree(event)) {
3035          return;
3036        }
3037        if (getOutsidePressEvent() === "intentional" && suppressNextOutsideClickRef.current) {
3038          preventedPressSuppressionTimeout.clear();
3039          suppressNextOutsideClickRef.current = false;
3040          return;
3041        }
3042        if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
3043          return;
3044        }
3045        if (hasBlockingChild("__outsidePressBubbles")) {
3046          return;
3047        }
3048        store2.setOpen(false, createChangeEventDetails(reason_parts_exports.outsidePress, event));
3049        clearInsideReactTree();
3050      }
3051      function handlePointerDown(event) {
3052        if (getOutsidePressEvent() !== "sloppy" || event.pointerType === "touch" || !store2.select("open") || !enabled || isEventWithinOwnElements(event)) {
3053          return;
3054        }
3055        closeOnPressOutside(event);
3056      }
3057      function handleTouchStart(event) {
3058        if (getOutsidePressEvent() !== "sloppy" || !store2.select("open") || !enabled || isEventWithinOwnElements(event)) {
3059          return;
3060        }
3061        const touch = event.touches[0];
3062        if (touch) {
3063          touchStateRef.current = {
3064            startTime: Date.now(),
3065            startX: touch.clientX,
3066            startY: touch.clientY,
3067            dismissOnTouchEnd: false,
3068            dismissOnMouseDown: true
3069          };
3070          cancelDismissOnEndTimeout.start(1e3, () => {
3071            if (touchStateRef.current) {
3072              touchStateRef.current.dismissOnTouchEnd = false;
3073              touchStateRef.current.dismissOnMouseDown = false;
3074            }
3075          });
3076        }
3077      }
3078      function addTargetEventListenerOnce(event, listener) {
3079        const target = getTarget(event);
3080        if (!target) {
3081          return;
3082        }
3083        const unsubscribe2 = addEventListener(target, event.type, () => {
3084          listener(event);
3085          unsubscribe2();
3086        });
3087      }
3088      function handleTouchStartCapture(event) {
3089        currentPointerTypeRef.current = "touch";
3090        addTargetEventListenerOnce(event, handleTouchStart);
3091      }
3092      function closeOnPressOutsideCapture(event) {
3093        cancelDismissOnEndTimeout.clear();
3094        if (event.type === "pointerdown") {
3095          currentPointerTypeRef.current = event.pointerType;
3096        }
3097        if (event.type === "mousedown" && touchStateRef.current && !touchStateRef.current.dismissOnMouseDown) {
3098          return;
3099        }
3100        addTargetEventListenerOnce(event, (targetEvent) => {
3101          if (targetEvent.type === "pointerdown") {
3102            handlePointerDown(targetEvent);
3103          } else {
3104            closeOnPressOutside(targetEvent);
3105          }
3106        });
3107      }
3108      function handlePressEndCapture(event) {
3109        if (!pressStartedInsideRef.current) {
3110          return;
3111        }
3112        const pressStartedInsideDefaultPrevented = pressStartPreventedRef.current;
3113        resetPressStartState();
3114        if (getOutsidePressEvent() !== "intentional") {
3115          return;
3116        }
3117        if (event.type === "pointercancel") {
3118          if (pressStartedInsideDefaultPrevented) {
3119            suppressImmediateOutsideClickAfterPreventedStart();
3120          }
3121          return;
3122        }
3123        if (isEventWithinFloatingTree(event)) {
3124          return;
3125        }
3126        if (pressStartedInsideDefaultPrevented) {
3127          suppressImmediateOutsideClickAfterPreventedStart();
3128          return;
3129        }
3130        if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
3131          return;
3132        }
3133        preventedPressSuppressionTimeout.clear();
3134        suppressNextOutsideClickRef.current = true;
3135        clearInsideReactTree();
3136      }
3137      function handleTouchMove(event) {
3138        if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
3139          return;
3140        }
3141        const touch = event.touches[0];
3142        if (!touch) {
3143          return;
3144        }
3145        const deltaX = Math.abs(touch.clientX - touchStateRef.current.startX);
3146        const deltaY = Math.abs(touch.clientY - touchStateRef.current.startY);
3147        const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
3148        if (distance > 5) {
3149          touchStateRef.current.dismissOnTouchEnd = true;
3150        }
3151        if (distance > 10) {
3152          closeOnPressOutside(event);
3153          cancelDismissOnEndTimeout.clear();
3154          touchStateRef.current = null;
3155        }
3156      }
3157      function handleTouchMoveCapture(event) {
3158        addTargetEventListenerOnce(event, handleTouchMove);
3159      }
3160      function handleTouchEnd(event) {
3161        if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
3162          return;
3163        }
3164        if (touchStateRef.current.dismissOnTouchEnd) {
3165          closeOnPressOutside(event);
3166        }
3167        cancelDismissOnEndTimeout.clear();
3168        touchStateRef.current = null;
3169      }
3170      function handleTouchEndCapture(event) {
3171        addTargetEventListenerOnce(event, handleTouchEnd);
3172      }
3173      const doc = ownerDocument(floatingElement);
3174      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)));
3175      return () => {
3176        unsubscribe();
3177        compositionTimeout.clear();
3178        preventedPressSuppressionTimeout.clear();
3179        resetPressStartState();
3180        suppressNextOutsideClickRef.current = false;
3181        clearInsideReactTree();
3182      };
3183    }, [dataRef, floatingElement, escapeKey2, outsidePressEnabled, outsidePress2, open, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, clearInsideReactTree, getOutsidePressEventProp, hasBlockingChild, isEventWithinOwnElements, tree, store2, cancelDismissOnEndTimeout]);
3184    const reference = React19.useMemo(() => ({
3185      onKeyDown: closeOnEscapeKeyDown,
3186      onPointerDown: closeOnReferencePress,
3187      onClick: closeOnReferencePress
3188    }), [closeOnEscapeKeyDown, closeOnReferencePress]);
3189    const floating = React19.useMemo(() => ({
3190      onKeyDown: closeOnEscapeKeyDown,
3191      // `onMouseDown` may be blocked if `event.preventDefault()` is called in
3192      // `onPointerDown`, such as with <NumberField.ScrubArea>.
3193      // See https://github.com/mui/base-ui/pull/3379
3194      onPointerDown: markInsidePressStartPrevented,
3195      onMouseDown: markInsidePressStartPrevented,
3196      onClickCapture: markInsideReactTree,
3197      onMouseDownCapture(event) {
3198        markInsideReactTree();
3199        markPressStartedInsideReactTree(event);
3200      },
3201      onPointerDownCapture(event) {
3202        markInsideReactTree();
3203        markPressStartedInsideReactTree(event);
3204      },
3205      onMouseUpCapture: markInsideReactTree,
3206      onTouchEndCapture: markInsideReactTree,
3207      onTouchMoveCapture: markInsideReactTree
3208    }), [closeOnEscapeKeyDown, markInsideReactTree, markPressStartedInsideReactTree, markInsidePressStartPrevented]);
3209    return React19.useMemo(() => enabled ? {
3210      reference,
3211      floating,
3212      trigger: reference
3213    } : {}, [enabled, reference, floating]);
3214  }
3215  
3216  // node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
3217  var React27 = __toESM(require_react(), 1);
3218  
3219  // node_modules/@floating-ui/core/dist/floating-ui.core.mjs
3220  function computeCoordsFromPlacement(_ref, placement, rtl) {
3221    let {
3222      reference,
3223      floating
3224    } = _ref;
3225    const sideAxis = getSideAxis(placement);
3226    const alignmentAxis = getAlignmentAxis(placement);
3227    const alignLength = getAxisLength(alignmentAxis);
3228    const side = getSide(placement);
3229    const isVertical = sideAxis === "y";
3230    const commonX = reference.x + reference.width / 2 - floating.width / 2;
3231    const commonY = reference.y + reference.height / 2 - floating.height / 2;
3232    const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
3233    let coords;
3234    switch (side) {
3235      case "top":
3236        coords = {
3237          x: commonX,
3238          y: reference.y - floating.height
3239        };
3240        break;
3241      case "bottom":
3242        coords = {
3243          x: commonX,
3244          y: reference.y + reference.height
3245        };
3246        break;
3247      case "right":
3248        coords = {
3249          x: reference.x + reference.width,
3250          y: commonY
3251        };
3252        break;
3253      case "left":
3254        coords = {
3255          x: reference.x - floating.width,
3256          y: commonY
3257        };
3258        break;
3259      default:
3260        coords = {
3261          x: reference.x,
3262          y: reference.y
3263        };
3264    }
3265    const alignment = getAlignment(placement);
3266    if (alignment) {
3267      coords[alignmentAxis] += commonAlign * (alignment === "end" ? 1 : -1) * (rtl && isVertical ? -1 : 1);
3268    }
3269    return coords;
3270  }
3271  async function detectOverflow(state, options) {
3272    var _await$platform$isEle;
3273    if (options === void 0) {
3274      options = {};
3275    }
3276    const {
3277      x,
3278      y,
3279      platform: platform3,
3280      rects,
3281      elements,
3282      strategy
3283    } = state;
3284    const {
3285      boundary = "clippingAncestors",
3286      rootBoundary = "viewport",
3287      elementContext = "floating",
3288      altBoundary = false,
3289      padding = 0
3290    } = evaluate(options, state);
3291    const paddingObject = getPaddingObject(padding);
3292    const altContext = elementContext === "floating" ? "reference" : "floating";
3293    const element = elements[altBoundary ? altContext : elementContext];
3294    const clippingClientRect = rectToClientRect(await platform3.getClippingRect({
3295      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)),
3296      boundary,
3297      rootBoundary,
3298      strategy
3299    }));
3300    const rect = elementContext === "floating" ? {
3301      x,
3302      y,
3303      width: rects.floating.width,
3304      height: rects.floating.height
3305    } : rects.reference;
3306    const offsetParent = await (platform3.getOffsetParent == null ? void 0 : platform3.getOffsetParent(elements.floating));
3307    const offsetScale = await (platform3.isElement == null ? void 0 : platform3.isElement(offsetParent)) && await (platform3.getScale == null ? void 0 : platform3.getScale(offsetParent)) || {
3308      x: 1,
3309      y: 1
3310    };
3311    const elementClientRect = rectToClientRect(platform3.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform3.convertOffsetParentRelativeRectToViewportRelativeRect({
3312      elements,
3313      rect,
3314      offsetParent,
3315      strategy
3316    }) : rect);
3317    return {
3318      top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
3319      bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
3320      left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
3321      right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
3322    };
3323  }
3324  var MAX_RESET_COUNT = 50;
3325  var computePosition = async (reference, floating, config) => {
3326    const {
3327      placement = "bottom",
3328      strategy = "absolute",
3329      middleware = [],
3330      platform: platform3
3331    } = config;
3332    const platformWithDetectOverflow = platform3.detectOverflow ? platform3 : {
3333      ...platform3,
3334      detectOverflow
3335    };
3336    const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(floating));
3337    let rects = await platform3.getElementRects({
3338      reference,
3339      floating,
3340      strategy
3341    });
3342    let {
3343      x,
3344      y
3345    } = computeCoordsFromPlacement(rects, placement, rtl);
3346    let statefulPlacement = placement;
3347    let resetCount = 0;
3348    const middlewareData = {};
3349    for (let i = 0; i < middleware.length; i++) {
3350      const currentMiddleware = middleware[i];
3351      if (!currentMiddleware) {
3352        continue;
3353      }
3354      const {
3355        name,
3356        fn
3357      } = currentMiddleware;
3358      const {
3359        x: nextX,
3360        y: nextY,
3361        data,
3362        reset
3363      } = await fn({
3364        x,
3365        y,
3366        initialPlacement: placement,
3367        placement: statefulPlacement,
3368        strategy,
3369        middlewareData,
3370        rects,
3371        platform: platformWithDetectOverflow,
3372        elements: {
3373          reference,
3374          floating
3375        }
3376      });
3377      x = nextX != null ? nextX : x;
3378      y = nextY != null ? nextY : y;
3379      middlewareData[name] = {
3380        ...middlewareData[name],
3381        ...data
3382      };
3383      if (reset && resetCount < MAX_RESET_COUNT) {
3384        resetCount++;
3385        if (typeof reset === "object") {
3386          if (reset.placement) {
3387            statefulPlacement = reset.placement;
3388          }
3389          if (reset.rects) {
3390            rects = reset.rects === true ? await platform3.getElementRects({
3391              reference,
3392              floating,
3393              strategy
3394            }) : reset.rects;
3395          }
3396          ({
3397            x,
3398            y
3399          } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
3400        }
3401        i = -1;
3402      }
3403    }
3404    return {
3405      x,
3406      y,
3407      placement: statefulPlacement,
3408      strategy,
3409      middlewareData
3410    };
3411  };
3412  var flip = function(options) {
3413    if (options === void 0) {
3414      options = {};
3415    }
3416    return {
3417      name: "flip",
3418      options,
3419      async fn(state) {
3420        var _middlewareData$arrow, _middlewareData$flip;
3421        const {
3422          placement,
3423          middlewareData,
3424          rects,
3425          initialPlacement,
3426          platform: platform3,
3427          elements
3428        } = state;
3429        const {
3430          mainAxis: checkMainAxis = true,
3431          crossAxis: checkCrossAxis = true,
3432          fallbackPlacements: specifiedFallbackPlacements,
3433          fallbackStrategy = "bestFit",
3434          fallbackAxisSideDirection = "none",
3435          flipAlignment = true,
3436          ...detectOverflowOptions
3437        } = evaluate(options, state);
3438        if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
3439          return {};
3440        }
3441        const side = getSide(placement);
3442        const initialSideAxis = getSideAxis(initialPlacement);
3443        const isBasePlacement = getSide(initialPlacement) === initialPlacement;
3444        const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating));
3445        const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
3446        const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
3447        if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
3448          fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
3449        }
3450        const placements2 = [initialPlacement, ...fallbackPlacements];
3451        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3452        const overflows = [];
3453        let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
3454        if (checkMainAxis) {
3455          overflows.push(overflow[side]);
3456        }
3457        if (checkCrossAxis) {
3458          const sides2 = getAlignmentSides(placement, rects, rtl);
3459          overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
3460        }
3461        overflowsData = [...overflowsData, {
3462          placement,
3463          overflows
3464        }];
3465        if (!overflows.every((side2) => side2 <= 0)) {
3466          var _middlewareData$flip2, _overflowsData$filter;
3467          const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
3468          const nextPlacement = placements2[nextIndex];
3469          if (nextPlacement) {
3470            const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
3471            if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
3472            // overflows the main axis.
3473            overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
3474              return {
3475                data: {
3476                  index: nextIndex,
3477                  overflows: overflowsData
3478                },
3479                reset: {
3480                  placement: nextPlacement
3481                }
3482              };
3483            }
3484          }
3485          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;
3486          if (!resetPlacement) {
3487            switch (fallbackStrategy) {
3488              case "bestFit": {
3489                var _overflowsData$filter2;
3490                const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => {
3491                  if (hasFallbackAxisSideDirection) {
3492                    const currentSideAxis = getSideAxis(d.placement);
3493                    return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
3494                    // reading directions favoring greater width.
3495                    currentSideAxis === "y";
3496                  }
3497                  return true;
3498                }).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];
3499                if (placement2) {
3500                  resetPlacement = placement2;
3501                }
3502                break;
3503              }
3504              case "initialPlacement":
3505                resetPlacement = initialPlacement;
3506                break;
3507            }
3508          }
3509          if (placement !== resetPlacement) {
3510            return {
3511              reset: {
3512                placement: resetPlacement
3513              }
3514            };
3515          }
3516        }
3517        return {};
3518      }
3519    };
3520  };
3521  var originSides = /* @__PURE__ */ new Set(["left", "top"]);
3522  async function convertValueToCoords(state, options) {
3523    const {
3524      placement,
3525      platform: platform3,
3526      elements
3527    } = state;
3528    const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating));
3529    const side = getSide(placement);
3530    const alignment = getAlignment(placement);
3531    const isVertical = getSideAxis(placement) === "y";
3532    const mainAxisMulti = originSides.has(side) ? -1 : 1;
3533    const crossAxisMulti = rtl && isVertical ? -1 : 1;
3534    const rawValue = evaluate(options, state);
3535    let {
3536      mainAxis,
3537      crossAxis,
3538      alignmentAxis
3539    } = typeof rawValue === "number" ? {
3540      mainAxis: rawValue,
3541      crossAxis: 0,
3542      alignmentAxis: null
3543    } : {
3544      mainAxis: rawValue.mainAxis || 0,
3545      crossAxis: rawValue.crossAxis || 0,
3546      alignmentAxis: rawValue.alignmentAxis
3547    };
3548    if (alignment && typeof alignmentAxis === "number") {
3549      crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
3550    }
3551    return isVertical ? {
3552      x: crossAxis * crossAxisMulti,
3553      y: mainAxis * mainAxisMulti
3554    } : {
3555      x: mainAxis * mainAxisMulti,
3556      y: crossAxis * crossAxisMulti
3557    };
3558  }
3559  var offset = function(options) {
3560    if (options === void 0) {
3561      options = 0;
3562    }
3563    return {
3564      name: "offset",
3565      options,
3566      async fn(state) {
3567        var _middlewareData$offse, _middlewareData$arrow;
3568        const {
3569          x,
3570          y,
3571          placement,
3572          middlewareData
3573        } = state;
3574        const diffCoords = await convertValueToCoords(state, options);
3575        if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
3576          return {};
3577        }
3578        return {
3579          x: x + diffCoords.x,
3580          y: y + diffCoords.y,
3581          data: {
3582            ...diffCoords,
3583            placement
3584          }
3585        };
3586      }
3587    };
3588  };
3589  var shift = function(options) {
3590    if (options === void 0) {
3591      options = {};
3592    }
3593    return {
3594      name: "shift",
3595      options,
3596      async fn(state) {
3597        const {
3598          x,
3599          y,
3600          placement,
3601          platform: platform3
3602        } = state;
3603        const {
3604          mainAxis: checkMainAxis = true,
3605          crossAxis: checkCrossAxis = false,
3606          limiter = {
3607            fn: (_ref) => {
3608              let {
3609                x: x2,
3610                y: y2
3611              } = _ref;
3612              return {
3613                x: x2,
3614                y: y2
3615              };
3616            }
3617          },
3618          ...detectOverflowOptions
3619        } = evaluate(options, state);
3620        const coords = {
3621          x,
3622          y
3623        };
3624        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3625        const crossAxis = getSideAxis(placement);
3626        const mainAxis = getOppositeAxis(crossAxis);
3627        let mainAxisCoord = coords[mainAxis];
3628        let crossAxisCoord = coords[crossAxis];
3629        const clampCoord = (axis, coord) => clamp(coord + overflow[axis === "y" ? "top" : "left"], coord, coord - overflow[axis === "y" ? "bottom" : "right"]);
3630        if (checkMainAxis) {
3631          mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
3632        }
3633        if (checkCrossAxis) {
3634          crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
3635        }
3636        const limitedCoords = limiter.fn({
3637          ...state,
3638          [mainAxis]: mainAxisCoord,
3639          [crossAxis]: crossAxisCoord
3640        });
3641        return {
3642          ...limitedCoords,
3643          data: {
3644            x: limitedCoords.x - x,
3645            y: limitedCoords.y - y,
3646            enabled: {
3647              [mainAxis]: checkMainAxis,
3648              [crossAxis]: checkCrossAxis
3649            }
3650          }
3651        };
3652      }
3653    };
3654  };
3655  var limitShift = function(options) {
3656    if (options === void 0) {
3657      options = {};
3658    }
3659    return {
3660      options,
3661      fn(state) {
3662        var _rawOffset$mainAxis, _rawOffset$crossAxis;
3663        const {
3664          x,
3665          y,
3666          placement,
3667          rects,
3668          middlewareData
3669        } = state;
3670        const {
3671          offset: offset4 = 0,
3672          mainAxis: checkMainAxis = true,
3673          crossAxis: checkCrossAxis = true
3674        } = evaluate(options, state);
3675        const coords = {
3676          x,
3677          y
3678        };
3679        const crossAxis = getSideAxis(placement);
3680        const mainAxis = getOppositeAxis(crossAxis);
3681        let mainAxisCoord = coords[mainAxis];
3682        let crossAxisCoord = coords[crossAxis];
3683        const rawOffset = evaluate(offset4, state);
3684        const computedOffset = typeof rawOffset === "number" ? {
3685          mainAxis: rawOffset,
3686          crossAxis: 0
3687        } : {
3688          mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,
3689          crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0
3690        };
3691        if (checkMainAxis) {
3692          const len = mainAxis === "y" ? "height" : "width";
3693          const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
3694          const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
3695          if (mainAxisCoord < limitMin) {
3696            mainAxisCoord = limitMin;
3697          } else if (mainAxisCoord > limitMax) {
3698            mainAxisCoord = limitMax;
3699          }
3700        }
3701        if (checkCrossAxis) {
3702          var _middlewareData$offse, _middlewareData$offse2;
3703          const len = mainAxis === "y" ? "width" : "height";
3704          const isOriginSide = originSides.has(getSide(placement));
3705          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);
3706          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);
3707          if (crossAxisCoord < limitMin) {
3708            crossAxisCoord = limitMin;
3709          } else if (crossAxisCoord > limitMax) {
3710            crossAxisCoord = limitMax;
3711          }
3712        }
3713        return {
3714          [mainAxis]: mainAxisCoord,
3715          [crossAxis]: crossAxisCoord
3716        };
3717      }
3718    };
3719  };
3720  var size = function(options) {
3721    if (options === void 0) {
3722      options = {};
3723    }
3724    return {
3725      name: "size",
3726      options,
3727      async fn(state) {
3728        const {
3729          placement,
3730          rects,
3731          platform: platform3,
3732          elements
3733        } = state;
3734        const {
3735          apply = () => {
3736          },
3737          ...detectOverflowOptions
3738        } = evaluate(options, state);
3739        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3740        const side = getSide(placement);
3741        const alignment = getAlignment(placement);
3742        const isYAxis = getSideAxis(placement) === "y";
3743        const {
3744          width,
3745          height
3746        } = rects.floating;
3747        let heightSide;
3748        let widthSide;
3749        if (side === "top" || side === "bottom") {
3750          heightSide = side;
3751          widthSide = alignment === (await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
3752        } else {
3753          widthSide = side;
3754          heightSide = alignment === "end" ? "top" : "bottom";
3755        }
3756        const maximumClippingHeight = height - overflow.top - overflow.bottom;
3757        const maximumClippingWidth = width - overflow.left - overflow.right;
3758        const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
3759        const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
3760        const shiftData = state.middlewareData.shift;
3761        const noShift = !shiftData;
3762        let availableHeight = overflowAvailableHeight;
3763        let availableWidth = overflowAvailableWidth;
3764        if (shiftData != null && shiftData.enabled.x) {
3765          availableWidth = maximumClippingWidth;
3766        }
3767        if (shiftData != null && shiftData.enabled.y) {
3768          availableHeight = maximumClippingHeight;
3769        }
3770        if (noShift && !alignment) {
3771          if (isYAxis) {
3772            availableWidth = width - 2 * max(overflow.left, overflow.right);
3773          } else {
3774            availableHeight = height - 2 * max(overflow.top, overflow.bottom);
3775          }
3776        }
3777        await apply({
3778          ...state,
3779          availableWidth,
3780          availableHeight
3781        });
3782        const nextDimensions = await platform3.getDimensions(elements.floating);
3783        if (width !== nextDimensions.width || height !== nextDimensions.height) {
3784          return {
3785            reset: {
3786              rects: true
3787            }
3788          };
3789        }
3790        return {};
3791      }
3792    };
3793  };
3794  
3795  // node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
3796  function getCssDimensions(element) {
3797    const css = getComputedStyle2(element);
3798    let width = parseFloat(css.width) || 0;
3799    let height = parseFloat(css.height) || 0;
3800    const hasOffset = isHTMLElement(element);
3801    const offsetWidth = hasOffset ? element.offsetWidth : width;
3802    const offsetHeight = hasOffset ? element.offsetHeight : height;
3803    const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
3804    if (shouldFallback) {
3805      width = offsetWidth;
3806      height = offsetHeight;
3807    }
3808    return {
3809      width,
3810      height,
3811      $: shouldFallback
3812    };
3813  }
3814  function unwrapElement(element) {
3815    return !isElement(element) ? element.contextElement : element;
3816  }
3817  function getScale(element) {
3818    const domElement = unwrapElement(element);
3819    if (!isHTMLElement(domElement)) {
3820      return createCoords(1);
3821    }
3822    const rect = domElement.getBoundingClientRect();
3823    const {
3824      width,
3825      height,
3826      $
3827    } = getCssDimensions(domElement);
3828    let x = ($ ? round(rect.width) : rect.width) / width;
3829    let y = ($ ? round(rect.height) : rect.height) / height;
3830    if (!x || !Number.isFinite(x)) {
3831      x = 1;
3832    }
3833    if (!y || !Number.isFinite(y)) {
3834      y = 1;
3835    }
3836    return {
3837      x,
3838      y
3839    };
3840  }
3841  var noOffsets = /* @__PURE__ */ createCoords(0);
3842  function getVisualOffsets(element) {
3843    const win = getWindow(element);
3844    if (!isWebKit() || !win.visualViewport) {
3845      return noOffsets;
3846    }
3847    return {
3848      x: win.visualViewport.offsetLeft,
3849      y: win.visualViewport.offsetTop
3850    };
3851  }
3852  function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
3853    if (isFixed === void 0) {
3854      isFixed = false;
3855    }
3856    return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
3857  }
3858  function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
3859    if (includeScale === void 0) {
3860      includeScale = false;
3861    }
3862    if (isFixedStrategy === void 0) {
3863      isFixedStrategy = false;
3864    }
3865    const clientRect = element.getBoundingClientRect();
3866    const domElement = unwrapElement(element);
3867    let scale = createCoords(1);
3868    if (includeScale) {
3869      if (offsetParent) {
3870        if (isElement(offsetParent)) {
3871          scale = getScale(offsetParent);
3872        }
3873      } else {
3874        scale = getScale(element);
3875      }
3876    }
3877    const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
3878    let x = (clientRect.left + visualOffsets.x) / scale.x;
3879    let y = (clientRect.top + visualOffsets.y) / scale.y;
3880    let width = clientRect.width / scale.x;
3881    let height = clientRect.height / scale.y;
3882    if (domElement && offsetParent) {
3883      const win = getWindow(domElement);
3884      const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
3885      let currentWin = win;
3886      let currentIFrame = getFrameElement(currentWin);
3887      while (currentIFrame && offsetWin !== currentWin) {
3888        const iframeScale = getScale(currentIFrame);
3889        const iframeRect = currentIFrame.getBoundingClientRect();
3890        const css = getComputedStyle2(currentIFrame);
3891        const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
3892        const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
3893        x *= iframeScale.x;
3894        y *= iframeScale.y;
3895        width *= iframeScale.x;
3896        height *= iframeScale.y;
3897        x += left;
3898        y += top;
3899        currentWin = getWindow(currentIFrame);
3900        currentIFrame = getFrameElement(currentWin);
3901      }
3902    }
3903    return rectToClientRect({
3904      width,
3905      height,
3906      x,
3907      y
3908    });
3909  }
3910  function getWindowScrollBarX(element, rect) {
3911    const leftScroll = getNodeScroll(element).scrollLeft;
3912    if (!rect) {
3913      return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
3914    }
3915    return rect.left + leftScroll;
3916  }
3917  function getHTMLOffset(documentElement, scroll) {
3918    const htmlRect = documentElement.getBoundingClientRect();
3919    const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
3920    const y = htmlRect.top + scroll.scrollTop;
3921    return {
3922      x,
3923      y
3924    };
3925  }
3926  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
3927    let {
3928      elements,
3929      rect,
3930      offsetParent,
3931      strategy
3932    } = _ref;
3933    const isFixed = strategy === "fixed";
3934    const documentElement = getDocumentElement(offsetParent);
3935    const topLayer = elements ? isTopLayer(elements.floating) : false;
3936    if (offsetParent === documentElement || topLayer && isFixed) {
3937      return rect;
3938    }
3939    let scroll = {
3940      scrollLeft: 0,
3941      scrollTop: 0
3942    };
3943    let scale = createCoords(1);
3944    const offsets = createCoords(0);
3945    const isOffsetParentAnElement = isHTMLElement(offsetParent);
3946    if (isOffsetParentAnElement || !isFixed) {
3947      if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
3948        scroll = getNodeScroll(offsetParent);
3949      }
3950      if (isOffsetParentAnElement) {
3951        const offsetRect = getBoundingClientRect(offsetParent);
3952        scale = getScale(offsetParent);
3953        offsets.x = offsetRect.x + offsetParent.clientLeft;
3954        offsets.y = offsetRect.y + offsetParent.clientTop;
3955      }
3956    }
3957    const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
3958    return {
3959      width: rect.width * scale.x,
3960      height: rect.height * scale.y,
3961      x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
3962      y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
3963    };
3964  }
3965  function getClientRects(element) {
3966    return element.getClientRects ? Array.from(element.getClientRects()) : [];
3967  }
3968  function getDocumentRect(html) {
3969    const scroll = getNodeScroll(html);
3970    const body = html.ownerDocument.body;
3971    const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
3972    const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
3973    let x = -scroll.scrollLeft + getWindowScrollBarX(html);
3974    const y = -scroll.scrollTop;
3975    if (getComputedStyle2(body).direction === "rtl") {
3976      x += max(html.clientWidth, body.clientWidth) - width;
3977    }
3978    return {
3979      width,
3980      height,
3981      x,
3982      y
3983    };
3984  }
3985  var SCROLLBAR_MAX = 25;
3986  function getViewportRect(element, strategy, rootBoundary) {
3987    if (rootBoundary === void 0) {
3988      rootBoundary = "viewport";
3989    }
3990    const isLayoutViewport = rootBoundary === "layoutViewport";
3991    const win = getWindow(element);
3992    const html = getDocumentElement(element);
3993    const visualViewport = win.visualViewport;
3994    let width = html.clientWidth;
3995    let height = html.clientHeight;
3996    let x = 0;
3997    let y = 0;
3998    if (visualViewport) {
3999      const layoutRelativeClientCoords = !isWebKit() || strategy === "fixed";
4000      if (isLayoutViewport) {
4001        if (!layoutRelativeClientCoords) {
4002          x = -visualViewport.offsetLeft;
4003          y = -visualViewport.offsetTop;
4004        }
4005      } else {
4006        width = visualViewport.width;
4007        height = visualViewport.height;
4008        if (layoutRelativeClientCoords) {
4009          x = visualViewport.offsetLeft;
4010          y = visualViewport.offsetTop;
4011        }
4012      }
4013    }
4014    const windowScrollbarX = getWindowScrollBarX(html);
4015    if (windowScrollbarX <= 0) {
4016      const doc = html.ownerDocument;
4017      const body = doc.body;
4018      const bodyStyles = getComputedStyle(body);
4019      const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
4020      const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
4021      const gutter = getComputedStyle(html).scrollbarGutter === "stable both-edges" ? reservedWidth / 2 : reservedWidth;
4022      if (gutter <= SCROLLBAR_MAX) {
4023        width -= gutter;
4024      }
4025    }
4026    return {
4027      width,
4028      height,
4029      x,
4030      y
4031    };
4032  }
4033  function getInnerBoundingClientRect(element, strategy) {
4034    const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
4035    const top = clientRect.top + element.clientTop;
4036    const left = clientRect.left + element.clientLeft;
4037    const scale = getScale(element);
4038    const width = element.clientWidth * scale.x;
4039    const height = element.clientHeight * scale.y;
4040    const x = left * scale.x;
4041    const y = top * scale.y;
4042    return {
4043      width,
4044      height,
4045      x,
4046      y
4047    };
4048  }
4049  function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
4050    let rect;
4051    if (clippingAncestor === "viewport" || clippingAncestor === "layoutViewport") {
4052      rect = getViewportRect(element, strategy, clippingAncestor);
4053    } else if (clippingAncestor === "document") {
4054      rect = getDocumentRect(getDocumentElement(element));
4055    } else if (isElement(clippingAncestor)) {
4056      rect = getInnerBoundingClientRect(clippingAncestor, strategy);
4057    } else {
4058      const visualOffsets = getVisualOffsets(element);
4059      rect = {
4060        x: clippingAncestor.x - visualOffsets.x,
4061        y: clippingAncestor.y - visualOffsets.y,
4062        width: clippingAncestor.width,
4063        height: clippingAncestor.height
4064      };
4065    }
4066    return rectToClientRect(rect);
4067  }
4068  function getClippingElementAncestors(element, cache) {
4069    const cachedResult = cache.get(element);
4070    if (cachedResult) {
4071      return cachedResult;
4072    }
4073    let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
4074    let lastKeptComputedStyle = null;
4075    const elementIsFixed = getComputedStyle2(element).position === "fixed";
4076    let currentNode = elementIsFixed ? getParentNode(element) : element;
4077    while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
4078      const computedStyle = getComputedStyle2(currentNode);
4079      const currentNodeIsContaining = isContainingBlock(currentNode);
4080      const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? "fixed" : "";
4081      const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === "fixed" || lastPosition === "absolute" && computedStyle.position === "static");
4082      if (shouldDropCurrentNode) {
4083        result = result.filter((ancestor) => ancestor !== currentNode);
4084      } else {
4085        lastKeptComputedStyle = computedStyle;
4086      }
4087      currentNode = getParentNode(currentNode);
4088    }
4089    cache.set(element, result);
4090    return result;
4091  }
4092  function getClippingRect(_ref) {
4093    let {
4094      element,
4095      boundary,
4096      rootBoundary,
4097      strategy
4098    } = _ref;
4099    const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
4100    const clippingAncestors = [...elementClippingAncestors, rootBoundary];
4101    const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
4102    let top = firstRect.top;
4103    let right = firstRect.right;
4104    let bottom = firstRect.bottom;
4105    let left = firstRect.left;
4106    for (let i = 1; i < clippingAncestors.length; i++) {
4107      const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
4108      top = max(rect.top, top);
4109      right = min(rect.right, right);
4110      bottom = min(rect.bottom, bottom);
4111      left = max(rect.left, left);
4112    }
4113    return {
4114      width: right - left,
4115      height: bottom - top,
4116      x: left,
4117      y: top
4118    };
4119  }
4120  function getDimensions(element) {
4121    const {
4122      width,
4123      height
4124    } = getCssDimensions(element);
4125    return {
4126      width,
4127      height
4128    };
4129  }
4130  function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
4131    const isOffsetParentAnElement = isHTMLElement(offsetParent);
4132    const documentElement = getDocumentElement(offsetParent);
4133    const isFixed = strategy === "fixed";
4134    const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
4135    let scroll = {
4136      scrollLeft: 0,
4137      scrollTop: 0
4138    };
4139    const offsets = createCoords(0);
4140    if (isOffsetParentAnElement || !isFixed) {
4141      if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
4142        scroll = getNodeScroll(offsetParent);
4143      }
4144      if (isOffsetParentAnElement) {
4145        const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
4146        offsets.x = offsetRect.x + offsetParent.clientLeft;
4147        offsets.y = offsetRect.y + offsetParent.clientTop;
4148      }
4149    }
4150    if (!isOffsetParentAnElement && documentElement) {
4151      offsets.x = getWindowScrollBarX(documentElement);
4152    }
4153    const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
4154    const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
4155    const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
4156    return {
4157      x,
4158      y,
4159      width: rect.width,
4160      height: rect.height
4161    };
4162  }
4163  function isStaticPositioned(element) {
4164    return getComputedStyle2(element).position === "static";
4165  }
4166  function getTrueOffsetParent(element, polyfill) {
4167    if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") {
4168      return null;
4169    }
4170    if (polyfill) {
4171      return polyfill(element);
4172    }
4173    let rawOffsetParent = element.offsetParent;
4174    if (getDocumentElement(element) === rawOffsetParent) {
4175      rawOffsetParent = rawOffsetParent.ownerDocument.body;
4176    }
4177    return rawOffsetParent;
4178  }
4179  function getOffsetParent(element, polyfill) {
4180    const win = getWindow(element);
4181    if (isTopLayer(element)) {
4182      return win;
4183    }
4184    if (!isHTMLElement(element)) {
4185      let svgOffsetParent = getParentNode(element);
4186      while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
4187        if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
4188          return svgOffsetParent;
4189        }
4190        svgOffsetParent = getParentNode(svgOffsetParent);
4191      }
4192      return win;
4193    }
4194    let offsetParent = getTrueOffsetParent(element, polyfill);
4195    while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
4196      offsetParent = getTrueOffsetParent(offsetParent, polyfill);
4197    }
4198    if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
4199      return win;
4200    }
4201    return offsetParent || getContainingBlock(element) || win;
4202  }
4203  var getElementRects = async function(data) {
4204    const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
4205    const getDimensionsFn = this.getDimensions;
4206    const floatingDimensions = await getDimensionsFn(data.floating);
4207    return {
4208      reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
4209      floating: {
4210        x: 0,
4211        y: 0,
4212        width: floatingDimensions.width,
4213        height: floatingDimensions.height
4214      }
4215    };
4216  };
4217  function isRTL(element) {
4218    return getComputedStyle2(element).direction === "rtl";
4219  }
4220  var platform2 = {
4221    convertOffsetParentRelativeRectToViewportRelativeRect,
4222    getDocumentElement,
4223    getClippingRect,
4224    getOffsetParent,
4225    getElementRects,
4226    getClientRects,
4227    getDimensions,
4228    getScale,
4229    isElement,
4230    isRTL
4231  };
4232  function rectsAreEqual(a, b) {
4233    return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
4234  }
4235  function observeMove(element, onMove, ancestorResize) {
4236    let io = null;
4237    let timeoutId;
4238    const root = getDocumentElement(element);
4239    function cleanup() {
4240      var _io;
4241      clearTimeout(timeoutId);
4242      (_io = io) == null || _io.disconnect();
4243      io = null;
4244    }
4245    function refresh(skip, threshold) {
4246      if (skip === void 0) {
4247        skip = false;
4248      }
4249      if (threshold === void 0) {
4250        threshold = 1;
4251      }
4252      cleanup();
4253      const elementRectForRootMargin = element.getBoundingClientRect();
4254      const {
4255        left,
4256        top,
4257        width,
4258        height
4259      } = elementRectForRootMargin;
4260      if (!skip) {
4261        onMove();
4262      }
4263      if (!width || !height) {
4264        return;
4265      }
4266      const insetTop = floor(top);
4267      const insetRight = floor(root.clientWidth - (left + width));
4268      const insetBottom = floor(root.clientHeight - (top + height));
4269      const insetLeft = floor(left);
4270      const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
4271      const options = {
4272        rootMargin,
4273        threshold: max(0, min(1, threshold)) || 1
4274      };
4275      let isFirstUpdate = true;
4276      function handleObserve(entries) {
4277        const ratio = entries[0].intersectionRatio;
4278        if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
4279          return refresh();
4280        }
4281        if (ratio !== threshold) {
4282          if (!isFirstUpdate) {
4283            return refresh();
4284          }
4285          if (!ratio) {
4286            timeoutId = setTimeout(() => {
4287              refresh(false, 1e-7);
4288            }, 1e3);
4289          } else {
4290            refresh(false, ratio);
4291          }
4292        }
4293        isFirstUpdate = false;
4294      }
4295      try {
4296        io = new IntersectionObserver(handleObserve, {
4297          ...options,
4298          // Handle <iframe>s
4299          root: root.ownerDocument
4300        });
4301      } catch (_e) {
4302        io = new IntersectionObserver(handleObserve, options);
4303      }
4304      io.observe(element);
4305    }
4306    const win = getWindow(element);
4307    const handleResize = () => refresh(ancestorResize);
4308    win.addEventListener("resize", handleResize);
4309    refresh(true);
4310    return () => {
4311      win.removeEventListener("resize", handleResize);
4312      cleanup();
4313    };
4314  }
4315  function autoUpdate(reference, floating, update2, options) {
4316    if (options === void 0) {
4317      options = {};
4318    }
4319    const {
4320      ancestorScroll = true,
4321      ancestorResize = true,
4322      elementResize = typeof ResizeObserver === "function",
4323      layoutShift = typeof IntersectionObserver === "function",
4324      animationFrame = false
4325    } = options;
4326    const referenceEl = unwrapElement(reference);
4327    const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
4328    ancestors.forEach((ancestor) => {
4329      ancestorScroll && ancestor.addEventListener("scroll", update2);
4330      ancestorResize && ancestor.addEventListener("resize", update2);
4331    });
4332    const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update2, ancestorResize) : null;
4333    let reobserveFrame = -1;
4334    let resizeObserver = null;
4335    if (elementResize) {
4336      resizeObserver = new ResizeObserver((_ref) => {
4337        let [firstEntry] = _ref;
4338        if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
4339          resizeObserver.unobserve(floating);
4340          cancelAnimationFrame(reobserveFrame);
4341          reobserveFrame = requestAnimationFrame(() => {
4342            var _resizeObserver;
4343            (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
4344          });
4345        }
4346        update2();
4347      });
4348      if (referenceEl && !animationFrame) {
4349        resizeObserver.observe(referenceEl);
4350      }
4351      if (floating) {
4352        resizeObserver.observe(floating);
4353      }
4354    }
4355    let frameId;
4356    let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
4357    if (animationFrame) {
4358      frameLoop();
4359    }
4360    function frameLoop() {
4361      const nextRefRect = getBoundingClientRect(reference);
4362      if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
4363        update2();
4364      }
4365      prevRefRect = nextRefRect;
4366      frameId = requestAnimationFrame(frameLoop);
4367    }
4368    update2();
4369    return () => {
4370      var _resizeObserver2;
4371      ancestors.forEach((ancestor) => {
4372        ancestorScroll && ancestor.removeEventListener("scroll", update2);
4373        ancestorResize && ancestor.removeEventListener("resize", update2);
4374      });
4375      cleanupIo == null || cleanupIo();
4376      (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
4377      resizeObserver = null;
4378      if (animationFrame) {
4379        cancelAnimationFrame(frameId);
4380      }
4381    };
4382  }
4383  var offset2 = offset;
4384  var shift2 = shift;
4385  var flip2 = flip;
4386  var size2 = size;
4387  var limitShift2 = limitShift;
4388  var computePosition2 = (reference, floating, options) => {
4389    const cache = /* @__PURE__ */ new Map();
4390    const mergedOptions = options != null ? options : {};
4391    const platformWithCache = {
4392      ...platform2,
4393      ...mergedOptions.platform,
4394      _c: cache
4395    };
4396    return computePosition(reference, floating, {
4397      ...mergedOptions,
4398      platform: platformWithCache
4399    });
4400  };
4401  
4402  // node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
4403  var React20 = __toESM(require_react(), 1);
4404  var import_react2 = __toESM(require_react(), 1);
4405  var ReactDOM3 = __toESM(require_react_dom(), 1);
4406  var isClient = typeof document !== "undefined";
4407  var noop2 = function noop3() {
4408  };
4409  var index = isClient ? import_react2.useLayoutEffect : noop2;
4410  function deepEqual(a, b) {
4411    if (a === b) {
4412      return true;
4413    }
4414    if (typeof a !== typeof b) {
4415      return false;
4416    }
4417    if (typeof a === "function" && a.toString() === b.toString()) {
4418      return true;
4419    }
4420    let length;
4421    let i;
4422    let keys;
4423    if (a && b && typeof a === "object") {
4424      if (Array.isArray(a)) {
4425        length = a.length;
4426        if (length !== b.length) return false;
4427        for (i = length; i-- !== 0; ) {
4428          if (!deepEqual(a[i], b[i])) {
4429            return false;
4430          }
4431        }
4432        return true;
4433      }
4434      keys = Object.keys(a);
4435      length = keys.length;
4436      if (length !== Object.keys(b).length) {
4437        return false;
4438      }
4439      for (i = length; i-- !== 0; ) {
4440        if (!{}.hasOwnProperty.call(b, keys[i])) {
4441          return false;
4442        }
4443      }
4444      for (i = length; i-- !== 0; ) {
4445        const key = keys[i];
4446        if (key === "_owner" && a.$$typeof) {
4447          continue;
4448        }
4449        if (!deepEqual(a[key], b[key])) {
4450          return false;
4451        }
4452      }
4453      return true;
4454    }
4455    return a !== a && b !== b;
4456  }
4457  function getDPR(element) {
4458    if (typeof window === "undefined") {
4459      return 1;
4460    }
4461    const win = element.ownerDocument.defaultView || window;
4462    return win.devicePixelRatio || 1;
4463  }
4464  function roundByDPR(element, value) {
4465    const dpr = getDPR(element);
4466    return Math.round(value * dpr) / dpr;
4467  }
4468  function useLatestRef(value) {
4469    const ref = React20.useRef(value);
4470    index(() => {
4471      ref.current = value;
4472    });
4473    return ref;
4474  }
4475  function useFloating(options) {
4476    if (options === void 0) {
4477      options = {};
4478    }
4479    const {
4480      placement = "bottom",
4481      strategy = "absolute",
4482      middleware = [],
4483      platform: platform3,
4484      elements: {
4485        reference: externalReference,
4486        floating: externalFloating
4487      } = {},
4488      transform = true,
4489      whileElementsMounted,
4490      open
4491    } = options;
4492    const [data, setData] = React20.useState({
4493      x: 0,
4494      y: 0,
4495      strategy,
4496      placement,
4497      middlewareData: {},
4498      isPositioned: false
4499    });
4500    const [latestMiddleware, setLatestMiddleware] = React20.useState(middleware);
4501    if (!deepEqual(latestMiddleware, middleware)) {
4502      setLatestMiddleware(middleware);
4503    }
4504    const [_reference, _setReference] = React20.useState(null);
4505    const [_floating, _setFloating] = React20.useState(null);
4506    const setReference = React20.useCallback((node) => {
4507      if (node !== referenceRef.current) {
4508        referenceRef.current = node;
4509        _setReference(node);
4510      }
4511    }, []);
4512    const setFloating = React20.useCallback((node) => {
4513      if (node !== floatingRef.current) {
4514        floatingRef.current = node;
4515        _setFloating(node);
4516      }
4517    }, []);
4518    const referenceEl = externalReference || _reference;
4519    const floatingEl = externalFloating || _floating;
4520    const referenceRef = React20.useRef(null);
4521    const floatingRef = React20.useRef(null);
4522    const dataRef = React20.useRef(data);
4523    const hasWhileElementsMounted = whileElementsMounted != null;
4524    const whileElementsMountedRef = useLatestRef(whileElementsMounted);
4525    const platformRef = useLatestRef(platform3);
4526    const openRef = useLatestRef(open);
4527    const update2 = React20.useCallback(() => {
4528      if (!referenceRef.current || !floatingRef.current) {
4529        return;
4530      }
4531      const config = {
4532        placement,
4533        strategy,
4534        middleware: latestMiddleware
4535      };
4536      if (platformRef.current) {
4537        config.platform = platformRef.current;
4538      }
4539      computePosition2(referenceRef.current, floatingRef.current, config).then((data2) => {
4540        const fullData = {
4541          ...data2,
4542          // The floating element's position may be recomputed while it's closed
4543          // but still mounted (such as when transitioning out). To ensure
4544          // `isPositioned` will be `false` initially on the next open, avoid
4545          // setting it to `true` when `open === false` (must be specified).
4546          isPositioned: openRef.current !== false
4547        };
4548        if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
4549          dataRef.current = fullData;
4550          ReactDOM3.flushSync(() => {
4551            setData(fullData);
4552          });
4553        }
4554      });
4555    }, [latestMiddleware, placement, strategy, platformRef, openRef]);
4556    index(() => {
4557      if (open === false && dataRef.current.isPositioned) {
4558        dataRef.current.isPositioned = false;
4559        setData((data2) => ({
4560          ...data2,
4561          isPositioned: false
4562        }));
4563      }
4564    }, [open]);
4565    const isMountedRef = React20.useRef(false);
4566    index(() => {
4567      isMountedRef.current = true;
4568      return () => {
4569        isMountedRef.current = false;
4570      };
4571    }, []);
4572    index(() => {
4573      if (referenceEl) referenceRef.current = referenceEl;
4574      if (floatingEl) floatingRef.current = floatingEl;
4575      if (referenceEl && floatingEl) {
4576        if (whileElementsMountedRef.current) {
4577          return whileElementsMountedRef.current(referenceEl, floatingEl, update2);
4578        }
4579        update2();
4580      }
4581    }, [referenceEl, floatingEl, update2, whileElementsMountedRef, hasWhileElementsMounted]);
4582    const refs = React20.useMemo(() => ({
4583      reference: referenceRef,
4584      floating: floatingRef,
4585      setReference,
4586      setFloating
4587    }), [setReference, setFloating]);
4588    const elements = React20.useMemo(() => ({
4589      reference: referenceEl,
4590      floating: floatingEl
4591    }), [referenceEl, floatingEl]);
4592    const floatingStyles = React20.useMemo(() => {
4593      const initialStyles = {
4594        position: strategy,
4595        left: 0,
4596        top: 0
4597      };
4598      if (!elements.floating) {
4599        return initialStyles;
4600      }
4601      const x = roundByDPR(elements.floating, data.x);
4602      const y = roundByDPR(elements.floating, data.y);
4603      if (transform) {
4604        return {
4605          ...initialStyles,
4606          transform: "translate(" + x + "px, " + y + "px)",
4607          ...getDPR(elements.floating) >= 1.5 && {
4608            willChange: "transform"
4609          }
4610        };
4611      }
4612      return {
4613        position: strategy,
4614        left: x,
4615        top: y
4616      };
4617    }, [strategy, transform, elements.floating, data.x, data.y]);
4618    return React20.useMemo(() => ({
4619      ...data,
4620      update: update2,
4621      refs,
4622      elements,
4623      floatingStyles
4624    }), [data, update2, refs, elements, floatingStyles]);
4625  }
4626  var offset3 = (options, deps) => {
4627    const result = offset2(options);
4628    return {
4629      name: result.name,
4630      fn: result.fn,
4631      options: [options, deps]
4632    };
4633  };
4634  var shift3 = (options, deps) => {
4635    const result = shift2(options);
4636    return {
4637      name: result.name,
4638      fn: result.fn,
4639      options: [options, deps]
4640    };
4641  };
4642  var limitShift3 = (options, deps) => {
4643    const result = limitShift2(options);
4644    return {
4645      fn: result.fn,
4646      options: [options, deps]
4647    };
4648  };
4649  var flip3 = (options, deps) => {
4650    const result = flip2(options);
4651    return {
4652      name: result.name,
4653      fn: result.fn,
4654      options: [options, deps]
4655    };
4656  };
4657  var size3 = (options, deps) => {
4658    const result = size2(options);
4659    return {
4660      name: result.name,
4661      fn: result.fn,
4662      options: [options, deps]
4663    };
4664  };
4665  
4666  // node_modules/@base-ui/react/utils/popups/popupHandle.mjs
4667  var BasePopupHandle = class {
4668    /**
4669     * Stores of every root currently using this handle, in attach order. A handle is meant to be used
4670     * by a single mounted root, but roots can transiently overlap (e.g. during an animated route
4671     * transition), so this stack lets `attachStore`'s cleanup restore the previous root instead of
4672     * leaving a still-mounted root uncontrollable when a newer overlapping root detaches first.
4673     */
4674    attachedStores = [];
4675    /**
4676     * Store of the root that currently controls the handle: the most recently attached one still
4677     * mounted, or `null` when no root is attached. Imperative methods are no-ops while this is `null`.
4678     */
4679    attachedStoreValue = null;
4680    /**
4681     * Listeners notified when `attachedStore` changes, so detached triggers can follow the store pointer.
4682     */
4683    storeListeners = /* @__PURE__ */ new Set();
4684    /**
4685     * Creates a handle backed by the store used while no root is attached.
4686     *
4687     * @param fallbackStore Inert, closed store handed to detached triggers while no root is attached,
4688     * so they can render and register without a mounted root. Triggers register into whichever store
4689     * `store` currently resolves to, so while detached they live in this store's trigger map and
4690     * migrate themselves to the root's store (and back) as it attaches/detaches.
4691     * @param componentName Component name used to prefix dev warnings, e.g. `'Menu'` produces
4692     * `MenuHandle.open()` in warning text.
4693     * @param throwOnMissingTrigger Whether `open(triggerId)` throws when no trigger with that id is
4694     * registered. Anchored popups (Menu, Popover, Tooltip, PreviewCard) need a trigger to anchor to,
4695     * so they throw; Dialog is not anchored and instead opens unassociated with a dev warning.
4696     */
4697    constructor(fallbackStore, componentName, throwOnMissingTrigger = true) {
4698      this.fallbackStore = fallbackStore;
4699      this.componentName = componentName;
4700      this.throwOnMissingTrigger = throwOnMissingTrigger;
4701    }
4702    get attachedStore() {
4703      return this.attachedStoreValue;
4704    }
4705    /**
4706     * Store that detached triggers read from: the attached root's store, or an inert fallback store
4707     * used while no root is attached.
4708     * @internal
4709     */
4710    get store() {
4711      return this.attachedStoreValue ?? this.fallbackStore;
4712    }
4713    /**
4714     * Stable fallback store used for server rendering and hydration. Root stores cannot be recorded on
4715     * the handle during render because a handle can be shared by concurrent server-rendered requests.
4716     * @internal
4717     */
4718    get serverStore() {
4719      return this.fallbackStore;
4720    }
4721    /**
4722     * Subscribes to changes of the attached store pointer so detached triggers re-render and re-bind
4723     * when a root attaches or detaches. Returns a function that removes the listener.
4724     * @internal
4725     */
4726    subscribeStore(listener) {
4727      this.storeListeners.add(listener);
4728      return () => {
4729        this.storeListeners.delete(listener);
4730      };
4731    }
4732    /**
4733     * Points the handle at a root's store and notifies subscribers so detached triggers re-render and
4734     * re-register into it (their registration ref re-fires on the store-pointer change). Returns a
4735     * cleanup function that detaches the store again.
4736     * @internal
4737     */
4738    attachStore(newStore) {
4739      this.attachedStores.push(newStore);
4740      this.setActiveStore(newStore);
4741      if (true) {
4742        if (this.attachedStores.length > 1) {
4743          const dev = this;
4744          (dev.overlapWarningFrame ??= AnimationFrame.create()).request(() => {
4745            if (this.attachedStores.length > 1) {
4746              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.");
4747            }
4748          });
4749        }
4750      }
4751      return () => {
4752        const index2 = this.attachedStores.lastIndexOf(newStore);
4753        if (index2 !== -1) {
4754          this.attachedStores.splice(index2, 1);
4755        }
4756        this.setActiveStore(this.attachedStores[this.attachedStores.length - 1] ?? null);
4757      };
4758    }
4759    /**
4760     * Sets the store that currently controls the handle and notifies subscribers when it changes, so
4761     * detached triggers re-render and migrate their registration to the new store.
4762     */
4763    setActiveStore(store2) {
4764      if (this.attachedStoreValue !== store2) {
4765        this.attachedStoreValue = store2;
4766        this.storeListeners.forEach((listener) => {
4767          listener();
4768        });
4769      }
4770    }
4771    /**
4772     * Opens the attached root's store and associates it with the trigger with the given id, or a
4773     * no-op (with a dev warning) while no root is attached. Shared by every concrete handle's public
4774     * `open()` method, which only narrows the parameter type.
4775     *
4776     * When a trigger id is given but no matching trigger is registered, anchored popups throw (see
4777     * `throwOnMissingTrigger`); Dialog opens unassociated with a dev warning instead.
4778     *
4779     * This method should only be called in an event handler or an effect (not during rendering).
4780     *
4781     * @param triggerId ID of the trigger to associate with the popup, or `null`/`undefined` to open
4782     * without associating any trigger.
4783     */
4784    openByTrigger(triggerId) {
4785      const attachedStore = this.attachedStore;
4786      if (attachedStore === null) {
4787        if (true) {
4788          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.`);
4789        }
4790        return;
4791      }
4792      let triggerElement;
4793      if (triggerId) {
4794        for (let i = this.attachedStores.length - 1; i >= 0 && !triggerElement; i -= 1) {
4795          triggerElement = this.attachedStores[i].context.triggerElements.getById(triggerId);
4796        }
4797        triggerElement ??= this.fallbackStore.context.triggerElements.getById(triggerId);
4798      }
4799      if (triggerId && !triggerElement) {
4800        if (this.throwOnMissingTrigger) {
4801          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));
4802        }
4803        if (true) {
4804          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.`);
4805        }
4806      }
4807      attachedStore.setOpen(true, createChangeEventDetails(reason_parts_exports.imperativeAction, void 0, triggerElement));
4808    }
4809    /**
4810     * Closes the popup by setting the attached root's store to closed, or a no-op (with a dev warning)
4811     * while no root is attached. Shared by every concrete handle's public `close()` method.
4812     *
4813     * This method should only be called in an event handler or an effect (not during rendering).
4814     */
4815    closePopup() {
4816      const attachedStore = this.attachedStore;
4817      if (attachedStore === null) {
4818        if (true) {
4819          console.warn(`Base UI: $this.componentName}Handle.close() was called while no root using this handle is mounted. The call was ignored.`);
4820        }
4821        return;
4822      }
4823      attachedStore.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction));
4824    }
4825  };
4826  
4827  // node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
4828  var React25 = __toESM(require_react(), 1);
4829  var ReactDOM4 = __toESM(require_react_dom(), 1);
4830  
4831  // node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
4832  var React24 = __toESM(require_react(), 1);
4833  
4834  // node_modules/@base-ui/utils/store/useStore.mjs
4835  var React22 = __toESM(require_react(), 1);
4836  var import_shim = __toESM(require_shim(), 1);
4837  var import_with_selector = __toESM(require_with_selector(), 1);
4838  
4839  // node_modules/@base-ui/utils/fastHooks.mjs
4840  var React21 = __toESM(require_react(), 1);
4841  var hooks = [];
4842  var currentInstance = void 0;
4843  function getInstance() {
4844    return currentInstance;
4845  }
4846  function register(hook) {
4847    hooks.push(hook);
4848  }
4849  function fastComponent(fn) {
4850    const FastComponent = (props, forwardedRef) => {
4851      const instance = useRefWithInit(createInstance).current;
4852      let result;
4853      try {
4854        currentInstance = instance;
4855        for (const hook of hooks) {
4856          hook.before(instance);
4857        }
4858        result = fn(props, forwardedRef);
4859        for (const hook of hooks) {
4860          hook.after(instance);
4861        }
4862        instance.didInitialize = true;
4863      } finally {
4864        currentInstance = void 0;
4865      }
4866      return result;
4867    };
4868    FastComponent.displayName = fn.displayName || fn.name;
4869    return FastComponent;
4870  }
4871  function fastComponentRef(fn) {
4872    return /* @__PURE__ */ React21.forwardRef(fastComponent(fn));
4873  }
4874  function createInstance() {
4875    return {
4876      didInitialize: false
4877    };
4878  }
4879  
4880  // node_modules/@base-ui/utils/store/useStore.mjs
4881  var canUseRawUseSyncExternalStore = isReactVersionAtLeast(19);
4882  var useStoreImplementation = canUseRawUseSyncExternalStore ? useStoreFast : useStoreLegacy;
4883  function useStore(store2, selector, a1, a2, a3) {
4884    return useStoreImplementation(store2, selector, a1, a2, a3);
4885  }
4886  function useStoreR19(store2, selector, a1, a2, a3) {
4887    const getSelection = React22.useCallback(() => selector(store2.getSnapshot(), a1, a2, a3), [store2, selector, a1, a2, a3]);
4888    return (0, import_shim.useSyncExternalStore)(store2.subscribe, getSelection, getSelection);
4889  }
4890  register({
4891    before(instance) {
4892      instance.syncIndex = 0;
4893      if (!instance.didInitialize) {
4894        instance.syncTick = 1;
4895        instance.syncHooks = [];
4896        instance.didChangeStore = true;
4897        instance.getSnapshot = () => {
4898          let didChange2 = false;
4899          for (let i = 0; i < instance.syncHooks.length; i += 1) {
4900            const hook = instance.syncHooks[i];
4901            const value = hook.selector(hook.store.state, hook.a1, hook.a2, hook.a3);
4902            if (!Object.is(hook.value, value)) {
4903              didChange2 = true;
4904              hook.value = value;
4905            }
4906          }
4907          if (didChange2) {
4908            instance.syncTick += 1;
4909          }
4910          return instance.syncTick;
4911        };
4912      }
4913    },
4914    after(instance) {
4915      if (instance.syncHooks.length > 0) {
4916        if (instance.didChangeStore) {
4917          instance.didChangeStore = false;
4918          instance.subscribe = (onStoreChange) => {
4919            const stores = /* @__PURE__ */ new Set();
4920            for (const hook of instance.syncHooks) {
4921              stores.add(hook.store);
4922            }
4923            const unsubscribes = [];
4924            for (const store2 of stores) {
4925              unsubscribes.push(store2.subscribe(onStoreChange));
4926            }
4927            return () => {
4928              for (const unsubscribe of unsubscribes) {
4929                unsubscribe();
4930              }
4931            };
4932          };
4933        }
4934        (0, import_shim.useSyncExternalStore)(instance.subscribe, instance.getSnapshot, instance.getSnapshot);
4935      }
4936    }
4937  });
4938  function useStoreFast(store2, selector, a1, a2, a3) {
4939    const instance = getInstance();
4940    if (!instance) {
4941      return useStoreR19(store2, selector, a1, a2, a3);
4942    }
4943    const index2 = instance.syncIndex;
4944    instance.syncIndex += 1;
4945    let hook;
4946    if (!instance.didInitialize) {
4947      hook = {
4948        store: store2,
4949        selector,
4950        a1,
4951        a2,
4952        a3,
4953        value: selector(store2.getSnapshot(), a1, a2, a3)
4954      };
4955      instance.syncHooks.push(hook);
4956    } else {
4957      hook = instance.syncHooks[index2];
4958      if (hook.store !== store2 || hook.selector !== selector || !Object.is(hook.a1, a1) || !Object.is(hook.a2, a2) || !Object.is(hook.a3, a3)) {
4959        if (hook.store !== store2) {
4960          instance.didChangeStore = true;
4961        }
4962        hook.store = store2;
4963        hook.selector = selector;
4964        hook.a1 = a1;
4965        hook.a2 = a2;
4966        hook.a3 = a3;
4967        hook.value = selector(store2.getSnapshot(), a1, a2, a3);
4968      }
4969    }
4970    return hook.value;
4971  }
4972  function useStoreLegacy(store2, selector, a1, a2, a3) {
4973    return (0, import_with_selector.useSyncExternalStoreWithSelector)(store2.subscribe, store2.getSnapshot, store2.getSnapshot, (state) => selector(state, a1, a2, a3));
4974  }
4975  
4976  // node_modules/@base-ui/utils/store/Store.mjs
4977  var Store = class {
4978    /**
4979     * The current state of the store.
4980     * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.
4981     * 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).
4982     * The values can be used directly (to avoid subscribing to the store) in effects or event handlers.
4983     *
4984     * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.
4985     */
4986    // Internal state to handle recursive `setState()` calls
4987    constructor(state) {
4988      this.state = state;
4989      this.listeners = /* @__PURE__ */ new Set();
4990      this.updateTick = 0;
4991    }
4992    /**
4993     * Registers a listener that will be called whenever the store's state changes.
4994     *
4995     * @param fn The listener function to be called on state changes.
4996     * @returns A function to unsubscribe the listener.
4997     */
4998    subscribe = (fn) => {
4999      this.listeners.add(fn);
5000      return () => {
5001        this.listeners.delete(fn);
5002      };
5003    };
5004    /**
5005     * Returns the current state of the store.
5006     */
5007    getSnapshot = () => {
5008      return this.state;
5009    };
5010    /**
5011     * Updates the entire store's state and notifies all registered listeners.
5012     *
5013     * @param newState The new state to set for the store.
5014     */
5015    setState(newState) {
5016      if (this.state === newState) {
5017        return;
5018      }
5019      this.state = newState;
5020      this.updateTick += 1;
5021      const currentTick = this.updateTick;
5022      for (const listener of this.listeners) {
5023        if (currentTick !== this.updateTick) {
5024          return;
5025        }
5026        listener(newState);
5027      }
5028    }
5029    /**
5030     * Merges the provided changes into the current state and notifies listeners if there are changes.
5031     *
5032     * @param changes An object containing the changes to apply to the current state.
5033     */
5034    update(changes) {
5035      for (const key in changes) {
5036        if (!Object.is(this.state[key], changes[key])) {
5037          this.setState({
5038            ...this.state,
5039            ...changes
5040          });
5041          return;
5042        }
5043      }
5044    }
5045    /**
5046     * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.
5047     *
5048     * @param key The key in the store's state to update.
5049     * @param value The new value to set for the specified key.
5050     */
5051    set(key, value) {
5052      if (!Object.is(this.state[key], value)) {
5053        this.setState({
5054          ...this.state,
5055          [key]: value
5056        });
5057      }
5058    }
5059    /**
5060     * Gives the state a new reference and updates all registered listeners.
5061     */
5062    notifyAll() {
5063      const newState = {
5064        ...this.state
5065      };
5066      this.setState(newState);
5067    }
5068    use(selector, a1, a2, a3) {
5069      return useStore(this, selector, a1, a2, a3);
5070    }
5071  };
5072  
5073  // node_modules/@base-ui/utils/store/ReactStore.mjs
5074  var React23 = __toESM(require_react(), 1);
5075  var ReactStore = class extends Store {
5076    /**
5077     * Creates a new ReactStore instance.
5078     *
5079     * @param state Initial state of the store.
5080     * @param context Non-reactive context values.
5081     * @param selectors Optional selectors for use with `useState`.
5082     */
5083    constructor(state, context = {}, selectors3) {
5084      super(state);
5085      this.context = context;
5086      this.selectors = selectors3;
5087    }
5088    /**
5089     * Non-reactive values such as refs, callbacks, etc.
5090     */
5091    /**
5092     * Synchronizes a single external value into the store.
5093     *
5094     * Note that the while the value in `state` is updated immediately, the value returned
5095     * by `useState` is updated before the next render (similarly to React's `useState`).
5096     */
5097    useSyncedValue(key, value) {
5098      React23.useDebugValue(key);
5099      const store2 = this;
5100      useIsoLayoutEffect(() => {
5101        if (store2.state[key] !== value) {
5102          store2.set(key, value);
5103        }
5104      }, [store2, key, value]);
5105    }
5106    /**
5107     * Synchronizes a single external value into the store and
5108     * cleans it up (sets to `undefined`) on unmount.
5109     *
5110     * Note that the while the value in `state` is updated immediately, the value returned
5111     * by `useState` is updated before the next render (similarly to React's `useState`).
5112     */
5113    useSyncedValueWithCleanup(key, value) {
5114      const store2 = this;
5115      useIsoLayoutEffect(() => {
5116        if (store2.state[key] !== value) {
5117          store2.set(key, value);
5118        }
5119        return () => {
5120          store2.set(key, void 0);
5121        };
5122      }, [store2, key, value]);
5123    }
5124    /**
5125     * Synchronizes multiple external values into the store.
5126     *
5127     * Note that the while the values in `state` are updated immediately, the values returned
5128     * by `useState` are updated before the next render (similarly to React's `useState`).
5129     */
5130    useSyncedValues(statePart) {
5131      const store2 = this;
5132      if (true) {
5133        React23.useDebugValue(statePart, (p) => Object.keys(p));
5134        const keys = React23.useRef(Object.keys(statePart)).current;
5135        const nextKeys = Object.keys(statePart);
5136        if (keys.length !== nextKeys.length || keys.some((key, index2) => key !== nextKeys[index2])) {
5137          console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
5138        }
5139      }
5140      const dependencies = Object.values(statePart);
5141      useIsoLayoutEffect(() => {
5142        store2.update(statePart);
5143      }, [store2, ...dependencies]);
5144    }
5145    /**
5146     * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`
5147     * is non-undefined, the store's state at `key` is updated to match `controlled`.
5148     */
5149    useControlledProp(key, controlled) {
5150      React23.useDebugValue(key);
5151      const store2 = this;
5152      const isControlled = controlled !== void 0;
5153      useIsoLayoutEffect(() => {
5154        if (isControlled && !Object.is(store2.state[key], controlled)) {
5155          store2.setState({
5156            ...store2.state,
5157            [key]: controlled
5158          });
5159        }
5160      }, [store2, key, controlled, isControlled]);
5161      if (true) {
5162        const cache = this.controlledValues ??= /* @__PURE__ */ new Map();
5163        if (!cache.has(key)) {
5164          cache.set(key, isControlled);
5165        }
5166        const previouslyControlled = cache.get(key);
5167        if (previouslyControlled !== void 0 && previouslyControlled !== isControlled) {
5168          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).`);
5169        }
5170      }
5171    }
5172    /** Gets the current value from the store using a selector with the provided key.
5173     *
5174     * @param key Key of the selector to use.
5175     */
5176    select(key, a1, a2, a3) {
5177      const selector = this.selectors[key];
5178      return selector(this.state, a1, a2, a3);
5179    }
5180    /**
5181     * Returns a value from the store's state using a selector function.
5182     * Used to subscribe to specific parts of the state.
5183     * This methods causes a rerender whenever the selected state changes.
5184     *
5185     * @param key Key of the selector to use.
5186     */
5187    useState(key, a1, a2, a3) {
5188      React23.useDebugValue(key);
5189      return useStore(this, this.selectors[key], a1, a2, a3);
5190    }
5191    /**
5192     * Wraps a function with `useStableCallback` to ensure it has a stable reference
5193     * and assigns it to the context.
5194     *
5195     * @param key Key of the event callback. Must be a function in the context.
5196     * @param fn Function to assign.
5197     */
5198    useContextCallback(key, fn) {
5199      React23.useDebugValue(key);
5200      const stableFunction = useStableCallback(fn ?? NOOP);
5201      this.context[key] = stableFunction;
5202    }
5203    /**
5204     * Returns a stable setter function for a specific key in the store's state.
5205     * It's commonly used to pass as a ref callback to React elements.
5206     *
5207     * @param key Key of the state to set.
5208     */
5209    useStateSetter(key) {
5210      const ref = React23.useRef(void 0);
5211      if (ref.current === void 0) {
5212        ref.current = (value) => {
5213          this.set(key, value);
5214        };
5215      }
5216      return ref.current;
5217    }
5218    /**
5219     * Observes changes derived from the store's selectors and calls the listener when the selected value changes.
5220     *
5221     * @param key Key of the selector to observe.
5222     * @param listener Listener function called when the selector result changes.
5223     */
5224    observe(selector, listener) {
5225      let selectFn;
5226      if (typeof selector === "function") {
5227        selectFn = selector;
5228      } else {
5229        selectFn = this.selectors[selector];
5230      }
5231      let prevValue = selectFn(this.state);
5232      listener(prevValue, prevValue, this);
5233      return this.subscribe((nextState) => {
5234        const nextValue = selectFn(nextState);
5235        if (!Object.is(prevValue, nextValue)) {
5236          const oldValue = prevValue;
5237          prevValue = nextValue;
5238          listener(nextValue, oldValue, this);
5239        }
5240      });
5241    }
5242  };
5243  
5244  // node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs
5245  var selectors = {
5246    open: (state) => state.open,
5247    transitionStatus: (state) => state.transitionStatus,
5248    domReferenceElement: (state) => state.domReferenceElement,
5249    referenceElement: (state) => state.positionReference ?? state.referenceElement,
5250    floatingElement: (state) => state.floatingElement,
5251    floatingId: (state) => state.floatingId
5252  };
5253  var FloatingRootStore = class extends ReactStore {
5254    constructor(options) {
5255      const {
5256        syncOnly,
5257        nested,
5258        onOpenChange,
5259        triggerElements,
5260        ...initialState
5261      } = options;
5262      super({
5263        ...initialState,
5264        positionReference: initialState.referenceElement,
5265        domReferenceElement: initialState.referenceElement
5266      }, {
5267        onOpenChange,
5268        dataRef: {
5269          current: {}
5270        },
5271        events: createEventEmitter(),
5272        nested,
5273        triggerElements
5274      }, selectors);
5275      this.syncOnly = syncOnly;
5276    }
5277    /**
5278     * Syncs the event used by hover logic to distinguish hover-open from click-like interaction.
5279     */
5280    syncOpenEvent = (newOpen, event) => {
5281      if (!newOpen || !this.state.open || // Prevent a pending hover-open from overwriting a click-open event, while allowing
5282      // click events to upgrade a hover-open.
5283      event != null && isClickLikeEvent(event)) {
5284        this.context.dataRef.current.openEvent = newOpen ? event : void 0;
5285      }
5286    };
5287    /**
5288     * Runs the root-owned side effects for an open state change.
5289     */
5290    dispatchOpenChange = (newOpen, eventDetails) => {
5291      this.syncOpenEvent(newOpen, eventDetails.event);
5292      const details = {
5293        open: newOpen,
5294        reason: eventDetails.reason,
5295        nativeEvent: eventDetails.event,
5296        nested: this.context.nested,
5297        triggerElement: eventDetails.trigger
5298      };
5299      this.context.events.emit("openchange", details);
5300    };
5301    /**
5302     * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.
5303     *
5304     * @param newOpen The new open state.
5305     * @param eventDetails Details about the event that triggered the open state change.
5306     */
5307    setOpen = (newOpen, eventDetails) => {
5308      if (this.syncOnly) {
5309        this.context.onOpenChange?.(newOpen, eventDetails);
5310        return;
5311      }
5312      this.dispatchOpenChange(newOpen, eventDetails);
5313      this.context.onOpenChange?.(newOpen, eventDetails);
5314    };
5315  };
5316  
5317  // node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
5318  function useSyncedFloatingRootContext(options) {
5319    const {
5320      popupStore,
5321      treatPopupAsFloatingElement = false,
5322      floatingRootContext: floatingRootContextProp,
5323      floatingId,
5324      nested,
5325      onOpenChange
5326    } = options;
5327    const open = popupStore.useState("open");
5328    const referenceElement = popupStore.useState("activeTriggerElement");
5329    const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? "popupElement" : "positionerElement");
5330    const triggerElements = popupStore.context.triggerElements;
5331    const handleOpenChange = onOpenChange;
5332    const internalStoreRef = React24.useRef(null);
5333    if (floatingRootContextProp === void 0 && internalStoreRef.current === null) {
5334      internalStoreRef.current = new FloatingRootStore({
5335        open,
5336        transitionStatus: void 0,
5337        referenceElement,
5338        floatingElement,
5339        triggerElements,
5340        onOpenChange: handleOpenChange,
5341        floatingId,
5342        syncOnly: true,
5343        nested
5344      });
5345    }
5346    const store2 = floatingRootContextProp ?? internalStoreRef.current;
5347    popupStore.useSyncedValue("floatingId", floatingId);
5348    useIsoLayoutEffect(() => {
5349      const valuesToSync = {
5350        open,
5351        floatingId,
5352        referenceElement,
5353        floatingElement
5354      };
5355      if (isElement(referenceElement)) {
5356        valuesToSync.domReferenceElement = referenceElement;
5357      }
5358      if (store2.state.positionReference === store2.state.referenceElement) {
5359        valuesToSync.positionReference = referenceElement;
5360      }
5361      store2.update(valuesToSync);
5362    }, [open, floatingId, referenceElement, floatingElement, store2]);
5363    store2.context.onOpenChange = handleOpenChange;
5364    store2.context.nested = nested;
5365    return store2;
5366  }
5367  
5368  // node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
5369  var FOCUSABLE_POPUP_PROPS = {
5370    tabIndex: -1,
5371    [FOCUSABLE_ATTRIBUTE]: ""
5372  };
5373  function usePopupRootStore(createStore, treatPopupAsFloatingElement = false) {
5374    const floatingId = useId();
5375    const nested = useFloatingParentNodeId() != null;
5376    const store2 = useRefWithInit(() => createStore(floatingId, nested)).current;
5377    useSyncedFloatingRootContext({
5378      popupStore: store2,
5379      treatPopupAsFloatingElement,
5380      floatingRootContext: store2.state.floatingRootContext,
5381      floatingId,
5382      nested,
5383      onOpenChange: store2.setOpen
5384    });
5385    return store2;
5386  }
5387  function PopupHandleAttachment({
5388    handle,
5389    store: store2
5390  }) {
5391    useIsoLayoutEffect(() => {
5392      return handle.attachStore(store2);
5393    }, [handle, store2]);
5394    return null;
5395  }
5396  function useTriggerRegistration(id, store2) {
5397    const registeredElementIdRef = React25.useRef(null);
5398    const registeredElementRef = React25.useRef(null);
5399    return React25.useCallback((element) => {
5400      if (id === void 0) {
5401        return;
5402      }
5403      let shouldSyncTriggerCount = false;
5404      if (registeredElementIdRef.current !== null) {
5405        const registeredId = registeredElementIdRef.current;
5406        const registeredElement = registeredElementRef.current;
5407        const currentElement = store2.context.triggerElements.getById(registeredId);
5408        if (registeredElement && currentElement === registeredElement) {
5409          store2.context.triggerElements.delete(registeredId);
5410          shouldSyncTriggerCount = true;
5411        }
5412        registeredElementIdRef.current = null;
5413        registeredElementRef.current = null;
5414      }
5415      if (element !== null) {
5416        registeredElementIdRef.current = id;
5417        registeredElementRef.current = element;
5418        store2.context.triggerElements.add(id, element);
5419        shouldSyncTriggerCount = true;
5420      }
5421      if (shouldSyncTriggerCount) {
5422        const triggerCount = store2.context.triggerElements.size;
5423        if (store2.select("open") && store2.state.triggerCount !== triggerCount) {
5424          store2.set("triggerCount", triggerCount);
5425        }
5426      }
5427    }, [store2, id]);
5428  }
5429  function setPopupOpenState(state, open, trigger, preventUnmountOnClose = false) {
5430    if (open) {
5431      state.preventUnmountingOnClose = false;
5432    } else if (preventUnmountOnClose) {
5433      state.preventUnmountingOnClose = true;
5434    }
5435    const triggerId = trigger?.id ?? null;
5436    if (triggerId || open) {
5437      state.activeTriggerId = triggerId;
5438      state.activeTriggerElement = trigger ?? null;
5439    }
5440  }
5441  function attachPreventUnmountOnClose(eventDetails) {
5442    let preventUnmountOnClose = false;
5443    eventDetails.preventUnmountOnClose = () => {
5444      preventUnmountOnClose = true;
5445    };
5446    return () => preventUnmountOnClose;
5447  }
5448  function applyPopupOpenChange(store2, nextOpen, eventDetails, options = {}) {
5449    const reason = eventDetails.reason;
5450    const isHover = reason === reason_parts_exports.triggerHover;
5451    const isFocusOpen = nextOpen && reason === reason_parts_exports.triggerFocus;
5452    const isDismissClose = !nextOpen && (reason === reason_parts_exports.triggerPress || reason === reason_parts_exports.escapeKey);
5453    const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);
5454    store2.context.onOpenChange?.(nextOpen, eventDetails);
5455    if (eventDetails.isCanceled) {
5456      return;
5457    }
5458    options.onBeforeDispatch?.();
5459    store2.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);
5460    const changeState = () => {
5461      const updatedState = {
5462        ...options.extraState,
5463        open: nextOpen
5464      };
5465      if (isFocusOpen) {
5466        updatedState.instantType = "focus";
5467      } else if (isDismissClose) {
5468        updatedState.instantType = "dismiss";
5469      } else if (isHover) {
5470        updatedState.instantType = void 0;
5471      }
5472      setPopupOpenState(updatedState, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());
5473      store2.update(updatedState);
5474    };
5475    if (isHover) {
5476      ReactDOM4.flushSync(changeState);
5477    } else {
5478      changeState();
5479    }
5480  }
5481  function useTriggerDataForwarding(triggerId, triggerElementRef, store2, stateUpdates) {
5482    const isMountedByThisTrigger = store2.useState("isMountedByTrigger", triggerId);
5483    const baseRegisterTrigger = useTriggerRegistration(triggerId, store2);
5484    const applyTriggerData = useStableCallback((element) => {
5485      const open = store2.select("open");
5486      const activeTriggerId = store2.select("activeTriggerId");
5487      if (activeTriggerId === triggerId) {
5488        store2.update({
5489          activeTriggerElement: element,
5490          ...open ? stateUpdates : null
5491        });
5492        return;
5493      }
5494      if (activeTriggerId == null && open) {
5495        store2.update({
5496          activeTriggerId: triggerId,
5497          activeTriggerElement: element,
5498          ...stateUpdates
5499        });
5500      }
5501    });
5502    const registerTrigger = React25.useCallback((element) => {
5503      baseRegisterTrigger(element);
5504      if (element) {
5505        applyTriggerData(element);
5506      }
5507    }, [baseRegisterTrigger, applyTriggerData]);
5508    useIsoLayoutEffect(() => {
5509      if (isMountedByThisTrigger) {
5510        store2.update({
5511          activeTriggerElement: triggerElementRef.current,
5512          ...stateUpdates
5513        });
5514      }
5515    }, [isMountedByThisTrigger, store2, triggerElementRef, ...Object.values(stateUpdates)]);
5516    return {
5517      registerTrigger,
5518      isMountedByThisTrigger
5519    };
5520  }
5521  function useImplicitActiveTrigger(store2, options = {}) {
5522    const {
5523      closeOnActiveTriggerUnmount = false
5524    } = options;
5525    const resolvedActiveTriggerIdRef = React25.useRef(null);
5526    const open = store2.useState("open");
5527    const reactiveTriggerCount = store2.useState("triggerCount");
5528    const activeTriggerId = store2.useState("activeTriggerId");
5529    const reactiveActiveTriggerElement = store2.useState("activeTriggerElement");
5530    useIsoLayoutEffect(() => {
5531      if (!open) {
5532        resolvedActiveTriggerIdRef.current = null;
5533        if (store2.state.triggerCount !== 0) {
5534          store2.set("triggerCount", 0);
5535        }
5536        return;
5537      }
5538      const triggerCount = store2.context.triggerElements.size;
5539      const stateUpdates = {};
5540      if (store2.state.triggerCount !== triggerCount) {
5541        stateUpdates.triggerCount = triggerCount;
5542      }
5543      const currentActiveTriggerId = store2.select("activeTriggerId");
5544      let lostActiveTriggerId = null;
5545      if (currentActiveTriggerId) {
5546        const activeTriggerElement = store2.context.triggerElements.getById(currentActiveTriggerId);
5547        if (!activeTriggerElement) {
5548          for (const [triggerId, triggerElement] of store2.context.triggerElements.entries()) {
5549            if (triggerElement === store2.state.activeTriggerElement) {
5550              stateUpdates.activeTriggerId = triggerId;
5551              stateUpdates.activeTriggerElement = triggerElement;
5552              resolvedActiveTriggerIdRef.current = triggerId;
5553              break;
5554            }
5555          }
5556          if (stateUpdates.activeTriggerId === void 0) {
5557            if (resolvedActiveTriggerIdRef.current === currentActiveTriggerId) {
5558              lostActiveTriggerId = currentActiveTriggerId;
5559            } else {
5560              resolvedActiveTriggerIdRef.current = null;
5561            }
5562          }
5563        } else {
5564          resolvedActiveTriggerIdRef.current = currentActiveTriggerId;
5565          if (activeTriggerElement !== store2.state.activeTriggerElement) {
5566            stateUpdates.activeTriggerElement = activeTriggerElement;
5567          }
5568        }
5569      } else {
5570        resolvedActiveTriggerIdRef.current = null;
5571      }
5572      if (!lostActiveTriggerId && !currentActiveTriggerId && triggerCount === 1) {
5573        const iteratorResult = store2.context.triggerElements.entries().next();
5574        if (!iteratorResult.done) {
5575          const [implicitTriggerId, implicitTriggerElement] = iteratorResult.value;
5576          stateUpdates.activeTriggerId = implicitTriggerId;
5577          stateUpdates.activeTriggerElement = implicitTriggerElement;
5578          resolvedActiveTriggerIdRef.current = implicitTriggerId;
5579        }
5580      }
5581      if (stateUpdates.triggerCount !== void 0 || stateUpdates.activeTriggerId !== void 0 || stateUpdates.activeTriggerElement !== void 0) {
5582        store2.update(stateUpdates);
5583      }
5584      if (lostActiveTriggerId) {
5585        if (closeOnActiveTriggerUnmount) {
5586          queueMicrotask(() => {
5587            if (store2.select("open") && store2.select("activeTriggerId") === lostActiveTriggerId && !store2.context.triggerElements.getById(lostActiveTriggerId)) {
5588              const eventDetails = createChangeEventDetails(reason_parts_exports.none);
5589              store2.setOpen(false, eventDetails);
5590              if (!eventDetails.isCanceled) {
5591                store2.update({
5592                  activeTriggerId: null,
5593                  activeTriggerElement: null
5594                });
5595              }
5596            }
5597          });
5598        }
5599      }
5600    }, [open, store2, reactiveTriggerCount, activeTriggerId, reactiveActiveTriggerElement, closeOnActiveTriggerUnmount]);
5601  }
5602  function useOpenStateTransitions(open, store2, onUnmount) {
5603    const {
5604      mounted,
5605      setMounted,
5606      transitionStatus
5607    } = useTransitionStatus(open);
5608    const preventUnmountingOnClose = store2.useState("preventUnmountingOnClose");
5609    const syncedPreventUnmountingOnClose = open ? false : preventUnmountingOnClose;
5610    store2.useSyncedValues({
5611      mounted,
5612      transitionStatus,
5613      preventUnmountingOnClose: syncedPreventUnmountingOnClose
5614    });
5615    const forceUnmount = useStableCallback(() => {
5616      setMounted(false);
5617      store2.update({
5618        activeTriggerId: null,
5619        activeTriggerElement: null,
5620        mounted: false,
5621        preventUnmountingOnClose: false
5622      });
5623      onUnmount?.();
5624      store2.context.onOpenChangeComplete?.(false);
5625    });
5626    useOpenChangeComplete({
5627      enabled: mounted && !open && !syncedPreventUnmountingOnClose,
5628      open,
5629      ref: store2.context.popupRef,
5630      onComplete() {
5631        if (!open) {
5632          forceUnmount();
5633        }
5634      }
5635    });
5636    return {
5637      forceUnmount,
5638      transitionStatus
5639    };
5640  }
5641  function usePopupInteractionProps(store2, statePart) {
5642    store2.useSyncedValues(statePart);
5643    useIsoLayoutEffect(() => () => {
5644      store2.update({
5645        activeTriggerProps: EMPTY_OBJECT,
5646        inactiveTriggerProps: EMPTY_OBJECT,
5647        popupProps: EMPTY_OBJECT
5648      });
5649    }, [store2]);
5650  }
5651  
5652  // node_modules/@base-ui/react/utils/popups/popupTriggerMap.mjs
5653  var devElementIdsByMap;
5654  function getDevElementIds(map) {
5655    devElementIdsByMap ??= /* @__PURE__ */ new WeakMap();
5656    let elementIds = devElementIdsByMap.get(map);
5657    if (!elementIds) {
5658      elementIds = /* @__PURE__ */ new WeakMap();
5659      devElementIdsByMap.set(map, elementIds);
5660    }
5661    return elementIds;
5662  }
5663  var PopupTriggerMap = class {
5664    constructor() {
5665      this.idMap = /* @__PURE__ */ new Map();
5666    }
5667    /**
5668     * Adds a trigger element with the given ID.
5669     *
5670     * Note: The provided element is assumed to not be registered under multiple IDs.
5671     */
5672    add(id, element) {
5673      if (true) {
5674        const elementIds = getDevElementIds(this);
5675        const existingId = elementIds.get(element);
5676        if (existingId !== void 0 && existingId !== id) {
5677          throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");
5678        }
5679        const previousElement = this.idMap.get(id);
5680        if (previousElement !== void 0 && previousElement !== element) {
5681          elementIds.delete(previousElement);
5682        }
5683        elementIds.set(element, id);
5684      }
5685      this.idMap.set(id, element);
5686    }
5687    /**
5688     * Removes the trigger element with the given ID.
5689     */
5690    delete(id) {
5691      if (true) {
5692        const element = this.idMap.get(id);
5693        if (element !== void 0) {
5694          devElementIdsByMap?.get(this)?.delete(element);
5695        }
5696      }
5697      this.idMap.delete(id);
5698    }
5699    /**
5700     * Whether the given element is registered as a trigger.
5701     */
5702    hasElement(element) {
5703      for (const registered of this.idMap.values()) {
5704        if (registered === element) {
5705          return true;
5706        }
5707      }
5708      return false;
5709    }
5710    /**
5711     * Whether there is a registered trigger element matching the given predicate.
5712     */
5713    hasMatchingElement(predicate) {
5714      for (const element of this.idMap.values()) {
5715        if (predicate(element)) {
5716          return true;
5717        }
5718      }
5719      return false;
5720    }
5721    /**
5722     * Returns the trigger element associated with the given ID, or undefined if no such element exists.
5723     */
5724    getById(id) {
5725      return this.idMap.get(id);
5726    }
5727    /**
5728     * Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element].
5729     */
5730    entries() {
5731      return this.idMap.entries();
5732    }
5733    /**
5734     * Returns an iterable of all registered trigger elements.
5735     */
5736    elements() {
5737      return this.idMap.values();
5738    }
5739    /**
5740     * Returns the number of registered trigger elements.
5741     */
5742    get size() {
5743      return this.idMap.size;
5744    }
5745  };
5746  
5747  // node_modules/@base-ui/react/floating-ui-react/utils/getEmptyRootContext.mjs
5748  function getEmptyRootContext() {
5749    return new FloatingRootStore({
5750      open: false,
5751      transitionStatus: void 0,
5752      floatingElement: null,
5753      referenceElement: null,
5754      triggerElements: new PopupTriggerMap(),
5755      floatingId: void 0,
5756      syncOnly: false,
5757      nested: false,
5758      onOpenChange: void 0
5759    });
5760  }
5761  
5762  // node_modules/@base-ui/react/utils/popups/store.mjs
5763  function createInitialPopupStoreState() {
5764    return {
5765      open: false,
5766      openProp: void 0,
5767      mounted: false,
5768      transitionStatus: void 0,
5769      floatingRootContext: getEmptyRootContext(),
5770      floatingId: void 0,
5771      triggerCount: 0,
5772      preventUnmountingOnClose: false,
5773      payload: void 0,
5774      activeTriggerId: null,
5775      activeTriggerElement: null,
5776      triggerIdProp: void 0,
5777      popupElement: null,
5778      positionerElement: null,
5779      activeTriggerProps: EMPTY_OBJECT,
5780      inactiveTriggerProps: EMPTY_OBJECT,
5781      popupProps: EMPTY_OBJECT
5782    };
5783  }
5784  function createPopupFloatingRootContext(triggerElements, floatingId, nested = false) {
5785    return new FloatingRootStore({
5786      open: false,
5787      transitionStatus: void 0,
5788      floatingElement: null,
5789      referenceElement: null,
5790      triggerElements,
5791      floatingId,
5792      syncOnly: true,
5793      nested,
5794      onOpenChange: void 0
5795    });
5796  }
5797  var activeTriggerIdSelector = (state) => state.triggerIdProp ?? state.activeTriggerId;
5798  var openSelector = (state) => state.openProp ?? state.open;
5799  var popupIdSelector = (state) => {
5800    const popupId = state.popupElement?.id ?? state.floatingId;
5801    return popupId || void 0;
5802  };
5803  function triggerOwnsOpenPopup(state, triggerId) {
5804    return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) === triggerId;
5805  }
5806  function triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) {
5807    if (triggerOwnsOpenPopup(state, triggerId)) {
5808      return true;
5809    }
5810    return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) == null && state.triggerCount === 1;
5811  }
5812  var popupStoreSelectors = {
5813    open: openSelector,
5814    mounted: (state) => state.mounted,
5815    transitionStatus: (state) => state.transitionStatus,
5816    floatingRootContext: (state) => state.floatingRootContext,
5817    triggerCount: (state) => state.triggerCount,
5818    preventUnmountingOnClose: (state) => state.preventUnmountingOnClose,
5819    payload: (state) => state.payload,
5820    activeTriggerId: activeTriggerIdSelector,
5821    activeTriggerElement: (state) => state.mounted ? state.activeTriggerElement : null,
5822    popupId: popupIdSelector,
5823    /**
5824     * Whether the trigger with the given ID was used to open the popup.
5825     */
5826    isTriggerActive: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId,
5827    /**
5828     * Whether the popup is open and was activated by a trigger with the given ID.
5829     */
5830    isOpenedByTrigger: (state, triggerId) => triggerOwnsOpenPopup(state, triggerId),
5831    /**
5832     * Whether the popup is mounted and was activated by a trigger with the given ID.
5833     */
5834    isMountedByTrigger: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId && state.mounted,
5835    triggerProps: (state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps,
5836    /**
5837     * Popup id for the trigger that currently owns the open popup.
5838     */
5839    triggerPopupId: (state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : void 0,
5840    popupProps: (state) => state.popupProps,
5841    popupElement: (state) => state.popupElement,
5842    positionerElement: (state) => state.positionerElement
5843  };
5844  
5845  // node_modules/@base-ui/react/utils/popups/usePopupHandleStore.mjs
5846  var React26 = __toESM(require_react(), 1);
5847  var import_shim2 = __toESM(require_shim(), 1);
5848  function usePopupHandleStore(handle) {
5849    const subscribe = React26.useCallback((listener) => {
5850      if (handle === void 0) {
5851        return NOOP;
5852      }
5853      return handle.subscribeStore(listener);
5854    }, [handle]);
5855    const getSnapshot = React26.useCallback(() => {
5856      return handle === void 0 ? void 0 : handle.store;
5857    }, [handle]);
5858    return (0, import_shim2.useSyncExternalStore)(subscribe, getSnapshot, () => handle?.serverStore);
5859  }
5860  
5861  // node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
5862  function useBaseUIFloating(options) {
5863    return useFloatingWithStore(options, options.rootContext);
5864  }
5865  function useFloatingWithStore(options, store2) {
5866    const {
5867      nodeId,
5868      externalTree
5869    } = options;
5870    const referenceElement = store2.useState("referenceElement");
5871    const floatingElement = store2.useState("floatingElement");
5872    const domReferenceElement = store2.useState("domReferenceElement");
5873    const open = store2.useState("open");
5874    const floatingId = store2.useState("floatingId");
5875    const [positionReference, setPositionReferenceRaw] = React27.useState(null);
5876    const [localDomReference, setLocalDomReference] = React27.useState(void 0);
5877    const [localFloatingElement, setLocalFloatingElement] = React27.useState(void 0);
5878    const domReferenceRef = React27.useRef(null);
5879    const tree = useFloatingTree(externalTree);
5880    const storeElements = React27.useMemo(() => ({
5881      reference: referenceElement,
5882      floating: floatingElement,
5883      domReference: domReferenceElement
5884    }), [referenceElement, floatingElement, domReferenceElement]);
5885    const position = useFloating({
5886      ...options,
5887      elements: {
5888        ...storeElements,
5889        ...positionReference && {
5890          reference: positionReference
5891        }
5892      }
5893    });
5894    const localDomReferenceElement = isElement(localDomReference) ? localDomReference : null;
5895    const syncedFloatingElement = localFloatingElement === void 0 ? store2.state.floatingElement : localFloatingElement;
5896    store2.useSyncedValue("referenceElement", localDomReference ?? null);
5897    store2.useSyncedValue("domReferenceElement", localDomReference === void 0 ? domReferenceElement : localDomReferenceElement);
5898    store2.useSyncedValue("floatingElement", syncedFloatingElement);
5899    const setPositionReference = React27.useCallback((node) => {
5900      const computedPositionReference = isElement(node) ? {
5901        getBoundingClientRect: () => node.getBoundingClientRect(),
5902        getClientRects: () => node.getClientRects(),
5903        contextElement: node
5904      } : node;
5905      setPositionReferenceRaw(computedPositionReference);
5906      position.refs.setReference(computedPositionReference);
5907    }, [position.refs]);
5908    const setReference = React27.useCallback((node) => {
5909      if (isElement(node) || node === null) {
5910        domReferenceRef.current = node;
5911        setLocalDomReference(node);
5912      }
5913      if (isElement(position.refs.reference.current) || position.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
5914      // `null` to support `positionReference` + an unstable `reference`
5915      // callback ref.
5916      node !== null && !isElement(node)) {
5917        position.refs.setReference(node);
5918      }
5919    }, [position.refs, setLocalDomReference]);
5920    const setFloating = React27.useCallback((node) => {
5921      setLocalFloatingElement(node);
5922      position.refs.setFloating(node);
5923    }, [position.refs]);
5924    const refs = React27.useMemo(() => ({
5925      ...position.refs,
5926      setReference,
5927      setFloating,
5928      setPositionReference,
5929      domReference: domReferenceRef
5930    }), [position.refs, setReference, setFloating, setPositionReference]);
5931    const elements = React27.useMemo(() => ({
5932      ...position.elements,
5933      domReference: domReferenceElement
5934    }), [position.elements, domReferenceElement]);
5935    const context = React27.useMemo(() => ({
5936      ...position,
5937      dataRef: store2.context.dataRef,
5938      open,
5939      onOpenChange: store2.setOpen,
5940      events: store2.context.events,
5941      floatingId,
5942      refs,
5943      elements,
5944      nodeId,
5945      rootStore: store2
5946    }), [position, refs, elements, nodeId, store2, open, floatingId]);
5947    useIsoLayoutEffect(() => {
5948      if (domReferenceElement) {
5949        domReferenceRef.current = domReferenceElement;
5950      }
5951    }, [domReferenceElement]);
5952    useIsoLayoutEffect(() => {
5953      store2.context.dataRef.current.floatingContext = context;
5954      const node = tree?.nodesRef.current.find((n) => n.id === nodeId);
5955      if (node) {
5956        node.context = context;
5957      }
5958    });
5959    return React27.useMemo(() => ({
5960      ...position,
5961      context,
5962      refs,
5963      elements,
5964      rootStore: store2
5965    }), [position, refs, elements, context, store2]);
5966  }
5967  
5968  // node_modules/@base-ui/react/floating-ui-react/hooks/useFocus.mjs
5969  var React28 = __toESM(require_react(), 1);
5970  var isMacSafari = parts_exports.os.mac && parts_exports.engine.webkit;
5971  function useFocus(context, props = {}) {
5972    const {
5973      enabled = true,
5974      delay
5975    } = props;
5976    const store2 = "rootStore" in context ? context.rootStore : context;
5977    const {
5978      events,
5979      dataRef
5980    } = store2.context;
5981    const blockFocusRef = React28.useRef(false);
5982    const blockedReferenceRef = React28.useRef(null);
5983    const keyboardModalityRef = React28.useRef(true);
5984    const timeout = useTimeout();
5985    React28.useEffect(() => {
5986      const domReference = store2.select("domReferenceElement");
5987      if (!enabled) {
5988        return void 0;
5989      }
5990      const win = getWindow(domReference);
5991      function onBlur() {
5992        const currentDomReference = store2.select("domReferenceElement");
5993        if (!store2.select("open") && isHTMLElement(currentDomReference) && currentDomReference === activeElement(ownerDocument(currentDomReference))) {
5994          blockFocusRef.current = true;
5995        }
5996      }
5997      function onKeyDown() {
5998        keyboardModalityRef.current = true;
5999      }
6000      function onPointerDown() {
6001        keyboardModalityRef.current = false;
6002      }
6003      return mergeCleanups(addEventListener(win, "blur", onBlur), isMacSafari && addEventListener(win, "keydown", onKeyDown, true), isMacSafari && addEventListener(win, "pointerdown", onPointerDown, true));
6004    }, [store2, enabled]);
6005    React28.useEffect(() => {
6006      if (!enabled) {
6007        return void 0;
6008      }
6009      function onOpenChangeLocal(details) {
6010        if (details.reason === reason_parts_exports.triggerPress || details.reason === reason_parts_exports.escapeKey) {
6011          const referenceElement = store2.select("domReferenceElement");
6012          if (isElement(referenceElement)) {
6013            blockedReferenceRef.current = referenceElement;
6014            blockFocusRef.current = true;
6015          }
6016        }
6017      }
6018      events.on("openchange", onOpenChangeLocal);
6019      return () => {
6020        events.off("openchange", onOpenChangeLocal);
6021      };
6022    }, [events, enabled, store2]);
6023    const reference = React28.useMemo(() => {
6024      function resetBlockedFocus() {
6025        blockFocusRef.current = false;
6026        blockedReferenceRef.current = null;
6027      }
6028      return {
6029        onMouseLeave() {
6030          resetBlockedFocus();
6031        },
6032        onFocus(event) {
6033          const focusTarget = event.currentTarget;
6034          if (blockFocusRef.current) {
6035            if (blockedReferenceRef.current === focusTarget) {
6036              return;
6037            }
6038            resetBlockedFocus();
6039          }
6040          const target = getTarget(event.nativeEvent);
6041          if (isElement(target)) {
6042            if (isMacSafari && !event.relatedTarget) {
6043              if (!keyboardModalityRef.current && !isTypeableElement(target)) {
6044                return;
6045              }
6046            } else if (!matchesFocusVisible(target)) {
6047              return;
6048            }
6049          }
6050          const movedFromOtherEnabledTrigger = isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements);
6051          const {
6052            nativeEvent,
6053            currentTarget
6054          } = event;
6055          const delayValue = typeof delay === "function" ? delay() : delay;
6056          if (store2.select("open") && movedFromOtherEnabledTrigger || delayValue === 0 || delayValue === void 0) {
6057            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
6058            return;
6059          }
6060          timeout.start(delayValue, () => {
6061            if (blockFocusRef.current) {
6062              return;
6063            }
6064            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
6065          });
6066        },
6067        onBlur(event) {
6068          resetBlockedFocus();
6069          const relatedTarget = event.relatedTarget;
6070          const nativeEvent = event.nativeEvent;
6071          const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute("focus-guard")) && relatedTarget.getAttribute("data-type") === "outside";
6072          timeout.start(0, () => {
6073            const domReference = store2.select("domReferenceElement");
6074            const activeEl = activeElement(ownerDocument(domReference));
6075            if (!relatedTarget && activeEl === domReference) {
6076              return;
6077            }
6078            if (contains(dataRef.current.floatingContext?.refs.floating.current, activeEl) || contains(domReference, activeEl) || movedToFocusGuard) {
6079              return;
6080            }
6081            const nextFocusedElement = relatedTarget ?? activeEl;
6082            if (isTargetInsideEnabledTrigger(nextFocusedElement, store2.context.triggerElements)) {
6083              return;
6084            }
6085            store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent));
6086          });
6087        }
6088      };
6089    }, [dataRef, delay, store2, timeout]);
6090    return React28.useMemo(() => enabled ? {
6091      reference,
6092      trigger: reference
6093    } : {}, [enabled, reference]);
6094  }
6095  
6096  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
6097  var React29 = __toESM(require_react(), 1);
6098  
6099  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverInteractionSharedState.mjs
6100  var HoverInteraction = class _HoverInteraction {
6101    constructor() {
6102      this.pointerType = void 0;
6103      this.interactedInside = false;
6104      this.handler = void 0;
6105      this.blockMouseMove = true;
6106      this.performedPointerEventsMutation = false;
6107      this.pointerEventsScopeElement = null;
6108      this.pointerEventsReferenceElement = null;
6109      this.pointerEventsFloatingElement = null;
6110      this.restTimeoutPending = false;
6111      this.openChangeTimeout = new Timeout();
6112      this.restTimeout = new Timeout();
6113      this.handleCloseOptions = void 0;
6114    }
6115    static create() {
6116      return new _HoverInteraction();
6117    }
6118    dispose = () => {
6119      this.openChangeTimeout.clear();
6120      this.restTimeout.clear();
6121    };
6122    disposeEffect = () => {
6123      return this.dispose;
6124    };
6125  };
6126  var pointerEventsMutationOwnerByScopeElement = /* @__PURE__ */ new WeakMap();
6127  function clearSafePolygonPointerEventsMutation(instance) {
6128    if (!instance.performedPointerEventsMutation) {
6129      return;
6130    }
6131    const scopeElement = instance.pointerEventsScopeElement;
6132    if (scopeElement && pointerEventsMutationOwnerByScopeElement.get(scopeElement) === instance) {
6133      instance.pointerEventsScopeElement?.style.removeProperty("pointer-events");
6134      instance.pointerEventsReferenceElement?.style.removeProperty("pointer-events");
6135      instance.pointerEventsFloatingElement?.style.removeProperty("pointer-events");
6136      pointerEventsMutationOwnerByScopeElement.delete(scopeElement);
6137    }
6138    instance.performedPointerEventsMutation = false;
6139    instance.pointerEventsScopeElement = null;
6140    instance.pointerEventsReferenceElement = null;
6141    instance.pointerEventsFloatingElement = null;
6142  }
6143  function applySafePolygonPointerEventsMutation(instance, options) {
6144    const {
6145      scopeElement,
6146      referenceElement,
6147      floatingElement
6148    } = options;
6149    const existingOwner = pointerEventsMutationOwnerByScopeElement.get(scopeElement);
6150    if (existingOwner && existingOwner !== instance) {
6151      clearSafePolygonPointerEventsMutation(existingOwner);
6152    }
6153    clearSafePolygonPointerEventsMutation(instance);
6154    instance.performedPointerEventsMutation = true;
6155    instance.pointerEventsScopeElement = scopeElement;
6156    instance.pointerEventsReferenceElement = referenceElement;
6157    instance.pointerEventsFloatingElement = floatingElement;
6158    pointerEventsMutationOwnerByScopeElement.set(scopeElement, instance);
6159    scopeElement.style.pointerEvents = "none";
6160    referenceElement.style.pointerEvents = "auto";
6161    floatingElement.style.pointerEvents = "auto";
6162  }
6163  function useHoverInteractionSharedState(store2) {
6164    const data = store2.context.dataRef.current;
6165    const instance = useRefWithInit(() => data.hoverInteractionState ?? HoverInteraction.create()).current;
6166    if (!data.hoverInteractionState) {
6167      data.hoverInteractionState = instance;
6168    }
6169    useOnMount(data.hoverInteractionState.disposeEffect);
6170    return data.hoverInteractionState;
6171  }
6172  
6173  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
6174  function useHoverFloatingInteraction(context, parameters = {}) {
6175    const {
6176      enabled = true,
6177      closeDelay: closeDelayProp = 0,
6178      nodeId: nodeIdProp
6179    } = parameters;
6180    const store2 = "rootStore" in context ? context.rootStore : context;
6181    const open = store2.useState("open");
6182    const floatingElement = store2.useState("floatingElement");
6183    const domReferenceElement = store2.useState("domReferenceElement");
6184    const {
6185      dataRef
6186    } = store2.context;
6187    const tree = useFloatingTree();
6188    const parentId = useFloatingParentNodeId();
6189    const instance = useHoverInteractionSharedState(store2);
6190    const childClosedTimeout = useTimeout();
6191    const isClickLikeOpenEvent2 = useStableCallback(() => {
6192      return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
6193    });
6194    const isHoverOpen = useStableCallback(() => {
6195      return isHoverOpenEvent(dataRef.current.openEvent?.type);
6196    });
6197    const clearPointerEvents = useStableCallback(() => {
6198      clearSafePolygonPointerEventsMutation(instance);
6199    });
6200    useIsoLayoutEffect(() => {
6201      if (!open) {
6202        instance.pointerType = void 0;
6203        instance.restTimeoutPending = false;
6204        instance.interactedInside = false;
6205        clearPointerEvents();
6206      }
6207    }, [open, instance, clearPointerEvents]);
6208    React29.useEffect(() => {
6209      return clearPointerEvents;
6210    }, [clearPointerEvents]);
6211    useIsoLayoutEffect(() => {
6212      if (!enabled) {
6213        return void 0;
6214      }
6215      if (open && instance.handleCloseOptions?.blockPointerEvents && isHoverOpen() && isElement(domReferenceElement) && floatingElement) {
6216        const ref = domReferenceElement;
6217        const floatingEl = floatingElement;
6218        const doc = ownerDocument(floatingElement);
6219        const parentFloating = tree?.nodesRef.current.find((node) => node.id === parentId)?.context?.elements.floating;
6220        if (parentFloating) {
6221          parentFloating.style.pointerEvents = "";
6222        }
6223        const cachedScopeElement = instance.pointerEventsScopeElement !== floatingEl ? instance.pointerEventsScopeElement : null;
6224        const parentScopeElement = parentFloating !== floatingEl ? parentFloating : null;
6225        const scopeElement = instance.handleCloseOptions?.getScope?.() ?? cachedScopeElement ?? parentScopeElement ?? ref.closest("[data-rootownerid]") ?? doc.body;
6226        applySafePolygonPointerEventsMutation(instance, {
6227          scopeElement,
6228          referenceElement: ref,
6229          floatingElement: floatingEl
6230        });
6231        return () => {
6232          clearPointerEvents();
6233        };
6234      }
6235      return void 0;
6236    }, [enabled, open, domReferenceElement, floatingElement, instance, isHoverOpen, tree, parentId, clearPointerEvents]);
6237    React29.useEffect(() => {
6238      if (!enabled) {
6239        return void 0;
6240      }
6241      function hasParentChildren() {
6242        return !!(tree && parentId && getNodeChildren(tree.nodesRef.current, parentId).length > 0);
6243      }
6244      function closeWithDelay(event) {
6245        const closeDelay = getDelay(closeDelayProp, "close", instance.pointerType);
6246        const close = () => {
6247          store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6248          tree?.events.emit("floating.closed", event);
6249        };
6250        if (closeDelay) {
6251          instance.openChangeTimeout.start(closeDelay, close);
6252        } else {
6253          instance.openChangeTimeout.clear();
6254          close();
6255        }
6256      }
6257      function handleInteractInside(event) {
6258        const target = getTarget(event);
6259        if (!isInteractiveElement(target)) {
6260          instance.interactedInside = false;
6261          return;
6262        }
6263        instance.interactedInside = target?.closest("[aria-haspopup]") != null;
6264      }
6265      function onFloatingMouseEnter() {
6266        instance.openChangeTimeout.clear();
6267        childClosedTimeout.clear();
6268        tree?.events.off("floating.closed", onNodeClosed);
6269        clearPointerEvents();
6270      }
6271      function onFloatingMouseLeave(event) {
6272        if (hasParentChildren() && tree) {
6273          tree.events.on("floating.closed", onNodeClosed);
6274          return;
6275        }
6276        if (isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements)) {
6277          return;
6278        }
6279        const currentNodeId = dataRef.current.floatingContext?.nodeId ?? nodeIdProp;
6280        const relatedTarget = event.relatedTarget;
6281        const isMovingIntoDescendantFloating = tree && currentNodeId && isElement(relatedTarget) && getNodeChildren(tree.nodesRef.current, currentNodeId, false).some((node) => contains(node.context?.elements.floating, relatedTarget));
6282        if (isMovingIntoDescendantFloating) {
6283          return;
6284        }
6285        if (instance.handler) {
6286          instance.handler(event);
6287          return;
6288        }
6289        clearPointerEvents();
6290        if (isHoverOpen() && !isClickLikeOpenEvent2()) {
6291          closeWithDelay(event);
6292        }
6293      }
6294      function onNodeClosed(event) {
6295        if (!tree || !parentId || hasParentChildren()) {
6296          return;
6297        }
6298        childClosedTimeout.start(0, () => {
6299          tree.events.off("floating.closed", onNodeClosed);
6300          store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6301          tree.events.emit("floating.closed", event);
6302        });
6303      }
6304      const floating = floatingElement;
6305      return mergeCleanups(floating && addEventListener(floating, "mouseenter", onFloatingMouseEnter), floating && addEventListener(floating, "mouseleave", onFloatingMouseLeave), floating && addEventListener(floating, "pointerdown", handleInteractInside, true), () => {
6306        tree?.events.off("floating.closed", onNodeClosed);
6307      });
6308    }, [enabled, floatingElement, store2, dataRef, closeDelayProp, nodeIdProp, isHoverOpen, isClickLikeOpenEvent2, clearPointerEvents, instance, tree, parentId, childClosedTimeout]);
6309  }
6310  
6311  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverReferenceInteraction.mjs
6312  var React30 = __toESM(require_react(), 1);
6313  var ReactDOM5 = __toESM(require_react_dom(), 1);
6314  var EMPTY_REF = {
6315    current: null
6316  };
6317  function useHoverReferenceInteraction(context, props = {}) {
6318    const {
6319      enabled = true,
6320      delay = 0,
6321      handleClose = null,
6322      mouseOnly = false,
6323      restMs = 0,
6324      move = true,
6325      triggerElementRef = EMPTY_REF,
6326      externalTree,
6327      isActiveTrigger = true,
6328      getHandleCloseContext,
6329      isClosing,
6330      shouldOpen: shouldOpenProp,
6331      guardStaleOpen = false
6332    } = props;
6333    const store2 = "rootStore" in context ? context.rootStore : context;
6334    const {
6335      dataRef,
6336      events
6337    } = store2.context;
6338    const tree = useFloatingTree(externalTree);
6339    const instance = useHoverInteractionSharedState(store2);
6340    const isHoverCloseActiveRef = React30.useRef(false);
6341    const handleCloseRef = useValueAsRef(handleClose);
6342    const delayRef = useValueAsRef(delay);
6343    const restMsRef = useValueAsRef(restMs);
6344    const enabledRef = useValueAsRef(enabled);
6345    const shouldOpenRef = useValueAsRef(shouldOpenProp);
6346    const isClosingRef = useValueAsRef(isClosing);
6347    const isClickLikeOpenEvent2 = useStableCallback(() => {
6348      return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
6349    });
6350    const checkShouldOpen = useStableCallback(() => {
6351      return shouldOpenRef.current?.() !== false;
6352    });
6353    const isOverInactiveTrigger = useStableCallback((currentDomReference, currentTarget, target) => {
6354      const allTriggers = store2.context.triggerElements;
6355      if (allTriggers.hasElement(currentTarget)) {
6356        return !currentDomReference || !contains(currentDomReference, currentTarget);
6357      }
6358      if (!isElement(target)) {
6359        return false;
6360      }
6361      const targetElement = target;
6362      return allTriggers.hasMatchingElement((trigger) => contains(trigger, targetElement)) && (!currentDomReference || !contains(currentDomReference, targetElement));
6363    });
6364    const cleanupMouseMoveHandler = useStableCallback(() => {
6365      if (!instance.handler) {
6366        return;
6367      }
6368      const doc = ownerDocument(store2.select("domReferenceElement"));
6369      doc.removeEventListener("mousemove", instance.handler);
6370      instance.handler = void 0;
6371    });
6372    const clearPointerEvents = useStableCallback(() => {
6373      clearSafePolygonPointerEventsMutation(instance);
6374    });
6375    if (isActiveTrigger) {
6376      instance.handleCloseOptions = handleCloseRef.current?.__options;
6377    }
6378    React30.useEffect(() => cleanupMouseMoveHandler, [cleanupMouseMoveHandler]);
6379    React30.useEffect(() => {
6380      if (!enabled) {
6381        return void 0;
6382      }
6383      function onOpenChangeLocal(details) {
6384        if (!details.open) {
6385          isHoverCloseActiveRef.current = details.reason === reason_parts_exports.triggerHover;
6386          cleanupMouseMoveHandler();
6387          instance.openChangeTimeout.clear();
6388          instance.restTimeout.clear();
6389          instance.blockMouseMove = true;
6390          instance.restTimeoutPending = false;
6391        } else {
6392          isHoverCloseActiveRef.current = false;
6393        }
6394      }
6395      events.on("openchange", onOpenChangeLocal);
6396      return () => {
6397        events.off("openchange", onOpenChangeLocal);
6398      };
6399    }, [enabled, events, instance, cleanupMouseMoveHandler]);
6400    React30.useEffect(() => {
6401      if (!enabled) {
6402        return void 0;
6403      }
6404      function closeWithDelay(event, runElseBranch = true) {
6405        const closeDelay = getDelay(delayRef.current, "close", instance.pointerType);
6406        if (closeDelay) {
6407          instance.openChangeTimeout.start(closeDelay, () => {
6408            store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6409            tree?.events.emit("floating.closed", event);
6410          });
6411        } else if (runElseBranch) {
6412          instance.openChangeTimeout.clear();
6413          store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6414          tree?.events.emit("floating.closed", event);
6415        }
6416      }
6417      const trigger = triggerElementRef.current ?? (isActiveTrigger ? store2.select("domReferenceElement") : null);
6418      if (!isElement(trigger)) {
6419        return void 0;
6420      }
6421      function onMouseEnter(event) {
6422        instance.openChangeTimeout.clear();
6423        instance.blockMouseMove = false;
6424        if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
6425          return;
6426        }
6427        const restMsValue = getRestMs(restMsRef.current);
6428        const openDelay = getDelay(delayRef.current, "open", instance.pointerType);
6429        const eventTarget = getTarget(event);
6430        const currentTarget = event.currentTarget ?? null;
6431        const currentDomReference = store2.select("domReferenceElement");
6432        let triggerNode = currentTarget;
6433        if (isElement(eventTarget) && !store2.context.triggerElements.hasElement(eventTarget)) {
6434          for (const triggerElement of store2.context.triggerElements.elements()) {
6435            if (contains(triggerElement, eventTarget)) {
6436              triggerNode = triggerElement;
6437              break;
6438            }
6439          }
6440        }
6441        if (isElement(currentTarget) && isElement(currentDomReference) && !store2.context.triggerElements.hasElement(currentTarget) && contains(currentTarget, currentDomReference)) {
6442          triggerNode = currentDomReference;
6443        }
6444        const isOverInactive = triggerNode == null ? false : isOverInactiveTrigger(currentDomReference, triggerNode, eventTarget);
6445        const isOpen = store2.select("open");
6446        const isInClosingTransition = isClosingRef.current?.() ?? store2.select("transitionStatus") === "ending";
6447        const isHoverCloseTransition = !isOpen && isInClosingTransition && isHoverCloseActiveRef.current;
6448        const isReenteringSameTriggerDuringCloseTransition = !isOverInactive && isElement(triggerNode) && isElement(currentDomReference) && contains(currentDomReference, triggerNode) && isHoverCloseTransition;
6449        const isRestOnlyDelay = restMsValue > 0 && !openDelay;
6450        const shouldOpenImmediately = isOverInactive && (isOpen || isHoverCloseTransition) || isReenteringSameTriggerDuringCloseTransition;
6451        const shouldOpen = !isOpen || isOverInactive;
6452        if (shouldOpenImmediately) {
6453          if (checkShouldOpen()) {
6454            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6455          }
6456          return;
6457        }
6458        if (isRestOnlyDelay) {
6459          return;
6460        }
6461        if (openDelay) {
6462          instance.openChangeTimeout.start(openDelay, () => {
6463            if (shouldOpen && checkShouldOpen()) {
6464              store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6465            }
6466          });
6467        } else if (shouldOpen) {
6468          if (checkShouldOpen()) {
6469            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6470          }
6471        }
6472      }
6473      function onMouseLeave(event) {
6474        if (isClickLikeOpenEvent2()) {
6475          clearPointerEvents();
6476          return;
6477        }
6478        cleanupMouseMoveHandler();
6479        const domReferenceElement = store2.select("domReferenceElement");
6480        const doc = ownerDocument(domReferenceElement);
6481        instance.restTimeout.clear();
6482        instance.restTimeoutPending = false;
6483        const handleCloseContextBase = dataRef.current.floatingContext ?? getHandleCloseContext?.();
6484        if (isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements)) {
6485          return;
6486        }
6487        if (handleCloseRef.current && handleCloseContextBase) {
6488          if (!store2.select("open")) {
6489            instance.openChangeTimeout.clear();
6490          }
6491          const currentTrigger = triggerElementRef.current;
6492          instance.handler = handleCloseRef.current({
6493            ...handleCloseContextBase,
6494            tree,
6495            x: event.clientX,
6496            y: event.clientY,
6497            onClose() {
6498              clearPointerEvents();
6499              cleanupMouseMoveHandler();
6500              if (enabledRef.current && !isClickLikeOpenEvent2() && currentTrigger === store2.select("domReferenceElement")) {
6501                closeWithDelay(event, true);
6502              }
6503            }
6504          });
6505          doc.addEventListener("mousemove", instance.handler);
6506          instance.handler(event);
6507          return;
6508        }
6509        const shouldClose = instance.pointerType === "touch" ? !contains(store2.select("floatingElement"), event.relatedTarget) : true;
6510        if (shouldClose) {
6511          closeWithDelay(event);
6512        }
6513      }
6514      function onMouseOut(event) {
6515        if (contains(trigger, event.relatedTarget)) {
6516          return;
6517        }
6518        instance.openChangeTimeout.clear();
6519        instance.restTimeout.clear();
6520        instance.restTimeoutPending = false;
6521      }
6522      const staleOpenGuard = guardStaleOpen ? addEventListener(trigger, "mouseout", onMouseOut) : void 0;
6523      if (move) {
6524        return mergeCleanups(addEventListener(trigger, "mousemove", onMouseEnter, {
6525          once: true
6526        }), addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
6527      }
6528      return mergeCleanups(addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
6529    }, [cleanupMouseMoveHandler, clearPointerEvents, dataRef, delayRef, store2, enabled, handleCloseRef, instance, isActiveTrigger, isOverInactiveTrigger, isClickLikeOpenEvent2, mouseOnly, move, restMsRef, triggerElementRef, tree, enabledRef, getHandleCloseContext, isClosingRef, checkShouldOpen, guardStaleOpen]);
6530    return React30.useMemo(() => {
6531      if (!enabled) {
6532        return void 0;
6533      }
6534      function setPointerRef(event) {
6535        instance.pointerType = event.pointerType;
6536      }
6537      return {
6538        onPointerDown: setPointerRef,
6539        onPointerEnter: setPointerRef,
6540        onMouseMove(event) {
6541          const {
6542            nativeEvent
6543          } = event;
6544          const trigger = event.currentTarget;
6545          const currentDomReference = store2.select("domReferenceElement");
6546          const currentOpen = store2.select("open");
6547          const isOverInactive = isOverInactiveTrigger(currentDomReference, trigger, event.target);
6548          if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
6549            return;
6550          }
6551          if (currentOpen && isOverInactive && instance.handleCloseOptions?.blockPointerEvents) {
6552            const floatingElement = store2.select("floatingElement");
6553            if (floatingElement) {
6554              const scopeElement = instance.handleCloseOptions?.getScope?.() ?? trigger.ownerDocument.body;
6555              applySafePolygonPointerEventsMutation(instance, {
6556                scopeElement,
6557                referenceElement: trigger,
6558                floatingElement
6559              });
6560            }
6561          }
6562          const restMsValue = getRestMs(restMsRef.current);
6563          if (currentOpen && !isOverInactive || restMsValue === 0) {
6564            return;
6565          }
6566          if (!isOverInactive && instance.restTimeoutPending && event.movementX ** 2 + event.movementY ** 2 < 2) {
6567            return;
6568          }
6569          instance.restTimeout.clear();
6570          function handleMouseMove() {
6571            instance.restTimeoutPending = false;
6572            if (isClickLikeOpenEvent2()) {
6573              return;
6574            }
6575            const latestOpen = store2.select("open");
6576            if (!instance.blockMouseMove && (!latestOpen || isOverInactive) && checkShouldOpen()) {
6577              store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, nativeEvent, trigger));
6578            }
6579          }
6580          if (instance.pointerType === "touch") {
6581            ReactDOM5.flushSync(() => {
6582              handleMouseMove();
6583            });
6584          } else if (isOverInactive && currentOpen) {
6585            handleMouseMove();
6586          } else {
6587            instance.restTimeoutPending = true;
6588            instance.restTimeout.start(restMsValue, handleMouseMove);
6589          }
6590        }
6591      };
6592    }, [enabled, instance, isClickLikeOpenEvent2, isOverInactiveTrigger, mouseOnly, store2, restMsRef, checkShouldOpen]);
6593  }
6594  
6595  // node_modules/@base-ui/react/floating-ui-react/safePolygon.mjs
6596  var CURSOR_SPEED_THRESHOLD = 0.1;
6597  var CURSOR_SPEED_THRESHOLD_SQUARED = CURSOR_SPEED_THRESHOLD * CURSOR_SPEED_THRESHOLD;
6598  var POLYGON_BUFFER = 0.5;
6599  function hasIntersectingEdge(pointX, pointY, xi, yi, xj, yj) {
6600    return yi >= pointY !== yj >= pointY && pointX <= (xj - xi) * (pointY - yi) / (yj - yi) + xi;
6601  }
6602  function isPointInQuadrilateral(pointX, pointY, x1, y1, x2, y2, x3, y3, x4, y4) {
6603    let isInsideValue = false;
6604    if (hasIntersectingEdge(pointX, pointY, x1, y1, x2, y2)) {
6605      isInsideValue = !isInsideValue;
6606    }
6607    if (hasIntersectingEdge(pointX, pointY, x2, y2, x3, y3)) {
6608      isInsideValue = !isInsideValue;
6609    }
6610    if (hasIntersectingEdge(pointX, pointY, x3, y3, x4, y4)) {
6611      isInsideValue = !isInsideValue;
6612    }
6613    if (hasIntersectingEdge(pointX, pointY, x4, y4, x1, y1)) {
6614      isInsideValue = !isInsideValue;
6615    }
6616    return isInsideValue;
6617  }
6618  function isInsideRect(pointX, pointY, rect) {
6619    return pointX >= rect.x && pointX <= rect.x + rect.width && pointY >= rect.y && pointY <= rect.y + rect.height;
6620  }
6621  function isInsideAxisAlignedRect(pointX, pointY, x1, y1, x2, y2) {
6622    const minX = Math.min(x1, x2);
6623    const maxX = Math.max(x1, x2);
6624    const minY = Math.min(y1, y2);
6625    const maxY = Math.max(y1, y2);
6626    return pointX >= minX && pointX <= maxX && pointY >= minY && pointY <= maxY;
6627  }
6628  function safePolygon(options = {}) {
6629    const {
6630      blockPointerEvents = false
6631    } = options;
6632    const timeout = new Timeout();
6633    const fn = ({
6634      x,
6635      y,
6636      placement,
6637      elements,
6638      onClose,
6639      nodeId,
6640      tree
6641    }) => {
6642      const side = placement?.split("-")[0];
6643      let hasLanded = false;
6644      let lastX = null;
6645      let lastY = null;
6646      let lastCursorTime = typeof performance !== "undefined" ? performance.now() : 0;
6647      function isCursorMovingSlowly(nextX, nextY) {
6648        const currentTime = performance.now();
6649        const elapsedTime = currentTime - lastCursorTime;
6650        if (lastX === null || lastY === null || elapsedTime === 0) {
6651          lastX = nextX;
6652          lastY = nextY;
6653          lastCursorTime = currentTime;
6654          return false;
6655        }
6656        const deltaX = nextX - lastX;
6657        const deltaY = nextY - lastY;
6658        const distanceSquared = deltaX * deltaX + deltaY * deltaY;
6659        const thresholdSquared = elapsedTime * elapsedTime * CURSOR_SPEED_THRESHOLD_SQUARED;
6660        lastX = nextX;
6661        lastY = nextY;
6662        lastCursorTime = currentTime;
6663        return distanceSquared < thresholdSquared;
6664      }
6665      function close() {
6666        timeout.clear();
6667        onClose();
6668      }
6669      return function onMouseMove(event) {
6670        timeout.clear();
6671        const domReference = elements.domReference;
6672        const floating = elements.floating;
6673        if (!domReference || !floating || side == null || x == null || y == null) {
6674          return void 0;
6675        }
6676        const {
6677          clientX,
6678          clientY
6679        } = event;
6680        const target = getTarget(event);
6681        const isLeave = event.type === "mouseleave";
6682        const isOverFloatingEl = contains(floating, target);
6683        const isOverReferenceEl = contains(domReference, target);
6684        if (isOverFloatingEl) {
6685          hasLanded = true;
6686          if (!isLeave) {
6687            return void 0;
6688          }
6689        }
6690        if (isOverReferenceEl) {
6691          hasLanded = false;
6692          if (!isLeave) {
6693            hasLanded = true;
6694            return void 0;
6695          }
6696        }
6697        if (isLeave && isElement(event.relatedTarget) && contains(floating, event.relatedTarget)) {
6698          return void 0;
6699        }
6700        function hasOpenChildNode() {
6701          return Boolean(tree && getNodeChildren(tree.nodesRef.current, nodeId).length > 0);
6702        }
6703        function closeIfNoOpenChild() {
6704          if (!hasOpenChildNode()) {
6705            close();
6706          }
6707        }
6708        if (hasOpenChildNode()) {
6709          return void 0;
6710        }
6711        const refRect = domReference.getBoundingClientRect();
6712        const rect = floating.getBoundingClientRect();
6713        const cursorLeaveFromRight = x > rect.right - rect.width / 2;
6714        const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;
6715        const isFloatingWider = rect.width > refRect.width;
6716        const isFloatingTaller = rect.height > refRect.height;
6717        const left = (isFloatingWider ? refRect : rect).left;
6718        const right = (isFloatingWider ? refRect : rect).right;
6719        const top = (isFloatingTaller ? refRect : rect).top;
6720        const bottom = (isFloatingTaller ? refRect : rect).bottom;
6721        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) {
6722          closeIfNoOpenChild();
6723          return void 0;
6724        }
6725        let isInsideTroughRect = false;
6726        switch (side) {
6727          case "top":
6728            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, refRect.top + 1, right, rect.bottom - 1);
6729            break;
6730          case "bottom":
6731            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, rect.top + 1, right, refRect.bottom - 1);
6732            break;
6733          case "left":
6734            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, rect.right - 1, bottom, refRect.left + 1, top);
6735            break;
6736          case "right":
6737            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, refRect.right - 1, bottom, rect.left + 1, top);
6738            break;
6739          default:
6740        }
6741        if (isInsideTroughRect) {
6742          return void 0;
6743        }
6744        if (hasLanded && !isInsideRect(clientX, clientY, refRect)) {
6745          closeIfNoOpenChild();
6746          return void 0;
6747        }
6748        if (!isLeave && isCursorMovingSlowly(clientX, clientY)) {
6749          closeIfNoOpenChild();
6750          return void 0;
6751        }
6752        let isInsidePolygon = false;
6753        switch (side) {
6754          case "top": {
6755            const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6756            const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6757            const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6758            const cursorPointY = y + POLYGON_BUFFER + 1;
6759            const commonYLeft = cursorLeaveFromRight ? rect.bottom - POLYGON_BUFFER : isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top;
6760            const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top : rect.bottom - POLYGON_BUFFER;
6761            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
6762            break;
6763          }
6764          case "bottom": {
6765            const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6766            const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6767            const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6768            const cursorPointY = y - POLYGON_BUFFER;
6769            const commonYLeft = cursorLeaveFromRight ? rect.top + POLYGON_BUFFER : isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom;
6770            const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom : rect.top + POLYGON_BUFFER;
6771            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
6772            break;
6773          }
6774          case "left": {
6775            const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6776            const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6777            const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6778            const cursorPointX = x + POLYGON_BUFFER + 1;
6779            const commonXTop = cursorLeaveFromBottom ? rect.right - POLYGON_BUFFER : isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left;
6780            const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left : rect.right - POLYGON_BUFFER;
6781            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, commonXTop, rect.top, commonXBottom, rect.bottom, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY);
6782            break;
6783          }
6784          case "right": {
6785            const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6786            const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6787            const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6788            const cursorPointX = x - POLYGON_BUFFER;
6789            const commonXTop = cursorLeaveFromBottom ? rect.left + POLYGON_BUFFER : isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right;
6790            const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right : rect.left + POLYGON_BUFFER;
6791            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY, commonXTop, rect.top, commonXBottom, rect.bottom);
6792            break;
6793          }
6794          default:
6795        }
6796        if (!isInsidePolygon) {
6797          closeIfNoOpenChild();
6798        } else if (!hasLanded) {
6799          timeout.start(40, closeIfNoOpenChild);
6800        }
6801        return void 0;
6802      };
6803    };
6804    fn.__options = {
6805      ...options,
6806      blockPointerEvents
6807    };
6808    return fn;
6809  }
6810  
6811  // node_modules/@base-ui/react/utils/NullStore.mjs
6812  var NullStore = class extends ReactStore {
6813    // `update`/`set`/`notifyAll` funnel through `setState` in the base `Store`, so overriding
6814    // `setState` alone would neutralize them today. They are overridden explicitly so the store stays
6815    // inert even if a future base-class change stops routing a mutator through `setState`.
6816    setState(_newState) {
6817    }
6818    update(_changes) {
6819    }
6820    set(_key, _value) {
6821    }
6822    notifyAll() {
6823    }
6824  };
6825  
6826  // node_modules/@base-ui/react/utils/popupStateMapping.mjs
6827  var CommonPopupDataAttributes = (function(CommonPopupDataAttributes2) {
6828    CommonPopupDataAttributes2["open"] = "data-open";
6829    CommonPopupDataAttributes2["closed"] = "data-closed";
6830    CommonPopupDataAttributes2[CommonPopupDataAttributes2["startingStyle"] = TransitionStatusDataAttributes.startingStyle] = "startingStyle";
6831    CommonPopupDataAttributes2[CommonPopupDataAttributes2["endingStyle"] = TransitionStatusDataAttributes.endingStyle] = "endingStyle";
6832    CommonPopupDataAttributes2["anchorHidden"] = "data-anchor-hidden";
6833    CommonPopupDataAttributes2["side"] = "data-side";
6834    CommonPopupDataAttributes2["align"] = "data-align";
6835    return CommonPopupDataAttributes2;
6836  })({});
6837  var TRIGGER_HOOK = {
6838    "data-popup-open": ""
6839  };
6840  var POPUP_OPEN_HOOK = {
6841    "data-open": ""
6842  };
6843  var POPUP_CLOSED_HOOK = {
6844    "data-closed": ""
6845  };
6846  var ANCHOR_HIDDEN_HOOK = {
6847    "data-anchor-hidden": ""
6848  };
6849  var triggerOpenStateMapping = {
6850    open(value) {
6851      if (value) {
6852        return TRIGGER_HOOK;
6853      }
6854      return null;
6855    }
6856  };
6857  var popupStateMapping = {
6858    open(value) {
6859      if (value) {
6860        return POPUP_OPEN_HOOK;
6861      }
6862      return POPUP_CLOSED_HOOK;
6863    },
6864    anchorHidden(value) {
6865      if (value) {
6866        return ANCHOR_HIDDEN_HOOK;
6867      }
6868      return null;
6869    }
6870  };
6871  var popupTransitionStateMapping = {
6872    ...popupStateMapping,
6873    ...transitionStatusMapping
6874  };
6875  
6876  // node_modules/@base-ui/utils/inertValue.mjs
6877  function inertValue(value) {
6878    if (isReactVersionAtLeast(19)) {
6879      return value;
6880    }
6881    return value ? "true" : void 0;
6882  }
6883  
6884  // node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs
6885  var React31 = __toESM(require_react(), 1);
6886  var DirectionContext = /* @__PURE__ */ React31.createContext(void 0);
6887  if (true) DirectionContext.displayName = "DirectionContext";
6888  function useDirection() {
6889    const context = React31.useContext(DirectionContext);
6890    return context?.direction ?? "ltr";
6891  }
6892  
6893  // node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
6894  var React32 = __toESM(require_react(), 1);
6895  
6896  // node_modules/@base-ui/react/floating-ui-react/middleware/arrow.mjs
6897  var baseArrow = (options) => ({
6898    name: "arrow",
6899    options,
6900    async fn(state) {
6901      const {
6902        x,
6903        y,
6904        placement,
6905        rects,
6906        platform: platform3,
6907        elements,
6908        middlewareData
6909      } = state;
6910      const {
6911        element,
6912        padding = 0,
6913        offsetParent = "real"
6914      } = evaluate(options, state) || {};
6915      if (element == null) {
6916        return {};
6917      }
6918      const paddingObject = getPaddingObject(padding);
6919      const coords = {
6920        x,
6921        y
6922      };
6923      const axis = getAlignmentAxis(placement);
6924      const length = getAxisLength(axis);
6925      const arrowDimensions = await platform3.getDimensions(element);
6926      const isYAxis = axis === "y";
6927      const minProp = isYAxis ? "top" : "left";
6928      const maxProp = isYAxis ? "bottom" : "right";
6929      const clientProp = isYAxis ? "clientHeight" : "clientWidth";
6930      const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
6931      const startDiff = coords[axis] - rects.reference[axis];
6932      const arrowOffsetParent = offsetParent === "real" ? await platform3.getOffsetParent?.(element) : elements.floating;
6933      let clientSize = elements.floating[clientProp] || rects.floating[length];
6934      if (!clientSize || !await platform3.isElement?.(arrowOffsetParent)) {
6935        clientSize = elements.floating[clientProp] || rects.floating[length];
6936      }
6937      const centerToReference = endDiff / 2 - startDiff / 2;
6938      const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
6939      const minPadding = Math.min(paddingObject[minProp], largestPossiblePadding);
6940      const maxPadding = Math.min(paddingObject[maxProp], largestPossiblePadding);
6941      const min2 = minPadding;
6942      const max2 = clientSize - arrowDimensions[length] - maxPadding;
6943      const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
6944      const offset4 = clamp(min2, center, max2);
6945      const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset4 && rects.reference[length] / 2 - (center < min2 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
6946      const alignmentOffset = shouldAddOffset ? center < min2 ? center - min2 : center - max2 : 0;
6947      return {
6948        [axis]: coords[axis] + alignmentOffset,
6949        data: {
6950          [axis]: offset4,
6951          centerOffset: center - offset4 - alignmentOffset,
6952          ...shouldAddOffset && {
6953            alignmentOffset
6954          }
6955        },
6956        reset: shouldAddOffset
6957      };
6958    }
6959  });
6960  var arrow4 = (options, deps) => ({
6961    ...baseArrow(options),
6962    options: [options, deps]
6963  });
6964  
6965  // node_modules/@base-ui/react/utils/hideMiddleware.mjs
6966  var hide4 = {
6967    name: "hide",
6968    async fn(state) {
6969      const {
6970        width,
6971        height,
6972        x,
6973        y
6974      } = state.rects.reference;
6975      const anchorHidden = width === 0 && height === 0 && x === 0 && y === 0;
6976      const overflow = await state.platform.detectOverflow(state, {
6977        elementContext: "reference"
6978      });
6979      const referenceHidden = overflow.top - height >= 0 || overflow.right - width >= 0 || overflow.bottom - height >= 0 || overflow.left - width >= 0;
6980      return {
6981        data: {
6982          referenceHidden: referenceHidden || anchorHidden
6983        }
6984      };
6985    }
6986  };
6987  
6988  // node_modules/@base-ui/react/utils/adaptiveOriginConstants.mjs
6989  var DEFAULT_SIDES = {
6990    sideX: "left",
6991    sideY: "top"
6992  };
6993  
6994  // node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
6995  var AVAILABLE_WIDTH_VAR = "--available-width";
6996  var AVAILABLE_HEIGHT_VAR = "--available-height";
6997  function getLogicalSide(sideParam, renderedSide, isRtl) {
6998    const isLogicalSideParam = sideParam === "inline-start" || sideParam === "inline-end";
6999    const logicalRight = isRtl ? "inline-start" : "inline-end";
7000    const logicalLeft = isRtl ? "inline-end" : "inline-start";
7001    return {
7002      top: "top",
7003      right: isLogicalSideParam ? logicalRight : "right",
7004      bottom: "bottom",
7005      left: isLogicalSideParam ? logicalLeft : "left"
7006    }[renderedSide];
7007  }
7008  function getOffsetData(state, sideParam, isRtl) {
7009    const {
7010      rects,
7011      placement
7012    } = state;
7013    const data = {
7014      side: getLogicalSide(sideParam, getSide(placement), isRtl),
7015      align: getAlignment(placement) || "center",
7016      anchor: {
7017        width: rects.reference.width,
7018        height: rects.reference.height
7019      },
7020      positioner: {
7021        width: rects.floating.width,
7022        height: rects.floating.height
7023      }
7024    };
7025    return data;
7026  }
7027  function useAnchorPositioning(params) {
7028    return useAnchorPositioningWithHook(params, useBaseUIFloating);
7029  }
7030  function useAnchorPositioningWithHook(params, useFloatingHook) {
7031    const {
7032      // Public parameters
7033      anchor,
7034      positionMethod = "absolute",
7035      side: sideParam = "bottom",
7036      sideOffset = 0,
7037      align = "center",
7038      alignOffset = 0,
7039      collisionBoundary,
7040      collisionPadding: collisionPaddingParam = 5,
7041      sticky = false,
7042      arrowPadding = 5,
7043      disableAnchorTracking = false,
7044      inline: inlineMiddleware,
7045      // Private parameters
7046      keepMounted = false,
7047      floatingRootContext,
7048      mounted,
7049      collisionAvoidance,
7050      shift: shift4,
7051      nodeId,
7052      adaptiveOrigin: adaptiveOrigin2,
7053      lazyFlip = false,
7054      externalTree
7055    } = params;
7056    const [mountSide, setMountSide] = React32.useState(null);
7057    if (!mounted && mountSide !== null) {
7058      setMountSide(null);
7059    }
7060    const collisionAvoidanceSide = collisionAvoidance.side || "flip";
7061    const collisionAvoidanceAlign = collisionAvoidance.align || "flip";
7062    const collisionAvoidanceFallbackAxisSide = collisionAvoidance.fallbackAxisSide || "end";
7063    const shiftCrossAxis = shift4?.crossAxis ?? false;
7064    const shiftRootBoundary = shift4?.rootBoundary;
7065    const anchorFn = typeof anchor === "function" ? anchor : void 0;
7066    const anchorFnCallback = useStableCallback(anchorFn);
7067    const anchorDep = anchorFn ? anchorFnCallback : anchor;
7068    const anchorValueRef = useValueAsRef(anchor);
7069    const mountedRef = useValueAsRef(mounted);
7070    const direction = useDirection();
7071    const isRtl = direction === "rtl";
7072    const side = mountSide || {
7073      top: "top",
7074      right: "right",
7075      bottom: "bottom",
7076      left: "left",
7077      "inline-end": isRtl ? "left" : "right",
7078      "inline-start": isRtl ? "right" : "left"
7079    }[sideParam];
7080    const placement = align === "center" ? side : `$side}-$align}`;
7081    let collisionPadding = collisionPaddingParam;
7082    if (typeof collisionPadding === "number") {
7083      collisionPadding = {
7084        top: collisionPadding,
7085        right: collisionPadding,
7086        bottom: collisionPadding,
7087        left: collisionPadding
7088      };
7089    } else if (collisionPadding) {
7090      collisionPadding = {
7091        top: collisionPadding.top || 0,
7092        right: collisionPadding.right || 0,
7093        bottom: collisionPadding.bottom || 0,
7094        left: collisionPadding.left || 0
7095      };
7096    }
7097    const bias = 1;
7098    const biasTop = sideParam === "bottom" ? bias : 0;
7099    const biasBottom = sideParam === "top" ? bias : 0;
7100    const biasLeft = sideParam === "right" ? bias : 0;
7101    const biasRight = sideParam === "left" ? bias : 0;
7102    const commonCollisionProps = {
7103      boundary: collisionBoundary === "clipping-ancestors" ? "clippingAncestors" : collisionBoundary,
7104      padding: collisionPadding
7105    };
7106    const arrowRef = React32.useRef(null);
7107    const sideOffsetRef = useValueAsRef(sideOffset);
7108    const alignOffsetRef = useValueAsRef(alignOffset);
7109    const sideOffsetDep = typeof sideOffset !== "function" ? sideOffset : 0;
7110    const alignOffsetDep = typeof alignOffset !== "function" ? alignOffset : 0;
7111    const middleware = [];
7112    if (inlineMiddleware) {
7113      middleware.push(inlineMiddleware);
7114    }
7115    middleware.push(offset3((state) => {
7116      const data = getOffsetData(state, sideParam, isRtl);
7117      const sideAxis = typeof sideOffsetRef.current === "function" ? sideOffsetRef.current(data) : sideOffsetRef.current;
7118      const alignAxis = typeof alignOffsetRef.current === "function" ? alignOffsetRef.current(data) : alignOffsetRef.current;
7119      return {
7120        mainAxis: sideAxis,
7121        crossAxis: alignAxis,
7122        alignmentAxis: alignAxis
7123      };
7124    }, [sideOffsetDep, alignOffsetDep, isRtl, sideParam]));
7125    const shiftDisabled = collisionAvoidanceAlign === "none" && collisionAvoidanceSide !== "shift";
7126    const crossAxisShiftEnabled = !shiftDisabled && (sticky || shiftCrossAxis || collisionAvoidanceSide === "shift");
7127    const flipMiddleware = collisionAvoidanceSide === "none" ? null : flip3({
7128      ...commonCollisionProps,
7129      // Ensure the popup flips if it's been limited by its --available-height and it resizes.
7130      // Since the size() padding is smaller than the flip() padding, flip() will take precedence.
7131      padding: {
7132        top: collisionPadding.top + bias + biasTop,
7133        right: collisionPadding.right + bias + biasRight,
7134        bottom: collisionPadding.bottom + bias + biasBottom,
7135        left: collisionPadding.left + bias + biasLeft
7136      },
7137      mainAxis: !shiftCrossAxis && collisionAvoidanceSide === "flip",
7138      crossAxis: collisionAvoidanceAlign === "flip" ? "alignment" : false,
7139      fallbackAxisSideDirection: collisionAvoidanceFallbackAxisSide
7140    });
7141    const shiftMiddleware = shiftDisabled ? null : shift3({
7142      ...commonCollisionProps,
7143      // Use the Layout Viewport to avoid shifting around when pinch-zooming.
7144      rootBoundary: shiftRootBoundary,
7145      mainAxis: collisionAvoidanceAlign !== "none",
7146      crossAxis: crossAxisShiftEnabled,
7147      limiter: sticky || shiftCrossAxis ? void 0 : limitShift3((limitData) => {
7148        if (!arrowRef.current) {
7149          return {};
7150        }
7151        const {
7152          width,
7153          height
7154        } = arrowRef.current.getBoundingClientRect();
7155        const sideAxis = getSideAxis(getSide(limitData.placement));
7156        const arrowSize = sideAxis === "y" ? width : height;
7157        const offsetAmount = sideAxis === "y" ? collisionPadding.left + collisionPadding.right : collisionPadding.top + collisionPadding.bottom;
7158        return {
7159          offset: arrowSize / 2 + offsetAmount / 2
7160        };
7161      })
7162    }, [commonCollisionProps, sticky, shiftCrossAxis, shiftRootBoundary, collisionPadding, collisionAvoidanceAlign]);
7163    if (collisionAvoidanceSide === "shift" || collisionAvoidanceAlign === "shift" || align === "center") {
7164      middleware.push(shiftMiddleware, flipMiddleware);
7165    } else {
7166      middleware.push(flipMiddleware, shiftMiddleware);
7167    }
7168    middleware.push(size3({
7169      ...commonCollisionProps,
7170      apply({
7171        elements: {
7172          floating
7173        },
7174        availableWidth,
7175        availableHeight,
7176        rects
7177      }) {
7178        if (!mountedRef.current) {
7179          return;
7180        }
7181        const floatingStyle = floating.style;
7182        floatingStyle.setProperty(AVAILABLE_WIDTH_VAR, `$availableWidth}px`);
7183        floatingStyle.setProperty(AVAILABLE_HEIGHT_VAR, `$availableHeight}px`);
7184        const dpr = getWindow(floating).devicePixelRatio || 1;
7185        const {
7186          x: x2,
7187          y: y2,
7188          width,
7189          height
7190        } = rects.reference;
7191        const anchorWidth = (Math.round((x2 + width) * dpr) - Math.round(x2 * dpr)) / dpr;
7192        const anchorHeight = (Math.round((y2 + height) * dpr) - Math.round(y2 * dpr)) / dpr;
7193        floatingStyle.setProperty("--anchor-width", `$anchorWidth}px`);
7194        floatingStyle.setProperty("--anchor-height", `$anchorHeight}px`);
7195      }
7196    }), arrow4((state) => ({
7197      // `transform-origin` calculations rely on an element existing. If the arrow hasn't been set,
7198      // we'll create a fake element.
7199      element: arrowRef.current || ownerDocument(state.elements.floating).createElement("div"),
7200      padding: arrowPadding,
7201      offsetParent: "floating"
7202    }), [arrowPadding]), {
7203      name: "transformOrigin",
7204      fn(state) {
7205        const {
7206          elements: elements2,
7207          middlewareData: middlewareData2,
7208          placement: renderedPlacement2,
7209          rects,
7210          y: y2
7211        } = state;
7212        const currentRenderedSide = getSide(renderedPlacement2);
7213        const currentRenderedAxis = getSideAxis(currentRenderedSide);
7214        const arrowEl = arrowRef.current;
7215        const arrowX = middlewareData2.arrow?.x || 0;
7216        const arrowY = middlewareData2.arrow?.y || 0;
7217        const arrowWidth = arrowEl?.clientWidth || 0;
7218        const arrowHeight = arrowEl?.clientHeight || 0;
7219        const transformX = arrowX + arrowWidth / 2;
7220        const transformY = arrowY + arrowHeight / 2;
7221        const shiftY = Math.abs(middlewareData2.shift?.y || 0);
7222        const halfAnchorHeight = rects.reference.height / 2;
7223        const sideOffsetValue = typeof sideOffset === "function" ? sideOffset(getOffsetData(state, sideParam, isRtl)) : sideOffset;
7224        const isOverlappingAnchor = shiftY > sideOffsetValue;
7225        const adjacentTransformOrigin = {
7226          top: `$transformX}px calc(100% + $sideOffsetValue}px)`,
7227          bottom: `$transformX}px ${-sideOffsetValue}px`,
7228          left: `calc(100% + $sideOffsetValue}px) $transformY}px`,
7229          right: `${-sideOffsetValue}px $transformY}px`
7230        }[currentRenderedSide];
7231        const overlapTransformOrigin = `$transformX}px $rects.reference.y + halfAnchorHeight - y2}px`;
7232        elements2.floating.style.setProperty("--transform-origin", crossAxisShiftEnabled && currentRenderedAxis === "y" && isOverlappingAnchor ? overlapTransformOrigin : adjacentTransformOrigin);
7233        return {};
7234      }
7235    }, hide4, adaptiveOrigin2);
7236    useIsoLayoutEffect(() => {
7237      if (!mounted && floatingRootContext) {
7238        floatingRootContext.update({
7239          referenceElement: null,
7240          floatingElement: null,
7241          domReferenceElement: null,
7242          positionReference: null
7243        });
7244      }
7245    }, [mounted, floatingRootContext]);
7246    const autoUpdateOptions = React32.useMemo(() => ({
7247      elementResize: !disableAnchorTracking && typeof ResizeObserver !== "undefined",
7248      layoutShift: !disableAnchorTracking && typeof IntersectionObserver !== "undefined"
7249    }), [disableAnchorTracking]);
7250    const {
7251      refs,
7252      elements,
7253      x,
7254      y,
7255      middlewareData,
7256      update: update2,
7257      placement: renderedPlacement,
7258      context,
7259      isPositioned,
7260      floatingStyles: originalFloatingStyles
7261    } = useFloatingHook({
7262      rootContext: floatingRootContext,
7263      open: keepMounted ? mounted : void 0,
7264      placement,
7265      middleware,
7266      strategy: positionMethod,
7267      whileElementsMounted: keepMounted ? void 0 : (...args) => autoUpdate(...args, autoUpdateOptions),
7268      nodeId,
7269      externalTree
7270    });
7271    const {
7272      sideX,
7273      sideY
7274    } = middlewareData.adaptiveOrigin || DEFAULT_SIDES;
7275    const resolvedPosition = isPositioned ? positionMethod : "fixed";
7276    const floatingStyles = React32.useMemo(() => {
7277      let base;
7278      if (!isPositioned) {
7279        base = {
7280          position: resolvedPosition,
7281          top: 0,
7282          left: 0
7283        };
7284      } else if (adaptiveOrigin2) {
7285        base = {
7286          position: resolvedPosition,
7287          [sideX]: x,
7288          [sideY]: y
7289        };
7290      } else {
7291        base = {
7292          ...originalFloatingStyles,
7293          position: resolvedPosition
7294        };
7295      }
7296      base[AVAILABLE_WIDTH_VAR] = "100vw";
7297      base[AVAILABLE_HEIGHT_VAR] = "100vh";
7298      if (!isPositioned) {
7299        base.opacity = 0;
7300      }
7301      return base;
7302    }, [adaptiveOrigin2, resolvedPosition, sideX, x, sideY, y, originalFloatingStyles, isPositioned]);
7303    const registeredPositionReferenceRef = React32.useRef(null);
7304    useIsoLayoutEffect(() => {
7305      if (!mounted) {
7306        return;
7307      }
7308      const anchorValue = anchorValueRef.current;
7309      const resolvedAnchor = typeof anchorValue === "function" ? anchorValue() : anchorValue;
7310      const unwrappedElement = (isRef(resolvedAnchor) ? resolvedAnchor.current : resolvedAnchor) || null;
7311      const finalAnchor = unwrappedElement || null;
7312      if (finalAnchor !== registeredPositionReferenceRef.current) {
7313        refs.setPositionReference(finalAnchor);
7314        registeredPositionReferenceRef.current = finalAnchor;
7315      }
7316    }, [mounted, refs, anchorDep, anchorValueRef]);
7317    React32.useEffect(() => {
7318      if (!mounted) {
7319        return;
7320      }
7321      const anchorValue = anchorValueRef.current;
7322      if (typeof anchorValue === "function") {
7323        return;
7324      }
7325      if (isRef(anchorValue) && anchorValue.current !== registeredPositionReferenceRef.current) {
7326        refs.setPositionReference(anchorValue.current);
7327        registeredPositionReferenceRef.current = anchorValue.current;
7328      }
7329    }, [mounted, refs, anchorDep, anchorValueRef]);
7330    React32.useEffect(() => {
7331      if (keepMounted && mounted && elements.reference && elements.floating) {
7332        return autoUpdate(elements.reference, elements.floating, update2, autoUpdateOptions);
7333      }
7334      return void 0;
7335    }, [keepMounted, mounted, elements, update2, autoUpdateOptions]);
7336    const renderedSide = getSide(renderedPlacement);
7337    const logicalRenderedSide = getLogicalSide(sideParam, renderedSide, isRtl);
7338    const renderedAlign = getAlignment(renderedPlacement) || "center";
7339    const anchorHidden = Boolean(middlewareData.hide?.referenceHidden);
7340    useIsoLayoutEffect(() => {
7341      if (lazyFlip && mounted && isPositioned && renderedSide !== side) {
7342        setMountSide(renderedSide);
7343      }
7344    }, [lazyFlip, mounted, isPositioned, renderedSide, side]);
7345    const arrowStyles = React32.useMemo(() => ({
7346      position: "absolute",
7347      top: middlewareData.arrow?.y,
7348      left: middlewareData.arrow?.x
7349    }), [middlewareData.arrow]);
7350    const arrowUncentered = middlewareData.arrow?.centerOffset !== 0;
7351    return React32.useMemo(() => ({
7352      positionerStyles: floatingStyles,
7353      arrowStyles,
7354      arrowRef,
7355      arrowUncentered,
7356      side: logicalRenderedSide,
7357      align: renderedAlign,
7358      physicalSide: renderedSide,
7359      anchorHidden,
7360      refs,
7361      context,
7362      isPositioned,
7363      update: update2
7364    }), [floatingStyles, arrowStyles, arrowRef, arrowUncentered, logicalRenderedSide, renderedAlign, renderedSide, anchorHidden, refs, context, isPositioned, update2]);
7365  }
7366  function isRef(param) {
7367    return param != null && "current" in param;
7368  }
7369  
7370  // node_modules/@base-ui/react/internals/getDisabledMountTransitionStyles.mjs
7371  function getDisabledMountTransitionStyles(transitionStatus) {
7372    return transitionStatus === "starting" ? DISABLED_TRANSITIONS_STYLE : EMPTY_OBJECT;
7373  }
7374  
7375  // node_modules/@base-ui/react/utils/usePositioner.mjs
7376  function usePositioner(componentProps, state, {
7377    styles,
7378    transitionStatus,
7379    props,
7380    refs,
7381    hidden,
7382    inert = false
7383  }) {
7384    const style = {
7385      ...styles
7386    };
7387    if (inert) {
7388      style.pointerEvents = "none";
7389    }
7390    return useRenderElement("div", componentProps, {
7391      state,
7392      ref: refs,
7393      props: [{
7394        role: "presentation",
7395        hidden,
7396        style
7397      }, getDisabledMountTransitionStyles(transitionStatus), props],
7398      stateAttributesMapping: popupStateMapping
7399    });
7400  }
7401  
7402  // node_modules/@base-ui/react/button/Button.mjs
7403  var React33 = __toESM(require_react(), 1);
7404  var Button = /* @__PURE__ */ React33.forwardRef(function Button2(componentProps, forwardedRef) {
7405    const {
7406      render,
7407      className,
7408      disabled: disabled2 = false,
7409      focusableWhenDisabled = false,
7410      nativeButton = true,
7411      style,
7412      ...elementProps
7413    } = componentProps;
7414    const {
7415      getButtonProps,
7416      buttonRef
7417    } = useButton({
7418      disabled: disabled2,
7419      focusableWhenDisabled,
7420      native: nativeButton
7421    });
7422    const state = {
7423      disabled: disabled2
7424    };
7425    return useRenderElement("button", componentProps, {
7426      state,
7427      ref: [forwardedRef, buttonRef],
7428      props: [elementProps, getButtonProps]
7429    });
7430  });
7431  if (true) Button.displayName = "Button";
7432  
7433  // node_modules/@base-ui/react/utils/usePopupViewport.mjs
7434  var React37 = __toESM(require_react(), 1);
7435  var ReactDOM6 = __toESM(require_react_dom(), 1);
7436  
7437  // node_modules/@base-ui/utils/usePreviousValue.mjs
7438  var React34 = __toESM(require_react(), 1);
7439  function usePreviousValue(value) {
7440    const [state, setState] = React34.useState({
7441      current: value,
7442      previous: null
7443    });
7444    if (!Object.is(value, state.current)) {
7445      setState({
7446        current: value,
7447        previous: state.current
7448      });
7449    }
7450    return state.previous;
7451  }
7452  
7453  // node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
7454  var React35 = __toESM(require_react(), 1);
7455  
7456  // node_modules/@base-ui/react/utils/getCssDimensions.mjs
7457  function getCssDimensions2(element) {
7458    const css = getComputedStyle2(element);
7459    let width = parseFloat(css.width) || 0;
7460    let height = parseFloat(css.height) || 0;
7461    const hasOffset = isHTMLElement(element);
7462    const offsetWidth = hasOffset ? element.offsetWidth : width;
7463    const offsetHeight = hasOffset ? element.offsetHeight : height;
7464    const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
7465    if (shouldFallback) {
7466      width = offsetWidth;
7467      height = offsetHeight;
7468    }
7469    return {
7470      width,
7471      height
7472    };
7473  }
7474  
7475  // node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
7476  function usePopupAutoResize(parameters) {
7477    const {
7478      popupElement,
7479      positionerElement,
7480      content,
7481      mounted,
7482      onMeasureLayout: onMeasureLayoutParam,
7483      onMeasureLayoutComplete: onMeasureLayoutCompleteParam,
7484      side,
7485      direction
7486    } = parameters;
7487    const runOnceAnimationsFinish = useAnimationsFinished(popupElement, true);
7488    const animationFrame = useAnimationFrame();
7489    const committedDimensionsRef = React35.useRef(null);
7490    const isInitialRenderRef = React35.useRef(true);
7491    const restoreAnchoringStylesRef = React35.useRef(NOOP);
7492    const onMeasureLayout = useStableCallback(onMeasureLayoutParam);
7493    const onMeasureLayoutComplete = useStableCallback(onMeasureLayoutCompleteParam);
7494    const anchoringStyles = React35.useMemo(() => getPopupAnchoringStyles(side, direction), [side, direction]);
7495    useIsoLayoutEffect(() => {
7496      if (!mounted) {
7497        restoreAnchoringStylesRef.current = NOOP;
7498        isInitialRenderRef.current = true;
7499        committedDimensionsRef.current = null;
7500        return void 0;
7501      }
7502      if (!popupElement || !positionerElement) {
7503        return void 0;
7504      }
7505      restoreAnchoringStylesRef.current = applyElementStyles(popupElement, anchoringStyles);
7506      setPopupCssSize(popupElement, "auto");
7507      const restorePopupPosition = overrideElementStyle(popupElement, "position", "static");
7508      const restorePopupTransform = overrideElementStyle(popupElement, "transform", "none");
7509      const restorePopupScale = overrideElementStyle(popupElement, "scale", "1");
7510      const restorePositionerAvailableSize = applyElementStyles(positionerElement, {
7511        "--available-width": "max-content",
7512        "--available-height": "max-content"
7513      });
7514      function restoreMeasurementOverrides() {
7515        restorePopupPosition();
7516        restorePopupTransform();
7517        restorePositionerAvailableSize();
7518      }
7519      function restoreMeasurementOverridesIncludingScale() {
7520        restoreMeasurementOverrides();
7521        restorePopupScale();
7522      }
7523      onMeasureLayout?.();
7524      if (isInitialRenderRef.current || committedDimensionsRef.current === null) {
7525        setPositionerCssSize(positionerElement, "max-content");
7526        const dimensions = getCssDimensions2(popupElement);
7527        committedDimensionsRef.current = dimensions;
7528        setPositionerCssSize(positionerElement, dimensions);
7529        restoreMeasurementOverridesIncludingScale();
7530        onMeasureLayoutComplete?.(null, dimensions);
7531        isInitialRenderRef.current = false;
7532        return () => {
7533          restoreAnchoringStylesRef.current();
7534          restoreAnchoringStylesRef.current = NOOP;
7535        };
7536      }
7537      setPositionerCssSize(positionerElement, "max-content");
7538      const previousDimensions = committedDimensionsRef.current;
7539      const newDimensions = getCssDimensions2(popupElement);
7540      committedDimensionsRef.current = newDimensions;
7541      setPopupCssSize(popupElement, previousDimensions);
7542      restoreMeasurementOverridesIncludingScale();
7543      onMeasureLayoutComplete?.(previousDimensions, newDimensions);
7544      setPositionerCssSize(positionerElement, newDimensions);
7545      const abortController = new AbortController();
7546      animationFrame.request(() => {
7547        setPopupCssSize(popupElement, newDimensions);
7548        runOnceAnimationsFinish(() => {
7549          popupElement.style.setProperty("--popup-width", "auto");
7550          popupElement.style.setProperty("--popup-height", "auto");
7551        }, abortController.signal);
7552      });
7553      return () => {
7554        abortController.abort();
7555        animationFrame.cancel();
7556        restoreAnchoringStylesRef.current();
7557        restoreAnchoringStylesRef.current = NOOP;
7558      };
7559    }, [content, popupElement, positionerElement, runOnceAnimationsFinish, animationFrame, mounted, onMeasureLayout, onMeasureLayoutComplete, anchoringStyles]);
7560  }
7561  function getPopupAnchoringStyles(side, direction) {
7562    const isPhysicalTop = side === "top";
7563    const isPhysicalLeft = side === "left" || side === (direction === "rtl" ? "inline-end" : "inline-start");
7564    if (!isPhysicalTop && !isPhysicalLeft) {
7565      return EMPTY_OBJECT;
7566    }
7567    return {
7568      position: "absolute",
7569      [isPhysicalTop ? "bottom" : "top"]: "0",
7570      [isPhysicalLeft ? "right" : "left"]: "0"
7571    };
7572  }
7573  function overrideElementStyle(element, property, value) {
7574    const originalValue = element.style.getPropertyValue(property);
7575    element.style.setProperty(property, value);
7576    return () => {
7577      element.style.setProperty(property, originalValue);
7578    };
7579  }
7580  function applyElementStyles(element, styles) {
7581    const restorers = [];
7582    for (const [key, value] of Object.entries(styles)) {
7583      restorers.push(overrideElementStyle(element, key, value));
7584    }
7585    return restorers.length ? () => {
7586      restorers.forEach((restore) => restore());
7587    } : NOOP;
7588  }
7589  function setPopupCssSize(popupElement, size4) {
7590    const width = size4 === "auto" ? "auto" : `$size4.width}px`;
7591    const height = size4 === "auto" ? "auto" : `$size4.height}px`;
7592    popupElement.style.setProperty("--popup-width", width);
7593    popupElement.style.setProperty("--popup-height", height);
7594  }
7595  function setPositionerCssSize(positionerElement, size4) {
7596    const width = size4 === "max-content" ? "max-content" : `$size4.width}px`;
7597    const height = size4 === "max-content" ? "max-content" : `$size4.height}px`;
7598    positionerElement.style.setProperty("--positioner-width", width);
7599    positionerElement.style.setProperty("--positioner-height", height);
7600  }
7601  
7602  // node_modules/@base-ui/react/direction-provider/DirectionProvider.mjs
7603  var React36 = __toESM(require_react(), 1);
7604  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
7605  var DirectionProvider = function DirectionProvider2(props) {
7606    const {
7607      direction = "ltr"
7608    } = props;
7609    const contextValue = React36.useMemo(() => ({
7610      direction
7611    }), [direction]);
7612    return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DirectionContext.Provider, {
7613      value: contextValue,
7614      children: props.children
7615    });
7616  };
7617  if (true) DirectionProvider.displayName = "DirectionProvider";
7618  
7619  // node_modules/@base-ui/react/utils/adaptiveOriginMiddleware.mjs
7620  var adaptiveOrigin = {
7621    name: "adaptiveOrigin",
7622    async fn(state) {
7623      const {
7624        x: rawX,
7625        y: rawY,
7626        rects: {
7627          floating: floatRect
7628        },
7629        elements: {
7630          floating
7631        },
7632        platform: platform3,
7633        strategy,
7634        placement
7635      } = state;
7636      const win = getWindow(floating);
7637      const styles = win.getComputedStyle(floating);
7638      const hasTransition = styles.transitionDuration !== "0s" && styles.transitionDuration !== "";
7639      if (!hasTransition) {
7640        return {
7641          x: rawX,
7642          y: rawY,
7643          data: DEFAULT_SIDES
7644        };
7645      }
7646      const offsetParent = await platform3.getOffsetParent?.(floating);
7647      let offsetDimensions = {
7648        width: 0,
7649        height: 0
7650      };
7651      if (strategy === "fixed" && win?.visualViewport) {
7652        offsetDimensions = {
7653          width: win.visualViewport.width,
7654          height: win.visualViewport.height
7655        };
7656      } else if (offsetParent === win) {
7657        const doc = ownerDocument(floating);
7658        offsetDimensions = {
7659          width: doc.documentElement.clientWidth,
7660          height: doc.documentElement.clientHeight
7661        };
7662      } else if (await platform3.isElement?.(offsetParent)) {
7663        offsetDimensions = await platform3.getDimensions(offsetParent);
7664      }
7665      const currentSide = getSide(placement);
7666      let x = rawX;
7667      let y = rawY;
7668      if (currentSide === "left") {
7669        x = offsetDimensions.width - (rawX + floatRect.width);
7670      }
7671      if (currentSide === "top") {
7672        y = offsetDimensions.height - (rawY + floatRect.height);
7673      }
7674      const sideX = currentSide === "left" ? "right" : DEFAULT_SIDES.sideX;
7675      const sideY = currentSide === "top" ? "bottom" : DEFAULT_SIDES.sideY;
7676      return {
7677        x,
7678        y,
7679        data: {
7680          sideX,
7681          sideY
7682        }
7683      };
7684    }
7685  };
7686  
7687  // node_modules/@base-ui/react/utils/usePopupViewport.mjs
7688  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
7689  var popupViewportStateMapping = {
7690    activationDirection: (value) => value ? {
7691      "data-activation-direction": value
7692    } : null
7693  };
7694  function usePopupViewport(parameters) {
7695    const {
7696      store: store2,
7697      side,
7698      children
7699    } = parameters;
7700    const direction = useDirection();
7701    const activeTrigger = store2.useState("activeTriggerElement");
7702    const activeTriggerId = store2.useState("activeTriggerId");
7703    const open = store2.useState("open");
7704    const payload = store2.useState("payload");
7705    const mounted = store2.useState("mounted");
7706    const popupElement = store2.useState("popupElement");
7707    const positionerElement = store2.useState("positionerElement");
7708    const previousActiveTrigger = usePreviousValue(open ? activeTrigger : null);
7709    const currentContentKey = usePopupContentKey(activeTriggerId, payload);
7710    const capturedNodeRef = React37.useRef(null);
7711    const [previousContentNode, setPreviousContentNode] = React37.useState(null);
7712    const [newTriggerOffset, setNewTriggerOffset] = React37.useState(null);
7713    const currentContainerRef = React37.useRef(null);
7714    const previousContainerRef = React37.useRef(null);
7715    const onAnimationsFinished = useAnimationsFinished(currentContainerRef, true);
7716    const cleanupFrame = useAnimationFrame();
7717    const cleanupControllerRef = React37.useRef(null);
7718    const [previousContentDimensions, setPreviousContentDimensions] = React37.useState(null);
7719    const [showStartingStyleAttribute, setShowStartingStyleAttribute] = React37.useState(false);
7720    useIsoLayoutEffect(() => {
7721      store2.set("adaptiveOrigin", adaptiveOrigin);
7722      return () => {
7723        store2.set("adaptiveOrigin", void 0);
7724      };
7725    }, [store2]);
7726    const handleMeasureLayout = useStableCallback(() => {
7727      currentContainerRef.current?.style.setProperty("animation", "none");
7728      currentContainerRef.current?.style.setProperty("transition", "none");
7729      previousContainerRef.current?.style.setProperty("display", "none");
7730    });
7731    const handleMeasureLayoutComplete = useStableCallback((previousDimensions) => {
7732      currentContainerRef.current?.style.removeProperty("animation");
7733      currentContainerRef.current?.style.removeProperty("transition");
7734      previousContainerRef.current?.style.removeProperty("display");
7735      if (previousDimensions) {
7736        setPreviousContentDimensions(previousDimensions);
7737      }
7738    });
7739    const armViewportCleanup = useStableCallback(() => {
7740      cleanupControllerRef.current?.abort();
7741      const controller = new AbortController();
7742      cleanupControllerRef.current = controller;
7743      onAnimationsFinished(() => {
7744        setPreviousContentNode(null);
7745        setPreviousContentDimensions(null);
7746        capturedNodeRef.current = null;
7747      }, controller.signal);
7748    });
7749    const lastHandledTriggerRef = React37.useRef(null);
7750    useIsoLayoutEffect(() => {
7751      if (!open || !mounted) {
7752        lastHandledTriggerRef.current = null;
7753      }
7754    }, [open, mounted]);
7755    useIsoLayoutEffect(() => {
7756      if (activeTrigger && previousActiveTrigger && activeTrigger !== previousActiveTrigger && lastHandledTriggerRef.current !== activeTrigger && capturedNodeRef.current) {
7757        setPreviousContentNode(capturedNodeRef.current);
7758        setShowStartingStyleAttribute(true);
7759        const offset4 = calculateRelativePosition(previousActiveTrigger, activeTrigger);
7760        setNewTriggerOffset(offset4);
7761        lastHandledTriggerRef.current = activeTrigger;
7762      }
7763    }, [activeTrigger, previousActiveTrigger]);
7764    useIsoLayoutEffect(() => {
7765      if (previousContentNode == null) {
7766        return;
7767      }
7768      cleanupControllerRef.current?.abort();
7769      setShowStartingStyleAttribute(true);
7770      cleanupFrame.request(() => {
7771        ReactDOM6.flushSync(() => {
7772          setShowStartingStyleAttribute(false);
7773        });
7774        armViewportCleanup();
7775      });
7776    }, [currentContentKey, previousContentNode, armViewportCleanup, cleanupFrame]);
7777    useIsoLayoutEffect(() => {
7778      const source = currentContainerRef.current;
7779      if (!source) {
7780        return;
7781      }
7782      const wrapper = ownerDocument(source).createElement("div");
7783      for (const child of Array.from(source.childNodes)) {
7784        wrapper.appendChild(child.cloneNode(true));
7785      }
7786      capturedNodeRef.current = wrapper;
7787    });
7788    const isTransitioning = previousContentNode != null;
7789    let childrenToRender;
7790    if (!isTransitioning) {
7791      childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
7792        "data-current": true,
7793        ref: currentContainerRef,
7794        children
7795      }, currentContentKey);
7796    } else {
7797      childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(React37.Fragment, {
7798        children: [/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
7799          "data-previous": true,
7800          inert: inertValue(true),
7801          ref: previousContainerRef,
7802          style: {
7803            ...previousContentDimensions ? {
7804              "--popup-width": `$previousContentDimensions.width}px`,
7805              "--popup-height": `$previousContentDimensions.height}px`
7806            } : null,
7807            position: "absolute"
7808          },
7809          "data-ending-style": showStartingStyleAttribute ? void 0 : ""
7810        }, "previous"), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
7811          "data-current": true,
7812          ref: currentContainerRef,
7813          "data-starting-style": showStartingStyleAttribute ? "" : void 0,
7814          children
7815        }, currentContentKey)]
7816      });
7817    }
7818    useIsoLayoutEffect(() => {
7819      const container = previousContainerRef.current;
7820      if (!container || !previousContentNode) {
7821        return;
7822      }
7823      container.replaceChildren(...Array.from(previousContentNode.childNodes));
7824    }, [previousContentNode]);
7825    usePopupAutoResize({
7826      popupElement,
7827      positionerElement,
7828      mounted,
7829      content: payload,
7830      onMeasureLayout: handleMeasureLayout,
7831      onMeasureLayoutComplete: handleMeasureLayoutComplete,
7832      side,
7833      direction
7834    });
7835    const state = {
7836      activationDirection: getActivationDirection(newTriggerOffset),
7837      transitioning: isTransitioning
7838    };
7839    return {
7840      children: childrenToRender,
7841      state
7842    };
7843  }
7844  function getActivationDirection(offset4) {
7845    if (!offset4) {
7846      return void 0;
7847    }
7848    return `$getValueWithTolerance(offset4.horizontal, 5, "right", "left")} $getValueWithTolerance(offset4.vertical, 5, "down", "up")}`;
7849  }
7850  function getValueWithTolerance(value, tolerance, positiveLabel, negativeLabel) {
7851    if (value > tolerance) {
7852      return positiveLabel;
7853    }
7854    if (value < -tolerance) {
7855      return negativeLabel;
7856    }
7857    return "";
7858  }
7859  function calculateRelativePosition(from, to) {
7860    const fromRect = from.getBoundingClientRect();
7861    const toRect = to.getBoundingClientRect();
7862    const fromCenter = {
7863      x: fromRect.left + fromRect.width / 2,
7864      y: fromRect.top + fromRect.height / 2
7865    };
7866    const toCenter = {
7867      x: toRect.left + toRect.width / 2,
7868      y: toRect.top + toRect.height / 2
7869    };
7870    return {
7871      horizontal: toCenter.x - fromCenter.x,
7872      vertical: toCenter.y - fromCenter.y
7873    };
7874  }
7875  function usePopupContentKey(activeTriggerId, payload) {
7876    const [contentKey, setContentKey] = React37.useState(0);
7877    const previousActiveTriggerIdRef = React37.useRef(activeTriggerId);
7878    const previousPayloadRef = React37.useRef(payload);
7879    const pendingPayloadUpdateRef = React37.useRef(false);
7880    useIsoLayoutEffect(() => {
7881      const previousActiveTriggerId = previousActiveTriggerIdRef.current;
7882      const previousPayload = previousPayloadRef.current;
7883      const triggerIdChanged = activeTriggerId !== previousActiveTriggerId;
7884      const payloadChanged = payload !== previousPayload;
7885      if (triggerIdChanged) {
7886        setContentKey((value) => value + 1);
7887        pendingPayloadUpdateRef.current = !payloadChanged;
7888      } else if (pendingPayloadUpdateRef.current && payloadChanged) {
7889        setContentKey((value) => value + 1);
7890        pendingPayloadUpdateRef.current = false;
7891      }
7892      previousActiveTriggerIdRef.current = activeTriggerId;
7893      previousPayloadRef.current = payload;
7894    }, [activeTriggerId, payload]);
7895    return `$activeTriggerId ?? "current"}-$contentKey}`;
7896  }
7897  
7898  // node_modules/@base-ui/react/utils/FloatingPortalLite.mjs
7899  var React38 = __toESM(require_react(), 1);
7900  var ReactDOM7 = __toESM(require_react_dom(), 1);
7901  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
7902  var FloatingPortalLite = /* @__PURE__ */ React38.forwardRef(function FloatingPortalLite2(componentProps, forwardedRef) {
7903    const {
7904      children,
7905      container,
7906      className,
7907      render,
7908      style,
7909      ...elementProps
7910    } = componentProps;
7911    const {
7912      node: portalNode,
7913      subtree: portalSubtree
7914    } = useFloatingPortalNode({
7915      container,
7916      ref: forwardedRef,
7917      componentProps,
7918      elementProps
7919    });
7920    if (!portalSubtree && !portalNode) {
7921      return null;
7922    }
7923    return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(React38.Fragment, {
7924      children: [portalSubtree, portalNode && /* @__PURE__ */ ReactDOM7.createPortal(children, portalNode)]
7925    });
7926  });
7927  if (true) FloatingPortalLite.displayName = "FloatingPortalLite";
7928  
7929  // node_modules/@base-ui/react/tooltip/index.parts.mjs
7930  var index_parts_exports = {};
7931  __export(index_parts_exports, {
7932    Arrow: () => TooltipArrow,
7933    Handle: () => TooltipHandle,
7934    Popup: () => TooltipPopup,
7935    Portal: () => TooltipPortal,
7936    Positioner: () => TooltipPositioner,
7937    Provider: () => TooltipProvider,
7938    Root: () => TooltipRoot,
7939    Trigger: () => TooltipTrigger,
7940    Viewport: () => TooltipViewport,
7941    createHandle: () => createTooltipHandle
7942  });
7943  
7944  // node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
7945  var React41 = __toESM(require_react(), 1);
7946  
7947  // node_modules/@base-ui/react/tooltip/root/TooltipRootContext.mjs
7948  var React39 = __toESM(require_react(), 1);
7949  var TooltipRootContext = /* @__PURE__ */ React39.createContext(void 0);
7950  if (true) TooltipRootContext.displayName = "TooltipRootContext";
7951  function useTooltipRootContext(optional) {
7952    const context = React39.useContext(TooltipRootContext);
7953    if (context === void 0 && !optional) {
7954      throw new Error(true ? "Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>." : formatErrorMessage_default(72));
7955    }
7956    return context;
7957  }
7958  
7959  // node_modules/@base-ui/react/tooltip/store/TooltipStore.mjs
7960  var React40 = __toESM(require_react(), 1);
7961  var selectors2 = {
7962    ...popupStoreSelectors,
7963    disabled: (state) => state.disabled,
7964    instantType: (state) => state.instantType,
7965    isInstantPhase: (state) => state.isInstantPhase,
7966    trackCursorAxis: (state) => state.trackCursorAxis,
7967    disableHoverablePopup: (state) => state.disableHoverablePopup,
7968    lastOpenChangeReason: (state) => state.openChangeReason,
7969    closeOnClick: (state) => state.closeOnClick,
7970    closeDelay: (state) => state.closeDelay,
7971    adaptiveOrigin: (state) => state.adaptiveOrigin
7972  };
7973  var TooltipStore = class extends ReactStore {
7974    constructor(initialState, floatingId, nested) {
7975      const triggerElements = new PopupTriggerMap();
7976      super(createInitialState(initialState, triggerElements, floatingId, nested), createInitialContext(triggerElements), selectors2);
7977    }
7978    setOpen = (nextOpen, eventDetails) => {
7979      applyPopupOpenChange(this, nextOpen, eventDetails, {
7980        extraState: {
7981          openChangeReason: eventDetails.reason
7982        }
7983      });
7984    };
7985    // Used by trigger clicks to clear a delayed hover open without reporting a public open-state change.
7986    cancelPendingOpen(event) {
7987      this.state.floatingRootContext.dispatchOpenChange(false, createChangeEventDetails(reason_parts_exports.triggerPress, event));
7988    }
7989  };
7990  function createNullTooltipStore() {
7991    const triggerElements = new PopupTriggerMap();
7992    const store2 = new NullStore(Object.freeze(createInitialState(void 0, triggerElements)), Object.freeze(createInitialContext(triggerElements)), selectors2);
7993    return Object.assign(store2, {
7994      setOpen: NOOP,
7995      cancelPendingOpen: NOOP
7996    });
7997  }
7998  function createInitialState(initialState, triggerElements, floatingId, nested = false) {
7999    const state = {
8000      ...createInitialPopupStoreState(),
8001      disabled: false,
8002      instantType: void 0,
8003      isInstantPhase: false,
8004      trackCursorAxis: "none",
8005      disableHoverablePopup: false,
8006      openChangeReason: null,
8007      closeOnClick: true,
8008      closeDelay: 0,
8009      adaptiveOrigin: void 0,
8010      ...initialState
8011    };
8012    state.floatingRootContext = createPopupFloatingRootContext(triggerElements, floatingId, nested);
8013    return state;
8014  }
8015  function createInitialContext(triggerElements) {
8016    return {
8017      popupRef: /* @__PURE__ */ React40.createRef(),
8018      onOpenChange: void 0,
8019      onOpenChangeComplete: void 0,
8020      triggerElements
8021    };
8022  }
8023  
8024  // node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
8025  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
8026  var TooltipRoot = fastComponent(function TooltipRoot2(props) {
8027    const {
8028      disabled: disabled2 = false,
8029      defaultOpen = false,
8030      open: openProp,
8031      disableHoverablePopup = false,
8032      trackCursorAxis = "none",
8033      actionsRef,
8034      onOpenChange,
8035      onOpenChangeComplete,
8036      handle,
8037      triggerId: triggerIdProp,
8038      defaultTriggerId: defaultTriggerIdProp = null,
8039      children
8040    } = props;
8041    const store2 = usePopupRootStore((floatingId, nested) => new TooltipStore({
8042      open: defaultOpen,
8043      openProp,
8044      activeTriggerId: defaultTriggerIdProp,
8045      triggerIdProp
8046    }, floatingId, nested));
8047    store2.useControlledProp("openProp", openProp);
8048    store2.useControlledProp("triggerIdProp", triggerIdProp);
8049    store2.useContextCallback("onOpenChange", onOpenChange);
8050    store2.useContextCallback("onOpenChangeComplete", onOpenChangeComplete);
8051    const openState = store2.useState("open");
8052    const open = !disabled2 && openState;
8053    const activeTriggerId = store2.useState("activeTriggerId");
8054    const mounted = store2.useState("mounted");
8055    const payload = store2.useState("payload");
8056    store2.useSyncedValues({
8057      trackCursorAxis,
8058      disableHoverablePopup,
8059      disabled: disabled2
8060    });
8061    useImplicitActiveTrigger(store2, {
8062      closeOnActiveTriggerUnmount: true
8063    });
8064    const {
8065      forceUnmount,
8066      transitionStatus
8067    } = useOpenStateTransitions(open, store2);
8068    const isInstantPhase = store2.useState("isInstantPhase");
8069    const instantType = store2.useState("instantType");
8070    const lastOpenChangeReason = store2.useState("lastOpenChangeReason");
8071    const previousInstantTypeRef = React41.useRef(null);
8072    useIsoLayoutEffect(() => {
8073      if (openState && disabled2) {
8074        store2.setOpen(false, createChangeEventDetails(reason_parts_exports.disabled));
8075      }
8076    }, [openState, disabled2, store2]);
8077    useIsoLayoutEffect(() => {
8078      if (transitionStatus === "ending" && lastOpenChangeReason === reason_parts_exports.none || transitionStatus !== "ending" && isInstantPhase) {
8079        if (instantType !== "delay") {
8080          previousInstantTypeRef.current = instantType;
8081        }
8082        store2.set("instantType", "delay");
8083      } else if (previousInstantTypeRef.current !== null) {
8084        store2.set("instantType", previousInstantTypeRef.current);
8085        previousInstantTypeRef.current = null;
8086      }
8087    }, [transitionStatus, isInstantPhase, lastOpenChangeReason, instantType, store2]);
8088    useIsoLayoutEffect(() => {
8089      if (open) {
8090        if (activeTriggerId == null) {
8091          store2.set("payload", void 0);
8092        }
8093      }
8094    }, [store2, activeTriggerId, open]);
8095    React41.useImperativeHandle(actionsRef, () => ({
8096      unmount: forceUnmount,
8097      close: () => store2.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction))
8098    }), [forceUnmount, store2]);
8099    const shouldRenderInteractions = open || mounted || !disabled2 && trackCursorAxis !== "none";
8100    return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(TooltipRootContext.Provider, {
8101      value: store2,
8102      children: [handle && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PopupHandleAttachment, {
8103        handle,
8104        store: store2
8105      }), shouldRenderInteractions && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TooltipInteractions, {
8106        store: store2,
8107        disabled: disabled2,
8108        trackCursorAxis
8109      }), typeof children === "function" ? children({
8110        payload
8111      }) : children]
8112    });
8113  });
8114  if (true) TooltipRoot.displayName = "TooltipRoot";
8115  function TooltipInteractions({
8116    store: store2,
8117    disabled: disabled2,
8118    trackCursorAxis
8119  }) {
8120    const floatingRootContext = store2.useState("floatingRootContext");
8121    const dismiss = useDismiss(floatingRootContext, {
8122      enabled: !disabled2,
8123      referencePress: () => store2.select("closeOnClick")
8124    });
8125    const clientPoint = useClientPoint(floatingRootContext, {
8126      enabled: !disabled2 && trackCursorAxis !== "none",
8127      axis: trackCursorAxis === "none" ? void 0 : trackCursorAxis
8128    });
8129    const triggerProps = React41.useMemo(() => mergeProps(clientPoint.reference, dismiss.reference), [clientPoint.reference, dismiss.reference]);
8130    usePopupInteractionProps(store2, {
8131      activeTriggerProps: triggerProps,
8132      inactiveTriggerProps: triggerProps,
8133      popupProps: dismiss.floating ?? EMPTY_OBJECT
8134    });
8135    return null;
8136  }
8137  
8138  // node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
8139  var React43 = __toESM(require_react(), 1);
8140  
8141  // node_modules/@base-ui/react/tooltip/provider/TooltipProviderContext.mjs
8142  var React42 = __toESM(require_react(), 1);
8143  var TooltipProviderContext = /* @__PURE__ */ React42.createContext(void 0);
8144  if (true) TooltipProviderContext.displayName = "TooltipProviderContext";
8145  function useTooltipProviderContext() {
8146    return React42.useContext(TooltipProviderContext);
8147  }
8148  
8149  // node_modules/@base-ui/react/tooltip/utils/constants.mjs
8150  var OPEN_DELAY = 600;
8151  
8152  // node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
8153  var TOOLTIP_TRIGGER_IDENTIFIER = "data-base-ui-tooltip-trigger";
8154  function getTargetElement(event) {
8155    if ("composedPath" in event) {
8156      const path = event.composedPath();
8157      for (let i = 0; i < path.length; i += 1) {
8158        const element = path[i];
8159        if (isElement(element)) {
8160          return element;
8161        }
8162      }
8163    }
8164    const target = event.target;
8165    if (isElement(target)) {
8166      return target;
8167    }
8168    return null;
8169  }
8170  function closestEnabledTooltipTrigger(element) {
8171    let current = element;
8172    while (current) {
8173      const trigger = current.closest(`[$TOOLTIP_TRIGGER_IDENTIFIER}]`);
8174      if (trigger) {
8175        return trigger;
8176      }
8177      const root = current.getRootNode();
8178      current = "host" in root && isElement(root.host) ? root.host : null;
8179    }
8180    return null;
8181  }
8182  var TooltipTrigger = fastComponentRef(function TooltipTrigger2(componentProps, forwardedRef) {
8183    const {
8184      render,
8185      className,
8186      style,
8187      handle,
8188      payload,
8189      disabled: disabledProp,
8190      delay,
8191      closeOnClick = true,
8192      closeDelay,
8193      id: idProp,
8194      ...elementProps
8195    } = componentProps;
8196    const rootContext = useTooltipRootContext(true);
8197    const handleStore = usePopupHandleStore(handle);
8198    const store2 = handleStore ?? rootContext;
8199    if (!store2) {
8200      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));
8201    }
8202    const thisTriggerId = useBaseUiId(idProp);
8203    const isTriggerActive = store2.useState("isTriggerActive", thisTriggerId);
8204    const isOpenedByThisTrigger = store2.useState("isOpenedByTrigger", thisTriggerId);
8205    const floatingRootContext = store2.useState("floatingRootContext");
8206    const triggerElementRef = React43.useRef(null);
8207    const delayWithDefault = delay ?? OPEN_DELAY;
8208    const closeDelayWithDefault = closeDelay ?? 0;
8209    const {
8210      registerTrigger,
8211      isMountedByThisTrigger
8212    } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store2, {
8213      payload,
8214      closeOnClick,
8215      closeDelay: closeDelayWithDefault
8216    });
8217    const providerDelay = useTooltipProviderContext();
8218    const {
8219      delayRef,
8220      isInstantPhase,
8221      hasProvider
8222    } = useDelayGroup(floatingRootContext, {
8223      open: isOpenedByThisTrigger
8224    });
8225    const hoverInteraction = useHoverInteractionSharedState(floatingRootContext);
8226    store2.useSyncedValue("isInstantPhase", isInstantPhase);
8227    const rootDisabled = store2.useState("disabled");
8228    const disabled2 = disabledProp ?? rootDisabled;
8229    const disabledRef = useValueAsRef(disabled2);
8230    const trackCursorAxis = store2.useState("trackCursorAxis");
8231    const disableHoverablePopup = store2.useState("disableHoverablePopup");
8232    const isNestedTriggerHoveredRef = React43.useRef(false);
8233    const nestedTriggerOpenTimeout = useTimeout();
8234    const pointerTypeRef = React43.useRef(void 0);
8235    function getOpenDelay() {
8236      if (!hasProvider) {
8237        return delayWithDefault;
8238      }
8239      return getDelay(delayRef.current, "open") === 0 ? 0 : delay ?? providerDelay ?? OPEN_DELAY;
8240    }
8241    function isEnabledNestedTriggerTarget(target) {
8242      const triggerEl = triggerElementRef.current;
8243      if (!triggerEl || !target) {
8244        return false;
8245      }
8246      const nearestTrigger = closestEnabledTooltipTrigger(target);
8247      return nearestTrigger !== null && nearestTrigger !== triggerEl && contains(triggerEl, nearestTrigger);
8248    }
8249    function detectNestedTriggerHover(target) {
8250      const nestedTriggerHovered = isEnabledNestedTriggerTarget(target);
8251      isNestedTriggerHoveredRef.current = nestedTriggerHovered;
8252      if (nestedTriggerHovered) {
8253        hoverInteraction.openChangeTimeout.clear();
8254        hoverInteraction.restTimeout.clear();
8255        hoverInteraction.restTimeoutPending = false;
8256        nestedTriggerOpenTimeout.clear();
8257      }
8258      return nestedTriggerHovered;
8259    }
8260    const hoverProps = useHoverReferenceInteraction(floatingRootContext, {
8261      enabled: !disabled2,
8262      mouseOnly: true,
8263      move: false,
8264      handleClose: !disableHoverablePopup && trackCursorAxis !== "both" ? safePolygon() : null,
8265      restMs: getOpenDelay,
8266      delay() {
8267        if (closeDelay == null && hasProvider) {
8268          return {
8269            close: getDelay(delayRef.current, "close")
8270          };
8271        }
8272        return {
8273          close: closeDelayWithDefault
8274        };
8275      },
8276      triggerElementRef,
8277      isActiveTrigger: isTriggerActive,
8278      isClosing: () => store2.select("transitionStatus") === "ending",
8279      shouldOpen() {
8280        return !isNestedTriggerHoveredRef.current;
8281      }
8282    });
8283    const focusProps = useFocus(floatingRootContext, {
8284      enabled: !disabled2
8285    }).reference;
8286    const handleNestedTriggerHover = (event) => {
8287      const wasNestedTriggerHovered = isNestedTriggerHoveredRef.current;
8288      const target = getTargetElement(event);
8289      const nestedTriggerHovered = detectNestedTriggerHover(target);
8290      const triggerEl = triggerElementRef.current;
8291      const targetInsideTrigger = triggerEl && target && contains(triggerEl, target);
8292      if (nestedTriggerHovered && store2.select("open") && store2.select("lastOpenChangeReason") === reason_parts_exports.triggerHover) {
8293        store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
8294        return;
8295      }
8296      if (wasNestedTriggerHovered && !nestedTriggerHovered && targetInsideTrigger && !disabledRef.current && !store2.select("open") && triggerEl && // Match the hover hook's non-strict mouse fallback for mouse-only event sequences.
8297      isMouseLikePointerType(pointerTypeRef.current)) {
8298        const open = () => {
8299          if (!isNestedTriggerHoveredRef.current && !disabledRef.current && !store2.select("open")) {
8300            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerEl));
8301          }
8302        };
8303        const openDelay = getOpenDelay();
8304        if (openDelay === 0) {
8305          nestedTriggerOpenTimeout.clear();
8306          open();
8307        } else {
8308          nestedTriggerOpenTimeout.start(openDelay, open);
8309        }
8310      }
8311    };
8312    const rootTriggerProps = store2.useState("triggerProps", isMountedByThisTrigger);
8313    const shouldApplyRootTriggerProps = isMountedByThisTrigger || trackCursorAxis !== "none";
8314    const state = {
8315      open: isOpenedByThisTrigger
8316    };
8317    const element = useRenderElement("button", componentProps, {
8318      state,
8319      ref: [forwardedRef, registerTrigger, triggerElementRef],
8320      props: [hoverProps, focusProps, shouldApplyRootTriggerProps ? rootTriggerProps : void 0, {
8321        onMouseOver(event) {
8322          handleNestedTriggerHover(event.nativeEvent);
8323        },
8324        onFocus(event) {
8325          if (isEnabledNestedTriggerTarget(getTargetElement(event.nativeEvent))) {
8326            event.preventBaseUIHandler();
8327          }
8328        },
8329        onMouseLeave() {
8330          isNestedTriggerHoveredRef.current = false;
8331          nestedTriggerOpenTimeout.clear();
8332          pointerTypeRef.current = void 0;
8333        },
8334        onPointerEnter(event) {
8335          pointerTypeRef.current = event.pointerType;
8336        },
8337        onPointerDown(event) {
8338          pointerTypeRef.current = event.pointerType;
8339          store2.set("closeOnClick", closeOnClick);
8340          if (closeOnClick && !store2.select("open")) {
8341            store2.cancelPendingOpen(event.nativeEvent);
8342          }
8343        },
8344        onClick(event) {
8345          if (closeOnClick && !store2.select("open")) {
8346            store2.cancelPendingOpen(event.nativeEvent);
8347          }
8348        },
8349        id: thisTriggerId,
8350        "data-trigger-disabled": disabled2 ? "" : void 0,
8351        [TOOLTIP_TRIGGER_IDENTIFIER]: disabled2 ? void 0 : ""
8352      }, elementProps],
8353      stateAttributesMapping: triggerOpenStateMapping
8354    });
8355    return element;
8356  });
8357  if (true) TooltipTrigger.displayName = "TooltipTrigger";
8358  
8359  // node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
8360  var React45 = __toESM(require_react(), 1);
8361  
8362  // node_modules/@base-ui/react/tooltip/portal/TooltipPortalContext.mjs
8363  var React44 = __toESM(require_react(), 1);
8364  var TooltipPortalContext = /* @__PURE__ */ React44.createContext(void 0);
8365  if (true) TooltipPortalContext.displayName = "TooltipPortalContext";
8366  function useTooltipPortalContext() {
8367    const value = React44.useContext(TooltipPortalContext);
8368    if (value === void 0) {
8369      throw new Error(true ? "Base UI: <Tooltip.Portal> is missing." : formatErrorMessage_default(70));
8370    }
8371    return value;
8372  }
8373  
8374  // node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
8375  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
8376  var TooltipPortal = /* @__PURE__ */ React45.forwardRef(function TooltipPortal2(props, forwardedRef) {
8377    const {
8378      keepMounted = false,
8379      ...portalProps
8380    } = props;
8381    const store2 = useTooltipRootContext();
8382    const mounted = store2.useState("mounted");
8383    const shouldRender = mounted || keepMounted;
8384    if (!shouldRender) {
8385      return null;
8386    }
8387    return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TooltipPortalContext.Provider, {
8388      value: keepMounted,
8389      children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FloatingPortalLite, {
8390        ref: forwardedRef,
8391        ...portalProps
8392      })
8393    });
8394  });
8395  if (true) TooltipPortal.displayName = "TooltipPortal";
8396  
8397  // node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
8398  var React47 = __toESM(require_react(), 1);
8399  
8400  // node_modules/@base-ui/react/tooltip/positioner/TooltipPositionerContext.mjs
8401  var React46 = __toESM(require_react(), 1);
8402  var TooltipPositionerContext = /* @__PURE__ */ React46.createContext(void 0);
8403  if (true) TooltipPositionerContext.displayName = "TooltipPositionerContext";
8404  function useTooltipPositionerContext() {
8405    const context = React46.useContext(TooltipPositionerContext);
8406    if (context === void 0) {
8407      throw new Error(true ? "Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>." : formatErrorMessage_default(71));
8408    }
8409    return context;
8410  }
8411  
8412  // node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
8413  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
8414  var TooltipPositioner = /* @__PURE__ */ React47.forwardRef(function TooltipPositioner2(componentProps, forwardedRef) {
8415    const {
8416      render,
8417      className,
8418      anchor,
8419      positionMethod = "absolute",
8420      side = "top",
8421      align = "center",
8422      sideOffset = 0,
8423      alignOffset = 0,
8424      collisionBoundary = "clipping-ancestors",
8425      collisionPadding = 5,
8426      arrowPadding = 5,
8427      sticky = false,
8428      disableAnchorTracking = false,
8429      collisionAvoidance = POPUP_COLLISION_AVOIDANCE,
8430      style,
8431      ...elementProps
8432    } = componentProps;
8433    const store2 = useTooltipRootContext();
8434    const keepMounted = useTooltipPortalContext();
8435    const open = store2.useState("open");
8436    const mounted = store2.useState("mounted");
8437    const trackCursorAxis = store2.useState("trackCursorAxis");
8438    const disableHoverablePopup = store2.useState("disableHoverablePopup");
8439    const floatingRootContext = store2.useState("floatingRootContext");
8440    const instantType = store2.useState("instantType");
8441    const transitionStatus = store2.useState("transitionStatus");
8442    const adaptiveOrigin2 = store2.useState("adaptiveOrigin");
8443    const positioning = useAnchorPositioning({
8444      anchor,
8445      positionMethod,
8446      floatingRootContext,
8447      mounted,
8448      side,
8449      sideOffset,
8450      align,
8451      alignOffset,
8452      collisionBoundary,
8453      collisionPadding,
8454      sticky,
8455      arrowPadding,
8456      disableAnchorTracking,
8457      keepMounted,
8458      collisionAvoidance,
8459      adaptiveOrigin: adaptiveOrigin2
8460    });
8461    const state = React47.useMemo(() => ({
8462      open,
8463      side: positioning.side,
8464      align: positioning.align,
8465      anchorHidden: positioning.anchorHidden,
8466      instant: trackCursorAxis !== "none" ? "tracking-cursor" : instantType
8467    }), [open, positioning.side, positioning.align, positioning.anchorHidden, trackCursorAxis, instantType]);
8468    const element = usePositioner(componentProps, state, {
8469      styles: positioning.positionerStyles,
8470      transitionStatus,
8471      props: elementProps,
8472      refs: [forwardedRef, store2.useStateSetter("positionerElement")],
8473      hidden: !mounted,
8474      inert: !open || trackCursorAxis === "both" || disableHoverablePopup
8475    });
8476    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TooltipPositionerContext.Provider, {
8477      value: positioning,
8478      children: element
8479    });
8480  });
8481  if (true) TooltipPositioner.displayName = "TooltipPositioner";
8482  
8483  // node_modules/@base-ui/react/tooltip/popup/TooltipPopup.mjs
8484  var React48 = __toESM(require_react(), 1);
8485  var TooltipPopup = /* @__PURE__ */ React48.forwardRef(function TooltipPopup2(componentProps, forwardedRef) {
8486    const {
8487      render,
8488      className,
8489      style,
8490      ...elementProps
8491    } = componentProps;
8492    const store2 = useTooltipRootContext();
8493    const {
8494      side,
8495      align
8496    } = useTooltipPositionerContext();
8497    const open = store2.useState("open");
8498    const instantType = store2.useState("instantType");
8499    const transitionStatus = store2.useState("transitionStatus");
8500    const popupProps = store2.useState("popupProps");
8501    const floatingContext = store2.useState("floatingRootContext");
8502    const disabled2 = store2.useState("disabled");
8503    const closeDelay = store2.useState("closeDelay");
8504    useOpenChangeComplete({
8505      open,
8506      ref: store2.context.popupRef,
8507      onComplete() {
8508        if (open) {
8509          store2.context.onOpenChangeComplete?.(true);
8510        }
8511      }
8512    });
8513    useHoverFloatingInteraction(floatingContext, {
8514      enabled: !disabled2,
8515      closeDelay
8516    });
8517    const setPopupElement = store2.useStateSetter("popupElement");
8518    const state = {
8519      open,
8520      side,
8521      align,
8522      instant: instantType,
8523      transitionStatus
8524    };
8525    const element = useRenderElement("div", componentProps, {
8526      state,
8527      ref: [forwardedRef, store2.context.popupRef, setPopupElement],
8528      props: [FOCUSABLE_POPUP_PROPS, popupProps, getDisabledMountTransitionStyles(transitionStatus), elementProps],
8529      stateAttributesMapping: popupTransitionStateMapping
8530    });
8531    return element;
8532  });
8533  if (true) TooltipPopup.displayName = "TooltipPopup";
8534  
8535  // node_modules/@base-ui/react/tooltip/arrow/TooltipArrow.mjs
8536  var React49 = __toESM(require_react(), 1);
8537  var TooltipArrow = /* @__PURE__ */ React49.forwardRef(function TooltipArrow2(componentProps, forwardedRef) {
8538    const {
8539      render,
8540      className,
8541      style,
8542      ...elementProps
8543    } = componentProps;
8544    const store2 = useTooltipRootContext();
8545    const {
8546      arrowRef,
8547      side,
8548      align,
8549      arrowUncentered,
8550      arrowStyles
8551    } = useTooltipPositionerContext();
8552    const open = store2.useState("open");
8553    const instantType = store2.useState("instantType");
8554    const state = {
8555      open,
8556      side,
8557      align,
8558      uncentered: arrowUncentered,
8559      instant: instantType
8560    };
8561    const element = useRenderElement("div", componentProps, {
8562      state,
8563      ref: [forwardedRef, arrowRef],
8564      props: [{
8565        style: arrowStyles,
8566        "aria-hidden": true
8567      }, elementProps],
8568      stateAttributesMapping: popupStateMapping
8569    });
8570    return element;
8571  });
8572  if (true) TooltipArrow.displayName = "TooltipArrow";
8573  
8574  // node_modules/@base-ui/react/tooltip/provider/TooltipProvider.mjs
8575  var React50 = __toESM(require_react(), 1);
8576  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
8577  var TooltipProvider = function TooltipProvider2(props) {
8578    const {
8579      delay,
8580      closeDelay,
8581      timeout = 400
8582    } = props;
8583    const delayValue = React50.useMemo(() => ({
8584      open: delay,
8585      close: closeDelay
8586    }), [delay, closeDelay]);
8587    return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TooltipProviderContext.Provider, {
8588      value: delay,
8589      children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FloatingDelayGroup, {
8590        delay: delayValue,
8591        timeoutMs: timeout,
8592        children: props.children
8593      })
8594    });
8595  };
8596  if (true) TooltipProvider.displayName = "TooltipProvider";
8597  
8598  // node_modules/@base-ui/react/tooltip/viewport/TooltipViewport.mjs
8599  var React51 = __toESM(require_react(), 1);
8600  var TooltipViewport = /* @__PURE__ */ React51.forwardRef(function TooltipViewport2(componentProps, forwardedRef) {
8601    const {
8602      render,
8603      className,
8604      style,
8605      children,
8606      ...elementProps
8607    } = componentProps;
8608    const store2 = useTooltipRootContext();
8609    const positioner = useTooltipPositionerContext();
8610    const instantType = store2.useState("instantType");
8611    const {
8612      children: childrenToRender,
8613      state: viewportState
8614    } = usePopupViewport({
8615      store: store2,
8616      side: positioner.side,
8617      children
8618    });
8619    const state = {
8620      activationDirection: viewportState.activationDirection,
8621      transitioning: viewportState.transitioning,
8622      instant: instantType
8623    };
8624    return useRenderElement("div", componentProps, {
8625      state,
8626      ref: forwardedRef,
8627      props: [elementProps, {
8628        children: childrenToRender
8629      }],
8630      stateAttributesMapping: popupViewportStateMapping
8631    });
8632  });
8633  if (true) TooltipViewport.displayName = "TooltipViewport";
8634  
8635  // node_modules/@base-ui/react/tooltip/store/TooltipHandle.mjs
8636  var TooltipHandle = class extends BasePopupHandle {
8637    constructor() {
8638      super(createNullTooltipStore(), "Tooltip");
8639    }
8640    /**
8641     * Opens the tooltip and associates it with the trigger with the given id.
8642     *
8643     * This method should only be called in an event handler or an effect (not during rendering).
8644     *
8645     * @param triggerId ID of the trigger to associate with the tooltip. The trigger must be a matching
8646     * `Tooltip.Trigger` with this handle passed as a prop.
8647     */
8648    open(triggerId) {
8649      this.openByTrigger(triggerId);
8650    }
8651    /**
8652     * Closes the tooltip.
8653     *
8654     * This method should only be called in an event handler or an effect (not during rendering).
8655     */
8656    close() {
8657      this.closePopup();
8658    }
8659    /**
8660     * Whether the tooltip is currently open. Returns `false` while no root is attached to the handle.
8661     */
8662    get isOpen() {
8663      return this.attachedStore?.select("open") ?? false;
8664    }
8665  };
8666  function createTooltipHandle() {
8667    return new TooltipHandle();
8668  }
8669  
8670  // node_modules/@base-ui/react/use-render/useRender.mjs
8671  function useRender(params) {
8672    return useRenderElement(params.defaultTagName ?? "div", params, params);
8673  }
8674  
8675  // packages/ui/build-module/text/text.mjs
8676  var import_element10 = __toESM(require_element(), 1);
8677  var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
8678  function getRuntime() {
8679    const globalScope = globalThis;
8680    if (globalScope.__wpStyleRuntime) {
8681      return globalScope.__wpStyleRuntime;
8682    }
8683    globalScope.__wpStyleRuntime = {
8684      documents: /* @__PURE__ */ new Map(),
8685      styles: /* @__PURE__ */ new Map(),
8686      injectedStyles: /* @__PURE__ */ new WeakMap()
8687    };
8688    if (typeof document !== "undefined") {
8689      registerDocument(document);
8690    }
8691    return globalScope.__wpStyleRuntime;
8692  }
8693  function documentContainsStyleHash(targetDocument, hash) {
8694    if (!targetDocument.head) {
8695      return false;
8696    }
8697    for (const style of targetDocument.head.querySelectorAll(
8698      `style[$STYLE_HASH_ATTRIBUTE}]`
8699    )) {
8700      if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
8701        return true;
8702      }
8703    }
8704    return false;
8705  }
8706  function injectStyle(targetDocument, hash, css) {
8707    if (!targetDocument.head) {
8708      return;
8709    }
8710    const runtime = getRuntime();
8711    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8712    if (!injectedStyles) {
8713      injectedStyles = /* @__PURE__ */ new Set();
8714      runtime.injectedStyles.set(targetDocument, injectedStyles);
8715    }
8716    if (injectedStyles.has(hash)) {
8717      return;
8718    }
8719    if (documentContainsStyleHash(targetDocument, hash)) {
8720      injectedStyles.add(hash);
8721      return;
8722    }
8723    const style = targetDocument.createElement("style");
8724    style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
8725    style.appendChild(targetDocument.createTextNode(css));
8726    targetDocument.head.appendChild(style);
8727    injectedStyles.add(hash);
8728  }
8729  function registerDocument(targetDocument) {
8730    const runtime = getRuntime();
8731    runtime.documents.set(
8732      targetDocument,
8733      (runtime.documents.get(targetDocument) ?? 0) + 1
8734    );
8735    for (const [hash, css] of runtime.styles) {
8736      injectStyle(targetDocument, hash, css);
8737    }
8738    return () => {
8739      const count = runtime.documents.get(targetDocument);
8740      if (count === void 0) {
8741        return;
8742      }
8743      if (count <= 1) {
8744        runtime.documents.delete(targetDocument);
8745        return;
8746      }
8747      runtime.documents.set(targetDocument, count - 1);
8748    };
8749  }
8750  function registerStyle(hash, css) {
8751    const runtime = getRuntime();
8752    runtime.styles.set(hash, css);
8753    for (const targetDocument of runtime.documents.keys()) {
8754      injectStyle(targetDocument, hash, css);
8755    }
8756  }
8757  if (typeof process === "undefined" || true) {
8758    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)}}}');
8759  }
8760  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" };
8761  if (typeof process === "undefined" || true) {
8762    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)}");
8763  }
8764  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" };
8765  var Text = (0, import_element10.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) {
8766    const element = useRender({
8767      render,
8768      defaultTagName: "span",
8769      ref,
8770      props: mergeProps(props, {
8771        className: clsx_default(
8772          style_default.text,
8773          global_css_defense_default.heading,
8774          global_css_defense_default.p,
8775          style_default[variant],
8776          className
8777        )
8778      })
8779    });
8780    return element;
8781  });
8782  
8783  // packages/ui/build-module/badge/badge.mjs
8784  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
8785  var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
8786  function getRuntime2() {
8787    const globalScope = globalThis;
8788    if (globalScope.__wpStyleRuntime) {
8789      return globalScope.__wpStyleRuntime;
8790    }
8791    globalScope.__wpStyleRuntime = {
8792      documents: /* @__PURE__ */ new Map(),
8793      styles: /* @__PURE__ */ new Map(),
8794      injectedStyles: /* @__PURE__ */ new WeakMap()
8795    };
8796    if (typeof document !== "undefined") {
8797      registerDocument2(document);
8798    }
8799    return globalScope.__wpStyleRuntime;
8800  }
8801  function documentContainsStyleHash2(targetDocument, hash) {
8802    if (!targetDocument.head) {
8803      return false;
8804    }
8805    for (const style of targetDocument.head.querySelectorAll(
8806      `style[$STYLE_HASH_ATTRIBUTE2}]`
8807    )) {
8808      if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) {
8809        return true;
8810      }
8811    }
8812    return false;
8813  }
8814  function injectStyle2(targetDocument, hash, css) {
8815    if (!targetDocument.head) {
8816      return;
8817    }
8818    const runtime = getRuntime2();
8819    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8820    if (!injectedStyles) {
8821      injectedStyles = /* @__PURE__ */ new Set();
8822      runtime.injectedStyles.set(targetDocument, injectedStyles);
8823    }
8824    if (injectedStyles.has(hash)) {
8825      return;
8826    }
8827    if (documentContainsStyleHash2(targetDocument, hash)) {
8828      injectedStyles.add(hash);
8829      return;
8830    }
8831    const style = targetDocument.createElement("style");
8832    style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash);
8833    style.appendChild(targetDocument.createTextNode(css));
8834    targetDocument.head.appendChild(style);
8835    injectedStyles.add(hash);
8836  }
8837  function registerDocument2(targetDocument) {
8838    const runtime = getRuntime2();
8839    runtime.documents.set(
8840      targetDocument,
8841      (runtime.documents.get(targetDocument) ?? 0) + 1
8842    );
8843    for (const [hash, css] of runtime.styles) {
8844      injectStyle2(targetDocument, hash, css);
8845    }
8846    return () => {
8847      const count = runtime.documents.get(targetDocument);
8848      if (count === void 0) {
8849        return;
8850      }
8851      if (count <= 1) {
8852        runtime.documents.delete(targetDocument);
8853        return;
8854      }
8855      runtime.documents.set(targetDocument, count - 1);
8856    };
8857  }
8858  function registerStyle2(hash, css) {
8859    const runtime = getRuntime2();
8860    runtime.styles.set(hash, css);
8861    for (const targetDocument of runtime.documents.keys()) {
8862      injectStyle2(targetDocument, hash, css);
8863    }
8864  }
8865  if (typeof process === "undefined" || true) {
8866    registerStyle2("59353631d1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-background-surface-error,#f7e6e3);color:var(--wpds-color-foreground-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-background-surface-warning,#fae8c8);color:var(--wpds-color-foreground-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-background-surface-caution,#ffea8f);color:var(--wpds-color-foreground-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-background-surface-success,#ccf4d2);color:var(--wpds-color-foreground-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-background-surface-info,#e0ebf8);color:var(--wpds-color-foreground-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-foreground-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);padding-block:calc(var(--wpds-dimension-padding-xs, 4px) - var(--wpds-border-width-xs, 1px));padding-inline:calc(var(--wpds-dimension-padding-sm, 8px) - var(--wpds-border-width-xs, 1px))}}}");
8867  }
8868  var style_default2 = { "badge": "_96e6251aad1a6136__badge", "is-high-intent": "_99f7158cb520f750__is-high-intent", "is-medium-intent": "c20ebef2365bc8b7__is-medium-intent", "is-low-intent": "_365e1626c6202e52__is-low-intent", "is-stable-intent": "_33f8198127ddf4ef__is-stable-intent", "is-informational-intent": "_04c1aca8fc449412__is-informational-intent", "is-draft-intent": "_90726e69d495ec19__is-draft-intent", "is-none-intent": "_898f4a544993bd39__is-none-intent" };
8869  var Badge = (0, import_element11.forwardRef)(function Badge2({ intent = "none", className, ...props }, ref) {
8870    return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8871      Text,
8872      {
8873        ref,
8874        className: clsx_default(
8875          style_default2.badge,
8876          style_default2[`is-$intent}-intent`],
8877          className
8878        ),
8879        ...props,
8880        variant: "body-sm"
8881      }
8882    );
8883  });
8884  
8885  // packages/ui/build-module/tooltip/popup.mjs
8886  var import_element15 = __toESM(require_element(), 1);
8887  
8888  // packages/ui/build-module/tooltip/portal.mjs
8889  var import_element12 = __toESM(require_element(), 1);
8890  
8891  // packages/ui/build-module/utils/wp-compat-overlay-slot.mjs
8892  var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
8893  function getRuntime3() {
8894    const globalScope = globalThis;
8895    if (globalScope.__wpStyleRuntime) {
8896      return globalScope.__wpStyleRuntime;
8897    }
8898    globalScope.__wpStyleRuntime = {
8899      documents: /* @__PURE__ */ new Map(),
8900      styles: /* @__PURE__ */ new Map(),
8901      injectedStyles: /* @__PURE__ */ new WeakMap()
8902    };
8903    if (typeof document !== "undefined") {
8904      registerDocument3(document);
8905    }
8906    return globalScope.__wpStyleRuntime;
8907  }
8908  function documentContainsStyleHash3(targetDocument, hash) {
8909    if (!targetDocument.head) {
8910      return false;
8911    }
8912    for (const style of targetDocument.head.querySelectorAll(
8913      `style[$STYLE_HASH_ATTRIBUTE3}]`
8914    )) {
8915      if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) {
8916        return true;
8917      }
8918    }
8919    return false;
8920  }
8921  function injectStyle3(targetDocument, hash, css) {
8922    if (!targetDocument.head) {
8923      return;
8924    }
8925    const runtime = getRuntime3();
8926    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8927    if (!injectedStyles) {
8928      injectedStyles = /* @__PURE__ */ new Set();
8929      runtime.injectedStyles.set(targetDocument, injectedStyles);
8930    }
8931    if (injectedStyles.has(hash)) {
8932      return;
8933    }
8934    if (documentContainsStyleHash3(targetDocument, hash)) {
8935      injectedStyles.add(hash);
8936      return;
8937    }
8938    const style = targetDocument.createElement("style");
8939    style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash);
8940    style.appendChild(targetDocument.createTextNode(css));
8941    targetDocument.head.appendChild(style);
8942    injectedStyles.add(hash);
8943  }
8944  function registerDocument3(targetDocument) {
8945    const runtime = getRuntime3();
8946    runtime.documents.set(
8947      targetDocument,
8948      (runtime.documents.get(targetDocument) ?? 0) + 1
8949    );
8950    for (const [hash, css] of runtime.styles) {
8951      injectStyle3(targetDocument, hash, css);
8952    }
8953    return () => {
8954      const count = runtime.documents.get(targetDocument);
8955      if (count === void 0) {
8956        return;
8957      }
8958      if (count <= 1) {
8959        runtime.documents.delete(targetDocument);
8960        return;
8961      }
8962      runtime.documents.set(targetDocument, count - 1);
8963    };
8964  }
8965  function registerStyle3(hash, css) {
8966    const runtime = getRuntime3();
8967    runtime.styles.set(hash, css);
8968    for (const targetDocument of runtime.documents.keys()) {
8969      injectStyle3(targetDocument, hash, css);
8970    }
8971  }
8972  if (typeof process === "undefined" || true) {
8973    registerStyle3("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}}}");
8974  }
8975  var wp_compat_overlay_slot_default = { "slot": "_11fc52b637ff8a7e__slot" };
8976  var WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE = "data-wp-compat-overlay-slot";
8977  function resolveOwnerDocument() {
8978    return typeof document === "undefined" ? null : document;
8979  }
8980  function isInWordPressEnvironment() {
8981    let topWp;
8982    try {
8983      topWp = window.top?.wp;
8984    } catch {
8985    }
8986    const wp = topWp ?? window.wp;
8987    return typeof wp?.components === "object" && wp.components !== null;
8988  }
8989  var cachedSlot = null;
8990  function ensureSlotIsAccessible(element) {
8991    element.setAttribute("aria-hidden", "false");
8992    return element;
8993  }
8994  function createSlot(ownerDocument2) {
8995    const element = ownerDocument2.createElement("div");
8996    element.setAttribute(WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE, "");
8997    if (wp_compat_overlay_slot_default.slot) {
8998      element.classList.add(wp_compat_overlay_slot_default.slot);
8999    }
9000    ownerDocument2.body.appendChild(element);
9001    return element;
9002  }
9003  function getWpCompatOverlaySlot() {
9004    if (typeof window === "undefined") {
9005      return void 0;
9006    }
9007    if (!isInWordPressEnvironment() && window.__wpUiCompatOverlaySlotEnabled !== true) {
9008      return void 0;
9009    }
9010    const ownerDocument2 = resolveOwnerDocument();
9011    if (!ownerDocument2 || !ownerDocument2.body) {
9012      return void 0;
9013    }
9014    if (cachedSlot && cachedSlot.ownerDocument === ownerDocument2 && cachedSlot.isConnected) {
9015      return ensureSlotIsAccessible(cachedSlot);
9016    }
9017    const existing = ownerDocument2.querySelector(
9018      `[$WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE}]`
9019    );
9020    if (existing instanceof HTMLDivElement) {
9021      cachedSlot = ensureSlotIsAccessible(existing);
9022      return cachedSlot;
9023    }
9024    if (cachedSlot?.isConnected) {
9025      cachedSlot.remove();
9026    }
9027    cachedSlot = ensureSlotIsAccessible(createSlot(ownerDocument2));
9028    return cachedSlot;
9029  }
9030  
9031  // packages/ui/build-module/tooltip/portal.mjs
9032  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
9033  var Portal = (0, import_element12.forwardRef)(
9034    function TooltipPortal3({ container, ...restProps }, ref) {
9035      return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
9036        index_parts_exports.Portal,
9037        {
9038          container: container ?? getWpCompatOverlaySlot(),
9039          ...restProps,
9040          ref
9041        }
9042      );
9043    }
9044  );
9045  
9046  // packages/ui/build-module/tooltip/positioner.mjs
9047  var import_element13 = __toESM(require_element(), 1);
9048  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
9049  var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
9050  function getRuntime4() {
9051    const globalScope = globalThis;
9052    if (globalScope.__wpStyleRuntime) {
9053      return globalScope.__wpStyleRuntime;
9054    }
9055    globalScope.__wpStyleRuntime = {
9056      documents: /* @__PURE__ */ new Map(),
9057      styles: /* @__PURE__ */ new Map(),
9058      injectedStyles: /* @__PURE__ */ new WeakMap()
9059    };
9060    if (typeof document !== "undefined") {
9061      registerDocument4(document);
9062    }
9063    return globalScope.__wpStyleRuntime;
9064  }
9065  function documentContainsStyleHash4(targetDocument, hash) {
9066    if (!targetDocument.head) {
9067      return false;
9068    }
9069    for (const style of targetDocument.head.querySelectorAll(
9070      `style[$STYLE_HASH_ATTRIBUTE4}]`
9071    )) {
9072      if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
9073        return true;
9074      }
9075    }
9076    return false;
9077  }
9078  function injectStyle4(targetDocument, hash, css) {
9079    if (!targetDocument.head) {
9080      return;
9081    }
9082    const runtime = getRuntime4();
9083    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9084    if (!injectedStyles) {
9085      injectedStyles = /* @__PURE__ */ new Set();
9086      runtime.injectedStyles.set(targetDocument, injectedStyles);
9087    }
9088    if (injectedStyles.has(hash)) {
9089      return;
9090    }
9091    if (documentContainsStyleHash4(targetDocument, hash)) {
9092      injectedStyles.add(hash);
9093      return;
9094    }
9095    const style = targetDocument.createElement("style");
9096    style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
9097    style.appendChild(targetDocument.createTextNode(css));
9098    targetDocument.head.appendChild(style);
9099    injectedStyles.add(hash);
9100  }
9101  function registerDocument4(targetDocument) {
9102    const runtime = getRuntime4();
9103    runtime.documents.set(
9104      targetDocument,
9105      (runtime.documents.get(targetDocument) ?? 0) + 1
9106    );
9107    for (const [hash, css] of runtime.styles) {
9108      injectStyle4(targetDocument, hash, css);
9109    }
9110    return () => {
9111      const count = runtime.documents.get(targetDocument);
9112      if (count === void 0) {
9113        return;
9114      }
9115      if (count <= 1) {
9116        runtime.documents.delete(targetDocument);
9117        return;
9118      }
9119      runtime.documents.set(targetDocument, count - 1);
9120    };
9121  }
9122  function registerStyle4(hash, css) {
9123    const runtime = getRuntime4();
9124    runtime.styles.set(hash, css);
9125    for (const targetDocument of runtime.documents.keys()) {
9126      injectStyle4(targetDocument, hash, css);
9127    }
9128  }
9129  if (typeof process === "undefined" || true) {
9130    registerStyle4("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
9131  }
9132  var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
9133  if (typeof process === "undefined" || true) {
9134    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}}}}');
9135  }
9136  var style_default3 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
9137  var Positioner = (0, import_element13.forwardRef)(
9138    function TooltipPositioner3({ align = "center", className, side = "top", sideOffset = 4, ...props }, ref) {
9139      return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
9140        index_parts_exports.Positioner,
9141        {
9142          ref,
9143          align,
9144          side,
9145          sideOffset,
9146          ...props,
9147          className: clsx_default(
9148            resets_default["box-sizing"],
9149            style_default3.positioner,
9150            className
9151          )
9152        }
9153      );
9154    }
9155  );
9156  
9157  // packages/ui/build-module/utils/render-slot-with-children.mjs
9158  var import_element14 = __toESM(require_element(), 1);
9159  function renderSlotWithChildren(slot, defaultSlot, children) {
9160    return (0, import_element14.cloneElement)(slot ?? defaultSlot, { children });
9161  }
9162  
9163  // packages/ui/build-module/utils/theme-provider.mjs
9164  var theme = __toESM(require_theme(), 1);
9165  
9166  // packages/ui/build-module/lock-unlock.mjs
9167  var import_private_apis = __toESM(require_private_apis(), 1);
9168  var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
9169    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
9170    "@wordpress/ui"
9171  );
9172  
9173  // packages/ui/build-module/utils/theme-provider.mjs
9174  function getThemeProvider() {
9175    const themePackage = theme;
9176    if (themePackage.ThemeProvider) {
9177      return themePackage.ThemeProvider;
9178    }
9179    if (!themePackage.privateApis) {
9180      throw new Error(
9181        "@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`."
9182      );
9183    }
9184    return unlock(
9185      themePackage.privateApis
9186    ).ThemeProvider;
9187  }
9188  var ThemeProvider = getThemeProvider();
9189  
9190  // packages/ui/build-module/tooltip/popup.mjs
9191  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
9192  var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash";
9193  function getRuntime5() {
9194    const globalScope = globalThis;
9195    if (globalScope.__wpStyleRuntime) {
9196      return globalScope.__wpStyleRuntime;
9197    }
9198    globalScope.__wpStyleRuntime = {
9199      documents: /* @__PURE__ */ new Map(),
9200      styles: /* @__PURE__ */ new Map(),
9201      injectedStyles: /* @__PURE__ */ new WeakMap()
9202    };
9203    if (typeof document !== "undefined") {
9204      registerDocument5(document);
9205    }
9206    return globalScope.__wpStyleRuntime;
9207  }
9208  function documentContainsStyleHash5(targetDocument, hash) {
9209    if (!targetDocument.head) {
9210      return false;
9211    }
9212    for (const style of targetDocument.head.querySelectorAll(
9213      `style[$STYLE_HASH_ATTRIBUTE5}]`
9214    )) {
9215      if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) {
9216        return true;
9217      }
9218    }
9219    return false;
9220  }
9221  function injectStyle5(targetDocument, hash, css) {
9222    if (!targetDocument.head) {
9223      return;
9224    }
9225    const runtime = getRuntime5();
9226    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9227    if (!injectedStyles) {
9228      injectedStyles = /* @__PURE__ */ new Set();
9229      runtime.injectedStyles.set(targetDocument, injectedStyles);
9230    }
9231    if (injectedStyles.has(hash)) {
9232      return;
9233    }
9234    if (documentContainsStyleHash5(targetDocument, hash)) {
9235      injectedStyles.add(hash);
9236      return;
9237    }
9238    const style = targetDocument.createElement("style");
9239    style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash);
9240    style.appendChild(targetDocument.createTextNode(css));
9241    targetDocument.head.appendChild(style);
9242    injectedStyles.add(hash);
9243  }
9244  function registerDocument5(targetDocument) {
9245    const runtime = getRuntime5();
9246    runtime.documents.set(
9247      targetDocument,
9248      (runtime.documents.get(targetDocument) ?? 0) + 1
9249    );
9250    for (const [hash, css] of runtime.styles) {
9251      injectStyle5(targetDocument, hash, css);
9252    }
9253    return () => {
9254      const count = runtime.documents.get(targetDocument);
9255      if (count === void 0) {
9256        return;
9257      }
9258      if (count <= 1) {
9259        runtime.documents.delete(targetDocument);
9260        return;
9261      }
9262      runtime.documents.set(targetDocument, count - 1);
9263    };
9264  }
9265  function registerStyle5(hash, css) {
9266    const runtime = getRuntime5();
9267    runtime.styles.set(hash, css);
9268    for (const targetDocument of runtime.documents.keys()) {
9269      injectStyle5(targetDocument, hash, css);
9270    }
9271  }
9272  if (typeof process === "undefined" || true) {
9273    registerStyle5("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}}}}');
9274  }
9275  var style_default4 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
9276  var POPUP_COLOR = { background: "#1e1e1e" };
9277  var Popup = (0, import_element15.forwardRef)(function TooltipPopup3({ portal, positioner, children, className, ...props }, ref) {
9278    const popupContent = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ThemeProvider, { color: POPUP_COLOR, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
9279      index_parts_exports.Popup,
9280      {
9281        ref,
9282        className: clsx_default(style_default4.popup, className),
9283        ...props,
9284        children
9285      }
9286    ) });
9287    const positionedPopup = renderSlotWithChildren(
9288      positioner,
9289      /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Positioner, {}),
9290      popupContent
9291    );
9292    return renderSlotWithChildren(portal, /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Portal, {}), positionedPopup);
9293  });
9294  
9295  // packages/ui/build-module/tooltip/trigger.mjs
9296  var import_element16 = __toESM(require_element(), 1);
9297  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
9298  var Trigger = (0, import_element16.forwardRef)(
9299    function TooltipTrigger3(props, ref) {
9300      return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(index_parts_exports.Trigger, { ref, ...props });
9301    }
9302  );
9303  
9304  // packages/ui/build-module/utils/direction-provider.mjs
9305  var import_i18n = __toESM(require_i18n(), 1);
9306  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
9307  function DirectionProvider3({ children }) {
9308    return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DirectionProvider, { direction: (0, import_i18n.isRTL)() ? "rtl" : "ltr", children });
9309  }
9310  
9311  // packages/ui/build-module/tooltip/root.mjs
9312  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
9313  function Root(props) {
9314    return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DirectionProvider3, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(index_parts_exports.Root, { ...props }) });
9315  }
9316  
9317  // packages/ui/build-module/link/link.mjs
9318  var import_element17 = __toESM(require_element(), 1);
9319  var import_i18n2 = __toESM(require_i18n(), 1);
9320  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
9321  var STYLE_HASH_ATTRIBUTE6 = "data-wp-hash";
9322  function getRuntime6() {
9323    const globalScope = globalThis;
9324    if (globalScope.__wpStyleRuntime) {
9325      return globalScope.__wpStyleRuntime;
9326    }
9327    globalScope.__wpStyleRuntime = {
9328      documents: /* @__PURE__ */ new Map(),
9329      styles: /* @__PURE__ */ new Map(),
9330      injectedStyles: /* @__PURE__ */ new WeakMap()
9331    };
9332    if (typeof document !== "undefined") {
9333      registerDocument6(document);
9334    }
9335    return globalScope.__wpStyleRuntime;
9336  }
9337  function documentContainsStyleHash6(targetDocument, hash) {
9338    if (!targetDocument.head) {
9339      return false;
9340    }
9341    for (const style of targetDocument.head.querySelectorAll(
9342      `style[$STYLE_HASH_ATTRIBUTE6}]`
9343    )) {
9344      if (style.getAttribute(STYLE_HASH_ATTRIBUTE6) === hash) {
9345        return true;
9346      }
9347    }
9348    return false;
9349  }
9350  function injectStyle6(targetDocument, hash, css) {
9351    if (!targetDocument.head) {
9352      return;
9353    }
9354    const runtime = getRuntime6();
9355    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9356    if (!injectedStyles) {
9357      injectedStyles = /* @__PURE__ */ new Set();
9358      runtime.injectedStyles.set(targetDocument, injectedStyles);
9359    }
9360    if (injectedStyles.has(hash)) {
9361      return;
9362    }
9363    if (documentContainsStyleHash6(targetDocument, hash)) {
9364      injectedStyles.add(hash);
9365      return;
9366    }
9367    const style = targetDocument.createElement("style");
9368    style.setAttribute(STYLE_HASH_ATTRIBUTE6, hash);
9369    style.appendChild(targetDocument.createTextNode(css));
9370    targetDocument.head.appendChild(style);
9371    injectedStyles.add(hash);
9372  }
9373  function registerDocument6(targetDocument) {
9374    const runtime = getRuntime6();
9375    runtime.documents.set(
9376      targetDocument,
9377      (runtime.documents.get(targetDocument) ?? 0) + 1
9378    );
9379    for (const [hash, css] of runtime.styles) {
9380      injectStyle6(targetDocument, hash, css);
9381    }
9382    return () => {
9383      const count = runtime.documents.get(targetDocument);
9384      if (count === void 0) {
9385        return;
9386      }
9387      if (count <= 1) {
9388        runtime.documents.delete(targetDocument);
9389        return;
9390      }
9391      runtime.documents.set(targetDocument, count - 1);
9392    };
9393  }
9394  function registerStyle6(hash, css) {
9395    const runtime = getRuntime6();
9396    runtime.styles.set(hash, css);
9397    for (const targetDocument of runtime.documents.keys()) {
9398      injectStyle6(targetDocument, hash, css);
9399    }
9400  }
9401  if (typeof process === "undefined" || true) {
9402    registerStyle6("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
9403  }
9404  var resets_default2 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
9405  if (typeof process === "undefined" || true) {
9406    registerStyle6("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))}}}");
9407  }
9408  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" };
9409  if (typeof process === "undefined" || true) {
9410    registerStyle6("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"}}}');
9411  }
9412  var style_default5 = { "link": "d4250949359b05ce__link", "is-brand": "c6055659b8e2cd2c__is-brand", "is-neutral": "_92e0dfcaeee15b88__is-neutral", "is-unstyled": "cf122a9bf1035d42__is-unstyled", "link-icon": "_0cb411afac4c86c7__link-icon" };
9413  if (typeof process === "undefined" || true) {
9414    registerStyle6("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)}");
9415  }
9416  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" };
9417  var Link = (0, import_element17.forwardRef)(function Link2({
9418    children,
9419    variant = "default",
9420    tone = "brand",
9421    openInNewTab = false,
9422    target,
9423    render,
9424    className,
9425    ...props
9426  }, ref) {
9427    const shouldShowNewTabIndicator = openInNewTab || /^_blank$/i.test(target ?? "");
9428    const element = useRender({
9429      render,
9430      defaultTagName: "a",
9431      ref,
9432      props: mergeProps(props, {
9433        className: clsx_default(
9434          global_css_defense_default2.a,
9435          resets_default2["box-sizing"],
9436          focus_module_default["outset-ring--focus-except-active"],
9437          variant !== "unstyled" && style_default5.link,
9438          variant !== "unstyled" && style_default5[`is-$tone}`],
9439          variant === "unstyled" && style_default5["is-unstyled"],
9440          className
9441        ),
9442        target: target ?? (openInNewTab ? "_blank" : void 0),
9443        children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
9444          children,
9445          shouldShowNewTabIndicator && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9446            "span",
9447            {
9448              className: style_default5["link-icon"],
9449              role: "img",
9450              "aria-label": (
9451                /* translators: accessibility text appended to link text */
9452                (0, import_i18n2.__)("(opens in a new tab)")
9453              )
9454            }
9455          )
9456        ] })
9457      })
9458    });
9459    return element;
9460  });
9461  
9462  // packages/icons/build-module/library/caution.mjs
9463  var import_primitives = __toESM(require_primitives(), 1);
9464  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
9465  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" }) });
9466  
9467  // packages/icons/build-module/library/close-small.mjs
9468  var import_primitives2 = __toESM(require_primitives(), 1);
9469  var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
9470  var close_small_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.75 16.25L16.25 7.75M16.25 16.25L7.75 7.75", vectorEffect: "non-scaling-stroke" }) });
9471  
9472  // packages/icons/build-module/library/error.mjs
9473  var import_primitives3 = __toESM(require_primitives(), 1);
9474  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
9475  var error_default = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives3.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" }) });
9476  
9477  // packages/icons/build-module/library/info.mjs
9478  var import_primitives4 = __toESM(require_primitives(), 1);
9479  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
9480  var info_default = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives4.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" }) });
9481  
9482  // packages/icons/build-module/library/published.mjs
9483  var import_primitives5 = __toESM(require_primitives(), 1);
9484  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
9485  var published_default = /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
9486    /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives5.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" }),
9487    /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives5.Path, { d: "M9 12L11 14L15 10", vectorEffect: "non-scaling-stroke" })
9488  ] });
9489  
9490  // packages/ui/build-module/icon/icon.mjs
9491  var import_element18 = __toESM(require_element(), 1);
9492  var import_primitives6 = __toESM(require_primitives(), 1);
9493  var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
9494  var Icon = (0, import_element18.forwardRef)(function Icon2({ icon, size: size4 = 24, style, ...restProps }, ref) {
9495    const mergedStyle = icon.props.style || style ? { ...icon.props.style, ...style } : void 0;
9496    return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
9497      import_primitives6.SVG,
9498      {
9499        ref,
9500        ...icon.props,
9501        ...restProps,
9502        ...mergedStyle ? { style: mergedStyle } : {},
9503        width: size4,
9504        height: size4
9505      }
9506    );
9507  });
9508  
9509  // packages/ui/build-module/utils/keyboard-shortcut.mjs
9510  var import_element20 = __toESM(require_element(), 1);
9511  var import_i18n3 = __toESM(require_i18n(), 1);
9512  
9513  // packages/ui/build-module/visually-hidden/visually-hidden.mjs
9514  var import_element19 = __toESM(require_element(), 1);
9515  var STYLE_HASH_ATTRIBUTE7 = "data-wp-hash";
9516  function getRuntime7() {
9517    const globalScope = globalThis;
9518    if (globalScope.__wpStyleRuntime) {
9519      return globalScope.__wpStyleRuntime;
9520    }
9521    globalScope.__wpStyleRuntime = {
9522      documents: /* @__PURE__ */ new Map(),
9523      styles: /* @__PURE__ */ new Map(),
9524      injectedStyles: /* @__PURE__ */ new WeakMap()
9525    };
9526    if (typeof document !== "undefined") {
9527      registerDocument7(document);
9528    }
9529    return globalScope.__wpStyleRuntime;
9530  }
9531  function documentContainsStyleHash7(targetDocument, hash) {
9532    if (!targetDocument.head) {
9533      return false;
9534    }
9535    for (const style of targetDocument.head.querySelectorAll(
9536      `style[$STYLE_HASH_ATTRIBUTE7}]`
9537    )) {
9538      if (style.getAttribute(STYLE_HASH_ATTRIBUTE7) === hash) {
9539        return true;
9540      }
9541    }
9542    return false;
9543  }
9544  function injectStyle7(targetDocument, hash, css) {
9545    if (!targetDocument.head) {
9546      return;
9547    }
9548    const runtime = getRuntime7();
9549    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9550    if (!injectedStyles) {
9551      injectedStyles = /* @__PURE__ */ new Set();
9552      runtime.injectedStyles.set(targetDocument, injectedStyles);
9553    }
9554    if (injectedStyles.has(hash)) {
9555      return;
9556    }
9557    if (documentContainsStyleHash7(targetDocument, hash)) {
9558      injectedStyles.add(hash);
9559      return;
9560    }
9561    const style = targetDocument.createElement("style");
9562    style.setAttribute(STYLE_HASH_ATTRIBUTE7, hash);
9563    style.appendChild(targetDocument.createTextNode(css));
9564    targetDocument.head.appendChild(style);
9565    injectedStyles.add(hash);
9566  }
9567  function registerDocument7(targetDocument) {
9568    const runtime = getRuntime7();
9569    runtime.documents.set(
9570      targetDocument,
9571      (runtime.documents.get(targetDocument) ?? 0) + 1
9572    );
9573    for (const [hash, css] of runtime.styles) {
9574      injectStyle7(targetDocument, hash, css);
9575    }
9576    return () => {
9577      const count = runtime.documents.get(targetDocument);
9578      if (count === void 0) {
9579        return;
9580      }
9581      if (count <= 1) {
9582        runtime.documents.delete(targetDocument);
9583        return;
9584      }
9585      runtime.documents.set(targetDocument, count - 1);
9586    };
9587  }
9588  function registerStyle7(hash, css) {
9589    const runtime = getRuntime7();
9590    runtime.styles.set(hash, css);
9591    for (const targetDocument of runtime.documents.keys()) {
9592      injectStyle7(targetDocument, hash, css);
9593    }
9594  }
9595  if (typeof process === "undefined" || true) {
9596    registerStyle7("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}}}");
9597  }
9598  var style_default6 = { "visually-hidden": "f37b9e2e191ebd66__visually-hidden" };
9599  var VisuallyHidden = (0, import_element19.forwardRef)(
9600    function VisuallyHidden2({ render, ...restProps }, ref) {
9601      const element = useRender({
9602        render,
9603        ref,
9604        props: mergeProps(
9605          { className: style_default6["visually-hidden"] },
9606          restProps,
9607          {
9608            // @ts-expect-error Arbitrary data-* attributes aren't indexable on the typed div props. Kept hardcoded so consumers can't change or remove it.
9609            "data-visually-hidden": ""
9610          }
9611        )
9612      });
9613      return element;
9614    }
9615  );
9616  
9617  // packages/ui/build-module/utils/keyboard-shortcut.mjs
9618  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
9619  function useKeyboardShortcutProps({
9620    "aria-describedby": ariaDescribedBy,
9621    "aria-keyshortcuts": ariaKeyShortcuts,
9622    shortcut
9623  }) {
9624    const generatedDescriptionId = (0, import_element20.useId)();
9625    const descriptionId = shortcut ? generatedDescriptionId : void 0;
9626    const describedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ");
9627    return {
9628      descriptionId,
9629      targetProps: {
9630        "aria-describedby": describedBy || void 0,
9631        "aria-keyshortcuts": shortcut?.ariaKeyShortcut ?? ariaKeyShortcuts
9632      }
9633    };
9634  }
9635  var KeyboardShortcutDescription = (0, import_element20.forwardRef)(function KeyboardShortcutDescription2({ descriptionId, shortcut }, ref) {
9636    return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9637      VisuallyHidden,
9638      {
9639        id: descriptionId,
9640        "aria-hidden": "true",
9641        render: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { ref }),
9642        children: (0, import_i18n3.sprintf)(
9643          /* translators: %s: keyboard shortcut. */
9644          (0, import_i18n3.__)("Keyboard shortcut: %s"),
9645          shortcut.label ?? shortcut.ariaKeyShortcut
9646        )
9647      }
9648    );
9649  });
9650  var KeyboardShortcutDisplay = (0, import_element20.forwardRef)(function KeyboardShortcutDisplay2({ className, shortcut }, ref) {
9651    return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { ref, "aria-hidden": "true", className, dir: "ltr", children: shortcut.displayShortcut });
9652  });
9653  
9654  // packages/ui/build-module/button/button.mjs
9655  var import_element21 = __toESM(require_element(), 1);
9656  var import_i18n4 = __toESM(require_i18n(), 1);
9657  var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
9658  import { speak } from "@wordpress/a11y";
9659  var STYLE_HASH_ATTRIBUTE8 = "data-wp-hash";
9660  function getRuntime8() {
9661    const globalScope = globalThis;
9662    if (globalScope.__wpStyleRuntime) {
9663      return globalScope.__wpStyleRuntime;
9664    }
9665    globalScope.__wpStyleRuntime = {
9666      documents: /* @__PURE__ */ new Map(),
9667      styles: /* @__PURE__ */ new Map(),
9668      injectedStyles: /* @__PURE__ */ new WeakMap()
9669    };
9670    if (typeof document !== "undefined") {
9671      registerDocument8(document);
9672    }
9673    return globalScope.__wpStyleRuntime;
9674  }
9675  function documentContainsStyleHash8(targetDocument, hash) {
9676    if (!targetDocument.head) {
9677      return false;
9678    }
9679    for (const style of targetDocument.head.querySelectorAll(
9680      `style[$STYLE_HASH_ATTRIBUTE8}]`
9681    )) {
9682      if (style.getAttribute(STYLE_HASH_ATTRIBUTE8) === hash) {
9683        return true;
9684      }
9685    }
9686    return false;
9687  }
9688  function injectStyle8(targetDocument, hash, css) {
9689    if (!targetDocument.head) {
9690      return;
9691    }
9692    const runtime = getRuntime8();
9693    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9694    if (!injectedStyles) {
9695      injectedStyles = /* @__PURE__ */ new Set();
9696      runtime.injectedStyles.set(targetDocument, injectedStyles);
9697    }
9698    if (injectedStyles.has(hash)) {
9699      return;
9700    }
9701    if (documentContainsStyleHash8(targetDocument, hash)) {
9702      injectedStyles.add(hash);
9703      return;
9704    }
9705    const style = targetDocument.createElement("style");
9706    style.setAttribute(STYLE_HASH_ATTRIBUTE8, hash);
9707    style.appendChild(targetDocument.createTextNode(css));
9708    targetDocument.head.appendChild(style);
9709    injectedStyles.add(hash);
9710  }
9711  function registerDocument8(targetDocument) {
9712    const runtime = getRuntime8();
9713    runtime.documents.set(
9714      targetDocument,
9715      (runtime.documents.get(targetDocument) ?? 0) + 1
9716    );
9717    for (const [hash, css] of runtime.styles) {
9718      injectStyle8(targetDocument, hash, css);
9719    }
9720    return () => {
9721      const count = runtime.documents.get(targetDocument);
9722      if (count === void 0) {
9723        return;
9724      }
9725      if (count <= 1) {
9726        runtime.documents.delete(targetDocument);
9727        return;
9728      }
9729      runtime.documents.set(targetDocument, count - 1);
9730    };
9731  }
9732  function registerStyle8(hash, css) {
9733    const runtime = getRuntime8();
9734    runtime.styles.set(hash, css);
9735    for (const targetDocument of runtime.documents.keys()) {
9736      injectStyle8(targetDocument, hash, css);
9737    }
9738  }
9739  if (typeof process === "undefined" || true) {
9740    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)}}}');
9741  }
9742  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" };
9743  if (typeof process === "undefined" || true) {
9744    registerStyle8("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
9745  }
9746  var resets_default3 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
9747  if (typeof process === "undefined" || true) {
9748    registerStyle8("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))}}}");
9749  }
9750  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" };
9751  if (typeof process === "undefined" || true) {
9752    registerStyle8("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)}");
9753  }
9754  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" };
9755  var Button3 = (0, import_element21.forwardRef)(
9756    function Button22({
9757      tone = "brand",
9758      variant = "solid",
9759      size: size4 = "default",
9760      className,
9761      focusableWhenDisabled = true,
9762      disabled: disabled2,
9763      loading,
9764      loadingAnnouncement = (0, import_i18n4.__)("Loading"),
9765      children,
9766      ...props
9767    }, ref) {
9768      const mergedClassName = clsx_default(
9769        global_css_defense_default3.button,
9770        resets_default3["box-sizing"],
9771        focus_module_default2["outset-ring--focus-except-active"],
9772        variant !== "unstyled" && style_default7.button,
9773        style_default7[`is-$tone}`],
9774        style_default7[`is-$variant}`],
9775        style_default7[`is-$size4}`],
9776        loading && style_default7["is-loading"],
9777        className
9778      );
9779      (0, import_element21.useEffect)(() => {
9780        if (loading && loadingAnnouncement) {
9781          speak(loadingAnnouncement);
9782        }
9783      }, [loading, loadingAnnouncement]);
9784      return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
9785        Button,
9786        {
9787          ref,
9788          className: mergedClassName,
9789          focusableWhenDisabled,
9790          disabled: disabled2 ?? loading,
9791          ...props,
9792          children
9793        }
9794      );
9795    }
9796  );
9797  
9798  // packages/ui/build-module/button/icon.mjs
9799  var import_element22 = __toESM(require_element(), 1);
9800  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
9801  var STYLE_HASH_ATTRIBUTE9 = "data-wp-hash";
9802  function getRuntime9() {
9803    const globalScope = globalThis;
9804    if (globalScope.__wpStyleRuntime) {
9805      return globalScope.__wpStyleRuntime;
9806    }
9807    globalScope.__wpStyleRuntime = {
9808      documents: /* @__PURE__ */ new Map(),
9809      styles: /* @__PURE__ */ new Map(),
9810      injectedStyles: /* @__PURE__ */ new WeakMap()
9811    };
9812    if (typeof document !== "undefined") {
9813      registerDocument9(document);
9814    }
9815    return globalScope.__wpStyleRuntime;
9816  }
9817  function documentContainsStyleHash9(targetDocument, hash) {
9818    if (!targetDocument.head) {
9819      return false;
9820    }
9821    for (const style of targetDocument.head.querySelectorAll(
9822      `style[$STYLE_HASH_ATTRIBUTE9}]`
9823    )) {
9824      if (style.getAttribute(STYLE_HASH_ATTRIBUTE9) === hash) {
9825        return true;
9826      }
9827    }
9828    return false;
9829  }
9830  function injectStyle9(targetDocument, hash, css) {
9831    if (!targetDocument.head) {
9832      return;
9833    }
9834    const runtime = getRuntime9();
9835    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9836    if (!injectedStyles) {
9837      injectedStyles = /* @__PURE__ */ new Set();
9838      runtime.injectedStyles.set(targetDocument, injectedStyles);
9839    }
9840    if (injectedStyles.has(hash)) {
9841      return;
9842    }
9843    if (documentContainsStyleHash9(targetDocument, hash)) {
9844      injectedStyles.add(hash);
9845      return;
9846    }
9847    const style = targetDocument.createElement("style");
9848    style.setAttribute(STYLE_HASH_ATTRIBUTE9, hash);
9849    style.appendChild(targetDocument.createTextNode(css));
9850    targetDocument.head.appendChild(style);
9851    injectedStyles.add(hash);
9852  }
9853  function registerDocument9(targetDocument) {
9854    const runtime = getRuntime9();
9855    runtime.documents.set(
9856      targetDocument,
9857      (runtime.documents.get(targetDocument) ?? 0) + 1
9858    );
9859    for (const [hash, css] of runtime.styles) {
9860      injectStyle9(targetDocument, hash, css);
9861    }
9862    return () => {
9863      const count = runtime.documents.get(targetDocument);
9864      if (count === void 0) {
9865        return;
9866      }
9867      if (count <= 1) {
9868        runtime.documents.delete(targetDocument);
9869        return;
9870      }
9871      runtime.documents.set(targetDocument, count - 1);
9872    };
9873  }
9874  function registerStyle9(hash, css) {
9875    const runtime = getRuntime9();
9876    runtime.styles.set(hash, css);
9877    for (const targetDocument of runtime.documents.keys()) {
9878      injectStyle9(targetDocument, hash, css);
9879    }
9880  }
9881  if (typeof process === "undefined" || true) {
9882    registerStyle9("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)}}}');
9883  }
9884  var style_default8 = { "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" };
9885  var ButtonIcon = (0, import_element22.forwardRef)(
9886    function ButtonIcon2({ className, icon, ...props }, ref) {
9887      return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
9888        Icon,
9889        {
9890          ref,
9891          icon,
9892          className: clsx_default(style_default8.icon, className),
9893          size: 24,
9894          ...props
9895        }
9896      );
9897    }
9898  );
9899  
9900  // packages/ui/build-module/button/index.mjs
9901  ButtonIcon.displayName = "Button.Icon";
9902  var Button4 = Object.assign(Button3, {
9903    /**
9904     * An icon component specifically designed to work well when rendered inside
9905     * a `Button` component.
9906     */
9907    Icon: ButtonIcon
9908  });
9909  
9910  // packages/ui/build-module/icon-button/icon-button.mjs
9911  var import_element23 = __toESM(require_element(), 1);
9912  var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
9913  var STYLE_HASH_ATTRIBUTE10 = "data-wp-hash";
9914  function getRuntime10() {
9915    const globalScope = globalThis;
9916    if (globalScope.__wpStyleRuntime) {
9917      return globalScope.__wpStyleRuntime;
9918    }
9919    globalScope.__wpStyleRuntime = {
9920      documents: /* @__PURE__ */ new Map(),
9921      styles: /* @__PURE__ */ new Map(),
9922      injectedStyles: /* @__PURE__ */ new WeakMap()
9923    };
9924    if (typeof document !== "undefined") {
9925      registerDocument10(document);
9926    }
9927    return globalScope.__wpStyleRuntime;
9928  }
9929  function documentContainsStyleHash10(targetDocument, hash) {
9930    if (!targetDocument.head) {
9931      return false;
9932    }
9933    for (const style of targetDocument.head.querySelectorAll(
9934      `style[$STYLE_HASH_ATTRIBUTE10}]`
9935    )) {
9936      if (style.getAttribute(STYLE_HASH_ATTRIBUTE10) === hash) {
9937        return true;
9938      }
9939    }
9940    return false;
9941  }
9942  function injectStyle10(targetDocument, hash, css) {
9943    if (!targetDocument.head) {
9944      return;
9945    }
9946    const runtime = getRuntime10();
9947    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9948    if (!injectedStyles) {
9949      injectedStyles = /* @__PURE__ */ new Set();
9950      runtime.injectedStyles.set(targetDocument, injectedStyles);
9951    }
9952    if (injectedStyles.has(hash)) {
9953      return;
9954    }
9955    if (documentContainsStyleHash10(targetDocument, hash)) {
9956      injectedStyles.add(hash);
9957      return;
9958    }
9959    const style = targetDocument.createElement("style");
9960    style.setAttribute(STYLE_HASH_ATTRIBUTE10, hash);
9961    style.appendChild(targetDocument.createTextNode(css));
9962    targetDocument.head.appendChild(style);
9963    injectedStyles.add(hash);
9964  }
9965  function registerDocument10(targetDocument) {
9966    const runtime = getRuntime10();
9967    runtime.documents.set(
9968      targetDocument,
9969      (runtime.documents.get(targetDocument) ?? 0) + 1
9970    );
9971    for (const [hash, css] of runtime.styles) {
9972      injectStyle10(targetDocument, hash, css);
9973    }
9974    return () => {
9975      const count = runtime.documents.get(targetDocument);
9976      if (count === void 0) {
9977        return;
9978      }
9979      if (count <= 1) {
9980        runtime.documents.delete(targetDocument);
9981        return;
9982      }
9983      runtime.documents.set(targetDocument, count - 1);
9984    };
9985  }
9986  function registerStyle10(hash, css) {
9987    const runtime = getRuntime10();
9988    runtime.styles.set(hash, css);
9989    for (const targetDocument of runtime.documents.keys()) {
9990      injectStyle10(targetDocument, hash, css);
9991    }
9992  }
9993  if (typeof process === "undefined" || true) {
9994    registerStyle10("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}}}");
9995  }
9996  var style_default9 = { "icon-button": "_28cfdc260e755391__icon-button", "icon": "f1c70d719989a85a__icon" };
9997  var IconButton = (0, import_element23.forwardRef)(
9998    function IconButton2({
9999      label,
10000      className,
10001      // Prevent accidental forwarding of `children`
10002      children: _children,
10003      disabled: disabled2,
10004      focusableWhenDisabled = true,
10005      icon,
10006      size: size4,
10007      shortcut,
10008      positioner,
10009      "aria-describedby": ariaDescribedBy,
10010      "aria-keyshortcuts": ariaKeyShortcuts,
10011      ...restProps
10012    }, ref) {
10013      const classes = clsx_default(style_default9["icon-button"], className);
10014      const { descriptionId, targetProps } = useKeyboardShortcutProps({
10015        "aria-describedby": ariaDescribedBy,
10016        "aria-keyshortcuts": ariaKeyShortcuts,
10017        shortcut
10018      });
10019      return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Root, { children: [
10020        /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
10021          Trigger,
10022          {
10023            ref,
10024            ...targetProps,
10025            disabled: disabled2 && !focusableWhenDisabled,
10026            render: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
10027              Button4,
10028              {
10029                ...restProps,
10030                size: size4,
10031                "aria-label": label,
10032                disabled: disabled2,
10033                focusableWhenDisabled
10034              }
10035            ),
10036            className: classes,
10037            children: [
10038              /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { icon, size: 24, className: style_default9.icon }),
10039              shortcut && descriptionId && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
10040                KeyboardShortcutDescription,
10041                {
10042                  descriptionId,
10043                  shortcut
10044                }
10045              )
10046            ]
10047          }
10048        ),
10049        /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Popup, { positioner, children: [
10050          label,
10051          shortcut && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
10052            " ",
10053            /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(KeyboardShortcutDisplay, { shortcut })
10054          ] })
10055        ] })
10056      ] });
10057    }
10058  );
10059  
10060  // packages/ui/build-module/stack/stack.mjs
10061  var import_element24 = __toESM(require_element(), 1);
10062  var STYLE_HASH_ATTRIBUTE11 = "data-wp-hash";
10063  function getRuntime11() {
10064    const globalScope = globalThis;
10065    if (globalScope.__wpStyleRuntime) {
10066      return globalScope.__wpStyleRuntime;
10067    }
10068    globalScope.__wpStyleRuntime = {
10069      documents: /* @__PURE__ */ new Map(),
10070      styles: /* @__PURE__ */ new Map(),
10071      injectedStyles: /* @__PURE__ */ new WeakMap()
10072    };
10073    if (typeof document !== "undefined") {
10074      registerDocument11(document);
10075    }
10076    return globalScope.__wpStyleRuntime;
10077  }
10078  function documentContainsStyleHash11(targetDocument, hash) {
10079    if (!targetDocument.head) {
10080      return false;
10081    }
10082    for (const style of targetDocument.head.querySelectorAll(
10083      `style[$STYLE_HASH_ATTRIBUTE11}]`
10084    )) {
10085      if (style.getAttribute(STYLE_HASH_ATTRIBUTE11) === hash) {
10086        return true;
10087      }
10088    }
10089    return false;
10090  }
10091  function injectStyle11(targetDocument, hash, css) {
10092    if (!targetDocument.head) {
10093      return;
10094    }
10095    const runtime = getRuntime11();
10096    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10097    if (!injectedStyles) {
10098      injectedStyles = /* @__PURE__ */ new Set();
10099      runtime.injectedStyles.set(targetDocument, injectedStyles);
10100    }
10101    if (injectedStyles.has(hash)) {
10102      return;
10103    }
10104    if (documentContainsStyleHash11(targetDocument, hash)) {
10105      injectedStyles.add(hash);
10106      return;
10107    }
10108    const style = targetDocument.createElement("style");
10109    style.setAttribute(STYLE_HASH_ATTRIBUTE11, hash);
10110    style.appendChild(targetDocument.createTextNode(css));
10111    targetDocument.head.appendChild(style);
10112    injectedStyles.add(hash);
10113  }
10114  function registerDocument11(targetDocument) {
10115    const runtime = getRuntime11();
10116    runtime.documents.set(
10117      targetDocument,
10118      (runtime.documents.get(targetDocument) ?? 0) + 1
10119    );
10120    for (const [hash, css] of runtime.styles) {
10121      injectStyle11(targetDocument, hash, css);
10122    }
10123    return () => {
10124      const count = runtime.documents.get(targetDocument);
10125      if (count === void 0) {
10126        return;
10127      }
10128      if (count <= 1) {
10129        runtime.documents.delete(targetDocument);
10130        return;
10131      }
10132      runtime.documents.set(targetDocument, count - 1);
10133    };
10134  }
10135  function registerStyle11(hash, css) {
10136    const runtime = getRuntime11();
10137    runtime.styles.set(hash, css);
10138    for (const targetDocument of runtime.documents.keys()) {
10139      injectStyle11(targetDocument, hash, css);
10140    }
10141  }
10142  if (typeof process === "undefined" || true) {
10143    registerStyle11("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
10144  }
10145  var style_default10 = { "stack": "_19ce0419607e1896__stack" };
10146  var gapTokens = {
10147    xs: "var(--wpds-dimension-gap-xs, 4px)",
10148    sm: "var(--wpds-dimension-gap-sm, 8px)",
10149    md: "var(--wpds-dimension-gap-md, 12px)",
10150    lg: "var(--wpds-dimension-gap-lg, 16px)",
10151    xl: "var(--wpds-dimension-gap-xl, 24px)",
10152    "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
10153    "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
10154  };
10155  var Stack = (0, import_element24.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
10156    const style = {
10157      gap: gap && gapTokens[gap],
10158      alignItems: align,
10159      justifyContent: justify,
10160      flexDirection: direction,
10161      flexWrap: wrap
10162    };
10163    const element = useRender({
10164      render,
10165      ref,
10166      props: mergeProps(props, { style, className: style_default10.stack })
10167    });
10168    return element;
10169  });
10170  
10171  // packages/ui/build-module/notice/index.mjs
10172  var notice_exports = {};
10173  __export(notice_exports, {
10174    ActionButton: () => ActionButton,
10175    ActionLink: () => ActionLink,
10176    Actions: () => Actions,
10177    CloseIcon: () => CloseIcon,
10178    Description: () => Description,
10179    Root: () => Root2,
10180    Title: () => Title
10181  });
10182  
10183  // packages/ui/build-module/notice/root.mjs
10184  var import_element25 = __toESM(require_element(), 1);
10185  import { speak as speak2 } from "@wordpress/a11y";
10186  var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
10187  var STYLE_HASH_ATTRIBUTE12 = "data-wp-hash";
10188  function getRuntime12() {
10189    const globalScope = globalThis;
10190    if (globalScope.__wpStyleRuntime) {
10191      return globalScope.__wpStyleRuntime;
10192    }
10193    globalScope.__wpStyleRuntime = {
10194      documents: /* @__PURE__ */ new Map(),
10195      styles: /* @__PURE__ */ new Map(),
10196      injectedStyles: /* @__PURE__ */ new WeakMap()
10197    };
10198    if (typeof document !== "undefined") {
10199      registerDocument12(document);
10200    }
10201    return globalScope.__wpStyleRuntime;
10202  }
10203  function documentContainsStyleHash12(targetDocument, hash) {
10204    if (!targetDocument.head) {
10205      return false;
10206    }
10207    for (const style of targetDocument.head.querySelectorAll(
10208      `style[$STYLE_HASH_ATTRIBUTE12}]`
10209    )) {
10210      if (style.getAttribute(STYLE_HASH_ATTRIBUTE12) === hash) {
10211        return true;
10212      }
10213    }
10214    return false;
10215  }
10216  function injectStyle12(targetDocument, hash, css) {
10217    if (!targetDocument.head) {
10218      return;
10219    }
10220    const runtime = getRuntime12();
10221    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10222    if (!injectedStyles) {
10223      injectedStyles = /* @__PURE__ */ new Set();
10224      runtime.injectedStyles.set(targetDocument, injectedStyles);
10225    }
10226    if (injectedStyles.has(hash)) {
10227      return;
10228    }
10229    if (documentContainsStyleHash12(targetDocument, hash)) {
10230      injectedStyles.add(hash);
10231      return;
10232    }
10233    const style = targetDocument.createElement("style");
10234    style.setAttribute(STYLE_HASH_ATTRIBUTE12, hash);
10235    style.appendChild(targetDocument.createTextNode(css));
10236    targetDocument.head.appendChild(style);
10237    injectedStyles.add(hash);
10238  }
10239  function registerDocument12(targetDocument) {
10240    const runtime = getRuntime12();
10241    runtime.documents.set(
10242      targetDocument,
10243      (runtime.documents.get(targetDocument) ?? 0) + 1
10244    );
10245    for (const [hash, css] of runtime.styles) {
10246      injectStyle12(targetDocument, hash, css);
10247    }
10248    return () => {
10249      const count = runtime.documents.get(targetDocument);
10250      if (count === void 0) {
10251        return;
10252      }
10253      if (count <= 1) {
10254        runtime.documents.delete(targetDocument);
10255        return;
10256      }
10257      runtime.documents.set(targetDocument, count - 1);
10258    };
10259  }
10260  function registerStyle12(hash, css) {
10261    const runtime = getRuntime12();
10262    runtime.styles.set(hash, css);
10263    for (const targetDocument of runtime.documents.keys()) {
10264      injectStyle12(targetDocument, hash, css);
10265    }
10266  }
10267  if (typeof process === "undefined" || true) {
10268    registerStyle12("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
10269  }
10270  var resets_default4 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
10271  if (typeof process === "undefined" || true) {
10272    registerStyle12("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))}}}");
10273  }
10274  var style_default11 = { "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" };
10275  var icons = {
10276    neutral: null,
10277    info: info_default,
10278    warning: caution_default,
10279    success: published_default,
10280    error: error_default
10281  };
10282  function getDefaultPoliteness(intent) {
10283    return intent === "error" ? "assertive" : "polite";
10284  }
10285  function safeRenderToString(message) {
10286    if (!message) {
10287      return void 0;
10288    }
10289    if (typeof message === "string") {
10290      return message;
10291    }
10292    try {
10293      return (0, import_element25.renderToString)(message);
10294    } catch {
10295      return void 0;
10296    }
10297  }
10298  function useSpokenMessage(message, politeness) {
10299    const spokenMessage = safeRenderToString(message);
10300    (0, import_element25.useEffect)(() => {
10301      if (spokenMessage) {
10302        speak2(spokenMessage, politeness);
10303      }
10304    }, [spokenMessage, politeness]);
10305  }
10306  var Root2 = (0, import_element25.forwardRef)(function Notice({
10307    intent = "neutral",
10308    children,
10309    icon,
10310    spokenMessage = children,
10311    politeness = getDefaultPoliteness(intent),
10312    render,
10313    ...restProps
10314  }, ref) {
10315    useSpokenMessage(spokenMessage, politeness);
10316    const iconElement = icon === null ? null : icon ?? icons[intent];
10317    const mergedClassName = clsx_default(
10318      style_default11.notice,
10319      style_default11[`is-$intent}`],
10320      resets_default4["box-sizing"]
10321    );
10322    const element = useRender({
10323      defaultTagName: "div",
10324      render,
10325      ref,
10326      props: mergeProps(
10327        {
10328          className: mergedClassName,
10329          children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
10330            children,
10331            iconElement && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
10332              Icon,
10333              {
10334                className: style_default11.icon,
10335                icon: iconElement
10336              }
10337            )
10338          ] })
10339        },
10340        restProps
10341      )
10342    });
10343    return element;
10344  });
10345  
10346  // packages/ui/build-module/notice/title.mjs
10347  var import_element26 = __toESM(require_element(), 1);
10348  var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
10349  var STYLE_HASH_ATTRIBUTE13 = "data-wp-hash";
10350  function getRuntime13() {
10351    const globalScope = globalThis;
10352    if (globalScope.__wpStyleRuntime) {
10353      return globalScope.__wpStyleRuntime;
10354    }
10355    globalScope.__wpStyleRuntime = {
10356      documents: /* @__PURE__ */ new Map(),
10357      styles: /* @__PURE__ */ new Map(),
10358      injectedStyles: /* @__PURE__ */ new WeakMap()
10359    };
10360    if (typeof document !== "undefined") {
10361      registerDocument13(document);
10362    }
10363    return globalScope.__wpStyleRuntime;
10364  }
10365  function documentContainsStyleHash13(targetDocument, hash) {
10366    if (!targetDocument.head) {
10367      return false;
10368    }
10369    for (const style of targetDocument.head.querySelectorAll(
10370      `style[$STYLE_HASH_ATTRIBUTE13}]`
10371    )) {
10372      if (style.getAttribute(STYLE_HASH_ATTRIBUTE13) === hash) {
10373        return true;
10374      }
10375    }
10376    return false;
10377  }
10378  function injectStyle13(targetDocument, hash, css) {
10379    if (!targetDocument.head) {
10380      return;
10381    }
10382    const runtime = getRuntime13();
10383    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10384    if (!injectedStyles) {
10385      injectedStyles = /* @__PURE__ */ new Set();
10386      runtime.injectedStyles.set(targetDocument, injectedStyles);
10387    }
10388    if (injectedStyles.has(hash)) {
10389      return;
10390    }
10391    if (documentContainsStyleHash13(targetDocument, hash)) {
10392      injectedStyles.add(hash);
10393      return;
10394    }
10395    const style = targetDocument.createElement("style");
10396    style.setAttribute(STYLE_HASH_ATTRIBUTE13, hash);
10397    style.appendChild(targetDocument.createTextNode(css));
10398    targetDocument.head.appendChild(style);
10399    injectedStyles.add(hash);
10400  }
10401  function registerDocument13(targetDocument) {
10402    const runtime = getRuntime13();
10403    runtime.documents.set(
10404      targetDocument,
10405      (runtime.documents.get(targetDocument) ?? 0) + 1
10406    );
10407    for (const [hash, css] of runtime.styles) {
10408      injectStyle13(targetDocument, hash, css);
10409    }
10410    return () => {
10411      const count = runtime.documents.get(targetDocument);
10412      if (count === void 0) {
10413        return;
10414      }
10415      if (count <= 1) {
10416        runtime.documents.delete(targetDocument);
10417        return;
10418      }
10419      runtime.documents.set(targetDocument, count - 1);
10420    };
10421  }
10422  function registerStyle13(hash, css) {
10423    const runtime = getRuntime13();
10424    runtime.styles.set(hash, css);
10425    for (const targetDocument of runtime.documents.keys()) {
10426      injectStyle13(targetDocument, hash, css);
10427    }
10428  }
10429  if (typeof process === "undefined" || true) {
10430    registerStyle13("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))}}}");
10431  }
10432  var style_default12 = { "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" };
10433  var Title = (0, import_element26.forwardRef)(
10434    function NoticeTitle({ className, ...props }, ref) {
10435      return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
10436        Text,
10437        {
10438          ref,
10439          variant: "heading-md",
10440          className: clsx_default(style_default12.title, className),
10441          ...props
10442        }
10443      );
10444    }
10445  );
10446  
10447  // packages/ui/build-module/notice/description.mjs
10448  var import_element27 = __toESM(require_element(), 1);
10449  var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
10450  var STYLE_HASH_ATTRIBUTE14 = "data-wp-hash";
10451  function getRuntime14() {
10452    const globalScope = globalThis;
10453    if (globalScope.__wpStyleRuntime) {
10454      return globalScope.__wpStyleRuntime;
10455    }
10456    globalScope.__wpStyleRuntime = {
10457      documents: /* @__PURE__ */ new Map(),
10458      styles: /* @__PURE__ */ new Map(),
10459      injectedStyles: /* @__PURE__ */ new WeakMap()
10460    };
10461    if (typeof document !== "undefined") {
10462      registerDocument14(document);
10463    }
10464    return globalScope.__wpStyleRuntime;
10465  }
10466  function documentContainsStyleHash14(targetDocument, hash) {
10467    if (!targetDocument.head) {
10468      return false;
10469    }
10470    for (const style of targetDocument.head.querySelectorAll(
10471      `style[$STYLE_HASH_ATTRIBUTE14}]`
10472    )) {
10473      if (style.getAttribute(STYLE_HASH_ATTRIBUTE14) === hash) {
10474        return true;
10475      }
10476    }
10477    return false;
10478  }
10479  function injectStyle14(targetDocument, hash, css) {
10480    if (!targetDocument.head) {
10481      return;
10482    }
10483    const runtime = getRuntime14();
10484    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10485    if (!injectedStyles) {
10486      injectedStyles = /* @__PURE__ */ new Set();
10487      runtime.injectedStyles.set(targetDocument, injectedStyles);
10488    }
10489    if (injectedStyles.has(hash)) {
10490      return;
10491    }
10492    if (documentContainsStyleHash14(targetDocument, hash)) {
10493      injectedStyles.add(hash);
10494      return;
10495    }
10496    const style = targetDocument.createElement("style");
10497    style.setAttribute(STYLE_HASH_ATTRIBUTE14, hash);
10498    style.appendChild(targetDocument.createTextNode(css));
10499    targetDocument.head.appendChild(style);
10500    injectedStyles.add(hash);
10501  }
10502  function registerDocument14(targetDocument) {
10503    const runtime = getRuntime14();
10504    runtime.documents.set(
10505      targetDocument,
10506      (runtime.documents.get(targetDocument) ?? 0) + 1
10507    );
10508    for (const [hash, css] of runtime.styles) {
10509      injectStyle14(targetDocument, hash, css);
10510    }
10511    return () => {
10512      const count = runtime.documents.get(targetDocument);
10513      if (count === void 0) {
10514        return;
10515      }
10516      if (count <= 1) {
10517        runtime.documents.delete(targetDocument);
10518        return;
10519      }
10520      runtime.documents.set(targetDocument, count - 1);
10521    };
10522  }
10523  function registerStyle14(hash, css) {
10524    const runtime = getRuntime14();
10525    runtime.styles.set(hash, css);
10526    for (const targetDocument of runtime.documents.keys()) {
10527      injectStyle14(targetDocument, hash, css);
10528    }
10529  }
10530  if (typeof process === "undefined" || true) {
10531    registerStyle14("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))}}}");
10532  }
10533  var style_default13 = { "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" };
10534  var Description = (0, import_element27.forwardRef)(
10535    function NoticeDescription({ className, ...props }, ref) {
10536      return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
10537        Text,
10538        {
10539          ref,
10540          variant: "body-md",
10541          className: clsx_default(style_default13.description, className),
10542          ...props
10543        }
10544      );
10545    }
10546  );
10547  
10548  // packages/ui/build-module/notice/actions.mjs
10549  var import_element28 = __toESM(require_element(), 1);
10550  var STYLE_HASH_ATTRIBUTE15 = "data-wp-hash";
10551  function getRuntime15() {
10552    const globalScope = globalThis;
10553    if (globalScope.__wpStyleRuntime) {
10554      return globalScope.__wpStyleRuntime;
10555    }
10556    globalScope.__wpStyleRuntime = {
10557      documents: /* @__PURE__ */ new Map(),
10558      styles: /* @__PURE__ */ new Map(),
10559      injectedStyles: /* @__PURE__ */ new WeakMap()
10560    };
10561    if (typeof document !== "undefined") {
10562      registerDocument15(document);
10563    }
10564    return globalScope.__wpStyleRuntime;
10565  }
10566  function documentContainsStyleHash15(targetDocument, hash) {
10567    if (!targetDocument.head) {
10568      return false;
10569    }
10570    for (const style of targetDocument.head.querySelectorAll(
10571      `style[$STYLE_HASH_ATTRIBUTE15}]`
10572    )) {
10573      if (style.getAttribute(STYLE_HASH_ATTRIBUTE15) === hash) {
10574        return true;
10575      }
10576    }
10577    return false;
10578  }
10579  function injectStyle15(targetDocument, hash, css) {
10580    if (!targetDocument.head) {
10581      return;
10582    }
10583    const runtime = getRuntime15();
10584    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10585    if (!injectedStyles) {
10586      injectedStyles = /* @__PURE__ */ new Set();
10587      runtime.injectedStyles.set(targetDocument, injectedStyles);
10588    }
10589    if (injectedStyles.has(hash)) {
10590      return;
10591    }
10592    if (documentContainsStyleHash15(targetDocument, hash)) {
10593      injectedStyles.add(hash);
10594      return;
10595    }
10596    const style = targetDocument.createElement("style");
10597    style.setAttribute(STYLE_HASH_ATTRIBUTE15, hash);
10598    style.appendChild(targetDocument.createTextNode(css));
10599    targetDocument.head.appendChild(style);
10600    injectedStyles.add(hash);
10601  }
10602  function registerDocument15(targetDocument) {
10603    const runtime = getRuntime15();
10604    runtime.documents.set(
10605      targetDocument,
10606      (runtime.documents.get(targetDocument) ?? 0) + 1
10607    );
10608    for (const [hash, css] of runtime.styles) {
10609      injectStyle15(targetDocument, hash, css);
10610    }
10611    return () => {
10612      const count = runtime.documents.get(targetDocument);
10613      if (count === void 0) {
10614        return;
10615      }
10616      if (count <= 1) {
10617        runtime.documents.delete(targetDocument);
10618        return;
10619      }
10620      runtime.documents.set(targetDocument, count - 1);
10621    };
10622  }
10623  function registerStyle15(hash, css) {
10624    const runtime = getRuntime15();
10625    runtime.styles.set(hash, css);
10626    for (const targetDocument of runtime.documents.keys()) {
10627      injectStyle15(targetDocument, hash, css);
10628    }
10629  }
10630  if (typeof process === "undefined" || true) {
10631    registerStyle15("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))}}}");
10632  }
10633  var style_default14 = { "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" };
10634  var Actions = (0, import_element28.forwardRef)(
10635    function NoticeActions({ render, ...props }, ref) {
10636      const element = useRender({
10637        defaultTagName: "div",
10638        render,
10639        ref,
10640        props: mergeProps(
10641          {
10642            className: style_default14.actions
10643          },
10644          props
10645        )
10646      });
10647      return element;
10648    }
10649  );
10650  
10651  // packages/ui/build-module/notice/close-icon.mjs
10652  var import_element29 = __toESM(require_element(), 1);
10653  var import_i18n5 = __toESM(require_i18n(), 1);
10654  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
10655  var STYLE_HASH_ATTRIBUTE16 = "data-wp-hash";
10656  function getRuntime16() {
10657    const globalScope = globalThis;
10658    if (globalScope.__wpStyleRuntime) {
10659      return globalScope.__wpStyleRuntime;
10660    }
10661    globalScope.__wpStyleRuntime = {
10662      documents: /* @__PURE__ */ new Map(),
10663      styles: /* @__PURE__ */ new Map(),
10664      injectedStyles: /* @__PURE__ */ new WeakMap()
10665    };
10666    if (typeof document !== "undefined") {
10667      registerDocument16(document);
10668    }
10669    return globalScope.__wpStyleRuntime;
10670  }
10671  function documentContainsStyleHash16(targetDocument, hash) {
10672    if (!targetDocument.head) {
10673      return false;
10674    }
10675    for (const style of targetDocument.head.querySelectorAll(
10676      `style[$STYLE_HASH_ATTRIBUTE16}]`
10677    )) {
10678      if (style.getAttribute(STYLE_HASH_ATTRIBUTE16) === hash) {
10679        return true;
10680      }
10681    }
10682    return false;
10683  }
10684  function injectStyle16(targetDocument, hash, css) {
10685    if (!targetDocument.head) {
10686      return;
10687    }
10688    const runtime = getRuntime16();
10689    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10690    if (!injectedStyles) {
10691      injectedStyles = /* @__PURE__ */ new Set();
10692      runtime.injectedStyles.set(targetDocument, injectedStyles);
10693    }
10694    if (injectedStyles.has(hash)) {
10695      return;
10696    }
10697    if (documentContainsStyleHash16(targetDocument, hash)) {
10698      injectedStyles.add(hash);
10699      return;
10700    }
10701    const style = targetDocument.createElement("style");
10702    style.setAttribute(STYLE_HASH_ATTRIBUTE16, hash);
10703    style.appendChild(targetDocument.createTextNode(css));
10704    targetDocument.head.appendChild(style);
10705    injectedStyles.add(hash);
10706  }
10707  function registerDocument16(targetDocument) {
10708    const runtime = getRuntime16();
10709    runtime.documents.set(
10710      targetDocument,
10711      (runtime.documents.get(targetDocument) ?? 0) + 1
10712    );
10713    for (const [hash, css] of runtime.styles) {
10714      injectStyle16(targetDocument, hash, css);
10715    }
10716    return () => {
10717      const count = runtime.documents.get(targetDocument);
10718      if (count === void 0) {
10719        return;
10720      }
10721      if (count <= 1) {
10722        runtime.documents.delete(targetDocument);
10723        return;
10724      }
10725      runtime.documents.set(targetDocument, count - 1);
10726    };
10727  }
10728  function registerStyle16(hash, css) {
10729    const runtime = getRuntime16();
10730    runtime.styles.set(hash, css);
10731    for (const targetDocument of runtime.documents.keys()) {
10732      injectStyle16(targetDocument, hash, css);
10733    }
10734  }
10735  if (typeof process === "undefined" || true) {
10736    registerStyle16("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))}}}");
10737  }
10738  var style_default15 = { "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" };
10739  var CloseIcon = (0, import_element29.forwardRef)(
10740    function NoticeCloseIcon({ className, icon = close_small_default, label = (0, import_i18n5.__)("Dismiss"), ...props }, ref) {
10741      return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
10742        IconButton,
10743        {
10744          ...props,
10745          ref,
10746          className: clsx_default(style_default15["close-icon"], className),
10747          variant: "minimal",
10748          size: "small",
10749          tone: "neutral",
10750          icon,
10751          label
10752        }
10753      );
10754    }
10755  );
10756  
10757  // packages/ui/build-module/notice/action-button.mjs
10758  var import_element30 = __toESM(require_element(), 1);
10759  var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
10760  var STYLE_HASH_ATTRIBUTE17 = "data-wp-hash";
10761  function getRuntime17() {
10762    const globalScope = globalThis;
10763    if (globalScope.__wpStyleRuntime) {
10764      return globalScope.__wpStyleRuntime;
10765    }
10766    globalScope.__wpStyleRuntime = {
10767      documents: /* @__PURE__ */ new Map(),
10768      styles: /* @__PURE__ */ new Map(),
10769      injectedStyles: /* @__PURE__ */ new WeakMap()
10770    };
10771    if (typeof document !== "undefined") {
10772      registerDocument17(document);
10773    }
10774    return globalScope.__wpStyleRuntime;
10775  }
10776  function documentContainsStyleHash17(targetDocument, hash) {
10777    if (!targetDocument.head) {
10778      return false;
10779    }
10780    for (const style of targetDocument.head.querySelectorAll(
10781      `style[$STYLE_HASH_ATTRIBUTE17}]`
10782    )) {
10783      if (style.getAttribute(STYLE_HASH_ATTRIBUTE17) === hash) {
10784        return true;
10785      }
10786    }
10787    return false;
10788  }
10789  function injectStyle17(targetDocument, hash, css) {
10790    if (!targetDocument.head) {
10791      return;
10792    }
10793    const runtime = getRuntime17();
10794    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10795    if (!injectedStyles) {
10796      injectedStyles = /* @__PURE__ */ new Set();
10797      runtime.injectedStyles.set(targetDocument, injectedStyles);
10798    }
10799    if (injectedStyles.has(hash)) {
10800      return;
10801    }
10802    if (documentContainsStyleHash17(targetDocument, hash)) {
10803      injectedStyles.add(hash);
10804      return;
10805    }
10806    const style = targetDocument.createElement("style");
10807    style.setAttribute(STYLE_HASH_ATTRIBUTE17, hash);
10808    style.appendChild(targetDocument.createTextNode(css));
10809    targetDocument.head.appendChild(style);
10810    injectedStyles.add(hash);
10811  }
10812  function registerDocument17(targetDocument) {
10813    const runtime = getRuntime17();
10814    runtime.documents.set(
10815      targetDocument,
10816      (runtime.documents.get(targetDocument) ?? 0) + 1
10817    );
10818    for (const [hash, css] of runtime.styles) {
10819      injectStyle17(targetDocument, hash, css);
10820    }
10821    return () => {
10822      const count = runtime.documents.get(targetDocument);
10823      if (count === void 0) {
10824        return;
10825      }
10826      if (count <= 1) {
10827        runtime.documents.delete(targetDocument);
10828        return;
10829      }
10830      runtime.documents.set(targetDocument, count - 1);
10831    };
10832  }
10833  function registerStyle17(hash, css) {
10834    const runtime = getRuntime17();
10835    runtime.styles.set(hash, css);
10836    for (const targetDocument of runtime.documents.keys()) {
10837      injectStyle17(targetDocument, hash, css);
10838    }
10839  }
10840  if (typeof process === "undefined" || true) {
10841    registerStyle17("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))}}}");
10842  }
10843  var style_default16 = { "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" };
10844  var ActionButton = (0, import_element30.forwardRef)(
10845    function NoticeActionButton({ className, loading, loadingAnnouncement, variant, ...props }, ref) {
10846      const loadingProps = loading !== void 0 ? { loading, loadingAnnouncement: loadingAnnouncement ?? "" } : {};
10847      return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10848        Button4,
10849        {
10850          ...props,
10851          ...loadingProps,
10852          ref,
10853          size: "compact",
10854          tone: "neutral",
10855          variant,
10856          className: clsx_default(
10857            style_default16["action-button"],
10858            style_default16[`is-action-button-$variant}`],
10859            className
10860          )
10861        }
10862      );
10863    }
10864  );
10865  
10866  // packages/ui/build-module/notice/action-link.mjs
10867  var import_element31 = __toESM(require_element(), 1);
10868  var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
10869  var STYLE_HASH_ATTRIBUTE18 = "data-wp-hash";
10870  function getRuntime18() {
10871    const globalScope = globalThis;
10872    if (globalScope.__wpStyleRuntime) {
10873      return globalScope.__wpStyleRuntime;
10874    }
10875    globalScope.__wpStyleRuntime = {
10876      documents: /* @__PURE__ */ new Map(),
10877      styles: /* @__PURE__ */ new Map(),
10878      injectedStyles: /* @__PURE__ */ new WeakMap()
10879    };
10880    if (typeof document !== "undefined") {
10881      registerDocument18(document);
10882    }
10883    return globalScope.__wpStyleRuntime;
10884  }
10885  function documentContainsStyleHash18(targetDocument, hash) {
10886    if (!targetDocument.head) {
10887      return false;
10888    }
10889    for (const style of targetDocument.head.querySelectorAll(
10890      `style[$STYLE_HASH_ATTRIBUTE18}]`
10891    )) {
10892      if (style.getAttribute(STYLE_HASH_ATTRIBUTE18) === hash) {
10893        return true;
10894      }
10895    }
10896    return false;
10897  }
10898  function injectStyle18(targetDocument, hash, css) {
10899    if (!targetDocument.head) {
10900      return;
10901    }
10902    const runtime = getRuntime18();
10903    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10904    if (!injectedStyles) {
10905      injectedStyles = /* @__PURE__ */ new Set();
10906      runtime.injectedStyles.set(targetDocument, injectedStyles);
10907    }
10908    if (injectedStyles.has(hash)) {
10909      return;
10910    }
10911    if (documentContainsStyleHash18(targetDocument, hash)) {
10912      injectedStyles.add(hash);
10913      return;
10914    }
10915    const style = targetDocument.createElement("style");
10916    style.setAttribute(STYLE_HASH_ATTRIBUTE18, hash);
10917    style.appendChild(targetDocument.createTextNode(css));
10918    targetDocument.head.appendChild(style);
10919    injectedStyles.add(hash);
10920  }
10921  function registerDocument18(targetDocument) {
10922    const runtime = getRuntime18();
10923    runtime.documents.set(
10924      targetDocument,
10925      (runtime.documents.get(targetDocument) ?? 0) + 1
10926    );
10927    for (const [hash, css] of runtime.styles) {
10928      injectStyle18(targetDocument, hash, css);
10929    }
10930    return () => {
10931      const count = runtime.documents.get(targetDocument);
10932      if (count === void 0) {
10933        return;
10934      }
10935      if (count <= 1) {
10936        runtime.documents.delete(targetDocument);
10937        return;
10938      }
10939      runtime.documents.set(targetDocument, count - 1);
10940    };
10941  }
10942  function registerStyle18(hash, css) {
10943    const runtime = getRuntime18();
10944    runtime.styles.set(hash, css);
10945    for (const targetDocument of runtime.documents.keys()) {
10946      injectStyle18(targetDocument, hash, css);
10947    }
10948  }
10949  if (typeof process === "undefined" || true) {
10950    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))}}}");
10951  }
10952  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" };
10953  var ActionLink = (0, import_element31.forwardRef)(
10954    function NoticeActionLink({ className, render, ...props }, ref) {
10955      return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10956        Text,
10957        {
10958          ref,
10959          className: clsx_default(style_default17["action-link"], className),
10960          ...props,
10961          variant: "body-md",
10962          render: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Link, { tone: "neutral", variant: "default", render })
10963        }
10964      );
10965    }
10966  );
10967  
10968  // packages/admin-ui/build-module/navigable-region/index.mjs
10969  var import_element32 = __toESM(require_element(), 1);
10970  var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
10971  var NavigableRegion = (0, import_element32.forwardRef)(
10972    ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
10973      return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10974        Tag,
10975        {
10976          ref,
10977          className: clsx_default("admin-ui-navigable-region", className),
10978          "aria-label": ariaLabel,
10979          role: "region",
10980          tabIndex: "-1",
10981          ...props,
10982          children
10983        }
10984      );
10985    }
10986  );
10987  NavigableRegion.displayName = "NavigableRegion";
10988  var navigable_region_default = NavigableRegion;
10989  
10990  // packages/admin-ui/build-module/navigation/index.mjs
10991  var import_i18n6 = __toESM(require_i18n(), 1);
10992  var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
10993  var STYLE_HASH_ATTRIBUTE19 = "data-wp-hash";
10994  function getRuntime19() {
10995    const globalScope = globalThis;
10996    if (globalScope.__wpStyleRuntime) {
10997      return globalScope.__wpStyleRuntime;
10998    }
10999    globalScope.__wpStyleRuntime = {
11000      documents: /* @__PURE__ */ new Map(),
11001      styles: /* @__PURE__ */ new Map(),
11002      injectedStyles: /* @__PURE__ */ new WeakMap()
11003    };
11004    if (typeof document !== "undefined") {
11005      registerDocument19(document);
11006    }
11007    return globalScope.__wpStyleRuntime;
11008  }
11009  function documentContainsStyleHash19(targetDocument, hash) {
11010    if (!targetDocument.head) {
11011      return false;
11012    }
11013    for (const style of targetDocument.head.querySelectorAll(
11014      `style[$STYLE_HASH_ATTRIBUTE19}]`
11015    )) {
11016      if (style.getAttribute(STYLE_HASH_ATTRIBUTE19) === hash) {
11017        return true;
11018      }
11019    }
11020    return false;
11021  }
11022  function injectStyle19(targetDocument, hash, css) {
11023    if (!targetDocument.head) {
11024      return;
11025    }
11026    const runtime = getRuntime19();
11027    let injectedStyles = runtime.injectedStyles.get(targetDocument);
11028    if (!injectedStyles) {
11029      injectedStyles = /* @__PURE__ */ new Set();
11030      runtime.injectedStyles.set(targetDocument, injectedStyles);
11031    }
11032    if (injectedStyles.has(hash)) {
11033      return;
11034    }
11035    if (documentContainsStyleHash19(targetDocument, hash)) {
11036      injectedStyles.add(hash);
11037      return;
11038    }
11039    const style = targetDocument.createElement("style");
11040    style.setAttribute(STYLE_HASH_ATTRIBUTE19, hash);
11041    style.appendChild(targetDocument.createTextNode(css));
11042    targetDocument.head.appendChild(style);
11043    injectedStyles.add(hash);
11044  }
11045  function registerDocument19(targetDocument) {
11046    const runtime = getRuntime19();
11047    runtime.documents.set(
11048      targetDocument,
11049      (runtime.documents.get(targetDocument) ?? 0) + 1
11050    );
11051    for (const [hash, css] of runtime.styles) {
11052      injectStyle19(targetDocument, hash, css);
11053    }
11054    return () => {
11055      const count = runtime.documents.get(targetDocument);
11056      if (count === void 0) {
11057        return;
11058      }
11059      if (count <= 1) {
11060        runtime.documents.delete(targetDocument);
11061        return;
11062      }
11063      runtime.documents.set(targetDocument, count - 1);
11064    };
11065  }
11066  function registerStyle19(hash, css) {
11067    const runtime = getRuntime19();
11068    runtime.styles.set(hash, css);
11069    for (const targetDocument of runtime.documents.keys()) {
11070      injectStyle19(targetDocument, hash, css);
11071    }
11072  }
11073  if (typeof process === "undefined" || true) {
11074    registerStyle19("72ef022400", ".bfb5a2dd8cceebd3__list{--focus-ring-size:calc(var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px))*2);list-style:none;margin:calc(var(--focus-ring-size)*-1);overflow-x:auto;padding:var(--focus-ring-size);scroll-padding:var(--focus-ring-size)}.a4759b4cb2c8bd92__li{flex-shrink:0}._07da506d3f2d9afe__item{align-items:center;color:var(--wpds-color-foreground-interactive-neutral-weak,#707070);display:flex;font-weight:var(--wpds-typography-font-weight-default,400);min-block-size:44px;min-inline-size:44px;text-decoration:none}._07da506d3f2d9afe__item:hover,._07da506d3f2d9afe__item[aria-current=page]{color:var(--wpds-color-foreground-interactive-neutral-weak-active,#1e1e1e)}._07da506d3f2d9afe__item[aria-current=page]{font-weight:var(--wpds-typography-font-weight-emphasis,600)}");
11075  }
11076  var style_default18 = { "list": "bfb5a2dd8cceebd3__list", "li": "a4759b4cb2c8bd92__li", "item": "_07da506d3f2d9afe__item" };
11077  var Navigation = ({
11078    items,
11079    currentHref,
11080    ariaLabel = (0, import_i18n6.__)("Sections"),
11081    linkComponent,
11082    className
11083  }) => {
11084    if (!items.length) {
11085      return null;
11086    }
11087    const LinkComponent = linkComponent ?? "a";
11088    if (true) {
11089      const invalidItem = items.find(
11090        (item) => typeof item.href !== "string"
11091      );
11092      if (invalidItem) {
11093        throw new Error(
11094          `Navigation: item "$invalidItem.label}" is missing an \`href\` prop.`
11095        );
11096      }
11097      const duplicate = items.find(
11098        (item, index2) => items.findIndex((other) => other.href === item.href) !== index2
11099      );
11100      if (duplicate) {
11101        throw new Error(
11102          `Navigation: duplicate \`href\` "$duplicate.href}". Each item must have a unique \`href\` so a single item receives \`aria-current="page"\`.`
11103        );
11104      }
11105    }
11106    return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("nav", { "aria-label": ariaLabel, className, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11107      Stack,
11108      {
11109        render: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("ul", { role: "list" }),
11110        direction: "row",
11111        align: "center",
11112        gap: "md",
11113        className: style_default18.list,
11114        children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("li", { className: style_default18.li, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11115          Text,
11116          {
11117            variant: "body-md",
11118            className: style_default18.item,
11119            render: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11120              Link,
11121              {
11122                variant: "unstyled",
11123                "aria-current": item.href === currentHref ? "page" : void 0,
11124                render: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(LinkComponent, { href: item.href })
11125              }
11126            ),
11127            children: item.label
11128          }
11129        ) }, item.href))
11130      }
11131    ) });
11132  };
11133  var navigation_default = Navigation;
11134  
11135  // packages/admin-ui/build-module/page/sidebar-toggle-slot.mjs
11136  var import_components = __toESM(require_components(), 1);
11137  var { Fill: SidebarToggleFill, Slot: SidebarToggleSlot } = (0, import_components.createSlotFill)("SidebarToggle");
11138  
11139  // packages/admin-ui/build-module/page/header.mjs
11140  var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
11141  var STYLE_HASH_ATTRIBUTE20 = "data-wp-hash";
11142  function getRuntime20() {
11143    const globalScope = globalThis;
11144    if (globalScope.__wpStyleRuntime) {
11145      return globalScope.__wpStyleRuntime;
11146    }
11147    globalScope.__wpStyleRuntime = {
11148      documents: /* @__PURE__ */ new Map(),
11149      styles: /* @__PURE__ */ new Map(),
11150      injectedStyles: /* @__PURE__ */ new WeakMap()
11151    };
11152    if (typeof document !== "undefined") {
11153      registerDocument20(document);
11154    }
11155    return globalScope.__wpStyleRuntime;
11156  }
11157  function documentContainsStyleHash20(targetDocument, hash) {
11158    if (!targetDocument.head) {
11159      return false;
11160    }
11161    for (const style of targetDocument.head.querySelectorAll(
11162      `style[$STYLE_HASH_ATTRIBUTE20}]`
11163    )) {
11164      if (style.getAttribute(STYLE_HASH_ATTRIBUTE20) === hash) {
11165        return true;
11166      }
11167    }
11168    return false;
11169  }
11170  function injectStyle20(targetDocument, hash, css) {
11171    if (!targetDocument.head) {
11172      return;
11173    }
11174    const runtime = getRuntime20();
11175    let injectedStyles = runtime.injectedStyles.get(targetDocument);
11176    if (!injectedStyles) {
11177      injectedStyles = /* @__PURE__ */ new Set();
11178      runtime.injectedStyles.set(targetDocument, injectedStyles);
11179    }
11180    if (injectedStyles.has(hash)) {
11181      return;
11182    }
11183    if (documentContainsStyleHash20(targetDocument, hash)) {
11184      injectedStyles.add(hash);
11185      return;
11186    }
11187    const style = targetDocument.createElement("style");
11188    style.setAttribute(STYLE_HASH_ATTRIBUTE20, hash);
11189    style.appendChild(targetDocument.createTextNode(css));
11190    targetDocument.head.appendChild(style);
11191    injectedStyles.add(hash);
11192  }
11193  function registerDocument20(targetDocument) {
11194    const runtime = getRuntime20();
11195    runtime.documents.set(
11196      targetDocument,
11197      (runtime.documents.get(targetDocument) ?? 0) + 1
11198    );
11199    for (const [hash, css] of runtime.styles) {
11200      injectStyle20(targetDocument, hash, css);
11201    }
11202    return () => {
11203      const count = runtime.documents.get(targetDocument);
11204      if (count === void 0) {
11205        return;
11206      }
11207      if (count <= 1) {
11208        runtime.documents.delete(targetDocument);
11209        return;
11210      }
11211      runtime.documents.set(targetDocument, count - 1);
11212    };
11213  }
11214  function registerStyle20(hash, css) {
11215    const runtime = getRuntime20();
11216    runtime.styles.set(hash, css);
11217    for (const targetDocument of runtime.documents.keys()) {
11218      injectStyle20(targetDocument, hash, css);
11219    }
11220  }
11221  if (typeof process === "undefined" || true) {
11222    registerStyle20("1f3750277d", "._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-background-surface-neutral,#fcfcfc);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-background-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:var(--wpds-dimension-size-md,32px)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8bcd33103b451f30__header-lockup{min-width:0}._8113be94e7caf73c__header-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:var(--wpds-dimension-size-sm,24px);width:var(--wpds-dimension-size-sm,24px);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-foreground-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}._0625b55e82a0d93d__header._4b0f17e503d11619__has-navigation,._0625b55e82a0d93d__header._4b0f17e503d11619__has-navigation ._60fea2f6bf5319cd__header-subtitle{padding-block-end:0}._673c99dcbfb58211__header-navigation{margin-block-start:var(--wpds-dimension-gap-md,12px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");
11223  }
11224  var style_default19 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-lockup": "_8bcd33103b451f30__header-lockup", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "has-navigation": "_4b0f17e503d11619__has-navigation", "header-navigation": "_673c99dcbfb58211__header-navigation", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
11225  function Header({
11226    headingLevel = 1,
11227    breadcrumbs,
11228    badges,
11229    visual,
11230    title,
11231    subTitle,
11232    actions,
11233    navigation,
11234    components,
11235    showSidebarToggle = true
11236  }) {
11237    const HeadingTag = `h$headingLevel}`;
11238    const hasNavigation = !!navigation?.items?.length;
11239    return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
11240      Stack,
11241      {
11242        direction: "column",
11243        className: clsx_default(
11244          style_default19.header,
11245          hasNavigation && style_default19["has-navigation"]
11246        ),
11247        children: [
11248          /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
11249            Stack,
11250            {
11251              className: style_default19["header-content"],
11252              direction: "row",
11253              gap: "sm",
11254              justify: "space-between",
11255              children: [
11256                /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
11257                  Stack,
11258                  {
11259                    direction: "row",
11260                    gap: "sm",
11261                    align: "center",
11262                    justify: "start",
11263                    className: style_default19["header-lockup"],
11264                    children: [
11265                      showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11266                        SidebarToggleSlot,
11267                        {
11268                          bubblesVirtually: true,
11269                          className: style_default19["sidebar-toggle-slot"]
11270                        }
11271                      ),
11272                      visual && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11273                        "div",
11274                        {
11275                          className: style_default19["header-visual"],
11276                          "aria-hidden": "true",
11277                          children: visual
11278                        }
11279                      ),
11280                      title && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11281                        Text,
11282                        {
11283                          className: style_default19["header-title"],
11284                          render: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(HeadingTag, {}),
11285                          variant: "heading-lg",
11286                          children: title
11287                        }
11288                      ),
11289                      breadcrumbs,
11290                      badges
11291                    ]
11292                  }
11293                ),
11294                actions && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11295                  Stack,
11296                  {
11297                    align: "center",
11298                    className: style_default19["header-actions"],
11299                    direction: "row",
11300                    gap: "sm",
11301                    children: actions
11302                  }
11303                )
11304              ]
11305            }
11306          ),
11307          subTitle && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11308            Text,
11309            {
11310              render: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", {}),
11311              variant: "body-md",
11312              className: style_default19["header-subtitle"],
11313              children: subTitle
11314            }
11315          ),
11316          hasNavigation && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11317            navigation_default,
11318            {
11319              ...navigation,
11320              linkComponent: components?.link,
11321              className: style_default19["header-navigation"]
11322            }
11323          )
11324        ]
11325      }
11326    );
11327  }
11328  
11329  // packages/admin-ui/build-module/page/index.mjs
11330  var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
11331  var STYLE_HASH_ATTRIBUTE21 = "data-wp-hash";
11332  function getRuntime21() {
11333    const globalScope = globalThis;
11334    if (globalScope.__wpStyleRuntime) {
11335      return globalScope.__wpStyleRuntime;
11336    }
11337    globalScope.__wpStyleRuntime = {
11338      documents: /* @__PURE__ */ new Map(),
11339      styles: /* @__PURE__ */ new Map(),
11340      injectedStyles: /* @__PURE__ */ new WeakMap()
11341    };
11342    if (typeof document !== "undefined") {
11343      registerDocument21(document);
11344    }
11345    return globalScope.__wpStyleRuntime;
11346  }
11347  function documentContainsStyleHash21(targetDocument, hash) {
11348    if (!targetDocument.head) {
11349      return false;
11350    }
11351    for (const style of targetDocument.head.querySelectorAll(
11352      `style[$STYLE_HASH_ATTRIBUTE21}]`
11353    )) {
11354      if (style.getAttribute(STYLE_HASH_ATTRIBUTE21) === hash) {
11355        return true;
11356      }
11357    }
11358    return false;
11359  }
11360  function injectStyle21(targetDocument, hash, css) {
11361    if (!targetDocument.head) {
11362      return;
11363    }
11364    const runtime = getRuntime21();
11365    let injectedStyles = runtime.injectedStyles.get(targetDocument);
11366    if (!injectedStyles) {
11367      injectedStyles = /* @__PURE__ */ new Set();
11368      runtime.injectedStyles.set(targetDocument, injectedStyles);
11369    }
11370    if (injectedStyles.has(hash)) {
11371      return;
11372    }
11373    if (documentContainsStyleHash21(targetDocument, hash)) {
11374      injectedStyles.add(hash);
11375      return;
11376    }
11377    const style = targetDocument.createElement("style");
11378    style.setAttribute(STYLE_HASH_ATTRIBUTE21, hash);
11379    style.appendChild(targetDocument.createTextNode(css));
11380    targetDocument.head.appendChild(style);
11381    injectedStyles.add(hash);
11382  }
11383  function registerDocument21(targetDocument) {
11384    const runtime = getRuntime21();
11385    runtime.documents.set(
11386      targetDocument,
11387      (runtime.documents.get(targetDocument) ?? 0) + 1
11388    );
11389    for (const [hash, css] of runtime.styles) {
11390      injectStyle21(targetDocument, hash, css);
11391    }
11392    return () => {
11393      const count = runtime.documents.get(targetDocument);
11394      if (count === void 0) {
11395        return;
11396      }
11397      if (count <= 1) {
11398        runtime.documents.delete(targetDocument);
11399        return;
11400      }
11401      runtime.documents.set(targetDocument, count - 1);
11402    };
11403  }
11404  function registerStyle21(hash, css) {
11405    const runtime = getRuntime21();
11406    runtime.styles.set(hash, css);
11407    for (const targetDocument of runtime.documents.keys()) {
11408      injectStyle21(targetDocument, hash, css);
11409    }
11410  }
11411  if (typeof process === "undefined" || true) {
11412    registerStyle21("1f3750277d", "._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-background-surface-neutral,#fcfcfc);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-background-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:var(--wpds-dimension-size-md,32px)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8bcd33103b451f30__header-lockup{min-width:0}._8113be94e7caf73c__header-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:var(--wpds-dimension-size-sm,24px);width:var(--wpds-dimension-size-sm,24px);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-foreground-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}._0625b55e82a0d93d__header._4b0f17e503d11619__has-navigation,._0625b55e82a0d93d__header._4b0f17e503d11619__has-navigation ._60fea2f6bf5319cd__header-subtitle{padding-block-end:0}._673c99dcbfb58211__header-navigation{margin-block-start:var(--wpds-dimension-gap-md,12px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");
11413  }
11414  var style_default20 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-lockup": "_8bcd33103b451f30__header-lockup", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "has-navigation": "_4b0f17e503d11619__has-navigation", "header-navigation": "_673c99dcbfb58211__header-navigation", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
11415  function Page({
11416    headingLevel,
11417    breadcrumbs,
11418    badges,
11419    visual,
11420    title,
11421    subTitle,
11422    children,
11423    className,
11424    actions,
11425    navigation,
11426    components,
11427    ariaLabel,
11428    hasPadding = false,
11429    showSidebarToggle = true
11430  }) {
11431    const classes = clsx_default(style_default20.page, className);
11432    const effectiveAriaLabel = ariaLabel ?? (typeof title === "string" ? title : "");
11433    return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(navigable_region_default, { className: classes, ariaLabel: effectiveAriaLabel, children: [
11434      (title || breadcrumbs || badges || actions || visual || !!navigation?.items?.length) && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
11435        Header,
11436        {
11437          headingLevel,
11438          breadcrumbs,
11439          badges,
11440          visual,
11441          title,
11442          subTitle,
11443          actions,
11444          navigation,
11445          components,
11446          showSidebarToggle
11447        }
11448      ),
11449      hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
11450        "div",
11451        {
11452          className: clsx_default(
11453            style_default20.content,
11454            style_default20["has-padding"]
11455          ),
11456          children
11457        }
11458      ) : children
11459    ] });
11460  }
11461  Page.SidebarToggleFill = SidebarToggleFill;
11462  var page_default = Page;
11463  
11464  // routes/connectors-home/stage.tsx
11465  var import_components4 = __toESM(require_components());
11466  var import_data4 = __toESM(require_data());
11467  var import_element36 = __toESM(require_element());
11468  var import_i18n10 = __toESM(require_i18n());
11469  var import_core_data3 = __toESM(require_core_data());
11470  import {
11471    privateApis as connectorsPrivateApis2
11472  } from "@wordpress/connectors";
11473  
11474  // routes/lock-unlock/index.ts
11475  var import_private_apis2 = __toESM(require_private_apis());
11476  var { lock: lock2, unlock: unlock2 } = (0, import_private_apis2.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
11477    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
11478    "@wordpress/routes"
11479  );
11480  
11481  // routes/connectors-home/style.scss
11482  if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='3ac7d2cc0e']")) {
11483    const style = document.createElement("style");
11484    style.setAttribute("data-wp-hash", "3ac7d2cc0e");
11485    style.appendChild(document.createTextNode(".connectors-page{box-sizing:border-box;margin:0 auto;max-width:680px;padding:24px;width:100%}.connectors-page .components-item{background:#fff;border:1px solid #ddd;border-radius:8px;overflow:hidden;padding:20px;scroll-margin-top:120px}.connectors-page .connector-settings__error{color:#cc1818}.connectors-page .connector-settings .components-text-control__input{font-family:monospace;scroll-margin-top:120px}.connectors-page__file-mods-notice{margin-bottom:16px}.connectors-page--empty{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:32px;justify-content:center;text-align:center}.connectors-page .ai-plugin-callout{background-color:#e7d4e4;background-image:radial-gradient(ellipse 70% 120% at 18% 115%,rgba(202,158,198,.75) 0,rgba(202,158,198,0) 60%),radial-gradient(ellipse 55% 110% at 92% -15%,rgba(208,175,217,.7) 0,rgba(208,175,217,0) 65%),radial-gradient(ellipse 40% 85% at 58% -10%,rgba(170,130,184,.45) 0,rgba(170,130,184,0) 70%);border-radius:8px;overflow:hidden;padding:24px;padding-inline-end:150px;position:relative}[dir=rtl] .connectors-page .ai-plugin-callout{background-image:radial-gradient(ellipse 70% 120% at 82% 115%,rgba(202,158,198,.75) 0,rgba(202,158,198,0) 60%),radial-gradient(ellipse 55% 110% at 8% -15%,rgba(208,175,217,.7) 0,rgba(208,175,217,0) 65%),radial-gradient(ellipse 40% 85% at 42% -10%,rgba(170,130,184,.45) 0,rgba(170,130,184,0) 70%)}.connectors-page .ai-plugin-callout__content{align-items:flex-start;display:flex;flex-direction:column;gap:12px;padding-top:2px}.connectors-page .ai-plugin-callout__content p{font-size:13px;line-height:20px;margin:0}.connectors-page .ai-plugin-callout__decoration{height:110px;inset-inline-end:16px;position:absolute;top:12px;width:110px}.connectors-page__help-text{color:#757575}@media (max-width:680px){.connectors-page .ai-plugin-callout{padding:12px;padding-inline-end:100px}.connectors-page .ai-plugin-callout__decoration{height:75px;inset-inline-end:8px;top:8px;width:75px}}@media (max-width:480px){.connectors-page{padding:8px}.connectors-page .ai-plugin-callout{padding-inline-end:130px}.connectors-page .components-item{padding:12px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child svg{height:32px;width:32px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child>.components-h-stack:last-child{align-items:flex-end;flex-direction:column}}"));
11486    document.head.appendChild(style);
11487  }
11488  
11489  // routes/connectors-home/ai-plugin-callout.tsx
11490  var import_components3 = __toESM(require_components());
11491  var import_core_data2 = __toESM(require_core_data());
11492  var import_data3 = __toESM(require_data());
11493  var import_element35 = __toESM(require_element());
11494  var import_i18n9 = __toESM(require_i18n());
11495  var import_notices2 = __toESM(require_notices());
11496  var import_url = __toESM(require_url());
11497  
11498  // routes/connectors-home/default-connectors.tsx
11499  var import_components2 = __toESM(require_components());
11500  var import_element34 = __toESM(require_element());
11501  var import_data2 = __toESM(require_data());
11502  var import_i18n8 = __toESM(require_i18n());
11503  import {
11504    __experimentalRegisterConnector as registerConnector,
11505    __experimentalConnectorItem as ConnectorItem,
11506    __experimentalDefaultConnectorSettings as DefaultConnectorSettings,
11507    __experimentalApplicationPasswordConnectorSettings as ApplicationPasswordConnectorSettings,
11508    privateApis as connectorsPrivateApis
11509  } from "@wordpress/connectors";
11510  
11511  // routes/connectors-home/use-connector-plugin.ts
11512  var import_core_data = __toESM(require_core_data());
11513  var import_data = __toESM(require_data());
11514  var import_element33 = __toESM(require_element());
11515  var import_i18n7 = __toESM(require_i18n());
11516  var import_notices = __toESM(require_notices());
11517  function useConnectorPlugin({
11518    file: pluginFileFromServer,
11519    settingName,
11520    connectorName,
11521    isInstalled,
11522    isActivated,
11523    keySource = "none",
11524    initialIsConnected = false
11525  }) {
11526    const [isExpanded, setIsExpanded] = (0, import_element33.useState)(false);
11527    const [isBusy, setIsBusy] = (0, import_element33.useState)(false);
11528    const [connectedState, setConnectedState] = (0, import_element33.useState)(initialIsConnected);
11529    const [pluginStatusOverride, setPluginStatusOverride] = (0, import_element33.useState)(null);
11530    const pluginBasename = pluginFileFromServer?.replace(/\.php$/, "");
11531    const pluginSlug = pluginBasename?.includes("/") ? pluginBasename.split("/")[0] : pluginBasename;
11532    const {
11533      derivedPluginStatus,
11534      canManagePlugins,
11535      currentApiKey,
11536      currentUsername,
11537      hasStoredCredentials,
11538      hasResolvedSettings,
11539      canInstallPlugins
11540    } = (0, import_data.useSelect)(
11541      (select2) => {
11542        const store2 = select2(import_core_data.store);
11543        const siteSettings = store2.getEntityRecord("root", "site");
11544        const settingValue = siteSettings?.[settingName];
11545        const apiKey = typeof settingValue === "string" ? settingValue : "";
11546        const credentials = typeof settingValue === "object" && settingValue !== null ? settingValue : void 0;
11547        const credentialsExist = credentials !== void 0 ? !!credentials.username && !!credentials.password : !!apiKey;
11548        const settingsResolved = store2.hasFinishedResolution(
11549          "getEntityRecord",
11550          ["root", "site"]
11551        );
11552        const canCreate = !!store2.canUser("create", {
11553          kind: "root",
11554          name: "plugin"
11555        });
11556        const common = {
11557          currentApiKey: apiKey,
11558          currentUsername: credentials?.username ?? "",
11559          hasStoredCredentials: credentialsExist,
11560          hasResolvedSettings: settingsResolved,
11561          canInstallPlugins: canCreate
11562        };
11563        if (!pluginFileFromServer) {
11564          return {
11565            ...common,
11566            derivedPluginStatus: settingsResolved ? "active" : "checking",
11567            canManagePlugins: void 0
11568          };
11569        }
11570        const plugin = store2.getEntityRecord(
11571          "root",
11572          "plugin",
11573          pluginBasename
11574        );
11575        const hasFinished = store2.hasFinishedResolution(
11576          "getEntityRecord",
11577          ["root", "plugin", pluginBasename]
11578        );
11579        if (!hasFinished) {
11580          return {
11581            ...common,
11582            derivedPluginStatus: "checking",
11583            canManagePlugins: void 0
11584          };
11585        }
11586        if (plugin) {
11587          const isPluginActive = plugin.status === "active" || plugin.status === "network-active";
11588          return {
11589            ...common,
11590            derivedPluginStatus: isPluginActive ? "active" : "inactive",
11591            canManagePlugins: true
11592          };
11593        }
11594        let status = "not-installed";
11595        if (isActivated) {
11596          status = "active";
11597        } else if (isInstalled) {
11598          status = "inactive";
11599        }
11600        return {
11601          ...common,
11602          derivedPluginStatus: status,
11603          canManagePlugins: false
11604        };
11605      },
11606      [
11607        pluginFileFromServer,
11608        pluginBasename,
11609        settingName,
11610        isInstalled,
11611        isActivated
11612      ]
11613    );
11614    const pluginStatus = pluginStatusOverride ?? derivedPluginStatus;
11615    const canActivatePlugins = canManagePlugins;
11616    const isConnected = pluginStatus === "active" && connectedState || // After install/activate, if settings re-fetch reveals stored credentials,
11617    // update connected state (mirrors what the server would report on page load).
11618    pluginStatusOverride === "active" && hasStoredCredentials;
11619    const { saveEntityRecord, invalidateResolution } = (0, import_data.useDispatch)(import_core_data.store);
11620    const { createSuccessNotice, createErrorNotice } = (0, import_data.useDispatch)(import_notices.store);
11621    const saveConnectorSetting = (value) => saveEntityRecord(
11622      "root",
11623      "site",
11624      { [settingName]: value },
11625      { throwOnError: true }
11626    );
11627    const createConnectedNotice = () => {
11628      createSuccessNotice(
11629        (0, import_i18n7.sprintf)(
11630          /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11631          (0, import_i18n7.__)("%s connected successfully."),
11632          connectorName
11633        ),
11634        {
11635          id: "connector-connect-success",
11636          type: "snackbar"
11637        }
11638      );
11639    };
11640    const createDisconnectedNotice = () => {
11641      createSuccessNotice(
11642        (0, import_i18n7.sprintf)(
11643          /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11644          (0, import_i18n7.__)("%s disconnected."),
11645          connectorName
11646        ),
11647        {
11648          id: "connector-disconnect-success",
11649          type: "snackbar"
11650        }
11651      );
11652    };
11653    const createDisconnectErrorNotice = () => {
11654      createErrorNotice(
11655        (0, import_i18n7.sprintf)(
11656          /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11657          (0, import_i18n7.__)("Failed to disconnect %s."),
11658          connectorName
11659        ),
11660        {
11661          id: "connector-disconnect-error",
11662          type: "snackbar"
11663        }
11664      );
11665    };
11666    const installPlugin = async () => {
11667      if (!pluginSlug) {
11668        return;
11669      }
11670      setIsBusy(true);
11671      try {
11672        await saveEntityRecord(
11673          "root",
11674          "plugin",
11675          { slug: pluginSlug, status: "active" },
11676          { throwOnError: true }
11677        );
11678        setPluginStatusOverride("active");
11679        invalidateResolution("getEntityRecord", ["root", "site"]);
11680        setIsExpanded(true);
11681        createSuccessNotice(
11682          (0, import_i18n7.sprintf)(
11683            /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11684            (0, import_i18n7.__)("Plugin for %s installed and activated successfully."),
11685            connectorName
11686          ),
11687          {
11688            id: "connector-plugin-install-success",
11689            type: "snackbar"
11690          }
11691        );
11692      } catch {
11693        createErrorNotice(
11694          (0, import_i18n7.sprintf)(
11695            /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11696            (0, import_i18n7.__)("Failed to install plugin for %s."),
11697            connectorName
11698          ),
11699          {
11700            id: "connector-plugin-install-error",
11701            type: "snackbar"
11702          }
11703        );
11704      } finally {
11705        setIsBusy(false);
11706      }
11707    };
11708    const activatePlugin = async () => {
11709      if (!pluginFileFromServer) {
11710        return;
11711      }
11712      setIsBusy(true);
11713      try {
11714        await saveEntityRecord(
11715          "root",
11716          "plugin",
11717          {
11718            plugin: pluginBasename,
11719            status: "active"
11720          },
11721          { throwOnError: true }
11722        );
11723        setPluginStatusOverride("active");
11724        invalidateResolution("getEntityRecord", ["root", "site"]);
11725        setIsExpanded(true);
11726        createSuccessNotice(
11727          (0, import_i18n7.sprintf)(
11728            /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11729            (0, import_i18n7.__)("Plugin for %s activated successfully."),
11730            connectorName
11731          ),
11732          {
11733            id: "connector-plugin-activate-success",
11734            type: "snackbar"
11735          }
11736        );
11737      } catch {
11738        createErrorNotice(
11739          (0, import_i18n7.sprintf)(
11740            /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11741            (0, import_i18n7.__)("Failed to activate plugin for %s."),
11742            connectorName
11743          ),
11744          {
11745            id: "connector-plugin-activate-error",
11746            type: "snackbar"
11747          }
11748        );
11749      } finally {
11750        setIsBusy(false);
11751      }
11752    };
11753    const handleButtonClick = () => {
11754      if (pluginStatus === "not-installed") {
11755        if (canInstallPlugins === false) {
11756          return;
11757        }
11758        installPlugin();
11759      } else if (pluginStatus === "inactive") {
11760        if (canActivatePlugins === false) {
11761          return;
11762        }
11763        activatePlugin();
11764      } else {
11765        setIsExpanded(!isExpanded);
11766      }
11767    };
11768    const getButtonLabel = () => {
11769      if (isBusy) {
11770        return pluginStatus === "not-installed" ? (0, import_i18n7.__)("Installing\u2026") : (0, import_i18n7.__)("Activating\u2026");
11771      }
11772      if (isExpanded) {
11773        return (0, import_i18n7.__)("Cancel");
11774      }
11775      if (isConnected) {
11776        return (0, import_i18n7.__)("Edit");
11777      }
11778      switch (pluginStatus) {
11779        case "checking":
11780          return (0, import_i18n7.__)("Checking\u2026");
11781        case "not-installed":
11782          return (0, import_i18n7.__)("Install");
11783        case "inactive":
11784          return (0, import_i18n7.__)("Activate");
11785        case "active":
11786          return (0, import_i18n7.__)("Set up");
11787      }
11788    };
11789    const saveApiKey = async (apiKey) => {
11790      const previousApiKey = currentApiKey;
11791      try {
11792        const updatedRecord = await saveConnectorSetting(apiKey);
11793        const record = updatedRecord;
11794        const returnedKey = record?.[settingName];
11795        if (apiKey && (returnedKey === previousApiKey || !returnedKey)) {
11796          throw new Error(
11797            "It was not possible to connect to the provider using this key."
11798          );
11799        }
11800        setConnectedState(true);
11801        createConnectedNotice();
11802      } catch (error2) {
11803        console.error("Failed to save API key:", error2);
11804        throw error2;
11805      }
11806    };
11807    const saveCredentials = async ({
11808      username,
11809      applicationPassword
11810    }) => {
11811      try {
11812        const updatedRecord = await saveConnectorSetting({
11813          username,
11814          password: applicationPassword
11815        });
11816        const record = updatedRecord;
11817        const credentials = record?.[settingName];
11818        if (!credentials?.username || !credentials?.password) {
11819          throw new Error(
11820            (0, import_i18n7.__)("It was not possible to save these credentials.")
11821          );
11822        }
11823        setConnectedState(true);
11824        createConnectedNotice();
11825      } catch (error2) {
11826        console.error("Failed to save credentials:", error2);
11827        throw error2;
11828      }
11829    };
11830    const removeApiKey = async () => {
11831      try {
11832        await saveConnectorSetting("");
11833        setConnectedState(false);
11834        createDisconnectedNotice();
11835      } catch (error2) {
11836        console.error("Failed to remove API key:", error2);
11837        createDisconnectErrorNotice();
11838      }
11839    };
11840    const removeCredentials = async () => {
11841      try {
11842        await saveConnectorSetting({
11843          username: "",
11844          password: ""
11845        });
11846        setConnectedState(false);
11847        createDisconnectedNotice();
11848      } catch (error2) {
11849        console.error("Failed to remove credentials:", error2);
11850        createDisconnectErrorNotice();
11851      }
11852    };
11853    return {
11854      pluginStatus,
11855      canInstallPlugins,
11856      canActivatePlugins,
11857      isExpanded,
11858      setIsExpanded,
11859      isBusy,
11860      isConnected,
11861      currentApiKey,
11862      currentUsername,
11863      hasResolvedSettings,
11864      keySource,
11865      handleButtonClick,
11866      getButtonLabel,
11867      saveApiKey,
11868      removeApiKey,
11869      saveCredentials,
11870      removeCredentials
11871    };
11872  }
11873  
11874  // routes/connectors-home/logos.tsx
11875  var import_jsx_runtime40 = __toESM(require_jsx_runtime());
11876  var OpenAILogo = () => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11877    "svg",
11878    {
11879      width: "40",
11880      height: "40",
11881      viewBox: "0 0 24 24",
11882      fill: "none",
11883      xmlns: "http://www.w3.org/2000/svg",
11884      "aria-hidden": "true",
11885      children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11886        "path",
11887        {
11888          d: "M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364l2.0201-1.1685a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.4043-.6813zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z",
11889          fill: "currentColor"
11890        }
11891      )
11892    }
11893  );
11894  var ClaudeLogo = () => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11895    "svg",
11896    {
11897      width: "40",
11898      height: "40",
11899      viewBox: "0 0 32 32",
11900      fill: "none",
11901      xmlns: "http://www.w3.org/2000/svg",
11902      "aria-hidden": "true",
11903      children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11904        "path",
11905        {
11906          d: "M6.2 21.024L12.416 17.536L12.52 17.232L12.416 17.064H12.112L11.072 17L7.52 16.904L4.44 16.776L1.456 16.616L0.704 16.456L0 15.528L0.072 15.064L0.704 14.64L1.608 14.72L3.608 14.856L6.608 15.064L8.784 15.192L12.008 15.528H12.52L12.592 15.32L12.416 15.192L12.28 15.064L9.176 12.96L5.816 10.736L4.056 9.456L3.104 8.808L2.624 8.2L2.416 6.872L3.28 5.92L4.44 6L4.736 6.08L5.912 6.984L8.424 8.928L11.704 11.344L12.184 11.744L12.376 11.608L12.4 11.512L12.184 11.152L10.4 7.928L8.496 4.648L7.648 3.288L7.424 2.472C7.344 2.136 7.288 1.856 7.288 1.512L8.272 0.176L8.816 0L10.128 0.176L10.68 0.656L11.496 2.52L12.816 5.456L14.864 9.448L15.464 10.632L15.784 11.728L15.904 12.064H16.112V11.872L16.28 9.624L16.592 6.864L16.896 3.312L17 2.312L17.496 1.112L18.48 0.464L19.248 0.832L19.88 1.736L19.792 2.32L19.416 4.76L18.68 8.584L18.2 11.144H18.48L18.8 10.824L20.096 9.104L22.272 6.384L23.232 5.304L24.352 4.112L25.072 3.544H26.432L27.432 5.032L26.984 6.568L25.584 8.344L24.424 9.848L22.76 12.088L21.72 13.88L21.816 14.024L22.064 14L25.824 13.2L27.856 12.832L30.28 12.416L31.376 12.928L31.496 13.448L31.064 14.512L28.472 15.152L25.432 15.76L20.904 16.832L20.848 16.872L20.912 16.952L22.952 17.144L23.824 17.192H25.96L29.936 17.488L30.976 18.176L31.6 19.016L31.496 19.656L29.896 20.472L27.736 19.96L22.696 18.76L20.968 18.328H20.728V18.472L22.168 19.88L24.808 22.264L28.112 25.336L28.28 26.096L27.856 26.696L27.408 26.632L24.504 24.448L23.384 23.464L20.848 21.328H20.68V21.552L21.264 22.408L24.352 27.048L24.512 28.472L24.288 28.936L23.488 29.216L22.608 29.056L20.8 26.52L18.936 23.664L17.432 21.104L17.248 21.208L16.36 30.768L15.944 31.256L14.984 31.624L14.184 31.016L13.76 30.032L14.184 28.088L14.696 25.552L15.112 23.536L15.488 21.032L15.712 20.2L15.696 20.144L15.512 20.168L13.624 22.76L10.752 26.64L8.48 29.072L7.936 29.288L6.992 28.8L7.08 27.928L7.608 27.152L10.752 23.152L12.648 20.672L13.872 19.24L13.864 19.032H13.792L5.44 24.456L3.952 24.648L3.312 24.048L3.392 23.064L3.696 22.744L6.208 21.016L6.2 21.024Z",
11907          fill: "#D97757"
11908        }
11909      )
11910    }
11911  );
11912  var DefaultConnectorLogo = () => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
11913    "svg",
11914    {
11915      width: "40",
11916      height: "40",
11917      viewBox: "0 0 32 32",
11918      fill: "none",
11919      xmlns: "http://www.w3.org/2000/svg",
11920      "aria-hidden": "true",
11921      children: [
11922        /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11923          "path",
11924          {
11925            d: "M0 4C0 1.79086 1.79086 0 4 0H28C30.2091 0 32 1.79086 32 4V28C32 30.2091 30.2091 32 28 32H4C1.79086 32 0 30.2091 0 28V4Z",
11926            fill: "#F0F0F0"
11927          }
11928        ),
11929        /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11930          "path",
11931          {
11932            d: "M14.5 8V12H17.5V8H19V12H20.5C20.7652 12 21.0196 12.1054 21.2071 12.2929C21.3946 12.4804 21.5 12.7348 21.5 13V17L18.5 21V23C18.5 23.2652 18.3946 23.5196 18.2071 23.7071C18.0196 23.8946 17.7652 24 17.5 24H14.5C14.2348 24 13.9804 23.8946 13.7929 23.7071C13.6054 23.5196 13.5 23.2652 13.5 23V21L10.5 17V13C10.5 12.7348 10.6054 12.4804 10.7929 12.2929C10.9804 12.1054 11.2348 12 11.5 12H13V8H14.5ZM15 20.5V22.5H17V20.5L20 16.5V13.5H12V16.5L15 20.5Z",
11933            fill: "#949494"
11934          }
11935        )
11936      ]
11937    }
11938  );
11939  var AkismetLogo = () => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
11940    "svg",
11941    {
11942      width: "40",
11943      height: "40",
11944      viewBox: "0 0 44 44",
11945      fill: "none",
11946      xmlns: "http://www.w3.org/2000/svg",
11947      "aria-hidden": "true",
11948      children: [
11949        /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("rect", { width: "44", height: "44", fill: "#357B49", rx: "6" }),
11950        /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11951          "path",
11952          {
11953            fill: "#fff",
11954            fillRule: "evenodd",
11955            d: "m29.746 28.31-6.392-16.797c-.152-.397-.305-.672-.789-.675-.673 0-1.408.611-1.746 1.316l-7.378 16.154c-.072.16-.143.311-.214.454-.5.995-1.045 1.546-2.357 1.626a.399.399 0 0 0-.16.033l-.01.004a.399.399 0 0 0-.23.392v.01c0 .054.01.106.03.155l.004.01a.416.416 0 0 0 .394.252h6.212a.417.417 0 0 0 .307-.12.416.416 0 0 0 .124-.305.398.398 0 0 0-.105-.302.399.399 0 0 0-.294-.127c-.757 0-2.197-.062-2.197-1.164.02-.318.103-.63.245-.916l1.399-3.152c.52-1.163 1.654-1.163 2.572-1.163h5.843c.023 0 .044 0 .062.003.13.014.16.081.214.242l1.534 4.07a2.857 2.857 0 0 1 .216 1.04c0 .054-.003.104-.01.153-.09.726-.831.887-1.49.887a.4.4 0 0 0-.294.127l-.007.008-.007.008a.401.401 0 0 0-.092.286v.01c0 .054.01.106.03.155l.005.01a.42.42 0 0 0 .395.252h7.011a.413.413 0 0 0 .279-.13.412.412 0 0 0 .11-.297.387.387 0 0 0-.09-.294.388.388 0 0 0-.277-.135c-1.448-.122-2.295-.643-2.847-2.08Zm-11.985-5.844 2.847-6.304c.361-.728.659-1.486.889-2.265 0-.06.03-.092.06-.092s.061.032.061.091c.02.122.045.247.073.374.197.888.584 1.878.914 2.723l.176.453 1.684 4.529a.927.927 0 0 1 .092.4.473.473 0 0 1-.009.094c-.041.202-.228.272-.602.272h-6.063c-.122 0-.184-.03-.184-.092a.36.36 0 0 1 .062-.183Zm17.107-.721c0 .786-.446 1.231-1.25 1.231-.806 0-1.125-.409-1.125-1.034 0-.786.465-1.231 1.25-1.231.785 0 1.125.427 1.125 1.034ZM9.629 23.002c.803 0 1.25-.447 1.25-1.231 0-.607-.343-1.036-1.128-1.036-.785 0-1.25.447-1.25 1.231 0 .625.325 1.036 1.128 1.036Z",
11956            clipRule: "evenodd"
11957          }
11958        )
11959      ]
11960    }
11961  );
11962  var GeminiLogo = () => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
11963    "svg",
11964    {
11965      width: "40",
11966      height: "40",
11967      style: { flex: "none", lineHeight: 1 },
11968      viewBox: "0 0 24 24",
11969      xmlns: "http://www.w3.org/2000/svg",
11970      "aria-hidden": "true",
11971      children: [
11972        /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11973          "path",
11974          {
11975            d: "M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",
11976            fill: "#3186FF"
11977          }
11978        ),
11979        /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11980          "path",
11981          {
11982            d: "M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",
11983            fill: "url(#lobe-icons-gemini-fill-0)"
11984          }
11985        ),
11986        /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11987          "path",
11988          {
11989            d: "M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",
11990            fill: "url(#lobe-icons-gemini-fill-1)"
11991          }
11992        ),
11993        /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11994          "path",
11995          {
11996            d: "M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",
11997            fill: "url(#lobe-icons-gemini-fill-2)"
11998          }
11999        ),
12000        /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("defs", { children: [
12001          /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
12002            "linearGradient",
12003            {
12004              gradientUnits: "userSpaceOnUse",
12005              id: "lobe-icons-gemini-fill-0",
12006              x1: "7",
12007              x2: "11",
12008              y1: "15.5",
12009              y2: "12",
12010              children: [
12011                /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("stop", { stopColor: "#08B962" }),
12012                /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("stop", { offset: "1", stopColor: "#08B962", stopOpacity: "0" })
12013              ]
12014            }
12015          ),
12016          /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
12017            "linearGradient",
12018            {
12019              gradientUnits: "userSpaceOnUse",
12020              id: "lobe-icons-gemini-fill-1",
12021              x1: "8",
12022              x2: "11.5",
12023              y1: "5.5",
12024              y2: "11",
12025              children: [
12026                /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("stop", { stopColor: "#F94543" }),
12027                /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("stop", { offset: "1", stopColor: "#F94543", stopOpacity: "0" })
12028              ]
12029            }
12030          ),
12031          /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
12032            "linearGradient",
12033            {
12034              gradientUnits: "userSpaceOnUse",
12035              id: "lobe-icons-gemini-fill-2",
12036              x1: "3.5",
12037              x2: "17.5",
12038              y1: "13.5",
12039              y2: "12",
12040              children: [
12041                /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("stop", { stopColor: "#FABC12" }),
12042                /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("stop", { offset: ".46", stopColor: "#FABC12", stopOpacity: "0" })
12043              ]
12044            }
12045          )
12046        ] })
12047      ]
12048    }
12049  );
12050  
12051  // routes/connectors-home/default-connectors.tsx
12052  var import_jsx_runtime41 = __toESM(require_jsx_runtime());
12053  var { store: connectorsStore } = unlock2(connectorsPrivateApis);
12054  function getConnectorScriptModuleData() {
12055    try {
12056      return JSON.parse(
12057        document.getElementById(
12058          "wp-script-module-data-options-connectors-wp-admin"
12059        )?.textContent ?? "{}"
12060      );
12061    } catch {
12062      return {};
12063    }
12064  }
12065  function getConnectorData() {
12066    return getConnectorScriptModuleData().connectors ?? {};
12067  }
12068  function getIsFileModDisabled() {
12069    return !!getConnectorScriptModuleData().isFileModDisabled;
12070  }
12071  var CONNECTOR_LOGOS = {
12072    google: GeminiLogo,
12073    openai: OpenAILogo,
12074    anthropic: ClaudeLogo,
12075    akismet: AkismetLogo
12076  };
12077  function getConnectorLogo(connectorId, logoUrl) {
12078    if (logoUrl) {
12079      return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("img", { src: logoUrl, alt: "", width: 40, height: 40 });
12080    }
12081    const Logo = CONNECTOR_LOGOS[connectorId];
12082    if (Logo) {
12083      return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Logo, {});
12084    }
12085    return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DefaultConnectorLogo, {});
12086  }
12087  var ConnectedBadge = () => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12088    "span",
12089    {
12090      style: {
12091        color: "#345b37",
12092        backgroundColor: "#eff8f0",
12093        padding: "4px 12px",
12094        borderRadius: "2px",
12095        fontSize: "13px",
12096        fontWeight: "var(--wpds-typography-font-weight-emphasis)",
12097        whiteSpace: "nowrap"
12098      },
12099      children: (0, import_i18n8.__)("Connected")
12100    }
12101  );
12102  var PluginDirectoryLink = ({ slug }) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12103    Link,
12104    {
12105      href: (0, import_i18n8.sprintf)(
12106        /* translators: %s: plugin slug. */
12107        (0, import_i18n8.__)("https://wordpress.org/plugins/%s/"),
12108        slug
12109      ),
12110      openInNewTab: true,
12111      children: (0, import_i18n8.__)("Learn more")
12112    }
12113  );
12114  var UnavailableActionBadge = () => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Badge, { children: (0, import_i18n8.__)("Not available") });
12115  function ConnectorActionArea({
12116    isConnected,
12117    showUnavailableBadge,
12118    pluginSlug,
12119    isExpanded,
12120    isBusy,
12121    pluginStatus,
12122    actionButtonRef,
12123    handleButtonClick,
12124    getButtonLabel
12125  }) {
12126    return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_components2.__experimentalHStack, { spacing: 3, expanded: false, children: [
12127      isConnected && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ConnectedBadge, {}),
12128      showUnavailableBadge && (pluginSlug ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(PluginDirectoryLink, { slug: pluginSlug }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(UnavailableActionBadge, {})),
12129      !showUnavailableBadge && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12130        import_components2.Button,
12131        {
12132          ref: actionButtonRef,
12133          variant: isExpanded || isConnected ? "tertiary" : "secondary",
12134          size: "compact",
12135          onClick: handleButtonClick,
12136          disabled: pluginStatus === "checking" || isBusy,
12137          isBusy,
12138          accessibleWhenDisabled: true,
12139          children: getButtonLabel()
12140        }
12141      )
12142    ] });
12143  }
12144  function getPluginSlug(pluginFile) {
12145    const pluginBasename = pluginFile?.replace(/\.php$/, "");
12146    return pluginBasename?.includes("/") ? pluginBasename.split("/")[0] : pluginBasename;
12147  }
12148  function ApiKeyConnector({
12149    name,
12150    description,
12151    logo,
12152    authentication,
12153    plugin
12154  }) {
12155    const auth = authentication?.method === "api_key" ? authentication : void 0;
12156    const settingName = auth?.settingName ?? "";
12157    const helpUrl = auth?.credentialsUrl ?? void 0;
12158    const pluginSlug = getPluginSlug(plugin?.file);
12159    const {
12160      pluginStatus,
12161      canInstallPlugins,
12162      canActivatePlugins,
12163      isExpanded,
12164      setIsExpanded,
12165      isBusy,
12166      isConnected,
12167      currentApiKey,
12168      hasResolvedSettings,
12169      keySource,
12170      handleButtonClick,
12171      getButtonLabel,
12172      saveApiKey,
12173      removeApiKey
12174    } = useConnectorPlugin({
12175      file: plugin?.file,
12176      settingName,
12177      connectorName: name,
12178      isInstalled: plugin?.isInstalled,
12179      isActivated: plugin?.isActivated,
12180      keySource: auth?.keySource,
12181      initialIsConnected: auth?.isConnected
12182    });
12183    const isExternallyConfigured = keySource === "env" || keySource === "constant";
12184    const showUnavailableBadge = pluginStatus === "not-installed" && canInstallPlugins === false || pluginStatus === "inactive" && canActivatePlugins === false;
12185    const actionButtonRef = (0, import_element34.useRef)(null);
12186    return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12187      ConnectorItem,
12188      {
12189        className: pluginSlug ? `connector-item--$pluginSlug}` : void 0,
12190        logo,
12191        name,
12192        description,
12193        actionArea: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12194          ConnectorActionArea,
12195          {
12196            isConnected,
12197            showUnavailableBadge,
12198            pluginSlug,
12199            isExpanded,
12200            isBusy,
12201            pluginStatus,
12202            actionButtonRef,
12203            handleButtonClick,
12204            getButtonLabel
12205          }
12206        ),
12207        children: isExpanded && pluginStatus === "active" && hasResolvedSettings && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12208          DefaultConnectorSettings,
12209          {
12210            initialValue: isExternallyConfigured ? "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" : currentApiKey,
12211            helpUrl,
12212            readOnly: isConnected || isExternallyConfigured,
12213            keySource,
12214            onRemove: isExternallyConfigured ? void 0 : async () => {
12215              await removeApiKey();
12216              actionButtonRef.current?.focus();
12217            },
12218            onSave: async (apiKey) => {
12219              await saveApiKey(apiKey);
12220              setIsExpanded(false);
12221              actionButtonRef.current?.focus();
12222            }
12223          },
12224          isConnected ? "connected" : "setup"
12225        )
12226      }
12227    );
12228  }
12229  function ApplicationPasswordConnector({
12230    name,
12231    description,
12232    logo,
12233    authentication,
12234    plugin
12235  }) {
12236    const auth = authentication?.method === "application_password" ? authentication : void 0;
12237    const settingName = auth?.settingName ?? "";
12238    const helpUrl = auth?.credentialsUrl ?? void 0;
12239    const pluginSlug = getPluginSlug(plugin?.file);
12240    const {
12241      pluginStatus,
12242      canInstallPlugins,
12243      canActivatePlugins,
12244      isExpanded,
12245      setIsExpanded,
12246      isBusy,
12247      isConnected,
12248      currentUsername,
12249      hasResolvedSettings,
12250      keySource,
12251      handleButtonClick,
12252      getButtonLabel,
12253      saveCredentials,
12254      removeCredentials
12255    } = useConnectorPlugin({
12256      file: plugin?.file,
12257      settingName,
12258      connectorName: name,
12259      isInstalled: plugin?.isInstalled,
12260      isActivated: plugin?.isActivated,
12261      keySource: auth?.keySource,
12262      initialIsConnected: auth?.isConnected
12263    });
12264    const isExternallyConfigured = keySource === "env" || keySource === "constant";
12265    const actionButtonRef = (0, import_element34.useRef)(null);
12266    const showUnavailableBadge = pluginStatus === "not-installed" && canInstallPlugins === false || pluginStatus === "inactive" && canActivatePlugins === false;
12267    return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12268      ConnectorItem,
12269      {
12270        className: pluginSlug ? `connector-item--$pluginSlug}` : void 0,
12271        logo,
12272        name,
12273        description,
12274        actionArea: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12275          ConnectorActionArea,
12276          {
12277            isConnected,
12278            showUnavailableBadge,
12279            pluginSlug,
12280            isExpanded,
12281            isBusy,
12282            pluginStatus,
12283            actionButtonRef,
12284            handleButtonClick,
12285            getButtonLabel
12286          }
12287        ),
12288        children: isExpanded && pluginStatus === "active" && hasResolvedSettings && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12289          ApplicationPasswordConnectorSettings,
12290          {
12291            initialUsername: isExternallyConfigured ? "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" : currentUsername,
12292            helpUrl,
12293            readOnly: isConnected || isExternallyConfigured,
12294            keySource,
12295            onRemove: isExternallyConfigured ? void 0 : async () => {
12296              await removeCredentials();
12297              actionButtonRef.current?.focus();
12298            },
12299            onSave: async (credentials) => {
12300              await saveCredentials(credentials);
12301              setIsExpanded(false);
12302              actionButtonRef.current?.focus();
12303            }
12304          },
12305          isConnected ? "connected" : "setup"
12306        )
12307      }
12308    );
12309  }
12310  function registerDefaultConnectors() {
12311    const connectors = getConnectorData();
12312    const sanitize = (s) => s.replace(/[^a-z0-9-_]/gi, "-");
12313    for (const [connectorId, data] of Object.entries(connectors)) {
12314      if (connectorId === "akismet" && !data.plugin?.isInstalled) {
12315        continue;
12316      }
12317      const { authentication } = data;
12318      const connectorName = sanitize(connectorId);
12319      const args = {
12320        name: data.name,
12321        description: data.description,
12322        type: data.type,
12323        logo: getConnectorLogo(connectorId, data.logoUrl),
12324        authentication,
12325        plugin: data.plugin
12326      };
12327      const existing = unlock2((0, import_data2.select)(connectorsStore)).getConnector(
12328        connectorName
12329      );
12330      if (authentication.method === "api_key" && !existing?.render) {
12331        args.render = ApiKeyConnector;
12332      } else if (authentication.method === "application_password" && !existing?.render) {
12333        args.render = ApplicationPasswordConnector;
12334      }
12335      registerConnector(connectorName, args);
12336    }
12337  }
12338  
12339  // routes/connectors-home/wp-logo-decoration.tsx
12340  var import_jsx_runtime42 = __toESM(require_jsx_runtime());
12341  function WpLogoDecoration() {
12342    return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "ai-plugin-callout__decoration", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12343      "svg",
12344      {
12345        viewBox: "0 0 248 248",
12346        xmlns: "http://www.w3.org/2000/svg",
12347        xmlnsXlink: "http://www.w3.org/1999/xlink",
12348        focusable: "false",
12349        style: { width: "100%", height: "100%" },
12350        children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12351          "image",
12352          {
12353            href: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAQAElEQVR4AezdC3ojWW5tYflOzPbIbI/M9sh8+WdrdZ+KpiiKL5FB5KedwN7AeSFIpHRYmfX/PubXVGAqMBV4kQpMw3qRBzXbnApMBT4+pmHNq2AqMBV4mQpMw3qZR3X9RmeGqcCrV2Aa1qs/wdn/VOCNKjAN640e9hx1KvDqFZiG9epPcPY/FThWgZ1q07B2+mDnWFOBPVZgGtYen+qcaSqw0wpMw9rpg51jTQX2WIFpWMee6mhTganAU1ZgGtZTPpbZ1FRgKnCsAtOwjlVltKnAVOApKzAN6ykfy2zqcRWYlV6pAtOwXulpzV6nAm9egWlYb/4CmONPBV6pAtOwXulpve9e//Nw9P/7xL8d7Hy9aQWubFhvWrU59qMr8D+HBcPBna93rcA0rHd98q91bs3q3w9bBv7Bna93rMA0rHd86nPmqcCLVmAa1os+uF/Y9m8u6Q7rvw8bgLnDOhTiXb+mYb3rk3+tc//rYbsaVTjQP18amct4+h9hftt3BaZh7fv57v107rNg7+ec831WYBrWZyHGPHUF/vewu//6xNqg+HMRfyjMrb+edb5pWM/6ZGZfawX86Bc0qTU2/htVYBrWGz3sOepU4NUrMA3r1Z/g7H8q8EYVmIZ1h4c9U04FpgL3qcA0rPvUdWadCkwF7lCBaVh3KOpMORWYCtynAtOw7lPXmfVdKjDnfGgFpmE9tNyz2FRgKnBNBaZhXVO9GTsVmAo8tALTsB5a7llsKjAVuKYCv9uwrtn5jJ0KTAXergLTsN7ukc+BpwKvW4FpWK/77GbnU4G3q8A0rLd75L914Fl3KnB9BaZhXV/DmWEqMBV4UAWmYT2o0LPMVGAqcH0FpmFdX8OZYSowFfhrBe7GpmHdrbQz8VRgKnDrCkzDunVFZ76pwFTgbhWYhnW30s7EU4GpwK0rMA3r1hW9fr6ZYSowFfiiAtOwvijMyFOBqcDzVWAa1vM9k9nRVGAq8EUFpmF9UZiRpwKPqMCs8bMKTMP6Wb0meyowFfjFCkzD+sXiz9JTganAzyowDetn9ZrsqcBU4Bcr8NIN6xfrNktPBaYCv1CBaVi/UPRZciowFbisAtOwLqvbjJoKTAV+oQLTsH6h6LPkBRWYIVOBQwWmYR2KMF9TganAa1RgGtZrPKfZ5VRgKnCowDSsQxHmayowFXimCny9l2lYX9dmIlOBqcCTVWAa1pM9kNnOVGAq8HUFpmF9XZuJTAWmAk9WgWlYT/ZArt/OzDAV2G8FpmHt99nOyaYCu6vANKzdPdK7HOjfDrP+9yf4B/fP138efoeDma+pwP0rMA3r/jXewwqaVFjP8x8HAmIHd74eXIG3W24a1ts98pse+H8Os8HBzNdU4P4VmIZ1/xrvYQU/9v3L4SCwNqh/P2iwagdpvqYC96nANKz71HVmnQpMBe5QgXduWHco526n9B3W9tJ91fi7Pfwc7HkqMA3reZ7FM+/kXw+bc7EeDvTPV1z8jzC/TQXuWYFpWPes7sw9FZgK3LQC07BuWs7dTva/h5P91ye6YGfT2EP4eb9mZ/uowDSsfTzHe5/CHVXQqKzHbjX6YCpwtwpMw7pbaX808f8dsoN7oQOdr6nAVGBbgWlY24o8hvvEzXcnp1YTl3cq51ExTdRe7GldE6ev2vhTgbtV4KyGdbfV33diDeC7T9bE5T1LlezFntb94PRVG38qcLcKTMO6W2lPTuy/GPdfiJfED+6G6Lg8/m/Dnuxne7lOe5Y9/naNZv0HVGAa1gOKfMYSGkI4I/1XUp59f79SlFn0sRWYhvXYereaex/3PyunQT9iiePlPMbOKlOBJ67ANKzfeTiakvufVsdDmjgtPnYq8PYVmIb1Oy8B9z7uf06tLi7vVM7EpgJvVYFpWM/xuF1mB3dFz7Gr2cXOK/B6x5uG9RzPzH1VeI4dzS6mAk9YgWlYT/hQZktTganA8QpMwzpel1GnAlOBJ6zANKyLH8oMnApMBR5dgWlYj674rDcVmApcXIFpWBeXbgZOBaYCj67ANKxHV3zWe8UKzJ6fpALTsJ7kQcw2pgJTge8rMA3r+xpNxlRgKvAkFZiG9SQPYrYxFZgKfF+BRzSs73cxGVOBqcBU4IwKTMM6o0iTMhWYCjxHBaZhPcdzmF1MBaYCZ1RgGtYZRXrSFP9Wln/gD/htEwd/mTqNT4Nyj2ny+7/3sDgYh4NxNBYHcdrH4Tc8HOifL/E044hsmjgN0tj2Ko6DcfLE8EADcfmAg1w64IMXrcA0rNd5cN6Y3njrjnE4pvkHANP58iCNxQO+B3x11v84HA6c9+DO1ytWYBrW6zw1/6Df/FtZlz8vtYPLZ5iRv16BaVi//gjO3sD2zYb7F0mB30Q4aHBpfBqU68cjHPjl4iHNPy5oDljH4yBeLh7SxNN+Mr7cY+PFmpNtLf52/2suv9yx11TgF8ZOw/qFor/gkt7kKzrCJZox9xzf3GN3WIFpWK/xUN27hHbsuyIXyyBGZ/FAgzgrh7aO59PE5AQaiKfJ2WriNCiPPZabxsqBa8ebw9rAD9agmX+r0QcvVoFpWK/xwLzxvOFcGq87pof0OHtKE5MDLqpxwAMO4mksDfggjgMecBBPY2lsEKdBGouDOB5oEGdx4Ac8pLFpY1+sAtOwfuuBXb+uN/H1s9x2hm0zWH/8u+1KM9tbVmAa1ms8dj/SuEh2odyOXUSHtTGksadyjZETjuWm/e/BKc+4A/1g09iPw69j2kH+OHe8XHMF89GOjaeXx+LAD41nt5rcwYtVYBrWiz2wZbvehBoZ8IVYPNAgzuKw5vK32prLD8dy08xRHosDP5TLbrVtLg7lscbRWDzQIM7isObyaYMXrMA0rBd8aN9s2Y9lodQ4m/ZK1r7Duu80Np0f0n7ZzvK3qsA0rFtV8vHzeFP6r9+Bbwesy/lAgzgrh8YaC+t3I3SclRdoEGflbDU6TYwfaBBn5Ww1fN2nPB820ECcZiweaLDmyqGBcSunDV6sAtOwXuyBPWC73tTe9NulaNuLfhqsuY1nV13eOeONMRb4t4Q93HK+mevBFZiG9eCC33i5ay+S3efAui3fibjc3+o06625OH3VjKOZZ9V9aCB/1XC5q2YczTyrfq7vgt5YWMc076qN/2IVeIGG9WIVfdx2vSG9CaFVaRpDSI+zcuisxgDrHMXYFfLhO018m0eDrY6D2AoapNmjvUN7FcdDueLyQU762B1UYBrWDh7iHGEq8C4VmIa1vyfdJbTvNDqdi/Ww3g3JgfKe1TpT+2+/zpHGtne6HEgbu5MKTMPayYNcjuENC9sL7iXl765LaPi78MvOLZZ3dmc65/y3WG/meGAFpmE9sNhPuJQ7HhffT7i1i7fkTODy/eJJZuBzVmAa1nM+l2t21SW0S+fm4Qdv5lV/hR+dNNXt/p0jje1M6a9wrvY89swKTMM6s1AvnuZNHF7xKO092xnibNrYF6nAJduchnVJ1Z57jO8sQjt1aR3c8aS/inWe7f6dI43tLPSQNnYnFZiGtZMHuRzDhTOsl869gdkl9cOna7Bqz+g7i72H9hhnV00DU4O0sTupwDSsnTzIOcZU4B0qMA3rRZ/yiW27gAYX1aXxw3rf0wV9ec9qfeJ3bP9pbHv346NzqUHa2J1UYBrWTh7kcgwNKSR7E4e0V7LtnXU2e2fxQBvsvALTsHb+gD+P544nfEovZdo7u24cD6s+/k4rMA1rfw/WJTq4eO50/OANvtXjz2pdoLd/31HZp3OksTQQx1n89TEn+HsFpmH9vRRv6XjTw94O70w+Wdzbud7+PNOw9vcScLcDLqq/O52Lafgu75Xizu5M60X8K+1/9nqiAtOwThTnRUPerLD+SORTs+AN3dH4EH9W6zztv3PZdxrb3ukhbexOKrD/hrWTBzXHmApMBT4+pmHt71Xgwhn6TsQJXcIH9zs04AP/meE87b9z2Xca2/7pciBt7E4qMA1rJw9yOYY3LJxz6awRwDL85V1n96niOed/+cO+2wGmYb3bE//reXd21/PncJ3pnA8d/gyY316nAtOwXudZnbvTfzkkgovqg/vnix+8of+Ih9/SDu5Tf/nEr722fzaN7QDp8yNhFdmRnYa1o4d54ijexOFE2tOG2nu2jcbZtLE7rsA0rP09XN9ZhE7nniq440l/Fes82/07Rxr7KmeZfV5RgaVhXTHLDH2mCrhwhvXS2Zs7rHutEazaM/rO0v7Z9sgPac7kU8NpYlVkR3Ya1o4e5hzlLxWYS/e/lGMfZBrWPp7jeoouqNl0fljve3w3sl5Yl/9sVvM5tv80tj07kw8d2LSxO6nANKydPMjlGN6omhIk0wLt1dDe2c7F4uHVzjT7vaAC07AuKNoLDumeh33B7X/Yd/hYfqWxizzuXiswDWt/T9aFM6yXzvywvrnTnr0KPkRor76jsl/nSGNpII6z+GBHFZiGtaOHecFRvOnhgqFPPcSZfLL41Jt81Ob2tM40rD09zb+dxd0OuKj+m/L17y7c4euM14v4zsqZ1ov41zvF7PhoBaZhHS3LS4verOCN20F8ahY0s3Q+xJ/VOk/771z2ncauexeDVRt/BxWYhrWDhzhHmAq8SwWmYX3zpF8w7MIZ+k7EEVzCB/c7NOAD/5nhPO2/c9l3Gtv+6XIgbexOKjANaycPcjmGNyycc+msEcAy/OVdZ/ep4jnnf/nDvtsBpmG92xP/63nd88Bf1ddmzgPnfOjw2id9w91Pw9rfQ3cBDS6qOx0/eDNv9fizWp/4bffvHGlse0//+Y+EzTD2aSswDetpH81NN+ZNHG468YMma+/Zlo2zaWN3XIFpWPt7uL6zCJ0uzrrjSX+Utaa1gW9dFg+0r7Dm8strLJs2dscVmIa1v4frwhnWS2c8rCf26Rqs2j381mZrOCwO617pPghg24uckM6mseVqXs5kjrSxO6nA7RrWTgoyx3iaCmhIT7OZ2chzVGAa1nM8h1vuwgV1aN44u973uJyH8u5lfWJnbWh9Fg+tTXeJ7jultGPjxRrL4mCcM5kDH+yoAtOwdvQwP4/iDQve+J/SBx4+fuFXa7Pti8WBf2pbckK5bBp7avzEdlKBaVg7eZDfHMOPV+Gb1HPCP85pbbbB/BXpx+xXeV/px+YYbQcVmIa1g4e4OYILZ1gvnfnBm7wh8mDVil1jfcezzulSvPXFzC2eJk4DcTqLgzgN0tfxdHkgjrP4YEcVmIa1o4f5w6N4w/9wyFnp5tVgzkr+Iskc6yeHX6R9KV87/suJJ/C7FZiG9bv1v8fq7nbARfWp+eW4rIZTeT+NmdeFN/vTsfKNsyfAf4prx/90vb3nP9X5pmE91eO4yWY0C1h/JPKpWfCGbiE5sGrFrrHb+eyn9a1nbjZNnAbGirE4iJcrRhNPY2lAl8Pigx1VYBrWjh7mHGUqsPcKTMPa3xN24Qy+y+h0LtaD+x06Kwfwe8Ia9gTWtRaLgzjtK8hpoPtu7gAAEABJREFU/+Uan8Y2li4H0sbupALTsO77IH9jdm9YOOfS2uU4yL/3Xq0B6zo4nLPXddwp33zOdMs5T603sQdWYBrWA4s9Sz2kAu6u4LsPHR6ymVnkthWYhnXbej7DbC6gwUV1++EHb2Y6Kw/4tHvBj2fWgdZi29N3nwiKl2ucfbJpLA3SrYkPdlSBaVg7epgnjuJNHE6kPTzUnthTi4uvKPeYVuzhdha8fwWmYd2/xo9ewR0OrN9h8INYe+JD/FmtPR7bfxr7rHuffd2wAtOwbljMJ5nKJ2qwXjq7hA5tUxOQB/z0Z7TtnW2vLB7at+blU0PnShu7kwpMw9rJg5xjTAXeoQJP07DeodgPOqML6tCSx+56aC6rgV/uM1qf+NkjrPvDQ7rvsJxJDdLG7qQC07B28iCXY3jDgjdysjdwWHU+lPes1nnaP98+7TuNpQUxiI/dSQWmYe3kQX5zDPc94ZvUpwy3d3bdIB5WffydVmAa1v4erAtnWC+d+cEb3KlZecCnPQY/X8XFevvvOyx7TmObVRxn08bupALTsHbyIOcYf6mAZrZ+SvqX4JDXrcA0rNd9dl/t3N0NuKj+Kocux8U04HvBXs+1l+dz1TmmYV1Vvqcc7AIa1h+J/JWY4A3dxuXAqhV7Jus87d9+7c2e01ga0OWw+OBXK3Dbxadh3baeM9tUYCpwxwpMw7pjcR8wtbsaaCm+S/SQHmflpL+K9R2Ti3Ro/6zzhM4iJ8hJH7uDCkzDeu2H2Bvz0lNoBHDp+EeO03zCqXXLYU/lTewFKzAN66kf2rebc08D3yZ+kaBZXTP+i2lHngrcpwLTsO5T10fN6jIaWk/zwUN6nJWTzm457dmgsdo7tF8WD+05zspJH7uDCkzD2sFD3BzBmzQUirNpr2btPbT3OHtKKzb2xSswDet1H6A7Gt95AL+T4CFNPKTtwXZOtvPwgzNv9VUr9gx29nBGBaZhnVGkJ03xxvNXVoBvmyweaEC/9oLePM8EZ+qc63/Vnsa2Xw0MB+PSx75YBaZhvdgDm+1OBd65AtOwXvfpu7cJ6ynS2HTfYbiEhrQ9WH+tKHQe515Bx8vj0wYvWIG9NKwXLP3VW/bG04BAQzLhqtFpQQzir26dxbmB33mcO6SJywN++tgXq8A0rBd7YMt23cWERf5IYz/u+Mv8K1rqmFbsEfbY+se0R+xl1rhxBaZh3bigd5rOhfn2r6B4E9LBdw6WXjU67RZo3tYxZ5p1XGbTAA84GNf+jaMBH/iXwFhzs41vbTadxUF+uXScTRv7xBWYhvXED+fJtuZNvX4ad4vtmVMT+dFcS7Lxa7NcQme5144/a5FJul0FpmHdrpb3nMm/beXuBe65zqm5u7Q+lXMqZu+w5vjuZv2nYdbYOb753Fex5+Rvc6x/zfjtfMPvXIFpWHcu8I2m743lzdWUNG924NO9cfFAuwXMaw22+fDWWfeVxq65cmCdo/il1lywjrduKLbulb/ml7Nq4z9pBaZhPemDmW1NBaYCHx8fmyJMw9oU5AmoexXfBbBtpwtrNl2O+x9IK/8aay5Y57CGtcG6YiwO4jTAAw7iacbRrEGHNPq1MJc5oblop9Zfcxsz9gkrMA3r+R6KS2Twhv5ud3JCubg3aPyn1nhvYPanY3+abw245WW+ucwJ3+1HTvgud+JPUIFpWE/wEDZb6IJ9I59N3cnA2QM2ica6YGc3oaFTgd+twDSs363/sdV9d+Rymi2OhxqJ+FYr/285sZ9ZY829jtLAtmvJSRMvP41NE8fB/HQWB3HaLWAuc0LzrXu1Lp2VE2iDJ6/ANKwnf0Cf2/PmCp/SH5PG/hHu9Jv5V7TMJZoxp8YXu9SaP6xzpLHp/JA29okrMA3r+R6O7wZCu4uz7lzS+RC/hbVGaD5rpPHpbBpLA37AYc3lbzX5tHvBmtYAfuvgIU08jZ8+9gkqMA3rdx+CNwS0C74L95AeZ9PkuhwHfvq11hqhueJsa7E4uOg+lntMM47OGgvrePqtz2RO6wB/uz6dBvyAvwjeY5vTsH73OXvzwLFd+FHlmH5P7au93HPNY3PbBxyLjfbGFZiG9bsPvx891l1oVODTwnQ8rFoXxmLp11qX1qG57MUakMYP4sf0NPFy0+Ks+Kr7L9XVJu1aa43OxG8+fkizl2O5xcf+YgWmYf1i8Y8s7c1TE1rfsGmsnIbyIX6tNZd1Q/Ph1gY+XS4OaXQ84CCexqd9NV7s1rCWdYFvfrY9sTSQE/DBE1VgGtafh/FUv/lRKLSxOJt2L2uN0Bpx9pj2lX4q15gV5T7SHlv/mPbIPc1aJyowDetEce4c8qf4uX9dxCV08IZqa3yIX2vN1Tps87mExsG+6WuuOA3kBBzE04yjsWniNDA/ncVvAWtVa745WesEGsRZOTTg33JP5hz8sALTsH5YsCdL9yaCJ9vWVdvxiaEzsVdNdOPBmirceNqZ7icVmIb1k2rdNtcdSrh0Zn/iw6Xjn3GcS291YW+5P3PCpXO6iF/vui6dZ8ZdUYFpWFcU78qh3jzeAFDTofmELLREnJWTfmtrbmuE5rfHtPbKpomXm8amieNgHJ3FQZwGdJzFbwHnMifwzclaO9AgzsqhAR/4g1+qwDSsXyr8LDsVmAr8vALTsH5es0tGuJPxHQM0nu9iF8TpLB5oEGfl0G453lzmNLc1Ag3E0+RsNXEalMfiII7DT8Yfy01jzResA3FWDu3Y+mJygjyIs3Jo63g+bfALFfhpw/qFLe5iSZe1sF4k870hQgeNs6c0MTkBhziLAz/gIc1etppYmjge0uPiW00sTRwP6XHxrSaWJo6H9Dh7ShOTE3CIszjwAx7S7CVt7IMrMA3rwQWf5aYCU4HLKzAN6/La/WSky16XuGzj+tSJ1mUui4dy46wcuh9NcEhj8SAP4qwc2jreXmhicgINxNPk0I6Np5fH4nDp+NY6Nl7MGsE6EGfl0Na9prFygjyIs3Jo63h7oQ1+oQLTsH6h6J9LejOs+JQ/ztU+Dr/OzT2Wdxj+cUz/u/bxj1+rxi/CD+dq8s/NPZZ3yXjzGBdwiLM48AMe0ti0sQ+uwDSsxxTcn9DBXYhV2a1GT2Nx4AfjaOxWo6exOPCDcTQ2jaUBP+Cw5vK3mnwa8AMOxqTxaZDG4sAP5bJbbZuLQ3mscTQWBz4N8IBDnC2XxYM8iLP44M4VmIZ15wJ/Tu/CPXxKH3HWG4LO4oEGcRaHNZe/1dZcfpAHxqR1kbxqYvKAH+TQ2LTG09NYOV9p3uRy4KvxxoKc0JxsGisP+AGHNZe/1eTTgB9wMCbtu73KH9ypAtOw7lTYN53WG/tNj/7ix36R7U/DesyDcu+xwqr+6kkaHtLYn2ryjQs4xFkc+MFeaJDG4iCOAw78IL7VitHFV06Ls+I0wAMO4luNnsbiwA84xFk84OFczV7KdQEf0sbesQLTsO5Y3GVqnziFZD8SpfHp3jxpLA34QQ6NTbv3ePOfWkvcnqA8FgdxHPi0Y/unywlyaMak8WliaSwN+EEOjU271XjzmivggztXYBrWnQv8Ob0flcKn9BHPfnz+irOf0gc/fCy/0thkfjiliZXH4sAPOMSzNIizOPADDvEsDeIsDvyAQzxLgziLAz/gIY39qSbfuIBDnMUHd67ANKxbFPgfc3jh9u8u+ZO3iL/mEeTQXeJuNbE0Vh7wgxya+beaWBorD/hBDm0dby80sfJYGojjIId2bDxdTsDh0vGtdWy8WOuw1gF+kENb95rGlsfKA36QQ1vH2wtNrDyWFsTyx96wAtOwbljMmWoq8FkBDUyT+6RjblWBaVi3quQ/5nFfEv6hjvdOFfC3GrwG3unMDznrNKzbltmLtMtdfrN7AYd0eWn9aSyWxp4ab4wc4Mu9dLy9nBovbh1oLRYHceMBDziIpxlHY9PEaZDGOg9NHAfjaGJ4oEGclUMzBgc+TQwPNIizcmjG4P/y8fFhLzSxNJa2Qnzl49+gAtOwblDEmWIqMBV4TAWmYV1XZ5er0Cz+JHZ/Afx0PJQvvtXE0thHjbcXa321vrj9gBy5q8angZyAg3jaT8Yfy01jm5O1DvCDHNqx9cXKY+UBP8ihreP5NLHyWBqI4yCHNrhRBaZhXV5IL0Yvyj41aiY6rH+FAw/liaex6fxwShMrj8WBH3CIs3jAwV62Gj1NHA/pcfGtJpYmjof0uPhWE0sTx0N6nD2lickJOMRZHPgBD2n2stXE0sRxSBt7owo8uGHdaNfPM417ivW/fH6enc1OpgI7rMA0rMsfqmblAtaPAM1C669qsOn8IIeu0W01epq5cUhjG8/iwJcHOPxkvHxjgR9wOLZXa5bHygN+wOHS8db4ajy9dVgc+KHx7Fbb5uJQHmscjcUDDeIsDny1B+NogxtVYBrWjQr5OY0XqAYG/E/5Aw8fn7/ibLksDvzP1A88fHz+Ek/jk9mtRk9jcTiWu2prLj/I+Wo8vTwWB364x3hzWwf4AQdrpvG3mhgN+AEHY9L4W02MBuIBH9ywAtOwLi+mOwovVOCbicUDDeKsHBqLA58GeMAhzpbL4sCXB3jAIc6Wy+JBHsRZHNZc/lZbc/kA8sAYHPhbjU4DfjiWm7bNxaGxbLksDnx5gAcc4my5LB7kQZzFYc3lb7U1V2zwgwpMw/pBsTapLtvD+sJMc/nakDT2mHZs/Fe5jTdGDvDpLB5oEGdxWHPb66qtufwg56vx9PJYHPjhHuPNbR3gBxysmcbfamI04AccjEm7Za3MPfhBBaZh/aBYkzoVmAr8bgWmYV1efxfJ27uKOCve7HhIE99qYmksDvyAQ5zFAx7O1ezlVK74qTnFHz3eeu2JxYEfcIizeMDDudotz9qaL28fdYBpWJdX2l2ET4KAbyYvfhzS6HiQQxNP49PE0lga8IMcGpt27/HmP7WWuD1BeSwO4jjwacf2T5cT5NCMSePTxNJYGvCDHBqbdu/x5j+1lrg9DS6owDSsC4r2OcS9xopP+eMSzZiPz1/88Cl9xNmP5RcekuPsKU1MTsAhzuLAX0GDSzRjjAV+wCHO4sBfQYNztZ/kHpvz0vHmMhb4AR9cUIFpWOcVzZ+K/qt2thEuYWnghUgXx0GcBngoV3yriaWxxgI/yKGta6Wx5bHygB/k0Nbx9kITK4+lgTgOcmjHxtPlBBwuHd9ax8aLtQ5rHeAHObR1r2lseaw84Ac5tHW8vdDEymNpII6DHNqx8fTBDyswDeu8gvlkyIuPPW/ED7Im9a0r4B98fOsC/OTw07DOq5aLVvcg7HkjJmsqcF4Fjv3TNOeNfMOsaVjnPXTf0rtIZRuBe7FBOouDeLl40Pjo4mnG0cTSWBrwgxyaMWl8mlgaSwN+kEMzJs1eaGJpLA3EcTCOxuIgTgM84CCeZhyNTROnQRprPzRxHIyjieGBBnFWDs0YHPg0MTzQIM7KoRmDg73QxPBAA/E042hsmjhtcEEFpmFdUFjYef8AAA5ZSURBVLQZMhW4uAIz8KoKTMP65/K5q4I14gI1FPOn5ilNvDnKY0+NF5MTHjW+vX61vnh7kmNfq8anQXksDuI4/GT8sdw01nzBOhBn5dCOrS8mJ8iDOCuHto7n08TkBBqIp8nZauI0KI/FB99UYBrWPxfIiwd6scngBxxcwKexNOCDOA54wEE8jaUBP+AQZ/GAh59q8htrLziksTiI44EGcXEc0lgcxPFAg7g4DmksDuJ4oEGcxYEf8JDG/lSTbxzYCw54wEE8jaUBH8RxwAM++KYC07C+KdCEpwJTgeepwGs1rMfUrctRl6qt6N84Cuk+MdxqYmnsT8fLNw7Wy1k8WEMeu9XoaSwO/GAcjU1jacAPOFx6VmPh0vH2+NV4evtkceCD+jWepQFfHuABhzhbLosHeRBncfjJWe0xGDv4pgLTsL4p0GfYvUP4lD7irBf0x+EXiwP/IP35wsMf4fBbnC2XxYF/SPvzhYc/wuE38TT+Qfpg09iPz1/88Cl9rLn8j8Mvtjz2IP354gc5RHar0dNYHPjBOBq71ehpLA78YByNTWNpwAdxHPg04G81Og34AQdj0vhbTYwG/HAsN00uP+CDbyowDeuvBXKf0IuNLcoPcujsVqOnsTjwg3E0dqvR01gc+ME4GrvV6GksDvxgHI1NY2nADzisufytJp8G/ICDMWl8GqSxOPBDuexW2+biUB5rHI3FgU8DPOAgnsbfamI04AccjEnjbzUxGvADDsYEfLBUYBrWUoyD64Xir1bAejmKh0Pan684axzRiw+HS8abx9hgToizOKy5/K225vKDPDAmrb2umpg84Ac5NDat8fQ0Fgd+MI72Ta0+5MsDfmg8m8bKA37AYc3lbzX5NOAHHIxJ66yrJiYP+EEOjU1rPD2NxUGuD30AHywVmIa1FONM17fwZ6ZO2gtWQMN4wW2/x5anYf31OWtGweVp0TQ2TRyHNH4QP6aniZebxqaxOPADDnEWD3g4V7OXU7nip+YUf/R467UnFgd+wCHO4gEP52r3Pqv9uMSH9jT2swLTsD4L8Wm8WPrUxo8sn/Kf/z15epp4Gp9+zng5co05NV5MHvBD49k0c8lbNTEa8IMcGpv23XjxU7ni5oTyWBzEceDTjq1PlxPk0IxJ49PE0lga8IMcGpt27/HmP7WWuD1BeSwO9ioH8HfA2WechvXPpfIjQSgaZ49pX+nHco9pl4w3j3EBhziLAz/gIY09V/tJ7rE5f2O8fVg34BBnceAHPKSx52o/yT025zq++Fvbd29Y/hSDXgR8l52wXoTioVzxtF5Y54wv99h4seZkW4sf5NDXtdLY8lh5wA9yaOt4e6GJlcfSQBwHObRj4+lyAg6Xjm+tY+PFWoe1DvCDHNq61zS2PFYeHFtrHS8u79rx5rBuwMH8adagDT4r8M4Ny4vBi2P91OazLGOmAlOBZ6zAOzcsz8PFJvBfFbPv21bAH2S3nXFmu1kF3rlhdbnJVlDf+vdXc9aL0DS2XHEcjKOzOIjTAA+tJ55mnDyxNJYG/CCHZkwanyaWxtKAH+TQjEmzF5pYGksDcRyMo7E4iNMADziIpxlHY9PEaZDG2g9NHAfjaGJ4oEGclUMzBgc+TQwPNIizcmjG4GAvNDE80EA8zTgamyZOgzQWB3EcjKMNPivwzg3rswRjpgJTgVepwDs3LH96bS83V43fcyyPTRPHoR8jVo1frpxwLDeNLY991Pj2+tX64vYDcuxr1fg0kBNwEE/7yfhjuWlsc7LWAX6QQzu2vlh5rDw4lrtqfHnXjjeHdQMO5k+zBg3o/3lwVu1A3+vrnRuWy3YPP/Tk4+JbTSxNHA/pcfGtJpYmjof0OHtKE5MTcIizOPADHtLsZauJpYnjIT0uvtXE0sTxkB4X32piaeJ4SI+zpzQxOQGHOIvDuhYe5ID4VqOnieMhPS6+1cTSxPGQ7gMioKe9nX3nhvV2D3sOfFYF3rohnFWhX0x654blr1j4hBBcoHoMLB5oEGdxuHS8Nb4aT7dGwCHONp7FgS8P8IBDnC2XxYM8iLM4XHpWY+HS8fb41Xi6PQYc4i6vG8+m8+VBGosDP5TLprHygB9wuPSsxsKx8XSX8OBHQ/wt8VYNa/OEPfjgBSnMbjV6GosDPxhHY7caPY3FgR+Mo7FpLA34AYc1l7/V5NOAH3AwJo2/1cRowA/HctO2uTg0li2XxYEvD/CAQ5wtl8WDPIiL48Df6qsmJg/4AYc1l7/V5NOAH47lpm1zcWgsu+aKvT3epWH5Nj/00HEvCuDTWTzQIM7KobE48LcanQb8cCw3bZuLQ2PZclkc+PIADzjE2XJZPMiDOIvDmsvfamsuP8gDY9L4W02MBvxwLDdtm4tDY9lyWRz48gAPOIin8beaGA34AQdj0vhbTYwG/ICDMWn8rSZGe0u8S8PqUxe2B+0CM6wvjDSXn8dyj2n3GG8fx9ZKs6Yc4NNZPNAgzuKw5nbWVVtz+UHOV+Pp5bE48MM9xpvbOsAPOFgzjb/VxGjgNYIDDsbg8Ey1sre3wrs0rLd6qHPYj4+PKcIuK/AuDauLUbYH6XLTHQGk8YP4MT1NvNy0OCt+TE8TlwdpLB5wiLM48AMe0thzNXs5lStuPjiWJ35MTxM3FtL4QfyYniZebhqbxuLADzjEWTzg4VzNXk7lip+aU/xW45vnbey7NCw/94ceLu6TJODTvdBwSKPjQQ5NPI1PE9tq9DRWDs0YHPg0MTzQIM7KobE43Hu8+a0D/K/Wp8sJOBiTxqcd2z+9PFYOzRgc+DQxPNAgzsqhsTjce7z5rQP8r9anywk4GJPGpx3bP/3t8C4N6+0e7Bx4KrDHChxvWPs7qYtU6E8sJ8T/7+BAOouD+CH85wsPLmCJ4mnG0dg0cRqksafGi8kJxkKclUNb1+LTxOQEGsRZOTRjcGivYniQB+JpxtHYNHEapLE4iONgHI3FQZwGeLAfmniacTSxNJYG/CCHZkwanyaWxtKAH+TQjEmzF5pYGksDcRyMo7E4iNMADziIpxlHY9PEaW+Jd2lYXlzQJzxv+bDn0FOBV6/AuzQsdwCwXni++rOb/U8F3q4C79KwtpeYHjTNX3UA33LTWBzEaYAHjY8mnmYcjU0Tp0Eae2q8mJxgLMRZObR1LT5NTE6gQZyVQzPmXz4+PmjtVQwP8kA8zTgamyZOgzQWB3EcjKOxOIjTAA/2QxNPM44mlsbSgB/k0IxJ49PE0lga8IMcmjFp9kITS2NpII6DcTQWB3Ea4AEH8TTjaGyaOO0t8S4N6y0f7hx6KrC3Crxzw/KnlgtMcL/l2a4anwZywrHcNLa8a8ebx9rAD9agmX+riaWx8oAf5NDW8XyaWHksDcRxkLPVxGkgJ+AgnvaT8cdy09jmZK0D/CCHdmx9sfJYecAPcmjreD5NrDyWBuI4yNlq4jSQE3AQT2s8nQ/8t8U7NywX8F4AsL4AcBBPx0OaeBpLZ4M4DdJYHMTxQIM4iwM/4CGN/akm3ziwFxzwgIN4GksDPojjgAccxNNYGvBBHAc84CCextKAH3CIs3jAw081+Y21FxzSWBzE8UCDuDgOaSwO4niggb8WpJHR8Uvw8mPeuWG9/MObA7xVBXxg5N7srQ69Pew7Nyx/TccFJvRCYOmhesVZOXQvIBzSWDzIgzgrh3ZsPF1OwCHONp7FgS8PcHAuHPBQLpvGygN+wOHYXh8x3hpfrU9vnywO/NB4dqttc3EojzWOxuKBBnEWh3vUyrx+VPRM7QV/S7xzw/LgQw8f98IAfjoejmnlsuXxj+Ue08plG88ey01bc/l01jjg0wAPOIin8beaGA344Vhu2jYXh8ay5bI48OUBHnCIs+WyeJAHcRaHNZe/1dZcfpAHxqTxt5oYDfjhWG7aNheHxrJrrtjb450b1rGH735gRTlePEGczp7SxOQBPxhHY7caPY3FgR+Mo7FbjZ7G4sAPxtHYNJYG/IDDmsvfavJpwA84GJPG32piNOCHY7lp21wcGsuWy+LAlwd4wCHOlsviQR7EWRzWXP5WW3P5QR4YE/DBUoFpWEsxDq4XiotNcMl5kP588cMf4fBbnDXuIH2wOLg8/fj8hYdP6SPOGkdn8UCDOIvDmsvfamsuP8gDY9La66qJyQN+kENj0xpPT2Nx4AfjaGzatePNY07gBxzWtfhbTT4N+AEHY9La66qJyQN+kENj0xpPT2NxkOv1B3za4LMC07A+CzFmKjAVeP4KTMP66zNyZxBcnhZNY9PEcUjjB/Fjepp4uWlsGosDP+AQZ/GAh3M1ezmVK35qTvFHj7dee2Jx4Acc4iwe8PAX7UDoB/Pnix/ufVbruMQH/p8NzG9/q8A0rL/Vod+9QHwSA+4W0vEghy6exqeJbTV6GiuHZgwOfJoYHmgQZ+XQWBzuPd781gH+V+vT5QQcjEnj047tn14eK4dmDA58mhgeaBBn5dBYHO493vzWAf5X69PlBBzs1TjAB0sFpmEtxRh3KjAVeO4KTMN67ufzTLv7yQXwT3Kf6YyzlyevwF0a1pOfebZ3ugKajX8sbpvlkyyxVceP/ejiE641b/ypwE0qMA3rJmXc1STuUPxTJttDuWsRW3X8WMM6Nn4dN/5U4KIKTMO6qGwzaCowFfiNCkzD+o2q72nNOctU4IEVmIb1wGLPUlOBqcB1FZiGdV39ZvRUYCrwwApMw3pgsWepqcBrV+D3dz8N6/efwexgKjAVOLMC07DOLNSkTQWmAr9fgWlYv/8MZgdTganAmRWYhnVmoa5PmxmmAlOBayswDevaCs74qcBU4GEVmIb1sFLPQlOBqcC1FZiGdW0FZ/xU4J8rMMqdKjAN606FnWmnAlOB21dgGtbtazozTgWmAneqwDSsOxV2pp0KTAVuX4H/DwAA//9sB2hHAAAABklEQVQDAB9QlitZA9bLAAAAAElFTkSuQmCC",
12354            width: "248",
12355            height: "248",
12356            style: { mixBlendMode: "multiply" }
12357          }
12358        )
12359      }
12360    ) });
12361  }
12362  
12363  // routes/connectors-home/ai-plugin-callout.tsx
12364  var import_jsx_runtime43 = __toESM(require_jsx_runtime());
12365  var AI_PLUGIN_SLUG = "ai";
12366  var AI_PLUGIN_PAGE_SLUG = "ai-wp-admin";
12367  var AI_PLUGIN_ID = "ai/ai";
12368  var AI_PLUGIN_URL = "https://wordpress.org/plugins/ai/";
12369  var connectorDataValues = Object.values(getConnectorData());
12370  var hasAiProviders = connectorDataValues.some(
12371    (c) => c.type === "ai_provider"
12372  );
12373  var aiProviderSettingNames = [];
12374  for (const c of connectorDataValues) {
12375    if (c.type === "ai_provider" && c.authentication.method === "api_key") {
12376      aiProviderSettingNames.push(c.authentication.settingName);
12377    }
12378  }
12379  function AiPluginCallout() {
12380    const [isBusy, setIsBusy] = (0, import_element35.useState)(false);
12381    const [justActivated, setJustActivated] = (0, import_element35.useState)(false);
12382    const actionButtonRef = (0, import_element35.useRef)(null);
12383    (0, import_element35.useEffect)(() => {
12384      if (justActivated) {
12385        actionButtonRef.current?.focus();
12386      }
12387    }, [justActivated]);
12388    const initialHasConnectedProvider = (0, import_element35.useRef)(
12389      connectorDataValues.some(
12390        (c) => c.type === "ai_provider" && c.authentication.method === "api_key" && c.authentication.isConnected
12391      )
12392    ).current;
12393    const {
12394      pluginStatus,
12395      canInstallPlugins,
12396      canManagePlugins,
12397      hasConnectedProvider
12398    } = (0, import_data3.useSelect)((select2) => {
12399      const store2 = select2(import_core_data2.store);
12400      const canCreate = !!store2.canUser("create", {
12401        kind: "root",
12402        name: "plugin"
12403      });
12404      const siteSettings = store2.getEntityRecord("root", "site");
12405      const hasConnected = initialHasConnectedProvider || aiProviderSettingNames.some(
12406        (name) => !!siteSettings?.[name]
12407      );
12408      const plugin = store2.getEntityRecord(
12409        "root",
12410        "plugin",
12411        AI_PLUGIN_ID
12412      );
12413      const hasFinished = store2.hasFinishedResolution("getEntityRecord", [
12414        "root",
12415        "plugin",
12416        AI_PLUGIN_ID
12417      ]);
12418      if (!hasFinished) {
12419        return {
12420          pluginStatus: "checking",
12421          canInstallPlugins: canCreate,
12422          canManagePlugins: void 0,
12423          hasConnectedProvider: hasConnected
12424        };
12425      }
12426      if (!plugin) {
12427        return {
12428          pluginStatus: "not-installed",
12429          canInstallPlugins: canCreate,
12430          canManagePlugins: canCreate,
12431          hasConnectedProvider: hasConnected
12432        };
12433      }
12434      return {
12435        pluginStatus: plugin.status === "active" ? "active" : "inactive",
12436        canInstallPlugins: canCreate,
12437        canManagePlugins: true,
12438        hasConnectedProvider: hasConnected
12439      };
12440    }, []);
12441    const { saveEntityRecord } = (0, import_data3.useDispatch)(import_core_data2.store);
12442    const { createSuccessNotice, createErrorNotice } = (0, import_data3.useDispatch)(import_notices2.store);
12443    const installPlugin = async () => {
12444      setIsBusy(true);
12445      try {
12446        await saveEntityRecord(
12447          "root",
12448          "plugin",
12449          { slug: AI_PLUGIN_SLUG, status: "active" },
12450          { throwOnError: true }
12451        );
12452        setJustActivated(true);
12453        createSuccessNotice(
12454          (0, import_i18n9.__)("AI plugin installed and activated successfully."),
12455          {
12456            id: "ai-plugin-install-success",
12457            type: "snackbar"
12458          }
12459        );
12460      } catch {
12461        createErrorNotice((0, import_i18n9.__)("Failed to install the AI plugin."), {
12462          id: "ai-plugin-install-error",
12463          type: "snackbar"
12464        });
12465      } finally {
12466        setIsBusy(false);
12467      }
12468    };
12469    const activatePlugin = async () => {
12470      setIsBusy(true);
12471      try {
12472        await saveEntityRecord(
12473          "root",
12474          "plugin",
12475          { plugin: AI_PLUGIN_ID, status: "active" },
12476          { throwOnError: true }
12477        );
12478        setJustActivated(true);
12479        createSuccessNotice((0, import_i18n9.__)("AI plugin activated successfully."), {
12480          id: "ai-plugin-activate-success",
12481          type: "snackbar"
12482        });
12483      } catch {
12484        createErrorNotice((0, import_i18n9.__)("Failed to activate the AI plugin."), {
12485          id: "ai-plugin-activate-error",
12486          type: "snackbar"
12487        });
12488      } finally {
12489        setIsBusy(false);
12490      }
12491    };
12492    if (!hasAiProviders) {
12493      return null;
12494    }
12495    if (pluginStatus === "checking") {
12496      return null;
12497    }
12498    if (pluginStatus === "active" && initialHasConnectedProvider && !justActivated) {
12499      return null;
12500    }
12501    if (pluginStatus === "inactive" && canManagePlugins === false) {
12502      return null;
12503    }
12504    const isActiveNoProvider = pluginStatus === "active" && !hasConnectedProvider;
12505    const isJustConnected = pluginStatus === "active" && hasConnectedProvider && (!initialHasConnectedProvider || justActivated);
12506    const showInstallActivate = pluginStatus === "not-installed" || pluginStatus === "inactive";
12507    const hideButtons = pluginStatus === "not-installed" && canInstallPlugins === false;
12508    const getMessage = () => {
12509      if (isJustConnected) {
12510        return (0, import_i18n9.__)(
12511          "The <strong>AI plugin</strong> is ready to use. You can use it to generate featured images, alt text, titles, excerpts and more. <a>Learn more</a>"
12512        );
12513      }
12514      if (isActiveNoProvider) {
12515        return (0, import_i18n9.__)(
12516          "The <strong>AI plugin</strong> is installed. Connect an AI provider below to generate featured images, alt text, titles, excerpts, and more. <a>Learn more</a>"
12517        );
12518      }
12519      return (0, import_i18n9.__)(
12520        "The <strong>AI plugin</strong> can use your AI connectors to generate featured images, alt text, titles, excerpts and more. <a>Learn more</a>"
12521      );
12522    };
12523    const getPrimaryButtonProps = () => {
12524      if (pluginStatus === "not-installed") {
12525        return {
12526          label: isBusy ? (0, import_i18n9.__)("Installing\u2026") : (0, import_i18n9.__)("Install the AI plugin"),
12527          disabled: isBusy,
12528          onClick: isBusy ? void 0 : installPlugin
12529        };
12530      }
12531      return {
12532        label: isBusy ? (0, import_i18n9.__)("Activating\u2026") : (0, import_i18n9.__)("Activate the AI plugin"),
12533        disabled: isBusy,
12534        onClick: isBusy ? void 0 : activatePlugin
12535      };
12536    };
12537    return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "ai-plugin-callout", children: [
12538      /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "ai-plugin-callout__content", children: [
12539        /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { children: (0, import_element35.createInterpolateElement)(getMessage(), {
12540          strong: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("strong", {}),
12541          // @ts-expect-error `children` is injected by `createInterpolateElement` at runtime.
12542          a: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components3.ExternalLink, { href: AI_PLUGIN_URL })
12543        }) }),
12544        !hideButtons && (showInstallActivate ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12545          import_components3.Button,
12546          {
12547            variant: "primary",
12548            size: "compact",
12549            isBusy,
12550            disabled: getPrimaryButtonProps().disabled,
12551            accessibleWhenDisabled: true,
12552            onClick: getPrimaryButtonProps().onClick,
12553            children: getPrimaryButtonProps().label
12554          }
12555        ) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12556          import_components3.Button,
12557          {
12558            ref: actionButtonRef,
12559            variant: "secondary",
12560            size: "compact",
12561            href: (0, import_url.addQueryArgs)("options-general.php", {
12562              page: AI_PLUGIN_PAGE_SLUG
12563            }),
12564            children: (0, import_i18n9.__)("Control features in the AI plugin")
12565          }
12566        ))
12567      ] }),
12568      /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(WpLogoDecoration, {})
12569    ] });
12570  }
12571  
12572  // routes/connectors-home/stage.tsx
12573  var import_jsx_runtime44 = __toESM(require_jsx_runtime());
12574  var { store } = unlock2(connectorsPrivateApis2);
12575  registerDefaultConnectors();
12576  function ConnectorsPage() {
12577    const isFileModDisabled = getIsFileModDisabled();
12578    const { connectors, canInstallPlugins, isAiPluginInstalled } = (0, import_data4.useSelect)(
12579      (select2) => {
12580        const coreSelect = select2(import_core_data3.store);
12581        const aiPlugin = coreSelect.getEntityRecord(
12582          "root",
12583          "plugin",
12584          "ai/ai"
12585        );
12586        return {
12587          connectors: unlock2(select2(store)).getConnectors(),
12588          canInstallPlugins: coreSelect.canUser("create", {
12589            kind: "root",
12590            name: "plugin"
12591          }),
12592          isAiPluginInstalled: !!aiPlugin
12593        };
12594      },
12595      []
12596    );
12597    const renderableConnectors = connectors.filter(
12598      (connector) => connector.render
12599    );
12600    const aiProviderPluginSlugs = Array.from(
12601      new Set(
12602        connectors.filter(
12603          (connector) => connector.type === "ai_provider"
12604        ).map(
12605          (connector) => connector.plugin?.file?.split("/")[0]
12606        ).filter(
12607          (slug) => !!slug
12608        )
12609      )
12610    ).sort();
12611    const installedPluginSlugs = new Set(
12612      connectors.filter(
12613        (connector) => connector.plugin?.isInstalled
12614      ).map(
12615        (connector) => connector.plugin?.file?.split("/")[0]
12616      ).filter((slug) => !!slug)
12617    );
12618    if (isAiPluginInstalled) {
12619      installedPluginSlugs.add("ai");
12620    }
12621    const manualInstallPluginSlugs = ["ai", ...aiProviderPluginSlugs].filter(
12622      (slug) => !installedPluginSlugs.has(slug)
12623    );
12624    const isEmpty = renderableConnectors.length === 0;
12625    return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12626      page_default,
12627      {
12628        title: (0, import_i18n10.__)("Connectors"),
12629        subTitle: (0, import_i18n10.__)(
12630          "All of your API keys and credentials are stored here and shared across plugins. Configure once and use everywhere."
12631        ),
12632        children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
12633          "div",
12634          {
12635            className: `connectors-page$isEmpty ? " connectors-page--empty" : ""}`,
12636            children: [
12637              manualInstallPluginSlugs.length > 0 && (isFileModDisabled || !canInstallPlugins) && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12638                notice_exports.Root,
12639                {
12640                  intent: "info",
12641                  className: "connectors-page__file-mods-notice",
12642                  children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(notice_exports.Description, { children: isFileModDisabled ? (0, import_i18n10.__)(
12643                    "Plugins cannot be installed here due to your site configuration. Install them manually using your normal deployment workflow."
12644                  ) : (0, import_i18n10.__)(
12645                    "You do not have permission to install plugins. Please ask a site administrator to install them for you."
12646                  ) })
12647                }
12648              ),
12649              isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
12650                import_components4.__experimentalVStack,
12651                {
12652                  alignment: "center",
12653                  spacing: 3,
12654                  style: { maxWidth: 480 },
12655                  children: [
12656                    /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_components4.__experimentalVStack, { alignment: "center", spacing: 2, children: [
12657                      /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components4.__experimentalHeading, { level: 2, size: 15, children: (0, import_i18n10.__)("No connectors yet") }),
12658                      /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components4.__experimentalText, { size: 12, children: (0, import_i18n10.__)(
12659                        "Connectors appear here when you install plugins that use external services. Each plugin registers the API keys it needs, and you manage them all in one place."
12660                      ) })
12661                    ] }),
12662                    /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12663                      import_components4.Button,
12664                      {
12665                        variant: "secondary",
12666                        href: "plugin-install.php",
12667                        __next40pxDefaultSize: true,
12668                        children: (0, import_i18n10.__)("Learn more")
12669                      }
12670                    )
12671                  ]
12672                }
12673              ) : /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_components4.__experimentalVStack, { spacing: 3, children: [
12674                /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(AiPluginCallout, {}),
12675                /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components4.__experimentalVStack, { spacing: 3, role: "list", children: connectors.map(
12676                  (connector) => {
12677                    if (connector.render) {
12678                      return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12679                        connector.render,
12680                        {
12681                          slug: connector.slug,
12682                          name: connector.name,
12683                          description: connector.description,
12684                          type: connector.type,
12685                          logo: connector.logo,
12686                          authentication: connector.authentication,
12687                          plugin: connector.plugin
12688                        },
12689                        connector.slug
12690                      );
12691                    }
12692                    return null;
12693                  }
12694                ) })
12695              ] }),
12696              canInstallPlugins && !isFileModDisabled && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "connectors-page__help-text", children: (0, import_element36.createInterpolateElement)(
12697                (0, import_i18n10.__)(
12698                  "If the connector you need is not listed, <a>search the plugin directory</a> to see if a connector is available."
12699                ),
12700                {
12701                  a: (
12702                    // eslint-disable-next-line jsx-a11y/anchor-has-content
12703                    /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("a", { href: "plugin-install.php?s=connector&tab=search&type=tag" })
12704                  )
12705                }
12706              ) })
12707            ]
12708          }
12709        )
12710      }
12711    );
12712  }
12713  function Stage() {
12714    return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ConnectorsPage, {});
12715  }
12716  var stage = Stage;
12717  export {
12718    stage
12719  };
12720  /*! Bundled license information:
12721  
12722  use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
12723    (**
12724     * @license React
12725     * use-sync-external-store-shim.development.js
12726     *
12727     * Copyright (c) Meta Platforms, Inc. and affiliates.
12728     *
12729     * This source code is licensed under the MIT license found in the
12730     * LICENSE file in the root directory of this source tree.
12731     *)
12732  
12733  use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
12734    (**
12735     * @license React
12736     * use-sync-external-store-shim/with-selector.development.js
12737     *
12738     * Copyright (c) Meta Platforms, Inc. and affiliates.
12739     *
12740     * This source code is licensed under the MIT license found in the
12741     * LICENSE file in the root directory of this source tree.
12742     *)
12743  */


Generated : Tue Sep 22 08:20:31 2026 Cross-referenced by PHPXref