PluginProbe
Gutenberg / trunk
Gutenberg vtrunk
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/modules/boot/index.js +11574 -932 23.2.2 → trunk View file →
@@ -62,15 +62,170 @@
62 62 module.exports = window.ReactJSXRuntime;
63 63 }
64 64 });
65 65
66 -// package-external:@wordpress/primitives
67 -var require_primitives = __commonJS({
68 - "package-external:@wordpress/primitives"(exports, module) {
69 - module.exports = window.wp.primitives;
66 +// vendor-external:react-dom
67 +var require_react_dom = __commonJS({
68 + "vendor-external:react-dom"(exports, module) {
69 + module.exports = window.ReactDOM;
70 70 }
71 71 });
72 72
73 +// node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
74 +var require_use_sync_external_store_shim_development = __commonJS({
75 + "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
76 + "use strict";
77 + (function() {
78 + function is(x, y) {
79 + return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
80 + }
81 + function useSyncExternalStore$2(subscribe, getSnapshot) {
82 + didWarnOld18Alpha || void 0 === React48.startTransition || (didWarnOld18Alpha = true, console.error(
83 + "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."
84 + ));
85 + var value = getSnapshot();
86 + if (!didWarnUncachedGetSnapshot) {
87 + var cachedValue = getSnapshot();
88 + objectIs(value, cachedValue) || (console.error(
89 + "The result of getSnapshot should be cached to avoid an infinite loop"
90 + ), didWarnUncachedGetSnapshot = true);
91 + }
92 + cachedValue = useState19({
93 + inst: { value, getSnapshot }
94 + });
95 + var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
96 + useLayoutEffect3(
97 + function() {
98 + inst.value = value;
99 + inst.getSnapshot = getSnapshot;
100 + checkIfSnapshotChanged(inst) && forceUpdate({ inst });
101 + },
102 + [subscribe, value, getSnapshot]
103 + );
104 + useEffect18(
105 + function() {
106 + checkIfSnapshotChanged(inst) && forceUpdate({ inst });
107 + return subscribe(function() {
108 + checkIfSnapshotChanged(inst) && forceUpdate({ inst });
109 + });
110 + },
111 + [subscribe]
112 + );
113 + useDebugValue2(value);
114 + return value;
115 + }
116 + function checkIfSnapshotChanged(inst) {
117 + var latestGetSnapshot = inst.getSnapshot;
118 + inst = inst.value;
119 + try {
120 + var nextValue = latestGetSnapshot();
121 + return !objectIs(inst, nextValue);
122 + } catch (error) {
123 + return true;
124 + }
125 + }
126 + function useSyncExternalStore$1(subscribe, getSnapshot) {
127 + return getSnapshot();
128 + }
129 + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
130 + var React48 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState19 = React48.useState, useEffect18 = React48.useEffect, useLayoutEffect3 = React48.useLayoutEffect, useDebugValue2 = React48.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
131 + exports.useSyncExternalStore = void 0 !== React48.useSyncExternalStore ? React48.useSyncExternalStore : shim;
132 + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
133 + })();
134 + }
135 +});
136 +
137 +// node_modules/use-sync-external-store/shim/index.js
138 +var require_shim = __commonJS({
139 + "node_modules/use-sync-external-store/shim/index.js"(exports, module) {
140 + "use strict";
141 + if (false) {
142 + module.exports = null;
143 + } else {
144 + module.exports = require_use_sync_external_store_shim_development();
145 + }
146 + }
147 +});
148 +
149 +// node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
150 +var require_with_selector_development = __commonJS({
151 + "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) {
152 + "use strict";
153 + (function() {
154 + function is(x, y) {
155 + return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
156 + }
157 + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
158 + var React48 = require_react(), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore3 = shim.useSyncExternalStore, useRef21 = React48.useRef, useEffect18 = React48.useEffect, useMemo22 = React48.useMemo, useDebugValue2 = React48.useDebugValue;
159 + exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
160 + var instRef = useRef21(null);
161 + if (null === instRef.current) {
162 + var inst = { hasValue: false, value: null };
163 + instRef.current = inst;
164 + } else inst = instRef.current;
165 + instRef = useMemo22(
166 + function() {
167 + function memoizedSelector(nextSnapshot) {
168 + if (!hasMemo) {
169 + hasMemo = true;
170 + memoizedSnapshot = nextSnapshot;
171 + nextSnapshot = selector(nextSnapshot);
172 + if (void 0 !== isEqual && inst.hasValue) {
173 + var currentSelection = inst.value;
174 + if (isEqual(currentSelection, nextSnapshot))
175 + return memoizedSelection = currentSelection;
176 + }
177 + return memoizedSelection = nextSnapshot;
178 + }
179 + currentSelection = memoizedSelection;
180 + if (objectIs(memoizedSnapshot, nextSnapshot))
181 + return currentSelection;
182 + var nextSelection = selector(nextSnapshot);
183 + if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
184 + return memoizedSnapshot = nextSnapshot, currentSelection;
185 + memoizedSnapshot = nextSnapshot;
186 + return memoizedSelection = nextSelection;
187 + }
188 + var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
189 + return [
190 + function() {
191 + return memoizedSelector(getSnapshot());
192 + },
193 + null === maybeGetServerSnapshot ? void 0 : function() {
194 + return memoizedSelector(maybeGetServerSnapshot());
195 + }
196 + ];
197 + },
198 + [getSnapshot, getServerSnapshot, selector, isEqual]
199 + );
200 + var value = useSyncExternalStore3(subscribe, instRef[0], instRef[1]);
201 + useEffect18(
202 + function() {
203 + inst.hasValue = true;
204 + inst.value = value;
205 + },
206 + [value]
207 + );
208 + useDebugValue2(value);
209 + return value;
210 + };
211 + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
212 + })();
213 + }
214 +});
215 +
216 +// node_modules/use-sync-external-store/shim/with-selector.js
217 +var require_with_selector = __commonJS({
218 + "node_modules/use-sync-external-store/shim/with-selector.js"(exports, module) {
219 + "use strict";
220 + if (false) {
221 + module.exports = null;
222 + } else {
223 + module.exports = require_with_selector_development();
224 + }
225 + }
226 +});
227 +
73 228 // package-external:@wordpress/compose
74 229 var require_compose = __commonJS({
75 230 "package-external:@wordpress/compose"(exports, module) {
76 231 module.exports = window.wp.compose;
@@ -90,8 +245,15 @@
90 245 module.exports = window.wp.privateApis;
91 246 }
92 247 });
93 248
249 +// package-external:@wordpress/primitives
250 +var require_primitives = __commonJS({
251 + "package-external:@wordpress/primitives"(exports, module) {
252 + module.exports = window.wp.primitives;
253 + }
254 +});
255 +
94 256 // package-external:@wordpress/components
95 257 var require_components = __commonJS({
96 258 "package-external:@wordpress/components"(exports, module) {
97 259 module.exports = window.wp.components;
@@ -111,12 +273,12 @@
111 273 module.exports = window.wp.notices;
112 274 }
113 275 });
114 276
115 -// package-external:@wordpress/html-entities
116 -var require_html_entities = __commonJS({
117 - "package-external:@wordpress/html-entities"(exports, module) {
118 - module.exports = window.wp.htmlEntities;
277 +// package-external:@wordpress/editor
278 +var require_editor = __commonJS({
279 + "package-external:@wordpress/editor"(exports, module) {
280 + module.exports = window.wp.editor;
119 281 }
120 282 });
121 283
122 284 // package-external:@wordpress/keycodes
@@ -125,15 +287,22 @@
125 287 module.exports = window.wp.keycodes;
126 288 }
127 289 });
128 290
129 -// package-external:@wordpress/commands
130 -var require_commands = __commonJS({
131 - "package-external:@wordpress/commands"(exports, module) {
132 - module.exports = window.wp.commands;
291 +// package-external:@wordpress/keyboard-shortcuts
292 +var require_keyboard_shortcuts = __commonJS({
293 + "package-external:@wordpress/keyboard-shortcuts"(exports, module) {
294 + module.exports = window.wp.keyboardShortcuts;
133 295 }
134 296 });
135 297
298 +// package-external:@wordpress/dom
299 +var require_dom = __commonJS({
300 + "package-external:@wordpress/dom"(exports, module) {
301 + module.exports = window.wp.dom;
302 + }
303 +});
304 +
136 305 // package-external:@wordpress/url
137 306 var require_url = __commonJS({
138 307 "package-external:@wordpress/url"(exports, module) {
139 308 module.exports = window.wp.url;
@@ -139,29 +308,29 @@
139 308 module.exports = window.wp.url;
140 309 }
141 310 });
142 311
143 -// package-external:@wordpress/editor
144 -var require_editor = __commonJS({
145 - "package-external:@wordpress/editor"(exports, module) {
146 - module.exports = window.wp.editor;
312 +// package-external:@wordpress/html-entities
313 +var require_html_entities = __commonJS({
314 + "package-external:@wordpress/html-entities"(exports, module) {
315 + module.exports = window.wp.htmlEntities;
147 316 }
148 317 });
149 318
150 -// package-external:@wordpress/keyboard-shortcuts
151 -var require_keyboard_shortcuts = __commonJS({
152 - "package-external:@wordpress/keyboard-shortcuts"(exports, module) {
153 - module.exports = window.wp.keyboardShortcuts;
319 +// package-external:@wordpress/plugins
320 +var require_plugins = __commonJS({
321 + "package-external:@wordpress/plugins"(exports, module) {
322 + module.exports = window.wp.plugins;
154 323 }
155 324 });
156 325
157 326 // packages/boot/build-module/components/app/index.mjs
158 -var import_element17 = __toESM(require_element(), 1);
159 -var import_data11 = __toESM(require_data(), 1);
327 +var import_element44 = __toESM(require_element(), 1);
328 +var import_data14 = __toESM(require_data(), 1);
160 329
161 330 // packages/boot/build-module/components/app/router.mjs
162 -var import_i18n11 = __toESM(require_i18n(), 1);
163 -var import_element16 = __toESM(require_element(), 1);
331 +var import_i18n19 = __toESM(require_i18n(), 1);
332 +var import_element42 = __toESM(require_element(), 1);
164 333
165 334 // node_modules/clsx/dist/clsx.mjs
166 335 function r(e) {
167 336 var t, f, n = "";
@@ -177,13 +346,42 @@
177 346 return n;
178 347 }
179 348 var clsx_default = clsx;
180 349
181 -// node_modules/@base-ui/utils/esm/useRefWithInit.js
350 +// node_modules/@base-ui/utils/createLogOnce.mjs
351 +var loggedMessages;
352 +if (true) {
353 + loggedMessages = /* @__PURE__ */ new Set();
354 +}
355 +function createLogOnce(severity, prefix) {
356 + return function logOnce(...messages) {
357 + if (true) {
358 + const message = messages.join(" ");
359 + const output = prefix ? `${prefix}: ${message}` : message;
360 + const key = `${severity}:${output}`;
361 + if (!loggedMessages.has(key)) {
362 + loggedMessages.add(key);
363 + if (severity === "warn") {
364 + console.warn(output);
365 + } else {
366 + console.error(output);
367 + }
368 + }
369 + }
370 + };
371 +}
372 +
373 +// node_modules/@base-ui/utils/safeReact.mjs
182 374 var React = __toESM(require_react(), 1);
375 +var SafeReact = {
376 + ...React
377 +};
378 +
379 +// node_modules/@base-ui/utils/useRefWithInit.mjs
380 +var React2 = __toESM(require_react(), 1);
183 381 var UNINITIALIZED = {};
184 382 function useRefWithInit(init2, initArg) {
185 - const ref = React.useRef(UNINITIALIZED);
383 + const ref = React2.useRef(UNINITIALIZED);
186 384 if (ref.current === UNINITIALIZED) {
187 385 ref.current = init2(initArg);
188 386 }
189 387 return ref;
@@ -188,27 +386,60 @@
188 386 }
189 387 return ref;
190 388 }
191 389
192 -// node_modules/@base-ui/utils/esm/warn.js
193 -var set;
194 -if (true) {
195 - set = /* @__PURE__ */ new Set();
390 +// node_modules/@base-ui/utils/useStableCallback.mjs
391 +var useInsertionEffect = SafeReact.useInsertionEffect;
392 +var useSafeInsertionEffect = (
393 + // React 17 doesn't have useInsertionEffect.
394 + useInsertionEffect && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late.
395 + useInsertionEffect !== SafeReact.useLayoutEffect ? useInsertionEffect : (fn) => fn()
396 +);
397 +function useStableCallback(callback) {
398 + const stable = useRefWithInit(createStableCallback).current;
399 + stable.next = callback;
400 + useSafeInsertionEffect(stable.effect);
401 + return stable.trampoline;
196 402 }
197 -function warn(...messages) {
403 +function createStableCallback() {
404 + const stable = {
405 + next: void 0,
406 + callback: assertNotCalled,
407 + trampoline: (...args) => stable.callback?.(...args),
408 + effect: () => {
409 + stable.callback = stable.next;
410 + }
411 + };
412 + return stable;
413 +}
414 +function assertNotCalled() {
198 415 if (true) {
199 - const messageKey = messages.join(" ");
200 - if (!set.has(messageKey)) {
201 - set.add(messageKey);
202 - console.warn(`Base UI: ${messageKey}`);
203 - }
416 + throw (
417 + /* minify-error-disabled */
418 + new Error("Base UI: Cannot call an event handler while rendering.")
419 + );
204 420 }
205 421 }
206 422
207 -// node_modules/@base-ui/react/esm/internals/useRenderElement.js
208 -var React4 = __toESM(require_react(), 1);
423 +// node_modules/@base-ui/utils/warn.mjs
424 +var warn = createLogOnce("warn", "Base UI");
209 425
210 -// node_modules/@base-ui/utils/esm/useMergedRefs.js
426 +// node_modules/@base-ui/utils/empty.mjs
427 +function NOOP() {
428 +}
429 +var EMPTY_ARRAY = Object.freeze([]);
430 +var EMPTY_OBJECT = Object.freeze({});
431 +
432 +// node_modules/@base-ui/utils/useIsoLayoutEffect.mjs
433 +var React3 = __toESM(require_react(), 1);
434 +var noop = () => {
435 +};
436 +var useIsoLayoutEffect = typeof document !== "undefined" ? React3.useLayoutEffect : noop;
437 +
438 +// node_modules/@base-ui/react/internals/useRenderElement.mjs
439 +var React6 = __toESM(require_react(), 1);
440 +
441 +// node_modules/@base-ui/utils/useMergedRefs.mjs
211 442 function useMergedRefs(a, b, c, d) {
212 443 const forkRef = useRefWithInit(createForkRef).current;
213 444 if (didChange(forkRef, a, b, c, d)) {
214 445 update(forkRef, [a, b, c, d]);
@@ -232,9 +463,9 @@
232 463 function didChange(forkRef, a, b, c, d) {
233 464 return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
234 465 }
235 466 function didChangeN(forkRef, newRefs) {
236 - return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
467 + return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index2) => ref !== newRefs[index2]);
237 468 }
238 469 function update(forkRef, refs) {
239 470 forkRef.refs = refs;
240 471 if (refs.every((ref) => ref == null)) {
@@ -279,9 +510,9 @@
279 510 const cleanupCallback = cleanupCallbacks[i];
280 511 if (typeof cleanupCallback === "function") {
281 512 cleanupCallback();
282 513 } else {
283 - ref(null);
514 + void ref(null);
284 515 }
285 516 break;
286 517 }
287 518 case "object": {
@@ -295,21 +526,21 @@
295 526 }
296 527 };
297 528 }
298 529
299 -// node_modules/@base-ui/utils/esm/getReactElementRef.js
300 -var React3 = __toESM(require_react(), 1);
530 +// node_modules/@base-ui/utils/getReactElementRef.mjs
531 +var React5 = __toESM(require_react(), 1);
301 532
302 -// node_modules/@base-ui/utils/esm/reactVersion.js
303 -var React2 = __toESM(require_react(), 1);
304 -var majorVersion = parseInt(React2.version, 10);
533 +// node_modules/@base-ui/utils/reactVersion.mjs
534 +var React4 = __toESM(require_react(), 1);
535 +var majorVersion = parseInt(React4.version, 10);
305 536 function isReactVersionAtLeast(reactVersionToCheck) {
306 537 return majorVersion >= reactVersionToCheck;
307 538 }
308 539
309 -// node_modules/@base-ui/utils/esm/getReactElementRef.js
540 +// node_modules/@base-ui/utils/getReactElementRef.mjs
310 541 function getReactElementRef(element) {
311 - if (!/* @__PURE__ */ React3.isValidElement(element)) {
542 + if (!/* @__PURE__ */ React5.isValidElement(element)) {
312 543 return null;
313 544 }
314 545 const reactElement = element;
315 546 const propsWithRef = reactElement.props;
@@ -315,9 +546,9 @@
315 546 const propsWithRef = reactElement.props;
316 547 return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
317 548 }
318 549
319 -// node_modules/@base-ui/utils/esm/mergeObjects.js
550 +// node_modules/@base-ui/utils/mergeObjects.mjs
320 551 function mergeObjects(a, b) {
321 552 if (a && !b) {
322 553 return a;
323 554 }
@@ -332,13 +563,9 @@
332 563 }
333 564 return void 0;
334 565 }
335 566
336 -// node_modules/@base-ui/utils/esm/empty.js
337 -var EMPTY_ARRAY = Object.freeze([]);
338 -var EMPTY_OBJECT = Object.freeze({});
339 -
340 -// node_modules/@base-ui/react/esm/internals/getStateAttributesProps.js
567 +// node_modules/@base-ui/react/internals/getStateAttributesProps.mjs
341 568 function getStateAttributesProps(state, customMapping) {
342 569 const props = {};
343 570 for (const key in state) {
344 571 const value = state[key];
@@ -357,19 +584,19 @@
357 584 }
358 585 return props;
359 586 }
360 587
361 -// node_modules/@base-ui/react/esm/utils/resolveClassName.js
588 +// node_modules/@base-ui/react/utils/resolveClassName.mjs
362 589 function resolveClassName(className, state) {
363 590 return typeof className === "function" ? className(state) : className;
364 591 }
365 592
366 -// node_modules/@base-ui/react/esm/utils/resolveStyle.js
593 +// node_modules/@base-ui/react/utils/resolveStyle.mjs
367 594 function resolveStyle(style, state) {
368 595 return typeof style === "function" ? style(state) : style;
369 596 }
370 597
371 -// node_modules/@base-ui/react/esm/merge-props/mergeProps.js
598 +// node_modules/@base-ui/react/merge-props/mergeProps.mjs
372 599 var EMPTY_PROPS = {};
373 600 function mergeProps(a, b, c, d, e) {
374 601 if (!c && !d && !e && !a) {
375 602 return createInitialMergedProps(b);
@@ -522,13 +749,16 @@
522 749 function isSyntheticEvent(event) {
523 750 return event != null && typeof event === "object" && "nativeEvent" in event;
524 751 }
525 752
526 -// node_modules/@base-ui/react/esm/internals/useRenderElement.js
753 +// node_modules/@base-ui/react/internals/useRenderElement.mjs
527 754 var import_react = __toESM(require_react(), 1);
528 755 function useRenderElement(element, componentProps, params = {}) {
529 - const renderProp = componentProps.render;
530 - const outProps = useRenderElementProps(componentProps, params);
756 + let renderProp = componentProps.render;
757 + if (params.enabled !== false) {
758 + renderProp = unwrapLazyRenderProp(renderProp);
759 + }
760 + const outProps = useRenderElementProps(componentProps, params, renderProp);
531 761 if (params.enabled === false) {
532 762 return null;
533 763 }
534 764 const state = params.state ?? EMPTY_OBJECT;
@@ -533,13 +763,12 @@
533 763 }
534 764 const state = params.state ?? EMPTY_OBJECT;
535 765 return evaluateRenderProp(element, renderProp, outProps, state);
536 766 }
537 -function useRenderElementProps(componentProps, params = {}) {
767 +function useRenderElementProps(componentProps, params, renderProp) {
538 768 const {
539 769 className: classNameProp,
540 - style: styleProp,
541 - render: renderProp
770 + style: styleProp
542 771 } = componentProps;
543 772 const {
544 773 state = EMPTY_OBJECT,
545 774 ref,
@@ -553,9 +782,9 @@
553 782 const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
554 783 const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
555 784 if (typeof document !== "undefined") {
556 785 if (!enabled) {
557 - useMergedRefs(null, null);
786 + void useMergedRefs(null, null);
558 787 } else if (Array.isArray(ref)) {
559 788 outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
560 789 } else {
561 790 outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
@@ -580,8 +809,15 @@
580 809 }
581 810 var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
582 811 var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
583 812 var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
813 +function unwrapLazyRenderProp(render) {
814 + if (render?.$$typeof !== REACT_LAZY_TYPE) {
815 + return render;
816 + }
817 + const unwrapped = React6.Children.toArray(render)[0];
818 + return /* @__PURE__ */ React6.isValidElement(unwrapped) ? unwrapped : render;
819 +}
584 820 function evaluateRenderProp(element, render, props, state) {
585 821 if (render) {
586 822 if (typeof render === "function") {
587 823 if (true) {
@@ -590,19 +826,14 @@
590 826 return render(props, state);
591 827 }
592 828 const mergedProps = mergeProps(props, render.props);
593 829 mergedProps.ref = props.ref;
594 - let newElement = render;
595 - if (newElement?.$$typeof === REACT_LAZY_TYPE) {
596 - const children = React4.Children.toArray(render);
597 - newElement = children[0];
598 - }
599 830 if (true) {
600 - if (!/* @__PURE__ */ React4.isValidElement(newElement)) {
831 + if (!/* @__PURE__ */ React6.isValidElement(render)) {
601 832 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"));
602 833 }
603 834 }
604 - return /* @__PURE__ */ React4.cloneElement(newElement, mergedProps);
835 + return /* @__PURE__ */ React6.cloneElement(render, mergedProps);
605 836 }
606 837 if (element) {
607 838 if (typeof element === "string") {
608 839 return renderTag(element, props);
@@ -637,18 +868,7733 @@
637 868 ...props,
638 869 key: props.key
639 870 });
640 871 }
641 - return /* @__PURE__ */ React4.createElement(Tag, props);
872 + return /* @__PURE__ */ React6.createElement(Tag, props);
642 873 }
643 874
644 -// node_modules/@base-ui/react/esm/use-render/useRender.js
875 +// node_modules/@base-ui/utils/useId.mjs
876 +var React7 = __toESM(require_react(), 1);
877 +var globalId = 0;
878 +function useGlobalId(idOverride, prefix = "mui") {
879 + const [defaultId, setDefaultId] = React7.useState(idOverride);
880 + const id = idOverride || defaultId;
881 + React7.useEffect(() => {
882 + if (defaultId == null) {
883 + globalId += 1;
884 + setDefaultId(`${prefix}-${globalId}`);
885 + }
886 + }, [defaultId, prefix]);
887 + return id;
888 +}
889 +var maybeReactUseId = SafeReact.useId;
890 +function useId(idOverride, prefix) {
891 + if (maybeReactUseId !== void 0) {
892 + const reactId = maybeReactUseId();
893 + return idOverride ?? (prefix ? `${prefix}-${reactId}` : reactId);
894 + }
895 + return useGlobalId(idOverride, prefix);
896 +}
897 +
898 +// node_modules/@base-ui/react/internals/useBaseUiId.mjs
899 +function useBaseUiId(idOverride) {
900 + return useId(idOverride, "base-ui");
901 +}
902 +
903 +// node_modules/@base-ui/react/internals/reason-parts.mjs
904 +var reason_parts_exports = {};
905 +__export(reason_parts_exports, {
906 + cancelOpen: () => cancelOpen,
907 + chipRemovePress: () => chipRemovePress,
908 + clearPress: () => clearPress,
909 + closePress: () => closePress,
910 + closeWatcher: () => closeWatcher,
911 + decrementPress: () => decrementPress,
912 + disabled: () => disabled,
913 + drag: () => drag,
914 + escapeKey: () => escapeKey,
915 + focusOut: () => focusOut,
916 + imperativeAction: () => imperativeAction,
917 + incrementPress: () => incrementPress,
918 + initial: () => initial,
919 + inputBlur: () => inputBlur,
920 + inputChange: () => inputChange,
921 + inputClear: () => inputClear,
922 + inputPaste: () => inputPaste,
923 + inputPress: () => inputPress,
924 + itemPress: () => itemPress,
925 + keyboard: () => keyboard,
926 + linkPress: () => linkPress,
927 + listNavigation: () => listNavigation,
928 + missing: () => missing,
929 + none: () => none,
930 + outsidePress: () => outsidePress,
931 + pointer: () => pointer,
932 + scrub: () => scrub,
933 + siblingOpen: () => siblingOpen,
934 + swipe: () => swipe,
935 + trackPress: () => trackPress,
936 + triggerFocus: () => triggerFocus,
937 + triggerHover: () => triggerHover,
938 + triggerPress: () => triggerPress,
939 + wheel: () => wheel,
940 + windowResize: () => windowResize
941 +});
942 +var none = "none";
943 +var triggerPress = "trigger-press";
944 +var triggerHover = "trigger-hover";
945 +var triggerFocus = "trigger-focus";
946 +var outsidePress = "outside-press";
947 +var itemPress = "item-press";
948 +var closePress = "close-press";
949 +var linkPress = "link-press";
950 +var clearPress = "clear-press";
951 +var chipRemovePress = "chip-remove-press";
952 +var trackPress = "track-press";
953 +var incrementPress = "increment-press";
954 +var decrementPress = "decrement-press";
955 +var inputChange = "input-change";
956 +var inputClear = "input-clear";
957 +var inputBlur = "input-blur";
958 +var inputPaste = "input-paste";
959 +var inputPress = "input-press";
960 +var focusOut = "focus-out";
961 +var escapeKey = "escape-key";
962 +var closeWatcher = "close-watcher";
963 +var listNavigation = "list-navigation";
964 +var keyboard = "keyboard";
965 +var pointer = "pointer";
966 +var drag = "drag";
967 +var wheel = "wheel";
968 +var scrub = "scrub";
969 +var cancelOpen = "cancel-open";
970 +var siblingOpen = "sibling-open";
971 +var disabled = "disabled";
972 +var missing = "missing";
973 +var initial = "initial";
974 +var imperativeAction = "imperative-action";
975 +var swipe = "swipe";
976 +var windowResize = "window-resize";
977 +
978 +// node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs
979 +function createChangeEventDetails(reason, event, trigger, customProperties) {
980 + let canceled = false;
981 + let allowPropagation = false;
982 + const custom = customProperties ?? EMPTY_OBJECT;
983 + const details = {
984 + reason,
985 + event: event ?? new Event("base-ui"),
986 + cancel() {
987 + canceled = true;
988 + },
989 + allowPropagation() {
990 + allowPropagation = true;
991 + },
992 + get isCanceled() {
993 + return canceled;
994 + },
995 + get isPropagationAllowed() {
996 + return allowPropagation;
997 + },
998 + trigger,
999 + ...custom
1000 + };
1001 + return details;
1002 +}
1003 +
1004 +// node_modules/@base-ui/react/internals/useTransitionStatus.mjs
1005 +var React9 = __toESM(require_react(), 1);
1006 +
1007 +// node_modules/@base-ui/utils/useOnMount.mjs
1008 +var React8 = __toESM(require_react(), 1);
1009 +function useOnMount(fn) {
1010 + React8.useEffect(fn, EMPTY_ARRAY);
1011 +}
1012 +
1013 +// node_modules/@base-ui/utils/useAnimationFrame.mjs
1014 +var EMPTY = null;
1015 +var LAST_RAF = globalThis.requestAnimationFrame;
1016 +var Scheduler = class {
1017 + /* This implementation uses an array as a backing data-structure for frame callbacks.
1018 + * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it
1019 + * never calls the native `cancelAnimationFrame` if there are no frames left. This can
1020 + * be much more efficient if there is a call pattern that alterns as
1021 + * "request-cancel-request-cancel-…".
1022 + * But in the case of "request-request-…-cancel-cancel-…", it leaves the final animation
1023 + * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */
1024 + callbacks = [];
1025 + callbacksCount = 0;
1026 + nextId = 1;
1027 + startId = 1;
1028 + isScheduled = false;
1029 + tick = (timestamp) => {
1030 + this.isScheduled = false;
1031 + const currentCallbacks = this.callbacks;
1032 + const currentCallbacksCount = this.callbacksCount;
1033 + this.callbacks = [];
1034 + this.callbacksCount = 0;
1035 + this.startId = this.nextId;
1036 + if (currentCallbacksCount > 0) {
1037 + for (let i = 0; i < currentCallbacks.length; i += 1) {
1038 + currentCallbacks[i]?.(timestamp);
1039 + }
1040 + }
1041 + };
1042 + request(fn) {
1043 + const id = this.nextId;
1044 + this.nextId += 1;
1045 + this.callbacks.push(fn);
1046 + this.callbacksCount += 1;
1047 + const didRAFChange = LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);
1048 + if (!this.isScheduled || didRAFChange) {
1049 + requestAnimationFrame(this.tick);
1050 + this.isScheduled = true;
1051 + }
1052 + return id;
1053 + }
1054 + cancel(id) {
1055 + const index2 = id - this.startId;
1056 + if (index2 < 0 || index2 >= this.callbacks.length) {
1057 + return;
1058 + }
1059 + if (this.callbacks[index2] === null) {
1060 + return;
1061 + }
1062 + this.callbacks[index2] = null;
1063 + this.callbacksCount -= 1;
1064 + }
1065 +};
1066 +var scheduler = new Scheduler();
1067 +var AnimationFrame = class _AnimationFrame {
1068 + static create() {
1069 + return new _AnimationFrame();
1070 + }
1071 + static request(fn) {
1072 + return scheduler.request(fn);
1073 + }
1074 + static cancel(id) {
1075 + return scheduler.cancel(id);
1076 + }
1077 + currentId = EMPTY;
1078 + /**
1079 + * Executes `fn` after `delay`, clearing any previously scheduled call.
1080 + */
1081 + request(fn) {
1082 + this.cancel();
1083 + this.currentId = scheduler.request(() => {
1084 + this.currentId = EMPTY;
1085 + fn();
1086 + });
1087 + }
1088 + cancel = () => {
1089 + if (this.currentId !== EMPTY) {
1090 + scheduler.cancel(this.currentId);
1091 + this.currentId = EMPTY;
1092 + }
1093 + };
1094 + disposeEffect = () => {
1095 + return this.cancel;
1096 + };
1097 +};
1098 +function useAnimationFrame() {
1099 + const timeout = useRefWithInit(AnimationFrame.create).current;
1100 + useOnMount(timeout.disposeEffect);
1101 + return timeout;
1102 +}
1103 +
1104 +// node_modules/@base-ui/react/internals/useTransitionStatus.mjs
1105 +function useTransitionStatus(open2, enableIdleState = false, deferEndingState = false, animateInitialOpen = false) {
1106 + const [transitionStatus, setTransitionStatus] = React9.useState(open2 && enableIdleState ? "idle" : void 0);
1107 + const [mounted, setMounted] = React9.useState(open2 && !animateInitialOpen);
1108 + if (open2 && !mounted) {
1109 + setMounted(true);
1110 + setTransitionStatus("starting");
1111 + }
1112 + if (!open2 && mounted && transitionStatus !== "ending" && !deferEndingState) {
1113 + setTransitionStatus("ending");
1114 + }
1115 + if (!open2 && !mounted && transitionStatus === "ending") {
1116 + setTransitionStatus(void 0);
1117 + }
1118 + useIsoLayoutEffect(() => {
1119 + if (!open2 && mounted && transitionStatus !== "ending" && deferEndingState) {
1120 + const frame = AnimationFrame.request(() => {
1121 + setTransitionStatus("ending");
1122 + });
1123 + return () => {
1124 + AnimationFrame.cancel(frame);
1125 + };
1126 + }
1127 + return void 0;
1128 + }, [open2, mounted, transitionStatus, deferEndingState]);
1129 + useIsoLayoutEffect(() => {
1130 + if (!open2 || enableIdleState) {
1131 + return void 0;
1132 + }
1133 + const frame = AnimationFrame.request(() => {
1134 + setTransitionStatus(void 0);
1135 + });
1136 + return () => {
1137 + AnimationFrame.cancel(frame);
1138 + };
1139 + }, [enableIdleState, open2]);
1140 + useIsoLayoutEffect(() => {
1141 + if (!open2 || !enableIdleState) {
1142 + return void 0;
1143 + }
1144 + if (open2 && mounted && transitionStatus !== "idle") {
1145 + setTransitionStatus("starting");
1146 + }
1147 + const frame = AnimationFrame.request(() => {
1148 + setTransitionStatus("idle");
1149 + });
1150 + return () => {
1151 + AnimationFrame.cancel(frame);
1152 + };
1153 + }, [enableIdleState, open2, mounted, transitionStatus]);
1154 + return {
1155 + mounted,
1156 + setMounted,
1157 + transitionStatus
1158 + };
1159 +}
1160 +
1161 +// node_modules/@base-ui/react/internals/TransitionStatusDataAttributes.mjs
1162 +var startingStyle = "data-starting-style";
1163 +var endingStyle = "data-ending-style";
1164 +
1165 +// node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
1166 +var STARTING_HOOK = {
1167 + [startingStyle]: ""
1168 +};
1169 +var ENDING_HOOK = {
1170 + [endingStyle]: ""
1171 +};
1172 +var transitionStatusMapping = {
1173 + transitionStatus(value) {
1174 + if (value === "starting") {
1175 + return STARTING_HOOK;
1176 + }
1177 + if (value === "ending") {
1178 + return ENDING_HOOK;
1179 + }
1180 + return null;
1181 + }
1182 +};
1183 +
1184 +// node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
1185 +function hasWindow() {
1186 + return typeof window !== "undefined";
1187 +}
1188 +function getNodeName(node) {
1189 + if (isNode(node)) {
1190 + return (node.nodeName || "").toLowerCase();
1191 + }
1192 + return "#document";
1193 +}
1194 +function getWindow(node) {
1195 + var _node$ownerDocument;
1196 + return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1197 +}
1198 +function getDocumentElement(node) {
1199 + var _ref;
1200 + return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1201 +}
1202 +function isNode(value) {
1203 + if (!hasWindow()) {
1204 + return false;
1205 + }
1206 + return value instanceof Node || value instanceof getWindow(value).Node;
1207 +}
1208 +function isElement(value) {
1209 + if (!hasWindow()) {
1210 + return false;
1211 + }
1212 + return value instanceof Element || value instanceof getWindow(value).Element;
1213 +}
1214 +function isHTMLElement(value) {
1215 + if (!hasWindow()) {
1216 + return false;
1217 + }
1218 + return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1219 +}
1220 +function isShadowRoot(value) {
1221 + if (!hasWindow() || typeof ShadowRoot === "undefined") {
1222 + return false;
1223 + }
1224 + return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1225 +}
1226 +function isOverflowElement(element) {
1227 + const {
1228 + overflow,
1229 + overflowX,
1230 + overflowY,
1231 + display
1232 + } = getComputedStyle2(element);
1233 + return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
1234 +}
1235 +function isTableElement(element) {
1236 + return /^(table|td|th)$/.test(getNodeName(element));
1237 +}
1238 +function isTopLayer(element) {
1239 + try {
1240 + if (element.matches(":popover-open")) {
1241 + return true;
1242 + }
1243 + } catch (_e) {
1244 + }
1245 + try {
1246 + return element.matches(":modal");
1247 + } catch (_e) {
1248 + return false;
1249 + }
1250 +}
1251 +var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
1252 +var containRe = /paint|layout|strict|content/;
1253 +var isNotNone = (value) => !!value && value !== "none";
1254 +var isWebKitValue;
1255 +function isContainingBlock(elementOrCss) {
1256 + const css = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
1257 + 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 || "");
1258 +}
1259 +function getContainingBlock(element) {
1260 + let currentNode = getParentNode(element);
1261 + while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1262 + if (isContainingBlock(currentNode)) {
1263 + return currentNode;
1264 + } else if (isTopLayer(currentNode)) {
1265 + return null;
1266 + }
1267 + currentNode = getParentNode(currentNode);
1268 + }
1269 + return null;
1270 +}
1271 +function isWebKit() {
1272 + if (isWebKitValue == null) {
1273 + isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
1274 + }
1275 + return isWebKitValue;
1276 +}
1277 +function isLastTraversableNode(node) {
1278 + return /^(html|body|#document)$/.test(getNodeName(node));
1279 +}
1280 +function getComputedStyle2(element) {
1281 + return getWindow(element).getComputedStyle(element);
1282 +}
1283 +function getNodeScroll(element) {
1284 + if (isElement(element)) {
1285 + return {
1286 + scrollLeft: element.scrollLeft,
1287 + scrollTop: element.scrollTop
1288 + };
1289 + }
1290 + return {
1291 + scrollLeft: element.scrollX,
1292 + scrollTop: element.scrollY
1293 + };
1294 +}
1295 +function getParentNode(node) {
1296 + if (getNodeName(node) === "html") {
1297 + return node;
1298 + }
1299 + const result = (
1300 + // Step into the shadow DOM of the parent of a slotted node.
1301 + node.assignedSlot || // DOM Element detected.
1302 + node.parentNode || // ShadowRoot detected.
1303 + isShadowRoot(node) && node.host || // Fallback.
1304 + getDocumentElement(node)
1305 + );
1306 + return isShadowRoot(result) ? result.host : result;
1307 +}
1308 +function getNearestOverflowAncestor(node) {
1309 + const parentNode = getParentNode(node);
1310 + if (isLastTraversableNode(parentNode)) {
1311 + return (node.ownerDocument || node).body;
1312 + }
1313 + if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1314 + return parentNode;
1315 + }
1316 + return getNearestOverflowAncestor(parentNode);
1317 +}
1318 +function getOverflowAncestors(node, list, traverseIframes) {
1319 + var _node$ownerDocument2;
1320 + if (list === void 0) {
1321 + list = [];
1322 + }
1323 + if (traverseIframes === void 0) {
1324 + traverseIframes = true;
1325 + }
1326 + const scrollableAncestor = getNearestOverflowAncestor(node);
1327 + const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1328 + const win = getWindow(scrollableAncestor);
1329 + if (isBody) {
1330 + const frameElement = getFrameElement(win);
1331 + return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
1332 + } else {
1333 + return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1334 + }
1335 +}
1336 +function getFrameElement(win) {
1337 + return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
1338 +}
1339 +
1340 +// node_modules/@base-ui/utils/owner.mjs
1341 +function ownerDocument(node) {
1342 + return node?.ownerDocument || document;
1343 +}
1344 +
1345 +// node_modules/@base-ui/utils/addEventListener.mjs
1346 +function addEventListener(target, type, listener, options) {
1347 + target.addEventListener(type, listener, options);
1348 + return () => {
1349 + target.removeEventListener(type, listener, options);
1350 + };
1351 +}
1352 +
1353 +// node_modules/@base-ui/utils/useValueAsRef.mjs
1354 +function useValueAsRef(value) {
1355 + const latest = useRefWithInit(createLatestRef, value).current;
1356 + latest.next = value;
1357 + useIsoLayoutEffect(latest.effect);
1358 + return latest;
1359 +}
1360 +function createLatestRef(value) {
1361 + const latest = {
1362 + current: value,
1363 + next: value,
1364 + effect: () => {
1365 + latest.current = latest.next;
1366 + }
1367 + };
1368 + return latest;
1369 +}
1370 +
1371 +// node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
1372 +var React10 = __toESM(require_react(), 1);
1373 +
1374 +// node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
1375 +var ReactDOM = __toESM(require_react_dom(), 1);
1376 +
1377 +// node_modules/@base-ui/react/utils/resolveRef.mjs
1378 +function resolveRef(maybeRef) {
1379 + if (maybeRef == null) {
1380 + return maybeRef;
1381 + }
1382 + return "current" in maybeRef ? maybeRef.current : maybeRef;
1383 +}
1384 +
1385 +// node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
1386 +var pendingCallbacks = null;
1387 +function flushBeforePaint(fn) {
1388 + if (!pendingCallbacks) {
1389 + const callbacks = [];
1390 + pendingCallbacks = callbacks;
1391 + queueMicrotask(() => {
1392 + pendingCallbacks = null;
1393 + ReactDOM.flushSync(() => {
1394 + for (const callback of callbacks) {
1395 + callback();
1396 + }
1397 + });
1398 + });
1399 + }
1400 + pendingCallbacks.push(fn);
1401 +}
1402 +function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, batch = false) {
1403 + const frame = useAnimationFrame();
1404 + return useStableCallback((fnToExecute, signal = null) => {
1405 + frame.cancel();
1406 + const element = resolveRef(elementOrRef);
1407 + if (element == null) {
1408 + return;
1409 + }
1410 + const resolvedElement = element;
1411 + const done = () => {
1412 + if (!batch) {
1413 + ReactDOM.flushSync(fnToExecute);
1414 + return;
1415 + }
1416 + flushBeforePaint(() => {
1417 + if (!signal?.aborted) {
1418 + fnToExecute();
1419 + }
1420 + });
1421 + };
1422 + if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
1423 + fnToExecute();
1424 + return;
1425 + }
1426 + function exec() {
1427 + Promise.all(resolvedElement.getAnimations().map((animation) => animation.finished)).then(() => {
1428 + if (!signal?.aborted) {
1429 + done();
1430 + }
1431 + }, () => {
1432 + if (signal?.aborted) {
1433 + return;
1434 + }
1435 + const currentAnimations = resolvedElement.getAnimations();
1436 + if (currentAnimations.some((animation) => animation.pending || animation.playState !== "finished")) {
1437 + exec();
1438 + return;
1439 + }
1440 + done();
1441 + });
1442 + }
1443 + if (waitForStartingStyleRemoved) {
1444 + const startingStyleAttribute = startingStyle;
1445 + if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1446 + frame.request(exec);
1447 + return;
1448 + }
1449 + const attributeObserver = new MutationObserver(() => {
1450 + if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1451 + attributeObserver.disconnect();
1452 + exec();
1453 + }
1454 + });
1455 + attributeObserver.observe(resolvedElement, {
1456 + attributes: true,
1457 + attributeFilter: [startingStyleAttribute]
1458 + });
1459 + signal?.addEventListener("abort", () => attributeObserver.disconnect(), {
1460 + once: true
1461 + });
1462 + return;
1463 + }
1464 + frame.request(exec);
1465 + });
1466 +}
1467 +
1468 +// node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
1469 +function useOpenChangeComplete(parameters) {
1470 + const {
1471 + enabled = true,
1472 + open: open2,
1473 + ref,
1474 + batch = false,
1475 + onComplete: onCompleteParam
1476 + } = parameters;
1477 + const onComplete = useStableCallback(onCompleteParam);
1478 + const runOnceAnimationsFinish = useAnimationsFinished(ref, open2, batch);
1479 + React10.useEffect(() => {
1480 + if (!enabled) {
1481 + return void 0;
1482 + }
1483 + const abortController = new AbortController();
1484 + runOnceAnimationsFinish(onComplete, abortController.signal);
1485 + return () => {
1486 + abortController.abort();
1487 + };
1488 + }, [enabled, open2, onComplete, runOnceAnimationsFinish]);
1489 +}
1490 +
1491 +// node_modules/@base-ui/utils/platform/parts.mjs
1492 +var parts_exports = {};
1493 +__export(parts_exports, {
1494 + engine: () => engine_exports,
1495 + env: () => env_exports,
1496 + mediaQuery: () => media_query_exports,
1497 + os: () => os_exports,
1498 + screenReader: () => screen_reader_exports
1499 +});
1500 +
1501 +// node_modules/@base-ui/utils/platform/os.mjs
1502 +var os_exports = {};
1503 +__export(os_exports, {
1504 + android: () => android,
1505 + apple: () => apple,
1506 + ios: () => ios,
1507 + linux: () => linux,
1508 + mac: () => mac,
1509 + windows: () => windows
1510 +});
1511 +
1512 +// node_modules/@base-ui/utils/platform/shared.mjs
1513 +function readRawData() {
1514 + if (typeof navigator === "undefined") {
1515 + return {
1516 + userAgent: "",
1517 + platform: "",
1518 + maxTouchPoints: 0
1519 + };
1520 + }
1521 + if (true) {
1522 + const uaData = navigator.userAgentData;
1523 + if (uaData && Array.isArray(uaData.brands)) {
1524 + return {
1525 + userAgent: uaData.brands.map(({
1526 + brand,
1527 + version: version2
1528 + }) => `${brand}/${version2}`).join(" "),
1529 + platform: uaData.platform ?? navigator.platform ?? "",
1530 + maxTouchPoints: navigator.maxTouchPoints ?? 0
1531 + };
1532 + }
1533 + }
1534 + return {
1535 + userAgent: navigator.userAgent,
1536 + platform: navigator.platform ?? "",
1537 + maxTouchPoints: navigator.maxTouchPoints ?? 0
1538 + };
1539 +}
1540 +var {
1541 + userAgent,
1542 + platform,
1543 + maxTouchPoints
1544 +} = readRawData();
1545 +var lowerUserAgent = userAgent.toLowerCase();
1546 +var lowerPlatform = platform.toLowerCase();
1547 +
1548 +// node_modules/@base-ui/utils/platform/os.mjs
1549 +var ios = /^i(os$|p)/.test(lowerPlatform) || lowerPlatform === "macintel" && maxTouchPoints > 1;
1550 +var ANDROID_STRING = "android";
1551 +var android = lowerPlatform === ANDROID_STRING || lowerUserAgent.includes(ANDROID_STRING);
1552 +var mac = !ios && lowerPlatform.startsWith("mac");
1553 +var windows = lowerPlatform.startsWith("win");
1554 +var linux = !android && /^(linux|chrome os)/.test(lowerPlatform);
1555 +var apple = mac || ios;
1556 +
1557 +// node_modules/@base-ui/utils/platform/engine.mjs
1558 +var engine_exports = {};
1559 +__export(engine_exports, {
1560 + blink: () => blink,
1561 + gecko: () => gecko,
1562 + webkit: () => webkit
1563 +});
1564 +var webkit = typeof CSS !== "undefined" && !!CSS.supports?.("-webkit-backdrop-filter:none");
1565 +var gecko = !webkit && lowerUserAgent.includes("firefox");
1566 +var blink = !webkit && lowerUserAgent.includes("chrom");
1567 +
1568 +// node_modules/@base-ui/utils/platform/screen-reader.mjs
1569 +var screen_reader_exports = {};
1570 +__export(screen_reader_exports, {
1571 + voiceOver: () => voiceOver
1572 +});
1573 +var voiceOver = apple;
1574 +
1575 +// node_modules/@base-ui/utils/platform/env.mjs
1576 +var env_exports = {};
1577 +__export(env_exports, {
1578 + jsdom: () => jsdom
1579 +});
1580 +var jsdom = /jsdom|happydom/.test(lowerUserAgent);
1581 +
1582 +// node_modules/@base-ui/utils/platform/media-query.mjs
1583 +var media_query_exports = {};
1584 +__export(media_query_exports, {
1585 + iOS: () => iOS
1586 +});
1587 +var iOS = "@supports (-webkit-touch-callout: none)";
1588 +
1589 +// node_modules/@base-ui/utils/useTimeout.mjs
1590 +var EMPTY2 = 0;
1591 +var Timeout = class _Timeout {
1592 + static create() {
1593 + return new _Timeout();
1594 + }
1595 + currentId = EMPTY2;
1596 + /**
1597 + * Executes `fn` after `delay`, clearing any previously scheduled call.
1598 + */
1599 + start(delay, fn) {
1600 + this.clear();
1601 + this.currentId = setTimeout(() => {
1602 + this.currentId = EMPTY2;
1603 + fn();
1604 + }, delay);
1605 + }
1606 + isStarted() {
1607 + return this.currentId !== EMPTY2;
1608 + }
1609 + clear = () => {
1610 + if (this.currentId !== EMPTY2) {
1611 + clearTimeout(this.currentId);
1612 + this.currentId = EMPTY2;
1613 + }
1614 + };
1615 + disposeEffect = () => {
1616 + return this.clear;
1617 + };
1618 +};
1619 +function useTimeout() {
1620 + const timeout = useRefWithInit(Timeout.create).current;
1621 + useOnMount(timeout.disposeEffect);
1622 + return timeout;
1623 +}
1624 +
1625 +// node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
1626 +var React11 = __toESM(require_react(), 1);
1627 +
1628 +// node_modules/@base-ui/react/floating-ui-react/utils/event.mjs
1629 +function isReactEvent(event) {
1630 + return "nativeEvent" in event;
1631 +}
1632 +function isVirtualClick(event) {
1633 + if (event.pointerType === "" && event.isTrusted) {
1634 + return true;
1635 + }
1636 + if (parts_exports.os.android && event.pointerType) {
1637 + return event.type === "click" && event.buttons === 1;
1638 + }
1639 + return event.detail === 0 && !event.pointerType;
1640 +}
1641 +function isMouseLikePointerType(pointerType, strict) {
1642 + const values = ["mouse", "pen"];
1643 + if (!strict) {
1644 + values.push("", void 0);
1645 + }
1646 + return values.includes(pointerType);
1647 +}
1648 +function isClickLikeEvent(event) {
1649 + const type = event.type;
1650 + return type === "click" || type === "mousedown" || type === "keydown" || type === "keyup";
1651 +}
1652 +
1653 +// node_modules/@base-ui/utils/shadowDom.mjs
1654 +function activeElement(doc) {
1655 + let element = doc.activeElement;
1656 + while (element?.shadowRoot?.activeElement != null) {
1657 + element = element.shadowRoot.activeElement;
1658 + }
1659 + return element;
1660 +}
1661 +function contains(parent, child) {
1662 + if (!parent || !child) {
1663 + return false;
1664 + }
1665 + const rootNode = child.getRootNode?.();
1666 + if (parent.contains(child)) {
1667 + return true;
1668 + }
1669 + if (rootNode && isShadowRoot(rootNode)) {
1670 + let next = child;
1671 + while (next) {
1672 + if (parent === next) {
1673 + return true;
1674 + }
1675 + next = next.parentNode || next.host;
1676 + }
1677 + }
1678 + return false;
1679 +}
1680 +function getTarget(event) {
1681 + if ("composedPath" in event) {
1682 + return event.composedPath()[0] ?? event.target;
1683 + }
1684 + return event.target;
1685 +}
1686 +
1687 +// node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs
1688 +var FOCUSABLE_ATTRIBUTE = "data-base-ui-focusable";
1689 +var TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
1690 +
1691 +// node_modules/@base-ui/react/utils/CommonPopupDataAttributes.mjs
1692 +var open = "data-open";
1693 +var closed = "data-closed";
1694 +var anchorHidden = "data-anchor-hidden";
1695 +
1696 +// node_modules/@base-ui/react/utils/CommonTriggerDataAttributes.mjs
1697 +var CommonTriggerDataAttributes_exports = {};
1698 +__export(CommonTriggerDataAttributes_exports, {
1699 + popupOpen: () => popupOpen,
1700 + pressed: () => pressed
1701 +});
1702 +var popupOpen = "data-popup-open";
1703 +var pressed = "data-pressed";
1704 +
1705 +// node_modules/@base-ui/react/utils/popupStateMapping.mjs
1706 +var TRIGGER_HOOK = {
1707 + [popupOpen]: ""
1708 +};
1709 +var PRESSABLE_TRIGGER_HOOK = {
1710 + [popupOpen]: "",
1711 + [pressed]: ""
1712 +};
1713 +var POPUP_OPEN_HOOK = {
1714 + [open]: ""
1715 +};
1716 +var POPUP_CLOSED_HOOK = {
1717 + [closed]: ""
1718 +};
1719 +var ANCHOR_HIDDEN_HOOK = {
1720 + [anchorHidden]: ""
1721 +};
1722 +var triggerOpenStateMapping = {
1723 + open(value) {
1724 + if (value) {
1725 + return TRIGGER_HOOK;
1726 + }
1727 + return null;
1728 + }
1729 +};
1730 +var popupStateMapping = {
1731 + open(value) {
1732 + if (value) {
1733 + return POPUP_OPEN_HOOK;
1734 + }
1735 + return POPUP_CLOSED_HOOK;
1736 + },
1737 + anchorHidden(value) {
1738 + if (value) {
1739 + return ANCHOR_HIDDEN_HOOK;
1740 + }
1741 + return null;
1742 + }
1743 +};
1744 +var popupTransitionStateMapping = {
1745 + ...popupStateMapping,
1746 + ...transitionStatusMapping
1747 +};
1748 +
1749 +// node_modules/@base-ui/react/tooltip/trigger/TooltipTriggerDataAttributes.mjs
1750 +var popupOpen2 = CommonTriggerDataAttributes_exports.popupOpen;
1751 +var triggerDisabled = "data-trigger-disabled";
1752 +
1753 +// node_modules/@base-ui/react/floating-ui-react/utils/element.mjs
1754 +function isTargetInsideEnabledTrigger(target, triggerElements) {
1755 + if (!isElement(target)) {
1756 + return false;
1757 + }
1758 + const targetElement = target;
1759 + if (triggerElements.hasElement(targetElement)) {
1760 + return !targetElement.hasAttribute(triggerDisabled);
1761 + }
1762 + for (const [, trigger] of triggerElements.entries()) {
1763 + if (contains(trigger, targetElement)) {
1764 + return !trigger.hasAttribute(triggerDisabled);
1765 + }
1766 + }
1767 + return false;
1768 +}
1769 +function isEventTargetWithin(event, node) {
1770 + if (node == null) {
1771 + return false;
1772 + }
1773 + if ("composedPath" in event) {
1774 + return event.composedPath().includes(node);
1775 + }
1776 + const eventAgain = event;
1777 + return eventAgain.target != null && node.contains(eventAgain.target);
1778 +}
1779 +function isRootElement(element) {
1780 + return element.matches("html,body");
1781 +}
1782 +function isTypeableElement(element) {
1783 + return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);
1784 +}
1785 +function isInteractiveElement(element) {
1786 + return element?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${TYPEABLE_SELECTOR}`) != null;
1787 +}
1788 +function matchesFocusVisible(element) {
1789 + if (!element || parts_exports.env.jsdom) {
1790 + return true;
1791 + }
1792 + try {
1793 + return element.matches(":focus-visible");
1794 + } catch (_e) {
1795 + return true;
1796 + }
1797 +}
1798 +
1799 +// node_modules/@base-ui/react/floating-ui-react/hooks/useHoverShared.mjs
1800 +function resolveValue(value, pointerType) {
1801 + if (pointerType != null && !isMouseLikePointerType(pointerType)) {
1802 + return 0;
1803 + }
1804 + if (typeof value === "function") {
1805 + return value();
1806 + }
1807 + return value;
1808 +}
1809 +function getDelay(value, prop, pointerType) {
1810 + const result = resolveValue(value, pointerType);
1811 + if (typeof result === "number") {
1812 + return result;
1813 + }
1814 + return result?.[prop];
1815 +}
1816 +function getRestMs(value) {
1817 + if (typeof value === "function") {
1818 + return value();
1819 + }
1820 + return value;
1821 +}
1822 +function isClickLikeOpenEvent(openEventType, interactedInside) {
1823 + return interactedInside || openEventType === "click" || openEventType === "mousedown";
1824 +}
1825 +function isHoverOpenEvent(openEventType) {
1826 + return openEventType?.includes("mouse") && openEventType !== "mousedown";
1827 +}
1828 +
1829 +// node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
1830 +var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
1831 +var FloatingDelayGroupContext = /* @__PURE__ */ React11.createContext({
1832 + hasProvider: false,
1833 + timeoutMs: 0,
1834 + delayRef: {
1835 + current: 0
1836 + },
1837 + initialDelayRef: {
1838 + current: 0
1839 + },
1840 + timeout: new Timeout(),
1841 + currentIdRef: {
1842 + current: null
1843 + },
1844 + currentContextRef: {
1845 + current: null
1846 + }
1847 +});
1848 +if (true) FloatingDelayGroupContext.displayName = "FloatingDelayGroupContext";
1849 +function resetDelayRef(delayRef, initialDelayRef) {
1850 + delayRef.current = initialDelayRef.current;
1851 +}
1852 +function FloatingDelayGroup(props) {
1853 + const {
1854 + children,
1855 + delay,
1856 + timeoutMs = 0
1857 + } = props;
1858 + const delayRef = React11.useRef(delay);
1859 + const initialDelayRef = React11.useRef(delay);
1860 + const currentIdRef = React11.useRef(null);
1861 + const currentContextRef = React11.useRef(null);
1862 + const timeout = useTimeout();
1863 + useIsoLayoutEffect(() => {
1864 + initialDelayRef.current = delay;
1865 + if (!currentIdRef.current) {
1866 + delayRef.current = delay;
1867 + return;
1868 + }
1869 + delayRef.current = {
1870 + open: getDelay(delayRef.current, "open"),
1871 + close: getDelay(delay, "close")
1872 + };
1873 + }, [delay, currentIdRef, delayRef, initialDelayRef]);
1874 + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FloatingDelayGroupContext.Provider, {
1875 + value: React11.useMemo(() => ({
1876 + hasProvider: true,
1877 + delayRef,
1878 + initialDelayRef,
1879 + currentIdRef,
1880 + timeoutMs,
1881 + currentContextRef,
1882 + timeout
1883 + }), [timeoutMs, timeout]),
1884 + children
1885 + });
1886 +}
1887 +function useDelayGroup(context, options = {
1888 + open: false
1889 +}) {
1890 + const {
1891 + open: open2
1892 + } = options;
1893 + const store2 = "rootStore" in context ? context.rootStore : context;
1894 + const floatingId = store2.useState("floatingId");
1895 + const groupContext = React11.useContext(FloatingDelayGroupContext);
1896 + const {
1897 + currentIdRef,
1898 + delayRef,
1899 + timeoutMs,
1900 + initialDelayRef,
1901 + currentContextRef,
1902 + hasProvider,
1903 + timeout
1904 + } = groupContext;
1905 + const [isInstantPhase, setIsInstantPhase] = React11.useState(false);
1906 + const openRef = React11.useRef(open2);
1907 + useIsoLayoutEffect(() => {
1908 + openRef.current = open2;
1909 + }, [open2]);
1910 + useIsoLayoutEffect(() => {
1911 + function unset() {
1912 + currentContextRef.current?.setIsInstantPhase(false);
1913 + currentIdRef.current = null;
1914 + currentContextRef.current = null;
1915 + delayRef.current = initialDelayRef.current;
1916 + timeout.clear();
1917 + }
1918 + if (!currentIdRef.current) {
1919 + return void 0;
1920 + }
1921 + if (!open2 && currentIdRef.current === floatingId) {
1922 + setIsInstantPhase(false);
1923 + if (timeoutMs) {
1924 + const closingId = floatingId;
1925 + timeout.start(timeoutMs, () => {
1926 + if (store2.select("open") || currentIdRef.current && currentIdRef.current !== closingId) {
1927 + return;
1928 + }
1929 + unset();
1930 + });
1931 + return () => {
1932 + if (openRef.current || currentIdRef.current !== closingId) {
1933 + timeout.clear();
1934 + }
1935 + };
1936 + }
1937 + unset();
1938 + }
1939 + return void 0;
1940 + }, [open2, floatingId, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeout, store2]);
1941 + useIsoLayoutEffect(() => {
1942 + if (!open2) {
1943 + return;
1944 + }
1945 + const prevContext = currentContextRef.current;
1946 + const prevId = currentIdRef.current;
1947 + timeout.clear();
1948 + currentContextRef.current = {
1949 + onOpenChange: store2.setOpen,
1950 + setIsInstantPhase
1951 + };
1952 + currentIdRef.current = floatingId;
1953 + delayRef.current = {
1954 + open: 0,
1955 + close: getDelay(initialDelayRef.current, "close")
1956 + };
1957 + if (prevId !== null && prevId !== floatingId) {
1958 + setIsInstantPhase(true);
1959 + prevContext?.setIsInstantPhase(true);
1960 + prevContext?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.none));
1961 + } else {
1962 + setIsInstantPhase(false);
1963 + prevContext?.setIsInstantPhase(false);
1964 + }
1965 + }, [open2, floatingId, store2, currentIdRef, delayRef, initialDelayRef, currentContextRef, timeout]);
1966 + useIsoLayoutEffect(() => {
1967 + return () => {
1968 + if (currentIdRef.current === floatingId) {
1969 + currentContextRef.current = null;
1970 + if (!openRef.current) {
1971 + return;
1972 + }
1973 + currentIdRef.current = null;
1974 + resetDelayRef(delayRef, initialDelayRef);
1975 + timeout.clear();
1976 + }
1977 + };
1978 + }, [currentContextRef, currentIdRef, delayRef, floatingId, initialDelayRef, timeout]);
1979 + return React11.useMemo(() => ({
1980 + activeIdRef: currentIdRef,
1981 + hasProvider,
1982 + delayRef,
1983 + isInstantPhase
1984 + }), [currentIdRef, hasProvider, delayRef, isInstantPhase]);
1985 +}
1986 +
1987 +// node_modules/@base-ui/utils/mergeCleanups.mjs
1988 +function mergeCleanups(...cleanups) {
1989 + return () => {
1990 + for (let i = 0; i < cleanups.length; i += 1) {
1991 + const cleanup = cleanups[i];
1992 + if (cleanup) {
1993 + cleanup();
1994 + }
1995 + }
1996 + };
1997 +}
1998 +
1999 +// node_modules/@base-ui/react/utils/FocusGuard.mjs
2000 +var React12 = __toESM(require_react(), 1);
2001 +
2002 +// node_modules/@base-ui/utils/visuallyHidden.mjs
2003 +var visuallyHiddenBase = {
2004 + clipPath: "inset(50%)",
2005 + overflow: "hidden",
2006 + whiteSpace: "nowrap",
2007 + border: 0,
2008 + padding: 0,
2009 + width: 1,
2010 + height: 1,
2011 + margin: -1
2012 +};
2013 +var visuallyHidden = {
2014 + ...visuallyHiddenBase,
2015 + position: "fixed",
2016 + top: 0,
2017 + left: 0
2018 +};
2019 +var visuallyHiddenInput = {
2020 + ...visuallyHiddenBase,
2021 + position: "absolute"
2022 +};
2023 +
2024 +// node_modules/@base-ui/react/utils/FocusGuard.mjs
2025 +var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
2026 +var FocusGuard = /* @__PURE__ */ React12.forwardRef(function FocusGuard2(props, ref) {
2027 + const [role, setRole] = React12.useState();
2028 + useIsoLayoutEffect(() => {
2029 + if (parts_exports.screenReader.voiceOver && parts_exports.engine.webkit) {
2030 + setRole("button");
2031 + }
2032 + }, []);
2033 + const restProps = {
2034 + tabIndex: 0,
2035 + // Role is only for VoiceOver
2036 + role
2037 + };
2038 + return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", {
2039 + ...props,
2040 + ref,
2041 + style: visuallyHidden,
2042 + "aria-hidden": role ? void 0 : true,
2043 + ...restProps,
2044 + "data-base-ui-focus-guard": ""
2045 + });
2046 +});
2047 +if (true) FocusGuard.displayName = "FocusGuard";
2048 +
2049 +// node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
2050 +var min = Math.min;
2051 +var max = Math.max;
2052 +var round = Math.round;
2053 +var floor = Math.floor;
2054 +var createCoords = (v) => ({
2055 + x: v,
2056 + y: v
2057 +});
2058 +var oppositeSideMap = {
2059 + left: "right",
2060 + right: "left",
2061 + bottom: "top",
2062 + top: "bottom"
2063 +};
2064 +function clamp(start, value, end) {
2065 + return max(start, min(value, end));
2066 +}
2067 +function evaluate(value, param) {
2068 + return typeof value === "function" ? value(param) : value;
2069 +}
2070 +function getSide(placement) {
2071 + return placement.split("-")[0];
2072 +}
2073 +function getAlignment(placement) {
2074 + return placement.split("-")[1];
2075 +}
2076 +function getOppositeAxis(axis) {
2077 + return axis === "x" ? "y" : "x";
2078 +}
2079 +function getAxisLength(axis) {
2080 + return axis === "y" ? "height" : "width";
2081 +}
2082 +function getSideAxis(placement) {
2083 + const firstChar = placement[0];
2084 + return firstChar === "t" || firstChar === "b" ? "y" : "x";
2085 +}
2086 +function getAlignmentAxis(placement) {
2087 + return getOppositeAxis(getSideAxis(placement));
2088 +}
2089 +function getAlignmentSides(placement, rects, rtl) {
2090 + if (rtl === void 0) {
2091 + rtl = false;
2092 + }
2093 + const alignment = getAlignment(placement);
2094 + const alignmentAxis = getAlignmentAxis(placement);
2095 + const length = getAxisLength(alignmentAxis);
2096 + let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
2097 + if (rects.reference[length] > rects.floating[length]) {
2098 + mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
2099 + }
2100 + return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
2101 +}
2102 +function getExpandedPlacements(placement) {
2103 + const oppositePlacement = getOppositePlacement(placement);
2104 + return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
2105 +}
2106 +function getOppositeAlignmentPlacement(placement) {
2107 + return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
2108 +}
2109 +var lrPlacement = ["left", "right"];
2110 +var rlPlacement = ["right", "left"];
2111 +var tbPlacement = ["top", "bottom"];
2112 +var btPlacement = ["bottom", "top"];
2113 +function getSideList(side, isStart, rtl) {
2114 + switch (side) {
2115 + case "top":
2116 + case "bottom":
2117 + if (rtl) return isStart ? rlPlacement : lrPlacement;
2118 + return isStart ? lrPlacement : rlPlacement;
2119 + case "left":
2120 + case "right":
2121 + return isStart ? tbPlacement : btPlacement;
2122 + default:
2123 + return [];
2124 + }
2125 +}
2126 +function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
2127 + const alignment = getAlignment(placement);
2128 + let list = getSideList(getSide(placement), direction === "start", rtl);
2129 + if (alignment) {
2130 + list = list.map((side) => side + "-" + alignment);
2131 + if (flipAlignment) {
2132 + list = list.concat(list.map(getOppositeAlignmentPlacement));
2133 + }
2134 + }
2135 + return list;
2136 +}
2137 +function getOppositePlacement(placement) {
2138 + const side = getSide(placement);
2139 + return oppositeSideMap[side] + placement.slice(side.length);
2140 +}
2141 +function expandPaddingObject(padding) {
2142 + var _padding$top, _padding$right, _padding$bottom, _padding$left;
2143 + return {
2144 + top: (_padding$top = padding.top) != null ? _padding$top : 0,
2145 + right: (_padding$right = padding.right) != null ? _padding$right : 0,
2146 + bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
2147 + left: (_padding$left = padding.left) != null ? _padding$left : 0
2148 + };
2149 +}
2150 +function getPaddingObject(padding) {
2151 + return typeof padding !== "number" ? expandPaddingObject(padding) : {
2152 + top: padding,
2153 + right: padding,
2154 + bottom: padding,
2155 + left: padding
2156 + };
2157 +}
2158 +function rectToClientRect(rect) {
2159 + const {
2160 + x,
2161 + y,
2162 + width,
2163 + height
2164 + } = rect;
2165 + return {
2166 + width,
2167 + height,
2168 + top: y,
2169 + left: x,
2170 + right: x + width,
2171 + bottom: y + height,
2172 + x,
2173 + y
2174 + };
2175 +}
2176 +
2177 +// node_modules/@base-ui/react/floating-ui-react/utils/composite.mjs
2178 +function isHiddenByStyles(styles) {
2179 + return styles.visibility === "hidden" || styles.visibility === "collapse";
2180 +}
2181 +function isElementVisible(element, styles = element ? getComputedStyle2(element) : null) {
2182 + if (!element || !element.isConnected || !styles || isHiddenByStyles(styles)) {
2183 + return false;
2184 + }
2185 + if (typeof element.checkVisibility === "function") {
2186 + return element.checkVisibility();
2187 + }
2188 + return styles.display !== "none" && styles.display !== "contents";
2189 +}
2190 +
2191 +// node_modules/@base-ui/react/floating-ui-react/utils/tabbable.mjs
2192 +var CANDIDATE_SELECTOR = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';
2193 +function getParentElement(element) {
2194 + const assignedSlot = element.assignedSlot;
2195 + if (assignedSlot) {
2196 + return assignedSlot;
2197 + }
2198 + if (element.parentElement) {
2199 + return element.parentElement;
2200 + }
2201 + const rootNode = element.getRootNode();
2202 + return isShadowRoot(rootNode) ? rootNode.host : null;
2203 +}
2204 +function getDetailsSummary(details) {
2205 + for (const child of Array.from(details.children)) {
2206 + if (getNodeName(child) === "summary") {
2207 + return child;
2208 + }
2209 + }
2210 + return null;
2211 +}
2212 +function isWithinOpenDetailsSummary(element, details) {
2213 + const summary = getDetailsSummary(details);
2214 + return !!summary && (element === summary || contains(summary, element));
2215 +}
2216 +function isFocusableCandidate(element) {
2217 + const nodeName = element ? getNodeName(element) : "";
2218 + 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");
2219 +}
2220 +function isFocusableElement(element) {
2221 + if (!isFocusableCandidate(element) || !element.isConnected || element.matches(":disabled")) {
2222 + return false;
2223 + }
2224 + for (let current = element; current; current = getParentElement(current)) {
2225 + const isAncestor = current !== element;
2226 + const isSlot = getNodeName(current) === "slot";
2227 + if (current.hasAttribute("inert")) {
2228 + return false;
2229 + }
2230 + if (isAncestor && getNodeName(current) === "details" && !current.open && !isWithinOpenDetailsSummary(element, current) || current.hasAttribute("hidden") || !isSlot && !isVisibleInTabbableTree(current, isAncestor)) {
2231 + return false;
2232 + }
2233 + }
2234 + return true;
2235 +}
2236 +function isVisibleInTabbableTree(element, isAncestor) {
2237 + const styles = getComputedStyle2(element);
2238 + if (!isAncestor) {
2239 + return isElementVisible(element, styles);
2240 + }
2241 + return styles.display !== "none";
2242 +}
2243 +function getTabIndex(element) {
2244 + const tabIndex = element.tabIndex;
2245 + if (tabIndex < 0) {
2246 + const nodeName = getNodeName(element);
2247 + if (nodeName === "details" || nodeName === "audio" || nodeName === "video" || isHTMLElement(element) && element.isContentEditable) {
2248 + return 0;
2249 + }
2250 + }
2251 + return tabIndex;
2252 +}
2253 +function getNamedRadioInput(element) {
2254 + if (getNodeName(element) !== "input") {
2255 + return null;
2256 + }
2257 + const input = element;
2258 + return input.type === "radio" && input.name !== "" ? input : null;
2259 +}
2260 +function isTabbableRadio(element, candidates) {
2261 + const input = getNamedRadioInput(element);
2262 + if (!input) {
2263 + return true;
2264 + }
2265 + const checkedRadio = candidates.find((candidate) => {
2266 + const radio = getNamedRadioInput(candidate);
2267 + return radio?.name === input.name && radio.form === input.form && radio.checked;
2268 + });
2269 + if (checkedRadio) {
2270 + return checkedRadio === input;
2271 + }
2272 + return candidates.find((candidate) => {
2273 + const radio = getNamedRadioInput(candidate);
2274 + return radio?.name === input.name && radio.form === input.form;
2275 + }) === input;
2276 +}
2277 +function getComposedChildren(container) {
2278 + if (isHTMLElement(container) && getNodeName(container) === "slot") {
2279 + const assignedElements = container.assignedElements({
2280 + flatten: true
2281 + });
2282 + if (assignedElements.length > 0) {
2283 + return assignedElements;
2284 + }
2285 + }
2286 + if (isHTMLElement(container) && container.shadowRoot) {
2287 + return Array.from(container.shadowRoot.children);
2288 + }
2289 + return Array.from(container.children);
2290 +}
2291 +function appendCandidates(container, list) {
2292 + getComposedChildren(container).forEach((child) => {
2293 + if (isFocusableCandidate(child)) {
2294 + list.push(child);
2295 + }
2296 + appendCandidates(child, list);
2297 + });
2298 +}
2299 +function appendMatchingElements(container, selector, list) {
2300 + getComposedChildren(container).forEach((child) => {
2301 + if (isHTMLElement(child) && child.matches(selector)) {
2302 + list.push(child);
2303 + }
2304 + appendMatchingElements(child, selector, list);
2305 + });
2306 +}
2307 +function focusable(container) {
2308 + const candidates = [];
2309 + appendCandidates(container, candidates);
2310 + return candidates.filter(isFocusableElement);
2311 +}
2312 +function tabbable(container) {
2313 + const candidates = focusable(container);
2314 + return candidates.filter((element) => getTabIndex(element) >= 0 && isTabbableRadio(element, candidates));
2315 +}
2316 +function getTabbableIn(container, dir) {
2317 + const list = tabbable(container);
2318 + const len = list.length;
2319 + if (len === 0) {
2320 + return void 0;
2321 + }
2322 + const active = activeElement(ownerDocument(container));
2323 + const index2 = list.indexOf(active);
2324 + const nextIndex = index2 === -1 ? dir === 1 ? 0 : len - 1 : index2 + dir;
2325 + return list[nextIndex];
2326 +}
2327 +function getNextTabbable(referenceElement) {
2328 + return getTabbableIn(ownerDocument(referenceElement).body, 1) || referenceElement;
2329 +}
2330 +function getPreviousTabbable(referenceElement) {
2331 + return getTabbableIn(ownerDocument(referenceElement).body, -1) || referenceElement;
2332 +}
2333 +function isOutsideEvent(event, container) {
2334 + const containerElement = container || event.currentTarget;
2335 + const relatedTarget = event.relatedTarget;
2336 + return !relatedTarget || !contains(containerElement, relatedTarget);
2337 +}
2338 +function disableFocusInside(container) {
2339 + const tabbableElements = tabbable(container);
2340 + tabbableElements.forEach((element) => {
2341 + element.dataset.tabindex = element.getAttribute("tabindex") || "";
2342 + element.setAttribute("tabindex", "-1");
2343 + });
2344 +}
2345 +function enableFocusInside(container) {
2346 + const elements = [];
2347 + appendMatchingElements(container, "[data-tabindex]", elements);
2348 + elements.forEach((element) => {
2349 + const tabindex = element.dataset.tabindex;
2350 + delete element.dataset.tabindex;
2351 + if (tabindex) {
2352 + element.setAttribute("tabindex", tabindex);
2353 + } else {
2354 + element.removeAttribute("tabindex");
2355 + }
2356 + });
2357 +}
2358 +
2359 +// node_modules/@base-ui/react/floating-ui-react/utils/nodes.mjs
2360 +function getNodeChildren(nodes, id, onlyOpenChildren = true) {
2361 + const directChildren = nodes.filter((node) => node.parentId === id);
2362 + return directChildren.flatMap((child) => [...!onlyOpenChildren || child.context?.open ? [child] : [], ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);
2363 +}
2364 +
2365 +// node_modules/@base-ui/react/floating-ui-react/utils/createAttribute.mjs
2366 +function createAttribute(name) {
2367 + return `data-base-ui-${name}`;
2368 +}
2369 +
2370 +// node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
2371 +var React13 = __toESM(require_react(), 1);
2372 +var ReactDOM2 = __toESM(require_react_dom(), 1);
2373 +
2374 +// node_modules/@base-ui/react/internals/constants.mjs
2375 +var DISABLED_TRANSITIONS_STYLE = {
2376 + style: {
2377 + transition: "none"
2378 + }
2379 +};
2380 +var BASE_UI_SWIPE_IGNORE_ATTRIBUTE = "data-base-ui-swipe-ignore";
2381 +var LEGACY_SWIPE_IGNORE_ATTRIBUTE = "data-swipe-ignore";
2382 +var BASE_UI_SWIPE_IGNORE_SELECTOR = `[${BASE_UI_SWIPE_IGNORE_ATTRIBUTE}]`;
2383 +var LEGACY_SWIPE_IGNORE_SELECTOR = `[${LEGACY_SWIPE_IGNORE_ATTRIBUTE}]`;
2384 +var POPUP_COLLISION_AVOIDANCE = {
2385 + fallbackAxisSide: "end"
2386 +};
2387 +var ownerVisuallyHidden = {
2388 + clipPath: "inset(50%)",
2389 + position: "fixed",
2390 + top: 0,
2391 + left: 0
2392 +};
2393 +
2394 +// node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
2395 +var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
2396 +var PortalContext = /* @__PURE__ */ React13.createContext(null);
2397 +if (true) PortalContext.displayName = "PortalContext";
2398 +var usePortalContext = () => React13.useContext(PortalContext);
2399 +var attr = createAttribute("portal");
2400 +function useFloatingPortalNode(props = {}) {
2401 + const {
2402 + ref,
2403 + container: containerProp,
2404 + componentProps = EMPTY_OBJECT,
2405 + elementProps
2406 + } = props;
2407 + const uniqueId = useId();
2408 + const portalContext = usePortalContext();
2409 + const parentPortalNode = portalContext?.portalNode;
2410 + const [containerElement, setContainerElement] = React13.useState(null);
2411 + const [portalNode, setPortalNode] = React13.useState(null);
2412 + const setPortalNodeRef = useStableCallback((node) => {
2413 + if (node !== null) {
2414 + setPortalNode(node);
2415 + }
2416 + });
2417 + const containerRef = React13.useRef(null);
2418 + useIsoLayoutEffect(() => {
2419 + if (containerProp === null) {
2420 + if (containerRef.current) {
2421 + containerRef.current = null;
2422 + setPortalNode(null);
2423 + setContainerElement(null);
2424 + }
2425 + return;
2426 + }
2427 + const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;
2428 + if (resolvedContainer == null) {
2429 + if (containerRef.current) {
2430 + containerRef.current = null;
2431 + setPortalNode(null);
2432 + setContainerElement(null);
2433 + }
2434 + return;
2435 + }
2436 + if (containerRef.current !== resolvedContainer) {
2437 + containerRef.current = resolvedContainer;
2438 + setPortalNode(null);
2439 + setContainerElement(resolvedContainer);
2440 + }
2441 + }, [containerProp, parentPortalNode]);
2442 + const portalElement = useRenderElement("div", componentProps, {
2443 + ref: [ref, setPortalNodeRef],
2444 + props: [{
2445 + id: uniqueId,
2446 + [attr]: ""
2447 + }, elementProps]
2448 + });
2449 + const portalSubtree = containerElement && portalElement ? /* @__PURE__ */ ReactDOM2.createPortal(portalElement, containerElement) : null;
2450 + return {
2451 + node: portalNode,
2452 + // `id` and `render` props can override or remove the generated ID. Use the exact
2453 + // rendered value so `aria-owns` never points at an ID absent from the DOM.
2454 + nodeId: /* @__PURE__ */ React13.isValidElement(portalElement) ? portalElement.props.id : void 0,
2455 + subtree: portalSubtree
2456 + };
2457 +}
2458 +var FloatingPortal = /* @__PURE__ */ React13.forwardRef(function FloatingPortal2(componentProps, forwardedRef) {
2459 + const {
2460 + render,
2461 + className,
2462 + style,
2463 + children,
2464 + container,
2465 + portalOwnerRole,
2466 + ...elementProps
2467 + } = componentProps;
2468 + const {
2469 + node: portalNode,
2470 + nodeId: portalNodeId,
2471 + subtree: portalSubtree
2472 + } = useFloatingPortalNode({
2473 + container,
2474 + ref: forwardedRef,
2475 + componentProps,
2476 + elementProps
2477 + });
2478 + const beforeOutsideRef = React13.useRef(null);
2479 + const afterOutsideRef = React13.useRef(null);
2480 + const beforeInsideRef = React13.useRef(null);
2481 + const afterInsideRef = React13.useRef(null);
2482 + const [focusManagerState, setFocusManagerState] = React13.useState(null);
2483 + const focusInsideDisabledRef = React13.useRef(false);
2484 + const modal = focusManagerState?.modal;
2485 + const open2 = focusManagerState?.open;
2486 + const shouldRenderGuards = !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode;
2487 + React13.useEffect(() => {
2488 + if (!portalNode || modal) {
2489 + return void 0;
2490 + }
2491 + function onFocus(event) {
2492 + if (portalNode && event.relatedTarget && isOutsideEvent(event)) {
2493 + if (event.type === "focusin") {
2494 + if (focusInsideDisabledRef.current) {
2495 + enableFocusInside(portalNode);
2496 + focusInsideDisabledRef.current = false;
2497 + }
2498 + } else {
2499 + disableFocusInside(portalNode);
2500 + focusInsideDisabledRef.current = true;
2501 + }
2502 + }
2503 + }
2504 + return mergeCleanups(addEventListener(portalNode, "focusin", onFocus, true), addEventListener(portalNode, "focusout", onFocus, true));
2505 + }, [portalNode, modal]);
2506 + useIsoLayoutEffect(() => {
2507 + if (!portalNode || open2 !== true || !focusInsideDisabledRef.current) {
2508 + return;
2509 + }
2510 + enableFocusInside(portalNode);
2511 + focusInsideDisabledRef.current = false;
2512 + }, [open2, portalNode]);
2513 + const portalContextValue = React13.useMemo(() => ({
2514 + beforeOutsideRef,
2515 + afterOutsideRef,
2516 + beforeInsideRef,
2517 + afterInsideRef,
2518 + portalNode,
2519 + setFocusManagerState
2520 + }), [portalNode]);
2521 + return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(React13.Fragment, {
2522 + children: [portalSubtree, /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(PortalContext.Provider, {
2523 + value: portalContextValue,
2524 + children: [shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FocusGuard, {
2525 + "data-type": "outside",
2526 + ref: beforeOutsideRef,
2527 + onFocus: (event) => {
2528 + if (isOutsideEvent(event, portalNode)) {
2529 + beforeInsideRef.current?.focus();
2530 + } else {
2531 + const domReference = focusManagerState ? focusManagerState.domReference : null;
2532 + const prevTabbable = getPreviousTabbable(domReference);
2533 + prevTabbable?.focus();
2534 + }
2535 + }
2536 + }), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", {
2537 + role: portalOwnerRole,
2538 + "aria-owns": portalNodeId,
2539 + style: ownerVisuallyHidden
2540 + }), portalNode && /* @__PURE__ */ ReactDOM2.createPortal(children, portalNode), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FocusGuard, {
2541 + "data-type": "outside",
2542 + ref: afterOutsideRef,
2543 + onFocus: (event) => {
2544 + if (isOutsideEvent(event, portalNode)) {
2545 + afterInsideRef.current?.focus();
2546 + } else {
2547 + const domReference = focusManagerState ? focusManagerState.domReference : null;
2548 + const nextTabbable = getNextTabbable(domReference);
2549 + nextTabbable?.focus();
2550 + if (focusManagerState?.closeOnFocusOut) {
2551 + focusManagerState?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.focusOut, event.nativeEvent));
2552 + }
2553 + }
2554 + }
2555 + })]
2556 + })]
2557 + });
2558 +});
2559 +if (true) FloatingPortal.displayName = "FloatingPortal";
2560 +
2561 +// node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
2562 +var React14 = __toESM(require_react(), 1);
2563 +
2564 +// node_modules/@base-ui/react/floating-ui-react/utils/createEventEmitter.mjs
2565 +function createEventEmitter() {
2566 + const map = /* @__PURE__ */ new Map();
2567 + return {
2568 + emit(event, data) {
2569 + map.get(event)?.forEach((listener) => listener(data));
2570 + },
2571 + on(event, listener) {
2572 + if (!map.has(event)) {
2573 + map.set(event, /* @__PURE__ */ new Set());
2574 + }
2575 + map.get(event).add(listener);
2576 + },
2577 + off(event, listener) {
2578 + map.get(event)?.delete(listener);
2579 + }
2580 + };
2581 +}
2582 +
2583 +// node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
2584 +var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
2585 +var FloatingNodeContext = /* @__PURE__ */ React14.createContext(null);
2586 +if (true) FloatingNodeContext.displayName = "FloatingNodeContext";
2587 +var FloatingTreeContext = /* @__PURE__ */ React14.createContext(null);
2588 +if (true) FloatingTreeContext.displayName = "FloatingTreeContext";
2589 +var useFloatingParentNodeId = () => React14.useContext(FloatingNodeContext)?.id || null;
2590 +var useFloatingTree = (externalTree) => {
2591 + const contextTree = React14.useContext(FloatingTreeContext);
2592 + return externalTree ?? contextTree;
2593 +};
2594 +
2595 +// node_modules/@base-ui/react/floating-ui-react/hooks/useClientPoint.mjs
2596 +var React15 = __toESM(require_react(), 1);
2597 +function createVirtualElement(domElement, data) {
2598 + let offsetX = null;
2599 + let offsetY = null;
2600 + let isAutoUpdateEvent = false;
2601 + return {
2602 + contextElement: domElement || void 0,
2603 + getBoundingClientRect() {
2604 + const domRect = domElement?.getBoundingClientRect() || {
2605 + width: 0,
2606 + height: 0,
2607 + x: 0,
2608 + y: 0
2609 + };
2610 + const isXAxis = data.axis === "x" || data.axis === "both";
2611 + const isYAxis = data.axis === "y" || data.axis === "both";
2612 + const canTrackCursorOnAutoUpdate = ["mouseenter", "mousemove"].includes(data.dataRef.current.openEvent?.type || "") && data.pointerType !== "touch";
2613 + let width = domRect.width;
2614 + let height = domRect.height;
2615 + let x = domRect.x;
2616 + let y = domRect.y;
2617 + if (offsetX == null && data.x && isXAxis) {
2618 + offsetX = domRect.x - data.x;
2619 + }
2620 + if (offsetY == null && data.y && isYAxis) {
2621 + offsetY = domRect.y - data.y;
2622 + }
2623 + x -= offsetX || 0;
2624 + y -= offsetY || 0;
2625 + width = 0;
2626 + height = 0;
2627 + if (!isAutoUpdateEvent || canTrackCursorOnAutoUpdate) {
2628 + width = data.axis === "y" ? domRect.width : 0;
2629 + height = data.axis === "x" ? domRect.height : 0;
2630 + x = isXAxis && data.x != null ? data.x : x;
2631 + y = isYAxis && data.y != null ? data.y : y;
2632 + } else if (isAutoUpdateEvent && !canTrackCursorOnAutoUpdate) {
2633 + height = data.axis === "x" ? domRect.height : height;
2634 + width = data.axis === "y" ? domRect.width : width;
2635 + }
2636 + isAutoUpdateEvent = true;
2637 + return {
2638 + width,
2639 + height,
2640 + x,
2641 + y,
2642 + top: y,
2643 + right: x + width,
2644 + bottom: y + height,
2645 + left: x
2646 + };
2647 + }
2648 + };
2649 +}
2650 +function isMouseBasedEvent(event) {
2651 + return event != null && event.clientX != null;
2652 +}
2653 +function useClientPoint(context, props = {}) {
2654 + const {
2655 + enabled = true,
2656 + axis = "both"
2657 + } = props;
2658 + const store2 = "rootStore" in context ? context.rootStore : context;
2659 + const open2 = store2.useState("open");
2660 + const floating = store2.useState("floatingElement");
2661 + const domReference = store2.useState("domReferenceElement");
2662 + const dataRef = store2.context.dataRef;
2663 + const initialRef = React15.useRef(false);
2664 + const cleanupListenerRef = React15.useRef(null);
2665 + const [pointerType, setPointerType] = React15.useState();
2666 + const [reactive, setReactive] = React15.useState([]);
2667 + const resetReference = useStableCallback((reference2) => {
2668 + store2.set("positionReference", reference2);
2669 + });
2670 + const setReference = useStableCallback((newX, newY, referenceElement) => {
2671 + if (initialRef.current) {
2672 + return;
2673 + }
2674 + if (dataRef.current.openEvent && !isMouseBasedEvent(dataRef.current.openEvent)) {
2675 + return;
2676 + }
2677 + store2.set("positionReference", createVirtualElement(referenceElement ?? domReference, {
2678 + x: newX,
2679 + y: newY,
2680 + axis,
2681 + dataRef,
2682 + pointerType
2683 + }));
2684 + });
2685 + const handleReferenceEnterOrMove = useStableCallback((event) => {
2686 + if (!open2) {
2687 + setReference(event.clientX, event.clientY, event.currentTarget);
2688 + } else if (!cleanupListenerRef.current) {
2689 + setReference(event.clientX, event.clientY, event.currentTarget);
2690 + setReactive([]);
2691 + }
2692 + });
2693 + const openCheck = isMouseLikePointerType(pointerType) ? floating : open2;
2694 + React15.useEffect(() => {
2695 + if (!enabled) {
2696 + resetReference(domReference);
2697 + return void 0;
2698 + }
2699 + if (!openCheck) {
2700 + return void 0;
2701 + }
2702 + function cleanupListener() {
2703 + cleanupListenerRef.current?.();
2704 + cleanupListenerRef.current = null;
2705 + }
2706 + const win = getWindow(floating);
2707 + function handleMouseMove(event) {
2708 + const target = getTarget(event);
2709 + if (!contains(floating, target)) {
2710 + setReference(event.clientX, event.clientY);
2711 + } else {
2712 + cleanupListener();
2713 + }
2714 + }
2715 + if (!dataRef.current.openEvent || isMouseBasedEvent(dataRef.current.openEvent)) {
2716 + cleanupListenerRef.current = addEventListener(win, "mousemove", handleMouseMove);
2717 + } else {
2718 + resetReference(domReference);
2719 + }
2720 + return cleanupListener;
2721 + }, [openCheck, enabled, floating, dataRef, domReference, store2, setReference, resetReference, reactive]);
2722 + React15.useEffect(() => () => {
2723 + store2.set("positionReference", null);
2724 + }, [store2]);
2725 + React15.useEffect(() => {
2726 + if (enabled && !floating) {
2727 + initialRef.current = false;
2728 + }
2729 + }, [enabled, floating]);
2730 + React15.useEffect(() => {
2731 + if (!enabled && open2) {
2732 + initialRef.current = true;
2733 + }
2734 + }, [enabled, open2]);
2735 + const reference = React15.useMemo(() => {
2736 + function setPointerTypeRef(event) {
2737 + setPointerType(event.pointerType);
2738 + }
2739 + return {
2740 + onPointerDown: setPointerTypeRef,
2741 + onPointerEnter: setPointerTypeRef,
2742 + onMouseMove: handleReferenceEnterOrMove,
2743 + onMouseEnter: handleReferenceEnterOrMove
2744 + };
2745 + }, [handleReferenceEnterOrMove]);
2746 + return React15.useMemo(() => enabled ? {
2747 + reference,
2748 + trigger: reference
2749 + } : {}, [enabled, reference]);
2750 +}
2751 +
2752 +// node_modules/@base-ui/react/floating-ui-react/hooks/useDismiss.mjs
2753 +var React16 = __toESM(require_react(), 1);
2754 +function alwaysFalse() {
2755 + return false;
2756 +}
2757 +function normalizeProp(normalizable) {
2758 + return {
2759 + escapeKey: typeof normalizable === "boolean" ? normalizable : normalizable?.escapeKey ?? false,
2760 + outsidePress: typeof normalizable === "boolean" ? normalizable : normalizable?.outsidePress ?? true
2761 + };
2762 +}
2763 +function useDismiss(context, props = {}) {
2764 + const {
2765 + enabled = true,
2766 + escapeKey: escapeKey2 = true,
2767 + outsidePress: outsidePressProp = true,
2768 + outsidePressEvent = "sloppy",
2769 + referencePress = alwaysFalse,
2770 + bubbles,
2771 + externalTree
2772 + } = props;
2773 + const store2 = "rootStore" in context ? context.rootStore : context;
2774 + const open2 = store2.useState("open");
2775 + const floatingElement = store2.useState("floatingElement");
2776 + const {
2777 + dataRef,
2778 + events
2779 + } = store2.context;
2780 + const tree = useFloatingTree(externalTree);
2781 + const outsidePressFn = useStableCallback(typeof outsidePressProp === "function" ? outsidePressProp : () => false);
2782 + const outsidePress2 = typeof outsidePressProp === "function" ? outsidePressFn : outsidePressProp;
2783 + const outsidePressEnabled = outsidePress2 !== false;
2784 + const getOutsidePressEventProp = useStableCallback(() => outsidePressEvent);
2785 + const {
2786 + escapeKey: escapeKeyBubbles,
2787 + outsidePress: outsidePressBubbles
2788 + } = normalizeProp(bubbles);
2789 + const pressStartedInsideRef = React16.useRef(false);
2790 + const pressStartPreventedRef = React16.useRef(false);
2791 + const suppressNextOutsideClickRef = React16.useRef(false);
2792 + const sawPressWhileOpenRef = React16.useRef(false);
2793 + const isComposingRef = React16.useRef(false);
2794 + const currentPointerTypeRef = React16.useRef("");
2795 + const touchStateRef = React16.useRef(null);
2796 + const cancelDismissOnEndTimeout = useTimeout();
2797 + const clearInsideReactTreeTimeout = useTimeout();
2798 + const clearInsideReactTree = useStableCallback(() => {
2799 + clearInsideReactTreeTimeout.clear();
2800 + dataRef.current.insideReactTree = false;
2801 + });
2802 + const hasBlockingChild = useStableCallback((bubbleKey) => {
2803 + const nodeId = dataRef.current.floatingContext?.nodeId;
2804 + const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];
2805 + return children.some((child) => child.context?.open && !child.context.dataRef.current[bubbleKey]);
2806 + });
2807 + const isEventWithinOwnElements = useStableCallback((event) => {
2808 + return isEventTargetWithin(event, store2.select("floatingElement")) || isEventTargetWithin(event, store2.select("domReferenceElement"));
2809 + });
2810 + const closeOnReferencePress = useStableCallback((event) => {
2811 + if (!referencePress()) {
2812 + return;
2813 + }
2814 + store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent));
2815 + });
2816 + const closeOnEscapeKeyDown = useStableCallback((event) => {
2817 + if (!open2 || !enabled || !escapeKey2 || event.key !== "Escape") {
2818 + return;
2819 + }
2820 + if (isComposingRef.current) {
2821 + return;
2822 + }
2823 + if (!escapeKeyBubbles && hasBlockingChild("__escapeKeyBubbles")) {
2824 + return;
2825 + }
2826 + const native = isReactEvent(event) ? event.nativeEvent : event;
2827 + const eventDetails = createChangeEventDetails(reason_parts_exports.escapeKey, native);
2828 + store2.setOpen(false, eventDetails);
2829 + if (!eventDetails.isCanceled) {
2830 + event.preventDefault();
2831 + }
2832 + if (!escapeKeyBubbles && !eventDetails.isPropagationAllowed) {
2833 + event.stopPropagation();
2834 + }
2835 + });
2836 + const markInsideReactTree = useStableCallback(() => {
2837 + dataRef.current.insideReactTree = true;
2838 + clearInsideReactTreeTimeout.start(0, clearInsideReactTree);
2839 + });
2840 + const markPressStartedInsideReactTree = useStableCallback((event) => {
2841 + if (!open2 || !enabled || event.button !== 0) {
2842 + return;
2843 + }
2844 + const target = getTarget(event.nativeEvent);
2845 + if (!contains(store2.select("floatingElement"), target)) {
2846 + return;
2847 + }
2848 + if (!pressStartedInsideRef.current) {
2849 + pressStartedInsideRef.current = true;
2850 + pressStartPreventedRef.current = false;
2851 + }
2852 + });
2853 + const markInsidePressStartPrevented = useStableCallback((event) => {
2854 + if (!open2 || !enabled) {
2855 + return;
2856 + }
2857 + if (!(event.defaultPrevented || event.nativeEvent.defaultPrevented)) {
2858 + return;
2859 + }
2860 + if (pressStartedInsideRef.current) {
2861 + pressStartPreventedRef.current = true;
2862 + }
2863 + });
2864 + React16.useEffect(() => {
2865 + function handleOpenChange(details) {
2866 + if (!details.open) {
2867 + sawPressWhileOpenRef.current = false;
2868 + }
2869 + }
2870 + events.on("openchange", handleOpenChange);
2871 + return () => {
2872 + events.off("openchange", handleOpenChange);
2873 + };
2874 + }, [events]);
2875 + React16.useEffect(() => {
2876 + if (!open2 || !enabled) {
2877 + if (!open2) {
2878 + sawPressWhileOpenRef.current = false;
2879 + }
2880 + return clearInsideReactTree;
2881 + }
2882 + dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;
2883 + dataRef.current.__outsidePressBubbles = outsidePressBubbles;
2884 + const compositionTimeout = new Timeout();
2885 + const preventedPressSuppressionTimeout = new Timeout();
2886 + const doc = ownerDocument(floatingElement);
2887 + function handleCompositionStart() {
2888 + compositionTimeout.clear();
2889 + isComposingRef.current = true;
2890 + }
2891 + function handleCompositionEnd() {
2892 + compositionTimeout.start(
2893 + // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
2894 + // Only apply to WebKit for the test to remain 0ms.
2895 + parts_exports.engine.webkit ? 5 : 0,
2896 + () => {
2897 + isComposingRef.current = false;
2898 + }
2899 + );
2900 + }
2901 + function suppressImmediateOutsideClickAfterPreventedStart() {
2902 + suppressNextOutsideClickRef.current = true;
2903 + preventedPressSuppressionTimeout.start(0, () => {
2904 + suppressNextOutsideClickRef.current = false;
2905 + });
2906 + }
2907 + function resetPressStartState() {
2908 + pressStartedInsideRef.current = false;
2909 + pressStartPreventedRef.current = false;
2910 + }
2911 + function getOutsidePressEvent() {
2912 + const type = currentPointerTypeRef.current;
2913 + const computedType = type === "pen" || !type ? "mouse" : type;
2914 + const outsidePressEventValue = getOutsidePressEventProp();
2915 + const resolved = typeof outsidePressEventValue === "function" ? outsidePressEventValue() : outsidePressEventValue;
2916 + if (typeof resolved === "string") {
2917 + return resolved;
2918 + }
2919 + return resolved[computedType];
2920 + }
2921 + function shouldIgnoreEvent(event) {
2922 + const computedOutsidePressEvent = getOutsidePressEvent();
2923 + return computedOutsidePressEvent === "intentional" && event.type !== "click" || computedOutsidePressEvent === "sloppy" && event.type === "click";
2924 + }
2925 + function isEventWithinFloatingTree(event) {
2926 + const nodeId = dataRef.current.floatingContext?.nodeId;
2927 + const targetIsInsideChildren = tree && getNodeChildren(tree.nodesRef.current, nodeId).some((node) => isEventTargetWithin(event, node.context?.elements.floating));
2928 + return isEventWithinOwnElements(event) || targetIsInsideChildren;
2929 + }
2930 + function closeOnPressOutside(event) {
2931 + if (shouldIgnoreEvent(event)) {
2932 + if (event.type !== "click" && !isEventWithinOwnElements(event)) {
2933 + preventedPressSuppressionTimeout.clear();
2934 + suppressNextOutsideClickRef.current = false;
2935 + }
2936 + clearInsideReactTree();
2937 + return;
2938 + }
2939 + if (dataRef.current.insideReactTree) {
2940 + clearInsideReactTree();
2941 + return;
2942 + }
2943 + const target = getTarget(event);
2944 + const inertSelector = `[${createAttribute("inert")}]`;
2945 + const targetRoot = isElement(target) ? target.getRootNode() : null;
2946 + const markers = Array.from((isShadowRoot(targetRoot) ? targetRoot : ownerDocument(store2.select("floatingElement"))).querySelectorAll(inertSelector));
2947 + const triggers = store2.context.triggerElements;
2948 + if (target && (triggers.hasElement(target) || triggers.hasMatchingElement((trigger) => contains(trigger, target)))) {
2949 + return;
2950 + }
2951 + let targetRootAncestor = isElement(target) ? target : null;
2952 + while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {
2953 + const nextParent = getParentNode(targetRootAncestor);
2954 + if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {
2955 + break;
2956 + }
2957 + targetRootAncestor = nextParent;
2958 + }
2959 + if (markers.length && isElement(target) && !isRootElement(target) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
2960 + !contains(target, store2.select("floatingElement")) && // If the target root element contains none of the markers, then the
2961 + // element was injected after the floating element rendered.
2962 + markers.every((marker) => !contains(targetRootAncestor, marker))) {
2963 + return;
2964 + }
2965 + if (isHTMLElement(target) && !("touches" in event)) {
2966 + const lastTraversableNode = isLastTraversableNode(target);
2967 + const style = getComputedStyle2(target);
2968 + const scrollRe = /auto|scroll/;
2969 + const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);
2970 + const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);
2971 + const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;
2972 + const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;
2973 + const isRTL7 = style.direction === "rtl";
2974 + const pressedVerticalScrollbar = canScrollY && (isRTL7 ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);
2975 + const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;
2976 + if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {
2977 + return;
2978 + }
2979 + }
2980 + if (isEventWithinFloatingTree(event)) {
2981 + return;
2982 + }
2983 + if (getOutsidePressEvent() === "intentional") {
2984 + if (event.detail !== 0 && !isVirtualClick(event) && !sawPressWhileOpenRef.current) {
2985 + return;
2986 + }
2987 + if (suppressNextOutsideClickRef.current) {
2988 + preventedPressSuppressionTimeout.clear();
2989 + suppressNextOutsideClickRef.current = false;
2990 + return;
2991 + }
2992 + }
2993 + if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
2994 + return;
2995 + }
2996 + if (hasBlockingChild("__outsidePressBubbles")) {
2997 + return;
2998 + }
2999 + store2.setOpen(false, createChangeEventDetails(reason_parts_exports.outsidePress, event));
3000 + clearInsideReactTree();
3001 + }
3002 + function handlePointerDown(event) {
3003 + if (getOutsidePressEvent() !== "sloppy" || event.pointerType === "touch" || !store2.select("open") || !enabled || isEventWithinOwnElements(event)) {
3004 + return;
3005 + }
3006 + closeOnPressOutside(event);
3007 + }
3008 + function handleTouchStart(event) {
3009 + if (getOutsidePressEvent() !== "sloppy" || !store2.select("open") || !enabled || isEventWithinOwnElements(event)) {
3010 + return;
3011 + }
3012 + const touch = event.touches[0];
3013 + if (touch) {
3014 + touchStateRef.current = {
3015 + startTime: Date.now(),
3016 + startX: touch.clientX,
3017 + startY: touch.clientY,
3018 + dismissOnTouchEnd: false,
3019 + dismissOnMouseDown: true
3020 + };
3021 + cancelDismissOnEndTimeout.start(1e3, () => {
3022 + if (touchStateRef.current) {
3023 + touchStateRef.current.dismissOnTouchEnd = false;
3024 + touchStateRef.current.dismissOnMouseDown = false;
3025 + }
3026 + });
3027 + }
3028 + }
3029 + function addTargetEventListenerOnce(event, listener) {
3030 + const target = getTarget(event);
3031 + if (!target) {
3032 + return;
3033 + }
3034 + const unsubscribe2 = addEventListener(target, event.type, () => {
3035 + listener(event);
3036 + unsubscribe2();
3037 + });
3038 + }
3039 + function handleTouchStartCapture(event) {
3040 + currentPointerTypeRef.current = "touch";
3041 + addTargetEventListenerOnce(event, handleTouchStart);
3042 + }
3043 + function closeOnPressOutsideCapture(event) {
3044 + cancelDismissOnEndTimeout.clear();
3045 + if (event.type === "pointerdown") {
3046 + if (event.button === 0) {
3047 + sawPressWhileOpenRef.current = true;
3048 + }
3049 + currentPointerTypeRef.current = event.pointerType;
3050 + }
3051 + if (event.type === "mousedown" && touchStateRef.current && !touchStateRef.current.dismissOnMouseDown) {
3052 + return;
3053 + }
3054 + addTargetEventListenerOnce(event, (targetEvent) => {
3055 + if (targetEvent.type === "pointerdown") {
3056 + handlePointerDown(targetEvent);
3057 + } else {
3058 + closeOnPressOutside(targetEvent);
3059 + }
3060 + });
3061 + }
3062 + function handlePressEndCapture(event) {
3063 + if (event.type === "pointercancel") {
3064 + sawPressWhileOpenRef.current = false;
3065 + }
3066 + if (!pressStartedInsideRef.current) {
3067 + return;
3068 + }
3069 + const pressStartedInsideDefaultPrevented = pressStartPreventedRef.current;
3070 + resetPressStartState();
3071 + if (getOutsidePressEvent() !== "intentional") {
3072 + return;
3073 + }
3074 + if (event.type === "pointercancel") {
3075 + if (pressStartedInsideDefaultPrevented) {
3076 + suppressImmediateOutsideClickAfterPreventedStart();
3077 + }
3078 + return;
3079 + }
3080 + if (isEventWithinFloatingTree(event)) {
3081 + return;
3082 + }
3083 + if (pressStartedInsideDefaultPrevented) {
3084 + suppressImmediateOutsideClickAfterPreventedStart();
3085 + return;
3086 + }
3087 + if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
3088 + return;
3089 + }
3090 + preventedPressSuppressionTimeout.clear();
3091 + suppressNextOutsideClickRef.current = true;
3092 + clearInsideReactTree();
3093 + }
3094 + function handleTouchMove(event) {
3095 + if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
3096 + return;
3097 + }
3098 + const touch = event.touches[0];
3099 + if (!touch) {
3100 + return;
3101 + }
3102 + const deltaX = Math.abs(touch.clientX - touchStateRef.current.startX);
3103 + const deltaY = Math.abs(touch.clientY - touchStateRef.current.startY);
3104 + const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
3105 + if (distance > 5) {
3106 + touchStateRef.current.dismissOnTouchEnd = true;
3107 + }
3108 + if (distance > 10) {
3109 + closeOnPressOutside(event);
3110 + cancelDismissOnEndTimeout.clear();
3111 + touchStateRef.current = null;
3112 + }
3113 + }
3114 + function handleTouchMoveCapture(event) {
3115 + addTargetEventListenerOnce(event, handleTouchMove);
3116 + }
3117 + function handleTouchEnd(event) {
3118 + if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
3119 + return;
3120 + }
3121 + if (touchStateRef.current.dismissOnTouchEnd) {
3122 + closeOnPressOutside(event);
3123 + }
3124 + cancelDismissOnEndTimeout.clear();
3125 + touchStateRef.current = null;
3126 + }
3127 + function handleTouchEndCapture(event) {
3128 + addTargetEventListenerOnce(event, handleTouchEnd);
3129 + }
3130 + 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, {
3131 + capture: true,
3132 + passive: true
3133 + }), addEventListener(doc, "touchmove", handleTouchMoveCapture, {
3134 + capture: true,
3135 + passive: true
3136 + }), addEventListener(doc, "touchend", handleTouchEndCapture, {
3137 + capture: true,
3138 + passive: true
3139 + })));
3140 + return () => {
3141 + unsubscribe();
3142 + compositionTimeout.clear();
3143 + preventedPressSuppressionTimeout.clear();
3144 + resetPressStartState();
3145 + suppressNextOutsideClickRef.current = false;
3146 + clearInsideReactTree();
3147 + };
3148 + }, [dataRef, floatingElement, escapeKey2, outsidePressEnabled, outsidePress2, open2, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, clearInsideReactTree, getOutsidePressEventProp, hasBlockingChild, isEventWithinOwnElements, tree, store2, cancelDismissOnEndTimeout]);
3149 + const reference = React16.useMemo(() => ({
3150 + onKeyDown: closeOnEscapeKeyDown,
3151 + onPointerDown: closeOnReferencePress,
3152 + onClick: closeOnReferencePress
3153 + }), [closeOnEscapeKeyDown, closeOnReferencePress]);
3154 + const floating = React16.useMemo(() => ({
3155 + onKeyDown: closeOnEscapeKeyDown,
3156 + // `onMouseDown` may be blocked if `event.preventDefault()` is called in
3157 + // `onPointerDown`, such as with <NumberField.ScrubArea>.
3158 + // See https://github.com/mui/base-ui/pull/3379
3159 + onPointerDown: markInsidePressStartPrevented,
3160 + onMouseDown: markInsidePressStartPrevented,
3161 + onClickCapture: markInsideReactTree,
3162 + onMouseDownCapture(event) {
3163 + markInsideReactTree();
3164 + markPressStartedInsideReactTree(event);
3165 + },
3166 + onPointerDownCapture(event) {
3167 + markInsideReactTree();
3168 + markPressStartedInsideReactTree(event);
3169 + },
3170 + onMouseUpCapture: markInsideReactTree,
3171 + onTouchEndCapture: markInsideReactTree,
3172 + onTouchMoveCapture: markInsideReactTree
3173 + }), [closeOnEscapeKeyDown, markInsideReactTree, markPressStartedInsideReactTree, markInsidePressStartPrevented]);
3174 + return React16.useMemo(() => enabled ? {
3175 + reference,
3176 + floating,
3177 + trigger: reference
3178 + } : {}, [enabled, reference, floating]);
3179 +}
3180 +
3181 +// node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
3182 +var React24 = __toESM(require_react(), 1);
3183 +
3184 +// node_modules/@floating-ui/core/dist/floating-ui.core.mjs
3185 +function computeCoordsFromPlacement(_ref, placement, rtl) {
3186 + let {
3187 + reference,
3188 + floating
3189 + } = _ref;
3190 + const sideAxis = getSideAxis(placement);
3191 + const alignmentAxis = getAlignmentAxis(placement);
3192 + const alignLength = getAxisLength(alignmentAxis);
3193 + const side = getSide(placement);
3194 + const isVertical = sideAxis === "y";
3195 + const commonX = reference.x + reference.width / 2 - floating.width / 2;
3196 + const commonY = reference.y + reference.height / 2 - floating.height / 2;
3197 + const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
3198 + let coords;
3199 + switch (side) {
3200 + case "top":
3201 + coords = {
3202 + x: commonX,
3203 + y: reference.y - floating.height
3204 + };
3205 + break;
3206 + case "bottom":
3207 + coords = {
3208 + x: commonX,
3209 + y: reference.y + reference.height
3210 + };
3211 + break;
3212 + case "right":
3213 + coords = {
3214 + x: reference.x + reference.width,
3215 + y: commonY
3216 + };
3217 + break;
3218 + case "left":
3219 + coords = {
3220 + x: reference.x - floating.width,
3221 + y: commonY
3222 + };
3223 + break;
3224 + default:
3225 + coords = {
3226 + x: reference.x,
3227 + y: reference.y
3228 + };
3229 + }
3230 + const alignment = getAlignment(placement);
3231 + if (alignment) {
3232 + coords[alignmentAxis] += commonAlign * (alignment === "end" ? 1 : -1) * (rtl && isVertical ? -1 : 1);
3233 + }
3234 + return coords;
3235 +}
3236 +async function detectOverflow(state, options) {
3237 + var _await$platform$isEle;
3238 + if (options === void 0) {
3239 + options = {};
3240 + }
3241 + const {
3242 + x,
3243 + y,
3244 + platform: platform3,
3245 + rects,
3246 + elements,
3247 + strategy
3248 + } = state;
3249 + const {
3250 + boundary = "clippingAncestors",
3251 + rootBoundary = "viewport",
3252 + elementContext = "floating",
3253 + altBoundary = false,
3254 + padding = 0
3255 + } = evaluate(options, state);
3256 + const paddingObject = getPaddingObject(padding);
3257 + const altContext = elementContext === "floating" ? "reference" : "floating";
3258 + const element = elements[altBoundary ? altContext : elementContext];
3259 + const clippingClientRect = rectToClientRect(await platform3.getClippingRect({
3260 + 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)),
3261 + boundary,
3262 + rootBoundary,
3263 + strategy
3264 + }));
3265 + const rect = elementContext === "floating" ? {
3266 + x,
3267 + y,
3268 + width: rects.floating.width,
3269 + height: rects.floating.height
3270 + } : rects.reference;
3271 + const offsetParent = await (platform3.getOffsetParent == null ? void 0 : platform3.getOffsetParent(elements.floating));
3272 + const offsetScale = await (platform3.isElement == null ? void 0 : platform3.isElement(offsetParent)) && await (platform3.getScale == null ? void 0 : platform3.getScale(offsetParent)) || {
3273 + x: 1,
3274 + y: 1
3275 + };
3276 + const elementClientRect = rectToClientRect(platform3.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform3.convertOffsetParentRelativeRectToViewportRelativeRect({
3277 + elements,
3278 + rect,
3279 + offsetParent,
3280 + strategy
3281 + }) : rect);
3282 + return {
3283 + top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
3284 + bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
3285 + left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
3286 + right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
3287 + };
3288 +}
3289 +var MAX_RESET_COUNT = 50;
3290 +var computePosition = async (reference, floating, config) => {
3291 + const {
3292 + placement = "bottom",
3293 + strategy = "absolute",
3294 + middleware = [],
3295 + platform: platform3
3296 + } = config;
3297 + const platformWithDetectOverflow = platform3.detectOverflow ? platform3 : {
3298 + ...platform3,
3299 + detectOverflow
3300 + };
3301 + const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(floating));
3302 + let rects = await platform3.getElementRects({
3303 + reference,
3304 + floating,
3305 + strategy
3306 + });
3307 + let {
3308 + x,
3309 + y
3310 + } = computeCoordsFromPlacement(rects, placement, rtl);
3311 + let statefulPlacement = placement;
3312 + let resetCount = 0;
3313 + const middlewareData = {};
3314 + for (let i = 0; i < middleware.length; i++) {
3315 + const currentMiddleware = middleware[i];
3316 + if (!currentMiddleware) {
3317 + continue;
3318 + }
3319 + const {
3320 + name,
3321 + fn
3322 + } = currentMiddleware;
3323 + const {
3324 + x: nextX,
3325 + y: nextY,
3326 + data,
3327 + reset
3328 + } = await fn({
3329 + x,
3330 + y,
3331 + initialPlacement: placement,
3332 + placement: statefulPlacement,
3333 + strategy,
3334 + middlewareData,
3335 + rects,
3336 + platform: platformWithDetectOverflow,
3337 + elements: {
3338 + reference,
3339 + floating
3340 + }
3341 + });
3342 + x = nextX != null ? nextX : x;
3343 + y = nextY != null ? nextY : y;
3344 + middlewareData[name] = {
3345 + ...middlewareData[name],
3346 + ...data
3347 + };
3348 + if (reset && resetCount < MAX_RESET_COUNT) {
3349 + resetCount++;
3350 + if (typeof reset === "object") {
3351 + if (reset.placement) {
3352 + statefulPlacement = reset.placement;
3353 + }
3354 + if (reset.rects) {
3355 + rects = reset.rects === true ? await platform3.getElementRects({
3356 + reference,
3357 + floating,
3358 + strategy
3359 + }) : reset.rects;
3360 + }
3361 + ({
3362 + x,
3363 + y
3364 + } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
3365 + }
3366 + i = -1;
3367 + }
3368 + }
3369 + return {
3370 + x,
3371 + y,
3372 + placement: statefulPlacement,
3373 + strategy,
3374 + middlewareData
3375 + };
3376 +};
3377 +var flip = function(options) {
3378 + if (options === void 0) {
3379 + options = {};
3380 + }
3381 + return {
3382 + name: "flip",
3383 + options,
3384 + async fn(state) {
3385 + var _middlewareData$arrow, _middlewareData$flip;
3386 + const {
3387 + placement,
3388 + middlewareData,
3389 + rects,
3390 + initialPlacement,
3391 + platform: platform3,
3392 + elements
3393 + } = state;
3394 + const {
3395 + mainAxis: checkMainAxis = true,
3396 + crossAxis: checkCrossAxis = true,
3397 + fallbackPlacements: specifiedFallbackPlacements,
3398 + fallbackStrategy = "bestFit",
3399 + fallbackAxisSideDirection = "none",
3400 + flipAlignment = true,
3401 + ...detectOverflowOptions
3402 + } = evaluate(options, state);
3403 + if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
3404 + return {};
3405 + }
3406 + const side = getSide(placement);
3407 + const initialSideAxis = getSideAxis(initialPlacement);
3408 + const isBasePlacement = getSide(initialPlacement) === initialPlacement;
3409 + const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating));
3410 + const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
3411 + const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
3412 + if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
3413 + fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
3414 + }
3415 + const placements2 = [initialPlacement, ...fallbackPlacements];
3416 + const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3417 + const overflows = [];
3418 + let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
3419 + if (checkMainAxis) {
3420 + overflows.push(overflow[side]);
3421 + }
3422 + if (checkCrossAxis) {
3423 + const sides2 = getAlignmentSides(placement, rects, rtl);
3424 + overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
3425 + }
3426 + overflowsData = [...overflowsData, {
3427 + placement,
3428 + overflows
3429 + }];
3430 + if (!overflows.every((side2) => side2 <= 0)) {
3431 + var _middlewareData$flip2, _overflowsData$filter;
3432 + const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
3433 + const nextPlacement = placements2[nextIndex];
3434 + if (nextPlacement) {
3435 + const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
3436 + if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
3437 + // overflows the main axis.
3438 + overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
3439 + return {
3440 + data: {
3441 + index: nextIndex,
3442 + overflows: overflowsData
3443 + },
3444 + reset: {
3445 + placement: nextPlacement
3446 + }
3447 + };
3448 + }
3449 + }
3450 + 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;
3451 + if (!resetPlacement) {
3452 + switch (fallbackStrategy) {
3453 + case "bestFit": {
3454 + var _overflowsData$filter2;
3455 + const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => {
3456 + if (hasFallbackAxisSideDirection) {
3457 + const currentSideAxis = getSideAxis(d.placement);
3458 + return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
3459 + // reading directions favoring greater width.
3460 + currentSideAxis === "y";
3461 + }
3462 + return true;
3463 + }).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];
3464 + if (placement2) {
3465 + resetPlacement = placement2;
3466 + }
3467 + break;
3468 + }
3469 + case "initialPlacement":
3470 + resetPlacement = initialPlacement;
3471 + break;
3472 + }
3473 + }
3474 + if (placement !== resetPlacement) {
3475 + return {
3476 + reset: {
3477 + placement: resetPlacement
3478 + }
3479 + };
3480 + }
3481 + }
3482 + return {};
3483 + }
3484 + };
3485 +};
3486 +var originSides = /* @__PURE__ */ new Set(["left", "top"]);
3487 +async function convertValueToCoords(state, options) {
3488 + const {
3489 + placement,
3490 + platform: platform3,
3491 + elements
3492 + } = state;
3493 + const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating));
3494 + const side = getSide(placement);
3495 + const alignment = getAlignment(placement);
3496 + const isVertical = getSideAxis(placement) === "y";
3497 + const mainAxisMulti = originSides.has(side) ? -1 : 1;
3498 + const crossAxisMulti = rtl && isVertical ? -1 : 1;
3499 + const rawValue = evaluate(options, state);
3500 + let {
3501 + mainAxis,
3502 + crossAxis,
3503 + alignmentAxis
3504 + } = typeof rawValue === "number" ? {
3505 + mainAxis: rawValue,
3506 + crossAxis: 0,
3507 + alignmentAxis: null
3508 + } : {
3509 + mainAxis: rawValue.mainAxis || 0,
3510 + crossAxis: rawValue.crossAxis || 0,
3511 + alignmentAxis: rawValue.alignmentAxis
3512 + };
3513 + if (alignment && typeof alignmentAxis === "number") {
3514 + crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
3515 + }
3516 + return isVertical ? {
3517 + x: crossAxis * crossAxisMulti,
3518 + y: mainAxis * mainAxisMulti
3519 + } : {
3520 + x: mainAxis * mainAxisMulti,
3521 + y: crossAxis * crossAxisMulti
3522 + };
3523 +}
3524 +var offset = function(options) {
3525 + if (options === void 0) {
3526 + options = 0;
3527 + }
3528 + return {
3529 + name: "offset",
3530 + options,
3531 + async fn(state) {
3532 + var _middlewareData$offse, _middlewareData$arrow;
3533 + const {
3534 + x,
3535 + y,
3536 + placement,
3537 + middlewareData
3538 + } = state;
3539 + const diffCoords = await convertValueToCoords(state, options);
3540 + if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
3541 + return {};
3542 + }
3543 + return {
3544 + x: x + diffCoords.x,
3545 + y: y + diffCoords.y,
3546 + data: {
3547 + ...diffCoords,
3548 + placement
3549 + }
3550 + };
3551 + }
3552 + };
3553 +};
3554 +var shift = function(options) {
3555 + if (options === void 0) {
3556 + options = {};
3557 + }
3558 + return {
3559 + name: "shift",
3560 + options,
3561 + async fn(state) {
3562 + const {
3563 + x,
3564 + y,
3565 + placement,
3566 + platform: platform3
3567 + } = state;
3568 + const {
3569 + mainAxis: checkMainAxis = true,
3570 + crossAxis: checkCrossAxis = false,
3571 + limiter = {
3572 + fn: (_ref) => {
3573 + let {
3574 + x: x2,
3575 + y: y2
3576 + } = _ref;
3577 + return {
3578 + x: x2,
3579 + y: y2
3580 + };
3581 + }
3582 + },
3583 + ...detectOverflowOptions
3584 + } = evaluate(options, state);
3585 + const coords = {
3586 + x,
3587 + y
3588 + };
3589 + const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3590 + const crossAxis = getSideAxis(placement);
3591 + const mainAxis = getOppositeAxis(crossAxis);
3592 + let mainAxisCoord = coords[mainAxis];
3593 + let crossAxisCoord = coords[crossAxis];
3594 + const clampCoord = (axis, coord) => clamp(coord + overflow[axis === "y" ? "top" : "left"], coord, coord - overflow[axis === "y" ? "bottom" : "right"]);
3595 + if (checkMainAxis) {
3596 + mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
3597 + }
3598 + if (checkCrossAxis) {
3599 + crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
3600 + }
3601 + const limitedCoords = limiter.fn({
3602 + ...state,
3603 + [mainAxis]: mainAxisCoord,
3604 + [crossAxis]: crossAxisCoord
3605 + });
3606 + return {
3607 + ...limitedCoords,
3608 + data: {
3609 + x: limitedCoords.x - x,
3610 + y: limitedCoords.y - y,
3611 + enabled: {
3612 + [mainAxis]: checkMainAxis,
3613 + [crossAxis]: checkCrossAxis
3614 + }
3615 + }
3616 + };
3617 + }
3618 + };
3619 +};
3620 +var limitShift = function(options) {
3621 + if (options === void 0) {
3622 + options = {};
3623 + }
3624 + return {
3625 + options,
3626 + fn(state) {
3627 + var _rawOffset$mainAxis, _rawOffset$crossAxis;
3628 + const {
3629 + x,
3630 + y,
3631 + placement,
3632 + rects,
3633 + middlewareData
3634 + } = state;
3635 + const {
3636 + offset: offset4 = 0,
3637 + mainAxis: checkMainAxis = true,
3638 + crossAxis: checkCrossAxis = true
3639 + } = evaluate(options, state);
3640 + const coords = {
3641 + x,
3642 + y
3643 + };
3644 + const crossAxis = getSideAxis(placement);
3645 + const mainAxis = getOppositeAxis(crossAxis);
3646 + let mainAxisCoord = coords[mainAxis];
3647 + let crossAxisCoord = coords[crossAxis];
3648 + const rawOffset = evaluate(offset4, state);
3649 + const computedOffset = typeof rawOffset === "number" ? {
3650 + mainAxis: rawOffset,
3651 + crossAxis: 0
3652 + } : {
3653 + mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,
3654 + crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0
3655 + };
3656 + if (checkMainAxis) {
3657 + const len = mainAxis === "y" ? "height" : "width";
3658 + const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
3659 + const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
3660 + if (mainAxisCoord < limitMin) {
3661 + mainAxisCoord = limitMin;
3662 + } else if (mainAxisCoord > limitMax) {
3663 + mainAxisCoord = limitMax;
3664 + }
3665 + }
3666 + if (checkCrossAxis) {
3667 + var _middlewareData$offse, _middlewareData$offse2;
3668 + const len = mainAxis === "y" ? "width" : "height";
3669 + const isOriginSide = originSides.has(getSide(placement));
3670 + 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);
3671 + 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);
3672 + if (crossAxisCoord < limitMin) {
3673 + crossAxisCoord = limitMin;
3674 + } else if (crossAxisCoord > limitMax) {
3675 + crossAxisCoord = limitMax;
3676 + }
3677 + }
3678 + return {
3679 + [mainAxis]: mainAxisCoord,
3680 + [crossAxis]: crossAxisCoord
3681 + };
3682 + }
3683 + };
3684 +};
3685 +var size = function(options) {
3686 + if (options === void 0) {
3687 + options = {};
3688 + }
3689 + return {
3690 + name: "size",
3691 + options,
3692 + async fn(state) {
3693 + const {
3694 + placement,
3695 + rects,
3696 + platform: platform3,
3697 + elements
3698 + } = state;
3699 + const {
3700 + apply = () => {
3701 + },
3702 + ...detectOverflowOptions
3703 + } = evaluate(options, state);
3704 + const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3705 + const side = getSide(placement);
3706 + const alignment = getAlignment(placement);
3707 + const isYAxis = getSideAxis(placement) === "y";
3708 + const {
3709 + width,
3710 + height
3711 + } = rects.floating;
3712 + let heightSide;
3713 + let widthSide;
3714 + if (side === "top" || side === "bottom") {
3715 + heightSide = side;
3716 + widthSide = alignment === (await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
3717 + } else {
3718 + widthSide = side;
3719 + heightSide = alignment === "end" ? "top" : "bottom";
3720 + }
3721 + const maximumClippingHeight = height - overflow.top - overflow.bottom;
3722 + const maximumClippingWidth = width - overflow.left - overflow.right;
3723 + const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
3724 + const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
3725 + const shiftData = state.middlewareData.shift;
3726 + const noShift = !shiftData;
3727 + let availableHeight2 = overflowAvailableHeight;
3728 + let availableWidth2 = overflowAvailableWidth;
3729 + if (shiftData != null && shiftData.enabled.x) {
3730 + availableWidth2 = maximumClippingWidth;
3731 + }
3732 + if (shiftData != null && shiftData.enabled.y) {
3733 + availableHeight2 = maximumClippingHeight;
3734 + }
3735 + if (noShift && !alignment) {
3736 + if (isYAxis) {
3737 + availableWidth2 = width - 2 * max(overflow.left, overflow.right);
3738 + } else {
3739 + availableHeight2 = height - 2 * max(overflow.top, overflow.bottom);
3740 + }
3741 + }
3742 + await apply({
3743 + ...state,
3744 + availableWidth: availableWidth2,
3745 + availableHeight: availableHeight2
3746 + });
3747 + const nextDimensions = await platform3.getDimensions(elements.floating);
3748 + if (width !== nextDimensions.width || height !== nextDimensions.height) {
3749 + return {
3750 + reset: {
3751 + rects: true
3752 + }
3753 + };
3754 + }
3755 + return {};
3756 + }
3757 + };
3758 +};
3759 +
3760 +// node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
3761 +function getCssDimensions(element) {
3762 + const css = getComputedStyle2(element);
3763 + let width = parseFloat(css.width) || 0;
3764 + let height = parseFloat(css.height) || 0;
3765 + const hasOffset = isHTMLElement(element);
3766 + const offsetWidth = hasOffset ? element.offsetWidth : width;
3767 + const offsetHeight = hasOffset ? element.offsetHeight : height;
3768 + const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
3769 + if (shouldFallback) {
3770 + width = offsetWidth;
3771 + height = offsetHeight;
3772 + }
3773 + return {
3774 + width,
3775 + height,
3776 + $: shouldFallback
3777 + };
3778 +}
3779 +function unwrapElement(element) {
3780 + return !isElement(element) ? element.contextElement : element;
3781 +}
3782 +function getScale(element) {
3783 + const domElement = unwrapElement(element);
3784 + if (!isHTMLElement(domElement)) {
3785 + return createCoords(1);
3786 + }
3787 + const rect = domElement.getBoundingClientRect();
3788 + const {
3789 + width,
3790 + height,
3791 + $
3792 + } = getCssDimensions(domElement);
3793 + let x = ($ ? round(rect.width) : rect.width) / width;
3794 + let y = ($ ? round(rect.height) : rect.height) / height;
3795 + if (!x || !Number.isFinite(x)) {
3796 + x = 1;
3797 + }
3798 + if (!y || !Number.isFinite(y)) {
3799 + y = 1;
3800 + }
3801 + return {
3802 + x,
3803 + y
3804 + };
3805 +}
3806 +var noOffsets = /* @__PURE__ */ createCoords(0);
3807 +function getVisualOffsets(element) {
3808 + const win = getWindow(element);
3809 + if (!isWebKit() || !win.visualViewport) {
3810 + return noOffsets;
3811 + }
3812 + return {
3813 + x: win.visualViewport.offsetLeft,
3814 + y: win.visualViewport.offsetTop
3815 + };
3816 +}
3817 +function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
3818 + if (isFixed === void 0) {
3819 + isFixed = false;
3820 + }
3821 + return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
3822 +}
3823 +function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
3824 + if (includeScale === void 0) {
3825 + includeScale = false;
3826 + }
3827 + if (isFixedStrategy === void 0) {
3828 + isFixedStrategy = false;
3829 + }
3830 + const clientRect = element.getBoundingClientRect();
3831 + const domElement = unwrapElement(element);
3832 + let scale = createCoords(1);
3833 + if (includeScale) {
3834 + if (offsetParent) {
3835 + if (isElement(offsetParent)) {
3836 + scale = getScale(offsetParent);
3837 + }
3838 + } else {
3839 + scale = getScale(element);
3840 + }
3841 + }
3842 + const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
3843 + let x = (clientRect.left + visualOffsets.x) / scale.x;
3844 + let y = (clientRect.top + visualOffsets.y) / scale.y;
3845 + let width = clientRect.width / scale.x;
3846 + let height = clientRect.height / scale.y;
3847 + if (domElement && offsetParent) {
3848 + const win = getWindow(domElement);
3849 + const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
3850 + let currentWin = win;
3851 + let currentIFrame = getFrameElement(currentWin);
3852 + while (currentIFrame && offsetWin !== currentWin) {
3853 + const iframeScale = getScale(currentIFrame);
3854 + const iframeRect = currentIFrame.getBoundingClientRect();
3855 + const css = getComputedStyle2(currentIFrame);
3856 + const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
3857 + const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
3858 + x *= iframeScale.x;
3859 + y *= iframeScale.y;
3860 + width *= iframeScale.x;
3861 + height *= iframeScale.y;
3862 + x += left;
3863 + y += top;
3864 + currentWin = getWindow(currentIFrame);
3865 + currentIFrame = getFrameElement(currentWin);
3866 + }
3867 + }
3868 + return rectToClientRect({
3869 + width,
3870 + height,
3871 + x,
3872 + y
3873 + });
3874 +}
3875 +function getWindowScrollBarX(element, rect) {
3876 + const leftScroll = getNodeScroll(element).scrollLeft;
3877 + if (!rect) {
3878 + return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
3879 + }
3880 + return rect.left + leftScroll;
3881 +}
3882 +function getHTMLOffset(documentElement, scroll) {
3883 + const htmlRect = documentElement.getBoundingClientRect();
3884 + const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
3885 + const y = htmlRect.top + scroll.scrollTop;
3886 + return {
3887 + x,
3888 + y
3889 + };
3890 +}
3891 +function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
3892 + let {
3893 + elements,
3894 + rect,
3895 + offsetParent,
3896 + strategy
3897 + } = _ref;
3898 + const isFixed = strategy === "fixed";
3899 + const documentElement = getDocumentElement(offsetParent);
3900 + const topLayer = elements ? isTopLayer(elements.floating) : false;
3901 + if (offsetParent === documentElement || topLayer && isFixed) {
3902 + return rect;
3903 + }
3904 + let scroll = {
3905 + scrollLeft: 0,
3906 + scrollTop: 0
3907 + };
3908 + let scale = createCoords(1);
3909 + const offsets = createCoords(0);
3910 + const isOffsetParentAnElement = isHTMLElement(offsetParent);
3911 + if (isOffsetParentAnElement || !isFixed) {
3912 + if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
3913 + scroll = getNodeScroll(offsetParent);
3914 + }
3915 + if (isOffsetParentAnElement) {
3916 + const offsetRect = getBoundingClientRect(offsetParent);
3917 + scale = getScale(offsetParent);
3918 + offsets.x = offsetRect.x + offsetParent.clientLeft;
3919 + offsets.y = offsetRect.y + offsetParent.clientTop;
3920 + }
3921 + }
3922 + const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
3923 + return {
3924 + width: rect.width * scale.x,
3925 + height: rect.height * scale.y,
3926 + x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
3927 + y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
3928 + };
3929 +}
3930 +function getClientRects(element) {
3931 + return element.getClientRects ? Array.from(element.getClientRects()) : [];
3932 +}
3933 +function getDocumentRect(html) {
3934 + const scroll = getNodeScroll(html);
3935 + const body = html.ownerDocument.body;
3936 + const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
3937 + const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
3938 + let x = -scroll.scrollLeft + getWindowScrollBarX(html);
3939 + const y = -scroll.scrollTop;
3940 + if (getComputedStyle2(body).direction === "rtl") {
3941 + x += max(html.clientWidth, body.clientWidth) - width;
3942 + }
3943 + return {
3944 + width,
3945 + height,
3946 + x,
3947 + y
3948 + };
3949 +}
3950 +var SCROLLBAR_MAX = 25;
3951 +function getViewportRect(element, strategy, rootBoundary) {
3952 + if (rootBoundary === void 0) {
3953 + rootBoundary = "viewport";
3954 + }
3955 + const isLayoutViewport = rootBoundary === "layoutViewport";
3956 + const win = getWindow(element);
3957 + const html = getDocumentElement(element);
3958 + const visualViewport = win.visualViewport;
3959 + let width = html.clientWidth;
3960 + let height = html.clientHeight;
3961 + let x = 0;
3962 + let y = 0;
3963 + if (visualViewport) {
3964 + const layoutRelativeClientCoords = !isWebKit() || strategy === "fixed";
3965 + if (isLayoutViewport) {
3966 + if (!layoutRelativeClientCoords) {
3967 + x = -visualViewport.offsetLeft;
3968 + y = -visualViewport.offsetTop;
3969 + }
3970 + } else {
3971 + width = visualViewport.width;
3972 + height = visualViewport.height;
3973 + if (layoutRelativeClientCoords) {
3974 + x = visualViewport.offsetLeft;
3975 + y = visualViewport.offsetTop;
3976 + }
3977 + }
3978 + }
3979 + const windowScrollbarX = getWindowScrollBarX(html);
3980 + if (windowScrollbarX <= 0) {
3981 + const doc = html.ownerDocument;
3982 + const body = doc.body;
3983 + const bodyStyles = getComputedStyle(body);
3984 + const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
3985 + const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
3986 + const gutter = getComputedStyle(html).scrollbarGutter === "stable both-edges" ? reservedWidth / 2 : reservedWidth;
3987 + if (gutter <= SCROLLBAR_MAX) {
3988 + width -= gutter;
3989 + }
3990 + }
3991 + return {
3992 + width,
3993 + height,
3994 + x,
3995 + y
3996 + };
3997 +}
3998 +function getInnerBoundingClientRect(element, strategy) {
3999 + const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
4000 + const top = clientRect.top + element.clientTop;
4001 + const left = clientRect.left + element.clientLeft;
4002 + const scale = getScale(element);
4003 + const width = element.clientWidth * scale.x;
4004 + const height = element.clientHeight * scale.y;
4005 + const x = left * scale.x;
4006 + const y = top * scale.y;
4007 + return {
4008 + width,
4009 + height,
4010 + x,
4011 + y
4012 + };
4013 +}
4014 +function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
4015 + let rect;
4016 + if (clippingAncestor === "viewport" || clippingAncestor === "layoutViewport") {
4017 + rect = getViewportRect(element, strategy, clippingAncestor);
4018 + } else if (clippingAncestor === "document") {
4019 + rect = getDocumentRect(getDocumentElement(element));
4020 + } else if (isElement(clippingAncestor)) {
4021 + rect = getInnerBoundingClientRect(clippingAncestor, strategy);
4022 + } else {
4023 + const visualOffsets = getVisualOffsets(element);
4024 + rect = {
4025 + x: clippingAncestor.x - visualOffsets.x,
4026 + y: clippingAncestor.y - visualOffsets.y,
4027 + width: clippingAncestor.width,
4028 + height: clippingAncestor.height
4029 + };
4030 + }
4031 + return rectToClientRect(rect);
4032 +}
4033 +function getClippingElementAncestors(element, cache) {
4034 + const cachedResult = cache.get(element);
4035 + if (cachedResult) {
4036 + return cachedResult;
4037 + }
4038 + let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
4039 + let lastKeptComputedStyle = null;
4040 + const elementIsFixed = getComputedStyle2(element).position === "fixed";
4041 + let currentNode = elementIsFixed ? getParentNode(element) : element;
4042 + while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
4043 + const computedStyle = getComputedStyle2(currentNode);
4044 + const currentNodeIsContaining = isContainingBlock(currentNode);
4045 + const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? "fixed" : "";
4046 + const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === "fixed" || lastPosition === "absolute" && computedStyle.position === "static");
4047 + if (shouldDropCurrentNode) {
4048 + result = result.filter((ancestor) => ancestor !== currentNode);
4049 + } else {
4050 + lastKeptComputedStyle = computedStyle;
4051 + }
4052 + currentNode = getParentNode(currentNode);
4053 + }
4054 + cache.set(element, result);
4055 + return result;
4056 +}
4057 +function getClippingRect(_ref) {
4058 + let {
4059 + element,
4060 + boundary,
4061 + rootBoundary,
4062 + strategy
4063 + } = _ref;
4064 + const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
4065 + const clippingAncestors = [...elementClippingAncestors, rootBoundary];
4066 + const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
4067 + let top = firstRect.top;
4068 + let right = firstRect.right;
4069 + let bottom = firstRect.bottom;
4070 + let left = firstRect.left;
4071 + for (let i = 1; i < clippingAncestors.length; i++) {
4072 + const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
4073 + top = max(rect.top, top);
4074 + right = min(rect.right, right);
4075 + bottom = min(rect.bottom, bottom);
4076 + left = max(rect.left, left);
4077 + }
4078 + return {
4079 + width: right - left,
4080 + height: bottom - top,
4081 + x: left,
4082 + y: top
4083 + };
4084 +}
4085 +function getDimensions(element) {
4086 + const {
4087 + width,
4088 + height
4089 + } = getCssDimensions(element);
4090 + return {
4091 + width,
4092 + height
4093 + };
4094 +}
4095 +function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
4096 + const isOffsetParentAnElement = isHTMLElement(offsetParent);
4097 + const documentElement = getDocumentElement(offsetParent);
4098 + const isFixed = strategy === "fixed";
4099 + const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
4100 + let scroll = {
4101 + scrollLeft: 0,
4102 + scrollTop: 0
4103 + };
4104 + const offsets = createCoords(0);
4105 + if (isOffsetParentAnElement || !isFixed) {
4106 + if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
4107 + scroll = getNodeScroll(offsetParent);
4108 + }
4109 + if (isOffsetParentAnElement) {
4110 + const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
4111 + offsets.x = offsetRect.x + offsetParent.clientLeft;
4112 + offsets.y = offsetRect.y + offsetParent.clientTop;
4113 + }
4114 + }
4115 + if (!isOffsetParentAnElement && documentElement) {
4116 + offsets.x = getWindowScrollBarX(documentElement);
4117 + }
4118 + const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
4119 + const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
4120 + const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
4121 + return {
4122 + x,
4123 + y,
4124 + width: rect.width,
4125 + height: rect.height
4126 + };
4127 +}
4128 +function isStaticPositioned(element) {
4129 + return getComputedStyle2(element).position === "static";
4130 +}
4131 +function getTrueOffsetParent(element, polyfill) {
4132 + if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") {
4133 + return null;
4134 + }
4135 + if (polyfill) {
4136 + return polyfill(element);
4137 + }
4138 + let rawOffsetParent = element.offsetParent;
4139 + if (getDocumentElement(element) === rawOffsetParent) {
4140 + rawOffsetParent = rawOffsetParent.ownerDocument.body;
4141 + }
4142 + return rawOffsetParent;
4143 +}
4144 +function getOffsetParent(element, polyfill) {
4145 + const win = getWindow(element);
4146 + if (isTopLayer(element)) {
4147 + return win;
4148 + }
4149 + if (!isHTMLElement(element)) {
4150 + let svgOffsetParent = getParentNode(element);
4151 + while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
4152 + if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
4153 + return svgOffsetParent;
4154 + }
4155 + svgOffsetParent = getParentNode(svgOffsetParent);
4156 + }
4157 + return win;
4158 + }
4159 + let offsetParent = getTrueOffsetParent(element, polyfill);
4160 + while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
4161 + offsetParent = getTrueOffsetParent(offsetParent, polyfill);
4162 + }
4163 + if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
4164 + return win;
4165 + }
4166 + return offsetParent || getContainingBlock(element) || win;
4167 +}
4168 +var getElementRects = async function(data) {
4169 + const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
4170 + const getDimensionsFn = this.getDimensions;
4171 + const floatingDimensions = await getDimensionsFn(data.floating);
4172 + return {
4173 + reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
4174 + floating: {
4175 + x: 0,
4176 + y: 0,
4177 + width: floatingDimensions.width,
4178 + height: floatingDimensions.height
4179 + }
4180 + };
4181 +};
4182 +function isRTL(element) {
4183 + return getComputedStyle2(element).direction === "rtl";
4184 +}
4185 +var platform2 = {
4186 + convertOffsetParentRelativeRectToViewportRelativeRect,
4187 + getDocumentElement,
4188 + getClippingRect,
4189 + getOffsetParent,
4190 + getElementRects,
4191 + getClientRects,
4192 + getDimensions,
4193 + getScale,
4194 + isElement,
4195 + isRTL
4196 +};
4197 +function rectsAreEqual(a, b) {
4198 + return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
4199 +}
4200 +function observeMove(element, onMove, ancestorResize) {
4201 + let io = null;
4202 + let timeoutId;
4203 + const root = getDocumentElement(element);
4204 + function cleanup() {
4205 + var _io;
4206 + clearTimeout(timeoutId);
4207 + (_io = io) == null || _io.disconnect();
4208 + io = null;
4209 + }
4210 + function refresh(skip, threshold) {
4211 + if (skip === void 0) {
4212 + skip = false;
4213 + }
4214 + if (threshold === void 0) {
4215 + threshold = 1;
4216 + }
4217 + cleanup();
4218 + const elementRectForRootMargin = element.getBoundingClientRect();
4219 + const {
4220 + left,
4221 + top,
4222 + width,
4223 + height
4224 + } = elementRectForRootMargin;
4225 + if (!skip) {
4226 + onMove();
4227 + }
4228 + if (!width || !height) {
4229 + return;
4230 + }
4231 + const insetTop = floor(top);
4232 + const insetRight = floor(root.clientWidth - (left + width));
4233 + const insetBottom = floor(root.clientHeight - (top + height));
4234 + const insetLeft = floor(left);
4235 + const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
4236 + const options = {
4237 + rootMargin,
4238 + threshold: max(0, min(1, threshold)) || 1
4239 + };
4240 + let isFirstUpdate = true;
4241 + function handleObserve(entries) {
4242 + const ratio = entries[0].intersectionRatio;
4243 + if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
4244 + return refresh();
4245 + }
4246 + if (ratio !== threshold) {
4247 + if (!isFirstUpdate) {
4248 + return refresh();
4249 + }
4250 + if (!ratio) {
4251 + timeoutId = setTimeout(() => {
4252 + refresh(false, 1e-7);
4253 + }, 1e3);
4254 + } else {
4255 + refresh(false, ratio);
4256 + }
4257 + }
4258 + isFirstUpdate = false;
4259 + }
4260 + try {
4261 + io = new IntersectionObserver(handleObserve, {
4262 + ...options,
4263 + // Handle <iframe>s
4264 + root: root.ownerDocument
4265 + });
4266 + } catch (_e) {
4267 + io = new IntersectionObserver(handleObserve, options);
4268 + }
4269 + io.observe(element);
4270 + }
4271 + const win = getWindow(element);
4272 + const handleResize = () => refresh(ancestorResize);
4273 + win.addEventListener("resize", handleResize);
4274 + refresh(true);
4275 + return () => {
4276 + win.removeEventListener("resize", handleResize);
4277 + cleanup();
4278 + };
4279 +}
4280 +function autoUpdate(reference, floating, update2, options) {
4281 + if (options === void 0) {
4282 + options = {};
4283 + }
4284 + const {
4285 + ancestorScroll = true,
4286 + ancestorResize = true,
4287 + elementResize = typeof ResizeObserver === "function",
4288 + layoutShift = typeof IntersectionObserver === "function",
4289 + animationFrame = false
4290 + } = options;
4291 + const referenceEl = unwrapElement(reference);
4292 + const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
4293 + ancestors.forEach((ancestor) => {
4294 + ancestorScroll && ancestor.addEventListener("scroll", update2);
4295 + ancestorResize && ancestor.addEventListener("resize", update2);
4296 + });
4297 + const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update2, ancestorResize) : null;
4298 + let reobserveFrame = -1;
4299 + let resizeObserver = null;
4300 + if (elementResize) {
4301 + resizeObserver = new ResizeObserver((_ref) => {
4302 + let [firstEntry] = _ref;
4303 + if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
4304 + resizeObserver.unobserve(floating);
4305 + cancelAnimationFrame(reobserveFrame);
4306 + reobserveFrame = requestAnimationFrame(() => {
4307 + var _resizeObserver;
4308 + (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
4309 + });
4310 + }
4311 + update2();
4312 + });
4313 + if (referenceEl && !animationFrame) {
4314 + resizeObserver.observe(referenceEl);
4315 + }
4316 + if (floating) {
4317 + resizeObserver.observe(floating);
4318 + }
4319 + }
4320 + let frameId;
4321 + let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
4322 + if (animationFrame) {
4323 + frameLoop();
4324 + }
4325 + function frameLoop() {
4326 + const nextRefRect = getBoundingClientRect(reference);
4327 + if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
4328 + update2();
4329 + }
4330 + prevRefRect = nextRefRect;
4331 + frameId = requestAnimationFrame(frameLoop);
4332 + }
4333 + update2();
4334 + return () => {
4335 + var _resizeObserver2;
4336 + ancestors.forEach((ancestor) => {
4337 + ancestorScroll && ancestor.removeEventListener("scroll", update2);
4338 + ancestorResize && ancestor.removeEventListener("resize", update2);
4339 + });
4340 + cleanupIo == null || cleanupIo();
4341 + (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
4342 + resizeObserver = null;
4343 + if (animationFrame) {
4344 + cancelAnimationFrame(frameId);
4345 + }
4346 + };
4347 +}
4348 +var offset2 = offset;
4349 +var shift2 = shift;
4350 +var flip2 = flip;
4351 +var size2 = size;
4352 +var limitShift2 = limitShift;
4353 +var computePosition2 = (reference, floating, options) => {
4354 + const cache = /* @__PURE__ */ new Map();
4355 + const mergedOptions = options != null ? options : {};
4356 + const platformWithCache = {
4357 + ...platform2,
4358 + ...mergedOptions.platform,
4359 + _c: cache
4360 + };
4361 + return computePosition(reference, floating, {
4362 + ...mergedOptions,
4363 + platform: platformWithCache
4364 + });
4365 +};
4366 +
4367 +// node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
4368 +var React17 = __toESM(require_react(), 1);
4369 +var import_react2 = __toESM(require_react(), 1);
4370 +var ReactDOM3 = __toESM(require_react_dom(), 1);
4371 +var isClient = typeof document !== "undefined";
4372 +var noop2 = function noop3() {
4373 +};
4374 +var index = isClient ? import_react2.useLayoutEffect : noop2;
4375 +function deepEqual(a, b) {
4376 + if (a === b) {
4377 + return true;
4378 + }
4379 + if (typeof a !== typeof b) {
4380 + return false;
4381 + }
4382 + if (typeof a === "function" && a.toString() === b.toString()) {
4383 + return true;
4384 + }
4385 + let length;
4386 + let i;
4387 + let keys;
4388 + if (a && b && typeof a === "object") {
4389 + if (Array.isArray(a)) {
4390 + length = a.length;
4391 + if (length !== b.length) return false;
4392 + for (i = length; i-- !== 0; ) {
4393 + if (!deepEqual(a[i], b[i])) {
4394 + return false;
4395 + }
4396 + }
4397 + return true;
4398 + }
4399 + keys = Object.keys(a);
4400 + length = keys.length;
4401 + if (length !== Object.keys(b).length) {
4402 + return false;
4403 + }
4404 + for (i = length; i-- !== 0; ) {
4405 + if (!{}.hasOwnProperty.call(b, keys[i])) {
4406 + return false;
4407 + }
4408 + }
4409 + for (i = length; i-- !== 0; ) {
4410 + const key = keys[i];
4411 + if (key === "_owner" && a.$$typeof) {
4412 + continue;
4413 + }
4414 + if (!deepEqual(a[key], b[key])) {
4415 + return false;
4416 + }
4417 + }
4418 + return true;
4419 + }
4420 + return a !== a && b !== b;
4421 +}
4422 +function getDPR(element) {
4423 + if (typeof window === "undefined") {
4424 + return 1;
4425 + }
4426 + const win = element.ownerDocument.defaultView || window;
4427 + return win.devicePixelRatio || 1;
4428 +}
4429 +function roundByDPR(element, value) {
4430 + const dpr = getDPR(element);
4431 + return Math.round(value * dpr) / dpr;
4432 +}
4433 +function useLatestRef(value) {
4434 + const ref = React17.useRef(value);
4435 + index(() => {
4436 + ref.current = value;
4437 + });
4438 + return ref;
4439 +}
4440 +function useFloating(options) {
4441 + if (options === void 0) {
4442 + options = {};
4443 + }
4444 + const {
4445 + placement = "bottom",
4446 + strategy = "absolute",
4447 + middleware = [],
4448 + platform: platform3,
4449 + elements: {
4450 + reference: externalReference,
4451 + floating: externalFloating
4452 + } = {},
4453 + transform = true,
4454 + whileElementsMounted,
4455 + open: open2
4456 + } = options;
4457 + const [data, setData] = React17.useState({
4458 + x: 0,
4459 + y: 0,
4460 + strategy,
4461 + placement,
4462 + middlewareData: {},
4463 + isPositioned: false
4464 + });
4465 + const [latestMiddleware, setLatestMiddleware] = React17.useState(middleware);
4466 + if (!deepEqual(latestMiddleware, middleware)) {
4467 + setLatestMiddleware(middleware);
4468 + }
4469 + const [_reference, _setReference] = React17.useState(null);
4470 + const [_floating, _setFloating] = React17.useState(null);
4471 + const setReference = React17.useCallback((node) => {
4472 + if (node !== referenceRef.current) {
4473 + referenceRef.current = node;
4474 + _setReference(node);
4475 + }
4476 + }, []);
4477 + const setFloating = React17.useCallback((node) => {
4478 + if (node !== floatingRef.current) {
4479 + floatingRef.current = node;
4480 + _setFloating(node);
4481 + }
4482 + }, []);
4483 + const referenceEl = externalReference || _reference;
4484 + const floatingEl = externalFloating || _floating;
4485 + const referenceRef = React17.useRef(null);
4486 + const floatingRef = React17.useRef(null);
4487 + const dataRef = React17.useRef(data);
4488 + const hasWhileElementsMounted = whileElementsMounted != null;
4489 + const whileElementsMountedRef = useLatestRef(whileElementsMounted);
4490 + const platformRef = useLatestRef(platform3);
4491 + const openRef = useLatestRef(open2);
4492 + const update2 = React17.useCallback(() => {
4493 + if (!referenceRef.current || !floatingRef.current) {
4494 + return;
4495 + }
4496 + const config = {
4497 + placement,
4498 + strategy,
4499 + middleware: latestMiddleware
4500 + };
4501 + if (platformRef.current) {
4502 + config.platform = platformRef.current;
4503 + }
4504 + computePosition2(referenceRef.current, floatingRef.current, config).then((data2) => {
4505 + const fullData = {
4506 + ...data2,
4507 + // The floating element's position may be recomputed while it's closed
4508 + // but still mounted (such as when transitioning out). To ensure
4509 + // `isPositioned` will be `false` initially on the next open, avoid
4510 + // setting it to `true` when `open === false` (must be specified).
4511 + isPositioned: openRef.current !== false
4512 + };
4513 + if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
4514 + dataRef.current = fullData;
4515 + ReactDOM3.flushSync(() => {
4516 + setData(fullData);
4517 + });
4518 + }
4519 + });
4520 + }, [latestMiddleware, placement, strategy, platformRef, openRef]);
4521 + index(() => {
4522 + if (open2 === false && dataRef.current.isPositioned) {
4523 + dataRef.current.isPositioned = false;
4524 + setData((data2) => ({
4525 + ...data2,
4526 + isPositioned: false
4527 + }));
4528 + }
4529 + }, [open2]);
4530 + const isMountedRef = React17.useRef(false);
4531 + index(() => {
4532 + isMountedRef.current = true;
4533 + return () => {
4534 + isMountedRef.current = false;
4535 + };
4536 + }, []);
4537 + index(() => {
4538 + if (referenceEl) referenceRef.current = referenceEl;
4539 + if (floatingEl) floatingRef.current = floatingEl;
4540 + if (referenceEl && floatingEl) {
4541 + if (whileElementsMountedRef.current) {
4542 + return whileElementsMountedRef.current(referenceEl, floatingEl, update2);
4543 + }
4544 + update2();
4545 + }
4546 + }, [referenceEl, floatingEl, update2, whileElementsMountedRef, hasWhileElementsMounted]);
4547 + const refs = React17.useMemo(() => ({
4548 + reference: referenceRef,
4549 + floating: floatingRef,
4550 + setReference,
4551 + setFloating
4552 + }), [setReference, setFloating]);
4553 + const elements = React17.useMemo(() => ({
4554 + reference: referenceEl,
4555 + floating: floatingEl
4556 + }), [referenceEl, floatingEl]);
4557 + const floatingStyles = React17.useMemo(() => {
4558 + const initialStyles = {
4559 + position: strategy,
4560 + left: 0,
4561 + top: 0
4562 + };
4563 + if (!elements.floating) {
4564 + return initialStyles;
4565 + }
4566 + const x = roundByDPR(elements.floating, data.x);
4567 + const y = roundByDPR(elements.floating, data.y);
4568 + if (transform) {
4569 + return {
4570 + ...initialStyles,
4571 + transform: "translate(" + x + "px, " + y + "px)",
4572 + ...getDPR(elements.floating) >= 1.5 && {
4573 + willChange: "transform"
4574 + }
4575 + };
4576 + }
4577 + return {
4578 + position: strategy,
4579 + left: x,
4580 + top: y
4581 + };
4582 + }, [strategy, transform, elements.floating, data.x, data.y]);
4583 + return React17.useMemo(() => ({
4584 + ...data,
4585 + update: update2,
4586 + refs,
4587 + elements,
4588 + floatingStyles
4589 + }), [data, update2, refs, elements, floatingStyles]);
4590 +}
4591 +var offset3 = (options, deps) => {
4592 + const result = offset2(options);
4593 + return {
4594 + name: result.name,
4595 + fn: result.fn,
4596 + options: [options, deps]
4597 + };
4598 +};
4599 +var shift3 = (options, deps) => {
4600 + const result = shift2(options);
4601 + return {
4602 + name: result.name,
4603 + fn: result.fn,
4604 + options: [options, deps]
4605 + };
4606 +};
4607 +var limitShift3 = (options, deps) => {
4608 + const result = limitShift2(options);
4609 + return {
4610 + fn: result.fn,
4611 + options: [options, deps]
4612 + };
4613 +};
4614 +var flip3 = (options, deps) => {
4615 + const result = flip2(options);
4616 + return {
4617 + name: result.name,
4618 + fn: result.fn,
4619 + options: [options, deps]
4620 + };
4621 +};
4622 +var size3 = (options, deps) => {
4623 + const result = size2(options);
4624 + return {
4625 + name: result.name,
4626 + fn: result.fn,
4627 + options: [options, deps]
4628 + };
4629 +};
4630 +
4631 +// node_modules/@base-ui/react/utils/popups/popupHandle.mjs
4632 +var BasePopupHandle = class {
4633 + /**
4634 + * Stores of every root currently using this handle, in attach order. A handle is meant to be used
4635 + * by a single mounted root, but roots can transiently overlap (e.g. during an animated route
4636 + * transition), so this stack lets `attachStore`'s cleanup restore the previous root instead of
4637 + * leaving a still-mounted root uncontrollable when a newer overlapping root detaches first.
4638 + */
4639 + attachedStores = [];
4640 + /**
4641 + * Store of the root that currently controls the handle: the most recently attached one still
4642 + * mounted, or `null` when no root is attached. Imperative methods are no-ops while this is `null`.
4643 + */
4644 + attachedStoreValue = null;
4645 + /**
4646 + * Listeners notified when `attachedStore` changes, so detached triggers can follow the store pointer.
4647 + */
4648 + storeListeners = /* @__PURE__ */ new Set();
4649 + /**
4650 + * Creates a handle backed by the store used while no root is attached.
4651 + *
4652 + * @param fallbackStore Inert, closed store handed to detached triggers while no root is attached,
4653 + * so they can render and register without a mounted root. Triggers register into whichever store
4654 + * `store` currently resolves to, so while detached they live in this store's trigger map and
4655 + * migrate themselves to the root's store (and back) as it attaches/detaches.
4656 + * @param componentName Component name used to prefix dev warnings, e.g. `'Menu'` produces
4657 + * `MenuHandle.open()` in warning text.
4658 + * @param throwOnMissingTrigger Whether `open(triggerId)` throws when no trigger with that id is
4659 + * registered. Anchored popups (Menu, Popover, Tooltip, PreviewCard) need a trigger to anchor to,
4660 + * so they throw; Dialog is not anchored and instead opens unassociated with a dev warning.
4661 + */
4662 + constructor(fallbackStore, componentName, throwOnMissingTrigger = true) {
4663 + this.fallbackStore = fallbackStore;
4664 + this.componentName = componentName;
4665 + this.throwOnMissingTrigger = throwOnMissingTrigger;
4666 + }
4667 + get attachedStore() {
4668 + return this.attachedStoreValue;
4669 + }
4670 + /**
4671 + * Store that detached triggers read from: the attached root's store, or an inert fallback store
4672 + * used while no root is attached.
4673 + * @internal
4674 + */
4675 + get store() {
4676 + return this.attachedStoreValue ?? this.fallbackStore;
4677 + }
4678 + /**
4679 + * Stable fallback store used for server rendering and hydration. Root stores cannot be recorded on
4680 + * the handle during render because a handle can be shared by concurrent server-rendered requests.
4681 + * @internal
4682 + */
4683 + get serverStore() {
4684 + return this.fallbackStore;
4685 + }
4686 + /**
4687 + * Subscribes to changes of the attached store pointer so detached triggers re-render and re-bind
4688 + * when a root attaches or detaches. Returns a function that removes the listener.
4689 + * @internal
4690 + */
4691 + subscribeStore(listener) {
4692 + this.storeListeners.add(listener);
4693 + return () => {
4694 + this.storeListeners.delete(listener);
4695 + };
4696 + }
4697 + /**
4698 + * Points the handle at a root's store and notifies subscribers so detached triggers re-render and
4699 + * re-register into it (their registration effect migrates them when the store pointer changes).
4700 + * Returns a cleanup function that detaches the store again.
4701 + * @internal
4702 + */
4703 + attachStore(newStore) {
4704 + this.attachedStores.push(newStore);
4705 + this.setActiveStore(newStore);
4706 + if (true) {
4707 + if (this.attachedStores.length > 1) {
4708 + const dev = this;
4709 + (dev.overlapWarningFrame ??= AnimationFrame.create()).request(() => {
4710 + if (this.attachedStores.length > 1) {
4711 + 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.");
4712 + }
4713 + });
4714 + }
4715 + }
4716 + return () => {
4717 + const index2 = this.attachedStores.lastIndexOf(newStore);
4718 + if (index2 !== -1) {
4719 + this.attachedStores.splice(index2, 1);
4720 + }
4721 + this.setActiveStore(this.attachedStores[this.attachedStores.length - 1] ?? null);
4722 + };
4723 + }
4724 + /**
4725 + * Sets the store that currently controls the handle and notifies subscribers when it changes, so
4726 + * detached triggers re-render and migrate their registration to the new store.
4727 + */
4728 + setActiveStore(store2) {
4729 + if (this.attachedStoreValue !== store2) {
4730 + this.attachedStoreValue = store2;
4731 + this.storeListeners.forEach((listener) => {
4732 + listener();
4733 + });
4734 + }
4735 + }
4736 + /**
4737 + * Opens the attached root's store and associates it with the trigger with the given id, or a
4738 + * no-op (with a dev warning) while no root is attached. Shared by every concrete handle's public
4739 + * `open()` method, which only narrows the parameter type.
4740 + *
4741 + * When a trigger id is given but no matching trigger is registered, anchored popups throw (see
4742 + * `throwOnMissingTrigger`); Dialog opens unassociated with a dev warning instead.
4743 + *
4744 + * This method should only be called in an event handler or an effect (not during rendering).
4745 + *
4746 + * @param triggerId ID of the trigger to associate with the popup, or `null`/`undefined` to open
4747 + * without associating any trigger.
4748 + */
4749 + openByTrigger(triggerId) {
4750 + const attachedStore = this.attachedStore;
4751 + if (attachedStore === null) {
4752 + if (true) {
4753 + 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.`);
4754 + }
4755 + return;
4756 + }
4757 + let triggerElement;
4758 + if (triggerId) {
4759 + for (let i = this.attachedStores.length - 1; i >= 0 && !triggerElement; i -= 1) {
4760 + triggerElement = this.attachedStores[i].context.triggerElements.getById(triggerId);
4761 + }
4762 + triggerElement ??= this.fallbackStore.context.triggerElements.getById(triggerId);
4763 + }
4764 + if (triggerId && !triggerElement) {
4765 + if (this.throwOnMissingTrigger) {
4766 + 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));
4767 + }
4768 + if (true) {
4769 + 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.`);
4770 + }
4771 + }
4772 + attachedStore.setOpen(true, createChangeEventDetails(reason_parts_exports.imperativeAction, void 0, triggerElement));
4773 + }
4774 + /**
4775 + * Closes the popup by setting the attached root's store to closed, or a no-op (with a dev warning)
4776 + * while no root is attached. Shared by every concrete handle's public `close()` method.
4777 + *
4778 + * This method should only be called in an event handler or an effect (not during rendering).
4779 + */
4780 + closePopup() {
4781 + const attachedStore = this.attachedStore;
4782 + if (attachedStore === null) {
4783 + if (true) {
4784 + console.warn(`Base UI: ${this.componentName}Handle.close() was called while no root using this handle is mounted. The call was ignored.`);
4785 + }
4786 + return;
4787 + }
4788 + attachedStore.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction));
4789 + }
4790 +};
4791 +
4792 +// node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
4793 +var React22 = __toESM(require_react(), 1);
4794 +var ReactDOM4 = __toESM(require_react_dom(), 1);
4795 +
4796 +// node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
4797 +var React21 = __toESM(require_react(), 1);
4798 +
4799 +// node_modules/@base-ui/utils/store/useStore.mjs
4800 +var React19 = __toESM(require_react(), 1);
4801 +var import_shim = __toESM(require_shim(), 1);
4802 +var import_with_selector = __toESM(require_with_selector(), 1);
4803 +
4804 +// node_modules/@base-ui/utils/fastHooks.mjs
4805 +var React18 = __toESM(require_react(), 1);
4806 +var hooks = [];
4807 +var currentInstance = void 0;
4808 +function getInstance() {
4809 + return currentInstance;
4810 +}
4811 +function register(hook) {
4812 + hooks.push(hook);
4813 +}
4814 +function fastComponent(fn) {
4815 + const FastComponent = (props, forwardedRef) => {
4816 + const instance = useRefWithInit(createInstance).current;
4817 + let result;
4818 + try {
4819 + currentInstance = instance;
4820 + for (const hook of hooks) {
4821 + hook.before(instance);
4822 + }
4823 + result = fn(props, forwardedRef);
4824 + for (const hook of hooks) {
4825 + hook.after(instance);
4826 + }
4827 + instance.didInitialize = true;
4828 + } finally {
4829 + currentInstance = void 0;
4830 + }
4831 + return result;
4832 + };
4833 + FastComponent.displayName = fn.displayName || fn.name;
4834 + return FastComponent;
4835 +}
4836 +function fastComponentRef(fn) {
4837 + return /* @__PURE__ */ React18.forwardRef(fastComponent(fn));
4838 +}
4839 +function createInstance() {
4840 + return {
4841 + didInitialize: false
4842 + };
4843 +}
4844 +
4845 +// node_modules/@base-ui/utils/store/useStore.mjs
4846 +var canUseRawUseSyncExternalStore = isReactVersionAtLeast(19);
4847 +var useStoreImplementation = canUseRawUseSyncExternalStore ? useStoreFast : useStoreLegacy;
4848 +function useStore(store2, selector, a1, a2, a3) {
4849 + return useStoreImplementation(store2, selector, a1, a2, a3);
4850 +}
4851 +function useStoreR19(store2, selector, a1, a2, a3) {
4852 + const getSelection = React19.useCallback(() => selector(store2.getSnapshot(), a1, a2, a3), [store2, selector, a1, a2, a3]);
4853 + return (0, import_shim.useSyncExternalStore)(store2.subscribe, getSelection, getSelection);
4854 +}
4855 +register({
4856 + before(instance) {
4857 + instance.syncIndex = 0;
4858 + if (!instance.didInitialize) {
4859 + instance.syncTick = 1;
4860 + instance.syncHooks = [];
4861 + instance.didChangeStore = true;
4862 + instance.getSnapshot = () => {
4863 + let didChange2 = false;
4864 + for (let i = 0; i < instance.syncHooks.length; i += 1) {
4865 + const hook = instance.syncHooks[i];
4866 + const value = hook.selector(hook.store.state, hook.a1, hook.a2, hook.a3);
4867 + if (!Object.is(hook.value, value)) {
4868 + didChange2 = true;
4869 + hook.value = value;
4870 + }
4871 + }
4872 + if (didChange2) {
4873 + instance.syncTick += 1;
4874 + }
4875 + return instance.syncTick;
4876 + };
4877 + }
4878 + },
4879 + after(instance) {
4880 + if (instance.syncHooks.length > 0) {
4881 + if (instance.didChangeStore) {
4882 + instance.didChangeStore = false;
4883 + instance.subscribe = (onStoreChange) => {
4884 + const stores = /* @__PURE__ */ new Set();
4885 + for (const hook of instance.syncHooks) {
4886 + stores.add(hook.store);
4887 + }
4888 + const unsubscribes = [];
4889 + for (const store2 of stores) {
4890 + unsubscribes.push(store2.subscribe(onStoreChange));
4891 + }
4892 + return () => {
4893 + for (const unsubscribe of unsubscribes) {
4894 + unsubscribe();
4895 + }
4896 + };
4897 + };
4898 + }
4899 + (0, import_shim.useSyncExternalStore)(instance.subscribe, instance.getSnapshot, instance.getSnapshot);
4900 + }
4901 + }
4902 +});
4903 +function useStoreFast(store2, selector, a1, a2, a3) {
4904 + const instance = getInstance();
4905 + if (!instance) {
4906 + return useStoreR19(store2, selector, a1, a2, a3);
4907 + }
4908 + const index2 = instance.syncIndex;
4909 + instance.syncIndex += 1;
4910 + let hook;
4911 + if (!instance.didInitialize) {
4912 + hook = {
4913 + store: store2,
4914 + selector,
4915 + a1,
4916 + a2,
4917 + a3,
4918 + value: selector(store2.getSnapshot(), a1, a2, a3)
4919 + };
4920 + instance.syncHooks.push(hook);
4921 + } else {
4922 + hook = instance.syncHooks[index2];
4923 + if (hook.store !== store2 || hook.selector !== selector || !Object.is(hook.a1, a1) || !Object.is(hook.a2, a2) || !Object.is(hook.a3, a3)) {
4924 + if (hook.store !== store2) {
4925 + instance.didChangeStore = true;
4926 + }
4927 + hook.store = store2;
4928 + hook.selector = selector;
4929 + hook.a1 = a1;
4930 + hook.a2 = a2;
4931 + hook.a3 = a3;
4932 + hook.value = selector(store2.getSnapshot(), a1, a2, a3);
4933 + }
4934 + }
4935 + return hook.value;
4936 +}
4937 +function useStoreLegacy(store2, selector, a1, a2, a3) {
4938 + return (0, import_with_selector.useSyncExternalStoreWithSelector)(store2.subscribe, store2.getSnapshot, store2.getSnapshot, (state) => selector(state, a1, a2, a3));
4939 +}
4940 +
4941 +// node_modules/@base-ui/utils/store/Store.mjs
4942 +var Store = class {
4943 + /**
4944 + * Creates a store with the given initial state, constructing the class it is called on.
4945 + * Calling it on a generic base class (e.g. `ReactStore.create(...)`) constructs that
4946 + * class but degrades the inferred instance type to `Store`; use `new` there instead.
4947 + */
4948 + static create(state) {
4949 + return new this(state);
4950 + }
4951 + /**
4952 + * The current state of the store.
4953 + * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.
4954 + * 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).
4955 + * The values can be used directly (to avoid subscribing to the store) in effects or event handlers.
4956 + *
4957 + * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.
4958 + */
4959 + // Internal state to handle recursive `setState()` calls
4960 + constructor(state) {
4961 + this.state = state;
4962 + this.listeners = /* @__PURE__ */ new Set();
4963 + this.updateTick = 0;
4964 + }
4965 + /**
4966 + * Registers a listener that will be called whenever the store's state changes.
4967 + *
4968 + * @param fn The listener function to be called on state changes.
4969 + * @returns A function to unsubscribe the listener.
4970 + */
4971 + subscribe = (fn) => {
4972 + this.listeners.add(fn);
4973 + return () => {
4974 + this.listeners.delete(fn);
4975 + };
4976 + };
4977 + /**
4978 + * Returns the current state of the store.
4979 + */
4980 + getSnapshot = () => {
4981 + return this.state;
4982 + };
4983 + /**
4984 + * Updates the entire store's state and notifies all registered listeners.
4985 + *
4986 + * @param newState The new state to set for the store.
4987 + */
4988 + setState(newState) {
4989 + if (this.state === newState) {
4990 + return;
4991 + }
4992 + this.state = newState;
4993 + this.updateTick += 1;
4994 + const currentTick = this.updateTick;
4995 + for (const listener of this.listeners) {
4996 + if (currentTick !== this.updateTick) {
4997 + return;
4998 + }
4999 + listener(newState);
5000 + }
5001 + }
5002 + /**
5003 + * Merges the provided changes into the current state and notifies listeners if there are changes.
5004 + * Each value must match its state key. Pass an exact known subset rather than a broad
5005 + * `Partial<State>`, which may contain `undefined` for required state fields.
5006 + *
5007 + * @param changes An object containing the changes to apply to the current state.
5008 + */
5009 + update(changes) {
5010 + for (const key in changes) {
5011 + if (!Object.is(this.state[key], changes[key])) {
5012 + this.setState({
5013 + ...this.state,
5014 + ...changes
5015 + });
5016 + return;
5017 + }
5018 + }
5019 + }
5020 + /**
5021 + * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.
5022 + *
5023 + * @param key The key in the store's state to update.
5024 + * @param value The new value to set for the specified key.
5025 + */
5026 + set(key, value) {
5027 + if (!Object.is(this.state[key], value)) {
5028 + this.setState({
5029 + ...this.state,
5030 + [key]: value
5031 + });
5032 + }
5033 + }
5034 + /**
5035 + * Gives the state a new reference and updates all registered listeners.
5036 + */
5037 + notifyAll() {
5038 + const newState = {
5039 + ...this.state
5040 + };
5041 + this.setState(newState);
5042 + }
5043 + use(selector, a1, a2, a3) {
5044 + return useStore(this, selector, a1, a2, a3);
5045 + }
5046 +};
5047 +
5048 +// node_modules/@base-ui/utils/store/ReactStore.mjs
5049 +var React20 = __toESM(require_react(), 1);
5050 +var ReactStore = class extends Store {
5051 + /**
5052 + * Creates a new ReactStore instance.
5053 + *
5054 + * @param state Initial state of the store.
5055 + * @param context Non-reactive context values.
5056 + * @param selectors Optional selectors for use with `useState`.
5057 + */
5058 + constructor(state, context = {}, selectors3) {
5059 + super(state);
5060 + this.context = context;
5061 + this.selectors = selectors3;
5062 + }
5063 + /**
5064 + * Non-reactive values such as refs, callbacks, etc.
5065 + */
5066 + /**
5067 + * Synchronizes a single external value into the store.
5068 + *
5069 + * Note that the while the value in `state` is updated immediately, the value returned
5070 + * by `useState` is updated before the next render (similarly to React's `useState`).
5071 + */
5072 + useSyncedValue(key, value) {
5073 + React20.useDebugValue(key);
5074 + const store2 = this;
5075 + useIsoLayoutEffect(() => {
5076 + if (store2.state[key] !== value) {
5077 + store2.set(key, value);
5078 + }
5079 + }, [store2, key, value]);
5080 + }
5081 + /**
5082 + * Synchronizes a single external value into the store and
5083 + * cleans it up (sets to `undefined`) on unmount.
5084 + *
5085 + * Note that the while the value in `state` is updated immediately, the value returned
5086 + * by `useState` is updated before the next render (similarly to React's `useState`).
5087 + */
5088 + useSyncedValueWithCleanup(key, value) {
5089 + const store2 = this;
5090 + useIsoLayoutEffect(() => {
5091 + if (store2.state[key] !== value) {
5092 + store2.set(key, value);
5093 + }
5094 + return () => {
5095 + store2.set(key, void 0);
5096 + };
5097 + }, [store2, key, value]);
5098 + }
5099 + /**
5100 + * Synchronizes multiple external values into the store.
5101 + * Each value must match its state key. Pass an exact known subset rather than a broad
5102 + * `Partial<State>`, which may contain `undefined` for required state fields.
5103 + *
5104 + * Note that the while the values in `state` are updated immediately, the values returned
5105 + * by `useState` are updated before the next render (similarly to React's `useState`).
5106 + *
5107 + * @param statePart An exact subset of state fields to synchronize. Unknown keys are not accepted.
5108 + */
5109 + useSyncedValues(statePart) {
5110 + const store2 = this;
5111 + if (true) {
5112 + React20.useDebugValue(statePart, (p) => Object.keys(p));
5113 + const keys = React20.useRef(Object.keys(statePart)).current;
5114 + const nextKeys = Object.keys(statePart);
5115 + if (keys.length !== nextKeys.length || keys.some((key, index2) => key !== nextKeys[index2])) {
5116 + console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
5117 + }
5118 + }
5119 + const dependencies = Object.values(statePart);
5120 + useIsoLayoutEffect(() => {
5121 + store2.update(statePart);
5122 + }, [store2, ...dependencies]);
5123 + }
5124 + /**
5125 + * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`
5126 + * is non-undefined, the store's state at `key` is updated to match `controlled`.
5127 + */
5128 + useControlledProp(key, controlled) {
5129 + React20.useDebugValue(key);
5130 + const store2 = this;
5131 + const isControlled = controlled !== void 0;
5132 + useIsoLayoutEffect(() => {
5133 + if (isControlled && !Object.is(store2.state[key], controlled)) {
5134 + store2.setState({
5135 + ...store2.state,
5136 + [key]: controlled
5137 + });
5138 + }
5139 + }, [store2, key, controlled, isControlled]);
5140 + if (true) {
5141 + const cache = this.controlledValues ??= /* @__PURE__ */ new Map();
5142 + if (!cache.has(key)) {
5143 + cache.set(key, isControlled);
5144 + }
5145 + const previouslyControlled = cache.get(key);
5146 + if (previouslyControlled !== void 0 && previouslyControlled !== isControlled) {
5147 + 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).`);
5148 + }
5149 + }
5150 + }
5151 + /** Gets the current value from the store using a selector with the provided key.
5152 + *
5153 + * @param key Key of the selector to use.
5154 + */
5155 + select(key, a1, a2, a3) {
5156 + const selector = this.selectors[key];
5157 + return selector(this.state, a1, a2, a3);
5158 + }
5159 + /**
5160 + * Returns a value from the store's state using a selector function.
5161 + * Used to subscribe to specific parts of the state.
5162 + * This methods causes a rerender whenever the selected state changes.
5163 + *
5164 + * @param key Key of the selector to use.
5165 + */
5166 + useState(key, a1, a2, a3) {
5167 + React20.useDebugValue(key);
5168 + return useStore(this, this.selectors[key], a1, a2, a3);
5169 + }
5170 + /**
5171 + * Wraps a function with `useStableCallback` to ensure it has a stable reference
5172 + * and assigns it to the context.
5173 + *
5174 + * @param key Key of the event callback. Must be a function in the context.
5175 + * @param fn Function to assign.
5176 + */
5177 + useContextCallback(key, fn) {
5178 + React20.useDebugValue(key);
5179 + const stableFunction = useStableCallback(fn ?? NOOP);
5180 + this.context[key] = stableFunction;
5181 + }
5182 + /**
5183 + * Returns a stable setter function for a specific key in the store's state.
5184 + * It's commonly used to pass as a ref callback to React elements.
5185 + *
5186 + * @param key Key of the state to set.
5187 + */
5188 + useStateSetter(key) {
5189 + const ref = React20.useRef(void 0);
5190 + if (ref.current === void 0) {
5191 + ref.current = (value) => {
5192 + this.set(key, value);
5193 + };
5194 + }
5195 + return ref.current;
5196 + }
5197 + /**
5198 + * Observes changes derived from the store's selectors and calls the listener when the selected value changes.
5199 + *
5200 + * @param key Key of the selector to observe.
5201 + * @param listener Listener function called when the selector result changes.
5202 + */
5203 + observe(selector, listener) {
5204 + let selectFn;
5205 + if (typeof selector === "function") {
5206 + selectFn = selector;
5207 + } else {
5208 + selectFn = this.selectors[selector];
5209 + }
5210 + let prevValue = selectFn(this.state);
5211 + listener(prevValue, prevValue, this);
5212 + return this.subscribe((nextState) => {
5213 + const nextValue = selectFn(nextState);
5214 + if (!Object.is(prevValue, nextValue)) {
5215 + const oldValue = prevValue;
5216 + prevValue = nextValue;
5217 + listener(nextValue, oldValue, this);
5218 + }
5219 + });
5220 + }
5221 +};
5222 +
5223 +// node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs
5224 +var selectors = {
5225 + open: (state) => state.open,
5226 + transitionStatus: (state) => state.transitionStatus,
5227 + domReferenceElement: (state) => state.domReferenceElement,
5228 + referenceElement: (state) => state.positionReference ?? state.referenceElement,
5229 + floatingElement: (state) => state.floatingElement,
5230 + floatingId: (state) => state.floatingId
5231 +};
5232 +var FloatingRootStore = class extends ReactStore {
5233 + constructor(options) {
5234 + const {
5235 + syncOnly,
5236 + nested,
5237 + onOpenChange,
5238 + triggerElements,
5239 + ...initialState2
5240 + } = options;
5241 + super({
5242 + ...initialState2,
5243 + positionReference: initialState2.referenceElement,
5244 + domReferenceElement: initialState2.referenceElement
5245 + }, {
5246 + onOpenChange,
5247 + dataRef: {
5248 + current: {}
5249 + },
5250 + events: createEventEmitter(),
5251 + nested,
5252 + triggerElements
5253 + }, selectors);
5254 + this.syncOnly = syncOnly;
5255 + }
5256 + /**
5257 + * Syncs the event used by hover logic to distinguish hover-open from click-like interaction.
5258 + */
5259 + syncOpenEvent = (newOpen, event) => {
5260 + if (!newOpen || !this.state.open || // Prevent a pending hover-open from overwriting a click-open event, while allowing
5261 + // click events to upgrade a hover-open.
5262 + event != null && isClickLikeEvent(event)) {
5263 + this.context.dataRef.current.openEvent = newOpen ? event : void 0;
5264 + }
5265 + };
5266 + /**
5267 + * Runs the root-owned side effects for an open state change.
5268 + */
5269 + dispatchOpenChange = (newOpen, eventDetails) => {
5270 + this.syncOpenEvent(newOpen, eventDetails.event);
5271 + const details = {
5272 + open: newOpen,
5273 + reason: eventDetails.reason,
5274 + nativeEvent: eventDetails.event,
5275 + nested: this.context.nested,
5276 + triggerElement: eventDetails.trigger
5277 + };
5278 + this.context.events.emit("openchange", details);
5279 + };
5280 + /**
5281 + * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.
5282 + *
5283 + * @param newOpen The new open state.
5284 + * @param eventDetails Details about the event that triggered the open state change.
5285 + */
5286 + setOpen = (newOpen, eventDetails) => {
5287 + if (this.syncOnly) {
5288 + this.context.onOpenChange?.(newOpen, eventDetails);
5289 + return;
5290 + }
5291 + this.dispatchOpenChange(newOpen, eventDetails);
5292 + this.context.onOpenChange?.(newOpen, eventDetails);
5293 + };
5294 +};
5295 +
5296 +// node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
5297 +function useSyncedFloatingRootContext(options) {
5298 + const {
5299 + popupStore,
5300 + treatPopupAsFloatingElement = false,
5301 + floatingRootContext: floatingRootContextProp,
5302 + floatingId,
5303 + nested,
5304 + onOpenChange
5305 + } = options;
5306 + const open2 = popupStore.useState("open");
5307 + const referenceElement = popupStore.useState("activeTriggerElement");
5308 + const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? "popupElement" : "positionerElement");
5309 + const triggerElements = popupStore.context.triggerElements;
5310 + const handleOpenChange = onOpenChange;
5311 + const internalStoreRef = React21.useRef(null);
5312 + if (floatingRootContextProp === void 0 && internalStoreRef.current === null) {
5313 + internalStoreRef.current = new FloatingRootStore({
5314 + open: open2,
5315 + transitionStatus: void 0,
5316 + referenceElement,
5317 + floatingElement,
5318 + triggerElements,
5319 + onOpenChange: handleOpenChange,
5320 + floatingId,
5321 + syncOnly: true,
5322 + nested
5323 + });
5324 + }
5325 + const store2 = floatingRootContextProp ?? internalStoreRef.current;
5326 + popupStore.useSyncedValue("floatingId", floatingId);
5327 + useIsoLayoutEffect(() => {
5328 + const valuesToSync = {
5329 + open: open2,
5330 + floatingId,
5331 + referenceElement,
5332 + floatingElement
5333 + };
5334 + if (isElement(referenceElement)) {
5335 + valuesToSync.domReferenceElement = referenceElement;
5336 + }
5337 + if (store2.state.positionReference === store2.state.referenceElement) {
5338 + valuesToSync.positionReference = referenceElement;
5339 + }
5340 + store2.update(valuesToSync);
5341 + }, [open2, floatingId, referenceElement, floatingElement, store2]);
5342 + store2.context.onOpenChange = handleOpenChange;
5343 + store2.context.nested = nested;
5344 + return store2;
5345 +}
5346 +
5347 +// node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
5348 +var FOCUSABLE_POPUP_PROPS = {
5349 + tabIndex: -1,
5350 + [FOCUSABLE_ATTRIBUTE]: ""
5351 +};
5352 +function usePopupRootStore(createStore, treatPopupAsFloatingElement = false) {
5353 + const floatingId = useId();
5354 + const nested = useFloatingParentNodeId() != null;
5355 + const store2 = useRefWithInit(() => createStore(floatingId, nested)).current;
5356 + useSyncedFloatingRootContext({
5357 + popupStore: store2,
5358 + treatPopupAsFloatingElement,
5359 + floatingRootContext: store2.state.floatingRootContext,
5360 + floatingId,
5361 + nested,
5362 + onOpenChange: store2.setOpen
5363 + });
5364 + return store2;
5365 +}
5366 +function PopupHandleAttachment({
5367 + handle,
5368 + store: store2
5369 +}) {
5370 + useIsoLayoutEffect(() => {
5371 + return handle.attachStore(store2);
5372 + }, [handle, store2]);
5373 + return null;
5374 +}
5375 +function syncTriggerCount(store2) {
5376 + const triggerCount = store2.context.triggerElements.size;
5377 + if (store2.select("open") && store2.state.triggerCount !== triggerCount) {
5378 + store2.set("triggerCount", triggerCount);
5379 + }
5380 +}
5381 +function useTriggerRegistration(id, store2) {
5382 + const registrationRef = React22.useRef(null);
5383 + return useStableCallback((element) => {
5384 + const registration = registrationRef.current;
5385 + if (registration !== null) {
5386 + if (registration.element === element && registration.store === store2 && registration.id === id) {
5387 + return;
5388 + }
5389 + registrationRef.current = null;
5390 + const registeredStore = registration.store;
5391 + if (registeredStore.context.triggerElements.getById(registration.id) === registration.element) {
5392 + registeredStore.context.triggerElements.delete(registration.id);
5393 + syncTriggerCount(registeredStore);
5394 + }
5395 + }
5396 + if (element !== null && id !== void 0) {
5397 + registrationRef.current = {
5398 + store: store2,
5399 + id,
5400 + element
5401 + };
5402 + store2.context.triggerElements.add(id, element);
5403 + syncTriggerCount(store2);
5404 + }
5405 + });
5406 +}
5407 +function createPopupOpenState(state, open2, trigger, preventUnmountOnClose = false) {
5408 + let preventUnmountingOnClose = state.preventUnmountingOnClose;
5409 + if (open2) {
5410 + preventUnmountingOnClose = false;
5411 + } else if (preventUnmountOnClose) {
5412 + preventUnmountingOnClose = true;
5413 + }
5414 + const triggerId = trigger?.id ?? null;
5415 + let activeTriggerId = state.activeTriggerId;
5416 + let activeTriggerElement = state.activeTriggerElement;
5417 + if (triggerId || open2) {
5418 + activeTriggerId = triggerId;
5419 + activeTriggerElement = trigger ?? null;
5420 + }
5421 + return {
5422 + open: open2,
5423 + preventUnmountingOnClose,
5424 + activeTriggerId,
5425 + activeTriggerElement
5426 + };
5427 +}
5428 +function attachPreventUnmountOnClose(eventDetails) {
5429 + let preventUnmountOnClose = false;
5430 + eventDetails.preventUnmountOnClose = () => {
5431 + preventUnmountOnClose = true;
5432 + };
5433 + return () => preventUnmountOnClose;
5434 +}
5435 +function applyPopupOpenChange(store2, nextOpen, eventDetails, options = {}) {
5436 + const reason = eventDetails.reason;
5437 + const isHover = reason === reason_parts_exports.triggerHover;
5438 + const isFocusOpen = nextOpen && reason === reason_parts_exports.triggerFocus;
5439 + const isDismissClose = !nextOpen && (reason === reason_parts_exports.triggerPress || reason === reason_parts_exports.escapeKey);
5440 + const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);
5441 + store2.context.onOpenChange?.(nextOpen, eventDetails);
5442 + if (eventDetails.isCanceled) {
5443 + return;
5444 + }
5445 + options.onBeforeDispatch?.();
5446 + store2.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);
5447 + const changeState = () => {
5448 + const popupOpenState = createPopupOpenState(store2.state, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());
5449 + const updatedState = {
5450 + ...options.extraState,
5451 + ...popupOpenState
5452 + };
5453 + if (isFocusOpen) {
5454 + updatedState.instantType = "focus";
5455 + } else if (isDismissClose) {
5456 + updatedState.instantType = "dismiss";
5457 + } else if (isHover) {
5458 + updatedState.instantType = void 0;
5459 + }
5460 + store2.update(updatedState);
5461 + };
5462 + if (isHover) {
5463 + ReactDOM4.flushSync(changeState);
5464 + } else {
5465 + changeState();
5466 + }
5467 +}
5468 +function useTriggerDataForwarding(triggerId, triggerElementRef, store2, stateUpdates) {
5469 + const isMountedByThisTrigger = store2.useState("isMountedByTrigger", triggerId);
5470 + const baseRegisterTrigger = useTriggerRegistration(triggerId, store2);
5471 + const applyTriggerData = useStableCallback((element) => {
5472 + const open2 = store2.select("open");
5473 + const activeTriggerId = store2.select("activeTriggerId");
5474 + if (activeTriggerId === triggerId) {
5475 + const changes = {
5476 + activeTriggerElement: element,
5477 + ...open2 ? stateUpdates : null
5478 + };
5479 + store2.update(changes);
5480 + return;
5481 + }
5482 + if (activeTriggerId == null && open2) {
5483 + const changes = {
5484 + activeTriggerId: triggerId ?? null,
5485 + activeTriggerElement: element,
5486 + ...stateUpdates
5487 + };
5488 + store2.update(changes);
5489 + }
5490 + });
5491 + const registerTrigger = useStableCallback((element) => {
5492 + baseRegisterTrigger(element);
5493 + if (element) {
5494 + applyTriggerData(element);
5495 + }
5496 + });
5497 + useIsoLayoutEffect(() => {
5498 + registerTrigger(triggerElementRef.current);
5499 + return () => registerTrigger(null);
5500 + }, [registerTrigger, triggerElementRef, store2, triggerId]);
5501 + useIsoLayoutEffect(() => {
5502 + if (isMountedByThisTrigger) {
5503 + const changes = {
5504 + activeTriggerElement: triggerElementRef.current,
5505 + ...stateUpdates
5506 + };
5507 + store2.update(changes);
5508 + }
5509 + }, [isMountedByThisTrigger, store2, triggerElementRef, ...Object.values(stateUpdates)]);
5510 + return {
5511 + registerTrigger,
5512 + isMountedByThisTrigger
5513 + };
5514 +}
5515 +function useImplicitActiveTrigger(store2, options = {}) {
5516 + const {
5517 + closeOnActiveTriggerUnmount = false
5518 + } = options;
5519 + const resolvedActiveTriggerIdRef = React22.useRef(null);
5520 + const open2 = store2.useState("open");
5521 + const reactiveTriggerCount = store2.useState("triggerCount");
5522 + const activeTriggerId = store2.useState("activeTriggerId");
5523 + const reactiveActiveTriggerElement = store2.useState("activeTriggerElement");
5524 + useIsoLayoutEffect(() => {
5525 + if (!open2) {
5526 + resolvedActiveTriggerIdRef.current = null;
5527 + if (store2.state.triggerCount !== 0) {
5528 + store2.set("triggerCount", 0);
5529 + }
5530 + return;
5531 + }
5532 + const triggerCount = store2.context.triggerElements.size;
5533 + const stateUpdates = {};
5534 + if (store2.state.triggerCount !== triggerCount) {
5535 + stateUpdates.triggerCount = triggerCount;
5536 + }
5537 + const currentActiveTriggerId = store2.select("activeTriggerId");
5538 + let lostActiveTriggerId = null;
5539 + if (currentActiveTriggerId) {
5540 + const activeTriggerElement = store2.context.triggerElements.getById(currentActiveTriggerId);
5541 + if (!activeTriggerElement) {
5542 + for (const [triggerId, triggerElement] of store2.context.triggerElements.entries()) {
5543 + if (triggerElement === store2.state.activeTriggerElement) {
5544 + stateUpdates.activeTriggerId = triggerId;
5545 + stateUpdates.activeTriggerElement = triggerElement;
5546 + resolvedActiveTriggerIdRef.current = triggerId;
5547 + break;
5548 + }
5549 + }
5550 + if (stateUpdates.activeTriggerId === void 0) {
5551 + if (resolvedActiveTriggerIdRef.current === currentActiveTriggerId) {
5552 + lostActiveTriggerId = currentActiveTriggerId;
5553 + } else {
5554 + resolvedActiveTriggerIdRef.current = null;
5555 + }
5556 + }
5557 + } else {
5558 + resolvedActiveTriggerIdRef.current = currentActiveTriggerId;
5559 + if (activeTriggerElement !== store2.state.activeTriggerElement) {
5560 + stateUpdates.activeTriggerElement = activeTriggerElement;
5561 + }
5562 + }
5563 + } else {
5564 + resolvedActiveTriggerIdRef.current = null;
5565 + }
5566 + if (!lostActiveTriggerId && !currentActiveTriggerId && triggerCount === 1) {
5567 + const iteratorResult = store2.context.triggerElements.entries().next();
5568 + if (!iteratorResult.done) {
5569 + const [implicitTriggerId, implicitTriggerElement] = iteratorResult.value;
5570 + stateUpdates.activeTriggerId = implicitTriggerId;
5571 + stateUpdates.activeTriggerElement = implicitTriggerElement;
5572 + resolvedActiveTriggerIdRef.current = implicitTriggerId;
5573 + }
5574 + }
5575 + if (stateUpdates.triggerCount !== void 0 || stateUpdates.activeTriggerId !== void 0 || stateUpdates.activeTriggerElement !== void 0) {
5576 + store2.update(stateUpdates);
5577 + }
5578 + if (lostActiveTriggerId) {
5579 + if (closeOnActiveTriggerUnmount) {
5580 + queueMicrotask(() => {
5581 + if (store2.select("open") && store2.select("activeTriggerId") === lostActiveTriggerId && !store2.context.triggerElements.getById(lostActiveTriggerId)) {
5582 + const eventDetails = createChangeEventDetails(reason_parts_exports.none);
5583 + store2.setOpen(false, eventDetails);
5584 + if (!eventDetails.isCanceled) {
5585 + store2.update({
5586 + activeTriggerId: null,
5587 + activeTriggerElement: null
5588 + });
5589 + }
5590 + }
5591 + });
5592 + }
5593 + }
5594 + }, [open2, store2, reactiveTriggerCount, activeTriggerId, reactiveActiveTriggerElement, closeOnActiveTriggerUnmount]);
5595 +}
5596 +function useOpenStateTransitions(open2, store2, onUnmount, animateInitialOpen) {
5597 + const {
5598 + mounted,
5599 + setMounted,
5600 + transitionStatus
5601 + } = useTransitionStatus(open2, false, false, animateInitialOpen);
5602 + const preventUnmountingOnClose = store2.useState("preventUnmountingOnClose");
5603 + const syncedPreventUnmountingOnClose = open2 ? false : preventUnmountingOnClose;
5604 + store2.useSyncedValues({
5605 + mounted,
5606 + transitionStatus,
5607 + preventUnmountingOnClose: syncedPreventUnmountingOnClose
5608 + });
5609 + const forceUnmount = useStableCallback(() => {
5610 + setMounted(false);
5611 + store2.update({
5612 + activeTriggerId: null,
5613 + activeTriggerElement: null,
5614 + mounted: false,
5615 + preventUnmountingOnClose: false
5616 + });
5617 + onUnmount?.();
5618 + store2.context.onOpenChangeComplete?.(false);
5619 + });
5620 + useOpenChangeComplete({
5621 + enabled: mounted && !open2 && !syncedPreventUnmountingOnClose,
5622 + open: open2,
5623 + ref: store2.context.popupRef,
5624 + onComplete() {
5625 + if (!open2) {
5626 + forceUnmount();
5627 + }
5628 + }
5629 + });
5630 + return {
5631 + forceUnmount,
5632 + transitionStatus
5633 + };
5634 +}
5635 +function usePopupInteractionProps(store2, statePart) {
5636 + store2.useSyncedValues(statePart);
5637 + useIsoLayoutEffect(() => () => {
5638 + store2.update({
5639 + activeTriggerProps: EMPTY_OBJECT,
5640 + inactiveTriggerProps: EMPTY_OBJECT,
5641 + popupProps: EMPTY_OBJECT
5642 + });
5643 + }, [store2]);
5644 +}
5645 +
5646 +// node_modules/@base-ui/react/utils/popups/popupTriggerMap.mjs
5647 +var devElementIdsByMap;
5648 +function getDevElementIds(map) {
5649 + devElementIdsByMap ??= /* @__PURE__ */ new WeakMap();
5650 + let elementIds = devElementIdsByMap.get(map);
5651 + if (!elementIds) {
5652 + elementIds = /* @__PURE__ */ new WeakMap();
5653 + devElementIdsByMap.set(map, elementIds);
5654 + }
5655 + return elementIds;
5656 +}
5657 +var PopupTriggerMap = class {
5658 + constructor() {
5659 + this.idMap = /* @__PURE__ */ new Map();
5660 + }
5661 + /**
5662 + * Adds a trigger element with the given ID.
5663 + *
5664 + * Note: The provided element is assumed to not be registered under multiple IDs.
5665 + */
5666 + add(id, element) {
5667 + if (true) {
5668 + const elementIds = getDevElementIds(this);
5669 + const existingId = elementIds.get(element);
5670 + if (existingId !== void 0 && existingId !== id) {
5671 + throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");
5672 + }
5673 + const previousElement = this.idMap.get(id);
5674 + if (previousElement !== void 0 && previousElement !== element) {
5675 + elementIds.delete(previousElement);
5676 + }
5677 + elementIds.set(element, id);
5678 + }
5679 + this.idMap.set(id, element);
5680 + }
5681 + /**
5682 + * Removes the trigger element with the given ID.
5683 + */
5684 + delete(id) {
5685 + if (true) {
5686 + const element = this.idMap.get(id);
5687 + if (element !== void 0) {
5688 + devElementIdsByMap?.get(this)?.delete(element);
5689 + }
5690 + }
5691 + this.idMap.delete(id);
5692 + }
5693 + /**
5694 + * Whether the given element is registered as a trigger.
5695 + */
5696 + hasElement(element) {
5697 + for (const registered of this.idMap.values()) {
5698 + if (registered === element) {
5699 + return true;
5700 + }
5701 + }
5702 + return false;
5703 + }
5704 + /**
5705 + * Whether there is a registered trigger element matching the given predicate.
5706 + */
5707 + hasMatchingElement(predicate) {
5708 + for (const element of this.idMap.values()) {
5709 + if (predicate(element)) {
5710 + return true;
5711 + }
5712 + }
5713 + return false;
5714 + }
5715 + /**
5716 + * Returns the trigger element associated with the given ID, or undefined if no such element exists.
5717 + */
5718 + getById(id) {
5719 + return this.idMap.get(id);
5720 + }
5721 + /**
5722 + * Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element].
5723 + */
5724 + entries() {
5725 + return this.idMap.entries();
5726 + }
5727 + /**
5728 + * Returns an iterable of all registered trigger elements.
5729 + */
5730 + elements() {
5731 + return this.idMap.values();
5732 + }
5733 + /**
5734 + * Returns the number of registered trigger elements.
5735 + */
5736 + get size() {
5737 + return this.idMap.size;
5738 + }
5739 +};
5740 +
5741 +// node_modules/@base-ui/react/utils/popups/store.mjs
5742 +function createInitialPopupStoreState(triggerElements, floatingId, nested = false) {
5743 + return {
5744 + open: false,
5745 + openProp: void 0,
5746 + mounted: false,
5747 + transitionStatus: void 0,
5748 + floatingRootContext: new FloatingRootStore({
5749 + open: false,
5750 + transitionStatus: void 0,
5751 + floatingElement: null,
5752 + referenceElement: null,
5753 + triggerElements,
5754 + floatingId,
5755 + syncOnly: true,
5756 + nested,
5757 + onOpenChange: void 0
5758 + }),
5759 + floatingId,
5760 + triggerCount: 0,
5761 + preventUnmountingOnClose: false,
5762 + payload: void 0,
5763 + activeTriggerId: null,
5764 + activeTriggerElement: null,
5765 + triggerIdProp: void 0,
5766 + popupElement: null,
5767 + positionerElement: null,
5768 + activeTriggerProps: EMPTY_OBJECT,
5769 + inactiveTriggerProps: EMPTY_OBJECT,
5770 + popupProps: EMPTY_OBJECT
5771 + };
5772 +}
5773 +var activeTriggerIdSelector = (state) => state.triggerIdProp ?? state.activeTriggerId;
5774 +var openSelector = (state) => state.openProp ?? state.open;
5775 +var popupIdSelector = (state) => {
5776 + const popupId = state.popupElement?.id ?? state.floatingId;
5777 + return popupId || void 0;
5778 +};
5779 +function triggerOwnsOpenPopup(state, triggerId) {
5780 + return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) === triggerId;
5781 +}
5782 +function triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) {
5783 + if (triggerOwnsOpenPopup(state, triggerId)) {
5784 + return true;
5785 + }
5786 + return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) == null && state.triggerCount === 1;
5787 +}
5788 +var popupStoreSelectors = {
5789 + open: openSelector,
5790 + mounted: (state) => state.mounted,
5791 + transitionStatus: (state) => state.transitionStatus,
5792 + floatingRootContext: (state) => state.floatingRootContext,
5793 + triggerCount: (state) => state.triggerCount,
5794 + preventUnmountingOnClose: (state) => state.preventUnmountingOnClose,
5795 + payload: (state) => state.payload,
5796 + activeTriggerId: activeTriggerIdSelector,
5797 + activeTriggerElement: (state) => state.mounted ? state.activeTriggerElement : null,
5798 + popupId: popupIdSelector,
5799 + /**
5800 + * Whether the trigger with the given ID was used to open the popup.
5801 + */
5802 + isTriggerActive: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId,
5803 + /**
5804 + * Whether the popup is open and was activated by a trigger with the given ID.
5805 + */
5806 + isOpenedByTrigger: (state, triggerId) => triggerOwnsOpenPopup(state, triggerId),
5807 + /**
5808 + * Whether the popup is mounted and was activated by a trigger with the given ID.
5809 + */
5810 + isMountedByTrigger: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId && state.mounted,
5811 + triggerProps: (state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps,
5812 + /**
5813 + * Popup id for the trigger that currently owns the open popup.
5814 + */
5815 + triggerPopupId: (state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : void 0,
5816 + popupProps: (state) => state.popupProps,
5817 + popupElement: (state) => state.popupElement,
5818 + positionerElement: (state) => state.positionerElement
5819 +};
5820 +
5821 +// node_modules/@base-ui/react/utils/popups/usePopupHandleStore.mjs
5822 +var React23 = __toESM(require_react(), 1);
5823 +var import_shim2 = __toESM(require_shim(), 1);
5824 +function usePopupHandleStore(handle) {
5825 + const subscribe = React23.useCallback((listener) => {
5826 + if (handle === void 0) {
5827 + return NOOP;
5828 + }
5829 + return handle.subscribeStore(listener);
5830 + }, [handle]);
5831 + const getSnapshot = React23.useCallback(() => {
5832 + return handle === void 0 ? void 0 : handle.store;
5833 + }, [handle]);
5834 + return (0, import_shim2.useSyncExternalStore)(subscribe, getSnapshot, () => handle?.serverStore);
5835 +}
5836 +
5837 +// node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
5838 +function useBaseUIFloating(options) {
5839 + return useFloatingWithStore(options, options.rootContext);
5840 +}
5841 +function useFloatingWithStore(options, store2) {
5842 + const {
5843 + nodeId,
5844 + externalTree
5845 + } = options;
5846 + const referenceElement = store2.useState("referenceElement");
5847 + const floatingElement = store2.useState("floatingElement");
5848 + const domReferenceElement = store2.useState("domReferenceElement");
5849 + const open2 = store2.useState("open");
5850 + const floatingId = store2.useState("floatingId");
5851 + const [positionReference, setPositionReferenceRaw] = React24.useState(null);
5852 + const [localDomReference, setLocalDomReference] = React24.useState(void 0);
5853 + const [localFloatingElement, setLocalFloatingElement] = React24.useState(void 0);
5854 + const domReferenceRef = React24.useRef(null);
5855 + const tree = useFloatingTree(externalTree);
5856 + const storeElements = React24.useMemo(() => ({
5857 + reference: referenceElement,
5858 + floating: floatingElement,
5859 + domReference: domReferenceElement
5860 + }), [referenceElement, floatingElement, domReferenceElement]);
5861 + const position = useFloating({
5862 + ...options,
5863 + elements: {
5864 + ...storeElements,
5865 + ...positionReference && {
5866 + reference: positionReference
5867 + }
5868 + }
5869 + });
5870 + const localDomReferenceElement = isElement(localDomReference) ? localDomReference : null;
5871 + const syncedFloatingElement = localFloatingElement === void 0 ? store2.state.floatingElement : localFloatingElement;
5872 + store2.useSyncedValue("referenceElement", localDomReference ?? null);
5873 + store2.useSyncedValue("domReferenceElement", localDomReference === void 0 ? domReferenceElement : localDomReferenceElement);
5874 + store2.useSyncedValue("floatingElement", syncedFloatingElement);
5875 + const setPositionReference = React24.useCallback((node) => {
5876 + const computedPositionReference = isElement(node) ? {
5877 + getBoundingClientRect: () => node.getBoundingClientRect(),
5878 + getClientRects: () => node.getClientRects(),
5879 + contextElement: node
5880 + } : node;
5881 + setPositionReferenceRaw(computedPositionReference);
5882 + position.refs.setReference(computedPositionReference);
5883 + }, [position.refs]);
5884 + const setReference = React24.useCallback((node) => {
5885 + if (isElement(node) || node === null) {
5886 + domReferenceRef.current = node;
5887 + setLocalDomReference(node);
5888 + }
5889 + if (isElement(position.refs.reference.current) || position.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
5890 + // `null` to support `positionReference` + an unstable `reference`
5891 + // callback ref.
5892 + node !== null && !isElement(node)) {
5893 + position.refs.setReference(node);
5894 + }
5895 + }, [position.refs, setLocalDomReference]);
5896 + const setFloating = React24.useCallback((node) => {
5897 + setLocalFloatingElement(node);
5898 + position.refs.setFloating(node);
5899 + }, [position.refs]);
5900 + const refs = React24.useMemo(() => ({
5901 + ...position.refs,
5902 + setReference,
5903 + setFloating,
5904 + setPositionReference,
5905 + domReference: domReferenceRef
5906 + }), [position.refs, setReference, setFloating, setPositionReference]);
5907 + const elements = React24.useMemo(() => ({
5908 + ...position.elements,
5909 + domReference: domReferenceElement
5910 + }), [position.elements, domReferenceElement]);
5911 + const context = React24.useMemo(() => ({
5912 + ...position,
5913 + dataRef: store2.context.dataRef,
5914 + open: open2,
5915 + onOpenChange: store2.setOpen,
5916 + events: store2.context.events,
5917 + floatingId,
5918 + refs,
5919 + elements,
5920 + nodeId,
5921 + rootStore: store2
5922 + }), [position, refs, elements, nodeId, store2, open2, floatingId]);
5923 + useIsoLayoutEffect(() => {
5924 + if (domReferenceElement) {
5925 + domReferenceRef.current = domReferenceElement;
5926 + }
5927 + }, [domReferenceElement]);
5928 + useIsoLayoutEffect(() => {
5929 + store2.context.dataRef.current.floatingContext = context;
5930 + const node = tree?.nodesRef.current.find((n) => n.id === nodeId);
5931 + if (node) {
5932 + node.context = context;
5933 + }
5934 + });
5935 + return React24.useMemo(() => ({
5936 + ...position,
5937 + context,
5938 + refs,
5939 + elements,
5940 + rootStore: store2
5941 + }), [position, refs, elements, context, store2]);
5942 +}
5943 +
5944 +// node_modules/@base-ui/react/floating-ui-react/hooks/useFocus.mjs
5945 +var React25 = __toESM(require_react(), 1);
5946 +var isMacSafari = parts_exports.os.mac && parts_exports.engine.webkit;
5947 +function useFocus(context, props = {}) {
5948 + const {
5949 + enabled = true,
5950 + delay
5951 + } = props;
5952 + const store2 = "rootStore" in context ? context.rootStore : context;
5953 + const {
5954 + events,
5955 + dataRef
5956 + } = store2.context;
5957 + const blockFocusRef = React25.useRef(false);
5958 + const blockedReferenceRef = React25.useRef(null);
5959 + const keyboardModalityRef = React25.useRef(true);
5960 + const timeout = useTimeout();
5961 + React25.useEffect(() => {
5962 + const domReference = store2.select("domReferenceElement");
5963 + if (!enabled) {
5964 + return void 0;
5965 + }
5966 + const win = getWindow(domReference);
5967 + function onBlur() {
5968 + const currentDomReference = store2.select("domReferenceElement");
5969 + if (!store2.select("open") && isHTMLElement(currentDomReference) && currentDomReference === activeElement(ownerDocument(currentDomReference))) {
5970 + blockFocusRef.current = true;
5971 + blockedReferenceRef.current = currentDomReference;
5972 + }
5973 + }
5974 + function onKeyDown() {
5975 + keyboardModalityRef.current = true;
5976 + }
5977 + function onPointerDown() {
5978 + keyboardModalityRef.current = false;
5979 + }
5980 + return mergeCleanups(addEventListener(win, "blur", onBlur), isMacSafari && addEventListener(win, "keydown", onKeyDown, true), isMacSafari && addEventListener(win, "pointerdown", onPointerDown, true));
5981 + }, [store2, enabled]);
5982 + React25.useEffect(() => {
5983 + if (!enabled) {
5984 + return void 0;
5985 + }
5986 + function onOpenChangeLocal(details) {
5987 + if (details.reason === reason_parts_exports.triggerPress || details.reason === reason_parts_exports.escapeKey) {
5988 + const referenceElement = store2.select("domReferenceElement");
5989 + if (isElement(referenceElement)) {
5990 + blockedReferenceRef.current = referenceElement;
5991 + blockFocusRef.current = true;
5992 + }
5993 + }
5994 + }
5995 + events.on("openchange", onOpenChangeLocal);
5996 + return () => {
5997 + events.off("openchange", onOpenChangeLocal);
5998 + };
5999 + }, [events, enabled, store2]);
6000 + const reference = React25.useMemo(() => {
6001 + function resetBlockedFocus() {
6002 + blockFocusRef.current = false;
6003 + blockedReferenceRef.current = null;
6004 + }
6005 + return {
6006 + onMouseLeave() {
6007 + resetBlockedFocus();
6008 + },
6009 + onFocus(event) {
6010 + const focusTarget = event.currentTarget;
6011 + if (blockFocusRef.current) {
6012 + if (blockedReferenceRef.current === focusTarget) {
6013 + return;
6014 + }
6015 + resetBlockedFocus();
6016 + }
6017 + const target = getTarget(event.nativeEvent);
6018 + if (isElement(target)) {
6019 + if (isMacSafari && !event.relatedTarget) {
6020 + if (!keyboardModalityRef.current && !isTypeableElement(target)) {
6021 + return;
6022 + }
6023 + } else if (!matchesFocusVisible(target)) {
6024 + return;
6025 + }
6026 + }
6027 + const movedFromOtherEnabledTrigger = isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements);
6028 + const {
6029 + nativeEvent,
6030 + currentTarget
6031 + } = event;
6032 + const delayValue = typeof delay === "function" ? delay() : delay;
6033 + if (store2.select("open") && movedFromOtherEnabledTrigger || delayValue === 0 || delayValue === void 0) {
6034 + store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
6035 + return;
6036 + }
6037 + timeout.start(delayValue, () => {
6038 + if (blockFocusRef.current) {
6039 + return;
6040 + }
6041 + store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
6042 + });
6043 + },
6044 + onBlur(event) {
6045 + resetBlockedFocus();
6046 + const relatedTarget = event.relatedTarget;
6047 + const nativeEvent = event.nativeEvent;
6048 + const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute("focus-guard")) && relatedTarget.getAttribute("data-type") === "outside";
6049 + timeout.start(0, () => {
6050 + const domReference = store2.select("domReferenceElement");
6051 + const activeEl = activeElement(ownerDocument(domReference));
6052 + if (!relatedTarget && activeEl === domReference) {
6053 + return;
6054 + }
6055 + if (contains(dataRef.current.floatingContext?.refs.floating.current, activeEl) || contains(domReference, activeEl) || movedToFocusGuard) {
6056 + return;
6057 + }
6058 + const nextFocusedElement = relatedTarget ?? activeEl;
6059 + if (isTargetInsideEnabledTrigger(nextFocusedElement, store2.context.triggerElements)) {
6060 + return;
6061 + }
6062 + store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent));
6063 + });
6064 + }
6065 + };
6066 + }, [dataRef, delay, store2, timeout]);
6067 + return React25.useMemo(() => enabled ? {
6068 + reference,
6069 + trigger: reference
6070 + } : {}, [enabled, reference]);
6071 +}
6072 +
6073 +// node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
6074 +var React26 = __toESM(require_react(), 1);
6075 +
6076 +// node_modules/@base-ui/react/floating-ui-react/hooks/useHoverInteractionSharedState.mjs
6077 +var HoverInteraction = class _HoverInteraction {
6078 + constructor() {
6079 + this.pointerType = void 0;
6080 + this.interactedInside = false;
6081 + this.handler = void 0;
6082 + this.blockMouseMove = true;
6083 + this.performedPointerEventsMutation = false;
6084 + this.pointerEventsScopeElement = null;
6085 + this.pointerEventsReferenceElement = null;
6086 + this.pointerEventsFloatingElement = null;
6087 + this.restTimeoutPending = false;
6088 + this.openChangeTimeout = new Timeout();
6089 + this.restTimeout = new Timeout();
6090 + this.handleCloseOptions = void 0;
6091 + }
6092 + static create() {
6093 + return new _HoverInteraction();
6094 + }
6095 + dispose = () => {
6096 + this.openChangeTimeout.clear();
6097 + this.restTimeout.clear();
6098 + };
6099 + disposeEffect = () => {
6100 + return this.dispose;
6101 + };
6102 +};
6103 +var pointerEventsMutationOwnerByScopeElement = /* @__PURE__ */ new WeakMap();
6104 +function clearSafePolygonPointerEventsMutation(instance) {
6105 + if (!instance.performedPointerEventsMutation) {
6106 + return;
6107 + }
6108 + const scopeElement = instance.pointerEventsScopeElement;
6109 + if (scopeElement && pointerEventsMutationOwnerByScopeElement.get(scopeElement) === instance) {
6110 + instance.pointerEventsScopeElement?.style.removeProperty("pointer-events");
6111 + instance.pointerEventsReferenceElement?.style.removeProperty("pointer-events");
6112 + instance.pointerEventsFloatingElement?.style.removeProperty("pointer-events");
6113 + pointerEventsMutationOwnerByScopeElement.delete(scopeElement);
6114 + }
6115 + instance.performedPointerEventsMutation = false;
6116 + instance.pointerEventsScopeElement = null;
6117 + instance.pointerEventsReferenceElement = null;
6118 + instance.pointerEventsFloatingElement = null;
6119 +}
6120 +function applySafePolygonPointerEventsMutation(instance, options) {
6121 + const {
6122 + scopeElement,
6123 + referenceElement,
6124 + floatingElement
6125 + } = options;
6126 + const existingOwner = pointerEventsMutationOwnerByScopeElement.get(scopeElement);
6127 + if (existingOwner && existingOwner !== instance) {
6128 + clearSafePolygonPointerEventsMutation(existingOwner);
6129 + }
6130 + clearSafePolygonPointerEventsMutation(instance);
6131 + instance.performedPointerEventsMutation = true;
6132 + instance.pointerEventsScopeElement = scopeElement;
6133 + instance.pointerEventsReferenceElement = referenceElement;
6134 + instance.pointerEventsFloatingElement = floatingElement;
6135 + pointerEventsMutationOwnerByScopeElement.set(scopeElement, instance);
6136 + scopeElement.style.pointerEvents = "none";
6137 + referenceElement.style.pointerEvents = "auto";
6138 + floatingElement.style.pointerEvents = "auto";
6139 +}
6140 +function useHoverInteractionSharedState(store2) {
6141 + const data = store2.context.dataRef.current;
6142 + const instance = useRefWithInit(() => data.hoverInteractionState ?? HoverInteraction.create()).current;
6143 + if (!data.hoverInteractionState) {
6144 + data.hoverInteractionState = instance;
6145 + }
6146 + useOnMount(data.hoverInteractionState.disposeEffect);
6147 + return data.hoverInteractionState;
6148 +}
6149 +
6150 +// node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
6151 +function useHoverFloatingInteraction(context, parameters = {}) {
6152 + const {
6153 + enabled = true,
6154 + closeDelay: closeDelayProp = 0,
6155 + nodeId: nodeIdProp
6156 + } = parameters;
6157 + const store2 = "rootStore" in context ? context.rootStore : context;
6158 + const open2 = store2.useState("open");
6159 + const floatingElement = store2.useState("floatingElement");
6160 + const domReferenceElement = store2.useState("domReferenceElement");
6161 + const {
6162 + dataRef
6163 + } = store2.context;
6164 + const tree = useFloatingTree();
6165 + const parentId = useFloatingParentNodeId();
6166 + const instance = useHoverInteractionSharedState(store2);
6167 + const childClosedTimeout = useTimeout();
6168 + const isClickLikeOpenEvent2 = useStableCallback(() => {
6169 + return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
6170 + });
6171 + const isHoverOpen = useStableCallback(() => {
6172 + return isHoverOpenEvent(dataRef.current.openEvent?.type);
6173 + });
6174 + const clearPointerEvents = useStableCallback(() => {
6175 + clearSafePolygonPointerEventsMutation(instance);
6176 + });
6177 + useIsoLayoutEffect(() => {
6178 + if (!open2) {
6179 + instance.pointerType = void 0;
6180 + instance.restTimeoutPending = false;
6181 + instance.interactedInside = false;
6182 + clearPointerEvents();
6183 + }
6184 + }, [open2, instance, clearPointerEvents]);
6185 + React26.useEffect(() => {
6186 + return clearPointerEvents;
6187 + }, [clearPointerEvents]);
6188 + useIsoLayoutEffect(() => {
6189 + if (!enabled) {
6190 + return void 0;
6191 + }
6192 + if (open2 && instance.handleCloseOptions?.blockPointerEvents && isHoverOpen() && isElement(domReferenceElement) && floatingElement) {
6193 + const ref = domReferenceElement;
6194 + const floatingEl = floatingElement;
6195 + const doc = ownerDocument(floatingElement);
6196 + const parentFloating = tree?.nodesRef.current.find((node) => node.id === parentId)?.context?.elements.floating;
6197 + if (parentFloating) {
6198 + parentFloating.style.pointerEvents = "";
6199 + }
6200 + const cachedScopeElement = instance.pointerEventsScopeElement !== floatingEl ? instance.pointerEventsScopeElement : null;
6201 + const parentScopeElement = parentFloating !== floatingEl ? parentFloating : null;
6202 + const scopeElement = instance.handleCloseOptions?.getScope?.() ?? cachedScopeElement ?? parentScopeElement ?? ref.closest("[data-rootownerid]") ?? doc.body;
6203 + applySafePolygonPointerEventsMutation(instance, {
6204 + scopeElement,
6205 + referenceElement: ref,
6206 + floatingElement: floatingEl
6207 + });
6208 + return () => {
6209 + clearPointerEvents();
6210 + };
6211 + }
6212 + return void 0;
6213 + }, [enabled, open2, domReferenceElement, floatingElement, instance, isHoverOpen, tree, parentId, clearPointerEvents]);
6214 + React26.useEffect(() => {
6215 + if (!enabled) {
6216 + return void 0;
6217 + }
6218 + function hasParentChildren() {
6219 + return !!(tree && parentId && getNodeChildren(tree.nodesRef.current, parentId).length > 0);
6220 + }
6221 + function closeWithDelay(event) {
6222 + const closeDelay = getDelay(closeDelayProp, "close", instance.pointerType);
6223 + const close = () => {
6224 + store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6225 + tree?.events.emit("floating.closed", event);
6226 + };
6227 + if (closeDelay) {
6228 + instance.openChangeTimeout.start(closeDelay, close);
6229 + } else {
6230 + instance.openChangeTimeout.clear();
6231 + close();
6232 + }
6233 + }
6234 + function handleInteractInside(event) {
6235 + const target = getTarget(event);
6236 + if (!isInteractiveElement(target)) {
6237 + instance.interactedInside = false;
6238 + return;
6239 + }
6240 + instance.interactedInside = target?.closest("[aria-haspopup]") != null;
6241 + }
6242 + function onFloatingMouseEnter() {
6243 + instance.openChangeTimeout.clear();
6244 + childClosedTimeout.clear();
6245 + tree?.events.off("floating.closed", onNodeClosed);
6246 + clearPointerEvents();
6247 + }
6248 + function onFloatingMouseLeave(event) {
6249 + if (hasParentChildren() && tree) {
6250 + tree.events.on("floating.closed", onNodeClosed);
6251 + return;
6252 + }
6253 + if (isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements)) {
6254 + return;
6255 + }
6256 + const currentNodeId = dataRef.current.floatingContext?.nodeId ?? nodeIdProp;
6257 + const relatedTarget = event.relatedTarget;
6258 + const isMovingIntoDescendantFloating = tree && currentNodeId && isElement(relatedTarget) && getNodeChildren(tree.nodesRef.current, currentNodeId, false).some((node) => contains(node.context?.elements.floating, relatedTarget));
6259 + if (isMovingIntoDescendantFloating) {
6260 + return;
6261 + }
6262 + if (instance.handler) {
6263 + instance.handler(event);
6264 + return;
6265 + }
6266 + clearPointerEvents();
6267 + if (isHoverOpen() && !isClickLikeOpenEvent2()) {
6268 + closeWithDelay(event);
6269 + }
6270 + }
6271 + function onNodeClosed(event) {
6272 + if (!tree || !parentId || hasParentChildren()) {
6273 + return;
6274 + }
6275 + childClosedTimeout.start(0, () => {
6276 + tree.events.off("floating.closed", onNodeClosed);
6277 + store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6278 + tree.events.emit("floating.closed", event);
6279 + });
6280 + }
6281 + const floating = floatingElement;
6282 + return mergeCleanups(floating && addEventListener(floating, "mouseenter", onFloatingMouseEnter), floating && addEventListener(floating, "mouseleave", onFloatingMouseLeave), floating && addEventListener(floating, "pointerdown", handleInteractInside, true), () => {
6283 + tree?.events.off("floating.closed", onNodeClosed);
6284 + });
6285 + }, [enabled, floatingElement, store2, dataRef, closeDelayProp, nodeIdProp, isHoverOpen, isClickLikeOpenEvent2, clearPointerEvents, instance, tree, parentId, childClosedTimeout]);
6286 +}
6287 +
6288 +// node_modules/@base-ui/react/floating-ui-react/hooks/useHoverReferenceInteraction.mjs
6289 +var React27 = __toESM(require_react(), 1);
6290 +var ReactDOM5 = __toESM(require_react_dom(), 1);
6291 +var EMPTY_REF = {
6292 + current: null
6293 +};
6294 +function useHoverReferenceInteraction(context, props = {}) {
6295 + const {
6296 + enabled = true,
6297 + delay = 0,
6298 + handleClose = null,
6299 + mouseOnly = false,
6300 + restMs = 0,
6301 + move = true,
6302 + triggerElementRef = EMPTY_REF,
6303 + externalTree,
6304 + isActiveTrigger = true,
6305 + getHandleCloseContext,
6306 + isClosing,
6307 + shouldOpen: shouldOpenProp,
6308 + guardStaleOpen = false
6309 + } = props;
6310 + const store2 = "rootStore" in context ? context.rootStore : context;
6311 + const {
6312 + dataRef,
6313 + events
6314 + } = store2.context;
6315 + const tree = useFloatingTree(externalTree);
6316 + const instance = useHoverInteractionSharedState(store2);
6317 + const isHoverCloseActiveRef = React27.useRef(false);
6318 + const handleCloseRef = useValueAsRef(handleClose);
6319 + const delayRef = useValueAsRef(delay);
6320 + const restMsRef = useValueAsRef(restMs);
6321 + const enabledRef = useValueAsRef(enabled);
6322 + const shouldOpenRef = useValueAsRef(shouldOpenProp);
6323 + const isClosingRef = useValueAsRef(isClosing);
6324 + const isClickLikeOpenEvent2 = useStableCallback(() => {
6325 + return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
6326 + });
6327 + const checkShouldOpen = useStableCallback(() => {
6328 + return shouldOpenRef.current?.() !== false;
6329 + });
6330 + const isOverInactiveTrigger = useStableCallback((currentDomReference, currentTarget, target) => {
6331 + const allTriggers = store2.context.triggerElements;
6332 + if (allTriggers.hasElement(currentTarget)) {
6333 + return !currentDomReference || !contains(currentDomReference, currentTarget);
6334 + }
6335 + if (!isElement(target)) {
6336 + return false;
6337 + }
6338 + const targetElement = target;
6339 + return allTriggers.hasMatchingElement((trigger) => contains(trigger, targetElement)) && (!currentDomReference || !contains(currentDomReference, targetElement));
6340 + });
6341 + const cleanupMouseMoveHandler = useStableCallback(() => {
6342 + if (!instance.handler) {
6343 + return;
6344 + }
6345 + const doc = ownerDocument(store2.select("domReferenceElement"));
6346 + doc.removeEventListener("mousemove", instance.handler);
6347 + instance.handler = void 0;
6348 + });
6349 + const clearPointerEvents = useStableCallback(() => {
6350 + clearSafePolygonPointerEventsMutation(instance);
6351 + });
6352 + if (isActiveTrigger) {
6353 + instance.handleCloseOptions = handleClose?.__options;
6354 + }
6355 + React27.useEffect(() => cleanupMouseMoveHandler, [cleanupMouseMoveHandler]);
6356 + React27.useEffect(() => {
6357 + if (!enabled) {
6358 + return void 0;
6359 + }
6360 + function onOpenChangeLocal(details) {
6361 + if (!details.open) {
6362 + isHoverCloseActiveRef.current = details.reason === reason_parts_exports.triggerHover;
6363 + cleanupMouseMoveHandler();
6364 + instance.openChangeTimeout.clear();
6365 + instance.restTimeout.clear();
6366 + instance.blockMouseMove = true;
6367 + instance.restTimeoutPending = false;
6368 + } else {
6369 + isHoverCloseActiveRef.current = false;
6370 + }
6371 + }
6372 + events.on("openchange", onOpenChangeLocal);
6373 + return () => {
6374 + events.off("openchange", onOpenChangeLocal);
6375 + };
6376 + }, [enabled, events, instance, cleanupMouseMoveHandler]);
6377 + React27.useEffect(() => {
6378 + if (!enabled) {
6379 + return void 0;
6380 + }
6381 + function closeWithDelay(event, runElseBranch = true) {
6382 + const closeDelay = getDelay(delayRef.current, "close", instance.pointerType);
6383 + if (closeDelay) {
6384 + instance.openChangeTimeout.start(closeDelay, () => {
6385 + store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6386 + tree?.events.emit("floating.closed", event);
6387 + });
6388 + } else if (runElseBranch) {
6389 + instance.openChangeTimeout.clear();
6390 + store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6391 + tree?.events.emit("floating.closed", event);
6392 + }
6393 + }
6394 + const trigger = triggerElementRef.current ?? (isActiveTrigger ? store2.select("domReferenceElement") : null);
6395 + if (!isElement(trigger)) {
6396 + return void 0;
6397 + }
6398 + function onMouseEnter(event) {
6399 + instance.openChangeTimeout.clear();
6400 + instance.blockMouseMove = false;
6401 + if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
6402 + return;
6403 + }
6404 + const restMsValue = getRestMs(restMsRef.current);
6405 + const openDelay = getDelay(delayRef.current, "open", instance.pointerType);
6406 + const eventTarget = getTarget(event);
6407 + const currentTarget = event.currentTarget ?? null;
6408 + const currentDomReference = store2.select("domReferenceElement");
6409 + let triggerNode = currentTarget;
6410 + if (isElement(eventTarget) && !store2.context.triggerElements.hasElement(eventTarget)) {
6411 + for (const triggerElement of store2.context.triggerElements.elements()) {
6412 + if (contains(triggerElement, eventTarget)) {
6413 + triggerNode = triggerElement;
6414 + break;
6415 + }
6416 + }
6417 + }
6418 + if (isElement(currentTarget) && isElement(currentDomReference) && !store2.context.triggerElements.hasElement(currentTarget) && contains(currentTarget, currentDomReference)) {
6419 + triggerNode = currentDomReference;
6420 + }
6421 + const isOverInactive = triggerNode == null ? false : isOverInactiveTrigger(currentDomReference, triggerNode, eventTarget);
6422 + const isOpen = store2.select("open");
6423 + const isInClosingTransition = isClosingRef.current?.() ?? store2.select("transitionStatus") === "ending";
6424 + const isHoverCloseTransition = !isOpen && isInClosingTransition && isHoverCloseActiveRef.current;
6425 + const isReenteringSameTriggerDuringCloseTransition = !isOverInactive && isElement(triggerNode) && isElement(currentDomReference) && contains(currentDomReference, triggerNode) && isHoverCloseTransition;
6426 + const isRestOnlyDelay = restMsValue > 0 && !openDelay;
6427 + const shouldOpenImmediately = isOverInactive && (isOpen || isHoverCloseTransition) || isReenteringSameTriggerDuringCloseTransition;
6428 + const shouldOpen = !isOpen || isOverInactive;
6429 + if (shouldOpenImmediately) {
6430 + if (checkShouldOpen()) {
6431 + store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6432 + }
6433 + return;
6434 + }
6435 + if (isRestOnlyDelay) {
6436 + return;
6437 + }
6438 + if (openDelay) {
6439 + instance.openChangeTimeout.start(openDelay, () => {
6440 + if (shouldOpen && checkShouldOpen()) {
6441 + store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6442 + }
6443 + });
6444 + } else if (shouldOpen) {
6445 + if (checkShouldOpen()) {
6446 + store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6447 + }
6448 + }
6449 + }
6450 + function onMouseLeave(event) {
6451 + if (isClickLikeOpenEvent2()) {
6452 + clearPointerEvents();
6453 + return;
6454 + }
6455 + cleanupMouseMoveHandler();
6456 + const domReferenceElement = store2.select("domReferenceElement");
6457 + const doc = ownerDocument(domReferenceElement);
6458 + instance.restTimeout.clear();
6459 + instance.restTimeoutPending = false;
6460 + const handleCloseContextBase = dataRef.current.floatingContext ?? getHandleCloseContext?.();
6461 + if (isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements)) {
6462 + return;
6463 + }
6464 + if (handleCloseRef.current && handleCloseContextBase) {
6465 + if (!store2.select("open")) {
6466 + instance.openChangeTimeout.clear();
6467 + }
6468 + const currentTrigger = triggerElementRef.current;
6469 + instance.handler = handleCloseRef.current({
6470 + ...handleCloseContextBase,
6471 + tree,
6472 + x: event.clientX,
6473 + y: event.clientY,
6474 + onClose() {
6475 + clearPointerEvents();
6476 + cleanupMouseMoveHandler();
6477 + if (enabledRef.current && !isClickLikeOpenEvent2() && currentTrigger === store2.select("domReferenceElement")) {
6478 + closeWithDelay(event, true);
6479 + }
6480 + }
6481 + });
6482 + doc.addEventListener("mousemove", instance.handler);
6483 + instance.handler(event);
6484 + return;
6485 + }
6486 + const shouldClose = instance.pointerType === "touch" ? !contains(store2.select("floatingElement"), event.relatedTarget) : true;
6487 + if (shouldClose) {
6488 + closeWithDelay(event);
6489 + }
6490 + }
6491 + function onMouseOut(event) {
6492 + if (contains(trigger, event.relatedTarget)) {
6493 + return;
6494 + }
6495 + instance.openChangeTimeout.clear();
6496 + instance.restTimeout.clear();
6497 + instance.restTimeoutPending = false;
6498 + }
6499 + const staleOpenGuard = guardStaleOpen ? addEventListener(trigger, "mouseout", onMouseOut) : void 0;
6500 + if (move) {
6501 + return mergeCleanups(addEventListener(trigger, "mousemove", onMouseEnter, {
6502 + once: true
6503 + }), addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
6504 + }
6505 + return mergeCleanups(addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
6506 + }, [cleanupMouseMoveHandler, clearPointerEvents, dataRef, delayRef, store2, enabled, handleCloseRef, instance, isActiveTrigger, isOverInactiveTrigger, isClickLikeOpenEvent2, mouseOnly, move, restMsRef, triggerElementRef, tree, enabledRef, getHandleCloseContext, isClosingRef, checkShouldOpen, guardStaleOpen]);
6507 + return React27.useMemo(() => {
6508 + if (!enabled) {
6509 + return void 0;
6510 + }
6511 + function setPointerRef(event) {
6512 + instance.pointerType = event.pointerType;
6513 + }
6514 + return {
6515 + onPointerDown: setPointerRef,
6516 + onPointerEnter: setPointerRef,
6517 + onMouseMove(event) {
6518 + const {
6519 + nativeEvent
6520 + } = event;
6521 + const trigger = event.currentTarget;
6522 + const currentDomReference = store2.select("domReferenceElement");
6523 + const currentOpen = store2.select("open");
6524 + const isOverInactive = isOverInactiveTrigger(currentDomReference, trigger, event.target);
6525 + if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
6526 + return;
6527 + }
6528 + if (currentOpen && isOverInactive && instance.handleCloseOptions?.blockPointerEvents) {
6529 + const floatingElement = store2.select("floatingElement");
6530 + if (floatingElement) {
6531 + const scopeElement = instance.handleCloseOptions?.getScope?.() ?? trigger.ownerDocument.body;
6532 + applySafePolygonPointerEventsMutation(instance, {
6533 + scopeElement,
6534 + referenceElement: trigger,
6535 + floatingElement
6536 + });
6537 + }
6538 + }
6539 + const restMsValue = getRestMs(restMsRef.current);
6540 + if (currentOpen && !isOverInactive || restMsValue === 0) {
6541 + return;
6542 + }
6543 + if (!isOverInactive && instance.restTimeoutPending && event.movementX ** 2 + event.movementY ** 2 < 2) {
6544 + return;
6545 + }
6546 + instance.restTimeout.clear();
6547 + function handleMouseMove() {
6548 + instance.restTimeoutPending = false;
6549 + if (isClickLikeOpenEvent2()) {
6550 + return;
6551 + }
6552 + const latestOpen = store2.select("open");
6553 + if (!instance.blockMouseMove && (!latestOpen || isOverInactive) && checkShouldOpen()) {
6554 + store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, nativeEvent, trigger));
6555 + }
6556 + }
6557 + if (instance.pointerType === "touch") {
6558 + ReactDOM5.flushSync(() => {
6559 + handleMouseMove();
6560 + });
6561 + } else if (isOverInactive && currentOpen) {
6562 + handleMouseMove();
6563 + } else {
6564 + instance.restTimeoutPending = true;
6565 + instance.restTimeout.start(restMsValue, handleMouseMove);
6566 + }
6567 + }
6568 + };
6569 + }, [enabled, instance, isClickLikeOpenEvent2, isOverInactiveTrigger, mouseOnly, store2, restMsRef, checkShouldOpen]);
6570 +}
6571 +
6572 +// node_modules/@base-ui/react/floating-ui-react/safePolygon.mjs
6573 +var CURSOR_SPEED_THRESHOLD = 0.1;
6574 +var CURSOR_SPEED_THRESHOLD_SQUARED = CURSOR_SPEED_THRESHOLD * CURSOR_SPEED_THRESHOLD;
6575 +var POLYGON_BUFFER = 0.5;
6576 +function hasIntersectingEdge(pointX, pointY, xi, yi, xj, yj) {
6577 + return yi >= pointY !== yj >= pointY && pointX <= (xj - xi) * (pointY - yi) / (yj - yi) + xi;
6578 +}
6579 +function isPointInQuadrilateral(pointX, pointY, x1, y1, x2, y2, x3, y3, x4, y4) {
6580 + let isInsideValue = false;
6581 + if (hasIntersectingEdge(pointX, pointY, x1, y1, x2, y2)) {
6582 + isInsideValue = !isInsideValue;
6583 + }
6584 + if (hasIntersectingEdge(pointX, pointY, x2, y2, x3, y3)) {
6585 + isInsideValue = !isInsideValue;
6586 + }
6587 + if (hasIntersectingEdge(pointX, pointY, x3, y3, x4, y4)) {
6588 + isInsideValue = !isInsideValue;
6589 + }
6590 + if (hasIntersectingEdge(pointX, pointY, x4, y4, x1, y1)) {
6591 + isInsideValue = !isInsideValue;
6592 + }
6593 + return isInsideValue;
6594 +}
6595 +function isInsideRect(pointX, pointY, rect) {
6596 + return pointX >= rect.x && pointX <= rect.x + rect.width && pointY >= rect.y && pointY <= rect.y + rect.height;
6597 +}
6598 +function isInsideAxisAlignedRect(pointX, pointY, x1, y1, x2, y2) {
6599 + const minX = Math.min(x1, x2);
6600 + const maxX = Math.max(x1, x2);
6601 + const minY = Math.min(y1, y2);
6602 + const maxY = Math.max(y1, y2);
6603 + return pointX >= minX && pointX <= maxX && pointY >= minY && pointY <= maxY;
6604 +}
6605 +function safePolygon(options = {}) {
6606 + const {
6607 + blockPointerEvents = false
6608 + } = options;
6609 + const timeout = new Timeout();
6610 + const fn = ({
6611 + x,
6612 + y,
6613 + placement,
6614 + elements,
6615 + onClose,
6616 + nodeId,
6617 + tree
6618 + }) => {
6619 + const side = placement?.split("-")[0];
6620 + let hasLanded = false;
6621 + let lastX = null;
6622 + let lastY = null;
6623 + let lastCursorTime = typeof performance !== "undefined" ? performance.now() : 0;
6624 + function isCursorMovingSlowly(nextX, nextY) {
6625 + const currentTime = performance.now();
6626 + const elapsedTime = currentTime - lastCursorTime;
6627 + if (lastX === null || lastY === null || elapsedTime === 0) {
6628 + lastX = nextX;
6629 + lastY = nextY;
6630 + lastCursorTime = currentTime;
6631 + return false;
6632 + }
6633 + const deltaX = nextX - lastX;
6634 + const deltaY = nextY - lastY;
6635 + const distanceSquared = deltaX * deltaX + deltaY * deltaY;
6636 + const thresholdSquared = elapsedTime * elapsedTime * CURSOR_SPEED_THRESHOLD_SQUARED;
6637 + lastX = nextX;
6638 + lastY = nextY;
6639 + lastCursorTime = currentTime;
6640 + return distanceSquared < thresholdSquared;
6641 + }
6642 + function close() {
6643 + timeout.clear();
6644 + onClose();
6645 + }
6646 + return function onMouseMove(event) {
6647 + timeout.clear();
6648 + const domReference = elements.domReference;
6649 + const floating = elements.floating;
6650 + if (!domReference || !floating || side == null || x == null || y == null) {
6651 + return void 0;
6652 + }
6653 + const {
6654 + clientX,
6655 + clientY
6656 + } = event;
6657 + const target = getTarget(event);
6658 + const isLeave = event.type === "mouseleave";
6659 + const isOverFloatingEl = contains(floating, target);
6660 + const isOverReferenceEl = contains(domReference, target);
6661 + if (isOverFloatingEl) {
6662 + hasLanded = true;
6663 + if (!isLeave) {
6664 + return void 0;
6665 + }
6666 + }
6667 + if (isOverReferenceEl) {
6668 + hasLanded = false;
6669 + if (!isLeave) {
6670 + hasLanded = true;
6671 + return void 0;
6672 + }
6673 + }
6674 + if (isLeave && isElement(event.relatedTarget) && contains(floating, event.relatedTarget)) {
6675 + return void 0;
6676 + }
6677 + function hasOpenChildNode() {
6678 + return Boolean(tree && getNodeChildren(tree.nodesRef.current, nodeId).length > 0);
6679 + }
6680 + function closeIfNoOpenChild() {
6681 + if (!hasOpenChildNode()) {
6682 + close();
6683 + }
6684 + }
6685 + if (hasOpenChildNode()) {
6686 + return void 0;
6687 + }
6688 + const refRect = domReference.getBoundingClientRect();
6689 + const rect = floating.getBoundingClientRect();
6690 + const cursorLeaveFromRight = x > rect.right - rect.width / 2;
6691 + const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;
6692 + const isFloatingWider = rect.width > refRect.width;
6693 + const isFloatingTaller = rect.height > refRect.height;
6694 + const left = (isFloatingWider ? refRect : rect).left;
6695 + const right = (isFloatingWider ? refRect : rect).right;
6696 + const top = (isFloatingTaller ? refRect : rect).top;
6697 + const bottom = (isFloatingTaller ? refRect : rect).bottom;
6698 + 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) {
6699 + closeIfNoOpenChild();
6700 + return void 0;
6701 + }
6702 + let isInsideTroughRect = false;
6703 + switch (side) {
6704 + case "top":
6705 + isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, refRect.top + 1, right, rect.bottom - 1);
6706 + break;
6707 + case "bottom":
6708 + isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, rect.top + 1, right, refRect.bottom - 1);
6709 + break;
6710 + case "left":
6711 + isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, rect.right - 1, bottom, refRect.left + 1, top);
6712 + break;
6713 + case "right":
6714 + isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, refRect.right - 1, bottom, rect.left + 1, top);
6715 + break;
6716 + default:
6717 + }
6718 + if (isInsideTroughRect) {
6719 + return void 0;
6720 + }
6721 + if (hasLanded && !isInsideRect(clientX, clientY, refRect)) {
6722 + closeIfNoOpenChild();
6723 + return void 0;
6724 + }
6725 + if (!isLeave && isCursorMovingSlowly(clientX, clientY)) {
6726 + closeIfNoOpenChild();
6727 + return void 0;
6728 + }
6729 + let isInsidePolygon = false;
6730 + switch (side) {
6731 + case "top": {
6732 + const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6733 + const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6734 + const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6735 + const cursorPointY = y + POLYGON_BUFFER + 1;
6736 + const commonYLeft = cursorLeaveFromRight ? rect.bottom - POLYGON_BUFFER : isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top;
6737 + const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top : rect.bottom - POLYGON_BUFFER;
6738 + isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
6739 + break;
6740 + }
6741 + case "bottom": {
6742 + const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6743 + const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6744 + const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6745 + const cursorPointY = y - POLYGON_BUFFER;
6746 + const commonYLeft = cursorLeaveFromRight ? rect.top + POLYGON_BUFFER : isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom;
6747 + const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom : rect.top + POLYGON_BUFFER;
6748 + isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
6749 + break;
6750 + }
6751 + case "left": {
6752 + const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6753 + const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6754 + const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6755 + const cursorPointX = x + POLYGON_BUFFER + 1;
6756 + const commonXTop = cursorLeaveFromBottom ? rect.right - POLYGON_BUFFER : isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left;
6757 + const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left : rect.right - POLYGON_BUFFER;
6758 + isInsidePolygon = isPointInQuadrilateral(clientX, clientY, commonXTop, rect.top, commonXBottom, rect.bottom, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY);
6759 + break;
6760 + }
6761 + case "right": {
6762 + const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6763 + const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6764 + const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6765 + const cursorPointX = x - POLYGON_BUFFER;
6766 + const commonXTop = cursorLeaveFromBottom ? rect.left + POLYGON_BUFFER : isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right;
6767 + const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right : rect.left + POLYGON_BUFFER;
6768 + isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY, commonXTop, rect.top, commonXBottom, rect.bottom);
6769 + break;
6770 + }
6771 + default:
6772 + }
6773 + if (!isInsidePolygon) {
6774 + closeIfNoOpenChild();
6775 + } else if (!hasLanded) {
6776 + timeout.start(40, closeIfNoOpenChild);
6777 + }
6778 + return void 0;
6779 + };
6780 + };
6781 + fn.__options = {
6782 + ...options,
6783 + blockPointerEvents
6784 + };
6785 + return fn;
6786 +}
6787 +
6788 +// node_modules/@base-ui/react/utils/NullStore.mjs
6789 +var NullStore = class extends ReactStore {
6790 + // `update`/`set`/`notifyAll` funnel through `setState` in the base `Store`, so overriding
6791 + // `setState` alone would neutralize them today. They are overridden explicitly so the store stays
6792 + // inert even if a future base-class change stops routing a mutator through `setState`.
6793 + setState(_newState) {
6794 + }
6795 + update(_changes) {
6796 + }
6797 + set(_key, _value) {
6798 + }
6799 + notifyAll() {
6800 + }
6801 +};
6802 +
6803 +// node_modules/@base-ui/utils/inertValue.mjs
6804 +function inertValue(value) {
6805 + if (isReactVersionAtLeast(19)) {
6806 + return value;
6807 + }
6808 + return value ? "true" : void 0;
6809 +}
6810 +
6811 +// node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs
6812 +var React28 = __toESM(require_react(), 1);
6813 +var DirectionContext = /* @__PURE__ */ React28.createContext(void 0);
6814 +if (true) DirectionContext.displayName = "DirectionContext";
6815 +function useDirection() {
6816 + const context = React28.useContext(DirectionContext);
6817 + return context?.direction ?? "ltr";
6818 +}
6819 +
6820 +// node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
6821 +var React29 = __toESM(require_react(), 1);
6822 +
6823 +// node_modules/@base-ui/react/floating-ui-react/middleware/arrow.mjs
6824 +var baseArrow = (options) => ({
6825 + name: "arrow",
6826 + options,
6827 + async fn(state) {
6828 + const {
6829 + x,
6830 + y,
6831 + placement,
6832 + rects,
6833 + platform: platform3,
6834 + elements,
6835 + middlewareData
6836 + } = state;
6837 + const {
6838 + element,
6839 + padding = 0,
6840 + offsetParent = "real"
6841 + } = evaluate(options, state) || {};
6842 + if (element == null) {
6843 + return {};
6844 + }
6845 + const paddingObject = getPaddingObject(padding);
6846 + const coords = {
6847 + x,
6848 + y
6849 + };
6850 + const axis = getAlignmentAxis(placement);
6851 + const length = getAxisLength(axis);
6852 + const arrowDimensions = await platform3.getDimensions(element);
6853 + const isYAxis = axis === "y";
6854 + const minProp = isYAxis ? "top" : "left";
6855 + const maxProp = isYAxis ? "bottom" : "right";
6856 + const clientProp = isYAxis ? "clientHeight" : "clientWidth";
6857 + const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
6858 + const startDiff = coords[axis] - rects.reference[axis];
6859 + const arrowOffsetParent = offsetParent === "real" ? await platform3.getOffsetParent?.(element) : elements.floating;
6860 + let clientSize = elements.floating[clientProp] || rects.floating[length];
6861 + if (!clientSize || !await platform3.isElement?.(arrowOffsetParent)) {
6862 + clientSize = elements.floating[clientProp] || rects.floating[length];
6863 + }
6864 + const centerToReference = endDiff / 2 - startDiff / 2;
6865 + const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
6866 + const minPadding = Math.min(paddingObject[minProp], largestPossiblePadding);
6867 + const maxPadding = Math.min(paddingObject[maxProp], largestPossiblePadding);
6868 + const min2 = minPadding;
6869 + const max2 = clientSize - arrowDimensions[length] - maxPadding;
6870 + const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
6871 + const offset4 = clamp(min2, center, max2);
6872 + const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset4 && rects.reference[length] / 2 - (center < min2 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
6873 + const alignmentOffset = shouldAddOffset ? center < min2 ? center - min2 : center - max2 : 0;
6874 + return {
6875 + [axis]: coords[axis] + alignmentOffset,
6876 + data: {
6877 + [axis]: offset4,
6878 + centerOffset: center - offset4 - alignmentOffset,
6879 + ...shouldAddOffset && {
6880 + alignmentOffset
6881 + }
6882 + },
6883 + reset: shouldAddOffset
6884 + };
6885 + }
6886 +});
6887 +var arrow4 = (options, deps) => {
6888 + const {
6889 + name,
6890 + fn
6891 + } = baseArrow(options);
6892 + return {
6893 + name,
6894 + fn,
6895 + options: [options, deps]
6896 + };
6897 +};
6898 +
6899 +// node_modules/@base-ui/react/utils/hideMiddleware.mjs
6900 +var hide4 = {
6901 + name: "hide",
6902 + async fn(state) {
6903 + const {
6904 + width,
6905 + height,
6906 + x,
6907 + y
6908 + } = state.rects.reference;
6909 + const anchorHidden2 = width === 0 && height === 0 && x === 0 && y === 0;
6910 + const overflow = await state.platform.detectOverflow(state, {
6911 + elementContext: "reference"
6912 + });
6913 + const referenceHidden = overflow.top - height >= 0 || overflow.right - width >= 0 || overflow.bottom - height >= 0 || overflow.left - width >= 0;
6914 + return {
6915 + data: {
6916 + referenceHidden: referenceHidden || anchorHidden2
6917 + }
6918 + };
6919 + }
6920 +};
6921 +
6922 +// node_modules/@base-ui/react/utils/adaptiveOriginConstants.mjs
6923 +var DEFAULT_SIDES = {
6924 + sideX: "left",
6925 + sideY: "top"
6926 +};
6927 +
6928 +// node_modules/@base-ui/react/utils/CommonPositionerCssVars.mjs
6929 +var availableWidth = "--available-width";
6930 +var availableHeight = "--available-height";
6931 +var anchorWidth = "--anchor-width";
6932 +var anchorHeight = "--anchor-height";
6933 +var transformOrigin = "--transform-origin";
6934 +var positionerWidth = "--positioner-width";
6935 +var positionerHeight = "--positioner-height";
6936 +
6937 +// node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
6938 +var AVAILABLE_WIDTH_VAR = availableWidth;
6939 +var AVAILABLE_HEIGHT_VAR = availableHeight;
6940 +function getLogicalSide(sideParam, renderedSide, isRtl) {
6941 + const isLogicalSideParam = sideParam === "inline-start" || sideParam === "inline-end";
6942 + const logicalRight = isRtl ? "inline-start" : "inline-end";
6943 + const logicalLeft = isRtl ? "inline-end" : "inline-start";
6944 + return {
6945 + top: "top",
6946 + right: isLogicalSideParam ? logicalRight : "right",
6947 + bottom: "bottom",
6948 + left: isLogicalSideParam ? logicalLeft : "left"
6949 + }[renderedSide];
6950 +}
6951 +function getOffsetData(state, sideParam, isRtl) {
6952 + const {
6953 + rects,
6954 + placement
6955 + } = state;
6956 + const data = {
6957 + side: getLogicalSide(sideParam, getSide(placement), isRtl),
6958 + align: getAlignment(placement) || "center",
6959 + anchor: {
6960 + width: rects.reference.width,
6961 + height: rects.reference.height
6962 + },
6963 + positioner: {
6964 + width: rects.floating.width,
6965 + height: rects.floating.height
6966 + }
6967 + };
6968 + return data;
6969 +}
6970 +function useAnchorPositioning(params) {
6971 + return useAnchorPositioningWithHook(params, useBaseUIFloating);
6972 +}
6973 +function useAnchorPositioningWithHook(params, useFloatingHook) {
6974 + const {
6975 + // Public parameters
6976 + anchor,
6977 + positionMethod = "absolute",
6978 + side: sideParam = "bottom",
6979 + sideOffset = 0,
6980 + align = "center",
6981 + alignOffset = 0,
6982 + collisionBoundary,
6983 + collisionPadding: collisionPaddingParam = 5,
6984 + sticky = false,
6985 + arrowPadding = 5,
6986 + disableAnchorTracking = false,
6987 + inline: inlineMiddleware,
6988 + // Private parameters
6989 + keepMounted = false,
6990 + floatingRootContext,
6991 + mounted,
6992 + collisionAvoidance,
6993 + shift: shift4,
6994 + nodeId,
6995 + adaptiveOrigin: adaptiveOrigin2,
6996 + lazyFlip = false,
6997 + externalTree
6998 + } = params;
6999 + const [mountSide, setMountSide] = React29.useState(null);
7000 + if (!mounted && mountSide !== null) {
7001 + setMountSide(null);
7002 + }
7003 + const collisionAvoidanceSide = collisionAvoidance.side || "flip";
7004 + const collisionAvoidanceAlign = collisionAvoidance.align || "flip";
7005 + const collisionAvoidanceFallbackAxisSide = collisionAvoidance.fallbackAxisSide || "end";
7006 + const shiftCrossAxis = shift4?.crossAxis ?? false;
7007 + const shiftRootBoundary = shift4?.rootBoundary;
7008 + const anchorFn = typeof anchor === "function" ? anchor : void 0;
7009 + const anchorFnCallback = useStableCallback(anchorFn);
7010 + const anchorDep = anchorFn ? anchorFnCallback : anchor;
7011 + const anchorValueRef = useValueAsRef(anchor);
7012 + const mountedRef = useValueAsRef(mounted);
7013 + const direction = useDirection();
7014 + const isRtl = direction === "rtl";
7015 + const side = mountSide || {
7016 + top: "top",
7017 + right: "right",
7018 + bottom: "bottom",
7019 + left: "left",
7020 + "inline-end": isRtl ? "left" : "right",
7021 + "inline-start": isRtl ? "right" : "left"
7022 + }[sideParam];
7023 + const placement = align === "center" ? side : `${side}-${align}`;
7024 + let collisionPadding = collisionPaddingParam;
7025 + if (typeof collisionPadding === "number") {
7026 + collisionPadding = {
7027 + top: collisionPadding,
7028 + right: collisionPadding,
7029 + bottom: collisionPadding,
7030 + left: collisionPadding
7031 + };
7032 + } else if (collisionPadding) {
7033 + collisionPadding = {
7034 + top: collisionPadding.top || 0,
7035 + right: collisionPadding.right || 0,
7036 + bottom: collisionPadding.bottom || 0,
7037 + left: collisionPadding.left || 0
7038 + };
7039 + }
7040 + const bias = 1;
7041 + const biasTop = sideParam === "bottom" ? bias : 0;
7042 + const biasBottom = sideParam === "top" ? bias : 0;
7043 + const biasLeft = sideParam === "right" ? bias : 0;
7044 + const biasRight = sideParam === "left" ? bias : 0;
7045 + const commonCollisionProps = {
7046 + boundary: collisionBoundary === "clipping-ancestors" ? "clippingAncestors" : collisionBoundary,
7047 + padding: collisionPadding
7048 + };
7049 + const arrowRef = React29.useRef(null);
7050 + const sideOffsetRef = useValueAsRef(sideOffset);
7051 + const alignOffsetRef = useValueAsRef(alignOffset);
7052 + const sideOffsetDep = typeof sideOffset !== "function" ? sideOffset : 0;
7053 + const alignOffsetDep = typeof alignOffset !== "function" ? alignOffset : 0;
7054 + const middleware = [];
7055 + if (inlineMiddleware) {
7056 + middleware.push(inlineMiddleware);
7057 + }
7058 + middleware.push(offset3((state) => {
7059 + const data = getOffsetData(state, sideParam, isRtl);
7060 + const sideAxis = typeof sideOffsetRef.current === "function" ? sideOffsetRef.current(data) : sideOffsetRef.current;
7061 + const alignAxis = typeof alignOffsetRef.current === "function" ? alignOffsetRef.current(data) : alignOffsetRef.current;
7062 + return {
7063 + mainAxis: sideAxis,
7064 + crossAxis: alignAxis,
7065 + alignmentAxis: alignAxis
7066 + };
7067 + }, [sideOffsetDep, alignOffsetDep, isRtl, sideParam]));
7068 + const shiftDisabled = collisionAvoidanceAlign === "none" && collisionAvoidanceSide !== "shift";
7069 + const crossAxisShiftEnabled = !shiftDisabled && (sticky || shiftCrossAxis || collisionAvoidanceSide === "shift");
7070 + const flipMiddleware = collisionAvoidanceSide === "none" ? null : flip3({
7071 + ...commonCollisionProps,
7072 + // Ensure the popup flips if it's been limited by its --available-height and it resizes.
7073 + // Since the size() padding is smaller than the flip() padding, flip() will take precedence.
7074 + padding: {
7075 + top: collisionPadding.top + bias + biasTop,
7076 + right: collisionPadding.right + bias + biasRight,
7077 + bottom: collisionPadding.bottom + bias + biasBottom,
7078 + left: collisionPadding.left + bias + biasLeft
7079 + },
7080 + mainAxis: !shiftCrossAxis && collisionAvoidanceSide === "flip",
7081 + crossAxis: collisionAvoidanceAlign === "flip" ? "alignment" : false,
7082 + fallbackAxisSideDirection: collisionAvoidanceFallbackAxisSide
7083 + });
7084 + const shiftMiddleware = shiftDisabled ? null : shift3({
7085 + ...commonCollisionProps,
7086 + // Use the Layout Viewport to avoid shifting around when pinch-zooming.
7087 + rootBoundary: shiftRootBoundary,
7088 + mainAxis: collisionAvoidanceAlign !== "none",
7089 + crossAxis: crossAxisShiftEnabled,
7090 + limiter: sticky || shiftCrossAxis ? void 0 : limitShift3((limitData) => {
7091 + if (!arrowRef.current) {
7092 + return {};
7093 + }
7094 + const {
7095 + width,
7096 + height
7097 + } = arrowRef.current.getBoundingClientRect();
7098 + const sideAxis = getSideAxis(getSide(limitData.placement));
7099 + const arrowSize = sideAxis === "y" ? width : height;
7100 + const offsetAmount = sideAxis === "y" ? collisionPadding.left + collisionPadding.right : collisionPadding.top + collisionPadding.bottom;
7101 + return {
7102 + offset: arrowSize / 2 + offsetAmount / 2
7103 + };
7104 + })
7105 + }, [commonCollisionProps, sticky, shiftCrossAxis, shiftRootBoundary, collisionPadding, collisionAvoidanceAlign]);
7106 + if (collisionAvoidanceSide === "shift" || collisionAvoidanceAlign === "shift" || align === "center") {
7107 + middleware.push(shiftMiddleware, flipMiddleware);
7108 + } else {
7109 + middleware.push(flipMiddleware, shiftMiddleware);
7110 + }
7111 + middleware.push(size3({
7112 + ...commonCollisionProps,
7113 + apply({
7114 + elements: {
7115 + floating
7116 + },
7117 + availableWidth: availableWidth2,
7118 + availableHeight: availableHeight2,
7119 + rects
7120 + }) {
7121 + if (!mountedRef.current) {
7122 + return;
7123 + }
7124 + const floatingStyle = floating.style;
7125 + floatingStyle.setProperty(AVAILABLE_WIDTH_VAR, `${availableWidth2}px`);
7126 + floatingStyle.setProperty(AVAILABLE_HEIGHT_VAR, `${availableHeight2}px`);
7127 + const dpr = getWindow(floating).devicePixelRatio || 1;
7128 + const {
7129 + x: x2,
7130 + y: y2,
7131 + width,
7132 + height
7133 + } = rects.reference;
7134 + const anchorWidth2 = (Math.round((x2 + width) * dpr) - Math.round(x2 * dpr)) / dpr;
7135 + const anchorHeight2 = (Math.round((y2 + height) * dpr) - Math.round(y2 * dpr)) / dpr;
7136 + floatingStyle.setProperty(anchorWidth, `${anchorWidth2}px`);
7137 + floatingStyle.setProperty(anchorHeight, `${anchorHeight2}px`);
7138 + }
7139 + }), arrow4((state) => ({
7140 + // `transform-origin` calculations rely on an element existing. If the arrow hasn't been set,
7141 + // we'll create a fake element.
7142 + element: arrowRef.current || ownerDocument(state.elements.floating).createElement("div"),
7143 + // No padding for the fake arrow: it would displace aligned popups on narrow anchors.
7144 + padding: arrowRef.current ? arrowPadding : 0,
7145 + offsetParent: "floating"
7146 + }), [arrowPadding]), {
7147 + name: "transformOrigin",
7148 + fn(state) {
7149 + const {
7150 + elements: {
7151 + floating
7152 + },
7153 + middlewareData: middlewareData2,
7154 + placement: renderedPlacement2,
7155 + platform: platform3,
7156 + rects,
7157 + y: y2
7158 + } = state;
7159 + const renderedSide2 = getSide(renderedPlacement2);
7160 + const renderedAlign2 = getAlignment(renderedPlacement2);
7161 + const isVertical = getSideAxis(renderedSide2) === "y";
7162 + const arrowEl = arrowRef.current;
7163 + const sideOffsetValue = typeof sideOffset === "function" ? sideOffset(getOffsetData(state, sideParam, isRtl)) : sideOffset;
7164 + let crossOrigin;
7165 + if (!arrowEl && renderedAlign2 && Math.abs(isVertical ? middlewareData2.shift?.x || 0 : middlewareData2.shift?.y || 0) <= 1) {
7166 + crossOrigin = renderedAlign2 === "start" === (isVertical && platform3.isRTL?.(floating) === true) ? "100%" : "0%";
7167 + } else {
7168 + const arrowOffset = isVertical ? middlewareData2.arrow?.x || 0 : middlewareData2.arrow?.y || 0;
7169 + const arrowSize = isVertical ? arrowEl?.clientWidth || 0 : arrowEl?.clientHeight || 0;
7170 + crossOrigin = `${arrowOffset + arrowSize / 2}px`;
7171 + }
7172 + let sideOrigin = renderedSide2 === "top" || renderedSide2 === "left" ? `calc(100% + ${sideOffsetValue}px)` : `${-sideOffsetValue}px`;
7173 + if (crossAxisShiftEnabled && isVertical && Math.abs(middlewareData2.shift?.y || 0) > sideOffsetValue) {
7174 + sideOrigin = `${rects.reference.y + rects.reference.height / 2 - y2}px`;
7175 + }
7176 + floating.style.setProperty(transformOrigin, isVertical ? `${crossOrigin} ${sideOrigin}` : `${sideOrigin} ${crossOrigin}`);
7177 + return {};
7178 + }
7179 + }, hide4, adaptiveOrigin2);
7180 + useIsoLayoutEffect(() => {
7181 + if (!mounted && floatingRootContext) {
7182 + floatingRootContext.update({
7183 + referenceElement: null,
7184 + floatingElement: null,
7185 + domReferenceElement: null,
7186 + positionReference: null
7187 + });
7188 + }
7189 + }, [mounted, floatingRootContext]);
7190 + const autoUpdateOptions = React29.useMemo(() => ({
7191 + ancestorScroll: !disableAnchorTracking,
7192 + elementResize: !disableAnchorTracking && typeof ResizeObserver !== "undefined",
7193 + layoutShift: !disableAnchorTracking && typeof IntersectionObserver !== "undefined"
7194 + }), [disableAnchorTracking]);
7195 + const {
7196 + refs,
7197 + elements,
7198 + x,
7199 + y,
7200 + middlewareData,
7201 + update: update2,
7202 + placement: renderedPlacement,
7203 + context,
7204 + isPositioned,
7205 + floatingStyles: originalFloatingStyles
7206 + } = useFloatingHook({
7207 + rootContext: floatingRootContext,
7208 + open: keepMounted ? mounted : void 0,
7209 + placement,
7210 + middleware,
7211 + strategy: positionMethod,
7212 + whileElementsMounted: keepMounted ? void 0 : (...args) => autoUpdate(...args, autoUpdateOptions),
7213 + nodeId,
7214 + externalTree
7215 + });
7216 + const {
7217 + sideX,
7218 + sideY
7219 + } = middlewareData.adaptiveOrigin || DEFAULT_SIDES;
7220 + const resolvedPosition = isPositioned ? positionMethod : "fixed";
7221 + const floatingStyles = React29.useMemo(() => {
7222 + let base;
7223 + if (!isPositioned) {
7224 + base = {
7225 + position: resolvedPosition,
7226 + top: 0,
7227 + left: 0
7228 + };
7229 + } else if (adaptiveOrigin2) {
7230 + base = {
7231 + position: resolvedPosition,
7232 + [sideX]: x,
7233 + [sideY]: y
7234 + };
7235 + } else {
7236 + base = {
7237 + ...originalFloatingStyles,
7238 + position: resolvedPosition
7239 + };
7240 + }
7241 + base[AVAILABLE_WIDTH_VAR] = "100vw";
7242 + base[AVAILABLE_HEIGHT_VAR] = "100vh";
7243 + if (!isPositioned) {
7244 + base.opacity = 0;
7245 + }
7246 + return base;
7247 + }, [adaptiveOrigin2, resolvedPosition, sideX, x, sideY, y, originalFloatingStyles, isPositioned]);
7248 + const registeredPositionReferenceRef = React29.useRef(null);
7249 + useIsoLayoutEffect(() => {
7250 + if (!mounted) {
7251 + return;
7252 + }
7253 + const anchorValue = anchorValueRef.current;
7254 + const resolvedAnchor = typeof anchorValue === "function" ? anchorValue() : anchorValue;
7255 + const unwrappedElement = (isRef(resolvedAnchor) ? resolvedAnchor.current : resolvedAnchor) || null;
7256 + const finalAnchor = unwrappedElement || null;
7257 + if (finalAnchor !== registeredPositionReferenceRef.current) {
7258 + refs.setPositionReference(finalAnchor);
7259 + registeredPositionReferenceRef.current = finalAnchor;
7260 + }
7261 + }, [mounted, refs, anchorDep, anchorValueRef]);
7262 + React29.useEffect(() => {
7263 + if (!mounted) {
7264 + return;
7265 + }
7266 + const anchorValue = anchorValueRef.current;
7267 + if (typeof anchorValue === "function") {
7268 + return;
7269 + }
7270 + if (isRef(anchorValue) && anchorValue.current !== registeredPositionReferenceRef.current) {
7271 + refs.setPositionReference(anchorValue.current);
7272 + registeredPositionReferenceRef.current = anchorValue.current;
7273 + }
7274 + }, [mounted, refs, anchorDep, anchorValueRef]);
7275 + React29.useEffect(() => {
7276 + if (keepMounted && mounted && elements.reference && elements.floating) {
7277 + return autoUpdate(elements.reference, elements.floating, update2, autoUpdateOptions);
7278 + }
7279 + return void 0;
7280 + }, [keepMounted, mounted, elements, update2, autoUpdateOptions]);
7281 + const renderedSide = getSide(renderedPlacement);
7282 + const logicalRenderedSide = getLogicalSide(sideParam, renderedSide, isRtl);
7283 + const renderedAlign = getAlignment(renderedPlacement) || "center";
7284 + const anchorHidden2 = Boolean(middlewareData.hide?.referenceHidden);
7285 + useIsoLayoutEffect(() => {
7286 + if (lazyFlip && mounted && isPositioned && renderedSide !== side) {
7287 + setMountSide(renderedSide);
7288 + }
7289 + }, [lazyFlip, mounted, isPositioned, renderedSide, side]);
7290 + const arrowStyles = React29.useMemo(() => ({
7291 + position: "absolute",
7292 + top: middlewareData.arrow?.y,
7293 + left: middlewareData.arrow?.x
7294 + }), [middlewareData.arrow]);
7295 + const arrowUncentered = middlewareData.arrow?.centerOffset !== 0;
7296 + return React29.useMemo(() => ({
7297 + positionerStyles: floatingStyles,
7298 + arrowStyles,
7299 + arrowRef,
7300 + arrowUncentered,
7301 + side: logicalRenderedSide,
7302 + align: renderedAlign,
7303 + physicalSide: renderedSide,
7304 + anchorHidden: anchorHidden2,
7305 + refs,
7306 + context,
7307 + isPositioned,
7308 + update: update2
7309 + }), [floatingStyles, arrowStyles, arrowRef, arrowUncentered, logicalRenderedSide, renderedAlign, renderedSide, anchorHidden2, refs, context, isPositioned, update2]);
7310 +}
7311 +function isRef(param) {
7312 + return param != null && "current" in param;
7313 +}
7314 +
7315 +// node_modules/@base-ui/react/internals/getDisabledMountTransitionStyles.mjs
7316 +function getDisabledMountTransitionStyles(transitionStatus) {
7317 + return transitionStatus === "starting" ? DISABLED_TRANSITIONS_STYLE : EMPTY_OBJECT;
7318 +}
7319 +
7320 +// node_modules/@base-ui/react/utils/usePositioner.mjs
7321 +function usePositioner(componentProps, state, {
7322 + styles,
7323 + transitionStatus,
7324 + props,
7325 + refs,
7326 + hidden,
7327 + inert = false
7328 +}) {
7329 + const style = {
7330 + ...styles
7331 + };
7332 + if (inert) {
7333 + style.pointerEvents = "none";
7334 + }
7335 + return useRenderElement("div", componentProps, {
7336 + state,
7337 + ref: refs,
7338 + props: [{
7339 + role: "presentation",
7340 + hidden,
7341 + style
7342 + }, getDisabledMountTransitionStyles(transitionStatus), props],
7343 + stateAttributesMapping: popupStateMapping
7344 + });
7345 +}
7346 +
7347 +// node_modules/@base-ui/react/utils/usePopupViewport.mjs
7348 +var React33 = __toESM(require_react(), 1);
7349 +var ReactDOM6 = __toESM(require_react_dom(), 1);
7350 +
7351 +// node_modules/@base-ui/utils/usePreviousValue.mjs
7352 +var React30 = __toESM(require_react(), 1);
7353 +function usePreviousValue(value) {
7354 + const [state, setState] = React30.useState({
7355 + current: value,
7356 + previous: null
7357 + });
7358 + if (!Object.is(value, state.current)) {
7359 + setState({
7360 + current: value,
7361 + previous: state.current
7362 + });
7363 + }
7364 + return state.previous;
7365 +}
7366 +
7367 +// node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
7368 +var React31 = __toESM(require_react(), 1);
7369 +
7370 +// node_modules/@base-ui/react/utils/getCssDimensions.mjs
7371 +function getCssDimensions2(element) {
7372 + const css = getComputedStyle2(element);
7373 + let width = parseFloat(css.width) || 0;
7374 + let height = parseFloat(css.height) || 0;
7375 + const hasOffset = isHTMLElement(element);
7376 + const offsetWidth = hasOffset ? element.offsetWidth : width;
7377 + const offsetHeight = hasOffset ? element.offsetHeight : height;
7378 + const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
7379 + if (shouldFallback) {
7380 + width = offsetWidth;
7381 + height = offsetHeight;
7382 + }
7383 + return {
7384 + width,
7385 + height
7386 + };
7387 +}
7388 +
7389 +// node_modules/@base-ui/react/utils/CommonPopupCssVars.mjs
7390 +var popupWidth = "--popup-width";
7391 +var popupHeight = "--popup-height";
7392 +
7393 +// node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
7394 +function usePopupAutoResize(parameters) {
7395 + const {
7396 + popupElement,
7397 + positionerElement,
7398 + content,
7399 + mounted,
7400 + onMeasureLayout: onMeasureLayoutParam,
7401 + onMeasureLayoutComplete: onMeasureLayoutCompleteParam,
7402 + side,
7403 + direction
7404 + } = parameters;
7405 + const runOnceAnimationsFinish = useAnimationsFinished(popupElement, true);
7406 + const animationFrame = useAnimationFrame();
7407 + const committedDimensionsRef = React31.useRef(null);
7408 + const isInitialRenderRef = React31.useRef(true);
7409 + const restoreAnchoringStylesRef = React31.useRef(NOOP);
7410 + const onMeasureLayout = useStableCallback(onMeasureLayoutParam);
7411 + const onMeasureLayoutComplete = useStableCallback(onMeasureLayoutCompleteParam);
7412 + const anchoringStyles = React31.useMemo(() => getPopupAnchoringStyles(side, direction), [side, direction]);
7413 + useIsoLayoutEffect(() => {
7414 + if (!mounted) {
7415 + restoreAnchoringStylesRef.current = NOOP;
7416 + isInitialRenderRef.current = true;
7417 + committedDimensionsRef.current = null;
7418 + return void 0;
7419 + }
7420 + if (!popupElement || !positionerElement) {
7421 + return void 0;
7422 + }
7423 + restoreAnchoringStylesRef.current = applyElementStyles(popupElement, anchoringStyles);
7424 + setPopupCssSize(popupElement, "auto");
7425 + const restorePopupPosition = overrideElementStyle(popupElement, "position", "static");
7426 + const restorePopupTransform = overrideElementStyle(popupElement, "transform", "none");
7427 + const restorePopupScale = overrideElementStyle(popupElement, "scale", "1");
7428 + const restorePositionerAvailableSize = applyElementStyles(positionerElement, {
7429 + [availableWidth]: "max-content",
7430 + [availableHeight]: "max-content"
7431 + });
7432 + function restoreMeasurementOverrides() {
7433 + restorePopupPosition();
7434 + restorePopupTransform();
7435 + restorePositionerAvailableSize();
7436 + }
7437 + function restoreMeasurementOverridesIncludingScale() {
7438 + restoreMeasurementOverrides();
7439 + restorePopupScale();
7440 + }
7441 + onMeasureLayout?.();
7442 + if (isInitialRenderRef.current || committedDimensionsRef.current === null) {
7443 + setPositionerCssSize(positionerElement, "max-content");
7444 + const dimensions = getCssDimensions2(popupElement);
7445 + committedDimensionsRef.current = dimensions;
7446 + setPositionerCssSize(positionerElement, dimensions);
7447 + restoreMeasurementOverridesIncludingScale();
7448 + onMeasureLayoutComplete?.(null, dimensions);
7449 + isInitialRenderRef.current = false;
7450 + return () => {
7451 + restoreAnchoringStylesRef.current();
7452 + restoreAnchoringStylesRef.current = NOOP;
7453 + };
7454 + }
7455 + setPositionerCssSize(positionerElement, "max-content");
7456 + const previousDimensions = committedDimensionsRef.current;
7457 + const newDimensions = getCssDimensions2(popupElement);
7458 + committedDimensionsRef.current = newDimensions;
7459 + setPopupCssSize(popupElement, previousDimensions);
7460 + restoreMeasurementOverridesIncludingScale();
7461 + onMeasureLayoutComplete?.(previousDimensions, newDimensions);
7462 + setPositionerCssSize(positionerElement, newDimensions);
7463 + const abortController = new AbortController();
7464 + animationFrame.request(() => {
7465 + setPopupCssSize(popupElement, newDimensions);
7466 + runOnceAnimationsFinish(() => {
7467 + popupElement.style.setProperty(popupWidth, "auto");
7468 + popupElement.style.setProperty(popupHeight, "auto");
7469 + }, abortController.signal);
7470 + });
7471 + return () => {
7472 + abortController.abort();
7473 + animationFrame.cancel();
7474 + restoreAnchoringStylesRef.current();
7475 + restoreAnchoringStylesRef.current = NOOP;
7476 + };
7477 + }, [content, popupElement, positionerElement, runOnceAnimationsFinish, animationFrame, mounted, onMeasureLayout, onMeasureLayoutComplete, anchoringStyles]);
7478 +}
7479 +function getPopupAnchoringStyles(side, direction) {
7480 + const isPhysicalTop = side === "top";
7481 + const isPhysicalLeft = side === "left" || side === (direction === "rtl" ? "inline-end" : "inline-start");
7482 + if (!isPhysicalTop && !isPhysicalLeft) {
7483 + return EMPTY_OBJECT;
7484 + }
7485 + return {
7486 + position: "absolute",
7487 + [isPhysicalTop ? "bottom" : "top"]: "0",
7488 + [isPhysicalLeft ? "right" : "left"]: "0"
7489 + };
7490 +}
7491 +function overrideElementStyle(element, property, value) {
7492 + const originalValue = element.style.getPropertyValue(property);
7493 + element.style.setProperty(property, value);
7494 + return () => {
7495 + element.style.setProperty(property, originalValue);
7496 + };
7497 +}
7498 +function applyElementStyles(element, styles) {
7499 + const restorers = [];
7500 + for (const [key, value] of Object.entries(styles)) {
7501 + restorers.push(overrideElementStyle(element, key, value));
7502 + }
7503 + return restorers.length ? () => {
7504 + restorers.forEach((restore) => restore());
7505 + } : NOOP;
7506 +}
7507 +function setPopupCssSize(popupElement, size4) {
7508 + const width = size4 === "auto" ? "auto" : `${size4.width}px`;
7509 + const height = size4 === "auto" ? "auto" : `${size4.height}px`;
7510 + popupElement.style.setProperty(popupWidth, width);
7511 + popupElement.style.setProperty(popupHeight, height);
7512 +}
7513 +function setPositionerCssSize(positionerElement, size4) {
7514 + const width = size4 === "max-content" ? "max-content" : `${size4.width}px`;
7515 + const height = size4 === "max-content" ? "max-content" : `${size4.height}px`;
7516 + positionerElement.style.setProperty(positionerWidth, width);
7517 + positionerElement.style.setProperty(positionerHeight, height);
7518 +}
7519 +
7520 +// node_modules/@base-ui/react/direction-provider/DirectionProvider.mjs
7521 +var React32 = __toESM(require_react(), 1);
7522 +var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
7523 +var DirectionProvider = function DirectionProvider2(props) {
7524 + const {
7525 + direction = "ltr"
7526 + } = props;
7527 + const contextValue = React32.useMemo(() => ({
7528 + direction
7529 + }), [direction]);
7530 + return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DirectionContext.Provider, {
7531 + value: contextValue,
7532 + children: props.children
7533 + });
7534 +};
7535 +if (true) DirectionProvider.displayName = "DirectionProvider";
7536 +
7537 +// node_modules/@base-ui/react/utils/adaptiveOriginMiddleware.mjs
7538 +var adaptiveOrigin = {
7539 + name: "adaptiveOrigin",
7540 + async fn(state) {
7541 + const {
7542 + x: rawX,
7543 + y: rawY,
7544 + rects: {
7545 + floating: floatRect
7546 + },
7547 + elements: {
7548 + floating
7549 + },
7550 + platform: platform3,
7551 + strategy,
7552 + placement
7553 + } = state;
7554 + const win = getWindow(floating);
7555 + const styles = win.getComputedStyle(floating);
7556 + const hasTransition = styles.transitionDuration !== "0s" && styles.transitionDuration !== "";
7557 + if (!hasTransition) {
7558 + return {
7559 + x: rawX,
7560 + y: rawY,
7561 + data: DEFAULT_SIDES
7562 + };
7563 + }
7564 + const offsetParent = await platform3.getOffsetParent?.(floating);
7565 + let offsetDimensions = {
7566 + width: 0,
7567 + height: 0
7568 + };
7569 + if (strategy === "fixed" && win?.visualViewport) {
7570 + offsetDimensions = {
7571 + width: win.visualViewport.width,
7572 + height: win.visualViewport.height
7573 + };
7574 + } else if (offsetParent === win) {
7575 + const doc = ownerDocument(floating);
7576 + offsetDimensions = {
7577 + width: doc.documentElement.clientWidth,
7578 + height: doc.documentElement.clientHeight
7579 + };
7580 + } else if (await platform3.isElement?.(offsetParent)) {
7581 + offsetDimensions = await platform3.getDimensions(offsetParent);
7582 + }
7583 + const currentSide = getSide(placement);
7584 + let x = rawX;
7585 + let y = rawY;
7586 + if (currentSide === "left") {
7587 + x = offsetDimensions.width - (rawX + floatRect.width);
7588 + }
7589 + if (currentSide === "top") {
7590 + y = offsetDimensions.height - (rawY + floatRect.height);
7591 + }
7592 + const sideX = currentSide === "left" ? "right" : DEFAULT_SIDES.sideX;
7593 + const sideY = currentSide === "top" ? "bottom" : DEFAULT_SIDES.sideY;
7594 + return {
7595 + x,
7596 + y,
7597 + data: {
7598 + sideX,
7599 + sideY
7600 + }
7601 + };
7602 + }
7603 +};
7604 +
7605 +// node_modules/@base-ui/react/utils/CommonViewportDataAttributes.mjs
7606 +var activationDirection = "data-activation-direction";
7607 +
7608 +// node_modules/@base-ui/react/utils/usePopupViewport.mjs
7609 +var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
7610 +var popupViewportStateMapping = {
7611 + activationDirection: (value) => value ? {
7612 + [activationDirection]: value
7613 + } : null
7614 +};
7615 +function usePopupViewport(parameters) {
7616 + const {
7617 + store: store2,
7618 + side,
7619 + children
7620 + } = parameters;
7621 + const direction = useDirection();
7622 + const activeTrigger = store2.useState("activeTriggerElement");
7623 + const activeTriggerId = store2.useState("activeTriggerId");
7624 + const open2 = store2.useState("open");
7625 + const payload = store2.useState("payload");
7626 + const mounted = store2.useState("mounted");
7627 + const popupElement = store2.useState("popupElement");
7628 + const positionerElement = store2.useState("positionerElement");
7629 + const previousActiveTrigger = usePreviousValue(open2 ? activeTrigger : null);
7630 + const currentContentKey = usePopupContentKey(activeTriggerId, payload);
7631 + const capturedNodeRef = React33.useRef(null);
7632 + const [previousContentNode, setPreviousContentNode] = React33.useState(null);
7633 + const [newTriggerOffset, setNewTriggerOffset] = React33.useState(null);
7634 + const currentContainerRef = React33.useRef(null);
7635 + const previousContainerRef = React33.useRef(null);
7636 + const onAnimationsFinished = useAnimationsFinished(currentContainerRef, true);
7637 + const cleanupFrame = useAnimationFrame();
7638 + const cleanupControllerRef = React33.useRef(null);
7639 + const [previousContentDimensions, setPreviousContentDimensions] = React33.useState(null);
7640 + const [showStartingStyleAttribute, setShowStartingStyleAttribute] = React33.useState(false);
7641 + useIsoLayoutEffect(() => {
7642 + store2.set("adaptiveOrigin", adaptiveOrigin);
7643 + return () => {
7644 + store2.set("adaptiveOrigin", void 0);
7645 + };
7646 + }, [store2]);
7647 + const handleMeasureLayout = useStableCallback(() => {
7648 + currentContainerRef.current?.style.setProperty("animation", "none");
7649 + currentContainerRef.current?.style.setProperty("transition", "none");
7650 + previousContainerRef.current?.style.setProperty("display", "none");
7651 + });
7652 + const handleMeasureLayoutComplete = useStableCallback((previousDimensions) => {
7653 + currentContainerRef.current?.style.removeProperty("animation");
7654 + currentContainerRef.current?.style.removeProperty("transition");
7655 + previousContainerRef.current?.style.removeProperty("display");
7656 + if (previousDimensions) {
7657 + setPreviousContentDimensions(previousDimensions);
7658 + }
7659 + });
7660 + const armViewportCleanup = useStableCallback(() => {
7661 + cleanupControllerRef.current?.abort();
7662 + const controller = new AbortController();
7663 + cleanupControllerRef.current = controller;
7664 + onAnimationsFinished(() => {
7665 + setPreviousContentNode(null);
7666 + setPreviousContentDimensions(null);
7667 + capturedNodeRef.current = null;
7668 + }, controller.signal);
7669 + });
7670 + const lastHandledTriggerRef = React33.useRef(null);
7671 + useIsoLayoutEffect(() => {
7672 + if (!open2 || !mounted) {
7673 + lastHandledTriggerRef.current = null;
7674 + }
7675 + }, [open2, mounted]);
7676 + useIsoLayoutEffect(() => {
7677 + if (activeTrigger && previousActiveTrigger && activeTrigger !== previousActiveTrigger && lastHandledTriggerRef.current !== activeTrigger && capturedNodeRef.current) {
7678 + setPreviousContentNode(capturedNodeRef.current);
7679 + setShowStartingStyleAttribute(true);
7680 + const offset4 = calculateRelativePosition(previousActiveTrigger, activeTrigger);
7681 + setNewTriggerOffset(offset4);
7682 + lastHandledTriggerRef.current = activeTrigger;
7683 + }
7684 + }, [activeTrigger, previousActiveTrigger]);
7685 + useIsoLayoutEffect(() => {
7686 + if (previousContentNode == null) {
7687 + return;
7688 + }
7689 + cleanupControllerRef.current?.abort();
7690 + setShowStartingStyleAttribute(true);
7691 + cleanupFrame.request(() => {
7692 + ReactDOM6.flushSync(() => {
7693 + setShowStartingStyleAttribute(false);
7694 + });
7695 + armViewportCleanup();
7696 + });
7697 + }, [currentContentKey, previousContentNode, armViewportCleanup, cleanupFrame]);
7698 + useIsoLayoutEffect(() => {
7699 + const source = currentContainerRef.current;
7700 + if (!source) {
7701 + return;
7702 + }
7703 + const wrapper = ownerDocument(source).createElement("div");
7704 + for (const child of Array.from(source.childNodes)) {
7705 + wrapper.appendChild(child.cloneNode(true));
7706 + }
7707 + capturedNodeRef.current = wrapper;
7708 + });
7709 + const isTransitioning = previousContentNode != null;
7710 + let childrenToRender;
7711 + if (!isTransitioning) {
7712 + childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
7713 + "data-current": true,
7714 + ref: currentContainerRef,
7715 + children
7716 + }, currentContentKey);
7717 + } else {
7718 + childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(React33.Fragment, {
7719 + children: [/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
7720 + "data-previous": true,
7721 + inert: inertValue(true),
7722 + ref: previousContainerRef,
7723 + style: {
7724 + ...previousContentDimensions ? {
7725 + [popupWidth]: `${previousContentDimensions.width}px`,
7726 + [popupHeight]: `${previousContentDimensions.height}px`
7727 + } : null,
7728 + position: "absolute"
7729 + },
7730 + "data-ending-style": showStartingStyleAttribute ? void 0 : ""
7731 + }, "previous"), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
7732 + "data-current": true,
7733 + ref: currentContainerRef,
7734 + "data-starting-style": showStartingStyleAttribute ? "" : void 0,
7735 + children
7736 + }, currentContentKey)]
7737 + });
7738 + }
7739 + useIsoLayoutEffect(() => {
7740 + const container = previousContainerRef.current;
7741 + if (!container || !previousContentNode) {
7742 + return;
7743 + }
7744 + container.replaceChildren(...Array.from(previousContentNode.childNodes));
7745 + }, [previousContentNode]);
7746 + usePopupAutoResize({
7747 + popupElement,
7748 + positionerElement,
7749 + mounted,
7750 + content: payload,
7751 + onMeasureLayout: handleMeasureLayout,
7752 + onMeasureLayoutComplete: handleMeasureLayoutComplete,
7753 + side,
7754 + direction
7755 + });
7756 + const state = {
7757 + activationDirection: getActivationDirection(newTriggerOffset),
7758 + transitioning: isTransitioning
7759 + };
7760 + return {
7761 + children: childrenToRender,
7762 + state
7763 + };
7764 +}
7765 +function getActivationDirection(offset4) {
7766 + if (!offset4) {
7767 + return void 0;
7768 + }
7769 + return `${getValueWithTolerance(offset4.horizontal, 5, "right", "left")} ${getValueWithTolerance(offset4.vertical, 5, "down", "up")}`;
7770 +}
7771 +function getValueWithTolerance(value, tolerance, positiveLabel, negativeLabel) {
7772 + if (value > tolerance) {
7773 + return positiveLabel;
7774 + }
7775 + if (value < -tolerance) {
7776 + return negativeLabel;
7777 + }
7778 + return "";
7779 +}
7780 +function calculateRelativePosition(from, to) {
7781 + const fromRect = from.getBoundingClientRect();
7782 + const toRect = to.getBoundingClientRect();
7783 + const fromCenter = {
7784 + x: fromRect.left + fromRect.width / 2,
7785 + y: fromRect.top + fromRect.height / 2
7786 + };
7787 + const toCenter = {
7788 + x: toRect.left + toRect.width / 2,
7789 + y: toRect.top + toRect.height / 2
7790 + };
7791 + return {
7792 + horizontal: toCenter.x - fromCenter.x,
7793 + vertical: toCenter.y - fromCenter.y
7794 + };
7795 +}
7796 +function usePopupContentKey(activeTriggerId, payload) {
7797 + const [contentKey, setContentKey] = React33.useState(0);
7798 + const previousActiveTriggerIdRef = React33.useRef(activeTriggerId);
7799 + const previousPayloadRef = React33.useRef(payload);
7800 + const pendingPayloadUpdateRef = React33.useRef(false);
7801 + useIsoLayoutEffect(() => {
7802 + const previousActiveTriggerId = previousActiveTriggerIdRef.current;
7803 + const previousPayload = previousPayloadRef.current;
7804 + const triggerIdChanged = activeTriggerId !== previousActiveTriggerId;
7805 + const payloadChanged = payload !== previousPayload;
7806 + if (triggerIdChanged) {
7807 + setContentKey((value) => value + 1);
7808 + pendingPayloadUpdateRef.current = !payloadChanged;
7809 + } else if (pendingPayloadUpdateRef.current && payloadChanged) {
7810 + setContentKey((value) => value + 1);
7811 + pendingPayloadUpdateRef.current = false;
7812 + }
7813 + previousActiveTriggerIdRef.current = activeTriggerId;
7814 + previousPayloadRef.current = payload;
7815 + }, [activeTriggerId, payload]);
7816 + return `${activeTriggerId ?? "current"}-${contentKey}`;
7817 +}
7818 +
7819 +// node_modules/@base-ui/react/utils/FloatingPortalLite.mjs
7820 +var React34 = __toESM(require_react(), 1);
7821 +var ReactDOM7 = __toESM(require_react_dom(), 1);
7822 +var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
7823 +var FloatingPortalLite = /* @__PURE__ */ React34.forwardRef(function FloatingPortalLite2(componentProps, forwardedRef) {
7824 + const {
7825 + children,
7826 + container,
7827 + className,
7828 + render,
7829 + style,
7830 + ...elementProps
7831 + } = componentProps;
7832 + const {
7833 + node: portalNode,
7834 + subtree: portalSubtree
7835 + } = useFloatingPortalNode({
7836 + container,
7837 + ref: forwardedRef,
7838 + componentProps,
7839 + elementProps
7840 + });
7841 + if (!portalSubtree && !portalNode) {
7842 + return null;
7843 + }
7844 + return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(React34.Fragment, {
7845 + children: [portalSubtree, portalNode && /* @__PURE__ */ ReactDOM7.createPortal(children, portalNode)]
7846 + });
7847 +});
7848 +if (true) FloatingPortalLite.displayName = "FloatingPortalLite";
7849 +
7850 +// node_modules/@base-ui/react/tooltip/index.parts.mjs
7851 +var index_parts_exports = {};
7852 +__export(index_parts_exports, {
7853 + Arrow: () => TooltipArrow,
7854 + Handle: () => TooltipHandle,
7855 + Popup: () => TooltipPopup,
7856 + Portal: () => TooltipPortal,
7857 + Positioner: () => TooltipPositioner,
7858 + Provider: () => TooltipProvider,
7859 + Root: () => TooltipRoot,
7860 + Trigger: () => TooltipTrigger,
7861 + Viewport: () => TooltipViewport,
7862 + createHandle: () => createTooltipHandle
7863 +});
7864 +
7865 +// node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
7866 +var React37 = __toESM(require_react(), 1);
7867 +
7868 +// node_modules/@base-ui/react/tooltip/root/TooltipRootContext.mjs
7869 +var React35 = __toESM(require_react(), 1);
7870 +var TooltipRootContext = /* @__PURE__ */ React35.createContext(void 0);
7871 +if (true) TooltipRootContext.displayName = "TooltipRootContext";
7872 +function useTooltipRootContext(optional) {
7873 + const context = React35.useContext(TooltipRootContext);
7874 + if (context === void 0 && !optional) {
7875 + throw new Error(true ? "Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>." : formatErrorMessage_default(72));
7876 + }
7877 + return context;
7878 +}
7879 +
7880 +// node_modules/@base-ui/react/tooltip/store/TooltipStore.mjs
7881 +var React36 = __toESM(require_react(), 1);
7882 +var selectors2 = {
7883 + ...popupStoreSelectors,
7884 + disabled: (state) => state.disabled,
7885 + instantType: (state) => state.instantType,
7886 + isInstantPhase: (state) => state.isInstantPhase,
7887 + trackCursorAxis: (state) => state.trackCursorAxis,
7888 + disableHoverablePopup: (state) => state.disableHoverablePopup,
7889 + lastOpenChangeReason: (state) => state.openChangeReason,
7890 + closeOnClick: (state) => state.closeOnClick,
7891 + closeDelay: (state) => state.closeDelay,
7892 + adaptiveOrigin: (state) => state.adaptiveOrigin
7893 +};
7894 +var TooltipStore = class extends ReactStore {
7895 + constructor(initialState2, floatingId, nested) {
7896 + const triggerElements = new PopupTriggerMap();
7897 + super(createInitialState(initialState2, triggerElements, floatingId, nested), createInitialContext(triggerElements), selectors2);
7898 + }
7899 + setOpen = (nextOpen, eventDetails) => {
7900 + applyPopupOpenChange(this, nextOpen, eventDetails, {
7901 + extraState: {
7902 + openChangeReason: eventDetails.reason
7903 + }
7904 + });
7905 + };
7906 + // Used by trigger clicks to clear a delayed hover open without reporting a public open-state change.
7907 + cancelPendingOpen(event) {
7908 + this.state.floatingRootContext.dispatchOpenChange(false, createChangeEventDetails(reason_parts_exports.triggerPress, event));
7909 + }
7910 +};
7911 +function createNullTooltipStore() {
7912 + const triggerElements = new PopupTriggerMap();
7913 + const store2 = new NullStore(Object.freeze(createInitialState(void 0, triggerElements)), Object.freeze(createInitialContext(triggerElements)), selectors2);
7914 + return Object.assign(store2, {
7915 + setOpen: NOOP,
7916 + cancelPendingOpen: NOOP
7917 + });
7918 +}
7919 +function createInitialState(initialState2, triggerElements, floatingId, nested = false) {
7920 + const state = {
7921 + ...createInitialPopupStoreState(triggerElements, floatingId, nested),
7922 + disabled: false,
7923 + instantType: void 0,
7924 + isInstantPhase: false,
7925 + trackCursorAxis: "none",
7926 + disableHoverablePopup: false,
7927 + openChangeReason: null,
7928 + closeOnClick: true,
7929 + closeDelay: 0,
7930 + adaptiveOrigin: void 0,
7931 + ...initialState2
7932 + };
7933 + return state;
7934 +}
7935 +function createInitialContext(triggerElements) {
7936 + return {
7937 + popupRef: /* @__PURE__ */ React36.createRef(),
7938 + onOpenChange: void 0,
7939 + onOpenChangeComplete: void 0,
7940 + triggerElements
7941 + };
7942 +}
7943 +
7944 +// node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
7945 +var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
7946 +var TooltipRoot = fastComponent(function TooltipRoot2(props) {
7947 + const {
7948 + disabled: disabled2 = false,
7949 + defaultOpen = false,
7950 + open: openProp,
7951 + disableHoverablePopup = false,
7952 + trackCursorAxis = "none",
7953 + actionsRef,
7954 + onOpenChange,
7955 + onOpenChangeComplete,
7956 + handle,
7957 + triggerId: triggerIdProp,
7958 + defaultTriggerId: defaultTriggerIdProp = null,
7959 + children
7960 + } = props;
7961 + const store2 = usePopupRootStore((floatingId, nested) => new TooltipStore({
7962 + open: defaultOpen,
7963 + openProp,
7964 + activeTriggerId: defaultTriggerIdProp,
7965 + triggerIdProp
7966 + }, floatingId, nested));
7967 + store2.useControlledProp("openProp", openProp);
7968 + store2.useControlledProp("triggerIdProp", triggerIdProp);
7969 + store2.useContextCallback("onOpenChange", onOpenChange);
7970 + store2.useContextCallback("onOpenChangeComplete", onOpenChangeComplete);
7971 + const openState = store2.useState("open");
7972 + const open2 = !disabled2 && openState;
7973 + const activeTriggerId = store2.useState("activeTriggerId");
7974 + const mounted = store2.useState("mounted");
7975 + const payload = store2.useState("payload");
7976 + store2.useSyncedValues({
7977 + trackCursorAxis,
7978 + disableHoverablePopup,
7979 + disabled: disabled2
7980 + });
7981 + useImplicitActiveTrigger(store2, {
7982 + closeOnActiveTriggerUnmount: true
7983 + });
7984 + const {
7985 + forceUnmount,
7986 + transitionStatus
7987 + } = useOpenStateTransitions(open2, store2);
7988 + const isInstantPhase = store2.useState("isInstantPhase");
7989 + const instantType = store2.useState("instantType");
7990 + const lastOpenChangeReason = store2.useState("lastOpenChangeReason");
7991 + const previousInstantTypeRef = React37.useRef(null);
7992 + useIsoLayoutEffect(() => {
7993 + if (openState && disabled2) {
7994 + store2.setOpen(false, createChangeEventDetails(reason_parts_exports.disabled));
7995 + }
7996 + }, [openState, disabled2, store2]);
7997 + useIsoLayoutEffect(() => {
7998 + if (transitionStatus === "ending" && lastOpenChangeReason === reason_parts_exports.none || transitionStatus !== "ending" && isInstantPhase) {
7999 + if (instantType !== "delay") {
8000 + previousInstantTypeRef.current = instantType;
8001 + }
8002 + store2.set("instantType", "delay");
8003 + } else if (previousInstantTypeRef.current !== null) {
8004 + store2.set("instantType", previousInstantTypeRef.current);
8005 + previousInstantTypeRef.current = null;
8006 + }
8007 + }, [transitionStatus, isInstantPhase, lastOpenChangeReason, instantType, store2]);
8008 + useIsoLayoutEffect(() => {
8009 + if (open2) {
8010 + if (activeTriggerId == null) {
8011 + store2.set("payload", void 0);
8012 + }
8013 + }
8014 + }, [store2, activeTriggerId, open2]);
8015 + React37.useImperativeHandle(actionsRef, () => ({
8016 + unmount: forceUnmount,
8017 + close: () => store2.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction))
8018 + }), [forceUnmount, store2]);
8019 + const shouldRenderInteractions = open2 || mounted || !disabled2 && trackCursorAxis !== "none";
8020 + return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(TooltipRootContext.Provider, {
8021 + value: store2,
8022 + children: [handle && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PopupHandleAttachment, {
8023 + handle,
8024 + store: store2
8025 + }), shouldRenderInteractions && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TooltipInteractions, {
8026 + store: store2,
8027 + disabled: disabled2,
8028 + trackCursorAxis
8029 + }), typeof children === "function" ? children({
8030 + payload
8031 + }) : children]
8032 + });
8033 +});
8034 +if (true) TooltipRoot.displayName = "TooltipRoot";
8035 +function TooltipInteractions({
8036 + store: store2,
8037 + disabled: disabled2,
8038 + trackCursorAxis
8039 +}) {
8040 + const floatingRootContext = store2.useState("floatingRootContext");
8041 + const dismiss = useDismiss(floatingRootContext, {
8042 + enabled: !disabled2,
8043 + referencePress: () => store2.select("closeOnClick")
8044 + });
8045 + const clientPoint = useClientPoint(floatingRootContext, {
8046 + enabled: !disabled2 && trackCursorAxis !== "none",
8047 + axis: trackCursorAxis === "none" ? void 0 : trackCursorAxis
8048 + });
8049 + const triggerProps = React37.useMemo(() => mergeProps(clientPoint.reference, dismiss.reference), [clientPoint.reference, dismiss.reference]);
8050 + usePopupInteractionProps(store2, {
8051 + activeTriggerProps: triggerProps,
8052 + inactiveTriggerProps: triggerProps,
8053 + popupProps: dismiss.floating ?? EMPTY_OBJECT
8054 + });
8055 + return null;
8056 +}
8057 +
8058 +// node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
8059 +var React39 = __toESM(require_react(), 1);
8060 +
8061 +// node_modules/@base-ui/react/tooltip/provider/TooltipProviderContext.mjs
8062 +var React38 = __toESM(require_react(), 1);
8063 +var TooltipProviderContext = /* @__PURE__ */ React38.createContext(void 0);
8064 +if (true) TooltipProviderContext.displayName = "TooltipProviderContext";
8065 +function useTooltipProviderContext() {
8066 + return React38.useContext(TooltipProviderContext);
8067 +}
8068 +
8069 +// node_modules/@base-ui/react/tooltip/utils/constants.mjs
8070 +var OPEN_DELAY = 600;
8071 +
8072 +// node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
8073 +var TOOLTIP_TRIGGER_IDENTIFIER = "data-base-ui-tooltip-trigger";
8074 +function getTargetElement(event) {
8075 + if ("composedPath" in event) {
8076 + const path = event.composedPath();
8077 + for (let i = 0; i < path.length; i += 1) {
8078 + const element = path[i];
8079 + if (isElement(element)) {
8080 + return element;
8081 + }
8082 + }
8083 + }
8084 + const target = event.target;
8085 + if (isElement(target)) {
8086 + return target;
8087 + }
8088 + return null;
8089 +}
8090 +function closestEnabledTooltipTrigger(element) {
8091 + let current = element;
8092 + while (current) {
8093 + const trigger = current.closest(`[${TOOLTIP_TRIGGER_IDENTIFIER}]`);
8094 + if (trigger) {
8095 + return trigger;
8096 + }
8097 + const root = current.getRootNode();
8098 + current = "host" in root && isElement(root.host) ? root.host : null;
8099 + }
8100 + return null;
8101 +}
8102 +var TooltipTrigger = fastComponentRef(function TooltipTrigger2(componentProps, forwardedRef) {
8103 + const {
8104 + render,
8105 + className,
8106 + style,
8107 + handle,
8108 + payload,
8109 + disabled: disabledProp,
8110 + delay,
8111 + closeOnClick = true,
8112 + closeDelay,
8113 + id: idProp,
8114 + ...elementProps
8115 + } = componentProps;
8116 + const rootContext = useTooltipRootContext(true);
8117 + const handleStore = usePopupHandleStore(handle);
8118 + const store2 = handleStore ?? rootContext;
8119 + if (!store2) {
8120 + 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));
8121 + }
8122 + const thisTriggerId = useBaseUiId(idProp);
8123 + const isTriggerActive = store2.useState("isTriggerActive", thisTriggerId);
8124 + const isOpenedByThisTrigger = store2.useState("isOpenedByTrigger", thisTriggerId);
8125 + const floatingRootContext = store2.useState("floatingRootContext");
8126 + const triggerElementRef = React39.useRef(null);
8127 + const closeDelayWithDefault = closeDelay ?? 0;
8128 + const {
8129 + registerTrigger,
8130 + isMountedByThisTrigger
8131 + } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store2, {
8132 + payload,
8133 + closeOnClick,
8134 + closeDelay: closeDelayWithDefault
8135 + });
8136 + const providerDelay = useTooltipProviderContext();
8137 + const {
8138 + activeIdRef,
8139 + delayRef,
8140 + isInstantPhase,
8141 + hasProvider
8142 + } = useDelayGroup(floatingRootContext, {
8143 + open: isOpenedByThisTrigger
8144 + });
8145 + const hoverInteraction = useHoverInteractionSharedState(floatingRootContext);
8146 + store2.useSyncedValue("isInstantPhase", isInstantPhase);
8147 + const rootDisabled = store2.useState("disabled");
8148 + const disabled2 = disabledProp ?? rootDisabled;
8149 + const disabledRef = useValueAsRef(disabled2);
8150 + const trackCursorAxis = store2.useState("trackCursorAxis");
8151 + const disableHoverablePopup = store2.useState("disableHoverablePopup");
8152 + const isNestedTriggerHoveredRef = React39.useRef(false);
8153 + const nestedTriggerOpenTimeout = useTimeout();
8154 + const pointerTypeRef = React39.useRef(void 0);
8155 + function getOpenDelay() {
8156 + if (hasProvider && activeIdRef.current != null) {
8157 + return 0;
8158 + }
8159 + return delay ?? providerDelay ?? OPEN_DELAY;
8160 + }
8161 + function isEnabledNestedTriggerTarget(target) {
8162 + const triggerEl = triggerElementRef.current;
8163 + if (!triggerEl || !target) {
8164 + return false;
8165 + }
8166 + const nearestTrigger = closestEnabledTooltipTrigger(target);
8167 + return nearestTrigger !== null && nearestTrigger !== triggerEl && contains(triggerEl, nearestTrigger);
8168 + }
8169 + function detectNestedTriggerHover(target) {
8170 + const nestedTriggerHovered = isEnabledNestedTriggerTarget(target);
8171 + isNestedTriggerHoveredRef.current = nestedTriggerHovered;
8172 + if (nestedTriggerHovered) {
8173 + hoverInteraction.openChangeTimeout.clear();
8174 + hoverInteraction.restTimeout.clear();
8175 + hoverInteraction.restTimeoutPending = false;
8176 + nestedTriggerOpenTimeout.clear();
8177 + }
8178 + return nestedTriggerHovered;
8179 + }
8180 + const hoverProps = useHoverReferenceInteraction(floatingRootContext, {
8181 + enabled: !disabled2,
8182 + mouseOnly: true,
8183 + move: false,
8184 + handleClose: !disableHoverablePopup && trackCursorAxis !== "both" ? safePolygon() : null,
8185 + restMs: getOpenDelay,
8186 + delay() {
8187 + if (closeDelay == null && hasProvider) {
8188 + return {
8189 + close: getDelay(delayRef.current, "close")
8190 + };
8191 + }
8192 + return {
8193 + close: closeDelayWithDefault
8194 + };
8195 + },
8196 + triggerElementRef,
8197 + isActiveTrigger: isTriggerActive,
8198 + isClosing: () => store2.select("transitionStatus") === "ending",
8199 + shouldOpen() {
8200 + return !isNestedTriggerHoveredRef.current;
8201 + }
8202 + });
8203 + const focusProps = useFocus(floatingRootContext, {
8204 + enabled: !disabled2
8205 + }).reference;
8206 + const handleNestedTriggerHover = (event) => {
8207 + const wasNestedTriggerHovered = isNestedTriggerHoveredRef.current;
8208 + const target = getTargetElement(event);
8209 + const nestedTriggerHovered = detectNestedTriggerHover(target);
8210 + const triggerEl = triggerElementRef.current;
8211 + const targetInsideTrigger = triggerEl && target && contains(triggerEl, target);
8212 + if (nestedTriggerHovered && store2.select("open") && store2.select("lastOpenChangeReason") === reason_parts_exports.triggerHover) {
8213 + store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
8214 + return;
8215 + }
8216 + if (wasNestedTriggerHovered && !nestedTriggerHovered && targetInsideTrigger && !disabledRef.current && !store2.select("open") && triggerEl && // Match the hover hook's non-strict mouse fallback for mouse-only event sequences.
8217 + isMouseLikePointerType(pointerTypeRef.current)) {
8218 + const open2 = () => {
8219 + if (!isNestedTriggerHoveredRef.current && !disabledRef.current && !store2.select("open")) {
8220 + store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerEl));
8221 + }
8222 + };
8223 + const openDelay = getOpenDelay();
8224 + if (openDelay === 0) {
8225 + nestedTriggerOpenTimeout.clear();
8226 + open2();
8227 + } else {
8228 + nestedTriggerOpenTimeout.start(openDelay, open2);
8229 + }
8230 + }
8231 + };
8232 + const rootTriggerProps = store2.useState("triggerProps", isMountedByThisTrigger);
8233 + const shouldApplyRootTriggerProps = isMountedByThisTrigger || trackCursorAxis !== "none";
8234 + const state = {
8235 + open: isOpenedByThisTrigger
8236 + };
8237 + const element = useRenderElement("button", componentProps, {
8238 + state,
8239 + ref: [forwardedRef, registerTrigger, triggerElementRef],
8240 + props: [hoverProps, focusProps, shouldApplyRootTriggerProps ? rootTriggerProps : void 0, {
8241 + onMouseOver(event) {
8242 + handleNestedTriggerHover(event.nativeEvent);
8243 + },
8244 + onFocus(event) {
8245 + if (isEnabledNestedTriggerTarget(getTargetElement(event.nativeEvent))) {
8246 + event.preventBaseUIHandler();
8247 + }
8248 + },
8249 + onMouseLeave() {
8250 + isNestedTriggerHoveredRef.current = false;
8251 + nestedTriggerOpenTimeout.clear();
8252 + pointerTypeRef.current = void 0;
8253 + },
8254 + onPointerEnter(event) {
8255 + pointerTypeRef.current = event.pointerType;
8256 + },
8257 + onPointerDown(event) {
8258 + pointerTypeRef.current = event.pointerType;
8259 + store2.set("closeOnClick", closeOnClick);
8260 + if (closeOnClick && !store2.select("open")) {
8261 + store2.cancelPendingOpen(event.nativeEvent);
8262 + }
8263 + },
8264 + onClick(event) {
8265 + if (closeOnClick && !store2.select("open")) {
8266 + store2.cancelPendingOpen(event.nativeEvent);
8267 + }
8268 + },
8269 + id: thisTriggerId,
8270 + [triggerDisabled]: disabled2 ? "" : void 0,
8271 + [TOOLTIP_TRIGGER_IDENTIFIER]: disabled2 ? void 0 : ""
8272 + }, elementProps],
8273 + stateAttributesMapping: triggerOpenStateMapping
8274 + });
8275 + return element;
8276 +});
8277 +if (true) TooltipTrigger.displayName = "TooltipTrigger";
8278 +
8279 +// node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
8280 +var React41 = __toESM(require_react(), 1);
8281 +
8282 +// node_modules/@base-ui/react/tooltip/portal/TooltipPortalContext.mjs
8283 +var React40 = __toESM(require_react(), 1);
8284 +var TooltipPortalContext = /* @__PURE__ */ React40.createContext(void 0);
8285 +if (true) TooltipPortalContext.displayName = "TooltipPortalContext";
8286 +function useTooltipPortalContext() {
8287 + const value = React40.useContext(TooltipPortalContext);
8288 + if (value === void 0) {
8289 + throw new Error(true ? "Base UI: <Tooltip.Portal> is missing." : formatErrorMessage_default(70));
8290 + }
8291 + return value;
8292 +}
8293 +
8294 +// node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
8295 +var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
8296 +var TooltipPortal = /* @__PURE__ */ React41.forwardRef(function TooltipPortal2(props, forwardedRef) {
8297 + const {
8298 + keepMounted = false,
8299 + ...portalProps
8300 + } = props;
8301 + const store2 = useTooltipRootContext();
8302 + const mounted = store2.useState("mounted");
8303 + const shouldRender = mounted || keepMounted;
8304 + if (!shouldRender) {
8305 + return null;
8306 + }
8307 + return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TooltipPortalContext.Provider, {
8308 + value: keepMounted,
8309 + children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FloatingPortalLite, {
8310 + ref: forwardedRef,
8311 + ...portalProps
8312 + })
8313 + });
8314 +});
8315 +if (true) TooltipPortal.displayName = "TooltipPortal";
8316 +
8317 +// node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
8318 +var React43 = __toESM(require_react(), 1);
8319 +
8320 +// node_modules/@base-ui/react/tooltip/positioner/TooltipPositionerContext.mjs
8321 +var React42 = __toESM(require_react(), 1);
8322 +var TooltipPositionerContext = /* @__PURE__ */ React42.createContext(void 0);
8323 +if (true) TooltipPositionerContext.displayName = "TooltipPositionerContext";
8324 +function useTooltipPositionerContext() {
8325 + const context = React42.useContext(TooltipPositionerContext);
8326 + if (context === void 0) {
8327 + throw new Error(true ? "Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>." : formatErrorMessage_default(71));
8328 + }
8329 + return context;
8330 +}
8331 +
8332 +// node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
8333 +var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
8334 +var TooltipPositioner = /* @__PURE__ */ React43.forwardRef(function TooltipPositioner2(componentProps, forwardedRef) {
8335 + const {
8336 + render,
8337 + className,
8338 + anchor,
8339 + positionMethod = "absolute",
8340 + side = "top",
8341 + align = "center",
8342 + sideOffset = 0,
8343 + alignOffset = 0,
8344 + collisionBoundary = "clipping-ancestors",
8345 + collisionPadding = 5,
8346 + arrowPadding = 5,
8347 + sticky = false,
8348 + disableAnchorTracking = false,
8349 + collisionAvoidance = POPUP_COLLISION_AVOIDANCE,
8350 + style,
8351 + ...elementProps
8352 + } = componentProps;
8353 + const store2 = useTooltipRootContext();
8354 + const keepMounted = useTooltipPortalContext();
8355 + const open2 = store2.useState("open");
8356 + const mounted = store2.useState("mounted");
8357 + const trackCursorAxis = store2.useState("trackCursorAxis");
8358 + const disableHoverablePopup = store2.useState("disableHoverablePopup");
8359 + const floatingRootContext = store2.useState("floatingRootContext");
8360 + const instantType = store2.useState("instantType");
8361 + const transitionStatus = store2.useState("transitionStatus");
8362 + const adaptiveOrigin2 = store2.useState("adaptiveOrigin");
8363 + const positioning = useAnchorPositioning({
8364 + anchor,
8365 + positionMethod,
8366 + floatingRootContext,
8367 + mounted,
8368 + side,
8369 + sideOffset,
8370 + align,
8371 + alignOffset,
8372 + collisionBoundary,
8373 + collisionPadding,
8374 + sticky,
8375 + arrowPadding,
8376 + disableAnchorTracking,
8377 + keepMounted,
8378 + collisionAvoidance,
8379 + adaptiveOrigin: adaptiveOrigin2
8380 + });
8381 + const state = React43.useMemo(() => ({
8382 + open: open2,
8383 + side: positioning.side,
8384 + align: positioning.align,
8385 + anchorHidden: positioning.anchorHidden,
8386 + instant: trackCursorAxis !== "none" ? "tracking-cursor" : instantType
8387 + }), [open2, positioning.side, positioning.align, positioning.anchorHidden, trackCursorAxis, instantType]);
8388 + const element = usePositioner(componentProps, state, {
8389 + styles: positioning.positionerStyles,
8390 + transitionStatus,
8391 + props: elementProps,
8392 + refs: [forwardedRef, store2.useStateSetter("positionerElement")],
8393 + hidden: !mounted,
8394 + inert: !open2 || trackCursorAxis === "both" || disableHoverablePopup
8395 + });
8396 + return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TooltipPositionerContext.Provider, {
8397 + value: positioning,
8398 + children: element
8399 + });
8400 +});
8401 +if (true) TooltipPositioner.displayName = "TooltipPositioner";
8402 +
8403 +// node_modules/@base-ui/react/tooltip/popup/TooltipPopup.mjs
8404 +var React44 = __toESM(require_react(), 1);
8405 +var TooltipPopup = /* @__PURE__ */ React44.forwardRef(function TooltipPopup2(componentProps, forwardedRef) {
8406 + const {
8407 + render,
8408 + className,
8409 + style,
8410 + ...elementProps
8411 + } = componentProps;
8412 + const store2 = useTooltipRootContext();
8413 + const {
8414 + side,
8415 + align
8416 + } = useTooltipPositionerContext();
8417 + const open2 = store2.useState("open");
8418 + const instantType = store2.useState("instantType");
8419 + const transitionStatus = store2.useState("transitionStatus");
8420 + const popupProps = store2.useState("popupProps");
8421 + const floatingContext = store2.useState("floatingRootContext");
8422 + const disabled2 = store2.useState("disabled");
8423 + const closeDelay = store2.useState("closeDelay");
8424 + useOpenChangeComplete({
8425 + open: open2,
8426 + ref: store2.context.popupRef,
8427 + onComplete() {
8428 + if (open2) {
8429 + store2.context.onOpenChangeComplete?.(true);
8430 + }
8431 + }
8432 + });
8433 + useHoverFloatingInteraction(floatingContext, {
8434 + enabled: !disabled2,
8435 + closeDelay
8436 + });
8437 + const setPopupElement = store2.useStateSetter("popupElement");
8438 + const state = {
8439 + open: open2,
8440 + side,
8441 + align,
8442 + instant: instantType,
8443 + transitionStatus
8444 + };
8445 + const element = useRenderElement("div", componentProps, {
8446 + state,
8447 + ref: [forwardedRef, store2.context.popupRef, setPopupElement],
8448 + props: [FOCUSABLE_POPUP_PROPS, popupProps, getDisabledMountTransitionStyles(transitionStatus), elementProps],
8449 + stateAttributesMapping: popupTransitionStateMapping
8450 + });
8451 + return element;
8452 +});
8453 +if (true) TooltipPopup.displayName = "TooltipPopup";
8454 +
8455 +// node_modules/@base-ui/react/tooltip/arrow/TooltipArrow.mjs
8456 +var React45 = __toESM(require_react(), 1);
8457 +var TooltipArrow = /* @__PURE__ */ React45.forwardRef(function TooltipArrow2(componentProps, forwardedRef) {
8458 + const {
8459 + render,
8460 + className,
8461 + style,
8462 + ...elementProps
8463 + } = componentProps;
8464 + const store2 = useTooltipRootContext();
8465 + const {
8466 + arrowRef,
8467 + side,
8468 + align,
8469 + arrowUncentered,
8470 + arrowStyles
8471 + } = useTooltipPositionerContext();
8472 + const open2 = store2.useState("open");
8473 + const instantType = store2.useState("instantType");
8474 + const state = {
8475 + open: open2,
8476 + side,
8477 + align,
8478 + uncentered: arrowUncentered,
8479 + instant: instantType
8480 + };
8481 + const element = useRenderElement("div", componentProps, {
8482 + state,
8483 + ref: [forwardedRef, arrowRef],
8484 + props: [{
8485 + style: arrowStyles,
8486 + "aria-hidden": true
8487 + }, elementProps],
8488 + stateAttributesMapping: popupStateMapping
8489 + });
8490 + return element;
8491 +});
8492 +if (true) TooltipArrow.displayName = "TooltipArrow";
8493 +
8494 +// node_modules/@base-ui/react/tooltip/provider/TooltipProvider.mjs
8495 +var React46 = __toESM(require_react(), 1);
8496 +var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
8497 +var TooltipProvider = function TooltipProvider2(props) {
8498 + const {
8499 + delay,
8500 + closeDelay,
8501 + timeout = 400
8502 + } = props;
8503 + const delayValue = React46.useMemo(() => ({
8504 + open: delay,
8505 + close: closeDelay
8506 + }), [delay, closeDelay]);
8507 + return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TooltipProviderContext.Provider, {
8508 + value: delay,
8509 + children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FloatingDelayGroup, {
8510 + delay: delayValue,
8511 + timeoutMs: timeout,
8512 + children: props.children
8513 + })
8514 + });
8515 +};
8516 +if (true) TooltipProvider.displayName = "TooltipProvider";
8517 +
8518 +// node_modules/@base-ui/react/tooltip/viewport/TooltipViewport.mjs
8519 +var React47 = __toESM(require_react(), 1);
8520 +var TooltipViewport = /* @__PURE__ */ React47.forwardRef(function TooltipViewport2(componentProps, forwardedRef) {
8521 + const {
8522 + render,
8523 + className,
8524 + style,
8525 + children,
8526 + ...elementProps
8527 + } = componentProps;
8528 + const store2 = useTooltipRootContext();
8529 + const positioner = useTooltipPositionerContext();
8530 + const instantType = store2.useState("instantType");
8531 + const {
8532 + children: childrenToRender,
8533 + state: viewportState
8534 + } = usePopupViewport({
8535 + store: store2,
8536 + side: positioner.side,
8537 + children
8538 + });
8539 + const state = {
8540 + activationDirection: viewportState.activationDirection,
8541 + transitioning: viewportState.transitioning,
8542 + instant: instantType
8543 + };
8544 + return useRenderElement("div", componentProps, {
8545 + state,
8546 + ref: forwardedRef,
8547 + props: [elementProps, {
8548 + children: childrenToRender
8549 + }],
8550 + stateAttributesMapping: popupViewportStateMapping
8551 + });
8552 +});
8553 +if (true) TooltipViewport.displayName = "TooltipViewport";
8554 +
8555 +// node_modules/@base-ui/react/tooltip/store/TooltipHandle.mjs
8556 +var TooltipHandle = class extends BasePopupHandle {
8557 + constructor() {
8558 + super(createNullTooltipStore(), "Tooltip");
8559 + }
8560 + /**
8561 + * Opens the tooltip and associates it with the trigger with the given id.
8562 + *
8563 + * This method should only be called in an event handler or an effect (not during rendering).
8564 + *
8565 + * @param triggerId ID of the trigger to associate with the tooltip. The trigger must be a matching
8566 + * `Tooltip.Trigger` with this handle passed as a prop.
8567 + */
8568 + open(triggerId) {
8569 + this.openByTrigger(triggerId);
8570 + }
8571 + /**
8572 + * Closes the tooltip.
8573 + *
8574 + * This method should only be called in an event handler or an effect (not during rendering).
8575 + */
8576 + close() {
8577 + this.closePopup();
8578 + }
8579 + /**
8580 + * Whether the tooltip is currently open. Returns `false` while no root is attached to the handle.
8581 + */
8582 + get isOpen() {
8583 + return this.attachedStore?.select("open") ?? false;
8584 + }
8585 +};
8586 +function createTooltipHandle() {
8587 + return new TooltipHandle();
8588 +}
8589 +
8590 +// node_modules/@base-ui/react/use-render/useRender.mjs
645 8591 function useRender(params) {
646 8592 return useRenderElement(params.defaultTagName ?? "div", params, params);
647 8593 }
648 8594
649 8595 // packages/ui/build-module/text/text.mjs
650 -var import_element = __toESM(require_element(), 1);
8596 +var import_element10 = __toESM(require_element(), 1);
651 8597 var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
652 8598 function getRuntime() {
653 8599 const globalScope = globalThis;
654 8600 if (globalScope.__wpStyleRuntime) {
@@ -728,16 +8674,16 @@
728 8674 injectStyle(targetDocument, hash, css);
729 8675 }
730 8676 }
731 8677 if (typeof process === "undefined" || true) {
732 - registerStyle("0c8601dd83", '@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._83ed8a8da5dd50ea__text{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-medium,499);--_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-medium,499)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_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-medium,499);--_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-medium,499);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-medium,499);--_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-medium,499);--_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-medium,499);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-regular,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-regular,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,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-regular,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-regular,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,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)}}');
8678 + 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)}}}');
733 8679 }
734 8680 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" };
735 8681 if (typeof process === "undefined" || true) {
736 - registerStyle("1fb29d3a3c", "._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);&: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,#0000);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 #0000);color:var(--_gcd-input-color,var(--wpds-color-fg-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,#0000);border-color:var(--_gcd-input-border-color-disabled,#0000);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-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 #0000)}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-fg-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));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 #0000);transition:var(--_gcd-a-transition,none)}");
8682 + 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)}");
737 8683 }
738 -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" };
739 -var Text = (0, import_element.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) {
8684 +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" };
8685 +var Text = (0, import_element10.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) {
740 8686 const element = useRender({
741 8687 render,
742 8688 defaultTagName: "span",
743 8689 ref,
@@ -753,75 +8699,810 @@
753 8699 });
754 8700 return element;
755 8701 });
756 8702
757 -// packages/icons/build-module/icon/index.mjs
758 -var import_element2 = __toESM(require_element(), 1);
759 -var icon_default = (0, import_element2.forwardRef)(
760 - ({ icon, size = 24, ...props }, ref) => {
761 - return (0, import_element2.cloneElement)(icon, {
762 - width: size,
763 - height: size,
8703 +// packages/ui/build-module/tooltip/index.mjs
8704 +var tooltip_exports = {};
8705 +__export(tooltip_exports, {
8706 + Popup: () => Popup,
8707 + Portal: () => Portal,
8708 + Positioner: () => Positioner,
8709 + Provider: () => Provider,
8710 + Root: () => Root,
8711 + Trigger: () => Trigger
8712 +});
8713 +
8714 +// packages/ui/build-module/tooltip/popup.mjs
8715 +var import_element14 = __toESM(require_element(), 1);
8716 +
8717 +// packages/ui/build-module/tooltip/portal.mjs
8718 +var import_element11 = __toESM(require_element(), 1);
8719 +
8720 +// packages/ui/build-module/utils/wp-compat-overlay-slot.mjs
8721 +var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
8722 +function getRuntime2() {
8723 + const globalScope = globalThis;
8724 + if (globalScope.__wpStyleRuntime) {
8725 + return globalScope.__wpStyleRuntime;
8726 + }
8727 + globalScope.__wpStyleRuntime = {
8728 + documents: /* @__PURE__ */ new Map(),
8729 + styles: /* @__PURE__ */ new Map(),
8730 + injectedStyles: /* @__PURE__ */ new WeakMap()
8731 + };
8732 + if (typeof document !== "undefined") {
8733 + registerDocument2(document);
8734 + }
8735 + return globalScope.__wpStyleRuntime;
8736 +}
8737 +function documentContainsStyleHash2(targetDocument, hash) {
8738 + if (!targetDocument.head) {
8739 + return false;
8740 + }
8741 + for (const style of targetDocument.head.querySelectorAll(
8742 + `style[${STYLE_HASH_ATTRIBUTE2}]`
8743 + )) {
8744 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) {
8745 + return true;
8746 + }
8747 + }
8748 + return false;
8749 +}
8750 +function injectStyle2(targetDocument, hash, css) {
8751 + if (!targetDocument.head) {
8752 + return;
8753 + }
8754 + const runtime = getRuntime2();
8755 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
8756 + if (!injectedStyles) {
8757 + injectedStyles = /* @__PURE__ */ new Set();
8758 + runtime.injectedStyles.set(targetDocument, injectedStyles);
8759 + }
8760 + if (injectedStyles.has(hash)) {
8761 + return;
8762 + }
8763 + if (documentContainsStyleHash2(targetDocument, hash)) {
8764 + injectedStyles.add(hash);
8765 + return;
8766 + }
8767 + const style = targetDocument.createElement("style");
8768 + style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash);
8769 + style.appendChild(targetDocument.createTextNode(css));
8770 + targetDocument.head.appendChild(style);
8771 + injectedStyles.add(hash);
8772 +}
8773 +function registerDocument2(targetDocument) {
8774 + const runtime = getRuntime2();
8775 + runtime.documents.set(
8776 + targetDocument,
8777 + (runtime.documents.get(targetDocument) ?? 0) + 1
8778 + );
8779 + for (const [hash, css] of runtime.styles) {
8780 + injectStyle2(targetDocument, hash, css);
8781 + }
8782 + return () => {
8783 + const count = runtime.documents.get(targetDocument);
8784 + if (count === void 0) {
8785 + return;
8786 + }
8787 + if (count <= 1) {
8788 + runtime.documents.delete(targetDocument);
8789 + return;
8790 + }
8791 + runtime.documents.set(targetDocument, count - 1);
8792 + };
8793 +}
8794 +function registerStyle2(hash, css) {
8795 + const runtime = getRuntime2();
8796 + runtime.styles.set(hash, css);
8797 + for (const targetDocument of runtime.documents.keys()) {
8798 + injectStyle2(targetDocument, hash, css);
8799 + }
8800 +}
8801 +if (typeof process === "undefined" || true) {
8802 + registerStyle2("be37f31c1e", "._11fc52b637ff8a7e__slot{inset:0;isolation:isolate;pointer-events:none;position:fixed;z-index:1000000003}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._11fc52b637ff8a7e__slot>*{pointer-events:auto}}}");
8803 +}
8804 +var wp_compat_overlay_slot_default = { "slot": "_11fc52b637ff8a7e__slot" };
8805 +var WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE = "data-wp-compat-overlay-slot";
8806 +function resolveOwnerDocument() {
8807 + return typeof document === "undefined" ? null : document;
8808 +}
8809 +function isInWordPressEnvironment() {
8810 + let topWp;
8811 + try {
8812 + topWp = window.top?.wp;
8813 + } catch {
8814 + }
8815 + const wp = topWp ?? window.wp;
8816 + return typeof wp?.components === "object" && wp.components !== null;
8817 +}
8818 +var cachedSlot = null;
8819 +function ensureSlotIsAccessible(element) {
8820 + element.setAttribute("aria-hidden", "false");
8821 + return element;
8822 +}
8823 +function createSlot(ownerDocument2) {
8824 + const element = ownerDocument2.createElement("div");
8825 + element.setAttribute(WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE, "");
8826 + if (wp_compat_overlay_slot_default.slot) {
8827 + element.classList.add(wp_compat_overlay_slot_default.slot);
8828 + }
8829 + ownerDocument2.body.appendChild(element);
8830 + return element;
8831 +}
8832 +function getWpCompatOverlaySlot() {
8833 + if (typeof window === "undefined") {
8834 + return void 0;
8835 + }
8836 + if (!isInWordPressEnvironment() && window.__wpUiCompatOverlaySlotEnabled !== true) {
8837 + return void 0;
8838 + }
8839 + const ownerDocument2 = resolveOwnerDocument();
8840 + if (!ownerDocument2 || !ownerDocument2.body) {
8841 + return void 0;
8842 + }
8843 + if (cachedSlot && cachedSlot.ownerDocument === ownerDocument2 && cachedSlot.isConnected) {
8844 + return ensureSlotIsAccessible(cachedSlot);
8845 + }
8846 + const existing = ownerDocument2.querySelector(
8847 + `[${WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE}]`
8848 + );
8849 + if (existing instanceof HTMLDivElement) {
8850 + cachedSlot = ensureSlotIsAccessible(existing);
8851 + return cachedSlot;
8852 + }
8853 + if (cachedSlot?.isConnected) {
8854 + cachedSlot.remove();
8855 + }
8856 + cachedSlot = ensureSlotIsAccessible(createSlot(ownerDocument2));
8857 + return cachedSlot;
8858 +}
8859 +
8860 +// packages/ui/build-module/tooltip/portal.mjs
8861 +var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
8862 +var Portal = (0, import_element11.forwardRef)(
8863 + function TooltipPortal3({ container, ...restProps }, ref) {
8864 + return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8865 + index_parts_exports.Portal,
8866 + {
8867 + container: container ?? getWpCompatOverlaySlot(),
8868 + ...restProps,
8869 + ref
8870 + }
8871 + );
8872 + }
8873 +);
8874 +
8875 +// packages/ui/build-module/tooltip/positioner.mjs
8876 +var import_element12 = __toESM(require_element(), 1);
8877 +var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
8878 +var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
8879 +function getRuntime3() {
8880 + const globalScope = globalThis;
8881 + if (globalScope.__wpStyleRuntime) {
8882 + return globalScope.__wpStyleRuntime;
8883 + }
8884 + globalScope.__wpStyleRuntime = {
8885 + documents: /* @__PURE__ */ new Map(),
8886 + styles: /* @__PURE__ */ new Map(),
8887 + injectedStyles: /* @__PURE__ */ new WeakMap()
8888 + };
8889 + if (typeof document !== "undefined") {
8890 + registerDocument3(document);
8891 + }
8892 + return globalScope.__wpStyleRuntime;
8893 +}
8894 +function documentContainsStyleHash3(targetDocument, hash) {
8895 + if (!targetDocument.head) {
8896 + return false;
8897 + }
8898 + for (const style of targetDocument.head.querySelectorAll(
8899 + `style[${STYLE_HASH_ATTRIBUTE3}]`
8900 + )) {
8901 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) {
8902 + return true;
8903 + }
8904 + }
8905 + return false;
8906 +}
8907 +function injectStyle3(targetDocument, hash, css) {
8908 + if (!targetDocument.head) {
8909 + return;
8910 + }
8911 + const runtime = getRuntime3();
8912 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
8913 + if (!injectedStyles) {
8914 + injectedStyles = /* @__PURE__ */ new Set();
8915 + runtime.injectedStyles.set(targetDocument, injectedStyles);
8916 + }
8917 + if (injectedStyles.has(hash)) {
8918 + return;
8919 + }
8920 + if (documentContainsStyleHash3(targetDocument, hash)) {
8921 + injectedStyles.add(hash);
8922 + return;
8923 + }
8924 + const style = targetDocument.createElement("style");
8925 + style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash);
8926 + style.appendChild(targetDocument.createTextNode(css));
8927 + targetDocument.head.appendChild(style);
8928 + injectedStyles.add(hash);
8929 +}
8930 +function registerDocument3(targetDocument) {
8931 + const runtime = getRuntime3();
8932 + runtime.documents.set(
8933 + targetDocument,
8934 + (runtime.documents.get(targetDocument) ?? 0) + 1
8935 + );
8936 + for (const [hash, css] of runtime.styles) {
8937 + injectStyle3(targetDocument, hash, css);
8938 + }
8939 + return () => {
8940 + const count = runtime.documents.get(targetDocument);
8941 + if (count === void 0) {
8942 + return;
8943 + }
8944 + if (count <= 1) {
8945 + runtime.documents.delete(targetDocument);
8946 + return;
8947 + }
8948 + runtime.documents.set(targetDocument, count - 1);
8949 + };
8950 +}
8951 +function registerStyle3(hash, css) {
8952 + const runtime = getRuntime3();
8953 + runtime.styles.set(hash, css);
8954 + for (const targetDocument of runtime.documents.keys()) {
8955 + injectStyle3(targetDocument, hash, css);
8956 + }
8957 +}
8958 +if (typeof process === "undefined" || true) {
8959 + registerStyle3("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
8960 +}
8961 +var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
8962 +if (typeof process === "undefined" || true) {
8963 + registerStyle3("19fcc06039", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');
8964 +}
8965 +var style_default2 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
8966 +var Positioner = (0, import_element12.forwardRef)(
8967 + function TooltipPositioner3({ align = "center", className, side = "top", sideOffset = 4, ...props }, ref) {
8968 + return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
8969 + index_parts_exports.Positioner,
8970 + {
8971 + ref,
8972 + align,
8973 + side,
8974 + sideOffset,
8975 + ...props,
8976 + className: clsx_default(
8977 + resets_default["box-sizing"],
8978 + style_default2.positioner,
8979 + className
8980 + )
8981 + }
8982 + );
8983 + }
8984 +);
8985 +
8986 +// packages/ui/build-module/utils/render-slot-with-children.mjs
8987 +var import_element13 = __toESM(require_element(), 1);
8988 +function renderSlotWithChildren(slot, defaultSlot, children) {
8989 + return (0, import_element13.cloneElement)(slot ?? defaultSlot, { children });
8990 +}
8991 +
8992 +// packages/ui/build-module/utils/theme-provider.mjs
8993 +var theme = __toESM(require_theme(), 1);
8994 +
8995 +// packages/ui/build-module/lock-unlock.mjs
8996 +var import_private_apis = __toESM(require_private_apis(), 1);
8997 +var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
8998 + "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
8999 + "@wordpress/ui"
9000 +);
9001 +
9002 +// packages/ui/build-module/utils/theme-provider.mjs
9003 +function getThemeProvider() {
9004 + const themePackage = theme;
9005 + if (themePackage.ThemeProvider) {
9006 + return themePackage.ThemeProvider;
9007 + }
9008 + if (!themePackage.privateApis) {
9009 + throw new Error(
9010 + "@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`."
9011 + );
9012 + }
9013 + return unlock(
9014 + themePackage.privateApis
9015 + ).ThemeProvider;
9016 +}
9017 +var ThemeProvider = getThemeProvider();
9018 +
9019 +// packages/ui/build-module/tooltip/popup.mjs
9020 +var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
9021 +var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
9022 +function getRuntime4() {
9023 + const globalScope = globalThis;
9024 + if (globalScope.__wpStyleRuntime) {
9025 + return globalScope.__wpStyleRuntime;
9026 + }
9027 + globalScope.__wpStyleRuntime = {
9028 + documents: /* @__PURE__ */ new Map(),
9029 + styles: /* @__PURE__ */ new Map(),
9030 + injectedStyles: /* @__PURE__ */ new WeakMap()
9031 + };
9032 + if (typeof document !== "undefined") {
9033 + registerDocument4(document);
9034 + }
9035 + return globalScope.__wpStyleRuntime;
9036 +}
9037 +function documentContainsStyleHash4(targetDocument, hash) {
9038 + if (!targetDocument.head) {
9039 + return false;
9040 + }
9041 + for (const style of targetDocument.head.querySelectorAll(
9042 + `style[${STYLE_HASH_ATTRIBUTE4}]`
9043 + )) {
9044 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
9045 + return true;
9046 + }
9047 + }
9048 + return false;
9049 +}
9050 +function injectStyle4(targetDocument, hash, css) {
9051 + if (!targetDocument.head) {
9052 + return;
9053 + }
9054 + const runtime = getRuntime4();
9055 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
9056 + if (!injectedStyles) {
9057 + injectedStyles = /* @__PURE__ */ new Set();
9058 + runtime.injectedStyles.set(targetDocument, injectedStyles);
9059 + }
9060 + if (injectedStyles.has(hash)) {
9061 + return;
9062 + }
9063 + if (documentContainsStyleHash4(targetDocument, hash)) {
9064 + injectedStyles.add(hash);
9065 + return;
9066 + }
9067 + const style = targetDocument.createElement("style");
9068 + style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
9069 + style.appendChild(targetDocument.createTextNode(css));
9070 + targetDocument.head.appendChild(style);
9071 + injectedStyles.add(hash);
9072 +}
9073 +function registerDocument4(targetDocument) {
9074 + const runtime = getRuntime4();
9075 + runtime.documents.set(
9076 + targetDocument,
9077 + (runtime.documents.get(targetDocument) ?? 0) + 1
9078 + );
9079 + for (const [hash, css] of runtime.styles) {
9080 + injectStyle4(targetDocument, hash, css);
9081 + }
9082 + return () => {
9083 + const count = runtime.documents.get(targetDocument);
9084 + if (count === void 0) {
9085 + return;
9086 + }
9087 + if (count <= 1) {
9088 + runtime.documents.delete(targetDocument);
9089 + return;
9090 + }
9091 + runtime.documents.set(targetDocument, count - 1);
9092 + };
9093 +}
9094 +function registerStyle4(hash, css) {
9095 + const runtime = getRuntime4();
9096 + runtime.styles.set(hash, css);
9097 + for (const targetDocument of runtime.documents.keys()) {
9098 + injectStyle4(targetDocument, hash, css);
9099 + }
9100 +}
9101 +if (typeof process === "undefined" || true) {
9102 + 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}}}}');
9103 +}
9104 +var style_default3 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
9105 +var POPUP_COLOR = { background: "#1e1e1e" };
9106 +var Popup = (0, import_element14.forwardRef)(function TooltipPopup3({ portal, positioner, children, className, ...props }, ref) {
9107 + const popupContent = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ThemeProvider, { color: POPUP_COLOR, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
9108 + index_parts_exports.Popup,
9109 + {
9110 + ref,
9111 + className: clsx_default(style_default3.popup, className),
764 9112 ...props,
765 - ref
766 - });
9113 + children
9114 + }
9115 + ) });
9116 + const positionedPopup = renderSlotWithChildren(
9117 + positioner,
9118 + /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Positioner, {}),
9119 + popupContent
9120 + );
9121 + return renderSlotWithChildren(portal, /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Portal, {}), positionedPopup);
9122 +});
9123 +
9124 +// packages/ui/build-module/tooltip/trigger.mjs
9125 +var import_element15 = __toESM(require_element(), 1);
9126 +var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
9127 +var Trigger = (0, import_element15.forwardRef)(
9128 + function TooltipTrigger3(props, ref) {
9129 + return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(index_parts_exports.Trigger, { ref, ...props });
767 9130 }
768 9131 );
769 9132
770 -// packages/icons/build-module/library/arrow-up-left.mjs
9133 +// packages/ui/build-module/utils/direction-provider.mjs
9134 +var import_i18n = __toESM(require_i18n(), 1);
9135 +var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
9136 +function DirectionProvider3({ children }) {
9137 + return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DirectionProvider, { direction: (0, import_i18n.isRTL)() ? "rtl" : "ltr", children });
9138 +}
9139 +
9140 +// packages/ui/build-module/tooltip/root.mjs
9141 +var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
9142 +function Root(props) {
9143 + return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DirectionProvider3, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(index_parts_exports.Root, { ...props }) });
9144 +}
9145 +
9146 +// packages/ui/build-module/tooltip/provider.mjs
9147 +var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
9148 +function Provider({ ...props }) {
9149 + return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(index_parts_exports.Provider, { ...props });
9150 +}
9151 +
9152 +// packages/ui/build-module/link/link.mjs
9153 +var import_element16 = __toESM(require_element(), 1);
9154 +var import_i18n2 = __toESM(require_i18n(), 1);
9155 +var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
9156 +var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash";
9157 +function getRuntime5() {
9158 + const globalScope = globalThis;
9159 + if (globalScope.__wpStyleRuntime) {
9160 + return globalScope.__wpStyleRuntime;
9161 + }
9162 + globalScope.__wpStyleRuntime = {
9163 + documents: /* @__PURE__ */ new Map(),
9164 + styles: /* @__PURE__ */ new Map(),
9165 + injectedStyles: /* @__PURE__ */ new WeakMap()
9166 + };
9167 + if (typeof document !== "undefined") {
9168 + registerDocument5(document);
9169 + }
9170 + return globalScope.__wpStyleRuntime;
9171 +}
9172 +function documentContainsStyleHash5(targetDocument, hash) {
9173 + if (!targetDocument.head) {
9174 + return false;
9175 + }
9176 + for (const style of targetDocument.head.querySelectorAll(
9177 + `style[${STYLE_HASH_ATTRIBUTE5}]`
9178 + )) {
9179 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) {
9180 + return true;
9181 + }
9182 + }
9183 + return false;
9184 +}
9185 +function injectStyle5(targetDocument, hash, css) {
9186 + if (!targetDocument.head) {
9187 + return;
9188 + }
9189 + const runtime = getRuntime5();
9190 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
9191 + if (!injectedStyles) {
9192 + injectedStyles = /* @__PURE__ */ new Set();
9193 + runtime.injectedStyles.set(targetDocument, injectedStyles);
9194 + }
9195 + if (injectedStyles.has(hash)) {
9196 + return;
9197 + }
9198 + if (documentContainsStyleHash5(targetDocument, hash)) {
9199 + injectedStyles.add(hash);
9200 + return;
9201 + }
9202 + const style = targetDocument.createElement("style");
9203 + style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash);
9204 + style.appendChild(targetDocument.createTextNode(css));
9205 + targetDocument.head.appendChild(style);
9206 + injectedStyles.add(hash);
9207 +}
9208 +function registerDocument5(targetDocument) {
9209 + const runtime = getRuntime5();
9210 + runtime.documents.set(
9211 + targetDocument,
9212 + (runtime.documents.get(targetDocument) ?? 0) + 1
9213 + );
9214 + for (const [hash, css] of runtime.styles) {
9215 + injectStyle5(targetDocument, hash, css);
9216 + }
9217 + return () => {
9218 + const count = runtime.documents.get(targetDocument);
9219 + if (count === void 0) {
9220 + return;
9221 + }
9222 + if (count <= 1) {
9223 + runtime.documents.delete(targetDocument);
9224 + return;
9225 + }
9226 + runtime.documents.set(targetDocument, count - 1);
9227 + };
9228 +}
9229 +function registerStyle5(hash, css) {
9230 + const runtime = getRuntime5();
9231 + runtime.styles.set(hash, css);
9232 + for (const targetDocument of runtime.documents.keys()) {
9233 + injectStyle5(targetDocument, hash, css);
9234 + }
9235 +}
9236 +if (typeof process === "undefined" || true) {
9237 + registerStyle5("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
9238 +}
9239 +var resets_default2 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
9240 +if (typeof process === "undefined" || true) {
9241 + registerStyle5("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
9242 +}
9243 +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" };
9244 +if (typeof process === "undefined" || true) {
9245 + registerStyle5("e8e6a9be37", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{text-decoration-thickness:from-font;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}}');
9246 +}
9247 +var style_default4 = { "link": "d4250949359b05ce__link", "is-brand": "c6055659b8e2cd2c__is-brand", "is-neutral": "_92e0dfcaeee15b88__is-neutral", "is-unstyled": "cf122a9bf1035d42__is-unstyled", "link-icon": "_0cb411afac4c86c7__link-icon" };
9248 +if (typeof process === "undefined" || true) {
9249 + registerStyle5("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
9250 +}
9251 +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" };
9252 +var Link = (0, import_element16.forwardRef)(function Link2({
9253 + children,
9254 + variant = "default",
9255 + tone = "brand",
9256 + openInNewTab = false,
9257 + target,
9258 + render,
9259 + className,
9260 + ...props
9261 +}, ref) {
9262 + const shouldShowNewTabIndicator = openInNewTab || /^_blank$/i.test(target ?? "");
9263 + const element = useRender({
9264 + render,
9265 + defaultTagName: "a",
9266 + ref,
9267 + props: mergeProps(props, {
9268 + className: clsx_default(
9269 + global_css_defense_default2.a,
9270 + resets_default2["box-sizing"],
9271 + focus_module_default["outset-ring--focus-except-active"],
9272 + variant !== "unstyled" && style_default4.link,
9273 + variant !== "unstyled" && style_default4[`is-${tone}`],
9274 + variant === "unstyled" && style_default4["is-unstyled"],
9275 + className
9276 + ),
9277 + target: target ?? (openInNewTab ? "_blank" : void 0),
9278 + children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
9279 + children,
9280 + shouldShowNewTabIndicator && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9281 + "span",
9282 + {
9283 + className: style_default4["link-icon"],
9284 + role: "img",
9285 + "aria-label": (
9286 + /* translators: accessibility text appended to link text */
9287 + (0, import_i18n2.__)("(opens in a new tab)")
9288 + )
9289 + }
9290 + )
9291 + ] })
9292 + })
9293 + });
9294 + return element;
9295 +});
9296 +
9297 +// packages/icons/build-module/library/caution.mjs
771 9298 var import_primitives = __toESM(require_primitives(), 1);
772 -var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
773 -var arrow_up_left_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z" }) });
9299 +var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
9300 +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" }) });
774 9301
775 9302 // packages/icons/build-module/library/check.mjs
776 9303 var import_primitives2 = __toESM(require_primitives(), 1);
777 -var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
778 -var check_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z" }) });
9304 +var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
9305 +var check_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 12L10 15L17 8", vectorEffect: "non-scaling-stroke" }) });
779 9306
780 9307 // packages/icons/build-module/library/chevron-down-small.mjs
781 9308 var import_primitives3 = __toESM(require_primitives(), 1);
782 -var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
783 -var chevron_down_small_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { d: "m15.99 10.889-3.988 3.418-3.988-3.418.976-1.14 3.012 2.582 3.012-2.581.976 1.139Z" }) });
9309 +var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
9310 +var chevron_down_small_default = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives3.Path, { d: "M8.5 10.5L12 13.5L15.5 10.5", vectorEffect: "non-scaling-stroke" }) });
784 9311
785 9312 // packages/icons/build-module/library/chevron-left-small.mjs
786 9313 var import_primitives4 = __toESM(require_primitives(), 1);
787 -var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
788 -var chevron_left_small_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { d: "m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z" }) });
9314 +var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
9315 +var chevron_left_small_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: "M13.5 8.5L10.5 12L13.5 15.5", vectorEffect: "non-scaling-stroke" }) });
789 9316
790 9317 // packages/icons/build-module/library/chevron-left.mjs
791 9318 var import_primitives5 = __toESM(require_primitives(), 1);
792 -var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
793 -var chevron_left_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" }) });
9319 +var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
9320 +var chevron_left_default = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives5.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_runtime24.jsx)(import_primitives5.Path, { d: "M14 6.5L9 12L14 17.5", vectorEffect: "non-scaling-stroke" }) });
794 9321
795 9322 // packages/icons/build-module/library/chevron-right-small.mjs
796 9323 var import_primitives6 = __toESM(require_primitives(), 1);
797 -var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
798 -var chevron_right_small_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.Path, { d: "M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z" }) });
9324 +var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
9325 +var chevron_right_small_default = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_primitives6.Path, { d: "M10.5 8.5L13.5 12L10.5 15.5", vectorEffect: "non-scaling-stroke" }) });
799 9326
800 9327 // packages/icons/build-module/library/chevron-right.mjs
801 9328 var import_primitives7 = __toESM(require_primitives(), 1);
802 -var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
803 -var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.Path, { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" }) });
9329 +var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
9330 +var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_primitives7.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_runtime26.jsx)(import_primitives7.Path, { d: "M10 6.5L15 12L10 17.5", vectorEffect: "non-scaling-stroke" }) });
804 9331
805 9332 // packages/icons/build-module/library/menu.mjs
806 9333 var import_primitives8 = __toESM(require_primitives(), 1);
807 -var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
808 -var menu_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.Path, { d: "M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z" }) });
9334 +var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
9335 +var menu_default = /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_primitives8.Path, { d: "M5 12H19M5 18.25H19M5 5.75H19", vectorEffect: "non-scaling-stroke" }) });
809 9336
810 -// packages/icons/build-module/library/search.mjs
9337 +// packages/ui/build-module/icon/icon.mjs
9338 +var import_element17 = __toESM(require_element(), 1);
811 9339 var import_primitives9 = __toESM(require_primitives(), 1);
812 -var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
813 -var search_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.Path, { d: "M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z" }) });
9340 +var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
9341 +var Icon = (0, import_element17.forwardRef)(function Icon2({ icon, size: size4 = 24, style, ...restProps }, ref) {
9342 + const mergedStyle = icon.props.style || style ? { ...icon.props.style, ...style } : void 0;
9343 + return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
9344 + import_primitives9.SVG,
9345 + {
9346 + ref,
9347 + ...icon.props,
9348 + ...restProps,
9349 + ...mergedStyle ? { style: mergedStyle } : {},
9350 + width: size4,
9351 + height: size4
9352 + }
9353 + );
9354 +});
814 9355
815 -// packages/icons/build-module/library/wordpress.mjs
816 -var import_primitives10 = __toESM(require_primitives(), 1);
817 -var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
818 -var wordpress_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.Path, { d: "M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z" }) });
9356 +// packages/ui/build-module/utils/keyboard-shortcut.mjs
9357 +var import_element19 = __toESM(require_element(), 1);
9358 +var import_i18n3 = __toESM(require_i18n(), 1);
819 9359
9360 +// packages/ui/build-module/visually-hidden/visually-hidden.mjs
9361 +var import_element18 = __toESM(require_element(), 1);
9362 +var STYLE_HASH_ATTRIBUTE6 = "data-wp-hash";
9363 +function getRuntime6() {
9364 + const globalScope = globalThis;
9365 + if (globalScope.__wpStyleRuntime) {
9366 + return globalScope.__wpStyleRuntime;
9367 + }
9368 + globalScope.__wpStyleRuntime = {
9369 + documents: /* @__PURE__ */ new Map(),
9370 + styles: /* @__PURE__ */ new Map(),
9371 + injectedStyles: /* @__PURE__ */ new WeakMap()
9372 + };
9373 + if (typeof document !== "undefined") {
9374 + registerDocument6(document);
9375 + }
9376 + return globalScope.__wpStyleRuntime;
9377 +}
9378 +function documentContainsStyleHash6(targetDocument, hash) {
9379 + if (!targetDocument.head) {
9380 + return false;
9381 + }
9382 + for (const style of targetDocument.head.querySelectorAll(
9383 + `style[${STYLE_HASH_ATTRIBUTE6}]`
9384 + )) {
9385 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE6) === hash) {
9386 + return true;
9387 + }
9388 + }
9389 + return false;
9390 +}
9391 +function injectStyle6(targetDocument, hash, css) {
9392 + if (!targetDocument.head) {
9393 + return;
9394 + }
9395 + const runtime = getRuntime6();
9396 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
9397 + if (!injectedStyles) {
9398 + injectedStyles = /* @__PURE__ */ new Set();
9399 + runtime.injectedStyles.set(targetDocument, injectedStyles);
9400 + }
9401 + if (injectedStyles.has(hash)) {
9402 + return;
9403 + }
9404 + if (documentContainsStyleHash6(targetDocument, hash)) {
9405 + injectedStyles.add(hash);
9406 + return;
9407 + }
9408 + const style = targetDocument.createElement("style");
9409 + style.setAttribute(STYLE_HASH_ATTRIBUTE6, hash);
9410 + style.appendChild(targetDocument.createTextNode(css));
9411 + targetDocument.head.appendChild(style);
9412 + injectedStyles.add(hash);
9413 +}
9414 +function registerDocument6(targetDocument) {
9415 + const runtime = getRuntime6();
9416 + runtime.documents.set(
9417 + targetDocument,
9418 + (runtime.documents.get(targetDocument) ?? 0) + 1
9419 + );
9420 + for (const [hash, css] of runtime.styles) {
9421 + injectStyle6(targetDocument, hash, css);
9422 + }
9423 + return () => {
9424 + const count = runtime.documents.get(targetDocument);
9425 + if (count === void 0) {
9426 + return;
9427 + }
9428 + if (count <= 1) {
9429 + runtime.documents.delete(targetDocument);
9430 + return;
9431 + }
9432 + runtime.documents.set(targetDocument, count - 1);
9433 + };
9434 +}
9435 +function registerStyle6(hash, css) {
9436 + const runtime = getRuntime6();
9437 + runtime.styles.set(hash, css);
9438 + for (const targetDocument of runtime.documents.keys()) {
9439 + injectStyle6(targetDocument, hash, css);
9440 + }
9441 +}
9442 +if (typeof process === "undefined" || true) {
9443 + registerStyle6("f4df7461e9", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.f37b9e2e191ebd66__visually-hidden{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal;padding:0;position:absolute;width:1px;word-break:normal}}}");
9444 +}
9445 +var style_default5 = { "visually-hidden": "f37b9e2e191ebd66__visually-hidden" };
9446 +var VisuallyHidden = (0, import_element18.forwardRef)(
9447 + function VisuallyHidden2({ render, ...restProps }, ref) {
9448 + const element = useRender({
9449 + render,
9450 + ref,
9451 + props: mergeProps(
9452 + { className: style_default5["visually-hidden"] },
9453 + restProps,
9454 + {
9455 + // @ts-expect-error Arbitrary data-* attributes aren't indexable on the typed div props. Kept hardcoded so consumers can't change or remove it.
9456 + "data-visually-hidden": ""
9457 + }
9458 + )
9459 + });
9460 + return element;
9461 + }
9462 +);
9463 +
9464 +// packages/ui/build-module/utils/keyboard-shortcut.mjs
9465 +var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
9466 +function useKeyboardShortcutProps({
9467 + "aria-describedby": ariaDescribedBy,
9468 + "aria-keyshortcuts": ariaKeyShortcuts,
9469 + shortcut
9470 +}) {
9471 + const generatedDescriptionId = (0, import_element19.useId)();
9472 + const descriptionId = shortcut ? generatedDescriptionId : void 0;
9473 + const describedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ");
9474 + return {
9475 + descriptionId,
9476 + targetProps: {
9477 + "aria-describedby": describedBy || void 0,
9478 + "aria-keyshortcuts": shortcut?.ariaKeyShortcut ?? ariaKeyShortcuts
9479 + }
9480 + };
9481 +}
9482 +var KeyboardShortcutDescription = (0, import_element19.forwardRef)(function KeyboardShortcutDescription2({ descriptionId, shortcut }, ref) {
9483 + return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
9484 + VisuallyHidden,
9485 + {
9486 + id: descriptionId,
9487 + "aria-hidden": "true",
9488 + render: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { ref }),
9489 + children: (0, import_i18n3.sprintf)(
9490 + /* translators: %s: keyboard shortcut. */
9491 + (0, import_i18n3.__)("Keyboard shortcut: %s"),
9492 + shortcut.label ?? shortcut.ariaKeyShortcut
9493 + )
9494 + }
9495 + );
9496 +});
9497 +var KeyboardShortcutDisplay = (0, import_element19.forwardRef)(function KeyboardShortcutDisplay2({ className, shortcut }, ref) {
9498 + return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { ref, "aria-hidden": "true", className, dir: "ltr", children: shortcut.displayShortcut });
9499 +});
9500 +
820 9501 // packages/ui/build-module/stack/stack.mjs
821 -var import_element3 = __toESM(require_element(), 1);
822 -var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
823 -function getRuntime2() {
9502 +var import_element20 = __toESM(require_element(), 1);
9503 +var STYLE_HASH_ATTRIBUTE7 = "data-wp-hash";
9504 +function getRuntime7() {
824 9505 const globalScope = globalThis;
825 9506 if (globalScope.__wpStyleRuntime) {
826 9507 return globalScope.__wpStyleRuntime;
827 9508 }
@@ -830,30 +9511,30 @@
830 9511 styles: /* @__PURE__ */ new Map(),
831 9512 injectedStyles: /* @__PURE__ */ new WeakMap()
832 9513 };
833 9514 if (typeof document !== "undefined") {
834 - registerDocument2(document);
9515 + registerDocument7(document);
835 9516 }
836 9517 return globalScope.__wpStyleRuntime;
837 9518 }
838 -function documentContainsStyleHash2(targetDocument, hash) {
9519 +function documentContainsStyleHash7(targetDocument, hash) {
839 9520 if (!targetDocument.head) {
840 9521 return false;
841 9522 }
842 9523 for (const style of targetDocument.head.querySelectorAll(
843 - `style[${STYLE_HASH_ATTRIBUTE2}]`
9524 + `style[${STYLE_HASH_ATTRIBUTE7}]`
844 9525 )) {
845 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) {
9526 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE7) === hash) {
846 9527 return true;
847 9528 }
848 9529 }
849 9530 return false;
850 9531 }
851 -function injectStyle2(targetDocument, hash, css) {
9532 +function injectStyle7(targetDocument, hash, css) {
852 9533 if (!targetDocument.head) {
853 9534 return;
854 9535 }
855 - const runtime = getRuntime2();
9536 + const runtime = getRuntime7();
856 9537 let injectedStyles = runtime.injectedStyles.get(targetDocument);
857 9538 if (!injectedStyles) {
858 9539 injectedStyles = /* @__PURE__ */ new Set();
859 9540 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -860,26 +9541,26 @@
860 9541 }
861 9542 if (injectedStyles.has(hash)) {
862 9543 return;
863 9544 }
864 - if (documentContainsStyleHash2(targetDocument, hash)) {
9545 + if (documentContainsStyleHash7(targetDocument, hash)) {
865 9546 injectedStyles.add(hash);
866 9547 return;
867 9548 }
868 9549 const style = targetDocument.createElement("style");
869 - style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash);
9550 + style.setAttribute(STYLE_HASH_ATTRIBUTE7, hash);
870 9551 style.appendChild(targetDocument.createTextNode(css));
871 9552 targetDocument.head.appendChild(style);
872 9553 injectedStyles.add(hash);
873 9554 }
874 -function registerDocument2(targetDocument) {
875 - const runtime = getRuntime2();
9555 +function registerDocument7(targetDocument) {
9556 + const runtime = getRuntime7();
876 9557 runtime.documents.set(
877 9558 targetDocument,
878 9559 (runtime.documents.get(targetDocument) ?? 0) + 1
879 9560 );
880 9561 for (const [hash, css] of runtime.styles) {
881 - injectStyle2(targetDocument, hash, css);
9562 + injectStyle7(targetDocument, hash, css);
882 9563 }
883 9564 return () => {
884 9565 const count = runtime.documents.get(targetDocument);
885 9566 if (count === void 0) {
@@ -891,19 +9572,19 @@
891 9572 }
892 9573 runtime.documents.set(targetDocument, count - 1);
893 9574 };
894 9575 }
895 -function registerStyle2(hash, css) {
896 - const runtime = getRuntime2();
9576 +function registerStyle7(hash, css) {
9577 + const runtime = getRuntime7();
897 9578 runtime.styles.set(hash, css);
898 9579 for (const targetDocument of runtime.documents.keys()) {
899 - injectStyle2(targetDocument, hash, css);
9580 + injectStyle7(targetDocument, hash, css);
900 9581 }
901 9582 }
902 9583 if (typeof process === "undefined" || true) {
903 - registerStyle2("b51ff41489", "@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}");
9584 + registerStyle7("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
904 9585 }
905 -var style_default2 = { "stack": "_19ce0419607e1896__stack" };
9586 +var style_default6 = { "stack": "_19ce0419607e1896__stack" };
906 9587 var gapTokens = {
907 9588 xs: "var(--wpds-dimension-gap-xs, 4px)",
908 9589 sm: "var(--wpds-dimension-gap-sm, 8px)",
909 9590 md: "var(--wpds-dimension-gap-md, 12px)",
@@ -911,9 +9592,9 @@
911 9592 xl: "var(--wpds-dimension-gap-xl, 24px)",
912 9593 "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
913 9594 "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
914 9595 };
915 -var Stack = (0, import_element3.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
9596 +var Stack = (0, import_element20.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
916 9597 const style = {
917 9598 gap: gap && gapTokens[gap],
918 9599 alignItems: align,
919 9600 justifyContent: justify,
@@ -922,19 +9603,634 @@
922 9603 };
923 9604 const element = useRender({
924 9605 render,
925 9606 ref,
926 - props: mergeProps(props, { style, className: style_default2.stack })
9607 + props: mergeProps(props, { style, className: style_default6.stack })
927 9608 });
928 9609 return element;
929 9610 });
930 9611
9612 +// packages/ui/build-module/empty-state/index.mjs
9613 +var empty_state_exports = {};
9614 +__export(empty_state_exports, {
9615 + Actions: () => Actions,
9616 + Description: () => Description,
9617 + Icon: () => Icon3,
9618 + Root: () => Root2,
9619 + Title: () => Title,
9620 + Visual: () => Visual
9621 +});
9622 +
9623 +// packages/ui/build-module/empty-state/root.mjs
9624 +var import_element21 = __toESM(require_element(), 1);
9625 +var STYLE_HASH_ATTRIBUTE8 = "data-wp-hash";
9626 +function getRuntime8() {
9627 + const globalScope = globalThis;
9628 + if (globalScope.__wpStyleRuntime) {
9629 + return globalScope.__wpStyleRuntime;
9630 + }
9631 + globalScope.__wpStyleRuntime = {
9632 + documents: /* @__PURE__ */ new Map(),
9633 + styles: /* @__PURE__ */ new Map(),
9634 + injectedStyles: /* @__PURE__ */ new WeakMap()
9635 + };
9636 + if (typeof document !== "undefined") {
9637 + registerDocument8(document);
9638 + }
9639 + return globalScope.__wpStyleRuntime;
9640 +}
9641 +function documentContainsStyleHash8(targetDocument, hash) {
9642 + if (!targetDocument.head) {
9643 + return false;
9644 + }
9645 + for (const style of targetDocument.head.querySelectorAll(
9646 + `style[${STYLE_HASH_ATTRIBUTE8}]`
9647 + )) {
9648 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE8) === hash) {
9649 + return true;
9650 + }
9651 + }
9652 + return false;
9653 +}
9654 +function injectStyle8(targetDocument, hash, css) {
9655 + if (!targetDocument.head) {
9656 + return;
9657 + }
9658 + const runtime = getRuntime8();
9659 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
9660 + if (!injectedStyles) {
9661 + injectedStyles = /* @__PURE__ */ new Set();
9662 + runtime.injectedStyles.set(targetDocument, injectedStyles);
9663 + }
9664 + if (injectedStyles.has(hash)) {
9665 + return;
9666 + }
9667 + if (documentContainsStyleHash8(targetDocument, hash)) {
9668 + injectedStyles.add(hash);
9669 + return;
9670 + }
9671 + const style = targetDocument.createElement("style");
9672 + style.setAttribute(STYLE_HASH_ATTRIBUTE8, hash);
9673 + style.appendChild(targetDocument.createTextNode(css));
9674 + targetDocument.head.appendChild(style);
9675 + injectedStyles.add(hash);
9676 +}
9677 +function registerDocument8(targetDocument) {
9678 + const runtime = getRuntime8();
9679 + runtime.documents.set(
9680 + targetDocument,
9681 + (runtime.documents.get(targetDocument) ?? 0) + 1
9682 + );
9683 + for (const [hash, css] of runtime.styles) {
9684 + injectStyle8(targetDocument, hash, css);
9685 + }
9686 + return () => {
9687 + const count = runtime.documents.get(targetDocument);
9688 + if (count === void 0) {
9689 + return;
9690 + }
9691 + if (count <= 1) {
9692 + runtime.documents.delete(targetDocument);
9693 + return;
9694 + }
9695 + runtime.documents.set(targetDocument, count - 1);
9696 + };
9697 +}
9698 +function registerStyle8(hash, css) {
9699 + const runtime = getRuntime8();
9700 + runtime.styles.set(hash, css);
9701 + for (const targetDocument of runtime.documents.keys()) {
9702 + injectStyle8(targetDocument, hash, css);
9703 + }
9704 +}
9705 +if (typeof process === "undefined" || true) {
9706 + registerStyle8("d29c51197e", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.a23e08e65c8e62e5__root{text-wrap:balance;align-items:center;color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);gap:var(--wpds-dimension-gap-xs,4px);max-width:var(--wpds-dimension-surface-width-sm,320px);text-align:center}._01303b3680eaa216__visual{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;justify-content:center;line-height:1;margin-block-end:var(--wpds-dimension-gap-xs,4px)}._58c8e351db225608__icon{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:50%;padding:var(--wpds-dimension-padding-xs,4px)}.b8b96f70820333a1__title{margin:0}._70f1dd22bad55b18__description{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin:0}._89ac025fd8e2bc52__actions{align-items:center;display:flex;flex-direction:column;gap:var(--wpds-dimension-gap-xs,4px);margin-block-start:var(--wpds-dimension-gap-md,12px);@media (min-width:480px){flex-direction:row;justify-content:center}}}@layer compositions{._70f1dd22bad55b18__description,.b8b96f70820333a1__title{text-wrap:balance}}}');
9707 +}
9708 +var style_default7 = { "root": "a23e08e65c8e62e5__root", "visual": "_01303b3680eaa216__visual", "icon": "_58c8e351db225608__icon", "title": "b8b96f70820333a1__title", "description": "_70f1dd22bad55b18__description", "actions": "_89ac025fd8e2bc52__actions" };
9709 +var Root2 = (0, import_element21.forwardRef)(
9710 + function EmptyStateRoot({ render, ...props }, ref) {
9711 + const className = clsx_default(style_default7.root);
9712 + const element = useRender({
9713 + defaultTagName: "div",
9714 + render,
9715 + ref,
9716 + props: mergeProps({ className }, props)
9717 + });
9718 + return element;
9719 + }
9720 +);
9721 +
9722 +// packages/ui/build-module/empty-state/visual.mjs
9723 +var import_element22 = __toESM(require_element(), 1);
9724 +var STYLE_HASH_ATTRIBUTE9 = "data-wp-hash";
9725 +function getRuntime9() {
9726 + const globalScope = globalThis;
9727 + if (globalScope.__wpStyleRuntime) {
9728 + return globalScope.__wpStyleRuntime;
9729 + }
9730 + globalScope.__wpStyleRuntime = {
9731 + documents: /* @__PURE__ */ new Map(),
9732 + styles: /* @__PURE__ */ new Map(),
9733 + injectedStyles: /* @__PURE__ */ new WeakMap()
9734 + };
9735 + if (typeof document !== "undefined") {
9736 + registerDocument9(document);
9737 + }
9738 + return globalScope.__wpStyleRuntime;
9739 +}
9740 +function documentContainsStyleHash9(targetDocument, hash) {
9741 + if (!targetDocument.head) {
9742 + return false;
9743 + }
9744 + for (const style of targetDocument.head.querySelectorAll(
9745 + `style[${STYLE_HASH_ATTRIBUTE9}]`
9746 + )) {
9747 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE9) === hash) {
9748 + return true;
9749 + }
9750 + }
9751 + return false;
9752 +}
9753 +function injectStyle9(targetDocument, hash, css) {
9754 + if (!targetDocument.head) {
9755 + return;
9756 + }
9757 + const runtime = getRuntime9();
9758 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
9759 + if (!injectedStyles) {
9760 + injectedStyles = /* @__PURE__ */ new Set();
9761 + runtime.injectedStyles.set(targetDocument, injectedStyles);
9762 + }
9763 + if (injectedStyles.has(hash)) {
9764 + return;
9765 + }
9766 + if (documentContainsStyleHash9(targetDocument, hash)) {
9767 + injectedStyles.add(hash);
9768 + return;
9769 + }
9770 + const style = targetDocument.createElement("style");
9771 + style.setAttribute(STYLE_HASH_ATTRIBUTE9, hash);
9772 + style.appendChild(targetDocument.createTextNode(css));
9773 + targetDocument.head.appendChild(style);
9774 + injectedStyles.add(hash);
9775 +}
9776 +function registerDocument9(targetDocument) {
9777 + const runtime = getRuntime9();
9778 + runtime.documents.set(
9779 + targetDocument,
9780 + (runtime.documents.get(targetDocument) ?? 0) + 1
9781 + );
9782 + for (const [hash, css] of runtime.styles) {
9783 + injectStyle9(targetDocument, hash, css);
9784 + }
9785 + return () => {
9786 + const count = runtime.documents.get(targetDocument);
9787 + if (count === void 0) {
9788 + return;
9789 + }
9790 + if (count <= 1) {
9791 + runtime.documents.delete(targetDocument);
9792 + return;
9793 + }
9794 + runtime.documents.set(targetDocument, count - 1);
9795 + };
9796 +}
9797 +function registerStyle9(hash, css) {
9798 + const runtime = getRuntime9();
9799 + runtime.styles.set(hash, css);
9800 + for (const targetDocument of runtime.documents.keys()) {
9801 + injectStyle9(targetDocument, hash, css);
9802 + }
9803 +}
9804 +if (typeof process === "undefined" || true) {
9805 + registerStyle9("d29c51197e", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.a23e08e65c8e62e5__root{text-wrap:balance;align-items:center;color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);gap:var(--wpds-dimension-gap-xs,4px);max-width:var(--wpds-dimension-surface-width-sm,320px);text-align:center}._01303b3680eaa216__visual{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;justify-content:center;line-height:1;margin-block-end:var(--wpds-dimension-gap-xs,4px)}._58c8e351db225608__icon{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:50%;padding:var(--wpds-dimension-padding-xs,4px)}.b8b96f70820333a1__title{margin:0}._70f1dd22bad55b18__description{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin:0}._89ac025fd8e2bc52__actions{align-items:center;display:flex;flex-direction:column;gap:var(--wpds-dimension-gap-xs,4px);margin-block-start:var(--wpds-dimension-gap-md,12px);@media (min-width:480px){flex-direction:row;justify-content:center}}}@layer compositions{._70f1dd22bad55b18__description,.b8b96f70820333a1__title{text-wrap:balance}}}');
9806 +}
9807 +var style_default8 = { "root": "a23e08e65c8e62e5__root", "visual": "_01303b3680eaa216__visual", "icon": "_58c8e351db225608__icon", "title": "b8b96f70820333a1__title", "description": "_70f1dd22bad55b18__description", "actions": "_89ac025fd8e2bc52__actions" };
9808 +var Visual = (0, import_element22.forwardRef)(
9809 + function EmptyStateVisual({ render, ...props }, ref) {
9810 + const className = clsx_default(style_default8.visual);
9811 + const element = useRender({
9812 + defaultTagName: "div",
9813 + render,
9814 + ref,
9815 + props: mergeProps({ className }, props)
9816 + });
9817 + return element;
9818 + }
9819 +);
9820 +
9821 +// packages/ui/build-module/empty-state/icon.mjs
9822 +var import_element23 = __toESM(require_element(), 1);
9823 +var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
9824 +var STYLE_HASH_ATTRIBUTE10 = "data-wp-hash";
9825 +function getRuntime10() {
9826 + const globalScope = globalThis;
9827 + if (globalScope.__wpStyleRuntime) {
9828 + return globalScope.__wpStyleRuntime;
9829 + }
9830 + globalScope.__wpStyleRuntime = {
9831 + documents: /* @__PURE__ */ new Map(),
9832 + styles: /* @__PURE__ */ new Map(),
9833 + injectedStyles: /* @__PURE__ */ new WeakMap()
9834 + };
9835 + if (typeof document !== "undefined") {
9836 + registerDocument10(document);
9837 + }
9838 + return globalScope.__wpStyleRuntime;
9839 +}
9840 +function documentContainsStyleHash10(targetDocument, hash) {
9841 + if (!targetDocument.head) {
9842 + return false;
9843 + }
9844 + for (const style of targetDocument.head.querySelectorAll(
9845 + `style[${STYLE_HASH_ATTRIBUTE10}]`
9846 + )) {
9847 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE10) === hash) {
9848 + return true;
9849 + }
9850 + }
9851 + return false;
9852 +}
9853 +function injectStyle10(targetDocument, hash, css) {
9854 + if (!targetDocument.head) {
9855 + return;
9856 + }
9857 + const runtime = getRuntime10();
9858 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
9859 + if (!injectedStyles) {
9860 + injectedStyles = /* @__PURE__ */ new Set();
9861 + runtime.injectedStyles.set(targetDocument, injectedStyles);
9862 + }
9863 + if (injectedStyles.has(hash)) {
9864 + return;
9865 + }
9866 + if (documentContainsStyleHash10(targetDocument, hash)) {
9867 + injectedStyles.add(hash);
9868 + return;
9869 + }
9870 + const style = targetDocument.createElement("style");
9871 + style.setAttribute(STYLE_HASH_ATTRIBUTE10, hash);
9872 + style.appendChild(targetDocument.createTextNode(css));
9873 + targetDocument.head.appendChild(style);
9874 + injectedStyles.add(hash);
9875 +}
9876 +function registerDocument10(targetDocument) {
9877 + const runtime = getRuntime10();
9878 + runtime.documents.set(
9879 + targetDocument,
9880 + (runtime.documents.get(targetDocument) ?? 0) + 1
9881 + );
9882 + for (const [hash, css] of runtime.styles) {
9883 + injectStyle10(targetDocument, hash, css);
9884 + }
9885 + return () => {
9886 + const count = runtime.documents.get(targetDocument);
9887 + if (count === void 0) {
9888 + return;
9889 + }
9890 + if (count <= 1) {
9891 + runtime.documents.delete(targetDocument);
9892 + return;
9893 + }
9894 + runtime.documents.set(targetDocument, count - 1);
9895 + };
9896 +}
9897 +function registerStyle10(hash, css) {
9898 + const runtime = getRuntime10();
9899 + runtime.styles.set(hash, css);
9900 + for (const targetDocument of runtime.documents.keys()) {
9901 + injectStyle10(targetDocument, hash, css);
9902 + }
9903 +}
9904 +if (typeof process === "undefined" || true) {
9905 + registerStyle10("d29c51197e", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.a23e08e65c8e62e5__root{text-wrap:balance;align-items:center;color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);gap:var(--wpds-dimension-gap-xs,4px);max-width:var(--wpds-dimension-surface-width-sm,320px);text-align:center}._01303b3680eaa216__visual{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;justify-content:center;line-height:1;margin-block-end:var(--wpds-dimension-gap-xs,4px)}._58c8e351db225608__icon{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:50%;padding:var(--wpds-dimension-padding-xs,4px)}.b8b96f70820333a1__title{margin:0}._70f1dd22bad55b18__description{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin:0}._89ac025fd8e2bc52__actions{align-items:center;display:flex;flex-direction:column;gap:var(--wpds-dimension-gap-xs,4px);margin-block-start:var(--wpds-dimension-gap-md,12px);@media (min-width:480px){flex-direction:row;justify-content:center}}}@layer compositions{._70f1dd22bad55b18__description,.b8b96f70820333a1__title{text-wrap:balance}}}');
9906 +}
9907 +var style_default9 = { "root": "a23e08e65c8e62e5__root", "visual": "_01303b3680eaa216__visual", "icon": "_58c8e351db225608__icon", "title": "b8b96f70820333a1__title", "description": "_70f1dd22bad55b18__description", "actions": "_89ac025fd8e2bc52__actions" };
9908 +var Icon3 = (0, import_element23.forwardRef)(
9909 + function EmptyStateIcon({ icon, className, ...restProps }, ref) {
9910 + return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
9911 + Visual,
9912 + {
9913 + ref,
9914 + className: clsx_default(style_default9.icon, className),
9915 + ...restProps,
9916 + children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { icon })
9917 + }
9918 + );
9919 + }
9920 +);
9921 +
9922 +// packages/ui/build-module/empty-state/title.mjs
9923 +var import_element24 = __toESM(require_element(), 1);
9924 +var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
9925 +var STYLE_HASH_ATTRIBUTE11 = "data-wp-hash";
9926 +function getRuntime11() {
9927 + const globalScope = globalThis;
9928 + if (globalScope.__wpStyleRuntime) {
9929 + return globalScope.__wpStyleRuntime;
9930 + }
9931 + globalScope.__wpStyleRuntime = {
9932 + documents: /* @__PURE__ */ new Map(),
9933 + styles: /* @__PURE__ */ new Map(),
9934 + injectedStyles: /* @__PURE__ */ new WeakMap()
9935 + };
9936 + if (typeof document !== "undefined") {
9937 + registerDocument11(document);
9938 + }
9939 + return globalScope.__wpStyleRuntime;
9940 +}
9941 +function documentContainsStyleHash11(targetDocument, hash) {
9942 + if (!targetDocument.head) {
9943 + return false;
9944 + }
9945 + for (const style of targetDocument.head.querySelectorAll(
9946 + `style[${STYLE_HASH_ATTRIBUTE11}]`
9947 + )) {
9948 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE11) === hash) {
9949 + return true;
9950 + }
9951 + }
9952 + return false;
9953 +}
9954 +function injectStyle11(targetDocument, hash, css) {
9955 + if (!targetDocument.head) {
9956 + return;
9957 + }
9958 + const runtime = getRuntime11();
9959 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
9960 + if (!injectedStyles) {
9961 + injectedStyles = /* @__PURE__ */ new Set();
9962 + runtime.injectedStyles.set(targetDocument, injectedStyles);
9963 + }
9964 + if (injectedStyles.has(hash)) {
9965 + return;
9966 + }
9967 + if (documentContainsStyleHash11(targetDocument, hash)) {
9968 + injectedStyles.add(hash);
9969 + return;
9970 + }
9971 + const style = targetDocument.createElement("style");
9972 + style.setAttribute(STYLE_HASH_ATTRIBUTE11, hash);
9973 + style.appendChild(targetDocument.createTextNode(css));
9974 + targetDocument.head.appendChild(style);
9975 + injectedStyles.add(hash);
9976 +}
9977 +function registerDocument11(targetDocument) {
9978 + const runtime = getRuntime11();
9979 + runtime.documents.set(
9980 + targetDocument,
9981 + (runtime.documents.get(targetDocument) ?? 0) + 1
9982 + );
9983 + for (const [hash, css] of runtime.styles) {
9984 + injectStyle11(targetDocument, hash, css);
9985 + }
9986 + return () => {
9987 + const count = runtime.documents.get(targetDocument);
9988 + if (count === void 0) {
9989 + return;
9990 + }
9991 + if (count <= 1) {
9992 + runtime.documents.delete(targetDocument);
9993 + return;
9994 + }
9995 + runtime.documents.set(targetDocument, count - 1);
9996 + };
9997 +}
9998 +function registerStyle11(hash, css) {
9999 + const runtime = getRuntime11();
10000 + runtime.styles.set(hash, css);
10001 + for (const targetDocument of runtime.documents.keys()) {
10002 + injectStyle11(targetDocument, hash, css);
10003 + }
10004 +}
10005 +if (typeof process === "undefined" || true) {
10006 + registerStyle11("d29c51197e", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.a23e08e65c8e62e5__root{text-wrap:balance;align-items:center;color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);gap:var(--wpds-dimension-gap-xs,4px);max-width:var(--wpds-dimension-surface-width-sm,320px);text-align:center}._01303b3680eaa216__visual{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;justify-content:center;line-height:1;margin-block-end:var(--wpds-dimension-gap-xs,4px)}._58c8e351db225608__icon{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:50%;padding:var(--wpds-dimension-padding-xs,4px)}.b8b96f70820333a1__title{margin:0}._70f1dd22bad55b18__description{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin:0}._89ac025fd8e2bc52__actions{align-items:center;display:flex;flex-direction:column;gap:var(--wpds-dimension-gap-xs,4px);margin-block-start:var(--wpds-dimension-gap-md,12px);@media (min-width:480px){flex-direction:row;justify-content:center}}}@layer compositions{._70f1dd22bad55b18__description,.b8b96f70820333a1__title{text-wrap:balance}}}');
10007 +}
10008 +var style_default10 = { "root": "a23e08e65c8e62e5__root", "visual": "_01303b3680eaa216__visual", "icon": "_58c8e351db225608__icon", "title": "b8b96f70820333a1__title", "description": "_70f1dd22bad55b18__description", "actions": "_89ac025fd8e2bc52__actions" };
10009 +var DEFAULT_TAG = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h2", {});
10010 +var Title = (0, import_element24.forwardRef)(
10011 + function EmptyStateTitle({ render = DEFAULT_TAG, className, children, ...props }, ref) {
10012 + return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
10013 + Text,
10014 + {
10015 + ref,
10016 + variant: "heading-lg",
10017 + render,
10018 + className: clsx_default(style_default10.title, className),
10019 + ...props,
10020 + children
10021 + }
10022 + );
10023 + }
10024 +);
10025 +
10026 +// packages/ui/build-module/empty-state/description.mjs
10027 +var import_element25 = __toESM(require_element(), 1);
10028 +var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
10029 +var STYLE_HASH_ATTRIBUTE12 = "data-wp-hash";
10030 +function getRuntime12() {
10031 + const globalScope = globalThis;
10032 + if (globalScope.__wpStyleRuntime) {
10033 + return globalScope.__wpStyleRuntime;
10034 + }
10035 + globalScope.__wpStyleRuntime = {
10036 + documents: /* @__PURE__ */ new Map(),
10037 + styles: /* @__PURE__ */ new Map(),
10038 + injectedStyles: /* @__PURE__ */ new WeakMap()
10039 + };
10040 + if (typeof document !== "undefined") {
10041 + registerDocument12(document);
10042 + }
10043 + return globalScope.__wpStyleRuntime;
10044 +}
10045 +function documentContainsStyleHash12(targetDocument, hash) {
10046 + if (!targetDocument.head) {
10047 + return false;
10048 + }
10049 + for (const style of targetDocument.head.querySelectorAll(
10050 + `style[${STYLE_HASH_ATTRIBUTE12}]`
10051 + )) {
10052 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE12) === hash) {
10053 + return true;
10054 + }
10055 + }
10056 + return false;
10057 +}
10058 +function injectStyle12(targetDocument, hash, css) {
10059 + if (!targetDocument.head) {
10060 + return;
10061 + }
10062 + const runtime = getRuntime12();
10063 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
10064 + if (!injectedStyles) {
10065 + injectedStyles = /* @__PURE__ */ new Set();
10066 + runtime.injectedStyles.set(targetDocument, injectedStyles);
10067 + }
10068 + if (injectedStyles.has(hash)) {
10069 + return;
10070 + }
10071 + if (documentContainsStyleHash12(targetDocument, hash)) {
10072 + injectedStyles.add(hash);
10073 + return;
10074 + }
10075 + const style = targetDocument.createElement("style");
10076 + style.setAttribute(STYLE_HASH_ATTRIBUTE12, hash);
10077 + style.appendChild(targetDocument.createTextNode(css));
10078 + targetDocument.head.appendChild(style);
10079 + injectedStyles.add(hash);
10080 +}
10081 +function registerDocument12(targetDocument) {
10082 + const runtime = getRuntime12();
10083 + runtime.documents.set(
10084 + targetDocument,
10085 + (runtime.documents.get(targetDocument) ?? 0) + 1
10086 + );
10087 + for (const [hash, css] of runtime.styles) {
10088 + injectStyle12(targetDocument, hash, css);
10089 + }
10090 + return () => {
10091 + const count = runtime.documents.get(targetDocument);
10092 + if (count === void 0) {
10093 + return;
10094 + }
10095 + if (count <= 1) {
10096 + runtime.documents.delete(targetDocument);
10097 + return;
10098 + }
10099 + runtime.documents.set(targetDocument, count - 1);
10100 + };
10101 +}
10102 +function registerStyle12(hash, css) {
10103 + const runtime = getRuntime12();
10104 + runtime.styles.set(hash, css);
10105 + for (const targetDocument of runtime.documents.keys()) {
10106 + injectStyle12(targetDocument, hash, css);
10107 + }
10108 +}
10109 +if (typeof process === "undefined" || true) {
10110 + registerStyle12("d29c51197e", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.a23e08e65c8e62e5__root{text-wrap:balance;align-items:center;color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);gap:var(--wpds-dimension-gap-xs,4px);max-width:var(--wpds-dimension-surface-width-sm,320px);text-align:center}._01303b3680eaa216__visual{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;justify-content:center;line-height:1;margin-block-end:var(--wpds-dimension-gap-xs,4px)}._58c8e351db225608__icon{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:50%;padding:var(--wpds-dimension-padding-xs,4px)}.b8b96f70820333a1__title{margin:0}._70f1dd22bad55b18__description{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin:0}._89ac025fd8e2bc52__actions{align-items:center;display:flex;flex-direction:column;gap:var(--wpds-dimension-gap-xs,4px);margin-block-start:var(--wpds-dimension-gap-md,12px);@media (min-width:480px){flex-direction:row;justify-content:center}}}@layer compositions{._70f1dd22bad55b18__description,.b8b96f70820333a1__title{text-wrap:balance}}}');
10111 +}
10112 +var style_default11 = { "root": "a23e08e65c8e62e5__root", "visual": "_01303b3680eaa216__visual", "icon": "_58c8e351db225608__icon", "title": "b8b96f70820333a1__title", "description": "_70f1dd22bad55b18__description", "actions": "_89ac025fd8e2bc52__actions" };
10113 +var DEFAULT_TAG2 = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", {});
10114 +var Description = (0, import_element25.forwardRef)(function EmptyStateDescription({ render = DEFAULT_TAG2, className, children, ...props }, ref) {
10115 + return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
10116 + Text,
10117 + {
10118 + ref,
10119 + variant: "body-md",
10120 + render,
10121 + className: clsx_default(style_default11.description, className),
10122 + ...props,
10123 + children
10124 + }
10125 + );
10126 +});
10127 +
10128 +// packages/ui/build-module/empty-state/actions.mjs
10129 +var import_element26 = __toESM(require_element(), 1);
10130 +var STYLE_HASH_ATTRIBUTE13 = "data-wp-hash";
10131 +function getRuntime13() {
10132 + const globalScope = globalThis;
10133 + if (globalScope.__wpStyleRuntime) {
10134 + return globalScope.__wpStyleRuntime;
10135 + }
10136 + globalScope.__wpStyleRuntime = {
10137 + documents: /* @__PURE__ */ new Map(),
10138 + styles: /* @__PURE__ */ new Map(),
10139 + injectedStyles: /* @__PURE__ */ new WeakMap()
10140 + };
10141 + if (typeof document !== "undefined") {
10142 + registerDocument13(document);
10143 + }
10144 + return globalScope.__wpStyleRuntime;
10145 +}
10146 +function documentContainsStyleHash13(targetDocument, hash) {
10147 + if (!targetDocument.head) {
10148 + return false;
10149 + }
10150 + for (const style of targetDocument.head.querySelectorAll(
10151 + `style[${STYLE_HASH_ATTRIBUTE13}]`
10152 + )) {
10153 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE13) === hash) {
10154 + return true;
10155 + }
10156 + }
10157 + return false;
10158 +}
10159 +function injectStyle13(targetDocument, hash, css) {
10160 + if (!targetDocument.head) {
10161 + return;
10162 + }
10163 + const runtime = getRuntime13();
10164 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
10165 + if (!injectedStyles) {
10166 + injectedStyles = /* @__PURE__ */ new Set();
10167 + runtime.injectedStyles.set(targetDocument, injectedStyles);
10168 + }
10169 + if (injectedStyles.has(hash)) {
10170 + return;
10171 + }
10172 + if (documentContainsStyleHash13(targetDocument, hash)) {
10173 + injectedStyles.add(hash);
10174 + return;
10175 + }
10176 + const style = targetDocument.createElement("style");
10177 + style.setAttribute(STYLE_HASH_ATTRIBUTE13, hash);
10178 + style.appendChild(targetDocument.createTextNode(css));
10179 + targetDocument.head.appendChild(style);
10180 + injectedStyles.add(hash);
10181 +}
10182 +function registerDocument13(targetDocument) {
10183 + const runtime = getRuntime13();
10184 + runtime.documents.set(
10185 + targetDocument,
10186 + (runtime.documents.get(targetDocument) ?? 0) + 1
10187 + );
10188 + for (const [hash, css] of runtime.styles) {
10189 + injectStyle13(targetDocument, hash, css);
10190 + }
10191 + return () => {
10192 + const count = runtime.documents.get(targetDocument);
10193 + if (count === void 0) {
10194 + return;
10195 + }
10196 + if (count <= 1) {
10197 + runtime.documents.delete(targetDocument);
10198 + return;
10199 + }
10200 + runtime.documents.set(targetDocument, count - 1);
10201 + };
10202 +}
10203 +function registerStyle13(hash, css) {
10204 + const runtime = getRuntime13();
10205 + runtime.styles.set(hash, css);
10206 + for (const targetDocument of runtime.documents.keys()) {
10207 + injectStyle13(targetDocument, hash, css);
10208 + }
10209 +}
10210 +if (typeof process === "undefined" || true) {
10211 + registerStyle13("d29c51197e", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.a23e08e65c8e62e5__root{text-wrap:balance;align-items:center;color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);gap:var(--wpds-dimension-gap-xs,4px);max-width:var(--wpds-dimension-surface-width-sm,320px);text-align:center}._01303b3680eaa216__visual{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;justify-content:center;line-height:1;margin-block-end:var(--wpds-dimension-gap-xs,4px)}._58c8e351db225608__icon{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:50%;padding:var(--wpds-dimension-padding-xs,4px)}.b8b96f70820333a1__title{margin:0}._70f1dd22bad55b18__description{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin:0}._89ac025fd8e2bc52__actions{align-items:center;display:flex;flex-direction:column;gap:var(--wpds-dimension-gap-xs,4px);margin-block-start:var(--wpds-dimension-gap-md,12px);@media (min-width:480px){flex-direction:row;justify-content:center}}}@layer compositions{._70f1dd22bad55b18__description,.b8b96f70820333a1__title{text-wrap:balance}}}');
10212 +}
10213 +var style_default12 = { "root": "a23e08e65c8e62e5__root", "visual": "_01303b3680eaa216__visual", "icon": "_58c8e351db225608__icon", "title": "b8b96f70820333a1__title", "description": "_70f1dd22bad55b18__description", "actions": "_89ac025fd8e2bc52__actions" };
10214 +var Actions = (0, import_element26.forwardRef)(
10215 + function EmptyStateActions({ render, ...props }, ref) {
10216 + const className = clsx_default(style_default12.actions);
10217 + const element = useRender({
10218 + defaultTagName: "div",
10219 + render,
10220 + ref,
10221 + props: mergeProps({ className }, props)
10222 + });
10223 + return element;
10224 + }
10225 +);
10226 +
931 10227 // packages/admin-ui/build-module/navigable-region/index.mjs
932 -var import_element4 = __toESM(require_element(), 1);
933 -var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
934 -var NavigableRegion = (0, import_element4.forwardRef)(
10228 +var import_element27 = __toESM(require_element(), 1);
10229 +var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
10230 +var NavigableRegion = (0, import_element27.forwardRef)(
935 10231 ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
936 - return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
10232 + return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
937 10233 Tag,
938 10234 {
939 10235 ref,
940 10236 className: clsx_default("admin-ui-navigable-region", className),
@@ -949,16 +10245,161 @@
949 10245 );
950 10246 NavigableRegion.displayName = "NavigableRegion";
951 10247 var navigable_region_default = NavigableRegion;
952 10248
10249 +// packages/admin-ui/build-module/navigation/index.mjs
10250 +var import_i18n4 = __toESM(require_i18n(), 1);
10251 +var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
10252 +var STYLE_HASH_ATTRIBUTE14 = "data-wp-hash";
10253 +function getRuntime14() {
10254 + const globalScope = globalThis;
10255 + if (globalScope.__wpStyleRuntime) {
10256 + return globalScope.__wpStyleRuntime;
10257 + }
10258 + globalScope.__wpStyleRuntime = {
10259 + documents: /* @__PURE__ */ new Map(),
10260 + styles: /* @__PURE__ */ new Map(),
10261 + injectedStyles: /* @__PURE__ */ new WeakMap()
10262 + };
10263 + if (typeof document !== "undefined") {
10264 + registerDocument14(document);
10265 + }
10266 + return globalScope.__wpStyleRuntime;
10267 +}
10268 +function documentContainsStyleHash14(targetDocument, hash) {
10269 + if (!targetDocument.head) {
10270 + return false;
10271 + }
10272 + for (const style of targetDocument.head.querySelectorAll(
10273 + `style[${STYLE_HASH_ATTRIBUTE14}]`
10274 + )) {
10275 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE14) === hash) {
10276 + return true;
10277 + }
10278 + }
10279 + return false;
10280 +}
10281 +function injectStyle14(targetDocument, hash, css) {
10282 + if (!targetDocument.head) {
10283 + return;
10284 + }
10285 + const runtime = getRuntime14();
10286 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
10287 + if (!injectedStyles) {
10288 + injectedStyles = /* @__PURE__ */ new Set();
10289 + runtime.injectedStyles.set(targetDocument, injectedStyles);
10290 + }
10291 + if (injectedStyles.has(hash)) {
10292 + return;
10293 + }
10294 + if (documentContainsStyleHash14(targetDocument, hash)) {
10295 + injectedStyles.add(hash);
10296 + return;
10297 + }
10298 + const style = targetDocument.createElement("style");
10299 + style.setAttribute(STYLE_HASH_ATTRIBUTE14, hash);
10300 + style.appendChild(targetDocument.createTextNode(css));
10301 + targetDocument.head.appendChild(style);
10302 + injectedStyles.add(hash);
10303 +}
10304 +function registerDocument14(targetDocument) {
10305 + const runtime = getRuntime14();
10306 + runtime.documents.set(
10307 + targetDocument,
10308 + (runtime.documents.get(targetDocument) ?? 0) + 1
10309 + );
10310 + for (const [hash, css] of runtime.styles) {
10311 + injectStyle14(targetDocument, hash, css);
10312 + }
10313 + return () => {
10314 + const count = runtime.documents.get(targetDocument);
10315 + if (count === void 0) {
10316 + return;
10317 + }
10318 + if (count <= 1) {
10319 + runtime.documents.delete(targetDocument);
10320 + return;
10321 + }
10322 + runtime.documents.set(targetDocument, count - 1);
10323 + };
10324 +}
10325 +function registerStyle14(hash, css) {
10326 + const runtime = getRuntime14();
10327 + runtime.styles.set(hash, css);
10328 + for (const targetDocument of runtime.documents.keys()) {
10329 + injectStyle14(targetDocument, hash, css);
10330 + }
10331 +}
10332 +if (typeof process === "undefined" || true) {
10333 + registerStyle14("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)}");
10334 +}
10335 +var style_default13 = { "list": "bfb5a2dd8cceebd3__list", "li": "a4759b4cb2c8bd92__li", "item": "_07da506d3f2d9afe__item" };
10336 +var Navigation = ({
10337 + items,
10338 + currentHref,
10339 + ariaLabel = (0, import_i18n4.__)("Sections"),
10340 + linkComponent,
10341 + className
10342 +}) => {
10343 + if (!items.length) {
10344 + return null;
10345 + }
10346 + const LinkComponent = linkComponent ?? "a";
10347 + if (true) {
10348 + const invalidItem = items.find(
10349 + (item) => typeof item.href !== "string"
10350 + );
10351 + if (invalidItem) {
10352 + throw new Error(
10353 + `Navigation: item "${invalidItem.label}" is missing an \`href\` prop.`
10354 + );
10355 + }
10356 + const duplicate = items.find(
10357 + (item, index2) => items.findIndex((other) => other.href === item.href) !== index2
10358 + );
10359 + if (duplicate) {
10360 + throw new Error(
10361 + `Navigation: duplicate \`href\` "${duplicate.href}". Each item must have a unique \`href\` so a single item receives \`aria-current="page"\`.`
10362 + );
10363 + }
10364 + }
10365 + return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("nav", { "aria-label": ariaLabel, className, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10366 + Stack,
10367 + {
10368 + render: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("ul", { role: "list" }),
10369 + direction: "row",
10370 + align: "center",
10371 + gap: "md",
10372 + className: style_default13.list,
10373 + children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("li", { className: style_default13.li, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10374 + Text,
10375 + {
10376 + variant: "body-md",
10377 + className: style_default13.item,
10378 + render: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10379 + Link,
10380 + {
10381 + variant: "unstyled",
10382 + "aria-current": item.href === currentHref ? "page" : void 0,
10383 + render: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LinkComponent, { href: item.href })
10384 + }
10385 + ),
10386 + children: item.label
10387 + }
10388 + ) }, item.href))
10389 + }
10390 + ) });
10391 +};
10392 +var navigation_default = Navigation;
10393 +
953 10394 // packages/admin-ui/build-module/page/sidebar-toggle-slot.mjs
954 10395 var import_components = __toESM(require_components(), 1);
955 10396 var { Fill: SidebarToggleFill, Slot: SidebarToggleSlot } = (0, import_components.createSlotFill)("SidebarToggle");
956 10397
957 10398 // packages/admin-ui/build-module/page/header.mjs
958 -var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
959 -var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
960 -function getRuntime3() {
10399 +var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
10400 +var STYLE_HASH_ATTRIBUTE15 = "data-wp-hash";
10401 +function getRuntime15() {
961 10402 const globalScope = globalThis;
962 10403 if (globalScope.__wpStyleRuntime) {
963 10404 return globalScope.__wpStyleRuntime;
964 10405 }
@@ -967,30 +10408,30 @@
967 10408 styles: /* @__PURE__ */ new Map(),
968 10409 injectedStyles: /* @__PURE__ */ new WeakMap()
969 10410 };
970 10411 if (typeof document !== "undefined") {
971 - registerDocument3(document);
10412 + registerDocument15(document);
972 10413 }
973 10414 return globalScope.__wpStyleRuntime;
974 10415 }
975 -function documentContainsStyleHash3(targetDocument, hash) {
10416 +function documentContainsStyleHash15(targetDocument, hash) {
976 10417 if (!targetDocument.head) {
977 10418 return false;
978 10419 }
979 10420 for (const style of targetDocument.head.querySelectorAll(
980 - `style[${STYLE_HASH_ATTRIBUTE3}]`
10421 + `style[${STYLE_HASH_ATTRIBUTE15}]`
981 10422 )) {
982 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) {
10423 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE15) === hash) {
983 10424 return true;
984 10425 }
985 10426 }
986 10427 return false;
987 10428 }
988 -function injectStyle3(targetDocument, hash, css) {
10429 +function injectStyle15(targetDocument, hash, css) {
989 10430 if (!targetDocument.head) {
990 10431 return;
991 10432 }
992 - const runtime = getRuntime3();
10433 + const runtime = getRuntime15();
993 10434 let injectedStyles = runtime.injectedStyles.get(targetDocument);
994 10435 if (!injectedStyles) {
995 10436 injectedStyles = /* @__PURE__ */ new Set();
996 10437 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -997,26 +10438,26 @@
997 10438 }
998 10439 if (injectedStyles.has(hash)) {
999 10440 return;
1000 10441 }
1001 - if (documentContainsStyleHash3(targetDocument, hash)) {
10442 + if (documentContainsStyleHash15(targetDocument, hash)) {
1002 10443 injectedStyles.add(hash);
1003 10444 return;
1004 10445 }
1005 10446 const style = targetDocument.createElement("style");
1006 - style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash);
10447 + style.setAttribute(STYLE_HASH_ATTRIBUTE15, hash);
1007 10448 style.appendChild(targetDocument.createTextNode(css));
1008 10449 targetDocument.head.appendChild(style);
1009 10450 injectedStyles.add(hash);
1010 10451 }
1011 -function registerDocument3(targetDocument) {
1012 - const runtime = getRuntime3();
10452 +function registerDocument15(targetDocument) {
10453 + const runtime = getRuntime15();
1013 10454 runtime.documents.set(
1014 10455 targetDocument,
1015 10456 (runtime.documents.get(targetDocument) ?? 0) + 1
1016 10457 );
1017 10458 for (const [hash, css] of runtime.styles) {
1018 - injectStyle3(targetDocument, hash, css);
10459 + injectStyle15(targetDocument, hash, css);
1019 10460 }
1020 10461 return () => {
1021 10462 const count = runtime.documents.get(targetDocument);
1022 10463 if (count === void 0) {
@@ -1028,19 +10469,19 @@
1028 10469 }
1029 10470 runtime.documents.set(targetDocument, count - 1);
1030 10471 };
1031 10472 }
1032 -function registerStyle3(hash, css) {
1033 - const runtime = getRuntime3();
10473 +function registerStyle15(hash, css) {
10474 + const runtime = getRuntime15();
1034 10475 runtime.styles.set(hash, css);
1035 10476 for (const targetDocument of runtime.documents.keys()) {
1036 - injectStyle3(targetDocument, hash, css);
10477 + injectStyle15(targetDocument, hash, css);
1037 10478 }
1038 10479 }
1039 10480 if (typeof process === "undefined" || true) {
1040 - registerStyle3("aa9c241ccc", "._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-bg-surface-neutral,#fcfcfc);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-bg-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);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:calc(var(--wpds-dimension-base, 4px)*8)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{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:calc(var(--wpds-dimension-base, 4px)*6);width:calc(var(--wpds-dimension-base, 4px)*6);>*{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-fg-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.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)}}");
10481 + registerStyle15("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)}}");
1041 10482 }
1042 -var style_default3 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
10483 +var style_default14 = { "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" };
1043 10484 function Header({
1044 10485 headingLevel = 1,
1045 10486 breadcrumbs,
1046 10487 badges,
@@ -1047,77 +10488,108 @@
1047 10488 visual,
1048 10489 title,
1049 10490 subTitle,
1050 10491 actions,
10492 + navigation,
10493 + components,
1051 10494 showSidebarToggle = true
1052 10495 }) {
1053 10496 const HeadingTag = `h${headingLevel}`;
1054 - return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Stack, { direction: "column", className: style_default3.header, children: [
1055 - /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1056 - Stack,
1057 - {
1058 - className: style_default3["header-content"],
1059 - direction: "row",
1060 - gap: "sm",
1061 - justify: "space-between",
1062 - children: [
1063 - /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Stack, { direction: "row", gap: "sm", align: "center", justify: "start", children: [
1064 - showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1065 - SidebarToggleSlot,
1066 - {
1067 - bubblesVirtually: true,
1068 - className: style_default3["sidebar-toggle-slot"]
1069 - }
1070 - ),
1071 - visual && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1072 - "div",
1073 - {
1074 - className: style_default3["header-visual"],
1075 - "aria-hidden": "true",
1076 - children: visual
1077 - }
1078 - ),
1079 - title && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1080 - Text,
1081 - {
1082 - className: style_default3["header-title"],
1083 - render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(HeadingTag, {}),
1084 - variant: "heading-lg",
1085 - children: title
1086 - }
1087 - ),
1088 - breadcrumbs,
1089 - badges
1090 - ] }),
1091 - actions && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1092 - Stack,
1093 - {
1094 - align: "center",
1095 - className: style_default3["header-actions"],
1096 - direction: "row",
1097 - gap: "sm",
1098 - children: actions
1099 - }
1100 - )
1101 - ]
1102 - }
1103 - ),
1104 - subTitle && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1105 - Text,
1106 - {
1107 - render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", {}),
1108 - variant: "body-md",
1109 - className: style_default3["header-subtitle"],
1110 - children: subTitle
1111 - }
1112 - )
1113 - ] });
10497 + const hasNavigation = !!navigation?.items?.length;
10498 + return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
10499 + Stack,
10500 + {
10501 + direction: "column",
10502 + className: clsx_default(
10503 + style_default14.header,
10504 + hasNavigation && style_default14["has-navigation"]
10505 + ),
10506 + children: [
10507 + /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
10508 + Stack,
10509 + {
10510 + className: style_default14["header-content"],
10511 + direction: "row",
10512 + gap: "sm",
10513 + justify: "space-between",
10514 + children: [
10515 + /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
10516 + Stack,
10517 + {
10518 + direction: "row",
10519 + gap: "sm",
10520 + align: "center",
10521 + justify: "start",
10522 + className: style_default14["header-lockup"],
10523 + children: [
10524 + showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10525 + SidebarToggleSlot,
10526 + {
10527 + bubblesVirtually: true,
10528 + className: style_default14["sidebar-toggle-slot"]
10529 + }
10530 + ),
10531 + visual && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10532 + "div",
10533 + {
10534 + className: style_default14["header-visual"],
10535 + "aria-hidden": "true",
10536 + children: visual
10537 + }
10538 + ),
10539 + title && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10540 + Text,
10541 + {
10542 + className: style_default14["header-title"],
10543 + render: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(HeadingTag, {}),
10544 + variant: "heading-lg",
10545 + children: title
10546 + }
10547 + ),
10548 + breadcrumbs,
10549 + badges
10550 + ]
10551 + }
10552 + ),
10553 + actions && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10554 + Stack,
10555 + {
10556 + align: "center",
10557 + className: style_default14["header-actions"],
10558 + direction: "row",
10559 + gap: "sm",
10560 + children: actions
10561 + }
10562 + )
10563 + ]
10564 + }
10565 + ),
10566 + subTitle && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10567 + Text,
10568 + {
10569 + render: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", {}),
10570 + variant: "body-md",
10571 + className: style_default14["header-subtitle"],
10572 + children: subTitle
10573 + }
10574 + ),
10575 + hasNavigation && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10576 + navigation_default,
10577 + {
10578 + ...navigation,
10579 + linkComponent: components?.link,
10580 + className: style_default14["header-navigation"]
10581 + }
10582 + )
10583 + ]
10584 + }
10585 + );
1114 10586 }
1115 10587
1116 10588 // packages/admin-ui/build-module/page/index.mjs
1117 -var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
1118 -var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
1119 -function getRuntime4() {
10589 +var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
10590 +var STYLE_HASH_ATTRIBUTE16 = "data-wp-hash";
10591 +function getRuntime16() {
1120 10592 const globalScope = globalThis;
1121 10593 if (globalScope.__wpStyleRuntime) {
1122 10594 return globalScope.__wpStyleRuntime;
1123 10595 }
@@ -1126,30 +10598,30 @@
1126 10598 styles: /* @__PURE__ */ new Map(),
1127 10599 injectedStyles: /* @__PURE__ */ new WeakMap()
1128 10600 };
1129 10601 if (typeof document !== "undefined") {
1130 - registerDocument4(document);
10602 + registerDocument16(document);
1131 10603 }
1132 10604 return globalScope.__wpStyleRuntime;
1133 10605 }
1134 -function documentContainsStyleHash4(targetDocument, hash) {
10606 +function documentContainsStyleHash16(targetDocument, hash) {
1135 10607 if (!targetDocument.head) {
1136 10608 return false;
1137 10609 }
1138 10610 for (const style of targetDocument.head.querySelectorAll(
1139 - `style[${STYLE_HASH_ATTRIBUTE4}]`
10611 + `style[${STYLE_HASH_ATTRIBUTE16}]`
1140 10612 )) {
1141 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
10613 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE16) === hash) {
1142 10614 return true;
1143 10615 }
1144 10616 }
1145 10617 return false;
1146 10618 }
1147 -function injectStyle4(targetDocument, hash, css) {
10619 +function injectStyle16(targetDocument, hash, css) {
1148 10620 if (!targetDocument.head) {
1149 10621 return;
1150 10622 }
1151 - const runtime = getRuntime4();
10623 + const runtime = getRuntime16();
1152 10624 let injectedStyles = runtime.injectedStyles.get(targetDocument);
1153 10625 if (!injectedStyles) {
1154 10626 injectedStyles = /* @__PURE__ */ new Set();
1155 10627 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -1156,26 +10628,26 @@
1156 10628 }
1157 10629 if (injectedStyles.has(hash)) {
1158 10630 return;
1159 10631 }
1160 - if (documentContainsStyleHash4(targetDocument, hash)) {
10632 + if (documentContainsStyleHash16(targetDocument, hash)) {
1161 10633 injectedStyles.add(hash);
1162 10634 return;
1163 10635 }
1164 10636 const style = targetDocument.createElement("style");
1165 - style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
10637 + style.setAttribute(STYLE_HASH_ATTRIBUTE16, hash);
1166 10638 style.appendChild(targetDocument.createTextNode(css));
1167 10639 targetDocument.head.appendChild(style);
1168 10640 injectedStyles.add(hash);
1169 10641 }
1170 -function registerDocument4(targetDocument) {
1171 - const runtime = getRuntime4();
10642 +function registerDocument16(targetDocument) {
10643 + const runtime = getRuntime16();
1172 10644 runtime.documents.set(
1173 10645 targetDocument,
1174 10646 (runtime.documents.get(targetDocument) ?? 0) + 1
1175 10647 );
1176 10648 for (const [hash, css] of runtime.styles) {
1177 - injectStyle4(targetDocument, hash, css);
10649 + injectStyle16(targetDocument, hash, css);
1178 10650 }
1179 10651 return () => {
1180 10652 const count = runtime.documents.get(targetDocument);
1181 10653 if (count === void 0) {
@@ -1187,19 +10659,19 @@
1187 10659 }
1188 10660 runtime.documents.set(targetDocument, count - 1);
1189 10661 };
1190 10662 }
1191 -function registerStyle4(hash, css) {
1192 - const runtime = getRuntime4();
10663 +function registerStyle16(hash, css) {
10664 + const runtime = getRuntime16();
1193 10665 runtime.styles.set(hash, css);
1194 10666 for (const targetDocument of runtime.documents.keys()) {
1195 - injectStyle4(targetDocument, hash, css);
10667 + injectStyle16(targetDocument, hash, css);
1196 10668 }
1197 10669 }
1198 10670 if (typeof process === "undefined" || true) {
1199 - registerStyle4("aa9c241ccc", "._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-bg-surface-neutral,#fcfcfc);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-bg-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);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:calc(var(--wpds-dimension-base, 4px)*8)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{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:calc(var(--wpds-dimension-base, 4px)*6);width:calc(var(--wpds-dimension-base, 4px)*6);>*{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-fg-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.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)}}");
10671 + registerStyle16("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)}}");
1200 10672 }
1201 -var style_default4 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
10673 +var style_default15 = { "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" };
1202 10674 function Page({
1203 10675 headingLevel,
1204 10676 breadcrumbs,
1205 10677 badges,
@@ -1208,16 +10680,18 @@
1208 10680 subTitle,
1209 10681 children,
1210 10682 className,
1211 10683 actions,
10684 + navigation,
10685 + components,
1212 10686 ariaLabel,
1213 10687 hasPadding = false,
1214 10688 showSidebarToggle = true
1215 10689 }) {
1216 - const classes = clsx_default(style_default4.page, className);
10690 + const classes = clsx_default(style_default15.page, className);
1217 10691 const effectiveAriaLabel = ariaLabel ?? (typeof title === "string" ? title : "");
1218 - return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(navigable_region_default, { className: classes, ariaLabel: effectiveAriaLabel, children: [
1219 - (title || breadcrumbs || badges || actions || visual) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
10692 + return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(navigable_region_default, { className: classes, ariaLabel: effectiveAriaLabel, children: [
10693 + (title || breadcrumbs || badges || actions || visual || !!navigation?.items?.length) && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1220 10694 Header,
1221 10695 {
1222 10696 headingLevel,
1223 10697 breadcrumbs,
@@ -1225,17 +10699,19 @@
1225 10699 visual,
1226 10700 title,
1227 10701 subTitle,
1228 10702 actions,
10703 + navigation,
10704 + components,
1229 10705 showSidebarToggle
1230 10706 }
1231 10707 ),
1232 - hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
10708 + hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1233 10709 "div",
1234 10710 {
1235 10711 className: clsx_default(
1236 - style_default4.content,
1237 - style_default4["has-padding"]
10712 + style_default15.content,
10713 + style_default15["has-padding"]
1238 10714 ),
1239 10715 children
1240 10716 }
1241 10717 ) : children
@@ -1243,134 +10719,64 @@
1243 10719 }
1244 10720 Page.SidebarToggleFill = SidebarToggleFill;
1245 10721 var page_default = Page;
1246 10722
10723 +// packages/admin-ui/build-module/admin-theme-colors/index.mjs
10724 +var DEFAULT_THEME_COLORS = {
10725 + primary: "#3858e9",
10726 + background: "#222524"
10727 +};
10728 +var ADMIN_THEME_COLORS = /* @__PURE__ */ new Map([
10729 + ["modern", DEFAULT_THEME_COLORS],
10730 + ["fresh", { primary: "#007cba", background: "#25292b" }],
10731 + ["midnight", { primary: "#cf4339", background: "#3d4042" }],
10732 + ["coffee", { primary: "#916745", background: "#5b534d" }],
10733 + ["ocean", { primary: "#567958", background: "#5f787f" }],
10734 + ["blue", { primary: "#437aa8", background: "#3876a8" }],
10735 + ["ectoplasm", { primary: "#646c3e", background: "#4f386e" }],
10736 + ["sunrise", { primary: "#ad631e", background: "#cc4541" }],
10737 + ["light", { primary: "#007cba", background: "#eaeeed" }]
10738 +]);
10739 +function getAdminThemeColors() {
10740 + const scheme = document.body.className.match(/admin-color-([\w-]+)/)?.[1] ?? "modern";
10741 + return ADMIN_THEME_COLORS.get(scheme) ?? DEFAULT_THEME_COLORS;
10742 +}
10743 +
1247 10744 // packages/boot/build-module/components/app/router.mjs
1248 -var import_data10 = __toESM(require_data(), 1);
1249 -var import_core_data6 = __toESM(require_core_data(), 1);
10745 +var import_data13 = __toESM(require_data(), 1);
10746 +var import_core_data7 = __toESM(require_core_data(), 1);
1250 10747 import {
1251 10748 privateApis as routePrivateApis6
1252 10749 } from "@wordpress/route";
1253 10750
1254 10751 // packages/boot/build-module/components/root/index.mjs
1255 -var import_notices = __toESM(require_notices(), 1);
1256 -var import_compose4 = __toESM(require_compose(), 1);
10752 +var import_notices3 = __toESM(require_notices(), 1);
10753 +var import_compose5 = __toESM(require_compose(), 1);
1257 10754 var import_components14 = __toESM(require_components(), 1);
1258 10755 import { privateApis as routePrivateApis5 } from "@wordpress/route";
1259 -var import_element15 = __toESM(require_element(), 1);
1260 -var import_i18n10 = __toESM(require_i18n(), 1);
10756 +var import_element41 = __toESM(require_element(), 1);
10757 +var import_i18n18 = __toESM(require_i18n(), 1);
10758 +var import_editor5 = __toESM(require_editor(), 1);
10759 +var import_theme = __toESM(require_theme(), 1);
1261 10760
1262 -// packages/boot/build-module/components/site-hub/index.mjs
1263 -var import_data3 = __toESM(require_data(), 1);
1264 -var import_components3 = __toESM(require_components(), 1);
1265 -var import_i18n2 = __toESM(require_i18n(), 1);
1266 -var import_core_data2 = __toESM(require_core_data(), 1);
1267 -var import_html_entities = __toESM(require_html_entities(), 1);
1268 -var import_keycodes = __toESM(require_keycodes(), 1);
1269 -var import_commands = __toESM(require_commands(), 1);
1270 -var import_url = __toESM(require_url(), 1);
10761 +// packages/boot/build-module/components/sidebar/index.mjs
10762 +var import_components9 = __toESM(require_components(), 1);
10763 +var import_data7 = __toESM(require_data(), 1);
10764 +var import_i18n9 = __toESM(require_i18n(), 1);
1271 10765
1272 -// packages/boot/build-module/components/site-icon-link/index.mjs
1273 -var import_components2 = __toESM(require_components(), 1);
1274 -import { Link, privateApis as routePrivateApis } from "@wordpress/route";
10766 +// packages/boot/build-module/components/navigation/index.mjs
10767 +var import_element31 = __toESM(require_element(), 1);
10768 +var import_data4 = __toESM(require_data(), 1);
1275 10769
1276 -// packages/boot/build-module/lock-unlock.mjs
1277 -var import_private_apis = __toESM(require_private_apis(), 1);
1278 -var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
1279 - "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
1280 - "@wordpress/boot"
1281 -);
1282 -
1283 -// packages/boot/build-module/components/site-icon/index.mjs
10770 +// packages/boot/build-module/store/index.mjs
1284 10771 var import_data = __toESM(require_data(), 1);
1285 -var import_i18n = __toESM(require_i18n(), 1);
1286 -var import_core_data = __toESM(require_core_data(), 1);
1287 -var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
1288 -if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='3ada0e3b8a']")) {
1289 - const style = document.createElement("style");
1290 - style.setAttribute("data-wp-hash", "3ada0e3b8a");
1291 - style.appendChild(document.createTextNode(".boot-site-icon{display:flex}.boot-site-icon__icon{fill:var(--wpds-color-fg-content-neutral,#1e1e1e);height:32px;width:32px}.boot-site-icon__image{aspect-ratio:1/1;border-radius:var(--wpds-border-radius-md,4px);height:32px;object-fit:cover;width:32px}"));
1292 - document.head.appendChild(style);
1293 -}
1294 -function SiteIcon({ className }) {
1295 - const { isRequestingSite, siteIconUrl } = (0, import_data.useSelect)((select) => {
1296 - const { getEntityRecord } = select(import_core_data.store);
1297 - const siteData = getEntityRecord(
1298 - "root",
1299 - "__unstableBase",
1300 - void 0
1301 - );
1302 - return {
1303 - isRequestingSite: !siteData,
1304 - siteIconUrl: siteData?.site_icon_url
1305 - };
1306 - }, []);
1307 - let icon = null;
1308 - if (isRequestingSite && !siteIconUrl) {
1309 - icon = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "boot-site-icon__image" });
1310 - } else {
1311 - icon = siteIconUrl ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1312 - "img",
1313 - {
1314 - className: "boot-site-icon__image",
1315 - alt: (0, import_i18n.__)("Site Icon"),
1316 - src: siteIconUrl
1317 - }
1318 - ) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1319 - icon_default,
1320 - {
1321 - className: "boot-site-icon__icon",
1322 - icon: wordpress_default,
1323 - size: 48
1324 - }
1325 - );
1326 - }
1327 - return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: clsx_default(className, "boot-site-icon"), children: icon });
1328 -}
1329 -var site_icon_default = SiteIcon;
1330 10772
1331 -// packages/boot/build-module/components/site-icon-link/index.mjs
1332 -var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
1333 -if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='5aacc86eea']")) {
1334 - const style = document.createElement("style");
1335 - style.setAttribute("data-wp-hash", "5aacc86eea");
1336 - style.appendChild(document.createTextNode(".boot-site-icon-link{align-items:center;background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);display:inline-flex;height:64px;justify-content:center;text-decoration:none;width:64px}@media not (prefers-reduced-motion){.boot-site-icon-link{transition:outline .1s ease-out}}.boot-site-icon-link:focus:not(:active){outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-offset:calc(var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px))*-1)}"));
1337 - document.head.appendChild(style);
1338 -}
1339 -var { useCanGoBack, useRouter } = unlock(routePrivateApis);
1340 -function SiteIconLink({
1341 - to,
1342 - isBackButton,
1343 - ...props
1344 -}) {
1345 - const router = useRouter();
1346 - const canGoBack = useCanGoBack();
1347 - return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_components2.Tooltip, { text: props["aria-label"], placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1348 - Link,
1349 - {
1350 - to,
1351 - "aria-label": props["aria-label"],
1352 - className: "boot-site-icon-link",
1353 - onClick: (event) => {
1354 - if (canGoBack && isBackButton) {
1355 - event.preventDefault();
1356 - router.history.back();
1357 - }
1358 - },
1359 - children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(site_icon_default, {})
1360 - }
1361 - ) });
1362 -}
1363 -var site_icon_link_default = SiteIconLink;
1364 -
1365 -// packages/boot/build-module/store/index.mjs
1366 -var import_data2 = __toESM(require_data(), 1);
1367 -
1368 10773 // packages/boot/build-module/store/reducer.mjs
1369 10774 var initialState = {
1370 10775 menuItems: {},
1371 10776 routes: [],
1372 - dashboardLink: void 0
10777 + dashboardLink: void 0,
10778 + entityLinks: {}
1373 10779 };
1374 10780 function reducer(state = initialState, action) {
1375 10781 switch (action.type) {
1376 10782 case "REGISTER_MENU_ITEM":
@@ -1381,8 +10787,11 @@
1381 10787 [action.id]: action.menuItem
1382 10788 }
1383 10789 };
1384 10790 case "UPDATE_MENU_ITEM":
10791 + if (!state.menuItems[action.id]) {
10792 + return state;
10793 + }
1385 10794 return {
1386 10795 ...state,
1387 10796 menuItems: {
1388 10797 ...state.menuItems,
@@ -1396,8 +10805,19 @@
1396 10805 return {
1397 10806 ...state,
1398 10807 routes: [...state.routes, action.route]
1399 10808 };
10809 + case "REGISTER_ENTITY_LINKS":
10810 + return {
10811 + ...state,
10812 + entityLinks: {
10813 + ...state.entityLinks,
10814 + [action.postType]: {
10815 + ...state.entityLinks[action.postType],
10816 + ...action.links
10817 + }
10818 + }
10819 + };
1400 10820 case "SET_DASHBOARD_LINK":
1401 10821 return {
1402 10822 ...state,
1403 10823 dashboardLink: action.dashboardLink
@@ -1408,8 +10828,9 @@
1408 10828
1409 10829 // packages/boot/build-module/store/actions.mjs
1410 10830 var actions_exports = {};
1411 10831 __export(actions_exports, {
10832 + registerEntityLinks: () => registerEntityLinks,
1412 10833 registerMenuItem: () => registerMenuItem,
1413 10834 registerRoute: () => registerRoute,
1414 10835 setDashboardLink: () => setDashboardLink,
1415 10836 updateMenuItem: () => updateMenuItem
@@ -1433,8 +10854,15 @@
1433 10854 type: "REGISTER_ROUTE",
1434 10855 route
1435 10856 };
1436 10857 }
10858 +function registerEntityLinks(postType, links) {
10859 + return {
10860 + type: "REGISTER_ENTITY_LINKS",
10861 + postType,
10862 + links
10863 + };
10864 +}
1437 10865 function setDashboardLink(dashboardLink) {
1438 10866 return {
1439 10867 type: "SET_DASHBOARD_LINK",
1440 10868 dashboardLink
@@ -1444,8 +10872,9 @@
1444 10872 // packages/boot/build-module/store/selectors.mjs
1445 10873 var selectors_exports = {};
1446 10874 __export(selectors_exports, {
1447 10875 getDashboardLink: () => getDashboardLink,
10876 + getEntityLink: () => getEntityLink,
1448 10877 getMenuItems: () => getMenuItems,
1449 10878 getRoutes: () => getRoutes
1450 10879 });
1451 10880 function getMenuItems(state) {
@@ -1456,104 +10885,61 @@
1456 10885 }
1457 10886 function getDashboardLink(state) {
1458 10887 return state.dashboardLink;
1459 10888 }
10889 +function getEntityLink(state, postType, postId) {
10890 + const links = state.entityLinks[postType] ?? state.entityLinks.default;
10891 + const path = postId === void 0 ? links?.list : links?.edit;
10892 + if (!path) {
10893 + return void 0;
10894 + }
10895 + return path.replace("{type}", encodeURIComponent(postType)).replace("{id}", encodeURIComponent(postId ?? ""));
10896 +}
1460 10897
1461 10898 // packages/boot/build-module/store/index.mjs
1462 10899 var STORE_NAME = "wordpress/boot";
1463 -var store = (0, import_data2.createReduxStore)(STORE_NAME, {
10900 +var store = (0, import_data.createReduxStore)(STORE_NAME, {
1464 10901 reducer,
1465 10902 actions: actions_exports,
1466 10903 selectors: selectors_exports
1467 10904 });
1468 -(0, import_data2.register)(store);
10905 +(0, import_data.register)(store);
1469 10906
1470 -// packages/boot/build-module/components/site-hub/index.mjs
1471 -var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
1472 -if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='bc60675bd6']")) {
1473 - const style = document.createElement("style");
1474 - style.setAttribute("data-wp-hash", "bc60675bd6");
1475 - style.appendChild(document.createTextNode(".boot-site-hub{align-items:center;background-color:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);display:grid;flex-shrink:0;grid-template-columns:60px 1fr auto;padding-right:16px;position:sticky;top:0;z-index:1}.boot-site-hub__actions{flex-shrink:0}.boot-site-hub__title{align-items:center;display:flex;text-decoration:none}.boot-site-hub__title .components-external-link__contents{margin-inline-start:4px;max-width:140px;overflow:hidden;text-decoration:none}.boot-site-hub__title .components-external-link__icon{opacity:0;transition:opacity .1s ease-out}.boot-site-hub__title:hover .components-external-link__icon{opacity:1}@media not (prefers-reduced-motion){.boot-site-hub__title{transition:outline .1s ease-out}}.boot-site-hub__title:focus:not(:active){outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-offset:calc(var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px))*-1)}.boot-site-hub__title-text{color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-size:13px;font-weight:499}.boot-site-hub__title-text,.boot-site-hub__url{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.boot-site-hub__url{color:var(--wpds-color-fg-content-neutral-weak,#707070);font-size:12px}"));
1476 - document.head.appendChild(style);
1477 -}
1478 -function SiteHub() {
1479 - const { dashboardLink, homeUrl, siteTitle } = (0, import_data3.useSelect)((select) => {
1480 - const { getEntityRecord } = select(import_core_data2.store);
1481 - const _base = getEntityRecord(
1482 - "root",
1483 - "__unstableBase"
1484 - );
1485 - return {
1486 - dashboardLink: select(store).getDashboardLink(),
1487 - homeUrl: _base?.home,
1488 - siteTitle: !_base?.name && !!_base?.url ? (0, import_url.filterURLForDisplay)(_base?.url) : _base?.name
1489 - };
1490 - }, []);
1491 - const { open: openCommandCenter } = (0, import_data3.useDispatch)(import_commands.store);
1492 - return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "boot-site-hub", children: [
1493 - /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1494 - site_icon_link_default,
1495 - {
1496 - to: dashboardLink || "/",
1497 - "aria-label": (0, import_i18n2.__)("Go to the Dashboard")
1498 - }
1499 - ),
1500 - /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1501 - import_components3.ExternalLink,
1502 - {
1503 - href: homeUrl ?? "/",
1504 - className: "boot-site-hub__title",
1505 - children: [
1506 - /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "boot-site-hub__title-text", children: siteTitle && (0, import_html_entities.decodeEntities)(siteTitle) }),
1507 - /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "boot-site-hub__url", children: (0, import_url.filterURLForDisplay)(homeUrl ?? "") })
1508 - ]
1509 - }
1510 - ),
1511 - /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_components3.__experimentalHStack, { className: "boot-site-hub__actions", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1512 - import_components3.Button,
1513 - {
1514 - variant: "tertiary",
1515 - icon: search_default,
1516 - onClick: () => openCommandCenter(),
1517 - size: "compact",
1518 - label: (0, import_i18n2.__)("Open command palette"),
1519 - shortcut: import_keycodes.displayShortcut.primary("k")
1520 - }
1521 - ) })
1522 - ] });
1523 -}
1524 -var site_hub_default = SiteHub;
10907 +// packages/boot/build-module/components/navigation/navigation-item/index.mjs
10908 +var import_components4 = __toESM(require_components(), 1);
1525 10909
1526 -// packages/boot/build-module/components/navigation/index.mjs
1527 -var import_element8 = __toESM(require_element(), 1);
1528 -var import_data6 = __toESM(require_data(), 1);
10910 +// packages/boot/build-module/components/navigation/router-link-item.mjs
10911 +var import_element28 = __toESM(require_element(), 1);
10912 +var import_components2 = __toESM(require_components(), 1);
10913 +import { privateApis as routePrivateApis } from "@wordpress/route";
1529 10914
1530 -// packages/boot/build-module/components/navigation/navigation-item/index.mjs
1531 -var import_components6 = __toESM(require_components(), 1);
10915 +// packages/boot/build-module/lock-unlock.mjs
10916 +var import_private_apis2 = __toESM(require_private_apis(), 1);
10917 +var { lock: lock2, unlock: unlock2 } = (0, import_private_apis2.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
10918 + "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
10919 + "@wordpress/boot"
10920 +);
1532 10921
1533 10922 // packages/boot/build-module/components/navigation/router-link-item.mjs
1534 -var import_element5 = __toESM(require_element(), 1);
1535 -var import_components4 = __toESM(require_components(), 1);
1536 -import { privateApis as routePrivateApis2 } from "@wordpress/route";
1537 -var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
1538 -var { createLink } = unlock(routePrivateApis2);
10923 +var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
10924 +var { createLink } = unlock2(routePrivateApis);
1539 10925 function AnchorOnlyItem(props, forwardedRef) {
1540 - return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_components4.__experimentalItem, { as: "a", ref: forwardedRef, ...props });
10926 + return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components2.__experimentalItem, { as: "a", ref: forwardedRef, ...props });
1541 10927 }
1542 -var RouterLinkItem = createLink((0, import_element5.forwardRef)(AnchorOnlyItem));
10928 +var RouterLinkItem = createLink((0, import_element28.forwardRef)(AnchorOnlyItem));
1543 10929 var router_link_item_default = RouterLinkItem;
1544 10930
1545 10931 // packages/boot/build-module/components/navigation/items.mjs
1546 -var import_element6 = __toESM(require_element(), 1);
1547 -var import_components5 = __toESM(require_components(), 1);
1548 -var import_primitives11 = __toESM(require_primitives(), 1);
1549 -var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
10932 +var import_element29 = __toESM(require_element(), 1);
10933 +var import_components3 = __toESM(require_components(), 1);
10934 +var import_primitives10 = __toESM(require_primitives(), 1);
10935 +var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
1550 10936 function isSvg(element) {
1551 - return (0, import_element6.isValidElement)(element) && (element.type === import_primitives11.SVG || element.type === "svg");
10937 + return (0, import_element29.isValidElement)(element) && (element.type === import_primitives10.SVG || element.type === "svg");
1552 10938 }
1553 10939 function wrapIcon(icon, shouldShowPlaceholder = true) {
1554 10940 if (isSvg(icon)) {
1555 - return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_components5.Icon, { icon });
10941 + return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components3.Icon, { icon });
1556 10942 }
1557 10943 if (typeof icon === "string" && icon.startsWith("dashicons-")) {
1558 10944 const iconKey = icon.replace(
1559 10945 /^dashicons-/,
@@ -1558,10 +10944,10 @@
1558 10944 const iconKey = icon.replace(
1559 10945 /^dashicons-/,
1560 10946 ""
1561 10947 );
1562 - return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1563 - import_components5.Dashicon,
10948 + return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
10949 + import_components3.Dashicon,
1564 10950 {
1565 10951 style: { padding: "2px" },
1566 10952 icon: iconKey,
1567 10953 "aria-hidden": "true"
@@ -1568,9 +10954,9 @@
1568 10954 }
1569 10955 );
1570 10956 }
1571 10957 if (typeof icon === "string" && icon.startsWith("data:")) {
1572 - return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
10958 + return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1573 10959 "img",
1574 10960 {
1575 10961 src: icon,
1576 10962 alt: "",
@@ -1587,9 +10973,9 @@
1587 10973 if (icon) {
1588 10974 return icon;
1589 10975 }
1590 10976 if (shouldShowPlaceholder) {
1591 - return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
10977 + return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1592 10978 "div",
1593 10979 {
1594 10980 style: { width: "24px", height: "24px" },
1595 10981 "aria-hidden": "true"
@@ -1599,15 +10985,93 @@
1599 10985 return null;
1600 10986 }
1601 10987
1602 10988 // packages/boot/build-module/components/navigation/navigation-item/index.mjs
1603 -var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
1604 -if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='26b8e27d3f']")) {
1605 - const style = document.createElement("style");
1606 - style.setAttribute("data-wp-hash", "26b8e27d3f");
1607 - style.appendChild(document.createTextNode('.boot-navigation-item.components-item{align-items:center;border:none;color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);display:flex;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;line-height:20px;margin-block-end:4px;margin-inline:12px;min-height:32px;padding-block:0;padding-inline:4px;width:calc(100% - 24px)}.boot-dropdown-item__children .boot-navigation-item.components-item{min-height:24px}.boot-navigation-item.components-item{border-radius:var(--wpds-border-radius-sm,2px)}.boot-navigation-item.components-item.active,.boot-navigation-item.components-item:focus,.boot-navigation-item.components-item:hover,.boot-navigation-item.components-item[aria-current=true]{color:var(--wpds-color-fg-interactive-brand-active,var(--wp-admin-theme-color,#3858e9))}.boot-navigation-item.components-item.active{font-weight:499}.boot-navigation-item.components-item svg:last-child{padding:4px}.boot-navigation-item.components-item[aria-current=true]{color:var(--wpds-color-fg-interactive-brand-active,var(--wp-admin-theme-color,#3858e9));font-weight:499}.boot-navigation-item.components-item:focus-visible{transform:translateZ(0)}.boot-navigation-item.components-item.with-suffix{padding-right:16px}'));
1608 - document.head.appendChild(style);
10989 +var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
10990 +var STYLE_HASH_ATTRIBUTE17 = "data-wp-hash";
10991 +function getRuntime17() {
10992 + const globalScope = globalThis;
10993 + if (globalScope.__wpStyleRuntime) {
10994 + return globalScope.__wpStyleRuntime;
10995 + }
10996 + globalScope.__wpStyleRuntime = {
10997 + documents: /* @__PURE__ */ new Map(),
10998 + styles: /* @__PURE__ */ new Map(),
10999 + injectedStyles: /* @__PURE__ */ new WeakMap()
11000 + };
11001 + if (typeof document !== "undefined") {
11002 + registerDocument17(document);
11003 + }
11004 + return globalScope.__wpStyleRuntime;
1609 11005 }
11006 +function documentContainsStyleHash17(targetDocument, hash) {
11007 + if (!targetDocument.head) {
11008 + return false;
11009 + }
11010 + for (const style of targetDocument.head.querySelectorAll(
11011 + `style[${STYLE_HASH_ATTRIBUTE17}]`
11012 + )) {
11013 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE17) === hash) {
11014 + return true;
11015 + }
11016 + }
11017 + return false;
11018 +}
11019 +function injectStyle17(targetDocument, hash, css) {
11020 + if (!targetDocument.head) {
11021 + return;
11022 + }
11023 + const runtime = getRuntime17();
11024 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
11025 + if (!injectedStyles) {
11026 + injectedStyles = /* @__PURE__ */ new Set();
11027 + runtime.injectedStyles.set(targetDocument, injectedStyles);
11028 + }
11029 + if (injectedStyles.has(hash)) {
11030 + return;
11031 + }
11032 + if (documentContainsStyleHash17(targetDocument, hash)) {
11033 + injectedStyles.add(hash);
11034 + return;
11035 + }
11036 + const style = targetDocument.createElement("style");
11037 + style.setAttribute(STYLE_HASH_ATTRIBUTE17, hash);
11038 + style.appendChild(targetDocument.createTextNode(css));
11039 + targetDocument.head.appendChild(style);
11040 + injectedStyles.add(hash);
11041 +}
11042 +function registerDocument17(targetDocument) {
11043 + const runtime = getRuntime17();
11044 + runtime.documents.set(
11045 + targetDocument,
11046 + (runtime.documents.get(targetDocument) ?? 0) + 1
11047 + );
11048 + for (const [hash, css] of runtime.styles) {
11049 + injectStyle17(targetDocument, hash, css);
11050 + }
11051 + return () => {
11052 + const count = runtime.documents.get(targetDocument);
11053 + if (count === void 0) {
11054 + return;
11055 + }
11056 + if (count <= 1) {
11057 + runtime.documents.delete(targetDocument);
11058 + return;
11059 + }
11060 + runtime.documents.set(targetDocument, count - 1);
11061 + };
11062 +}
11063 +function registerStyle17(hash, css) {
11064 + const runtime = getRuntime17();
11065 + runtime.styles.set(hash, css);
11066 + for (const targetDocument of runtime.documents.keys()) {
11067 + injectStyle17(targetDocument, hash, css);
11068 + }
11069 +}
11070 +if (typeof process === "undefined" || true) {
11071 + registerStyle17("74796ab776", ".d5331ded354c389a__item.d5331ded354c389a__item{align-items:center;border:none;border-radius:var(--wpds-border-radius-sm,2px);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);display:flex;font-family:-apple-system,system-ui,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:var(--wpds-typography-font-weight-default,400);line-height:20px;margin-block-end:4px;margin-inline:12px;min-height:32px;padding-block:0;padding-inline:4px;width:calc(100% - 24px)}.d5331ded354c389a__item.d5331ded354c389a__item:focus,.d5331ded354c389a__item.d5331ded354c389a__item:hover,.d5331ded354c389a__item.d5331ded354c389a__item[aria-current=true]{color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}.d5331ded354c389a__item.d5331ded354c389a__item svg:last-child{padding:4px}.d5331ded354c389a__item.d5331ded354c389a__item[aria-current=page],.d5331ded354c389a__item.d5331ded354c389a__item[data-status=active]{color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));font-weight:var(--wpds-typography-font-weight-emphasis,600)}.d5331ded354c389a__item.d5331ded354c389a__item:focus-visible{transform:translateZ(0)}.d5331ded354c389a__item._44ce5374f19a05f7__is-compact{min-height:24px}");
11072 +}
11073 +var style_module_default = { "item": "d5331ded354c389a__item", "is-compact": "_44ce5374f19a05f7__is-compact" };
1610 11074 function NavigationItem({
1611 11075 className,
1612 11076 icon,
1613 11077 shouldShowPlaceholder = true,
@@ -1616,37 +11080,114 @@
1616 11080 }) {
1617 11081 const isExternal = !String(
1618 11082 new URL(to, window.location.origin)
1619 11083 ).startsWith(window.location.origin);
1620 - const content = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_components6.__experimentalHStack, { justify: "flex-start", spacing: 2, style: { flexGrow: "1" }, children: [
11084 + const content = /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_components4.__experimentalHStack, { justify: "flex-start", spacing: 2, style: { flexGrow: "1" }, children: [
1621 11085 wrapIcon(icon, shouldShowPlaceholder),
1622 - /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_components6.FlexBlock, { children })
11086 + /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components4.FlexBlock, { children })
1623 11087 ] });
1624 11088 if (isExternal) {
1625 - return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1626 - import_components6.__experimentalItem,
11089 + return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
11090 + import_components4.__experimentalItem,
1627 11091 {
1628 11092 as: "a",
1629 11093 href: to,
1630 - className: clsx_default("boot-navigation-item", className),
11094 + className: clsx_default(style_module_default.item, className),
1631 11095 children: content
1632 11096 }
1633 11097 );
1634 11098 }
1635 - return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1636 - router_link_item_default,
1637 - {
1638 - to,
1639 - className: clsx_default("boot-navigation-item", className),
1640 - children: content
11099 + return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(router_link_item_default, { to, className: clsx_default(style_module_default.item, className), children: content });
11100 +}
11101 +
11102 +// packages/boot/build-module/components/navigation/drilldown-item/index.mjs
11103 +var import_components5 = __toESM(require_components(), 1);
11104 +var import_i18n5 = __toESM(require_i18n(), 1);
11105 +var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
11106 +var STYLE_HASH_ATTRIBUTE18 = "data-wp-hash";
11107 +function getRuntime18() {
11108 + const globalScope = globalThis;
11109 + if (globalScope.__wpStyleRuntime) {
11110 + return globalScope.__wpStyleRuntime;
11111 + }
11112 + globalScope.__wpStyleRuntime = {
11113 + documents: /* @__PURE__ */ new Map(),
11114 + styles: /* @__PURE__ */ new Map(),
11115 + injectedStyles: /* @__PURE__ */ new WeakMap()
11116 + };
11117 + if (typeof document !== "undefined") {
11118 + registerDocument18(document);
11119 + }
11120 + return globalScope.__wpStyleRuntime;
11121 +}
11122 +function documentContainsStyleHash18(targetDocument, hash) {
11123 + if (!targetDocument.head) {
11124 + return false;
11125 + }
11126 + for (const style of targetDocument.head.querySelectorAll(
11127 + `style[${STYLE_HASH_ATTRIBUTE18}]`
11128 + )) {
11129 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE18) === hash) {
11130 + return true;
1641 11131 }
11132 + }
11133 + return false;
11134 +}
11135 +function injectStyle18(targetDocument, hash, css) {
11136 + if (!targetDocument.head) {
11137 + return;
11138 + }
11139 + const runtime = getRuntime18();
11140 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
11141 + if (!injectedStyles) {
11142 + injectedStyles = /* @__PURE__ */ new Set();
11143 + runtime.injectedStyles.set(targetDocument, injectedStyles);
11144 + }
11145 + if (injectedStyles.has(hash)) {
11146 + return;
11147 + }
11148 + if (documentContainsStyleHash18(targetDocument, hash)) {
11149 + injectedStyles.add(hash);
11150 + return;
11151 + }
11152 + const style = targetDocument.createElement("style");
11153 + style.setAttribute(STYLE_HASH_ATTRIBUTE18, hash);
11154 + style.appendChild(targetDocument.createTextNode(css));
11155 + targetDocument.head.appendChild(style);
11156 + injectedStyles.add(hash);
11157 +}
11158 +function registerDocument18(targetDocument) {
11159 + const runtime = getRuntime18();
11160 + runtime.documents.set(
11161 + targetDocument,
11162 + (runtime.documents.get(targetDocument) ?? 0) + 1
1642 11163 );
11164 + for (const [hash, css] of runtime.styles) {
11165 + injectStyle18(targetDocument, hash, css);
11166 + }
11167 + return () => {
11168 + const count = runtime.documents.get(targetDocument);
11169 + if (count === void 0) {
11170 + return;
11171 + }
11172 + if (count <= 1) {
11173 + runtime.documents.delete(targetDocument);
11174 + return;
11175 + }
11176 + runtime.documents.set(targetDocument, count - 1);
11177 + };
1643 11178 }
1644 -
1645 -// packages/boot/build-module/components/navigation/drilldown-item/index.mjs
1646 -var import_components7 = __toESM(require_components(), 1);
1647 -var import_i18n3 = __toESM(require_i18n(), 1);
1648 -var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
11179 +function registerStyle18(hash, css) {
11180 + const runtime = getRuntime18();
11181 + runtime.styles.set(hash, css);
11182 + for (const targetDocument of runtime.documents.keys()) {
11183 + injectStyle18(targetDocument, hash, css);
11184 + }
11185 +}
11186 +if (typeof process === "undefined" || true) {
11187 + registerStyle18("74796ab776", ".d5331ded354c389a__item.d5331ded354c389a__item{align-items:center;border:none;border-radius:var(--wpds-border-radius-sm,2px);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);display:flex;font-family:-apple-system,system-ui,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:var(--wpds-typography-font-weight-default,400);line-height:20px;margin-block-end:4px;margin-inline:12px;min-height:32px;padding-block:0;padding-inline:4px;width:calc(100% - 24px)}.d5331ded354c389a__item.d5331ded354c389a__item:focus,.d5331ded354c389a__item.d5331ded354c389a__item:hover,.d5331ded354c389a__item.d5331ded354c389a__item[aria-current=true]{color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}.d5331ded354c389a__item.d5331ded354c389a__item svg:last-child{padding:4px}.d5331ded354c389a__item.d5331ded354c389a__item[aria-current=page],.d5331ded354c389a__item.d5331ded354c389a__item[data-status=active]{color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));font-weight:var(--wpds-typography-font-weight-emphasis,600)}.d5331ded354c389a__item.d5331ded354c389a__item:focus-visible{transform:translateZ(0)}.d5331ded354c389a__item._44ce5374f19a05f7__is-compact{min-height:24px}");
11188 +}
11189 +var style_module_default2 = { "item": "d5331ded354c389a__item", "is-compact": "_44ce5374f19a05f7__is-compact" };
1649 11190 function DrilldownItem({
1650 11191 className,
1651 11192 id,
1652 11193 icon,
@@ -1657,15 +11198,15 @@
1657 11198 const handleClick = (e) => {
1658 11199 e.preventDefault();
1659 11200 onNavigate({ id, direction: "forward" });
1660 11201 };
1661 - return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1662 - import_components7.__experimentalItem,
11202 + return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11203 + import_components5.__experimentalItem,
1663 11204 {
1664 - className: clsx_default("boot-navigation-item", className),
11205 + className: clsx_default(style_module_default2.item, className),
1665 11206 onClick: handleClick,
1666 - children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
1667 - import_components7.__experimentalHStack,
11207 + children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
11208 + import_components5.__experimentalHStack,
1668 11209 {
1669 11210 justify: "flex-start",
1670 11211 spacing: 2,
1671 11212 style: { flexGrow: "1" },
@@ -1670,10 +11211,15 @@
1670 11211 spacing: 2,
1671 11212 style: { flexGrow: "1" },
1672 11213 children: [
1673 11214 wrapIcon(icon, shouldShowPlaceholder),
1674 - /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components7.FlexBlock, { children }),
1675 - /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components7.Icon, { icon: (0, import_i18n3.isRTL)() ? chevron_left_small_default : chevron_right_small_default })
11215 + /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components5.FlexBlock, { children }),
11216 + /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11217 + import_components5.Icon,
11218 + {
11219 + icon: (0, import_i18n5.isRTL)() ? chevron_left_small_default : chevron_right_small_default
11220 + }
11221 + )
1676 11222 ]
1677 11223 }
1678 11224 )
1679 11225 }
@@ -1680,18 +11226,100 @@
1680 11226 );
1681 11227 }
1682 11228
1683 11229 // packages/boot/build-module/components/navigation/dropdown-item/index.mjs
1684 -var import_components8 = __toESM(require_components(), 1);
11230 +var import_components6 = __toESM(require_components(), 1);
1685 11231 var import_compose = __toESM(require_compose(), 1);
1686 -var import_data4 = __toESM(require_data(), 1);
1687 -var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
1688 -if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='608eff82f3']")) {
1689 - const style = document.createElement("style");
1690 - style.setAttribute("data-wp-hash", "608eff82f3");
1691 - style.appendChild(document.createTextNode(".boot-dropdown-item__children{display:flex;flex-direction:column;margin-block-end:2px;margin-block-start:-2px;margin-inline-start:30px;overflow:hidden;padding:2px}.boot-dropdown-item__chevron.is-up{transform:rotate(180deg)}"));
1692 - document.head.appendChild(style);
11232 +var import_data2 = __toESM(require_data(), 1);
11233 +var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
11234 +var STYLE_HASH_ATTRIBUTE19 = "data-wp-hash";
11235 +function getRuntime19() {
11236 + const globalScope = globalThis;
11237 + if (globalScope.__wpStyleRuntime) {
11238 + return globalScope.__wpStyleRuntime;
11239 + }
11240 + globalScope.__wpStyleRuntime = {
11241 + documents: /* @__PURE__ */ new Map(),
11242 + styles: /* @__PURE__ */ new Map(),
11243 + injectedStyles: /* @__PURE__ */ new WeakMap()
11244 + };
11245 + if (typeof document !== "undefined") {
11246 + registerDocument19(document);
11247 + }
11248 + return globalScope.__wpStyleRuntime;
1693 11249 }
11250 +function documentContainsStyleHash19(targetDocument, hash) {
11251 + if (!targetDocument.head) {
11252 + return false;
11253 + }
11254 + for (const style of targetDocument.head.querySelectorAll(
11255 + `style[${STYLE_HASH_ATTRIBUTE19}]`
11256 + )) {
11257 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE19) === hash) {
11258 + return true;
11259 + }
11260 + }
11261 + return false;
11262 +}
11263 +function injectStyle19(targetDocument, hash, css) {
11264 + if (!targetDocument.head) {
11265 + return;
11266 + }
11267 + const runtime = getRuntime19();
11268 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
11269 + if (!injectedStyles) {
11270 + injectedStyles = /* @__PURE__ */ new Set();
11271 + runtime.injectedStyles.set(targetDocument, injectedStyles);
11272 + }
11273 + if (injectedStyles.has(hash)) {
11274 + return;
11275 + }
11276 + if (documentContainsStyleHash19(targetDocument, hash)) {
11277 + injectedStyles.add(hash);
11278 + return;
11279 + }
11280 + const style = targetDocument.createElement("style");
11281 + style.setAttribute(STYLE_HASH_ATTRIBUTE19, hash);
11282 + style.appendChild(targetDocument.createTextNode(css));
11283 + targetDocument.head.appendChild(style);
11284 + injectedStyles.add(hash);
11285 +}
11286 +function registerDocument19(targetDocument) {
11287 + const runtime = getRuntime19();
11288 + runtime.documents.set(
11289 + targetDocument,
11290 + (runtime.documents.get(targetDocument) ?? 0) + 1
11291 + );
11292 + for (const [hash, css] of runtime.styles) {
11293 + injectStyle19(targetDocument, hash, css);
11294 + }
11295 + return () => {
11296 + const count = runtime.documents.get(targetDocument);
11297 + if (count === void 0) {
11298 + return;
11299 + }
11300 + if (count <= 1) {
11301 + runtime.documents.delete(targetDocument);
11302 + return;
11303 + }
11304 + runtime.documents.set(targetDocument, count - 1);
11305 + };
11306 +}
11307 +function registerStyle19(hash, css) {
11308 + const runtime = getRuntime19();
11309 + runtime.styles.set(hash, css);
11310 + for (const targetDocument of runtime.documents.keys()) {
11311 + injectStyle19(targetDocument, hash, css);
11312 + }
11313 +}
11314 +if (typeof process === "undefined" || true) {
11315 + registerStyle19("74796ab776", ".d5331ded354c389a__item.d5331ded354c389a__item{align-items:center;border:none;border-radius:var(--wpds-border-radius-sm,2px);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);display:flex;font-family:-apple-system,system-ui,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:var(--wpds-typography-font-weight-default,400);line-height:20px;margin-block-end:4px;margin-inline:12px;min-height:32px;padding-block:0;padding-inline:4px;width:calc(100% - 24px)}.d5331ded354c389a__item.d5331ded354c389a__item:focus,.d5331ded354c389a__item.d5331ded354c389a__item:hover,.d5331ded354c389a__item.d5331ded354c389a__item[aria-current=true]{color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}.d5331ded354c389a__item.d5331ded354c389a__item svg:last-child{padding:4px}.d5331ded354c389a__item.d5331ded354c389a__item[aria-current=page],.d5331ded354c389a__item.d5331ded354c389a__item[data-status=active]{color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));font-weight:var(--wpds-typography-font-weight-emphasis,600)}.d5331ded354c389a__item.d5331ded354c389a__item:focus-visible{transform:translateZ(0)}.d5331ded354c389a__item._44ce5374f19a05f7__is-compact{min-height:24px}");
11316 +}
11317 +var style_module_default3 = { "item": "d5331ded354c389a__item", "is-compact": "_44ce5374f19a05f7__is-compact" };
11318 +if (typeof process === "undefined" || true) {
11319 + registerStyle19("1a6b086e6c", "._093b894bfb82e8de__dropdown{display:block}._5954dba25ac6e16f__dropdown-children{display:flex;flex-direction:column;margin-block-end:2px;margin-block-start:-2px;margin-inline-start:30px;overflow:hidden;padding:2px}._9a14116ec9dae0e2__chevron.a9ebdaa3f36d6986__is-up{transform:rotate(180deg)}");
11320 +}
11321 +var style_module_default22 = { "dropdown": "_093b894bfb82e8de__dropdown", "dropdown-children": "_5954dba25ac6e16f__dropdown-children", "chevron": "_9a14116ec9dae0e2__chevron", "is-up": "a9ebdaa3f36d6986__is-up" };
1694 11322 var ANIMATION_DURATION = 0.2;
1695 11323 function DropdownItem({
1696 11324 className,
1697 11325 id,
@@ -1699,11 +11327,11 @@
1699 11327 children,
1700 11328 isExpanded,
1701 11329 onToggle
1702 11330 }) {
1703 - const menuItems = (0, import_data4.useSelect)(
11331 + const menuItems = (0, import_data2.useSelect)(
1704 11332 (select) => (
1705 - // @ts-ignore
11333 + // @ts-expect-error Store types are not available when selecting by store name.
1706 11334 select(STORE_NAME).getMenuItems()
1707 11335 ),
1708 11336 []
1709 11337 );
@@ -1708,13 +11336,13 @@
1708 11336 []
1709 11337 );
1710 11338 const items = menuItems.filter((item) => item.parent === id);
1711 11339 const disableMotion = (0, import_compose.useReducedMotion)();
1712 - return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "boot-dropdown-item", children: [
1713 - /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1714 - import_components8.__experimentalItem,
11340 + return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: style_module_default22.dropdown, children: [
11341 + /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11342 + import_components6.__experimentalItem,
1715 11343 {
1716 - className: clsx_default("boot-navigation-item", className),
11344 + className: clsx_default(style_module_default3.item, className),
1717 11345 onClick: (e) => {
1718 11346 e.preventDefault();
1719 11347 e.stopPropagation();
1720 11348 onToggle();
@@ -1719,10 +11347,10 @@
1719 11347 e.stopPropagation();
1720 11348 onToggle();
1721 11349 },
1722 11350 onMouseDown: (e) => e.preventDefault(),
1723 - children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1724 - import_components8.__experimentalHStack,
11351 + children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
11352 + import_components6.__experimentalHStack,
1725 11353 {
1726 11354 justify: "flex-start",
1727 11355 spacing: 2,
1728 11356 style: { flexGrow: "1" },
@@ -1727,15 +11355,15 @@
1727 11355 spacing: 2,
1728 11356 style: { flexGrow: "1" },
1729 11357 children: [
1730 11358 wrapIcon(icon, false),
1731 - /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components8.FlexBlock, { children }),
1732 - /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1733 - import_components8.Icon,
11359 + /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components6.FlexBlock, { children }),
11360 + /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11361 + import_components6.Icon,
1734 11362 {
1735 11363 icon: chevron_down_small_default,
1736 - className: clsx_default("boot-dropdown-item__chevron", {
1737 - "is-up": isExpanded
11364 + className: clsx_default(style_module_default22.chevron, {
11365 + [style_module_default22["is-up"]]: isExpanded
1738 11366 })
1739 11367 }
1740 11368 )
1741 11369 ]
@@ -1742,10 +11370,10 @@
1742 11370 }
1743 11371 )
1744 11372 }
1745 11373 ),
1746 - /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components8.__unstableAnimatePresence, { initial: false, children: isExpanded && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1747 - import_components8.__unstableMotion.div,
11374 + /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components6.__unstableAnimatePresence, { initial: false, children: isExpanded && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11375 + import_components6.__unstableMotion.div,
1748 11376 {
1749 11377 initial: { height: 0 },
1750 11378 animate: { height: "auto" },
1751 11379 exit: { height: 0 },
@@ -1753,17 +11381,18 @@
1753 11381 type: "tween",
1754 11382 duration: disableMotion ? 0 : ANIMATION_DURATION,
1755 11383 ease: "easeOut"
1756 11384 },
1757 - className: "boot-dropdown-item__children",
1758 - children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11385 + className: style_module_default22["dropdown-children"],
11386 + children: items.map((item, index2) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
1759 11387 NavigationItem,
1760 11388 {
11389 + className: style_module_default3["is-compact"],
1761 11390 to: item.to,
1762 11391 shouldShowPlaceholder: false,
1763 11392 children: item.label
1764 11393 },
1765 - index
11394 + index2
1766 11395 ))
1767 11396 }
1768 11397 ) })
1769 11398 ] });
@@ -1769,18 +11398,96 @@
1769 11398 ] });
1770 11399 }
1771 11400
1772 11401 // packages/boot/build-module/components/navigation/navigation-screen/index.mjs
1773 -var import_components9 = __toESM(require_components(), 1);
1774 -var import_i18n4 = __toESM(require_i18n(), 1);
11402 +var import_components7 = __toESM(require_components(), 1);
11403 +var import_i18n6 = __toESM(require_i18n(), 1);
1775 11404 var import_compose2 = __toESM(require_compose(), 1);
1776 -var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
1777 -if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='c5e42e1495']")) {
1778 - const style = document.createElement("style");
1779 - style.setAttribute("data-wp-hash", "c5e42e1495");
1780 - style.appendChild(document.createTextNode(".boot-navigation-screen{padding-block-end:4px}.boot-navigation-screen .components-text{color:var(--wpds-color-fg-content-neutral,#1e1e1e)}.boot-navigation-screen__title-icon{padding:12px 16px 8px;position:sticky;top:0}.boot-navigation-screen__title{flex-grow:1;overflow-wrap:break-word}.boot-navigation-screen__title.boot-navigation-screen__title,.boot-navigation-screen__title.boot-navigation-screen__title .boot-navigation-screen__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);line-height:32px}.boot-navigation-screen__actions{display:flex;flex-shrink:0}"));
1781 - document.head.appendChild(style);
11405 +var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
11406 +var STYLE_HASH_ATTRIBUTE20 = "data-wp-hash";
11407 +function getRuntime20() {
11408 + const globalScope = globalThis;
11409 + if (globalScope.__wpStyleRuntime) {
11410 + return globalScope.__wpStyleRuntime;
11411 + }
11412 + globalScope.__wpStyleRuntime = {
11413 + documents: /* @__PURE__ */ new Map(),
11414 + styles: /* @__PURE__ */ new Map(),
11415 + injectedStyles: /* @__PURE__ */ new WeakMap()
11416 + };
11417 + if (typeof document !== "undefined") {
11418 + registerDocument20(document);
11419 + }
11420 + return globalScope.__wpStyleRuntime;
1782 11421 }
11422 +function documentContainsStyleHash20(targetDocument, hash) {
11423 + if (!targetDocument.head) {
11424 + return false;
11425 + }
11426 + for (const style of targetDocument.head.querySelectorAll(
11427 + `style[${STYLE_HASH_ATTRIBUTE20}]`
11428 + )) {
11429 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE20) === hash) {
11430 + return true;
11431 + }
11432 + }
11433 + return false;
11434 +}
11435 +function injectStyle20(targetDocument, hash, css) {
11436 + if (!targetDocument.head) {
11437 + return;
11438 + }
11439 + const runtime = getRuntime20();
11440 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
11441 + if (!injectedStyles) {
11442 + injectedStyles = /* @__PURE__ */ new Set();
11443 + runtime.injectedStyles.set(targetDocument, injectedStyles);
11444 + }
11445 + if (injectedStyles.has(hash)) {
11446 + return;
11447 + }
11448 + if (documentContainsStyleHash20(targetDocument, hash)) {
11449 + injectedStyles.add(hash);
11450 + return;
11451 + }
11452 + const style = targetDocument.createElement("style");
11453 + style.setAttribute(STYLE_HASH_ATTRIBUTE20, hash);
11454 + style.appendChild(targetDocument.createTextNode(css));
11455 + targetDocument.head.appendChild(style);
11456 + injectedStyles.add(hash);
11457 +}
11458 +function registerDocument20(targetDocument) {
11459 + const runtime = getRuntime20();
11460 + runtime.documents.set(
11461 + targetDocument,
11462 + (runtime.documents.get(targetDocument) ?? 0) + 1
11463 + );
11464 + for (const [hash, css] of runtime.styles) {
11465 + injectStyle20(targetDocument, hash, css);
11466 + }
11467 + return () => {
11468 + const count = runtime.documents.get(targetDocument);
11469 + if (count === void 0) {
11470 + return;
11471 + }
11472 + if (count <= 1) {
11473 + runtime.documents.delete(targetDocument);
11474 + return;
11475 + }
11476 + runtime.documents.set(targetDocument, count - 1);
11477 + };
11478 +}
11479 +function registerStyle20(hash, css) {
11480 + const runtime = getRuntime20();
11481 + runtime.styles.set(hash, css);
11482 + for (const targetDocument of runtime.documents.keys()) {
11483 + injectStyle20(targetDocument, hash, css);
11484 + }
11485 +}
11486 +if (typeof process === "undefined" || true) {
11487 + registerStyle20("9bfc8fef50", ".c93eb5f7b870f29c__screen{padding-block-end:4px}.c93eb5f7b870f29c__screen .components-text{color:var(--wpds-color-foreground-content-neutral,#1e1e1e)}.bee113ef4a391bcd__title-icon{padding-block-end:8px;padding-block-start:12px;padding-inline-end:16px;padding-inline-start:16px;position:sticky;top:0}._2f6050d2407c9dee__title{flex-grow:1;overflow-wrap:break-word}._2f6050d2407c9dee__title._2f6050d2407c9dee__title,._2f6050d2407c9dee__title._2f6050d2407c9dee__title ._2f6050d2407c9dee__title{color:var(--wpds-color-foreground-content-neutral,#1e1e1e);line-height:32px}.e78f7a9cf7e91164__actions{display:flex;flex-shrink:0}");
11488 +}
11489 +var style_module_default4 = { "screen": "c93eb5f7b870f29c__screen", "title-icon": "bee113ef4a391bcd__title-icon", "title": "_2f6050d2407c9dee__title", "actions": "e78f7a9cf7e91164__actions" };
1783 11490 var ANIMATION_DURATION2 = 0.3;
1784 11491 var slideVariants = {
1785 11492 initial: (direction) => ({
1786 11493 x: direction === "forward" ? 100 : -100,
@@ -1806,18 +11513,18 @@
1806 11513 backButtonRef,
1807 11514 navigationKey,
1808 11515 onNavigate
1809 11516 }) {
1810 - const icon = (0, import_i18n4.isRTL)() ? chevron_right_default : chevron_left_default;
11517 + const icon = (0, import_i18n6.isRTL)() ? chevron_right_default : chevron_left_default;
1811 11518 const disableMotion = (0, import_compose2.useReducedMotion)();
1812 11519 const handleBackClick = (e) => {
1813 11520 e.preventDefault();
1814 11521 onNavigate({ id: backMenuItem, direction: "backward" });
1815 11522 };
1816 - return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
11523 + return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
1817 11524 "div",
1818 11525 {
1819 - className: "boot-navigation-screen",
11526 + className: style_module_default4.screen,
1820 11527 style: {
1821 11528 overflow: "hidden",
1822 11529 position: "relative",
1823 11530 display: "grid",
@@ -1823,10 +11530,10 @@
1823 11530 display: "grid",
1824 11531 gridTemplateColumns: "1fr",
1825 11532 gridTemplateRows: "1fr"
1826 11533 },
1827 - children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components9.__unstableAnimatePresence, { initial: false, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1828 - import_components9.__unstableMotion.div,
11534 + children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components7.__unstableAnimatePresence, { initial: false, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
11535 + import_components7.__unstableMotion.div,
1829 11536 {
1830 11537 custom: animationDirection,
1831 11538 variants: slideVariants,
1832 11539 initial: "initial",
@@ -1842,39 +11549,32 @@
1842 11549 gridColumn: "1",
1843 11550 gridRow: "1"
1844 11551 },
1845 11552 children: [
1846 - /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1847 - import_components9.__experimentalHStack,
1848 - {
1849 - spacing: 2,
1850 - className: "boot-navigation-screen__title-icon",
1851 - children: [
1852 - !isRoot && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1853 - import_components9.Button,
1854 - {
1855 - ref: backButtonRef,
1856 - icon,
1857 - onClick: handleBackClick,
1858 - label: (0, import_i18n4.__)("Back"),
1859 - size: "small",
1860 - variant: "tertiary"
1861 - }
1862 - ),
1863 - /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1864 - import_components9.__experimentalHeading,
1865 - {
1866 - className: "boot-navigation-screen__title",
1867 - level: 1,
1868 - size: "15px",
1869 - children: title
1870 - }
1871 - ),
1872 - actions && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "boot-navigation-screen__actions", children: actions })
1873 - ]
1874 - }
1875 - ),
1876 - description && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "boot-navigation-screen__description", children: description }),
11553 + /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_components7.__experimentalHStack, { spacing: 2, className: style_module_default4["title-icon"], children: [
11554 + !isRoot && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
11555 + import_components7.Button,
11556 + {
11557 + ref: backButtonRef,
11558 + icon,
11559 + onClick: handleBackClick,
11560 + label: (0, import_i18n6.__)("Back"),
11561 + size: "small",
11562 + variant: "tertiary"
11563 + }
11564 + ),
11565 + /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
11566 + import_components7.__experimentalHeading,
11567 + {
11568 + className: style_module_default4.title,
11569 + level: 1,
11570 + size: "15px",
11571 + children: title
11572 + }
11573 + ),
11574 + actions && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: style_module_default4.actions, children: actions })
11575 + ] }),
11576 + description && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { children: description }),
1877 11577 content
1878 11578 ]
1879 11579 },
1880 11580 navigationKey
@@ -1883,11 +11583,11 @@
1883 11583 );
1884 11584 }
1885 11585
1886 11586 // packages/boot/build-module/components/navigation/use-sidebar-parent.mjs
1887 -var import_element7 = __toESM(require_element(), 1);
1888 -var import_data5 = __toESM(require_data(), 1);
1889 -import { privateApis as routePrivateApis3 } from "@wordpress/route";
11587 +var import_element30 = __toESM(require_element(), 1);
11588 +var import_data3 = __toESM(require_data(), 1);
11589 +import { privateApis as routePrivateApis2 } from "@wordpress/route";
1890 11590
1891 11591 // packages/boot/build-module/components/navigation/path-matching.mjs
1892 11592 var isValidParentPath = (currentPath, menuPath) => {
1893 11593 if (!menuPath || menuPath === currentPath) {
@@ -1961,15 +11661,15 @@
1961 11661 return void 0;
1962 11662 };
1963 11663
1964 11664 // packages/boot/build-module/components/navigation/use-sidebar-parent.mjs
1965 -var { useRouter: useRouter2, useMatches } = unlock(routePrivateApis3);
11665 +var { useRouter, useMatches } = unlock2(routePrivateApis2);
1966 11666 function useSidebarParent() {
1967 11667 const matches = useMatches();
1968 - const router = useRouter2();
1969 - const menuItems = (0, import_data5.useSelect)(
11668 + const router = useRouter();
11669 + const menuItems = (0, import_data3.useSelect)(
1970 11670 (select) => (
1971 - // @ts-ignore
11671 + // @ts-expect-error Store types are not available when selecting by store name.
1972 11672 select(STORE_NAME).getMenuItems()
1973 11673 ),
1974 11674 []
1975 11675 );
@@ -1976,13 +11676,13 @@
1976 11676 const currentPath = matches[matches.length - 1].pathname.slice(
1977 11677 router.options.basepath?.length ?? 0
1978 11678 );
1979 11679 const currentMenuItem = findClosestMenuItem(currentPath, menuItems);
1980 - const [parentId, setParentId] = (0, import_element7.useState)(
11680 + const [parentId, setParentId] = (0, import_element30.useState)(
1981 11681 findDrilldownParent(currentMenuItem?.id, menuItems)
1982 11682 );
1983 - const [parentDropdownId, setParentDropdownId] = (0, import_element7.useState)(findDropdownParent(currentMenuItem?.id, menuItems));
1984 - (0, import_element7.useEffect)(() => {
11683 + const [parentDropdownId, setParentDropdownId] = (0, import_element30.useState)(findDropdownParent(currentMenuItem?.id, menuItems));
11684 + (0, import_element30.useEffect)(() => {
1985 11685 const matchedMenuItem = findClosestMenuItem(currentPath, menuItems);
1986 11686 const updatedParentId = findDrilldownParent(
1987 11687 matchedMenuItem?.id,
1988 11688 menuItems
@@ -2002,21 +11702,21 @@
2002 11702 ];
2003 11703 }
2004 11704
2005 11705 // packages/boot/build-module/components/navigation/index.mjs
2006 -var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
2007 -function Navigation() {
2008 - const backButtonRef = (0, import_element8.useRef)(null);
2009 - const [animationDirection, setAnimationDirection] = (0, import_element8.useState)(null);
11706 +var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
11707 +function Navigation2() {
11708 + const backButtonRef = (0, import_element31.useRef)(null);
11709 + const [animationDirection, setAnimationDirection] = (0, import_element31.useState)(null);
2010 11710 const [parentId, setParentId, parentDropdownId, setParentDropdownId] = useSidebarParent();
2011 - const menuItems = (0, import_data6.useSelect)(
11711 + const menuItems = (0, import_data4.useSelect)(
2012 11712 (select) => (
2013 - // @ts-ignore
11713 + // @ts-expect-error Store types are not available when selecting by store name.
2014 11714 select(STORE_NAME).getMenuItems()
2015 11715 ),
2016 11716 []
2017 11717 );
2018 - const parent = (0, import_element8.useMemo)(
11718 + const parent = (0, import_element31.useMemo)(
2019 11719 () => menuItems.find((item) => item.id === parentId),
2020 11720 [menuItems, parentId]
2021 11721 );
2022 11722 const navigationKey = parent ? `drilldown-${parent.id}` : "root";
@@ -2031,14 +11731,14 @@
2031 11731 setParentDropdownId(
2032 11732 parentDropdownId === dropdownId ? void 0 : dropdownId
2033 11733 );
2034 11734 };
2035 - const items = (0, import_element8.useMemo)(
11735 + const items = (0, import_element31.useMemo)(
2036 11736 () => menuItems.filter((item) => item.parent === parentId),
2037 11737 [menuItems, parentId]
2038 11738 );
2039 11739 const hasRealIcons = items.some((item) => !!item.icon);
2040 - return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
11740 + return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2041 11741 NavigationScreen,
2042 11742 {
2043 11743 isRoot: !parent,
2044 11744 title: parent ? parent.label : "",
@@ -2046,15 +11746,14 @@
2046 11746 backButtonRef,
2047 11747 animationDirection: animationDirection || void 0,
2048 11748 navigationKey,
2049 11749 onNavigate: handleNavigate,
2050 - content: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_jsx_runtime23.Fragment, { children: items.map((item) => {
11750 + content: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { role: "list", children: items.map((item) => {
2051 11751 if (item.parent_type === "dropdown") {
2052 - return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
11752 + return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2053 11753 DropdownItem,
2054 11754 {
2055 11755 id: item.id,
2056 - className: "boot-navigation-item",
2057 11756 icon: item.icon,
2058 11757 shouldShowPlaceholder: hasRealIcons,
2059 11758 isExpanded: parentDropdownId === item.id,
2060 11759 onToggle: () => handleDropdownToggle(item.id),
@@ -2063,9 +11762,9 @@
2063 11762 item.id
2064 11763 );
2065 11764 }
2066 11765 if (item.parent_type === "drilldown") {
2067 - return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
11766 + return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2068 11767 DrilldownItem,
2069 11768 {
2070 11769 id: item.id,
2071 11770 icon: item.icon,
@@ -2075,9 +11774,9 @@
2075 11774 },
2076 11775 item.id
2077 11776 );
2078 11777 }
2079 - return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
11778 + return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2080 11779 NavigationItem,
2081 11780 {
2082 11781 to: item.to,
2083 11782 icon: item.icon,
@@ -2089,41 +11788,41 @@
2089 11788 }) })
2090 11789 }
2091 11790 );
2092 11791 }
2093 -var navigation_default = Navigation;
11792 +var navigation_default2 = Navigation2;
2094 11793
2095 11794 // packages/boot/build-module/components/save-button/index.mjs
2096 -var import_element10 = __toESM(require_element(), 1);
2097 -var import_data8 = __toESM(require_data(), 1);
2098 -var import_i18n6 = __toESM(require_i18n(), 1);
2099 -var import_core_data4 = __toESM(require_core_data(), 1);
2100 -var import_keycodes2 = __toESM(require_keycodes(), 1);
11795 +var import_element33 = __toESM(require_element(), 1);
11796 +var import_data6 = __toESM(require_data(), 1);
11797 +var import_i18n8 = __toESM(require_i18n(), 1);
11798 +var import_core_data2 = __toESM(require_core_data(), 1);
11799 +var import_keycodes = __toESM(require_keycodes(), 1);
2101 11800 var import_editor2 = __toESM(require_editor(), 1);
2102 -var import_components10 = __toESM(require_components(), 1);
11801 +var import_components8 = __toESM(require_components(), 1);
2103 11802
2104 11803 // packages/boot/build-module/components/save-panel/use-save-shortcut.mjs
2105 -var import_element9 = __toESM(require_element(), 1);
11804 +var import_element32 = __toESM(require_element(), 1);
2106 11805 var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);
2107 -var import_i18n5 = __toESM(require_i18n(), 1);
2108 -var import_data7 = __toESM(require_data(), 1);
2109 -var import_core_data3 = __toESM(require_core_data(), 1);
11806 +var import_i18n7 = __toESM(require_i18n(), 1);
11807 +var import_data5 = __toESM(require_data(), 1);
11808 +var import_core_data = __toESM(require_core_data(), 1);
2110 11809 var import_editor = __toESM(require_editor(), 1);
2111 11810 var shortcutName = "core/boot/save";
2112 11811 function useSaveShortcut({
2113 11812 openSavePanel
2114 11813 }) {
2115 - const { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } = (0, import_data7.useSelect)(import_core_data3.store);
2116 - const { hasNonPostEntityChanges, isPostSavingLocked } = (0, import_data7.useSelect)(import_editor.store);
2117 - const { savePost } = (0, import_data7.useDispatch)(import_editor.store);
2118 - const { registerShortcut, unregisterShortcut } = (0, import_data7.useDispatch)(
11814 + const { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } = (0, import_data5.useSelect)(import_core_data.store);
11815 + const { hasNonPostEntityChanges, isPostSavingLocked } = (0, import_data5.useSelect)(import_editor.store);
11816 + const { savePost } = (0, import_data5.useDispatch)(import_editor.store);
11817 + const { registerShortcut, unregisterShortcut } = (0, import_data5.useDispatch)(
2119 11818 import_keyboard_shortcuts.store
2120 11819 );
2121 - (0, import_element9.useEffect)(() => {
11820 + (0, import_element32.useEffect)(() => {
2122 11821 registerShortcut({
2123 11822 name: shortcutName,
2124 11823 category: "global",
2125 - description: (0, import_i18n5.__)("Save your changes."),
11824 + description: (0, import_i18n7.__)("Save your changes."),
2126 11825 keyCombination: {
2127 11826 modifier: "primary",
2128 11827 character: "s"
2129 11828 }
@@ -2150,19 +11849,97 @@
2150 11849 });
2151 11850 }
2152 11851
2153 11852 // packages/boot/build-module/components/save-button/index.mjs
2154 -var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
2155 -if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='294e36b777']")) {
2156 - const style = document.createElement("style");
2157 - style.setAttribute("data-wp-hash", "294e36b777");
2158 - style.appendChild(document.createTextNode(".boot-save-button{width:100%}"));
2159 - document.head.appendChild(style);
11853 +var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
11854 +var STYLE_HASH_ATTRIBUTE21 = "data-wp-hash";
11855 +function getRuntime21() {
11856 + const globalScope = globalThis;
11857 + if (globalScope.__wpStyleRuntime) {
11858 + return globalScope.__wpStyleRuntime;
11859 + }
11860 + globalScope.__wpStyleRuntime = {
11861 + documents: /* @__PURE__ */ new Map(),
11862 + styles: /* @__PURE__ */ new Map(),
11863 + injectedStyles: /* @__PURE__ */ new WeakMap()
11864 + };
11865 + if (typeof document !== "undefined") {
11866 + registerDocument21(document);
11867 + }
11868 + return globalScope.__wpStyleRuntime;
2160 11869 }
11870 +function documentContainsStyleHash21(targetDocument, hash) {
11871 + if (!targetDocument.head) {
11872 + return false;
11873 + }
11874 + for (const style of targetDocument.head.querySelectorAll(
11875 + `style[${STYLE_HASH_ATTRIBUTE21}]`
11876 + )) {
11877 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE21) === hash) {
11878 + return true;
11879 + }
11880 + }
11881 + return false;
11882 +}
11883 +function injectStyle21(targetDocument, hash, css) {
11884 + if (!targetDocument.head) {
11885 + return;
11886 + }
11887 + const runtime = getRuntime21();
11888 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
11889 + if (!injectedStyles) {
11890 + injectedStyles = /* @__PURE__ */ new Set();
11891 + runtime.injectedStyles.set(targetDocument, injectedStyles);
11892 + }
11893 + if (injectedStyles.has(hash)) {
11894 + return;
11895 + }
11896 + if (documentContainsStyleHash21(targetDocument, hash)) {
11897 + injectedStyles.add(hash);
11898 + return;
11899 + }
11900 + const style = targetDocument.createElement("style");
11901 + style.setAttribute(STYLE_HASH_ATTRIBUTE21, hash);
11902 + style.appendChild(targetDocument.createTextNode(css));
11903 + targetDocument.head.appendChild(style);
11904 + injectedStyles.add(hash);
11905 +}
11906 +function registerDocument21(targetDocument) {
11907 + const runtime = getRuntime21();
11908 + runtime.documents.set(
11909 + targetDocument,
11910 + (runtime.documents.get(targetDocument) ?? 0) + 1
11911 + );
11912 + for (const [hash, css] of runtime.styles) {
11913 + injectStyle21(targetDocument, hash, css);
11914 + }
11915 + return () => {
11916 + const count = runtime.documents.get(targetDocument);
11917 + if (count === void 0) {
11918 + return;
11919 + }
11920 + if (count <= 1) {
11921 + runtime.documents.delete(targetDocument);
11922 + return;
11923 + }
11924 + runtime.documents.set(targetDocument, count - 1);
11925 + };
11926 +}
11927 +function registerStyle21(hash, css) {
11928 + const runtime = getRuntime21();
11929 + runtime.styles.set(hash, css);
11930 + for (const targetDocument of runtime.documents.keys()) {
11931 + injectStyle21(targetDocument, hash, css);
11932 + }
11933 +}
11934 +if (typeof process === "undefined" || true) {
11935 + registerStyle21("1c6bdcf0b8", "._9c7a13851fe5f446__save-button{width:100%}._266ea24d4569bd10__shortcut:not(:first-child){margin-inline-start:8px}");
11936 +}
11937 +var style_module_default5 = { "save-button": "_9c7a13851fe5f446__save-button", "shortcut": "_266ea24d4569bd10__shortcut" };
2161 11938 function SaveButton() {
2162 - const [isSaveViewOpen, setIsSaveViewOpened] = (0, import_element10.useState)(false);
2163 - const { isSaving, dirtyEntityRecordsCount } = (0, import_data8.useSelect)((select) => {
2164 - const { isSavingEntityRecord, __experimentalGetDirtyEntityRecords } = select(import_core_data4.store);
11939 + const [isSaveViewOpen, setIsSaveViewOpened] = (0, import_element33.useState)(false);
11940 + const { isSaving, dirtyEntityRecordsCount } = (0, import_data6.useSelect)((select) => {
11941 + const { isSavingEntityRecord, __experimentalGetDirtyEntityRecords } = select(import_core_data2.store);
2165 11942 const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
2166 11943 return {
2167 11944 isSaving: dirtyEntityRecords.some(
2168 11945 (record) => isSavingEntityRecord(record.kind, record.name, record.key)
@@ -2169,16 +11946,16 @@
2169 11946 ),
2170 11947 dirtyEntityRecordsCount: dirtyEntityRecords.length
2171 11948 };
2172 11949 }, []);
2173 - const [showSavedState, setShowSavedState] = (0, import_element10.useState)(false);
2174 - (0, import_element10.useEffect)(() => {
11950 + const [showSavedState, setShowSavedState] = (0, import_element33.useState)(false);
11951 + (0, import_element33.useEffect)(() => {
2175 11952 if (isSaving) {
2176 11953 setShowSavedState(true);
2177 11954 }
2178 11955 }, [isSaving]);
2179 11956 const hasChanges = dirtyEntityRecordsCount > 0;
2180 - (0, import_element10.useEffect)(() => {
11957 + (0, import_element33.useEffect)(() => {
2181 11958 if (!isSaving && hasChanges) {
2182 11959 setShowSavedState(false);
2183 11960 }
2184 11961 }, [isSaving, hasChanges]);
@@ -2188,22 +11965,30 @@
2188 11965 }
2189 11966 }
2190 11967 const shouldShowButton = hasChanges || showSavedState;
2191 11968 useSaveShortcut({ openSavePanel: () => setIsSaveViewOpened(true) });
11969 + const shortcut = {
11970 + displayShortcut: import_keycodes.displayShortcut.primary("s"),
11971 + ariaKeyShortcut: import_keycodes.ariaKeyShortcut.primary("s"),
11972 + label: import_keycodes.shortcutAriaLabel.primary("s")
11973 + };
11974 + const { descriptionId, targetProps } = useKeyboardShortcutProps({
11975 + shortcut
11976 + });
2192 11977 if (!shouldShowButton) {
2193 11978 return null;
2194 11979 }
2195 11980 const isInSavedState = showSavedState && !hasChanges;
2196 - const disabled = isSaving || isInSavedState;
11981 + const disabled2 = isSaving || isInSavedState;
2197 11982 const getLabel = () => {
2198 11983 if (isInSavedState) {
2199 - return (0, import_i18n6.__)("Saved");
11984 + return (0, import_i18n8.__)("Saved");
2200 11985 }
2201 - return (0, import_i18n6.sprintf)(
11986 + return (0, import_i18n8.sprintf)(
2202 11987 // translators: %d: number of unsaved changes (number).
2203 - (0, import_i18n6._n)(
2204 - "Review %d change\u2026",
2205 - "Review %d changes\u2026",
11988 + (0, import_i18n8._n)(
11989 + "Review %d change…",
11990 + "Review %d changes…",
2206 11991 dirtyEntityRecordsCount
2207 11992 ),
2208 11993 dirtyEntityRecordsCount
2209 11994 );
@@ -2208,39 +11993,58 @@
2208 11993 dirtyEntityRecordsCount
2209 11994 );
2210 11995 };
2211 11996 const label = getLabel();
2212 - return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
2213 - /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2214 - import_components10.Tooltip,
2215 - {
2216 - text: hasChanges ? label : void 0,
2217 - shortcut: import_keycodes2.displayShortcut.primary("s"),
2218 - children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2219 - import_components10.Button,
11997 + return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
11998 + /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(tooltip_exports.Root, { children: [
11999 + /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
12000 + tooltip_exports.Trigger,
12001 + {
12002 + ...targetProps,
12003 + render: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12004 + import_components8.Button,
12005 + {
12006 + variant: "primary",
12007 + size: "compact",
12008 + onClick: () => setIsSaveViewOpened(true),
12009 + onBlur: hideSavedState,
12010 + disabled: disabled2,
12011 + accessibleWhenDisabled: true,
12012 + isBusy: isSaving,
12013 + className: style_module_default5["save-button"],
12014 + icon: isInSavedState ? check_default : void 0
12015 + }
12016 + ),
12017 + children: [
12018 + label,
12019 + descriptionId && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12020 + KeyboardShortcutDescription,
12021 + {
12022 + descriptionId,
12023 + shortcut
12024 + }
12025 + )
12026 + ]
12027 + }
12028 + ),
12029 + /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(tooltip_exports.Popup, { children: [
12030 + hasChanges && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { children: label }),
12031 + /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12032 + KeyboardShortcutDisplay,
2220 12033 {
2221 - variant: "primary",
2222 - size: "compact",
2223 - onClick: () => setIsSaveViewOpened(true),
2224 - onBlur: hideSavedState,
2225 - disabled,
2226 - accessibleWhenDisabled: true,
2227 - isBusy: isSaving,
2228 - "aria-keyshortcuts": import_keycodes2.rawShortcut.primary("s"),
2229 - className: "boot-save-button",
2230 - icon: isInSavedState ? check_default : void 0,
2231 - children: label
12034 + className: style_module_default5.shortcut,
12035 + shortcut
2232 12036 }
2233 12037 )
2234 - }
2235 - ),
2236 - isSaveViewOpen && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2237 - import_components10.Modal,
12038 + ] })
12039 + ] }),
12040 + isSaveViewOpen && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12041 + import_components8.Modal,
2238 12042 {
2239 - title: (0, import_i18n6.__)("Review changes"),
12043 + title: (0, import_i18n8.__)("Review changes"),
2240 12044 onRequestClose: () => setIsSaveViewOpened(false),
2241 12045 size: "small",
2242 - children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
12046 + children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
2243 12047 import_editor2.EntitiesSavedStates,
2244 12048 {
2245 12049 close: () => setIsSaveViewOpened(false),
2246 12050 variant: "inline"
@@ -2251,31 +12055,210 @@
2251 12055 ] });
2252 12056 }
2253 12057
2254 12058 // packages/boot/build-module/components/sidebar/index.mjs
2255 -var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
2256 -if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='6064f6f183']")) {
2257 - const style = document.createElement("style");
2258 - style.setAttribute("data-wp-hash", "6064f6f183");
2259 - style.appendChild(document.createTextNode(".boot-sidebar__scrollable{display:flex;flex-direction:column;height:100%;overflow:auto;position:relative}.boot-sidebar__content{contain:content;flex-grow:1;position:relative}.boot-sidebar__footer{padding:16px 8px 8px 16px}"));
2260 - document.head.appendChild(style);
12059 +var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
12060 +var STYLE_HASH_ATTRIBUTE22 = "data-wp-hash";
12061 +function getRuntime22() {
12062 + const globalScope = globalThis;
12063 + if (globalScope.__wpStyleRuntime) {
12064 + return globalScope.__wpStyleRuntime;
12065 + }
12066 + globalScope.__wpStyleRuntime = {
12067 + documents: /* @__PURE__ */ new Map(),
12068 + styles: /* @__PURE__ */ new Map(),
12069 + injectedStyles: /* @__PURE__ */ new WeakMap()
12070 + };
12071 + if (typeof document !== "undefined") {
12072 + registerDocument22(document);
12073 + }
12074 + return globalScope.__wpStyleRuntime;
2261 12075 }
12076 +function documentContainsStyleHash22(targetDocument, hash) {
12077 + if (!targetDocument.head) {
12078 + return false;
12079 + }
12080 + for (const style of targetDocument.head.querySelectorAll(
12081 + `style[${STYLE_HASH_ATTRIBUTE22}]`
12082 + )) {
12083 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE22) === hash) {
12084 + return true;
12085 + }
12086 + }
12087 + return false;
12088 +}
12089 +function injectStyle22(targetDocument, hash, css) {
12090 + if (!targetDocument.head) {
12091 + return;
12092 + }
12093 + const runtime = getRuntime22();
12094 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
12095 + if (!injectedStyles) {
12096 + injectedStyles = /* @__PURE__ */ new Set();
12097 + runtime.injectedStyles.set(targetDocument, injectedStyles);
12098 + }
12099 + if (injectedStyles.has(hash)) {
12100 + return;
12101 + }
12102 + if (documentContainsStyleHash22(targetDocument, hash)) {
12103 + injectedStyles.add(hash);
12104 + return;
12105 + }
12106 + const style = targetDocument.createElement("style");
12107 + style.setAttribute(STYLE_HASH_ATTRIBUTE22, hash);
12108 + style.appendChild(targetDocument.createTextNode(css));
12109 + targetDocument.head.appendChild(style);
12110 + injectedStyles.add(hash);
12111 +}
12112 +function registerDocument22(targetDocument) {
12113 + const runtime = getRuntime22();
12114 + runtime.documents.set(
12115 + targetDocument,
12116 + (runtime.documents.get(targetDocument) ?? 0) + 1
12117 + );
12118 + for (const [hash, css] of runtime.styles) {
12119 + injectStyle22(targetDocument, hash, css);
12120 + }
12121 + return () => {
12122 + const count = runtime.documents.get(targetDocument);
12123 + if (count === void 0) {
12124 + return;
12125 + }
12126 + if (count <= 1) {
12127 + runtime.documents.delete(targetDocument);
12128 + return;
12129 + }
12130 + runtime.documents.set(targetDocument, count - 1);
12131 + };
12132 +}
12133 +function registerStyle22(hash, css) {
12134 + const runtime = getRuntime22();
12135 + runtime.styles.set(hash, css);
12136 + for (const targetDocument of runtime.documents.keys()) {
12137 + injectStyle22(targetDocument, hash, css);
12138 + }
12139 +}
12140 +if (typeof process === "undefined" || true) {
12141 + registerStyle22("2f8ba86269", "._52f77809bed01e5e__scrollable{display:flex;flex-direction:column;height:100%;overflow:auto;position:relative}._6d2e23af506664fb__content{contain:content;flex-grow:1;position:relative}.c95a8ac9c6876d6e__footer{padding-block-end:8px;padding-block-start:16px;padding-inline-end:8px;padding-inline-start:16px}._28ec24681975e557__back-button{margin-block-end:8px;margin-block-start:16px;margin-inline-end:12px;margin-inline-start:12px}");
12142 +}
12143 +var style_module_default6 = { "scrollable": "_52f77809bed01e5e__scrollable", "content": "_6d2e23af506664fb__content", "footer": "c95a8ac9c6876d6e__footer", "back-button": "_28ec24681975e557__back-button" };
12144 +function DashboardBackButton() {
12145 + const dashboardLink = (0, import_data7.useSelect)(
12146 + (select) => select(store).getDashboardLink(),
12147 + []
12148 + );
12149 + return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12150 + import_components9.Button,
12151 + {
12152 + __next40pxDefaultSize: true,
12153 + className: style_module_default6["back-button"],
12154 + href: dashboardLink || "/",
12155 + icon: (0, import_i18n9.isRTL)() ? chevron_right_default : chevron_left_default,
12156 + label: (0, import_i18n9.__)("Go to the Dashboard"),
12157 + children: (0, import_i18n9.__)("Dashboard")
12158 + }
12159 + );
12160 +}
2262 12161 function Sidebar() {
2263 - return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "boot-sidebar__scrollable", children: [
2264 - /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(site_hub_default, {}),
2265 - /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "boot-sidebar__content", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(navigation_default, {}) }),
2266 - /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "boot-sidebar__footer", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SaveButton, {}) })
12162 + return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: style_module_default6.scrollable, children: [
12163 + /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DashboardBackButton, {}),
12164 + /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: style_module_default6.content, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(navigation_default2, {}) }),
12165 + /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: style_module_default6.footer, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SaveButton, {}) })
2267 12166 ] });
2268 12167 }
2269 12168
2270 12169 // packages/boot/build-module/components/save-panel/index.mjs
2271 -var import_element11 = __toESM(require_element(), 1);
2272 -var import_components11 = __toESM(require_components(), 1);
12170 +var import_element34 = __toESM(require_element(), 1);
12171 +var import_components10 = __toESM(require_components(), 1);
2273 12172 var import_editor3 = __toESM(require_editor(), 1);
2274 -var import_i18n7 = __toESM(require_i18n(), 1);
2275 -var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
12173 +var import_i18n10 = __toESM(require_i18n(), 1);
12174 +var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
12175 +var STYLE_HASH_ATTRIBUTE23 = "data-wp-hash";
12176 +function getRuntime23() {
12177 + const globalScope = globalThis;
12178 + if (globalScope.__wpStyleRuntime) {
12179 + return globalScope.__wpStyleRuntime;
12180 + }
12181 + globalScope.__wpStyleRuntime = {
12182 + documents: /* @__PURE__ */ new Map(),
12183 + styles: /* @__PURE__ */ new Map(),
12184 + injectedStyles: /* @__PURE__ */ new WeakMap()
12185 + };
12186 + if (typeof document !== "undefined") {
12187 + registerDocument23(document);
12188 + }
12189 + return globalScope.__wpStyleRuntime;
12190 +}
12191 +function documentContainsStyleHash23(targetDocument, hash) {
12192 + if (!targetDocument.head) {
12193 + return false;
12194 + }
12195 + for (const style of targetDocument.head.querySelectorAll(
12196 + `style[${STYLE_HASH_ATTRIBUTE23}]`
12197 + )) {
12198 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE23) === hash) {
12199 + return true;
12200 + }
12201 + }
12202 + return false;
12203 +}
12204 +function injectStyle23(targetDocument, hash, css) {
12205 + if (!targetDocument.head) {
12206 + return;
12207 + }
12208 + const runtime = getRuntime23();
12209 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
12210 + if (!injectedStyles) {
12211 + injectedStyles = /* @__PURE__ */ new Set();
12212 + runtime.injectedStyles.set(targetDocument, injectedStyles);
12213 + }
12214 + if (injectedStyles.has(hash)) {
12215 + return;
12216 + }
12217 + if (documentContainsStyleHash23(targetDocument, hash)) {
12218 + injectedStyles.add(hash);
12219 + return;
12220 + }
12221 + const style = targetDocument.createElement("style");
12222 + style.setAttribute(STYLE_HASH_ATTRIBUTE23, hash);
12223 + style.appendChild(targetDocument.createTextNode(css));
12224 + targetDocument.head.appendChild(style);
12225 + injectedStyles.add(hash);
12226 +}
12227 +function registerDocument23(targetDocument) {
12228 + const runtime = getRuntime23();
12229 + runtime.documents.set(
12230 + targetDocument,
12231 + (runtime.documents.get(targetDocument) ?? 0) + 1
12232 + );
12233 + for (const [hash, css] of runtime.styles) {
12234 + injectStyle23(targetDocument, hash, css);
12235 + }
12236 + return () => {
12237 + const count = runtime.documents.get(targetDocument);
12238 + if (count === void 0) {
12239 + return;
12240 + }
12241 + if (count <= 1) {
12242 + runtime.documents.delete(targetDocument);
12243 + return;
12244 + }
12245 + runtime.documents.set(targetDocument, count - 1);
12246 + };
12247 +}
12248 +function registerStyle23(hash, css) {
12249 + const runtime = getRuntime23();
12250 + runtime.styles.set(hash, css);
12251 + for (const targetDocument of runtime.documents.keys()) {
12252 + injectStyle23(targetDocument, hash, css);
12253 + }
12254 +}
12255 +if (typeof process === "undefined" || true) {
12256 + registerStyle23("df1a59bc40", "@media (min-width:600px){._77efcb9ca06f5774__modal{width:600px}}");
12257 +}
12258 +var style_module_default7 = { "modal": "_77efcb9ca06f5774__modal" };
2276 12259 function SavePanel() {
2277 - const [isOpen, setIsOpen] = (0, import_element11.useState)(false);
12260 + const [isOpen, setIsOpen] = (0, import_element34.useState)(false);
2278 12261 useSaveShortcut({
2279 12262 openSavePanel: () => setIsOpen(true)
2280 12263 });
2281 12264 if (!isOpen) {
@@ -2280,16 +12263,16 @@
2280 12263 });
2281 12264 if (!isOpen) {
2282 12265 return false;
2283 12266 }
2284 - return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2285 - import_components11.Modal,
12267 + return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12268 + import_components10.Modal,
2286 12269 {
2287 - className: "edit-site-save-panel__modal",
12270 + className: style_module_default7.modal,
2288 12271 onRequestClose: () => setIsOpen(false),
2289 - title: (0, import_i18n7.__)("Review changes"),
12272 + title: (0, import_i18n10.__)("Review changes"),
2290 12273 size: "small",
2291 - children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
12274 + children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
2292 12275 import_editor3.EntitiesSavedStates,
2293 12276 {
2294 12277 close: () => setIsOpen(false),
2295 12278 variant: "inline"
@@ -2299,39 +12282,23 @@
2299 12282 );
2300 12283 }
2301 12284
2302 12285 // packages/boot/build-module/components/canvas-renderer/index.mjs
2303 -var import_element13 = __toESM(require_element(), 1);
12286 +var import_element37 = __toESM(require_element(), 1);
2304 12287
2305 12288 // packages/boot/build-module/components/canvas/index.mjs
2306 -var import_element12 = __toESM(require_element(), 1);
2307 -var import_components13 = __toESM(require_components(), 1);
2308 -import { useNavigate } from "@wordpress/route";
12289 +var import_element36 = __toESM(require_element(), 1);
12290 +var import_components12 = __toESM(require_components(), 1);
12291 +var import_i18n14 = __toESM(require_i18n(), 1);
12292 +var import_data10 = __toESM(require_data(), 1);
12293 +var import_core_data5 = __toESM(require_core_data(), 1);
12294 +import { useNavigate as useNavigate2, useSearch as useSearch2 } from "@wordpress/route";
2309 12295
2310 12296 // packages/boot/build-module/components/canvas/back-button.mjs
2311 -var import_components12 = __toESM(require_components(), 1);
2312 -var import_compose3 = __toESM(require_compose(), 1);
2313 -var import_i18n8 = __toESM(require_i18n(), 1);
2314 -var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
2315 -if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='c8750e18d1']")) {
2316 - const style = document.createElement("style");
2317 - style.setAttribute("data-wp-hash", "c8750e18d1");
2318 - style.appendChild(document.createTextNode(".boot-canvas-back-button{height:64px;left:0;position:absolute;top:0;width:64px;z-index:100}.boot-canvas-back-button__container{height:100%;position:relative;width:100%}.boot-canvas-back-button__link.components-button{align-items:center;background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);border-radius:0;display:inline-flex;height:64px;justify-content:center;padding:0;text-decoration:none;width:64px}@media not (prefers-reduced-motion){.boot-canvas-back-button__link.components-button{transition:outline .1s ease-out}}.boot-canvas-back-button__link.components-button:focus:not(:active){outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-offset:calc(var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px))*-1)}.boot-canvas-back-button__icon{align-items:center;background-color:#ccc;display:flex;height:64px;justify-content:center;left:0;pointer-events:none;position:absolute;top:0;width:64px}.boot-canvas-back-button__icon svg{fill:currentColor}.boot-canvas-back-button__icon.has-site-icon{-webkit-backdrop-filter:saturate(180%) blur(15px);backdrop-filter:saturate(180%) blur(15px);background-color:#fff9}.interface-interface-skeleton__header{margin-top:0!important}"));
2319 - document.head.appendChild(style);
2320 -}
2321 -var toggleHomeIconVariants = {
2322 - edit: {
2323 - opacity: 0,
2324 - scale: 0.2
2325 - },
2326 - hover: {
2327 - opacity: 1,
2328 - scale: 1,
2329 - clipPath: "inset( 22% round 2px )"
2330 - }
2331 -};
12297 +var import_components11 = __toESM(require_components(), 1);
12298 +var import_i18n11 = __toESM(require_i18n(), 1);
12299 +var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
2332 12300 function BootBackButton({ length }) {
2333 - const disableMotion = (0, import_compose3.useReducedMotion)();
2334 12301 const handleBack = () => {
2335 12302 window.history.back();
2336 12303 };
2337 12304 if (length > 1) {
@@ -2336,50 +12303,247 @@
2336 12303 };
2337 12304 if (length > 1) {
2338 12305 return null;
2339 12306 }
2340 - const transition = {
2341 - duration: disableMotion ? 0 : 0.3
2342 - };
2343 - return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2344 - import_components12.__unstableMotion.div,
12307 + return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
12308 + import_components11.Button,
2345 12309 {
2346 - className: "boot-canvas-back-button",
2347 - animate: "edit",
2348 - initial: "edit",
2349 - whileHover: "hover",
2350 - whileTap: "tap",
2351 - transition,
2352 - children: [
2353 - /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2354 - import_components12.Button,
2355 - {
2356 - className: "boot-canvas-back-button__link",
2357 - onClick: handleBack,
2358 - "aria-label": (0, import_i18n8.__)("Go back"),
2359 - __next40pxDefaultSize: true,
2360 - children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(site_icon_default, {})
12310 + size: "compact",
12311 + onClick: handleBack,
12312 + label: (0, import_i18n11.__)("Back"),
12313 + icon: (0, import_i18n11.isRTL)() ? chevron_right_default : chevron_left_default
12314 + }
12315 + );
12316 +}
12317 +
12318 +// packages/boot/build-module/components/canvas/site-preview.mjs
12319 +var import_i18n12 = __toESM(require_i18n(), 1);
12320 +var import_data8 = __toESM(require_data(), 1);
12321 +var import_core_data3 = __toESM(require_core_data(), 1);
12322 +var import_dom20 = __toESM(require_dom(), 1);
12323 +var import_url = __toESM(require_url(), 1);
12324 +var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
12325 +function SitePreview() {
12326 + const siteUrl = (0, import_data8.useSelect)((select) => {
12327 + const siteData = select(import_core_data3.store).getEntityRecord(
12328 + "root",
12329 + "__unstableBase"
12330 + );
12331 + return siteData?.home;
12332 + }, []);
12333 + if (typeof siteUrl !== "string" || !siteUrl) {
12334 + return null;
12335 + }
12336 + return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
12337 + "iframe",
12338 + {
12339 + src: (0, import_url.addQueryArgs)(siteUrl, {
12340 + // Parameter for hiding the admin bar.
12341 + wp_site_preview: 1
12342 + }),
12343 + title: (0, import_i18n12.__)("Site Preview"),
12344 + style: {
12345 + display: "block",
12346 + width: "100%",
12347 + height: "100%",
12348 + backgroundColor: "#fff"
12349 + },
12350 + onLoad: (event) => {
12351 + const iframeDocument = event.target.contentDocument;
12352 + if (!iframeDocument) {
12353 + return;
12354 + }
12355 + import_dom20.focus.focusable.find(iframeDocument.documentElement).forEach((element) => {
12356 + element.style.pointerEvents = "none";
12357 + element.tabIndex = -1;
12358 + element.setAttribute("aria-hidden", "true");
12359 + });
12360 + }
12361 + }
12362 + );
12363 +}
12364 +
12365 +// packages/boot/build-module/components/canvas/use-navigate-to-entity-record.mjs
12366 +var import_element35 = __toESM(require_element(), 1);
12367 +var import_data9 = __toESM(require_data(), 1);
12368 +var import_core_data4 = __toESM(require_core_data(), 1);
12369 +var import_editor4 = __toESM(require_editor(), 1);
12370 +var import_notices = __toESM(require_notices(), 1);
12371 +var import_html_entities = __toESM(require_html_entities(), 1);
12372 +var import_i18n13 = __toESM(require_i18n(), 1);
12373 +import {
12374 + useNavigate,
12375 + useSearch,
12376 + privateApis as routePrivateApis3
12377 +} from "@wordpress/route";
12378 +
12379 +// packages/boot/build-module/components/canvas/viewport.mjs
12380 +var DEFAULT_DEVICE_TYPE = "Desktop";
12381 +var VALID_VIEWPORTS = ["desktop", "tablet", "mobile"];
12382 +function isValidViewport(viewport) {
12383 + return !!viewport && VALID_VIEWPORTS.includes(viewport.toLowerCase());
12384 +}
12385 +function getDeviceType(viewport) {
12386 + if (!isValidViewport(viewport)) {
12387 + return DEFAULT_DEVICE_TYPE;
12388 + }
12389 + const value = viewport.toLowerCase();
12390 + return value.charAt(0).toUpperCase() + value.slice(1);
12391 +}
12392 +
12393 +// packages/boot/build-module/components/canvas/use-navigate-to-entity-record.mjs
12394 +var { useCanGoBack, useRouter: useRouter2 } = unlock2(routePrivateApis3);
12395 +function useNavigateToEntityRecord() {
12396 + const navigate = useNavigate();
12397 + const search = useSearch({ strict: false });
12398 + const registry = (0, import_data9.useRegistry)();
12399 + const getEntityLink2 = (0, import_data9.useSelect)(
12400 + (select) => select(store).getEntityLink,
12401 + []
12402 + );
12403 + const router = useRouter2();
12404 + const canGoBack = useCanGoBack();
12405 + const onNavigateToEntityRecord = (0, import_element35.useCallback)(
12406 + (params) => {
12407 + const currentPostType = registry.select(import_editor4.store).getCurrentPostType();
12408 + const currentPostId = registry.select(import_editor4.store).getCurrentPostId();
12409 + const edits = registry.select(import_core_data4.store).getEntityRecordEdits(
12410 + "postType",
12411 + currentPostType,
12412 + currentPostId
12413 + );
12414 + const selectedBlock = edits?.selection?.selectionStart?.clientId;
12415 + if (selectedBlock) {
12416 + navigate({
12417 + search: (previous) => ({
12418 + ...previous,
12419 + selectedBlock
12420 + }),
12421 + replace: true
12422 + });
12423 + }
12424 + const requestedViewport = params.viewport?.toLowerCase();
12425 + const hasRequestedViewport = isValidViewport(requestedViewport);
12426 + const to = getEntityLink2(params.postType, params.postId);
12427 + if (to) {
12428 + navigate({
12429 + to,
12430 + search: () => ({
12431 + focusMode: true,
12432 + ...hasRequestedViewport ? { viewport: requestedViewport } : {}
12433 + })
12434 + });
12435 + }
12436 + },
12437 + [navigate, registry, getEntityLink2]
12438 + );
12439 + const isFocusMode = !!search.focusMode;
12440 + const onNavigateToPreviousEntityRecord = (0, import_element35.useMemo)(
12441 + () => isFocusMode && canGoBack ? () => router.history.back() : void 0,
12442 + [isFocusMode, canGoBack, router]
12443 + );
12444 + return { onNavigateToEntityRecord, onNavigateToPreviousEntityRecord };
12445 +}
12446 +function useActionPerformed(postType) {
12447 + const navigate = useNavigate();
12448 + const { createSuccessNotice } = (0, import_data9.useDispatch)(import_notices.store);
12449 + const getEntityLink2 = (0, import_data9.useSelect)(
12450 + (select) => select(store).getEntityLink,
12451 + []
12452 + );
12453 + return (0, import_element35.useCallback)(
12454 + (actionId, items) => {
12455 + switch (actionId) {
12456 + case "move-to-trash":
12457 + case "delete-post": {
12458 + const to = postType && getEntityLink2(postType);
12459 + if (to) {
12460 + navigate({ to, search: () => ({}) });
2361 12461 }
2362 - ),
2363 - /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2364 - import_components12.__unstableMotion.div,
2365 - {
2366 - className: "boot-canvas-back-button__icon",
2367 - variants: toggleHomeIconVariants,
2368 - children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_components12.Icon, { icon: arrow_up_left_default })
12462 + break;
12463 + }
12464 + case "duplicate-post": {
12465 + const newItem = items[0];
12466 + const to = getEntityLink2(newItem.type, newItem.id);
12467 + if (!to) {
12468 + break;
2369 12469 }
2370 - )
2371 - ]
2372 - }
12470 + const title = typeof newItem.title === "string" ? newItem.title : newItem.title?.rendered;
12471 + createSuccessNotice(
12472 + (0, import_i18n13.sprintf)(
12473 + // translators: %s: Title of the created post, e.g: "Hello world".
12474 + (0, import_i18n13.__)('"%s" successfully created.'),
12475 + (0, import_html_entities.decodeEntities)(title ?? "") || (0, import_i18n13.__)("(no title)")
12476 + ),
12477 + {
12478 + type: "snackbar",
12479 + id: "duplicate-post-action",
12480 + actions: [
12481 + {
12482 + label: (0, import_i18n13.__)("Edit"),
12483 + onClick: () => navigate({ to })
12484 + }
12485 + ]
12486 + }
12487 + );
12488 + break;
12489 + }
12490 + }
12491 + },
12492 + [navigate, createSuccessNotice, getEntityLink2, postType]
2373 12493 );
2374 12494 }
2375 12495
2376 12496 // packages/boot/build-module/components/canvas/index.mjs
2377 -var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
12497 +var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
2378 12498 function Canvas({ canvas }) {
2379 - const [Editor, setEditor] = (0, import_element12.useState)(null);
2380 - const navigate = useNavigate();
2381 - (0, import_element12.useEffect)(() => {
12499 + const [Editor, setEditor] = (0, import_element36.useState)(null);
12500 + const navigate = useNavigate2();
12501 + const { onNavigateToEntityRecord, onNavigateToPreviousEntityRecord } = useNavigateToEntityRecord();
12502 + const onActionPerformed = useActionPerformed(canvas.postType);
12503 + const viewport = useSearch2({
12504 + strict: false,
12505 + select: (search) => search.viewport
12506 + });
12507 + const hasEntity = !!(canvas.postType && canvas.postId);
12508 + const isBlockTheme = (0, import_data10.useSelect)(
12509 + (select) => select(import_core_data5.store).getCurrentTheme()?.is_block_theme,
12510 + []
12511 + );
12512 + const { editLink, isTrashed } = (0, import_data10.useSelect)(
12513 + (select) => {
12514 + if (!canvas.postType || !canvas.postId) {
12515 + return { editLink: void 0, isTrashed: false };
12516 + }
12517 + const record = select(import_core_data5.store).getEntityRecord(
12518 + "postType",
12519 + canvas.postType,
12520 + canvas.postId
12521 + );
12522 + return {
12523 + editLink: select(store).getEntityLink(
12524 + canvas.postType,
12525 + canvas.postId
12526 + ),
12527 + isTrashed: record?.status === "trash"
12528 + };
12529 + },
12530 + [canvas.postType, canvas.postId]
12531 + );
12532 + const settings = (0, import_element36.useMemo)(
12533 + () => ({
12534 + isPreviewMode: canvas.isPreview,
12535 + styles: canvas.isPreview ? [{ css: "body{min-height:100vh;}" }] : [],
12536 + onNavigateToEntityRecord,
12537 + onNavigateToPreviousEntityRecord
12538 + }),
12539 + [
12540 + canvas.isPreview,
12541 + onNavigateToEntityRecord,
12542 + onNavigateToPreviousEntityRecord
12543 + ]
12544 + );
12545 + (0, import_element36.useEffect)(() => {
2382 12546 import("@wordpress/lazy-editor").then((module) => {
2383 12547 setEditor(() => module.Editor);
2384 12548 }).catch((error) => {
2385 12549 console.error("Failed to load lazy editor:", error);
@@ -2384,10 +12548,13 @@
2384 12548 }).catch((error) => {
2385 12549 console.error("Failed to load lazy editor:", error);
2386 12550 });
2387 12551 }, []);
2388 - if (!Editor) {
2389 - return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
12552 + if (!hasEntity && isBlockTheme === false) {
12553 + return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SitePreview, {});
12554 + }
12555 + if (!Editor || !hasEntity && isBlockTheme === void 0) {
12556 + return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
2390 12557 "div",
2391 12558 {
2392 12559 style: {
2393 12560 display: "flex",
@@ -2395,52 +12562,56 @@
2395 12562 alignItems: "center",
2396 12563 height: "100%",
2397 12564 padding: "2rem"
2398 12565 },
2399 - children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components13.Spinner, {})
12566 + children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components12.Spinner, {})
2400 12567 }
2401 12568 );
2402 12569 }
2403 - const backButton = !canvas.isPreview ? ({ length }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(BootBackButton, { length }) : void 0;
2404 - return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: { height: "100%", position: "relative" }, children: [
2405 - /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
12570 + const backButton = !canvas.isPreview ? ({ length }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(BootBackButton, { length }) : void 0;
12571 + return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { style: { height: "100%", position: "relative" }, children: [
12572 + /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
2406 12573 "div",
2407 12574 {
2408 12575 style: { height: "100%" },
2409 12576 inert: canvas.isPreview ? "true" : void 0,
2410 - children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
12577 + children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
2411 12578 Editor,
2412 12579 {
2413 12580 postType: canvas.postType,
2414 12581 postId: canvas.postId,
2415 - settings: {
2416 - isPreviewMode: canvas.isPreview,
2417 - styles: canvas.isPreview ? [{ css: "body{min-height:100vh;}" }] : []
2418 - },
2419 - backButton
12582 + renderingMode: canvas.renderingMode,
12583 + settings,
12584 + backButton,
12585 + onActionPerformed,
12586 + initialViewport: getDeviceType(viewport)
2420 12587 }
2421 12588 )
2422 12589 }
2423 12590 ),
2424 - canvas.isPreview && canvas.editLink && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
12591 + canvas.isPreview && editLink && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
2425 12592 "div",
2426 12593 {
2427 - onClick: () => navigate({ to: canvas.editLink }),
12594 + onClick: isTrashed ? void 0 : () => navigate({ to: editLink }),
2428 12595 onKeyDown: (e) => {
12596 + if (isTrashed) {
12597 + return;
12598 + }
2429 12599 if (e.key === "Enter" || e.key === " ") {
2430 12600 e.preventDefault();
2431 - navigate({ to: canvas.editLink });
12601 + navigate({ to: editLink });
2432 12602 }
2433 12603 },
2434 12604 style: {
2435 12605 position: "absolute",
2436 12606 inset: 0,
2437 - cursor: "pointer",
12607 + cursor: isTrashed ? "default" : "pointer",
2438 12608 zIndex: 1
2439 12609 },
2440 12610 role: "button",
2441 12611 tabIndex: 0,
2442 - "aria-label": "Click to edit"
12612 + "aria-disabled": isTrashed,
12613 + "aria-label": (0, import_i18n14.__)("Edit")
2443 12614 }
2444 12615 )
2445 12616 ] });
2446 12617 }
@@ -2445,15 +12616,15 @@
2445 12616 ] });
2446 12617 }
2447 12618
2448 12619 // packages/boot/build-module/components/canvas-renderer/index.mjs
2449 -var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
12620 +var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
2450 12621 function CanvasRenderer({
2451 12622 canvas,
2452 12623 routeContentModule
2453 12624 }) {
2454 - const [CustomCanvas, setCustomCanvas] = (0, import_element13.useState)(null);
2455 - (0, import_element13.useEffect)(() => {
12625 + const [CustomCanvas, setCustomCanvas] = (0, import_element37.useState)(null);
12626 + (0, import_element37.useEffect)(() => {
2456 12627 if (canvas === null && routeContentModule) {
2457 12628 import(routeContentModule).then((module) => {
2458 12629 setCustomCanvas(() => module.canvas);
2459 12630 }).catch((error) => {
@@ -2469,39 +12640,183 @@
2469 12640 if (canvas === null) {
2470 12641 if (!CustomCanvas) {
2471 12642 return null;
2472 12643 }
2473 - return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CustomCanvas, {});
12644 + return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CustomCanvas, {});
2474 12645 }
2475 - return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Canvas, { canvas });
12646 + return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Canvas, { canvas });
2476 12647 }
2477 12648
12649 +// packages/boot/build-module/components/error-boundary/index.mjs
12650 +var import_element38 = __toESM(require_element(), 1);
12651 +var import_i18n15 = __toESM(require_i18n(), 1);
12652 +var import_components13 = __toESM(require_components(), 1);
12653 +var import_compose3 = __toESM(require_compose(), 1);
12654 +var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
12655 +var STYLE_HASH_ATTRIBUTE24 = "data-wp-hash";
12656 +function getRuntime24() {
12657 + const globalScope = globalThis;
12658 + if (globalScope.__wpStyleRuntime) {
12659 + return globalScope.__wpStyleRuntime;
12660 + }
12661 + globalScope.__wpStyleRuntime = {
12662 + documents: /* @__PURE__ */ new Map(),
12663 + styles: /* @__PURE__ */ new Map(),
12664 + injectedStyles: /* @__PURE__ */ new WeakMap()
12665 + };
12666 + if (typeof document !== "undefined") {
12667 + registerDocument24(document);
12668 + }
12669 + return globalScope.__wpStyleRuntime;
12670 +}
12671 +function documentContainsStyleHash24(targetDocument, hash) {
12672 + if (!targetDocument.head) {
12673 + return false;
12674 + }
12675 + for (const style of targetDocument.head.querySelectorAll(
12676 + `style[${STYLE_HASH_ATTRIBUTE24}]`
12677 + )) {
12678 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE24) === hash) {
12679 + return true;
12680 + }
12681 + }
12682 + return false;
12683 +}
12684 +function injectStyle24(targetDocument, hash, css) {
12685 + if (!targetDocument.head) {
12686 + return;
12687 + }
12688 + const runtime = getRuntime24();
12689 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
12690 + if (!injectedStyles) {
12691 + injectedStyles = /* @__PURE__ */ new Set();
12692 + runtime.injectedStyles.set(targetDocument, injectedStyles);
12693 + }
12694 + if (injectedStyles.has(hash)) {
12695 + return;
12696 + }
12697 + if (documentContainsStyleHash24(targetDocument, hash)) {
12698 + injectedStyles.add(hash);
12699 + return;
12700 + }
12701 + const style = targetDocument.createElement("style");
12702 + style.setAttribute(STYLE_HASH_ATTRIBUTE24, hash);
12703 + style.appendChild(targetDocument.createTextNode(css));
12704 + targetDocument.head.appendChild(style);
12705 + injectedStyles.add(hash);
12706 +}
12707 +function registerDocument24(targetDocument) {
12708 + const runtime = getRuntime24();
12709 + runtime.documents.set(
12710 + targetDocument,
12711 + (runtime.documents.get(targetDocument) ?? 0) + 1
12712 + );
12713 + for (const [hash, css] of runtime.styles) {
12714 + injectStyle24(targetDocument, hash, css);
12715 + }
12716 + return () => {
12717 + const count = runtime.documents.get(targetDocument);
12718 + if (count === void 0) {
12719 + return;
12720 + }
12721 + if (count <= 1) {
12722 + runtime.documents.delete(targetDocument);
12723 + return;
12724 + }
12725 + runtime.documents.set(targetDocument, count - 1);
12726 + };
12727 +}
12728 +function registerStyle24(hash, css) {
12729 + const runtime = getRuntime24();
12730 + runtime.styles.set(hash, css);
12731 + for (const targetDocument of runtime.documents.keys()) {
12732 + injectStyle24(targetDocument, hash, css);
12733 + }
12734 +}
12735 +if (typeof process === "undefined" || true) {
12736 + registerStyle24("4780fe0b1b", "._4d71ad18128c9cb8__error-boundary{align-items:center;box-sizing:border-box;display:flex;justify-content:center;min-height:100%;padding:16px}");
12737 +}
12738 +var style_module_default8 = { "error-boundary": "_4d71ad18128c9cb8__error-boundary" };
12739 +function CopyErrorButton({ error }) {
12740 + const ref = (0, import_compose3.useCopyToClipboard)(() => error.stack ?? String(error));
12741 + return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components13.Button, { __next40pxDefaultSize: true, variant: "secondary", ref, children: (0, import_i18n15.__)("Copy error") });
12742 +}
12743 +var ErrorBoundary = class extends import_element38.Component {
12744 + constructor(props) {
12745 + super(props);
12746 + this.state = { error: null };
12747 + }
12748 + static getDerivedStateFromError(error) {
12749 + return { error };
12750 + }
12751 + render() {
12752 + const { error } = this.state;
12753 + if (!error) {
12754 + return this.props.children;
12755 + }
12756 + return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: style_module_default8["error-boundary"], children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(empty_state_exports.Root, { children: [
12757 + /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(empty_state_exports.Icon, { icon: caution_default }),
12758 + /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(empty_state_exports.Title, { children: (0, import_i18n15.__)("Something went wrong") }),
12759 + /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(empty_state_exports.Description, { children: (0, import_i18n15.__)(
12760 + "This part of the screen could not be displayed. Reloading the page may help."
12761 + ) }),
12762 + /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(empty_state_exports.Actions, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(CopyErrorButton, { error }) })
12763 + ] }) });
12764 + }
12765 +};
12766 +
12767 +// packages/boot/build-module/components/plugin-area/index.mjs
12768 +var import_data11 = __toESM(require_data(), 1);
12769 +var import_i18n16 = __toESM(require_i18n(), 1);
12770 +var import_notices2 = __toESM(require_notices(), 1);
12771 +var import_plugins = __toESM(require_plugins(), 1);
12772 +var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
12773 +function PluginArea() {
12774 + const { createErrorNotice } = (0, import_data11.useDispatch)(import_notices2.store);
12775 + return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12776 + import_plugins.PluginArea,
12777 + {
12778 + onError: (name) => {
12779 + createErrorNotice(
12780 + (0, import_i18n16.sprintf)(
12781 + /* translators: %s: plugin name */
12782 + (0, import_i18n16.__)(
12783 + 'The "%s" plugin has encountered an error and cannot be rendered.'
12784 + ),
12785 + name
12786 + )
12787 + );
12788 + }
12789 + }
12790 + );
12791 +}
12792 +
2478 12793 // packages/boot/build-module/components/app/use-route-title.mjs
2479 -var import_element14 = __toESM(require_element(), 1);
2480 -var import_data9 = __toESM(require_data(), 1);
2481 -var import_core_data5 = __toESM(require_core_data(), 1);
2482 -var import_i18n9 = __toESM(require_i18n(), 1);
12794 +var import_element39 = __toESM(require_element(), 1);
12795 +var import_data12 = __toESM(require_data(), 1);
12796 +var import_core_data6 = __toESM(require_core_data(), 1);
12797 +var import_i18n17 = __toESM(require_i18n(), 1);
2483 12798 var import_html_entities2 = __toESM(require_html_entities(), 1);
2484 12799 import { speak } from "@wordpress/a11y";
2485 12800 import { privateApis as routePrivateApis4 } from "@wordpress/route";
2486 -var { useLocation, useMatches: useMatches2 } = unlock(routePrivateApis4);
12801 +var { useLocation, useMatches: useMatches2 } = unlock2(routePrivateApis4);
2487 12802 function useRouteTitle() {
2488 12803 const location = useLocation();
2489 12804 const matches = useMatches2();
2490 12805 const currentMatch = matches[matches.length - 1];
2491 12806 const routeTitle = currentMatch?.loaderData?.title;
2492 - const siteTitle = (0, import_data9.useSelect)(
2493 - (select) => select(import_core_data5.store).getEntityRecord(
12807 + const siteTitle = (0, import_data12.useSelect)(
12808 + (select) => select(import_core_data6.store).getEntityRecord(
2494 12809 "root",
2495 12810 "__unstableBase"
2496 12811 )?.name,
2497 12812 []
2498 12813 );
2499 - const isInitialLocationRef = (0, import_element14.useRef)(true);
2500 - (0, import_element14.useEffect)(() => {
12814 + const isInitialLocationRef = (0, import_element39.useRef)(true);
12815 + (0, import_element39.useEffect)(() => {
2501 12816 isInitialLocationRef.current = false;
2502 12817 }, [location]);
2503 - (0, import_element14.useEffect)(() => {
12818 + (0, import_element39.useEffect)(() => {
2504 12819 if (isInitialLocationRef.current) {
2505 12820 return;
2506 12821 }
2507 12822 if (routeTitle && typeof routeTitle === "string" && siteTitle && typeof siteTitle === "string") {
@@ -2506,11 +12821,11 @@
2506 12821 }
2507 12822 if (routeTitle && typeof routeTitle === "string" && siteTitle && typeof siteTitle === "string") {
2508 12823 const decodedRouteTitle = (0, import_html_entities2.decodeEntities)(routeTitle);
2509 12824 const decodedSiteTitle = (0, import_html_entities2.decodeEntities)(siteTitle);
2510 - const formattedTitle = (0, import_i18n9.sprintf)(
12825 + const formattedTitle = (0, import_i18n17.sprintf)(
2511 12826 /* translators: Admin document title. 1: Admin screen name, 2: Site name. */
2512 - (0, import_i18n9.__)("%1$s \u2039 %2$s \u2014 WordPress"),
12827 + (0, import_i18n17.__)("%1$s ‹ %2$s — WordPress"),
2513 12828 decodedRouteTitle,
2514 12829 decodedSiteTitle
2515 12830 );
2516 12831 document.title = formattedTitle;
@@ -2520,44 +12835,119 @@
2520 12835 }
2521 12836 }, [routeTitle, siteTitle, location]);
2522 12837 }
2523 12838
2524 -// packages/boot/build-module/components/user-theme-provider/index.mjs
2525 -var import_theme = __toESM(require_theme(), 1);
2526 -var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
2527 -var ThemeProvider = unlock(import_theme.privateApis).ThemeProvider;
2528 -var THEME_PRIMARY_COLORS = /* @__PURE__ */ new Map([
2529 - ["light", "#0085ba"],
2530 - ["modern", "#3858e9"],
2531 - ["blue", "#096484"],
2532 - ["coffee", "#46403c"],
2533 - ["ectoplasm", "#523f6d"],
2534 - ["midnight", "#e14d43"],
2535 - ["ocean", "#627c83"],
2536 - ["sunrise", "#dd823b"]
2537 -]);
2538 -function getAdminThemePrimaryColor() {
2539 - const theme = document.body.className.match(/admin-color-([a-z]+)/)?.[1];
2540 - return theme && THEME_PRIMARY_COLORS.get(theme);
12839 +// packages/boot/build-module/components/root/use-sync-body-background.mjs
12840 +var import_element40 = __toESM(require_element(), 1);
12841 +var import_compose4 = __toESM(require_compose(), 1);
12842 +function useSyncBodyBackground() {
12843 + const layoutRef = (0, import_element40.useRef)(null);
12844 + (0, import_compose4.useIsomorphicLayoutEffect)(() => {
12845 + if (!layoutRef.current) {
12846 + return;
12847 + }
12848 + const body = layoutRef.current.ownerDocument.body;
12849 + const bg = getComputedStyle(layoutRef.current).backgroundColor;
12850 + if (!bg) {
12851 + return;
12852 + }
12853 + const previousBackground = body.style.background;
12854 + body.style.background = bg;
12855 + return () => {
12856 + body.style.background = previousBackground;
12857 + };
12858 + }, []);
12859 + return layoutRef;
2541 12860 }
2542 -function UserThemeProvider({
2543 - color,
2544 - ...restProps
2545 -}) {
2546 - const primary = getAdminThemePrimaryColor();
2547 - return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ThemeProvider, { ...restProps, color: { primary, ...color } });
2548 -}
2549 12861
2550 12862 // packages/boot/build-module/components/root/index.mjs
2551 -var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
2552 -if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='be0c278a6c']")) {
2553 - const style = document.createElement("style");
2554 - style.setAttribute("data-wp-hash", "be0c278a6c");
2555 - style.appendChild(document.createTextNode(".boot-layout{background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}.boot-layout__sidebar-backdrop{background-color:#00000080;bottom:0;cursor:var(--wpds-cursor-control,pointer);left:0;position:fixed;right:0;top:0;z-index:100002}.boot-layout__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}.boot-layout__sidebar.is-mobile{background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);bottom:0;box-shadow:2px 0 8px #0003;inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.boot-layout__mobile-sidebar-drawer{left:0;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout__mobile-sidebar-drawer{top:46px}.boot-layout__mobile-sidebar-drawer{align-items:center;background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border-bottom:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);display:flex;justify-content:flex-start;padding:16px;z-index:3}.boot-layout__canvas.has-mobile-drawer{padding-top:65px;position:relative}.boot-layout__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.boot-layout__surfaces{margin:8px}.boot-layout--single-page .boot-layout__surfaces{margin-top:0;margin-inline-start:0}}.boot-layout__inspector,.boot-layout__stage{background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border-radius:0;bottom:0;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__inspector,.boot-layout__stage{border-radius:8px;height:auto;margin:0;position:static;width:auto}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:auto}}.boot-layout__stage{z-index:2}@media (min-width:782px){.boot-layout__stage{z-index:auto}}.boot-layout__inspector{z-index:3}@media (min-width:782px){.boot-layout__inspector{z-index:auto}}.boot-layout__canvas{background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:0;bottom:0;box-shadow:0 1px 3px #0000001a;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw;z-index:1}.boot-layout--single-page .boot-layout__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__canvas{border-radius:8px;height:auto;position:static;width:auto;z-index:auto}.boot-layout--single-page .boot-layout__canvas{height:auto}.boot-layout.has-canvas .boot-layout__stage,.boot-layout__inspector{max-width:400px}}.boot-layout__canvas .interface-interface-skeleton{height:100%;left:0!important;position:relative;top:0!important}.boot-layout.has-full-canvas .boot-layout__surfaces{gap:0;margin:0}.boot-layout.has-full-canvas .boot-layout__inspector,.boot-layout.has-full-canvas .boot-layout__stage{display:none}.boot-layout.has-full-canvas .boot-layout__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;left:0;margin:0;max-width:none;overflow:hidden;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:46px}@media (min-width:782px){.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:32px}}"));
2556 - document.head.appendChild(style);
12863 +var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
12864 +var STYLE_HASH_ATTRIBUTE25 = "data-wp-hash";
12865 +function getRuntime25() {
12866 + const globalScope = globalThis;
12867 + if (globalScope.__wpStyleRuntime) {
12868 + return globalScope.__wpStyleRuntime;
12869 + }
12870 + globalScope.__wpStyleRuntime = {
12871 + documents: /* @__PURE__ */ new Map(),
12872 + styles: /* @__PURE__ */ new Map(),
12873 + injectedStyles: /* @__PURE__ */ new WeakMap()
12874 + };
12875 + if (typeof document !== "undefined") {
12876 + registerDocument25(document);
12877 + }
12878 + return globalScope.__wpStyleRuntime;
2557 12879 }
2558 -var { useLocation: useLocation2, useMatches: useMatches3, Outlet } = unlock(routePrivateApis5);
2559 -function Root() {
12880 +function documentContainsStyleHash25(targetDocument, hash) {
12881 + if (!targetDocument.head) {
12882 + return false;
12883 + }
12884 + for (const style of targetDocument.head.querySelectorAll(
12885 + `style[${STYLE_HASH_ATTRIBUTE25}]`
12886 + )) {
12887 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE25) === hash) {
12888 + return true;
12889 + }
12890 + }
12891 + return false;
12892 +}
12893 +function injectStyle25(targetDocument, hash, css) {
12894 + if (!targetDocument.head) {
12895 + return;
12896 + }
12897 + const runtime = getRuntime25();
12898 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
12899 + if (!injectedStyles) {
12900 + injectedStyles = /* @__PURE__ */ new Set();
12901 + runtime.injectedStyles.set(targetDocument, injectedStyles);
12902 + }
12903 + if (injectedStyles.has(hash)) {
12904 + return;
12905 + }
12906 + if (documentContainsStyleHash25(targetDocument, hash)) {
12907 + injectedStyles.add(hash);
12908 + return;
12909 + }
12910 + const style = targetDocument.createElement("style");
12911 + style.setAttribute(STYLE_HASH_ATTRIBUTE25, hash);
12912 + style.appendChild(targetDocument.createTextNode(css));
12913 + targetDocument.head.appendChild(style);
12914 + injectedStyles.add(hash);
12915 +}
12916 +function registerDocument25(targetDocument) {
12917 + const runtime = getRuntime25();
12918 + runtime.documents.set(
12919 + targetDocument,
12920 + (runtime.documents.get(targetDocument) ?? 0) + 1
12921 + );
12922 + for (const [hash, css] of runtime.styles) {
12923 + injectStyle25(targetDocument, hash, css);
12924 + }
12925 + return () => {
12926 + const count = runtime.documents.get(targetDocument);
12927 + if (count === void 0) {
12928 + return;
12929 + }
12930 + if (count <= 1) {
12931 + runtime.documents.delete(targetDocument);
12932 + return;
12933 + }
12934 + runtime.documents.set(targetDocument, count - 1);
12935 + };
12936 +}
12937 +function registerStyle25(hash, css) {
12938 + const runtime = getRuntime25();
12939 + runtime.styles.set(hash, css);
12940 + for (const targetDocument of runtime.documents.keys()) {
12941 + injectStyle25(targetDocument, hash, css);
12942 + }
12943 +}
12944 +if (typeof process === "undefined" || true) {
12945 + registerStyle25("b215aa5eaa", ".c8317e9ebb034cfa__layout{background:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}@media (min-width:600px){.c8317e9ebb034cfa__layout{bottom:0;inset-inline-end:0;inset-inline-start:0;min-height:calc(100vh - 46px);position:absolute;top:0}}@media (min-width:782px){.c8317e9ebb034cfa__layout{min-height:calc(100vh - 32px)}body:has(.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas) .c8317e9ebb034cfa__layout{min-height:100vh}}:where(.c8317e9ebb034cfa__layout) img{height:auto;max-width:100%}.c8317e9ebb034cfa__layout .b8f8c6cf9ae266bf__notices-snackbar{bottom:var(--wpds-dimension-size-md,32px);box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}.c8317e9ebb034cfa__layout .b8f8c6cf9ae266bf__notices-snackbar ._94ac6b8f274ce2f6__components-snackbar,.c8317e9ebb034cfa__layout .b8f8c6cf9ae266bf__notices-snackbar .components-snackbar{margin-inline:auto}.bfc3fedf39b1cf71__sidebar-backdrop{background-color:rgba(0,0,0,.5);bottom:0;cursor:var(--wpds-cursor-control,pointer);inset-inline-end:0;inset-inline-start:0;position:fixed;top:0;z-index:100002}.bb4f70cd030be0a3__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}.bb4f70cd030be0a3__sidebar._27e6d590dc5963c9__is-mobile{background:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);bottom:0;box-shadow:2px 0 8px rgba(0,0,0,.2);inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}._0eb5d3a3e94d6273__mobile-sidebar-drawer{inset-inline-end:0;inset-inline-start:0;position:fixed;top:0}._26789cb167e9f578__layout-single-page ._0eb5d3a3e94d6273__mobile-sidebar-drawer{top:46px}._0eb5d3a3e94d6273__mobile-sidebar-drawer{align-items:center;background:var(--wpds-color-background-surface-neutral,#fcfcfc);border-bottom:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);display:flex;justify-content:flex-start;padding:16px;z-index:3}.fb03501e629fd04e__canvas.fa94dab2ab1e36f3__has-mobile-drawer{padding-top:65px;position:relative}.a03baddce3ef2026__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.a03baddce3ef2026__surfaces{margin:8px}._26789cb167e9f578__layout-single-page .a03baddce3ef2026__surfaces{margin-top:0;margin-inline-start:0}}._7ffe3a3db6f69647__inspector,.d12c9efe707e6cb3__stage{background:var(--wpds-color-background-surface-neutral,#fcfcfc);border-radius:0;bottom:0;color:var(--wpds-color-foreground-content-neutral,#1e1e1e);flex:1;height:100vh;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw}._26789cb167e9f578__layout-single-page ._7ffe3a3db6f69647__inspector,._26789cb167e9f578__layout-single-page .d12c9efe707e6cb3__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){._7ffe3a3db6f69647__inspector,.d12c9efe707e6cb3__stage{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}._26789cb167e9f578__layout-single-page ._7ffe3a3db6f69647__inspector,._26789cb167e9f578__layout-single-page .d12c9efe707e6cb3__stage{height:auto}}.d12c9efe707e6cb3__stage{z-index:2}@media (min-width:782px){.d12c9efe707e6cb3__stage{z-index:auto}}._7ffe3a3db6f69647__inspector{z-index:3}@media (min-width:782px){._7ffe3a3db6f69647__inspector{z-index:auto}}.fb03501e629fd04e__canvas{background:var(--wpds-color-background-surface-neutral,#fcfcfc);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:0;bottom:0;box-shadow:0 1px 3px rgba(0,0,0,.1);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);flex:1;height:100vh;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw;z-index:1}._26789cb167e9f578__layout-single-page .fb03501e629fd04e__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.fb03501e629fd04e__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}._26789cb167e9f578__layout-single-page .fb03501e629fd04e__canvas{height:auto}._7ffe3a3db6f69647__inspector,.c8317e9ebb034cfa__layout.f7fe42ef8c67e96f__has-canvas .d12c9efe707e6cb3__stage{max-width:400px}}.fb03501e629fd04e__canvas .interface-interface-skeleton{height:100%;inset-inline-start:0!important;position:relative;top:0!important}.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .a03baddce3ef2026__surfaces{gap:0;margin:0}.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas ._7ffe3a3db6f69647__inspector,.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .d12c9efe707e6cb3__stage{display:none}.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .fb03501e629fd04e__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;inset-inline-end:0;inset-inline-start:0;margin:0;max-width:none;overflow:hidden;position:fixed;top:var(--wp-admin--admin-bar--height,0)}._26789cb167e9f578__layout-single-page .c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .fb03501e629fd04e__canvas{top:46px}@media (min-width:782px){._26789cb167e9f578__layout-single-page .c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .fb03501e629fd04e__canvas{top:32px}}@media (max-width:782px){._7ffe3a3db6f69647__inspector,.d12c9efe707e6cb3__stage,.fb03501e629fd04e__canvas:not(.fa94dab2ab1e36f3__has-mobile-drawer){height:calc(100vh - var(--wp-admin--admin-bar--height, 0px));top:var(--wp-admin--admin-bar--height,0)}._0eb5d3a3e94d6273__mobile-sidebar-drawer{top:var(--wp-admin--admin-bar--height,0)}}@media not (prefers-reduced-motion:reduce){.fb03501e629fd04e__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}.fb03501e629fd04e__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.d12c9efe707e6cb3__stage{view-transition-name:boot--stage}._7ffe3a3db6f69647__inspector{view-transition-name:boot--inspector}.fb03501e629fd04e__canvas{view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.d12c9efe707e6cb3__stage{view-transition-name:boot-safari--stage}._7ffe3a3db6f69647__inspector{view-transition-name:boot-safari--inspector}.fb03501e629fd04e__canvas{view-transition-name:boot-safari--canvas}}}@media (max-width:782px){:root:has(.c8317e9ebb034cfa__layout) *{view-transition-name:none!important}}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(root),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){:root:has(.c8317e9ebb034cfa__layout) .components-popover:first-of-type{view-transition-name:boot--components-popover}}:root:has(.c8317e9ebb034cfa__layout)::view-transition-group(boot--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-group(boot--canvas-header),:root:has(.c8317e9ebb034cfa__layout)::view-transition-group(boot--canvas-sidebar),:root:has(.c8317e9ebb034cfa__layout)::view-transition-group(boot-safari--canvas){z-index:1}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--inspector),:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--stage),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--inspector),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--stage){width:auto}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--inspector),:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--stage),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--inspector),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--stage){background:#fff;border-radius:var(--wpds-border-radius-xl,12px);height:100%;object-fit:none;object-position:left top;overflow:hidden;width:100%}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas){object-position:center top}:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--inspector):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--stage):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--inspector):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--stage):only-child{animation-name:ef68027ea03aa34b__zoomOut;will-change:transform,opacity}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--inspector):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--stage):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--inspector):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--stage):only-child{animation-name:_0752ac81dff4c432__zoomIn;will-change:transform,opacity}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--canvas):only-child{animation-name:_3a2e4dc465681136__slideFromRight;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--canvas):only-child{animation-name:_86a367ac26a1b61e__slideToRight;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas-header):only-child{animation-name:_462399c0e9d64199__slideHeaderFromTop;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas-header):only-child{animation-name:_8b272f30d43c9f38__slideHeaderToTop;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas-sidebar):only-child{animation-name:_69ed6a71d53a2e0c__slideSidebarFromRight;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas-sidebar):only-child{animation-name:bf0697a36b00caad__slideSidebarToRight;will-change:transform}@keyframes ef68027ea03aa34b__zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes _0752ac81dff4c432__zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes _3a2e4dc465681136__slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes _86a367ac26a1b61e__slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}@keyframes _462399c0e9d64199__slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes _8b272f30d43c9f38__slideHeaderToTop{to{transform:translateY(-100%)}}@keyframes _69ed6a71d53a2e0c__slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes bf0697a36b00caad__slideSidebarToRight{to{transform:translateX(100%)}}");
12946 +}
12947 +var style_module_default9 = { "layout": "c8317e9ebb034cfa__layout", "has-full-canvas": "e97bb2807a9c4687__has-full-canvas", "notices-snackbar": "b8f8c6cf9ae266bf__notices-snackbar", "components-snackbar": "_94ac6b8f274ce2f6__components-snackbar", "sidebar-backdrop": "bfc3fedf39b1cf71__sidebar-backdrop", "sidebar": "bb4f70cd030be0a3__sidebar", "is-mobile": "_27e6d590dc5963c9__is-mobile", "mobile-sidebar-drawer": "_0eb5d3a3e94d6273__mobile-sidebar-drawer", "layout-single-page": "_26789cb167e9f578__layout-single-page", "canvas": "fb03501e629fd04e__canvas", "has-mobile-drawer": "fa94dab2ab1e36f3__has-mobile-drawer", "surfaces": "a03baddce3ef2026__surfaces", "stage": "d12c9efe707e6cb3__stage", "inspector": "_7ffe3a3db6f69647__inspector", "has-canvas": "f7fe42ef8c67e96f__has-canvas", "zoomOut": "ef68027ea03aa34b__zoomOut", "zoomIn": "_0752ac81dff4c432__zoomIn", "slideFromRight": "_3a2e4dc465681136__slideFromRight", "slideToRight": "_86a367ac26a1b61e__slideToRight", "slideHeaderFromTop": "_462399c0e9d64199__slideHeaderFromTop", "slideHeaderToTop": "_8b272f30d43c9f38__slideHeaderToTop", "slideSidebarFromRight": "_69ed6a71d53a2e0c__slideSidebarFromRight", "slideSidebarToRight": "bf0697a36b00caad__slideSidebarToRight" };
12948 +var { useLocation: useLocation2, useMatches: useMatches3, Outlet } = unlock2(routePrivateApis5);
12949 +function Root3() {
2560 12950 const matches = useMatches3();
2561 12951 const location = useLocation2();
2562 12952 const currentMatch = matches[matches.length - 1];
2563 12953 const canvas = currentMatch?.loaderData?.canvas;
@@ -2563,117 +12953,238 @@
2563 12953 const canvas = currentMatch?.loaderData?.canvas;
2564 12954 const routeContentModule = currentMatch?.loaderData?.routeContentModule;
2565 12955 const isFullScreen = canvas && !canvas.isPreview;
2566 12956 useRouteTitle();
2567 - const isMobileViewport = (0, import_compose4.useViewportMatch)("medium", "<");
2568 - const [isMobileSidebarOpen, setIsMobileSidebarOpen] = (0, import_element15.useState)(false);
2569 - const disableMotion = (0, import_compose4.useReducedMotion)();
2570 - (0, import_element15.useEffect)(() => {
12957 + const isMobileViewport = (0, import_compose5.useViewportMatch)("medium", "<");
12958 + const [isMobileSidebarOpen, setIsMobileSidebarOpen] = (0, import_element41.useState)(false);
12959 + const disableMotion = (0, import_compose5.useReducedMotion)();
12960 + (0, import_element41.useEffect)(() => {
2571 12961 setIsMobileSidebarOpen(false);
2572 12962 }, [location.pathname, isMobileViewport]);
2573 - return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components14.SlotFillProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(UserThemeProvider, { isRoot: true, color: { bg: "#f8f8f8" }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(UserThemeProvider, { color: { bg: "#1d2327" }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2574 - "div",
2575 - {
2576 - className: clsx_default("boot-layout", {
2577 - "has-canvas": !!canvas || canvas === null,
2578 - "has-full-canvas": isFullScreen
2579 - }),
2580 - children: [
2581 - /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SavePanel, {}),
2582 - /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_notices.SnackbarNotices, { className: "boot-notices__snackbar" }),
2583 - isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(page_default.SidebarToggleFill, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2584 - import_components14.Button,
12963 + const themeColors = (0, import_element41.useMemo)(getAdminThemeColors, []);
12964 + const layoutRef = useSyncBodyBackground();
12965 + return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components14.SlotFillProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(tooltip_exports.Provider, { children: [
12966 + /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PluginArea, {}),
12967 + /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12968 + import_theme.ThemeProvider,
12969 + {
12970 + isRoot: true,
12971 + color: { ...themeColors, background: "#f8f8f8" },
12972 + children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_theme.ThemeProvider, { color: themeColors, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
12973 + "div",
2585 12974 {
2586 - icon: menu_default,
2587 - onClick: () => setIsMobileSidebarOpen(true),
2588 - label: (0, import_i18n10.__)("Open navigation panel"),
2589 - size: "compact"
2590 - }
2591 - ) }),
2592 - /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components14.__unstableAnimatePresence, { children: isMobileViewport && isMobileSidebarOpen && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2593 - import_components14.__unstableMotion.div,
2594 - {
2595 - initial: { opacity: 0 },
2596 - animate: { opacity: 1 },
2597 - exit: { opacity: 0 },
2598 - transition: {
2599 - type: "tween",
2600 - duration: disableMotion ? 0 : 0.2,
2601 - ease: "easeOut"
2602 - },
2603 - className: "boot-layout__sidebar-backdrop",
2604 - onClick: () => setIsMobileSidebarOpen(false),
2605 - onKeyDown: (event) => {
2606 - if (event.key === "Escape") {
2607 - setIsMobileSidebarOpen(false);
2608 - }
2609 - },
2610 - role: "button",
2611 - tabIndex: -1,
2612 - "aria-label": (0, import_i18n10.__)(
2613 - "Close navigation panel"
2614 - )
2615 - }
2616 - ) }),
2617 - /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components14.__unstableAnimatePresence, { children: isMobileViewport && isMobileSidebarOpen && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2618 - import_components14.__unstableMotion.div,
2619 - {
2620 - initial: { x: "-100%" },
2621 - animate: { x: 0 },
2622 - exit: { x: "-100%" },
2623 - transition: {
2624 - type: "tween",
2625 - duration: disableMotion ? 0 : 0.2,
2626 - ease: "easeOut"
2627 - },
2628 - className: "boot-layout__sidebar is-mobile",
2629 - children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Sidebar, {})
2630 - }
2631 - ) }),
2632 - !isMobileViewport && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "boot-layout__sidebar", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Sidebar, {}) }),
2633 - /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "boot-layout__surfaces", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(UserThemeProvider, { color: { bg: "#ffffff" }, children: [
2634 - /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Outlet, {}),
2635 - (canvas || canvas === null) && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2636 - "div",
2637 - {
2638 - className: clsx_default(
2639 - "boot-layout__canvas",
12975 + ref: layoutRef,
12976 + className: clsx_default(style_module_default9.layout, {
12977 + [style_module_default9["has-canvas"]]: !!canvas || canvas === null,
12978 + [style_module_default9["has-full-canvas"]]: isFullScreen
12979 + }),
12980 + children: [
12981 + /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_editor5.UnsavedChangesWarning, {}),
12982 + /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SavePanel, {}),
12983 + /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12984 + import_notices3.SnackbarNotices,
2640 12985 {
2641 - "has-mobile-drawer": canvas?.isPreview && isMobileViewport
12986 + className: style_module_default9["notices-snackbar"]
2642 12987 }
2643 12988 ),
2644 - children: [
2645 - canvas?.isPreview && isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "boot-layout__mobile-sidebar-drawer", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2646 - import_components14.Button,
2647 - {
2648 - icon: menu_default,
2649 - onClick: () => setIsMobileSidebarOpen(
2650 - true
2651 - ),
2652 - label: (0, import_i18n10.__)(
2653 - "Open navigation panel"
2654 - ),
2655 - size: "compact"
2656 - }
2657 - ) }),
2658 - /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2659 - CanvasRenderer,
2660 - {
2661 - canvas,
2662 - routeContentModule
2663 - }
2664 - )
2665 - ]
2666 - }
2667 - )
2668 - ] }) })
2669 - ]
2670 - }
2671 - ) }) }) });
12989 + isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(page_default.SidebarToggleFill, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12990 + import_components14.Button,
12991 + {
12992 + icon: menu_default,
12993 + onClick: () => setIsMobileSidebarOpen(true),
12994 + label: (0, import_i18n18.__)("Open navigation panel"),
12995 + size: "compact"
12996 + }
12997 + ) }),
12998 + /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components14.__unstableAnimatePresence, { children: isMobileViewport && isMobileSidebarOpen && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12999 + import_components14.__unstableMotion.div,
13000 + {
13001 + initial: { opacity: 0 },
13002 + animate: { opacity: 1 },
13003 + exit: { opacity: 0 },
13004 + transition: {
13005 + type: "tween",
13006 + duration: disableMotion ? 0 : 0.2,
13007 + ease: "easeOut"
13008 + },
13009 + className: style_module_default9["sidebar-backdrop"],
13010 + onClick: () => setIsMobileSidebarOpen(false),
13011 + onKeyDown: (event) => {
13012 + if (event.key === "Escape") {
13013 + setIsMobileSidebarOpen(
13014 + false
13015 + );
13016 + }
13017 + },
13018 + role: "button",
13019 + tabIndex: -1,
13020 + "aria-label": (0, import_i18n18.__)(
13021 + "Close navigation panel"
13022 + )
13023 + }
13024 + ) }),
13025 + /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components14.__unstableAnimatePresence, { children: isMobileViewport && isMobileSidebarOpen && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
13026 + import_components14.__unstableMotion.div,
13027 + {
13028 + initial: { x: "-100%" },
13029 + animate: { x: 0 },
13030 + exit: { x: "-100%" },
13031 + transition: {
13032 + type: "tween",
13033 + duration: disableMotion ? 0 : 0.2,
13034 + ease: "easeOut"
13035 + },
13036 + className: clsx_default(
13037 + style_module_default9.sidebar,
13038 + style_module_default9["is-mobile"]
13039 + ),
13040 + children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Sidebar, {})
13041 + }
13042 + ) }),
13043 + !isMobileViewport && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: style_module_default9.sidebar, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Sidebar, {}) }),
13044 + /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: style_module_default9.surfaces, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
13045 + import_theme.ThemeProvider,
13046 + {
13047 + color: {
13048 + ...themeColors,
13049 + // Reset to the default background color.
13050 + background: "#fcfcfc"
13051 + },
13052 + children: [
13053 + /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Outlet, {}),
13054 + (canvas || canvas === null) && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
13055 + "div",
13056 + {
13057 + className: clsx_default(style_module_default9.canvas, {
13058 + [style_module_default9["has-mobile-drawer"]]: canvas?.isPreview && isMobileViewport
13059 + }),
13060 + children: [
13061 + canvas?.isPreview && isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
13062 + "div",
13063 + {
13064 + className: style_module_default9["mobile-sidebar-drawer"],
13065 + children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
13066 + import_components14.Button,
13067 + {
13068 + icon: menu_default,
13069 + onClick: () => setIsMobileSidebarOpen(
13070 + true
13071 + ),
13072 + label: (0, import_i18n18.__)(
13073 + "Open navigation panel"
13074 + ),
13075 + size: "compact"
13076 + }
13077 + )
13078 + }
13079 + ),
13080 + /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
13081 + CanvasRenderer,
13082 + {
13083 + canvas,
13084 + routeContentModule
13085 + }
13086 + ) })
13087 + ]
13088 + }
13089 + )
13090 + ]
13091 + }
13092 + ) })
13093 + ]
13094 + }
13095 + ) })
13096 + }
13097 + )
13098 + ] }) });
2672 13099 }
2673 13100
2674 13101 // packages/boot/build-module/components/app/router.mjs
2675 -var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
13102 +var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
13103 +var STYLE_HASH_ATTRIBUTE26 = "data-wp-hash";
13104 +function getRuntime26() {
13105 + const globalScope = globalThis;
13106 + if (globalScope.__wpStyleRuntime) {
13107 + return globalScope.__wpStyleRuntime;
13108 + }
13109 + globalScope.__wpStyleRuntime = {
13110 + documents: /* @__PURE__ */ new Map(),
13111 + styles: /* @__PURE__ */ new Map(),
13112 + injectedStyles: /* @__PURE__ */ new WeakMap()
13113 + };
13114 + if (typeof document !== "undefined") {
13115 + registerDocument26(document);
13116 + }
13117 + return globalScope.__wpStyleRuntime;
13118 +}
13119 +function documentContainsStyleHash26(targetDocument, hash) {
13120 + if (!targetDocument.head) {
13121 + return false;
13122 + }
13123 + for (const style of targetDocument.head.querySelectorAll(
13124 + `style[${STYLE_HASH_ATTRIBUTE26}]`
13125 + )) {
13126 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE26) === hash) {
13127 + return true;
13128 + }
13129 + }
13130 + return false;
13131 +}
13132 +function injectStyle26(targetDocument, hash, css) {
13133 + if (!targetDocument.head) {
13134 + return;
13135 + }
13136 + const runtime = getRuntime26();
13137 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
13138 + if (!injectedStyles) {
13139 + injectedStyles = /* @__PURE__ */ new Set();
13140 + runtime.injectedStyles.set(targetDocument, injectedStyles);
13141 + }
13142 + if (injectedStyles.has(hash)) {
13143 + return;
13144 + }
13145 + if (documentContainsStyleHash26(targetDocument, hash)) {
13146 + injectedStyles.add(hash);
13147 + return;
13148 + }
13149 + const style = targetDocument.createElement("style");
13150 + style.setAttribute(STYLE_HASH_ATTRIBUTE26, hash);
13151 + style.appendChild(targetDocument.createTextNode(css));
13152 + targetDocument.head.appendChild(style);
13153 + injectedStyles.add(hash);
13154 +}
13155 +function registerDocument26(targetDocument) {
13156 + const runtime = getRuntime26();
13157 + runtime.documents.set(
13158 + targetDocument,
13159 + (runtime.documents.get(targetDocument) ?? 0) + 1
13160 + );
13161 + for (const [hash, css] of runtime.styles) {
13162 + injectStyle26(targetDocument, hash, css);
13163 + }
13164 + return () => {
13165 + const count = runtime.documents.get(targetDocument);
13166 + if (count === void 0) {
13167 + return;
13168 + }
13169 + if (count <= 1) {
13170 + runtime.documents.delete(targetDocument);
13171 + return;
13172 + }
13173 + runtime.documents.set(targetDocument, count - 1);
13174 + };
13175 +}
13176 +function registerStyle26(hash, css) {
13177 + const runtime = getRuntime26();
13178 + runtime.styles.set(hash, css);
13179 + for (const targetDocument of runtime.documents.keys()) {
13180 + injectStyle26(targetDocument, hash, css);
13181 + }
13182 +}
13183 +if (typeof process === "undefined" || true) {
13184 + registerStyle26("b215aa5eaa", ".c8317e9ebb034cfa__layout{background:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}@media (min-width:600px){.c8317e9ebb034cfa__layout{bottom:0;inset-inline-end:0;inset-inline-start:0;min-height:calc(100vh - 46px);position:absolute;top:0}}@media (min-width:782px){.c8317e9ebb034cfa__layout{min-height:calc(100vh - 32px)}body:has(.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas) .c8317e9ebb034cfa__layout{min-height:100vh}}:where(.c8317e9ebb034cfa__layout) img{height:auto;max-width:100%}.c8317e9ebb034cfa__layout .b8f8c6cf9ae266bf__notices-snackbar{bottom:var(--wpds-dimension-size-md,32px);box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}.c8317e9ebb034cfa__layout .b8f8c6cf9ae266bf__notices-snackbar ._94ac6b8f274ce2f6__components-snackbar,.c8317e9ebb034cfa__layout .b8f8c6cf9ae266bf__notices-snackbar .components-snackbar{margin-inline:auto}.bfc3fedf39b1cf71__sidebar-backdrop{background-color:rgba(0,0,0,.5);bottom:0;cursor:var(--wpds-cursor-control,pointer);inset-inline-end:0;inset-inline-start:0;position:fixed;top:0;z-index:100002}.bb4f70cd030be0a3__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}.bb4f70cd030be0a3__sidebar._27e6d590dc5963c9__is-mobile{background:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);bottom:0;box-shadow:2px 0 8px rgba(0,0,0,.2);inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}._0eb5d3a3e94d6273__mobile-sidebar-drawer{inset-inline-end:0;inset-inline-start:0;position:fixed;top:0}._26789cb167e9f578__layout-single-page ._0eb5d3a3e94d6273__mobile-sidebar-drawer{top:46px}._0eb5d3a3e94d6273__mobile-sidebar-drawer{align-items:center;background:var(--wpds-color-background-surface-neutral,#fcfcfc);border-bottom:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);display:flex;justify-content:flex-start;padding:16px;z-index:3}.fb03501e629fd04e__canvas.fa94dab2ab1e36f3__has-mobile-drawer{padding-top:65px;position:relative}.a03baddce3ef2026__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.a03baddce3ef2026__surfaces{margin:8px}._26789cb167e9f578__layout-single-page .a03baddce3ef2026__surfaces{margin-top:0;margin-inline-start:0}}._7ffe3a3db6f69647__inspector,.d12c9efe707e6cb3__stage{background:var(--wpds-color-background-surface-neutral,#fcfcfc);border-radius:0;bottom:0;color:var(--wpds-color-foreground-content-neutral,#1e1e1e);flex:1;height:100vh;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw}._26789cb167e9f578__layout-single-page ._7ffe3a3db6f69647__inspector,._26789cb167e9f578__layout-single-page .d12c9efe707e6cb3__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){._7ffe3a3db6f69647__inspector,.d12c9efe707e6cb3__stage{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}._26789cb167e9f578__layout-single-page ._7ffe3a3db6f69647__inspector,._26789cb167e9f578__layout-single-page .d12c9efe707e6cb3__stage{height:auto}}.d12c9efe707e6cb3__stage{z-index:2}@media (min-width:782px){.d12c9efe707e6cb3__stage{z-index:auto}}._7ffe3a3db6f69647__inspector{z-index:3}@media (min-width:782px){._7ffe3a3db6f69647__inspector{z-index:auto}}.fb03501e629fd04e__canvas{background:var(--wpds-color-background-surface-neutral,#fcfcfc);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:0;bottom:0;box-shadow:0 1px 3px rgba(0,0,0,.1);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);flex:1;height:100vh;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw;z-index:1}._26789cb167e9f578__layout-single-page .fb03501e629fd04e__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.fb03501e629fd04e__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}._26789cb167e9f578__layout-single-page .fb03501e629fd04e__canvas{height:auto}._7ffe3a3db6f69647__inspector,.c8317e9ebb034cfa__layout.f7fe42ef8c67e96f__has-canvas .d12c9efe707e6cb3__stage{max-width:400px}}.fb03501e629fd04e__canvas .interface-interface-skeleton{height:100%;inset-inline-start:0!important;position:relative;top:0!important}.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .a03baddce3ef2026__surfaces{gap:0;margin:0}.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas ._7ffe3a3db6f69647__inspector,.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .d12c9efe707e6cb3__stage{display:none}.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .fb03501e629fd04e__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;inset-inline-end:0;inset-inline-start:0;margin:0;max-width:none;overflow:hidden;position:fixed;top:var(--wp-admin--admin-bar--height,0)}._26789cb167e9f578__layout-single-page .c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .fb03501e629fd04e__canvas{top:46px}@media (min-width:782px){._26789cb167e9f578__layout-single-page .c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .fb03501e629fd04e__canvas{top:32px}}@media (max-width:782px){._7ffe3a3db6f69647__inspector,.d12c9efe707e6cb3__stage,.fb03501e629fd04e__canvas:not(.fa94dab2ab1e36f3__has-mobile-drawer){height:calc(100vh - var(--wp-admin--admin-bar--height, 0px));top:var(--wp-admin--admin-bar--height,0)}._0eb5d3a3e94d6273__mobile-sidebar-drawer{top:var(--wp-admin--admin-bar--height,0)}}@media not (prefers-reduced-motion:reduce){.fb03501e629fd04e__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}.fb03501e629fd04e__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.d12c9efe707e6cb3__stage{view-transition-name:boot--stage}._7ffe3a3db6f69647__inspector{view-transition-name:boot--inspector}.fb03501e629fd04e__canvas{view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.d12c9efe707e6cb3__stage{view-transition-name:boot-safari--stage}._7ffe3a3db6f69647__inspector{view-transition-name:boot-safari--inspector}.fb03501e629fd04e__canvas{view-transition-name:boot-safari--canvas}}}@media (max-width:782px){:root:has(.c8317e9ebb034cfa__layout) *{view-transition-name:none!important}}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(root),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){:root:has(.c8317e9ebb034cfa__layout) .components-popover:first-of-type{view-transition-name:boot--components-popover}}:root:has(.c8317e9ebb034cfa__layout)::view-transition-group(boot--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-group(boot--canvas-header),:root:has(.c8317e9ebb034cfa__layout)::view-transition-group(boot--canvas-sidebar),:root:has(.c8317e9ebb034cfa__layout)::view-transition-group(boot-safari--canvas){z-index:1}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--inspector),:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--stage),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--inspector),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--stage){width:auto}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--inspector),:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--stage),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--inspector),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--stage){background:#fff;border-radius:var(--wpds-border-radius-xl,12px);height:100%;object-fit:none;object-position:left top;overflow:hidden;width:100%}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas){object-position:center top}:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--inspector):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--stage):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--inspector):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--stage):only-child{animation-name:ef68027ea03aa34b__zoomOut;will-change:transform,opacity}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--inspector):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--stage):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--inspector):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--stage):only-child{animation-name:_0752ac81dff4c432__zoomIn;will-change:transform,opacity}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--canvas):only-child{animation-name:_3a2e4dc465681136__slideFromRight;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--canvas):only-child{animation-name:_86a367ac26a1b61e__slideToRight;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas-header):only-child{animation-name:_462399c0e9d64199__slideHeaderFromTop;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas-header):only-child{animation-name:_8b272f30d43c9f38__slideHeaderToTop;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas-sidebar):only-child{animation-name:_69ed6a71d53a2e0c__slideSidebarFromRight;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas-sidebar):only-child{animation-name:bf0697a36b00caad__slideSidebarToRight;will-change:transform}@keyframes ef68027ea03aa34b__zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes _0752ac81dff4c432__zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes _3a2e4dc465681136__slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes _86a367ac26a1b61e__slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}@keyframes _462399c0e9d64199__slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes _8b272f30d43c9f38__slideHeaderToTop{to{transform:translateY(-100%)}}@keyframes _69ed6a71d53a2e0c__slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes bf0697a36b00caad__slideSidebarToRight{to{transform:translateX(100%)}}");
13185 +}
13186 +var style_module_default10 = { "layout": "c8317e9ebb034cfa__layout", "has-full-canvas": "e97bb2807a9c4687__has-full-canvas", "notices-snackbar": "b8f8c6cf9ae266bf__notices-snackbar", "components-snackbar": "_94ac6b8f274ce2f6__components-snackbar", "sidebar-backdrop": "bfc3fedf39b1cf71__sidebar-backdrop", "sidebar": "bb4f70cd030be0a3__sidebar", "is-mobile": "_27e6d590dc5963c9__is-mobile", "mobile-sidebar-drawer": "_0eb5d3a3e94d6273__mobile-sidebar-drawer", "layout-single-page": "_26789cb167e9f578__layout-single-page", "canvas": "fb03501e629fd04e__canvas", "has-mobile-drawer": "fa94dab2ab1e36f3__has-mobile-drawer", "surfaces": "a03baddce3ef2026__surfaces", "stage": "d12c9efe707e6cb3__stage", "inspector": "_7ffe3a3db6f69647__inspector", "has-canvas": "f7fe42ef8c67e96f__has-canvas", "zoomOut": "ef68027ea03aa34b__zoomOut", "zoomIn": "_0752ac81dff4c432__zoomIn", "slideFromRight": "_3a2e4dc465681136__slideFromRight", "slideToRight": "_86a367ac26a1b61e__slideToRight", "slideHeaderFromTop": "_462399c0e9d64199__slideHeaderFromTop", "slideHeaderToTop": "_8b272f30d43c9f38__slideHeaderToTop", "slideSidebarFromRight": "_69ed6a71d53a2e0c__slideSidebarFromRight", "slideSidebarToRight": "bf0697a36b00caad__slideSidebarToRight" };
2676 13187 var {
2677 13188 createLazyRoute,
2678 13189 createRouter,
2679 13190 createRootRoute,
@@ -2681,11 +13192,11 @@
2681 13192 RouterProvider,
2682 13193 createBrowserHistory,
2683 13194 parseHref,
2684 13195 useLoaderData
2685 -} = unlock(routePrivateApis6);
13196 +} = unlock2(routePrivateApis6);
2686 13197 function NotFoundComponent() {
2687 - return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "boot-layout__stage", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(page_default, { title: (0, import_i18n11.__)("Route not found"), hasPadding: true, children: (0, import_i18n11.__)("The page you're looking for does not exist") }) });
13198 + return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: style_module_default10.stage, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(page_default, { title: (0, import_i18n19.__)("Route not found"), hasPadding: true, children: (0, import_i18n19.__)("The page you're looking for does not exist") }) });
2688 13199 }
2689 13200 function createRouteFromDefinition(route, parentRoute) {
2690 13201 let tanstackRoute = createRoute({
2691 13202 getParentRoute: () => parentRoute,
@@ -2712,9 +13223,9 @@
2712 13223 params: opts.params || {},
2713 13224 search: opts.deps || {}
2714 13225 };
2715 13226 const [, loaderData, canvasData, titleData] = await Promise.all([
2716 - (0, import_data10.resolveSelect)(import_core_data6.store).getEntityRecord(
13227 + (0, import_data13.resolveSelect)(import_core_data7.store).getEntityRecord(
2717 13228 "root",
2718 13229 "__unstableBase"
2719 13230 ),
2720 13231 routeConfig.loader ? routeConfig.loader(context) : Promise.resolve(void 0),
@@ -2724,12 +13235,17 @@
2724 13235 let inspector = true;
2725 13236 if (routeConfig.inspector) {
2726 13237 inspector = await routeConfig.inspector(context);
2727 13238 }
13239 + let stage = true;
13240 + if (routeConfig.stage) {
13241 + stage = await routeConfig.stage(context);
13242 + }
2728 13243 return {
2729 13244 ...loaderData,
2730 13245 canvas: canvasData,
2731 13246 inspector,
13247 + stage,
2732 13248 title: titleData,
2733 13249 routeContentModule: route.content_module
2734 13250 };
2735 13251 },
@@ -2740,12 +13256,12 @@
2740 13256 const Stage = module.stage;
2741 13257 const Inspector = module.inspector;
2742 13258 return createLazyRoute(route.path)({
2743 13259 component: function RouteComponent() {
2744 - const { inspector: showInspector } = useLoaderData({ from: route.path }) ?? {};
2745 - return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
2746 - Stage && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "boot-layout__stage", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Stage, {}) }),
2747 - Inspector && showInspector && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "boot-layout__inspector", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Inspector, {}) })
13260 + const { inspector: showInspector, stage: showStage } = useLoaderData({ from: route.path }) ?? {};
13261 + return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
13262 + Stage && showStage && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: style_module_default10.stage, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Stage, {}) }) }),
13263 + Inspector && showInspector && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: style_module_default10.inspector, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Inspector, {}) }) })
2748 13264 ] });
2749 13265 }
2750 13266 });
2751 13267 });
@@ -2750,9 +13266,9 @@
2750 13266 });
2751 13267 });
2752 13268 return tanstackRoute;
2753 13269 }
2754 -function createRouteTree(routes, rootComponent = Root) {
13270 +function createRouteTree(routes, rootComponent = Root3) {
2755 13271 const rootRoute = createRootRoute({
2756 13272 component: rootComponent,
2757 13273 context: () => ({})
2758 13274 });
@@ -2777,11 +13293,11 @@
2777 13293 });
2778 13294 }
2779 13295 function Router({
2780 13296 routes,
2781 - rootComponent = Root
13297 + rootComponent = Root3
2782 13298 }) {
2783 - const router = (0, import_element16.useMemo)(() => {
13299 + const router = (0, import_element42.useMemo)(() => {
2784 13300 const history = createPathHistory();
2785 13301 const routeTree = createRouteTree(routes, rootComponent);
2786 13302 return createRouter({
2787 13303 history,
@@ -2799,23 +13315,104 @@
2799 13315 }
2800 13316 }
2801 13317 });
2802 13318 }, [routes, rootComponent]);
2803 - return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RouterProvider, { router });
13319 + return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RouterProvider, { router });
2804 13320 }
2805 13321
2806 13322 // packages/boot/build-module/components/root/single-page.mjs
2807 -var import_notices2 = __toESM(require_notices(), 1);
13323 +var import_notices4 = __toESM(require_notices(), 1);
2808 13324 var import_components15 = __toESM(require_components(), 1);
13325 +var import_element43 = __toESM(require_element(), 1);
2809 13326 import { privateApis as routePrivateApis7 } from "@wordpress/route";
2810 -var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
2811 -if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='be0c278a6c']")) {
2812 - const style = document.createElement("style");
2813 - style.setAttribute("data-wp-hash", "be0c278a6c");
2814 - style.appendChild(document.createTextNode(".boot-layout{background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}.boot-layout__sidebar-backdrop{background-color:#00000080;bottom:0;cursor:var(--wpds-cursor-control,pointer);left:0;position:fixed;right:0;top:0;z-index:100002}.boot-layout__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}.boot-layout__sidebar.is-mobile{background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);bottom:0;box-shadow:2px 0 8px #0003;inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.boot-layout__mobile-sidebar-drawer{left:0;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout__mobile-sidebar-drawer{top:46px}.boot-layout__mobile-sidebar-drawer{align-items:center;background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border-bottom:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);display:flex;justify-content:flex-start;padding:16px;z-index:3}.boot-layout__canvas.has-mobile-drawer{padding-top:65px;position:relative}.boot-layout__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.boot-layout__surfaces{margin:8px}.boot-layout--single-page .boot-layout__surfaces{margin-top:0;margin-inline-start:0}}.boot-layout__inspector,.boot-layout__stage{background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border-radius:0;bottom:0;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__inspector,.boot-layout__stage{border-radius:8px;height:auto;margin:0;position:static;width:auto}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:auto}}.boot-layout__stage{z-index:2}@media (min-width:782px){.boot-layout__stage{z-index:auto}}.boot-layout__inspector{z-index:3}@media (min-width:782px){.boot-layout__inspector{z-index:auto}}.boot-layout__canvas{background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:0;bottom:0;box-shadow:0 1px 3px #0000001a;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw;z-index:1}.boot-layout--single-page .boot-layout__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__canvas{border-radius:8px;height:auto;position:static;width:auto;z-index:auto}.boot-layout--single-page .boot-layout__canvas{height:auto}.boot-layout.has-canvas .boot-layout__stage,.boot-layout__inspector{max-width:400px}}.boot-layout__canvas .interface-interface-skeleton{height:100%;left:0!important;position:relative;top:0!important}.boot-layout.has-full-canvas .boot-layout__surfaces{gap:0;margin:0}.boot-layout.has-full-canvas .boot-layout__inspector,.boot-layout.has-full-canvas .boot-layout__stage{display:none}.boot-layout.has-full-canvas .boot-layout__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;left:0;margin:0;max-width:none;overflow:hidden;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:46px}@media (min-width:782px){.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:32px}}"));
2815 - document.head.appendChild(style);
13327 +var import_theme2 = __toESM(require_theme(), 1);
13328 +var import_editor6 = __toESM(require_editor(), 1);
13329 +var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
13330 +var STYLE_HASH_ATTRIBUTE27 = "data-wp-hash";
13331 +function getRuntime27() {
13332 + const globalScope = globalThis;
13333 + if (globalScope.__wpStyleRuntime) {
13334 + return globalScope.__wpStyleRuntime;
13335 + }
13336 + globalScope.__wpStyleRuntime = {
13337 + documents: /* @__PURE__ */ new Map(),
13338 + styles: /* @__PURE__ */ new Map(),
13339 + injectedStyles: /* @__PURE__ */ new WeakMap()
13340 + };
13341 + if (typeof document !== "undefined") {
13342 + registerDocument27(document);
13343 + }
13344 + return globalScope.__wpStyleRuntime;
2816 13345 }
2817 -var { useMatches: useMatches4, Outlet: Outlet2 } = unlock(routePrivateApis7);
13346 +function documentContainsStyleHash27(targetDocument, hash) {
13347 + if (!targetDocument.head) {
13348 + return false;
13349 + }
13350 + for (const style of targetDocument.head.querySelectorAll(
13351 + `style[${STYLE_HASH_ATTRIBUTE27}]`
13352 + )) {
13353 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE27) === hash) {
13354 + return true;
13355 + }
13356 + }
13357 + return false;
13358 +}
13359 +function injectStyle27(targetDocument, hash, css) {
13360 + if (!targetDocument.head) {
13361 + return;
13362 + }
13363 + const runtime = getRuntime27();
13364 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
13365 + if (!injectedStyles) {
13366 + injectedStyles = /* @__PURE__ */ new Set();
13367 + runtime.injectedStyles.set(targetDocument, injectedStyles);
13368 + }
13369 + if (injectedStyles.has(hash)) {
13370 + return;
13371 + }
13372 + if (documentContainsStyleHash27(targetDocument, hash)) {
13373 + injectedStyles.add(hash);
13374 + return;
13375 + }
13376 + const style = targetDocument.createElement("style");
13377 + style.setAttribute(STYLE_HASH_ATTRIBUTE27, hash);
13378 + style.appendChild(targetDocument.createTextNode(css));
13379 + targetDocument.head.appendChild(style);
13380 + injectedStyles.add(hash);
13381 +}
13382 +function registerDocument27(targetDocument) {
13383 + const runtime = getRuntime27();
13384 + runtime.documents.set(
13385 + targetDocument,
13386 + (runtime.documents.get(targetDocument) ?? 0) + 1
13387 + );
13388 + for (const [hash, css] of runtime.styles) {
13389 + injectStyle27(targetDocument, hash, css);
13390 + }
13391 + return () => {
13392 + const count = runtime.documents.get(targetDocument);
13393 + if (count === void 0) {
13394 + return;
13395 + }
13396 + if (count <= 1) {
13397 + runtime.documents.delete(targetDocument);
13398 + return;
13399 + }
13400 + runtime.documents.set(targetDocument, count - 1);
13401 + };
13402 +}
13403 +function registerStyle27(hash, css) {
13404 + const runtime = getRuntime27();
13405 + runtime.styles.set(hash, css);
13406 + for (const targetDocument of runtime.documents.keys()) {
13407 + injectStyle27(targetDocument, hash, css);
13408 + }
13409 +}
13410 +if (typeof process === "undefined" || true) {
13411 + registerStyle27("b215aa5eaa", ".c8317e9ebb034cfa__layout{background:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}@media (min-width:600px){.c8317e9ebb034cfa__layout{bottom:0;inset-inline-end:0;inset-inline-start:0;min-height:calc(100vh - 46px);position:absolute;top:0}}@media (min-width:782px){.c8317e9ebb034cfa__layout{min-height:calc(100vh - 32px)}body:has(.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas) .c8317e9ebb034cfa__layout{min-height:100vh}}:where(.c8317e9ebb034cfa__layout) img{height:auto;max-width:100%}.c8317e9ebb034cfa__layout .b8f8c6cf9ae266bf__notices-snackbar{bottom:var(--wpds-dimension-size-md,32px);box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}.c8317e9ebb034cfa__layout .b8f8c6cf9ae266bf__notices-snackbar ._94ac6b8f274ce2f6__components-snackbar,.c8317e9ebb034cfa__layout .b8f8c6cf9ae266bf__notices-snackbar .components-snackbar{margin-inline:auto}.bfc3fedf39b1cf71__sidebar-backdrop{background-color:rgba(0,0,0,.5);bottom:0;cursor:var(--wpds-cursor-control,pointer);inset-inline-end:0;inset-inline-start:0;position:fixed;top:0;z-index:100002}.bb4f70cd030be0a3__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}.bb4f70cd030be0a3__sidebar._27e6d590dc5963c9__is-mobile{background:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);bottom:0;box-shadow:2px 0 8px rgba(0,0,0,.2);inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}._0eb5d3a3e94d6273__mobile-sidebar-drawer{inset-inline-end:0;inset-inline-start:0;position:fixed;top:0}._26789cb167e9f578__layout-single-page ._0eb5d3a3e94d6273__mobile-sidebar-drawer{top:46px}._0eb5d3a3e94d6273__mobile-sidebar-drawer{align-items:center;background:var(--wpds-color-background-surface-neutral,#fcfcfc);border-bottom:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);display:flex;justify-content:flex-start;padding:16px;z-index:3}.fb03501e629fd04e__canvas.fa94dab2ab1e36f3__has-mobile-drawer{padding-top:65px;position:relative}.a03baddce3ef2026__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.a03baddce3ef2026__surfaces{margin:8px}._26789cb167e9f578__layout-single-page .a03baddce3ef2026__surfaces{margin-top:0;margin-inline-start:0}}._7ffe3a3db6f69647__inspector,.d12c9efe707e6cb3__stage{background:var(--wpds-color-background-surface-neutral,#fcfcfc);border-radius:0;bottom:0;color:var(--wpds-color-foreground-content-neutral,#1e1e1e);flex:1;height:100vh;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw}._26789cb167e9f578__layout-single-page ._7ffe3a3db6f69647__inspector,._26789cb167e9f578__layout-single-page .d12c9efe707e6cb3__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){._7ffe3a3db6f69647__inspector,.d12c9efe707e6cb3__stage{border-radius:var(--wpds-border-radius-xl,12px);height:auto;margin:0;position:static;width:auto}._26789cb167e9f578__layout-single-page ._7ffe3a3db6f69647__inspector,._26789cb167e9f578__layout-single-page .d12c9efe707e6cb3__stage{height:auto}}.d12c9efe707e6cb3__stage{z-index:2}@media (min-width:782px){.d12c9efe707e6cb3__stage{z-index:auto}}._7ffe3a3db6f69647__inspector{z-index:3}@media (min-width:782px){._7ffe3a3db6f69647__inspector{z-index:auto}}.fb03501e629fd04e__canvas{background:var(--wpds-color-background-surface-neutral,#fcfcfc);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:0;bottom:0;box-shadow:0 1px 3px rgba(0,0,0,.1);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);flex:1;height:100vh;inset-inline-end:0;inset-inline-start:0;margin:0;overflow-y:auto;position:relative;position:fixed;top:0;width:100vw;z-index:1}._26789cb167e9f578__layout-single-page .fb03501e629fd04e__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.fb03501e629fd04e__canvas{border-radius:var(--wpds-border-radius-xl,12px);height:auto;position:static;width:auto;z-index:auto}._26789cb167e9f578__layout-single-page .fb03501e629fd04e__canvas{height:auto}._7ffe3a3db6f69647__inspector,.c8317e9ebb034cfa__layout.f7fe42ef8c67e96f__has-canvas .d12c9efe707e6cb3__stage{max-width:400px}}.fb03501e629fd04e__canvas .interface-interface-skeleton{height:100%;inset-inline-start:0!important;position:relative;top:0!important}.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .a03baddce3ef2026__surfaces{gap:0;margin:0}.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas ._7ffe3a3db6f69647__inspector,.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .d12c9efe707e6cb3__stage{display:none}.c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .fb03501e629fd04e__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;inset-inline-end:0;inset-inline-start:0;margin:0;max-width:none;overflow:hidden;position:fixed;top:var(--wp-admin--admin-bar--height,0)}._26789cb167e9f578__layout-single-page .c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .fb03501e629fd04e__canvas{top:46px}@media (min-width:782px){._26789cb167e9f578__layout-single-page .c8317e9ebb034cfa__layout.e97bb2807a9c4687__has-full-canvas .fb03501e629fd04e__canvas{top:32px}}@media (max-width:782px){._7ffe3a3db6f69647__inspector,.d12c9efe707e6cb3__stage,.fb03501e629fd04e__canvas:not(.fa94dab2ab1e36f3__has-mobile-drawer){height:calc(100vh - var(--wp-admin--admin-bar--height, 0px));top:var(--wp-admin--admin-bar--height,0)}._0eb5d3a3e94d6273__mobile-sidebar-drawer{top:var(--wp-admin--admin-bar--height,0)}}@media not (prefers-reduced-motion:reduce){.fb03501e629fd04e__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}.fb03501e629fd04e__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.d12c9efe707e6cb3__stage{view-transition-name:boot--stage}._7ffe3a3db6f69647__inspector{view-transition-name:boot--inspector}.fb03501e629fd04e__canvas{view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.d12c9efe707e6cb3__stage{view-transition-name:boot-safari--stage}._7ffe3a3db6f69647__inspector{view-transition-name:boot-safari--inspector}.fb03501e629fd04e__canvas{view-transition-name:boot-safari--canvas}}}@media (max-width:782px){:root:has(.c8317e9ebb034cfa__layout) *{view-transition-name:none!important}}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(root),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){:root:has(.c8317e9ebb034cfa__layout) .components-popover:first-of-type{view-transition-name:boot--components-popover}}:root:has(.c8317e9ebb034cfa__layout)::view-transition-group(boot--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-group(boot--canvas-header),:root:has(.c8317e9ebb034cfa__layout)::view-transition-group(boot--canvas-sidebar),:root:has(.c8317e9ebb034cfa__layout)::view-transition-group(boot-safari--canvas){z-index:1}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--inspector),:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--stage),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--inspector),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--stage){width:auto}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--inspector),:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--stage),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--inspector),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--stage){background:#fff;border-radius:var(--wpds-border-radius-xl,12px);height:100%;object-fit:none;object-position:left top;overflow:hidden;width:100%}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas),:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas){object-position:center top}:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--inspector):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--stage):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--inspector):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--stage):only-child{animation-name:ef68027ea03aa34b__zoomOut;will-change:transform,opacity}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--inspector):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--stage):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--inspector):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--stage):only-child{animation-name:_0752ac81dff4c432__zoomIn;will-change:transform,opacity}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot-safari--canvas):only-child{animation-name:_3a2e4dc465681136__slideFromRight;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas):only-child,:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot-safari--canvas):only-child{animation-name:_86a367ac26a1b61e__slideToRight;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas-header):only-child{animation-name:_462399c0e9d64199__slideHeaderFromTop;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas-header):only-child{animation-name:_8b272f30d43c9f38__slideHeaderToTop;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-new(boot--canvas-sidebar):only-child{animation-name:_69ed6a71d53a2e0c__slideSidebarFromRight;will-change:transform}:root:has(.c8317e9ebb034cfa__layout)::view-transition-old(boot--canvas-sidebar):only-child{animation-name:bf0697a36b00caad__slideSidebarToRight;will-change:transform}@keyframes ef68027ea03aa34b__zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes _0752ac81dff4c432__zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes _3a2e4dc465681136__slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes _86a367ac26a1b61e__slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}@keyframes _462399c0e9d64199__slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes _8b272f30d43c9f38__slideHeaderToTop{to{transform:translateY(-100%)}}@keyframes _69ed6a71d53a2e0c__slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes bf0697a36b00caad__slideSidebarToRight{to{transform:translateX(100%)}}");
13412 +}
13413 +var style_module_default11 = { "layout": "c8317e9ebb034cfa__layout", "has-full-canvas": "e97bb2807a9c4687__has-full-canvas", "notices-snackbar": "b8f8c6cf9ae266bf__notices-snackbar", "components-snackbar": "_94ac6b8f274ce2f6__components-snackbar", "sidebar-backdrop": "bfc3fedf39b1cf71__sidebar-backdrop", "sidebar": "bb4f70cd030be0a3__sidebar", "is-mobile": "_27e6d590dc5963c9__is-mobile", "mobile-sidebar-drawer": "_0eb5d3a3e94d6273__mobile-sidebar-drawer", "layout-single-page": "_26789cb167e9f578__layout-single-page", "canvas": "fb03501e629fd04e__canvas", "has-mobile-drawer": "fa94dab2ab1e36f3__has-mobile-drawer", "surfaces": "a03baddce3ef2026__surfaces", "stage": "d12c9efe707e6cb3__stage", "inspector": "_7ffe3a3db6f69647__inspector", "has-canvas": "f7fe42ef8c67e96f__has-canvas", "zoomOut": "ef68027ea03aa34b__zoomOut", "zoomIn": "_0752ac81dff4c432__zoomIn", "slideFromRight": "_3a2e4dc465681136__slideFromRight", "slideToRight": "_86a367ac26a1b61e__slideToRight", "slideHeaderFromTop": "_462399c0e9d64199__slideHeaderFromTop", "slideHeaderToTop": "_8b272f30d43c9f38__slideHeaderToTop", "slideSidebarFromRight": "_69ed6a71d53a2e0c__slideSidebarFromRight", "slideSidebarToRight": "bf0697a36b00caad__slideSidebarToRight" };
13414 +var { useMatches: useMatches4, Outlet: Outlet2 } = unlock2(routePrivateApis7);
2818 13415 function RootSinglePage() {
2819 13416 const matches = useMatches4();
2820 13417 const currentMatch = matches[matches.length - 1];
2821 13418 const canvas = currentMatch?.loaderData?.canvas;
@@ -2821,42 +13418,78 @@
2821 13418 const canvas = currentMatch?.loaderData?.canvas;
2822 13419 const routeContentModule = currentMatch?.loaderData?.routeContentModule;
2823 13420 const isFullScreen = canvas && !canvas.isPreview;
2824 13421 useRouteTitle();
2825 - return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components15.SlotFillProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(UserThemeProvider, { isRoot: true, color: { bg: "#f8f8f8" }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(UserThemeProvider, { color: { bg: "#1d2327" }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
2826 - "div",
2827 - {
2828 - className: clsx_default(
2829 - "boot-layout boot-layout--single-page",
2830 - {
2831 - "has-canvas": !!canvas || canvas === null,
2832 - "has-full-canvas": isFullScreen
2833 - }
2834 - ),
2835 - children: [
2836 - /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SavePanel, {}),
2837 - /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_notices2.SnackbarNotices, { className: "boot-notices__snackbar" }),
2838 - /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "boot-layout__surfaces", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(UserThemeProvider, { color: { bg: "#ffffff" }, children: [
2839 - /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Outlet2, {}),
2840 - (canvas || canvas === null) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "boot-layout__canvas", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2841 - CanvasRenderer,
2842 - {
2843 - canvas,
2844 - routeContentModule
2845 - }
2846 - ) })
2847 - ] }) })
2848 - ]
2849 - }
2850 - ) }) }) });
13422 + const themeColors = (0, import_element43.useMemo)(getAdminThemeColors, []);
13423 + const layoutRef = useSyncBodyBackground();
13424 + return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_components15.SlotFillProvider, { children: [
13425 + /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(PluginArea, {}),
13426 + /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
13427 + import_theme2.ThemeProvider,
13428 + {
13429 + isRoot: true,
13430 + color: { ...themeColors, background: "#f8f8f8" },
13431 + children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_theme2.ThemeProvider, { color: themeColors, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
13432 + "div",
13433 + {
13434 + ref: layoutRef,
13435 + className: clsx_default(
13436 + style_module_default11.layout,
13437 + style_module_default11["layout-single-page"],
13438 + {
13439 + [style_module_default11["has-canvas"]]: !!canvas || canvas === null,
13440 + [style_module_default11["has-full-canvas"]]: isFullScreen
13441 + }
13442 + ),
13443 + children: [
13444 + /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_editor6.UnsavedChangesWarning, {}),
13445 + /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SavePanel, {}),
13446 + /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
13447 + import_notices4.SnackbarNotices,
13448 + {
13449 + className: style_module_default11["notices-snackbar"]
13450 + }
13451 + ),
13452 + /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: style_module_default11.surfaces, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
13453 + import_theme2.ThemeProvider,
13454 + {
13455 + color: {
13456 + ...themeColors,
13457 + // Reset to the default background color.
13458 + background: "#fcfcfc"
13459 + },
13460 + children: [
13461 + /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Outlet2, {}),
13462 + (canvas || canvas === null) && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: style_module_default11.canvas, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
13463 + CanvasRenderer,
13464 + {
13465 + canvas,
13466 + routeContentModule
13467 + }
13468 + ) })
13469 + ]
13470 + }
13471 + ) })
13472 + ]
13473 + }
13474 + ) })
13475 + }
13476 + )
13477 + ] });
2851 13478 }
2852 13479
2853 13480 // packages/boot/build-module/components/app/index.mjs
2854 -var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
13481 +var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
2855 13482 function App({ rootComponent }) {
2856 - const routes = (0, import_data11.useSelect)((select) => select(store).getRoutes(), []);
2857 - return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Router, { routes, rootComponent });
13483 + const routes = (0, import_data14.useSelect)((select) => select(store).getRoutes(), []);
13484 + return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Router, { routes, rootComponent });
2858 13485 }
13486 +async function runInitModules(initModules) {
13487 + for (const moduleId of initModules ?? []) {
13488 + const module = await import(moduleId);
13489 + await module.init();
13490 + }
13491 +}
2859 13492 async function init({
2860 13493 mountId,
2861 13494 menuItems,
2862 13495 routes,
@@ -2863,59 +13496,68 @@
2863 13496 initModules,
2864 13497 dashboardLink
2865 13498 }) {
2866 13499 (menuItems ?? []).forEach((menuItem) => {
2867 - (0, import_data11.dispatch)(store).registerMenuItem(menuItem.id, menuItem);
13500 + (0, import_data14.dispatch)(store).registerMenuItem(menuItem.id, menuItem);
2868 13501 });
2869 13502 (routes ?? []).forEach((route) => {
2870 - (0, import_data11.dispatch)(store).registerRoute(route);
13503 + (0, import_data14.dispatch)(store).registerRoute(route);
2871 13504 });
2872 13505 if (dashboardLink) {
2873 - (0, import_data11.dispatch)(store).setDashboardLink(dashboardLink);
13506 + (0, import_data14.dispatch)(store).setDashboardLink(dashboardLink);
2874 13507 }
2875 - for (const moduleId of initModules ?? []) {
2876 - const module = await import(moduleId);
2877 - await module.init();
2878 - }
13508 + await runInitModules(initModules);
2879 13509 const rootElement = document.getElementById(mountId);
2880 13510 if (rootElement) {
2881 - const root = (0, import_element17.createRoot)(rootElement);
13511 + const root = (0, import_element44.createRoot)(rootElement);
2882 13512 root.render(
2883 - /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_element17.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(App, {}) })
13513 + /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_element44.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(App, {}) })
2884 13514 );
2885 13515 }
2886 13516 }
2887 13517 async function initSinglePage({
2888 13518 mountId,
2889 - routes
13519 + routes,
13520 + initModules
2890 13521 }) {
2891 13522 (routes ?? []).forEach((route) => {
2892 - (0, import_data11.dispatch)(store).registerRoute(route);
13523 + (0, import_data14.dispatch)(store).registerRoute(route);
2893 13524 });
13525 + await runInitModules(initModules);
2894 13526 const rootElement = document.getElementById(mountId);
2895 13527 if (rootElement) {
2896 - const root = (0, import_element17.createRoot)(rootElement);
13528 + const root = (0, import_element44.createRoot)(rootElement);
2897 13529 root.render(
2898 - /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_element17.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(App, { rootComponent: RootSinglePage }) })
13530 + /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_element44.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(App, { rootComponent: RootSinglePage }) })
2899 13531 );
2900 13532 }
2901 13533 }
2902 -
2903 -// packages/boot/build-module/index.mjs
2904 -if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='fd7d52554d']")) {
2905 - const style = document.createElement("style");
2906 - style.setAttribute("data-wp-hash", "fd7d52554d");
2907 - style.appendChild(document.createTextNode(':root{--wpds-border-radius-xs:1px;--wpds-border-radius-sm:2px;--wpds-border-radius-md:4px;--wpds-border-radius-lg:8px;--wpds-border-width-xs:1px;--wpds-border-width-sm:2px;--wpds-border-width-md:4px;--wpds-border-width-lg:8px;--wpds-border-width-focus:2px;--wpds-color-bg-surface-neutral:#fcfcfc;--wpds-color-bg-surface-neutral-strong:#fff;--wpds-color-bg-surface-neutral-weak:#f4f4f4;--wpds-color-bg-surface-brand:#ecf0fa;--wpds-color-bg-surface-success:#c6f7cd;--wpds-color-bg-surface-success-weak:#ebffed;--wpds-color-bg-surface-info:#deebfa;--wpds-color-bg-surface-info-weak:#f3f9ff;--wpds-color-bg-surface-warning:#fde6be;--wpds-color-bg-surface-warning-weak:#fff7e1;--wpds-color-bg-surface-caution:#fee995;--wpds-color-bg-surface-caution-weak:#fff9ca;--wpds-color-bg-surface-error:#f6e6e3;--wpds-color-bg-surface-error-weak:#fff6f5;--wpds-color-bg-interactive-neutral-strong:#2d2d2d;--wpds-color-bg-interactive-neutral-strong-active:#1e1e1e;--wpds-color-bg-interactive-neutral-strong-disabled:#e6e6e6;--wpds-color-bg-interactive-neutral-weak:#0000;--wpds-color-bg-interactive-neutral-weak-active:#ededed;--wpds-color-bg-interactive-neutral-weak-disabled:#0000;--wpds-color-bg-interactive-brand-strong:#3858e9;--wpds-color-bg-interactive-brand-strong-active:#2e49d9;--wpds-color-bg-interactive-brand-weak:#0000;--wpds-color-bg-interactive-brand-weak-active:#e6eaf4;--wpds-color-bg-interactive-error:#0000;--wpds-color-bg-interactive-error-active:#fff6f5;--wpds-color-bg-interactive-error-strong:#cc1818;--wpds-color-bg-interactive-error-strong-active:#b90000;--wpds-color-bg-interactive-error-weak:#0000;--wpds-color-bg-interactive-error-weak-active:#f6e6e3;--wpds-color-bg-track-neutral-weak:#e4e4e4;--wpds-color-bg-track-neutral:#dbdbdb;--wpds-color-bg-thumb-neutral-weak:#8d8d8d;--wpds-color-bg-thumb-neutral-weak-active:#6e6e6e;--wpds-color-bg-thumb-brand:#3858e9;--wpds-color-bg-thumb-brand-active:#3858e9;--wpds-color-bg-thumb-neutral-disabled:#dbdbdb;--wpds-color-fg-content-neutral:#1e1e1e;--wpds-color-fg-content-neutral-weak:#707070;--wpds-color-fg-content-success:#002900;--wpds-color-fg-content-success-weak:#008030;--wpds-color-fg-content-info:#001b4f;--wpds-color-fg-content-info-weak:#006bd7;--wpds-color-fg-content-warning:#2e1900;--wpds-color-fg-content-warning-weak:#926300;--wpds-color-fg-content-caution:#281d00;--wpds-color-fg-content-caution-weak:#826a00;--wpds-color-fg-content-error:#470000;--wpds-color-fg-content-error-weak:#cc1818;--wpds-color-fg-interactive-neutral:#1e1e1e;--wpds-color-fg-interactive-neutral-active:#1e1e1e;--wpds-color-fg-interactive-neutral-disabled:#8d8d8d;--wpds-color-fg-interactive-neutral-strong:#f0f0f0;--wpds-color-fg-interactive-neutral-strong-active:#f0f0f0;--wpds-color-fg-interactive-neutral-strong-disabled:#8d8d8d;--wpds-color-fg-interactive-neutral-weak:#707070;--wpds-color-fg-interactive-neutral-weak-disabled:#8d8d8d;--wpds-color-fg-interactive-brand:#3858e9;--wpds-color-fg-interactive-brand-active:#3858e9;--wpds-color-fg-interactive-brand-strong:#eff0f2;--wpds-color-fg-interactive-brand-strong-active:#eff0f2;--wpds-color-fg-interactive-error:#cc1818;--wpds-color-fg-interactive-error-active:#cc1818;--wpds-color-fg-interactive-error-strong:#f2efef;--wpds-color-fg-interactive-error-strong-active:#f2efef;--wpds-color-stroke-surface-neutral:#dbdbdb;--wpds-color-stroke-surface-neutral-weak:#e4e4e4;--wpds-color-stroke-surface-neutral-strong:#8d8d8d;--wpds-color-stroke-surface-brand:#a3b1d4;--wpds-color-stroke-surface-brand-strong:#3858e9;--wpds-color-stroke-surface-success:#8ac894;--wpds-color-stroke-surface-success-strong:#008030;--wpds-color-stroke-surface-info:#9fbcdc;--wpds-color-stroke-surface-info-strong:#006bd7;--wpds-color-stroke-surface-warning:#d0b481;--wpds-color-stroke-surface-warning-strong:#926300;--wpds-color-stroke-surface-error:#daa39b;--wpds-color-stroke-surface-error-strong:#cc1818;--wpds-color-stroke-interactive-neutral:#8d8d8d;--wpds-color-stroke-interactive-neutral-active:#6e6e6e;--wpds-color-stroke-interactive-neutral-disabled:#dbdbdb;--wpds-color-stroke-interactive-neutral-strong:#6e6e6e;--wpds-color-stroke-interactive-brand:#3858e9;--wpds-color-stroke-interactive-brand-active:#2337c8;--wpds-color-stroke-interactive-error:#cc1818;--wpds-color-stroke-interactive-error-active:#9d0000;--wpds-color-stroke-interactive-error-strong:#cc1818;--wpds-color-stroke-focus-brand:#3858e9;--wpds-cursor-control:pointer;--wpds-dimension-base:4px;--wpds-dimension-padding-xs:4px;--wpds-dimension-padding-sm:8px;--wpds-dimension-padding-md:12px;--wpds-dimension-padding-lg:16px;--wpds-dimension-padding-xl:20px;--wpds-dimension-padding-2xl:24px;--wpds-dimension-padding-3xl:32px;--wpds-dimension-gap-xs:4px;--wpds-dimension-gap-sm:8px;--wpds-dimension-gap-md:12px;--wpds-dimension-gap-lg:16px;--wpds-dimension-gap-xl:24px;--wpds-dimension-gap-2xl:32px;--wpds-dimension-gap-3xl:40px;--wpds-dimension-surface-width-xs:240px;--wpds-dimension-surface-width-sm:320px;--wpds-dimension-surface-width-md:400px;--wpds-dimension-surface-width-lg:560px;--wpds-dimension-surface-width-xl:720px;--wpds-dimension-surface-width-2xl:960px;--wpds-elevation-xs:0 1px 1px 0 #00000008,0 1px 2px 0 #00000005,0 3px 3px 0 #00000005,0 4px 4px 0 #00000003;--wpds-elevation-sm:0 1px 2px 0 #0000000d,0 2px 3px 0 #0000000a,0 6px 6px 0 #00000008,0 8px 8px 0 #00000005;--wpds-elevation-md:0 2px 3px 0 #0000000d,0 4px 5px 0 #0000000a,0 12px 12px 0 #00000008,0 16px 16px 0 #00000005;--wpds-elevation-lg:0 5px 15px 0 #00000014,0 15px 27px 0 #00000012,0 30px 36px 0 #0000000a,0 50px 43px 0 #00000005;--wpds-motion-duration-xs:50ms;--wpds-motion-duration-sm:100ms;--wpds-motion-duration-md:200ms;--wpds-motion-duration-lg:300ms;--wpds-motion-duration-xl:400ms;--wpds-motion-easing-subtle:cubic-bezier(0.15,0,0.15,1);--wpds-motion-easing-balanced:cubic-bezier(0.4,0,0.2,1);--wpds-motion-easing-expressive:cubic-bezier(0.25,0,0,1);--wpds-typography-font-family-heading:-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif;--wpds-typography-font-family-body:-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif;--wpds-typography-font-family-mono:"Menlo","Consolas",monaco,monospace;--wpds-typography-font-size-xs:11px;--wpds-typography-font-size-sm:12px;--wpds-typography-font-size-md:13px;--wpds-typography-font-size-lg:15px;--wpds-typography-font-size-xl:20px;--wpds-typography-font-size-2xl:32px;--wpds-typography-line-height-xs:16px;--wpds-typography-line-height-sm:20px;--wpds-typography-line-height-md:24px;--wpds-typography-line-height-lg:28px;--wpds-typography-line-height-xl:32px;--wpds-typography-line-height-2xl:40px;--wpds-typography-font-weight-regular:400;--wpds-typography-font-weight-medium:499}[data-wpds-theme-provider-id][data-wpds-density=compact]{--wpds-dimension-padding-xs:4px;--wpds-dimension-padding-sm:4px;--wpds-dimension-padding-md:8px;--wpds-dimension-padding-lg:12px;--wpds-dimension-padding-xl:16px;--wpds-dimension-padding-2xl:20px;--wpds-dimension-padding-3xl:24px;--wpds-dimension-gap-xs:4px;--wpds-dimension-gap-sm:4px;--wpds-dimension-gap-md:8px;--wpds-dimension-gap-lg:12px;--wpds-dimension-gap-xl:20px;--wpds-dimension-gap-2xl:24px;--wpds-dimension-gap-3xl:32px}[data-wpds-theme-provider-id][data-wpds-density=comfortable]{--wpds-dimension-padding-xs:8px;--wpds-dimension-padding-sm:12px;--wpds-dimension-padding-md:16px;--wpds-dimension-padding-lg:20px;--wpds-dimension-padding-xl:24px;--wpds-dimension-padding-2xl:32px;--wpds-dimension-padding-3xl:40px;--wpds-dimension-gap-xs:8px;--wpds-dimension-gap-sm:12px;--wpds-dimension-gap-md:16px;--wpds-dimension-gap-lg:20px;--wpds-dimension-gap-xl:32px;--wpds-dimension-gap-2xl:40px;--wpds-dimension-gap-3xl:48px}[data-wpds-theme-provider-id][data-wpds-density=default]{--wpds-dimension-base:4px;--wpds-dimension-padding-xs:4px;--wpds-dimension-padding-sm:8px;--wpds-dimension-padding-md:12px;--wpds-dimension-padding-lg:16px;--wpds-dimension-padding-xl:20px;--wpds-dimension-padding-2xl:24px;--wpds-dimension-padding-3xl:32px;--wpds-dimension-gap-xs:4px;--wpds-dimension-gap-sm:8px;--wpds-dimension-gap-md:12px;--wpds-dimension-gap-lg:16px;--wpds-dimension-gap-xl:24px;--wpds-dimension-gap-2xl:32px;--wpds-dimension-gap-3xl:40px;--wpds-dimension-surface-width-xs:240px;--wpds-dimension-surface-width-sm:320px;--wpds-dimension-surface-width-md:400px;--wpds-dimension-surface-width-lg:560px;--wpds-dimension-surface-width-xl:720px;--wpds-dimension-surface-width-2xl:960px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wpds-border-width-focus:1.5px}}@media (min-width:600px){.boot-layout-container .boot-layout{bottom:0;left:0;min-height:calc(100vh - 46px);position:absolute;right:0;top:0}}@media (min-width:782px){.boot-layout-container .boot-layout{min-height:calc(100vh - 32px)}body:has(.boot-layout.has-full-canvas) .boot-layout-container .boot-layout{min-height:100vh}}.boot-layout-container .boot-layout img{height:auto;max-width:100%}.boot-layout .boot-notices__snackbar{bottom:24px;box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}.boot-layout .boot-notices__snackbar .components-snackbar{margin-inline:auto}'));
2908 - document.head.appendChild(style);
2909 -}
2910 -if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='cc217bc358']")) {
2911 - const style = document.createElement("style");
2912 - style.setAttribute("data-wp-hash", "cc217bc358");
2913 - style.appendChild(document.createTextNode("@media (max-width:782px){*{view-transition-name:none!important}}::view-transition-new(root),::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){.boot-layout__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}.boot-layout__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.boot-layout.has-full-canvas .boot-layout__canvas .boot-site-icon-link,.boot-layout:not(.has-full-canvas) .boot-site-hub .boot-site-icon-link{view-transition-name:boot--site-icon-link}.boot-layout__stage{view-transition-name:boot--stage}.boot-layout__inspector{view-transition-name:boot--inspector}.boot-layout__canvas.is-full-canvas .interface-interface-skeleton__content,.boot-layout__canvas:not(.is-full-canvas){view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.boot-layout__stage{view-transition-name:boot-safari--stage}.boot-layout__inspector{view-transition-name:boot-safari--inspector}.boot-layout__canvas.is-full-canvas .interface-interface-skeleton__content,.boot-layout__canvas:not(.is-full-canvas){view-transition-name:boot-safari--canvas}}.components-popover:first-of-type{view-transition-name:boot--components-popover}}::view-transition-group(boot--canvas),::view-transition-group(boot--canvas-header),::view-transition-group(boot--canvas-sidebar),::view-transition-group(boot-safari--canvas){z-index:1}::view-transition-group(boot--site-icon-link){z-index:2}::view-transition-new(boot--site-icon-link),::view-transition-old(boot--site-icon-link){animation:none}::view-transition-new(boot-safari--canvas),::view-transition-new(boot-safari--inspector),::view-transition-new(boot-safari--stage),::view-transition-old(boot-safari--canvas),::view-transition-old(boot-safari--inspector),::view-transition-old(boot-safari--stage){width:auto}::view-transition-new(boot--canvas),::view-transition-new(boot--inspector),::view-transition-new(boot--stage),::view-transition-old(boot--canvas),::view-transition-old(boot--inspector),::view-transition-old(boot--stage){background:#fff;border-radius:8px;height:100%;object-fit:none;object-position:left top;overflow:hidden;width:100%}::view-transition-new(boot--canvas),::view-transition-old(boot--canvas){object-position:center top}::view-transition-old(boot--inspector):only-child,::view-transition-old(boot--stage):only-child,::view-transition-old(boot-safari--inspector):only-child,::view-transition-old(boot-safari--stage):only-child{animation-name:zoomOut;will-change:transform,opacity}::view-transition-new(boot--inspector):only-child,::view-transition-new(boot--stage):only-child,::view-transition-new(boot-safari--inspector):only-child,::view-transition-new(boot-safari--stage):only-child{animation-name:zoomIn;will-change:transform,opacity}@keyframes zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}::view-transition-new(boot--canvas):only-child,::view-transition-new(boot-safari--canvas):only-child{animation-name:slideFromRight;will-change:transform}::view-transition-old(boot--canvas):only-child,::view-transition-old(boot-safari--canvas):only-child{animation-name:slideToRight;will-change:transform}@keyframes slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}::view-transition-new(boot--canvas-header):only-child{animation-name:slideHeaderFromTop;will-change:transform}::view-transition-old(boot--canvas-header):only-child{animation-name:slideHeaderToTop;will-change:transform}@keyframes slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes slideHeaderToTop{to{transform:translateY(-100%)}}::view-transition-new(boot--canvas-sidebar):only-child{animation-name:slideSidebarFromRight;will-change:transform}::view-transition-old(boot--canvas-sidebar):only-child{animation-name:slideSidebarToRight;will-change:transform}@keyframes slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes slideSidebarToRight{to{transform:translateX(100%)}}"));
2914 - document.head.appendChild(style);
2915 -}
2916 13534 export {
2917 13535 init,
2918 13536 initSinglePage,
2919 13537 store
2920 13538 };
13539 +/*! Bundled license information:
13540 +
13541 +use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
13542 + (**
13543 + * @license React
13544 + * use-sync-external-store-shim.development.js
13545 + *
13546 + * Copyright (c) Meta Platforms, Inc. and affiliates.
13547 + *
13548 + * This source code is licensed under the MIT license found in the
13549 + * LICENSE file in the root directory of this source tree.
13550 + *)
13551 +
13552 +use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
13553 + (**
13554 + * @license React
13555 + * use-sync-external-store-shim/with-selector.development.js
13556 + *
13557 + * Copyright (c) Meta Platforms, Inc. and affiliates.
13558 + *
13559 + * This source code is licensed under the MIT license found in the
13560 + * LICENSE file in the root directory of this source tree.
13561 + *)
13562 +*/
2921 13563 //# sourceMappingURL=index.js.map