dawn-ui-react 1.0.0-alpha.5 → 1.0.0-alpha.7

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 (35) hide show
  1. package/dist/{Input-DtHcqeCc.js → Input-BkHt7FC1.js} +2 -2
  2. package/dist/{clamp-DQOKpe2d.js → clamp-Bd-I2_Rk.js} +2 -2
  3. package/dist/{cn-CXogf8HW.js → cn-DWnOBdrm.js} +349 -307
  4. package/dist/components/dialog/index.d.ts +1 -1
  5. package/dist/components/layer-tree/index.d.ts +2 -1
  6. package/dist/components/layer-tree/layer-tree-search.d.ts +1 -1
  7. package/dist/components/layer-tree/layer-tree-sort.d.ts +1 -3
  8. package/dist/components/layer-tree/layer-tree.types.d.ts +5 -1
  9. package/dist/components/profile/index.d.ts +5 -1
  10. package/dist/components/profile/profile-action.d.ts +2 -0
  11. package/dist/components/profile/profile-content.d.ts +2 -0
  12. package/dist/components/profile/profile-name.d.ts +2 -0
  13. package/dist/components/profile/profile-subname.d.ts +2 -0
  14. package/dist/components/profile/profile.d.ts +1 -1
  15. package/dist/components/profile/profile.types.d.ts +6 -14
  16. package/dist/components/separator/separator.d.ts +1 -1
  17. package/dist/components/separator/separator.types.d.ts +3 -1
  18. package/dist/dawn-ui-react.js +15503 -11116
  19. package/dist/dawn-ui-react.umd.cjs +26 -26
  20. package/dist/{field-input-group-DRO7BT9K.js → field-input-group-BwMQAM6n.js} +3 -3
  21. package/dist/{field-input-group-input-D1w5gEYu.js → field-input-group-input-DnJFuMi4.js} +3 -3
  22. package/dist/{form-context-DBHjPCAB.js → form-context-om_k3VKa.js} +481 -461
  23. package/dist/{input-group-CDZSzmGh.js → input-group-CWH7SWRv.js} +2 -2
  24. package/dist/{input-group-input-DksiPZS5.js → input-group-input-DOxvfiMV.js} +2 -2
  25. package/dist/{input.types-BToTmX-b.js → input.types-BeeCYL9x.js} +1 -1
  26. package/dist/styles.css +22 -22
  27. package/dist/{useLabelableId-Bsez0mIm.js → useLabelableId-B_P81Wgy.js} +1 -1
  28. package/package.json +22 -22
  29. package/dist/field-description-BDRJXMS8.js +0 -12
  30. package/dist/field-errors-BndE4fDS.js +0 -21
  31. package/dist/field-input-BPNlupYr.js +0 -58
  32. package/dist/field-label-DiJO_3-h.js +0 -16
  33. package/dist/field-select-BRibIEnZ.js +0 -2147
  34. package/dist/field-slider-SYOU6bVj.js +0 -2167
  35. package/dist/rolldown-runtime-CAFD8bLK.js +0 -11
@@ -1,2147 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
2
- import { F as t, G as n, H as r, I as i, J as a, K as o, M as s, Q as c, T as l, U as u, V as d, W as f, X as p, Z as m, _ as h, f as g, i as _, k as v, q as y, v as b } from "./form-context-DBHjPCAB.js";
3
- import { F as x, G as S, K as C, P as w, W as T, c as E, h as ee, i as D, l as O, n as te, o as k, p as ne, r as A, s as j, t as re, u as M, w as ie } from "./useLabelableId-Bsez0mIm.js";
4
- import { $t as N, At as P, Bt as ae, Ct as F, D as I, Dt as oe, E as L, Et as R, Ft as z, G as B, H as V, Ht as H, I as se, J as U, Jt as ce, K as le, Lt as W, M as G, Mt as ue, Nt as K, Ot as de, P as fe, Pt as pe, Q as q, Qt as me, Rt as he, S as J, St as ge, T as Y, Tt as _e, U as ve, Ut as ye, Vt as be, W as xe, Wt as Se, X as Ce, Xt as we, Y as Te, Z as Ee, Zt as De, _ as Oe, _t as ke, a as Ae, an as X, at as je, c as Me, dn as Ne, f as Pe, fn as Fe, g as Ie, h as Le, hn as Re, i as ze, j as Be, jt as Ve, kt as He, l as Ue, ln as We, m as Ge, mn as Ke, n as qe, nn as Je, on as Ye, p as Xe, q as Ze, qt as Qe, r as $e, t as et, un as tt, vt as nt, wt as rt, x as it, yt as at, z as ot, zt as st } from "./clamp-DQOKpe2d.js";
5
- import { t as ct } from "./cn-CXogf8HW.js";
6
- import * as Z from "react";
7
- import { jsx as Q, jsxs as lt } from "react/jsx-runtime";
8
- //#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/utils/esm/useScrollLock.js
9
- var ut = {}, dt = {}, ft = "";
10
- function pt(e) {
11
- if (typeof document > "u") return !1;
12
- let t = j(e);
13
- return v(t).innerWidth - t.documentElement.clientWidth > 0;
14
- }
15
- function mt(e) {
16
- if (!(typeof CSS < "u" && CSS.supports && CSS.supports("scrollbar-gutter", "stable")) || typeof document > "u") return !1;
17
- let n = j(e), r = n.documentElement, i = n.body, a = t(r) ? r : i, o = a.style.overflowY, s = r.style.scrollbarGutter;
18
- r.style.scrollbarGutter = "stable", a.style.overflowY = "scroll";
19
- let c = a.offsetWidth;
20
- a.style.overflowY = "hidden";
21
- let l = a.offsetWidth;
22
- return a.style.overflowY = o, r.style.scrollbarGutter = s, c === l;
23
- }
24
- function ht(e) {
25
- let n = j(e), r = n.documentElement, i = n.body, a = t(r) ? r : i, o = {
26
- overflowY: a.style.overflowY,
27
- overflowX: a.style.overflowX
28
- };
29
- return Object.assign(a.style, {
30
- overflowY: "hidden",
31
- overflowX: "hidden"
32
- }), () => {
33
- Object.assign(a.style, o);
34
- };
35
- }
36
- function gt(e) {
37
- let n = j(e), r = n.documentElement, i = n.body, a = v(r), o = 0, s = 0, c = !1, l = Ne.create();
38
- if (X && (a.visualViewport?.scale ?? 1) !== 1) return () => {};
39
- function u() {
40
- let n = a.getComputedStyle(r), l = a.getComputedStyle(i), u = (n.scrollbarGutter || "").includes("both-edges") ? "stable both-edges" : "stable";
41
- o = r.scrollTop, s = r.scrollLeft, ut = {
42
- scrollbarGutter: r.style.scrollbarGutter,
43
- overflowY: r.style.overflowY,
44
- overflowX: r.style.overflowX
45
- }, ft = r.style.scrollBehavior, dt = {
46
- position: i.style.position,
47
- height: i.style.height,
48
- width: i.style.width,
49
- boxSizing: i.style.boxSizing,
50
- overflowY: i.style.overflowY,
51
- overflowX: i.style.overflowX,
52
- scrollBehavior: i.style.scrollBehavior
53
- };
54
- let d = r.scrollHeight > r.clientHeight, f = r.scrollWidth > r.clientWidth, p = n.overflowY === "scroll" || l.overflowY === "scroll", m = n.overflowX === "scroll" || l.overflowX === "scroll", h = Math.max(0, a.innerWidth - i.clientWidth), g = Math.max(0, a.innerHeight - i.clientHeight), _ = parseFloat(l.marginTop) + parseFloat(l.marginBottom), v = parseFloat(l.marginLeft) + parseFloat(l.marginRight), y = t(r) ? r : i;
55
- if (c = mt(e), c) {
56
- r.style.scrollbarGutter = u, y.style.overflowY = "hidden", y.style.overflowX = "hidden";
57
- return;
58
- }
59
- Object.assign(r.style, {
60
- scrollbarGutter: u,
61
- overflowY: "hidden",
62
- overflowX: "hidden"
63
- }), (d || p) && (r.style.overflowY = "scroll"), (f || m) && (r.style.overflowX = "scroll"), Object.assign(i.style, {
64
- position: "relative",
65
- height: _ || g ? `calc(100dvh - ${_ + g}px)` : "100dvh",
66
- width: v || h ? `calc(100vw - ${v + h}px)` : "100vw",
67
- boxSizing: "border-box",
68
- overflow: "hidden",
69
- scrollBehavior: "unset"
70
- }), i.scrollTop = o, i.scrollLeft = s, r.setAttribute("data-base-ui-scroll-locked", ""), r.style.scrollBehavior = "unset";
71
- }
72
- function d() {
73
- Object.assign(r.style, ut), Object.assign(i.style, dt), c || (r.scrollTop = o, r.scrollLeft = s, r.removeAttribute("data-base-ui-scroll-locked"), r.style.scrollBehavior = ft);
74
- }
75
- function f() {
76
- d(), l.request(u);
77
- }
78
- u();
79
- let p = q(a, "resize", f);
80
- return () => {
81
- l.cancel(), d(), typeof a.removeEventListener == "function" && p();
82
- };
83
- }
84
- var _t = new class {
85
- lockCount = 0;
86
- restore = null;
87
- timeoutLock = U.create();
88
- timeoutUnlock = U.create();
89
- acquire(e) {
90
- return this.lockCount += 1, this.lockCount === 1 && this.restore === null && this.timeoutLock.start(0, () => this.lock(e)), this.release;
91
- }
92
- release = () => {
93
- --this.lockCount, this.lockCount === 0 && this.restore && this.timeoutUnlock.start(0, this.unlock);
94
- };
95
- unlock = () => {
96
- this.lockCount === 0 && this.restore && (this.restore?.(), this.restore = null);
97
- };
98
- lock(e) {
99
- if (this.lockCount === 0 || this.restore !== null) return;
100
- let t = j(e).documentElement, r = v(t).getComputedStyle(t).overflowY;
101
- if (r === "hidden" || r === "clip") {
102
- this.restore = n;
103
- return;
104
- }
105
- let i = Je || !pt(e);
106
- this.restore = i ? ht(e) : gt(e);
107
- }
108
- }();
109
- function vt(e = !0, t = null) {
110
- p(() => {
111
- if (e) return _t.acquire(t);
112
- }, [e, t]);
113
- }
114
- //#endregion
115
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/floating-ui-react/utils/enqueueFocus.js
116
- var yt = 0;
117
- function bt(e, t = {}) {
118
- let { preventScroll: r = !1, cancelPrevious: i = !0, sync: a = !1 } = t;
119
- i && cancelAnimationFrame(yt);
120
- let o = () => e?.focus({ preventScroll: r });
121
- if (a) return o(), n;
122
- let s = requestAnimationFrame(o);
123
- return yt = s, () => {
124
- yt === s && (cancelAnimationFrame(s), yt = 0);
125
- };
126
- }
127
- //#endregion
128
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/floating-ui-react/utils/markOthers.js
129
- var xt = {
130
- inert: /* @__PURE__ */ new WeakMap(),
131
- "aria-hidden": /* @__PURE__ */ new WeakMap()
132
- }, St = "data-base-ui-inert", Ct = {
133
- inert: /* @__PURE__ */ new WeakSet(),
134
- "aria-hidden": /* @__PURE__ */ new WeakSet()
135
- }, wt = /* @__PURE__ */ new WeakMap(), Tt = 0;
136
- function Et(e) {
137
- return Ct[e];
138
- }
139
- function Dt(e) {
140
- return e ? i(e) ? e.host : Dt(e.parentNode) : null;
141
- }
142
- var Ot = (e, t) => t.map((t) => {
143
- if (e.contains(t)) return t;
144
- let n = Dt(t);
145
- return e.contains(n) ? n : null;
146
- }).filter((e) => e != null), kt = (e) => {
147
- let t = /* @__PURE__ */ new Set();
148
- return e.forEach((e) => {
149
- let n = e;
150
- for (; n && !t.has(n);) t.add(n), n = n.parentNode;
151
- }), t;
152
- }, At = (e, t, n) => {
153
- let r = [], i = (e) => {
154
- !e || n.has(e) || Array.from(e.children).forEach((e) => {
155
- l(e) !== "script" && (t.has(e) ? i(e) : r.push(e));
156
- });
157
- };
158
- return i(e), r;
159
- };
160
- function jt(e, t, n, r, { mark: i = !0, markerIgnoreElements: a = [] }) {
161
- let o = r ? "inert" : n ? "aria-hidden" : null, s = null, c = null, l = Ot(t, e), u = i ? Ot(t, a) : [], d = new Set(u), f = i ? At(t, kt(l), new Set(l)).filter((e) => !d.has(e)) : [], p = [], m = [];
162
- if (o) {
163
- let e = xt[o], n = Et(o);
164
- c = n, s = e;
165
- let r = Ot(t, Array.from(t.querySelectorAll("[aria-live]"))), i = l.concat(r);
166
- At(t, kt(i), new Set(i)).forEach((t) => {
167
- let r = t.getAttribute(o), i = r !== null && r !== "false", a = (e.get(t) || 0) + 1;
168
- e.set(t, a), p.push(t), a === 1 && i && n.add(t), i || t.setAttribute(o, o === "inert" ? "" : "true");
169
- });
170
- }
171
- return i && f.forEach((e) => {
172
- let t = (wt.get(e) || 0) + 1;
173
- wt.set(e, t), m.push(e), t === 1 && e.setAttribute(St, "");
174
- }), Tt += 1, () => {
175
- s && p.forEach((e) => {
176
- let t = (s.get(e) || 0) - 1;
177
- s.set(e, t), t || (!c?.has(e) && o && e.removeAttribute(o), c?.delete(e));
178
- }), i && m.forEach((e) => {
179
- let t = (wt.get(e) || 0) - 1;
180
- wt.set(e, t), t || e.removeAttribute(St);
181
- }), --Tt, Tt || (xt.inert = /* @__PURE__ */ new WeakMap(), xt["aria-hidden"] = /* @__PURE__ */ new WeakMap(), Ct.inert = /* @__PURE__ */ new WeakSet(), Ct["aria-hidden"] = /* @__PURE__ */ new WeakSet(), wt = /* @__PURE__ */ new WeakMap());
182
- };
183
- }
184
- function Mt(e, t = {}) {
185
- let { ariaHidden: n = !1, inert: r = !1, mark: i = !0, markerIgnoreElements: a = [] } = t, o = j(e[0]).body;
186
- return jt(e, o, n, r, {
187
- mark: i,
188
- markerIgnoreElements: a
189
- });
190
- }
191
- //#endregion
192
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingFocusManager.js
193
- function Nt(e, t) {
194
- let n = v(M(e));
195
- return e instanceof n.KeyboardEvent ? "keyboard" : e instanceof n.FocusEvent ? t || "keyboard" : "pointerType" in e ? e.pointerType || "keyboard" : "touches" in e ? "touch" : e instanceof n.MouseEvent ? t || (e.detail === 0 ? "keyboard" : "mouse") : "";
196
- }
197
- var Pt = 20, Ft = [];
198
- function It() {
199
- Ft = Ft.filter((e) => e.deref()?.isConnected);
200
- }
201
- function Lt(e) {
202
- It(), e && l(e) !== "body" && (Ft.push(new WeakRef(e)), Ft.length > Pt && (Ft = Ft.slice(-Pt)));
203
- }
204
- function Rt() {
205
- return It(), Ft[Ft.length - 1]?.deref();
206
- }
207
- function zt(e) {
208
- return e ? F(e) ? e : rt(e)[0] || e : null;
209
- }
210
- function Bt(e, t) {
211
- if (e.hasAttribute("tabindex") && !e.hasAttribute("data-tabindex") || !t.current.includes("floating") && !e.getAttribute("role")?.includes("dialog")) return;
212
- let n = ke(e).filter((e) => {
213
- let t = e.getAttribute("data-tabindex") || "";
214
- return F(e) || e.hasAttribute("data-tabindex") && !t.startsWith("-");
215
- }), r = e.getAttribute("tabindex");
216
- t.current.includes("floating") || n.length === 0 ? r !== "0" && e.setAttribute("tabindex", "0") : (r !== "-1" || e.hasAttribute("data-tabindex") && e.getAttribute("data-tabindex") !== "-1") && (e.setAttribute("tabindex", "-1"), e.setAttribute("data-tabindex", "-1"));
217
- }
218
- function Vt(e) {
219
- let { context: t, children: n, disabled: r = !1, initialFocus: i = !0, returnFocus: a = !0, restoreFocus: o = !1, modal: c = !0, closeOnFocusOut: l = !0, openInteractionType: u = "", nextFocusableElement: d, previousFocusableElement: f, beforeContentFocusGuardRef: h, externalTree: g, getInsideElements: _ } = e, v = "rootStore" in t ? t.rootStore : t, b = v.useState("open"), x = v.useState("domReferenceElement"), S = v.useState("floatingElement"), { events: C, dataRef: w } = v.context, T = m(() => w.current.floatingContext?.nodeId), ee = i === !1, D = Qe(x) && ee, te = Z.useRef(["content"]), k = le(i), A = le(a), re = le(u), N = G(g), P = se(), I = Z.useRef(!1), oe = Z.useRef(!1), L = Z.useRef(!1), R = Z.useRef(null), z = Z.useRef(""), B = Z.useRef(""), U = Z.useRef(null), W = Z.useRef(null), K = y(U, h, P?.beforeInsideRef), de = y(W, P?.afterInsideRef), fe = Te(), pe = Te(), me = Fe(), he = P != null, J = Se(S), Y = m((e = J) => e ? rt(e) : []), _e = m(() => _?.().filter((e) => e != null) ?? []);
220
- Z.useEffect(() => {
221
- if (r || !c) return;
222
- function e(e) {
223
- e.key === "Tab" && O(J, E(j(J))) && Y().length === 0 && !D && be(e);
224
- }
225
- return q(j(J), "keydown", e);
226
- }, [
227
- r,
228
- x,
229
- J,
230
- c,
231
- te,
232
- D,
233
- Y
234
- ]), Z.useEffect(() => {
235
- if (r || !b) return;
236
- let e = j(J);
237
- function t() {
238
- L.current = !1;
239
- }
240
- function n(e) {
241
- let t = M(e), n = _e();
242
- L.current = !(O(S, t) || O(x, t) || O(P?.portalNode, t) || n.some((e) => e === t || O(e, t))), B.current = e.pointerType || "keyboard", t?.closest("[data-base-ui-click-trigger]") && (oe.current = !0);
243
- }
244
- function i() {
245
- B.current = "keyboard";
246
- }
247
- return Ze(q(e, "pointerdown", n, !0), q(e, "pointerup", t, !0), q(e, "pointercancel", t, !0), q(e, "keydown", i, !0));
248
- }, [
249
- r,
250
- S,
251
- x,
252
- J,
253
- b,
254
- P,
255
- _e
256
- ]), Z.useEffect(() => {
257
- if (r || !l) return;
258
- let e = j(J);
259
- function t() {
260
- oe.current = !0, pe.start(0, () => {
261
- oe.current = !1;
262
- });
263
- }
264
- function n(e) {
265
- let t = M(e);
266
- F(t) && (R.current = t);
267
- }
268
- function i(t) {
269
- let n = t.relatedTarget, r = t.currentTarget, i = M(t);
270
- queueMicrotask(() => {
271
- let a = T(), l = v.context.triggerElements, u = _e(), p = n?.hasAttribute(V("focus-guard")) && [
272
- U.current,
273
- W.current,
274
- P?.beforeInsideRef.current,
275
- P?.afterInsideRef.current,
276
- P?.beforeOutsideRef.current,
277
- P?.afterOutsideRef.current,
278
- tt(f),
279
- tt(d)
280
- ].includes(n), m = !(O(x, n) || O(S, n) || O(n, S) || O(P?.portalNode, n) || u.some((e) => e === n || O(e, n)) || n != null && l.hasElement(n) || l.hasMatchingElement((e) => O(e, n)) || p || N && (ye(N.nodesRef.current, a).find((e) => O(e.context?.elements.floating, n) || O(e.context?.elements.domReference, n)) || H(N.nodesRef.current, a).find((e) => [e.context?.elements.floating, Se(e.context?.elements.floating)].includes(n) || e.context?.elements.domReference === n)));
281
- if (r === x && J && Bt(J, te), o && r !== x && !ue(i) && E(e) === e.body) {
282
- if (s(J) && (J.focus(), o === "popup")) {
283
- me.request(() => {
284
- J.focus();
285
- });
286
- return;
287
- }
288
- let e = Y(), t = R.current, n = (t && e.includes(t) ? t : null) || e[e.length - 1] || J;
289
- s(n) && n.focus();
290
- }
291
- if (w.current.insideReactTree) {
292
- w.current.insideReactTree = !1;
293
- return;
294
- }
295
- (D || !c) && n && m && !oe.current && (D || n !== Rt()) && (I.current = !0, v.setOpen(!1, ne(ie, t)));
296
- });
297
- }
298
- function a() {
299
- L.current || (w.current.insideReactTree = !0, fe.start(0, () => {
300
- w.current.insideReactTree = !1;
301
- }));
302
- }
303
- let u = s(x) ? x : null;
304
- if (!(!S && !u)) return Ze(u && q(u, "focusout", i), u && q(u, "pointerdown", t), S && q(S, "focusin", n), S && q(S, "focusout", i), S && P && q(S, "focusout", a, !0));
305
- }, [
306
- r,
307
- x,
308
- S,
309
- J,
310
- c,
311
- N,
312
- P,
313
- v,
314
- l,
315
- o,
316
- Y,
317
- D,
318
- T,
319
- te,
320
- w,
321
- fe,
322
- pe,
323
- me,
324
- d,
325
- f,
326
- _e
327
- ]), Z.useEffect(() => {
328
- if (r || !S || !b) return;
329
- let e = Array.from(P?.portalNode?.querySelectorAll(`[${V("portal")}]`) || []), t = (N ? H(N.nodesRef.current, T()) : []).find((e) => Qe(e.context?.elements.domReference || null))?.context?.elements.domReference, n = Mt([
330
- S,
331
- ...e,
332
- U.current,
333
- W.current,
334
- P?.beforeOutsideRef.current,
335
- P?.afterOutsideRef.current,
336
- ..._e(),
337
- t,
338
- tt(f),
339
- tt(d),
340
- D ? x : null
341
- ].filter((e) => e != null), {
342
- ariaHidden: c || D,
343
- mark: !1
344
- }), i = Mt([S, ...e].filter((e) => e != null));
345
- return () => {
346
- i(), n();
347
- };
348
- }, [
349
- b,
350
- r,
351
- x,
352
- S,
353
- c,
354
- te,
355
- P,
356
- D,
357
- N,
358
- T,
359
- d,
360
- f,
361
- _e
362
- ]), p(() => {
363
- if (!b || r || !s(J)) return;
364
- let e = E(j(J));
365
- queueMicrotask(() => {
366
- let t = k.current, n = typeof t == "function" ? t(re.current || "") : t;
367
- if (n === void 0 || n === !1 || O(J, e)) return;
368
- let r = null, i = () => (r ??= Y(J), r[0] || J), a;
369
- a = n === !0 || n === null ? i() : tt(n), a ||= i(), bt(a, { preventScroll: a === J });
370
- });
371
- }, [
372
- r,
373
- b,
374
- J,
375
- ee,
376
- Y,
377
- k,
378
- re
379
- ]), p(() => {
380
- if (r || !J) return;
381
- let e = j(J);
382
- Lt(E(e));
383
- function t(e) {
384
- if (e.open || (z.current = Nt(e.nativeEvent, B.current)), e.reason === "trigger-hover" && e.nativeEvent.type === "mouseleave" && (I.current = !0), e.reason === "outside-press") if (e.nested) I.current = !1;
385
- else if (st(e.nativeEvent) || ae(e.nativeEvent)) I.current = !1;
386
- else {
387
- let e = !1;
388
- j(J).createElement("div").focus({ get preventScroll() {
389
- return e = !0, !1;
390
- } }), e ? I.current = !1 : I.current = !0;
391
- }
392
- }
393
- C.on("openchange", t);
394
- function n() {
395
- let e = A.current, t = typeof e == "function" ? e(z.current) : e;
396
- if (t === void 0 || t === !1) return null;
397
- if (t === null && (t = !0), typeof t == "boolean") {
398
- let e = x || Rt();
399
- return e && e.isConnected ? e : null;
400
- }
401
- let n = x || Rt();
402
- return tt(t) || n || null;
403
- }
404
- return () => {
405
- C.off("openchange", t);
406
- let r = E(e), i = _e(), a = O(S, r) || i.some((e) => e === r || O(e, r)) || N && ye(N.nodesRef.current, T(), !1).some((e) => O(e.context?.elements.floating, r)), o = A.current, c = n();
407
- queueMicrotask(() => {
408
- let t = zt(c), n = typeof o != "boolean";
409
- o && !I.current && s(t) && (!(!n && t !== r && r !== e.body) || a) && t.focus({ preventScroll: !0 }), I.current = !1;
410
- });
411
- };
412
- }, [
413
- r,
414
- S,
415
- J,
416
- A,
417
- w,
418
- C,
419
- N,
420
- x,
421
- T,
422
- _e
423
- ]), p(() => {
424
- if (!X || b || !S) return;
425
- let e = E(j(S));
426
- !s(e) || !ce(e) || O(S, e) && e.blur();
427
- }, [b, S]), p(() => {
428
- if (!(r || !P)) return P.setFocusManagerState({
429
- modal: c,
430
- closeOnFocusOut: l,
431
- open: b,
432
- onOpenChange: v.setOpen,
433
- domReference: x
434
- }), () => {
435
- P.setFocusManagerState(null);
436
- };
437
- }, [
438
- r,
439
- P,
440
- c,
441
- b,
442
- v,
443
- l,
444
- x
445
- ]), p(() => {
446
- if (!(r || !J)) return Bt(J, te), () => {
447
- queueMicrotask(It);
448
- };
449
- }, [
450
- r,
451
- J,
452
- te
453
- ]);
454
- let xe = !r && (c ? !D : !0) && (he || c);
455
- return /* @__PURE__ */ lt(Z.Fragment, { children: [
456
- xe && /* @__PURE__ */ Q(ve, {
457
- "data-type": "inside",
458
- ref: K,
459
- onFocus: (e) => {
460
- if (c) {
461
- let e = Y();
462
- bt(e[e.length - 1]);
463
- } else P?.portalNode && (I.current = !1, ge(e, P.portalNode) ? nt(x)?.focus() : tt(f ?? P.beforeOutsideRef)?.focus());
464
- }
465
- }),
466
- n,
467
- xe && /* @__PURE__ */ Q(ve, {
468
- "data-type": "inside",
469
- ref: de,
470
- onFocus: (e) => {
471
- c ? bt(Y()[0]) : P?.portalNode && (l && (I.current = !0), ge(e, P.portalNode) ? at(x)?.focus() : tt(d ?? P.afterOutsideRef)?.focus());
472
- }
473
- })
474
- ] });
475
- }
476
- //#endregion
477
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useClick.js
478
- function Ht(e, t = {}) {
479
- let n = "rootStore" in e ? e.rootStore : e, r = n.context.dataRef, { enabled: i = !0, event: a = "click", toggle: o = !0, ignoreMouse: s = !1, stickIfOpen: c = !0, touchOpenDelay: l = 0, reason: u = T } = t, d = Z.useRef(void 0), p = Fe(), m = Te(), h = Z.useMemo(() => ({
480
- onPointerDown(e) {
481
- d.current = e.pointerType;
482
- },
483
- onMouseDown(e) {
484
- let t = d.current, i = e.nativeEvent, f = n.select("open");
485
- if (e.button !== 0 || a === "click" || he(t, !0) && s) return;
486
- let h = r.current.openEvent, g = h?.type, _ = n.select("domReferenceElement") !== e.currentTarget, v = f && _ || !(f && o && (!(h && c) || g === "click" || g === "mousedown")), y = M(i);
487
- if (ce(y)) {
488
- let e = ne(u, i, y);
489
- v && t === "touch" && l > 0 ? m.start(l, () => {
490
- n.setOpen(!0, e);
491
- }) : n.setOpen(v, e);
492
- return;
493
- }
494
- let b = e.currentTarget;
495
- p.request(() => {
496
- let e = ne(u, i, b);
497
- v && t === "touch" && l > 0 ? m.start(l, () => {
498
- n.setOpen(!0, e);
499
- }) : n.setOpen(v, e);
500
- });
501
- },
502
- onClick(e) {
503
- if (a === "mousedown-only") return;
504
- let t = d.current;
505
- if (a === "mousedown" && t) {
506
- d.current = void 0;
507
- return;
508
- }
509
- if (he(t, !0) && s) return;
510
- let i = n.select("open"), f = r.current.openEvent, p = n.select("domReferenceElement") !== e.currentTarget, h = i && p || !(i && o && (!(f && c) || W(f))), g = ne(u, e.nativeEvent, e.currentTarget);
511
- h && t === "touch" && l > 0 ? m.start(l, () => {
512
- n.setOpen(!0, g);
513
- }) : n.setOpen(h, g);
514
- },
515
- onKeyDown() {
516
- d.current = void 0;
517
- }
518
- }), [
519
- r,
520
- a,
521
- s,
522
- n,
523
- c,
524
- o,
525
- p,
526
- m,
527
- l,
528
- u
529
- ]);
530
- return Z.useMemo(() => i ? { reference: h } : f, [i, h]);
531
- }
532
- //#endregion
533
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useListNavigation.js
534
- var Ut = "Escape";
535
- function Wt(e, t, n) {
536
- switch (e) {
537
- case "vertical": return t;
538
- case "horizontal": return n;
539
- default: return t || n;
540
- }
541
- }
542
- function Gt(e, t) {
543
- return Wt(t, e === "ArrowUp" || e === "ArrowDown", e === "ArrowLeft" || e === "ArrowRight");
544
- }
545
- function Kt(e, t, n) {
546
- return Wt(t, e === "ArrowDown", n ? e === "ArrowLeft" : e === "ArrowRight") || e === "Enter" || e === " " || e === "";
547
- }
548
- function qt(e, t, n) {
549
- return Wt(t, n ? e === De : e === me, e === we);
550
- }
551
- function Jt(e, t, n, r) {
552
- return t === "both" || t === "horizontal" && r && r > 1 ? e === Ut : Wt(t, n ? e === me : e === De, e === N);
553
- }
554
- function Yt(e, t) {
555
- let n = "rootStore" in e ? e.rootStore : e, r = n.useState("open"), i = n.useState("floatingElement"), a = n.useState("domReferenceElement"), o = n.context.dataRef, { listRef: c, activeIndex: l, onNavigate: u = () => {}, enabled: d = !0, selectedIndex: f = null, allowEscape: h = !1, loopFocus: g = !1, nested: _ = !1, rtl: v = !1, virtual: y = !1, focusItemOnOpen: b = "auto", focusItemOnHover: x = !0, openOnArrowKeyDown: S = !0, disabledIndices: C = void 0, orientation: T = "vertical", parentOrientation: ee, cols: D = 1, id: te, resetOnPointerLeave: k = !0, externalTree: A } = t;
556
- process.env.NODE_ENV !== "production" && (h && (g || console.warn("`useListNavigation` looping must be enabled to allow escaping."), y || console.warn("`useListNavigation` must be virtual to allow escaping.")), T === "vertical" && D > 1 && console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should", "be either \"horizontal\" or \"both\"."));
557
- let re = le(Se(i)), N = Be(), F = G(A);
558
- p(() => {
559
- o.current.orientation = T;
560
- }, [o, T]);
561
- let I = Qe(a), L = Z.useRef(b), z = Z.useRef(f ?? -1), B = Z.useRef(null), V = Z.useRef(!0), H = m((e) => {
562
- u(z.current === -1 ? null : z.current, e);
563
- }), se = Z.useRef(H), U = Z.useRef(!!i), ce = Z.useRef(r), W = Z.useRef(!1), ue = Z.useRef(!1), fe = Z.useRef(null), q = le(C), me = le(r), he = le(f), J = le(k), ge = m(() => {
564
- function e(e) {
565
- y ? F?.events.emit("virtualfocus", e) : fe.current = bt(e, {
566
- sync: W.current,
567
- preventScroll: !0
568
- });
569
- }
570
- let t = c.current[z.current], n = ue.current;
571
- t && e(t), (W.current ? (e) => e() : requestAnimationFrame)(() => {
572
- let r = c.current[z.current] || t;
573
- r && (t || e(r), ye && (n || !V.current) && r.scrollIntoView?.({
574
- block: "nearest",
575
- inline: "nearest"
576
- }));
577
- });
578
- });
579
- p(() => {
580
- d && (r && i ? (z.current = f ?? -1, L.current && f != null && (ue.current = !0, H())) : U.current && (z.current = -1, se.current()));
581
- }, [
582
- d,
583
- r,
584
- i,
585
- f,
586
- H
587
- ]), p(() => {
588
- if (d) {
589
- if (!r) {
590
- W.current = !1;
591
- return;
592
- }
593
- if (i) if (l == null) {
594
- if (W.current = !1, he.current != null) return;
595
- if (U.current && (z.current = -1, ge()), (!ce.current || !U.current) && L.current && (B.current != null || L.current === !0 && B.current == null)) {
596
- let e = 0, t = () => {
597
- c.current[0] == null ? (e < 2 && (e ? requestAnimationFrame : queueMicrotask)(t), e += 1) : (z.current = B.current == null || Kt(B.current, T, v) || _ ? Ve(c) : P(c), B.current = null, H());
598
- };
599
- t();
600
- }
601
- } else K(c.current, l) || (z.current = l, ge(), ue.current = !1);
602
- }
603
- }, [
604
- d,
605
- r,
606
- i,
607
- l,
608
- he,
609
- _,
610
- c,
611
- T,
612
- v,
613
- H,
614
- ge,
615
- q
616
- ]), p(() => {
617
- if (!d || i || !F || y || !U.current) return;
618
- let e = F.nodesRef.current, t = e.find((e) => e.id === N)?.context?.elements.floating, n = E(j(i)), r = e.some((e) => e.context && O(e.context.elements.floating, n));
619
- t && !r && V.current && t.focus({ preventScroll: !0 });
620
- }, [
621
- d,
622
- i,
623
- F,
624
- N,
625
- y
626
- ]), p(() => {
627
- se.current = H, ce.current = r, U.current = !!i;
628
- }), p(() => {
629
- r || (B.current = null, L.current = b);
630
- }, [r, b]);
631
- let Y = l != null, ve = m((e) => {
632
- if (!me.current) return;
633
- let t = c.current.indexOf(e.currentTarget);
634
- t !== -1 && (z.current !== t || l !== t) && (z.current = t, H(e));
635
- }), ye = Z.useMemo(() => ({
636
- onFocus(e) {
637
- W.current = !0, ve(e);
638
- },
639
- onClick: ({ currentTarget: e }) => e.focus({ preventScroll: !0 }),
640
- onMouseMove(e) {
641
- W.current = !0, ue.current = !1, x && ve(e);
642
- },
643
- onPointerLeave(e) {
644
- if (!me.current || !V.current || e.pointerType === "touch") return;
645
- W.current = !0;
646
- let t = e.relatedTarget;
647
- if (!(!x || c.current.includes(t)) && J.current && (fe.current?.(), fe.current = null, z.current = -1, H(e), !y)) {
648
- let e = re.current, t = E(j(e));
649
- e && O(e, t) && e.focus({ preventScroll: !0 });
650
- }
651
- }
652
- }), [
653
- ve,
654
- me,
655
- re,
656
- x,
657
- c,
658
- H,
659
- J,
660
- y
661
- ]), xe = Z.useCallback(() => ee ?? F?.nodesRef.current.find((e) => e.id === N)?.context?.dataRef?.current.orientation, [
662
- N,
663
- F,
664
- ee
665
- ]), Ce = m((e) => {
666
- if (V.current = !1, W.current = !0, e.which === 229 || !me.current && e.currentTarget === re.current) return;
667
- if (_ && Jt(e.key, T, v, D)) {
668
- Gt(e.key, xe()) || be(e), n.setOpen(!1, ne(w, e.nativeEvent)), s(a) && (y ? F?.events.emit("virtualfocus", a) : a.focus());
669
- return;
670
- }
671
- let t = z.current, i = Ve(c, C), o = P(c, C);
672
- if (I || (e.key === "Home" && (be(e), z.current = i, H(e)), e.key === "End" && (be(e), z.current = o, H(e))), D > 1) {
673
- let t = Array.from({ length: c.current.length }, () => ({
674
- width: 1,
675
- height: 1
676
- })), n = _e(t, D, !1), r = n.findIndex((e) => e != null && !pe(c.current, e, C)), a = n.reduce((e, t, n) => t != null && !pe(c.current, t, C) ? n : e, -1), s = n[He(n.map((e) => e == null ? null : c.current[e]), {
677
- event: e,
678
- orientation: T,
679
- loopFocus: g,
680
- rtl: v,
681
- cols: D,
682
- disabledIndices: de([...(typeof C == "function" ? null : C) || c.current.map((e, t) => pe(c.current, t, C) ? t : void 0), void 0], n),
683
- minIndex: r,
684
- maxIndex: a,
685
- prevIndex: oe(z.current > o ? i : z.current, t, n, D, e.key === "ArrowDown" ? "bl" : e.key === (v ? "ArrowLeft" : "ArrowRight") ? "tr" : "tl"),
686
- stopEvent: !0
687
- })];
688
- if (s != null && (z.current = s, H(e)), T === "both") return;
689
- }
690
- if (Gt(e.key, T)) {
691
- if (be(e), r && !y && E(e.currentTarget.ownerDocument) === e.currentTarget) {
692
- z.current = Kt(e.key, T, v) ? i : o, H(e);
693
- return;
694
- }
695
- Kt(e.key, T, v) ? g ? t >= o ? h && t !== c.current.length ? z.current = -1 : (W.current = !1, z.current = i) : z.current = R(c.current, {
696
- startingIndex: t,
697
- disabledIndices: C
698
- }) : z.current = Math.min(o, R(c.current, {
699
- startingIndex: t,
700
- disabledIndices: C
701
- })) : g ? t <= i ? h && t !== -1 ? z.current = c.current.length : (W.current = !1, z.current = o) : z.current = R(c.current, {
702
- startingIndex: t,
703
- decrement: !0,
704
- disabledIndices: C
705
- }) : z.current = Math.max(i, R(c.current, {
706
- startingIndex: t,
707
- decrement: !0,
708
- disabledIndices: C
709
- })), K(c.current, z.current) && (z.current = -1), H(e);
710
- }
711
- }), we = Z.useMemo(() => y && r && Y && { "aria-activedescendant": `${te}-${l}` }, [
712
- y,
713
- r,
714
- Y,
715
- te,
716
- l
717
- ]), Te = Z.useMemo(() => ({
718
- "aria-orientation": T === "both" ? void 0 : T,
719
- ...I ? {} : we,
720
- onKeyDown(e) {
721
- if (e.key === "Tab" && e.shiftKey && r && !y) {
722
- let t = M(e.nativeEvent);
723
- if (t && !O(re.current, t)) return;
724
- be(e), n.setOpen(!1, ne(ie, e.nativeEvent)), s(a) && a.focus();
725
- return;
726
- }
727
- Ce(e);
728
- },
729
- onPointerMove() {
730
- V.current = !0;
731
- }
732
- }), [
733
- we,
734
- Ce,
735
- re,
736
- T,
737
- I,
738
- n,
739
- r,
740
- y,
741
- a
742
- ]), Ee = Z.useMemo(() => {
743
- function e(e) {
744
- b === "auto" && st(e.nativeEvent) && (L.current = !y);
745
- }
746
- function t(e) {
747
- L.current = b, b === "auto" && ae(e.nativeEvent) && (L.current = !0);
748
- }
749
- return {
750
- onKeyDown(e) {
751
- let t = n.select("open");
752
- V.current = !1;
753
- let r = e.key.startsWith("Arrow"), i = qt(e.key, xe(), v), a = Gt(e.key, T), o = (_ ? i : a) || e.key === "Enter" || e.key.trim() === "";
754
- if (y && t) return Ce(e);
755
- if (!(!t && !S && r)) {
756
- if (o) {
757
- let t = Gt(e.key, xe());
758
- B.current = _ && t ? null : e.key;
759
- }
760
- if (_) {
761
- i && (be(e), t ? (z.current = Ve(c, q.current), H(e)) : n.setOpen(!0, ne(w, e.nativeEvent, e.currentTarget)));
762
- return;
763
- }
764
- a && (he.current != null && (z.current = he.current), be(e), !t && S ? n.setOpen(!0, ne(w, e.nativeEvent, e.currentTarget)) : Ce(e), t && H(e));
765
- }
766
- },
767
- onFocus(e) {
768
- n.select("open") && !y && (z.current = -1, H(e));
769
- },
770
- onPointerDown: t,
771
- onPointerEnter: t,
772
- onMouseDown: e,
773
- onClick: e
774
- };
775
- }, [
776
- Ce,
777
- q,
778
- b,
779
- c,
780
- _,
781
- H,
782
- n,
783
- S,
784
- T,
785
- xe,
786
- v,
787
- he,
788
- y
789
- ]), De = Z.useMemo(() => ({
790
- ...we,
791
- ...Ee
792
- }), [we, Ee]);
793
- return Z.useMemo(() => d ? {
794
- reference: De,
795
- floating: Te,
796
- item: ye,
797
- trigger: Ee
798
- } : {}, [
799
- d,
800
- De,
801
- Te,
802
- Ee,
803
- ye
804
- ]);
805
- }
806
- //#endregion
807
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useTypeahead.js
808
- function Xt(e, t) {
809
- let n = "rootStore" in e ? e.rootStore : e, r = n.context.dataRef, i = n.useState("open"), { listRef: a, elementsRef: o, activeIndex: s, onMatch: c, onTypingChange: l, enabled: u = !0, resetMs: d = 750, selectedIndex: f = null } = t, h = Te(), g = Z.useRef(""), _ = Z.useRef(f ?? s ?? -1), v = Z.useRef(null);
810
- p(() => {
811
- !i && f !== null || (h.clear(), v.current = null, g.current !== "" && (g.current = ""));
812
- }, [
813
- i,
814
- f,
815
- h
816
- ]), p(() => {
817
- i && g.current === "" && (_.current = f ?? s ?? -1);
818
- }, [
819
- i,
820
- f,
821
- s
822
- ]);
823
- let y = m((e) => {
824
- e ? r.current.typing || (r.current.typing = e, l?.(e)) : r.current.typing && (r.current.typing = e, l?.(e));
825
- }), b = m((e) => {
826
- function t(e) {
827
- let t = o?.current[e];
828
- return !t || ue(t);
829
- }
830
- function n(e, n, r = 0) {
831
- if (e.length === 0) return -1;
832
- let i = (r % e.length + e.length) % e.length, a = n.toLocaleLowerCase();
833
- for (let n = 0; n < e.length; n += 1) {
834
- let r = (i + n) % e.length;
835
- if (!(!e[r]?.toLocaleLowerCase().startsWith(a) || !t(r))) return r;
836
- }
837
- return -1;
838
- }
839
- let r = a.current;
840
- if (g.current.length > 0 && e.key === " " && (be(e), y(!0)), g.current.length > 0 && g.current[0] !== " " && n(r, g.current) === -1 && e.key !== " " && y(!1), r == null || e.key.length !== 1 || e.ctrlKey || e.metaKey || e.altKey) return;
841
- i && e.key !== " " && (be(e), y(!0));
842
- let l = g.current === "";
843
- l && (_.current = f ?? s ?? -1), r.every((e) => e ? e[0]?.toLocaleLowerCase() !== e[1]?.toLocaleLowerCase() : !0) && g.current === e.key && (g.current = "", _.current = v.current), g.current += e.key, h.start(d, () => {
844
- g.current = "", _.current = v.current, y(!1);
845
- });
846
- let u = ((l ? f ?? s ?? -1 : _.current) ?? 0) + 1, p = n(r, g.current, u);
847
- p === -1 ? e.key !== " " && (g.current = "", y(!1)) : (c?.(p), v.current = p);
848
- }), x = m((e) => {
849
- let t = e.relatedTarget, r = n.select("domReferenceElement"), i = n.select("floatingElement"), a = O(r, t), o = O(i, t);
850
- a || o || (h.clear(), g.current = "", _.current = v.current, y(!1));
851
- }), S = Z.useMemo(() => ({
852
- onKeyDown: b,
853
- onBlur: x
854
- }), [b, x]), C = Z.useMemo(() => ({
855
- onKeyDown: b,
856
- onBlur: x
857
- }), [b, x]);
858
- return Z.useMemo(() => u ? {
859
- reference: S,
860
- floating: C
861
- } : {}, [
862
- u,
863
- S,
864
- C
865
- ]);
866
- }
867
- //#endregion
868
- //#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/utils/esm/useEnhancedClickHandler.js
869
- function Zt(e) {
870
- let t = Z.useRef(""), n = Z.useCallback((n) => {
871
- n.defaultPrevented || (t.current = n.pointerType, e(n, n.pointerType));
872
- }, [e]);
873
- return {
874
- onClick: Z.useCallback((n) => {
875
- if (n.detail === 0) {
876
- e(n, "keyboard");
877
- return;
878
- }
879
- "pointerType" in n ? e(n, n.pointerType) : e(n, t.current), t.current = "";
880
- }, [e]),
881
- onPointerDown: n
882
- };
883
- }
884
- //#endregion
885
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/utils/useOpenInteractionType.js
886
- function Qt(e) {
887
- let [t, n] = Z.useState(null), r = m((t, r) => {
888
- e || n(r || (Je ? "touch" : ""));
889
- });
890
- Le(e, (t) => {
891
- t && !e && n(null);
892
- });
893
- let { onClick: i, onPointerDown: a } = Zt(r);
894
- return Z.useMemo(() => ({
895
- openMethod: t,
896
- triggerProps: {
897
- onClick: i,
898
- onPointerDown: a
899
- }
900
- }), [
901
- t,
902
- i,
903
- a
904
- ]);
905
- }
906
- //#endregion
907
- //#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/utils/esm/inertValue.js
908
- function $t(e) {
909
- return o(19) ? e : e ? "true" : void 0;
910
- }
911
- //#endregion
912
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/utils/InternalBackdrop.js
913
- var en = /* @__PURE__ */ Z.forwardRef(function(e, t) {
914
- let { cutout: n, ...r } = e, i;
915
- if (n) {
916
- let e = n.getBoundingClientRect();
917
- i = `polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`;
918
- }
919
- return /* @__PURE__ */ Q("div", {
920
- ref: t,
921
- role: "presentation",
922
- "data-base-ui-inert": "",
923
- ...r,
924
- style: {
925
- position: "fixed",
926
- inset: 0,
927
- userSelect: "none",
928
- WebkitUserSelect: "none",
929
- clipPath: i
930
- }
931
- });
932
- });
933
- process.env.NODE_ENV !== "production" && (en.displayName = "InternalBackdrop");
934
- //#endregion
935
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/internals/itemEquality.js
936
- var tn = (e, t) => Object.is(e, t);
937
- function nn(e, t, n) {
938
- return e == null || t == null ? Object.is(e, t) : n(e, t);
939
- }
940
- function rn(e, t, n) {
941
- return !e || e.length === 0 ? !1 : e.some((e) => e === void 0 ? !1 : nn(t, e, n));
942
- }
943
- function an(e, t, n) {
944
- return !e || e.length === 0 ? -1 : e.findIndex((e) => e === void 0 ? !1 : nn(e, t, n));
945
- }
946
- function on(e, t, n) {
947
- return e.filter((e) => !nn(t, e, n));
948
- }
949
- //#endregion
950
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/internals/serializeValue.js
951
- function sn(e) {
952
- if (e == null) return "";
953
- if (typeof e == "string") return e;
954
- try {
955
- return JSON.stringify(e);
956
- } catch {
957
- return String(e);
958
- }
959
- }
960
- //#endregion
961
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/internals/resolveValueLabel.js
962
- function cn(e) {
963
- return e != null && e.length > 0 && typeof e[0] == "object" && e[0] != null && "items" in e[0];
964
- }
965
- function ln(e) {
966
- if (!Array.isArray(e)) return e != null && "null" in e;
967
- let t = e;
968
- if (cn(t)) {
969
- for (let e of t) for (let t of e.items) if (t && t.value == null && t.label != null) return !0;
970
- return !1;
971
- }
972
- for (let e of t) if (e && e.value == null && e.label != null) return !0;
973
- return !1;
974
- }
975
- function un(e, t) {
976
- if (t && e != null) return t(e) ?? "";
977
- if (e && typeof e == "object") {
978
- if ("label" in e && e.label != null) return String(e.label);
979
- if ("value" in e) return String(e.value);
980
- }
981
- return sn(e);
982
- }
983
- function dn(e, t) {
984
- return t && e != null ? t(e) ?? "" : e && typeof e == "object" && "value" in e && "label" in e ? sn(e.value) : sn(e);
985
- }
986
- function fn(e, t, n) {
987
- function r() {
988
- return un(e, n);
989
- }
990
- if (n && e != null) return n(e);
991
- if (e && typeof e == "object" && "label" in e && e.label != null) return e.label;
992
- if (t && !Array.isArray(t)) return t[e] ?? r();
993
- if (Array.isArray(t)) {
994
- let n = t, i = cn(n) ? n.flatMap((e) => e.items) : n;
995
- if (typeof e != "object" || !e) {
996
- let t = i.find((t) => t.value === e);
997
- return t && t.label != null ? t.label : r();
998
- }
999
- if ("value" in e) {
1000
- let t = i.find((t) => t && t.value === e.value);
1001
- if (t && t.label != null) return t.label;
1002
- }
1003
- }
1004
- return r();
1005
- }
1006
- function pn(e, t, n) {
1007
- return e.reduce((e, r, i) => (i > 0 && e.push(", "), e.push(/* @__PURE__ */ Q(Z.Fragment, { children: fn(r, t, n) }, i)), e), []);
1008
- }
1009
- //#endregion
1010
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/utils/getPseudoElementBounds.js
1011
- function mn(e) {
1012
- let t = e.getBoundingClientRect();
1013
- if (process.env.NODE_ENV !== "production") return t;
1014
- let n = v(e), r = n.getComputedStyle(e, "::before"), i = n.getComputedStyle(e, "::after");
1015
- if (!(r.content !== "none" || i.content !== "none")) return t;
1016
- let a = parseFloat(r.width) || 0, o = parseFloat(r.height) || 0, s = parseFloat(i.width) || 0, c = parseFloat(i.height) || 0, l = Math.max(t.width, a, s), u = Math.max(t.height, o, c), d = l - t.width, f = u - t.height;
1017
- return {
1018
- left: t.left - d / 2,
1019
- right: t.right + d / 2,
1020
- top: t.top - f / 2,
1021
- bottom: t.bottom + f / 2
1022
- };
1023
- }
1024
- //#endregion
1025
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/utils/useAnchoredPopupScrollLock.js
1026
- var hn = 20;
1027
- function gn(e, t, n, r) {
1028
- let [i, a] = Z.useState(!1);
1029
- p(() => {
1030
- if (!e || !t || n == null) {
1031
- a(!1);
1032
- return;
1033
- }
1034
- let r = j(n).documentElement.clientWidth, i = n.offsetWidth;
1035
- a(r > 0 && i > 0 && i >= r - hn);
1036
- }, [
1037
- e,
1038
- t,
1039
- n
1040
- ]), vt(e && (!t || i), r);
1041
- }
1042
- //#endregion
1043
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/toolbar/root/ToolbarRootContext.js
1044
- var _n = /* @__PURE__ */ Z.createContext(void 0);
1045
- process.env.NODE_ENV !== "production" && (_n.displayName = "ToolbarRootContext");
1046
- function vn(e) {
1047
- let t = Z.useContext(_n);
1048
- if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? a(69) : "Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.");
1049
- return t;
1050
- }
1051
- //#endregion
1052
- //#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/utils/esm/usePreviousValue.js
1053
- function yn(e) {
1054
- let [t, n] = Z.useState({
1055
- current: e,
1056
- previous: null
1057
- });
1058
- return e !== t.current && n({
1059
- current: e,
1060
- previous: t.current
1061
- }), t.previous;
1062
- }
1063
- //#endregion
1064
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/utils/styles.js
1065
- var bn = "base-ui-disable-scrollbar", xn = {
1066
- className: bn,
1067
- getElement(e) {
1068
- return /* @__PURE__ */ Q("style", {
1069
- nonce: e,
1070
- href: bn,
1071
- precedence: "base-ui:low",
1072
- children: `.${bn}{scrollbar-width:none}.${bn}::-webkit-scrollbar{display:none}`
1073
- });
1074
- }
1075
- };
1076
- process.env.NODE_ENV !== "production" && (xn.getElement.displayName = "styleDisableScrollbar.getElement");
1077
- function Sn(e, t) {
1078
- return Math.max(0, e - t);
1079
- }
1080
- function Cn(e, t) {
1081
- if (t <= 0) return 0;
1082
- let n = et(e, 0, t), r = n, i = t - n, a = r <= 1, o = i <= 1;
1083
- return a && o ? r <= i ? 0 : t : a ? 0 : o ? t : n;
1084
- }
1085
- //#endregion
1086
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/select/root/SelectRootContext.js
1087
- var wn = /* @__PURE__ */ Z.createContext(null);
1088
- process.env.NODE_ENV !== "production" && (wn.displayName = "SelectRootContext");
1089
- var Tn = /* @__PURE__ */ Z.createContext(null);
1090
- process.env.NODE_ENV !== "production" && (Tn.displayName = "SelectFloatingContext");
1091
- function En() {
1092
- let e = Z.useContext(wn);
1093
- if (e === null) throw Error(process.env.NODE_ENV === "production" ? a(60) : "Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.");
1094
- return e;
1095
- }
1096
- function Dn() {
1097
- let e = Z.useContext(Tn);
1098
- if (e === null) throw Error(process.env.NODE_ENV === "production" ? a(61) : "Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.");
1099
- return e;
1100
- }
1101
- //#endregion
1102
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/select/store.js
1103
- var $ = {
1104
- id: Y((e) => e.id),
1105
- labelId: Y((e) => e.labelId),
1106
- modal: Y((e) => e.modal),
1107
- multiple: Y((e) => e.multiple),
1108
- items: Y((e) => e.items),
1109
- itemToStringLabel: Y((e) => e.itemToStringLabel),
1110
- itemToStringValue: Y((e) => e.itemToStringValue),
1111
- isItemEqualToValue: Y((e) => e.isItemEqualToValue),
1112
- value: Y((e) => e.value),
1113
- hasSelectedValue: Y((e) => {
1114
- let { value: t, multiple: n, itemToStringValue: r } = e;
1115
- return t == null ? !1 : n && Array.isArray(t) ? t.length > 0 : dn(t, r) !== "";
1116
- }),
1117
- hasNullItemLabel: Y((e, t) => t ? ln(e.items) : !1),
1118
- open: Y((e) => e.open),
1119
- mounted: Y((e) => e.mounted),
1120
- forceMount: Y((e) => e.forceMount),
1121
- transitionStatus: Y((e) => e.transitionStatus),
1122
- openMethod: Y((e) => e.openMethod),
1123
- activeIndex: Y((e) => e.activeIndex),
1124
- selectedIndex: Y((e) => e.selectedIndex),
1125
- isActive: Y((e, t) => e.activeIndex === t),
1126
- isSelected: Y((e, t, n) => {
1127
- let r = e.isItemEqualToValue, i = e.value;
1128
- return e.multiple ? Array.isArray(i) && i.some((e) => nn(n, e, r)) : e.selectedIndex === t && e.selectedIndex !== null ? !0 : nn(n, i, r);
1129
- }),
1130
- isSelectedByFocus: Y((e, t) => e.selectedIndex === t),
1131
- popupProps: Y((e) => e.popupProps),
1132
- triggerProps: Y((e) => e.triggerProps),
1133
- triggerElement: Y((e) => e.triggerElement),
1134
- positionerElement: Y((e) => e.positionerElement),
1135
- listElement: Y((e) => e.listElement),
1136
- scrollUpArrowVisible: Y((e) => e.scrollUpArrowVisible),
1137
- scrollDownArrowVisible: Y((e) => e.scrollDownArrowVisible),
1138
- hasScrollArrows: Y((e) => e.hasScrollArrows)
1139
- };
1140
- //#endregion
1141
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/select/root/SelectRoot.js
1142
- function On(e) {
1143
- let { id: t, value: n, defaultValue: i = null, onValueChange: a, open: o, defaultOpen: s = !1, onOpenChange: l, name: d, form: h, autoComplete: g, disabled: _ = !1, readOnly: v = !1, required: b = !1, modal: S = !0, actionsRef: w, inputRef: T, onOpenChangeComplete: E, items: ee, multiple: O = !1, itemToStringLabel: te, itemToStringValue: k, isItemEqualToValue: j = tn, highlightItemOnHover: M = !0, children: ie } = e, { clearErrors: N } = Ue(), { setDirty: P, setTouched: ae, setFocused: F, shouldValidateOnChange: oe, validityData: L, setFilled: R, name: z, disabled: V, validation: H, validationMode: se } = D(), U = re({ id: t }), ce = V || _, W = z ?? d, [G, ue] = C({
1144
- controlled: n,
1145
- default: O ? i ?? u : i,
1146
- name: "Select",
1147
- state: "value"
1148
- }), [K, de] = C({
1149
- controlled: o,
1150
- default: s,
1151
- name: "Select",
1152
- state: "open"
1153
- }), fe = Z.useRef([]), pe = Z.useRef([]), q = Z.useRef(null), me = Z.useRef(null), he = Z.useRef(0), ge = Z.useRef(null), Y = Z.useRef([]), _e = Z.useRef(!1), ve = Z.useRef(!1), ye = Z.useRef(null), be = Z.useRef({
1154
- allowSelectedMouseUp: !1,
1155
- allowUnselectedMouseUp: !1
1156
- }), Se = Z.useRef(!1), { mounted: we, setMounted: Te, transitionStatus: De } = Ye(K), { openMethod: ke, triggerProps: Ae } = Qt(K), X = c(() => new it({
1157
- id: U,
1158
- labelId: void 0,
1159
- modal: S,
1160
- multiple: O,
1161
- itemToStringLabel: te,
1162
- itemToStringValue: k,
1163
- isItemEqualToValue: j,
1164
- value: G,
1165
- open: K,
1166
- mounted: we,
1167
- transitionStatus: De,
1168
- items: ee,
1169
- forceMount: !1,
1170
- openMethod: null,
1171
- activeIndex: null,
1172
- selectedIndex: null,
1173
- popupProps: {},
1174
- triggerProps: {},
1175
- triggerElement: null,
1176
- positionerElement: null,
1177
- listElement: null,
1178
- scrollUpArrowVisible: !1,
1179
- scrollDownArrowVisible: !1,
1180
- hasScrollArrows: !1
1181
- })).current, je = J(X, $.activeIndex), Me = J(X, $.selectedIndex), Ne = J(X, $.triggerElement), Pe = J(X, $.positionerElement), Fe = yn(ke), Re = ke ?? Fe, ze = Z.useMemo(() => O && Array.isArray(G) && G.length === 0 ? "" : dn(G, k), [
1182
- O,
1183
- G,
1184
- k
1185
- ]), Be = Z.useMemo(() => O && Array.isArray(G) ? G.map((e) => dn(e, k)) : dn(G, k), [
1186
- O,
1187
- G,
1188
- k
1189
- ]);
1190
- A(le(X.state.triggerElement), {
1191
- id: U,
1192
- value: G,
1193
- getValue: m(() => Be)
1194
- });
1195
- let Ve = Z.useRef(G);
1196
- p(() => {
1197
- G !== Ve.current && X.set("forceMount", !0);
1198
- }, [X, G]), p(() => {
1199
- R(O ? Array.isArray(G) && G.length > 0 : G != null);
1200
- }, [
1201
- O,
1202
- G,
1203
- R
1204
- ]), p(function() {
1205
- if (K) return;
1206
- let e = Y.current;
1207
- if (O) {
1208
- let t = Array.isArray(G) ? G : [];
1209
- if (t.length === 0) {
1210
- X.set("selectedIndex", null);
1211
- return;
1212
- }
1213
- let n = t[t.length - 1], r = an(e, n, j);
1214
- X.set("selectedIndex", r === -1 ? null : r);
1215
- return;
1216
- }
1217
- let t = an(e, G, j);
1218
- X.set("selectedIndex", t === -1 ? null : t);
1219
- }, [
1220
- O,
1221
- K,
1222
- G,
1223
- Y,
1224
- j,
1225
- X
1226
- ]), Le(G, () => {
1227
- N(W), P(G !== L.initialValue), oe() ? H.commit(G) : H.commit(G, !0);
1228
- });
1229
- let He = m((e, t) => {
1230
- if (l?.(e, t), !t.isCanceled && (de(e), !e && (t.reason === "focus-out" || t.reason === "outside-press") && (ae(!0), F(!1), se === "onBlur" && H.commit(G)), !e && X.state.activeIndex !== null)) {
1231
- let e = fe.current[X.state.activeIndex];
1232
- queueMicrotask(() => {
1233
- e?.setAttribute("tabindex", "-1");
1234
- });
1235
- }
1236
- }), We = m(() => {
1237
- Te(!1), X.update({
1238
- activeIndex: null,
1239
- openMethod: null
1240
- }), E?.(!1);
1241
- });
1242
- Ee({
1243
- enabled: !w,
1244
- open: K,
1245
- ref: q,
1246
- onComplete() {
1247
- K || We();
1248
- }
1249
- }), Z.useImperativeHandle(w, () => ({ unmount: We }), [We]);
1250
- let Ge = m((e, t) => {
1251
- a?.(e, t), !t.isCanceled && ue(e);
1252
- }), Ke = m(() => {
1253
- let e = X.state.listElement || q.current;
1254
- if (!e) return;
1255
- let t = Sn(e.scrollHeight, e.clientHeight), n = Cn(e.scrollTop, t), r = n > 0, i = n < t;
1256
- X.state.scrollUpArrowVisible !== r && X.set("scrollUpArrowVisible", r), X.state.scrollDownArrowVisible !== i && X.set("scrollDownArrowVisible", i);
1257
- }), qe = Oe({
1258
- open: K,
1259
- onOpenChange: He,
1260
- elements: {
1261
- reference: Ne,
1262
- floating: Pe
1263
- }
1264
- }), { getReferenceProps: Je, getFloatingProps: Xe, getItemProps: Ze } = Ie([
1265
- Ht(qe, {
1266
- enabled: !v && !ce,
1267
- event: "mousedown"
1268
- }),
1269
- I(qe, { bubbles: !1 }),
1270
- Yt(qe, {
1271
- enabled: !v && !ce,
1272
- listRef: fe,
1273
- activeIndex: je,
1274
- selectedIndex: Me,
1275
- disabledIndices: u,
1276
- onNavigate(e) {
1277
- e === null && !K || X.set("activeIndex", e);
1278
- },
1279
- focusItemOnHover: M
1280
- }),
1281
- Xt(qe, {
1282
- enabled: !v && !ce && (K || !O),
1283
- listRef: pe,
1284
- activeIndex: je,
1285
- selectedIndex: Me,
1286
- onMatch(e) {
1287
- K ? X.set("activeIndex", e) : Ge(Y.current[e], ne("none"));
1288
- },
1289
- onTypingChange(e) {
1290
- _e.current = e;
1291
- }
1292
- })
1293
- ]), Qe = Z.useMemo(() => r(Je(), Ae, U ? { id: U } : f), [
1294
- Je,
1295
- Ae,
1296
- U
1297
- ]);
1298
- Ce(() => {
1299
- X.update({
1300
- popupProps: Xe(),
1301
- triggerProps: Qe
1302
- });
1303
- }), p(() => {
1304
- X.update({
1305
- id: U,
1306
- modal: S,
1307
- multiple: O,
1308
- value: G,
1309
- open: K,
1310
- mounted: we,
1311
- transitionStatus: De,
1312
- popupProps: Xe(),
1313
- triggerProps: Qe,
1314
- items: ee,
1315
- itemToStringLabel: te,
1316
- itemToStringValue: k,
1317
- isItemEqualToValue: j,
1318
- openMethod: Re
1319
- });
1320
- }, [
1321
- X,
1322
- U,
1323
- S,
1324
- O,
1325
- G,
1326
- K,
1327
- we,
1328
- De,
1329
- Xe,
1330
- Qe,
1331
- ee,
1332
- te,
1333
- k,
1334
- j,
1335
- Re
1336
- ]);
1337
- let $e = Z.useMemo(() => ({
1338
- store: X,
1339
- name: W,
1340
- required: b,
1341
- disabled: ce,
1342
- readOnly: v,
1343
- multiple: O,
1344
- highlightItemOnHover: M,
1345
- setValue: Ge,
1346
- setOpen: He,
1347
- listRef: fe,
1348
- popupRef: q,
1349
- scrollHandlerRef: me,
1350
- handleScrollArrowVisibility: Ke,
1351
- scrollArrowsMountedCountRef: he,
1352
- getItemProps: Ze,
1353
- events: qe.context.events,
1354
- valueRef: ge,
1355
- valuesRef: Y,
1356
- labelsRef: pe,
1357
- typingRef: _e,
1358
- selectionRef: be,
1359
- selectedItemTextRef: ye,
1360
- validation: H,
1361
- onOpenChangeComplete: E,
1362
- keyboardActiveRef: ve,
1363
- alignItemWithTriggerActiveRef: Se,
1364
- initialValueRef: Ve
1365
- }), [
1366
- X,
1367
- W,
1368
- b,
1369
- ce,
1370
- v,
1371
- O,
1372
- M,
1373
- Ge,
1374
- He,
1375
- Ze,
1376
- qe.context.events,
1377
- H,
1378
- E,
1379
- Ke
1380
- ]), et = y(T, H.inputRef), tt = O && Array.isArray(G) && G.length > 0, nt = O ? void 0 : W, rt = Z.useMemo(() => !O || !Array.isArray(G) || !W ? null : G.map((e) => {
1381
- let t = dn(e, k);
1382
- return /* @__PURE__ */ Q("input", {
1383
- type: "hidden",
1384
- form: h,
1385
- name: W,
1386
- value: t
1387
- }, t);
1388
- }), [
1389
- O,
1390
- G,
1391
- h,
1392
- W,
1393
- k
1394
- ]);
1395
- return /* @__PURE__ */ Q(wn.Provider, {
1396
- value: $e,
1397
- children: /* @__PURE__ */ lt(Tn.Provider, {
1398
- value: qe,
1399
- children: [
1400
- ie,
1401
- /* @__PURE__ */ Q("input", {
1402
- ...H.getInputValidationProps({
1403
- onFocus() {
1404
- X.state.triggerElement?.focus({ focusVisible: !0 });
1405
- },
1406
- onChange(e) {
1407
- if (e.nativeEvent.defaultPrevented) return;
1408
- let t = e.currentTarget.value, n = ne(x, e.nativeEvent);
1409
- function r() {
1410
- if (O) return;
1411
- let e = Y.current.find((e) => dn(e, k).toLowerCase() === t.toLowerCase() || un(e, te).toLowerCase() === t.toLowerCase());
1412
- e != null && (P(e !== L.initialValue), Ge(e, n), oe() && H.commit(e));
1413
- }
1414
- X.set("forceMount", !0), queueMicrotask(r);
1415
- }
1416
- }),
1417
- id: U && nt == null ? `${U}-hidden-input` : void 0,
1418
- form: h,
1419
- name: nt,
1420
- autoComplete: g,
1421
- value: ze,
1422
- disabled: ce,
1423
- required: b && !tt,
1424
- readOnly: v,
1425
- ref: et,
1426
- style: W ? B : xe,
1427
- tabIndex: -1,
1428
- "aria-hidden": !0,
1429
- suppressHydrationWarning: !0
1430
- }),
1431
- rt
1432
- ]
1433
- })
1434
- });
1435
- }
1436
- //#endregion
1437
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/select/trigger/SelectTrigger.js
1438
- var kn = 2, An = 400, jn = 200, Mn = {
1439
- ...Xe,
1440
- ...k,
1441
- value: () => null
1442
- }, Nn = /* @__PURE__ */ Z.forwardRef(function(e, t) {
1443
- let { render: n, className: i, id: a, disabled: o = !1, nativeButton: s = !0, style: c, ...l } = e, { setTouched: u, setFocused: f, validationMode: p, state: h, disabled: g } = D(), { labelId: _ } = te(), { store: v, setOpen: S, selectionRef: C, validation: w, readOnly: T, required: E, alignItemWithTriggerActiveRef: k, disabled: A, keyboardActiveRef: M } = En(), ie = g || A || o, N = J(v, $.open), P = J(v, $.value), ae = J(v, $.triggerProps), F = J(v, $.positionerElement), I = J(v, $.listElement), oe = J(v, $.id), L = J(v, $.labelId), R = J(v, $.hasSelectedValue), z = !R && N, B = J(v, $.hasNullItemLabel, z), V = a ?? oe, H = Me(_, L);
1444
- re({ id: V });
1445
- let se = le(F), U = Z.useRef(null), { getButtonProps: ce, buttonRef: W } = b({
1446
- disabled: ie,
1447
- native: s
1448
- }), G = y(t, U, W, m((e) => {
1449
- v.set("triggerElement", e);
1450
- })), ue = Te(), K = Te(), de = Te(), fe = Te();
1451
- Z.useEffect(() => {
1452
- if (N) return R || B ? fe.start(jn, () => {
1453
- C.current.allowUnselectedMouseUp = !0, de.start(jn, () => {
1454
- C.current.allowSelectedMouseUp = !0;
1455
- });
1456
- }) : de.start(An, () => {
1457
- C.current.allowUnselectedMouseUp = !0, C.current.allowSelectedMouseUp = !0;
1458
- }), () => {
1459
- de.clear(), fe.clear();
1460
- };
1461
- C.current = {
1462
- allowSelectedMouseUp: !1,
1463
- allowUnselectedMouseUp: !1
1464
- }, K.clear();
1465
- }, [
1466
- N,
1467
- R,
1468
- B,
1469
- C,
1470
- K,
1471
- de,
1472
- fe
1473
- ]);
1474
- let pe = Z.useMemo(() => I?.id ?? Se(F)?.id, [I, F]), q = r(ae, {
1475
- id: V,
1476
- role: "combobox",
1477
- "aria-expanded": N ? "true" : "false",
1478
- "aria-haspopup": "listbox",
1479
- "aria-controls": N ? pe : void 0,
1480
- "aria-labelledby": H,
1481
- "aria-readonly": T || void 0,
1482
- "aria-required": E || void 0,
1483
- tabIndex: ie ? -1 : 0,
1484
- ref: G,
1485
- onFocus(e) {
1486
- f(!0), N && k.current && S(!1, ne(x, e.nativeEvent)), ue.start(0, () => {
1487
- v.set("forceMount", !0);
1488
- });
1489
- },
1490
- onBlur(e) {
1491
- O(F, e.relatedTarget) || (u(!0), f(!1), p === "onBlur" && w.commit(P));
1492
- },
1493
- onPointerMove() {
1494
- M.current = !1;
1495
- },
1496
- onKeyDown() {
1497
- M.current = !0;
1498
- },
1499
- onMouseDown(e) {
1500
- if (N) return;
1501
- let t = j(e.currentTarget);
1502
- function n(e) {
1503
- if (!U.current) return;
1504
- let t = e.target;
1505
- if (O(U.current, t) || O(se.current, t) || t === U.current) return;
1506
- let n = mn(U.current);
1507
- e.clientX >= n.left - kn && e.clientX <= n.right + kn && e.clientY >= n.top - kn && e.clientY <= n.bottom + kn || S(!1, ne(ee, e));
1508
- }
1509
- K.start(0, () => {
1510
- t.addEventListener("mouseup", n, { once: !0 });
1511
- });
1512
- }
1513
- }, w.getValidationProps, l, ce);
1514
- q.role = "combobox";
1515
- let me = {
1516
- ...h,
1517
- open: N,
1518
- disabled: ie,
1519
- value: P,
1520
- readOnly: T,
1521
- placeholder: !R
1522
- };
1523
- return d("button", e, {
1524
- ref: [t, U],
1525
- state: me,
1526
- stateAttributesMapping: Mn,
1527
- props: q
1528
- });
1529
- });
1530
- process.env.NODE_ENV !== "production" && (Nn.displayName = "SelectTrigger");
1531
- //#endregion
1532
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/select/value/SelectValue.js
1533
- var Pn = { value: () => null }, Fn = /* @__PURE__ */ Z.forwardRef(function(e, t) {
1534
- let { className: n, render: r, children: i, placeholder: a, style: o, ...s } = e, { store: c, valueRef: l } = En(), u = J(c, $.value), f = J(c, $.items), p = J(c, $.itemToStringLabel), m = J(c, $.hasSelectedValue), h = !m && a != null && i == null, g = J(c, $.hasNullItemLabel, h), _ = {
1535
- value: u,
1536
- placeholder: !m
1537
- }, v = null;
1538
- return v = typeof i == "function" ? i(u) : i ?? (!m && a != null && !g ? a : Array.isArray(u) ? pn(u, f, p) : fn(u, f, p)), d("span", e, {
1539
- state: _,
1540
- ref: [t, l],
1541
- props: [{ children: v }, s],
1542
- stateAttributesMapping: Pn
1543
- });
1544
- });
1545
- process.env.NODE_ENV !== "production" && (Fn.displayName = "SelectValue");
1546
- //#endregion
1547
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/select/icon/SelectIcon.js
1548
- var In = /* @__PURE__ */ Z.forwardRef(function(e, t) {
1549
- let { className: n, render: r, style: i, ...a } = e, { store: o } = En();
1550
- return d("span", e, {
1551
- state: { open: J(o, $.open) },
1552
- ref: t,
1553
- props: [{
1554
- "aria-hidden": !0,
1555
- children: "▼"
1556
- }, a],
1557
- stateAttributesMapping: Ge
1558
- });
1559
- });
1560
- process.env.NODE_ENV !== "production" && (In.displayName = "SelectIcon");
1561
- //#endregion
1562
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/select/portal/SelectPortalContext.js
1563
- var Ln = /* @__PURE__ */ Z.createContext(void 0);
1564
- process.env.NODE_ENV !== "production" && (Ln.displayName = "SelectPortalContext");
1565
- //#endregion
1566
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/select/portal/SelectPortal.js
1567
- var Rn = /* @__PURE__ */ Z.forwardRef(function(e, t) {
1568
- let { store: n } = En(), r = J(n, $.mounted), i = J(n, $.forceMount);
1569
- return r || i ? /* @__PURE__ */ Q(Ln.Provider, {
1570
- value: !0,
1571
- children: /* @__PURE__ */ Q(fe, {
1572
- ref: t,
1573
- ...e
1574
- })
1575
- }) : null;
1576
- });
1577
- process.env.NODE_ENV !== "production" && (Rn.displayName = "SelectPortal");
1578
- //#endregion
1579
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/select/positioner/SelectPositionerContext.js
1580
- var zn = /* @__PURE__ */ Z.createContext(void 0);
1581
- process.env.NODE_ENV !== "production" && (zn.displayName = "SelectPositionerContext");
1582
- function Bn() {
1583
- let e = Z.useContext(zn);
1584
- if (!e) throw Error(process.env.NODE_ENV === "production" ? a(59) : "Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.");
1585
- return e;
1586
- }
1587
- //#endregion
1588
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/select/popup/utils.js
1589
- function Vn(e, t) {
1590
- e && Object.assign(e.style, t);
1591
- }
1592
- var Hn = {
1593
- position: "relative",
1594
- maxHeight: "100%",
1595
- overflowX: "hidden",
1596
- overflowY: "auto"
1597
- }, Un = { position: "fixed" }, Wn = /* @__PURE__ */ Z.forwardRef(function(e, t) {
1598
- let { anchor: n, positionMethod: r = "absolute", className: i, render: a, side: o = "bottom", align: s = "center", sideOffset: c = 0, alignOffset: l = 0, collisionBoundary: u = "clipping-ancestors", collisionPadding: d, arrowPadding: f = 5, sticky: h = !1, disableAnchorTracking: g, alignItemWithTrigger: _ = !0, collisionAvoidance: v = ot, style: y, ...b } = e, { store: S, listRef: C, labelsRef: w, alignItemWithTriggerActiveRef: T, selectedItemTextRef: E, valuesRef: ee, initialValueRef: D, popupRef: O, setValue: te } = En(), k = Dn(), A = J(S, $.open), j = J(S, $.mounted), re = J(S, $.modal), M = J(S, $.value), ie = J(S, $.openMethod), N = J(S, $.positionerElement), P = J(S, $.triggerElement), ae = J(S, $.isItemEqualToValue), F = J(S, $.transitionStatus), I = Z.useRef(null), oe = Z.useRef(null), [L, R] = Z.useState(_), z = j && L && ie !== "touch";
1599
- !j && L !== _ && R(_), p(() => {
1600
- j || ($.scrollUpArrowVisible(S.state) && S.set("scrollUpArrowVisible", !1), $.scrollDownArrowVisible(S.state) && S.set("scrollDownArrowVisible", !1));
1601
- }, [S, j]), Z.useImperativeHandle(T, () => z), gn((z || re) && A, ie === "touch", N, P);
1602
- let B = Ae({
1603
- anchor: n,
1604
- floatingRootContext: k,
1605
- positionMethod: r,
1606
- mounted: j,
1607
- side: o,
1608
- sideOffset: c,
1609
- align: s,
1610
- alignOffset: l,
1611
- arrowPadding: f,
1612
- collisionBoundary: u,
1613
- collisionPadding: d,
1614
- sticky: h,
1615
- disableAnchorTracking: g ?? z,
1616
- collisionAvoidance: v,
1617
- keepMounted: !0
1618
- }), V = z ? "none" : B.side, H = z ? Un : B.positionerStyles, se = $e(e, {
1619
- open: A,
1620
- side: V,
1621
- align: B.align,
1622
- anchorHidden: B.anchorHidden
1623
- }, {
1624
- styles: H,
1625
- transitionStatus: F,
1626
- props: b,
1627
- refs: [t, m((e) => {
1628
- S.set("positionerElement", e);
1629
- })],
1630
- hidden: !j,
1631
- inert: !A
1632
- }), U = Z.useRef(0), ce = m((e) => {
1633
- if (e.size === 0 && U.current === 0 || ee.current.length === 0) return;
1634
- let t = U.current;
1635
- if (U.current = e.size, e.size === t) return;
1636
- let n = ne(x);
1637
- if (t !== 0 && !S.state.multiple && M !== null && an(ee.current, M, ae) === -1) {
1638
- let e = D.current, t = e != null && an(ee.current, e, ae) !== -1 ? e : null;
1639
- te(t, n), t === null && (S.set("selectedIndex", null), E.current = null);
1640
- }
1641
- if (t !== 0 && S.state.multiple && Array.isArray(M)) {
1642
- let e = (e) => an(ee.current, e, ae) !== -1, t = M.filter((t) => e(t));
1643
- (t.length !== M.length || t.some((e) => !rn(M, e, ae))) && (te(t, n), t.length === 0 && (S.set("selectedIndex", null), E.current = null));
1644
- }
1645
- if (A && z) {
1646
- S.update({
1647
- scrollUpArrowVisible: !1,
1648
- scrollDownArrowVisible: !1
1649
- });
1650
- let e = { height: "" };
1651
- Vn(N, e), Vn(O.current, e);
1652
- }
1653
- }), le = Z.useMemo(() => ({
1654
- ...B,
1655
- side: V,
1656
- alignItemWithTriggerActive: z,
1657
- setControlledAlignItemWithTrigger: R,
1658
- scrollUpArrowRef: I,
1659
- scrollDownArrowRef: oe
1660
- }), [
1661
- B,
1662
- V,
1663
- z,
1664
- R
1665
- ]);
1666
- return /* @__PURE__ */ Q(Re, {
1667
- elementsRef: C,
1668
- labelsRef: w,
1669
- onMapChange: ce,
1670
- children: /* @__PURE__ */ lt(zn.Provider, {
1671
- value: le,
1672
- children: [j && re && /* @__PURE__ */ Q(en, {
1673
- inert: $t(!A),
1674
- cutout: P
1675
- }), se]
1676
- })
1677
- });
1678
- });
1679
- process.env.NODE_ENV !== "production" && (Wn.displayName = "SelectPositioner");
1680
- //#endregion
1681
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/select/popup/SelectPopup.js
1682
- var Gn = {
1683
- ...Pe,
1684
- ...We
1685
- }, Kn = /* @__PURE__ */ Z.forwardRef(function(e, t) {
1686
- let { render: n, className: r, style: i, finalFocus: a, ...o } = e, { store: s, popupRef: c, onOpenChangeComplete: l, setOpen: u, valueRef: f, selectedItemTextRef: h, keyboardActiveRef: g, multiple: _, handleScrollArrowVisibility: y, scrollHandlerRef: b, listRef: x, highlightItemOnHover: C } = En(), { side: w, align: T, alignItemWithTriggerActive: E, isPositioned: ee, setControlledAlignItemWithTrigger: D, scrollDownArrowRef: O, scrollUpArrowRef: te } = Bn(), k = vn(!0) != null, A = Dn(), re = Ke(), { nonce: M, disableStyleElements: ie } = qe(), N = J(s, $.id), P = J(s, $.open), ae = J(s, $.mounted), F = J(s, $.popupProps), I = J(s, $.transitionStatus), oe = J(s, $.triggerElement), L = J(s, $.positionerElement), R = J(s, $.listElement), z = Z.useRef(!1), B = Z.useRef(!1), V = Z.useRef({}), H = Fe(), se = m((e) => {
1687
- if (!L || !c.current || !B.current) return;
1688
- if (z.current || !E) {
1689
- y();
1690
- return;
1691
- }
1692
- let t = L.style.top === "0px", n = L.style.bottom === "0px";
1693
- if (!t && !n) {
1694
- y();
1695
- return;
1696
- }
1697
- let r = Yn(L), i = Xn(L.getBoundingClientRect().height, "y", r), a = j(L), o = getComputedStyle(L), s = parseFloat(o.marginTop), l = parseFloat(o.marginBottom), u = qn(getComputedStyle(c.current)), d = Math.min(a.documentElement.clientHeight - s - l, u), f = e.scrollTop, p = Jn(e), m = 0, h = null, g = !1, _ = !1, v = (e) => {
1698
- L.style.height = `${e}px`;
1699
- }, b = (t, n) => {
1700
- let r = et(t, 0, d - i);
1701
- r > 0 && v(i + r), e.scrollTop = n, d - (i + r) <= 1 && (z.current = !0), y();
1702
- }, x = t ? p - f : f, S = Math.min(i + x, d);
1703
- if (m = S, x <= 1) {
1704
- b(x, t ? p : 0);
1705
- return;
1706
- }
1707
- if (d - S > 1 ? t ? _ = !0 : h = 0 : (g = !0, n && f < p && (h = f - (x - (i + x - d)))), m = Math.ceil(m), m !== 0 && v(m), _ || h != null) {
1708
- let t = Jn(e), n = _ ? t : et(h, 0, t);
1709
- Math.abs(e.scrollTop - n) > 1 && (e.scrollTop = n);
1710
- }
1711
- (g || m >= d - 1) && (z.current = !0), y();
1712
- });
1713
- Z.useImperativeHandle(b, () => se, [se]), Ee({
1714
- open: P,
1715
- ref: c,
1716
- onComplete() {
1717
- P && l?.(!0);
1718
- }
1719
- });
1720
- let U = {
1721
- open: P,
1722
- transitionStatus: I,
1723
- side: w,
1724
- align: T
1725
- };
1726
- p(() => {
1727
- !L || !c.current || Object.keys(V.current).length || (V.current = {
1728
- top: L.style.top || "0",
1729
- left: L.style.left || "0",
1730
- right: L.style.right,
1731
- height: L.style.height,
1732
- bottom: L.style.bottom,
1733
- minHeight: L.style.minHeight,
1734
- maxHeight: L.style.maxHeight,
1735
- marginTop: L.style.marginTop,
1736
- marginBottom: L.style.marginBottom
1737
- });
1738
- }, [c, L]), p(() => {
1739
- P || E || (B.current = !1, z.current = !1, Vn(L, V.current));
1740
- }, [
1741
- P,
1742
- E,
1743
- L,
1744
- c
1745
- ]), p(() => {
1746
- let e = c.current;
1747
- if (!P || !oe || !L || !e || E && !ee || s.state.transitionStatus === "ending") return;
1748
- if (!E) {
1749
- B.current = !0, H.request(y), e.style.removeProperty("--transform-origin");
1750
- return;
1751
- }
1752
- let t = $n(e);
1753
- e.style.removeProperty("--transform-origin");
1754
- try {
1755
- let t = h.current, n = f.current, r = getComputedStyle(L), i = getComputedStyle(e), a = j(oe), o = v(L), c = Yn(oe), l = Zn(oe.getBoundingClientRect(), c), u = Zn(L.getBoundingClientRect(), c), d = l.height, p = R || e, m = p.scrollHeight, g = parseFloat(i.borderBottomWidth), _ = parseFloat(r.marginTop) || 10, b = parseFloat(r.marginBottom) || 10, S = parseFloat(r.minHeight) || 100, w = qn(i), T = a.documentElement.clientHeight - _ - b, E = a.documentElement.clientWidth, ee = T - l.bottom + d, O, te = re === "rtl" ? l.right - u.width : l.left, k = 0;
1756
- if (t && n) {
1757
- let e = Zn(n.getBoundingClientRect(), c);
1758
- O = Zn(t.getBoundingClientRect(), c), te = u.left + (re === "rtl" ? e.right - O.right : e.left - O.left);
1759
- let r = e.top - l.top + e.height / 2;
1760
- k = O.top - u.top + O.height / 2 - r;
1761
- }
1762
- let ne = ee + k + b + g, A = Math.min(T, ne), M = T - _ - b, ie = ne - A, N = E - 5;
1763
- L.style.left = `${et(te, 5, N - u.width)}px`, L.style.height = `${A}px`, L.style.maxHeight = "auto", L.style.marginTop = `${_}px`, L.style.marginBottom = `${b}px`, e.style.height = "100%";
1764
- let P = Jn(p), ae = ie >= P - 1;
1765
- ae && (A = Math.min(T, u.height) - (ie - P));
1766
- let F = l.top < 20 || l.bottom > T - 20 || Math.ceil(A) + 1 < Math.min(m, S), I = (o.visualViewport?.scale ?? 1) !== 1 && X;
1767
- if (F || I) {
1768
- B.current = !0, Vn(L, V.current), D(!1);
1769
- return;
1770
- }
1771
- let H = Math.max(S, A);
1772
- if (ae) {
1773
- let e = Math.max(0, T - ne);
1774
- L.style.top = u.height >= M ? "0" : `${e}px`, L.style.height = `${A}px`, p.scrollTop = Jn(p);
1775
- } else L.style.bottom = "0", p.scrollTop = ie;
1776
- if (O) {
1777
- let t = u.top, n = u.height, r = O.top + O.height / 2, i = et(n > 0 ? (r - t) / n * 100 : 50, 0, 100);
1778
- e.style.setProperty("--transform-origin", `50% ${i}%`);
1779
- }
1780
- (H === T || A >= w) && (z.current = !0), y(), C && s.state.selectedIndex === null && s.state.activeIndex === null && x.current[0] != null && s.set("activeIndex", 0), B.current = !0;
1781
- } finally {
1782
- t();
1783
- }
1784
- }, [
1785
- s,
1786
- P,
1787
- L,
1788
- oe,
1789
- f,
1790
- h,
1791
- c,
1792
- y,
1793
- E,
1794
- D,
1795
- H,
1796
- O,
1797
- te,
1798
- R,
1799
- x,
1800
- C,
1801
- re,
1802
- ee
1803
- ]), Z.useEffect(() => {
1804
- if (!E || !L || !P) return;
1805
- let e = v(L);
1806
- function t(e) {
1807
- u(!1, ne(S, e));
1808
- }
1809
- return q(e, "resize", t);
1810
- }, [
1811
- u,
1812
- E,
1813
- L,
1814
- P
1815
- ]);
1816
- let ce = {
1817
- ...R ? {
1818
- role: "presentation",
1819
- "aria-orientation": void 0
1820
- } : {
1821
- role: "listbox",
1822
- "aria-multiselectable": _ || void 0,
1823
- id: `${N}-list`
1824
- },
1825
- onKeyDown(e) {
1826
- g.current = !0, k && je.has(e.key) && e.stopPropagation();
1827
- },
1828
- onMouseMove() {
1829
- g.current = !1;
1830
- },
1831
- onScroll(e) {
1832
- R || se(e.currentTarget);
1833
- },
1834
- ...E && { style: R ? { height: "100%" } : Hn }
1835
- }, le = d("div", e, {
1836
- ref: [t, c],
1837
- state: U,
1838
- stateAttributesMapping: Gn,
1839
- props: [
1840
- F,
1841
- ce,
1842
- ze(I),
1843
- { className: !R && E ? xn.className : void 0 },
1844
- o
1845
- ]
1846
- });
1847
- return /* @__PURE__ */ lt(Z.Fragment, { children: [!ie && xn.getElement(M), /* @__PURE__ */ Q(Vt, {
1848
- context: A,
1849
- modal: !1,
1850
- disabled: !ae,
1851
- returnFocus: a,
1852
- restoreFocus: !0,
1853
- children: le
1854
- })] });
1855
- });
1856
- process.env.NODE_ENV !== "production" && (Kn.displayName = "SelectPopup");
1857
- function qn(e) {
1858
- let t = e.maxHeight || "";
1859
- return t.endsWith("px") && parseFloat(t) || Infinity;
1860
- }
1861
- function Jn(e) {
1862
- return Sn(e.scrollHeight, e.clientHeight);
1863
- }
1864
- function Yn(e) {
1865
- return L.getScale(e);
1866
- }
1867
- function Xn(e, t, n) {
1868
- return e / n[t];
1869
- }
1870
- function Zn(e, t) {
1871
- return z({
1872
- x: Xn(e.x, "x", t),
1873
- y: Xn(e.y, "y", t),
1874
- width: Xn(e.width, "x", t),
1875
- height: Xn(e.height, "y", t)
1876
- });
1877
- }
1878
- var Qn = [
1879
- ["transform", "none"],
1880
- ["scale", "1"],
1881
- ["translate", "0 0"]
1882
- ];
1883
- function $n(e) {
1884
- let { style: t } = e, n = {};
1885
- for (let [e, r] of Qn) n[e] = t.getPropertyValue(e), t.setProperty(e, r, "important");
1886
- return () => {
1887
- for (let [e] of Qn) {
1888
- let r = n[e];
1889
- r ? t.setProperty(e, r) : t.removeProperty(e);
1890
- }
1891
- };
1892
- }
1893
- //#endregion
1894
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/select/list/SelectList.js
1895
- var er = /* @__PURE__ */ Z.forwardRef(function(e, t) {
1896
- let { className: n, render: r, style: i, ...a } = e, { store: o, scrollHandlerRef: s } = En(), { alignItemWithTriggerActive: c } = Bn(), l = J(o, $.hasScrollArrows), u = J(o, $.openMethod), f = J(o, $.multiple), p = {
1897
- id: `${J(o, $.id)}-list`,
1898
- role: "listbox",
1899
- "aria-multiselectable": f || void 0,
1900
- onScroll(e) {
1901
- s.current?.(e.currentTarget);
1902
- },
1903
- ...c && { style: Hn },
1904
- className: l && u !== "touch" ? xn.className : void 0
1905
- };
1906
- return d("div", e, {
1907
- ref: [t, m((e) => {
1908
- o.set("listElement", e);
1909
- })],
1910
- props: [p, a]
1911
- });
1912
- });
1913
- process.env.NODE_ENV !== "production" && (er.displayName = "SelectList");
1914
- //#endregion
1915
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/select/scroll-arrow/SelectScrollArrow.js
1916
- var tr = /* @__PURE__ */ Z.forwardRef(function(e, t) {
1917
- let { render: n, className: r, style: i, direction: a, keepMounted: o = !1, ...s } = e, c = a === "up", { store: l, popupRef: u, listRef: f, handleScrollArrowVisibility: m, scrollArrowsMountedCountRef: h } = En(), { side: g, scrollDownArrowRef: _, scrollUpArrowRef: v } = Bn(), y = J(l, c ? $.scrollUpArrowVisible : $.scrollDownArrowVisible), b = J(l, $.openMethod), x = y && b !== "touch", S = Te(), C = c ? v : _, { transitionStatus: w, setMounted: T } = Ye(x);
1918
- p(() => (h.current += 1, l.state.hasScrollArrows || l.set("hasScrollArrows", !0), () => {
1919
- h.current = Math.max(0, h.current - 1), h.current === 0 && l.state.hasScrollArrows && l.set("hasScrollArrows", !1);
1920
- }), [l, h]), Ee({
1921
- open: x,
1922
- ref: C,
1923
- onComplete() {
1924
- x || T(!1);
1925
- }
1926
- });
1927
- let E = d("div", e, {
1928
- ref: [t, C],
1929
- state: {
1930
- direction: a,
1931
- visible: x,
1932
- side: g,
1933
- transitionStatus: w
1934
- },
1935
- props: [{
1936
- "aria-hidden": !0,
1937
- children: c ? "▲" : "▼",
1938
- style: { position: "absolute" },
1939
- onMouseMove(e) {
1940
- if (e.movementX === 0 && e.movementY === 0 || S.isStarted()) return;
1941
- l.set("activeIndex", null);
1942
- function t() {
1943
- let e = l.state.listElement ?? u.current;
1944
- if (!e) return;
1945
- l.set("activeIndex", null), m();
1946
- let n = Sn(e.scrollHeight, e.clientHeight), r = Cn(e.scrollTop, n), i = r === (c ? 0 : n), a = f.current;
1947
- if (r !== e.scrollTop && (e.scrollTop = r), a.length === 0 && l.set(c ? "scrollUpArrowVisible" : "scrollDownArrowVisible", !i), i) {
1948
- S.clear();
1949
- return;
1950
- }
1951
- if (a.length > 0) {
1952
- let t = C.current?.offsetHeight || 0;
1953
- e.scrollTop = nr(a, c, r, e.clientHeight, t, n);
1954
- }
1955
- S.start(40, t);
1956
- }
1957
- S.start(40, t);
1958
- },
1959
- onMouseLeave() {
1960
- S.clear();
1961
- }
1962
- }, s]
1963
- });
1964
- return x || o ? E : null;
1965
- });
1966
- process.env.NODE_ENV !== "production" && (tr.displayName = "SelectScrollArrow");
1967
- function nr(e, t, n, r, i, a) {
1968
- if (t) {
1969
- let t = 0, r = n + i - 1;
1970
- for (let n = 0; n < e.length; n += 1) {
1971
- let i = e[n];
1972
- if (i && i.offsetTop >= r) {
1973
- t = n;
1974
- break;
1975
- }
1976
- }
1977
- let o = Math.max(0, t - 1), s = e[o];
1978
- return o < t && s ? Cn(s.offsetTop - i, a) : 0;
1979
- }
1980
- let o = e.length - 1, s = n + r - i + 1;
1981
- for (let t = 0; t < e.length; t += 1) {
1982
- let n = e[t];
1983
- if (n && n.offsetTop + n.offsetHeight > s) {
1984
- o = Math.max(0, t - 1);
1985
- break;
1986
- }
1987
- }
1988
- let c = Math.min(e.length - 1, o + 1), l = e[c];
1989
- return c > o && l ? Cn(l.offsetTop + l.offsetHeight - r + i, a) : a;
1990
- }
1991
- //#endregion
1992
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/select/scroll-down-arrow/SelectScrollDownArrow.js
1993
- var rr = /* @__PURE__ */ Z.forwardRef(function(e, t) {
1994
- return /* @__PURE__ */ Q(tr, {
1995
- ...e,
1996
- ref: t,
1997
- direction: "down"
1998
- });
1999
- });
2000
- process.env.NODE_ENV !== "production" && (rr.displayName = "SelectScrollDownArrow");
2001
- //#endregion
2002
- //#region node_modules/.pnpm/@base-ui+react@1.4.1_@types+react@19.2.14_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@base-ui/react/esm/select/scroll-up-arrow/SelectScrollUpArrow.js
2003
- var ir = /* @__PURE__ */ Z.forwardRef(function(e, t) {
2004
- return /* @__PURE__ */ Q(tr, {
2005
- ...e,
2006
- ref: t,
2007
- direction: "up"
2008
- });
2009
- });
2010
- process.env.NODE_ENV !== "production" && (ir.displayName = "SelectScrollUpArrow");
2011
- //#endregion
2012
- //#region node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@phosphor-icons/react/dist/defs/CaretDown.es.js
2013
- var ar = /* @__PURE__ */ new Map([
2014
- ["bold", /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement("path", { d: "M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z" }))],
2015
- ["duotone", /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement("path", {
2016
- d: "M208,96l-80,80L48,96Z",
2017
- opacity: "0.2"
2018
- }), /* @__PURE__ */ Z.createElement("path", { d: "M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z" }))],
2019
- ["fill", /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement("path", { d: "M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z" }))],
2020
- ["light", /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement("path", { d: "M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z" }))],
2021
- ["regular", /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement("path", { d: "M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z" }))],
2022
- ["thin", /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement("path", { d: "M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z" }))]
2023
- ]), or = /* @__PURE__ */ new Map([
2024
- ["bold", /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement("path", { d: "M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z" }))],
2025
- ["duotone", /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement("path", {
2026
- d: "M208,160H48l80-80Z",
2027
- opacity: "0.2"
2028
- }), /* @__PURE__ */ Z.createElement("path", { d: "M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z" }))],
2029
- ["fill", /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement("path", { d: "M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z" }))],
2030
- ["light", /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement("path", { d: "M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z" }))],
2031
- ["regular", /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement("path", { d: "M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z" }))],
2032
- ["thin", /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement("path", { d: "M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z" }))]
2033
- ]), sr = /* @__PURE__ */ new Map([
2034
- ["bold", /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement("path", { d: "M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z" }))],
2035
- ["duotone", /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement("path", {
2036
- d: "M80,176h96l-48,48ZM128,32,80,80h96Z",
2037
- opacity: "0.2"
2038
- }), /* @__PURE__ */ Z.createElement("path", { d: "M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z" }))],
2039
- ["fill", /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement("path", { d: "M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z" }))],
2040
- ["light", /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement("path", { d: "M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z" }))],
2041
- ["regular", /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement("path", { d: "M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z" }))],
2042
- ["thin", /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement("path", { d: "M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z" }))]
2043
- ]), cr = Z.forwardRef((e, t) => /* @__PURE__ */ Z.createElement(g, {
2044
- ref: t,
2045
- ...e,
2046
- weights: ar
2047
- }));
2048
- cr.displayName = "CaretDownIcon";
2049
- //#endregion
2050
- //#region node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@phosphor-icons/react/dist/csr/CaretUp.es.js
2051
- var lr = Z.forwardRef((e, t) => /* @__PURE__ */ Z.createElement(g, {
2052
- ref: t,
2053
- ...e,
2054
- weights: or
2055
- }));
2056
- lr.displayName = "CaretUpIcon";
2057
- //#endregion
2058
- //#region node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@phosphor-icons/react/dist/csr/CaretUpDown.es.js
2059
- var ur = Z.forwardRef((e, t) => /* @__PURE__ */ Z.createElement(g, {
2060
- ref: t,
2061
- ...e,
2062
- weights: sr
2063
- }));
2064
- ur.displayName = "CaretUpDownIcon";
2065
- //#endregion
2066
- //#region src/components/select/select.tsx
2067
- var dr = ({ children: e, ...t }) => /* @__PURE__ */ Q(On, {
2068
- ...t,
2069
- children: e
2070
- }), fr = ({ className: e, children: t, ref: n, ...r }) => /* @__PURE__ */ Q(er, {
2071
- className: ct("relative max-h-(--available-height) scroll-py-md space-y-xs overflow-y-auto", e),
2072
- ref: n,
2073
- ...r,
2074
- children: t
2075
- }), pr = ({ className: e, children: t, ref: n, ...r }) => /* @__PURE__ */ Q(In, {
2076
- className: ct("flex text-on-surface-variant [&>svg]:size-sm", e),
2077
- ref: n,
2078
- ...r,
2079
- children: t
2080
- }), mr = ({ className: e, children: t, ref: n, ...r }) => /* @__PURE__ */ Q(Rn, { children: /* @__PURE__ */ Q(Wn, {
2081
- className: ct("z-10 outline-none select-none", e),
2082
- ref: n,
2083
- ...r,
2084
- children: /* @__PURE__ */ lt(Kn, {
2085
- className: "group min-w-(--anchor-width) origin-(--transform-origin) rounded-xl bg-surface-2 bg-clip-padding p-2xs shadow-md transition-[transform,scale,opacity] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0 data-[side=none]:data-ending-style:scale-90 data-[side=none]:data-ending-style:opacity-0 data-[side=none]:data-starting-style:scale-90 data-[side=none]:data-starting-style:opacity-0",
2086
- children: [
2087
- /* @__PURE__ */ Q(ir, {
2088
- className: "top-0 right-0 z-[1px] flex h-md w-full cursor-default items-center justify-center rounded-xl bg-surface-2 before:absolute before:left-0 before:h-full before:w-full before:content-[''] data-[side=none]:before:-top-full",
2089
- children: /* @__PURE__ */ Q(lr, {
2090
- className: "size-sm",
2091
- weight: "fill"
2092
- })
2093
- }),
2094
- t,
2095
- /* @__PURE__ */ Q(rr, {
2096
- className: "right-0 bottom-0 z-[1px] flex h-md w-full cursor-default items-center justify-center rounded-xl bg-surface-2 before:absolute before:left-0 before:h-full before:w-full before:content-[''] data-[side=none]:before:-bottom-full",
2097
- children: /* @__PURE__ */ Q(cr, {
2098
- className: "size-sm",
2099
- weight: "fill"
2100
- })
2101
- })
2102
- ]
2103
- })
2104
- }) }), hr = h("flex min-w-[calc(var(--dawn-spacing-3xl)+8rem)] items-center justify-between outline outline-transparent transition-all hover:cursor-pointer aria-invalid:bg-error-container aria-invalid:text-error-on-container aria-invalid:outline-error-border data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50", {
2105
- variants: {
2106
- variant: {
2107
- primary: "bg-surface shadow-2xs hover:outline-border-strong",
2108
- secondary: "bg-neutral-container hover:outline-border-strong",
2109
- ghost: "bg-transparent hover:bg-neutral-container"
2110
- },
2111
- size: {
2112
- small: "h-lg rounded-lg px-xs style-text-default--1 [&_[data-value]]:gap-3xs [&>svg]:size-xs",
2113
- medium: "h-xl rounded-xl px-sm style-text-default-0 [&_[data-value]]:gap-2xs [&>svg]:size-sm",
2114
- large: "h-2xl rounded-2xl px-md style-text-default-1 [&_[data-value]]:gap-xs [&>svg]:size-md"
2115
- }
2116
- },
2117
- defaultVariants: {
2118
- variant: "primary",
2119
- size: "medium"
2120
- }
2121
- }), gr = ({ variant: e, size: t, className: n, children: r, ref: i, ...a }) => /* @__PURE__ */ Q(Nn, {
2122
- className: ct(hr({
2123
- variant: e,
2124
- size: t,
2125
- className: n
2126
- })),
2127
- ref: i,
2128
- ...a,
2129
- children: r
2130
- }), _r = ({ className: e, children: t, ref: n, ...r }) => /* @__PURE__ */ Q(Fn, {
2131
- "data-value": !0,
2132
- className: ct("flex items-center justify-start data-placeholder:opacity-70", e),
2133
- ref: n,
2134
- ...r,
2135
- children: t
2136
- }), vr = /* @__PURE__ */ e({ FieldSelect: () => yr }), yr = ({ children: e, ...t }) => {
2137
- let n = _();
2138
- return /* @__PURE__ */ lt(dr, {
2139
- defaultValue: n.state.value,
2140
- value: n.state.value,
2141
- onValueChange: (e) => n.setValue(e),
2142
- ...t,
2143
- children: [/* @__PURE__ */ lt(gr, { children: [/* @__PURE__ */ Q(_r, {}), /* @__PURE__ */ Q(pr, { children: /* @__PURE__ */ Q(ur, { weight: "bold" }) })] }), /* @__PURE__ */ Q(mr, { children: /* @__PURE__ */ Q(fr, { children: e }) })]
2144
- });
2145
- };
2146
- //#endregion
2147
- export { rn as A, un as C, tn as D, nn as E, Yt as F, Ht as I, Vt as L, $t as M, Qt as N, an as O, Xt as P, vt as R, fn as S, sn as T, gn as _, mr as a, cn as b, dr as c, $ as d, En as f, vn as g, yn as h, gr as i, en as j, on as k, ur as l, xn as m, vr as n, pr as o, Cn as p, _r as r, fr as s, yr as t, cr as u, mn as v, dn as w, pn as x, ln as y };