@oomol-lab/open-flow 0.1.0-beta.4 → 0.1.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/browser/{DesignerIcon-DdfuH2jW.js → DesignerIcon-XKBRy_0Q.js} +640 -640
  2. package/dist/browser/createResourceDialog-Cf7QpXp6.js +505 -0
  3. package/dist/browser/{dist-BMqL-qR5.js → dist-BMRLCebL.js} +291 -292
  4. package/dist/browser/{dist-DWADUsVB.js → dist-By46o5UV.js} +47 -47
  5. package/dist/browser/{dist-CJpzJrLM.js → dist-Cc0y2Pli.js} +811 -812
  6. package/dist/browser/{dist-DUzA0Ukh.js → dist-Dg_VXC8f.js} +134 -135
  7. package/dist/browser/{dist-3Mj8q8Pr.js → dist-DmuE3M0R.js} +53 -54
  8. package/dist/browser/{dist-BN4ZCyOB.js → dist-DpDLsYtO.js} +14 -15
  9. package/dist/browser/dist-DxahK_I8.js +2688 -0
  10. package/dist/browser/{dist-CPuF50D9.js → dist-meg_oHVR.js} +335 -335
  11. package/dist/browser/{esm-C9jQK70n.js → esm-CTcBY7hh.js} +5 -6
  12. package/dist/browser/flow-authoring-module.d.ts +2 -2
  13. package/dist/browser/flow-authoring-node.d.ts +2 -2
  14. package/dist/browser/flow-authoring.js +475 -209
  15. package/dist/browser/flow-change.d.ts +98 -8
  16. package/dist/browser/flow-change.js +319 -96
  17. package/dist/browser/{flowChanges-Bs-ZcJV8.js → flowChanges-BDqD_Q4G.js} +1628 -1555
  18. package/dist/browser/{flowRunInputEditorStore-BYa8zFLC.js → flowRunInputEditorStore-DDidwd8h.js} +9 -1
  19. package/dist/browser/{flowWorkspace-BewofPeU.js → flowWorkspace-CPBHm14t.js} +9803 -9769
  20. package/dist/browser/{getPseudoElementBounds-qDxSDwzN.js → getPseudoElementBounds-5LArT6Xc.js} +494 -474
  21. package/dist/browser/icons-CRxvozBE.js +726 -0
  22. package/dist/browser/{typeScriptSession-CwMPjseS.js → typeScriptSession-_TgJ_7Oq.js} +256 -257
  23. package/dist/browser/{waitNotificationInputs-DtrPBwA1.js → waitNotificationInputs-lPrLDTOd.js} +2 -2
  24. package/dist/browser/workbench.css +1 -1
  25. package/dist/browser/workbench.js +573 -578
  26. package/dist/browser/{workbenchSelect-CX8KtT7L.js → workbenchSelect-Cf1zlVm9.js} +398 -398
  27. package/dist/common/control-api-conformance.js +27 -19
  28. package/dist/common/control-api.d.ts +4 -11
  29. package/dist/common/control-api.js +6 -18
  30. package/dist/common/flow-encoding.js +4 -0
  31. package/dist/common/flow-semantics.js +8 -10
  32. package/dist/common/runtime-contract.d.ts +1 -1
  33. package/dist/common/runtime-contract.js +27 -0
  34. package/dist/common/scheduler.d.ts +1 -1
  35. package/dist/common/scheduler.js +17 -18
  36. package/dist/index.d.ts +1 -1
  37. package/package.json +1 -1
  38. package/dist/browser/createResourceDialog-4YQKl8lG.js +0 -505
  39. package/dist/browser/dist-BpopSHwP.js +0 -1543
  40. package/dist/browser/dist-CUSrALSX.js +0 -1620
  41. package/dist/browser/icons-DRoMXL5h.js +0 -521
@@ -1,11 +1,11 @@
1
1
  import { a as e, f as t, r as n } from "./dist-C46JByB-.js";
2
- import { $n as r, $t as i, A as a, An as o, B as s, Cn as c, Dn as l, Dt as u, En as d, Et as f, F as p, Fn as m, Gn as h, H as g, Hn as _, Ht as v, In as y, It as b, J as x, Jt as S, Kn as C, L as w, Lt as T, M as E, Mn as D, Mt as O, N as k, On as A, Ot as j, P as M, R as N, Rt as P, Sn as F, St as ee, Tn as te, Tt as I, U as L, Ut as R, V as ne, W as re, Wn as z, Wt as B, Xn as V, Xt as H, Yn as ie, Yt as ae, Z as U, Zn as oe, Zt as se, a as ce, an as le, ar as W, at as ue, bn as G, bt as K, c as de, cr as fe, ct as pe, d as me, dr as he, er as q, et as ge, f as _e, ft as ve, ht as ye, i as be, in as xe, it as Se, j as Ce, jt as J, kn as we, kt as Te, l as Ee, lr as Y, lt as De, m as Oe, mt as ke, n as Ae, nn as je, nr as Me, nt as Ne, on as Pe, or as Fe, ot as Ie, p as Le, pt as Re, q as ze, qn as Be, rn as Ve, rr as He, rt as Ue, s as We, sn as Ge, sr as Ke, st as qe, t as Je, tn as Ye, tr as Xe, tt as Ze, u as Qe, ur as $e, vn as et, vt as tt, wn as nt, x as rt, yt as it, z as at } from "./getPseudoElementBounds-qDxSDwzN.js";
2
+ import { A as r, An as i, At as a, B as o, Cn as s, Dn as c, Dt as l, En as u, Et as d, F as f, Gn as p, Gt as m, H as h, In as g, J as _, Jn as v, Kn as y, L as b, Ln as x, Lt as S, M as C, Mt as w, N as T, Nn as E, Nt as D, On as O, P as k, Qn as A, Qt as j, R as M, Rt as N, St as P, Tn as F, Tt as I, U as ee, Un as L, Ut as R, V as te, W as z, Wt as ne, Xn as re, Xt as B, Yt as V, Z as H, Zn as U, Zt as ie, a as ae, an as oe, at as se, bt as W, c as ce, cn as le, cr as ue, ct as de, d as G, dr as fe, en as pe, er as me, et as he, f as ge, fr as _e, ft as ve, ht as ye, i as be, in as xe, ir as Se, it as Ce, j as we, jn as Te, kn as Ee, kt as De, l as Oe, lr as ke, lt as Ae, m as je, mt as Me, n as Ne, nn as Pe, nr as Fe, nt as Ie, on as Le, or as K, ot as Re, p as ze, pt as Be, q as Ve, qn as He, rn as Ue, rr as q, rt as We, s as Ge, sn as Ke, sr as qe, st as Je, t as Ye, tr as J, tt as Xe, u as Ze, ur as Y, vt as Qe, wn as $e, x as et, xn as tt, yn as nt, yt as rt, z as it, zt as at } from "./getPseudoElementBounds-5LArT6Xc.js";
3
3
  import * as X from "react";
4
4
  import { createContext as ot, useCallback as st, useContext as ct, useEffect as lt, useLayoutEffect as ut, useMemo as dt, useRef as ft, useState as pt } from "react";
5
5
  import { jsx as Z, jsxs as mt } from "react/jsx-runtime";
6
6
  import * as ht from "react-dom";
7
7
  //#region ../../node_modules/.bun/lucide-react@0.468.0+f4eacebf2041cd4f/node_modules/lucide-react/dist/esm/icons/chevron-right.js
8
- var gt = Te("ChevronRight", [["path", {
8
+ var gt = a("ChevronRight", [["path", {
9
9
  d: "m9 18 6-6-6-6",
10
10
  key: "mthhwq"
11
11
  }]]), _t = (e, t = {}, n = "") => {
@@ -74,7 +74,7 @@ var gt = Te("ChevronRight", [["path", {
74
74
  process.env.NODE_ENV !== "production" && (bt.displayName = "MenuPositionerContext");
75
75
  function xt(e) {
76
76
  let t = X.useContext(bt);
77
- if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? q(33) : "Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.");
77
+ if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? J(33) : "Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.");
78
78
  return t;
79
79
  }
80
80
  //#endregion
@@ -83,7 +83,7 @@ var St = /*#__PURE__*/ X.createContext(void 0);
83
83
  process.env.NODE_ENV !== "production" && (St.displayName = "MenuRootContext");
84
84
  function Q(e) {
85
85
  let t = X.useContext(St);
86
- if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? q(36) : "Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.");
86
+ if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? J(36) : "Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.");
87
87
  return t;
88
88
  }
89
89
  //#endregion
@@ -92,7 +92,7 @@ var Ct = /*#__PURE__*/ X.createContext(void 0);
92
92
  process.env.NODE_ENV !== "production" && (Ct.displayName = "ContextMenuRootContext");
93
93
  function wt(e = !0) {
94
94
  let t = X.useContext(Ct);
95
- if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? q(25) : "Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.");
95
+ if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? J(25) : "Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.");
96
96
  return t;
97
97
  }
98
98
  //#endregion
@@ -101,58 +101,58 @@ var Tt = /*#__PURE__*/ X.createContext(void 0);
101
101
  process.env.NODE_ENV !== "production" && (Tt.displayName = "MenuCheckboxItemContext");
102
102
  function Et() {
103
103
  let e = X.useContext(Tt);
104
- if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? q(30) : "Base UI: MenuCheckboxItemContext is missing. MenuCheckboxItem parts must be placed within <Menu.CheckboxItem>.");
104
+ if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? J(30) : "Base UI: MenuCheckboxItemContext is missing. MenuCheckboxItem parts must be placed within <Menu.CheckboxItem>.");
105
105
  return e;
106
106
  }
107
107
  //#endregion
108
108
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/item/useMenuItemCommonProps.js
109
109
  function Dt(e) {
110
- let { closeOnClick: t, highlighted: n, id: r, nodeId: i, store: a, typingRef: o, itemRef: s, itemMetadata: c } = e, { events: l } = a.useState("floatingTreeRoot"), u = wt(!0), d = u !== void 0;
110
+ let { closeOnClick: t, highlighted: n, id: r, nodeId: a, store: o, typingRef: s, itemRef: c, itemMetadata: l } = e, { events: u } = o.useState("floatingTreeRoot"), d = wt(!0), f = d !== void 0;
111
111
  return X.useMemo(() => ({
112
112
  id: r,
113
113
  role: "menuitem",
114
114
  tabIndex: n ? 0 : -1,
115
115
  onKeyDown(e) {
116
- e.key === " " && o?.current && e.preventDefault();
116
+ e.key === " " && s?.current && e.preventDefault();
117
117
  },
118
118
  onMouseMove(e) {
119
- i && l.emit("itemhover", {
120
- nodeId: i,
119
+ a && u.emit("itemhover", {
120
+ nodeId: a,
121
121
  target: e.currentTarget
122
122
  });
123
123
  },
124
124
  onClick(e) {
125
- t && l.emit("close", {
125
+ t && u.emit("close", {
126
126
  domEvent: e,
127
- reason: P
127
+ reason: at
128
128
  });
129
129
  },
130
130
  onMouseUp(e) {
131
- if (u) {
132
- let t = u.initialCursorPointRef.current;
133
- if (u.initialCursorPointRef.current = null, d && t && Math.abs(e.clientX - t.x) <= 1 && Math.abs(e.clientY - t.y) <= 1 || d && !we && e.button === 2) return;
131
+ if (d) {
132
+ let t = d.initialCursorPointRef.current;
133
+ if (d.initialCursorPointRef.current = null, f && t && Math.abs(e.clientX - t.x) <= 1 && Math.abs(e.clientY - t.y) <= 1 || f && !i && e.button === 2) return;
134
134
  }
135
- s.current && a.context.allowMouseUpTriggerRef.current && (!d || e.button === 2) && (!c || c.type === "regular-item") && s.current.click();
135
+ c.current && o.context.allowMouseUpTriggerRef.current && (!f || e.button === 2) && (!l || l.type === "regular-item") && c.current.click();
136
136
  }
137
137
  }), [
138
138
  t,
139
139
  n,
140
140
  r,
141
- l,
142
- i,
141
+ u,
143
142
  a,
144
143
  o,
145
144
  s,
146
- u,
145
+ c,
147
146
  d,
148
- c
147
+ f,
148
+ l
149
149
  ]);
150
150
  }
151
151
  //#endregion
152
152
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/item/useMenuItem.js
153
153
  var Ot = { type: "regular-item" };
154
154
  function kt(e) {
155
- let { closeOnClick: t, disabled: n = !1, highlighted: r, id: i, store: a, typingRef: o = a.context.typingRef, nativeButton: s, itemMetadata: c, nodeId: l } = e, u = X.useRef(null), { getButtonProps: d, buttonRef: f } = oe({
155
+ let { closeOnClick: t, disabled: n = !1, highlighted: r, id: i, store: a, typingRef: o = a.context.typingRef, nativeButton: s, itemMetadata: c, nodeId: l } = e, u = X.useRef(null), { getButtonProps: d, buttonRef: f } = A({
156
156
  disabled: n,
157
157
  focusableWhenDisabled: !0,
158
158
  native: s,
@@ -166,13 +166,13 @@ function kt(e) {
166
166
  typingRef: o,
167
167
  itemRef: u,
168
168
  itemMetadata: c
169
- }), m = X.useCallback((e) => Xe(p, { onMouseEnter() {
169
+ }), m = X.useCallback((e) => Fe(p, { onMouseEnter() {
170
170
  c.type === "submenu-trigger" && c.setActive();
171
171
  } }, e, d), [
172
172
  p,
173
173
  d,
174
174
  c
175
- ]), h = V(u, f);
175
+ ]), h = U(u, f);
176
176
  return X.useMemo(() => ({
177
177
  getItemProps: m,
178
178
  itemRef: h
@@ -186,9 +186,9 @@ var At = /*#__PURE__*/ function(e) {
186
186
  checked(e) {
187
187
  return e ? { [At.checked]: "" } : { [At.unchecked]: "" };
188
188
  },
189
- ...i
189
+ ...pe
190
190
  }, Mt = /*#__PURE__*/ X.forwardRef(function(e, t) {
191
- let { render: n, className: r, id: i, label: a, nativeButton: o = !1, disabled: s = !1, closeOnClick: c = !1, checked: l, defaultChecked: u, onCheckedChange: d, style: f, ...p } = e, g = ee({ label: a }), _ = xt(!0), v = m(i), { store: y } = Q(), b = y.useState("isActive", g.index), x = y.useState("itemProps"), [C, w] = S({
191
+ let { render: n, className: r, id: i, label: a, nativeButton: o = !1, disabled: s = !1, closeOnClick: c = !1, checked: l, defaultChecked: u, onCheckedChange: d, style: f, ...p } = e, m = P({ label: a }), h = xt(!0), _ = g(i), { store: v } = Q(), b = v.useState("isActive", m.index), x = v.useState("itemProps"), [S, C] = V({
192
192
  controlled: l,
193
193
  default: u ?? !1,
194
194
  name: "MenuCheckboxItem",
@@ -197,33 +197,33 @@ var At = /*#__PURE__*/ function(e) {
197
197
  closeOnClick: c,
198
198
  disabled: s,
199
199
  highlighted: b,
200
- id: v,
201
- store: y,
200
+ id: _,
201
+ store: v,
202
202
  nativeButton: o,
203
- nodeId: _?.context.nodeId,
203
+ nodeId: h?.context.nodeId,
204
204
  itemMetadata: Ot
205
205
  }), D = X.useMemo(() => ({
206
206
  disabled: s,
207
207
  highlighted: b,
208
- checked: C
208
+ checked: S
209
209
  }), [
210
210
  s,
211
211
  b,
212
- C
213
- ]), O = W((e) => {
212
+ S
213
+ ]), O = K((e) => {
214
214
  let t = {
215
- ...J(P, e.nativeEvent),
215
+ ...w(at, e.nativeEvent),
216
216
  preventUnmountOnClose: () => {}
217
217
  };
218
- d?.(!C, t), !t.isCanceled && w((e) => !e);
219
- }), k = h("div", e, {
218
+ d?.(!S, t), !t.isCanceled && C((e) => !e);
219
+ }), k = y("div", e, {
220
220
  state: D,
221
221
  stateAttributesMapping: jt,
222
222
  props: [
223
223
  x,
224
224
  {
225
225
  role: "menuitemcheckbox",
226
- "aria-checked": C,
226
+ "aria-checked": S,
227
227
  onClick: O
228
228
  },
229
229
  p,
@@ -232,7 +232,7 @@ var At = /*#__PURE__*/ function(e) {
232
232
  ref: [
233
233
  E,
234
234
  t,
235
- g.ref
235
+ m.ref
236
236
  ]
237
237
  });
238
238
  return /*#__PURE__*/ Z(Tt.Provider, {
@@ -244,8 +244,8 @@ process.env.NODE_ENV !== "production" && (Mt.displayName = "MenuCheckboxItem");
244
244
  //#endregion
245
245
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js
246
246
  var Nt = /*#__PURE__*/ X.forwardRef(function(e, t) {
247
- let { render: n, className: r, style: i, keepMounted: a = !1, ...o } = e, s = Et(), c = X.useRef(null), { transitionStatus: l, setMounted: u } = ae(s.checked);
248
- H({
247
+ let { render: n, className: r, style: i, keepMounted: a = !1, ...o } = e, s = Et(), c = X.useRef(null), { transitionStatus: l, setMounted: u } = B(s.checked);
248
+ ie({
249
249
  open: s.checked,
250
250
  ref: c,
251
251
  onComplete() {
@@ -258,7 +258,7 @@ var Nt = /*#__PURE__*/ X.forwardRef(function(e, t) {
258
258
  highlighted: s.highlighted,
259
259
  transitionStatus: l
260
260
  };
261
- return h("span", e, {
261
+ return y("span", e, {
262
262
  state: d,
263
263
  ref: [t, c],
264
264
  stateAttributesMapping: jt,
@@ -276,13 +276,13 @@ var Pt = /*#__PURE__*/ X.createContext(void 0);
276
276
  process.env.NODE_ENV !== "production" && (Pt.displayName = "MenuGroupContext");
277
277
  function Ft() {
278
278
  let e = X.useContext(Pt);
279
- if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? q(31) : "Base UI: MenuGroupRootContext is missing. Menu group parts must be used within <Menu.Group>.");
279
+ if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? J(31) : "Base UI: MenuGroupRootContext is missing. Menu group parts must be used within <Menu.Group>.");
280
280
  return e;
281
281
  }
282
282
  //#endregion
283
283
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/group/MenuGroup.js
284
284
  var It = /*#__PURE__*/ X.forwardRef(function(e, t) {
285
- let { render: n, className: r, style: i, ...a } = e, [o, s] = X.useState(void 0), c = X.useMemo(() => ({ setLabelId: s }), [s]), l = h("div", e, {
285
+ let { render: n, className: r, style: i, ...a } = e, [o, s] = X.useState(void 0), c = X.useMemo(() => ({ setLabelId: s }), [s]), l = y("div", e, {
286
286
  ref: t,
287
287
  props: {
288
288
  role: "group",
@@ -299,10 +299,10 @@ process.env.NODE_ENV !== "production" && (It.displayName = "MenuGroup");
299
299
  //#endregion
300
300
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/group-label/MenuGroupLabel.js
301
301
  var Lt = /*#__PURE__*/ X.forwardRef(function(e, t) {
302
- let { className: n, render: r, id: i, style: a, ...o } = e, s = m(i), { setLabelId: c } = Ft();
303
- return Me(() => (c(s), () => {
302
+ let { className: n, render: r, id: i, style: a, ...o } = e, s = g(i), { setLabelId: c } = Ft();
303
+ return q(() => (c(s), () => {
304
304
  c(void 0);
305
- }), [c, s]), h("div", e, {
305
+ }), [c, s]), y("div", e, {
306
306
  ref: t,
307
307
  props: {
308
308
  id: s,
@@ -315,25 +315,25 @@ process.env.NODE_ENV !== "production" && (Lt.displayName = "MenuGroupLabel");
315
315
  //#endregion
316
316
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/item/MenuItem.js
317
317
  var Rt = /*#__PURE__*/ X.forwardRef(function(e, t) {
318
- let { render: n, className: r, id: i, label: a, nativeButton: o = !1, disabled: s = !1, closeOnClick: c = !0, style: l, ...u } = e, d = ee({ label: a }), f = xt(!0), p = m(i), { store: g } = Q(), _ = g.useState("isActive", d.index), v = g.useState("itemProps"), { getItemProps: y, itemRef: b } = kt({
318
+ let { render: n, className: r, id: i, label: a, nativeButton: o = !1, disabled: s = !1, closeOnClick: c = !0, style: l, ...u } = e, d = P({ label: a }), f = xt(!0), p = g(i), { store: m } = Q(), h = m.useState("isActive", d.index), _ = m.useState("itemProps"), { getItemProps: v, itemRef: b } = kt({
319
319
  closeOnClick: c,
320
320
  disabled: s,
321
- highlighted: _,
321
+ highlighted: h,
322
322
  id: p,
323
- store: g,
323
+ store: m,
324
324
  nativeButton: o,
325
325
  nodeId: f?.context.nodeId,
326
326
  itemMetadata: Ot
327
327
  });
328
- return h("div", e, {
328
+ return y("div", e, {
329
329
  state: {
330
330
  disabled: s,
331
- highlighted: _
331
+ highlighted: h
332
332
  },
333
333
  props: [
334
- v,
334
+ _,
335
335
  u,
336
- y
336
+ v
337
337
  ],
338
338
  ref: [
339
339
  b,
@@ -346,7 +346,7 @@ process.env.NODE_ENV !== "production" && (Rt.displayName = "MenuItem");
346
346
  //#endregion
347
347
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverShared.js
348
348
  function zt(e, t) {
349
- return t != null && !et(t) ? 0 : typeof e == "function" ? e() : e;
349
+ return t != null && !nt(t) ? 0 : typeof e == "function" ? e() : e;
350
350
  }
351
351
  function Bt(e, t, n) {
352
352
  let r = zt(e, n);
@@ -360,30 +360,30 @@ function Ht(e, t) {
360
360
  }
361
361
  //#endregion
362
362
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useFocus.js
363
- var Ut = we && o;
363
+ var Ut = i && Te;
364
364
  function Wt(e, t = {}) {
365
- let n = "rootStore" in e ? e.rootStore : e, { events: r, dataRef: i } = n.context, { enabled: a = !0, delay: o } = t, s = X.useRef(!1), u = X.useRef(null), f = je(), p = X.useRef(!0);
365
+ let n = "rootStore" in e ? e.rootStore : e, { events: r, dataRef: i } = n.context, { enabled: a = !0, delay: o } = t, s = X.useRef(!1), l = X.useRef(null), d = Ue(), f = X.useRef(!0);
366
366
  X.useEffect(() => {
367
367
  let e = n.select("domReferenceElement");
368
368
  if (!a) return;
369
- let t = fe(e);
369
+ let t = ke(e);
370
370
  function r() {
371
371
  let e = n.select("domReferenceElement");
372
- !n.select("open") && $e(e) && e === d(D(e)) && (s.current = !0);
372
+ !n.select("open") && fe(e) && e === c(E(e)) && (s.current = !0);
373
373
  }
374
374
  function i() {
375
- p.current = !0;
375
+ f.current = !0;
376
376
  }
377
377
  function o() {
378
- p.current = !1;
378
+ f.current = !1;
379
379
  }
380
- return it(K(t, "blur", r), Ut && K(t, "keydown", i, !0), Ut && K(t, "pointerdown", o, !0));
380
+ return rt(W(t, "blur", r), Ut && W(t, "keydown", i, !0), Ut && W(t, "pointerdown", o, !0));
381
381
  }, [n, a]), X.useEffect(() => {
382
382
  if (!a) return;
383
383
  function e(e) {
384
384
  if (e.reason === "trigger-press" || e.reason === "escape-key") {
385
385
  let e = n.select("domReferenceElement");
386
- Y(e) && (u.current = e, s.current = !0);
386
+ Y(e) && (l.current = e, s.current = !0);
387
387
  }
388
388
  }
389
389
  return r.on("openchange", e), () => {
@@ -394,55 +394,55 @@ function Wt(e, t = {}) {
394
394
  a,
395
395
  n
396
396
  ]);
397
- let m = X.useMemo(() => ({
397
+ let p = X.useMemo(() => ({
398
398
  onMouseLeave() {
399
- s.current = !1, u.current = null;
399
+ s.current = !1, l.current = null;
400
400
  },
401
401
  onFocus(e) {
402
402
  let t = e.currentTarget;
403
403
  if (s.current) {
404
- if (u.current === t) return;
405
- s.current = !1, u.current = null;
404
+ if (l.current === t) return;
405
+ s.current = !1, l.current = null;
406
406
  }
407
- let r = A(e.nativeEvent);
407
+ let r = Ee(e.nativeEvent);
408
408
  if (Y(r)) {
409
409
  if (Ut && !e.relatedTarget) {
410
- if (!p.current && !nt(r)) return;
411
- } else if (!te(r)) return;
410
+ if (!f.current && !F(r)) return;
411
+ } else if (!u(r)) return;
412
412
  }
413
- let i = c(e.relatedTarget, n.context.triggerElements), { nativeEvent: a, currentTarget: l } = e, d = typeof o == "function" ? o() : o;
414
- if (n.select("open") && i || d === 0 || d === void 0) {
415
- n.setOpen(!0, J(R, a, l));
413
+ let i = $e(e.relatedTarget, n.context.triggerElements), { nativeEvent: a, currentTarget: c } = e, p = typeof o == "function" ? o() : o;
414
+ if (n.select("open") && i || p === 0 || p === void 0) {
415
+ n.setOpen(!0, w(ne, a, c));
416
416
  return;
417
417
  }
418
- f.start(d, () => {
419
- s.current || n.setOpen(!0, J(R, a, l));
418
+ d.start(p, () => {
419
+ s.current || n.setOpen(!0, w(ne, a, c));
420
420
  });
421
421
  },
422
422
  onBlur(e) {
423
- s.current = !1, u.current = null;
424
- let t = e.relatedTarget, r = e.nativeEvent, a = Y(t) && t.hasAttribute(ke("focus-guard")) && t.getAttribute("data-type") === "outside";
425
- f.start(0, () => {
426
- let e = n.select("domReferenceElement"), o = d(D(e));
427
- !t && o === e || l(i.current.floatingContext?.refs.floating.current, o) || l(e, o) || a || c(t ?? o, n.context.triggerElements) || n.setOpen(!1, J(R, r));
423
+ s.current = !1, l.current = null;
424
+ let t = e.relatedTarget, r = e.nativeEvent, a = Y(t) && t.hasAttribute(Me("focus-guard")) && t.getAttribute("data-type") === "outside";
425
+ d.start(0, () => {
426
+ let e = n.select("domReferenceElement"), o = c(E(e));
427
+ !t && o === e || O(i.current.floatingContext?.refs.floating.current, o) || O(e, o) || a || $e(t ?? o, n.context.triggerElements) || n.setOpen(!1, w(ne, r));
428
428
  });
429
429
  }
430
430
  }), [
431
431
  i,
432
432
  n,
433
- f,
433
+ d,
434
434
  o
435
435
  ]);
436
436
  return X.useMemo(() => a ? {
437
- reference: m,
438
- trigger: m
439
- } : {}, [a, m]);
437
+ reference: p,
438
+ trigger: p
439
+ } : {}, [a, p]);
440
440
  }
441
441
  //#endregion
442
442
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverInteractionSharedState.js
443
443
  var Gt = class e {
444
444
  constructor() {
445
- this.pointerType = void 0, this.interactedInside = !1, this.handler = void 0, this.blockMouseMove = !0, this.performedPointerEventsMutation = !1, this.pointerEventsScopeElement = null, this.pointerEventsReferenceElement = null, this.pointerEventsFloatingElement = null, this.restTimeoutPending = !1, this.openChangeTimeout = new Ye(), this.restTimeout = new Ye(), this.handleCloseOptions = void 0;
445
+ this.pointerType = void 0, this.interactedInside = !1, this.handler = void 0, this.blockMouseMove = !0, this.performedPointerEventsMutation = !1, this.pointerEventsScopeElement = null, this.pointerEventsReferenceElement = null, this.pointerEventsFloatingElement = null, this.restTimeoutPending = !1, this.openChangeTimeout = new Pe(), this.restTimeout = new Pe(), this.handleCloseOptions = void 0;
446
446
  }
447
447
  static create() {
448
448
  return new e();
@@ -462,47 +462,47 @@ function Jt(e, t) {
462
462
  a && a !== e && qt(a), qt(e), e.performedPointerEventsMutation = !0, e.pointerEventsScopeElement = n, e.pointerEventsReferenceElement = r, e.pointerEventsFloatingElement = i, Kt.set(n, e), n.style.pointerEvents = "none", r.style.pointerEvents = "auto", i.style.pointerEvents = "auto";
463
463
  }
464
464
  function Yt(e) {
465
- let t = Fe(Gt.create).current, n = e.context.dataRef.current;
466
- return n.hoverInteractionState ||= t, Ve(n.hoverInteractionState.disposeEffect), n.hoverInteractionState;
465
+ let t = qe(Gt.create).current, n = e.context.dataRef.current;
466
+ return n.hoverInteractionState ||= t, xe(n.hoverInteractionState.disposeEffect), n.hoverInteractionState;
467
467
  }
468
468
  //#endregion
469
469
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverFloatingInteraction.js
470
470
  function Xt(e, t = {}) {
471
- let n = "rootStore" in e ? e.rootStore : e, r = n.useState("open"), i = n.useState("floatingElement"), a = n.useState("domReferenceElement"), { dataRef: o } = n.context, { enabled: s = !0, closeDelay: u = 0, nodeId: d } = t, f = Yt(n), p = qe(), m = Ie(), h = W(() => Ht(o.current.openEvent?.type, f.interactedInside)), g = W(() => {
471
+ let n = "rootStore" in e ? e.rootStore : e, r = n.useState("open"), i = n.useState("floatingElement"), a = n.useState("domReferenceElement"), { dataRef: o } = n.context, { enabled: c = !0, closeDelay: l = 0, nodeId: u } = t, d = Yt(n), f = Je(), p = Re(), h = K(() => Ht(o.current.openEvent?.type, d.interactedInside)), g = K(() => {
472
472
  let e = o.current.openEvent?.type;
473
473
  return e?.includes("mouse") && e !== "mousedown";
474
- }), _ = W((e) => c(e, n.context.triggerElements)), v = X.useCallback((e) => {
475
- let t = Bt(u, "close", f.pointerType), r = () => {
476
- n.setOpen(!1, J(B, e)), p?.events.emit("floating.closed", e);
474
+ }), _ = K((e) => $e(e, n.context.triggerElements)), v = X.useCallback((e) => {
475
+ let t = Bt(l, "close", d.pointerType), r = () => {
476
+ n.setOpen(!1, w(m, e)), f?.events.emit("floating.closed", e);
477
477
  };
478
- t ? f.openChangeTimeout.start(t, r) : (f.openChangeTimeout.clear(), r());
478
+ t ? d.openChangeTimeout.start(t, r) : (d.openChangeTimeout.clear(), r());
479
479
  }, [
480
- u,
480
+ l,
481
481
  n,
482
- f,
483
- p
484
- ]), y = W(() => {
485
- qt(f);
486
- }), b = W((e) => {
487
- let t = A(e);
488
- if (!F(t)) {
489
- f.interactedInside = !1;
482
+ d,
483
+ f
484
+ ]), y = K(() => {
485
+ qt(d);
486
+ }), b = K((e) => {
487
+ let t = Ee(e);
488
+ if (!s(t)) {
489
+ d.interactedInside = !1;
490
490
  return;
491
491
  }
492
- f.interactedInside = t?.closest("[aria-haspopup]") != null;
492
+ d.interactedInside = t?.closest("[aria-haspopup]") != null;
493
493
  });
494
- Me(() => {
495
- r || (f.pointerType = void 0, f.restTimeoutPending = !1, f.interactedInside = !1, y());
494
+ q(() => {
495
+ r || (d.pointerType = void 0, d.restTimeoutPending = !1, d.interactedInside = !1, y());
496
496
  }, [
497
497
  r,
498
- f,
498
+ d,
499
499
  y
500
- ]), X.useEffect(() => y, [y]), Me(() => {
501
- if (s && r && f.handleCloseOptions?.blockPointerEvents && g() && Y(a) && i) {
502
- let e = a, t = i, n = D(i), r = p?.nodesRef.current.find((e) => e.id === m)?.context?.elements.floating;
500
+ ]), X.useEffect(() => y, [y]), q(() => {
501
+ if (c && r && d.handleCloseOptions?.blockPointerEvents && g() && Y(a) && i) {
502
+ let e = a, t = i, n = E(i), r = f?.nodesRef.current.find((e) => e.id === p)?.context?.elements.floating;
503
503
  r && (r.style.pointerEvents = "");
504
- let o = f.handleCloseOptions?.getScope?.() ?? f.pointerEventsScopeElement ?? r ?? e.closest("[data-rootownerid]") ?? n.body;
505
- return Jt(f, {
504
+ let o = d.handleCloseOptions?.getScope?.() ?? d.pointerEventsScopeElement ?? r ?? e.closest("[data-rootownerid]") ?? n.body;
505
+ return Jt(d, {
506
506
  scopeElement: o,
507
507
  referenceElement: e,
508
508
  floatingElement: t
@@ -511,60 +511,60 @@ function Xt(e, t = {}) {
511
511
  };
512
512
  }
513
513
  }, [
514
- s,
514
+ c,
515
515
  r,
516
516
  a,
517
517
  i,
518
- f,
518
+ d,
519
519
  g,
520
+ f,
520
521
  p,
521
- m,
522
522
  y
523
523
  ]);
524
- let x = je();
524
+ let x = Ue();
525
525
  X.useEffect(() => {
526
- if (!s) return;
526
+ if (!c) return;
527
527
  function e() {
528
- f.openChangeTimeout.clear(), x.clear(), p?.events.off("floating.closed", r), y();
528
+ d.openChangeTimeout.clear(), x.clear(), f?.events.off("floating.closed", r), y();
529
529
  }
530
530
  function t(e) {
531
- if (p && m && G(p.nodesRef.current, m).length > 0) {
532
- p.events.on("floating.closed", r);
531
+ if (f && p && tt(f.nodesRef.current, p).length > 0) {
532
+ f.events.on("floating.closed", r);
533
533
  return;
534
534
  }
535
535
  if (_(e.relatedTarget)) return;
536
- let t = o.current.floatingContext?.nodeId ?? d, n = e.relatedTarget;
537
- if (!(p && t && Y(n) && G(p.nodesRef.current, t, !1).some((e) => l(e.context?.elements.floating, n)))) {
538
- if (f.handler) {
539
- f.handler(e);
536
+ let t = o.current.floatingContext?.nodeId ?? u, n = e.relatedTarget;
537
+ if (!(f && t && Y(n) && tt(f.nodesRef.current, t, !1).some((e) => O(e.context?.elements.floating, n)))) {
538
+ if (d.handler) {
539
+ d.handler(e);
540
540
  return;
541
541
  }
542
542
  y(), h() || v(e);
543
543
  }
544
544
  }
545
545
  function r(e) {
546
- !p || !m || G(p.nodesRef.current, m).length > 0 || x.start(0, () => {
547
- p.events.off("floating.closed", r), n.setOpen(!1, J(B, e)), p.events.emit("floating.closed", e);
546
+ !f || !p || tt(f.nodesRef.current, p).length > 0 || x.start(0, () => {
547
+ f.events.off("floating.closed", r), n.setOpen(!1, w(m, e)), f.events.emit("floating.closed", e);
548
548
  });
549
549
  }
550
550
  let a = i;
551
- return it(a && K(a, "mouseenter", e), a && K(a, "mouseleave", t), a && K(a, "pointerdown", b, !0), () => {
552
- p?.events.off("floating.closed", r);
551
+ return rt(a && W(a, "mouseenter", e), a && W(a, "mouseleave", t), a && W(a, "pointerdown", b, !0), () => {
552
+ f?.events.off("floating.closed", r);
553
553
  });
554
554
  }, [
555
- s,
555
+ c,
556
556
  i,
557
557
  n,
558
558
  o,
559
- d,
559
+ u,
560
560
  h,
561
561
  _,
562
562
  v,
563
563
  y,
564
564
  b,
565
+ d,
565
566
  f,
566
567
  p,
567
- m,
568
568
  x
569
569
  ]);
570
570
  }
@@ -572,28 +572,28 @@ function Xt(e, t = {}) {
572
572
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useHoverReferenceInteraction.js
573
573
  var Zt = { current: null };
574
574
  function Qt(e, t = {}) {
575
- let n = "rootStore" in e ? e.rootStore : e, { dataRef: r, events: i } = n.context, { enabled: a = !0, delay: o = 0, handleClose: s = null, mouseOnly: u = !1, restMs: d = 0, move: f = !0, triggerElementRef: p = Zt, externalTree: m, isActiveTrigger: h = !0, getHandleCloseContext: g, isClosing: _ } = t, v = qe(m), y = Yt(n), b = X.useRef(!1), x = tt(s), S = tt(o), C = tt(d), w = tt(a), T = tt(_);
576
- h && (y.handleCloseOptions = x.current?.__options);
577
- let E = W(() => Ht(r.current.openEvent?.type, y.interactedInside)), O = W((e) => c(e, n.context.triggerElements)), k = W((e, t, r) => {
575
+ let n = "rootStore" in e ? e.rootStore : e, { dataRef: r, events: i } = n.context, { enabled: a = !0, delay: o = 0, handleClose: s = null, mouseOnly: c = !1, restMs: l = 0, move: u = !0, triggerElementRef: d = Zt, externalTree: f, isActiveTrigger: p = !0, getHandleCloseContext: h, isClosing: g } = t, _ = Je(f), v = Yt(n), y = X.useRef(!1), b = Qe(s), x = Qe(o), S = Qe(l), C = Qe(a), T = Qe(g);
576
+ p && (v.handleCloseOptions = b.current?.__options);
577
+ let D = K(() => Ht(r.current.openEvent?.type, v.interactedInside)), k = K((e) => $e(e, n.context.triggerElements)), A = K((e, t, r) => {
578
578
  let i = n.context.triggerElements;
579
- if (i.hasElement(t)) return !e || !l(e, t);
579
+ if (i.hasElement(t)) return !e || !O(e, t);
580
580
  if (!Y(r)) return !1;
581
581
  let a = r;
582
- return i.hasMatchingElement((e) => l(e, a)) && (!e || !l(e, a));
583
- }), j = W((e, t = !0) => {
584
- let r = Bt(S.current, "close", y.pointerType);
585
- r ? y.openChangeTimeout.start(r, () => {
586
- n.setOpen(!1, J(B, e)), v?.events.emit("floating.closed", e);
587
- }) : t && (y.openChangeTimeout.clear(), n.setOpen(!1, J(B, e)), v?.events.emit("floating.closed", e));
588
- }), M = W(() => {
589
- y.handler &&= (D(n.select("domReferenceElement")).removeEventListener("mousemove", y.handler), void 0);
590
- }), N = W(() => {
591
- qt(y);
582
+ return i.hasMatchingElement((e) => O(e, a)) && (!e || !O(e, a));
583
+ }), j = K((e, t = !0) => {
584
+ let r = Bt(x.current, "close", v.pointerType);
585
+ r ? v.openChangeTimeout.start(r, () => {
586
+ n.setOpen(!1, w(m, e)), _?.events.emit("floating.closed", e);
587
+ }) : t && (v.openChangeTimeout.clear(), n.setOpen(!1, w(m, e)), _?.events.emit("floating.closed", e));
588
+ }), M = K(() => {
589
+ v.handler &&= (E(n.select("domReferenceElement")).removeEventListener("mousemove", v.handler), void 0);
590
+ }), N = K(() => {
591
+ qt(v);
592
592
  });
593
593
  return X.useEffect(() => M, [M]), X.useEffect(() => {
594
594
  if (!a) return;
595
595
  function e(e) {
596
- e.open ? b.current = !1 : (b.current = e.reason === B, M(), y.openChangeTimeout.clear(), y.restTimeout.clear(), y.blockMouseMove = !0, y.restTimeoutPending = !1);
596
+ e.open ? y.current = !1 : (y.current = e.reason === m, M(), v.openChangeTimeout.clear(), v.restTimeout.clear(), v.blockMouseMove = !0, v.restTimeoutPending = !1);
597
597
  }
598
598
  return i.on("openchange", e), () => {
599
599
  i.off("openchange", e);
@@ -601,124 +601,124 @@ function Qt(e, t = {}) {
601
601
  }, [
602
602
  a,
603
603
  i,
604
- y,
604
+ v,
605
605
  M
606
606
  ]), X.useEffect(() => {
607
607
  if (!a) return;
608
- let e = p.current ?? (h ? n.select("domReferenceElement") : null);
608
+ let e = d.current ?? (p ? n.select("domReferenceElement") : null);
609
609
  if (!Y(e)) return;
610
610
  function t(e) {
611
- if (y.openChangeTimeout.clear(), y.blockMouseMove = !1, u && !et(y.pointerType)) return;
612
- let t = Vt(C.current), r = Bt(S.current, "open", y.pointerType), i = A(e), a = e.currentTarget ?? null, o = n.select("domReferenceElement"), s = a;
611
+ if (v.openChangeTimeout.clear(), v.blockMouseMove = !1, c && !nt(v.pointerType)) return;
612
+ let t = Vt(S.current), r = Bt(x.current, "open", v.pointerType), i = Ee(e), a = e.currentTarget ?? null, o = n.select("domReferenceElement"), s = a;
613
613
  if (Y(i) && !n.context.triggerElements.hasElement(i)) {
614
- for (let e of n.context.triggerElements.elements()) if (l(e, i)) {
614
+ for (let e of n.context.triggerElements.elements()) if (O(e, i)) {
615
615
  s = e;
616
616
  break;
617
617
  }
618
618
  }
619
- Y(a) && Y(o) && !n.context.triggerElements.hasElement(a) && l(a, o) && (s = o);
620
- let c = s != null && k(o, s, i), d = n.select("open"), f = T.current?.() ?? n.select("transitionStatus") === "ending", p = !d && f && b.current, m = !c && Y(s) && Y(o) && l(o, s) && p, h = t > 0 && !r, g = c && (d || p) || m, _ = !d || c;
619
+ Y(a) && Y(o) && !n.context.triggerElements.hasElement(a) && O(a, o) && (s = o);
620
+ let l = s != null && A(o, s, i), u = n.select("open"), d = T.current?.() ?? n.select("transitionStatus") === "ending", f = !u && d && y.current, p = !l && Y(s) && Y(o) && O(o, s) && f, h = t > 0 && !r, g = l && (u || f) || p, _ = !u || l;
621
621
  if (g) {
622
- n.setOpen(!0, J(B, e, s));
622
+ n.setOpen(!0, w(m, e, s));
623
623
  return;
624
624
  }
625
- h || (r ? y.openChangeTimeout.start(r, () => {
626
- _ && n.setOpen(!0, J(B, e, s));
627
- }) : _ && n.setOpen(!0, J(B, e, s)));
625
+ h || (r ? v.openChangeTimeout.start(r, () => {
626
+ _ && n.setOpen(!0, w(m, e, s));
627
+ }) : _ && n.setOpen(!0, w(m, e, s)));
628
628
  }
629
629
  function i(e) {
630
- if (E()) {
630
+ if (D()) {
631
631
  N();
632
632
  return;
633
633
  }
634
634
  M();
635
- let t = n.select("domReferenceElement"), i = D(t);
636
- y.restTimeout.clear(), y.restTimeoutPending = !1;
637
- let a = r.current.floatingContext ?? g?.();
638
- if (!O(e.relatedTarget)) {
639
- if (x.current && a) {
640
- n.select("open") || y.openChangeTimeout.clear();
641
- let t = p.current;
642
- y.handler = x.current({
635
+ let t = n.select("domReferenceElement"), i = E(t);
636
+ v.restTimeout.clear(), v.restTimeoutPending = !1;
637
+ let a = r.current.floatingContext ?? h?.();
638
+ if (!k(e.relatedTarget)) {
639
+ if (b.current && a) {
640
+ n.select("open") || v.openChangeTimeout.clear();
641
+ let t = d.current;
642
+ v.handler = b.current({
643
643
  ...a,
644
- tree: v,
644
+ tree: _,
645
645
  x: e.clientX,
646
646
  y: e.clientY,
647
647
  onClose() {
648
- N(), M(), w.current && !E() && t === n.select("domReferenceElement") && j(e, !0);
648
+ N(), M(), C.current && !D() && t === n.select("domReferenceElement") && j(e, !0);
649
649
  }
650
- }), i.addEventListener("mousemove", y.handler), y.handler(e);
650
+ }), i.addEventListener("mousemove", v.handler), v.handler(e);
651
651
  return;
652
652
  }
653
- (y.pointerType !== "touch" || !l(n.select("floatingElement"), e.relatedTarget)) && j(e);
653
+ (v.pointerType !== "touch" || !O(n.select("floatingElement"), e.relatedTarget)) && j(e);
654
654
  }
655
655
  }
656
- return f ? it(K(e, "mousemove", t, { once: !0 }), K(e, "mouseenter", t), K(e, "mouseleave", i)) : it(K(e, "mouseenter", t), K(e, "mouseleave", i));
656
+ return u ? rt(W(e, "mousemove", t, { once: !0 }), W(e, "mouseenter", t), W(e, "mouseleave", i)) : rt(W(e, "mouseenter", t), W(e, "mouseleave", i));
657
657
  }, [
658
658
  M,
659
659
  N,
660
660
  r,
661
- S,
661
+ x,
662
662
  j,
663
663
  n,
664
664
  a,
665
- x,
666
- y,
667
- h,
665
+ b,
666
+ v,
667
+ p,
668
+ A,
669
+ D,
668
670
  k,
669
- E,
670
- O,
671
+ c,
671
672
  u,
672
- f,
673
+ S,
674
+ d,
675
+ _,
673
676
  C,
674
- p,
675
- v,
676
- w,
677
- g,
677
+ h,
678
678
  T
679
679
  ]), X.useMemo(() => {
680
680
  if (!a) return;
681
681
  function e(e) {
682
- y.pointerType = e.pointerType;
682
+ v.pointerType = e.pointerType;
683
683
  }
684
684
  return {
685
685
  onPointerDown: e,
686
686
  onPointerEnter: e,
687
687
  onMouseMove(e) {
688
- let { nativeEvent: t } = e, r = e.currentTarget, i = n.select("domReferenceElement"), a = n.select("open"), o = k(i, r, e.target);
689
- if (u && !et(y.pointerType)) return;
690
- if (a && o && y.handleCloseOptions?.blockPointerEvents) {
688
+ let { nativeEvent: t } = e, r = e.currentTarget, i = n.select("domReferenceElement"), a = n.select("open"), o = A(i, r, e.target);
689
+ if (c && !nt(v.pointerType)) return;
690
+ if (a && o && v.handleCloseOptions?.blockPointerEvents) {
691
691
  let e = n.select("floatingElement");
692
692
  if (e) {
693
- let t = y.handleCloseOptions?.getScope?.() ?? r.ownerDocument.body;
694
- Jt(y, {
693
+ let t = v.handleCloseOptions?.getScope?.() ?? r.ownerDocument.body;
694
+ Jt(v, {
695
695
  scopeElement: t,
696
696
  referenceElement: r,
697
697
  floatingElement: e
698
698
  });
699
699
  }
700
700
  }
701
- let s = Vt(C.current);
702
- if (a && !o || s === 0 || !o && y.restTimeoutPending && e.movementX ** 2 + e.movementY ** 2 < 2) return;
703
- y.restTimeout.clear();
704
- function c() {
705
- if (y.restTimeoutPending = !1, E()) return;
701
+ let s = Vt(S.current);
702
+ if (a && !o || s === 0 || !o && v.restTimeoutPending && e.movementX ** 2 + e.movementY ** 2 < 2) return;
703
+ v.restTimeout.clear();
704
+ function l() {
705
+ if (v.restTimeoutPending = !1, D()) return;
706
706
  let e = n.select("open");
707
- !y.blockMouseMove && (!e || o) && n.setOpen(!0, J(B, t, r));
707
+ !v.blockMouseMove && (!e || o) && n.setOpen(!0, w(m, t, r));
708
708
  }
709
- y.pointerType === "touch" ? ht.flushSync(() => {
710
- c();
711
- }) : o && a ? c() : (y.restTimeoutPending = !0, y.restTimeout.start(s, c));
709
+ v.pointerType === "touch" ? ht.flushSync(() => {
710
+ l();
711
+ }) : o && a ? l() : (v.restTimeoutPending = !0, v.restTimeout.start(s, l));
712
712
  }
713
713
  };
714
714
  }, [
715
715
  a,
716
- y,
717
- E,
718
- k,
719
- u,
716
+ v,
717
+ D,
718
+ A,
719
+ c,
720
720
  n,
721
- C
721
+ S
722
722
  ]);
723
723
  }
724
724
  //#endregion
@@ -738,86 +738,86 @@ function an(e, t, n, r, i, a) {
738
738
  return e >= Math.min(n, i) && e <= Math.max(n, i) && t >= Math.min(r, a) && t <= Math.max(r, a);
739
739
  }
740
740
  function on(e = {}) {
741
- let { blockPointerEvents: t = !1 } = e, n = new Ye(), r = ({ x: e, y: t, placement: r, elements: i, onClose: a, nodeId: o, tree: s }) => {
742
- let c = r?.split("-")[0], u = !1, d = null, f = null, p = typeof performance < "u" ? performance.now() : 0;
743
- function m(e, t) {
744
- let n = performance.now(), r = n - p;
745
- if (d === null || f === null || r === 0) return d = e, f = t, p = n, !1;
746
- let i = e - d, a = t - f, o = i * i + a * a, s = r * r * en;
747
- return d = e, f = t, p = n, o < s;
741
+ let { blockPointerEvents: t = !1 } = e, n = new Pe(), r = ({ x: e, y: t, placement: r, elements: i, onClose: a, nodeId: o, tree: s }) => {
742
+ let c = r?.split("-")[0], l = !1, u = null, d = null, f = typeof performance < "u" ? performance.now() : 0;
743
+ function p(e, t) {
744
+ let n = performance.now(), r = n - f;
745
+ if (u === null || d === null || r === 0) return u = e, d = t, f = n, !1;
746
+ let i = e - u, a = t - d, o = i * i + a * a, s = r * r * en;
747
+ return u = e, d = t, f = n, o < s;
748
748
  }
749
- function h() {
749
+ function m() {
750
750
  n.clear(), a();
751
751
  }
752
752
  return function(r) {
753
753
  n.clear();
754
- let a = i.domReference, d = i.floating;
755
- if (!a || !d || c == null || e == null || t == null) return;
756
- let { clientX: f, clientY: p } = r, g = A(r), _ = r.type === "mouseleave", v = l(d, g), y = l(a, g);
757
- if (v && (u = !0, !_)) return;
758
- if (y && (u = !1, !_)) {
759
- u = !0;
754
+ let a = i.domReference, u = i.floating;
755
+ if (!a || !u || c == null || e == null || t == null) return;
756
+ let { clientX: d, clientY: f } = r, h = Ee(r), g = r.type === "mouseleave", _ = O(u, h), v = O(a, h);
757
+ if (_ && (l = !0, !g)) return;
758
+ if (v && (l = !1, !g)) {
759
+ l = !0;
760
760
  return;
761
761
  }
762
- if (_ && Y(r.relatedTarget) && l(d, r.relatedTarget)) return;
763
- function b() {
764
- return !!(s && G(s.nodesRef.current, o).length > 0);
762
+ if (g && Y(r.relatedTarget) && O(u, r.relatedTarget)) return;
763
+ function y() {
764
+ return !!(s && tt(s.nodesRef.current, o).length > 0);
765
765
  }
766
- function x() {
767
- b() || h();
766
+ function b() {
767
+ y() || m();
768
768
  }
769
- if (b()) return;
770
- let S = a.getBoundingClientRect(), C = d.getBoundingClientRect(), w = e > C.right - C.width / 2, T = t > C.bottom - C.height / 2, E = C.width > S.width, D = C.height > S.height, O = (E ? S : C).left, k = (E ? S : C).right, j = (D ? S : C).top, M = (D ? S : C).bottom;
771
- if (c === "top" && t >= S.bottom - 1 || c === "bottom" && t <= S.top + 1 || c === "left" && e >= S.right - 1 || c === "right" && e <= S.left + 1) {
772
- x();
769
+ if (y()) return;
770
+ let x = a.getBoundingClientRect(), S = u.getBoundingClientRect(), C = e > S.right - S.width / 2, w = t > S.bottom - S.height / 2, T = S.width > x.width, E = S.height > x.height, D = (T ? x : S).left, k = (T ? x : S).right, A = (E ? x : S).top, j = (E ? x : S).bottom;
771
+ if (c === "top" && t >= x.bottom - 1 || c === "bottom" && t <= x.top + 1 || c === "left" && e >= x.right - 1 || c === "right" && e <= x.left + 1) {
772
+ b();
773
773
  return;
774
774
  }
775
- let N = !1;
775
+ let M = !1;
776
776
  switch (c) {
777
777
  case "top":
778
- N = an(f, p, O, S.top + 1, k, C.bottom - 1);
778
+ M = an(d, f, D, x.top + 1, k, S.bottom - 1);
779
779
  break;
780
780
  case "bottom":
781
- N = an(f, p, O, C.top + 1, k, S.bottom - 1);
781
+ M = an(d, f, D, S.top + 1, k, x.bottom - 1);
782
782
  break;
783
783
  case "left":
784
- N = an(f, p, C.right - 1, M, S.left + 1, j);
784
+ M = an(d, f, S.right - 1, j, x.left + 1, A);
785
785
  break;
786
- case "right": N = an(f, p, S.right - 1, M, C.left + 1, j);
786
+ case "right": M = an(d, f, x.right - 1, j, S.left + 1, A);
787
787
  }
788
- if (N) return;
789
- if (u && !rn(f, p, S)) {
790
- x();
788
+ if (M) return;
789
+ if (l && !rn(d, f, x)) {
790
+ b();
791
791
  return;
792
792
  }
793
- if (!_ && m(f, p)) {
794
- x();
793
+ if (!g && p(d, f)) {
794
+ b();
795
795
  return;
796
796
  }
797
- let P = !1;
797
+ let N = !1;
798
798
  switch (c) {
799
799
  case "top": {
800
- let n = E ? $ / 2 : $ * 4, r = E || w ? e + n : e - n, i = E ? e - n : w ? e + n : e - n, a = t + $ + 1, o = w || E ? C.bottom - $ : C.top, s = w ? E ? C.bottom - $ : C.top : C.bottom - $;
801
- P = nn(f, p, r, a, i, a, C.left, o, C.right, s);
800
+ let n = T ? $ / 2 : $ * 4, r = T || C ? e + n : e - n, i = T ? e - n : C ? e + n : e - n, a = t + $ + 1, o = C || T ? S.bottom - $ : S.top, s = C ? T ? S.bottom - $ : S.top : S.bottom - $;
801
+ N = nn(d, f, r, a, i, a, S.left, o, S.right, s);
802
802
  break;
803
803
  }
804
804
  case "bottom": {
805
- let n = E ? $ / 2 : $ * 4, r = E || w ? e + n : e - n, i = E ? e - n : w ? e + n : e - n, a = t - $, o = w || E ? C.top + $ : C.bottom, s = w ? E ? C.top + $ : C.bottom : C.top + $;
806
- P = nn(f, p, r, a, i, a, C.left, o, C.right, s);
805
+ let n = T ? $ / 2 : $ * 4, r = T || C ? e + n : e - n, i = T ? e - n : C ? e + n : e - n, a = t - $, o = C || T ? S.top + $ : S.bottom, s = C ? T ? S.top + $ : S.bottom : S.top + $;
806
+ N = nn(d, f, r, a, i, a, S.left, o, S.right, s);
807
807
  break;
808
808
  }
809
809
  case "left": {
810
- let n = D ? $ / 2 : $ * 4, r = D || T ? t + n : t - n, i = D ? t - n : T ? t + n : t - n, a = e + $ + 1, o = T || D ? C.right - $ : C.left, s = T ? D ? C.right - $ : C.left : C.right - $;
811
- P = nn(f, p, o, C.top, s, C.bottom, a, r, a, i);
810
+ let n = E ? $ / 2 : $ * 4, r = E || w ? t + n : t - n, i = E ? t - n : w ? t + n : t - n, a = e + $ + 1, o = w || E ? S.right - $ : S.left, s = w ? E ? S.right - $ : S.left : S.right - $;
811
+ N = nn(d, f, o, S.top, s, S.bottom, a, r, a, i);
812
812
  break;
813
813
  }
814
814
  case "right": {
815
- let n = D ? $ / 2 : $ * 4, r = D || T ? t + n : t - n, i = D ? t - n : T ? t + n : t - n, a = e - $, o = T || D ? C.left + $ : C.right, s = T ? D ? C.left + $ : C.right : C.left + $;
816
- P = nn(f, p, a, r, a, i, o, C.top, s, C.bottom);
815
+ let n = E ? $ / 2 : $ * 4, r = E || w ? t + n : t - n, i = E ? t - n : w ? t + n : t - n, a = e - $, o = w || E ? S.left + $ : S.right, s = w ? E ? S.left + $ : S.right : S.left + $;
816
+ N = nn(d, f, a, r, a, i, o, S.top, s, S.bottom);
817
817
  break;
818
818
  }
819
819
  }
820
- P ? u || n.start(40, x) : x();
820
+ N ? l || n.start(40, b) : b();
821
821
  };
822
822
  };
823
823
  return r.__options = {
@@ -829,10 +829,10 @@ function on(e = {}) {
829
829
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/popup/MenuPopup.js
830
830
  var sn = {
831
831
  ...I,
832
- ...i
832
+ ...pe
833
833
  }, cn = /*#__PURE__*/ X.forwardRef(function(e, t) {
834
- let { render: n, className: r, style: i, finalFocus: o, ...s } = e, { store: c } = Q(), { side: l, align: u } = xt(), d = a(!0) != null, f = c.useState("open"), p = c.useState("transitionStatus"), m = c.useState("popupProps"), g = c.useState("mounted"), _ = c.useState("instantType"), v = c.useState("activeTriggerElement"), y = c.useState("parent"), b = c.useState("lastOpenChangeReason"), x = c.useState("rootId"), S = c.useState("floatingRootContext"), C = c.useState("floatingTreeRoot"), w = c.useState("closeDelay"), T = c.useState("activeTriggerElement"), E = y.type === "context-menu";
835
- H({
834
+ let { render: n, className: i, style: a, finalFocus: o, ...s } = e, { store: c } = Q(), { side: l, align: u } = xt(), d = r(!0) != null, f = c.useState("open"), p = c.useState("transitionStatus"), m = c.useState("popupProps"), h = c.useState("mounted"), g = c.useState("instantType"), _ = c.useState("activeTriggerElement"), v = c.useState("parent"), b = c.useState("lastOpenChangeReason"), x = c.useState("rootId"), S = c.useState("floatingRootContext"), C = c.useState("floatingTreeRoot"), T = c.useState("closeDelay"), E = c.useState("activeTriggerElement"), D = v.type === "context-menu";
835
+ ie({
836
836
  open: f,
837
837
  ref: c.context.popupRef,
838
838
  onComplete() {
@@ -840,56 +840,56 @@ var sn = {
840
840
  }
841
841
  }), X.useEffect(() => {
842
842
  function e(e) {
843
- c.setOpen(!1, J(e.reason, e.domEvent));
843
+ c.setOpen(!1, w(e.reason, e.domEvent));
844
844
  }
845
845
  return C.events.on("close", e), () => {
846
846
  C.events.off("close", e);
847
847
  };
848
848
  }, [C.events, c]);
849
- let D = c.useState("hoverEnabled"), O = c.useState("disabled");
849
+ let O = c.useState("hoverEnabled"), k = c.useState("disabled");
850
850
  Xt(S, {
851
- enabled: D && !O && !E && y.type !== "menubar",
852
- closeDelay: w
851
+ enabled: O && !k && !D && v.type !== "menubar",
852
+ closeDelay: T
853
853
  });
854
- let k = {
854
+ let A = {
855
855
  transitionStatus: p,
856
856
  side: l,
857
857
  align: u,
858
858
  open: f,
859
- nested: y.type === "menu",
860
- instant: _
861
- }, A = X.useCallback((e) => {
859
+ nested: v.type === "menu",
860
+ instant: g
861
+ }, j = X.useCallback((e) => {
862
862
  c.set("popupElement", e);
863
- }, [c]), j = h("div", e, {
864
- state: k,
863
+ }, [c]), M = y("div", e, {
864
+ state: A,
865
865
  ref: [
866
866
  t,
867
867
  c.context.popupRef,
868
- A
868
+ j
869
869
  ],
870
870
  stateAttributesMapping: sn,
871
871
  props: [
872
872
  m,
873
873
  { onKeyDown(e) {
874
- d && rt.has(e.key) && e.stopPropagation();
874
+ d && et.has(e.key) && e.stopPropagation();
875
875
  } },
876
- Oe(p),
876
+ je(p),
877
877
  s,
878
878
  { "data-rootownerid": x }
879
879
  ]
880
- }), M = y.type === void 0 || E;
881
- return (v || y.type === "menubar" && b !== "outside-press") && (M = !0), /*#__PURE__*/ Z(Ne, {
880
+ }), N = v.type === void 0 || D;
881
+ return (_ || v.type === "menubar" && b !== "outside-press") && (N = !0), /*#__PURE__*/ Z(Ie, {
882
882
  context: S,
883
- modal: E,
884
- disabled: !g,
885
- returnFocus: o === void 0 ? M : o,
886
- initialFocus: y.type !== "menu",
883
+ modal: D,
884
+ disabled: !h,
885
+ returnFocus: o === void 0 ? N : o,
886
+ initialFocus: v.type !== "menu",
887
887
  restoreFocus: !0,
888
- externalTree: y.type === "menubar" ? void 0 : C,
889
- previousFocusableElement: T,
890
- nextFocusableElement: y.type === void 0 ? c.context.triggerFocusTargetRef : void 0,
891
- beforeContentFocusGuardRef: y.type === void 0 ? c.context.beforeContentFocusGuardRef : void 0,
892
- children: j
888
+ externalTree: v.type === "menubar" ? void 0 : C,
889
+ previousFocusableElement: E,
890
+ nextFocusableElement: v.type === void 0 ? c.context.triggerFocusTargetRef : void 0,
891
+ beforeContentFocusGuardRef: v.type === void 0 ? c.context.beforeContentFocusGuardRef : void 0,
892
+ children: M
893
893
  });
894
894
  });
895
895
  process.env.NODE_ENV !== "production" && (cn.displayName = "MenuPopup");
@@ -899,7 +899,7 @@ var ln = /*#__PURE__*/ X.createContext(void 0);
899
899
  process.env.NODE_ENV !== "production" && (ln.displayName = "MenuPortalContext");
900
900
  function un() {
901
901
  let e = X.useContext(ln);
902
- if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? q(32) : "Base UI: <Menu.Portal> is missing.");
902
+ if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? J(32) : "Base UI: <Menu.Portal> is missing.");
903
903
  return e;
904
904
  }
905
905
  //#endregion
@@ -908,7 +908,7 @@ var dn = /*#__PURE__*/ X.forwardRef(function(e, t) {
908
908
  let { keepMounted: n = !1, ...r } = e, { store: i } = Q();
909
909
  return i.useState("mounted") || n ? /*#__PURE__*/ Z(ln.Provider, {
910
910
  value: n,
911
- children: /*#__PURE__*/ Z(De, {
911
+ children: /*#__PURE__*/ Z(Ae, {
912
912
  ref: t,
913
913
  ...r
914
914
  })
@@ -918,135 +918,135 @@ process.env.NODE_ENV !== "production" && (dn.displayName = "MenuPortal");
918
918
  //#endregion
919
919
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/positioner/MenuPositioner.js
920
920
  var fn = /*#__PURE__*/ X.forwardRef(function(e, t) {
921
- let { anchor: n, positionMethod: r = "absolute", className: i, render: a, side: o, align: s, sideOffset: c = 0, alignOffset: l = 0, collisionBoundary: u = "clipping-ancestors", collisionPadding: d = 5, arrowPadding: f = 5, sticky: p = !1, disableAnchorTracking: m = !1, collisionAvoidance: h = ve, style: g, ..._ } = e, { store: y } = Q(), b = un(), x = wt(!0), S = y.useState("parent"), C = y.useState("floatingRootContext"), w = y.useState("floatingTreeRoot"), T = y.useState("mounted"), E = y.useState("open"), D = y.useState("modal"), O = y.useState("openMethod"), k = y.useState("activeTriggerElement"), A = y.useState("transitionStatus"), j = y.useState("positionerElement"), M = y.useState("instantType"), N = y.useState("hasViewport"), P = y.useState("lastOpenChangeReason"), F = y.useState("floatingNodeId"), ee = y.useState("floatingParentNodeId"), te = C.useState("domReferenceElement"), I = X.useRef(null), L = se(j, !1, !1), R = n, ne = c, re = l, z = s, B = h;
922
- S.type === "context-menu" && (R = n ?? S.context?.anchor, z ??= "start", !o && z !== "center" && (re = e.alignOffset ?? 2, ne = e.sideOffset ?? -5));
923
- let V = o, H = z;
924
- S.type === "menu" ? (V ??= "inline-end", H ??= "start", B = e.collisionAvoidance ?? Re) : S.type === "menubar" && (V ??= "bottom", H ??= "start");
925
- let ie = S.type === "context-menu", ae = Qe({
926
- anchor: R,
927
- floatingRootContext: C,
928
- positionMethod: x ? "fixed" : r,
921
+ let { anchor: n, positionMethod: r = "absolute", className: i, render: a, side: o, align: s, sideOffset: c = 0, alignOffset: l = 0, collisionBoundary: u = "clipping-ancestors", collisionPadding: d = 5, arrowPadding: f = 5, sticky: p = !1, disableAnchorTracking: m = !1, collisionAvoidance: h = ve, style: g, ..._ } = e, { store: v } = Q(), y = un(), b = wt(!0), x = v.useState("parent"), S = v.useState("floatingRootContext"), C = v.useState("floatingTreeRoot"), T = v.useState("mounted"), E = v.useState("open"), D = v.useState("modal"), O = v.useState("openMethod"), k = v.useState("activeTriggerElement"), A = v.useState("transitionStatus"), M = v.useState("positionerElement"), N = v.useState("instantType"), P = v.useState("hasViewport"), F = v.useState("lastOpenChangeReason"), I = v.useState("floatingNodeId"), ee = v.useState("floatingParentNodeId"), L = S.useState("domReferenceElement"), te = X.useRef(null), z = j(M, !1, !1), ne = n, re = c, B = l, V = s, H = h;
922
+ x.type === "context-menu" && (ne = n ?? x.context?.anchor, V ??= "start", !o && V !== "center" && (B = e.alignOffset ?? 2, re = e.sideOffset ?? -5));
923
+ let U = o, ie = V;
924
+ x.type === "menu" ? (U ??= "inline-end", ie ??= "start", H = e.collisionAvoidance ?? Be) : x.type === "menubar" && (U ??= "bottom", ie ??= "start");
925
+ let oe = x.type === "context-menu", se = Ze({
926
+ anchor: ne,
927
+ floatingRootContext: S,
928
+ positionMethod: b ? "fixed" : r,
929
929
  mounted: T,
930
- side: V,
931
- sideOffset: ne,
932
- align: H,
933
- alignOffset: re,
934
- arrowPadding: ie ? 0 : f,
930
+ side: U,
931
+ sideOffset: re,
932
+ align: ie,
933
+ alignOffset: B,
934
+ arrowPadding: oe ? 0 : f,
935
935
  collisionBoundary: u,
936
936
  collisionPadding: d,
937
937
  sticky: p,
938
- nodeId: F,
939
- keepMounted: b,
938
+ nodeId: I,
939
+ keepMounted: y,
940
940
  disableAnchorTracking: m,
941
- collisionAvoidance: B,
942
- shiftCrossAxis: ie && !("side" in B && B.side === "flip"),
943
- externalTree: w,
944
- adaptiveOrigin: N ? me : void 0
941
+ collisionAvoidance: H,
942
+ shiftCrossAxis: oe && !("side" in H && H.side === "flip"),
943
+ externalTree: C,
944
+ adaptiveOrigin: P ? G : void 0
945
945
  });
946
946
  X.useEffect(() => {
947
947
  function e(e) {
948
- e.open && (e.parentNodeId === F && y.set("hoverEnabled", !1), e.nodeId !== F && e.parentNodeId === y.select("floatingParentNodeId") && y.setOpen(!1, J(v)));
948
+ e.open && (e.parentNodeId === I && v.set("hoverEnabled", !1), e.nodeId !== I && e.parentNodeId === v.select("floatingParentNodeId") && v.setOpen(!1, w(R)));
949
949
  }
950
- return w.events.on("menuopenchange", e), () => {
951
- w.events.off("menuopenchange", e);
950
+ return C.events.on("menuopenchange", e), () => {
951
+ C.events.off("menuopenchange", e);
952
952
  };
953
953
  }, [
954
- y,
955
- w.events,
956
- F
954
+ v,
955
+ C.events,
956
+ I
957
957
  ]), X.useEffect(() => {
958
- if (y.select("floatingParentNodeId") == null) return;
958
+ if (v.select("floatingParentNodeId") == null) return;
959
959
  function e(e) {
960
- if (e.open || e.nodeId !== y.select("floatingParentNodeId")) return;
960
+ if (e.open || e.nodeId !== v.select("floatingParentNodeId")) return;
961
961
  let t = e.reason ?? "sibling-open";
962
- y.setOpen(!1, J(t));
962
+ v.setOpen(!1, w(t));
963
963
  }
964
- return w.events.on("menuopenchange", e), () => {
965
- w.events.off("menuopenchange", e);
964
+ return C.events.on("menuopenchange", e), () => {
965
+ C.events.off("menuopenchange", e);
966
966
  };
967
- }, [w.events, y]);
968
- let U = je();
967
+ }, [C.events, v]);
968
+ let W = Ue();
969
969
  X.useEffect(() => {
970
- E || U.clear();
971
- }, [E, U]), X.useEffect(() => {
970
+ E || W.clear();
971
+ }, [E, W]), X.useEffect(() => {
972
972
  function e(e) {
973
- if (!(!E || e.nodeId !== y.select("floatingParentNodeId"))) {
973
+ if (!(!E || e.nodeId !== v.select("floatingParentNodeId"))) {
974
974
  if (e.target && k && k !== e.target) {
975
- let e = y.select("closeDelay");
976
- e > 0 ? U.isStarted() || U.start(e, () => {
977
- y.setOpen(!1, J(v));
978
- }) : y.setOpen(!1, J(v));
979
- } else U.clear();
975
+ let e = v.select("closeDelay");
976
+ e > 0 ? W.isStarted() || W.start(e, () => {
977
+ v.setOpen(!1, w(R));
978
+ }) : v.setOpen(!1, w(R));
979
+ } else W.clear();
980
980
  }
981
981
  }
982
- return w.events.on("itemhover", e), () => {
983
- w.events.off("itemhover", e);
982
+ return C.events.on("itemhover", e), () => {
983
+ C.events.off("itemhover", e);
984
984
  };
985
985
  }, [
986
- w.events,
986
+ C.events,
987
987
  E,
988
988
  k,
989
- y,
990
- U
989
+ v,
990
+ W
991
991
  ]), X.useEffect(() => {
992
992
  let e = {
993
993
  open: E,
994
- nodeId: F,
994
+ nodeId: I,
995
995
  parentNodeId: ee,
996
- reason: y.select("lastOpenChangeReason")
996
+ reason: v.select("lastOpenChangeReason")
997
997
  };
998
- w.events.emit("menuopenchange", e);
998
+ C.events.emit("menuopenchange", e);
999
999
  }, [
1000
- w.events,
1000
+ C.events,
1001
1001
  E,
1002
- y,
1003
- F,
1002
+ v,
1003
+ I,
1004
1004
  ee
1005
- ]), Me(() => {
1006
- let e = te, t = I.current;
1007
- if (e && (I.current = e), t && e && e !== t) {
1008
- y.set("instantType", void 0);
1005
+ ]), q(() => {
1006
+ let e = L, t = te.current;
1007
+ if (e && (te.current = e), t && e && e !== t) {
1008
+ v.set("instantType", void 0);
1009
1009
  let e = new AbortController();
1010
- return L(() => {
1011
- y.set("instantType", "trigger-change");
1010
+ return z(() => {
1011
+ v.set("instantType", "trigger-change");
1012
1012
  }, e.signal), () => {
1013
1013
  e.abort();
1014
1014
  };
1015
1015
  }
1016
1016
  }, [
1017
- te,
1018
1017
  L,
1019
- y
1018
+ z,
1019
+ v
1020
1020
  ]);
1021
- let oe = {
1021
+ let le = {
1022
1022
  open: E,
1023
- side: ae.side,
1024
- align: ae.align,
1025
- anchorHidden: ae.anchorHidden,
1026
- nested: S.type === "menu",
1027
- instant: M
1028
- }, le = S.type === "menubar" && S.context.modal;
1029
- ce(E && (le || D && P !== "trigger-hover"), O === "touch", j, k);
1030
- let W = We(e, oe, {
1031
- styles: ae.positionerStyles,
1023
+ side: se.side,
1024
+ align: se.align,
1025
+ anchorHidden: se.anchorHidden,
1026
+ nested: x.type === "menu",
1027
+ instant: N
1028
+ }, ue = x.type === "menubar" && x.context.modal;
1029
+ ae(E && (ue || D && F !== "trigger-hover"), O === "touch", M, k);
1030
+ let de = Ge(e, le, {
1031
+ styles: se.positionerStyles,
1032
1032
  transitionStatus: A,
1033
1033
  props: _,
1034
- refs: [t, y.useStateSetter("positionerElement")],
1034
+ refs: [t, v.useStateSetter("positionerElement")],
1035
1035
  hidden: !T,
1036
1036
  inert: !E
1037
- }), ue = T && S.type !== "menu" && (S.type !== "menubar" && D && P !== "trigger-hover" || S.type === "menubar" && S.context.modal), G = null;
1038
- return S.type === "menubar" ? G = S.context.contentElement : S.type === void 0 && (G = k), /*#__PURE__*/ mt(bt.Provider, {
1039
- value: ae,
1040
- children: [ue && /*#__PURE__*/ Z(de, {
1041
- ref: S.type === "context-menu" || S.type === "nested-context-menu" ? S.context.internalBackdropRef : null,
1042
- inert: Le(!E),
1043
- cutout: G
1044
- }), /*#__PURE__*/ Z(Ue, {
1045
- id: F,
1046
- children: /*#__PURE__*/ Z(Ee, {
1047
- elementsRef: y.context.itemDomElements,
1048
- labelsRef: y.context.itemLabels,
1049
- children: W
1037
+ }), fe = T && x.type !== "menu" && (x.type !== "menubar" && D && F !== "trigger-hover" || x.type === "menubar" && x.context.modal), pe = null;
1038
+ return x.type === "menubar" ? pe = x.context.contentElement : x.type === void 0 && (pe = k), /*#__PURE__*/ mt(bt.Provider, {
1039
+ value: se,
1040
+ children: [fe && /*#__PURE__*/ Z(ce, {
1041
+ ref: x.type === "context-menu" || x.type === "nested-context-menu" ? x.context.internalBackdropRef : null,
1042
+ inert: ze(!E),
1043
+ cutout: pe
1044
+ }), /*#__PURE__*/ Z(We, {
1045
+ id: I,
1046
+ children: /*#__PURE__*/ Z(Oe, {
1047
+ elementsRef: v.context.itemDomElements,
1048
+ labelsRef: v.context.itemLabels,
1049
+ children: de
1050
1050
  })
1051
1051
  })]
1052
1052
  });
@@ -1058,36 +1058,36 @@ var pn = /*#__PURE__*/ X.createContext(null);
1058
1058
  process.env.NODE_ENV !== "production" && (pn.displayName = "MenubarContext");
1059
1059
  function mn(e) {
1060
1060
  let t = X.useContext(pn);
1061
- if (t === null && !e) throw Error(process.env.NODE_ENV === "production" ? q(5) : "Base UI: MenubarContext is missing. Menubar parts must be placed within <Menubar>.");
1061
+ if (t === null && !e) throw Error(process.env.NODE_ENV === "production" ? J(5) : "Base UI: MenubarContext is missing. Menubar parts must be placed within <Menubar>.");
1062
1062
  return t;
1063
1063
  }
1064
1064
  //#endregion
1065
1065
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/store/MenuStore.js
1066
1066
  var hn = {
1067
- ...N,
1068
- disabled: U((e) => e.parent.type === "menubar" && e.parent.context.disabled || e.disabled),
1069
- modal: U((e) => (e.parent.type === void 0 || e.parent.type === "context-menu") && (e.modal ?? !0)),
1070
- openMethod: U((e) => e.openMethod),
1071
- allowMouseEnter: U((e) => e.allowMouseEnter),
1072
- stickIfOpen: U((e) => e.stickIfOpen),
1073
- parent: U((e) => e.parent),
1074
- rootId: U((e) => e.parent.type === "menu" ? e.parent.store.select("rootId") : e.parent.type === void 0 ? e.rootId : e.parent.context.rootId),
1075
- activeIndex: U((e) => e.activeIndex),
1076
- isActive: U((e, t) => e.activeIndex === t),
1077
- hoverEnabled: U((e) => e.hoverEnabled),
1078
- instantType: U((e) => e.instantType),
1079
- lastOpenChangeReason: U((e) => e.openChangeReason),
1080
- floatingTreeRoot: U((e) => e.parent.type === "menu" ? e.parent.store.select("floatingTreeRoot") : e.floatingTreeRoot),
1081
- floatingNodeId: U((e) => e.floatingNodeId),
1082
- floatingParentNodeId: U((e) => e.floatingParentNodeId),
1083
- itemProps: U((e) => e.itemProps),
1084
- closeDelay: U((e) => e.closeDelay),
1085
- hasViewport: U((e) => e.hasViewport),
1086
- keyboardEventRelay: U((e) => {
1067
+ ...M,
1068
+ disabled: H((e) => e.parent.type === "menubar" && e.parent.context.disabled || e.disabled),
1069
+ modal: H((e) => (e.parent.type === void 0 || e.parent.type === "context-menu") && (e.modal ?? !0)),
1070
+ openMethod: H((e) => e.openMethod),
1071
+ allowMouseEnter: H((e) => e.allowMouseEnter),
1072
+ stickIfOpen: H((e) => e.stickIfOpen),
1073
+ parent: H((e) => e.parent),
1074
+ rootId: H((e) => e.parent.type === "menu" ? e.parent.store.select("rootId") : e.parent.type === void 0 ? e.rootId : e.parent.context.rootId),
1075
+ activeIndex: H((e) => e.activeIndex),
1076
+ isActive: H((e, t) => e.activeIndex === t),
1077
+ hoverEnabled: H((e) => e.hoverEnabled),
1078
+ instantType: H((e) => e.instantType),
1079
+ lastOpenChangeReason: H((e) => e.openChangeReason),
1080
+ floatingTreeRoot: H((e) => e.parent.type === "menu" ? e.parent.store.select("floatingTreeRoot") : e.floatingTreeRoot),
1081
+ floatingNodeId: H((e) => e.floatingNodeId),
1082
+ floatingParentNodeId: H((e) => e.floatingParentNodeId),
1083
+ itemProps: H((e) => e.itemProps),
1084
+ closeDelay: H((e) => e.closeDelay),
1085
+ hasViewport: H((e) => e.hasViewport),
1086
+ keyboardEventRelay: H((e) => {
1087
1087
  if (e.keyboardEventRelay) return e.keyboardEventRelay;
1088
1088
  if (e.parent.type === "menu") return e.parent.store.select("keyboardEventRelay");
1089
1089
  })
1090
- }, gn = class e extends re {
1090
+ }, gn = class e extends z {
1091
1091
  constructor(e) {
1092
1092
  super({
1093
1093
  ..._n(),
@@ -1102,7 +1102,7 @@ var hn = {
1102
1102
  triggerFocusTargetRef: /*#__PURE__*/ X.createRef(),
1103
1103
  beforeContentFocusGuardRef: /*#__PURE__*/ X.createRef(),
1104
1104
  onOpenChangeComplete: void 0,
1105
- triggerElements: new at()
1105
+ triggerElements: new it()
1106
1106
  }, hn), this.unsubscribeParentListener = this.observe("parent", (e) => {
1107
1107
  if (this.unsubscribeParentListener?.(), e.type === "menu") {
1108
1108
  let t = e.store.select("rootId"), n = e.store.select("floatingTreeRoot"), r = e.store.select("keyboardEventRelay");
@@ -1122,14 +1122,14 @@ var hn = {
1122
1122
  });
1123
1123
  }
1124
1124
  static useStore(t, n) {
1125
- let r = Fe(() => new e(n)).current;
1125
+ let r = qe(() => new e(n)).current;
1126
1126
  return t ?? r;
1127
1127
  }
1128
1128
  unsubscribeParentListener = null;
1129
1129
  };
1130
1130
  function _n() {
1131
1131
  return {
1132
- ...w(),
1132
+ ...b(),
1133
1133
  disabled: !1,
1134
1134
  modal: !0,
1135
1135
  openMethod: null,
@@ -1141,10 +1141,10 @@ function _n() {
1141
1141
  hoverEnabled: !0,
1142
1142
  instantType: void 0,
1143
1143
  openChangeReason: null,
1144
- floatingTreeRoot: new pe(),
1144
+ floatingTreeRoot: new de(),
1145
1145
  floatingNodeId: void 0,
1146
1146
  floatingParentNodeId: null,
1147
- itemProps: Be,
1147
+ itemProps: v,
1148
1148
  keyboardEventRelay: void 0,
1149
1149
  closeDelay: 0,
1150
1150
  hasViewport: !1
@@ -1159,27 +1159,27 @@ function yn() {
1159
1159
  }
1160
1160
  //#endregion
1161
1161
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/root/MenuRoot.js
1162
- var bn = ze(function(e) {
1163
- let { children: t, open: n, onOpenChange: r, onOpenChangeComplete: i, defaultOpen: a = !1, disabled: o = !1, modal: c, loopFocus: l = !0, orientation: u = "vertical", actionsRef: d, closeParentOnEsc: f = !1, handle: m, triggerId: h, defaultTriggerId: g = null, highlightItemOnHover: _ = !0 } = e, v = wt(!0), b = Q(!0), x = mn(!0), S = yn(), w = X.useMemo(() => S && b ? {
1162
+ var bn = Ve(function(e) {
1163
+ let { children: t, open: n, onOpenChange: r, onOpenChangeComplete: i, defaultOpen: a = !1, disabled: s = !1, modal: c, loopFocus: l = !0, orientation: u = "vertical", actionsRef: d, closeParentOnEsc: p = !1, handle: m, triggerId: h, defaultTriggerId: g = null, highlightItemOnHover: _ = !0 } = e, v = wt(!0), y = Q(!0), b = mn(!0), S = yn(), E = X.useMemo(() => S && y ? {
1164
1164
  type: "menu",
1165
- store: b.store
1166
- } : x ? {
1165
+ store: y.store
1166
+ } : b ? {
1167
1167
  type: "menubar",
1168
- context: x
1169
- } : v && !b ? {
1168
+ context: b
1169
+ } : v && !y ? {
1170
1170
  type: "context-menu",
1171
1171
  context: v
1172
1172
  } : { type: void 0 }, [
1173
1173
  v,
1174
+ y,
1174
1175
  b,
1175
- x,
1176
1176
  S
1177
1177
  ]), D = gn.useStore(m?.store, {
1178
1178
  open: a,
1179
1179
  openProp: n,
1180
1180
  activeTriggerId: g,
1181
1181
  triggerIdProp: h,
1182
- parent: w
1182
+ parent: E
1183
1183
  });
1184
1184
  be(() => {
1185
1185
  n === void 0 && D.state.open === !1 && a === !0 && D.update({
@@ -1187,161 +1187,161 @@ var bn = ze(function(e) {
1187
1187
  activeTriggerId: g
1188
1188
  });
1189
1189
  }), D.useControlledProp("openProp", n), D.useControlledProp("triggerIdProp", h), D.useContextCallback("onOpenChangeComplete", i);
1190
- let O = D.useState("floatingTreeRoot"), A = ue(O), j = Ie();
1191
- Me(() => {
1192
- v && !b ? D.update({
1190
+ let O = D.useState("floatingTreeRoot"), A = se(O), j = Re();
1191
+ q(() => {
1192
+ v && !y ? D.update({
1193
1193
  parent: {
1194
1194
  type: "context-menu",
1195
1195
  context: v
1196
1196
  },
1197
1197
  floatingNodeId: A,
1198
1198
  floatingParentNodeId: j
1199
- }) : b && D.update({
1199
+ }) : y && D.update({
1200
1200
  floatingNodeId: A,
1201
1201
  floatingParentNodeId: j
1202
1202
  });
1203
1203
  }, [
1204
1204
  v,
1205
- b,
1205
+ y,
1206
1206
  A,
1207
1207
  j,
1208
1208
  D
1209
1209
  ]);
1210
- let N = D.useState("open"), P = D.useState("activeTriggerElement"), F = D.useState("positionerElement"), ee = D.useState("hoverEnabled"), te = D.useState("disabled"), I = D.useState("lastOpenChangeReason"), L = D.useState("parent"), R = D.useState("activeIndex"), re = D.useState("payload"), z = D.useState("floatingParentNodeId"), B = X.useRef(null), V = z != null;
1211
- process.env.NODE_ENV !== "production" && L.type !== void 0 && c !== void 0 && console.warn("Base UI: The `modal` prop is not supported on nested menus. It will be ignored.");
1212
- let { openMethod: H, triggerProps: ie } = Ae(N);
1210
+ let M = D.useState("open"), P = D.useState("activeTriggerElement"), F = D.useState("positionerElement"), I = D.useState("hoverEnabled"), ee = D.useState("disabled"), L = D.useState("lastOpenChangeReason"), R = D.useState("parent"), z = D.useState("activeIndex"), ne = D.useState("payload"), re = D.useState("floatingParentNodeId"), B = X.useRef(null), V = re != null;
1211
+ process.env.NODE_ENV !== "production" && R.type !== void 0 && c !== void 0 && console.warn("Base UI: The `modal` prop is not supported on nested menus. It will be ignored.");
1212
+ let { openMethod: H, triggerProps: U } = Ne(M);
1213
1213
  D.useSyncedValues({
1214
- disabled: o,
1215
- modal: L.type === void 0 ? c : void 0,
1214
+ disabled: s,
1215
+ modal: R.type === void 0 ? c : void 0,
1216
1216
  openMethod: H,
1217
- rootId: y()
1218
- }), s(D);
1219
- let { forceUnmount: ae } = ne(N, D, () => {
1217
+ rootId: x()
1218
+ }), o(D);
1219
+ let { forceUnmount: ie } = te(M, D, () => {
1220
1220
  D.update({
1221
1221
  allowMouseEnter: !1,
1222
1222
  stickIfOpen: !0
1223
1223
  });
1224
- }), U = X.useRef(L.type !== "context-menu"), oe = je();
1224
+ }), ae = X.useRef(R.type !== "context-menu"), oe = Ue();
1225
1225
  X.useEffect(() => {
1226
- if (N || (B.current = null), L.type === "context-menu") {
1227
- if (!N) {
1228
- oe.clear(), U.current = !1;
1226
+ if (M || (B.current = null), R.type === "context-menu") {
1227
+ if (!M) {
1228
+ oe.clear(), ae.current = !1;
1229
1229
  return;
1230
1230
  }
1231
1231
  oe.start(500, () => {
1232
- U.current = !0;
1232
+ ae.current = !0;
1233
1233
  });
1234
1234
  }
1235
1235
  }, [
1236
1236
  oe,
1237
- N,
1238
- L.type
1239
- ]), Me(() => {
1240
- !N && !ee && D.set("hoverEnabled", !0);
1237
+ M,
1238
+ R.type
1239
+ ]), q(() => {
1240
+ !M && !I && D.set("hoverEnabled", !0);
1241
1241
  }, [
1242
- N,
1243
- ee,
1242
+ M,
1243
+ I,
1244
1244
  D
1245
1245
  ]);
1246
- let se = X.useRef(!0), ce = je(), le = W((e, t) => {
1246
+ let W = X.useRef(!0), ce = Ue(), le = K((e, t) => {
1247
1247
  let n = t.reason;
1248
- if (N === e && t.trigger === P && I === n || (t.preventUnmountOnClose = () => {
1248
+ if (M === e && t.trigger === P && L === n || (t.preventUnmountOnClose = () => {
1249
1249
  D.set("preventUnmountingOnClose", !0);
1250
1250
  }, !e && t.trigger == null && (t.trigger = P ?? void 0), r?.(e, t), t.isCanceled)) return;
1251
1251
  D.state.floatingRootContext.dispatchOpenChange(e, t);
1252
1252
  let i = t.event;
1253
- if (e === !1 && i?.type === "click" && i.pointerType === "touch" && !se.current) return;
1254
- if (!e && R !== null) {
1255
- let e = D.context.itemDomElements.current[R];
1253
+ if (e === !1 && i?.type === "click" && i.pointerType === "touch" && !W.current) return;
1254
+ if (!e && z !== null) {
1255
+ let e = D.context.itemDomElements.current[z];
1256
1256
  queueMicrotask(() => {
1257
1257
  e?.setAttribute("tabindex", "-1");
1258
1258
  });
1259
1259
  }
1260
- e && n === "trigger-focus" ? (se.current = !1, ce.start(300, () => {
1261
- se.current = !0;
1262
- })) : (se.current = !0, ce.clear());
1260
+ e && n === "trigger-focus" ? (W.current = !1, ce.start(300, () => {
1261
+ W.current = !0;
1262
+ })) : (W.current = !0, ce.clear());
1263
1263
  let a = (n === "trigger-press" || n === "item-press") && i.detail === 0 && i?.isTrusted, o = !e && (n === "escape-key" || n == null), s = {
1264
1264
  open: e,
1265
1265
  openChangeReason: n
1266
1266
  };
1267
1267
  B.current = t.event ?? null;
1268
1268
  let c = t.trigger?.id ?? null;
1269
- (c || e) && (s.activeTriggerId = c, s.activeTriggerElement = t.trigger ?? null), D.update(s), L.type === "menubar" && (n === "trigger-focus" || n === "focus-out" || n === "trigger-hover" || n === "list-navigation" || n === "sibling-open") ? D.set("instantType", "group") : a || o ? D.set("instantType", a ? "click" : "dismiss") : D.set("instantType", void 0);
1270
- }), G = X.useCallback(() => {
1271
- D.setOpen(!1, J(T));
1269
+ (c || e) && (s.activeTriggerId = c, s.activeTriggerElement = t.trigger ?? null), D.update(s), R.type === "menubar" && (n === "trigger-focus" || n === "focus-out" || n === "trigger-hover" || n === "list-navigation" || n === "sibling-open") ? D.set("instantType", "group") : a || o ? D.set("instantType", a ? "click" : "dismiss") : D.set("instantType", void 0);
1270
+ }), ue = X.useCallback(() => {
1271
+ D.setOpen(!1, w(N));
1272
1272
  }, [D]);
1273
1273
  X.useImperativeHandle(d, () => ({
1274
- unmount: ae,
1275
- close: G
1276
- }), [ae, G]);
1277
- let K;
1278
- L.type === "context-menu" && (K = L.context), X.useImperativeHandle(K?.positionerRef, () => F, [F]), X.useImperativeHandle(K?.actionsRef, () => ({ setOpen: le }), [le]);
1279
- let de = p({
1274
+ unmount: ie,
1275
+ close: ue
1276
+ }), [ie, ue]);
1277
+ let de;
1278
+ R.type === "context-menu" && (de = R.context), X.useImperativeHandle(de?.positionerRef, () => F, [F]), X.useImperativeHandle(de?.actionsRef, () => ({ setOpen: le }), [le]);
1279
+ let G = f({
1280
1280
  popupStore: D,
1281
1281
  onOpenChange: le
1282
- }), fe = de.context.events;
1282
+ }), fe = G.context.events;
1283
1283
  X.useEffect(() => {
1284
1284
  let e = ({ open: e, eventDetails: t }) => le(e, t);
1285
1285
  return fe.on("setOpen", e), () => {
1286
1286
  fe?.off("setOpen", e);
1287
1287
  };
1288
1288
  }, [fe, le]);
1289
- let pe = ge(de, {
1290
- enabled: !te,
1291
- bubbles: { escapeKey: f && L.type === "menu" },
1289
+ let pe = he(G, {
1290
+ enabled: !ee,
1291
+ bubbles: { escapeKey: p && R.type === "menu" },
1292
1292
  outsidePress() {
1293
- return L.type !== "context-menu" || B.current?.type === "contextmenu" || U.current;
1293
+ return R.type !== "context-menu" || B.current?.type === "contextmenu" || ae.current;
1294
1294
  },
1295
1295
  externalTree: V ? O : void 0
1296
- }), me = E(de, { role: "menu" }), he = _e(), q = X.useCallback((e) => {
1296
+ }), me = C(G, { role: "menu" }), _e = ge(), ve = X.useCallback((e) => {
1297
1297
  D.select("activeIndex") !== e && D.set("activeIndex", e);
1298
- }, [D]), ve = k(de, {
1299
- enabled: !te,
1298
+ }, [D]), ye = T(G, {
1299
+ enabled: !ee,
1300
1300
  listRef: D.context.itemDomElements,
1301
- activeIndex: R,
1302
- nested: L.type !== void 0,
1301
+ activeIndex: z,
1302
+ nested: R.type !== void 0,
1303
1303
  loopFocus: l,
1304
1304
  orientation: u,
1305
- parentOrientation: L.type === "menubar" ? L.context.orientation : void 0,
1306
- rtl: he === "rtl",
1307
- disabledIndices: C,
1308
- onNavigate: q,
1309
- openOnArrowKeyDown: L.type !== "context-menu",
1305
+ parentOrientation: R.type === "menubar" ? R.context.orientation : void 0,
1306
+ rtl: _e === "rtl",
1307
+ disabledIndices: He,
1308
+ onNavigate: ve,
1309
+ openOnArrowKeyDown: R.type !== "context-menu",
1310
1310
  externalTree: V ? O : void 0,
1311
1311
  focusItemOnHover: _
1312
- }), ye = X.useCallback((e) => {
1312
+ }), xe = X.useCallback((e) => {
1313
1313
  D.context.typingRef.current = e;
1314
- }, [D]), xe = Ce(de, {
1314
+ }, [D]), Se = we(G, {
1315
1315
  listRef: D.context.itemLabels,
1316
1316
  elementsRef: D.context.itemDomElements,
1317
- activeIndex: R,
1317
+ activeIndex: z,
1318
1318
  resetMs: 500,
1319
1319
  onMatch: (e) => {
1320
- N && e !== R && D.set("activeIndex", e);
1320
+ M && e !== z && D.set("activeIndex", e);
1321
1321
  },
1322
- onTypingChange: ye
1323
- }), { getReferenceProps: we, getFloatingProps: Te, getItemProps: Ee, getTriggerProps: Y } = M([
1322
+ onTypingChange: xe
1323
+ }), { getReferenceProps: Te, getFloatingProps: Ee, getItemProps: De, getTriggerProps: Oe } = k([
1324
1324
  pe,
1325
1325
  me,
1326
- ve,
1327
- xe
1328
- ]), De = X.useMemo(() => {
1329
- let e = Xe(we(), { onMouseMove() {
1326
+ ye,
1327
+ Se
1328
+ ]), ke = X.useMemo(() => {
1329
+ let e = Fe(Te(), { onMouseMove() {
1330
1330
  D.set("allowMouseEnter", !0);
1331
- } }, ie);
1331
+ } }, U);
1332
1332
  return delete e.role, e;
1333
1333
  }, [
1334
- we,
1334
+ Te,
1335
1335
  D,
1336
- ie
1337
- ]), Oe = X.useMemo(() => {
1338
- let e = Y();
1336
+ U
1337
+ ]), Ae = X.useMemo(() => {
1338
+ let e = Oe();
1339
1339
  if (!e) return e;
1340
- let t = Xe(e, ie);
1340
+ let t = Fe(e, U);
1341
1341
  return delete t.role, delete t["aria-controls"], t;
1342
- }, [Y, ie]), ke = X.useMemo(() => Te({
1342
+ }, [Oe, U]), je = X.useMemo(() => Ee({
1343
1343
  onMouseMove() {
1344
- D.set("allowMouseEnter", !0), L.type === "menu" && D.set("hoverEnabled", !1);
1344
+ D.set("allowMouseEnter", !0), R.type === "menu" && D.set("hoverEnabled", !1);
1345
1345
  },
1346
1346
  onClick() {
1347
1347
  D.select("hoverEnabled") && D.set("hoverEnabled", !1);
@@ -1351,28 +1351,28 @@ var bn = ze(function(e) {
1351
1351
  t && !e.isPropagationStopped() && t(e);
1352
1352
  }
1353
1353
  }), [
1354
- Te,
1355
- L.type,
1354
+ Ee,
1355
+ R.type,
1356
1356
  D
1357
- ]), Ne = X.useMemo(() => Ee(), [Ee]);
1357
+ ]), Me = X.useMemo(() => De(), [De]);
1358
1358
  D.useSyncedValues({
1359
- floatingRootContext: de,
1360
- activeTriggerProps: De,
1361
- inactiveTriggerProps: Oe,
1362
- popupProps: ke,
1363
- itemProps: Ne
1359
+ floatingRootContext: G,
1360
+ activeTriggerProps: ke,
1361
+ inactiveTriggerProps: Ae,
1362
+ popupProps: je,
1363
+ itemProps: Me
1364
1364
  });
1365
1365
  let Pe = X.useMemo(() => ({
1366
1366
  store: D,
1367
- parent: w
1368
- }), [D, w]), Fe = /*#__PURE__*/ Z(St.Provider, {
1367
+ parent: E
1368
+ }), [D, E]), Ie = /*#__PURE__*/ Z(St.Provider, {
1369
1369
  value: Pe,
1370
- children: typeof t == "function" ? t({ payload: re }) : t
1370
+ children: typeof t == "function" ? t({ payload: ne }) : t
1371
1371
  });
1372
- return L.type === void 0 || L.type === "context-menu" ? /*#__PURE__*/ Z(Se, {
1372
+ return R.type === void 0 || R.type === "context-menu" ? /*#__PURE__*/ Z(Ce, {
1373
1373
  externalTree: O,
1374
- children: Fe
1375
- }) : Fe;
1374
+ children: Ie
1375
+ }) : Ie;
1376
1376
  });
1377
1377
  process.env.NODE_ENV !== "production" && (bn.displayName = "MenuRoot");
1378
1378
  //#endregion
@@ -1387,34 +1387,34 @@ function xn(e) {
1387
1387
  //#endregion
1388
1388
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/internals/composite/item/useCompositeItem.js
1389
1389
  function Sn(e = {}) {
1390
- let { highlightItemOnHover: t, highlightedIndex: n, onHighlightedIndexChange: i } = r(), { ref: a, index: o } = ee(e), s = n === o, c = X.useRef(null), l = V(a, c);
1390
+ let { highlightItemOnHover: t, highlightedIndex: n, onHighlightedIndexChange: r } = me(), { ref: i, index: a } = P(e), o = n === a, s = X.useRef(null), c = U(i, s);
1391
1391
  return {
1392
1392
  compositeProps: X.useMemo(() => ({
1393
- tabIndex: s ? 0 : -1,
1393
+ tabIndex: o ? 0 : -1,
1394
1394
  onFocus() {
1395
- i(o);
1395
+ r(a);
1396
1396
  },
1397
1397
  onMouseMove() {
1398
- let e = c.current;
1398
+ let e = s.current;
1399
1399
  if (!t || !e) return;
1400
1400
  let n = e.hasAttribute("disabled") || e.ariaDisabled === "true";
1401
- !s && !n && e.focus();
1401
+ !o && !n && e.focus();
1402
1402
  }
1403
1403
  }), [
1404
- s,
1405
- i,
1406
1404
  o,
1405
+ r,
1406
+ a,
1407
1407
  t
1408
1408
  ]),
1409
- compositeRef: l,
1410
- index: o
1409
+ compositeRef: c,
1410
+ index: a
1411
1411
  };
1412
1412
  }
1413
1413
  //#endregion
1414
1414
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/internals/composite/item/CompositeItem.js
1415
1415
  function Cn(e) {
1416
- let { render: t, className: n, style: r, state: i = Be, props: a = C, refs: o = C, metadata: s, stateAttributesMapping: c, tag: l = "div", ...u } = e, { compositeProps: d, compositeRef: f } = Sn({ metadata: s });
1417
- return h(l, e, {
1416
+ let { render: t, className: n, style: r, state: i = v, props: a = He, refs: o = He, metadata: s, stateAttributesMapping: c, tag: l = "div", ...u } = e, { compositeProps: d, compositeRef: f } = Sn({ metadata: s });
1417
+ return y(l, e, {
1418
1418
  state: i,
1419
1419
  ref: [...o, f],
1420
1420
  props: [
@@ -1428,8 +1428,8 @@ function Cn(e) {
1428
1428
  //#endregion
1429
1429
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/utils/findRootOwnerId.js
1430
1430
  function wn(e) {
1431
- if ($e(e) && e.hasAttribute("data-rootownerid")) return e.getAttribute("data-rootownerid") ?? void 0;
1432
- if (!he(e)) return wn(Ke(e));
1431
+ if (fe(e) && e.hasAttribute("data-rootownerid")) return e.getAttribute("data-rootownerid") ?? void 0;
1432
+ if (!_e(e)) return wn(ue(e));
1433
1433
  }
1434
1434
  //#endregion
1435
1435
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/utils/popups/useTriggerFocusGuards.js
@@ -1437,22 +1437,22 @@ function Tn(e, t) {
1437
1437
  let n = X.useRef(null);
1438
1438
  return {
1439
1439
  preFocusGuardRef: n,
1440
- handlePreFocusGuardFocus: W((t) => {
1440
+ handlePreFocusGuardFocus: K((t) => {
1441
1441
  ht.flushSync(() => {
1442
- e.setOpen(!1, J(b, t.nativeEvent, t.currentTarget));
1443
- }), Pe(n.current)?.focus();
1442
+ e.setOpen(!1, w(S, t.nativeEvent, t.currentTarget));
1443
+ }), Ke(n.current)?.focus();
1444
1444
  }),
1445
- handleFocusTargetFocus: W((n) => {
1445
+ handleFocusTargetFocus: K((n) => {
1446
1446
  let r = e.select("positionerElement");
1447
- if (r && Ge(n, r)) e.context.beforeContentFocusGuardRef.current?.focus();
1447
+ if (r && le(n, r)) e.context.beforeContentFocusGuardRef.current?.focus();
1448
1448
  else {
1449
1449
  ht.flushSync(() => {
1450
- e.setOpen(!1, J(b, n.nativeEvent, n.currentTarget));
1450
+ e.setOpen(!1, w(S, n.nativeEvent, n.currentTarget));
1451
1451
  });
1452
- let i = le(e.context.triggerFocusTargetRef.current || t.current);
1453
- for (; i !== null && l(r, i);) {
1452
+ let i = Le(e.context.triggerFocusTargetRef.current || t.current);
1453
+ for (; i !== null && O(r, i);) {
1454
1454
  let e = i;
1455
- if (i = xe(i), i === e) break;
1455
+ if (i = oe(i), i === e) break;
1456
1456
  }
1457
1457
  i?.focus();
1458
1458
  }
@@ -1465,14 +1465,14 @@ function En(e) {
1465
1465
  let { enabled: t = !0, mouseDownAction: n, open: r } = e, i = X.useRef(!1);
1466
1466
  return X.useMemo(() => t ? {
1467
1467
  onMouseDown: (e) => {
1468
- (n === "open" && !r || n === "close" && r) && (i.current = !0, D(e.currentTarget).addEventListener("click", () => {
1468
+ (n === "open" && !r || n === "close" && r) && (i.current = !0, E(e.currentTarget).addEventListener("click", () => {
1469
1469
  i.current = !1;
1470
1470
  }, { once: !0 }));
1471
1471
  },
1472
1472
  onClick: (e) => {
1473
1473
  i.current && (i.current = !1, e.preventBaseUIHandler());
1474
1474
  }
1475
- } : Be, [
1475
+ } : v, [
1476
1476
  t,
1477
1477
  n,
1478
1478
  r
@@ -1480,125 +1480,125 @@ function En(e) {
1480
1480
  }
1481
1481
  //#endregion
1482
1482
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/trigger/MenuTrigger.js
1483
- var Dn = 2, On = x(function(e, t) {
1484
- let { render: n, className: i, disabled: a = !1, nativeButton: o = !0, id: s, openOnHover: c, delay: u = 100, closeDelay: d = 0, handle: p, payload: _, style: v, ...y } = e, b = Q(!0), x = p?.store ?? b?.store;
1485
- if (!x) throw Error(process.env.NODE_ENV === "production" ? q(85) : "Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.");
1486
- let S = m(s), C = x.useState("isTriggerActive", S), w = x.useState("floatingRootContext"), T = x.useState("isOpenedByTrigger", S), E = X.useRef(null), k = An(), A = r(!0), j = qe(), N = X.useMemo(() => j ?? new pe(), [j]), P = ue(N), F = Ie(), { registerTrigger: ee, isMountedByThisTrigger: te } = g(S, E, x, {
1487
- payload: _,
1488
- closeDelay: d,
1489
- parent: k,
1490
- floatingTreeRoot: N,
1491
- floatingNodeId: P,
1492
- floatingParentNodeId: F,
1493
- keyboardEventRelay: A?.relayKeyboardEvent
1494
- }), I = k.type === "menubar", L = x.useState("disabled"), R = a || L || I && k.context.disabled, { getButtonProps: ne, buttonRef: re } = oe({
1495
- disabled: R,
1496
- native: o
1483
+ var Dn = 2, On = _(function(e, t) {
1484
+ let { render: n, className: r, disabled: i = !1, nativeButton: a = !0, id: o, openOnHover: s, delay: c = 100, closeDelay: l = 0, handle: u, payload: f, style: p, ...m } = e, _ = Q(!0), b = u?.store ?? _?.store;
1485
+ if (!b) throw Error(process.env.NODE_ENV === "production" ? J(85) : "Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.");
1486
+ let x = g(o), S = b.useState("isTriggerActive", x), C = b.useState("floatingRootContext"), w = b.useState("isOpenedByTrigger", x), T = X.useRef(null), j = An(), M = me(!0), N = Je(), P = X.useMemo(() => N ?? new de(), [N]), F = se(P), I = Re(), { registerTrigger: ee, isMountedByThisTrigger: L } = h(x, T, b, {
1487
+ payload: f,
1488
+ closeDelay: l,
1489
+ parent: j,
1490
+ floatingTreeRoot: P,
1491
+ floatingNodeId: F,
1492
+ floatingParentNodeId: I,
1493
+ keyboardEventRelay: M?.relayKeyboardEvent
1494
+ }), R = j.type === "menubar", te = b.useState("disabled"), z = i || te || R && j.context.disabled, { getButtonProps: ne, buttonRef: re } = A({
1495
+ disabled: z,
1496
+ native: a
1497
1497
  });
1498
1498
  X.useEffect(() => {
1499
- !T && k.type === void 0 && (x.context.allowMouseUpTriggerRef.current = !1);
1499
+ !w && j.type === void 0 && (b.context.allowMouseUpTriggerRef.current = !1);
1500
1500
  }, [
1501
- x,
1502
- T,
1503
- k.type
1501
+ b,
1502
+ w,
1503
+ j.type
1504
1504
  ]);
1505
- let z = X.useRef(null), B = je(), V = W((e) => {
1506
- if (!z.current) return;
1507
- B.clear(), x.context.allowMouseUpTriggerRef.current = !1;
1505
+ let B = X.useRef(null), V = Ue(), H = K((e) => {
1506
+ if (!B.current) return;
1507
+ V.clear(), b.context.allowMouseUpTriggerRef.current = !1;
1508
1508
  let t = e.target;
1509
- if (l(z.current, t) || l(x.select("positionerElement"), t) || t === z.current || t != null && wn(t) === x.select("rootId")) return;
1510
- let n = Je(z.current);
1511
- e.clientX >= n.left - Dn && e.clientX <= n.right + Dn && e.clientY >= n.top - Dn && e.clientY <= n.bottom + Dn || N.events.emit("close", {
1509
+ if (O(B.current, t) || O(b.select("positionerElement"), t) || t === B.current || t != null && wn(t) === b.select("rootId")) return;
1510
+ let n = Ye(B.current);
1511
+ e.clientX >= n.left - Dn && e.clientX <= n.right + Dn && e.clientY >= n.top - Dn && e.clientY <= n.bottom + Dn || P.events.emit("close", {
1512
1512
  domEvent: e,
1513
- reason: O
1513
+ reason: D
1514
1514
  });
1515
1515
  });
1516
1516
  X.useEffect(() => {
1517
- T && x.select("lastOpenChangeReason") === "trigger-hover" && D(z.current).addEventListener("mouseup", V, { once: !0 });
1517
+ w && b.select("lastOpenChangeReason") === "trigger-hover" && E(B.current).addEventListener("mouseup", H, { once: !0 });
1518
1518
  }, [
1519
- T,
1520
- V,
1521
- x
1519
+ w,
1520
+ H,
1521
+ b
1522
1522
  ]);
1523
- let H = I && k.context.hasSubmenuOpen, ie = Qt(w, {
1524
- enabled: (c ?? H) && !R && k.type !== "context-menu" && (!I || H && !te),
1525
- handleClose: on({ blockPointerEvents: !I }),
1523
+ let U = R && j.context.hasSubmenuOpen, ie = Qt(C, {
1524
+ enabled: (s ?? U) && !z && j.type !== "context-menu" && (!R || U && !L),
1525
+ handleClose: on({ blockPointerEvents: !R }),
1526
1526
  mouseOnly: !0,
1527
1527
  move: !1,
1528
- restMs: k.type === void 0 ? u : void 0,
1529
- delay: { close: d },
1530
- triggerElementRef: E,
1531
- externalTree: N,
1532
- isActiveTrigger: C,
1533
- isClosing: () => x.select("transitionStatus") === "ending"
1534
- }), ae = kn(T, x.select("lastOpenChangeReason")), U = Ze(w, {
1535
- enabled: !R && k.type !== "context-menu",
1536
- event: T && I ? "click" : "mousedown",
1528
+ restMs: j.type === void 0 ? c : void 0,
1529
+ delay: { close: l },
1530
+ triggerElementRef: T,
1531
+ externalTree: P,
1532
+ isActiveTrigger: S,
1533
+ isClosing: () => b.select("transitionStatus") === "ending"
1534
+ }), ae = kn(w, b.select("lastOpenChangeReason")), oe = Xe(C, {
1535
+ enabled: !z && j.type !== "context-menu",
1536
+ event: w && R ? "click" : "mousedown",
1537
1537
  toggle: !0,
1538
1538
  ignoreMouse: !1,
1539
- stickIfOpen: k.type === void 0 && ae
1540
- }), se = Wt(w, { enabled: !R && H }), ce = En({
1541
- open: T,
1542
- enabled: I,
1539
+ stickIfOpen: j.type === void 0 && ae
1540
+ }), W = Wt(C, { enabled: !z && U }), ce = En({
1541
+ open: w,
1542
+ enabled: R,
1543
1543
  mouseDownAction: "open"
1544
- }), le = M([U, se]), G = {
1545
- disabled: R,
1546
- open: T
1547
- }, K = x.useState("triggerProps", te), de = [
1548
- z,
1544
+ }), le = k([oe, W]), ue = {
1545
+ disabled: z,
1546
+ open: w
1547
+ }, G = b.useState("triggerProps", L), fe = [
1548
+ B,
1549
1549
  t,
1550
1550
  re,
1551
1551
  ee,
1552
- E
1553
- ], fe = [
1552
+ T
1553
+ ], pe = [
1554
1554
  le.getReferenceProps(),
1555
- ie ?? Be,
1556
- K,
1555
+ ie ?? v,
1556
+ G,
1557
1557
  {
1558
1558
  "aria-haspopup": "menu",
1559
- id: S,
1559
+ id: x,
1560
1560
  onMouseDown: (e) => {
1561
- x.select("open") || (B.start(200, () => {
1562
- x.context.allowMouseUpTriggerRef.current = !0;
1563
- }), D(e.currentTarget).addEventListener("mouseup", V, { once: !0 }));
1561
+ b.select("open") || (V.start(200, () => {
1562
+ b.context.allowMouseUpTriggerRef.current = !0;
1563
+ }), E(e.currentTarget).addEventListener("mouseup", H, { once: !0 }));
1564
1564
  }
1565
1565
  },
1566
- I ? { role: "menuitem" } : {},
1566
+ R ? { role: "menuitem" } : {},
1567
1567
  ce,
1568
- y,
1568
+ m,
1569
1569
  ne
1570
- ], { preFocusGuardRef: me, handlePreFocusGuardFocus: he, handleFocusTargetFocus: ge } = Tn(x, E), _e = h("button", e, {
1571
- enabled: !I,
1572
- stateAttributesMapping: f,
1573
- state: G,
1574
- ref: de,
1575
- props: fe
1570
+ ], { preFocusGuardRef: he, handlePreFocusGuardFocus: ge, handleFocusTargetFocus: _e } = Tn(b, T), ve = y("button", e, {
1571
+ enabled: !R,
1572
+ stateAttributesMapping: d,
1573
+ state: ue,
1574
+ ref: fe,
1575
+ props: pe
1576
1576
  });
1577
- return I ? /*#__PURE__*/ Z(Cn, {
1577
+ return R ? /*#__PURE__*/ Z(Cn, {
1578
1578
  tag: "button",
1579
1579
  render: n,
1580
- className: i,
1581
- style: v,
1582
- state: G,
1583
- refs: de,
1584
- props: fe,
1585
- stateAttributesMapping: f
1586
- }) : T ? /*#__PURE__*/ mt(X.Fragment, { children: [
1587
- /*#__PURE__*/ Z(ye, {
1588
- ref: me,
1589
- onFocus: he
1590
- }, `${S}-pre-focus-guard`),
1591
- /*#__PURE__*/ Z(X.Fragment, { children: _e }, S),
1580
+ className: r,
1581
+ style: p,
1582
+ state: ue,
1583
+ refs: fe,
1584
+ props: pe,
1585
+ stateAttributesMapping: d
1586
+ }) : w ? /*#__PURE__*/ mt(X.Fragment, { children: [
1592
1587
  /*#__PURE__*/ Z(ye, {
1593
- ref: x.context.triggerFocusTargetRef,
1588
+ ref: he,
1594
1589
  onFocus: ge
1595
- }, `${S}-post-focus-guard`)
1596
- ] }) : /*#__PURE__*/ Z(X.Fragment, { children: _e }, S);
1590
+ }, `${x}-pre-focus-guard`),
1591
+ /*#__PURE__*/ Z(X.Fragment, { children: ve }, x),
1592
+ /*#__PURE__*/ Z(ye, {
1593
+ ref: b.context.triggerFocusTargetRef,
1594
+ onFocus: _e
1595
+ }, `${x}-post-focus-guard`)
1596
+ ] }) : /*#__PURE__*/ Z(X.Fragment, { children: ve }, x);
1597
1597
  });
1598
1598
  process.env.NODE_ENV !== "production" && (On.displayName = "MenuTrigger");
1599
1599
  function kn(e, t) {
1600
- let n = je(), [r, i] = X.useState(!1);
1601
- return Me(() => {
1600
+ let n = Ue(), [r, i] = X.useState(!1);
1601
+ return q(() => {
1602
1602
  e && t === "trigger-hover" ? (i(!0), n.start(500, () => {
1603
1603
  i(!1);
1604
1604
  })) : e || (n.clear(), i(!1));
@@ -1630,91 +1630,91 @@ function jn(e) {
1630
1630
  //#endregion
1631
1631
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/menu/submenu-trigger/MenuSubmenuTrigger.js
1632
1632
  var Mn = /*#__PURE__*/ X.forwardRef(function(e, t) {
1633
- let { render: n, className: r, label: i, id: a, nativeButton: o = !1, openOnHover: s = !0, delay: c = 100, closeDelay: l = 0, disabled: d = !1, style: f, ...p } = e, g = ee(), _ = xt(), { store: v } = Q(), y = m(a), b = v.useState("open"), x = v.useState("floatingRootContext"), S = v.useState("floatingTreeRoot"), C = L(y, v), w = X.useCallback((e) => {
1633
+ let { render: n, className: r, label: i, id: a, nativeButton: o = !1, openOnHover: s = !0, delay: c = 100, closeDelay: u = 0, disabled: d = !1, style: f, ...p } = e, m = P(), h = xt(), { store: _ } = Q(), v = g(a), b = _.useState("open"), x = _.useState("floatingRootContext"), S = _.useState("floatingTreeRoot"), C = ee(v, _), w = X.useCallback((e) => {
1634
1634
  let t = C(e);
1635
- return e !== null && v.select("open") && v.select("activeTriggerId") == null && v.update({
1636
- activeTriggerId: y,
1635
+ return e !== null && _.select("open") && _.select("activeTriggerId") == null && _.update({
1636
+ activeTriggerId: v,
1637
1637
  activeTriggerElement: e,
1638
- closeDelay: l
1638
+ closeDelay: u
1639
1639
  }), t;
1640
1640
  }, [
1641
1641
  C,
1642
- l,
1643
- v,
1644
- y
1642
+ u,
1643
+ _,
1644
+ v
1645
1645
  ]), T = X.useRef(null), E = X.useCallback((e) => {
1646
- T.current = e, v.set("activeTriggerElement", e);
1647
- }, [v]);
1648
- process.env.NODE_ENV !== "production" && Me(() => {
1646
+ T.current = e, _.set("activeTriggerElement", e);
1647
+ }, [_]);
1648
+ process.env.NODE_ENV !== "production" && q(() => {
1649
1649
  let e = T.current;
1650
1650
  if (e && jn(e) && !d) {
1651
- let e = He.captureOwnerStack?.() || "";
1652
- ie(`A disabled element was detected on <Menu.SubmenuTrigger>. To properly disable the trigger, use the \`disabled\` prop on the component instead of setting it on the rendered element.${e}`);
1651
+ let e = Se.captureOwnerStack?.() || "";
1652
+ re(`A disabled element was detected on <Menu.SubmenuTrigger>. To properly disable the trigger, use the \`disabled\` prop on the component instead of setting it on the rendered element.${e}`);
1653
1653
  }
1654
1654
  });
1655
1655
  let D = yn();
1656
- if (!D?.parentMenu) throw Error(process.env.NODE_ENV === "production" ? q(37) : "Base UI: <Menu.SubmenuTrigger> must be placed in <Menu.SubmenuRoot>.");
1657
- v.useSyncedValue("closeDelay", l);
1658
- let O = D.parentMenu, k = O.useState("itemProps"), A = O.useState("isActive", g.index), j = X.useMemo(() => ({
1656
+ if (!D?.parentMenu) throw Error(process.env.NODE_ENV === "production" ? J(37) : "Base UI: <Menu.SubmenuTrigger> must be placed in <Menu.SubmenuRoot>.");
1657
+ _.useSyncedValue("closeDelay", u);
1658
+ let O = D.parentMenu, A = O.useState("itemProps"), j = O.useState("isActive", m.index), M = X.useMemo(() => ({
1659
1659
  type: "submenu-trigger",
1660
1660
  setActive() {
1661
- O.set("activeIndex", g.index);
1661
+ O.set("activeIndex", m.index);
1662
1662
  }
1663
- }), [O, g.index]), N = v.useState("disabled"), P = d || N, { getItemProps: F, itemRef: te } = kt({
1663
+ }), [O, m.index]), N = _.useState("disabled"), F = d || N, { getItemProps: I, itemRef: L } = kt({
1664
1664
  closeOnClick: !1,
1665
- disabled: P,
1666
- highlighted: A,
1667
- id: y,
1668
- store: v,
1665
+ disabled: F,
1666
+ highlighted: j,
1667
+ id: v,
1668
+ store: _,
1669
1669
  typingRef: O.context.typingRef,
1670
1670
  nativeButton: o,
1671
- itemMetadata: j,
1672
- nodeId: _?.context.nodeId
1673
- }), I = v.useState("hoverEnabled"), R = O.useState("allowMouseEnter"), ne = Qt(x, {
1674
- enabled: I && s && !P,
1671
+ itemMetadata: M,
1672
+ nodeId: h?.context.nodeId
1673
+ }), R = _.useState("hoverEnabled"), te = O.useState("allowMouseEnter"), z = Qt(x, {
1674
+ enabled: R && s && !F,
1675
1675
  handleClose: on({ blockPointerEvents: !0 }),
1676
1676
  mouseOnly: !0,
1677
1677
  move: !0,
1678
1678
  restMs: c,
1679
- delay: R ? {
1679
+ delay: te ? {
1680
1680
  open: c,
1681
- close: l
1681
+ close: u
1682
1682
  } : 0,
1683
1683
  triggerElementRef: T,
1684
1684
  externalTree: S,
1685
- isClosing: () => v.select("transitionStatus") === "ending"
1686
- }), re = Ze(x, {
1687
- enabled: !P,
1685
+ isClosing: () => _.select("transitionStatus") === "ending"
1686
+ }), ne = Xe(x, {
1687
+ enabled: !F,
1688
1688
  event: "mousedown",
1689
1689
  toggle: !s,
1690
1690
  ignoreMouse: s,
1691
1691
  stickIfOpen: !1
1692
- }), z = M([re]), B = v.useState("triggerProps", !0);
1693
- return delete B.id, h("div", e, {
1692
+ }), B = k([ne]), V = _.useState("triggerProps", !0);
1693
+ return delete V.id, y("div", e, {
1694
1694
  state: {
1695
- disabled: P,
1696
- highlighted: A,
1695
+ disabled: F,
1696
+ highlighted: j,
1697
1697
  open: b
1698
1698
  },
1699
- stateAttributesMapping: u,
1699
+ stateAttributesMapping: l,
1700
1700
  props: [
1701
- z.getReferenceProps(),
1702
- ne,
1703
- B,
1704
- k,
1701
+ B.getReferenceProps(),
1702
+ z,
1703
+ V,
1704
+ A,
1705
1705
  {
1706
- tabIndex: b || A ? 0 : -1,
1706
+ tabIndex: b || j ? 0 : -1,
1707
1707
  onBlur() {
1708
- A && O.set("activeIndex", null);
1708
+ j && O.set("activeIndex", null);
1709
1709
  }
1710
1710
  },
1711
1711
  p,
1712
- F
1712
+ I
1713
1713
  ],
1714
1714
  ref: [
1715
1715
  t,
1716
- g.ref,
1717
- te,
1716
+ m.ref,
1717
+ L,
1718
1718
  w,
1719
1719
  E
1720
1720
  ]
@@ -1729,11 +1729,11 @@ var Nn = class {
1729
1729
  }
1730
1730
  open(e) {
1731
1731
  let t = e ? this.store.context.triggerElements.getById(e) : void 0;
1732
- if (e && !t) throw Error(process.env.NODE_ENV === "production" ? q(83, e) : `Base UI: MenuHandle.open: No trigger found with id "${e}".`);
1733
- this.store.setOpen(!0, J("imperative-action", void 0, t));
1732
+ if (e && !t) throw Error(process.env.NODE_ENV === "production" ? J(83, e) : `Base UI: MenuHandle.open: No trigger found with id "${e}".`);
1733
+ this.store.setOpen(!0, w("imperative-action", void 0, t));
1734
1734
  }
1735
1735
  close() {
1736
- this.store.setOpen(!1, J("imperative-action", void 0, void 0));
1736
+ this.store.setOpen(!1, w("imperative-action", void 0, void 0));
1737
1737
  }
1738
1738
  get isOpen() {
1739
1739
  return this.store.state.open;
@@ -1789,7 +1789,7 @@ function Rn({ align: e = "start", alignOffset: t = 0, container: n, side: r = "b
1789
1789
  sideOffset: i,
1790
1790
  children: /* @__PURE__ */ Z(cn, {
1791
1791
  "data-slot": "dropdown-menu-content",
1792
- className: _("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none motion-reduce:transition-none", a),
1792
+ className: L("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none motion-reduce:transition-none", a),
1793
1793
  ...o
1794
1794
  })
1795
1795
  })
@@ -1805,7 +1805,7 @@ function Bn({ className: e, inset: t, ...n }) {
1805
1805
  return /* @__PURE__ */ Z(Lt, {
1806
1806
  "data-slot": "dropdown-menu-label",
1807
1807
  "data-inset": t,
1808
- className: _("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", e),
1808
+ className: L("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", e),
1809
1809
  ...n
1810
1810
  });
1811
1811
  }
@@ -1814,7 +1814,7 @@ function Vn({ className: e, inset: t, variant: n = "default", ...r }) {
1814
1814
  "data-slot": "dropdown-menu-item",
1815
1815
  "data-inset": t,
1816
1816
  "data-variant": n,
1817
- className: _("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", e),
1817
+ className: L("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", e),
1818
1818
  ...r
1819
1819
  });
1820
1820
  }
@@ -1828,7 +1828,7 @@ function Un({ className: e, inset: t, children: n, ...r }) {
1828
1828
  return /* @__PURE__ */ mt(Mn, {
1829
1829
  "data-slot": "dropdown-menu-sub-trigger",
1830
1830
  "data-inset": t,
1831
- className: _("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
1831
+ className: L("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
1832
1832
  ...r,
1833
1833
  children: [n, /* @__PURE__ */ Z(gt, { className: "ml-auto" })]
1834
1834
  });
@@ -1836,7 +1836,7 @@ function Un({ className: e, inset: t, children: n, ...r }) {
1836
1836
  function Wn({ align: e = "start", alignOffset: t = -3, side: n = "right", sideOffset: r = 0, className: i, ...a }) {
1837
1837
  return /* @__PURE__ */ Z(Rn, {
1838
1838
  "data-slot": "dropdown-menu-sub-content",
1839
- className: _("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none motion-reduce:transition-none", i),
1839
+ className: L("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none motion-reduce:transition-none", i),
1840
1840
  align: e,
1841
1841
  alignOffset: t,
1842
1842
  side: n,
@@ -1848,13 +1848,13 @@ function Gn({ className: e, children: t, checked: n, inset: r, ...i }) {
1848
1848
  return /* @__PURE__ */ mt(Mt, {
1849
1849
  "data-slot": "dropdown-menu-checkbox-item",
1850
1850
  "data-inset": r,
1851
- className: _("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
1851
+ className: L("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
1852
1852
  checked: n,
1853
1853
  ...i,
1854
1854
  children: [/* @__PURE__ */ Z("span", {
1855
1855
  className: "pointer-events-none absolute right-2 flex items-center justify-center",
1856
1856
  "data-slot": "dropdown-menu-checkbox-item-indicator",
1857
- children: /* @__PURE__ */ Z(Nt, { children: /* @__PURE__ */ Z(j, {}) })
1857
+ children: /* @__PURE__ */ Z(Nt, { children: /* @__PURE__ */ Z(De, {}) })
1858
1858
  }), t]
1859
1859
  });
1860
1860
  }
@@ -1971,7 +1971,7 @@ var ar = ({ collection: e, icon: t, color: n, className: r, onError: i }) => {
1971
1971
  n = !0;
1972
1972
  };
1973
1973
  }, [e, t]), a ? /* @__PURE__ */ Z("i", {
1974
- className: z(r, qn.icon, !a.includes("currentColor") && "is-colored"),
1974
+ className: p(r, qn.icon, !a.includes("currentColor") && "is-colored"),
1975
1975
  style: {
1976
1976
  color: n,
1977
1977
  "--icon": `url("${a}")`
@@ -1990,7 +1990,7 @@ var ar = ({ collection: e, icon: t, color: n, className: r, onError: i }) => {
1990
1990
  }
1991
1991
  return i;
1992
1992
  }, lr = ({ url: e, color: t, className: n }) => /* @__PURE__ */ Z("i", {
1993
- className: z(n, qn.icon, !e.includes("currentColor") && "is-colored"),
1993
+ className: p(n, qn.icon, !e.includes("currentColor") && "is-colored"),
1994
1994
  style: {
1995
1995
  color: t,
1996
1996
  "--icon": `url("${e}")`
@@ -2024,7 +2024,7 @@ var fr = ({ src: e, className: t, fallback: n = null }) => {
2024
2024
  className: t,
2025
2025
  onError: c
2026
2026
  }) : /* @__PURE__ */ Z("img", {
2027
- className: z(Kn.img, t),
2027
+ className: p(Kn.img, t),
2028
2028
  src: i,
2029
2029
  alt: "",
2030
2030
  decoding: "async",