@middag-io/react 0.42.0 → 0.43.0
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/dist-lib/{DateField-x0Ot_z_i.js → DateField-lPZsiWfC.js} +5 -5
- package/dist-lib/{DateRangeField-DbWZ2f92.js → DateRangeField-B7zWB48D.js} +12 -8
- package/dist-lib/{DocumentField-fwq79IWM.js → DocumentField-DutGscEM.js} +3 -3
- package/dist-lib/{FormField-BDWkyFcl.js → FormField-ChfKYVSc.js} +3735 -2633
- package/dist-lib/{FormPanelBlock-mIvZ0IFE.js → FormPanelBlock-Cu2ATcpu.js} +71 -71
- package/dist-lib/{PhoneField-DZQc97Eo.js → PhoneField-CP13cgq1.js} +2867 -2870
- package/dist-lib/base/form/fields/EntityPickerField.d.ts.map +1 -1
- package/dist-lib/base/shell/BasicShell.js +1 -1
- package/dist-lib/base/shell/partials/EditablePanelProvider.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/EditablePanelProvider.js +55 -54
- package/dist-lib/base/shell/partials/InlineEditablePanel.js +345 -343
- package/dist-lib/base/shell/partials/PageActionButton.js +2 -1
- package/dist-lib/base/utils/time.js +26 -26
- package/dist-lib/{button-CxyXN3nw.js → button-PJdZDEA8.js} +4 -4
- package/dist-lib/{calendar-BStHDcu3.js → calendar-CFrEYtPR.js} +22 -21
- package/dist-lib/{chevron-right-t5ALKicc.js → chevron-right-Dt7yZRj6.js} +1 -1
- package/dist-lib/chunks/{subpath-BhcZoWUz.js → subpath-BYl-9lKg.js} +1 -1
- package/dist-lib/{combobox-RfE54yDL.js → combobox-Dk1Mr_PH.js} +1055 -1058
- package/dist-lib/{dist-tanBwm1t.js → dist-CJ4YN5HQ.js} +5 -5
- package/dist-lib/{dist-BUns-jcX.js → dist-Cwj39GRS.js} +1 -1
- package/dist-lib/{dist-axU0pUop.js → dist-CyQnd0TP.js} +4 -4
- package/dist-lib/{dist-EdxoDTPy.js → dist-DUhG8dAI.js} +2 -2
- package/dist-lib/{document-validation-BSjTDZhG.js → document-validation-D1y_WEv5.js} +4 -4
- package/dist-lib/{floating-ui.react-dom-CNntavPo.js → floating-ui.react-dom-BASAHo_L.js} +3 -3
- package/dist-lib/i18n/I18nProvider.js +1 -1
- package/dist-lib/i18n/instance.js +1 -1
- package/dist-lib/i18n/register-strings.js +1 -1
- package/dist-lib/index.d.ts +1 -0
- package/dist-lib/index.d.ts.map +1 -1
- package/dist-lib/{input-DpHIBsEp.js → input-D1w5GXsE.js} +1 -1
- package/dist-lib/lib/host-pending.d.ts +32 -0
- package/dist-lib/lib/host-pending.d.ts.map +1 -0
- package/dist-lib/lib/host-pending.js +35 -0
- package/dist-lib/middag-react.js +21378 -7913
- package/dist-lib/{popover-CD3HfW3f.js → popover-7VNShhWQ.js} +6 -6
- package/dist-lib/primitives/reui/chart.js +12 -12
- package/dist-lib/primitives/reui/data-grid/data-grid-column-header.js +2 -2
- package/dist-lib/primitives/reui/data-grid/data-grid-pagination.js +28 -28
- package/dist-lib/primitives/reui/data-grid/data-grid-scroll-area.js +2 -2
- package/dist-lib/primitives/reui/data-grid/data-grid-table-dnd-rows.js +1 -1
- package/dist-lib/primitives/reui/data-grid/data-grid-table-dnd.js +2 -2
- package/dist-lib/primitives/reui/data-grid/data-grid-table-virtual.js +1 -1
- package/dist-lib/primitives/reui/data-grid/data-grid-table.js +5 -5
- package/dist-lib/primitives/reui/data-grid-pagination.js +28 -28
- package/dist-lib/primitives/reui/date-selector.js +5 -1
- package/dist-lib/primitives/reui/filters.js +24 -24
- package/dist-lib/primitives/reui/scrollspy.js +3 -1
- package/dist-lib/primitives/reui/stepper.js +23 -23
- package/dist-lib/primitives/reui/tree.js +7 -7
- package/dist-lib/{chunk-DeC0fbbY.js → rolldown-runtime-CWhphoD1.js} +1 -1
- package/dist-lib/{scroll-area-C_NPU_rI.js → scroll-area-CcAvV3Hh.js} +14 -8
- package/dist-lib/{skeleton-DXDJbb2L.js → skeleton-DP7igcN6.js} +1 -1
- package/dist-lib/{use-mobile-B18-3oTE.js → use-mobile-CqtqNcAV.js} +5 -5
- package/dist-lib/{utils-CpaZ5_iF.js → utils-DXlQmFY8.js} +2 -2
- package/package.json +4 -1
- package/dist-lib/MarkdownContent-DgypTiL-.js +0 -13507
- /package/dist-lib/{HugeiconsIcon-CKqc2W1S.js → HugeiconsIcon-C9KGSkIu.js} +0 -0
- /package/dist-lib/chunks/{subpath-B9beWkb2.js → subpath-AeMdleNB.js} +0 -0
- /package/dist-lib/chunks/{subpath-55YUOrvG.js → subpath-CJyJeTlw.js} +0 -0
- /package/dist-lib/chunks/{subpath--GXsYu-v.js → subpath-DjkzcIPp.js} +0 -0
- /package/dist-lib/chunks/{subpath-B30yU5uo.js → subpath-DoiyWIYV.js} +0 -0
- /package/dist-lib/chunks/{subpath-7b9-j7in.js → subpath-YbXSVoyF.js} +0 -0
- /package/dist-lib/chunks/{subpath-52vC0Fzu.js → subpath-oMCFwhdB.js} +0 -0
- /package/dist-lib/{dist-3F0-lo64.js → dist-BxFR7CYi.js} +0 -0
- /package/dist-lib/{useTranslation-D-tjJhTn.js → useTranslation-u1Lygbup.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as e, t } from "./
|
|
2
|
-
import { g as n, h as r, m as i, t as a } from "./button-
|
|
3
|
-
import { t as o } from "./utils-
|
|
4
|
-
import { C as s, D as c, E as l, O as u, S as d, T as f, _ as p, a as m, b as h, c as g, d as _, f as v, g as y, h as b, i as x, k as S, l as C, m as w, n as ee, o as te, p as T, r as E, s as D, u as O, v as k, w as A, x as j, y as M } from "./floating-ui.react-dom-
|
|
5
|
-
import { t as ne } from "./input-
|
|
1
|
+
import { r as e, t } from "./rolldown-runtime-CWhphoD1.js";
|
|
2
|
+
import { g as n, h as r, m as i, t as a } from "./button-PJdZDEA8.js";
|
|
3
|
+
import { t as o } from "./utils-DXlQmFY8.js";
|
|
4
|
+
import { C as s, D as c, E as l, O as u, S as d, T as f, _ as p, a as m, b as h, c as g, d as _, f as v, g as y, h as b, i as x, k as S, l as C, m as w, n as ee, o as te, p as T, r as E, s as D, u as O, v as k, w as A, x as j, y as M } from "./floating-ui.react-dom-BASAHo_L.js";
|
|
5
|
+
import { t as ne } from "./input-D1w5GXsE.js";
|
|
6
6
|
import * as N from "react";
|
|
7
7
|
import { createElement as P } from "react";
|
|
8
8
|
import { jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
@@ -10,13 +10,13 @@ import * as L from "react-dom";
|
|
|
10
10
|
var R = n("check", [["path", {
|
|
11
11
|
d: "M20 6 9 17l-5-5",
|
|
12
12
|
key: "1gmf2c"
|
|
13
|
-
}]]),
|
|
13
|
+
}]]), re = n("x", [["path", {
|
|
14
14
|
d: "M18 6 6 18",
|
|
15
15
|
key: "1bl5f8"
|
|
16
16
|
}], ["path", {
|
|
17
17
|
d: "m6 6 12 12",
|
|
18
18
|
key: "d8bk6v"
|
|
19
|
-
}]]),
|
|
19
|
+
}]]), ie = /* @__PURE__ */ t(((t) => {
|
|
20
20
|
var n = e("react");
|
|
21
21
|
function r(e, t) {
|
|
22
22
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
@@ -54,7 +54,7 @@ var R = n("check", [["path", {
|
|
|
54
54
|
}
|
|
55
55
|
var f = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? d : l;
|
|
56
56
|
t.useSyncExternalStore = n.useSyncExternalStore === void 0 ? f : n.useSyncExternalStore;
|
|
57
|
-
})),
|
|
57
|
+
})), ae = /* @__PURE__ */ t(((t) => {
|
|
58
58
|
process.env.NODE_ENV !== "production" && (function() {
|
|
59
59
|
function n(e, t) {
|
|
60
60
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
@@ -100,10 +100,10 @@ var R = n("check", [["path", {
|
|
|
100
100
|
var o = e("react"), s = typeof Object.is == "function" ? Object.is : n, c = o.useState, l = o.useEffect, u = o.useLayoutEffect, d = o.useDebugValue, f = !1, p = !1, m = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? a : r;
|
|
101
101
|
t.useSyncExternalStore = o.useSyncExternalStore === void 0 ? m : o.useSyncExternalStore, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
102
102
|
})();
|
|
103
|
-
})),
|
|
104
|
-
process.env.NODE_ENV === "production" ? t.exports =
|
|
105
|
-
})),
|
|
106
|
-
var n = e("react"), r =
|
|
103
|
+
})), z = /* @__PURE__ */ t(((e, t) => {
|
|
104
|
+
process.env.NODE_ENV === "production" ? t.exports = ie() : t.exports = ae();
|
|
105
|
+
})), oe = /* @__PURE__ */ t(((t) => {
|
|
106
|
+
var n = e("react"), r = z();
|
|
107
107
|
function i(e, t) {
|
|
108
108
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
109
109
|
}
|
|
@@ -147,13 +147,13 @@ var R = n("check", [["path", {
|
|
|
147
147
|
f.hasValue = !0, f.value = p;
|
|
148
148
|
}, [p]), u(p), p;
|
|
149
149
|
};
|
|
150
|
-
})),
|
|
150
|
+
})), se = /* @__PURE__ */ t(((t) => {
|
|
151
151
|
process.env.NODE_ENV !== "production" && (function() {
|
|
152
152
|
function n(e, t) {
|
|
153
153
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
154
154
|
}
|
|
155
155
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
156
|
-
var r = e("react"), i =
|
|
156
|
+
var r = e("react"), i = z(), a = typeof Object.is == "function" ? Object.is : n, o = i.useSyncExternalStore, s = r.useRef, c = r.useEffect, l = r.useMemo, u = r.useDebugValue;
|
|
157
157
|
t.useSyncExternalStoreWithSelector = function(e, t, n, r, i) {
|
|
158
158
|
var d = s(null);
|
|
159
159
|
if (d.current === null) {
|
|
@@ -194,12 +194,10 @@ var R = n("check", [["path", {
|
|
|
194
194
|
}, [p]), u(p), p;
|
|
195
195
|
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
196
196
|
})();
|
|
197
|
-
})),
|
|
198
|
-
process.env.NODE_ENV === "production" ? t.exports =
|
|
199
|
-
}));
|
|
200
|
-
|
|
201
|
-
//#region src/primitives/reui/textarea.tsx
|
|
202
|
-
function se({ className: e, ...t }) {
|
|
197
|
+
})), B = /* @__PURE__ */ t(((e, t) => {
|
|
198
|
+
process.env.NODE_ENV === "production" ? t.exports = oe() : t.exports = se();
|
|
199
|
+
})), ce = z(), le = B();
|
|
200
|
+
function ue({ className: e, ...t }) {
|
|
203
201
|
return /* @__PURE__ */ F("textarea", {
|
|
204
202
|
"data-slot": "textarea",
|
|
205
203
|
className: o("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40", e),
|
|
@@ -208,7 +206,7 @@ function se({ className: e, ...t }) {
|
|
|
208
206
|
}
|
|
209
207
|
//#endregion
|
|
210
208
|
//#region src/primitives/reui/input-group.tsx
|
|
211
|
-
function
|
|
209
|
+
function V({ className: e, ...t }) {
|
|
212
210
|
return /* @__PURE__ */ F("div", {
|
|
213
211
|
"data-slot": "input-group",
|
|
214
212
|
role: "group",
|
|
@@ -216,7 +214,7 @@ function ce({ className: e, ...t }) {
|
|
|
216
214
|
...t
|
|
217
215
|
});
|
|
218
216
|
}
|
|
219
|
-
var
|
|
217
|
+
var de = i("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
|
|
220
218
|
variants: { align: {
|
|
221
219
|
"inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
|
|
222
220
|
"inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
|
|
@@ -225,19 +223,19 @@ var le = i("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 tex
|
|
|
225
223
|
} },
|
|
226
224
|
defaultVariants: { align: "inline-start" }
|
|
227
225
|
});
|
|
228
|
-
function
|
|
226
|
+
function fe({ className: e, align: t = "inline-start", ...n }) {
|
|
229
227
|
return /* @__PURE__ */ F("div", {
|
|
230
228
|
role: "group",
|
|
231
229
|
"data-slot": "input-group-addon",
|
|
232
230
|
"data-align": t,
|
|
233
|
-
className: o(
|
|
231
|
+
className: o(de({ align: t }), e),
|
|
234
232
|
onClick: (e) => {
|
|
235
233
|
e.target.closest("button") || e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
236
234
|
},
|
|
237
235
|
...n
|
|
238
236
|
});
|
|
239
237
|
}
|
|
240
|
-
var
|
|
238
|
+
var pe = i("flex items-center gap-2 text-sm shadow-none", {
|
|
241
239
|
variants: { size: {
|
|
242
240
|
xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
|
|
243
241
|
sm: "h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5",
|
|
@@ -246,22 +244,22 @@ var de = i("flex items-center gap-2 text-sm shadow-none", {
|
|
|
246
244
|
} },
|
|
247
245
|
defaultVariants: { size: "xs" }
|
|
248
246
|
});
|
|
249
|
-
function
|
|
247
|
+
function me({ className: e, type: t = "button", variant: n = "ghost", size: r = "xs", ...i }) {
|
|
250
248
|
return /* @__PURE__ */ F(a, {
|
|
251
249
|
type: t,
|
|
252
250
|
"data-size": r,
|
|
253
251
|
variant: n,
|
|
254
|
-
className: o(
|
|
252
|
+
className: o(pe({ size: r }), e),
|
|
255
253
|
...i
|
|
256
254
|
});
|
|
257
255
|
}
|
|
258
|
-
function
|
|
256
|
+
function he({ className: e, ...t }) {
|
|
259
257
|
return /* @__PURE__ */ F("span", {
|
|
260
258
|
className: o("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", e),
|
|
261
259
|
...t
|
|
262
260
|
});
|
|
263
261
|
}
|
|
264
|
-
function
|
|
262
|
+
function ge({ className: e, ...t }) {
|
|
265
263
|
return /* @__PURE__ */ F(ne, {
|
|
266
264
|
"data-slot": "input-group-control",
|
|
267
265
|
className: o("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent", e),
|
|
@@ -270,21 +268,21 @@ function me({ className: e, ...t }) {
|
|
|
270
268
|
}
|
|
271
269
|
//#endregion
|
|
272
270
|
//#region node_modules/@base-ui/utils/esm/error.js
|
|
273
|
-
var
|
|
274
|
-
process.env.NODE_ENV !== "production" && (
|
|
275
|
-
function
|
|
271
|
+
var _e;
|
|
272
|
+
process.env.NODE_ENV !== "production" && (_e = /* @__PURE__ */ new Set());
|
|
273
|
+
function ve(...e) {
|
|
276
274
|
if (process.env.NODE_ENV !== "production") {
|
|
277
275
|
let t = e.join(" ");
|
|
278
|
-
|
|
276
|
+
_e.has(t) || (_e.add(t), console.error(`Base UI: ${t}`));
|
|
279
277
|
}
|
|
280
278
|
}
|
|
281
279
|
//#endregion
|
|
282
280
|
//#region node_modules/@base-ui/utils/esm/useControlled.js
|
|
283
|
-
function
|
|
281
|
+
function ye({ controlled: e, default: t, name: n, state: r = "value" }) {
|
|
284
282
|
let { current: i } = N.useRef(e !== void 0), [a, o] = N.useState(t), s = i ? e : a;
|
|
285
283
|
if (process.env.NODE_ENV !== "production") {
|
|
286
284
|
N.useEffect(() => {
|
|
287
|
-
i !== (e !== void 0) &&
|
|
285
|
+
i !== (e !== void 0) && ve([
|
|
288
286
|
`A component is changing the ${i ? "" : "un"}controlled ${r} state of ${n} to be ${i ? "un" : ""}controlled.`,
|
|
289
287
|
"Elements should not switch from uncontrolled to controlled (or vice versa).",
|
|
290
288
|
`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,
|
|
@@ -298,14 +296,14 @@ function _e({ controlled: e, default: t, name: n, state: r = "value" }) {
|
|
|
298
296
|
]);
|
|
299
297
|
let { current: a } = N.useRef(t);
|
|
300
298
|
N.useEffect(() => {
|
|
301
|
-
!i &&
|
|
299
|
+
!i && be(a) !== be(t) && ve([`A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join("\n"));
|
|
302
300
|
}, [t]);
|
|
303
301
|
}
|
|
304
302
|
return [s, N.useCallback((e) => {
|
|
305
303
|
i || o(e);
|
|
306
304
|
}, [])];
|
|
307
305
|
}
|
|
308
|
-
function
|
|
306
|
+
function be(e) {
|
|
309
307
|
let t = 0, n = /* @__PURE__ */ new WeakMap();
|
|
310
308
|
try {
|
|
311
309
|
return JSON.stringify(e, function(e, r) {
|
|
@@ -325,22 +323,22 @@ function ve(e) {
|
|
|
325
323
|
}
|
|
326
324
|
//#endregion
|
|
327
325
|
//#region node_modules/@base-ui/utils/esm/useRefWithInit.js
|
|
328
|
-
var
|
|
329
|
-
function
|
|
330
|
-
let n = N.useRef(
|
|
331
|
-
return n.current ===
|
|
326
|
+
var xe = {};
|
|
327
|
+
function Se(e, t) {
|
|
328
|
+
let n = N.useRef(xe);
|
|
329
|
+
return n.current === xe && (n.current = e(t)), n;
|
|
332
330
|
}
|
|
333
331
|
//#endregion
|
|
334
332
|
//#region node_modules/@base-ui/utils/esm/useStableCallback.js
|
|
335
|
-
var
|
|
333
|
+
var Ce = N[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0, -3)], we = Ce && Ce !== N.useLayoutEffect ? Ce : (e) => e();
|
|
336
334
|
function H(e) {
|
|
337
|
-
let t =
|
|
338
|
-
return t.next = e,
|
|
335
|
+
let t = Se(Te).current;
|
|
336
|
+
return t.next = e, we(t.effect), t.trampoline;
|
|
339
337
|
}
|
|
340
|
-
function
|
|
338
|
+
function Te() {
|
|
341
339
|
let e = {
|
|
342
340
|
next: void 0,
|
|
343
|
-
callback:
|
|
341
|
+
callback: Ee,
|
|
344
342
|
trampoline: (...t) => e.callback?.(...t),
|
|
345
343
|
effect: () => {
|
|
346
344
|
e.callback = e.next;
|
|
@@ -348,40 +346,40 @@ function Ce() {
|
|
|
348
346
|
};
|
|
349
347
|
return e;
|
|
350
348
|
}
|
|
351
|
-
function
|
|
349
|
+
function Ee() {
|
|
352
350
|
if (process.env.NODE_ENV !== "production") throw Error("Base UI: Cannot call an event handler while rendering.");
|
|
353
351
|
}
|
|
354
|
-
var U = typeof document < "u" ? N.useLayoutEffect : () => {},
|
|
355
|
-
process.env.NODE_ENV !== "production" && (
|
|
356
|
-
function
|
|
352
|
+
var U = typeof document < "u" ? N.useLayoutEffect : () => {}, De;
|
|
353
|
+
process.env.NODE_ENV !== "production" && (De = /* @__PURE__ */ new Set());
|
|
354
|
+
function Oe(...e) {
|
|
357
355
|
if (process.env.NODE_ENV !== "production") {
|
|
358
356
|
let t = e.join(" ");
|
|
359
|
-
|
|
357
|
+
De.has(t) || (De.add(t), console.warn(`Base UI: ${t}`));
|
|
360
358
|
}
|
|
361
359
|
}
|
|
362
360
|
//#endregion
|
|
363
361
|
//#region node_modules/@base-ui/react/esm/internals/composite/list/CompositeListContext.js
|
|
364
|
-
var
|
|
362
|
+
var ke = /*#__PURE__*/ N.createContext({
|
|
365
363
|
register: () => {},
|
|
366
364
|
unregister: () => {},
|
|
367
365
|
subscribeMapChange: () => () => {},
|
|
368
366
|
elementsRef: { current: [] },
|
|
369
367
|
nextIndexRef: { current: 0 }
|
|
370
368
|
});
|
|
371
|
-
process.env.NODE_ENV !== "production" && (
|
|
372
|
-
function
|
|
373
|
-
return N.useContext(
|
|
369
|
+
process.env.NODE_ENV !== "production" && (ke.displayName = "CompositeListContext");
|
|
370
|
+
function Ae() {
|
|
371
|
+
return N.useContext(ke);
|
|
374
372
|
}
|
|
375
373
|
//#endregion
|
|
376
374
|
//#region node_modules/@base-ui/react/esm/internals/composite/list/CompositeList.js
|
|
377
|
-
function
|
|
378
|
-
let { children: t, elementsRef: n, labelsRef: r, onMapChange: i } = e, a = H(i), o = N.useRef(0), s =
|
|
375
|
+
function je(e) {
|
|
376
|
+
let { children: t, elementsRef: n, labelsRef: r, onMapChange: i } = e, a = H(i), o = N.useRef(0), s = Se(Ne).current, c = Se(Me).current, [l, u] = N.useState(0), d = N.useRef(l), f = H((e, t) => {
|
|
379
377
|
c.set(e, t ?? null), d.current += 1, u(d.current);
|
|
380
378
|
}), p = H((e) => {
|
|
381
379
|
c.delete(e), d.current += 1, u(d.current);
|
|
382
380
|
}), m = N.useMemo(() => {
|
|
383
381
|
let e = /* @__PURE__ */ new Map();
|
|
384
|
-
return Array.from(c.keys()).filter((e) => e.isConnected).sort(
|
|
382
|
+
return Array.from(c.keys()).filter((e) => e.isConnected).sort(Pe).forEach((t, n) => {
|
|
385
383
|
let r = c.get(t) ?? {};
|
|
386
384
|
e.set(t, {
|
|
387
385
|
...r,
|
|
@@ -436,66 +434,66 @@ function ke(e) {
|
|
|
436
434
|
r,
|
|
437
435
|
o
|
|
438
436
|
]);
|
|
439
|
-
return
|
|
437
|
+
return /*#__PURE__*/ F(ke.Provider, {
|
|
440
438
|
value: g,
|
|
441
439
|
children: t
|
|
442
440
|
});
|
|
443
441
|
}
|
|
444
|
-
function
|
|
442
|
+
function Me() {
|
|
445
443
|
return /* @__PURE__ */ new Map();
|
|
446
444
|
}
|
|
447
|
-
function
|
|
445
|
+
function Ne() {
|
|
448
446
|
return /* @__PURE__ */ new Set();
|
|
449
447
|
}
|
|
450
|
-
function
|
|
448
|
+
function Pe(e, t) {
|
|
451
449
|
let n = e.compareDocumentPosition(t);
|
|
452
450
|
return n & Node.DOCUMENT_POSITION_FOLLOWING || n & Node.DOCUMENT_POSITION_CONTAINED_BY ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING || n & Node.DOCUMENT_POSITION_CONTAINS ? 1 : 0;
|
|
453
451
|
}
|
|
454
452
|
//#endregion
|
|
455
453
|
//#region node_modules/@base-ui/react/esm/internals/direction-context/DirectionContext.js
|
|
456
|
-
var
|
|
457
|
-
process.env.NODE_ENV !== "production" && (
|
|
458
|
-
function
|
|
459
|
-
return N.useContext(
|
|
454
|
+
var Fe = /*#__PURE__*/ N.createContext(void 0);
|
|
455
|
+
process.env.NODE_ENV !== "production" && (Fe.displayName = "DirectionContext");
|
|
456
|
+
function Ie() {
|
|
457
|
+
return N.useContext(Fe)?.direction ?? "ltr";
|
|
460
458
|
}
|
|
461
459
|
//#endregion
|
|
462
460
|
//#region node_modules/@base-ui/utils/esm/formatErrorMessage.js
|
|
463
|
-
function
|
|
461
|
+
function Le(e, t) {
|
|
464
462
|
return function(n, ...r) {
|
|
465
463
|
let i = new URL(e);
|
|
466
464
|
return i.searchParams.set("code", n.toString()), r.forEach((e) => i.searchParams.append("args[]", e)), `${t} error #${n}; visit ${i} for the full message.`;
|
|
467
465
|
};
|
|
468
466
|
}
|
|
469
|
-
var
|
|
467
|
+
var W = Le("https://base-ui.com/production-error", "Base UI");
|
|
470
468
|
//#endregion
|
|
471
469
|
//#region node_modules/@base-ui/utils/esm/useMergedRefs.js
|
|
472
|
-
function
|
|
473
|
-
let i =
|
|
474
|
-
return
|
|
470
|
+
function Re(e, t, n, r) {
|
|
471
|
+
let i = Se(Be).current;
|
|
472
|
+
return Ve(i, e, t, n, r) && G(i, [
|
|
475
473
|
e,
|
|
476
474
|
t,
|
|
477
475
|
n,
|
|
478
476
|
r
|
|
479
477
|
]), i.callback;
|
|
480
478
|
}
|
|
481
|
-
function
|
|
482
|
-
let t =
|
|
483
|
-
return
|
|
479
|
+
function ze(e) {
|
|
480
|
+
let t = Se(Be).current;
|
|
481
|
+
return He(t, e) && G(t, e), t.callback;
|
|
484
482
|
}
|
|
485
|
-
function
|
|
483
|
+
function Be() {
|
|
486
484
|
return {
|
|
487
485
|
callback: null,
|
|
488
486
|
cleanup: null,
|
|
489
487
|
refs: []
|
|
490
488
|
};
|
|
491
489
|
}
|
|
492
|
-
function
|
|
490
|
+
function Ve(e, t, n, r, i) {
|
|
493
491
|
return e.refs[0] !== t || e.refs[1] !== n || e.refs[2] !== r || e.refs[3] !== i;
|
|
494
492
|
}
|
|
495
|
-
function
|
|
493
|
+
function He(e, t) {
|
|
496
494
|
return e.refs.length !== t.length || e.refs.some((e, n) => e !== t[n]);
|
|
497
495
|
}
|
|
498
|
-
function
|
|
496
|
+
function G(e, t) {
|
|
499
497
|
if (e.refs = t, t.every((e) => e == null)) {
|
|
500
498
|
e.callback = null;
|
|
501
499
|
return;
|
|
@@ -539,19 +537,19 @@ function He(e, t) {
|
|
|
539
537
|
//#endregion
|
|
540
538
|
//#region node_modules/@base-ui/utils/esm/reactVersion.js
|
|
541
539
|
var Ue = parseInt(N.version, 10);
|
|
542
|
-
function
|
|
540
|
+
function We(e) {
|
|
543
541
|
return Ue >= e;
|
|
544
542
|
}
|
|
545
543
|
//#endregion
|
|
546
544
|
//#region node_modules/@base-ui/utils/esm/getReactElementRef.js
|
|
547
|
-
function
|
|
548
|
-
if (
|
|
545
|
+
function Ge(e) {
|
|
546
|
+
if (!/*#__PURE__*/ N.isValidElement(e)) return null;
|
|
549
547
|
let t = e, n = t.props;
|
|
550
|
-
return (
|
|
548
|
+
return (We(19) ? n?.ref : t.ref) ?? null;
|
|
551
549
|
}
|
|
552
550
|
//#endregion
|
|
553
551
|
//#region node_modules/@base-ui/utils/esm/mergeObjects.js
|
|
554
|
-
function
|
|
552
|
+
function Ke(e, t) {
|
|
555
553
|
if (e && !t) return e;
|
|
556
554
|
if (!e && t) return t;
|
|
557
555
|
if (e || t) return {
|
|
@@ -561,11 +559,11 @@ function Ge(e, t) {
|
|
|
561
559
|
}
|
|
562
560
|
//#endregion
|
|
563
561
|
//#region node_modules/@base-ui/utils/esm/empty.js
|
|
564
|
-
function
|
|
565
|
-
var
|
|
562
|
+
function qe() {}
|
|
563
|
+
var Je = Object.freeze([]), Ye = Object.freeze({});
|
|
566
564
|
//#endregion
|
|
567
565
|
//#region node_modules/@base-ui/react/esm/internals/getStateAttributesProps.js
|
|
568
|
-
function
|
|
566
|
+
function Xe(e, t) {
|
|
569
567
|
let n = {};
|
|
570
568
|
for (let r in e) {
|
|
571
569
|
let i = e[r];
|
|
@@ -580,155 +578,155 @@ function Je(e, t) {
|
|
|
580
578
|
}
|
|
581
579
|
//#endregion
|
|
582
580
|
//#region node_modules/@base-ui/react/esm/utils/resolveClassName.js
|
|
583
|
-
function
|
|
581
|
+
function Ze(e, t) {
|
|
584
582
|
return typeof e == "function" ? e(t) : e;
|
|
585
583
|
}
|
|
586
584
|
//#endregion
|
|
587
585
|
//#region node_modules/@base-ui/react/esm/utils/resolveStyle.js
|
|
588
|
-
function
|
|
586
|
+
function Qe(e, t) {
|
|
589
587
|
return typeof e == "function" ? e(t) : e;
|
|
590
588
|
}
|
|
591
589
|
//#endregion
|
|
592
590
|
//#region node_modules/@base-ui/react/esm/merge-props/mergeProps.js
|
|
593
|
-
var
|
|
594
|
-
function
|
|
595
|
-
if (!n && !r && !i && !e) return
|
|
596
|
-
let a =
|
|
597
|
-
return t && (a =
|
|
598
|
-
}
|
|
599
|
-
function
|
|
600
|
-
if (e.length === 0) return
|
|
601
|
-
if (e.length === 1) return
|
|
602
|
-
let t =
|
|
603
|
-
for (let n = 1; n < e.length; n += 1) t =
|
|
591
|
+
var $e = {};
|
|
592
|
+
function et(e, t, n, r, i) {
|
|
593
|
+
if (!n && !r && !i && !e) return nt(t);
|
|
594
|
+
let a = nt(e);
|
|
595
|
+
return t && (a = rt(a, t)), n && (a = rt(a, n)), r && (a = rt(a, r)), i && (a = rt(a, i)), a;
|
|
596
|
+
}
|
|
597
|
+
function tt(e) {
|
|
598
|
+
if (e.length === 0) return $e;
|
|
599
|
+
if (e.length === 1) return nt(e[0]);
|
|
600
|
+
let t = nt(e[0]);
|
|
601
|
+
for (let n = 1; n < e.length; n += 1) t = rt(t, e[n]);
|
|
604
602
|
return t;
|
|
605
603
|
}
|
|
606
|
-
function
|
|
607
|
-
return
|
|
604
|
+
function nt(e) {
|
|
605
|
+
return st(e) ? { ...K(e, $e) } : it(e);
|
|
608
606
|
}
|
|
609
|
-
function
|
|
610
|
-
return
|
|
607
|
+
function rt(e, t) {
|
|
608
|
+
return st(t) ? K(t, e) : at(e, t);
|
|
611
609
|
}
|
|
612
|
-
function
|
|
610
|
+
function it(e) {
|
|
613
611
|
let t = { ...e };
|
|
614
612
|
for (let e in t) {
|
|
615
613
|
let n = t[e];
|
|
616
|
-
|
|
614
|
+
ot(e, n) && (t[e] = lt(n));
|
|
617
615
|
}
|
|
618
616
|
return t;
|
|
619
617
|
}
|
|
620
|
-
function
|
|
618
|
+
function at(e, t) {
|
|
621
619
|
if (!t) return e;
|
|
622
620
|
for (let n in t) {
|
|
623
621
|
let r = t[n];
|
|
624
622
|
switch (n) {
|
|
625
623
|
case "style":
|
|
626
|
-
e[n] =
|
|
624
|
+
e[n] = Ke(e.style, r);
|
|
627
625
|
break;
|
|
628
626
|
case "className":
|
|
629
|
-
e[n] =
|
|
627
|
+
e[n] = dt(e.className, r);
|
|
630
628
|
break;
|
|
631
|
-
default:
|
|
629
|
+
default: ot(n, r) ? e[n] = ct(e[n], r) : e[n] = r;
|
|
632
630
|
}
|
|
633
631
|
}
|
|
634
632
|
return e;
|
|
635
633
|
}
|
|
636
|
-
function
|
|
634
|
+
function ot(e, t) {
|
|
637
635
|
let n = e.charCodeAt(0), r = e.charCodeAt(1), i = e.charCodeAt(2);
|
|
638
636
|
return n === 111 && r === 110 && i >= 65 && i <= 90 && (typeof t == "function" || t === void 0);
|
|
639
637
|
}
|
|
640
|
-
function
|
|
638
|
+
function st(e) {
|
|
641
639
|
return typeof e == "function";
|
|
642
640
|
}
|
|
643
|
-
function
|
|
644
|
-
return
|
|
641
|
+
function K(e, t) {
|
|
642
|
+
return st(e) ? e(t) : e ?? $e;
|
|
645
643
|
}
|
|
646
|
-
function
|
|
644
|
+
function ct(e, t) {
|
|
647
645
|
return t ? e ? (...n) => {
|
|
648
646
|
let r = n[0];
|
|
649
|
-
if (
|
|
647
|
+
if (ft(r)) {
|
|
650
648
|
let i = r;
|
|
651
|
-
|
|
649
|
+
ut(i);
|
|
652
650
|
let a = t(...n);
|
|
653
651
|
return i.baseUIHandlerPrevented || e?.(...n), a;
|
|
654
652
|
}
|
|
655
653
|
let i = t(...n);
|
|
656
654
|
return e?.(...n), i;
|
|
657
|
-
} :
|
|
655
|
+
} : lt(t) : e;
|
|
658
656
|
}
|
|
659
|
-
function
|
|
657
|
+
function lt(e) {
|
|
660
658
|
return e && ((...t) => {
|
|
661
659
|
let n = t[0];
|
|
662
|
-
return
|
|
660
|
+
return ft(n) && ut(n), e(...t);
|
|
663
661
|
});
|
|
664
662
|
}
|
|
665
|
-
function
|
|
663
|
+
function ut(e) {
|
|
666
664
|
return e.preventBaseUIHandler = () => {
|
|
667
665
|
e.baseUIHandlerPrevented = !0;
|
|
668
666
|
}, e;
|
|
669
667
|
}
|
|
670
|
-
function
|
|
668
|
+
function dt(e, t) {
|
|
671
669
|
return t ? e ? t + " " + e : t : e;
|
|
672
670
|
}
|
|
673
|
-
function
|
|
671
|
+
function ft(e) {
|
|
674
672
|
return typeof e == "object" && !!e && "nativeEvent" in e;
|
|
675
673
|
}
|
|
676
674
|
//#endregion
|
|
677
675
|
//#region node_modules/@base-ui/react/esm/internals/useRenderElement.js
|
|
678
|
-
function
|
|
679
|
-
let r = t.render, i =
|
|
680
|
-
return n.enabled === !1 ? null :
|
|
676
|
+
function pt(e, t, n = {}) {
|
|
677
|
+
let r = t.render, i = mt(t, n);
|
|
678
|
+
return n.enabled === !1 ? null : yt(e, r, i, n.state ?? Ye);
|
|
681
679
|
}
|
|
682
|
-
function
|
|
683
|
-
let { className: n, style: r, render: i } = e, { state: a =
|
|
684
|
-
return typeof document < "u" && (l ? Array.isArray(o) ? m.ref =
|
|
680
|
+
function mt(e, t = {}) {
|
|
681
|
+
let { className: n, style: r, render: i } = e, { state: a = Ye, ref: o, props: s, stateAttributesMapping: c, enabled: l = !0 } = t, u = l ? Ze(n, a) : void 0, d = l ? Qe(r, a) : void 0, f = l ? Xe(a, c) : Ye, p = l && s ? ht(s) : void 0, m = l ? Ke(f, p) ?? {} : Ye;
|
|
682
|
+
return typeof document < "u" && (l ? Array.isArray(o) ? m.ref = ze([
|
|
685
683
|
m.ref,
|
|
686
|
-
|
|
684
|
+
Ge(i),
|
|
687
685
|
...o
|
|
688
|
-
]) : m.ref =
|
|
686
|
+
]) : m.ref = Re(m.ref, Ge(i), o) : Re(null, null)), l ? (u !== void 0 && (m.className = dt(m.className, u)), d !== void 0 && (m.style = Ke(m.style, d)), m) : Ye;
|
|
689
687
|
}
|
|
690
|
-
function
|
|
691
|
-
return Array.isArray(e) ?
|
|
688
|
+
function ht(e) {
|
|
689
|
+
return Array.isArray(e) ? tt(e) : et(void 0, e);
|
|
692
690
|
}
|
|
693
|
-
var
|
|
694
|
-
function
|
|
691
|
+
var gt = Symbol.for("react.lazy"), _t = /^[A-Z][A-Za-z0-9$]*$/, vt = /[a-z]/;
|
|
692
|
+
function yt(e, t, n, r) {
|
|
695
693
|
if (t) {
|
|
696
|
-
if (typeof t == "function") return process.env.NODE_ENV !== "production" &&
|
|
697
|
-
let e =
|
|
694
|
+
if (typeof t == "function") return process.env.NODE_ENV !== "production" && bt(t), t(n, r);
|
|
695
|
+
let e = et(n, t.props);
|
|
698
696
|
e.ref = n.ref;
|
|
699
697
|
let i = t;
|
|
700
|
-
if (i?.$$typeof ===
|
|
698
|
+
if (i?.$$typeof === gt && (i = N.Children.toArray(t)[0]), process.env.NODE_ENV !== "production" && !/*#__PURE__*/ N.isValidElement(i)) throw Error([
|
|
701
699
|
"Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.",
|
|
702
700
|
"A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.",
|
|
703
701
|
"https://base-ui.com/r/invalid-render-prop"
|
|
704
702
|
].join("\n"));
|
|
705
|
-
return
|
|
703
|
+
return /*#__PURE__*/ N.cloneElement(i, e);
|
|
706
704
|
}
|
|
707
|
-
if (e && typeof e == "string") return
|
|
708
|
-
throw Error(process.env.NODE_ENV === "production" ?
|
|
705
|
+
if (e && typeof e == "string") return xt(e, n);
|
|
706
|
+
throw Error(process.env.NODE_ENV === "production" ? W(8) : "Base UI: Render element or function are not defined.");
|
|
709
707
|
}
|
|
710
|
-
function
|
|
708
|
+
function bt(e) {
|
|
711
709
|
let t = e.name;
|
|
712
|
-
t.length !== 0 &&
|
|
710
|
+
t.length !== 0 && _t.test(t) && vt.test(t) && Oe(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop");
|
|
713
711
|
}
|
|
714
|
-
function
|
|
715
|
-
return e === "button" ?
|
|
712
|
+
function xt(e, t) {
|
|
713
|
+
return e === "button" ? /*#__PURE__*/ P("button", {
|
|
716
714
|
type: "button",
|
|
717
715
|
...t,
|
|
718
716
|
key: t.key
|
|
719
|
-
}) : e === "img" ?
|
|
717
|
+
}) : e === "img" ? /*#__PURE__*/ P("img", {
|
|
720
718
|
alt: "",
|
|
721
719
|
...t,
|
|
722
720
|
key: t.key
|
|
723
|
-
}) :
|
|
721
|
+
}) : /*#__PURE__*/ N.createElement(e, t);
|
|
724
722
|
}
|
|
725
723
|
//#endregion
|
|
726
724
|
//#region node_modules/@base-ui/react/esm/internals/reason-parts.js
|
|
727
|
-
var
|
|
725
|
+
var St = "none", Ct = "trigger-press", wt = "outside-press", Tt = "item-press", Et = "close-press", Dt = "clear-press", Ot = "chip-remove-press", kt = "increment-press", At = "decrement-press", jt = "input-change", Mt = "input-clear", Nt = "input-blur", Pt = "input-paste", Ft = "input-press", It = "focus-out", Lt = "escape-key", Rt = "list-navigation", zt = "keyboard";
|
|
728
726
|
//#endregion
|
|
729
727
|
//#region node_modules/@base-ui/react/esm/internals/createBaseUIEventDetails.js
|
|
730
728
|
function q(e, t, n, r) {
|
|
731
|
-
let i = !1, a = !1, o = r ??
|
|
729
|
+
let i = !1, a = !1, o = r ?? Ye;
|
|
732
730
|
return {
|
|
733
731
|
reason: e,
|
|
734
732
|
event: t ?? new Event("base-ui"),
|
|
@@ -748,8 +746,8 @@ function q(e, t, n, r) {
|
|
|
748
746
|
...o
|
|
749
747
|
};
|
|
750
748
|
}
|
|
751
|
-
function
|
|
752
|
-
let r = n ??
|
|
749
|
+
function Bt(e, t, n) {
|
|
750
|
+
let r = n ?? Ye;
|
|
753
751
|
return {
|
|
754
752
|
reason: e,
|
|
755
753
|
event: t ?? new Event("base-ui"),
|
|
@@ -758,35 +756,35 @@ function Rt(e, t, n) {
|
|
|
758
756
|
}
|
|
759
757
|
//#endregion
|
|
760
758
|
//#region node_modules/@base-ui/utils/esm/safeReact.js
|
|
761
|
-
var
|
|
762
|
-
function
|
|
759
|
+
var Vt = { ...N }, Ht = 0;
|
|
760
|
+
function Ut(e, t = "mui") {
|
|
763
761
|
let [n, r] = N.useState(e), i = e || n;
|
|
764
762
|
return N.useEffect(() => {
|
|
765
|
-
n ?? (
|
|
763
|
+
n ?? (Ht += 1, r(`${t}-${Ht}`));
|
|
766
764
|
}, [n, t]), i;
|
|
767
765
|
}
|
|
768
|
-
var
|
|
769
|
-
function
|
|
770
|
-
if (
|
|
771
|
-
let n =
|
|
766
|
+
var Wt = Vt.useId;
|
|
767
|
+
function Gt(e, t) {
|
|
768
|
+
if (Wt !== void 0) {
|
|
769
|
+
let n = Wt();
|
|
772
770
|
return e ?? (t ? `${t}-${n}` : n);
|
|
773
771
|
}
|
|
774
|
-
return
|
|
772
|
+
return Ut(e, t);
|
|
775
773
|
}
|
|
776
774
|
//#endregion
|
|
777
775
|
//#region node_modules/@base-ui/react/esm/internals/useBaseUiId.js
|
|
778
|
-
function
|
|
779
|
-
return
|
|
776
|
+
function Kt(e) {
|
|
777
|
+
return Gt(e, "base-ui");
|
|
780
778
|
}
|
|
781
779
|
//#endregion
|
|
782
780
|
//#region node_modules/@base-ui/utils/esm/useOnMount.js
|
|
783
|
-
var
|
|
784
|
-
function
|
|
785
|
-
N.useEffect(e,
|
|
781
|
+
var qt = [];
|
|
782
|
+
function Jt(e) {
|
|
783
|
+
N.useEffect(e, qt);
|
|
786
784
|
}
|
|
787
785
|
//#endregion
|
|
788
786
|
//#region node_modules/@base-ui/utils/esm/useAnimationFrame.js
|
|
789
|
-
var
|
|
787
|
+
var Yt = null, Xt = globalThis.requestAnimationFrame, Zt = new class {
|
|
790
788
|
callbacks = [];
|
|
791
789
|
callbacksCount = 0;
|
|
792
790
|
nextId = 1;
|
|
@@ -800,57 +798,57 @@ var qt = null, Jt = globalThis.requestAnimationFrame, Yt = new class {
|
|
|
800
798
|
request(e) {
|
|
801
799
|
let t = this.nextId;
|
|
802
800
|
this.nextId += 1, this.callbacks.push(e), this.callbacksCount += 1;
|
|
803
|
-
let n = process.env.NODE_ENV !== "production" &&
|
|
801
|
+
let n = process.env.NODE_ENV !== "production" && Xt !== requestAnimationFrame && (Xt = requestAnimationFrame, !0);
|
|
804
802
|
return (!this.isScheduled || n) && (requestAnimationFrame(this.tick), this.isScheduled = !0), t;
|
|
805
803
|
}
|
|
806
804
|
cancel(e) {
|
|
807
805
|
let t = e - this.startId;
|
|
808
806
|
t < 0 || t >= this.callbacks.length || (this.callbacks[t] = null, --this.callbacksCount);
|
|
809
807
|
}
|
|
810
|
-
}(),
|
|
808
|
+
}(), Qt = class e {
|
|
811
809
|
static create() {
|
|
812
810
|
return new e();
|
|
813
811
|
}
|
|
814
812
|
static request(e) {
|
|
815
|
-
return
|
|
813
|
+
return Zt.request(e);
|
|
816
814
|
}
|
|
817
815
|
static cancel(e) {
|
|
818
|
-
return
|
|
816
|
+
return Zt.cancel(e);
|
|
819
817
|
}
|
|
820
|
-
currentId =
|
|
818
|
+
currentId = Yt;
|
|
821
819
|
request(e) {
|
|
822
|
-
this.cancel(), this.currentId =
|
|
823
|
-
this.currentId =
|
|
820
|
+
this.cancel(), this.currentId = Zt.request(() => {
|
|
821
|
+
this.currentId = Yt, e();
|
|
824
822
|
});
|
|
825
823
|
}
|
|
826
824
|
cancel = () => {
|
|
827
|
-
this.currentId !==
|
|
825
|
+
this.currentId !== Yt && (Zt.cancel(this.currentId), this.currentId = Yt);
|
|
828
826
|
};
|
|
829
827
|
disposeEffect = () => this.cancel;
|
|
830
828
|
};
|
|
831
|
-
function
|
|
832
|
-
let e =
|
|
833
|
-
return
|
|
829
|
+
function $t() {
|
|
830
|
+
let e = Se(Qt.create).current;
|
|
831
|
+
return Jt(e.disposeEffect), e;
|
|
834
832
|
}
|
|
835
833
|
//#endregion
|
|
836
834
|
//#region node_modules/@base-ui/react/esm/utils/resolveRef.js
|
|
837
|
-
function
|
|
835
|
+
function en(e) {
|
|
838
836
|
return e == null ? e : "current" in e ? e.current : e;
|
|
839
837
|
}
|
|
840
838
|
//#endregion
|
|
841
839
|
//#region node_modules/@base-ui/react/esm/internals/stateAttributesMapping.js
|
|
842
|
-
var
|
|
840
|
+
var tn = /*#__PURE__*/ function(e) {
|
|
843
841
|
return e.startingStyle = "data-starting-style", e.endingStyle = "data-ending-style", e;
|
|
844
|
-
}({}),
|
|
845
|
-
return e === "starting" ?
|
|
842
|
+
}({}), nn = { [tn.startingStyle]: "" }, rn = { [tn.endingStyle]: "" }, an = { transitionStatus(e) {
|
|
843
|
+
return e === "starting" ? nn : e === "ending" ? rn : null;
|
|
846
844
|
} };
|
|
847
845
|
//#endregion
|
|
848
846
|
//#region node_modules/@base-ui/react/esm/internals/useAnimationsFinished.js
|
|
849
|
-
function
|
|
850
|
-
let r =
|
|
847
|
+
function on(e, t = !1, n = !0) {
|
|
848
|
+
let r = $t();
|
|
851
849
|
return H((i, a = null) => {
|
|
852
850
|
r.cancel();
|
|
853
|
-
let o =
|
|
851
|
+
let o = en(e);
|
|
854
852
|
if (o == null) return;
|
|
855
853
|
let s = o, c = () => {
|
|
856
854
|
L.flushSync(i);
|
|
@@ -872,7 +870,7 @@ function rn(e, t = !1, n = !0) {
|
|
|
872
870
|
});
|
|
873
871
|
}
|
|
874
872
|
if (t) {
|
|
875
|
-
let e =
|
|
873
|
+
let e = tn.startingStyle;
|
|
876
874
|
if (!s.hasAttribute(e)) {
|
|
877
875
|
r.request(l);
|
|
878
876
|
return;
|
|
@@ -891,15 +889,15 @@ function rn(e, t = !1, n = !0) {
|
|
|
891
889
|
}
|
|
892
890
|
//#endregion
|
|
893
891
|
//#region node_modules/@base-ui/react/esm/internals/useTransitionStatus.js
|
|
894
|
-
function
|
|
892
|
+
function sn(e, t = !1, n = !1) {
|
|
895
893
|
let [r, i] = N.useState(e && t ? "idle" : void 0), [a, o] = N.useState(e);
|
|
896
894
|
return e && !a && (o(!0), i("starting")), !e && a && r !== "ending" && !n && i("ending"), !e && !a && r === "ending" && i(void 0), U(() => {
|
|
897
895
|
if (!e && a && r !== "ending" && n) {
|
|
898
|
-
let e =
|
|
896
|
+
let e = Qt.request(() => {
|
|
899
897
|
i("ending");
|
|
900
898
|
});
|
|
901
899
|
return () => {
|
|
902
|
-
|
|
900
|
+
Qt.cancel(e);
|
|
903
901
|
};
|
|
904
902
|
}
|
|
905
903
|
}, [
|
|
@@ -909,20 +907,20 @@ function an(e, t = !1, n = !1) {
|
|
|
909
907
|
n
|
|
910
908
|
]), U(() => {
|
|
911
909
|
if (!e || t) return;
|
|
912
|
-
let n =
|
|
910
|
+
let n = Qt.request(() => {
|
|
913
911
|
i(void 0);
|
|
914
912
|
});
|
|
915
913
|
return () => {
|
|
916
|
-
|
|
914
|
+
Qt.cancel(n);
|
|
917
915
|
};
|
|
918
916
|
}, [t, e]), U(() => {
|
|
919
917
|
if (!e || !t) return;
|
|
920
918
|
e && a && r !== "idle" && i("starting");
|
|
921
|
-
let n =
|
|
919
|
+
let n = Qt.request(() => {
|
|
922
920
|
i("idle");
|
|
923
921
|
});
|
|
924
922
|
return () => {
|
|
925
|
-
|
|
923
|
+
Qt.cancel(n);
|
|
926
924
|
};
|
|
927
925
|
}, [
|
|
928
926
|
t,
|
|
@@ -937,11 +935,11 @@ function an(e, t = !1, n = !1) {
|
|
|
937
935
|
}
|
|
938
936
|
//#endregion
|
|
939
937
|
//#region node_modules/@base-ui/react/esm/internals/composite/list/useCompositeListItem.js
|
|
940
|
-
var
|
|
938
|
+
var cn = /*#__PURE__*/ function(e) {
|
|
941
939
|
return e[e.None = 0] = "None", e[e.GuessFromOrder = 1] = "GuessFromOrder", e;
|
|
942
940
|
}({});
|
|
943
|
-
function
|
|
944
|
-
let { label: t, metadata: n, textRef: r, indexGuessBehavior: i, index: a } = e, { register: o, unregister: s, subscribeMapChange: c, elementsRef: l, labelsRef: u, nextIndexRef: d } =
|
|
941
|
+
function ln(e = {}) {
|
|
942
|
+
let { label: t, metadata: n, textRef: r, indexGuessBehavior: i, index: a } = e, { register: o, unregister: s, subscribeMapChange: c, elementsRef: l, labelsRef: u, nextIndexRef: d } = Ae(), f = N.useRef(-1), [p, m] = N.useState(a ?? (i === cn.GuessFromOrder ? () => {
|
|
945
943
|
if (f.current === -1) {
|
|
946
944
|
let e = d.current;
|
|
947
945
|
d.current += 1, f.current = e;
|
|
@@ -986,16 +984,16 @@ function sn(e = {}) {
|
|
|
986
984
|
}
|
|
987
985
|
//#endregion
|
|
988
986
|
//#region node_modules/@base-ui/react/esm/internals/composite/root/CompositeRootContext.js
|
|
989
|
-
var
|
|
990
|
-
process.env.NODE_ENV !== "production" && (
|
|
991
|
-
function
|
|
992
|
-
let t = N.useContext(
|
|
993
|
-
if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ?
|
|
987
|
+
var un = /*#__PURE__*/ N.createContext(void 0);
|
|
988
|
+
process.env.NODE_ENV !== "production" && (un.displayName = "CompositeRootContext");
|
|
989
|
+
function dn(e = !1) {
|
|
990
|
+
let t = N.useContext(un);
|
|
991
|
+
if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? W(16) : "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.");
|
|
994
992
|
return t;
|
|
995
993
|
}
|
|
996
994
|
//#endregion
|
|
997
995
|
//#region node_modules/@base-ui/react/esm/utils/useFocusableWhenDisabled.js
|
|
998
|
-
function
|
|
996
|
+
function fn(e) {
|
|
999
997
|
let { focusableWhenDisabled: t, disabled: n, composite: r = !1, tabIndex: i = 0, isNativeButton: a } = e, o = r && t !== !1, s = r && t === !1;
|
|
1000
998
|
return { props: N.useMemo(() => {
|
|
1001
999
|
let e = { onKeyDown(e) {
|
|
@@ -1014,8 +1012,8 @@ function un(e) {
|
|
|
1014
1012
|
}
|
|
1015
1013
|
//#endregion
|
|
1016
1014
|
//#region node_modules/@base-ui/react/esm/internals/use-button/useButton.js
|
|
1017
|
-
function
|
|
1018
|
-
let { disabled: t = !1, focusableWhenDisabled: n, tabIndex: r = 0, native: i = !0, composite: a } = e, o = N.useRef(null), s =
|
|
1015
|
+
function pn(e = {}) {
|
|
1016
|
+
let { disabled: t = !1, focusableWhenDisabled: n, tabIndex: r = 0, native: i = !0, composite: a } = e, o = N.useRef(null), s = dn(!0), c = a ?? s !== void 0, { props: l } = fn({
|
|
1019
1017
|
focusableWhenDisabled: n,
|
|
1020
1018
|
disabled: t,
|
|
1021
1019
|
composite: c,
|
|
@@ -1024,12 +1022,12 @@ function dn(e = {}) {
|
|
|
1024
1022
|
});
|
|
1025
1023
|
process.env.NODE_ENV !== "production" && N.useEffect(() => {
|
|
1026
1024
|
if (!o.current) return;
|
|
1027
|
-
let e =
|
|
1028
|
-
i ? e ||
|
|
1025
|
+
let e = mn(o.current);
|
|
1026
|
+
i ? e || ve(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${Vt.captureOwnerStack?.() || ""}`) : e && ve(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${Vt.captureOwnerStack?.() || ""}`);
|
|
1029
1027
|
}, [i]);
|
|
1030
1028
|
let u = N.useCallback(() => {
|
|
1031
1029
|
let e = o.current;
|
|
1032
|
-
|
|
1030
|
+
mn(e) && c && t && l.disabled === void 0 && e.disabled && (e.disabled = !1);
|
|
1033
1031
|
}, [
|
|
1034
1032
|
t,
|
|
1035
1033
|
l.disabled,
|
|
@@ -1038,7 +1036,7 @@ function dn(e = {}) {
|
|
|
1038
1036
|
return U(u, [u]), {
|
|
1039
1037
|
getButtonProps: N.useCallback((e = {}) => {
|
|
1040
1038
|
let { onClick: n, onMouseDown: r, onKeyUp: a, onKeyDown: o, onPointerDown: s, ...u } = e;
|
|
1041
|
-
return
|
|
1039
|
+
return et({
|
|
1042
1040
|
type: i ? "button" : void 0,
|
|
1043
1041
|
onClick(e) {
|
|
1044
1042
|
if (t) {
|
|
@@ -1051,8 +1049,8 @@ function dn(e = {}) {
|
|
|
1051
1049
|
t || r?.(e);
|
|
1052
1050
|
},
|
|
1053
1051
|
onKeyDown(e) {
|
|
1054
|
-
if (t || (
|
|
1055
|
-
let r = e.target === e.currentTarget, a = e.currentTarget, s =
|
|
1052
|
+
if (t || (ut(e), o?.(e), e.baseUIHandlerPrevented)) return;
|
|
1053
|
+
let r = e.target === e.currentTarget, a = e.currentTarget, s = mn(a), l = !i && hn(a), u = r && (i ? s : !l), d = e.key === "Enter", f = e.key === " ", p = a.getAttribute("role"), m = p?.startsWith("menuitem") || p === "option" || p === "gridcell";
|
|
1056
1054
|
if (r && c && f) {
|
|
1057
1055
|
if (e.defaultPrevented && m) return;
|
|
1058
1056
|
e.preventDefault(), l || i && s ? (a.click(), e.preventBaseUIHandler()) : u && (n?.(e), e.preventBaseUIHandler());
|
|
@@ -1062,7 +1060,7 @@ function dn(e = {}) {
|
|
|
1062
1060
|
},
|
|
1063
1061
|
onKeyUp(e) {
|
|
1064
1062
|
if (!t) {
|
|
1065
|
-
if (
|
|
1063
|
+
if (ut(e), a?.(e), e.target === e.currentTarget && i && c && mn(e.currentTarget) && e.key === " ") {
|
|
1066
1064
|
e.preventDefault();
|
|
1067
1065
|
return;
|
|
1068
1066
|
}
|
|
@@ -1088,21 +1086,21 @@ function dn(e = {}) {
|
|
|
1088
1086
|
})
|
|
1089
1087
|
};
|
|
1090
1088
|
}
|
|
1091
|
-
function
|
|
1089
|
+
function mn(e) {
|
|
1092
1090
|
return b(e) && e.tagName === "BUTTON";
|
|
1093
1091
|
}
|
|
1094
|
-
function
|
|
1092
|
+
function hn(e) {
|
|
1095
1093
|
return !!(e?.tagName === "A" && e?.href);
|
|
1096
1094
|
}
|
|
1097
1095
|
//#endregion
|
|
1098
1096
|
//#region node_modules/@base-ui/utils/esm/detectBrowser.js
|
|
1099
|
-
var
|
|
1100
|
-
|
|
1101
|
-
var
|
|
1102
|
-
|
|
1103
|
-
var
|
|
1104
|
-
function
|
|
1105
|
-
if (!
|
|
1097
|
+
var gn = typeof navigator < "u", _n = En(), vn = On(), yn = Dn(), bn = typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter:none"), xn = _n.platform === "MacIntel" && _n.maxTouchPoints > 1 || /iP(hone|ad|od)|iOS/.test(_n.platform), Sn = gn && /firefox/i.test(yn), Cn = gn && /apple/i.test(navigator.vendor);
|
|
1098
|
+
gn && /Edg/i.test(yn);
|
|
1099
|
+
var wn = gn && /android/i.test(vn) || /android/i.test(yn);
|
|
1100
|
+
gn && vn.toLowerCase().startsWith("mac") && navigator.maxTouchPoints;
|
|
1101
|
+
var Tn = yn.includes("jsdom/");
|
|
1102
|
+
function En() {
|
|
1103
|
+
if (!gn) return {
|
|
1106
1104
|
platform: "",
|
|
1107
1105
|
maxTouchPoints: -1
|
|
1108
1106
|
};
|
|
@@ -1115,22 +1113,22 @@ function wn() {
|
|
|
1115
1113
|
maxTouchPoints: navigator.maxTouchPoints ?? -1
|
|
1116
1114
|
};
|
|
1117
1115
|
}
|
|
1118
|
-
function
|
|
1119
|
-
if (!
|
|
1116
|
+
function Dn() {
|
|
1117
|
+
if (!gn) return "";
|
|
1120
1118
|
let e = navigator.userAgentData;
|
|
1121
1119
|
return e && Array.isArray(e.brands) ? e.brands.map(({ brand: e, version: t }) => `${e}/${t}`).join(" ") : navigator.userAgent;
|
|
1122
1120
|
}
|
|
1123
|
-
function
|
|
1124
|
-
if (!
|
|
1121
|
+
function On() {
|
|
1122
|
+
if (!gn) return "";
|
|
1125
1123
|
let e = navigator.userAgentData;
|
|
1126
1124
|
return e?.platform ? e.platform : navigator.platform ?? "";
|
|
1127
1125
|
}
|
|
1128
1126
|
//#endregion
|
|
1129
1127
|
//#region node_modules/@base-ui/react/esm/floating-ui-react/utils/constants.js
|
|
1130
|
-
var
|
|
1128
|
+
var kn = "data-base-ui-focusable", An = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])", jn = "ArrowLeft", Mn = "ArrowRight", Nn = "ArrowUp", Pn = "ArrowDown";
|
|
1131
1129
|
//#endregion
|
|
1132
1130
|
//#region node_modules/@base-ui/react/esm/internals/shadowDom.js
|
|
1133
|
-
function
|
|
1131
|
+
function Fn(e) {
|
|
1134
1132
|
let t = e.activeElement;
|
|
1135
1133
|
for (; t?.shadowRoot?.activeElement != null;) t = t.shadowRoot.activeElement;
|
|
1136
1134
|
return t;
|
|
@@ -1148,38 +1146,38 @@ function J(e, t) {
|
|
|
1148
1146
|
}
|
|
1149
1147
|
return !1;
|
|
1150
1148
|
}
|
|
1151
|
-
function
|
|
1149
|
+
function In(e) {
|
|
1152
1150
|
return "composedPath" in e ? e.composedPath()[0] : e.target;
|
|
1153
1151
|
}
|
|
1154
1152
|
//#endregion
|
|
1155
1153
|
//#region node_modules/@base-ui/react/esm/floating-ui-react/utils/element.js
|
|
1156
|
-
function
|
|
1154
|
+
function Ln(e, t) {
|
|
1157
1155
|
if (t == null) return !1;
|
|
1158
1156
|
if ("composedPath" in e) return e.composedPath().includes(t);
|
|
1159
1157
|
let n = e;
|
|
1160
1158
|
return n.target != null && t.contains(n.target);
|
|
1161
1159
|
}
|
|
1162
|
-
function
|
|
1160
|
+
function Rn(e) {
|
|
1163
1161
|
return e.matches("html,body");
|
|
1164
1162
|
}
|
|
1165
|
-
function
|
|
1163
|
+
function zn(e) {
|
|
1166
1164
|
return b(e) && e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])");
|
|
1167
1165
|
}
|
|
1168
|
-
function
|
|
1169
|
-
return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${
|
|
1166
|
+
function Bn(e) {
|
|
1167
|
+
return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${An}`) != null;
|
|
1170
1168
|
}
|
|
1171
|
-
function
|
|
1172
|
-
return e ? e.getAttribute("role") === "combobox" &&
|
|
1169
|
+
function Vn(e) {
|
|
1170
|
+
return e ? e.getAttribute("role") === "combobox" && zn(e) : !1;
|
|
1173
1171
|
}
|
|
1174
|
-
function
|
|
1172
|
+
function Hn(e) {
|
|
1175
1173
|
return e ? e.hasAttribute("data-base-ui-focusable") ? e : e.querySelector("[data-base-ui-focusable]") || e : null;
|
|
1176
1174
|
}
|
|
1177
1175
|
//#endregion
|
|
1178
1176
|
//#region node_modules/@base-ui/react/esm/floating-ui-react/utils/nodes.js
|
|
1179
|
-
function
|
|
1180
|
-
return e.filter((e) => e.parentId === t).flatMap((t) => [...!n || t.context?.open ? [t] : [], ...
|
|
1177
|
+
function Un(e, t, n = !0) {
|
|
1178
|
+
return e.filter((e) => e.parentId === t).flatMap((t) => [...!n || t.context?.open ? [t] : [], ...Un(e, t.id, n)]);
|
|
1181
1179
|
}
|
|
1182
|
-
function
|
|
1180
|
+
function Wn(e, t) {
|
|
1183
1181
|
let n = [], r = e.find((e) => e.id === t)?.parentId;
|
|
1184
1182
|
for (; r;) {
|
|
1185
1183
|
let t = e.find((e) => e.id === r);
|
|
@@ -1189,52 +1187,52 @@ function Hn(e, t) {
|
|
|
1189
1187
|
}
|
|
1190
1188
|
//#endregion
|
|
1191
1189
|
//#region node_modules/@base-ui/react/esm/floating-ui-react/utils/event.js
|
|
1192
|
-
function
|
|
1190
|
+
function Gn(e) {
|
|
1193
1191
|
e.preventDefault(), e.stopPropagation();
|
|
1194
1192
|
}
|
|
1195
|
-
function
|
|
1193
|
+
function Kn(e) {
|
|
1196
1194
|
return "nativeEvent" in e;
|
|
1197
1195
|
}
|
|
1198
|
-
function
|
|
1199
|
-
return e.pointerType === "" && e.isTrusted ? !0 :
|
|
1196
|
+
function qn(e) {
|
|
1197
|
+
return e.pointerType === "" && e.isTrusted ? !0 : wn && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
|
|
1200
1198
|
}
|
|
1201
|
-
function
|
|
1202
|
-
return
|
|
1199
|
+
function Jn(e) {
|
|
1200
|
+
return Tn ? !1 : !wn && e.width === 0 && e.height === 0 || wn && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" || e.width < 1 && e.height < 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "touch";
|
|
1203
1201
|
}
|
|
1204
|
-
function
|
|
1202
|
+
function Yn(e, t) {
|
|
1205
1203
|
let n = ["mouse", "pen"];
|
|
1206
1204
|
return t || n.push("", void 0), n.includes(e);
|
|
1207
1205
|
}
|
|
1208
|
-
function
|
|
1206
|
+
function Xn(e) {
|
|
1209
1207
|
let t = e.type;
|
|
1210
1208
|
return t === "click" || t === "mousedown" || t === "keydown" || t === "keyup";
|
|
1211
1209
|
}
|
|
1212
1210
|
//#endregion
|
|
1213
1211
|
//#region node_modules/@base-ui/react/esm/floating-ui-react/utils/composite.js
|
|
1214
|
-
function
|
|
1212
|
+
function Zn(e, t, n) {
|
|
1215
1213
|
return Math.floor(e / t) !== n;
|
|
1216
1214
|
}
|
|
1217
|
-
function
|
|
1215
|
+
function Qn(e, t) {
|
|
1218
1216
|
return t < 0 || t >= e.length;
|
|
1219
1217
|
}
|
|
1220
|
-
function
|
|
1221
|
-
return
|
|
1218
|
+
function $n(e, t) {
|
|
1219
|
+
return tr(e.current, { disabledIndices: t });
|
|
1222
1220
|
}
|
|
1223
|
-
function
|
|
1224
|
-
return
|
|
1221
|
+
function er(e, t) {
|
|
1222
|
+
return tr(e.current, {
|
|
1225
1223
|
decrement: !0,
|
|
1226
1224
|
startingIndex: e.current.length,
|
|
1227
1225
|
disabledIndices: t
|
|
1228
1226
|
});
|
|
1229
1227
|
}
|
|
1230
|
-
function
|
|
1228
|
+
function tr(e, { startingIndex: t = -1, decrement: n = !1, disabledIndices: r, amount: i = 1 } = {}) {
|
|
1231
1229
|
let a = t;
|
|
1232
1230
|
do
|
|
1233
1231
|
a += n ? -i : i;
|
|
1234
|
-
while (a >= 0 && a <= e.length - 1 &&
|
|
1232
|
+
while (a >= 0 && a <= e.length - 1 && or(e, a, r));
|
|
1235
1233
|
return a;
|
|
1236
1234
|
}
|
|
1237
|
-
function
|
|
1235
|
+
function nr(e, { event: t, orientation: n, loopFocus: r, onLoop: i, rtl: a, cols: o, disabledIndices: c, minIndex: l, maxIndex: u, prevIndex: d, stopEvent: f = !1 }) {
|
|
1238
1236
|
let p = d, m;
|
|
1239
1237
|
if (t.key === "ArrowUp" ? m = "up" : t.key === "ArrowDown" && (m = "down"), m) {
|
|
1240
1238
|
let n = [], a = [], h = !1, g = 0;
|
|
@@ -1261,14 +1259,14 @@ function er(e, { event: t, orientation: n, loopFocus: r, onLoop: i, rtl: a, cols
|
|
|
1261
1259
|
if (o < 0 || o >= n.length) {
|
|
1262
1260
|
if (!r || y) return;
|
|
1263
1261
|
if (o = o < 0 ? n.length - 1 : 0, i) {
|
|
1264
|
-
let e = Math.min(l, n[o].length - 1);
|
|
1265
|
-
o = a[
|
|
1262
|
+
let e = Math.min(l, n[o].length - 1), r = i(t, d, n[o][e] ?? n[o][0]);
|
|
1263
|
+
o = a[r] ?? o;
|
|
1266
1264
|
}
|
|
1267
1265
|
}
|
|
1268
1266
|
let s = n[o];
|
|
1269
1267
|
for (let t = Math.min(l, s.length - 1); t >= 0; --t) {
|
|
1270
1268
|
let n = s[t];
|
|
1271
|
-
if (!
|
|
1269
|
+
if (!or(e, n, c)) return n;
|
|
1272
1270
|
}
|
|
1273
1271
|
}
|
|
1274
1272
|
}, S = (t) => {
|
|
@@ -1280,14 +1278,14 @@ function er(e, { event: t, orientation: n, loopFocus: r, onLoop: i, rtl: a, cols
|
|
|
1280
1278
|
t = t < 0 ? a : 0;
|
|
1281
1279
|
}
|
|
1282
1280
|
let i = Math.min(t + b - 1, u);
|
|
1283
|
-
for (let r = Math.min(t + n, i); r >= t; --r) if (!
|
|
1281
|
+
for (let r = Math.min(t + n, i); r >= t; --r) if (!or(e, r, c)) return r;
|
|
1284
1282
|
}
|
|
1285
1283
|
};
|
|
1286
|
-
f &&
|
|
1284
|
+
f && Gn(t);
|
|
1287
1285
|
let C = x(m) ?? S(m);
|
|
1288
1286
|
if (C !== void 0) p = C;
|
|
1289
1287
|
else if (d === -1) p = m === "up" ? u : l;
|
|
1290
|
-
else if (p =
|
|
1288
|
+
else if (p = tr(e, {
|
|
1291
1289
|
startingIndex: d,
|
|
1292
1290
|
amount: b,
|
|
1293
1291
|
decrement: m === "up",
|
|
@@ -1297,47 +1295,47 @@ function er(e, { event: t, orientation: n, loopFocus: r, onLoop: i, rtl: a, cols
|
|
|
1297
1295
|
let e = d % b, n = u % b, r = u - (n - e);
|
|
1298
1296
|
p = n === e ? u : n > e ? r : r - b, i && (p = i(t, d, p));
|
|
1299
1297
|
}
|
|
1300
|
-
m === "down" && d + b > u && (p =
|
|
1298
|
+
m === "down" && d + b > u && (p = tr(e, {
|
|
1301
1299
|
startingIndex: d % b - b,
|
|
1302
1300
|
amount: b,
|
|
1303
1301
|
disabledIndices: c
|
|
1304
1302
|
}), i && (p = i(t, d, p)));
|
|
1305
1303
|
}
|
|
1306
|
-
|
|
1304
|
+
Qn(e, p) && (p = d);
|
|
1307
1305
|
}
|
|
1308
1306
|
if (n === "both") {
|
|
1309
1307
|
let n = s(d / o);
|
|
1310
|
-
t.key === (a ? "ArrowLeft" : "ArrowRight") && (f &&
|
|
1308
|
+
t.key === (a ? "ArrowLeft" : "ArrowRight") && (f && Gn(t), d % o === o - 1 ? r && (p = tr(e, {
|
|
1311
1309
|
startingIndex: d - d % o - 1,
|
|
1312
1310
|
disabledIndices: c
|
|
1313
|
-
}), i && (p = i(t, d, p))) : (p =
|
|
1311
|
+
}), i && (p = i(t, d, p))) : (p = tr(e, {
|
|
1314
1312
|
startingIndex: d,
|
|
1315
1313
|
disabledIndices: c
|
|
1316
|
-
}), r &&
|
|
1314
|
+
}), r && Zn(p, o, n) && (p = tr(e, {
|
|
1317
1315
|
startingIndex: d - d % o - 1,
|
|
1318
1316
|
disabledIndices: c
|
|
1319
|
-
}), i && (p = i(t, d, p)))),
|
|
1317
|
+
}), i && (p = i(t, d, p)))), Zn(p, o, n) && (p = d)), t.key === (a ? "ArrowRight" : "ArrowLeft") && (f && Gn(t), d % o === 0 ? r && (p = tr(e, {
|
|
1320
1318
|
startingIndex: d + (o - d % o),
|
|
1321
1319
|
decrement: !0,
|
|
1322
1320
|
disabledIndices: c
|
|
1323
|
-
}), i && (p = i(t, d, p))) : (p =
|
|
1321
|
+
}), i && (p = i(t, d, p))) : (p = tr(e, {
|
|
1324
1322
|
startingIndex: d,
|
|
1325
1323
|
decrement: !0,
|
|
1326
1324
|
disabledIndices: c
|
|
1327
|
-
}), r &&
|
|
1325
|
+
}), r && Zn(p, o, n) && (p = tr(e, {
|
|
1328
1326
|
startingIndex: d + (o - d % o),
|
|
1329
1327
|
decrement: !0,
|
|
1330
1328
|
disabledIndices: c
|
|
1331
|
-
}), i && (p = i(t, d, p)))),
|
|
1329
|
+
}), i && (p = i(t, d, p)))), Zn(p, o, n) && (p = d));
|
|
1332
1330
|
let l = s(u / o) === n;
|
|
1333
|
-
|
|
1331
|
+
Qn(e, p) && (r && l ? (p = t.key === (a ? "ArrowRight" : "ArrowLeft") ? u : tr(e, {
|
|
1334
1332
|
startingIndex: d - d % o - 1,
|
|
1335
1333
|
disabledIndices: c
|
|
1336
1334
|
}), i && (p = i(t, d, p))) : p = d);
|
|
1337
1335
|
}
|
|
1338
1336
|
return p;
|
|
1339
1337
|
}
|
|
1340
|
-
function
|
|
1338
|
+
function rr(e, t, n) {
|
|
1341
1339
|
let r = [], i = 0;
|
|
1342
1340
|
return e.forEach(({ width: e, height: a }, o) => {
|
|
1343
1341
|
if (e > t && process.env.NODE_ENV !== "production") throw Error(`[Floating UI]: Invalid grid - item width at index ${o} is greater than grid columns`);
|
|
@@ -1351,7 +1349,7 @@ function tr(e, t, n) {
|
|
|
1351
1349
|
}
|
|
1352
1350
|
}), [...r];
|
|
1353
1351
|
}
|
|
1354
|
-
function
|
|
1352
|
+
function ir(e, t, n, r, i) {
|
|
1355
1353
|
if (e === -1) return -1;
|
|
1356
1354
|
let a = n.indexOf(e), o = t[e];
|
|
1357
1355
|
switch (i) {
|
|
@@ -1362,19 +1360,19 @@ function nr(e, t, n, r, i) {
|
|
|
1362
1360
|
default: return -1;
|
|
1363
1361
|
}
|
|
1364
1362
|
}
|
|
1365
|
-
function
|
|
1363
|
+
function ar(e, t) {
|
|
1366
1364
|
return t.flatMap((t, n) => e.includes(t) ? [n] : []);
|
|
1367
1365
|
}
|
|
1368
|
-
function
|
|
1366
|
+
function or(e, t, n) {
|
|
1369
1367
|
if (typeof n == "function" ? n(t) : n?.includes(t) ?? !1) return !0;
|
|
1370
1368
|
let r = e[t];
|
|
1371
|
-
return r ?
|
|
1369
|
+
return r ? !cr(r) || !n && (r.hasAttribute("disabled") || r.getAttribute("aria-disabled") === "true") : !1;
|
|
1372
1370
|
}
|
|
1373
|
-
function
|
|
1371
|
+
function sr(e) {
|
|
1374
1372
|
return e.visibility === "hidden" || e.visibility === "collapse";
|
|
1375
1373
|
}
|
|
1376
|
-
function
|
|
1377
|
-
return !e || !e.isConnected || !t ||
|
|
1374
|
+
function cr(e, t = e ? O(e) : null) {
|
|
1375
|
+
return !e || !e.isConnected || !t || sr(t) ? !1 : typeof e.checkVisibility == "function" ? e.checkVisibility() : t.display !== "none" && t.display !== "contents";
|
|
1378
1376
|
}
|
|
1379
1377
|
//#endregion
|
|
1380
1378
|
//#region node_modules/@base-ui/utils/esm/owner.js
|
|
@@ -1383,39 +1381,39 @@ function Y(e) {
|
|
|
1383
1381
|
}
|
|
1384
1382
|
//#endregion
|
|
1385
1383
|
//#region node_modules/@base-ui/react/esm/floating-ui-react/utils/tabbable.js
|
|
1386
|
-
var
|
|
1387
|
-
function
|
|
1384
|
+
var lr = "a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable=\"false\"]),audio[controls],video[controls]";
|
|
1385
|
+
function ur(e) {
|
|
1388
1386
|
let t = e.assignedSlot;
|
|
1389
1387
|
if (t) return t;
|
|
1390
1388
|
if (e.parentElement) return e.parentElement;
|
|
1391
1389
|
let n = e.getRootNode();
|
|
1392
1390
|
return M(n) ? n.host : null;
|
|
1393
1391
|
}
|
|
1394
|
-
function
|
|
1392
|
+
function dr(e) {
|
|
1395
1393
|
for (let t of Array.from(e.children)) if (_(t) === "summary") return t;
|
|
1396
1394
|
return null;
|
|
1397
1395
|
}
|
|
1398
|
-
function
|
|
1399
|
-
let n =
|
|
1396
|
+
function fr(e, t) {
|
|
1397
|
+
let n = dr(t);
|
|
1400
1398
|
return !!n && (e === n || J(n, e));
|
|
1401
1399
|
}
|
|
1402
|
-
function
|
|
1400
|
+
function pr(e) {
|
|
1403
1401
|
let t = e ? _(e) : "";
|
|
1404
|
-
return e != null && e.matches(
|
|
1402
|
+
return e != null && e.matches(lr) && (t !== "summary" || e.parentElement != null && _(e.parentElement) === "details" && dr(e.parentElement) === e) && (t !== "details" || dr(e) == null) && (t !== "input" || e.type !== "hidden");
|
|
1405
1403
|
}
|
|
1406
|
-
function
|
|
1407
|
-
if (!
|
|
1408
|
-
for (let t = e; t; t =
|
|
1404
|
+
function mr(e) {
|
|
1405
|
+
if (!pr(e) || !e.isConnected || e.matches(":disabled")) return !1;
|
|
1406
|
+
for (let t = e; t; t = ur(t)) {
|
|
1409
1407
|
let n = t !== e, r = _(t) === "slot";
|
|
1410
|
-
if (t.hasAttribute("inert") || n && _(t) === "details" && !t.open && !
|
|
1408
|
+
if (t.hasAttribute("inert") || n && _(t) === "details" && !t.open && !fr(e, t) || t.hasAttribute("hidden") || !r && !hr(t, n)) return !1;
|
|
1411
1409
|
}
|
|
1412
1410
|
return !0;
|
|
1413
1411
|
}
|
|
1414
|
-
function
|
|
1412
|
+
function hr(e, t) {
|
|
1415
1413
|
let n = O(e);
|
|
1416
|
-
return t ? n.display !== "none" :
|
|
1414
|
+
return t ? n.display !== "none" : cr(e, n);
|
|
1417
1415
|
}
|
|
1418
|
-
function
|
|
1416
|
+
function gr(e) {
|
|
1419
1417
|
let t = e.tabIndex;
|
|
1420
1418
|
if (t < 0) {
|
|
1421
1419
|
let t = _(e);
|
|
@@ -1423,75 +1421,75 @@ function mr(e) {
|
|
|
1423
1421
|
}
|
|
1424
1422
|
return t;
|
|
1425
1423
|
}
|
|
1426
|
-
function
|
|
1424
|
+
function _r(e) {
|
|
1427
1425
|
if (_(e) !== "input") return null;
|
|
1428
1426
|
let t = e;
|
|
1429
1427
|
return t.type === "radio" && t.name !== "" ? t : null;
|
|
1430
1428
|
}
|
|
1431
|
-
function
|
|
1432
|
-
let n =
|
|
1429
|
+
function vr(e, t) {
|
|
1430
|
+
let n = _r(e);
|
|
1433
1431
|
if (!n) return !0;
|
|
1434
1432
|
let r = t.find((e) => {
|
|
1435
|
-
let t =
|
|
1433
|
+
let t = _r(e);
|
|
1436
1434
|
return t?.name === n.name && t.form === n.form && t.checked;
|
|
1437
1435
|
});
|
|
1438
1436
|
return r ? r === n : t.find((e) => {
|
|
1439
|
-
let t =
|
|
1437
|
+
let t = _r(e);
|
|
1440
1438
|
return t?.name === n.name && t.form === n.form;
|
|
1441
1439
|
}) === n;
|
|
1442
1440
|
}
|
|
1443
|
-
function
|
|
1441
|
+
function yr(e) {
|
|
1444
1442
|
if (b(e) && _(e) === "slot") {
|
|
1445
1443
|
let t = e.assignedElements({ flatten: !0 });
|
|
1446
1444
|
if (t.length > 0) return t;
|
|
1447
1445
|
}
|
|
1448
1446
|
return b(e) && e.shadowRoot ? Array.from(e.shadowRoot.children) : Array.from(e.children);
|
|
1449
1447
|
}
|
|
1450
|
-
function
|
|
1451
|
-
|
|
1452
|
-
|
|
1448
|
+
function br(e, t) {
|
|
1449
|
+
yr(e).forEach((e) => {
|
|
1450
|
+
pr(e) && t.push(e), br(e, t);
|
|
1453
1451
|
});
|
|
1454
1452
|
}
|
|
1455
|
-
function
|
|
1456
|
-
|
|
1457
|
-
b(e) && e.matches(t) && n.push(e),
|
|
1453
|
+
function xr(e, t, n) {
|
|
1454
|
+
yr(e).forEach((e) => {
|
|
1455
|
+
b(e) && e.matches(t) && n.push(e), xr(e, t, n);
|
|
1458
1456
|
});
|
|
1459
1457
|
}
|
|
1460
|
-
function
|
|
1461
|
-
return
|
|
1458
|
+
function Sr(e) {
|
|
1459
|
+
return mr(e) && gr(e) >= 0;
|
|
1462
1460
|
}
|
|
1463
|
-
function
|
|
1461
|
+
function Cr(e) {
|
|
1464
1462
|
let t = [];
|
|
1465
|
-
return
|
|
1463
|
+
return br(e, t), t.filter(mr);
|
|
1466
1464
|
}
|
|
1467
|
-
function
|
|
1468
|
-
let t =
|
|
1469
|
-
return t.filter((e) =>
|
|
1465
|
+
function wr(e) {
|
|
1466
|
+
let t = Cr(e);
|
|
1467
|
+
return t.filter((e) => gr(e) >= 0 && vr(e, t));
|
|
1470
1468
|
}
|
|
1471
|
-
function
|
|
1472
|
-
let n =
|
|
1469
|
+
function Tr(e, t) {
|
|
1470
|
+
let n = wr(e), r = n.length;
|
|
1473
1471
|
if (r === 0) return;
|
|
1474
|
-
let i =
|
|
1472
|
+
let i = Fn(Y(e)), a = n.indexOf(i);
|
|
1475
1473
|
return n[a === -1 ? t === 1 ? 0 : r - 1 : a + t];
|
|
1476
1474
|
}
|
|
1477
|
-
function
|
|
1478
|
-
return
|
|
1475
|
+
function Er(e) {
|
|
1476
|
+
return Tr(Y(e).body, 1) || e;
|
|
1479
1477
|
}
|
|
1480
|
-
function
|
|
1481
|
-
return
|
|
1478
|
+
function Dr(e) {
|
|
1479
|
+
return Tr(Y(e).body, -1) || e;
|
|
1482
1480
|
}
|
|
1483
|
-
function
|
|
1481
|
+
function Or(e, t) {
|
|
1484
1482
|
let n = t || e.currentTarget, r = e.relatedTarget;
|
|
1485
1483
|
return !r || !J(n, r);
|
|
1486
1484
|
}
|
|
1487
|
-
function
|
|
1488
|
-
|
|
1485
|
+
function kr(e) {
|
|
1486
|
+
wr(e).forEach((e) => {
|
|
1489
1487
|
e.dataset.tabindex = e.getAttribute("tabindex") || "", e.setAttribute("tabindex", "-1");
|
|
1490
1488
|
});
|
|
1491
1489
|
}
|
|
1492
|
-
function
|
|
1490
|
+
function Ar(e) {
|
|
1493
1491
|
let t = [];
|
|
1494
|
-
|
|
1492
|
+
xr(e, "[data-tabindex]", t), t.forEach((e) => {
|
|
1495
1493
|
let t = e.dataset.tabindex;
|
|
1496
1494
|
delete e.dataset.tabindex, t ? e.setAttribute("tabindex", t) : e.removeAttribute("tabindex");
|
|
1497
1495
|
});
|
|
@@ -1505,8 +1503,8 @@ function X(e, t, n, r) {
|
|
|
1505
1503
|
}
|
|
1506
1504
|
//#endregion
|
|
1507
1505
|
//#region node_modules/@base-ui/react/esm/internals/useOpenChangeComplete.js
|
|
1508
|
-
function
|
|
1509
|
-
let { enabled: t = !0, open: n, ref: r, onComplete: i } = e, a = H(i), o =
|
|
1506
|
+
function jr(e) {
|
|
1507
|
+
let { enabled: t = !0, open: n, ref: r, onComplete: i } = e, a = H(i), o = on(r, n, !1);
|
|
1510
1508
|
N.useEffect(() => {
|
|
1511
1509
|
if (!t) return;
|
|
1512
1510
|
let e = new AbortController();
|
|
@@ -1522,43 +1520,43 @@ function kr(e) {
|
|
|
1522
1520
|
}
|
|
1523
1521
|
//#endregion
|
|
1524
1522
|
//#region node_modules/@base-ui/utils/esm/useOnFirstRender.js
|
|
1525
|
-
function
|
|
1523
|
+
function Mr(e) {
|
|
1526
1524
|
let t = N.useRef(!0);
|
|
1527
1525
|
t.current && (t.current = !1, e());
|
|
1528
1526
|
}
|
|
1529
1527
|
//#endregion
|
|
1530
1528
|
//#region node_modules/@base-ui/utils/esm/useTimeout.js
|
|
1531
|
-
var
|
|
1529
|
+
var Nr = 0, Pr = class e {
|
|
1532
1530
|
static create() {
|
|
1533
1531
|
return new e();
|
|
1534
1532
|
}
|
|
1535
|
-
currentId =
|
|
1533
|
+
currentId = Nr;
|
|
1536
1534
|
start(e, t) {
|
|
1537
1535
|
this.clear(), this.currentId = setTimeout(() => {
|
|
1538
|
-
this.currentId =
|
|
1536
|
+
this.currentId = Nr, t();
|
|
1539
1537
|
}, e);
|
|
1540
1538
|
}
|
|
1541
1539
|
isStarted() {
|
|
1542
|
-
return this.currentId !==
|
|
1540
|
+
return this.currentId !== Nr;
|
|
1543
1541
|
}
|
|
1544
1542
|
clear = () => {
|
|
1545
|
-
this.currentId !==
|
|
1543
|
+
this.currentId !== Nr && (clearTimeout(this.currentId), this.currentId = Nr);
|
|
1546
1544
|
};
|
|
1547
1545
|
disposeEffect = () => this.clear;
|
|
1548
1546
|
};
|
|
1549
|
-
function
|
|
1550
|
-
let e =
|
|
1551
|
-
return
|
|
1547
|
+
function Fr() {
|
|
1548
|
+
let e = Se(Pr.create).current;
|
|
1549
|
+
return Jt(e.disposeEffect), e;
|
|
1552
1550
|
}
|
|
1553
1551
|
//#endregion
|
|
1554
1552
|
//#region node_modules/@base-ui/utils/esm/useScrollLock.js
|
|
1555
|
-
var
|
|
1556
|
-
function
|
|
1553
|
+
var Ir = {}, Lr = {}, Rr = "";
|
|
1554
|
+
function zr(e) {
|
|
1557
1555
|
if (typeof document > "u") return !1;
|
|
1558
1556
|
let t = Y(e);
|
|
1559
1557
|
return T(t).innerWidth - t.documentElement.clientWidth > 0;
|
|
1560
1558
|
}
|
|
1561
|
-
function
|
|
1559
|
+
function Br(e) {
|
|
1562
1560
|
if (!(typeof CSS < "u" && CSS.supports && CSS.supports("scrollbar-gutter", "stable")) || typeof document > "u") return !1;
|
|
1563
1561
|
let t = Y(e), n = t.documentElement, r = t.body, i = k(n) ? n : r, a = i.style.overflowY, o = n.style.scrollbarGutter;
|
|
1564
1562
|
n.style.scrollbarGutter = "stable", i.style.overflowY = "scroll";
|
|
@@ -1567,7 +1565,7 @@ function Rr(e) {
|
|
|
1567
1565
|
let c = i.offsetWidth;
|
|
1568
1566
|
return i.style.overflowY = a, n.style.scrollbarGutter = o, s === c;
|
|
1569
1567
|
}
|
|
1570
|
-
function
|
|
1568
|
+
function Vr(e) {
|
|
1571
1569
|
let t = Y(e), n = t.documentElement, r = t.body, i = k(n) ? n : r, a = {
|
|
1572
1570
|
overflowY: i.style.overflowY,
|
|
1573
1571
|
overflowX: i.style.overflowX
|
|
@@ -1579,16 +1577,16 @@ function zr(e) {
|
|
|
1579
1577
|
Object.assign(i.style, a);
|
|
1580
1578
|
};
|
|
1581
1579
|
}
|
|
1582
|
-
function
|
|
1583
|
-
let t = Y(e), n = t.documentElement, r = t.body, i = T(n), a = 0, o = 0, s = !1, c =
|
|
1584
|
-
if (
|
|
1580
|
+
function Hr(e) {
|
|
1581
|
+
let t = Y(e), n = t.documentElement, r = t.body, i = T(n), a = 0, o = 0, s = !1, c = Qt.create();
|
|
1582
|
+
if (bn && (i.visualViewport?.scale ?? 1) !== 1) return () => {};
|
|
1585
1583
|
function l() {
|
|
1586
1584
|
let t = i.getComputedStyle(n), c = i.getComputedStyle(r), l = (t.scrollbarGutter || "").includes("both-edges") ? "stable both-edges" : "stable";
|
|
1587
|
-
a = n.scrollTop, o = n.scrollLeft,
|
|
1585
|
+
a = n.scrollTop, o = n.scrollLeft, Ir = {
|
|
1588
1586
|
scrollbarGutter: n.style.scrollbarGutter,
|
|
1589
1587
|
overflowY: n.style.overflowY,
|
|
1590
1588
|
overflowX: n.style.overflowX
|
|
1591
|
-
},
|
|
1589
|
+
}, Rr = n.style.scrollBehavior, Lr = {
|
|
1592
1590
|
position: r.style.position,
|
|
1593
1591
|
height: r.style.height,
|
|
1594
1592
|
width: r.style.width,
|
|
@@ -1598,7 +1596,7 @@ function Br(e) {
|
|
|
1598
1596
|
scrollBehavior: r.style.scrollBehavior
|
|
1599
1597
|
};
|
|
1600
1598
|
let u = n.scrollHeight > n.clientHeight, d = n.scrollWidth > n.clientWidth, f = t.overflowY === "scroll" || c.overflowY === "scroll", p = t.overflowX === "scroll" || c.overflowX === "scroll", m = Math.max(0, i.innerWidth - r.clientWidth), h = Math.max(0, i.innerHeight - r.clientHeight), g = parseFloat(c.marginTop) + parseFloat(c.marginBottom), _ = parseFloat(c.marginLeft) + parseFloat(c.marginRight), v = k(n) ? n : r;
|
|
1601
|
-
if (s =
|
|
1599
|
+
if (s = Br(e), s) {
|
|
1602
1600
|
n.style.scrollbarGutter = l, v.style.overflowY = "hidden", v.style.overflowX = "hidden";
|
|
1603
1601
|
return;
|
|
1604
1602
|
}
|
|
@@ -1616,7 +1614,7 @@ function Br(e) {
|
|
|
1616
1614
|
}), r.scrollTop = a, r.scrollLeft = o, n.setAttribute("data-base-ui-scroll-locked", ""), n.style.scrollBehavior = "unset";
|
|
1617
1615
|
}
|
|
1618
1616
|
function u() {
|
|
1619
|
-
Object.assign(n.style,
|
|
1617
|
+
Object.assign(n.style, Ir), Object.assign(r.style, Lr), s || (n.scrollTop = a, n.scrollLeft = o, n.removeAttribute("data-base-ui-scroll-locked"), n.style.scrollBehavior = Rr);
|
|
1620
1618
|
}
|
|
1621
1619
|
function d() {
|
|
1622
1620
|
u(), c.request(l);
|
|
@@ -1627,11 +1625,11 @@ function Br(e) {
|
|
|
1627
1625
|
c.cancel(), u(), typeof i.removeEventListener == "function" && f();
|
|
1628
1626
|
};
|
|
1629
1627
|
}
|
|
1630
|
-
var
|
|
1628
|
+
var Ur = new class {
|
|
1631
1629
|
lockCount = 0;
|
|
1632
1630
|
restore = null;
|
|
1633
|
-
timeoutLock =
|
|
1634
|
-
timeoutUnlock =
|
|
1631
|
+
timeoutLock = Pr.create();
|
|
1632
|
+
timeoutUnlock = Pr.create();
|
|
1635
1633
|
acquire(e) {
|
|
1636
1634
|
return this.lockCount += 1, this.lockCount === 1 && this.restore === null && this.timeoutLock.start(0, () => this.lock(e)), this.release;
|
|
1637
1635
|
}
|
|
@@ -1645,20 +1643,21 @@ var Vr = new class {
|
|
|
1645
1643
|
if (this.lockCount === 0 || this.restore !== null) return;
|
|
1646
1644
|
let t = Y(e).documentElement, n = T(t).getComputedStyle(t).overflowY;
|
|
1647
1645
|
if (n === "hidden" || n === "clip") {
|
|
1648
|
-
this.restore =
|
|
1646
|
+
this.restore = qe;
|
|
1649
1647
|
return;
|
|
1650
1648
|
}
|
|
1651
|
-
|
|
1649
|
+
let r = xn || !zr(e);
|
|
1650
|
+
this.restore = r ? Vr(e) : Hr(e);
|
|
1652
1651
|
}
|
|
1653
1652
|
}();
|
|
1654
|
-
function
|
|
1653
|
+
function Wr(e = !0, t = null) {
|
|
1655
1654
|
U(() => {
|
|
1656
|
-
if (e) return
|
|
1655
|
+
if (e) return Ur.acquire(t);
|
|
1657
1656
|
}, [e, t]);
|
|
1658
1657
|
}
|
|
1659
1658
|
//#endregion
|
|
1660
1659
|
//#region node_modules/@base-ui/utils/esm/mergeCleanups.js
|
|
1661
|
-
function
|
|
1660
|
+
function Gr(...e) {
|
|
1662
1661
|
return () => {
|
|
1663
1662
|
for (let t = 0; t < e.length; t += 1) {
|
|
1664
1663
|
let n = e[t];
|
|
@@ -1668,11 +1667,11 @@ function Ur(...e) {
|
|
|
1668
1667
|
}
|
|
1669
1668
|
//#endregion
|
|
1670
1669
|
//#region node_modules/@base-ui/utils/esm/useValueAsRef.js
|
|
1671
|
-
function
|
|
1672
|
-
let t =
|
|
1670
|
+
function Kr(e) {
|
|
1671
|
+
let t = Se(qr, e).current;
|
|
1673
1672
|
return t.next = e, U(t.effect), t;
|
|
1674
1673
|
}
|
|
1675
|
-
function
|
|
1674
|
+
function qr(e) {
|
|
1676
1675
|
let t = {
|
|
1677
1676
|
current: e,
|
|
1678
1677
|
next: e,
|
|
@@ -1684,7 +1683,7 @@ function Gr(e) {
|
|
|
1684
1683
|
}
|
|
1685
1684
|
//#endregion
|
|
1686
1685
|
//#region node_modules/@base-ui/utils/esm/visuallyHidden.js
|
|
1687
|
-
var
|
|
1686
|
+
var Jr = {
|
|
1688
1687
|
clipPath: "inset(50%)",
|
|
1689
1688
|
overflow: "hidden",
|
|
1690
1689
|
whiteSpace: "nowrap",
|
|
@@ -1693,77 +1692,77 @@ var Kr = {
|
|
|
1693
1692
|
width: 1,
|
|
1694
1693
|
height: 1,
|
|
1695
1694
|
margin: -1
|
|
1696
|
-
},
|
|
1697
|
-
...
|
|
1695
|
+
}, Yr = {
|
|
1696
|
+
...Jr,
|
|
1698
1697
|
position: "fixed",
|
|
1699
1698
|
top: 0,
|
|
1700
1699
|
left: 0
|
|
1701
|
-
},
|
|
1702
|
-
...
|
|
1700
|
+
}, Xr = {
|
|
1701
|
+
...Jr,
|
|
1703
1702
|
position: "absolute"
|
|
1704
|
-
},
|
|
1703
|
+
}, Zr = /*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
1705
1704
|
let [n, r] = N.useState();
|
|
1706
1705
|
U(() => {
|
|
1707
|
-
|
|
1706
|
+
Cn && r("button");
|
|
1708
1707
|
}, []);
|
|
1709
1708
|
let i = {
|
|
1710
1709
|
tabIndex: 0,
|
|
1711
1710
|
role: n
|
|
1712
1711
|
};
|
|
1713
|
-
return
|
|
1712
|
+
return /*#__PURE__*/ F("span", {
|
|
1714
1713
|
...e,
|
|
1715
1714
|
ref: t,
|
|
1716
|
-
style:
|
|
1717
|
-
"aria-hidden": n
|
|
1715
|
+
style: Yr,
|
|
1716
|
+
"aria-hidden": !n || void 0,
|
|
1718
1717
|
...i,
|
|
1719
1718
|
"data-base-ui-focus-guard": ""
|
|
1720
1719
|
});
|
|
1721
1720
|
});
|
|
1722
|
-
process.env.NODE_ENV !== "production" && (
|
|
1721
|
+
process.env.NODE_ENV !== "production" && (Zr.displayName = "FocusGuard");
|
|
1723
1722
|
//#endregion
|
|
1724
1723
|
//#region node_modules/@base-ui/react/esm/floating-ui-react/utils/createAttribute.js
|
|
1725
|
-
function
|
|
1724
|
+
function Qr(e) {
|
|
1726
1725
|
return `data-base-ui-${e}`;
|
|
1727
1726
|
}
|
|
1728
1727
|
//#endregion
|
|
1729
1728
|
//#region node_modules/@base-ui/react/esm/floating-ui-react/utils/enqueueFocus.js
|
|
1730
|
-
var
|
|
1731
|
-
function
|
|
1729
|
+
var $r = 0;
|
|
1730
|
+
function ei(e, t = {}) {
|
|
1732
1731
|
let { preventScroll: n = !1, cancelPrevious: r = !0, sync: i = !1 } = t;
|
|
1733
|
-
r && cancelAnimationFrame(
|
|
1732
|
+
r && cancelAnimationFrame($r);
|
|
1734
1733
|
let a = () => e?.focus({ preventScroll: n });
|
|
1735
|
-
if (i) return a(),
|
|
1734
|
+
if (i) return a(), qe;
|
|
1736
1735
|
let o = requestAnimationFrame(a);
|
|
1737
|
-
return
|
|
1738
|
-
|
|
1736
|
+
return $r = o, () => {
|
|
1737
|
+
$r === o && (cancelAnimationFrame(o), $r = 0);
|
|
1739
1738
|
};
|
|
1740
1739
|
}
|
|
1741
1740
|
//#endregion
|
|
1742
1741
|
//#region node_modules/@base-ui/react/esm/floating-ui-react/utils/markOthers.js
|
|
1743
|
-
var
|
|
1742
|
+
var ti = {
|
|
1744
1743
|
inert: /* @__PURE__ */ new WeakMap(),
|
|
1745
1744
|
"aria-hidden": /* @__PURE__ */ new WeakMap()
|
|
1746
|
-
},
|
|
1745
|
+
}, ni = "data-base-ui-inert", ri = {
|
|
1747
1746
|
inert: /* @__PURE__ */ new WeakSet(),
|
|
1748
1747
|
"aria-hidden": /* @__PURE__ */ new WeakSet()
|
|
1749
|
-
},
|
|
1750
|
-
function
|
|
1751
|
-
return
|
|
1748
|
+
}, ii = /* @__PURE__ */ new WeakMap(), ai = 0;
|
|
1749
|
+
function oi(e) {
|
|
1750
|
+
return ri[e];
|
|
1752
1751
|
}
|
|
1753
|
-
function
|
|
1754
|
-
return e ? M(e) ? e.host :
|
|
1752
|
+
function si(e) {
|
|
1753
|
+
return e ? M(e) ? e.host : si(e.parentNode) : null;
|
|
1755
1754
|
}
|
|
1756
|
-
var
|
|
1755
|
+
var ci = (e, t) => t.map((t) => {
|
|
1757
1756
|
if (e.contains(t)) return t;
|
|
1758
|
-
let n =
|
|
1757
|
+
let n = si(t);
|
|
1759
1758
|
return e.contains(n) ? n : null;
|
|
1760
|
-
}).filter((e) => e != null),
|
|
1759
|
+
}).filter((e) => e != null), li = (e) => {
|
|
1761
1760
|
let t = /* @__PURE__ */ new Set();
|
|
1762
1761
|
return e.forEach((e) => {
|
|
1763
1762
|
let n = e;
|
|
1764
1763
|
for (; n && !t.has(n);) t.add(n), n = n.parentNode;
|
|
1765
1764
|
}), t;
|
|
1766
|
-
},
|
|
1765
|
+
}, ui = (e, t, n) => {
|
|
1767
1766
|
let r = [], i = (e) => {
|
|
1768
1767
|
!e || n.has(e) || Array.from(e.children).forEach((e) => {
|
|
1769
1768
|
_(e) !== "script" && (t.has(e) ? i(e) : r.push(e));
|
|
@@ -1771,49 +1770,49 @@ var oi = (e, t) => t.map((t) => {
|
|
|
1771
1770
|
};
|
|
1772
1771
|
return i(e), r;
|
|
1773
1772
|
};
|
|
1774
|
-
function
|
|
1775
|
-
let o = r ? "inert" : n ? "aria-hidden" : null, s = null, c = null, l =
|
|
1773
|
+
function di(e, t, n, r, { mark: i = !0, markerIgnoreElements: a = [] }) {
|
|
1774
|
+
let o = r ? "inert" : n ? "aria-hidden" : null, s = null, c = null, l = ci(t, e), u = i ? ci(t, a) : [], d = new Set(u), f = i ? ui(t, li(l), new Set(l)).filter((e) => !d.has(e)) : [], p = [], m = [];
|
|
1776
1775
|
if (o) {
|
|
1777
|
-
let e =
|
|
1776
|
+
let e = ti[o], n = oi(o);
|
|
1778
1777
|
c = n, s = e;
|
|
1779
|
-
let r =
|
|
1780
|
-
|
|
1778
|
+
let r = ci(t, Array.from(t.querySelectorAll("[aria-live]"))), i = l.concat(r);
|
|
1779
|
+
ui(t, li(i), new Set(i)).forEach((t) => {
|
|
1781
1780
|
let r = t.getAttribute(o), i = r !== null && r !== "false", a = (e.get(t) || 0) + 1;
|
|
1782
1781
|
e.set(t, a), p.push(t), a === 1 && i && n.add(t), i || t.setAttribute(o, o === "inert" ? "" : "true");
|
|
1783
1782
|
});
|
|
1784
1783
|
}
|
|
1785
1784
|
return i && f.forEach((e) => {
|
|
1786
|
-
let t = (
|
|
1787
|
-
|
|
1788
|
-
}),
|
|
1785
|
+
let t = (ii.get(e) || 0) + 1;
|
|
1786
|
+
ii.set(e, t), m.push(e), t === 1 && e.setAttribute(ni, "");
|
|
1787
|
+
}), ai += 1, () => {
|
|
1789
1788
|
s && p.forEach((e) => {
|
|
1790
1789
|
let t = (s.get(e) || 0) - 1;
|
|
1791
1790
|
s.set(e, t), t || (!c?.has(e) && o && e.removeAttribute(o), c?.delete(e));
|
|
1792
1791
|
}), i && m.forEach((e) => {
|
|
1793
|
-
let t = (
|
|
1794
|
-
|
|
1795
|
-
}), --
|
|
1792
|
+
let t = (ii.get(e) || 0) - 1;
|
|
1793
|
+
ii.set(e, t), t || e.removeAttribute(ni);
|
|
1794
|
+
}), --ai, ai || (ti.inert = /* @__PURE__ */ new WeakMap(), ti["aria-hidden"] = /* @__PURE__ */ new WeakMap(), ri.inert = /* @__PURE__ */ new WeakSet(), ri["aria-hidden"] = /* @__PURE__ */ new WeakSet(), ii = /* @__PURE__ */ new WeakMap());
|
|
1796
1795
|
};
|
|
1797
1796
|
}
|
|
1798
|
-
function
|
|
1797
|
+
function fi(e, t = {}) {
|
|
1799
1798
|
let { ariaHidden: n = !1, inert: r = !1, mark: i = !0, markerIgnoreElements: a = [] } = t, o = Y(e[0]).body;
|
|
1800
|
-
return
|
|
1799
|
+
return di(e, o, n, r, {
|
|
1801
1800
|
mark: i,
|
|
1802
1801
|
markerIgnoreElements: a
|
|
1803
1802
|
});
|
|
1804
1803
|
}
|
|
1805
1804
|
//#endregion
|
|
1806
1805
|
//#region node_modules/@base-ui/react/esm/internals/constants.js
|
|
1807
|
-
var
|
|
1806
|
+
var pi = { style: { transition: "none" } }, mi = { fallbackAxisSide: "none" }, hi = {
|
|
1808
1807
|
clipPath: "inset(50%)",
|
|
1809
1808
|
position: "fixed",
|
|
1810
1809
|
top: 0,
|
|
1811
1810
|
left: 0
|
|
1812
|
-
},
|
|
1813
|
-
process.env.NODE_ENV !== "production" && (
|
|
1814
|
-
var
|
|
1815
|
-
function
|
|
1816
|
-
let { ref: t, container: n, componentProps: r =
|
|
1811
|
+
}, gi = /*#__PURE__*/ N.createContext(null);
|
|
1812
|
+
process.env.NODE_ENV !== "production" && (gi.displayName = "PortalContext");
|
|
1813
|
+
var _i = () => N.useContext(gi), vi = Qr("portal");
|
|
1814
|
+
function yi(e = {}) {
|
|
1815
|
+
let { ref: t, container: n, componentProps: r = Ye, elementProps: i } = e, a = Gt(), o = _i()?.portalNode, [s, c] = N.useState(null), [l, u] = N.useState(null), d = H((e) => {
|
|
1817
1816
|
e !== null && u(e);
|
|
1818
1817
|
}), f = N.useRef(null);
|
|
1819
1818
|
U(() => {
|
|
@@ -1833,20 +1832,20 @@ function _i(e = {}) {
|
|
|
1833
1832
|
o,
|
|
1834
1833
|
a
|
|
1835
1834
|
]);
|
|
1836
|
-
let m =
|
|
1835
|
+
let m = pt("div", r, {
|
|
1837
1836
|
ref: [t, d],
|
|
1838
1837
|
props: [{
|
|
1839
1838
|
id: a,
|
|
1840
|
-
[
|
|
1839
|
+
[vi]: ""
|
|
1841
1840
|
}, i]
|
|
1842
1841
|
});
|
|
1843
1842
|
return {
|
|
1844
1843
|
portalNode: l,
|
|
1845
|
-
portalSubtree: s && m ?
|
|
1844
|
+
portalSubtree: s && m ? /*#__PURE__*/ L.createPortal(m, s) : null
|
|
1846
1845
|
};
|
|
1847
1846
|
}
|
|
1848
|
-
var
|
|
1849
|
-
let { children: n, container: r, className: i, render: a, renderGuards: o, style: s, ...c } = e, { portalNode: l, portalSubtree: u } =
|
|
1847
|
+
var bi = /*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
1848
|
+
let { children: n, container: r, className: i, render: a, renderGuards: o, style: s, ...c } = e, { portalNode: l, portalSubtree: u } = yi({
|
|
1850
1849
|
container: r,
|
|
1851
1850
|
ref: t,
|
|
1852
1851
|
componentProps: e,
|
|
@@ -1855,11 +1854,11 @@ var vi = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
1855
1854
|
N.useEffect(() => {
|
|
1856
1855
|
if (!l || v) return;
|
|
1857
1856
|
function e(e) {
|
|
1858
|
-
l && e.relatedTarget &&
|
|
1857
|
+
l && e.relatedTarget && Or(e) && (e.type === "focusin" ? _.current &&= (Ar(l), !1) : (kr(l), _.current = !0));
|
|
1859
1858
|
}
|
|
1860
|
-
return
|
|
1859
|
+
return Gr(X(l, "focusin", e, !0), X(l, "focusout", e, !0));
|
|
1861
1860
|
}, [l, v]), N.useEffect(() => {
|
|
1862
|
-
!l || y !== !1 || (
|
|
1861
|
+
!l || y !== !1 || (Ar(l), _.current = !1);
|
|
1863
1862
|
}, [y, l]);
|
|
1864
1863
|
let x = N.useMemo(() => ({
|
|
1865
1864
|
beforeOutsideRef: d,
|
|
@@ -1869,35 +1868,35 @@ var vi = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
1869
1868
|
portalNode: l,
|
|
1870
1869
|
setFocusManagerState: g
|
|
1871
1870
|
}), [l]);
|
|
1872
|
-
return
|
|
1871
|
+
return /*#__PURE__*/ I(N.Fragment, { children: [u, /*#__PURE__*/ I(gi.Provider, {
|
|
1873
1872
|
value: x,
|
|
1874
1873
|
children: [
|
|
1875
|
-
b && l &&
|
|
1874
|
+
b && l && /*#__PURE__*/ F(Zr, {
|
|
1876
1875
|
"data-type": "outside",
|
|
1877
1876
|
ref: d,
|
|
1878
1877
|
onFocus: (e) => {
|
|
1879
|
-
|
|
1878
|
+
Or(e, l) ? p.current?.focus() : Dr(h ? h.domReference : null)?.focus();
|
|
1880
1879
|
}
|
|
1881
1880
|
}),
|
|
1882
|
-
b && l &&
|
|
1881
|
+
b && l && /*#__PURE__*/ F("span", {
|
|
1883
1882
|
"aria-owns": l.id,
|
|
1884
|
-
style:
|
|
1883
|
+
style: hi
|
|
1885
1884
|
}),
|
|
1886
|
-
l &&
|
|
1887
|
-
b && l &&
|
|
1885
|
+
l && /*#__PURE__*/ L.createPortal(n, l),
|
|
1886
|
+
b && l && /*#__PURE__*/ F(Zr, {
|
|
1888
1887
|
"data-type": "outside",
|
|
1889
1888
|
ref: f,
|
|
1890
1889
|
onFocus: (e) => {
|
|
1891
|
-
|
|
1890
|
+
Or(e, l) ? m.current?.focus() : (Er(h ? h.domReference : null)?.focus(), h?.closeOnFocusOut && h?.onOpenChange(!1, q("focus-out", e.nativeEvent)));
|
|
1892
1891
|
}
|
|
1893
1892
|
})
|
|
1894
1893
|
]
|
|
1895
1894
|
})] });
|
|
1896
1895
|
});
|
|
1897
|
-
process.env.NODE_ENV !== "production" && (
|
|
1896
|
+
process.env.NODE_ENV !== "production" && (bi.displayName = "FloatingPortal");
|
|
1898
1897
|
//#endregion
|
|
1899
1898
|
//#region node_modules/@base-ui/react/esm/floating-ui-react/utils/createEventEmitter.js
|
|
1900
|
-
function
|
|
1899
|
+
function xi() {
|
|
1901
1900
|
let e = /* @__PURE__ */ new Map();
|
|
1902
1901
|
return {
|
|
1903
1902
|
emit(t, n) {
|
|
@@ -1913,170 +1912,168 @@ function yi() {
|
|
|
1913
1912
|
}
|
|
1914
1913
|
//#endregion
|
|
1915
1914
|
//#region node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingTree.js
|
|
1916
|
-
var
|
|
1917
|
-
process.env.NODE_ENV !== "production" && (
|
|
1918
|
-
var
|
|
1919
|
-
process.env.NODE_ENV !== "production" && (
|
|
1920
|
-
var
|
|
1921
|
-
let t = N.useContext(
|
|
1915
|
+
var Si = /*#__PURE__*/ N.createContext(null);
|
|
1916
|
+
process.env.NODE_ENV !== "production" && (Si.displayName = "FloatingNodeContext");
|
|
1917
|
+
var Ci = /*#__PURE__*/ N.createContext(null);
|
|
1918
|
+
process.env.NODE_ENV !== "production" && (Ci.displayName = "FloatingTreeContext");
|
|
1919
|
+
var wi = () => N.useContext(Si)?.id || null, Ti = (e) => {
|
|
1920
|
+
let t = N.useContext(Ci);
|
|
1922
1921
|
return e ?? t;
|
|
1923
1922
|
};
|
|
1924
1923
|
//#endregion
|
|
1925
1924
|
//#region node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingFocusManager.js
|
|
1926
|
-
function
|
|
1927
|
-
let n = T(
|
|
1925
|
+
function Ei(e, t) {
|
|
1926
|
+
let n = T(In(e));
|
|
1928
1927
|
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") : "";
|
|
1929
1928
|
}
|
|
1930
|
-
var
|
|
1931
|
-
function Di() {
|
|
1932
|
-
Ei = Ei.filter((e) => e.deref()?.isConnected);
|
|
1933
|
-
}
|
|
1934
|
-
function Oi(e) {
|
|
1935
|
-
Di(), e && _(e) !== "body" && (Ei.push(new WeakRef(e)), Ei.length > Ti && (Ei = Ei.slice(-Ti)));
|
|
1936
|
-
}
|
|
1929
|
+
var Di = 20, Oi = [];
|
|
1937
1930
|
function ki() {
|
|
1938
|
-
|
|
1931
|
+
Oi = Oi.filter((e) => e.deref()?.isConnected);
|
|
1939
1932
|
}
|
|
1940
1933
|
function Ai(e) {
|
|
1941
|
-
|
|
1934
|
+
ki(), e && _(e) !== "body" && (Oi.push(new WeakRef(e)), Oi.length > Di && (Oi = Oi.slice(-20)));
|
|
1935
|
+
}
|
|
1936
|
+
function ji() {
|
|
1937
|
+
return ki(), Oi[Oi.length - 1]?.deref();
|
|
1938
|
+
}
|
|
1939
|
+
function Mi(e) {
|
|
1940
|
+
return e ? Sr(e) ? e : wr(e)[0] || e : null;
|
|
1942
1941
|
}
|
|
1943
|
-
function
|
|
1942
|
+
function Ni(e, t) {
|
|
1944
1943
|
if (e.hasAttribute("tabindex") && !e.hasAttribute("data-tabindex") || !t.current.includes("floating") && !e.getAttribute("role")?.includes("dialog")) return;
|
|
1945
|
-
let n =
|
|
1944
|
+
let n = Cr(e).filter((e) => {
|
|
1946
1945
|
let t = e.getAttribute("data-tabindex") || "";
|
|
1947
|
-
return
|
|
1946
|
+
return Sr(e) || e.hasAttribute("data-tabindex") && !t.startsWith("-");
|
|
1948
1947
|
}), r = e.getAttribute("tabindex");
|
|
1949
1948
|
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"));
|
|
1950
1949
|
}
|
|
1951
|
-
function
|
|
1952
|
-
let { context: t, children: n, disabled: r = !1, initialFocus: i = !0, returnFocus: a = !0, restoreFocus: o = !1, modal: s = !0, closeOnFocusOut: c = !0, openInteractionType: l = "", nextFocusableElement: u, previousFocusableElement: d, beforeContentFocusGuardRef: f, externalTree: p, getInsideElements: m } = e, h = "rootStore" in t ? t.rootStore : t, g = h.useState("open"), _ = h.useState("domReferenceElement"), v = h.useState("floatingElement"), { events: y, dataRef: x } = h.context, S = H(() => x.current.floatingContext?.nodeId), C = i === !1, w =
|
|
1950
|
+
function Pi(e) {
|
|
1951
|
+
let { context: t, children: n, disabled: r = !1, initialFocus: i = !0, returnFocus: a = !0, restoreFocus: o = !1, modal: s = !0, closeOnFocusOut: c = !0, openInteractionType: l = "", nextFocusableElement: u, previousFocusableElement: d, beforeContentFocusGuardRef: f, externalTree: p, getInsideElements: m } = e, h = "rootStore" in t ? t.rootStore : t, g = h.useState("open"), _ = h.useState("domReferenceElement"), v = h.useState("floatingElement"), { events: y, dataRef: x } = h.context, S = H(() => x.current.floatingContext?.nodeId), C = i === !1, w = Vn(_) && C, ee = N.useRef(["content"]), te = Kr(i), T = Kr(a), E = Kr(l), D = Ti(p), O = _i(), k = N.useRef(!1), A = N.useRef(!1), j = N.useRef(!1), M = N.useRef(null), ne = N.useRef(""), P = N.useRef(""), L = N.useRef(null), R = N.useRef(null), re = Re(L, f, O?.beforeInsideRef), ie = Re(R, O?.afterInsideRef), ae = Fr(), z = Fr(), oe = $t(), se = O != null, B = Hn(v), ce = H((e = B) => e ? wr(e) : []), le = H(() => m?.().filter((e) => e != null) ?? []);
|
|
1953
1952
|
N.useEffect(() => {
|
|
1954
1953
|
if (r || !s) return;
|
|
1955
1954
|
function e(e) {
|
|
1956
|
-
e.key === "Tab" && J(
|
|
1955
|
+
e.key === "Tab" && J(B, Fn(Y(B))) && ce().length === 0 && !w && Gn(e);
|
|
1957
1956
|
}
|
|
1958
|
-
return X(Y(
|
|
1957
|
+
return X(Y(B), "keydown", e);
|
|
1959
1958
|
}, [
|
|
1960
1959
|
r,
|
|
1961
1960
|
_,
|
|
1962
|
-
|
|
1961
|
+
B,
|
|
1963
1962
|
s,
|
|
1964
1963
|
ee,
|
|
1965
1964
|
w,
|
|
1966
|
-
|
|
1965
|
+
ce
|
|
1967
1966
|
]), N.useEffect(() => {
|
|
1968
1967
|
if (r || !g) return;
|
|
1969
|
-
let e = Y(
|
|
1968
|
+
let e = Y(B);
|
|
1970
1969
|
function t() {
|
|
1971
1970
|
j.current = !1;
|
|
1972
1971
|
}
|
|
1973
1972
|
function n(e) {
|
|
1974
|
-
let t =
|
|
1975
|
-
j.current = !
|
|
1973
|
+
let t = In(e), n = le(), r = J(v, t) || J(_, t) || J(O?.portalNode, t) || n.some((e) => e === t || J(e, t));
|
|
1974
|
+
j.current = !r, P.current = e.pointerType || "keyboard", t?.closest("[data-base-ui-click-trigger]") && (A.current = !0);
|
|
1976
1975
|
}
|
|
1977
1976
|
function i() {
|
|
1978
1977
|
P.current = "keyboard";
|
|
1979
1978
|
}
|
|
1980
|
-
return
|
|
1979
|
+
return Gr(X(e, "pointerdown", n, !0), X(e, "pointerup", t, !0), X(e, "pointercancel", t, !0), X(e, "keydown", i, !0));
|
|
1981
1980
|
}, [
|
|
1982
1981
|
r,
|
|
1983
1982
|
v,
|
|
1984
1983
|
_,
|
|
1985
|
-
|
|
1984
|
+
B,
|
|
1986
1985
|
g,
|
|
1987
1986
|
O,
|
|
1988
|
-
|
|
1987
|
+
le
|
|
1989
1988
|
]), N.useEffect(() => {
|
|
1990
1989
|
if (r || !c) return;
|
|
1991
|
-
let e = Y(
|
|
1990
|
+
let e = Y(B);
|
|
1992
1991
|
function t() {
|
|
1993
|
-
A.current = !0,
|
|
1992
|
+
A.current = !0, z.start(0, () => {
|
|
1994
1993
|
A.current = !1;
|
|
1995
1994
|
});
|
|
1996
1995
|
}
|
|
1997
1996
|
function n(e) {
|
|
1998
|
-
let t =
|
|
1999
|
-
|
|
1997
|
+
let t = In(e);
|
|
1998
|
+
Sr(t) && (M.current = t);
|
|
2000
1999
|
}
|
|
2001
2000
|
function i(t) {
|
|
2002
|
-
let n = t.relatedTarget, r = t.currentTarget, i =
|
|
2001
|
+
let n = t.relatedTarget, r = t.currentTarget, i = In(t);
|
|
2003
2002
|
queueMicrotask(() => {
|
|
2004
|
-
let a = S(), c = h.context.triggerElements, l =
|
|
2003
|
+
let a = S(), c = h.context.triggerElements, l = le(), f = n?.hasAttribute(Qr("focus-guard")) && [
|
|
2005
2004
|
L.current,
|
|
2006
2005
|
R.current,
|
|
2007
2006
|
O?.beforeInsideRef.current,
|
|
2008
2007
|
O?.afterInsideRef.current,
|
|
2009
2008
|
O?.beforeOutsideRef.current,
|
|
2010
2009
|
O?.afterOutsideRef.current,
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
].includes(n), p = !(J(_, n) || J(v, n) || J(n, v) || J(O?.portalNode, n) || l.some((e) => e === n || J(e, n)) || n != null && c.hasElement(n) || c.hasMatchingElement((e) => J(e, n)) || f || D && (
|
|
2014
|
-
if (r === _ &&
|
|
2015
|
-
if (b(
|
|
2016
|
-
|
|
2017
|
-
|
|
2010
|
+
en(d),
|
|
2011
|
+
en(u)
|
|
2012
|
+
].includes(n), p = !(J(_, n) || J(v, n) || J(n, v) || J(O?.portalNode, n) || l.some((e) => e === n || J(e, n)) || n != null && c.hasElement(n) || c.hasMatchingElement((e) => J(e, n)) || f || D && (Un(D.nodesRef.current, a).find((e) => J(e.context?.elements.floating, n) || J(e.context?.elements.domReference, n)) || Wn(D.nodesRef.current, a).find((e) => [e.context?.elements.floating, Hn(e.context?.elements.floating)].includes(n) || e.context?.elements.domReference === n)));
|
|
2013
|
+
if (r === _ && B && Ni(B, ee), o && r !== _ && !cr(i) && Fn(e) === e.body) {
|
|
2014
|
+
if (b(B) && (B.focus(), o === "popup")) {
|
|
2015
|
+
oe.request(() => {
|
|
2016
|
+
B.focus();
|
|
2018
2017
|
});
|
|
2019
2018
|
return;
|
|
2020
2019
|
}
|
|
2021
|
-
let e =
|
|
2020
|
+
let e = ce(), t = M.current, n = (t && e.includes(t) ? t : null) || e[e.length - 1] || B;
|
|
2022
2021
|
b(n) && n.focus();
|
|
2023
2022
|
}
|
|
2024
2023
|
if (x.current.insideReactTree) {
|
|
2025
2024
|
x.current.insideReactTree = !1;
|
|
2026
2025
|
return;
|
|
2027
2026
|
}
|
|
2028
|
-
(w || !s) && n && p && !A.current && (w || n !==
|
|
2027
|
+
(w || !s) && n && p && !A.current && (w || n !== ji()) && (k.current = !0, h.setOpen(!1, q(It, t)));
|
|
2029
2028
|
});
|
|
2030
2029
|
}
|
|
2031
2030
|
function a() {
|
|
2032
|
-
j.current || (x.current.insideReactTree = !0,
|
|
2031
|
+
j.current || (x.current.insideReactTree = !0, ae.start(0, () => {
|
|
2033
2032
|
x.current.insideReactTree = !1;
|
|
2034
2033
|
}));
|
|
2035
2034
|
}
|
|
2036
2035
|
let l = b(_) ? _ : null;
|
|
2037
|
-
if (!(!v && !l)) return
|
|
2036
|
+
if (!(!v && !l)) return Gr(l && X(l, "focusout", i), l && X(l, "pointerdown", t), v && X(v, "focusin", n), v && X(v, "focusout", i), v && O && X(v, "focusout", a, !0));
|
|
2038
2037
|
}, [
|
|
2039
2038
|
r,
|
|
2040
2039
|
_,
|
|
2041
2040
|
v,
|
|
2042
|
-
|
|
2041
|
+
B,
|
|
2043
2042
|
s,
|
|
2044
2043
|
D,
|
|
2045
2044
|
O,
|
|
2046
2045
|
h,
|
|
2047
2046
|
c,
|
|
2048
2047
|
o,
|
|
2049
|
-
|
|
2048
|
+
ce,
|
|
2050
2049
|
w,
|
|
2051
2050
|
S,
|
|
2052
2051
|
ee,
|
|
2053
2052
|
x,
|
|
2054
|
-
ie,
|
|
2055
|
-
B,
|
|
2056
2053
|
ae,
|
|
2054
|
+
z,
|
|
2055
|
+
oe,
|
|
2057
2056
|
u,
|
|
2058
2057
|
d,
|
|
2059
|
-
|
|
2058
|
+
le
|
|
2060
2059
|
]), N.useEffect(() => {
|
|
2061
2060
|
if (r || !v || !g) return;
|
|
2062
|
-
let e = Array.from(O?.portalNode?.querySelectorAll(`[${
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
...ce()
|
|
2071
|
-
],
|
|
2061
|
+
let e = Array.from(O?.portalNode?.querySelectorAll(`[${Qr("portal")}]`) || []), t = (D ? Wn(D.nodesRef.current, S()) : []).find((e) => Vn(e.context?.elements.domReference || null))?.context?.elements.domReference, n = fi([
|
|
2062
|
+
v,
|
|
2063
|
+
...e,
|
|
2064
|
+
L.current,
|
|
2065
|
+
R.current,
|
|
2066
|
+
O?.beforeOutsideRef.current,
|
|
2067
|
+
O?.afterOutsideRef.current,
|
|
2068
|
+
...le(),
|
|
2072
2069
|
t,
|
|
2073
|
-
|
|
2074
|
-
|
|
2070
|
+
en(d),
|
|
2071
|
+
en(u),
|
|
2075
2072
|
w ? _ : null
|
|
2076
2073
|
].filter((e) => e != null), {
|
|
2077
2074
|
ariaHidden: s || w,
|
|
2078
2075
|
mark: !1
|
|
2079
|
-
}), i =
|
|
2076
|
+
}), i = fi([v, ...e].filter((e) => e != null));
|
|
2080
2077
|
return () => {
|
|
2081
2078
|
i(), n();
|
|
2082
2079
|
};
|
|
@@ -2093,34 +2090,34 @@ function Mi(e) {
|
|
|
2093
2090
|
S,
|
|
2094
2091
|
u,
|
|
2095
2092
|
d,
|
|
2096
|
-
|
|
2093
|
+
le
|
|
2097
2094
|
]), U(() => {
|
|
2098
|
-
if (!g || r || !b(
|
|
2099
|
-
let e =
|
|
2095
|
+
if (!g || r || !b(B)) return;
|
|
2096
|
+
let e = Fn(Y(B));
|
|
2100
2097
|
queueMicrotask(() => {
|
|
2101
2098
|
let t = te.current, n = typeof t == "function" ? t(E.current || "") : t;
|
|
2102
|
-
if (n === void 0 || n === !1 || J(
|
|
2103
|
-
let r = null, i = () => (r ??=
|
|
2104
|
-
a = n === !0 || n === null ? i() :
|
|
2099
|
+
if (n === void 0 || n === !1 || J(B, e)) return;
|
|
2100
|
+
let r = null, i = () => (r ??= ce(B), r[0] || B), a;
|
|
2101
|
+
a = n === !0 || n === null ? i() : en(n), a ||= i(), ei(a, { preventScroll: a === B });
|
|
2105
2102
|
});
|
|
2106
2103
|
}, [
|
|
2107
2104
|
r,
|
|
2108
2105
|
g,
|
|
2109
|
-
|
|
2106
|
+
B,
|
|
2110
2107
|
C,
|
|
2111
|
-
|
|
2108
|
+
ce,
|
|
2112
2109
|
te,
|
|
2113
2110
|
E
|
|
2114
2111
|
]), U(() => {
|
|
2115
|
-
if (r || !
|
|
2116
|
-
let e = Y(
|
|
2117
|
-
|
|
2112
|
+
if (r || !B) return;
|
|
2113
|
+
let e = Y(B);
|
|
2114
|
+
Ai(Fn(e));
|
|
2118
2115
|
function t(e) {
|
|
2119
|
-
if (e.open || (ne.current =
|
|
2120
|
-
else if (
|
|
2116
|
+
if (e.open || (ne.current = Ei(e.nativeEvent, P.current)), e.reason === "trigger-hover" && e.nativeEvent.type === "mouseleave" && (k.current = !0), e.reason === "outside-press") if (e.nested) k.current = !1;
|
|
2117
|
+
else if (qn(e.nativeEvent) || Jn(e.nativeEvent)) k.current = !1;
|
|
2121
2118
|
else {
|
|
2122
2119
|
let e = !1;
|
|
2123
|
-
Y(
|
|
2120
|
+
Y(B).createElement("div").focus({ get preventScroll() {
|
|
2124
2121
|
return e = !0, !1;
|
|
2125
2122
|
} }), e ? k.current = !1 : k.current = !0;
|
|
2126
2123
|
}
|
|
@@ -2130,35 +2127,35 @@ function Mi(e) {
|
|
|
2130
2127
|
let e = T.current, t = typeof e == "function" ? e(ne.current) : e;
|
|
2131
2128
|
if (t === void 0 || t === !1) return null;
|
|
2132
2129
|
if (t === null && (t = !0), typeof t == "boolean") {
|
|
2133
|
-
let e = _ ||
|
|
2130
|
+
let e = _ || ji();
|
|
2134
2131
|
return e && e.isConnected ? e : null;
|
|
2135
2132
|
}
|
|
2136
|
-
let n = _ ||
|
|
2137
|
-
return
|
|
2133
|
+
let n = _ || ji();
|
|
2134
|
+
return en(t) || n || null;
|
|
2138
2135
|
}
|
|
2139
2136
|
return () => {
|
|
2140
2137
|
y.off("openchange", t);
|
|
2141
|
-
let r =
|
|
2138
|
+
let r = Fn(e), i = le(), a = J(v, r) || i.some((e) => e === r || J(e, r)) || D && Un(D.nodesRef.current, S(), !1).some((e) => J(e.context?.elements.floating, r)), o = T.current, s = n();
|
|
2142
2139
|
queueMicrotask(() => {
|
|
2143
|
-
let t =
|
|
2140
|
+
let t = Mi(s), n = typeof o != "boolean";
|
|
2144
2141
|
o && !k.current && b(t) && (!(!n && t !== r && r !== e.body) || a) && t.focus({ preventScroll: !0 }), k.current = !1;
|
|
2145
2142
|
});
|
|
2146
2143
|
};
|
|
2147
2144
|
}, [
|
|
2148
2145
|
r,
|
|
2149
2146
|
v,
|
|
2150
|
-
|
|
2147
|
+
B,
|
|
2151
2148
|
T,
|
|
2152
2149
|
x,
|
|
2153
2150
|
y,
|
|
2154
2151
|
D,
|
|
2155
2152
|
_,
|
|
2156
2153
|
S,
|
|
2157
|
-
|
|
2154
|
+
le
|
|
2158
2155
|
]), U(() => {
|
|
2159
|
-
if (!
|
|
2160
|
-
let e =
|
|
2161
|
-
!b(e) || !
|
|
2156
|
+
if (!bn || g || !v) return;
|
|
2157
|
+
let e = Fn(Y(v));
|
|
2158
|
+
!b(e) || !zn(e) || J(v, e) && e.blur();
|
|
2162
2159
|
}, [g, v]), U(() => {
|
|
2163
2160
|
if (!(r || !O)) return O.setFocusManagerState({
|
|
2164
2161
|
modal: s,
|
|
@@ -2178,48 +2175,48 @@ function Mi(e) {
|
|
|
2178
2175
|
c,
|
|
2179
2176
|
_
|
|
2180
2177
|
]), U(() => {
|
|
2181
|
-
if (!(r || !
|
|
2182
|
-
queueMicrotask(
|
|
2178
|
+
if (!(r || !B)) return Ni(B, ee), () => {
|
|
2179
|
+
queueMicrotask(ki);
|
|
2183
2180
|
};
|
|
2184
2181
|
}, [
|
|
2185
2182
|
r,
|
|
2186
|
-
|
|
2183
|
+
B,
|
|
2187
2184
|
ee
|
|
2188
2185
|
]);
|
|
2189
|
-
let
|
|
2190
|
-
return
|
|
2191
|
-
|
|
2186
|
+
let ue = !r && (!s || !w) && (se || s);
|
|
2187
|
+
return /*#__PURE__*/ I(N.Fragment, { children: [
|
|
2188
|
+
ue && /*#__PURE__*/ F(Zr, {
|
|
2192
2189
|
"data-type": "inside",
|
|
2193
|
-
ref:
|
|
2190
|
+
ref: re,
|
|
2194
2191
|
onFocus: (e) => {
|
|
2195
2192
|
if (s) {
|
|
2196
|
-
let e =
|
|
2197
|
-
|
|
2198
|
-
} else O?.portalNode && (k.current = !1,
|
|
2193
|
+
let e = ce();
|
|
2194
|
+
ei(e[e.length - 1]);
|
|
2195
|
+
} else O?.portalNode && (k.current = !1, Or(e, O.portalNode) ? Er(_)?.focus() : en(d ?? O.beforeOutsideRef)?.focus());
|
|
2199
2196
|
}
|
|
2200
2197
|
}),
|
|
2201
2198
|
n,
|
|
2202
|
-
|
|
2199
|
+
ue && /*#__PURE__*/ F(Zr, {
|
|
2203
2200
|
"data-type": "inside",
|
|
2204
|
-
ref:
|
|
2201
|
+
ref: ie,
|
|
2205
2202
|
onFocus: (e) => {
|
|
2206
|
-
s ?
|
|
2203
|
+
s ? ei(ce()[0]) : O?.portalNode && (c && (k.current = !0), Or(e, O.portalNode) ? Dr(_)?.focus() : en(u ?? O.afterOutsideRef)?.focus());
|
|
2207
2204
|
}
|
|
2208
2205
|
})
|
|
2209
2206
|
] });
|
|
2210
2207
|
}
|
|
2211
2208
|
//#endregion
|
|
2212
2209
|
//#region node_modules/@base-ui/react/esm/floating-ui-react/hooks/useClick.js
|
|
2213
|
-
function
|
|
2214
|
-
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 =
|
|
2210
|
+
function Fi(e, t = {}) {
|
|
2211
|
+
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 = Ct } = t, d = N.useRef(void 0), f = $t(), p = Fr(), m = N.useMemo(() => ({
|
|
2215
2212
|
onPointerDown(e) {
|
|
2216
2213
|
d.current = e.pointerType;
|
|
2217
2214
|
},
|
|
2218
2215
|
onMouseDown(e) {
|
|
2219
2216
|
let t = d.current, i = e.nativeEvent, m = n.select("open");
|
|
2220
|
-
if (e.button !== 0 || a === "click" ||
|
|
2221
|
-
let h = r.current.openEvent, g = h?.type, _ = n.select("domReferenceElement") !== e.currentTarget, v = m && _ || !(m && o && (!(h && c) || g === "click" || g === "mousedown")), y =
|
|
2222
|
-
if (
|
|
2217
|
+
if (e.button !== 0 || a === "click" || Yn(t, !0) && s) return;
|
|
2218
|
+
let h = r.current.openEvent, g = h?.type, _ = n.select("domReferenceElement") !== e.currentTarget, v = m && _ || !(m && o && (!(h && c) || g === "click" || g === "mousedown")), y = In(i);
|
|
2219
|
+
if (zn(y)) {
|
|
2223
2220
|
let e = q(u, i, y);
|
|
2224
2221
|
v && t === "touch" && l > 0 ? p.start(l, () => {
|
|
2225
2222
|
n.setOpen(!0, e);
|
|
@@ -2241,8 +2238,8 @@ function Ni(e, t = {}) {
|
|
|
2241
2238
|
d.current = void 0;
|
|
2242
2239
|
return;
|
|
2243
2240
|
}
|
|
2244
|
-
if (
|
|
2245
|
-
let i = n.select("open"), f = r.current.openEvent, m = n.select("domReferenceElement") !== e.currentTarget, h = i && m || !(i && o && (!(f && c) ||
|
|
2241
|
+
if (Yn(t, !0) && s) return;
|
|
2242
|
+
let i = n.select("open"), f = r.current.openEvent, m = n.select("domReferenceElement") !== e.currentTarget, h = i && m || !(i && o && (!(f && c) || Xn(f))), g = q(u, e.nativeEvent, e.currentTarget);
|
|
2246
2243
|
h && t === "touch" && l > 0 ? p.start(l, () => {
|
|
2247
2244
|
n.setOpen(!0, g);
|
|
2248
2245
|
}) : n.setOpen(h, g);
|
|
@@ -2262,36 +2259,36 @@ function Ni(e, t = {}) {
|
|
|
2262
2259
|
l,
|
|
2263
2260
|
u
|
|
2264
2261
|
]);
|
|
2265
|
-
return N.useMemo(() => i ? { reference: m } :
|
|
2262
|
+
return N.useMemo(() => i ? { reference: m } : Ye, [i, m]);
|
|
2266
2263
|
}
|
|
2267
2264
|
//#endregion
|
|
2268
2265
|
//#region node_modules/@base-ui/react/esm/floating-ui-react/hooks/useDismiss.js
|
|
2269
|
-
var
|
|
2266
|
+
var Ii = {
|
|
2270
2267
|
intentional: "onClick",
|
|
2271
2268
|
sloppy: "onPointerDown"
|
|
2272
2269
|
};
|
|
2273
|
-
function
|
|
2270
|
+
function Li() {
|
|
2274
2271
|
return !1;
|
|
2275
2272
|
}
|
|
2276
|
-
function
|
|
2273
|
+
function Ri(e) {
|
|
2277
2274
|
return {
|
|
2278
2275
|
escapeKey: typeof e == "boolean" ? e : e?.escapeKey ?? !1,
|
|
2279
2276
|
outsidePress: typeof e == "boolean" ? e : e?.outsidePress ?? !0
|
|
2280
2277
|
};
|
|
2281
2278
|
}
|
|
2282
|
-
function
|
|
2283
|
-
let n = "rootStore" in e ? e.rootStore : e, r = n.useState("open"), i = n.useState("floatingElement"), { dataRef: a } = n.context, { enabled: o = !0, escapeKey: s = !0, outsidePress: c = !0, outsidePressEvent: l = "sloppy", referencePress: u =
|
|
2279
|
+
function zi(e, t = {}) {
|
|
2280
|
+
let n = "rootStore" in e ? e.rootStore : e, r = n.useState("open"), i = n.useState("floatingElement"), { dataRef: a } = n.context, { enabled: o = !0, escapeKey: s = !0, outsidePress: c = !0, outsidePressEvent: l = "sloppy", referencePress: u = Li, referencePressEvent: d = "sloppy", bubbles: f, externalTree: p } = t, m = Ti(p), g = H(typeof c == "function" ? c : () => !1), _ = typeof c == "function" ? g : c, x = _ !== !1, S = H(() => l), C = N.useRef(!1), ee = N.useRef(!1), te = N.useRef(!1), { escapeKey: T, outsidePress: E } = Ri(f), D = N.useRef(null), k = Fr(), A = Fr(), j = H(() => {
|
|
2284
2281
|
A.clear(), a.current.insideReactTree = !1;
|
|
2285
2282
|
}), ne = N.useRef(!1), P = N.useRef(""), F = H(u), I = H((e) => {
|
|
2286
2283
|
if (!r || !o || !s || e.key !== "Escape" || ne.current) return;
|
|
2287
|
-
let t = a.current.floatingContext?.nodeId, i = m ?
|
|
2284
|
+
let t = a.current.floatingContext?.nodeId, i = m ? Un(m.nodesRef.current, t) : [];
|
|
2288
2285
|
if (!T && i.length > 0) {
|
|
2289
2286
|
let e = !0;
|
|
2290
2287
|
if (i.forEach((t) => {
|
|
2291
2288
|
t.context?.open && !t.context.dataRef.current.__escapeKeyBubbles && (e = !1);
|
|
2292
2289
|
}), !e) return;
|
|
2293
2290
|
}
|
|
2294
|
-
let c = q(
|
|
2291
|
+
let c = q(Lt, Kn(e) ? e.nativeEvent : e);
|
|
2295
2292
|
n.setOpen(!1, c), !T && !c.isPropagationAllowed && e.stopPropagation();
|
|
2296
2293
|
}), L = H(() => {
|
|
2297
2294
|
a.current.insideReactTree = !0, A.start(0, j);
|
|
@@ -2299,7 +2296,7 @@ function Li(e, t = {}) {
|
|
|
2299
2296
|
N.useEffect(() => {
|
|
2300
2297
|
if (!r || !o) return;
|
|
2301
2298
|
a.current.__escapeKeyBubbles = T, a.current.__outsidePressBubbles = E;
|
|
2302
|
-
let e = new
|
|
2299
|
+
let e = new Pr(), t = new Pr();
|
|
2303
2300
|
function c() {
|
|
2304
2301
|
e.clear(), ne.current = !0;
|
|
2305
2302
|
}
|
|
@@ -2325,8 +2322,8 @@ function Li(e, t = {}) {
|
|
|
2325
2322
|
return t === "intentional" && e.type !== "click" || t === "sloppy" && e.type === "click";
|
|
2326
2323
|
}
|
|
2327
2324
|
function g(e) {
|
|
2328
|
-
let t = a.current.floatingContext?.nodeId, r = m &&
|
|
2329
|
-
return
|
|
2325
|
+
let t = a.current.floatingContext?.nodeId, r = m && Un(m.nodesRef.current, t).some((t) => Ln(e, t.context?.elements.floating));
|
|
2326
|
+
return Ln(e, n.select("floatingElement")) || Ln(e, n.select("domReferenceElement")) || r;
|
|
2330
2327
|
}
|
|
2331
2328
|
function A(e) {
|
|
2332
2329
|
if (p(e)) {
|
|
@@ -2337,7 +2334,7 @@ function Li(e, t = {}) {
|
|
|
2337
2334
|
j();
|
|
2338
2335
|
return;
|
|
2339
2336
|
}
|
|
2340
|
-
let r =
|
|
2337
|
+
let r = In(e), i = `[${Qr("inert")}]`, o = w(r) ? r.getRootNode() : null, s = Array.from((M(o) ? o : Y(n.select("floatingElement"))).querySelectorAll(i)), c = n.context.triggerElements;
|
|
2341
2338
|
if (r && (c.hasElement(r) || c.hasMatchingElement((e) => J(e, r)))) return;
|
|
2342
2339
|
let l = w(r) ? r : null;
|
|
2343
2340
|
for (; l && !y(l);) {
|
|
@@ -2345,7 +2342,7 @@ function Li(e, t = {}) {
|
|
|
2345
2342
|
if (y(e) || !w(e)) break;
|
|
2346
2343
|
l = e;
|
|
2347
2344
|
}
|
|
2348
|
-
if (s.length && w(r) && !
|
|
2345
|
+
if (s.length && w(r) && !Rn(r) && !J(r, n.select("floatingElement")) && s.every((e) => !J(l, e))) return;
|
|
2349
2346
|
if (b(r) && !("touches" in e)) {
|
|
2350
2347
|
let t = y(r), n = O(r), i = /auto|scroll/, a = t || i.test(n.overflowX), o = t || i.test(n.overflowY), s = a && r.clientWidth > 0 && r.scrollWidth > r.clientWidth, c = o && r.clientHeight > 0 && r.scrollHeight > r.clientHeight, l = n.direction === "rtl", u = c && (l ? e.offsetX <= r.offsetWidth - r.clientWidth : e.offsetX > r.clientWidth), d = s && e.offsetY > r.clientHeight;
|
|
2351
2348
|
if (u || d) return;
|
|
@@ -2356,20 +2353,20 @@ function Li(e, t = {}) {
|
|
|
2356
2353
|
return;
|
|
2357
2354
|
}
|
|
2358
2355
|
if (typeof _ == "function" && !_(e)) return;
|
|
2359
|
-
let u = a.current.floatingContext?.nodeId, d = m ?
|
|
2356
|
+
let u = a.current.floatingContext?.nodeId, d = m ? Un(m.nodesRef.current, u) : [];
|
|
2360
2357
|
if (d.length > 0) {
|
|
2361
2358
|
let e = !0;
|
|
2362
2359
|
if (d.forEach((t) => {
|
|
2363
2360
|
t.context?.open && !t.context.dataRef.current.__outsidePressBubbles && (e = !1);
|
|
2364
2361
|
}), !e) return;
|
|
2365
2362
|
}
|
|
2366
|
-
n.setOpen(!1, q(
|
|
2363
|
+
n.setOpen(!1, q(wt, e)), j();
|
|
2367
2364
|
}
|
|
2368
2365
|
function N(e) {
|
|
2369
|
-
f() !== "sloppy" || e.pointerType === "touch" || !n.select("open") || !o ||
|
|
2366
|
+
f() !== "sloppy" || e.pointerType === "touch" || !n.select("open") || !o || Ln(e, n.select("floatingElement")) || Ln(e, n.select("domReferenceElement")) || A(e);
|
|
2370
2367
|
}
|
|
2371
2368
|
function F(e) {
|
|
2372
|
-
if (f() !== "sloppy" || !n.select("open") || !o ||
|
|
2369
|
+
if (f() !== "sloppy" || !n.select("open") || !o || Ln(e, n.select("floatingElement")) || Ln(e, n.select("domReferenceElement"))) return;
|
|
2373
2370
|
let t = e.touches[0];
|
|
2374
2371
|
t && (D.current = {
|
|
2375
2372
|
startTime: Date.now(),
|
|
@@ -2382,7 +2379,7 @@ function Li(e, t = {}) {
|
|
|
2382
2379
|
}));
|
|
2383
2380
|
}
|
|
2384
2381
|
function L(e, t) {
|
|
2385
|
-
let n =
|
|
2382
|
+
let n = In(e);
|
|
2386
2383
|
if (!n) return;
|
|
2387
2384
|
let r = X(n, e.type, () => {
|
|
2388
2385
|
t(e), r();
|
|
@@ -2391,12 +2388,12 @@ function Li(e, t = {}) {
|
|
|
2391
2388
|
function R(e) {
|
|
2392
2389
|
P.current = "touch", L(e, F);
|
|
2393
2390
|
}
|
|
2394
|
-
function
|
|
2391
|
+
function re(e) {
|
|
2395
2392
|
k.clear(), e.type === "pointerdown" && (P.current = e.pointerType), !(e.type === "mousedown" && D.current && !D.current.dismissOnMouseDown) && L(e, (e) => {
|
|
2396
2393
|
e.type === "pointerdown" ? N(e) : A(e);
|
|
2397
2394
|
});
|
|
2398
2395
|
}
|
|
2399
|
-
function
|
|
2396
|
+
function ie(e) {
|
|
2400
2397
|
if (!C.current) return;
|
|
2401
2398
|
let n = ee.current;
|
|
2402
2399
|
if (d(), f() === "intentional") {
|
|
@@ -2413,25 +2410,25 @@ function Li(e, t = {}) {
|
|
|
2413
2410
|
}
|
|
2414
2411
|
}
|
|
2415
2412
|
}
|
|
2416
|
-
function
|
|
2417
|
-
if (f() !== "sloppy" || !D.current ||
|
|
2413
|
+
function ae(e) {
|
|
2414
|
+
if (f() !== "sloppy" || !D.current || Ln(e, n.select("floatingElement")) || Ln(e, n.select("domReferenceElement"))) return;
|
|
2418
2415
|
let t = e.touches[0];
|
|
2419
2416
|
if (!t) return;
|
|
2420
2417
|
let r = Math.abs(t.clientX - D.current.startX), i = Math.abs(t.clientY - D.current.startY), a = Math.sqrt(r * r + i * i);
|
|
2421
2418
|
a > 5 && (D.current.dismissOnTouchEnd = !0), a > 10 && (A(e), k.clear(), D.current = null);
|
|
2422
2419
|
}
|
|
2423
|
-
function
|
|
2424
|
-
L(e,
|
|
2425
|
-
}
|
|
2426
|
-
function ae(e) {
|
|
2427
|
-
f() !== "sloppy" || !D.current || Fn(e, n.select("floatingElement")) || Fn(e, n.select("domReferenceElement")) || (D.current.dismissOnTouchEnd && A(e), k.clear(), D.current = null);
|
|
2420
|
+
function z(e) {
|
|
2421
|
+
L(e, ae);
|
|
2428
2422
|
}
|
|
2429
2423
|
function oe(e) {
|
|
2430
|
-
|
|
2424
|
+
f() !== "sloppy" || !D.current || Ln(e, n.select("floatingElement")) || Ln(e, n.select("domReferenceElement")) || (D.current.dismissOnTouchEnd && A(e), k.clear(), D.current = null);
|
|
2431
2425
|
}
|
|
2432
|
-
|
|
2426
|
+
function se(e) {
|
|
2427
|
+
L(e, oe);
|
|
2428
|
+
}
|
|
2429
|
+
let B = Y(i), ce = Gr(s && Gr(X(B, "keydown", I), X(B, "compositionstart", c), X(B, "compositionend", l)), x && Gr(X(B, "click", re, !0), X(B, "pointerdown", re, !0), X(B, "pointerup", ie, !0), X(B, "pointercancel", ie, !0), X(B, "mousedown", re, !0), X(B, "mouseup", ie, !0), X(B, "touchstart", R, !0), X(B, "touchmove", z, !0), X(B, "touchend", se, !0)));
|
|
2433
2430
|
return () => {
|
|
2434
|
-
|
|
2431
|
+
ce(), e.clear(), t.clear(), d(), te.current = !1;
|
|
2435
2432
|
};
|
|
2436
2433
|
}, [
|
|
2437
2434
|
a,
|
|
@@ -2452,8 +2449,8 @@ function Li(e, t = {}) {
|
|
|
2452
2449
|
]), N.useEffect(j, [_, j]);
|
|
2453
2450
|
let R = N.useMemo(() => ({
|
|
2454
2451
|
onKeyDown: I,
|
|
2455
|
-
[
|
|
2456
|
-
F() && n.setOpen(!1, q(
|
|
2452
|
+
[Ii[d]]: (e) => {
|
|
2453
|
+
F() && n.setOpen(!1, q(Ct, e.nativeEvent));
|
|
2457
2454
|
},
|
|
2458
2455
|
...d !== "intentional" && { onClick(e) {
|
|
2459
2456
|
F() && n.setOpen(!1, q("trigger-press", e.nativeEvent));
|
|
@@ -2463,22 +2460,22 @@ function Li(e, t = {}) {
|
|
|
2463
2460
|
n,
|
|
2464
2461
|
d,
|
|
2465
2462
|
F
|
|
2466
|
-
]),
|
|
2463
|
+
]), re = H((e) => {
|
|
2467
2464
|
if (!r || !o || e.button !== 0) return;
|
|
2468
|
-
let t =
|
|
2465
|
+
let t = In(e.nativeEvent);
|
|
2469
2466
|
J(n.select("floatingElement"), t) && (C.current || (C.current = !0, ee.current = !1));
|
|
2470
|
-
}),
|
|
2467
|
+
}), ie = H((e) => {
|
|
2471
2468
|
!r || !o || (e.defaultPrevented || e.nativeEvent.defaultPrevented) && C.current && (ee.current = !0);
|
|
2472
|
-
}),
|
|
2469
|
+
}), ae = N.useMemo(() => ({
|
|
2473
2470
|
onKeyDown: I,
|
|
2474
|
-
onPointerDown:
|
|
2475
|
-
onMouseDown:
|
|
2471
|
+
onPointerDown: ie,
|
|
2472
|
+
onMouseDown: ie,
|
|
2476
2473
|
onClickCapture: L,
|
|
2477
2474
|
onMouseDownCapture(e) {
|
|
2478
|
-
L(),
|
|
2475
|
+
L(), re(e);
|
|
2479
2476
|
},
|
|
2480
2477
|
onPointerDownCapture(e) {
|
|
2481
|
-
L(),
|
|
2478
|
+
L(), re(e);
|
|
2482
2479
|
},
|
|
2483
2480
|
onMouseUpCapture: L,
|
|
2484
2481
|
onTouchEndCapture: L,
|
|
@@ -2486,23 +2483,23 @@ function Li(e, t = {}) {
|
|
|
2486
2483
|
}), [
|
|
2487
2484
|
I,
|
|
2488
2485
|
L,
|
|
2489
|
-
|
|
2490
|
-
|
|
2486
|
+
re,
|
|
2487
|
+
ie
|
|
2491
2488
|
]);
|
|
2492
2489
|
return N.useMemo(() => o ? {
|
|
2493
2490
|
reference: R,
|
|
2494
|
-
floating:
|
|
2491
|
+
floating: ae,
|
|
2495
2492
|
trigger: R
|
|
2496
2493
|
} : {}, [
|
|
2497
2494
|
o,
|
|
2498
2495
|
R,
|
|
2499
|
-
|
|
2496
|
+
ae
|
|
2500
2497
|
]);
|
|
2501
2498
|
}
|
|
2502
2499
|
//#endregion
|
|
2503
2500
|
//#region node_modules/@base-ui/utils/esm/store/createSelector.js
|
|
2504
2501
|
var Z = (e, t, n, r, i, a, ...o) => {
|
|
2505
|
-
if (o.length > 0) throw Error(process.env.NODE_ENV === "production" ?
|
|
2502
|
+
if (o.length > 0) throw Error(process.env.NODE_ENV === "production" ? W(1) : "Unsupported number of selectors");
|
|
2506
2503
|
let s;
|
|
2507
2504
|
if (e && t && n && r && i && a) s = (o, s, c, l) => a(e(o, s, c, l), t(o, s, c, l), n(o, s, c, l), r(o, s, c, l), i(o, s, c, l), s, c, l);
|
|
2508
2505
|
else if (e && t && n && r && i) s = (a, o, s, c) => i(e(a, o, s, c), t(a, o, s, c), n(a, o, s, c), r(a, o, s, c), o, s, c);
|
|
@@ -2512,16 +2509,16 @@ var Z = (e, t, n, r, i, a, ...o) => {
|
|
|
2512
2509
|
else if (e) s = e;
|
|
2513
2510
|
else throw Error("Missing arguments");
|
|
2514
2511
|
return s;
|
|
2515
|
-
},
|
|
2516
|
-
function
|
|
2517
|
-
return
|
|
2512
|
+
}, Bi = [], Vi = void 0;
|
|
2513
|
+
function Hi() {
|
|
2514
|
+
return Vi;
|
|
2518
2515
|
}
|
|
2519
|
-
function
|
|
2520
|
-
|
|
2516
|
+
function Ui(e) {
|
|
2517
|
+
Bi.push(e);
|
|
2521
2518
|
}
|
|
2522
2519
|
//#endregion
|
|
2523
2520
|
//#region node_modules/@base-ui/utils/esm/store/useStore.js
|
|
2524
|
-
var
|
|
2521
|
+
var Wi = We(19) ? Ki : qi;
|
|
2525
2522
|
function Q(e, t, n, r, i) {
|
|
2526
2523
|
return Wi(e, t, n, r, i);
|
|
2527
2524
|
}
|
|
@@ -2533,9 +2530,9 @@ function Gi(e, t, n, r, i) {
|
|
|
2533
2530
|
r,
|
|
2534
2531
|
i
|
|
2535
2532
|
]);
|
|
2536
|
-
return (0,
|
|
2533
|
+
return (0, ce.useSyncExternalStore)(e.subscribe, a, a);
|
|
2537
2534
|
}
|
|
2538
|
-
|
|
2535
|
+
Ui({
|
|
2539
2536
|
before(e) {
|
|
2540
2537
|
e.syncIndex = 0, e.didInitialize || (e.syncTick = 1, e.syncHooks = [], e.didChangeStore = !0, e.getSnapshot = () => {
|
|
2541
2538
|
let t = !1;
|
|
@@ -2555,11 +2552,11 @@ Vi({
|
|
|
2555
2552
|
return () => {
|
|
2556
2553
|
for (let e of r) e();
|
|
2557
2554
|
};
|
|
2558
|
-
}), (0,
|
|
2555
|
+
}), (0, ce.useSyncExternalStore)(e.subscribe, e.getSnapshot, e.getSnapshot));
|
|
2559
2556
|
}
|
|
2560
2557
|
});
|
|
2561
2558
|
function Ki(e, t, n, r, i) {
|
|
2562
|
-
let a =
|
|
2559
|
+
let a = Hi();
|
|
2563
2560
|
if (!a) return Gi(e, t, n, r, i);
|
|
2564
2561
|
let o = a.syncIndex;
|
|
2565
2562
|
a.syncIndex += 1;
|
|
@@ -2575,7 +2572,7 @@ function Ki(e, t, n, r, i) {
|
|
|
2575
2572
|
}, a.syncHooks.push(s)), s.value;
|
|
2576
2573
|
}
|
|
2577
2574
|
function qi(e, t, n, r, i) {
|
|
2578
|
-
return (0,
|
|
2575
|
+
return (0, le.useSyncExternalStoreWithSelector)(e.subscribe, e.getSnapshot, e.getSnapshot, (e) => t(e, n, r, i));
|
|
2579
2576
|
}
|
|
2580
2577
|
//#endregion
|
|
2581
2578
|
//#region node_modules/@base-ui/utils/esm/store/Store.js
|
|
@@ -2676,7 +2673,7 @@ var Ji = class {
|
|
|
2676
2673
|
}
|
|
2677
2674
|
useContextCallback(e, t) {
|
|
2678
2675
|
N.useDebugValue(e);
|
|
2679
|
-
let n = H(t ??
|
|
2676
|
+
let n = H(t ?? qe);
|
|
2680
2677
|
this.context[e] = n;
|
|
2681
2678
|
}
|
|
2682
2679
|
useStateSetter(e) {
|
|
@@ -2714,13 +2711,13 @@ var Ji = class {
|
|
|
2714
2711
|
}, {
|
|
2715
2712
|
onOpenChange: r,
|
|
2716
2713
|
dataRef: { current: {} },
|
|
2717
|
-
events:
|
|
2714
|
+
events: xi(),
|
|
2718
2715
|
nested: n,
|
|
2719
2716
|
triggerElements: i
|
|
2720
2717
|
}, Xi), this.syncOnly = t;
|
|
2721
2718
|
}
|
|
2722
2719
|
syncOpenEvent = (e, t) => {
|
|
2723
|
-
(!e || !this.state.open || t != null &&
|
|
2720
|
+
(!e || !this.state.open || t != null && Xn(t)) && (this.context.dataRef.current.openEvent = e ? t : void 0);
|
|
2724
2721
|
};
|
|
2725
2722
|
dispatchOpenChange = (e, t) => {
|
|
2726
2723
|
this.syncOpenEvent(e, t.event);
|
|
@@ -2775,12 +2772,12 @@ var Ji = class {
|
|
|
2775
2772
|
//#endregion
|
|
2776
2773
|
//#region node_modules/@base-ui/react/esm/floating-ui-react/hooks/useFloatingRootContext.js
|
|
2777
2774
|
function $i(e) {
|
|
2778
|
-
let { open: t = !1, onOpenChange: n, elements: r = {} } = e, i =
|
|
2775
|
+
let { open: t = !1, onOpenChange: n, elements: r = {} } = e, i = Gt(), a = wi() != null;
|
|
2779
2776
|
if (process.env.NODE_ENV !== "production") {
|
|
2780
2777
|
let e = r.reference;
|
|
2781
2778
|
e && !w(e) && console.error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `context.setPositionReference()`", "instead.");
|
|
2782
2779
|
}
|
|
2783
|
-
let o =
|
|
2780
|
+
let o = Se(() => new Zi({
|
|
2784
2781
|
open: t,
|
|
2785
2782
|
transitionStatus: void 0,
|
|
2786
2783
|
onOpenChange: n,
|
|
@@ -2812,7 +2809,7 @@ function ea(e = {}) {
|
|
|
2812
2809
|
reference: i.useState("referenceElement"),
|
|
2813
2810
|
floating: i.useState("floatingElement"),
|
|
2814
2811
|
domReference: i.useState("domReferenceElement")
|
|
2815
|
-
}, [o, s] = N.useState(null), c = N.useRef(null), l =
|
|
2812
|
+
}, [o, s] = N.useState(null), c = N.useRef(null), l = Ti(n);
|
|
2816
2813
|
U(() => {
|
|
2817
2814
|
a.domReference && (c.current = a.domReference);
|
|
2818
2815
|
}, [a.domReference]);
|
|
@@ -2907,7 +2904,7 @@ function ta(e = []) {
|
|
|
2907
2904
|
}
|
|
2908
2905
|
function na(e, t, n) {
|
|
2909
2906
|
let r = /* @__PURE__ */ new Map(), i = n === "item", a = {};
|
|
2910
|
-
n === "floating" && (a.tabIndex = -1, a[
|
|
2907
|
+
n === "floating" && (a.tabIndex = -1, a[kn] = "");
|
|
2911
2908
|
for (let t in e) i && e && (t === "active" || t === "selected") || (a[t] = e[t]);
|
|
2912
2909
|
for (let o = 0; o < t.length; o += 1) {
|
|
2913
2910
|
let s, c = t[o]?.[n];
|
|
@@ -2938,38 +2935,38 @@ function sa(e, t, n) {
|
|
|
2938
2935
|
return aa(t, e === "ArrowDown", n ? e === "ArrowLeft" : e === "ArrowRight") || e === "Enter" || e === " " || e === "";
|
|
2939
2936
|
}
|
|
2940
2937
|
function ca(e, t, n) {
|
|
2941
|
-
return aa(t, n ? e ===
|
|
2938
|
+
return aa(t, n ? e === jn : e === Mn, e === Pn);
|
|
2942
2939
|
}
|
|
2943
2940
|
function la(e, t, n, r) {
|
|
2944
|
-
return t === "both" || t === "horizontal" && r && r > 1 ? e === ia : aa(t, n ? e ===
|
|
2941
|
+
return t === "both" || t === "horizontal" && r && r > 1 ? e === ia : aa(t, n ? e === Mn : e === jn, e === Nn);
|
|
2945
2942
|
}
|
|
2946
2943
|
function ua(e, t) {
|
|
2947
2944
|
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: s, activeIndex: c, onNavigate: l = () => {}, enabled: u = !0, selectedIndex: d = null, allowEscape: f = !1, loopFocus: p = !1, nested: m = !1, rtl: h = !1, virtual: g = !1, focusItemOnOpen: _ = "auto", focusItemOnHover: v = !0, openOnArrowKeyDown: y = !0, disabledIndices: x = void 0, orientation: S = "vertical", parentOrientation: C, cols: w = 1, id: ee, resetOnPointerLeave: te = !0, externalTree: T } = t;
|
|
2948
2945
|
process.env.NODE_ENV !== "production" && (f && (p || console.warn("`useListNavigation` looping must be enabled to allow escaping."), g || console.warn("`useListNavigation` must be virtual to allow escaping.")), S === "vertical" && w > 1 && console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should", "be either \"horizontal\" or \"both\"."));
|
|
2949
|
-
let E =
|
|
2946
|
+
let E = Kr(Hn(i)), D = wi(), O = Ti(T);
|
|
2950
2947
|
U(() => {
|
|
2951
2948
|
o.current.orientation = S;
|
|
2952
2949
|
}, [o, S]);
|
|
2953
|
-
let k =
|
|
2950
|
+
let k = Vn(a), A = N.useRef(_), j = N.useRef(d ?? -1), M = N.useRef(null), ne = N.useRef(!0), P = H((e) => {
|
|
2954
2951
|
l(j.current === -1 ? null : j.current, e);
|
|
2955
|
-
}), F = N.useRef(P), I = N.useRef(!!i), L = N.useRef(r), R = N.useRef(!1),
|
|
2952
|
+
}), F = N.useRef(P), I = N.useRef(!!i), L = N.useRef(r), R = N.useRef(!1), re = N.useRef(!1), ie = N.useRef(null), ae = Kr(x), z = Kr(r), oe = Kr(d), se = Kr(te), B = H(() => {
|
|
2956
2953
|
function e(e) {
|
|
2957
|
-
g ? O?.events.emit("virtualfocus", e) :
|
|
2954
|
+
g ? O?.events.emit("virtualfocus", e) : ie.current = ei(e, {
|
|
2958
2955
|
sync: R.current,
|
|
2959
2956
|
preventScroll: !0
|
|
2960
2957
|
});
|
|
2961
2958
|
}
|
|
2962
|
-
let t = s.current[j.current], n =
|
|
2959
|
+
let t = s.current[j.current], n = re.current;
|
|
2963
2960
|
t && e(t), (R.current ? (e) => e() : requestAnimationFrame)(() => {
|
|
2964
2961
|
let r = s.current[j.current] || t;
|
|
2965
|
-
r && (t || e(r),
|
|
2962
|
+
r && (t || e(r), ue && (n || !ne.current) && r.scrollIntoView?.({
|
|
2966
2963
|
block: "nearest",
|
|
2967
2964
|
inline: "nearest"
|
|
2968
2965
|
}));
|
|
2969
2966
|
});
|
|
2970
2967
|
});
|
|
2971
2968
|
U(() => {
|
|
2972
|
-
u && (r && i ? (j.current = d ?? -1, A.current && d != null && (
|
|
2969
|
+
u && (r && i ? (j.current = d ?? -1, A.current && d != null && (re.current = !0, P())) : I.current && (j.current = -1, F.current()));
|
|
2973
2970
|
}, [
|
|
2974
2971
|
u,
|
|
2975
2972
|
r,
|
|
@@ -2983,31 +2980,31 @@ function ua(e, t) {
|
|
|
2983
2980
|
return;
|
|
2984
2981
|
}
|
|
2985
2982
|
if (i) if (c == null) {
|
|
2986
|
-
if (R.current = !1,
|
|
2987
|
-
if (I.current && (j.current = -1,
|
|
2983
|
+
if (R.current = !1, oe.current != null) return;
|
|
2984
|
+
if (I.current && (j.current = -1, B()), (!L.current || !I.current) && A.current && (M.current != null || A.current === !0 && M.current == null)) {
|
|
2988
2985
|
let e = 0, t = () => {
|
|
2989
|
-
s.current[0] == null ? (e < 2 && (e ? requestAnimationFrame : queueMicrotask)(t), e += 1) : (j.current = M.current == null || sa(M.current, S, h) || m ?
|
|
2986
|
+
s.current[0] == null ? (e < 2 && (e ? requestAnimationFrame : queueMicrotask)(t), e += 1) : (j.current = M.current == null || sa(M.current, S, h) || m ? $n(s) : er(s), M.current = null, P());
|
|
2990
2987
|
};
|
|
2991
2988
|
t();
|
|
2992
2989
|
}
|
|
2993
|
-
} else
|
|
2990
|
+
} else Qn(s.current, c) || (j.current = c, B(), re.current = !1);
|
|
2994
2991
|
}
|
|
2995
2992
|
}, [
|
|
2996
2993
|
u,
|
|
2997
2994
|
r,
|
|
2998
2995
|
i,
|
|
2999
2996
|
c,
|
|
3000
|
-
|
|
2997
|
+
oe,
|
|
3001
2998
|
m,
|
|
3002
2999
|
s,
|
|
3003
3000
|
S,
|
|
3004
3001
|
h,
|
|
3005
3002
|
P,
|
|
3006
|
-
|
|
3007
|
-
|
|
3003
|
+
B,
|
|
3004
|
+
ae
|
|
3008
3005
|
]), U(() => {
|
|
3009
3006
|
if (!u || i || !O || g || !I.current) return;
|
|
3010
|
-
let e = O.nodesRef.current, t = e.find((e) => e.id === D)?.context?.elements.floating, n =
|
|
3007
|
+
let e = O.nodesRef.current, t = e.find((e) => e.id === D)?.context?.elements.floating, n = Fn(Y(i)), r = e.some((e) => e.context && J(e.context.elements.floating, n));
|
|
3011
3008
|
t && !r && ne.current && t.focus({ preventScroll: !0 });
|
|
3012
3009
|
}, [
|
|
3013
3010
|
u,
|
|
@@ -3020,90 +3017,90 @@ function ua(e, t) {
|
|
|
3020
3017
|
}), U(() => {
|
|
3021
3018
|
r || (M.current = null, A.current = _);
|
|
3022
3019
|
}, [r, _]);
|
|
3023
|
-
let
|
|
3024
|
-
if (!
|
|
3020
|
+
let ce = c != null, le = H((e) => {
|
|
3021
|
+
if (!z.current) return;
|
|
3025
3022
|
let t = s.current.indexOf(e.currentTarget);
|
|
3026
3023
|
t !== -1 && (j.current !== t || c !== t) && (j.current = t, P(e));
|
|
3027
|
-
}),
|
|
3024
|
+
}), ue = N.useMemo(() => ({
|
|
3028
3025
|
onFocus(e) {
|
|
3029
|
-
R.current = !0,
|
|
3026
|
+
R.current = !0, le(e);
|
|
3030
3027
|
},
|
|
3031
3028
|
onClick: ({ currentTarget: e }) => e.focus({ preventScroll: !0 }),
|
|
3032
3029
|
onMouseMove(e) {
|
|
3033
|
-
R.current = !0,
|
|
3030
|
+
R.current = !0, re.current = !1, v && le(e);
|
|
3034
3031
|
},
|
|
3035
3032
|
onPointerLeave(e) {
|
|
3036
|
-
if (!
|
|
3033
|
+
if (!z.current || !ne.current || e.pointerType === "touch") return;
|
|
3037
3034
|
R.current = !0;
|
|
3038
3035
|
let t = e.relatedTarget;
|
|
3039
|
-
if (!(!v || s.current.includes(t)) &&
|
|
3040
|
-
let e = E.current, t =
|
|
3036
|
+
if (!(!v || s.current.includes(t)) && se.current && (ie.current?.(), ie.current = null, j.current = -1, P(e), !g)) {
|
|
3037
|
+
let e = E.current, t = Fn(Y(e));
|
|
3041
3038
|
e && J(e, t) && e.focus({ preventScroll: !0 });
|
|
3042
3039
|
}
|
|
3043
3040
|
}
|
|
3044
3041
|
}), [
|
|
3045
|
-
|
|
3046
|
-
|
|
3042
|
+
le,
|
|
3043
|
+
z,
|
|
3047
3044
|
E,
|
|
3048
3045
|
v,
|
|
3049
3046
|
s,
|
|
3050
3047
|
P,
|
|
3051
|
-
|
|
3048
|
+
se,
|
|
3052
3049
|
g
|
|
3053
|
-
]),
|
|
3050
|
+
]), V = N.useCallback(() => C ?? O?.nodesRef.current.find((e) => e.id === D)?.context?.dataRef?.current.orientation, [
|
|
3054
3051
|
D,
|
|
3055
3052
|
O,
|
|
3056
3053
|
C
|
|
3057
3054
|
]), de = H((e) => {
|
|
3058
|
-
if (ne.current = !1, R.current = !0, e.which === 229 || !
|
|
3055
|
+
if (ne.current = !1, R.current = !0, e.which === 229 || !z.current && e.currentTarget === E.current) return;
|
|
3059
3056
|
if (m && la(e.key, S, h, w)) {
|
|
3060
|
-
oa(e.key,
|
|
3057
|
+
oa(e.key, V()) || Gn(e), n.setOpen(!1, q(Rt, e.nativeEvent)), b(a) && (g ? O?.events.emit("virtualfocus", a) : a.focus());
|
|
3061
3058
|
return;
|
|
3062
3059
|
}
|
|
3063
|
-
let t = j.current, i =
|
|
3064
|
-
if (k || (e.key === "Home" && (
|
|
3060
|
+
let t = j.current, i = $n(s, x), o = er(s, x);
|
|
3061
|
+
if (k || (e.key === "Home" && (Gn(e), j.current = i, P(e)), e.key === "End" && (Gn(e), j.current = o, P(e))), w > 1) {
|
|
3065
3062
|
let t = Array.from({ length: s.current.length }, () => ({
|
|
3066
3063
|
width: 1,
|
|
3067
3064
|
height: 1
|
|
3068
|
-
})), n =
|
|
3065
|
+
})), n = rr(t, w, !1), r = n.findIndex((e) => e != null && !or(s.current, e, x)), a = n.reduce((e, t, n) => t != null && !or(s.current, t, x) ? n : e, -1), c = n[nr(n.map((e) => e == null ? null : s.current[e]), {
|
|
3069
3066
|
event: e,
|
|
3070
3067
|
orientation: S,
|
|
3071
3068
|
loopFocus: p,
|
|
3072
3069
|
rtl: h,
|
|
3073
3070
|
cols: w,
|
|
3074
|
-
disabledIndices:
|
|
3071
|
+
disabledIndices: ar([...(typeof x == "function" ? null : x) || s.current.map((e, t) => or(s.current, t, x) ? t : void 0), void 0], n),
|
|
3075
3072
|
minIndex: r,
|
|
3076
3073
|
maxIndex: a,
|
|
3077
|
-
prevIndex:
|
|
3074
|
+
prevIndex: ir(j.current > o ? i : j.current, t, n, w, e.key === "ArrowDown" ? "bl" : e.key === (h ? "ArrowLeft" : "ArrowRight") ? "tr" : "tl"),
|
|
3078
3075
|
stopEvent: !0
|
|
3079
3076
|
})];
|
|
3080
3077
|
if (c != null && (j.current = c, P(e)), S === "both") return;
|
|
3081
3078
|
}
|
|
3082
3079
|
if (oa(e.key, S)) {
|
|
3083
|
-
if (
|
|
3080
|
+
if (Gn(e), r && !g && Fn(e.currentTarget.ownerDocument) === e.currentTarget) {
|
|
3084
3081
|
j.current = sa(e.key, S, h) ? i : o, P(e);
|
|
3085
3082
|
return;
|
|
3086
3083
|
}
|
|
3087
|
-
sa(e.key, S, h) ? p ? t >= o ? f && t !== s.current.length ? j.current = -1 : (R.current = !1, j.current = i) : j.current =
|
|
3084
|
+
sa(e.key, S, h) ? p ? t >= o ? f && t !== s.current.length ? j.current = -1 : (R.current = !1, j.current = i) : j.current = tr(s.current, {
|
|
3088
3085
|
startingIndex: t,
|
|
3089
3086
|
disabledIndices: x
|
|
3090
|
-
}) : j.current = Math.min(o,
|
|
3087
|
+
}) : j.current = Math.min(o, tr(s.current, {
|
|
3091
3088
|
startingIndex: t,
|
|
3092
3089
|
disabledIndices: x
|
|
3093
|
-
})) : p ? t <= i ? f && t !== -1 ? j.current = s.current.length : (R.current = !1, j.current = o) : j.current =
|
|
3090
|
+
})) : p ? t <= i ? f && t !== -1 ? j.current = s.current.length : (R.current = !1, j.current = o) : j.current = tr(s.current, {
|
|
3094
3091
|
startingIndex: t,
|
|
3095
3092
|
decrement: !0,
|
|
3096
3093
|
disabledIndices: x
|
|
3097
|
-
}) : j.current = Math.max(i,
|
|
3094
|
+
}) : j.current = Math.max(i, tr(s.current, {
|
|
3098
3095
|
startingIndex: t,
|
|
3099
3096
|
decrement: !0,
|
|
3100
3097
|
disabledIndices: x
|
|
3101
|
-
})),
|
|
3098
|
+
})), Qn(s.current, j.current) && (j.current = -1), P(e);
|
|
3102
3099
|
}
|
|
3103
|
-
}), fe = N.useMemo(() => g && r &&
|
|
3100
|
+
}), fe = N.useMemo(() => g && r && ce && { "aria-activedescendant": `${ee}-${c}` }, [
|
|
3104
3101
|
g,
|
|
3105
3102
|
r,
|
|
3106
|
-
|
|
3103
|
+
ce,
|
|
3107
3104
|
ee,
|
|
3108
3105
|
c
|
|
3109
3106
|
]), pe = N.useMemo(() => ({
|
|
@@ -3111,9 +3108,9 @@ function ua(e, t) {
|
|
|
3111
3108
|
...k ? {} : fe,
|
|
3112
3109
|
onKeyDown(e) {
|
|
3113
3110
|
if (e.key === "Tab" && e.shiftKey && r && !g) {
|
|
3114
|
-
let t =
|
|
3111
|
+
let t = In(e.nativeEvent);
|
|
3115
3112
|
if (t && !J(E.current, t)) return;
|
|
3116
|
-
|
|
3113
|
+
Gn(e), n.setOpen(!1, q(It, e.nativeEvent)), b(a) && a.focus();
|
|
3117
3114
|
return;
|
|
3118
3115
|
}
|
|
3119
3116
|
de(e);
|
|
@@ -3133,27 +3130,27 @@ function ua(e, t) {
|
|
|
3133
3130
|
a
|
|
3134
3131
|
]), me = N.useMemo(() => {
|
|
3135
3132
|
function e(e) {
|
|
3136
|
-
_ === "auto" &&
|
|
3133
|
+
_ === "auto" && qn(e.nativeEvent) && (A.current = !g);
|
|
3137
3134
|
}
|
|
3138
3135
|
function t(e) {
|
|
3139
|
-
A.current = _, _ === "auto" &&
|
|
3136
|
+
A.current = _, _ === "auto" && Jn(e.nativeEvent) && (A.current = !0);
|
|
3140
3137
|
}
|
|
3141
3138
|
return {
|
|
3142
3139
|
onKeyDown(e) {
|
|
3143
3140
|
let t = n.select("open");
|
|
3144
3141
|
ne.current = !1;
|
|
3145
|
-
let r = e.key.startsWith("Arrow"), i = ca(e.key,
|
|
3142
|
+
let r = e.key.startsWith("Arrow"), i = ca(e.key, V(), h), a = oa(e.key, S), o = (m ? i : a) || e.key === "Enter" || e.key.trim() === "";
|
|
3146
3143
|
if (g && t) return de(e);
|
|
3147
3144
|
if (!(!t && !y && r)) {
|
|
3148
3145
|
if (o) {
|
|
3149
|
-
let t = oa(e.key,
|
|
3146
|
+
let t = oa(e.key, V());
|
|
3150
3147
|
M.current = m && t ? null : e.key;
|
|
3151
3148
|
}
|
|
3152
3149
|
if (m) {
|
|
3153
|
-
i && (
|
|
3150
|
+
i && (Gn(e), t ? (j.current = $n(s, ae.current), P(e)) : n.setOpen(!0, q(Rt, e.nativeEvent, e.currentTarget)));
|
|
3154
3151
|
return;
|
|
3155
3152
|
}
|
|
3156
|
-
a && (
|
|
3153
|
+
a && (oe.current != null && (j.current = oe.current), Gn(e), !t && y ? n.setOpen(!0, q(Rt, e.nativeEvent, e.currentTarget)) : de(e), t && P(e));
|
|
3157
3154
|
}
|
|
3158
3155
|
},
|
|
3159
3156
|
onFocus(e) {
|
|
@@ -3166,7 +3163,7 @@ function ua(e, t) {
|
|
|
3166
3163
|
};
|
|
3167
3164
|
}, [
|
|
3168
3165
|
de,
|
|
3169
|
-
|
|
3166
|
+
ae,
|
|
3170
3167
|
_,
|
|
3171
3168
|
s,
|
|
3172
3169
|
m,
|
|
@@ -3174,9 +3171,9 @@ function ua(e, t) {
|
|
|
3174
3171
|
n,
|
|
3175
3172
|
y,
|
|
3176
3173
|
S,
|
|
3177
|
-
|
|
3174
|
+
V,
|
|
3178
3175
|
h,
|
|
3179
|
-
|
|
3176
|
+
oe,
|
|
3180
3177
|
g
|
|
3181
3178
|
]), he = N.useMemo(() => ({
|
|
3182
3179
|
...fe,
|
|
@@ -3185,20 +3182,20 @@ function ua(e, t) {
|
|
|
3185
3182
|
return N.useMemo(() => u ? {
|
|
3186
3183
|
reference: he,
|
|
3187
3184
|
floating: pe,
|
|
3188
|
-
item:
|
|
3185
|
+
item: ue,
|
|
3189
3186
|
trigger: me
|
|
3190
3187
|
} : {}, [
|
|
3191
3188
|
u,
|
|
3192
3189
|
he,
|
|
3193
3190
|
pe,
|
|
3194
3191
|
me,
|
|
3195
|
-
|
|
3192
|
+
ue
|
|
3196
3193
|
]);
|
|
3197
3194
|
}
|
|
3198
3195
|
//#endregion
|
|
3199
3196
|
//#region node_modules/@base-ui/react/esm/floating-ui-react/hooks/useTypeahead.js
|
|
3200
3197
|
function da(e, t) {
|
|
3201
|
-
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, p =
|
|
3198
|
+
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, p = Fr(), m = N.useRef(""), h = N.useRef(f ?? s ?? -1), g = N.useRef(null);
|
|
3202
3199
|
U(() => {
|
|
3203
3200
|
!i && f !== null || (p.clear(), g.current = null, m.current !== "" && (m.current = ""));
|
|
3204
3201
|
}, [
|
|
@@ -3217,7 +3214,7 @@ function da(e, t) {
|
|
|
3217
3214
|
}), v = H((e) => {
|
|
3218
3215
|
function t(e) {
|
|
3219
3216
|
let t = o?.current[e];
|
|
3220
|
-
return !t ||
|
|
3217
|
+
return !t || cr(t);
|
|
3221
3218
|
}
|
|
3222
3219
|
function n(e, n, r = 0) {
|
|
3223
3220
|
if (e.length === 0) return -1;
|
|
@@ -3229,10 +3226,10 @@ function da(e, t) {
|
|
|
3229
3226
|
return -1;
|
|
3230
3227
|
}
|
|
3231
3228
|
let r = a.current;
|
|
3232
|
-
if (m.current.length > 0 && e.key === " " && (
|
|
3233
|
-
i && e.key !== " " && (
|
|
3229
|
+
if (m.current.length > 0 && e.key === " " && (Gn(e), _(!0)), m.current.length > 0 && m.current[0] !== " " && n(r, m.current) === -1 && e.key !== " " && _(!1), r == null || e.key.length !== 1 || e.ctrlKey || e.metaKey || e.altKey) return;
|
|
3230
|
+
i && e.key !== " " && (Gn(e), _(!0));
|
|
3234
3231
|
let l = m.current === "";
|
|
3235
|
-
l && (h.current = f ?? s ?? -1), r.every((e) => e
|
|
3232
|
+
l && (h.current = f ?? s ?? -1), r.every((e) => !e || e[0]?.toLocaleLowerCase() !== e[1]?.toLocaleLowerCase()) && m.current === e.key && (m.current = "", h.current = g.current), m.current += e.key, p.start(d, () => {
|
|
3236
3233
|
m.current = "", h.current = g.current, _(!1);
|
|
3237
3234
|
});
|
|
3238
3235
|
let u = ((l ? f ?? s ?? -1 : h.current) ?? 0) + 1, v = n(r, m.current, u);
|
|
@@ -3287,7 +3284,7 @@ function pa(e, t) {
|
|
|
3287
3284
|
//#region node_modules/@base-ui/react/esm/utils/useOpenInteractionType.js
|
|
3288
3285
|
function ma(e) {
|
|
3289
3286
|
let [t, n] = N.useState(null), r = H((t, r) => {
|
|
3290
|
-
e || n(r || (
|
|
3287
|
+
e || n(r || (xn ? "touch" : ""));
|
|
3291
3288
|
});
|
|
3292
3289
|
pa(e, (t) => {
|
|
3293
3290
|
t && !e && n(null);
|
|
@@ -3308,8 +3305,8 @@ function ma(e) {
|
|
|
3308
3305
|
//#endregion
|
|
3309
3306
|
//#region node_modules/@base-ui/react/esm/utils/popupStateMapping.js
|
|
3310
3307
|
var ha = function(e) {
|
|
3311
|
-
return e.open = "data-open", e.closed = "data-closed", e[e.startingStyle =
|
|
3312
|
-
}({}), ga =
|
|
3308
|
+
return e.open = "data-open", e.closed = "data-closed", e[e.startingStyle = tn.startingStyle] = "startingStyle", e[e.endingStyle = tn.endingStyle] = "endingStyle", e.anchorHidden = "data-anchor-hidden", e.side = "data-side", e.align = "data-align", e;
|
|
3309
|
+
}({}), ga = /*#__PURE__*/ function(e) {
|
|
3313
3310
|
return e.popupOpen = "data-popup-open", e.pressed = "data-pressed", e;
|
|
3314
3311
|
}({}), _a = { [ga.popupOpen]: "" }, va = {
|
|
3315
3312
|
[ga.popupOpen]: "",
|
|
@@ -3329,17 +3326,17 @@ var ha = function(e) {
|
|
|
3329
3326
|
//#endregion
|
|
3330
3327
|
//#region node_modules/@base-ui/utils/esm/inertValue.js
|
|
3331
3328
|
function Ta(e) {
|
|
3332
|
-
return
|
|
3329
|
+
return We(19) ? e : e ? "true" : void 0;
|
|
3333
3330
|
}
|
|
3334
3331
|
//#endregion
|
|
3335
3332
|
//#region node_modules/@base-ui/react/esm/utils/InternalBackdrop.js
|
|
3336
|
-
var Ea =
|
|
3333
|
+
var Ea = /*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
3337
3334
|
let { cutout: n, ...r } = e, i;
|
|
3338
3335
|
if (n) {
|
|
3339
3336
|
let e = n.getBoundingClientRect();
|
|
3340
3337
|
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)`;
|
|
3341
3338
|
}
|
|
3342
|
-
return
|
|
3339
|
+
return /*#__PURE__*/ F("div", {
|
|
3343
3340
|
ref: t,
|
|
3344
3341
|
role: "presentation",
|
|
3345
3342
|
"data-base-ui-inert": "",
|
|
@@ -3356,27 +3353,27 @@ var Ea = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
3356
3353
|
process.env.NODE_ENV !== "production" && (Ea.displayName = "InternalBackdrop");
|
|
3357
3354
|
//#endregion
|
|
3358
3355
|
//#region node_modules/@base-ui/react/esm/combobox/root/ComboboxRootContext.js
|
|
3359
|
-
var Da =
|
|
3356
|
+
var Da = /*#__PURE__*/ N.createContext(void 0);
|
|
3360
3357
|
process.env.NODE_ENV !== "production" && (Da.displayName = "ComboboxRootContext");
|
|
3361
|
-
var Oa =
|
|
3358
|
+
var Oa = /*#__PURE__*/ N.createContext(void 0);
|
|
3362
3359
|
process.env.NODE_ENV !== "production" && (Oa.displayName = "ComboboxFloatingContext");
|
|
3363
|
-
var ka =
|
|
3360
|
+
var ka = /*#__PURE__*/ N.createContext(void 0);
|
|
3364
3361
|
process.env.NODE_ENV !== "production" && (ka.displayName = "ComboboxDerivedItemsContext");
|
|
3365
|
-
var Aa =
|
|
3362
|
+
var Aa = /*#__PURE__*/ N.createContext("");
|
|
3366
3363
|
process.env.NODE_ENV !== "production" && (Aa.displayName = "ComboboxInputValueContext");
|
|
3367
3364
|
function ja() {
|
|
3368
3365
|
let e = N.useContext(Da);
|
|
3369
|
-
if (!e) throw Error(process.env.NODE_ENV === "production" ?
|
|
3366
|
+
if (!e) throw Error(process.env.NODE_ENV === "production" ? W(22) : "Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.");
|
|
3370
3367
|
return e;
|
|
3371
3368
|
}
|
|
3372
3369
|
function Ma() {
|
|
3373
3370
|
let e = N.useContext(Oa);
|
|
3374
|
-
if (!e) throw Error(process.env.NODE_ENV === "production" ?
|
|
3371
|
+
if (!e) throw Error(process.env.NODE_ENV === "production" ? W(23) : "Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.");
|
|
3375
3372
|
return e;
|
|
3376
3373
|
}
|
|
3377
3374
|
function Na() {
|
|
3378
3375
|
let e = N.useContext(ka);
|
|
3379
|
-
if (!e) throw Error(process.env.NODE_ENV === "production" ?
|
|
3376
|
+
if (!e) throw Error(process.env.NODE_ENV === "production" ? W(24) : "Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.");
|
|
3380
3377
|
return e;
|
|
3381
3378
|
}
|
|
3382
3379
|
function Pa() {
|
|
@@ -3389,10 +3386,10 @@ function Ia(e, t, n) {
|
|
|
3389
3386
|
return e == null || t == null ? Object.is(e, t) : n(e, t);
|
|
3390
3387
|
}
|
|
3391
3388
|
function La(e, t, n) {
|
|
3392
|
-
return !e || e.length === 0 ? !1 : e.some((e) => e
|
|
3389
|
+
return !e || e.length === 0 ? !1 : e.some((e) => e !== void 0 && Ia(t, e, n));
|
|
3393
3390
|
}
|
|
3394
3391
|
function Ra(e, t, n) {
|
|
3395
|
-
return !e || e.length === 0 ? -1 : e.findIndex((e) => e
|
|
3392
|
+
return !e || e.length === 0 ? -1 : e.findIndex((e) => e !== void 0 && Ia(e, t, n));
|
|
3396
3393
|
}
|
|
3397
3394
|
function za(e, t, n) {
|
|
3398
3395
|
return e.filter((e) => !Ia(t, e, n));
|
|
@@ -3455,7 +3452,7 @@ function Ga(e, t, n) {
|
|
|
3455
3452
|
return r();
|
|
3456
3453
|
}
|
|
3457
3454
|
function Ka(e, t, n) {
|
|
3458
|
-
return e.reduce((e, r, i) => (i > 0 && e.push(", "), e.push(
|
|
3455
|
+
return e.reduce((e, r, i) => (i > 0 && e.push(", "), e.push(/*#__PURE__*/ F(N.Fragment, { children: Ga(r, t, n) }, i)), e), []);
|
|
3459
3456
|
}
|
|
3460
3457
|
//#endregion
|
|
3461
3458
|
//#region node_modules/@base-ui/react/esm/combobox/store.js
|
|
@@ -3510,7 +3507,7 @@ var $ = {
|
|
|
3510
3507
|
modal: Z((e) => e.modal),
|
|
3511
3508
|
autoHighlight: Z((e) => e.autoHighlight),
|
|
3512
3509
|
submitOnItemClick: Z((e) => e.submitOnItemClick)
|
|
3513
|
-
}, qa =
|
|
3510
|
+
}, qa = /*#__PURE__*/ function(e) {
|
|
3514
3511
|
return e.disabled = "data-disabled", e.valid = "data-valid", e.invalid = "data-invalid", e.touched = "data-touched", e.dirty = "data-dirty", e.filled = "data-filled", e.focused = "data-focused", e;
|
|
3515
3512
|
}({}), Ja = {
|
|
3516
3513
|
badInput: !1,
|
|
@@ -3535,7 +3532,7 @@ var $ = {
|
|
|
3535
3532
|
...Ya
|
|
3536
3533
|
}, Za = { valid(e) {
|
|
3537
3534
|
return e === null ? null : e ? { [qa.valid]: "" } : { [qa.invalid]: "" };
|
|
3538
|
-
} }, Qa =
|
|
3535
|
+
} }, Qa = /*#__PURE__*/ N.createContext({
|
|
3539
3536
|
invalid: void 0,
|
|
3540
3537
|
name: void 0,
|
|
3541
3538
|
validityData: {
|
|
@@ -3545,26 +3542,26 @@ var $ = {
|
|
|
3545
3542
|
value: "",
|
|
3546
3543
|
initialValue: null
|
|
3547
3544
|
},
|
|
3548
|
-
setValidityData:
|
|
3545
|
+
setValidityData: qe,
|
|
3549
3546
|
disabled: void 0,
|
|
3550
3547
|
touched: Ya.touched,
|
|
3551
|
-
setTouched:
|
|
3548
|
+
setTouched: qe,
|
|
3552
3549
|
dirty: Ya.dirty,
|
|
3553
|
-
setDirty:
|
|
3550
|
+
setDirty: qe,
|
|
3554
3551
|
filled: Ya.filled,
|
|
3555
|
-
setFilled:
|
|
3552
|
+
setFilled: qe,
|
|
3556
3553
|
focused: Ya.focused,
|
|
3557
|
-
setFocused:
|
|
3554
|
+
setFocused: qe,
|
|
3558
3555
|
validate: () => null,
|
|
3559
3556
|
validationMode: "onSubmit",
|
|
3560
3557
|
validationDebounceTime: 0,
|
|
3561
3558
|
shouldValidateOnChange: () => !1,
|
|
3562
3559
|
state: Xa,
|
|
3563
3560
|
markedDirtyRef: { current: !1 },
|
|
3564
|
-
registerFieldControl:
|
|
3561
|
+
registerFieldControl: qe,
|
|
3565
3562
|
validation: {
|
|
3566
|
-
getValidationProps: (e =
|
|
3567
|
-
getInputValidationProps: (e =
|
|
3563
|
+
getValidationProps: (e = Ye) => e,
|
|
3564
|
+
getInputValidationProps: (e = Ye) => e,
|
|
3568
3565
|
inputRef: { current: null },
|
|
3569
3566
|
commit: async () => {}
|
|
3570
3567
|
}
|
|
@@ -3572,7 +3569,7 @@ var $ = {
|
|
|
3572
3569
|
process.env.NODE_ENV !== "production" && (Qa.displayName = "FieldRootContext");
|
|
3573
3570
|
function $a(e = !0) {
|
|
3574
3571
|
let t = N.useContext(Qa);
|
|
3575
|
-
if (t.setValidityData ===
|
|
3572
|
+
if (t.setValidityData === qe && !e) throw Error(process.env.NODE_ENV === "production" ? W(28) : "Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.");
|
|
3576
3573
|
return t;
|
|
3577
3574
|
}
|
|
3578
3575
|
//#endregion
|
|
@@ -3600,10 +3597,10 @@ function eo(e, t) {
|
|
|
3600
3597
|
}
|
|
3601
3598
|
//#endregion
|
|
3602
3599
|
//#region node_modules/@base-ui/react/esm/internals/form-context/FormContext.js
|
|
3603
|
-
var to =
|
|
3600
|
+
var to = /*#__PURE__*/ N.createContext({
|
|
3604
3601
|
formRef: { current: { fields: /* @__PURE__ */ new Map() } },
|
|
3605
3602
|
errors: {},
|
|
3606
|
-
clearErrors:
|
|
3603
|
+
clearErrors: qe,
|
|
3607
3604
|
validationMode: "onSubmit",
|
|
3608
3605
|
submitAttemptedRef: { current: !1 }
|
|
3609
3606
|
});
|
|
@@ -3613,13 +3610,13 @@ function no() {
|
|
|
3613
3610
|
}
|
|
3614
3611
|
//#endregion
|
|
3615
3612
|
//#region node_modules/@base-ui/react/esm/internals/labelable-provider/LabelableContext.js
|
|
3616
|
-
var ro =
|
|
3613
|
+
var ro = /*#__PURE__*/ N.createContext({
|
|
3617
3614
|
controlId: void 0,
|
|
3618
|
-
registerControlId:
|
|
3615
|
+
registerControlId: qe,
|
|
3619
3616
|
labelId: void 0,
|
|
3620
|
-
setLabelId:
|
|
3617
|
+
setLabelId: qe,
|
|
3621
3618
|
messageIds: [],
|
|
3622
|
-
setMessageIds:
|
|
3619
|
+
setMessageIds: qe,
|
|
3623
3620
|
getDescriptionProps: (e) => e
|
|
3624
3621
|
});
|
|
3625
3622
|
process.env.NODE_ENV !== "production" && (ro.displayName = "LabelableContext");
|
|
@@ -3629,11 +3626,11 @@ function io() {
|
|
|
3629
3626
|
//#endregion
|
|
3630
3627
|
//#region node_modules/@base-ui/react/esm/internals/labelable-provider/useLabelableId.js
|
|
3631
3628
|
function ao(e = {}) {
|
|
3632
|
-
let { id: t, implicit: n = !1, controlRef: r } = e, { controlId: i, registerControlId: a } = io(), o =
|
|
3633
|
-
!l.current || a ===
|
|
3629
|
+
let { id: t, implicit: n = !1, controlRef: r } = e, { controlId: i, registerControlId: a } = io(), o = Kt(t), s = n ? i : void 0, c = Se(() => Symbol("labelable-control")), l = N.useRef(!1), u = N.useRef(t != null), d = H(() => {
|
|
3630
|
+
!l.current || a === qe || (l.current = !1, a(c.current, void 0));
|
|
3634
3631
|
});
|
|
3635
3632
|
return U(() => {
|
|
3636
|
-
if (a ===
|
|
3633
|
+
if (a === qe) return;
|
|
3637
3634
|
let e;
|
|
3638
3635
|
if (n) {
|
|
3639
3636
|
let n = r?.current;
|
|
@@ -3720,38 +3717,38 @@ var fo = lo, po = Symbol("none"), mo = {
|
|
|
3720
3717
|
//#endregion
|
|
3721
3718
|
//#region node_modules/@base-ui/react/esm/combobox/root/AriaCombobox.js
|
|
3722
3719
|
function ho(e) {
|
|
3723
|
-
let { id: t, onOpenChangeComplete: n, defaultSelectedValue: r = null, selectedValue: i, onSelectedValueChange: a, defaultInputValue: o, inputValue: s, open: c, defaultOpen: l = !1, selectionMode: u = "none", onItemHighlighted: d, name: f, form: p, disabled: m = !1, readOnly: h = !1, required: g = !1, inputRef: _, grid: v = !1, items: y, filteredItems: b, filter: x, openOnInputClick: S = !0, autoHighlight: C = !1, keepHighlight: w = !1, highlightItemOnHover: ee = !0, loopFocus: te = !0, itemToStringLabel: T, itemToStringValue: E, isItemEqualToValue: D = Fa, virtualized: O = !1, inline: k = !1, fillInputOnItemPress: A = !0, modal: j = !1, limit: M = -1, autoComplete: ne = "list", formAutoComplete: P, locale: L, submitOnItemClick: R = !1 } = e, { clearErrors:
|
|
3724
|
-
|
|
3725
|
-
let [
|
|
3720
|
+
let { id: t, onOpenChangeComplete: n, defaultSelectedValue: r = null, selectedValue: i, onSelectedValueChange: a, defaultInputValue: o, inputValue: s, open: c, defaultOpen: l = !1, selectionMode: u = "none", onItemHighlighted: d, name: f, form: p, disabled: m = !1, readOnly: h = !1, required: g = !1, inputRef: _, grid: v = !1, items: y, filteredItems: b, filter: x, openOnInputClick: S = !0, autoHighlight: C = !1, keepHighlight: w = !1, highlightItemOnHover: ee = !0, loopFocus: te = !0, itemToStringLabel: T, itemToStringValue: E, isItemEqualToValue: D = Fa, virtualized: O = !1, inline: k = !1, fillInputOnItemPress: A = !0, modal: j = !1, limit: M = -1, autoComplete: ne = "list", formAutoComplete: P, locale: L, submitOnItemClick: R = !1 } = e, { clearErrors: re } = no(), { setDirty: ie, validityData: ae, shouldValidateOnChange: z, setFilled: oe, name: se, disabled: B, setTouched: ce, setFocused: le, validationMode: ue, validation: V } = $a(), de = ao({ id: t }), fe = fo({ locale: L }), [pe, me] = N.useState(!1), [he, ge] = N.useState(null), _e = N.useRef([]), ve = N.useRef([]), be = N.useRef(null), xe = N.useRef(null), Ce = N.useRef(null), we = N.useRef(null), Te = N.useRef(null), Ee = N.useRef(!0), De = N.useRef(!1), Oe = N.useRef(null), ke = N.useRef(null), Ae = N.useRef(null), je = N.useRef(mo), Me = N.useRef(null), Ne = N.useRef([]), Pe = N.useRef([]), Fe = B || m, Ie = se ?? f, Le = u === "multiple", W = u === "single", ze = s !== void 0 || o !== void 0, Be = y !== void 0, Ve = b !== void 0, He;
|
|
3721
|
+
He = C === "always" ? "always" : C ? "input-change" : !1;
|
|
3722
|
+
let [G, Ue] = ye({
|
|
3726
3723
|
controlled: i,
|
|
3727
|
-
default:
|
|
3724
|
+
default: Le ? r ?? Je : r,
|
|
3728
3725
|
name: "Combobox",
|
|
3729
3726
|
state: "selectedValue"
|
|
3730
|
-
}),
|
|
3727
|
+
}), We = N.useMemo(() => x === null ? () => !0 : x === void 0 ? W && !pe ? so(fe, T, G) : oo(fe, T) : x, [
|
|
3731
3728
|
x,
|
|
3732
|
-
ze,
|
|
3733
3729
|
W,
|
|
3730
|
+
G,
|
|
3734
3731
|
pe,
|
|
3735
3732
|
fe,
|
|
3736
3733
|
T
|
|
3737
|
-
]),
|
|
3734
|
+
]), Ge = Se(() => ze ? o ?? "" : W ? Ua(G, T) : "").current, [Ke, Xe] = ye({
|
|
3738
3735
|
controlled: s,
|
|
3739
|
-
default:
|
|
3736
|
+
default: Ge,
|
|
3740
3737
|
name: "Combobox",
|
|
3741
3738
|
state: "inputValue"
|
|
3742
|
-
}), [Ze, Qe] =
|
|
3739
|
+
}), [Ze, Qe] = ye({
|
|
3743
3740
|
controlled: c,
|
|
3744
3741
|
default: l,
|
|
3745
3742
|
name: "Combobox",
|
|
3746
3743
|
state: "open"
|
|
3747
|
-
}), $e = Va(y), et = he ?? (
|
|
3744
|
+
}), $e = Va(y), et = he ?? (Ke === "" ? "" : String(Ke).trim()), tt = W ? Ua(G, T) : "", nt = W && !pe && et !== "" && tt !== "" && tt.length === et.length && fe.contains(tt, et), rt = nt ? "" : et, it = Be && Ve && nt, at = N.useMemo(() => y ? $e ? y.flatMap((e) => e.items) : y : Je, [y, $e]), ot = N.useMemo(() => {
|
|
3748
3745
|
if (b && !it) return b;
|
|
3749
|
-
if (!y) return
|
|
3746
|
+
if (!y) return Je;
|
|
3750
3747
|
if ($e) {
|
|
3751
3748
|
let e = y, t = [], n = 0;
|
|
3752
3749
|
for (let r of e) {
|
|
3753
3750
|
if (M > -1 && n >= M) break;
|
|
3754
|
-
let e = rt === "" ? r.items : r.items.filter((e) =>
|
|
3751
|
+
let e = rt === "" ? r.items : r.items.filter((e) => We(e, rt, T));
|
|
3755
3752
|
if (e.length === 0) continue;
|
|
3756
3753
|
let i = M > -1 ? M - n : Infinity, a = e.slice(0, i);
|
|
3757
3754
|
if (a.length > 0) {
|
|
@@ -3768,7 +3765,7 @@ function ho(e) {
|
|
|
3768
3765
|
let e = [];
|
|
3769
3766
|
for (let t of at) {
|
|
3770
3767
|
if (M > -1 && e.length >= M) break;
|
|
3771
|
-
|
|
3768
|
+
We(t, rt, T) && e.push(t);
|
|
3772
3769
|
}
|
|
3773
3770
|
return e;
|
|
3774
3771
|
}, [
|
|
@@ -3778,23 +3775,23 @@ function ho(e) {
|
|
|
3778
3775
|
$e,
|
|
3779
3776
|
rt,
|
|
3780
3777
|
M,
|
|
3781
|
-
|
|
3778
|
+
We,
|
|
3782
3779
|
T,
|
|
3783
3780
|
at
|
|
3784
|
-
]), st = N.useMemo(() => $e ? ot.flatMap((e) => e.items) : ot, [ot, $e]), K =
|
|
3781
|
+
]), st = N.useMemo(() => $e ? ot.flatMap((e) => e.items) : ot, [ot, $e]), K = Se(() => new Ji({
|
|
3785
3782
|
id: de,
|
|
3786
3783
|
labelId: void 0,
|
|
3787
|
-
selectedValue:
|
|
3784
|
+
selectedValue: G,
|
|
3788
3785
|
open: Ze,
|
|
3789
|
-
filter:
|
|
3786
|
+
filter: We,
|
|
3790
3787
|
query: et,
|
|
3791
3788
|
items: y,
|
|
3792
3789
|
selectionMode: u,
|
|
3793
|
-
listRef:
|
|
3794
|
-
labelsRef:
|
|
3795
|
-
popupRef:
|
|
3790
|
+
listRef: _e,
|
|
3791
|
+
labelsRef: ve,
|
|
3792
|
+
popupRef: be,
|
|
3796
3793
|
emptyRef: Te,
|
|
3797
|
-
inputRef:
|
|
3794
|
+
inputRef: xe,
|
|
3798
3795
|
startDismissRef: Ce,
|
|
3799
3796
|
endDismissRef: we,
|
|
3800
3797
|
keyboardActiveRef: Ee,
|
|
@@ -3815,9 +3812,9 @@ function ho(e) {
|
|
|
3815
3812
|
itemToStringLabel: T,
|
|
3816
3813
|
isItemEqualToValue: D,
|
|
3817
3814
|
modal: j,
|
|
3818
|
-
autoHighlight:
|
|
3815
|
+
autoHighlight: He,
|
|
3819
3816
|
submitOnItemClick: R,
|
|
3820
|
-
hasInputValue:
|
|
3817
|
+
hasInputValue: ze,
|
|
3821
3818
|
mounted: !1,
|
|
3822
3819
|
forceMounted: !1,
|
|
3823
3820
|
transitionStatus: "idle",
|
|
@@ -3835,95 +3832,95 @@ function ho(e) {
|
|
|
3835
3832
|
popupSide: null,
|
|
3836
3833
|
openMethod: null,
|
|
3837
3834
|
inputInsidePopup: !0,
|
|
3838
|
-
onOpenChangeComplete: n ||
|
|
3839
|
-
setOpen:
|
|
3840
|
-
setInputValue:
|
|
3841
|
-
setSelectedValue:
|
|
3842
|
-
setIndices:
|
|
3843
|
-
onItemHighlighted:
|
|
3844
|
-
handleSelection:
|
|
3845
|
-
getItemProps: () =>
|
|
3846
|
-
forceMount:
|
|
3847
|
-
requestSubmit:
|
|
3848
|
-
})).current, ct = u === "none" ?
|
|
3835
|
+
onOpenChangeComplete: n || qe,
|
|
3836
|
+
setOpen: qe,
|
|
3837
|
+
setInputValue: qe,
|
|
3838
|
+
setSelectedValue: qe,
|
|
3839
|
+
setIndices: qe,
|
|
3840
|
+
onItemHighlighted: qe,
|
|
3841
|
+
handleSelection: qe,
|
|
3842
|
+
getItemProps: () => Ye,
|
|
3843
|
+
forceMount: qe,
|
|
3844
|
+
requestSubmit: qe
|
|
3845
|
+
})).current, ct = u === "none" ? Ke : G, lt = N.useMemo(() => u === "none" ? ct : Array.isArray(G) ? G.map((e) => Wa(e, E)) : Wa(G, E), [
|
|
3849
3846
|
ct,
|
|
3850
3847
|
E,
|
|
3851
3848
|
u,
|
|
3852
|
-
|
|
3853
|
-
]), ut = H(d), dt = H(n), ft = Q(K, $.activeIndex), pt = Q(K, $.selectedIndex), mt = Q(K, $.positionerElement), ht = Q(K, $.listElement), gt = Q(K, $.triggerElement), _t = Q(K, $.inputElement), vt = Q(K, $.inputGroupElement), yt = Q(K, $.inline),
|
|
3854
|
-
eo(
|
|
3849
|
+
G
|
|
3850
|
+
]), ut = H(d), dt = H(n), ft = Q(K, $.activeIndex), pt = Q(K, $.selectedIndex), mt = Q(K, $.positionerElement), ht = Q(K, $.listElement), gt = Q(K, $.triggerElement), _t = Q(K, $.inputElement), vt = Q(K, $.inputGroupElement), yt = Q(K, $.inline), bt = Q(K, $.inputInsidePopup), xt = Kr(gt), { mounted: Ct, setMounted: wt, transitionStatus: Et } = sn(Ze), { openMethod: Dt, triggerProps: Ot } = ma(Ze), kt = H(() => lt);
|
|
3851
|
+
eo(bt ? xt : xe, {
|
|
3855
3852
|
id: de,
|
|
3856
3853
|
value: ct,
|
|
3857
3854
|
getValue: kt
|
|
3858
3855
|
});
|
|
3859
|
-
let
|
|
3860
|
-
y ?
|
|
3861
|
-
}),
|
|
3856
|
+
let At = H(() => {
|
|
3857
|
+
y ? ve.current = st.map((e) => Ua(e, T)) : K.set("forceMounted", !0);
|
|
3858
|
+
}), jt = N.useRef(G);
|
|
3862
3859
|
U(() => {
|
|
3863
|
-
|
|
3864
|
-
}, [
|
|
3865
|
-
let
|
|
3860
|
+
G !== jt.current && At();
|
|
3861
|
+
}, [At, G]);
|
|
3862
|
+
let Nt = H((e) => {
|
|
3866
3863
|
K.update(e);
|
|
3867
3864
|
let t = e.type || "none";
|
|
3868
|
-
if (e.activeIndex !== void 0) if (e.activeIndex === null) je.current !== mo && (je.current = mo, ut(void 0,
|
|
3865
|
+
if (e.activeIndex !== void 0) if (e.activeIndex === null) je.current !== mo && (je.current = mo, ut(void 0, Bt(t, void 0, { index: -1 })));
|
|
3869
3866
|
else {
|
|
3870
3867
|
let n = Ne.current[e.activeIndex];
|
|
3871
3868
|
je.current = {
|
|
3872
3869
|
value: n,
|
|
3873
3870
|
index: e.activeIndex
|
|
3874
|
-
}, ut(n,
|
|
3871
|
+
}, ut(n, Bt(t, void 0, { index: e.activeIndex }));
|
|
3875
3872
|
}
|
|
3876
|
-
}),
|
|
3877
|
-
if (De.current = n.reason ===
|
|
3873
|
+
}), Pt = H((t, n) => {
|
|
3874
|
+
if (De.current = n.reason === Mt, e.onInputValueChange?.(t, n), !n.isCanceled) {
|
|
3878
3875
|
if (n.reason === "input-change") {
|
|
3879
3876
|
let e = n.event, r = e.inputType;
|
|
3880
3877
|
if (e.type === "compositionend" || r != null && r !== "" && r !== "insertReplacementText") {
|
|
3881
3878
|
let e = t.trim() !== "";
|
|
3882
|
-
e && me(!0), Me.current = { hasQuery: e }, e &&
|
|
3879
|
+
e && me(!0), Me.current = { hasQuery: e }, e && He && K.state.activeIndex == null && K.set("activeIndex", 0);
|
|
3883
3880
|
}
|
|
3884
3881
|
}
|
|
3885
3882
|
Xe(t);
|
|
3886
3883
|
}
|
|
3887
3884
|
}), It = H((t, n) => {
|
|
3888
|
-
if (Ze !== t && (n.reason === "escape-key" &&
|
|
3889
|
-
let e = u === "none" ?
|
|
3890
|
-
|
|
3885
|
+
if (Ze !== t && (n.reason === "escape-key" && Be && st.length === 0 && !K.state.emptyRef.current && n.allowPropagation(), e.onOpenChange?.(t, n), !n.isCanceled && (!t && pe && (W ? (yt || ge(et), et === "" && me(!1)) : Le && (yt || bt ? Nt({ activeIndex: null }) : ge(et), Pt("", q(Mt, n.event)))), Qe(t), !t && bt && (n.reason === "focus-out" || n.reason === "outside-press") && (ce(!0), le(!1), ue === "onBlur")))) {
|
|
3886
|
+
let e = u === "none" ? Ke : G;
|
|
3887
|
+
V.commit(e);
|
|
3891
3888
|
}
|
|
3892
3889
|
}), Lt = H((e, t) => {
|
|
3893
|
-
a?.(e, t), !t.isCanceled && (
|
|
3894
|
-
}),
|
|
3890
|
+
a?.(e, t), !t.isCanceled && (Ue(e), (u === "none" && be.current && A || W && !K.state.inputInsidePopup) && Pt(Ua(e, T), q(t.reason, t.event)), W && e != null && t.reason !== "input-change" && pe && !yt && ge(et));
|
|
3891
|
+
}), Rt = H((e, t) => {
|
|
3895
3892
|
let n = t;
|
|
3896
3893
|
if (n === void 0) {
|
|
3897
3894
|
if (ft === null) return;
|
|
3898
3895
|
n = Ne.current[ft];
|
|
3899
3896
|
}
|
|
3900
|
-
let r =
|
|
3897
|
+
let r = In(e), i = Ae.current ?? e;
|
|
3901
3898
|
Ae.current = null;
|
|
3902
|
-
let a = q(
|
|
3899
|
+
let a = q(Tt, i), o = r?.closest("a")?.getAttribute("href");
|
|
3903
3900
|
if (o) {
|
|
3904
3901
|
o.startsWith("#") && It(!1, a);
|
|
3905
3902
|
return;
|
|
3906
3903
|
}
|
|
3907
|
-
if (
|
|
3908
|
-
let e = Array.isArray(
|
|
3909
|
-
if (Lt(
|
|
3910
|
-
K.state.inputInsidePopup ?
|
|
3904
|
+
if (Le) {
|
|
3905
|
+
let e = Array.isArray(G) ? G : [], t = La(e, n, K.state.isItemEqualToValue) ? za(e, n, K.state.isItemEqualToValue) : [...e, n];
|
|
3906
|
+
if (Lt(t, a), !(xe.current && xe.current.value.trim() !== "")) return;
|
|
3907
|
+
K.state.inputInsidePopup ? Pt("", q(Mt, a.event)) : It(!1, a);
|
|
3911
3908
|
} else Lt(n, a), It(!1, a);
|
|
3912
|
-
}),
|
|
3909
|
+
}), zt = H(() => {
|
|
3913
3910
|
if (!K.state.submitOnItemClick) return;
|
|
3914
|
-
let e =
|
|
3911
|
+
let e = V.inputRef.current?.form ?? K.state.inputElement?.form;
|
|
3915
3912
|
e && typeof e.requestSubmit == "function" && e.requestSubmit();
|
|
3916
3913
|
}), Vt = H(() => {
|
|
3917
|
-
if (
|
|
3914
|
+
if (wt(!1), dt?.(!1), me(!1), ge(null), Nt(u === "none" ? {
|
|
3918
3915
|
activeIndex: null,
|
|
3919
3916
|
selectedIndex: null
|
|
3920
|
-
} : { activeIndex: null }),
|
|
3917
|
+
} : { activeIndex: null }), Le && xe.current && xe.current.value !== "" && !De.current && Pt("", q(Mt)), W) if (K.state.inputInsidePopup) xe.current && xe.current.value !== "" && Pt("", q(Mt));
|
|
3921
3918
|
else {
|
|
3922
|
-
let e = Ua(
|
|
3923
|
-
|
|
3919
|
+
let e = Ua(G, T);
|
|
3920
|
+
xe.current && xe.current.value !== e && Pt(e, q(e === "" ? Mt : St));
|
|
3924
3921
|
}
|
|
3925
|
-
}), Ht = N.useMemo(() => yt && mt ? { current: mt.closest("[role=\"dialog\"]") } :
|
|
3926
|
-
|
|
3922
|
+
}), Ht = N.useMemo(() => yt && mt ? { current: mt.closest("[role=\"dialog\"]") } : be, [yt, mt]);
|
|
3923
|
+
jr({
|
|
3927
3924
|
enabled: !e.actionsRef,
|
|
3928
3925
|
open: Ze,
|
|
3929
3926
|
ref: Ht,
|
|
@@ -3933,92 +3930,92 @@ function ho(e) {
|
|
|
3933
3930
|
}), N.useImperativeHandle(e.actionsRef, () => ({ unmount: Vt }), [Vt]), U(function() {
|
|
3934
3931
|
if (Ze || u === "none") return;
|
|
3935
3932
|
let e = y ? at : Pe.current;
|
|
3936
|
-
if (
|
|
3937
|
-
let t = Array.isArray(
|
|
3938
|
-
|
|
3933
|
+
if (Le) {
|
|
3934
|
+
let t = Array.isArray(G) ? G : [], n = t[t.length - 1], r = Ra(e, n, D);
|
|
3935
|
+
Nt({ selectedIndex: r === -1 ? null : r });
|
|
3939
3936
|
} else {
|
|
3940
|
-
let t = Ra(e,
|
|
3941
|
-
|
|
3937
|
+
let t = Ra(e, G, D);
|
|
3938
|
+
Nt({ selectedIndex: t === -1 ? null : t });
|
|
3942
3939
|
}
|
|
3943
3940
|
}, [
|
|
3944
3941
|
Ze,
|
|
3945
|
-
|
|
3942
|
+
G,
|
|
3946
3943
|
y,
|
|
3947
3944
|
u,
|
|
3948
3945
|
at,
|
|
3949
|
-
|
|
3946
|
+
Le,
|
|
3950
3947
|
D,
|
|
3951
|
-
|
|
3948
|
+
Nt
|
|
3952
3949
|
]), U(() => {
|
|
3953
|
-
y && (Ne.current = st,
|
|
3950
|
+
y && (Ne.current = st, _e.current.length = st.length);
|
|
3954
3951
|
}, [y, st]), U(() => {
|
|
3955
3952
|
let e = Me.current;
|
|
3956
|
-
if (e && (e.hasQuery ?
|
|
3957
|
-
let t =
|
|
3953
|
+
if (e && (e.hasQuery ? He && K.set("activeIndex", 0) : He === "always" && K.set("activeIndex", 0), Me.current = null), !Ze && !yt) return;
|
|
3954
|
+
let t = Be || Ve ? st : Ne.current, n = K.state.activeIndex;
|
|
3958
3955
|
if (n == null) {
|
|
3959
|
-
if (
|
|
3956
|
+
if (He === "always" && t.length > 0) {
|
|
3960
3957
|
K.set("activeIndex", 0);
|
|
3961
3958
|
return;
|
|
3962
3959
|
}
|
|
3963
|
-
je.current !== mo && (je.current = mo, K.state.onItemHighlighted(void 0,
|
|
3960
|
+
je.current !== mo && (je.current = mo, K.state.onItemHighlighted(void 0, Bt(St, void 0, { index: -1 })));
|
|
3964
3961
|
return;
|
|
3965
3962
|
}
|
|
3966
3963
|
if (n >= t.length) {
|
|
3967
|
-
je.current !== mo && (je.current = mo, K.state.onItemHighlighted(void 0,
|
|
3964
|
+
je.current !== mo && (je.current = mo, K.state.onItemHighlighted(void 0, Bt(St, void 0, { index: -1 }))), K.set("activeIndex", null);
|
|
3968
3965
|
return;
|
|
3969
3966
|
}
|
|
3970
3967
|
let r = t[n], i = je.current.value, a = i !== po && Ia(r, i, K.state.isItemEqualToValue);
|
|
3971
3968
|
(je.current.index !== n || !a) && (je.current = {
|
|
3972
3969
|
value: r,
|
|
3973
3970
|
index: n
|
|
3974
|
-
}, K.state.onItemHighlighted(r,
|
|
3971
|
+
}, K.state.onItemHighlighted(r, Bt(St, void 0, { index: n })));
|
|
3975
3972
|
}, [
|
|
3976
3973
|
ft,
|
|
3977
|
-
Ue,
|
|
3978
3974
|
He,
|
|
3979
3975
|
Ve,
|
|
3976
|
+
Be,
|
|
3980
3977
|
st,
|
|
3981
3978
|
yt,
|
|
3982
3979
|
Ze,
|
|
3983
3980
|
K
|
|
3984
3981
|
]), U(() => {
|
|
3985
3982
|
if (u === "none") {
|
|
3986
|
-
|
|
3983
|
+
oe(String(Ke) !== "");
|
|
3987
3984
|
return;
|
|
3988
3985
|
}
|
|
3989
|
-
|
|
3986
|
+
oe(Le ? Array.isArray(G) && G.length > 0 : G != null);
|
|
3990
3987
|
}, [
|
|
3991
|
-
|
|
3988
|
+
oe,
|
|
3992
3989
|
u,
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3990
|
+
Ke,
|
|
3991
|
+
G,
|
|
3992
|
+
Le
|
|
3996
3993
|
]), N.useEffect(() => {
|
|
3997
|
-
|
|
3994
|
+
Be && He && st.length === 0 && Nt({ activeIndex: null });
|
|
3998
3995
|
}, [
|
|
3999
|
-
|
|
4000
|
-
|
|
3996
|
+
Be,
|
|
3997
|
+
He,
|
|
4001
3998
|
st.length,
|
|
4002
|
-
|
|
3999
|
+
Nt
|
|
4003
4000
|
]), pa(et, () => {
|
|
4004
|
-
!Ze || et === "" || et === String(
|
|
4005
|
-
}), pa(
|
|
4006
|
-
if (u !== "none" && (
|
|
4007
|
-
let e = Ua(
|
|
4008
|
-
|
|
4001
|
+
!Ze || et === "" || et === String(Ge) || me(!0);
|
|
4002
|
+
}), pa(G, () => {
|
|
4003
|
+
if (u !== "none" && (re(Ie), ie(G !== ae.initialValue), z() ? V.commit(G) : V.commit(G, !0), W && !ze && !bt)) {
|
|
4004
|
+
let e = Ua(G, T);
|
|
4005
|
+
Ke !== e && Pt(e, q(St));
|
|
4009
4006
|
}
|
|
4010
|
-
}), pa(
|
|
4011
|
-
u === "none" && (
|
|
4007
|
+
}), pa(Ke, () => {
|
|
4008
|
+
u === "none" && (re(Ie), ie(Ke !== ae.initialValue), z() ? V.commit(Ke) : V.commit(Ke, !0));
|
|
4012
4009
|
}), pa(y, () => {
|
|
4013
|
-
if (!
|
|
4014
|
-
let e = Ua(
|
|
4015
|
-
|
|
4010
|
+
if (!W || ze || bt || pe) return;
|
|
4011
|
+
let e = Ua(G, T);
|
|
4012
|
+
Ke !== e && Pt(e, q(St));
|
|
4016
4013
|
});
|
|
4017
4014
|
let Ut = $i({
|
|
4018
4015
|
open: yt ? !0 : Ze,
|
|
4019
4016
|
onOpenChange: It,
|
|
4020
4017
|
elements: {
|
|
4021
|
-
reference:
|
|
4018
|
+
reference: bt ? gt : _t,
|
|
4022
4019
|
floating: mt
|
|
4023
4020
|
}
|
|
4024
4021
|
}), Wt, Gt;
|
|
@@ -4043,14 +4040,14 @@ function ho(e) {
|
|
|
4043
4040
|
ht?.id,
|
|
4044
4041
|
ne
|
|
4045
4042
|
]),
|
|
4046
|
-
|
|
4043
|
+
Fi(Ut, {
|
|
4047
4044
|
enabled: !h && !Fe && S,
|
|
4048
4045
|
event: "mousedown-only",
|
|
4049
4046
|
toggle: !1,
|
|
4050
|
-
touchOpenDelay:
|
|
4051
|
-
reason:
|
|
4047
|
+
touchOpenDelay: bt ? 0 : 100,
|
|
4048
|
+
reason: Ft
|
|
4052
4049
|
}),
|
|
4053
|
-
|
|
4050
|
+
zi(Ut, {
|
|
4054
4051
|
enabled: !h && !Fe && !yt,
|
|
4055
4052
|
outsidePressEvent: {
|
|
4056
4053
|
mouse: "sloppy",
|
|
@@ -4058,34 +4055,34 @@ function ho(e) {
|
|
|
4058
4055
|
},
|
|
4059
4056
|
bubbles: yt ? !0 : void 0,
|
|
4060
4057
|
outsidePress(e) {
|
|
4061
|
-
let t =
|
|
4058
|
+
let t = In(e);
|
|
4062
4059
|
return !J(gt, t) && !J(ke.current, t) && !J(Oe.current, t) && !J(vt, t);
|
|
4063
4060
|
}
|
|
4064
4061
|
}),
|
|
4065
4062
|
ua(Ut, {
|
|
4066
4063
|
enabled: !h && !Fe,
|
|
4067
4064
|
id: de,
|
|
4068
|
-
listRef:
|
|
4065
|
+
listRef: _e,
|
|
4069
4066
|
activeIndex: ft,
|
|
4070
4067
|
selectedIndex: pt,
|
|
4071
4068
|
virtual: !0,
|
|
4072
4069
|
loopFocus: te,
|
|
4073
|
-
allowEscape: te && !
|
|
4074
|
-
focusItemOnOpen: pe || u === "none" && !
|
|
4070
|
+
allowEscape: te && !He,
|
|
4071
|
+
focusItemOnOpen: pe || u === "none" && !He ? !1 : "auto",
|
|
4075
4072
|
focusItemOnHover: ee,
|
|
4076
4073
|
resetOnPointerLeave: !w,
|
|
4077
4074
|
cols: v ? 2 : 1,
|
|
4078
4075
|
orientation: v ? "horizontal" : void 0,
|
|
4079
|
-
disabledIndices:
|
|
4076
|
+
disabledIndices: Je,
|
|
4080
4077
|
onNavigate(e, t) {
|
|
4081
|
-
!t && !Ze || Et === "ending" ||
|
|
4078
|
+
!t && !Ze || Et === "ending" || Nt(t ? {
|
|
4082
4079
|
activeIndex: e,
|
|
4083
4080
|
type: Ee.current ? "keyboard" : "pointer"
|
|
4084
4081
|
} : { activeIndex: e });
|
|
4085
4082
|
}
|
|
4086
4083
|
})
|
|
4087
4084
|
]);
|
|
4088
|
-
|
|
4085
|
+
Mr(() => {
|
|
4089
4086
|
K.update({
|
|
4090
4087
|
inline: k,
|
|
4091
4088
|
popupProps: qt(),
|
|
@@ -4093,20 +4090,20 @@ function ho(e) {
|
|
|
4093
4090
|
triggerProps: Ot,
|
|
4094
4091
|
getItemProps: Jt,
|
|
4095
4092
|
setOpen: It,
|
|
4096
|
-
setInputValue:
|
|
4093
|
+
setInputValue: Pt,
|
|
4097
4094
|
setSelectedValue: Lt,
|
|
4098
|
-
setIndices:
|
|
4095
|
+
setIndices: Nt,
|
|
4099
4096
|
onItemHighlighted: ut,
|
|
4100
|
-
handleSelection:
|
|
4101
|
-
forceMount:
|
|
4102
|
-
requestSubmit:
|
|
4097
|
+
handleSelection: Rt,
|
|
4098
|
+
forceMount: At,
|
|
4099
|
+
requestSubmit: zt
|
|
4103
4100
|
});
|
|
4104
4101
|
}), U(() => {
|
|
4105
4102
|
K.update({
|
|
4106
4103
|
id: de,
|
|
4107
|
-
selectedValue:
|
|
4104
|
+
selectedValue: G,
|
|
4108
4105
|
open: Ze,
|
|
4109
|
-
mounted:
|
|
4106
|
+
mounted: Ct,
|
|
4110
4107
|
transitionStatus: Et,
|
|
4111
4108
|
items: y,
|
|
4112
4109
|
inline: k,
|
|
@@ -4128,18 +4125,18 @@ function ho(e) {
|
|
|
4128
4125
|
openOnInputClick: S,
|
|
4129
4126
|
itemToStringLabel: T,
|
|
4130
4127
|
modal: j,
|
|
4131
|
-
autoHighlight:
|
|
4128
|
+
autoHighlight: He,
|
|
4132
4129
|
isItemEqualToValue: D,
|
|
4133
4130
|
submitOnItemClick: R,
|
|
4134
|
-
hasInputValue:
|
|
4135
|
-
requestSubmit:
|
|
4131
|
+
hasInputValue: ze,
|
|
4132
|
+
requestSubmit: zt
|
|
4136
4133
|
});
|
|
4137
4134
|
}, [
|
|
4138
4135
|
K,
|
|
4139
4136
|
de,
|
|
4140
|
-
|
|
4137
|
+
G,
|
|
4141
4138
|
Ze,
|
|
4142
|
-
|
|
4139
|
+
Ct,
|
|
4143
4140
|
Et,
|
|
4144
4141
|
y,
|
|
4145
4142
|
qt,
|
|
@@ -4152,7 +4149,7 @@ function ho(e) {
|
|
|
4152
4149
|
Fe,
|
|
4153
4150
|
h,
|
|
4154
4151
|
g,
|
|
4155
|
-
|
|
4152
|
+
V,
|
|
4156
4153
|
v,
|
|
4157
4154
|
$e,
|
|
4158
4155
|
O,
|
|
@@ -4162,60 +4159,60 @@ function ho(e) {
|
|
|
4162
4159
|
j,
|
|
4163
4160
|
D,
|
|
4164
4161
|
R,
|
|
4165
|
-
|
|
4162
|
+
ze,
|
|
4166
4163
|
k,
|
|
4167
|
-
|
|
4168
|
-
|
|
4164
|
+
zt,
|
|
4165
|
+
He,
|
|
4169
4166
|
p
|
|
4170
4167
|
]);
|
|
4171
|
-
let Yt =
|
|
4168
|
+
let Yt = Re(_, V.inputRef), Xt = N.useMemo(() => ({
|
|
4172
4169
|
query: et,
|
|
4173
|
-
hasItems:
|
|
4170
|
+
hasItems: Be,
|
|
4174
4171
|
filteredItems: ot,
|
|
4175
4172
|
flatFilteredItems: st
|
|
4176
4173
|
}), [
|
|
4177
4174
|
et,
|
|
4178
|
-
|
|
4175
|
+
Be,
|
|
4179
4176
|
ot,
|
|
4180
4177
|
st
|
|
4181
|
-
]), Zt = N.useMemo(() => Array.isArray(ct) ? "" : Wa(ct, E), [ct, E]), Qt =
|
|
4178
|
+
]), Zt = N.useMemo(() => Array.isArray(ct) ? "" : Wa(ct, E), [ct, E]), Qt = Le && Array.isArray(G) && G.length > 0, $t = Le || u === "none" ? void 0 : Ie, en = N.useMemo(() => !Le || !Array.isArray(G) || !Ie ? null : G.map((e) => {
|
|
4182
4179
|
let t = Wa(e, E);
|
|
4183
|
-
return
|
|
4180
|
+
return /*#__PURE__*/ F("input", {
|
|
4184
4181
|
type: "hidden",
|
|
4185
4182
|
form: p,
|
|
4186
4183
|
name: Ie,
|
|
4187
4184
|
value: t
|
|
4188
4185
|
}, t);
|
|
4189
4186
|
}), [
|
|
4190
|
-
|
|
4191
|
-
|
|
4187
|
+
Le,
|
|
4188
|
+
G,
|
|
4192
4189
|
p,
|
|
4193
4190
|
Ie,
|
|
4194
4191
|
E
|
|
4195
|
-
]), tn =
|
|
4192
|
+
]), tn = /*#__PURE__*/ I(N.Fragment, { children: [
|
|
4196
4193
|
e.children,
|
|
4197
|
-
|
|
4198
|
-
...
|
|
4194
|
+
/*#__PURE__*/ F("input", {
|
|
4195
|
+
...V.getInputValidationProps({
|
|
4199
4196
|
onFocus() {
|
|
4200
|
-
if (
|
|
4197
|
+
if (bt) {
|
|
4201
4198
|
gt?.focus();
|
|
4202
4199
|
return;
|
|
4203
4200
|
}
|
|
4204
|
-
(
|
|
4201
|
+
(xe.current || gt)?.focus();
|
|
4205
4202
|
},
|
|
4206
4203
|
onChange(e) {
|
|
4207
4204
|
if (e.nativeEvent.defaultPrevented) return;
|
|
4208
|
-
let t = e.currentTarget.value, n = q(
|
|
4205
|
+
let t = e.currentTarget.value, n = q(St, e.nativeEvent);
|
|
4209
4206
|
function r() {
|
|
4210
|
-
if (
|
|
4207
|
+
if (Le) return;
|
|
4211
4208
|
if (u === "none") {
|
|
4212
|
-
|
|
4209
|
+
ie(t !== ae.initialValue), Pt(t, n), z() && V.commit(t);
|
|
4213
4210
|
return;
|
|
4214
4211
|
}
|
|
4215
4212
|
let e = Ne.current.find((e) => Wa(e, E).toLowerCase() === t.toLowerCase() || Ua(e, T).toLowerCase() === t.toLowerCase());
|
|
4216
|
-
e != null && (
|
|
4213
|
+
e != null && (ie(e !== ae.initialValue), Lt?.(e, n), z() && V.commit(e));
|
|
4217
4214
|
}
|
|
4218
|
-
y ? r() : (
|
|
4215
|
+
y ? r() : (At(), queueMicrotask(r));
|
|
4219
4216
|
}
|
|
4220
4217
|
}),
|
|
4221
4218
|
id: de && $t == null ? `${de}-hidden-input` : void 0,
|
|
@@ -4227,21 +4224,21 @@ function ho(e) {
|
|
|
4227
4224
|
readOnly: h,
|
|
4228
4225
|
value: Zt,
|
|
4229
4226
|
ref: Yt,
|
|
4230
|
-
style: $t ?
|
|
4227
|
+
style: $t ? Xr : Yr,
|
|
4231
4228
|
tabIndex: -1,
|
|
4232
4229
|
"aria-hidden": !0,
|
|
4233
4230
|
suppressHydrationWarning: !0
|
|
4234
4231
|
}),
|
|
4235
4232
|
en
|
|
4236
4233
|
] });
|
|
4237
|
-
return
|
|
4234
|
+
return /*#__PURE__*/ F(Da.Provider, {
|
|
4238
4235
|
value: K,
|
|
4239
|
-
children:
|
|
4236
|
+
children: /*#__PURE__*/ F(Oa.Provider, {
|
|
4240
4237
|
value: Ut,
|
|
4241
|
-
children:
|
|
4238
|
+
children: /*#__PURE__*/ F(ka.Provider, {
|
|
4242
4239
|
value: Xt,
|
|
4243
|
-
children:
|
|
4244
|
-
value:
|
|
4240
|
+
children: /*#__PURE__*/ F(Aa.Provider, {
|
|
4241
|
+
value: Ke,
|
|
4245
4242
|
children: tn
|
|
4246
4243
|
})
|
|
4247
4244
|
})
|
|
@@ -4278,23 +4275,23 @@ function vo(e, t) {
|
|
|
4278
4275
|
}
|
|
4279
4276
|
//#endregion
|
|
4280
4277
|
//#region node_modules/@base-ui/react/esm/combobox/trigger/ComboboxTrigger.js
|
|
4281
|
-
var yo = 2, bo =
|
|
4282
|
-
let { render: n, className: r, nativeButton: i = !0, disabled: a = !1, id: o, style: s, ...c } = e, { state: l, disabled: u, setTouched: d, setFocused: f, validationMode: p, validation: m } = $a(), { labelId: h } = io(), g = ja(), { filteredItems: _ } = Na(), v = Q(g, $.selectionMode), y = Q(g, $.disabled), b = Q(g, $.readOnly), x = Q(g, $.required), S = Q(g, $.mounted), C = Q(g, $.popupSide), w = Q(g, $.positionerElement), ee = Q(g, $.listElement), te = Q(g, $.triggerProps), T = Q(g, $.triggerElement), E = Q(g, $.inputInsidePopup), D = Q(g, $.id), O = Q(g, $.labelId), k = Q(g, $.open), A = Q(g, $.selectedValue), j = Q(g, $.activeIndex), M = Q(g, $.selectedIndex), ne = Q(g, $.hasSelectedValue), P = Ma(), F = Pa(), I =
|
|
4278
|
+
var yo = 2, bo = /*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
4279
|
+
let { render: n, className: r, nativeButton: i = !0, disabled: a = !1, id: o, style: s, ...c } = e, { state: l, disabled: u, setTouched: d, setFocused: f, validationMode: p, validation: m } = $a(), { labelId: h } = io(), g = ja(), { filteredItems: _ } = Na(), v = Q(g, $.selectionMode), y = Q(g, $.disabled), b = Q(g, $.readOnly), x = Q(g, $.required), S = Q(g, $.mounted), C = Q(g, $.popupSide), w = Q(g, $.positionerElement), ee = Q(g, $.listElement), te = Q(g, $.triggerProps), T = Q(g, $.triggerElement), E = Q(g, $.inputInsidePopup), D = Q(g, $.id), O = Q(g, $.labelId), k = Q(g, $.open), A = Q(g, $.selectedValue), j = Q(g, $.activeIndex), M = Q(g, $.selectedIndex), ne = Q(g, $.hasSelectedValue), P = Ma(), F = Pa(), I = Fr(), L = u || y || a, R = _.length === 0, re = S && w ? C : null;
|
|
4283
4280
|
ao({ id: E ? o : void 0 });
|
|
4284
|
-
let
|
|
4285
|
-
function
|
|
4286
|
-
|
|
4281
|
+
let ie = E ? o ?? D : o, ae = vo(h, O), z = N.useRef("");
|
|
4282
|
+
function oe(e) {
|
|
4283
|
+
z.current = e.pointerType;
|
|
4287
4284
|
}
|
|
4288
|
-
let
|
|
4285
|
+
let se = P.useState("domReferenceElement");
|
|
4289
4286
|
N.useEffect(() => {
|
|
4290
|
-
E && T && T !==
|
|
4287
|
+
E && T && T !== se && P.set("domReferenceElement", T);
|
|
4291
4288
|
}, [
|
|
4292
4289
|
T,
|
|
4293
|
-
|
|
4290
|
+
se,
|
|
4294
4291
|
P,
|
|
4295
4292
|
E
|
|
4296
4293
|
]);
|
|
4297
|
-
let { reference:
|
|
4294
|
+
let { reference: B } = da(P, {
|
|
4298
4295
|
enabled: !k && !b && !y && v === "single",
|
|
4299
4296
|
listRef: g.state.labelsRef,
|
|
4300
4297
|
activeIndex: j,
|
|
@@ -4303,44 +4300,44 @@ var yo = 2, bo = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
4303
4300
|
let t = g.state.valuesRef.current[e];
|
|
4304
4301
|
t !== void 0 && g.state.setSelectedValue(t, q("none"));
|
|
4305
4302
|
}
|
|
4306
|
-
}), { reference:
|
|
4303
|
+
}), { reference: ce } = Fi(P, {
|
|
4307
4304
|
enabled: !b && !y,
|
|
4308
4305
|
event: "mousedown"
|
|
4309
|
-
}), { buttonRef:
|
|
4306
|
+
}), { buttonRef: le, getButtonProps: ue } = pn({
|
|
4310
4307
|
native: i,
|
|
4311
4308
|
disabled: L
|
|
4312
|
-
}),
|
|
4309
|
+
}), V = {
|
|
4313
4310
|
...l,
|
|
4314
4311
|
open: k,
|
|
4315
4312
|
disabled: L,
|
|
4316
|
-
popupSide:
|
|
4313
|
+
popupSide: re,
|
|
4317
4314
|
listEmpty: R,
|
|
4318
|
-
placeholder: v
|
|
4315
|
+
placeholder: v !== "none" && !ne
|
|
4319
4316
|
};
|
|
4320
|
-
return
|
|
4317
|
+
return pt("button", e, {
|
|
4321
4318
|
ref: [
|
|
4322
4319
|
t,
|
|
4323
|
-
|
|
4320
|
+
le,
|
|
4324
4321
|
H((e) => {
|
|
4325
4322
|
g.set("triggerElement", e);
|
|
4326
4323
|
})
|
|
4327
4324
|
],
|
|
4328
|
-
state:
|
|
4325
|
+
state: V,
|
|
4329
4326
|
props: [
|
|
4330
4327
|
te,
|
|
4331
|
-
|
|
4332
|
-
|
|
4328
|
+
ce,
|
|
4329
|
+
B,
|
|
4333
4330
|
{
|
|
4334
|
-
id:
|
|
4331
|
+
id: ie,
|
|
4335
4332
|
tabIndex: E ? 0 : -1,
|
|
4336
4333
|
role: E ? "combobox" : void 0,
|
|
4337
4334
|
"aria-expanded": k ? "true" : "false",
|
|
4338
4335
|
"aria-haspopup": E ? "dialog" : "listbox",
|
|
4339
4336
|
"aria-controls": k ? ee?.id : void 0,
|
|
4340
4337
|
"aria-required": E && x || void 0,
|
|
4341
|
-
"aria-labelledby":
|
|
4342
|
-
onPointerDown:
|
|
4343
|
-
onPointerEnter:
|
|
4338
|
+
"aria-labelledby": ae,
|
|
4339
|
+
onPointerDown: oe,
|
|
4340
|
+
onPointerEnter: oe,
|
|
4344
4341
|
onFocus() {
|
|
4345
4342
|
f(!0), !(L || b) && I.start(0, g.state.forceMount);
|
|
4346
4343
|
},
|
|
@@ -4351,11 +4348,11 @@ var yo = 2, bo = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
4351
4348
|
}
|
|
4352
4349
|
},
|
|
4353
4350
|
onMouseDown(e) {
|
|
4354
|
-
if (L || b || (E || P.set("domReferenceElement", e.currentTarget), g.state.forceMount(),
|
|
4351
|
+
if (L || b || (E || P.set("domReferenceElement", e.currentTarget), g.state.forceMount(), z.current !== "touch" && (g.state.inputRef.current?.focus(), E || e.preventDefault()), k)) return;
|
|
4355
4352
|
let t = Y(e.currentTarget);
|
|
4356
4353
|
function n(e) {
|
|
4357
4354
|
if (!T) return;
|
|
4358
|
-
let t =
|
|
4355
|
+
let t = In(e), n = g.state.positionerElement, r = g.state.listElement;
|
|
4359
4356
|
if (J(T, t) || J(n, t) || J(r, t) || t === T) return;
|
|
4360
4357
|
let i = _o(T), a = e.clientX >= i.left - yo && e.clientX <= i.right + yo, o = e.clientY >= i.top - yo && e.clientY <= i.bottom + yo;
|
|
4361
4358
|
a && o || g.state.setOpen(!1, q("cancel-open", e));
|
|
@@ -4363,11 +4360,11 @@ var yo = 2, bo = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
4363
4360
|
E && t.addEventListener("mouseup", n, { once: !0 });
|
|
4364
4361
|
},
|
|
4365
4362
|
onKeyDown(e) {
|
|
4366
|
-
L || b || (e.key === "ArrowDown" || e.key === "ArrowUp") && (
|
|
4363
|
+
L || b || (e.key === "ArrowDown" || e.key === "ArrowUp") && (Gn(e), g.state.setOpen(!0, q(Rt, e.nativeEvent)), g.state.inputRef.current?.focus());
|
|
4367
4364
|
}
|
|
4368
4365
|
},
|
|
4369
4366
|
m ? m.getValidationProps(c) : c,
|
|
4370
|
-
|
|
4367
|
+
ue
|
|
4371
4368
|
],
|
|
4372
4369
|
stateAttributesMapping: go
|
|
4373
4370
|
});
|
|
@@ -4375,51 +4372,51 @@ var yo = 2, bo = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
4375
4372
|
process.env.NODE_ENV !== "production" && (bo.displayName = "ComboboxTrigger");
|
|
4376
4373
|
//#endregion
|
|
4377
4374
|
//#region node_modules/@base-ui/react/esm/combobox/chips/ComboboxChipsContext.js
|
|
4378
|
-
var xo =
|
|
4375
|
+
var xo = /*#__PURE__*/ N.createContext(void 0);
|
|
4379
4376
|
process.env.NODE_ENV !== "production" && (xo.displayName = "ComboboxChipsContext");
|
|
4380
4377
|
function So() {
|
|
4381
4378
|
return N.useContext(xo);
|
|
4382
4379
|
}
|
|
4383
4380
|
//#endregion
|
|
4384
4381
|
//#region node_modules/@base-ui/react/esm/combobox/positioner/ComboboxPositionerContext.js
|
|
4385
|
-
var Co =
|
|
4382
|
+
var Co = /*#__PURE__*/ N.createContext(void 0);
|
|
4386
4383
|
process.env.NODE_ENV !== "production" && (Co.displayName = "ComboboxPositionerContext");
|
|
4387
4384
|
function wo(e) {
|
|
4388
4385
|
let t = N.useContext(Co);
|
|
4389
|
-
if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ?
|
|
4386
|
+
if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? W(21) : "Base UI: <Combobox.Popup> and <Combobox.Arrow> must be used within the <Combobox.Positioner> component");
|
|
4390
4387
|
return t;
|
|
4391
4388
|
}
|
|
4392
4389
|
//#endregion
|
|
4393
4390
|
//#region node_modules/@base-ui/react/esm/combobox/utils/ComboboxInternalDismissButton.js
|
|
4394
|
-
var To =
|
|
4395
|
-
let n = ja(), { buttonRef: r, getButtonProps: i } =
|
|
4396
|
-
return
|
|
4397
|
-
ref:
|
|
4391
|
+
var To = /*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
4392
|
+
let n = ja(), { buttonRef: r, getButtonProps: i } = pn({ native: !1 });
|
|
4393
|
+
return /*#__PURE__*/ F("span", {
|
|
4394
|
+
ref: Re(t, r),
|
|
4398
4395
|
...i({ onClick: H((e) => {
|
|
4399
|
-
n.state.setOpen(!1, q(
|
|
4396
|
+
n.state.setOpen(!1, q(Et, e.nativeEvent, e.currentTarget));
|
|
4400
4397
|
}) }),
|
|
4401
4398
|
"aria-label": "Dismiss",
|
|
4402
4399
|
tabIndex: void 0,
|
|
4403
|
-
style:
|
|
4400
|
+
style: Xr
|
|
4404
4401
|
});
|
|
4405
4402
|
});
|
|
4406
4403
|
process.env.NODE_ENV !== "production" && (To.displayName = "ComboboxInternalDismissButton");
|
|
4407
4404
|
//#endregion
|
|
4408
4405
|
//#region node_modules/@base-ui/react/esm/combobox/input/ComboboxInput.js
|
|
4409
|
-
var Eo =
|
|
4410
|
-
let { render: n, className: r, disabled: i = !1, id: a, style: o, ...s } = e, { state: c, disabled: l, setTouched: u, setFocused: d, validationMode: f, validation: p } = $a(), { labelId: m } = io(), h = So(), g = !!wo(!0), _ = ja(), { filteredItems: v } = Na(), y = Pa(), b =
|
|
4406
|
+
var Eo = /*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
4407
|
+
let { render: n, className: r, disabled: i = !1, id: a, style: o, ...s } = e, { state: c, disabled: l, setTouched: u, setFocused: d, validationMode: f, validation: p } = $a(), { labelId: m } = io(), h = So(), g = !!wo(!0), _ = ja(), { filteredItems: v } = Na(), y = Pa(), b = Ie(), x = Q(_, $.required), S = Q(_, $.disabled), C = Q(_, $.readOnly), w = Q(_, $.name), ee = Q(_, $.form), te = Q(_, $.selectionMode), T = Q(_, $.autoHighlight), E = Q(_, $.inputProps), D = Q(_, $.triggerProps), O = Q(_, $.open), k = Q(_, $.mounted), A = Q(_, $.selectedValue), j = Q(_, $.popupSide), M = Q(_, $.positionerElement), ne = Q(_, $.id), P = Q(_, $.inline), L = Q(_, $.modal), R = !!T, re = k && M ? j : null, ie = l || S || i, ae = v.length === 0, z = g || P, oe = !z || L, se = Kt(a ?? (z ? void 0 : ne)), B = vo(m, void 0), ce = g ? Ya : c, [le, ue] = N.useState(null), V = N.useRef(!1), de = N.useRef(null), fe = N.useRef(!1), pe = H((e) => {
|
|
4411
4408
|
let t = g || _.state.inline;
|
|
4412
|
-
t && !_.state.hasInputValue && _.state.setInputValue("", q(
|
|
4409
|
+
t && !_.state.hasInputValue && _.state.setInputValue("", q(St)), _.update({
|
|
4413
4410
|
inputElement: e,
|
|
4414
4411
|
inputInsidePopup: t
|
|
4415
4412
|
});
|
|
4416
4413
|
}), me = g || !p ? s : p.getValidationProps(s), he = {
|
|
4417
|
-
...
|
|
4414
|
+
...ce,
|
|
4418
4415
|
open: O,
|
|
4419
|
-
disabled:
|
|
4416
|
+
disabled: ie,
|
|
4420
4417
|
readOnly: C,
|
|
4421
|
-
popupSide:
|
|
4422
|
-
listEmpty:
|
|
4418
|
+
popupSide: re,
|
|
4419
|
+
listEmpty: ae
|
|
4423
4420
|
};
|
|
4424
4421
|
function ge(e) {
|
|
4425
4422
|
if (!h) return;
|
|
@@ -4444,7 +4441,7 @@ var Eo = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
4444
4441
|
type: "keyboard"
|
|
4445
4442
|
}), e.preventDefault()), t;
|
|
4446
4443
|
}
|
|
4447
|
-
let _e =
|
|
4444
|
+
let _e = pt("input", e, {
|
|
4448
4445
|
state: he,
|
|
4449
4446
|
ref: [
|
|
4450
4447
|
t,
|
|
@@ -4456,16 +4453,16 @@ var Eo = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
4456
4453
|
D,
|
|
4457
4454
|
{
|
|
4458
4455
|
type: "text",
|
|
4459
|
-
value: e.value ??
|
|
4456
|
+
value: e.value ?? le ?? y,
|
|
4460
4457
|
"aria-readonly": C || void 0,
|
|
4461
4458
|
"aria-required": x || void 0,
|
|
4462
|
-
"aria-labelledby":
|
|
4463
|
-
disabled:
|
|
4459
|
+
"aria-labelledby": B,
|
|
4460
|
+
disabled: ie,
|
|
4464
4461
|
readOnly: C,
|
|
4465
4462
|
required: te === "none" ? x : void 0,
|
|
4466
4463
|
form: ee,
|
|
4467
4464
|
...te === "none" && w && { name: w },
|
|
4468
|
-
id:
|
|
4465
|
+
id: se,
|
|
4469
4466
|
onFocus() {
|
|
4470
4467
|
if (d(!0), !P || !fe.current) return;
|
|
4471
4468
|
fe.current = !1;
|
|
@@ -4481,20 +4478,20 @@ var Eo = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
4481
4478
|
}
|
|
4482
4479
|
},
|
|
4483
4480
|
onCompositionStart(e) {
|
|
4484
|
-
|
|
4481
|
+
wn || (V.current = !0, ue(e.currentTarget.value));
|
|
4485
4482
|
},
|
|
4486
4483
|
onCompositionEnd(e) {
|
|
4487
|
-
|
|
4484
|
+
V.current = !1;
|
|
4488
4485
|
let t = e.currentTarget.value;
|
|
4489
|
-
|
|
4486
|
+
ue(null), _.state.setInputValue(t, q(jt, e.nativeEvent));
|
|
4490
4487
|
},
|
|
4491
4488
|
onChange(e) {
|
|
4492
|
-
let t = e.nativeEvent.inputType, n = !t || t === "insertReplacementText", r =
|
|
4493
|
-
if (
|
|
4489
|
+
let t = e.nativeEvent.inputType, n = !t || t === "insertReplacementText", r = V.current || !n;
|
|
4490
|
+
if (V.current) {
|
|
4494
4491
|
let t = e.currentTarget.value;
|
|
4495
|
-
|
|
4492
|
+
ue(t), t === "" && !_.state.openOnInputClick && !_.state.inputInsidePopup && _.state.setOpen(!1, q(Mt, e.nativeEvent));
|
|
4496
4493
|
let n = t.trim(), i = R && n !== "";
|
|
4497
|
-
!C && !
|
|
4494
|
+
!C && !ie && n && r && (_.state.setOpen(!0, q(jt, e.nativeEvent)), R || _.state.setIndices({
|
|
4498
4495
|
activeIndex: null,
|
|
4499
4496
|
selectedIndex: null,
|
|
4500
4497
|
type: _.state.keyboardActiveRef.current ? "keyboard" : "pointer"
|
|
@@ -4505,11 +4502,11 @@ var Eo = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
4505
4502
|
});
|
|
4506
4503
|
return;
|
|
4507
4504
|
}
|
|
4508
|
-
_.state.setInputValue(e.currentTarget.value, q(
|
|
4509
|
-
let i = e.currentTarget.value === "", a = q(
|
|
4505
|
+
_.state.setInputValue(e.currentTarget.value, q(jt, e.nativeEvent));
|
|
4506
|
+
let i = e.currentTarget.value === "", a = q(Mt, e.nativeEvent);
|
|
4510
4507
|
i && !_.state.inputInsidePopup && (te === "single" && _.state.setSelectedValue(null, a), _.state.openOnInputClick || _.state.setOpen(!1, a));
|
|
4511
4508
|
let o = e.currentTarget.value.trim();
|
|
4512
|
-
!C && !
|
|
4509
|
+
!C && !ie && o && r && (_.state.setOpen(!0, q(jt, e.nativeEvent)), R || _.state.setIndices({
|
|
4513
4510
|
activeIndex: null,
|
|
4514
4511
|
selectedIndex: null,
|
|
4515
4512
|
type: _.state.keyboardActiveRef.current ? "keyboard" : "pointer"
|
|
@@ -4520,23 +4517,23 @@ var Eo = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
4520
4517
|
});
|
|
4521
4518
|
},
|
|
4522
4519
|
onKeyDown(e) {
|
|
4523
|
-
if (
|
|
4520
|
+
if (ie || C || e.ctrlKey || e.shiftKey || e.altKey || e.metaKey) return;
|
|
4524
4521
|
_.state.keyboardActiveRef.current = !0;
|
|
4525
4522
|
let t = e.currentTarget, n = t.scrollWidth - t.clientWidth, r = b === "rtl";
|
|
4526
4523
|
if (e.key === "Home") {
|
|
4527
|
-
|
|
4528
|
-
let n =
|
|
4524
|
+
Gn(e);
|
|
4525
|
+
let n = Sn && r ? t.value.length : 0;
|
|
4529
4526
|
t.setSelectionRange(n, n), t.scrollLeft = 0;
|
|
4530
4527
|
return;
|
|
4531
4528
|
}
|
|
4532
4529
|
if (e.key === "End") {
|
|
4533
|
-
|
|
4534
|
-
let i =
|
|
4530
|
+
Gn(e);
|
|
4531
|
+
let i = Sn && r ? 0 : t.value.length;
|
|
4535
4532
|
t.setSelectionRange(i, i), t.scrollLeft = r ? -n : n;
|
|
4536
4533
|
return;
|
|
4537
4534
|
}
|
|
4538
4535
|
if (!k && e.key === "Escape") {
|
|
4539
|
-
let t = te === "multiple" && Array.isArray(A) ? A.length === 0 : A === null, n = q(
|
|
4536
|
+
let t = te === "multiple" && Array.isArray(A) ? A.length === 0 : A === null, n = q(Lt, e.nativeEvent), r = te === "multiple" ? [] : null;
|
|
4540
4537
|
_.state.setInputValue("", n), _.state.setSelectedValue(r, n), !t && !_.state.inline && !n.isPropagationAllowed && e.stopPropagation();
|
|
4541
4538
|
return;
|
|
4542
4539
|
}
|
|
@@ -4546,7 +4543,7 @@ var Eo = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
4546
4543
|
activeIndex: null,
|
|
4547
4544
|
selectedIndex: null,
|
|
4548
4545
|
type: _.state.keyboardActiveRef.current ? "keyboard" : "pointer"
|
|
4549
|
-
}), _.state.setSelectedValue(r, q(
|
|
4546
|
+
}), _.state.setSelectedValue(r, q(St, e.nativeEvent));
|
|
4550
4547
|
return;
|
|
4551
4548
|
}
|
|
4552
4549
|
let i = h?.highlightedChipIndex !== void 0, a = ge(e);
|
|
@@ -4554,10 +4551,10 @@ var Eo = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
4554
4551
|
let t = _.state.activeIndex, n = e.nativeEvent;
|
|
4555
4552
|
if (t === null) {
|
|
4556
4553
|
if (P) return;
|
|
4557
|
-
_.state.setOpen(!1, q(
|
|
4554
|
+
_.state.setOpen(!1, q(St, n));
|
|
4558
4555
|
return;
|
|
4559
4556
|
}
|
|
4560
|
-
|
|
4557
|
+
Gn(e);
|
|
4561
4558
|
let r = _.state.listRef.current[t];
|
|
4562
4559
|
r && (_.state.selectionEventRef.current = n, r.click(), _.state.selectionEventRef.current = null);
|
|
4563
4560
|
}
|
|
@@ -4573,40 +4570,40 @@ var Eo = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
4573
4570
|
],
|
|
4574
4571
|
stateAttributesMapping: go
|
|
4575
4572
|
});
|
|
4576
|
-
return
|
|
4573
|
+
return /*#__PURE__*/ I(N.Fragment, { children: [O && oe && /*#__PURE__*/ F(To, { ref: _.state.startDismissRef }), _e] });
|
|
4577
4574
|
});
|
|
4578
4575
|
process.env.NODE_ENV !== "production" && (Eo.displayName = "ComboboxInput");
|
|
4579
4576
|
//#endregion
|
|
4580
4577
|
//#region node_modules/@base-ui/react/esm/combobox/utils/handleInputPress.js
|
|
4581
4578
|
function Do(e, t, n, r, i) {
|
|
4582
4579
|
if (e.baseUIHandlerPrevented || r) return;
|
|
4583
|
-
let a =
|
|
4584
|
-
o !== e.currentTarget && (i?.(o) ||
|
|
4580
|
+
let a = In(e.nativeEvent), o = w(a) ? a : null;
|
|
4581
|
+
o !== e.currentTarget && (i?.(o) || Bn(o)) || (e.preventDefault(), !n && (t.state.inputRef.current?.focus(), t.state.openOnInputClick && t.state.setOpen(!0, q(Ft, e.nativeEvent))));
|
|
4585
4582
|
}
|
|
4586
4583
|
//#endregion
|
|
4587
4584
|
//#region node_modules/@base-ui/react/esm/combobox/clear/ComboboxClear.js
|
|
4588
4585
|
var Oo = {
|
|
4589
|
-
...
|
|
4586
|
+
...an,
|
|
4590
4587
|
...Sa
|
|
4591
|
-
}, ko =
|
|
4588
|
+
}, ko = /*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
4592
4589
|
let { render: n, className: r, disabled: i = !1, nativeButton: a = !0, keepMounted: o = !1, style: s, ...c } = e, { disabled: l } = $a(), u = ja(), d = Q(u, $.selectionMode), f = Q(u, $.disabled), p = Q(u, $.readOnly), m = Q(u, $.open), h = Q(u, $.selectedValue), g = Q(u, $.hasSelectionChips), _ = Pa(), v = !1;
|
|
4593
4590
|
v = d === "none" ? _ !== "" : d === "single" ? h != null : g;
|
|
4594
|
-
let y = l || f || i, { buttonRef: b, getButtonProps: x } =
|
|
4591
|
+
let y = l || f || i, { buttonRef: b, getButtonProps: x } = pn({
|
|
4595
4592
|
native: a,
|
|
4596
4593
|
disabled: y
|
|
4597
|
-
}), { mounted: S, transitionStatus: C, setMounted: w } =
|
|
4594
|
+
}), { mounted: S, transitionStatus: C, setMounted: w } = sn(v), ee = {
|
|
4598
4595
|
disabled: y,
|
|
4599
4596
|
open: m,
|
|
4600
4597
|
transitionStatus: C
|
|
4601
4598
|
};
|
|
4602
|
-
|
|
4599
|
+
jr({
|
|
4603
4600
|
open: v,
|
|
4604
4601
|
ref: u.state.clearRef,
|
|
4605
4602
|
onComplete() {
|
|
4606
4603
|
v || w(!1);
|
|
4607
4604
|
}
|
|
4608
4605
|
});
|
|
4609
|
-
let te =
|
|
4606
|
+
let te = pt("button", e, {
|
|
4610
4607
|
state: ee,
|
|
4611
4608
|
ref: [
|
|
4612
4609
|
t,
|
|
@@ -4623,10 +4620,10 @@ var Oo = {
|
|
|
4623
4620
|
onClick(e) {
|
|
4624
4621
|
if (y || p) return;
|
|
4625
4622
|
let t = u.state.keyboardActiveRef;
|
|
4626
|
-
u.state.setInputValue("", q(
|
|
4623
|
+
u.state.setInputValue("", q(Dt, e.nativeEvent)), d === "none" ? u.state.setIndices({
|
|
4627
4624
|
activeIndex: null,
|
|
4628
4625
|
type: t.current ? "keyboard" : "pointer"
|
|
4629
|
-
}) : (u.state.setSelectedValue(Array.isArray(h) ? [] : null, q(
|
|
4626
|
+
}) : (u.state.setSelectedValue(Array.isArray(h) ? [] : null, q(Dt, e.nativeEvent)), u.state.setIndices({
|
|
4630
4627
|
activeIndex: null,
|
|
4631
4628
|
selectedIndex: null,
|
|
4632
4629
|
type: t.current ? "keyboard" : "pointer"
|
|
@@ -4643,14 +4640,14 @@ var Oo = {
|
|
|
4643
4640
|
process.env.NODE_ENV !== "production" && (ko.displayName = "ComboboxClear");
|
|
4644
4641
|
//#endregion
|
|
4645
4642
|
//#region node_modules/@base-ui/react/esm/combobox/collection/GroupCollectionContext.js
|
|
4646
|
-
var Ao =
|
|
4643
|
+
var Ao = /*#__PURE__*/ N.createContext(null);
|
|
4647
4644
|
process.env.NODE_ENV !== "production" && (Ao.displayName = "GroupCollectionContext");
|
|
4648
4645
|
function jo() {
|
|
4649
4646
|
return N.useContext(Ao);
|
|
4650
4647
|
}
|
|
4651
4648
|
function Mo(e) {
|
|
4652
4649
|
let { children: t, items: n } = e, r = N.useMemo(() => ({ items: n }), [n]);
|
|
4653
|
-
return
|
|
4650
|
+
return /*#__PURE__*/ F(Ao.Provider, {
|
|
4654
4651
|
value: r,
|
|
4655
4652
|
children: t
|
|
4656
4653
|
});
|
|
@@ -4659,17 +4656,17 @@ function Mo(e) {
|
|
|
4659
4656
|
//#region node_modules/@base-ui/react/esm/combobox/collection/ComboboxCollection.js
|
|
4660
4657
|
function No(e) {
|
|
4661
4658
|
let { children: t } = e, { filteredItems: n } = Na(), r = jo(), i = r ? r.items : n;
|
|
4662
|
-
return i ?
|
|
4659
|
+
return i ? /*#__PURE__*/ F(N.Fragment, { children: i.map(t) }) : null;
|
|
4663
4660
|
}
|
|
4664
4661
|
//#endregion
|
|
4665
4662
|
//#region node_modules/@base-ui/react/esm/combobox/list/ComboboxList.js
|
|
4666
|
-
var Po =
|
|
4663
|
+
var Po = /*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
4667
4664
|
var n;
|
|
4668
4665
|
let { render: r, className: i, style: a, children: o, ...s } = e, c = ja(), l = Ma(), u = !!wo(!0), { filteredItems: d, hasItems: f } = Na(), p = Q(c, $.selectionMode), m = Q(c, $.grid), h = Q(c, $.popupProps), g = Q(c, $.virtualized), _ = p === "multiple", v = d.length === 0, y = H((e) => {
|
|
4669
4666
|
c.set("positionerElement", e);
|
|
4670
4667
|
}), b = H((e) => {
|
|
4671
4668
|
c.set("listElement", e);
|
|
4672
|
-
}), x = N.useMemo(() => typeof o == "function" ? n ||=
|
|
4669
|
+
}), x = N.useMemo(() => typeof o == "function" ? n ||= /*#__PURE__*/ F(No, { children: o }) : o, [o]), S = { empty: v }, C = l.useState("floatingId"), w = pt("div", e, {
|
|
4673
4670
|
state: S,
|
|
4674
4671
|
ref: [
|
|
4675
4672
|
t,
|
|
@@ -4688,7 +4685,7 @@ var Po = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
4688
4685
|
if (!(c.state.disabled || c.state.readOnly) && e.key === "Enter") {
|
|
4689
4686
|
let t = c.state.activeIndex;
|
|
4690
4687
|
if (t == null) return;
|
|
4691
|
-
|
|
4688
|
+
Gn(e);
|
|
4692
4689
|
let n = e.nativeEvent, r = c.state.listRef.current[t];
|
|
4693
4690
|
r && (c.state.selectionEventRef.current = n, r.click(), c.state.selectionEventRef.current = null);
|
|
4694
4691
|
}
|
|
@@ -4703,7 +4700,7 @@ var Po = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
4703
4700
|
s
|
|
4704
4701
|
]
|
|
4705
4702
|
});
|
|
4706
|
-
return g ? w :
|
|
4703
|
+
return g ? w : /*#__PURE__*/ F(je, {
|
|
4707
4704
|
elementsRef: c.state.listRef,
|
|
4708
4705
|
labelsRef: f ? void 0 : c.state.labelsRef,
|
|
4709
4706
|
children: w
|
|
@@ -4722,9 +4719,9 @@ function Io(e) {
|
|
|
4722
4719
|
return n;
|
|
4723
4720
|
}
|
|
4724
4721
|
function Lo() {
|
|
4725
|
-
let e =
|
|
4722
|
+
let e = Fr(), t = N.useRef(null);
|
|
4726
4723
|
return N.useEffect(() => {
|
|
4727
|
-
if (
|
|
4724
|
+
if (xn) return;
|
|
4728
4725
|
let n = t.current;
|
|
4729
4726
|
if (n == null) return;
|
|
4730
4727
|
let r = Io(n);
|
|
@@ -4739,20 +4736,20 @@ function Lo() {
|
|
|
4739
4736
|
}
|
|
4740
4737
|
//#endregion
|
|
4741
4738
|
//#region node_modules/@base-ui/react/esm/combobox/portal/ComboboxPortalContext.js
|
|
4742
|
-
var Ro =
|
|
4739
|
+
var Ro = /*#__PURE__*/ N.createContext(void 0);
|
|
4743
4740
|
process.env.NODE_ENV !== "production" && (Ro.displayName = "ComboboxPortalContext");
|
|
4744
4741
|
function zo() {
|
|
4745
4742
|
let e = N.useContext(Ro);
|
|
4746
|
-
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ?
|
|
4743
|
+
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? W(20) : "Base UI: <Combobox.Portal> is missing.");
|
|
4747
4744
|
return e;
|
|
4748
4745
|
}
|
|
4749
4746
|
//#endregion
|
|
4750
4747
|
//#region node_modules/@base-ui/react/esm/combobox/portal/ComboboxPortal.js
|
|
4751
|
-
var Bo =
|
|
4748
|
+
var Bo = /*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
4752
4749
|
let { keepMounted: n = !1, ...r } = e, i = ja(), a = Q(i, $.mounted), o = Q(i, $.forceMounted);
|
|
4753
|
-
return a || n || o ?
|
|
4750
|
+
return a || n || o ? /*#__PURE__*/ F(Ro.Provider, {
|
|
4754
4751
|
value: n,
|
|
4755
|
-
children:
|
|
4752
|
+
children: /*#__PURE__*/ F(bi, {
|
|
4756
4753
|
ref: t,
|
|
4757
4754
|
...r
|
|
4758
4755
|
})
|
|
@@ -4825,30 +4822,30 @@ function Ko(e, t, n) {
|
|
|
4825
4822
|
function qo(e) {
|
|
4826
4823
|
let { anchor: t, positionMethod: n = "absolute", side: r = "bottom", sideOffset: i = 0, align: a = "center", alignOffset: o = 0, collisionBoundary: s, collisionPadding: c = 5, sticky: l = !1, arrowPadding: d = 5, disableAnchorTracking: f = !1, keepMounted: p = !1, floatingRootContext: h, mounted: g, collisionAvoidance: _, shiftCrossAxis: v = !1, nodeId: y, adaptiveOrigin: b, lazyFlip: w = !1, externalTree: E } = e, [O, k] = N.useState(null);
|
|
4827
4824
|
!g && O !== null && k(null);
|
|
4828
|
-
let j = _.side || "flip", M = _.align || "flip", ne = _.fallbackAxisSide || "end", P = typeof t == "function" ? t : void 0, F = H(P), I = P ? F : t, L =
|
|
4825
|
+
let j = _.side || "flip", M = _.align || "flip", ne = _.fallbackAxisSide || "end", P = typeof t == "function" ? t : void 0, F = H(P), I = P ? F : t, L = Kr(t), R = Kr(g), re = Ie() === "rtl", ie = O || {
|
|
4829
4826
|
top: "top",
|
|
4830
4827
|
right: "right",
|
|
4831
4828
|
bottom: "bottom",
|
|
4832
4829
|
left: "left",
|
|
4833
|
-
"inline-end":
|
|
4834
|
-
"inline-start":
|
|
4835
|
-
}[r],
|
|
4836
|
-
typeof
|
|
4837
|
-
top:
|
|
4838
|
-
right:
|
|
4839
|
-
bottom:
|
|
4840
|
-
left:
|
|
4841
|
-
} :
|
|
4842
|
-
top: (
|
|
4843
|
-
right: (
|
|
4844
|
-
bottom: (
|
|
4845
|
-
left: (
|
|
4830
|
+
"inline-end": re ? "left" : "right",
|
|
4831
|
+
"inline-start": re ? "right" : "left"
|
|
4832
|
+
}[r], ae = a === "center" ? ie : `${ie}-${a}`, z = c, oe = +(r === "bottom"), se = +(r === "top"), B = +(r === "right"), ce = +(r === "left");
|
|
4833
|
+
typeof z == "number" ? z = {
|
|
4834
|
+
top: z + oe,
|
|
4835
|
+
right: z + ce,
|
|
4836
|
+
bottom: z + se,
|
|
4837
|
+
left: z + B
|
|
4838
|
+
} : z &&= {
|
|
4839
|
+
top: (z.top || 0) + oe,
|
|
4840
|
+
right: (z.right || 0) + ce,
|
|
4841
|
+
bottom: (z.bottom || 0) + se,
|
|
4842
|
+
left: (z.left || 0) + B
|
|
4846
4843
|
};
|
|
4847
|
-
let
|
|
4844
|
+
let le = {
|
|
4848
4845
|
boundary: s === "clipping-ancestors" ? "clippingAncestors" : s,
|
|
4849
|
-
padding:
|
|
4850
|
-
},
|
|
4851
|
-
let t = Ko(e, r,
|
|
4846
|
+
padding: z
|
|
4847
|
+
}, ue = N.useRef(null), V = Kr(i), de = Kr(o), fe = [m((e) => {
|
|
4848
|
+
let t = Ko(e, r, re), n = typeof V.current == "function" ? V.current(t) : V.current, i = typeof de.current == "function" ? de.current(t) : de.current;
|
|
4852
4849
|
return {
|
|
4853
4850
|
mainAxis: n,
|
|
4854
4851
|
crossAxis: i,
|
|
@@ -4857,23 +4854,23 @@ function qo(e) {
|
|
|
4857
4854
|
}, [
|
|
4858
4855
|
typeof i == "function" ? 0 : i,
|
|
4859
4856
|
typeof o == "function" ? 0 : o,
|
|
4860
|
-
|
|
4857
|
+
re,
|
|
4861
4858
|
r
|
|
4862
4859
|
])], pe = M === "none" && j !== "shift", me = !pe && (l || v || j === "shift"), he = j === "none" ? null : ee({
|
|
4863
|
-
...
|
|
4860
|
+
...le,
|
|
4864
4861
|
padding: {
|
|
4865
|
-
top:
|
|
4866
|
-
right:
|
|
4867
|
-
bottom:
|
|
4868
|
-
left:
|
|
4862
|
+
top: z.top + 1,
|
|
4863
|
+
right: z.right + 1,
|
|
4864
|
+
bottom: z.bottom + 1,
|
|
4865
|
+
left: z.left + 1
|
|
4869
4866
|
},
|
|
4870
4867
|
mainAxis: !v && j === "flip",
|
|
4871
|
-
crossAxis: M === "flip"
|
|
4868
|
+
crossAxis: M === "flip" && "alignment",
|
|
4872
4869
|
fallbackAxisSideDirection: ne
|
|
4873
4870
|
}), ge = pe ? null : te((e) => {
|
|
4874
4871
|
let t = Y(e.elements.floating).documentElement;
|
|
4875
4872
|
return {
|
|
4876
|
-
...
|
|
4873
|
+
...le,
|
|
4877
4874
|
rootBoundary: v ? {
|
|
4878
4875
|
x: 0,
|
|
4879
4876
|
y: 0,
|
|
@@ -4883,20 +4880,20 @@ function qo(e) {
|
|
|
4883
4880
|
mainAxis: M !== "none",
|
|
4884
4881
|
crossAxis: me,
|
|
4885
4882
|
limiter: l || v ? void 0 : x((e) => {
|
|
4886
|
-
if (!
|
|
4887
|
-
let { width: t, height: n } =
|
|
4883
|
+
if (!ue.current) return {};
|
|
4884
|
+
let { width: t, height: n } = ue.current.getBoundingClientRect(), r = S(u(e.placement)), i = r === "y" ? t : n, a = r === "y" ? z.left + z.right : z.top + z.bottom;
|
|
4888
4885
|
return { offset: i / 2 + a / 2 };
|
|
4889
4886
|
})
|
|
4890
4887
|
};
|
|
4891
4888
|
}, [
|
|
4892
|
-
|
|
4889
|
+
le,
|
|
4893
4890
|
l,
|
|
4894
4891
|
v,
|
|
4895
|
-
|
|
4892
|
+
z,
|
|
4896
4893
|
M
|
|
4897
4894
|
]);
|
|
4898
4895
|
j === "shift" || M === "shift" || a === "center" ? fe.push(ge, he) : fe.push(he, ge), fe.push(D({
|
|
4899
|
-
...
|
|
4896
|
+
...le,
|
|
4900
4897
|
apply({ elements: { floating: e }, availableWidth: t, availableHeight: n, rects: r }) {
|
|
4901
4898
|
if (!R.current) return;
|
|
4902
4899
|
let i = e.style;
|
|
@@ -4905,13 +4902,13 @@ function qo(e) {
|
|
|
4905
4902
|
i.setProperty("--anchor-width", `${u}px`), i.setProperty("--anchor-height", `${d}px`);
|
|
4906
4903
|
}
|
|
4907
4904
|
}), Ho(() => ({
|
|
4908
|
-
element:
|
|
4905
|
+
element: ue.current || Y(ue.current).createElement("div"),
|
|
4909
4906
|
padding: d,
|
|
4910
4907
|
offsetParent: "floating"
|
|
4911
4908
|
}), [d]), {
|
|
4912
4909
|
name: "transformOrigin",
|
|
4913
4910
|
fn(e) {
|
|
4914
|
-
let { elements: t, middlewareData: n, placement: a, rects: o, y: s } = e, c = u(a), l = S(c), d =
|
|
4911
|
+
let { elements: t, middlewareData: n, placement: a, rects: o, y: s } = e, c = u(a), l = S(c), d = ue.current, f = n.arrow?.x || 0, p = n.arrow?.y || 0, m = d?.clientWidth || 0, h = d?.clientHeight || 0, g = f + m / 2, _ = p + h / 2, v = Math.abs(n.shift?.y || 0), y = o.reference.height / 2, b = typeof i == "function" ? i(Ko(e, r, re)) : i, x = v > b, C = {
|
|
4915
4912
|
top: `${g}px calc(100% + ${b}px)`,
|
|
4916
4913
|
bottom: `${g}px ${-b}px`,
|
|
4917
4914
|
left: `calc(100% + ${b}px) ${_}px`,
|
|
@@ -4933,7 +4930,7 @@ function qo(e) {
|
|
|
4933
4930
|
}), [f]), { refs: ve, elements: ye, x: be, y: xe, middlewareData: Se, update: Ce, placement: we, context: Te, isPositioned: Ee, floatingStyles: De } = ea({
|
|
4934
4931
|
rootContext: h,
|
|
4935
4932
|
open: p ? g : void 0,
|
|
4936
|
-
placement:
|
|
4933
|
+
placement: ae,
|
|
4937
4934
|
middleware: fe,
|
|
4938
4935
|
strategy: n,
|
|
4939
4936
|
whileElementsMounted: p ? void 0 : (...e) => C(...e, _e),
|
|
@@ -4986,7 +4983,7 @@ function qo(e) {
|
|
|
4986
4983
|
Ce,
|
|
4987
4984
|
_e
|
|
4988
4985
|
]);
|
|
4989
|
-
let Ne = u(we),
|
|
4986
|
+
let Ne = u(we), Pe = Go(r, Ne, re), Fe = A(we) || "center", Le = !!Se.hide?.referenceHidden;
|
|
4990
4987
|
U(() => {
|
|
4991
4988
|
w && g && Ee && k(Ne);
|
|
4992
4989
|
}, [
|
|
@@ -4995,18 +4992,18 @@ function qo(e) {
|
|
|
4995
4992
|
Ee,
|
|
4996
4993
|
Ne
|
|
4997
4994
|
]);
|
|
4998
|
-
let
|
|
4995
|
+
let W = N.useMemo(() => ({
|
|
4999
4996
|
position: "absolute",
|
|
5000
4997
|
top: Se.arrow?.y,
|
|
5001
4998
|
left: Se.arrow?.x
|
|
5002
|
-
}), [Se.arrow]),
|
|
4999
|
+
}), [Se.arrow]), Re = Se.arrow?.centerOffset !== 0;
|
|
5003
5000
|
return N.useMemo(() => ({
|
|
5004
5001
|
positionerStyles: je,
|
|
5005
|
-
arrowStyles:
|
|
5006
|
-
arrowRef:
|
|
5007
|
-
arrowUncentered:
|
|
5008
|
-
side:
|
|
5009
|
-
align:
|
|
5002
|
+
arrowStyles: W,
|
|
5003
|
+
arrowRef: ue,
|
|
5004
|
+
arrowUncentered: Re,
|
|
5005
|
+
side: Pe,
|
|
5006
|
+
align: Fe,
|
|
5010
5007
|
physicalSide: Ne,
|
|
5011
5008
|
anchorHidden: Le,
|
|
5012
5009
|
refs: ve,
|
|
@@ -5015,11 +5012,11 @@ function qo(e) {
|
|
|
5015
5012
|
update: Ce
|
|
5016
5013
|
}), [
|
|
5017
5014
|
je,
|
|
5015
|
+
W,
|
|
5016
|
+
ue,
|
|
5018
5017
|
Re,
|
|
5019
|
-
|
|
5020
|
-
ze,
|
|
5018
|
+
Pe,
|
|
5021
5019
|
Fe,
|
|
5022
|
-
Ie,
|
|
5023
5020
|
Ne,
|
|
5024
5021
|
Le,
|
|
5025
5022
|
ve,
|
|
@@ -5034,13 +5031,13 @@ function Jo(e) {
|
|
|
5034
5031
|
//#endregion
|
|
5035
5032
|
//#region node_modules/@base-ui/react/esm/utils/getDisabledMountTransitionStyles.js
|
|
5036
5033
|
function Yo(e) {
|
|
5037
|
-
return e === "starting" ?
|
|
5034
|
+
return e === "starting" ? pi : Ye;
|
|
5038
5035
|
}
|
|
5039
5036
|
//#endregion
|
|
5040
5037
|
//#region node_modules/@base-ui/react/esm/utils/usePositioner.js
|
|
5041
5038
|
function Xo(e, t, { styles: n, transitionStatus: r, props: i, refs: a, hidden: o, inert: s = !1 }) {
|
|
5042
5039
|
let c = { ...n };
|
|
5043
|
-
return s && (c.pointerEvents = "none"),
|
|
5040
|
+
return s && (c.pointerEvents = "none"), pt("div", e, {
|
|
5044
5041
|
state: t,
|
|
5045
5042
|
ref: a,
|
|
5046
5043
|
props: [
|
|
@@ -5071,12 +5068,12 @@ function Qo(e, t, n, r) {
|
|
|
5071
5068
|
e,
|
|
5072
5069
|
t,
|
|
5073
5070
|
n
|
|
5074
|
-
]),
|
|
5071
|
+
]), Wr(e && (!t || i), r);
|
|
5075
5072
|
}
|
|
5076
5073
|
//#endregion
|
|
5077
5074
|
//#region node_modules/@base-ui/react/esm/combobox/positioner/ComboboxPositioner.js
|
|
5078
|
-
var $o =
|
|
5079
|
-
let { render: n, className: r, anchor: i, positionMethod: a = "absolute", side: o = "bottom", align: s = "center", sideOffset: c = 0, alignOffset: l = 0, collisionBoundary: u = "clipping-ancestors", collisionPadding: d = 5, arrowPadding: f = 5, sticky: p = !1, disableAnchorTracking: m = !1, collisionAvoidance: h =
|
|
5075
|
+
var $o = /*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
5076
|
+
let { render: n, className: r, anchor: i, positionMethod: a = "absolute", side: o = "bottom", align: s = "center", sideOffset: c = 0, alignOffset: l = 0, collisionBoundary: u = "clipping-ancestors", collisionPadding: d = 5, arrowPadding: f = 5, sticky: p = !1, disableAnchorTracking: m = !1, collisionAvoidance: h = mi, style: g, ..._ } = e, v = ja(), { filteredItems: y } = Na(), b = Ma(), x = zo(), S = Q(v, $.modal), C = Q(v, $.open), w = Q(v, $.mounted), ee = Q(v, $.openMethod), te = Q(v, $.positionerElement), T = Q(v, $.triggerElement), E = Q(v, $.inputElement), D = Q(v, $.inputGroupElement), O = Q(v, $.inputInsidePopup), k = Q(v, $.transitionStatus), A = y.length === 0, j = qo({
|
|
5080
5077
|
anchor: i ?? (O ? T : D ?? E),
|
|
5081
5078
|
floatingRootContext: b,
|
|
5082
5079
|
positionMethod: a,
|
|
@@ -5115,9 +5112,9 @@ var $o = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
5115
5112
|
hidden: !w,
|
|
5116
5113
|
inert: !C
|
|
5117
5114
|
});
|
|
5118
|
-
return
|
|
5115
|
+
return /*#__PURE__*/ I(Co.Provider, {
|
|
5119
5116
|
value: j,
|
|
5120
|
-
children: [w && S &&
|
|
5117
|
+
children: [w && S && /*#__PURE__*/ F(Ea, {
|
|
5121
5118
|
inert: Ta(!C),
|
|
5122
5119
|
cutout: D ?? E ?? T
|
|
5123
5120
|
}), N]
|
|
@@ -5128,17 +5125,17 @@ process.env.NODE_ENV !== "production" && ($o.displayName = "ComboboxPositioner")
|
|
|
5128
5125
|
//#region node_modules/@base-ui/react/esm/combobox/popup/ComboboxPopup.js
|
|
5129
5126
|
var es = {
|
|
5130
5127
|
...wa,
|
|
5131
|
-
...
|
|
5132
|
-
}, ts =
|
|
5128
|
+
...an
|
|
5129
|
+
}, ts = /*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
5133
5130
|
let { render: n, className: r, style: i, initialFocus: a, finalFocus: o, ...s } = e, c = ja(), l = wo(), u = Ma(), { filteredItems: d } = Na(), f = Q(c, $.mounted), p = Q(c, $.open), m = Q(c, $.openMethod), h = Q(c, $.transitionStatus), g = Q(c, $.inputInsidePopup), _ = Q(c, $.inputElement), v = Q(c, $.modal), y = d.length === 0;
|
|
5134
|
-
|
|
5131
|
+
jr({
|
|
5135
5132
|
open: p,
|
|
5136
5133
|
ref: c.state.popupRef,
|
|
5137
5134
|
onComplete() {
|
|
5138
5135
|
p && c.state.onOpenChangeComplete(!0);
|
|
5139
5136
|
}
|
|
5140
5137
|
});
|
|
5141
|
-
let b =
|
|
5138
|
+
let b = pt("div", e, {
|
|
5142
5139
|
state: {
|
|
5143
5140
|
open: p,
|
|
5144
5141
|
side: l.side,
|
|
@@ -5153,7 +5150,7 @@ var es = {
|
|
|
5153
5150
|
role: g ? "dialog" : "presentation",
|
|
5154
5151
|
tabIndex: -1,
|
|
5155
5152
|
onFocus(e) {
|
|
5156
|
-
let t =
|
|
5153
|
+
let t = In(e.nativeEvent);
|
|
5157
5154
|
m !== "touch" && (J(c.state.listElement, t) || t === e.currentTarget) && c.state.inputRef.current?.focus();
|
|
5158
5155
|
}
|
|
5159
5156
|
},
|
|
@@ -5164,7 +5161,7 @@ var es = {
|
|
|
5164
5161
|
}), x = a === void 0 ? g ? (e) => e === "touch" ? c.state.popupRef.current : _ : !1 : a, S;
|
|
5165
5162
|
S = o ?? (g ? void 0 : !1);
|
|
5166
5163
|
let C = !g || v;
|
|
5167
|
-
return
|
|
5164
|
+
return /*#__PURE__*/ F(Pi, {
|
|
5168
5165
|
context: u,
|
|
5169
5166
|
disabled: !f,
|
|
5170
5167
|
modal: C,
|
|
@@ -5172,22 +5169,22 @@ var es = {
|
|
|
5172
5169
|
initialFocus: x,
|
|
5173
5170
|
returnFocus: S,
|
|
5174
5171
|
getInsideElements: () => [c.state.startDismissRef.current, c.state.endDismissRef.current],
|
|
5175
|
-
children:
|
|
5172
|
+
children: /*#__PURE__*/ I(N.Fragment, { children: [b, C && /*#__PURE__*/ F(To, { ref: c.state.endDismissRef })] })
|
|
5176
5173
|
});
|
|
5177
5174
|
});
|
|
5178
5175
|
process.env.NODE_ENV !== "production" && (ts.displayName = "ComboboxPopup");
|
|
5179
5176
|
//#endregion
|
|
5180
5177
|
//#region node_modules/@base-ui/react/esm/combobox/group/ComboboxGroupContext.js
|
|
5181
|
-
var ns =
|
|
5178
|
+
var ns = /*#__PURE__*/ N.createContext(void 0);
|
|
5182
5179
|
process.env.NODE_ENV !== "production" && (ns.displayName = "ComboboxGroupContext");
|
|
5183
5180
|
function rs() {
|
|
5184
5181
|
let e = N.useContext(ns);
|
|
5185
|
-
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ?
|
|
5182
|
+
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? W(18) : "Base UI: ComboboxGroupContext is missing. ComboboxGroup parts must be placed within <Combobox.Group>.");
|
|
5186
5183
|
return e;
|
|
5187
5184
|
}
|
|
5188
5185
|
//#endregion
|
|
5189
5186
|
//#region node_modules/@base-ui/react/esm/combobox/group/ComboboxGroup.js
|
|
5190
|
-
var is =
|
|
5187
|
+
var is = /*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
5191
5188
|
let { render: n, className: r, style: i, items: a, ...o } = e, [s, c] = N.useState(), l = N.useMemo(() => ({
|
|
5192
5189
|
labelId: s,
|
|
5193
5190
|
setLabelId: c,
|
|
@@ -5196,17 +5193,17 @@ var is = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
5196
5193
|
s,
|
|
5197
5194
|
c,
|
|
5198
5195
|
a
|
|
5199
|
-
]), u =
|
|
5196
|
+
]), u = pt("div", e, {
|
|
5200
5197
|
ref: t,
|
|
5201
5198
|
props: [{
|
|
5202
5199
|
role: "group",
|
|
5203
5200
|
"aria-labelledby": s
|
|
5204
5201
|
}, o]
|
|
5205
|
-
}), d =
|
|
5202
|
+
}), d = /*#__PURE__*/ F(ns.Provider, {
|
|
5206
5203
|
value: l,
|
|
5207
5204
|
children: u
|
|
5208
5205
|
});
|
|
5209
|
-
return a ?
|
|
5206
|
+
return a ? /*#__PURE__*/ F(Mo, {
|
|
5210
5207
|
items: a,
|
|
5211
5208
|
children: d
|
|
5212
5209
|
}) : d;
|
|
@@ -5214,11 +5211,11 @@ var is = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
5214
5211
|
process.env.NODE_ENV !== "production" && (is.displayName = "ComboboxGroup");
|
|
5215
5212
|
//#endregion
|
|
5216
5213
|
//#region node_modules/@base-ui/react/esm/combobox/group-label/ComboboxGroupLabel.js
|
|
5217
|
-
var as =
|
|
5218
|
-
let { render: n, className: r, style: i, id: a, ...o } = e, { setLabelId: s } = rs(), c =
|
|
5214
|
+
var as = /*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
5215
|
+
let { render: n, className: r, style: i, id: a, ...o } = e, { setLabelId: s } = rs(), c = Kt(a);
|
|
5219
5216
|
return U(() => (s(c), () => {
|
|
5220
5217
|
s(void 0);
|
|
5221
|
-
}), [c, s]),
|
|
5218
|
+
}), [c, s]), pt("div", e, {
|
|
5222
5219
|
ref: t,
|
|
5223
5220
|
props: [{ id: c }, o]
|
|
5224
5221
|
});
|
|
@@ -5226,27 +5223,27 @@ var as = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
5226
5223
|
process.env.NODE_ENV !== "production" && (as.displayName = "ComboboxGroupLabel");
|
|
5227
5224
|
//#endregion
|
|
5228
5225
|
//#region node_modules/@base-ui/react/esm/combobox/item/ComboboxItemContext.js
|
|
5229
|
-
var os =
|
|
5226
|
+
var os = /*#__PURE__*/ N.createContext(void 0);
|
|
5230
5227
|
process.env.NODE_ENV !== "production" && (os.displayName = "ComboboxItemContext");
|
|
5231
5228
|
function ss() {
|
|
5232
5229
|
let e = N.useContext(os);
|
|
5233
|
-
if (!e) throw Error(process.env.NODE_ENV === "production" ?
|
|
5230
|
+
if (!e) throw Error(process.env.NODE_ENV === "production" ? W(19) : "Base UI: ComboboxItemContext is missing. ComboboxItem parts must be placed within <Combobox.Item>.");
|
|
5234
5231
|
return e;
|
|
5235
5232
|
}
|
|
5236
5233
|
//#endregion
|
|
5237
5234
|
//#region node_modules/@base-ui/react/esm/combobox/row/ComboboxRowContext.js
|
|
5238
|
-
var cs =
|
|
5235
|
+
var cs = /*#__PURE__*/ N.createContext(!1);
|
|
5239
5236
|
process.env.NODE_ENV !== "production" && (cs.displayName = "ComboboxRowContext");
|
|
5240
5237
|
function ls() {
|
|
5241
5238
|
return N.useContext(cs);
|
|
5242
5239
|
}
|
|
5243
5240
|
//#endregion
|
|
5244
5241
|
//#region node_modules/@base-ui/react/esm/combobox/item/ComboboxItem.js
|
|
5245
|
-
var us =
|
|
5246
|
-
let { render: n, className: r, value: i = null, index: a, disabled: o = !1, nativeButton: s = !1, style: c, ...l } = e, u = N.useRef(!1), d = N.useRef(null), f =
|
|
5242
|
+
var us = /*#__PURE__*/ N.memo(/*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
5243
|
+
let { render: n, className: r, value: i = null, index: a, disabled: o = !1, nativeButton: s = !1, style: c, ...l } = e, u = N.useRef(!1), d = N.useRef(null), f = ln({
|
|
5247
5244
|
index: a,
|
|
5248
5245
|
textRef: d,
|
|
5249
|
-
indexGuessBehavior:
|
|
5246
|
+
indexGuessBehavior: cn.GuessFromOrder
|
|
5250
5247
|
}), p = ja(), m = ls(), { flatFilteredItems: h, hasItems: g } = Na(), _ = Q(p, $.open), v = Q(p, $.selectionMode), y = Q(p, $.readOnly), b = Q(p, $.virtualized), x = Q(p, $.isItemEqualToValue), S = v !== "none", C = a ?? (b ? Ra(h, i, x) : f.index), w = f.index !== -1, ee = Q(p, $.id), te = Q(p, $.isActive, C), T = Q(p, $.isSelected, i), E = Q(p, $.getItemProps), D = N.useRef(null), O = ee != null && w ? `${ee}-${C}` : void 0, k = T && S;
|
|
5251
5248
|
U(() => {
|
|
5252
5249
|
if (!(w && (b || a != null))) return;
|
|
@@ -5279,8 +5276,8 @@ var us = /* @__PURE__ */ N.memo(/* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
5279
5276
|
return;
|
|
5280
5277
|
}
|
|
5281
5278
|
if (!w || g) return;
|
|
5282
|
-
let e = p.state.selectedValue;
|
|
5283
|
-
Ia(i,
|
|
5279
|
+
let e = p.state.selectedValue, t = Array.isArray(e) ? e[e.length - 1] : e;
|
|
5280
|
+
Ia(i, t, x) && p.set("selectedIndex", C);
|
|
5284
5281
|
}, [
|
|
5285
5282
|
w,
|
|
5286
5283
|
g,
|
|
@@ -5299,7 +5296,7 @@ var us = /* @__PURE__ */ N.memo(/* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
5299
5296
|
selected: k
|
|
5300
5297
|
});
|
|
5301
5298
|
j.id = void 0, j.onFocus = void 0;
|
|
5302
|
-
let { getButtonProps: M, buttonRef: ne } =
|
|
5299
|
+
let { getButtonProps: M, buttonRef: ne } = pn({
|
|
5303
5300
|
disabled: o,
|
|
5304
5301
|
focusableWhenDisabled: !0,
|
|
5305
5302
|
native: s,
|
|
@@ -5329,7 +5326,7 @@ var us = /* @__PURE__ */ N.memo(/* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
5329
5326
|
let t = u.current;
|
|
5330
5327
|
u.current = !1, !(o || y || e.button !== 0 || t || !te) && P(e.nativeEvent);
|
|
5331
5328
|
}
|
|
5332
|
-
}, R =
|
|
5329
|
+
}, R = pt("div", e, {
|
|
5333
5330
|
ref: [
|
|
5334
5331
|
ne,
|
|
5335
5332
|
t,
|
|
@@ -5343,21 +5340,21 @@ var us = /* @__PURE__ */ N.memo(/* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
5343
5340
|
l,
|
|
5344
5341
|
M
|
|
5345
5342
|
]
|
|
5346
|
-
}),
|
|
5343
|
+
}), re = N.useMemo(() => ({
|
|
5347
5344
|
selected: k,
|
|
5348
5345
|
textRef: d
|
|
5349
5346
|
}), [k, d]);
|
|
5350
|
-
return
|
|
5351
|
-
value:
|
|
5347
|
+
return /*#__PURE__*/ F(os.Provider, {
|
|
5348
|
+
value: re,
|
|
5352
5349
|
children: R
|
|
5353
5350
|
});
|
|
5354
5351
|
}));
|
|
5355
5352
|
process.env.NODE_ENV !== "production" && (us.displayName = "ComboboxItem");
|
|
5356
5353
|
//#endregion
|
|
5357
5354
|
//#region node_modules/@base-ui/react/esm/combobox/empty/ComboboxEmpty.js
|
|
5358
|
-
var ds =
|
|
5355
|
+
var ds = /*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
5359
5356
|
let { render: n, className: r, style: i, children: a, ...o } = e, { filteredItems: s } = Na(), c = ja(), l = Lo(), u = s.length === 0 ? a : null;
|
|
5360
|
-
return
|
|
5357
|
+
return pt("div", e, {
|
|
5361
5358
|
ref: [
|
|
5362
5359
|
t,
|
|
5363
5360
|
c.state.emptyRef,
|
|
@@ -5374,9 +5371,9 @@ var ds = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
5374
5371
|
process.env.NODE_ENV !== "production" && (ds.displayName = "ComboboxEmpty");
|
|
5375
5372
|
//#endregion
|
|
5376
5373
|
//#region node_modules/@base-ui/react/esm/separator/Separator.js
|
|
5377
|
-
var fs =
|
|
5374
|
+
var fs = /*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
5378
5375
|
let { className: n, render: r, orientation: i = "horizontal", style: a, ...o } = e;
|
|
5379
|
-
return
|
|
5376
|
+
return pt("div", e, {
|
|
5380
5377
|
state: { orientation: i },
|
|
5381
5378
|
ref: t,
|
|
5382
5379
|
props: [{
|
|
@@ -5390,7 +5387,7 @@ process.env.NODE_ENV !== "production" && (fs.displayName = "Separator");
|
|
|
5390
5387
|
//#region node_modules/@base-ui/react/esm/combobox/root/ComboboxRoot.js
|
|
5391
5388
|
function ps(e) {
|
|
5392
5389
|
let { multiple: t = !1, defaultValue: n, value: r, onValueChange: i, autoComplete: a, ...o } = e;
|
|
5393
|
-
return
|
|
5390
|
+
return /*#__PURE__*/ F(ho, {
|
|
5394
5391
|
...o,
|
|
5395
5392
|
selectionMode: t ? "multiple" : "single",
|
|
5396
5393
|
selectedValue: r,
|
|
@@ -5403,20 +5400,20 @@ function ps(e) {
|
|
|
5403
5400
|
//#region node_modules/@base-ui/react/esm/combobox/value/ComboboxValue.js
|
|
5404
5401
|
function ms(e) {
|
|
5405
5402
|
let { children: t, placeholder: n } = e, r = ja(), i = Q(r, $.itemToStringLabel), a = Q(r, $.selectedValue), o = Q(r, $.items), s = Q(r, $.selectionMode) === "multiple", c = Q(r, $.hasSelectedValue), l = !c && n != null && t == null, u = Q(r, $.hasNullItemLabel, l), d = null;
|
|
5406
|
-
return d = typeof t == "function" ? t(a) : t ?? (!c && n != null && !u ? n : s && Array.isArray(a) ? Ka(a, o, i) : Ga(a, o, i)),
|
|
5403
|
+
return d = typeof t == "function" ? t(a) : t ?? (!c && n != null && !u ? n : s && Array.isArray(a) ? Ka(a, o, i) : Ga(a, o, i)), /*#__PURE__*/ F(N.Fragment, { children: d });
|
|
5407
5404
|
}
|
|
5408
5405
|
//#endregion
|
|
5409
5406
|
//#region node_modules/@base-ui/react/esm/combobox/item-indicator/ComboboxItemIndicator.js
|
|
5410
|
-
var hs =
|
|
5407
|
+
var hs = /*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
5411
5408
|
let n = e.keepMounted ?? !1, { selected: r } = ss();
|
|
5412
|
-
return n || r ?
|
|
5409
|
+
return n || r ? /*#__PURE__*/ F(gs, {
|
|
5413
5410
|
...e,
|
|
5414
5411
|
ref: t
|
|
5415
5412
|
}) : null;
|
|
5416
5413
|
});
|
|
5417
5414
|
process.env.NODE_ENV !== "production" && (hs.displayName = "ComboboxItemIndicator");
|
|
5418
|
-
var gs =
|
|
5419
|
-
let { render: n, className: r, style: i, keepMounted: a, ...o } = e, { selected: s } = ss(), c = N.useRef(null), { transitionStatus: l, setMounted: u } =
|
|
5415
|
+
var gs = /*#__PURE__*/ N.memo(/*#__PURE__*/ N.forwardRef((e, t) => {
|
|
5416
|
+
let { render: n, className: r, style: i, keepMounted: a, ...o } = e, { selected: s } = ss(), c = N.useRef(null), { transitionStatus: l, setMounted: u } = sn(s), d = pt("span", e, {
|
|
5420
5417
|
ref: [t, c],
|
|
5421
5418
|
state: {
|
|
5422
5419
|
selected: s,
|
|
@@ -5426,9 +5423,9 @@ var gs = /* @__PURE__ */ N.memo(/* @__PURE__ */ N.forwardRef((e, t) => {
|
|
|
5426
5423
|
"aria-hidden": !0,
|
|
5427
5424
|
children: "✔️"
|
|
5428
5425
|
}, o],
|
|
5429
|
-
stateAttributesMapping:
|
|
5426
|
+
stateAttributesMapping: an
|
|
5430
5427
|
});
|
|
5431
|
-
return
|
|
5428
|
+
return jr({
|
|
5432
5429
|
open: s,
|
|
5433
5430
|
ref: c,
|
|
5434
5431
|
onComplete() {
|
|
@@ -5439,13 +5436,13 @@ var gs = /* @__PURE__ */ N.memo(/* @__PURE__ */ N.forwardRef((e, t) => {
|
|
|
5439
5436
|
process.env.NODE_ENV !== "production" && (gs.displayName = "Inner");
|
|
5440
5437
|
//#endregion
|
|
5441
5438
|
//#region node_modules/@base-ui/react/esm/combobox/chips/ComboboxChips.js
|
|
5442
|
-
var _s =
|
|
5439
|
+
var _s = /*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
5443
5440
|
let { render: n, className: r, style: i, ...a } = e, o = ja(), s = Q(o, $.open), c = Q(o, $.hasSelectionChips), [l, u] = N.useState(void 0);
|
|
5444
5441
|
s && l !== void 0 && u(void 0);
|
|
5445
|
-
let d = N.useRef([]), f =
|
|
5442
|
+
let d = N.useRef([]), f = pt("div", e, {
|
|
5446
5443
|
ref: [t, o.state.chipsContainerRef],
|
|
5447
5444
|
props: [
|
|
5448
|
-
c ? { role: "toolbar" } :
|
|
5445
|
+
c ? { role: "toolbar" } : Ye,
|
|
5449
5446
|
{ onMouseDown(e) {
|
|
5450
5447
|
Do(e, o, o.state.disabled, o.state.readOnly);
|
|
5451
5448
|
} },
|
|
@@ -5460,9 +5457,9 @@ var _s = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
5460
5457
|
u,
|
|
5461
5458
|
d
|
|
5462
5459
|
]);
|
|
5463
|
-
return
|
|
5460
|
+
return /*#__PURE__*/ F(xo.Provider, {
|
|
5464
5461
|
value: p,
|
|
5465
|
-
children:
|
|
5462
|
+
children: /*#__PURE__*/ F(je, {
|
|
5466
5463
|
elementsRef: d,
|
|
5467
5464
|
children: f
|
|
5468
5465
|
})
|
|
@@ -5471,32 +5468,32 @@ var _s = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
5471
5468
|
process.env.NODE_ENV !== "production" && (_s.displayName = "ComboboxChips");
|
|
5472
5469
|
//#endregion
|
|
5473
5470
|
//#region node_modules/@base-ui/react/esm/combobox/chip/ComboboxChipContext.js
|
|
5474
|
-
var vs =
|
|
5471
|
+
var vs = /*#__PURE__*/ N.createContext(void 0);
|
|
5475
5472
|
process.env.NODE_ENV !== "production" && (vs.displayName = "ComboboxChipContext");
|
|
5476
5473
|
function ys() {
|
|
5477
5474
|
let e = N.useContext(vs);
|
|
5478
|
-
if (!e) throw Error(process.env.NODE_ENV === "production" ?
|
|
5475
|
+
if (!e) throw Error(process.env.NODE_ENV === "production" ? W(17) : "useComboboxChipContext must be used within a ComboboxChip");
|
|
5479
5476
|
return e;
|
|
5480
5477
|
}
|
|
5481
5478
|
//#endregion
|
|
5482
5479
|
//#region node_modules/@base-ui/react/esm/combobox/chip/ComboboxChip.js
|
|
5483
|
-
var bs =
|
|
5484
|
-
let { render: n, className: r, style: i, ...a } = e, o = ja(), { setHighlightedChipIndex: s, chipsRef: c } = So(), l = Q(o, $.disabled), u = Q(o, $.readOnly), d = Q(o, $.selectedValue), { ref: f, index: p } =
|
|
5480
|
+
var bs = /*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
5481
|
+
let { render: n, className: r, style: i, ...a } = e, o = ja(), { setHighlightedChipIndex: s, chipsRef: c } = So(), l = Q(o, $.disabled), u = Q(o, $.readOnly), d = Q(o, $.selectedValue), { ref: f, index: p } = ln();
|
|
5485
5482
|
function m(e) {
|
|
5486
5483
|
let t = p;
|
|
5487
5484
|
if (e.key === "ArrowLeft") e.preventDefault(), t = p > 0 ? p - 1 : void 0;
|
|
5488
5485
|
else if (e.key === "ArrowRight") e.preventDefault(), t = p < c.current.length - 1 ? p + 1 : void 0;
|
|
5489
5486
|
else if (e.key === "Backspace" || e.key === "Delete") {
|
|
5490
5487
|
let n = p >= d.length - 1 ? d.length - 2 : p;
|
|
5491
|
-
t = n >= 0 ? n : void 0,
|
|
5488
|
+
t = n >= 0 ? n : void 0, Gn(e), o.state.setIndices({
|
|
5492
5489
|
activeIndex: null,
|
|
5493
5490
|
selectedIndex: null,
|
|
5494
5491
|
type: "keyboard"
|
|
5495
|
-
}), o.state.setSelectedValue(d.filter((e, t) => t !== p), q(
|
|
5496
|
-
} else e.key === "Enter" || e.key === " " ? (
|
|
5492
|
+
}), o.state.setSelectedValue(d.filter((e, t) => t !== p), q(St, e.nativeEvent));
|
|
5493
|
+
} else e.key === "Enter" || e.key === " " ? (Gn(e), t = void 0) : e.key === "ArrowDown" || e.key === "ArrowUp" ? (Gn(e), o.state.setOpen(!0, q(Rt, e.nativeEvent)), t = void 0) : e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey && (t = void 0);
|
|
5497
5494
|
return t;
|
|
5498
5495
|
}
|
|
5499
|
-
let h =
|
|
5496
|
+
let h = pt("div", e, {
|
|
5500
5497
|
ref: [t, f],
|
|
5501
5498
|
state: { disabled: l },
|
|
5502
5499
|
props: [{
|
|
@@ -5512,7 +5509,7 @@ var bs = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
5512
5509
|
}
|
|
5513
5510
|
}, a]
|
|
5514
5511
|
}), g = N.useMemo(() => ({ index: p }), [p]);
|
|
5515
|
-
return
|
|
5512
|
+
return /*#__PURE__*/ F(vs.Provider, {
|
|
5516
5513
|
value: g,
|
|
5517
5514
|
children: h
|
|
5518
5515
|
});
|
|
@@ -5520,8 +5517,8 @@ var bs = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
5520
5517
|
process.env.NODE_ENV !== "production" && (bs.displayName = "ComboboxChip");
|
|
5521
5518
|
//#endregion
|
|
5522
5519
|
//#region node_modules/@base-ui/react/esm/combobox/chip-remove/ComboboxChipRemove.js
|
|
5523
|
-
var xs =
|
|
5524
|
-
let { render: n, className: r, disabled: i = !1, nativeButton: a = !0, style: o, ...s } = e, c = ja(), { index: l } = ys(), u = Q(c, $.disabled), d = Q(c, $.readOnly), f = Q(c, $.selectedValue), p = Q(c, $.isItemEqualToValue), m = u || i, { buttonRef: h, getButtonProps: g } =
|
|
5520
|
+
var xs = /*#__PURE__*/ N.forwardRef(function(e, t) {
|
|
5521
|
+
let { render: n, className: r, disabled: i = !1, nativeButton: a = !0, style: o, ...s } = e, c = ja(), { index: l } = ys(), u = Q(c, $.disabled), d = Q(c, $.readOnly), f = Q(c, $.selectedValue), p = Q(c, $.isItemEqualToValue), m = u || i, { buttonRef: h, getButtonProps: g } = pn({
|
|
5525
5522
|
native: a,
|
|
5526
5523
|
disabled: m || d,
|
|
5527
5524
|
focusableWhenDisabled: !0
|
|
@@ -5536,10 +5533,10 @@ var xs = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
5536
5533
|
});
|
|
5537
5534
|
}
|
|
5538
5535
|
function y(e) {
|
|
5539
|
-
let t = q(
|
|
5536
|
+
let t = q(Ot, e.nativeEvent), n = f[l];
|
|
5540
5537
|
return v(n), c.state.setSelectedValue(f.filter((e, t) => t !== l), t), c.state.inputRef.current?.focus(), t;
|
|
5541
5538
|
}
|
|
5542
|
-
return
|
|
5539
|
+
return pt("button", e, {
|
|
5543
5540
|
ref: [t, h],
|
|
5544
5541
|
state: _,
|
|
5545
5542
|
props: [
|
|
@@ -5552,7 +5549,7 @@ var xs = /* @__PURE__ */ N.forwardRef(function(e, t) {
|
|
|
5552
5549
|
m || d || y(e).isPropagationAllowed || e.stopPropagation();
|
|
5553
5550
|
},
|
|
5554
5551
|
onKeyDown(e) {
|
|
5555
|
-
m || d || (e.key === "Enter" || e.key === " ") && (y(e).isPropagationAllowed ||
|
|
5552
|
+
m || d || (e.key === "Enter" || e.key === " ") && (y(e).isPropagationAllowed || Gn(e));
|
|
5556
5553
|
}
|
|
5557
5554
|
},
|
|
5558
5555
|
s,
|
|
@@ -5584,26 +5581,26 @@ function ws({ className: e, children: t, ...n }) {
|
|
|
5584
5581
|
function Ts({ className: e, ...t }) {
|
|
5585
5582
|
return /* @__PURE__ */ F(ko, {
|
|
5586
5583
|
"data-slot": "combobox-clear",
|
|
5587
|
-
render: /* @__PURE__ */ F(
|
|
5584
|
+
render: /* @__PURE__ */ F(me, {
|
|
5588
5585
|
variant: "ghost",
|
|
5589
5586
|
size: "icon-xs"
|
|
5590
5587
|
}),
|
|
5591
5588
|
className: o(e),
|
|
5592
5589
|
...t,
|
|
5593
|
-
children: /* @__PURE__ */ F(
|
|
5590
|
+
children: /* @__PURE__ */ F(re, { className: "pointer-events-none" })
|
|
5594
5591
|
});
|
|
5595
5592
|
}
|
|
5596
5593
|
function Es({ className: e, children: t, disabled: n = !1, showTrigger: r = !0, showClear: i = !1, ...a }) {
|
|
5597
|
-
return /* @__PURE__ */ I(
|
|
5594
|
+
return /* @__PURE__ */ I(V, {
|
|
5598
5595
|
className: o("w-auto", e),
|
|
5599
5596
|
children: [
|
|
5600
5597
|
/* @__PURE__ */ F(Eo, {
|
|
5601
|
-
render: /* @__PURE__ */ F(
|
|
5598
|
+
render: /* @__PURE__ */ F(ge, { disabled: n }),
|
|
5602
5599
|
...a
|
|
5603
5600
|
}),
|
|
5604
|
-
/* @__PURE__ */ I(
|
|
5601
|
+
/* @__PURE__ */ I(fe, {
|
|
5605
5602
|
align: "inline-end",
|
|
5606
|
-
children: [r && /* @__PURE__ */ F(
|
|
5603
|
+
children: [r && /* @__PURE__ */ F(me, {
|
|
5607
5604
|
size: "icon-xs",
|
|
5608
5605
|
variant: "ghost",
|
|
5609
5606
|
asChild: !0,
|
|
@@ -5705,7 +5702,7 @@ function Is({ className: e, children: t, showRemove: n = !0, ...r }) {
|
|
|
5705
5702
|
}),
|
|
5706
5703
|
className: "-ml-1 opacity-50 hover:opacity-100",
|
|
5707
5704
|
"data-slot": "combobox-chip-remove",
|
|
5708
|
-
children: /* @__PURE__ */ F(
|
|
5705
|
+
children: /* @__PURE__ */ F(re, { className: "pointer-events-none" })
|
|
5709
5706
|
})]
|
|
5710
5707
|
});
|
|
5711
5708
|
}
|
|
@@ -5720,4 +5717,4 @@ function Rs() {
|
|
|
5720
5717
|
return N.useRef(null);
|
|
5721
5718
|
}
|
|
5722
5719
|
//#endregion
|
|
5723
|
-
export {
|
|
5720
|
+
export { V as $, Y as A, Nt as B, pa as C, Pr as D, Kr as E, Jt as F, St as G, Mt as H, q as I, W as J, pt as K, Bt as L, Fn as M, xn as N, Fr as O, pn as P, ye as Q, At as R, Za as S, Xr as T, Pt as U, jt as V, zt as W, H as X, U as Y, Se as Z, ao as _, Ms as a, z as at, eo as b, As as c, js as d, fe as et, Os as f, Rs as g, Cs as h, Ls as i, B as it, Gn as j, X as k, Es as l, ws as m, Is as n, he as nt, Ds as o, re as ot, Ps as p, Re as q, Fs as r, ue as rt, Ns as s, R as st, Ss as t, ge as tt, ks as u, io as v, Yr as w, $a as x, no as y, kt as z };
|