@oomol-lab/open-flow 0.1.0-alpha.9 → 0.1.0-beta.2
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.
- package/README.md +5 -1
- package/dist/browser/createResourceDialog-BkZns-oZ.js +504 -0
- package/dist/browser/diagnostics-giPSzyMo.js +9346 -0
- package/dist/browser/{dist-DhsGR_K3.js → dist-3Mj8q8Pr.js} +27 -27
- package/dist/browser/{dist-n9WmBm5w.js → dist-BKuSVKCC.js} +1 -1
- package/dist/browser/{dist-DQVavPcf.js → dist-BMqL-qR5.js} +469 -903
- package/dist/browser/{dist-D5mdziGP.js → dist-BN4ZCyOB.js} +9 -9
- package/dist/browser/{dist-CVtP-E2c.js → dist-BpopSHwP.js} +1 -1
- package/dist/browser/{dist-B0Q2Mn0n.js → dist-CJpzJrLM.js} +191 -191
- package/dist/browser/{dist-DXgEYMFx.js → dist-CPuF50D9.js} +196 -196
- package/dist/browser/{dist-CUkceEvN.js → dist-CUSrALSX.js} +113 -113
- package/dist/browser/dist-CeSZ2xSM.js +444 -0
- package/dist/browser/{dist-Bc9TvHYl.js → dist-DUzA0Ukh.js} +20 -20
- package/dist/browser/{dist-DWzdGVm9.js → dist-DWADUsVB.js} +74 -74
- package/dist/browser/{esm-YIGXG-Js.js → esm-B_PbUobB.js} +13 -13
- package/dist/browser/flow-authoring-node.d.ts +4 -2
- package/dist/browser/flow-authoring.d.ts +2 -1
- package/dist/browser/flow-authoring.js +400 -100
- package/dist/browser/flow-change.d.ts +9 -4
- package/dist/browser/flow-change.js +49 -46
- package/dist/browser/{flowRunInputEditorStore-DXOyyY7o.js → flowRunInputEditorStore-BeyUSWpO.js} +1644 -908
- package/dist/browser/{flowWorkspace-D7-rBA1-.js → flowWorkspace-DAMLVMcF.js} +18416 -16444
- package/dist/browser/getPseudoElementBounds-ESJExRFX.js +7642 -0
- package/dist/browser/languages-DgJehE1g.js +62 -0
- package/dist/browser/lib-C5Ipyfps.js +7856 -0
- package/dist/browser/licenses.md +119 -1
- package/dist/browser/main-DmjVyuWr.js +76 -0
- package/dist/browser/{markdownContent-ColGUxHy.js → markdownContent-DdlIRN3_.js} +4811 -4795
- package/dist/browser/theme.css +63 -0
- package/dist/browser/theme.css.d.ts +1 -0
- package/dist/browser/typeScriptSession-mPCiA9sV.js +2579 -0
- package/dist/browser/workbench-contract.d.ts +2 -1
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.d.ts +46 -1
- package/dist/browser/workbench.js +1132 -1474
- package/dist/browser/workbenchSelect-B2s1HV-Y.js +1374 -0
- package/dist/common/connector-action.d.ts +6 -0
- package/dist/common/connector-action.js +37 -29
- package/dist/common/control-api-conformance.js +80 -29
- package/dist/common/control-api-errors.d.ts +24 -0
- package/dist/common/control-api.d.ts +54 -7
- package/dist/common/control-api.js +226 -95
- package/dist/common/flow-encoding.d.ts +2 -2
- package/dist/common/flow-encoding.js +4 -1
- package/dist/common/flow-semantics.d.ts +3 -0
- package/dist/common/flow-semantics.js +939 -851
- package/dist/common/integration-trigger.d.ts +1 -0
- package/dist/common/licenses.md +1 -25
- package/dist/common/localization.d.ts +21 -0
- package/dist/common/localization.js +62 -0
- package/dist/common/provider-triggers.js +4 -1
- package/dist/common/scheduler.d.ts +5 -5
- package/dist/common/scheduler.js +250 -236
- package/package.json +10 -1
- package/dist/browser/addNodeOptions-DRndy4EK.js +0 -6910
- package/dist/browser/createLucideIcon-CqjqCezK.js +0 -5537
- package/dist/browser/createResourceDialog-A64dDFCG.js +0 -467
- package/dist/browser/field-CKGQHCIi.js +0 -312
|
@@ -0,0 +1,1374 @@
|
|
|
1
|
+
import { $ as e, $t as t, A as n, Bn as r, Cn as i, Dn as a, Dt as o, Et as s, Ft as c, G as l, Gn as u, I as d, K as f, Kt as p, Ln as m, Lt as h, N as ee, Nn as g, Nt as _, P as v, Pt as y, Qt as b, Rn as x, Rt as S, St as te, Tt as C, Un as w, Wn as T, Wt as E, Z as D, _r as O, _t as ne, a as k, an as A, ar as j, br as M, bt as N, c as re, cn as P, cr as ie, en as F, er as I, et as ae, f as oe, fr as L, ft as se, gt as ce, i as R, ir as z, j as B, l as V, lr as H, lt as le, m as ue, mr as U, n as de, nn as fe, nt as W, on as pe, p as G, pr as me, r as he, rr as K, s as ge, t as q, tn as _e, tt as ve, u as ye, vr as be, vt as xe, x as J, xt as Se, zn as Ce } from "./getPseudoElementBounds-ESJExRFX.js";
|
|
2
|
+
import * as Y from "react";
|
|
3
|
+
import { jsx as X, jsxs as we } from "react/jsx-runtime";
|
|
4
|
+
//#region ../../node_modules/.bun/lucide-react@0.468.0+f4eacebf2041cd4f/node_modules/lucide-react/dist/esm/icons/chevron-up.js
|
|
5
|
+
var Te = c("ChevronUp", [["path", {
|
|
6
|
+
d: "m18 15-6-6-6 6",
|
|
7
|
+
key: "153udz"
|
|
8
|
+
}]]);
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region ../../node_modules/.bun/@base-ui+utils@0.2.8+b87d06724be9db7a/node_modules/@base-ui/utils/esm/usePreviousValue.js
|
|
11
|
+
function Ee(e) {
|
|
12
|
+
let [t, n] = Y.useState({
|
|
13
|
+
current: e,
|
|
14
|
+
previous: null
|
|
15
|
+
});
|
|
16
|
+
return e !== t.current && n({
|
|
17
|
+
current: e,
|
|
18
|
+
previous: t.current
|
|
19
|
+
}), t.previous;
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/root/SelectRootContext.js
|
|
23
|
+
var De = /*#__PURE__*/ Y.createContext(null);
|
|
24
|
+
process.env.NODE_ENV !== "production" && (De.displayName = "SelectRootContext");
|
|
25
|
+
var Oe = /*#__PURE__*/ Y.createContext(null);
|
|
26
|
+
process.env.NODE_ENV !== "production" && (Oe.displayName = "SelectFloatingContext");
|
|
27
|
+
function Z() {
|
|
28
|
+
let e = Y.useContext(De);
|
|
29
|
+
if (e === null) throw Error(process.env.NODE_ENV === "production" ? L(60) : "Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.");
|
|
30
|
+
return e;
|
|
31
|
+
}
|
|
32
|
+
function ke() {
|
|
33
|
+
let e = Y.useContext(Oe);
|
|
34
|
+
if (e === null) throw Error(process.env.NODE_ENV === "production" ? L(61) : "Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.");
|
|
35
|
+
return e;
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/internals/itemEquality.js
|
|
39
|
+
var Ae = (e, t) => Object.is(e, t);
|
|
40
|
+
function je(e, t, n) {
|
|
41
|
+
return e == null || t == null ? Object.is(e, t) : n(e, t);
|
|
42
|
+
}
|
|
43
|
+
function Me(e, t, n) {
|
|
44
|
+
return !e || e.length === 0 ? !1 : e.some((e) => e !== void 0 && je(t, e, n));
|
|
45
|
+
}
|
|
46
|
+
function Ne(e, t, n) {
|
|
47
|
+
return !e || e.length === 0 ? -1 : e.findIndex((e) => e !== void 0 && je(e, t, n));
|
|
48
|
+
}
|
|
49
|
+
function Pe(e, t, n) {
|
|
50
|
+
return e.filter((e) => !je(t, e, n));
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/internals/serializeValue.js
|
|
54
|
+
function Fe(e) {
|
|
55
|
+
if (e == null) return "";
|
|
56
|
+
if (typeof e == "string") return e;
|
|
57
|
+
try {
|
|
58
|
+
return JSON.stringify(e);
|
|
59
|
+
} catch {
|
|
60
|
+
return String(e);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/internals/resolveValueLabel.js
|
|
65
|
+
function Ie(e) {
|
|
66
|
+
return e != null && e.length > 0 && typeof e[0] == "object" && e[0] != null && "items" in e[0];
|
|
67
|
+
}
|
|
68
|
+
function Le(e) {
|
|
69
|
+
if (!Array.isArray(e)) return e != null && "null" in e;
|
|
70
|
+
let t = e;
|
|
71
|
+
if (Ie(t)) {
|
|
72
|
+
for (let e of t) for (let t of e.items) if (t && t.value == null && t.label != null) return !0;
|
|
73
|
+
return !1;
|
|
74
|
+
}
|
|
75
|
+
for (let e of t) if (e && e.value == null && e.label != null) return !0;
|
|
76
|
+
return !1;
|
|
77
|
+
}
|
|
78
|
+
function Re(e, t) {
|
|
79
|
+
if (t && e != null) return t(e) ?? "";
|
|
80
|
+
if (e && typeof e == "object") {
|
|
81
|
+
if ("label" in e && e.label != null) return String(e.label);
|
|
82
|
+
if ("value" in e) return String(e.value);
|
|
83
|
+
}
|
|
84
|
+
return Fe(e);
|
|
85
|
+
}
|
|
86
|
+
function ze(e, t) {
|
|
87
|
+
return t && e != null ? t(e) ?? "" : e && typeof e == "object" && "value" in e && "label" in e ? Fe(e.value) : Fe(e);
|
|
88
|
+
}
|
|
89
|
+
function Be(e, t, n) {
|
|
90
|
+
function r() {
|
|
91
|
+
return Re(e, n);
|
|
92
|
+
}
|
|
93
|
+
if (n && e != null) return n(e);
|
|
94
|
+
if (e && typeof e == "object" && "label" in e && e.label != null) return e.label;
|
|
95
|
+
if (t && !Array.isArray(t)) return t[e] ?? r();
|
|
96
|
+
if (Array.isArray(t)) {
|
|
97
|
+
let n = t, i = Ie(n) ? n.flatMap((e) => e.items) : n;
|
|
98
|
+
if (typeof e != "object" || !e) {
|
|
99
|
+
let t = i.find((t) => t.value === e);
|
|
100
|
+
return t && t.label != null ? t.label : r();
|
|
101
|
+
}
|
|
102
|
+
if ("value" in e) {
|
|
103
|
+
let t = i.find((t) => t && t.value === e.value);
|
|
104
|
+
if (t && t.label != null) return t.label;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return r();
|
|
108
|
+
}
|
|
109
|
+
function Ve(e, t, n) {
|
|
110
|
+
return e.reduce((e, r, i) => (i > 0 && e.push(", "), e.push(/*#__PURE__*/ X(Y.Fragment, { children: Be(r, t, n) }, i)), e), []);
|
|
111
|
+
}
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/store.js
|
|
114
|
+
var Q = {
|
|
115
|
+
id: D((e) => e.id),
|
|
116
|
+
labelId: D((e) => e.labelId),
|
|
117
|
+
modal: D((e) => e.modal),
|
|
118
|
+
multiple: D((e) => e.multiple),
|
|
119
|
+
items: D((e) => e.items),
|
|
120
|
+
itemToStringLabel: D((e) => e.itemToStringLabel),
|
|
121
|
+
itemToStringValue: D((e) => e.itemToStringValue),
|
|
122
|
+
isItemEqualToValue: D((e) => e.isItemEqualToValue),
|
|
123
|
+
value: D((e) => e.value),
|
|
124
|
+
hasSelectedValue: D((e) => {
|
|
125
|
+
let { value: t, multiple: n, itemToStringValue: r } = e;
|
|
126
|
+
return t == null ? !1 : n && Array.isArray(t) ? t.length > 0 : ze(t, r) !== "";
|
|
127
|
+
}),
|
|
128
|
+
hasNullItemLabel: D((e, t) => t ? Le(e.items) : !1),
|
|
129
|
+
open: D((e) => e.open),
|
|
130
|
+
mounted: D((e) => e.mounted),
|
|
131
|
+
forceMount: D((e) => e.forceMount),
|
|
132
|
+
transitionStatus: D((e) => e.transitionStatus),
|
|
133
|
+
openMethod: D((e) => e.openMethod),
|
|
134
|
+
activeIndex: D((e) => e.activeIndex),
|
|
135
|
+
selectedIndex: D((e) => e.selectedIndex),
|
|
136
|
+
isActive: D((e, t) => e.activeIndex === t),
|
|
137
|
+
isSelected: D((e, t, n) => {
|
|
138
|
+
let r = e.isItemEqualToValue, i = e.value;
|
|
139
|
+
return e.multiple ? Array.isArray(i) && i.some((e) => je(n, e, r)) : e.selectedIndex === t && e.selectedIndex !== null || je(n, i, r);
|
|
140
|
+
}),
|
|
141
|
+
isSelectedByFocus: D((e, t) => e.selectedIndex === t),
|
|
142
|
+
popupProps: D((e) => e.popupProps),
|
|
143
|
+
triggerProps: D((e) => e.triggerProps),
|
|
144
|
+
triggerElement: D((e) => e.triggerElement),
|
|
145
|
+
positionerElement: D((e) => e.positionerElement),
|
|
146
|
+
listElement: D((e) => e.listElement),
|
|
147
|
+
scrollUpArrowVisible: D((e) => e.scrollUpArrowVisible),
|
|
148
|
+
scrollDownArrowVisible: D((e) => e.scrollDownArrowVisible),
|
|
149
|
+
hasScrollArrows: D((e) => e.hasScrollArrows)
|
|
150
|
+
};
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/internals/clamp.js
|
|
153
|
+
function He(e, t = -(2 ** 53 - 1), n = 2 ** 53 - 1) {
|
|
154
|
+
return Math.max(t, Math.min(e, n));
|
|
155
|
+
}
|
|
156
|
+
function Ue(e, t) {
|
|
157
|
+
return Math.max(0, e - t);
|
|
158
|
+
}
|
|
159
|
+
function We(e, t) {
|
|
160
|
+
if (t <= 0) return 0;
|
|
161
|
+
let n = He(e, 0, t), r = n, i = t - n, a = r <= 1, o = i <= 1;
|
|
162
|
+
return a && o ? r <= i ? 0 : t : a ? 0 : o ? t : n;
|
|
163
|
+
}
|
|
164
|
+
//#endregion
|
|
165
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/root/SelectRoot.js
|
|
166
|
+
function Ge(e) {
|
|
167
|
+
let { id: n, value: r, defaultValue: i = null, onValueChange: a, open: o, defaultOpen: s = !1, onOpenChange: c, name: u, form: m, autoComplete: g, disabled: _ = !1, readOnly: y = !1, required: b = !1, modal: x = !0, actionsRef: S, inputRef: te, onOpenChangeComplete: C, items: E, multiple: D = !1, itemToStringLabel: k, itemToStringValue: A, isItemEqualToValue: M = Ae, highlightItemOnHover: N = !0, children: re } = e, { clearErrors: P } = w(), { setDirty: I, setTouched: oe, setFocused: L, shouldValidateOnChange: se, validityData: V, setFilled: H, name: le, disabled: ue, validation: W, validationMode: pe } = T(), G = Ce({ id: n }), K = ue || _, ge = le ?? u, [q, ye] = F({
|
|
168
|
+
controlled: r,
|
|
169
|
+
default: D ? i ?? z : i,
|
|
170
|
+
name: "Select",
|
|
171
|
+
state: "value"
|
|
172
|
+
}), [J, Se] = F({
|
|
173
|
+
controlled: o,
|
|
174
|
+
default: s,
|
|
175
|
+
name: "Select",
|
|
176
|
+
state: "open"
|
|
177
|
+
}), Te = Y.useRef([]), Z = Y.useRef([]), ke = Y.useRef(null), je = Y.useRef(null), Me = Y.useRef(0), Pe = Y.useRef(null), Fe = Y.useRef([]), Ie = Y.useRef(!1), Le = Y.useRef(!1), Be = Y.useRef(null), Ve = Y.useRef({
|
|
178
|
+
allowSelectedMouseUp: !1,
|
|
179
|
+
allowUnselectedMouseUp: !1
|
|
180
|
+
}), He = Y.useRef(!1), { mounted: Ge, setMounted: Ke, transitionStatus: qe } = _e(J), { openMethod: Je, triggerProps: Ye } = de(J), $ = be(() => new l({
|
|
181
|
+
id: G,
|
|
182
|
+
labelId: void 0,
|
|
183
|
+
modal: x,
|
|
184
|
+
multiple: D,
|
|
185
|
+
itemToStringLabel: k,
|
|
186
|
+
itemToStringValue: A,
|
|
187
|
+
isItemEqualToValue: M,
|
|
188
|
+
value: q,
|
|
189
|
+
open: J,
|
|
190
|
+
mounted: Ge,
|
|
191
|
+
transitionStatus: qe,
|
|
192
|
+
items: E,
|
|
193
|
+
forceMount: !1,
|
|
194
|
+
openMethod: null,
|
|
195
|
+
activeIndex: null,
|
|
196
|
+
selectedIndex: null,
|
|
197
|
+
popupProps: {},
|
|
198
|
+
triggerProps: {},
|
|
199
|
+
triggerElement: null,
|
|
200
|
+
positionerElement: null,
|
|
201
|
+
listElement: null,
|
|
202
|
+
scrollUpArrowVisible: !1,
|
|
203
|
+
scrollDownArrowVisible: !1,
|
|
204
|
+
hasScrollArrows: !1
|
|
205
|
+
})).current, Xe = f($, Q.activeIndex), Ze = f($, Q.selectedIndex), Qe = f($, Q.triggerElement), $e = f($, Q.positionerElement), et = Ee(Je), tt = Je ?? et, nt = Y.useMemo(() => D && Array.isArray(q) && q.length === 0 ? "" : ze(q, A), [
|
|
206
|
+
D,
|
|
207
|
+
q,
|
|
208
|
+
A
|
|
209
|
+
]), rt = Y.useMemo(() => D && Array.isArray(q) ? q.map((e) => ze(e, A)) : ze(q, A), [
|
|
210
|
+
D,
|
|
211
|
+
q,
|
|
212
|
+
A
|
|
213
|
+
]), it = xe($.state.triggerElement), at = O(() => rt);
|
|
214
|
+
t(it, {
|
|
215
|
+
id: G,
|
|
216
|
+
value: q,
|
|
217
|
+
getValue: at
|
|
218
|
+
});
|
|
219
|
+
let ot = Y.useRef(q);
|
|
220
|
+
U(() => {
|
|
221
|
+
q !== ot.current && $.set("forceMount", !0);
|
|
222
|
+
}, [$, q]), U(() => {
|
|
223
|
+
H(D ? Array.isArray(q) && q.length > 0 : q != null);
|
|
224
|
+
}, [
|
|
225
|
+
D,
|
|
226
|
+
q,
|
|
227
|
+
H
|
|
228
|
+
]), U(function() {
|
|
229
|
+
if (J) return;
|
|
230
|
+
let e = Fe.current;
|
|
231
|
+
if (D) {
|
|
232
|
+
let t = Array.isArray(q) ? q : [];
|
|
233
|
+
if (t.length === 0) {
|
|
234
|
+
$.set("selectedIndex", null);
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
let n = t[t.length - 1], r = Ne(e, n, M);
|
|
238
|
+
$.set("selectedIndex", r === -1 ? null : r);
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
let t = Ne(e, q, M);
|
|
242
|
+
$.set("selectedIndex", t === -1 ? null : t);
|
|
243
|
+
}, [
|
|
244
|
+
D,
|
|
245
|
+
J,
|
|
246
|
+
q,
|
|
247
|
+
Fe,
|
|
248
|
+
M,
|
|
249
|
+
$
|
|
250
|
+
]), he(q, () => {
|
|
251
|
+
P(ge), I(q !== V.initialValue), se() ? W.commit(q) : W.commit(q, !0);
|
|
252
|
+
});
|
|
253
|
+
let st = O((e, t) => {
|
|
254
|
+
if (c?.(e, t), !t.isCanceled && (Se(e), !e && (t.reason === "focus-out" || t.reason === "outside-press") && (oe(!0), L(!1), pe === "onBlur" && W.commit(q)), !e && $.state.activeIndex !== null)) {
|
|
255
|
+
let e = Te.current[$.state.activeIndex];
|
|
256
|
+
queueMicrotask(() => {
|
|
257
|
+
e?.setAttribute("tabindex", "-1");
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
}), ct = O(() => {
|
|
261
|
+
Ke(!1), $.update({
|
|
262
|
+
activeIndex: null,
|
|
263
|
+
openMethod: null
|
|
264
|
+
}), C?.(!1);
|
|
265
|
+
});
|
|
266
|
+
fe({
|
|
267
|
+
enabled: !S,
|
|
268
|
+
open: J,
|
|
269
|
+
ref: ke,
|
|
270
|
+
onComplete() {
|
|
271
|
+
J || ct();
|
|
272
|
+
}
|
|
273
|
+
}), Y.useImperativeHandle(S, () => ({ unmount: ct }), [ct]);
|
|
274
|
+
let lt = O((e, t) => {
|
|
275
|
+
a?.(e, t), !t.isCanceled && ye(e);
|
|
276
|
+
}), ut = O(() => {
|
|
277
|
+
let e = $.state.listElement || ke.current;
|
|
278
|
+
if (!e) return;
|
|
279
|
+
let t = Ue(e.scrollHeight, e.clientHeight), n = We(e.scrollTop, t), r = n > 0, i = n < t;
|
|
280
|
+
$.state.scrollUpArrowVisible !== r && $.set("scrollUpArrowVisible", r), $.state.scrollDownArrowVisible !== i && $.set("scrollDownArrowVisible", i);
|
|
281
|
+
}), dt = d({
|
|
282
|
+
open: J,
|
|
283
|
+
onOpenChange: st,
|
|
284
|
+
elements: {
|
|
285
|
+
reference: Qe,
|
|
286
|
+
floating: $e
|
|
287
|
+
}
|
|
288
|
+
}), ft = ve(dt, {
|
|
289
|
+
enabled: !y && !K,
|
|
290
|
+
event: "mousedown"
|
|
291
|
+
}), pt = ae(dt, { bubbles: !1 }), mt = ee(dt, {
|
|
292
|
+
enabled: !y && !K,
|
|
293
|
+
listRef: Te,
|
|
294
|
+
activeIndex: Xe,
|
|
295
|
+
selectedIndex: Ze,
|
|
296
|
+
disabledIndices: z,
|
|
297
|
+
onNavigate(e) {
|
|
298
|
+
e === null && !J || $.set("activeIndex", e);
|
|
299
|
+
},
|
|
300
|
+
focusItemOnHover: N
|
|
301
|
+
}), ht = B(dt, {
|
|
302
|
+
enabled: !y && !K && (J || !D),
|
|
303
|
+
listRef: Z,
|
|
304
|
+
activeIndex: Xe,
|
|
305
|
+
selectedIndex: Ze,
|
|
306
|
+
onMatch(e) {
|
|
307
|
+
J ? $.set("activeIndex", e) : lt(Fe.current[e], h("none"));
|
|
308
|
+
},
|
|
309
|
+
onTypingChange(e) {
|
|
310
|
+
Ie.current = e;
|
|
311
|
+
}
|
|
312
|
+
}), { getReferenceProps: gt, getFloatingProps: _t, getItemProps: vt } = v([
|
|
313
|
+
ft,
|
|
314
|
+
pt,
|
|
315
|
+
mt,
|
|
316
|
+
ht
|
|
317
|
+
]), yt = Y.useMemo(() => me(gt(), Ye, G ? { id: G } : j), [
|
|
318
|
+
gt,
|
|
319
|
+
Ye,
|
|
320
|
+
G
|
|
321
|
+
]);
|
|
322
|
+
R(() => {
|
|
323
|
+
$.update({
|
|
324
|
+
popupProps: _t(),
|
|
325
|
+
triggerProps: yt
|
|
326
|
+
});
|
|
327
|
+
}), U(() => {
|
|
328
|
+
$.update({
|
|
329
|
+
id: G,
|
|
330
|
+
modal: x,
|
|
331
|
+
multiple: D,
|
|
332
|
+
value: q,
|
|
333
|
+
open: J,
|
|
334
|
+
mounted: Ge,
|
|
335
|
+
transitionStatus: qe,
|
|
336
|
+
popupProps: _t(),
|
|
337
|
+
triggerProps: yt,
|
|
338
|
+
items: E,
|
|
339
|
+
itemToStringLabel: k,
|
|
340
|
+
itemToStringValue: A,
|
|
341
|
+
isItemEqualToValue: M,
|
|
342
|
+
openMethod: tt
|
|
343
|
+
});
|
|
344
|
+
}, [
|
|
345
|
+
$,
|
|
346
|
+
G,
|
|
347
|
+
x,
|
|
348
|
+
D,
|
|
349
|
+
q,
|
|
350
|
+
J,
|
|
351
|
+
Ge,
|
|
352
|
+
qe,
|
|
353
|
+
_t,
|
|
354
|
+
yt,
|
|
355
|
+
E,
|
|
356
|
+
k,
|
|
357
|
+
A,
|
|
358
|
+
M,
|
|
359
|
+
tt
|
|
360
|
+
]);
|
|
361
|
+
let bt = Y.useMemo(() => ({
|
|
362
|
+
store: $,
|
|
363
|
+
name: ge,
|
|
364
|
+
required: b,
|
|
365
|
+
disabled: K,
|
|
366
|
+
readOnly: y,
|
|
367
|
+
multiple: D,
|
|
368
|
+
highlightItemOnHover: N,
|
|
369
|
+
setValue: lt,
|
|
370
|
+
setOpen: st,
|
|
371
|
+
listRef: Te,
|
|
372
|
+
popupRef: ke,
|
|
373
|
+
scrollHandlerRef: je,
|
|
374
|
+
handleScrollArrowVisibility: ut,
|
|
375
|
+
scrollArrowsMountedCountRef: Me,
|
|
376
|
+
getItemProps: vt,
|
|
377
|
+
events: dt.context.events,
|
|
378
|
+
valueRef: Pe,
|
|
379
|
+
valuesRef: Fe,
|
|
380
|
+
labelsRef: Z,
|
|
381
|
+
typingRef: Ie,
|
|
382
|
+
selectionRef: Ve,
|
|
383
|
+
selectedItemTextRef: Be,
|
|
384
|
+
validation: W,
|
|
385
|
+
onOpenChangeComplete: C,
|
|
386
|
+
keyboardActiveRef: Le,
|
|
387
|
+
alignItemWithTriggerActiveRef: He,
|
|
388
|
+
initialValueRef: ot
|
|
389
|
+
}), [
|
|
390
|
+
$,
|
|
391
|
+
ge,
|
|
392
|
+
b,
|
|
393
|
+
K,
|
|
394
|
+
y,
|
|
395
|
+
D,
|
|
396
|
+
N,
|
|
397
|
+
lt,
|
|
398
|
+
st,
|
|
399
|
+
vt,
|
|
400
|
+
dt.context.events,
|
|
401
|
+
W,
|
|
402
|
+
C,
|
|
403
|
+
ut
|
|
404
|
+
]), xt = ie(te, W.inputRef), St = D && Array.isArray(q) && q.length > 0, Ct = D ? void 0 : ge, wt = Y.useMemo(() => !D || !Array.isArray(q) || !ge ? null : q.map((e) => {
|
|
405
|
+
let t = ze(e, A);
|
|
406
|
+
return /*#__PURE__*/ X("input", {
|
|
407
|
+
type: "hidden",
|
|
408
|
+
form: m,
|
|
409
|
+
name: ge,
|
|
410
|
+
value: t
|
|
411
|
+
}, t);
|
|
412
|
+
}), [
|
|
413
|
+
D,
|
|
414
|
+
q,
|
|
415
|
+
m,
|
|
416
|
+
ge,
|
|
417
|
+
A
|
|
418
|
+
]);
|
|
419
|
+
return /*#__PURE__*/ X(De.Provider, {
|
|
420
|
+
value: bt,
|
|
421
|
+
children: /*#__PURE__*/ we(Oe.Provider, {
|
|
422
|
+
value: dt,
|
|
423
|
+
children: [
|
|
424
|
+
re,
|
|
425
|
+
/*#__PURE__*/ X("input", {
|
|
426
|
+
...W.getInputValidationProps({
|
|
427
|
+
onFocus() {
|
|
428
|
+
$.state.triggerElement?.focus({ focusVisible: !0 });
|
|
429
|
+
},
|
|
430
|
+
onChange(e) {
|
|
431
|
+
if (e.nativeEvent.defaultPrevented) return;
|
|
432
|
+
let t = e.currentTarget.value, n = h(p, e.nativeEvent);
|
|
433
|
+
function r() {
|
|
434
|
+
if (D) return;
|
|
435
|
+
let e = Fe.current.find((e) => ze(e, A).toLowerCase() === t.toLowerCase() || Re(e, k).toLowerCase() === t.toLowerCase());
|
|
436
|
+
e != null && (I(e !== V.initialValue), lt(e, n), se() && W.commit(e));
|
|
437
|
+
}
|
|
438
|
+
$.set("forceMount", !0), queueMicrotask(r);
|
|
439
|
+
}
|
|
440
|
+
}),
|
|
441
|
+
id: G && Ct == null ? `${G}-hidden-input` : void 0,
|
|
442
|
+
form: m,
|
|
443
|
+
name: Ct,
|
|
444
|
+
autoComplete: g,
|
|
445
|
+
value: nt,
|
|
446
|
+
disabled: K,
|
|
447
|
+
required: b && !St,
|
|
448
|
+
readOnly: y,
|
|
449
|
+
ref: xt,
|
|
450
|
+
style: ge ? ne : ce,
|
|
451
|
+
tabIndex: -1,
|
|
452
|
+
"aria-hidden": !0,
|
|
453
|
+
suppressHydrationWarning: !0
|
|
454
|
+
}),
|
|
455
|
+
wt
|
|
456
|
+
]
|
|
457
|
+
})
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
//#endregion
|
|
461
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/utils/resolveAriaLabelledBy.js
|
|
462
|
+
function Ke(e, t) {
|
|
463
|
+
return e ?? t;
|
|
464
|
+
}
|
|
465
|
+
//#endregion
|
|
466
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/trigger/SelectTrigger.js
|
|
467
|
+
var qe = 2, Je = 400, Ye = 200, $ = {
|
|
468
|
+
...s,
|
|
469
|
+
...u,
|
|
470
|
+
value: () => null
|
|
471
|
+
}, Xe = /*#__PURE__*/ Y.forwardRef(function(e, t) {
|
|
472
|
+
let { render: n, className: i, id: o, disabled: s = !1, nativeButton: c = !0, style: l, ...u } = e, { setTouched: d, setFocused: m, validationMode: ee, state: _, disabled: v } = T(), { labelId: y } = r(), { store: b, setOpen: te, selectionRef: C, validation: w, readOnly: E, required: D, alignItemWithTriggerActiveRef: ne, disabled: k, keyboardActiveRef: A } = Z(), j = v || k || s, M = f(b, Q.open), N = f(b, Q.value), re = f(b, Q.triggerProps), F = f(b, Q.positionerElement), I = f(b, Q.listElement), ae = f(b, Q.id), oe = f(b, Q.labelId), L = f(b, Q.hasSelectedValue), se = !L && M, ce = f(b, Q.hasNullItemLabel, se), R = o ?? ae, z = Ke(y, oe);
|
|
473
|
+
Ce({ id: R });
|
|
474
|
+
let B = xe(F), V = Y.useRef(null), { getButtonProps: le, buttonRef: ue } = H({
|
|
475
|
+
disabled: j,
|
|
476
|
+
native: c
|
|
477
|
+
}), U = O((e) => {
|
|
478
|
+
b.set("triggerElement", e);
|
|
479
|
+
}), de = ie(t, V, ue, U), fe = P(), W = P(), pe = P(), G = P();
|
|
480
|
+
Y.useEffect(() => {
|
|
481
|
+
if (M) return L || ce ? G.start(Ye, () => {
|
|
482
|
+
C.current.allowUnselectedMouseUp = !0, pe.start(Ye, () => {
|
|
483
|
+
C.current.allowSelectedMouseUp = !0;
|
|
484
|
+
});
|
|
485
|
+
}) : pe.start(Je, () => {
|
|
486
|
+
C.current.allowUnselectedMouseUp = !0, C.current.allowSelectedMouseUp = !0;
|
|
487
|
+
}), () => {
|
|
488
|
+
pe.clear(), G.clear();
|
|
489
|
+
};
|
|
490
|
+
C.current = {
|
|
491
|
+
allowSelectedMouseUp: !1,
|
|
492
|
+
allowUnselectedMouseUp: !1
|
|
493
|
+
}, W.clear();
|
|
494
|
+
}, [
|
|
495
|
+
M,
|
|
496
|
+
L,
|
|
497
|
+
ce,
|
|
498
|
+
C,
|
|
499
|
+
W,
|
|
500
|
+
pe,
|
|
501
|
+
G
|
|
502
|
+
]);
|
|
503
|
+
let he = Y.useMemo(() => I?.id ?? a(F)?.id, [I, F]), ge = me(re, {
|
|
504
|
+
id: R,
|
|
505
|
+
role: "combobox",
|
|
506
|
+
"aria-expanded": M ? "true" : "false",
|
|
507
|
+
"aria-haspopup": "listbox",
|
|
508
|
+
"aria-controls": M ? he : void 0,
|
|
509
|
+
"aria-labelledby": z,
|
|
510
|
+
"aria-readonly": E || void 0,
|
|
511
|
+
"aria-required": D || void 0,
|
|
512
|
+
tabIndex: j ? -1 : 0,
|
|
513
|
+
ref: de,
|
|
514
|
+
onFocus(e) {
|
|
515
|
+
m(!0), M && ne.current && te(!1, h(p, e.nativeEvent)), fe.start(0, () => {
|
|
516
|
+
b.set("forceMount", !0);
|
|
517
|
+
});
|
|
518
|
+
},
|
|
519
|
+
onBlur(e) {
|
|
520
|
+
g(F, e.relatedTarget) || (d(!0), m(!1), ee === "onBlur" && w.commit(N));
|
|
521
|
+
},
|
|
522
|
+
onPointerMove() {
|
|
523
|
+
A.current = !1;
|
|
524
|
+
},
|
|
525
|
+
onKeyDown() {
|
|
526
|
+
A.current = !0;
|
|
527
|
+
},
|
|
528
|
+
onMouseDown(e) {
|
|
529
|
+
if (M) return;
|
|
530
|
+
let t = x(e.currentTarget);
|
|
531
|
+
function n(e) {
|
|
532
|
+
if (!V.current) return;
|
|
533
|
+
let t = e.target;
|
|
534
|
+
if (g(V.current, t) || g(B.current, t) || t === V.current) return;
|
|
535
|
+
let n = q(V.current);
|
|
536
|
+
e.clientX >= n.left - qe && e.clientX <= n.right + qe && e.clientY >= n.top - qe && e.clientY <= n.bottom + qe || te(!1, h(S, e));
|
|
537
|
+
}
|
|
538
|
+
W.start(0, () => {
|
|
539
|
+
t.addEventListener("mouseup", n, { once: !0 });
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
}, w.getValidationProps, u, le);
|
|
543
|
+
ge.role = "combobox";
|
|
544
|
+
let _e = {
|
|
545
|
+
..._,
|
|
546
|
+
open: M,
|
|
547
|
+
disabled: j,
|
|
548
|
+
value: N,
|
|
549
|
+
readOnly: E,
|
|
550
|
+
placeholder: !L
|
|
551
|
+
};
|
|
552
|
+
return K("button", e, {
|
|
553
|
+
ref: [t, V],
|
|
554
|
+
state: _e,
|
|
555
|
+
stateAttributesMapping: $,
|
|
556
|
+
props: ge
|
|
557
|
+
});
|
|
558
|
+
});
|
|
559
|
+
process.env.NODE_ENV !== "production" && (Xe.displayName = "SelectTrigger");
|
|
560
|
+
//#endregion
|
|
561
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/value/SelectValue.js
|
|
562
|
+
var Ze = { value: () => null }, Qe = /*#__PURE__*/ Y.forwardRef(function(e, t) {
|
|
563
|
+
let { className: n, render: r, children: i, placeholder: a, style: o, ...s } = e, { store: c, valueRef: l } = Z(), u = f(c, Q.value), d = f(c, Q.items), p = f(c, Q.itemToStringLabel), m = f(c, Q.hasSelectedValue), h = !m && a != null && i == null, ee = f(c, Q.hasNullItemLabel, h), g = {
|
|
564
|
+
value: u,
|
|
565
|
+
placeholder: !m
|
|
566
|
+
}, _ = null;
|
|
567
|
+
return _ = typeof i == "function" ? i(u) : i ?? (!m && a != null && !ee ? a : Array.isArray(u) ? Ve(u, d, p) : Be(u, d, p)), K("span", e, {
|
|
568
|
+
state: g,
|
|
569
|
+
ref: [t, l],
|
|
570
|
+
props: [{ children: _ }, s],
|
|
571
|
+
stateAttributesMapping: Ze
|
|
572
|
+
});
|
|
573
|
+
});
|
|
574
|
+
process.env.NODE_ENV !== "production" && (Qe.displayName = "SelectValue");
|
|
575
|
+
//#endregion
|
|
576
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/icon/SelectIcon.js
|
|
577
|
+
var $e = /*#__PURE__*/ Y.forwardRef(function(e, t) {
|
|
578
|
+
let { className: n, render: r, style: i, ...a } = e, { store: s } = Z(), c = { open: f(s, Q.open) };
|
|
579
|
+
return K("span", e, {
|
|
580
|
+
state: c,
|
|
581
|
+
ref: t,
|
|
582
|
+
props: [{
|
|
583
|
+
"aria-hidden": !0,
|
|
584
|
+
children: "▼"
|
|
585
|
+
}, a],
|
|
586
|
+
stateAttributesMapping: o
|
|
587
|
+
});
|
|
588
|
+
});
|
|
589
|
+
process.env.NODE_ENV !== "production" && ($e.displayName = "SelectIcon");
|
|
590
|
+
//#endregion
|
|
591
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/portal/SelectPortalContext.js
|
|
592
|
+
var et = /*#__PURE__*/ Y.createContext(void 0);
|
|
593
|
+
process.env.NODE_ENV !== "production" && (et.displayName = "SelectPortalContext");
|
|
594
|
+
//#endregion
|
|
595
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/portal/SelectPortal.js
|
|
596
|
+
var tt = /*#__PURE__*/ Y.forwardRef(function(e, t) {
|
|
597
|
+
let { store: n } = Z(), r = f(n, Q.mounted), i = f(n, Q.forceMount);
|
|
598
|
+
return r || i ? /*#__PURE__*/ X(et.Provider, {
|
|
599
|
+
value: !0,
|
|
600
|
+
children: /*#__PURE__*/ X(le, {
|
|
601
|
+
ref: t,
|
|
602
|
+
...e
|
|
603
|
+
})
|
|
604
|
+
}) : null;
|
|
605
|
+
});
|
|
606
|
+
process.env.NODE_ENV !== "production" && (tt.displayName = "SelectPortal");
|
|
607
|
+
//#endregion
|
|
608
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/positioner/SelectPositionerContext.js
|
|
609
|
+
var nt = /*#__PURE__*/ Y.createContext(void 0);
|
|
610
|
+
process.env.NODE_ENV !== "production" && (nt.displayName = "SelectPositionerContext");
|
|
611
|
+
function rt() {
|
|
612
|
+
let e = Y.useContext(nt);
|
|
613
|
+
if (!e) throw Error(process.env.NODE_ENV === "production" ? L(59) : "Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.");
|
|
614
|
+
return e;
|
|
615
|
+
}
|
|
616
|
+
//#endregion
|
|
617
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/popup/utils.js
|
|
618
|
+
function it(e, t) {
|
|
619
|
+
e && Object.assign(e.style, t);
|
|
620
|
+
}
|
|
621
|
+
var at = {
|
|
622
|
+
position: "relative",
|
|
623
|
+
maxHeight: "100%",
|
|
624
|
+
overflowX: "hidden",
|
|
625
|
+
overflowY: "auto"
|
|
626
|
+
}, ot = { position: "fixed" }, st = /*#__PURE__*/ Y.forwardRef(function(e, t) {
|
|
627
|
+
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: m = 5, sticky: ee = !1, disableAnchorTracking: g, alignItemWithTrigger: _ = !0, collisionAvoidance: v = se, style: y, ...b } = e, { store: x, listRef: S, labelsRef: te, alignItemWithTriggerActiveRef: C, selectedItemTextRef: w, valuesRef: T, initialValueRef: E, popupRef: D, setValue: ne } = Z(), A = ke(), j = f(x, Q.open), M = f(x, Q.mounted), N = f(x, Q.modal), P = f(x, Q.value), ie = f(x, Q.openMethod), F = f(x, Q.positionerElement), I = f(x, Q.triggerElement), ae = f(x, Q.isItemEqualToValue), oe = f(x, Q.transitionStatus), L = Y.useRef(null), ce = Y.useRef(null), [R, z] = Y.useState(_), B = M && R && ie !== "touch";
|
|
628
|
+
!M && R !== _ && z(_), U(() => {
|
|
629
|
+
M || (Q.scrollUpArrowVisible(x.state) && x.set("scrollUpArrowVisible", !1), Q.scrollDownArrowVisible(x.state) && x.set("scrollDownArrowVisible", !1));
|
|
630
|
+
}, [x, M]), Y.useImperativeHandle(C, () => B), k((B || N) && j, ie === "touch", F, I);
|
|
631
|
+
let H = ye({
|
|
632
|
+
anchor: n,
|
|
633
|
+
floatingRootContext: A,
|
|
634
|
+
positionMethod: r,
|
|
635
|
+
mounted: M,
|
|
636
|
+
side: o,
|
|
637
|
+
sideOffset: c,
|
|
638
|
+
align: s,
|
|
639
|
+
alignOffset: l,
|
|
640
|
+
arrowPadding: m,
|
|
641
|
+
collisionBoundary: u,
|
|
642
|
+
collisionPadding: d,
|
|
643
|
+
sticky: ee,
|
|
644
|
+
disableAnchorTracking: g ?? B,
|
|
645
|
+
collisionAvoidance: v,
|
|
646
|
+
keepMounted: !0
|
|
647
|
+
}), le = B ? "none" : H.side, ue = B ? ot : H.positionerStyles, de = {
|
|
648
|
+
open: j,
|
|
649
|
+
side: le,
|
|
650
|
+
align: H.align,
|
|
651
|
+
anchorHidden: H.anchorHidden
|
|
652
|
+
}, fe = O((e) => {
|
|
653
|
+
x.set("positionerElement", e);
|
|
654
|
+
}), W = ge(e, de, {
|
|
655
|
+
styles: ue,
|
|
656
|
+
transitionStatus: oe,
|
|
657
|
+
props: b,
|
|
658
|
+
refs: [t, fe],
|
|
659
|
+
hidden: !M,
|
|
660
|
+
inert: !j
|
|
661
|
+
}), pe = Y.useRef(0), me = O((e) => {
|
|
662
|
+
if (e.size === 0 && pe.current === 0 || T.current.length === 0) return;
|
|
663
|
+
let t = pe.current;
|
|
664
|
+
if (pe.current = e.size, e.size === t) return;
|
|
665
|
+
let n = h(p);
|
|
666
|
+
if (t !== 0 && !x.state.multiple && P !== null && Ne(T.current, P, ae) === -1) {
|
|
667
|
+
let e = E.current, t = e != null && Ne(T.current, e, ae) !== -1 ? e : null;
|
|
668
|
+
ne(t, n), t === null && (x.set("selectedIndex", null), w.current = null);
|
|
669
|
+
}
|
|
670
|
+
if (t !== 0 && x.state.multiple && Array.isArray(P)) {
|
|
671
|
+
let e = (e) => Ne(T.current, e, ae) !== -1, t = P.filter((t) => e(t));
|
|
672
|
+
(t.length !== P.length || t.some((e) => !Me(P, e, ae))) && (ne(t, n), t.length === 0 && (x.set("selectedIndex", null), w.current = null));
|
|
673
|
+
}
|
|
674
|
+
if (j && B) {
|
|
675
|
+
x.update({
|
|
676
|
+
scrollUpArrowVisible: !1,
|
|
677
|
+
scrollDownArrowVisible: !1
|
|
678
|
+
});
|
|
679
|
+
let e = { height: "" };
|
|
680
|
+
it(F, e), it(D.current, e);
|
|
681
|
+
}
|
|
682
|
+
}), he = Y.useMemo(() => ({
|
|
683
|
+
...H,
|
|
684
|
+
side: le,
|
|
685
|
+
alignItemWithTriggerActive: B,
|
|
686
|
+
setControlledAlignItemWithTrigger: z,
|
|
687
|
+
scrollUpArrowRef: L,
|
|
688
|
+
scrollDownArrowRef: ce
|
|
689
|
+
}), [
|
|
690
|
+
H,
|
|
691
|
+
le,
|
|
692
|
+
B,
|
|
693
|
+
z
|
|
694
|
+
]);
|
|
695
|
+
return /*#__PURE__*/ X(V, {
|
|
696
|
+
elementsRef: S,
|
|
697
|
+
labelsRef: te,
|
|
698
|
+
onMapChange: me,
|
|
699
|
+
children: /*#__PURE__*/ we(nt.Provider, {
|
|
700
|
+
value: he,
|
|
701
|
+
children: [M && N && /*#__PURE__*/ X(re, {
|
|
702
|
+
inert: G(!j),
|
|
703
|
+
cutout: I
|
|
704
|
+
}), W]
|
|
705
|
+
})
|
|
706
|
+
});
|
|
707
|
+
});
|
|
708
|
+
process.env.NODE_ENV !== "production" && (st.displayName = "SelectPositioner");
|
|
709
|
+
//#endregion
|
|
710
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/utils/styles.js
|
|
711
|
+
var ct = "base-ui-disable-scrollbar", lt = {
|
|
712
|
+
className: ct,
|
|
713
|
+
getElement(e) {
|
|
714
|
+
return /*#__PURE__*/ X("style", {
|
|
715
|
+
nonce: e,
|
|
716
|
+
href: ct,
|
|
717
|
+
precedence: "base-ui:low",
|
|
718
|
+
children: `.${ct}{scrollbar-width:none}.${ct}::-webkit-scrollbar{display:none}`
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
};
|
|
722
|
+
process.env.NODE_ENV !== "production" && (lt.getElement.displayName = "styleDisableScrollbar.getElement");
|
|
723
|
+
//#endregion
|
|
724
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/csp-provider/CSPContext.js
|
|
725
|
+
var ut = /*#__PURE__*/ Y.createContext(void 0);
|
|
726
|
+
process.env.NODE_ENV !== "production" && (ut.displayName = "CSPContext");
|
|
727
|
+
var dt = { disableStyleElements: !1 };
|
|
728
|
+
function ft() {
|
|
729
|
+
return Y.useContext(ut) ?? dt;
|
|
730
|
+
}
|
|
731
|
+
//#endregion
|
|
732
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/popup/SelectPopup.js
|
|
733
|
+
var pt = {
|
|
734
|
+
...C,
|
|
735
|
+
...A
|
|
736
|
+
}, mt = /*#__PURE__*/ Y.forwardRef(function(e, t) {
|
|
737
|
+
let { render: r, className: i, style: a, finalFocus: o, ...s } = e, { store: c, popupRef: l, onOpenChangeComplete: u, setOpen: d, valueRef: p, selectedItemTextRef: ee, keyboardActiveRef: g, multiple: _, handleScrollArrowVisibility: v, scrollHandlerRef: y, listRef: S, highlightItemOnHover: te } = Z(), { side: C, align: w, alignItemWithTriggerActive: T, isPositioned: E, setControlledAlignItemWithTrigger: D, scrollDownArrowRef: ne, scrollUpArrowRef: k } = rt(), A = n(!0) != null, j = ke(), re = oe(), { nonce: P, disableStyleElements: ie } = ft(), F = f(c, Q.id), I = f(c, Q.open), ae = f(c, Q.mounted), L = f(c, Q.popupProps), se = f(c, Q.transitionStatus), ce = f(c, Q.triggerElement), R = f(c, Q.positionerElement), z = f(c, Q.listElement), B = Y.useRef(!1), V = Y.useRef(!1), H = Y.useRef({}), le = pe(), de = O((e) => {
|
|
738
|
+
if (!R || !l.current || !V.current) return;
|
|
739
|
+
if (B.current || !T) {
|
|
740
|
+
v();
|
|
741
|
+
return;
|
|
742
|
+
}
|
|
743
|
+
let t = R.style.top === "0px", n = R.style.bottom === "0px";
|
|
744
|
+
if (!t && !n) {
|
|
745
|
+
v();
|
|
746
|
+
return;
|
|
747
|
+
}
|
|
748
|
+
let r = _t(R), i = vt(R.getBoundingClientRect().height, "y", r), a = x(R), o = getComputedStyle(R), s = parseFloat(o.marginTop), c = parseFloat(o.marginBottom), u = ht(getComputedStyle(l.current)), d = Math.min(a.documentElement.clientHeight - s - c, u), f = e.scrollTop, p = gt(e), m = 0, h = null, ee = !1, g = !1, _ = (e) => {
|
|
749
|
+
R.style.height = `${e}px`;
|
|
750
|
+
}, y = (t, n) => {
|
|
751
|
+
let r = He(t, 0, d - i);
|
|
752
|
+
r > 0 && _(i + r), e.scrollTop = n, d - (i + r) <= 1 && (B.current = !0), v();
|
|
753
|
+
}, b = t ? p - f : f, S = Math.min(i + b, d);
|
|
754
|
+
if (m = S, b <= 1) {
|
|
755
|
+
y(b, t ? p : 0);
|
|
756
|
+
return;
|
|
757
|
+
}
|
|
758
|
+
if (d - S > 1 ? t ? g = !0 : h = 0 : (ee = !0, n && f < p && (h = f - (b - (i + b - d)))), m = Math.ceil(m), m !== 0 && _(m), g || h != null) {
|
|
759
|
+
let t = gt(e), n = g ? t : He(h, 0, t);
|
|
760
|
+
Math.abs(e.scrollTop - n) > 1 && (e.scrollTop = n);
|
|
761
|
+
}
|
|
762
|
+
(ee || m >= d - 1) && (B.current = !0), v();
|
|
763
|
+
});
|
|
764
|
+
Y.useImperativeHandle(y, () => de, [de]), fe({
|
|
765
|
+
open: I,
|
|
766
|
+
ref: l,
|
|
767
|
+
onComplete() {
|
|
768
|
+
I && u?.(!0);
|
|
769
|
+
}
|
|
770
|
+
});
|
|
771
|
+
let G = {
|
|
772
|
+
open: I,
|
|
773
|
+
transitionStatus: se,
|
|
774
|
+
side: C,
|
|
775
|
+
align: w
|
|
776
|
+
};
|
|
777
|
+
U(() => {
|
|
778
|
+
!R || !l.current || Object.keys(H.current).length || (H.current = {
|
|
779
|
+
top: R.style.top || "0",
|
|
780
|
+
left: R.style.left || "0",
|
|
781
|
+
right: R.style.right,
|
|
782
|
+
height: R.style.height,
|
|
783
|
+
bottom: R.style.bottom,
|
|
784
|
+
minHeight: R.style.minHeight,
|
|
785
|
+
maxHeight: R.style.maxHeight,
|
|
786
|
+
marginTop: R.style.marginTop,
|
|
787
|
+
marginBottom: R.style.marginBottom
|
|
788
|
+
});
|
|
789
|
+
}, [l, R]), U(() => {
|
|
790
|
+
I || T || (V.current = !1, B.current = !1, it(R, H.current));
|
|
791
|
+
}, [
|
|
792
|
+
I,
|
|
793
|
+
T,
|
|
794
|
+
R,
|
|
795
|
+
l
|
|
796
|
+
]), U(() => {
|
|
797
|
+
let e = l.current;
|
|
798
|
+
if (!I || !ce || !R || !e || T && !E || c.state.transitionStatus === "ending") return;
|
|
799
|
+
if (!T) {
|
|
800
|
+
V.current = !0, le.request(v), e.style.removeProperty("--transform-origin");
|
|
801
|
+
return;
|
|
802
|
+
}
|
|
803
|
+
let t = xt(e);
|
|
804
|
+
e.style.removeProperty("--transform-origin");
|
|
805
|
+
try {
|
|
806
|
+
let t = ee.current, n = p.current, r = getComputedStyle(R), i = getComputedStyle(e), a = x(ce), o = M(R), s = _t(ce), l = yt(ce.getBoundingClientRect(), s), u = yt(R.getBoundingClientRect(), s), d = l.height, f = z || e, h = f.scrollHeight, g = parseFloat(i.borderBottomWidth), _ = parseFloat(r.marginTop) || 10, y = parseFloat(r.marginBottom) || 10, b = parseFloat(r.minHeight) || 100, C = ht(i), w = a.documentElement.clientHeight - _ - y, T = a.documentElement.clientWidth, E = w - l.bottom + d, O, ne = re === "rtl" ? l.right - u.width : l.left, k = 0;
|
|
807
|
+
if (t && n) {
|
|
808
|
+
let e = yt(n.getBoundingClientRect(), s);
|
|
809
|
+
O = yt(t.getBoundingClientRect(), s), ne = u.left + (re === "rtl" ? e.right - O.right : e.left - O.left);
|
|
810
|
+
let r = e.top - l.top + e.height / 2;
|
|
811
|
+
k = O.top - u.top + O.height / 2 - r;
|
|
812
|
+
}
|
|
813
|
+
let A = E + k + y + g, j = Math.min(w, A), N = w - _ - y, P = A - j, ie = T - 5;
|
|
814
|
+
R.style.left = `${He(ne, 5, ie - u.width)}px`, R.style.height = `${j}px`, R.style.maxHeight = "auto", R.style.marginTop = `${_}px`, R.style.marginBottom = `${y}px`, e.style.height = "100%";
|
|
815
|
+
let F = gt(f), I = P >= F - 1;
|
|
816
|
+
I && (j = Math.min(w, u.height) - (P - F));
|
|
817
|
+
let ae = l.top < 20 || l.bottom > w - 20 || Math.ceil(j) + 1 < Math.min(h, b), oe = (o.visualViewport?.scale ?? 1) !== 1 && m;
|
|
818
|
+
if (ae || oe) {
|
|
819
|
+
V.current = !0, it(R, H.current), D(!1);
|
|
820
|
+
return;
|
|
821
|
+
}
|
|
822
|
+
let L = Math.max(b, j);
|
|
823
|
+
if (I) {
|
|
824
|
+
let e = Math.max(0, w - A);
|
|
825
|
+
R.style.top = u.height >= N ? "0" : `${e}px`, R.style.height = `${j}px`, f.scrollTop = gt(f);
|
|
826
|
+
} else R.style.bottom = "0", f.scrollTop = P;
|
|
827
|
+
if (O) {
|
|
828
|
+
let t = u.top, n = u.height, r = O.top + O.height / 2, i = He(n > 0 ? (r - t) / n * 100 : 50, 0, 100);
|
|
829
|
+
e.style.setProperty("--transform-origin", `50% ${i}%`);
|
|
830
|
+
}
|
|
831
|
+
(L === w || j >= C) && (B.current = !0), v(), te && c.state.selectedIndex === null && c.state.activeIndex === null && S.current[0] != null && c.set("activeIndex", 0), V.current = !0;
|
|
832
|
+
} finally {
|
|
833
|
+
t();
|
|
834
|
+
}
|
|
835
|
+
}, [
|
|
836
|
+
c,
|
|
837
|
+
I,
|
|
838
|
+
R,
|
|
839
|
+
ce,
|
|
840
|
+
p,
|
|
841
|
+
ee,
|
|
842
|
+
l,
|
|
843
|
+
v,
|
|
844
|
+
T,
|
|
845
|
+
D,
|
|
846
|
+
le,
|
|
847
|
+
ne,
|
|
848
|
+
k,
|
|
849
|
+
z,
|
|
850
|
+
S,
|
|
851
|
+
te,
|
|
852
|
+
re,
|
|
853
|
+
E
|
|
854
|
+
]), Y.useEffect(() => {
|
|
855
|
+
if (!T || !R || !I) return;
|
|
856
|
+
let e = M(R);
|
|
857
|
+
function t(e) {
|
|
858
|
+
d(!1, h(b, e));
|
|
859
|
+
}
|
|
860
|
+
return N(e, "resize", t);
|
|
861
|
+
}, [
|
|
862
|
+
d,
|
|
863
|
+
T,
|
|
864
|
+
R,
|
|
865
|
+
I
|
|
866
|
+
]);
|
|
867
|
+
let me = {
|
|
868
|
+
...z ? {
|
|
869
|
+
role: "presentation",
|
|
870
|
+
"aria-orientation": void 0
|
|
871
|
+
} : {
|
|
872
|
+
role: "listbox",
|
|
873
|
+
"aria-multiselectable": _ || void 0,
|
|
874
|
+
id: `${F}-list`
|
|
875
|
+
},
|
|
876
|
+
onKeyDown(e) {
|
|
877
|
+
g.current = !0, A && J.has(e.key) && e.stopPropagation();
|
|
878
|
+
},
|
|
879
|
+
onMouseMove() {
|
|
880
|
+
g.current = !1;
|
|
881
|
+
},
|
|
882
|
+
onScroll(e) {
|
|
883
|
+
z || de(e.currentTarget);
|
|
884
|
+
},
|
|
885
|
+
...T && { style: z ? { height: "100%" } : at }
|
|
886
|
+
}, he = K("div", e, {
|
|
887
|
+
ref: [t, l],
|
|
888
|
+
state: G,
|
|
889
|
+
stateAttributesMapping: pt,
|
|
890
|
+
props: [
|
|
891
|
+
L,
|
|
892
|
+
me,
|
|
893
|
+
ue(se),
|
|
894
|
+
{ className: !z && T ? lt.className : void 0 },
|
|
895
|
+
s
|
|
896
|
+
]
|
|
897
|
+
});
|
|
898
|
+
return /*#__PURE__*/ we(Y.Fragment, { children: [!ie && lt.getElement(P), /*#__PURE__*/ X(W, {
|
|
899
|
+
context: j,
|
|
900
|
+
modal: !1,
|
|
901
|
+
disabled: !ae,
|
|
902
|
+
returnFocus: o,
|
|
903
|
+
restoreFocus: !0,
|
|
904
|
+
children: he
|
|
905
|
+
})] });
|
|
906
|
+
});
|
|
907
|
+
process.env.NODE_ENV !== "production" && (mt.displayName = "SelectPopup");
|
|
908
|
+
function ht(e) {
|
|
909
|
+
let t = e.maxHeight || "";
|
|
910
|
+
return t.endsWith("px") && parseFloat(t) || Infinity;
|
|
911
|
+
}
|
|
912
|
+
function gt(e) {
|
|
913
|
+
return Ue(e.scrollHeight, e.clientHeight);
|
|
914
|
+
}
|
|
915
|
+
function _t(t) {
|
|
916
|
+
return e.getScale(t);
|
|
917
|
+
}
|
|
918
|
+
function vt(e, t, n) {
|
|
919
|
+
return e / n[t];
|
|
920
|
+
}
|
|
921
|
+
function yt(e, t) {
|
|
922
|
+
return i({
|
|
923
|
+
x: vt(e.x, "x", t),
|
|
924
|
+
y: vt(e.y, "y", t),
|
|
925
|
+
width: vt(e.width, "x", t),
|
|
926
|
+
height: vt(e.height, "y", t)
|
|
927
|
+
});
|
|
928
|
+
}
|
|
929
|
+
var bt = [
|
|
930
|
+
["transform", "none"],
|
|
931
|
+
["scale", "1"],
|
|
932
|
+
["translate", "0 0"]
|
|
933
|
+
];
|
|
934
|
+
function xt(e) {
|
|
935
|
+
let { style: t } = e, n = {};
|
|
936
|
+
for (let [e, r] of bt) n[e] = t.getPropertyValue(e), t.setProperty(e, r, "important");
|
|
937
|
+
return () => {
|
|
938
|
+
for (let [e] of bt) {
|
|
939
|
+
let r = n[e];
|
|
940
|
+
r ? t.setProperty(e, r) : t.removeProperty(e);
|
|
941
|
+
}
|
|
942
|
+
};
|
|
943
|
+
}
|
|
944
|
+
//#endregion
|
|
945
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/list/SelectList.js
|
|
946
|
+
var St = /*#__PURE__*/ Y.forwardRef(function(e, t) {
|
|
947
|
+
let { className: n, render: r, style: i, ...a } = e, { store: o, scrollHandlerRef: s } = Z(), { alignItemWithTriggerActive: c } = rt(), l = f(o, Q.hasScrollArrows), u = f(o, Q.openMethod), d = f(o, Q.multiple), p = {
|
|
948
|
+
id: `${f(o, Q.id)}-list`,
|
|
949
|
+
role: "listbox",
|
|
950
|
+
"aria-multiselectable": d || void 0,
|
|
951
|
+
onScroll(e) {
|
|
952
|
+
s.current?.(e.currentTarget);
|
|
953
|
+
},
|
|
954
|
+
...c && { style: at },
|
|
955
|
+
className: l && u !== "touch" ? lt.className : void 0
|
|
956
|
+
}, m = O((e) => {
|
|
957
|
+
o.set("listElement", e);
|
|
958
|
+
});
|
|
959
|
+
return K("div", e, {
|
|
960
|
+
ref: [t, m],
|
|
961
|
+
props: [p, a]
|
|
962
|
+
});
|
|
963
|
+
});
|
|
964
|
+
process.env.NODE_ENV !== "production" && (St.displayName = "SelectList");
|
|
965
|
+
//#endregion
|
|
966
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/item/SelectItemContext.js
|
|
967
|
+
var Ct = /*#__PURE__*/ Y.createContext(void 0);
|
|
968
|
+
process.env.NODE_ENV !== "production" && (Ct.displayName = "SelectItemContext");
|
|
969
|
+
function wt() {
|
|
970
|
+
let e = Y.useContext(Ct);
|
|
971
|
+
if (!e) throw Error(process.env.NODE_ENV === "production" ? L(57) : "Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.");
|
|
972
|
+
return e;
|
|
973
|
+
}
|
|
974
|
+
//#endregion
|
|
975
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/item/SelectItem.js
|
|
976
|
+
var Tt = /*#__PURE__*/ Y.memo(/*#__PURE__*/ Y.forwardRef(function(e, t) {
|
|
977
|
+
let { render: n, className: r, value: i = null, label: a, disabled: o = !1, nativeButton: s = !1, style: c, ...l } = e, u = Y.useRef(null), d = te({
|
|
978
|
+
label: a,
|
|
979
|
+
textRef: u,
|
|
980
|
+
indexGuessBehavior: Se.GuessFromOrder
|
|
981
|
+
}), { store: p, getItemProps: m, setOpen: ee, setValue: g, selectionRef: _, typingRef: v, valuesRef: y, multiple: b, selectedItemTextRef: x } = Z(), S = f(p, Q.isActive, d.index), C = f(p, Q.isSelected, d.index, i), w = f(p, Q.isSelectedByFocus, d.index), T = f(p, Q.isItemEqualToValue), D = d.index, O = D !== -1, ne = Y.useRef(null), k = xe(D);
|
|
982
|
+
U(() => {
|
|
983
|
+
if (!O) return;
|
|
984
|
+
let e = y.current;
|
|
985
|
+
return e[D] = i, () => {
|
|
986
|
+
delete e[D];
|
|
987
|
+
};
|
|
988
|
+
}, [
|
|
989
|
+
O,
|
|
990
|
+
D,
|
|
991
|
+
i,
|
|
992
|
+
y
|
|
993
|
+
]), U(() => {
|
|
994
|
+
if (!O) return;
|
|
995
|
+
let e = p.state.value, t = e;
|
|
996
|
+
b && Array.isArray(e) && e.length > 0 && (t = e[e.length - 1]), t !== void 0 && je(i, t, T) && (p.set("selectedIndex", D), u.current && (x.current = u.current));
|
|
997
|
+
}, [
|
|
998
|
+
O,
|
|
999
|
+
D,
|
|
1000
|
+
b,
|
|
1001
|
+
T,
|
|
1002
|
+
p,
|
|
1003
|
+
i,
|
|
1004
|
+
x
|
|
1005
|
+
]);
|
|
1006
|
+
let A = {
|
|
1007
|
+
disabled: o,
|
|
1008
|
+
selected: C,
|
|
1009
|
+
highlighted: S
|
|
1010
|
+
}, j = m({
|
|
1011
|
+
active: S,
|
|
1012
|
+
selected: C
|
|
1013
|
+
});
|
|
1014
|
+
j.id = void 0;
|
|
1015
|
+
let M = Y.useRef(null), N = Y.useRef("mouse"), re = Y.useRef(!1), { getButtonProps: P, buttonRef: ie } = H({
|
|
1016
|
+
disabled: o,
|
|
1017
|
+
focusableWhenDisabled: !0,
|
|
1018
|
+
native: s,
|
|
1019
|
+
composite: !0
|
|
1020
|
+
});
|
|
1021
|
+
function F(e) {
|
|
1022
|
+
let t = p.state.value;
|
|
1023
|
+
if (b) {
|
|
1024
|
+
let n = Array.isArray(t) ? t : [], r = C ? Pe(n, i, T) : [...n, i];
|
|
1025
|
+
g(r, h(E, e));
|
|
1026
|
+
} else g(i, h(E, e)), ee(!1, h(E, e));
|
|
1027
|
+
}
|
|
1028
|
+
let I = {
|
|
1029
|
+
role: "option",
|
|
1030
|
+
"aria-selected": C,
|
|
1031
|
+
tabIndex: S ? 0 : -1,
|
|
1032
|
+
onTouchStart() {
|
|
1033
|
+
_.current = {
|
|
1034
|
+
allowSelectedMouseUp: !1,
|
|
1035
|
+
allowUnselectedMouseUp: !1
|
|
1036
|
+
};
|
|
1037
|
+
},
|
|
1038
|
+
onKeyDown(e) {
|
|
1039
|
+
M.current = e.key, p.set("activeIndex", D), e.key === " " && v.current && e.preventDefault();
|
|
1040
|
+
},
|
|
1041
|
+
onClick(e) {
|
|
1042
|
+
re.current = !1, (e.type !== "keydown" || M.current !== null) && (o || e.type === "keydown" && M.current === " " && v.current || N.current !== "touch" && !S || (M.current = null, F(e.nativeEvent)));
|
|
1043
|
+
},
|
|
1044
|
+
onPointerEnter(e) {
|
|
1045
|
+
N.current = e.pointerType;
|
|
1046
|
+
},
|
|
1047
|
+
onPointerDown(e) {
|
|
1048
|
+
N.current = e.pointerType, re.current = !0;
|
|
1049
|
+
},
|
|
1050
|
+
onMouseUp() {
|
|
1051
|
+
if (o) return;
|
|
1052
|
+
if (re.current) {
|
|
1053
|
+
re.current = !1;
|
|
1054
|
+
return;
|
|
1055
|
+
}
|
|
1056
|
+
let e = !_.current.allowSelectedMouseUp && C, t = !_.current.allowUnselectedMouseUp && !C;
|
|
1057
|
+
e || t || N.current !== "touch" && !S || ne.current?.click();
|
|
1058
|
+
}
|
|
1059
|
+
}, ae = K("div", e, {
|
|
1060
|
+
ref: [
|
|
1061
|
+
ie,
|
|
1062
|
+
t,
|
|
1063
|
+
d.ref,
|
|
1064
|
+
ne
|
|
1065
|
+
],
|
|
1066
|
+
state: A,
|
|
1067
|
+
props: [
|
|
1068
|
+
j,
|
|
1069
|
+
I,
|
|
1070
|
+
l,
|
|
1071
|
+
P
|
|
1072
|
+
]
|
|
1073
|
+
}), oe = Y.useMemo(() => ({
|
|
1074
|
+
selected: C,
|
|
1075
|
+
indexRef: k,
|
|
1076
|
+
textRef: u,
|
|
1077
|
+
selectedByFocus: w,
|
|
1078
|
+
hasRegistered: O
|
|
1079
|
+
}), [
|
|
1080
|
+
C,
|
|
1081
|
+
k,
|
|
1082
|
+
u,
|
|
1083
|
+
w,
|
|
1084
|
+
O
|
|
1085
|
+
]);
|
|
1086
|
+
return /*#__PURE__*/ X(Ct.Provider, {
|
|
1087
|
+
value: oe,
|
|
1088
|
+
children: ae
|
|
1089
|
+
});
|
|
1090
|
+
}));
|
|
1091
|
+
process.env.NODE_ENV !== "production" && (Tt.displayName = "SelectItem");
|
|
1092
|
+
//#endregion
|
|
1093
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/item-indicator/SelectItemIndicator.js
|
|
1094
|
+
var Et = /*#__PURE__*/ Y.forwardRef(function(e, t) {
|
|
1095
|
+
let n = e.keepMounted ?? !1, { selected: r } = wt();
|
|
1096
|
+
return n || r ? /*#__PURE__*/ X(Dt, {
|
|
1097
|
+
...e,
|
|
1098
|
+
ref: t
|
|
1099
|
+
}) : null;
|
|
1100
|
+
});
|
|
1101
|
+
process.env.NODE_ENV !== "production" && (Et.displayName = "SelectItemIndicator");
|
|
1102
|
+
var Dt = /*#__PURE__*/ Y.memo(/*#__PURE__*/ Y.forwardRef((e, t) => {
|
|
1103
|
+
let { render: n, className: r, style: i, keepMounted: a, ...o } = e, { selected: s } = wt(), c = Y.useRef(null), { transitionStatus: l, setMounted: u } = _e(s), d = K("span", e, {
|
|
1104
|
+
ref: [t, c],
|
|
1105
|
+
state: {
|
|
1106
|
+
selected: s,
|
|
1107
|
+
transitionStatus: l
|
|
1108
|
+
},
|
|
1109
|
+
props: [{
|
|
1110
|
+
"aria-hidden": !0,
|
|
1111
|
+
children: "✔️"
|
|
1112
|
+
}, o],
|
|
1113
|
+
stateAttributesMapping: A
|
|
1114
|
+
});
|
|
1115
|
+
return fe({
|
|
1116
|
+
open: s,
|
|
1117
|
+
ref: c,
|
|
1118
|
+
onComplete() {
|
|
1119
|
+
s || u(!1);
|
|
1120
|
+
}
|
|
1121
|
+
}), d;
|
|
1122
|
+
}));
|
|
1123
|
+
process.env.NODE_ENV !== "production" && (Dt.displayName = "Inner");
|
|
1124
|
+
//#endregion
|
|
1125
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/item-text/SelectItemText.js
|
|
1126
|
+
var Ot = /*#__PURE__*/ Y.memo(/*#__PURE__*/ Y.forwardRef(function(e, t) {
|
|
1127
|
+
let { indexRef: n, textRef: r, selectedByFocus: i, hasRegistered: a } = wt(), { selectedItemTextRef: o } = Z(), { className: s, render: c, style: l, ...u } = e, d = Y.useCallback((e) => {
|
|
1128
|
+
if (!e || !a) return;
|
|
1129
|
+
let t = o.current === null || !o.current.isConnected;
|
|
1130
|
+
(i || t && n.current === 0) && (o.current = e);
|
|
1131
|
+
}, [
|
|
1132
|
+
o,
|
|
1133
|
+
n,
|
|
1134
|
+
i,
|
|
1135
|
+
a
|
|
1136
|
+
]);
|
|
1137
|
+
return K("div", e, {
|
|
1138
|
+
ref: [
|
|
1139
|
+
d,
|
|
1140
|
+
t,
|
|
1141
|
+
r
|
|
1142
|
+
],
|
|
1143
|
+
props: u
|
|
1144
|
+
});
|
|
1145
|
+
}));
|
|
1146
|
+
process.env.NODE_ENV !== "production" && (Ot.displayName = "SelectItemText");
|
|
1147
|
+
//#endregion
|
|
1148
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/scroll-arrow/SelectScrollArrow.js
|
|
1149
|
+
var kt = /*#__PURE__*/ Y.forwardRef(function(e, t) {
|
|
1150
|
+
let { render: n, className: r, style: i, direction: a, keepMounted: o = !1, ...s } = e, c = a === "up", { store: l, popupRef: u, listRef: d, handleScrollArrowVisibility: p, scrollArrowsMountedCountRef: m } = Z(), { side: h, scrollDownArrowRef: ee, scrollUpArrowRef: g } = rt(), _ = c ? Q.scrollUpArrowVisible : Q.scrollDownArrowVisible, v = f(l, _), y = f(l, Q.openMethod), b = v && y !== "touch", x = P(), S = c ? g : ee, { transitionStatus: te, setMounted: C } = _e(b);
|
|
1151
|
+
U(() => (m.current += 1, l.state.hasScrollArrows || l.set("hasScrollArrows", !0), () => {
|
|
1152
|
+
m.current = Math.max(0, m.current - 1), m.current === 0 && l.state.hasScrollArrows && l.set("hasScrollArrows", !1);
|
|
1153
|
+
}), [l, m]), fe({
|
|
1154
|
+
open: b,
|
|
1155
|
+
ref: S,
|
|
1156
|
+
onComplete() {
|
|
1157
|
+
b || C(!1);
|
|
1158
|
+
}
|
|
1159
|
+
});
|
|
1160
|
+
let w = K("div", e, {
|
|
1161
|
+
ref: [t, S],
|
|
1162
|
+
state: {
|
|
1163
|
+
direction: a,
|
|
1164
|
+
visible: b,
|
|
1165
|
+
side: h,
|
|
1166
|
+
transitionStatus: te
|
|
1167
|
+
},
|
|
1168
|
+
props: [{
|
|
1169
|
+
"aria-hidden": !0,
|
|
1170
|
+
children: c ? "▲" : "▼",
|
|
1171
|
+
style: { position: "absolute" },
|
|
1172
|
+
onMouseMove(e) {
|
|
1173
|
+
if (e.movementX === 0 && e.movementY === 0 || x.isStarted()) return;
|
|
1174
|
+
l.set("activeIndex", null);
|
|
1175
|
+
function t() {
|
|
1176
|
+
let e = l.state.listElement ?? u.current;
|
|
1177
|
+
if (!e) return;
|
|
1178
|
+
l.set("activeIndex", null), p();
|
|
1179
|
+
let n = Ue(e.scrollHeight, e.clientHeight), r = We(e.scrollTop, n), i = r === (c ? 0 : n), a = d.current;
|
|
1180
|
+
if (r !== e.scrollTop && (e.scrollTop = r), a.length === 0 && l.set(c ? "scrollUpArrowVisible" : "scrollDownArrowVisible", !i), i) {
|
|
1181
|
+
x.clear();
|
|
1182
|
+
return;
|
|
1183
|
+
}
|
|
1184
|
+
if (a.length > 0) {
|
|
1185
|
+
let t = S.current?.offsetHeight || 0;
|
|
1186
|
+
e.scrollTop = At(a, c, r, e.clientHeight, t, n);
|
|
1187
|
+
}
|
|
1188
|
+
x.start(40, t);
|
|
1189
|
+
}
|
|
1190
|
+
x.start(40, t);
|
|
1191
|
+
},
|
|
1192
|
+
onMouseLeave() {
|
|
1193
|
+
x.clear();
|
|
1194
|
+
}
|
|
1195
|
+
}, s]
|
|
1196
|
+
});
|
|
1197
|
+
return b || o ? w : null;
|
|
1198
|
+
});
|
|
1199
|
+
process.env.NODE_ENV !== "production" && (kt.displayName = "SelectScrollArrow");
|
|
1200
|
+
function At(e, t, n, r, i, a) {
|
|
1201
|
+
if (t) {
|
|
1202
|
+
let t = 0, r = n + i - 1;
|
|
1203
|
+
for (let n = 0; n < e.length; n += 1) {
|
|
1204
|
+
let i = e[n];
|
|
1205
|
+
if (i && i.offsetTop >= r) {
|
|
1206
|
+
t = n;
|
|
1207
|
+
break;
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
let o = Math.max(0, t - 1), s = e[o];
|
|
1211
|
+
return o < t && s ? We(s.offsetTop - i, a) : 0;
|
|
1212
|
+
}
|
|
1213
|
+
let o = e.length - 1, s = n + r - i + 1;
|
|
1214
|
+
for (let t = 0; t < e.length; t += 1) {
|
|
1215
|
+
let n = e[t];
|
|
1216
|
+
if (n && n.offsetTop + n.offsetHeight > s) {
|
|
1217
|
+
o = Math.max(0, t - 1);
|
|
1218
|
+
break;
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
let c = Math.min(e.length - 1, o + 1), l = e[c];
|
|
1222
|
+
return c > o && l ? We(l.offsetTop + l.offsetHeight - r + i, a) : a;
|
|
1223
|
+
}
|
|
1224
|
+
//#endregion
|
|
1225
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/scroll-down-arrow/SelectScrollDownArrow.js
|
|
1226
|
+
var jt = /*#__PURE__*/ Y.forwardRef(function(e, t) {
|
|
1227
|
+
return /*#__PURE__*/ X(kt, {
|
|
1228
|
+
...e,
|
|
1229
|
+
ref: t,
|
|
1230
|
+
direction: "down"
|
|
1231
|
+
});
|
|
1232
|
+
});
|
|
1233
|
+
process.env.NODE_ENV !== "production" && (jt.displayName = "SelectScrollDownArrow");
|
|
1234
|
+
//#endregion
|
|
1235
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/scroll-up-arrow/SelectScrollUpArrow.js
|
|
1236
|
+
var Mt = /*#__PURE__*/ Y.forwardRef(function(e, t) {
|
|
1237
|
+
return /*#__PURE__*/ X(kt, {
|
|
1238
|
+
...e,
|
|
1239
|
+
ref: t,
|
|
1240
|
+
direction: "up"
|
|
1241
|
+
});
|
|
1242
|
+
});
|
|
1243
|
+
process.env.NODE_ENV !== "production" && (Mt.displayName = "SelectScrollUpArrow");
|
|
1244
|
+
//#endregion
|
|
1245
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/group/SelectGroupContext.js
|
|
1246
|
+
var Nt = /*#__PURE__*/ Y.createContext(void 0);
|
|
1247
|
+
process.env.NODE_ENV !== "production" && (Nt.displayName = "SelectGroupContext");
|
|
1248
|
+
//#endregion
|
|
1249
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/select/group/SelectGroup.js
|
|
1250
|
+
var Pt = /*#__PURE__*/ Y.forwardRef(function(e, t) {
|
|
1251
|
+
let { className: n, render: r, style: i, ...a } = e, [o, s] = Y.useState(), c = Y.useMemo(() => ({
|
|
1252
|
+
labelId: o,
|
|
1253
|
+
setLabelId: s
|
|
1254
|
+
}), [o, s]), l = K("div", e, {
|
|
1255
|
+
ref: t,
|
|
1256
|
+
props: [{
|
|
1257
|
+
role: "group",
|
|
1258
|
+
"aria-labelledby": o
|
|
1259
|
+
}, a]
|
|
1260
|
+
});
|
|
1261
|
+
return /*#__PURE__*/ X(Nt.Provider, {
|
|
1262
|
+
value: c,
|
|
1263
|
+
children: l
|
|
1264
|
+
});
|
|
1265
|
+
});
|
|
1266
|
+
process.env.NODE_ENV !== "production" && (Pt.displayName = "SelectGroup");
|
|
1267
|
+
//#endregion
|
|
1268
|
+
//#region src/ui/browser/select.tsx
|
|
1269
|
+
var Ft = Ge;
|
|
1270
|
+
function It({ className: e, ...t }) {
|
|
1271
|
+
return /* @__PURE__ */ X(Pt, {
|
|
1272
|
+
"data-slot": "select-group",
|
|
1273
|
+
className: I("scroll-my-1 p-1", e),
|
|
1274
|
+
...t
|
|
1275
|
+
});
|
|
1276
|
+
}
|
|
1277
|
+
function Lt({ className: e, ...t }) {
|
|
1278
|
+
return /* @__PURE__ */ X(Qe, {
|
|
1279
|
+
"data-slot": "select-value",
|
|
1280
|
+
className: I("flex flex-1 text-left", e),
|
|
1281
|
+
...t
|
|
1282
|
+
});
|
|
1283
|
+
}
|
|
1284
|
+
function Rt({ children: e, className: t, size: n = "default", ...r }) {
|
|
1285
|
+
return /* @__PURE__ */ we(Xe, {
|
|
1286
|
+
"data-slot": "select-trigger",
|
|
1287
|
+
"data-size": n,
|
|
1288
|
+
className: I("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-md *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
|
|
1289
|
+
...r,
|
|
1290
|
+
children: [e, /* @__PURE__ */ X($e, { render: /* @__PURE__ */ X(_, { className: "text-muted-foreground" }) })]
|
|
1291
|
+
});
|
|
1292
|
+
}
|
|
1293
|
+
function zt({ align: e = "center", alignItemWithTrigger: t = !0, alignOffset: n = 0, children: r, className: i, container: a, side: o = "bottom", sideOffset: s = 4, ...c }) {
|
|
1294
|
+
return /* @__PURE__ */ X(tt, {
|
|
1295
|
+
container: a,
|
|
1296
|
+
children: /* @__PURE__ */ X(st, {
|
|
1297
|
+
align: e,
|
|
1298
|
+
alignItemWithTrigger: t,
|
|
1299
|
+
alignOffset: n,
|
|
1300
|
+
className: "isolate z-50",
|
|
1301
|
+
side: o,
|
|
1302
|
+
sideOffset: s,
|
|
1303
|
+
children: /* @__PURE__ */ we(mt, {
|
|
1304
|
+
"data-slot": "select-content",
|
|
1305
|
+
"data-align-trigger": t,
|
|
1306
|
+
className: I("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-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:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none motion-reduce:transition-none", i),
|
|
1307
|
+
...c,
|
|
1308
|
+
children: [
|
|
1309
|
+
/* @__PURE__ */ X(Vt, {}),
|
|
1310
|
+
/* @__PURE__ */ X(St, { children: r }),
|
|
1311
|
+
/* @__PURE__ */ X(Ht, {})
|
|
1312
|
+
]
|
|
1313
|
+
})
|
|
1314
|
+
})
|
|
1315
|
+
});
|
|
1316
|
+
}
|
|
1317
|
+
function Bt({ className: e, children: t, ...n }) {
|
|
1318
|
+
return /* @__PURE__ */ we(Tt, {
|
|
1319
|
+
"data-slot": "select-item",
|
|
1320
|
+
className: I("relative flex w-full 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 not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", e),
|
|
1321
|
+
...n,
|
|
1322
|
+
children: [/* @__PURE__ */ X(Ot, {
|
|
1323
|
+
className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap",
|
|
1324
|
+
children: t
|
|
1325
|
+
}), /* @__PURE__ */ X(Et, {
|
|
1326
|
+
render: /* @__PURE__ */ X("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
|
|
1327
|
+
children: /* @__PURE__ */ X(y, {})
|
|
1328
|
+
})]
|
|
1329
|
+
});
|
|
1330
|
+
}
|
|
1331
|
+
function Vt({ className: e, ...t }) {
|
|
1332
|
+
return /* @__PURE__ */ X(Mt, {
|
|
1333
|
+
"data-slot": "select-scroll-up-button",
|
|
1334
|
+
className: I("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", e),
|
|
1335
|
+
...t,
|
|
1336
|
+
children: /* @__PURE__ */ X(Te, {})
|
|
1337
|
+
});
|
|
1338
|
+
}
|
|
1339
|
+
function Ht({ className: e, ...t }) {
|
|
1340
|
+
return /* @__PURE__ */ X(jt, {
|
|
1341
|
+
"data-slot": "select-scroll-down-button",
|
|
1342
|
+
className: I("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", e),
|
|
1343
|
+
...t,
|
|
1344
|
+
children: /* @__PURE__ */ X(_, {})
|
|
1345
|
+
});
|
|
1346
|
+
}
|
|
1347
|
+
//#endregion
|
|
1348
|
+
//#region src/workbench/browser/runtime/shell/workbenchSelect.tsx
|
|
1349
|
+
function Ut({ ariaLabel: e, className: t, disabled: n = !1, id: r, onValueChange: i, options: a, portalRoot: o, value: s }) {
|
|
1350
|
+
return /* @__PURE__ */ we(Ft, {
|
|
1351
|
+
disabled: n,
|
|
1352
|
+
onValueChange: (e) => {
|
|
1353
|
+
e != null && i(e);
|
|
1354
|
+
},
|
|
1355
|
+
value: s,
|
|
1356
|
+
children: [/* @__PURE__ */ X(Rt, {
|
|
1357
|
+
"aria-label": e,
|
|
1358
|
+
className: I("min-w-32", t),
|
|
1359
|
+
id: r,
|
|
1360
|
+
children: /* @__PURE__ */ X(Lt, { children: a.find((e) => e.value == s)?.label ?? s })
|
|
1361
|
+
}), /* @__PURE__ */ X(zt, {
|
|
1362
|
+
align: "end",
|
|
1363
|
+
alignItemWithTrigger: !1,
|
|
1364
|
+
container: o,
|
|
1365
|
+
children: /* @__PURE__ */ X(It, { children: a.map((e) => /* @__PURE__ */ X(Bt, {
|
|
1366
|
+
disabled: e.disabled,
|
|
1367
|
+
value: e.value,
|
|
1368
|
+
children: e.label
|
|
1369
|
+
}, e.value)) })
|
|
1370
|
+
})]
|
|
1371
|
+
});
|
|
1372
|
+
}
|
|
1373
|
+
//#endregion
|
|
1374
|
+
export { Ut as t };
|